auto-vue-basic 0.0.69 → 0.0.71
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(S,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("auto-vue-manual")):typeof define=="function"&&define.amd?define(["exports","vue","auto-vue-manual"],e):(S=typeof globalThis<"u"?globalThis:S||self,e(S.AutoVueBasic={},S.Vue,S["auto-vue-manual"]))})(this,(function(S,e,l){"use strict";const pe={tops:"tops",rules:"rules"},D=l.ApiUtils.routineApi("menu","id",pe,{},["TOP_MENU_LIST","MENU_LIST"]),G=l.ApiUtils.routineApi("rule","key");/*! Element Plus Icons Vue v2.3.2 */var fe=e.defineComponent({name:"Key",__name:"key",setup(N){return(k,C)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M448 456.064V96a32 32 0 0 1 32-32.064L672 64a32 32 0 0 1 0 64H512v128h160a32 32 0 0 1 0 64H512v128a256 256 0 1 1-64 8.064M512 896a192 192 0 1 0 0-384 192 192 0 0 0 0 384"})]))}}),ce=fe,me=e.defineComponent({name:"Search",__name:"search",setup(N){return(k,C)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),be=me;const W=e.defineComponent({__name:"TopMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(N,{emit:k}){const C=k,_=N,{requesting:h}=l.useLoading(D),{value:m,options:p,change:s,refresh:d,filterOptions:t}=l.useSelect(e.toRef(_,"modelValue"),C,{key:"TOP_MENU_LIST",api:D,url:D.urls.tops,isArray:!0});return(w,a)=>{const f=e.resolveComponent("el-space"),b=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(b,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":a[1]||(a[1]=c=>e.isRef(m)?m.value=c:null),options:e.unref(p),multiple:N.multiple,disabled:e.unref(h),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(t),onChange:e.unref(s)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(h),onRefresh:a[0]||(a[0]=c=>e.unref(d)(!0))},null,8,["loading"])]),default:e.withCtx(({item:c})=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${c.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(c.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),_e=e.defineComponent({__name:"MenuFormModal",emits:["refresh"],setup(N,{expose:k,emit:C}){const _=C,h={id:0,menu_id:0,module:"",sort:0,name:"",en_name:"",url:"",component:"",icon:"",remark:"",meta:{active:"",icon:"",title:"",affix:!1,full:!1,hide:!1,keep_alive:!1,link:!1}},m={sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],module:[{required:!0,message:l.Translate("base.placeholder.input menu.module"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],url:[{required:!0,message:l.Translate("base.placeholder.input base.url"),trigger:"blur"}],component:[{required:!0,message:l.Translate("base.placeholder.input menu.component"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:t,requesting:w,executing:a,open:f,modify:b,submit:c,closed:R}=l.useForm(_,h,D);return k({open:f,modify:b}),(x,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-col"),g=e.resolveComponent("el-input-number"),i=e.resolveComponent("el-row"),U=e.resolveComponent("el-input"),y=e.resolveComponent("el-switch"),B=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[17]||(r[17]=T=>e.isRef(p)?p.value=T:null),title:e.unref(s)(),width:"1000px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(B,{ref_key:"form",ref:d,model:e.unref(t),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(i,{gutter:20},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(i,{gutter:10},{default:e.withCtx(()=>[e.createVNode(n,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(W,{modelValue:e.unref(t).menu_id,"onUpdate:modelValue":r[0]||(r[0]=T=>e.unref(t).menu_id=T)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{"label-width":"60px",label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(g,{class:"w-full",modelValue:e.unref(t).sort,"onUpdate:modelValue":r[1]||(r[1]=T=>e.unref(t).sort=T),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(o,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(t).module,"onUpdate:modelValue":r[2]||(r[2]=T=>e.unref(t).module=T),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[3]||(r[3]=T=>e.unref(t).name=T),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[4]||(r[4]=T=>e.unref(t).en_name=T),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(t).component,"onUpdate:modelValue":r[5]||(r[5]=T=>e.unref(t).component=T),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(t).url,"onUpdate:modelValue":r[6]||(r[6]=T=>e.unref(t).url=T),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[7]||(r[7]=T=>e.unref(t).remark=T),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(t).icon,"onUpdate:modelValue":r[8]||(r[8]=T=>e.unref(t).icon=T),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:r[9]||(r[9]=T=>{e.unref(t).meta.icon=T})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+e.unref(t).icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(t).meta.title,"onUpdate:modelValue":r[10]||(r[10]=T=>e.unref(t).meta.title=T),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(t).meta.active,"onUpdate:modelValue":r[11]||(r[11]=T=>e.unref(t).meta.active=T),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(t).meta.link,"onUpdate:modelValue":r[12]||(r[12]=T=>e.unref(t).meta.link=T)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(t).meta.keep_alive,"onUpdate:modelValue":r[13]||(r[13]=T=>e.unref(t).meta.keep_alive=T)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(t).meta.hide,"onUpdate:modelValue":r[14]||(r[14]=T=>e.unref(t).meta.hide=T)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(t).meta.full,"onUpdate:modelValue":r[15]||(r[15]=T=>e.unref(t).meta.full=T)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(t).meta.affix,"onUpdate:modelValue":r[16]||(r[16]=T=>e.unref(t).meta.affix=T)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),H=e.defineComponent({__name:"MenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(N,{emit:k}){const C=k,_=N,{requesting:h}=l.useLoading(D),{value:m,options:p,change:s,refresh:d,filterOptions:t}=l.useSelect(e.toRef(_,"modelValue"),C,{key:"MENU_LIST",api:D,isArray:!0});return(w,a)=>{const f=e.resolveComponent("el-space"),b=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(b,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":a[1]||(a[1]=c=>e.isRef(m)?m.value=c:null),options:e.unref(p),multiple:N.multiple,disabled:e.unref(h),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(t),onChange:e.unref(s)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(h),onRefresh:a[0]||(a[0]=c=>e.unref(d)(!0))},null,8,["loading"])]),default:e.withCtx(({item:c})=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${c.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(c.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),he=e.defineComponent({__name:"MenuRuleFormModal",emits:["refresh"],setup(N,{expose:k,emit:C}){const _=C,h={key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""},m={menu_id:[{required:!0,type:"number",message:l.Translate("base.placeholder.select menu.Menu"),trigger:"blur"}],sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],urls:[{required:!0,message:l.Translate("base.placeholder.input menu.rules"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:t,requesting:w,executing:a,open:f,modify:b,submit:c,closed:R}=l.useForm(_,h,G);return k({open:f,modify:b}),(x,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input-number"),g=e.resolveComponent("el-input"),i=e.resolveComponent("el-col"),U=e.resolveComponent("el-row"),y=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[6]||(r[6]=B=>e.isRef(p)?p.value=B:null),title:e.unref(s)("menu.rules"),width:"1000px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(y,{ref_key:"form",ref:d,model:e.unref(t),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(U,{gutter:20},{default:e.withCtx(()=>[e.createVNode(i,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(H,{modelValue:e.unref(t).menu_id,"onUpdate:modelValue":r[0]||(r[0]=B=>e.unref(t).menu_id=B)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(n,{class:"w-full",modelValue:e.unref(t).sort,"onUpdate:modelValue":r[1]||(r[1]=B=>e.unref(t).sort=B),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[2]||(r[2]=B=>e.unref(t).name=B),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[3]||(r[3]=B=>e.unref(t).en_name=B),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[4]||(r[4]=B=>e.unref(t).remark=B),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(i,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).urls,"onUpdate:modelValue":r[5]||(r[5]=B=>e.unref(t).urls=B),type:"textarea",rows:11,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}});function Q(N){return typeof N=="function"||Object.prototype.toString.call(N)==="[object Object]"&&!e.isVNode(N)}const J=e.defineComponent({__name:"index",setup(N){const k={keyword:"",status:0},C=e.ref(""),_=[{label:l.Translate("base.sort"),prop:"sort",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:r})=>e.createVNode("span",{class:"iconfont "+r.icon,style:"font-size: 16px;"},null)},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.parent"),prop:"parent",width:120,render:({row:r})=>{var o;return e.createVNode(e.Fragment,null,[(o=r.menu)==null?void 0:o.translate])}},{label:l.Translate("base.name"),prop:"translate",width:160},{label:l.Translate("base.url"),prop:"url",align:"left",width:200},{label:l.Translate("menu.component"),prop:"component",align:"left",width:200},{label:l.Translate("menu.rules"),prop:"rules",width:0,align:"left",render:({row:r})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var o;return[(o=r.rules)==null?void 0:o.map(n=>e.createVNode(e.resolveComponent("el-popover"),{visible:C.value===n.key,title:l.Translate("message.warning"),placement:"top-end",width:220},{reference:()=>e.createVNode(e.resolveComponent("el-tag"),{class:"cursor-pointer",closable:!0,key:n.key,onClick:()=>R({key:n.key}),onClose:()=>C.value=n.key},{default:()=>[n.translate]}),default:()=>{let g,i;return e.createVNode("div",null,[e.createVNode("p",null,null),e.createVNode("p",null,[`${l.Translate("base.confirm base.space base.delete base.space menu.rules")}: ${r.translate}-${n.translate} ?`]),e.createVNode("div",{style:"text-align: right; margin: 0"},[e.createVNode(e.resolveComponent("el-button"),{size:"small",text:!0,onClick:()=>C.value=""},Q(g=l.Translate("base.cancel"))?g:{default:()=>[g]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>x(n.key)},Q(i=l.Translate("base.confirm"))?i:{default:()=>[i]})])])}}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:D.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:r})=>e.createVNode(l.ModifyButton,{size:"default",onModify:()=>f({id:r.id})},null)}],{requesting:h}=l.useLoading(D),{tableRef:m,formModalRef:p,keyword:s,search:d,refresh:t,reset:w,openFormModal:a,editFormModal:f}=l.useCrudPage(k),{formModalRef:b,openFormModal:c,editFormModal:R}=l.useCrudPage(),x=r=>{G[l.DEFAULT_REMOVE_KEY]({key:r}).then(()=>{C.value="",t()})};return(r,o)=>{const n=e.resolveComponent("el-button"),g=e.resolveComponent("el-input"),i=e.resolveComponent("el-radio-button"),U=e.resolveComponent("el-radio-group"),y=e.resolveComponent("el-space"),B=e.resolveComponent("el-page-header"),T=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(T,{class:"basic-card flex-full","body-class":"flex-1",onClick:o[5]||(o[5]=()=>C.value="")},{header:e.withCtx(()=>[e.createVNode(B,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(h),onRefresh:e.unref(w)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(a)},null,8,["onOpen"]),e.createVNode(n,{circle:"",icon:e.unref(ce),onClick:e.unref(c)},null,8,["icon","onClick"])]),content:e.withCtx(()=>[e.createVNode(y,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(g,{class:"basic-search-input",modelValue:e.unref(s).keyword,"onUpdate:modelValue":o[0]||(o[0]=A=>e.unref(s).keyword=A),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:o[1]||(o[1]=e.withKeys(A=>e.unref(d)(),["enter"])),onClear:o[2]||(o[2]=A=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(U,{modelValue:e.unref(s).status,"onUpdate:modelValue":o[3]||(o[3]=A=>e.unref(s).status=A),onChange:o[4]||(o[4]=A=>e.unref(d)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],A=>e.createVNode(i,{key:A,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${A}`),value:A},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(h),onSearch:e.unref(d)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:m,size:"small",columns:_,url:e.unref(D).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(s),"auto-search":""},null,8,["url","search-param"]),e.createVNode(_e,{ref_key:"formModalRef",ref:p,onRefresh:e.unref(t)},null,8,["onRefresh"]),e.createVNode(he,{ref_key:"ruleFormModalRef",ref:b,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),ge=Object.freeze(Object.defineProperty({__proto__:null,default:J},Symbol.toStringTag,{value:"Module"})),I=l.ApiUtils.routineApi("role","key"),Ce={class:"rule-check"},we={style:{width:"80px","line-height":"36px"}},Te=e.defineComponent({__name:"RulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(N,{expose:k,emit:C}){const{requesting:_}=l.useLoading(D),h=N,m=C,p=e.ref(!1),s=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:d,refresh:t}=l.useSelect(e.toRef(h,"modelValue"),m,{key:"RULE_CHECK",api:D,url:D.urls.rules,isArray:!0},{autoRefresh:!1});function w(){d.value.forEach(x=>{var r;(r=x.rules)!=null&&r.length&&(s.MenuAll[x.id]=!1,s.MenuIndeterminate[x.id]=!1,s.MenuList[x.id]=[])})}function a(x){d.value.forEach(r=>{var o;(o=r.rules)!=null&&o.length&&(s.MenuList[r.id]=x?r.rules.map(n=>n.key):[])}),b()}function f(x,r){const o=d.value.find(n=>n.id===r);s.MenuList[r]=x&&o?o.rules.map(n=>n.key):[],b()}function b(){d.value.forEach(x=>{var n,g;const r=((n=x.rules)==null?void 0:n.length)||0,o=((g=s.MenuList[x.id])==null?void 0:g.length)||0;s.MenuAll[x.id]=o===r&&r>0,s.MenuIndeterminate[x.id]=o>0&&o<r}),s.checkAll=Object.values(s.MenuAll).every(Boolean),s.indeterminate=!s.checkAll&&Object.values(s.MenuList).some(x=>x.length>0),m("update:modelValue",Object.values(s.MenuList).flat())}function c(){s.checkAll=!1,s.indeterminate=!1,s.MenuAll={},s.MenuList={},s.MenuIndeterminate={},w(),m("update:modelValue",[]),p.value=!1}function R(x){var r;if(Array.isArray(d.value)&&d.value.length>0){for(let o of d.value)if(Array.isArray(o.rules)&&o.rules.length>0)for(let n of o.rules)x.some(g=>g===n.key)&&(s.MenuList[o.id]=(((r=s.MenuList)==null?void 0:r[o.id])||[]).concat([n.key]));b(),p.value=!0}}return e.onMounted(async()=>{var x;(x=d.value)!=null&&x.length||await t(),!p.value&&h.modelValue&&R(h.modelValue)}),e.watch(()=>h.modelValue,x=>{e.nextTick(()=>{var r;p.value||!((r=d.value)!=null&&r.length)||x&&x.length>0&&R(x)})},{deep:!0,immediate:!0}),k({generateOption:R,cleanChecked:c}),(x,r)=>{const o=e.resolveComponent("el-checkbox"),n=e.resolveComponent("el-space"),g=e.resolveComponent("el-text"),i=e.resolveComponent("el-divider"),U=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Ce,[e.createVNode(n,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(o,{"model-value":s.checkAll,indeterminate:s.indeterminate,id:"all",disabled:N.disabled,onChange:a},{default:e.withCtx(()=>[...r[1]||(r[1]=[e.createElementVNode("span",null,"全选",-1)])]),_:1},8,["model-value","indeterminate","disabled"]),e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),text:"",size:"small",onRefresh:r[0]||(r[0]=y=>e.unref(t)(!0))},null,8,["loading"])]),_:1}),e.createVNode(n,{direction:"vertical",alignment:"start",class:"rule-check-content"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),y=>(e.openBlock(),e.createElementBlock("div",{key:y.id},[e.createVNode(n,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(o,{style:{"min-width":"150px"},"model-value":s.MenuAll[y.id],disabled:N.disabled||!y.rules||y.rules.length<=0,indeterminate:s.MenuIndeterminate[y.id],onChange:B=>f(B,y.id)},{default:e.withCtx(()=>[e.createVNode(g,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(i,{direction:"vertical"}),y.rules?(e.openBlock(),e.createBlock(U,{key:0,modelValue:s.MenuList[y.id],"onUpdate:modelValue":B=>s.MenuList[y.id]=B,disabled:N.disabled,style:{margin:"auto"},onChange:b},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.rules,B=>(e.openBlock(),e.createBlock(o,{key:B.key,value:B.key},{default:e.withCtx(()=>[e.createElementVNode("div",we,e.toDisplayString(B.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),X=(N,k)=>{const C=N.__vccOpts||N;for(const[_,h]of k)C[_]=h;return C},xe=X(Te,[["__scopeId","data-v-7adb5f76"]]),Ne=e.defineComponent({__name:"RoleFormModal",emits:["refresh"],setup(N,{expose:k,emit:C}){const _=C,h=e.ref(),m={key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]},p={name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}]},{modal:s,title:d,form:t,formData:w,requesting:a,executing:f,open:b,modify:c,submit:R,closed:x}=l.useForm(_,m,I),r=()=>{var o;(o=h.value)==null||o.cleanChecked(),x()};return k({open:b,modify:c}),(o,n)=>{const g=e.resolveComponent("el-input"),i=e.resolveComponent("el-form-item"),U=e.resolveComponent("el-col"),y=e.resolveComponent("el-input-number"),B=e.resolveComponent("el-row"),T=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":n[6]||(n[6]=A=>e.isRef(s)?s.value=A:null),title:e.unref(d)(),width:"1000px",executing:e.unref(f),onClosed:r,onSubmit:e.unref(R)},{default:e.withCtx(()=>[e.createVNode(T,{ref_key:"form",ref:t,model:e.unref(w),"label-width":"auto",rules:p,disabled:e.unref(a)||e.unref(f)},{default:e.withCtx(()=>[e.createVNode(B,{gutter:20},{default:e.withCtx(()=>[e.createVNode(U,{span:12},{default:e.withCtx(()=>[e.createVNode(i,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(w).module,"onUpdate:modelValue":n[0]||(n[0]=A=>e.unref(w).module=A),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(U,{span:12},{default:e.withCtx(()=>[e.createVNode(i,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(y,{class:"w-full",modelValue:e.unref(w).sort,"onUpdate:modelValue":n[1]||(n[1]=A=>e.unref(w).sort=A),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(i,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(w).name,"onUpdate:modelValue":n[2]||(n[2]=A=>e.unref(w).name=A),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(w).en_name,"onUpdate:modelValue":n[3]||(n[3]=A=>e.unref(w).en_name=A),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(w).remark,"onUpdate:modelValue":n[4]||(n[4]=A=>e.unref(w).remark=A),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("menu.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(xe,{ref_key:"rulesCheck",ref:h,modelValue:e.unref(w).rules,"onUpdate:modelValue":n[5]||(n[5]=A=>e.unref(w).rules=A),disabled:e.unref(a)||e.unref(f)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),Z=e.defineComponent({__name:"index",setup(N){const k={keyword:""},C=[{label:l.Translate("base.sort"),prop:"sort",width:80},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:180},{prop:"action",label:l.Translate("base.action"),width:65,align:"center",render:({row:f})=>e.createVNode(l.ModifyButton,{size:"default",onModify:()=>a({key:f.key})},null)}],{requesting:_}=l.useLoading(I),{tableRef:h,formModalRef:m,keyword:p,search:s,reset:d,refresh:t,openFormModal:w,editFormModal:a}=l.useCrudPage(k);return(f,b)=>{const c=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),x=e.resolveComponent("el-page-header"),r=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(r,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(x,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(w)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(R,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(c,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":b[0]||(b[0]=o=>e.unref(p).keyword=o),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:b[1]||(b[1]=e.withKeys(o=>e.unref(s)(),["enter"])),onClear:b[2]||(b[2]=o=>e.unref(s)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(_),onSearch:b[3]||(b[3]=o=>e.unref(s)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:h,columns:C,url:e.unref(I).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),"auto-search":""},null,8,["url","search-param"]),e.createVNode(Ne,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),ke=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"})),L=l.ApiUtils.routineApi("I18N","uuid",{gen:"gen",modules:"modules",languages:"languages"},{},["I18N_MODULES"]),O=l.ApiUtils.routineApi("I18N_template","uuid",{apps:"apps"}),u=e.defineComponent({__name:"ModuleSelect",props:{modelValue:{type:String,default:void 0,required:!1},multiple:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1}},emits:["update:modelValue","update:value","change"],setup(N,{emit:k}){const C=k,_=N,{requesting:h}=l.useLoading(L),{value:m,options:p,change:s,refresh:d,filterOptions:t}=l.useSelect(e.toRef(_,"modelValue"),C,{key:"I18N_MODULES",url:L.urls.modules,api:L,isArray:!0});return(w,a)=>{const f=e.resolveComponent("el-space"),b=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(b,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":a[1]||(a[1]=c=>e.isRef(m)?m.value=c:null),options:e.unref(p),multiple:N.multiple,disabled:e.unref(h),clearable:N.clearable,filterable:"","allow-create":"","default-first-option":"",placeholder:e.unref(l.Translate)("base.placeholder.select"),filterOptions:e.unref(t),onChange:e.unref(s)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(h),onRefresh:a[0]||(a[0]=c=>e.unref(d)(!0))},null,8,["loading"])]),default:e.withCtx(({item:c})=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(c.value),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","clearable","placeholder","filterOptions","onChange"])}}}),ye=e.defineComponent({__name:"I18N",emits:["refresh"],setup(N,{expose:k,emit:C}){const _=C,h={uuid:"",key:"",module:void 0,language:{"zh-CN":"","en-US":""},remark:""},m={module:[{required:!0,message:l.Translate("language.placeholder.module"),trigger:"blur"}],key:[{required:!0,message:l.Translate("language.placeholder.key"),trigger:"blur"}],language:[{required:!0,message:l.Translate("language.placeholder.language"),trigger:"change"}],result:[{required:!0,message:l.Translate("language.placeholder.result"),trigger:"blur"}]},p=e.ref([]),s=l.useCacheStore();function d(){const n={isArray:!0,key:"I18N_LANGUAGES",url:L.urls.languages,params:{}};s.GET_CACHE({...n,force:!0}).then(g=>{p.value=g})}d();const{modal:t,title:w,form:a,formData:f,requesting:b,executing:c,open:R,modify:x,submit:r,closed:o}=l.useForm(_,h,L);return k({open:R,modify:x}),(n,g)=>{const i=e.resolveComponent("el-form-item"),U=e.resolveComponent("el-input"),y=e.resolveComponent("el-space"),B=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(t),"onUpdate:modelValue":g[3]||(g[3]=T=>e.isRef(t)?t.value=T:null),title:e.unref(w)(),width:"600px",executing:e.unref(c),onClosed:e.unref(o),onSubmit:e.unref(r)},{default:e.withCtx(()=>[e.createVNode(B,{ref_key:"form",ref:a,model:e.unref(f),"label-width":"auto",rules:m,disabled:e.unref(b)||e.unref(c)},{default:e.withCtx(()=>[e.createVNode(i,{label:e.unref(l.Translate)("i18n.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:e.unref(f).module,"onUpdate:modelValue":g[0]||(g[0]=T=>e.unref(f).module=T)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("i18n.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(f).key,"onUpdate:modelValue":g[1]||(g[1]=T=>e.unref(f).key=T),placeholder:e.unref(l.Translate)("language.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("i18n.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(y,{direction:"vertical",fill:"",style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,T=>(e.openBlock(),e.createElementBlock("div",{key:T},[e.createVNode(U,{modelValue:e.unref(f).language[T],"onUpdate:modelValue":A=>e.unref(f).language[T]=A,placeholder:e.unref(l.Translate)("i18n.placeholder.key")},{prepend:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T),1)]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])]))),128))]),_:1})]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(f).remark,"onUpdate:modelValue":g[2]||(g[2]=T=>e.unref(f).remark=T),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}});function Re(N){return typeof N=="function"||Object.prototype.toString.call(N)==="[object Object]"&&!e.isVNode(N)}const M=e.defineComponent({__name:"I18N",emits:["closed","choosed"],setup(N,{expose:k,emit:C}){const _=e.ref(!1),h=C,m={keyword:"",module:void 0,status:0},p=[{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.key"),prop:"key",width:200},{label:l.Translate("base.i18n"),align:"left",prop:"language",render:({row:g})=>{const U=Object.keys(g.language).filter(y=>!!g.language[y]).map(y=>`${y}: ${g.language[y]}`).join("; ");return e.createVNode(e.resolveComponent("el-space"),null,Re(U)?U:{default:()=>[U]})}},{label:l.Translate("base.status"),prop:"checked",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:L.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:120,align:"center",render:({row:g})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",onModify:()=>x({uuid:g.uuid})},null),e.createVNode(l.RequestButton,{size:"default",text:!0,type:"danger",loading:d.value,onClick:()=>r(g.uuid)},null)]})}],{requesting:s,executing:d}=l.useLoading(L),{tableRef:t,formModalRef:w,keyword:a,search:f,reset:b,refresh:c,openFormModal:R,editFormModal:x}=l.useCrudPage(m);function r(g){return L.remove({uuid:g}).finally(()=>{c()})}const o=()=>{_.value=!0};function n(g){h("choosed",g),_.value=!1}return e.watch(()=>_.value,g=>{g||h("closed")}),k({open:o}),(g,i)=>{const U=e.resolveComponent("el-input"),y=e.resolveComponent("el-radio-button"),B=e.resolveComponent("el-radio-group"),T=e.resolveComponent("el-space"),A=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:_.value,"onUpdate:modelValue":i[7]||(i[7]=V=>_.value=V),width:"880px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(A,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(s),onRefresh:e.unref(b)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(R)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(T,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(U,{style:{width:"160px"},modelValue:e.unref(a).keyword,"onUpdate:modelValue":i[0]||(i[0]=V=>e.unref(a).keyword=V),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:i[1]||(i[1]=e.withKeys(V=>e.unref(f)(),["enter"])),onClear:i[2]||(i[2]=V=>e.unref(f)())},null,8,["modelValue","placeholder"]),e.createVNode(u,{modelValue:e.unref(a).module,"onUpdate:modelValue":i[3]||(i[3]=V=>e.unref(a).module=V),clearable:!0},null,8,["modelValue"]),e.createVNode(B,{modelValue:e.unref(a).status,"onUpdate:modelValue":i[4]||(i[4]=V=>e.unref(a).status=V),onChange:i[5]||(i[5]=V=>e.unref(f)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],V=>e.createVNode(y,{key:V,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${V}`),value:V},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(s),onSearch:i[6]||(i[6]=V=>e.unref(f)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:t,columns:p,url:e.unref(L).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),onRowDblclick:n,"auto-search":""},null,8,["url","search-param"]),e.createVNode(ye,{ref_key:"formModalRef",ref:w,onRefresh:e.unref(c)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),Ve=e.defineComponent({__name:"template",emits:["refresh"],setup(N,{expose:k,emit:C}){const{formModalRef:_,openFormModal:h}=l.useCrudPage(),m=C,p=e.ref("600px"),s=e.ref({"zh-CN":"primary","en-US":"success"}),d=e.ref({}),t={uuid:"",app:1,keys:[],values:[],remark:""},w={app:[{required:!0,message:l.Translate("i18n.placeholder.app"),trigger:"blur"}],keys:[{required:!0,message:l.Translate("i18n.placeholder.keys"),trigger:"blur"}],values:[{required:!0,message:l.Translate("i18n.placeholder.values"),trigger:"change"}]},{modal:a,title:f,form:b,formData:c,requesting:R,executing:x,open:r,modify:o,submit:n,closed:g}=l.useForm(m,t,O);function i(){p.value="1080px",h()}function U(){p.value="600px"}function y(B){let T=B.module.toLowerCase()+"."+B.key.toLowerCase();c.keys.push(T),c.values.push(T);for(const A in B.language)d.value[A]||(d.value[A]=[]),d.value[A].push(B.language[A])}return e.watch(()=>a.value,B=>{B?p.value="600px":g()}),k({open:r,modify:o}),(B,T)=>{const A=e.resolveComponent("el-page-header"),V=e.resolveComponent("el-form-item"),Me=e.resolveComponent("el-button"),ie=e.resolveComponent("el-input"),ve=e.resolveComponent("el-tag"),el=e.resolveComponent("el-space"),ll=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(a),"onUpdate:modelValue":T[3]||(T[3]=E=>e.isRef(a)?a.value=E:null),width:p.value,"show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(A,{class:"basic-header"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)()),1)]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{circle:!1,size:"default",type:"primary",icon:"icon-save",plain:!1,loading:e.unref(x),onClick:e.unref(n)},null,8,["loading","onClick"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(ll,{ref_key:"form",ref:b,model:e.unref(c),"label-width":"auto",rules:w,disabled:e.unref(R)||e.unref(x)},{default:e.withCtx(()=>[e.createVNode(V,{label:e.unref(l.Translate)("i18n.app"),prop:"app",required:""},{default:e.withCtx(()=>[e.createVNode(e.unref(l.BasicRadioButton),{modelValue:e.unref(c).app,"onUpdate:modelValue":T[0]||(T[0]=E=>e.unref(c).app=E),"cache-key":"I18NAPPS",hidden:[0],url:e.unref(O).urls.apps},null,8,["modelValue","url"])]),_:1},8,["label"]),e.createVNode(V,{label:e.unref(l.Translate)("i18n.keys"),prop:"keys",required:""},{default:e.withCtx(()=>[e.createVNode(ie,{modelValue:e.unref(c).keys,"onUpdate:modelValue":T[1]||(T[1]=E=>e.unref(c).keys=E),placeholder:e.unref(l.Translate)("i18n.placeholder.key")},{append:e.withCtx(()=>[e.createVNode(Me,{icon:e.unref(be),onClick:i},null,8,["icon"])]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(V,{label:e.unref(l.Translate)("i18n.values"),prop:"values",required:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c).values.join(":")),1)]),_:1},8,["label"]),e.createVNode(V,{label:e.unref(l.Translate)("i18n.values")},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(E,Y)=>(e.openBlock(),e.createElementBlock("div",{key:Y,class:"w-full"},[e.createVNode(el,null,{default:e.withCtx(()=>[e.createVNode(ve,{type:s.value[Y],style:{"min-width":"80px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Y),1)]),_:2},1032,["type"]),e.createElementVNode("span",null,e.toDisplayString(E.join("")),1)]),_:2},1024)]))),128))]),_:1},8,["label"]),e.createVNode(V,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(ie,{modelValue:e.unref(c).remark,"onUpdate:modelValue":T[2]||(T[2]=E=>e.unref(c).remark=E),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"]),e.createVNode(M,{ref_key:"I18nTableDrawerRef",ref:_,onChoosed:y,onClosed:U},null,512)]),_:1},8,["modelValue","width"])}}}),Ue=l.ApiUtils.routineApi("gateway","id",{gen:"gen_translation"});function Be(N){return typeof N=="function"||Object.prototype.toString.call(N)==="[object Object]"&&!e.isVNode(N)}const v=e.defineComponent({__name:"index",setup(N){const k={keyword:"",app:0,status:0},C=[{label:l.Translate("base.app"),prop:"app",width:120,render:({row:o})=>{let n;return e.createVNode(e.resolveComponent("el-tag"),{type:l.Translate("i18n.app.colors."+o.app),style:"min-width: 80px"},Be(n=l.Translate("i18n.app."+o.app))?n:{default:()=>[n]})}},{label:l.Translate("i18n.keys"),prop:"keys",width:200},{label:l.Translate("i18n.values"),prop:"values",width:200},{label:l.Translate("base.status"),prop:"checked",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:O.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:120,align:"center",render:({row:o})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",disabled:h.value,onModify:()=>c({uuid:o.uuid})},null),e.createVNode(l.RequestButton,{size:"default",text:!0,type:"danger",loading:h.value,onClick:()=>R(o.uuid)},null)]})}],{requesting:_,executing:h}=l.useLoading(O),{formModalRef:m,openFormModal:p}=l.useCrudPage(),{tableRef:s,formModalRef:d,keyword:t,search:w,reset:a,refresh:f,openFormModal:b,editFormModal:c}=l.useCrudPage(k);function R(o){return O.remove({uuid:o}).finally(()=>{f()})}function x(){return L.gen().finally(()=>{f()})}function r(){Ue.gen().finally(()=>{f()})}return(o,n)=>{const g=e.resolveComponent("el-divider"),i=e.resolveComponent("el-input"),U=e.resolveComponent("el-radio-button"),y=e.resolveComponent("el-radio-group"),B=e.resolveComponent("el-space"),T=e.resolveComponent("el-page-header"),A=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(A,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(T,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),onRefresh:e.unref(a)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(b)},null,8,["onOpen"])]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"warning",icon:"icon-cloud-upload",plain:!1,loading:e.unref(h),onClick:x},null,8,["loading"]),e.createVNode(e.unref(l.RequestButton),{size:"default",type:"danger",icon:"icon-translate",plain:!1,loading:e.unref(h),onClick:r},null,8,["loading"]),e.createVNode(g,{direction:"vertical"}),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(p),icon:"icon-en-US"},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(B,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(i,{class:"basic-search-input",modelValue:e.unref(t).keyword,"onUpdate:modelValue":n[0]||(n[0]=V=>e.unref(t).keyword=V),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:n[1]||(n[1]=e.withKeys(V=>e.unref(w)(),["enter"])),onClear:n[2]||(n[2]=V=>e.unref(w)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.BasicRadioButton),{modelValue:e.unref(t).app,"onUpdate:modelValue":n[3]||(n[3]=V=>e.unref(t).app=V),"cache-key":"I18NAPPS",url:e.unref(O).urls.apps,onChange:n[4]||(n[4]=V=>e.unref(w)())},null,8,["modelValue","url"]),e.createVNode(y,{modelValue:e.unref(t).status,"onUpdate:modelValue":n[5]||(n[5]=V=>e.unref(t).status=V),onChange:n[6]||(n[6]=V=>e.unref(w)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],V=>e.createVNode(U,{key:V,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${V}`),value:V},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(_),onSearch:n[7]||(n[7]=V=>e.unref(w)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:s,columns:C,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(t),"auto-search":""},null,8,["url","search-param"]),e.createVNode(M,{ref_key:"I18nTableDrawerRef",ref:m,onRefresh:e.unref(f)},null,8,["onRefresh"]),e.createVNode(Ve,{ref_key:"formModalRef",ref:d,onRefresh:e.unref(f)},null,8,["onRefresh"])]),_:1})}}}),Ae=Object.freeze(Object.defineProperty({__proto__:null,default:v},Symbol.toStringTag,{value:"Module"})),j=l.ApiUtils.routineApi("admin","key"),Se=e.defineComponent({__name:"AdminFormModal",emits:["refresh"],setup(N,{expose:k,emit:C}){const _=C,h={key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]},{modal:m,title:p,form:s,formData:d,requesting:t,executing:w,open:a,modify:f,submit:b,closed:c}=l.useForm(_,h,j),R={username:[{required:!0,message:l.Translate("base.placeholder.input base.username"),trigger:"blur"}],phone:[{required:!0,validator:l.RulesUtils.phoneRule,message:l.Translate("base.placeholder.input base.phone"),trigger:"blur"}],password:[{required:!1,message:l.Translate("base.placeholder.input base.password"),trigger:"blur"}],email:[{required:!0,message:l.Translate("base.placeholder.input base.email"),trigger:"blur"}],language:[{required:!0,message:l.Translate("base.placeholder.select base.language"),trigger:"change"}],roles:[{required:!0,type:"Array",message:l.Translate("base.placeholder.select menu.Role"),trigger:"change"}]},x=e.ref([]),r=async()=>{const o=await I.list();x.value=Array.isArray(o==null?void 0:o.data)?o.data:[]};return e.onBeforeMount(async()=>{await r()}),k({open:a,modify:f}),(o,n)=>{const g=e.resolveComponent("el-input"),i=e.resolveComponent("el-form-item"),U=e.resolveComponent("el-radio-button"),y=e.resolveComponent("el-radio-group"),B=e.resolveComponent("el-checkbox"),T=e.resolveComponent("el-checkbox-group"),A=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":n[7]||(n[7]=V=>e.isRef(m)?m.value=V:null),title:e.unref(p)(),width:"600px",executing:e.unref(w),onClosed:e.unref(c),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(A,{ref_key:"form",ref:s,model:e.unref(d),"label-width":"auto",rules:R,disabled:e.unref(t)||e.unref(w)},{default:e.withCtx(()=>[e.createVNode(i,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(d).username,"onUpdate:modelValue":n[0]||(n[0]=V=>e.unref(d).username=V),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(d).phone,"onUpdate:modelValue":n[1]||(n[1]=V=>e.unref(d).phone=V),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("base.password"),prop:"password",required:!e.unref(d).key},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(d).password,"onUpdate:modelValue":n[2]||(n[2]=V=>e.unref(d).password=V),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(i,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(d).email,"onUpdate:modelValue":n[3]||(n[3]=V=>e.unref(d).email=V),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(d).language,"onUpdate:modelValue":n[4]||(n[4]=V=>e.unref(d).language=V)},{default:e.withCtx(()=>[e.createVNode(U,{value:"zh-CN"},{default:e.withCtx(()=>[...n[8]||(n[8]=[e.createTextVNode("zh-CN",-1)])]),_:1}),e.createVNode(U,{value:"en-US"},{default:e.withCtx(()=>[...n[9]||(n[9]=[e.createTextVNode("en-US",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("menu.Role"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:e.unref(d).roles,"onUpdate:modelValue":n[5]||(n[5]=V=>e.unref(d).roles=V)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,V=>(e.openBlock(),e.createBlock(B,{key:V.key,value:V.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.translate),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(d).remark,"onUpdate:modelValue":n[6]||(n[6]=V=>e.unref(d).remark=V),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),ee=e.defineComponent({__name:"index",setup(N){const k={keyword:""},C=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:f})=>e.createVNode(l.BasicAvatar,{src:f.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:f})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[f.username]),e.createVNode("div",null,[f.email])]})},{label:l.Translate("base.phone"),prop:"phone",width:140},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.login_at"),prop:"login_at",width:160},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:f})=>e.createVNode(l.ModifyButton,{onModify:()=>a({key:f.key})},null)}],{requesting:_}=l.useLoading(j),{tableRef:h,formModalRef:m,keyword:p,search:s,reset:d,refresh:t,openFormModal:w,editFormModal:a}=l.useCrudPage(k);return(f,b)=>{const c=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),x=e.resolveComponent("el-page-header"),r=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(r,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(x,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(w)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(R,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(c,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":b[0]||(b[0]=o=>e.unref(p).keyword=o),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:b[1]||(b[1]=e.withKeys(o=>e.unref(s)(),["enter"])),onClear:b[2]||(b[2]=o=>e.unref(s)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(_),onSearch:b[3]||(b[3]=o=>e.unref(s)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:h,size:"small",columns:C,url:e.unref(j).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),"auto-search":""},null,8,["url","search-param"]),e.createVNode(Se,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),De=Object.freeze(Object.defineProperty({__proto__:null,default:ee},Symbol.toStringTag,{value:"Module"})),Le={check:"check"},q=l.ApiUtils.routineApi("site","id",Le),P=l.ApiUtils.routineApi("domain"),K=e.defineComponent({__name:"DomainSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(N,{expose:k,emit:C}){const _=C,h=N,{requesting:m}=l.useLoading(P),{key:p,options:s,refresh:d,change:t}=l.useSelect(e.toRef(h,"modelValue"),_,{key:"DOMAIN_LIST",api:P,isArray:!0});return k({refresh:d}),(w,a)=>{const f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{modelValue:e.unref(p),"onUpdate:modelValue":a[0]||(a[0]=b=>e.isRef(p)?p.value=b:null),options:e.unref(s),disabled:N.disabled||e.unref(m),placeholder:e.unref(l.Translate)("base.select config.domain"),onChange:e.unref(t)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(m),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),Ee=e.defineComponent({__name:"SiteFormModal",emits:["refresh"],setup(N,{expose:k,emit:C}){const _=C,h={id:0,domain_id:0,prefix:"",name:"",en_name:"",dns:"",git:"",status:1,remark:""},m={domain_id:[{required:!0,message:l.Translate("base.placeholder.input config.domain"),trigger:"blur"}],prefix:[{required:!0,message:l.Translate("base.placeholder.input base.prefix"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:t,requesting:w,executing:a,open:f,modify:b,submit:c,closed:R}=l.useForm(_,h,q);return k({open:f,modify:b}),(x,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[7]||(r[7]=i=>e.isRef(p)?p.value=i:null),title:e.unref(s)("config.site"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:d,model:e.unref(t),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(o,{prop:"domain_id",label:e.unref(l.Translate)("config.domain")},{default:e.withCtx(()=>[e.createVNode(K,{modelValue:e.unref(t).domain_id,"onUpdate:modelValue":r[0]||(r[0]=i=>e.unref(t).domain_id=i),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(o,{prop:"prefix",label:e.unref(l.Translate)("config.prefix")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).prefix,"onUpdate:modelValue":r[1]||(r[1]=i=>e.unref(t).prefix=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[2]||(r[2]=i=>e.unref(t).name=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"en_name",label:e.unref(l.Translate)("base.en_name")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[3]||(r[3]=i=>e.unref(t).en_name=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"dns",label:e.unref(l.Translate)("config.dns")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).dns,"onUpdate:modelValue":r[4]||(r[4]=i=>e.unref(t).dns=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"git",label:e.unref(l.Translate)("config.git")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).git,"onUpdate:modelValue":r[5]||(r[5]=i=>e.unref(t).git=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[6]||(r[6]=i=>e.unref(t).remark=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),z=l.ApiUtils.routineApi("domain_provider"),le=e.defineComponent({__name:"DomainProviderSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(N,{expose:k,emit:C}){const _=C,h=N,{requesting:m}=l.useLoading(z),{key:p,options:s,refresh:d,change:t}=l.useSelect(e.toRef(h,"modelValue"),_,{key:"DOMAIN_PROVIDER_LIST",api:z,isArray:!0});return k({refresh:d}),(w,a)=>{const f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{modelValue:e.unref(p),"onUpdate:modelValue":a[0]||(a[0]=b=>e.isRef(p)?p.value=b:null),options:e.unref(s),disabled:N.disabled||e.unref(m),placeholder:e.unref(l.Translate)("base.select config.domain config.provider"),onChange:e.unref(t)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(m),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),Oe=e.defineComponent({__name:"DomainFormModal",emits:["refresh"],setup(N,{expose:k,emit:C}){const _=C,h={id:0,provider_id:0,name:"",expired_at:"",status:1,remark:""},m={provider_id:[{required:!0,message:l.Translate("base.placeholder.input config.domain config.provider"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:t,requesting:w,executing:a,open:f,modify:b,submit:c,closed:R}=l.useForm(_,h,P);return k({open:f,modify:b}),(x,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input"),g=e.resolveComponent("el-date-picker"),i=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[4]||(r[4]=U=>e.isRef(p)?p.value=U:null),title:e.unref(s)("config.domain"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(i,{ref_key:"form",ref:d,model:e.unref(t),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(o,{prop:"provider_id",label:e.unref(l.Translate)("config.provider")},{default:e.withCtx(()=>[e.createVNode(le,{modelValue:e.unref(t).provider_id,"onUpdate:modelValue":r[0]||(r[0]=U=>e.unref(t).provider_id=U),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(o,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[1]||(r[1]=U=>e.unref(t).name=U),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"expired_at",required:"",label:e.unref(l.Translate)("base.expired_at")},{default:e.withCtx(()=>[e.createVNode(g,{type:"date",style:{width:"100%"},modelValue:e.unref(t).expired_at,"onUpdate:modelValue":r[2]||(r[2]=U=>e.unref(t).expired_at=U),disabled:e.unref(a),"value-format":e.unref(l.TimeUtils).DATE_VALUE_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,placeholder:e.unref(l.Translate)("base.placeholder.select")},null,8,["modelValue","disabled","value-format","format","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[3]||(r[3]=U=>e.unref(t).remark=U),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),qe={gen:"gen"},F=l.ApiUtils.routineApi("SSL","id",qe),re=e.defineComponent({__name:"SiteSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(N,{expose:k,emit:C}){const _=C,h=N,{requesting:m}=l.useLoading(q),{key:p,options:s,refresh:d,change:t}=l.useSelect(e.toRef(h,"modelValue"),_,{key:"SITE_LIST",api:q,isArray:!0},{formatOptions:w=>w.map(a=>{var f;return{...a,label:a.prefix+"."+((f=a.domain)==null?void 0:f.name),value:a.id}})});return k({refresh:d}),(w,a)=>{const f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{modelValue:e.unref(p),"onUpdate:modelValue":a[0]||(a[0]=b=>e.isRef(p)?p.value=b:null),options:e.unref(s),disabled:N.disabled||e.unref(m),placeholder:e.unref(l.Translate)("base.select config.domain"),onChange:e.unref(t)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(m),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),te=e.defineComponent({__name:"SSLFormModal",emits:["refresh"],setup(N,{expose:k,emit:C}){const _=C,h={id:0,domain_id:void 0,client:"Lego",site_id:void 0,name:"",path:"",email:"",encryption:"RSA2048",remark:""},m={domain_id:[{required:!0,message:l.Translate("base.placeholder.select config.domain "),trigger:"blur"}],client:[{required:!0,message:l.Translate("base.placeholder.select config.client "),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],path:[{required:!0,message:l.Translate("base.placeholder.input base.path"),trigger:"blur"}],email:[{required:!0,message:l.Translate("base.placeholder.input base.email"),trigger:"blur"}],encryption:[{required:!0,message:l.Translate("base.placeholder.input config.encryption"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:t,requesting:w,executing:a,open:f,modify:b,submit:c,closed:R}=l.useForm(_,h,F);return k({open:f,modify:b,formData:t}),(x,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-radio-button"),g=e.resolveComponent("el-radio-group"),i=e.resolveComponent("el-input"),U=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[8]||(r[8]=y=>e.isRef(p)?p.value=y:null),title:e.unref(s)("ssl.ssl"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(U,{ref_key:"form",ref:d,model:e.unref(t),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(o,{prop:"domain_id",label:e.unref(l.Translate)("config.domain")},{default:e.withCtx(()=>[e.createVNode(K,{modelValue:e.unref(t).domain_id,"onUpdate:modelValue":r[0]||(r[0]=y=>e.unref(t).domain_id=y),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(o,{prop:"client",label:e.unref(l.Translate)("ssl.client")},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).client,"onUpdate:modelValue":r[1]||(r[1]=y=>e.unref(t).client=y)},{default:e.withCtx(()=>[e.createVNode(n,{label:"Lego",value:"Lego"})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{prop:"site_id",label:e.unref(l.Translate)("config.site")},{default:e.withCtx(()=>[e.createVNode(re,{modelValue:e.unref(t).site_id,"onUpdate:modelValue":r[2]||(r[2]=y=>e.unref(t).site_id=y),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(o,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[3]||(r[3]=y=>e.unref(t).name=y),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"path",label:e.unref(l.Translate)("base.path")},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(t).path,"onUpdate:modelValue":r[4]||(r[4]=y=>e.unref(t).path=y),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"email",label:e.unref(l.Translate)("base.email")},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(t).email,"onUpdate:modelValue":r[5]||(r[5]=y=>e.unref(t).email=y),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"encryption",label:e.unref(l.Translate)("config.encryption")},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).encryption,"onUpdate:modelValue":r[6]||(r[6]=y=>e.unref(t).encryption=y)},{default:e.withCtx(()=>[e.createVNode(n,{label:"RSA2048",value:"RSA2048"})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[7]||(r[7]=y=>e.unref(t).remark=y),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),Fe=e.defineComponent({__name:"DomainProviderFormModal",emits:["refresh"],setup(N,{expose:k,emit:C}){const _=C,h={id:0,name:"",en_name:"",key:"",secret:"",end_point:"",status:1,remark:""},m={name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"},key:{required:!0,message:l.Translate("base.placeholder.input base.key"),trigger:"blur"},secret:{required:!0,message:l.Translate("base.placeholder.input config.secret"),trigger:"blur"},end_point:{required:!0,message:l.Translate("base.placeholder.input config.endpoint"),trigger:"blur"}},{modal:p,title:s,form:d,formData:t,requesting:w,executing:a,open:f,modify:b,submit:c,closed:R}=l.useForm(_,h,z);return k({open:f,modify:b}),(x,r)=>{const o=e.resolveComponent("el-input"),n=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[6]||(r[6]=i=>e.isRef(p)?p.value=i:null),title:e.unref(s)("config.domain"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:d,model:e.unref(t),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[0]||(r[0]=i=>e.unref(t).name=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"en_name",label:e.unref(l.Translate)("base.en_name")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[1]||(r[1]=i=>e.unref(t).en_name=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"key",label:e.unref(l.Translate)("base.key")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).key,"onUpdate:modelValue":r[2]||(r[2]=i=>e.unref(t).key=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"secret",label:e.unref(l.Translate)("config.secret")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).secret,"onUpdate:modelValue":r[3]||(r[3]=i=>e.unref(t).secret=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"end_point",label:e.unref(l.Translate)("config.end_point")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).end_point,"onUpdate:modelValue":r[4]||(r[4]=i=>e.unref(t).end_point=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[5]||(r[5]=i=>e.unref(t).remark=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),$e=e.defineComponent({__name:"DomainProviderTableDrawer",setup(N,{expose:k}){const{requesting:C}=l.useLoading(z),_=e.ref(!1),{tableRef:h,formModalRef:m,refresh:p,openFormModal:s,editFormModal:d}=l.useCrudPage({}),t=[{prop:"name",label:l.Translate("base.name"),width:0,minWidth:140},{prop:"en_name",label:l.Translate("base.en_name"),width:120},{prop:"actions",label:l.Translate("base.action"),width:60,align:"center",render:({rowData:a})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>d({id:a.id})},null)]})}];return k({open:()=>{_.value=!0}}),(a,f)=>{const b=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:_.value,"onUpdate:modelValue":f[0]||(f[0]=c=>_.value=c),width:"400px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(b,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.domain config.provider")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(p),size:"default",loading:e.unref(C)},null,8,["onRefresh","loading"])]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(s)},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small","row-key":"id",url:e.unref(z).urls.list,columns:t,loading:e.unref(C)},null,8,["url","loading"]),e.createVNode(Fe,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(p)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),Pe=e.defineComponent({__name:"DomainTableDrawer",setup(N,{expose:k}){const{requesting:C}=l.useLoading(P),_=e.ref(!1),{tableRef:h,formModalRef:m,refresh:p,openFormModal:s,editFormModal:d}=l.useCrudPage(),{formModalRef:t,openFormModal:w,editFormModal:a}=l.useCrudPage(),{formModalRef:f,openFormModal:b}=l.useCrudPage(),c=[{prop:"provider",label:l.Translate("config.domain config.provider"),width:120,cellRenderer:({rowData:x})=>e.createVNode(e.resolveComponent("el-text"),null,{default:()=>{var r;return[(r=x.provider)==null?void 0:r.name]}})},{prop:"name",label:l.Translate("base.name"),width:0,minWidth:120},{prop:"expired_text",label:l.Translate("base.expired_at"),width:160},{prop:"actions",label:l.Translate("base.action"),width:100,align:"center",render:({rowData:x})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>d({id:x.id})},null),e.createVNode(l.OpenButton,{icon:"icon-safetycertificate-f",type:"primary",size:"small",link:!0,onOpen:()=>{var r;x.ssl&&x.ssl.id?a({id:(r=x.ssl)==null?void 0:r.id}):(t.value.formData.domain_id=x.id,t.value.formData.site_id=0,w())}},null)]})}];return k({open:()=>{_.value=!0}}),(x,r)=>{const o=e.resolveComponent("el-space"),n=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:_.value,"onUpdate:modelValue":r[0]||(r[0]=g=>_.value=g),width:"600px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(n,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.domain")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(p),size:"default",loading:e.unref(C)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(s)},null,8,["onOpen"])]),extra:e.withCtx(()=>[e.createVNode(o,{class:"w-full extra-tool",alignment:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(b),type:"danger"},null,8,["onOpen"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small","row-key":"id",url:e.unref(P).urls.list,columns:c,loading:e.unref(C)},null,8,["url","loading"]),e.createVNode(Oe,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(p)},null,8,["onRefresh"]),e.createVNode(te,{ref_key:"sslFormModalRef",ref:t,onRefresh:e.unref(p)},null,8,["onRefresh"]),e.createVNode($e,{ref_key:"providerTableDrawerRef",ref:f},null,512)]),_:1},8,["modelValue"])}}}),ze=e.defineComponent({__name:"SSLTableDrawer",setup(N,{expose:k}){const{requesting:C,executing:_}=l.useLoading(F),h=e.ref(0),m=e.ref(!1),{tableRef:p,formModalRef:s,refresh:d,openFormModal:t,editFormModal:w}=l.useCrudPage(),a=[{prop:"client",label:l.Translate("ssl.client"),width:100},{prop:"encryption",label:l.Translate("ssl.encryption"),width:100},{prop:"name",label:l.Translate("base.name"),width:0,minWidth:120},{prop:"path",label:l.Translate("base.path"),width:120},{prop:"renewal_days",label:l.Translate("ssl.renewal_days"),width:100},{prop:"checked_at",label:l.Translate("ssl.checked_at"),width:160},{prop:"actions",label:l.Translate("base.action"),width:160,align:"center",render:({rowData:R})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",icon:"icon-edit",t:"",disabled:_.value,onModify:()=>w({id:R.id})},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-key",t:"",text:!0,disabled:_.value&&h.value!==R.id,loading:h.value==R.id,onClick:()=>b(R.id)},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-cloud-download",t:"",text:!0,disabled:_.value&&h.value!==R.id,loading:h.value==R.id,onClick:()=>c(R)},null)]})}],f=()=>{m.value=!0},b=R=>{F.gen({id:R}).then(x=>{console.warn("Res:",x)})};function c(R){const x=l.AssetsUtils.getDownloadUrl(R.path+".zip");fetch(x).then(r=>r.blob()).then(r=>{let o=URL.createObjectURL(r),n=document.createElement("a");n.style.display="none",n.href=o,n.download=R.name+".zip",n.click(),URL.revokeObjectURL(r)})}return k({open:f}),(R,x)=>{const r=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:m.value,"onUpdate:modelValue":x[0]||(x[0]=o=>m.value=o),width:"1000px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(r,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("ssl.ssl")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(d),size:"default",loading:e.unref(C)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(t)},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:p,size:"default","row-key":"id",url:e.unref(F).urls.list,columns:a,loading:e.unref(C)},null,8,["url","loading"]),e.createVNode(te,{ref_key:"formModalRef",ref:s,onRefresh:e.unref(d)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),ne=l.ApiUtils.routineApi("SSLLog","id"),Ie=e.defineComponent({__name:"SSLLogTableDrawer",props:{ssl:{type:Object,default:()=>({})}},setup(N,{expose:k}){const C=N,{requesting:_,executing:h}=l.useLoading([ne,F]),m=e.ref(!1),{tableRef:p,refresh:s}=l.useCrudPage(),d=[{prop:"status_text",label:l.Translate("base.status"),width:100},{prop:"at",label:l.Translate("base.time"),width:180},{prop:"type_text",label:l.Translate("base.type"),width:80},{prop:"result",label:l.Translate("base.result"),width:0}],t=()=>{m.value=!0};function w(){F.gen({id:C.ssl.id}).then(f=>{console.warn("Res:",f)})}function a(){const f=l.AssetsUtils.getDownloadUrl(C.ssl.path+".zip");fetch(f).then(b=>b.blob()).then(b=>{let c=URL.createObjectURL(b),R=document.createElement("a");R.style.display="none",R.href=c,R.download=C.ssl.name+".zip",R.click(),URL.revokeObjectURL(b)})}return k({open:t}),(f,b)=>{const c=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:m.value,"onUpdate:modelValue":b[0]||(b[0]=R=>m.value=R),width:"600px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(c,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.ssl base.log")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(s),size:"default",loading:e.unref(_)},null,8,["onRefresh","loading"])]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"danger",icon:"icon-key",disabled:e.unref(h),loading:e.unref(h),onClick:w},null,8,["disabled","loading"]),e.createVNode(e.unref(l.RequestButton),{size:"default",type:"primary",icon:"icon-cloud-download",disabled:e.unref(h),loading:e.unref(h),onClick:a},null,8,["disabled","loading"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:p,size:"small","row-key":"id",url:e.unref(ne).urls.search,columns:d,loading:e.unref(_)},null,8,["url","loading"])]),_:1},8,["modelValue"])}}}),oe=X(e.defineComponent({__name:"index",setup(N){const k=e.ref(),{requesting:C,executing:_}=l.useLoading(q),{tableRef:h,formModalRef:m,reset:p,refresh:s,openFormModal:d,editFormModal:t}=l.useCrudPage(),{formModalRef:w,openFormModal:a}=l.useCrudPage(),{formModalRef:f,openFormModal:b}=l.useCrudPage(),{formModalRef:c,openFormModal:R}=l.useCrudPage(),x=[{prop:"domain.name",label:l.Translate("config.domain"),width:129,type:"copy"},{prop:"name",label:l.Translate("base.name"),width:100},{prop:"dns",label:l.Translate("config.dns"),width:160,type:"copy"},{prop:"git",label:l.Translate("config.git"),width:300,type:"copy"},{prop:"expired_at",label:l.Translate("base.expired_at"),align:"center",width:140,cellRenderer:({rowData:n})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(e.resolveComponent("el-text"),null,{default:()=>{var g;return[(g=n.ssl)==null?void 0:g.renewal_days,e.createTextVNode(" 天")]}}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"primary",text:!0,onClick:g=>{g.stopPropagation(),n.ssl&&n.ssl.id&&(k.value=n.ssl,R())}},{default:()=>[e.createVNode("span",{class:"icon iconfont icon-reloadtime"},null)]})]})},{prop:"remark",label:l.Translate("base.remark"),width:0,minWidth:160},{prop:"operation",label:l.Translate("base.action"),width:100,align:"center",cellRenderer:({rowData:n})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>t({id:n.id})},null),e.createVNode(l.RequestButton,{icon:"icon-securityscan",type:"primary",size:"small",link:!0,disabled:_.value,loading:r.value==n.id&&_.value,onClick:()=>o(n)},null)]})}],r=e.ref(0),o=n=>{r.value=n.id,q.check({id:n.id}).then(g=>{g.data&&(l.notification(g),s())}).finally(()=>{r.value=0})};return(n,g)=>{const i=e.resolveComponent("el-space"),U=e.resolveComponent("el-page-header"),y=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(y,{"body-style":{padding:"12px",height:"450px"},"body-class":"flex-1",class:"config-card"},{header:e.withCtx(()=>[e.createVNode(U,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.keys.sites")),1)]),content:e.withCtx(()=>[e.createVNode(i,{alignment:"center",style:{height:"32px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(p)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(d)},null,8,["onOpen"])]),_:1})]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(a),icon:"icon-compass"},null,8,["onOpen"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(b),icon:"icon-safetycertificate-f"},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small","row-key":"id",url:e.unref(q).urls[e.unref(l.DEFAULT_LIST_URL)],"auto-search":"",columns:x},null,8,["url"]),e.createVNode(Ee,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(s)},null,8,["onRefresh"]),e.createVNode(Pe,{ref_key:"domainTableDrawerRef",ref:w},null,512),e.createVNode(ze,{ref_key:"sslTableDrawerRef",ref:f},null,512),e.createVNode(Ie,{ref_key:"sslLogTableDrawerRef",ref:c},null,512)]),_:1})}}}),[["__scopeId","data-v-6d185b05"]]),je=Object.freeze(Object.defineProperty({__proto__:null,default:oe},Symbol.toStringTag,{value:"Module"})),Ke={request:"request",error:"error",sql:"SQL"},$=l.ApiUtils.routineApi("log","id",Ke),ae=e.defineComponent({__name:"index",setup(N){const k={dates:[l.TimeUtils.getCurrentHour().format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentHour(1).format(l.TimeUtils.DATE_VALUE_FORMAT)]},C=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:d})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(d.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:_}=l.useLoading($),{tableRef:h,keyword:m,search:p,reset:s}=l.useCrudPage(k);return(d,t)=>{const w=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),f=e.resolveComponent("el-page-header"),b=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(b,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(f,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),onRefresh:e.unref(s)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(m).dates,"onUpdate:modelValue":t[0]||(t[0]=c=>e.unref(m).dates=c),class:"basic-search-datetimerange","value-format":e.unref(l.TimeUtils).DATE_VALUE_FORMAT,format:e.unref(l.TimeUtils).DATE_SHOW_FORMAT,type:"datetimerange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:t[1]||(t[1]=c=>e.unref(p)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(_),onSearch:t[2]||(t[2]=c=>e.unref(p)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small",columns:C,url:e.unref($).urls.request,"search-param":e.unref(m),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),Ye=Object.freeze(Object.defineProperty({__proto__:null,default:ae},Symbol.toStringTag,{value:"Module"})),se=e.defineComponent({__name:"index",setup(N){const k={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_FORMAT),l.TimeUtils.getCurrentDate(0).format(l.TimeUtils.DATE_FORMAT)]},C=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:d})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(d.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:_}=l.useLoading($),{tableRef:h,keyword:m,search:p,reset:s}=l.useCrudPage(k);return(d,t)=>{const w=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),f=e.resolveComponent("el-page-header"),b=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(b,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(f,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),onRefresh:e.unref(s)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(m).dates,"onUpdate:modelValue":t[0]||(t[0]=c=>e.unref(m).dates=c),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,type:"daterange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:t[1]||(t[1]=c=>e.unref(p)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(_),onSearch:t[2]||(t[2]=c=>e.unref(p)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small",columns:C,url:e.unref($).urls.error,"search-param":e.unref(m),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),Ge=Object.freeze(Object.defineProperty({__proto__:null,default:se},Symbol.toStringTag,{value:"Module"})),de=e.defineComponent({__name:"index",setup(N){const k={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_FORMAT),l.TimeUtils.getCurrentDate().format(l.TimeUtils.DATE_FORMAT)]},C=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:d})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(d.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:_}=l.useLoading($),{tableRef:h,keyword:m,search:p,reset:s}=l.useCrudPage(k);return(d,t)=>{const w=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),f=e.resolveComponent("el-page-header"),b=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(b,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(f,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),onRefresh:e.unref(s)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(m).dates,"onUpdate:modelValue":t[0]||(t[0]=c=>e.unref(m).dates=c),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,type:"daterange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:t[1]||(t[1]=c=>e.unref(p)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(_),onSearch:t[2]||(t[2]=c=>e.unref(p)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small",columns:C,url:e.unref($).urls.sql,"search-param":e.unref(m),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),We=Object.freeze(Object.defineProperty({__proto__:null,default:de},Symbol.toStringTag,{value:"Module"})),He=()=>Promise.resolve().then(()=>Ye),Qe=()=>Promise.resolve().then(()=>Ge),Je=()=>Promise.resolve().then(()=>We),Xe=[{path:l.REQUEST_LOG_URL,name:"RequestLog",component:He,meta:{title:l.Translate("menu.RequestLog")}},{path:l.ERROR_LOG_URL,name:"ErrorLog",component:Qe,meta:{title:l.Translate("menu.ErrorLog")}},{path:l.SQL_LOG_URL,name:"SqlLog",component:Je,meta:{title:l.Translate("menu.SqlLog")}}],Ze={install:N=>{Reflect.ownKeys(N._context.provides).some(k=>String(k)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app.",Reflect.ownKeys(N._context.provides))},version:"__VERSION__"},ue=Object.assign({"./views/admin/index.vue":()=>Promise.resolve().then(()=>De),"./views/language/index.vue":()=>Promise.resolve().then(()=>Ae),"./views/menu/index.vue":()=>Promise.resolve().then(()=>ge),"./views/role/index.vue":()=>Promise.resolve().then(()=>ke),"./views/site/index.vue":()=>Promise.resolve().then(()=>je)});S.AdminsPage=ee,S.DomainProviderSelect=le,S.DomainSelect=K,S.ErrorLogsPage=se,S.LanguagesPage=v,S.LogRoutes=Xe,S.MenuSelect=H,S.MenusPage=J,S.RequestLogsPage=ae,S.RolesPage=Z,S.SQLLogsPage=de,S.SitePage=oe,S.SiteSelect=re,S.TopMenuSelect=W,S.basicModules=ue,S.default=Ze,Object.defineProperties(S,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
(function(S,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("auto-vue-manual")):typeof define=="function"&&define.amd?define(["exports","vue","auto-vue-manual"],e):(S=typeof globalThis<"u"?globalThis:S||self,e(S.AutoVueBasic={},S.Vue,S["auto-vue-manual"]))})(this,(function(S,e,l){"use strict";const pe={tops:"tops",rules:"rules"},D=l.ApiUtils.routineApi("menu","id",pe,{},["TOP_MENU_LIST","MENU_LIST"]),G=l.ApiUtils.routineApi("rule","key");/*! Element Plus Icons Vue v2.3.2 */var fe=e.defineComponent({name:"Key",__name:"key",setup(N){return(k,C)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M448 456.064V96a32 32 0 0 1 32-32.064L672 64a32 32 0 0 1 0 64H512v128h160a32 32 0 0 1 0 64H512v128a256 256 0 1 1-64 8.064M512 896a192 192 0 1 0 0-384 192 192 0 0 0 0 384"})]))}}),ce=fe,me=e.defineComponent({name:"Search",__name:"search",setup(N){return(k,C)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),be=me;const W=e.defineComponent({__name:"TopMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(N,{emit:k}){const C=k,_=N,{requesting:h}=l.useLoading(D),{value:m,options:p,change:s,refresh:d,filterOptions:t}=l.useSelect(e.toRef(_,"modelValue"),C,{key:"TOP_MENU_LIST",api:D,url:D.urls.tops,isArray:!0});return(w,a)=>{const f=e.resolveComponent("el-space"),b=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(b,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":a[1]||(a[1]=c=>e.isRef(m)?m.value=c:null),options:e.unref(p),multiple:N.multiple,disabled:e.unref(h),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(t),onChange:e.unref(s)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(h),onRefresh:a[0]||(a[0]=c=>e.unref(d)(!0))},null,8,["loading"])]),default:e.withCtx(({item:c})=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${c.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(c.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),_e=e.defineComponent({__name:"MenuFormModal",emits:["refresh"],setup(N,{expose:k,emit:C}){const _=C,h={id:0,menu_id:0,module:"",sort:0,name:"",en_name:"",url:"",component:"",icon:"",remark:"",meta:{active:"",icon:"",title:"",affix:!1,full:!1,hide:!1,keep_alive:!1,link:!1}},m={sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],module:[{required:!0,message:l.Translate("base.placeholder.input menu.module"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],url:[{required:!0,message:l.Translate("base.placeholder.input base.url"),trigger:"blur"}],component:[{required:!0,message:l.Translate("base.placeholder.input menu.component"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:t,requesting:w,executing:a,open:f,modify:b,submit:c,closed:R}=l.useForm(_,h,D);return k({open:f,modify:b}),(x,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-col"),g=e.resolveComponent("el-input-number"),i=e.resolveComponent("el-row"),U=e.resolveComponent("el-input"),y=e.resolveComponent("el-switch"),B=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[17]||(r[17]=T=>e.isRef(p)?p.value=T:null),title:e.unref(s)(),width:"1000px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(B,{ref_key:"form",ref:d,model:e.unref(t),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(i,{gutter:20},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(i,{gutter:10},{default:e.withCtx(()=>[e.createVNode(n,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(W,{modelValue:e.unref(t).menu_id,"onUpdate:modelValue":r[0]||(r[0]=T=>e.unref(t).menu_id=T)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{"label-width":"60px",label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(g,{class:"w-full",modelValue:e.unref(t).sort,"onUpdate:modelValue":r[1]||(r[1]=T=>e.unref(t).sort=T),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(o,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(t).module,"onUpdate:modelValue":r[2]||(r[2]=T=>e.unref(t).module=T),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[3]||(r[3]=T=>e.unref(t).name=T),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[4]||(r[4]=T=>e.unref(t).en_name=T),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(t).component,"onUpdate:modelValue":r[5]||(r[5]=T=>e.unref(t).component=T),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(t).url,"onUpdate:modelValue":r[6]||(r[6]=T=>e.unref(t).url=T),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[7]||(r[7]=T=>e.unref(t).remark=T),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(t).icon,"onUpdate:modelValue":r[8]||(r[8]=T=>e.unref(t).icon=T),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:r[9]||(r[9]=T=>{e.unref(t).meta.icon=T})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+e.unref(t).icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(t).meta.title,"onUpdate:modelValue":r[10]||(r[10]=T=>e.unref(t).meta.title=T),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(t).meta.active,"onUpdate:modelValue":r[11]||(r[11]=T=>e.unref(t).meta.active=T),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(t).meta.link,"onUpdate:modelValue":r[12]||(r[12]=T=>e.unref(t).meta.link=T)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(t).meta.keep_alive,"onUpdate:modelValue":r[13]||(r[13]=T=>e.unref(t).meta.keep_alive=T)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(t).meta.hide,"onUpdate:modelValue":r[14]||(r[14]=T=>e.unref(t).meta.hide=T)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(t).meta.full,"onUpdate:modelValue":r[15]||(r[15]=T=>e.unref(t).meta.full=T)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(t).meta.affix,"onUpdate:modelValue":r[16]||(r[16]=T=>e.unref(t).meta.affix=T)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),H=e.defineComponent({__name:"MenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(N,{emit:k}){const C=k,_=N,{requesting:h}=l.useLoading(D),{value:m,options:p,change:s,refresh:d,filterOptions:t}=l.useSelect(e.toRef(_,"modelValue"),C,{key:"MENU_LIST",api:D,isArray:!0});return(w,a)=>{const f=e.resolveComponent("el-space"),b=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(b,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":a[1]||(a[1]=c=>e.isRef(m)?m.value=c:null),options:e.unref(p),multiple:N.multiple,disabled:e.unref(h),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(t),onChange:e.unref(s)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(h),onRefresh:a[0]||(a[0]=c=>e.unref(d)(!0))},null,8,["loading"])]),default:e.withCtx(({item:c})=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${c.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(c.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),he=e.defineComponent({__name:"MenuRuleFormModal",emits:["refresh"],setup(N,{expose:k,emit:C}){const _=C,h={key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""},m={menu_id:[{required:!0,type:"number",message:l.Translate("base.placeholder.select menu.Menu"),trigger:"blur"}],sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],urls:[{required:!0,message:l.Translate("base.placeholder.input menu.rules"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:t,requesting:w,executing:a,open:f,modify:b,submit:c,closed:R}=l.useForm(_,h,G);return k({open:f,modify:b}),(x,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input-number"),g=e.resolveComponent("el-input"),i=e.resolveComponent("el-col"),U=e.resolveComponent("el-row"),y=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[6]||(r[6]=B=>e.isRef(p)?p.value=B:null),title:e.unref(s)("menu.rules"),width:"1000px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(y,{ref_key:"form",ref:d,model:e.unref(t),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(U,{gutter:20},{default:e.withCtx(()=>[e.createVNode(i,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(H,{modelValue:e.unref(t).menu_id,"onUpdate:modelValue":r[0]||(r[0]=B=>e.unref(t).menu_id=B)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(n,{class:"w-full",modelValue:e.unref(t).sort,"onUpdate:modelValue":r[1]||(r[1]=B=>e.unref(t).sort=B),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[2]||(r[2]=B=>e.unref(t).name=B),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[3]||(r[3]=B=>e.unref(t).en_name=B),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[4]||(r[4]=B=>e.unref(t).remark=B),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(i,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).urls,"onUpdate:modelValue":r[5]||(r[5]=B=>e.unref(t).urls=B),type:"textarea",rows:11,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}});function Q(N){return typeof N=="function"||Object.prototype.toString.call(N)==="[object Object]"&&!e.isVNode(N)}const J=e.defineComponent({__name:"index",setup(N){const k={keyword:"",status:0},C=e.ref(""),_=[{label:l.Translate("base.sort"),prop:"sort",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:r})=>e.createVNode("span",{class:"iconfont "+r.icon,style:"font-size: 16px;"},null)},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.parent"),prop:"parent",width:120,render:({row:r})=>{var o;return e.createVNode(e.Fragment,null,[(o=r.menu)==null?void 0:o.translate])}},{label:l.Translate("base.name"),prop:"translate",width:160},{label:l.Translate("base.url"),prop:"url",align:"left",width:200},{label:l.Translate("menu.component"),prop:"component",align:"left",width:200},{label:l.Translate("menu.rules"),prop:"rules",width:0,align:"left",render:({row:r})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var o;return[(o=r.rules)==null?void 0:o.map(n=>e.createVNode(e.resolveComponent("el-popover"),{visible:C.value===n.key,title:l.Translate("message.warning"),placement:"top-end",width:220},{reference:()=>e.createVNode(e.resolveComponent("el-tag"),{class:"cursor-pointer",closable:!0,key:n.key,onClick:()=>R({key:n.key}),onClose:()=>C.value=n.key},{default:()=>[n.translate]}),default:()=>{let g,i;return e.createVNode("div",null,[e.createVNode("p",null,null),e.createVNode("p",null,[`${l.Translate("base.confirm base.space base.delete base.space menu.rules")}: ${r.translate}-${n.translate} ?`]),e.createVNode("div",{style:"text-align: right; margin: 0"},[e.createVNode(e.resolveComponent("el-button"),{size:"small",text:!0,onClick:()=>C.value=""},Q(g=l.Translate("base.cancel"))?g:{default:()=>[g]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>x(n.key)},Q(i=l.Translate("base.confirm"))?i:{default:()=>[i]})])])}}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:D.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:r})=>e.createVNode(l.ModifyButton,{size:"default",onModify:()=>f({id:r.id})},null)}],{requesting:h}=l.useLoading(D),{tableRef:m,formModalRef:p,keyword:s,search:d,refresh:t,reset:w,openFormModal:a,editFormModal:f}=l.useCrudPage(k),{formModalRef:b,openFormModal:c,editFormModal:R}=l.useCrudPage(),x=r=>{G[l.DEFAULT_REMOVE_KEY]({key:r}).then(()=>{C.value="",t()})};return(r,o)=>{const n=e.resolveComponent("el-button"),g=e.resolveComponent("el-input"),i=e.resolveComponent("el-radio-button"),U=e.resolveComponent("el-radio-group"),y=e.resolveComponent("el-space"),B=e.resolveComponent("el-page-header"),T=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(T,{class:"basic-card flex-full","body-class":"flex-1",onClick:o[5]||(o[5]=()=>C.value="")},{header:e.withCtx(()=>[e.createVNode(B,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(h),onRefresh:e.unref(w)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(a)},null,8,["onOpen"]),e.createVNode(n,{circle:"",icon:e.unref(ce),onClick:e.unref(c)},null,8,["icon","onClick"])]),content:e.withCtx(()=>[e.createVNode(y,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(g,{class:"basic-search-input",modelValue:e.unref(s).keyword,"onUpdate:modelValue":o[0]||(o[0]=A=>e.unref(s).keyword=A),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:o[1]||(o[1]=e.withKeys(A=>e.unref(d)(),["enter"])),onClear:o[2]||(o[2]=A=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(U,{modelValue:e.unref(s).status,"onUpdate:modelValue":o[3]||(o[3]=A=>e.unref(s).status=A),onChange:o[4]||(o[4]=A=>e.unref(d)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],A=>e.createVNode(i,{key:A,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${A}`),value:A},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(h),onSearch:e.unref(d)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:m,size:"small",columns:_,url:e.unref(D).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(s),"auto-search":""},null,8,["url","search-param"]),e.createVNode(_e,{ref_key:"formModalRef",ref:p,onRefresh:e.unref(t)},null,8,["onRefresh"]),e.createVNode(he,{ref_key:"ruleFormModalRef",ref:b,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),ge=Object.freeze(Object.defineProperty({__proto__:null,default:J},Symbol.toStringTag,{value:"Module"})),I=l.ApiUtils.routineApi("role","key"),Ce={class:"rule-check"},we={style:{width:"80px","line-height":"36px"}},Te=e.defineComponent({__name:"RulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(N,{expose:k,emit:C}){const{requesting:_}=l.useLoading(D),h=N,m=C,p=e.ref(!1),s=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:d,refresh:t}=l.useSelect(e.toRef(h,"modelValue"),m,{key:"RULE_CHECK",api:D,url:D.urls.rules,isArray:!0},{autoRefresh:!1});function w(){d.value.forEach(x=>{var r;(r=x.rules)!=null&&r.length&&(s.MenuAll[x.id]=!1,s.MenuIndeterminate[x.id]=!1,s.MenuList[x.id]=[])})}function a(x){d.value.forEach(r=>{var o;(o=r.rules)!=null&&o.length&&(s.MenuList[r.id]=x?r.rules.map(n=>n.key):[])}),b()}function f(x,r){const o=d.value.find(n=>n.id===r);s.MenuList[r]=x&&o?o.rules.map(n=>n.key):[],b()}function b(){d.value.forEach(x=>{var n,g;const r=((n=x.rules)==null?void 0:n.length)||0,o=((g=s.MenuList[x.id])==null?void 0:g.length)||0;s.MenuAll[x.id]=o===r&&r>0,s.MenuIndeterminate[x.id]=o>0&&o<r}),s.checkAll=Object.values(s.MenuAll).every(Boolean),s.indeterminate=!s.checkAll&&Object.values(s.MenuList).some(x=>x.length>0),m("update:modelValue",Object.values(s.MenuList).flat())}function c(){s.checkAll=!1,s.indeterminate=!1,s.MenuAll={},s.MenuList={},s.MenuIndeterminate={},w(),m("update:modelValue",[]),p.value=!1}function R(x){var r;if(Array.isArray(d.value)&&d.value.length>0){for(let o of d.value)if(Array.isArray(o.rules)&&o.rules.length>0)for(let n of o.rules)x.some(g=>g===n.key)&&(s.MenuList[o.id]=(((r=s.MenuList)==null?void 0:r[o.id])||[]).concat([n.key]));b(),p.value=!0}}return e.onMounted(async()=>{var x;(x=d.value)!=null&&x.length||await t(),!p.value&&h.modelValue&&R(h.modelValue)}),e.watch(()=>h.modelValue,x=>{e.nextTick(()=>{var r;p.value||!((r=d.value)!=null&&r.length)||x&&x.length>0&&R(x)})},{deep:!0,immediate:!0}),k({generateOption:R,cleanChecked:c}),(x,r)=>{const o=e.resolveComponent("el-checkbox"),n=e.resolveComponent("el-space"),g=e.resolveComponent("el-text"),i=e.resolveComponent("el-divider"),U=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Ce,[e.createVNode(n,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(o,{"model-value":s.checkAll,indeterminate:s.indeterminate,id:"all",disabled:N.disabled,onChange:a},{default:e.withCtx(()=>[...r[1]||(r[1]=[e.createElementVNode("span",null,"全选",-1)])]),_:1},8,["model-value","indeterminate","disabled"]),e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),text:"",size:"small",onRefresh:r[0]||(r[0]=y=>e.unref(t)(!0))},null,8,["loading"])]),_:1}),e.createVNode(n,{direction:"vertical",alignment:"start",class:"rule-check-content"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),y=>(e.openBlock(),e.createElementBlock("div",{key:y.id},[e.createVNode(n,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(o,{style:{"min-width":"150px"},"model-value":s.MenuAll[y.id],disabled:N.disabled||!y.rules||y.rules.length<=0,indeterminate:s.MenuIndeterminate[y.id],onChange:B=>f(B,y.id)},{default:e.withCtx(()=>[e.createVNode(g,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(i,{direction:"vertical"}),y.rules?(e.openBlock(),e.createBlock(U,{key:0,modelValue:s.MenuList[y.id],"onUpdate:modelValue":B=>s.MenuList[y.id]=B,disabled:N.disabled,style:{margin:"auto"},onChange:b},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.rules,B=>(e.openBlock(),e.createBlock(o,{key:B.key,value:B.key},{default:e.withCtx(()=>[e.createElementVNode("div",we,e.toDisplayString(B.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),X=(N,k)=>{const C=N.__vccOpts||N;for(const[_,h]of k)C[_]=h;return C},xe=X(Te,[["__scopeId","data-v-7adb5f76"]]),Ne=e.defineComponent({__name:"RoleFormModal",emits:["refresh"],setup(N,{expose:k,emit:C}){const _=C,h=e.ref(),m={key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]},p={name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}]},{modal:s,title:d,form:t,formData:w,requesting:a,executing:f,open:b,modify:c,submit:R,closed:x}=l.useForm(_,m,I),r=()=>{var o;(o=h.value)==null||o.cleanChecked(),x()};return k({open:b,modify:c}),(o,n)=>{const g=e.resolveComponent("el-input"),i=e.resolveComponent("el-form-item"),U=e.resolveComponent("el-col"),y=e.resolveComponent("el-input-number"),B=e.resolveComponent("el-row"),T=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":n[6]||(n[6]=A=>e.isRef(s)?s.value=A:null),title:e.unref(d)(),width:"1000px",executing:e.unref(f),onClosed:r,onSubmit:e.unref(R)},{default:e.withCtx(()=>[e.createVNode(T,{ref_key:"form",ref:t,model:e.unref(w),"label-width":"auto",rules:p,disabled:e.unref(a)||e.unref(f)},{default:e.withCtx(()=>[e.createVNode(B,{gutter:20},{default:e.withCtx(()=>[e.createVNode(U,{span:12},{default:e.withCtx(()=>[e.createVNode(i,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(w).module,"onUpdate:modelValue":n[0]||(n[0]=A=>e.unref(w).module=A),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(U,{span:12},{default:e.withCtx(()=>[e.createVNode(i,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(y,{class:"w-full",modelValue:e.unref(w).sort,"onUpdate:modelValue":n[1]||(n[1]=A=>e.unref(w).sort=A),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(i,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(w).name,"onUpdate:modelValue":n[2]||(n[2]=A=>e.unref(w).name=A),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(w).en_name,"onUpdate:modelValue":n[3]||(n[3]=A=>e.unref(w).en_name=A),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(w).remark,"onUpdate:modelValue":n[4]||(n[4]=A=>e.unref(w).remark=A),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("menu.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(xe,{ref_key:"rulesCheck",ref:h,modelValue:e.unref(w).rules,"onUpdate:modelValue":n[5]||(n[5]=A=>e.unref(w).rules=A),disabled:e.unref(a)||e.unref(f)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),Z=e.defineComponent({__name:"index",setup(N){const k={keyword:""},C=[{label:l.Translate("base.sort"),prop:"sort",width:80},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:180},{prop:"action",label:l.Translate("base.action"),width:65,align:"center",render:({row:f})=>e.createVNode(l.ModifyButton,{size:"default",onModify:()=>a({key:f.key})},null)}],{requesting:_}=l.useLoading(I),{tableRef:h,formModalRef:m,keyword:p,search:s,reset:d,refresh:t,openFormModal:w,editFormModal:a}=l.useCrudPage(k);return(f,b)=>{const c=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),x=e.resolveComponent("el-page-header"),r=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(r,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(x,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(w)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(R,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(c,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":b[0]||(b[0]=o=>e.unref(p).keyword=o),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:b[1]||(b[1]=e.withKeys(o=>e.unref(s)(),["enter"])),onClear:b[2]||(b[2]=o=>e.unref(s)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(_),onSearch:b[3]||(b[3]=o=>e.unref(s)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:h,columns:C,url:e.unref(I).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),"auto-search":""},null,8,["url","search-param"]),e.createVNode(Ne,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),ke=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"})),L=l.ApiUtils.routineApi("I18N","uuid",{gen:"gen",modules:"modules",languages:"languages"},{},["I18N_MODULES"]),O=l.ApiUtils.routineApi("I18N_template","uuid",{apps:"apps"}),u=e.defineComponent({__name:"ModuleSelect",props:{modelValue:{type:String,default:void 0,required:!1},multiple:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1}},emits:["update:modelValue","update:value","change"],setup(N,{emit:k}){const C=k,_=N,{requesting:h}=l.useLoading(L),{value:m,options:p,change:s,refresh:d,filterOptions:t}=l.useSelect(e.toRef(_,"modelValue"),C,{key:"I18N_MODULES",url:L.urls.modules,api:L,isArray:!0});return(w,a)=>{const f=e.resolveComponent("el-space"),b=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(b,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":a[1]||(a[1]=c=>e.isRef(m)?m.value=c:null),options:e.unref(p),multiple:N.multiple,disabled:e.unref(h),clearable:N.clearable,filterable:"","allow-create":"","default-first-option":"",placeholder:e.unref(l.Translate)("base.placeholder.select"),filterOptions:e.unref(t),onChange:e.unref(s)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(h),onRefresh:a[0]||(a[0]=c=>e.unref(d)(!0))},null,8,["loading"])]),default:e.withCtx(({item:c})=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(c.value),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","clearable","placeholder","filterOptions","onChange"])}}}),ye=e.defineComponent({__name:"I18N",emits:["refresh"],setup(N,{expose:k,emit:C}){const _=C,h={uuid:"",key:"",module:"",language:{"zh-CN":"","en-US":""},remark:""},m={module:[{required:!0,message:l.Translate("language.placeholder.module"),trigger:"blur"}],key:[{required:!0,message:l.Translate("language.placeholder.key"),trigger:"blur"}],language:[{required:!0,message:l.Translate("language.placeholder.language"),trigger:"change"}],result:[{required:!0,message:l.Translate("language.placeholder.result"),trigger:"blur"}]},p=e.ref([]),s=l.useCacheStore();function d(){const n={isArray:!0,key:"I18N_LANGUAGES",url:L.urls.languages,params:{}};s.GET_CACHE({...n,force:!0}).then(g=>{p.value=g})}d();const{modal:t,title:w,form:a,formData:f,requesting:b,executing:c,open:R,modify:x,submit:r,closed:o}=l.useForm(_,h,L);return k({open:R,modify:x}),(n,g)=>{const i=e.resolveComponent("el-form-item"),U=e.resolveComponent("el-input"),y=e.resolveComponent("el-space"),B=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(t),"onUpdate:modelValue":g[3]||(g[3]=T=>e.isRef(t)?t.value=T:null),title:e.unref(w)(),width:"600px",executing:e.unref(c),onClosed:e.unref(o),onSubmit:e.unref(r)},{default:e.withCtx(()=>[e.createVNode(B,{ref_key:"form",ref:a,model:e.unref(f),"label-width":"auto",rules:m,disabled:e.unref(b)||e.unref(c)},{default:e.withCtx(()=>[e.createVNode(i,{label:e.unref(l.Translate)("i18n.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:e.unref(f).module,"onUpdate:modelValue":g[0]||(g[0]=T=>e.unref(f).module=T)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("i18n.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(f).key,"onUpdate:modelValue":g[1]||(g[1]=T=>e.unref(f).key=T),placeholder:e.unref(l.Translate)("language.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("i18n.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(y,{direction:"vertical",fill:"",style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,T=>(e.openBlock(),e.createElementBlock("div",{key:T},[e.createVNode(U,{modelValue:e.unref(f).language[T],"onUpdate:modelValue":A=>e.unref(f).language[T]=A,placeholder:e.unref(l.Translate)("i18n.placeholder.key")},{prepend:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T),1)]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])]))),128))]),_:1})]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(f).remark,"onUpdate:modelValue":g[2]||(g[2]=T=>e.unref(f).remark=T),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}});function Re(N){return typeof N=="function"||Object.prototype.toString.call(N)==="[object Object]"&&!e.isVNode(N)}const M=e.defineComponent({__name:"I18N",emits:["closed","choosed"],setup(N,{expose:k,emit:C}){const _=e.ref(!1),h=C,m={keyword:"",module:void 0,status:0},p=[{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.key"),prop:"key",width:200},{label:l.Translate("base.i18n"),align:"left",prop:"language",render:({row:g})=>{const U=Object.keys(g.language).filter(y=>!!g.language[y]).map(y=>`${y}: ${g.language[y]}`).join("; ");return e.createVNode(e.resolveComponent("el-space"),null,Re(U)?U:{default:()=>[U]})}},{label:l.Translate("base.status"),prop:"checked",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:L.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:120,align:"center",render:({row:g})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",onModify:()=>x({uuid:g.uuid})},null),e.createVNode(l.RequestButton,{size:"default",text:!0,type:"danger",loading:d.value,onClick:()=>r(g.uuid)},null)]})}],{requesting:s,executing:d}=l.useLoading(L),{tableRef:t,formModalRef:w,keyword:a,search:f,reset:b,refresh:c,openFormModal:R,editFormModal:x}=l.useCrudPage(m);function r(g){return L.remove({uuid:g}).finally(()=>{c()})}const o=()=>{_.value=!0};function n(g){h("choosed",g),_.value=!1}return e.watch(()=>_.value,g=>{g||h("closed")}),k({open:o}),(g,i)=>{const U=e.resolveComponent("el-input"),y=e.resolveComponent("el-radio-button"),B=e.resolveComponent("el-radio-group"),T=e.resolveComponent("el-space"),A=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:_.value,"onUpdate:modelValue":i[7]||(i[7]=V=>_.value=V),width:"880px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(A,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(s),onRefresh:e.unref(b)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(R)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(T,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(U,{style:{width:"160px"},modelValue:e.unref(a).keyword,"onUpdate:modelValue":i[0]||(i[0]=V=>e.unref(a).keyword=V),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:i[1]||(i[1]=e.withKeys(V=>e.unref(f)(),["enter"])),onClear:i[2]||(i[2]=V=>e.unref(f)())},null,8,["modelValue","placeholder"]),e.createVNode(u,{modelValue:e.unref(a).module,"onUpdate:modelValue":i[3]||(i[3]=V=>e.unref(a).module=V),clearable:!0},null,8,["modelValue"]),e.createVNode(B,{modelValue:e.unref(a).status,"onUpdate:modelValue":i[4]||(i[4]=V=>e.unref(a).status=V),onChange:i[5]||(i[5]=V=>e.unref(f)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],V=>e.createVNode(y,{key:V,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${V}`),value:V},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(s),onSearch:i[6]||(i[6]=V=>e.unref(f)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:t,columns:p,url:e.unref(L).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),onRowDblclick:n,"auto-search":""},null,8,["url","search-param"]),e.createVNode(ye,{ref_key:"formModalRef",ref:w,onRefresh:e.unref(c)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),Ve=e.defineComponent({__name:"template",emits:["refresh"],setup(N,{expose:k,emit:C}){const{formModalRef:_,openFormModal:h}=l.useCrudPage(),m=C,p=e.ref("600px"),s=e.ref({"zh-CN":"primary","en-US":"success"}),d=e.ref({}),t={uuid:"",app:1,keys:[],values:[],remark:""},w={app:[{required:!0,message:l.Translate("i18n.placeholder.app"),trigger:"blur"}],keys:[{required:!0,message:l.Translate("i18n.placeholder.keys"),trigger:"blur"}],values:[{required:!0,message:l.Translate("i18n.placeholder.values"),trigger:"change"}]},{modal:a,title:f,form:b,formData:c,requesting:R,executing:x,open:r,modify:o,submit:n,closed:g}=l.useForm(m,t,O);function i(){p.value="1080px",h()}function U(){p.value="600px"}function y(B){let T=B.module.toLowerCase()+"."+B.key.toLowerCase();c.keys.push(T),c.values.push(T);for(const A in B.language)d.value[A]||(d.value[A]=[]),d.value[A].push(B.language[A])}return e.watch(()=>a.value,B=>{B?p.value="600px":g()}),k({open:r,modify:o}),(B,T)=>{const A=e.resolveComponent("el-page-header"),V=e.resolveComponent("el-form-item"),Me=e.resolveComponent("el-button"),ie=e.resolveComponent("el-input"),ve=e.resolveComponent("el-tag"),el=e.resolveComponent("el-space"),ll=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(a),"onUpdate:modelValue":T[3]||(T[3]=E=>e.isRef(a)?a.value=E:null),width:p.value,"show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(A,{class:"basic-header"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)()),1)]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{circle:!1,size:"default",type:"primary",icon:"icon-save",plain:!1,loading:e.unref(x),onClick:e.unref(n)},null,8,["loading","onClick"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(ll,{ref_key:"form",ref:b,model:e.unref(c),"label-width":"auto",rules:w,disabled:e.unref(R)||e.unref(x)},{default:e.withCtx(()=>[e.createVNode(V,{label:e.unref(l.Translate)("i18n.app"),prop:"app",required:""},{default:e.withCtx(()=>[e.createVNode(e.unref(l.BasicRadioButton),{modelValue:e.unref(c).app,"onUpdate:modelValue":T[0]||(T[0]=E=>e.unref(c).app=E),"cache-key":"I18NAPPS",hidden:[0],url:e.unref(O).urls.apps},null,8,["modelValue","url"])]),_:1},8,["label"]),e.createVNode(V,{label:e.unref(l.Translate)("i18n.keys"),prop:"keys",required:""},{default:e.withCtx(()=>[e.createVNode(ie,{modelValue:e.unref(c).keys,"onUpdate:modelValue":T[1]||(T[1]=E=>e.unref(c).keys=E),placeholder:e.unref(l.Translate)("i18n.placeholder.key")},{append:e.withCtx(()=>[e.createVNode(Me,{icon:e.unref(be),onClick:i},null,8,["icon"])]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(V,{label:e.unref(l.Translate)("i18n.values"),prop:"values",required:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c).values.join(":")),1)]),_:1},8,["label"]),e.createVNode(V,{label:e.unref(l.Translate)("i18n.values")},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(E,Y)=>(e.openBlock(),e.createElementBlock("div",{key:Y,class:"w-full"},[e.createVNode(el,null,{default:e.withCtx(()=>[e.createVNode(ve,{type:s.value[Y],style:{"min-width":"80px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Y),1)]),_:2},1032,["type"]),e.createElementVNode("span",null,e.toDisplayString(E.join("")),1)]),_:2},1024)]))),128))]),_:1},8,["label"]),e.createVNode(V,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(ie,{modelValue:e.unref(c).remark,"onUpdate:modelValue":T[2]||(T[2]=E=>e.unref(c).remark=E),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"]),e.createVNode(M,{ref_key:"I18nTableDrawerRef",ref:_,onChoosed:y,onClosed:U},null,512)]),_:1},8,["modelValue","width"])}}}),Ue=l.ApiUtils.routineApi("gateway","id",{gen:"gen_translation"});function Be(N){return typeof N=="function"||Object.prototype.toString.call(N)==="[object Object]"&&!e.isVNode(N)}const v=e.defineComponent({__name:"index",setup(N){const k={keyword:"",app:0,status:0},C=[{label:l.Translate("base.app"),prop:"app",width:120,render:({row:o})=>{let n;return e.createVNode(e.resolveComponent("el-tag"),{type:l.Translate("i18n.app.colors."+o.app),style:"min-width: 80px"},Be(n=l.Translate("i18n.app."+o.app))?n:{default:()=>[n]})}},{label:l.Translate("i18n.keys"),prop:"keys",width:200},{label:l.Translate("i18n.values"),prop:"values",width:200},{label:l.Translate("base.status"),prop:"checked",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:O.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:120,align:"center",render:({row:o})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",disabled:h.value,onModify:()=>c({uuid:o.uuid})},null),e.createVNode(l.RequestButton,{size:"default",text:!0,type:"danger",loading:h.value,onClick:()=>R(o.uuid)},null)]})}],{requesting:_,executing:h}=l.useLoading(O),{formModalRef:m,openFormModal:p}=l.useCrudPage(),{tableRef:s,formModalRef:d,keyword:t,search:w,reset:a,refresh:f,openFormModal:b,editFormModal:c}=l.useCrudPage(k);function R(o){return O.remove({uuid:o}).finally(()=>{f()})}function x(){return L.gen().finally(()=>{f()})}function r(){Ue.gen().finally(()=>{f()})}return(o,n)=>{const g=e.resolveComponent("el-divider"),i=e.resolveComponent("el-input"),U=e.resolveComponent("el-radio-button"),y=e.resolveComponent("el-radio-group"),B=e.resolveComponent("el-space"),T=e.resolveComponent("el-page-header"),A=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(A,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(T,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),onRefresh:e.unref(a)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(b)},null,8,["onOpen"])]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"warning",icon:"icon-cloud-upload",plain:!1,loading:e.unref(h),onClick:x},null,8,["loading"]),e.createVNode(e.unref(l.RequestButton),{size:"default",type:"danger",icon:"icon-translate",plain:!1,loading:e.unref(h),onClick:r},null,8,["loading"]),e.createVNode(g,{direction:"vertical"}),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(p),icon:"icon-en-US"},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(B,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(i,{class:"basic-search-input",modelValue:e.unref(t).keyword,"onUpdate:modelValue":n[0]||(n[0]=V=>e.unref(t).keyword=V),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:n[1]||(n[1]=e.withKeys(V=>e.unref(w)(),["enter"])),onClear:n[2]||(n[2]=V=>e.unref(w)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.BasicRadioButton),{modelValue:e.unref(t).app,"onUpdate:modelValue":n[3]||(n[3]=V=>e.unref(t).app=V),"cache-key":"I18NAPPS",url:e.unref(O).urls.apps,onChange:n[4]||(n[4]=V=>e.unref(w)())},null,8,["modelValue","url"]),e.createVNode(y,{modelValue:e.unref(t).status,"onUpdate:modelValue":n[5]||(n[5]=V=>e.unref(t).status=V),onChange:n[6]||(n[6]=V=>e.unref(w)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],V=>e.createVNode(U,{key:V,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${V}`),value:V},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(_),onSearch:n[7]||(n[7]=V=>e.unref(w)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:s,columns:C,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(t),"auto-search":""},null,8,["url","search-param"]),e.createVNode(M,{ref_key:"I18nTableDrawerRef",ref:m,onRefresh:e.unref(f)},null,8,["onRefresh"]),e.createVNode(Ve,{ref_key:"formModalRef",ref:d,onRefresh:e.unref(f)},null,8,["onRefresh"])]),_:1})}}}),Ae=Object.freeze(Object.defineProperty({__proto__:null,default:v},Symbol.toStringTag,{value:"Module"})),j=l.ApiUtils.routineApi("admin","key"),Se=e.defineComponent({__name:"AdminFormModal",emits:["refresh"],setup(N,{expose:k,emit:C}){const _=C,h={key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]},{modal:m,title:p,form:s,formData:d,requesting:t,executing:w,open:a,modify:f,submit:b,closed:c}=l.useForm(_,h,j),R={username:[{required:!0,message:l.Translate("base.placeholder.input base.username"),trigger:"blur"}],phone:[{required:!0,validator:l.RulesUtils.phoneRule,message:l.Translate("base.placeholder.input base.phone"),trigger:"blur"}],password:[{required:!1,message:l.Translate("base.placeholder.input base.password"),trigger:"blur"}],email:[{required:!0,message:l.Translate("base.placeholder.input base.email"),trigger:"blur"}],language:[{required:!0,message:l.Translate("base.placeholder.select base.language"),trigger:"change"}],roles:[{required:!0,type:"Array",message:l.Translate("base.placeholder.select menu.Role"),trigger:"change"}]},x=e.ref([]),r=async()=>{const o=await I.list();x.value=Array.isArray(o==null?void 0:o.data)?o.data:[]};return e.onBeforeMount(async()=>{await r()}),k({open:a,modify:f}),(o,n)=>{const g=e.resolveComponent("el-input"),i=e.resolveComponent("el-form-item"),U=e.resolveComponent("el-radio-button"),y=e.resolveComponent("el-radio-group"),B=e.resolveComponent("el-checkbox"),T=e.resolveComponent("el-checkbox-group"),A=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":n[7]||(n[7]=V=>e.isRef(m)?m.value=V:null),title:e.unref(p)(),width:"600px",executing:e.unref(w),onClosed:e.unref(c),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(A,{ref_key:"form",ref:s,model:e.unref(d),"label-width":"auto",rules:R,disabled:e.unref(t)||e.unref(w)},{default:e.withCtx(()=>[e.createVNode(i,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(d).username,"onUpdate:modelValue":n[0]||(n[0]=V=>e.unref(d).username=V),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(d).phone,"onUpdate:modelValue":n[1]||(n[1]=V=>e.unref(d).phone=V),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("base.password"),prop:"password",required:!e.unref(d).key},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(d).password,"onUpdate:modelValue":n[2]||(n[2]=V=>e.unref(d).password=V),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(i,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(d).email,"onUpdate:modelValue":n[3]||(n[3]=V=>e.unref(d).email=V),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(d).language,"onUpdate:modelValue":n[4]||(n[4]=V=>e.unref(d).language=V)},{default:e.withCtx(()=>[e.createVNode(U,{value:"zh-CN"},{default:e.withCtx(()=>[...n[8]||(n[8]=[e.createTextVNode("zh-CN",-1)])]),_:1}),e.createVNode(U,{value:"en-US"},{default:e.withCtx(()=>[...n[9]||(n[9]=[e.createTextVNode("en-US",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("menu.Role"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:e.unref(d).roles,"onUpdate:modelValue":n[5]||(n[5]=V=>e.unref(d).roles=V)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,V=>(e.openBlock(),e.createBlock(B,{key:V.key,value:V.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.translate),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(i,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(d).remark,"onUpdate:modelValue":n[6]||(n[6]=V=>e.unref(d).remark=V),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),ee=e.defineComponent({__name:"index",setup(N){const k={keyword:""},C=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:f})=>e.createVNode(l.BasicAvatar,{src:f.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:f})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[f.username]),e.createVNode("div",null,[f.email])]})},{label:l.Translate("base.phone"),prop:"phone",width:140},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.login_at"),prop:"login_at",width:160},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:f})=>e.createVNode(l.ModifyButton,{onModify:()=>a({key:f.key})},null)}],{requesting:_}=l.useLoading(j),{tableRef:h,formModalRef:m,keyword:p,search:s,reset:d,refresh:t,openFormModal:w,editFormModal:a}=l.useCrudPage(k);return(f,b)=>{const c=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),x=e.resolveComponent("el-page-header"),r=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(r,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(x,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),onRefresh:e.unref(d)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(w)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(R,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(c,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":b[0]||(b[0]=o=>e.unref(p).keyword=o),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:b[1]||(b[1]=e.withKeys(o=>e.unref(s)(),["enter"])),onClear:b[2]||(b[2]=o=>e.unref(s)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(_),onSearch:b[3]||(b[3]=o=>e.unref(s)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:h,size:"small",columns:C,url:e.unref(j).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),"auto-search":""},null,8,["url","search-param"]),e.createVNode(Se,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),De=Object.freeze(Object.defineProperty({__proto__:null,default:ee},Symbol.toStringTag,{value:"Module"})),Le={check:"check"},q=l.ApiUtils.routineApi("site","id",Le),P=l.ApiUtils.routineApi("domain"),K=e.defineComponent({__name:"DomainSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(N,{expose:k,emit:C}){const _=C,h=N,{requesting:m}=l.useLoading(P),{key:p,options:s,refresh:d,change:t}=l.useSelect(e.toRef(h,"modelValue"),_,{key:"DOMAIN_LIST",api:P,isArray:!0});return k({refresh:d}),(w,a)=>{const f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{modelValue:e.unref(p),"onUpdate:modelValue":a[0]||(a[0]=b=>e.isRef(p)?p.value=b:null),options:e.unref(s),disabled:N.disabled||e.unref(m),placeholder:e.unref(l.Translate)("base.select config.domain"),onChange:e.unref(t)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(m),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),Ee=e.defineComponent({__name:"SiteFormModal",emits:["refresh"],setup(N,{expose:k,emit:C}){const _=C,h={id:0,domain_id:0,prefix:"",name:"",en_name:"",dns:"",git:"",status:1,remark:""},m={domain_id:[{required:!0,message:l.Translate("base.placeholder.input config.domain"),trigger:"blur"}],prefix:[{required:!0,message:l.Translate("base.placeholder.input base.prefix"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:t,requesting:w,executing:a,open:f,modify:b,submit:c,closed:R}=l.useForm(_,h,q);return k({open:f,modify:b}),(x,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[7]||(r[7]=i=>e.isRef(p)?p.value=i:null),title:e.unref(s)("config.site"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:d,model:e.unref(t),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(o,{prop:"domain_id",label:e.unref(l.Translate)("config.domain")},{default:e.withCtx(()=>[e.createVNode(K,{modelValue:e.unref(t).domain_id,"onUpdate:modelValue":r[0]||(r[0]=i=>e.unref(t).domain_id=i),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(o,{prop:"prefix",label:e.unref(l.Translate)("config.prefix")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).prefix,"onUpdate:modelValue":r[1]||(r[1]=i=>e.unref(t).prefix=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[2]||(r[2]=i=>e.unref(t).name=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"en_name",label:e.unref(l.Translate)("base.en_name")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[3]||(r[3]=i=>e.unref(t).en_name=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"dns",label:e.unref(l.Translate)("config.dns")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).dns,"onUpdate:modelValue":r[4]||(r[4]=i=>e.unref(t).dns=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"git",label:e.unref(l.Translate)("config.git")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).git,"onUpdate:modelValue":r[5]||(r[5]=i=>e.unref(t).git=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[6]||(r[6]=i=>e.unref(t).remark=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),z=l.ApiUtils.routineApi("domain_provider"),le=e.defineComponent({__name:"DomainProviderSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(N,{expose:k,emit:C}){const _=C,h=N,{requesting:m}=l.useLoading(z),{key:p,options:s,refresh:d,change:t}=l.useSelect(e.toRef(h,"modelValue"),_,{key:"DOMAIN_PROVIDER_LIST",api:z,isArray:!0});return k({refresh:d}),(w,a)=>{const f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{modelValue:e.unref(p),"onUpdate:modelValue":a[0]||(a[0]=b=>e.isRef(p)?p.value=b:null),options:e.unref(s),disabled:N.disabled||e.unref(m),placeholder:e.unref(l.Translate)("base.select config.domain config.provider"),onChange:e.unref(t)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(m),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),Oe=e.defineComponent({__name:"DomainFormModal",emits:["refresh"],setup(N,{expose:k,emit:C}){const _=C,h={id:0,provider_id:0,name:"",expired_at:"",status:1,remark:""},m={provider_id:[{required:!0,message:l.Translate("base.placeholder.input config.domain config.provider"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:t,requesting:w,executing:a,open:f,modify:b,submit:c,closed:R}=l.useForm(_,h,P);return k({open:f,modify:b}),(x,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input"),g=e.resolveComponent("el-date-picker"),i=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[4]||(r[4]=U=>e.isRef(p)?p.value=U:null),title:e.unref(s)("config.domain"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(i,{ref_key:"form",ref:d,model:e.unref(t),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(o,{prop:"provider_id",label:e.unref(l.Translate)("config.provider")},{default:e.withCtx(()=>[e.createVNode(le,{modelValue:e.unref(t).provider_id,"onUpdate:modelValue":r[0]||(r[0]=U=>e.unref(t).provider_id=U),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(o,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[1]||(r[1]=U=>e.unref(t).name=U),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"expired_at",required:"",label:e.unref(l.Translate)("base.expired_at")},{default:e.withCtx(()=>[e.createVNode(g,{type:"date",style:{width:"100%"},modelValue:e.unref(t).expired_at,"onUpdate:modelValue":r[2]||(r[2]=U=>e.unref(t).expired_at=U),disabled:e.unref(a),"value-format":e.unref(l.TimeUtils).DATE_VALUE_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,placeholder:e.unref(l.Translate)("base.placeholder.select")},null,8,["modelValue","disabled","value-format","format","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[3]||(r[3]=U=>e.unref(t).remark=U),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),qe={gen:"gen"},F=l.ApiUtils.routineApi("SSL","id",qe),re=e.defineComponent({__name:"SiteSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(N,{expose:k,emit:C}){const _=C,h=N,{requesting:m}=l.useLoading(q),{key:p,options:s,refresh:d,change:t}=l.useSelect(e.toRef(h,"modelValue"),_,{key:"SITE_LIST",api:q,isArray:!0},{formatOptions:w=>w.map(a=>{var f;return{...a,label:a.prefix+"."+((f=a.domain)==null?void 0:f.name),value:a.id}})});return k({refresh:d}),(w,a)=>{const f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{modelValue:e.unref(p),"onUpdate:modelValue":a[0]||(a[0]=b=>e.isRef(p)?p.value=b:null),options:e.unref(s),disabled:N.disabled||e.unref(m),placeholder:e.unref(l.Translate)("base.select config.domain"),onChange:e.unref(t)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(m),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),te=e.defineComponent({__name:"SSLFormModal",emits:["refresh"],setup(N,{expose:k,emit:C}){const _=C,h={id:0,domain_id:void 0,client:"Lego",site_id:void 0,name:"",path:"",email:"",encryption:"RSA2048",remark:""},m={domain_id:[{required:!0,message:l.Translate("base.placeholder.select config.domain "),trigger:"blur"}],client:[{required:!0,message:l.Translate("base.placeholder.select config.client "),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],path:[{required:!0,message:l.Translate("base.placeholder.input base.path"),trigger:"blur"}],email:[{required:!0,message:l.Translate("base.placeholder.input base.email"),trigger:"blur"}],encryption:[{required:!0,message:l.Translate("base.placeholder.input config.encryption"),trigger:"blur"}]},{modal:p,title:s,form:d,formData:t,requesting:w,executing:a,open:f,modify:b,submit:c,closed:R}=l.useForm(_,h,F);return k({open:f,modify:b,formData:t}),(x,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-radio-button"),g=e.resolveComponent("el-radio-group"),i=e.resolveComponent("el-input"),U=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[8]||(r[8]=y=>e.isRef(p)?p.value=y:null),title:e.unref(s)("ssl.ssl"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(U,{ref_key:"form",ref:d,model:e.unref(t),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(o,{prop:"domain_id",label:e.unref(l.Translate)("config.domain")},{default:e.withCtx(()=>[e.createVNode(K,{modelValue:e.unref(t).domain_id,"onUpdate:modelValue":r[0]||(r[0]=y=>e.unref(t).domain_id=y),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(o,{prop:"client",label:e.unref(l.Translate)("ssl.client")},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).client,"onUpdate:modelValue":r[1]||(r[1]=y=>e.unref(t).client=y)},{default:e.withCtx(()=>[e.createVNode(n,{label:"Lego",value:"Lego"})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{prop:"site_id",label:e.unref(l.Translate)("config.site")},{default:e.withCtx(()=>[e.createVNode(re,{modelValue:e.unref(t).site_id,"onUpdate:modelValue":r[2]||(r[2]=y=>e.unref(t).site_id=y),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(o,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[3]||(r[3]=y=>e.unref(t).name=y),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"path",label:e.unref(l.Translate)("base.path")},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(t).path,"onUpdate:modelValue":r[4]||(r[4]=y=>e.unref(t).path=y),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"email",label:e.unref(l.Translate)("base.email")},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(t).email,"onUpdate:modelValue":r[5]||(r[5]=y=>e.unref(t).email=y),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"encryption",label:e.unref(l.Translate)("config.encryption")},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).encryption,"onUpdate:modelValue":r[6]||(r[6]=y=>e.unref(t).encryption=y)},{default:e.withCtx(()=>[e.createVNode(n,{label:"RSA2048",value:"RSA2048"})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[7]||(r[7]=y=>e.unref(t).remark=y),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),Fe=e.defineComponent({__name:"DomainProviderFormModal",emits:["refresh"],setup(N,{expose:k,emit:C}){const _=C,h={id:0,name:"",en_name:"",key:"",secret:"",end_point:"",status:1,remark:""},m={name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"},key:{required:!0,message:l.Translate("base.placeholder.input base.key"),trigger:"blur"},secret:{required:!0,message:l.Translate("base.placeholder.input config.secret"),trigger:"blur"},end_point:{required:!0,message:l.Translate("base.placeholder.input config.endpoint"),trigger:"blur"}},{modal:p,title:s,form:d,formData:t,requesting:w,executing:a,open:f,modify:b,submit:c,closed:R}=l.useForm(_,h,z);return k({open:f,modify:b}),(x,r)=>{const o=e.resolveComponent("el-input"),n=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[6]||(r[6]=i=>e.isRef(p)?p.value=i:null),title:e.unref(s)("config.domain"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:d,model:e.unref(t),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[0]||(r[0]=i=>e.unref(t).name=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"en_name",label:e.unref(l.Translate)("base.en_name")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[1]||(r[1]=i=>e.unref(t).en_name=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"key",label:e.unref(l.Translate)("base.key")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).key,"onUpdate:modelValue":r[2]||(r[2]=i=>e.unref(t).key=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"secret",label:e.unref(l.Translate)("config.secret")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).secret,"onUpdate:modelValue":r[3]||(r[3]=i=>e.unref(t).secret=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"end_point",label:e.unref(l.Translate)("config.end_point")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).end_point,"onUpdate:modelValue":r[4]||(r[4]=i=>e.unref(t).end_point=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[5]||(r[5]=i=>e.unref(t).remark=i),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),$e=e.defineComponent({__name:"DomainProviderTableDrawer",setup(N,{expose:k}){const{requesting:C}=l.useLoading(z),_=e.ref(!1),{tableRef:h,formModalRef:m,refresh:p,openFormModal:s,editFormModal:d}=l.useCrudPage({}),t=[{prop:"name",label:l.Translate("base.name"),width:0,minWidth:140},{prop:"en_name",label:l.Translate("base.en_name"),width:120},{prop:"actions",label:l.Translate("base.action"),width:60,align:"center",render:({rowData:a})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>d({id:a.id})},null)]})}];return k({open:()=>{_.value=!0}}),(a,f)=>{const b=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:_.value,"onUpdate:modelValue":f[0]||(f[0]=c=>_.value=c),width:"400px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(b,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.domain config.provider")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(p),size:"default",loading:e.unref(C)},null,8,["onRefresh","loading"])]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(s)},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small","row-key":"id",url:e.unref(z).urls.list,columns:t,loading:e.unref(C)},null,8,["url","loading"]),e.createVNode(Fe,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(p)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),Pe=e.defineComponent({__name:"DomainTableDrawer",setup(N,{expose:k}){const{requesting:C}=l.useLoading(P),_=e.ref(!1),{tableRef:h,formModalRef:m,refresh:p,openFormModal:s,editFormModal:d}=l.useCrudPage(),{formModalRef:t,openFormModal:w,editFormModal:a}=l.useCrudPage(),{formModalRef:f,openFormModal:b}=l.useCrudPage(),c=[{prop:"provider",label:l.Translate("config.domain config.provider"),width:120,cellRenderer:({rowData:x})=>e.createVNode(e.resolveComponent("el-text"),null,{default:()=>{var r;return[(r=x.provider)==null?void 0:r.name]}})},{prop:"name",label:l.Translate("base.name"),width:0,minWidth:120},{prop:"expired_text",label:l.Translate("base.expired_at"),width:160},{prop:"actions",label:l.Translate("base.action"),width:100,align:"center",render:({rowData:x})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>d({id:x.id})},null),e.createVNode(l.OpenButton,{icon:"icon-safetycertificate-f",type:"primary",size:"small",link:!0,onOpen:()=>{var r;x.ssl&&x.ssl.id?a({id:(r=x.ssl)==null?void 0:r.id}):(t.value.formData.domain_id=x.id,t.value.formData.site_id=0,w())}},null)]})}];return k({open:()=>{_.value=!0}}),(x,r)=>{const o=e.resolveComponent("el-space"),n=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:_.value,"onUpdate:modelValue":r[0]||(r[0]=g=>_.value=g),width:"600px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(n,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.domain")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(p),size:"default",loading:e.unref(C)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(s)},null,8,["onOpen"])]),extra:e.withCtx(()=>[e.createVNode(o,{class:"w-full extra-tool",alignment:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(b),type:"danger"},null,8,["onOpen"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small","row-key":"id",url:e.unref(P).urls.list,columns:c,loading:e.unref(C)},null,8,["url","loading"]),e.createVNode(Oe,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(p)},null,8,["onRefresh"]),e.createVNode(te,{ref_key:"sslFormModalRef",ref:t,onRefresh:e.unref(p)},null,8,["onRefresh"]),e.createVNode($e,{ref_key:"providerTableDrawerRef",ref:f},null,512)]),_:1},8,["modelValue"])}}}),ze=e.defineComponent({__name:"SSLTableDrawer",setup(N,{expose:k}){const{requesting:C,executing:_}=l.useLoading(F),h=e.ref(0),m=e.ref(!1),{tableRef:p,formModalRef:s,refresh:d,openFormModal:t,editFormModal:w}=l.useCrudPage(),a=[{prop:"client",label:l.Translate("ssl.client"),width:100},{prop:"encryption",label:l.Translate("ssl.encryption"),width:100},{prop:"name",label:l.Translate("base.name"),width:0,minWidth:120},{prop:"path",label:l.Translate("base.path"),width:120},{prop:"renewal_days",label:l.Translate("ssl.renewal_days"),width:100},{prop:"checked_at",label:l.Translate("ssl.checked_at"),width:160},{prop:"actions",label:l.Translate("base.action"),width:160,align:"center",render:({rowData:R})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",icon:"icon-edit",t:"",disabled:_.value,onModify:()=>w({id:R.id})},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-key",t:"",text:!0,disabled:_.value&&h.value!==R.id,loading:h.value==R.id,onClick:()=>b(R.id)},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-cloud-download",t:"",text:!0,disabled:_.value&&h.value!==R.id,loading:h.value==R.id,onClick:()=>c(R)},null)]})}],f=()=>{m.value=!0},b=R=>{F.gen({id:R}).then(x=>{console.warn("Res:",x)})};function c(R){const x=l.AssetsUtils.getDownloadUrl(R.path+".zip");fetch(x).then(r=>r.blob()).then(r=>{let o=URL.createObjectURL(r),n=document.createElement("a");n.style.display="none",n.href=o,n.download=R.name+".zip",n.click(),URL.revokeObjectURL(r)})}return k({open:f}),(R,x)=>{const r=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:m.value,"onUpdate:modelValue":x[0]||(x[0]=o=>m.value=o),width:"1000px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(r,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("ssl.ssl")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(d),size:"default",loading:e.unref(C)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(t)},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:p,size:"default","row-key":"id",url:e.unref(F).urls.list,columns:a,loading:e.unref(C)},null,8,["url","loading"]),e.createVNode(te,{ref_key:"formModalRef",ref:s,onRefresh:e.unref(d)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),ne=l.ApiUtils.routineApi("SSLLog","id"),Ie=e.defineComponent({__name:"SSLLogTableDrawer",props:{ssl:{type:Object,default:()=>({})}},setup(N,{expose:k}){const C=N,{requesting:_,executing:h}=l.useLoading([ne,F]),m=e.ref(!1),{tableRef:p,refresh:s}=l.useCrudPage(),d=[{prop:"status_text",label:l.Translate("base.status"),width:100},{prop:"at",label:l.Translate("base.time"),width:180},{prop:"type_text",label:l.Translate("base.type"),width:80},{prop:"result",label:l.Translate("base.result"),width:0}],t=()=>{m.value=!0};function w(){F.gen({id:C.ssl.id}).then(f=>{console.warn("Res:",f)})}function a(){const f=l.AssetsUtils.getDownloadUrl(C.ssl.path+".zip");fetch(f).then(b=>b.blob()).then(b=>{let c=URL.createObjectURL(b),R=document.createElement("a");R.style.display="none",R.href=c,R.download=C.ssl.name+".zip",R.click(),URL.revokeObjectURL(b)})}return k({open:t}),(f,b)=>{const c=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:m.value,"onUpdate:modelValue":b[0]||(b[0]=R=>m.value=R),width:"600px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(c,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.ssl base.log")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(s),size:"default",loading:e.unref(_)},null,8,["onRefresh","loading"])]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"danger",icon:"icon-key",disabled:e.unref(h),loading:e.unref(h),onClick:w},null,8,["disabled","loading"]),e.createVNode(e.unref(l.RequestButton),{size:"default",type:"primary",icon:"icon-cloud-download",disabled:e.unref(h),loading:e.unref(h),onClick:a},null,8,["disabled","loading"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:p,size:"small","row-key":"id",url:e.unref(ne).urls.search,columns:d,loading:e.unref(_)},null,8,["url","loading"])]),_:1},8,["modelValue"])}}}),oe=X(e.defineComponent({__name:"index",setup(N){const k=e.ref(),{requesting:C,executing:_}=l.useLoading(q),{tableRef:h,formModalRef:m,reset:p,refresh:s,openFormModal:d,editFormModal:t}=l.useCrudPage(),{formModalRef:w,openFormModal:a}=l.useCrudPage(),{formModalRef:f,openFormModal:b}=l.useCrudPage(),{formModalRef:c,openFormModal:R}=l.useCrudPage(),x=[{prop:"domain.name",label:l.Translate("config.domain"),width:129,type:"copy"},{prop:"name",label:l.Translate("base.name"),width:100},{prop:"dns",label:l.Translate("config.dns"),width:160,type:"copy"},{prop:"git",label:l.Translate("config.git"),width:300,type:"copy"},{prop:"expired_at",label:l.Translate("base.expired_at"),align:"center",width:140,cellRenderer:({rowData:n})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(e.resolveComponent("el-text"),null,{default:()=>{var g;return[(g=n.ssl)==null?void 0:g.renewal_days,e.createTextVNode(" 天")]}}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"primary",text:!0,onClick:g=>{g.stopPropagation(),n.ssl&&n.ssl.id&&(k.value=n.ssl,R())}},{default:()=>[e.createVNode("span",{class:"icon iconfont icon-reloadtime"},null)]})]})},{prop:"remark",label:l.Translate("base.remark"),width:0,minWidth:160},{prop:"operation",label:l.Translate("base.action"),width:100,align:"center",cellRenderer:({rowData:n})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>t({id:n.id})},null),e.createVNode(l.RequestButton,{icon:"icon-securityscan",type:"primary",size:"small",link:!0,disabled:_.value,loading:r.value==n.id&&_.value,onClick:()=>o(n)},null)]})}],r=e.ref(0),o=n=>{r.value=n.id,q.check({id:n.id}).then(g=>{g.data&&(l.notification(g),s())}).finally(()=>{r.value=0})};return(n,g)=>{const i=e.resolveComponent("el-space"),U=e.resolveComponent("el-page-header"),y=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(y,{"body-style":{padding:"12px",height:"450px"},"body-class":"flex-1",class:"config-card"},{header:e.withCtx(()=>[e.createVNode(U,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.keys.sites")),1)]),content:e.withCtx(()=>[e.createVNode(i,{alignment:"center",style:{height:"32px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(p)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(d)},null,8,["onOpen"])]),_:1})]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(a),icon:"icon-compass"},null,8,["onOpen"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(b),icon:"icon-safetycertificate-f"},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small","row-key":"id",url:e.unref(q).urls[e.unref(l.DEFAULT_LIST_URL)],"auto-search":"",columns:x},null,8,["url"]),e.createVNode(Ee,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(s)},null,8,["onRefresh"]),e.createVNode(Pe,{ref_key:"domainTableDrawerRef",ref:w},null,512),e.createVNode(ze,{ref_key:"sslTableDrawerRef",ref:f},null,512),e.createVNode(Ie,{ref_key:"sslLogTableDrawerRef",ref:c},null,512)]),_:1})}}}),[["__scopeId","data-v-6d185b05"]]),je=Object.freeze(Object.defineProperty({__proto__:null,default:oe},Symbol.toStringTag,{value:"Module"})),Ke={request:"request",error:"error",sql:"SQL"},$=l.ApiUtils.routineApi("log","id",Ke),ae=e.defineComponent({__name:"index",setup(N){const k={dates:[l.TimeUtils.getCurrentHour().format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentHour(1).format(l.TimeUtils.DATE_VALUE_FORMAT)]},C=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:d})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(d.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:_}=l.useLoading($),{tableRef:h,keyword:m,search:p,reset:s}=l.useCrudPage(k);return(d,t)=>{const w=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),f=e.resolveComponent("el-page-header"),b=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(b,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(f,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),onRefresh:e.unref(s)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(m).dates,"onUpdate:modelValue":t[0]||(t[0]=c=>e.unref(m).dates=c),class:"basic-search-datetimerange","value-format":e.unref(l.TimeUtils).DATE_VALUE_FORMAT,format:e.unref(l.TimeUtils).DATE_SHOW_FORMAT,type:"datetimerange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:t[1]||(t[1]=c=>e.unref(p)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(_),onSearch:t[2]||(t[2]=c=>e.unref(p)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small",columns:C,url:e.unref($).urls.request,"search-param":e.unref(m),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),Ye=Object.freeze(Object.defineProperty({__proto__:null,default:ae},Symbol.toStringTag,{value:"Module"})),se=e.defineComponent({__name:"index",setup(N){const k={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_FORMAT),l.TimeUtils.getCurrentDate(0).format(l.TimeUtils.DATE_FORMAT)]},C=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:d})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(d.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:_}=l.useLoading($),{tableRef:h,keyword:m,search:p,reset:s}=l.useCrudPage(k);return(d,t)=>{const w=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),f=e.resolveComponent("el-page-header"),b=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(b,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(f,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),onRefresh:e.unref(s)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(m).dates,"onUpdate:modelValue":t[0]||(t[0]=c=>e.unref(m).dates=c),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,type:"daterange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:t[1]||(t[1]=c=>e.unref(p)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(_),onSearch:t[2]||(t[2]=c=>e.unref(p)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small",columns:C,url:e.unref($).urls.error,"search-param":e.unref(m),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),Ge=Object.freeze(Object.defineProperty({__proto__:null,default:se},Symbol.toStringTag,{value:"Module"})),de=e.defineComponent({__name:"index",setup(N){const k={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_FORMAT),l.TimeUtils.getCurrentDate().format(l.TimeUtils.DATE_FORMAT)]},C=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:d})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(d.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:_}=l.useLoading($),{tableRef:h,keyword:m,search:p,reset:s}=l.useCrudPage(k);return(d,t)=>{const w=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),f=e.resolveComponent("el-page-header"),b=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(b,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(f,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),onRefresh:e.unref(s)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(m).dates,"onUpdate:modelValue":t[0]||(t[0]=c=>e.unref(m).dates=c),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,type:"daterange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:t[1]||(t[1]=c=>e.unref(p)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(_),onSearch:t[2]||(t[2]=c=>e.unref(p)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:h,size:"small",columns:C,url:e.unref($).urls.sql,"search-param":e.unref(m),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),We=Object.freeze(Object.defineProperty({__proto__:null,default:de},Symbol.toStringTag,{value:"Module"})),He=()=>Promise.resolve().then(()=>Ye),Qe=()=>Promise.resolve().then(()=>Ge),Je=()=>Promise.resolve().then(()=>We),Xe=[{path:l.REQUEST_LOG_URL,name:"RequestLog",component:He,meta:{title:l.Translate("menu.RequestLog")}},{path:l.ERROR_LOG_URL,name:"ErrorLog",component:Qe,meta:{title:l.Translate("menu.ErrorLog")}},{path:l.SQL_LOG_URL,name:"SqlLog",component:Je,meta:{title:l.Translate("menu.SqlLog")}}],Ze={install:N=>{Reflect.ownKeys(N._context.provides).some(k=>String(k)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app.",Reflect.ownKeys(N._context.provides))},version:"__VERSION__"},ue=Object.assign({"./views/admin/index.vue":()=>Promise.resolve().then(()=>De),"./views/language/index.vue":()=>Promise.resolve().then(()=>Ae),"./views/menu/index.vue":()=>Promise.resolve().then(()=>ge),"./views/role/index.vue":()=>Promise.resolve().then(()=>ke),"./views/site/index.vue":()=>Promise.resolve().then(()=>je)});S.AdminsPage=ee,S.DomainProviderSelect=le,S.DomainSelect=K,S.ErrorLogsPage=se,S.LanguagesPage=v,S.LogRoutes=Xe,S.MenuSelect=H,S.MenusPage=J,S.RequestLogsPage=ae,S.RolesPage=Z,S.SQLLogsPage=de,S.SitePage=oe,S.SiteSelect=re,S.TopMenuSelect=W,S.basicModules=ue,S.default=Ze,Object.defineProperties(S,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const __VERSION__ = "0.0.
|
|
1
|
+
export const __VERSION__ = "0.0.70'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auto-vue-basic",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.71",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/auto-vue-basic.umd.js",
|
|
6
6
|
"module": "./dist/auto-vue-basic.es.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@element-plus/icons-vue": "^2.3.1",
|
|
24
|
-
"auto-vue-manual": ">=0.2.
|
|
24
|
+
"auto-vue-manual": ">=0.2.70",
|
|
25
25
|
"axios": "^1.7.9",
|
|
26
26
|
"element-plus": "^2.9.3",
|
|
27
27
|
"mitt": "^3.0.1",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"@element-plus/icons-vue": "^2.3.1",
|
|
61
|
-
"auto-vue-manual": ">=0.2.
|
|
61
|
+
"auto-vue-manual": ">=0.2.70",
|
|
62
62
|
"element-plus": "^2.9.3",
|
|
63
63
|
"sass": "^1.77.6",
|
|
64
64
|
"sass-loader": "^16.0.4",
|