23 lines
57 KiB
JavaScript
23 lines
57 KiB
JavaScript
import{ay as Z,aA as lt,aB as w,aO as N,aV as ye,aF as $,aG as t,aD as n,aH as e,aI as l,aJ as c,b2 as P,ci as he,aE as g,cf as Ue,aQ as xe,aT as Y,aK as k,aS as ie,bZ as ot,c0 as Je,aC as A,b3 as we,az as it,ce as Re,b1 as H,aW as K,aX as pe,aY as de,cU as qe,bc as ve,c$ as nt,cx as st,aZ as ut,c1 as ct,b6 as Pe,bD as $e,cY as Ge,en as Se,eo as We,cD as Ve,cq as Te,ep as M,eq as De,aP as rt,er as Le,cC as je,cM as pt,cN as dt,b7 as vt,b8 as Ye,bX as Ne,bG as Xe,bH as Ie}from"./admin-DgPvPHD7.js";import{_ as mt}from"./SettingAPIKeyDialog.vue_vue_type_script_setup_true_lang-BgcuZbaB.js";const _t=""+new URL("window1-yunSyWkk.png",import.meta.url).href,ft=""+new URL("window3-DjMr2HXo.png",import.meta.url).href,gt=""+new URL("window2-D3eE6zm4.png",import.meta.url).href,ht={class:"border"},wt={class:"title p-16 bold"},yt={class:"code layout-bg border-t p-8"},At={class:"flex-between p-8"},bt={class:"bold"},kt={class:"pre-wrap p-8 pt-0"},Dt={class:"border"},$t={class:"title p-16 bold"},Vt={class:"code layout-bg border-t p-8"},xt={class:"flex-between p-8"},Ct={class:"bold"},Ot={class:"pre-wrap p-8 pt-0"},It={class:"border"},St={class:"title p-16 bold"},Ut={class:"code layout-bg border-t p-8"},Bt={class:"flex-between p-8"},Lt={class:"bold"},Et={class:"pre-wrap p-8 pt-0"},Rt=Z({__name:"EmbedDialog",props:{data:Object,apiInputParams:String},emits:["addData"],setup(R,{expose:f,emit:I}){const{application:V}=lt(),D=R,S=w(!1),y=w(""),C=w(""),d=w(""),a=N(()=>D.apiInputParams?"?"+D.apiInputParams:""),i=N(()=>D.apiInputParams?"&"+D.apiInputParams:""),x=N(()=>D.apiInputParams?"?mode=mobile&"+D.apiInputParams:"?mode=mobile");return ye(S,p=>{p||(y.value="",C.value="",d.value="")}),f({open:p=>{y.value=`<iframe
|
||
src="${V.location+p+a.value}"
|
||
style="width: 100%; height: 100%;"
|
||
frameborder="0"
|
||
allow="microphone">
|
||
</iframe>
|
||
`,C.value=`<script
|
||
async
|
||
defer
|
||
src="${V.location}api/embed?protocol=${window.location.protocol.replace(":","")}&host=${window.location.host}&token=${p}${i.value}">
|
||
<\/script>
|
||
`,d.value=`<iframe
|
||
src="${V.location+p+x.value}"
|
||
style="width: 100%; height: 100%;"
|
||
frameborder="0"
|
||
allow="microphone">
|
||
</iframe>
|
||
`,S.value=!0}}),(p,r)=>{const h=n("AppIcon"),B=n("el-button"),b=n("el-scrollbar"),s=n("el-col"),v=n("el-row"),U=n("el-dialog");return g(),$(U,{title:p.$t("views.applicationOverview.appInfo.embedInWebsite"),modelValue:S.value,"onUpdate:modelValue":r[3]||(r[3]=o=>S.value=o),width:"900",class:"embed-dialog","close-on-click-modal":!1,"close-on-press-escape":!1},{default:t(()=>[e(v,{gutter:12},{default:t(()=>[e(s,{span:8},{default:t(()=>[l("div",ht,[l("p",wt,c(p.$t("views.applicationOverview.appInfo.EmbedDialog.fullscreenModeTitle")),1),r[4]||(r[4]=l("img",{src:_t,alt:"",class:"ml-8",height:"150"},null,-1)),l("div",yt,[l("div",At,[l("span",bt,c(p.$t("views.applicationOverview.appInfo.EmbedDialog.copyInstructions")),1),e(B,{text:"",onClick:r[0]||(r[0]=o=>P(he)(y.value))},{default:t(()=>[e(h,{iconName:"app-copy"})]),_:1})]),e(b,{height:"180",always:""},{default:t(()=>[l("div",kt,c(y.value),1)]),_:1})])])]),_:1}),e(s,{span:8},{default:t(()=>[l("div",Dt,[l("p",$t,c(p.$t("views.applicationOverview.appInfo.EmbedDialog.mobileModeTitle")),1),r[5]||(r[5]=l("img",{src:ft,alt:"",class:"ml-8",height:"150"},null,-1)),l("div",Vt,[l("div",xt,[l("span",Ct,c(p.$t("views.applicationOverview.appInfo.EmbedDialog.copyInstructions")),1),e(B,{text:"",onClick:r[1]||(r[1]=o=>P(he)(d.value))},{default:t(()=>[e(h,{iconName:"app-copy"})]),_:1})]),e(b,{height:"180",always:""},{default:t(()=>[l("div",Ot,c(d.value),1)]),_:1})])])]),_:1}),e(s,{span:8},{default:t(()=>[l("div",It,[l("p",St,c(p.$t("views.applicationOverview.appInfo.EmbedDialog.floatingModeTitle")),1),r[6]||(r[6]=l("img",{src:gt,alt:"",class:"ml-8",height:"150"},null,-1)),l("div",Ut,[l("div",Bt,[l("span",Lt,c(p.$t("views.applicationOverview.appInfo.EmbedDialog.copyInstructions")),1),e(B,{text:"",onClick:r[2]||(r[2]=o=>P(he)(C.value))},{default:t(()=>[e(h,{iconName:"app-copy"})]),_:1})]),e(b,{height:"180",always:""},{default:t(()=>[l("div",Et,c(C.value),1)]),_:1})])])]),_:1})]),_:1})]),_:1},8,["title","modelValue"])}}}),Tt=Ue(Rt,[["__scopeId","data-v-3a7d81c5"]]),Pt={class:"vertical-middle lighter break-all"},zt={class:"mr-4"},Ft=Z({__name:"APIKeyDialog",emits:["addData"],setup(R,{expose:f,emit:I}){const V=xe(),{params:{id:D}}=V,S=N(()=>V.path.includes("resource-management")?"systemManage":"workspace"),y=w(),C=w(!1),d=w(!1),a=w(null);ye(C,b=>{b||(a.value=null)});function i(b){y.value.open(b,"APPLICATION")}function x(b){Je(`${A("views.applicationOverview.appInfo.APIKeyDialog.msgConfirm1")}: ${b.secret_key}?`,A("views.applicationOverview.appInfo.APIKeyDialog.msgConfirm2"),{confirmButtonText:A("common.confirm"),cancelButtonText:A("common.cancel"),confirmButtonClass:"danger"}).then(()=>{Y({type:"applicationKey",systemType:S.value}).delAPIKey(D,b.id,d).then(()=>{we(A("common.deleteSuccess")),h()})}).catch(()=>{})}async function T(b){const s={is_active:!b.is_active},v=s.is_active?A("common.status.enabled"):A("common.status.disabled");await Y({type:"applicationKey",systemType:S.value}).putAPIKey(D,b.id,s,d).then(()=>(we(v),h(),!0)).catch(()=>!1)}function p(){Y({type:"applicationKey",systemType:S.value}).postAPIKey(D,d).then(()=>{h()})}const r=()=>{h(),C.value=!0};function h(){Y({type:"applicationKey",systemType:S.value}).getAPIKey(D,d).then(b=>{var s;(s=b.data)==null||s.sort((v,U)=>v.name<U.name?1:-1),a.value=b.data})}function B(){h()}return f({open:r}),(b,s)=>{const v=n("el-button"),U=n("AppIcon"),o=n("el-table-column"),u=n("el-switch"),z=n("el-tooltip"),O=n("el-table"),L=n("el-dialog");return g(),$(L,{title:"API Key",modelValue:C.value,"onUpdate:modelValue":s[1]||(s[1]=Q=>C.value=Q),width:"800","close-on-click-modal":!1,"close-on-press-escape":!1,"align-center":""},{default:t(()=>[e(v,{type:"primary",class:"mb-16",onClick:p},{default:t(()=>[k(c(b.$t("common.create")),1)]),_:1}),e(O,{data:a.value,class:"mb-16",loading:d.value,height:"420"},{default:t(()=>[e(o,{prop:"secret_key",label:"API Key"},{default:t(({row:Q})=>[l("span",Pt,c(Q.secret_key),1),e(v,{type:"primary",text:"",onClick:G=>P(he)(Q.secret_key)},{default:t(()=>[e(U,{iconName:"app-copy"})]),_:1},8,["onClick"])]),_:1}),e(o,{label:b.$t("common.status.label"),width:"70"},{default:t(({row:Q})=>[l("div",{onClick:s[0]||(s[0]=ie(()=>{},["stop"]))},[e(u,{size:"small",modelValue:Q.is_active,"onUpdate:modelValue":G=>Q.is_active=G,"before-change":()=>T(Q)},null,8,["modelValue","onUpdate:modelValue","before-change"])])]),_:1},8,["label"]),e(o,{prop:"name",label:b.$t("common.createDate"),width:"170"},{default:t(({row:Q})=>[k(c(P(ot)(Q.create_time)),1)]),_:1},8,["label"]),e(o,{label:b.$t("common.operation"),align:"left",width:"90"},{default:t(({row:Q})=>[l("span",zt,[e(z,{effect:"dark",content:b.$t("common.setting"),placement:"top"},{default:t(()=>[e(v,{type:"primary",text:"",onClick:ie(G=>i(Q),["stop"])},{default:t(()=>[e(U,{iconName:"app-setting"})]),_:1},8,["onClick"])]),_:2},1032,["content"])]),e(z,{effect:"dark",content:b.$t("common.delete"),placement:"top"},{default:t(()=>[e(v,{type:"primary",text:"",onClick:G=>x(Q)},{default:t(()=>[e(U,{iconName:"app-delete"})]),_:1},8,["onClick"])]),_:2},1032,["content"])]),_:1},8,["label"])]),_:1},8,["data","loading"]),e(mt,{ref_key:"SettingAPIKeyDialogRef",ref:y,onRefresh:B},null,512)]),_:1},8,["modelValue"])}}}),Qt={class:"ml-4"},Mt={class:"dialog-footer"},Kt=Z({__name:"LimitDialog",emits:["refresh"],setup(R,{expose:f,emit:I}){const V=xe(),{params:{id:D}}=V,S=N(()=>V.path.includes("resource-management")?"systemManage":"workspace"),y=I,C=w(),d=w({access_num:0,white_active:!0,white_list:"",authentication_value:"",authentication:!1}),a=w(!1),i=w(!1);ye(a,p=>{p||(d.value={access_num:0,white_active:!0,white_list:""})});const x=p=>{var r,h;d.value.access_num=p.access_num,d.value.white_active=p.white_active,d.value.white_list=(r=p.white_list)!=null&&r.length?(h=p.white_list)==null?void 0:h.join(`
|
||
`):"",d.value.authentication_value=p.authentication_value,d.value.authentication=p.authentication,a.value=!0},T=async p=>{p&&await p.validate((r,h)=>{if(r){const B={white_list:d.value.white_list?d.value.white_list.split(`
|
||
`):[],white_active:d.value.white_active,access_num:d.value.access_num,authentication:d.value.authentication,authentication_value:d.value.authentication_value};Y({type:"application",systemType:S.value}).putAccessToken(D,B,i).then(()=>{y("refresh"),we(A("common.settingSuccess")),a.value=!1})}})};return f({open:x}),(p,r)=>{const h=n("el-input-number"),B=n("el-form-item"),b=n("el-switch"),s=n("el-input"),v=n("el-form"),U=n("el-button"),o=n("el-dialog");return g(),$(o,{title:p.$t("views.applicationOverview.appInfo.accessControl"),modelValue:a.value,"onUpdate:modelValue":r[6]||(r[6]=u=>a.value=u),"close-on-click-modal":!1,"close-on-press-escape":!1,width:"650"},{footer:t(()=>[l("span",Mt,[e(U,{onClick:r[4]||(r[4]=ie(u=>a.value=!1,["prevent"]))},{default:t(()=>[k(c(p.$t("common.cancel")),1)]),_:1}),e(U,{type:"primary",onClick:r[5]||(r[5]=u=>T(C.value)),loading:i.value},{default:t(()=>[k(c(p.$t("common.save")),1)]),_:1},8,["loading"])])]),default:t(()=>[e(v,{"label-position":"top",ref_key:"limitFormRef",ref:C,model:d.value},{default:t(()=>[e(B,{label:p.$t("views.applicationOverview.appInfo.LimitDialog.clientQueryLimitLabel")},{default:t(()=>[e(h,{modelValue:d.value.access_num,"onUpdate:modelValue":r[0]||(r[0]=u=>d.value.access_num=u),min:0,step:1,max:1e7,"value-on-clear":0,"controls-position":"right",style:{width:"268px"},"step-strictly":""},null,8,["modelValue"]),l("span",Qt,c(p.$t("views.applicationOverview.appInfo.LimitDialog.timesDays")),1)]),_:1},8,["label"]),e(B,{label:p.$t("views.applicationOverview.appInfo.LimitDialog.whitelistLabel"),onClick:r[2]||(r[2]=ie(()=>{},["prevent"]))},{default:t(()=>[e(b,{size:"small",modelValue:d.value.white_active,"onUpdate:modelValue":r[1]||(r[1]=u=>d.value.white_active=u)},null,8,["modelValue"])]),_:1},8,["label"]),e(B,null,{default:t(()=>[e(s,{modelValue:d.value.white_list,"onUpdate:modelValue":r[3]||(r[3]=u=>d.value.white_list=u),placeholder:p.$t("views.applicationOverview.appInfo.LimitDialog.whitelistPlaceholder"),rows:10,type:"textarea"},null,8,["modelValue","placeholder"])]),_:1})]),_:1},8,["model"])]),_:1},8,["title","modelValue"])}}}),jt={class:"ml-4"},Yt={class:"mb-4 lighter"},Nt={class:"mb-16 lighter"},Xt={style:{"font-size":"13px"}},Ht={style:{"margin-left":"8px","font-size":"13px"}},Jt={style:{"margin-left":"8px",color:"#909399","font-size":"12px"}},qt=Z({__name:"XPackLimitDrawer",emits:["refresh"],setup(R,{expose:f,emit:I}){const V=it(),D=xe(),{params:{id:S}}=D,y=N(()=>D.path.includes("resource-management")?"systemManage":"workspace"),C=I,d=w([]),a=w(),i=w({access_num:0,white_active:!0,white_list:"",authentication_value:{type:"password",max_attempts:1},authentication:!1}),x=w(!1),T=w(!1);ye(x,s=>{s||(i.value={access_num:0,white_active:!0,white_list:""})});const p=s=>{var v,U;i.value.access_num=s.access_num,i.value.white_active=s.white_active,i.value.white_list=(v=s.white_list)!=null&&v.length?(U=s.white_list)==null?void 0:U.join(`
|
||
`):"",i.value.authentication_value=s.authentication_value||{type:"password"},i.value.authentication_value.type==="password"&&!i.value.authentication_value.password_value&&B(),i.value.authentication_value.max_attempts||(i.value.authentication_value.max_attempts=1),i.value.authentication=s.authentication,x.value=!0,Y({type:"application",systemType:y.value}).getChatUserAuthType().then(o=>{d.value=o.data})},r=async s=>{s&&await s.validate((v,U)=>{if(v){const o={white_list:i.value.white_list?i.value.white_list.split(`
|
||
`):[],white_active:i.value.white_active,access_num:i.value.access_num,authentication:i.value.authentication,authentication_value:i.value.authentication_value};Y({type:"application",systemType:y.value}).putAccessToken(S,o,T).then(()=>{C("refresh"),we(A("common.settingSuccess")),x.value=!1})}})};function h(s=10){const v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",U=new Uint8Array(s);return window.crypto.getRandomValues(U),Array.from(U).map(o=>v[o%v.length]).join("")}function B(){i.value.authentication_value.password_value=h()}function b(){i.value.authentication&&!i.value.authentication_value.password_value&&(i.value.authentication_value={type:"password",password_value:h()},i.value.authentication_value.max_attempts||(i.value.authentication_value.max_attempts=1))}return f({open:p}),(s,v)=>{const U=n("el-input-number"),o=n("el-form-item"),u=n("el-switch"),z=n("el-radio"),O=n("AppIcon"),L=n("el-button"),Q=n("el-tooltip"),G=n("RefreshRight"),ce=n("el-icon"),Ae=n("el-input"),me=n("el-card"),_e=n("el-checkbox"),be=n("el-checkbox-group"),ae=n("el-radio-group"),ke=n("el-form"),ne=n("el-drawer");return g(),$(ne,{modelValue:x.value,"onUpdate:modelValue":v[14]||(v[14]=F=>x.value=F),size:"60%"},{header:t(()=>[l("h4",null,c(s.$t("views.applicationOverview.appInfo.accessControl")),1)]),footer:t(()=>[l("div",null,[e(L,{onClick:v[12]||(v[12]=ie(F=>x.value=!1,["prevent"]))},{default:t(()=>[k(c(s.$t("common.cancel")),1)]),_:1}),e(L,{type:"primary",onClick:v[13]||(v[13]=F=>r(a.value)),loading:T.value},{default:t(()=>[k(c(s.$t("common.save")),1)]),_:1},8,["loading"])])]),default:t(()=>[e(ke,{"label-position":"top",ref_key:"limitFormRef",ref:a,model:i.value,"require-asterisk-position":"right"},{default:t(()=>[e(o,{label:s.$t("views.applicationOverview.appInfo.LimitDialog.clientQueryLimitLabel")},{default:t(()=>[e(U,{modelValue:i.value.access_num,"onUpdate:modelValue":v[0]||(v[0]=F=>i.value.access_num=F),min:0,step:1,max:1e7,"value-on-clear":0,"controls-position":"right",style:{width:"268px"},"step-strictly":""},null,8,["modelValue"]),l("span",jt,c(s.$t("views.applicationOverview.appInfo.LimitDialog.timesDays")),1)]),_:1},8,["label"]),e(o,{label:s.$t("views.applicationOverview.appInfo.LimitDialog.authentication"),onClick:v[2]||(v[2]=ie(()=>{},["prevent"]))},{default:t(()=>[e(u,{size:"small",modelValue:i.value.authentication,"onUpdate:modelValue":v[1]||(v[1]=F=>i.value.authentication=F),onChange:b},null,8,["modelValue"])]),_:1},8,["label"]),i.value.authentication?(g(),$(ae,{key:0,modelValue:i.value.authentication_value.type,"onUpdate:modelValue":v[8]||(v[8]=F=>i.value.authentication_value.type=F),class:"card__radio"},{default:t(()=>{var F;return[e(me,{shadow:"never",class:Re(["mb-16",((F=i.value.authentication_value)==null?void 0:F.type)==="password"?"active":""])},{default:t(()=>[e(z,{value:"password",size:"large"},{default:t(()=>[l("p",Yt,c(s.$t("views.applicationOverview.appInfo.LimitDialog.authenticationValue")),1)]),_:1}),i.value.authentication_value.type==="password"?(g(),$(o,{key:0,class:"ml-24"},{default:t(()=>[e(Ae,{class:"authentication-append-input",modelValue:i.value.authentication_value.password_value,"onUpdate:modelValue":v[4]||(v[4]=J=>i.value.authentication_value.password_value=J),readonly:"",style:{width:"268px"}},{append:t(()=>[e(Q,{content:s.$t("common.copy"),placement:"top"},{default:t(()=>[e(L,{type:"primary",text:"",onClick:v[3]||(v[3]=J=>P(he)(i.value.authentication_value.password_value)),style:{margin:"0 0 0 4px !important"}},{default:t(()=>[e(O,{iconName:"app-copy"})]),_:1})]),_:1},8,["content"]),e(Q,{content:s.$t("common.refresh"),placement:"top"},{default:t(()=>[e(L,{onClick:B,type:"primary",text:"",style:{margin:"0 4px 0 0 !important"}},{default:t(()=>[e(ce,null,{default:t(()=>[e(G)]),_:1})]),_:1})]),_:1},8,["content"])]),_:1},8,["modelValue"])]),_:1})):H("",!0)]),_:1},8,["class"]),e(me,{shadow:"never",class:Re(["mb-16",i.value.authentication_value.type==="login"?"active":""])},{default:t(()=>{var J,se;return[e(z,{value:"login",size:"large"},{default:t(()=>[l("p",Nt,[k(c(s.$t("views.system.authentication.title"))+" ",1),e(L,{type:"primary",link:"",onClick:v[5]||(v[5]=j=>P(V).push({name:"applicationChatUser"}))},{default:t(()=>[k(c(s.$t("views.applicationOverview.appInfo.LimitDialog.toSettingChatUser")),1)]),_:1})])]),_:1}),i.value.authentication_value.type==="login"?(g(),$(o,{key:0,label:s.$t("views.applicationOverview.appInfo.LimitDialog.loginMethod"),rules:[{required:!0,message:s.$t("views.applicationOverview.appInfo.LimitDialog.loginMethodRequired"),trigger:"change"}],prop:"authentication_value.login_value",class:"ml-24 border-t",style:{"padding-top":"16px"}},{default:t(()=>[e(be,{modelValue:i.value.authentication_value.login_value,"onUpdate:modelValue":v[6]||(v[6]=j=>i.value.authentication_value.login_value=j)},{default:t(()=>[(g(!0),K(pe,null,de(d.value,j=>(g(),$(_e,{key:j.value,label:j.label,value:j.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label","rules"])):H("",!0),i.value.authentication_value.type==="login"&&((se=(J=i.value.authentication_value)==null?void 0:J.login_value)!=null&&se.includes("LOCAL"))?(g(),$(o,{key:1,class:"ml-24",label:s.$t("views.system.display_code"),rules:[{required:!0,message:s.$t("views.applicationOverview.appInfo.LimitDialog.displayCodeRequired"),trigger:"change"}],prop:"authentication_value.max_attempts"},{default:t(()=>[l("span",Xt,c(s.$t("views.system.loginFailed")),1),e(U,{style:{"margin-left":"8px"},modelValue:i.value.authentication_value.max_attempts,"onUpdate:modelValue":v[7]||(v[7]=j=>i.value.authentication_value.max_attempts=j),min:-1,max:10,step:1,"controls-position":"right"},null,8,["modelValue"]),l("span",Ht,c(s.$t("views.system.loginFailedMessage")),1),l("span",Jt," ("+c(s.$t("views.system.display_codeTip"))+") ",1)]),_:1},8,["label","rules"])):H("",!0)]}),_:1},8,["class"])]}),_:1},8,["modelValue"])):H("",!0),e(o,{label:s.$t("views.applicationOverview.appInfo.LimitDialog.whitelistLabel"),onClick:v[10]||(v[10]=ie(()=>{},["prevent"]))},{default:t(()=>[e(u,{size:"small",modelValue:i.value.white_active,"onUpdate:modelValue":v[9]||(v[9]=F=>i.value.white_active=F)},null,8,["modelValue"])]),_:1},8,["label"]),i.value.white_active?(g(),$(o,{key:1},{default:t(()=>[e(Ae,{modelValue:i.value.white_list,"onUpdate:modelValue":v[11]||(v[11]=F=>i.value.white_list=F),placeholder:s.$t("views.applicationOverview.appInfo.LimitDialog.whitelistPlaceholder"),rows:10,type:"textarea"},null,8,["modelValue","placeholder"])]),_:1})):H("",!0)]),_:1},8,["model"])]),_:1},8,["modelValue"])}}}),Gt=Ue(qt,[["__scopeId","data-v-584da4a0"]]),Wt={class:"dialog-footer"},Zt=Z({__name:"DisplaySettingDialog",emits:["refresh"],setup(R,{expose:f,emit:I}){const V=xe(),{params:{id:D}}=V,S=N(()=>V.path.includes("resource-management")?"systemManage":"workspace"),y=I,C=w(),d=w({show_source:!1,show_exec:!1,language:""}),a=w(null),i=w(!1),x=w(!1);ye(i,r=>{r||(d.value={show_source:!1,show_exec:!1,language:""})});const T=(r,h)=>{a.value=h,d.value.show_source=r.show_source,d.value.show_exec=r.show_exec,d.value.language=r.language,i.value=!0},p=async r=>{r&&await r.validate((h,B)=>{h&&Y({type:"application",systemType:S.value}).putAccessToken(D,d.value,x).then(()=>{y("refresh"),we(A("common.settingSuccess")),i.value=!1})})};return f({open:T}),(r,h)=>{const B=n("el-option"),b=n("el-select"),s=n("el-form-item"),v=n("el-checkbox"),U=n("el-space"),o=n("el-form"),u=n("el-button"),z=n("el-dialog");return g(),$(z,{title:r.$t("views.applicationOverview.appInfo.displaySetting"),modelValue:i.value,"onUpdate:modelValue":h[5]||(h[5]=O=>i.value=O),"close-on-click-modal":!1,"close-on-press-escape":!1,width:"550"},{footer:t(()=>[l("span",Wt,[e(u,{onClick:h[3]||(h[3]=ie(O=>i.value=!1,["prevent"]))},{default:t(()=>[k(c(r.$t("common.cancel")),1)]),_:1}),e(u,{type:"primary",onClick:h[4]||(h[4]=O=>p(C.value)),loading:x.value},{default:t(()=>[k(c(r.$t("common.save")),1)]),_:1},8,["loading"])])]),default:t(()=>[e(o,{"label-position":"top",ref_key:"displayFormRef",ref:C,model:d.value},{default:t(()=>[e(s,null,{default:t(()=>[l("span",null,c(r.$t("layout.language")),1),e(b,{modelValue:d.value.language,"onUpdate:modelValue":h[0]||(h[0]=O=>d.value.language=O),clearable:""},{default:t(()=>[(g(!0),K(pe,null,de(P(qe),O=>(g(),$(B,{key:O.value,label:O.label,value:O.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(s,null,{default:t(()=>[e(U,{direction:"vertical",alignment:"start",size:2},{default:t(()=>[e(v,{modelValue:d.value.show_source,"onUpdate:modelValue":h[1]||(h[1]=O=>d.value.show_source=O),label:r.$t("views.applicationOverview.SettingDisplayDialog.showSourceLabel")},null,8,["modelValue","label"]),e(v,{modelValue:d.value.show_exec,"onUpdate:modelValue":h[2]||(h[2]=O=>d.value.show_exec=O),label:r.$t("views.applicationOverview.SettingDisplayDialog.showExecutionDetail")},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["title","modelValue"])}}}),ea=""+new URL("display-bg2-BETnngP8.png",import.meta.url).href,ta="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVwAAAAOCAYAAABjJ6RkAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACFSURBVHgB7dyxDcJAEETRvcWkRIhWqIrKESEBsn3G7sG30XtFfE007fnabvMUj6lFBgDny5jbLz65XuIutgAD9bjmPmwzM6YAYKh1H7aWLUARwQUoIrgARQQXoIjgAhQRXIAiggtQRHABigguQJFctugBwFgZc7ZvvHuPJQAY4hi2x3nNH+AmFr6g66dUAAAAAElFTkSuQmCC",aa="data:image/png;base64,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",la=""+new URL("../MaxKB.gif",import.meta.url).href,oa={class:"flex-between mb-8"},ia=["id"],na={class:"flex align-center"},sa={class:"flex",style:{height:"570px"}},ua={class:"setting-preview border border-r-6 mr-16",style:{"min-width":"400px"}},ca={class:"flex-between"},ra={class:"flex align-center"},pa={class:"mr-12 ml-24 flex"},da=["src"],va={class:"ellipsis"},ma={class:"mr-16"},_a={class:"p-16",style:{position:"relative"}},fa={class:"flex"},ga={key:0,class:"avatar"},ha=["width"],wa={class:"flex mt-4",style:{"justify-content":"flex-end"}},ya=["width"],Aa={key:0,class:"avatar ml-8"},ba={style:{position:"absolute",bottom:"0","padding-bottom":"8px","box-sizing":"border-box"},class:"p-16 text-center w-full"},ka={class:"float_icon"},Da={key:1,src:la,height:"50px",style:{width:"40px",height:"40px",display:"block"}},$a={class:"p-8"},Va={class:"mb-8"},xa={class:"mb-8"},Ca={class:"mb-8"},Oa={class:"flex-between mb-8"},Ia={class:"lighter"},Sa={class:"flex align-center"},Ua={class:"flex-between mb-8"},Ba={class:"lighter"},La={class:"flex align-center"},Ea={class:"flex-between mb-8"},Ra={class:"lighter"},Ta={class:"flex align-center"},Pa={class:"flex-between mb-8"},za={class:"lighter"},Fa={class:"flex align-center"},Qa={class:"flex-between mb-8"},Ma={class:"lighter"},Ka={class:"border-t mt-8"},ja={class:"flex-between mb-8"},Ya={class:"lighter"},Na={class:"flex align-center"},Xa={class:"flex align-center"},Ha={key:0},Ja={class:"dialog-footer"},He=Z({__name:"XPackDisplaySettingDialog",emits:["refresh"],setup(R,{expose:f,emit:I}){const V=xe(),{params:{id:D}}=V,S=N(()=>V.path.includes("resource-management")?"systemManage":"workspace"),y=I,C={show_source:!1,show_exec:!1,language:"",show_history:!0,draggable:!0,show_guide:!0,icon:"",icon_url:"",chat_background:"",chat_background_url:"",avatar:"",avatar_url:"",float_icon:"",float_icon_url:"",user_avatar:"",user_avatar_url:"",disclaimer:!1,disclaimer_value:A("views.applicationOverview.SettingDisplayDialog.disclaimerValue"),custom_theme:{theme_color:"",header_font_color:"#1f2329"},float_location:{y:{type:"bottom",value:30},x:{type:"right",value:0}},show_avatar:!0,show_user_avatar:!1},d=w(),a=w({show_source:!1,show_exec:!1,language:"",icon:"",icon_url:"",show_history:!0,draggable:!1,show_guide:!1,chat_background:"",chat_background_url:"",avatar:"",avatar_url:"",float_icon:"",float_icon_url:"",user_avatar:"",user_avatar_url:"",disclaimer:!1,disclaimer_value:A("views.applicationOverview.SettingDisplayDialog.disclaimerValue"),custom_theme:{theme_color:"",header_font_color:"#1f2329"},float_location:{y:{type:"bottom",value:30},x:{type:"right",value:0}},show_avatar:!0,show_user_avatar:!1}),i=w({avatar:"",float_icon:"",user_avatar:"",icon:"",chat_background:""}),x=w(!1),T=w(!1),p=w(null),r=N(()=>{var o,u;return{background:(o=a.value.custom_theme)==null?void 0:o.theme_color,color:(u=a.value.custom_theme)==null?void 0:u.header_font_color}});function h(){a.value=ut.cloneDeep(C),i.value={avatar:"",float_icon:"",user_avatar:"",icon:"",chat_background:""}}const B=(o,u,z)=>{if((o==null?void 0:o.size)/1024/1024<10)a.value[z]=o.raw,i.value[z]=URL.createObjectURL(o.raw),a.value[`${z}_url`]="";else return ct(A("common.EditAvatarDialog.fileSizeExceeded")),!1},b=(o,u)=>{var z,O;p.value=u,a.value.show_source=o.show_source,a.value.show_exec=o.show_exec,a.value.show_history=o.show_history,a.value.language=o.language,a.value.draggable=o.draggable,a.value.show_guide=o.show_guide,i.value.avatar=o.avatar,i.value.icon=o.icon,i.value.chat_background=o.chat_background,i.value.float_icon=o.float_icon,i.value.user_avatar=o.user_avatar,a.value.disclaimer=o.disclaimer,a.value.disclaimer_value=o.disclaimer_value,a.value.disclaimer_value===A("views.applicationOverview.SettingDisplayDialog.disclaimerValue")&&(a.value.disclaimer_value=A("views.applicationOverview.SettingDisplayDialog.disclaimerValue")),a.value.avatar_url=o.avatar,a.value.chat_background_url=o.chat_background,a.value.icon_url=o.icon,a.value.user_avatar_url=o.user_avatar,a.value.float_icon_url=o.float_icon,a.value.show_avatar=o.show_avatar,a.value.show_user_avatar=o.show_user_avatar,a.value.custom_theme={theme_color:((z=o.custom_theme)==null?void 0:z.theme_color)||"",header_font_color:((O=o.custom_theme)==null?void 0:O.header_font_color)||"#1f2329"},a.value.float_location=o.float_location,x.value=!0},s=o=>{a.value.disclaimer_value=o},v=o=>{a.value.disclaimer=o},U=async o=>{o&&await o.validate((u,z)=>{if(u){const O=new FormData;Object.keys(a.value).map(L=>{["custom_theme","float_location"].includes(L)?O.append(L,JSON.stringify(a.value[L])):O.append(L,a.value[L])}),Y({type:"application",systemType:S.value}).putXpackAccessToken(D,O,T).then(()=>{y("refresh"),we(A("common.settingSuccess")),x.value=!1})}})};return f({open:b}),(o,u)=>{const z=n("Refresh"),O=n("el-icon"),L=n("el-button"),Q=n("el-divider"),G=n("el-avatar"),ce=n("LogoIcon"),Ae=n("AppIcon"),me=n("Close"),_e=n("el-image"),be=n("auto-tooltip"),ae=n("el-text"),ke=n("el-color-picker"),ne=n("el-col"),F=n("el-row"),J=n("el-option"),se=n("el-select"),j=n("el-upload"),re=n("el-card"),m=n("el-checkbox"),E=n("el-input-number"),X=n("el-input"),q=n("el-tooltip"),ee=n("el-space"),ue=n("el-form"),W=n("el-scrollbar"),Ce=n("el-dialog");return g(),$(Ce,{title:o.$t("views.applicationOverview.appInfo.displaySetting"),width:"900",modelValue:x.value,"onUpdate:modelValue":u[18]||(u[18]=le=>x.value=le),"close-on-click-modal":!1,"close-on-press-escape":!1,"destroy-on-close":!0,"align-center":"",class:"display-setting-dialog"},{header:t(({titleId:le,titleClass:fe})=>[l("div",oa,[l("h4",{id:le,class:Re(fe)},c(o.$t("views.applicationOverview.appInfo.displaySetting")),11,ia),l("div",na,[e(L,{onClick:ie(h,["prevent"]),link:""},{default:t(()=>[e(O,{class:"mr-4"},{default:t(()=>[e(z)]),_:1}),k(" "+c(o.$t("views.applicationOverview.SettingDisplayDialog.restoreDefault")),1)]),_:1}),e(Q,{direction:"vertical"})])])]),footer:t(()=>[l("span",Ja,[e(L,{onClick:u[16]||(u[16]=ie(le=>x.value=!1,["prevent"]))},{default:t(()=>[k(c(o.$t("common.cancel")),1)]),_:1}),e(L,{type:"primary",onClick:u[17]||(u[17]=le=>U(d.value)),loading:T.value},{default:t(()=>[k(c(o.$t("common.save")),1)]),_:1},8,["loading"])])]),default:t(()=>{var le,fe,Oe;return[l("div",sa,[l("div",ua,[l("div",{class:"setting-preview-container",style:ve({backgroundImage:`url(${(le=i.value)==null?void 0:le.chat_background})`})},[l("div",{class:"setting-preview-header",style:ve(r.value)},[l("div",ca,[l("div",ra,[l("div",pa,[P(nt)((fe=i.value)==null?void 0:fe.icon)?(g(),$(G,{key:0,shape:"square",size:32,style:{background:"none"}},{default:t(()=>{var _;return[l("img",{src:(_=i.value)==null?void 0:_.icon,alt:""},null,8,da)]}),_:1})):(g(),$(ce,{key:1,height:"32px"}))]),l("h4",va,c(((Oe=p.value)==null?void 0:Oe.name)||o.$t("views.application.form.appName.label")),1)]),l("div",ma,[e(L,{link:""},{default:t(()=>{var _;return[e(Ae,{iconName:"app-magnify",style:ve([{color:(_=a.value.custom_theme)==null?void 0:_.header_font_color},{"font-size":"20px"}])},null,8,["style"])]}),_:1}),e(L,{link:""},{default:t(()=>{var _;return[e(O,{size:20,class:"color-secondary",style:ve({color:(_=a.value.custom_theme)==null?void 0:_.header_font_color})},{default:t(()=>[e(me)]),_:1},8,["style"])]}),_:1})])])],4),l("div",null,[l("div",_a,[l("div",fa,[a.value.show_avatar?(g(),K("div",ga,[i.value.avatar?(g(),$(_e,{key:0,src:i.value.avatar,alt:"",fit:"cover",style:{width:"28px",height:"28px",display:"block"}},null,8,["src"])):(g(),$(ce,{key:1,height:"28px",style:{width:"28px",height:"28px",display:"block"}}))])):H("",!0),l("img",{src:ea,alt:"",width:a.value.show_avatar?a.value.show_user_avatar?"232px":"270px":a.value.show_user_avatar?"260px":"300px"},null,8,ha)]),l("div",wa,[l("img",{src:ta,alt:"",width:a.value.show_user_avatar?a.value.show_avatar?"227px":"255px":a.value.show_avatar?"265px":"292px",style:{"object-fit":"contain"}},null,8,ya),a.value.show_user_avatar?(g(),K("div",Aa,[i.value.user_avatar?(g(),$(_e,{key:0,src:i.value.user_avatar,alt:"",fit:"cover",style:{width:"28px",height:"28px",display:"block"}},null,8,["src"])):(g(),$(G,{key:1,size:28},{default:t(()=>[...u[19]||(u[19]=[l("img",{src:st,style:{width:"50%"},alt:""},null,-1)])]),_:1}))])):H("",!0)])]),l("div",ba,[u[20]||(u[20]=l("img",{src:aa,alt:"",class:"w-full"},null,-1)),a.value.disclaimer?(g(),$(ae,{key:0,type:"info",class:"mt-8",style:{"font-size":"12px"}},{default:t(()=>[e(be,{content:a.value.disclaimer_value},{default:t(()=>[k(c(a.value.disclaimer_value),1)]),_:1},8,["content"])]),_:1})):H("",!0)])])],4),l("div",ka,[i.value.float_icon?(g(),$(_e,{key:0,src:i.value.float_icon,alt:"",fit:"cover",style:{width:"40px",height:"40px",display:"block"}},null,8,["src"])):(g(),K("img",Da))])]),e(W,null,{default:t(()=>[l("div",$a,[e(ue,{ref_key:"displayFormRef",ref:d,model:a.value},{default:t(()=>[e(F,{class:"w-full mb-8"},{default:t(()=>[e(ne,{span:12},{default:t(()=>[l("h5",Va,c(o.$t("views.applicationOverview.SettingDisplayDialog.customThemeColor")),1),l("div",null,[e(ke,{modelValue:a.value.custom_theme.theme_color,"onUpdate:modelValue":u[0]||(u[0]=_=>a.value.custom_theme.theme_color=_)},null,8,["modelValue"]),k(" "+c(a.value.custom_theme.theme_color?"":o.$t("views.applicationOverview.SettingDisplayDialog.default")),1)])]),_:1}),e(ne,{span:12},{default:t(()=>[l("h5",xa,c(o.$t("views.applicationOverview.SettingDisplayDialog.headerTitleFontColor")),1),e(ke,{modelValue:a.value.custom_theme.header_font_color,"onUpdate:modelValue":u[1]||(u[1]=_=>a.value.custom_theme.header_font_color=_)},null,8,["modelValue"])]),_:1})]),_:1}),e(F,{class:"w-full mb-8"},{default:t(()=>[l("h5",Ca,c(o.$t("layout.language")),1),e(se,{modelValue:a.value.language,"onUpdate:modelValue":u[2]||(u[2]=_=>a.value.language=_),clearable:""},{default:t(()=>[(g(!0),K(pe,null,de(P(qe),_=>(g(),$(J,{key:_.value,label:_.label,value:_.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(re,{shadow:"never",class:"mb-8"},{default:t(()=>[l("div",Oa,[l("span",Ia,c(o.$t("views.application.title")+" LOGO"),1),l("span",Sa,[e(j,{class:"ml-8",ref:"uploadRef",action:"#","auto-upload":!1,"show-file-list":!1,accept:"image/jpeg, image/png, image/gif","on-change":(_,te)=>B(_,te,"icon")},{default:t(()=>[e(L,{size:"small"},{default:t(()=>[k(c(o.$t("views.applicationOverview.SettingDisplayDialog.replace")),1)]),_:1})]),_:1},8,["on-change"])])]),e(ae,{type:"info",size:"small"},{default:t(()=>[k(c(o.$t("views.applicationOverview.SettingDisplayDialog.imageMessage")),1)]),_:1})]),_:1}),e(re,{shadow:"never",class:"mb-8"},{default:t(()=>[l("div",Ua,[l("span",Ba,c(o.$t("views.applicationOverview.SettingDisplayDialog.chatBackground")),1),l("span",La,[e(j,{class:"ml-8",ref:"uploadRef",action:"#","auto-upload":!1,"show-file-list":!1,accept:"image/jpeg, image/png, image/gif","on-change":(_,te)=>B(_,te,"chat_background")},{default:t(()=>[e(L,{size:"small"},{default:t(()=>[k(c(o.$t("views.applicationOverview.SettingDisplayDialog.replace")),1)]),_:1})]),_:1},8,["on-change"])])]),e(ae,{type:"info",size:"small"},{default:t(()=>[k(c(o.$t("views.applicationOverview.SettingDisplayDialog.chatBackgroundMessage")),1)]),_:1})]),_:1}),e(re,{shadow:"never",class:"mb-8"},{default:t(()=>[l("div",Ea,[l("span",Ra,c(o.$t("views.applicationOverview.SettingDisplayDialog.AIAvatar")),1),l("span",Ta,[e(m,{modelValue:a.value.show_avatar,"onUpdate:modelValue":u[3]||(u[3]=_=>a.value.show_avatar=_)},{default:t(()=>[k(c(o.$t("views.applicationOverview.SettingDisplayDialog.display")),1)]),_:1},8,["modelValue"]),e(j,{class:"ml-8",ref:"uploadRef",action:"#","auto-upload":!1,"show-file-list":!1,accept:"image/jpeg, image/png, image/gif","on-change":(_,te)=>B(_,te,"avatar")},{default:t(()=>[e(L,{size:"small"},{default:t(()=>[k(c(o.$t("views.applicationOverview.SettingDisplayDialog.replace")),1)]),_:1})]),_:1},8,["on-change"])])]),e(ae,{type:"info",size:"small"},{default:t(()=>[k(c(o.$t("views.applicationOverview.SettingDisplayDialog.imageMessage")),1)]),_:1})]),_:1}),e(re,{shadow:"never",class:"mb-8"},{default:t(()=>[l("div",Pa,[l("span",za,c(o.$t("views.applicationOverview.SettingDisplayDialog.askUserAvatar")),1),l("span",Fa,[e(m,{modelValue:a.value.show_user_avatar,"onUpdate:modelValue":u[4]||(u[4]=_=>a.value.show_user_avatar=_)},{default:t(()=>[k(c(o.$t("views.applicationOverview.SettingDisplayDialog.display")),1)]),_:1},8,["modelValue"]),e(j,{class:"ml-8",ref:"uploadRef",action:"#","auto-upload":!1,"show-file-list":!1,accept:"image/jpeg, image/png, image/gif","on-change":(_,te)=>B(_,te,"user_avatar")},{default:t(()=>[e(L,{size:"small"},{default:t(()=>[k(c(o.$t("views.applicationOverview.SettingDisplayDialog.replace")),1)]),_:1})]),_:1},8,["on-change"])])]),e(ae,{type:"info",size:"small"},{default:t(()=>[k(c(o.$t("views.applicationOverview.SettingDisplayDialog.imageMessage")),1)]),_:1})]),_:1}),e(re,{shadow:"never",class:"mb-8"},{default:t(()=>[l("div",Qa,[l("span",Ma,c(o.$t("views.applicationOverview.SettingDisplayDialog.floatIcon")),1),e(j,{ref:"uploadRef",action:"#","auto-upload":!1,"show-file-list":!1,accept:"image/jpeg, image/png, image/gif","on-change":(_,te)=>B(_,te,"float_icon")},{default:t(()=>[e(L,{size:"small"},{default:t(()=>[k(c(o.$t("views.applicationOverview.SettingDisplayDialog.replace")),1)]),_:1})]),_:1},8,["on-change"])]),e(ae,{type:"info",size:"small"},{default:t(()=>[k(c(o.$t("views.applicationOverview.SettingDisplayDialog.imageMessage")),1)]),_:1}),l("div",Ka,[l("div",ja,[l("span",Ya,c(o.$t("views.applicationOverview.SettingDisplayDialog.iconDefaultPosition")),1),e(m,{modelValue:a.value.draggable,"onUpdate:modelValue":u[5]||(u[5]=_=>a.value.draggable=_),label:o.$t("views.applicationOverview.SettingDisplayDialog.draggablePosition")},null,8,["modelValue","label"])]),e(F,{gutter:8,class:"w-full mb-8"},{default:t(()=>[e(ne,{span:12},{default:t(()=>[l("div",Na,[e(se,{modelValue:a.value.float_location.x.type,"onUpdate:modelValue":u[6]||(u[6]=_=>a.value.float_location.x.type=_),style:{width:"80px"}},{default:t(()=>[e(J,{label:o.$t("views.applicationOverview.SettingDisplayDialog.iconPosition.left"),value:"left"},null,8,["label"]),e(J,{label:o.$t("views.applicationOverview.SettingDisplayDialog.iconPosition.right"),value:"right"},null,8,["label"])]),_:1},8,["modelValue"]),e(E,{modelValue:a.value.float_location.x.value,"onUpdate:modelValue":u[7]||(u[7]=_=>a.value.float_location.x.value=_),min:0,step:1,precision:0,"value-on-clear":0,"step-strictly":"","controls-position":"right"},null,8,["modelValue"]),u[21]||(u[21]=l("span",{class:"ml-4"},"px",-1))])]),_:1}),e(ne,{span:12},{default:t(()=>[l("div",Xa,[e(se,{modelValue:a.value.float_location.y.type,"onUpdate:modelValue":u[8]||(u[8]=_=>a.value.float_location.y.type=_),style:{width:"80px"}},{default:t(()=>[e(J,{label:o.$t("views.applicationOverview.SettingDisplayDialog.iconPosition.top"),value:"top"},null,8,["label"]),e(J,{label:o.$t("views.applicationOverview.SettingDisplayDialog.iconPosition.bottom"),value:"bottom"},null,8,["label"])]),_:1},8,["modelValue"]),e(E,{modelValue:a.value.float_location.y.value,"onUpdate:modelValue":u[9]||(u[9]=_=>a.value.float_location.y.value=_),min:0,step:1,precision:0,"value-on-clear":0,"step-strictly":"","controls-position":"right"},null,8,["modelValue"]),u[22]||(u[22]=l("span",{class:"ml-4"},"px",-1))])]),_:1})]),_:1})])]),_:1}),e(ee,{direction:"vertical",alignment:"start",size:2},{default:t(()=>[e(m,{modelValue:a.value.show_source,"onUpdate:modelValue":u[10]||(u[10]=_=>a.value.show_source=_),label:o.$t("views.applicationOverview.SettingDisplayDialog.showSourceLabel")},null,8,["modelValue","label"]),e(m,{modelValue:a.value.show_exec,"onUpdate:modelValue":u[11]||(u[11]=_=>a.value.show_exec=_),label:o.$t("views.applicationOverview.SettingDisplayDialog.showExecutionDetail")},null,8,["modelValue","label"]),e(m,{modelValue:a.value.show_history,"onUpdate:modelValue":u[12]||(u[12]=_=>a.value.show_history=_),label:o.$t("views.applicationOverview.SettingDisplayDialog.showHistory")},null,8,["modelValue","label"]),e(m,{modelValue:a.value.show_guide,"onUpdate:modelValue":u[13]||(u[13]=_=>a.value.show_guide=_),label:o.$t("views.applicationOverview.SettingDisplayDialog.displayGuide")},null,8,["modelValue","label"]),e(m,{modelValue:a.value.disclaimer,"onUpdate:modelValue":u[14]||(u[14]=_=>a.value.disclaimer=_),label:o.$t("views.applicationOverview.SettingDisplayDialog.disclaimer"),onChange:v},null,8,["modelValue","label"]),a.value.disclaimer?(g(),K("span",Ha,[e(q,{content:a.value.disclaimer_value,placement:"top"},{default:t(()=>[e(X,{modelValue:a.value.disclaimer_value,"onUpdate:modelValue":u[15]||(u[15]=_=>a.value.disclaimer_value=_),style:{width:"422px","margin-bottom":"10px"},onChange:s,maxlength:128},null,8,["modelValue"])]),_:1},8,["content"])])):H("",!0)]),_:1})]),_:1},8,["model"])])]),_:1})])]}),_:1},8,["title","modelValue"])}}}),qa=["id"],Ga=Z({__name:"LineCharts",props:{id:{type:String,default:"lineChartId"},width:{type:String,default:"100%"},height:{type:String,default:"200px"},option:{type:Object,required:!0}},setup(R){const f=R,I=["rgba(82, 133, 255, 1)","rgba(255, 207, 47, 1)"],V=["rgba(82, 133, 255, 0.2)","rgba(255, 207, 47, 0.2)"];function D(){var a,i,x,T;let y=Se(document.getElementById(f.id));y==null&&(y=We(document.getElementById(f.id)));const C=[];(i=(a=f.option)==null?void 0:a.yData)!=null&&i.length&&((x=f.option)==null||x.yData.forEach((p,r)=>{C.push({type:"line",itemStyle:{color:I[r]},areaStyle:p.area?{color:V[r]}:null,...p})}));const d={title:{text:(T=f.option)==null?void 0:T.title,textStyle:{fontSize:"16px"}},tooltip:{trigger:"axis",valueFormatter:p=>Ve(p)},legend:{right:0,itemWidth:8,textStyle:{color:"#646A73"},icon:"circle"},grid:{left:"1%",right:"1%",bottom:"0",top:"18%",containLabel:!0},xAxis:{type:"category",data:f.option.xData},yAxis:{type:"value",splitLine:{lineStyle:{color:"#EFF0F1"}},axisLabel:{formatter:p=>Ve(p)}},series:C};y.setOption(d,!0)}function S(){var y;(y=Se(document.getElementById(f.id)))==null||y.resize()}return ye(()=>f.option,y=>{y&&$e(()=>{D()})}),Pe(()=>{$e(()=>{D(),window.addEventListener("resize",S)})}),Ge(()=>{window.removeEventListener("resize",S)}),(y,C)=>(g(),K("div",{id:R.id,ref:"LineChartRef",style:ve({height:R.height,width:R.width})},null,12,qa))}}),Wa=["id"],Za=Z({__name:"BarCharts",props:{id:{type:String,default:"barChartId"},width:{type:String,default:"100%"},height:{type:String,default:"200px"},option:{type:Object,required:!0}},setup(R){const f=R,I=["rgba(82, 133, 255, 1)","rgba(255, 207, 47, 1)"],V=["rgba(82, 133, 255, 0.2)","rgba(255, 207, 47, 0.2)"];function D(){var a,i,x,T;let y=Se(document.getElementById(f.id));y==null&&(y=We(document.getElementById(f.id)));const C=[];(i=(a=f.option)==null?void 0:a.yData)!=null&&i.length&&((x=f.option)==null||x.yData.forEach((p,r)=>{C.push({type:"bar",barWidth:"20",itemStyle:{color:I[r]},areaStyle:p.area?{color:V[r]}:null,...p})}));const d={title:{text:(T=f.option)==null?void 0:T.title,textStyle:{fontSize:"16px"}},tooltip:{trigger:"axis",valueFormatter:p=>Ve(p)},legend:{right:0,itemWidth:8,textStyle:{color:"#646A73"},icon:"circle"},grid:{left:"1%",right:"1%",bottom:"0",top:"18%",containLabel:!0},xAxis:{type:"category",data:f.option.xData},yAxis:{type:"value",splitLine:{lineStyle:{color:"#EFF0F1"}},axisLabel:{formatter:p=>Ve(p)}},series:C};y.setOption(d,!0)}function S(){var y;(y=Se(document.getElementById(f.id)))==null||y.resize()}return ye(()=>f.option,y=>{y&&$e(()=>{D()})}),Pe(()=>{$e(()=>{D(),window.addEventListener("resize",S)})}),Ge(()=>{window.removeEventListener("resize",S)}),(y,C)=>(g(),K("div",{id:R.id,ref:"BarChartRef",style:ve({height:R.height,width:R.width})},null,12,Wa))}}),el=Z({name:"AppCharts"}),Ee=Z({...el,props:{type:{type:String,default:"line"},height:{type:String,default:"200px"},dataZoom:Boolean,option:{type:Object,required:!0}},setup(R){const f={line:Ga,bar:Za};return(I,V)=>(g(),$(Te(f[R.type]),{height:R.height,option:R.option,dataZoom:R.dataZoom,class:"v-charts"},null,8,["height","option","dataZoom"]))}}),tl={class:"flex align-center ml-8 mr-8"},al={class:"ml-12"},ll={class:"color-secondary lighter mb-4"},ol={key:0,class:"flex align-baseline"},il={key:0,class:"ml-12",style:{color:"#f54a45"}},nl={key:1,class:"flex align-center mr-8"},sl={class:"ml-4"},ul={class:"ml-4"},cl={class:"p-8"},rl={class:"p-8"},pl={class:"p-8"},dl=Z({__name:"StatisticsCharts",props:{data:{type:Array,default:()=>[]},tokenUsage:{type:Array,default:()=>[]},topQuestions:{type:Array,default:()=>[]}},setup(R){const f=R,I=N(()=>[{id:"customerCharts",name:A("views.applicationOverview.monitor.charts.customerTotal"),icon:"app-user",background:"#EBF1FF",color:"#3370FF",sum:[De(M(f.data,"customer_num")||0),De(M(f.data,"customer_added_count")||0)],option:{title:A("views.applicationOverview.monitor.charts.customerTotal"),xData:M(f.data,"day"),yData:[{name:A("views.applicationOverview.monitor.charts.customerTotal"),area:!0,data:M(f.data,"customer_num")},{name:A("views.applicationOverview.monitor.charts.customerNew"),area:!0,data:M(f.data,"customer_added_count")}]}},{id:"chatRecordCharts",name:A("views.applicationOverview.monitor.charts.queryCount"),icon:"app-question",background:"#FFF3E5",color:"#FF8800",sum:[De(M(f.data,"chat_record_count")||0)],option:{title:A("views.applicationOverview.monitor.charts.queryCount"),xData:M(f.data,"day"),yData:[{data:M(f.data,"chat_record_count")}]}},{id:"tokensCharts",name:A("views.applicationOverview.monitor.charts.tokensTotal"),icon:"app-tokens",background:"#E5FBF8",color:"#00D6B9",sum:[De(M(f.data,"tokens_num")||0)],option:{title:A("views.applicationOverview.monitor.charts.tokensTotal"),xData:M(f.data,"day"),yData:[{data:M(f.data,"tokens_num")}]}},{id:"starCharts",name:A("views.applicationOverview.monitor.charts.userSatisfaction"),icon:"app-user-stars",background:"#FEEDEC",color:"#F54A45",sum:[De(M(f.data,"star_num")||0),De(M(f.data,"trample_num")||0)],option:{title:A("views.applicationOverview.monitor.charts.userSatisfaction"),xData:M(f.data,"day"),yData:[{name:A("views.applicationOverview.monitor.charts.approval"),data:M(f.data,"star_num")},{name:A("views.applicationOverview.monitor.charts.disapproval"),data:M(f.data,"trample_num")}]}}]),V=[{label:"TOP 10",value:10}],D=w(10),S=w(10),y=N(()=>{var d,a;return{title:A("views.applicationOverview.monitor.charts.tokenUsage"),xData:M((d=f.tokenUsage)==null?void 0:d.slice(0,D.value),"username"),yData:[{data:M((a=f.tokenUsage)==null?void 0:a.slice(0,D.value),"token_usage")}]}}),C=N(()=>{var d,a;return{title:A("views.applicationOverview.monitor.charts.topQuestions"),xData:M((d=f.topQuestions)==null?void 0:d.slice(0,S.value),"username"),yData:[{data:M((a=f.topQuestions)==null?void 0:a.slice(0,S.value),"chat_record_count")}]}});return(d,a)=>{const i=n("appIcon"),x=n("el-avatar"),T=n("AppIcon"),p=n("el-card"),r=n("el-col"),h=n("el-option"),B=n("el-select"),b=n("el-row");return g(),$(b,{gutter:16},{default:t(()=>[(g(!0),K(pe,null,de(I.value,(s,v)=>(g(),$(r,{xs:12,sm:12,md:12,lg:6,xl:6,key:v,class:"mb-16"},{default:t(()=>[e(p,{shadow:"never"},{default:t(()=>{var U,o,u,z;return[l("div",tl,[e(x,{size:40,shape:"square",style:ve({background:s.background})},{default:t(()=>[e(i,{iconName:s.icon,style:ve({fontSize:"24px",color:s.color})},null,8,["iconName","style"])]),_:2},1032,["style"]),l("div",al,[l("p",ll,c(s.name),1),s.id!=="starCharts"?(g(),K("div",ol,[l("h2",null,c(P(Ve)((U=s.sum)==null?void 0:U[0])),1),s.sum.length>1?(g(),K("span",il,"+"+c(P(Ve)((o=s.sum)==null?void 0:o[1])),1)):H("",!0)])):(g(),K("div",nl,[e(T,{iconName:"app-like-color"}),l("h2",sl,c((u=s.sum)==null?void 0:u[0]),1),e(T,{class:"ml-12",iconName:"app-oppose-color"}),l("h2",ul,c((z=s.sum)==null?void 0:z[1]),1)]))])])]}),_:2},1024)]),_:2},1024))),128)),(g(!0),K(pe,null,de(I.value,(s,v)=>(g(),$(r,{xs:24,sm:24,md:24,lg:12,xl:12,key:v,class:"mb-16"},{default:t(()=>[e(p,{shadow:"never"},{default:t(()=>[l("div",cl,[e(Ee,{height:"316px",id:s.id,type:"line",option:s.option},null,8,["id","option"])])]),_:2},1024)]),_:2},1024))),128)),e(r,{xs:24,sm:24,md:24,lg:12,xl:12,class:"mb-16"},{default:t(()=>[e(p,{shadow:"never",class:"StatisticsCharts-card"},{default:t(()=>[e(B,{modelValue:D.value,"onUpdate:modelValue":a[0]||(a[0]=s=>D.value=s),class:"top-select"},{default:t(()=>[(g(),K(pe,null,de(V,s=>e(h,{key:s.value,label:s.label,value:s.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),l("div",rl,[e(Ee,{height:"316px",id:"tokenUsageCharts",type:"bar",option:y.value},null,8,["option"])])]),_:1})]),_:1}),e(r,{xs:24,sm:24,md:24,lg:12,xl:12,class:"mb-16"},{default:t(()=>[e(p,{shadow:"never",class:"StatisticsCharts-card"},{default:t(()=>[e(B,{modelValue:S.value,"onUpdate:modelValue":a[1]||(a[1]=s=>S.value=s),class:"top-select"},{default:t(()=>[(g(),K(pe,null,de(V,s=>e(h,{key:s.value,label:s.label,value:s.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),l("div",pl,[e(Ee,{height:"316px",id:"topQuestionsCharts",type:"bar",option:C.value},null,8,["option"])])]),_:1})]),_:1})]),_:1})}}}),vl=Ue(dl,[["__scopeId","data-v-16522b90"]]),ml={class:"p-16-24"},_l={class:"mb-16"},fl={class:"main-calc-height"},gl={class:"title-decoration-1 mb-16"},hl={class:"title flex align-center"},wl={class:"edit-avatar mr-12"},yl=["src"],Al={class:"flex"},bl={class:"mt-4 mb-16 url-height flex align-center",style:{"margin-bottom":"37px"}},kl={class:"vertical-middle lighter break-all ellipsis-1"},Dl={class:"flex"},$l={class:"mt-4 mb-16 url-height"},Vl={class:"flex align-center"},xl={class:"flex"},Cl={class:"vertical-middle lighter break-all ellipsis-1"},Ol={class:"title-decoration-1 mb-16"},Il={class:"mb-16"},Sl=Z({__name:"index",setup(R){const f=xe(),{params:{id:I}}=f,V=N(()=>f.path.includes("resource-management")?"systemManage":"workspace"),D=N(()=>rt.application[V.value]),S=window.location.origin+`${window.MaxKB.chatPrefix}/api-doc/`,y=window.location.origin+`${window.MaxKB.chatPrefix}/api/`,C=w(),d=w(),a=w({}),i=w(null),x=w(!1),T=N(()=>Le(u.value)?"?"+Le(u.value):""),p=N(()=>{var m;return`${window.location.origin}${window.MaxKB.chatPrefix}/`+((m=a.value)==null?void 0:m.access_token)+T.value}),r=[{value:7,label:A("views.applicationOverview.monitor.pastDayOptions.past7Days")},{value:30,label:A("views.applicationOverview.monitor.pastDayOptions.past30Days")},{value:90,label:A("views.applicationOverview.monitor.pastDayOptions.past90Days")},{value:183,label:A("views.applicationOverview.monitor.pastDayOptions.past183Days")},{value:"other",label:A("common.custom")}],h=w(7),B=w(""),b=w({start_time:"",end_time:""}),s=w(!1),v=w([]),U=w([]),o=w([]),u=w([]);function z(m){window.open(m,"_blank")}const O=w(),L=je(null);function Q(){Xe([Ie.IS_EE,Ie.IS_PE],"OR")?L.value=He:L.value=Zt,$e(()=>{var m;L.value==He?Y({type:"application",systemType:V.value}).getApplicationSetting(I).then(E=>{var X;(X=O.value)==null||X.open(E.data,i.value)}):(m=O.value)==null||m.open(a.value,i.value)})}const G=w(),ce=je(null);function Ae(){Xe([Ie.IS_EE,Ie.IS_PE],"OR")?ce.value=Gt:ce.value=Kt,$e(()=>{G.value.open(a.value)})}function me(m){m!=="other"&&(b.value.start_time=pt(m),b.value.end_time=dt,be())}function _e(m){b.value.start_time=m[0],b.value.end_time=m[1],be()}function be(){Y({type:"application",systemType:V.value}).getStatistics(I,b.value,s).then(m=>{v.value=m.data}),Y({type:"application",systemType:V.value}).getTokenUsage(I,b.value,s).then(m=>{U.value=m.data}),Y({type:"application",systemType:V.value}).topQuestions(I,b.value,s).then(m=>{o.value=m.data})}function ae(){Je(A("views.applicationOverview.appInfo.refreshToken.msgConfirm1"),A("views.applicationOverview.appInfo.refreshToken.msgConfirm2"),{confirmButtonText:A("common.confirm"),cancelButtonText:A("common.cancel")}).then(()=>{const m={access_token_reset:!0},E=A("views.applicationOverview.appInfo.refreshToken.refreshSuccess");ne(m,E)}).catch(()=>{})}async function ke(m){const E={is_active:!m},X=E.is_active?A("common.status.enableSuccess"):A("common.status.disableSuccess");await ne(E,X).then(()=>!0).catch(()=>!1)}async function ne(m,E){Y({type:"application",systemType:V.value}).putAccessToken(I,m,x).then(X=>{a.value=X==null?void 0:X.data,we(E)})}function F(){C.value.open()}function J(){var m;d.value.open((m=a.value)==null?void 0:m.access_token)}function se(){Y({type:"application",systemType:V.value}).getAccessToken(I,x).then(m=>{a.value=m==null?void 0:m.data})}function j(){Y({type:"application",systemType:V.value}).getApplicationDetail(I,x).then(m=>{var E,X;i.value=m.data,(X=(E=i.value.work_flow)==null?void 0:E.nodes)==null||X.filter(q=>q.id==="base-node").map(q=>{u.value=q.properties.api_input_field_list?q.properties.api_input_field_list.map(ee=>({name:ee.variable,value:ee.default_value})):q.properties.input_field_list?q.properties.input_field_list.filter(ee=>ee.assignment_method==="api_input").map(ee=>({name:ee.variable,value:ee.default_value})):[]})})}function re(){se()}return Pe(()=>{j(),se(),me(h.value)}),(m,E)=>{const X=n("el-avatar"),q=n("el-text"),ee=n("el-switch"),ue=n("AppIcon"),W=n("el-button"),Ce=n("el-tooltip"),le=n("RefreshRight"),fe=n("el-icon"),Oe=n("el-col"),_=n("Key"),te=n("el-row"),Be=n("el-card"),Ze=n("el-option"),et=n("el-select"),tt=n("el-date-picker"),at=n("el-scrollbar"),ze=vt("loading");return g(),K("div",ml,[l("h2",_l,c(m.$t("views.applicationOverview.title")),1),e(at,null,{default:t(()=>[l("div",fl,[e(Be,{style:{"--el-card-padding":"24px"}},{default:t(()=>[l("h4",gl,c(m.$t("views.applicationOverview.appInfo.header")),1),Ye((g(),$(Be,{shadow:"never",class:"overview-card"},{default:t(()=>{var oe;return[l("div",hl,[l("div",wl,[e(X,{shape:"square",size:32,style:{background:"none"}},{default:t(()=>{var ge;return[l("img",{src:P(Ne)((ge=i.value)==null?void 0:ge.icon,P(Ne)("./favicon.ico")),alt:""},null,8,yl)]}),_:1})]),l("h4",null,c(((oe=i.value)==null?void 0:oe.name)||"-"),1)]),e(te,{gutter:12},{default:t(()=>[e(Oe,{span:12,class:"mt-16"},{default:t(()=>{var ge,Fe,Qe,Me;return[l("div",Al,[e(q,{type:"info"},{default:t(()=>[k(c(m.$t("views.applicationOverview.appInfo.publicAccessLink")),1)]),_:1}),e(ee,{modelValue:a.value.is_active,"onUpdate:modelValue":E[0]||(E[0]=Ke=>a.value.is_active=Ke),class:"ml-8",size:"small","inline-prompt":"","active-text":m.$t("views.applicationOverview.appInfo.openText"),"inactive-text":m.$t("views.applicationOverview.appInfo.closeText"),"before-change":()=>ke(a.value.is_active)},null,8,["modelValue","active-text","inactive-text","before-change"])]),l("div",bl,[l("span",kl,c(p.value),1),e(Ce,{effect:"dark",content:m.$t("common.copy"),placement:"top"},{default:t(()=>[e(W,{type:"primary",text:"",onClick:E[1]||(E[1]=Ke=>P(he)(p.value))},{default:t(()=>[e(ue,{iconName:"app-copy"})]),_:1})]),_:1},8,["content"]),e(Ce,{effect:"dark",content:m.$t("common.refresh"),placement:"top"},{default:t(()=>[e(W,{onClick:ae,type:"primary",text:"",style:{"margin-left":"1px"}},{default:t(()=>[e(fe,null,{default:t(()=>[e(le)]),_:1})]),_:1})]),_:1},8,["content"])]),l("div",null,[(ge=a.value)!=null&&ge.is_active?(g(),$(W,{key:0,disabled:!((Fe=a.value)!=null&&Fe.is_active),tag:"a",href:p.value,target:"_blank"},{default:t(()=>[e(ue,{iconName:"app-create-chat",class:"mr-4"}),k(" "+c(m.$t("views.application.operation.toChat")),1)]),_:1},8,["disabled","href"])):(g(),$(W,{key:1,disabled:!((Qe=a.value)!=null&&Qe.is_active)},{default:t(()=>[e(ue,{iconName:"app-create-chat",class:"mr-4"}),k(" "+c(m.$t("views.application.operation.toChat")),1)]),_:1},8,["disabled"])),D.value.overview_embed(P(I))?(g(),$(W,{key:2,disabled:!((Me=a.value)!=null&&Me.is_active),onClick:J},{default:t(()=>[e(ue,{iconName:"app-export",class:"mr-4"}),k(" "+c(m.$t("views.applicationOverview.appInfo.embedInWebsite")),1)]),_:1},8,["disabled"])):H("",!0),D.value.overview_access(P(I))?(g(),$(W,{key:3,onClick:Ae},{default:t(()=>[e(ue,{iconName:"app-lock",class:"mr-4"}),k(" "+c(m.$t("views.applicationOverview.appInfo.accessControl")),1)]),_:1})):H("",!0),D.value.overview_display(P(I))?(g(),$(W,{key:4,onClick:Q},{default:t(()=>[e(ue,{iconName:"app-setting",class:"mr-4"}),k(" "+c(m.$t("views.applicationOverview.appInfo.displaySetting")),1)]),_:1})):H("",!0)])]}),_:1}),e(Oe,{span:12,class:"mt-16"},{default:t(()=>[l("div",Dl,[e(q,{type:"info"},{default:t(()=>[k(c(m.$t("views.applicationOverview.appInfo.apiAccessCredentials")),1)]),_:1})]),l("div",$l,[l("div",null,[e(q,null,{default:t(()=>[k("API "+c(m.$t("common.fileUpload.document"))+":",1)]),_:1}),e(W,{type:"primary",link:"",onClick:E[2]||(E[2]=ge=>z(S)),class:"vertical-middle lighter break-all"},{default:t(()=>[k(c(S))]),_:1})]),l("div",Vl,[l("span",xl,[e(q,{style:{width:"80px"}},{default:t(()=>[...E[6]||(E[6]=[k("Base URL:",-1)])]),_:1})]),l("span",Cl,c(y+P(I)),1),e(Ce,{effect:"dark",content:m.$t("common.copy"),placement:"top"},{default:t(()=>[e(W,{type:"primary",text:"",onClick:E[3]||(E[3]=ge=>P(he)(y+P(I)))},{default:t(()=>[e(ue,{iconName:"app-copy"})]),_:1})]),_:1},8,["content"])])]),l("div",null,[D.value.overview_api_key(P(I))?(g(),$(W,{key:0,onClick:F},{default:t(()=>[e(fe,{class:"mr-4"},{default:t(()=>[e(_)]),_:1}),k(" "+c(m.$t("views.applicationOverview.appInfo.apiKey")),1)]),_:1})):H("",!0)])]),_:1})]),_:1})]}),_:1})),[[ze,x.value]])]),_:1}),e(Be,{style:{"--el-card-padding":"24px"},class:"mt-16"},{default:t(()=>[l("h4",Ol,c(m.$t("views.applicationOverview.monitor.monitoringStatistics")),1),l("div",Il,[e(et,{modelValue:h.value,"onUpdate:modelValue":E[4]||(E[4]=oe=>h.value=oe),class:"mr-12",onChange:me,style:{width:"180px"}},{default:t(()=>[(g(),K(pe,null,de(r,oe=>e(Ze,{key:oe.value,label:oe.label,value:oe.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),h.value==="other"?(g(),$(tt,{key:0,modelValue:B.value,"onUpdate:modelValue":E[5]||(E[5]=oe=>B.value=oe),type:"daterange","start-placeholder":m.$t("views.applicationOverview.monitor.startDatePlaceholder"),"end-placeholder":m.$t("views.applicationOverview.monitor.endDatePlaceholder"),format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",onChange:_e},null,8,["modelValue","start-placeholder","end-placeholder"])):H("",!0)]),Ye((g(),K("div",null,[e(vl,{data:v.value,"token-usage":U.value,"top-questions":o.value},null,8,["data","token-usage","top-questions"])])),[[ze,s.value]])]),_:1})])]),_:1}),e(Tt,{ref_key:"EmbedDialogRef",ref:d,data:i.value,"api-input-params":P(Le)(u.value)},null,8,["data","api-input-params"]),e(Ft,{ref_key:"APIKeyDialogRef",ref:C},null,512),(g(),$(Te(ce.value),{ref_key:"LimitDialogRef",ref:G,onRefresh:re},null,544)),(g(),$(Te(L.value),{ref_key:"DisplaySettingDialogRef",ref:O,onRefresh:re},null,544))])}}}),Ll=Ue(Sl,[["__scopeId","data-v-be1c91aa"]]);export{Ll as default};
|