@acedatacloud/nexior 1.11.3 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{Auth.453cf70d.js → Auth.94228c03.js} +1 -1
- package/dist/assets/Buy.94dc73fe.js +1 -0
- package/dist/assets/{Callback.f1fd624d.js → Callback.b04964dc.js} +1 -1
- package/dist/assets/{Chatdoc.94a9c044.js → Chatdoc.4a0e87f3.js} +1 -1
- package/dist/assets/{Console.c5f4ce76.js → Console.2ddbf026.js} +1 -1
- package/dist/assets/Conversation.79104f0c.js +1 -0
- package/dist/assets/{Conversation.f9831852.js → Conversation.c860b132.js} +1 -1
- package/dist/assets/{CopyToClipboard.71209e34.js → CopyToClipboard.89729339.js} +1 -1
- package/dist/assets/{DarkSelector.e9845902.js → DarkSelector.d20d99ed.js} +1 -1
- package/dist/assets/Detail.be7e736d.js +1 -0
- package/dist/assets/{History.5bfd5179.js → History.f72e2907.js} +1 -1
- package/dist/assets/Index.095b23fd.js +1 -0
- package/dist/assets/{Index.d4be5d51.js → Index.0da4fc1d.js} +1 -1
- package/dist/assets/Index.3587d8c2.js +1 -0
- package/dist/assets/{Index.b82bb133.js → Index.9adaabcc.js} +1 -1
- package/dist/assets/Index.b691fe62.js +1 -0
- package/dist/assets/Index.e0ad7405.js +1 -0
- package/dist/assets/{InfoIcon.82b01ea6.js → InfoIcon.33d1dd46.js} +1 -1
- package/dist/assets/{Invitees.12cf4df7.js → Invitees.abfc6ddb.js} +1 -1
- package/dist/assets/List.853003a9.js +1 -0
- package/dist/assets/{List.f9d3cd13.js → List.a575b34d.js} +1 -1
- package/dist/assets/{List.7bc1124b.js → List.def7db04.js} +1 -1
- package/dist/assets/{Login.e8d49bcc.js → Login.ade5872f.js} +1 -1
- package/dist/assets/{Main.ed3e68a2.js → Main.0491d91a.js} +1 -1
- package/dist/assets/{Manage.4369d464.js → Manage.f5511170.js} +1 -1
- package/dist/assets/Navigator.8fa888d6.js +1 -0
- package/dist/assets/{Pagination.2c631d96.js → Pagination.5f191b6e.js} +1 -1
- package/dist/assets/{Setting.fe85c9dc.js → Setting.3337278e.js} +1 -1
- package/dist/assets/{Status.099c1bcd.js → Status.04245320.js} +2 -2
- package/dist/assets/{distribution.7367cc99.js → distribution.93529896.js} +1 -1
- package/dist/assets/{index.df46b33d.js → index.5e521e48.js} +3 -3
- package/dist/assets/order.50f045ad.js +1 -0
- package/dist/assets/site.02599324.js +1 -0
- package/dist/assets/site.1e909d91.js +1 -0
- package/dist/assets/site.27fc9f24.js +1 -0
- package/dist/assets/site.3817abb8.js +1 -0
- package/dist/assets/site.48168b7e.js +1 -0
- package/dist/assets/site.597a4889.js +1 -0
- package/dist/assets/site.59f9e1a5.js +1 -0
- package/dist/assets/site.5a181210.js +1 -0
- package/dist/assets/site.5dfda6a3.js +1 -0
- package/dist/assets/site.8b6a9594.js +1 -0
- package/dist/assets/site.8de35083.js +1 -0
- package/dist/assets/site.922474e0.js +1 -0
- package/dist/assets/site.ba7f1019.js +1 -0
- package/dist/assets/site.c085010a.js +1 -0
- package/dist/assets/site.d945dada.js +1 -0
- package/dist/assets/site.e3f6bde9.js +1 -0
- package/dist/assets/site.f2218f75.js +1 -0
- package/dist/assets/site.f7d8c244.js +1 -0
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/Buy.89aa93bb.js +0 -1
- package/dist/assets/Conversation.d7c4a2ea.js +0 -1
- package/dist/assets/Detail.85ac51b2.js +0 -1
- package/dist/assets/Index.490143c7.js +0 -1
- package/dist/assets/Index.753e0c70.js +0 -1
- package/dist/assets/Index.dddbe1c7.js +0 -1
- package/dist/assets/Index.eddf152e.js +0 -1
- package/dist/assets/List.26da6eff.js +0 -1
- package/dist/assets/Navigator.fe500031.js +0 -1
- package/dist/assets/order.27465034.js +0 -1
- package/dist/assets/site.02eea4da.js +0 -1
- package/dist/assets/site.03d26c90.js +0 -1
- package/dist/assets/site.09c8d2a8.js +0 -1
- package/dist/assets/site.276cde20.js +0 -1
- package/dist/assets/site.302ab07b.js +0 -1
- package/dist/assets/site.3d0fe4f0.js +0 -1
- package/dist/assets/site.4624e196.js +0 -1
- package/dist/assets/site.467f2c16.js +0 -1
- package/dist/assets/site.7dd16dc8.js +0 -1
- package/dist/assets/site.a1c27af2.js +0 -1
- package/dist/assets/site.afd69504.js +0 -1
- package/dist/assets/site.bc73cc2e.js +0 -1
- package/dist/assets/site.cb092182.js +0 -1
- package/dist/assets/site.cfcaea0b.js +0 -1
- package/dist/assets/site.e44c6b5f.js +0 -1
- package/dist/assets/site.f0341185.js +0 -1
- package/dist/assets/site.f1941c36.js +0 -1
- package/dist/assets/site.f9d11f3b.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-others.2dd9c8c5.js";import{_}from"./index.
|
|
1
|
+
import"./vendor-others.2dd9c8c5.js";import{_}from"./index.5e521e48.js";import{a as s,b as c}from"./vendor-element-plus.b03cf0f5.js";import{H as i,al as e,L as p,M as o,o as l,V as t}from"./vendor-@vue.ed4a7688.js";import"./vendor-axios.168e6950.js";import"./vendor-fortawesome.41690bc6.js";const u=i({name:"LayoutAuth",components:{ElContainer:s,ElMain:c}});function m(d,f,v,h,x,w){const n=e("router-view"),r=e("el-main"),a=e("el-container");return l(),p(a,null,{default:o(()=>[t(r,null,{default:o(()=>[t(n)]),_:1})]),_:1})}var B=_(u,[["render",m],["__scopeId","data-v-8e16c232"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Auth.vue"]]);export{B as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var U=Object.defineProperty,z=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var I=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var w=(e,a,t)=>a in e?U(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,N=(e,a)=>{for(var t in a||(a={}))H.call(a,t)&&w(e,t,a[t]);if(I)for(var t of I(a))Q.call(a,t)&&w(e,t,a[t]);return e},S=(e,a)=>z(e,G(a));import"./vendor-others.2dd9c8c5.js";import{_ as O,w as W,x as j}from"./index.5e521e48.js";import{g as V,o as J}from"./order.50f045ad.js";import{H as F,o as r,e as g,U as p,al as l,L as k,M as i,V as o,f as K,T as E,ai as X,W as Y,S as C,Q as R}from"./vendor-@vue.ed4a7688.js";import{u as Z,n as x,o as ee,s as ae,B as te,C as ie,i as oe,w as re,D as se,F as ne,G as le}from"./vendor-element-plus.b03cf0f5.js";import"./vendor-axios.168e6950.js";import"./vendor-fortawesome.41690bc6.js";const pe=F({name:"ApiPrice",props:{price:{type:Number,required:!1,default:0},unit:{type:String,required:!1,default:void 0},start:{type:Boolean,required:!1,default:!1}},methods:{getPriceString:V}}),ce={class:"price-text"},de={key:0,class:"unfree"},ue={key:1,class:"free"};function me(e,a,t,c,u,v){return r(),g("div",ce,[e.price>0?(r(),g("span",de,p(e.getPriceString({value:e.price}))+" "+p(e.unit?` / ${e.unit}`:"")+p(e.start?e.$t("common.message.startPrice"):""),1)):(r(),g("span",ue,p(e.$t("common.message.free")),1))])}var fe=O(pe,[["render",me],["__scopeId","data-v-d195ccd6"],["__file","/home/runner/work/Nexior/Nexior/src/components/common/Price.vue"]]);const _e=F({name:"ConsoleApplicationBuy",components:{ElSkeleton:Z,ElRow:x,ElCol:ee,ElCard:ae,ElForm:te,ElFormItem:ie,ElButton:oe,ElDivider:re,ElRadioGroup:se,ElRadioButton:ne,Price:fe},data(){return{application:void 0,loading:!1,form:{packageId:void 0,amount:void 0},creating:!1}},computed:{id(){var e,a;return(a=(e=this.$route.params)==null?void 0:e.id)==null?void 0:a.toString()},price(){var e,a,t;return((a=(e=this.application)==null?void 0:e.service)==null?void 0:a.price)&&this.form.amount?this.form.amount*((t=this.application.service)==null?void 0:t.price):0},package(){var e,a,t;if(((a=(e=this.application)==null?void 0:e.service)==null?void 0:a.packages)&&this.form.packageId){const c=(t=this.application.service)==null?void 0:t.packages.filter(u=>u.id===this.form.packageId);if(c.length>0)return c[0]}}},mounted(){this.onFetchApplication()},methods:{getPriceString:V,onFetchApplication(){this.loading=!0,W.get(this.id).then(({data:e})=>{var a,t,c,u;this.application=e,this.loading=!1,this.form.packageId=(u=(c=(t=(a=this.application)==null?void 0:a.service)==null?void 0:t.packages)==null?void 0:c[0])==null?void 0:u.id}).catch(()=>{this.loading=!1})},onCreateOrder(){var a,t,c,u,v,m,f,$;if(!((a=this.application)!=null&&a.id))return;this.creating=!0;const e=this.$t(`service.unit.${(c=(t=this.application)==null?void 0:t.service)==null?void 0:c.unit}s`);J.create(S(N({application_id:(u=this.application)==null?void 0:u.id,amount:(v=this.package)==null?void 0:v.amount},this.form.packageId!=="custom"&&this.package?{package_id:this.package.id}:{}),{description:`${(f=(m=this.application)==null?void 0:m.service)==null?void 0:f.title} x ${($=this.package)==null?void 0:$.amount} ${e}`})).then(({data:_})=>{this.creating=!1;const b=_;this.$router.push({name:j,params:{id:b.id}})}).catch(()=>{le.error(this.$t("order.message.createFailed")),this.creating=!1})}}}),ge={class:"title"},he={key:0,class:"ml-2"},ke={key:1,class:R({price:!0,free:!0})};function ve(e,a,t,c,u,v){const m=l("el-col"),f=l("el-row"),$=l("el-skeleton"),_=l("el-form-item"),b=l("el-radio-button"),A=l("el-radio-group"),D=l("price"),L=l("el-divider"),T=l("el-button"),q=l("el-form"),M=l("el-card");return r(),k(f,{class:"panel"},{default:i(()=>[o(m,{span:24},{default:i(()=>[o(f,null,{default:i(()=>[o(m,{span:24},{default:i(()=>[K("h2",ge,p(e.$t("common.title.buyMore")),1)]),_:1})]),_:1}),o(f,null,{default:i(()=>[o(m,{span:24},{default:i(()=>[o(M,{shadow:"hover"},{default:i(()=>[o(f,null,{default:i(()=>[o(m,{span:16,offset:4},{default:i(()=>[e.loading?(r(),k($,{key:0})):e.application?(r(),k(q,{key:1,"label-width":"100px"},{default:i(()=>[o(_,{label:e.$t("application.field.service")},{default:i(()=>{var s,n;return[E(p((n=(s=e.application)==null?void 0:s.service)==null?void 0:n.title),1)]}),_:1},8,["label"]),o(_,{label:e.$t("application.field.package")},{default:i(()=>{var s,n;return[(n=(s=e.application)==null?void 0:s.service)!=null&&n.packages?(r(),k(A,{key:0,modelValue:e.form.packageId,"onUpdate:modelValue":a[0]||(a[0]=d=>e.form.packageId=d)},{default:i(()=>{var d;return[(r(!0),g(Y,null,X((d=e.application)==null?void 0:d.service.packages,(h,y)=>(r(),k(b,{key:y,label:h.id,class:"mb-2"},{default:i(()=>{var B,P;return[E(p(h.amount)+" "+p(e.$t(`service.unit.${(P=(B=e.application)==null?void 0:B.service)==null?void 0:P.unit}s`)),1)]}),_:2},1032,["label"]))),128))]}),_:1},8,["modelValue"])):C("v-if",!0)]}),_:1},8,["label"]),o(_,{label:e.$t("service.field.price")},{default:i(()=>{var s,n,d,h,y;return[o(D,{price:(s=e.package)==null?void 0:s.price},null,8,["price"]),e.package?(r(),g("span",he,"("+p(e.getPriceString({value:((n=e.package)==null?void 0:n.price)/((d=e.package)==null?void 0:d.amount)})+" / "+e.$t(`service.unit.${(y=(h=e.application)==null?void 0:h.service)==null?void 0:y.unit}`))+") ",1)):C("v-if",!0)]}),_:1},8,["label"]),o(L,{"border-style":"dashed"}),o(_,{label:e.$t("application.field.shouldPayPrice")},{default:i(()=>{var s,n,d;return[e.package?(r(),g("span",{key:0,class:R({price:!0,unfree:((s=e.package)==null?void 0:s.price)>0,free:((n=e.package)==null?void 0:n.price)===0})},p(e.getPriceString({value:(d=e.package)==null?void 0:d.price})),3)):(r(),g("span",ke," $ 0 "))]}),_:1},8,["label"]),o(_,null,{default:i(()=>[o(T,{type:"primary",size:"large",class:"btn-create",loading:e.creating,round:"",onClick:e.onCreateOrder},{default:i(()=>[E(p(e.$t("application.button.createOrder")),1)]),_:1},8,["loading","onClick"])]),_:1})]),_:1})):C("v-if",!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}var we=O(_e,[["render",ve],["__scopeId","data-v-5881dfca"],["__file","/home/runner/work/Nexior/Nexior/src/pages/console/application/Buy.vue"]]);export{we as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-others.2dd9c8c5.js";import{_ as r}from"./index.
|
|
1
|
+
import"./vendor-others.2dd9c8c5.js";import{_ as r}from"./index.5e521e48.js";import{H as t}from"./vendor-@vue.ed4a7688.js";import"./vendor-element-plus.b03cf0f5.js";import"./vendor-axios.168e6950.js";import"./vendor-fortawesome.41690bc6.js";const a=t({name:"AuthCallback",data(){var e;return{redirect:(e=this.$route.query.redirect)==null?void 0:e.toString()}},async mounted(){this.redirect&&await this.$router.push(this.redirect)}});var p=r(a,[["__scopeId","data-v-4aa7f9d0"],["__file","/home/runner/work/Nexior/Nexior/src/pages/auth/Callback.vue"]]);export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var w=Object.defineProperty,g=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var d=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var l=(e,t,o)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,p=(e,t)=>{for(var o in t||(t={}))N.call(t,o)&&l(e,o,t[o]);if(d)for(var o of d(t))x.call(t,o)&&l(e,o,t[o]);return e},u=(e,t)=>g(e,k(t));import"./vendor-others.2dd9c8c5.js";import{
|
|
1
|
+
var w=Object.defineProperty,g=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var d=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var l=(e,t,o)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,p=(e,t)=>{for(var o in t||(t={}))N.call(t,o)&&l(e,o,t[o]);if(d)for(var o of d(t))x.call(t,o)&&l(e,o,t[o]);return e},u=(e,t)=>g(e,k(t));import"./vendor-others.2dd9c8c5.js";import{Z as A,j as I,_ as M}from"./index.5e521e48.js";import{af as E}from"./vendor-fortawesome.41690bc6.js";import{f as S,h as R}from"./vendor-element-plus.b03cf0f5.js";import{H as T,al as n,o as s,e as m,L as h,M as _,f as r,V as O,U as f,W as V,ai as G,T as L,S as B,I as D}from"./vendor-@vue.ed4a7688.js";const H=T({name:"LayoutChatdoc",components:{ElMenu:S,ElMenuItem:R,FontAwesomeIcon:E},data(){var e,t;return{repositoryId:(t=(e=this.$route.params)==null?void 0:e.repositoryId)==null?void 0:t.toString(),drawer:!1,menuItems:[{index:"chat",title:this.$t("chatdoc.nav.chat"),route:{name:A}},{index:"manage",title:this.$t("chatdoc.nav.manage"),route:{name:I}}]}},computed:{activeMenu(){var t;const e=this.menuItems.filter(o=>{var a;return((a=o.route)==null?void 0:a.name)===this.$route.name});if(e)return(t=e[0])==null?void 0:t.index},repository(){var e,t,o;return(o=(t=(e=this.$store.state)==null?void 0:e.chatdoc)==null?void 0:t.repositories)==null?void 0:o.find(a=>a.id===this.repositoryId)}},async mounted(){await this.getService(),await this.onGetApplications(),await this.onGetRepositories()},methods:{async getService(){await this.$store.dispatch("chatdoc/getService")},async onGetApplications(){await this.$store.dispatch("chatdoc/getApplication")},async onGetRepositories(){await this.$store.dispatch("chatdoc/getRepositories")},async onClickMenu(e){this.activeMenu=e.index,e.route&&await this.$router.push(u(p({},e.route),{params:{id:this.repositoryId}}))}}}),U={class:"main"},F={class:"repository"},W={class:"chatdoc"};function b(e,t,o,a,j,z){const v=n("font-awesome-icon"),y=n("el-menu-item"),C=n("el-menu");return s(),m("div",U,[e.repositoryId?(s(),h(C,{key:0,"default-active":e.activeMenu,mode:"horizontal",ellipsis:!1,class:"menu"},{default:_(()=>{var c;return[r("div",F,[O(v,{class:"mr-2",icon:["fas","book"]}),r("span",null,f((c=e.repository)==null?void 0:c.name),1)]),(s(!0),m(V,null,G(e.menuItems,(i,$)=>(s(),h(y,{key:$,index:i.index,onClick:Z=>e.onClickMenu(i)},{default:_(()=>[L(f(i.title),1)]),_:2},1032,["index","onClick"]))),128))]}),_:1},8,["default-active"])):B("v-if",!0),r("div",W,[D(e.$slots,"chatdoc",{},void 0,!0)])])}var Y=M(H,[["render",b],["__scopeId","data-v-35d9dd71"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Chatdoc.vue"]]);export{Y as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-others.2dd9c8c5.js";import{N as h}from"./Navigator.
|
|
1
|
+
import"./vendor-others.2dd9c8c5.js";import{N as h}from"./Navigator.8fa888d6.js";import{B as v,R as $,a as w,b as N,c as g,_}from"./index.5e521e48.js";import{af as L}from"./vendor-fortawesome.41690bc6.js";import{H as l,al as a,o as t,e as i,f as s,W as S,ai as x,Q as C,V as r,U as E,L as O,S as y,aK as I,aL as k}from"./vendor-@vue.ed4a7688.js";import"./vendor-element-plus.b03cf0f5.js";import"./DarkSelector.d20d99ed.js";import"./vendor-vue-dark-switch.05cc8b71.js";import"./vendor-axios.168e6950.js";const b=l({name:"Navigator",components:{FontAwesomeIcon:L},computed:{isOfficial(){return window.location.origin===v},active(){return this.$route.matched[0].path},user(){return this.$store.getters.user},links(){return[{key:"application-list",text:this.$t("console.menu.applicationList"),name:$,icon:"fa-solid fa-cube"},{key:"order-list",text:this.$t("console.menu.orderList"),name:w,icon:"fa-solid fa-store"},{key:"usage-list",text:this.$t("console.menu.usageList"),name:N,icon:"fa-solid fa-rotate-left"}]}},mounted(){},methods:{onHome(){this.$router.push({name:g})},onNavigate(e){e.name?this.$router.push({name:e.name}):e.href&&window.open(e.href,"_blank")}}}),R=e=>(I("data-v-3859f1b5"),e=e(),k(),e),T={class:"side-panel"},U={class:"links"},B=["onClick"],A={class:"icon"},P={class:"text"},V={class:"outer"},D=R(()=>s("span",{class:"suffix"},null,-1));function H(e,d,m,p,u,f){const n=a("font-awesome-icon");return t(),i("div",T,[s("div",U,[(t(!0),i(S,null,x(e.links,(o,c)=>(t(),i("a",{key:c,class:C({link:!0,active:e.$route.name===o.name}),onClick:K=>e.onNavigate(o)},[s("span",A,[r(n,{icon:o.icon,class:"text-sm"},null,8,["icon"])]),s("span",P,E(o.text),1),s("span",V,[!o.name&&o.href?(t(),O(n,{key:0,icon:"fa-solid fa-up-right-from-square",class:"text-sm ml-2"})):y("v-if",!0)]),D],10,B))),128))])])}var W=_(b,[["render",H],["__scopeId","data-v-3859f1b5"],["__file","/home/runner/work/Nexior/Nexior/src/components/console/SidePanel.vue"]]);const z=l({name:"LayoutConsole",components:{SidePanel:W,Navigator:h},data(){return{mobile:window.innerWidth<768}},mounted(){window.addEventListener("resize",()=>{this.mobile=window.innerWidth<768})}}),F={class:"wrapper"},q={class:"main"};function G(e,d,m,p,u,f){const n=a("side-panel"),o=a("router-view"),c=a("navigator");return t(),i("div",F,[s("div",q,[r(n,{class:"side"}),r(o,{class:"panel"})]),r(c,{class:"navigator",direction:e.mobile?"row":"column"},null,8,["direction"])])}var se=_(z,[["render",G],["__scopeId","data-v-44569c68"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Console.vue"]]);export{se as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as F}from"./vendor-others.2dd9c8c5.js";import{L as P}from"./Chatdoc.4a0e87f3.js";import{Z as H,$ as b,i as T,_ as k,y as N,H as O,K,a0 as S}from"./index.5e521e48.js";import{a as z}from"./vendor-axios.168e6950.js";import{M as G,E as q,a as D,b as W,c as Q,d as J,e as j,f as x,g as A,A as Y,h as Z}from"./Status.04245320.js";import{i as X}from"./is.dd611415.js";import{af as V}from"./vendor-fortawesome.41690bc6.js";import{L as M,u as ee,x as se,i as te}from"./vendor-element-plus.b03cf0f5.js";import{H as E,al as l,o,e as c,L as h,f as i,V as m,U as I,W as R,ai as U,Q as v,as as B,S as f,$ as C,M as L,T as oe}from"./vendor-@vue.ed4a7688.js";import{C as ie}from"./CopyToClipboard.89729339.js";import"./application.ea1e2a72.js";import"./vendor-markdown.2b2fe69d.js";import"./vendor-highlight.js.19da0c9f.js";var $=(e=>(e.PENDING="pending",e.ANSWERING="answering",e.FINISHED="finished",e.FAILED="failed",e))($||{});const ne=E({name:"SidePanel",components:{ElInput:M,FontAwesomeIcon:V,ElSkeleton:ee},props:{},emits:["click"],computed:{repositoryId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.repositoryId)==null?void 0:t.toString()},conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.conversationId)==null?void 0:t.toString()},repository(){var e,t,n;return(n=(t=(e=this.$store.state)==null?void 0:e.chatdoc)==null?void 0:t.repositories)==null?void 0:n.find(d=>d.id===this.repositoryId)},conversations(){var e;return(e=this.repository)==null?void 0:e.conversations},application(){return this.$store.state.chatdoc.application}},methods:{async onNewConversation(){this.$router.push({name:H,params:{repositoryId:this.repositoryId}})},async onConfirm(e){e!=null&&e.deleting?(await b.deleteConversation(e.id),await this.$store.dispatch("chat/getConversations")):e!=null&&e.editing?(await b.updateConversation(e),await this.$store.dispatch("chat/getConversations")):e.editing=!0},onClick(e){!e||(this.$router.push({name:T,params:{repositoryId:this.repositoryId,conversationId:e}}),this.$emit("click",e))}}}),ae={class:"panel"},re={key:1,class:"conversations"},le={class:"icons"},de={class:"title"},ce=["onClick"],ue={class:"icons"},pe={class:"title"},he={key:0},me={key:1},_e={key:2},ge={class:"operations"};function fe(e,t,n,d,r,y){const u=l("el-skeleton"),a=l("font-awesome-icon"),_=l("el-input");return o(),c("div",ae,[e.conversations===void 0?(o(),h(u,{key:0})):(o(),c("div",re,[i("div",{class:"conversation",onClick:t[0]||(t[0]=(...s)=>e.onNewConversation&&e.onNewConversation(...s))},[i("div",le,[m(a,{icon:"fa-solid fa-plus",class:"icon"})]),i("div",de,I(e.$t("chatdoc.message.startNewChat")),1)]),(o(!0),c(R,null,U(e.conversations,(s,w)=>{var p;return o(),c("div",{key:w,class:v({conversation:!0,active:s.id===e.conversationId}),onClick:g=>e.onClick(s.id)},[i("div",ue,[m(a,{icon:"fa-regular fa-comment",class:"icon"})]),i("div",pe,[s!=null&&s.deleting?(o(),c("span",he,I(`${e.$t("chatdoc.message.confirmDelete")}?`),1)):s!=null&&s.editing?(o(),c("span",me,[m(_,{modelValue:s.title,"onUpdate:modelValue":g=>s.title=g,onKeydown:B(g=>e.onConfirm(s),["enter"])},null,8,["modelValue","onUpdate:modelValue","onKeydown"])])):(s==null?void 0:s.title)||(s==null?void 0:s.messages)?(o(),c("span",_e,I((s==null?void 0:s.title)||((p=s==null?void 0:s.messages[(s==null?void 0:s.messages.length)-1])==null?void 0:p.content)),1)):f("v-if",!0)]),i("div",ge,[!(s!=null&&s.editing)&&!s.deleting?(o(),h(a,{key:0,icon:"fa-solid fa-edit",class:"icon icon-edit",onClick:C(g=>s.editing=!0,["stop"])},null,8,["onClick"])):f("v-if",!0),!(s!=null&&s.editing)&&!s.deleting?(o(),h(a,{key:1,icon:"fa-solid fa-trash",class:"icon icon-delete",onClick:C(g=>s.deleting=!0,["stop"])},null,8,["onClick"])):f("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(o(),h(a,{key:2,icon:"fa-solid fa-check",class:"icon icon-confirm",onClick:C(g=>e.onConfirm(s),["stop"])},null,8,["onClick"])):f("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(o(),h(a,{key:3,icon:"fa-solid fa-xmark",class:"icon icon-cancel",onClick:C(g=>{s.editing=!1,s.deleting=!1},["stop"])},null,8,["onClick"])):f("v-if",!0)])],10,ce)}),128))]))])}var ye=k(ne,[["render",fe],["__scopeId","data-v-2282a6e1"],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/Conversations.vue"]]);const $e=E({name:"AnsweringMark",data(){return{}},computed:{conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.conversationId)==null?void 0:t.toString()}}}),we={class:"box"};function Ce(e,t,n,d,r,y){return o(),c("div",we)}var Ie=k($e,[["render",Ce],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/AnsweringMark.vue"]]);const ke=E({name:"Message",components:{CopyToClipboard:ie,AnsweringMark:Ie,MarkdownRenderer:G,ElAlert:se,ElButton:te},props:{message:{type:Object,required:!0}},emits:["stop"],data(){return{copied:!1,messageState:$}},computed:{errorText(){var e,t;if(!(!this.message.error||!((e=this.message.error)!=null&&e.code)))switch((t=this.message.error)==null?void 0:t.code){case A:return this.$t("chatdoc.message.errorUsedUp");case x:return this.$t("chatdoc.message.errorApiError");case j:return this.$t("chatdoc.message.errorBadRequest");case J:return this.$t("chatdoc.message.errorTimeout");case Q:return this.$t("chatdoc.message.errorTooManyRequests");case W:return this.$t("chatdoc.message.errorContentTooLarge");case D:return this.$t("chatdoc.message.errorNotApplied");case q:default:return this.$t("chatdoc.message.errorUnknown")}},showBuyMore(){var e;return this.message.role===N&&((e=this.message.error)==null?void 0:e.code)===A}},methods:{onCopy(){F(this.message.content.toString(),{debug:!0}),this.copied=!0,setTimeout(()=>{this.copied=!1},3e3)},onBuyMore(){}}}),Ee=["role"],Ne={class:"content"},Re={class:"operations"};function Se(e,t,n,d,r,y){var p;const u=l("markdown-renderer"),a=l("answering-mark"),_=l("copy-to-clipboard"),s=l("el-alert"),w=l("el-button");return o(),c(R,null,[i("div",{class:v({message:!0,[e.message.role]:!0,hidden:e.errorText&&e.message.role==="assistant"}),role:e.message.role},[i("div",Ne,[m(u,{content:(p=e.message)==null?void 0:p.content},null,8,["content"]),e.message.state===e.messageState.PENDING?(o(),h(a,{key:0})):f("v-if",!0)]),i("div",Re,[m(_,{content:e.message.content,class:"btn-copy"},null,8,["content"])])],10,Ee),e.errorText?(o(),h(s,{key:0,class:"error",title:e.errorText,type:"error",closable:!1},null,8,["title"])):f("v-if",!0),e.showBuyMore?(o(),h(w,{key:1,round:"",type:"primary",class:"btn btn-buy",size:"small",onClick:e.onBuyMore},{default:L(()=>[oe(I(e.$t("common.button.buyMore")),1)]),_:1},8,["onClick"])):f("v-if",!0)],64)}var be=k(ke,[["render",Se],["__scopeId","data-v-95a62450"],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/Message.vue"]]);const ve=E({name:"InputBox",components:{ElInput:M,FontAwesomeIcon:V},props:{disabled:{type:Boolean,required:!1,default:!1},question:{type:String,required:!0}},emits:["update:question","submit"],data(){return{questionValue:this.question,fileList:[]}},computed:{model(){return this.$store.state.chat.model}},watch:{questionValue(e){this.$emit("update:question",e)},question(e){e!==this.questionValue&&(this.questionValue=e)},references(e){e.length===0&&(this.fileList=[])}},methods:{onSubmit(){!this.question||this.$emit("submit")}}}),Oe={class:"input-box"},Ae={class:"info"};function Te(e,t,n,d,r,y){const u=l("font-awesome-icon"),a=l("el-input");return o(),c(R,null,[i("div",Oe,[i("span",{class:v({btn:!0,"btn-send":!0,disabled:!e.question}),onClick:t[0]||(t[0]=(..._)=>e.onSubmit&&e.onSubmit(..._))},[m(u,{icon:"fa-solid fa-location-arrow",class:"icon icon-send"})],2),m(a,{modelValue:e.questionValue,"onUpdate:modelValue":t[1]||(t[1]=_=>e.questionValue=_),disabled:e.disabled,class:"input",type:"textarea",placeholder:e.$t("chat.message.newMessagePlaceholder"),onKeydown:B(C(e.onSubmit,["exact","prevent"]),["enter"])},null,8,["modelValue","disabled","placeholder","onKeydown"])]),i("p",Ae,I(e.$t("chat.message.howToUse")),1)],64)}var qe=k(ve,[["render",Te],["__scopeId","data-v-7ed35c20"],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/InputBox.vue"]]);const De=E({name:"ChatdocConversation",components:{Layout:P,Conversations:ye,Message:be,InputBox:qe,ApplicationStatus:Y},data(){return{loading:!1,repositoryId:this.$route.params.repositoryId.toString(),answering:!1,question:""}},computed:{messages:{get(){var e,t;return((t=(e=this.conversations)==null?void 0:e.find(n=>{var d;return n.id===((d=this.$route.params.conversationId)==null?void 0:d.toString())}))==null?void 0:t.messages)||[]},set(e){console.debug("set messages",e)}},repository(){var e,t,n;return(n=(t=(e=this.$store.state)==null?void 0:e.chatdoc)==null?void 0:t.repositories)==null?void 0:n.find(d=>d.id===this.repositoryId)},conversations(){var e;return(e=this.repository)==null?void 0:e.conversations},conversationId(){var e;return(e=this.$route.params.conversationId)==null?void 0:e.toString()},application(){return this.$store.state.chatdoc.application},credential(){return this.$store.state.chatdoc.credential},needApply(){return this.$store.state.chatdoc.status.getApplication===O.Success&&!this.application},initializing(){return this.$store.state.chatdoc.status.getApplication===O.Request},service(){return this.$store.state.chatdoc.service}},async mounted(){console.debug("start get conversations"),this.loading=!0,this.$store.dispatch("chatdoc/getConversations",{repositoryId:this.repositoryId}).finally(()=>{this.loading=!1})},methods:{async onSubmit(){this.messages.push({content:this.question,role:K}),await this.onFetchAnswer()},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".dialogue");!e||!this.messages||this.messages.length===0||(e.scrollTop=e==null?void 0:e.scrollHeight)},0)},async onFetchAnswer(){var d;const e=(d=this.credential)==null?void 0:d.token,t=this.question;if(S(this.onFetchAnswer,"validated",t),this.question="",!e||!t){console.error("no token or endpoint or question"),this.messages.push({error:{code:D},role:N,state:$.FAILED});return}let n=this.conversationId;this.messages.push({content:"",role:N,state:$.PENDING}),S(this.onFetchAnswer,"start to get answer",this.messages),this.onScrollDown(),this.answering=!0,b.chatConversation({repositoryId:this.repositoryId,question:t,id:this.conversationId},{token:e,stream:r=>{this.messages[this.messages.length-1]={role:N,content:r.answer,state:$.ANSWERING},n=r.id,this.onScrollDown()}}).then(async()=>{S(this.onFetchAnswer,"finished fetch answer"),this.messages[this.messages.length-1].state=$.FINISHED,await this.$store.dispatch("chatdoc/setConversation",{id:n,messages:this.messages,repositoryId:this.repositoryId}),this.answering=!1,this.conversationId||(console.debug("push to conversation",n),await this.$router.push({name:T,params:{conversationId:n,repositoryId:this.repositoryId}})),this.onScrollDown(),await this.$store.dispatch("chatdoc/getConversations",{repositoryId:this.repositoryId})}).catch(r=>{var y,u;if(this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].state=$.FAILED),console.error(r),z.isCancel(r))this.messages[this.messages.length-1].error={code:Z};else if((y=r==null?void 0:r.response)!=null&&y.data){let a=(u=r==null?void 0:r.response)==null?void 0:u.data;X(a)&&(a=JSON.parse(a)),this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error=a.error)}else this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error={code:q});this.answering=!1})}}}),Ve={class:"wrapper"},Me={class:"chat"},Ue={class:"status"},Be={class:"dialogue"},Le={class:"messages"},Fe={class:"bottom"};function Pe(e,t,n,d,r,y){const u=l("conversations"),a=l("application-status"),_=l("message"),s=l("input-box"),w=l("layout");return o(),h(w,null,{chatdoc:L(()=>[i("div",Ve,[m(u,{class:"side"}),i("div",Me,[i("div",Ue,[m(a,{"show-price":!1,initializing:e.initializing,application:e.application,"need-apply":e.needApply,service:e.service,onRefresh:t[0]||(t[0]=p=>e.$store.dispatch("chatdoc/getApplication"))},null,8,["initializing","application","need-apply","service"])]),i("div",Be,[i("div",Le,[(o(!0),c(R,null,U(e.messages,(p,g)=>(o(),h(_,{key:g,message:p,class:"message"},null,8,["message"]))),128))])]),i("div",Fe,[m(s,{disabled:e.answering,question:e.question,"onUpdate:question":t[1]||(t[1]=p=>e.question=p),onSubmit:e.onSubmit},null,8,["disabled","question","onSubmit"])])])])]),_:1})}var ss=k(De,[["render",Pe],["__scopeId","data-v-24089614"],["__file","/home/runner/work/Nexior/Nexior/src/pages/chatdoc/Conversation.vue"]]);export{ss as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var se=Object.defineProperty;var B=Object.getOwnPropertySymbols;var oe=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var H=(e,t,a)=>t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,A=(e,t)=>{for(var a in t||(t={}))oe.call(t,a)&&H(e,a,t[a]);if(B)for(var a of B(t))ne.call(t,a)&&H(e,a,t[a]);return e};import{a as ae}from"./vendor-axios.168e6950.js";import{I as ie}from"./vendor-others.2dd9c8c5.js";import{_ as E,I as N,x as T,u as re,y as le,C as U,z as P,A as W,D as z,E as F,F as G,e as Q,G as L,f as Y,H as j}from"./index.df46b33d.js";import{H as S,o as n,e as p,al as i,f as l,L as g,S as v,W as I,ai as D,M as k,T as de,U as b,Q as q,V as f,O as ce,aw as ue,a0 as V,as as X,$ as O,I as x}from"./vendor-@vue.ed4a7688.js";import{M as pe,E as Z,a as ee,b as he,c as me,d as _e,e as fe,f as ge,g as K,A as $e,h as ye}from"./Status.099c1bcd.js";import{C as we}from"./CopyToClipboard.71209e34.js";import{x as ve,i as te,d as Ce,j as ke,H as be,G as J,I as Ee,J as Se,K as Ie,n as Ne,o as De,L as Ae,u as Oe,M as Re}from"./vendor-element-plus.b03cf0f5.js";import{af as R}from"./vendor-fortawesome.41690bc6.js";import{i as Te}from"./is.dd611415.js";import"./application.ea1e2a72.js";import"./vendor-markdown.2b2fe69d.js";import"./vendor-highlight.js.19da0c9f.js";const qe=S({name:"AnsweringMark",data(){return{}},computed:{conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.id)==null?void 0:t.toString()}}}),Me={class:"box"};function Ue(e,t,a,m,w,o){return n(),p("div",Me)}var Ge=E(qe,[["render",Ue],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/AnsweringMark.vue"]]);const Le=S({name:"Message",components:{CopyToClipboard:we,AnsweringMark:Ge,MarkdownRenderer:pe,ElAlert:ve,ElButton:te,ElImage:Ce},props:{message:{type:Object,required:!0},application:{type:Object,required:!0}},emits:["stop"],data(){return{copied:!1,messageState:N}},computed:{errorText(){var e,t;if(!(!this.message.error||!((e=this.message.error)!=null&&e.code)))switch((t=this.message.error)==null?void 0:t.code){case K:return this.$t("chat.message.errorUsedUp");case ge:return this.$t("chat.message.errorApiError");case fe:return this.$t("chat.message.errorBadRequest");case _e:return this.$t("chat.message.errorTimeout");case me:return this.$t("chat.message.errorTooManyRequests");case he:return this.$t("chat.message.errorContentTooLarge");case ee:return this.$t("chat.message.errorNotApplied");case Z:default:return this.$t("chat.message.errorUnknown")}},showBuyMore(){var e;return this.message.role===T&&((e=this.message.error)==null?void 0:e.code)===K}},methods:{onCopy(){ie(this.message.content.toString(),{debug:!0}),this.copied=!0,setTimeout(()=>{this.copied=!1},3e3)},onBuyMore(){var e;this.$router.push({name:re,params:{id:(e=this.application)==null?void 0:e.id}})}}}),Ve=["role"],Be={class:"author"},He={class:"main"},Pe={class:"content"},We={key:1},ze=["src"],Fe={class:"operations"};function je(e,t,a,m,w,o){var y;const d=i("el-image"),c=i("markdown-renderer"),_=i("answering-mark"),r=i("copy-to-clipboard"),h=i("el-alert"),s=i("el-button");return n(),p("div",{class:q({message:!0,[e.message.role]:!0,hidden:e.errorText&&e.message.role==="assistant"}),role:e.message.role},[l("div",Be,[e.message.role==="assistant"?(n(),g(d,{key:0,src:"https://cdn.acedata.cloud/7dljuv.png",fit:"cover",class:"avatar"})):v("v-if",!0)]),l("div",He,[l("div",Pe,[Array.isArray(e.message.content)?(n(),p("div",We,[(n(!0),p(I,null,D(e.message.content,(C,u)=>{var $;return n(),p("div",{key:u},[C.type==="image_url"?(n(),p("img",{key:0,src:($=C.image_url)==null?void 0:$.url,fit:"cover",class:"image"},null,8,ze)):v("v-if",!0),C.type==="text"?(n(),g(c,{key:u,content:C.text},null,8,["content"])):v("v-if",!0)])}),128))])):(n(),g(c,{key:0,content:(y=e.message)==null?void 0:y.content},null,8,["content"])),e.message.state===e.messageState.PENDING?(n(),g(_,{key:2})):v("v-if",!0)]),l("div",Fe,[Array.isArray(e.message.content)?v("v-if",!0):(n(),g(r,{key:0,content:e.message.content,class:"btn-copy"},null,8,["content"]))])]),e.errorText?(n(),g(h,{key:0,class:"error",title:e.errorText,type:"error",closable:!1},null,8,["title"])):v("v-if",!0),e.showBuyMore?(n(),g(s,{key:1,round:"",type:"primary",class:"btn btn-buy",size:"small",onClick:e.onBuyMore},{default:k(()=>[de(b(e.$t("common.button.buyMore")),1)]),_:1},8,["onClick"])):v("v-if",!0)],10,Ve)}var xe=E(Le,[["render",je],["__scopeId","data-v-f0476f80"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/Message.vue"]]);const Ke=S({name:"InputBox",components:{ElTooltip:ke,FontAwesomeIcon:R,ElUpload:be},props:{disabled:{type:Boolean,required:!1,default:!1},references:{type:Array,required:!1,default:()=>[]},question:{type:String,required:!0}},emits:["update:question","update:references","submit"],data(){return{inputHeight:"35px",questionValue:this.question,fileList:[],uploadUrl:le()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},canUpload(){return[U.name].includes(this.model.name)},model(){return this.$store.state.chat.model}},watch:{urls(e){this.$emit("update:references",e)},questionValue(e){this.$emit("update:question",e)},question(e){e!==this.questionValue&&(this.questionValue=e)},references(e){e.length===0&&(this.fileList=[])}},methods:{adjustTextareaHeight(){this.$nextTick(()=>{const e=this.$refs.textarea;e&&(e.style.height="35px",e.style.height=e.scrollHeight+"px")})},onSubmit(){!this.question||this.$emit("submit")},onExceed(){J.warning(this.$t("chat.message.uploadReferencesExceed"))},onError(){J.error(this.$t("chat.message.uploadReferencesError"))}}}),Je={class:"input-box"},Qe={class:"btn btn-upload"},Ye=["disabled","placeholder"],Xe={class:"info"};function Ze(e,t,a,m,w,o){const d=i("font-awesome-icon"),c=i("el-tooltip"),_=i("el-upload");return n(),p(I,null,[l("div",Je,[f(_,{"file-list":e.fileList,"onUpdate:file-list":t[0]||(t[0]=r=>e.fileList=r),class:q({upload:!0,disabled:!e.canUpload}),disabled:!e.canUpload,name:"file","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"on-exceed":e.onExceed,"on-error":e.onError,headers:e.headers},{default:k(()=>[f(c,{class:"box-item",effect:"dark",content:e.$t("chat.message.uploadFile"),placement:"top"},{default:k(()=>[l("span",Qe,[f(d,{icon:"fa-solid fa-paperclip",class:"icon icon-attachment"})])]),_:1},8,["content"])]),_:1},8,["file-list","class","disabled","action","on-exceed","on-error","headers"]),l("span",{class:q({btn:!0,"btn-send":!0,disabled:!e.questionValue}),onClick:t[1]||(t[1]=(...r)=>e.onSubmit&&e.onSubmit(...r))},[f(d,{icon:"fa-solid fa-location-arrow",class:"icon icon-send"})],2),v(" add this textarea "),ce(l("textarea",{ref:"textarea","onUpdate:modelValue":t[2]||(t[2]=r=>e.questionValue=r),disabled:e.disabled,class:"input",placeholder:e.$t("chat.message.newMessagePlaceholder"),style:V({height:e.inputHeight}),onKeydown:t[3]||(t[3]=X(O((...r)=>e.onSubmit&&e.onSubmit(...r),["exact","prevent"]),["enter"])),onInput:t[4]||(t[4]=(...r)=>e.adjustTextareaHeight&&e.adjustTextareaHeight(...r))},null,44,Ye),[[ue,e.questionValue]])]),l("p",Xe,b(e.$t("chat.message.howToUse")),1)],64)}var et=E(Ke,[["render",Ze],["__scopeId","data-v-020f4eb8"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/InputBox.vue"]]);const tt=S({name:"ModelSelector",components:{ElDropdown:Ee,ElDropdownMenu:Se,ElDropdownItem:Ie,FontAwesomeIcon:R},emits:["update:modelValue","select"],data(){return{options:[{icon:"fa-solid fa-bolt",color:"#ff9900",model:P},{icon:"fa-solid fa-bolt",color:"#ff9900",model:W},{icon:"fa-solid fa-wand-magic-sparkles",color:"#ce65e6",model:z},{icon:"fa-solid fa-wand-magic-sparkles",color:"#ce65e6",model:F},{icon:"fa-solid fa-wand-magic-sparkles",color:"#ce65e6",model:U}]}},computed:{model(){const e=this.$store.state.chat.model.name;return[P,W,z,F,U].find(a=>a.name===e)}},methods:{onCommandChange(e){this.$emit("select",e),this.$store.dispatch("chat/setModel",e)}}}),st={class:"selector"},ot={class:"name"},nt={class:"angle"},at={class:"item"},it={class:"info"},rt={class:"name"},lt={class:"description"};function dt(e,t,a,m,w,o){const d=i("font-awesome-icon"),c=i("el-dropdown-item"),_=i("el-dropdown-menu"),r=i("el-dropdown");return n(),p("div",st,[f(r,{trigger:"click","popper-class":"popper"},{dropdown:k(()=>[f(_,null,{default:k(()=>[(n(!0),p(I,null,D(e.options,(h,s)=>(n(),g(c,{key:s,onClick:y=>e.onCommandChange(h.model)},{default:k(()=>[l("div",at,[l("div",{class:"icon",style:V({color:h.color})},[f(d,{icon:h.icon},null,8,["icon"])],4),l("div",it,[l("p",rt,b(h.model.getDisplayName()),1),l("p",lt,b(h.model.getDescription()),1)])])]),_:2},1032,["onClick"]))),128))]),_:1})]),default:k(()=>{var h;return[l("div",null,[l("span",ot,b((h=e.model)==null?void 0:h.getDisplayName()),1),l("span",nt,[f(d,{icon:"fa-solid fa-angle-down"})])])]}),_:1})])}var ct=E(tt,[["render",dt],["__scopeId","data-v-7befff3e"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/ModelSelector2.vue"]]);const ut=S({name:"ConversationIntroductionItem",components:{FontAwesomeIcon:R},props:{content:{type:String,required:!0},icon:{type:String,required:!0},color:{type:String,default:"rgb(0, 0, 0)"}},data(){return{}},computed:{}}),pt={class:"item"},ht={class:"icon"},mt={class:"content"};function _t(e,t,a,m,w,o){const d=i("font-awesome-icon");return n(),p("div",pt,[l("div",ht,[f(d,{icon:e.icon,style:V({color:e.color})},null,8,["icon","style"])]),l("div",mt,b(e.content),1)])}var ft=E(ut,[["render",_t],["__scopeId","data-v-bc919b38"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/IntroductionItem.vue"]]);const gt=S({name:"ConversationIntroduction",components:{IntroductionItem:ft,ElRow:Ne,ElCol:De},emits:["draft"],data(){return{items:[{icon:"fa-solid fa-pen-nib",content:this.$t("chat.message.question1"),color:"rgb(226, 197, 65)"},{icon:"fa-solid fa-laptop-code",content:this.$t("chat.message.question2"),color:"rgb(203, 139, 208)"},{icon:"fa-solid fa-fan",content:this.$t("chat.message.question3"),color:"rgb(118, 208, 235)"},{icon:"fa-solid fa-plane-departure",content:this.$t("chat.message.question4"),color:"rgb(237, 98, 98)"}].sort(()=>Math.random()-.5)}},computed:{}}),$t={class:"introduction"};function yt(e,t,a,m,w,o){const d=i("introduction-item"),c=i("el-col"),_=i("el-row");return n(),p("div",$t,[f(_,{class:"items",justify:"center",gutter:15},{default:k(()=>[(n(!0),p(I,null,D(e.items,(r,h)=>(n(),g(c,{key:h,md:6,sm:12,xs:12},{default:k(()=>[f(d,{content:r.content,icon:r.icon,color:r.color,class:"cursor-pointer",onClick:s=>e.$emit("draft",r.content)},null,8,["content","icon","color","onClick"])]),_:2},1024))),128))]),_:1})])}var wt=E(gt,[["render",yt],["__scopeId","data-v-52040931"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/Introduction.vue"]]);const vt=S({name:"SidePanel",components:{ElInput:Ae,FontAwesomeIcon:R,ElSkeleton:Oe},props:{},emits:["click"],computed:{conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.id)==null?void 0:t.toString()},conversationGroups(){var d,c,_,r,h,s,y,C;const e=this.$store.state.chat.conversations,t=new Date;t.setHours(0,0,0,0);const a=new Date(t);a.setDate(a.getDate()-1);const m=new Date(t);m.setDate(m.getDate()-t.getDay());const w=new Date(m);w.setDate(w.getDate()-7);const o=e==null?void 0:e.reduce((u,$)=>{const M=new Date($.updated_at*1e3);return M>=t?u.today.push($):M>=a?u.yesterday.push($):M>=m?u.thisWeek.push($):u.earlier.push($),u},{today:[],yesterday:[],thisWeek:[],earlier:[]});return A(A(A(A({},((d=o==null?void 0:o.today)==null?void 0:d.length)>0?{today:(c=o==null?void 0:o.today)==null?void 0:c.sort((u,$)=>$.updated_at-u.updated_at)}:{}),((_=o==null?void 0:o.yesterday)==null?void 0:_.length)>0?{yesterday:(r=o==null?void 0:o.yesterday)==null?void 0:r.sort((u,$)=>$.updated_at-u.updated_at)}:{}),((h=o==null?void 0:o.thisWeek)==null?void 0:h.length)>0?{thisWeek:(s=o==null?void 0:o.thisWeek)==null?void 0:s.sort((u,$)=>$.updated_at-u.updated_at)}:{}),((y=o==null?void 0:o.earlier)==null?void 0:y.length)>0?{earlier:(C=o==null?void 0:o.earlier)==null?void 0:C.sort((u,$)=>$.updated_at-u.updated_at)}:{})},application(){return this.$store.state.chat.application},loading(){return this.$store.state.chat.status.getConversations===G.Request},token(){var e,t;return(t=(e=this.$store.state.chat)==null?void 0:e.credential)==null?void 0:t.token}},methods:{async onNewConversation(){this.$router.push({name:Q})},async onConfirm(e){const t=this.token;if(!t){console.error("Token is not found");return}e!=null&&e.deleting?(await L.deleteConversation(e.id,{token:t}),await this.$store.dispatch("chat/getConversations")):e!=null&&e.editing?(await L.updateConversation(e,{token:t}),await this.$store.dispatch("chat/getConversations")):e.editing=!0},onClick(e){!e||(this.$router.push({name:Y,params:{id:e}}),this.$emit("click",e))}}}),Ct={class:"panel"},kt={key:1,class:"conversations"},bt={class:"icons"},Et={class:"title"},St={class:"key"},It=["onClick"],Nt={class:"title"},Dt={key:0},At={key:1},Ot={key:2},Rt={class:"operations"};function Tt(e,t,a,m,w,o){const d=i("el-skeleton"),c=i("font-awesome-icon"),_=i("el-input");return n(),p("div",Ct,[e.loading&&e.conversationGroups===void 0?(n(),g(d,{key:0})):(n(),p("div",kt,[l("div",{class:"conversation",onClick:t[0]||(t[0]=(...r)=>e.onNewConversation&&e.onNewConversation(...r))},[l("div",bt,[f(c,{icon:"fa-solid fa-plus",class:"icon"})]),l("div",Et,b(e.$t("chat.message.startNewChat")),1)]),(n(!0),p(I,null,D(e.conversationGroups,(r,h)=>(n(),p("div",{key:h,class:"group"},[l("div",St,b(e.$t(`chat.group.${h}`)),1),(n(!0),p(I,null,D(r,(s,y)=>{var C;return n(),p("div",{key:y,class:q({conversation:!0,active:s.id===e.conversationId}),onClick:u=>e.onClick(s.id)},[l("div",Nt,[s!=null&&s.deleting?(n(),p("span",Dt,b(`${e.$t("chat.message.confirmDelete")}?`),1)):s!=null&&s.editing?(n(),p("span",At,[f(_,{modelValue:s.title,"onUpdate:modelValue":u=>s.title=u,onKeydown:X(u=>e.onConfirm(s),["enter"])},null,8,["modelValue","onUpdate:modelValue","onKeydown"])])):(s==null?void 0:s.title)||(s==null?void 0:s.messages)?(n(),p("span",Ot,b((s==null?void 0:s.title)||((C=s==null?void 0:s.messages[(s==null?void 0:s.messages.length)-1])==null?void 0:C.content)),1)):v("v-if",!0)]),l("div",Rt,[!(s!=null&&s.editing)&&!s.deleting?(n(),g(c,{key:0,icon:"fa-solid fa-edit",class:"icon icon-edit",onClick:O(u=>s.editing=!0,["stop"])},null,8,["onClick"])):v("v-if",!0),!(s!=null&&s.editing)&&!s.deleting?(n(),g(c,{key:1,icon:"fa-solid fa-trash",class:"icon icon-delete",onClick:O(u=>s.deleting=!0,["stop"])},null,8,["onClick"])):v("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(n(),g(c,{key:2,icon:"fa-solid fa-check",class:"icon icon-confirm",onClick:O(u=>e.onConfirm(s),["stop"])},null,8,["onClick"])):v("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(n(),g(c,{key:3,icon:"fa-solid fa-xmark",class:"icon icon-cancel",onClick:O(u=>{s.editing=!1,s.deleting=!1},["stop"])},null,8,["onClick"])):v("v-if",!0)])],10,It)}),128))]))),128))]))])}var qt=E(vt,[["render",Tt],["__scopeId","data-v-d866c834"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/SidePanel.vue"]]);const Mt=S({name:"LayoutChat",components:{SidePanel:qt,ElDrawer:Re,ElButton:te,FontAwesomeIcon:R},data(){return{drawer:!1}}}),Ut={class:"main"},Gt={class:"side"},Lt={class:"chat"};function Vt(e,t,a,m,w,o){const d=i("side-panel"),c=i("font-awesome-icon"),_=i("el-button"),r=i("el-drawer");return n(),p("div",Ut,[l("div",Gt,[x(e.$slots,"side",{},()=>[f(d)],!0)]),l("div",Lt,[x(e.$slots,"chat",{},void 0,!0)]),f(_,{round:"",class:"menu",onClick:t[0]||(t[0]=h=>e.drawer=!0)},{default:k(()=>[f(c,{icon:"fa-solid fa-bars",class:"icon-menu"})]),_:1}),f(r,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=h=>e.drawer=h),"with-header":!1,size:"290px",class:"drawer"},{default:k(()=>[f(d)]),_:1},8,["modelValue"])])}var Bt=E(Mt,[["render",Vt],["__scopeId","data-v-8d7a06d2"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Chat.vue"]]);const Ht=S({name:"ChatConversation",components:{InputBox:et,Introduction:wt,ModelSelector2:ct,Message:xe,ApplicationStatus:$e,Layout:Bt},data(){var e,t;return{question:"",references:[],answering:!1,messages:((t=(e=this.$store.state.chat.conversations)==null?void 0:e.find(a=>{var m;return a.id===((m=this.$route.params.id)==null?void 0:m.toString())}))==null?void 0:t.messages)||[]}},computed:{model(){return this.$store.state.chat.model},conversationId(){var e;return(e=this.$route.params.id)==null?void 0:e.toString()},conversation(){var e;return(e=this.$store.state.chat.conversations)==null?void 0:e.find(t=>t.id===this.conversationId)},service(){return this.$store.state.chat.service},application(){return this.$store.state.chat.application},credential(){var e;return(e=this.$store.state.chat)==null?void 0:e.credential},needApply(){return this.$store.state.chat.status.getApplication===G.Success&&!this.application},conversations(){return this.$store.state.chat.conversations},initializing(){return this.$store.state.chat.status.getApplication===G.Request}},watch:{model(e){e&&this.onModelChanged()},conversationId(e){var t,a;e?(this.messages=((a=(t=this.conversations)==null?void 0:t.find(m=>m.id===e))==null?void 0:a.messages)||[],this.onScrollDown()):this.messages=[]}},async mounted(){await this.onGetService(),await this.onGetApplication(),await this.onGetConversations(),await this.onScrollDown()},methods:{async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("chat/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("chat/getApplication"),console.debug("end onGetApplication")},async onGetConversations(){console.debug("start onGetConversations"),await this.$store.dispatch("chat/getConversations"),console.debug("end onGetConversations")},async onDraft(e){this.question=e,this.onSubmit()},async onCreateNewConversation(){await this.$router.push({name:Q})},async onModelChanged(){await this.onCreateNewConversation(),await this.$store.dispatch("chat/getApplication")},async onSubmit(){if(this.references.length>0){let e=[];e.push({type:"text",text:this.question});for(let t=0;t<this.references.length;t++)e.push({type:"image_url",image_url:this.references[t]});this.messages.push({content:e,role:j})}else this.messages.push({content:this.question,role:j});console.debug("onSubmit",this.question,this.references),await this.onFetchAnswer()},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".dialogue");!e||!this.messages||this.messages.length===0||(e.scrollTop=e==null?void 0:e.scrollHeight)},0)},async onFetchAnswer(){var w;const e=(w=this.credential)==null?void 0:w.token,t=this.question,a=this.references;if(console.debug("validated",t,a),this.question="",this.references=[],!e||!t){console.error("no token or endpoint or question"),this.messages.push({error:{code:ee},role:T,state:N.FAILED});return}let m=this.conversationId;this.messages.push({content:"",role:T,state:N.PENDING}),console.debug("start to get answer",this.messages),this.onScrollDown(),this.answering=!0,L.chatConversation({question:t,model:this.model.name,references:a,id:this.conversationId,stateful:!0},{token:e,stream:o=>{console.debug("stream response",o),this.messages[this.messages.length-1]={role:T,content:o.answer,state:N.ANSWERING},m=o==null?void 0:o.id,this.onScrollDown()}}).then(async()=>{console.debug("finished fetch answer",this.messages),this.messages[this.messages.length-1].state=N.FINISHED,await this.$store.dispatch("chat/setConversation",{id:m,messages:this.messages}),this.answering=!1,this.conversationId||await this.$router.push({name:Y,params:{id:m}}),this.onScrollDown(),await this.$store.dispatch("chat/getConversations"),await this.$store.dispatch("chat/getApplication")}).catch(o=>{var d,c;if(this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].state=N.FAILED),console.error(o),ae.isCancel(o))this.messages[this.messages.length-1].error={code:ye};else if((d=o==null?void 0:o.response)!=null&&d.data){let _=(c=o==null?void 0:o.response)==null?void 0:c.data;Te(_)&&(_=JSON.parse(_)),this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error=_.error)}else this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error={code:Z});this.answering=!1})}}}),Pt={class:"dialogue"},Wt={key:1,class:"messages"},zt={class:"bottom"};function Ft(e,t,a,m,w,o){const d=i("model-selector2"),c=i("application-status"),_=i("introduction"),r=i("message"),h=i("input-box"),s=i("layout");return n(),g(s,null,{chat:k(()=>[f(d,{class:"selector"}),f(c,{initializing:e.initializing,application:e.application,"need-apply":e.needApply,service:e.service,onRefresh:t[0]||(t[0]=y=>e.$store.dispatch("chat/getApplication"))},null,8,["initializing","application","need-apply","service"]),l("div",Pt,[e.messages.length===0?(n(),g(_,{key:0,onDraft:e.onDraft},null,8,["onDraft"])):(n(),p("div",Wt,[(n(!0),p(I,null,D(e.messages,(y,C)=>(n(),g(r,{key:C,message:y,application:e.application,class:"message"},null,8,["message","application"]))),128))]))]),l("div",zt,[f(h,{disabled:e.answering,question:e.question,references:e.references,"onUpdate:question":t[1]||(t[1]=y=>e.question=y),"onUpdate:references":t[2]||(t[2]=y=>e.references=y),onSubmit:e.onSubmit},null,8,["disabled","question","references","onSubmit"])])]),_:1})}var as=E(Ht,[["render",Ft],["__scopeId","data-v-3ab2fb26"],["__file","/home/runner/work/Nexior/Nexior/src/pages/chat/Conversation.vue"]]);export{as as default};
|
|
1
|
+
var se=Object.defineProperty;var B=Object.getOwnPropertySymbols;var oe=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var H=(e,t,a)=>t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,A=(e,t)=>{for(var a in t||(t={}))oe.call(t,a)&&H(e,a,t[a]);if(B)for(var a of B(t))ne.call(t,a)&&H(e,a,t[a]);return e};import{a as ae}from"./vendor-axios.168e6950.js";import{I as ie}from"./vendor-others.2dd9c8c5.js";import{_ as E,I as N,y as T,v as re,z as le,A as U,D as P,E as W,F as z,G as F,H as G,e as Q,J as L,f as Y,K as j}from"./index.5e521e48.js";import{H as S,o as n,e as p,al as i,f as l,L as g,S as v,W as I,ai as D,M as C,T as de,U as b,Q as q,V as f,O as ce,aw as ue,a0 as V,as as X,$ as O,I as K}from"./vendor-@vue.ed4a7688.js";import{M as pe,E as Z,a as ee,b as he,c as me,d as _e,e as fe,f as ge,g as x,A as $e,h as ye}from"./Status.04245320.js";import{C as we}from"./CopyToClipboard.89729339.js";import{x as ve,i as te,d as ke,j as Ce,H as be,G as J,I as Ee,J as Se,K as Ie,n as Ne,o as De,L as Ae,u as Oe,M as Re}from"./vendor-element-plus.b03cf0f5.js";import{af as R}from"./vendor-fortawesome.41690bc6.js";import{i as Te}from"./is.dd611415.js";import"./application.ea1e2a72.js";import"./vendor-markdown.2b2fe69d.js";import"./vendor-highlight.js.19da0c9f.js";const qe=S({name:"AnsweringMark",data(){return{}},computed:{conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.id)==null?void 0:t.toString()}}}),Me={class:"box"};function Ue(e,t,a,m,w,o){return n(),p("div",Me)}var Ge=E(qe,[["render",Ue],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/AnsweringMark.vue"]]);const Le=S({name:"Message",components:{CopyToClipboard:we,AnsweringMark:Ge,MarkdownRenderer:pe,ElAlert:ve,ElButton:te,ElImage:ke},props:{message:{type:Object,required:!0},application:{type:Object,required:!0}},emits:["stop"],data(){return{copied:!1,messageState:N}},computed:{errorText(){var e,t;if(!(!this.message.error||!((e=this.message.error)!=null&&e.code)))switch((t=this.message.error)==null?void 0:t.code){case x:return this.$t("chat.message.errorUsedUp");case ge:return this.$t("chat.message.errorApiError");case fe:return this.$t("chat.message.errorBadRequest");case _e:return this.$t("chat.message.errorTimeout");case me:return this.$t("chat.message.errorTooManyRequests");case he:return this.$t("chat.message.errorContentTooLarge");case ee:return this.$t("chat.message.errorNotApplied");case Z:default:return this.$t("chat.message.errorUnknown")}},showBuyMore(){var e;return this.message.role===T&&((e=this.message.error)==null?void 0:e.code)===x}},methods:{onCopy(){ie(this.message.content.toString(),{debug:!0}),this.copied=!0,setTimeout(()=>{this.copied=!1},3e3)},onBuyMore(){var e;this.$router.push({name:re,params:{id:(e=this.application)==null?void 0:e.id}})}}}),Ve=["role"],Be={class:"author"},He={class:"main"},Pe={class:"content"},We={key:1},ze=["src"],Fe={class:"operations"};function je(e,t,a,m,w,o){var y;const d=i("el-image"),c=i("markdown-renderer"),_=i("answering-mark"),r=i("copy-to-clipboard"),h=i("el-alert"),s=i("el-button");return n(),p("div",{class:q({message:!0,[e.message.role]:!0,hidden:e.errorText&&e.message.role==="assistant"}),role:e.message.role},[l("div",Be,[e.message.role==="assistant"?(n(),g(d,{key:0,src:"https://cdn.acedata.cloud/7dljuv.png",fit:"cover",class:"avatar"})):v("v-if",!0)]),l("div",He,[l("div",Pe,[Array.isArray(e.message.content)?(n(),p("div",We,[(n(!0),p(I,null,D(e.message.content,(k,u)=>{var $;return n(),p("div",{key:u},[k.type==="image_url"?(n(),p("img",{key:0,src:($=k.image_url)==null?void 0:$.url,fit:"cover",class:"image"},null,8,ze)):v("v-if",!0),k.type==="text"?(n(),g(c,{key:u,content:k.text},null,8,["content"])):v("v-if",!0)])}),128))])):(n(),g(c,{key:0,content:(y=e.message)==null?void 0:y.content},null,8,["content"])),e.message.state===e.messageState.PENDING?(n(),g(_,{key:2})):v("v-if",!0)]),l("div",Fe,[Array.isArray(e.message.content)?v("v-if",!0):(n(),g(r,{key:0,content:e.message.content,class:"btn-copy"},null,8,["content"]))])]),e.errorText?(n(),g(h,{key:0,class:"error",title:e.errorText,type:"error",closable:!1},null,8,["title"])):v("v-if",!0),e.showBuyMore?(n(),g(s,{key:1,round:"",type:"primary",class:"btn btn-buy",size:"small",onClick:e.onBuyMore},{default:C(()=>[de(b(e.$t("common.button.buyMore")),1)]),_:1},8,["onClick"])):v("v-if",!0)],10,Ve)}var Ke=E(Le,[["render",je],["__scopeId","data-v-f0476f80"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/Message.vue"]]);const xe=S({name:"InputBox",components:{ElTooltip:Ce,FontAwesomeIcon:R,ElUpload:be},props:{disabled:{type:Boolean,required:!1,default:!1},references:{type:Array,required:!1,default:()=>[]},question:{type:String,required:!0}},emits:["update:question","update:references","submit"],data(){return{inputHeight:"35px",questionValue:this.question,fileList:[],uploadUrl:le()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},canUpload(){return[U.name].includes(this.model.name)},model(){return this.$store.state.chat.model}},watch:{urls(e){this.$emit("update:references",e)},questionValue(e){this.$emit("update:question",e)},question(e){e!==this.questionValue&&(this.questionValue=e)},references(e){e.length===0&&(this.fileList=[])}},methods:{adjustTextareaHeight(){this.$nextTick(()=>{const e=this.$refs.textarea;e&&(e.style.height="35px",e.style.height=e.scrollHeight+"px")})},onSubmit(){!this.question||this.$emit("submit")},onExceed(){J.warning(this.$t("chat.message.uploadReferencesExceed"))},onError(){J.error(this.$t("chat.message.uploadReferencesError"))}}}),Je={class:"input-box"},Qe={class:"btn btn-upload"},Ye=["disabled","placeholder"],Xe={class:"info"};function Ze(e,t,a,m,w,o){const d=i("font-awesome-icon"),c=i("el-tooltip"),_=i("el-upload");return n(),p(I,null,[l("div",Je,[f(_,{"file-list":e.fileList,"onUpdate:file-list":t[0]||(t[0]=r=>e.fileList=r),class:q({upload:!0,disabled:!e.canUpload}),disabled:!e.canUpload,name:"file","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"on-exceed":e.onExceed,"on-error":e.onError,headers:e.headers},{default:C(()=>[f(c,{class:"box-item",effect:"dark",content:e.$t("chat.message.uploadFile"),placement:"top"},{default:C(()=>[l("span",Qe,[f(d,{icon:"fa-solid fa-paperclip",class:"icon icon-attachment"})])]),_:1},8,["content"])]),_:1},8,["file-list","class","disabled","action","on-exceed","on-error","headers"]),l("span",{class:q({btn:!0,"btn-send":!0,disabled:!e.questionValue}),onClick:t[1]||(t[1]=(...r)=>e.onSubmit&&e.onSubmit(...r))},[f(d,{icon:"fa-solid fa-location-arrow",class:"icon icon-send"})],2),v(" add this textarea "),ce(l("textarea",{ref:"textarea","onUpdate:modelValue":t[2]||(t[2]=r=>e.questionValue=r),disabled:e.disabled,class:"input",placeholder:e.$t("chat.message.newMessagePlaceholder"),style:V({height:e.inputHeight}),onKeydown:t[3]||(t[3]=X(O((...r)=>e.onSubmit&&e.onSubmit(...r),["exact","prevent"]),["enter"])),onInput:t[4]||(t[4]=(...r)=>e.adjustTextareaHeight&&e.adjustTextareaHeight(...r))},null,44,Ye),[[ue,e.questionValue]])]),l("p",Xe,b(e.$t("chat.message.howToUse")),1)],64)}var et=E(xe,[["render",Ze],["__scopeId","data-v-020f4eb8"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/InputBox.vue"]]);const tt=S({name:"ModelSelector",components:{ElDropdown:Ee,ElDropdownMenu:Se,ElDropdownItem:Ie,FontAwesomeIcon:R},emits:["update:modelValue","select"],data(){return{options:[{icon:"fa-solid fa-bolt",color:"#ff9900",model:P},{icon:"fa-solid fa-bolt",color:"#ff9900",model:W},{icon:"fa-solid fa-wand-magic-sparkles",color:"#ce65e6",model:z},{icon:"fa-solid fa-wand-magic-sparkles",color:"#ce65e6",model:F},{icon:"fa-solid fa-wand-magic-sparkles",color:"#ce65e6",model:U}]}},computed:{model(){const e=this.$store.state.chat.model.name;return[P,W,z,F,U].find(a=>a.name===e)}},methods:{onCommandChange(e){this.$emit("select",e),this.$store.dispatch("chat/setModel",e)}}}),st={class:"selector"},ot={class:"name"},nt={class:"angle"},at={class:"item"},it={class:"info"},rt={class:"name"},lt={class:"description"};function dt(e,t,a,m,w,o){const d=i("font-awesome-icon"),c=i("el-dropdown-item"),_=i("el-dropdown-menu"),r=i("el-dropdown");return n(),p("div",st,[f(r,{trigger:"click","popper-class":"popper"},{dropdown:C(()=>[f(_,null,{default:C(()=>[(n(!0),p(I,null,D(e.options,(h,s)=>(n(),g(c,{key:s,onClick:y=>e.onCommandChange(h.model)},{default:C(()=>[l("div",at,[l("div",{class:"icon",style:V({color:h.color})},[f(d,{icon:h.icon},null,8,["icon"])],4),l("div",it,[l("p",rt,b(h.model.getDisplayName()),1),l("p",lt,b(h.model.getDescription()),1)])])]),_:2},1032,["onClick"]))),128))]),_:1})]),default:C(()=>{var h;return[l("div",null,[l("span",ot,b((h=e.model)==null?void 0:h.getDisplayName()),1),l("span",nt,[f(d,{icon:"fa-solid fa-angle-down"})])])]}),_:1})])}var ct=E(tt,[["render",dt],["__scopeId","data-v-7befff3e"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/ModelSelector2.vue"]]);const ut=S({name:"ConversationIntroductionItem",components:{FontAwesomeIcon:R},props:{content:{type:String,required:!0},icon:{type:String,required:!0},color:{type:String,default:"rgb(0, 0, 0)"}},data(){return{}},computed:{}}),pt={class:"item"},ht={class:"icon"},mt={class:"content"};function _t(e,t,a,m,w,o){const d=i("font-awesome-icon");return n(),p("div",pt,[l("div",ht,[f(d,{icon:e.icon,style:V({color:e.color})},null,8,["icon","style"])]),l("div",mt,b(e.content),1)])}var ft=E(ut,[["render",_t],["__scopeId","data-v-bc919b38"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/IntroductionItem.vue"]]);const gt=S({name:"ConversationIntroduction",components:{IntroductionItem:ft,ElRow:Ne,ElCol:De},emits:["draft"],data(){return{items:[{icon:"fa-solid fa-pen-nib",content:this.$t("chat.message.question1"),color:"rgb(226, 197, 65)"},{icon:"fa-solid fa-laptop-code",content:this.$t("chat.message.question2"),color:"rgb(203, 139, 208)"},{icon:"fa-solid fa-fan",content:this.$t("chat.message.question3"),color:"rgb(118, 208, 235)"},{icon:"fa-solid fa-plane-departure",content:this.$t("chat.message.question4"),color:"rgb(237, 98, 98)"}].sort(()=>Math.random()-.5)}},computed:{}}),$t={class:"introduction"};function yt(e,t,a,m,w,o){const d=i("introduction-item"),c=i("el-col"),_=i("el-row");return n(),p("div",$t,[f(_,{class:"items",justify:"center",gutter:15},{default:C(()=>[(n(!0),p(I,null,D(e.items,(r,h)=>(n(),g(c,{key:h,md:6,sm:12,xs:12},{default:C(()=>[f(d,{content:r.content,icon:r.icon,color:r.color,class:"cursor-pointer",onClick:s=>e.$emit("draft",r.content)},null,8,["content","icon","color","onClick"])]),_:2},1024))),128))]),_:1})])}var wt=E(gt,[["render",yt],["__scopeId","data-v-52040931"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/Introduction.vue"]]);const vt=S({name:"SidePanel",components:{ElInput:Ae,FontAwesomeIcon:R,ElSkeleton:Oe},props:{},emits:["click"],computed:{conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.id)==null?void 0:t.toString()},conversationGroups(){var d,c,_,r,h,s,y,k;const e=this.$store.state.chat.conversations,t=new Date;t.setHours(0,0,0,0);const a=new Date(t);a.setDate(a.getDate()-1);const m=new Date(t);m.setDate(m.getDate()-t.getDay());const w=new Date(m);w.setDate(w.getDate()-7);const o=e==null?void 0:e.reduce((u,$)=>{const M=new Date($.updated_at*1e3);return M>=t?u.today.push($):M>=a?u.yesterday.push($):M>=m?u.thisWeek.push($):u.earlier.push($),u},{today:[],yesterday:[],thisWeek:[],earlier:[]});return A(A(A(A({},((d=o==null?void 0:o.today)==null?void 0:d.length)>0?{today:(c=o==null?void 0:o.today)==null?void 0:c.sort((u,$)=>$.updated_at-u.updated_at)}:{}),((_=o==null?void 0:o.yesterday)==null?void 0:_.length)>0?{yesterday:(r=o==null?void 0:o.yesterday)==null?void 0:r.sort((u,$)=>$.updated_at-u.updated_at)}:{}),((h=o==null?void 0:o.thisWeek)==null?void 0:h.length)>0?{thisWeek:(s=o==null?void 0:o.thisWeek)==null?void 0:s.sort((u,$)=>$.updated_at-u.updated_at)}:{}),((y=o==null?void 0:o.earlier)==null?void 0:y.length)>0?{earlier:(k=o==null?void 0:o.earlier)==null?void 0:k.sort((u,$)=>$.updated_at-u.updated_at)}:{})},application(){return this.$store.state.chat.application},loading(){return this.$store.state.chat.status.getConversations===G.Request},token(){var e,t;return(t=(e=this.$store.state.chat)==null?void 0:e.credential)==null?void 0:t.token}},methods:{async onNewConversation(){this.$router.push({name:Q})},async onConfirm(e){const t=this.token;if(!t){console.error("Token is not found");return}e!=null&&e.deleting?(await L.deleteConversation(e.id,{token:t}),await this.$store.dispatch("chat/getConversations")):e!=null&&e.editing?(await L.updateConversation(e,{token:t}),await this.$store.dispatch("chat/getConversations")):e.editing=!0},onClick(e){!e||(this.$router.push({name:Y,params:{id:e}}),this.$emit("click",e))}}}),kt={class:"panel"},Ct={key:1,class:"conversations"},bt={class:"icons"},Et={class:"title"},St={class:"key"},It=["onClick"],Nt={class:"title"},Dt={key:0},At={key:1},Ot={key:2},Rt={class:"operations"};function Tt(e,t,a,m,w,o){const d=i("el-skeleton"),c=i("font-awesome-icon"),_=i("el-input");return n(),p("div",kt,[e.loading&&e.conversationGroups===void 0?(n(),g(d,{key:0})):(n(),p("div",Ct,[l("div",{class:"conversation",onClick:t[0]||(t[0]=(...r)=>e.onNewConversation&&e.onNewConversation(...r))},[l("div",bt,[f(c,{icon:"fa-solid fa-plus",class:"icon"})]),l("div",Et,b(e.$t("chat.message.startNewChat")),1)]),(n(!0),p(I,null,D(e.conversationGroups,(r,h)=>(n(),p("div",{key:h,class:"group"},[l("div",St,b(e.$t(`chat.group.${h}`)),1),(n(!0),p(I,null,D(r,(s,y)=>{var k;return n(),p("div",{key:y,class:q({conversation:!0,active:s.id===e.conversationId}),onClick:u=>e.onClick(s.id)},[l("div",Nt,[s!=null&&s.deleting?(n(),p("span",Dt,b(`${e.$t("chat.message.confirmDelete")}?`),1)):s!=null&&s.editing?(n(),p("span",At,[f(_,{modelValue:s.title,"onUpdate:modelValue":u=>s.title=u,onKeydown:X(u=>e.onConfirm(s),["enter"])},null,8,["modelValue","onUpdate:modelValue","onKeydown"])])):(s==null?void 0:s.title)||(s==null?void 0:s.messages)?(n(),p("span",Ot,b((s==null?void 0:s.title)||((k=s==null?void 0:s.messages[(s==null?void 0:s.messages.length)-1])==null?void 0:k.content)),1)):v("v-if",!0)]),l("div",Rt,[!(s!=null&&s.editing)&&!s.deleting?(n(),g(c,{key:0,icon:"fa-solid fa-edit",class:"icon icon-edit",onClick:O(u=>s.editing=!0,["stop"])},null,8,["onClick"])):v("v-if",!0),!(s!=null&&s.editing)&&!s.deleting?(n(),g(c,{key:1,icon:"fa-solid fa-trash",class:"icon icon-delete",onClick:O(u=>s.deleting=!0,["stop"])},null,8,["onClick"])):v("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(n(),g(c,{key:2,icon:"fa-solid fa-check",class:"icon icon-confirm",onClick:O(u=>e.onConfirm(s),["stop"])},null,8,["onClick"])):v("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(n(),g(c,{key:3,icon:"fa-solid fa-xmark",class:"icon icon-cancel",onClick:O(u=>{s.editing=!1,s.deleting=!1},["stop"])},null,8,["onClick"])):v("v-if",!0)])],10,It)}),128))]))),128))]))])}var qt=E(vt,[["render",Tt],["__scopeId","data-v-d866c834"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/SidePanel.vue"]]);const Mt=S({name:"LayoutChat",components:{SidePanel:qt,ElDrawer:Re,ElButton:te,FontAwesomeIcon:R},data(){return{drawer:!1}}}),Ut={class:"main"},Gt={class:"side"},Lt={class:"chat"};function Vt(e,t,a,m,w,o){const d=i("side-panel"),c=i("font-awesome-icon"),_=i("el-button"),r=i("el-drawer");return n(),p("div",Ut,[l("div",Gt,[K(e.$slots,"side",{},()=>[f(d)],!0)]),l("div",Lt,[K(e.$slots,"chat",{},void 0,!0)]),f(_,{round:"",class:"menu",onClick:t[0]||(t[0]=h=>e.drawer=!0)},{default:C(()=>[f(c,{icon:"fa-solid fa-bars",class:"icon-menu"})]),_:1}),f(r,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=h=>e.drawer=h),"with-header":!1,size:"290px",class:"drawer"},{default:C(()=>[f(d)]),_:1},8,["modelValue"])])}var Bt=E(Mt,[["render",Vt],["__scopeId","data-v-8d7a06d2"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Chat.vue"]]);const Ht=S({name:"ChatConversation",components:{InputBox:et,Introduction:wt,ModelSelector2:ct,Message:Ke,ApplicationStatus:$e,Layout:Bt},data(){var e,t;return{question:"",references:[],answering:!1,messages:((t=(e=this.$store.state.chat.conversations)==null?void 0:e.find(a=>{var m;return a.id===((m=this.$route.params.id)==null?void 0:m.toString())}))==null?void 0:t.messages)||[]}},computed:{model(){return this.$store.state.chat.model},conversationId(){var e;return(e=this.$route.params.id)==null?void 0:e.toString()},conversation(){var e;return(e=this.$store.state.chat.conversations)==null?void 0:e.find(t=>t.id===this.conversationId)},service(){return this.$store.state.chat.service},application(){return this.$store.state.chat.application},credential(){var e;return(e=this.$store.state.chat)==null?void 0:e.credential},needApply(){return this.$store.state.chat.status.getApplication===G.Success&&!this.application},conversations(){return this.$store.state.chat.conversations},initializing(){return this.$store.state.chat.status.getApplication===G.Request}},watch:{model(e){e&&this.onModelChanged()},conversationId(e){var t,a;e?(this.messages=((a=(t=this.conversations)==null?void 0:t.find(m=>m.id===e))==null?void 0:a.messages)||[],this.onScrollDown()):this.messages=[]}},async mounted(){await this.onGetService(),await this.onGetApplication(),await this.onGetConversations(),await this.onScrollDown()},methods:{async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("chat/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("chat/getApplication"),console.debug("end onGetApplication")},async onGetConversations(){console.debug("start onGetConversations"),await this.$store.dispatch("chat/getConversations"),console.debug("end onGetConversations")},async onDraft(e){this.question=e,this.onSubmit()},async onCreateNewConversation(){await this.$router.push({name:Q})},async onModelChanged(){await this.onCreateNewConversation(),await this.$store.dispatch("chat/getApplication")},async onSubmit(){if(this.references.length>0){let e=[];e.push({type:"text",text:this.question});for(let t=0;t<this.references.length;t++)e.push({type:"image_url",image_url:this.references[t]});this.messages.push({content:e,role:j})}else this.messages.push({content:this.question,role:j});console.debug("onSubmit",this.question,this.references),await this.onFetchAnswer()},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".dialogue");!e||!this.messages||this.messages.length===0||(e.scrollTop=e==null?void 0:e.scrollHeight)},0)},async onFetchAnswer(){var w;const e=(w=this.credential)==null?void 0:w.token,t=this.question,a=this.references;if(console.debug("validated",t,a),this.question="",this.references=[],!e||!t){console.error("no token or endpoint or question"),this.messages.push({error:{code:ee},role:T,state:N.FAILED});return}let m=this.conversationId;this.messages.push({content:"",role:T,state:N.PENDING}),console.debug("start to get answer",this.messages),this.onScrollDown(),this.answering=!0,L.chatConversation({question:t,model:this.model.name,references:a,id:this.conversationId,stateful:!0},{token:e,stream:o=>{console.debug("stream response",o),this.messages[this.messages.length-1]={role:T,content:o.answer,state:N.ANSWERING},m=o==null?void 0:o.id,this.onScrollDown()}}).then(async()=>{console.debug("finished fetch answer",this.messages),this.messages[this.messages.length-1].state=N.FINISHED,await this.$store.dispatch("chat/setConversation",{id:m,messages:this.messages}),this.answering=!1,this.conversationId||await this.$router.push({name:Y,params:{id:m}}),this.onScrollDown(),await this.$store.dispatch("chat/getConversations"),await this.$store.dispatch("chat/getApplication")}).catch(o=>{var d,c;if(this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].state=N.FAILED),console.error(o),ae.isCancel(o))this.messages[this.messages.length-1].error={code:ye};else if((d=o==null?void 0:o.response)!=null&&d.data){let _=(c=o==null?void 0:o.response)==null?void 0:c.data;Te(_)&&(_=JSON.parse(_)),this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error=_.error)}else this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error={code:Z});this.answering=!1})}}}),Pt={class:"dialogue"},Wt={key:1,class:"messages"},zt={class:"bottom"};function Ft(e,t,a,m,w,o){const d=i("model-selector2"),c=i("application-status"),_=i("introduction"),r=i("message"),h=i("input-box"),s=i("layout");return n(),g(s,null,{chat:C(()=>[f(d,{class:"selector"}),f(c,{initializing:e.initializing,application:e.application,"need-apply":e.needApply,service:e.service,onRefresh:t[0]||(t[0]=y=>e.$store.dispatch("chat/getApplication"))},null,8,["initializing","application","need-apply","service"]),l("div",Pt,[e.messages.length===0?(n(),g(_,{key:0,onDraft:e.onDraft},null,8,["onDraft"])):(n(),p("div",Wt,[(n(!0),p(I,null,D(e.messages,(y,k)=>(n(),g(r,{key:k,message:y,application:e.application,class:"message"},null,8,["message","application"]))),128))]))]),l("div",zt,[f(h,{disabled:e.answering,question:e.question,references:e.references,"onUpdate:question":t[1]||(t[1]=y=>e.question=y),"onUpdate:references":t[2]||(t[2]=y=>e.references=y),onSubmit:e.onSubmit},null,8,["disabled","question","references","onSubmit"])])]),_:1})}var as=E(Ht,[["render",Ft],["__scopeId","data-v-3ab2fb26"],["__file","/home/runner/work/Nexior/Nexior/src/pages/chat/Conversation.vue"]]);export{as as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as p}from"./vendor-others.2dd9c8c5.js";import{af as r}from"./vendor-fortawesome.41690bc6.js";import{_ as s}from"./index.
|
|
1
|
+
import{I as p}from"./vendor-others.2dd9c8c5.js";import{af as r}from"./vendor-fortawesome.41690bc6.js";import{_ as s}from"./index.5e521e48.js";import{j as i}from"./vendor-element-plus.b03cf0f5.js";import{H as l,al as t,o as n,L as a,M as m,V as d}from"./vendor-@vue.ed4a7688.js";const _=l({name:"CopyToClipboard",components:{FontAwesomeIcon:r,ElTooltip:i},props:{content:{type:String,required:!0}},data(){return{copied:!1}},methods:{onCopy(){p(this.content,{debug:!0}),this.copied=!0,setTimeout(()=>{this.copied=!1},3e3)}}});function f(o,u,C,y,k,b){const e=t("font-awesome-icon"),c=t("el-tooltip");return o.copied?(n(),a(c,{key:1,visible:o.copied,effect:"dark",content:o.$t("common.message.copied"),placement:"top-start"},{default:m(()=>[d(e,{icon:"fa-solid fa-check",class:"icon-check"})]),_:1},8,["visible","content"])):(n(),a(e,{key:0,icon:"fa-regular fa-copy",class:"icon-copy",onClick:o.onCopy},null,8,["onClick"]))}var $=s(_,[["render",f],["__scopeId","data-v-1ba27772"],["__file","/home/runner/work/Nexior/Nexior/src/components/common/CopyToClipboard.vue"]]);export{$ as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var b=Object.defineProperty,y=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var u=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var m=(e,o,t)=>o in e?b(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,p=(e,o)=>{for(var t in o||(o={}))V.call(o,t)&&m(e,t,o[t]);if(u)for(var t of u(o))B.call(o,t)&&m(e,t,o[t]);return e},_=(e,o)=>y(e,D(o));import{B as v,z as x}from"./vendor-others.2dd9c8c5.js";import{S as N,s as O,r as h,_ as f}from"./index.
|
|
1
|
+
var b=Object.defineProperty,y=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var u=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var m=(e,o,t)=>o in e?b(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,p=(e,o)=>{for(var t in o||(o={}))V.call(o,t)&&m(e,t,o[t]);if(u)for(var t of u(o))B.call(o,t)&&m(e,t,o[t]);return e},_=(e,o)=>y(e,D(o));import{B as v,z as x}from"./vendor-others.2dd9c8c5.js";import{S as N,s as O,r as h,_ as f}from"./index.5e521e48.js";import{k as g,l as H,m as M}from"./vendor-element-plus.b03cf0f5.js";import{H as C,al as l,o as s,L as i,M as c,V as L,e as T,ai as q,W as A}from"./vendor-@vue.ed4a7688.js";import{h as I,C as P,a as k}from"./vendor-vue-dark-switch.05cc8b71.js";const U=C({name:"LocaleSelector",components:{ElDialog:g,ElSelect:H,ElOption:M},props:{visible:{type:Boolean,default:!1}},emits:["close"],data(){return{value:this.$i18n.locale,locales:N}},methods:{async onSelectLocale(e){this.$router.push({query:_(p({},this.$route.query),{locale:void 0})}),await O(e),this.setCookie(e),window.location.reload()},setCookie(e){v("LOCALE",e,{path:"/",domain:h()})}}});function z(e,o,t,$,w,E){const n=l("el-option"),r=l("el-select"),d=l("el-dialog");return s(),i(d,{"model-value":e.visible,width:300,class:"text-center",onClose:o[1]||(o[1]=a=>e.$emit("close"))},{default:c(()=>[L(r,{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=a=>e.value=a),onChange:e.onSelectLocale},{default:c(()=>[(s(!0),T(A,null,q(e.locales,(a,S)=>(s(),i(n,{key:S,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["model-value"])}var X=f(U,[["render",z],["__scopeId","data-v-32a102bd"],["__file","/home/runner/work/Nexior/Nexior/src/components/common/LocaleSelector.vue"]]);const F=C({components:{DarkSwitch:I,ElDialog:g},props:{visible:{type:Boolean,default:!0}},emits:["update:dark","close"],computed:{dark(){return x("THEME")==="dark"},switchValue(){return P.value}},watch:{switchValue(e){this.setCookie(e)},dark(e){document.documentElement.classList.toggle("dark",e),this.setCookie(this.dark)}},mounted(){this.dark?(k(!0),document.documentElement.classList.add("dark")):(k(!1),document.documentElement.classList.remove("dark"))},methods:{setCookie(e){v("THEME",e?"dark":"light",{path:"/",domain:h()})}}});function R(e,o,t,$,w,E){const n=l("dark-switch"),r=l("el-dialog");return s(),i(r,{"model-value":e.visible,width:200,class:"text-center",onClose:o[0]||(o[0]=d=>e.$emit("close"))},{default:c(()=>[L(n,{class:"switch","dark-background":"#333","light-background":"#fff"})]),_:1},8,["model-value"])}var Y=f(F,[["render",R],["__file","/home/runner/work/Nexior/Nexior/src/components/common/DarkSelector.vue"]]);export{Y as D,X as L};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./vendor-others.2dd9c8c5.js";import{o as w,g as Y}from"./order.50f045ad.js";import{_ as V}from"./index.5e521e48.js";import{O as k}from"./order.1bf5c3a2.js";import{Q as Z}from"./vendor-qrcode.b3afa8d7.js";import{k as F,n as H,o as U,i as x,s as ee,u as ae,w as te,x as re,y as oe,A as se}from"./vendor-element-plus.b03cf0f5.js";import{H as D,al as l,o as r,L as c,M as a,V as t,f as m,S as n,U as i,aK as L,aL as Q,e as p,W as ie,T as v,Q as z}from"./vendor-@vue.ed4a7688.js";import{I as le}from"./application.ea1e2a72.js";import"./vendor-axios.168e6950.js";import"./vendor-fortawesome.41690bc6.js";const de=D({name:"PayOrderDialog",components:{ElDialog:F,QrCode:Z,ElRow:H,ElCol:U},props:{modelValue:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:["hide","update:modelValue"],data(){return{refreshTimer:void 0}},mounted(){this.onRefresh()},unmounted(){this.refreshTimer&&clearTimeout(this.refreshTimer)},methods:{onRefresh(){if(!this.modelValue.id){console.error("id does not exist");return}w.refresh(this.modelValue.id).then(({data:e})=>{e.state!==k.PAID?setTimeout(()=>{this.onRefresh()},2e3):this.$emit("hide"),this.$emit("update:modelValue",e)}).catch(()=>{setTimeout(()=>{this.onRefresh()},2e3)})}}}),ne=e=>(L("data-v-875060be"),e=e(),Q(),e),pe={class:"paycode wechat"},ue={class:"help-text"},ye=ne(()=>m("div",{class:"help-img"},[m("img",{src:"https://midas.gtimg.cn/enterprise/images/ep_sys_wx_tip.jpg"})],-1));function ce(e,o,I,E,T,C){const u=l("qr-code"),f=l("el-col"),P=l("el-row"),W=l("el-dialog");return r(),c(W,{"model-value":e.visible,title:e.$t("application.title.buyService"),width:"500px",center:""},{default:a(()=>[t(P,{class:"paycodes"},{default:a(()=>[t(f,{span:12},{default:a(()=>{var h,g;return[m("div",pe,[(h=e.modelValue)!=null&&h.pay_url?(r(),c(u,{key:0,value:(g=e.modelValue)==null?void 0:g.pay_url,size:200,class:"qrcode m-auto"},null,8,["value"])):n("v-if",!0),m("p",ue,i(e.$t("order.message.wechatPayHelp")),1)])]}),_:1}),t(f,{span:12},{default:a(()=>[ye]),_:1})]),_:1})]),_:1},8,["model-value","title"])}var me=V(de,[["render",ce],["__scopeId","data-v-875060be"],["__file","/home/runner/work/Nexior/Nexior/src/components/order/WechatPay.vue"]]);const fe=D({name:"PayOrderDialog",components:{ElDialog:F},props:{modelValue:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:["hide","update:modelValue"],data(){return{refreshTimer:void 0}},watch:{visible:{handler(e){e&&this.modelValue.pay_url&&window.open(this.modelValue.pay_url,"_blank")}}},mounted(){this.onRefresh()},unmounted(){this.refreshTimer&&clearTimeout(this.refreshTimer)},methods:{onRefresh(){if(!this.modelValue.id){console.error("id does not exist");return}w.refresh(this.modelValue.id).then(({data:e})=>{e.state!==k.PAID?setTimeout(()=>{this.onRefresh()},2e3):this.$emit("hide"),this.$emit("update:modelValue",e)}).catch(()=>{setTimeout(()=>{this.onRefresh()},5e3)})}}}),he={class:"text-center"};function _e(e,o,I,E,T,C){const u=l("el-dialog");return r(),c(u,{"model-value":e.visible,title:e.$t("application.title.buyService"),width:"500px",center:""},{default:a(()=>[m("p",he,i(e.$t("order.message.buyInExternalUrl")),1)]),_:1},8,["model-value","title"])}var ve=V(fe,[["render",_e],["__scopeId","data-v-85959ecc"],["__file","/home/runner/work/Nexior/Nexior/src/components/order/StripePay.vue"]]);var G=(e=>(e.WechatPay="WechatPay",e.Stripe="Stripe",e.AliPay="AliPay",e))(G||{});const $e=D({name:"ConsoleOrderDetail",components:{ElButton:x,ElRow:H,ElCard:ee,ElCol:U,ElSkeleton:ae,ElDivider:te,ElAlert:re,ElDescriptions:oe,ElDescriptionsItem:se,WechatPayOrder:me,StripePayOrder:ve},data(){return{PayWay:G,payWay:"WechatPay",OrderState:k,order:void 0,showPayWays:!0,loading:!1,paying:!1,prepaying:!1,applicationType:le}},computed:{id(){var e,o;return(o=(e=this.$route.params)==null?void 0:e.id)==null?void 0:o.toString()},redirect(){var e;return(e=this.$route.query)==null?void 0:e.redirect}},watch:{order:{handler(e){if((e==null?void 0:e.state)===k.PAID){setTimeout(()=>{var o;this.redirect&&window.location.replace((o=this.redirect)==null?void 0:o.toString())},2e3);return}},deep:!0}},mounted(){this.onFetchData()},methods:{getPriceString:Y,onFetchData(){this.loading=!0,w.refresh(this.id).then(({data:e})=>{this.order=e,e.pay_way&&(this.payWay=e.pay_way),this.loading=!1}).catch(()=>{this.loading=!1})},onRepay(){this.paying=!0},onPay(){this.prepaying=!0,w.pay(this.id,{pay_way:this.payWay}).then(({data:e})=>{this.prepaying=!1,this.order=e,this.order.price&&this.order.price>0&&(this.paying=!0)}).catch(()=>{this.prepaying=!1})}}}),K=e=>(L("data-v-2d1dc98e"),e=e(),Q(),e),ge={class:"title"},be={key:0,class:"pt-5"},we={key:1,class:"order"},ke={key:0},Pe={key:1},We={key:0,class:"price unfree"},Se={key:1,class:"price free"},Ve={key:0,class:"payways mb-6"},De=K(()=>m("span",{class:"payicon wechatpay"},null,-1)),Ie={class:"payname"},Ee=K(()=>m("span",{class:"payicon stripe"},null,-1)),Te={class:"payname"},Ce={key:1},Oe={key:2};function Ne(e,o,I,E,T,C){const u=l("el-col"),f=l("el-row"),P=l("el-skeleton"),W=l("copy-to-clipboard"),h=l("el-descriptions-item"),g=l("el-descriptions"),S=l("el-divider"),O=l("el-alert"),N=l("el-button"),M=l("el-card"),X=l("wechat-pay-order"),J=l("stripe-pay-order");return r(),p(ie,null,[t(f,{class:"panel"},{default:a(()=>[t(u,{span:24},{default:a(()=>[t(f,null,{default:a(()=>[t(u,{span:24},{default:a(()=>[m("h2",ge,i(e.$t("order.title.info")),1)]),_:1})]),_:1}),t(f,null,{default:a(()=>[t(u,{span:24},{default:a(()=>[t(M,{shadow:"hover"},{default:a(()=>{var _,R,A,q;return[t(f,null,{default:a(()=>[t(u,{span:16,offset:4},{default:a(()=>[e.loading?(r(),p("div",be,[t(P,{animated:""})])):(r(),p("div",we,[t(g,{column:1},{default:a(()=>{var $,b,B;return[t(h,{label:e.$t("order.field.id")},{default:a(()=>{var s,d,y;return[m("span",null,i((s=e.order)==null?void 0:s.id),1),(d=e.order)!=null&&d.id?(r(),c(W,{key:0,content:(y=e.order)==null?void 0:y.id,class:"inline-block"},null,8,["content"])):n("v-if",!0)]}),_:1},8,["label"]),t(h,{label:e.$t("order.field.description")},{default:a(()=>{var s;return[v(i((s=e.order)==null?void 0:s.description),1)]}),_:1},8,["label"]),(b=($=e.order)==null?void 0:$.application)!=null&&b.service?(r(),c(h,{key:0,label:e.$t("order.field.api")},{default:a(()=>{var s,d,y;return[v(i((y=(d=(s=e.order)==null?void 0:s.application)==null?void 0:d.service)==null?void 0:y.title),1)]}),_:1},8,["label"])):n("v-if",!0),(B=e.order)!=null&&B.pay_way?(r(),c(h,{key:1,label:e.$t("order.field.payWay")},{default:a(()=>{var s,d;return[((s=e.order)==null?void 0:s.pay_way)===e.PayWay.WechatPay?(r(),p("span",ke,i(e.$t("order.title.wechatPay")),1)):n("v-if",!0),((d=e.order)==null?void 0:d.pay_way)===e.PayWay.Stripe?(r(),p("span",Pe,i(e.$t("order.title.stripe")),1)):n("v-if",!0)]}),_:1},8,["label"])):n("v-if",!0),t(h,{label:e.$t("order.field.amount")},{default:a(()=>{var s,d,y,j;return[v(i((s=e.order)==null?void 0:s.amount)+" "+i(e.$t(`service.unit.${(j=(y=(d=e.order)==null?void 0:d.application)==null?void 0:y.service)==null?void 0:j.unit}`)),1)]}),_:1},8,["label"]),t(h,{label:e.$t("order.field.createdAt")},{default:a(()=>{var s;return[v(i(e.$dayjs.format((s=e.order)==null?void 0:s.created_at)),1)]}),_:1},8,["label"]),t(h,{label:e.$t("order.field.price")},{default:a(()=>{var s,d,y;return[((s=e.order)==null?void 0:s.price)&&((d=e.order)==null?void 0:d.price)>0?(r(),p("span",We,i(e.getPriceString({value:(y=e.order)==null?void 0:y.price})),1)):(r(),p("span",Se,i(e.$t("order.message.free")),1))]}),_:1},8,["label"])]}),_:1})]))]),_:1})]),_:1}),((_=e.order)==null?void 0:_.state)===e.OrderState.PAID?(r(),c(f,{key:0,class:"mb-5"},{default:a(()=>[t(u,{span:16,offset:4},{default:a(()=>[t(S,{"border-style":"dashed"}),t(O,{title:e.$t("order.message.paidSuccessfully"),type:"success","show-icon":"",closable:!1},null,8,["title"])]),_:1})]),_:1})):n("v-if",!0),((R=e.order)==null?void 0:R.state)===e.OrderState.EXPIRED?(r(),c(f,{key:1,class:"mb-5"},{default:a(()=>[t(u,{span:16,offset:4},{default:a(()=>[t(S,{"border-style":"dashed"}),t(O,{title:e.$t("order.message.orderExpired"),type:"error","show-icon":"",closable:!1},null,8,["title"])]),_:1})]),_:1})):n("v-if",!0),((A=e.order)==null?void 0:A.state)===e.OrderState.PENDING||((q=e.order)==null?void 0:q.state)===e.OrderState.FAILED?(r(),c(f,{key:2},{default:a(()=>[t(u,{span:16,offset:4},{default:a(()=>{var $;return[t(S,{"border-style":"dashed"}),e.showPayWays&&e.order.price&&e.order.price>0&&!e.order.pay_way?(r(),p("div",Ve,[(r(),p("div",{key:0,class:z({payway:!0,wechatpay:!0,active:e.payWay===e.PayWay.WechatPay}),onClick:o[0]||(o[0]=b=>e.payWay=e.PayWay.WechatPay)},[De,m("span",Ie,i(e.$t("order.title.wechatPay")),1)],2)),n("v-if",!0),(r(),p("div",{key:2,class:z({payway:!0,stripe:!0,active:e.payWay===e.PayWay.Stripe}),onClick:o[2]||(o[2]=b=>e.payWay=e.PayWay.Stripe)},[Ee,m("span",Te,i(e.$t("order.title.stripe")),1)],2))])):n("v-if",!0),($=e.order)!=null&&$.pay_way?(r(),p("div",Oe,[t(N,{type:"primary",round:"",size:"large",class:"btn-repay",onClick:e.onRepay},{default:a(()=>[v(i(e.$t("common.button.repay")),1)]),_:1},8,["onClick"])])):(r(),p("div",Ce,[t(N,{loading:e.prepaying,round:"",type:"primary",size:"large",class:"btn-pay",onClick:e.onPay},{default:a(()=>[v(i(e.$t("common.button.pay")),1)]),_:1},8,["loading","onClick"])]))]}),_:1})]),_:1})):n("v-if",!0)]}),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),e.order&&e.payWay===e.PayWay.WechatPay?(r(),c(X,{key:0,modelValue:e.order,"onUpdate:modelValue":o[3]||(o[3]=_=>e.order=_),visible:e.paying,onHide:o[4]||(o[4]=_=>e.paying=!1)},null,8,["modelValue","visible"])):n("v-if",!0),e.order&&e.payWay===e.PayWay.Stripe?(r(),c(J,{key:1,modelValue:e.order,"onUpdate:modelValue":o[5]||(o[5]=_=>e.order=_),visible:e.paying,onHide:o[6]||(o[6]=_=>e.paying=!1)},null,8,["modelValue","visible"])):n("v-if",!0)],64)}var Qe=V($e,[["render",Ne],["__scopeId","data-v-2d1dc98e"],["__file","/home/runner/work/Nexior/Nexior/src/pages/console/order/Detail.vue"]]);export{Qe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-others.2dd9c8c5.js";import{P as y}from"./Pagination.
|
|
1
|
+
import"./vendor-others.2dd9c8c5.js";import{P as y}from"./Pagination.5f191b6e.js";import{C as v}from"./CopyToClipboard.89729339.js";import{b as $}from"./distribution.93529896.js";import{_ as C}from"./index.5e521e48.js";import{n as H,o as D,p as F,q as E,s as k}from"./vendor-element-plus.b03cf0f5.js";import{H as P,al as s,av as q,L as h,M as o,o as m,V as e,f as a,U as n,O as x}from"./vendor-@vue.ed4a7688.js";import"./vendor-fortawesome.41690bc6.js";import"./vendor-axios.168e6950.js";const N=P({name:"ConsoleDistributionList",components:{Pagination:y,CopyToClipboard:v,ElRow:H,ElCol:D,ElTable:F,ElTableColumn:E,ElCard:k},data(){return{distributionHistories:[],distributionStatus:void 0,loading:!1,total:void 0,limit:10}},computed:{redirect(){return this.$route.query.redirect},page(){var t;return parseInt(((t=this.$route.query.page)==null?void 0:t.toString())||"1")}},watch:{page:{handler(){this.onFetchData()}}},mounted(){this.onFetchData()},methods:{onPageChange(t){var u;this.$router.push({name:(u=this.$route.name)==null?void 0:u.toString(),query:{page:t}})},onFetchData(){this.loading=!0,Promise.all([this.onFetchDistributionHistory()]).finally(()=>{this.loading=!1})},async onFetchDistributionHistory(){const{data:t}=await $.getAll({user_id:this.$store.getters.user.id,ordering:"-created_at",limit:this.limit,offset:(this.page-1)*this.limit});this.distributionHistories=t.items,this.total=t.count}}}),S={class:"title"},A={class:"key"},B={class:"copy"},I={class:"key"},T={class:"copy"},V={class:"price"},z={class:"description"},L={class:"description"},O={class:"created-at"},j={class:"pagination m-v-lg"};function M(t,u,R,U,G,J){const c=s("el-col"),p=s("el-row"),_=s("copy-to-clipboard"),r=s("el-table-column"),f=s("el-table"),b=s("el-card"),g=s("pagination"),w=q("loading");return m(),h(p,{class:"panel"},{default:o(()=>[e(c,{span:24},{default:o(()=>[e(p,null,{default:o(()=>[e(c,{span:24},{default:o(()=>[a("h2",S,n(t.$t("common.title.distributionHistory")),1)]),_:1})]),_:1}),e(p,null,{default:o(()=>[e(c,{span:24},{default:o(()=>[e(b,{shadow:"hover"},{default:o(()=>[x((m(),h(f,{data:t.distributionHistories,stripe:""},{default:o(()=>[e(r,{prop:"id",label:t.$t("distribution.field.id"),"class-name":"text-center",width:"350px"},{default:o(i=>[a("span",A,n(i.row.id),1),a("span",B,[e(_,{content:i.row.id},null,8,["content"])])]),_:1},8,["label"]),e(r,{prop:"id",label:t.$t("distribution.field.userId"),"class-name":"text-center",width:"350px"},{default:o(i=>[a("span",I,n(i.row.user_id),1),a("span",T,[e(_,{content:i.row.user_id},null,8,["content"])])]),_:1},8,["label"]),e(r,{label:t.$t("distribution.field.price"),width:"100px"},{default:o(i=>{var l,d;return[a("span",V,"\xA5"+n((d=(l=i.row)==null?void 0:l.price)==null?void 0:d.toFixed(2)),1)]}),_:1},8,["label"]),e(r,{label:t.$t("distribution.field.reward"),width:"100px"},{default:o(i=>{var l,d;return[a("span",z,"\uFFE5"+n((d=(l=i.row)==null?void 0:l.reward)==null?void 0:d.toFixed(2)),1)]}),_:1},8,["label"]),e(r,{label:t.$t("distribution.field.percentage"),width:"100px"},{default:o(i=>[a("span",L,n(i.row.percentage)+"%",1)]),_:1},8,["label"]),e(r,{label:t.$t("distribution.field.createdAt"),width:"200px"},{default:o(i=>[a("span",O,n(t.$dayjs.format(i.row.created_at)),1)]),_:1},8,["label"])]),_:1},8,["data"])),[[w,t.loading]])]),_:1})]),_:1})]),_:1}),e(p,null,{default:o(()=>[e(c,{span:10,offset:14},{default:o(()=>[a("div",j,[e(g,{"current-page":t.page,"page-size":t.limit,total:t.total,onChange:t.onPageChange},null,8,["current-page","page-size","total","onChange"])])]),_:1})]),_:1})]),_:1})]),_:1})}var it=C(N,[["render",M],["__scopeId","data-v-63f0e9ed"],["__file","/home/runner/work/Nexior/Nexior/src/pages/distribution/History.vue"]]);export{it as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./vendor-others.2dd9c8c5.js";import{d as O,_ as T,ah as A,R,a as P,b as B,p as H,z as V,c as M}from"./index.5e521e48.js";import{af as L}from"./vendor-fortawesome.41690bc6.js";import{L as q,D as z}from"./DarkSelector.d20d99ed.js";import{d as D,k as X,e as j,f as F,h as J}from"./vendor-element-plus.b03cf0f5.js";import{H as U,al as s,o as g,L as E,M as p,V as a,T as N,U as I,S,f as r,e as C,a0 as W,W as G,ai as Q,Q as K}from"./vendor-@vue.ed4a7688.js";import"./vendor-axios.168e6950.js";import"./vendor-vue-dark-switch.05cc8b71.js";const Y=U({name:"HelpEntry",components:{ElImage:D,ElDialog:X,ElPopover:j,ElMenu:F,ElMenuItem:J,FontAwesomeIcon:L},props:{visible:{type:Boolean,default:!0}},emits:["close"],computed:{site(){return this.$store.state.site}},methods:{onJoin(){var e,t,n,i;window.open((i=(n=(t=(e=this.$store.state.site)==null?void 0:e.features)==null?void 0:t.support)==null?void 0:n.discord)==null?void 0:i.url,"_blank")},onProfit(){this.$router.push({name:O})}}}),Z={class:"flex"},ee={class:"flex-1 text-center"};function te(e,t,n,i,u,x){const m=s("font-awesome-icon"),l=s("el-menu-item"),f=s("el-image"),_=s("el-popover"),h=s("el-menu"),o=s("el-dialog");return g(),E(o,{"model-value":e.visible,width:200,class:"text-center",onClose:t[0]||(t[0]=c=>e.$emit("close"))},{default:p(()=>[a(h,{collapse:!1,class:"menu"},{default:p(()=>{var c,v,$,k;return[(k=($=(v=(c=e.site)==null?void 0:c.features)==null?void 0:v.support)==null?void 0:$.discord)!=null&&k.enabled?(g(),E(l,{key:0,index:"1",onClick:e.onJoin},{title:p(()=>[N(I(e.$t("common.message.joinDiscord")),1)]),default:p(()=>[a(m,{icon:"fa-brands fa-discord",class:"mr-2"})]),_:1},8,["onClick"])):S("v-if",!0),a(_,{width:350,trigger:"hover"},{reference:p(()=>{var d,b,w,y;return[(y=(w=(b=(d=e.site)==null?void 0:d.features)==null?void 0:b.support)==null?void 0:w.wechat)!=null&&y.enabled?(g(),E(l,{key:0,index:"2"},{title:p(()=>[N(I(e.$t("common.message.addWeChat")),1)]),default:p(()=>[a(m,{icon:"fa-brands fa-weixin",class:"mr-2"})]),_:1})):S("v-if",!0)]}),default:p(()=>{var d,b,w,y;return[r("div",Z,[r("div",ee,[a(f,{src:(y=(w=(b=(d=e.site)==null?void 0:d.features)==null?void 0:b.support)==null?void 0:w.wechat)==null?void 0:y.qr},null,8,["src"])])])]}),_:1})]}),_:1})]),_:1},8,["model-value"])}var oe=T(Y,[["render",te],["__scopeId","data-v-2800d84d"],["__file","/home/runner/work/Nexior/Nexior/src/components/common/HelpDialog.vue"]]);const se=U({name:"ProfileIndex",components:{ElImage:D,HelpDialog:oe,FontAwesomeIcon:L,LocaleSelector:q,DarkSelector:z},data(){return{operating:{locale:!1,dark:!1,help:!1}}},computed:{user(){return this.$store.getters.user},showSupport(){var e,t,n,i,u,x,m,l,f,_,h,o,c,v,$,k,d;return((u=(i=(n=(t=(e=this.$store)==null?void 0:e.state)==null?void 0:t.site)==null?void 0:n.features)==null?void 0:i.support)==null?void 0:u.enabled)&&(((h=(_=(f=(l=(m=(x=this.$store)==null?void 0:x.state)==null?void 0:m.site)==null?void 0:l.features)==null?void 0:f.support)==null?void 0:_.discord)==null?void 0:h.enabled)||((d=(k=($=(v=(c=(o=this.$store)==null?void 0:o.state)==null?void 0:c.site)==null?void 0:v.features)==null?void 0:$.support)==null?void 0:k.wechat)==null?void 0:d.enabled))},showSite(){var e,t,n,i,u;return(u=(n=(t=(e=this.$store)==null?void 0:e.state)==null?void 0:t.site)==null?void 0:n.admins)==null?void 0:u.includes((i=this.$store.getters.user)==null?void 0:i.id)},links(){return[{key:"profile",text:this.$t("console.menu.userProfile"),href:`${A()}/user/profile`,icon:"fa-regular fa-user"},{key:"application-list",text:this.$t("console.menu.applicationList"),name:R,icon:"fa-solid fa-cube"},{key:"order-list",text:this.$t("console.menu.orderList"),name:P,icon:"fa-solid fa-store"},{key:"usage-list",text:this.$t("console.menu.usageList"),name:B,icon:"fa-solid fa-rotate-left"},{key:"distribution-index",text:this.$t("console.menu.distributionIndex"),name:O,icon:"fa-solid fa-coins"},...this.showSite?[{key:"site-index",text:this.$t("common.nav.site"),name:H,icon:"fa-solid fa-gear"}]:[],{key:"dark-setting",text:this.$t("common.nav.darkMode"),icon:"fa-solid fa-moon",callback:()=>{this.operating.dark=!0}},{key:"locale-setting",text:this.$t("common.nav.locale"),icon:"fa-solid fa-language",callback:()=>{this.operating.locale=!0}},{key:"developerPlatform",text:this.$t("console.menu.developerPlatform"),href:V(),icon:"fa-solid fa-laptop-code"},...this.showSupport?[{key:"support",text:this.$t("common.nav.support"),callback:()=>{this.operating.help=!0},icon:"fa-solid fa-question"}]:[],{key:"logout",text:this.$t("common.nav.logOut"),icon:"fa-solid fa-arrow-right-from-bracket",callback:async()=>{await this.$store.dispatch("resetAll"),await this.$store.dispatch("chat/resetAll"),await this.$store.dispatch("midjourney/resetAll"),await this.$store.dispatch("chatdoc/resetAll"),await this.$store.dispatch("qrart/resetAll"),await this.$store.dispatch("login")}}]}},methods:{onHome(){this.$router.push({name:M})},onNavigate(e){e.name?this.$router.push({name:e.name}):e.href?window.open(e.href,"_blank"):e.callback&&e.callback()}}}),ae={class:"profile"},ne={class:"info"},ie={class:"links"},re=["onClick"],le={class:"icon"},ce={class:"text"},de={class:"suffix"};function pe(e,t,n,i,u,x){const m=s("el-image"),l=s("font-awesome-icon"),f=s("locale-selector"),_=s("dark-selector"),h=s("help-dialog");return g(),C("div",ae,[r("div",ne,[a(m,{src:e.user.avatar,fit:"cover",class:"avatar"},null,8,["src"]),r("h2",null,I(e.user.username),1),r("div",{style:W({backgroundImage:"url("+e.user.avatar+")"}),class:"background"},null,4)]),r("div",ie,[(g(!0),C(G,null,Q(e.links,(o,c)=>(g(),C("a",{key:c,class:K({link:!0,active:e.$route.name===o.name}),onClick:v=>e.onNavigate(o)},[r("span",le,[a(l,{icon:o.icon,class:"text-sm"},null,8,["icon"])]),r("span",ce,I(o.text),1),r("span",de,[a(l,{icon:"fa-solid fa-chevron-right",class:"text-sm"})])],10,re))),128))]),a(f,{visible:e.operating.locale==!0,onClose:t[0]||(t[0]=o=>e.operating.locale=!1)},null,8,["visible"]),a(_,{visible:e.operating.dark==!0,onClose:t[1]||(t[1]=o=>e.operating.dark=!1)},null,8,["visible"]),a(h,{visible:e.operating.help==!0,onClose:t[2]||(t[2]=o=>e.operating.help=!1)},null,8,["visible"])])}var ke=T(se,[["render",pe],["__scopeId","data-v-0a2212f8"],["__file","/home/runner/work/Nexior/Nexior/src/pages/profile/Index.vue"]]);export{ke as default};
|