aboutsummaryrefslogtreecommitdiffstats
path: root/dist/files_external-init.js
blob: c915255fb8b12429e00d9f6e13bdc4e39e671e33 (plain)
1
2
(()=>{"use strict";var e,t,r,n={26436:(e,t,r)=>{var n,i=r(32981),a=r(53334),s=r(35810),o=r(56760),c=r(63814),l=r(85168),u=r(65043),d=r(85471);!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"}(n||(n={}));const E=function(e){return!(!e.status||e.status===n.SUCCESS)&&(e.userProvided||"password::global::user"===e.authMechanism)},p=function(e){if(e.type===s.pt.File)return!1;const t=e.attributes;return!(!t.scope||!t.backend||"personal"!==t.scope&&"system"!==t.scope)};(0,o.IF)(u.Ay);const f=new s.hY({id:"credentials-external-storage",displayName:()=>(0,a.Tl)("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:e=>{if(1!==e.length)return!1;const t=e[0];if(!p(t))return!1;const r=t.attributes?.config||{};return!!E(r)},async exec(e){const{login:t,password:i}=await new Promise((e=>(0,l.Ss)((0,d.$V)((()=>Promise.all([r.e(4208),r.e(4040)]).then(r.bind(r,74040)))),{},(t=>{e(t)}))));if(t&&i)try{await async function(e,t,r){const i=(await u.Ay.request({method:"PUT",url:(0,c.Jv)("apps/files_external/userglobalstorages/{id}",{id:e.attributes.id}),confirmPassword:o.mH.Strict,data:{backendOptions:{user:t,password:r}}})).data;return i.status!==n.SUCCESS?((0,l.Qg)((0,a.Tl)("files_external","Unable to update this external storage config. {statusMessage}",{statusMessage:i?.statusMessage||""})),null):((0,l.Te)((0,a.Tl)("files_external","New configuration successfully saved")),d.Ay.set(e.attributes,"config",i),!0)}(e,t,i),(0,l.Te)((0,a.Tl)("files_external","Credentials successfully set"))}catch(e){(0,l.Qg)((0,a.Tl)("files_external","Error while setting credentials: {error}",{error:e.message}))}return null},order:-1e3,default:s.m9.DEFAULT,inline:()=>!0});var m=r(85072),h=r.n(m),g=r(97825),T=r.n(g),A=r(77659),I=r.n(A),N=r(55056),w=r.n(N),_=r(10540),v=r.n(_),b=r(41113),C=r.n(b),O=r(64755),R={};R.styleTagTransform=C(),R.setAttributes=w(),R.insert=I().bind(null,"head"),R.domAPI=T(),R.insertStyleElement=v(),h()(O.A,R),O.A&&O.A.locals&&O.A.locals;var y=r(21777);const L=`/files/${(0,y.HW)()?.uid}`,S=e=>{const t=(e.path+"/"+e.name).replace(/^\//gm,"");return new s.vd({id:e.id,source:(0,c.dC)("dav"+L+"/"+t),root:L,owner:(0,y.HW)()?.uid||null,permissions:e.config.status!==n.SUCCESS?s.aX.NONE:e?.permissions||s.aX.READ,attributes:{displayName:t,...e}})},D=new s.hY({id:"check-external-storage",displayName:()=>"",iconSvgInline:()=>"",enabled:e=>e.every((e=>!0===p(e))),exec:async()=>null,async renderInline(e){const t=document.createElement("span");t.className="files-list__row-status",t.innerHTML=(0,a.Tl)("files_external","Checking storage …");let r=null;return function(e){const t=arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?"userstorages":"userglobalstorages";return u.Ay.get((0,c.Jv)(`apps/files_external/${t}/${e}?testOnly=false`))}(e.attributes.id,"system"===e.attributes.scope).then((i=>{if(r=i.data,d.Ay.set(e.attributes,"config",r),r.status!==n.SUCCESS)throw new Error(r?.statusMessage||(0,a.Tl)("files_external","There was an error with this external storage."));t.remove()})).catch((n=>{n.response&&!r&&(0,l.I9)((0,a.Tl)("files_external","We were unable to check the external storage {basename}",{basename:e.basename})),t.innerHTML="";const i=!!r&&E(r),s=document.createElement("span");s.classList.add("files-list__row-status--"+(i?"warning":"error")),i||(t.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>',t.title=n.message),t.prepend(s)})),t},order:10}),x=new s.hY({id:"open-in-files-external-storage",displayName:e=>(e?.[0]?.attributes?.config||{status:n.INDETERMINATE}).status!==n.SUCCESS?(0,a.Tl)("files_external","Examine this faulty external storage configuration"):(0,a.Tl)("files","Open in Files"),iconSvgInline:()=>"",enabled:(e,t)=>"extstoragemounts"===t.id,async exec(e){const t=e.attributes.config;return t?.status!==n.SUCCESS?(window.OC.dialogs.confirm((0,a.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,a.Tl)("files_external","External mount error"),(e=>{if(!0===e){const e=(0,y.HW)()?.isAdmin?"admin":"user";window.location.href=(0,c.Jv)(`/settings/${e}/externalstorages`)}})),null):(window.OCP.Files.Router.goToRoute(null,{view:"files"},{dir:e.path}),null)},order:-1e3,default:s.m9.HIDDEN}),F=(0,i.C)("files_external","allowUserMounting",!1);(0,s.bh)().register(new s.Ss({id:"extstoragemounts",name:(0,a.Tl)("files_external","External storage"),caption:(0,a.Tl)("files_external","List of external storage."),emptyCaption:F?(0,a.Tl)("files_external","There is no external storage configured. You can configure them in your Personal settings."):(0,a.Tl)("files_external","There is no external storage configured and you don't have the permission to configure them."),emptyTitle:(0,a.Tl)("files_external","No external storage"),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder-network" viewBox="0 0 24 24"><path d="M3,15V5A2,2 0 0,1 5,3H11L13,5H19A2,2 0 0,1 21,7V15A2,2 0 0,1 19,17H13V19H14A1,1 0 0,1 15,20H22V22H15A1,1 0 0,1 14,23H10A1,1 0 0,1 9,22H2V20H9A1,1 0 0,1 10,19H11V17H5A2,2 0 0,1 3,15Z" /></svg>',order:30,columns:[new s.VP({id:"storage-type",title:(0,a.Tl)("files_external","Storage type"),render(e){const t=e.attributes?.backend||(0,a.Tl)("files_external","Unknown"),r=document.createElement("span");return r.textContent=t,r}}),new s.VP({id:"scope",title:(0,a.Tl)("files_external","Scope"),render(e){const t=document.createElement("span");let r=(0,a.Tl)("files_external","Personal");return"system"===e.attributes?.scope&&(r=(0,a.Tl)("files_external","System")),t.textContent=r,t}})],getContents:async()=>{const e=(await u.Ay.get((0,c.KT)("apps/files_external/api/v1/mounts"))).data.ocs.data.map(S);return{folder:new s.vd({id:0,source:(0,c.dC)("dav"+L),root:L,owner:(0,y.HW)()?.uid||null,permissions:s.aX.READ}),contents:e}}})),(0,s.Gg)(f),(0,s.Gg)(D),(0,s.Gg)(x)},35810:(e,t,r)=>{r.d(t,{Al:()=>n.r,Gg:()=>E,H4:()=>n.c,KT:()=>m,Q$:()=>n.e,R3:()=>n.n,Ss:()=>D,VL:()=>n.l,VP:()=>_,aX:()=>n.P,bh:()=>w,di:()=>f,hY:()=>d,lJ:()=>n.d,m9:()=>u,nF:()=>p,pt:()=>n.F,ur:()=>I,v7:()=>T,vd:()=>n.s});var n=r(36585),i=r(87485),a=(r(43627),r(53334)),s=r(380),o=r(83141),c=r(62045).hp,l=r(65606),u=(e=>(e.DEFAULT="default",e.HIDDEN="hidden",e))(u||{});class d{_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 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(u).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")}}const E=function(e){void 0===window._nc_fileactions&&(window._nc_fileactions=[],n.o.debug("FileActions initialized")),window._nc_fileactions.find((t=>t.id===e.id))?n.o.error(`FileAction ${e.id} already registered`,{action:e}):window._nc_fileactions.push(e)};var p=(e=>(e.ReservedName="reserved name",e.Character="character",e.Extension="extension",e))(p||{});class f extends Error{constructor(e){super(`Invalid ${e.reason} '${e.segment}' in filename '${e.filename}'`,{cause:e})}get filename(){return this.cause.filename}get reason(){return this.cause.reason}get segment(){return this.cause.segment}}function m(e){const t=(0,i.F)().files,r=t.forbidden_filename_characters??window._oc_config?.forbidden_filenames_characters??["/","\\"];for(const t of r)if(e.includes(t))throw new f({segment:t,reason:"character",filename:e});if(e=e.toLocaleLowerCase(),(t.forbidden_filenames??[".htaccess"]).includes(e))throw new f({filename:e,segment:e,reason:"reserved name"});const n=e.indexOf(".",1),a=e.substring(0,-1===n?void 0:n);if((t.forbidden_filename_basenames??[]).includes(a))throw new f({filename:e,segment:a,reason:"reserved name"});const s=t.forbidden_filename_extensions??[".part",".filepart"];for(const t of s)if(e.length>t.length&&e.endsWith(t))throw new f({segment:t,reason:"extension",filename:e})}const h=["B","KB","MB","GB","TB","PB"],g=["B","KiB","MiB","GiB","TiB","PiB"];function T(e,t=!1,r=!1,n=!1){r=r&&!n,"string"==typeof e&&(e=Number(e));let i=e>0?Math.floor(Math.log(e)/Math.log(n?1e3:1024)):0;i=Math.min((r?g.length:h.length)-1,i);const s=r?g[i]:h[i];let o=(e/Math.pow(n?1e3:1024,i)).toFixed(1);return!0===t&&0===i?("0.0"!==o?"< 1 ":"0 ")+(r?g[1]:h[1]):(o=i<2?parseFloat(o).toFixed(0):parseFloat(o).toLocaleString((0,a.lO)()),o+" "+s)}function A(e){return e instanceof Date?e.toISOString():String(e)}function I(e,t={}){const r={sortingMode:"basename",sortingOrder:"asc",...t};return function(e,t,r){r=r??[];const n=(t=t??[e=>e]).map(((e,t)=>"asc"===(r[t]??"asc")?1:-1)),i=Intl.Collator([(0,a.Z0)(),(0,a.lO)()],{numeric:!0,usage:"sort"});return[...e].sort(((e,r)=>{for(const[a,s]of t.entries()){const t=i.compare(A(s(e)),A(s(r)));if(0!==t)return t*n[a]}return 0}))}(e,[...r.sortFavoritesFirst?[e=>1!==e.attributes?.favorite]:[],...r.sortFoldersFirst?[e=>"folder"!==e.type]:[],..."basename"!==r.sortingMode?[e=>e[r.sortingMode]]:[],e=>{return(t=e.displayname||e.attributes?.displayname||e.basename||"").lastIndexOf(".")>0?t.slice(0,t.lastIndexOf(".")):t;var t},e=>e.basename],[...r.sortFavoritesFirst?["asc"]:[],...r.sortFoldersFirst?["asc"]:[],..."mtime"===r.sortingMode?["asc"===r.sortingOrder?"desc":"asc"]:[],..."mtime"!==r.sortingMode&&"basename"!==r.sortingMode?[r.sortingOrder]:[],r.sortingOrder,r.sortingOrder])}class N extends s.m{_views=[];_currentView=null;register(e){if(this._views.find((t=>t.id===e.id)))throw new Error(`View id ${e.id} is already registered`);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){this._currentView=e;const t=new CustomEvent("updateActive",{detail:e});this.dispatchTypedEvent("updateActive",t)}get active(){return this._currentView}get views(){return this._views}}const w=function(){return void 0===window._nc_navigation&&(window._nc_navigation=new N,n.o.debug("Navigation service initialized")),window._nc_navigation};class _{_column;constructor(e){v(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}}const v=function(e){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");if(e.sort&&"function"!=typeof e.sort)throw new Error("Column sortFunction must be a function");if(e.summary&&"function"!=typeof e.summary)throw new Error("Column summary must be a function");return!0};function b(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C,O={};const R=b((C||(C=1,function(e){e.parser=function(e,t){return new n(e,t)},e.SAXParser=n,e.SAXStream=a,e.createStream=function(e,t){return new a(e,t)},e.MAX_BUFFER_LENGTH=65536;var t,r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function n(t,i){if(!(this instanceof n))return new n(t,i);var a=this;!function(e){for(var t=0,n=r.length;t<n;t++)e[r[t]]=""}(a),a.q=a.c="",a.bufferCheckPosition=e.MAX_BUFFER_LENGTH,a.opt=i||{},a.opt.lowercase=a.opt.lowercase||a.opt.lowercasetags,a.looseCase=a.opt.lowercase?"toLowerCase":"toUpperCase",a.tags=[],a.closed=a.closedRoot=a.sawRoot=!1,a.tag=a.error=null,a.strict=!!t,a.noscript=!(!t&&!a.opt.noscript),a.state=b.BEGIN,a.strictEntities=a.opt.strictEntities,a.ENTITIES=a.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),a.attribList=[],a.opt.xmlns&&(a.ns=Object.create(E)),void 0===a.opt.unquotedAttributeValues&&(a.opt.unquotedAttributeValues=!t),a.trackPosition=!1!==a.opt.position,a.trackPosition&&(a.position=a.line=a.column=0),O(a,"onready")}e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){}return t.prototype=e,new t}),Object.keys||(Object.keys=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t}),n.prototype={end:function(){D(this)},write:function(t){var n=this;if(this.error)throw this.error;if(n.closed)return S(n,"Cannot write after close. Assign an onready handler.");if(null===t)return D(n);"object"==typeof t&&(t=t.toString());for(var i=0,a="";a=V(t,i++),n.c=a,a;)switch(n.trackPosition&&(n.position++,"\n"===a?(n.line++,n.column=0):n.column++),n.state){case b.BEGIN:if(n.state=b.BEGIN_WHITESPACE,"\ufeff"===a)continue;G(n,a);continue;case b.BEGIN_WHITESPACE:G(n,a);continue;case b.TEXT:if(n.sawRoot&&!n.closedRoot){for(var o=i-1;a&&"<"!==a&&"&"!==a;)(a=V(t,i++))&&n.trackPosition&&(n.position++,"\n"===a?(n.line++,n.column=0):n.column++);n.textNode+=t.substring(o,i-1)}"<"!==a||n.sawRoot&&n.closedRoot&&!n.strict?(g(a)||n.sawRoot&&!n.closedRoot||x(n,"Text data outside of root node."),"&"===a?n.state=b.TEXT_ENTITY:n.textNode+=a):(n.state=b.OPEN_WAKA,n.startTagPosition=n.position);continue;case b.SCRIPT:"<"===a?n.state=b.SCRIPT_ENDING:n.script+=a;continue;case b.SCRIPT_ENDING:"/"===a?n.state=b.CLOSE_TAG:(n.script+="<"+a,n.state=b.SCRIPT);continue;case b.OPEN_WAKA:if("!"===a)n.state=b.SGML_DECL,n.sgmlDecl="";else if(g(a));else if(I(p,a))n.state=b.OPEN_TAG,n.tagName=a;else if("/"===a)n.state=b.CLOSE_TAG,n.tagName="";else if("?"===a)n.state=b.PROC_INST,n.procInstName=n.procInstBody="";else{if(x(n,"Unencoded <"),n.startTagPosition+1<n.position){var c=n.position-n.startTagPosition;a=new Array(c).join(" ")+a}n.textNode+="<"+a,n.state=b.TEXT}continue;case b.SGML_DECL:if(n.sgmlDecl+a==="--"){n.state=b.COMMENT,n.comment="",n.sgmlDecl="";continue}n.doctype&&!0!==n.doctype&&n.sgmlDecl?(n.state=b.DOCTYPE_DTD,n.doctype+="<!"+n.sgmlDecl+a,n.sgmlDecl=""):(n.sgmlDecl+a).toUpperCase()===s?(R(n,"onopencdata"),n.state=b.CDATA,n.sgmlDecl="",n.cdata=""):(n.sgmlDecl+a).toUpperCase()===l?(n.state=b.DOCTYPE,(n.doctype||n.sawRoot)&&x(n,"Inappropriately located doctype declaration"),n.doctype="",n.sgmlDecl=""):">"===a?(R(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=b.TEXT):T(a)?(n.state=b.SGML_DECL_QUOTED,n.sgmlDecl+=a):n.sgmlDecl+=a;continue;case b.SGML_DECL_QUOTED:a===n.q&&(n.state=b.SGML_DECL,n.q=""),n.sgmlDecl+=a;continue;case b.DOCTYPE:">"===a?(n.state=b.TEXT,R(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=a,"["===a?n.state=b.DOCTYPE_DTD:T(a)&&(n.state=b.DOCTYPE_QUOTED,n.q=a));continue;case b.DOCTYPE_QUOTED:n.doctype+=a,a===n.q&&(n.q="",n.state=b.DOCTYPE);continue;case b.DOCTYPE_DTD:"]"===a?(n.doctype+=a,n.state=b.DOCTYPE):"<"===a?(n.state=b.OPEN_WAKA,n.startTagPosition=n.position):T(a)?(n.doctype+=a,n.state=b.DOCTYPE_DTD_QUOTED,n.q=a):n.doctype+=a;continue;case b.DOCTYPE_DTD_QUOTED:n.doctype+=a,a===n.q&&(n.state=b.DOCTYPE_DTD,n.q="");continue;case b.COMMENT:"-"===a?n.state=b.COMMENT_ENDING:n.comment+=a;continue;case b.COMMENT_ENDING:"-"===a?(n.state=b.COMMENT_ENDED,n.comment=L(n.opt,n.comment),n.comment&&R(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+a,n.state=b.COMMENT);continue;case b.COMMENT_ENDED:">"!==a?(x(n,"Malformed comment"),n.comment+="--"+a,n.state=b.COMMENT):n.doctype&&!0!==n.doctype?n.state=b.DOCTYPE_DTD:n.state=b.TEXT;continue;case b.CDATA:"]"===a?n.state=b.CDATA_ENDING:n.cdata+=a;continue;case b.CDATA_ENDING:"]"===a?n.state=b.CDATA_ENDING_2:(n.cdata+="]"+a,n.state=b.CDATA);continue;case b.CDATA_ENDING_2:">"===a?(n.cdata&&R(n,"oncdata",n.cdata),R(n,"onclosecdata"),n.cdata="",n.state=b.TEXT):"]"===a?n.cdata+="]":(n.cdata+="]]"+a,n.state=b.CDATA);continue;case b.PROC_INST:"?"===a?n.state=b.PROC_INST_ENDING:g(a)?n.state=b.PROC_INST_BODY:n.procInstName+=a;continue;case b.PROC_INST_BODY:if(!n.procInstBody&&g(a))continue;"?"===a?n.state=b.PROC_INST_ENDING:n.procInstBody+=a;continue;case b.PROC_INST_ENDING:">"===a?(R(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=b.TEXT):(n.procInstBody+="?"+a,n.state=b.PROC_INST_BODY);continue;case b.OPEN_TAG:I(f,a)?n.tagName+=a:(F(n),">"===a?U(n):"/"===a?n.state=b.OPEN_TAG_SLASH:(g(a)||x(n,"Invalid character in tag name"),n.state=b.ATTRIB));continue;case b.OPEN_TAG_SLASH:">"===a?(U(n,!0),$(n)):(x(n,"Forward-slash in opening tag not followed by >"),n.state=b.ATTRIB);continue;case b.ATTRIB:if(g(a))continue;">"===a?U(n):"/"===a?n.state=b.OPEN_TAG_SLASH:I(p,a)?(n.attribName=a,n.attribValue="",n.state=b.ATTRIB_NAME):x(n,"Invalid attribute name");continue;case b.ATTRIB_NAME:"="===a?n.state=b.ATTRIB_VALUE:">"===a?(x(n,"Attribute without value"),n.attribValue=n.attribName,M(n),U(n)):g(a)?n.state=b.ATTRIB_NAME_SAW_WHITE:I(f,a)?n.attribName+=a:x(n,"Invalid attribute name");continue;case b.ATTRIB_NAME_SAW_WHITE:if("="===a)n.state=b.ATTRIB_VALUE;else{if(g(a))continue;x(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",R(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",">"===a?U(n):I(p,a)?(n.attribName=a,n.state=b.ATTRIB_NAME):(x(n,"Invalid attribute name"),n.state=b.ATTRIB)}continue;case b.ATTRIB_VALUE:if(g(a))continue;T(a)?(n.q=a,n.state=b.ATTRIB_VALUE_QUOTED):(n.opt.unquotedAttributeValues||S(n,"Unquoted attribute value"),n.state=b.ATTRIB_VALUE_UNQUOTED,n.attribValue=a);continue;case b.ATTRIB_VALUE_QUOTED:if(a!==n.q){"&"===a?n.state=b.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=a;continue}M(n),n.q="",n.state=b.ATTRIB_VALUE_CLOSED;continue;case b.ATTRIB_VALUE_CLOSED:g(a)?n.state=b.ATTRIB:">"===a?U(n):"/"===a?n.state=b.OPEN_TAG_SLASH:I(p,a)?(x(n,"No whitespace between attributes"),n.attribName=a,n.attribValue="",n.state=b.ATTRIB_NAME):x(n,"Invalid attribute name");continue;case b.ATTRIB_VALUE_UNQUOTED:if(!A(a)){"&"===a?n.state=b.ATTRIB_VALUE_ENTITY_U:n.attribValue+=a;continue}M(n),">"===a?U(n):n.state=b.ATTRIB;continue;case b.CLOSE_TAG:if(n.tagName)">"===a?$(n):I(f,a)?n.tagName+=a:n.script?(n.script+="</"+n.tagName,n.tagName="",n.state=b.SCRIPT):(g(a)||x(n,"Invalid tagname in closing tag"),n.state=b.CLOSE_TAG_SAW_WHITE);else{if(g(a))continue;N(p,a)?n.script?(n.script+="</"+a,n.state=b.SCRIPT):x(n,"Invalid tagname in closing tag."):n.tagName=a}continue;case b.CLOSE_TAG_SAW_WHITE:if(g(a))continue;">"===a?$(n):x(n,"Invalid characters in closing tag");continue;case b.TEXT_ENTITY:case b.ATTRIB_VALUE_ENTITY_Q:case b.ATTRIB_VALUE_ENTITY_U:var u,d;switch(n.state){case b.TEXT_ENTITY:u=b.TEXT,d="textNode";break;case b.ATTRIB_VALUE_ENTITY_Q:u=b.ATTRIB_VALUE_QUOTED,d="attribValue";break;case b.ATTRIB_VALUE_ENTITY_U:u=b.ATTRIB_VALUE_UNQUOTED,d="attribValue"}if(";"===a){var E=B(n);n.opt.unparsedEntities&&!Object.values(e.XML_ENTITIES).includes(E)?(n.entity="",n.state=u,n.write(E)):(n[d]+=E,n.entity="",n.state=u)}else I(n.entity.length?h:m,a)?n.entity+=a:(x(n,"Invalid character in entity name"),n[d]+="&"+n.entity+a,n.entity="",n.state=u);continue;default:throw new Error(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&function(t){for(var n=Math.max(e.MAX_BUFFER_LENGTH,10),i=0,a=0,s=r.length;a<s;a++){var o=t[r[a]].length;if(o>n)switch(r[a]){case"textNode":y(t);break;case"cdata":R(t,"oncdata",t.cdata),t.cdata="";break;case"script":R(t,"onscript",t.script),t.script="";break;default:S(t,"Max buffer length exceeded: "+r[a])}i=Math.max(i,o)}var c=e.MAX_BUFFER_LENGTH-i;t.bufferCheckPosition=c+t.position}(n),n},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;y(e=this),""!==e.cdata&&(R(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(R(e,"onscript",e.script),e.script="")}};try{t=require("stream").Stream}catch(e){t=function(){}}t||(t=function(){});var i=e.EVENTS.filter((function(e){return"error"!==e&&"end"!==e}));function a(e,r){if(!(this instanceof a))return new a(e,r);t.apply(this),this._parser=new n(e,r),this.writable=!0,this.readable=!0;var s=this;this._parser.onend=function(){s.emit("end")},this._parser.onerror=function(e){s.emit("error",e),s._parser.error=null},this._decoder=null,i.forEach((function(e){Object.defineProperty(s,"on"+e,{get:function(){return s._parser["on"+e]},set:function(t){if(!t)return s.removeAllListeners(e),s._parser["on"+e]=t,t;s.on(e,t)},enumerable:!0,configurable:!1})}))}a.prototype=Object.create(t.prototype,{constructor:{value:a}}),a.prototype.write=function(e){if("function"==typeof c&&"function"==typeof c.isBuffer&&c.isBuffer(e)){if(!this._decoder){var t=o.I;this._decoder=new t("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},a.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},a.prototype.on=function(e,r){var n=this;return n._parser["on"+e]||-1===i.indexOf(e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),t.prototype.on.call(n,e,r)};var s="[CDATA[",l="DOCTYPE",u="http://www.w3.org/XML/1998/namespace",d="http://www.w3.org/2000/xmlns/",E={xml:u,xmlns:d},p=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,f=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,m=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,h=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function g(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function T(e){return'"'===e||"'"===e}function A(e){return">"===e||g(e)}function I(e,t){return e.test(t)}function N(e,t){return!I(e,t)}var w,_,v,b=0;for(var C in e.STATE={BEGIN:b++,BEGIN_WHITESPACE:b++,TEXT:b++,TEXT_ENTITY:b++,OPEN_WAKA:b++,SGML_DECL:b++,SGML_DECL_QUOTED:b++,DOCTYPE:b++,DOCTYPE_QUOTED:b++,DOCTYPE_DTD:b++,DOCTYPE_DTD_QUOTED:b++,COMMENT_STARTING:b++,COMMENT:b++,COMMENT_ENDING:b++,COMMENT_ENDED:b++,CDATA:b++,CDATA_ENDING:b++,CDATA_ENDING_2:b++,PROC_INST:b++,PROC_INST_BODY:b++,PROC_INST_ENDING:b++,OPEN_TAG:b++,OPEN_TAG_SLASH:b++,ATTRIB:b++,ATTRIB_NAME:b++,ATTRIB_NAME_SAW_WHITE:b++,ATTRIB_VALUE:b++,ATTRIB_VALUE_QUOTED:b++,ATTRIB_VALUE_CLOSED:b++,ATTRIB_VALUE_UNQUOTED:b++,ATTRIB_VALUE_ENTITY_Q:b++,ATTRIB_VALUE_ENTITY_U:b++,CLOSE_TAG:b++,CLOSE_TAG_SAW_WHITE:b++,SCRIPT:b++,SCRIPT_ENDING:b++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach((function(t){var r=e.ENTITIES[t],n="number"==typeof r?String.fromCharCode(r):r;e.ENTITIES[t]=n})),e.STATE)e.STATE[e.STATE[C]]=C;function O(e,t,r){e[t]&&e[t](r)}function R(e,t,r){e.textNode&&y(e),O(e,t,r)}function y(e){e.textNode=L(e.opt,e.textNode),e.textNode&&O(e,"ontext",e.textNode),e.textNode=""}function L(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function S(e,t){return y(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,O(e,"onerror",t),e}function D(e){return e.sawRoot&&!e.closedRoot&&x(e,"Unclosed root tag"),e.state!==b.BEGIN&&e.state!==b.BEGIN_WHITESPACE&&e.state!==b.TEXT&&S(e,"Unexpected end"),y(e),e.c="",e.closed=!0,O(e,"onend"),n.call(e,e.strict,e.opt),e}function x(e,t){if("object"!=typeof e||!(e instanceof n))throw new Error("bad call to strictFail");e.strict&&S(e,t)}function F(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,r=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(r.ns=t.ns),e.attribList.length=0,R(e,"onopentagstart",r)}function P(e,t){var r=e.indexOf(":")<0?["",e]:e.split(":"),n=r[0],i=r[1];return t&&"xmlns"===e&&(n="xmlns",i=""),{prefix:n,local:i}}function M(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=P(e.attribName,!0),r=t.prefix,n=t.local;if("xmlns"===r)if("xml"===n&&e.attribValue!==u)x(e,"xml: prefix must be bound to "+u+"\nActual: "+e.attribValue);else if("xmlns"===n&&e.attribValue!==d)x(e,"xmlns: prefix must be bound to "+d+"\nActual: "+e.attribValue);else{var i=e.tag,a=e.tags[e.tags.length-1]||e;i.ns===a.ns&&(i.ns=Object.create(a.ns)),i.ns[n]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,R(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function U(e,t){if(e.opt.xmlns){var r=e.tag,n=P(e.tagName);r.prefix=n.prefix,r.local=n.local,r.uri=r.ns[n.prefix]||"",r.prefix&&!r.uri&&(x(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),r.uri=n.prefix);var i=e.tags[e.tags.length-1]||e;r.ns&&i.ns!==r.ns&&Object.keys(r.ns).forEach((function(t){R(e,"onopennamespace",{prefix:t,uri:r.ns[t]})}));for(var a=0,s=e.attribList.length;a<s;a++){var o=e.attribList[a],c=o[0],l=o[1],u=P(c,!0),d=u.prefix,E=u.local,p=""===d?"":r.ns[d]||"",f={name:c,value:l,prefix:d,local:E,uri:p};d&&"xmlns"!==d&&!p&&(x(e,"Unbound namespace prefix: "+JSON.stringify(d)),f.uri=d),e.tag.attributes[c]=f,R(e,"onattribute",f)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),R(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=b.TEXT:e.state=b.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function $(e){if(!e.tagName)return x(e,"Weird empty close tag."),e.textNode+="</>",void(e.state=b.TEXT);if(e.script){if("script"!==e.tagName)return e.script+="</"+e.tagName+">",e.tagName="",void(e.state=b.SCRIPT);R(e,"onscript",e.script),e.script=""}var t=e.tags.length,r=e.tagName;e.strict||(r=r[e.looseCase]());for(var n=r;t--&&e.tags[t].name!==n;)x(e,"Unexpected close tag");if(t<0)return x(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",void(e.state=b.TEXT);e.tagName=r;for(var i=e.tags.length;i-- >t;){var a=e.tag=e.tags.pop();e.tagName=e.tag.name,R(e,"onclosetag",e.tagName);var s={};for(var o in a.ns)s[o]=a.ns[o];var c=e.tags[e.tags.length-1]||e;e.opt.xmlns&&a.ns!==c.ns&&Object.keys(a.ns).forEach((function(t){var r=a.ns[t];R(e,"onclosenamespace",{prefix:t,uri:r})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=b.TEXT}function B(e){var t,r=e.entity,n=r.toLowerCase(),i="";return e.ENTITIES[r]?e.ENTITIES[r]:e.ENTITIES[n]?e.ENTITIES[n]:("#"===(r=n).charAt(0)&&("x"===r.charAt(1)?(r=r.slice(2),i=(t=parseInt(r,16)).toString(16)):(r=r.slice(1),i=(t=parseInt(r,10)).toString(10))),r=r.replace(/^0+/,""),isNaN(t)||i.toLowerCase()!==r?(x(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function G(e,t){"<"===t?(e.state=b.OPEN_WAKA,e.startTagPosition=e.position):g(t)||(x(e,"Non-whitespace before first tag."),e.textNode=t,e.state=b.TEXT)}function V(e,t){var r="";return t<e.length&&(r=e.charAt(t)),r}b=e.STATE,String.fromCodePoint||(w=String.fromCharCode,_=Math.floor,v=function(){var e,t,r=[],n=-1,i=arguments.length;if(!i)return"";for(var a="";++n<i;){var s=Number(arguments[n]);if(!isFinite(s)||s<0||s>1114111||_(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?r.push(s):(e=55296+((s-=65536)>>10),t=s%1024+56320,r.push(e,t)),(n+1===i||r.length>16384)&&(a+=w.apply(null,r),r.length=0)}return a},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:v,configurable:!0,writable:!0}):String.fromCodePoint=v)}(O)),O)),y={"http://www.w3.org/2000/svg":{ext:"svg",mime:"image/svg+xml"},"http://www.w3.org/1999/xhtml":{ext:"xhtml",mime:"application/xhtml+xml"},"http://www.opengis.net/kml/2.2":{ext:"kml",mime:"application/vnd.google-earth.kml+xml"},"http://www.opengis.net/gml":{ext:"gml",mime:"application/gml+xml"}},L={rss:{ext:"rss",mime:"application/rss+xml"},"score-partwise":{ext:"musicxml",mime:"application/vnd.recordare.musicxml+xml"},svg:{ext:"svg",mime:"image/svg+xml"}};class S{constructor(e){this.options=e??{},this.firstTag=!0,this.onEnd=!1,this.parser=R.parser(!0,{xmlns:!0}),this.nesting=0,this.parser.onerror=e=>{e.message.startsWith("Invalid character entity")||(this.fileType=void 0,this.onEnd=!0)},this.parser.onopentag=e=>{++this.nesting,this.firstTag&&!this.onEnd&&(this.firstTag=!1,e.uri?this.fileType=y[e.uri]:e.name&&(this.fileType=L[e.name.toLowerCase()]),this.fileType&&!this.options.fullScan&&(this.onEnd=!0))},this.parser.onclosetag=()=>{--this.nesting}}write(e){this.parser.write(e)}close(){this.parser.close(),this.onEnd=!0}isValid(){return 0===this.nesting}}class D{_view;constructor(e){x(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}}const x=function(e){if(!e.id||"string"!=typeof e.id)throw new Error("View id is required and must be a string");if(!e.name||"string"!=typeof e.name)throw new Error("View name is required and must be a string");if("caption"in e&&"string"!=typeof e.caption)throw new Error("View caption must be a string");if(!e.getContents||"function"!=typeof e.getContents)throw new Error("View getContents is required and must be a function");if("hidden"in e&&"boolean"!=typeof e.hidden)throw new Error("View hidden must be a boolean");if(!e.icon||"string"!=typeof e.icon||!function(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);if(0===(e=e.trim()).length)return!1;const t=new S;return t.write(e),t.isValid()&&"svg"===t.fileType?.ext}(e.icon))throw new Error("View icon is required and must be a valid svg string");if("order"in e&&"number"!=typeof e.order)throw new Error("View order must be a number");if(e.columns&&e.columns.forEach((e=>{if(!(e instanceof _))throw new Error("View columns must be an array of Column. Invalid column found")})),e.emptyView&&"function"!=typeof e.emptyView)throw new Error("View emptyView must be a function");if(e.parent&&"string"!=typeof e.parent)throw new Error("View parent must be a string");if("sticky"in e&&"boolean"!=typeof e.sticky)throw new Error("View sticky must be a boolean");if("expanded"in e&&"boolean"!=typeof e.expanded)throw new Error("View expanded must be a boolean");if(e.defaultSortKey&&"string"!=typeof e.defaultSortKey)throw new Error("View defaultSortKey must be a string");if(e.loadChildViews&&"function"!=typeof e.loadChildViews)throw new Error("View loadChildViews must be a function");return!0};var F,P,M,U;function $(){if(P)return F;P=1;const e="object"==typeof l&&l.env&&l.env.NODE_DEBUG&&/\bsemver\b/i.test(l.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return F=e}function B(){if(U)return M;U=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return M={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 G,V,X,H,k,j,Y,q,W,Q,z,K,Z,J={exports:{}};function ee(){if(Y)return j;Y=1;const e=$(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=B(),{safeRe:n,t:i}=(G||(G=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=B(),a=$(),s=(t=e.exports={}).re=[],o=t.safeRe=[],c=t.src=[],l=t.t={};let u=0;const d="[a-zA-Z0-9-]",E=[["\\s",1],["\\d",i],[d,n]],p=(e,t,r)=>{const n=(e=>{for(const[t,r]of E)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=u++;a(e,i,t),l[e]=i,c[i]=t,s[i]=new RegExp(t,r?"g":void 0),o[i]=new RegExp(n,r?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),p("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${d}+`),p("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),p("FULL",`^${c[l.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),p("LOOSE",`^${c[l.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),p("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),p("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",c[l.COERCE],!0),p("COERCERTLFULL",c[l.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(J,J.exports)),J.exports),a=function(){if(X)return V;X=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return V=r=>r?"object"!=typeof r?e:r:t}(),{compareIdentifiers:s}=function(){if(k)return H;k=1;const e=/^[0-9]+$/,t=(t,r)=>{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 H={compareIdentifiers:t,rcompareIdentifiers:(e,r)=>t(r,e)}}();class o{constructor(s,c){if(c=a(c),s instanceof o){if(s.loose===!!c.loose&&s.includePrerelease===!!c.includePrerelease)return s;s=s.version}else if("string"!=typeof s)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof s}".`);if(s.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",s,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;const l=s.trim().match(c.loose?n[i.LOOSE]:n[i.FULL]);if(!l)throw new TypeError(`Invalid Version: ${s}`);if(this.raw=s,this.major=+l[1],this.minor=+l[2],this.patch=+l[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");l[4]?this.prerelease=l[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=l[5]?l[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 o)){if("string"==typeof t&&t===this.version)return 0;t=new o(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof o||(e=new o(e,this.options)),s(this.major,e.major)||s(this.minor,e.minor)||s(this.patch,e.patch)}comparePre(t){if(t instanceof o||(t=new o(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 s(n,i)}while(++r)}compareBuild(t){t instanceof o||(t=new o(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 s(n,i)}while(++r)}inc(e,t,r){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"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(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");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===s(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 j=o}!function(){if(z)return Q;z=1;const e=function(){if(W)return q;W=1;const e=ee();return q=(t,r,n=!1)=>{if(t instanceof e)return t;try{return new e(t,r)}catch(e){if(!n)return null;throw e}}}();Q=(t,r)=>{const n=e(t,r);return n?n.version:null}}(),function(){if(Z)return K;Z=1;const e=ee();K=(t,r)=>new e(t,r).major}(),s.m},64755:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(71354),i=r.n(n),a=r(76314),s=r.n(a)()(i());s.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 o=s}},i={};function a(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,a),r.loaded=!0,r.exports}a.m=n,e=[],a.O=(t,r,n,i)=>{if(!r){var s=1/0;for(u=0;u<e.length;u++){r=e[u][0],n=e[u][1],i=e[u][2];for(var o=!0,c=0;c<r.length;c++)(!1&i||s>=i)&&Object.keys(a.O).every((e=>a.O[e](r[c])))?r.splice(c--,1):(o=!1,i<s&&(s=i));if(o){e.splice(u--,1);var l=n();void 0!==l&&(t=l)}}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]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,r)=>(a.f[r](e,t),t)),[])),a.u=e=>e+"-"+e+".js?v="+{640:"b2fa23a809053c6305c5",4040:"d08b5d1945040c130b7e",5771:"a4e2a98efcfb7393c5bd",5810:"f63f10359069f886ce52",7432:"bf576075b1d8131aa273"}[e],a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},r="nextcloud:",a.l=(e,n,i,s)=>{if(t[e])t[e].push(n);else{var o,c;if(void 0!==i)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==r+i){o=d;break}}o||(c=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,a.nc&&o.setAttribute("nonce",a.nc),o.setAttribute("data-webpack",r+i),o.src=e),t[e]=[n];var E=(r,n)=>{o.onerror=o.onload=null,clearTimeout(p);var i=t[e];if(delete t[e],o.parentNode&&o.parentNode.removeChild(o),i&&i.forEach((e=>e(n))),r)return r(n)},p=setTimeout(E.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=E.bind(null,o.onerror),o.onload=E.bind(null,o.onload),c&&document.head.appendChild(o)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=1873,(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.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(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{a.b=document.baseURI||self.location.href;var e={1873:0,5810:0};a.f.j=(t,r)=>{var n=a.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 s=a.p+a.u(t),o=new Error;a.l(s,(r=>{if(a.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.src;o.message="Loading chunk "+t+" failed.\n("+i+": "+s+")",o.name="ChunkLoadError",o.type=i,o.request=s,n[1](o)}}),"chunk-"+t,t)}},a.O.j=t=>0===e[t];var t=(t,r)=>{var n,i,s=r[0],o=r[1],c=r[2],l=0;if(s.some((t=>0!==e[t]))){for(n in o)a.o(o,n)&&(a.m[n]=o[n]);if(c)var u=c(a)}for(t&&t(r);l<s.length;l++)i=s[l],a.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return a.O(u)},r=self.webpackChunknextcloud=self.webpackChunknextcloud||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),a.nc=void 0;var s=a.O(void 0,[4208],(()=>a(26436)));s=a.O(s)})();
//# sourceMappingURL=files_external-init.js.map?v=80c99d0098dff8e42435