mirror of
https://github.com/nextcloud/server.git
synced 2026-03-22 18:33:46 -04:00
2 lines
No EOL
26 KiB
JavaScript
2 lines
No EOL
26 KiB
JavaScript
(()=>{var e,t,r,n={15340(){},47790(){},51069(){},63779(){},64688(){},64755(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(71354),i=r.n(n),s=r(76314),o=r.n(s)()(i());o.push([e.id,"/*!\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */.files-list__row-status{display:flex;min-width:44px;justify-content:center;align-items:center;height:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.files-list__row-status svg{width:24px;height:24px}.files-list__row-status svg path{fill:currentColor}.files-list__row-status--error,.files-list__row-status--warning{position:absolute;display:block;top:0;inset-inline:0;bottom:0;opacity:.1;z-index:-1}.files-list__row-status--error{background:var(--color-error)}.files-list__row-status--warning{background:var(--color-warning)}","",{version:3,sources:["webpack://./apps/files_external/src/css/fileEntryStatus.scss"],names:[],mappings:"AAAA;;;EAAA,CAIA,wBACC,YAAA,CACA,cAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CACA,sBAAA,CACA,kBAAA,CACA,eAAA,CAEA,4BACC,UAAA,CACA,WAAA,CAEA,iCACC,iBAAA,CAIF,gEAEC,iBAAA,CACA,aAAA,CACA,KAAA,CACA,cAAA,CACA,QAAA,CACA,UAAA,CACA,UAAA,CAGD,+BACC,6BAAA,CAGD,iCACC,+BAAA",sourcesContent:["/*!\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n.files-list__row-status {\n\tdisplay: flex;\n\tmin-width: 44px;\n\tjustify-content: center;\n\talign-items: center;\n\theight: 100%;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\toverflow: hidden;\n\n\tsvg {\n\t\twidth: 24px;\n\t\theight: 24px;\n\n\t\tpath {\n\t\t\tfill: currentColor;\n\t\t}\n\t}\n\n\t&--error,\n\t&--warning {\n\t\tposition: absolute;\n\t\tdisplay: block;\n\t\ttop: 0;\n\t\tinset-inline: 0;\n\t\tbottom: 0;\n\t\topacity: .1;\n\t\tz-index: -1;\n\t}\n\n\t&--error {\n\t\tbackground: var(--color-error);\n\t}\n\n\t&--warning {\n\t\tbackground: var(--color-warning);\n\t}\n}\n"],sourceRoot:""}]);const a=o},66089(){},73776(){},77199(){},77965(){},78982(){},79368(){},79838(){},90183(e,t,r){"use strict";var n=r(44013),i=r(380),s=r(20005),o=r(53334),a=r(65606),l=(e=>(e.DEFAULT="default",e.HIDDEN="hidden",e))(l||{});class c{_action;constructor(e){this.validateAction(e),this._action=e}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get hotkey(){return this._action.hotkey}get order(){return this._action.order}get parent(){return this._action.parent}get default(){return this._action.default}get destructive(){return this._action.destructive}get inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(e){if(!e.id||"string"!=typeof e.id)throw new Error("Invalid id");if(!e.displayName||"function"!=typeof e.displayName)throw new Error("Invalid displayName function");if("title"in e&&"function"!=typeof e.title)throw new Error("Invalid title function");if(!e.iconSvgInline||"function"!=typeof e.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!e.exec||"function"!=typeof e.exec)throw new Error("Invalid exec function");if("enabled"in e&&"function"!=typeof e.enabled)throw new Error("Invalid enabled function");if("execBatch"in e&&"function"!=typeof e.execBatch)throw new Error("Invalid execBatch function");if("order"in e&&"number"!=typeof e.order)throw new Error("Invalid order");if(void 0!==e.destructive&&"boolean"!=typeof e.destructive)throw new Error("Invalid destructive flag");if("parent"in e&&"string"!=typeof e.parent)throw new Error("Invalid parent");if(e.default&&!Object.values(l).includes(e.default))throw new Error("Invalid default");if("inline"in e&&"function"!=typeof e.inline)throw new Error("Invalid inline function");if("renderInline"in e&&"function"!=typeof e.renderInline)throw new Error("Invalid renderInline function");if("hotkey"in e&&void 0!==e.hotkey){if("object"!=typeof e.hotkey)throw new Error("Invalid hotkey configuration");if("string"!=typeof e.hotkey.key||!e.hotkey.key)throw new Error("Missing or invalid hotkey key");if("string"!=typeof e.hotkey.description||!e.hotkey.description)throw new Error("Missing or invalid hotkey description")}}}const u=function(e){void 0===window._nc_fileactions&&(window._nc_fileactions=[],n.l.debug("FileActions initialized")),window._nc_fileactions.find(t=>t.id===e.id)?n.l.error(`FileAction ${e.id} already registered`,{action:e}):window._nc_fileactions.push(e)};var d,E,h,p;function f(){if(E)return d;E=1;const e="object"==typeof a&&a.env&&a.env.NODE_DEBUG&&/\bsemver\b/i.test(a.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return d=e}function w(){if(p)return h;p=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return h={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}var A,g,m,I,v,N,R,y,C,T,L,_,O,b={exports:{}};function S(){if(R)return N;R=1;const e=f(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=w(),{safeRe:n,t:i}=(A||(A=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=w(),s=f(),o=(t=e.exports={}).re=[],a=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let d=0;const E="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",i],[E,n]],p=(e,t,r)=>{const n=(e=>{for(const[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=d++;s(e,i,t),u[e]=i,l[i]=t,c[i]=n,o[i]=new RegExp(t,r?"g":void 0),a[i]=new RegExp(n,r?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${E}*`),p("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${E}+`),p("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),p("FULL",`^${l[u.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),p("LOOSE",`^${l[u.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),p("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),p("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?(?:${l[u.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[u.COERCE],!0),p("COERCERTLFULL",l[u.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(b,b.exports)),b.exports),s=function(){if(m)return g;m=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return g=r=>r?"object"!=typeof r?e:r:t,g}(),{compareIdentifiers:o}=function(){if(v)return I;v=1;const e=/^[0-9]+$/,t=(t,r)=>{if("number"==typeof t&&"number"==typeof r)return t===r?0:t<r?-1:1;const n=e.test(t),i=e.test(r);return n&&i&&(t=+t,r=+r),t===r?0:n&&!i?-1:i&&!n?1:t<r?-1:1};return I={compareIdentifiers:t,rcompareIdentifiers:(e,r)=>t(r,e)}}();class a{constructor(o,l){if(l=s(l),o instanceof a){if(o.loose===!!l.loose&&o.includePrerelease===!!l.includePrerelease)return o;o=o.version}else if("string"!=typeof o)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof o}".`);if(o.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",o,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const c=o.trim().match(l.loose?n[i.LOOSE]:n[i.FULL]);if(!c)throw new TypeError(`Invalid Version: ${o}`);if(this.raw=o,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<r)return t}return e}):this.prerelease=[],this.build=c[5]?c[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(e("SemVer.compare",this.version,this.options,t),!(t instanceof a)){if("string"==typeof t&&t===this.version)return 0;t=new a(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof a||(e=new a(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(t){if(t instanceof a||(t=new a(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{const n=this.prerelease[r],i=t.prerelease[r];if(e("prerelease compare",r,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return o(n,i)}while(++r)}compareBuild(t){t instanceof a||(t=new a(t,this.options));let r=0;do{const n=this.build[r],i=t.build[r];if(e("build compare",r,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return o(n,i)}while(++r)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?n[i.PRERELEASELOOSE]:n[i.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===o(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return N=a}function $(e,t,r){if(void 0!==e[t])if("array"===r){if(!Array.isArray(e[t]))throw new Error(`View ${t} must be an array`)}else{if(typeof e[t]!==r)throw new Error(`View ${t} must be a ${r}`);if("object"===r&&(null===e[t]||Array.isArray(e[t])))throw new Error(`View ${t} must be an object`)}}!function(){if(C)return y;C=1;const e=S();y=(t,r)=>new e(t,r).major}(),function(){if(O)return _;O=1;const e=function(){if(L)return T;L=1;const e=S();return T=(t,r,n=!1)=>{if(t instanceof e)return t;try{return new e(t,r)}catch(e){if(!n)return null;throw e}},T}();_=(t,r)=>{const n=e(t,r);return n?n.version:null}}(),i.m;class x{_column;constructor(e){P(e),this._column=e}get id(){return this._column.id}get title(){return this._column.title}get render(){return this._column.render}get sort(){return this._column.sort}get summary(){return this._column.summary}}function P(e){if("object"!=typeof e||null===e)throw new Error("View column must be an object");if(!e.id||"string"!=typeof e.id)throw new Error("A column id is required");if(!e.title||"string"!=typeof e.title)throw new Error("A column title is required");if(!e.render||"function"!=typeof e.render)throw new Error("A render function is required");$(e,"sort","function"),$(e,"summary","function")}function D(e){if(!e.icon||"string"!=typeof e.icon||!(0,s.A)(e.icon))throw new Error("View icon is required and must be a valid svg string");if(!e.id||"string"!=typeof e.id)throw new Error("View id is required and must be a string");if(!e.getContents||"function"!=typeof e.getContents)throw new Error("View getContents is required and must be a function");if(!e.name||"string"!=typeof e.name)throw new Error("View name is required and must be a string");if($(e,"caption","string"),$(e,"columns","array"),$(e,"defaultSortKey","string"),$(e,"emptyCaption","string"),$(e,"emptyTitle","string"),$(e,"emptyView","function"),$(e,"expanded","boolean"),$(e,"hidden","boolean"),$(e,"loadChildViews","function"),$(e,"order","number"),$(e,"params","object"),$(e,"parent","string"),$(e,"sticky","boolean"),e.columns&&(e.columns.forEach(P),e.columns.reduce((e,t)=>e.add(t.id),new Set).size!==e.columns.length))throw new Error("View columns must have unique ids")}class M extends i.m{_views=[];_currentView=null;register(e){if(this._views.find(t=>t.id===e.id))throw new Error(`IView id ${e.id} is already registered`);D(e),this._views.push(e),this.dispatchTypedEvent("update",new CustomEvent("update"))}remove(e){const t=this._views.findIndex(t=>t.id===e);-1!==t&&(this._views.splice(t,1),this.dispatchTypedEvent("update",new CustomEvent("update")))}setActive(e){if(null===e)this._currentView=null;else{const t=this._views.find(({id:t})=>t===e);if(!t)throw new Error(`No view with ${e} registered`);this._currentView=t}const t=new CustomEvent("updateActive",{detail:this._currentView});this.dispatchTypedEvent("updateActive",t)}get active(){return this._currentView}get views(){return this._views}}Error;var F,U=r(81222),k=r(19051),G=r(85168),H=r(47176),V=r(63814),j=r(98469),X=r(85471);function B(e){return!(!e.status||e.status===F.SUCCESS)&&(e.userProvided||"password::global::user"===e.authMechanism)}function q(e){if(e.type===n.F.File)return!1;const t=e.attributes;return!(!t.scope||!t.backend||"personal"!==t.scope&&"system"!==t.scope)}!function(e){e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.INDETERMINATE=2]="INDETERMINATE",e[e.INCOMPLETE_CONF=3]="INCOMPLETE_CONF",e[e.UNAUTHORIZED=4]="UNAUTHORIZED",e[e.TIMEOUT=5]="TIMEOUT",e[e.NETWORK_ERROR=6]="NETWORK_ERROR"}(F||(F={})),(0,H.IF)(k.Ay);const W=new c({id:"credentials-external-storage",displayName:()=>(0,o.t)("files","Enter missing credentials"),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-login" viewBox="0 0 24 24"><path d="M11 7L9.6 8.4L12.2 11H2V13H12.2L9.6 15.6L11 17L16 12L11 7M20 19H12V21H20C21.1 21 22 20.1 22 19V5C22 3.9 21.1 3 20 3H12V5H20V19Z" /></svg>',enabled:({nodes:e})=>{if(1!==e.length||!e[0])return!1;const t=e[0];return!!q(t)&&!!B(t.attributes?.config||{})},async exec({nodes:e}){const{login:t,password:n}=await new Promise(e=>(0,j.S)((0,X.$V)(()=>Promise.all([r.e(4208),r.e(1261)]).then(r.bind(r,11261))),{},t=>{e(t)}));if(t&&n)try{await async function(e,t,r){const n=(await k.Ay.request({method:"PUT",url:(0,V.Jv)("apps/files_external/userglobalstorages/{id}",{id:e.attributes.id}),confirmPassword:H.mH.Strict,data:{backendOptions:{user:t,password:r}}})).data;return n.status!==F.SUCCESS?((0,G.Qg)((0,o.t)("files_external","Unable to update this external storage config. {statusMessage}",{statusMessage:n?.statusMessage||""})),null):((0,G.Te)((0,o.t)("files_external","New configuration successfully saved")),X.Ay.set(e.attributes,"config",n),!0)}(e[0],t,n),(0,G.Te)((0,o.t)("files_external","Credentials successfully set"))}catch(e){(0,G.Qg)((0,o.t)("files_external","Error while setting credentials: {error}",{error:e.message}))}return null},order:-1e3,default:l.DEFAULT,inline:()=>!0});var z=r(21777);const K=`/files/${(0,z.HW)()?.uid}`;function Z(e){const t=(e.path+"/"+e.name).replace(/^\//gm,"");return new n.b({id:e.id,source:(0,V.dC)("dav"+K+"/"+t),root:K,owner:(0,z.HW)()?.uid||null,permissions:e.config.status!==F.SUCCESS?n.P.NONE:e?.permissions||n.P.READ,attributes:{displayName:t,...e}})}var Y=r(85072),J=r.n(Y),Q=r(97825),ee=r.n(Q),te=r(77659),re=r.n(te),ne=r(55056),ie=r.n(ne),se=r(10540),oe=r.n(se),ae=r(41113),le=r.n(ae),ce=r(64755),ue={};ue.styleTagTransform=le(),ue.setAttributes=ie(),ue.insert=re().bind(null,"head"),ue.domAPI=ee(),ue.insertStyleElement=oe(),J()(ce.A,ue),ce.A&&ce.A.locals&&ce.A.locals;const de=new c({id:"check-external-storage",displayName:()=>"",iconSvgInline:()=>"",enabled:({nodes:e})=>e.every(e=>!0===q(e)),exec:async()=>null,async renderInline({nodes:e}){if(1!==e.length||!e[0])return null;const t=e[0],r=document.createElement("span");r.className="files-list__row-status",r.innerHTML=(0,o.Tl)("files_external","Checking storage …");let n=null;return function(e,t=!0){const r=t?"userglobalstorages":"userstorages";return k.Ay.get((0,V.Jv)(`apps/files_external/${r}/${e}?testOnly=false`))}(t.attributes.id,"system"===t.attributes.scope).then(e=>{if(n=e.data,X.Ay.set(t.attributes,"config",n),n.status!==F.SUCCESS)throw new Error(n?.statusMessage||(0,o.Tl)("files_external","There was an error with this external storage."));r.remove()}).catch(e=>{e.response&&!n&&(0,G.I9)((0,o.Tl)("files_external","We were unable to check the external storage {basename}",{basename:t.basename})),r.innerHTML="";const i=!!n&&B(n),s=document.createElement("span");s.classList.add("files-list__row-status--"+(i?"warning":"error")),i||(r.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-alert-circle" viewBox="0 0 24 24"><path d="M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" /></svg>',r.title=e.message),r.prepend(s)}),r},order:10}),Ee=new c({id:"open-in-files-external-storage",displayName:({nodes:e})=>(e?.[0]?.attributes?.config||{status:F.INDETERMINATE}).status!==F.SUCCESS?(0,o.Tl)("files_external","Examine this faulty external storage configuration"):(0,o.Tl)("files","Open in Files"),iconSvgInline:()=>"",enabled:({view:e})=>"extstoragemounts"===e.id,async exec({nodes:e}){const t=e[0]?.attributes?.config;return t?.status!==F.SUCCESS?(window.OC.dialogs.confirm((0,o.Tl)("files_external","There was an error with this external storage. Do you want to review this mount point config in the settings page?"),(0,o.Tl)("files_external","External mount error"),e=>{if(!0===e){const e=(0,z.HW)()?.isAdmin?"admin":"user";window.location.href=(0,V.Jv)(`/settings/${e}/externalstorages`)}}),null):(window.OCP.Files.Router.goToRoute(null,{view:"files"},{dir:e[0].path}),null)},order:-1e3,default:l.HIDDEN}),he=(0,U.C)("files_external","allowUserMounting",!1);(void 0===window._nc_navigation&&(window._nc_navigation=new M,n.l.debug("Navigation service initialized")),window._nc_navigation).register(new class{_view;constructor(e){D(e),this._view=e}get id(){return this._view.id}get name(){return this._view.name}get caption(){return this._view.caption}get emptyTitle(){return this._view.emptyTitle}get emptyCaption(){return this._view.emptyCaption}get getContents(){return this._view.getContents}get hidden(){return this._view.hidden}get icon(){return this._view.icon}set icon(e){this._view.icon=e}get order(){return this._view.order}set order(e){this._view.order=e}get params(){return this._view.params}set params(e){this._view.params=e}get columns(){return this._view.columns}get emptyView(){return this._view.emptyView}get parent(){return this._view.parent}get sticky(){return this._view.sticky}get expanded(){return this._view.expanded}set expanded(e){this._view.expanded=e}get defaultSortKey(){return this._view.defaultSortKey}get loadChildViews(){return this._view.loadChildViews}}({id:"extstoragemounts",name:(0,o.Tl)("files_external","External storage"),caption:(0,o.Tl)("files_external","List of external storage."),emptyCaption:he?(0,o.Tl)("files_external","There is no external storage configured. You can configure them in your Personal settings."):(0,o.Tl)("files_external","There is no external storage configured and you don't have the permission to configure them."),emptyTitle:(0,o.Tl)("files_external","No external storage"),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder-network-outline" viewBox="0 0 24 24"><path d="M15 20C15 19.45 14.55 19 14 19H13V17H19C20.11 17 21 16.11 21 15V7C21 5.9 20.11 5 19 5H13L11 3H5C3.9 3 3 3.9 3 5V15C3 16.11 3.9 17 5 17H11V19H10C9.45 19 9 19.45 9 20H2V22H9C9 22.55 9.45 23 10 23H14C14.55 23 15 22.55 15 22H22V20H15M5 15V7H19V15H5Z" /></svg>',order:30,columns:[new x({id:"storage-type",title:(0,o.Tl)("files_external","Storage type"),render(e){const t=e.attributes?.backend||(0,o.Tl)("files_external","Unknown"),r=document.createElement("span");return r.textContent=t,r}}),new x({id:"scope",title:(0,o.Tl)("files_external","Scope"),render(e){const t=document.createElement("span");let r=(0,o.Tl)("files_external","Personal");return"system"===e.attributes?.scope&&(r=(0,o.Tl)("files_external","System")),t.textContent=r,t}})],getContents:async function(){const e=(await k.Ay.get((0,V.KT)("apps/files_external/api/v1/mounts"))).data.ocs.data.map(Z);return{folder:new n.b({id:0,source:(0,V.dC)("dav"+K),root:K,owner:(0,z.HW)()?.uid||null,permissions:n.P.READ}),contents:e}}})),u(W),u(de),u(Ee)}},i={};function s(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,s),r.loaded=!0,r.exports}s.m=n,e=[],s.O=(t,r,n,i)=>{if(!r){var o=1/0;for(u=0;u<e.length;u++){for(var[r,n,i]=e[u],a=!0,l=0;l<r.length;l++)(!1&i||o>=i)&&Object.keys(s.O).every(e=>s.O[e](r[l]))?r.splice(l--,1):(a=!1,i<o&&(o=i));if(a){e.splice(u--,1);var c=n();void 0!==c&&(t=c)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[r,n,i]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,r)=>(s.f[r](e,t),t),[])),s.u=e=>e+"-"+e+".js?v="+{594:"f5af3d132040859cb666",620:"e5d77a046303aedd05c5",1261:"e5911953e2704a8c51c4",2391:"6d29c12fea2fbb265756",2880:"803b63f847e6d68bcf0d",4325:"b597fcd1212503c968df",5862:"580b9c2e231a9169a12f",7145:"1f907ab7a1c83e8a6617",8339:"b2246be0f4c885a9d524"}[e],s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},r="nextcloud-ui-legacy:",s.l=(e,n,i,o)=>{if(t[e])t[e].push(n);else{var a,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==r+i){a=d;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",r+i),a.src=e),t[e]=[n];var E=(r,n)=>{a.onerror=a.onload=null,clearTimeout(h);var i=t[e];if(delete t[e],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach(e=>e(n)),r)return r(n)},h=setTimeout(E.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=E.bind(null,a.onerror),a.onload=E.bind(null,a.onload),l&&document.head.appendChild(a)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.j=1873,(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})(),(()=>{s.b="undefined"!=typeof document&&document.baseURI||self.location.href;var e={1873:0};s.f.j=(t,r)=>{var n=s.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise((r,i)=>n=e[t]=[r,i]);r.push(n[2]=i);var o=s.p+s.u(t),a=new Error;s.l(o,r=>{if(s.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",a.name="ChunkLoadError",a.type=i,a.request=o,n[1](a)}},"chunk-"+t,t)}},s.O.j=t=>0===e[t];var t=(t,r)=>{var n,i,[o,a,l]=r,c=0;if(o.some(t=>0!==e[t])){for(n in a)s.o(a,n)&&(s.m[n]=a[n]);if(l)var u=l(s)}for(t&&t(r);c<o.length;c++)i=o[c],s.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return s.O(u)},r=globalThis.webpackChunknextcloud_ui_legacy=globalThis.webpackChunknextcloud_ui_legacy||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),s.nc=void 0;var o=s.O(void 0,[4208],()=>s(90183));o=s.O(o)})();
|
||
//# sourceMappingURL=files_external-init.js.map?v=a5ee0fb71178e88090da
|