import{d1 as te,d2 as ne,a as g,P as re,d as Y,j as L,u as Q,$ as le,aS as oe,ax as ue,au as ie,w as se,v as S,f as ce,_ as H,a1 as K,h as I,c,s as z,ag as E,a2 as de,i as fe,a5 as ve,cf as F,V as D,d3 as pe,d4 as me,Y as he,cI as be,Q as ge,a7 as P,d5 as ye,ac as xe,aa as Ce,X as ke,cx as we,m as Ie}from"./index-5587fc83.js";import{V as Se}from"./index-9be579ff.js";function Oe(e,a){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=te(e))||a&&e&&typeof e.length=="number"){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(s){throw s},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var y=!0,x=!1,C;return{s:function(){t=t.call(e)},n:function(){var s=t.next();return y=s.done,s},e:function(s){x=!0,C=s},f:function(){try{!y&&t.return!=null&&t.return()}finally{if(x)throw C}}}}var W=1/0,Ve=17976931348623157e292;function Ue(e){if(!e)return e===0?e:0;if(e=ne(e),e===W||e===-W){var a=e<0?-1:1;return a*Ve}return e===e?e:0}function Re(e){var a=e==null?0:e.length;return a?e[a-1]:void 0}var Me=function(){return{name:String,prefixCls:String,options:{type:Array,default:function(){return[]}},disabled:Boolean,id:String}},_e=function(){return g(g({},Me()),{},{defaultValue:{type:Array},value:{type:Array},onChange:{type:Function},"onUpdate:value":{type:Function}})},Pe=function(){return{prefixCls:String,defaultChecked:{type:Boolean,default:void 0},checked:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},isGroup:{type:Boolean,default:void 0},value:re.any,name:String,id:String,indeterminate:{type:Boolean,default:void 0},type:{type:String,default:"checkbox"},autofocus:{type:Boolean,default:void 0},onChange:Function,"onUpdate:checked":Function,onClick:Function,skipGroup:{type:Boolean,default:!1}}},Fe=function(){return g(g({},Pe()),{},{indeterminate:{type:Boolean,default:!1}})},q=Symbol("CheckboxGroupContext"),Ae=["indeterminate","skipGroup","id"],Ge=["onMouseenter","onMouseleave","onInput","class","style"];const _=Y({compatConfig:{MODE:3},name:"ACheckbox",inheritAttrs:!1,__ANT_CHECKBOX:!0,props:Fe(),setup:function(a,t){var r=t.emit,o=t.attrs,y=t.slots,x=t.expose,C=L(),d=Q("checkbox",a),s=d.prefixCls,m=d.direction,u=le(q,void 0),w=Symbol("checkboxUniId");oe(function(){!a.skipGroup&&u&&u.registerValue(w,a.value)}),ue(function(){u&&u.cancelValue(w)}),ie(function(){se(a.checked!==void 0||u||a.value===void 0,"Checkbox","`value` is not validate prop, do you mean `checked`?")});var O=function(n){var l=n.target.checked;r("update:checked",l),r("change",n)},V=S(),B=function(){var n;(n=V.value)===null||n===void 0||n.focus()},A=function(){var n;(n=V.value)===null||n===void 0||n.blur()};return x({focus:B,blur:A}),function(){var b,n,l=ce((b=y.default)===null||b===void 0?void 0:b.call(y)),f=a.indeterminate,v=a.skipGroup,p=a.id,i=p===void 0?C.id.value:p,k=H(a,Ae),G=o.onMouseenter,N=o.onMouseleave;o.onInput;var M=o.class,J=o.style,Z=H(o,Ge),h=g(g({},k),{},{id:i,prefixCls:s.value},Z);u&&!v?(h.onChange=function(){for(var U=arguments.length,R=new Array(U),j=0;j0&&(v=u.value.map(function(i){var k;return c(_,{prefixCls:d.value,key:i.value.toString(),disabled:"disabled"in i?i.disabled:a.disabled,indeterminate:i.indeterminate,value:i.value,checked:m.value.indexOf(i.value)!==-1,onChange:i.onChange,class:"".concat(p,"-item")},{default:function(){return[i.label===void 0?(k=r.label)===null||k===void 0?void 0:k.call(r,i):i.label]}})})),c("div",{class:[p,I({},"".concat(p,"-rtl"),s.value==="rtl")],id:f},[v||((n=r.default)===null||n===void 0?void 0:n.call(r))])}}});_.Group=T;_.install=function(e){return e.component(_.name,_),e.component(T.name,T),e};var je={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"};const Be=je;function X(e){for(var a=1;a(await F.value.get("/files",{params:{folder_path:e}})).data,Ke=async e=>(await F.value.post("/delete_files",{file_paths:e})).data,ze=async(e,a,t)=>(await F.value.post("/move_files",{file_paths:e,dest:a,create_dest_folder:t})).data,We=async(e,a,t)=>(await F.value.post("/copy_files",{file_paths:e,dest:a,create_dest_folder:t})).data,Te=async e=>{await F.value.post("/mkdirs",{dest_folder:e})},Xe=e=>{const a=[];return e.shiftKey&&a.push("Shift"),e.ctrlKey&&a.push("Ctrl"),e.metaKey&&a.push("Cmd"),(e.code.startsWith("Key")||e.code.startsWith("Digit"))&&a.push(e.code),a.join(" + ")},Ye=e=>{const a=S("");return new Promise(t=>{D.confirm({title:P("inputFolderName"),content:()=>c(ke,{value:a.value,"onUpdate:value":r=>a.value=r},null),async onOk(){if(!a.value)return;const r=we(e,a.value);await Te(r),t()}})})},Le=()=>c("p",{style:{background:"var(--zp-secondary-background)",padding:"8px",borderLeft:"4px solid var(--primary-color)"}},[Ie("Tips: "),P("multiSelectTips")]),Qe=e=>{D.confirm({width:"80vw",title:e.name,icon:null,content:()=>c("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"}},[c("video",{style:{maxHeight:pe?"80vh":"60vh"},src:me(e),controls:!0,autoplay:!0},null),c("div",{class:"actions",style:{marginTop:"16px"}},[c(he,{onClick:()=>be([ge(e,!0)])},{icon:c(Ee,null,null),default:P("download")})])]),maskClosable:!0,wrapClassName:"hidden-antd-btns-modal"})},qe=()=>{D.confirm({title:P("confirmRebuildImageIndex"),onOk:async()=>{await ye(),xe.emit("searchIndexExpired"),Ce.success(P("rebuildComplete"))}})};export{_ as C,Le as M,He as a,Ye as b,We as c,Ke as d,Qe as e,Xe as g,Re as l,ze as m,qe as o,Ue as t};