diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 4b6dfa60..d5e7c9bc 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -42,9 +42,9 @@ android { else -> 0 } - val vCode = 310 + val vCode = 313 versionCode = vCode - singleAbiNum - versionName = "1.2.59" + versionName = "1.3.0" ndk { //noinspection ChromeOsAbiSupport diff --git a/app/src/main/resources/web/assets/AIChatView-B-2RGQXi.js b/app/src/main/resources/web/assets/AIChatView-B-2RGQXi.js deleted file mode 100644 index debe4b38..00000000 --- a/app/src/main/resources/web/assets/AIChatView-B-2RGQXi.js +++ /dev/null @@ -1,5 +0,0 @@ -import{d as X,u as Y,g as ee,h as d,s as te,i as ae,l as se,j as S,aZ as ne,at as H,aU as oe,a0 as B,aV as ie,c as r,a as s,O as le,P as ce,t as u,e as N,x as A,y as de,A as h,w as v,p as Q,Q as re,C as ue,b9 as pe,ba as _e,bb as ve,S as me,o as l,m,bc as M,v as he,q as R,am as G,V as K,bd as q,F as fe,G as ye,be,al as Ce,bf as ge,H as ke}from"./index-BxNI00MG.js";import{u as we}from"./markdown-CMfotNJO.js";const Ae=f=>(fe("data-v-4d4db71f"),f=f(),ye(),f),Me={class:"chat-container"},Ie={key:0,class:"date"},Te={class:"chat-title"},$e={class:"name"},xe={class:"time"},Ve={class:"menu-items"},De=["onClick","disabled"],Le={slot:"headline"},Se={key:2,class:"chat-title"},He={class:"name"},Be={class:"time"},Ne=["innerHTML"],Qe={key:0,class:"chat-item replying"},Re={class:"chat-title"},Ge={class:"name"},Ke=["innerHTML"],qe={class:"chat-input",style:{"min-height":"80px"}},Fe=["placeholder","onKeydown"],Ue={class:"btns"},Pe=Ae(()=>s("md-ripple",null,null,-1)),je=X({__name:"AIChatView",setup(f){const F=Y(),{t:U}=ee(),P=re(),c=d(P.params.id),i=d(""),p=d([]),y=d(!1),b=d(""),g=d(""),{app:j,urlTokenKey:E}=te(ae()),I=d(),{render:C}=we(j,E);function k(){return c.value==="create"}function O(e,t){let n=!1;if(t==0)n=!0;else{const o=t>0?p.value[t-1]:null;o!=null&&M(o.createdAt)!==M(e.createdAt)&&(n=!0)}return n}k()||se({handle:async(e,t)=>{if(t)ue(U(t),"error");else{const n=[];n.push({...e.aiChat,md:await C(e.aiChat.content)});for(const o of e.aiChats)n.push({...o,md:await C(o.content)});p.value=n,await H(),x()}},document:pe,variables:()=>({id:c.value,query:`parent_id:${c.value} sort:created_at-asc`}),appApi:!0});const{mutate:T,onDone:Z}=S({document:_e,appApi:!0});function $(){!i.value||y.value||T({id:k()?"":c.value,message:i.value,isMe:!0})}Z(async e=>{var n;const t=e.data.createAIChat;if(t){for(const _ of t)(n=p.value)==null||n.push({..._,md:await C(_.content)});k()&&(c.value=t[0].id,ne(F,`/aichats/${c.value}`)),i.value="",y.value=!y.value,b.value="",g.value='',await H(),x()}});function x(){const e=I.value;e&&(e.scrollTop=e.scrollHeight)}const w=d(""),{mutate:z,loading:J}=S({document:ve,options:{update:e=>{var n,o;e.evict({id:e.identify({__typename:"AIChat",id:w.value})});const t=(n=p.value)==null?void 0:n.findIndex(_=>_.id===w.value);t!==null&&((o=p.value)==null||o.splice(t,1))}},appApi:!0});function W(e){w.value=e,z({query:`ids:${e}`})}const V=async e=>{e.parentId===c.value&&(b.value+=e.content,g.value=await C(b.value+''),e.finishReason==="stop"&&T({id:c.value,message:b.value,isMe:!1}))};return oe(()=>{B.on("ai_chat_replied",V)}),ie(()=>{B.off("ai_chat_replied",V)}),(e,t)=>{const n=be,o=Ce,_=ge,D=me("tooltip");return l(),r("div",Me,[s("div",{class:"chat-items",ref_key:"scrollContainer",ref:I},[(l(!0),r(le,null,ce(p.value,(a,L)=>(l(),r("div",{key:a.id,class:"chat-item"},[O(a,L)?(l(),r("div",Ie,u(m(M)(a.createdAt)),1)):N("",!0),L>0?(l(),he(o,{key:1},{content:R(()=>[s("div",Ve,[s("md-menu-item",{onClick:Ee=>W(a.id),disabled:m(J)},[s("div",Le,u(e.$t("delete_message")),1)],8,De)])]),default:R(()=>[s("div",Te,[s("span",$e,u(e.$t(a.isMe?"me":"ai")),1),A((l(),r("span",xe,[K(u(m(q)(a.createdAt)),1)])),[[D,m(G)(a.createdAt)]]),Q(n,{class:"bi bi-more"})])]),_:2},1024)):(l(),r("div",Se,[s("span",He,u(e.$t(a.isMe?"me":"ai")),1),A((l(),r("span",Be,[K(u(m(q)(a.createdAt)),1)])),[[D,m(G)(a.createdAt)]])])),s("div",{class:"chat-content md-container",innerHTML:a.md},null,8,Ne)]))),128)),y.value?(l(),r("div",Qe,[s("div",Re,[s("span",Ge,u(e.$t("ai")),1)]),s("div",{class:"chat-content md-container",innerHTML:g.value},null,8,Ke)])):N("",!0)],512),s("div",qe,[A(s("md-outlined-text-field",{class:"textarea",type:"textarea","onUpdate:modelValue":t[0]||(t[0]=a=>i.value=a),autocomplete:"off",placeholder:e.$t("chat_input_hint"),onKeydown:[h(v($,["exact","prevent"]),["enter"]),t[1]||(t[1]=h(v(a=>i.value+=` -`,["shift","exact","prevent"]),["enter"])),t[2]||(t[2]=h(v(a=>i.value+=` -`,["ctrl","exact","prevent"]),["enter"])),t[3]||(t[3]=h(v(a=>i.value+=` -`,["alt","exact","prevent"]),["enter"])),t[4]||(t[4]=h(v(a=>i.value+=` -`,["meta","exact","prevent"]),["enter"]))]},null,40,Fe),[[de,i.value]]),s("div",Ue,[s("button",{class:"btn-icon",onClick:v($,["stop"])},[Pe,Q(_)])])])])}}}),ze=ke(je,[["__scopeId","data-v-4d4db71f"]]);export{ze as default}; diff --git a/app/src/main/resources/web/assets/AIChatView-B2OZbePS.js b/app/src/main/resources/web/assets/AIChatView-B2OZbePS.js new file mode 100644 index 00000000..45a7d8a8 --- /dev/null +++ b/app/src/main/resources/web/assets/AIChatView-B2OZbePS.js @@ -0,0 +1,5 @@ +import{d as W,u as Z,g as ee,h as r,s as te,i as ae,l as se,j as V,b0 as ne,au as H,aX as oe,a1 as B,aY as ie,c as d,a as s,O as le,P as ce,t as u,e as N,x as A,y as re,A as h,w as v,p as Q,Q as de,C as ue,be as pe,bf as _e,bg as ve,S as me,o as l,m,bh as M,v as he,q as R,an as G,V as K,bi as q,F as fe,G as ye,bj as be,am as Ce,bk as ge,H as ke}from"./index-Dn0O6zoH.js";import{u as we}from"./markdown-CIqC0UQZ.js";const Ae=f=>(fe("data-v-4d4db71f"),f=f(),ye(),f),Me={class:"chat-container"},Ie={key:0,class:"date"},Te={class:"chat-title"},$e={class:"name"},xe={class:"time"},De={class:"menu-items"},Le=["onClick","disabled"],Se={slot:"headline"},Ve={key:2,class:"chat-title"},He={class:"name"},Be={class:"time"},Ne=["innerHTML"],Qe={key:0,class:"chat-item replying"},Re={class:"chat-title"},Ge={class:"name"},Ke=["innerHTML"],qe={class:"chat-input",style:{"min-height":"80px"}},Fe=["placeholder","onKeydown"],je={class:"btns"},Pe=Ae(()=>s("md-ripple",null,null,-1)),Ue=W({__name:"AIChatView",setup(f){const F=Z(),{t:j}=ee(),P=de(),c=r(P.params.id),i=r(""),p=r([]),y=r(!1),b=r(""),g=r(""),{app:U,urlTokenKey:E}=te(ae()),I=r(),{render:C}=we(U,E);function k(){return c.value==="create"}function O(e,t){let n=!1;if(t==0)n=!0;else{const o=t>0?p.value[t-1]:null;o!=null&&M(o.createdAt)!==M(e.createdAt)&&(n=!0)}return n}k()||se({handle:async(e,t)=>{if(t)ue(j(t),"error");else{const n=[];n.push({...e.aiChat,md:await C(e.aiChat.content)});for(const o of e.aiChats)n.push({...o,md:await C(o.content)});p.value=n,await H(),x()}},document:pe,variables:()=>({id:c.value,query:`parent_id:${c.value} sort:created_at-asc`}),appApi:!0});const{mutate:T,onDone:X}=V({document:_e,appApi:!0});function $(){!i.value||y.value||T({id:k()?"":c.value,message:i.value,isMe:!0})}X(async e=>{var n;const t=e.data.createAIChat;if(t){for(const _ of t)(n=p.value)==null||n.push({..._,md:await C(_.content)});k()&&(c.value=t[0].id,ne(F,`/aichats/${c.value}`)),i.value="",y.value=!y.value,b.value="",g.value='',await H(),x()}});function x(){const e=I.value;e&&(e.scrollTop=e.scrollHeight)}const w=r(""),{mutate:Y,loading:z}=V({document:ve,options:{update:e=>{var n,o;e.evict({id:e.identify({__typename:"AIChat",id:w.value})});const t=(n=p.value)==null?void 0:n.findIndex(_=>_.id===w.value);t!==null&&((o=p.value)==null||o.splice(t,1))}},appApi:!0});function J(e){w.value=e,Y({query:`ids:${e}`})}const D=async e=>{e.parentId===c.value&&(b.value+=e.content,g.value=await C(b.value+''),e.finishReason==="stop"&&T({id:c.value,message:b.value,isMe:!1}))};return oe(()=>{B.on("ai_chat_replied",D)}),ie(()=>{B.off("ai_chat_replied",D)}),(e,t)=>{const n=be,o=Ce,_=ge,L=me("tooltip");return l(),d("div",Me,[s("div",{class:"chat-items",ref_key:"scrollContainer",ref:I},[(l(!0),d(le,null,ce(p.value,(a,S)=>(l(),d("div",{key:a.id,class:"chat-item"},[O(a,S)?(l(),d("div",Ie,u(m(M)(a.createdAt)),1)):N("",!0),S>0?(l(),he(o,{key:1},{content:R(()=>[s("div",De,[s("md-menu-item",{onClick:Ee=>J(a.id),disabled:m(z)},[s("div",Se,u(e.$t("delete_message")),1)],8,Le)])]),default:R(()=>[s("div",Te,[s("span",$e,u(e.$t(a.isMe?"me":"ai")),1),A((l(),d("span",xe,[K(u(m(q)(a.createdAt)),1)])),[[L,m(G)(a.createdAt)]]),Q(n,{class:"bi bi-more"})])]),_:2},1024)):(l(),d("div",Ve,[s("span",He,u(e.$t(a.isMe?"me":"ai")),1),A((l(),d("span",Be,[K(u(m(q)(a.createdAt)),1)])),[[L,m(G)(a.createdAt)]])])),s("div",{class:"chat-content md-container",innerHTML:a.md},null,8,Ne)]))),128)),y.value?(l(),d("div",Qe,[s("div",Re,[s("span",Ge,u(e.$t("ai")),1)]),s("div",{class:"chat-content md-container",innerHTML:g.value},null,8,Ke)])):N("",!0)],512),s("div",qe,[A(s("md-outlined-text-field",{class:"textarea",type:"textarea","onUpdate:modelValue":t[0]||(t[0]=a=>i.value=a),autocomplete:"off",placeholder:e.$t("chat_input_hint"),onKeydown:[h(v($,["exact","prevent"]),["enter"]),t[1]||(t[1]=h(v(a=>i.value+=` +`,["shift","exact","prevent"]),["enter"])),t[2]||(t[2]=h(v(a=>i.value+=` +`,["ctrl","exact","prevent"]),["enter"])),t[3]||(t[3]=h(v(a=>i.value+=` +`,["alt","exact","prevent"]),["enter"])),t[4]||(t[4]=h(v(a=>i.value+=` +`,["meta","exact","prevent"]),["enter"]))]},null,40,Fe),[[re,i.value]]),s("div",je,[s("button",{class:"btn-icon",onClick:v($,["stop"])},[Pe,Q(_)])])])])}}}),Ye=ke(Ue,[["__scopeId","data-v-4d4db71f"]]);export{Ye as default}; diff --git a/app/src/main/resources/web/assets/AIChatsSidebar-9BL_hqeu.js b/app/src/main/resources/web/assets/AIChatsSidebar-9BL_hqeu.js new file mode 100644 index 00000000..23c4bc0a --- /dev/null +++ b/app/src/main/resources/web/assets/AIChatsSidebar-9BL_hqeu.js @@ -0,0 +1 @@ +import{_ as M}from"./LeftSidebar.vuevuetypescriptsetuptruelang-B6Ke7euJ.js";import{_ as S}from"./TagFilter.vuevuetypescriptsetuptruelang-uBMdMrN4.js";import{o as u,c as v,a,d as T,h as k,g as V,j as x,bn as B,as as L,l as G,C as N,bo as Q,au as z,at as q,x as w,y as D,m as s,z as K,A as P,t as h,e as F,V as I,u as R,I as E,k as j,v as H,q as b,a6 as y,a0 as U,S as Z,p as $,w as A,N as J,f as O,Z as W}from"./index-Dn0O6zoH.js";import{u as X}from"./search-DrT1IjAg.js";import{u as Y,a as tt}from"./vee-validate.esm-0lx5owW0.js";import"./more-vert-De1QBMLo.js";import"./EditValueModal-Du2st8tU.js";const et={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},ot=a("path",{fill:"currentColor",d:"m9.25 22l-.4-3.2q-.325-.125-.612-.3t-.563-.375L4.7 19.375l-2.75-4.75l2.575-1.95Q4.5 12.5 4.5 12.338v-.675q0-.163.025-.338L1.95 9.375l2.75-4.75l2.975 1.25q.275-.2.575-.375t.6-.3l.4-3.2h5.5l.4 3.2q.325.125.613.3t.562.375l2.975-1.25l2.75 4.75l-2.575 1.95q.025.175.025.338v.674q0 .163-.05.338l2.575 1.95l-2.75 4.75l-2.95-1.25q-.275.2-.575.375t-.6.3l-.4 3.2zM11 20h1.975l.35-2.65q.775-.2 1.438-.587t1.212-.938l2.475 1.025l.975-1.7l-2.15-1.625q.125-.35.175-.737T17.5 12t-.05-.787t-.175-.738l2.15-1.625l-.975-1.7l-2.475 1.05q-.55-.575-1.212-.962t-1.438-.588L13 4h-1.975l-.35 2.65q-.775.2-1.437.588t-1.213.937L5.55 7.15l-.975 1.7l2.15 1.6q-.125.375-.175.75t-.05.8q0 .4.05.775t.175.75l-2.15 1.625l.975 1.7l2.475-1.05q.55.575 1.213.963t1.437.587zm1.05-4.5q1.45 0 2.475-1.025T15.55 12t-1.025-2.475T12.05 8.5q-1.475 0-2.488 1.025T8.55 12t1.013 2.475T12.05 15.5M12 12"},null,-1),st=[ot];function at(g,d){return u(),v("svg",et,[...st])}const nt={name:"material-symbols-settings-outline",render:at},lt=a("div",{slot:"headline"},"ChatGPT",-1),it={slot:"content"},rt=["label","error","error-text"],ct={slot:"actions"},ut=["disabled"],dt={key:0,indeterminate:"",slot:"icon"},pt=T({__name:"AIChatConfigModal",props:{value:{type:String}},setup(g){const{handleSubmit:d}=Y(),p=k(),{t:r}=V(),c=g,{mutate:_,loading:m,onDone:C}=x({document:B,options:{update:()=>{}},appApi:!0}),{value:t,resetField:f,errorMessage:n}=tt("inputValue",L());t.value=c.value??"",t.value||f(),G({handle:(o,e)=>{e?N(r(e),"error"):o&&(t.value=o.aiChatConfig.chatGPTApiKey)},document:Q,variables:null,appApi:!0}),(async()=>{var o;await z(),(o=p.value)==null||o.focus()})();const i=d(()=>{_({chatGPTApiKey:t.value??""})});return C(()=>{q()}),(o,e)=>(u(),v("md-dialog",null,[lt,a("div",it,[w(a("md-outlined-text-field",{ref_key:"input",ref:p,label:o.$t("api_key"),class:"form-control","onUpdate:modelValue":e[0]||(e[0]=l=>K(t)?t.value=l:null),onKeyup:e[1]||(e[1]=P((...l)=>s(i)&&s(i)(...l),["enter"])),error:s(n),"error-text":s(n)?o.$t(s(n)):""},null,40,rt),[[D,s(t)]])]),a("div",ct,[a("md-outlined-button",{value:"cancel",onClick:e[2]||(e[2]=(...l)=>s(q)&&s(q)(...l))},h(o.$t("cancel")),1),a("md-filled-button",{value:"save",disabled:s(m),onClick:e[3]||(e[3]=(...l)=>s(i)&&s(i)(...l)),autofocus:""},[s(m)?(u(),v("md-circular-progress",dt)):F("",!0),I(" "+h(o.$t("save")),1)],8,ut)])]))}}),_t=a("md-ripple",null,null,-1),mt={class:"nav"},ft={class:"title"},$t=T({__name:"AIChatsSidebar",setup(g){const d=R(),{parseQ:p}=X(),r=E({tagIds:[]}),c=k("");function _(){var n;const t=y.currentRoute.value,f=U(((n=t.query.q)==null?void 0:n.toString())??"");p(r,f),c.value=r.tagIds.length===1?r.tagIds[0]:""}_(),j(()=>y.currentRoute.value,()=>{_()});function m(){O(d,"/aichats")}function C(){W(pt)}return(t,f)=>{const n=nt,i=S,o=M,e=Z("tooltip");return u(),H(o,null,{title:b(()=>[I(h(t.$t("page_title.aichats")),1)]),actions:b(()=>[w((u(),v("button",{class:"btn-icon",onClick:A(C,["prevent"])},[_t,$(n)])),[[e,t.$t("config")]])]),body:b(()=>[a("ul",mt,[a("li",{onClick:A(m,["prevent"]),class:J({active:!c.value})},[a("span",ft,h(t.$t("all")),1)],2)]),$(i,{type:"AI_CHAT",selected:c.value},null,8,["selected"])]),_:1})}}});export{$t as default}; diff --git a/app/src/main/resources/web/assets/AIChatsSidebar-Cr8jHAaK.js b/app/src/main/resources/web/assets/AIChatsSidebar-Cr8jHAaK.js deleted file mode 100644 index 39326304..00000000 --- a/app/src/main/resources/web/assets/AIChatsSidebar-Cr8jHAaK.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as I}from"./LeftSidebar.vuevuetypescriptsetuptruelang-CF3KQ8wQ.js";import{_ as M}from"./TagFilter.vuevuetypescriptsetuptruelang-DA-dvEFf.js";import{o as m,c as b,a,d as T,h as k,g as S,j as V,bi as x,ar as B,l as L,C as G,bj as Q,at as z,as as q,x as w,y as D,m as s,z as K,A as N,t as f,u as P,I as F,k as R,v as j,q as C,a5 as $,$ as E,S as H,V as U,p as y,w as A,N as Y,f as J,Y as O}from"./index-BxNI00MG.js";import{u as W}from"./search-D1_YTViL.js";import{u as X,a as Z}from"./vee-validate.esm-9czZ1sUw.js";import"./sidebar-JKGKmRjc.js";import"./more-vert-rfLdxqnE.js";import"./EditValueModal-DZMNikfg.js";const tt={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},et=a("path",{fill:"currentColor",d:"m9.25 22l-.4-3.2q-.325-.125-.612-.3t-.563-.375L4.7 19.375l-2.75-4.75l2.575-1.95Q4.5 12.5 4.5 12.338v-.675q0-.163.025-.338L1.95 9.375l2.75-4.75l2.975 1.25q.275-.2.575-.375t.6-.3l.4-3.2h5.5l.4 3.2q.325.125.613.3t.562.375l2.975-1.25l2.75 4.75l-2.575 1.95q.025.175.025.338v.674q0 .163-.05.338l2.575 1.95l-2.75 4.75l-2.95-1.25q-.275.2-.575.375t-.6.3l-.4 3.2zM11 20h1.975l.35-2.65q.775-.2 1.438-.587t1.212-.938l2.475 1.025l.975-1.7l-2.15-1.625q.125-.35.175-.737T17.5 12t-.05-.787t-.175-.738l2.15-1.625l-.975-1.7l-2.475 1.05q-.55-.575-1.212-.962t-1.438-.588L13 4h-1.975l-.35 2.65q-.775.2-1.437.588t-1.213.937L5.55 7.15l-.975 1.7l2.15 1.6q-.125.375-.175.75t-.05.8q0 .4.05.775t.175.75l-2.15 1.625l.975 1.7l2.475-1.05q.55.575 1.213.963t1.437.587zm1.05-4.5q1.45 0 2.475-1.025T15.55 12t-1.025-2.475T12.05 8.5q-1.475 0-2.488 1.025T8.55 12t1.013 2.475T12.05 15.5M12 12"},null,-1),ot=[et];function st(v,c){return m(),b("svg",tt,[...ot])}const at={name:"material-symbols-settings-outline",render:st},lt=a("div",{slot:"headline"},"ChatGPT",-1),nt={slot:"content"},it=["label","error","error-text"],rt={slot:"actions"},ut=["disabled"],ct=T({__name:"AIChatConfigModal",props:{value:{type:String}},setup(v){const{handleSubmit:c}=X(),d=k(),{t:r}=S(),u=v,{mutate:p,loading:h,onDone:g}=V({document:x,options:{update:()=>{}},appApi:!0}),{value:t,resetField:_,errorMessage:l}=Z("inputValue",B());t.value=u.value??"",t.value||_(),L({handle:(o,e)=>{e?G(r(e),"error"):o&&(t.value=o.aiChatConfig.chatGPTApiKey)},document:Q,variables:null,appApi:!0}),(async()=>{var o;await z(),(o=d.value)==null||o.focus()})();const i=c(()=>{p({chatGPTApiKey:t.value??""})});return g(()=>{q()}),(o,e)=>(m(),b("md-dialog",null,[lt,a("div",nt,[w(a("md-outlined-text-field",{ref_key:"input",ref:d,label:o.$t("api_key"),class:"form-control","onUpdate:modelValue":e[0]||(e[0]=n=>K(t)?t.value=n:null),onKeyup:e[1]||(e[1]=N((...n)=>s(i)&&s(i)(...n),["enter"])),error:s(l),"error-text":s(l)?o.$t(s(l)):""},null,40,it),[[D,s(t)]])]),a("div",rt,[a("md-outlined-button",{value:"cancel",onClick:e[2]||(e[2]=(...n)=>s(q)&&s(q)(...n))},f(o.$t("cancel")),1),a("md-filled-button",{value:"save",disabled:s(h),onClick:e[3]||(e[3]=(...n)=>s(i)&&s(i)(...n)),autofocus:""},f(o.$t("save")),9,ut)])]))}}),dt=a("md-ripple",null,null,-1),pt={class:"nav"},_t={class:"title"},$t=T({__name:"AIChatsSidebar",setup(v){const c=P(),{parseQ:d}=W(),r=F({tagIds:[]}),u=k("");function p(){var l;const t=$.currentRoute.value,_=E(((l=t.query.q)==null?void 0:l.toString())??"");d(r,_),u.value=r.tagIds.length===1?r.tagIds[0]:""}p(),R(()=>$.currentRoute.value,()=>{p()});function h(){J(c,"/aichats")}function g(){O(ct)}return(t,_)=>{const l=at,i=M,o=I,e=H("tooltip");return m(),j(o,null,{title:C(()=>[U(f(t.$t("page_title.aichats")),1)]),actions:C(()=>[w((m(),b("button",{class:"btn-icon",onClick:A(g,["prevent"])},[dt,y(l)])),[[e,t.$t("config")]])]),body:C(()=>[a("ul",pt,[a("li",{onClick:A(h,["prevent"]),class:Y({active:!u.value})},[a("span",_t,f(t.$t("all")),1)],2)]),y(i,{type:"AI_CHAT",selected:u.value},null,8,["selected"])]),_:1})}}});export{$t as default}; diff --git a/app/src/main/resources/web/assets/AIChatsView-BI3padRt.js b/app/src/main/resources/web/assets/AIChatsView-BI3padRt.js deleted file mode 100644 index 412be70c..00000000 --- a/app/src/main/resources/web/assets/AIChatsView-BI3padRt.js +++ /dev/null @@ -1,5 +0,0 @@ -import{_ as ve}from"./VPagination.vuevuetypescriptsetuptruelang-C9URNuao.js";import{d as fe,h as I,g as ke,I as ye,u as be,i as $e,s as Ce,J as we,K as Ae,L as Te,M as qe,c as l,a,t as c,m as t,p as i,O as D,x as g,w as u,e as f,P as Ie,v as De,Q as Se,f as Le,C as Me,bg as Ve,S as Ee,o as n,N as Ne,a$ as Ue,am as O,V as X,U as Y,X as Be,bb as Ke,$ as Qe,a0 as k,bh as Z,Y as j,ab as Pe,ac as Re,Z as ze,ad as He,a1 as Fe,a2 as Ge,a3 as Je}from"./index-BxNI00MG.js";import{c as Oe,u as Xe,_ as Ye,a as Ze,b as je}from"./key-events-B5RXeznw.js";import{u as We,a as xe}from"./tags-BUfgTqH4.js";import{u as et}from"./search-D1_YTViL.js";import"./rss-feed-rounded-Dj4EQ17i.js";import"./vee-validate.esm-9czZ1sUw.js";const tt={class:"top-app-bar"},at={class:"title"},st={class:"actions"},ot=a("md-ripple",null,null,-1),nt=a("md-ripple",null,null,-1),lt={class:"table-responsive"},ct={class:"table"},it=["checked","indeterminate"],dt={key:0},rt=a("th",null,null,-1),ut=["onClick"],_t=["onChange","checked"],pt={key:0},ht=["onClick"],gt={class:"nowrap"},mt={class:"action-btns"},vt=["onClick"],ft=a("md-ripple",null,null,-1),kt=["onClick"],yt=a("md-ripple",null,null,-1),bt={class:"nowrap"},$t={class:"nowrap"},Ct={key:0},wt=["colspan"],At={class:"no-data-placeholder"},m=50,Et=fe({__name:"AIChatsView",setup(Tt){var H;const y=I([]),{t:W}=ke(),{parseQ:x}=et(),S=ye({tagIds:[]}),ee=be(),te=$e(),{app:w}=Ce(te),d=we.AI_CHAT,L=Se(),M=L.query,A=I(parseInt(((H=M.page)==null?void 0:H.toString())??"1")),_=I(""),{tags:b,fetch:ae}=We(d),{addToTags:se}=xe(d,b),{deleteItems:V}=Oe(Ke,()=>{C()}),{selectedIds:v,allChecked:E,realAllChecked:$,selectRealAll:oe,allCheckedAlertVisible:ne,clearSelection:T,toggleAllChecked:N,toggleRow:U,total:r,checked:B,selectAll:le}=Xe(y),K=e=>{const o=L.query.q;Le(ee,o?`/aichats?page=${e}&q=${o}`:`/aichats?page=${e}`)},{keyDown:Q,keyUp:P}=je(r,m,A,le,T,K,()=>{V($.value,v.value,_.value)}),{loading:ce,fetch:C}=Ae({handle:(e,o)=>{o?Me(W(o),"error"):e&&(y.value=e.aiChats,r.value=e.aiChatCount)},document:Ve,variables:()=>({offset:(A.value-1)*m,limit:m,query:_.value}),appApi:!0});function ie(e){return e?`/aichats?q=${e}`:"/aichats"}const R=e=>{e.type===d&&(T(),C())},z=e=>{e.type===d&&C()};Te(()=>{var e;_.value=Qe(((e=M.q)==null?void 0:e.toString())??""),x(S,_.value),ae(),C(),k.on("item_tags_updated",z),k.on("items_tags_updated",R),window.addEventListener("keydown",Q),window.addEventListener("keyup",P)}),qe(()=>{k.off("item_tags_updated",z),k.off("items_tags_updated",R),window.removeEventListener("keydown",Q),window.removeEventListener("keyup",P)});function de(e){Z(`/aichats/${e.id}`)}function re(){Z("/aichats/create")}function ue(e){j(Re,{id:e.id,name:e.id,gql:Pe` - mutation DeleteAIChat($query: String!) { - deleteAIChats(query: $query) - } - `,variables:()=>({query:`ids:${e.id}`}),appApi:!0,typeName:"AIChat",done:()=>{r.value--,e.tags.length&&k.emit("refetch_tags",d)}})}function _e(e){j(ze,{type:d,tags:b.value,item:{key:e.id,title:"",size:0},selected:b.value.filter(o=>e.tags.some(q=>q.id===o.id))})}return(e,o)=>{const q=Ye,F=He,G=Fe,pe=Ze,he=Ge,ge=Je,me=ve,p=Ee("tooltip");return n(),l(D,null,[a("div",tt,[a("div",at,c(e.$t("page_title.aichats"))+" ("+c(t(r).toLocaleString())+")",1),a("div",st,[i(q,{filter:S,tags:t(b),"get-url":ie},null,8,["filter","tags"]),t(B)?(n(),l(D,{key:0},[g((n(),l("button",{class:"btn-icon",onClick:o[0]||(o[0]=u(s=>t(V)(t($),t(v),_.value),["stop"]))},[ot,i(F)])),[[p,e.$t("delete")]]),g((n(),l("button",{class:"btn-icon",onClick:o[1]||(o[1]=u(s=>t(se)(t(v),t($),_.value),["stop"]))},[nt,i(G)])),[[p,e.$t("add_to_tags")]])],64)):f("",!0),a("md-outlined-button",{class:"btn-sm",onClick:u(re,["prevent"])},c(e.$t("new_chat")),1)])]),i(pe,{limit:m,total:t(r),"all-checked-alert-visible":t(ne),"real-all-checked":t($),"select-real-all":t(oe),"clear-selection":t(T)},null,8,["total","all-checked-alert-visible","real-all-checked","select-real-all","clear-selection"]),a("div",lt,[a("table",ct,[a("thead",null,[a("tr",null,[a("th",null,[a("md-checkbox",{"touch-target":"wrapper",onChange:o[2]||(o[2]=(...s)=>t(N)&&t(N)(...s)),checked:t(E),indeterminate:!t(E)&&t(B)},null,40,it)]),t(w).developerMode?(n(),l("th",dt,"ID")):f("",!0),a("th",null,c(e.$t("content")),1),rt,a("th",null,c(e.$t("tags")),1),a("th",null,c(e.$t("updated_at")),1),a("th",null,c(e.$t("created_at")),1)])]),a("tbody",null,[(n(!0),l(D,null,Ie(y.value,(s,J)=>(n(),l("tr",{key:s.id,class:Ne({selected:t(v).includes(s.id)}),onClick:u(h=>t(U)(h,s,J),["stop"])},[a("td",null,[a("md-checkbox",{"touch-target":"wrapper",onChange:h=>t(U)(h,s,J),checked:t(v).includes(s.id)},null,40,_t)]),t(w).developerMode?(n(),l("td",pt,[i(he,{id:s.id,raw:s},null,8,["id","raw"])])):f("",!0),a("td",null,[a("a",{href:"#",onClick:u(h=>de(s),["prevent"])},c(t(Ue)(s.content,{length:200,omission:""})),9,ht)]),a("td",gt,[a("div",mt,[g((n(),l("button",{class:"btn-icon sm",onClick:u(h=>ue(s),["stop"])},[ft,i(F)],8,vt)),[[p,e.$t("delete")]]),g((n(),l("button",{class:"btn-icon sm",onClick:u(h=>_e(s),["stop"])},[yt,i(G)],8,kt)),[[p,e.$t("add_to_tags")]])])]),a("td",null,[i(ge,{tags:s.tags,type:t(d)},null,8,["tags","type"])]),a("td",bt,[g((n(),l("time",null,[X(c(t(Y)(s.updatedAt)),1)])),[[p,t(O)(s.updatedAt)]])]),a("td",$t,[g((n(),l("time",null,[X(c(t(Y)(s.updatedAt)),1)])),[[p,t(O)(s.createdAt)]])])],10,ut))),128))]),y.value.length?f("",!0):(n(),l("tfoot",Ct,[a("tr",null,[a("td",{colspan:t(w).developerMode?7:6},[a("div",At,c(e.$t(t(Be)(t(ce)))),1)],8,wt)])]))])]),t(r)>m?(n(),De(me,{key:0,page:A.value,go:K,total:t(r),limit:m},null,8,["page","total"])):f("",!0)],64)}}});export{Et as default}; diff --git a/app/src/main/resources/web/assets/AIChatsView-rTcKx-JP.js b/app/src/main/resources/web/assets/AIChatsView-rTcKx-JP.js new file mode 100644 index 00000000..1cd11698 --- /dev/null +++ b/app/src/main/resources/web/assets/AIChatsView-rTcKx-JP.js @@ -0,0 +1,5 @@ +import{_ as ve}from"./VPagination.vuevuetypescriptsetuptruelang-CFupeDJR.js";import{d as fe,h as I,g as ke,I as ye,u as be,i as Ce,s as $e,J as we,K as Ae,L as Te,M as qe,c as l,a,t as i,m as t,p as d,O as D,x as m,w as u,e as f,P as Ie,v as De,Q as Se,bg as Le,f as Me,C as Ve,bl as Ee,S as Ne,o as n,N as Ue,b1 as Be,an as O,V as X,U as Z,X as Ke,a0 as Qe,a1 as k,bm as j,Z as W,ac as Pe,ad as ze,$ as He,ae as Re,a2 as Fe,a3 as Ge,a4 as Je}from"./index-Dn0O6zoH.js";import{_ as Oe,a as Xe}from"./SearchInput-aem6tEJK.js";import{b as Ze,u as je,a as We}from"./key-events-CgPzNP0J.js";import{u as Ye,a as xe}from"./tags-CvPqo38V.js";import{u as et}from"./search-DrT1IjAg.js";import"./search-rounded-C8Nl_ZR1.js";import"./rss-feed-rounded-Dqku7i1k.js";import"./vee-validate.esm-0lx5owW0.js";const tt={class:"top-app-bar"},at={class:"title"},st={class:"actions"},ot=a("md-ripple",null,null,-1),nt=a("md-ripple",null,null,-1),lt={class:"table-responsive"},it={class:"table"},ct=["checked","indeterminate"],dt={key:0},rt=a("th",null,null,-1),ut=["onClick"],_t=["onChange","checked"],pt={key:0},ht=["onClick"],mt={class:"nowrap"},gt={class:"action-btns"},vt=["onClick"],ft=a("md-ripple",null,null,-1),kt=["onClick"],yt=a("md-ripple",null,null,-1),bt={class:"nowrap"},Ct={class:"nowrap"},$t={key:0},wt=["colspan"],At={class:"no-data-placeholder"},g=50,Ut=fe({__name:"AIChatsView",setup(Tt){var R;const y=I([]),{t:Y}=ke(),{parseQ:x}=et(),S=ye({tagIds:[]}),ee=be(),te=Ce(),{app:w}=$e(te),r=we.AI_CHAT,L=Se(),M=L.query,A=I(parseInt(((R=M.page)==null?void 0:R.toString())??"1")),_=I(""),{tags:b,fetch:ae}=Ye(r),{addToTags:se}=xe(r,b),{deleteItems:V}=Ze(Le,()=>{$()}),{selectedIds:v,allChecked:E,realAllChecked:C,selectRealAll:oe,allCheckedAlertVisible:ne,clearSelection:T,toggleAllChecked:N,toggleSelect:U,total:c,checked:B,selectAll:le}=je(y),K=e=>{const o=L.query.q;Me(ee,o?`/aichats?page=${e}&q=${o}`:`/aichats?page=${e}`)},{keyDown:Q,keyUp:P}=We(c,g,A,le,T,K,()=>{V(C.value,v.value,_.value)}),{loading:ie,fetch:$}=Ae({handle:(e,o)=>{o?Ve(Y(o),"error"):e&&(y.value=e.aiChats,c.value=e.aiChatCount)},document:Ee,variables:()=>({offset:(A.value-1)*g,limit:g,query:_.value}),appApi:!0});function ce(e){return e?`/aichats?q=${e}`:"/aichats"}const z=e=>{e.type===r&&(T(),$())},H=e=>{e.type===r&&$()};Te(()=>{var e;_.value=Qe(((e=M.q)==null?void 0:e.toString())??""),x(S,_.value),ae(),$(),k.on("item_tags_updated",H),k.on("items_tags_updated",z),window.addEventListener("keydown",Q),window.addEventListener("keyup",P)}),qe(()=>{k.off("item_tags_updated",H),k.off("items_tags_updated",z),window.removeEventListener("keydown",Q),window.removeEventListener("keyup",P)});function de(e){j(`/aichats/${e.id}`)}function re(){j("/aichats/create")}function ue(e){W(ze,{id:e.id,name:e.id,gql:Pe` + mutation DeleteAIChat($query: String!) { + deleteAIChats(query: $query) + } + `,variables:()=>({query:`ids:${e.id}`}),appApi:!0,typeName:"AIChat",done:()=>{c.value--,e.tags.length&&k.emit("refetch_tags",r)}})}function _e(e){W(He,{type:r,tags:b.value,item:{key:e.id,title:"",size:0},selected:b.value.filter(o=>e.tags.some(q=>q.id===o.id))})}return(e,o)=>{const q=Oe,F=Re,G=Fe,pe=Xe,he=Ge,me=Je,ge=ve,p=Ne("tooltip");return n(),l(D,null,[a("div",tt,[a("div",at,i(e.$t("page_title.aichats"))+" ("+i(t(c).toLocaleString())+")",1),a("div",st,[d(q,{filter:S,tags:t(b),"get-url":ce},null,8,["filter","tags"]),t(B)?(n(),l(D,{key:0},[m((n(),l("button",{class:"btn-icon",onClick:o[0]||(o[0]=u(s=>t(V)(t(v),t(C),t(c),_.value),["stop"]))},[ot,d(F)])),[[p,e.$t("delete")]]),m((n(),l("button",{class:"btn-icon",onClick:o[1]||(o[1]=u(s=>t(se)(t(v),t(C),_.value),["stop"]))},[nt,d(G)])),[[p,e.$t("add_to_tags")]])],64)):f("",!0),a("md-outlined-button",{class:"btn-sm",onClick:u(re,["prevent"])},i(e.$t("new_chat")),1)])]),d(pe,{limit:g,total:t(c),"all-checked-alert-visible":t(ne),"real-all-checked":t(C),"select-real-all":t(oe),"clear-selection":t(T)},null,8,["total","all-checked-alert-visible","real-all-checked","select-real-all","clear-selection"]),a("div",lt,[a("table",it,[a("thead",null,[a("tr",null,[a("th",null,[a("md-checkbox",{"touch-target":"wrapper",onChange:o[2]||(o[2]=(...s)=>t(N)&&t(N)(...s)),checked:t(E),indeterminate:!t(E)&&t(B)},null,40,ct)]),t(w).developerMode?(n(),l("th",dt,"ID")):f("",!0),a("th",null,i(e.$t("content")),1),rt,a("th",null,i(e.$t("tags")),1),a("th",null,i(e.$t("updated_at")),1),a("th",null,i(e.$t("created_at")),1)])]),a("tbody",null,[(n(!0),l(D,null,Ie(y.value,(s,J)=>(n(),l("tr",{key:s.id,class:Ue({selected:t(v).includes(s.id)}),onClick:u(h=>t(U)(h,s,J),["stop"])},[a("td",null,[a("md-checkbox",{"touch-target":"wrapper",onChange:h=>t(U)(h,s,J),checked:t(v).includes(s.id)},null,40,_t)]),t(w).developerMode?(n(),l("td",pt,[d(he,{id:s.id,raw:s},null,8,["id","raw"])])):f("",!0),a("td",null,[a("a",{href:"#",onClick:u(h=>de(s),["prevent"])},i(t(Be)(s.content,{length:200,omission:""})),9,ht)]),a("td",mt,[a("div",gt,[m((n(),l("button",{class:"btn-icon sm",onClick:u(h=>ue(s),["stop"])},[ft,d(F)],8,vt)),[[p,e.$t("delete")]]),m((n(),l("button",{class:"btn-icon sm",onClick:u(h=>_e(s),["stop"])},[yt,d(G)],8,kt)),[[p,e.$t("add_to_tags")]])])]),a("td",null,[d(me,{tags:s.tags,type:t(r)},null,8,["tags","type"])]),a("td",bt,[m((n(),l("time",null,[X(i(t(Z)(s.updatedAt)),1)])),[[p,t(O)(s.updatedAt)]])]),a("td",Ct,[m((n(),l("time",null,[X(i(t(Z)(s.updatedAt)),1)])),[[p,t(O)(s.createdAt)]])])],10,ut))),128))]),y.value.length?f("",!0):(n(),l("tfoot",$t,[a("tr",null,[a("td",{colspan:t(w).developerMode?7:6},[a("div",At,i(e.$t(t(Ke)(t(ie)))),1)],8,wt)])]))])]),t(c)>g?(n(),De(ge,{key:0,page:A.value,go:K,total:t(c),limit:g},null,8,["page","total"])):f("",!0)],64)}}});export{Ut as default}; diff --git a/app/src/main/resources/web/assets/AppsSidebar-Cx4xjM1r.js b/app/src/main/resources/web/assets/AppsSidebar-Cx4xjM1r.js deleted file mode 100644 index 864dbe6f..00000000 --- a/app/src/main/resources/web/assets/AppsSidebar-Cx4xjM1r.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as b}from"./LeftSidebar.vuevuetypescriptsetuptruelang-CF3KQ8wQ.js";import{d as w,u as L,s as T,i as A,I as N,h as k,K as Q,k as V,v as R,q as g,aq as z,a5 as S,$ as I,o as r,V as M,t,a,w as p,N as u,m as l,c as m,e as v,a6 as D,f as h,a7 as E}from"./index-BxNI00MG.js";import{u as G}from"./search-D1_YTViL.js";import"./sidebar-JKGKmRjc.js";const K={class:"nav"},P={class:"title"},j={key:0,class:"count"},x={class:"title"},F={key:0,class:"count"},H={class:"title"},J={key:0,class:"count"},Z=w({__name:"AppsSidebar",setup(O){const y=L(),{counter:o}=T(A()),{parseQ:C}=G(),_=N({tagIds:[]}),n=k(""),i=k(-1),{fetch:$}=Q({handle:e=>{e&&(o.value.packages=e.total,o.value.packagesSystem=e.system,i.value=e.total-e.system)},document:z,variables:()=>({}),appApi:!0});function d(){var c;const e=S.currentRoute.value,s=I(((c=e.query.q)==null?void 0:c.toString())??"");C(_,s),n.value=_.type??"",$()}function f(e){const s=D([{name:"type",op:"",value:e}]);h(y,`/apps?q=${E(s)}`)}function q(){h(y,"/apps")}return d(),V(()=>S.currentRoute.value,()=>{d()}),(e,s)=>{const c=b;return r(),R(c,null,{title:g(()=>[M(t(e.$t("page_title.apps")),1)]),body:g(()=>[a("ul",K,[a("li",{onClick:p(q,["prevent"]),class:u({active:!n.value})},[a("span",P,t(e.$t("all")),1),l(o).packages>=0?(r(),m("span",j,t(l(o).packages.toLocaleString()),1)):v("",!0)],2),a("li",{onClick:s[0]||(s[0]=p(B=>f("user"),["prevent"])),class:u({active:n.value==="user"})},[a("span",x,t(e.$t("app_type.user")),1),i.value>=0?(r(),m("span",F,t(i.value.toLocaleString()),1)):v("",!0)],2),a("li",{onClick:s[1]||(s[1]=p(B=>f("system"),["prevent"])),class:u({active:n.value==="system"})},[a("span",H,t(e.$t("app_type.system")),1),l(o).packagesSystem>=0?(r(),m("span",J,t(l(o).packagesSystem.toLocaleString()),1)):v("",!0)],2)])]),_:1})}}});export{Z as default}; diff --git a/app/src/main/resources/web/assets/AppsSidebar-DG23idl0.js b/app/src/main/resources/web/assets/AppsSidebar-DG23idl0.js new file mode 100644 index 00000000..a0692e68 --- /dev/null +++ b/app/src/main/resources/web/assets/AppsSidebar-DG23idl0.js @@ -0,0 +1 @@ +import{_ as b}from"./LeftSidebar.vuevuetypescriptsetuptruelang-B6Ke7euJ.js";import{d as w,u as L,s as T,i as A,I as N,h as k,K as Q,k as V,v as R,q as g,ar as z,a6 as S,a0 as I,o as r,V as M,t,a,w as p,N as u,m as l,c as m,e as v,a7 as D,f as h,a8 as E}from"./index-Dn0O6zoH.js";import{u as G}from"./search-DrT1IjAg.js";const K={class:"nav"},P={class:"title"},j={key:0,class:"count"},x={class:"title"},F={key:0,class:"count"},H={class:"title"},J={key:0,class:"count"},Y=w({__name:"AppsSidebar",setup(O){const y=L(),{counter:o}=T(A()),{parseQ:C}=G(),_=N({tagIds:[]}),n=k(""),i=k(-1),{fetch:$}=Q({handle:e=>{e&&(o.value.packages=e.total,o.value.packagesSystem=e.system,i.value=e.total-e.system)},document:z,variables:()=>({}),appApi:!0});function d(){var c;const e=S.currentRoute.value,s=I(((c=e.query.q)==null?void 0:c.toString())??"");C(_,s),n.value=_.type??"",$()}function f(e){const s=D([{name:"type",op:"",value:e}]);h(y,`/apps?q=${E(s)}`)}function B(){h(y,"/apps")}return d(),V(()=>S.currentRoute.value,()=>{d()}),(e,s)=>{const c=b;return r(),R(c,null,{title:g(()=>[M(t(e.$t("page_title.apps")),1)]),body:g(()=>[a("ul",K,[a("li",{onClick:p(B,["prevent"]),class:u({active:!n.value})},[a("span",P,t(e.$t("all")),1),l(o).packages>=0?(r(),m("span",j,t(l(o).packages.toLocaleString()),1)):v("",!0)],2),a("li",{onClick:s[0]||(s[0]=p(q=>f("user"),["prevent"])),class:u({active:n.value==="user"})},[a("span",x,t(e.$t("app_type.user")),1),i.value>=0?(r(),m("span",F,t(i.value.toLocaleString()),1)):v("",!0)],2),a("li",{onClick:s[1]||(s[1]=p(q=>f("system"),["prevent"])),class:u({active:n.value==="system"})},[a("span",H,t(e.$t("app_type.system")),1),l(o).packagesSystem>=0?(r(),m("span",J,t(l(o).packagesSystem.toLocaleString()),1)):v("",!0)],2)])]),_:1})}}});export{Y as default}; diff --git a/app/src/main/resources/web/assets/AppsView-BPsl90WZ.js b/app/src/main/resources/web/assets/AppsView-BPsl90WZ.js new file mode 100644 index 00000000..aae14cfb --- /dev/null +++ b/app/src/main/resources/web/assets/AppsView-BPsl90WZ.js @@ -0,0 +1 @@ +import{_ as Pe}from"./VPagination.vuevuetypescriptsetuptruelang-CFupeDJR.js";import{a1 as F,d as Ve,s as W,i as xe,ag as Fe,u as Me,h as V,g as Te,I as Ke,ah as Ne,J as Qe,K as Z,j as ze,L as Ge,M as Re,c as l,a,m as t,t as i,x as k,w as r,p as _,e as $,V as S,q as ee,N as te,O as w,P as x,v as je,Q as He,f as Oe,C as Je,ai as Xe,aj as Ye,ak as We,al as Ze,am as et,S as tt,o,E as st,an as se,U as ae,X as at,F as nt,G as ot,Y as lt,ao as it,ap as ct,a0 as dt,aq as pt,a3 as ut,ae as rt,H as _t}from"./index-Dn0O6zoH.js";import{_ as vt,a as ht}from"./SearchInput-aem6tEJK.js";import{_ as kt}from"./sort-rounded-BSs7VajO.js";import{u as mt,a as gt}from"./key-events-CgPzNP0J.js";import{u as ft}from"./search-DrT1IjAg.js";import"./search-rounded-C8Nl_ZR1.js";import"./rss-feed-rounded-Dqku7i1k.js";const ne=p=>{F.emit("tap_phone",p)};function yt(p,I){const m=p.findIndex(A=>A.id===I);m!==-1&&p.splice(m,1)}const f=p=>(nt("data-v-e16c47d6"),p=p(),ot(),p),bt={class:"top-app-bar"},wt=["checked","indeterminate"],Ct={class:"title"},$t={key:0},St={key:1},It=f(()=>a("md-ripple",null,null,-1)),At={class:"actions"},Dt=f(()=>a("md-ripple",null,null,-1)),Lt={class:"btn-icon btn-sort"},Ut=f(()=>a("md-ripple",null,null,-1)),qt={class:"menu-items"},Bt=["onClick","selected"],Et={slot:"headline"},Pt={class:"scroll-content"},Vt=["onClick","onMouseover"],xt={class:"start"},Ft=["onClick","checked"],Mt=["onClick","checked"],Tt={class:"number"},Kt=["src"],Nt={class:"title"},Qt={class:"subtitle"},zt={class:"actions"},Gt={indeterminate:"",class:"spinner-sm"},Rt=["onClick"],jt=["onClick"],Ht=f(()=>a("md-ripple",null,null,-1)),Ot=["onClick"],Jt=f(()=>a("md-ripple",null,null,-1)),Xt={class:"time"},Yt={class:"start"},Wt=f(()=>a("div",{class:"checkbox"},[a("div",{class:"skeleton-checkbox"})],-1)),Zt={class:"number"},es=lt('
.001){L=!1;break}}let k=!0;return L&&v.width!==D&&(k=!1),v.width>b.width&&(k=!1),new VD({pixelRatio:Pf.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,fontVariationSettings:e.fontVariationSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:L,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:k,spaceWidth:r.width,middotWidth:C.width,wsmiddotWidth:S.width,maxDigitWidth:E},!0)}}class UT{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}const HD=new zV;var ar;(function(o){o.serviceIds=new Map,o.DI_TARGET="$di$target",o.DI_DEPENDENCIES="$di$dependencies";function e(t){return t[o.DI_DEPENDENCIES]||[]}o.getServiceDependencies=e})(ar||(ar={}));const Me=Je("instantiationService");function UV(o,e,t){e[ar.DI_TARGET]===e?e[ar.DI_DEPENDENCIES].push({id:o,index:t}):(e[ar.DI_DEPENDENCIES]=[{id:o,index:t}],e[ar.DI_TARGET]=e)}function Je(o){if(ar.serviceIds.has(o))return ar.serviceIds.get(o);const e=function(t,i,n){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");UV(e,t,n)};return e.toString=()=>o,ar.serviceIds.set(o,e),e}const ut=Je("codeEditorService");function zp(o,e){if(!o)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}function k1(o,e="Unreachable"){throw new Error(e)}function WE(o){if(!o()){debugger;o(),Oe(new bg("Assertion Failed"))}}function Q4(o,e){let t=0;for(;t .001){L=!1;break}}let k=!0;return L&&v.width!==D&&(k=!1),v.width>b.width&&(k=!1),new VD({pixelRatio:Pf.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,fontVariationSettings:e.fontVariationSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:L,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:k,spaceWidth:r.width,middotWidth:C.width,wsmiddotWidth:S.width,maxDigitWidth:E},!0)}}class UT{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}const HD=new zV;var ar;(function(o){o.serviceIds=new Map,o.DI_TARGET="$di$target",o.DI_DEPENDENCIES="$di$dependencies";function e(t){return t[o.DI_DEPENDENCIES]||[]}o.getServiceDependencies=e})(ar||(ar={}));const Me=Je("instantiationService");function UV(o,e,t){e[ar.DI_TARGET]===e?e[ar.DI_DEPENDENCIES].push({id:o,index:t}):(e[ar.DI_DEPENDENCIES]=[{id:o,index:t}],e[ar.DI_TARGET]=e)}function Je(o){if(ar.serviceIds.has(o))return ar.serviceIds.get(o);const e=function(t,i,n){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");UV(e,t,n)};return e.toString=()=>o,ar.serviceIds.set(o,e),e}const ut=Je("codeEditorService");function zp(o,e){if(!o)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}function k1(o,e="Unreachable"){throw new Error(e)}function WE(o){if(!o()){debugger;o(),Oe(new bg("Assertion Failed"))}}function X4(o,e){let t=0;for(;t =8234&&o<=8238||o>=8294&&o<=8297||o>=8206&&o<=8207||o===1564}function Yz(o,e){const t=[];let i=new Oi(0,"",0,!1),n=0;for(const s of e){const r=s.endIndex;for(;n=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));const i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{const n=i.range.getStartPosition();this._editor.setPosition(n),this._editor.revealRangeInCenter(i.range,t),this._updateAccessibilityState(n.lineNumber,!0)}finally{this.ignoreSelectionChange=!1}}_updateAccessibilityState(e,t){var i;const n=(i=this._editor.getModel())===null||i===void 0?void 0:i.modified;if(!n)return;const s=n.getLineDecorations(e).find(a=>a.options.className==="line-insert");if(s)this._audioCueService.playAudioCue(bt.diffLineModified,!0);else if(t)this._audioCueService.playAudioCue(bt.diffLineDeleted,!0);else return;const r=this._codeEditorService.getActiveCodeEditor();t&&r&&s&&this._accessibilityService.isScreenReaderOptimized()&&(r.setSelection({startLineNumber:e,startColumn:0,endLineNumber:e,endColumn:Number.MAX_VALUE}),r.writeScreenReaderContent("diff-navigation"))}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this.canNavigateNext()&&this._move(!0,e)}previous(e=0){this.canNavigatePrevious()&&this._move(!1,e)}canNavigateNext(){return this.canNavigateLoop()||this.nextIdx=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));const i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{const n=i.range.getStartPosition();this._editor.setPosition(n),this._editor.revealRangeInCenter(i.range,t),this._updateAccessibilityState(n.lineNumber,!0)}finally{this.ignoreSelectionChange=!1}}_updateAccessibilityState(e,t){var i;const n=(i=this._editor.getModel())===null||i===void 0?void 0:i.modified;if(!n)return;const s=n.getLineDecorations(e).find(a=>a.options.className==="line-insert");if(s)this._audioCueService.playAudioCue(bt.diffLineModified,!0);else if(t)this._audioCueService.playAudioCue(bt.diffLineDeleted,!0);else return;const r=this._codeEditorService.getActiveCodeEditor();t&&r&&s&&this._accessibilityService.isScreenReaderOptimized()&&(r.setSelection({startLineNumber:e,startColumn:0,endLineNumber:e,endColumn:Number.MAX_VALUE}),r.writeScreenReaderContent("diff-navigation"))}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this.canNavigateNext()&&this._move(!0,e)}previous(e=0){this.canNavigatePrevious()&&this._move(!1,e)}canNavigateNext(){return this.canNavigateLoop()||this.nextIdx=0&&i.push(a);for(const a of r.close)a.indexOf(o)>=0&&i.push(a)}}function nF(o,e){return o.length-e.length}function B1(o){if(o.length<=1)return o;const e=[],t=new Set;for(const i of o)t.has(i)||(e.push(i),t.add(i));return e}function aH(o,e,t,i){let n=[];n=n.concat(o),n=n.concat(e);for(let s=0,r=n.length;s=e&&n>=i&&this.ElementsAreEqual(t,n);)t--,n--;if(e>t||i>n){let h;return i<=n?(cu.Assert(e===t+1,"originalStart should only be one more than originalEnd"),h=[new Hl(e,0,i,n-i+1)]):e<=t?(cu.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),h=[new Hl(e,t-e+1,i,0)]):(cu.Assert(e===t+1,"originalStart should only be one more than originalEnd"),cu.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),h=[]),h}const r=[0],a=[0],l=this.ComputeRecursionPoint(e,t,i,n,r,a,s),d=r[0],c=a[0];if(l!==null)return l;if(!s[0]){const h=this.ComputeDiffRecursive(e,d,i,c,s);let u=[];return s[0]?u=[new Hl(d+1,t-(d+1)+1,c+1,n-(c+1)+1)]:u=this.ComputeDiffRecursive(d+1,t,c+1,n,s),this.ConcatenateChanges(h,u)}return[new Hl(e,t-e+1,i,n-i+1)]}WALKTRACE(e,t,i,n,s,r,a,l,d,c,h,u,f,p,m,_,b,v){let C=null,S=null,x=new dM,E=t,L=i,D=f[0]-_[0]-n,k=-1073741824,R=this.m_forwardHistory.length-1;do{const P=D+e;P===E||P=0&&i.push(a);for(const a of r.close)a.indexOf(o)>=0&&i.push(a)}}function nF(o,e){return o.length-e.length}function B1(o){if(o.length<=1)return o;const e=[],t=new Set;for(const i of o)t.has(i)||(e.push(i),t.add(i));return e}function aH(o,e,t,i){let n=[];n=n.concat(o),n=n.concat(e);for(let s=0,r=n.length;s=e&&n>=i&&this.ElementsAreEqual(t,n);)t--,n--;if(e>t||i>n){let h;return i<=n?(cu.Assert(e===t+1,"originalStart should only be one more than originalEnd"),h=[new Hl(e,0,i,n-i+1)]):e<=t?(cu.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),h=[new Hl(e,t-e+1,i,0)]):(cu.Assert(e===t+1,"originalStart should only be one more than originalEnd"),cu.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),h=[]),h}const r=[0],a=[0],l=this.ComputeRecursionPoint(e,t,i,n,r,a,s),d=r[0],c=a[0];if(l!==null)return l;if(!s[0]){const h=this.ComputeDiffRecursive(e,d,i,c,s);let u=[];return s[0]?u=[new Hl(d+1,t-(d+1)+1,c+1,n-(c+1)+1)]:u=this.ComputeDiffRecursive(d+1,t,c+1,n,s),this.ConcatenateChanges(h,u)}return[new Hl(e,t-e+1,i,n-i+1)]}WALKTRACE(e,t,i,n,s,r,a,l,d,c,h,u,f,p,m,_,b,v){let C=null,S=null,x=new dM,E=t,L=i,D=f[0]-_[0]-n,k=-1073741824,R=this.m_forwardHistory.length-1;do{const P=D+e;P===E||P>0);t[s]>=e?n=s-1:t[s+1]>=e?(i=s,n=s):i=s+1}return i+1}}class R0{static findMatches(e,t,i,n,s){const r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,i,new Hu(r.wordSeparators,r.regex),n,s):this._doFindMatchesLineByLine(e,i,r,n,s):[]}static _getMultilineMatchRange(e,t,i,n,s,r){let a,l=0;n?(l=n.findLineFeedCountBeforeOffset(s),a=t+s+l):a=t+s;let d;if(n){const f=n.findLineFeedCountBeforeOffset(s+r.length)-l;d=a+r.length+f}else d=a+r.length;const c=e.getPositionAt(a),h=e.getPositionAt(d);return new y(c.lineNumber,c.column,h.lineNumber,h.column)}static _doFindMatchesMultiline(e,t,i,n,s){const r=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l=e.getEOL()===`\r
`?new cM(a):null,d=[];let c=0,h;for(i.reset(0);h=i.next(a);)if(d[c++]=xc(this._getMultilineMatchRange(e,r,a,l,h.index,h[0]),h,n),c>=s)return d;return d}static _doFindMatchesLineByLine(e,t,i,n,s){const r=[];let a=0;if(t.startLineNumber===t.endLineNumber){const d=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return a=this._findMatchesInLine(i,d,t.startLineNumber,t.startColumn-1,a,r,n,s),r}const l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);a=this._findMatchesInLine(i,l,t.startLineNumber,t.startColumn-1,a,r,n,s);for(let d=t.startLineNumber+1;d0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){const t=this._tokens[(e<<1)+1],i=rn.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[(e<<1)+1];return rn.getTokenType(t)}getForeground(e){const t=this._tokens[(e<<1)+1];return rn.getForeground(t)}getClassName(e){const t=this._tokens[(e<<1)+1];return rn.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[(e<<1)+1];return rn.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[(e<<1)+1];return rn.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return Ei.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new ZE(this,e,t,i)}static convertToEndOffset(e,t){const n=(e.length>>>1)-1;for(let s=0;s