nextcloud/dist/files-init.js

2 lines
286 KiB
JavaScript
Raw Permalink Normal View History

(()=>{var e,s,t,n={9052:e=>{"use strict";var s=Object.prototype.hasOwnProperty,t="~";function n(){}function a(e,s,t){this.fn=e,this.context=s,this.once=t||!1}function i(e,s,n,i,l){if("function"!=typeof n)throw new TypeError("The listener must be a function");var r=new a(n,i||e,l),o=t?t+s:s;return e._events[o]?e._events[o].fn?e._events[o]=[e._events[o],r]:e._events[o].push(r):(e._events[o]=r,e._eventsCount++),e}function l(e,s){0==--e._eventsCount?e._events=new n:delete e._events[s]}function r(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(t=!1)),r.prototype.eventNames=function(){var e,n,a=[];if(0===this._eventsCount)return a;for(n in e=this._events)s.call(e,n)&&a.push(t?n.slice(1):n);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},r.prototype.listeners=function(e){var s=t?t+e:e,n=this._events[s];if(!n)return[];if(n.fn)return[n.fn];for(var a=0,i=n.length,l=new Array(i);a<i;a++)l[a]=n[a].fn;return l},r.prototype.listenerCount=function(e){var s=t?t+e:e,n=this._events[s];return n?n.fn?1:n.length:0},r.prototype.emit=function(e,s,n,a,i,l){var r=t?t+e:e;if(!this._events[r])return!1;var o,m,d=this._events[r],c=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),c){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,s),!0;case 3:return d.fn.call(d.context,s,n),!0;case 4:return d.fn.call(d.context,s,n,a),!0;case 5:return d.fn.call(d.context,s,n,a,i),!0;case 6:return d.fn.call(d.context,s,n,a,i,l),!0}for(m=1,o=new Array(c-1);m<c;m++)o[m-1]=arguments[m];d.fn.apply(d.context,o)}else{var g,u=d.length;for(m=0;m<u;m++)switch(d[m].once&&this.removeListener(e,d[m].fn,void 0,!0),c){case 1:d[m].fn.call(d[m].context);break;case 2:d[m].fn.call(d[m].context,s);break;case 3:d[m].fn.call(d[m].context,s,n);break;case 4:d[m].fn.call(d[m].context,s,n,a);break;default:if(!o)for(g=1,o=new Array(c-1);g<c;g++)o[g-1]=arguments[g];d[m].fn.apply(d[m].context,o)}}return!0},r.prototype.on=function(e,s,t){return i(this,e,s,t,!1)},r.prototype.once=function(e,s,t){return i(this,e,s,t,!0)},r.prototype.removeListener=function(e,s,n,a){var i=t?t+e:e;if(!this._events[i])return this;if(!s)return l(this,i),this;var r=this._events[i];if(r.fn)r.fn!==s||a&&!r.once||n&&r.context!==n||l(this,i);else{for(var o=0,m=[],d=r.length;o<d;o++)(r[o].fn!==s||a&&!r[o].once||n&&r[o].context!==n)&&m.push(r[o]);m.length?this._events[i]=1===m.length?m[0]:m:l(this,i)}return this},r.prototype.removeAllListeners=function(e){var s;return e?(s=t?t+e:e,this._events[s]&&l(this,s)):(this._events=new n,this._eventsCount=0),this},r.prototype.off=r.prototype.removeListener,r.prototype.addListener=r.prototype.on,r.prefixed=t,r.EventEmitter=r,e.exports=r},76150:(e,s,t)=>{"use strict";t.d(s,{A:()=>n});const n=(0,t(35947).YK)().setApp("files").detectUser().build()},15076:(e,s,t)=>{"use strict";var n=t(49584),a=t(61338),i=t(85168),l=t(53334),r=t(65043),o=t(76150),m=t(49264);const d=e=>e.every((e=>!0===e.attributes["is-mount-root"]&&"shared"===e.attributes["mount-type"])),c=e=>e.every((e=>!0===e.attributes["is-mount-root"]&&"external"===e.attributes["mount-type"])),g=(e,s)=>"trashbin"===s.id?(0,l.Tl)("files","Delete permanently"):(e=>{if(1===e.length)return!1;const s=e.some((e=>d([e]))),t=e.some((e=>!d([e])));return s&&t})(e)?(0,l.Tl)("files","Delete and unshare"):d(e)?1===e.length?(0,l.Tl)("files","Leave this share"):(0,l.Tl)("files","Leave these shares"):c(e)?1===e.length?(0,l.Tl)("files","Disconnect storage"):(0,l.Tl)("files","Disconnect storages"):(e=>!e.some((e=>e.type!==n.pt.File)))(e)?1===e.length?(0,l.Tl)("files","Delete file"):(0,l.Tl)("files","Delete files"):(e=>!e.some((e=>e.type!==n.pt.Folder)))(e)?1===e.length?(0,l.Tl)("files","Delete folder"):(0,l.Tl)("files","Delete folders"):(0,l.Tl)("files","Delete"),u=new m.A({concurrency:5}),f=new n.hY({id:"delete",displayName:g,iconSvgInline:e=>d(e)?'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-close" viewBox="0 0 24 24"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.5
//# sourceMappingURL=files-init.js.map?v=13f927aee68373ddd8e4