mirror of
https://github.com/aaPanel/aaPanel.git
synced 2026-09-11 03:57:40 +02:00
4 lines
18 KiB
JavaScript
4 lines
18 KiB
JavaScript
(function(){System.register([`./rolldown-runtime-legacy.js?v=1787646744133`,`./vendor-utils-legacy.js?v=1787646744133`,`./vendor-vue-legacy.js?v=1787646744133`,`./vendor-naive-legacy.js?v=1787646744133`,`./app-legacy.js?v=1787646744133`,`./app-shared-legacy.js?v=1787646744133`],function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,ee,te,y,ne,b,x,S,C,re,w,ie,ae,oe,se,ce,T,E,D,O,le,ue,k,de,A,j,M,N,fe,pe,P,F,me,I,L,R,he,z,B,V,H,ge,U,W,_e,G,K,q,J,Y,X,ve;function Z(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Q(e){if(Array.isArray(e))return e}function ye(e){if(Array.isArray(e))return Z(e)}function be(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function xe(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){be(a,r,i,o,s,`next`,e)}function s(e){be(a,r,i,o,s,`throw`,e)}o(void 0)})}}function Se(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Ce(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function we(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Te(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ee(e,t){return Q(e)||Ce(e,t)||Oe(e,t)||we()}function $(e){return ye(e)||Se(e)||Oe(e)||Te()}function De(e,t){var n,r,i,a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype),s=Object.defineProperty;return s(o,`next`,{value:c(0)}),s(o,`throw`,{value:c(1)}),s(o,`return`,{value:c(2)}),typeof Symbol==`function`&&s(o,Symbol.iterator,{value:function(){return this}}),o;function c(e){return function(t){return l([e,t])}}function l(s){if(n)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=s[0]&2?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if((i=a.trys,!(i=i.length>0&&i[i.length-1]))&&(s[0]===6||s[0]===2)){a=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(s[0]===6&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Oe(e,t){if(e){if(typeof e==`string`)return Z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(n);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Z(e,t)}}function ke(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Object]`&&!L(e)}return e({n:void 0,t:void 0}),{setters:[function(e){u=e.r},function(e){o=e.mn,E=e.yn,D=e.bn,O=e.xn,le=e.Sn,k=e.Cn,A=e.En,j=e.Dn,M=e.kn,e.fr,e.Pn,e.on,e.Ir,F=e.nn,I=e.hr,L=e.In,R=e.Ln,B=e.zn,V=e.Jn,H=e.br,ge=e.Xn,U=e.ei,W=e.Or,G=e.rr,K=e.f,q=e.ar,J=e.un,Y=e.cr,X=e.lr,ve=e.dn},function(e){_e=e.l},function(e){n=e.gt,r=e.K,i=e.q,a=e.Y,s=e.xt,c=e.St,l=e.x},function(e){T=e.zf,fe=e.Zf,me=e.yp},function(e){ue=e.Tf,de=e.Ef,pe=e.jf}],execute:function(){d=document.createElement(`style`),d.textContent=`.path-list[data-v-3fa6b1c3]{border-top:1px solid var(--color-border);border-bottom:1px solid var(--color-border);cursor:text;flex:1;display:flex;overflow:hidden}.path-list .path-item[data-v-3fa6b1c3]{white-space:nowrap;cursor:pointer;flex-shrink:0;align-items:center;height:100%;transition:background-color .3s cubic-bezier(.4,0,.2,1);display:flex}.path-list .path-item .path-dir[data-v-3fa6b1c3]{height:100%;color:var(--color-text-4);border-left:1px solid transparent;align-items:center;padding:0 6px;line-height:1;transition:border-color .3s cubic-bezier(.4,0,.2,1);display:flex}.path-list .path-item .path-arrow[data-v-3fa6b1c3]{border-left:1px solid transparent;border-right:1px solid transparent;align-items:center;height:100%;padding:0 2px;font-size:14px;transition:border-color .3s cubic-bezier(.4,0,.2,1);display:flex}.path-list .path-item .path-arrow.reversal i[data-v-3fa6b1c3]{transform:rotate(180deg)}.path-list .path-item[data-v-3fa6b1c3]:hover{background-color:var(--button-bg-hover)}.path-list .path-item:hover .path-dir[data-v-3fa6b1c3],.path-list .path-item:hover .path-arrow[data-v-3fa6b1c3]{border-left:var(--button-border-hover)}.path-list .path-item:hover .path-arrow[data-v-3fa6b1c3]{border-right:var(--button-border-hover)}.nav-btn[data-v-3fa6b1c3]{width:36px;padding:0}.n-data-table[data-v-07327c2c]{--n-border-radius:0}.n-data-table[data-v-07327c2c] .n-data-table-base-table-body .selected-row .n-data-table-td{background-color:var(--color-table-td-hover)}.folder-picker[data-v-07327c2c]{flex-direction:column;height:100%;display:flex}.folder-picker .header[data-v-07327c2c]{border-bottom:1px solid var(--color-border);flex-direction:column;gap:16px;padding:16px;display:flex}.folder-picker .header .header-content[data-v-07327c2c]{justify-content:space-between;align-items:center;gap:16px;display:flex}.folder-picker .header .navigator-wrapper[data-v-07327c2c]{flex:1;overflow:hidden}.folder-picker .header .search-wrapper[data-v-07327c2c]{flex-shrink:0;width:240px}.folder-picker .header .search-wrapper .search-icon[data-v-07327c2c]{cursor:pointer;color:var(--color-text-4);font-size:16px}.folder-picker .header .toolbar[data-v-07327c2c]{align-items:center;gap:12px;display:flex}.folder-picker .main-content[data-v-07327c2c]{flex:1;display:flex;overflow:hidden}.folder-picker .main-content .sidebar[data-v-07327c2c]{border-right:1px solid var(--color-border);flex-direction:column;width:160px;padding:12px 0;display:flex}.folder-picker .main-content .sidebar .dist-list .dist-item[data-v-07327c2c]{cursor:pointer;align-items:center;gap:8px;padding:8px 8px 8px 16px;line-height:1;transition:background-color .3s;display:flex}.folder-picker .main-content .sidebar .dist-list .dist-item[data-v-07327c2c]:hover{background-color:var(--color-bg-1)}.folder-picker .main-content .sidebar .dist-list .dist-item .disk-icon[data-v-07327c2c]{color:var(--color-text-4);font-size:18px}.folder-picker .main-content .sidebar .dist-list .dist-item .item-info[data-v-07327c2c]{flex:1;align-items:center;gap:4px;width:0;display:flex}.folder-picker .main-content .sidebar .dist-list .dist-item .item-info .name[data-v-07327c2c]{min-width:0}.folder-picker .main-content .sidebar .dist-list .dist-item .item-info .size[data-v-07327c2c]{white-space:nowrap}.folder-picker .main-content .file-list-container[data-v-07327c2c]{flex-direction:column;flex:1;display:flex;overflow:hidden}.folder-picker .main-content .file-list-container .file-table[data-v-07327c2c]{flex:1}.folder-picker .folder-picker-footer[data-v-07327c2c]{background-color:var(--modal-action-bg);border-top:1px solid var(--modal-action-top-border);border-bottom-left-radius:var(--n-border-radius);border-bottom-right-radius:var(--n-border-radius);justify-content:space-between;align-items:center;padding:10px 18px;display:flex}
|
|
/*$vite$:1*/`,document.head.appendChild(d),F(),p={class:`path-dir`},x=[`onClick`],C={class:`path-dir`},w={class:`flex-1`},z=M({__name:`navigator`,props:{path:{default:``},pathModifiers:{}},emits:R([`change`,`refresh`],[`update:path`]),setup:function(e,t){var r=t.emit,a=_e().t,l=G(e,`path`),u=q(`pathListRef`),d=H(``),f=H(0);K(u,function(e){var t=Ee(e,1)[0];t&&(f.value=t.contentRect.width)});var m=E(function(){return l.value.split(`/`).filter(Boolean).map(function(e,t){return{name:e,originalIndex:t}})}),h=function(e){return`/`.concat(m.value.slice(0,Math.max(0,e)).map(function(e){return e.name}).join(`/`))},g={rootItem:80,arrow:20,padding:12,maxText:150,char:8},_=E(function(){if(!f.value||m.value.length===0)return m.value;var e=f.value-g.rootItem,t=$(m.value).reverse(),n=[],r=!0,i=!1,a=void 0;try{for(var o=t[Symbol.iterator](),s;!(r=(s=o.next()).done);r=!0){var c=s.value,l=Math.min(c.name.length*g.char,g.maxText)+g.arrow+g.padding;if(e<l)break;n.unshift(c),e-=l}}catch(e){i=!0,a=e}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}),v=E(function(){return _.value.length<m.value.length}),ee=E(function(){var e=m.value.map(function(e){return{key:e.originalIndex,label:e.name,icon:function(){return j(`i`,{class:`i-custom:file-dir text-16px`},null)}}});return e.unshift({key:`/`,label:a(`FolderPicker.RootDir`),icon:function(){return j(`i`,{class:`i-custom:file-dir text-16px`},null)}}),e}),te=function(){l.value=h(m.value.length-1),r(`change`,l.value)},y=function(e,t){typeof e==`number`?l.value=h(e+1):e===`/`&&(l.value=`/`),r(`change`,l.value),t==null||t.stopPropagation()},ne=function(e){y(e)},b=H(!0),S=q(`inputRef`),re=function(){return xe(function(){var e;return De(this,function(t){switch(t.label){case 0:return b.value=!1,d.value=l.value,[4,B()];case 1:return t.sent(),(e=S.value)==null||e.focus(),[2]}})})()},ie=function(){b.value=!0,d.value!==l.value&&(l.value=d.value,r(`change`,d.value))},ae=function(){var e;(e=S.value)==null||e.blur()},oe=function(){r(`refresh`)};return function(e,t){var r=n,l=i,f=c,m=s;return V(),O(m,null,{default:Y(function(){return[j(r,{class:`nav-btn`,onClick:te},{default:Y(function(){return $(t[3]||(t[3]=[D(`i`,{class:`i-common-back text-14px`},null,-1)]))}),_:1}),X(D(`div`,{ref_key:`pathListRef`,ref:u,class:`path-list`,onClick:re},[j(l,{trigger:`click`,placement:`bottom-start`,options:W(ee),onSelect:ne},{default:Y(function(){return[X(D(`div`,{class:`path-item`,onClick:t[0]||(t[0]=function(e){return e.stopPropagation()})},$(t[4]||(t[4]=[D(`div`,{class:`path-dir`},[D(`i`,{class:`i-file-dir text-16px`})],-1),D(`div`,{class:`path-arrow reversal`},[D(`i`,{class:`i-common-arrow-right`})],-1)])),512),[[J,W(v)]])]}),_:1},8,[`options`]),X(D(`div`,{class:`path-item`,onClick:t[1]||(t[1]=function(e){return y(`/`,e)})},[D(`div`,p,U(W(a)(`FolderPicker.RootDir`)),1),t[5]||(t[5]=D(`div`,{class:`path-arrow`},[D(`i`,{class:`i-common-arrow-right`})],-1))],512),[[J,!W(v)]]),(V(!0),k(o,null,ge(W(_),function(e,n){return V(),k(`div`,{key:``.concat(e.name,`_`,n),class:`path-item`,onClick:function(t){return y(e.originalIndex,t)}},[D(`div`,C,U(e.name),1),t[6]||(t[6]=D(`div`,{class:`path-arrow`},[D(`i`,{class:`i-common-arrow-right`})],-1))],8,x)}),128))],512),[[J,W(b)]]),X(D(`div`,w,[j(f,{ref_key:`inputRef`,ref:S,value:W(d),"onUpdate:value":t[2]||(t[2]=function(e){return I(d)?d.value=e:null}),placeholder:W(a)(`FolderPicker.PathPlaceholder`),onBlur:ie,onKeydown:ve(ae,[`enter`])},null,8,[`value`,`placeholder`])],512),[[J,!W(b)]]),j(r,{class:`nav-btn`,onClick:oe},{default:Y(function(){return $(t[7]||(t[7]=[D(`i`,{class:`i-common-refresh text-14px`},null,-1)]))}),_:1})]}),_:1})}}}),e(`n`,he=T(z,[[`__scopeId`,`data-v-3fa6b1c3`]])),F(),f={class:`folder-picker`},b={class:`header`},S={class:`header-content`},re={class:`navigator-wrapper`},ie={class:`search-wrapper`},ae={class:`toolbar`},oe={class:`main-content`},se={class:`sidebar`},ce={class:`dist-list`},m=[`onClick`],h={class:`item-info`},g={class:`name`},_={class:`size`},v={class:`file-list-container`},ee={class:`folder-picker-footer`},te={class:`flex items-center gap-10px pl-96px`},y={class:`w-240px`},ne={class:`flex gap-10px`},P=M({__name:`index`,props:{path:{default:`/www/wwwroot`},checkedType:{default:function(){return[`dir`]}},callback:{}},emits:[`close`],setup:function(e,t){var i=t.emit,s=e,u=i,d=_e().t,p=H(null),x=H(s.path),C=H(!1),w=H(null),T=H(``),O=H([]),M=H(``),N=H([]),P=H(null),F=H(``),L=H(null),R=function(e){P.value||(P.value=e,F.value=``,N.value.unshift({filename:`__creating__`,path:``,modify_time:0,permission:``,owner:``,type:e,isCreate:!0}),B(function(){var e;(e=L.value)==null||e.focus()}))},z=function(){P.value&&N.value.shift(),P.value=null,F.value=``},G=function(){return xe(function(){var e;return De(this,function(t){switch(t.label){case 0:if(!F.value)return[2];C.value=!0,t.label=1;case 1:return t.trys.push([1,,6,7]),e=x.value===`/`?`/`:``.concat(x.value,`/`),P.value===`file`?[4,de({path:e+F.value})]:[3,3];case 2:return t.sent(),[3,5];case 3:return[4,ue({path:e+F.value})];case 4:t.sent(),t.label=5;case 5:return z(),q(),[3,7];case 6:return C.value=!1,[7];case 7:return[2]}})})()},K=E(function(){var e=T.value.split(`/`).filter(Boolean);return e.length>0?e[e.length-1]:``}),q=function(){return xe(function(){var e,t,n;return De(this,function(r){switch(r.label){case 0:C.value=!0,r.label=1;case 1:return r.trys.push([1,,3,4]),[4,pe({path:x.value,disk:!0,search:M.value})];case 2:return e=r.sent().message,me(e)&&(t=e.PATH,n=[],e.DIR.forEach(function(e){n.push(J(e,`dir`,t))}),e.FILES.forEach(function(e){n.push(J(e,`file`,t))}),N.value=n,x.value=t,s.checkedType.includes(`dir`)?T.value=t:T.value=``,e.DISK&&(O.value=e.DISK),w.value=null,B(function(){var e;(e=p.value)==null||e.scrollTo({top:0})})),[3,4];case 3:return C.value=!1,[7];case 4:return[2]}})})()},J=function(e,t,n){var r=e.split(`;`),i=r[0],a=Number(r[2]),o=r[3],s=r[4];return{path:(n===`/`?`/`:``.concat(n,`/`))+i,filename:i,modify_time:a,permission:o,owner:s,type:t}},X=function(){M.value=``,q()},Z=function(e){x.value=e,M.value=``,q()},Q=function(){B(function(){q()})},ye=function(e){if(e.isCreate)return{};var t=s.checkedType.includes(e.type),n=s.checkedType.length===1&&s.checkedType[0]===`file`;return{class:[`cursor-pointer`,w.value===e.filename?`selected-row`:``],onClick:function(){if(n&&e.type===`dir`){x.value=``.concat(x.value,`/`,e.filename).replace(`//`,`/`),M.value=``,q();return}if(t){if(w.value===e.filename){w.value=null,T.value=``;return}w.value=e.filename,T.value=e.path}},onDblclick:function(){n&&e.type===`dir`||e.type===`dir`&&(x.value=``.concat(x.value,`/`,e.filename).replace(`//`,`/`),M.value=``,q())}}},be=[{title:function(){return d(`FolderPicker.Name`)},key:`name`,colSpan:function(e){return e.isCreate?3:1},render:function(e){if(e.isCreate){var t,r;return j(`div`,{class:`flex items-center gap-16px`},[j(`div`,{class:`flex items-center gap-8px`},[j(`i`,{class:[`text-18px`,P.value===`dir`?`i-file-dir`:`i-file-file text-base`]},null),j(`div`,{class:`w-220px`},[j(c,{ref:L,value:F.value,onUpdateValue:function(e){return F.value=e},size:`small`,autofocus:!0,placeholder:d(`FolderPicker.NamePlaceholder`),onKeydown:function(e){e.key===`Enter`&&G()}},null)])]),j(`div`,{class:`flex items-center gap-8px`},[j(n,{size:`small`,type:`primary`,onClick:G},ke(t=d(`FolderPicker.Create`))?t:{default:function(){return[t]}}),j(n,{size:`small`,onClick:z},ke(r=d(`Public.Btn.Cancel`))?r:{default:function(){return[r]}})])])}return j(`div`,{class:`flex items-center gap-8px`},[j(`i`,{class:[`text-18px`,e.type===`dir`?`i-file-dir`:`i-file-file text-base`]},null),j(`div`,{class:`w-0 flex-1 leading-18px`},[j(a,null,{default:function(){return[e.filename]}})])])}},{title:function(){return d(`FolderPicker.ModifyTime`)},key:`modify_time`,width:180,render:function(e){return e.isCreate?null:fe(e.modify_time)}},{title:function(){return d(`FolderPicker.PermissionOwner`)},key:`permission`,width:150,render:function(e){return e.isCreate?null:``.concat(e.permission,` / `,e.owner)}}];q();var Se=function(){var e,t=T.value,n=t.substring(t.lastIndexOf(`/`)+1),r=N.value.find(function(e){return e.filename===n});(e=s.callback)==null||e.call(s,t,r),Ce()},Ce=function(){u(`close`)};return function(e,t){var i=l,s=r;return V(),k(`div`,f,[D(`div`,b,[D(`div`,S,[D(`div`,re,[j(he,{path:W(x),"onUpdate:path":t[0]||(t[0]=function(e){return I(x)?x.value=e:null}),onChange:X,onRefresh:Q},null,8,[`path`])]),D(`div`,ie,[j(W(c),{value:W(M),"onUpdate:value":t[1]||(t[1]=function(e){return I(M)?M.value=e:null}),clearable:``,placeholder:W(d)(`FolderPicker.SearchPlaceholder`),onKeydown:ve(Q,[`enter`]),onClear:Q},{suffix:Y(function(){return[D(`i`,{class:`i-common-search search-icon`,onClick:Q})]}),_:1},8,[`value`,`placeholder`])])]),D(`div`,ae,[j(W(n),{size:`small`,onClick:t[2]||(t[2]=function(e){return R(`file`)})},{default:Y(function(){return[A(U(W(d)(`FolderPicker.NewFile`)),1)]}),_:1}),j(W(n),{size:`small`,onClick:t[3]||(t[3]=function(e){return R(`dir`)})},{default:Y(function(){return[A(U(W(d)(`file.buttonGroup.createOptions.newDirectory`)),1)]}),_:1})])]),D(`div`,oe,[D(`div`,se,[j(i,null,{default:Y(function(){return[D(`div`,ce,[(V(!0),k(o,null,ge(W(O),function(e){return V(),k(`div`,{key:e.path,class:`dist-item`,onClick:function(t){return Z(e.path)}},[t[4]||(t[4]=D(`i`,{class:`disk-icon i-file-disk`},null,-1)),D(`div`,h,[D(`div`,g,[j(W(a),null,{default:Y(function(){return[A(U(e.path),1)]}),_:2},1024)]),D(`div`,_,` (`+U(e.size[0])+`) `,1)])],8,m)}),128))])]}),_:1})]),D(`div`,v,[j(s,{ref_key:`tableRef`,ref:p,"flex-height":``,columns:be,data:W(N),class:`file-table`,"row-props":ye,bordered:!1,"virtual-scroll":!0,loading:W(C)},null,8,[`data`,`loading`])])]),D(`div`,ee,[D(`div`,te,[W(K)?(V(),k(o,{key:0},[D(`span`,null,U(W(d)(`FolderPicker.CurrentSelection`)),1),D(`div`,y,[j(W(c),{value:W(K),readonly:``,size:`small`},null,8,[`value`])])],64)):le(``,!0)]),D(`div`,ne,[j(W(n),{class:`cancel-btn`,size:`small`,onClick:Ce},{default:Y(function(){return[A(U(W(d)(`Public.Btn.Cancel`)),1)]}),_:1}),j(W(n),{type:`primary`,size:`small`,disabled:!W(T),onClick:Se},{default:Y(function(){return[A(U(W(d)(`Public.Btn.Confirm`)),1)]}),_:1},8,[`disabled`])])])])}}}),e(`t`,u({default:function(){return N}})),N=T(P,[[`__scopeId`,`data-v-07327c2c`]])}}})})(); |