(()=>{"use strict";var e,t,r,i={4114:(e,t,r)=>{r.d(t,{u:()=>n});var i=r(65899);const n=()=>(window._nc_files_pinia||(window._nc_files_pinia=(0,i.Ey)()),window._nc_files_pinia)},9558:(e,t,r)=>{r.d(t,{A:()=>i});const i=(0,r(35947).YK)().setApp("files").detectUser().build()},16954:(e,t,r)=>{r.d(t,{hE:()=>h});var i=r(77815),n=r(36117),o=r(43627),a=r(56908),s=r(21976),c=r(4114),l=r(89761),u=r(82736),d=r(9558);const p=e=>(0,i.pO)(e);function h(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=new AbortController,r=(0,u.j)((0,c.u)());return r.query.length>=3?new n.CancelablePromise(((n,u,d)=>{d((()=>t.abort())),async function(e,t,r){let n=(0,l._)((0,c.u)()).getDirectoryByPath("files",e);if(!n){const t=(0,o.join)(i.VA,e),r=await a.S.stat(t,{details:!0});n=p(r.data)}return{folder:n,contents:await(0,s.E)(t,{dir:e,signal:r})}}(e,r.query,t.signal).then(n).catch(u)})):function(e){e=(0,o.join)(i.VA,e);const t=new AbortController,r=(0,i.aN)();return new n.CancelablePromise((async(i,n,o)=>{o((()=>t.abort()));try{const n=await a.S.getDirectoryContents(e,{details:!0,data:r,includeSelf:!0,signal:t.signal}),o=n.data[0],s=n.data.slice(1);if(o.filename!==e&&`${o.filename}/`!==e)throw d.A.debug(`Exepected "${e}" but got filename "${o.filename}" instead.`),new Error("Root node does not match requested path");i({folder:p(o),contents:s.map((e=>{try{return p(e)}catch(t){return d.A.error(`Invalid node detected '${e.basename}'`,{error:t}),null}})).filter(Boolean)})}catch(e){n(e)}}))}(e)}},21976:(e,t,r)=>{r.d(t,{E:()=>c});var i=r(21777),n=r(77815),o=r(63814),a=r(56908),s=r(9558);async function c(e,t){let{dir:r,signal:c}=t;const l=(0,i.HW)();if(!l)return[];if((e=e.trim()).length<3)return[];r&&!r.startsWith("/")&&(r=`/${r}`),s.A.debug("Searching for nodes",{query:e,dir:r});const{data:u}=await a.S.search("/",{details:!0,signal:c,data:`\n\n\t \n\t\t \n\t\t\t \n\t\t\t ${(0,n.VX)()}\n\t\t\t \n\t\t \n\t\t \n\t\t\t \n\t\t\t\t /files/${l.uid}${r||""}\n\t\t\t\t infinity\n\t\t\t \n\t\t \n\t\t \n\t\t\t \n\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t \n\t\t\t\t %${e.replace("%","")}%\n\t\t\t \n\t\t \n\t\t \n\t\n`});return c?.aborted?[]:u.results.map((e=>(0,n.pO)(e,n.VA,(0,o.$_)())))}},25682:(e,t,r)=>{r(61338),r(35810),r(53334),r(16954),r(49542),r(75399)},35810:(e,t,r)=>{r.d(t,{Al:()=>i.r,E6:()=>m,H4:()=>i.c,KT:()=>E,PY:()=>i.b,Q$:()=>i.e,R3:()=>i.n,Ss:()=>P,VL:()=>i.l,ZH:()=>i.q,a7:()=>d,aX:()=>i.P,bh:()=>A,di:()=>f,lJ:()=>i.d,m1:()=>re,nF:()=>h,pt:()=>i.F,ur:()=>w,v7:()=>v,vd:()=>i.s});var i=r(36585),n=r(87485),o=r(43627),a=r(53334),s=r(380),c=r(83141),l=r(62045).hp,u=r(65606),d=(e=>(e[e.UploadFromDevice=0]="UploadFromDevice",e[e.CreateNew=1]="CreateNew",e[e.Other=2]="Other",e))(d||{});class p{_entries=[];registerEntry(e){this.validateEntry(e),e.category=e.category??1,this._entries.push(e)}unregisterEntry(e){const t="string"==typeof e?this.getEntryIndex(e):this.getEntryIndex(e.id);-1!==t?this._entries.splice(t,1):i.o.warn("Entry not found, nothing removed",{entry:e,entries:this.getEntries()})}getEntries(e){return e?this._entries.filter((t=>"function"!=typeof t.enabled||t.enabled(e))):this._entries}getEntryIndex(e){return this._entries.findIndex((t=>t.id===e))}validateEntry(e){if(!e.id||!e.displayName||!e.iconSvgInline&&!e.iconClass||!e.handler)throw new Error("Invalid entry");if("string"!=typeof e.id||"string"!=typeof e.displayName)throw new Error("Invalid id or displayName property");if(e.iconClass&&"string"!=typeof e.iconClass||e.iconSvgInline&&"string"!=typeof e.iconSvgInline)throw new Error("Invalid icon provided");if(void 0!==e.enabled&&"function"!=typeof e.enabled)throw new Error("Invalid enabled property");if("function"!=typeof e.handler)throw new Error("Invalid handler property");if("order"in e&&"number"!=typeof e.order)throw new Error("Invalid order property");if(-1!==this.getEntryIndex(e.id))throw new Error("Duplicate entry")}}var h=(e=>(e.ReservedName="reserved name",e.Character="character",e.Extension="extension",e))(h||{});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 E(e){const t=(0,n.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 i=e.indexOf(".",1),o=e.substring(0,-1===i?void 0:i);if((t.forbidden_filename_basenames??[]).includes(o))throw new f({filename:e,segment:o,reason:"reserved name"});const a=t.forbidden_filename_extensions??[".part",".filepart"];for(const t of a)if(e.length>t.length&&e.endsWith(t))throw new f({segment:t,reason:"extension",filename:e})}function m(e,t,r){const i={suffix:e=>`(${e})`,ignoreFileExtension:!1,...r};let n=e,a=1;for(;t.includes(n);){const t=i.ignoreFileExtension?"":(0,o.extname)(e);n=`${(0,o.basename)(e,t)} ${i.suffix(a++)}${t}`}return n}const g=["B","KB","MB","GB","TB","PB"],T=["B","KiB","MiB","GiB","TiB","PiB"];function v(e,t=!1,r=!1,i=!1){r=r&&!i,"string"==typeof e&&(e=Number(e));let n=e>0?Math.floor(Math.log(e)/Math.log(i?1e3:1024)):0;n=Math.min((r?T.length:g.length)-1,n);const o=r?T[n]:g[n];let s=(e/Math.pow(i?1e3:1024,n)).toFixed(1);return!0===t&&0===n?("0.0"!==s?"< 1 ":"0 ")+(r?T[1]:g[1]):(s=n<2?parseFloat(s).toFixed(0):parseFloat(s).toLocaleString((0,a.lO)()),s+" "+o)}function N(e){return e instanceof Date?e.toISOString():String(e)}function w(e,t={}){const r={sortingMode:"basename",sortingOrder:"asc",...t};return function(e,t,r){r=r??[];const i=(t=t??[e=>e]).map(((e,t)=>"asc"===(r[t]??"asc")?1:-1)),n=Intl.Collator([(0,a.Z0)(),(0,a.lO)()],{numeric:!0,usage:"sort"});return[...e].sort(((e,r)=>{for(const[o,a]of t.entries()){const t=n.compare(N(a(e)),N(a(r)));if(0!==t)return t*i[o]}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 I 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 A=function(){return void 0===window._nc_navigation&&(window._nc_navigation=new I,i.o.debug("Navigation service initialized")),window._nc_navigation};class _{_column;constructor(e){b(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 b=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 y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var O,R={};const C=y((O||(O=1,function(e){e.parser=function(e,t){return new i(e,t)},e.SAXParser=i,e.SAXStream=o,e.createStream=function(e,t){return new o(e,t)},e.MAX_BUFFER_LENGTH=65536;var t,r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function i(t,n){if(!(this instanceof i))return new i(t,n);var o=this;!function(e){for(var t=0,i=r.length;t"===o?(R(i,"onsgmldeclaration",i.sgmlDecl),i.sgmlDecl="",i.state=b.TEXT):T(o)?(i.state=b.SGML_DECL_QUOTED,i.sgmlDecl+=o):i.sgmlDecl+=o;continue;case b.SGML_DECL_QUOTED:o===i.q&&(i.state=b.SGML_DECL,i.q=""),i.sgmlDecl+=o;continue;case b.DOCTYPE:">"===o?(i.state=b.TEXT,R(i,"ondoctype",i.doctype),i.doctype=!0):(i.doctype+=o,"["===o?i.state=b.DOCTYPE_DTD:T(o)&&(i.state=b.DOCTYPE_QUOTED,i.q=o));continue;case b.DOCTYPE_QUOTED:i.doctype+=o,o===i.q&&(i.q="",i.state=b.DOCTYPE);continue;case b.DOCTYPE_DTD:"]"===o?(i.doctype+=o,i.state=b.DOCTYPE):"<"===o?(i.state=b.OPEN_WAKA,i.startTagPosition=i.position):T(o)?(i.doctype+=o,i.state=b.DOCTYPE_DTD_QUOTED,i.q=o):i.doctype+=o;continue;case b.DOCTYPE_DTD_QUOTED:i.doctype+=o,o===i.q&&(i.state=b.DOCTYPE_DTD,i.q="");continue;case b.COMMENT:"-"===o?i.state=b.COMMENT_ENDING:i.comment+=o;continue;case b.COMMENT_ENDING:"-"===o?(i.state=b.COMMENT_ENDED,i.comment=L(i.opt,i.comment),i.comment&&R(i,"oncomment",i.comment),i.comment=""):(i.comment+="-"+o,i.state=b.COMMENT);continue;case b.COMMENT_ENDED:">"!==o?(P(i,"Malformed comment"),i.comment+="--"+o,i.state=b.COMMENT):i.doctype&&!0!==i.doctype?i.state=b.DOCTYPE_DTD:i.state=b.TEXT;continue;case b.CDATA:"]"===o?i.state=b.CDATA_ENDING:i.cdata+=o;continue;case b.CDATA_ENDING:"]"===o?i.state=b.CDATA_ENDING_2:(i.cdata+="]"+o,i.state=b.CDATA);continue;case b.CDATA_ENDING_2:">"===o?(i.cdata&&R(i,"oncdata",i.cdata),R(i,"onclosecdata"),i.cdata="",i.state=b.TEXT):"]"===o?i.cdata+="]":(i.cdata+="]]"+o,i.state=b.CDATA);continue;case b.PROC_INST:"?"===o?i.state=b.PROC_INST_ENDING:g(o)?i.state=b.PROC_INST_BODY:i.procInstName+=o;continue;case b.PROC_INST_BODY:if(!i.procInstBody&&g(o))continue;"?"===o?i.state=b.PROC_INST_ENDING:i.procInstBody+=o;continue;case b.PROC_INST_ENDING:">"===o?(R(i,"onprocessinginstruction",{name:i.procInstName,body:i.procInstBody}),i.procInstName=i.procInstBody="",i.state=b.TEXT):(i.procInstBody+="?"+o,i.state=b.PROC_INST_BODY);continue;case b.OPEN_TAG:N(f,o)?i.tagName+=o:(F(i),">"===o?B(i):"/"===o?i.state=b.OPEN_TAG_SLASH:(g(o)||P(i,"Invalid character in tag name"),i.state=b.ATTRIB));continue;case b.OPEN_TAG_SLASH:">"===o?(B(i,!0),M(i)):(P(i,"Forward-slash in opening tag not followed by >"),i.state=b.ATTRIB);continue;case b.ATTRIB:if(g(o))continue;">"===o?B(i):"/"===o?i.state=b.OPEN_TAG_SLASH:N(h,o)?(i.attribName=o,i.attribValue="",i.state=b.ATTRIB_NAME):P(i,"Invalid attribute name");continue;case b.ATTRIB_NAME:"="===o?i.state=b.ATTRIB_VALUE:">"===o?(P(i,"Attribute without value"),i.attribValue=i.attribName,$(i),B(i)):g(o)?i.state=b.ATTRIB_NAME_SAW_WHITE:N(f,o)?i.attribName+=o:P(i,"Invalid attribute name");continue;case b.ATTRIB_NAME_SAW_WHITE:if("="===o)i.state=b.ATTRIB_VALUE;else{if(g(o))continue;P(i,"Attribute without value"),i.tag.attributes[i.attribName]="",i.attribValue="",R(i,"onattribute",{name:i.attribName,value:""}),i.attribName="",">"===o?B(i):N(h,o)?(i.attribName=o,i.state=b.ATTRIB_NAME):(P(i,"Invalid attribute name"),i.state=b.ATTRIB)}continue;case b.ATTRIB_VALUE:if(g(o))continue;T(o)?(i.q=o,i.state=b.ATTRIB_VALUE_QUOTED):(i.opt.unquotedAttributeValues||D(i,"Unquoted attribute value"),i.state=b.ATTRIB_VALUE_UNQUOTED,i.attribValue=o);continue;case b.ATTRIB_VALUE_QUOTED:if(o!==i.q){"&"===o?i.state=b.ATTRIB_VALUE_ENTITY_Q:i.attribValue+=o;continue}$(i),i.q="",i.state=b.ATTRIB_VALUE_CLOSED;continue;case b.ATTRIB_VALUE_CLOSED:g(o)?i.state=b.ATTRIB:">"===o?B(i):"/"===o?i.state=b.OPEN_TAG_SLASH:N(h,o)?(P(i,"No whitespace between attributes"),i.attribName=o,i.attribValue="",i.state=b.ATTRIB_NAME):P(i,"Invalid attribute name");continue;case b.ATTRIB_VALUE_UNQUOTED:if(!v(o)){"&"===o?i.state=b.ATTRIB_VALUE_ENTITY_U:i.attribValue+=o;continue}$(i),">"===o?B(i):i.state=b.ATTRIB;continue;case b.CLOSE_TAG:if(i.tagName)">"===o?M(i):N(f,o)?i.tagName+=o:i.script?(i.script+=""+i.tagName,i.tagName="",i.state=b.SCRIPT):(g(o)||P(i,"Invalid tagname in closing tag"),i.state=b.CLOSE_TAG_SAW_WHITE);else{if(g(o))continue;w(h,o)?i.script?(i.script+=""+o,i.state=b.SCRIPT):P(i,"Invalid tagname in closing tag."):i.tagName=o}continue;case b.CLOSE_TAG_SAW_WHITE:if(g(o))continue;">"===o?M(i):P(i,"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(i.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(";"===o){var p=U(i);i.opt.unparsedEntities&&!Object.values(e.XML_ENTITIES).includes(p)?(i.entity="",i.state=u,i.write(p)):(i[d]+=p,i.entity="",i.state=u)}else N(i.entity.length?m:E,o)?i.entity+=o:(P(i,"Invalid character in entity name"),i[d]+="&"+i.entity+o,i.entity="",i.state=u);continue;default:throw new Error(i,"Unknown state: "+i.state)}return i.position>=i.bufferCheckPosition&&function(t){for(var i=Math.max(e.MAX_BUFFER_LENGTH,10),n=0,o=0,a=r.length;oi)switch(r[o]){case"textNode":C(t);break;case"cdata":R(t,"oncdata",t.cdata),t.cdata="";break;case"script":R(t,"onscript",t.script),t.script="";break;default:D(t,"Max buffer length exceeded: "+r[o])}n=Math.max(n,s)}var c=e.MAX_BUFFER_LENGTH-n;t.bufferCheckPosition=c+t.position}(i),i},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;C(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 n=e.EVENTS.filter((function(e){return"error"!==e&&"end"!==e}));function o(e,r){if(!(this instanceof o))return new o(e,r);t.apply(this),this._parser=new i(e,r),this.writable=!0,this.readable=!0;var a=this;this._parser.onend=function(){a.emit("end")},this._parser.onerror=function(e){a.emit("error",e),a._parser.error=null},this._decoder=null,n.forEach((function(e){Object.defineProperty(a,"on"+e,{get:function(){return a._parser["on"+e]},set:function(t){if(!t)return a.removeAllListeners(e),a._parser["on"+e]=t,t;a.on(e,t)},enumerable:!0,configurable:!1})}))}o.prototype=Object.create(t.prototype,{constructor:{value:o}}),o.prototype.write=function(e){if("function"==typeof l&&"function"==typeof l.isBuffer&&l.isBuffer(e)){if(!this._decoder){var t=c.I;this._decoder=new t("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},o.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},o.prototype.on=function(e,r){var i=this;return i._parser["on"+e]||-1===n.indexOf(e)||(i._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),i.emit.apply(i,t)}),t.prototype.on.call(i,e,r)};var a="[CDATA[",s="DOCTYPE",u="http://www.w3.org/XML/1998/namespace",d="http://www.w3.org/2000/xmlns/",p={xml:u,xmlns:d},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]/,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-]/,E=/[#:_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]/,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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function g(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function T(e){return'"'===e||"'"===e}function v(e){return">"===e||g(e)}function N(e,t){return e.test(t)}function w(e,t){return!N(e,t)}var I,A,_,b=0;for(var y 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],i="number"==typeof r?String.fromCharCode(r):r;e.ENTITIES[t]=i})),e.STATE)e.STATE[e.STATE[y]]=y;function O(e,t,r){e[t]&&e[t](r)}function R(e,t,r){e.textNode&&C(e),O(e,t,r)}function C(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 D(e,t){return C(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 S(e){return e.sawRoot&&!e.closedRoot&&P(e,"Unclosed root tag"),e.state!==b.BEGIN&&e.state!==b.BEGIN_WHITESPACE&&e.state!==b.TEXT&&D(e,"Unexpected end"),C(e),e.c="",e.closed=!0,O(e,"onend"),i.call(e,e.strict,e.opt),e}function P(e,t){if("object"!=typeof e||!(e instanceof i))throw new Error("bad call to strictFail");e.strict&&D(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 x(e,t){var r=e.indexOf(":")<0?["",e]:e.split(":"),i=r[0],n=r[1];return t&&"xmlns"===e&&(i="xmlns",n=""),{prefix:i,local:n}}function $(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=x(e.attribName,!0),r=t.prefix,i=t.local;if("xmlns"===r)if("xml"===i&&e.attribValue!==u)P(e,"xml: prefix must be bound to "+u+"\nActual: "+e.attribValue);else if("xmlns"===i&&e.attribValue!==d)P(e,"xmlns: prefix must be bound to "+d+"\nActual: "+e.attribValue);else{var n=e.tag,o=e.tags[e.tags.length-1]||e;n.ns===o.ns&&(n.ns=Object.create(o.ns)),n.ns[i]=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 B(e,t){if(e.opt.xmlns){var r=e.tag,i=x(e.tagName);r.prefix=i.prefix,r.local=i.local,r.uri=r.ns[i.prefix]||"",r.prefix&&!r.uri&&(P(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),r.uri=i.prefix);var n=e.tags[e.tags.length-1]||e;r.ns&&n.ns!==r.ns&&Object.keys(r.ns).forEach((function(t){R(e,"onopennamespace",{prefix:t,uri:r.ns[t]})}));for(var o=0,a=e.attribList.length;o",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 i=r;t--&&e.tags[t].name!==i;)P(e,"Unexpected close tag");if(t<0)return P(e,"Unmatched closing tag: "+e.tagName),e.textNode+=""+e.tagName+">",void(e.state=b.TEXT);e.tagName=r;for(var n=e.tags.length;n-- >t;){var o=e.tag=e.tags.pop();e.tagName=e.tag.name,R(e,"onclosetag",e.tagName);var a={};for(var s in o.ns)a[s]=o.ns[s];var c=e.tags[e.tags.length-1]||e;e.opt.xmlns&&o.ns!==c.ns&&Object.keys(o.ns).forEach((function(t){var r=o.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 U(e){var t,r=e.entity,i=r.toLowerCase(),n="";return e.ENTITIES[r]?e.ENTITIES[r]:e.ENTITIES[i]?e.ENTITIES[i]:("#"===(r=i).charAt(0)&&("x"===r.charAt(1)?(r=r.slice(2),n=(t=parseInt(r,16)).toString(16)):(r=r.slice(1),n=(t=parseInt(r,10)).toString(10))),r=r.replace(/^0+/,""),isNaN(t)||n.toLowerCase()!==r?(P(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function V(e,t){"<"===t?(e.state=b.OPEN_WAKA,e.startTagPosition=e.position):g(t)||(P(e,"Non-whitespace before first tag."),e.textNode=t,e.state=b.TEXT)}function G(e,t){var r="";return t1114111||A(a)!==a)throw RangeError("Invalid code point: "+a);a<=65535?r.push(a):(e=55296+((a-=65536)>>10),t=a%1024+56320,r.push(e,t)),(i+1===n||r.length>16384)&&(o+=I.apply(null,r),r.length=0)}return o},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:_,configurable:!0,writable:!0}):String.fromCodePoint=_)}(R)),R)),L={"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"}},D={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=C.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=L[e.uri]:e.name&&(this.fileType=D[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 P{_view;constructor(e){F(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 F=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 x,$,B,M;function U(){if($)return x;$=1;const e="object"==typeof u&&u.env&&u.env.NODE_DEBUG&&/\bsemver\b/i.test(u.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return x=e}function V(){if(M)return B;M=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return B={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,X,j,q,k,H,Y,W,K,Q,z,Z,J,ee={exports:{}};function te(){if(Y)return H;Y=1;const e=U(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=V(),{safeRe:i,t:n}=(G||(G=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:n}=V(),o=U(),a=(t=e.exports={}).re=[],s=t.safeRe=[],c=t.src=[],l=t.t={};let u=0;const d="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",n],[d,i]],h=(e,t,r)=>{const i=(e=>{for(const[t,r]of p)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),n=u++;o(e,n,t),l[e]=n,c[n]=t,a[n]=new RegExp(t,r?"g":void 0),s[n]=new RegExp(i,r?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),h("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${d}+`),h("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),h("FULL",`^${c[l.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),h("LOOSE",`^${c[l.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),h("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),h("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",c[l.COERCE],!0),h("COERCERTLFULL",c[l.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(ee,ee.exports)),ee.exports),o=function(){if(j)return X;j=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return X=r=>r?"object"!=typeof r?e:r:t}(),{compareIdentifiers:a}=function(){if(k)return q;k=1;const e=/^[0-9]+$/,t=(t,r)=>{const i=e.test(t),n=e.test(r);return i&&n&&(t=+t,r=+r),t===r?0:i&&!n?-1:n&&!i?1:tt(r,e)}}();class s{constructor(a,c){if(c=o(c),a instanceof s){if(a.loose===!!c.loose&&a.includePrerelease===!!c.includePrerelease)return a;a=a.version}else if("string"!=typeof a)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof a}".`);if(a.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",a,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;const l=a.trim().match(c.loose?i[n.LOOSE]:i[n.FULL]);if(!l)throw new TypeError(`Invalid Version: ${a}`);if(this.raw=a,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=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let i=[t,e];!1===r&&(i=[t]),0===a(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return H=s}!function(){if(z)return Q;z=1;const e=function(){if(K)return W;K=1;const e=te();return W=(t,r,i=!1)=>{if(t instanceof e)return t;try{return new e(t,r)}catch(e){if(!i)return null;throw e}}}();Q=(t,r)=>{const i=e(t,r);return i?i.version:null}}(),function(){if(J)return Z;J=1;const e=te();Z=(t,r)=>new e(t,r).major}(),s.m;const re=function(e){return(void 0===window._nc_newfilemenu&&(window._nc_newfilemenu=new p,i.o.debug("NewFileMenu initialized")),window._nc_newfilemenu).getEntries(e).sort(((e,t)=>void 0!==e.order&&void 0!==t.order&&e.order!==t.order?e.order-t.order:e.displayName.localeCompare(t.displayName,void 0,{numeric:!0,sensitivity:"base"})))}},45238:(e,t,r)=>{r.d(t,{B:()=>u});var i=r(65899),n=r(71225),o=r(35810),a=r(61338),s=r(85471),c=r(9558),l=r(89761);const u=function(){const e=(0,l._)(...arguments),t=(0,i.nY)("paths",{state:()=>({paths:{}}),getters:{getPath:e=>(t,r)=>{if(e.paths[t])return e.paths[t][r]}},actions:{addPath(e){this.paths[e.service]||s.Ay.set(this.paths,e.service,{}),s.Ay.set(this.paths[e.service],e.path,e.source)},deletePath(e,t){this.paths[e]&&s.Ay.delete(this.paths[e],t)},onCreatedNode(e){const t=(0,o.bh)()?.active?.id||"files";e.fileid?(e.type===o.pt.Folder&&this.addPath({service:t,path:e.path,source:e.source}),this.addNodeToParentChildren(e)):c.A.error("Node has no fileid",{node:e})},onDeletedNode(e){const t=(0,o.bh)()?.active?.id||"files";e.type===o.pt.Folder&&this.deletePath(t,e.path),this.deleteNodeFromParentChildren(e)},onMovedNode(e){let{node:t,oldSource:r}=e;const i=(0,o.bh)()?.active?.id||"files";if(t.type===o.pt.Folder){const e=Object.entries(this.paths[i]).find((e=>{let[,t]=e;return t===r}));e?.[0]&&this.deletePath(i,e[0]),this.addPath({service:i,path:t.path,source:t.source})}const n=new o.ZH({source:r,owner:t.owner,mime:t.mime});this.deleteNodeFromParentChildren(n),this.addNodeToParentChildren(t)},deleteNodeFromParentChildren(t){const r=(0,o.bh)()?.active?.id||"files",i=(0,n.pD)(t.source),a="/"===t.dirname?e.getRoot(r):e.getNode(i);if(a){const e=new Set(a._children??[]);return e.delete(t.source),s.Ay.set(a,"_children",[...e.values()]),void c.A.debug("Children updated",{parent:a,node:t,children:a._children})}c.A.debug("Parent path does not exists, skipping children update",{node:t})},addNodeToParentChildren(t){const r=(0,o.bh)()?.active?.id||"files",i=(0,n.pD)(t.source),a="/"===t.dirname?e.getRoot(r):e.getNode(i);if(a){const e=new Set(a._children??[]);return e.add(t.source),s.Ay.set(a,"_children",[...e.values()]),void c.A.debug("Children updated",{parent:a,node:t,children:a._children})}c.A.debug("Parent path does not exists, skipping children update",{node:t})}}})(...arguments);return t._initialized||((0,a.B1)("files:node:created",t.onCreatedNode),(0,a.B1)("files:node:deleted",t.onDeletedNode),(0,a.B1)("files:node:moved",t.onMovedNode),t._initialized=!0),t}},49542:(e,t,r)=>{var i=r(61338),n=r(35810),o=r(65899),a=r(85471),s=r(9558);(0,o.nY)("active",(()=>{const e=(0,a.KR)(),t=(0,a.KR)(),r=(0,a.KR)(),o=(0,a.KR)();function c(e){r.value&&r.value.source===e.source&&(r.value=void 0)}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;s.A.debug("Setting active view",{view:e}),o.value=e??void 0,r.value=void 0}return function(){const e=(0,n.bh)();(0,i.B1)("files:node:deleted",c),l(e.active),e.addEventListener("updateActive",(e=>{l(e.detail)}))}(),{activeAction:e,activeFolder:t,activeNode:r,activeView:o}}))},50352:e=>{e.exports=''},53775:(e,t,r)=>{r.d(t,{w:()=>i}),r(35810),r(53334),r(21777),r(77815),r(36117),r(21976),r(9558),r(82736),r(25682);const i="search"},56908:(e,t,r)=>{r.d(t,{S:()=>n,t:()=>o});var i=r(77815);const n=(0,i.KU)(),o=async e=>{const t=(0,i.aN)(),r=await n.stat(`${(0,i.ei)()}${e}`,{details:!0,data:t});return(0,i.pO)(r.data)}},75399:e=>{e.exports=''},77815:(e,t,r)=>{r.d(t,{CP:()=>i.k,KU:()=>i.c,VA:()=>i.d,VX:()=>i.j,Xn:()=>i.b,aN:()=>i.l,ei:()=>i.g,pO:()=>i.r});var i=r(36585)},82736:(e,t,r)=>{r.d(t,{j:()=>u});var i=r(61338),n=r(17334),o=r.n(n),a=r(65899),s=r(85471),c=r(53775),l=r(9558);const u=(0,a.nY)("search",(()=>{const e=(0,s.KR)(""),t=(0,s.KR)("filter");(0,s.wB)(t,n),(0,s.wB)(e,((e,t)=>{e.trim()!==t.trim()&&n()})),function(){(0,i.B1)("files:navigation:changed",a);const r=window.OCP.Files.Router;r.params.view===c.w&&(e.value=[r.query.query].flat()[0]??"",e.value?(t.value="globally",l.A.debug("Directly navigated to search view",{query:e.value})):(l.A.info("Directly navigated to search view without any query, redirect to files view."),r.goToRoute(void 0,{...r.params,view:"files"},{...r.query,query:void 0},!0)))}();const r=o()((t=>{window.OCP.Files.Router.goToRoute(void 0,{view:c.w},{query:e.value},t)}));function n(){(0,i.Ic)("files:search:updated",{query:e.value,scope:t.value});const n=window.OCP.Files.Router;if(n.params.view===c.w&&(""===e.value||"filter"===t.value))return t.value="filter",n.goToRoute(void 0,{view:"files"},{...n.query,query:void 0});if("filter"===t.value||!e.value)return;const o=n.params.view===c.w;l.A.debug("Update route for updated search query",{query:e.value,isSearch:o}),r(o)}function a(r){r.id!==c.w&&(e.value="",t.value="filter")}return{query:e,scope:t}}))},88732:(e,t,r)=>{var i=r(61338),n=r(35810),o=r(32981),a=r(77815),s=r(53334),c=r(50352),l=r(85471);const u='';var d=r(16954),p=r(36117),h=r(56908);const f=(0,r(35947).YK)().setApp("files_sharing").detectUser().build();var E=r(63814),m=r(82490),g=r(40173);const T=(0,o.C)("files_sharing","view"),v=(0,o.C)("files_sharing","sharingToken");l.Ay.use(g.Ay);const N=g.Ay.prototype.push;g.Ay.prototype.push=function(){for(var e=arguments.length,t=new Array(e),r=0;r1?N.call(this,...t):N.call(this,t[0]).catch(I)};const w=g.Ay.prototype.replace;function I(e){if(!(0,g.Pq)(e,g.$c.duplicated))throw e;f.debug("Ignoring duplicated navigation from vue-router",{error:e})}g.Ay.prototype.replace=function(){for(var e=arguments.length,t=new Array(e),r=0;r1?w.call(this,...t):w.call(this,t[0]).catch(I)};const A=new g.Ay({mode:"history",base:(0,E.Jv)("/s"),linkActiveClass:"active",routes:[{path:"/",redirect:{name:"filelist",params:{view:T,token:v}}},{path:"/:token",name:"filelist",props:!0}],stringifyQuery(e){const t=m.A.stringify(e).replace(/%2F/gim,"/");return t?"?"+t:""}});(()=>{const e=(0,o.C)("files_sharing","filename");let t,i;const u=new n.Ss({id:"public-file-drop",name:(0,s.Tl)("files_sharing","File drop"),caption:(0,s.Tl)("files_sharing","Upload files to {foldername}",{foldername:e}),icon:c,order:1,emptyView:async n=>{if(void 0===t){const{default:e}=await Promise.all([r.e(4208),r.e(4309)]).then(r.bind(r,14309));t=l.Ay.extend(e)}i&&i.$destroy(),i=new t({propsData:{foldername:e}}),i.$mount(n)},getContents:async()=>({contents:[],folder:new n.vd({id:0,source:`${a.Xn}${a.VA}`,root:a.VA,owner:null,permissions:n.aX.CREATE})})});(0,n.bh)().register(u)})(),(()=>{const e=new n.Ss({id:"public-share",name:(0,s.Tl)("files_sharing","Public share"),caption:(0,s.Tl)("files_sharing","Publicly shared files."),emptyTitle:(0,s.Tl)("files_sharing","No files"),emptyCaption:(0,s.Tl)("files_sharing","Files and folders shared with you will show up here"),icon:u,order:1,getContents:d.hE});(0,n.bh)().register(e)})(),(()=>{const e=new n.Ss({id:"public-file-share",name:(0,s.Tl)("files_sharing","Public file share"),caption:(0,s.Tl)("files_sharing","Publicly shared file."),emptyTitle:(0,s.Tl)("files_sharing","No file"),emptyCaption:(0,s.Tl)("files_sharing","The file shared with you will show up here"),icon:u,order:1,getContents:()=>new p.CancelablePromise((async(e,t,r)=>{const i=new AbortController;r((()=>i.abort()));try{const t=await h.S.stat(n.lJ,{data:(0,n.VL)(),details:!0,signal:i.signal});e({contents:[(0,n.Al)(t.data)],folder:new n.vd({id:0,source:`${n.PY}${n.lJ}`,root:n.lJ,owner:null,permissions:n.aX.READ,attributes:{note:t.data.props?.note}})})}catch(e){f.error(e),t(e)}}))});(0,n.bh)().register(e)})();const _=(0,o.C)("files_sharing","view"),b=(0,n.bh)();b.setActive(b.views.find((e=>{let{id:t}=e;return t===_}))??null),window.OCP.Files=window.OCP.Files??{},window.OCP.Files.Router=new class{constructor(e){var t,r,i;t=this,i=void 0,(r=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(r="router"))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,this.router=e}get name(){return this.router.currentRoute.name}get query(){return this.router.currentRoute.query||{}}get params(){return this.router.currentRoute.params||{}}get _router(){return this.router}goTo(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.router.push({path:e,replace:t})}goToRoute(e,t,r,i){return this.router.push({name:e,query:r,params:t,replace:i})}}(A);const y=(0,o.C)("files_sharing","fileId",null),O=(0,o.C)("files_sharing","sharingToken");null!==y&&window.OCP.Files.Router.goToRoute("filelist",{...window.OCP.Files.Router.params,token:O,fileid:String(y)},{...window.OCP.Files.Router.query,openfile:"true"}),(0,i.B1)("files:list:updated",(function e(t){let{folder:r}=t;if((0,i.al)("files:list:updated",e),r.attributes["share-attributes"]){const e=JSON.parse(r.attributes["share-attributes"]||"[]").find((e=>{let{scope:t,key:r}=e;return"config"===t&&"grid_view"===r}));void 0!==e&&(f.debug("Loading share attributes",{gridViewAttribute:e}),(0,i.Ic)("files:config:updated",{key:"grid_view",value:!0===e.value}))}}))},89761:(e,t,r)=>{r.d(t,{_:()=>l});var i=r(65899),n=r(61338),o=r(9558),a=r(85471),s=r(56908),c=r(45238);const l=function(){const e=(0,i.nY)("files",{state:()=>({files:{},roots:{}}),getters:{getNode:e=>t=>e.files[t],getNodes:e=>t=>t.map((t=>e.files[t])).filter(Boolean),getNodesById:e=>t=>Object.values(e.files).filter((e=>e.fileid===t)),getRoot:e=>t=>e.roots[t]},actions:{getDirectoryByPath(e,t){const r=(0,c.B)();let i;if(t&&"/"!==t){const n=r.getPath(e,t);n&&(i=this.getNode(n))}else i=this.getRoot(e);return i},getNodesByPath(e,t){const r=this.getDirectoryByPath(e,t);return(r?._children??[]).map((e=>this.getNode(e))).filter(Boolean)},updateNodes(e){const t=e.reduce(((e,t)=>t.fileid?(e[t.source]=t,e):(o.A.error("Trying to update/set a node without fileid",{node:t}),e)),{});a.Ay.set(this,"files",{...this.files,...t})},deleteNodes(e){e.forEach((e=>{e.source&&a.Ay.delete(this.files,e.source)}))},setRoot(e){let{service:t,root:r}=e;a.Ay.set(this.roots,t,r)},onDeletedNode(e){this.deleteNodes([e])},onCreatedNode(e){this.updateNodes([e])},onMovedNode(e){let{node:t,oldSource:r}=e;t.fileid?(a.Ay.delete(this.files,r),this.updateNodes([t])):o.A.error("Trying to update/set a node without fileid",{node:t})},async onUpdatedNode(e){if(!e.fileid)return void o.A.error("Trying to update/set a node without fileid",{node:e});const t=this.getNodesById(e.fileid);if(t.length>1)return await Promise.all(t.map((e=>(0,s.t)(e.path)))).then(this.updateNodes),void o.A.debug(t.length+" nodes updated in store",{fileid:e.fileid});1!==t.length||e.source!==t[0].source?(0,s.t)(e.path).then((e=>this.updateNodes([e]))):this.updateNodes([e])},onAddFavorite(e){const t=this.getNode(e.source);t&&a.Ay.set(t.attributes,"favorite",1)},onRemoveFavorite(e){const t=this.getNode(e.source);t&&a.Ay.set(t.attributes,"favorite",0)}}})(...arguments);return e._initialized||((0,n.B1)("files:node:created",e.onCreatedNode),(0,n.B1)("files:node:deleted",e.onDeletedNode),(0,n.B1)("files:node:updated",e.onUpdatedNode),(0,n.B1)("files:node:moved",e.onMovedNode),(0,n.B1)("files:favorites:added",e.onAddFavorite),(0,n.B1)("files:favorites:removed",e.onRemoveFavorite),e._initialized=!0),e}}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={id:e,loaded:!1,exports:{}};return i[e].call(r.exports,r,r.exports,o),r.loaded=!0,r.exports}o.m=i,e=[],o.O=(t,r,i,n)=>{if(!r){var a=1/0;for(u=0;u=n)&&Object.keys(o.O).every((e=>o.O[e](r[c])))?r.splice(c--,1):(s=!1,n0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[r,i,n]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,r)=>(o.f[r](e,t),t)),[])),o.u=e=>e+"-"+e+".js?v="+{640:"b2fa23a809053c6305c5",1656:"05d90ab05fafdbaeed35",3485:"b3e801849a79b5a466ec",4309:"bb4749923fb699cb8c4a",5771:"a4e2a98efcfb7393c5bd",5810:"f63f10359069f886ce52",7432:"bf576075b1d8131aa273",7457:"4f8104223d5594bebb0f"}[e],o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},r="nextcloud:",o.l=(e,i,n,a)=>{if(t[e])t[e].push(i);else{var s,c;if(void 0!==n)for(var l=document.getElementsByTagName("script"),u=0;u{s.onerror=s.onload=null,clearTimeout(h);var n=t[e];if(delete t[e],s.parentNode&&s.parentNode.removeChild(s),n&&n.forEach((e=>e(i))),r)return r(i)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),c&&document.head.appendChild(s)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.j=5102,(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.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 i=r.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=r[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{o.b=document.baseURI||self.location.href;var e={5102:0,5810:0};o.f.j=(t,r)=>{var i=o.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var n=new Promise(((r,n)=>i=e[t]=[r,n]));r.push(i[2]=n);var a=o.p+o.u(t),s=new Error;o.l(a,(r=>{if(o.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+n+": "+a+")",s.name="ChunkLoadError",s.type=n,s.request=a,i[1](s)}}),"chunk-"+t,t)}},o.O.j=t=>0===e[t];var t=(t,r)=>{var i,n,a=r[0],s=r[1],c=r[2],l=0;if(a.some((t=>0!==e[t]))){for(i in s)o.o(s,i)&&(o.m[i]=s[i]);if(c)var u=c(o)}for(t&&t(r);lo(88732)));a=o.O(a)})();
//# sourceMappingURL=files_sharing-init-public.js.map?v=5c3c0cf50704659f4680