mirror of
https://github.com/Safe3/openresty-manager.git
synced 2025-10-04 22:01:52 +08:00
86 lines
55 KiB
JavaScript
86 lines
55 KiB
JavaScript
import{D as lt,_ as _t,a as ht,b as bt,R as St,d as We,S as Et,e as wt,f as Ct,c as It}from"./index-fvitOmZ4.js";import{ae as Ot,af as At,ag as Dt,d as ie,r as V,F as be,H as rt,c as s,_ as U,l as ke,a0 as Se,s as E,x as ve,o as le,q as X,A as ue,y as $e,j as D,a2 as _e,w as it,u as ze,n as he,ah as $t,ai as Rt,aj as st,ak as ct,a7 as ut,al as Pt,am as Tt,an as Nt,ao as Ut,ap as Lt,aq as Ge,ar as Ft,as as Mt,at as dt,au as pt,av as mt,aw as Kt,h as jt,m as kt,ax as zt,k as Yt,a6 as Ht,t as Bt,ay as Te,az as Vt,aA as Wt,a as ye,f as Gt,K as Xt,L as Ne,M as se,U as ce,N as g,O as xe,i as qt,Q as ae,R as Y,S as H,T as k,V as Q,a8 as G,a9 as ee,ab as Jt,ac as Zt}from"./index-sY8U2mN5.js";import{B as Qt,_ as en}from"./index-DF6QHY1m.js";import{E as tn,I as nn}from"./index-CuhAjkvG.js";import{S as an}from"./SearchOutlined-BLCZb9-5.js";import{B as je,u as on,p as ln,P as rn}from"./Col-CfXYHSRU.js";import{b as sn,F as cn,_ as un,a as dn}from"./TextArea-eBr-9_0I.js";import{S as pn}from"./StarFilled-Tv6iLqbj.js";import{_ as mn}from"./index-BCEZO0Ve.js";import{p as fn,_ as vn,a as yn,b as xn}from"./index-ByZ25-ct.js";import{_ as gn}from"./index-C4JfeY-V.js";import{_ as _n}from"./index-DmK03EzM.js";import"./useRefs-BdmXd5te.js";function hn(e,t,n,a){for(var o=-1,c=e==null?0:e.length;++o<c;){var l=e[o];t(a,l,n(l),e)}return a}function bn(e){return function(t,n,a){for(var o=-1,c=Object(t),l=a(t),p=l.length;p--;){var w=l[++o];if(n(c[w],w,c)===!1)break}return t}}var Sn=bn();function En(e,t){return e&&Sn(e,t,Ot)}function wn(e,t){return function(n,a){if(n==null)return n;if(!At(n))return e(n,a);for(var o=n.length,c=-1,l=Object(n);++c<o&&a(l[c],c,l)!==!1;);return n}}var Cn=wn(En);function In(e,t,n,a){return Cn(e,function(o,c,l){t(a,o,n(o),l)}),a}function On(e,t){return function(n,a){var o=Dt(n)?hn:In,c=t?t():{};return o(n,e,sn(a),c)}}var An=On(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function Dn(e,t){const n=`cannot ${e.method} ${e.action} ${t.status}'`,a=new Error(n);return a.status=t.status,a.method=e.method,a.url=e.action,a}function Xe(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function $n(e){const t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(c){c.total>0&&(c.percent=c.loaded/c.total*100),e.onProgress(c)});const n=new FormData;e.data&&Object.keys(e.data).forEach(o=>{const c=e.data[o];if(Array.isArray(c)){c.forEach(l=>{n.append(`${o}[]`,l)});return}n.append(o,c)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(c){e.onError(c)},t.onload=function(){return t.status<200||t.status>=300?e.onError(Dn(e,t),Xe(t)):e.onSuccess(Xe(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const a=e.headers||{};return a["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(a).forEach(o=>{a[o]!==null&&t.setRequestHeader(o,a[o])}),t.send(n),{abort(){t.abort()}}}const Rn=+new Date;let Pn=0;function Ue(){return`vc-upload-${Rn}-${++Pn}`}const Le=(e,t)=>{if(e&&t){const n=Array.isArray(t)?t:t.split(","),a=e.name||"",o=e.type||"",c=o.replace(/\/.*$/,"");return n.some(l=>{const p=l.trim();if(/^\*(\/\*)?$/.test(l))return!0;if(p.charAt(0)==="."){const w=a.toLowerCase(),$=p.toLowerCase();let y=[$];return($===".jpg"||$===".jpeg")&&(y=[".jpg",".jpeg"]),y.some(R=>w.endsWith(R))}return/\/\*$/.test(p)?c===p.replace(/\/.*$/,""):!!(o===p||/^\w+$/.test(p))})}return!0};function Tn(e,t){const n=e.createReader();let a=[];function o(){n.readEntries(c=>{const l=Array.prototype.slice.apply(c);a=a.concat(l),!l.length?t(a):o()})}o()}const Nn=(e,t,n)=>{const a=(o,c)=>{o.path=c||"",o.isFile?o.file(l=>{n(l)&&(o.fullPath&&!l.webkitRelativePath&&(Object.defineProperties(l,{webkitRelativePath:{writable:!0}}),l.webkitRelativePath=o.fullPath.replace(/^\//,""),Object.defineProperties(l,{webkitRelativePath:{writable:!1}})),t([l]))}):o.isDirectory&&Tn(o,l=>{l.forEach(p=>{a(p,`${c}${o.name}/`)})})};e.forEach(o=>{a(o.webkitGetAsEntry())})},ft=()=>({capture:[Boolean,String],multipart:{type:Boolean,default:void 0},name:String,disabled:{type:Boolean,default:void 0},componentTag:String,action:[String,Function],method:String,directory:{type:Boolean,default:void 0},data:[Object,Function],headers:Object,accept:String,multiple:{type:Boolean,default:void 0},onBatchStart:Function,onReject:Function,onStart:Function,onError:Function,onSuccess:Function,onProgress:Function,beforeUpload:Function,customRequest:Function,withCredentials:{type:Boolean,default:void 0},openFileDialogOnClick:{type:Boolean,default:void 0},prefixCls:String,id:String,onMouseenter:Function,onMouseleave:Function,onClick:Function});var Un=function(e,t,n,a){function o(c){return c instanceof n?c:new n(function(l){l(c)})}return new(n||(n=Promise))(function(c,l){function p(y){try{$(a.next(y))}catch(R){l(R)}}function w(y){try{$(a.throw(y))}catch(R){l(R)}}function $(y){y.done?c(y.value):o(y.value).then(p,w)}$((a=a.apply(e,t||[])).next())})},Ln=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};const Fn=ie({compatConfig:{MODE:3},name:"AjaxUploader",inheritAttrs:!1,props:ft(),setup(e,t){let{slots:n,attrs:a,expose:o}=t;const c=V(Ue()),l={},p=V();let w=!1;const $=(i,_)=>Un(this,void 0,void 0,function*(){const{beforeUpload:I}=e;let O=i;if(I){try{O=yield I(i,_)}catch{O=!1}if(O===!1)return{origin:i,parsedFile:null,action:null,data:null}}const{action:P}=e;let N;typeof P=="function"?N=yield P(i):N=P;const{data:K}=e;let F;typeof K=="function"?F=yield K(i):F=K;const j=(typeof O=="object"||typeof O=="string")&&O?O:i;let m;j instanceof File?m=j:m=new File([j],i.name,{type:i.type});const f=m;return f.uid=i.uid,{origin:i,data:F,parsedFile:f,action:N}}),y=i=>{let{data:_,origin:I,action:O,parsedFile:P}=i;if(!w)return;const{onStart:N,customRequest:K,name:F,headers:j,withCredentials:m,method:f}=e,{uid:v}=I,x=K||$n,h={action:O,filename:F,data:_,file:P,headers:j,withCredentials:m,method:f||"post",onProgress:r=>{const{onProgress:u}=e;u==null||u(r,P)},onSuccess:(r,u)=>{const{onSuccess:b}=e;b==null||b(r,P,u),delete l[v]},onError:(r,u)=>{const{onError:b}=e;b==null||b(r,u,P),delete l[v]}};N(I),l[v]=x(h)},R=()=>{c.value=Ue()},A=i=>{if(i){const _=i.uid?i.uid:i;l[_]&&l[_].abort&&l[_].abort(),delete l[_]}else Object.keys(l).forEach(_=>{l[_]&&l[_].abort&&l[_].abort(),delete l[_]})};be(()=>{w=!0}),rt(()=>{w=!1,A()});const T=i=>{const _=[...i],I=_.map(O=>(O.uid=Ue(),$(O,_)));Promise.all(I).then(O=>{const{onBatchStart:P}=e;P==null||P(O.map(N=>{let{origin:K,parsedFile:F}=N;return{file:K,parsedFile:F}})),O.filter(N=>N.parsedFile!==null).forEach(N=>{y(N)})})},B=i=>{const{accept:_,directory:I}=e,{files:O}=i.target,P=[...O].filter(N=>!I||Le(N,_));T(P),R()},d=i=>{const _=p.value;if(!_)return;const{onClick:I}=e;_.click(),I&&I(i)},C=i=>{i.key==="Enter"&&d(i)},L=i=>{const{multiple:_}=e;if(i.preventDefault(),i.type!=="dragover")if(e.directory)Nn(Array.prototype.slice.call(i.dataTransfer.items),T,I=>Le(I,e.accept));else{const I=An(Array.prototype.slice.call(i.dataTransfer.files),N=>Le(N,e.accept));let O=I[0];const P=I[1];_===!1&&(O=O.slice(0,1)),T(O),P.length&&e.onReject&&e.onReject(P)}};return o({abort:A}),()=>{var i;const{componentTag:_,prefixCls:I,disabled:O,id:P,multiple:N,accept:K,capture:F,directory:j,openFileDialogOnClick:m,onMouseenter:f,onMouseleave:v}=e,x=Ln(e,["componentTag","prefixCls","disabled","id","multiple","accept","capture","directory","openFileDialogOnClick","onMouseenter","onMouseleave"]),h={[I]:!0,[`${I}-disabled`]:O,[a.class]:!!a.class},r=j?{directory:"directory",webkitdirectory:"webkitdirectory"}:{};return s(_,U(U({},O?{}:{onClick:m?d:()=>{},onKeydown:m?C:()=>{},onMouseenter:f,onMouseleave:v,onDrop:L,onDragover:L,tabindex:"0"}),{},{class:h,role:"button",style:a.style}),{default:()=>[s("input",U(U(U({},fn(x,{aria:!0,data:!0})),{},{id:P,type:"file",ref:p,onClick:b=>b.stopPropagation(),onCancel:b=>b.stopPropagation(),key:c.value,style:{display:"none"},accept:K},r),{},{multiple:N,onChange:B},F!=null?{capture:F}:{}),null),(i=n.default)===null||i===void 0?void 0:i.call(n)]})}}});function Fe(){}const qe=ie({compatConfig:{MODE:3},name:"Upload",inheritAttrs:!1,props:ke(ft(),{componentTag:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Fe,onError:Fe,onSuccess:Fe,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0}),setup(e,t){let{slots:n,attrs:a,expose:o}=t;const c=V();return o({abort:p=>{var w;(w=c.value)===null||w===void 0||w.abort(p)}}),()=>s(Fn,U(U(U({},e),a),{},{ref:c}),n)}});var Mn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};function Je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),a.forEach(function(o){Kn(e,o,n[o])})}return e}function Kn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ye=function(t,n){var a=Je({},t,n.attrs);return s(Se,Je({},a,{icon:Mn}),null)};Ye.displayName="PaperClipOutlined";Ye.inheritAttrs=!1;var jn={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:t}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:n}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:n}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:n}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:t}}]}},name:"picture",theme:"twotone"};function Ze(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),a.forEach(function(o){kn(e,o,n[o])})}return e}function kn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var He=function(t,n){var a=Ze({},t,n.attrs);return s(Se,Ze({},a,{icon:jn}),null)};He.displayName="PictureTwoTone";He.inheritAttrs=!1;var zn={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:n}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:t}}]}},name:"file",theme:"twotone"};function Qe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),a.forEach(function(o){Yn(e,o,n[o])})}return e}function Yn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Be=function(t,n){var a=Qe({},t,n.attrs);return s(Se,Qe({},a,{icon:zn}),null)};Be.displayName="FileTwoTone";Be.inheritAttrs=!1;function vt(){return{capture:ve([Boolean,String]),type:ue(),name:String,defaultFileList:$e(),fileList:$e(),action:ve([String,Function]),directory:X(),data:ve([Object,Function]),method:ue(),headers:le(),showUploadList:ve([Boolean,Object]),multiple:X(),accept:String,beforeUpload:E(),onChange:E(),"onUpdate:fileList":E(),onDrop:E(),listType:ue(),onPreview:E(),onDownload:E(),onReject:E(),onRemove:E(),remove:E(),supportServerRender:X(),disabled:X(),prefixCls:String,customRequest:E(),withCredentials:X(),openFileDialogOnClick:X(),locale:le(),id:String,previewFile:E(),transformFile:E(),iconRender:E(),isImageUrl:E(),progress:le(),itemRender:E(),maxCount:Number,height:ve([Number,String]),removeIcon:E(),downloadIcon:E(),previewIcon:E()}}function Hn(){return{listType:ue(),onPreview:E(),onDownload:E(),onRemove:E(),items:$e(),progress:le(),prefixCls:ue(),showRemoveIcon:X(),showDownloadIcon:X(),showPreviewIcon:X(),removeIcon:E(),downloadIcon:E(),previewIcon:E(),locale:le(void 0),previewFile:E(),iconRender:E(),isImageUrl:E(),appendAction:E(),appendActionVisible:X(),itemRender:E()}}function Oe(e){return D(D({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function Ae(e,t){const n=[...t],a=n.findIndex(o=>{let{uid:c}=o;return c===e.uid});return a===-1?n.push(e):n[a]=e,n}function Me(e,t){const n=e.uid!==void 0?"uid":"name";return t.filter(a=>a[n]===e[n])[0]}function Bn(e,t){const n=e.uid!==void 0?"uid":"name",a=t.filter(o=>o[n]!==e[n]);return a.length===t.length?null:a}const Vn=function(){const t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),a=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(a)||[""])[0]},yt=e=>e.indexOf("image/")===0,Wn=e=>{if(e.type&&!e.thumbUrl)return yt(e.type);const t=e.thumbUrl||e.url||"",n=Vn(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(n)?!0:!(/^data:/.test(t)||n)},oe=200;function Gn(e){return new Promise(t=>{if(!e.type||!yt(e.type)){t("");return}const n=document.createElement("canvas");n.width=oe,n.height=oe,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${oe}px; height: ${oe}px; z-index: 9999; display: none;`,document.body.appendChild(n);const a=n.getContext("2d"),o=new Image;if(o.onload=()=>{const{width:c,height:l}=o;let p=oe,w=oe,$=0,y=0;c>l?(w=l*(oe/c),y=-(w-p)/2):(p=c*(oe/l),$=-(p-w)/2),a.drawImage(o,$,y,p,w);const R=n.toDataURL();document.body.removeChild(n),t(R)},o.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const c=new FileReader;c.addEventListener("load",()=>{c.result&&(o.src=c.result)}),c.readAsDataURL(e)}else o.src=window.URL.createObjectURL(e)})}var Xn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};function et(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),a.forEach(function(o){qn(e,o,n[o])})}return e}function qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ve=function(t,n){var a=et({},t,n.attrs);return s(Se,et({},a,{icon:Xn}),null)};Ve.displayName="DownloadOutlined";Ve.inheritAttrs=!1;const Jn=()=>({prefixCls:String,locale:le(void 0),file:le(),items:$e(),listType:ue(),isImgUrl:E(),showRemoveIcon:X(),showDownloadIcon:X(),showPreviewIcon:X(),removeIcon:E(),downloadIcon:E(),previewIcon:E(),iconRender:E(),actionIconRender:E(),itemRender:E(),onPreview:E(),onClose:E(),onDownload:E(),progress:le()}),Zn=ie({compatConfig:{MODE:3},name:"ListItem",inheritAttrs:!1,props:Jn(),setup(e,t){let{slots:n,attrs:a}=t;var o;const c=_e(!1),l=_e();be(()=>{l.value=setTimeout(()=>{c.value=!0},300)}),rt(()=>{clearTimeout(l.value)});const p=_e((o=e.file)===null||o===void 0?void 0:o.status);it(()=>{var y;return(y=e.file)===null||y===void 0?void 0:y.status},y=>{y!=="removed"&&(p.value=y)});const{rootPrefixCls:w}=ze("upload",e),$=he(()=>$t(`${w.value}-fade`));return()=>{var y,R;const{prefixCls:A,locale:T,listType:B,file:d,items:C,progress:L,iconRender:i=n.iconRender,actionIconRender:_=n.actionIconRender,itemRender:I=n.itemRender,isImgUrl:O,showPreviewIcon:P,showRemoveIcon:N,showDownloadIcon:K,previewIcon:F=n.previewIcon,removeIcon:j=n.removeIcon,downloadIcon:m=n.downloadIcon,onPreview:f,onDownload:v,onClose:x}=e,{class:h,style:r}=a,u=i({file:d});let b=s("div",{class:`${A}-text-icon`},[u]);if(B==="picture"||B==="picture-card")if(p.value==="uploading"||!d.thumbUrl&&!d.url){const W={[`${A}-list-item-thumbnail`]:!0,[`${A}-list-item-file`]:p.value!=="uploading"};b=s("div",{class:W},[u])}else{const W=O!=null&&O(d)?s("img",{src:d.thumbUrl||d.url,alt:d.name,class:`${A}-list-item-image`,crossorigin:d.crossOrigin},null):u,me={[`${A}-list-item-thumbnail`]:!0,[`${A}-list-item-file`]:O&&!O(d)};b=s("a",{class:me,onClick:Ie=>f(d,Ie),href:d.url||d.thumbUrl,target:"_blank",rel:"noopener noreferrer"},[W])}const M={[`${A}-list-item`]:!0,[`${A}-list-item-${p.value}`]:!0},q=typeof d.linkProps=="string"?JSON.parse(d.linkProps):d.linkProps,te=N?_({customIcon:j?j({file:d}):s(lt,null,null),callback:()=>x(d),prefixCls:A,title:T.removeFile}):null,z=K&&p.value==="done"?_({customIcon:m?m({file:d}):s(Ve,null,null),callback:()=>v(d),prefixCls:A,title:T.downloadFile}):null,J=B!=="picture-card"&&s("span",{key:"download-delete",class:[`${A}-list-item-actions`,{picture:B==="picture"}]},[z,te]),ne=`${A}-list-item-name`,re=d.url?[s("a",U(U({key:"view",target:"_blank",rel:"noopener noreferrer",class:ne,title:d.name},q),{},{href:d.url,onClick:W=>f(d,W)}),[d.name]),J]:[s("span",{key:"view",class:ne,onClick:W=>f(d,W),title:d.name},[d.name]),J],de={pointerEvents:"none",opacity:.5},Z=P?s("a",{href:d.url||d.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:d.url||d.thumbUrl?void 0:de,onClick:W=>f(d,W),title:T.previewFile},[F?F({file:d}):s(tn,null,null)]):null,Ee=B==="picture-card"&&p.value!=="uploading"&&s("span",{class:`${A}-list-item-actions`},[Z,p.value==="done"&&z,te]),we=s("div",{class:M},[b,re,Ee,c.value&&s(Rt,$.value,{default:()=>[st(s("div",{class:`${A}-list-item-progress`},["percent"in d?s(_n,U(U({},L),{},{type:"line",percent:d.percent}),null):null]),[[ct,p.value==="uploading"]])]})]),Pe={[`${A}-list-item-container`]:!0,[`${h}`]:!!h},Ce=d.response&&typeof d.response=="string"?d.response:((y=d.error)===null||y===void 0?void 0:y.statusText)||((R=d.error)===null||R===void 0?void 0:R.message)||T.uploadError,pe=p.value==="error"?s(ut,{title:Ce,getPopupContainer:W=>W.parentNode},{default:()=>[we]}):we;return s("div",{class:Pe,style:r},[I?I({originNode:pe,file:d,fileList:C,actions:{download:v.bind(null,d),preview:f.bind(null,d),remove:x.bind(null,d)}}):pe])}}}),Qn=(e,t)=>{let{slots:n}=t;var a;return Mt((a=n.default)===null||a===void 0?void 0:a.call(n))[0]},ea=ie({compatConfig:{MODE:3},name:"AUploadList",props:ke(Hn(),{listType:"text",progress:{strokeWidth:2,showInfo:!1},showRemoveIcon:!0,showDownloadIcon:!1,showPreviewIcon:!0,previewFile:Gn,isImageUrl:Wn,items:[],appendActionVisible:!0}),setup(e,t){let{slots:n,expose:a}=t;const o=_e(!1);be(()=>{o.value==!0});const c=_e([]);it(()=>e.items,function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];c.value=d.slice()},{immediate:!0,deep:!0}),Pt(()=>{if(e.listType!=="picture"&&e.listType!=="picture-card")return;let d=!1;(e.items||[]).forEach((C,L)=>{typeof document>"u"||typeof window>"u"||!window.FileReader||!window.File||!(C.originFileObj instanceof File||C.originFileObj instanceof Blob)||C.thumbUrl!==void 0||(C.thumbUrl="",e.previewFile&&e.previewFile(C.originFileObj).then(i=>{const _=i||"";_!==C.thumbUrl&&(c.value[L].thumbUrl=_,d=!0)}))}),d&&Tt(c)});const l=(d,C)=>{if(e.onPreview)return C==null||C.preventDefault(),e.onPreview(d)},p=d=>{typeof e.onDownload=="function"?e.onDownload(d):d.url&&window.open(d.url)},w=d=>{var C;(C=e.onRemove)===null||C===void 0||C.call(e,d)},$=d=>{let{file:C}=d;const L=e.iconRender||n.iconRender;if(L)return L({file:C,listType:e.listType});const i=C.status==="uploading",_=e.isImageUrl&&e.isImageUrl(C)?s(He,null,null):s(Be,null,null);let I=i?s(Ge,null,null):s(Ye,null,null);return e.listType==="picture"?I=i?s(Ge,null,null):_:e.listType==="picture-card"&&(I=i?e.locale.uploading:_),I},y=d=>{const{customIcon:C,callback:L,prefixCls:i,title:_}=d,I={type:"text",size:"small",title:_,onClick:()=>{L()},class:`${i}-list-item-action`};return Ft(C)?s(je,I,{icon:()=>C}):s(je,I,{default:()=>[s("span",null,[C])]})};a({handlePreview:l,handleDownload:p});const{prefixCls:R,rootPrefixCls:A}=ze("upload",e),T=he(()=>({[`${R.value}-list`]:!0,[`${R.value}-list-${e.listType}`]:!0})),B=he(()=>{const d=D({},Nt(`${A.value}-motion-collapse`));delete d.onAfterAppear,delete d.onAfterEnter,delete d.onAfterLeave;const C=D(D({},Ut(`${R.value}-${e.listType==="picture-card"?"animate-inline":"animate"}`)),{class:T.value,appear:o.value});return e.listType!=="picture-card"?D(D({},d),C):C});return()=>{const{listType:d,locale:C,isImageUrl:L,showPreviewIcon:i,showRemoveIcon:_,showDownloadIcon:I,removeIcon:O,previewIcon:P,downloadIcon:N,progress:K,appendAction:F,itemRender:j,appendActionVisible:m}=e,f=F==null?void 0:F(),v=c.value;return s(Lt,U(U({},B.value),{},{tag:"div"}),{default:()=>[v.map(x=>{const{uid:h}=x;return s(Zn,{key:h,locale:C,prefixCls:R.value,file:x,items:v,progress:K,listType:d,isImgUrl:L,showPreviewIcon:i,showRemoveIcon:_,showDownloadIcon:I,onPreview:l,onDownload:p,onClose:w,removeIcon:O,previewIcon:P,downloadIcon:N,itemRender:j},D(D({},n),{iconRender:$,actionIconRender:y}))}),F?st(s(Qn,{key:"__ant_upload_appendAction"},{default:()=>f}),[[ct,!!m]]):null]})}}}),ta=e=>{const{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:`${e.padding}px 0`},[`${t}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${t}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${e.marginXXS}px`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{cursor:"not-allowed",[`p${t}-drag-icon ${n},
|
||
p${t}-text,
|
||
p${t}-hint
|
||
`]:{color:e.colorTextDisabled}}}}}},na=e=>{const{componentCls:t,antCls:n,iconCls:a,fontSize:o,lineHeight:c}=e,l=`${t}-list-item`,p=`${l}-actions`,w=`${l}-action`,$=Math.round(o*c);return{[`${t}-wrapper`]:{[`${t}-list`]:D(D({},dt()),{lineHeight:e.lineHeight,[l]:{position:"relative",height:e.lineHeight*o,marginTop:e.marginXS,fontSize:o,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,"&:hover":{backgroundColor:e.controlItemBgHover},[`${l}-name`]:D(D({},pt),{padding:`0 ${e.paddingXS}px`,lineHeight:c,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[p]:{[w]:{opacity:0},[`${w}${n}-btn-sm`]:{height:$,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`
|
||
${w}:focus,
|
||
&.picture ${w}
|
||
`]:{opacity:1},[a]:{color:e.colorTextDescription,transition:`all ${e.motionDurationSlow}`},[`&:hover ${a}`]:{color:e.colorText}},[`${t}-icon ${a}`]:{color:e.colorTextDescription,fontSize:o},[`${l}-progress`]:{position:"absolute",bottom:-e.uploadProgressOffset,width:"100%",paddingInlineStart:o+e.paddingXS,fontSize:o,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${l}:hover ${w}`]:{opacity:1,color:e.colorText},[`${l}-error`]:{color:e.colorError,[`${l}-name, ${t}-icon ${a}`]:{color:e.colorError},[p]:{[`${a}, ${a}:hover`]:{color:e.colorError},[w]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},tt=new mt("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),nt=new mt("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),aa=e=>{const{componentCls:t}=e,n=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${n}-appear, ${n}-enter, ${n}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${n}-appear, ${n}-enter`]:{animationName:tt},[`${n}-leave`]:{animationName:nt}}},tt,nt]},oa=e=>{const{componentCls:t,iconCls:n,uploadThumbnailSize:a,uploadProgressOffset:o}=e,c=`${t}-list`,l=`${c}-item`;return{[`${t}-wrapper`]:{[`${c}${c}-picture, ${c}${c}-picture-card`]:{[l]:{position:"relative",height:a+e.lineWidth*2+e.paddingXS*2,padding:e.paddingXS,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${l}-thumbnail`]:D(D({},pt),{width:a,height:a,lineHeight:`${a+e.paddingSM}px`,textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${l}-progress`]:{bottom:o,width:`calc(100% - ${e.paddingSM*2}px)`,marginTop:0,paddingInlineStart:a+e.paddingXS}},[`${l}-error`]:{borderColor:e.colorError,[`${l}-thumbnail ${n}`]:{"svg path[fill='#e6f7ff']":{fill:e.colorErrorBg},"svg path[fill='#1890ff']":{fill:e.colorError}}},[`${l}-uploading`]:{borderStyle:"dashed",[`${l}-name`]:{marginBottom:o}}}}}},la=e=>{const{componentCls:t,iconCls:n,fontSizeLG:a,colorTextLightSolid:o}=e,c=`${t}-list`,l=`${c}-item`,p=e.uploadPicCardSize;return{[`${t}-wrapper${t}-picture-card-wrapper`]:D(D({},dt()),{display:"inline-block",width:"100%",[`${t}${t}-select`]:{width:p,height:p,marginInlineEnd:e.marginXS,marginBottom:e.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${c}${c}-picture-card`]:{[`${c}-item-container`]:{display:"inline-block",width:p,height:p,marginBlock:`0 ${e.marginXS}px`,marginInline:`0 ${e.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[l]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${e.paddingXS*2}px)`,height:`calc(100% - ${e.paddingXS*2}px)`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${l}:hover`]:{[`&::before, ${l}-actions`]:{opacity:1}},[`${l}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`${n}-eye, ${n}-download, ${n}-delete`]:{zIndex:10,width:a,margin:`0 ${e.marginXXS}px`,fontSize:a,cursor:"pointer",transition:`all ${e.motionDurationSlow}`}},[`${l}-actions, ${l}-actions:hover`]:{[`${n}-eye, ${n}-download, ${n}-delete`]:{color:new Kt(o).setAlpha(.65).toRgbString(),"&:hover":{color:o}}},[`${l}-thumbnail, ${l}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${l}-name`]:{display:"none",textAlign:"center"},[`${l}-file + ${l}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${e.paddingXS*2}px)`},[`${l}-uploading`]:{[`&${l}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${l}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${e.paddingXS*2}px)`,paddingInlineStart:0}}})}},ra=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},ia=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:D(D({},Yt(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-disabled`]:{color:n,cursor:"not-allowed"}})}},sa=jt("Upload",e=>{const{fontSizeHeading3:t,fontSize:n,lineHeight:a,lineWidth:o,controlHeightLG:c}=e,l=Math.round(n*a),p=kt(e,{uploadThumbnailSize:t*2,uploadProgressOffset:l/2+o,uploadPicCardSize:c*2.55});return[ia(p),ta(p),oa(p),la(p),na(p),aa(p),ra(p),zt(p)]});var ca=function(e,t,n,a){function o(c){return c instanceof n?c:new n(function(l){l(c)})}return new(n||(n=Promise))(function(c,l){function p(y){try{$(a.next(y))}catch(R){l(R)}}function w(y){try{$(a.throw(y))}catch(R){l(R)}}function $(y){y.done?c(y.value):o(y.value).then(p,w)}$((a=a.apply(e,t||[])).next())})},ua=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};const ge=`__LIST_IGNORE_${Date.now()}__`,De=ie({compatConfig:{MODE:3},name:"AUpload",inheritAttrs:!1,props:ke(vt(),{type:"select",multiple:!1,action:"",data:{},accept:"",showUploadList:!0,listType:"text",supportServerRender:!0}),setup(e,t){let{slots:n,attrs:a,expose:o}=t;const c=on(),{prefixCls:l,direction:p,disabled:w}=ze("upload",e),[$,y]=sa(l),R=Ht(),A=he(()=>{var m;return(m=w.value)!==null&&m!==void 0?m:R.value}),[T,B]=ln(e.defaultFileList||[],{value:Bt(e,"fileList"),postState:m=>{const f=Date.now();return(m??[]).map((v,x)=>(!v.uid&&!Object.isFrozen(v)&&(v.uid=`__AUTO__${f}_${x}__`),v))}}),d=V("drop"),C=V(null);be(()=>{Te(e.fileList!==void 0||a.value===void 0,"Upload","`value` is not a valid prop, do you mean `fileList`?"),Te(e.transformFile===void 0,"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly."),Te(e.remove===void 0,"Upload","`remove` props is deprecated. Please use `remove` event.")});const L=(m,f,v)=>{var x,h;let r=[...f];e.maxCount===1?r=r.slice(-1):e.maxCount&&(r=r.slice(0,e.maxCount)),B(r);const u={file:m,fileList:r};v&&(u.event=v),(x=e["onUpdate:fileList"])===null||x===void 0||x.call(e,u.fileList),(h=e.onChange)===null||h===void 0||h.call(e,u),c.onFieldChange()},i=(m,f)=>ca(this,void 0,void 0,function*(){const{beforeUpload:v,transformFile:x}=e;let h=m;if(v){const r=yield v(m,f);if(r===!1)return!1;if(delete m[ge],r===ge)return Object.defineProperty(m,ge,{value:!0,configurable:!0}),!1;typeof r=="object"&&r&&(h=r)}return x&&(h=yield x(h)),h}),_=m=>{const f=m.filter(h=>!h.file[ge]);if(!f.length)return;const v=f.map(h=>Oe(h.file));let x=[...T.value];v.forEach(h=>{x=Ae(h,x)}),v.forEach((h,r)=>{let u=h;if(f[r].parsedFile)h.status="uploading";else{const{originFileObj:b}=h;let M;try{M=new File([b],b.name,{type:b.type})}catch{M=new Blob([b],{type:b.type}),M.name=b.name,M.lastModifiedDate=new Date,M.lastModified=new Date().getTime()}M.uid=h.uid,u=M}L(u,x)})},I=(m,f,v)=>{try{typeof m=="string"&&(m=JSON.parse(m))}catch{}if(!Me(f,T.value))return;const x=Oe(f);x.status="done",x.percent=100,x.response=m,x.xhr=v;const h=Ae(x,T.value);L(x,h)},O=(m,f)=>{if(!Me(f,T.value))return;const v=Oe(f);v.status="uploading",v.percent=m.percent;const x=Ae(v,T.value);L(v,x,m)},P=(m,f,v)=>{if(!Me(v,T.value))return;const x=Oe(v);x.error=m,x.response=f,x.status="error";const h=Ae(x,T.value);L(x,h)},N=m=>{let f;const v=e.onRemove||e.remove;Promise.resolve(typeof v=="function"?v(m):v).then(x=>{var h,r;if(x===!1)return;const u=Bn(m,T.value);u&&(f=D(D({},m),{status:"removed"}),(h=T.value)===null||h===void 0||h.forEach(b=>{const M=f.uid!==void 0?"uid":"name";b[M]===f[M]&&!Object.isFrozen(b)&&(b.status="removed")}),(r=C.value)===null||r===void 0||r.abort(f),L(f,u))})},K=m=>{var f;d.value=m.type,m.type==="drop"&&((f=e.onDrop)===null||f===void 0||f.call(e,m))};o({onBatchStart:_,onSuccess:I,onProgress:O,onError:P,fileList:T,upload:C});const[F]=Vt("Upload",Wt.Upload,he(()=>e.locale)),j=(m,f)=>{const{removeIcon:v,previewIcon:x,downloadIcon:h,previewFile:r,onPreview:u,onDownload:b,isImageUrl:M,progress:q,itemRender:te,iconRender:z,showUploadList:J}=e,{showDownloadIcon:ne,showPreviewIcon:re,showRemoveIcon:de}=typeof J=="boolean"?{}:J;return J?s(ea,{prefixCls:l.value,listType:e.listType,items:T.value,previewFile:r,onPreview:u,onDownload:b,onRemove:N,showRemoveIcon:!A.value&&de,showPreviewIcon:re,showDownloadIcon:ne,removeIcon:v,previewIcon:x,downloadIcon:h,iconRender:z,locale:F.value,isImageUrl:M,progress:q,itemRender:te,appendActionVisible:f,appendAction:m},D({},n)):m==null?void 0:m()};return()=>{var m,f,v;const{listType:x,type:h}=e,{class:r,style:u}=a,b=ua(a,["class","style"]),M=D(D(D({onBatchStart:_,onError:P,onProgress:O,onSuccess:I},b),e),{id:(m=e.id)!==null&&m!==void 0?m:c.id.value,prefixCls:l.value,beforeUpload:i,onChange:void 0,disabled:A.value});delete M.remove,(!n.default||A.value)&&delete M.id;const q={[`${l.value}-rtl`]:p.value==="rtl"};if(h==="drag"){const ne=ye(l.value,{[`${l.value}-drag`]:!0,[`${l.value}-drag-uploading`]:T.value.some(re=>re.status==="uploading"),[`${l.value}-drag-hover`]:d.value==="dragover",[`${l.value}-disabled`]:A.value,[`${l.value}-rtl`]:p.value==="rtl"},a.class,y.value);return $(s("span",U(U({},a),{},{class:ye(`${l.value}-wrapper`,q,r,y.value)}),[s("div",{class:ne,onDrop:K,onDragover:K,onDragleave:K,style:a.style},[s(qe,U(U({},M),{},{ref:C,class:`${l.value}-btn`}),U({default:()=>[s("div",{class:`${l.value}-drag-container`},[(f=n.default)===null||f===void 0?void 0:f.call(n)])]},n))]),j()]))}const te=ye(l.value,{[`${l.value}-select`]:!0,[`${l.value}-select-${x}`]:!0,[`${l.value}-disabled`]:A.value,[`${l.value}-rtl`]:p.value==="rtl"}),z=Gt((v=n.default)===null||v===void 0?void 0:v.call(n)),J=ne=>s("div",{class:te,style:ne},[s(qe,U(U({},M),{},{ref:C}),n)]);return $(x==="picture-card"?s("span",U(U({},a),{},{class:ye(`${l.value}-wrapper`,`${l.value}-picture-card-wrapper`,q,a.class,y.value)}),[j(J,!!(z&&z.length))]):s("span",U(U({},a),{},{class:ye(`${l.value}-wrapper`,q,a.class,y.value)}),[J(z&&z.length?void 0:{display:"none"}),j()]))}}});var at=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};const Ke=ie({compatConfig:{MODE:3},name:"AUploadDragger",inheritAttrs:!1,props:vt(),setup(e,t){let{slots:n,attrs:a}=t;return()=>{const{height:o}=e,c=at(e,["height"]),{style:l}=a,p=at(a,["style"]),w=D(D(D({},c),p),{type:"drag",style:D(D({},l),{height:typeof o=="number"?`${o}px`:o})});return s(De,w,n)}}}),da=D(De,{Dragger:Ke,LIST_IGNORE:ge,install(e){return e.component(De.name,De),e.component(Ke.name,Ke),e}});var pa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};function ot(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),a.forEach(function(o){ma(e,o,n[o])})}return e}function ma(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Re=function(t,n){var a=ot({},t,n.attrs);return s(Se,ot({},a,{icon:pa}),null)};Re.displayName="UploadOutlined";Re.inheritAttrs=!1;const fa={style:{padding:"24px",minHeight:"calc(100vh - 110px)",width:"100%"},class:"charmful"},va={key:4},ya={href:"https://letsencrypt.org/docs/challenge-types/#http-01-challenge",target:"_blank"},xa={href:"https://letsencrypt.org/docs/challenge-types/#dns-01-challenge",target:"_blank"},Pa=ie({__name:"certs",setup(e){const{t}=Xt(),n=qt("$http"),a=V(""),o=V(""),c=V([]),l=V([]),p=V([{label:"Active24",value:"active24"},{label:"Akamai EdgeDNS",value:"edgedns"},{label:"Alibaba Cloud DNS/阿里云",value:"alidns"},{label:"All-inkl",value:"allinkl"},{label:"Amazon Route 53",value:"route53"},{label:"ArvanCloud",value:"arvancloud"},{label:"Aurora DNS",value:"auroradns"},{label:"Autodns",value:"autodns"},{label:"Axelname",value:"axelname"},{label:"Azure DNS",value:"azuredns"},{label:"Baidu Cloud/百度云",value:"baiducloud"},{label:"BookMyName",value:"bookmyname"},{label:"Bunny",value:"bunny"},{label:"Checkdomain",value:"checkdomain"},{label:"Civo",value:"civo"},{label:"Cloud.ru",value:"cloudru"},{label:"CloudDNS",value:"clouddns"},{label:"Cloudflare",value:"cloudflare"},{label:"ClouDNS",value:"cloudns"},{label:"ConoHa",value:"conoha"},{label:"Constellix",value:"constellix"},{label:"Designate DNSaaS for Openstack",value:"designate"},{label:"Digital Ocean",value:"digitalocean"},{label:"DNS Made Easy",value:"dnsmadeeasy"},{label:"DNSimple",value:"dnsimple"},{label:"Domain Offensive (do.de)",value:"dode"},{label:"DreamHost",value:"dreamhost"},{label:"Duck DNS",value:"duckdns"},{label:"Dyn",value:"dyn"},{label:"EasyDNS",value:"easydns"},{label:"Exoscale",value:"exoscale"},{label:"F5 XC",value:"f5xc"},{label:"Gandi",value:"gandi"},{label:"Gandi Live DNS (v5)",value:"gandiv5"},{label:"Glesys",value:"glesys"},{label:"Go Daddy",value:"godaddy"},{label:"Google Domains",value:"googledomains"},{label:"Hetzner",value:"hetzner"},{label:"Hosting.de",value:"hostingde"},{label:"Huawei Cloud/华为云",value:"huaweicloud"},{label:"IBM Cloud (SoftLayer)",value:"ibmcloud"},{label:"Internet Initiative Japan",value:"iij"},{label:"INWX",value:"inwx"},{label:"Linode (v4)",value:"linode"},{label:"Liquid Web",value:"liquidweb"},{label:"Mittwald",value:"mittwald"},{label:"MyDNS.jp",value:"mydnsjp"},{label:"MythicBeasts",value:"mythicbeasts"},{label:"Name.com",value:"namedotcom"},{label:"Namecheap",value:"namecheap"},{label:"NIFCloud",value:"nifcloud"},{label:"NS1",value:"ns1"},{label:"Oracle Cloud",value:"oraclecloud"},{label:"OVH",value:"ovh"},{label:"plesk.com",value:"plesk"},{label:"PowerDNS",value:"pdns"},{label:"Rackspace",value:"rackspace"},{label:"reg.ru",value:"regru"},{label:"RFC2136",value:"rfc2136"},{label:"Sakura Cloud",value:"sakuracloud"},{label:"Sonic",value:"sonic"},{label:"Spaceship",value:"spaceship"},{label:"Stackpath",value:"stackpath"},{label:"Tencent Cloud/腾讯云",value:"tencentcloud"},{label:"Vercel",value:"vercel"},{label:"Volcano Engine/火山引擎",value:"volcengine"},{label:"Vscale",value:"vscale"},{label:"Vultr",value:"vultr"},{label:"West.cn/西部数码",value:"westcn"},{label:"Yandex 360",value:"yandex360"},{label:"Yandex Cloud",value:"yandexcloud"},{label:"Yandex PDD",value:"yandex"},{label:"Zone.ee",value:"zoneee"},{label:"Zonomi",value:"zonomi"}]),w={active24:`ACTIVE24_API_KEY="xxx"
|
||
ACTIVE24_SECRET="yyy"`,edgedns:`AKAMAI_CLIENT_SECRET=abcdefghij567890ABCDEFG=
|
||
AKAMAI_CLIENT_TOKEN=akab-mnbvcxwq1234567
|
||
AKAMAI_HOST=akab-aaaa.luna.akamaiapis.net
|
||
AKAMAI_ACCESS_TOKEN=akab-12345erty-asvtnu`,alidns:`ALICLOUD_ACCESS_KEY=abcdefghijklmnopqrstuvwx
|
||
ALICLOUD_SECRET_KEY=your-secret-key
|
||
ALICLOUD_SECURITY_TOKEN=your-sts-token`,allinkl:`ALL_INKL_LOGIN=xxxxxxxxxxxxxxxxxxxxxxxxxx
|
||
ALL_INKL_PASSWORD=yyyyyyyyyyyyyyyyyyyyyyyyyy`,route53:`AWS_ACCESS_KEY_ID=your_key_id
|
||
AWS_SECRET_ACCESS_KEY=your_secret_access_key
|
||
AWS_REGION=aws-region
|
||
AWS_HOSTED_ZONE_ID=your_hosted_zone_id`,arvancloud:'ARVANCLOUD_API_KEY="Apikey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"',auroradns:`AURORA_API_KEY=xxxxx
|
||
AURORA_SECRET=yyyyyy`,autodns:`AUTODNS_API_USER=username
|
||
AUTODNS_API_PASSWORD=supersecretpassword`,axelname:`AXELNAME_NICKNAME="yyy"
|
||
AXELNAME_TOKEN="xxx"`,azuredns:`AZURE_CLIENT_ID=<your service principal client ID>
|
||
AZURE_TENANT_ID=<your service principal tenant ID>
|
||
AZURE_CLIENT_SECRET=<your service principal client secret>`,baiducloud:`BAIDUCLOUD_ACCESS_KEY_ID="xxx"
|
||
BAIDUCLOUD_SECRET_ACCESS_KEY="yyy"`,bookmyname:`BOOKMYNAME_USERNAME="xxx"
|
||
BOOKMYNAME_PASSWORD="yyy"`,bunny:"BUNNY_API_KEY=xxxxxxxx-xxxx-xxxx",checkdomain:"CHECKDOMAIN_TOKEN=yoursecrettoken",civo:"CIVO_TOKEN=xxxxxx",cloudru:`CLOUDRU_SERVICE_INSTANCE_ID=ppp
|
||
CLOUDRU_KEY_ID=xxx
|
||
CLOUDRU_SECRET=yyy`,clouddns:`CLOUDDNS_CLIENT_ID=bLsdFAks23429841238feb177a572aX
|
||
[email protected]
|
||
CLOUDDNS_PASSWORD=b9841238feb177a84330f`,cloudflare:"CLOUDFLARE_DNS_API_TOKEN=1234567890abcdefghijklmnopqrstuvwxyz",cloudns:`CLOUDNS_AUTH_ID=xxxx
|
||
CLOUDNS_AUTH_PASSWORD=yyyy`,conoha:`CONOHA_TENANT_ID=487727e3921d44e3bfe7ebb337bf085e
|
||
CONOHA_API_USERNAME=xxxx
|
||
CONOHA_API_PASSWORD=yyyy`,constellix:`CONSTELLIX_API_KEY=xxxxxxxx-xxxx-xxxx-xxxx-xxxxx
|
||
CONSTELLIX_SECRET_KEY=xxxxxxxx-xxxx-xxxx-xxxx-xxxxx`,designate:`OS_AUTH_URL=https://openstack.example.org
|
||
OS_REGION_NAME=RegionOne
|
||
OS_PROJECT_ID=23d4522a987d4ab529f722
|
||
OS_USERNAME=myuser
|
||
OS_PASSWORD=passw0rd`,digitalocean:"DO_AUTH_TOKEN=xxxxxx",dnsmadeeasy:`DNSMADEEASY_API_KEY=xxxxxx
|
||
DNSMADEEASY_API_SECRET=yyyyy`,dnsimple:"DNSIMPLE_OAUTH_TOKEN=1234567890abcdefghijklmnopqrstuvwxyz",dode:"DODE_TOKEN=xxxxxx",dreamhost:'DREAMHOST_API_KEY="YOURAPIKEY"',duckdns:"DUCKDNS_TOKEN=xxxxxx",dyn:`DYN_CUSTOMER_NAME=xxxxxx
|
||
DYN_USER_NAME=yyyyy
|
||
DYN_PASSWORD=zzzz`,easydns:`EASYDNS_TOKEN=xxx
|
||
EASYDNS_KEY=yyy`,exoscale:`EXOSCALE_API_KEY=abcdefghijklmnopqrstuvwx
|
||
EXOSCALE_API_SECRET=xxxxxxx`,f5xc:`F5XC_API_TOKEN="xxx"
|
||
F5XC_TENANT_NAME="yyy"
|
||
F5XC_GROUP_NAME="zzz"`,gandi:"GANDI_API_KEY=abcdefghijklmnopqrstuvwx",gandiv5:"GANDIV5_PERSONAL_ACCESS_TOKEN=abcdefghijklmno",glesys:`GLESYS_API_USER=xxxxx
|
||
GLESYS_API_KEY=yyyyy`,godaddy:`GODADDY_API_KEY=xxxxxxxx
|
||
GODADDY_API_SECRET=yyyyyyyy`,googledomains:"GOOGLE_DOMAINS_ACCESS_TOKEN=xxxxxxxxxx",hetzner:"HETZNER_API_KEY=xxxxxxxx-xxxx-xxxx-xxxx",hostingde:"HOSTINGDE_API_KEY=xxxxxxxx",huaweicloud:`HUAWEICLOUD_ACCESS_KEY_ID=access-key-id
|
||
HUAWEICLOUD_SECRET_ACCESS_KEY=secret-key
|
||
HUAWEICLOUD_REGION=cn-south-1`,ibmcloud:`SOFTLAYER_USERNAME=xxxxx
|
||
SOFTLAYER_API_KEY=yyyyy`,iij:`IIJ_API_ACCESS_KEY=xxxxxxxx
|
||
IIJ_API_SECRET_KEY=yyyyyy
|
||
IIJ_DO_SERVICE_CODE=zzzzzz`,inwx:`INWX_USERNAME=xxxxxxxxxx
|
||
INWX_PASSWORD=yyyyyyyyyy
|
||
INWX_SHARED_SECRET=zzzzzzzzzz`,linode:"LINODE_TOKEN=xxxxx",liquidweb:`LWAPI_USERNAME=someuser
|
||
LWAPI_PASSWORD=somepass`,mittwald:"MITTWALD_TOKEN=my-token",mydnsjp:`MYDNSJP_MASTER_ID=xxxxx
|
||
MYDNSJP_PASSWORD=xxxxx`,mythicbeasts:`MYTHICBEASTS_USERNAME=myuser
|
||
MYTHICBEASTS_PASSWORD=mypass`,namedotcom:`NAMECOM_USERNAME=foo.bar
|
||
NAMECOM_API_TOKEN=a379a6f6eeafb9a`,namecheap:`NAMECHEAP_API_USER=user
|
||
NAMECHEAP_API_KEY=key`,nifcloud:`NIFCLOUD_ACCESS_KEY_ID=xxxx
|
||
NIFCLOUD_SECRET_ACCESS_KEY=yyyy`,ns1:"NS1_API_KEY=xxxx",oraclecloud:`OCI_PRIVKEY_FILE="~/.oci/oci_api_key.pem"
|
||
OCI_PRIVKEY_PASS="secret"
|
||
OCI_TENANCY_OCID="ocid1.tenancy.oc1..secret"
|
||
OCI_USER_OCID="ocid1.user.oc1..secret"
|
||
OCI_PUBKEY_FINGERPRINT="00:00:00:00:00:00:00"
|
||
OCI_REGION="us-phoenix-1"
|
||
OCI_COMPARTMENT_OCID="ocid1.tenancy.oc1..secret"`,ovh:`OVH_APPLICATION_KEY=1234567898765432
|
||
OVH_APPLICATION_SECRET=b9841238fe
|
||
OVH_CONSUMER_KEY=256vfsd347245sdfg
|
||
OVH_ENDPOINT=ovh-eu`,plesk:`PLESK_SERVER_BASE_URL="https://myserver.com:8443"
|
||
PLESK_USERNAME=xxxxxx
|
||
PLESK_PASSWORD=yyyyyy`,pdns:`PDNS_API_URL=http://pdns-server:80/
|
||
PDNS_API_KEY=xxxx`,rackspace:`RACKSPACE_USER=xxxx
|
||
RACKSPACE_API_KEY=yyyy`,regru:`REGRU_USERNAME=xxxxxx
|
||
REGRU_PASSWORD=yyyyyy`,rfc2136:`RFC2136_NAMESERVER=127.0.0.1
|
||
RFC2136_TSIG_KEY=example.com
|
||
RFC2136_TSIG_ALGORITHM=hmac-sha256
|
||
RFC2136_TSIG_SECRET=YWJjZGVmZGdoaWprbG1=`,sakuracloud:`SAKURACLOUD_ACCESS_TOKEN=xxxxx
|
||
SAKURACLOUD_ACCESS_TOKEN_SECRET=yyyyy`,sonic:`SONIC_USER_ID=12345
|
||
SONIC_API_KEY=4d6fbf2f9ab0fa1169`,spaceship:`SPACESHIP_API_KEY="xxxxxxxxxxxxxxxxxxxxx"
|
||
SPACESHIP_API_SECRET="xxxxxxxxxxxxxxxxxxxxx"`,stackpath:`STACKPATH_CLIENT_ID=xxxxx
|
||
STACKPATH_CLIENT_SECRET=yyyyy
|
||
STACKPATH_STACK_ID=zzzzz`,tencentcloud:`TENCENTCLOUD_SECRET_ID=abcdefghijklmnopqrstuvwx
|
||
TENCENTCLOUD_SECRET_KEY=your-secret-key`,vercel:"VERCEL_API_TOKEN=xxxxxx",volcengine:`VOLC_ACCESSKEY=xxx
|
||
VOLC_SECRETKEY=yyy`,vscale:"VSCALE_API_TOKEN=xxxxx",vultr:"VULTR_API_KEY=xxxxx",westcn:`WESTCN_USERNAME="xxx"
|
||
WESTCN_PASSWORD="yyy"`,yandex360:`YANDEX360_OAUTH_TOKEN=<your OAuth Token>
|
||
YANDEX360_ORG_ID=<your organization ID>`,yandexcloud:`YANDEX_CLOUD_IAM_TOKEN=<base64_IAM_token>
|
||
YANDEX_CLOUD_FOLDER_ID=<folder/project_id>`,yandex:"YANDEX_PDD_TOKEN=<your PDD Token>",zoneee:`ZONEEE_API_USER=xxxxx
|
||
ZONEEE_API_KEY=yyyyy`,zonomi:"ZONOMI_API_KEY=xxxxxxxxxxxxxxx"},$=V(!1),y=V(!1),R=V(!1),A=V(),T=V(!0),B=V([]),d=Ne({selectedRowKeys:[]}),C=Ne({showSizeChanger:!0,showQuickJumper:!0,pageSizeOptions:["10","20","50"],showTotal:r=>t("common.showTotal",{total:r})}),L={id:0,name:"",type:0,email:"",dns_challenge:!1,dns_provider:"",dns_credential:"",domains:[],crt:"",key:""},i=Ne({...L}),_={name:[{required:!0,message:t("common.required"),trigger:"change",transform(r){return r.trim()}}],email:[{type:"email",required:!0,message:t("common.validator"),trigger:"change",transform(r){return r.trim()}}],dns_provider:[{required:!0,message:t("common.required"),trigger:"change",transform(r){return r.trim()}}],dns_credential:[{required:!0,message:t("common.required"),trigger:"change",transform(r){return r.trim()}}],crt:[{required:!0,message:t("common.required"),trigger:"change",transform(r){return r.trim()}}],key:[{required:!0,message:t("common.required"),trigger:"change",transform(r){return r.trim()}}]},I=[{title:"ID",dataIndex:"id",width:"8%",ellipsis:!0},{title:t("common.name"),dataIndex:"name",width:"10%",ellipsis:!0},{title:t("common.typeName"),dataIndex:"type",width:"10%",align:"center",ellipsis:!0},{title:t("common.domain"),dataIndex:"domains",ellipsis:!0},{title:t("common.email"),dataIndex:"email",width:"15%",ellipsis:!0},{title:t("certs.expires"),dataIndex:"expires",width:"15%",ellipsis:!0},{title:t("common.updatedAt"),dataIndex:"updated_at",width:"15%",ellipsis:!0},{key:"action",title:t("common.setting"),width:"10%",align:"center",ellipsis:!0}],O=r=>{i.dns_credential=w[r]},P=(r,u)=>u.label.toLowerCase().indexOf(r.toLowerCase())>=0,N=r=>new Promise(u=>{const b=new FileReader;b.readAsText(r,"utf8"),b.onload=()=>{i.crt=b.result}}),K=r=>new Promise(u=>{const b=new FileReader;b.readAsText(r,"utf8"),b.onload=()=>{i.key=b.result}}),F=r=>{d.selectedRowKeys=r},j=r=>{r?(o.value=t("certs.setCert"),i.id=r.id,i.name=r.name,i.type=r.type,i.email=r.email,i.dns_challenge=r.dns_challenge,i.dns_provider=r.dns_provider,i.dns_credential=r.dns_credential,i.domains=JSON.parse(r.domains),i.crt=r.crt,i.key=r.key):(o.value=t("certs.newCert"),Object.assign(i,L)),R.value=!0},m=r=>{if(r.length===0){ae.warn(t("common.delSelected"));return}n({url:"/admin/certs",method:"delete",data:{keys:r}}).then(u=>{u.error?ae.error(u.error):(d.selectedRowKeys=[],ae.success(t("common.delOk")),f(!1))}).catch(u=>{console.log("error",u)})},f=r=>{$.value=!0,n.get("/admin/certs").then(u=>{u.error?ae.error(u.error):(c.value=u,l.value=u,r&&ae.success(t("common.refreshOk"))),$.value=!1})},v=()=>{A.value.validate().then(()=>{if(i.type===0&&i.domains.length===0){ae.warn(t("certs.moreDomains"));return}y.value=!0,n({url:"/admin/certs",method:i.id===0?"POST":"PUT",data:{id:i.id,name:i.name,type:i.type,email:i.email,dns_challenge:i.dns_challenge,dns_provider:i.dns_provider,dns_credential:i.dns_credential,domains:JSON.stringify(i.domains),crt:i.crt,key:i.key}}).then(r=>{r.error?ae.error(r.error):(ae.success(t("common.submitOk")),A.value.resetFields(),f(!1),R.value=!1),y.value=!1}).catch(r=>{y.value=!1,console.log("error",r)})}).catch(r=>{console.log("error",r)})},x=()=>{A.value.resetFields()},h=()=>{a.value!=""?c.value=l.value.filter(r=>r.name.match(a.value)||JSON.parse(r.domains).some(u=>u.match(a.value))):c.value=l.value};return be(()=>{f(!1)}),(r,u)=>{const b=en,M=Qt,q=nn,te=yn,z=je,J=ut,ne=bt,re=vn,de=_t,Z=un,Ee=Ct,we=wt,Pe=mn,Ce=xn,pe=gn,W=dn,me=It,Ie=da,xt=cn,gt=ht;return Y(),se(xe,null,[s(M,{style:{margin:"16px 0"}},{default:g(()=>[s(b,null,{default:g(()=>[H(k(r.$t("common.navigation")),1)]),_:1}),s(b,null,{default:g(()=>[H(k(r.$t("menu.certs")),1)]),_:1})]),_:1}),ce("div",fa,[s(re,{style:{"margin-bottom":"10px"}},{default:g(()=>[s(te,{flex:"200px"},{default:g(()=>[s(q,{value:a.value,"onUpdate:value":u[0]||(u[0]=S=>a.value=S),name:"search",placeholder:r.$t("common.search"),onChange:h},{addonAfter:g(()=>[s(Q(an),{style:{color:"#00b96b"}})]),_:1},8,["value","placeholder"])]),_:1}),s(te,{flex:"auto"}),s(te,{flex:"120px"},{default:g(()=>[s(J,null,{title:g(()=>[H(k(r.$t("common.new")),1)]),default:g(()=>[s(z,{type:"primary",shape:"circle",onClick:u[1]||(u[1]=S=>j())},{icon:g(()=>[s(Q(rn))]),_:1})]),_:1}),s(ne,{title:r.$t("common.delConfirm"),"ok-text":r.$t("common.ok"),"cancel-text":r.$t("common.cancel"),onConfirm:u[2]||(u[2]=S=>m(d.selectedRowKeys))},{default:g(()=>[s(z,{type:"primary",shape:"circle",style:{"margin-left":"10px"},danger:""},{icon:g(()=>[s(Q(lt))]),_:1})]),_:1},8,["title","ok-text","cancel-text"]),s(J,null,{title:g(()=>[H(k(r.$t("common.refresh")),1)]),default:g(()=>[s(z,{type:"primary",shape:"circle",style:{"margin-left":"10px"},onClick:u[3]||(u[3]=S=>f(!0))},{icon:g(()=>[s(Q(St))]),_:1})]),_:1})]),_:1})]),_:1}),s(de,{dataSource:c.value,columns:I,pagination:C,loading:$.value,rowSelection:{selectedRowKeys:d.selectedRowKeys,onChange:F},rowKey:S=>S.id},{bodyCell:g(({column:S,record:fe})=>[S.dataIndex==="type"?(Y(),se(xe,{key:0},[H(k(fe.type===0?r.$t("certs.applyCerts"):r.$t("certs.uploadCerts")),1)],64)):G("",!0),S.dataIndex==="domains"?(Y(),se(xe,{key:1},[H(k(JSON.parse(fe.domains).join(" ")),1)],64)):G("",!0),S.dataIndex==="expires"?(Y(),se(xe,{key:2},[H(k(Q(We)(fe.expires,"yyyy-MM-dd HH:mm:ss")),1)],64)):G("",!0),S.dataIndex==="updated_at"?(Y(),se(xe,{key:3},[H(k(Q(We)(fe.updated_at,"yyyy-MM-dd HH:mm:ss")),1)],64)):S.key==="action"?(Y(),se("span",va,[s(z,{type:"primary",shape:"circle",onClick:ga=>j(fe)},{icon:g(()=>[s(Q(Et))]),_:2},1032,["onClick"])])):G("",!0)]),_:1},8,["dataSource","pagination","loading","rowSelection","rowKey"]),s(gt,{open:R.value,"onUpdate:open":u[18]||(u[18]=S=>R.value=S),title:o.value,width:"560px",closable:!1},{default:g(()=>[s(xt,{layout:"vertical",ref_key:"formRef",ref:A,model:i,rules:_},{default:g(()=>[s(Z,{label:r.$t("common.name"),"has-feedback":"",name:"name"},{default:g(()=>[s(q,{value:i.name,"onUpdate:value":u[4]||(u[4]=S=>i.name=S),placeholder:""},{addonBefore:g(()=>[s(Q(pn),{style:{color:"#00b96b"}})]),_:1},8,["value"])]),_:1},8,["label"]),s(Z,{name:"type"},{default:g(()=>[s(we,{value:i.type,"onUpdate:value":u[5]||(u[5]=S=>i.type=S),style:{display:"flex","justify-content":"space-evenly"}},{default:g(()=>[s(Ee,{value:0},{default:g(()=>[H(k(r.$t("certs.applyFreeCerts")),1)]),_:1}),s(Ee,{value:1},{default:g(()=>[H(k(r.$t("certs.uploadExistingCerts")),1)]),_:1})]),_:1},8,["value"])]),_:1}),i.type===0&&!i.dns_challenge?(Y(),ee(Pe,{key:0,message:r.$t("certs.warning"),type:"warning","show-icon":"",style:{margin:"10px 0"}},{action:g(()=>[ce("a",ya,k(r.$t("common.more")),1)]),_:1},8,["message"])):G("",!0),i.type===0?(Y(),ee(Z,{key:1,label:r.$t("common.domain"),name:"domains"},{default:g(()=>[s(Ce,{value:i.domains,"onUpdate:value":u[6]||(u[6]=S=>i.domains=S),mode:"tags",placeholder:r.$t("common.domainInput"),style:{width:"100%"}},null,8,["value","placeholder"])]),_:1},8,["label"])):G("",!0),i.type===0?(Y(),ee(Z,{key:2,label:r.$t("common.email"),"has-feedback":"",name:"email"},{default:g(()=>[s(q,{value:i.email,"onUpdate:value":u[7]||(u[7]=S=>i.email=S),placeholder:""},null,8,["value"])]),_:1},8,["label"])):G("",!0),i.type===0?(Y(),ee(Z,{key:3,name:"dns_challenge"},{default:g(()=>[s(pe,{checked:i.dns_challenge,"onUpdate:checked":u[8]||(u[8]=S=>i.dns_challenge=S)},null,8,["checked"]),ce("span",null,[H(" "+k(r.$t("certs.use"))+" ",1),ce("a",xa,"DNS-01 "+k(r.$t("certs.challenge")),1)])]),_:1})):G("",!0),i.type===0&&i.dns_challenge?(Y(),ee(Z,{key:4,label:r.$t("certs.dnsProvider"),name:"dns_provider"},{default:g(()=>[s(Ce,{value:i.dns_provider,"onUpdate:value":u[9]||(u[9]=S=>i.dns_provider=S),"show-search":"",onChange:O,options:p.value,"filter-option":P},null,8,["value","options"])]),_:1},8,["label"])):G("",!0),i.type===0&&i.dns_challenge?(Y(),ee(Z,{key:5,label:r.$t("certs.dnsCredential"),name:"dns_credential"},{default:g(()=>[s(W,{value:i.dns_credential,"onUpdate:value":u[10]||(u[10]=S=>i.dns_credential=S),rows:5},null,8,["value"])]),_:1},8,["label"])):G("",!0),i.type===0?(Y(),ee(me,{key:6},{default:g(()=>[s(pe,{checked:T.value,"onUpdate:checked":u[11]||(u[11]=S=>T.value=S)},null,8,["checked"]),ce("span",null,[H(k(r.$t("certs.agree"))+" ",1),u[19]||(u[19]=ce("a",{href:"https://letsencrypt.org/repository/",target:"_blank"},"Let's Encrypt Terms of Service",-1)),H(" "+k(r.$t("certs.renewal")),1)])]),_:1})):G("",!0),i.type===1?(Y(),ee(Z,{key:7,label:r.$t("certs.cert"),name:"crt"},{default:g(()=>[s(W,{value:i.crt,"onUpdate:value":u[12]||(u[12]=S=>i.crt=S),rows:4},null,8,["value"])]),_:1},8,["label"])):G("",!0),i.type===1?(Y(),ee(me,{key:8,style:{"margin-bottom":"10px"}},{default:g(()=>[s(Ie,{"file-list":B.value,"onUpdate:fileList":u[13]||(u[13]=S=>B.value=S),"max-count":1,"before-upload":N},{default:g(()=>[s(z,null,{default:g(()=>[s(Q(Re)),H(" "+k(r.$t("certs.uploadCertBtn")),1)]),_:1})]),_:1},8,["file-list"])]),_:1})):G("",!0),i.type===1?(Y(),ee(Z,{key:9,label:r.$t("certs.key"),name:"key"},{default:g(()=>[s(W,{value:i.key,"onUpdate:value":u[14]||(u[14]=S=>i.key=S),rows:4},null,8,["value"])]),_:1},8,["label"])):G("",!0),i.type===1?(Y(),ee(me,{key:10,style:{"margin-bottom":"10px"}},{default:g(()=>[s(Ie,{"file-list":B.value,"onUpdate:fileList":u[15]||(u[15]=S=>B.value=S),"max-count":1,"before-upload":K},{default:g(()=>[s(z,null,{default:g(()=>[s(Q(Re)),H(" "+k(r.$t("certs.uploadKeyBtn")),1)]),_:1})]),_:1},8,["file-list"])]),_:1})):G("",!0),s(Z,{style:{"text-align":"center","margin-top":"42px"}},{default:g(()=>[s(z,{type:"primary",shape:"round",onClick:u[16]||(u[16]=S=>v()),loading:y.value},{icon:g(()=>[s(Q(Jt))]),default:g(()=>[H(" "+k(r.$t("common.submit")),1)]),_:1},8,["loading"]),s(z,{type:"primary",shape:"round",style:{"margin-left":"120px"},onClick:u[17]||(u[17]=S=>x())},{icon:g(()=>[s(Q(Zt))]),default:g(()=>[H(" "+k(r.$t("common.reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["open","title"])])],64)}}});export{Pa as default};
|