System.register(["./public-legacy.js?v=1763625242172","./page_layout-legacy.js?v=1763625242172","./file-legacy.js?v=1763625242172","./naive-legacy.js?v=1763625242172","./vue-legacy.js?v=1763625242172","./common-legacy.js?v=1763625242172","./__commonjsHelpers__-legacy.js?v=1763625242172"],(function(e,l){"use strict";var a,t,n,i,o,s,c,d,r,u,p,v,m,f,h,x,y,g,k,b,_,C,w,P,S,j,$;return{setters:[e=>{a=e.c,t=e.d,n=e.h},e=>{i=e._,o=e.c,s=e.a9,c=e.p},e=>{d=e.b},e=>{r=e._,u=e.dc,p=e.d5,v=e.eh,m=e.aC,f=e.d9},e=>{h=e.k,x=e.P,y=e.r,g=e.X,k=e.R,b=e.S,_=e.a3,C=e.j,w=e.a4,P=e.U,S=e.V,j=e.F,$=e.O},null,null],execute:function(){var l=document.createElement("style");l.textContent=".disk-item[data-v-b9968102]:hover{background-color:var(--bt-input-path-hover-bg)}\n",document.head.appendChild(l);const z={class:"flex flex-col h-full"},I={class:"flex-1 w-0 truncate"},D={class:"flex flex-1 overflow-hidden"},E={class:"w-160px py-12px overflow-auto"},F=["onClick"],H={class:"flex-1 ml-8px"},L={class:"flex-1","b-l":"1 solid #aaa"},O=h({__name:"index",props:{data:{}},setup(e,{expose:l}){const{t:c}=x(),h=e,{path:O,checkedType:R,callback:T}=h.data,U=y([]),A=y([]),K=y(O||"/"),{table:V,columns:X}=a([{key:"checkbox",title:"",width:36,render:e=>R.includes(e.type)?g("div",{onClick:e=>{e.stopPropagation()}},[g(r,{checked:e.filename===A.value[0],onUpdateChecked:l=>{A.value=l?[e.filename]:[]}},null)]):""},{key:"filename",title:c("Component.SelectPath.index_3"),render:e=>g("div",{class:"flex"},[g("div",{class:"flex items-center flex-1 cursor-pointer",onClick:l=>{"dir"===e.type&&(l.preventDefault(),K.value+=`${"/"===K.value?"":"/"}${e.filename}`,M(),l.stopPropagation())}},[g("div",null,["dir"===e.type?g(i,{name:"base-dir",size:"16"},null):"","file"===e.type?g(i,{name:"base-file",size:"16",color:"#666"},null):""]),g("div",{class:"ml-6px flex-1 w-0"},[g(u,null,{default:()=>[e.filename]})])])])},{key:"time",title:c("Component.SelectPath.index_4"),width:146},{key:"permission",title:c("Component.SelectPath.index_5"),width:86},{key:"owner",title:c("Component.SelectPath.index_6"),width:72}]),q=e=>({onClick:()=>{if(R.includes(e.type)){const l=v(A.value,(l=>l===e.filename));A.value=-1!==l?[]:[e.filename]}},onDblclick:()=>{R.includes(e.type)&&(K.value+=`${"/"===K.value?"":"/"}${e.filename}`,M())}}),B=()=>{const e=K.value.substring(0,K.value.lastIndexOf("/"));K.value=""===e?"/":e,M()},{loading:G,setLoading:J}=t(),M=async()=>{try{J(!0),V.data=[],A.value=[];const{message:e}=await d({path:K.value});if(o(e)){const l=[],a=p(e,"DIR",[]),t=p(e,"FILES",[]);a.forEach((e=>{l.push(N(e,"dir"))})),t.forEach((e=>{l.push(N(e,"file"))})),K.value=e.PATH,V.data=l,U.value=p(e,"DISK",[])}}finally{J(!1)}},N=(e,l)=>{const a=e.split(";"),t=a[0],n=s(a[2]),i=a[3],o=a[4];return{path:("/"!==K.value?K.value+"/":"")+t,filename:t,time:n,permission:i,owner:o,type:l}};return M(),l({onConfirm:({hide:e})=>{const l=A.value.length>0?A.value[0]:"",a=("/"!==K.value?K.value+"/":"")+l,t=V.data.find((e=>e.filename===l));T?.(a,t),e()}}),(e,l)=>{const a=m,t=f,o=n;return k(),b("div",z,[g(t,{class:"items-center h-50px px-12px","b-b":"1 solid #aaa"},{default:_((()=>[g(a,{onClick:B},{default:_((()=>[C(w(e.$t("Component.SelectPath.index_1")),1)])),_:1}),P("div",I,w(e.$t("Component.SelectPath.index_2"))+": "+w(S(K)),1)])),_:1}),P("div",D,[P("div",E,[(k(!0),b(j,null,$(S(U),(e=>(k(),b("div",{key:e.path,class:"flex items-center p-8px pl-16px hover:bg-#ececec cursor-pointer transition-colors disk-item",onClick:l=>{return a=e.path,K.value=a,void M();var a}},[g(i,{name:"file-disk",size:"18",color:"#666"}),P("div",H,w(e.path)+" "+w(e.size[2]?`(${e.size[2]})`:""),1)],8,F)))),128))]),P("div",L,[g(o,{loading:S(G),"loading-num":10,bordered:!1,"virtual-scroll":!0,"max-height":456,data:S(V).data,columns:S(X),"row-props":q},null,8,["loading","data","columns"])])])])}}});e("default",c(O,[["__scopeId","data-v-b9968102"]]))}}}));
