System.register(["./index-legacy-b5b2d9a0.js","./dialog-legacy-11ce4a25.js","./overlay-legacy-29ae26a6.js","./button-legacy-47e2d618.js","./form-item-legacy-427baa62.js","./input-legacy-ca2d7044.js","./admin-storage-legacy-e0706052.js","./request-legacy-6e7b4fe0.js","./_plugin-vue_export-helper-legacy-c6aa7c23.js","./index-legacy-2fdb5c0f.js"],(function(e,t){"use strict";var a,n,o,l,i,u,r,d,c,m,s,f,g,p,y,v,b,h,_,w,j;return{setters:[function(e){a=e.M,n=e.r,o=e.B,l=e.J,i=e.o,u=e.g,r=e.w,d=e.h,c=e.j,m=e.f,s=e.A,f=e.m},function(e){g=e.E},null,function(e){p=e.E},null,null,function(e){y=e.e,v=e.f},function(e){b=e.E,h=e.a},function(e){_=e._},function(e){w=e.E,j=e.a}],execute:function(){var t=document.createElement("style");t.textContent=".el-dialog[data-v-80935aa9]{width:80%}@media (min-width: 640px){.el-dialog[data-v-80935aa9]{width:60%}}@media (min-width: 768px){.el-dialog[data-v-80935aa9]{width:40%}}@media (min-width: 1024px){.el-dialog[data-v-80935aa9]{width:30%}}@media (min-width: 1280px){.el-dialog[data-v-80935aa9]{width:20%}}\n",document.head.appendChild(t),e("u",C);var V=a({toName:"",toKey:"",fromId:null}),x={toName:[{required:!0,message:"请输入新存储源名称",trigger:"blur"}],toKey:[{required:!0,message:"请输入新存储源别名",trigger:"blur"},{validator:function(e,t,a){null!=t&&""!==t?o.systemNames.includes(t)?a(new Error("不可占用系统级名称，请修改。")):/^[\w\-]+$/.test(t)?y({storageKey:t}).then((function(e){e.data?a(new Error("该存储源别名已存在，请修改。")):a()})):a(new Error("只允许使用字母、数字、下划线、横杠")):a("请输入存储源别名")}}]},E=n(!1),F=n(!1);function C(){var e=n(null);return{dialogVisible:E,openDialog:function(e){E.value=!0,V.fromId=e.id,V.toKey=e.key,V.toName=e.name},closeDialog:function(){E.value=!1},formData:V,rules:x,storageCopyFormRef:e,submitForm:function(t){F.value=!0,e.value.validate((function(e){e?v(V).then((function(e){b.success("复制成功"),E.value=!1,t("close")})).finally((function(){F.value=!1})):F.value=!1}))},saveLoading:F}}var K={__name:"index",setup:function(e,t){var a=t.emit,n=C(),o=n.dialogVisible,y=n.saveLoading,v=n.formData,b=n.rules,_=n.storageCopyFormRef,V=n.submitForm,x=l();return function(e,t){var n=h,l=w,E=j,F=p,C=g;return i(),u(C,{"append-to-body":"",title:"复制存储配置",modelValue:m(o),"onUpdate:modelValue":t[5]||(t[5]=function(e){return f(o)?o.value=e:null})},{footer:r((function(){return[d(F,{onClick:t[3]||(t[3]=function(e){return o.value=!1})},{default:r((function(){return[c("取 消")]})),_:1}),d(F,{type:"primary",onClick:t[4]||(t[4]=function(e){return m(V)(a)}),loading:m(y)},{default:r((function(){return[c("确 定")]})),_:1},8,["loading"])]})),default:r((function(){return[d(E,{onSubmit:t[2]||(t[2]=s((function(){}),["prevent"])),model:m(v),rules:m(b),"label-width":m(x).adminForm.labelWidth,"label-position":m(x).adminForm.labelPosition,size:m(x).adminForm.size,"status-icon":"",class:"z-admin-form",ref_key:"storageCopyFormRef",ref:_},{default:r((function(){return[d(l,{label:"新存储源名称",prop:"toName"},{default:r((function(){return[d(n,{modelValue:m(v).toName,"onUpdate:modelValue":t[0]||(t[0]=function(e){return m(v).toName=e}),placeholder:"请输入新存储源名称"},null,8,["modelValue"])]})),_:1}),d(l,{label:"新存储源别名",prop:"toKey"},{default:r((function(){return[d(n,{modelValue:m(v).toKey,"onUpdate:modelValue":t[1]||(t[1]=function(e){return m(v).toKey=e}),placeholder:"请输入新存储源别名"},null,8,["modelValue"])]})),_:1})]})),_:1},8,["model","rules","label-width","label-position","size"])]})),_:1},8,["modelValue"])}}},N=e("S",_(K,[["__scopeId","data-v-80935aa9"]])),S=Object.freeze(Object.defineProperty({__proto__:null,default:N},Symbol.toStringTag,{value:"Module"}));e("i",S)}}}));
