github-actions[bot] commited on
Commit
7d054bb
·
1 Parent(s): 3b3bc67

Update from GitHub Actions

Browse files
Files changed (34) hide show
  1. .output/nitro.json +1 -1
  2. .output/public/assets/@wdns-C8Xpkjrj.js +0 -0
  3. .output/public/assets/ChatInput.vue_vue_type_style_index_0_lang-B1k4vI4G.js +1 -0
  4. .output/public/assets/FrameContent-CMuBQUlq.js +1 -0
  5. .output/public/assets/ToolBar.vue_vue_type_style_index_0_lang-Cn5BAuq2.js +1 -0
  6. .output/public/assets/about-CMJ551TJ.js +1 -0
  7. .output/public/assets/changelog-TTyyWe_7.js +1 -0
  8. .output/public/assets/chat-D0D5Rfde.js +1 -0
  9. .output/public/assets/content-DfpBbjNi.js +3 -0
  10. .output/public/assets/cytoscape-BsbaL92W.js +0 -0
  11. .output/public/assets/destr-WfmzGWA8.js +1 -0
  12. .output/public/assets/dompurify-DRcrZKbd.js +12 -0
  13. .output/public/assets/fetch-SJxNIU2V.js +1 -0
  14. .output/public/assets/help-BZX2GmDP.js +1 -0
  15. .output/public/assets/highlight.js-BgdnSEsd.js +0 -0
  16. .output/public/assets/index-BBncn3uI.js +3 -0
  17. .output/public/assets/index-BVHqhU3I.js +1 -0
  18. .output/public/assets/index-DleTV0S_.js +1 -0
  19. .output/public/assets/index-Dn5cn9RI.js +1 -0
  20. .output/public/assets/index-Rpu0PRbo.js +1 -0
  21. .output/public/assets/index-yWHmk0id.js +9 -0
  22. .output/public/assets/main-apEI6pT3.js +6 -0
  23. .output/public/assets/markdown-it-highlightjs-IY8LrfKU.js +1 -0
  24. .output/public/assets/markdown-ppShADW8.js +23 -0
  25. .output/public/assets/mermaid-CFwXVJJh.js +0 -0
  26. .output/public/assets/mermaid-render-f9KGMq_P.js +0 -0
  27. .output/public/assets/pinia-plugin-persistedstate-CxGPmdL5.js +1 -0
  28. .output/public/assets/popup-lXl5mZ_4.js +19 -0
  29. .output/public/index.html +7 -8
  30. .output/public/popup.html +12 -11
  31. .output/public/sw.js +1 -1
  32. .output/server/chunks/nitro/nitro.mjs +0 -0
  33. .output/server/package.json +48 -1
  34. package-lock.json +242 -248
.output/nitro.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "date": "2025-04-01T07:10:18.331Z",
3
  "preset": "node-server",
4
  "framework": {
5
  "name": "nitro",
 
1
  {
2
+ "date": "2025-04-04T07:27:42.321Z",
3
  "preset": "node-server",
4
  "framework": {
5
  "name": "nitro",
.output/public/assets/@wdns-C8Xpkjrj.js ADDED
The diff for this file is too large to render. See raw diff
 
.output/public/assets/ChatInput.vue_vue_type_style_index_0_lang-B1k4vI4G.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{l as e,K as a,w as t,a as l,v as s,z as n,y as o,R as r,F as i,aa as u,J as c,a9 as p,A as v,H as f,ad as d,u as m,f as g,o as w,B as h,I as y,n as x}from"./@vue-CfxotJ-S.js";import{t as k,u as A,e as b,m as C}from"./mermaid-render-f9KGMq_P.js";import{$ as P,b as z,Y as M,x as V,U as L,s as B}from"./tdesign-vue-next-BiEwLJDx.js";import{c as R,P as U,af as j}from"./tdesign-icons-vue-next-Bre5yOVt.js";import{m as D}from"./mammoth-Cw8VHd7C.js";import{r as N,u as T}from"./xlsx-DB6BMndo.js";import{_ as F,a as S}from"./pdfjs-dist-8WFUNQXM.js";function H(){const e=window.innerWidth<768,a=navigator.userAgent.toLowerCase(),t=["android","webos","iphone","ipad","ipod","blackberry","windows phone"].some((e=>a.includes(e))),l="ontouchstart"in window||navigator.maxTouchPoints>0,s=void 0!==window.screen.orientation;return e&&(t||l||s)}const G={key:0,class:"flex gap-2 flex-wrap"},E=["onClick"],I={class:"max-w-[160px] overflow-hidden text-ellipsis text-nowrap"},_={class:"flex gap-2"},K={class:"max-w-[120px] overflow-hidden text-ellipsis text-nowrap"},Q=["onClick"],J={class:"max-w-[160px] overflow-hidden text-ellipsis text-nowrap"},O={class:"flex gap-2"},Y={class:"max-w-[120px] overflow-hidden text-ellipsis text-nowrap"},Z={class:"whitespace-pre-wrap break-words"},W=e({__name:"FileList",props:{files:{type:Array},showCloseButton:{type:Boolean,default:!0}},setup(e){const g=e,w=a([]);t((()=>g.files.length),(()=>{w.length=g.files.length,w.fill(!1)}),{immediate:!0});const h=e=>{g.files.splice(e,1)},y=l(!1),x=l("");function k(e){if(0===e)return"0 B";const a=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,a)).toFixed(2))+" "+["B","KB","MB","GB"][a]}return(a,t)=>{const l=P,g=z,A=M,b=V;return e.files.length>0?(o(),s("div",G,[(o(!0),s(i,null,u(e.files,((a,t)=>(o(),s(i,null,[a.type.startsWith("image")?(o(),c(A,{key:a.id,visible:w[t],images:[a.content||a.url],"close-on-overlay":"",onClose:e=>(e=>{w[e]=!1})(t)},{trigger:p((()=>[v("div",{class:"bg-color-page flex p-2 gap-2 rounded-lg cursor-pointer",onClick:e=>(e=>{w[e]=!0})(t)},[r(l,{src:a.content||a.url,style:{width:"40px",height:"40px"}},null,8,["src"]),v("div",null,[v("div",I,f(a.name),1),v("div",_,[v("span",K,f(a.type),1),v("span",null,f(k(a.size)),1)])]),e.showCloseButton?(o(),c(g,{key:0,theme:"primary",shape:"circle",onClick:d((e=>h(t)),["stop"]),size:"small",variant:"text"},{default:p((()=>[r(m(R),{slot:"icon"})])),_:2},1032,["onClick"])):n("",!0)],8,E)])),_:2},1032,["visible","images","onClose"])):(o(),s("div",{key:1,class:"bg-color-page flex p-2 gap-2 rounded-lg cursor-pointer",onClick:e=>(e=>{y.value=!0,x.value=e.content})(a)},[r(l,{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAABsCAMAAAC4uKf/AAAA1VBMVEVHcEwgUP8kVP8lVf8oUP8IMKckVP8lU/8NL6kkVP8gUP8QMJ8NL6klVf8jU/8NL6oLMKokVP8OMKglUv8NMKkkVP8kU/8OLqskVP8OL6klU/8kVP8OLqkNL6oNMKkNL6olU/8NMKckVf8MMKckVP////8NL6nI1P8QNLR2lP8/af8yX/8xX/+6yf9Aaf/W3/9bf/+tv/+7yv+Env/x9f/k6v+ftP9oif8YQtQeS+lNdP9piv+En/8XQM/j6v8VPckhT/QSNrqgtP8eS+oTOL+Sqf+Rqf9kuMQUAAAAJHRSTlMAEHBgICDv39/PIBDv35C/ML9wYF9A0H+wz5+Pj59Q76Bgr0CdNRTaAAACCElEQVRo3u3a11ICQRAF0GVFFpAgIIggxt5ZcpJgzvr/n+STVZZMT+zZp7k/cGrSZavoIOClGHaiHKjnvHq5H5hlrwaaYYzlz0yoZgRggDF2pE1lugCGWOlQ08q2wBhjeb1zy0ZggbH8gc4eGlq/GKtqYF2wxNip+pUHa4zVVbGIAGPXrhf2FyupXckCCab2ALJAg7EThQcQUmGsJ8faZBg7dnlk/zF5J+cIMSbrZKDEZFeSFJN1Mi0m6WRiTNzJ1Jiwk8kxdpYmJuhkekzwABxgeCfbYH1M6znAXjAM62Qb7A7FkE4GJ/uIdDI4Whq3Ja0wuMW1Ojkm0Kr0GLxi51ZygAF8PH2+9TlxgmHxmMc8JsYGk2Q3AyfYaBZzs546wBYxkoQem8Zo5uTYA47dkGODNLFhmtsICWZNUrz6s6GbR73cfdPLx7HvRo95zGMe85glNvrmfTcimQyssPtVrJVkbPEpt441szHH3mPtjI2xRB/bGmNLfWxujH3pY0NjbLTStRY2V/85vasPMNyov+lksfXd6DGPecxjHiP+u1+YHOlQjSQFDnbhCmsTD58IExKP1QhT5P01WEvvyKxGoURpUA95CVLGxihTXFgQVOitCj5yWCDfxAz9MCVqFV2MbvLTKkqGNwnPrZKRTx4SLa7cVBt0JLgntYb61G14VTD+fctFnZB/WD8ijwbYDm7GXAAAAABJRU5ErkJggg==",style:{width:"40px",height:"40px"}}),v("div",null,[v("div",J,f(a.name),1),v("div",O,[v("span",Y,f(a.type),1),v("span",null,f(k(a.size)),1)])]),e.showCloseButton?(o(),c(g,{key:0,theme:"primary",shape:"circle",onClick:d((e=>h(t)),["stop"]),size:"small",variant:"text"},{default:p((()=>[r(m(R),{slot:"icon"})])),_:2},1032,["onClick"])):n("",!0)],8,Q))],64)))),256)),r(b,{visible:y.value,"onUpdate:visible":t[0]||(t[0]=e=>y.value=e),attach:"body","on-confirm":()=>y.value=!1},{body:p((()=>[v("div",Z,f(x.value),1)])),_:1},8,["visible","on-confirm"])])):n("",!0)}}}),q={class:"relative"},X=["onClick"],$={class:"flex align-middle justify-center items-center gap-2"},ee=e({__name:"ChatInput",props:{disabled:{type:Boolean,default:!1},minRows:{type:Number,default:2},maxRows:{type:Number,default:8},showUpload:{type:Boolean,default:!0},placeholder:{type:String,default:k("components.chatInput.placeholder")},autoCompleteEnabled:{type:Boolean,default:!1},tips:{type:String,default:""}},emits:["input"],setup(e,{emit:a}){F.workerSrc=new URL(""+new URL("pdf.worker.min-yatZIOMy.mjs",import.meta.url).href,import.meta.url).toString();const k=l(null),P=A();t((()=>P.isSidebarCompact),(e=>{e&&x((()=>{if(k.value){const e=k.value.$el.querySelector("textarea");e&&(e.focus(),e.blur())}}))}));const M=e,V=l(""),R=l([]),G=l(-1);l("");const E=a,I=()=>{const e=V.value.trim();e&&(R.value.push(e),R.value.length>50&&R.value.shift(),localStorage.setItem("chatHistory",JSON.stringify(R.value)),E("input",{content:e,files:_.value.map((e=>({content:e.content,url:e.url,id:e.raw.path,name:e.name,type:e.type,size:e.size})))}),V.value="",_.value=[],G.value=-1)},_=l([]),K=async e=>{try{for(const a of e){const e=await J(a.raw);a.content=e,_.value.push(a)}return{status:"success",error:"",response:{url:" "}}}catch{return{status:"fail",error:"",response:{}}}};async function Q(e){return new Promise(((a,t)=>{const l=new FileReader;l.onload=e=>a(e.target.result),l.onerror=e=>t(e),l.readAsArrayBuffer(e)}))}async function J(e){var a;switch(null==(a=e.name.split(".").pop())?void 0:a.toLowerCase()){case"docx":return await async function(e){const a=await Q(e);return(await D.extractRawText({arrayBuffer:a})).value}(e);case"pdf":return await async function(e){const a=await Q(e),t=await S(a).promise;let l="";for(let s=1;s<=t.numPages;s++){const e=await t.getPage(s);l+=(await e.getTextContent()).items.map((e=>e.str)).join(" ")+"\n"}return l}(e);case"xlsx":case"xls":return await async function(e){const a=await Q(e),t=N(new Uint8Array(a),{type:"array"});let l="";return t.SheetNames.forEach((e=>{const a=t.Sheets[e],s=T.sheet_to_json(a,{header:1});l+=`Sheet: ${e}\n`,s.forEach((e=>{l+=e.join(", ")+"\n"})),l+="\n"})),l}(e);case"png":case"jpg":case"jpeg":case"gif":case"bmp":case"webp":return await async function(e){return new Promise(((a,t)=>{const l=new FileReader;l.readAsDataURL(e),l.onload=()=>a(l.result),l.onerror=e=>t(e)}))}(e);default:return await async function(e){return new Promise(((a,t)=>{const l=new FileReader;l.onload=function(e){a(e.target.result)},l.onerror=function(e){t(e)},l.readAsText(e)}))}(e)}}const O=b(),Y=l(!1),Z=l(0),ee=l(0),ae=l(""),te=l(null),le=l(null),se=l(null),ne=l("-150px"),oe=g((()=>["@ai",...O.enableModels.map((e=>`@${C.getModelItemTitle(e)}`))])),re=l(!1),ie=(e,a)=>{const{e:t}=a;if(Y.value)switch(t.key){case"ArrowDown":t.preventDefault(),Z.value=(Z.value+1)%ue.value.length;break;case"ArrowUp":t.preventDefault(),Z.value=(Z.value-1+ue.value.length)%ue.value.length;break;case"Enter":t.preventDefault(),ue.value.length>0&&pe(ue.value[Z.value]);break;case"Escape":Y.value=!1}else if("Enter"===t.key){if(t.shiftKey||re.value)return;const e=V.value.trim();if(M.autoCompleteEnabled&&e.startsWith("@")&&(oe.value.includes(e)||"@"===e))return void t.preventDefault();t.preventDefault(),I()}else if("ArrowUp"===t.key||"ArrowDown"===t.key){if(-1===G.value&&V.value)return;if(t.preventDefault(),"ArrowUp"===t.key){if(0===R.value.length)return;G.value<R.value.length-1&&G.value++}else G.value>-1&&G.value--;-1===G.value?V.value="":V.value=R.value[R.value.length-1-G.value]}},ue=g((()=>{if(!ae.value)return oe.value;const e=ae.value.toLowerCase();return oe.value.filter((a=>a.toLowerCase().includes(e)))}));t((()=>ue),(async()=>{if(Y.value&&le.value){await x();const e=te.value.offsetHeight;ne.value=`-${e}px`}}));const ce=(e,a)=>{const{e:t}=a,l=e;if(G.value=-1,!M.autoCompleteEnabled)return;const s=t.target.selectionStart;if(ee.value=l.lastIndexOf("@",s-1),-1!==ee.value&&ee.value<s){const e=l.indexOf(" ",ee.value);ee.value===l.length-1||-1===e||e>=s?(ae.value=l.slice(ee.value+1,s),Y.value=!0,Z.value=0):Y.value=!1}else Y.value=!1},pe=e=>{const a=V.value.slice(0,ee.value),t=V.value.slice(V.value.indexOf(" ",ee.value)+1||V.value.length);V.value=a+e+" "+t,Y.value=!1,ae.value=""},ve=()=>{if(se.value&&te.value){const e=te.value,a=se.value,t=e.scrollTop,l=t+e.clientHeight,s=a.offsetTop,n=s+a.offsetHeight;s<t?e.scrollTop=s:n>l&&(e.scrollTop=n-e.clientHeight)}};t(Z,(()=>{x(ve)})),w((()=>{re.value=H();const e=localStorage.getItem("chatHistory");e&&(R.value=JSON.parse(e))}));const fe=async e=>{var a;const t=null==(a=e.clipboardData)?void 0:a.items;if(t)for(let l=0;l<t.length;l++){const a=t[l];if(a.type.startsWith("image/")){e.preventDefault();const t=a.getAsFile();if(t){const e={raw:t,name:`pasted_image_${Date.now()}.${t.type.split("/")[1]}`,type:t.type,size:t.size};await K([e])}}else if("file"===a.kind){e.preventDefault();const t=a.getAsFile();if(t){const e={raw:t,name:t.name||`pasted_file_${Date.now()}`,type:t.type,size:t.size};await K([e])}}}},de=async e=>{var a;const t=null==(a=e.dataTransfer)?void 0:a.files;if(t)for(let l=0;l<t.length;l++){const e=t[l];if(e){const a={raw:e,name:e.name,type:e.type,size:e.size};await K([a])}}};return(a,t)=>{const l=z,g=L,w=B;return o(),s("div",q,[Y.value?(o(),s("div",{key:0,class:"autocomplete left-0 absolute z-50 w-full bg-color-container bordered p-2",ref_key:"autocompleteContainer",ref:te,style:h({top:ne.value})},[v("ul",{ref_key:"suggestionList",ref:le},[(o(!0),s(i,null,u(ue.value,((e,a)=>(o(),s("li",{key:e,onClick:a=>pe(e),class:y({selected:a===Z.value}),ref_for:!0,ref:e=>{a===Z.value&&(se.value=e)}},f(e),11,X)))),128))],512)],4)):n("",!0),v("div",{class:"flex flex-col chat-input bg-color-container bordered rounded-lg px-1",onDragover:t[1]||(t[1]=d((()=>{}),["prevent"])),onDrop:d(de,["prevent"])},[r(W,{files:_.value,class:y(["py-2"])},null,8,["files"]),v("div",$,[e.showUpload?(o(),c(g,{key:0,theme:"custom","request-method":K,multiple:!0,allowUploadDuplicateFile:!0},{default:p((()=>[r(l,{theme:"primary",shape:"circle",size:"large",variant:"base"},{default:p((()=>[r(m(U),{slot:"icon"})])),_:1})])),_:1})):n("",!0),r(w,{ref_key:"textareaRef",ref:k,class:"flex-1",onKeydown:ie,onChange:ce,onPaste:fe,disabled:e.disabled,modelValue:V.value,"onUpdate:modelValue":t[0]||(t[0]=e=>V.value=e),placeholder:e.placeholder,name:"description",tips:e.tips,autosize:{minRows:e.minRows,maxRows:e.maxRows}},null,8,["disabled","modelValue","placeholder","tips","autosize"]),r(l,{theme:"primary",shape:"circle",onClick:I,size:"large",variant:"base"},{default:p((()=>[r(m(j),{slot:"icon"})])),_:1})])],32)])}}});export{ee as _,W as a,H as c};
.output/public/assets/FrameContent-CMuBQUlq.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{c as e}from"./@vueuse-B4dz7nOv.js";import{d as t}from"./lodash-VDnThKtA.js";import{p as a,u as r,_ as o}from"./mermaid-render-f9KGMq_P.js";import{V as s}from"./tdesign-vue-next-BiEwLJDx.js";import{l as n,a as i,f as m,w as u,v as l,y as d,R as p,a9 as c,A as f,I as g,B as h,u as v}from"./@vue-CfxotJ-S.js";const y=["src"],w=o(n({__name:"FrameContent",props:{frameSrc:String,offset:{type:Number,default:0}},setup(o){const n=o,{width:w,height:x}=e(),_=i(!0),b=i(window.innerHeight),F=i(),j=m((()=>[`${a}-iframe-page`])),B=r(),I=m((()=>({height:`${b.value}px`}))),S=getComputedStyle(document.documentElement),H=S.getPropertyValue("--td-comp-size-xxxl"),C=S.getPropertyValue("--td-comp-size-xxl"),V=S.getPropertyValue("--td-comp-paddingTB-m");function $(){const e=v(F);if(!e)return;let t=0;const{showLayoutHeader:a,showFooter:r,showBreadcrumb:o}=B,s=a?parseFloat(H):0,i=document.querySelector(".t-breadcrumb"),m=s+(o?function(e){let t=e.clientHeight;const a=window.getComputedStyle(e);return t+=parseInt(a.marginTop,10),t+=parseInt(a.marginBottom,10),t+=parseInt(a.borderTopWidth,10),t+=parseInt(a.borderBottomWidth,10),t}(i):0)+2*parseFloat(V)+(r?parseFloat(C):0)+2+n.offset;b.value=window.innerHeight-m,t=document.documentElement.clientHeight-m,e.style.height=`${t}px`}function z(){_.value=!1,$()}return u([w,x],t($,250)),u([()=>B.showFooter,()=>B.showBreadcrumb],t($,250)),(e,t)=>{const a=s;return d(),l("div",{class:g(j.value),style:h(I.value)},[p(a,{loading:_.value,size:"large",style:h(I.value)},{default:c((()=>[f("iframe",{ref_key:"frameRef",ref:F,src:o.frameSrc,class:g(`${j.value}__main`),onLoad:z},null,42,y)])),_:1},8,["loading","style"])],6)}}}),[["__scopeId","data-v-200260e8"]]);export{w as F};
.output/public/assets/ToolBar.vue_vue_type_style_index_0_lang-Cn5BAuq2.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{l as e,K as t,a,V as l,w as n,o as s,f as o,v as i,y as c,F as r,a0 as u,z as d,A as p,H as v,a1 as m,R as f,a9 as g,u as h,aa as x,J as y,G as w,n as b,ah as _,I as k,ad as C,B as j}from"./@vue-CfxotJ-S.js";import{m as T}from"./markdown-ppShADW8.js";import{s as B,b as $,Y as R,I as S,Z as z,_ as M,E,c as V,j as A,m as H,K as L,e as O}from"./tdesign-vue-next-BiEwLJDx.js";import{c as q,ad as I,v as U,k as D,Z as P,a5 as Y,af as F}from"./tdesign-icons-vue-next-Bre5yOVt.js";import{_ as K,b as Z,t as N}from"./mermaid-render-f9KGMq_P.js";import{a as W}from"./ChatInput.vue_vue_type_style_index_0_lang-B1k4vI4G.js";import{U as G}from"./@wdns-C8Xpkjrj.js";import{f as J,b as X}from"./fetch-SJxNIU2V.js";import{v as Q}from"./uuid-_R2nDvl_.js";import{a as ee}from"./main-apEI6pT3.js";const te={class:"markdown-body"},ae={class:"think-summary"},le=["innerHTML"],ne=["innerHTML"],se={class:"flex justify-end mt-2 gap-5"},oe={key:0,class:"tdesign-image-viewer-wrapper flex flex-wrap gap-6"},ie={key:0,class:"tdesign-image-viewer__error tdesign-image-viewer__ui-image tdesign-image-viewer__base"},ce={class:"tdesign-image-viewer__error--content"},re={class:"tdesign-image-viewer__ui-image tdesign-image-viewer__base"},ue=["src","onError"],de=["onClick"],pe={class:"absolute left-1 top-1 max-w-[75%]"},ve=["title"],me=K(e({__name:"AssistantContent",props:{content:{type:Object},isEditing:{type:Boolean,default:!1}},emits:["save","cancel"],setup(e,{emit:_}){const k=t([!1,!1,!1,!1]),C=t([!1,!1,!1,!1]),j=e,S=a(""),z=a(""),M=a(!1),E=a(!1);let V=null,A=null;const H=async()=>{j.content.think&&(V&&clearTimeout(V),V=window.setTimeout((async()=>{try{M.value=!0,S.value=await T.render(j.content.think||"")}catch(e){}finally{M.value=!1}}),100))},L=async()=>{j.content.text&&(A&&clearTimeout(A),A=window.setTimeout((async()=>{try{E.value=!0,z.value=await T.render(j.content.text||"")}catch(e){}finally{E.value=!1}}),100))};l((()=>{V&&clearTimeout(V),A&&clearTimeout(A)})),n((()=>j.content.text),(()=>{L()})),n((()=>j.content.think),(()=>{H()})),s((()=>{j.content.text&&!z.value&&L(),j.content.think&&!S.value&&H()}));const O=o((()=>j.content.images.map((e=>e.content||e.url)))),P=_,Y=a(j.content.text),F=()=>{P("save",Y.value)},K=()=>{Y.value=j.content.text,P("cancel")},Z=(e,t)=>{},N=a(null);return n((()=>j.isEditing),(e=>{e&&(Y.value=j.content.text,b((()=>{N.value.$el.querySelector("textarea").focus()})))})),(t,a)=>{const l=B,n=$,s=R;return c(),i(r,null,[u(p("div",te,[u(p("details",null,[p("summary",ae,v(e.content.text?"查看 AI 思考过程":"思考中..."),1),p("div",{class:"think-process assistant-content",innerHTML:S.value},null,8,le)],512),[[m,e.content.think]]),p("div",{innerHTML:z.value,class:"assistant-content"},null,8,ne)],512),[[m,(e.content.text||e.content.think)&&!e.isEditing]]),u(p("div",null,[f(l,{ref_key:"textareaRef",ref:N,modelValue:Y.value,"onUpdate:modelValue":a[0]||(a[0]=e=>Y.value=e),autosize:{minRows:5,maxRows:20},onBlur:Z},null,8,["modelValue"]),p("div",se,[f(n,{shape:"circle",size:"medium",onClick:K},{default:g((()=>[f(h(q),{slot:"icon"})])),_:1}),f(n,{shape:"circle",size:"medium",onClick:F},{default:g((()=>[f(h(I),{slot:"icon"})])),_:1})])],512),[[m,e.content.text&&e.isEditing]]),O.value.length>0?(c(),i("div",oe,[(c(!0),i(r,null,x(j.content.images,((e,t)=>(c(),i("div",{key:t,class:"min-w-44 min-h-44"},[C[t]?(c(),i("div",ie,[p("div",ce,[f(h(U),{name:"image-error",size:"2em"}),a[1]||(a[1]=p("div",null,"图片无法显示",-1))])])):(c(),y(s,{key:1,visible:k[t],images:O.value,"default-index":t,"close-on-overlay":"",onClose:e=>(e=>{k[e]=!1})(t)},{trigger:g((()=>[p("div",re,[p("img",{alt:"test",src:e.content||e.url,class:"tdesign-image-viewer__ui-image--img",onError:e=>(e=>{C[e]=!0})(t)},null,40,ue),p("div",{class:"tdesign-image-viewer__ui-image--hover",onClick:e=>(e=>{k[e]=!0})(t)},[p("span",null,[f(h(D),{size:"1.4em"}),a[2]||(a[2]=w(" 预览 "))])],8,de),p("div",pe,[p("div",{class:"text-black bg-white bg-opacity-75 p-1 rounded-2xl text-xs truncate",title:e.model},v(e.model),9,ve)])])])),_:2},1032,["visible","images","default-index","onClose"]))])))),128))])):d("",!0)],64)}}}),[["__scopeId","data-v-19255ef7"]]),fe={key:0,class:"toggle-button-container"},ge={key:1},he={class:"flex justify-end mt-2 gap-5"},xe=K(e({__name:"UserContent",props:{content:{type:Object},isEditing:{type:Boolean,default:!1},maxHeight:{type:Number,default:300}},emits:["save","cancel"],setup(e,{emit:t}){_((e=>({"2702f56a":l.maxHeight+"px"})));const l=e,x=o((()=>[...l.content.files,...l.content.images])),y=t,C=a(l.content.text),j=a(null),T=a(!0),R=a(!1),z=a(!1),M=()=>{if(j.value){const e=j.value.scrollHeight;R.value=e>l.maxHeight}},E=()=>{T.value=!T.value};s((()=>{b((async()=>{M()})),window.addEventListener("resize",M)})),n((()=>l.content.text),(()=>{b((()=>{M()}))}));const V=()=>{y("save",C.value)},A=()=>{C.value=l.content.text,y("cancel")},H=(e,t)=>{},L=a(null);return n((()=>l.isEditing),(e=>{e&&(C.value=l.content.text,b((()=>{L.value.$el.querySelector("textarea").focus()})))})),(t,a)=>{const l=S,n=$,s=B;return c(),i(r,null,[f(W,{files:x.value,showCloseButton:!1,class:"mb-2"},null,8,["files"]),e.isEditing?d("",!0):(c(),i("div",{key:0,class:"content-container relative",onMouseenter:a[0]||(a[0]=e=>z.value=!0),onMouseleave:a[1]||(a[1]=e=>z.value=!1)},[p("div",{ref_key:"contentRef",ref:j,class:k(["user-content whitespace-pre-wrap break-words",{"content-collapsed":T.value&&R.value}])},v(e.content.text),3),R.value?u((c(),i("div",fe,[f(n,{size:"small",variant:"text",onClick:E,class:"toggle-button"},{icon:g((()=>[f(l,{name:T.value?"chevron-down":"chevron-up"},null,8,["name"])])),default:g((()=>[w(v(T.value?"展开":"收起")+" ",1)])),_:1})],512)),[[m,z.value]]):d("",!0)],32)),e.isEditing?(c(),i("div",ge,[f(s,{ref_key:"textareaRef",ref:L,modelValue:C.value,"onUpdate:modelValue":a[2]||(a[2]=e=>C.value=e),autosize:{minRows:2,maxRows:20},onBlur:H},null,8,["modelValue"]),p("div",he,[f(n,{size:"large",shape:"circle",variant:"text",onClick:A},{default:g((()=>[f(h(q),{slot:"icon"})])),_:1}),f(n,{size:"large",shape:"circle",variant:"text",onClick:V},{default:g((()=>[f(h(I),{slot:"icon"})])),_:1})])])):d("",!0)],64)}}}),[["__scopeId","data-v-b8afd07d"]]),ye=e({__name:"CodeRenderer",props:{blocks:{type:Array,required:!0}},setup(e){const t=e,l=a(),r=o((()=>t.blocks.every((e=>e.complete))));const u=o((()=>{var e,a,l,n,s,o;if(!r.value)return"";const i=(null==(e=t.blocks.find((e=>"html"===e.language)))?void 0:e.code)||"",{head:c,body:u}=function(e){const t=e.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i),a=e.match(/<body\b[^>]*>([\s\S]*?)<\/body>/i);return{head:t?t[1].trim():"",body:a?a[1].trim():""}}(i),d=(null==(a=t.blocks.find((e=>"css"===e.language)))?void 0:a.code)||"",p=(null==(l=t.blocks.find((e=>"js"===e.language||"javascript"===e.language||"typescript"===e.language)))?void 0:l.code)||"";null==(n=t.blocks.find((e=>"typescript"===e.language)))||n.code;const v=(null==(s=t.blocks.find((e=>"jsx"===e.language)))?void 0:s.code)||"",m=(null==(o=t.blocks.find((e=>"vue"===e.language)))?void 0:o.code)||"";if(v){const e=v.match(/export default (\w+);/),t=e?e[1]:null;return`\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset="utf-8" />\n <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'unsafe-inline' 'unsafe-eval' https://cdnjs.cloudflare.com; style-src 'unsafe-inline';">\n <style>${d}</style>\n <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/7.24.6/babel.min.js"><\/script>\n <script src="https://cdnjs.cloudflare.com/ajax/libs/react/18.3.1/umd/react.production.min.js"><\/script>\n <script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.3.1/umd/react-dom.production.min.js"><\/script>\n ${c}\n </head>\n\n <body>\n <div id="app"></div>\n ${u}\n <script type="text/babel">\n ${function(e){const t=/import\s+(?:(\w+)\s*,?\s*)?(?:{([^}]+)})?\s+from\s+['"]react['"];?/g,a=/import\s+['"]([^'"]+\.css)['"];?/g,l=/import\s+\w+\s+from\s+['"]react-dom['"];?/g,n=/ReactDOM\.render\([^)]*\);?/g;let s,o=e,i="";const c=new Set;for(;null!==(s=t.exec(e));)s[1]&&(i=s[1].trim()),s[2]&&s[2].split(",").forEach((e=>c.add(e.trim())));o=o.replace(t,""),o=o.replace(a,""),o=o.replace(l,""),o=o.replace(n,"");let r="";r+=i?`const ${i} = window.React;\n`:"const React = window.React;\n";c.size>0&&(r+=`const { ${Array.from(c).join(", ")} } = React;\n`);return(r+o).replace(/export default \w+;\s*$/,"")}(v)}\n ReactDOM.render(<${t} />, document.getElementById('app'))\n <\/script>\n </body>\n </html>\n `}if(m){const e=m.match(/<template>([\s\S]*)<\/template>/),t=m.match(/<script\s*(setup)?[^>]*>([\s\S]*)<\/script>/),a=m.match(/<style[^>]*>([\s\S]*)<\/style>/),l=e?e[1].trim():"",n=t?t[2].trim():"",s=t&&"setup"===t[1],o=a?a[1].trim():"";let i=n;if(s)i=i.replace(/import\s+.*from\s+['"].*['"]/g,""),i=`return {\n ${i}\n }`;else{const e=i.match(/export\s+default\s*{([\s\S]*)}/);e&&(i=e[1].trim())}return`\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset="utf-8" />\n <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'unsafe-inline' 'unsafe-eval' https://unpkg.com; style-src 'unsafe-inline';">\n <script src="https://unpkg.com/vue@3/dist/vue.global.js"><\/script>\n <style>${o}</style>\n ${c}\n </head>\n <body>\n <div id="app">\n ${l}\n </div>\n ${u}\n <script>\n const { createApp, ref, reactive, computed, onMounted } = Vue;\n \n const app = createApp({\n ${s?"setup() {":""}\n ${i}\n ${s?"}":""}\n });\n \n app.mount('#app');\n <\/script>\n </body>\n </html>\n `}return`\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset="utf-8" />\n <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'unsafe-inline'; style-src 'unsafe-inline';">\n <style>${d}</style>\n ${c}\n </head>\n <body>\n ${u}\n <script>\n ${p}\n <\/script>\n </body>\n </html>\n `}));return n(u,(e=>{l.value&&(l.value.srcdoc=e)})),s((()=>{l.value&&(l.value.srcdoc=u.value)})),(e,t)=>(c(),i("iframe",{ref_key:"iframeRef",ref:l,sandbox:"allow-scripts",style:{width:"100%",height:"100%",border:"none"}},null,512))}}),we={class:"h-full w-full relative"},be=e({__name:"CodeBlocks",props:{content:{type:String,required:!0},closeBtn:{type:[Function,null],default:null}},setup(e){const t=e,l=a(0),s=a([]);n((()=>t.content),(e=>{s.value=function(e){const t=/(?:^|\n)```(?:(html|css|js|javascript|typescript|jsx|vue)?.*)\n([\s\S]*?)(?:```|$)/g;return[...e.matchAll(t)].map((e=>({language:e[1]||"javascript",code:e[2].trim(),complete:e[0].endsWith("```")})))}(t.content);const a=s.value.every((e=>e.complete));l.value=a?-1:0}),{immediate:!0});const o=()=>{t.closeBtn()};return(t,a)=>{const n=M,u=z,p=$;return c(),i("div",we,[f(u,{modelValue:l.value,"onUpdate:modelValue":a[0]||(a[0]=e=>l.value=e),class:"h-full overflow-auto flex flex-col artifact"},{default:g((()=>[f(n,{value:-1,label:"preview"},{default:g((()=>[f(ye,{blocks:s.value,class:"rounded-lg"},null,8,["blocks"])])),_:1}),(c(!0),i(r,null,x(s.value,((e,t)=>(c(),y(n,{value:t,label:e.language},{default:g((()=>[f(h(G),{highlightjs:"",code:e.code,lang:e.language,theme:!1,class:"code-block h-full"},null,8,["code","lang"])])),_:2},1032,["value","label"])))),256))])),_:1},8,["modelValue"]),e.closeBtn?(c(),y(p,{key:0,size:"small",variant:"outline",onClick:o,class:"absolute right-0 top-3 z-50"},{default:g((()=>[f(h(q),{slot:"icon"})])),_:1})):d("",!0)])}}}),_e={class:"flex flex-row items-center p-2"},ke={class:"flex flex-col gap-2 p-2"},Ce={class:"max-h-32 bg-color-page overflow-auto whitespace-pre-line scrollbar p-2"},je=["innerHTML"],Te={class:"flex flex-row justify-end gap-2"},Be={class:"flex flex-col gap-2 p-2"},$e={class:"flex flex-grow items-center gap-2 relative"},Re={class:"flex flex-col gap-2 p-2"},Se={class:"max-h-72 scrollbar overflow-y-auto overflow-x-hidden bordered p-2 shadow-sm"},ze=e({__name:"ToolBar",props:{parent:Object},setup(e,{expose:t}){const l=Z(),d=ee(),_=e,k=a({top:"0px",left:"0px"}),R=a(!1),S=a(null),z=a(null),M=a(""),I=()=>{if(!S.value||!_.parent)return;const e=S.value,t=_.parent,a=t.getBoundingClientRect(),l=e.getBoundingClientRect();let n=parseFloat(k.value.left);const s=a.width-l.width;n>s&&(n=s),n<0&&(n=0);let o=parseFloat(k.value.top);const i=l.height+o,c=a.height;i>c&&(o=Math.max(0,c-l.height));const r=t.scrollTop;o<r&&(o=r),k.value={top:`${o}px`,left:`${n}px`}},U=a(!1),D=a(!1),K=a(""),W=()=>{R.value=!1,U.value=!1},G=()=>{const e=window.getSelection();navigator.clipboard.writeText(e.toString()),W(),O.success(N("components.toolBar.copySuccessMsg"))},te=()=>{navigator.clipboard.writeText(M.value),W(),O.success(N("components.toolBar.copySuccessMsg"))},ae=o((()=>l.toolBarButtons.filter((e=>e.name&&e.show)))),le=(e,t)=>{const{e:a}=t;if("Enter"===a.key){if(a.shiftKey)return;a.preventDefault(),ce()}};let ne="",se=null,oe=a("");const ie=()=>{he(),D.value=!0,se=window.getSelection(),oe.value=se.toString(),b((()=>{I()}))},ce=async()=>{const e=oe.value,t=K.value;ne=t.includes("{{text}}")?t.replace("{{text}}",e):e?e+"\r\n"+t:t,D.value=!1,await re()};async function re(){const e=_.parent,t=S.value.getBoundingClientRect().left-e.getBoundingClientRect().left;he(),U.value=!0,b((()=>{const a=e.getBoundingClientRect(),l=S.value.getBoundingClientRect();let n=t;const s=a.width-l.width;if(n>s&&(n=s),n<0&&(n=0),se&&se.rangeCount>0){const t=se.getRangeAt(0).getBoundingClientRect();let s=t.top+e.scrollTop-a.top-52;const o=e.scrollTop;s<o&&(s=o),s+l.height>a.height+e.scrollTop&&(s=t.bottom+e.scrollTop-a.top+10,s+l.height>a.height+e.scrollTop&&(s=Math.max(o,a.height+e.scrollTop-l.height))),k.value={top:`${s}px`,left:`${n}px`}}})),await ue()}const ue=async()=>{l.assistModel?(M.value=N("components.toolBar.handing"),await J(ne,(e=>{M.value=e,b((()=>{I()}))}))):O.error(N("components.toolBar.noAssistModel"))},de=a(!1),pe=async()=>{he(),de.value=!0,oe.value=window.getSelection().toString(),b((()=>{I()}))},ve=a(""),me=d.list,fe=async()=>{de.value=!1;const e=oe.value,t={id:Q(),title:e,time:(new Date).getTime(),conversationId:"",conversationName:"",conversationAvatar:"",chats:[],notes:[oe.value]};if(d.add(t),O.success(N("pages.conversation.favorite_success")),l.assistModel){const a=N("pages.conversation.extract_core_conversation",{question:e,answer:""});await X(a,(e=>{t.title=e,t.title=t.title.replaceAll("###",""),t.title=t.title.trim(),d.update(t)}))}},ge=async()=>{if(!ve.value)return void O.warning("需要先选中笔记");de.value=!1;const e=me.find((e=>e.id==ve.value));e.notes.push(oe.value),d.update(e),O.success(N("pages.conversation.favorite_success"))},he=()=>{U.value=!1,D.value=!1,K.value="",de.value=!1,ve.value=""};return n([M,D,de],(()=>{(U.value||D.value||de.value)&&b((()=>{I()}))}),{deep:!0}),s((()=>{if(_.parent){new ResizeObserver((()=>{R.value&&I()})).observe(_.parent),_.parent.addEventListener("scroll",(()=>{R.value&&I()}))}})),t({showToolbox:()=>{const e=window.getSelection();e.toString().trim()&&(R.value=!0,he(),b((()=>{const t=e.getRangeAt(0).getBoundingClientRect(),a=_.parent,l=a.getBoundingClientRect(),n=S.value.getBoundingClientRect();let s=t.left+t.width/2-n.width/2+a.scrollLeft-l.left;const o=l.width-n.width;s>o&&(s=o),s<0&&(s=0);let i=t.top+a.scrollTop-l.top-52;const c=a.scrollTop;i<c&&(i=c),i+n.height>l.height+a.scrollTop&&(i=t.bottom+a.scrollTop-l.top+10,i+n.height>l.height+a.scrollTop&&(i=Math.max(c,l.height+a.scrollTop-n.height))),k.value={top:`${i}px`,left:`${s}px`}})))},hideToolbox:W}),(e,t)=>{const a=$,l=E,n=B,s=L,o=H,d=A,b=V;return u((c(),i("div",{ref_key:"selectToolbox",ref:S,style:j(k.value),class:"z-50 absolute bg-color-container bordered rounded-xl shadow-md flex flex-col max-w-80",onMouseup:t[2]||(t[2]=C((()=>{}),["stop"])),onMousedown:t[3]||(t[3]=C((()=>{}),["stop"]))},[p("div",_e,[(c(!0),i(r,null,x(ae.value,(e=>(c(),i(r,null,[f(a,{onClick:t=>(async e=>{se=window.getSelection(),oe.value=se.toString(),ne=e.prompt.replace("{{text}}",oe.value),await re()})(e),size:"small",variant:"text"},{default:g((()=>[w(v(e.name),1)])),_:2},1032,["onClick"]),f(l,{layout:"vertical"})],64)))),256)),f(a,{size:"small",variant:"text",onClick:ie},{default:g((()=>[w(v(e.$t("components.toolBar.dialog")),1)])),_:1}),f(l,{layout:"vertical"}),f(a,{size:"small",variant:"text",onClick:pe},{default:g((()=>[w(v(e.$t("components.toolBar.faviorite")),1)])),_:1}),f(l,{layout:"vertical"}),f(a,{size:"small",variant:"text",onClick:G},{default:g((()=>[w(v(e.$t("components.toolBar.copy")),1)])),_:1})]),u(p("div",ke,[p("pre",Ce,v(h(ne)),1),p("div",{ref_key:"toolResultContent",ref:z,class:"markdown-body max-h-64 overflow-auto scrollbar",innerHTML:h(T).renderSync(M.value)},null,8,je),p("div",Te,[f(a,{size:"small",variant:"outline",onClick:ue},{default:g((()=>[f(h(P),{slot:"icon"})])),_:1}),f(a,{size:"small",variant:"outline",onClick:te},{default:g((()=>[f(h(Y),{slot:"icon"})])),_:1}),f(a,{size:"small",variant:"outline",onClick:W},{default:g((()=>[f(h(q),{slot:"icon"})])),_:1})])],512),[[m,U.value]]),u(p("div",Be,[u(p("pre",{class:"max-h-32 bg-color-page overflow-auto whitespace-pre-line scrollbar p-2"},v(h(oe).trim()),513),[[m,h(oe).trim()]]),p("div",$e,[f(n,{modelValue:K.value,"onUpdate:modelValue":t[0]||(t[0]=e=>K.value=e),onKeypress:le},null,8,["modelValue"]),f(a,{size:"small",shape:"circle",variant:"outline",onClick:ce,class:"absolute bottom-1 right-1"},{default:g((()=>[f(h(F),{slot:"icon"})])),_:1})])],512),[[m,D.value]]),u(p("div",Re,[u(p("pre",{class:"max-h-32 bg-color-page overflow-auto whitespace-pre-line scrollbar p-2"},v(h(oe).trim()),513),[[m,h(oe).trim()]]),f(a,{onClick:fe,theme:"default",variant:"outline"},{default:g((()=>t[4]||(t[4]=[w("创建新的笔记")]))),_:1}),f(a,{onClick:ge,theme:"default",variant:"outline"},{default:g((()=>t[5]||(t[5]=[w("添加到笔记")]))),_:1}),p("div",Se,[f(b,{modelValue:ve.value,"onUpdate:modelValue":t[1]||(t[1]=e=>ve.value=e)},{default:g((()=>[f(d,{gutter:[16,16]},{default:g((()=>[(c(!0),i(r,null,x(h(me),(e=>(c(),y(o,{span:12},{default:g((()=>[f(s,{value:e.id,class:"grid grid-flow-col auto-cols-max align-middle fav-radio fav-radio-toolbar"},{default:g((()=>[w(v(e.title),1)])),_:2},1032,["value"])])),_:2},1024)))),256))])),_:1})])),_:1},8,["modelValue"])])],512),[[m,de.value]])],36)),[[m,R.value]])}}});export{me as A,xe as U,be as _,ze as a};
.output/public/assets/about-CMJ551TJ.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{F as s}from"./FrameContent-CMuBQUlq.js";import{l as t,J as o,y as r}from"./@vue-CfxotJ-S.js";import"./@vueuse-B4dz7nOv.js";import"./lodash-VDnThKtA.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./mermaid-render-f9KGMq_P.js";import"./mermaid-CFwXVJJh.js";import"./@mermaid-js-C9iCgeAb.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./lodash-es-RhymR7yg.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./ts-dedent-CttZBlkd.js";import"./d3-transition-0ltv4da8.js";import"./d3-timer-keMr1twq.js";import"./d3-dispatch-Chq_f_hl.js";import"./d3-interpolate-Ct9kki6l.js";import"./d3-color-D5ULnJIe.js";import"./d3-selection-Oxnq6l6A.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-Dz8HuW59.js";import"./dompurify-DRcrZKbd.js";import"./stylis-Cl7w7uv3.js";import"./dagre-d3-es-D8JeTxsO.js";import"./@braintree-BB7t-Iuh.js";import"./khroma-C2oHPU0S.js";import"./dayjs-Cbdj87rt.js";import"./d3-scale-CdkN4P7M.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-BhN1wQGI.js";import"./d3-format-C0lSXcPg.js";import"./d3-time-format-DB2uBv1t.js";import"./d3-time-B1kAM736.js";import"./d3-axis-pCwzqJ1S.js";import"./d3-shape-C6CU9yox.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-Bkc4UHOn.js";import"./cytoscape-BsbaL92W.js";import"./cytoscape-cose-bilkent-CcQu5e-H.js";import"./cose-base-kQthUiMK.js";import"./layout-base-DqRk0Tgc.js";import"./d3-sankey-B6tQBass.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./@iconify-BUO7KvjM.js";import"./marked-CrLTNeyQ.js";import"./cytoscape-fcose-B58q80h4.js";import"./pinia-gf2247cH.js";import"./pinia-plugin-persistedstate-CxGPmdL5.js";import"./destr-WfmzGWA8.js";import"./deep-pick-omit-DP_A4OSP.js";import"./tdesign-vue-next-BiEwLJDx.js";import"./tdesign-icons-vue-next-Bre5yOVt.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./vue-i18n-BLIfPQxk.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";const i=t({__name:"about",setup:t=>(t,i)=>(r(),o(s,{frameSrc:"http://www.openseed.top/about"}))});export{i as default};
.output/public/assets/changelog-TTyyWe_7.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{F as s}from"./FrameContent-CMuBQUlq.js";import{l as t,J as o,y as r}from"./@vue-CfxotJ-S.js";import"./@vueuse-B4dz7nOv.js";import"./lodash-VDnThKtA.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./mermaid-render-f9KGMq_P.js";import"./mermaid-CFwXVJJh.js";import"./@mermaid-js-C9iCgeAb.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./lodash-es-RhymR7yg.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./ts-dedent-CttZBlkd.js";import"./d3-transition-0ltv4da8.js";import"./d3-timer-keMr1twq.js";import"./d3-dispatch-Chq_f_hl.js";import"./d3-interpolate-Ct9kki6l.js";import"./d3-color-D5ULnJIe.js";import"./d3-selection-Oxnq6l6A.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-Dz8HuW59.js";import"./dompurify-DRcrZKbd.js";import"./stylis-Cl7w7uv3.js";import"./dagre-d3-es-D8JeTxsO.js";import"./@braintree-BB7t-Iuh.js";import"./khroma-C2oHPU0S.js";import"./dayjs-Cbdj87rt.js";import"./d3-scale-CdkN4P7M.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-BhN1wQGI.js";import"./d3-format-C0lSXcPg.js";import"./d3-time-format-DB2uBv1t.js";import"./d3-time-B1kAM736.js";import"./d3-axis-pCwzqJ1S.js";import"./d3-shape-C6CU9yox.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-Bkc4UHOn.js";import"./cytoscape-BsbaL92W.js";import"./cytoscape-cose-bilkent-CcQu5e-H.js";import"./cose-base-kQthUiMK.js";import"./layout-base-DqRk0Tgc.js";import"./d3-sankey-B6tQBass.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./@iconify-BUO7KvjM.js";import"./marked-CrLTNeyQ.js";import"./cytoscape-fcose-B58q80h4.js";import"./pinia-gf2247cH.js";import"./pinia-plugin-persistedstate-CxGPmdL5.js";import"./destr-WfmzGWA8.js";import"./deep-pick-omit-DP_A4OSP.js";import"./tdesign-vue-next-BiEwLJDx.js";import"./tdesign-icons-vue-next-Bre5yOVt.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./vue-i18n-BLIfPQxk.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";const i=t({__name:"changelog",setup:t=>(t,i)=>(r(),o(s,{frameSrc:"http://www.openseed.top/changelog"}))});export{i as default};
.output/public/assets/chat-D0D5Rfde.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{l as e,f as t,a,w as l,o,v as n,y as s,F as i,J as c,z as r,R as u,a9 as d,u as v,A as p,H as m,aa as h,G as f,ac as g,ad as _,j as x,a0 as b,I as w,a1 as y,V as j,B as k,n as C}from"./@vue-CfxotJ-S.js";import{c as z,e as M,m as A,t as I,_ as V,b as S,u as T,g as E,f as R}from"./mermaid-render-f9KGMq_P.js";import{u as U,a as P}from"./vue-router-DKqWD4MR.js";import{c as H,_ as B}from"./ChatInput.vue_vue_type_style_index_0_lang-B1k4vI4G.js";import{_ as O}from"./avatar.vue_vue_type_script_setup_true_lang-IaazOHzd.js";import{u as q}from"./app-_ksMLlTy.js";import{p as N,q as $,r as D,T as W,b as L,s as F,t as K,u as J,O as G,A as X,v as Y,w as Z,n as Q,D as ee,x as te,e as ae,P as le,l as oe,y as ne,E as se,G as ie,m as ce,J as re,c as ue,j as de,K as ve}from"./tdesign-vue-next-BiEwLJDx.js";import{V as pe,W as me,X as he,Y as fe,Z as ge,$ as _e,a0 as xe,a1 as be,a2 as we,a3 as ye,_ as je,a4 as ke,a5 as Ce,a6 as ze,a7 as Me,a8 as Ae,E as Ie,n as Ve}from"./tdesign-icons-vue-next-Bre5yOVt.js";import{v as Se}from"./uuid-_R2nDvl_.js";import{u as Te,a as Ee}from"./main-apEI6pT3.js";import{g as Re,r as Ue,s as Pe,c as He,a as Be,b as Oe}from"./fetch-SJxNIU2V.js";import{U as qe,A as Ne,_ as $e,a as De}from"./ToolBar.vue_vue_type_style_index_0_lang-Cn5BAuq2.js";import{d as We}from"./vuedraggable-DAEPkKhD.js";import{g as Le}from"./lyihub-zLFv36Ly.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./mermaid-CFwXVJJh.js";import"./@mermaid-js-C9iCgeAb.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./lodash-es-RhymR7yg.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./ts-dedent-CttZBlkd.js";import"./d3-transition-0ltv4da8.js";import"./d3-timer-keMr1twq.js";import"./d3-dispatch-Chq_f_hl.js";import"./d3-interpolate-Ct9kki6l.js";import"./d3-color-D5ULnJIe.js";import"./d3-selection-Oxnq6l6A.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-Dz8HuW59.js";import"./dompurify-DRcrZKbd.js";import"./stylis-Cl7w7uv3.js";import"./dagre-d3-es-D8JeTxsO.js";import"./@braintree-BB7t-Iuh.js";import"./khroma-C2oHPU0S.js";import"./dayjs-Cbdj87rt.js";import"./d3-scale-CdkN4P7M.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-BhN1wQGI.js";import"./d3-format-C0lSXcPg.js";import"./d3-time-format-DB2uBv1t.js";import"./d3-time-B1kAM736.js";import"./d3-axis-pCwzqJ1S.js";import"./d3-shape-C6CU9yox.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-Bkc4UHOn.js";import"./cytoscape-BsbaL92W.js";import"./cytoscape-cose-bilkent-CcQu5e-H.js";import"./cose-base-kQthUiMK.js";import"./layout-base-DqRk0Tgc.js";import"./d3-sankey-B6tQBass.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./@iconify-BUO7KvjM.js";import"./marked-CrLTNeyQ.js";import"./cytoscape-fcose-B58q80h4.js";import"./pinia-gf2247cH.js";import"./pinia-plugin-persistedstate-CxGPmdL5.js";import"./destr-WfmzGWA8.js";import"./deep-pick-omit-DP_A4OSP.js";import"./lodash-VDnThKtA.js";import"./@vueuse-B4dz7nOv.js";import"./vue-i18n-BLIfPQxk.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./mammoth-Cw8VHd7C.js";import"./xlsx-DB6BMndo.js";import"./pdfjs-dist-8WFUNQXM.js";import"./@dicebear-JcnEMRoc.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./vue-BIpqWpgL.js";import"./eventsource-parser-D0ssca5s.js";import"./markdown-ppShADW8.js";import"./markdown-it-link-attributes-DRKqjf49.js";import"./markdown-it-C8SkdHr7.js";import"./mdurl-CDXpswLz.js";import"./uc.micro-CLkLCS2f.js";import"./entities-D7HTx9ov.js";import"./linkify-it-LcVOBuC5.js";import"./punycode.js-Bmr3cAX8.js";import"./@traptitech-xv_Vpjqh.js";import"./katex-Vs6-m9jZ.js";import"./markdown-it-highlightjs-IY8LrfKU.js";import"./highlight.js-BgdnSEsd.js";import"./@wdns-C8Xpkjrj.js";import"./ua-parser-js--QiuJfYt.js";const Fe={key:0,class:"flex flex-col items-center justify-center mb-[var(--td-comp-margin-xxl)] gap-3"},Ke={class:"text-lg font-bold"},Je={class:"overflow-y-auto overflow-x-hidden max-h-60 custom-scrollbar"},Ge={class:"flex"},Xe={class:"flex flex-row justify-between gap-3 w-full"},Ye=V(e({__name:"ConversationDrawer",setup(e){const x=z(),b=t({get:()=>x.showEditorDrawer,set(e){x.showEditorDrawer=e}}),w=()=>{x.showEditorDrawer=!1},y=H(),j=a(null),k=U(),C=()=>{const e=x.find(k.query.id);V.value=e.models.reduce(((e,t)=>(e[t.modelId]=t.showing,e)),{}),j.value={id:e.id,name:e.name,content:e.content,avatar:e.avatar,models:e.models.map((e=>e.modelId)),agentId:e.agentId,saveToAgent:!1,maxContextSize:e.maxContextSize,aspectRatio:e.aspectRatio}},V=a({});l((()=>{var e;return null==(e=j.value)?void 0:e.models}),(e=>{const t=Object.keys(V.value);t.forEach((t=>{e.includes(t)||delete V.value[t]})),e.forEach((e=>{t.includes(e)||(V.value[e]=!1)}))}));const S=t((()=>{if(!j.value)return!1;return Object.values(V.value).filter((e=>e)).length>=q}));l((()=>x.showEditorDrawer),(e=>{e&&C()})),M();const T=t((()=>A.availableModels.value.map((e=>({value:e.id,label:A.getModelItemTitle(e),...e}))))),E=Te(),R=t((()=>{let e=E.find(j.value.agentId);return e=e||E.defaultAgent,e})),P=e=>{j.value.avatar=e},B=()=>{const e=x.find(j.value.id);e.name=j.value.name,e.content=j.value.content,e.avatar=j.value.avatar,e.agentId=j.value.agentId,e.maxContextSize=j.value.maxContextSize,e.aspectRatio=j.value.aspectRatio;const t=[];e.models.forEach((e=>{j.value.models.includes(e.modelId)&&(e.showing=V.value[e.modelId],t.push(e))})),j.value.models.forEach((a=>{e.models.some((e=>e.modelId===a))||t.push({modelId:a,chats:[],startContext:0,apiAgentId:"",apiConversationId:"",apiNote:"",showing:V.value[a],status:{responseWating:!1,chating:!1,stop:!1}})})),e.models=t,j.value.saveToAgent&&(R.value.content=j.value.content),C(),ae.success(I("pages.conversation.save_conversation_success"))},le=a(!1),oe=a(""),ne=()=>{if(""===oe.value.trim())return void ae.warning(I("pages.conversation.enter_agent_name"));const e=Se();E.add({id:e,name:oe.value,status:!0,content:j.value.content,avatar:j.value.avatar,onboarding:"",isDefault:!1});const t=x.find(j.value.id);j.value.agentId=e,t.agentId=e,le.value=!1,ae.success(I("pages.conversation.create_agent_success"))},se=()=>{j.value.content=R.value.content},ie=()=>{j.value.saveToAgent=!j.value.saveToAgent};return o((()=>{x.showEditorDrawer=!1})),(e,t)=>{const a=D,l=$,o=L,x=W,k=F,C=K,z=G,M=J,E=Z,U=Y,H=X,q=Q,ae=N,ce=ee,re=te;return s(),n(i,null,[j.value?(s(),c(ce,{key:0,visible:b.value,"onUpdate:visible":t[7]||(t[7]=e=>b.value=e),size:"408px",footer:!1,header:v(I)("pages.conversation.current_conversation"),"close-btn":!0,class:"",onCloseBtnClick:w},{default:d((()=>[u(ae,{ref:"form",data:j.value,"label-width":100,"label-align":"top"},{default:d((()=>[v(y)?r("",!0):(s(),n("div",Fe,[u(O,{ref:"avatarRef",url:j.value.avatar,onUpdate:P},null,8,["url"]),p("h1",Ke,m(v(I)("pages.conversation.agent"))+": "+m(R.value.name),1)])),u(l,{label:v(I)("pages.conversation.conversation_name"),name:"name"},{default:d((()=>[u(a,{modelValue:j.value.name,"onUpdate:modelValue":t[0]||(t[0]=e=>j.value.name=e)},null,8,["modelValue"])])),_:1},8,["label"]),u(l,{label:v(I)("pages.conversation.conversation_description"),name:"content",class:"relative"},{default:d((()=>[u(x,{content:v(I)("pages.conversation.rollback_from_agent")},{default:d((()=>[u(o,{shape:"circle",variant:"text",class:"absolute z-50 right-0 top-[-32px]",onClick:se},{default:d((()=>[u(v(pe),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(k,{modelValue:j.value.content,"onUpdate:modelValue":t[1]||(t[1]=e=>j.value.content=e),autosize:{minRows:2,maxRows:5},name:"content"},null,8,["modelValue"])])),_:1},8,["label"]),u(l,{label:v(I)("pages.conversation.context_rounds"),name:"maxContextSize"},{default:d((()=>[u(C,{modelValue:j.value.maxContextSize,"onUpdate:modelValue":t[2]||(t[2]=e=>j.value.maxContextSize=e),inputNumberProps:"",showStep:"",min:0,max:30},null,8,["modelValue"])])),_:1},8,["label"]),u(l,{label:"图片宽高比",name:"aspectRatio"},{default:d((()=>[u(M,{modelValue:j.value.aspectRatio,"onUpdate:modelValue":t[3]||(t[3]=e=>j.value.aspectRatio=e)},{default:d((()=>[u(z,{value:"IMAGE_ASPECT_RATIO_SQUARE",label:"方形 (1:1)"}),u(z,{value:"IMAGE_ASPECT_RATIO_PORTRAIT",label:"竖屏 (9:16)"}),u(z,{value:"IMAGE_ASPECT_RATIO_LANDSCAPE",label:"横屏 (16:9)"}),u(z,{value:"IMAGE_ASPECT_RATIO_PORTRAIT_THREE_FOUR",label:"竖屏 (3:4)"}),u(z,{value:"IMAGE_ASPECT_RATIO_LANDSCAPE_FOUR_THREE",label:"横屏 (4:3)"})])),_:1},8,["modelValue"])])),_:1}),u(l,{label:v(I)("pages.conversation.model"),name:"models"},{default:d((()=>[u(M,{modelValue:j.value.models,"onUpdate:modelValue":t[5]||(t[5]=e=>j.value.models=e),multiple:"",filterable:!v(y)},{valueDisplay:d((({value:e,onClose:a})=>[p("div",Je,[(s(!0),n(i,null,h(e,((e,l)=>(s(),c(U,{key:l,closable:!0,"on-close":({e:e})=>{e.stopPropagation(),a(l)}},{default:d((()=>[u(E,{disabled:S.value&&!V.value[e.value],onClick:t[4]||(t[4]=_((()=>{}),["stop"])),class:"mr-1",size:"small",modelValue:V.value[e.value],"onUpdate:modelValue":t=>V.value[e.value]=t},null,8,["disabled","modelValue","onUpdate:modelValue"]),f(" "+m(e.label),1)])),_:2},1032,["on-close"])))),128))])])),default:d((()=>[(s(!0),n(i,null,h(T.value,(e=>(s(),c(z,{key:e.value,value:e.value,label:e.label},{default:d((()=>[p("div",Ge,[u(H,{size:"20px",class:"mr-1"},{icon:d((()=>[(s(),c(g(v(A).icons[e.type])))])),_:2},1024),f(" "+m(e.label),1)])])),_:2},1032,["value","label"])))),128))])),_:1},8,["modelValue","filterable"])])),_:1},8,["label"]),u(l,null,{default:d((()=>[p("div",Xe,[R.value.isDefault?r("",!0):(s(),c(q,{key:0,onChange:ie},{default:d((()=>[f(m(v(I)("pages.conversation.save_to_agent")),1)])),_:1})),u(o,{theme:"primary",type:"submit",onClick:B,class:"flex-1"},{default:d((()=>[f(m(v(I)("pages.conversation.save_conversation")),1)])),_:1})])])),_:1}),u(l,null,{default:d((()=>[u(o,{theme:"primary",type:"submit",onClick:t[6]||(t[6]=e=>le.value=!0),class:"w-full"},{default:d((()=>[f(m(v(I)("pages.conversation.save_as_new_agent")),1)])),_:1})])),_:1})])),_:1},8,["data"])])),_:1},8,["visible","header"])):r("",!0),u(re,{visible:le.value,"onUpdate:visible":t[9]||(t[9]=e=>le.value=e),header:v(I)("pages.conversation.create_new_agent"),"on-confirm":ne},{default:d((()=>[u(ae,{ref:"form","label-width":100},{default:d((()=>[u(l,{label:v(I)("pages.conversation.agent_name"),name:"name"},{default:d((()=>[u(a,{modelValue:oe.value,"onUpdate:modelValue":t[8]||(t[8]=e=>oe.value=e)},null,8,["modelValue"])])),_:1},8,["label"])])),_:1},512)])),_:1},8,["visible","header"])],64)}}}),[["__scopeId","data-v-9dfbddf7"]]),Ze={class:"h-full flex flex-col chat-model-container relative"},Qe={class:"cursor-pointer handle p-2 bg-color-container rounded-t-lg shadow-2xl chat-model-header z-20"},et={class:"flex flex-wrap justify-between w-full overflow-x-hidden"},tt={class:"flex gap-1"},at={class:"max-w-[120px]"},lt={class:"model-info flex flex-col gap-2"},ot={class:"max-h-44 overflow-auto no-scrollbar"},nt={class:"flex gap-1 flex-wrap"},st={key:0,class:"flex w-full justify-end items-start flex-row-reverse gap-2 chat-item"},it=["data-index"],ct={class:"flex justify-between overflow-hidden h-[24px]"},rt={class:"flex chat-item-tools gap-2"},ut={class:"user-chat-content p-2 rounded-lg"},dt={class:"w-[24px] h-[24px]"},vt={key:1,class:"flex w-full flex-col gap-2 chat-item"},pt={class:"flex justify-start align-middle items-center gap-2 h-[24px]"},mt={class:"flex flex-row justify-between gap-5"},ht={class:"flex flex-col w-full"},ft=["data-index"],gt={key:0,class:"loader"},_t={key:2,class:"flex gap-5 overflow-x-auto scrollbar p-1"},xt=["onClick"],bt={class:"flex flex-row w-full"},wt={class:"w-12 h-2"},yt=["src"],jt={class:"w-44"},kt={class:"w-full text-ellipsis overflow-hidden text-nowrap"},Ct={class:"text-ellipsis overflow-hidden whitespace-nowrap"},zt={class:"max-h-10 overflow-hidden mt-2"},Mt={class:"h-[24px] mt-1 chat-item-tools"},At={class:"flex justify-end gap-2"},It={key:3,class:"flex justify-center w-full"},Vt={class:"fixed-scroll-buttons"},St=e({__name:"ChatColumn",props:{chatModel:{type:Object},conversation:{type:Object},fullScreenModelId:{type:String,default:""},isSingleModel:{type:Boolean,default:!1}},emits:["stop-chat","extend-model-visible","re-chat","change-size","api-setting-visible","fav-note-visible","clear-chat-context","clear-chat-history","update-scroll-flag"],setup(e,{emit:l}){const j=H(),k=S();U();const C=e,z=a(null);Ee(),M();const V=t((()=>C.chatModel.chat.chats));const T=l,E=e=>{T("re-chat",e.model.id)},R=a(-1),P=e=>{R.value=e},B=e=>{V.value[R.value].content.text=e,R.value=-1},O=()=>{R.value=-1},q=t((()=>A.getModelItemTitle(C.chatModel.model))),N=e=>{navigator.clipboard.writeText(e.content.text),ae.success(I("pages.note.noteCopySuccess"))},D=t((()=>{let e="",t="";if(C.chatModel.model.apiBase.startsWith("http"))e=C.chatModel.model.apiBase,t=C.chatModel.model.apiKey;else{let l=Re(C.chatModel.model.apiBase||A.dict[C.chatModel.model.type].apiBase,"openai"==C.chatModel.model.type);l=l.replace("/app/","/api/"),l.includes("?")?l+="&":l+="?",l+=`model=${C.chatModel.model.id}`,l+="&",l+=`conversation=${C.conversation.id}`;const o=l.indexOf("?");e=l.substring(0,o)+"/v1/chat/completions",t="oa_"+(a=l.substring(o+1),btoa(a).split("").map((e=>{const t=e.charCodeAt(0);return String.fromCharCode(t+1)})).join(""))}var a;return{apiBase:e,apiKey:t}})),F=t((()=>C.chatModel.model.apiBase.startsWith("http")?"ApiBase":"LocalApi")),J=t((()=>C.chatModel.model.apiBase.startsWith("http")?"ApiKey":"LocalKey")),G=a(!1),Z=a("");x((()=>{if(!V.value||0===V.value.length)return;const e=V.value[V.value.length-1];"assistant"===e.role&&(Z.value=e.content.text)}));const Q=()=>{G.value=!1};async function ee(){await window.ipcRenderer.invoke("refresh-vercel-view")?ae.success("Refresh succeed"):ae.error("Refresh failed")}async function te(){await window.ipcRenderer.invoke("refresh-coze-com-view")?ae.success("Refresh succeed"):ae.error("Refresh failed")}async function ce(){await window.ipcRenderer.invoke("refresh-coze-cn-view")?ae.success("Refresh succeed"):ae.error("Refresh failed")}async function re(){const e=A.dict["chatgpt.com"],t=await window.ipcRenderer.invoke("login-get-token",{url:e.tokenUrl,userAgent:"",script:"",show:!1,autoClose:!0});e.playground.apiKey=t.token,ae.success("Refresh succeed")}async function ue(){const e=A.dict.magai,t=await window.ipcRenderer.invoke("login-get-token",{url:e.tokenUrl,userAgent:"",script:"",show:!1,autoClose:!0});e.playground.apiKey=t.token,ae.success("Refresh succeed")}const de=a(!1),ve=a(!1),pe=a(!1),Ae=a(!1),Ie=()=>{if(!z.value)return;const e=z.value.querySelector(".chat-container-content"),t=e.scrollTop,a=e.scrollHeight,l=e.clientHeight;de.value=t>200,ve.value=a-t-l>200,pe.value=de.value||ve.value},Ve=()=>{const e=z.value.querySelector(".chat-container-content"),t=e.getAttribute("data-chat-id");t&&T("update-scroll-flag",t,!1),e.scrollTo({top:0,behavior:"smooth"}),setTimeout((()=>{e.scrollTo({top:0,behavior:"instant"})}),500)},Se=()=>{const e=z.value.querySelector(".chat-container-content"),t=e.getAttribute("data-chat-id");t&&T("update-scroll-flag",t,!0),e.scrollTo({top:e.scrollHeight,behavior:"smooth"}),setTimeout((()=>{e.scrollTo({top:e.scrollHeight,behavior:"instant"})}),500)},Te=e=>{Ae.value=e};return o((()=>{z.value.querySelector(".chat-container-content").addEventListener("scroll",Ie)})),(t,a)=>{const l=X,o=K,x=$,C=L,M=oe,S=le,U=W,H=Y,ae=se,Ie=ie,Ee=ne;return s(),n("div",Ze,[p("div",Qe,[p("div",et,[p("div",tt,[u(l,{size:"20px"},{icon:d((()=>[(s(),c(g(v(A).icons[e.chatModel.model.type])))])),_:1}),p("div",at,[u(S,{placement:"bottom","cancel-btn":null,"confirm-btn":null},{content:d((()=>[p("div",lt,[a[21]||(a[21]=p("p",null,"Model Info",-1)),p("p",null,[p("span",null,m(t.$t("pages.setting.model.model_name")),1),f(m(e.chatModel.model.name),1)]),p("p",null,[p("span",null,m(t.$t("pages.setting.model.model_interface")),1),f(m(e.chatModel.model.type),1)]),p("p",null,[p("span",null,m(t.$t("pages.setting.model.model_address")),1),f(m(e.chatModel.model.apiBase),1)]),u(x,{label:v(I)("pages.conversation.temperature"),name:"temperature",labelAlign:"left",labelWidth:"64px"},{default:d((()=>[u(o,{modelValue:e.chatModel.model.temperature,"onUpdate:modelValue":a[0]||(a[0]=t=>e.chatModel.model.temperature=t),inputNumberProps:"",showStep:"",min:0,max:1,step:.1},null,8,["modelValue"])])),_:1},8,["label"]),u(x,{label:v(I)("pages.conversation.maxTokens"),name:"maxTokens",labelAlign:"left",labelWidth:"64px"},{default:d((()=>[u(o,{modelValue:e.chatModel.model.maxTokens,"onUpdate:modelValue":a[1]||(a[1]=t=>e.chatModel.model.maxTokens=t),inputNumberProps:"",showStep:"",min:1024,max:61440,step:1024},null,8,["modelValue"])])),_:1},8,["label"]),u(x,{label:v(I)("pages.conversation.topP"),name:"topP",labelAlign:"left",labelWidth:"64px"},{default:d((()=>[u(o,{modelValue:e.chatModel.model.topP,"onUpdate:modelValue":a[2]||(a[2]=t=>e.chatModel.model.topP=t),inputNumberProps:"",showStep:"",min:0,max:1,step:.1},null,8,["modelValue"])])),_:1},8,["label"]),p("p",null,[p("span",null,m(F.value),1),f(m(D.value.apiBase),1)]),p("p",ot,[p("span",null,m(J.value),1),f(m(D.value.apiKey),1)]),p("p",null,[a[15]||(a[15]=p("span",null,"Model ",-1)),f(m(e.chatModel.model.apiModel),1)]),"vercel"===e.chatModel.model.type?(s(),c(C,{key:0,theme:"primary",onClick:ee},{default:d((()=>a[16]||(a[16]=[f("refresh vercel.ai ")]))),_:1})):r("",!0),"coze.com"===e.chatModel.model.type?(s(),c(C,{key:1,theme:"primary",onClick:te},{default:d((()=>a[17]||(a[17]=[f("refresh coze.com ")]))),_:1})):r("",!0),"coze.cn"===e.chatModel.model.type?(s(),c(C,{key:2,theme:"primary",onClick:ce},{default:d((()=>a[18]||(a[18]=[f("refresh coze.cn ")]))),_:1})):r("",!0),"chatgpt.com"===e.chatModel.model.type?(s(),c(C,{key:3,theme:"primary",onClick:re},{default:d((()=>a[19]||(a[19]=[f("refresh chatgpt.com ")]))),_:1})):r("",!0),"magai"===e.chatModel.model.type?(s(),c(C,{key:4,theme:"primary",onClick:ue},{default:d((()=>a[20]||(a[20]=[f("refresh magai.co ")]))),_:1})):r("",!0)])])),default:d((()=>[u(M,{theme:"primary",title:q.value,class:"block w-full whitespace-nowrap text-ellipsis overflow-hidden"},{default:d((()=>[f(m(q.value),1)])),_:1},8,["title"])])),_:1})])]),p("div",nt,[u(U,{content:v(I)("pages.conversation.maximize_minimize")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a[3]||(a[3]=_((t=>{return a=e.chatModel,void T("change-size",a.model.id);var a}),["stop"]))},{default:d((()=>[e.chatModel.chat.modelId==e.fullScreenModelId?(s(),c(v(me),{key:0,slot:"icon"})):(s(),c(v(he),{key:1,slot:"icon"}))])),_:1})])),_:1},8,["content"]),u(U,{content:v(I)("pages.conversation.stop_answering")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a[4]||(a[4]=_((t=>{return a=e.chatModel,void T("stop-chat",a.model.id);var a}),["stop"]))},{default:d((()=>[u(v(fe),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(U,{content:v(I)("pages.conversation.regenerate_last_conversation")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a[5]||(a[5]=_((t=>E(e.chatModel)),["stop"]))},{default:d((()=>[u(v(ge),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(S,{theme:"danger",content:v(I)("pages.conversation.confirm_delete_chat_history"),placement:"top",onConfirm:a[6]||(a[6]=t=>{return a=e.chatModel,void T("clear-chat-history",a.model.id);var a})},{default:d((()=>[u(U,{content:v(I)("pages.conversation.delete_chat_history")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline"},{default:d((()=>[u(v(_e),{slot:"icon"})])),_:1})])),_:1},8,["content"])])),_:1},8,["content"]),u(S,{theme:"warning",content:v(I)("pages.conversation.confirm_clear_context"),placement:"top",onConfirm:a[7]||(a[7]=t=>{return a=e.chatModel,void T("clear-chat-context",a.model.id);var a})},{default:d((()=>[u(U,{content:v(I)("pages.conversation.clear_context")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline"},{default:d((()=>[u(v(xe),{slot:"icon"})])),_:1})])),_:1},8,["content"])])),_:1},8,["content"]),u(U,{content:v(I)("pages.conversation.inherit_other_model_conversation")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a[8]||(a[8]=_((t=>{return a=e.chatModel,void T("extend-model-visible",a.model.id);var a}),["stop"]))},{default:d((()=>[u(v(be),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(U,{content:v(I)("pages.conversation.api_conversation_settings")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a[9]||(a[9]=_((t=>{return a=e.chatModel,void T("api-setting-visible",a.model.id);var a}),["stop"]))},{default:d((()=>[u(v(we),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(U,{content:v(I)("pages.conversation.toggle_artifacts")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a[10]||(a[10]=_((e=>{G.value=!G.value}),["stop"]))},{default:d((()=>[u(v(ye),{slot:"icon"})])),_:1})])),_:1},8,["content"])])])]),p("div",{class:"flex flex-1 overflow-hidden bg-color-container rounded-b-lg shadow-md w-full",onMouseenter:a[13]||(a[13]=e=>Te(!0)),onMouseleave:a[14]||(a[14]=e=>Te(!1))},[p("div",{class:"flex-1 relative h-full overflow-hidden",ref_key:"scrollable_chat",ref:z},[u(Ee,{"data-chat-id":e.chatModel.model.id,class:w(["flex flex-col h-full overflow-y-auto chat-container-content scrollable-chat relative",{chating:e.chatModel.chat.status.chating}]),scroll:{type:"virtual",bufferSize:20}},{default:d((()=>[(s(!0),n(i,null,h(V.value,((t,o)=>(s(),c(Ie,{key:`${e.chatModel.model.id}-${o}`,class:"w-full"},{default:d((()=>["user"===t.role?(s(),n("div",st,[p("div",{class:"flex flex-col gap-2 w-[calc(100%-24px-1rem)]","data-index":`${o}`},[p("div",ct,[f(m(v(k).name)+" ",1),p("div",rt,[u(S,{theme:"danger",content:v(I)("pages.conversation.dialog_confirm_delete_record"),placement:"bottom",onConfirm:e=>(e=>{const t=V.value.findIndex((t=>t===e));-1!==t&&(V.value.splice(t,1),t<V.value.length&&"assistant"===V.value[t].role&&V.value.splice(t,1))})(t)},{default:d((()=>[u(U,{content:v(I)("pages.conversation.button_tooltip_delete"),placement:"bottom"},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline"},{default:d((()=>[u(v(je),{slot:"icon"})])),_:1})])),_:1},8,["content"])])),_:2},1032,["content","onConfirm"]),u(U,{content:v(I)("pages.conversation.button_tooltip_editor"),placement:"bottom"},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:e=>P(o)},{default:d((()=>[u(v(ke),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"]),u(U,{content:v(I)("pages.conversation.button_tooltip_copy")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:e=>N(t)},{default:d((()=>[u(v(Ce),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"]),u(U,{content:v(I)("pages.conversation.button_tooltip_favourite"),placement:"bottom"},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a=>{return l=e.chatModel,void T("fav-note-visible",l,t);var l}},{default:d((()=>[u(v(ze),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"]),o===e.chatModel.chat.chats.length-2?(s(),c(U,{key:0,content:v(I)("pages.conversation.button_tooltip_refresh")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a[11]||(a[11]=t=>E(e.chatModel))},{default:d((()=>[u(v(ge),{slot:"icon"})])),_:1})])),_:1},8,["content"])):r("",!0)])]),p("div",ut,[u(qe,{content:t.content,isEditing:R.value===o,onSave:B,onCancel:O},null,8,["content","isEditing"])])],8,it),p("div",dt,[u(l,{size:"24px",image:v(k).avatar},null,8,["image"])])])):"assistant"===t.role?(s(),n("div",vt,[p("div",pt,[u(l,{size:"24px",image:e.conversation.avatar},null,8,["image"]),p("div",mt,m(e.conversation.name),1)]),p("div",ht,[p("div",{"data-index":`${o}`},[e.chatModel.chat.status.responseWating&&o===e.chatModel.chat.chats.length-1?(s(),n("span",gt)):(s(),c(Ne,{key:1,content:t.content,isEditing:R.value===o,onSave:B,onCancel:O},null,8,["content","isEditing"])),t.content.webs&&t.content.webs.length>0?(s(),n("div",_t,[(s(!0),n(i,null,h(t.content.webs,(e=>(s(),n("div",{class:"bg-color-page p-2 w-60 cursor-pointer",onClick:t=>{return a=e.url,void(window.ipcRenderer?window.ipcRenderer.send("open-url",a):window.open(a));var a}},[p("div",bt,[p("div",wt,[p("img",{src:e.icon,alt:""},null,8,yt)]),p("div",jt,[p("div",kt,m(e.title),1),p("div",Ct,m(e.url),1)])]),p("div",zt,m(e.excerpt),1)],8,xt)))),256))])):r("",!0)],8,ft),p("div",Mt,[p("div",At,[t.model?(s(),c(H,{key:0,class:"max-w-60 model-tag"},{default:d((()=>[f(m(t.model),1)])),_:2},1024)):r("",!0),u(U,{content:v(I)("pages.conversation.button_tooltip_editor"),placement:"bottom"},{default:d((()=>[u(C,{size:"small",variant:"outline",onClick:e=>P(o)},{default:d((()=>[u(v(ke),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"]),u(U,{content:v(I)("pages.conversation.button_tooltip_copy")},{default:d((()=>[u(C,{size:"small",variant:"outline",onClick:e=>N(t)},{default:d((()=>[u(v(Ce),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"]),u(U,{content:v(I)("pages.conversation.toggle_artifacts")},{default:d((()=>[u(C,{size:"small",variant:"outline",onClick:e=>{var a;"assistant"===(a=t).role&&(Z.value=a.content.text,G.value=!0)}},{default:d((()=>[u(v(ye),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"]),o===e.chatModel.chat.chats.length-1?(s(),c(U,{key:1,content:v(I)("pages.conversation.button_tooltip_refresh")},{default:d((()=>[u(C,{size:"small",variant:"outline",onClick:a[12]||(a[12]=t=>E(e.chatModel))},{default:d((()=>[u(v(ge),{slot:"icon"})])),_:1})])),_:1},8,["content"])):r("",!0)])])])])):"verbose"===t.role?(s(),c(ae,{key:2},{default:d((()=>[f(m(t.content.text),1)])),_:2},1024)):(s(),n("div",It,m(t.role)+" - "+m(t.content.text),1))])),_:2},1024)))),128))])),_:1},8,["data-chat-id","class"]),a[22]||(a[22]=p("div",{class:"absolute z-50 bottom-0 w-full h-20 rounded-b-lg chat-model-footer pointer-events-none"},null,-1))],512),G.value?(s(),n("div",{key:0,class:w([e.chatModel.chat.modelId!==e.fullScreenModelId&&!e.isSingleModel||v(j)?"w-full":"w-1/2","pr-4"])},[u($e,{content:Z.value,closeBtn:Q},null,8,["content"])],2)):r("",!0),b(p("div",Vt,[b(u(C,{class:"scroll-top-btn",shape:"circle",onClick:Ve},{icon:d((()=>[u(v(Me))])),_:1},512),[[y,de.value]]),b(u(C,{class:"scroll-bottom-btn",shape:"circle",onClick:Se},{icon:d((()=>[u(v(Me),{style:{transform:"rotateX(180deg)"}})])),_:1},512),[[y,ve.value]])],512),[[y,pe.value&&Ae.value]])],32)])}}}),Tt={class:"w-full flex gap-2 absolute bottom-0 z-50"},Et={class:"rounded-lg px-1 bg-color-container bordered flex items-center align-middle"},Rt={class:"flex flex-col justify-center items-center w-full"},Ut={class:"flex flex-col gap-5 w-full overflow-hidden"},Pt={class:"max-h-96 scrollbar overflow-y-auto overflow-x-hidden bordered p-2 shadow-sm"},Ht=e({name:"ListConversation",setup(e){const o=S(),r=T(),V=Ee(),O=z(),q=U();P();const F=a(null),K=a(null);let J=!1;const G=a([]),Y=M(),Z=H(),Q=a(!1),ee=async e=>{if(e.content)if(J)ae.warning("等待上个问题回答完成");else try{G.value.forEach((t=>{if(""!==Xe.value&&Xe.value!==t.model.id)return;const a=Be(e.content);e.files.forEach((e=>{e.type.startsWith("image")?a.images.push({...e,model:""}):a.files.push(e)})),t.chat.chats.push({role:"user",content:a,id:"",liked:!1,model:""}),t.chat.chats.push({role:"assistant",content:Be(""),id:"",liked:!1,model:""})})),E.setPause(!0);const t=G.value.map(((e,t)=>{if((""===Xe.value||Xe.value===e.model.id)&&!0!==e.chat.status.chating)return e.chat.status.chating=!0,e.chat.status.stop=!1,e.chat.status.responseWating=!0,e})).filter((e=>e));if(0===t.length)return;await mt(0),pt();let a="";if(K.value.internet){const l=await Pe(e.content);t.map((e=>{e.chat.chats[e.chat.chats.length-1].content.webs=l.map((e=>({title:e.title,icon:e.icon,excerpt:e.excerpt,url:e.url})))})),l.length>0&&(a=JSON.stringify(l.map((e=>({content:e.content,url:e.url})))))}const l=t.map(((e,t)=>new Promise(((l,o)=>{setTimeout((()=>{const t=He(K.value,e,a);l(t)}),100*t)}))));await Promise.all(l)}finally{J=!1,E.setPause(!1),O.$persist()}else ae.error(I("pages.conversation.question_cannot_be_empty"))},oe=async()=>{try{if(""!==Xe.value)return void ne(Xe.value);if(J)return void ae.warning("等待上个问题回答完成");E.setPause(!0);const e=G.value.map(((e,t)=>{if(0===e.chat.chats.length)return;if(!0===e.chat.status.chating)return;const a=e.chat.chats[e.chat.chats.length-1];if("assistant"==a.role)return Ue(a.content),a.model="",e.chat.status.chating=!0,e.chat.status.stop=!1,e.chat.status.responseWating=!0,e;ae.error(I("pages.conversation.please_start_question_again"))})).filter((e=>e));if(0===e.length)return;await mt(0),pt();let t="";if(K.value.internet){const a=e.find((e=>e.chat.chats.length>0));if(a){const l=a.chat.chats,o=l[l.length-2];if(o){const a=await Pe(o.content.text);e.map((e=>{e.chat.chats[e.chat.chats.length-1].content.webs=a.map((e=>({title:e.title,icon:e.icon,excerpt:e.excerpt,url:e.url})))})),a.length>0&&(t=JSON.stringify(a.map((e=>({content:e.content,url:e.url})))))}}}const a=e.map(((e,a)=>new Promise(((l,o)=>{setTimeout((()=>{const a=He(K.value,e,t);l(a)}),100*a)}))));await Promise.all(a)}finally{J=!1,E.setPause(!1),O.$persist()}},ne=async e=>{try{const t=G.value.find((t=>t.model.id===e));if(0===t.chat.chats.length)return;E.setPause(!0);const a=t.chat.chats[t.chat.chats.length-1];if("assistant"!=a.role)return void ae.error(I("pages.conversation.please_start_question_again"));if(!0===t.chat.status.chating)return;Ue(a.content),a.model="",t.chat.status.chating=!0,t.chat.status.stop=!1,t.chat.status.responseWating=!0;let l="";if(pt(),K.value.internet){const e=await Pe(t.chat.chats[t.chat.chats.length-2].content.text);a.content.webs=e.map((e=>({title:e.title,icon:e.icon,excerpt:e.excerpt,url:e.url}))),e.length>0&&(l=JSON.stringify(e.map((e=>({content:e.content,url:e.url})))))}await He(K.value,t,l)}finally{J=!1,E.setPause(!1),O.$persist()}},se=async()=>{""===Xe.value?(G.value.forEach((e=>{e.chat.chats.push({role:"verbose",content:Be(I("pages.conversation.context_cleared")),id:"",liked:!1,model:""}),e.chat.startContext=e.chat.chats.length})),ae.success(I("pages.conversation.context_cleared_success")),await mt(0)):ye(Xe.value)},ie=()=>{O.showEditorDrawer=!0},pe=e=>{const t=G.value.find((t=>t.chat.modelId===e));t.chat.status.stop=!0,t.chat.status.responseWating=!1,t.chat.status.chating=!1},me=()=>{""===Xe.value?G.value.forEach((e=>{e.chat.status.stop=!0,e.chat.status.responseWating=!1,e.chat.status.chating=!1})):pe(Xe.value)},he=()=>{K.value.internet=!K.value.internet},we=()=>{""===Xe.value?G.value.forEach((e=>{e.chat.chats=[],e.chat.startContext=0})):je(Xe.value)},ye=e=>{const t=G.value.find((t=>t.chat.modelId===e)).chat;t.chats.push({role:"verbose",content:Be(I("pages.conversation.context_cleared")),id:"",liked:!1,model:""}),t.startContext=t.chats.length,ae.success(I("pages.conversation.context_cleared_success")),C((()=>{const t=document.querySelector(`[data-chat-id="${e}"]`);t&&t.scrollTo({top:t.scrollHeight,behavior:"smooth"})}))},je=e=>{const t=G.value.find((t=>t.chat.modelId===e)).chat;t.chats=[],t.startContext=0},ke=a(!1),Ce=a(""),ze=a(""),Me=e=>{ke.value=!0,ze.value="",Ce.value=e},Te=async()=>{if(!ze.value)return void(ke.value=!1);const e=K.value.models.find((e=>e.modelId===ze.value));if(Ce.value){const t=K.value.models.find((e=>e.modelId===Ce.value));t.chats=JSON.parse(JSON.stringify(e.chats)),t.startContext=0}else K.value.models.forEach((t=>{t.modelId!=ze.value&&(t.chats=JSON.parse(JSON.stringify(e.chats)),t.startContext=0)}));ke.value=!1,await mt(0)},Re=a(!1),qe=a(""),Ne=a(""),$e=a("");let Fe="";const Ke=e=>{Re.value=!0,Fe=e;const t=K.value.models.find((e=>e.modelId===Fe));Ne.value=t.apiConversationId,qe.value=t.apiAgentId,$e.value=t.apiNote},Je=()=>{var e,t,a;const l=K.value.models.find((e=>e.modelId===Fe));l.apiConversationId=null==(e=Ne.value)?void 0:e.trim(),l.apiAgentId=null==(t=qe.value)?void 0:t.trim(),l.apiNote=null==(a=$e.value)?void 0:a.trim(),Re.value=!1};async function Ge(){const e=G.value.find((e=>e.chat.modelId===Fe));if("lyihub"===e.model.type){const t=await Le(e.model.apiKey);Ne.value=t.id}else Ne.value=Se()}const Xe=a(""),Ze=e=>{1!==G.value.length&&(""===Xe.value?Xe.value=e:Xe.value="")},Qe=a(!1),et=a(""),tt=V.list;let at=null,lt=null;const ot=async(e,t)=>{Qe.value=!0,et.value="",at=e,lt=t},nt=async()=>{const e=at.chat.chats,t=e.findIndex((e=>e===lt)),a=e[t].content.text;let l="";const n=t+1;n<e.length&&"assistant"===e[n].role&&(l=e[n].content.text);const s={id:Se(),title:a,time:(new Date).getTime(),conversationId:K.value.id,conversationName:K.value.name,conversationAvatar:K.value.avatar,chats:[{...e[t],content:{...e[t].content}},{...e[n],content:{...e[n].content}}],notes:[]};if(V.add(s),ae.success(I("pages.conversation.favorite_success")),o.assistModel){const e=I("pages.conversation.extract_core_conversation",{question:a,answer:l});await Oe(e,(e=>{s.title=e,s.title=s.title.replaceAll("###",""),s.title=s.title.trim(),V.update(s)}))}Qe.value=!1},st=async()=>{if(!et.value)return void ae.warning("需要先选中笔记");const e=tt.find((e=>e.id==et.value)),t=at.chat.chats,a=t.findIndex((e=>e===lt)),l=a+1;e.chats.push({...t[a],content:{...t[a].content}}),e.chats.push({...t[l],content:{...t[l].content}}),V.update(e),ae.success(I("pages.conversation.favorite_success")),Qe.value=!1},it=t((()=>T().isSidebarCompact)),ct=t((()=>""!==Xe.value||1===G.value.length||it.value?12:2===G.value.length?6:3===G.value.length?4:4===G.value.length?3:5===G.value.length||6===G.value.length?4:7===G.value.length||8===G.value.length?3:12)),rt=t((()=>""!==Xe.value||1===G.value.length||it.value||2===G.value.length||3===G.value.length||4===G.value.length?"h-[calc(100%-10px)]":5===G.value.length||6===G.value.length||7===G.value.length||8===G.value.length?"h-[calc(50%-10px)]":"h-[calc(100%-10px)]")),ut=t((()=>{let e="h-[calc(100vh-56px-2*var(--td-comp-paddingTB-m))]";return r.showLayoutHeader&&r.showFooter&&(e="h-[calc(100vh-56px-var(--td-comp-size-xxl)-var(--td-comp-size-xxxl)-2*var(--td-comp-paddingTB-m))]"),r.showLayoutHeader&&!r.showFooter&&(e="h-[calc(100vh-56px-var(--td-comp-size-xxxl)-2*var(--td-comp-paddingTB-m))]"),!r.showLayoutHeader&&r.showFooter&&(e="h-[calc(100vh-56px-var(--td-comp-size-xxl)-2*var(--td-comp-paddingTB-m))]"),[e,{"chat-container-collapsed":it.value&&G.value.length>1&&!Xe.value}]})),dt=()=>{const e=G.value.map((e=>e.chat)),t=new Set(e),a=K.value.models.filter((e=>!t.has(e)));K.value.models=[...e,...a]},vt=new Map,pt=async()=>{if(!F.value)return;J=!0,await C();const e=F.value.querySelectorAll(".chating");e.forEach((e=>{const t=e.getAttribute("data-chat-id");if(t&&!vt.has(t)){vt.set(t,!0);const a=()=>{const a=e.scrollHeight-e.scrollTop-e.clientHeight;a>100?vt.set(t,!1):a<100&&vt.set(t,!0),e.setAttribute("data-last-scroll-time",Date.now().toString())};e._scrollHandler=a,e.addEventListener("scroll",a)}}));const t=()=>{J&&(e.forEach((e=>{const t=e.getAttribute("data-chat-id");if(t&&vt.get(t))try{if(e.scrollHeight-e.scrollTop-e.clientHeight>10){const t=parseInt(e.getAttribute("data-last-scroll-time")||"0");Date.now()-t>500&&(null==e||e.scrollTo({top:e.scrollHeight,behavior:"instant"}))}}catch(a){}})),J&&requestAnimationFrame((()=>{setTimeout(t,200)})))};t()};async function mt(e){await new Promise((t=>setTimeout(t,e))),F.value&&requestAnimationFrame((()=>{F.value.querySelectorAll(".scrollable-chat").forEach((e=>{if(e)try{e.scrollTo({top:e.scrollHeight,behavior:"instant"})}catch(t){}}))}))}j((()=>{ht()}));const ht=()=>{(()=>{if(!F.value)return;F.value.querySelectorAll("[data-chat-id]").forEach((e=>{const t=e.getAttribute("data-chat-id");if(t){const a=e.onscroll;a&&e.removeEventListener("scroll",a),vt.delete(t)}}))})(),vt.clear()};x((()=>{K.value&&(ht(),ft())}));const ft=()=>{G.value=K.value.models.map((e=>{const t=Y.find(e.modelId);if(t&&e.showing)return{model:t,chat:e,id:e.modelId}})).filter(Boolean)};l((()=>q.query.id),(async e=>{if("/conversation/chat"!==q.path)return K.value=null,void ht();let t=e;K.value,requestAnimationFrame((async()=>{K.value=O.find(t),Xe.value="",setTimeout((()=>{var e;ft();!q.query.isNew||!(null==(e=R.data)?void 0:e.content)||0===K.value.models.length||K.value.models[0].chats.length>0?mt(1e3):ee(R.data)}),50)}))}),{immediate:!0});const gt=t((()=>K.value&&K.value.internet?{color:"green"}:{})),_t=a(null),xt=()=>{var e;null==(e=_t.value)||e.showToolbox()},bt=()=>{var e;null==(e=_t.value)||e.hideToolbox()},wt=(e,t)=>{if(vt.set(e,t),F.value){const a=F.value.querySelector(`[data-chat-id="${e}"]`);if(a&&!t){const t=a._scrollHandler;t&&(a.removeEventListener("scroll",t),a._scrollHandler=null);const l=()=>{a.removeEventListener("scroll",l),setTimeout((()=>{const t=()=>{const t=a.scrollHeight-a.scrollTop-a.clientHeight;t>100?vt.set(e,!1):t<100&&vt.set(e,!0)};a._scrollHandler=t,a.addEventListener("scroll",t)}),1e3)};a.addEventListener("scroll",l)}}};return(e,t)=>{const a=ce,l=L,o=W,r=le,x=re,j=X,C=ve,z=de,M=ue,V=te,S=D,T=$,E=N;return b((s(),n("div",{class:"flex flex-col items-center h-full relative",onMousedown:bt},[p("div",{class:w(["w-full",ut.value]),ref_key:"chatContainer",ref:F,onMouseup:xt},[u(De,{ref_key:"toolbar",ref:_t,parent:F.value},null,8,["parent"]),u(v(We),{tag:"t-row",modelValue:G.value,"onUpdate:modelValue":t[0]||(t[0]=e=>G.value=e),handle:".handle","component-data":{align:"top",gutter:10},onEnd:dt,"item-key":"id",class:"h-full"},{item:d((({element:e})=>[(s(),c(a,{span:ct.value,key:`${K.value.id}-${e.model.id}`,class:w([rt.value,{hidden:""!==Xe.value&&Xe.value!==e.model.id}])},{default:d((()=>[u(St,{"chat-model":e,conversation:K.value,"data-index":`${e.model.id}`,"full-screen-model-id":Xe.value,"is-single-model":1===G.value.length,onStopChat:pe,onExtendModelVisible:Me,onReChat:ne,onChangeSize:Ze,onApiSettingVisible:Ke,onFavNoteVisible:ot,onClearChatContext:ye,onClearChatHistory:je,onUpdateScrollFlag:wt},null,8,["chat-model","conversation","data-index","full-screen-model-id","is-single-model"])])),_:2},1032,["span","class"]))])),_:1},8,["modelValue"])],34),p("div",Tt,[u(B,{class:"flex-1",onInput:ee}),p("div",Et,[v(Z)?(s(),c(x,{key:1,delay:0,modelValue:Q.value,"onUpdate:modelValue":t[7]||(t[7]=e=>Q.value=e),onOverlayClick:t[8]||(t[8]=e=>Q.value=!1)},{content:d((()=>[p("div",Rt,[u(l,{size:"large",shape:"circle",variant:"text",onClick:he},{default:d((()=>[u(v(Ae),{slot:"icon",style:k(gt.value)},null,8,["style"])])),_:1}),u(l,{size:"large",shape:"circle",variant:"text",onClick:me},{default:d((()=>[u(v(fe),{slot:"icon"})])),_:1}),u(l,{size:"large",shape:"circle",variant:"text",onClick:oe},{default:d((()=>[u(v(ge),{slot:"icon"})])),_:1}),u(l,{size:"large",shape:"circle",variant:"text",onClick:t[2]||(t[2]=e=>Me(""))},{default:d((()=>[u(v(be),{slot:"icon"})])),_:1}),u(r,{theme:"danger",content:v(I)("pages.conversation.confirm_delete_all_chat_records"),placement:"left",onConfirm:t[4]||(t[4]=()=>{we(),Q.value=!1})},{default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:t[3]||(t[3]=_((()=>{}),["stop"]))},{default:d((()=>[u(v(_e),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(r,{theme:"warning",content:v(I)("pages.conversation.confirm_clear_all_context"),placement:"left",onConfirm:t[6]||(t[6]=()=>{se(),Q.value=!1})},{default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:t[5]||(t[5]=_((()=>{}),["stop"]))},{default:d((()=>[u(v(xe),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(l,{size:"large",shape:"circle",variant:"text",onClick:ie},{default:d((()=>[u(v(Ie),{slot:"icon"})])),_:1})])])),default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text"},{default:d((()=>[u(v(Ve),{slot:"icon"})])),_:1})])),_:1},8,["modelValue"])):(s(),n(i,{key:0},[u(o,{content:v(I)("pages.conversation.internet_search")},{default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:_(he,["stop"])},{default:d((()=>[u(v(Ae),{slot:"icon",style:k(gt.value)},null,8,["style"])])),_:1})])),_:1},8,["content"]),u(o,{content:v(I)("pages.conversation.stop_answering")},{default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:_(me,["stop"])},{default:d((()=>[u(v(fe),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(o,{content:v(I)("pages.conversation.regenerate_last_conversation")},{default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:_(oe,["stop"])},{default:d((()=>[u(v(ge),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(o,{content:v(I)("pages.conversation.inherit_other_model_conversation"),placement:"top"},{default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:t[1]||(t[1]=_((e=>Me("")),["stop"]))},{default:d((()=>[u(v(be),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(r,{theme:"danger",content:v(I)("pages.conversation.confirm_delete_all_chat_records"),placement:"top",onConfirm:we},{default:d((()=>[u(o,{content:v(I)("pages.conversation.delete_all_chat_records"),placement:"top"},{default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text"},{default:d((()=>[u(v(_e),{slot:"icon"})])),_:1})])),_:1},8,["content"])])),_:1},8,["content"]),u(r,{theme:"warning",content:v(I)("pages.conversation.confirm_clear_all_context"),placement:"top",onConfirm:se},{default:d((()=>[u(o,{content:v(I)("pages.conversation.clear_all_context"),placement:"top"},{default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text"},{default:d((()=>[u(v(xe),{slot:"icon"})])),_:1})])),_:1},8,["content"])])),_:1},8,["content"]),u(o,{content:v(I)("pages.conversation.edit_current_conversation"),placement:"top"},{default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:ie},{default:d((()=>[u(v(Ie),{slot:"icon"})])),_:1})])),_:1},8,["content"])],64))])]),u(Ye),u(V,{header:v(I)("pages.conversation.inherit_model_dialog"),visible:ke.value,"onUpdate:visible":t[10]||(t[10]=e=>ke.value=e),"on-confirm":Te,class:"extend-model"},{default:d((()=>[u(M,{class:"w-full",modelValue:ze.value,"onUpdate:modelValue":t[9]||(t[9]=e=>ze.value=e)},{default:d((()=>[u(z,{gutter:[16,16],class:"w-full"},{default:d((()=>[(s(!0),n(i,null,h(G.value,(e=>(s(),c(a,{span:12},{default:d((()=>[u(C,{value:e.model.id,disabled:Ce.value===e.model.id},{default:d((()=>[u(j,{size:"20px",class:"mr-1"},{icon:d((()=>[(s(),c(g(v(A).icons[e.model.type])))])),_:2},1024),f(" "+m(v(A).getModelItemTitle(e.model)),1)])),_:2},1032,["value","disabled"])])),_:2},1024)))),256))])),_:1})])),_:1},8,["modelValue"])])),_:1},8,["header","visible"]),u(V,{header:v(I)("pages.conversation.api_conversation_settings"),visible:Re.value,"onUpdate:visible":t[14]||(t[14]=e=>Re.value=e),"on-confirm":Je},{default:d((()=>[u(E,{"label-align":"top"},{default:d((()=>[u(T,{label:v(I)("pages.conversation.api_agent"),name:"apiSettingAgent"},{default:d((()=>[u(S,{modelValue:qe.value,"onUpdate:modelValue":t[11]||(t[11]=e=>qe.value=e)},null,8,["modelValue"])])),_:1},8,["label"]),u(T,{label:v(I)("pages.conversation.api_conversation_id"),name:"apiSettingConversation"},{default:d((()=>[u(S,{modelValue:Ne.value,"onUpdate:modelValue":t[12]||(t[12]=e=>Ne.value=e)},null,8,["modelValue"]),u(l,{class:"ml-2",onClick:Ge},{default:d((()=>[f(m(v(I)("pages.conversation.api_conversation_id_random")),1)])),_:1})])),_:1},8,["label"]),u(T,{label:v(I)("pages.conversation.remarks"),name:"apiSettingNode"},{default:d((()=>[u(S,{modelValue:$e.value,"onUpdate:modelValue":t[13]||(t[13]=e=>$e.value=e)},null,8,["modelValue"])])),_:1},8,["label"])])),_:1})])),_:1},8,["header","visible"]),u(V,{header:v(I)("pages.conversation.button_tooltip_favourite"),visible:Qe.value,"onUpdate:visible":t[16]||(t[16]=e=>Qe.value=e),confirmBtn:null},{default:d((()=>[p("div",Ut,[u(l,{onClick:nt,theme:"default",variant:"outline"},{default:d((()=>t[17]||(t[17]=[f("创建新的笔记")]))),_:1}),u(l,{onClick:st,theme:"default",variant:"outline"},{default:d((()=>t[18]||(t[18]=[f("添加到笔记")]))),_:1}),p("div",Pt,[u(M,{modelValue:et.value,"onUpdate:modelValue":t[15]||(t[15]=e=>et.value=e)},{default:d((()=>[u(z,{gutter:[16,16]},{default:d((()=>[(s(!0),n(i,null,h(v(tt),(e=>(s(),c(a,{span:12},{default:d((()=>[u(C,{value:e.id,class:"grid grid-flow-col auto-cols-max fav-radio fav-radio-dialog"},{default:d((()=>[f(m(e.title),1)])),_:2},1032,["value"])])),_:2},1024)))),256))])),_:1})])),_:1},8,["modelValue"])])])])),_:1},8,["header","visible"])],544)),[[y,K.value]])}}});export{Ht as default};
.output/public/assets/content-DfpBbjNi.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ import{U as e,A as t,_ as o,a}from"./ToolBar.vue_vue_type_style_index_0_lang-Cn5BAuq2.js";import{_ as l}from"./ChatInput.vue_vue_type_style_index_0_lang-B1k4vI4G.js";import{b as s,u as n,e as i,t as r,m as c}from"./mermaid-render-f9KGMq_P.js";import{a as u,u as m}from"./vue-router-DKqWD4MR.js";import{m as p}from"./markdown-ppShADW8.js";import{s as d,b as v,P as f,T as j,A as g,r as h,f as x,e as y}from"./tdesign-vue-next-BiEwLJDx.js";import{c as _,ad as w,_ as b,a4 as k,a5 as C,a3 as T,ae as z}from"./tdesign-icons-vue-next-Bre5yOVt.js";import{l as E,a as B,V as H,w as $,o as I,v as S,y as V,z as M,A as R,R as A,a9 as O,u as q,F as D,n as F,f as L,J as P,aa as N,I as J,H as U}from"./@vue-CfxotJ-S.js";import{e as W}from"./fetch-SJxNIU2V.js";import{a as K}from"./main-apEI6pT3.js";import"./@wdns-C8Xpkjrj.js";import"./@mermaid-js-C9iCgeAb.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./lodash-es-RhymR7yg.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./ua-parser-js--QiuJfYt.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./uuid-_R2nDvl_.js";import"./mammoth-Cw8VHd7C.js";import"./xlsx-DB6BMndo.js";import"./pdfjs-dist-8WFUNQXM.js";import"./mermaid-CFwXVJJh.js";import"./ts-dedent-CttZBlkd.js";import"./d3-transition-0ltv4da8.js";import"./d3-timer-keMr1twq.js";import"./d3-dispatch-Chq_f_hl.js";import"./d3-interpolate-Ct9kki6l.js";import"./d3-color-D5ULnJIe.js";import"./d3-selection-Oxnq6l6A.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-Dz8HuW59.js";import"./dompurify-DRcrZKbd.js";import"./stylis-Cl7w7uv3.js";import"./dagre-d3-es-D8JeTxsO.js";import"./@braintree-BB7t-Iuh.js";import"./khroma-C2oHPU0S.js";import"./dayjs-Cbdj87rt.js";import"./d3-scale-CdkN4P7M.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-BhN1wQGI.js";import"./d3-format-C0lSXcPg.js";import"./d3-time-format-DB2uBv1t.js";import"./d3-time-B1kAM736.js";import"./d3-axis-pCwzqJ1S.js";import"./d3-shape-C6CU9yox.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-Bkc4UHOn.js";import"./cytoscape-BsbaL92W.js";import"./cytoscape-cose-bilkent-CcQu5e-H.js";import"./cose-base-kQthUiMK.js";import"./layout-base-DqRk0Tgc.js";import"./d3-sankey-B6tQBass.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./@iconify-BUO7KvjM.js";import"./marked-CrLTNeyQ.js";import"./cytoscape-fcose-B58q80h4.js";import"./pinia-gf2247cH.js";import"./pinia-plugin-persistedstate-CxGPmdL5.js";import"./destr-WfmzGWA8.js";import"./deep-pick-omit-DP_A4OSP.js";import"./lodash-VDnThKtA.js";import"./@vueuse-B4dz7nOv.js";import"./vue-i18n-BLIfPQxk.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./markdown-it-link-attributes-DRKqjf49.js";import"./markdown-it-C8SkdHr7.js";import"./mdurl-CDXpswLz.js";import"./uc.micro-CLkLCS2f.js";import"./entities-D7HTx9ov.js";import"./linkify-it-LcVOBuC5.js";import"./punycode.js-Bmr3cAX8.js";import"./@traptitech-xv_Vpjqh.js";import"./katex-Vs6-m9jZ.js";import"./markdown-it-highlightjs-IY8LrfKU.js";import"./highlight.js-BgdnSEsd.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./eventsource-parser-D0ssca5s.js";import"./vuedraggable-DAEPkKhD.js";import"./vue-BIpqWpgL.js";const X={key:0,class:"markdown-body"},Y=["innerHTML"],Z={key:1},Q={class:"flex justify-end mt-2 gap-5"},G=E({__name:"NoteContent",props:{content:{},isEditing:{type:Boolean,default:!1}},emits:["save","cancel"],setup(e,{emit:t}){const o=e,a=B(""),l=B(!1),s=B(!1);let n=null;const i=async()=>{o.content&&(n&&clearTimeout(n),n=window.setTimeout((async()=>{try{l.value=!0,a.value=await p.render(o.content)}catch(e){s.value=!0}finally{l.value=!1}}),100))};H((()=>{n&&clearTimeout(n)})),$((()=>o.content),(()=>{i()}),{immediate:!0}),I((()=>{o.content&&!a.value&&i()}));const r=t,c=B(o.content),u=()=>{r("save",c.value)},m=()=>{c.value=o.content,r("cancel")},f=(e,t)=>{t.e.relatedTarget||m()},j=B(null);return $((()=>o.isEditing),(e=>{e&&(c.value=o.content,F((()=>{j.value.$el.querySelector("textarea").focus()})))})),(e,t)=>{const o=d,l=v;return V(),S(D,null,[e.isEditing?M("",!0):(V(),S("div",X,[R("div",{innerHTML:a.value},null,8,Y)])),e.isEditing?(V(),S("div",Z,[A(o,{ref_key:"textareaRef",ref:j,modelValue:c.value,"onUpdate:modelValue":t[0]||(t[0]=e=>c.value=e),autosize:{minRows:2,maxRows:20},onBlur:f},null,8,["modelValue"]),R("div",Q,[A(l,{size:"large",shape:"circle",variant:"text",onClick:m},{default:O((()=>[A(q(_),{slot:"icon"})])),_:1}),A(l,{size:"large",shape:"circle",variant:"text",onClick:u},{default:O((()=>[A(q(w),{slot:"icon"})])),_:1})])])):M("",!0)],64)}}}),ee={class:"flex justify-between w-full"},te={class:"flex-1"},oe={key:0,class:"text-xl font-bold"},ae={class:"flex align-middle items-center gap-2"},le={class:"flex flex-1 overflow-hidden"},se={class:"flex-1 relative h-full overflow-y-auto no-scrollbar flex flex-col gap-5"},ne={key:0,class:"flex w-full justify-end items-start gap-2 note-item"},ie={class:"flex justify-end overflow-hidden h-[24px]"},re={class:"bg-color-page p-4 rounded-lg"},ce={class:"flex justify-end gap-2 note-item-tools"},ue={class:"w-[24px] h-[24px]"},me={key:1,class:"flex w-full justify-end items-start flex-row-reverse gap-2 note-item"},pe={class:"flex flex-col gap-2 w-[calc(100%-24px-1rem)]"},de={class:"flex justify-between overflow-hidden h-[24px]"},ve={class:"bg-color-page p-4 rounded-lg"},fe={class:"flex justify-end gap-2 note-item-tools"},je={class:"w-[24px] h-[24px]"},ge={class:"flex w-full justify-end note-item items-start gap-2"},he={class:"flex justify-end overflow-hidden h-[24px]"},xe={class:"bg-color-page p-4 rounded-lg"},ye={key:0,class:"loader"},_e={class:"flex justify-end gap-2 note-item-tools"},we={class:"w-[24px] h-[24px]"},be={key:0,class:"w-1/2"},ke=E({__name:"content",setup(p){var d;const _=B(null),E=B(null),H=s(),I=K();u();const X=m(),Y=B(),Z=n(),Q=B(!1),ke=i();$((()=>X.query.id),(e=>{if("/note/content"!==X.path)return void(Y.value=null);let t=e;Y.value=I.find(t)}),{immediate:!0});const Ce=L((()=>Z.showLayoutHeader&&Z.showFooter?"h-[calc(100vh-var(--td-comp-size-xxl)-var(--td-comp-size-xxxl)-2*var(--td-comp-paddingTB-m))]":Z.showLayoutHeader&&!Z.showFooter?"h-[calc(100vh-var(--td-comp-size-xxxl)-2*var(--td-comp-paddingTB-m))]":!Z.showLayoutHeader&&Z.showFooter?"h-[calc(100vh-var(--td-comp-size-xxl)-2*var(--td-comp-paddingTB-m))]":"h-[calc(100vh-2*var(--td-comp-paddingTB-m))]"));let Te=null;const ze=B(!1),Ee=async e=>{var t;if(e.content)if(e.content.startsWith("@")){const{name:t,content:o}=function(e){const t=e.indexOf("@");if(-1===t)return null;let o=e.indexOf(" ",t);const a=e.indexOf("(",t),l=e.indexOf(")",t);return-1!==a&&-1!==l&&l>a?o=e.indexOf(" ",l):-1===o&&(o=e.length),{name:e.substring(t+1,o).trim(),content:e.substring(o).trim()}}(e.content),a="ai"===t?ke.find(H.assistModel):ke.enableModels.find((e=>c.getModelItemTitle(e)===t));let l=o;Y.value.notes.push(`# ${l}`);try{let e="";for(let t=0;t<Y.value.chats.length;t++){const o=Y.value.chats[t];"user"===o.role&&(e+=`<|im_start|>user\n${o.content}<|im_end|>\n`),"assistant"===o.role&&(e+=`<|im_start|>assistant\n${o.content}<|im_end|>\n`)}for(let t=0;t<Y.value.notes.length;t++){e+=`<|im_start|>user\n${Y.value.notes[t]}<|im_end|>`}e+=`<|im_start|>user\n${o}<|im_end|>`,Te=setInterval(Be,0),ze.value=!0,await W(a,e,(e=>{ze.value&&(ze.value=!1),Y.value.notes[Y.value.notes.length-1]=`# ${l}\n`+e}))}finally{null!==Te&&(clearInterval(Te),Te=null)}}else Y.value.notes.push(e.content),t=0,F((()=>{setTimeout((()=>{var e;null==(e=_.value)||e.scrollTo({top:_.value.scrollHeight,behavior:"smooth"})}),t)}));else y.error(r("pages.note.noteEmptyError"))},Be=async()=>{for(var e;null!==Te;)await new Promise((e=>setTimeout(e,300))),null==(e=_.value)||e.scrollTo({top:_.value.scrollHeight,behavior:"instant"})},He=B(!1);let $e=B("");const Ie=()=>{He.value=!1},Se=B(null),Ve=B(null==(d=Y.value)?void 0:d.title),Me=(e,t)=>{t.e.relatedTarget||(Q.value=!1)},Re=()=>{Y.value.title=Ve.value,Q.value=!1},Ae=()=>{var e;Ve.value=null==(e=Y.value)?void 0:e.title,Q.value=!0,F((()=>{Se.value.$el.querySelector("input").focus()}))},Oe=B(-1),qe=e=>{Oe.value=e},De=e=>{Y.value.chats[Oe.value].content.text=e,Oe.value=-1},Fe=()=>{Oe.value=-1},Le=B(-1),Pe=e=>{Y.value.notes[Le.value]=e,Le.value=-1},Ne=()=>{Le.value=-1},Je=()=>{navigator.clipboard.writeText(JSON.stringify(Y.value)),y.success(r("pages.note.noteCopySuccess"))};return(s,n)=>{const i=h,c=v,u=j,m=f,p=g;return Y.value?(V(),P(q(x),{key:0,class:J(["note-page overflow-hidden flex flex-col",[Ce.value]]),"header-bordered":"",title:Y.value.title,bordered:!1},{header:O((()=>[R("div",ee,[R("div",te,[Q.value?(V(),P(i,{key:1,ref_key:"inputTitleRef",ref:Se,type:"text",modelValue:Ve.value,"onUpdate:modelValue":n[0]||(n[0]=e=>Ve.value=e),onEnter:Re,onBlur:Me},null,8,["modelValue"])):(V(),S("h1",oe,U(Y.value.title),1))]),R("div",ae,[A(u,{content:q(r)("pages.note.noteRenameTooltip"),placement:"top"},{default:O((()=>[Q.value?(V(),P(c,{key:1,size:"small",shape:"circle",variant:"text",onClick:Re},{default:O((()=>[A(q(w),{slot:"icon"})])),_:1})):(V(),P(c,{key:0,size:"small",shape:"circle",variant:"text",onClick:Ae},{default:O((()=>[A(q(z),{slot:"icon"})])),_:1}))])),_:1},8,["content"]),A(c,{size:"small",shape:"circle",variant:"text",onClick:Je},{default:O((()=>[A(q(C),{slot:"icon"})])),_:1})])])])),content:O((()=>[R("div",{ref_key:"scrollable_chat",ref:_,class:"h-full note-content flex flex-col gap-1 relative",onMouseupPassive:n[1]||(n[1]=//@ts-ignore
2
+ (...e)=>{var t,o;return(null==(t=E.value)?void 0:t.showToolbox)&&(null==(o=E.value)?void 0:o.showToolbox(...e))}),onMousedownPassive:n[2]||(n[2]=//@ts-ignore
3
+ (...e)=>{var t,o;return(null==(t=E.value)?void 0:t.hideToolbox)&&(null==(o=E.value)?void 0:o.hideToolbox(...e))})},[R("div",le,[R("div",se,[(V(!0),S(D,null,N(Y.value.chats,((o,a)=>(V(),S(D,null,["user"===o.role?(V(),S("div",ne,[R("div",{class:J(["flex flex-col gap-2",Oe.value===a?"w-full":""])},[R("div",ie,U(q(H).name),1),R("div",re,[A(e,{content:o.content,isEditing:Oe.value===a,onSave:De,onCancel:Fe},null,8,["content","isEditing"])]),R("div",ce,[A(m,{theme:"danger",content:q(r)("pages.note.noteDeleteConfirm"),placement:"bottom",onConfirm:e=>(e=>{const t=Y.value.chats.findIndex((t=>t===e));-1!==t&&Y.value.chats.splice(t,2)})(o)},{default:O((()=>[A(u,{content:q(r)("pages.note.noteDeleteTooltip")},{default:O((()=>[A(c,{size:"small",variant:"outline"},{default:O((()=>[A(q(b),{slot:"icon"})])),_:1})])),_:1},8,["content"])])),_:2},1032,["content","onConfirm"]),A(u,{content:q(r)("pages.conversation.button_tooltip_editor"),placement:"bottom"},{default:O((()=>[A(c,{size:"small",variant:"outline",onClick:e=>qe(a)},{default:O((()=>[A(q(k),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"])])],2),R("div",ue,[A(p,{size:"24px",image:q(H).avatar},null,8,["image"])])])):"assistant"===o.role?(V(),S("div",me,[R("div",pe,[R("div",de,[R("div",null,U(Y.value.conversationName),1)]),R("div",ve,[A(t,{content:o.content,isEditing:Oe.value===a,onSave:De,onCancel:Fe},null,8,["content","isEditing"])]),R("div",fe,[A(u,{content:q(r)("pages.conversation.button_tooltip_editor"),placement:"bottom"},{default:O((()=>[A(c,{size:"small",variant:"outline",onClick:e=>qe(a)},{default:O((()=>[A(q(k),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"]),A(u,{content:q(r)("pages.note.noteCopyTooltip")},{default:O((()=>[A(c,{size:"small",variant:"outline",onClick:e=>{return t=o,navigator.clipboard.writeText(t.content.text),void y.success(r("pages.note.noteCopySuccess"));var t}},{default:O((()=>[A(q(C),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"]),A(u,{content:q(r)("pages.conversation.toggle_artifacts")},{default:O((()=>[A(c,{size:"small",variant:"outline",onClick:e=>{var t;"assistant"===(t=o).role&&(He.value=!He.value,He.value&&($e.value=t.content.text))}},{default:O((()=>[A(q(T),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"])])]),R("div",je,[A(p,{size:"24px",image:Y.value.conversationAvatar},null,8,["image"])])])):M("",!0)],64)))),256)),(V(!0),S(D,null,N(Y.value.notes,((e,t)=>(V(),S("div",ge,[R("div",{class:J(["flex flex-col gap-2 min-w-[300px]",Le.value===t?"w-full":""])},[R("div",he,U(q(H).name),1),R("div",xe,[ze.value&&t===Y.value.notes.length-1?(V(),S("span",ye)):(V(),P(G,{key:1,content:e,isEditing:Le.value===t,onSave:Pe,onCancel:Ne},null,8,["content","isEditing"]))]),R("div",_e,[A(m,{theme:"danger",content:q(r)("pages.note.noteDeleteConfirm"),placement:"bottom",onConfirm:e=>(e=>{Y.value.notes.splice(e,1)})(t)},{default:O((()=>[A(u,{content:q(r)("pages.note.noteDeleteTooltip")},{default:O((()=>[A(c,{size:"small",variant:"outline"},{default:O((()=>[A(q(b),{slot:"icon"})])),_:1})])),_:1},8,["content"])])),_:2},1032,["content","onConfirm"]),A(u,{content:q(r)("pages.conversation.button_tooltip_editor"),placement:"bottom"},{default:O((()=>[A(c,{size:"small",variant:"outline",onClick:e=>(e=>{Le.value=e})(t)},{default:O((()=>[A(q(k),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"])])],2),R("div",we,[A(p,{size:"24px",image:q(H).avatar},null,8,["image"])])])))),256))]),He.value?(V(),S("div",be,[A(o,{content:q($e),closeBtn:Ie},null,8,["content"])])):M("",!0)]),A(a,{ref_key:"toolbar",ref:E,parent:_.value},null,8,["parent"])],544)])),footer:O((()=>[A(l,{"show-upload":!1,"auto-complete-enabled":!0,placeholder:s.$t("pages.note.notePlaceholder"),onInput:Ee},null,8,["placeholder"])])),_:1},8,["class","title"])):M("",!0)}}});export{ke as default};
.output/public/assets/cytoscape-BsbaL92W.js ADDED
The diff for this file is too large to render. See raw diff
 
.output/public/assets/destr-WfmzGWA8.js ADDED
@@ -0,0 +1 @@
 
 
1
+ const t=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,r=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,e=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function u(t,r){if(!("__proto__"===t||"constructor"===t&&r&&"object"==typeof r&&"prototype"in r))return r}function n(n,s={}){if("string"!=typeof n)return n;if('"'===n[0]&&'"'===n[n.length-1]&&-1===n.indexOf("\\"))return n.slice(1,-1);const i=n.trim();if(i.length<=9)switch(i.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!e.test(n)){if(s.strict)throw new SyntaxError("[destr] Invalid JSON");return n}try{if(t.test(n)||r.test(n)){if(s.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(n,u)}return JSON.parse(n)}catch(o){if(s.strict)throw o;return n}}export{n as d};
.output/public/assets/dompurify-DRcrZKbd.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */
2
+ const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=R(Array.prototype.forEach),m=R(Array.prototype.lastIndexOf),p=R(Array.prototype.pop),f=R(Array.prototype.push),d=R(Array.prototype.splice),h=R(String.prototype.toLowerCase),g=R(String.prototype.toString),T=R(String.prototype.match),y=R(String.prototype.replace),E=R(String.prototype.indexOf),A=R(String.prototype.trim),_=R(Object.prototype.hasOwnProperty),S=R(RegExp.prototype.test),N=(b=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(b,t)});var b;function R(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function w(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function O(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function v(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=O(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=v(r):n[o]=r)}return n}function D(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return R(n.get);if("function"==typeof n.value)return R(n.value)}e=o(e)}return function(){return null}}const L=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),I=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),k=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=a(/<%[\w\W]*|[\w\W]*%>/gm),G=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:G});const J=1,Q=3,ee=7,te=8,ne=9;var oe=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const o=e=>t(e);if(o.version="3.2.5",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:b,Node:R,Element:O,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=n,q=O.prototype,$=D(q,"cloneNode"),V=D(q,"remove"),oe=D(q,"nextSibling"),re=D(q,"childNodes"),ie=D(q,"parentNode");if("function"==typeof b){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ae,le="";const{implementation:ce,createNodeIterator:se,createDocumentFragment:ue,getElementsByTagName:me}=r,{importNode:pe}=a;let fe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ie&&ce&&void 0!==ce.createHTMLDocument;const{MUSTACHE_EXPR:de,ERB_EXPR:he,TMPLIT_EXPR:ge,DATA_ATTR:Te,ARIA_ATTR:ye,IS_SCRIPT_OR_DATA:Ee,ATTR_WHITESPACE:Ae,CUSTOM_ELEMENT:_e}=Z;let{IS_ALLOWED_URI:Se}=Z,Ne=null;const be=w({},[...L,...C,...x,...k,...U]);let Re=null;const we=w({},[...z,...P,...H,...F]);let Oe=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,De=null,Le=!0,Ce=!0,xe=!1,Ie=!0,ke=!1,Me=!0,Ue=!1,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!1,We=!0,Ge=!1,Ye=!0,je=!1,Xe={},qe=null;const $e=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ke=null;const Ve=w({},["audio","video","img","source","image","track"]);let Ze=null;const Je=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Qe="http://www.w3.org/1998/Math/MathML",et="http://www.w3.org/2000/svg",tt="http://www.w3.org/1999/xhtml";let nt=tt,ot=!1,rt=null;const it=w({},[Qe,et,tt],g);let at=w({},["mi","mo","mn","ms","mtext"]),lt=w({},["annotation-xml"]);const ct=w({},["title","style","font","a","script"]);let st=null;const ut=["application/xhtml+xml","text/html"];let mt=null,pt=null;const ft=r.createElement("form"),dt=function(e){return e instanceof RegExp||e instanceof Function},ht=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!pt||pt!==e){if(e&&"object"==typeof e||(e={}),e=v(e),st=// eslint-disable-next-line unicorn/prefer-includes
3
+ -1===ut.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,mt="application/xhtml+xml"===st?g:h,Ne=_(e,"ALLOWED_TAGS")?w({},e.ALLOWED_TAGS,mt):be,Re=_(e,"ALLOWED_ATTR")?w({},e.ALLOWED_ATTR,mt):we,rt=_(e,"ALLOWED_NAMESPACES")?w({},e.ALLOWED_NAMESPACES,g):it,Ze=_(e,"ADD_URI_SAFE_ATTR")?w(v(Je),e.ADD_URI_SAFE_ATTR,mt):Je,Ke=_(e,"ADD_DATA_URI_TAGS")?w(v(Ve),e.ADD_DATA_URI_TAGS,mt):Ve,qe=_(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,mt):$e,ve=_(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,mt):{},De=_(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,mt):{},Xe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Le=!1!==e.ALLOW_ARIA_ATTR,Ce=!1!==e.ALLOW_DATA_ATTR,xe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ke=e.SAFE_FOR_TEMPLATES||!1,Me=!1!==e.SAFE_FOR_XML,Ue=e.WHOLE_DOCUMENT||!1,He=e.RETURN_DOM||!1,Fe=e.RETURN_DOM_FRAGMENT||!1,Be=e.RETURN_TRUSTED_TYPE||!1,Pe=e.FORCE_BODY||!1,We=!1!==e.SANITIZE_DOM,Ge=e.SANITIZE_NAMED_PROPS||!1,Ye=!1!==e.KEEP_CONTENT,je=e.IN_PLACE||!1,Se=e.ALLOWED_URI_REGEXP||X,nt=e.NAMESPACE||tt,at=e.MATHML_TEXT_INTEGRATION_POINTS||at,lt=e.HTML_INTEGRATION_POINTS||lt,Oe=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Oe.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Oe.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Oe.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ke&&(Ce=!1),Fe&&(He=!0),Xe&&(Ne=w({},U),Re=[],!0===Xe.html&&(w(Ne,L),w(Re,z)),!0===Xe.svg&&(w(Ne,C),w(Re,P),w(Re,F)),!0===Xe.svgFilters&&(w(Ne,x),w(Re,P),w(Re,F)),!0===Xe.mathMl&&(w(Ne,k),w(Re,H),w(Re,F))),e.ADD_TAGS&&(Ne===be&&(Ne=v(Ne)),w(Ne,e.ADD_TAGS,mt)),e.ADD_ATTR&&(Re===we&&(Re=v(Re)),w(Re,e.ADD_ATTR,mt)),e.ADD_URI_SAFE_ATTR&&w(Ze,e.ADD_URI_SAFE_ATTR,mt),e.FORBID_CONTENTS&&(qe===$e&&(qe=v(qe)),w(qe,e.FORBID_CONTENTS,mt)),Ye&&(Ne["#text"]=!0),Ue&&w(Ne,["html","head","body"]),Ne.table&&(w(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ae=e.TRUSTED_TYPES_POLICY,le=ae.createHTML("")}else void 0===ae&&(ae=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(i){return null}}(j,c)),null!==ae&&"string"==typeof le&&(le=ae.createHTML(""));i&&i(e),pt=e}},gt=w({},[...C,...x,...I]),Tt=w({},[...k,...M]),yt=function(e){f(o.removed,{element:e});try{ie(e).removeChild(e)}catch(t){V(e)}},Et=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(n){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(He||Fe)try{yt(t)}catch(n){}else try{t.setAttribute(e,"")}catch(n){}},At=function(e){let t=null,n=null;if(Pe)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===st&&nt===tt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=ae?ae.createHTML(e):e;if(nt===tt)try{t=(new Y).parseFromString(o,st)}catch(a){}if(!t||!t.documentElement){t=ce.createDocument(nt,"template",null);try{t.documentElement.innerHTML=ot?le:o}catch(a){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),nt===tt?me.call(t,Ue?"html":"body")[0]:Ue?t.documentElement:i},_t=function(e){return se.call(e.ownerDocument||e,e,
4
+ // eslint-disable-next-line no-bitwise
5
+ B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},St=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Nt=function(e){return"function"==typeof R&&e instanceof R};function bt(e,t,n){u(e,(e=>{e.call(o,t,n,pt)}))}const Rt=function(e){let t=null;if(bt(fe.beforeSanitizeElements,e,null),St(e))return yt(e),!0;const n=mt(e.nodeName);if(bt(fe.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),e.hasChildNodes()&&!Nt(e.firstElementChild)&&S(/<[/\w!]/g,e.innerHTML)&&S(/<[/\w!]/g,e.textContent))return yt(e),!0;if(e.nodeType===ee)return yt(e),!0;if(Me&&e.nodeType===te&&S(/<[/\w]/g,e.data))return yt(e),!0;if(!Ne[n]||ve[n]){if(!ve[n]&&Ot(n)){if(Oe.tagNameCheck instanceof RegExp&&S(Oe.tagNameCheck,n))return!1;if(Oe.tagNameCheck instanceof Function&&Oe.tagNameCheck(n))return!1}if(Ye&&!qe[n]){const t=ie(e)||e.parentNode,n=re(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,oe(e))}}}return yt(e),!0}return e instanceof O&&!function(e){let t=ie(e);t&&t.tagName||(t={namespaceURI:nt,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!rt[e.namespaceURI]&&(e.namespaceURI===et?t.namespaceURI===tt?"svg"===n:t.namespaceURI===Qe?"svg"===n&&("annotation-xml"===o||at[o]):Boolean(gt[n]):e.namespaceURI===Qe?t.namespaceURI===tt?"math"===n:t.namespaceURI===et?"math"===n&&lt[o]:Boolean(Tt[n]):e.namespaceURI===tt?!(t.namespaceURI===et&&!lt[o])&&!(t.namespaceURI===Qe&&!at[o])&&!Tt[n]&&(ct[n]||!gt[n]):!("application/xhtml+xml"!==st||!rt[e.namespaceURI]))}(e)?(yt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(ke&&e.nodeType===Q&&(t=e.textContent,u([de,he,ge],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),bt(fe.afterSanitizeElements,e,null),!1):(yt(e),!0)},wt=function(e,t,n){if(We&&("id"===t||"name"===t)&&(n in r||n in ft))return!1;if(Ce&&!De[t]&&S(Te,t));else if(Le&&S(ye,t));else if(!Re[t]||De[t]){if(
6
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
7
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
8
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
9
+ !(Ot(e)&&(Oe.tagNameCheck instanceof RegExp&&S(Oe.tagNameCheck,e)||Oe.tagNameCheck instanceof Function&&Oe.tagNameCheck(e))&&(Oe.attributeNameCheck instanceof RegExp&&S(Oe.attributeNameCheck,t)||Oe.attributeNameCheck instanceof Function&&Oe.attributeNameCheck(t))||// Alternative, second condition checks if it's an `is`-attribute, AND
10
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
11
+ "is"===t&&Oe.allowCustomizedBuiltInElements&&(Oe.tagNameCheck instanceof RegExp&&S(Oe.tagNameCheck,n)||Oe.tagNameCheck instanceof Function&&Oe.tagNameCheck(n))))return!1}else if(Ze[t]);else if(S(Se,y(n,Ae,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ke[e]){if(xe&&!S(Ee,y(n,Ae,"")));else if(n)return!1}else;return!0},Ot=function(e){return"annotation-xml"!==e&&T(e,_e)},vt=function(e){bt(fe.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||St(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Re,forceKeepAttr:void 0};let r=t.length;for(;r--;){const a=t[r],{name:l,namespaceURI:c,value:s}=a,m=mt(l);let f="value"===l?s:A(s);if(n.attrName=m,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,bt(fe.uponSanitizeAttribute,e,n),f=n.attrValue,!Ge||"id"!==m&&"name"!==m||(Et(l,e),f="user-content-"+f),Me&&S(/((--!?|])>)|<\/(style|title)/i,f)){Et(l,e);continue}if(n.forceKeepAttr)continue;if(Et(l,e),!n.keepAttr)continue;if(!Ie&&S(/\/>/i,f)){Et(l,e);continue}ke&&u([de,he,ge],(e=>{f=y(f,e," ")}));const d=mt(e.nodeName);if(wt(d,m,f)){if(ae&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(c);else switch(j.getAttributeType(d,m)){case"TrustedHTML":f=ae.createHTML(f);break;case"TrustedScriptURL":f=ae.createScriptURL(f)}try{c?e.setAttributeNS(c,l,f):e.setAttribute(l,f),St(e)?yt(e):p(o.removed)}catch(i){}}}bt(fe.afterSanitizeAttributes,e,null)},Dt=function e(t){let n=null;const o=_t(t);for(bt(fe.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)bt(fe.uponSanitizeShadowNode,n,null),Rt(n),vt(n),n.content instanceof s&&e(n.content);bt(fe.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(ot=!e,ot&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Nt(e)){if("function"!=typeof e.toString)throw N("toString is not a function");if("string"!=typeof(e=e.toString()))throw N("dirty is not a string, aborting")}if(!o.isSupported)return e;if(ze||ht(t),o.removed=[],"string"==typeof e&&(je=!1),je){if(e.nodeName){const t=mt(e.nodeName);if(!Ne[t]||ve[t])throw N("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof R)n=At("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!He&&!ke&&!Ue&&// eslint-disable-next-line unicorn/prefer-includes
12
+ -1===e.indexOf("<"))return ae&&Be?ae.createHTML(e):e;if(n=At(e),!n)return He?null:Be?le:""}n&&Pe&&yt(n.firstChild);const c=_t(je?e:n);for(;i=c.nextNode();)Rt(i),vt(i),i.content instanceof s&&Dt(i.content);if(je)return e;if(He){if(Fe)for(l=ue.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Re.shadowroot||Re.shadowrootmode)&&(l=pe.call(a,l,!0)),l}let m=Ue?n.outerHTML:n.innerHTML;return Ue&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),ke&&u([de,he,ge],(e=>{m=y(m,e," ")})),ae&&Be?ae.createHTML(m):m},o.setConfig=function(){ht(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ze=!0},o.clearConfig=function(){pt=null,ze=!1},o.isValidAttribute=function(e,t,n){pt||ht({});const o=mt(e),r=mt(t);return wt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(fe[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(fe[e],t);return-1===n?void 0:d(fe[e],n,1)[0]}return p(fe[e])},o.removeHooks=function(e){fe[e]=[]},o.removeAllHooks=function(){fe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();export{oe as p};
.output/public/assets/fetch-SJxNIU2V.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{q as t,m as e,t as n,j as o,n as s,b as a,e as i}from"./mermaid-render-f9KGMq_P.js";import{E as c}from"./eventsource-parser-D0ssca5s.js";import{d as r}from"./lodash-VDnThKtA.js";const l=t=>{t.text="",t.think="",t.files=[],t.images=[],t.webs=[]},d=t=>({text:t,think:"",files:[],images:[],webs:[]}),h=window.fetch,u=async(t,e)=>{if(t.toString().includes("/local/")){const t=(null==e?void 0:e.headers)||{},n={};return Object.entries(t).forEach((([t,e])=>{n[t.toLowerCase()]=e})),void JSON.parse(null==e?void 0:e.body.toString())}return await h(t,e)};function p(t,e="chat/completions",n="1"){if(!t)return t;let o=t.endsWith("/")?t.slice(0,-1):t;if(/\/v\d+\/(?!chat\/completions$)/.test(o))return o;const s=new RegExp(`/vd+/${e}$`),a=/\/v\d+\//.test(o);if(s.test(o))return o;if(/\/v\d+$/.test(o)){const t=o.match(/\/v(\d+)$/);if(t&&t[1])return t[1],`${o}/${e}`}else if(a){const t=o.match(/\/v(\d+)\//);if(t&&t[1]){const n=t[1];return`${o.split(`/v${n}/`)[0]}/v${n}/${e}`}}return`${o}/v${n}/${e}`}function m(t,e){return t.startsWith("/app/")?g()+t:e?p(t):t}function g(){const t=a().remoteHost;if(t&&t.startsWith("http"))return t;const e=window.location.origin;return window.isElectron||e.includes("localhost")?`http://localhost:${window.serverPort||3e3}`:e}function f(t){switch(function(t){const e=t.replace(/^data:image\/\w+;base64,/,"");try{const t=atob(e.slice(0,16));return 255===t.charCodeAt(0)&&216===t.charCodeAt(1)?"jpeg":"‰PNG\r\n\n"===t.slice(0,8)?"png":"GIF87a"===t.slice(0,6)||"GIF89a"===t.slice(0,6)?"gif":"BM"===t.slice(0,2)?"bmp":"unknown"}catch(n){return"unknown"}}(t=t.trim())){case"jpeg":return`data:image/jpeg;base64,${t}`;case"png":return`data:image/png;base64,${t}`;case"gif":return`data:image/gif;base64,${t}`;case"bmp":return`data:image/bmp;base64,${t}`;default:throw new Error("无法识别的图片类型")}}async function w(t,a,i){var c,l;let h=(t,e=!1)=>{};try{const p=a.chat.chats[a.chat.chats.length-1],g=r(((t,e)=>{e?p.content.think=t:p.content.text=t}),100,{maxWait:500});h=(t,e=!1)=>{g(t,e)};const w=t=>{g.cancel(),p.content.text=t},x=t=>{g.cancel(),p.content.images=t},$=e.dict[a.model.type];if(!$)return void h(n("pages.setting.model.model_provider_not_exist"));const k=[];k.push({role:"system",content:d(t.content),id:"",liked:!1,model:""});const b=a.chat.chats.slice(a.chat.startContext).filter((t=>"verbose"!==t.role)),j=2*Math.max(t.maxContextSize,1),S=Math.min(j,b.length);for(let t=b.length-S;t<b.length;t++){const e=b[t];k.push(e)}let C;k.pop(),C=$.onMessage?$.onMessage(t,a,k):k.map((t=>({role:t.role,content:{text:t.content.text,files:t.content.files,images:t.content.images}}))),a.model.prompt&&(C[C.length-1].content.text=`${a.model.prompt}\n${C[C.length-1].content.text}`),i&&(C[C.length-1].content.text=`\n 使用提供的网络搜索结果,对给定的查询写一个全面的回复。\n 如果提供的搜索结果涉及多个同名主题,请为每个主题分别写答案。\n\n 网络搜索json结果:\n """\n ${i}\n """\n\n 查询:\n """\n ${C[C.length-1].content.text}\n """\n `);for(let t=0;t<C.length;t++){const e=C[t];let n=e.content.text;if((null==(c=e.content.files)?void 0:c.length)>0)for(let t=0;t<e.content.files.length;t++){const o=e.content.files[t];n+=`\n${o.name}\n${o.content||o.url}`}if((null==(l=e.content.images)?void 0:l.length)>0){const t=e.content.images.length,o=[{type:"text",text:n}];for(let n=0;n<t;n++){const t=e.content.images[n];o.push({type:"image_url",image_url:{url:t.content||t.url}})}e.content=o}else e.content=n}const M={model:a.model.apiModel,stream:a.model.stream||!1,temperature:a.model.temperature||s,max_tokens:a.model.maxTokens||o,messages:C},O={Accept:"*/*",Connection:"keep-alive","Accept-Encoding":"gzip, deflate, br","content-type":"application/json",Authorization:`Bearer ${y(a.model)}`};let _=m(a.model.apiBase||$.apiBase,"openai"==a.model.type);(function(t){return t.includes("localhost")||t.includes("/app/")||t.includes("/openapi/")})(_)&&(M.meta={apiAgentId:a.chat.apiAgentId,apiConversationId:a.chat.apiConversationId,aspectRatio:t.aspectRatio,data:{}}),$.onChat&&await $.onChat(t,a,M,O);const A=await u(_,{method:"POST",headers:O,body:JSON.stringify(M)});if(!A.ok){const t=A.headers.get("content-type");if(t)if(null==t?void 0:t.includes("application/json")){const t=await A.json();h(JSON.stringify(t))}else{h(await A.text()||A.statusText)}else h(A.statusText);return}a.chat.status.responseWating=!1;let N="",I="";if(function(t){const e=t.headers.get("Content-Type");if(null==e?void 0:e.includes("text/event-stream"))return!0;return!1}(A)){const t=await v(A,h,(()=>a.chat.status.stop),w);N=t.id,I=t.model}else{if(!A.ok)return void(w&&w(await A.text()));const t=await A.json();t.data?x&&x(t.data.map((t=>({model:a.model.apiModel,type:"base64",content:f(t.b64_json)})))):"chat.images"==t.object?x&&x(t.choices):t.choices?w&&w(t.choices[0].message.content):w&&w(await A.text()),N=t.id,I=t.model}a.chat.chats[a.chat.chats.length-1].id=N,a.chat.chats[a.chat.chats.length-1].model=I||e.getModelItemModel(a.model)}catch(p){h(`${p.message}`)}finally{a.chat.status.chating=!1,a.chat.status.stop=!1,a.chat.status.responseWating=!1}}function y(t){if(t.keys&&t.keys.length>0){const e=t.keys.filter((t=>t.enabled));if(e.length>0)return e[Math.floor(Math.random()*e.length)].key}return t.apiKey}async function v(t,e,n=null,o=null){const s=t.body.pipeThrough(new TextDecoderStream).pipeThrough(new c).getReader();let a="",i="",r="",l=!1,d=!1;for(;;)try{const{value:t,done:c}=await s.read();if(c||n&&n()||"[DONE]"===t.data){o&&o(a);break}if(!t)continue;const h=JSON.parse(t.data);if(!h.choices||0===h.choices.length)continue;i=h.id,r=h.model;const u=h.choices[0].delta;if(!u)continue;const p=u.content||u.reasoning_content;if(!p)continue;if(p.includes("<think>")){d=!0;continue}if(p.includes("</think>")){d=!1;continue}d&&(u.type="thinking"),"thinking"==u.type||u.reasoning_content?l||(l=!0):l&&(a="",l=!1),a+=p,e(a,l)}catch(h){throw h}return{id:i,model:r}}const x=async(t,e,n=null)=>{const o=a(),s=i().find(o.assistModel);return new Promise(((n,o)=>{let a="";k(s,t,((t,e)=>{e||(a=t)}),(()=>!1)).then((()=>{e&&e(a),n(a)})).catch((t=>{o(t)}))}))},$=async(t,e,n=null)=>{const o=a(),s=i().find(o.assistModel);await k(s,t,e,n)},k=async(t,o,a,i=null)=>{try{const c=e.dict[t.type];if(!c)return void a(n("pages.setting.model.model_provider_not_exist"));const r={model:t.apiModel,stream:!0,temperature:s,messages:[{role:"user",content:o}]},l=m(t.apiBase||c.apiBase,"openai"==t.type),d=await u(l,{method:"POST",headers:{Accept:"*/*",Connection:"keep-alive","Accept-Encoding":"gzip, deflate, br","content-type":"application/json",Authorization:`Bearer ${y(t)}`},body:JSON.stringify(r)});if(!d.ok){const t=d.headers.get("content-type");if(t)if(null==t?void 0:t.includes("application/json")){const t=await d.json();a(JSON.stringify(t))}else{a(await d.text())}else a(d.statusText);return}await v(d,a,i)}catch(c){a(`${c.message}`)}},b=async e=>{try{let n=null;const o=g(),s=/(https?:\/\/[^\s]+)/g,a=e.match(s)||[];if(a.length>0)n={urls:a,keywords:[]};else{const t=(await x(`\n 你是一个专门用于提取搜索关键词的AI助手。你的任务是从用户的查询中提取最重要的关键词或短语,这些关键词将被用于执行网络搜索。。\n\n 请注意:\n 1. 提取3-10个最相关和重要的关键词或短语。\n 2. 关键词应该简洁明了,避免提取常见词或无意义词\n 3. 如果查询涉及时间范围,请包含相关的时间信息。\n 4. 如果查询中包含人名、地名、专有名词或技术术语,优先提取这些\n 5. 如果有网址,将网址作为一个关键词返回\n 6. 以JSON格式返回结果,包含两个字段:"urls"(数组)和"keywords"(数组),且不要包含任何其他文字。\n 用户查询: ${e}\n\n 请以下面的JSON格式返回结果:\n {\n "urls": [],\n "keywords": []\n }\n `,null)).match(/\{[\s\S]*\}/);if(t.length<=0)throw new Error("未找到关键词");n=JSON.parse(t[0])}if(n.keywords.length>0){const t=await u(`${o}/search?service=google&&results=10&&q=${encodeURIComponent(n.keywords.join(","))}`),e=await t.json();for(let o=0;o<e.length;o++){const t=e[o],s=j(t.link);if(s){n.urls.some((t=>j(t)===s))||n.urls.push(t.link)}}}performance.now();let i=n.urls;i=i.map((t=>o+"/crawler?url="+encodeURIComponent(t)));const c=await t(i,8192/i.length,2e3);performance.now();return c}catch(n){}return[]};function j(t){try{const e=new URL(t).hostname;return e.split(".").slice(-2).join(".")}catch(e){return null}}export{d as a,x as b,w as c,g as d,k as e,$ as f,m as g,p as n,l as r,b as s};
.output/public/assets/help-BZX2GmDP.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{F as s}from"./FrameContent-CMuBQUlq.js";import{d as t}from"./fetch-SJxNIU2V.js";import{l as r,a as o,J as i,y as m}from"./@vue-CfxotJ-S.js";import"./@vueuse-B4dz7nOv.js";import"./lodash-VDnThKtA.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./mermaid-render-f9KGMq_P.js";import"./mermaid-CFwXVJJh.js";import"./@mermaid-js-C9iCgeAb.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./lodash-es-RhymR7yg.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./ts-dedent-CttZBlkd.js";import"./d3-transition-0ltv4da8.js";import"./d3-timer-keMr1twq.js";import"./d3-dispatch-Chq_f_hl.js";import"./d3-interpolate-Ct9kki6l.js";import"./d3-color-D5ULnJIe.js";import"./d3-selection-Oxnq6l6A.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-Dz8HuW59.js";import"./dompurify-DRcrZKbd.js";import"./stylis-Cl7w7uv3.js";import"./dagre-d3-es-D8JeTxsO.js";import"./@braintree-BB7t-Iuh.js";import"./khroma-C2oHPU0S.js";import"./dayjs-Cbdj87rt.js";import"./d3-scale-CdkN4P7M.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-BhN1wQGI.js";import"./d3-format-C0lSXcPg.js";import"./d3-time-format-DB2uBv1t.js";import"./d3-time-B1kAM736.js";import"./d3-axis-pCwzqJ1S.js";import"./d3-shape-C6CU9yox.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-Bkc4UHOn.js";import"./cytoscape-BsbaL92W.js";import"./cytoscape-cose-bilkent-CcQu5e-H.js";import"./cose-base-kQthUiMK.js";import"./layout-base-DqRk0Tgc.js";import"./d3-sankey-B6tQBass.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./@iconify-BUO7KvjM.js";import"./marked-CrLTNeyQ.js";import"./cytoscape-fcose-B58q80h4.js";import"./pinia-gf2247cH.js";import"./pinia-plugin-persistedstate-CxGPmdL5.js";import"./destr-WfmzGWA8.js";import"./deep-pick-omit-DP_A4OSP.js";import"./tdesign-vue-next-BiEwLJDx.js";import"./tdesign-icons-vue-next-Bre5yOVt.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./vue-i18n-BLIfPQxk.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./eventsource-parser-D0ssca5s.js";const e=r({__name:"help",setup(r){const e=o(`${t()}/docs/index.html?t=${(new Date).getTime()}`);return(t,r)=>(m(),i(s,{frameSrc:e.value},null,8,["frameSrc"]))}});export{e as default};
.output/public/assets/highlight.js-BgdnSEsd.js ADDED
The diff for this file is too large to render. See raw diff
 
.output/public/assets/index-BBncn3uI.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ import{r as e,q as a,c as t,R as l,J as o,N as s,w as n,p as r,b as u,e as i,j as d,m,u as c,O as p,A as v,n as g,U as f,P as h,x as y,f as _}from"./tdesign-vue-next-BiEwLJDx.js";import{l as b,f as j,v as V,y as w,R as x,a9 as $,F as U,A as k,B as F,a as T,o as z,j as C,z as M,H as B,aa as A,J as S,ac as H,u as O,G as R}from"./@vue-CfxotJ-S.js";import{D,_ as E,b as I,u as N,t as L,S as P,e as K,c as q,m as J,h as X}from"./mermaid-render-f9KGMq_P.js";import{u as G,a as W,b as Q}from"./main-apEI6pT3.js";import{_ as Y}from"./avatar.vue_vue_type_script_setup_true_lang-IaazOHzd.js";import{b as Z}from"./@vueuse-B4dz7nOv.js";import{d as ee}from"./fetch-SJxNIU2V.js";import{d as ae}from"./vuedraggable-DAEPkKhD.js";import{a9 as te,aa as le,c as oe}from"./tdesign-icons-vue-next-Bre5yOVt.js";import"./lodash-es-RhymR7yg.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./mermaid-CFwXVJJh.js";import"./@mermaid-js-C9iCgeAb.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./ts-dedent-CttZBlkd.js";import"./d3-transition-0ltv4da8.js";import"./d3-timer-keMr1twq.js";import"./d3-dispatch-Chq_f_hl.js";import"./d3-interpolate-Ct9kki6l.js";import"./d3-color-D5ULnJIe.js";import"./d3-selection-Oxnq6l6A.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-Dz8HuW59.js";import"./dompurify-DRcrZKbd.js";import"./stylis-Cl7w7uv3.js";import"./dagre-d3-es-D8JeTxsO.js";import"./@braintree-BB7t-Iuh.js";import"./khroma-C2oHPU0S.js";import"./dayjs-Cbdj87rt.js";import"./d3-scale-CdkN4P7M.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-BhN1wQGI.js";import"./d3-format-C0lSXcPg.js";import"./d3-time-format-DB2uBv1t.js";import"./d3-time-B1kAM736.js";import"./d3-axis-pCwzqJ1S.js";import"./d3-shape-C6CU9yox.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-Bkc4UHOn.js";import"./cytoscape-BsbaL92W.js";import"./cytoscape-cose-bilkent-CcQu5e-H.js";import"./cose-base-kQthUiMK.js";import"./layout-base-DqRk0Tgc.js";import"./d3-sankey-B6tQBass.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./@iconify-BUO7KvjM.js";import"./marked-CrLTNeyQ.js";import"./cytoscape-fcose-B58q80h4.js";import"./pinia-gf2247cH.js";import"./pinia-plugin-persistedstate-CxGPmdL5.js";import"./destr-WfmzGWA8.js";import"./deep-pick-omit-DP_A4OSP.js";import"./lodash-VDnThKtA.js";import"./vue-i18n-BLIfPQxk.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./vue-router-DKqWD4MR.js";import"./vue-BIpqWpgL.js";import"./@dicebear-JcnEMRoc.js";import"./uuid-_R2nDvl_.js";import"./eventsource-parser-D0ssca5s.js";const se=b({__name:"CloudflareKVHTTPDriverForm",props:["modelValue"],emits:["update:modelValue"],setup(t,{emit:l}){const o=t,s=l,n=j({get:()=>o.modelValue,set:e=>s("update:modelValue",e)}),r=e=>{s("update:modelValue",{...n.value})};return(t,l)=>{const o=e,s=a;return w(),V(U,null,[x(s,{label:"API Base",name:"apiBase","initial-data":""},{default:$((()=>[x(o,{placeholder:"",modelValue:n.value.apiURL,"onUpdate:modelValue":l[0]||(l[0]=e=>n.value.apiURL=e),onChange:r},null,8,["modelValue"])])),_:1}),x(s,{label:"Account",name:"accountId","initial-data":""},{default:$((()=>[x(o,{placeholder:"",modelValue:n.value.accountId,"onUpdate:modelValue":l[1]||(l[1]=e=>n.value.accountId=e),onChange:r},null,8,["modelValue"])])),_:1}),x(s,{label:"Namespace",name:"namespaceId","initial-data":""},{default:$((()=>[x(o,{placeholder:"",modelValue:n.value.namespaceId,"onUpdate:modelValue":l[2]||(l[2]=e=>n.value.namespaceId=e),onChange:r},null,8,["modelValue"])])),_:1}),x(s,{label:"API Token",name:"apiToken","initial-data":""},{default:$((()=>[x(o,{type:"password",placeholder:"",modelValue:n.value.apiToken,"onUpdate:modelValue":l[3]||(l[3]=e=>n.value.apiToken=e),onChange:r},null,8,["modelValue"])])),_:1})],64)}}}),ne=Object.defineProperty({__proto__:null,default:se,driverConfig:{name:"cloudflareKVHTTP",component:"CloudflareKVHTTPDriverForm"}},Symbol.toStringTag,{value:"Module"}),re={xmlns:"http://www.w3.org/2000/svg",width:"88",height:"48",fill:"none"};const ue={render:function(e,a){return w(),V("svg",re,a[0]||(a[0]=[k("path",{fill:"var(--td-component-border)",d:"M0 0h88v48H0z"},null,-1),k("path",{fill:"var(--td-text-color-primary)",d:"M42.863 14.052v2.708h1.625v-2.708z"},null,-1),k("path",{fill:"var(--td-text-color-primary)","fill-rule":"evenodd",d:"M38.349 23.982a5.326 5.326 0 1 1 10.653 0 5.326 5.326 0 0 1-10.653 0m5.326-3.701a3.701 3.701 0 1 0 0 7.403 3.701 3.701 0 0 0 0-7.403M52.208 26.781h-2.621l-2.06 6.699 1.552.478.511-1.661h2.614l.511 1.66 1.554-.477zm-.503 3.89-.697-2.265h-.221l-.697 2.266z","clip-rule":"evenodd"},null,-1),k("path",{fill:"var(--td-text-color-primary)",d:"m48.208 18.3 1.915-1.914 1.149 1.15-1.915 1.914zM53.606 23.17h-2.709v1.625h2.709zM44.488 31.205v2.708h-1.625v-2.708zM37.228 31.579l1.915-1.915-1.15-1.15-1.914 1.916zM36.453 24.795h-2.708V23.17h2.708zM36.079 17.535l1.915 1.915 1.149-1.15-1.915-1.914z"},null,-1)]))}},ie={xmlns:"http://www.w3.org/2000/svg",width:"88",height:"48",fill:"none"};const de={render:function(e,a){return w(),V("svg",ie,a[0]||(a[0]=[k("path",{fill:"#13161B",d:"M0 0h88v48H0z"},null,-1),k("path",{fill:"#949EAA","fill-rule":"evenodd",d:"M52.533 26.87q-.748.129-1.533.13a9 9 0 0 1-8.533-11.87A9 9 0 0 0 44 33a9 9 0 0 0 8.533-6.13","clip-rule":"evenodd"},null,-1)]))}},me={xmlns:"http://www.w3.org/2000/svg",width:"88",height:"48",fill:"none"};const ce={render:function(e,a){return w(),V("svg",me,a[0]||(a[0]=[k("path",{fill:"var(--td-component-border)",d:"M0 0h88v48H0z"},null,-1),k("path",{fill:"var(--td-text-color-primary)","fill-rule":"evenodd",d:"M44 20.583a3.417 3.417 0 1 0 0 6.833 3.417 3.417 0 0 0 0-6.833M39.083 24a4.917 4.917 0 1 1 9.834 0 4.917 4.917 0 0 1-9.834 0M43.25 17.333v-2.5h1.5v2.5zM48.184 18.755l1.767-1.767 1.06 1.06-1.767 1.768zM50.667 23.25h2.5v1.5h-2.5zM49.244 28.184l1.768 1.767-1.06 1.06-1.768-1.767zM44.75 30.666v2.5h-1.5v-2.5zM39.816 29.244l-1.767 1.768-1.061-1.061 1.767-1.768zM37.333 24.75h-2.5v-1.5h2.5zM38.756 19.816l-1.768-1.768 1.06-1.06 1.768 1.767z","clip-rule":"evenodd"},null,-1)]))}},pe=E(b({__name:"index",props:{value:{type:String}},setup(e){const a=e,t=j((()=>{const{value:e}=a;return{background:D.indexOf(e)>-1?e:"conic-gradient(from 90deg at 50% 50%, #FF0000 -19.41deg, #FF0000 18.76deg, #FF8A00 59.32deg, #FFE600 99.87deg, #14FF00 141.65deg, #00A3FF 177.72deg, #0500FF 220.23deg, #AD00FF 260.13deg, #FF00C7 300.69deg, #FF0000 340.59deg, #FF0000 378.76deg)"}}));return(e,a)=>(w(),V("div",{style:F(t.value),class:"color-container"},null,4))}}),[["__scopeId","data-v-f0f6ec52"]]),ve={class:"setting-container"},ge={class:"setting-group-title"},fe={style:{textAlign:"center",marginTop:"8px"}},he={class:"setting-group-title"},ye={class:"setting-layout-drawer"},_e={key:0,class:"setting-info mt-10"},be=b({__name:"appearance",setup(e){I();const d=N(),m=[
2
+ //@ts-ignore
3
+ {type:"light",text:L("pages.setting.theme.options.light")},{type:"dark",text:L("pages.setting.theme.options.dark")},{type:"auto",text:L("pages.setting.theme.options.auto")}],c=j((()=>-1===D.indexOf(p.value.brandTheme)?p.value.brandTheme:"")),p=T({...(()=>{const e=P;for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(e[a]=d[a]);return e})()}),v=T(!1),g=e=>{p.value.brandTheme=e};z((()=>{var e;null==(e=document.querySelector(".dynamic-color-btn"))||e.addEventListener("click",(()=>{v.value=!0}))}));const f=(e,a)=>{e||"document"!==a.trigger||(v.value=e)},h=()=>{const e=JSON.stringify(p.value,null,4),{copy:a}=Z({source:e});a().then((()=>{i.closeAll(),i.success(L("pages.setting.copy.success"))})).catch((()=>{i.closeAll(),i.error(L("pages.setting.copy.fail"))}))};return C((()=>{p.value.brandTheme&&d.updateConfig(p.value)})),(e,i)=>{const d=l,y=t,_=s,b=o,j=n,F=a,T=r,z=u;return w(),V("div",ve,[x(T,{ref:"form",data:p.value,"label-align":"left"},{default:$((()=>[k("div",ge,B(e.$t("pages.setting.theme.mode")),1),x(y,{modelValue:p.value.mode,"onUpdate:modelValue":i[0]||(i[0]=e=>p.value.mode=e)},{default:$((()=>[(w(),V(U,null,A(m,((e,a)=>k("div",{key:a,class:"setting-layout-drawer"},[k("div",null,[(w(),S(d,{key:a,value:e.type},{default:$((()=>{return[(w(),S(H((a=e.type,"light"===a?ce:"dark"===a?de:ue))))];var a})),_:2},1032,["value"])),k("p",fe,B(e.text),1)])]))),64))])),_:1},8,["modelValue"]),k("div",he,B(e.$t("pages.setting.theme.color")),1),x(y,{modelValue:p.value.brandTheme,"onUpdate:modelValue":i[1]||(i[1]=e=>p.value.brandTheme=e)},{default:$((()=>[(w(!0),V(U,null,A(O(D),((e,a)=>(w(),V("div",{key:a,class:"setting-layout-drawer"},[(w(),S(d,{key:a,value:e,class:"setting-layout-color-group"},{default:$((()=>[x(pe,{value:e},null,8,["value"])])),_:2},1032,["value"]))])))),128)),k("div",ye,[x(b,{"destroy-on-close":"","expand-animation":"",placement:"bottom-right",trigger:"click",visible:v.value,"overlay-style":{padding:0},onVisibleChange:f},{content:$((()=>[x(_,{"on-change":g,"color-modes":["monochrome"],format:"HEX","swatch-colors":[]})])),default:$((()=>[x(d,{value:c.value,class:"setting-layout-color-group dynamic-color-btn"},{default:$((()=>[x(pe,{value:c.value},null,8,["value"])])),_:1},8,["value"])])),_:1},8,["visible"])])])),_:1},8,["modelValue"]),k("div",null,[x(F,{label:e.$t("pages.setting.element.showHeader"),name:"showHeader"},{default:$((()=>[x(j,{modelValue:p.value.showHeader,"onUpdate:modelValue":i[2]||(i[2]=e=>p.value.showHeader=e)},null,8,["modelValue"])])),_:1},8,["label"]),x(F,{label:e.$t("pages.setting.element.showNav"),name:"showNav"},{default:$((()=>[x(j,{modelValue:p.value.showNav,"onUpdate:modelValue":i[3]||(i[3]=e=>p.value.showNav=e)},null,8,["modelValue"])])),_:1},8,["label"]),x(F,{label:e.$t("pages.setting.element.showBreadcrumb"),name:"showBreadcrumb"},{default:$((()=>[x(j,{modelValue:p.value.showBreadcrumb,"onUpdate:modelValue":i[4]||(i[4]=e=>p.value.showBreadcrumb=e)},null,8,["modelValue"])])),_:1},8,["label"]),x(F,{label:e.$t("pages.setting.element.showFooter"),name:"showFooter"},{default:$((()=>[x(j,{modelValue:p.value.showFooter,"onUpdate:modelValue":i[5]||(i[5]=e=>p.value.showFooter=e)},null,8,["modelValue"])])),_:1},8,["label"])])])),_:1},8,["data"]),O(false)?(w(),V("div",_e,[k("p",null,B(e.$t("pages.setting.tips")),1),x(z,{theme:"primary",variant:"text",onClick:h},{default:$((()=>[R(B(e.$t("pages.setting.copy.title")),1)])),_:1})])):M("",!0),i[6]||(i[6]=k("div",{class:"text-center text-gray-400"},"4/4/2025, 7:25:53 AM",-1))])}}}),je={class:"flex justify-center"},Ve={class:"font-bold text-xl mb-5"},we={class:"flex"},xe={class:"font-bold text-xl mb-5"},$e={class:"flex flex-col gap-5"},Ue={class:"flex justify-between"},ke={class:"font-bold text-xl"},Fe={class:"flex flex-col gap-5 w-full overflow-hidden"},Te={class:"font-bold text-xl mb-5"},ze=E(b({name:"User",setup(t){const l=K(),o=I(),s=G(),b=N(),F=q(),z=W(),C=async e=>{try{const a=await async function(e){return new Promise(((a,t)=>{const l=new FileReader;l.onload=function(e){a(e.target.result)},l.onerror=function(e){t(e)},l.readAsText(e)}))}(e.raw);return D(JSON.parse(a)),i.success({content:L("pages.setting.user.import_success")}),{status:"success",error:"",response:{url:" "}}}catch{return i.error({content:L("pages.setting.user.import_failed")}),{status:"fail",error:"",response:{}}}};const D=e=>{var a;if(e.user&&o.$patch(e.user),e.model&&l.$patch(e.model),e.agent&&s.$patch(e.agent),e.setting&&b.$patch(e.setting),e.conversation){const a=function(e,a=640){return e.map((e=>({...e,models:e.models.map((e=>{try{const t=JSON.stringify(e.chats);return(new TextEncoder).encode(t).length/1024>a?{...e,chats:[]}:e}catch{return{...e,chats:[]}}}))})))}(e.conversation.list);F.$patch({...e.conversation,list:a})}e.note&&z.$patch(e.note),(null==(a=e.user)?void 0:a.lang)&&Z(e.user.lang)};function E(){const e=JSON.stringify({user:o.$state,model:l.$state,agent:s.$state,setting:b.$state,conversation:F.$state,note:z.$state},null,2),a=new Blob([e],{type:"application/json"}),t=document.createElement("a");t.href=URL.createObjectURL(a),t.download="config.json",document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(t.href)}const P=window.isElectron,{changeLocale:Z,locale:se}=Q(),re=j({get:()=>se.value,set(e){Z(e)}}),ue=e=>{o.avatar=e};function ie(e,a){const t=a.e,l=t.key,s=[t.ctrlKey?"Ctrl":"",t.metaKey?"Cmd":"",t.altKey?"Alt":"",t.shiftKey?"Shift":""].filter(Boolean).join("+");o.shortcut=`${s}+${l.toUpperCase()}`,t.preventDefault()}const de=j((()=>J.availableModels.value.map((e=>({value:e.id,label:J.getModelItemTitle(e),...e}))))),me=()=>{o.toolBarButtons.push({name:"",icon:null,prompt:"",show:!0})},ce=Object.assign({"./drivers/CloudflareKVHTTPDriverForm.vue":ne}),pe=Object.values(ce).map((e=>e.driverConfig)),ve=j((()=>b.drivers.currentDriver)),ge=j((()=>b.drivers)),fe=j((()=>b.version)),he=j((()=>{const e=pe.find((e=>e.name===ve.value));return e?ce[`./drivers/${e.component}.vue`].default:null})),ye=async e=>{b.updateDriverSettings(e,ge.value[e])};async function _e(e){b.updateDriverSettings(ve.value,e)}const ze=T(!1),Ce=T(!1),Me=T(!1),Be=T(null),Ae=j((()=>{var e;return null==(e=Be.value)?void 0:e.setting.version}));async function Se(){try{if(ze.value=!0,Be.value=await De(),Be.value){new Date(Ae.value)>=new Date(fe.value)||!fe.value?Me.value=!0:(await Ee(),i.success("备份成功"))}else await Ee(),i.success("备份成功")}catch(e){i.error("备份失败: "+e.message)}finally{ze.value=!1}}async function He(){try{Ce.value=!0;const e=await De();if(!e)throw new Error("未找到远程数据");D(e),i.success("恢复成功")}catch(e){i.error("恢复失败: "+e.message)}finally{Ce.value=!1}}async function Oe(){try{ze.value=!0,await Ee(),i.success("备份成功")}catch(e){i.error("备份失败: "+e.message)}finally{Me.value=!1,ze.value=!1}}async function Re(){if(Be.value)try{Ce.value=!0,D(Be.value),i.success("数据已成功恢复")}catch(e){i.error("恢复失败: "+e.message)}finally{Me.value=!1,Ce.value=!1}}const De=async()=>{try{const e=new URLSearchParams({driver:ve.value,config:JSON.stringify(ge.value[ve.value])}),a=await fetch(`${ee()}/config?${e.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!a.ok)throw new Error(await a.text());return(await a.json()).data}catch(e){throw e}};async function Ee(){try{b.version=(new Date).toISOString();const e={user:o.$state,model:l.$state,agent:s.$state,setting:b.$state,conversation:F.$state,note:z.$state},a=await fetch(ee()+"/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:e,driver:ve.value,config:ge.value[ve.value]})});if(!a.ok)throw new Error(await a.text())}catch(e){throw e}}return(t,l)=>{const s=e,i=a,b=m,j=p,F=c,T=v,z=g,D=d,I=u,N=f,L=r,K=n,q=h,G=y,W=_;return w(),S(W,{shadow:"",class:"overflow-hidden",bordered:!1},{default:$((()=>[x(L,{ref:"form",class:"flex flex-col gap-8","label-align":"top"},{default:$((()=>[k("div",je,[x(Y,{ref:"avatarRef",url:O(o).avatar,onUpdate:ue},null,8,["url"])]),k("div",null,[k("h1",Ve,B(t.$t("pages.setting.user.basic_settings")),1),x(D,{class:"row-gap",gutter:[32,24]},{default:$((()=>[x(b,{xs:12,lg:6},{default:$((()=>[x(i,{label:t.$t("pages.setting.user.username"),name:"name"},{default:$((()=>[x(s,{modelValue:O(o).name,"onUpdate:modelValue":l[0]||(l[0]=e=>O(o).name=e),placeholder:t.$t("pages.setting.user.enter_username")},null,8,["modelValue","placeholder"])])),_:1},8,["label"])])),_:1}),x(b,{xs:12,lg:6},{default:$((()=>[x(i,{label:t.$t("pages.setting.user.language"),name:"lang"},{default:$((()=>[x(F,{modelValue:re.value,"onUpdate:modelValue":l[1]||(l[1]=e=>re.value=e),class:"demo-select-base",clearable:""},{default:$((()=>[(w(!0),V(U,null,A(O(X),((e,a)=>(w(),S(j,{key:a,value:`${e.value}`,label:`${e.content}`},{default:$((()=>[R(B(e.content),1)])),_:2},1032,["value","label"])))),128))])),_:1},8,["modelValue"])])),_:1},8,["label"])])),_:1}),O(P)?(w(),S(b,{key:0,xs:12,lg:6},{default:$((()=>[x(i,{label:t.$t("pages.setting.user.shortcut"),name:"shortcut"},{default:$((()=>[x(s,{onKeydown:ie,modelValue:O(o).shortcut,"onUpdate:modelValue":l[2]||(l[2]=e=>O(o).shortcut=e),placeholder:t.$t("pages.setting.user.enter_shortcut")},null,8,["modelValue","placeholder"])])),_:1},8,["label"])])),_:1})):M("",!0),x(b,{xs:12,lg:6},{default:$((()=>[x(i,{label:t.$t("pages.setting.user.assist_model"),name:"assistModel"},{default:$((()=>[x(F,{modelValue:O(o).assistModel,"onUpdate:modelValue":l[3]||(l[3]=e=>O(o).assistModel=e),tips:t.$t("pages.setting.user.assist_model_tips"),filterable:""},{default:$((()=>[(w(!0),V(U,null,A(de.value,(e=>(w(),S(j,{key:e.value,value:e.value,label:e.label},{default:$((()=>[k("div",we,[x(T,{size:"20px",class:"mr-1"},{icon:$((()=>[(w(),S(H(O(J).icons[e.type])))])),_:2},1024),R(" "+B(e.label),1)])])),_:2},1032,["value","label"])))),128))])),_:1},8,["modelValue","tips"])])),_:1},8,["label"])])),_:1}),x(b,{xs:12,lg:6},{default:$((()=>[x(i,{label:t.$t("pages.setting.user.remoteHost"),name:"remoteHost"},{default:$((()=>[x(s,{modelValue:O(o).remoteHost,"onUpdate:modelValue":l[4]||(l[4]=e=>O(o).remoteHost=e)},null,8,["modelValue"])])),_:1},8,["label"])])),_:1}),O(P)?(w(),S(b,{key:1,span:6},{default:$((()=>[x(i,{label:t.$t("pages.setting.user.open_at_login"),name:"openAtLogin"},{default:$((()=>[x(z,{modelValue:O(o).openAtLogin,"onUpdate:modelValue":l[5]||(l[5]=e=>O(o).openAtLogin=e)},null,8,["modelValue"])])),_:1},8,["label"])])),_:1})):M("",!0),O(P)?(w(),S(b,{key:2,span:6},{default:$((()=>[x(i,{label:t.$t("pages.setting.user.minimize_to_bottom_right"),name:"minimizeToBottomRight"},{default:$((()=>[x(z,{modelValue:O(o).minimizeToBottomRight,"onUpdate:modelValue":l[6]||(l[6]=e=>O(o).minimizeToBottomRight=e)},null,8,["modelValue"])])),_:1},8,["label"])])),_:1})):M("",!0)])),_:1})]),k("div",null,[k("h1",xe,B(t.$t("pages.setting.user.import_config")),1),x(L,null,{default:$((()=>[x(i,{label:"存储类型",name:"driverType","initial-data":""},{default:$((()=>[x(F,{modelValue:ve.value,"onUpdate:modelValue":l[7]||(l[7]=e=>ve.value=e),onChange:ye,placeholder:"Select Driver"},{default:$((()=>[(w(!0),V(U,null,A(O(pe),(e=>(w(),S(j,{key:e.name,value:e.name,label:e.name},null,8,["value","label"])))),128))])),_:1},8,["modelValue"])])),_:1}),(w(),S(H(he.value),{modelValue:ge.value[ve.value],"onUpdate:modelValue":[l[8]||(l[8]=e=>ge.value[ve.value]=e),_e]},null,8,["modelValue"])),x(D,{class:"row-gap",gutter:[24,24]},{default:$((()=>[x(b,{xs:6,lg:3,class:"flex justify-center"},{default:$((()=>[x(I,{onClick:Se,loading:ze.value},{default:$((()=>l[11]||(l[11]=[R("备份到服务器")]))),_:1},8,["loading"])])),_:1}),x(b,{xs:6,lg:3,class:"flex justify-center"},{default:$((()=>[x(I,{onClick:He,loading:Ce.value},{default:$((()=>l[12]||(l[12]=[R("从服务器恢复")]))),_:1},8,["loading"])])),_:1}),x(b,{xs:6,lg:3,class:"flex justify-center"},{default:$((()=>[x(N,{theme:"custom","request-method":C,multiple:!1},{default:$((()=>[x(I,{theme:"primary"},{default:$((()=>[R(B(t.$t("pages.setting.user.import_local_config")),1)])),_:1})])),_:1})])),_:1}),x(b,{xs:6,lg:3,class:"flex justify-center"},{default:$((()=>[x(I,{theme:"primary",onClick:E},{default:$((()=>[R(B(t.$t("pages.setting.user.export_local_config")),1)])),_:1})])),_:1})])),_:1})])),_:1})]),k("div",$e,[k("div",Ue,[k("h1",ke,B(t.$t("pages.setting.user.toolbar_settings")),1),x(I,{shape:"square",variant:"text",onClick:me},{default:$((()=>[x(O(te),{slot:"icon"})])),_:1})]),k("div",Fe,[x(O(ae),{modelValue:O(o).toolBarButtons,"onUpdate:modelValue":l[9]||(l[9]=e=>O(o).toolBarButtons=e),"item-key":"id",animation:150,class:"flex flex-col gap-5",handle:".drag-handle"},{item:$((({element:e})=>[x(D,{gutter:{xs:8,sm:16,md:24,lg:32,xl:32,xxl:40},class:"items-center"},{default:$((()=>[x(b,{xs:2,sm:1},{default:$((()=>[x(I,{shape:"square",variant:"text",class:"drag-handle cursor-move"},{default:$((()=>[x(O(le))])),_:1})])),_:1}),x(b,{xs:2,sm:2},{default:$((()=>[x(s,{modelValue:e.name,"onUpdate:modelValue":a=>e.name=a,placeholder:"名称"},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),x(b,{xs:3,sm:5},{default:$((()=>[x(s,{modelValue:e.prompt,"onUpdate:modelValue":a=>e.prompt=a,placeholder:"提示词"},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),x(b,{xs:2,sm:2},{default:$((()=>[x(s,{modelValue:e.icon,"onUpdate:modelValue":a=>e.icon=a,placeholder:"图标"},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),x(b,{xs:2,sm:1,class:"flex justify-end"},{default:$((()=>[x(K,{modelValue:e.show,"onUpdate:modelValue":a=>e.show=a},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),x(b,{xs:1,sm:1,class:"flex justify-end"},{default:$((()=>[x(q,{content:t.$t("pages.setting.user.confirm_delete"),onConfirm:a=>(e=>{o.toolBarButtons=o.toolBarButtons.filter((a=>a!==e))})(e)},{default:$((()=>[x(I,{shape:"square",variant:"text"},{default:$((()=>[x(O(oe),{slot:"icon"})])),_:1})])),_:2},1032,["content","onConfirm"])])),_:2},1024)])),_:2},1024)])),_:1},8,["modelValue"])])]),k("div",null,[k("h1",Te,B(t.$t("pages.setting.user.theme_settings")),1),x(be)])])),_:1},512),x(G,{visible:Me.value,"onUpdate:visible":l[10]||(l[10]=e=>Me.value=e),attach:"body",header:"发现新的备份"},{body:$((()=>[l[13]||(l[13]=k("p",null,"检测到服务器上存在较新的备份数据。您希望如何处理?",-1)),k("p",null,"本地版本:"+B(fe.value),1),k("p",null,"服务器版本:"+B(Ae.value),1)])),footer:$((()=>[x(I,{onClick:Oe,loading:ze.value},{default:$((()=>l[14]||(l[14]=[R("覆盖服务器数据")]))),_:1},8,["loading"]),x(I,{theme:"primary",onClick:Re,loading:Ce.value},{default:$((()=>l[15]||(l[15]=[R("从服务器恢复")]))),_:1},8,["loading"])])),_:1},8,["visible"])])),_:1})}}}),[["__scopeId","data-v-20b252b9"]]);export{ze as default};
.output/public/assets/index-BVHqhU3I.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{F as t}from"./FrameContent-CMuBQUlq.js";import{d as s}from"./fetch-SJxNIU2V.js";import{l as r,J as o,y as i}from"./@vue-CfxotJ-S.js";import"./@vueuse-B4dz7nOv.js";import"./lodash-VDnThKtA.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./mermaid-render-f9KGMq_P.js";import"./mermaid-CFwXVJJh.js";import"./@mermaid-js-C9iCgeAb.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./lodash-es-RhymR7yg.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./ts-dedent-CttZBlkd.js";import"./d3-transition-0ltv4da8.js";import"./d3-timer-keMr1twq.js";import"./d3-dispatch-Chq_f_hl.js";import"./d3-interpolate-Ct9kki6l.js";import"./d3-color-D5ULnJIe.js";import"./d3-selection-Oxnq6l6A.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-Dz8HuW59.js";import"./dompurify-DRcrZKbd.js";import"./stylis-Cl7w7uv3.js";import"./dagre-d3-es-D8JeTxsO.js";import"./@braintree-BB7t-Iuh.js";import"./khroma-C2oHPU0S.js";import"./dayjs-Cbdj87rt.js";import"./d3-scale-CdkN4P7M.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-BhN1wQGI.js";import"./d3-format-C0lSXcPg.js";import"./d3-time-format-DB2uBv1t.js";import"./d3-time-B1kAM736.js";import"./d3-axis-pCwzqJ1S.js";import"./d3-shape-C6CU9yox.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-Bkc4UHOn.js";import"./cytoscape-BsbaL92W.js";import"./cytoscape-cose-bilkent-CcQu5e-H.js";import"./cose-base-kQthUiMK.js";import"./layout-base-DqRk0Tgc.js";import"./d3-sankey-B6tQBass.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./@iconify-BUO7KvjM.js";import"./marked-CrLTNeyQ.js";import"./cytoscape-fcose-B58q80h4.js";import"./pinia-gf2247cH.js";import"./pinia-plugin-persistedstate-CxGPmdL5.js";import"./destr-WfmzGWA8.js";import"./deep-pick-omit-DP_A4OSP.js";import"./tdesign-vue-next-BiEwLJDx.js";import"./tdesign-icons-vue-next-Bre5yOVt.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./vue-i18n-BLIfPQxk.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./eventsource-parser-D0ssca5s.js";const e=r({__name:"index",setup(r){const e=`${s()}/swagger/index.html?t=${(new Date).getTime()}`,m=getComputedStyle(document.documentElement).getPropertyValue("--td-comp-size-xxxl"),p=parseFloat(m)+20;return(s,r)=>(i(),o(t,{frameSrc:e,offset:p}))}});export{e as default};
.output/public/assets/index-DleTV0S_.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{t}from"./mermaid-render-f9KGMq_P.js";import{a as e}from"./vue-router-DKqWD4MR.js";import{W as s,X as i,l as o,x as r,f as a,e as p}from"./tdesign-vue-next-BiEwLJDx.js";import{l as m,f as l,a as j,J as n,y as d,a9 as u,R as c,G as v,H as f}from"./@vue-CfxotJ-S.js";import{a as g}from"./main-apEI6pT3.js";import"./mermaid-CFwXVJJh.js";import"./@mermaid-js-C9iCgeAb.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./lodash-es-RhymR7yg.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./ts-dedent-CttZBlkd.js";import"./d3-transition-0ltv4da8.js";import"./d3-timer-keMr1twq.js";import"./d3-dispatch-Chq_f_hl.js";import"./d3-interpolate-Ct9kki6l.js";import"./d3-color-D5ULnJIe.js";import"./d3-selection-Oxnq6l6A.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-Dz8HuW59.js";import"./dompurify-DRcrZKbd.js";import"./stylis-Cl7w7uv3.js";import"./dagre-d3-es-D8JeTxsO.js";import"./@braintree-BB7t-Iuh.js";import"./khroma-C2oHPU0S.js";import"./dayjs-Cbdj87rt.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./d3-scale-CdkN4P7M.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-BhN1wQGI.js";import"./d3-format-C0lSXcPg.js";import"./d3-time-format-DB2uBv1t.js";import"./d3-time-B1kAM736.js";import"./d3-axis-pCwzqJ1S.js";import"./d3-shape-C6CU9yox.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-Bkc4UHOn.js";import"./cytoscape-BsbaL92W.js";import"./cytoscape-cose-bilkent-CcQu5e-H.js";import"./cose-base-kQthUiMK.js";import"./layout-base-DqRk0Tgc.js";import"./d3-sankey-B6tQBass.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./@iconify-BUO7KvjM.js";import"./marked-CrLTNeyQ.js";import"./cytoscape-fcose-B58q80h4.js";import"./pinia-gf2247cH.js";import"./pinia-plugin-persistedstate-CxGPmdL5.js";import"./destr-WfmzGWA8.js";import"./deep-pick-omit-DP_A4OSP.js";import"./lodash-VDnThKtA.js";import"./@vueuse-B4dz7nOv.js";import"./vue-i18n-BLIfPQxk.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./tdesign-icons-vue-next-Bre5yOVt.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./vuedraggable-DAEPkKhD.js";import"./vue-BIpqWpgL.js";const h=m({name:"About Page",setup(m){const h=g(),y=l((()=>h.data)),b=e(),k=[{title:t("pages.note.tableTitleName"),align:"left",width:320,colKey:"title",fixed:"left"},{title:t("pages.note.tableOperation"),align:"left",fixed:"right",width:160,colKey:"op"}],x=j({defaultPageSize:20,total:y.value.length,defaultCurrent:1}),C=j(""),w=j(!1),_=()=>{h.remove(C.value),w.value=!1,p.success(t("pages.note.deleteMsgSuccess")),z()},z=()=>{C.value=""},$=()=>{z()};return(t,e)=>{const p=o,m=i,l=s,j=r,g=a;return d(),n(g,null,{default:u((()=>[c(l,{data:y.value,columns:k,"row-key":"id","vertical-align":"top",hover:!0,pagination:x.value},{op:u((e=>[c(m,null,{default:u((()=>[c(p,{theme:"primary",onClick:t=>{return s=e,void b.push(`/note/content?id=${s.row.id}`);var s}},{default:u((()=>[v(f(t.$t("pages.note.detail")),1)])),_:2},1032,["onClick"]),c(p,{theme:"danger",onClick:t=>{return s=e,C.value=s.row.id,void(w.value=!0);var s}},{default:u((()=>[v(f(t.$t("pages.note.delete")),1)])),_:2},1032,["onClick"])])),_:2},1024)])),_:1},8,["data","pagination"]),c(j,{visible:w.value,"onUpdate:visible":e[0]||(e[0]=t=>w.value=t),header:t.$t("layout.sideNav.confirmDelete"),"on-cancel":$,onConfirm:_},null,8,["visible","header"])])),_:1})}}});export{h as default};
.output/public/assets/index-Dn5cn9RI.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{a as e}from"./vue-router-DKqWD4MR.js";import{l as t,f as a,J as s,y as i,a9 as r,R as o,z as l,ad as n,u,a as p,w as d,A as m,G as c,H as v,v as g,F as j,aa as f}from"./@vue-CfxotJ-S.js";import{b,A as _,f as h,p as y,q as x,r as z,s as k,x as C,e as w,m as S,j as V,Q as D}from"./tdesign-vue-next-BiEwLJDx.js";import{ac as U,ab as A,d as q}from"./tdesign-icons-vue-next-Bre5yOVt.js";import{t as R}from"./mermaid-render-f9KGMq_P.js";import{_ as $}from"./avatar.vue_vue_type_script_setup_true_lang-IaazOHzd.js";import{v as B}from"./uuid-_R2nDvl_.js";import{u as E}from"./main-apEI6pT3.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./lodash-es-RhymR7yg.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./mermaid-CFwXVJJh.js";import"./@mermaid-js-C9iCgeAb.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./ts-dedent-CttZBlkd.js";import"./d3-transition-0ltv4da8.js";import"./d3-timer-keMr1twq.js";import"./d3-dispatch-Chq_f_hl.js";import"./d3-interpolate-Ct9kki6l.js";import"./d3-color-D5ULnJIe.js";import"./d3-selection-Oxnq6l6A.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-Dz8HuW59.js";import"./dompurify-DRcrZKbd.js";import"./stylis-Cl7w7uv3.js";import"./dagre-d3-es-D8JeTxsO.js";import"./@braintree-BB7t-Iuh.js";import"./khroma-C2oHPU0S.js";import"./dayjs-Cbdj87rt.js";import"./d3-scale-CdkN4P7M.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-BhN1wQGI.js";import"./d3-format-C0lSXcPg.js";import"./d3-time-format-DB2uBv1t.js";import"./d3-time-B1kAM736.js";import"./d3-axis-pCwzqJ1S.js";import"./d3-shape-C6CU9yox.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-Bkc4UHOn.js";import"./cytoscape-BsbaL92W.js";import"./cytoscape-cose-bilkent-CcQu5e-H.js";import"./cose-base-kQthUiMK.js";import"./layout-base-DqRk0Tgc.js";import"./d3-sankey-B6tQBass.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./@iconify-BUO7KvjM.js";import"./marked-CrLTNeyQ.js";import"./cytoscape-fcose-B58q80h4.js";import"./pinia-gf2247cH.js";import"./pinia-plugin-persistedstate-CxGPmdL5.js";import"./destr-WfmzGWA8.js";import"./deep-pick-omit-DP_A4OSP.js";import"./lodash-VDnThKtA.js";import"./@vueuse-B4dz7nOv.js";import"./vue-i18n-BLIfPQxk.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./@dicebear-JcnEMRoc.js";import"./vuedraggable-DAEPkKhD.js";import"./vue-BIpqWpgL.js";const F=t({__name:"AgentCard",props:{product:{type:Object}},emits:["start-chat","delete-item"],setup(e,{emit:t}){const p=e,d=a((()=>p.product.content.substring(0,20)+"...")),m=t;return(t,a)=>{const p=_,c=b,v=h;return i(),s(v,{title:e.product.name,description:d.value,"hover-shadow":"",bordered:!1},{avatar:r((()=>[o(p,{size:"56px",image:e.product.avatar},null,8,["image"])])),actions:r((()=>[o(c,{shape:"circle",onClick:a[0]||(a[0]=n((t=>{return a=e.product,void m("start-chat",a);var a}),["stop"])),variant:"text"},{default:r((()=>[o(u(U),{slot:"icon"})])),_:1}),e.product.isDefault?l("",!0):(i(),s(c,{key:0,shape:"circle",onClick:a[1]||(a[1]=n((t=>{return a=e.product,void m("delete-item",a);var a}),["stop"])),variant:"text"},{default:r((()=>[o(u(A),{slot:"icon"})])),_:1}))])),_:1},8,["title","description"])}}}),H={class:"flex flex-col items-center justify-center mb-[var(--td-comp-margin-xxl)]"},I={class:"w-full flex flex-row justify-end gap-3"},J={id:"",name:"",status:"1",content:"",avatar:"",onboarding:"",isDefault:!1},N=t({__name:"DialogForm",props:{visible:{type:Boolean,default:!1},data:Object},emits:["update:visible"],setup(e,{emit:t}){const a=E(),l=e,n=p(null),g=p(!1),j=p({...J}),f=e=>{j.value.avatar=e},_=({validateResult:e,firstError:t})=>{if(t)return void w.warning(t);const s=!j.value.id||""===j.value.id;s&&(j.value.id=B());const i={id:j.value.id,name:j.value.name,status:"1"===j.value.status,content:j.value.content,avatar:j.value.avatar,onboarding:j.value.onboarding,isDefault:j.value.isDefault};s?(a.add(i),w.success(R("pages.setting.agent.submit_success"))):(a.update(i),w.success(R("pages.setting.agent.update_success"))),g.value=!1},h=()=>{g.value=!1},S=t;d((()=>g.value),(e=>{S("update:visible",e)})),d((()=>l.visible),(e=>{g.value=e})),d((()=>l.data),(e=>{j.value=e}),{immediate:!0});const V={name:[{required:!0,message:R("pages.setting.agent.enter_agent_name"),type:"error"}],content:[{required:!0,message:R("pages.setting.agent.enter_agent_description"),type:"error"}]};return(e,t)=>{const a=z,l=x,p=k,d=b,w=y,S=C;return i(),s(S,{visible:g.value,"onUpdate:visible":t[2]||(t[2]=e=>g.value=e),header:j.value.id?u(R)("pages.setting.agent.editor_agent"):u(R)("pages.setting.agent.add_agent"),placement:"top",width:680,footer:!1},{body:r((()=>[o(w,{ref:"form",data:j.value,rules:V,"label-width":100,"label-align":"top",onSubmit:_},{default:r((()=>[m("div",H,[o($,{ref_key:"avatarRef",ref:n,url:j.value.avatar,onUpdate:f},null,8,["url"])]),o(l,{label:u(R)("pages.setting.agent.agent_name"),name:"name"},{default:r((()=>[o(a,{modelValue:j.value.name,"onUpdate:modelValue":t[0]||(t[0]=e=>j.value.name=e)},null,8,["modelValue"])])),_:1},8,["label"]),o(l,{label:u(R)("pages.setting.agent.agent_description"),name:"content"},{default:r((()=>[o(p,{modelValue:j.value.content,"onUpdate:modelValue":t[1]||(t[1]=e=>j.value.content=e),autosize:{minRows:5,maxRows:12},name:"content"},null,8,["modelValue"])])),_:1},8,["label"]),o(l,null,{default:r((()=>[m("div",I,[o(d,{variant:"outline",onClick:h},{default:r((()=>[c(v(u(R)("pages.setting.agent.cancel")),1)])),_:1}),o(d,{theme:"primary",type:"submit"},{default:r((()=>[c(v(u(R)("pages.setting.agent.confirm")),1)])),_:1})])])),_:1})])),_:1},8,["data"])])),_:1},8,["visible","header"])}}}),O={class:"list-card-items"},Q={class:"list-card-pagination"},W=t({name:"ListAgent",setup(t){const l=e(),n=p(void 0),d=E(),c=p({current:1,pageSize:35,total:0}),v=a((()=>{const e=[d.defaultAgent,...d.agents];return c.value.total=e.length,e})),b=a((()=>n.value?R("pages.setting.agent.confirm_delete_agent",{agentName:n.value.name}):"")),y=p(!1),x=p(!1),z=p({...J}),k=e=>{c.value.pageSize=e,c.value.current=1},U=e=>{c.value.current=e},A=e=>{x.value=!0,n.value=e},$=()=>{d.remove(n.value.id),x.value=!1,w.success(R("pages.setting.agent.delete_success"))},B=()=>{n.value=void 0},H=e=>{l.push({path:"/conversation/index",query:{id:e.id}})},I=()=>{z.value={...J},y.value=!0};return(e,t)=>{const a=_,l=h,n=S,p=V,d=D,w=C;return i(),g("div",null,[m("div",O,[o(p,{gutter:[16,16]},{default:r((()=>[o(n,{xs:12,lg:4,xl:3},{default:r((()=>[o(l,{theme:"normal","hover-shadow":"",class:"list-card-item h-[108px] border-dashed",style:{"border-color":"var(--td-brand-color-active)"},title:e.$t("pages.setting.agent.add_agent"),onClick:I},{avatar:r((()=>[o(a,{size:"56px"},{icon:r((()=>[o(u(q))])),_:1})])),_:1},8,["title"])])),_:1}),(i(!0),g(j,null,f(v.value.slice(c.value.pageSize*(c.value.current-1),c.value.pageSize*c.value.current),(e=>(i(),s(n,{key:e.id,xs:12,lg:4,xl:3},{default:r((()=>[o(F,{class:"list-card-item h-[108px]",product:e,onDeleteItem:A,onStartChat:H,onClick:t=>(e=>{z.value={id:e.id,name:e.name,status:e.status?"1":"0",content:e.content,avatar:e.avatar,onboarding:e.onboarding,isDefault:e.isDefault},y.value=!0})(e)},null,8,["product","onClick"])])),_:2},1024)))),128))])),_:1})]),m("div",Q,[o(d,{modelValue:c.value.current,"onUpdate:modelValue":t[0]||(t[0]=e=>c.value.current=e),"page-size":c.value.pageSize,"onUpdate:pageSize":t[1]||(t[1]=e=>c.value.pageSize=e),total:c.value.total,"page-size-options":[35],onPageSizeChange:k,onCurrentChange:U},null,8,["modelValue","page-size","total","page-size-options"])]),o(N,{visible:y.value,"onUpdate:visible":t[2]||(t[2]=e=>y.value=e),data:z.value},null,8,["visible","data"]),o(w,{visible:x.value,"onUpdate:visible":t[3]||(t[3]=e=>x.value=e),header:e.$t("pages.setting.agent.confirm_delete_selected_agent"),body:b.value,"on-cancel":B,onConfirm:$},null,8,["visible","header","body"])])}}});export{W as default};
.output/public/assets/index-Rpu0PRbo.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{v as e,y as t,ag as l,l as a,f as i,A as r,C as s,J as o,ac as p,H as d,a as n,w as f,a0 as h,a1 as c,R as u,a9 as m,G as v,u as g,F as j,aa as z,I as _}from"./@vue-CfxotJ-S.js";import{u as x,a as k}from"./vue-router-DKqWD4MR.js";import{_ as w,e as B,m as y,c as M,u as E,t as H,f as A}from"./mermaid-render-f9KGMq_P.js";import{_ as F}from"./ChatInput.vue_vue_type_style_index_0_lang-B1k4vI4G.js";import{u as S}from"./app-_ksMLlTy.js";import{A as U,l as b,j as G,m as I,f as L,n as V,o as C,b as O,e as R}from"./tdesign-vue-next-BiEwLJDx.js";import{v as q}from"./uuid-_R2nDvl_.js";import{u as T}from"./main-apEI6pT3.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./mermaid-CFwXVJJh.js";import"./@mermaid-js-C9iCgeAb.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./lodash-es-RhymR7yg.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./ts-dedent-CttZBlkd.js";import"./d3-transition-0ltv4da8.js";import"./d3-timer-keMr1twq.js";import"./d3-dispatch-Chq_f_hl.js";import"./d3-interpolate-Ct9kki6l.js";import"./d3-color-D5ULnJIe.js";import"./d3-selection-Oxnq6l6A.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-Dz8HuW59.js";import"./dompurify-DRcrZKbd.js";import"./stylis-Cl7w7uv3.js";import"./dagre-d3-es-D8JeTxsO.js";import"./@braintree-BB7t-Iuh.js";import"./khroma-C2oHPU0S.js";import"./dayjs-Cbdj87rt.js";import"./d3-scale-CdkN4P7M.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-BhN1wQGI.js";import"./d3-format-C0lSXcPg.js";import"./d3-time-format-DB2uBv1t.js";import"./d3-time-B1kAM736.js";import"./d3-axis-pCwzqJ1S.js";import"./d3-shape-C6CU9yox.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-Bkc4UHOn.js";import"./cytoscape-BsbaL92W.js";import"./cytoscape-cose-bilkent-CcQu5e-H.js";import"./cose-base-kQthUiMK.js";import"./layout-base-DqRk0Tgc.js";import"./d3-sankey-B6tQBass.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./@iconify-BUO7KvjM.js";import"./marked-CrLTNeyQ.js";import"./cytoscape-fcose-B58q80h4.js";import"./pinia-gf2247cH.js";import"./pinia-plugin-persistedstate-CxGPmdL5.js";import"./destr-WfmzGWA8.js";import"./deep-pick-omit-DP_A4OSP.js";import"./lodash-VDnThKtA.js";import"./@vueuse-B4dz7nOv.js";import"./vue-i18n-BLIfPQxk.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./tdesign-icons-vue-next-Bre5yOVt.js";import"./mammoth-Cw8VHd7C.js";import"./xlsx-DB6BMndo.js";import"./pdfjs-dist-8WFUNQXM.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./vuedraggable-DAEPkKhD.js";import"./vue-BIpqWpgL.js";const D={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"140",fill:"none"};const $={render:function(a,i){return t(),e("svg",D,i[0]||(i[0]=[l('<g mask="url(#mask0_17_619)"><path fill="#97A3B7" d="M30 62h88v60H30z"></path><g filter="url(#filter0_f_17_619)"><path fill="#E3E6EB" d="M12 84h80v60H12z"></path></g><g filter="url(#filter1_f_17_619)"><path fill="#E3E6EB" d="M80 54h80v60H80z"></path></g><path fill="#fff" d="M46 105h32v2H46zM46 98h32v2H46zM46 88h16v2H46z"></path></g><path fill="currentcolor" d="M63 20h88v10H63z" opacity=".9"></path><mask id="a" width="88" height="50" x="63" y="30" maskUnits="userSpaceOnUse" style="mask-type:alpha;"><path fill="currentcolor" d="M63 30h88v50H63z"></path></mask><g mask="url(#a)"><path fill="currentcolor" d="M63 30h88v50H63z"></path><g filter="url(#filter2_f_17_619)" opacity=".3"><path fill="#97A3B7" d="M30 62h88v60H30z"></path></g></g><path fill="#fff" fill-rule="evenodd" d="m95.686 40.858 10.278 10.277A4 4 0 0 1 107 51c2.213 0 4 1.786 4 4q-.002.538-.134 1.033l10.276 10.28-2.828 2.829-4.598-4.597A17.1 17.1 0 0 1 107 65.909c-7.273 0-13.484-4.524-16-10.91a17.3 17.3 0 0 1 5.696-7.472l-3.838-3.84zM99 55a8.003 8.003 0 0 0 12.063 6.892l-3.029-3.026q-.496.132-1.034.134c-2.213 0-4-1.787-4-4q.002-.538.134-1.034l-3.027-3.027A7.96 7.96 0 0 0 99 54.999m8-10.91c7.273 0 13.484 4.524 16 10.91a17.3 17.3 0 0 1-4.166 6.177l-4.105-4.105a8.003 8.003 0 0 0-9.801-9.8l-2.55-2.551c1.47-.41 3.02-.63 4.622-.63" clip-rule="evenodd"></path><path fill="#fff" d="M68 24h2v2h-2zM74 24h2v2h-2zM80 24h66v2H80z"></path><path fill="#fff" stroke="#000" d="m157 54 24.249 42h-48.498z"></path><path stroke="#000" d="M157 89V71"></path>',8)]))}},N={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"140",fill:"none"};const W={render:function(a,i){return t(),e("svg",N,i[0]||(i[0]=[l('<g mask="url(#mask0_16559_24301)"><path fill="#97A3B7" d="M30 62h88v60H30z"></path><g filter="url(#filter0_f_16559_24301)"><path fill="#E3E6EB" d="M12 84h80v60H12z"></path></g><g filter="url(#filter1_f_16559_24301)"><path fill="#E3E6EB" d="M80 54h80v60H80z"></path></g><path stroke="#fff" stroke-width="2" d="m49 93-7 7 7 7M69 107l7-7-7-7M62.365 87.443l-6.73 25.114"></path></g><path fill="currentcolor" d="M63 20h88v10H63z" opacity=".9"></path><mask id="a" width="88" height="50" x="63" y="30" maskUnits="userSpaceOnUse" style="mask-type:alpha;"><path fill="currentcolor" d="M63 30h88v50H63z"></path></mask><g mask="url(#a)"><path fill="currentcolor" d="M63 30h88v50H63z"></path><g filter="url(#filter2_f_16559_24301)" opacity=".3"><path fill="#97A3B7" d="M30 62h88v60H30z"></path></g></g><path fill="#fff" fill-rule="evenodd" d="M105.25 41c6.765 0 12.25 5.484 12.25 12.25 0 2.433-.709 4.7-1.932 6.606L121 65.288 117.288 69l-5.432-5.432a12.2 12.2 0 0 1-6.606 1.932C98.484 65.5 93 60.016 93 53.25S98.484 41 105.25 41m0 3.5a8.75 8.75 0 1 0 0 17.5 8.75 8.75 0 0 0 0-17.5" clip-rule="evenodd"></path><path fill="#fff" d="M68 24h2v2h-2zM74 24h2v2h-2zM80 24h66v2H80z"></path><path fill="#fff" fill-rule="evenodd" d="M153 56c-12.15 0-22 9.85-22 22 0 4.604 1.414 8.878 3.832 12.41L127 98.5l12.495-3.132A21.9 21.9 0 0 0 153 100c12.15 0 22-9.85 22-22s-9.85-22-22-22" clip-rule="evenodd"></path><path fill="#000" d="M131 78h.5zm3.832 12.41.359.348.284-.293-.23-.337zM127 98.5l-.359-.348-1.219 1.259 1.7-.426zm12.495-3.132.307-.394-.192-.15-.237.06zM153 100v.5zm22-22h-.5zm-43.5 0c0-11.874 9.626-21.5 21.5-21.5v-1c-12.426 0-22.5 10.074-22.5 22.5zm3.745 12.128A21.4 21.4 0 0 1 131.5 78h-1c0 4.708 1.446 9.08 3.919 12.693zm-.772-.066-7.832 8.09.718.696 7.832-8.09zm-7.351 8.923 12.494-3.132-.243-.97-12.495 3.132zM153 99.5c-4.976 0-9.555-1.69-13.198-4.526l-.615.789A22.4 22.4 0 0 0 153 100.5zM174.5 78c0 11.874-9.626 21.5-21.5 21.5v1c12.426 0 22.5-10.074 22.5-22.5zM153 56.5c11.874 0 21.5 9.626 21.5 21.5h1c0-12.426-10.074-22.5-22.5-22.5z"></path>',8)]))}},J={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"140",fill:"none"};const K={render:function(a,i){return t(),e("svg",J,i[0]||(i[0]=[l('<g mask="url(#mask0_16559_24251)"><path fill="#97A3B7" d="m68 48 38.105 22v44L68 136l-38.105-22V70z"></path><g filter="url(#a)"><path fill="#E3E6EB" d="M46.391 92h80v60h-80z"></path></g><g filter="url(#b)"><path fill="#E3E6EB" d="M0 23h80v60H0z"></path></g></g><mask id="c" width="78" height="88" x="80" y="9" maskUnits="userSpaceOnUse" style="mask-type:alpha;"><path fill="currentcolor" d="m119 9 38.105 22v44L119 97 80.895 75V31z"></path></mask><g mask="url(#c)"><path fill="currentcolor" fill-rule="evenodd" d="M80.895 31v44L119 97l38.105-22V31L119 53z" clip-rule="evenodd"></path><path fill="currentcolor" d="m119-35 38.105 22v44.5L119 53.5l-38.105-22V-13z" opacity=".9"></path><g filter="url(#d)" opacity=".3"><path fill="#97A3B7" d="m68 48 38.105 22v44L68 136l-38.105-22V70z"></path></g></g><path fill="#fff" stroke="#000" d="m143 68.822 4.867 17.053.133.466.469-.118 17.202-4.312-12.335 12.741-.337.348.337.348 12.335 12.741-17.202-4.312-.469-.118-.133.466L143 121.178l-4.867-17.053-.133-.466-.469.118-17.202 4.312 12.335-12.741.337-.348-.337-.348-12.335-12.741 17.202 4.312.469.118.133-.466z"></path><path fill="#fff" fill-rule="evenodd" d="m123.243 35.082 2.828-1.633-2.828-1.633-2.829 1.633zM119 32.632 121.828 31l-7.071-4.082-2.828 1.633zm8.485 3.267c-4.679 2.701-12.291 2.701-16.97 0-4.68-2.702-4.68-7.096 0-9.798s12.291-2.701 16.97 0c4.68 2.702 4.68 7.096 0 9.798m-19.799-11.43c-6.248 3.607-6.248 9.455 0 13.062s16.38 3.607 22.628 0 6.248-9.455 0-13.062-16.38-3.607-22.628 0M41.899 86.286l2.828 1.633v6.532L41.9 92.818zm12.02 6.94 2.829 1.634v6.532l-2.828-1.633zm-9.19 14.289-2.83-1.633.001 3.266 2.828 1.633zl9.192 5.307v3.266l2.828 1.633v-3.266l-2.828-1.633v-3.266l-9.192-5.307z" clip-rule="evenodd"></path><defs><filter id="a" width="180" height="160" x="-3.609" y="42" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_16559_24251" stdDeviation="25"></feGaussianBlur></filter><filter id="b" width="180" height="160" x="-50" y="-27" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_16559_24251" stdDeviation="25"></feGaussianBlur></filter><filter id="d" width="88.21" height="100" x="23.895" y="42" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_16559_24251" stdDeviation="3"></feGaussianBlur></filter></defs>',6)]))}},Q={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"140",fill:"none"};const Z={render:function(a,i){return t(),e("svg",Q,i[0]||(i[0]=[l('<g mask="url(#mask0_22_990)"><path fill="#97A3B7" fill-rule="evenodd" d="m144.569 105.61-48 27.712-48-27.712V83.712L96.57 56l48 27.713z" clip-rule="evenodd"></path><g filter="url(#filter0_f_22_990)"><path fill="#E3E6EB" d="M-3 33.999h80v60H-3z"></path></g><g filter="url(#filter1_f_22_990)"><path fill="#E3E6EB" d="M97 97.999h80v60H97z"></path></g></g><mask id="a" width="86" height="69" x="53" y="16" maskUnits="userSpaceOnUse" style="mask-type:alpha;"><path fill="currentcolor" fill-rule="evenodd" d="m113.357 42.715 16.472-9.51a36 36 0 0 0-3.186-2.043c-5.375-3.104-11.92-5.147-18.885-6.139-4.209-5.562-10.18-8.898-17.324-8.828-6.755.087-15.486 5.746-21.507 14.365q-1.247.622-2.432 1.306c-14.378 8.3-16.94 20.75-7.473 30.065-1.035-5.805-.31-10.865 3.101-16.215-.058.632-.21 4.427-.232 5.067-.67 18.914 15.02 34.058 26.139 33.928 8.45-.1 15.565-5.013 20.319-12.631 6.214-1.231 12.089-3.294 17.094-6.183 13.476-7.78 16.567-19.182 9.104-28.268l-16.599 9.582c1.762 3.654.049 7.823-5.078 10.783-5.126 2.96-12.347 3.948-18.677 2.931-2.843-.469-5.522-1.342-7.74-2.622l-.049-.028zM78.655 53.773c-6.127-3.977-5.683-10.226 1.195-14.197s17.703-4.226 24.591-.69zM93.556 18.17c4.61-.04 8.728 2.405 11.94 6.57-8.447-.918-17.384-.326-25.523 1.765 3.699-5.124 8.471-8.275 13.583-8.335m-2.232 63.447c-5.853.068-10.971-3.926-14.377-10.332 8.845 2.342 18.925 2.775 28.427 1.317-3.756 5.52-8.714 8.951-14.05 9.015" clip-rule="evenodd"></path></mask><g mask="url(#a)"><path fill="currentcolor" fill-rule="evenodd" d="m113.357 42.715 16.472-9.51a36 36 0 0 0-3.186-2.043c-5.375-3.104-11.92-5.147-18.885-6.139-4.209-5.562-10.18-8.898-17.324-8.828-6.755.087-15.486 5.746-21.507 14.365q-1.247.622-2.432 1.306c-14.378 8.3-16.94 20.75-7.473 30.065-1.035-5.805-.31-10.865 3.101-16.215-.058.632-.21 4.427-.232 5.067-.67 18.914 15.02 34.058 26.139 33.928 8.45-.1 15.565-5.013 20.319-12.631 6.214-1.231 12.089-3.294 17.094-6.183 13.476-7.78 16.567-19.182 9.104-28.268l-16.599 9.582c1.762 3.654.049 7.823-5.078 10.783-5.126 2.96-12.347 3.948-18.677 2.931-2.843-.469-5.522-1.342-7.74-2.622l-.049-.028zM78.655 53.773c-6.127-3.977-5.683-10.226 1.195-14.197s17.703-4.226 24.591-.69zM93.556 18.17c4.61-.04 8.728 2.405 11.94 6.57-8.447-.918-17.384-.326-25.523 1.765 3.699-5.124 8.471-8.275 13.583-8.335m-2.232 63.447c-5.853.068-10.971-3.926-14.377-10.332 8.845 2.342 18.925 2.775 28.427 1.317-3.756 5.52-8.714 8.951-14.05 9.015" clip-rule="evenodd"></path><g filter="url(#filter2_f_22_990)" opacity=".3"><path fill="#97A3B7" d="m96.569 56 48 27.712v55.426l-48 27.712-48-27.712V83.712z"></path></g></g><circle cx="155" cy="78" r="22" fill="#fff" stroke="#000" transform="rotate(180 155 78)"></circle><path stroke="#000" d="M155 83V65"></path><path fill="#C4C4C4" stroke="#000" stroke-linejoin="round" stroke-width="2" d="M155 87h.004v.004H155z"></path><path stroke="#fff" stroke-width="2" d="M96.57 112V88M86.57 98l10-10 9.999 10"></path>',7)]))}},P={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"140",fill:"none"};const X={render:function(a,i){return t(),e("svg",P,i[0]||(i[0]=[l('<mask id="a" width="78" height="88" x="80" y="9" maskUnits="userSpaceOnUse" style="mask-type:alpha;"><path fill="currentColor" d="m119 9 38.105 22v44L119 97 80.895 75V31z"></path></mask><g mask="url(#a)"><path fill="currentColor" d="m119 9 38.105 22v44L119 97 80.895 75V31z"></path><g filter="url(#b)" opacity=".3"><path fill="#97A3B7" d="m68 48 38.105 22v44L68 136l-38.105-22V70z"></path></g></g><mask id="c" width="78" height="88" x="29" y="48" maskUnits="userSpaceOnUse" style="mask-type:alpha;"><path fill="#97A3B7" d="m68 48 38.105 22v44L68 136l-38.105-22V70z"></path></mask><g mask="url(#c)"><path fill="#97A3B7" d="m68 48 38.105 22v44L68 136l-38.105-22V70z"></path><g filter="url(#d)"><path fill="#E3E6EB" d="M46.391 92h80v60h-80z"></path></g><g filter="url(#e)"><path fill="#E3E6EB" d="M0 23h80v60H0z"></path></g></g><path fill="#fff" d="m41.898 86.287 2.829 1.633v6.531l-2.828-1.632zM53.919 93.227l2.828 1.633v6.532l-2.828-1.633zM44.728 107.515l-2.829-1.633v3.266l2.829 1.633zl9.191 5.308v3.265l2.829 1.633v-3.266l-2.828-1.632v-3.266l-9.193-5.308z"></path><path fill="#fff" fill-rule="evenodd" d="M108.348 23.48c-2.16 2.51-1.813 5.903 1.047 8.08 3.265 2.486 8.568 2.447 11.845-.087 3.276-2.534 3.286-6.603.021-9.089-2.86-2.177-7.284-2.417-10.54-.74l5.202 3.96-2.373 1.836z" clip-rule="evenodd"></path><path fill="#fff" fill-rule="evenodd" d="m120.865 33.009 8.965 6.826 2.373-1.836-8.965-6.826q-.481.523-1.089.993-.608.468-1.284.843m-1.203-.916a8.5 8.5 0 0 0 1.305-.828 7.248 7.248 0 0 1 0 0 8.5 8.5 0 0 1-1.305.828" clip-rule="evenodd"></path><path fill="#fff" stroke="#181818" d="m144 70 24.249 42h-48.498z"></path><path stroke="#181818" d="M144 100V82"></path><path stroke="#181818" stroke-linejoin="round" stroke-width="2" d="M144 105h.004v.004H144z"></path><defs><filter id="b" width="88.21" height="100" x="23.895" y="42" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_216_313" stdDeviation="3"></feGaussianBlur></filter><filter id="d" width="180" height="160" x="-3.609" y="42" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_216_313" stdDeviation="25"></feGaussianBlur></filter><filter id="e" width="180" height="160" x="-50" y="-27" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_216_313" stdDeviation="25"></feGaussianBlur></filter></defs>',11)]))}},Y={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"140",fill:"none"};const ee={render:function(a,i){return t(),e("svg",Y,i[0]||(i[0]=[l('<g mask="url(#mask0_21_716)"><path fill="#97A3B7" fill-rule="evenodd" d="M33 46.843 96.321 119l63.322-72.157C142.742 32 120.583 23 96.321 23 72.061 23 49.901 32 33 46.843" clip-rule="evenodd"></path><g filter="url(#filter0_f_21_716)"><path fill="#E3E6EB" d="M95 21h80v60H95z"></path></g><g filter="url(#filter1_f_21_716)"><path fill="#E3E6EB" d="M-7 43h80v60H-7z"></path></g></g><path fill="currentcolor" d="m72.812 63.688-3.157 3.157 6.246 6.247a50.3 50.3 0 0 0-12.713 8.151L96.321 119l11.913-13.575 6.413 6.412 3.157-3.157L80.45 71.326zM129.455 81.243l-15.318 17.455-28.74-28.74a50.4 50.4 0 0 1 10.924-1.19c12.695 0 24.29 4.709 33.134 12.475"></path><path fill="#fff" stroke="#000" d="m152 21.822 4.867 17.053.133.465.469-.117 17.202-4.312-12.335 12.741-.337.348.337.348 12.335 12.741-17.202-4.312-.469-.117-.133.465L152 74.178l-4.867-17.053-.133-.465-.469.117-17.202 4.312 12.335-12.741.337-.348-.337-.348-12.335-12.741 17.202 4.312.469.117.133-.465z"></path><path stroke="#fff" stroke-width="2" d="M101 31 90 42l11 11-8 8"></path>',4)]))}},te={class:"result-container"},le={class:"result-bg-img"},ae={class:"result-title"},ie={class:"result-tip"},re=w(a({__name:"index",props:{bgUrl:String,title:String,tip:String,type:String},setup(l){const a=l,n=i((()=>{switch(a.type){case"403":default:return $;case"404":return W;case"500":return K;case"ie":return Z;case"wifi":return ee;case"maintenance":return X}}));return(a,i)=>(t(),e("div",te,[r("div",le,[(t(),o(p(n.value)))]),r("div",ae,d(l.title),1),r("div",ie,d(l.tip),1),s(a.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-50bd89bc"]]),se={class:"flex-1 w-full overflow-hidden flex flex-col"},oe={class:"flex flex-col justify-center items-center gap-3 w-full"},pe={class:"text-center"},de={class:"text-2xl font-bold"},ne=["title"],fe={class:"text-center p-2"},he={key:0,class:"flex flex-col items-center align-middle gap-5 w-full p-2 overflow-y-auto no-scrollbar"},ce=["title"],ue={class:"flex gap-1"},me={class:"w-[200px] whitespace-nowrap text-ellipsis overflow-hidden"},ve={class:"w-full relative"},ge=a({name:"NewConversation",setup(l){const a=T(),s=x(),w=k(),D=n(null);f((()=>s.query.id),(e=>{if("/conversation/index"!==s.path)return void(D.value=null);const t=e;D.value=t?a.find(t):a.defaultAgent}),{immediate:!0}),B();const $=i((()=>y.availableModels.value.map((e=>({...e,title:y.getModelItemTitle(e)}))))),N=n([]),W=e=>{},J=M(),K=e=>{if(0===N.value.length)return void R.error(H("pages.conversation.noSelectModelMsg"));const t={id:q(),name:D.value.name,avatar:D.value.avatar,agentId:D.value.id,content:D.value.content,models:[],time:(new Date).getTime(),pinned:!1,maxContextSize:10,aspectRatio:"IMAGE_ASPECT_RATIO_SQUARE",internet:!1};t.models=N.value.map((e=>({modelId:e,chats:[],startContext:0,apiAgentId:"",apiConversationId:"",apiNote:"",showing:!0,status:{responseWating:!1,chating:!1,stop:!1}}))),J.add(t),N.value=[],A.setData(e),w.push({path:"/conversation/chat",query:{id:t.id,isNew:1}})},Q=E(),Z=i((()=>{let e="h-[calc(100vh-2*var(--td-comp-paddingTB-m))]";return Q.showLayoutHeader&&Q.showFooter&&(e="h-[calc(100vh-var(--td-comp-size-xxl)-var(--td-comp-size-xxxl)-2*var(--td-comp-paddingTB-m))]"),Q.showLayoutHeader&&!Q.showFooter&&(e="h-[calc(100vh-var(--td-comp-size-xxxl)-2*var(--td-comp-paddingTB-m))]"),!Q.showLayoutHeader&&Q.showFooter&&(e="h-[calc(100vh-var(--td-comp-size-xxl)-2*var(--td-comp-paddingTB-m))]"),e})),P=e=>{w.push(e)};return(l,a)=>{const i=U,s=b,n=V,f=L,x=I,k=G,w=C,B=O;return h((t(),e("div",{class:_(["flex flex-col items-center w-full gap-5",Z.value])},[r("div",se,[r("div",oe,[u(i,{size:"80px",image:D.value.avatar},null,8,["image"]),r("div",pe,[r("h1",de,d(D.value.name),1),u(s,{underline:"",theme:"primary",onClick:a[0]||(a[0]=e=>P("/setting/agent"))},{default:m((()=>[v(d(l.$t("pages.conversation.switchAgent")),1)])),_:1})]),r("div",{class:"text-center text-sm text-gray-500 w-full overflow-hidden whitespace-nowrap text-ellipsis",title:D.value.content},d(D.value.content),9,ne)]),r("div",fe,[r("span",null,d(l.$t("pages.conversation.modelTips",{max_model_num:g(S)})),1)]),$.value.length>0?(t(),e("div",he,[u(w,{modelValue:N.value,"onUpdate:modelValue":a[1]||(a[1]=e=>N.value=e),onChange:W,max:g(S),class:"w-full"},{default:m((()=>[u(k,{gutter:[{xs:0,sm:16,md:16,lg:16,xl:16,xxl:16},16],class:"w-full"},{default:m((()=>[(t(!0),e(j,null,z($.value,(e=>(t(),o(x,{key:e.id,xs:12,lg:4,xl:3},{default:m((()=>[u(f,{class:"shadow-md",bordered:!1},{default:m((()=>[r("div",{class:"flex justify-between overflow-hidden",title:e.title},[r("div",ue,[u(i,{size:"20px",class:"mr-1"},{icon:m((()=>[(t(),o(p(g(y).icons[e.type])))])),_:2},1024),r("div",me,d(e.title),1)]),(t(),o(n,{key:e.id,value:e.id},null,8,["value"]))],8,ce)])),_:2},1024)])),_:2},1024)))),128))])),_:1})])),_:1},8,["modelValue","max"])])):(t(),o(re,{key:1,type:"404",title:l.$t("pages.conversation.emptyModelTips")},{default:m((()=>[u(B,{size:"large",theme:"primary",variant:"base",onClick:a[2]||(a[2]=e=>P("/setting/model"))},{default:m((()=>[v(d(l.$t("pages.conversation.createModel")),1)])),_:1})])),_:1},8,["title"]))]),r("div",ve,[u(F,{onInput:K})])],2)),[[c,D.value]])}}});export{ge as default};
.output/public/assets/index-yWHmk0id.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import{l as e,f as a,J as t,y as l,a9 as o,R as i,ad as s,u as n,ac as u,G as r,H as d,s as p,a as m,w as c,A as v,z as g,v as _,F as y,aa as f}from"./@vue-CfxotJ-S.js";import{m as h,t as k,e as b,j,k as w,n as V,o as x}from"./mermaid-render-f9KGMq_P.js";import{b as $,A as T,f as D,T as S,l as C,p as U,q as B,r as P,u as z,O as M,n as K,P as A,t as O,s as N,x as R,e as J,m as W,j as E,Q as q}from"./tdesign-vue-next-BiEwLJDx.js";import{a5 as H,ab as I,a9 as F,c as L,d as Q}from"./tdesign-icons-vue-next-Bre5yOVt.js";import{n as X,d as G}from"./fetch-SJxNIU2V.js";import{p as Y}from"./lyihub-zLFv36Ly.js";import{v as Z}from"./uuid-_R2nDvl_.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./mermaid-CFwXVJJh.js";import"./@mermaid-js-C9iCgeAb.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./lodash-es-RhymR7yg.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./ts-dedent-CttZBlkd.js";import"./d3-transition-0ltv4da8.js";import"./d3-timer-keMr1twq.js";import"./d3-dispatch-Chq_f_hl.js";import"./d3-interpolate-Ct9kki6l.js";import"./d3-color-D5ULnJIe.js";import"./d3-selection-Oxnq6l6A.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-Dz8HuW59.js";import"./dompurify-DRcrZKbd.js";import"./stylis-Cl7w7uv3.js";import"./dagre-d3-es-D8JeTxsO.js";import"./@braintree-BB7t-Iuh.js";import"./khroma-C2oHPU0S.js";import"./dayjs-Cbdj87rt.js";import"./d3-scale-CdkN4P7M.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-BhN1wQGI.js";import"./d3-format-C0lSXcPg.js";import"./d3-time-format-DB2uBv1t.js";import"./d3-time-B1kAM736.js";import"./d3-axis-pCwzqJ1S.js";import"./d3-shape-C6CU9yox.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-Bkc4UHOn.js";import"./cytoscape-BsbaL92W.js";import"./cytoscape-cose-bilkent-CcQu5e-H.js";import"./cose-base-kQthUiMK.js";import"./layout-base-DqRk0Tgc.js";import"./d3-sankey-B6tQBass.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./@iconify-BUO7KvjM.js";import"./marked-CrLTNeyQ.js";import"./cytoscape-fcose-B58q80h4.js";import"./pinia-gf2247cH.js";import"./pinia-plugin-persistedstate-CxGPmdL5.js";import"./destr-WfmzGWA8.js";import"./deep-pick-omit-DP_A4OSP.js";import"./lodash-VDnThKtA.js";import"./@vueuse-B4dz7nOv.js";import"./vue-i18n-BLIfPQxk.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./eventsource-parser-D0ssca5s.js";const ee=e({__name:"ModelCard",props:{product:{type:Object}},emits:["delete-item","copy-item"],setup(e,{emit:r}){const d=e,p=a((()=>{const e=h.getModelItemTitle(d.product);return e.length>40?e.slice(0,40)+"...":e})),m=r;return(a,r)=>{const d=T,c=$,v=D;return l(),t(v,{theme:"normal",title:p.value,"hover-shadow":"",bordered:!1},{avatar:o((()=>[i(d,{size:"56px"},{icon:o((()=>[(l(),t(u(n(h).icons[e.product.type])))])),_:1})])),actions:o((()=>[i(c,{shape:"circle",onClick:r[0]||(r[0]=s((a=>{return t=e.product,void m("copy-item",t);var t}),["stop"])),variant:"text"},{default:o((()=>[i(n(H),{slot:"icon"})])),_:1}),i(c,{shape:"circle",onClick:r[1]||(r[1]=s((a=>{return t=e.product,void m("delete-item",t);var t}),["stop"])),variant:"text"},{default:o((()=>[i(n(I),{slot:"icon"})])),_:1})])),_:1},8,["title"])}}}),ae=e({__name:"WebToken",props:{url:{type:String},userAgent:{type:String},script:{type:String},text:{type:String,default:k("pages.setting.model.login_to_get_token")}},emits:["onResult"],setup(e,{emit:a}){const s=e,n=a,u=async()=>{const e=await window.ipcRenderer.invoke("login-get-token",{url:s.url,userAgent:s.userAgent,script:s.script,show:!0});n("onResult",e)};return(e,a)=>{const n=C,p=S;return l(),t(p,{content:e.$t("pages.setting.model.login_and_close"),placement:"bottom"},{default:o((()=>[i(n,{theme:"primary",onClick:u},{default:o((()=>[r(d(s.text),1)])),_:1})])),_:1},8,["content"])}}}),te={class:"flex gap-2"},le={class:"flex flex-col items-center justify-center mb-[var(--td-comp-margin-xxl)] gap-2"},oe={class:"w-12 h-12"},ie={key:7,class:"mb-5 pl-24 flex flex-col gap-2"},se={class:"flex gap-2 items-center"},ne={class:"w-full flex flex-row justify-end gap-3"},ue={id:"",name:"",status:"1",description:"",type:"openai",apiModel:"",apiBase:"",apiKey:"",keys:[],prompt:"",likes:0,additionalData:{},temperature:V,
2
+ //生成随机性
3
+ topP:w,maxTokens:j,stream:!0},re=e({__name:"DialogForm",props:{visible:{type:Boolean,default:!1},data:Object},emits:["update:visible"],setup(e,{emit:a}){const s=b(),D=e,W=p(h.providers[0]),E=m(!1),q=m({...ue}),H=m(!1),I=m(""),Q=m(""),ee=m(!1),re=m(""),de=m(!1),pe=m(""),me=m(""),ce=m(!1),ve=window.isElectron,ge=({validateResult:e,firstError:a})=>{var t,l,o;if(a)return void J.warning(a);const i=!q.value.id||""===q.value.id;i&&(q.value.id=Z());const n={id:q.value.id,name:q.value.name,status:"1"===q.value.status,description:q.value.description,type:q.value.type,apiBase:null==(t=q.value.apiBase)?void 0:t.trim(),apiKey:null==(l=q.value.apiKey)?void 0:l.trim(),apiModel:null==(o=q.value.apiModel)?void 0:o.trim(),keys:q.value.keys,likes:q.value.likes,prompt:q.value.prompt,temperature:q.value.temperature,
4
+ //生成随机性
5
+ topP:q.value.topP,maxTokens:q.value.maxTokens,additionalData:q.value.additionalData,stream:q.value.stream};i?(s.add(n),J.success(k("pages.setting.model.submit_success"))):(s.update(n),J.success(k("pages.setting.model.update_success"))),E.value=!1},_e=()=>{E.value=!1},ye=()=>{},fe=m([]),he=e=>{fe.value.find((a=>a.value===e))||fe.value.push({label:e,value:e})},ke=e=>{(null==e?void 0:e.token)?q.value.apiKey=null==e?void 0:e.token:J.error(k("pages.setting.model.get_token_failed"))},be=a;c((()=>E.value),(e=>{be("update:visible",e)})),c((()=>D.visible),(e=>{E.value=e})),c((()=>D.data),(e=>{q.value={...e}}),{immediate:!0}),c((()=>q.value.id),(()=>{we()})),c((()=>[q.value.type]),(()=>{fe.value=[],W.value=h.providers.find((e=>e.name===q.value.type)),W.value||(W.value={name:q.value.type,title:"Model Provider Non existent!",icon:"",apiBase:"",tokenUrl:"",isApi:!1,show:{apiBase:!0,apiKey:!0,apiModel:!0},tips:{apiBase:"",apiKey:"",apiModel:""}}),D.data.type===W.value.name?(q.value.apiBase=D.data.apiBase,q.value.apiKey=D.data.apiKey,q.value.apiModel=D.data.apiModel,q.value.prompt=D.data.prompt,q.value.keys=D.data.keys,q.value.temperature=D.data.temperature,q.value.topP=D.data.topP,q.value.maxTokens=D.data.maxTokens,q.value.additionalData=D.data.additionalData,q.value.stream=D.data.stream):(q.value.apiBase=W.value.apiBase,q.value.apiKey="",q.value.apiModel="",q.value.prompt="",q.value.keys=[],q.value.temperature=V,q.value.topP=w,q.value.maxTokens=j,q.value.additionalData={},q.value.stream=!0),we()}));const je={name:[{required:!0,message:k("pages.setting.model.enter_model_name"),type:"error"}]},we=()=>{fe.value=[];let e=W.value.models;q.value.additionalData.models&&(e=q.value.additionalData.models),e&&(Array.isArray(e)?fe.value=e.map((e=>({label:e,value:e}))):"object"==typeof e&&(fe.value=Object.entries(e).map((([e,a])=>({label:e,value:a}))))),q.value.apiModel&&!fe.value.find((e=>e.value===q.value.apiModel))&&fe.value.push({label:q.value.apiModel,value:q.value.apiModel})},Ve=m(!1);async function xe(){try{if(Ve.value=!0,q.value.type.startsWith("openai")){let a=q.value.apiBase;if(!a)return void J.error(k("pages.setting.model.api_base_required"));const t=X(a);if(/\/v\d+\/(?!chat\/completions$)/.test(t)){const e=t.match(/(\/v\d+\/)/);if(e&&e[1]){a=`${t.split(e[1])[0]}${e[1]}models`}}else a=t.replace("/chat/completions","/models");try{const e=await fetch(a,{headers:{Authorization:`Bearer ${q.value.apiKey}`}});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=await e.json();if(t&&t.data&&Array.isArray(t.data)){const e=t.data.map((e=>e.id));q.value.additionalData||(q.value.additionalData={}),q.value.additionalData.models=e,J.success(k("pages.setting.model.get_models_success"))}else J.error(k("pages.setting.model.invalid_response"))}catch(e){J.error(k("pages.setting.model.get_models_failed")+": "+e.message)}}else{if(!q.value.type.startsWith("lyihub"))return void(q.value.additionalData.models=null);q.value.additionalData.models=await Y(50,q.value.apiKey)}we()}finally{Ve.value=!1}}async function $e(){q.value.additionalData&&(q.value.additionalData.models=null),we(),J.success(k("pages.setting.model.clean_models_success"))}async function Te(){if(!H.value)try{H.value=!0;const e=await fetch(G()+"/github/code"),a=await e.json();if(!a)return void J.error(k("pages.setting.model.get_auth_code_failed"));I.value=a.user_code,Q.value=a.verification_uri,await navigator.clipboard.writeText(I.value);const t=await fetch(G()+`/github/token?device_code=${a.device_code}&interval=${a.interval}`),l=await t.json();if(!1===E.value)return;ke(l),I.value="",Q.value=""}finally{H.value=!1}}async function De(){if(!ee.value)try{ee.value=!0;const e=await fetch(G()+"/cursor/code"),a=await e.json(),{url:t,uuid:l,verifier:o}=a;re.value=t;const i=await fetch(G()+`/cursor/token?uuid=${l}&verifier=${o}&interval=1`),s=await i.json();if(!1===E.value)return;ke(s)}finally{ee.value=!1,re.value=""}}async function Se(){if(de.value)return;const e=e=>btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");try{de.value=!0;const t=e(crypto.getRandomValues(new Uint8Array(32)).buffer),l=e(await(async e=>{const a=(new TextEncoder).encode(e);return await crypto.subtle.digest("SHA-256",a)})(t)),o=crypto.getRandomValues(new Uint8Array(8)),i={codeVerifier:t,codeChallenge:l,state:e(o.buffer),creationTime:Date.now()},s="v",n=new URLSearchParams({response_type:"code",code_challenge:i.codeChallenge,client_id:s,state:i.state,prompt:"login"});me.value="";const u=`https://auth.augmentcode.com/authorize?${n.toString()}`;pe.value=u;const r=3e5,d=Date.now();for(;Date.now()-d<r;){const e=me.value;if(e)try{JSON.parse(e);break}catch(a){}await new Promise((e=>setTimeout(e,1e3)))}const p=JSON.parse(me.value),m=await fetch(`${p.tenant_url}token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grant_type:"authorization_code",client_id:s,code_verifier:i.codeVerifier,redirect_uri:"",code:p.code})});if(!m.ok)throw new Error(`HTTP error! status: ${m.status}`);const c=(await m.json()).access_token;if(!1===E.value)return;ke({token:c})}finally{de.value=!1,me.value="",pe.value=""}}async function Ce(){if(!ce.value){ce.value=!0;try{(await fetch(G()+"/cache/clear?key=google_code")).ok||J.error("clear google code fail");const e=G()+"/google/code";Ue(`https://accounts.google.com/o/oauth2/v2/auth?scope=https://www.googleapis.com/auth/cloud-platform&response_type=code&redirect_uri=${e}&client_id=${q.value.additionalData.google_oauth_client_id}&access_type=offline&prompt=consent`);let a="",t=0;const l=1e3;for(;;){if(!1===E.value)return;await new Promise((e=>setTimeout(e,l)));const e=await fetch(G()+"/google/access_token"),o=await e.json();if("ok"===o.status){a=o.code;break}if(t+=1,t*l>45e3)break}if(!a)return void J.success(k("pages.setting.model.get_auth_code_failed"));const o=await fetch("https://www.googleapis.com/oauth2/v4/token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:q.value.additionalData.google_oauth_client_id,client_secret:q.value.additionalData.google_oauth_client_secret,code:a,redirect_uri:e,grant_type:"authorization_code"})}),i=await o.json();q.value.apiKey=`${q.value.additionalData.google_oauth_client_id}${x}${q.value.additionalData.google_oauth_client_secret}${x}${i.refresh_token}`,J.success(k("pages.setting.model.get_auth_code_success"))}finally{ce.value=!1}}}function Ue(e){window.ipcRenderer?window.ipcRenderer.send("open-url",e):window.open(e)}function Be(){q.value.keys.push({key:q.value.apiKey,name:(q.value.keys.length+1).toString(),enabled:!0})}return(e,a)=>{const s=P,p=B,m=T,c=M,b=z,j=C,w=S,V=$,x=K,D=A,J=O,X=N,G=U,Y=R;return l(),t(Y,{visible:E.value,"onUpdate:visible":a[21]||(a[21]=e=>E.value=e),onClose:ye,header:q.value.id?e.$t("pages.setting.model.editor_model"):e.$t("pages.setting.model.add_model"),width:680,footer:!1},{body:o((()=>[i(G,{ref:"form",data:q.value,rules:je,"label-width":96,onSubmit:ge},{default:o((()=>[i(p,{label:e.$t("pages.setting.model.model_name"),name:"name"},{default:o((()=>[i(s,{modelValue:q.value.name,"onUpdate:modelValue":a[0]||(a[0]=e=>q.value.name=e)},null,8,["modelValue"])])),_:1},8,["label"]),i(p,{label:e.$t("pages.setting.model.model_description"),name:"description"},{default:o((()=>[i(s,{modelValue:q.value.description,"onUpdate:modelValue":a[1]||(a[1]=e=>q.value.description=e)},null,8,["modelValue"])])),_:1},8,["label"]),i(p,{label:e.$t("pages.setting.model.model_interface"),name:"type"},{default:o((()=>[i(b,{modelValue:q.value.type,"onUpdate:modelValue":a[2]||(a[2]=e=>q.value.type=e),clearable:"",filterable:""},{default:o((()=>[(l(!0),_(y,null,f(n(h).options,((e,a)=>(l(),t(c,{key:a,value:e.value,label:e.label},{default:o((()=>[v("div",te,[i(m,{size:"20px"},{icon:o((()=>[(l(),t(u(e.icon)))])),_:2},1024),r(" "+d(e.label),1)])])),_:2},1032,["value","label"])))),128))])),_:1},8,["modelValue"])])),_:1},8,["label"]),v("div",le,[v("div",oe,[(l(),t(u(W.value.icon)))]),n(ve)&&!W.value.isApi&&W.value.tokenUrl?(l(),t(ae,{key:0,url:W.value.tokenUrl,onOnResult:ke},null,8,["url"])):g("",!0),!W.value.tokenUrl||n(ve)&&!W.value.isApi?g("",!0):(l(),t(j,{key:1,theme:"primary",onClick:a[3]||(a[3]=e=>Ue(W.value.tokenUrl))},{default:o((()=>[r(d(W.value.tokenUrl),1)])),_:1})),i(w,{content:e.$t("pages.setting.model.login_and_wait"),placement:"bottom"},{default:o((()=>[Q.value&&"github-copilot"===W.value.name?(l(),t(j,{key:0,theme:"primary",onClick:a[4]||(a[4]=e=>Ue(Q.value))},{default:o((()=>[r(d(e.$t("pages.setting.model.click_to_enter_auth_code")),1)])),_:1})):g("",!0),re.value&&"cursor"===W.value.name?(l(),t(j,{key:1,theme:"primary",onClick:a[5]||(a[5]=e=>Ue(re.value))},{default:o((()=>[r(d(e.$t("pages.setting.model.click_to_enter_auth_code")),1)])),_:1})):g("",!0),pe.value&&"augment"===W.value.name?(l(),t(j,{key:2,theme:"primary",onClick:a[6]||(a[6]=e=>Ue(pe.value))},{default:o((()=>[r(d(e.$t("pages.setting.model.click_to_enter_auth_code")),1)])),_:1})):g("",!0)])),_:1},8,["content"]),"cursor"===W.value.name?(l(),t(V,{key:2,loading:ee.value,onClick:De},{default:o((()=>[r(d(e.$t("pages.setting.model.getTokenButtonText")),1)])),_:1},8,["loading"])):g("",!0),"augment"===W.value.name?(l(),t(V,{key:3,loading:de.value,onClick:Se},{default:o((()=>[r(d(e.$t("pages.setting.model.getTokenButtonText")),1)])),_:1},8,["loading"])):g("",!0)]),"augment"===W.value.name?(l(),t(p,{key:0,label:e.$t("pages.setting.model.get_auth_code"),name:"augment_user_code"},{default:o((()=>[i(s,{modelValue:me.value,"onUpdate:modelValue":a[7]||(a[7]=e=>me.value=e)},null,8,["modelValue"])])),_:1},8,["label"])):g("",!0),"github-copilot"===W.value.name?(l(),t(p,{key:1,label:e.$t("pages.setting.model.get_auth_code"),name:"github_user_code"},{default:o((()=>[i(s,{readonly:"",modelValue:I.value,"onUpdate:modelValue":a[8]||(a[8]=e=>I.value=e)},null,8,["modelValue"]),a[22]||(a[22]=r()),i(V,{class:"ml-2",loading:H.value,onClick:Te},{default:o((()=>[r(d(e.$t("pages.setting.model.getTokenButtonText")),1)])),_:1},8,["loading"])])),_:1},8,["label"])):g("",!0),W.value.name.endsWith("vertex")?(l(),t(p,{key:2,label:"Client ID"},{default:o((()=>[i(s,{modelValue:q.value.additionalData.google_oauth_client_id,"onUpdate:modelValue":a[9]||(a[9]=e=>q.value.additionalData.google_oauth_client_id=e)},null,8,["modelValue"])])),_:1})):g("",!0),W.value.name.endsWith("vertex")?(l(),t(p,{key:3,label:"Client Secret"},{default:o((()=>[i(s,{modelValue:q.value.additionalData.google_oauth_client_secret,"onUpdate:modelValue":a[10]||(a[10]=e=>q.value.additionalData.google_oauth_client_secret=e)},null,8,["modelValue"]),a[23]||(a[23]=r()),i(V,{class:"ml-2",onClick:Ce,loading:ce.value},{default:o((()=>[r(d(e.$t("pages.setting.model.getTokenButtonText")),1)])),_:1},8,["loading"])])),_:1})):g("",!0),W.value.show.apiBase?(l(),t(p,{key:4,label:e.$t("pages.setting.model.model_address"),name:"apiBase",tips:W.value.tips.apiBase},{default:o((()=>[i(s,{modelValue:q.value.apiBase,"onUpdate:modelValue":a[11]||(a[11]=e=>q.value.apiBase=e),placeholder:W.value.apiBase},null,8,["modelValue","placeholder"])])),_:1},8,["label","tips"])):g("",!0),W.value.show.apiModel?(l(),t(p,{key:5,label:e.$t("pages.setting.model.model"),name:"apiModel",tips:W.value.tips.apiModel},{default:o((()=>[i(b,{modelValue:q.value.apiModel,"onUpdate:modelValue":a[12]||(a[12]=e=>q.value.apiModel=e),creatable:"",filterable:"",options:fe.value,onCreate:he,onEnter:a[13]||(a[13]=e=>{e.e.preventDefault()})},null,8,["modelValue","options"]),W.value.name.startsWith("lyihub")||W.value.name.startsWith("openai")?(l(),t(V,{key:0,class:"ml-2",onClick:xe,loading:Ve.value},{default:o((()=>[r(d(e.$t("pages.setting.model.getTokenButtonText")),1)])),_:1},8,["loading"])):g("",!0),W.value.name.startsWith("lyihub")||W.value.name.startsWith("openai")?(l(),t(V,{key:1,class:"ml-2",onClick:$e},{default:o((()=>[r(d(e.$t("pages.setting.model.cleanTokenButtonText")),1)])),_:1})):g("",!0)])),_:1},8,["label","tips"])):g("",!0),W.value.show.apiKey?(l(),t(p,{key:6,label:e.$t("pages.setting.model.model_key"),name:"apiKey",tips:W.value.tips.apiKey},{default:o((()=>[i(s,{type:"password",modelValue:q.value.apiKey,"onUpdate:modelValue":a[14]||(a[14]=e=>q.value.apiKey=e)},null,8,["modelValue"]),i(V,{shape:"square",variant:"text",class:"ml-2",onClick:Be},{default:o((()=>[i(n(F),{slot:"icon"})])),_:1})])),_:1},8,["label","tips"])):g("",!0),q.value.keys&&q.value.keys.length>0?(l(),_("div",ie,[(l(!0),_(y,null,f(q.value.keys,((a,t)=>(l(),_("div",se,[i(s,{modelValue:a.name,"onUpdate:modelValue":e=>a.name=e,class:"w-32"},null,8,["modelValue","onUpdate:modelValue"]),i(s,{modelValue:a.key,"onUpdate:modelValue":e=>a.key=e,type:"password"},null,8,["modelValue","onUpdate:modelValue"]),i(x,{modelValue:a.enabled,"onUpdate:modelValue":e=>a.enabled=e},null,8,["modelValue","onUpdate:modelValue"]),i(D,{content:e.$t("pages.setting.user.confirm_delete"),onConfirm:e=>function(e){q.value.keys.splice(e,1)}(t)},{default:o((()=>[i(V,{shape:"square",variant:"text"},{default:o((()=>[i(n(L),{slot:"icon"})])),_:1})])),_:2},1032,["content","onConfirm"])])))),256))])):g("",!0),i(p,{label:n(k)("pages.conversation.stream"),name:"stream"},{default:o((()=>[i(x,{modelValue:q.value.stream,"onUpdate:modelValue":a[15]||(a[15]=e=>q.value.stream=e)},null,8,["modelValue"])])),_:1},8,["label"]),i(p,{label:n(k)("pages.conversation.temperature"),name:"temperature"},{default:o((()=>[i(J,{modelValue:q.value.temperature,"onUpdate:modelValue":a[16]||(a[16]=e=>q.value.temperature=e),inputNumberProps:"",showStep:"",min:0,max:1,step:.1},null,8,["modelValue"])])),_:1},8,["label"]),i(p,{label:n(k)("pages.conversation.maxTokens"),name:"maxTokens"},{default:o((()=>[i(J,{modelValue:q.value.maxTokens,"onUpdate:modelValue":a[17]||(a[17]=e=>q.value.maxTokens=e),inputNumberProps:"",showStep:"",min:1024,max:61440,step:1024},null,8,["modelValue"])])),_:1},8,["label"]),i(p,{label:n(k)("pages.conversation.topP"),name:"topP"},{default:o((()=>[i(J,{modelValue:q.value.topP,"onUpdate:modelValue":a[18]||(a[18]=e=>q.value.topP=e),inputNumberProps:"",showStep:"",min:0,max:1,step:.1},null,8,["modelValue"])])),_:1},8,["label"]),W.value.name.startsWith("cozec")?(l(),t(p,{key:8,label:"",tips:"会将话中的角色设定附加到每次发送的用户消息上"},{default:o((()=>[i(x,{modelValue:q.value.additionalData.useConversationSetting,"onUpdate:modelValue":a[19]||(a[19]=e=>q.value.additionalData.useConversationSetting=e)},{default:o((()=>a[24]||(a[24]=[r("使用会话的角色设定")]))),_:1},8,["modelValue"])])),_:1})):g("",!0),i(p,{label:e.$t("pages.setting.model.model_prompt"),name:"prompt",tips:e.$t("pages.setting.model.prompt_tips")},{default:o((()=>[i(X,{modelValue:q.value.prompt,"onUpdate:modelValue":a[20]||(a[20]=e=>q.value.prompt=e),autosize:{minRows:2,maxRows:5},name:"prompt"},null,8,["modelValue"])])),_:1},8,["label","tips"]),i(p,null,{default:o((()=>[v("div",ne,[i(V,{variant:"outline",onClick:_e},{default:o((()=>[r(d(e.$t("pages.setting.model.cancel")),1)])),_:1}),i(V,{theme:"primary",type:"submit"},{default:o((()=>[r(d(e.$t("pages.setting.model.confirm")),1)])),_:1})])])),_:1})])),_:1},8,["data"])])),_:1},8,["visible","header"])}}}),de={class:"search-box",style:{"margin-bottom":"16px"}},pe={class:"list-card-items"},me={class:"list-card-pagination"},ce=e({name:"ListModel",setup(e){const s=m(""),u=b(),r=m({current:1,pageSize:31,total:0}),d=a((()=>{const e=u.models.filter((e=>e.name.includes(s.value)||e.apiModel.includes(s.value)));return r.value.total=e.length,e})),p=m(void 0),c=a((()=>p.value?k("pages.setting.model.confirm_delete_model",{modelName:p.value.name}):"")),g=()=>{u.remove(p.value.id),$.value=!1,J.success(k("pages.setting.model.delete_success"))},x=m(!1),$=m(!1),S=m({...ue}),C=e=>{r.value.pageSize=e,r.value.current=1},U=e=>{r.value.current=e},B=e=>{$.value=!0,p.value=e},z=()=>{p.value=void 0},M=()=>{S.value={...ue,keys:[]},x.value=!0},K=e=>{if(!h.dict[e.type])return void J.error(k("pages.setting.model.model_provider_not_exist"));const a={...e,
6
+ // 清空ID,作为新模型
7
+ name:`${e.name} (副本)`};S.value={id:"",name:a.name,status:a.status?"1":"0",description:a.description,type:a.type.toString(),apiBase:a.apiBase,apiKey:a.apiKey,apiModel:a.apiModel,keys:a.keys?JSON.parse(JSON.stringify(a.keys)):[],likes:a.likes,prompt:a.prompt,temperature:a.temperature||V,topP:a.topP||w,maxTokens:a.maxTokens||j,stream:a.stream,additionalData:a.additionalData?JSON.parse(JSON.stringify(a.additionalData)):{}},x.value=!0};return(e,a)=>{const u=P,p=T,m=D,b=W,A=E,O=q,N=R;return l(),_("div",null,[v("div",de,[i(u,{modelValue:s.value,"onUpdate:modelValue":a[0]||(a[0]=e=>s.value=e),placeholder:"搜索模型"},null,8,["modelValue"])]),v("div",pe,[i(A,{gutter:[16,16]},{default:o((()=>[i(b,{xs:12,lg:4,xl:3},{default:o((()=>[i(m,{theme:"normal","hover-shadow":"",class:"list-card-item border-dashed",style:{"border-color":"var(--td-brand-color-active)"},title:e.$t("pages.setting.model.add_model"),onClick:M},{avatar:o((()=>[i(p,{size:"56px"},{icon:o((()=>[i(n(Q))])),_:1})])),_:1},8,["title"])])),_:1}),(l(!0),_(y,null,f(d.value.slice(r.value.pageSize*(r.value.current-1),r.value.pageSize*r.value.current),(e=>(l(),t(b,{key:e.id,xs:12,lg:4,xl:3},{default:o((()=>[i(ee,{class:"list-card-item",product:e,onDeleteItem:B,onCopyItem:K,onClick:a=>(e=>{h.dict[e.type]?(S.value={id:e.id,name:e.name,status:e.status?"1":"0",description:e.description,type:e.type.toString(),apiBase:e.apiBase,apiKey:e.apiKey,apiModel:e.apiModel,keys:e.keys?JSON.parse(JSON.stringify(e.keys)):[],likes:e.likes,prompt:e.prompt,temperature:e.temperature||V,
8
+ //生成随机性
9
+ topP:e.topP||w,maxTokens:e.maxTokens||j,stream:e.stream,additionalData:e.additionalData?JSON.parse(JSON.stringify(e.additionalData)):{}},x.value=!0):J.error(k("pages.setting.model.model_provider_not_exist"))})(e)},null,8,["product","onClick"])])),_:2},1024)))),128))])),_:1})]),v("div",me,[i(O,{modelValue:r.value.current,"onUpdate:modelValue":a[1]||(a[1]=e=>r.value.current=e),"page-size":r.value.pageSize,"onUpdate:pageSize":a[2]||(a[2]=e=>r.value.pageSize=e),total:r.value.total,"page-size-options":[31],onPageSizeChange:C,onCurrentChange:U},null,8,["modelValue","page-size","total","page-size-options"])]),i(re,{visible:x.value,"onUpdate:visible":a[3]||(a[3]=e=>x.value=e),data:S.value},null,8,["visible","data"]),i(N,{visible:$.value,"onUpdate:visible":a[4]||(a[4]=e=>$.value=e),header:e.$t("pages.setting.model.confirm_delete_selected_model"),body:c.value,"on-cancel":z,onConfirm:g},null,8,["visible","header","body"])])}}});export{ce as default};
.output/public/assets/main-apEI6pT3.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Rpu0PRbo.js","./@vue-CfxotJ-S.js","./@babel-ynFNPEB3.js","./core-js-pure-Dnpx5JGu.js","./vue-router-DKqWD4MR.js","./mermaid-render-f9KGMq_P.js","./mermaid-CFwXVJJh.js","./@mermaid-js-C9iCgeAb.js","./langium-BVNt58jJ.js","./vscode-jsonrpc-B7fdjHWu.js","./chevrotain-Cp5uJ8YW.js","./@chevrotain-DFy4Htpj.js","./lodash-es-RhymR7yg.js","./chevrotain-allstar-WPou0XcH.js","./vscode-languageserver-types-BtnkyLj9.js","./vscode-languageserver-textdocument-ygi3JyHC.js","./vscode-uri-DEKkV-x5.js","./ts-dedent-CttZBlkd.js","./d3-transition-0ltv4da8.js","./d3-timer-keMr1twq.js","./d3-dispatch-Chq_f_hl.js","./d3-interpolate-Ct9kki6l.js","./d3-color-D5ULnJIe.js","./d3-selection-Oxnq6l6A.js","./d3-ease-Cx6bG2vu.js","./d3-zoom-Dz8HuW59.js","./dompurify-DRcrZKbd.js","./stylis-Cl7w7uv3.js","./dagre-d3-es-D8JeTxsO.js","./@braintree-BB7t-Iuh.js","./khroma-C2oHPU0S.js","./dayjs-Cbdj87rt.js","./d3-scale-CdkN4P7M.js","./internmap-B8oPgqVZ.js","./d3-array-BhN1wQGI.js","./d3-format-C0lSXcPg.js","./d3-time-format-DB2uBv1t.js","./d3-time-B1kAM736.js","./d3-axis-pCwzqJ1S.js","./d3-shape-C6CU9yox.js","./d3-path-QSrLXsQ3.js","./roughjs-Bkc4UHOn.js","./cytoscape-BsbaL92W.js","./cytoscape-cose-bilkent-CcQu5e-H.js","./cose-base-kQthUiMK.js","./layout-base-DqRk0Tgc.js","./d3-sankey-B6tQBass.js","./d3-scale-chromatic-FDBKL9jm.js","./@iconify-BUO7KvjM.js","./marked-CrLTNeyQ.js","./cytoscape-fcose-B58q80h4.js","./pinia-gf2247cH.js","./pinia-plugin-persistedstate-CxGPmdL5.js","./destr-WfmzGWA8.js","./deep-pick-omit-DP_A4OSP.js","./lodash-VDnThKtA.js","./tdesign-vue-next-BiEwLJDx.js","./tdesign-icons-vue-next-Bre5yOVt.js","./tdesign-icons-vue-next-BGgy7GQY.css","./sortablejs-DGtSoqI-.js","./@popperjs-B4tvfKWZ.js","./tdesign-vue-next-BiLJzazs.css","./@vueuse-B4dz7nOv.js","./vue-i18n-BLIfPQxk.js","./@intlify-eboPrqDD.js","./@mozilla-BD532_dh.js","./tvision-color-BdwcCUqE.js","./chroma-js-CJzpYopr.js","./@material-C_XhzpVg.js","./bezier-easing-BncZ6jfA.js","./ChatInput.vue_vue_type_style_index_0_lang-B1k4vI4G.js","./mammoth-Cw8VHd7C.js","./xlsx-DB6BMndo.js","./pdfjs-dist-8WFUNQXM.js","./ChatInput-BMuO6hgs.css","./app-_ksMLlTy.js","./uuid-_R2nDvl_.js","./vuedraggable-DAEPkKhD.js","./vue-BIpqWpgL.js","./index-DWphMrS1.css","./chat-D0D5Rfde.js","./avatar.vue_vue_type_script_setup_true_lang-IaazOHzd.js","./@dicebear-JcnEMRoc.js","./fetch-SJxNIU2V.js","./eventsource-parser-D0ssca5s.js","./ToolBar.vue_vue_type_style_index_0_lang-Cn5BAuq2.js","./markdown-ppShADW8.js","./markdown-it-link-attributes-DRKqjf49.js","./markdown-it-C8SkdHr7.js","./mdurl-CDXpswLz.js","./uc.micro-CLkLCS2f.js","./entities-D7HTx9ov.js","./linkify-it-LcVOBuC5.js","./punycode.js-Bmr3cAX8.js","./@traptitech-xv_Vpjqh.js","./katex-Vs6-m9jZ.js","./markdown-it-highlightjs-IY8LrfKU.js","./highlight.js-BgdnSEsd.js","./@wdns-C8Xpkjrj.js","./ua-parser-js--QiuJfYt.js","./ToolBar-D6vK1x-j.css","./lyihub-zLFv36Ly.js","./chat-DFdPOgte.css","./index-BBncn3uI.js","./index-Bg5EKroP.css","./index-yWHmk0id.js","./index-Dn5cn9RI.js","./index-BVHqhU3I.js","./FrameContent-CMuBQUlq.js","./FrameContent-CUoI637t.css","./about-CMJ551TJ.js","./help-BZX2GmDP.js","./changelog-TTyyWe_7.js","./index-DleTV0S_.js","./content-DfpBbjNi.js","./content-CXerDfC_.css"])))=>i.map(i=>d[i]);
2
+ var e;import{i as t,l as a,a as s,_ as n,p as i,u as r,b as o,c as l,t as d,s as c,d as u,m as p}from"./mermaid-render-f9KGMq_P.js";import{f as m,l as v,J as h,y as f,a9 as g,v as y,aa as A,G as D,H as C,F as E,ab as j,ac as b,I as w,u as k,R as F,z as x,A as _,o as S,a as I,w as M,ad as L,V as R,U as O}from"./@vue-CfxotJ-S.js";import{_ as z}from"./@mermaid-js-C9iCgeAb.js";import{u as P,a as V,c as U,b as N}from"./vue-router-DKqWD4MR.js";import{u as T}from"./@vueuse-B4dz7nOv.js";import{u as W}from"./vue-i18n-BLIfPQxk.js";import{B as X,a as Q,H as G,M as H,L as B,C as Z,F as J,S as q,b as Y,R as K,c as $,d as ee,P as te,T as ae,A as se,e as ne,f as ie,g as re,h as oe,i as le,j as de}from"./tdesign-vue-next-BiEwLJDx.js";import{d as ce}from"./pinia-gf2247cH.js";import{Q as ue,R as pe,d as me,B as ve,S as he,T as fe,K as ge,U as ye}from"./tdesign-icons-vue-next-Bre5yOVt.js";import{d as Ae}from"./vuedraggable-DAEPkKhD.js";import"./lodash-VDnThKtA.js";import"./mermaid-CFwXVJJh.js";import"./ts-dedent-CttZBlkd.js";import"./d3-transition-0ltv4da8.js";import"./d3-timer-keMr1twq.js";import"./d3-dispatch-Chq_f_hl.js";import"./d3-interpolate-Ct9kki6l.js";import"./d3-color-D5ULnJIe.js";import"./d3-selection-Oxnq6l6A.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-Dz8HuW59.js";import"./dompurify-DRcrZKbd.js";import"./lodash-es-RhymR7yg.js";import"./stylis-Cl7w7uv3.js";import"./dagre-d3-es-D8JeTxsO.js";import"./@braintree-BB7t-Iuh.js";import"./khroma-C2oHPU0S.js";import"./dayjs-Cbdj87rt.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./d3-scale-CdkN4P7M.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-BhN1wQGI.js";import"./d3-format-C0lSXcPg.js";import"./d3-time-format-DB2uBv1t.js";import"./d3-time-B1kAM736.js";import"./d3-axis-pCwzqJ1S.js";import"./d3-shape-C6CU9yox.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-Bkc4UHOn.js";import"./cytoscape-BsbaL92W.js";import"./cytoscape-cose-bilkent-CcQu5e-H.js";import"./cose-base-kQthUiMK.js";import"./layout-base-DqRk0Tgc.js";import"./d3-sankey-B6tQBass.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./@iconify-BUO7KvjM.js";import"./marked-CrLTNeyQ.js";import"./cytoscape-fcose-B58q80h4.js";import"./pinia-plugin-persistedstate-CxGPmdL5.js";import"./destr-WfmzGWA8.js";import"./deep-pick-omit-DP_A4OSP.js";import"./@mozilla-BD532_dh.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./@intlify-eboPrqDD.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./vue-BIpqWpgL.js";const De=ce("agent",{state:()=>({agents:[],defaultAgent:{id:"1",name:"小助手",content:"你是一个有用的人工智能助手。你可以通过回答我的问题来帮助我。",status:!0,avatar:"data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20180%20180%22%20fill%3D%22none%22%20shape-rendering%3D%22auto%22%3E%3Cmetadata%20xmlns%3Ardf%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22%20xmlns%3Adc%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%22%20xmlns%3Adcterms%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%22%3E%3Crdf%3ARDF%3E%3Crdf%3ADescription%3E%3Cdc%3Atitle%3EBottts%3C%2Fdc%3Atitle%3E%3Cdc%3Acreator%3EPablo%20Stanley%3C%2Fdc%3Acreator%3E%3Cdc%3Asource%20xsi%3Atype%3D%22dcterms%3AURI%22%3Ehttps%3A%2F%2Fbottts.com%2F%3C%2Fdc%3Asource%3E%3Cdcterms%3Alicense%20xsi%3Atype%3D%22dcterms%3AURI%22%3Ehttps%3A%2F%2Fbottts.com%2F%3C%2Fdcterms%3Alicense%3E%3Cdc%3Arights%3ERemix%20of%20%E2%80%9EBottts%E2%80%9D%20(https%3A%2F%2Fbottts.com%2F)%20by%20%E2%80%9EPablo%20Stanley%E2%80%9D%2C%20licensed%20under%20%E2%80%9EFree%20for%20personal%20and%20commercial%20use%E2%80%9D%20(https%3A%2F%2Fbottts.com%2F)%3C%2Fdc%3Arights%3E%3C%2Frdf%3ADescription%3E%3C%2Frdf%3ARDF%3E%3C%2Fmetadata%3E%3Cmask%20id%3D%22viewboxMask%22%3E%3Crect%20width%3D%22180%22%20height%3D%22180%22%20rx%3D%220%22%20ry%3D%220%22%20x%3D%220%22%20y%3D%220%22%20fill%3D%22%23fff%22%20%2F%3E%3C%2Fmask%3E%3Cg%20mask%3D%22url(%23viewboxMask)%22%3E%3Cg%20transform%3D%22translate(0%2066)%22%3E%3Cmask%20id%3D%22sidesAntenna01-a%22%20style%3D%22mask-type%3Aluminance%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%226%22%20y%3D%2211%22%20width%3D%22156%22%20height%3D%2251%22%3E%3Cg%20fill%3D%22%23fff%22%3E%3Crect%20x%3D%226%22%20y%3D%2231%22%20width%3D%2236%22%20height%3D%2214%22%20rx%3D%224%22%2F%3E%3Crect%20x%3D%2218%22%20y%3D%2214%22%20width%3D%2236%22%20height%3D%2248%22%20rx%3D%224%22%2F%3E%3Crect%20x%3D%22126%22%20y%3D%2228%22%20width%3D%2236%22%20height%3D%2224%22%20rx%3D%224%22%2F%3E%3Cpath%20d%3D%22M11%2011h2v20h-2z%22%2F%3E%3C%2Fg%3E%3C%2Fmask%3E%3Cg%20mask%3D%22url(%23sidesAntenna01-a)%22%3E%3Cpath%20d%3D%22M0%200h180v76H0V0Z%22%20fill%3D%22%2300acc1%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20fill-opacity%3D%22.3%22%20d%3D%22M0%200h180v76H0z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.1%22%20d%3D%22M0%2038h180v38H0z%22%2F%3E%3C%2Fg%3E%3Cpath%20fill%3D%22%23fff%22%20fill-opacity%3D%22.4%22%20d%3D%22M11%2011h2v20h-2z%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%228%22%20r%3D%224%22%20fill%3D%22%23FFEA8F%22%2F%3E%3Ccircle%20cx%3D%2213%22%20cy%3D%227%22%20r%3D%222%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(41)%22%3E%3Cmask%20id%3D%22topPyramid-a%22%20style%3D%22mask-type%3Aluminance%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%2218%22%20y%3D%228%22%20width%3D%2264%22%20height%3D%2244%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22m50%208%2032%2044H18L50%208Z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fmask%3E%3Cg%20mask%3D%22url(%23topPyramid-a)%22%3E%3Cpath%20d%3D%22M0%200h100v52H0V0Z%22%20fill%3D%22%2300acc1%22%2F%3E%3Cpath%20d%3D%22M0%200h100v52H0V0Z%22%20fill%3D%22%23fff%22%20fill-opacity%3D%22.3%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20fill-opacity%3D%22.8%22%20d%3D%22M50%204h30v48H50z%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(25%2044)%22%3E%3Cmask%20id%3D%22faceRound01-a%22%20style%3D%22mask-type%3Aluminance%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%220%22%20y%3D%220%22%20width%3D%22130%22%20height%3D%22120%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M66%200c58.35%200%2064%2040.69%2064%2078%200%2033.31-25.47%2042-64%2042-37.46%200-66-8.69-66-42C0%2040.69%207.65%200%2066%200Z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fmask%3E%3Cg%20mask%3D%22url(%23faceRound01-a)%22%3E%3Cpath%20d%3D%22M-4-2h138v124H-4V-2Z%22%20fill%3D%22%2300acc1%22%2F%3E%3Cg%20transform%3D%22translate(-1%20-1)%22%3E%3Cg%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M-9.12%20122.1c4.36-30.7%2013.06-4.57%2033.99-9.98%209.24-2.39%201.77-12.82%208.67-17.35%205.82-3.82%2013.76-.74%2020.43-3.21%209.63-3.57%209.5-10.82%2018.48-11.9%208.48-1.03%2017.37%202.34%2025.93%201.08%2016.15-2.4%209.53-34.03%2021.64-39.61%2012.1-5.6%2032.05%204.06%2034.66%2019.87%202.54%2015.42-14.46%2072.78-14.46%2072.78H-9.12%22%20fill-opacity%3D%22.2%22%2F%3E%3Cpath%20d%3D%22M35.93%20122c37.67%200%2041.6-14.75%2060.14-21.5%2018.53-6.76%2034.78%2010.71%2041-6.27%206.24-16.98%206.2%2035.95%206.2%2035.95H35.94V122Z%22%20fill-opacity%3D%22.1%22%2F%3E%3Cpath%20d%3D%22M-2%204.87C9.73%203.75%205.96%2016.8%2010.6%2016.8c1.85%200%204.03-8.46%207.38-8.46%202.46%200%202%205.5%207.32%204.91%205-.54%204.08-4%206.6-4%205.45%200%203.39%2020.2%207.74%2020.2%204.36%200%205.73-14.8%207.65-20.64%202.43-7.4%2016.97-11.56%206.6-14.5H-2.29%22%20fill-opacity%3D%22.4%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(52%20124)%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18%2010.22C18%2021.78%2024.47%2028%2038%2028c13.52%200%2020-6.34%2020-17.78C58%209.5%2057.17%208%2055%208H21c-2.05%200-3%201.38-3%202.22Z%22%20fill%3D%22%23000%22%20fill-opacity%3D%22.8%22%2F%3E%3Cmask%20id%3D%22mouthSmile02-a%22%20style%3D%22mask-type%3Aluminance%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%2218%22%20y%3D%228%22%20width%3D%2240%22%20height%3D%2220%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18%2010.22C18%2021.78%2024.47%2028%2038%2028c13.52%200%2020-6.34%2020-17.78C58%209.5%2057.17%208%2055%208H21c-2.05%200-3%201.38-3%202.22Z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fmask%3E%3Cg%20mask%3D%22url(%23mouthSmile02-a)%22%3E%3Crect%20x%3D%2230%22%20y%3D%222%22%20width%3D%2216%22%20height%3D%2214%22%20rx%3D%222%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(38%2076)%22%3E%3Cg%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%3E%3Cpath%20d%3D%22M53%200c34.75%200%2049%2017.47%2049%2031%200%2013.53-19.59%2017-49%2017-29.05%200-51-3.47-51-17S17.11%200%2053%200Z%22%20fill%3D%22%23000%22%20fill-opacity%3D%22.8%22%2F%3E%3Cpath%20d%3D%22M28.82%2034.65c-6.53-1.35-11.24-6.34-10.52-11.14.72-4.79%206.6-7.58%2013.12-6.23%206.53%201.36%2011.24%206.35%2010.52%2011.15-.72%204.8-6.6%207.59-13.12%206.23ZM75.42%2034.65c-6.52%201.36-12.4-1.43-13.12-6.23-.72-4.8%204-9.8%2010.52-11.15%206.52-1.35%2012.4%201.44%2013.12%206.24.72%204.81-4%209.8-10.52%2011.15Z%22%20fill%3D%22%2325A6F5%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E",onboarding:"你好,我是小助手",isDefault:!0}}),getters:{},actions:{add(e){e.id!==this.defaultAgent.id&&this.agents.push(e)},remove(e){this.defaultAgent.id!==e&&(this.agents=this.agents.filter((t=>t.id!==e)))},update(e){if(this.defaultAgent.id===e.id)return void(this.defaultAgent=e);const t=this.agents.findIndex((t=>t.id===e.id));-1!==t&&(this.agents[t]=e)},find(e){return this.defaultAgent.id===e?this.defaultAgent:this.agents.find((t=>t.id===e))}}});const Ce={getItem:e=>window.ipcRenderer.sendSync("GetConfig","note.json",e)||null,setItem:(e,t)=>{window.ipcRenderer.send("SaveConfig","note.json",e,t)}},Ee=ce("note",{state:()=>({list:[]}),getters:{data(){return this.list}},actions:{add(e){this.list.push(e)},remove(e){this.list=this.list.filter((t=>t.id!==e))},update(e){const t=this.list.findIndex((t=>t.id===e.id));-1!==t&&(this.list[t]=e)},find(e){return this.list.find((t=>t.id===e))}},persist:{
3
+ // 在这里进行自定义配置
4
+ storage:window.ipcRenderer?Ce:localStorage}});function je(){const{locale:e}=W({useScope:"global"});return{changeLocale:function(t){s.includes(t)||(t="zh_CN"),e.value=t,T(a,"zh_CN").value=t},getComponentsLocale:m((()=>t.global.getLocaleMessage(e.value).componentsLocale)),locale:e}}const be=n(v({__name:"Breadcrumb",setup(e){const{locale:t}=je(),a=P(),s=m((()=>{const e=a.path.split("/");e.shift();return e.reduce(((e,s,n)=>{var i;const r=null==(i=a.matched[n])?void 0:i.meta;if((null==r?void 0:r.hiddenBreadcrumb)||Object.values(a.params).includes(s))return e;let o=s;return(null==r?void 0:r.title)&&(o="string"==typeof r.title?r.title:r.title[t.value]),e.push({path:s,to:e[n-1]?`/${e[n-1].path}/${s}`:`/${s}`,title:o}),e}),[])}));return(e,t)=>{const a=Q,n=X;return f(),h(n,{"max-item-width":"150",class:"tdesign-breadcrumb"},{default:g((()=>[(f(!0),y(E,null,A(s.value,(e=>(f(),h(a,{key:e.to,to:e.to},{default:g((()=>[D(C(e.title),1)])),_:2},1032,["to"])))),128))])),_:1})}}}),[["__scopeId","data-v-7ec7ffe3"]]),we=n(v({__name:"Content",setup:e=>(e,t)=>{const a=j("router-view");return f(),h(a,null,{default:g((({Component:e})=>[(f(),h(b(e)))])),_:1})}}),[["__scopeId","data-v-d7ed7a08"]]),ke=n(v({__name:"Footer",setup:e=>(e,t)=>(f(),y("div",{class:w([k(i)+"-footer","flex justify-center items-center"])},"Copyright © 2021-"+C((new Date).getFullYear())+" openseedsoft. All Rights Reserved",3))}),[["__scopeId","data-v-f64c9180"]]),Fe=v({__name:"SettingMenu",props:{theme:{type:String,default:"light"},menu:{type:Array,default:()=>[]}},setup(e){const t=e;V(),r(),De();const{locale:a}=je(),s=m((()=>nt())),n=m((()=>t.theme));return(t,i)=>{const r=H,o=G;return f(),h(o,{theme:n.value,value:s.value,class:"shadow-md"},{default:g((()=>[(f(!0),y(E,null,A(e.menu,(e=>(f(),h(r,{key:e.path,value:`/setting/${e.path}`,to:{path:e.path}},{default:g((()=>{return[D(C((t=e.meta.title,"string"==typeof t?t:t[a.value])),1)];var t})),_:2},1032,["value","to"])))),128))])),_:1},8,["theme","value"])}}}),xe=v({__name:"LayoutContent",setup(e){const t=r(),a=o(),s=P();let n=tt;const l=m((()=>{var e;if(0==s.path.startsWith("/setting"))return null;return(null==(e=n.find((e=>"/setting"===e.path)))?void 0:e.children).filter((e=>{var t,s;return!(null==(t=e.meta)?void 0:t.isPro)||(null==(s=e.meta)?void 0:s.isPro)&&a.isPro})).filter((e=>(e.path.includes("api"),!0)))}));return(e,a)=>{const s=Z,n=J,r=B;return f(),h(r,{class:w([`${k(i)}-layout`,"flex flex-col h-full"])},{default:g((()=>[F(s,{class:w([`${k(i)}-content-layout`,"flex-1"])},{default:g((()=>[k(t).showBreadcrumb?(f(),h(be,{key:0})):x("",!0),l.value?(f(),h(Fe,{key:1,theme:k(t).displayMode,menu:l.value,class:"mb-4 w-full overflow-x-auto"},null,8,["theme","menu"])):x("",!0),F(we)])),_:1},8,["class"]),k(t).showFooter?(f(),h(n,{key:0,class:w(`${k(i)}-footer-layout`)},{default:g((()=>[F(ke)])),_:1},8,["class"])):x("",!0)])),_:1},8,["class"])}}}),_e=v({__name:"MenuContent",props:{navData:{type:Array,default:()=>[]}},setup(e){const t=e,a=m((()=>nt())),{locale:s}=je(),n=m((()=>{const{navData:e}=t;return o(e)})),i=e=>{if("string"==typeof e.icon)return React.createElement("t-icon",{name:e.icon});return e.icon},r=e=>"string"==typeof e?e:e[s.value],o=(e,t)=>e&&0!==e.length?(e.sort(((e,t)=>{var a,s;return((null==(a=e.meta)?void 0:a.orderNo)||0)-((null==(s=t.meta)?void 0:s.orderNo)||0)})),e.map((e=>{var a,s;const n=t&&!e.path.includes(t)?`${t}/${e.path}`:e.path;return{path:n,title:null==(a=e.meta)?void 0:a.title,icon:null==(s=e.meta)?void 0:s.icon,children:o(e.children,n),meta:e.meta,redirect:e.redirect}})).filter((e=>e.meta&&!0!==e.meta.hidden))):[],l=e=>{const{frameSrc:t,frameBlank:a}=e.meta;return t&&a?t.match(/(http|https):\/\/([\w.]+\/?)\S*/):null},d=e=>{var t;return a.value.split("/").length>e.path.split("/").length&&a.value.startsWith(e.path)||a.value===e.path?a.value:(null==(t=e.meta)?void 0:t.single)?e.redirect:e.path};return(e,t)=>{const a=H,s=j("menu-content",!0),o=q;return f(),y("div",null,[(f(!0),y(E,null,A(n.value,(e=>{var t;return f(),y(E,{key:e.path},[e.children&&e.children.length&&!(null==(t=e.meta)?void 0:t.single)?(f(),h(o,{key:1,name:e.path,value:e.path,title:r(e.title)},{icon:g((()=>[(f(),h(b(i(e)),{class:"t-icon"}))])),default:g((()=>[e.children?(f(),h(s,{key:0,"nav-data":e.children},null,8,["nav-data"])):x("",!0)])),_:2},1032,["name","value","title"])):(f(),y(E,{key:0},[l(e)?(f(),h(a,{key:0,name:e.path,value:d(e),onClick:t=>{return a=l(e)[0],void window.open(a);var a}},{icon:g((()=>[(f(),h(b(i(e)),{class:"t-icon"}))])),default:g((()=>[D(" "+C(r(e.title)),1)])),_:2},1032,["name","value","onClick"])):(f(),h(a,{key:1,name:e.path,value:d(e),to:{path:e.path}},{icon:g((()=>[(f(),h(b(i(e)),{class:"t-icon"}))])),default:g((()=>[D(" "+C(r(e.title)),1)])),_:2},1032,["name","value","to"]))],64))],64)})),128))])}}}),Se={class:"header-operate-left"},Ie={key:1,class:"text-center font-bold w-full pr-16 overflow-hidden text-ellipsis whitespace-nowrap"},Me=n(v({__name:"Header",props:{theme:{type:String,default:"light"},menu:{type:Array,default:()=>[]},isCompact:{type:Boolean,default:!1},maxLevel:{type:Number,default:3}},setup(e){const t=e;V();const{locale:a}=je(),s=P(),n=r(),o=l(),d=m((()=>nt())),c=m((()=>[`${i}-header-layout`])),u=m((()=>t.theme)),p=()=>{n.updateConfig({isSidebarCompact:!n.isSidebarCompact})};function v(e,t,a=""){for(const s of e){const e=a+s.path;if(e===t)return s;if(s.children){const a=v(s.children,t,e+"/");if(a)return a}}return null}const A=m((()=>{var e,t;if(s.path.startsWith("/setting")){return(null==(e=v(tt,"/setting"))?void 0:e.meta).title[a.value]}if("/conversation/chat"===s.path){return o.find(s.query.id).name}const n=null==(t=v(tt,s.path))?void 0:t.meta;return n?n.title[a.value]:s.path}));return(t,a)=>{const s=Y,i=G;return f(),y("div",{class:w([c.value,"h-full"])},[F(i,{theme:u.value,"expand-type":"popup",value:d.value},{logo:g((()=>[_("div",Se,[F(s,{theme:"default",shape:"square",variant:"text",onClick:p},{default:g((()=>[F(k(ue),{name:"view-list"})])),_:1})])])),default:g((()=>[!0===k(n).showNav?(f(),h(_e,{key:0,class:"header-menu","nav-data":e.menu},null,8,["nav-data"])):(f(),y("div",Ie,C(A.value),1))])),operations:g((()=>a[0]||(a[0]=[_("div",{class:"operations-container"},null,-1)]))),_:1},8,["theme","value"])],2)}}}),[["__scopeId","data-v-066d80f0"]]),Le=v({__name:"LayoutHeader",setup(e){const t=r();let a=tt;return(e,s)=>(f(),h(Me,{theme:k(t).displayMode,menu:k(a),"is-compact":k(t).isSidebarCompact},null,8,["theme","menu","is-compact"]))}}),Re=""+new URL("assets-t-logo-CxwPZnhN.png",import.meta.url).href,Oe={name:"seedchat",private:!0,description:"seedchat",author:{name:"zhepama",email:"[email protected]"},version:"1.0.6",type:"module",scripts:{debug:'concurrently "npm run server:dev" "npm run render:debug"',dev:'concurrently "npm run server:dev" "npm run render:dev"',build:"npm run clean && npm run server:build && npm run render:build && npm run electron:build ","build:local":"npm run build && npm run build:post","build:tencent":"node scripts/tencent.js && cross-env PWA=true vite build","electron:preview":"npm run server:build && vite --mode production","electron:build":"cross-env DEBUG=electron-builder* electron-builder --publish never --dir","render:dev":"vite --mode development --host","render:debug":"cross-env VSCODE_DEBUG=true vite --mode development","render:build":" vite build ","render:preview":"cross-env PWA=true vite build && vite preview","server:pages":"cross-env PWA=true npm run render:build && shx cp -r ./dist/* ./server/public/ && shx rm -rf ./dist && nitro build ","server:build":"nitro build && shx mkdir -p ./dist-server && shx cp -r ./.output/* ./dist-server/","server:cloudflare":" npm run server:cloudflare:script && npm run server:pages ","server:cloudflare:script":"node scripts/cloudflare.js ","server:cloudflare:local":"cross-env NITRO_PRESET=cloudflare_pages nitro build && wrangler pages dev dist/","server:dev":"cross-env CONFIG_PATH=.\\ nitro dev --host","server:prepare":"npm run proto:generate && nitro prepare","server:preview":"node dist-server/server/index.mjs",test:"vitest","build:post":"shx mkdir -p D:\\Applications\\seedchat && shx cp -r ./release/win-unpacked/* D:\\Applications\\seedchat",clean:"shx rm -rf ./dist/* && shx rm -rf ./dist-electron/* && shx rm -rf ./dist-server/* && shx rm -rf ./dist-docs/*","docs:dev":"vuepress dev docs","docs:build":"vuepress build docs","proto:generate":"pbjs -t static-module --es6 -w es6 -o server/proto/messages.js server/proto/messages.proto && pbts -o server/proto/messages.d.ts server/proto/messages.js"},dependencies:{"@dicebear/collection":"^8.0.1","@dicebear/core":"^8.0.1","@grpc/grpc-js":"^1.12.6","@mozilla/readability":"^0.5.0","@traptitech/markdown-it-katex":"^3.6.0","@types/form-data":"^2.5.2","@types/ws":"^8.5.14","@vueuse/core":"^12.7.0","@wdns/vue-code-block":"^2.3.5","electron-context-menu":"^4.0.5","electron-findbar":"^0.6.4","eventsource-parser":"^3.0.0","form-data":"^4.0.2","highlight.js":"^11.11.1",jose:"^6.0.8",mammoth:"^1.9.0","markdown-it":"^14.1.0","markdown-it-highlightjs":"^4.2.0","markdown-it-link-attributes":"^4.0.1",mermaid:"^11.6.0","pdfjs-dist":"^4.10.38",pinia:"^2.3.1","pinia-plugin-persistedstate":"^4.2.0",protobufjs:"^7.4.0","tdesign-icons-vue-next":"^0.3.4","tdesign-vue-next":"latest",turndown:"^7.2.0","tvision-color":"^1.6.0",undici:"^7.4.0",uuid:"^11.1.0",vue:"^3.5.13","vue-i18n":"^11.1.1","vue-router":"^4.5.0",vuedraggable:"^4.1.0",ws:"^8.18.1",xlsx:"^0.18.5"},devDependencies:{"@types/highlight.js":"^10.1.0","@types/markdown-it":"^14.1.2","@types/markdown-it-link-attributes":"^3.0.5","@types/turndown":"^5.0.5","@types/uuid":"^10.0.0","@vitejs/plugin-vue":"^5.2.1","@vuepress/bundler-vite":"^2.0.0-rc.14","@vuepress/theme-default":"^2.0.0-rc.37",autoprefixer:"^10.4.20",concurrently:"^9.1.2","cross-env":"^7.0.3",electron:"^34.0.1","electron-builder":"^25.1.8",less:"^4.2.2",nitropack:"latest",postcss:"^8.5.1","postcss-less":"^6.0.0","protobufjs-cli":"^1.1.3","sass-embedded":"^1.85.1",shx:"^0.3.4","swagger-ui-dist":"^5.20.0",tailwindcss:"^3.4.4",terser:"^5.39.0",typescript:"^5.8.2","unplugin-auto-import":"^19.1.1","unplugin-vue-components":"^28.4.1",vite:"^6.2.0","vite-plugin-electron":"^0.29.0","vite-plugin-electron-renderer":"^0.14.6","vite-plugin-javascript-obfuscator":"^3.1.0","vite-svg-loader":"^5.1.0",vitest:"^3.0.7","vue-tsc":"^2.2.6",vuepress:"^2.0.0-rc.14",wrangler:"^3.106.0"},main:"dist-electron/main.js",overrides:{canvas:"npm:dry-uninstall"}},ze={class:"flex justify-center w-full p-3"},Pe=["src"],Ve={class:"flex align-middle justify-center items-center"},Ue={class:"sidenav-menus overflow-y-auto flex-1"},Ne={class:"p-2"},Te={class:"flex w-full flex-col mb-2 gap-2 items-center align-middle justify-between"},We={class:"text-center"},Xe={class:"version-container"},Qe=n(v({__name:"SideNav",props:{theme:{type:String,default:"light"}},setup(e){o();const t=e,a=m((()=>r().isSidebarCompact)),s=P(),n=m((()=>nt()+`?id=${s.query.id}`)),c=m((()=>a.value?"":"Seed Chat PRO")),u=m((()=>[`${i}-sidebar-layout`,{hidden:a.value}])),p=m((()=>[`${i}-side-nav-logo-${a.value?"t":"tdesign"}-logo`])),v=V(),A=r(),E=()=>{const e=window.innerWidth<=991;A.updateConfig({isSidebarCompact:e,isCompact:e})};S((()=>{E(),window.onresize=()=>{E()}}));const j=()=>{v.push("/")},b=I("conversation"),R=l(),O=Ee(),z=I([]),U=I([]);M((()=>R.list.length),(()=>{z.value=R.data.map((e=>e))}),{immediate:!0}),M((()=>O.list.length),(()=>{U.value=O.data.map((e=>e))}),{immediate:!0});const N=()=>{R.list=[...z.value]},T=()=>{O.list=[...U.value]};M((()=>s.path),(e=>{e.startsWith("/note")?b.value="favorite":b.value="conversation"}),{immediate:!0});const W=e=>{v.push(e)};return(e,s)=>{const i=K,r=$,o=se,l=Y,m=ae,A=te,E=H,S=ee;return f(),y("div",{class:w([u.value,"flex flex-col"])},[_("div",ze,[_("img",{src:a.value?Re:"light"==t.theme?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALMAAAAcCAYAAAAqXo7IAAAACXBIWXMAAAsTAAALEwEAmpwYAAAJ6klEQVR4nO1cXYwbVxX+zszY3h/vrtNtEiUEYtTwpz6si0pSUFBMC0Xw0N3CS/MA3YAopUiw5SVqX+q8VFUkYIsqARISzkOL+uaIh0YRECdKf9JIiSO1UqUI4UUNpSTN2rvZ9c947uFhrndnx/eOx2MnefEnjXZ8f849d+a755577p2lS5eWIQTQaAgAgBCAEAzLIhgGwTAAwyAIAarVnB/ZtngkmbSOx+NUajQEiAixGMG2GfW6A9M0kEgYIGIIwThw4B4MMcSdgBGUSQQQERoN8fVq1T69tub8qdnkw8vL9lvVauslIbCb6E6pOsQQwdCSmQhotfjTKyutV6rV1lnb5m+65AYAjNZq4ujqautSrSaeYoY5JPUQdxsdZCYCmDFeq4nnVlZalxsN8XMikJ+sstzO9XXnj8vL9rlGQ3wLIAxJPcTdwgaZ2yRsNsXhWk2cr9fFiwCmu5GTCLBt/tqtW87pRkO85jj8ZY8FH2KIOwarTbxWC1+p152jts3f75WM7bKOw4fX1505IXB8bMx4mYiWw8ugOQBzANKK7CKAEjMXPOWzALLhtdyCPDOXpZxcRBllZs5H1KUMoMDMlV4aJKI03GeUgfo5laRei546OY24jWegaGNeUX6jv1101LWnbTNEvVCgixeXP7W62nq+XhdPMbvk7hfMgGnS1ZER4zeHDk3/IVABogyAPICZLmKXmDntqZcD8EJEFb/BzEUphyPKOMvM2T51OQkgx8yloEJysOQAHAojlJk33qKuf94yirbOKLI2+hug5zyAPwcUedY70Hx1o76HDRirq63fr6+LZwA9kYkA0yRY1uZlGHrWEwFC8OfW1pyXgxqXVqCI7kQGgL0hyoRFaYCy+sEsgKIc0EoQ0SJccoUisqyjlXebkeuSP38b275iAUgFWeNEwkC9LlBdacFuurFowwDGxkxMTFhwHIbjqAcVEW51USAHYCqK5v2g1+ldg0HIANz+F4ko7deLiPIAnowgM9W/Wh0oBWVKq9zN4MzIfpYHpJMXFQuAo8ohAmIxA+ffrODMmWVcv9H0kJaQTJr40hfHMPvYDkxNmrBbkWaJjCZ9Ca7rUYH7YubQ+SBSmron4Pqkvbapal+HFMJZ92Oe+zRcv1r1wqcALMBj2aTrEkTkJQAFbB1UWYTvX6+odMnPhZQzB2BRkX5W0V4K6hmp/Y5T2OxvydK1GI8b+MeZZbz62kewLAP79o1idMQAMwACPvywjr/9/SY++aSFnz29B7EYQYieCa1zLzI+K5UjopS/jKZuvu0P94EyM+f6lAG/DNmHItT9XoAkhHS/gnzwY33qV+6jbgeIaAGdg7QKd7D5B+QCFGRW+eNyQKvIrHzHSjKbJuHmTRtvnLqBZNLCT368G/ffn2y3CjII1WoLr/7lv3j7nSouXKji4Ye3oV7vmcxnNcrOw9fhHlyDctjGFQPktoKZK3KBVULny58ioqx8SXMBYo6EiSr0gUwvheUzzCmy8vLyk3kvEWW6LXq7oKJKVJLZsgjlch0ff9zEo49O44EHJrC25rhWGQDA2LbNwne/cy8uX17Fv5ZqYN4WRak81GT+LRGlIlqfPBEVPb9T2HxBeR8RMlAjI/3Vsq9sClBbkbCQhC4A+KUiOyX/zmmqHxsQkQ9FiB6UNOkLUK97Fpm5TERL6By487JeN6RUibqBoCQzAWjIxd7YqIFWiz1EdmHbjETcPWTUbIqO/DBg5ry0VCrf8AW5Kp/vccF2CPqVfzGkjCmNTjpkFWlXAspXNOkZuFOzTv98SH0AbLgrg0JFIT8FNSlPeNY2BXQO3HlNPT8yoTST0J7N6IWcUYi8WZfn4Tr0KrRDV+noLWxBZUBybldbgXUiRAHSEXToBTloolFElJM+b0qRPSU3yQYK7QLQNF2SOo7rQ/thGG6+EIClyO8FzDxPRGWoFz0zAArSn6x40tMRmipFqHM7kNGkl4IqSderMmhlokAaGJWrBISb1ebhWu2BQUlmx2Hs3pXAxISJ9967hevX78H27bGNaAURgZnx7sUVrK052LEjDiPwMGl3MHNOElq1gzQDd4qd86SpQlzdQmrlkOoEhfcqIWUoIafmbETZWQyGACegf06LCLeJletTh9mIg1PrvinJbLcYe/aM4KsPpXDq9A387pV/Y2ZmApbpktgwCNeuNfDOu1Xs2hXHQwem0IoWZ94C6UOXod5OnQ0RcO81pJbVpA8ivKfDAtRT85JnYRMU5SkMQIeyrn9EVOlWWVrlKJs5fsyhx3UAAga81s1wHMb3Ht8OIRhvvV3F1av/A8hdHDIzLMvA3s+M4IkndmLnzvjGlyphIX2mkp+czFwkoitQW4c0BhwjHRAy3Qp4Fku6+HHBd68i86yMsiyEtGjZEGXCouS5X9SU0c1oKahdkgUEkzn0Fj7gktlUZTgOI5Ew8MMf7MLBgyn851rD3QGU7vHkpIUvfH4MY2Nmz0SWmIf7ck7CfVAluJ3OQjPNeQ4HpTUy0wGnr1JwSecPzyl1k1EWZRvyWvBYUpWlbevSLp/RlAPcDYac53ce+sXVkwCyktTt9jPY7F+GmVOadiKjPXjkc5lVFKkiYJBJ4+V3DQe6vW0BqDGrj3y2z118Nj2CffeNbsljdsNzzaaeyMxIBrRdgvtQ2lc3eLc705oye9H99FrRc5/RlOk6hYYI+ofRpY0t4UcZi16A/gRakGz/tvCgkdOkL3aZLQrQW+eFfhRqwxgdNZ5JJCjPrA+xuR+rii1XoyG029dSzkfj4+bRQSgJOeoHJMuLVL8C+txFrMLd0Sv4M+TscUSW6QVFz31aU6YcUF87tUurrMqvQu96tJHXpM9p2sp0kdcBwzTpn8mkdSSZNA+aJp3rL2YMAHBGRoxfJ5PWg2NjxmJ0aRtYApD1WcJMH/LK/SijQCZivZNw+5XXFZB5GfRmbSue+7SmTLkHeV7kdendfHj5/lQHnPZqYs6pHvQCAFht8sZi9GYsZj3SaIif1uvOs0LgvrAH9dsy4nHjjfFx40XTpPO23blr6MMi3AefhpoQZbhfYxQUeSVsPZHWC4q++6KyVHiUEV6XCuT6IGxISvqTWc9XJlnoX3QRWxeSeaj7Vw5oUtkX2X5eU0eX7kcO6gFWUaSVNbqUdcLpwoWbG/8rg6j9fzJw79qa+FWt5vyCGeNBpJZflXwwPm7mxsfN15kZtu1e8Thh//5IZzaGGKJndGx1CMEwTboxOWk9Pz0dPxCPGwWVPy1/ryaT5nPT07H9IyP0uvxie4gh7gqU+3YueRnxOL0/OWk9nkyaj5kmXfCQWiQSRn56OvZgMmm+RITVIYmHuNvQbpoAm1Y2kTD+Go8bp2o15+lmk7+dSBjHR0eNc+6B/Duh5hBDdMf/AeWEF6kp7RGPAAAAAElFTkSuQmCC":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALMAAAAcCAYAAAAqXo7IAAAACXBIWXMAAAsTAAALEwEAmpwYAAAJiklEQVR4nO2cX4wkRR3HP9XdM7N/5vbmWOByiN4Y8F94uMEghwZzIyhGH7hFX+BBWTQiYqKLLwReGF4IIVEXQ6ImJg4PYHhb4gOEqDd34d9BAkOCiQkxzhoQkeN25vb25m93+VA9O70zVT3dvXN3PMw36WxP/X71q19Vfet/9Yo33tjA86Dd9gDwPPA8ieMILEtgWWBZAs9DNJvuD7pd7+Zs1nksnRbVdttDCEEqJeh2Ja2Wi21bZDIWQkg8T3L48CVMMcWFgBUmFAKEELTb3lcbje4LW1vuHzodecfGRvflRqP3qOdxhRAXytUppgiHkcxCQK8nP3nmTO+JRqN3vNuVX1fkBmC22fTu39zsvdFsendLiT0l9RQXGyNkFgKkZL7Z9B44c6b3Zrvt/VQIxDBZfb395865v9/Y6J5ot71vgGBK6ikuFrbJ3Cdhp+Pd0Wx6L7Za3iPA4jhyCgHdrvzK2bPuC+2297Tryi8GevApprhgcPrE6/X4Uqvl3t/tyu/GJWNf13XlHefOuUuex2Nzc9bjQoiNGL4s+U9eI6sAVWAtEFb0nyQoAzX/vZTQRs23k8SXGiov9Zhp5lFlVEBfTlXf9mogrGSwVWZQBsNpLGvCawzyGwZTemFpjosXCeL11zc+sbnZe7DV8u6WUpF7t5ASbFu8MzNj/erIkcXfjVEvoDJ5aIzeOjsrsAQ8lNDFr6EaCIBMaOM4AwIn9eVZP251jF7R1zsS0W6wFk35M9V0ETimCQ/m14Rl4I8h8vvY2dCCSFoP27A2N3u/PXfOuxfMRBYCbFvgOIPHssysFwI8T35ma8t9fEz6eRSpxhEZ4GAEnaioTtDWbnAUlf9CiM4qilxRicwYe+cTpTHy5fOY9lsOkAvrjTMZi1bLo3GmR7ej9qItC+bmbPbscXBdievqG5UQnB3jQAnYm8TzXaL+MbEBKv8VVMMetlkG7kxgM7cLf0yojpEvM77DOYTKZ23X3oyi7gCuTiIEpFIWL75U59ixDT481QmQVpDN2nzh83McvfVy9i7YdHuJRomCIXwdVZF1VMUsMVoQOUPcJwkvLFOauvRNyBGtd3848J5HDdO6Ct8LrLCzZysRTuR1RufdRaLnLy7qY+SliHaW0E81jmvSy6Efkfp1nGOQ36pjSjGdtvjbsQ2eevp9HMfi6qtnmZ2xkBIQ8O67Lf7y19N89FGPn9xzJamUwPNiE9o0vSiws/BKjJK3gB5lBvPhpKgxgQWJxkYO87RqJaCfJ3wO/rDGdhzUdhFXhxVGG2kD1diGG+QKejIXNWEl9GQuo6ljLZltW3D6dJfnnj9FNuvwox9ewTXXZJVQSoQlaDR6PPWn//LKqw1Onmxw0037aLVik/m4wdllRjNcj2izFiP9XAzdSaCOqrQqo5W/15dVUL2XCXcRbVchKQox9XPoG1YZ/TTpoJ9GNWY6QdR1gVoyO46gVmvxwQcdbrllkWuv3cPWlqt6ZQAk+/Y5fPtbl/Lmm5v8a72JlPuSOFVGT+ZfYy6kKDYrgd85BhVUZicRCuhRYHQbqcCA/MUEfvVRR/VYP9fI+vaXDHEfZjJEPkL83YOqIXwF/bpnFVV+64w23GU/3jjk4viiJbMA2v5ib27WoteTASIrdLuSTFpdMup0vBF5RJRRxNDNDR9CEWiZeIutI5hX/pWINvYafDKhqAl7K0S/bggvoIhu8r8c0Z8+8jH1w1DXhOXQkzK4blljtOEuG+INoxBBZxvGuxlxyJmQyH0sozKvQ3/rKr+rFAaoT8jO+UprXJxaTHv5BD7EQQnzblQJ/VoHP87SpJ0xLgBtW5HUddUcehiWpeSeB45GHhPLqIrSLXoOoVp3kZ2VnU+QTjVBnPOBgiG8OiZejgvbIMOQRz9Vgmij2jI7T3R3DS2ZXVdyxYEMe/bYvP32WT788BIuuyy1vVshhEBKyWuvn2Fry+Xyy9NYoZdJI6GEIrTuBOkQaohdCoTptrjGbanVIvoStr1Xj2jDhBzmOfc420UmQ4AnMZfTKtEOsUq79OEoyRqncfqmJXO3J7nyyhm+fEOO5184xW+e+DeHDu3BsRWJLUvw3nttXn2twYEDaW44vJdesn3mYZRRJNIdpx5l/IZ7jXiFXAzxoxLDThysoB+a1xn0zGG7PGsT8KGGOX/1CPHzJDvMGcYS8dcBdZPAOM1wXcl3brsMz5O8/EqDd975Hwi1OJRS4jgWBz81w+2372f//vT2lyoxsMTgYkwQFVTr0/UOeY3+xwGFCDo5FJFN+8drQ+86Mh9FVf4K0UhXjKATFdXA+6pBxzSi5dBPSVYIJ3OcI3wcwNYJXFeSyVh8/3sHuPHGHP95r61OAP3p8cKCw+c+O8fcnJ2EyKB6maOoyzZV/8mhKsA0zFX8v3mDPI+5Z84x2HIrR/CtGJJGHlURVT9M19P2fenrFwx6oA4YSoHfZcyLqzt938qB9AsM8td/nzTq/t8iqt6G0SC8kS0xOjWc6PG2AzSl1F/57N+7+HR+hquvmt0hk1Jtz3U6ZiJLSTYk7SqqUPrPOASPO/MGnYOMv71WCbwXDDpRhtDqGHkUX/pYZicJ6ihimG6ghdkePhaeNEqG8FXCR4s1zL3zSnJ3BrBmZ617MxlRltK8xaY+VvV2PO22Zzy+9u28Pz9v3z8JJxm0+kkjd5FtNFAnemsaWdmXNWLarATe8wadWkj8sKG9aJA3ME89+igbwpcM4YUx9kZg2bb4Zzbr3JXN2jfatjixmz1jP647M2P9Mpt1rpubs1aTW9vGOoMj4D4Ku7BX20VcHQoJ4z3LYLpgQtm3H6e3rQfe8wadWgx7QZRDwusGWR9V9BecDqIndC6SRwE4ffKmUuKlVMq5ud32ftxqufd5HldFvajft5FOW8/Nz1uP2LZ4sdsdPTUcwiqqAPLoCVFD9VhrGlmVnTfS4qAy9F7RakVHjei+1BmsD+ox7BcZfGVSxFzRFXaWVxl9/moh6ZnykieczFFQQt/A6pqwmsGXmsm4OHny9Pb/yhCi/38yuHRry/tFs+n+TErmw0jtf1Xyj/l5uzQ/bz8jpaTbVU86Lbj++kR3NqaYIjZGjjo8T2Lb4tTCgvPg4mL6cDptrenm0/7vzWzWfmBxMXX9zIx4xv9ie4opLgq053aKvJJ0Wvx9YcG5LZu1b7VtcTJAai+TscqLi6nrsln7USHYnJJ4iosN46EJDHrZTMb6czptPd9suvd0OvKbmYz12OysdUJdyL8Qbk4xxXj8H0eEKo5UwxgtAAAAAElFTkSuQmCC",class:w(["cursor-pointer",p.value]),onClick:j},null,10,Pe)]),_("div",Ve,[F(r,{modelValue:b.value,"onUpdate:modelValue":s[0]||(s[0]=e=>b.value=e),variant:"primary-filled"},{default:g((()=>[F(i,{value:"conversation"},{default:g((()=>[D(C(e.$t("layout.sideNav.tabConversation")),1)])),_:1}),F(i,{value:"favorite"},{default:g((()=>[D(C(e.$t("layout.sideNav.tabFavorite")),1)])),_:1})])),_:1},8,["modelValue"])]),_("div",Ue,["conversation"===b.value?(f(),h(S,{key:0,class:"flex-1 bg-transparent",value:n.value,collapsed:a.value},{default:g((()=>[F(k(Ae),{onEnd:N,modelValue:z.value,"onUpdate:modelValue":s[2]||(s[2]=e=>z.value=e),"item-key":"id"},{item:g((({element:t})=>[(f(),h(E,{name:t.id,value:`/conversation/chat?id=${t.id}`,"data-index":t.id,key:t.id,to:{path:"/conversation/chat",query:{id:t.id}},class:"gap-2 relative menu-item"},{icon:g((()=>[F(o,{size:"24px",image:t.avatar},null,8,["image"])])),content:g((()=>[D(C(t.name)+" ",1),F(A,{theme:"danger",content:e.$t("layout.sideNav.confirmDelete"),placement:"right",onConfirm:e=>{return a=t,R.remove(a.id),R.data.length>0?v.push(`/conversation/chat?id=${R.data[0].id}`):v.push("/"),void ne.success(d("layout.sideNav.deleteSuccessMsg"));var a},class:"absolute right-0 top-1.5 delete-button"},{default:g((()=>[F(m,{content:e.$t("layout.sideNav.deleteAction"),placement:"right"},{default:g((()=>[F(l,{size:"small",shape:"circle",variant:"text",onClick:s[1]||(s[1]=L((()=>{}),["stop"]))},{default:g((()=>[F(k(pe),{slot:"icon",style:{width:"16px",height:"16px"}})])),_:1})])),_:1},8,["content"])])),_:2},1032,["content","onConfirm"])])),_:2},1032,["name","value","data-index","to"]))])),_:1},8,["modelValue"])])),_:1},8,["value","collapsed"])):x("",!0),"favorite"===b.value?(f(),h(S,{key:1,class:"flex-1 bg-transparent",value:n.value,collapsed:a.value},{default:g((()=>[F(k(Ae),{onEnd:T,modelValue:U.value,"onUpdate:modelValue":s[4]||(s[4]=e=>U.value=e),"item-key":"id"},{item:g((({element:t})=>[(f(),h(E,{name:t.id,value:`/note/content?id=${t.id}`,"data-index":t.id,key:t.id,to:{path:"/note/content",query:{id:t.id}},class:"gap-2 relative menu-item"},{default:g((()=>[D(C(t.title)+" ",1),F(A,{theme:"danger",content:e.$t("layout.sideNav.confirmDelete"),placement:"right",onConfirm:e=>{return a=t,O.remove(a.id),O.data.length>0?v.push(`/note/content?id=${O.data[0].id}`):v.push("/"),void ne.success(d("layout.sideNav.deleteSuccessMsg"));var a},class:"absolute right-0 top-1.5 delete-button"},{default:g((()=>[F(m,{content:e.$t("layout.sideNav.deleteAction"),placement:"right"},{default:g((()=>[F(l,{size:"small",shape:"circle",variant:"text",onClick:s[3]||(s[3]=L((()=>{}),["stop"]))},{default:g((()=>[F(k(pe),{slot:"icon",style:{width:"16px",height:"16px"}})])),_:1})])),_:1},8,["content"])])),_:2},1032,["content","onConfirm"])])),_:2},1032,["name","value","data-index","to"]))])),_:1},8,["modelValue"])])),_:1},8,["value","collapsed"])):x("",!0)]),_("div",Ne,[_("div",Te,[F(l,{class:"w-full",theme:"primary",shape:"square",variant:"base",onClick:s[5]||(s[5]=e=>W("/conversation/index"))},{icon:g((()=>[F(k(me))])),default:g((()=>[D(" "+C(e.$t("layout.header.start")),1)])),_:1}),F(l,{class:"w-full",theme:"primary",shape:"square",variant:"base",onClick:s[6]||(s[6]=e=>W("/setting"))},{icon:g((()=>[F(k(ve))])),default:g((()=>[D(" "+C(e.$t("layout.header.setting")),1)])),_:1})]),_("div",We,[_("span",Xe,C(c.value)+" "+C(k(Oe).version),1)])])],2)}}}),[["__scopeId","data-v-8cd98e64"]]),Ge=v({__name:"LayoutSideNav",setup(e){const t=r();return(e,a)=>(f(),h(Qe,{theme:k(t).displayMode},null,8,["theme"]))}}),He={class:"flex gap-5 items-center align-middle justify-center"},Be=n(v({__name:"ReloadPrompt",setup(e){const t=I(null),a=I(null),s=I(!1),n=()=>{s.value&&localStorage.setItem("pwaInstallDismissed","true"),s.value=!1},i=async()=>{if(a.value){a.value.prompt();const{outcome:e}=await a.value.userChoice;a.value=null,s.value=!1,localStorage.setItem("pwaInstallLastPrompt",(new Date).toISOString())}},r=e=>{e.preventDefault(),a.value=e;const t="true"===localStorage.getItem("pwaInstallDismissed"),n=localStorage.getItem("pwaInstallLastPrompt"),i=new Date;i.setDate(i.getDate()-30);!t&&(!n||new Date(n)<i)&&(s.value=!0)},o=()=>{s.value=!1,localStorage.removeItem("pwaInstallDismissed"),localStorage.removeItem("pwaInstallLastPrompt")},l=async()=>{if("visible"===document.visibilityState&&t.value)try{await t.value.update()}catch(e){}};return S((async()=>{await(async()=>{if("serviceWorker"in navigator)try{const e=await navigator.serviceWorker.register("/sw.js",{scope:"/"});t.value=e,e.addEventListener("updatefound",(()=>{const t=e.installing;t&&t.addEventListener("statechange",(()=>{"installed"===t.state&&navigator.serviceWorker.controller&&t.postMessage({type:"SKIP_WAITING"})}))})),navigator.serviceWorker.addEventListener("controllerchange",(()=>{window.location.reload()}))}catch(e){}})(),window.matchMedia("(display-mode: standalone)").matches||(window.addEventListener("beforeinstallprompt",r),window.addEventListener("appinstalled",o)),document.addEventListener("visibilitychange",l)})),R((()=>{window.removeEventListener("beforeinstallprompt",r),window.removeEventListener("appinstalled",o),document.removeEventListener("visibilitychange",l)})),(e,t)=>{const a=Y,r=ie;return s.value?(f(),h(r,{key:0,class:"pwa-toast",role:"alert"},{default:g((()=>[t[2]||(t[2]=_("div",{class:"message"}," 将此应用添加到主屏幕,随时随地快速访问 ",-1)),_("div",He,[s.value?(f(),h(a,{key:0,onClick:i},{default:g((()=>t[0]||(t[0]=[D(" 安装 ")]))),_:1})):x("",!0),F(a,{onClick:n},{default:g((()=>t[1]||(t[1]=[D(" 稍后再说 ")]))),_:1})])])),_:1})):x("",!0)}}}),[["__scopeId","data-v-b1672b5d"]]),Ze=v({__name:"index",setup(e){const t=P(),a=r();return M((()=>t.path),(()=>{var e;null==(e=document.querySelector(`.${i}-layout`))||e.scrollTo({top:0,behavior:"smooth"})})),(e,t)=>{const s=re,n=oe,i=Z,r=B;return f(),h(r,null,{default:g((()=>[F(s,{class:"h-screen"},{default:g((()=>[F(Ge)])),_:1}),F(r,{class:"h-screen overflow-hidden"},{default:g((()=>[k(a).showLayoutHeader?(f(),h(n,{key:0},{default:g((()=>[F(Le)])),_:1})):x("",!0),F(i,{class:"flex-1 overflow-y-auto main-layout-content"},{default:g((()=>[F(xe)])),_:1}),(f(),h(Be,{key:1}))])),_:1})])),_:1})}}}),Je=[{path:"/conversation",component:Ze,redirect:"/conversation/index",name:"conversation",meta:{title:{zh_CN:"会话",en_US:"Conversation"},icon:he,orderNo:0},children:[{path:"index",name:"NewConversation",component:()=>z((()=>import("./index-Rpu0PRbo.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79]),import.meta.url),meta:{title:{zh_CN:"新建会话",en_US:"New Conversation"}}},{path:"chat",name:"chat",component:()=>z((()=>import("./chat-D0D5Rfde.js")),__vite__mapDeps([80,1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,4,70,71,72,73,74,81,82,76,75,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,77,78,101,102]),import.meta.url),meta:{title:{zh_CN:"会话聊天",en_US:"Chat"},hidden:!0}}]},{path:"/setting",
5
+ // component: () => import('@/pages/setting/layout.vue'),
6
+ component:Ze,redirect:"/setting/user",name:"setting",meta:{title:{zh_CN:"设置",en_US:"Setting"},icon:fe,orderNo:0},children:[{path:"user",name:"User setting",component:()=>z((()=>import("./index-BBncn3uI.js")),__vite__mapDeps([103,56,57,1,2,3,58,12,59,60,61,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,62,63,64,65,66,67,68,69,81,82,76,83,84,77,78,4,104]),import.meta.url),meta:{title:{zh_CN:"常规",en_US:"User"}}},{path:"model",name:"ModelSetting",component:()=>z((()=>import("./index-yWHmk0id.js")),__vite__mapDeps([105,1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,83,84,101,76]),import.meta.url),meta:{title:{zh_CN:"模型",en_US:"Model"}}},{path:"agent",name:"AgentCenter",component:()=>z((()=>import("./index-Dn5cn9RI.js")),__vite__mapDeps([106,4,1,2,3,56,57,58,12,59,60,61,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,62,63,64,65,66,67,68,69,81,82,76,77,78]),import.meta.url),meta:{title:{zh_CN:"智能体",en_US:"Agent"}}},{path:"api",name:"api setting",component:()=>z((()=>import("./index-BVHqhU3I.js")),__vite__mapDeps([107,108,62,1,2,3,55,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,56,57,58,59,60,61,63,64,65,66,67,68,69,109,83,84]),import.meta.url),meta:{title:{zh_CN:"OpenAPI",en_US:"OpenAPI"},isPro:!0}}]},{path:"/page",component:Ze,redirect:"/page/about",name:"page",meta:{title:{zh_CN:"页面",en_US:"Page"},icon:ge,orderNo:0},children:[{path:"about",name:"AboutUs",component:()=>z((()=>import("./about-CMJ551TJ.js")),__vite__mapDeps([110,108,62,1,2,3,55,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,56,57,58,59,60,61,63,64,65,66,67,68,69,109]),import.meta.url),meta:{title:{zh_CN:"关于我们",en_US:"About Us"}}},{path:"help",name:"help",component:()=>z((()=>import("./help-BZX2GmDP.js")),__vite__mapDeps([111,108,62,1,2,3,55,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,56,57,58,59,60,61,63,64,65,66,67,68,69,109,83,84]),import.meta.url),meta:{title:{zh_CN:"使用帮助",en_US:"Help"}}},{path:"changelog",name:"change log",component:()=>z((()=>import("./changelog-TTyyWe_7.js")),__vite__mapDeps([112,108,62,1,2,3,55,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,56,57,58,59,60,61,63,64,65,66,67,68,69,109]),import.meta.url),meta:{title:{zh_CN:"更新日志",en_US:"Change Log"}}}]},{path:"/note",component:Ze,redirect:"/note/index",name:"note",meta:{title:{zh_CN:"笔记",en_US:"Notes"},icon:ye,orderNo:0},children:[{path:"index",name:"noteList",component:()=>z((()=>import("./index-DleTV0S_.js")),__vite__mapDeps([113,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,2,3,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,1,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,4,77,78]),import.meta.url),meta:{title:{zh_CN:"笔记列表",en_US:"Note List"}}},{path:"content",name:"content",component:()=>z((()=>import("./content-DfpBbjNi.js")),__vite__mapDeps([114,85,1,2,3,86,87,88,89,90,91,92,93,94,95,96,97,56,57,58,12,59,60,61,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,62,63,64,65,66,67,68,69,70,71,72,73,74,98,99,83,84,76,100,4,77,78,115]),import.meta.url),meta:{title:{zh_CN:"笔记内容",en_US:"Note Content"},hidden:!0}}]}],qe=Object.defineProperty({__proto__:null,default:Je},Symbol.toStringTag,{value:"Module"}),Ye=Object.assign({"./modules/homepage.ts":qe}),Ke=Object.assign({}),$e=st(Ye),et=st(Ke),tt=[...$e,...et].filter((e=>{var t;return!(null==(t=e.meta)?void 0:t.hidden)})),at=[...$e,...et,{path:"/",redirect:"/conversation/index"}];function st(e){const t=[];return Object.keys(e).forEach((a=>{const s=e[a].default||{},n=Array.isArray(s)?[...s]:[s];t.push(...n)})),t}const nt=(e=3)=>{const t=it.currentRoute.value;return t.path?t.path.split("/").filter(((t,a)=>a<=e&&a>0)).map((e=>`/${e}`)).join(""):""},it=U({history:N(),routes:at,scrollBehavior:()=>({el:"#app",top:0,behavior:"smooth"})}),rt=O(n(v({__name:"App",setup(e){const t=r(),a=m((()=>t.displayMode)),{getComponentsLocale:s,locale:n}=je();return(e,t)=>{const i=j("router-view"),r=le;return f(),h(r,{"global-config":k(s)},{default:g((()=>[(f(),h(i,{key:k(n),class:w([a.value])},null,8,["class"]))])),_:1},8,["global-config"])}}}),[["__scopeId","data-v-a54c09a9"]]));rt.use(de),rt.use(it),rt.use(c),rt.use(t),u(),p.initialize(),rt.mount("#app").$nextTick((()=>{postMessage({payload:"removeLoading"},"*"),window.document.addEventListener("keydown",(e=>{e.ctrlKey&&"f"===e.key&&window.ipcRenderer&&(e.preventDefault(),window.ipcRenderer.send("electron-findbar/open"))}))})),null==(e=window.ipcRenderer)||e.on("main-process-message",((e,t)=>{}));export{Ee as a,je as b,De as u};
.output/public/assets/markdown-it-highlightjs-IY8LrfKU.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{g as e}from"./@babel-ynFNPEB3.js";import{r as t}from"./highlight.js-BgdnSEsd.js";var r,n,l,o,i,u;function a(){if(n)return r;n=1;var e,t=Object.defineProperty,l=Object.defineProperties,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,f=(e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,g=(e,t)=>{for(var r in t||(t={}))c.call(t,r)&&f(e,r,t[r]);if(a)for(var r of a(t))s.call(t,r)&&f(e,r,t[r]);return e},h={};function p(e,t,r,n,l){try{return t.highlight(n,{language:""!==l?l:"plaintext",ignoreIllegals:r}).value}catch(o){return e.utils.escapeHtml(n)}}function d(e,t,r,n,l){if(""!==l)return p(e,t,r,n,l);try{return t.highlightAuto(n).value}catch(o){return e.utils.escapeHtml(n)}}function b(e){return function(...t){return e(...t).replace(/<code class="/g,'<code class="hljs ').replace(/<code>/g,'<code class="hljs">')}}function j(e){var t,r,n;for(const o of e.tokens)if("inline"===o.type&&null!=o.children)for(const[u,a]of o.children.entries()){if("code_inline"!==a.type)continue;const c=o.children[u+1];if(null==c)continue;const s=/^{:?\.([^}]+)}/.exec(c.content);if(null==s)continue;const f=s[1];c.content=c.content.slice(s[0].length);let h=null!=(t=a.attrGet("class"))?t:"";h+=`${null!=(r=e.md.options.langPrefix)?r:"language-"}${f}`,a.attrSet("class",h),a.meta=(n=g({},a.meta),l(n,i({highlightLanguage:f})))}}function y(e,t,r,n,l){var o,i;const u=e[t];if(null==r.highlight)throw new Error("`options.highlight` was null, this is not supposed to happen");const a=r.highlight(u.content,null!=(i=null==(o=u.meta)?void 0:o.highlightLanguage)?i:"","");return`<code${l.renderAttrs(u)}>${a}</code>`}function O(e,t){const r=g(g({},O.defaults),t);if(null==r.hljs)throw new Error("Please pass a highlight.js instance for the required `hljs` option.");null!=r.register&&function(e,t){for(const[r,n]of Object.entries(t))e.registerLanguage(r,n)}(r.hljs,r.register),e.options.highlight=(r.auto?d:p).bind(null,e,r.hljs,r.ignoreIllegals),null!=e.renderer.rules.fence&&(e.renderer.rules.fence=b(e.renderer.rules.fence)),r.code&&null!=e.renderer.rules.code_block&&(e.renderer.rules.code_block=b(e.renderer.rules.code_block)),r.inline&&(e.core.ruler.before("linkify","inline_code_language",j),e.renderer.rules.code_inline=b(y))}return((e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})})(h,{default:()=>O}),e=h,r=((e,r,n,l)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let i of u(r))c.call(e,i)||i===n||t(e,i,{get:()=>r[i],enumerable:!(l=o(r,i))||l.enumerable});return e})(t({},"__esModule",{value:!0}),e),O.defaults={auto:!1,code:!1,inline:!1,ignoreIllegals:!1},r}const c=e(u?i:(u=1,i=function(){if(o)return l;o=1;var e,r=Object.create,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,s=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,h=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))f.call(t,r)&&h(e,r,t[r]);if(c)for(var r of c(t))g.call(t,r)&&h(e,r,t[r]);return e},d=(e,t,r,l)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of u(t))f.call(e,o)||o===r||n(e,o,{get:()=>t[o],enumerable:!(l=i(t,o))||l.enumerable});return e},b=(e,t,l)=>(l=null!=e?r(s(e)):{},d(e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e)),j={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(j,{default:()=>m}),e=j,l=d(n({},"__esModule",{value:!0}),e);var y=b(t()),O=b(a());function m(e,t){return null==(t=p(p({},m.defaults),t)).hljs&&(t.hljs=y.default),(0,O.default)(e,t)}return m.defaults={auto:!0,code:!0,inline:!1,ignoreIllegals:!0},l}().default));export{c as m};
.output/public/assets/markdown-ppShADW8.js ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var e=Object.defineProperty,n=(n,t,o)=>((n,t,o)=>t in n?e(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o)(n,"symbol"!=typeof t?t+"":t,o);import{m as t}from"./markdown-it-link-attributes-DRKqjf49.js";import{M as o}from"./markdown-it-C8SkdHr7.js";import{m as r}from"./@traptitech-xv_Vpjqh.js";import{m as s}from"./markdown-it-highlightjs-IY8LrfKU.js";import{H as i}from"./highlight.js-BgdnSEsd.js";import{e as l}from"./tdesign-vue-next-BiEwLJDx.js";import{r as d}from"./mermaid-render-f9KGMq_P.js";const a={svg:"",buttonStyle:"",collapseButtonClass:"",collapseButtonStyle:"",headerClass:"",headerStyle:""},c=(e,n)=>(n={...a,...n},(...t)=>{const[o,r]=t,s=o[r];if(s.info&&s.info.includes(":")){const[e,n]=s.info.split(":",2);s.info=e}const i=o[r].content.replaceAll('"',"&quot;").replaceAll("'","&apos;");let l;try{l=e(...t)}catch(c){const n=o[r].info;o[r].info="text",l=e(...t),o[r].info=n}if(0===i.length)return l;const d=o[r].info||"",a=`code-header-${Math.random().toString(36).substring(2,9)}`;return`\n<div class="markdown-it-code-title">\n <div id="${a}" class="code-header ${n.headerClass}" style="${n.headerStyle}">\n <div class="code-header-left" onclick="toggleCodeCollapse(this)">\n <span class="code-language">${d}</span>\n <button class="code-collapse-button ${n.collapseButtonClass}" style="${n.collapseButtonStyle}" title="Toggle code" >\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <polyline points="6 9 12 15 18 9"></polyline>\n </svg>\n </button>\n </div>\n <button data-clipboard-text="${i}" class="code-copy-button ${n.buttonClass}" style="${n.buttonStyle}" title="Copy code" onclick="copyCodeToClipboard(this)">\n ${n.svg}\n </button>\n </div>\n <div class="code-content">\n ${l}\n <button class="code-scroll-top-button${i.length>500?"":" hidden"}" title="Scroll to code header" onclick="scrollToElement('${a}')">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <polyline points="18 15 12 9 6 15"></polyline>\n </svg>\n </button>\n </div>\n</div>\n`});i.registerLanguage("codebase-retrieval",(()=>({name:"codebase-retrieval",contains:[],case_insensitive:!0,keywords:{}}))),i.registerLanguage("vue",(e=>({name:"vue",subLanguage:"xml",contains:[e.COMMENT("\x3c!--","--\x3e",{relevance:10}),{begin:/^(\s*)(<script>)/gm,end:/^(\s*)(<\/script>)/gm,subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0},{begin:/^(\s*)(<script lang=["']ts["']>)/gm,end:/^(\s*)(<\/script>)/gm,subLanguage:"typescript",excludeBegin:!0,excludeEnd:!0},{begin:/^(\s*)(<style(\sscoped)?>)/gm,end:/^(\s*)(<\/style>)/gm,subLanguage:"css",excludeBegin:!0,excludeEnd:!0},{begin:/^(\s*)(<style lang=["'](scss|sass)["'](\sscoped)?>)/gm,end:/^(\s*)(<\/style>)/gm,subLanguage:"scss",excludeBegin:!0,excludeEnd:!0},{begin:/^(\s*)(<style lang=["']stylus["'](\sscoped)?>)/gm,end:/^(\s*)(<\/style>)/gm,subLanguage:"stylus",excludeBegin:!0,excludeEnd:!0}]})));const u=new class{constructor(){n(this,"worker"),n(this,"pendingRequests"),n(this,"isWorkerReady",!1),this.pendingRequests=new Map,this.worker=new Worker(new URL(
2
+ /* @vite-ignore */
3
+ ""+new URL("markdown.worker-C2udnMhU.js",import.meta.url).href,import.meta.url),{type:"module"}),this.worker.onmessage=this.handleWorkerMessage.bind(this),this.worker.onerror=this.handleWorkerError.bind(this),this.isWorkerReady=!0}
4
+ /**
5
+ * Render markdown text to HTML using the worker
6
+ * @param text Markdown text to render
7
+ * @returns Promise that resolves to the rendered HTML
8
+ */render(e){return this.isWorkerReady?new Promise(((n,t)=>{const o=Date.now().toString()+Math.random().toString(36).substr(2,9);this.pendingRequests.set(o,{resolve:n,reject:t}),this.worker.postMessage({id:o,text:e})})):Promise.resolve(`<p>${e}</p>`)}
9
+ /**
10
+ * Handle messages from the worker
11
+ */handleWorkerMessage(e){const{id:n,html:t,error:o}=e.data,r=this.pendingRequests.get(n);r&&(o?r.reject(new Error(o)):r.resolve(t),this.pendingRequests.delete(n))}
12
+ /**
13
+ * Handle worker errors
14
+ */handleWorkerError(e){for(const[n,t]of this.pendingRequests.entries())t.reject(new Error("Worker error: "+e.message)),this.pendingRequests.delete(n);this.isWorkerReady=!1,this.restartWorker()}
15
+ /**
16
+ * Restart the worker if it crashes
17
+ */restartWorker(){try{this.worker&&this.worker.terminate(),this.worker=new Worker(new URL(
18
+ /* @vite-ignore */
19
+ ""+new URL("markdown.worker-C2udnMhU.js",import.meta.url).href,import.meta.url),{type:"module"}),this.worker.onmessage=this.handleWorkerMessage.bind(this),this.worker.onerror=this.handleWorkerError.bind(this),this.isWorkerReady=!0}catch(e){l.error("Markdown rendering engine failed to restart")}}},p=new o({linkify:!0,breaks:!0});p.use(((e,n)=>{if(e.renderer.rules.code_block=c(e.renderer.rules.code_block,n),e.renderer.rules.fence=c(e.renderer.rules.fence,n),"undefined"!=typeof window){window.copyCodeToClipboard||(window.copyCodeToClipboard=e=>{const t=e.dataset.clipboardText;navigator.clipboard.writeText(t).then((function(){n.onCopySuccess&&n.onCopySuccess(t,e)})).catch((function(t){n.onCopyError&&n.onCopyError(t,e)}))}),window.toggleCodeCollapse||(window.toggleCodeCollapse=e=>{const n=e.closest(".markdown-it-code-title"),t=n.querySelector(".code-content"),o=e.querySelector(".code-collapse-button")||e,r=n.querySelector(".code-scroll-top-button");t.classList.toggle("collapsed"),o.classList.toggle("collapsed"),r&&(t.classList.contains("collapsed")?r.classList.add("hidden"):r.classList.remove("hidden"))}),window.scrollToElement||(window.scrollToElement=e=>{const n=document.getElementById(e);if(n){const e=n=>{if(!n)return document.documentElement;const t=window.getComputedStyle(n).overflowY;return"visible"!==t&&"hidden"!==t&&n.scrollHeight>n.clientHeight?n:e(n.parentElement)||document.documentElement},t=e(n),o=n.getBoundingClientRect(),r=t.getBoundingClientRect(),s=o.top-r.top+t.scrollTop-120;t.scrollTo({top:s,behavior:"smooth"})}});const e="\n.markdown-it-code-title {\n position: relative;\n border-radius: 6px;\n overflow: hidden;\n}\n.markdown-it-code-title .code-header {\n position: relative;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 16px;\n font-size: 0.9em;\n background-color: #2d2d2d;\n z-index:1;\n}\n\n\n.markdown-it-code-title .code-header-left {\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n}\n.markdown-it-code-title .code-language {\n text-transform: uppercase;\n font-size: 0.8em;\n font-weight: bold;\n color: #999;\n}\n.markdown-it-code-title .code-collapse-button {\n background: none;\n border: none;\n color: #999;\n cursor: pointer;\n padding: 2px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: transform 0.2s;\n}\n.markdown-it-code-title .code-collapse-button.collapsed {\n transform: rotate(-90deg);\n}\n\n.markdown-it-code-title .code-copy-button {\n background: none;\n border: none;\n color: #999;\n cursor: pointer;\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0.6;\n transition: opacity 0.2s;\n}\n.markdown-it-code-title .code-copy-button:hover {\n opacity: 1;\n}\n\n\n\n\n\n.markdown-it-code-title .code-content {\n position: relative;\n transition: max-height 0.3s ease-out, opacity 0.2s ease;\n max-height: 100%;\n overflow: visible;\n z-index:0;\n}\n.markdown-it-code-title .code-content.collapsed {\n max-height: 0;\n overflow: hidden;\n opacity: 0.8;\n}\n\n.markdown-it-code-title .code-scroll-top-button {\n position: absolute;\n bottom: 10px;\n right: 10px;\n color: #555;\n cursor: pointer;\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0.6;\n transition: all 0.2s ease;\n border-radius: 50%;\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);\n z-index: 10;\n background-color: rgba(200, 200, 200, 0.8);\n}\n\n.markdown-it-code-title .code-scroll-top-button:hover {\n opacity: 1;\n}\n.markdown-it-code-title .code-scroll-top-button.hidden {\n opacity: 0;\n visibility: hidden;\n}\n",t=document.createElement("style");t.appendChild(document.createTextNode(e)),document.head.appendChild(t)}}),{headerClass:"code-header-bg",svg:'<svg fill="none" viewBox="0 0 24 24" width="1em" height="1em" class="t-icon t-icon-copy" slot="icon"><path fill="currentColor" d="M2 2h13v5.5h-2V4H4v9h3.5v2H2V2zm7 7h13v13H9V9zm2 2v9h9v-9h-9z"></path></svg>',onCopySuccess:(e,n)=>{l.success("复制成功!")}}),p.use(s,{hljs:i}),p.use(t,{attrs:{target:"_blank",rel:"noopener"}}),p.use(r,{blockClass:"katexmath-block rounded-md p-[10px]",errorColor:" #cc0000"}),p.use((function(e){const n=e.renderer.rules.fence||((e,n,t,o,r)=>r.renderToken(e,n,t));e.renderer.rules.fence=(e,t,o,r,s)=>{const i=e[t],l=i.content.trim();if("mermaid"===i.info.trim()){return`<div class="mermaid-diagram-wrapper">\n <div class="mermaid-controls">\n <button type="button" class="mermaid-zoom-in" title="放大">\n <svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zm.5-7H9v2H7v1h2v2h1v-2h2V9h-2z"/></svg>\n </button>\n <button type="button" class="mermaid-zoom-out" title="缩小">\n <svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"/></svg>\n </button>\n <button type="button" class="mermaid-reset" title="重置">\n <svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/></svg>\n </button>\n <button type="button" class="mermaid-download" title="下载SVG">\n <svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></svg>\n </button>\n <button type="button" class="mermaid-copy" title="复制图表代码">\n <svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>\n </button>\n </div>\n <div class="mermaid-diagram-container" data-scale="1">\n <div class="mermaid-diagram" id="${`mermaid-${Date.now()}-${Math.floor(1e3*Math.random())}`}" data-mermaid="${encodeURIComponent(l)}" data-original-code="${encodeURIComponent(l)}">\n <div class="mermaid-loading">图表加载中...</div></div>\n </div>\n </div>`}return n(e,t,o,r,s)}}));const h={
20
+ // 异步渲染方法,使用Web Worker
21
+ render:async e=>{try{let n=await u.render(e||"");return n=await d(n),n}catch(n){let t=p.render(e||"");return t=await d(t),t}},
22
+ // 同步渲染方法(不处理mermaid图表)
23
+ renderSync:e=>p.render(e||"")};export{h as m};
.output/public/assets/mermaid-CFwXVJJh.js ADDED
The diff for this file is too large to render. See raw diff
 
.output/public/assets/mermaid-render-f9KGMq_P.js ADDED
The diff for this file is too large to render. See raw diff
 
.output/public/assets/pinia-plugin-persistedstate-CxGPmdL5.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{d as e}from"./destr-WfmzGWA8.js";import{d as r,a as t}from"./deep-pick-omit-DP_A4OSP.js";function i(e,{storage:i,serializer:a,key:s,debug:o,pick:c,omit:n,beforeHydrate:d,afterHydrate:f},u,l=!0){try{l&&(null==d||d(u));const o=i.getItem(s);if(o){const i=a.deserialize(o),s=c?r(i,c):i,d=n?t(s,n):s;e.$patch(d)}l&&(null==f||f(u))}catch(y){}}function a(e,{storage:i,serializer:a,key:s,debug:o,pick:c,omit:n}){try{const o=c?r(e,c):e,d=n?t(o,n):o,f=a.serialize(d);i.setItem(s,f)}catch(d){}}function s(r={}){return function(t){!function(e,r,t){const{pinia:s,store:o,options:{persist:c=t}}=e;if(!c)return;if(!(o.$id in s.state.value)){const e=s._s.get(o.$id.replace("__hot:",""));return void(e&&Promise.resolve().then((()=>e.$persist())))}const n=(Array.isArray(c)?c:!0===c?[{}]:[c]).map(r);o.$hydrate=({runHooks:r=!0}={})=>{n.forEach((t=>{i(o,t,e,r)}))},o.$persist=()=>{n.forEach((e=>{a(o.$state,e)}))},n.forEach((r=>{i(o,r,e),o.$subscribe(((e,t)=>a(t,r)),{detached:!0})}))}(t,(i=>({key:(r.key?r.key:e=>e)(i.key??t.store.$id),debug:i.debug??r.debug??!1,serializer:i.serializer??r.serializer??{serialize:e=>JSON.stringify(e),deserialize:r=>e(r)},storage:i.storage??r.storage??window.localStorage,beforeHydrate:i.beforeHydrate,afterHydrate:i.afterHydrate,pick:i.pick,omit:i.omit})),r.auto??!1)}}export{s as c};
.output/public/assets/popup-lXl5mZ_4.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import{u as e,b as t,_ as r,s as o,i as s,d as a,m as i}from"./mermaid-render-f9KGMq_P.js";import{l as n,a as l,f as u,o as p,n as m,V as c,v as d,y as v,A as j,J as h,a0 as f,ae as w,af as y,F as g,aa as E,I as k,z as $,H as R,u as b,ad as C,U as _}from"./@vue-CfxotJ-S.js";import{f as D}from"./fetch-SJxNIU2V.js";import{m as A}from"./markdown-ppShADW8.js";import{I as M}from"./tdesign-vue-next-BiEwLJDx.js";import"./mermaid-CFwXVJJh.js";import"./@mermaid-js-C9iCgeAb.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./lodash-es-RhymR7yg.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./ts-dedent-CttZBlkd.js";import"./d3-transition-0ltv4da8.js";import"./d3-timer-keMr1twq.js";import"./d3-dispatch-Chq_f_hl.js";import"./d3-interpolate-Ct9kki6l.js";import"./d3-color-D5ULnJIe.js";import"./d3-selection-Oxnq6l6A.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-Dz8HuW59.js";import"./dompurify-DRcrZKbd.js";import"./stylis-Cl7w7uv3.js";import"./dagre-d3-es-D8JeTxsO.js";import"./@braintree-BB7t-Iuh.js";import"./khroma-C2oHPU0S.js";import"./dayjs-Cbdj87rt.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./d3-scale-CdkN4P7M.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-BhN1wQGI.js";import"./d3-format-C0lSXcPg.js";import"./d3-time-format-DB2uBv1t.js";import"./d3-time-B1kAM736.js";import"./d3-axis-pCwzqJ1S.js";import"./d3-shape-C6CU9yox.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-Bkc4UHOn.js";import"./cytoscape-BsbaL92W.js";import"./cytoscape-cose-bilkent-CcQu5e-H.js";import"./cose-base-kQthUiMK.js";import"./layout-base-DqRk0Tgc.js";import"./d3-sankey-B6tQBass.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./@iconify-BUO7KvjM.js";import"./marked-CrLTNeyQ.js";import"./cytoscape-fcose-B58q80h4.js";import"./pinia-gf2247cH.js";import"./pinia-plugin-persistedstate-CxGPmdL5.js";import"./destr-WfmzGWA8.js";import"./deep-pick-omit-DP_A4OSP.js";import"./lodash-VDnThKtA.js";import"./@vueuse-B4dz7nOv.js";import"./vue-i18n-BLIfPQxk.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./eventsource-parser-D0ssca5s.js";import"./markdown-it-link-attributes-DRKqjf49.js";import"./markdown-it-C8SkdHr7.js";import"./mdurl-CDXpswLz.js";import"./uc.micro-CLkLCS2f.js";import"./entities-D7HTx9ov.js";import"./linkify-it-LcVOBuC5.js";import"./punycode.js-Bmr3cAX8.js";import"./@traptitech-xv_Vpjqh.js";import"./katex-Vs6-m9jZ.js";import"./markdown-it-highlightjs-IY8LrfKU.js";import"./highlight.js-BgdnSEsd.js";import"./tdesign-icons-vue-next-Bre5yOVt.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";const U={class:"popup-container rounded-lg shadow-lg w-full flex flex-col pb-0 p-4",style:{"max-height":"500px"}},x={class:"relative flex items-center"},L={key:0,class:"space-y-2"},O=["onClick"],T={key:1},N=["innerHTML"],I={class:"footer-text py-1 border-t mt-4 text-sm text-center"},B=_(r(n({__name:"PopupWindow",setup(r){e();const o=t(),s=l(""),a=l(null),i=l(0),n=l(!1),_=l(""),B=l(!1),H=l(null),S=l(!0),z=e(),F=u((()=>z.displayMode)),W=[{name:"问问",icon:"chat",prompt:"{{text}}",show:!0}],Y=u((()=>{const e=o.toolBarButtons.filter((e=>e.name&&e.show&&void 0!==e.prompt));return[...W,...e]})),P=async()=>{!n.value&&s.value.trim()&&await G()},Q=()=>{if(!(null==window?void 0:window.ipcRenderer)||!H.value)return;const e=H.value.scrollHeight+118,t=Math.min(500,e);window.ipcRenderer.send("adjust-popup-height",t)},V=((e,t)=>{let r=null;return(...o)=>{r&&clearTimeout(r),r=setTimeout((()=>e(...o)),t)}})(Q,50),q=()=>{if(!H.value)return;const{scrollTop:e,scrollHeight:t,clientHeight:r}=H.value;S.value=!(t-e-r>50)},K={
2
+ // 数学公式模式
3
+ MATH_FORMULA:/^[\d\+\-\*\/\.\(\)\s]+$/,
4
+ // 时间日期查询模式
5
+ TIME_QUERY:/^(时间|日期|现在|今天|今天日期|当前时间|现在几点|现在时间|时间是|日期是)$/,
6
+ // 随机数生成模式
7
+ RANDOM_NUMBER:/^随机数(\s*(\d+)(\s*[,-]\s*(\d+))?)?$/,
8
+ // 随机密码生成模式
9
+ RANDOM_PASSWORD:/^随机密码(\s*(\d+))?$/,
10
+ // 字符计数模式
11
+ CHAR_COUNT:/^字符计数[\s:]*(.+)$/,
12
+ // Base64编码模式
13
+ BASE64_ENCODE:/^base64编码[\s:]*(.+)$/i,
14
+ // Base64解码模式
15
+ BASE64_DECODE:/^base64解码[\s:]*(.+)$/i,
16
+ // URL编码模式
17
+ URL_ENCODE:/^url编码[\s:]*(.+)$/i,
18
+ // URL解码模式
19
+ URL_DECODE:/^url解码[\s:]*(.+)$/i},X=(e=1,t=100)=>`随机数 (${e=Math.ceil(e)}-${t=Math.floor(t)}): ${Math.floor(Math.random()*(t-e+1))+e}`,J=(e=12)=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+";let r="";for(let o=0;o<e;o++){r+=t[Math.floor(74*Math.random())]}return`随机密码 (${e}位): ${r}`},Z=e=>{if(K.MATH_FORMULA.test(e))return(e=>{try{return`${e} = ${new Function("return "+e)()}`}catch(t){return"计算公式错误"}})(e);if(K.TIME_QUERY.test(e))return(()=>{const e=new Date,t=e.toLocaleDateString("zh-CN",{year:"numeric",month:"long",day:"numeric",weekday:"long"});return`当前时间:${e.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}\n当前日期:${t}`})();const t=e.match(K.RANDOM_NUMBER);if(t){if(t[2]&&t[4]){const e=parseInt(t[2]),r=parseInt(t[4]);return X(e,r)}return t[2]?X(1,parseInt(t[2])):X()}const r=e.match(K.RANDOM_PASSWORD);if(r){if(r[2]){const e=parseInt(r[2]);return J(e)}return J()}const o=e.match(K.CHAR_COUNT);if(o&&o[1])return(e=>{const t=e.length,r=e.replace(/\s/g,"").length;return`原文本: ${e}\n总字符数: ${t}\n不含空格字符数: ${r}`})(o[1]);const s=e.match(K.BASE64_ENCODE);if(s&&s[1])return(e=>{try{return`原文本: ${e}\nBase64编码: ${btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,((e,t)=>String.fromCharCode(parseInt(t,16)))))}`}catch(t){return`Base64编码错误: ${t.message}`}})(s[1]);const a=e.match(K.BASE64_DECODE);if(a&&a[1])return(e=>{try{return`编码文本: ${e}\n解码结果: ${decodeURIComponent(Array.prototype.map.call(atob(e),(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2))).join(""))}`}catch(t){return`Base64解码错误: ${t.message}`}})(a[1]);const i=e.match(K.URL_ENCODE);if(i&&i[1])return(e=>{try{return`原文本: ${e}\nURL编码: ${encodeURIComponent(e)}`}catch(t){return`URL编码错误: ${t.message}`}})(i[1]);const n=e.match(K.URL_DECODE);return n&&n[1]?(e=>{try{return`编码文本: ${e}\n解码结果: ${decodeURIComponent(e)}`}catch(t){return`URL解码错误: ${t.message}`}})(n[1]):null},G=async()=>{n.value=!0,B.value=!0,m((()=>{Q()}));try{const e=s.value.trim();if(!e)return;const t=Y.value[i.value];if("问问"===t.name){const t=Z(e);if(t)return void(_.value=t)}const r=(t.prompt||"").replace(/{{text}}/g,e);_.value="",await D(r,(e=>{_.value=e,m((()=>{H.value&&S.value&&(H.value.scrollTop=H.value.scrollHeight),V()}))}))}finally{n.value=!1}},ee=()=>{B.value=!1,_.value="",m((()=>{var e,t;null==(e=a.value)||e.select(),null==(t=a.value)||t.focus(),Q()}))},te=()=>{B.value=!1,_.value="",s.value="",m((()=>{var e;null==(e=a.value)||e.focus(),Q()}))},re=e=>{"Escape"!==e.key?B.value||("Tab"===e.key&&(e.preventDefault(),i.value=(i.value+1)%Y.value.length),"ArrowUp"===e.key?(e.preventDefault(),i.value=i.value>0?i.value-1:Y.value.length-1):"ArrowDown"===e.key&&(e.preventDefault(),i.value=(i.value+1)%Y.value.length)):B.value?ee():oe()},oe=()=>{(null==window?void 0:window.ipcRenderer)&&window.ipcRenderer.send("hide-popup")};return p((()=>{var e,t;document.addEventListener("click",oe),document.addEventListener("keydown",re),null==(e=H.value)||e.addEventListener("scroll",q),null==(t=a.value)||t.focus(),m((()=>{Q()})),(null==window?void 0:window.ipcRenderer)&&window.ipcRenderer.on("show-window",te)})),c((()=>{var e;document.removeEventListener("click",oe),document.removeEventListener("keydown",re),null==(e=H.value)||e.removeEventListener("scroll",q),(null==window?void 0:window.ipcRenderer)&&window.ipcRenderer.removeListener("show-window",te)})),(e,t)=>{const r=M;return v(),d("div",{class:k(["popup-window fixed inset-0 flex items-start justify-center",F.value]),onClick:t[1]||(t[1]=C((()=>{}),["stop"]))},[j("div",U,[j("div",x,[B.value?(v(),h(r,{key:1,name:"arrow-left",class:"absolute left-3 icon-color cursor-pointer",onClick:ee})):(v(),h(r,{key:0,name:"search",class:"absolute left-3 icon-color"})),f(j("input",{ref_key:"inputRef",ref:a,"onUpdate:modelValue":t[0]||(t[0]=e=>s.value=e),type:"text",class:"input-field w-full pl-10 pr-4 py-2 rounded-lg border focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"请输入内容...",onKeydown:y(P,["enter"])},null,544),[[w,s.value]])]),j("div",{ref_key:"contentContainer",ref:H,class:"mt-4 overflow-auto no-scrollbar min-h-32"},[B.value?(v(),d("div",T,[j("div",{class:"markdown-body",innerHTML:b(A).renderSync(_.value)},null,8,N)])):(v(),d("div",L,[(v(!0),d(g,null,E(Y.value,((e,t)=>(v(),d("div",{key:e.name,class:k(["tool-button flex items-center p-2 rounded-lg cursor-pointer",i.value===t?"tool-button-selected":""]),onClick:e=>(async e=>{n.value||(i.value=e,await G())})(t)},[e.icon?(v(),h(r,{key:0,name:e.icon,class:"mr-2"},null,8,["name"])):$("",!0),j("span",null,R(e.name),1)],10,O)))),128))]))],512),j("div",I,R(B.value?`${Y.value[i.value].name} - 使用 Esc 返回`:"使用 ↑↓ 或 Tab 切换,Enter 发送,Esc 关闭"),1)])],2)}}}),[["__scopeId","data-v-37d01730"]]));B.use(o),B.use(s),a(),i.initialize(),B.mount("#app").$nextTick((()=>{postMessage({payload:"removeLoading"},"*")}));
.output/public/index.html CHANGED
@@ -10,7 +10,7 @@
10
  <link rel="mask-icon" href="/assets/logo.svg" color="#FFFFFF">
11
  <meta name="theme-color" content="#ffffff">
12
  <link rel="manifest" href="./manifest.webmanifest" />
13
- <script type="module" crossorigin src="./assets/main-BVjjoCN0.js"></script>
14
  <link rel="modulepreload" crossorigin href="./assets/vscode-jsonrpc-B7fdjHWu.js">
15
  <link rel="modulepreload" crossorigin href="./assets/lodash-es-RhymR7yg.js">
16
  <link rel="modulepreload" crossorigin href="./assets/@chevrotain-DFy4Htpj.js">
@@ -30,7 +30,7 @@
30
  <link rel="modulepreload" crossorigin href="./assets/d3-ease-Cx6bG2vu.js">
31
  <link rel="modulepreload" crossorigin href="./assets/d3-transition-0ltv4da8.js">
32
  <link rel="modulepreload" crossorigin href="./assets/d3-zoom-Dz8HuW59.js">
33
- <link rel="modulepreload" crossorigin href="./assets/dompurify-z_KyBU9t.js">
34
  <link rel="modulepreload" crossorigin href="./assets/stylis-Cl7w7uv3.js">
35
  <link rel="modulepreload" crossorigin href="./assets/dagre-d3-es-D8JeTxsO.js">
36
  <link rel="modulepreload" crossorigin href="./assets/@braintree-BB7t-Iuh.js">
@@ -48,7 +48,7 @@
48
  <link rel="modulepreload" crossorigin href="./assets/d3-path-QSrLXsQ3.js">
49
  <link rel="modulepreload" crossorigin href="./assets/d3-shape-C6CU9yox.js">
50
  <link rel="modulepreload" crossorigin href="./assets/roughjs-Bkc4UHOn.js">
51
- <link rel="modulepreload" crossorigin href="./assets/cytoscape-DQzyuV5c.js">
52
  <link rel="modulepreload" crossorigin href="./assets/layout-base-DqRk0Tgc.js">
53
  <link rel="modulepreload" crossorigin href="./assets/cose-base-kQthUiMK.js">
54
  <link rel="modulepreload" crossorigin href="./assets/cytoscape-cose-bilkent-CcQu5e-H.js">
@@ -57,13 +57,12 @@
57
  <link rel="modulepreload" crossorigin href="./assets/@iconify-BUO7KvjM.js">
58
  <link rel="modulepreload" crossorigin href="./assets/marked-CrLTNeyQ.js">
59
  <link rel="modulepreload" crossorigin href="./assets/cytoscape-fcose-B58q80h4.js">
60
- <link rel="modulepreload" crossorigin href="./assets/mermaid-r27wrvTx.js">
61
  <link rel="modulepreload" crossorigin href="./assets/@vue-CfxotJ-S.js">
62
  <link rel="modulepreload" crossorigin href="./assets/pinia-gf2247cH.js">
63
- <link rel="modulepreload" crossorigin href="./assets/destr-ClW9AvhW.js">
64
  <link rel="modulepreload" crossorigin href="./assets/deep-pick-omit-DP_A4OSP.js">
65
- <link rel="modulepreload" crossorigin href="./assets/pinia-plugin-persistedstate-DyrI1rJI.js">
66
- <link rel="modulepreload" crossorigin href="./assets/eventsource-parser-D0ssca5s.js">
67
  <link rel="modulepreload" crossorigin href="./assets/lodash-VDnThKtA.js">
68
  <link rel="modulepreload" crossorigin href="./assets/tdesign-icons-vue-next-Bre5yOVt.js">
69
  <link rel="modulepreload" crossorigin href="./assets/sortablejs-DGtSoqI-.js">
@@ -77,7 +76,7 @@
77
  <link rel="modulepreload" crossorigin href="./assets/@material-C_XhzpVg.js">
78
  <link rel="modulepreload" crossorigin href="./assets/bezier-easing-BncZ6jfA.js">
79
  <link rel="modulepreload" crossorigin href="./assets/tvision-color-BdwcCUqE.js">
80
- <link rel="modulepreload" crossorigin href="./assets/mermaid-render-DYiT7KKL.js">
81
  <link rel="modulepreload" crossorigin href="./assets/vue-router-DKqWD4MR.js">
82
  <link rel="modulepreload" crossorigin href="./assets/vue-BIpqWpgL.js">
83
  <link rel="modulepreload" crossorigin href="./assets/vuedraggable-DAEPkKhD.js">
 
10
  <link rel="mask-icon" href="/assets/logo.svg" color="#FFFFFF">
11
  <meta name="theme-color" content="#ffffff">
12
  <link rel="manifest" href="./manifest.webmanifest" />
13
+ <script type="module" crossorigin src="./assets/main-apEI6pT3.js"></script>
14
  <link rel="modulepreload" crossorigin href="./assets/vscode-jsonrpc-B7fdjHWu.js">
15
  <link rel="modulepreload" crossorigin href="./assets/lodash-es-RhymR7yg.js">
16
  <link rel="modulepreload" crossorigin href="./assets/@chevrotain-DFy4Htpj.js">
 
30
  <link rel="modulepreload" crossorigin href="./assets/d3-ease-Cx6bG2vu.js">
31
  <link rel="modulepreload" crossorigin href="./assets/d3-transition-0ltv4da8.js">
32
  <link rel="modulepreload" crossorigin href="./assets/d3-zoom-Dz8HuW59.js">
33
+ <link rel="modulepreload" crossorigin href="./assets/dompurify-DRcrZKbd.js">
34
  <link rel="modulepreload" crossorigin href="./assets/stylis-Cl7w7uv3.js">
35
  <link rel="modulepreload" crossorigin href="./assets/dagre-d3-es-D8JeTxsO.js">
36
  <link rel="modulepreload" crossorigin href="./assets/@braintree-BB7t-Iuh.js">
 
48
  <link rel="modulepreload" crossorigin href="./assets/d3-path-QSrLXsQ3.js">
49
  <link rel="modulepreload" crossorigin href="./assets/d3-shape-C6CU9yox.js">
50
  <link rel="modulepreload" crossorigin href="./assets/roughjs-Bkc4UHOn.js">
51
+ <link rel="modulepreload" crossorigin href="./assets/cytoscape-BsbaL92W.js">
52
  <link rel="modulepreload" crossorigin href="./assets/layout-base-DqRk0Tgc.js">
53
  <link rel="modulepreload" crossorigin href="./assets/cose-base-kQthUiMK.js">
54
  <link rel="modulepreload" crossorigin href="./assets/cytoscape-cose-bilkent-CcQu5e-H.js">
 
57
  <link rel="modulepreload" crossorigin href="./assets/@iconify-BUO7KvjM.js">
58
  <link rel="modulepreload" crossorigin href="./assets/marked-CrLTNeyQ.js">
59
  <link rel="modulepreload" crossorigin href="./assets/cytoscape-fcose-B58q80h4.js">
60
+ <link rel="modulepreload" crossorigin href="./assets/mermaid-CFwXVJJh.js">
61
  <link rel="modulepreload" crossorigin href="./assets/@vue-CfxotJ-S.js">
62
  <link rel="modulepreload" crossorigin href="./assets/pinia-gf2247cH.js">
63
+ <link rel="modulepreload" crossorigin href="./assets/destr-WfmzGWA8.js">
64
  <link rel="modulepreload" crossorigin href="./assets/deep-pick-omit-DP_A4OSP.js">
65
+ <link rel="modulepreload" crossorigin href="./assets/pinia-plugin-persistedstate-CxGPmdL5.js">
 
66
  <link rel="modulepreload" crossorigin href="./assets/lodash-VDnThKtA.js">
67
  <link rel="modulepreload" crossorigin href="./assets/tdesign-icons-vue-next-Bre5yOVt.js">
68
  <link rel="modulepreload" crossorigin href="./assets/sortablejs-DGtSoqI-.js">
 
76
  <link rel="modulepreload" crossorigin href="./assets/@material-C_XhzpVg.js">
77
  <link rel="modulepreload" crossorigin href="./assets/bezier-easing-BncZ6jfA.js">
78
  <link rel="modulepreload" crossorigin href="./assets/tvision-color-BdwcCUqE.js">
79
+ <link rel="modulepreload" crossorigin href="./assets/mermaid-render-f9KGMq_P.js">
80
  <link rel="modulepreload" crossorigin href="./assets/vue-router-DKqWD4MR.js">
81
  <link rel="modulepreload" crossorigin href="./assets/vue-BIpqWpgL.js">
82
  <link rel="modulepreload" crossorigin href="./assets/vuedraggable-DAEPkKhD.js">
.output/public/popup.html CHANGED
@@ -3,7 +3,7 @@
3
  <head>
4
  <meta charset="UTF-8" />
5
  <title>Popup</title>
6
- <script type="module" crossorigin src="./assets/popup-DR3WY9dZ.js"></script>
7
  <link rel="modulepreload" crossorigin href="./assets/vscode-jsonrpc-B7fdjHWu.js">
8
  <link rel="modulepreload" crossorigin href="./assets/lodash-es-RhymR7yg.js">
9
  <link rel="modulepreload" crossorigin href="./assets/@chevrotain-DFy4Htpj.js">
@@ -23,7 +23,7 @@
23
  <link rel="modulepreload" crossorigin href="./assets/d3-ease-Cx6bG2vu.js">
24
  <link rel="modulepreload" crossorigin href="./assets/d3-transition-0ltv4da8.js">
25
  <link rel="modulepreload" crossorigin href="./assets/d3-zoom-Dz8HuW59.js">
26
- <link rel="modulepreload" crossorigin href="./assets/dompurify-z_KyBU9t.js">
27
  <link rel="modulepreload" crossorigin href="./assets/stylis-Cl7w7uv3.js">
28
  <link rel="modulepreload" crossorigin href="./assets/dagre-d3-es-D8JeTxsO.js">
29
  <link rel="modulepreload" crossorigin href="./assets/@braintree-BB7t-Iuh.js">
@@ -41,7 +41,7 @@
41
  <link rel="modulepreload" crossorigin href="./assets/d3-path-QSrLXsQ3.js">
42
  <link rel="modulepreload" crossorigin href="./assets/d3-shape-C6CU9yox.js">
43
  <link rel="modulepreload" crossorigin href="./assets/roughjs-Bkc4UHOn.js">
44
- <link rel="modulepreload" crossorigin href="./assets/cytoscape-DQzyuV5c.js">
45
  <link rel="modulepreload" crossorigin href="./assets/layout-base-DqRk0Tgc.js">
46
  <link rel="modulepreload" crossorigin href="./assets/cose-base-kQthUiMK.js">
47
  <link rel="modulepreload" crossorigin href="./assets/cytoscape-cose-bilkent-CcQu5e-H.js">
@@ -50,13 +50,12 @@
50
  <link rel="modulepreload" crossorigin href="./assets/@iconify-BUO7KvjM.js">
51
  <link rel="modulepreload" crossorigin href="./assets/marked-CrLTNeyQ.js">
52
  <link rel="modulepreload" crossorigin href="./assets/cytoscape-fcose-B58q80h4.js">
53
- <link rel="modulepreload" crossorigin href="./assets/mermaid-r27wrvTx.js">
54
  <link rel="modulepreload" crossorigin href="./assets/@vue-CfxotJ-S.js">
55
  <link rel="modulepreload" crossorigin href="./assets/pinia-gf2247cH.js">
56
- <link rel="modulepreload" crossorigin href="./assets/destr-ClW9AvhW.js">
57
  <link rel="modulepreload" crossorigin href="./assets/deep-pick-omit-DP_A4OSP.js">
58
- <link rel="modulepreload" crossorigin href="./assets/pinia-plugin-persistedstate-DyrI1rJI.js">
59
- <link rel="modulepreload" crossorigin href="./assets/eventsource-parser-D0ssca5s.js">
60
  <link rel="modulepreload" crossorigin href="./assets/lodash-VDnThKtA.js">
61
  <link rel="modulepreload" crossorigin href="./assets/tdesign-icons-vue-next-Bre5yOVt.js">
62
  <link rel="modulepreload" crossorigin href="./assets/sortablejs-DGtSoqI-.js">
@@ -70,7 +69,9 @@
70
  <link rel="modulepreload" crossorigin href="./assets/@material-C_XhzpVg.js">
71
  <link rel="modulepreload" crossorigin href="./assets/bezier-easing-BncZ6jfA.js">
72
  <link rel="modulepreload" crossorigin href="./assets/tvision-color-BdwcCUqE.js">
73
- <link rel="modulepreload" crossorigin href="./assets/mermaid-render-DYiT7KKL.js">
 
 
74
  <link rel="modulepreload" crossorigin href="./assets/markdown-it-link-attributes-DRKqjf49.js">
75
  <link rel="modulepreload" crossorigin href="./assets/mdurl-CDXpswLz.js">
76
  <link rel="modulepreload" crossorigin href="./assets/uc.micro-CLkLCS2f.js">
@@ -80,9 +81,9 @@
80
  <link rel="modulepreload" crossorigin href="./assets/markdown-it-C8SkdHr7.js">
81
  <link rel="modulepreload" crossorigin href="./assets/katex-Vs6-m9jZ.js">
82
  <link rel="modulepreload" crossorigin href="./assets/@traptitech-xv_Vpjqh.js">
83
- <link rel="modulepreload" crossorigin href="./assets/highlight.js-ato5kCvT.js">
84
- <link rel="modulepreload" crossorigin href="./assets/markdown-it-highlightjs-6zEPG1Qy.js">
85
- <link rel="modulepreload" crossorigin href="./assets/markdown-6PNN04BW.js">
86
  <link rel="stylesheet" crossorigin href="./assets/tdesign-icons-vue-next-BGgy7GQY.css">
87
  <link rel="stylesheet" crossorigin href="./assets/tdesign-vue-next-BiLJzazs.css">
88
  <link rel="stylesheet" crossorigin href="./assets/popup-BMjsrYtk.css">
 
3
  <head>
4
  <meta charset="UTF-8" />
5
  <title>Popup</title>
6
+ <script type="module" crossorigin src="./assets/popup-lXl5mZ_4.js"></script>
7
  <link rel="modulepreload" crossorigin href="./assets/vscode-jsonrpc-B7fdjHWu.js">
8
  <link rel="modulepreload" crossorigin href="./assets/lodash-es-RhymR7yg.js">
9
  <link rel="modulepreload" crossorigin href="./assets/@chevrotain-DFy4Htpj.js">
 
23
  <link rel="modulepreload" crossorigin href="./assets/d3-ease-Cx6bG2vu.js">
24
  <link rel="modulepreload" crossorigin href="./assets/d3-transition-0ltv4da8.js">
25
  <link rel="modulepreload" crossorigin href="./assets/d3-zoom-Dz8HuW59.js">
26
+ <link rel="modulepreload" crossorigin href="./assets/dompurify-DRcrZKbd.js">
27
  <link rel="modulepreload" crossorigin href="./assets/stylis-Cl7w7uv3.js">
28
  <link rel="modulepreload" crossorigin href="./assets/dagre-d3-es-D8JeTxsO.js">
29
  <link rel="modulepreload" crossorigin href="./assets/@braintree-BB7t-Iuh.js">
 
41
  <link rel="modulepreload" crossorigin href="./assets/d3-path-QSrLXsQ3.js">
42
  <link rel="modulepreload" crossorigin href="./assets/d3-shape-C6CU9yox.js">
43
  <link rel="modulepreload" crossorigin href="./assets/roughjs-Bkc4UHOn.js">
44
+ <link rel="modulepreload" crossorigin href="./assets/cytoscape-BsbaL92W.js">
45
  <link rel="modulepreload" crossorigin href="./assets/layout-base-DqRk0Tgc.js">
46
  <link rel="modulepreload" crossorigin href="./assets/cose-base-kQthUiMK.js">
47
  <link rel="modulepreload" crossorigin href="./assets/cytoscape-cose-bilkent-CcQu5e-H.js">
 
50
  <link rel="modulepreload" crossorigin href="./assets/@iconify-BUO7KvjM.js">
51
  <link rel="modulepreload" crossorigin href="./assets/marked-CrLTNeyQ.js">
52
  <link rel="modulepreload" crossorigin href="./assets/cytoscape-fcose-B58q80h4.js">
53
+ <link rel="modulepreload" crossorigin href="./assets/mermaid-CFwXVJJh.js">
54
  <link rel="modulepreload" crossorigin href="./assets/@vue-CfxotJ-S.js">
55
  <link rel="modulepreload" crossorigin href="./assets/pinia-gf2247cH.js">
56
+ <link rel="modulepreload" crossorigin href="./assets/destr-WfmzGWA8.js">
57
  <link rel="modulepreload" crossorigin href="./assets/deep-pick-omit-DP_A4OSP.js">
58
+ <link rel="modulepreload" crossorigin href="./assets/pinia-plugin-persistedstate-CxGPmdL5.js">
 
59
  <link rel="modulepreload" crossorigin href="./assets/lodash-VDnThKtA.js">
60
  <link rel="modulepreload" crossorigin href="./assets/tdesign-icons-vue-next-Bre5yOVt.js">
61
  <link rel="modulepreload" crossorigin href="./assets/sortablejs-DGtSoqI-.js">
 
69
  <link rel="modulepreload" crossorigin href="./assets/@material-C_XhzpVg.js">
70
  <link rel="modulepreload" crossorigin href="./assets/bezier-easing-BncZ6jfA.js">
71
  <link rel="modulepreload" crossorigin href="./assets/tvision-color-BdwcCUqE.js">
72
+ <link rel="modulepreload" crossorigin href="./assets/mermaid-render-f9KGMq_P.js">
73
+ <link rel="modulepreload" crossorigin href="./assets/eventsource-parser-D0ssca5s.js">
74
+ <link rel="modulepreload" crossorigin href="./assets/fetch-SJxNIU2V.js">
75
  <link rel="modulepreload" crossorigin href="./assets/markdown-it-link-attributes-DRKqjf49.js">
76
  <link rel="modulepreload" crossorigin href="./assets/mdurl-CDXpswLz.js">
77
  <link rel="modulepreload" crossorigin href="./assets/uc.micro-CLkLCS2f.js">
 
81
  <link rel="modulepreload" crossorigin href="./assets/markdown-it-C8SkdHr7.js">
82
  <link rel="modulepreload" crossorigin href="./assets/katex-Vs6-m9jZ.js">
83
  <link rel="modulepreload" crossorigin href="./assets/@traptitech-xv_Vpjqh.js">
84
+ <link rel="modulepreload" crossorigin href="./assets/highlight.js-BgdnSEsd.js">
85
+ <link rel="modulepreload" crossorigin href="./assets/markdown-it-highlightjs-IY8LrfKU.js">
86
+ <link rel="modulepreload" crossorigin href="./assets/markdown-ppShADW8.js">
87
  <link rel="stylesheet" crossorigin href="./assets/tdesign-icons-vue-next-BGgy7GQY.css">
88
  <link rel="stylesheet" crossorigin href="./assets/tdesign-vue-next-BiLJzazs.css">
89
  <link rel="stylesheet" crossorigin href="./assets/popup-BMjsrYtk.css">
.output/public/sw.js CHANGED
@@ -1,5 +1,5 @@
1
  // 缓存名称 - 更改版本号可以强制更新缓存
2
- const CACHE_NAME = 'app-cache-v1743491408449';
3
  const ASSETS_PATTERN = /\/assets\//;
4
  // 需要缓存的资源列表
5
  const urlsToCache = [
 
1
  // 缓存名称 - 更改版本号可以强制更新缓存
2
+ const CACHE_NAME = 'app-cache-v1743751651209';
3
  const ASSETS_PATTERN = /\/assets\//;
4
  // 需要缓存的资源列表
5
  const urlsToCache = [
.output/server/chunks/nitro/nitro.mjs CHANGED
The diff for this file is too large to render. See raw diff
 
.output/server/package.json CHANGED
@@ -1 +1,48 @@
1
- {"name":"seedchat-prod","version":"1.0.6","type":"module","private":true,"dependencies":{"@grpc/grpc-js":"1.13.2","@grpc/proto-loader":"0.7.13","@js-sdsl/ordered-map":"4.4.2","@protobufjs/aspromise":"1.1.2","@protobufjs/base64":"1.1.2","@protobufjs/codegen":"2.0.4","@protobufjs/eventemitter":"1.1.0","@protobufjs/fetch":"1.1.0","@protobufjs/float":"1.0.2","@protobufjs/inquire":"1.1.0","@protobufjs/path":"1.1.2","@protobufjs/pool":"1.1.0","@protobufjs/utf8":"1.1.0","asynckit":"0.4.0","call-bind-apply-helpers":"1.0.2","combined-stream":"1.0.8","delayed-stream":"1.0.0","dunder-proto":"1.0.1","es-define-property":"1.0.1","es-errors":"1.3.0","es-object-atoms":"1.1.1","es-set-tostringtag":"2.1.0","eventsource-parser":"3.0.1","form-data":"4.0.2","function-bind":"1.1.2","get-intrinsic":"1.3.0","get-proto":"1.0.1","gopd":"1.2.0","has-symbols":"1.1.0","has-tostringtag":"1.0.2","hasown":"2.0.2","jose":"6.0.10","lodash.camelcase":"4.3.0","long":"5.3.1","math-intrinsics":"1.1.0","mime-db":"1.52.0","mime-types":"2.1.35","protobufjs":"7.4.0","uuid":"11.1.0","ws":"8.18.1"}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "seedchat-prod",
3
+ "version": "1.0.6",
4
+ "type": "module",
5
+ "private": true,
6
+ "dependencies": {
7
+ "@grpc/grpc-js": "1.13.2",
8
+ "@grpc/proto-loader": "0.7.13",
9
+ "@js-sdsl/ordered-map": "4.4.2",
10
+ "@protobufjs/aspromise": "1.1.2",
11
+ "@protobufjs/base64": "1.1.2",
12
+ "@protobufjs/codegen": "2.0.4",
13
+ "@protobufjs/eventemitter": "1.1.0",
14
+ "@protobufjs/fetch": "1.1.0",
15
+ "@protobufjs/float": "1.0.2",
16
+ "@protobufjs/inquire": "1.1.0",
17
+ "@protobufjs/path": "1.1.2",
18
+ "@protobufjs/pool": "1.1.0",
19
+ "@protobufjs/utf8": "1.1.0",
20
+ "asynckit": "0.4.0",
21
+ "call-bind-apply-helpers": "1.0.2",
22
+ "combined-stream": "1.0.8",
23
+ "delayed-stream": "1.0.0",
24
+ "dunder-proto": "1.0.1",
25
+ "es-define-property": "1.0.1",
26
+ "es-errors": "1.3.0",
27
+ "es-object-atoms": "1.1.1",
28
+ "es-set-tostringtag": "2.1.0",
29
+ "eventsource-parser": "3.0.1",
30
+ "form-data": "4.0.2",
31
+ "function-bind": "1.1.2",
32
+ "get-intrinsic": "1.3.0",
33
+ "get-proto": "1.0.1",
34
+ "gopd": "1.2.0",
35
+ "has-symbols": "1.1.0",
36
+ "has-tostringtag": "1.0.2",
37
+ "hasown": "2.0.2",
38
+ "jose": "6.0.10",
39
+ "lodash.camelcase": "4.3.0",
40
+ "long": "5.3.1",
41
+ "math-intrinsics": "1.1.0",
42
+ "mime-db": "1.52.0",
43
+ "mime-types": "2.1.35",
44
+ "protobufjs": "7.4.0",
45
+ "uuid": "11.1.0",
46
+ "ws": "8.18.1"
47
+ }
48
+ }
package-lock.json CHANGED
@@ -821,9 +821,9 @@
821
  }
822
  },
823
  "node_modules/@electron/asar": {
824
- "version": "3.3.1",
825
- "resolved": "https://registry.npmjs.org/@electron/asar/-/asar-3.3.1.tgz",
826
- "integrity": "sha512-WtpC/+34p0skWZiarRjLAyqaAX78DofhDxnREy/V5XHfu1XEXbFCSSMcDQ6hNCPJFaPy8/NnUgYuf9uiCkvKPg==",
827
  "dev": true,
828
  "license": "MIT",
829
  "dependencies": {
@@ -3061,9 +3061,9 @@
3061
  }
3062
  },
3063
  "node_modules/@nuxt/kit": {
3064
- "version": "3.16.1",
3065
- "resolved": "https://registry.npmjs.org/@nuxt/kit/-/kit-3.16.1.tgz",
3066
- "integrity": "sha512-Perby8hJGUeCWad5oTVXb/Ibvp18ZCUC5PxHHu+acMDmVfnxSo48yqk7qNd09VkTF3LEzoEjNZpmW2ZWN0ry7A==",
3067
  "license": "MIT",
3068
  "dependencies": {
3069
  "c12": "^3.0.2",
@@ -3086,7 +3086,7 @@
3086
  "std-env": "^3.8.1",
3087
  "ufo": "^1.5.4",
3088
  "unctx": "^2.4.1",
3089
- "unimport": "^4.1.2",
3090
  "untyped": "^2.0.0"
3091
  },
3092
  "engines": {
@@ -3832,9 +3832,9 @@
3832
  }
3833
  },
3834
  "node_modules/@rollup/rollup-android-arm-eabi": {
3835
- "version": "4.38.0",
3836
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.38.0.tgz",
3837
- "integrity": "sha512-ldomqc4/jDZu/xpYU+aRxo3V4mGCV9HeTgUBANI3oIQMOL+SsxB+S2lxMpkFp5UamSS3XuTMQVbsS24R4J4Qjg==",
3838
  "cpu": [
3839
  "arm"
3840
  ],
@@ -3846,9 +3846,9 @@
3846
  ]
3847
  },
3848
  "node_modules/@rollup/rollup-android-arm64": {
3849
- "version": "4.38.0",
3850
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.38.0.tgz",
3851
- "integrity": "sha512-VUsgcy4GhhT7rokwzYQP+aV9XnSLkkhlEJ0St8pbasuWO/vwphhZQxYEKUP3ayeCYLhk6gEtacRpYP/cj3GjyQ==",
3852
  "cpu": [
3853
  "arm64"
3854
  ],
@@ -3860,9 +3860,9 @@
3860
  ]
3861
  },
3862
  "node_modules/@rollup/rollup-darwin-arm64": {
3863
- "version": "4.38.0",
3864
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.38.0.tgz",
3865
- "integrity": "sha512-buA17AYXlW9Rn091sWMq1xGUvWQFOH4N1rqUxGJtEQzhChxWjldGCCup7r/wUnaI6Au8sKXpoh0xg58a7cgcpg==",
3866
  "cpu": [
3867
  "arm64"
3868
  ],
@@ -3874,9 +3874,9 @@
3874
  ]
3875
  },
3876
  "node_modules/@rollup/rollup-darwin-x64": {
3877
- "version": "4.38.0",
3878
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.38.0.tgz",
3879
- "integrity": "sha512-Mgcmc78AjunP1SKXl624vVBOF2bzwNWFPMP4fpOu05vS0amnLcX8gHIge7q/lDAHy3T2HeR0TqrriZDQS2Woeg==",
3880
  "cpu": [
3881
  "x64"
3882
  ],
@@ -3888,9 +3888,9 @@
3888
  ]
3889
  },
3890
  "node_modules/@rollup/rollup-freebsd-arm64": {
3891
- "version": "4.38.0",
3892
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.38.0.tgz",
3893
- "integrity": "sha512-zzJACgjLbQTsscxWqvrEQAEh28hqhebpRz5q/uUd1T7VTwUNZ4VIXQt5hE7ncs0GrF+s7d3S4on4TiXUY8KoQA==",
3894
  "cpu": [
3895
  "arm64"
3896
  ],
@@ -3902,9 +3902,9 @@
3902
  ]
3903
  },
3904
  "node_modules/@rollup/rollup-freebsd-x64": {
3905
- "version": "4.38.0",
3906
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.38.0.tgz",
3907
- "integrity": "sha512-hCY/KAeYMCyDpEE4pTETam0XZS4/5GXzlLgpi5f0IaPExw9kuB+PDTOTLuPtM10TlRG0U9OSmXJ+Wq9J39LvAg==",
3908
  "cpu": [
3909
  "x64"
3910
  ],
@@ -3916,9 +3916,9 @@
3916
  ]
3917
  },
3918
  "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
3919
- "version": "4.38.0",
3920
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.38.0.tgz",
3921
- "integrity": "sha512-mimPH43mHl4JdOTD7bUMFhBdrg6f9HzMTOEnzRmXbOZqjijCw8LA5z8uL6LCjxSa67H2xiLFvvO67PT05PRKGg==",
3922
  "cpu": [
3923
  "arm"
3924
  ],
@@ -3930,9 +3930,9 @@
3930
  ]
3931
  },
3932
  "node_modules/@rollup/rollup-linux-arm-musleabihf": {
3933
- "version": "4.38.0",
3934
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.38.0.tgz",
3935
- "integrity": "sha512-tPiJtiOoNuIH8XGG8sWoMMkAMm98PUwlriOFCCbZGc9WCax+GLeVRhmaxjJtz6WxrPKACgrwoZ5ia/uapq3ZVg==",
3936
  "cpu": [
3937
  "arm"
3938
  ],
@@ -3944,9 +3944,9 @@
3944
  ]
3945
  },
3946
  "node_modules/@rollup/rollup-linux-arm64-gnu": {
3947
- "version": "4.38.0",
3948
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.38.0.tgz",
3949
- "integrity": "sha512-wZco59rIVuB0tjQS0CSHTTUcEde+pXQWugZVxWaQFdQQ1VYub/sTrNdY76D1MKdN2NB48JDuGABP6o6fqos8mA==",
3950
  "cpu": [
3951
  "arm64"
3952
  ],
@@ -3958,9 +3958,9 @@
3958
  ]
3959
  },
3960
  "node_modules/@rollup/rollup-linux-arm64-musl": {
3961
- "version": "4.38.0",
3962
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.38.0.tgz",
3963
- "integrity": "sha512-fQgqwKmW0REM4LomQ+87PP8w8xvU9LZfeLBKybeli+0yHT7VKILINzFEuggvnV9M3x1Ed4gUBmGUzCo/ikmFbQ==",
3964
  "cpu": [
3965
  "arm64"
3966
  ],
@@ -3972,9 +3972,9 @@
3972
  ]
3973
  },
3974
  "node_modules/@rollup/rollup-linux-loongarch64-gnu": {
3975
- "version": "4.38.0",
3976
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.38.0.tgz",
3977
- "integrity": "sha512-hz5oqQLXTB3SbXpfkKHKXLdIp02/w3M+ajp8p4yWOWwQRtHWiEOCKtc9U+YXahrwdk+3qHdFMDWR5k+4dIlddg==",
3978
  "cpu": [
3979
  "loong64"
3980
  ],
@@ -3986,9 +3986,9 @@
3986
  ]
3987
  },
3988
  "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
3989
- "version": "4.38.0",
3990
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.38.0.tgz",
3991
- "integrity": "sha512-NXqygK/dTSibQ+0pzxsL3r4Xl8oPqVoWbZV9niqOnIHV/J92fe65pOir0xjkUZDRSPyFRvu+4YOpJF9BZHQImw==",
3992
  "cpu": [
3993
  "ppc64"
3994
  ],
@@ -4000,9 +4000,9 @@
4000
  ]
4001
  },
4002
  "node_modules/@rollup/rollup-linux-riscv64-gnu": {
4003
- "version": "4.38.0",
4004
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.38.0.tgz",
4005
- "integrity": "sha512-GEAIabR1uFyvf/jW/5jfu8gjM06/4kZ1W+j1nWTSSB3w6moZEBm7iBtzwQ3a1Pxos2F7Gz+58aVEnZHU295QTg==",
4006
  "cpu": [
4007
  "riscv64"
4008
  ],
@@ -4014,9 +4014,9 @@
4014
  ]
4015
  },
4016
  "node_modules/@rollup/rollup-linux-riscv64-musl": {
4017
- "version": "4.38.0",
4018
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.38.0.tgz",
4019
- "integrity": "sha512-9EYTX+Gus2EGPbfs+fh7l95wVADtSQyYw4DfSBcYdUEAmP2lqSZY0Y17yX/3m5VKGGJ4UmIH5LHLkMJft3bYoA==",
4020
  "cpu": [
4021
  "riscv64"
4022
  ],
@@ -4028,9 +4028,9 @@
4028
  ]
4029
  },
4030
  "node_modules/@rollup/rollup-linux-s390x-gnu": {
4031
- "version": "4.38.0",
4032
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.38.0.tgz",
4033
- "integrity": "sha512-Mpp6+Z5VhB9VDk7RwZXoG2qMdERm3Jw07RNlXHE0bOnEeX+l7Fy4bg+NxfyN15ruuY3/7Vrbpm75J9QHFqj5+Q==",
4034
  "cpu": [
4035
  "s390x"
4036
  ],
@@ -4042,9 +4042,9 @@
4042
  ]
4043
  },
4044
  "node_modules/@rollup/rollup-linux-x64-gnu": {
4045
- "version": "4.38.0",
4046
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.38.0.tgz",
4047
- "integrity": "sha512-vPvNgFlZRAgO7rwncMeE0+8c4Hmc+qixnp00/Uv3ht2x7KYrJ6ERVd3/R0nUtlE6/hu7/HiiNHJ/rP6knRFt1w==",
4048
  "cpu": [
4049
  "x64"
4050
  ],
@@ -4056,9 +4056,9 @@
4056
  ]
4057
  },
4058
  "node_modules/@rollup/rollup-linux-x64-musl": {
4059
- "version": "4.38.0",
4060
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.38.0.tgz",
4061
- "integrity": "sha512-q5Zv+goWvQUGCaL7fU8NuTw8aydIL/C9abAVGCzRReuj5h30TPx4LumBtAidrVOtXnlB+RZkBtExMsfqkMfb8g==",
4062
  "cpu": [
4063
  "x64"
4064
  ],
@@ -4070,9 +4070,9 @@
4070
  ]
4071
  },
4072
  "node_modules/@rollup/rollup-win32-arm64-msvc": {
4073
- "version": "4.38.0",
4074
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.38.0.tgz",
4075
- "integrity": "sha512-u/Jbm1BU89Vftqyqbmxdq14nBaQjQX1HhmsdBWqSdGClNaKwhjsg5TpW+5Ibs1mb8Es9wJiMdl86BcmtUVXNZg==",
4076
  "cpu": [
4077
  "arm64"
4078
  ],
@@ -4084,9 +4084,9 @@
4084
  ]
4085
  },
4086
  "node_modules/@rollup/rollup-win32-ia32-msvc": {
4087
- "version": "4.38.0",
4088
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.38.0.tgz",
4089
- "integrity": "sha512-mqu4PzTrlpNHHbu5qleGvXJoGgHpChBlrBx/mEhTPpnAL1ZAYFlvHD7rLK839LLKQzqEQMFJfGrrOHItN4ZQqA==",
4090
  "cpu": [
4091
  "ia32"
4092
  ],
@@ -4098,9 +4098,9 @@
4098
  ]
4099
  },
4100
  "node_modules/@rollup/rollup-win32-x64-msvc": {
4101
- "version": "4.38.0",
4102
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.38.0.tgz",
4103
- "integrity": "sha512-jjqy3uWlecfB98Psxb5cD6Fny9Fupv9LrDSPTQZUROqjvZmcCqNu4UMl7qqhlUUGpwiAkotj6GYu4SZdcr/nLw==",
4104
  "cpu": [
4105
  "x64"
4106
  ],
@@ -4636,12 +4636,12 @@
4636
  "license": "MIT"
4637
  },
4638
  "node_modules/@types/node": {
4639
- "version": "22.13.15",
4640
- "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.15.tgz",
4641
- "integrity": "sha512-imAbQEEbVni6i6h6Bd5xkCRwLqFc8hihCsi2GbtDoAtUcAFQ6Zs4pFXTZUUbroTkXdImczWM9AI8eZUuybXE3w==",
4642
  "license": "MIT",
4643
  "dependencies": {
4644
- "undici-types": "~6.20.0"
4645
  }
4646
  },
4647
  "node_modules/@types/plist": {
@@ -5687,9 +5687,9 @@
5687
  }
5688
  },
5689
  "node_modules/@vuepress/bundler-vite/node_modules/vite": {
5690
- "version": "6.1.3",
5691
- "resolved": "https://registry.npmjs.org/vite/-/vite-6.1.3.tgz",
5692
- "integrity": "sha512-JMnf752ldN0UhZoPYXuWiRPsC2Z5hPy9JeUwfNSPBY8TyFZbSHRE1f6/WA8umOEJp0EN3zTddgNNSLT6Fc10UQ==",
5693
  "dev": true,
5694
  "license": "MIT",
5695
  "dependencies": {
@@ -7941,22 +7941,22 @@
7941
  }
7942
  },
7943
  "node_modules/c12": {
7944
- "version": "3.0.2",
7945
- "resolved": "https://registry.npmjs.org/c12/-/c12-3.0.2.tgz",
7946
- "integrity": "sha512-6Tzk1/TNeI3WBPpK0j/Ss4+gPj3PUJYbWl/MWDJBThFvwNGNkXtd7Cz8BJtD4aRwoGHtzQD0SnxamgUiBH0/Nw==",
7947
  "license": "MIT",
7948
  "dependencies": {
7949
  "chokidar": "^4.0.3",
7950
- "confbox": "^0.1.8",
7951
  "defu": "^6.1.4",
7952
  "dotenv": "^16.4.7",
7953
- "exsolve": "^1.0.0",
7954
  "giget": "^2.0.0",
7955
  "jiti": "^2.4.2",
7956
- "ohash": "^2.0.5",
7957
  "pathe": "^2.0.3",
7958
  "perfect-debounce": "^1.0.0",
7959
- "pkg-types": "^2.0.0",
7960
  "rc9": "^2.1.2"
7961
  },
7962
  "peerDependencies": {
@@ -7983,12 +7983,6 @@
7983
  "url": "https://paulmillr.com/funding/"
7984
  }
7985
  },
7986
- "node_modules/c12/node_modules/confbox": {
7987
- "version": "0.1.8",
7988
- "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz",
7989
- "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==",
7990
- "license": "MIT"
7991
- },
7992
  "node_modules/c12/node_modules/readdirp": {
7993
  "version": "4.1.2",
7994
  "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",
@@ -8191,9 +8185,9 @@
8191
  }
8192
  },
8193
  "node_modules/caniuse-lite": {
8194
- "version": "1.0.30001707",
8195
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001707.tgz",
8196
- "integrity": "sha512-3qtRjw/HQSMlDWf+X79N206fepf4SOOU6SQLMaq/0KkZLmSjPxAkBOQQ+FxbHKfHmYLZFfdWsO3KA90ceHPSnw==",
8197
  "dev": true,
8198
  "funding": [
8199
  {
@@ -8951,9 +8945,9 @@
8951
  }
8952
  },
8953
  "node_modules/confbox": {
8954
- "version": "0.2.1",
8955
- "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.1.tgz",
8956
- "integrity": "sha512-hkT3yDPFbs95mNCy1+7qNKC6Pro+/ibzYxtM2iqEigpf0sVw+bg4Zh9/snjsBcf990vfIsg5+1U7VyiyBb3etg==",
8957
  "license": "MIT"
8958
  },
8959
  "node_modules/config-file-ts": {
@@ -9297,9 +9291,9 @@
9297
  "license": "MIT"
9298
  },
9299
  "node_modules/cytoscape": {
9300
- "version": "3.31.1",
9301
- "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.31.1.tgz",
9302
- "integrity": "sha512-Hx5Mtb1+hnmAKaZZ/7zL1Y5HTFYOjdDswZy/jD+1WINRU8KVi1B7+vlHdsTwY+VCFucTreoyu1RDzQJ9u0d2Hw==",
9303
  "license": "MIT",
9304
  "engines": {
9305
  "node": ">=0.10"
@@ -10059,9 +10053,9 @@
10059
  }
10060
  },
10061
  "node_modules/destr": {
10062
- "version": "2.0.3",
10063
- "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.3.tgz",
10064
- "integrity": "sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==",
10065
  "license": "MIT"
10066
  },
10067
  "node_modules/destroy": {
@@ -10253,9 +10247,9 @@
10253
  }
10254
  },
10255
  "node_modules/dompurify": {
10256
- "version": "3.2.4",
10257
- "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.4.tgz",
10258
- "integrity": "sha512-ysFSFEDVduQpyhzAob/kkuJjf5zWkZD8/A9ywSp1byueyuCfHamrCBa14/Oc2iiB0e51B+NpxSl5gmzn+Ms/mg==",
10259
  "license": "(MPL-2.0 OR Apache-2.0)",
10260
  "optionalDependencies": {
10261
  "@types/trusted-types": "^2.0.7"
@@ -10381,9 +10375,9 @@
10381
  }
10382
  },
10383
  "node_modules/electron": {
10384
- "version": "34.4.1",
10385
- "resolved": "https://registry.npmjs.org/electron/-/electron-34.4.1.tgz",
10386
- "integrity": "sha512-iYzeLBdCrAR3i0RVSLa+mzuFZwH6HGxTGKsI+SS41sg2anZj4R5mHjOiHsxcZ50/ih47NJbuVRJgPIVlTF+USg==",
10387
  "dev": true,
10388
  "hasInstallScript": true,
10389
  "license": "MIT",
@@ -10567,16 +10561,16 @@
10567
  }
10568
  },
10569
  "node_modules/electron-to-chromium": {
10570
- "version": "1.5.129",
10571
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.129.tgz",
10572
- "integrity": "sha512-JlXUemX4s0+9f8mLqib/bHH8gOHf5elKS6KeWG3sk3xozb/JTq/RLXIv8OKUWiK4Ah00Wm88EFj5PYkFr4RUPA==",
10573
  "dev": true,
10574
  "license": "ISC"
10575
  },
10576
  "node_modules/electron/node_modules/@types/node": {
10577
- "version": "20.17.29",
10578
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.29.tgz",
10579
- "integrity": "sha512-6rbekrnsa5WWCo5UnPYEKfNuoF2yqAmigUKXM8wBzfEbZc+E/CITqjCrHqiq+6QBifsw0ZDaA5VdTFONOtG7+A==",
10580
  "dev": true,
10581
  "license": "MIT",
10582
  "dependencies": {
@@ -14109,9 +14103,9 @@
14109
  }
14110
  },
14111
  "node_modules/miniflare": {
14112
- "version": "3.20250310.1",
14113
- "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-3.20250310.1.tgz",
14114
- "integrity": "sha512-c9QPrgBUFzjL4pYvW6GIUw+NqeYlZGVHASKJqjIXB1WVsl14nYfpfHphYK8tluKaBqwA9NFyO5dC2zatJkC/mA==",
14115
  "dev": true,
14116
  "license": "MIT",
14117
  "dependencies": {
@@ -14763,9 +14757,9 @@
14763
  }
14764
  },
14765
  "node_modules/nitropack/node_modules/mime": {
14766
- "version": "4.0.6",
14767
- "resolved": "https://registry.npmjs.org/mime/-/mime-4.0.6.tgz",
14768
- "integrity": "sha512-4rGt7rvQHBbaSOF9POGkk1ocRP16Md1x36Xma8sz8h8/vfCUI2OtEIeCqe4Ofes853x4xDoPiFLIT47J5fI/7A==",
14769
  "dev": true,
14770
  "funding": [
14771
  "https://github.com/sponsors/broofa"
@@ -16698,9 +16692,9 @@
16698
  "license": "Unlicense"
16699
  },
16700
  "node_modules/rollup": {
16701
- "version": "4.38.0",
16702
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.38.0.tgz",
16703
- "integrity": "sha512-5SsIRtJy9bf1ErAOiFMFzl64Ex9X5V7bnJ+WlFMb+zmP459OSWCEG7b0ERZ+PEU7xPt4OG3RHbrp1LJlXxYTrw==",
16704
  "dev": true,
16705
  "license": "MIT",
16706
  "dependencies": {
@@ -16714,26 +16708,26 @@
16714
  "npm": ">=8.0.0"
16715
  },
16716
  "optionalDependencies": {
16717
- "@rollup/rollup-android-arm-eabi": "4.38.0",
16718
- "@rollup/rollup-android-arm64": "4.38.0",
16719
- "@rollup/rollup-darwin-arm64": "4.38.0",
16720
- "@rollup/rollup-darwin-x64": "4.38.0",
16721
- "@rollup/rollup-freebsd-arm64": "4.38.0",
16722
- "@rollup/rollup-freebsd-x64": "4.38.0",
16723
- "@rollup/rollup-linux-arm-gnueabihf": "4.38.0",
16724
- "@rollup/rollup-linux-arm-musleabihf": "4.38.0",
16725
- "@rollup/rollup-linux-arm64-gnu": "4.38.0",
16726
- "@rollup/rollup-linux-arm64-musl": "4.38.0",
16727
- "@rollup/rollup-linux-loongarch64-gnu": "4.38.0",
16728
- "@rollup/rollup-linux-powerpc64le-gnu": "4.38.0",
16729
- "@rollup/rollup-linux-riscv64-gnu": "4.38.0",
16730
- "@rollup/rollup-linux-riscv64-musl": "4.38.0",
16731
- "@rollup/rollup-linux-s390x-gnu": "4.38.0",
16732
- "@rollup/rollup-linux-x64-gnu": "4.38.0",
16733
- "@rollup/rollup-linux-x64-musl": "4.38.0",
16734
- "@rollup/rollup-win32-arm64-msvc": "4.38.0",
16735
- "@rollup/rollup-win32-ia32-msvc": "4.38.0",
16736
- "@rollup/rollup-win32-x64-msvc": "4.38.0",
16737
  "fsevents": "~2.3.2"
16738
  }
16739
  },
@@ -16955,9 +16949,9 @@
16955
  }
16956
  },
16957
  "node_modules/sass-embedded": {
16958
- "version": "1.86.1",
16959
- "resolved": "https://registry.npmjs.org/sass-embedded/-/sass-embedded-1.86.1.tgz",
16960
- "integrity": "sha512-LMJvytHh7lIUtmjGCqpM4cRdIDvPllLJKznNIK4L7EZJ77BLeUFoOSRXEOHq4G4gqy5CVhHUKlHslzCANkDOhQ==",
16961
  "dev": true,
16962
  "license": "MIT",
16963
  "dependencies": {
@@ -16977,32 +16971,32 @@
16977
  "node": ">=16.0.0"
16978
  },
16979
  "optionalDependencies": {
16980
- "sass-embedded-android-arm": "1.86.1",
16981
- "sass-embedded-android-arm64": "1.86.1",
16982
- "sass-embedded-android-ia32": "1.86.1",
16983
- "sass-embedded-android-riscv64": "1.86.1",
16984
- "sass-embedded-android-x64": "1.86.1",
16985
- "sass-embedded-darwin-arm64": "1.86.1",
16986
- "sass-embedded-darwin-x64": "1.86.1",
16987
- "sass-embedded-linux-arm": "1.86.1",
16988
- "sass-embedded-linux-arm64": "1.86.1",
16989
- "sass-embedded-linux-ia32": "1.86.1",
16990
- "sass-embedded-linux-musl-arm": "1.86.1",
16991
- "sass-embedded-linux-musl-arm64": "1.86.1",
16992
- "sass-embedded-linux-musl-ia32": "1.86.1",
16993
- "sass-embedded-linux-musl-riscv64": "1.86.1",
16994
- "sass-embedded-linux-musl-x64": "1.86.1",
16995
- "sass-embedded-linux-riscv64": "1.86.1",
16996
- "sass-embedded-linux-x64": "1.86.1",
16997
- "sass-embedded-win32-arm64": "1.86.1",
16998
- "sass-embedded-win32-ia32": "1.86.1",
16999
- "sass-embedded-win32-x64": "1.86.1"
17000
  }
17001
  },
17002
  "node_modules/sass-embedded-android-arm": {
17003
- "version": "1.86.1",
17004
- "resolved": "https://registry.npmjs.org/sass-embedded-android-arm/-/sass-embedded-android-arm-1.86.1.tgz",
17005
- "integrity": "sha512-bcmKB67uCb9znune+QsE6cWIiKAHE9P+24/9vDPHwwN3BmmH1B/4mznNKKakdYMuxpgbeLrPcEScHEpQbdrIpA==",
17006
  "cpu": [
17007
  "arm"
17008
  ],
@@ -17017,9 +17011,9 @@
17017
  }
17018
  },
17019
  "node_modules/sass-embedded-android-arm64": {
17020
- "version": "1.86.1",
17021
- "resolved": "https://registry.npmjs.org/sass-embedded-android-arm64/-/sass-embedded-android-arm64-1.86.1.tgz",
17022
- "integrity": "sha512-SMY79YhNfq/gdz8MHqwEsnf/IjSnQFAmSEGDDv0vjL0yy9VZC/zhsxpsho8vbFEvTSEGFFlkGgPdzDuoozRrOg==",
17023
  "cpu": [
17024
  "arm64"
17025
  ],
@@ -17034,9 +17028,9 @@
17034
  }
17035
  },
17036
  "node_modules/sass-embedded-android-ia32": {
17037
- "version": "1.86.1",
17038
- "resolved": "https://registry.npmjs.org/sass-embedded-android-ia32/-/sass-embedded-android-ia32-1.86.1.tgz",
17039
- "integrity": "sha512-AX6I5qS8GbgcbBJ1o3uKVI5/7tq6evg/BO/wa0XaNqnzP4i/PojBaGh7EcZrg/spl//SfpS55eA18a0/AOi71w==",
17040
  "cpu": [
17041
  "ia32"
17042
  ],
@@ -17051,9 +17045,9 @@
17051
  }
17052
  },
17053
  "node_modules/sass-embedded-android-riscv64": {
17054
- "version": "1.86.1",
17055
- "resolved": "https://registry.npmjs.org/sass-embedded-android-riscv64/-/sass-embedded-android-riscv64-1.86.1.tgz",
17056
- "integrity": "sha512-Af6ZzRTRfIfx6KICJZ19je6OjOXhxo+v6z/lf/SXm5/1EaHGpGC5xIw4ivtj4nNINNoqkykfIDCjpzm1qWEPPQ==",
17057
  "cpu": [
17058
  "riscv64"
17059
  ],
@@ -17068,9 +17062,9 @@
17068
  }
17069
  },
17070
  "node_modules/sass-embedded-android-x64": {
17071
- "version": "1.86.1",
17072
- "resolved": "https://registry.npmjs.org/sass-embedded-android-x64/-/sass-embedded-android-x64-1.86.1.tgz",
17073
- "integrity": "sha512-GW47z1AH8gXB7IG6EUbC5aDBDtiITeP5nUfEenE6vaaN0H17mBjIwSnEcKPPA1IdxzDpj+4bE/SGfiF0W/At4g==",
17074
  "cpu": [
17075
  "x64"
17076
  ],
@@ -17085,9 +17079,9 @@
17085
  }
17086
  },
17087
  "node_modules/sass-embedded-darwin-arm64": {
17088
- "version": "1.86.1",
17089
- "resolved": "https://registry.npmjs.org/sass-embedded-darwin-arm64/-/sass-embedded-darwin-arm64-1.86.1.tgz",
17090
- "integrity": "sha512-grBnDW5Rg+mEmZM7I9hJySS4MMXDwLMd+RyegQnr+SIJ3WA807Cw830+raALxgDY+UKKKhVEoq3FgbTo40Awgw==",
17091
  "cpu": [
17092
  "arm64"
17093
  ],
@@ -17102,9 +17096,9 @@
17102
  }
17103
  },
17104
  "node_modules/sass-embedded-darwin-x64": {
17105
- "version": "1.86.1",
17106
- "resolved": "https://registry.npmjs.org/sass-embedded-darwin-x64/-/sass-embedded-darwin-x64-1.86.1.tgz",
17107
- "integrity": "sha512-XxSCMcmeADNouiJAr8G1oRnEhkivHKVLV5DRpfFnUK5FqtFCuSk3K18I+xIfpQDeZnjRL3t2VjsmEJuFiBYV8w==",
17108
  "cpu": [
17109
  "x64"
17110
  ],
@@ -17119,9 +17113,9 @@
17119
  }
17120
  },
17121
  "node_modules/sass-embedded-linux-arm": {
17122
- "version": "1.86.1",
17123
- "resolved": "https://registry.npmjs.org/sass-embedded-linux-arm/-/sass-embedded-linux-arm-1.86.1.tgz",
17124
- "integrity": "sha512-Z57ZUcWPuoOHpnl3TiUf/x9wWF2dFtkjdv7hZQpFXYwK5eudHFeBErK6KNCos6jkif1KyeFELXT/HWOznitU/w==",
17125
  "cpu": [
17126
  "arm"
17127
  ],
@@ -17136,9 +17130,9 @@
17136
  }
17137
  },
17138
  "node_modules/sass-embedded-linux-arm64": {
17139
- "version": "1.86.1",
17140
- "resolved": "https://registry.npmjs.org/sass-embedded-linux-arm64/-/sass-embedded-linux-arm64-1.86.1.tgz",
17141
- "integrity": "sha512-zchms0BtaOrkvfvjRnl1PDWK931DxAeYEY2yKQceO/0OFtcBz1r480Kh/RjIffTNreJqIr9Mx4wFdP+icKwLpg==",
17142
  "cpu": [
17143
  "arm64"
17144
  ],
@@ -17153,9 +17147,9 @@
17153
  }
17154
  },
17155
  "node_modules/sass-embedded-linux-ia32": {
17156
- "version": "1.86.1",
17157
- "resolved": "https://registry.npmjs.org/sass-embedded-linux-ia32/-/sass-embedded-linux-ia32-1.86.1.tgz",
17158
- "integrity": "sha512-WHntVnCgpiJPCmTeQrn5rtl1zJdd693TwpNGAFPzKD4FILPcVBKtWutl7COL6bKe/mKTf9OW0t6GBJ6mav2hAA==",
17159
  "cpu": [
17160
  "ia32"
17161
  ],
@@ -17170,9 +17164,9 @@
17170
  }
17171
  },
17172
  "node_modules/sass-embedded-linux-musl-arm": {
17173
- "version": "1.86.1",
17174
- "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-arm/-/sass-embedded-linux-musl-arm-1.86.1.tgz",
17175
- "integrity": "sha512-DlPpyp3bIL8YMtxR22hkWBtuZY6ch3KAmQvqIONippPv96WTHi1iq5jclbE1YXpDtI8Wcus0x6apoDSKq8o95g==",
17176
  "cpu": [
17177
  "arm"
17178
  ],
@@ -17187,9 +17181,9 @@
17187
  }
17188
  },
17189
  "node_modules/sass-embedded-linux-musl-arm64": {
17190
- "version": "1.86.1",
17191
- "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-arm64/-/sass-embedded-linux-musl-arm64-1.86.1.tgz",
17192
- "integrity": "sha512-CwuHMRWSJFByHpgqcVtCSt29dMWhr0lpUTjaBCh9xOl0Oyz89dIqOxA0aMq+XU+thaDtOziJtMIfW6l35ZeykQ==",
17193
  "cpu": [
17194
  "arm64"
17195
  ],
@@ -17204,9 +17198,9 @@
17204
  }
17205
  },
17206
  "node_modules/sass-embedded-linux-musl-ia32": {
17207
- "version": "1.86.1",
17208
- "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-ia32/-/sass-embedded-linux-musl-ia32-1.86.1.tgz",
17209
- "integrity": "sha512-yjvVpAW1YS0VQNnIUtZTf0IrRDMa0wRjFWUtsLthVIxuXyjLy44+YULlfduxqcZe3rvI4+EqT7GorvviWo9NfQ==",
17210
  "cpu": [
17211
  "ia32"
17212
  ],
@@ -17221,9 +17215,9 @@
17221
  }
17222
  },
17223
  "node_modules/sass-embedded-linux-musl-riscv64": {
17224
- "version": "1.86.1",
17225
- "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-riscv64/-/sass-embedded-linux-musl-riscv64-1.86.1.tgz",
17226
- "integrity": "sha512-0zCUOMwX/hwPV1zimxM46dq/MdATSqbw6G646DwQ3/2V2Db1t9lfXBZqSavx8p/cqRp1JYTUPbJQV1gT4J7NYw==",
17227
  "cpu": [
17228
  "riscv64"
17229
  ],
@@ -17238,9 +17232,9 @@
17238
  }
17239
  },
17240
  "node_modules/sass-embedded-linux-musl-x64": {
17241
- "version": "1.86.1",
17242
- "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-x64/-/sass-embedded-linux-musl-x64-1.86.1.tgz",
17243
- "integrity": "sha512-8KJ6kEj1N16V9E0g5PDSd4aVe1LwcVKROJcVqnzTKPMa/4j2VuNWep7D81OYchdQMm9Egn1RqV0jCwm0b2aSHQ==",
17244
  "cpu": [
17245
  "x64"
17246
  ],
@@ -17255,9 +17249,9 @@
17255
  }
17256
  },
17257
  "node_modules/sass-embedded-linux-riscv64": {
17258
- "version": "1.86.1",
17259
- "resolved": "https://registry.npmjs.org/sass-embedded-linux-riscv64/-/sass-embedded-linux-riscv64-1.86.1.tgz",
17260
- "integrity": "sha512-rNJ1EfIkQpvBfMS1fBdyb+Gsji4yK0AwsV1T7NEcy21yDxDt7mdCgkAJiaN9qf7UEXuCuueQoed7WZoDaSpjww==",
17261
  "cpu": [
17262
  "riscv64"
17263
  ],
@@ -17272,9 +17266,9 @@
17272
  }
17273
  },
17274
  "node_modules/sass-embedded-linux-x64": {
17275
- "version": "1.86.1",
17276
- "resolved": "https://registry.npmjs.org/sass-embedded-linux-x64/-/sass-embedded-linux-x64-1.86.1.tgz",
17277
- "integrity": "sha512-DGCdUoYRRUKzRZz/q7plbB5Nean2+Uk4CqKF4RWAU0v1tHnDKKWmYfETryhWdB2WJM8QSn7O8qRebe6FCobB5g==",
17278
  "cpu": [
17279
  "x64"
17280
  ],
@@ -17289,9 +17283,9 @@
17289
  }
17290
  },
17291
  "node_modules/sass-embedded-win32-arm64": {
17292
- "version": "1.86.1",
17293
- "resolved": "https://registry.npmjs.org/sass-embedded-win32-arm64/-/sass-embedded-win32-arm64-1.86.1.tgz",
17294
- "integrity": "sha512-qRLZR3yLuk/3y64YhcltkwGclhPoK6EdiLP1e5SVw5+kughcs+mNUZ3rdvSAmCSA4vDv+XOiOjRpjxmpeon95Q==",
17295
  "cpu": [
17296
  "arm64"
17297
  ],
@@ -17306,9 +17300,9 @@
17306
  }
17307
  },
17308
  "node_modules/sass-embedded-win32-ia32": {
17309
- "version": "1.86.1",
17310
- "resolved": "https://registry.npmjs.org/sass-embedded-win32-ia32/-/sass-embedded-win32-ia32-1.86.1.tgz",
17311
- "integrity": "sha512-o860a7/YGHZnGeY3l/e6yt3+ZMeDdDHmthTaKnw2wpJNEq0nmytYLTJQmjWPxEMz7O8AQ0LtcbDDrhivSog+KQ==",
17312
  "cpu": [
17313
  "ia32"
17314
  ],
@@ -17323,9 +17317,9 @@
17323
  }
17324
  },
17325
  "node_modules/sass-embedded-win32-x64": {
17326
- "version": "1.86.1",
17327
- "resolved": "https://registry.npmjs.org/sass-embedded-win32-x64/-/sass-embedded-win32-x64-1.86.1.tgz",
17328
- "integrity": "sha512-7Z3wsVKfseJodmv689dDEV/JrXJH5TAclWNvHrEYW5BtoViOTU2pIDxRgLYzdKU9teIw5g6R0nJZb9M105oIKA==",
17329
  "cpu": [
17330
  "x64"
17331
  ],
@@ -18025,9 +18019,9 @@
18025
  }
18026
  },
18027
  "node_modules/std-env": {
18028
- "version": "3.8.1",
18029
- "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.1.tgz",
18030
- "integrity": "sha512-vj5lIj3Mwf9D79hBkltk5qmkFI+biIKWS2IBxEyEU3AX1tUf7AoL8nSazCOiiqQsGKIq01SClsKEzweu34uwvA==",
18031
  "license": "MIT"
18032
  },
18033
  "node_modules/stdin-discarder": {
@@ -18453,9 +18447,9 @@
18453
  }
18454
  },
18455
  "node_modules/swagger-ui-dist": {
18456
- "version": "5.20.2",
18457
- "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.20.2.tgz",
18458
- "integrity": "sha512-zP2biZvCt6R1IAz/iGcjeEViHez7UPHUFfMFyF6jcTKS1ZIP2cgr+KSZEMhBnpIcFfDrZxkD8v56taL5A8phuA==",
18459
  "dev": true,
18460
  "license": "Apache-2.0",
18461
  "dependencies": {
@@ -18986,9 +18980,9 @@
18986
  }
18987
  },
18988
  "node_modules/type-fest": {
18989
- "version": "4.38.0",
18990
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.38.0.tgz",
18991
- "integrity": "sha512-2dBz5D5ycHIoliLYLi0Q2V7KRaDlH0uWIvmk7TYlAg5slqwiPv1ezJdZm1QEM0xgk29oYWMCbIG7E6gHpvChlg==",
18992
  "dev": true,
18993
  "license": "(MIT OR CC0-1.0)",
18994
  "engines": {
@@ -19064,9 +19058,9 @@
19064
  }
19065
  },
19066
  "node_modules/ultrahtml": {
19067
- "version": "1.5.3",
19068
- "resolved": "https://registry.npmjs.org/ultrahtml/-/ultrahtml-1.5.3.tgz",
19069
- "integrity": "sha512-GykOvZwgDWZlTQMtp5jrD4BVL+gNn2NVlVafjcFUJ7taY20tqYdwdoWBFy6GBJsNTZe1GkGPkSl5knQAjtgceg==",
19070
  "dev": true,
19071
  "license": "MIT"
19072
  },
@@ -19105,18 +19099,18 @@
19105
  "license": "MIT"
19106
  },
19107
  "node_modules/undici": {
19108
- "version": "7.6.0",
19109
- "resolved": "https://registry.npmjs.org/undici/-/undici-7.6.0.tgz",
19110
- "integrity": "sha512-gaFsbThjrDGvAaD670r81RZro/s6H2PVZF640Qn0p5kZK+/rim7/mmyfp2W7VB5vOMaFM8vuFBJUaMlaZTYHlA==",
19111
  "license": "MIT",
19112
  "engines": {
19113
  "node": ">=20.18.1"
19114
  }
19115
  },
19116
  "node_modules/undici-types": {
19117
- "version": "6.20.0",
19118
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
19119
- "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==",
19120
  "license": "MIT"
19121
  },
19122
  "node_modules/unenv": {
@@ -19752,9 +19746,9 @@
19752
  }
19753
  },
19754
  "node_modules/vite": {
19755
- "version": "6.2.4",
19756
- "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.4.tgz",
19757
- "integrity": "sha512-veHMSew8CcRzhL5o8ONjy8gkfmFJAd5Ac16oxBUjlwgX3Gq2Wqr+qNC3TjPIpy7TPV/KporLga5GT9HqdrCizw==",
19758
  "dev": true,
19759
  "license": "MIT",
19760
  "dependencies": {
@@ -20380,9 +20374,9 @@
20380
  }
20381
  },
20382
  "node_modules/wrangler": {
20383
- "version": "3.114.3",
20384
- "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-3.114.3.tgz",
20385
- "integrity": "sha512-H87s4USPQhRQmN8V4Q2Fh+0ZGiuWVrVwVKoxjdgEtpR88gVQEN5Ua9C3TQDaXCppsdAFl/J4lxLoxfJaW2XFdQ==",
20386
  "dev": true,
20387
  "license": "MIT OR Apache-2.0",
20388
  "dependencies": {
@@ -20392,7 +20386,7 @@
20392
  "@esbuild-plugins/node-modules-polyfill": "0.2.2",
20393
  "blake3-wasm": "2.1.5",
20394
  "esbuild": "0.17.19",
20395
- "miniflare": "3.20250310.1",
20396
  "path-to-regexp": "6.3.0",
20397
  "unenv": "2.0.0-rc.14",
20398
  "workerd": "1.20250310.0"
 
821
  }
822
  },
823
  "node_modules/@electron/asar": {
824
+ "version": "3.4.0",
825
+ "resolved": "https://registry.npmjs.org/@electron/asar/-/asar-3.4.0.tgz",
826
+ "integrity": "sha512-8ZAmXjsQ17wJxdv4755hZ1Xiw85dwETlWYQwl+imww18CaEK4bxPvAotJEfIZGbRMrNEJOTMyuVQD+yDY03N5Q==",
827
  "dev": true,
828
  "license": "MIT",
829
  "dependencies": {
 
3061
  }
3062
  },
3063
  "node_modules/@nuxt/kit": {
3064
+ "version": "3.16.2",
3065
+ "resolved": "https://registry.npmjs.org/@nuxt/kit/-/kit-3.16.2.tgz",
3066
+ "integrity": "sha512-K1SAUo2vweTfudKZzjKsZ5YJoxPLTspR5qz5+G61xtZreLpsdpDYfBseqsIAl5VFLJuszeRpWQ01jP9LfQ6Ksw==",
3067
  "license": "MIT",
3068
  "dependencies": {
3069
  "c12": "^3.0.2",
 
3086
  "std-env": "^3.8.1",
3087
  "ufo": "^1.5.4",
3088
  "unctx": "^2.4.1",
3089
+ "unimport": "^4.1.3",
3090
  "untyped": "^2.0.0"
3091
  },
3092
  "engines": {
 
3832
  }
3833
  },
3834
  "node_modules/@rollup/rollup-android-arm-eabi": {
3835
+ "version": "4.39.0",
3836
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.39.0.tgz",
3837
+ "integrity": "sha512-lGVys55Qb00Wvh8DMAocp5kIcaNzEFTmGhfFd88LfaogYTRKrdxgtlO5H6S49v2Nd8R2C6wLOal0qv6/kCkOwA==",
3838
  "cpu": [
3839
  "arm"
3840
  ],
 
3846
  ]
3847
  },
3848
  "node_modules/@rollup/rollup-android-arm64": {
3849
+ "version": "4.39.0",
3850
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.39.0.tgz",
3851
+ "integrity": "sha512-It9+M1zE31KWfqh/0cJLrrsCPiF72PoJjIChLX+rEcujVRCb4NLQ5QzFkzIZW8Kn8FTbvGQBY5TkKBau3S8cCQ==",
3852
  "cpu": [
3853
  "arm64"
3854
  ],
 
3860
  ]
3861
  },
3862
  "node_modules/@rollup/rollup-darwin-arm64": {
3863
+ "version": "4.39.0",
3864
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.39.0.tgz",
3865
+ "integrity": "sha512-lXQnhpFDOKDXiGxsU9/l8UEGGM65comrQuZ+lDcGUx+9YQ9dKpF3rSEGepyeR5AHZ0b5RgiligsBhWZfSSQh8Q==",
3866
  "cpu": [
3867
  "arm64"
3868
  ],
 
3874
  ]
3875
  },
3876
  "node_modules/@rollup/rollup-darwin-x64": {
3877
+ "version": "4.39.0",
3878
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.39.0.tgz",
3879
+ "integrity": "sha512-mKXpNZLvtEbgu6WCkNij7CGycdw9cJi2k9v0noMb++Vab12GZjFgUXD69ilAbBh034Zwn95c2PNSz9xM7KYEAQ==",
3880
  "cpu": [
3881
  "x64"
3882
  ],
 
3888
  ]
3889
  },
3890
  "node_modules/@rollup/rollup-freebsd-arm64": {
3891
+ "version": "4.39.0",
3892
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.39.0.tgz",
3893
+ "integrity": "sha512-jivRRlh2Lod/KvDZx2zUR+I4iBfHcu2V/BA2vasUtdtTN2Uk3jfcZczLa81ESHZHPHy4ih3T/W5rPFZ/hX7RtQ==",
3894
  "cpu": [
3895
  "arm64"
3896
  ],
 
3902
  ]
3903
  },
3904
  "node_modules/@rollup/rollup-freebsd-x64": {
3905
+ "version": "4.39.0",
3906
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.39.0.tgz",
3907
+ "integrity": "sha512-8RXIWvYIRK9nO+bhVz8DwLBepcptw633gv/QT4015CpJ0Ht8punmoHU/DuEd3iw9Hr8UwUV+t+VNNuZIWYeY7Q==",
3908
  "cpu": [
3909
  "x64"
3910
  ],
 
3916
  ]
3917
  },
3918
  "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
3919
+ "version": "4.39.0",
3920
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.39.0.tgz",
3921
+ "integrity": "sha512-mz5POx5Zu58f2xAG5RaRRhp3IZDK7zXGk5sdEDj4o96HeaXhlUwmLFzNlc4hCQi5sGdR12VDgEUqVSHer0lI9g==",
3922
  "cpu": [
3923
  "arm"
3924
  ],
 
3930
  ]
3931
  },
3932
  "node_modules/@rollup/rollup-linux-arm-musleabihf": {
3933
+ "version": "4.39.0",
3934
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.39.0.tgz",
3935
+ "integrity": "sha512-+YDwhM6gUAyakl0CD+bMFpdmwIoRDzZYaTWV3SDRBGkMU/VpIBYXXEvkEcTagw/7VVkL2vA29zU4UVy1mP0/Yw==",
3936
  "cpu": [
3937
  "arm"
3938
  ],
 
3944
  ]
3945
  },
3946
  "node_modules/@rollup/rollup-linux-arm64-gnu": {
3947
+ "version": "4.39.0",
3948
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.39.0.tgz",
3949
+ "integrity": "sha512-EKf7iF7aK36eEChvlgxGnk7pdJfzfQbNvGV/+l98iiMwU23MwvmV0Ty3pJ0p5WQfm3JRHOytSIqD9LB7Bq7xdQ==",
3950
  "cpu": [
3951
  "arm64"
3952
  ],
 
3958
  ]
3959
  },
3960
  "node_modules/@rollup/rollup-linux-arm64-musl": {
3961
+ "version": "4.39.0",
3962
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.39.0.tgz",
3963
+ "integrity": "sha512-vYanR6MtqC7Z2SNr8gzVnzUul09Wi1kZqJaek3KcIlI/wq5Xtq4ZPIZ0Mr/st/sv/NnaPwy/D4yXg5x0B3aUUA==",
3964
  "cpu": [
3965
  "arm64"
3966
  ],
 
3972
  ]
3973
  },
3974
  "node_modules/@rollup/rollup-linux-loongarch64-gnu": {
3975
+ "version": "4.39.0",
3976
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.39.0.tgz",
3977
+ "integrity": "sha512-NMRUT40+h0FBa5fb+cpxtZoGAggRem16ocVKIv5gDB5uLDgBIwrIsXlGqYbLwW8YyO3WVTk1FkFDjMETYlDqiw==",
3978
  "cpu": [
3979
  "loong64"
3980
  ],
 
3986
  ]
3987
  },
3988
  "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
3989
+ "version": "4.39.0",
3990
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.39.0.tgz",
3991
+ "integrity": "sha512-0pCNnmxgduJ3YRt+D+kJ6Ai/r+TaePu9ZLENl+ZDV/CdVczXl95CbIiwwswu4L+K7uOIGf6tMo2vm8uadRaICQ==",
3992
  "cpu": [
3993
  "ppc64"
3994
  ],
 
4000
  ]
4001
  },
4002
  "node_modules/@rollup/rollup-linux-riscv64-gnu": {
4003
+ "version": "4.39.0",
4004
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.39.0.tgz",
4005
+ "integrity": "sha512-t7j5Zhr7S4bBtksT73bO6c3Qa2AV/HqiGlj9+KB3gNF5upcVkx+HLgxTm8DK4OkzsOYqbdqbLKwvGMhylJCPhQ==",
4006
  "cpu": [
4007
  "riscv64"
4008
  ],
 
4014
  ]
4015
  },
4016
  "node_modules/@rollup/rollup-linux-riscv64-musl": {
4017
+ "version": "4.39.0",
4018
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.39.0.tgz",
4019
+ "integrity": "sha512-m6cwI86IvQ7M93MQ2RF5SP8tUjD39Y7rjb1qjHgYh28uAPVU8+k/xYWvxRO3/tBN2pZkSMa5RjnPuUIbrwVxeA==",
4020
  "cpu": [
4021
  "riscv64"
4022
  ],
 
4028
  ]
4029
  },
4030
  "node_modules/@rollup/rollup-linux-s390x-gnu": {
4031
+ "version": "4.39.0",
4032
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.39.0.tgz",
4033
+ "integrity": "sha512-iRDJd2ebMunnk2rsSBYlsptCyuINvxUfGwOUldjv5M4tpa93K8tFMeYGpNk2+Nxl+OBJnBzy2/JCscGeO507kA==",
4034
  "cpu": [
4035
  "s390x"
4036
  ],
 
4042
  ]
4043
  },
4044
  "node_modules/@rollup/rollup-linux-x64-gnu": {
4045
+ "version": "4.39.0",
4046
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.39.0.tgz",
4047
+ "integrity": "sha512-t9jqYw27R6Lx0XKfEFe5vUeEJ5pF3SGIM6gTfONSMb7DuG6z6wfj2yjcoZxHg129veTqU7+wOhY6GX8wmf90dA==",
4048
  "cpu": [
4049
  "x64"
4050
  ],
 
4056
  ]
4057
  },
4058
  "node_modules/@rollup/rollup-linux-x64-musl": {
4059
+ "version": "4.39.0",
4060
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.39.0.tgz",
4061
+ "integrity": "sha512-ThFdkrFDP55AIsIZDKSBWEt/JcWlCzydbZHinZ0F/r1h83qbGeenCt/G/wG2O0reuENDD2tawfAj2s8VK7Bugg==",
4062
  "cpu": [
4063
  "x64"
4064
  ],
 
4070
  ]
4071
  },
4072
  "node_modules/@rollup/rollup-win32-arm64-msvc": {
4073
+ "version": "4.39.0",
4074
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.39.0.tgz",
4075
+ "integrity": "sha512-jDrLm6yUtbOg2TYB3sBF3acUnAwsIksEYjLeHL+TJv9jg+TmTwdyjnDex27jqEMakNKf3RwwPahDIt7QXCSqRQ==",
4076
  "cpu": [
4077
  "arm64"
4078
  ],
 
4084
  ]
4085
  },
4086
  "node_modules/@rollup/rollup-win32-ia32-msvc": {
4087
+ "version": "4.39.0",
4088
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.39.0.tgz",
4089
+ "integrity": "sha512-6w9uMuza+LbLCVoNKL5FSLE7yvYkq9laSd09bwS0tMjkwXrmib/4KmoJcrKhLWHvw19mwU+33ndC69T7weNNjQ==",
4090
  "cpu": [
4091
  "ia32"
4092
  ],
 
4098
  ]
4099
  },
4100
  "node_modules/@rollup/rollup-win32-x64-msvc": {
4101
+ "version": "4.39.0",
4102
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.39.0.tgz",
4103
+ "integrity": "sha512-yAkUOkIKZlK5dl7u6dg897doBgLXmUHhIINM2c+sND3DZwnrdQkkSiDh7N75Ll4mM4dxSkYfXqU9fW3lLkMFug==",
4104
  "cpu": [
4105
  "x64"
4106
  ],
 
4636
  "license": "MIT"
4637
  },
4638
  "node_modules/@types/node": {
4639
+ "version": "22.14.0",
4640
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.14.0.tgz",
4641
+ "integrity": "sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA==",
4642
  "license": "MIT",
4643
  "dependencies": {
4644
+ "undici-types": "~6.21.0"
4645
  }
4646
  },
4647
  "node_modules/@types/plist": {
 
5687
  }
5688
  },
5689
  "node_modules/@vuepress/bundler-vite/node_modules/vite": {
5690
+ "version": "6.1.4",
5691
+ "resolved": "https://registry.npmjs.org/vite/-/vite-6.1.4.tgz",
5692
+ "integrity": "sha512-VzONrF/qqEg/JBwHXBJdVSmBZBhwiPGinyUb0SQLByqQwi6o8UvX5TWLkpvkq3tvN8Cr273ieZDt36CGwWRMvA==",
5693
  "dev": true,
5694
  "license": "MIT",
5695
  "dependencies": {
 
7941
  }
7942
  },
7943
  "node_modules/c12": {
7944
+ "version": "3.0.3",
7945
+ "resolved": "https://registry.npmjs.org/c12/-/c12-3.0.3.tgz",
7946
+ "integrity": "sha512-uC3MacKBb0Z15o5QWCHvHWj5Zv34pGQj9P+iXKSpTuSGFS0KKhUWf4t9AJ+gWjYOdmWCPEGpEzm8sS0iqbpo1w==",
7947
  "license": "MIT",
7948
  "dependencies": {
7949
  "chokidar": "^4.0.3",
7950
+ "confbox": "^0.2.2",
7951
  "defu": "^6.1.4",
7952
  "dotenv": "^16.4.7",
7953
+ "exsolve": "^1.0.4",
7954
  "giget": "^2.0.0",
7955
  "jiti": "^2.4.2",
7956
+ "ohash": "^2.0.11",
7957
  "pathe": "^2.0.3",
7958
  "perfect-debounce": "^1.0.0",
7959
+ "pkg-types": "^2.1.0",
7960
  "rc9": "^2.1.2"
7961
  },
7962
  "peerDependencies": {
 
7983
  "url": "https://paulmillr.com/funding/"
7984
  }
7985
  },
 
 
 
 
 
 
7986
  "node_modules/c12/node_modules/readdirp": {
7987
  "version": "4.1.2",
7988
  "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",
 
8185
  }
8186
  },
8187
  "node_modules/caniuse-lite": {
8188
+ "version": "1.0.30001710",
8189
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001710.tgz",
8190
+ "integrity": "sha512-B5C0I0UmaGqHgo5FuqJ7hBd4L57A4dDD+Xi+XX1nXOoxGeDdY4Ko38qJYOyqznBVJEqON5p8P1x5zRR3+rsnxA==",
8191
  "dev": true,
8192
  "funding": [
8193
  {
 
8945
  }
8946
  },
8947
  "node_modules/confbox": {
8948
+ "version": "0.2.2",
8949
+ "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.2.tgz",
8950
+ "integrity": "sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ==",
8951
  "license": "MIT"
8952
  },
8953
  "node_modules/config-file-ts": {
 
9291
  "license": "MIT"
9292
  },
9293
  "node_modules/cytoscape": {
9294
+ "version": "3.31.2",
9295
+ "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.31.2.tgz",
9296
+ "integrity": "sha512-/eOXg2uGdMdpGlEes5Sf6zE+jUG+05f3htFNQIxLxduOH/SsaUZiPBfAwP1btVIVzsnhiNOdi+hvDRLYfMZjGw==",
9297
  "license": "MIT",
9298
  "engines": {
9299
  "node": ">=0.10"
 
10053
  }
10054
  },
10055
  "node_modules/destr": {
10056
+ "version": "2.0.5",
10057
+ "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz",
10058
+ "integrity": "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==",
10059
  "license": "MIT"
10060
  },
10061
  "node_modules/destroy": {
 
10247
  }
10248
  },
10249
  "node_modules/dompurify": {
10250
+ "version": "3.2.5",
10251
+ "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.5.tgz",
10252
+ "integrity": "sha512-mLPd29uoRe9HpvwP2TxClGQBzGXeEC/we/q+bFlmPPmj2p2Ugl3r6ATu/UU1v77DXNcehiBg9zsr1dREyA/dJQ==",
10253
  "license": "(MPL-2.0 OR Apache-2.0)",
10254
  "optionalDependencies": {
10255
  "@types/trusted-types": "^2.0.7"
 
10375
  }
10376
  },
10377
  "node_modules/electron": {
10378
+ "version": "34.5.0",
10379
+ "resolved": "https://registry.npmjs.org/electron/-/electron-34.5.0.tgz",
10380
+ "integrity": "sha512-GabFMG7r2P1NQf5DYp6mnCXo5CcatxXb8YQo54VTStql6weeEv7tsqvl3lAssGwDdd4iMc8QpTCFjErBSVRWeQ==",
10381
  "dev": true,
10382
  "hasInstallScript": true,
10383
  "license": "MIT",
 
10561
  }
10562
  },
10563
  "node_modules/electron-to-chromium": {
10564
+ "version": "1.5.131",
10565
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.131.tgz",
10566
+ "integrity": "sha512-fJFRYXVEJgDCiqFOgRGJm8XR97hZ13tw7FXI9k2yC5hgY+nyzC2tMO8baq1cQR7Ur58iCkASx2zrkZPZUnfzPg==",
10567
  "dev": true,
10568
  "license": "ISC"
10569
  },
10570
  "node_modules/electron/node_modules/@types/node": {
10571
+ "version": "20.17.30",
10572
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.30.tgz",
10573
+ "integrity": "sha512-7zf4YyHA+jvBNfVrk2Gtvs6x7E8V+YDW05bNfG2XkWDJfYRXrTiP/DsB2zSYTaHX0bGIujTBQdMVAhb+j7mwpg==",
10574
  "dev": true,
10575
  "license": "MIT",
10576
  "dependencies": {
 
14103
  }
14104
  },
14105
  "node_modules/miniflare": {
14106
+ "version": "3.20250310.2",
14107
+ "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-3.20250310.2.tgz",
14108
+ "integrity": "sha512-Kjtr5XMvQyRQZFsqAHcgFaKccTDMlslUOugAEWhQUkEfozS/e5GAiXE9lftNW6xTWZ3DTigt+FkShBI106MHKQ==",
14109
  "dev": true,
14110
  "license": "MIT",
14111
  "dependencies": {
 
14757
  }
14758
  },
14759
  "node_modules/nitropack/node_modules/mime": {
14760
+ "version": "4.0.7",
14761
+ "resolved": "https://registry.npmjs.org/mime/-/mime-4.0.7.tgz",
14762
+ "integrity": "sha512-2OfDPL+e03E0LrXaGYOtTFIYhiuzep94NSsuhrNULq+stylcJedcHdzHtz0atMUuGwJfFYs0YL5xeC/Ca2x0eQ==",
14763
  "dev": true,
14764
  "funding": [
14765
  "https://github.com/sponsors/broofa"
 
16692
  "license": "Unlicense"
16693
  },
16694
  "node_modules/rollup": {
16695
+ "version": "4.39.0",
16696
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.39.0.tgz",
16697
+ "integrity": "sha512-thI8kNc02yNvnmJp8dr3fNWJ9tCONDhp6TV35X6HkKGGs9E6q7YWCHbe5vKiTa7TAiNcFEmXKj3X/pG2b3ci0g==",
16698
  "dev": true,
16699
  "license": "MIT",
16700
  "dependencies": {
 
16708
  "npm": ">=8.0.0"
16709
  },
16710
  "optionalDependencies": {
16711
+ "@rollup/rollup-android-arm-eabi": "4.39.0",
16712
+ "@rollup/rollup-android-arm64": "4.39.0",
16713
+ "@rollup/rollup-darwin-arm64": "4.39.0",
16714
+ "@rollup/rollup-darwin-x64": "4.39.0",
16715
+ "@rollup/rollup-freebsd-arm64": "4.39.0",
16716
+ "@rollup/rollup-freebsd-x64": "4.39.0",
16717
+ "@rollup/rollup-linux-arm-gnueabihf": "4.39.0",
16718
+ "@rollup/rollup-linux-arm-musleabihf": "4.39.0",
16719
+ "@rollup/rollup-linux-arm64-gnu": "4.39.0",
16720
+ "@rollup/rollup-linux-arm64-musl": "4.39.0",
16721
+ "@rollup/rollup-linux-loongarch64-gnu": "4.39.0",
16722
+ "@rollup/rollup-linux-powerpc64le-gnu": "4.39.0",
16723
+ "@rollup/rollup-linux-riscv64-gnu": "4.39.0",
16724
+ "@rollup/rollup-linux-riscv64-musl": "4.39.0",
16725
+ "@rollup/rollup-linux-s390x-gnu": "4.39.0",
16726
+ "@rollup/rollup-linux-x64-gnu": "4.39.0",
16727
+ "@rollup/rollup-linux-x64-musl": "4.39.0",
16728
+ "@rollup/rollup-win32-arm64-msvc": "4.39.0",
16729
+ "@rollup/rollup-win32-ia32-msvc": "4.39.0",
16730
+ "@rollup/rollup-win32-x64-msvc": "4.39.0",
16731
  "fsevents": "~2.3.2"
16732
  }
16733
  },
 
16949
  }
16950
  },
16951
  "node_modules/sass-embedded": {
16952
+ "version": "1.86.3",
16953
+ "resolved": "https://registry.npmjs.org/sass-embedded/-/sass-embedded-1.86.3.tgz",
16954
+ "integrity": "sha512-3pZSp24ibO1hdopj+W9DuiWsZOb2YY6AFRo/jjutKLBkqJGM1nJjXzhAYfzRV+Xn5BX1eTI4bBTE09P0XNHOZg==",
16955
  "dev": true,
16956
  "license": "MIT",
16957
  "dependencies": {
 
16971
  "node": ">=16.0.0"
16972
  },
16973
  "optionalDependencies": {
16974
+ "sass-embedded-android-arm": "1.86.3",
16975
+ "sass-embedded-android-arm64": "1.86.3",
16976
+ "sass-embedded-android-ia32": "1.86.3",
16977
+ "sass-embedded-android-riscv64": "1.86.3",
16978
+ "sass-embedded-android-x64": "1.86.3",
16979
+ "sass-embedded-darwin-arm64": "1.86.3",
16980
+ "sass-embedded-darwin-x64": "1.86.3",
16981
+ "sass-embedded-linux-arm": "1.86.3",
16982
+ "sass-embedded-linux-arm64": "1.86.3",
16983
+ "sass-embedded-linux-ia32": "1.86.3",
16984
+ "sass-embedded-linux-musl-arm": "1.86.3",
16985
+ "sass-embedded-linux-musl-arm64": "1.86.3",
16986
+ "sass-embedded-linux-musl-ia32": "1.86.3",
16987
+ "sass-embedded-linux-musl-riscv64": "1.86.3",
16988
+ "sass-embedded-linux-musl-x64": "1.86.3",
16989
+ "sass-embedded-linux-riscv64": "1.86.3",
16990
+ "sass-embedded-linux-x64": "1.86.3",
16991
+ "sass-embedded-win32-arm64": "1.86.3",
16992
+ "sass-embedded-win32-ia32": "1.86.3",
16993
+ "sass-embedded-win32-x64": "1.86.3"
16994
  }
16995
  },
16996
  "node_modules/sass-embedded-android-arm": {
16997
+ "version": "1.86.3",
16998
+ "resolved": "https://registry.npmjs.org/sass-embedded-android-arm/-/sass-embedded-android-arm-1.86.3.tgz",
16999
+ "integrity": "sha512-UyeXrFzZSvrGbvrWUBcspbsbivGgAgebLGJdSqJulgSyGbA6no3DWQ5Qpdd6+OAUC39BlpPu74Wx9s4RrVuaFw==",
17000
  "cpu": [
17001
  "arm"
17002
  ],
 
17011
  }
17012
  },
17013
  "node_modules/sass-embedded-android-arm64": {
17014
+ "version": "1.86.3",
17015
+ "resolved": "https://registry.npmjs.org/sass-embedded-android-arm64/-/sass-embedded-android-arm64-1.86.3.tgz",
17016
+ "integrity": "sha512-q+XwFp6WgAv+UgnQhsB8KQ95kppvWAB7DSoJp+8Vino8b9ND+1ai3cUUZPE5u4SnLZrgo5NtrbPvN5KLc4Pfyg==",
17017
  "cpu": [
17018
  "arm64"
17019
  ],
 
17028
  }
17029
  },
17030
  "node_modules/sass-embedded-android-ia32": {
17031
+ "version": "1.86.3",
17032
+ "resolved": "https://registry.npmjs.org/sass-embedded-android-ia32/-/sass-embedded-android-ia32-1.86.3.tgz",
17033
+ "integrity": "sha512-gTJjVh2cRzvGujXj5ApPk/owUTL5SiO7rDtNLrzYAzi1N5HRuLYXqk3h1IQY3+eCOBjGl7mQ9XyySbJs/3hDvg==",
17034
  "cpu": [
17035
  "ia32"
17036
  ],
 
17045
  }
17046
  },
17047
  "node_modules/sass-embedded-android-riscv64": {
17048
+ "version": "1.86.3",
17049
+ "resolved": "https://registry.npmjs.org/sass-embedded-android-riscv64/-/sass-embedded-android-riscv64-1.86.3.tgz",
17050
+ "integrity": "sha512-Po3JnyiCS16kd6REo1IMUbFGYtvL9O0rmKaXx5vOuBaJD1LPy2LiSSp7TU7wkJ9IxsTDGzFaSeP1I9qb6D8VVg==",
17051
  "cpu": [
17052
  "riscv64"
17053
  ],
 
17062
  }
17063
  },
17064
  "node_modules/sass-embedded-android-x64": {
17065
+ "version": "1.86.3",
17066
+ "resolved": "https://registry.npmjs.org/sass-embedded-android-x64/-/sass-embedded-android-x64-1.86.3.tgz",
17067
+ "integrity": "sha512-+7h3jdDv/0kUFx0BvxYlq2fa7CcHiDPlta6k5OxO5K6jyqJwo9hc0Z052BoYEauWTqZ+vK6bB5rv2BIzq4U9nA==",
17068
  "cpu": [
17069
  "x64"
17070
  ],
 
17079
  }
17080
  },
17081
  "node_modules/sass-embedded-darwin-arm64": {
17082
+ "version": "1.86.3",
17083
+ "resolved": "https://registry.npmjs.org/sass-embedded-darwin-arm64/-/sass-embedded-darwin-arm64-1.86.3.tgz",
17084
+ "integrity": "sha512-EgLwV4ORm5Hr0DmIXo0Xw/vlzwLnfAiqD2jDXIglkBsc5czJmo4/IBdGXOP65TRnsgJEqvbU3aQhuawX5++x9A==",
17085
  "cpu": [
17086
  "arm64"
17087
  ],
 
17096
  }
17097
  },
17098
  "node_modules/sass-embedded-darwin-x64": {
17099
+ "version": "1.86.3",
17100
+ "resolved": "https://registry.npmjs.org/sass-embedded-darwin-x64/-/sass-embedded-darwin-x64-1.86.3.tgz",
17101
+ "integrity": "sha512-dfKhfrGPRNLWLC82vy/vQGmNKmAiKWpdFuWiePRtg/E95pqw+sCu6080Y6oQLfFu37Iq3MpnXiSpDuSo7UnPWA==",
17102
  "cpu": [
17103
  "x64"
17104
  ],
 
17113
  }
17114
  },
17115
  "node_modules/sass-embedded-linux-arm": {
17116
+ "version": "1.86.3",
17117
+ "resolved": "https://registry.npmjs.org/sass-embedded-linux-arm/-/sass-embedded-linux-arm-1.86.3.tgz",
17118
+ "integrity": "sha512-+fVCIH+OR0SMHn2NEhb/VfbpHuUxcPtqMS34OCV3Ka99LYZUJZqth4M3lT/ppGl52mwIVLNYzR4iLe6mdZ6mYA==",
17119
  "cpu": [
17120
  "arm"
17121
  ],
 
17130
  }
17131
  },
17132
  "node_modules/sass-embedded-linux-arm64": {
17133
+ "version": "1.86.3",
17134
+ "resolved": "https://registry.npmjs.org/sass-embedded-linux-arm64/-/sass-embedded-linux-arm64-1.86.3.tgz",
17135
+ "integrity": "sha512-tYq5rywR53Qtc+0KI6pPipOvW7a47ETY69VxfqI9BR2RKw2hBbaz0bIw6OaOgEBv2/XNwcWb7a4sr7TqgkqKAA==",
17136
  "cpu": [
17137
  "arm64"
17138
  ],
 
17147
  }
17148
  },
17149
  "node_modules/sass-embedded-linux-ia32": {
17150
+ "version": "1.86.3",
17151
+ "resolved": "https://registry.npmjs.org/sass-embedded-linux-ia32/-/sass-embedded-linux-ia32-1.86.3.tgz",
17152
+ "integrity": "sha512-CmQ5OkqnaeLdaF+bMqlYGooBuenqm3LvEN9H8BLhjkpWiFW8hnYMetiqMcJjhrXLvDw601KGqA5sr/Rsg5s45g==",
17153
  "cpu": [
17154
  "ia32"
17155
  ],
 
17164
  }
17165
  },
17166
  "node_modules/sass-embedded-linux-musl-arm": {
17167
+ "version": "1.86.3",
17168
+ "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-arm/-/sass-embedded-linux-musl-arm-1.86.3.tgz",
17169
+ "integrity": "sha512-SEm65SQknI4pl+mH5Xf231hOkHJyrlgh5nj4qDbiBG6gFeutaNkNIeRgKEg3cflXchCr8iV/q/SyPgjhhzQb7w==",
17170
  "cpu": [
17171
  "arm"
17172
  ],
 
17181
  }
17182
  },
17183
  "node_modules/sass-embedded-linux-musl-arm64": {
17184
+ "version": "1.86.3",
17185
+ "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-arm64/-/sass-embedded-linux-musl-arm64-1.86.3.tgz",
17186
+ "integrity": "sha512-4zOr2C/eW89rxb4ozTfn7lBzyyM5ZigA1ZSRTcAR26Qbg/t2UksLdGnVX9/yxga0d6aOi0IvO/7iM2DPPRRotg==",
17187
  "cpu": [
17188
  "arm64"
17189
  ],
 
17198
  }
17199
  },
17200
  "node_modules/sass-embedded-linux-musl-ia32": {
17201
+ "version": "1.86.3",
17202
+ "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-ia32/-/sass-embedded-linux-musl-ia32-1.86.3.tgz",
17203
+ "integrity": "sha512-84Tcld32LB1loiqUvczWyVBQRCChm0wNLlkT59qF29nxh8njFIVf9yaPgXcSyyjpPoD9Tu0wnq3dvVzoMCh9AQ==",
17204
  "cpu": [
17205
  "ia32"
17206
  ],
 
17215
  }
17216
  },
17217
  "node_modules/sass-embedded-linux-musl-riscv64": {
17218
+ "version": "1.86.3",
17219
+ "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-riscv64/-/sass-embedded-linux-musl-riscv64-1.86.3.tgz",
17220
+ "integrity": "sha512-IxEqoiD7vdNpiOwccybbV93NljBy64wSTkUOknGy21SyV43C8uqESOwTwW9ywa3KufImKm8L3uQAW/B0KhJMWg==",
17221
  "cpu": [
17222
  "riscv64"
17223
  ],
 
17232
  }
17233
  },
17234
  "node_modules/sass-embedded-linux-musl-x64": {
17235
+ "version": "1.86.3",
17236
+ "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-x64/-/sass-embedded-linux-musl-x64-1.86.3.tgz",
17237
+ "integrity": "sha512-ePeTPXUxPK6JgHcUfnrkIyDtyt+zlAvF22mVZv6y1g/PZFm1lSfX+Za7TYHg9KaYqaaXDiw6zICX4i44HhR8rA==",
17238
  "cpu": [
17239
  "x64"
17240
  ],
 
17249
  }
17250
  },
17251
  "node_modules/sass-embedded-linux-riscv64": {
17252
+ "version": "1.86.3",
17253
+ "resolved": "https://registry.npmjs.org/sass-embedded-linux-riscv64/-/sass-embedded-linux-riscv64-1.86.3.tgz",
17254
+ "integrity": "sha512-NuXQ72dwfNLe35E+RaXJ4Noq4EkFwM65eWwCwxEWyJO9qxOx1EXiCAJii6x8kkOh5daWuMU0VAI1B9RsJaqqQQ==",
17255
  "cpu": [
17256
  "riscv64"
17257
  ],
 
17266
  }
17267
  },
17268
  "node_modules/sass-embedded-linux-x64": {
17269
+ "version": "1.86.3",
17270
+ "resolved": "https://registry.npmjs.org/sass-embedded-linux-x64/-/sass-embedded-linux-x64-1.86.3.tgz",
17271
+ "integrity": "sha512-t8be9zJ5B82+og9bQmIQ83yMGYZMTMrlGA+uGWtYacmwg6w3093dk91Fx0YzNSZBp3Tk60qVYjCZnEIwy60x0g==",
17272
  "cpu": [
17273
  "x64"
17274
  ],
 
17283
  }
17284
  },
17285
  "node_modules/sass-embedded-win32-arm64": {
17286
+ "version": "1.86.3",
17287
+ "resolved": "https://registry.npmjs.org/sass-embedded-win32-arm64/-/sass-embedded-win32-arm64-1.86.3.tgz",
17288
+ "integrity": "sha512-4ghuAzjX4q8Nksm0aifRz8hgXMMxS0SuymrFfkfJlrSx68pIgvAge6AOw0edoZoe0Tf5ZbsWUWamhkNyNxkTvw==",
17289
  "cpu": [
17290
  "arm64"
17291
  ],
 
17300
  }
17301
  },
17302
  "node_modules/sass-embedded-win32-ia32": {
17303
+ "version": "1.86.3",
17304
+ "resolved": "https://registry.npmjs.org/sass-embedded-win32-ia32/-/sass-embedded-win32-ia32-1.86.3.tgz",
17305
+ "integrity": "sha512-tCaK4zIRq9mLRPxLzBAdYlfCuS/xLNpmjunYxeWkIwlJo+k53h1udyXH/FInnQ2GgEz0xMXyvH3buuPgzwWYsw==",
17306
  "cpu": [
17307
  "ia32"
17308
  ],
 
17317
  }
17318
  },
17319
  "node_modules/sass-embedded-win32-x64": {
17320
+ "version": "1.86.3",
17321
+ "resolved": "https://registry.npmjs.org/sass-embedded-win32-x64/-/sass-embedded-win32-x64-1.86.3.tgz",
17322
+ "integrity": "sha512-zS+YNKfTF4SnOfpC77VTb0qNZyTXrxnAezSoRV0xnw6HlY+1WawMSSB6PbWtmbvyfXNgpmJUttoTtsvJjRCucg==",
17323
  "cpu": [
17324
  "x64"
17325
  ],
 
18019
  }
18020
  },
18021
  "node_modules/std-env": {
18022
+ "version": "3.9.0",
18023
+ "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz",
18024
+ "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==",
18025
  "license": "MIT"
18026
  },
18027
  "node_modules/stdin-discarder": {
 
18447
  }
18448
  },
18449
  "node_modules/swagger-ui-dist": {
18450
+ "version": "5.20.5",
18451
+ "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.20.5.tgz",
18452
+ "integrity": "sha512-7DqzFVHAW5MRhmWRDgd2Xr7RQUGaJv+7RfGmwChlOxz+tMLBmvHDz3vuVgaoj2CWNpTHxIm8aTsCBeJVxNrpjA==",
18453
  "dev": true,
18454
  "license": "Apache-2.0",
18455
  "dependencies": {
 
18980
  }
18981
  },
18982
  "node_modules/type-fest": {
18983
+ "version": "4.39.1",
18984
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.39.1.tgz",
18985
+ "integrity": "sha512-uW9qzd66uyHYxwyVBYiwS4Oi0qZyUqwjU+Oevr6ZogYiXt99EOYtwvzMSLw1c3lYo2HzJsep/NB23iEVEgjG/w==",
18986
  "dev": true,
18987
  "license": "(MIT OR CC0-1.0)",
18988
  "engines": {
 
19058
  }
19059
  },
19060
  "node_modules/ultrahtml": {
19061
+ "version": "1.6.0",
19062
+ "resolved": "https://registry.npmjs.org/ultrahtml/-/ultrahtml-1.6.0.tgz",
19063
+ "integrity": "sha512-R9fBn90VTJrqqLDwyMph+HGne8eqY1iPfYhPzZrvKpIfwkWZbcYlfpsb8B9dTvBfpy1/hqAD7Wi8EKfP9e8zdw==",
19064
  "dev": true,
19065
  "license": "MIT"
19066
  },
 
19099
  "license": "MIT"
19100
  },
19101
  "node_modules/undici": {
19102
+ "version": "7.7.0",
19103
+ "resolved": "https://registry.npmjs.org/undici/-/undici-7.7.0.tgz",
19104
+ "integrity": "sha512-tZ6+5NBq4KH35rr46XJ2JPFKxfcBlYNaqLF/wyWIO9RMHqqU/gx/CLB1Y2qMcgB8lWw/bKHa7qzspqCN7mUHvA==",
19105
  "license": "MIT",
19106
  "engines": {
19107
  "node": ">=20.18.1"
19108
  }
19109
  },
19110
  "node_modules/undici-types": {
19111
+ "version": "6.21.0",
19112
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
19113
+ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
19114
  "license": "MIT"
19115
  },
19116
  "node_modules/unenv": {
 
19746
  }
19747
  },
19748
  "node_modules/vite": {
19749
+ "version": "6.2.5",
19750
+ "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.5.tgz",
19751
+ "integrity": "sha512-j023J/hCAa4pRIUH6J9HemwYfjB5llR2Ps0CWeikOtdR8+pAURAk0DoJC5/mm9kd+UgdnIy7d6HE4EAvlYhPhA==",
19752
  "dev": true,
19753
  "license": "MIT",
19754
  "dependencies": {
 
20374
  }
20375
  },
20376
  "node_modules/wrangler": {
20377
+ "version": "3.114.4",
20378
+ "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-3.114.4.tgz",
20379
+ "integrity": "sha512-7F8zF3CZmzOQLwpKOiwzu24d2c98ch4AP+Uz4L3uTXe8Bjq6g5rPjKwovg2whXJGc64X2DjTZJOAFN3KlWmscA==",
20380
  "dev": true,
20381
  "license": "MIT OR Apache-2.0",
20382
  "dependencies": {
 
20386
  "@esbuild-plugins/node-modules-polyfill": "0.2.2",
20387
  "blake3-wasm": "2.1.5",
20388
  "esbuild": "0.17.19",
20389
+ "miniflare": "3.20250310.2",
20390
  "path-to-regexp": "6.3.0",
20391
  "unenv": "2.0.0-rc.14",
20392
  "workerd": "1.20250310.0"