]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(files_sharing): fix sharing status indicator side after component update 41979/head
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>
Sat, 2 Dec 2023 12:36:30 +0000 (13:36 +0100)
committerJohn Molakvoæ <skjnldsv@protonmail.com>
Tue, 5 Dec 2023 10:36:38 +0000 (11:36 +0100)
Seems like the components now have max-height/width set too

Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
apps/files_sharing/src/actions/sharingStatusAction.scss
dist/files_sharing-init.js
dist/files_sharing-init.js.map

index fd37732d47c009916ad3611351ff30c47d706309..99fc8c88ad2597daaa19d695d8532ba5f923ecdd 100644 (file)
@@ -30,6 +30,8 @@
 svg.sharing-status__avatar {
        height: 32px !important;
        width: 32px !important;
+       max-height: 32px !important;
+       max-width: 32px !important;
        border-radius: 32px;
        overflow: hidden;
-}
\ No newline at end of file
+}
index 4f48e66b44119493f3fb73bc4776cb49397afbc4..355606be9668b3ba67b386f5f7e38f48bfe6fc87 100644 (file)
@@ -1,3 +1,3 @@
 /*! For license information please see files_sharing-init.js.LICENSE.txt */
-(()=>{"use strict";var e,t={11090:(e,t,i)=>{var n=i(31352),r=i(77958),s=i(17499),o=i(62520),a=i(65358),l=i(79753);i(14596);const u=null===(d=(0,r.ts)())?(0,s.IY)().setApp("files").build():(0,s.IY)().setApp("files").setUid(d.uid).build();var d,h=(e=>(e.DEFAULT="default",e.HIDDEN="hidden",e))(h||{});class c{_action;constructor(e){this.validateAction(e),this._action=e}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get order(){return this._action.order}get parent(){return this._action.parent}get default(){return this._action.default}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("parent"in e&&"string"!=typeof e.parent)throw new Error("Invalid parent");if(e.default&&!Object.values(h).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 p=function(e){typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],u.debug("FileActions initialized")),window._nc_fileactions.find((t=>t.id===e.id))?u.error(`FileAction ${e.id} already registered`,{action:e}):window._nc_fileactions.push(e)};var f=(e=>(e[e.NONE=0]="NONE",e[e.CREATE=4]="CREATE",e[e.READ=1]="READ",e[e.UPDATE=2]="UPDATE",e[e.DELETE=8]="DELETE",e[e.SHARE=16]="SHARE",e[e.ALL=31]="ALL",e))(f||{}),g=(e=>(e.Folder="folder",e.File="file",e))(g||{});const m=function(e,t){return null!==e.match(t)},w=(e,t)=>{if(e.id&&"number"!=typeof e.id)throw new Error("Invalid id type of value");if(!e.source)throw new Error("Missing mandatory source");try{new URL(e.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!e.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(e.mtime&&!(e.mtime instanceof Date))throw new Error("Invalid mtime type");if(e.crtime&&!(e.crtime instanceof Date))throw new Error("Invalid crtime type");if(!e.mime||"string"!=typeof e.mime||!e.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in e&&"number"!=typeof e.size&&void 0!==e.size)throw new Error("Invalid size type");if("permissions"in e&&void 0!==e.permissions&&!("number"==typeof e.permissions&&e.permissions>=f.NONE&&e.permissions<=f.ALL))throw new Error("Invalid permissions");if(e.owner&&null!==e.owner&&"string"!=typeof e.owner)throw new Error("Invalid owner type");if(e.attributes&&"object"!=typeof e.attributes)throw new Error("Invalid attributes type");if(e.root&&"string"!=typeof e.root)throw new Error("Invalid root type");if(e.root&&!e.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(e.root&&!e.source.includes(e.root))throw new Error("Root must be part of the source");if(e.root&&m(e.source,t)){const i=e.source.match(t)[0];if(!e.source.includes((0,o.join)(i,e.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(e.status&&!Object.values(v).includes(e.status))throw new Error("Status must be a valid NodeStatus")};var v=(e=>(e.NEW="new",e.FAILED="failed",e.LOADING="loading",e.LOCKED="locked",e))(v||{});class b{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;constructor(e,t){w(e,t||this._knownDavService),this._data=e;const i={set:(e,t,i)=>(this.updateMtime(),Reflect.set(e,t,i)),deleteProperty:(e,t)=>(this.updateMtime(),Reflect.deleteProperty(e,t))};this._attributes=new Proxy(e.attributes||{},i),delete this._data.attributes,t&&(this._knownDavService=t)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:e}=new URL(this.source);return e+(0,a.Ec)(this.source.slice(e.length))}get basename(){return(0,o.basename)(this.source)}get extension(){return(0,o.extname)(this.source)}get dirname(){if(this.root){const e=this.source.indexOf(this.root);return(0,o.dirname)(this.source.slice(e+this.root.length)||"/")}const e=new URL(this.source);return(0,o.dirname)(e.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}get crtime(){return this._data.crtime}get size(){return this._data.size}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:f.NONE:f.READ}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return m(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,o.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){const e=this.source.indexOf(this.root);return this.source.slice(e+this.root.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id||this.attributes?.fileid}get status(){return this._data?.status}set status(e){this._data.status=e}move(e){w({...this._data,source:e},this._knownDavService),this._data.source=e,this.updateMtime()}rename(e){if(e.includes("/"))throw new Error("Invalid basename");this.move((0,o.dirname)(this.source)+"/"+e)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}}class x extends b{get type(){return g.File}}class y extends b{constructor(e){super({...e,mime:"httpd/unix-directory"})}get type(){return g.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}(0,l.generateRemoteUrl)("dav");class N{_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)}remove(e){const t=this._views.findIndex((t=>t.id===e));-1!==t&&this._views.splice(t,1)}get views(){return this._views}setActive(e){this._currentView=e}get active(){return this._currentView}}class E{_column;constructor(e){_(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 _=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};var A={},I={};!function(e){const t=":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",i="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+i+"$");e.isExist=function(e){return typeof e<"u"},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,i){if(t){const n=Object.keys(t),r=n.length;for(let s=0;s<r;s++)e[n[s]]="strict"===i?[t[n[s]]]:t[n[s]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){const t=n.exec(e);return!(null===t||typeof t>"u")},e.getAllMatches=function(e,t){const i=[];let n=t.exec(e);for(;n;){const r=[];r.startIndex=t.lastIndex-n[0].length;const s=n.length;for(let e=0;e<s;e++)r.push(n[e]);i.push(r),n=t.exec(e)}return i},e.nameRegexp=i}(I);const C=I,T={allowBooleanAttributes:!1,unpairedTags:[]};function O(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function P(e,t){const i=t;for(;t<e.length;t++)if("?"==e[t]||" "==e[t]){const n=e.substr(i,t-i);if(t>5&&"xml"===n)return j("InvalidXml","XML declaration allowed only at the start of the document.",B(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}continue}return t}function S(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let i=1;for(t+=8;t<e.length;t++)if("<"===e[t])i++;else if(">"===e[t]&&(i--,0===i))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}A.validate=function(e,t){t=Object.assign({},T,t);const i=[];let n=!1,r=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let s=0;s<e.length;s++)if("<"===e[s]&&"?"===e[s+1]){if(s+=2,s=P(e,s),s.err)return s}else{if("<"!==e[s]){if(O(e[s]))continue;return j("InvalidChar","char '"+e[s]+"' is not expected.",B(e,s))}{let o=s;if(s++,"!"===e[s]){s=S(e,s);continue}{let a=!1;"/"===e[s]&&(a=!0,s++);let l="";for(;s<e.length&&">"!==e[s]&&" "!==e[s]&&"\t"!==e[s]&&"\n"!==e[s]&&"\r"!==e[s];s++)l+=e[s];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),s--),!H(l)){let t;return t=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",j("InvalidTag",t,B(e,s))}const u=D(e,s);if(!1===u)return j("InvalidAttr","Attributes for '"+l+"' have open quote.",B(e,s));let d=u.value;if(s=u.index,"/"===d[d.length-1]){const i=s-d.length;d=d.substring(0,d.length-1);const r=k(d,t);if(!0!==r)return j(r.err.code,r.err.msg,B(e,i+r.err.line));n=!0}else if(a){if(!u.tagClosed)return j("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",B(e,s));if(d.trim().length>0)return j("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",B(e,o));{const t=i.pop();if(l!==t.tagName){let i=B(e,t.tagStartPos);return j("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+i.line+", col "+i.col+") instead of closing tag '"+l+"'.",B(e,o))}0==i.length&&(r=!0)}}else{const a=k(d,t);if(!0!==a)return j(a.err.code,a.err.msg,B(e,s-d.length+a.err.line));if(!0===r)return j("InvalidXml","Multiple possible root nodes found.",B(e,s));-1!==t.unpairedTags.indexOf(l)||i.push({tagName:l,tagStartPos:o}),n=!0}for(s++;s<e.length;s++)if("<"===e[s]){if("!"===e[s+1]){s++,s=S(e,s);continue}if("?"!==e[s+1])break;if(s=P(e,++s),s.err)return s}else if("&"===e[s]){const t=M(e,s);if(-1==t)return j("InvalidChar","char '&' is not expected.",B(e,s));s=t}else if(!0===r&&!O(e[s]))return j("InvalidXml","Extra text at the end",B(e,s));"<"===e[s]&&s--}}}return n?1==i.length?j("InvalidTag","Unclosed tag '"+i[0].tagName+"'.",B(e,i[0].tagStartPos)):!(i.length>0)||j("InvalidXml","Invalid '"+JSON.stringify(i.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):j("InvalidXml","Start tag expected.",1)};const V='"',L="'";function D(e,t){let i="",n="",r=!1;for(;t<e.length;t++){if(e[t]===V||e[t]===L)""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){r=!0;break}i+=e[t]}return""===n&&{value:i,index:t,tagClosed:r}}const R=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function k(e,t){const i=C.getAllMatches(e,R),n={};for(let e=0;e<i.length;e++){if(0===i[e][1].length)return j("InvalidAttr","Attribute '"+i[e][2]+"' has no space in starting.",$(i[e]));if(void 0!==i[e][3]&&void 0===i[e][4])return j("InvalidAttr","Attribute '"+i[e][2]+"' is without value.",$(i[e]));if(void 0===i[e][3]&&!t.allowBooleanAttributes)return j("InvalidAttr","boolean attribute '"+i[e][2]+"' is not allowed.",$(i[e]));const r=i[e][2];if(!F(r))return j("InvalidAttr","Attribute '"+r+"' is an invalid name.",$(i[e]));if(n.hasOwnProperty(r))return j("InvalidAttr","Attribute '"+r+"' is repeated.",$(i[e]));n[r]=1}return!0}function M(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let i=/\d/;for("x"===e[t]&&(t++,i=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(i))break}return-1}(e,++t);let i=0;for(;t<e.length;t++,i++)if(!(e[t].match(/\w/)&&i<20)){if(";"===e[t])break;return-1}return t}function j(e,t,i){return{err:{code:e,msg:t,line:i.line||i,col:i.col}}}function F(e){return C.isName(e)}function H(e){return C.isName(e)}function B(e,t){const i=e.substring(0,t).split(/\r?\n/);return{line:i.length,col:i[i.length-1].length+1}}function $(e){return e.startIndex+e[1].length}var U={};const Z={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,i){return e}};U.buildOptions=function(e){return Object.assign({},Z,e)},U.defaultOptions=Z;const G=I;function Y(e,t){let i="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)i+=e[t];if(i=i.trim(),-1!==i.indexOf(" "))throw new Error("External entites are not supported");const n=e[t++];let r="";for(;t<e.length&&e[t]!==n;t++)r+=e[t];return[i,r,t]}function q(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function z(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function X(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function K(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function W(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function J(e){if(G.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}const Q=/^[-+]?0x[a-fA-F0-9]+$/,ee=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const te={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};const ie=I,ne=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}},re=function(e,t){const i={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let n=1,r=!1,s=!1,o="";for(;t<e.length;t++)if("<"!==e[t]||s)if(">"===e[t]){if(s?"-"===e[t-1]&&"-"===e[t-2]&&(s=!1,n--):n--,0===n)break}else"["===e[t]?r=!0:o+=e[t];else{if(r&&z(e,t))t+=7,[entityName,val,t]=Y(e,t+1),-1===val.indexOf("&")&&(i[J(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(r&&X(e,t))t+=8;else if(r&&K(e,t))t+=8;else if(r&&W(e,t))t+=9;else{if(!q)throw new Error("Invalid DOCTYPE");s=!0}n++,o=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:i,i:t}},se=function(e,t={}){if(t=Object.assign({},te,t),!e||"string"!=typeof e)return e;let i=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(i))return e;if(t.hex&&Q.test(i))return Number.parseInt(i,16);{const n=ee.exec(i);if(n){const r=n[1],s=n[2];let o=function(e){return e&&-1!==e.indexOf(".")&&("."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1))),e}(n[3]);const a=n[4]||n[6];if(!t.leadingZeros&&s.length>0&&r&&"."!==i[2])return e;if(!t.leadingZeros&&s.length>0&&!r&&"."!==i[1])return e;{const n=Number(i),l=""+n;return-1!==l.search(/[eE]/)||a?t.eNotation?n:e:-1!==i.indexOf(".")?"0"===l&&""===o||l===o||r&&l==="-"+o?n:e:s?o===l||r+o===l?n:e:i===l||i===r+l?n:e}}return e}};function oe(e){const t=Object.keys(e);for(let i=0;i<t.length;i++){const n=t[i];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:e[n]}}}function ae(e,t,i,n,r,s,o){if(void 0!==e&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e));const n=this.options.tagValueProcessor(t,e,i,r,s);return null==n?e:typeof n!=typeof e||n!==e?n:this.options.trimValues||e.trim()===e?be(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function le(e){if(this.options.removeNSPrefix){const t=e.split(":"),i="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=i+t[1])}return e}"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,ie.nameRegexp);const ue=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function de(e,t,i){if(!this.options.ignoreAttributes&&"string"==typeof e){const i=ie.getAllMatches(e,ue),n=i.length,r={};for(let e=0;e<n;e++){const n=this.resolveNameSpace(i[e][1]);let s=i[e][4],o=this.options.attributeNamePrefix+n;if(n.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s);const e=this.options.attributeValueProcessor(n,s,t);r[o]=null==e?s:typeof e!=typeof s||e!==s?e:be(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(r[o]=!0)}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=r,e}return r}}const he=function(e){e=e.replace(/\r\n?/g,"\n");const t=new ne("!xml");let i=t,n="",r="";for(let s=0;s<e.length;s++)if("<"===e[s])if("/"===e[s+1]){const t=me(e,">",s,"Closing Tag is not closed.");let o=e.substring(s+2,t).trim();if(this.options.removeNSPrefix){const e=o.indexOf(":");-1!==e&&(o=o.substr(e+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),i&&(n=this.saveTextToParentTag(n,i,r));const a=r.substring(r.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=r.lastIndexOf(".",r.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=r.lastIndexOf("."),r=r.substring(0,l),i=this.tagsNodeStack.pop(),n="",s=t}else if("?"===e[s+1]){let t=we(e,s,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,i,r),!(this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags)){const e=new ne(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,r,t.tagName)),this.addChild(i,e,r)}s=t.closeIndex+1}else if("!--"===e.substr(s+1,3)){const t=me(e,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const o=e.substring(s+4,t-2);n=this.saveTextToParentTag(n,i,r),i.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}s=t}else if("!D"===e.substr(s+1,2)){const t=re(e,s);this.docTypeEntities=t.entities,s=t.i}else if("!["===e.substr(s+1,2)){const t=me(e,"]]>",s,"CDATA is not closed.")-2,o=e.substring(s+9,t);if(n=this.saveTextToParentTag(n,i,r),this.options.cdataPropName)i.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]);else{let e=this.parseTextData(o,i.tagname,r,!0,!1,!0);null==e&&(e=""),i.add(this.options.textNodeName,e)}s=t+2}else{let o=we(e,s,this.options.removeNSPrefix),a=o.tagName;const l=o.rawTagName;let u=o.tagExp,d=o.attrExpPresent,h=o.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),i&&n&&"!xml"!==i.tagname&&(n=this.saveTextToParentTag(n,i,r,!1));const c=i;if(c&&-1!==this.options.unpairedTags.indexOf(c.tagname)&&(i=this.tagsNodeStack.pop(),r=r.substring(0,r.lastIndexOf("."))),a!==t.tagname&&(r+=r?"."+a:a),this.isItStopNode(this.options.stopNodes,r,a)){let t="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)s=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))s=o.closeIndex;else{const i=this.readStopNodeData(e,l,h+1);if(!i)throw new Error(`Unexpected end of ${l}`);s=i.i,t=i.tagContent}const n=new ne(a);a!==u&&d&&(n[":@"]=this.buildAttributesMap(u,r,a)),t&&(t=this.parseTextData(t,a,r,!0,d,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),n.add(this.options.textNodeName,t),this.addChild(i,n,r)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),r=r.substr(0,r.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const e=new ne(a);a!==u&&d&&(e[":@"]=this.buildAttributesMap(u,r,a)),this.addChild(i,e,r),r=r.substr(0,r.lastIndexOf("."))}else{const e=new ne(a);this.tagsNodeStack.push(i),a!==u&&d&&(e[":@"]=this.buildAttributesMap(u,r,a)),this.addChild(i,e,r),i=e}n="",s=h}}else n+=e[s];return t.child};function ce(e,t,i){const n=this.options.updateTag(t.tagname,i,t[":@"]);!1===n||("string"==typeof n&&(t.tagname=n),e.addChild(t))}const pe=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const i=this.docTypeEntities[t];e=e.replace(i.regx,i.val)}for(let t in this.lastEntities){const i=this.lastEntities[t];e=e.replace(i.regex,i.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const i=this.htmlEntities[t];e=e.replace(i.regex,i.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function fe(e,t,i,n){return e&&(void 0===n&&(n=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,i,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function ge(e,t,i){const n="*."+i;for(const i in e){const r=e[i];if(n===r||t===r)return!0}return!1}function me(e,t,i,n){const r=e.indexOf(t,i);if(-1===r)throw new Error(n);return r+t.length-1}function we(e,t,i,n=">"){const r=function(e,t,i=">"){let n,r="";for(let s=t;s<e.length;s++){let t=e[s];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===i[0]){if(!i[1])return{data:r,index:s};if(e[s+1]===i[1])return{data:r,index:s}}else"\t"===t&&(t=" ");r+=t}}(e,t+1,n);if(!r)return;let s=r.data;const o=r.index,a=s.search(/\s/);let l=s,u=!0;-1!==a&&(l=s.substr(0,a).replace(/\s\s*$/,""),s=s.substr(a+1));const d=l;if(i){const e=l.indexOf(":");-1!==e&&(l=l.substr(e+1),u=l!==r.data.substr(e+1))}return{tagName:l,tagExp:s,closeIndex:o,attrExpPresent:u,rawTagName:d}}function ve(e,t,i){const n=i;let r=1;for(;i<e.length;i++)if("<"===e[i])if("/"===e[i+1]){const s=me(e,">",i,`${t} is not closed`);if(e.substring(i+2,s).trim()===t&&(r--,0===r))return{tagContent:e.substring(n,i),i:s};i=s}else if("?"===e[i+1])i=me(e,"?>",i+1,"StopNode is not closed.");else if("!--"===e.substr(i+1,3))i=me(e,"--\x3e",i+3,"StopNode is not closed.");else if("!["===e.substr(i+1,2))i=me(e,"]]>",i,"StopNode is not closed.")-2;else{const n=we(e,i,">");n&&((n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&r++,i=n.closeIndex)}}function be(e,t,i){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&se(e,i)}return ie.isExist(e)?e:""}var xe={};function ye(e,t,i){let n;const r={};for(let s=0;s<e.length;s++){const o=e[s],a=Ne(o);let l="";if(l=void 0===i?a:i+"."+a,a===t.textNodeName)void 0===n?n=o[a]:n+=""+o[a];else{if(void 0===a)continue;if(o[a]){let e=ye(o[a],t,l);const i=_e(e,t);o[":@"]?Ee(e,o[":@"],l,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==r[a]&&r.hasOwnProperty(a)?(Array.isArray(r[a])||(r[a]=[r[a]]),r[a].push(e)):t.isArray(a,l,i)?r[a]=[e]:r[a]=e}}}return"string"==typeof n?n.length>0&&(r[t.textNodeName]=n):void 0!==n&&(r[t.textNodeName]=n),r}function Ne(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const i=t[e];if(":@"!==i)return i}}function Ee(e,t,i,n){if(t){const r=Object.keys(t),s=r.length;for(let o=0;o<s;o++){const s=r[o];n.isArray(s,i+"."+s,!0,!0)?e[s]=[t[s]]:e[s]=t[s]}}}function _e(e,t){const{textNodeName:i}=t,n=Object.keys(e).length;return!(0!==n&&(1!==n||!e[i]&&"boolean"!=typeof e[i]&&0!==e[i]))}xe.prettify=function(e,t){return ye(e,t)};const{buildOptions:Ae}=U,Ie=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"}},this.addExternalEntities=oe,this.parseXml=he,this.parseTextData=ae,this.resolveNameSpace=le,this.buildAttributesMap=de,this.isItStopNode=ge,this.replaceEntitiesValue=pe,this.readStopNodeData=ve,this.saveTextToParentTag=fe,this.addChild=ce}},{prettify:Ce}=xe,Te=A;function Oe(e,t,i,n){let r="",s=!1;for(let o=0;o<e.length;o++){const a=e[o],l=Pe(a);if(void 0===l)continue;let u="";if(u=0===i.length?l:`${i}.${l}`,l===t.textNodeName){let e=a[l];Ve(u,t)||(e=t.tagValueProcessor(l,e),e=Le(e,t)),s&&(r+=n),r+=e,s=!1;continue}if(l===t.cdataPropName){s&&(r+=n),r+=`<![CDATA[${a[l][0][t.textNodeName]}]]>`,s=!1;continue}if(l===t.commentPropName){r+=n+`\x3c!--${a[l][0][t.textNodeName]}--\x3e`,s=!0;continue}if("?"===l[0]){const e=Se(a[":@"],t),i="?xml"===l?"":n;let o=a[l][0][t.textNodeName];o=0!==o.length?" "+o:"",r+=i+`<${l}${o}${e}?>`,s=!0;continue}let d=n;""!==d&&(d+=t.indentBy);const h=n+`<${l}${Se(a[":@"],t)}`,c=Oe(a[l],t,u,d);-1!==t.unpairedTags.indexOf(l)?t.suppressUnpairedNode?r+=h+">":r+=h+"/>":c&&0!==c.length||!t.suppressEmptyNode?c&&c.endsWith(">")?r+=h+`>${c}${n}</${l}>`:(r+=h+">",c&&""!==n&&(c.includes("/>")||c.includes("</"))?r+=n+t.indentBy+c+n:r+=c,r+=`</${l}>`):r+=h+"/>",s=!0}return r}function Pe(e){const t=Object.keys(e);for(let i=0;i<t.length;i++){const n=t[i];if(e.hasOwnProperty(n)&&":@"!==n)return n}}function Se(e,t){let i="";if(e&&!t.ignoreAttributes)for(let n in e){if(!e.hasOwnProperty(n))continue;let r=t.attributeValueProcessor(n,e[n]);r=Le(r,t),!0===r&&t.suppressBooleanAttributes?i+=` ${n.substr(t.attributeNamePrefix.length)}`:i+=` ${n.substr(t.attributeNamePrefix.length)}="${r}"`}return i}function Ve(e,t){let i=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+i)return!0;return!1}function Le(e,t){if(e&&e.length>0&&t.processEntities)for(let i=0;i<t.entities.length;i++){const n=t.entities[i];e=e.replace(n.regex,n.val)}return e}const De=function(e,t){let i="";return t.format&&t.indentBy.length>0&&(i="\n"),Oe(e,t,"",i)},Re={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:"  ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function ke(e){this.options=Object.assign({},Re,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Fe),this.processTextOrObjNode=Me,this.options.format?(this.indentate=je,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Me(e,t,i){const n=this.j2x(e,i+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,n.attrStr,i):this.buildObjectNode(n.val,t,n.attrStr,i)}function je(e){return this.options.indentBy.repeat(e)}function Fe(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}ke.prototype.build=function(e){return this.options.preserveOrder?De(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},ke.prototype.j2x=function(e,t){let i="",n="";for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r))if(typeof e[r]>"u")this.isAttribute(r)&&(n+="");else if(null===e[r])this.isAttribute(r)?n+="":"?"===r[0]?n+=this.indentate(t)+"<"+r+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+r+"/"+this.tagEndChar;else if(e[r]instanceof Date)n+=this.buildTextValNode(e[r],r,"",t);else if("object"!=typeof e[r]){const s=this.isAttribute(r);if(s)i+=this.buildAttrPairStr(s,""+e[r]);else if(r===this.options.textNodeName){let t=this.options.tagValueProcessor(r,""+e[r]);n+=this.replaceEntitiesValue(t)}else n+=this.buildTextValNode(e[r],r,"",t)}else if(Array.isArray(e[r])){const i=e[r].length;let s="";for(let o=0;o<i;o++){const i=e[r][o];typeof i>"u"||(null===i?"?"===r[0]?n+=this.indentate(t)+"<"+r+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+r+"/"+this.tagEndChar:"object"==typeof i?this.options.oneListGroup?s+=this.j2x(i,t+1).val:s+=this.processTextOrObjNode(i,r,t):s+=this.buildTextValNode(i,r,"",t))}this.options.oneListGroup&&(s=this.buildObjectNode(s,r,"",t)),n+=s}else if(this.options.attributesGroupName&&r===this.options.attributesGroupName){const t=Object.keys(e[r]),n=t.length;for(let s=0;s<n;s++)i+=this.buildAttrPairStr(t[s],""+e[r][t[s]])}else n+=this.processTextOrObjNode(e[r],r,t);return{attrStr:i,val:n}},ke.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},ke.prototype.buildObjectNode=function(e,t,i,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+i+"?"+this.tagEndChar:this.indentate(n)+"<"+t+i+this.closeTag(t)+this.tagEndChar;{let r="</"+t+this.tagEndChar,s="";return"?"===t[0]&&(s="?",r=""),!i&&""!==i||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===s.length?this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(n)+"<"+t+i+s+this.tagEndChar+e+this.indentate(n)+r:this.indentate(n)+"<"+t+i+s+">"+e+r}},ke.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},ke.prototype.buildTextValNode=function(e,t,i,n){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(n)+"<"+t+i+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(t,e);return r=this.replaceEntitiesValue(r),""===r?this.indentate(n)+"<"+t+i+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+i+">"+r+"</"+t+this.tagEndChar}},ke.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const i=this.options.entities[t];e=e.replace(i.regex,i.val)}return e};var He={XMLParser:class{constructor(e){this.externalEntities={},this.options=Ae(e)}parse(e,t){if("string"!=typeof e){if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const i=Te.validate(e,t);if(!0!==i)throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`)}const i=new Ie(this.options);i.addExternalEntities(this.externalEntities);const n=i.parseXml(e);return this.options.preserveOrder||void 0===n?n:Ce(n,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}},XMLValidator:A,XMLBuilder:ke};class Be{_view;constructor(e){$e(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 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}}const $e=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(e.columns&&e.columns.length>0&&(!e.caption||"string"!=typeof e.caption))throw new Error("View caption is required for top-level views and must be a string");if(!e.getContents||"function"!=typeof e.getContents)throw new Error("View getContents is required and must be a function");if(!e.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||!0!==He.XMLValidator.validate(e))return!1;let t;const i=new He.XMLParser;try{t=i.parse(e)}catch{return!1}return!(!t||!("svg"in t))}(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 is required and must be a number");if(e.columns&&e.columns.forEach((e=>{if(!(e instanceof E))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");return!0},Ue='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-account-group" viewBox="0 0 24 24"><path d="M12,5.5A3.5,3.5 0 0,1 15.5,9A3.5,3.5 0 0,1 12,12.5A3.5,3.5 0 0,1 8.5,9A3.5,3.5 0 0,1 12,5.5M5,8C5.56,8 6.08,8.15 6.53,8.42C6.38,9.85 6.8,11.27 7.66,12.38C7.16,13.34 6.16,14 5,14A3,3 0 0,1 2,11A3,3 0 0,1 5,8M19,8A3,3 0 0,1 22,11A3,3 0 0,1 19,14C17.84,14 16.84,13.34 16.34,12.38C17.2,11.27 17.62,9.85 17.47,8.42C17.92,8.15 18.44,8 19,8M5.5,18.25C5.5,16.18 8.41,14.5 12,14.5C15.59,14.5 18.5,16.18 18.5,18.25V20H5.5V18.25M0,20V18.5C0,17.11 1.89,15.94 4.45,15.6C3.86,16.28 3.5,17.22 3.5,18.25V20H0M24,20H20.5V18.25C20.5,17.22 20.14,16.28 19.55,15.6C22.11,15.94 24,17.11 24,18.5V20Z" /></svg>',Ze='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-account-plus" viewBox="0 0 24 24"><path d="M15,14C12.33,14 7,15.33 7,18V20H23V18C23,15.33 17.67,14 15,14M6,10V7H4V10H1V12H4V15H6V12H9V10M15,12A4,4 0 0,0 19,8A4,4 0 0,0 15,4A4,4 0 0,0 11,8A4,4 0 0,0 15,12Z" /></svg>',Ge='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-link" viewBox="0 0 24 24"><path d="M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z" /></svg>';var Ye=i(93664);const qe=(0,s.IY)().setApp("files_sharing").detectUser().build(),ze=`/files/${(0,r.ts)()?.uid}`,Xe={"Content-Type":"application/json"},Ke=function(e){try{const t="folder"===e?.item_type,i=!0===e?.has_preview,n=t?y:x,r=e.file_source,s=e?.path||e.file_target,o=(0,l.generateRemoteUrl)(`dav/${ze}/${s}`.replaceAll(/\/\//gm,"/"));let a=e?.item_mtime?new Date(1e3*e.item_mtime):void 0;return e?.stime>(e?.item_mtime||0)&&(a=new Date(1e3*e.stime)),new n({id:r,source:o,owner:e?.uid_owner,mime:e?.mimetype,mtime:a,size:e?.item_size,permissions:e?.item_permissions||e?.permissions,root:ze,attributes:{...e,"has-preview":i,favorite:e?.tags?.includes(window.OC.TAG_FAVORITE)?1:0}})}catch(e){return qe.error("Error while parsing OCS entry",{error:e}),null}},We=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=(0,l.generateOcsUrl)("apps/files_sharing/api/v1/shares");return Ye.Z.get(t,{headers:Xe,params:{shared_with_me:e,include_tags:!0}})},Je=async function(){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const s=[];(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&s.push(We(!0),function(){const e=(0,l.generateOcsUrl)("apps/files_sharing/api/v1/remote_shares");return Ye.Z.get(e,{headers:Xe,params:{include_tags:!0}})}()),e&&s.push(We()),t&&s.push(function(){const e=(0,l.generateOcsUrl)("apps/files_sharing/api/v1/shares/pending");return Ye.Z.get(e,{headers:Xe,params:{include_tags:!0}})}(),function(){const e=(0,l.generateOcsUrl)("apps/files_sharing/api/v1/remote_shares/pending");return Ye.Z.get(e,{headers:Xe,params:{include_tags:!0}})}()),i&&s.push(function(){const e=(0,l.generateOcsUrl)("apps/files_sharing/api/v1/deletedshares");return Ye.Z.get(e,{headers:Xe,params:{include_tags:!0}})}());let o=(await Promise.all(s)).map((e=>e.data.ocs.data)).flat().map(Ke).filter((e=>null!==e));return n.length>0&&(o=o.filter((e=>n.includes(e.attributes?.share_type)))),{folder:new y({id:0,source:(0,l.generateRemoteUrl)("dav"+ze),owner:(0,r.ts)()?.uid||null}),contents:o}},Qe="shareoverview",et="sharingin",tt="sharingout",it="sharinglinks",nt="deletedshares",rt="pendingshares";var st=i(69183);p(new c({id:"accept-share",displayName:e=>(0,n.uN)("files_sharing","Accept share","Accept shares",e.length),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-check" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" /></svg>',enabled:(e,t)=>e.length>0&&t.id===rt,async exec(e){try{const t=!!e.attributes.remote,i=(0,l.generateOcsUrl)("apps/files_sharing/api/v1/{shareBase}/pending/{id}",{shareBase:t?"remote_shares":"shares",id:e.attributes.id});return await Ye.Z.post(i),(0,st.j8)("files:node:deleted",e),!0}catch(e){return!1}},async execBatch(e,t,i){return Promise.all(e.map((e=>this.exec(e,t,i))))},order:1,inline:()=>!0})),p(new c({id:"open-in-files",displayName:()=>(0,n.Iu)("files","Open in Files"),iconSvgInline:()=>"",enabled:(e,t)=>[Qe,et,tt,it].includes(t.id),exec:async e=>(window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:e.fileid},{dir:e.dirname}),null),order:-1e3,default:h.HIDDEN})),p(new c({id:"reject-share",displayName:e=>(0,n.uN)("files_sharing","Reject share","Reject shares",e.length),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-close" viewBox="0 0 24 24"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>',enabled:(e,t)=>t.id===rt&&0!==e.length&&!e.some((e=>e.attributes.remote_id&&e.attributes.share_type===window.OC.Share.SHARE_TYPE_REMOTE_GROUP)),async exec(e){try{const t=!!e.attributes.remote,i=(0,l.generateOcsUrl)("apps/files_sharing/api/v1/{shareBase}/{id}",{shareBase:t?"remote_shares":"shares",id:e.attributes.id});return await Ye.Z.delete(i),(0,st.j8)("files:node:deleted",e),!0}catch(e){return!1}},async execBatch(e,t,i){return Promise.all(e.map((e=>this.exec(e,t,i))))},order:2,inline:()=>!0})),p(new c({id:"restore-share",displayName:e=>(0,n.uN)("files_sharing","Restore share","Restore shares",e.length),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-arrow-u-left-top" viewBox="0 0 24 24"><path d="M20 13.5C20 17.09 17.09 20 13.5 20H6V18H13.5C16 18 18 16 18 13.5S16 9 13.5 9H7.83L10.91 12.09L9.5 13.5L4 8L9.5 2.5L10.92 3.91L7.83 7H13.5C17.09 7 20 9.91 20 13.5Z" /></svg>',enabled:(e,t)=>e.length>0&&t.id===nt,async exec(e){try{const t=(0,l.generateOcsUrl)("apps/files_sharing/api/v1/deletedshares/{id}",{id:e.attributes.id});return await Ye.Z.post(t),(0,st.j8)("files:node:deleted",e),!0}catch(e){return!1}},async execBatch(e,t,i){return Promise.all(e.map((e=>this.exec(e,t,i))))},order:1,inline:()=>!0}));var ot=i(41922),at=i(48250);const lt=(0,s.IY)().setApp("files").detectUser().build(),ut=new c({id:"details",displayName:()=>(0,n.Iu)("files","Open details"),iconSvgInline:()=>at,enabled:e=>1===e.length&&!!e[0]&&!!window?.OCA?.Files?.Sidebar&&((e[0].root?.startsWith("/files/")&&e[0].permissions!==f.NONE)??!1),async exec(e,t,i){try{return await window.OCA.Files.Sidebar.open(e.path),window.OCP.Files.Router.goToRoute(null,{view:t.id,fileid:e.fileid},{dir:i},!0),null}catch(e){return lt.error("Error while opening sidebar",{error:e}),!1}},order:-50});var dt=i(93379),ht=i.n(dt),ct=i(7795),pt=i.n(ct),ft=i(90569),gt=i.n(ft),mt=i(3565),wt=i.n(mt),vt=i(19216),bt=i.n(vt),xt=i(44589),yt=i.n(xt),Nt=i(8492),Et={};Et.styleTagTransform=yt(),Et.setAttributes=wt(),Et.insert=gt().bind(null,"head"),Et.domAPI=pt(),Et.insertStyleElement=bt(),ht()(Nt.Z,Et),Nt.Z&&Nt.Z.locals&&Nt.Z.locals,p(new c({id:"sharing-status",displayName(e){const t=e[0],i=Object.values(t?.attributes?.["share-types"]||{}).flat(),s=t?.attributes?.["owner-id"];return i.length>0||s&&s!==(0,r.ts)()?.uid?(0,n.Iu)("files_sharing","Shared"):""},title(e){const t=e[0],i=t?.attributes?.["owner-id"],s=t?.attributes?.["owner-display-name"];return i&&i!==(0,r.ts)()?.uid?(0,n.Iu)("files_sharing","Shared by {ownerDisplayName}",{ownerDisplayName:s}):(0,n.Iu)("files_sharing","Show sharing options")},iconSvgInline(e){const t=e[0],i=Object.values(t?.attributes?.["share-types"]||{}).flat();if(i.includes(ot.D.SHARE_TYPE_LINK)||i.includes(ot.D.SHARE_TYPE_EMAIL))return Ge;if(i.includes(ot.D.SHARE_TYPE_GROUP)||i.includes(ot.D.SHARE_TYPE_REMOTE_GROUP))return Ue;if(i.includes(ot.D.SHARE_TYPE_CIRCLE))return'<svg width="16" height="16" viewBox="0 0 21.33 21.33" xmlns="http://www.w3.org/2000/svg"><path d="M10.67 1.33a9.34 9.34 0 100 18.68 9.34 9.34 0 000-18.68zM6.93 15.8a2.33 2.33 0 110-4.67 2.33 2.33 0 010 4.67zm1.4-8.87a2.33 2.33 0 114.67 0 2.33 2.33 0 01-4.67 0zm6.07 8.87a2.33 2.33 0 110-4.67 2.33 2.33 0 010 4.67z"/></svg>\n';const n=t?.attributes?.["owner-id"];return n&&n!==(0,r.ts)()?.uid?(s=n,`<svg width="32" height="32" viewBox="0 0 32 32"\n\t\txmlns="http://www.w3.org/2000/svg" class="sharing-status__avatar">\n\t\t<image href="${(0,l.generateUrl)("/avatar/{userId}/32",{userId:s})}" height="32" width="32" />\n\t</svg>`):Ze;var s},enabled(e){if(1!==e.length)return!1;const t=e[0],i=t?.attributes?.["owner-id"];return!(!i||i===(0,r.ts)()?.uid)||0!=(t.permissions&f.SHARE)},exec:async(e,t,i)=>0!=(e.permissions&f.READ)?(window.OCA?.Files?.Sidebar?.setActiveTab?.("sharing"),ut.exec(e,t,i)):null,inline:()=>!0})),(()=>{const e=(typeof window._nc_navigation>"u"&&(window._nc_navigation=new N,u.debug("Navigation service initialized")),window._nc_navigation);e.register(new Be({id:Qe,name:(0,n.Iu)("files_sharing","Shares"),caption:(0,n.Iu)("files_sharing","Overview of shared files."),emptyTitle:(0,n.Iu)("files_sharing","No shares"),emptyCaption:(0,n.Iu)("files_sharing","Files and folders you shared or have been shared with you will show up here"),icon:Ze,order:20,columns:[],getContents:()=>Je()})),e.register(new Be({id:et,name:(0,n.Iu)("files_sharing","Shared with you"),caption:(0,n.Iu)("files_sharing","List of files that are shared with you."),emptyTitle:(0,n.Iu)("files_sharing","Nothing shared with you yet"),emptyCaption:(0,n.Iu)("files_sharing","Files and folders others shared with you will show up here"),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-account" viewBox="0 0 24 24"><path d="M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z" /></svg>',order:1,parent:Qe,columns:[],getContents:()=>Je(!0,!1,!1,!1)})),e.register(new Be({id:tt,name:(0,n.Iu)("files_sharing","Shared with others"),caption:(0,n.Iu)("files_sharing","List of files that you shared with others."),emptyTitle:(0,n.Iu)("files_sharing","Nothing shared yet"),emptyCaption:(0,n.Iu)("files_sharing","Files and folders you shared will show up here"),icon:Ue,order:2,parent:Qe,columns:[],getContents:()=>Je(!1,!0,!1,!1)})),e.register(new Be({id:it,name:(0,n.Iu)("files_sharing","Shared by link"),caption:(0,n.Iu)("files_sharing","List of files that are shared by link."),emptyTitle:(0,n.Iu)("files_sharing","No shared links"),emptyCaption:(0,n.Iu)("files_sharing","Files and folders you shared by link will show up here"),icon:Ge,order:3,parent:Qe,columns:[],getContents:()=>Je(!1,!0,!1,!1,[window.OC.Share.SHARE_TYPE_LINK])})),e.register(new Be({id:nt,name:(0,n.Iu)("files_sharing","Deleted shares"),caption:(0,n.Iu)("files_sharing","List of shares you left."),emptyTitle:(0,n.Iu)("files_sharing","No deleted shares"),emptyCaption:(0,n.Iu)("files_sharing","Shares you have left will show up here"),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-delete" viewBox="0 0 24 24"><path d="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z" /></svg>',order:4,parent:Qe,columns:[],getContents:()=>Je(!1,!1,!1,!0)})),e.register(new Be({id:rt,name:(0,n.Iu)("files_sharing","Pending shares"),caption:(0,n.Iu)("files_sharing","List of unapproved shares."),emptyTitle:(0,n.Iu)("files_sharing","No pending shares"),emptyCaption:(0,n.Iu)("files_sharing","Shares you have received but not approved will show up here"),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-account-clock" viewBox="0 0 24 24"><path d="M10.63,14.1C12.23,10.58 16.38,9.03 19.9,10.63C23.42,12.23 24.97,16.38 23.37,19.9C22.24,22.4 19.75,24 17,24C14.3,24 11.83,22.44 10.67,20H1V18C1.06,16.86 1.84,15.93 3.34,15.18C4.84,14.43 6.72,14.04 9,14C9.57,14 10.11,14.05 10.63,14.1V14.1M9,4C10.12,4.03 11.06,4.42 11.81,5.17C12.56,5.92 12.93,6.86 12.93,8C12.93,9.14 12.56,10.08 11.81,10.83C11.06,11.58 10.12,11.95 9,11.95C7.88,11.95 6.94,11.58 6.19,10.83C5.44,10.08 5.07,9.14 5.07,8C5.07,6.86 5.44,5.92 6.19,5.17C6.94,4.42 7.88,4.03 9,4M17,22A5,5 0 0,0 22,17A5,5 0 0,0 17,12A5,5 0 0,0 12,17A5,5 0 0,0 17,22M16,14H17.5V16.82L19.94,18.23L19.19,19.53L16,17.69V14Z" /></svg>',order:5,parent:Qe,columns:[],getContents:()=>Je(!1,!1,!0,!1)}))})()},8492:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(87537),r=i.n(n),s=i(23645),o=i.n(s)()(r());o.push([e.id,".action-items>.files-list__row-action-sharing-status{direction:rtl;padding-right:0 !important}svg.sharing-status__avatar{height:32px !important;width:32px !important;border-radius:32px;overflow:hidden}","",{version:3,sources:["webpack://./apps/files_sharing/src/actions/sharingStatusAction.scss"],names:[],mappings:"AAsBA,qDAEC,aAAA,CAEG,0BAAA,CAGJ,2BACC,sBAAA,CACA,qBAAA,CACA,kBAAA,CACA,eAAA",sourcesContent:["/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n // Only when rendered inline, when not enough space, this is put in the menu\n.action-items > .files-list__row-action-sharing-status {\n\t// put icon at the end of the button\n\tdirection: rtl;\n\t// align icons with textless inline actions\n    padding-right: 0 !important;\n}\n\nsvg.sharing-status__avatar {\n\theight: 32px !important;\n\twidth: 32px !important;\n\tborder-radius: 32px;\n\toverflow: hidden;\n}"],sourceRoot:""}]);const a=o}},i={};function n(e){var r=i[e];if(void 0!==r)return r.exports;var s=i[e]={id:e,loaded:!1,exports:{}};return t[e].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.m=t,e=[],n.O=(t,i,r,s)=>{if(!i){var o=1/0;for(d=0;d<e.length;d++){i=e[d][0],r=e[d][1],s=e[d][2];for(var a=!0,l=0;l<i.length;l++)(!1&s||o>=s)&&Object.keys(n.O).every((e=>n.O[e](i[l])))?i.splice(l--,1):(a=!1,s<o&&(o=s));if(a){e.splice(d--,1);var u=r();void 0!==u&&(t=u)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[i,r,s]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.e=()=>Promise.resolve(),n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.j=1609,(()=>{n.b=document.baseURI||self.location.href;var e={1609:0};n.O.j=t=>0===e[t];var t=(t,i)=>{var r,s,o=i[0],a=i[1],l=i[2],u=0;if(o.some((t=>0!==e[t]))){for(r in a)n.o(a,r)&&(n.m[r]=a[r]);if(l)var d=l(n)}for(t&&t(i);u<o.length;u++)s=o[u],n.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return n.O(d)},i=self.webpackChunknextcloud=self.webpackChunknextcloud||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})(),n.nc=void 0;var r=n.O(void 0,[7874],(()=>n(11090)));r=n.O(r)})();
-//# sourceMappingURL=files_sharing-init.js.map?v=c40249092fcbe4a9fcdb
\ No newline at end of file
+(()=>{"use strict";var e,t={11090:(e,t,i)=>{var n=i(31352),r=i(77958),s=i(17499),o=i(62520),a=i(65358),l=i(79753);i(14596);const u=null===(h=(0,r.ts)())?(0,s.IY)().setApp("files").build():(0,s.IY)().setApp("files").setUid(h.uid).build();var h,d=(e=>(e.DEFAULT="default",e.HIDDEN="hidden",e))(d||{});class c{_action;constructor(e){this.validateAction(e),this._action=e}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get order(){return this._action.order}get parent(){return this._action.parent}get default(){return this._action.default}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("parent"in e&&"string"!=typeof e.parent)throw new Error("Invalid parent");if(e.default&&!Object.values(d).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 p=function(e){typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],u.debug("FileActions initialized")),window._nc_fileactions.find((t=>t.id===e.id))?u.error(`FileAction ${e.id} already registered`,{action:e}):window._nc_fileactions.push(e)};var f=(e=>(e[e.NONE=0]="NONE",e[e.CREATE=4]="CREATE",e[e.READ=1]="READ",e[e.UPDATE=2]="UPDATE",e[e.DELETE=8]="DELETE",e[e.SHARE=16]="SHARE",e[e.ALL=31]="ALL",e))(f||{}),g=(e=>(e.Folder="folder",e.File="file",e))(g||{});const m=function(e,t){return null!==e.match(t)},w=(e,t)=>{if(e.id&&"number"!=typeof e.id)throw new Error("Invalid id type of value");if(!e.source)throw new Error("Missing mandatory source");try{new URL(e.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!e.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(e.mtime&&!(e.mtime instanceof Date))throw new Error("Invalid mtime type");if(e.crtime&&!(e.crtime instanceof Date))throw new Error("Invalid crtime type");if(!e.mime||"string"!=typeof e.mime||!e.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in e&&"number"!=typeof e.size&&void 0!==e.size)throw new Error("Invalid size type");if("permissions"in e&&void 0!==e.permissions&&!("number"==typeof e.permissions&&e.permissions>=f.NONE&&e.permissions<=f.ALL))throw new Error("Invalid permissions");if(e.owner&&null!==e.owner&&"string"!=typeof e.owner)throw new Error("Invalid owner type");if(e.attributes&&"object"!=typeof e.attributes)throw new Error("Invalid attributes type");if(e.root&&"string"!=typeof e.root)throw new Error("Invalid root type");if(e.root&&!e.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(e.root&&!e.source.includes(e.root))throw new Error("Root must be part of the source");if(e.root&&m(e.source,t)){const i=e.source.match(t)[0];if(!e.source.includes((0,o.join)(i,e.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(e.status&&!Object.values(v).includes(e.status))throw new Error("Status must be a valid NodeStatus")};var v=(e=>(e.NEW="new",e.FAILED="failed",e.LOADING="loading",e.LOCKED="locked",e))(v||{});class b{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;constructor(e,t){w(e,t||this._knownDavService),this._data=e;const i={set:(e,t,i)=>(this.updateMtime(),Reflect.set(e,t,i)),deleteProperty:(e,t)=>(this.updateMtime(),Reflect.deleteProperty(e,t))};this._attributes=new Proxy(e.attributes||{},i),delete this._data.attributes,t&&(this._knownDavService=t)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:e}=new URL(this.source);return e+(0,a.Ec)(this.source.slice(e.length))}get basename(){return(0,o.basename)(this.source)}get extension(){return(0,o.extname)(this.source)}get dirname(){if(this.root){const e=this.source.indexOf(this.root);return(0,o.dirname)(this.source.slice(e+this.root.length)||"/")}const e=new URL(this.source);return(0,o.dirname)(e.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}get crtime(){return this._data.crtime}get size(){return this._data.size}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:f.NONE:f.READ}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return m(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,o.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){const e=this.source.indexOf(this.root);return this.source.slice(e+this.root.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id||this.attributes?.fileid}get status(){return this._data?.status}set status(e){this._data.status=e}move(e){w({...this._data,source:e},this._knownDavService),this._data.source=e,this.updateMtime()}rename(e){if(e.includes("/"))throw new Error("Invalid basename");this.move((0,o.dirname)(this.source)+"/"+e)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}}class x extends b{get type(){return g.File}}class y extends b{constructor(e){super({...e,mime:"httpd/unix-directory"})}get type(){return g.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}(0,l.generateRemoteUrl)("dav");class N{_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)}remove(e){const t=this._views.findIndex((t=>t.id===e));-1!==t&&this._views.splice(t,1)}get views(){return this._views}setActive(e){this._currentView=e}get active(){return this._currentView}}class E{_column;constructor(e){_(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 _=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};var A={},I={};!function(e){const t=":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",i="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+i+"$");e.isExist=function(e){return typeof e<"u"},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,i){if(t){const n=Object.keys(t),r=n.length;for(let s=0;s<r;s++)e[n[s]]="strict"===i?[t[n[s]]]:t[n[s]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){const t=n.exec(e);return!(null===t||typeof t>"u")},e.getAllMatches=function(e,t){const i=[];let n=t.exec(e);for(;n;){const r=[];r.startIndex=t.lastIndex-n[0].length;const s=n.length;for(let e=0;e<s;e++)r.push(n[e]);i.push(r),n=t.exec(e)}return i},e.nameRegexp=i}(I);const C=I,T={allowBooleanAttributes:!1,unpairedTags:[]};function O(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function P(e,t){const i=t;for(;t<e.length;t++)if("?"==e[t]||" "==e[t]){const n=e.substr(i,t-i);if(t>5&&"xml"===n)return j("InvalidXml","XML declaration allowed only at the start of the document.",H(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}continue}return t}function S(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let i=1;for(t+=8;t<e.length;t++)if("<"===e[t])i++;else if(">"===e[t]&&(i--,0===i))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}A.validate=function(e,t){t=Object.assign({},T,t);const i=[];let n=!1,r=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let s=0;s<e.length;s++)if("<"===e[s]&&"?"===e[s+1]){if(s+=2,s=P(e,s),s.err)return s}else{if("<"!==e[s]){if(O(e[s]))continue;return j("InvalidChar","char '"+e[s]+"' is not expected.",H(e,s))}{let o=s;if(s++,"!"===e[s]){s=S(e,s);continue}{let a=!1;"/"===e[s]&&(a=!0,s++);let l="";for(;s<e.length&&">"!==e[s]&&" "!==e[s]&&"\t"!==e[s]&&"\n"!==e[s]&&"\r"!==e[s];s++)l+=e[s];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),s--),!B(l)){let t;return t=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",j("InvalidTag",t,H(e,s))}const u=D(e,s);if(!1===u)return j("InvalidAttr","Attributes for '"+l+"' have open quote.",H(e,s));let h=u.value;if(s=u.index,"/"===h[h.length-1]){const i=s-h.length;h=h.substring(0,h.length-1);const r=k(h,t);if(!0!==r)return j(r.err.code,r.err.msg,H(e,i+r.err.line));n=!0}else if(a){if(!u.tagClosed)return j("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",H(e,s));if(h.trim().length>0)return j("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",H(e,o));{const t=i.pop();if(l!==t.tagName){let i=H(e,t.tagStartPos);return j("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+i.line+", col "+i.col+") instead of closing tag '"+l+"'.",H(e,o))}0==i.length&&(r=!0)}}else{const a=k(h,t);if(!0!==a)return j(a.err.code,a.err.msg,H(e,s-h.length+a.err.line));if(!0===r)return j("InvalidXml","Multiple possible root nodes found.",H(e,s));-1!==t.unpairedTags.indexOf(l)||i.push({tagName:l,tagStartPos:o}),n=!0}for(s++;s<e.length;s++)if("<"===e[s]){if("!"===e[s+1]){s++,s=S(e,s);continue}if("?"!==e[s+1])break;if(s=P(e,++s),s.err)return s}else if("&"===e[s]){const t=M(e,s);if(-1==t)return j("InvalidChar","char '&' is not expected.",H(e,s));s=t}else if(!0===r&&!O(e[s]))return j("InvalidXml","Extra text at the end",H(e,s));"<"===e[s]&&s--}}}return n?1==i.length?j("InvalidTag","Unclosed tag '"+i[0].tagName+"'.",H(e,i[0].tagStartPos)):!(i.length>0)||j("InvalidXml","Invalid '"+JSON.stringify(i.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):j("InvalidXml","Start tag expected.",1)};const V='"',L="'";function D(e,t){let i="",n="",r=!1;for(;t<e.length;t++){if(e[t]===V||e[t]===L)""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){r=!0;break}i+=e[t]}return""===n&&{value:i,index:t,tagClosed:r}}const R=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function k(e,t){const i=C.getAllMatches(e,R),n={};for(let e=0;e<i.length;e++){if(0===i[e][1].length)return j("InvalidAttr","Attribute '"+i[e][2]+"' has no space in starting.",$(i[e]));if(void 0!==i[e][3]&&void 0===i[e][4])return j("InvalidAttr","Attribute '"+i[e][2]+"' is without value.",$(i[e]));if(void 0===i[e][3]&&!t.allowBooleanAttributes)return j("InvalidAttr","boolean attribute '"+i[e][2]+"' is not allowed.",$(i[e]));const r=i[e][2];if(!F(r))return j("InvalidAttr","Attribute '"+r+"' is an invalid name.",$(i[e]));if(n.hasOwnProperty(r))return j("InvalidAttr","Attribute '"+r+"' is repeated.",$(i[e]));n[r]=1}return!0}function M(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let i=/\d/;for("x"===e[t]&&(t++,i=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(i))break}return-1}(e,++t);let i=0;for(;t<e.length;t++,i++)if(!(e[t].match(/\w/)&&i<20)){if(";"===e[t])break;return-1}return t}function j(e,t,i){return{err:{code:e,msg:t,line:i.line||i,col:i.col}}}function F(e){return C.isName(e)}function B(e){return C.isName(e)}function H(e,t){const i=e.substring(0,t).split(/\r?\n/);return{line:i.length,col:i[i.length-1].length+1}}function $(e){return e.startIndex+e[1].length}var U={};const Z={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,i){return e}};U.buildOptions=function(e){return Object.assign({},Z,e)},U.defaultOptions=Z;const G=I;function Y(e,t){let i="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)i+=e[t];if(i=i.trim(),-1!==i.indexOf(" "))throw new Error("External entites are not supported");const n=e[t++];let r="";for(;t<e.length&&e[t]!==n;t++)r+=e[t];return[i,r,t]}function q(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function z(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function X(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function K(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function W(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function J(e){if(G.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}const Q=/^[-+]?0x[a-fA-F0-9]+$/,ee=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const te={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};const ie=I,ne=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}},re=function(e,t){const i={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let n=1,r=!1,s=!1,o="";for(;t<e.length;t++)if("<"!==e[t]||s)if(">"===e[t]){if(s?"-"===e[t-1]&&"-"===e[t-2]&&(s=!1,n--):n--,0===n)break}else"["===e[t]?r=!0:o+=e[t];else{if(r&&z(e,t))t+=7,[entityName,val,t]=Y(e,t+1),-1===val.indexOf("&")&&(i[J(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(r&&X(e,t))t+=8;else if(r&&K(e,t))t+=8;else if(r&&W(e,t))t+=9;else{if(!q)throw new Error("Invalid DOCTYPE");s=!0}n++,o=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:i,i:t}},se=function(e,t={}){if(t=Object.assign({},te,t),!e||"string"!=typeof e)return e;let i=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(i))return e;if(t.hex&&Q.test(i))return Number.parseInt(i,16);{const n=ee.exec(i);if(n){const r=n[1],s=n[2];let o=function(e){return e&&-1!==e.indexOf(".")&&("."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1))),e}(n[3]);const a=n[4]||n[6];if(!t.leadingZeros&&s.length>0&&r&&"."!==i[2])return e;if(!t.leadingZeros&&s.length>0&&!r&&"."!==i[1])return e;{const n=Number(i),l=""+n;return-1!==l.search(/[eE]/)||a?t.eNotation?n:e:-1!==i.indexOf(".")?"0"===l&&""===o||l===o||r&&l==="-"+o?n:e:s?o===l||r+o===l?n:e:i===l||i===r+l?n:e}}return e}};function oe(e){const t=Object.keys(e);for(let i=0;i<t.length;i++){const n=t[i];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:e[n]}}}function ae(e,t,i,n,r,s,o){if(void 0!==e&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e));const n=this.options.tagValueProcessor(t,e,i,r,s);return null==n?e:typeof n!=typeof e||n!==e?n:this.options.trimValues||e.trim()===e?be(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function le(e){if(this.options.removeNSPrefix){const t=e.split(":"),i="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=i+t[1])}return e}"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,ie.nameRegexp);const ue=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function he(e,t,i){if(!this.options.ignoreAttributes&&"string"==typeof e){const i=ie.getAllMatches(e,ue),n=i.length,r={};for(let e=0;e<n;e++){const n=this.resolveNameSpace(i[e][1]);let s=i[e][4],o=this.options.attributeNamePrefix+n;if(n.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s);const e=this.options.attributeValueProcessor(n,s,t);r[o]=null==e?s:typeof e!=typeof s||e!==s?e:be(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(r[o]=!0)}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=r,e}return r}}const de=function(e){e=e.replace(/\r\n?/g,"\n");const t=new ne("!xml");let i=t,n="",r="";for(let s=0;s<e.length;s++)if("<"===e[s])if("/"===e[s+1]){const t=me(e,">",s,"Closing Tag is not closed.");let o=e.substring(s+2,t).trim();if(this.options.removeNSPrefix){const e=o.indexOf(":");-1!==e&&(o=o.substr(e+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),i&&(n=this.saveTextToParentTag(n,i,r));const a=r.substring(r.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=r.lastIndexOf(".",r.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=r.lastIndexOf("."),r=r.substring(0,l),i=this.tagsNodeStack.pop(),n="",s=t}else if("?"===e[s+1]){let t=we(e,s,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,i,r),!(this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags)){const e=new ne(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,r,t.tagName)),this.addChild(i,e,r)}s=t.closeIndex+1}else if("!--"===e.substr(s+1,3)){const t=me(e,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const o=e.substring(s+4,t-2);n=this.saveTextToParentTag(n,i,r),i.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}s=t}else if("!D"===e.substr(s+1,2)){const t=re(e,s);this.docTypeEntities=t.entities,s=t.i}else if("!["===e.substr(s+1,2)){const t=me(e,"]]>",s,"CDATA is not closed.")-2,o=e.substring(s+9,t);if(n=this.saveTextToParentTag(n,i,r),this.options.cdataPropName)i.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]);else{let e=this.parseTextData(o,i.tagname,r,!0,!1,!0);null==e&&(e=""),i.add(this.options.textNodeName,e)}s=t+2}else{let o=we(e,s,this.options.removeNSPrefix),a=o.tagName;const l=o.rawTagName;let u=o.tagExp,h=o.attrExpPresent,d=o.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),i&&n&&"!xml"!==i.tagname&&(n=this.saveTextToParentTag(n,i,r,!1));const c=i;if(c&&-1!==this.options.unpairedTags.indexOf(c.tagname)&&(i=this.tagsNodeStack.pop(),r=r.substring(0,r.lastIndexOf("."))),a!==t.tagname&&(r+=r?"."+a:a),this.isItStopNode(this.options.stopNodes,r,a)){let t="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)s=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))s=o.closeIndex;else{const i=this.readStopNodeData(e,l,d+1);if(!i)throw new Error(`Unexpected end of ${l}`);s=i.i,t=i.tagContent}const n=new ne(a);a!==u&&h&&(n[":@"]=this.buildAttributesMap(u,r,a)),t&&(t=this.parseTextData(t,a,r,!0,h,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),n.add(this.options.textNodeName,t),this.addChild(i,n,r)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),r=r.substr(0,r.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const e=new ne(a);a!==u&&h&&(e[":@"]=this.buildAttributesMap(u,r,a)),this.addChild(i,e,r),r=r.substr(0,r.lastIndexOf("."))}else{const e=new ne(a);this.tagsNodeStack.push(i),a!==u&&h&&(e[":@"]=this.buildAttributesMap(u,r,a)),this.addChild(i,e,r),i=e}n="",s=d}}else n+=e[s];return t.child};function ce(e,t,i){const n=this.options.updateTag(t.tagname,i,t[":@"]);!1===n||("string"==typeof n&&(t.tagname=n),e.addChild(t))}const pe=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const i=this.docTypeEntities[t];e=e.replace(i.regx,i.val)}for(let t in this.lastEntities){const i=this.lastEntities[t];e=e.replace(i.regex,i.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const i=this.htmlEntities[t];e=e.replace(i.regex,i.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function fe(e,t,i,n){return e&&(void 0===n&&(n=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,i,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function ge(e,t,i){const n="*."+i;for(const i in e){const r=e[i];if(n===r||t===r)return!0}return!1}function me(e,t,i,n){const r=e.indexOf(t,i);if(-1===r)throw new Error(n);return r+t.length-1}function we(e,t,i,n=">"){const r=function(e,t,i=">"){let n,r="";for(let s=t;s<e.length;s++){let t=e[s];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===i[0]){if(!i[1])return{data:r,index:s};if(e[s+1]===i[1])return{data:r,index:s}}else"\t"===t&&(t=" ");r+=t}}(e,t+1,n);if(!r)return;let s=r.data;const o=r.index,a=s.search(/\s/);let l=s,u=!0;-1!==a&&(l=s.substr(0,a).replace(/\s\s*$/,""),s=s.substr(a+1));const h=l;if(i){const e=l.indexOf(":");-1!==e&&(l=l.substr(e+1),u=l!==r.data.substr(e+1))}return{tagName:l,tagExp:s,closeIndex:o,attrExpPresent:u,rawTagName:h}}function ve(e,t,i){const n=i;let r=1;for(;i<e.length;i++)if("<"===e[i])if("/"===e[i+1]){const s=me(e,">",i,`${t} is not closed`);if(e.substring(i+2,s).trim()===t&&(r--,0===r))return{tagContent:e.substring(n,i),i:s};i=s}else if("?"===e[i+1])i=me(e,"?>",i+1,"StopNode is not closed.");else if("!--"===e.substr(i+1,3))i=me(e,"--\x3e",i+3,"StopNode is not closed.");else if("!["===e.substr(i+1,2))i=me(e,"]]>",i,"StopNode is not closed.")-2;else{const n=we(e,i,">");n&&((n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&r++,i=n.closeIndex)}}function be(e,t,i){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&se(e,i)}return ie.isExist(e)?e:""}var xe={};function ye(e,t,i){let n;const r={};for(let s=0;s<e.length;s++){const o=e[s],a=Ne(o);let l="";if(l=void 0===i?a:i+"."+a,a===t.textNodeName)void 0===n?n=o[a]:n+=""+o[a];else{if(void 0===a)continue;if(o[a]){let e=ye(o[a],t,l);const i=_e(e,t);o[":@"]?Ee(e,o[":@"],l,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==r[a]&&r.hasOwnProperty(a)?(Array.isArray(r[a])||(r[a]=[r[a]]),r[a].push(e)):t.isArray(a,l,i)?r[a]=[e]:r[a]=e}}}return"string"==typeof n?n.length>0&&(r[t.textNodeName]=n):void 0!==n&&(r[t.textNodeName]=n),r}function Ne(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const i=t[e];if(":@"!==i)return i}}function Ee(e,t,i,n){if(t){const r=Object.keys(t),s=r.length;for(let o=0;o<s;o++){const s=r[o];n.isArray(s,i+"."+s,!0,!0)?e[s]=[t[s]]:e[s]=t[s]}}}function _e(e,t){const{textNodeName:i}=t,n=Object.keys(e).length;return!(0!==n&&(1!==n||!e[i]&&"boolean"!=typeof e[i]&&0!==e[i]))}xe.prettify=function(e,t){return ye(e,t)};const{buildOptions:Ae}=U,Ie=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"}},this.addExternalEntities=oe,this.parseXml=de,this.parseTextData=ae,this.resolveNameSpace=le,this.buildAttributesMap=he,this.isItStopNode=ge,this.replaceEntitiesValue=pe,this.readStopNodeData=ve,this.saveTextToParentTag=fe,this.addChild=ce}},{prettify:Ce}=xe,Te=A;function Oe(e,t,i,n){let r="",s=!1;for(let o=0;o<e.length;o++){const a=e[o],l=Pe(a);if(void 0===l)continue;let u="";if(u=0===i.length?l:`${i}.${l}`,l===t.textNodeName){let e=a[l];Ve(u,t)||(e=t.tagValueProcessor(l,e),e=Le(e,t)),s&&(r+=n),r+=e,s=!1;continue}if(l===t.cdataPropName){s&&(r+=n),r+=`<![CDATA[${a[l][0][t.textNodeName]}]]>`,s=!1;continue}if(l===t.commentPropName){r+=n+`\x3c!--${a[l][0][t.textNodeName]}--\x3e`,s=!0;continue}if("?"===l[0]){const e=Se(a[":@"],t),i="?xml"===l?"":n;let o=a[l][0][t.textNodeName];o=0!==o.length?" "+o:"",r+=i+`<${l}${o}${e}?>`,s=!0;continue}let h=n;""!==h&&(h+=t.indentBy);const d=n+`<${l}${Se(a[":@"],t)}`,c=Oe(a[l],t,u,h);-1!==t.unpairedTags.indexOf(l)?t.suppressUnpairedNode?r+=d+">":r+=d+"/>":c&&0!==c.length||!t.suppressEmptyNode?c&&c.endsWith(">")?r+=d+`>${c}${n}</${l}>`:(r+=d+">",c&&""!==n&&(c.includes("/>")||c.includes("</"))?r+=n+t.indentBy+c+n:r+=c,r+=`</${l}>`):r+=d+"/>",s=!0}return r}function Pe(e){const t=Object.keys(e);for(let i=0;i<t.length;i++){const n=t[i];if(e.hasOwnProperty(n)&&":@"!==n)return n}}function Se(e,t){let i="";if(e&&!t.ignoreAttributes)for(let n in e){if(!e.hasOwnProperty(n))continue;let r=t.attributeValueProcessor(n,e[n]);r=Le(r,t),!0===r&&t.suppressBooleanAttributes?i+=` ${n.substr(t.attributeNamePrefix.length)}`:i+=` ${n.substr(t.attributeNamePrefix.length)}="${r}"`}return i}function Ve(e,t){let i=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+i)return!0;return!1}function Le(e,t){if(e&&e.length>0&&t.processEntities)for(let i=0;i<t.entities.length;i++){const n=t.entities[i];e=e.replace(n.regex,n.val)}return e}const De=function(e,t){let i="";return t.format&&t.indentBy.length>0&&(i="\n"),Oe(e,t,"",i)},Re={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:"  ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function ke(e){this.options=Object.assign({},Re,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Fe),this.processTextOrObjNode=Me,this.options.format?(this.indentate=je,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Me(e,t,i){const n=this.j2x(e,i+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,n.attrStr,i):this.buildObjectNode(n.val,t,n.attrStr,i)}function je(e){return this.options.indentBy.repeat(e)}function Fe(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}ke.prototype.build=function(e){return this.options.preserveOrder?De(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},ke.prototype.j2x=function(e,t){let i="",n="";for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r))if(typeof e[r]>"u")this.isAttribute(r)&&(n+="");else if(null===e[r])this.isAttribute(r)?n+="":"?"===r[0]?n+=this.indentate(t)+"<"+r+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+r+"/"+this.tagEndChar;else if(e[r]instanceof Date)n+=this.buildTextValNode(e[r],r,"",t);else if("object"!=typeof e[r]){const s=this.isAttribute(r);if(s)i+=this.buildAttrPairStr(s,""+e[r]);else if(r===this.options.textNodeName){let t=this.options.tagValueProcessor(r,""+e[r]);n+=this.replaceEntitiesValue(t)}else n+=this.buildTextValNode(e[r],r,"",t)}else if(Array.isArray(e[r])){const i=e[r].length;let s="";for(let o=0;o<i;o++){const i=e[r][o];typeof i>"u"||(null===i?"?"===r[0]?n+=this.indentate(t)+"<"+r+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+r+"/"+this.tagEndChar:"object"==typeof i?this.options.oneListGroup?s+=this.j2x(i,t+1).val:s+=this.processTextOrObjNode(i,r,t):s+=this.buildTextValNode(i,r,"",t))}this.options.oneListGroup&&(s=this.buildObjectNode(s,r,"",t)),n+=s}else if(this.options.attributesGroupName&&r===this.options.attributesGroupName){const t=Object.keys(e[r]),n=t.length;for(let s=0;s<n;s++)i+=this.buildAttrPairStr(t[s],""+e[r][t[s]])}else n+=this.processTextOrObjNode(e[r],r,t);return{attrStr:i,val:n}},ke.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},ke.prototype.buildObjectNode=function(e,t,i,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+i+"?"+this.tagEndChar:this.indentate(n)+"<"+t+i+this.closeTag(t)+this.tagEndChar;{let r="</"+t+this.tagEndChar,s="";return"?"===t[0]&&(s="?",r=""),!i&&""!==i||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===s.length?this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(n)+"<"+t+i+s+this.tagEndChar+e+this.indentate(n)+r:this.indentate(n)+"<"+t+i+s+">"+e+r}},ke.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},ke.prototype.buildTextValNode=function(e,t,i,n){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(n)+"<"+t+i+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(t,e);return r=this.replaceEntitiesValue(r),""===r?this.indentate(n)+"<"+t+i+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+i+">"+r+"</"+t+this.tagEndChar}},ke.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const i=this.options.entities[t];e=e.replace(i.regex,i.val)}return e};var Be={XMLParser:class{constructor(e){this.externalEntities={},this.options=Ae(e)}parse(e,t){if("string"!=typeof e){if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const i=Te.validate(e,t);if(!0!==i)throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`)}const i=new Ie(this.options);i.addExternalEntities(this.externalEntities);const n=i.parseXml(e);return this.options.preserveOrder||void 0===n?n:Ce(n,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}},XMLValidator:A,XMLBuilder:ke};class He{_view;constructor(e){$e(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 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}}const $e=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(e.columns&&e.columns.length>0&&(!e.caption||"string"!=typeof e.caption))throw new Error("View caption is required for top-level views and must be a string");if(!e.getContents||"function"!=typeof e.getContents)throw new Error("View getContents is required and must be a function");if(!e.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||!0!==Be.XMLValidator.validate(e))return!1;let t;const i=new Be.XMLParser;try{t=i.parse(e)}catch{return!1}return!(!t||!("svg"in t))}(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 is required and must be a number");if(e.columns&&e.columns.forEach((e=>{if(!(e instanceof E))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");return!0},Ue='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-account-group" viewBox="0 0 24 24"><path d="M12,5.5A3.5,3.5 0 0,1 15.5,9A3.5,3.5 0 0,1 12,12.5A3.5,3.5 0 0,1 8.5,9A3.5,3.5 0 0,1 12,5.5M5,8C5.56,8 6.08,8.15 6.53,8.42C6.38,9.85 6.8,11.27 7.66,12.38C7.16,13.34 6.16,14 5,14A3,3 0 0,1 2,11A3,3 0 0,1 5,8M19,8A3,3 0 0,1 22,11A3,3 0 0,1 19,14C17.84,14 16.84,13.34 16.34,12.38C17.2,11.27 17.62,9.85 17.47,8.42C17.92,8.15 18.44,8 19,8M5.5,18.25C5.5,16.18 8.41,14.5 12,14.5C15.59,14.5 18.5,16.18 18.5,18.25V20H5.5V18.25M0,20V18.5C0,17.11 1.89,15.94 4.45,15.6C3.86,16.28 3.5,17.22 3.5,18.25V20H0M24,20H20.5V18.25C20.5,17.22 20.14,16.28 19.55,15.6C22.11,15.94 24,17.11 24,18.5V20Z" /></svg>',Ze='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-account-plus" viewBox="0 0 24 24"><path d="M15,14C12.33,14 7,15.33 7,18V20H23V18C23,15.33 17.67,14 15,14M6,10V7H4V10H1V12H4V15H6V12H9V10M15,12A4,4 0 0,0 19,8A4,4 0 0,0 15,4A4,4 0 0,0 11,8A4,4 0 0,0 15,12Z" /></svg>',Ge='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-link" viewBox="0 0 24 24"><path d="M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z" /></svg>';var Ye=i(93664);const qe=(0,s.IY)().setApp("files_sharing").detectUser().build(),ze=`/files/${(0,r.ts)()?.uid}`,Xe={"Content-Type":"application/json"},Ke=function(e){try{const t="folder"===e?.item_type,i=!0===e?.has_preview,n=t?y:x,r=e.file_source,s=e?.path||e.file_target,o=(0,l.generateRemoteUrl)(`dav/${ze}/${s}`.replaceAll(/\/\//gm,"/"));let a=e?.item_mtime?new Date(1e3*e.item_mtime):void 0;return e?.stime>(e?.item_mtime||0)&&(a=new Date(1e3*e.stime)),new n({id:r,source:o,owner:e?.uid_owner,mime:e?.mimetype,mtime:a,size:e?.item_size,permissions:e?.item_permissions||e?.permissions,root:ze,attributes:{...e,"has-preview":i,favorite:e?.tags?.includes(window.OC.TAG_FAVORITE)?1:0}})}catch(e){return qe.error("Error while parsing OCS entry",{error:e}),null}},We=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=(0,l.generateOcsUrl)("apps/files_sharing/api/v1/shares");return Ye.Z.get(t,{headers:Xe,params:{shared_with_me:e,include_tags:!0}})},Je=async function(){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const s=[];(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&s.push(We(!0),function(){const e=(0,l.generateOcsUrl)("apps/files_sharing/api/v1/remote_shares");return Ye.Z.get(e,{headers:Xe,params:{include_tags:!0}})}()),e&&s.push(We()),t&&s.push(function(){const e=(0,l.generateOcsUrl)("apps/files_sharing/api/v1/shares/pending");return Ye.Z.get(e,{headers:Xe,params:{include_tags:!0}})}(),function(){const e=(0,l.generateOcsUrl)("apps/files_sharing/api/v1/remote_shares/pending");return Ye.Z.get(e,{headers:Xe,params:{include_tags:!0}})}()),i&&s.push(function(){const e=(0,l.generateOcsUrl)("apps/files_sharing/api/v1/deletedshares");return Ye.Z.get(e,{headers:Xe,params:{include_tags:!0}})}());let o=(await Promise.all(s)).map((e=>e.data.ocs.data)).flat().map(Ke).filter((e=>null!==e));return n.length>0&&(o=o.filter((e=>n.includes(e.attributes?.share_type)))),{folder:new y({id:0,source:(0,l.generateRemoteUrl)("dav"+ze),owner:(0,r.ts)()?.uid||null}),contents:o}},Qe="shareoverview",et="sharingin",tt="sharingout",it="sharinglinks",nt="deletedshares",rt="pendingshares";var st=i(69183);p(new c({id:"accept-share",displayName:e=>(0,n.uN)("files_sharing","Accept share","Accept shares",e.length),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-check" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" /></svg>',enabled:(e,t)=>e.length>0&&t.id===rt,async exec(e){try{const t=!!e.attributes.remote,i=(0,l.generateOcsUrl)("apps/files_sharing/api/v1/{shareBase}/pending/{id}",{shareBase:t?"remote_shares":"shares",id:e.attributes.id});return await Ye.Z.post(i),(0,st.j8)("files:node:deleted",e),!0}catch(e){return!1}},async execBatch(e,t,i){return Promise.all(e.map((e=>this.exec(e,t,i))))},order:1,inline:()=>!0})),p(new c({id:"open-in-files",displayName:()=>(0,n.Iu)("files","Open in Files"),iconSvgInline:()=>"",enabled:(e,t)=>[Qe,et,tt,it].includes(t.id),exec:async e=>(window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:e.fileid},{dir:e.dirname}),null),order:-1e3,default:d.HIDDEN})),p(new c({id:"reject-share",displayName:e=>(0,n.uN)("files_sharing","Reject share","Reject shares",e.length),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-close" viewBox="0 0 24 24"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>',enabled:(e,t)=>t.id===rt&&0!==e.length&&!e.some((e=>e.attributes.remote_id&&e.attributes.share_type===window.OC.Share.SHARE_TYPE_REMOTE_GROUP)),async exec(e){try{const t=!!e.attributes.remote,i=(0,l.generateOcsUrl)("apps/files_sharing/api/v1/{shareBase}/{id}",{shareBase:t?"remote_shares":"shares",id:e.attributes.id});return await Ye.Z.delete(i),(0,st.j8)("files:node:deleted",e),!0}catch(e){return!1}},async execBatch(e,t,i){return Promise.all(e.map((e=>this.exec(e,t,i))))},order:2,inline:()=>!0})),p(new c({id:"restore-share",displayName:e=>(0,n.uN)("files_sharing","Restore share","Restore shares",e.length),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-arrow-u-left-top" viewBox="0 0 24 24"><path d="M20 13.5C20 17.09 17.09 20 13.5 20H6V18H13.5C16 18 18 16 18 13.5S16 9 13.5 9H7.83L10.91 12.09L9.5 13.5L4 8L9.5 2.5L10.92 3.91L7.83 7H13.5C17.09 7 20 9.91 20 13.5Z" /></svg>',enabled:(e,t)=>e.length>0&&t.id===nt,async exec(e){try{const t=(0,l.generateOcsUrl)("apps/files_sharing/api/v1/deletedshares/{id}",{id:e.attributes.id});return await Ye.Z.post(t),(0,st.j8)("files:node:deleted",e),!0}catch(e){return!1}},async execBatch(e,t,i){return Promise.all(e.map((e=>this.exec(e,t,i))))},order:1,inline:()=>!0}));var ot=i(41922),at=i(48250);const lt=(0,s.IY)().setApp("files").detectUser().build(),ut=new c({id:"details",displayName:()=>(0,n.Iu)("files","Open details"),iconSvgInline:()=>at,enabled:e=>1===e.length&&!!e[0]&&!!window?.OCA?.Files?.Sidebar&&((e[0].root?.startsWith("/files/")&&e[0].permissions!==f.NONE)??!1),async exec(e,t,i){try{return await window.OCA.Files.Sidebar.open(e.path),window.OCP.Files.Router.goToRoute(null,{view:t.id,fileid:e.fileid},{dir:i},!0),null}catch(e){return lt.error("Error while opening sidebar",{error:e}),!1}},order:-50});var ht=i(93379),dt=i.n(ht),ct=i(7795),pt=i.n(ct),ft=i(90569),gt=i.n(ft),mt=i(3565),wt=i.n(mt),vt=i(19216),bt=i.n(vt),xt=i(44589),yt=i.n(xt),Nt=i(8492),Et={};Et.styleTagTransform=yt(),Et.setAttributes=wt(),Et.insert=gt().bind(null,"head"),Et.domAPI=pt(),Et.insertStyleElement=bt(),dt()(Nt.Z,Et),Nt.Z&&Nt.Z.locals&&Nt.Z.locals,p(new c({id:"sharing-status",displayName(e){const t=e[0],i=Object.values(t?.attributes?.["share-types"]||{}).flat(),s=t?.attributes?.["owner-id"];return i.length>0||s&&s!==(0,r.ts)()?.uid?(0,n.Iu)("files_sharing","Shared"):""},title(e){const t=e[0],i=t?.attributes?.["owner-id"],s=t?.attributes?.["owner-display-name"];return i&&i!==(0,r.ts)()?.uid?(0,n.Iu)("files_sharing","Shared by {ownerDisplayName}",{ownerDisplayName:s}):(0,n.Iu)("files_sharing","Show sharing options")},iconSvgInline(e){const t=e[0],i=Object.values(t?.attributes?.["share-types"]||{}).flat();if(i.includes(ot.D.SHARE_TYPE_LINK)||i.includes(ot.D.SHARE_TYPE_EMAIL))return Ge;if(i.includes(ot.D.SHARE_TYPE_GROUP)||i.includes(ot.D.SHARE_TYPE_REMOTE_GROUP))return Ue;if(i.includes(ot.D.SHARE_TYPE_CIRCLE))return'<svg width="16" height="16" viewBox="0 0 21.33 21.33" xmlns="http://www.w3.org/2000/svg"><path d="M10.67 1.33a9.34 9.34 0 100 18.68 9.34 9.34 0 000-18.68zM6.93 15.8a2.33 2.33 0 110-4.67 2.33 2.33 0 010 4.67zm1.4-8.87a2.33 2.33 0 114.67 0 2.33 2.33 0 01-4.67 0zm6.07 8.87a2.33 2.33 0 110-4.67 2.33 2.33 0 010 4.67z"/></svg>\n';const n=t?.attributes?.["owner-id"];return n&&n!==(0,r.ts)()?.uid?(s=n,`<svg width="32" height="32" viewBox="0 0 32 32"\n\t\txmlns="http://www.w3.org/2000/svg" class="sharing-status__avatar">\n\t\t<image href="${(0,l.generateUrl)("/avatar/{userId}/32",{userId:s})}" height="32" width="32" />\n\t</svg>`):Ze;var s},enabled(e){if(1!==e.length)return!1;const t=e[0],i=t?.attributes?.["owner-id"];return!(!i||i===(0,r.ts)()?.uid)||0!=(t.permissions&f.SHARE)},exec:async(e,t,i)=>0!=(e.permissions&f.READ)?(window.OCA?.Files?.Sidebar?.setActiveTab?.("sharing"),ut.exec(e,t,i)):null,inline:()=>!0})),(()=>{const e=(typeof window._nc_navigation>"u"&&(window._nc_navigation=new N,u.debug("Navigation service initialized")),window._nc_navigation);e.register(new He({id:Qe,name:(0,n.Iu)("files_sharing","Shares"),caption:(0,n.Iu)("files_sharing","Overview of shared files."),emptyTitle:(0,n.Iu)("files_sharing","No shares"),emptyCaption:(0,n.Iu)("files_sharing","Files and folders you shared or have been shared with you will show up here"),icon:Ze,order:20,columns:[],getContents:()=>Je()})),e.register(new He({id:et,name:(0,n.Iu)("files_sharing","Shared with you"),caption:(0,n.Iu)("files_sharing","List of files that are shared with you."),emptyTitle:(0,n.Iu)("files_sharing","Nothing shared with you yet"),emptyCaption:(0,n.Iu)("files_sharing","Files and folders others shared with you will show up here"),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-account" viewBox="0 0 24 24"><path d="M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z" /></svg>',order:1,parent:Qe,columns:[],getContents:()=>Je(!0,!1,!1,!1)})),e.register(new He({id:tt,name:(0,n.Iu)("files_sharing","Shared with others"),caption:(0,n.Iu)("files_sharing","List of files that you shared with others."),emptyTitle:(0,n.Iu)("files_sharing","Nothing shared yet"),emptyCaption:(0,n.Iu)("files_sharing","Files and folders you shared will show up here"),icon:Ue,order:2,parent:Qe,columns:[],getContents:()=>Je(!1,!0,!1,!1)})),e.register(new He({id:it,name:(0,n.Iu)("files_sharing","Shared by link"),caption:(0,n.Iu)("files_sharing","List of files that are shared by link."),emptyTitle:(0,n.Iu)("files_sharing","No shared links"),emptyCaption:(0,n.Iu)("files_sharing","Files and folders you shared by link will show up here"),icon:Ge,order:3,parent:Qe,columns:[],getContents:()=>Je(!1,!0,!1,!1,[window.OC.Share.SHARE_TYPE_LINK])})),e.register(new He({id:nt,name:(0,n.Iu)("files_sharing","Deleted shares"),caption:(0,n.Iu)("files_sharing","List of shares you left."),emptyTitle:(0,n.Iu)("files_sharing","No deleted shares"),emptyCaption:(0,n.Iu)("files_sharing","Shares you have left will show up here"),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-delete" viewBox="0 0 24 24"><path d="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z" /></svg>',order:4,parent:Qe,columns:[],getContents:()=>Je(!1,!1,!1,!0)})),e.register(new He({id:rt,name:(0,n.Iu)("files_sharing","Pending shares"),caption:(0,n.Iu)("files_sharing","List of unapproved shares."),emptyTitle:(0,n.Iu)("files_sharing","No pending shares"),emptyCaption:(0,n.Iu)("files_sharing","Shares you have received but not approved will show up here"),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-account-clock" viewBox="0 0 24 24"><path d="M10.63,14.1C12.23,10.58 16.38,9.03 19.9,10.63C23.42,12.23 24.97,16.38 23.37,19.9C22.24,22.4 19.75,24 17,24C14.3,24 11.83,22.44 10.67,20H1V18C1.06,16.86 1.84,15.93 3.34,15.18C4.84,14.43 6.72,14.04 9,14C9.57,14 10.11,14.05 10.63,14.1V14.1M9,4C10.12,4.03 11.06,4.42 11.81,5.17C12.56,5.92 12.93,6.86 12.93,8C12.93,9.14 12.56,10.08 11.81,10.83C11.06,11.58 10.12,11.95 9,11.95C7.88,11.95 6.94,11.58 6.19,10.83C5.44,10.08 5.07,9.14 5.07,8C5.07,6.86 5.44,5.92 6.19,5.17C6.94,4.42 7.88,4.03 9,4M17,22A5,5 0 0,0 22,17A5,5 0 0,0 17,12A5,5 0 0,0 12,17A5,5 0 0,0 17,22M16,14H17.5V16.82L19.94,18.23L19.19,19.53L16,17.69V14Z" /></svg>',order:5,parent:Qe,columns:[],getContents:()=>Je(!1,!1,!0,!1)}))})()},8492:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(87537),r=i.n(n),s=i(23645),o=i.n(s)()(r());o.push([e.id,".action-items>.files-list__row-action-sharing-status{direction:rtl;padding-right:0 !important}svg.sharing-status__avatar{height:32px !important;width:32px !important;max-height:32px !important;max-width:32px !important;border-radius:32px;overflow:hidden}","",{version:3,sources:["webpack://./apps/files_sharing/src/actions/sharingStatusAction.scss"],names:[],mappings:"AAsBA,qDAEC,aAAA,CAEG,0BAAA,CAGJ,2BACC,sBAAA,CACA,qBAAA,CACA,0BAAA,CACA,yBAAA,CACA,kBAAA,CACA,eAAA",sourcesContent:["/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n // Only when rendered inline, when not enough space, this is put in the menu\n.action-items > .files-list__row-action-sharing-status {\n\t// put icon at the end of the button\n\tdirection: rtl;\n\t// align icons with textless inline actions\n    padding-right: 0 !important;\n}\n\nsvg.sharing-status__avatar {\n\theight: 32px !important;\n\twidth: 32px !important;\n\tmax-height: 32px !important;\n\tmax-width: 32px !important;\n\tborder-radius: 32px;\n\toverflow: hidden;\n}\n"],sourceRoot:""}]);const a=o}},i={};function n(e){var r=i[e];if(void 0!==r)return r.exports;var s=i[e]={id:e,loaded:!1,exports:{}};return t[e].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.m=t,e=[],n.O=(t,i,r,s)=>{if(!i){var o=1/0;for(h=0;h<e.length;h++){i=e[h][0],r=e[h][1],s=e[h][2];for(var a=!0,l=0;l<i.length;l++)(!1&s||o>=s)&&Object.keys(n.O).every((e=>n.O[e](i[l])))?i.splice(l--,1):(a=!1,s<o&&(o=s));if(a){e.splice(h--,1);var u=r();void 0!==u&&(t=u)}}return t}s=s||0;for(var h=e.length;h>0&&e[h-1][2]>s;h--)e[h]=e[h-1];e[h]=[i,r,s]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.e=()=>Promise.resolve(),n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.j=1609,(()=>{n.b=document.baseURI||self.location.href;var e={1609:0};n.O.j=t=>0===e[t];var t=(t,i)=>{var r,s,o=i[0],a=i[1],l=i[2],u=0;if(o.some((t=>0!==e[t]))){for(r in a)n.o(a,r)&&(n.m[r]=a[r]);if(l)var h=l(n)}for(t&&t(i);u<o.length;u++)s=o[u],n.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return n.O(h)},i=self.webpackChunknextcloud=self.webpackChunknextcloud||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})(),n.nc=void 0;var r=n.O(void 0,[7874],(()=>n(11090)));r=n.O(r)})();
+//# sourceMappingURL=files_sharing-init.js.map?v=ccdcb3e75c0ee1fcfd13
\ No newline at end of file
index f3dd52711712424c9c74a4851535ef37d20e6590..876c933e235ec39de3a90b7da2304700726de958 100644 (file)
@@ -1 +1 @@
-{"version":3,"file":"files_sharing-init.js?v=c40249092fcbe4a9fcdb","mappings":";uBAAIA,oGC4BJ,MAAwGC,EAAhF,QAAZC,GAAmG,YAAhF,UAAIC,OAAO,SAASC,SAAU,UAAID,OAAO,SAASE,OAAOH,EAAEI,KAAKF,QAApF,IAACF,EA0IRK,EAAoB,CAAEL,IAAOA,EAAEM,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W,CAAC,OAAO,IAAOkG,EAAoB,SAC9F6C,EAAsB7C,EAAoBrW,EAAEkZ","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/node_modules/@nextcloud/files/dist/index.mjs","webpack:///nextcloud/apps/files_sharing/src/services/logger.ts","webpack:///nextcloud/apps/files_sharing/src/services/SharingService.ts","webpack:///nextcloud/apps/files_sharing/src/views/shares.ts","webpack:///nextcloud/apps/files_sharing/src/actions/acceptShareAction.ts","webpack:///nextcloud/apps/files_sharing/src/actions/openInFilesAction.ts","webpack:///nextcloud/apps/files_sharing/src/actions/rejectShareAction.ts","webpack:///nextcloud/apps/files_sharing/src/actions/restoreShareAction.ts","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files/src/actions/sidebarAction.ts","webpack://nextcloud/./apps/files_sharing/src/actions/sharingStatusAction.scss?3ea7","webpack:///nextcloud/apps/files_sharing/src/actions/sharingStatusAction.ts","webpack:///nextcloud/apps/files_sharing/src/init.ts","webpack:///nextcloud/apps/files_sharing/src/actions/sharingStatusAction.scss","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","import { getCurrentUser as A, onRequestTokenUpdate as ue, getRequestToken as de } from \"@nextcloud/auth\";\nimport { getLoggerBuilder as q } from \"@nextcloud/logger\";\nimport { getCanonicalLocale as ae } from \"@nextcloud/l10n\";\nimport { join as le, basename as fe, extname as ce, dirname as I } from \"path\";\nimport { encodePath as he } from \"@nextcloud/paths\";\nimport { generateRemoteUrl as pe } from \"@nextcloud/router\";\nimport { createClient as ge, getPatcher as we } from \"webdav\";\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst me = (e) => e === null ? q().setApp(\"files\").build() : q().setApp(\"files\").setUid(e.uid).build(), m = me(A());\n/**\n * @copyright Copyright (c) 2021 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Ne {\n  _entries = [];\n  registerEntry(t) {\n    this.validateEntry(t), this._entries.push(t);\n  }\n  unregisterEntry(t) {\n    const r = typeof t == \"string\" ? this.getEntryIndex(t) : this.getEntryIndex(t.id);\n    if (r === -1) {\n      m.warn(\"Entry not found, nothing removed\", { entry: t, entries: this.getEntries() });\n      return;\n    }\n    this._entries.splice(r, 1);\n  }\n  /**\n   * Get the list of registered entries\n   *\n   * @param {Folder} context the creation context. Usually the current folder\n   */\n  getEntries(t) {\n    return t ? this._entries.filter((r) => typeof r.enabled == \"function\" ? r.enabled(t) : !0) : this._entries;\n  }\n  getEntryIndex(t) {\n    return this._entries.findIndex((r) => r.id === t);\n  }\n  validateEntry(t) {\n    if (!t.id || !t.displayName || !(t.iconSvgInline || t.iconClass) || !t.handler)\n      throw new Error(\"Invalid entry\");\n    if (typeof t.id != \"string\" || typeof t.displayName != \"string\")\n      throw new Error(\"Invalid id or displayName property\");\n    if (t.iconClass && typeof t.iconClass != \"string\" || t.iconSvgInline && typeof t.iconSvgInline != \"string\")\n      throw new Error(\"Invalid icon provided\");\n    if (t.enabled !== void 0 && typeof t.enabled != \"function\")\n      throw new Error(\"Invalid enabled property\");\n    if (typeof t.handler != \"function\")\n      throw new Error(\"Invalid handler property\");\n    if (\"order\" in t && typeof t.order != \"number\")\n      throw new Error(\"Invalid order property\");\n    if (this.getEntryIndex(t.id) !== -1)\n      throw new Error(\"Duplicate entry\");\n  }\n}\nconst F = function() {\n  return typeof window._nc_newfilemenu > \"u\" && (window._nc_newfilemenu = new Ne(), m.debug(\"NewFileMenu initialized\")), window._nc_newfilemenu;\n};\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst C = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"], P = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\"];\nfunction Yt(e, t = !1, r = !1, s = !1) {\n  r = r && !s, typeof e == \"string\" && (e = Number(e));\n  let n = e > 0 ? Math.floor(Math.log(e) / Math.log(s ? 1e3 : 1024)) : 0;\n  n = Math.min((r ? P.length : C.length) - 1, n);\n  const i = r ? P[n] : C[n];\n  let d = (e / Math.pow(s ? 1e3 : 1024, n)).toFixed(1);\n  return t === !0 && n === 0 ? (d !== \"0.0\" ? \"< 1 \" : \"0 \") + (r ? P[1] : C[1]) : (n < 2 ? d = parseFloat(d).toFixed(0) : d = parseFloat(d).toLocaleString(ae()), d + \" \" + i);\n}\nfunction Jt(e, t = !1) {\n  try {\n    e = `${e}`.toLocaleLowerCase().replaceAll(/\\s+/g, \"\").replaceAll(\",\", \".\");\n  } catch {\n    return null;\n  }\n  const r = e.match(/^([0-9]*(\\.[0-9]*)?)([kmgtp]?)(i?)b?$/);\n  if (r === null || r[1] === \".\" || r[1] === \"\")\n    return null;\n  const s = {\n    \"\": 0,\n    k: 1,\n    m: 2,\n    g: 3,\n    t: 4,\n    p: 5,\n    e: 6\n  }, n = `${r[1]}`, i = r[4] === \"i\" || t ? 1024 : 1e3;\n  return Math.round(Number.parseFloat(n) * i ** s[r[3]]);\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar Z = /* @__PURE__ */ ((e) => (e.DEFAULT = \"default\", e.HIDDEN = \"hidden\", e))(Z || {});\nclass Qt {\n  _action;\n  constructor(t) {\n    this.validateAction(t), this._action = t;\n  }\n  get id() {\n    return this._action.id;\n  }\n  get displayName() {\n    return this._action.displayName;\n  }\n  get title() {\n    return this._action.title;\n  }\n  get iconSvgInline() {\n    return this._action.iconSvgInline;\n  }\n  get enabled() {\n    return this._action.enabled;\n  }\n  get exec() {\n    return this._action.exec;\n  }\n  get execBatch() {\n    return this._action.execBatch;\n  }\n  get order() {\n    return this._action.order;\n  }\n  get parent() {\n    return this._action.parent;\n  }\n  get default() {\n    return this._action.default;\n  }\n  get inline() {\n    return this._action.inline;\n  }\n  get renderInline() {\n    return this._action.renderInline;\n  }\n  validateAction(t) {\n    if (!t.id || typeof t.id != \"string\")\n      throw new Error(\"Invalid id\");\n    if (!t.displayName || typeof t.displayName != \"function\")\n      throw new Error(\"Invalid displayName function\");\n    if (\"title\" in t && typeof t.title != \"function\")\n      throw new Error(\"Invalid title function\");\n    if (!t.iconSvgInline || typeof t.iconSvgInline != \"function\")\n      throw new Error(\"Invalid iconSvgInline function\");\n    if (!t.exec || typeof t.exec != \"function\")\n      throw new Error(\"Invalid exec function\");\n    if (\"enabled\" in t && typeof t.enabled != \"function\")\n      throw new Error(\"Invalid enabled function\");\n    if (\"execBatch\" in t && typeof t.execBatch != \"function\")\n      throw new Error(\"Invalid execBatch function\");\n    if (\"order\" in t && typeof t.order != \"number\")\n      throw new Error(\"Invalid order\");\n    if (\"parent\" in t && typeof t.parent != \"string\")\n      throw new Error(\"Invalid parent\");\n    if (t.default && !Object.values(Z).includes(t.default))\n      throw new Error(\"Invalid default\");\n    if (\"inline\" in t && typeof t.inline != \"function\")\n      throw new Error(\"Invalid inline function\");\n    if (\"renderInline\" in t && typeof t.renderInline != \"function\")\n      throw new Error(\"Invalid renderInline function\");\n  }\n}\nconst Dt = function(e) {\n  if (typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions.find((t) => t.id === e.id)) {\n    m.error(`FileAction ${e.id} already registered`, { action: e });\n    return;\n  }\n  window._nc_fileactions.push(e);\n}, er = function() {\n  return typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass tr {\n  _header;\n  constructor(t) {\n    this.validateHeader(t), this._header = t;\n  }\n  get id() {\n    return this._header.id;\n  }\n  get order() {\n    return this._header.order;\n  }\n  get enabled() {\n    return this._header.enabled;\n  }\n  get render() {\n    return this._header.render;\n  }\n  get updated() {\n    return this._header.updated;\n  }\n  validateHeader(t) {\n    if (!t.id || !t.render || !t.updated)\n      throw new Error(\"Invalid header: id, render and updated are required\");\n    if (typeof t.id != \"string\")\n      throw new Error(\"Invalid id property\");\n    if (t.enabled !== void 0 && typeof t.enabled != \"function\")\n      throw new Error(\"Invalid enabled property\");\n    if (t.render && typeof t.render != \"function\")\n      throw new Error(\"Invalid render property\");\n    if (t.updated && typeof t.updated != \"function\")\n      throw new Error(\"Invalid updated property\");\n  }\n}\nconst rr = function(e) {\n  if (typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader.find((t) => t.id === e.id)) {\n    m.error(`Header ${e.id} already registered`, { header: e });\n    return;\n  }\n  window._nc_filelistheader.push(e);\n}, nr = function() {\n  return typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar N = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = \"NONE\", e[e.CREATE = 4] = \"CREATE\", e[e.READ = 1] = \"READ\", e[e.UPDATE = 2] = \"UPDATE\", e[e.DELETE = 8] = \"DELETE\", e[e.SHARE = 16] = \"SHARE\", e[e.ALL = 31] = \"ALL\", e))(N || {});\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst j = [\n  \"d:getcontentlength\",\n  \"d:getcontenttype\",\n  \"d:getetag\",\n  \"d:getlastmodified\",\n  \"d:quota-available-bytes\",\n  \"d:resourcetype\",\n  \"nc:has-preview\",\n  \"nc:is-encrypted\",\n  \"nc:mount-type\",\n  \"nc:share-attributes\",\n  \"oc:comments-unread\",\n  \"oc:favorite\",\n  \"oc:fileid\",\n  \"oc:owner-display-name\",\n  \"oc:owner-id\",\n  \"oc:permissions\",\n  \"oc:share-types\",\n  \"oc:size\",\n  \"ocs:share-permissions\"\n], Y = {\n  d: \"DAV:\",\n  nc: \"http://nextcloud.org/ns\",\n  oc: \"http://owncloud.org/ns\",\n  ocs: \"http://open-collaboration-services.org/ns\"\n}, ir = function(e, t = { nc: \"http://nextcloud.org/ns\" }) {\n  typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...j], window._nc_dav_namespaces = { ...Y });\n  const r = { ...window._nc_dav_namespaces, ...t };\n  if (window._nc_dav_properties.find((n) => n === e))\n    return m.error(`${e} already registered`, { prop: e }), !1;\n  if (e.startsWith(\"<\") || e.split(\":\").length !== 2)\n    return m.error(`${e} is not valid. See example: 'oc:fileid'`, { prop: e }), !1;\n  const s = e.split(\":\")[0];\n  return r[s] ? (window._nc_dav_properties.push(e), window._nc_dav_namespaces = r, !0) : (m.error(`${e} namespace unknown`, { prop: e, namespaces: r }), !1);\n}, V = function() {\n  return typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...j]), window._nc_dav_properties.map((e) => `<${e} />`).join(\" \");\n}, L = function() {\n  return typeof window._nc_dav_namespaces > \"u\" && (window._nc_dav_namespaces = { ...Y }), Object.keys(window._nc_dav_namespaces).map((e) => `xmlns:${e}=\"${window._nc_dav_namespaces?.[e]}\"`).join(\" \");\n}, sr = function() {\n  return `<?xml version=\"1.0\"?>\n\t\t<d:propfind ${L()}>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`;\n}, Ee = function() {\n  return `<?xml version=\"1.0\"?>\n\t\t<oc:filter-files ${L()}>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`;\n}, or = function(e) {\n  return `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<d:searchrequest ${L()}\n\txmlns:ns=\"https://github.com/icewind1991/SearchDAV/ns\">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${A()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${e}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst be = function(e = \"\") {\n  let t = N.NONE;\n  return e && ((e.includes(\"C\") || e.includes(\"K\")) && (t |= N.CREATE), e.includes(\"G\") && (t |= N.READ), (e.includes(\"W\") || e.includes(\"N\") || e.includes(\"V\")) && (t |= N.UPDATE), e.includes(\"D\") && (t |= N.DELETE), e.includes(\"R\") && (t |= N.SHARE)), t;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar R = /* @__PURE__ */ ((e) => (e.Folder = \"folder\", e.File = \"file\", e))(R || {});\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst J = function(e, t) {\n  return e.match(t) !== null;\n}, X = (e, t) => {\n  if (e.id && typeof e.id != \"number\")\n    throw new Error(\"Invalid id type of value\");\n  if (!e.source)\n    throw new Error(\"Missing mandatory source\");\n  try {\n    new URL(e.source);\n  } catch {\n    throw new Error(\"Invalid source format, source must be a valid URL\");\n  }\n  if (!e.source.startsWith(\"http\"))\n    throw new Error(\"Invalid source format, only http(s) is supported\");\n  if (e.mtime && !(e.mtime instanceof Date))\n    throw new Error(\"Invalid mtime type\");\n  if (e.crtime && !(e.crtime instanceof Date))\n    throw new Error(\"Invalid crtime type\");\n  if (!e.mime || typeof e.mime != \"string\" || !e.mime.match(/^[-\\w.]+\\/[-+\\w.]+$/gi))\n    throw new Error(\"Missing or invalid mandatory mime\");\n  if (\"size\" in e && typeof e.size != \"number\" && e.size !== void 0)\n    throw new Error(\"Invalid size type\");\n  if (\"permissions\" in e && e.permissions !== void 0 && !(typeof e.permissions == \"number\" && e.permissions >= N.NONE && e.permissions <= N.ALL))\n    throw new Error(\"Invalid permissions\");\n  if (e.owner && e.owner !== null && typeof e.owner != \"string\")\n    throw new Error(\"Invalid owner type\");\n  if (e.attributes && typeof e.attributes != \"object\")\n    throw new Error(\"Invalid attributes type\");\n  if (e.root && typeof e.root != \"string\")\n    throw new Error(\"Invalid root type\");\n  if (e.root && !e.root.startsWith(\"/\"))\n    throw new Error(\"Root must start with a leading slash\");\n  if (e.root && !e.source.includes(e.root))\n    throw new Error(\"Root must be part of the source\");\n  if (e.root && J(e.source, t)) {\n    const r = e.source.match(t)[0];\n    if (!e.source.includes(le(r, e.root)))\n      throw new Error(\"The root must be relative to the service. e.g /files/emma\");\n  }\n  if (e.status && !Object.values(Q).includes(e.status))\n    throw new Error(\"Status must be a valid NodeStatus\");\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar Q = /* @__PURE__ */ ((e) => (e.NEW = \"new\", e.FAILED = \"failed\", e.LOADING = \"loading\", e.LOCKED = \"locked\", e))(Q || {});\nclass D {\n  _data;\n  _attributes;\n  _knownDavService = /(remote|public)\\.php\\/(web)?dav/i;\n  constructor(t, r) {\n    X(t, r || this._knownDavService), this._data = t;\n    const s = {\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      set: (n, i, d) => (this.updateMtime(), Reflect.set(n, i, d)),\n      deleteProperty: (n, i) => (this.updateMtime(), Reflect.deleteProperty(n, i))\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    };\n    this._attributes = new Proxy(t.attributes || {}, s), delete this._data.attributes, r && (this._knownDavService = r);\n  }\n  /**\n   * Get the source url to this object\n   */\n  get source() {\n    return this._data.source.replace(/\\/$/i, \"\");\n  }\n  /**\n   * Get the encoded source url to this object for requests purposes\n   */\n  get encodedSource() {\n    const { origin: t } = new URL(this.source);\n    return t + he(this.source.slice(t.length));\n  }\n  /**\n   * Get this object name\n   */\n  get basename() {\n    return fe(this.source);\n  }\n  /**\n   * Get this object's extension\n   */\n  get extension() {\n    return ce(this.source);\n  }\n  /**\n   * Get the directory path leading to this object\n   * Will use the relative path to root if available\n   */\n  get dirname() {\n    if (this.root) {\n      const r = this.source.indexOf(this.root);\n      return I(this.source.slice(r + this.root.length) || \"/\");\n    }\n    const t = new URL(this.source);\n    return I(t.pathname);\n  }\n  /**\n   * Get the file mime\n   */\n  get mime() {\n    return this._data.mime;\n  }\n  /**\n   * Get the file modification time\n   */\n  get mtime() {\n    return this._data.mtime;\n  }\n  /**\n   * Get the file creation time\n   */\n  get crtime() {\n    return this._data.crtime;\n  }\n  /**\n   * Get the file size\n   */\n  get size() {\n    return this._data.size;\n  }\n  /**\n   * Get the file attribute\n   */\n  get attributes() {\n    return this._attributes;\n  }\n  /**\n   * Get the file permissions\n   */\n  get permissions() {\n    return this.owner === null && !this.isDavRessource ? N.READ : this._data.permissions !== void 0 ? this._data.permissions : N.NONE;\n  }\n  /**\n   * Get the file owner\n   */\n  get owner() {\n    return this.isDavRessource ? this._data.owner : null;\n  }\n  /**\n   * Is this a dav-related ressource ?\n   */\n  get isDavRessource() {\n    return J(this.source, this._knownDavService);\n  }\n  /**\n   * Get the dav root of this object\n   */\n  get root() {\n    return this._data.root ? this._data.root.replace(/^(.+)\\/$/, \"$1\") : this.isDavRessource && I(this.source).split(this._knownDavService).pop() || null;\n  }\n  /**\n   * Get the absolute path of this object relative to the root\n   */\n  get path() {\n    if (this.root) {\n      const t = this.source.indexOf(this.root);\n      return this.source.slice(t + this.root.length) || \"/\";\n    }\n    return (this.dirname + \"/\" + this.basename).replace(/\\/\\//g, \"/\");\n  }\n  /**\n   * Get the node id if defined.\n   * Will look for the fileid in attributes if undefined.\n   */\n  get fileid() {\n    return this._data?.id || this.attributes?.fileid;\n  }\n  /**\n   * Get the node status.\n   */\n  get status() {\n    return this._data?.status;\n  }\n  /**\n   * Set the node status.\n   */\n  set status(t) {\n    this._data.status = t;\n  }\n  /**\n   * Move the node to a new destination\n   *\n   * @param {string} destination the new source.\n   * e.g. https://cloud.domain.com/remote.php/dav/files/emma/Photos/picture.jpg\n   */\n  move(t) {\n    X({ ...this._data, source: t }, this._knownDavService), this._data.source = t, this.updateMtime();\n  }\n  /**\n   * Rename the node\n   * This aliases the move method for easier usage\n   *\n   * @param basename The new name of the node\n   */\n  rename(t) {\n    if (t.includes(\"/\"))\n      throw new Error(\"Invalid basename\");\n    this.move(I(this.source) + \"/\" + t);\n  }\n  /**\n   * Update the mtime if exists.\n   */\n  updateMtime() {\n    this._data.mtime && (this._data.mtime = /* @__PURE__ */ new Date());\n  }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass ye extends D {\n  get type() {\n    return R.File;\n  }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass _e extends D {\n  constructor(t) {\n    super({\n      ...t,\n      mime: \"httpd/unix-directory\"\n    });\n  }\n  get type() {\n    return R.Folder;\n  }\n  get extension() {\n    return null;\n  }\n  get mime() {\n    return \"httpd/unix-directory\";\n  }\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst ee = `/files/${A()?.uid}`, te = pe(\"dav\"), ur = function(e = te) {\n  const t = ge(e);\n  function r(n) {\n    t.setHeaders({\n      // Add this so the server knows it is an request from the browser\n      \"X-Requested-With\": \"XMLHttpRequest\",\n      // Inject user auth\n      requesttoken: n ?? \"\"\n    });\n  }\n  return ue(r), r(de()), we().patch(\"fetch\", (n, i) => {\n    const d = i.headers;\n    return d?.method && (i.method = d.method, delete d.method), fetch(n, i);\n  }), t;\n}, dr = async (e, t = \"/\", r = ee) => (await e.getDirectoryContents(`${r}${t}`, {\n  details: !0,\n  data: Ee(),\n  headers: {\n    // see davGetClient for patched webdav client\n    method: \"REPORT\"\n  },\n  includeSelf: !0\n})).data.filter((n) => n.filename !== t).map((n) => ve(n, r)), ve = function(e, t = ee, r = te) {\n  const s = e.props, n = be(s?.permissions), i = A()?.uid, d = {\n    id: s?.fileid || 0,\n    source: `${r}${e.filename}`,\n    mtime: new Date(Date.parse(e.lastmod)),\n    mime: e.mime,\n    size: s?.size || Number.parseInt(s.getcontentlength || \"0\"),\n    permissions: n,\n    owner: i,\n    root: t,\n    attributes: {\n      ...e,\n      ...s,\n      hasPreview: s?.[\"has-preview\"]\n    }\n  };\n  return delete d.attributes?.props, e.type === \"file\" ? new ye(d) : new _e(d);\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Te {\n  _views = [];\n  _currentView = null;\n  register(t) {\n    if (this._views.find((r) => r.id === t.id))\n      throw new Error(`View id ${t.id} is already registered`);\n    this._views.push(t);\n  }\n  remove(t) {\n    const r = this._views.findIndex((s) => s.id === t);\n    r !== -1 && this._views.splice(r, 1);\n  }\n  get views() {\n    return this._views;\n  }\n  setActive(t) {\n    this._currentView = t;\n  }\n  get active() {\n    return this._currentView;\n  }\n}\nconst ar = function() {\n  return typeof window._nc_navigation > \"u\" && (window._nc_navigation = new Te(), m.debug(\"Navigation service initialized\")), window._nc_navigation;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Ie {\n  _column;\n  constructor(t) {\n    Ae(t), this._column = t;\n  }\n  get id() {\n    return this._column.id;\n  }\n  get title() {\n    return this._column.title;\n  }\n  get render() {\n    return this._column.render;\n  }\n  get sort() {\n    return this._column.sort;\n  }\n  get summary() {\n    return this._column.summary;\n  }\n}\nconst Ae = function(e) {\n  if (!e.id || typeof e.id != \"string\")\n    throw new Error(\"A column id is required\");\n  if (!e.title || typeof e.title != \"string\")\n    throw new Error(\"A column title is required\");\n  if (!e.render || typeof e.render != \"function\")\n    throw new Error(\"A render function is required\");\n  if (e.sort && typeof e.sort != \"function\")\n    throw new Error(\"Column sortFunction must be a function\");\n  if (e.summary && typeof e.summary != \"function\")\n    throw new Error(\"Column summary must be a function\");\n  return !0;\n};\nvar S = {}, O = {};\n(function(e) {\n  const t = \":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\", r = t + \"\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\", s = \"[\" + t + \"][\" + r + \"]*\", n = new RegExp(\"^\" + s + \"$\"), i = function(u, o) {\n    const a = [];\n    let l = o.exec(u);\n    for (; l; ) {\n      const f = [];\n      f.startIndex = o.lastIndex - l[0].length;\n      const c = l.length;\n      for (let g = 0; g < c; g++)\n        f.push(l[g]);\n      a.push(f), l = o.exec(u);\n    }\n    return a;\n  }, d = function(u) {\n    const o = n.exec(u);\n    return !(o === null || typeof o > \"u\");\n  };\n  e.isExist = function(u) {\n    return typeof u < \"u\";\n  }, e.isEmptyObject = function(u) {\n    return Object.keys(u).length === 0;\n  }, e.merge = function(u, o, a) {\n    if (o) {\n      const l = Object.keys(o), f = l.length;\n      for (let c = 0; c < f; c++)\n        a === \"strict\" ? u[l[c]] = [o[l[c]]] : u[l[c]] = o[l[c]];\n    }\n  }, e.getValue = function(u) {\n    return e.isExist(u) ? u : \"\";\n  }, e.isName = d, e.getAllMatches = i, e.nameRegexp = s;\n})(O);\nconst M = O, Oe = {\n  allowBooleanAttributes: !1,\n  //A tag can have attributes without any value\n  unpairedTags: []\n};\nS.validate = function(e, t) {\n  t = Object.assign({}, Oe, t);\n  const r = [];\n  let s = !1, n = !1;\n  e[0] === \"\\uFEFF\" && (e = e.substr(1));\n  for (let i = 0; i < e.length; i++)\n    if (e[i] === \"<\" && e[i + 1] === \"?\") {\n      if (i += 2, i = G(e, i), i.err)\n        return i;\n    } else if (e[i] === \"<\") {\n      let d = i;\n      if (i++, e[i] === \"!\") {\n        i = z(e, i);\n        continue;\n      } else {\n        let u = !1;\n        e[i] === \"/\" && (u = !0, i++);\n        let o = \"\";\n        for (; i < e.length && e[i] !== \">\" && e[i] !== \" \" && e[i] !== \"\t\" && e[i] !== `\n` && e[i] !== \"\\r\"; i++)\n          o += e[i];\n        if (o = o.trim(), o[o.length - 1] === \"/\" && (o = o.substring(0, o.length - 1), i--), !Re(o)) {\n          let f;\n          return o.trim().length === 0 ? f = \"Invalid space after '<'.\" : f = \"Tag '\" + o + \"' is an invalid name.\", p(\"InvalidTag\", f, w(e, i));\n        }\n        const a = xe(e, i);\n        if (a === !1)\n          return p(\"InvalidAttr\", \"Attributes for '\" + o + \"' have open quote.\", w(e, i));\n        let l = a.value;\n        if (i = a.index, l[l.length - 1] === \"/\") {\n          const f = i - l.length;\n          l = l.substring(0, l.length - 1);\n          const c = H(l, t);\n          if (c === !0)\n            s = !0;\n          else\n            return p(c.err.code, c.err.msg, w(e, f + c.err.line));\n        } else if (u)\n          if (a.tagClosed) {\n            if (l.trim().length > 0)\n              return p(\"InvalidTag\", \"Closing tag '\" + o + \"' can't have attributes or invalid starting.\", w(e, d));\n            {\n              const f = r.pop();\n              if (o !== f.tagName) {\n                let c = w(e, f.tagStartPos);\n                return p(\n                  \"InvalidTag\",\n                  \"Expected closing tag '\" + f.tagName + \"' (opened in line \" + c.line + \", col \" + c.col + \") instead of closing tag '\" + o + \"'.\",\n                  w(e, d)\n                );\n              }\n              r.length == 0 && (n = !0);\n            }\n          } else\n            return p(\"InvalidTag\", \"Closing tag '\" + o + \"' doesn't have proper closing.\", w(e, i));\n        else {\n          const f = H(l, t);\n          if (f !== !0)\n            return p(f.err.code, f.err.msg, w(e, i - l.length + f.err.line));\n          if (n === !0)\n            return p(\"InvalidXml\", \"Multiple possible root nodes found.\", w(e, i));\n          t.unpairedTags.indexOf(o) !== -1 || r.push({ tagName: o, tagStartPos: d }), s = !0;\n        }\n        for (i++; i < e.length; i++)\n          if (e[i] === \"<\")\n            if (e[i + 1] === \"!\") {\n              i++, i = z(e, i);\n              continue;\n            } else if (e[i + 1] === \"?\") {\n              if (i = G(e, ++i), i.err)\n                return i;\n            } else\n              break;\n          else if (e[i] === \"&\") {\n            const f = Ve(e, i);\n            if (f == -1)\n              return p(\"InvalidChar\", \"char '&' is not expected.\", w(e, i));\n            i = f;\n          } else if (n === !0 && !U(e[i]))\n            return p(\"InvalidXml\", \"Extra text at the end\", w(e, i));\n        e[i] === \"<\" && i--;\n      }\n    } else {\n      if (U(e[i]))\n        continue;\n      return p(\"InvalidChar\", \"char '\" + e[i] + \"' is not expected.\", w(e, i));\n    }\n  if (s) {\n    if (r.length == 1)\n      return p(\"InvalidTag\", \"Unclosed tag '\" + r[0].tagName + \"'.\", w(e, r[0].tagStartPos));\n    if (r.length > 0)\n      return p(\"InvalidXml\", \"Invalid '\" + JSON.stringify(r.map((i) => i.tagName), null, 4).replace(/\\r?\\n/g, \"\") + \"' found.\", { line: 1, col: 1 });\n  } else\n    return p(\"InvalidXml\", \"Start tag expected.\", 1);\n  return !0;\n};\nfunction U(e) {\n  return e === \" \" || e === \"\t\" || e === `\n` || e === \"\\r\";\n}\nfunction G(e, t) {\n  const r = t;\n  for (; t < e.length; t++)\n    if (e[t] == \"?\" || e[t] == \" \") {\n      const s = e.substr(r, t - r);\n      if (t > 5 && s === \"xml\")\n        return p(\"InvalidXml\", \"XML declaration allowed only at the start of the document.\", w(e, t));\n      if (e[t] == \"?\" && e[t + 1] == \">\") {\n        t++;\n        break;\n      } else\n        continue;\n    }\n  return t;\n}\nfunction z(e, t) {\n  if (e.length > t + 5 && e[t + 1] === \"-\" && e[t + 2] === \"-\") {\n    for (t += 3; t < e.length; t++)\n      if (e[t] === \"-\" && e[t + 1] === \"-\" && e[t + 2] === \">\") {\n        t += 2;\n        break;\n      }\n  } else if (e.length > t + 8 && e[t + 1] === \"D\" && e[t + 2] === \"O\" && e[t + 3] === \"C\" && e[t + 4] === \"T\" && e[t + 5] === \"Y\" && e[t + 6] === \"P\" && e[t + 7] === \"E\") {\n    let r = 1;\n    for (t += 8; t < e.length; t++)\n      if (e[t] === \"<\")\n        r++;\n      else if (e[t] === \">\" && (r--, r === 0))\n        break;\n  } else if (e.length > t + 9 && e[t + 1] === \"[\" && e[t + 2] === \"C\" && e[t + 3] === \"D\" && e[t + 4] === \"A\" && e[t + 5] === \"T\" && e[t + 6] === \"A\" && e[t + 7] === \"[\") {\n    for (t += 8; t < e.length; t++)\n      if (e[t] === \"]\" && e[t + 1] === \"]\" && e[t + 2] === \">\") {\n        t += 2;\n        break;\n      }\n  }\n  return t;\n}\nconst Ce = '\"', Pe = \"'\";\nfunction xe(e, t) {\n  let r = \"\", s = \"\", n = !1;\n  for (; t < e.length; t++) {\n    if (e[t] === Ce || e[t] === Pe)\n      s === \"\" ? s = e[t] : s !== e[t] || (s = \"\");\n    else if (e[t] === \">\" && s === \"\") {\n      n = !0;\n      break;\n    }\n    r += e[t];\n  }\n  return s !== \"\" ? !1 : {\n    value: r,\n    index: t,\n    tagClosed: n\n  };\n}\nconst $e = new RegExp(`(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*(['\"])(([\\\\s\\\\S])*?)\\\\5)?`, \"g\");\nfunction H(e, t) {\n  const r = M.getAllMatches(e, $e), s = {};\n  for (let n = 0; n < r.length; n++) {\n    if (r[n][1].length === 0)\n      return p(\"InvalidAttr\", \"Attribute '\" + r[n][2] + \"' has no space in starting.\", v(r[n]));\n    if (r[n][3] !== void 0 && r[n][4] === void 0)\n      return p(\"InvalidAttr\", \"Attribute '\" + r[n][2] + \"' is without value.\", v(r[n]));\n    if (r[n][3] === void 0 && !t.allowBooleanAttributes)\n      return p(\"InvalidAttr\", \"boolean attribute '\" + r[n][2] + \"' is not allowed.\", v(r[n]));\n    const i = r[n][2];\n    if (!Le(i))\n      return p(\"InvalidAttr\", \"Attribute '\" + i + \"' is an invalid name.\", v(r[n]));\n    if (!s.hasOwnProperty(i))\n      s[i] = 1;\n    else\n      return p(\"InvalidAttr\", \"Attribute '\" + i + \"' is repeated.\", v(r[n]));\n  }\n  return !0;\n}\nfunction Fe(e, t) {\n  let r = /\\d/;\n  for (e[t] === \"x\" && (t++, r = /[\\da-fA-F]/); t < e.length; t++) {\n    if (e[t] === \";\")\n      return t;\n    if (!e[t].match(r))\n      break;\n  }\n  return -1;\n}\nfunction Ve(e, t) {\n  if (t++, e[t] === \";\")\n    return -1;\n  if (e[t] === \"#\")\n    return t++, Fe(e, t);\n  let r = 0;\n  for (; t < e.length; t++, r++)\n    if (!(e[t].match(/\\w/) && r < 20)) {\n      if (e[t] === \";\")\n        break;\n      return -1;\n    }\n  return t;\n}\nfunction p(e, t, r) {\n  return {\n    err: {\n      code: e,\n      msg: t,\n      line: r.line || r,\n      col: r.col\n    }\n  };\n}\nfunction Le(e) {\n  return M.isName(e);\n}\nfunction Re(e) {\n  return M.isName(e);\n}\nfunction w(e, t) {\n  const r = e.substring(0, t).split(/\\r?\\n/);\n  return {\n    line: r.length,\n    // column number is last line's length + 1, because column numbering starts at 1:\n    col: r[r.length - 1].length + 1\n  };\n}\nfunction v(e) {\n  return e.startIndex + e[1].length;\n}\nvar B = {};\nconst re = {\n  preserveOrder: !1,\n  attributeNamePrefix: \"@_\",\n  attributesGroupName: !1,\n  textNodeName: \"#text\",\n  ignoreAttributes: !0,\n  removeNSPrefix: !1,\n  // remove NS from tag name or attribute name if true\n  allowBooleanAttributes: !1,\n  //a tag can have attributes without any value\n  //ignoreRootElement : false,\n  parseTagValue: !0,\n  parseAttributeValue: !1,\n  trimValues: !0,\n  //Trim string values of tag and attributes\n  cdataPropName: !1,\n  numberParseOptions: {\n    hex: !0,\n    leadingZeros: !0,\n    eNotation: !0\n  },\n  tagValueProcessor: function(e, t) {\n    return t;\n  },\n  attributeValueProcessor: function(e, t) {\n    return t;\n  },\n  stopNodes: [],\n  //nested tags will not be parsed even for errors\n  alwaysCreateTextNode: !1,\n  isArray: () => !1,\n  commentPropName: !1,\n  unpairedTags: [],\n  processEntities: !0,\n  htmlEntities: !1,\n  ignoreDeclaration: !1,\n  ignorePiTags: !1,\n  transformTagName: !1,\n  transformAttributeName: !1,\n  updateTag: function(e, t, r) {\n    return e;\n  }\n  // skipEmptyListItem: false\n}, Se = function(e) {\n  return Object.assign({}, re, e);\n};\nB.buildOptions = Se;\nB.defaultOptions = re;\nclass Me {\n  constructor(t) {\n    this.tagname = t, this.child = [], this[\":@\"] = {};\n  }\n  add(t, r) {\n    t === \"__proto__\" && (t = \"#__proto__\"), this.child.push({ [t]: r });\n  }\n  addChild(t) {\n    t.tagname === \"__proto__\" && (t.tagname = \"#__proto__\"), t[\":@\"] && Object.keys(t[\":@\"]).length > 0 ? this.child.push({ [t.tagname]: t.child, \":@\": t[\":@\"] }) : this.child.push({ [t.tagname]: t.child });\n  }\n}\nvar Be = Me;\nconst ke = O;\nfunction qe(e, t) {\n  const r = {};\n  if (e[t + 3] === \"O\" && e[t + 4] === \"C\" && e[t + 5] === \"T\" && e[t + 6] === \"Y\" && e[t + 7] === \"P\" && e[t + 8] === \"E\") {\n    t = t + 9;\n    let s = 1, n = !1, i = !1, d = \"\";\n    for (; t < e.length; t++)\n      if (e[t] === \"<\" && !i) {\n        if (n && Ge(e, t))\n          t += 7, [entityName, val, t] = Xe(e, t + 1), val.indexOf(\"&\") === -1 && (r[We(entityName)] = {\n            regx: RegExp(`&${entityName};`, \"g\"),\n            val\n          });\n        else if (n && ze(e, t))\n          t += 8;\n        else if (n && He(e, t))\n          t += 8;\n        else if (n && Ke(e, t))\n          t += 9;\n        else if (Ue)\n          i = !0;\n        else\n          throw new Error(\"Invalid DOCTYPE\");\n        s++, d = \"\";\n      } else if (e[t] === \">\") {\n        if (i ? e[t - 1] === \"-\" && e[t - 2] === \"-\" && (i = !1, s--) : s--, s === 0)\n          break;\n      } else\n        e[t] === \"[\" ? n = !0 : d += e[t];\n    if (s !== 0)\n      throw new Error(\"Unclosed DOCTYPE\");\n  } else\n    throw new Error(\"Invalid Tag instead of DOCTYPE\");\n  return { entities: r, i: t };\n}\nfunction Xe(e, t) {\n  let r = \"\";\n  for (; t < e.length && e[t] !== \"'\" && e[t] !== '\"'; t++)\n    r += e[t];\n  if (r = r.trim(), r.indexOf(\" \") !== -1)\n    throw new Error(\"External entites are not supported\");\n  const s = e[t++];\n  let n = \"\";\n  for (; t < e.length && e[t] !== s; t++)\n    n += e[t];\n  return [r, n, t];\n}\nfunction Ue(e, t) {\n  return e[t + 1] === \"!\" && e[t + 2] === \"-\" && e[t + 3] === \"-\";\n}\nfunction Ge(e, t) {\n  return e[t + 1] === \"!\" && e[t + 2] === \"E\" && e[t + 3] === \"N\" && e[t + 4] === \"T\" && e[t + 5] === \"I\" && e[t + 6] === \"T\" && e[t + 7] === \"Y\";\n}\nfunction ze(e, t) {\n  return e[t + 1] === \"!\" && e[t + 2] === \"E\" && e[t + 3] === \"L\" && e[t + 4] === \"E\" && e[t + 5] === \"M\" && e[t + 6] === \"E\" && e[t + 7] === \"N\" && e[t + 8] === \"T\";\n}\nfunction He(e, t) {\n  return e[t + 1] === \"!\" && e[t + 2] === \"A\" && e[t + 3] === \"T\" && e[t + 4] === \"T\" && e[t + 5] === \"L\" && e[t + 6] === \"I\" && e[t + 7] === \"S\" && e[t + 8] === \"T\";\n}\nfunction Ke(e, t) {\n  return e[t + 1] === \"!\" && e[t + 2] === \"N\" && e[t + 3] === \"O\" && e[t + 4] === \"T\" && e[t + 5] === \"A\" && e[t + 6] === \"T\" && e[t + 7] === \"I\" && e[t + 8] === \"O\" && e[t + 9] === \"N\";\n}\nfunction We(e) {\n  if (ke.isName(e))\n    return e;\n  throw new Error(`Invalid entity name ${e}`);\n}\nvar Ze = qe;\nconst je = /^[-+]?0x[a-fA-F0-9]+$/, Ye = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\n!Number.parseInt && window.parseInt && (Number.parseInt = window.parseInt);\n!Number.parseFloat && window.parseFloat && (Number.parseFloat = window.parseFloat);\nconst Je = {\n  hex: !0,\n  leadingZeros: !0,\n  decimalPoint: \".\",\n  eNotation: !0\n  //skipLike: /regex/\n};\nfunction Qe(e, t = {}) {\n  if (t = Object.assign({}, Je, t), !e || typeof e != \"string\")\n    return e;\n  let r = e.trim();\n  if (t.skipLike !== void 0 && t.skipLike.test(r))\n    return e;\n  if (t.hex && je.test(r))\n    return Number.parseInt(r, 16);\n  {\n    const s = Ye.exec(r);\n    if (s) {\n      const n = s[1], i = s[2];\n      let d = De(s[3]);\n      const u = s[4] || s[6];\n      if (!t.leadingZeros && i.length > 0 && n && r[2] !== \".\")\n        return e;\n      if (!t.leadingZeros && i.length > 0 && !n && r[1] !== \".\")\n        return e;\n      {\n        const o = Number(r), a = \"\" + o;\n        return a.search(/[eE]/) !== -1 || u ? t.eNotation ? o : e : r.indexOf(\".\") !== -1 ? a === \"0\" && d === \"\" || a === d || n && a === \"-\" + d ? o : e : i ? d === a || n + d === a ? o : e : r === a || r === n + a ? o : e;\n      }\n    } else\n      return e;\n  }\n}\nfunction De(e) {\n  return e && e.indexOf(\".\") !== -1 && (e = e.replace(/0+$/, \"\"), e === \".\" ? e = \"0\" : e[0] === \".\" ? e = \"0\" + e : e[e.length - 1] === \".\" && (e = e.substr(0, e.length - 1))), e;\n}\nvar et = Qe;\nconst k = O, T = Be, tt = Ze, rt = et;\n\"<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)\".replace(/NAME/g, k.nameRegexp);\nlet nt = class {\n  constructor(t) {\n    this.options = t, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {\n      apos: { regex: /&(apos|#39|#x27);/g, val: \"'\" },\n      gt: { regex: /&(gt|#62|#x3E);/g, val: \">\" },\n      lt: { regex: /&(lt|#60|#x3C);/g, val: \"<\" },\n      quot: { regex: /&(quot|#34|#x22);/g, val: '\"' }\n    }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: \"&\" }, this.htmlEntities = {\n      space: { regex: /&(nbsp|#160);/g, val: \" \" },\n      // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n      // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n      // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n      // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n      // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n      cent: { regex: /&(cent|#162);/g, val: \"¢\" },\n      pound: { regex: /&(pound|#163);/g, val: \"£\" },\n      yen: { regex: /&(yen|#165);/g, val: \"¥\" },\n      euro: { regex: /&(euro|#8364);/g, val: \"€\" },\n      copyright: { regex: /&(copy|#169);/g, val: \"©\" },\n      reg: { regex: /&(reg|#174);/g, val: \"®\" },\n      inr: { regex: /&(inr|#8377);/g, val: \"₹\" }\n    }, this.addExternalEntities = it, this.parseXml = at, this.parseTextData = st, this.resolveNameSpace = ot, this.buildAttributesMap = dt, this.isItStopNode = ht, this.replaceEntitiesValue = ft, this.readStopNodeData = gt, this.saveTextToParentTag = ct, this.addChild = lt;\n  }\n};\nfunction it(e) {\n  const t = Object.keys(e);\n  for (let r = 0; r < t.length; r++) {\n    const s = t[r];\n    this.lastEntities[s] = {\n      regex: new RegExp(\"&\" + s + \";\", \"g\"),\n      val: e[s]\n    };\n  }\n}\nfunction st(e, t, r, s, n, i, d) {\n  if (e !== void 0 && (this.options.trimValues && !s && (e = e.trim()), e.length > 0)) {\n    d || (e = this.replaceEntitiesValue(e));\n    const u = this.options.tagValueProcessor(t, e, r, n, i);\n    return u == null ? e : typeof u != typeof e || u !== e ? u : this.options.trimValues ? $(e, this.options.parseTagValue, this.options.numberParseOptions) : e.trim() === e ? $(e, this.options.parseTagValue, this.options.numberParseOptions) : e;\n  }\n}\nfunction ot(e) {\n  if (this.options.removeNSPrefix) {\n    const t = e.split(\":\"), r = e.charAt(0) === \"/\" ? \"/\" : \"\";\n    if (t[0] === \"xmlns\")\n      return \"\";\n    t.length === 2 && (e = r + t[1]);\n  }\n  return e;\n}\nconst ut = new RegExp(`([^\\\\s=]+)\\\\s*(=\\\\s*(['\"])([\\\\s\\\\S]*?)\\\\3)?`, \"gm\");\nfunction dt(e, t, r) {\n  if (!this.options.ignoreAttributes && typeof e == \"string\") {\n    const s = k.getAllMatches(e, ut), n = s.length, i = {};\n    for (let d = 0; d < n; d++) {\n      const u = this.resolveNameSpace(s[d][1]);\n      let o = s[d][4], a = this.options.attributeNamePrefix + u;\n      if (u.length)\n        if (this.options.transformAttributeName && (a = this.options.transformAttributeName(a)), a === \"__proto__\" && (a = \"#__proto__\"), o !== void 0) {\n          this.options.trimValues && (o = o.trim()), o = this.replaceEntitiesValue(o);\n          const l = this.options.attributeValueProcessor(u, o, t);\n          l == null ? i[a] = o : typeof l != typeof o || l !== o ? i[a] = l : i[a] = $(\n            o,\n            this.options.parseAttributeValue,\n            this.options.numberParseOptions\n          );\n        } else\n          this.options.allowBooleanAttributes && (i[a] = !0);\n    }\n    if (!Object.keys(i).length)\n      return;\n    if (this.options.attributesGroupName) {\n      const d = {};\n      return d[this.options.attributesGroupName] = i, d;\n    }\n    return i;\n  }\n}\nconst at = function(e) {\n  e = e.replace(/\\r\\n?/g, `\n`);\n  const t = new T(\"!xml\");\n  let r = t, s = \"\", n = \"\";\n  for (let i = 0; i < e.length; i++)\n    if (e[i] === \"<\")\n      if (e[i + 1] === \"/\") {\n        const u = y(e, \">\", i, \"Closing Tag is not closed.\");\n        let o = e.substring(i + 2, u).trim();\n        if (this.options.removeNSPrefix) {\n          const f = o.indexOf(\":\");\n          f !== -1 && (o = o.substr(f + 1));\n        }\n        this.options.transformTagName && (o = this.options.transformTagName(o)), r && (s = this.saveTextToParentTag(s, r, n));\n        const a = n.substring(n.lastIndexOf(\".\") + 1);\n        if (o && this.options.unpairedTags.indexOf(o) !== -1)\n          throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);\n        let l = 0;\n        a && this.options.unpairedTags.indexOf(a) !== -1 ? (l = n.lastIndexOf(\".\", n.lastIndexOf(\".\") - 1), this.tagsNodeStack.pop()) : l = n.lastIndexOf(\".\"), n = n.substring(0, l), r = this.tagsNodeStack.pop(), s = \"\", i = u;\n      } else if (e[i + 1] === \"?\") {\n        let u = x(e, i, !1, \"?>\");\n        if (!u)\n          throw new Error(\"Pi Tag is not closed.\");\n        if (s = this.saveTextToParentTag(s, r, n), !(this.options.ignoreDeclaration && u.tagName === \"?xml\" || this.options.ignorePiTags)) {\n          const o = new T(u.tagName);\n          o.add(this.options.textNodeName, \"\"), u.tagName !== u.tagExp && u.attrExpPresent && (o[\":@\"] = this.buildAttributesMap(u.tagExp, n, u.tagName)), this.addChild(r, o, n);\n        }\n        i = u.closeIndex + 1;\n      } else if (e.substr(i + 1, 3) === \"!--\") {\n        const u = y(e, \"-->\", i + 4, \"Comment is not closed.\");\n        if (this.options.commentPropName) {\n          const o = e.substring(i + 4, u - 2);\n          s = this.saveTextToParentTag(s, r, n), r.add(this.options.commentPropName, [{ [this.options.textNodeName]: o }]);\n        }\n        i = u;\n      } else if (e.substr(i + 1, 2) === \"!D\") {\n        const u = tt(e, i);\n        this.docTypeEntities = u.entities, i = u.i;\n      } else if (e.substr(i + 1, 2) === \"![\") {\n        const u = y(e, \"]]>\", i, \"CDATA is not closed.\") - 2, o = e.substring(i + 9, u);\n        if (s = this.saveTextToParentTag(s, r, n), this.options.cdataPropName)\n          r.add(this.options.cdataPropName, [{ [this.options.textNodeName]: o }]);\n        else {\n          let a = this.parseTextData(o, r.tagname, n, !0, !1, !0);\n          a == null && (a = \"\"), r.add(this.options.textNodeName, a);\n        }\n        i = u + 2;\n      } else {\n        let u = x(e, i, this.options.removeNSPrefix), o = u.tagName;\n        const a = u.rawTagName;\n        let l = u.tagExp, f = u.attrExpPresent, c = u.closeIndex;\n        this.options.transformTagName && (o = this.options.transformTagName(o)), r && s && r.tagname !== \"!xml\" && (s = this.saveTextToParentTag(s, r, n, !1));\n        const g = r;\n        if (g && this.options.unpairedTags.indexOf(g.tagname) !== -1 && (r = this.tagsNodeStack.pop(), n = n.substring(0, n.lastIndexOf(\".\"))), o !== t.tagname && (n += n ? \".\" + o : o), this.isItStopNode(this.options.stopNodes, n, o)) {\n          let h = \"\";\n          if (l.length > 0 && l.lastIndexOf(\"/\") === l.length - 1)\n            i = u.closeIndex;\n          else if (this.options.unpairedTags.indexOf(o) !== -1)\n            i = u.closeIndex;\n          else {\n            const E = this.readStopNodeData(e, a, c + 1);\n            if (!E)\n              throw new Error(`Unexpected end of ${a}`);\n            i = E.i, h = E.tagContent;\n          }\n          const _ = new T(o);\n          o !== l && f && (_[\":@\"] = this.buildAttributesMap(l, n, o)), h && (h = this.parseTextData(h, o, n, !0, f, !0, !0)), n = n.substr(0, n.lastIndexOf(\".\")), _.add(this.options.textNodeName, h), this.addChild(r, _, n);\n        } else {\n          if (l.length > 0 && l.lastIndexOf(\"/\") === l.length - 1) {\n            o[o.length - 1] === \"/\" ? (o = o.substr(0, o.length - 1), n = n.substr(0, n.length - 1), l = o) : l = l.substr(0, l.length - 1), this.options.transformTagName && (o = this.options.transformTagName(o));\n            const h = new T(o);\n            o !== l && f && (h[\":@\"] = this.buildAttributesMap(l, n, o)), this.addChild(r, h, n), n = n.substr(0, n.lastIndexOf(\".\"));\n          } else {\n            const h = new T(o);\n            this.tagsNodeStack.push(r), o !== l && f && (h[\":@\"] = this.buildAttributesMap(l, n, o)), this.addChild(r, h, n), r = h;\n          }\n          s = \"\", i = c;\n        }\n      }\n    else\n      s += e[i];\n  return t.child;\n};\nfunction lt(e, t, r) {\n  const s = this.options.updateTag(t.tagname, r, t[\":@\"]);\n  s === !1 || (typeof s == \"string\" && (t.tagname = s), e.addChild(t));\n}\nconst ft = function(e) {\n  if (this.options.processEntities) {\n    for (let t in this.docTypeEntities) {\n      const r = this.docTypeEntities[t];\n      e = e.replace(r.regx, r.val);\n    }\n    for (let t in this.lastEntities) {\n      const r = this.lastEntities[t];\n      e = e.replace(r.regex, r.val);\n    }\n    if (this.options.htmlEntities)\n      for (let t in this.htmlEntities) {\n        const r = this.htmlEntities[t];\n        e = e.replace(r.regex, r.val);\n      }\n    e = e.replace(this.ampEntity.regex, this.ampEntity.val);\n  }\n  return e;\n};\nfunction ct(e, t, r, s) {\n  return e && (s === void 0 && (s = Object.keys(t.child).length === 0), e = this.parseTextData(\n    e,\n    t.tagname,\n    r,\n    !1,\n    t[\":@\"] ? Object.keys(t[\":@\"]).length !== 0 : !1,\n    s\n  ), e !== void 0 && e !== \"\" && t.add(this.options.textNodeName, e), e = \"\"), e;\n}\nfunction ht(e, t, r) {\n  const s = \"*.\" + r;\n  for (const n in e) {\n    const i = e[n];\n    if (s === i || t === i)\n      return !0;\n  }\n  return !1;\n}\nfunction pt(e, t, r = \">\") {\n  let s, n = \"\";\n  for (let i = t; i < e.length; i++) {\n    let d = e[i];\n    if (s)\n      d === s && (s = \"\");\n    else if (d === '\"' || d === \"'\")\n      s = d;\n    else if (d === r[0])\n      if (r[1]) {\n        if (e[i + 1] === r[1])\n          return {\n            data: n,\n            index: i\n          };\n      } else\n        return {\n          data: n,\n          index: i\n        };\n    else\n      d === \"\t\" && (d = \" \");\n    n += d;\n  }\n}\nfunction y(e, t, r, s) {\n  const n = e.indexOf(t, r);\n  if (n === -1)\n    throw new Error(s);\n  return n + t.length - 1;\n}\nfunction x(e, t, r, s = \">\") {\n  const n = pt(e, t + 1, s);\n  if (!n)\n    return;\n  let i = n.data;\n  const d = n.index, u = i.search(/\\s/);\n  let o = i, a = !0;\n  u !== -1 && (o = i.substr(0, u).replace(/\\s\\s*$/, \"\"), i = i.substr(u + 1));\n  const l = o;\n  if (r) {\n    const f = o.indexOf(\":\");\n    f !== -1 && (o = o.substr(f + 1), a = o !== n.data.substr(f + 1));\n  }\n  return {\n    tagName: o,\n    tagExp: i,\n    closeIndex: d,\n    attrExpPresent: a,\n    rawTagName: l\n  };\n}\nfunction gt(e, t, r) {\n  const s = r;\n  let n = 1;\n  for (; r < e.length; r++)\n    if (e[r] === \"<\")\n      if (e[r + 1] === \"/\") {\n        const i = y(e, \">\", r, `${t} is not closed`);\n        if (e.substring(r + 2, i).trim() === t && (n--, n === 0))\n          return {\n            tagContent: e.substring(s, r),\n            i\n          };\n        r = i;\n      } else if (e[r + 1] === \"?\")\n        r = y(e, \"?>\", r + 1, \"StopNode is not closed.\");\n      else if (e.substr(r + 1, 3) === \"!--\")\n        r = y(e, \"-->\", r + 3, \"StopNode is not closed.\");\n      else if (e.substr(r + 1, 2) === \"![\")\n        r = y(e, \"]]>\", r, \"StopNode is not closed.\") - 2;\n      else {\n        const i = x(e, r, \">\");\n        i && ((i && i.tagName) === t && i.tagExp[i.tagExp.length - 1] !== \"/\" && n++, r = i.closeIndex);\n      }\n}\nfunction $(e, t, r) {\n  if (t && typeof e == \"string\") {\n    const s = e.trim();\n    return s === \"true\" ? !0 : s === \"false\" ? !1 : rt(e, r);\n  } else\n    return k.isExist(e) ? e : \"\";\n}\nvar wt = nt, ne = {};\nfunction mt(e, t) {\n  return ie(e, t);\n}\nfunction ie(e, t, r) {\n  let s;\n  const n = {};\n  for (let i = 0; i < e.length; i++) {\n    const d = e[i], u = Nt(d);\n    let o = \"\";\n    if (r === void 0 ? o = u : o = r + \".\" + u, u === t.textNodeName)\n      s === void 0 ? s = d[u] : s += \"\" + d[u];\n    else {\n      if (u === void 0)\n        continue;\n      if (d[u]) {\n        let a = ie(d[u], t, o);\n        const l = bt(a, t);\n        d[\":@\"] ? Et(a, d[\":@\"], o, t) : Object.keys(a).length === 1 && a[t.textNodeName] !== void 0 && !t.alwaysCreateTextNode ? a = a[t.textNodeName] : Object.keys(a).length === 0 && (t.alwaysCreateTextNode ? a[t.textNodeName] = \"\" : a = \"\"), n[u] !== void 0 && n.hasOwnProperty(u) ? (Array.isArray(n[u]) || (n[u] = [n[u]]), n[u].push(a)) : t.isArray(u, o, l) ? n[u] = [a] : n[u] = a;\n      }\n    }\n  }\n  return typeof s == \"string\" ? s.length > 0 && (n[t.textNodeName] = s) : s !== void 0 && (n[t.textNodeName] = s), n;\n}\nfunction Nt(e) {\n  const t = Object.keys(e);\n  for (let r = 0; r < t.length; r++) {\n    const s = t[r];\n    if (s !== \":@\")\n      return s;\n  }\n}\nfunction Et(e, t, r, s) {\n  if (t) {\n    const n = Object.keys(t), i = n.length;\n    for (let d = 0; d < i; d++) {\n      const u = n[d];\n      s.isArray(u, r + \".\" + u, !0, !0) ? e[u] = [t[u]] : e[u] = t[u];\n    }\n  }\n}\nfunction bt(e, t) {\n  const { textNodeName: r } = t, s = Object.keys(e).length;\n  return !!(s === 0 || s === 1 && (e[r] || typeof e[r] == \"boolean\" || e[r] === 0));\n}\nne.prettify = mt;\nconst { buildOptions: yt } = B, _t = wt, { prettify: vt } = ne, Tt = S;\nlet It = class {\n  constructor(t) {\n    this.externalEntities = {}, this.options = yt(t);\n  }\n  /**\n   * Parse XML dats to JS object \n   * @param {string|Buffer} xmlData \n   * @param {boolean|Object} validationOption \n   */\n  parse(t, r) {\n    if (typeof t != \"string\")\n      if (t.toString)\n        t = t.toString();\n      else\n        throw new Error(\"XML data is accepted in String or Bytes[] form.\");\n    if (r) {\n      r === !0 && (r = {});\n      const i = Tt.validate(t, r);\n      if (i !== !0)\n        throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`);\n    }\n    const s = new _t(this.options);\n    s.addExternalEntities(this.externalEntities);\n    const n = s.parseXml(t);\n    return this.options.preserveOrder || n === void 0 ? n : vt(n, this.options);\n  }\n  /**\n   * Add Entity which is not by default supported by this library\n   * @param {string} key \n   * @param {string} value \n   */\n  addEntity(t, r) {\n    if (r.indexOf(\"&\") !== -1)\n      throw new Error(\"Entity value can't have '&'\");\n    if (t.indexOf(\"&\") !== -1 || t.indexOf(\";\") !== -1)\n      throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'\");\n    if (r === \"&\")\n      throw new Error(\"An entity with value '&' is not permitted\");\n    this.externalEntities[t] = r;\n  }\n};\nvar At = It;\nconst Ot = `\n`;\nfunction Ct(e, t) {\n  let r = \"\";\n  return t.format && t.indentBy.length > 0 && (r = Ot), se(e, t, \"\", r);\n}\nfunction se(e, t, r, s) {\n  let n = \"\", i = !1;\n  for (let d = 0; d < e.length; d++) {\n    const u = e[d], o = Pt(u);\n    if (o === void 0)\n      continue;\n    let a = \"\";\n    if (r.length === 0 ? a = o : a = `${r}.${o}`, o === t.textNodeName) {\n      let h = u[o];\n      xt(a, t) || (h = t.tagValueProcessor(o, h), h = oe(h, t)), i && (n += s), n += h, i = !1;\n      continue;\n    } else if (o === t.cdataPropName) {\n      i && (n += s), n += `<![CDATA[${u[o][0][t.textNodeName]}]]>`, i = !1;\n      continue;\n    } else if (o === t.commentPropName) {\n      n += s + `<!--${u[o][0][t.textNodeName]}-->`, i = !0;\n      continue;\n    } else if (o[0] === \"?\") {\n      const h = K(u[\":@\"], t), _ = o === \"?xml\" ? \"\" : s;\n      let E = u[o][0][t.textNodeName];\n      E = E.length !== 0 ? \" \" + E : \"\", n += _ + `<${o}${E}${h}?>`, i = !0;\n      continue;\n    }\n    let l = s;\n    l !== \"\" && (l += t.indentBy);\n    const f = K(u[\":@\"], t), c = s + `<${o}${f}`, g = se(u[o], t, a, l);\n    t.unpairedTags.indexOf(o) !== -1 ? t.suppressUnpairedNode ? n += c + \">\" : n += c + \"/>\" : (!g || g.length === 0) && t.suppressEmptyNode ? n += c + \"/>\" : g && g.endsWith(\">\") ? n += c + `>${g}${s}</${o}>` : (n += c + \">\", g && s !== \"\" && (g.includes(\"/>\") || g.includes(\"</\")) ? n += s + t.indentBy + g + s : n += g, n += `</${o}>`), i = !0;\n  }\n  return n;\n}\nfunction Pt(e) {\n  const t = Object.keys(e);\n  for (let r = 0; r < t.length; r++) {\n    const s = t[r];\n    if (e.hasOwnProperty(s) && s !== \":@\")\n      return s;\n  }\n}\nfunction K(e, t) {\n  let r = \"\";\n  if (e && !t.ignoreAttributes)\n    for (let s in e) {\n      if (!e.hasOwnProperty(s))\n        continue;\n      let n = t.attributeValueProcessor(s, e[s]);\n      n = oe(n, t), n === !0 && t.suppressBooleanAttributes ? r += ` ${s.substr(t.attributeNamePrefix.length)}` : r += ` ${s.substr(t.attributeNamePrefix.length)}=\"${n}\"`;\n    }\n  return r;\n}\nfunction xt(e, t) {\n  e = e.substr(0, e.length - t.textNodeName.length - 1);\n  let r = e.substr(e.lastIndexOf(\".\") + 1);\n  for (let s in t.stopNodes)\n    if (t.stopNodes[s] === e || t.stopNodes[s] === \"*.\" + r)\n      return !0;\n  return !1;\n}\nfunction oe(e, t) {\n  if (e && e.length > 0 && t.processEntities)\n    for (let r = 0; r < t.entities.length; r++) {\n      const s = t.entities[r];\n      e = e.replace(s.regex, s.val);\n    }\n  return e;\n}\nvar $t = Ct;\nconst Ft = $t, Vt = {\n  attributeNamePrefix: \"@_\",\n  attributesGroupName: !1,\n  textNodeName: \"#text\",\n  ignoreAttributes: !0,\n  cdataPropName: !1,\n  format: !1,\n  indentBy: \"  \",\n  suppressEmptyNode: !1,\n  suppressUnpairedNode: !0,\n  suppressBooleanAttributes: !0,\n  tagValueProcessor: function(e, t) {\n    return t;\n  },\n  attributeValueProcessor: function(e, t) {\n    return t;\n  },\n  preserveOrder: !1,\n  commentPropName: !1,\n  unpairedTags: [],\n  entities: [\n    { regex: new RegExp(\"&\", \"g\"), val: \"&amp;\" },\n    //it must be on top\n    { regex: new RegExp(\">\", \"g\"), val: \"&gt;\" },\n    { regex: new RegExp(\"<\", \"g\"), val: \"&lt;\" },\n    { regex: new RegExp(\"'\", \"g\"), val: \"&apos;\" },\n    { regex: new RegExp('\"', \"g\"), val: \"&quot;\" }\n  ],\n  processEntities: !0,\n  stopNodes: [],\n  // transformTagName: false,\n  // transformAttributeName: false,\n  oneListGroup: !1\n};\nfunction b(e) {\n  this.options = Object.assign({}, Vt, e), this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {\n    return !1;\n  } : (this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = St), this.processTextOrObjNode = Lt, this.options.format ? (this.indentate = Rt, this.tagEndChar = `>\n`, this.newLine = `\n`) : (this.indentate = function() {\n    return \"\";\n  }, this.tagEndChar = \">\", this.newLine = \"\");\n}\nb.prototype.build = function(e) {\n  return this.options.preserveOrder ? Ft(e, this.options) : (Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = {\n    [this.options.arrayNodeName]: e\n  }), this.j2x(e, 0).val);\n};\nb.prototype.j2x = function(e, t) {\n  let r = \"\", s = \"\";\n  for (let n in e)\n    if (Object.prototype.hasOwnProperty.call(e, n))\n      if (typeof e[n] > \"u\")\n        this.isAttribute(n) && (s += \"\");\n      else if (e[n] === null)\n        this.isAttribute(n) ? s += \"\" : n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar;\n      else if (e[n] instanceof Date)\n        s += this.buildTextValNode(e[n], n, \"\", t);\n      else if (typeof e[n] != \"object\") {\n        const i = this.isAttribute(n);\n        if (i)\n          r += this.buildAttrPairStr(i, \"\" + e[n]);\n        else if (n === this.options.textNodeName) {\n          let d = this.options.tagValueProcessor(n, \"\" + e[n]);\n          s += this.replaceEntitiesValue(d);\n        } else\n          s += this.buildTextValNode(e[n], n, \"\", t);\n      } else if (Array.isArray(e[n])) {\n        const i = e[n].length;\n        let d = \"\";\n        for (let u = 0; u < i; u++) {\n          const o = e[n][u];\n          typeof o > \"u\" || (o === null ? n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar : typeof o == \"object\" ? this.options.oneListGroup ? d += this.j2x(o, t + 1).val : d += this.processTextOrObjNode(o, n, t) : d += this.buildTextValNode(o, n, \"\", t));\n        }\n        this.options.oneListGroup && (d = this.buildObjectNode(d, n, \"\", t)), s += d;\n      } else if (this.options.attributesGroupName && n === this.options.attributesGroupName) {\n        const i = Object.keys(e[n]), d = i.length;\n        for (let u = 0; u < d; u++)\n          r += this.buildAttrPairStr(i[u], \"\" + e[n][i[u]]);\n      } else\n        s += this.processTextOrObjNode(e[n], n, t);\n  return { attrStr: r, val: s };\n};\nb.prototype.buildAttrPairStr = function(e, t) {\n  return t = this.options.attributeValueProcessor(e, \"\" + t), t = this.replaceEntitiesValue(t), this.options.suppressBooleanAttributes && t === \"true\" ? \" \" + e : \" \" + e + '=\"' + t + '\"';\n};\nfunction Lt(e, t, r) {\n  const s = this.j2x(e, r + 1);\n  return e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, s.attrStr, r) : this.buildObjectNode(s.val, t, s.attrStr, r);\n}\nb.prototype.buildObjectNode = function(e, t, r, s) {\n  if (e === \"\")\n    return t[0] === \"?\" ? this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar : this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar;\n  {\n    let n = \"</\" + t + this.tagEndChar, i = \"\";\n    return t[0] === \"?\" && (i = \"?\", n = \"\"), (r || r === \"\") && e.indexOf(\"<\") === -1 ? this.indentate(s) + \"<\" + t + r + i + \">\" + e + n : this.options.commentPropName !== !1 && t === this.options.commentPropName && i.length === 0 ? this.indentate(s) + `<!--${e}-->` + this.newLine : this.indentate(s) + \"<\" + t + r + i + this.tagEndChar + e + this.indentate(s) + n;\n  }\n};\nb.prototype.closeTag = function(e) {\n  let t = \"\";\n  return this.options.unpairedTags.indexOf(e) !== -1 ? this.options.suppressUnpairedNode || (t = \"/\") : this.options.suppressEmptyNode ? t = \"/\" : t = `></${e}`, t;\n};\nb.prototype.buildTextValNode = function(e, t, r, s) {\n  if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName)\n    return this.indentate(s) + `<![CDATA[${e}]]>` + this.newLine;\n  if (this.options.commentPropName !== !1 && t === this.options.commentPropName)\n    return this.indentate(s) + `<!--${e}-->` + this.newLine;\n  if (t[0] === \"?\")\n    return this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar;\n  {\n    let n = this.options.tagValueProcessor(t, e);\n    return n = this.replaceEntitiesValue(n), n === \"\" ? this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar : this.indentate(s) + \"<\" + t + r + \">\" + n + \"</\" + t + this.tagEndChar;\n  }\n};\nb.prototype.replaceEntitiesValue = function(e) {\n  if (e && e.length > 0 && this.options.processEntities)\n    for (let t = 0; t < this.options.entities.length; t++) {\n      const r = this.options.entities[t];\n      e = e.replace(r.regex, r.val);\n    }\n  return e;\n};\nfunction Rt(e) {\n  return this.options.indentBy.repeat(e);\n}\nfunction St(e) {\n  return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;\n}\nvar Mt = b;\nconst Bt = S, kt = At, qt = Mt;\nvar W = {\n  XMLParser: kt,\n  XMLValidator: Bt,\n  XMLBuilder: qt\n};\nfunction Xt(e) {\n  if (typeof e != \"string\")\n    throw new TypeError(`Expected a \\`string\\`, got \\`${typeof e}\\``);\n  if (e = e.trim(), e.length === 0 || W.XMLValidator.validate(e) !== !0)\n    return !1;\n  let t;\n  const r = new W.XMLParser();\n  try {\n    t = r.parse(e);\n  } catch {\n    return !1;\n  }\n  return !(!t || !(\"svg\" in t));\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass cr {\n  _view;\n  constructor(t) {\n    Ut(t), this._view = t;\n  }\n  get id() {\n    return this._view.id;\n  }\n  get name() {\n    return this._view.name;\n  }\n  get caption() {\n    return this._view.caption;\n  }\n  get emptyTitle() {\n    return this._view.emptyTitle;\n  }\n  get emptyCaption() {\n    return this._view.emptyCaption;\n  }\n  get getContents() {\n    return this._view.getContents;\n  }\n  get icon() {\n    return this._view.icon;\n  }\n  set icon(t) {\n    this._view.icon = t;\n  }\n  get order() {\n    return this._view.order;\n  }\n  set order(t) {\n    this._view.order = t;\n  }\n  get params() {\n    return this._view.params;\n  }\n  set params(t) {\n    this._view.params = t;\n  }\n  get columns() {\n    return this._view.columns;\n  }\n  get emptyView() {\n    return this._view.emptyView;\n  }\n  get parent() {\n    return this._view.parent;\n  }\n  get sticky() {\n    return this._view.sticky;\n  }\n  get expanded() {\n    return this._view.expanded;\n  }\n  set expanded(t) {\n    this._view.expanded = t;\n  }\n  get defaultSortKey() {\n    return this._view.defaultSortKey;\n  }\n}\nconst Ut = function(e) {\n  if (!e.id || typeof e.id != \"string\")\n    throw new Error(\"View id is required and must be a string\");\n  if (!e.name || typeof e.name != \"string\")\n    throw new Error(\"View name is required and must be a string\");\n  if (e.columns && e.columns.length > 0 && (!e.caption || typeof e.caption != \"string\"))\n    throw new Error(\"View caption is required for top-level views and must be a string\");\n  if (!e.getContents || typeof e.getContents != \"function\")\n    throw new Error(\"View getContents is required and must be a function\");\n  if (!e.icon || typeof e.icon != \"string\" || !Xt(e.icon))\n    throw new Error(\"View icon is required and must be a valid svg string\");\n  if (!(\"order\" in e) || typeof e.order != \"number\")\n    throw new Error(\"View order is required and must be a number\");\n  if (e.columns && e.columns.forEach((t) => {\n    if (!(t instanceof Ie))\n      throw new Error(\"View columns must be an array of Column. Invalid column found\");\n  }), e.emptyView && typeof e.emptyView != \"function\")\n    throw new Error(\"View emptyView must be a function\");\n  if (e.parent && typeof e.parent != \"string\")\n    throw new Error(\"View parent must be a string\");\n  if (\"sticky\" in e && typeof e.sticky != \"boolean\")\n    throw new Error(\"View sticky must be a boolean\");\n  if (\"expanded\" in e && typeof e.expanded != \"boolean\")\n    throw new Error(\"View expanded must be a boolean\");\n  if (e.defaultSortKey && typeof e.defaultSortKey != \"string\")\n    throw new Error(\"View defaultSortKey must be a string\");\n  return !0;\n};\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst hr = function(e) {\n  return F().registerEntry(e);\n}, pr = function(e) {\n  return F().unregisterEntry(e);\n}, gr = function(e) {\n  return F().getEntries(e).sort((r, s) => r.order !== void 0 && s.order !== void 0 && r.order !== s.order ? r.order - s.order : r.displayName.localeCompare(s.displayName, void 0, { numeric: !0, sensitivity: \"base\" }));\n};\nexport {\n  Ie as Column,\n  Z as DefaultType,\n  ye as File,\n  Qt as FileAction,\n  R as FileType,\n  _e as Folder,\n  tr as Header,\n  Te as Navigation,\n  D as Node,\n  Q as NodeStatus,\n  N as Permission,\n  cr as View,\n  hr as addNewFileMenuEntry,\n  ur as davGetClient,\n  sr as davGetDefaultPropfind,\n  Ee as davGetFavoritesReport,\n  or as davGetRecentSearch,\n  be as davParsePermissions,\n  te as davRemoteURL,\n  ve as davResultToNode,\n  ee as davRootPath,\n  Y as defaultDavNamespaces,\n  j as defaultDavProperties,\n  Yt as formatFileSize,\n  L as getDavNameSpaces,\n  V as getDavProperties,\n  dr as getFavoriteNodes,\n  er as getFileActions,\n  nr as getFileListHeaders,\n  ar as getNavigation,\n  gr as getNewFileMenuEntries,\n  Jt as parseFileSize,\n  ir as registerDavProperty,\n  Dt as registerFileAction,\n  rr as registerFileListHeaders,\n  pr as removeNewFileMenuEntry\n};\n","/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger';\nexport default getLoggerBuilder()\n    .setApp('files_sharing')\n    .detectUser()\n    .build();\n","import { Folder, File } from '@nextcloud/files';\nimport { generateOcsUrl, generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport axios from '@nextcloud/axios';\nimport logger from './logger';\nexport const rootPath = `/files/${getCurrentUser()?.uid}`;\nconst headers = {\n    'Content-Type': 'application/json',\n};\nconst ocsEntryToNode = function (ocsEntry) {\n    try {\n        const isFolder = ocsEntry?.item_type === 'folder';\n        const hasPreview = ocsEntry?.has_preview === true;\n        const Node = isFolder ? Folder : File;\n        const fileid = ocsEntry.file_source;\n        // Generate path and strip double slashes\n        const path = ocsEntry?.path || ocsEntry.file_target;\n        const source = generateRemoteUrl(`dav/${rootPath}/${path}`.replaceAll(/\\/\\//gm, '/'));\n        // Prefer share time if more recent than item mtime\n        let mtime = ocsEntry?.item_mtime ? new Date((ocsEntry.item_mtime) * 1000) : undefined;\n        if (ocsEntry?.stime > (ocsEntry?.item_mtime || 0)) {\n            mtime = new Date((ocsEntry.stime) * 1000);\n        }\n        return new Node({\n            id: fileid,\n            source,\n            owner: ocsEntry?.uid_owner,\n            mime: ocsEntry?.mimetype,\n            mtime,\n            size: ocsEntry?.item_size,\n            permissions: ocsEntry?.item_permissions || ocsEntry?.permissions,\n            root: rootPath,\n            attributes: {\n                ...ocsEntry,\n                'has-preview': hasPreview,\n                favorite: ocsEntry?.tags?.includes(window.OC.TAG_FAVORITE) ? 1 : 0,\n            },\n        });\n    }\n    catch (error) {\n        logger.error('Error while parsing OCS entry', { error });\n        return null;\n    }\n};\nconst getShares = function (shared_with_me = false) {\n    const url = generateOcsUrl('apps/files_sharing/api/v1/shares');\n    return axios.get(url, {\n        headers,\n        params: {\n            shared_with_me,\n            include_tags: true,\n        },\n    });\n};\nconst getSharedWithYou = function () {\n    return getShares(true);\n};\nconst getSharedWithOthers = function () {\n    return getShares();\n};\nconst getRemoteShares = function () {\n    const url = generateOcsUrl('apps/files_sharing/api/v1/remote_shares');\n    return axios.get(url, {\n        headers,\n        params: {\n            include_tags: true,\n        },\n    });\n};\nconst getPendingShares = function () {\n    const url = generateOcsUrl('apps/files_sharing/api/v1/shares/pending');\n    return axios.get(url, {\n        headers,\n        params: {\n            include_tags: true,\n        },\n    });\n};\nconst getRemotePendingShares = function () {\n    const url = generateOcsUrl('apps/files_sharing/api/v1/remote_shares/pending');\n    return axios.get(url, {\n        headers,\n        params: {\n            include_tags: true,\n        },\n    });\n};\nconst getDeletedShares = function () {\n    const url = generateOcsUrl('apps/files_sharing/api/v1/deletedshares');\n    return axios.get(url, {\n        headers,\n        params: {\n            include_tags: true,\n        },\n    });\n};\nexport const getContents = async (sharedWithYou = true, sharedWithOthers = true, pendingShares = false, deletedshares = false, filterTypes = []) => {\n    const promises = [];\n    if (sharedWithYou) {\n        promises.push(getSharedWithYou(), getRemoteShares());\n    }\n    if (sharedWithOthers) {\n        promises.push(getSharedWithOthers());\n    }\n    if (pendingShares) {\n        promises.push(getPendingShares(), getRemotePendingShares());\n    }\n    if (deletedshares) {\n        promises.push(getDeletedShares());\n    }\n    const responses = await Promise.all(promises);\n    const data = responses.map((response) => response.data.ocs.data).flat();\n    let contents = data.map(ocsEntryToNode).filter((node) => node !== null);\n    if (filterTypes.length > 0) {\n        contents = contents.filter((node) => filterTypes.includes(node.attributes?.share_type));\n    }\n    return {\n        folder: new Folder({\n            id: 0,\n            source: generateRemoteUrl('dav' + rootPath),\n            owner: getCurrentUser()?.uid || null,\n        }),\n        contents,\n    };\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport { View, getNavigation } from '@nextcloud/files';\nimport AccountClockSvg from '@mdi/svg/svg/account-clock.svg?raw';\nimport AccountGroupSvg from '@mdi/svg/svg/account-group.svg?raw';\nimport AccountPlusSvg from '@mdi/svg/svg/account-plus.svg?raw';\nimport AccountSvg from '@mdi/svg/svg/account.svg?raw';\nimport DeleteSvg from '@mdi/svg/svg/delete.svg?raw';\nimport LinkSvg from '@mdi/svg/svg/link.svg?raw';\nimport { getContents } from '../services/SharingService';\nexport const sharesViewId = 'shareoverview';\nexport const sharedWithYouViewId = 'sharingin';\nexport const sharedWithOthersViewId = 'sharingout';\nexport const sharingByLinksViewId = 'sharinglinks';\nexport const deletedSharesViewId = 'deletedshares';\nexport const pendingSharesViewId = 'pendingshares';\nexport default () => {\n    const Navigation = getNavigation();\n    Navigation.register(new View({\n        id: sharesViewId,\n        name: t('files_sharing', 'Shares'),\n        caption: t('files_sharing', 'Overview of shared files.'),\n        emptyTitle: t('files_sharing', 'No shares'),\n        emptyCaption: t('files_sharing', 'Files and folders you shared or have been shared with you will show up here'),\n        icon: AccountPlusSvg,\n        order: 20,\n        columns: [],\n        getContents: () => getContents(),\n    }));\n    Navigation.register(new View({\n        id: sharedWithYouViewId,\n        name: t('files_sharing', 'Shared with you'),\n        caption: t('files_sharing', 'List of files that are shared with you.'),\n        emptyTitle: t('files_sharing', 'Nothing shared with you yet'),\n        emptyCaption: t('files_sharing', 'Files and folders others shared with you will show up here'),\n        icon: AccountSvg,\n        order: 1,\n        parent: sharesViewId,\n        columns: [],\n        getContents: () => getContents(true, false, false, false),\n    }));\n    Navigation.register(new View({\n        id: sharedWithOthersViewId,\n        name: t('files_sharing', 'Shared with others'),\n        caption: t('files_sharing', 'List of files that you shared with others.'),\n        emptyTitle: t('files_sharing', 'Nothing shared yet'),\n        emptyCaption: t('files_sharing', 'Files and folders you shared will show up here'),\n        icon: AccountGroupSvg,\n        order: 2,\n        parent: sharesViewId,\n        columns: [],\n        getContents: () => getContents(false, true, false, false),\n    }));\n    Navigation.register(new View({\n        id: sharingByLinksViewId,\n        name: t('files_sharing', 'Shared by link'),\n        caption: t('files_sharing', 'List of files that are shared by link.'),\n        emptyTitle: t('files_sharing', 'No shared links'),\n        emptyCaption: t('files_sharing', 'Files and folders you shared by link will show up here'),\n        icon: LinkSvg,\n        order: 3,\n        parent: sharesViewId,\n        columns: [],\n        getContents: () => getContents(false, true, false, false, [window.OC.Share.SHARE_TYPE_LINK]),\n    }));\n    Navigation.register(new View({\n        id: deletedSharesViewId,\n        name: t('files_sharing', 'Deleted shares'),\n        caption: t('files_sharing', 'List of shares you left.'),\n        emptyTitle: t('files_sharing', 'No deleted shares'),\n        emptyCaption: t('files_sharing', 'Shares you have left will show up here'),\n        icon: DeleteSvg,\n        order: 4,\n        parent: sharesViewId,\n        columns: [],\n        getContents: () => getContents(false, false, false, true),\n    }));\n    Navigation.register(new View({\n        id: pendingSharesViewId,\n        name: t('files_sharing', 'Pending shares'),\n        caption: t('files_sharing', 'List of unapproved shares.'),\n        emptyTitle: t('files_sharing', 'No pending shares'),\n        emptyCaption: t('files_sharing', 'Shares you have received but not approved will show up here'),\n        icon: AccountClockSvg,\n        order: 5,\n        parent: sharesViewId,\n        columns: [],\n        getContents: () => getContents(false, false, true, false),\n    }));\n};\n","import { emit } from '@nextcloud/event-bus';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { registerFileAction, FileAction } from '@nextcloud/files';\nimport { translatePlural as n } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport CheckSvg from '@mdi/svg/svg/check.svg?raw';\nimport { pendingSharesViewId } from '../views/shares';\nexport const action = new FileAction({\n    id: 'accept-share',\n    displayName: (nodes) => n('files_sharing', 'Accept share', 'Accept shares', nodes.length),\n    iconSvgInline: () => CheckSvg,\n    enabled: (nodes, view) => nodes.length > 0 && view.id === pendingSharesViewId,\n    async exec(node) {\n        try {\n            const isRemote = !!node.attributes.remote;\n            const url = generateOcsUrl('apps/files_sharing/api/v1/{shareBase}/pending/{id}', {\n                shareBase: isRemote ? 'remote_shares' : 'shares',\n                id: node.attributes.id,\n            });\n            await axios.post(url);\n            // Remove from current view\n            emit('files:node:deleted', node);\n            return true;\n        }\n        catch (error) {\n            return false;\n        }\n    },\n    async execBatch(nodes, view, dir) {\n        return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n    },\n    order: 1,\n    inline: () => true,\n});\nregisterFileAction(action);\n","import { registerFileAction, FileAction, DefaultType } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport { sharesViewId, sharedWithYouViewId, sharedWithOthersViewId, sharingByLinksViewId } from '../views/shares';\nexport const action = new FileAction({\n    id: 'open-in-files',\n    displayName: () => t('files', 'Open in Files'),\n    iconSvgInline: () => '',\n    enabled: (nodes, view) => [\n        sharesViewId,\n        sharedWithYouViewId,\n        sharedWithOthersViewId,\n        sharingByLinksViewId,\n        // Deleted and pending shares are not\n        // accessible in the files app.\n    ].includes(view.id),\n    async exec(node) {\n        window.OCP.Files.Router.goToRoute(null, // use default route\n        { view: 'files', fileid: node.fileid }, { dir: node.dirname });\n        return null;\n    },\n    // Before openFolderAction\n    order: -1000,\n    default: DefaultType.HIDDEN,\n});\nregisterFileAction(action);\n","import { emit } from '@nextcloud/event-bus';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { registerFileAction, FileAction } from '@nextcloud/files';\nimport { translatePlural as n } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport CloseSvg from '@mdi/svg/svg/close.svg?raw';\nimport { pendingSharesViewId } from '../views/shares';\nexport const action = new FileAction({\n    id: 'reject-share',\n    displayName: (nodes) => n('files_sharing', 'Reject share', 'Reject shares', nodes.length),\n    iconSvgInline: () => CloseSvg,\n    enabled: (nodes, view) => {\n        if (view.id !== pendingSharesViewId) {\n            return false;\n        }\n        if (nodes.length === 0) {\n            return false;\n        }\n        // disable rejecting group shares from the pending list because they anyway\n        // land back into that same list after rejecting them\n        if (nodes.some(node => node.attributes.remote_id\n            && node.attributes.share_type === window.OC.Share.SHARE_TYPE_REMOTE_GROUP)) {\n            return false;\n        }\n        return true;\n    },\n    async exec(node) {\n        try {\n            const isRemote = !!node.attributes.remote;\n            const url = generateOcsUrl('apps/files_sharing/api/v1/{shareBase}/{id}', {\n                shareBase: isRemote ? 'remote_shares' : 'shares',\n                id: node.attributes.id,\n            });\n            await axios.delete(url);\n            // Remove from current view\n            emit('files:node:deleted', node);\n            return true;\n        }\n        catch (error) {\n            return false;\n        }\n    },\n    async execBatch(nodes, view, dir) {\n        return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n    },\n    order: 2,\n    inline: () => true,\n});\nregisterFileAction(action);\n","import { emit } from '@nextcloud/event-bus';\nimport { FileAction, registerFileAction } from '@nextcloud/files';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { translatePlural as n } from '@nextcloud/l10n';\nimport ArrowULeftTopSvg from '@mdi/svg/svg/arrow-u-left-top.svg?raw';\nimport axios from '@nextcloud/axios';\nimport { deletedSharesViewId } from '../views/shares';\nexport const action = new FileAction({\n    id: 'restore-share',\n    displayName: (nodes) => n('files_sharing', 'Restore share', 'Restore shares', nodes.length),\n    iconSvgInline: () => ArrowULeftTopSvg,\n    enabled: (nodes, view) => nodes.length > 0 && view.id === deletedSharesViewId,\n    async exec(node) {\n        try {\n            const url = generateOcsUrl('apps/files_sharing/api/v1/deletedshares/{id}', {\n                id: node.attributes.id,\n            });\n            await axios.post(url);\n            // Remove from current view\n            emit('files:node:deleted', node);\n            return true;\n        }\n        catch (error) {\n            return false;\n        }\n    },\n    async execBatch(nodes, view, dir) {\n        return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n    },\n    order: 1,\n    inline: () => true,\n});\nregisterFileAction(action);\n","/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { Permission, View, FileAction, FileType } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport InformationSvg from '@mdi/svg/svg/information-variant.svg?raw';\nimport logger from '../logger.js';\nexport const ACTION_DETAILS = 'details';\nexport const action = new FileAction({\n    id: ACTION_DETAILS,\n    displayName: () => t('files', 'Open details'),\n    iconSvgInline: () => InformationSvg,\n    // Sidebar currently supports user folder only, /files/USER\n    enabled: (nodes) => {\n        // Only works on single node\n        if (nodes.length !== 1) {\n            return false;\n        }\n        if (!nodes[0]) {\n            return false;\n        }\n        // Only work if the sidebar is available\n        if (!window?.OCA?.Files?.Sidebar) {\n            return false;\n        }\n        return (nodes[0].root?.startsWith('/files/') && nodes[0].permissions !== Permission.NONE) ?? false;\n    },\n    async exec(node, view, dir) {\n        try {\n            // TODO: migrate Sidebar to use a Node instead\n            await window.OCA.Files.Sidebar.open(node.path);\n            // Silently update current fileid\n            window.OCP.Files.Router.goToRoute(null, { view: view.id, fileid: node.fileid }, { dir }, true);\n            return null;\n        }\n        catch (error) {\n            logger.error('Error while opening sidebar', { error });\n            return false;\n        }\n    },\n    order: -50,\n});\n","\n      import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n      import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n      import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n      import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n      import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n      import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n      import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./sharingStatusAction.scss\";\n      \n      \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n      options.insert = insertFn.bind(null, \"head\");\n    \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./sharingStatusAction.scss\";\n       export default content && content.locals ? content.locals : undefined;\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { Node, View, registerFileAction, FileAction, Permission } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport { Type } from '@nextcloud/sharing';\nimport AccountGroupSvg from '@mdi/svg/svg/account-group.svg?raw';\nimport AccountPlusSvg from '@mdi/svg/svg/account-plus.svg?raw';\nimport LinkSvg from '@mdi/svg/svg/link.svg?raw';\nimport CircleSvg from '../../../../core/img/apps/circles.svg?raw';\nimport { action as sidebarAction } from '../../../files/src/actions/sidebarAction';\nimport { generateUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport './sharingStatusAction.scss';\nconst generateAvatarSvg = (userId) => {\n    const avatarUrl = generateUrl('/avatar/{userId}/32', { userId });\n    return `<svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\"\n\t\txmlns=\"http://www.w3.org/2000/svg\" class=\"sharing-status__avatar\">\n\t\t<image href=\"${avatarUrl}\" height=\"32\" width=\"32\" />\n\t</svg>`;\n};\nexport const action = new FileAction({\n    id: 'sharing-status',\n    displayName(nodes) {\n        const node = nodes[0];\n        const shareTypes = Object.values(node?.attributes?.['share-types'] || {}).flat();\n        const ownerId = node?.attributes?.['owner-id'];\n        if (shareTypes.length > 0\n            || (ownerId && ownerId !== getCurrentUser()?.uid)) {\n            return t('files_sharing', 'Shared');\n        }\n        return '';\n    },\n    title(nodes) {\n        const node = nodes[0];\n        const ownerId = node?.attributes?.['owner-id'];\n        const ownerDisplayName = node?.attributes?.['owner-display-name'];\n        if (ownerId && ownerId !== getCurrentUser()?.uid) {\n            return t('files_sharing', 'Shared by {ownerDisplayName}', { ownerDisplayName });\n        }\n        return t('files_sharing', 'Show sharing options');\n    },\n    iconSvgInline(nodes) {\n        const node = nodes[0];\n        const shareTypes = Object.values(node?.attributes?.['share-types'] || {}).flat();\n        // Link shares\n        if (shareTypes.includes(Type.SHARE_TYPE_LINK)\n            || shareTypes.includes(Type.SHARE_TYPE_EMAIL)) {\n            return LinkSvg;\n        }\n        // Group shares\n        if (shareTypes.includes(Type.SHARE_TYPE_GROUP)\n            || shareTypes.includes(Type.SHARE_TYPE_REMOTE_GROUP)) {\n            return AccountGroupSvg;\n        }\n        // Circle shares\n        if (shareTypes.includes(Type.SHARE_TYPE_CIRCLE)) {\n            return CircleSvg;\n        }\n        const ownerId = node?.attributes?.['owner-id'];\n        if (ownerId && ownerId !== getCurrentUser()?.uid) {\n            return generateAvatarSvg(ownerId);\n        }\n        return AccountPlusSvg;\n    },\n    enabled(nodes) {\n        if (nodes.length !== 1) {\n            return false;\n        }\n        const node = nodes[0];\n        const ownerId = node?.attributes?.['owner-id'];\n        if (ownerId && ownerId !== getCurrentUser()?.uid) {\n            return true;\n        }\n        return (node.permissions & Permission.SHARE) !== 0;\n    },\n    async exec(node, view, dir) {\n        // You need read permissions to see the sidebar\n        if ((node.permissions & Permission.READ) !== 0) {\n            window.OCA?.Files?.Sidebar?.setActiveTab?.('sharing');\n            return sidebarAction.exec(node, view, dir);\n        }\n        return null;\n    },\n    inline: () => true,\n});\nregisterFileAction(action);\n","/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport registerSharingViews from './views/shares';\nimport './actions/acceptShareAction';\nimport './actions/openInFilesAction';\nimport './actions/rejectShareAction';\nimport './actions/restoreShareAction';\nimport './actions/sharingStatusAction';\nregisterSharingViews();\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.action-items>.files-list__row-action-sharing-status{direction:rtl;padding-right:0 !important}svg.sharing-status__avatar{height:32px !important;width:32px !important;border-radius:32px;overflow:hidden}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files_sharing/src/actions/sharingStatusAction.scss\"],\"names\":[],\"mappings\":\"AAsBA,qDAEC,aAAA,CAEG,0BAAA,CAGJ,2BACC,sBAAA,CACA,qBAAA,CACA,kBAAA,CACA,eAAA\",\"sourcesContent\":[\"/**\\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\\n *\\n * @author John Molakvoæ <skjnldsv@protonmail.com>\\n *\\n * @license AGPL-3.0-or-later\\n *\\n * This program is free software: you can redistribute it and/or modify\\n * it under the terms of the GNU Affero General Public License as\\n * published by the Free Software Foundation, either version 3 of the\\n * License, or (at your option) any later version.\\n *\\n * This program is distributed in the hope that it will be useful,\\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n * GNU Affero General Public License for more details.\\n *\\n * You should have received a copy of the GNU Affero General Public License\\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\\n *\\n */\\n // Only when rendered inline, when not enough space, this is put in the menu\\n.action-items > .files-list__row-action-sharing-status {\\n\\t// put icon at the end of the button\\n\\tdirection: rtl;\\n\\t// align icons with textless inline actions\\n    padding-right: 0 !important;\\n}\\n\\nsvg.sharing-status__avatar {\\n\\theight: 32px !important;\\n\\twidth: 32px !important;\\n\\tborder-radius: 32px;\\n\\toverflow: hidden;\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","// The chunk loading function for additional chunks\n// Since all referenced chunks are already included\n// in this file, this function is empty here.\n__webpack_require__.e = () => (Promise.resolve());","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 1609;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t1609: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], () => (__webpack_require__(11090)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","m","e","setApp","build","setUid","uid","Z","DEFAULT","HIDDEN","Qt","_action","constructor","t","this","validateAction","id","displayName","title","iconSvgInline","enabled","exec","execBatch","order","parent","default","inline","renderInline","Error","Object","values","includes","Dt","window","_nc_fileactions","debug","find","error","action","push","N","NONE","CREATE","READ","UPDATE","DELETE","SHARE","ALL","R","Folder","File","J","match","X","source","URL","startsWith","mtime","Date","crtime","mime","size","permissions","owner","attributes","root","r","status","Q","NEW","FAILED","LOADING","LOCKED","D","_data","_attributes","_knownDavService","s","set","n","i","d","updateMtime","Reflect","deleteProperty","Proxy","replace","encodedSource","origin","slice","length","basename","extension","dirname","indexOf","pathname","isDavRessource","split","pop","path","fileid","move","rename","ye","type","_e","super","Te","_views","_currentView","register","remove","findIndex","splice","views","setActive","active","Ie","_column","Ae","render","sort","summary","S","O","RegExp","isExist","u","isEmptyObject","keys","merge","o","a","l","f","c","getValue","isName","getAllMatches","startIndex","lastIndex","g","nameRegexp","M","Oe","allowBooleanAttributes","unpairedTags","U","G","substr","p","w","z","validate","assign","err","trim","substring","Re","xe","value","index","H","code","msg","line","tagClosed","tagName","tagStartPos","col","Ve","JSON","stringify","map","Ce","Pe","$e","v","Le","hasOwnProperty","Fe","B","re","preserveOrder","attributeNamePrefix","attributesGroupName","textNodeName","ignoreAttributes","removeNSPrefix","parseTagValue","parseAttributeValue","trimValues","cdataPropName","numberParseOptions","hex","leadingZeros","eNotation","tagValueProcessor","attributeValueProcessor","stopNodes","alwaysCreateTextNode","isArray","commentPropName","processEntities","htmlEntities","ignoreDeclaration","ignorePiTags","transformTagName","transformAttributeName","updateTag","buildOptions","defaultOptions","ke","Xe","Ue","Ge","ze","He","Ke","We","je","Ye","Number","parseInt","parseFloat","Je","decimalPoint","k","T","tagname","child","add","addChild","tt","entityName","val","regx","entities","rt","skipLike","test","De","search","it","lastEntities","regex","st","options","replaceEntitiesValue","$","ot","charAt","ut","dt","resolveNameSpace","at","y","saveTextToParentTag","lastIndexOf","tagsNodeStack","x","tagExp","attrExpPresent","buildAttributesMap","closeIndex","docTypeEntities","parseTextData","rawTagName","isItStopNode","h","E","readStopNodeData","tagContent","_","lt","ft","ampEntity","ct","ht","data","pt","gt","ne","ie","Nt","bt","Et","Array","prettify","yt","_t","currentNode","apos","quot","space","cent","pound","yen","euro","copyright","reg","inr","addExternalEntities","parseXml","vt","Tt","se","Pt","xt","oe","K","indentBy","suppressUnpairedNode","suppressEmptyNode","endsWith","suppressBooleanAttributes","Ft","format","Vt","oneListGroup","b","isAttribute","attrPrefixLen","St","processTextOrObjNode","Lt","indentate","Rt","tagEndChar","newLine","j2x","buildTextValNode","attrStr","buildObjectNode","repeat","prototype","arrayNodeName","call","buildAttrPairStr","closeTag","W","XMLParser","externalEntities","parse","toString","addEntity","XMLValidator","XMLBuilder","cr","_view","Ut","name","caption","emptyTitle","emptyCaption","getContents","icon","params","columns","emptyView","sticky","expanded","defaultSortKey","TypeError","Xt","forEach","getLoggerBuilder","detectUser","rootPath","getCurrentUser","headers","ocsEntryToNode","ocsEntry","isFolder","item_type","hasPreview","has_preview","Node","file_source","file_target","generateRemoteUrl","replaceAll","item_mtime","undefined","stime","uid_owner","mimetype","item_size","item_permissions","favorite","tags","OC","TAG_FAVORITE","logger","getShares","shared_with_me","arguments","url","generateOcsUrl","axios","get","include_tags","async","sharedWithOthers","pendingShares","deletedshares","filterTypes","promises","getRemoteShares","getPendingShares","getRemotePendingShares","getDeletedShares","contents","Promise","all","response","ocs","flat","filter","node","share_type","folder","sharesViewId","sharedWithYouViewId","sharedWithOthersViewId","sharingByLinksViewId","deletedSharesViewId","pendingSharesViewId","registerFileAction","FileAction","nodes","view","isRemote","remote","shareBase","post","emit","dir","OCP","Files","Router","goToRoute","DefaultType","some","remote_id","Share","SHARE_TYPE_REMOTE_GROUP","delete","InformationSvg","OCA","Sidebar","Permission","open","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","shareTypes","ownerId","ownerDisplayName","Type","SHARE_TYPE_LINK","SHARE_TYPE_EMAIL","LinkSvg","SHARE_TYPE_GROUP","AccountGroupSvg","SHARE_TYPE_CIRCLE","userId","generateUrl","AccountPlusSvg","setActiveTab","sidebarAction","Navigation","_nc_navigation","View","registerSharingViews","___CSS_LOADER_EXPORT___","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","result","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","every","key","getter","__esModule","definition","defineProperty","enumerable","resolve","globalThis","Function","obj","prop","Symbol","toStringTag","nmd","paths","children","document","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","bind","nc","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"files_sharing-init.js?v=ccdcb3e75c0ee1fcfd13","mappings":";uBAAIA,oGC4BJ,MAAwGC,EAAhF,QAAZC,GAAmG,YAAhF,UAAIC,OAAO,SAASC,SAAU,UAAID,OAAO,SAASE,OAAOH,EAAEI,KAAKF,QAApF,IAACF,EA0IRK,EAAoB,CAAEL,IAAOA,EAAEM,QAAU,UAAWN,EAAEO,OAAS,SAAUP,GAArD,CAAyDK,GAAK,CAAC,GACvF,MAAMG,EACJC,QACA,WAAAC,CAAYC,GACVC,KAAKC,eAAeF,GAAIC,KAAKH,QAAUE,CACzC,CACA,MAAIG,GACF,OAAOF,KAAKH,QAAQK,EACtB,CACA,eAAIC,GACF,OAAOH,KAAKH,QAAQM,WACtB,CACA,SAAIC,GACF,OAAOJ,KAA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CAxBb,EAAoBjK,EAAIgM,SAASC,SAAWC,KAAKC,SAASC,KAK1D,IAAIC,EAAkB,CACrB,KAAM,GAaPpC,EAAoBrW,EAAEkX,EAAKwB,GAA0C,IAA7BD,EAAgBC,GAGxD,IAAIC,EAAuB,CAACC,EAA4BjP,KACvD,IAKI2M,EAAUoC,EALV9B,EAAWjN,EAAK,GAChBkP,EAAclP,EAAK,GACnBmP,EAAUnP,EAAK,GAGIvM,EAAI,EAC3B,GAAGwZ,EAAS7C,MAAM3a,GAAgC,IAAxBqf,EAAgBrf,KAAa,CACtD,IAAIkd,KAAYuC,EACZxC,EAAoB9V,EAAEsY,EAAavC,KACrCD,EAAoBhe,EAAEie,GAAYuC,EAAYvC,IAGhD,GAAGwC,EAAS,IAAInC,EAASmC,EAAQzC,EAClC,CAEA,IADGuC,GAA4BA,EAA2BjP,GACrDvM,EAAIwZ,EAAS9Y,OAAQV,IACzBsb,EAAU9B,EAASxZ,GAChBiZ,EAAoB9V,EAAEkY,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOrC,EAAoBrW,EAAE2W,EAAO,EAGjCoC,EAAqBT,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FS,EAAmB9J,QAAQ0J,EAAqBK,KAAK,KAAM,IAC3DD,EAAmBpe,KAAOge,EAAqBK,KAAK,KAAMD,EAAmBpe,KAAKqe,KAAKD,QClDvF1C,EAAoB4C,QAAK9I,ECGzB,IAAI+I,EAAsB7C,EAAoBrW,OAAEmQ,EAAW,CAAC,OAAO,IAAOkG,EAAoB,SAC9F6C,EAAsB7C,EAAoBrW,EAAEkZ","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/node_modules/@nextcloud/files/dist/index.mjs","webpack:///nextcloud/apps/files_sharing/src/services/logger.ts","webpack:///nextcloud/apps/files_sharing/src/services/SharingService.ts","webpack:///nextcloud/apps/files_sharing/src/views/shares.ts","webpack:///nextcloud/apps/files_sharing/src/actions/acceptShareAction.ts","webpack:///nextcloud/apps/files_sharing/src/actions/openInFilesAction.ts","webpack:///nextcloud/apps/files_sharing/src/actions/rejectShareAction.ts","webpack:///nextcloud/apps/files_sharing/src/actions/restoreShareAction.ts","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files/src/actions/sidebarAction.ts","webpack://nextcloud/./apps/files_sharing/src/actions/sharingStatusAction.scss?3ea7","webpack:///nextcloud/apps/files_sharing/src/actions/sharingStatusAction.ts","webpack:///nextcloud/apps/files_sharing/src/init.ts","webpack:///nextcloud/apps/files_sharing/src/actions/sharingStatusAction.scss","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","import { getCurrentUser as A, onRequestTokenUpdate as ue, getRequestToken as de } from \"@nextcloud/auth\";\nimport { getLoggerBuilder as q } from \"@nextcloud/logger\";\nimport { getCanonicalLocale as ae } from \"@nextcloud/l10n\";\nimport { join as le, basename as fe, extname as ce, dirname as I } from \"path\";\nimport { encodePath as he } from \"@nextcloud/paths\";\nimport { generateRemoteUrl as pe } from \"@nextcloud/router\";\nimport { createClient as ge, getPatcher as we } from \"webdav\";\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst me = (e) => e === null ? q().setApp(\"files\").build() : q().setApp(\"files\").setUid(e.uid).build(), m = me(A());\n/**\n * @copyright Copyright (c) 2021 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Ne {\n  _entries = [];\n  registerEntry(t) {\n    this.validateEntry(t), this._entries.push(t);\n  }\n  unregisterEntry(t) {\n    const r = typeof t == \"string\" ? this.getEntryIndex(t) : this.getEntryIndex(t.id);\n    if (r === -1) {\n      m.warn(\"Entry not found, nothing removed\", { entry: t, entries: this.getEntries() });\n      return;\n    }\n    this._entries.splice(r, 1);\n  }\n  /**\n   * Get the list of registered entries\n   *\n   * @param {Folder} context the creation context. Usually the current folder\n   */\n  getEntries(t) {\n    return t ? this._entries.filter((r) => typeof r.enabled == \"function\" ? r.enabled(t) : !0) : this._entries;\n  }\n  getEntryIndex(t) {\n    return this._entries.findIndex((r) => r.id === t);\n  }\n  validateEntry(t) {\n    if (!t.id || !t.displayName || !(t.iconSvgInline || t.iconClass) || !t.handler)\n      throw new Error(\"Invalid entry\");\n    if (typeof t.id != \"string\" || typeof t.displayName != \"string\")\n      throw new Error(\"Invalid id or displayName property\");\n    if (t.iconClass && typeof t.iconClass != \"string\" || t.iconSvgInline && typeof t.iconSvgInline != \"string\")\n      throw new Error(\"Invalid icon provided\");\n    if (t.enabled !== void 0 && typeof t.enabled != \"function\")\n      throw new Error(\"Invalid enabled property\");\n    if (typeof t.handler != \"function\")\n      throw new Error(\"Invalid handler property\");\n    if (\"order\" in t && typeof t.order != \"number\")\n      throw new Error(\"Invalid order property\");\n    if (this.getEntryIndex(t.id) !== -1)\n      throw new Error(\"Duplicate entry\");\n  }\n}\nconst F = function() {\n  return typeof window._nc_newfilemenu > \"u\" && (window._nc_newfilemenu = new Ne(), m.debug(\"NewFileMenu initialized\")), window._nc_newfilemenu;\n};\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst C = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"], P = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\"];\nfunction Yt(e, t = !1, r = !1, s = !1) {\n  r = r && !s, typeof e == \"string\" && (e = Number(e));\n  let n = e > 0 ? Math.floor(Math.log(e) / Math.log(s ? 1e3 : 1024)) : 0;\n  n = Math.min((r ? P.length : C.length) - 1, n);\n  const i = r ? P[n] : C[n];\n  let d = (e / Math.pow(s ? 1e3 : 1024, n)).toFixed(1);\n  return t === !0 && n === 0 ? (d !== \"0.0\" ? \"< 1 \" : \"0 \") + (r ? P[1] : C[1]) : (n < 2 ? d = parseFloat(d).toFixed(0) : d = parseFloat(d).toLocaleString(ae()), d + \" \" + i);\n}\nfunction Jt(e, t = !1) {\n  try {\n    e = `${e}`.toLocaleLowerCase().replaceAll(/\\s+/g, \"\").replaceAll(\",\", \".\");\n  } catch {\n    return null;\n  }\n  const r = e.match(/^([0-9]*(\\.[0-9]*)?)([kmgtp]?)(i?)b?$/);\n  if (r === null || r[1] === \".\" || r[1] === \"\")\n    return null;\n  const s = {\n    \"\": 0,\n    k: 1,\n    m: 2,\n    g: 3,\n    t: 4,\n    p: 5,\n    e: 6\n  }, n = `${r[1]}`, i = r[4] === \"i\" || t ? 1024 : 1e3;\n  return Math.round(Number.parseFloat(n) * i ** s[r[3]]);\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar Z = /* @__PURE__ */ ((e) => (e.DEFAULT = \"default\", e.HIDDEN = \"hidden\", e))(Z || {});\nclass Qt {\n  _action;\n  constructor(t) {\n    this.validateAction(t), this._action = t;\n  }\n  get id() {\n    return this._action.id;\n  }\n  get displayName() {\n    return this._action.displayName;\n  }\n  get title() {\n    return this._action.title;\n  }\n  get iconSvgInline() {\n    return this._action.iconSvgInline;\n  }\n  get enabled() {\n    return this._action.enabled;\n  }\n  get exec() {\n    return this._action.exec;\n  }\n  get execBatch() {\n    return this._action.execBatch;\n  }\n  get order() {\n    return this._action.order;\n  }\n  get parent() {\n    return this._action.parent;\n  }\n  get default() {\n    return this._action.default;\n  }\n  get inline() {\n    return this._action.inline;\n  }\n  get renderInline() {\n    return this._action.renderInline;\n  }\n  validateAction(t) {\n    if (!t.id || typeof t.id != \"string\")\n      throw new Error(\"Invalid id\");\n    if (!t.displayName || typeof t.displayName != \"function\")\n      throw new Error(\"Invalid displayName function\");\n    if (\"title\" in t && typeof t.title != \"function\")\n      throw new Error(\"Invalid title function\");\n    if (!t.iconSvgInline || typeof t.iconSvgInline != \"function\")\n      throw new Error(\"Invalid iconSvgInline function\");\n    if (!t.exec || typeof t.exec != \"function\")\n      throw new Error(\"Invalid exec function\");\n    if (\"enabled\" in t && typeof t.enabled != \"function\")\n      throw new Error(\"Invalid enabled function\");\n    if (\"execBatch\" in t && typeof t.execBatch != \"function\")\n      throw new Error(\"Invalid execBatch function\");\n    if (\"order\" in t && typeof t.order != \"number\")\n      throw new Error(\"Invalid order\");\n    if (\"parent\" in t && typeof t.parent != \"string\")\n      throw new Error(\"Invalid parent\");\n    if (t.default && !Object.values(Z).includes(t.default))\n      throw new Error(\"Invalid default\");\n    if (\"inline\" in t && typeof t.inline != \"function\")\n      throw new Error(\"Invalid inline function\");\n    if (\"renderInline\" in t && typeof t.renderInline != \"function\")\n      throw new Error(\"Invalid renderInline function\");\n  }\n}\nconst Dt = function(e) {\n  if (typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions.find((t) => t.id === e.id)) {\n    m.error(`FileAction ${e.id} already registered`, { action: e });\n    return;\n  }\n  window._nc_fileactions.push(e);\n}, er = function() {\n  return typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass tr {\n  _header;\n  constructor(t) {\n    this.validateHeader(t), this._header = t;\n  }\n  get id() {\n    return this._header.id;\n  }\n  get order() {\n    return this._header.order;\n  }\n  get enabled() {\n    return this._header.enabled;\n  }\n  get render() {\n    return this._header.render;\n  }\n  get updated() {\n    return this._header.updated;\n  }\n  validateHeader(t) {\n    if (!t.id || !t.render || !t.updated)\n      throw new Error(\"Invalid header: id, render and updated are required\");\n    if (typeof t.id != \"string\")\n      throw new Error(\"Invalid id property\");\n    if (t.enabled !== void 0 && typeof t.enabled != \"function\")\n      throw new Error(\"Invalid enabled property\");\n    if (t.render && typeof t.render != \"function\")\n      throw new Error(\"Invalid render property\");\n    if (t.updated && typeof t.updated != \"function\")\n      throw new Error(\"Invalid updated property\");\n  }\n}\nconst rr = function(e) {\n  if (typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader.find((t) => t.id === e.id)) {\n    m.error(`Header ${e.id} already registered`, { header: e });\n    return;\n  }\n  window._nc_filelistheader.push(e);\n}, nr = function() {\n  return typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar N = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = \"NONE\", e[e.CREATE = 4] = \"CREATE\", e[e.READ = 1] = \"READ\", e[e.UPDATE = 2] = \"UPDATE\", e[e.DELETE = 8] = \"DELETE\", e[e.SHARE = 16] = \"SHARE\", e[e.ALL = 31] = \"ALL\", e))(N || {});\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst j = [\n  \"d:getcontentlength\",\n  \"d:getcontenttype\",\n  \"d:getetag\",\n  \"d:getlastmodified\",\n  \"d:quota-available-bytes\",\n  \"d:resourcetype\",\n  \"nc:has-preview\",\n  \"nc:is-encrypted\",\n  \"nc:mount-type\",\n  \"nc:share-attributes\",\n  \"oc:comments-unread\",\n  \"oc:favorite\",\n  \"oc:fileid\",\n  \"oc:owner-display-name\",\n  \"oc:owner-id\",\n  \"oc:permissions\",\n  \"oc:share-types\",\n  \"oc:size\",\n  \"ocs:share-permissions\"\n], Y = {\n  d: \"DAV:\",\n  nc: \"http://nextcloud.org/ns\",\n  oc: \"http://owncloud.org/ns\",\n  ocs: \"http://open-collaboration-services.org/ns\"\n}, ir = function(e, t = { nc: \"http://nextcloud.org/ns\" }) {\n  typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...j], window._nc_dav_namespaces = { ...Y });\n  const r = { ...window._nc_dav_namespaces, ...t };\n  if (window._nc_dav_properties.find((n) => n === e))\n    return m.error(`${e} already registered`, { prop: e }), !1;\n  if (e.startsWith(\"<\") || e.split(\":\").length !== 2)\n    return m.error(`${e} is not valid. See example: 'oc:fileid'`, { prop: e }), !1;\n  const s = e.split(\":\")[0];\n  return r[s] ? (window._nc_dav_properties.push(e), window._nc_dav_namespaces = r, !0) : (m.error(`${e} namespace unknown`, { prop: e, namespaces: r }), !1);\n}, V = function() {\n  return typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...j]), window._nc_dav_properties.map((e) => `<${e} />`).join(\" \");\n}, L = function() {\n  return typeof window._nc_dav_namespaces > \"u\" && (window._nc_dav_namespaces = { ...Y }), Object.keys(window._nc_dav_namespaces).map((e) => `xmlns:${e}=\"${window._nc_dav_namespaces?.[e]}\"`).join(\" \");\n}, sr = function() {\n  return `<?xml version=\"1.0\"?>\n\t\t<d:propfind ${L()}>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`;\n}, Ee = function() {\n  return `<?xml version=\"1.0\"?>\n\t\t<oc:filter-files ${L()}>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`;\n}, or = function(e) {\n  return `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<d:searchrequest ${L()}\n\txmlns:ns=\"https://github.com/icewind1991/SearchDAV/ns\">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${A()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${e}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst be = function(e = \"\") {\n  let t = N.NONE;\n  return e && ((e.includes(\"C\") || e.includes(\"K\")) && (t |= N.CREATE), e.includes(\"G\") && (t |= N.READ), (e.includes(\"W\") || e.includes(\"N\") || e.includes(\"V\")) && (t |= N.UPDATE), e.includes(\"D\") && (t |= N.DELETE), e.includes(\"R\") && (t |= N.SHARE)), t;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar R = /* @__PURE__ */ ((e) => (e.Folder = \"folder\", e.File = \"file\", e))(R || {});\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst J = function(e, t) {\n  return e.match(t) !== null;\n}, X = (e, t) => {\n  if (e.id && typeof e.id != \"number\")\n    throw new Error(\"Invalid id type of value\");\n  if (!e.source)\n    throw new Error(\"Missing mandatory source\");\n  try {\n    new URL(e.source);\n  } catch {\n    throw new Error(\"Invalid source format, source must be a valid URL\");\n  }\n  if (!e.source.startsWith(\"http\"))\n    throw new Error(\"Invalid source format, only http(s) is supported\");\n  if (e.mtime && !(e.mtime instanceof Date))\n    throw new Error(\"Invalid mtime type\");\n  if (e.crtime && !(e.crtime instanceof Date))\n    throw new Error(\"Invalid crtime type\");\n  if (!e.mime || typeof e.mime != \"string\" || !e.mime.match(/^[-\\w.]+\\/[-+\\w.]+$/gi))\n    throw new Error(\"Missing or invalid mandatory mime\");\n  if (\"size\" in e && typeof e.size != \"number\" && e.size !== void 0)\n    throw new Error(\"Invalid size type\");\n  if (\"permissions\" in e && e.permissions !== void 0 && !(typeof e.permissions == \"number\" && e.permissions >= N.NONE && e.permissions <= N.ALL))\n    throw new Error(\"Invalid permissions\");\n  if (e.owner && e.owner !== null && typeof e.owner != \"string\")\n    throw new Error(\"Invalid owner type\");\n  if (e.attributes && typeof e.attributes != \"object\")\n    throw new Error(\"Invalid attributes type\");\n  if (e.root && typeof e.root != \"string\")\n    throw new Error(\"Invalid root type\");\n  if (e.root && !e.root.startsWith(\"/\"))\n    throw new Error(\"Root must start with a leading slash\");\n  if (e.root && !e.source.includes(e.root))\n    throw new Error(\"Root must be part of the source\");\n  if (e.root && J(e.source, t)) {\n    const r = e.source.match(t)[0];\n    if (!e.source.includes(le(r, e.root)))\n      throw new Error(\"The root must be relative to the service. e.g /files/emma\");\n  }\n  if (e.status && !Object.values(Q).includes(e.status))\n    throw new Error(\"Status must be a valid NodeStatus\");\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar Q = /* @__PURE__ */ ((e) => (e.NEW = \"new\", e.FAILED = \"failed\", e.LOADING = \"loading\", e.LOCKED = \"locked\", e))(Q || {});\nclass D {\n  _data;\n  _attributes;\n  _knownDavService = /(remote|public)\\.php\\/(web)?dav/i;\n  constructor(t, r) {\n    X(t, r || this._knownDavService), this._data = t;\n    const s = {\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      set: (n, i, d) => (this.updateMtime(), Reflect.set(n, i, d)),\n      deleteProperty: (n, i) => (this.updateMtime(), Reflect.deleteProperty(n, i))\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    };\n    this._attributes = new Proxy(t.attributes || {}, s), delete this._data.attributes, r && (this._knownDavService = r);\n  }\n  /**\n   * Get the source url to this object\n   */\n  get source() {\n    return this._data.source.replace(/\\/$/i, \"\");\n  }\n  /**\n   * Get the encoded source url to this object for requests purposes\n   */\n  get encodedSource() {\n    const { origin: t } = new URL(this.source);\n    return t + he(this.source.slice(t.length));\n  }\n  /**\n   * Get this object name\n   */\n  get basename() {\n    return fe(this.source);\n  }\n  /**\n   * Get this object's extension\n   */\n  get extension() {\n    return ce(this.source);\n  }\n  /**\n   * Get the directory path leading to this object\n   * Will use the relative path to root if available\n   */\n  get dirname() {\n    if (this.root) {\n      const r = this.source.indexOf(this.root);\n      return I(this.source.slice(r + this.root.length) || \"/\");\n    }\n    const t = new URL(this.source);\n    return I(t.pathname);\n  }\n  /**\n   * Get the file mime\n   */\n  get mime() {\n    return this._data.mime;\n  }\n  /**\n   * Get the file modification time\n   */\n  get mtime() {\n    return this._data.mtime;\n  }\n  /**\n   * Get the file creation time\n   */\n  get crtime() {\n    return this._data.crtime;\n  }\n  /**\n   * Get the file size\n   */\n  get size() {\n    return this._data.size;\n  }\n  /**\n   * Get the file attribute\n   */\n  get attributes() {\n    return this._attributes;\n  }\n  /**\n   * Get the file permissions\n   */\n  get permissions() {\n    return this.owner === null && !this.isDavRessource ? N.READ : this._data.permissions !== void 0 ? this._data.permissions : N.NONE;\n  }\n  /**\n   * Get the file owner\n   */\n  get owner() {\n    return this.isDavRessource ? this._data.owner : null;\n  }\n  /**\n   * Is this a dav-related ressource ?\n   */\n  get isDavRessource() {\n    return J(this.source, this._knownDavService);\n  }\n  /**\n   * Get the dav root of this object\n   */\n  get root() {\n    return this._data.root ? this._data.root.replace(/^(.+)\\/$/, \"$1\") : this.isDavRessource && I(this.source).split(this._knownDavService).pop() || null;\n  }\n  /**\n   * Get the absolute path of this object relative to the root\n   */\n  get path() {\n    if (this.root) {\n      const t = this.source.indexOf(this.root);\n      return this.source.slice(t + this.root.length) || \"/\";\n    }\n    return (this.dirname + \"/\" + this.basename).replace(/\\/\\//g, \"/\");\n  }\n  /**\n   * Get the node id if defined.\n   * Will look for the fileid in attributes if undefined.\n   */\n  get fileid() {\n    return this._data?.id || this.attributes?.fileid;\n  }\n  /**\n   * Get the node status.\n   */\n  get status() {\n    return this._data?.status;\n  }\n  /**\n   * Set the node status.\n   */\n  set status(t) {\n    this._data.status = t;\n  }\n  /**\n   * Move the node to a new destination\n   *\n   * @param {string} destination the new source.\n   * e.g. https://cloud.domain.com/remote.php/dav/files/emma/Photos/picture.jpg\n   */\n  move(t) {\n    X({ ...this._data, source: t }, this._knownDavService), this._data.source = t, this.updateMtime();\n  }\n  /**\n   * Rename the node\n   * This aliases the move method for easier usage\n   *\n   * @param basename The new name of the node\n   */\n  rename(t) {\n    if (t.includes(\"/\"))\n      throw new Error(\"Invalid basename\");\n    this.move(I(this.source) + \"/\" + t);\n  }\n  /**\n   * Update the mtime if exists.\n   */\n  updateMtime() {\n    this._data.mtime && (this._data.mtime = /* @__PURE__ */ new Date());\n  }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass ye extends D {\n  get type() {\n    return R.File;\n  }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass _e extends D {\n  constructor(t) {\n    super({\n      ...t,\n      mime: \"httpd/unix-directory\"\n    });\n  }\n  get type() {\n    return R.Folder;\n  }\n  get extension() {\n    return null;\n  }\n  get mime() {\n    return \"httpd/unix-directory\";\n  }\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst ee = `/files/${A()?.uid}`, te = pe(\"dav\"), ur = function(e = te) {\n  const t = ge(e);\n  function r(n) {\n    t.setHeaders({\n      // Add this so the server knows it is an request from the browser\n      \"X-Requested-With\": \"XMLHttpRequest\",\n      // Inject user auth\n      requesttoken: n ?? \"\"\n    });\n  }\n  return ue(r), r(de()), we().patch(\"fetch\", (n, i) => {\n    const d = i.headers;\n    return d?.method && (i.method = d.method, delete d.method), fetch(n, i);\n  }), t;\n}, dr = async (e, t = \"/\", r = ee) => (await e.getDirectoryContents(`${r}${t}`, {\n  details: !0,\n  data: Ee(),\n  headers: {\n    // see davGetClient for patched webdav client\n    method: \"REPORT\"\n  },\n  includeSelf: !0\n})).data.filter((n) => n.filename !== t).map((n) => ve(n, r)), ve = function(e, t = ee, r = te) {\n  const s = e.props, n = be(s?.permissions), i = A()?.uid, d = {\n    id: s?.fileid || 0,\n    source: `${r}${e.filename}`,\n    mtime: new Date(Date.parse(e.lastmod)),\n    mime: e.mime,\n    size: s?.size || Number.parseInt(s.getcontentlength || \"0\"),\n    permissions: n,\n    owner: i,\n    root: t,\n    attributes: {\n      ...e,\n      ...s,\n      hasPreview: s?.[\"has-preview\"]\n    }\n  };\n  return delete d.attributes?.props, e.type === \"file\" ? new ye(d) : new _e(d);\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Te {\n  _views = [];\n  _currentView = null;\n  register(t) {\n    if (this._views.find((r) => r.id === t.id))\n      throw new Error(`View id ${t.id} is already registered`);\n    this._views.push(t);\n  }\n  remove(t) {\n    const r = this._views.findIndex((s) => s.id === t);\n    r !== -1 && this._views.splice(r, 1);\n  }\n  get views() {\n    return this._views;\n  }\n  setActive(t) {\n    this._currentView = t;\n  }\n  get active() {\n    return this._currentView;\n  }\n}\nconst ar = function() {\n  return typeof window._nc_navigation > \"u\" && (window._nc_navigation = new Te(), m.debug(\"Navigation service initialized\")), window._nc_navigation;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Ie {\n  _column;\n  constructor(t) {\n    Ae(t), this._column = t;\n  }\n  get id() {\n    return this._column.id;\n  }\n  get title() {\n    return this._column.title;\n  }\n  get render() {\n    return this._column.render;\n  }\n  get sort() {\n    return this._column.sort;\n  }\n  get summary() {\n    return this._column.summary;\n  }\n}\nconst Ae = function(e) {\n  if (!e.id || typeof e.id != \"string\")\n    throw new Error(\"A column id is required\");\n  if (!e.title || typeof e.title != \"string\")\n    throw new Error(\"A column title is required\");\n  if (!e.render || typeof e.render != \"function\")\n    throw new Error(\"A render function is required\");\n  if (e.sort && typeof e.sort != \"function\")\n    throw new Error(\"Column sortFunction must be a function\");\n  if (e.summary && typeof e.summary != \"function\")\n    throw new Error(\"Column summary must be a function\");\n  return !0;\n};\nvar S = {}, O = {};\n(function(e) {\n  const t = \":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\", r = t + \"\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\", s = \"[\" + t + \"][\" + r + \"]*\", n = new RegExp(\"^\" + s + \"$\"), i = function(u, o) {\n    const a = [];\n    let l = o.exec(u);\n    for (; l; ) {\n      const f = [];\n      f.startIndex = o.lastIndex - l[0].length;\n      const c = l.length;\n      for (let g = 0; g < c; g++)\n        f.push(l[g]);\n      a.push(f), l = o.exec(u);\n    }\n    return a;\n  }, d = function(u) {\n    const o = n.exec(u);\n    return !(o === null || typeof o > \"u\");\n  };\n  e.isExist = function(u) {\n    return typeof u < \"u\";\n  }, e.isEmptyObject = function(u) {\n    return Object.keys(u).length === 0;\n  }, e.merge = function(u, o, a) {\n    if (o) {\n      const l = Object.keys(o), f = l.length;\n      for (let c = 0; c < f; c++)\n        a === \"strict\" ? u[l[c]] = [o[l[c]]] : u[l[c]] = o[l[c]];\n    }\n  }, e.getValue = function(u) {\n    return e.isExist(u) ? u : \"\";\n  }, e.isName = d, e.getAllMatches = i, e.nameRegexp = s;\n})(O);\nconst M = O, Oe = {\n  allowBooleanAttributes: !1,\n  //A tag can have attributes without any value\n  unpairedTags: []\n};\nS.validate = function(e, t) {\n  t = Object.assign({}, Oe, t);\n  const r = [];\n  let s = !1, n = !1;\n  e[0] === \"\\uFEFF\" && (e = e.substr(1));\n  for (let i = 0; i < e.length; i++)\n    if (e[i] === \"<\" && e[i + 1] === \"?\") {\n      if (i += 2, i = G(e, i), i.err)\n        return i;\n    } else if (e[i] === \"<\") {\n      let d = i;\n      if (i++, e[i] === \"!\") {\n        i = z(e, i);\n        continue;\n      } else {\n        let u = !1;\n        e[i] === \"/\" && (u = !0, i++);\n        let o = \"\";\n        for (; i < e.length && e[i] !== \">\" && e[i] !== \" \" && e[i] !== \"\t\" && e[i] !== `\n` && e[i] !== \"\\r\"; i++)\n          o += e[i];\n        if (o = o.trim(), o[o.length - 1] === \"/\" && (o = o.substring(0, o.length - 1), i--), !Re(o)) {\n          let f;\n          return o.trim().length === 0 ? f = \"Invalid space after '<'.\" : f = \"Tag '\" + o + \"' is an invalid name.\", p(\"InvalidTag\", f, w(e, i));\n        }\n        const a = xe(e, i);\n        if (a === !1)\n          return p(\"InvalidAttr\", \"Attributes for '\" + o + \"' have open quote.\", w(e, i));\n        let l = a.value;\n        if (i = a.index, l[l.length - 1] === \"/\") {\n          const f = i - l.length;\n          l = l.substring(0, l.length - 1);\n          const c = H(l, t);\n          if (c === !0)\n            s = !0;\n          else\n            return p(c.err.code, c.err.msg, w(e, f + c.err.line));\n        } else if (u)\n          if (a.tagClosed) {\n            if (l.trim().length > 0)\n              return p(\"InvalidTag\", \"Closing tag '\" + o + \"' can't have attributes or invalid starting.\", w(e, d));\n            {\n              const f = r.pop();\n              if (o !== f.tagName) {\n                let c = w(e, f.tagStartPos);\n                return p(\n                  \"InvalidTag\",\n                  \"Expected closing tag '\" + f.tagName + \"' (opened in line \" + c.line + \", col \" + c.col + \") instead of closing tag '\" + o + \"'.\",\n                  w(e, d)\n                );\n              }\n              r.length == 0 && (n = !0);\n            }\n          } else\n            return p(\"InvalidTag\", \"Closing tag '\" + o + \"' doesn't have proper closing.\", w(e, i));\n        else {\n          const f = H(l, t);\n          if (f !== !0)\n            return p(f.err.code, f.err.msg, w(e, i - l.length + f.err.line));\n          if (n === !0)\n            return p(\"InvalidXml\", \"Multiple possible root nodes found.\", w(e, i));\n          t.unpairedTags.indexOf(o) !== -1 || r.push({ tagName: o, tagStartPos: d }), s = !0;\n        }\n        for (i++; i < e.length; i++)\n          if (e[i] === \"<\")\n            if (e[i + 1] === \"!\") {\n              i++, i = z(e, i);\n              continue;\n            } else if (e[i + 1] === \"?\") {\n              if (i = G(e, ++i), i.err)\n                return i;\n            } else\n              break;\n          else if (e[i] === \"&\") {\n            const f = Ve(e, i);\n            if (f == -1)\n              return p(\"InvalidChar\", \"char '&' is not expected.\", w(e, i));\n            i = f;\n          } else if (n === !0 && !U(e[i]))\n            return p(\"InvalidXml\", \"Extra text at the end\", w(e, i));\n        e[i] === \"<\" && i--;\n      }\n    } else {\n      if (U(e[i]))\n        continue;\n      return p(\"InvalidChar\", \"char '\" + e[i] + \"' is not expected.\", w(e, i));\n    }\n  if (s) {\n    if (r.length == 1)\n      return p(\"InvalidTag\", \"Unclosed tag '\" + r[0].tagName + \"'.\", w(e, r[0].tagStartPos));\n    if (r.length > 0)\n      return p(\"InvalidXml\", \"Invalid '\" + JSON.stringify(r.map((i) => i.tagName), null, 4).replace(/\\r?\\n/g, \"\") + \"' found.\", { line: 1, col: 1 });\n  } else\n    return p(\"InvalidXml\", \"Start tag expected.\", 1);\n  return !0;\n};\nfunction U(e) {\n  return e === \" \" || e === \"\t\" || e === `\n` || e === \"\\r\";\n}\nfunction G(e, t) {\n  const r = t;\n  for (; t < e.length; t++)\n    if (e[t] == \"?\" || e[t] == \" \") {\n      const s = e.substr(r, t - r);\n      if (t > 5 && s === \"xml\")\n        return p(\"InvalidXml\", \"XML declaration allowed only at the start of the document.\", w(e, t));\n      if (e[t] == \"?\" && e[t + 1] == \">\") {\n        t++;\n        break;\n      } else\n        continue;\n    }\n  return t;\n}\nfunction z(e, t) {\n  if (e.length > t + 5 && e[t + 1] === \"-\" && e[t + 2] === \"-\") {\n    for (t += 3; t < e.length; t++)\n      if (e[t] === \"-\" && e[t + 1] === \"-\" && e[t + 2] === \">\") {\n        t += 2;\n        break;\n      }\n  } else if (e.length > t + 8 && e[t + 1] === \"D\" && e[t + 2] === \"O\" && e[t + 3] === \"C\" && e[t + 4] === \"T\" && e[t + 5] === \"Y\" && e[t + 6] === \"P\" && e[t + 7] === \"E\") {\n    let r = 1;\n    for (t += 8; t < e.length; t++)\n      if (e[t] === \"<\")\n        r++;\n      else if (e[t] === \">\" && (r--, r === 0))\n        break;\n  } else if (e.length > t + 9 && e[t + 1] === \"[\" && e[t + 2] === \"C\" && e[t + 3] === \"D\" && e[t + 4] === \"A\" && e[t + 5] === \"T\" && e[t + 6] === \"A\" && e[t + 7] === \"[\") {\n    for (t += 8; t < e.length; t++)\n      if (e[t] === \"]\" && e[t + 1] === \"]\" && e[t + 2] === \">\") {\n        t += 2;\n        break;\n      }\n  }\n  return t;\n}\nconst Ce = '\"', Pe = \"'\";\nfunction xe(e, t) {\n  let r = \"\", s = \"\", n = !1;\n  for (; t < e.length; t++) {\n    if (e[t] === Ce || e[t] === Pe)\n      s === \"\" ? s = e[t] : s !== e[t] || (s = \"\");\n    else if (e[t] === \">\" && s === \"\") {\n      n = !0;\n      break;\n    }\n    r += e[t];\n  }\n  return s !== \"\" ? !1 : {\n    value: r,\n    index: t,\n    tagClosed: n\n  };\n}\nconst $e = new RegExp(`(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*(['\"])(([\\\\s\\\\S])*?)\\\\5)?`, \"g\");\nfunction H(e, t) {\n  const r = M.getAllMatches(e, $e), s = {};\n  for (let n = 0; n < r.length; n++) {\n    if (r[n][1].length === 0)\n      return p(\"InvalidAttr\", \"Attribute '\" + r[n][2] + \"' has no space in starting.\", v(r[n]));\n    if (r[n][3] !== void 0 && r[n][4] === void 0)\n      return p(\"InvalidAttr\", \"Attribute '\" + r[n][2] + \"' is without value.\", v(r[n]));\n    if (r[n][3] === void 0 && !t.allowBooleanAttributes)\n      return p(\"InvalidAttr\", \"boolean attribute '\" + r[n][2] + \"' is not allowed.\", v(r[n]));\n    const i = r[n][2];\n    if (!Le(i))\n      return p(\"InvalidAttr\", \"Attribute '\" + i + \"' is an invalid name.\", v(r[n]));\n    if (!s.hasOwnProperty(i))\n      s[i] = 1;\n    else\n      return p(\"InvalidAttr\", \"Attribute '\" + i + \"' is repeated.\", v(r[n]));\n  }\n  return !0;\n}\nfunction Fe(e, t) {\n  let r = /\\d/;\n  for (e[t] === \"x\" && (t++, r = /[\\da-fA-F]/); t < e.length; t++) {\n    if (e[t] === \";\")\n      return t;\n    if (!e[t].match(r))\n      break;\n  }\n  return -1;\n}\nfunction Ve(e, t) {\n  if (t++, e[t] === \";\")\n    return -1;\n  if (e[t] === \"#\")\n    return t++, Fe(e, t);\n  let r = 0;\n  for (; t < e.length; t++, r++)\n    if (!(e[t].match(/\\w/) && r < 20)) {\n      if (e[t] === \";\")\n        break;\n      return -1;\n    }\n  return t;\n}\nfunction p(e, t, r) {\n  return {\n    err: {\n      code: e,\n      msg: t,\n      line: r.line || r,\n      col: r.col\n    }\n  };\n}\nfunction Le(e) {\n  return M.isName(e);\n}\nfunction Re(e) {\n  return M.isName(e);\n}\nfunction w(e, t) {\n  const r = e.substring(0, t).split(/\\r?\\n/);\n  return {\n    line: r.length,\n    // column number is last line's length + 1, because column numbering starts at 1:\n    col: r[r.length - 1].length + 1\n  };\n}\nfunction v(e) {\n  return e.startIndex + e[1].length;\n}\nvar B = {};\nconst re = {\n  preserveOrder: !1,\n  attributeNamePrefix: \"@_\",\n  attributesGroupName: !1,\n  textNodeName: \"#text\",\n  ignoreAttributes: !0,\n  removeNSPrefix: !1,\n  // remove NS from tag name or attribute name if true\n  allowBooleanAttributes: !1,\n  //a tag can have attributes without any value\n  //ignoreRootElement : false,\n  parseTagValue: !0,\n  parseAttributeValue: !1,\n  trimValues: !0,\n  //Trim string values of tag and attributes\n  cdataPropName: !1,\n  numberParseOptions: {\n    hex: !0,\n    leadingZeros: !0,\n    eNotation: !0\n  },\n  tagValueProcessor: function(e, t) {\n    return t;\n  },\n  attributeValueProcessor: function(e, t) {\n    return t;\n  },\n  stopNodes: [],\n  //nested tags will not be parsed even for errors\n  alwaysCreateTextNode: !1,\n  isArray: () => !1,\n  commentPropName: !1,\n  unpairedTags: [],\n  processEntities: !0,\n  htmlEntities: !1,\n  ignoreDeclaration: !1,\n  ignorePiTags: !1,\n  transformTagName: !1,\n  transformAttributeName: !1,\n  updateTag: function(e, t, r) {\n    return e;\n  }\n  // skipEmptyListItem: false\n}, Se = function(e) {\n  return Object.assign({}, re, e);\n};\nB.buildOptions = Se;\nB.defaultOptions = re;\nclass Me {\n  constructor(t) {\n    this.tagname = t, this.child = [], this[\":@\"] = {};\n  }\n  add(t, r) {\n    t === \"__proto__\" && (t = \"#__proto__\"), this.child.push({ [t]: r });\n  }\n  addChild(t) {\n    t.tagname === \"__proto__\" && (t.tagname = \"#__proto__\"), t[\":@\"] && Object.keys(t[\":@\"]).length > 0 ? this.child.push({ [t.tagname]: t.child, \":@\": t[\":@\"] }) : this.child.push({ [t.tagname]: t.child });\n  }\n}\nvar Be = Me;\nconst ke = O;\nfunction qe(e, t) {\n  const r = {};\n  if (e[t + 3] === \"O\" && e[t + 4] === \"C\" && e[t + 5] === \"T\" && e[t + 6] === \"Y\" && e[t + 7] === \"P\" && e[t + 8] === \"E\") {\n    t = t + 9;\n    let s = 1, n = !1, i = !1, d = \"\";\n    for (; t < e.length; t++)\n      if (e[t] === \"<\" && !i) {\n        if (n && Ge(e, t))\n          t += 7, [entityName, val, t] = Xe(e, t + 1), val.indexOf(\"&\") === -1 && (r[We(entityName)] = {\n            regx: RegExp(`&${entityName};`, \"g\"),\n            val\n          });\n        else if (n && ze(e, t))\n          t += 8;\n        else if (n && He(e, t))\n          t += 8;\n        else if (n && Ke(e, t))\n          t += 9;\n        else if (Ue)\n          i = !0;\n        else\n          throw new Error(\"Invalid DOCTYPE\");\n        s++, d = \"\";\n      } else if (e[t] === \">\") {\n        if (i ? e[t - 1] === \"-\" && e[t - 2] === \"-\" && (i = !1, s--) : s--, s === 0)\n          break;\n      } else\n        e[t] === \"[\" ? n = !0 : d += e[t];\n    if (s !== 0)\n      throw new Error(\"Unclosed DOCTYPE\");\n  } else\n    throw new Error(\"Invalid Tag instead of DOCTYPE\");\n  return { entities: r, i: t };\n}\nfunction Xe(e, t) {\n  let r = \"\";\n  for (; t < e.length && e[t] !== \"'\" && e[t] !== '\"'; t++)\n    r += e[t];\n  if (r = r.trim(), r.indexOf(\" \") !== -1)\n    throw new Error(\"External entites are not supported\");\n  const s = e[t++];\n  let n = \"\";\n  for (; t < e.length && e[t] !== s; t++)\n    n += e[t];\n  return [r, n, t];\n}\nfunction Ue(e, t) {\n  return e[t + 1] === \"!\" && e[t + 2] === \"-\" && e[t + 3] === \"-\";\n}\nfunction Ge(e, t) {\n  return e[t + 1] === \"!\" && e[t + 2] === \"E\" && e[t + 3] === \"N\" && e[t + 4] === \"T\" && e[t + 5] === \"I\" && e[t + 6] === \"T\" && e[t + 7] === \"Y\";\n}\nfunction ze(e, t) {\n  return e[t + 1] === \"!\" && e[t + 2] === \"E\" && e[t + 3] === \"L\" && e[t + 4] === \"E\" && e[t + 5] === \"M\" && e[t + 6] === \"E\" && e[t + 7] === \"N\" && e[t + 8] === \"T\";\n}\nfunction He(e, t) {\n  return e[t + 1] === \"!\" && e[t + 2] === \"A\" && e[t + 3] === \"T\" && e[t + 4] === \"T\" && e[t + 5] === \"L\" && e[t + 6] === \"I\" && e[t + 7] === \"S\" && e[t + 8] === \"T\";\n}\nfunction Ke(e, t) {\n  return e[t + 1] === \"!\" && e[t + 2] === \"N\" && e[t + 3] === \"O\" && e[t + 4] === \"T\" && e[t + 5] === \"A\" && e[t + 6] === \"T\" && e[t + 7] === \"I\" && e[t + 8] === \"O\" && e[t + 9] === \"N\";\n}\nfunction We(e) {\n  if (ke.isName(e))\n    return e;\n  throw new Error(`Invalid entity name ${e}`);\n}\nvar Ze = qe;\nconst je = /^[-+]?0x[a-fA-F0-9]+$/, Ye = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\n!Number.parseInt && window.parseInt && (Number.parseInt = window.parseInt);\n!Number.parseFloat && window.parseFloat && (Number.parseFloat = window.parseFloat);\nconst Je = {\n  hex: !0,\n  leadingZeros: !0,\n  decimalPoint: \".\",\n  eNotation: !0\n  //skipLike: /regex/\n};\nfunction Qe(e, t = {}) {\n  if (t = Object.assign({}, Je, t), !e || typeof e != \"string\")\n    return e;\n  let r = e.trim();\n  if (t.skipLike !== void 0 && t.skipLike.test(r))\n    return e;\n  if (t.hex && je.test(r))\n    return Number.parseInt(r, 16);\n  {\n    const s = Ye.exec(r);\n    if (s) {\n      const n = s[1], i = s[2];\n      let d = De(s[3]);\n      const u = s[4] || s[6];\n      if (!t.leadingZeros && i.length > 0 && n && r[2] !== \".\")\n        return e;\n      if (!t.leadingZeros && i.length > 0 && !n && r[1] !== \".\")\n        return e;\n      {\n        const o = Number(r), a = \"\" + o;\n        return a.search(/[eE]/) !== -1 || u ? t.eNotation ? o : e : r.indexOf(\".\") !== -1 ? a === \"0\" && d === \"\" || a === d || n && a === \"-\" + d ? o : e : i ? d === a || n + d === a ? o : e : r === a || r === n + a ? o : e;\n      }\n    } else\n      return e;\n  }\n}\nfunction De(e) {\n  return e && e.indexOf(\".\") !== -1 && (e = e.replace(/0+$/, \"\"), e === \".\" ? e = \"0\" : e[0] === \".\" ? e = \"0\" + e : e[e.length - 1] === \".\" && (e = e.substr(0, e.length - 1))), e;\n}\nvar et = Qe;\nconst k = O, T = Be, tt = Ze, rt = et;\n\"<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)\".replace(/NAME/g, k.nameRegexp);\nlet nt = class {\n  constructor(t) {\n    this.options = t, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {\n      apos: { regex: /&(apos|#39|#x27);/g, val: \"'\" },\n      gt: { regex: /&(gt|#62|#x3E);/g, val: \">\" },\n      lt: { regex: /&(lt|#60|#x3C);/g, val: \"<\" },\n      quot: { regex: /&(quot|#34|#x22);/g, val: '\"' }\n    }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: \"&\" }, this.htmlEntities = {\n      space: { regex: /&(nbsp|#160);/g, val: \" \" },\n      // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n      // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n      // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n      // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n      // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n      cent: { regex: /&(cent|#162);/g, val: \"¢\" },\n      pound: { regex: /&(pound|#163);/g, val: \"£\" },\n      yen: { regex: /&(yen|#165);/g, val: \"¥\" },\n      euro: { regex: /&(euro|#8364);/g, val: \"€\" },\n      copyright: { regex: /&(copy|#169);/g, val: \"©\" },\n      reg: { regex: /&(reg|#174);/g, val: \"®\" },\n      inr: { regex: /&(inr|#8377);/g, val: \"₹\" }\n    }, this.addExternalEntities = it, this.parseXml = at, this.parseTextData = st, this.resolveNameSpace = ot, this.buildAttributesMap = dt, this.isItStopNode = ht, this.replaceEntitiesValue = ft, this.readStopNodeData = gt, this.saveTextToParentTag = ct, this.addChild = lt;\n  }\n};\nfunction it(e) {\n  const t = Object.keys(e);\n  for (let r = 0; r < t.length; r++) {\n    const s = t[r];\n    this.lastEntities[s] = {\n      regex: new RegExp(\"&\" + s + \";\", \"g\"),\n      val: e[s]\n    };\n  }\n}\nfunction st(e, t, r, s, n, i, d) {\n  if (e !== void 0 && (this.options.trimValues && !s && (e = e.trim()), e.length > 0)) {\n    d || (e = this.replaceEntitiesValue(e));\n    const u = this.options.tagValueProcessor(t, e, r, n, i);\n    return u == null ? e : typeof u != typeof e || u !== e ? u : this.options.trimValues ? $(e, this.options.parseTagValue, this.options.numberParseOptions) : e.trim() === e ? $(e, this.options.parseTagValue, this.options.numberParseOptions) : e;\n  }\n}\nfunction ot(e) {\n  if (this.options.removeNSPrefix) {\n    const t = e.split(\":\"), r = e.charAt(0) === \"/\" ? \"/\" : \"\";\n    if (t[0] === \"xmlns\")\n      return \"\";\n    t.length === 2 && (e = r + t[1]);\n  }\n  return e;\n}\nconst ut = new RegExp(`([^\\\\s=]+)\\\\s*(=\\\\s*(['\"])([\\\\s\\\\S]*?)\\\\3)?`, \"gm\");\nfunction dt(e, t, r) {\n  if (!this.options.ignoreAttributes && typeof e == \"string\") {\n    const s = k.getAllMatches(e, ut), n = s.length, i = {};\n    for (let d = 0; d < n; d++) {\n      const u = this.resolveNameSpace(s[d][1]);\n      let o = s[d][4], a = this.options.attributeNamePrefix + u;\n      if (u.length)\n        if (this.options.transformAttributeName && (a = this.options.transformAttributeName(a)), a === \"__proto__\" && (a = \"#__proto__\"), o !== void 0) {\n          this.options.trimValues && (o = o.trim()), o = this.replaceEntitiesValue(o);\n          const l = this.options.attributeValueProcessor(u, o, t);\n          l == null ? i[a] = o : typeof l != typeof o || l !== o ? i[a] = l : i[a] = $(\n            o,\n            this.options.parseAttributeValue,\n            this.options.numberParseOptions\n          );\n        } else\n          this.options.allowBooleanAttributes && (i[a] = !0);\n    }\n    if (!Object.keys(i).length)\n      return;\n    if (this.options.attributesGroupName) {\n      const d = {};\n      return d[this.options.attributesGroupName] = i, d;\n    }\n    return i;\n  }\n}\nconst at = function(e) {\n  e = e.replace(/\\r\\n?/g, `\n`);\n  const t = new T(\"!xml\");\n  let r = t, s = \"\", n = \"\";\n  for (let i = 0; i < e.length; i++)\n    if (e[i] === \"<\")\n      if (e[i + 1] === \"/\") {\n        const u = y(e, \">\", i, \"Closing Tag is not closed.\");\n        let o = e.substring(i + 2, u).trim();\n        if (this.options.removeNSPrefix) {\n          const f = o.indexOf(\":\");\n          f !== -1 && (o = o.substr(f + 1));\n        }\n        this.options.transformTagName && (o = this.options.transformTagName(o)), r && (s = this.saveTextToParentTag(s, r, n));\n        const a = n.substring(n.lastIndexOf(\".\") + 1);\n        if (o && this.options.unpairedTags.indexOf(o) !== -1)\n          throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);\n        let l = 0;\n        a && this.options.unpairedTags.indexOf(a) !== -1 ? (l = n.lastIndexOf(\".\", n.lastIndexOf(\".\") - 1), this.tagsNodeStack.pop()) : l = n.lastIndexOf(\".\"), n = n.substring(0, l), r = this.tagsNodeStack.pop(), s = \"\", i = u;\n      } else if (e[i + 1] === \"?\") {\n        let u = x(e, i, !1, \"?>\");\n        if (!u)\n          throw new Error(\"Pi Tag is not closed.\");\n        if (s = this.saveTextToParentTag(s, r, n), !(this.options.ignoreDeclaration && u.tagName === \"?xml\" || this.options.ignorePiTags)) {\n          const o = new T(u.tagName);\n          o.add(this.options.textNodeName, \"\"), u.tagName !== u.tagExp && u.attrExpPresent && (o[\":@\"] = this.buildAttributesMap(u.tagExp, n, u.tagName)), this.addChild(r, o, n);\n        }\n        i = u.closeIndex + 1;\n      } else if (e.substr(i + 1, 3) === \"!--\") {\n        const u = y(e, \"-->\", i + 4, \"Comment is not closed.\");\n        if (this.options.commentPropName) {\n          const o = e.substring(i + 4, u - 2);\n          s = this.saveTextToParentTag(s, r, n), r.add(this.options.commentPropName, [{ [this.options.textNodeName]: o }]);\n        }\n        i = u;\n      } else if (e.substr(i + 1, 2) === \"!D\") {\n        const u = tt(e, i);\n        this.docTypeEntities = u.entities, i = u.i;\n      } else if (e.substr(i + 1, 2) === \"![\") {\n        const u = y(e, \"]]>\", i, \"CDATA is not closed.\") - 2, o = e.substring(i + 9, u);\n        if (s = this.saveTextToParentTag(s, r, n), this.options.cdataPropName)\n          r.add(this.options.cdataPropName, [{ [this.options.textNodeName]: o }]);\n        else {\n          let a = this.parseTextData(o, r.tagname, n, !0, !1, !0);\n          a == null && (a = \"\"), r.add(this.options.textNodeName, a);\n        }\n        i = u + 2;\n      } else {\n        let u = x(e, i, this.options.removeNSPrefix), o = u.tagName;\n        const a = u.rawTagName;\n        let l = u.tagExp, f = u.attrExpPresent, c = u.closeIndex;\n        this.options.transformTagName && (o = this.options.transformTagName(o)), r && s && r.tagname !== \"!xml\" && (s = this.saveTextToParentTag(s, r, n, !1));\n        const g = r;\n        if (g && this.options.unpairedTags.indexOf(g.tagname) !== -1 && (r = this.tagsNodeStack.pop(), n = n.substring(0, n.lastIndexOf(\".\"))), o !== t.tagname && (n += n ? \".\" + o : o), this.isItStopNode(this.options.stopNodes, n, o)) {\n          let h = \"\";\n          if (l.length > 0 && l.lastIndexOf(\"/\") === l.length - 1)\n            i = u.closeIndex;\n          else if (this.options.unpairedTags.indexOf(o) !== -1)\n            i = u.closeIndex;\n          else {\n            const E = this.readStopNodeData(e, a, c + 1);\n            if (!E)\n              throw new Error(`Unexpected end of ${a}`);\n            i = E.i, h = E.tagContent;\n          }\n          const _ = new T(o);\n          o !== l && f && (_[\":@\"] = this.buildAttributesMap(l, n, o)), h && (h = this.parseTextData(h, o, n, !0, f, !0, !0)), n = n.substr(0, n.lastIndexOf(\".\")), _.add(this.options.textNodeName, h), this.addChild(r, _, n);\n        } else {\n          if (l.length > 0 && l.lastIndexOf(\"/\") === l.length - 1) {\n            o[o.length - 1] === \"/\" ? (o = o.substr(0, o.length - 1), n = n.substr(0, n.length - 1), l = o) : l = l.substr(0, l.length - 1), this.options.transformTagName && (o = this.options.transformTagName(o));\n            const h = new T(o);\n            o !== l && f && (h[\":@\"] = this.buildAttributesMap(l, n, o)), this.addChild(r, h, n), n = n.substr(0, n.lastIndexOf(\".\"));\n          } else {\n            const h = new T(o);\n            this.tagsNodeStack.push(r), o !== l && f && (h[\":@\"] = this.buildAttributesMap(l, n, o)), this.addChild(r, h, n), r = h;\n          }\n          s = \"\", i = c;\n        }\n      }\n    else\n      s += e[i];\n  return t.child;\n};\nfunction lt(e, t, r) {\n  const s = this.options.updateTag(t.tagname, r, t[\":@\"]);\n  s === !1 || (typeof s == \"string\" && (t.tagname = s), e.addChild(t));\n}\nconst ft = function(e) {\n  if (this.options.processEntities) {\n    for (let t in this.docTypeEntities) {\n      const r = this.docTypeEntities[t];\n      e = e.replace(r.regx, r.val);\n    }\n    for (let t in this.lastEntities) {\n      const r = this.lastEntities[t];\n      e = e.replace(r.regex, r.val);\n    }\n    if (this.options.htmlEntities)\n      for (let t in this.htmlEntities) {\n        const r = this.htmlEntities[t];\n        e = e.replace(r.regex, r.val);\n      }\n    e = e.replace(this.ampEntity.regex, this.ampEntity.val);\n  }\n  return e;\n};\nfunction ct(e, t, r, s) {\n  return e && (s === void 0 && (s = Object.keys(t.child).length === 0), e = this.parseTextData(\n    e,\n    t.tagname,\n    r,\n    !1,\n    t[\":@\"] ? Object.keys(t[\":@\"]).length !== 0 : !1,\n    s\n  ), e !== void 0 && e !== \"\" && t.add(this.options.textNodeName, e), e = \"\"), e;\n}\nfunction ht(e, t, r) {\n  const s = \"*.\" + r;\n  for (const n in e) {\n    const i = e[n];\n    if (s === i || t === i)\n      return !0;\n  }\n  return !1;\n}\nfunction pt(e, t, r = \">\") {\n  let s, n = \"\";\n  for (let i = t; i < e.length; i++) {\n    let d = e[i];\n    if (s)\n      d === s && (s = \"\");\n    else if (d === '\"' || d === \"'\")\n      s = d;\n    else if (d === r[0])\n      if (r[1]) {\n        if (e[i + 1] === r[1])\n          return {\n            data: n,\n            index: i\n          };\n      } else\n        return {\n          data: n,\n          index: i\n        };\n    else\n      d === \"\t\" && (d = \" \");\n    n += d;\n  }\n}\nfunction y(e, t, r, s) {\n  const n = e.indexOf(t, r);\n  if (n === -1)\n    throw new Error(s);\n  return n + t.length - 1;\n}\nfunction x(e, t, r, s = \">\") {\n  const n = pt(e, t + 1, s);\n  if (!n)\n    return;\n  let i = n.data;\n  const d = n.index, u = i.search(/\\s/);\n  let o = i, a = !0;\n  u !== -1 && (o = i.substr(0, u).replace(/\\s\\s*$/, \"\"), i = i.substr(u + 1));\n  const l = o;\n  if (r) {\n    const f = o.indexOf(\":\");\n    f !== -1 && (o = o.substr(f + 1), a = o !== n.data.substr(f + 1));\n  }\n  return {\n    tagName: o,\n    tagExp: i,\n    closeIndex: d,\n    attrExpPresent: a,\n    rawTagName: l\n  };\n}\nfunction gt(e, t, r) {\n  const s = r;\n  let n = 1;\n  for (; r < e.length; r++)\n    if (e[r] === \"<\")\n      if (e[r + 1] === \"/\") {\n        const i = y(e, \">\", r, `${t} is not closed`);\n        if (e.substring(r + 2, i).trim() === t && (n--, n === 0))\n          return {\n            tagContent: e.substring(s, r),\n            i\n          };\n        r = i;\n      } else if (e[r + 1] === \"?\")\n        r = y(e, \"?>\", r + 1, \"StopNode is not closed.\");\n      else if (e.substr(r + 1, 3) === \"!--\")\n        r = y(e, \"-->\", r + 3, \"StopNode is not closed.\");\n      else if (e.substr(r + 1, 2) === \"![\")\n        r = y(e, \"]]>\", r, \"StopNode is not closed.\") - 2;\n      else {\n        const i = x(e, r, \">\");\n        i && ((i && i.tagName) === t && i.tagExp[i.tagExp.length - 1] !== \"/\" && n++, r = i.closeIndex);\n      }\n}\nfunction $(e, t, r) {\n  if (t && typeof e == \"string\") {\n    const s = e.trim();\n    return s === \"true\" ? !0 : s === \"false\" ? !1 : rt(e, r);\n  } else\n    return k.isExist(e) ? e : \"\";\n}\nvar wt = nt, ne = {};\nfunction mt(e, t) {\n  return ie(e, t);\n}\nfunction ie(e, t, r) {\n  let s;\n  const n = {};\n  for (let i = 0; i < e.length; i++) {\n    const d = e[i], u = Nt(d);\n    let o = \"\";\n    if (r === void 0 ? o = u : o = r + \".\" + u, u === t.textNodeName)\n      s === void 0 ? s = d[u] : s += \"\" + d[u];\n    else {\n      if (u === void 0)\n        continue;\n      if (d[u]) {\n        let a = ie(d[u], t, o);\n        const l = bt(a, t);\n        d[\":@\"] ? Et(a, d[\":@\"], o, t) : Object.keys(a).length === 1 && a[t.textNodeName] !== void 0 && !t.alwaysCreateTextNode ? a = a[t.textNodeName] : Object.keys(a).length === 0 && (t.alwaysCreateTextNode ? a[t.textNodeName] = \"\" : a = \"\"), n[u] !== void 0 && n.hasOwnProperty(u) ? (Array.isArray(n[u]) || (n[u] = [n[u]]), n[u].push(a)) : t.isArray(u, o, l) ? n[u] = [a] : n[u] = a;\n      }\n    }\n  }\n  return typeof s == \"string\" ? s.length > 0 && (n[t.textNodeName] = s) : s !== void 0 && (n[t.textNodeName] = s), n;\n}\nfunction Nt(e) {\n  const t = Object.keys(e);\n  for (let r = 0; r < t.length; r++) {\n    const s = t[r];\n    if (s !== \":@\")\n      return s;\n  }\n}\nfunction Et(e, t, r, s) {\n  if (t) {\n    const n = Object.keys(t), i = n.length;\n    for (let d = 0; d < i; d++) {\n      const u = n[d];\n      s.isArray(u, r + \".\" + u, !0, !0) ? e[u] = [t[u]] : e[u] = t[u];\n    }\n  }\n}\nfunction bt(e, t) {\n  const { textNodeName: r } = t, s = Object.keys(e).length;\n  return !!(s === 0 || s === 1 && (e[r] || typeof e[r] == \"boolean\" || e[r] === 0));\n}\nne.prettify = mt;\nconst { buildOptions: yt } = B, _t = wt, { prettify: vt } = ne, Tt = S;\nlet It = class {\n  constructor(t) {\n    this.externalEntities = {}, this.options = yt(t);\n  }\n  /**\n   * Parse XML dats to JS object \n   * @param {string|Buffer} xmlData \n   * @param {boolean|Object} validationOption \n   */\n  parse(t, r) {\n    if (typeof t != \"string\")\n      if (t.toString)\n        t = t.toString();\n      else\n        throw new Error(\"XML data is accepted in String or Bytes[] form.\");\n    if (r) {\n      r === !0 && (r = {});\n      const i = Tt.validate(t, r);\n      if (i !== !0)\n        throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`);\n    }\n    const s = new _t(this.options);\n    s.addExternalEntities(this.externalEntities);\n    const n = s.parseXml(t);\n    return this.options.preserveOrder || n === void 0 ? n : vt(n, this.options);\n  }\n  /**\n   * Add Entity which is not by default supported by this library\n   * @param {string} key \n   * @param {string} value \n   */\n  addEntity(t, r) {\n    if (r.indexOf(\"&\") !== -1)\n      throw new Error(\"Entity value can't have '&'\");\n    if (t.indexOf(\"&\") !== -1 || t.indexOf(\";\") !== -1)\n      throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'\");\n    if (r === \"&\")\n      throw new Error(\"An entity with value '&' is not permitted\");\n    this.externalEntities[t] = r;\n  }\n};\nvar At = It;\nconst Ot = `\n`;\nfunction Ct(e, t) {\n  let r = \"\";\n  return t.format && t.indentBy.length > 0 && (r = Ot), se(e, t, \"\", r);\n}\nfunction se(e, t, r, s) {\n  let n = \"\", i = !1;\n  for (let d = 0; d < e.length; d++) {\n    const u = e[d], o = Pt(u);\n    if (o === void 0)\n      continue;\n    let a = \"\";\n    if (r.length === 0 ? a = o : a = `${r}.${o}`, o === t.textNodeName) {\n      let h = u[o];\n      xt(a, t) || (h = t.tagValueProcessor(o, h), h = oe(h, t)), i && (n += s), n += h, i = !1;\n      continue;\n    } else if (o === t.cdataPropName) {\n      i && (n += s), n += `<![CDATA[${u[o][0][t.textNodeName]}]]>`, i = !1;\n      continue;\n    } else if (o === t.commentPropName) {\n      n += s + `<!--${u[o][0][t.textNodeName]}-->`, i = !0;\n      continue;\n    } else if (o[0] === \"?\") {\n      const h = K(u[\":@\"], t), _ = o === \"?xml\" ? \"\" : s;\n      let E = u[o][0][t.textNodeName];\n      E = E.length !== 0 ? \" \" + E : \"\", n += _ + `<${o}${E}${h}?>`, i = !0;\n      continue;\n    }\n    let l = s;\n    l !== \"\" && (l += t.indentBy);\n    const f = K(u[\":@\"], t), c = s + `<${o}${f}`, g = se(u[o], t, a, l);\n    t.unpairedTags.indexOf(o) !== -1 ? t.suppressUnpairedNode ? n += c + \">\" : n += c + \"/>\" : (!g || g.length === 0) && t.suppressEmptyNode ? n += c + \"/>\" : g && g.endsWith(\">\") ? n += c + `>${g}${s}</${o}>` : (n += c + \">\", g && s !== \"\" && (g.includes(\"/>\") || g.includes(\"</\")) ? n += s + t.indentBy + g + s : n += g, n += `</${o}>`), i = !0;\n  }\n  return n;\n}\nfunction Pt(e) {\n  const t = Object.keys(e);\n  for (let r = 0; r < t.length; r++) {\n    const s = t[r];\n    if (e.hasOwnProperty(s) && s !== \":@\")\n      return s;\n  }\n}\nfunction K(e, t) {\n  let r = \"\";\n  if (e && !t.ignoreAttributes)\n    for (let s in e) {\n      if (!e.hasOwnProperty(s))\n        continue;\n      let n = t.attributeValueProcessor(s, e[s]);\n      n = oe(n, t), n === !0 && t.suppressBooleanAttributes ? r += ` ${s.substr(t.attributeNamePrefix.length)}` : r += ` ${s.substr(t.attributeNamePrefix.length)}=\"${n}\"`;\n    }\n  return r;\n}\nfunction xt(e, t) {\n  e = e.substr(0, e.length - t.textNodeName.length - 1);\n  let r = e.substr(e.lastIndexOf(\".\") + 1);\n  for (let s in t.stopNodes)\n    if (t.stopNodes[s] === e || t.stopNodes[s] === \"*.\" + r)\n      return !0;\n  return !1;\n}\nfunction oe(e, t) {\n  if (e && e.length > 0 && t.processEntities)\n    for (let r = 0; r < t.entities.length; r++) {\n      const s = t.entities[r];\n      e = e.replace(s.regex, s.val);\n    }\n  return e;\n}\nvar $t = Ct;\nconst Ft = $t, Vt = {\n  attributeNamePrefix: \"@_\",\n  attributesGroupName: !1,\n  textNodeName: \"#text\",\n  ignoreAttributes: !0,\n  cdataPropName: !1,\n  format: !1,\n  indentBy: \"  \",\n  suppressEmptyNode: !1,\n  suppressUnpairedNode: !0,\n  suppressBooleanAttributes: !0,\n  tagValueProcessor: function(e, t) {\n    return t;\n  },\n  attributeValueProcessor: function(e, t) {\n    return t;\n  },\n  preserveOrder: !1,\n  commentPropName: !1,\n  unpairedTags: [],\n  entities: [\n    { regex: new RegExp(\"&\", \"g\"), val: \"&amp;\" },\n    //it must be on top\n    { regex: new RegExp(\">\", \"g\"), val: \"&gt;\" },\n    { regex: new RegExp(\"<\", \"g\"), val: \"&lt;\" },\n    { regex: new RegExp(\"'\", \"g\"), val: \"&apos;\" },\n    { regex: new RegExp('\"', \"g\"), val: \"&quot;\" }\n  ],\n  processEntities: !0,\n  stopNodes: [],\n  // transformTagName: false,\n  // transformAttributeName: false,\n  oneListGroup: !1\n};\nfunction b(e) {\n  this.options = Object.assign({}, Vt, e), this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {\n    return !1;\n  } : (this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = St), this.processTextOrObjNode = Lt, this.options.format ? (this.indentate = Rt, this.tagEndChar = `>\n`, this.newLine = `\n`) : (this.indentate = function() {\n    return \"\";\n  }, this.tagEndChar = \">\", this.newLine = \"\");\n}\nb.prototype.build = function(e) {\n  return this.options.preserveOrder ? Ft(e, this.options) : (Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = {\n    [this.options.arrayNodeName]: e\n  }), this.j2x(e, 0).val);\n};\nb.prototype.j2x = function(e, t) {\n  let r = \"\", s = \"\";\n  for (let n in e)\n    if (Object.prototype.hasOwnProperty.call(e, n))\n      if (typeof e[n] > \"u\")\n        this.isAttribute(n) && (s += \"\");\n      else if (e[n] === null)\n        this.isAttribute(n) ? s += \"\" : n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar;\n      else if (e[n] instanceof Date)\n        s += this.buildTextValNode(e[n], n, \"\", t);\n      else if (typeof e[n] != \"object\") {\n        const i = this.isAttribute(n);\n        if (i)\n          r += this.buildAttrPairStr(i, \"\" + e[n]);\n        else if (n === this.options.textNodeName) {\n          let d = this.options.tagValueProcessor(n, \"\" + e[n]);\n          s += this.replaceEntitiesValue(d);\n        } else\n          s += this.buildTextValNode(e[n], n, \"\", t);\n      } else if (Array.isArray(e[n])) {\n        const i = e[n].length;\n        let d = \"\";\n        for (let u = 0; u < i; u++) {\n          const o = e[n][u];\n          typeof o > \"u\" || (o === null ? n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar : typeof o == \"object\" ? this.options.oneListGroup ? d += this.j2x(o, t + 1).val : d += this.processTextOrObjNode(o, n, t) : d += this.buildTextValNode(o, n, \"\", t));\n        }\n        this.options.oneListGroup && (d = this.buildObjectNode(d, n, \"\", t)), s += d;\n      } else if (this.options.attributesGroupName && n === this.options.attributesGroupName) {\n        const i = Object.keys(e[n]), d = i.length;\n        for (let u = 0; u < d; u++)\n          r += this.buildAttrPairStr(i[u], \"\" + e[n][i[u]]);\n      } else\n        s += this.processTextOrObjNode(e[n], n, t);\n  return { attrStr: r, val: s };\n};\nb.prototype.buildAttrPairStr = function(e, t) {\n  return t = this.options.attributeValueProcessor(e, \"\" + t), t = this.replaceEntitiesValue(t), this.options.suppressBooleanAttributes && t === \"true\" ? \" \" + e : \" \" + e + '=\"' + t + '\"';\n};\nfunction Lt(e, t, r) {\n  const s = this.j2x(e, r + 1);\n  return e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, s.attrStr, r) : this.buildObjectNode(s.val, t, s.attrStr, r);\n}\nb.prototype.buildObjectNode = function(e, t, r, s) {\n  if (e === \"\")\n    return t[0] === \"?\" ? this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar : this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar;\n  {\n    let n = \"</\" + t + this.tagEndChar, i = \"\";\n    return t[0] === \"?\" && (i = \"?\", n = \"\"), (r || r === \"\") && e.indexOf(\"<\") === -1 ? this.indentate(s) + \"<\" + t + r + i + \">\" + e + n : this.options.commentPropName !== !1 && t === this.options.commentPropName && i.length === 0 ? this.indentate(s) + `<!--${e}-->` + this.newLine : this.indentate(s) + \"<\" + t + r + i + this.tagEndChar + e + this.indentate(s) + n;\n  }\n};\nb.prototype.closeTag = function(e) {\n  let t = \"\";\n  return this.options.unpairedTags.indexOf(e) !== -1 ? this.options.suppressUnpairedNode || (t = \"/\") : this.options.suppressEmptyNode ? t = \"/\" : t = `></${e}`, t;\n};\nb.prototype.buildTextValNode = function(e, t, r, s) {\n  if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName)\n    return this.indentate(s) + `<![CDATA[${e}]]>` + this.newLine;\n  if (this.options.commentPropName !== !1 && t === this.options.commentPropName)\n    return this.indentate(s) + `<!--${e}-->` + this.newLine;\n  if (t[0] === \"?\")\n    return this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar;\n  {\n    let n = this.options.tagValueProcessor(t, e);\n    return n = this.replaceEntitiesValue(n), n === \"\" ? this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar : this.indentate(s) + \"<\" + t + r + \">\" + n + \"</\" + t + this.tagEndChar;\n  }\n};\nb.prototype.replaceEntitiesValue = function(e) {\n  if (e && e.length > 0 && this.options.processEntities)\n    for (let t = 0; t < this.options.entities.length; t++) {\n      const r = this.options.entities[t];\n      e = e.replace(r.regex, r.val);\n    }\n  return e;\n};\nfunction Rt(e) {\n  return this.options.indentBy.repeat(e);\n}\nfunction St(e) {\n  return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;\n}\nvar Mt = b;\nconst Bt = S, kt = At, qt = Mt;\nvar W = {\n  XMLParser: kt,\n  XMLValidator: Bt,\n  XMLBuilder: qt\n};\nfunction Xt(e) {\n  if (typeof e != \"string\")\n    throw new TypeError(`Expected a \\`string\\`, got \\`${typeof e}\\``);\n  if (e = e.trim(), e.length === 0 || W.XMLValidator.validate(e) !== !0)\n    return !1;\n  let t;\n  const r = new W.XMLParser();\n  try {\n    t = r.parse(e);\n  } catch {\n    return !1;\n  }\n  return !(!t || !(\"svg\" in t));\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass cr {\n  _view;\n  constructor(t) {\n    Ut(t), this._view = t;\n  }\n  get id() {\n    return this._view.id;\n  }\n  get name() {\n    return this._view.name;\n  }\n  get caption() {\n    return this._view.caption;\n  }\n  get emptyTitle() {\n    return this._view.emptyTitle;\n  }\n  get emptyCaption() {\n    return this._view.emptyCaption;\n  }\n  get getContents() {\n    return this._view.getContents;\n  }\n  get icon() {\n    return this._view.icon;\n  }\n  set icon(t) {\n    this._view.icon = t;\n  }\n  get order() {\n    return this._view.order;\n  }\n  set order(t) {\n    this._view.order = t;\n  }\n  get params() {\n    return this._view.params;\n  }\n  set params(t) {\n    this._view.params = t;\n  }\n  get columns() {\n    return this._view.columns;\n  }\n  get emptyView() {\n    return this._view.emptyView;\n  }\n  get parent() {\n    return this._view.parent;\n  }\n  get sticky() {\n    return this._view.sticky;\n  }\n  get expanded() {\n    return this._view.expanded;\n  }\n  set expanded(t) {\n    this._view.expanded = t;\n  }\n  get defaultSortKey() {\n    return this._view.defaultSortKey;\n  }\n}\nconst Ut = function(e) {\n  if (!e.id || typeof e.id != \"string\")\n    throw new Error(\"View id is required and must be a string\");\n  if (!e.name || typeof e.name != \"string\")\n    throw new Error(\"View name is required and must be a string\");\n  if (e.columns && e.columns.length > 0 && (!e.caption || typeof e.caption != \"string\"))\n    throw new Error(\"View caption is required for top-level views and must be a string\");\n  if (!e.getContents || typeof e.getContents != \"function\")\n    throw new Error(\"View getContents is required and must be a function\");\n  if (!e.icon || typeof e.icon != \"string\" || !Xt(e.icon))\n    throw new Error(\"View icon is required and must be a valid svg string\");\n  if (!(\"order\" in e) || typeof e.order != \"number\")\n    throw new Error(\"View order is required and must be a number\");\n  if (e.columns && e.columns.forEach((t) => {\n    if (!(t instanceof Ie))\n      throw new Error(\"View columns must be an array of Column. Invalid column found\");\n  }), e.emptyView && typeof e.emptyView != \"function\")\n    throw new Error(\"View emptyView must be a function\");\n  if (e.parent && typeof e.parent != \"string\")\n    throw new Error(\"View parent must be a string\");\n  if (\"sticky\" in e && typeof e.sticky != \"boolean\")\n    throw new Error(\"View sticky must be a boolean\");\n  if (\"expanded\" in e && typeof e.expanded != \"boolean\")\n    throw new Error(\"View expanded must be a boolean\");\n  if (e.defaultSortKey && typeof e.defaultSortKey != \"string\")\n    throw new Error(\"View defaultSortKey must be a string\");\n  return !0;\n};\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst hr = function(e) {\n  return F().registerEntry(e);\n}, pr = function(e) {\n  return F().unregisterEntry(e);\n}, gr = function(e) {\n  return F().getEntries(e).sort((r, s) => r.order !== void 0 && s.order !== void 0 && r.order !== s.order ? r.order - s.order : r.displayName.localeCompare(s.displayName, void 0, { numeric: !0, sensitivity: \"base\" }));\n};\nexport {\n  Ie as Column,\n  Z as DefaultType,\n  ye as File,\n  Qt as FileAction,\n  R as FileType,\n  _e as Folder,\n  tr as Header,\n  Te as Navigation,\n  D as Node,\n  Q as NodeStatus,\n  N as Permission,\n  cr as View,\n  hr as addNewFileMenuEntry,\n  ur as davGetClient,\n  sr as davGetDefaultPropfind,\n  Ee as davGetFavoritesReport,\n  or as davGetRecentSearch,\n  be as davParsePermissions,\n  te as davRemoteURL,\n  ve as davResultToNode,\n  ee as davRootPath,\n  Y as defaultDavNamespaces,\n  j as defaultDavProperties,\n  Yt as formatFileSize,\n  L as getDavNameSpaces,\n  V as getDavProperties,\n  dr as getFavoriteNodes,\n  er as getFileActions,\n  nr as getFileListHeaders,\n  ar as getNavigation,\n  gr as getNewFileMenuEntries,\n  Jt as parseFileSize,\n  ir as registerDavProperty,\n  Dt as registerFileAction,\n  rr as registerFileListHeaders,\n  pr as removeNewFileMenuEntry\n};\n","/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger';\nexport default getLoggerBuilder()\n    .setApp('files_sharing')\n    .detectUser()\n    .build();\n","import { Folder, File } from '@nextcloud/files';\nimport { generateOcsUrl, generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport axios from '@nextcloud/axios';\nimport logger from './logger';\nexport const rootPath = `/files/${getCurrentUser()?.uid}`;\nconst headers = {\n    'Content-Type': 'application/json',\n};\nconst ocsEntryToNode = function (ocsEntry) {\n    try {\n        const isFolder = ocsEntry?.item_type === 'folder';\n        const hasPreview = ocsEntry?.has_preview === true;\n        const Node = isFolder ? Folder : File;\n        const fileid = ocsEntry.file_source;\n        // Generate path and strip double slashes\n        const path = ocsEntry?.path || ocsEntry.file_target;\n        const source = generateRemoteUrl(`dav/${rootPath}/${path}`.replaceAll(/\\/\\//gm, '/'));\n        // Prefer share time if more recent than item mtime\n        let mtime = ocsEntry?.item_mtime ? new Date((ocsEntry.item_mtime) * 1000) : undefined;\n        if (ocsEntry?.stime > (ocsEntry?.item_mtime || 0)) {\n            mtime = new Date((ocsEntry.stime) * 1000);\n        }\n        return new Node({\n            id: fileid,\n            source,\n            owner: ocsEntry?.uid_owner,\n            mime: ocsEntry?.mimetype,\n            mtime,\n            size: ocsEntry?.item_size,\n            permissions: ocsEntry?.item_permissions || ocsEntry?.permissions,\n            root: rootPath,\n            attributes: {\n                ...ocsEntry,\n                'has-preview': hasPreview,\n                favorite: ocsEntry?.tags?.includes(window.OC.TAG_FAVORITE) ? 1 : 0,\n            },\n        });\n    }\n    catch (error) {\n        logger.error('Error while parsing OCS entry', { error });\n        return null;\n    }\n};\nconst getShares = function (shared_with_me = false) {\n    const url = generateOcsUrl('apps/files_sharing/api/v1/shares');\n    return axios.get(url, {\n        headers,\n        params: {\n            shared_with_me,\n            include_tags: true,\n        },\n    });\n};\nconst getSharedWithYou = function () {\n    return getShares(true);\n};\nconst getSharedWithOthers = function () {\n    return getShares();\n};\nconst getRemoteShares = function () {\n    const url = generateOcsUrl('apps/files_sharing/api/v1/remote_shares');\n    return axios.get(url, {\n        headers,\n        params: {\n            include_tags: true,\n        },\n    });\n};\nconst getPendingShares = function () {\n    const url = generateOcsUrl('apps/files_sharing/api/v1/shares/pending');\n    return axios.get(url, {\n        headers,\n        params: {\n            include_tags: true,\n        },\n    });\n};\nconst getRemotePendingShares = function () {\n    const url = generateOcsUrl('apps/files_sharing/api/v1/remote_shares/pending');\n    return axios.get(url, {\n        headers,\n        params: {\n            include_tags: true,\n        },\n    });\n};\nconst getDeletedShares = function () {\n    const url = generateOcsUrl('apps/files_sharing/api/v1/deletedshares');\n    return axios.get(url, {\n        headers,\n        params: {\n            include_tags: true,\n        },\n    });\n};\nexport const getContents = async (sharedWithYou = true, sharedWithOthers = true, pendingShares = false, deletedshares = false, filterTypes = []) => {\n    const promises = [];\n    if (sharedWithYou) {\n        promises.push(getSharedWithYou(), getRemoteShares());\n    }\n    if (sharedWithOthers) {\n        promises.push(getSharedWithOthers());\n    }\n    if (pendingShares) {\n        promises.push(getPendingShares(), getRemotePendingShares());\n    }\n    if (deletedshares) {\n        promises.push(getDeletedShares());\n    }\n    const responses = await Promise.all(promises);\n    const data = responses.map((response) => response.data.ocs.data).flat();\n    let contents = data.map(ocsEntryToNode).filter((node) => node !== null);\n    if (filterTypes.length > 0) {\n        contents = contents.filter((node) => filterTypes.includes(node.attributes?.share_type));\n    }\n    return {\n        folder: new Folder({\n            id: 0,\n            source: generateRemoteUrl('dav' + rootPath),\n            owner: getCurrentUser()?.uid || null,\n        }),\n        contents,\n    };\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport { View, getNavigation } from '@nextcloud/files';\nimport AccountClockSvg from '@mdi/svg/svg/account-clock.svg?raw';\nimport AccountGroupSvg from '@mdi/svg/svg/account-group.svg?raw';\nimport AccountPlusSvg from '@mdi/svg/svg/account-plus.svg?raw';\nimport AccountSvg from '@mdi/svg/svg/account.svg?raw';\nimport DeleteSvg from '@mdi/svg/svg/delete.svg?raw';\nimport LinkSvg from '@mdi/svg/svg/link.svg?raw';\nimport { getContents } from '../services/SharingService';\nexport const sharesViewId = 'shareoverview';\nexport const sharedWithYouViewId = 'sharingin';\nexport const sharedWithOthersViewId = 'sharingout';\nexport const sharingByLinksViewId = 'sharinglinks';\nexport const deletedSharesViewId = 'deletedshares';\nexport const pendingSharesViewId = 'pendingshares';\nexport default () => {\n    const Navigation = getNavigation();\n    Navigation.register(new View({\n        id: sharesViewId,\n        name: t('files_sharing', 'Shares'),\n        caption: t('files_sharing', 'Overview of shared files.'),\n        emptyTitle: t('files_sharing', 'No shares'),\n        emptyCaption: t('files_sharing', 'Files and folders you shared or have been shared with you will show up here'),\n        icon: AccountPlusSvg,\n        order: 20,\n        columns: [],\n        getContents: () => getContents(),\n    }));\n    Navigation.register(new View({\n        id: sharedWithYouViewId,\n        name: t('files_sharing', 'Shared with you'),\n        caption: t('files_sharing', 'List of files that are shared with you.'),\n        emptyTitle: t('files_sharing', 'Nothing shared with you yet'),\n        emptyCaption: t('files_sharing', 'Files and folders others shared with you will show up here'),\n        icon: AccountSvg,\n        order: 1,\n        parent: sharesViewId,\n        columns: [],\n        getContents: () => getContents(true, false, false, false),\n    }));\n    Navigation.register(new View({\n        id: sharedWithOthersViewId,\n        name: t('files_sharing', 'Shared with others'),\n        caption: t('files_sharing', 'List of files that you shared with others.'),\n        emptyTitle: t('files_sharing', 'Nothing shared yet'),\n        emptyCaption: t('files_sharing', 'Files and folders you shared will show up here'),\n        icon: AccountGroupSvg,\n        order: 2,\n        parent: sharesViewId,\n        columns: [],\n        getContents: () => getContents(false, true, false, false),\n    }));\n    Navigation.register(new View({\n        id: sharingByLinksViewId,\n        name: t('files_sharing', 'Shared by link'),\n        caption: t('files_sharing', 'List of files that are shared by link.'),\n        emptyTitle: t('files_sharing', 'No shared links'),\n        emptyCaption: t('files_sharing', 'Files and folders you shared by link will show up here'),\n        icon: LinkSvg,\n        order: 3,\n        parent: sharesViewId,\n        columns: [],\n        getContents: () => getContents(false, true, false, false, [window.OC.Share.SHARE_TYPE_LINK]),\n    }));\n    Navigation.register(new View({\n        id: deletedSharesViewId,\n        name: t('files_sharing', 'Deleted shares'),\n        caption: t('files_sharing', 'List of shares you left.'),\n        emptyTitle: t('files_sharing', 'No deleted shares'),\n        emptyCaption: t('files_sharing', 'Shares you have left will show up here'),\n        icon: DeleteSvg,\n        order: 4,\n        parent: sharesViewId,\n        columns: [],\n        getContents: () => getContents(false, false, false, true),\n    }));\n    Navigation.register(new View({\n        id: pendingSharesViewId,\n        name: t('files_sharing', 'Pending shares'),\n        caption: t('files_sharing', 'List of unapproved shares.'),\n        emptyTitle: t('files_sharing', 'No pending shares'),\n        emptyCaption: t('files_sharing', 'Shares you have received but not approved will show up here'),\n        icon: AccountClockSvg,\n        order: 5,\n        parent: sharesViewId,\n        columns: [],\n        getContents: () => getContents(false, false, true, false),\n    }));\n};\n","import { emit } from '@nextcloud/event-bus';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { registerFileAction, FileAction } from '@nextcloud/files';\nimport { translatePlural as n } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport CheckSvg from '@mdi/svg/svg/check.svg?raw';\nimport { pendingSharesViewId } from '../views/shares';\nexport const action = new FileAction({\n    id: 'accept-share',\n    displayName: (nodes) => n('files_sharing', 'Accept share', 'Accept shares', nodes.length),\n    iconSvgInline: () => CheckSvg,\n    enabled: (nodes, view) => nodes.length > 0 && view.id === pendingSharesViewId,\n    async exec(node) {\n        try {\n            const isRemote = !!node.attributes.remote;\n            const url = generateOcsUrl('apps/files_sharing/api/v1/{shareBase}/pending/{id}', {\n                shareBase: isRemote ? 'remote_shares' : 'shares',\n                id: node.attributes.id,\n            });\n            await axios.post(url);\n            // Remove from current view\n            emit('files:node:deleted', node);\n            return true;\n        }\n        catch (error) {\n            return false;\n        }\n    },\n    async execBatch(nodes, view, dir) {\n        return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n    },\n    order: 1,\n    inline: () => true,\n});\nregisterFileAction(action);\n","import { registerFileAction, FileAction, DefaultType } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport { sharesViewId, sharedWithYouViewId, sharedWithOthersViewId, sharingByLinksViewId } from '../views/shares';\nexport const action = new FileAction({\n    id: 'open-in-files',\n    displayName: () => t('files', 'Open in Files'),\n    iconSvgInline: () => '',\n    enabled: (nodes, view) => [\n        sharesViewId,\n        sharedWithYouViewId,\n        sharedWithOthersViewId,\n        sharingByLinksViewId,\n        // Deleted and pending shares are not\n        // accessible in the files app.\n    ].includes(view.id),\n    async exec(node) {\n        window.OCP.Files.Router.goToRoute(null, // use default route\n        { view: 'files', fileid: node.fileid }, { dir: node.dirname });\n        return null;\n    },\n    // Before openFolderAction\n    order: -1000,\n    default: DefaultType.HIDDEN,\n});\nregisterFileAction(action);\n","import { emit } from '@nextcloud/event-bus';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { registerFileAction, FileAction } from '@nextcloud/files';\nimport { translatePlural as n } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport CloseSvg from '@mdi/svg/svg/close.svg?raw';\nimport { pendingSharesViewId } from '../views/shares';\nexport const action = new FileAction({\n    id: 'reject-share',\n    displayName: (nodes) => n('files_sharing', 'Reject share', 'Reject shares', nodes.length),\n    iconSvgInline: () => CloseSvg,\n    enabled: (nodes, view) => {\n        if (view.id !== pendingSharesViewId) {\n            return false;\n        }\n        if (nodes.length === 0) {\n            return false;\n        }\n        // disable rejecting group shares from the pending list because they anyway\n        // land back into that same list after rejecting them\n        if (nodes.some(node => node.attributes.remote_id\n            && node.attributes.share_type === window.OC.Share.SHARE_TYPE_REMOTE_GROUP)) {\n            return false;\n        }\n        return true;\n    },\n    async exec(node) {\n        try {\n            const isRemote = !!node.attributes.remote;\n            const url = generateOcsUrl('apps/files_sharing/api/v1/{shareBase}/{id}', {\n                shareBase: isRemote ? 'remote_shares' : 'shares',\n                id: node.attributes.id,\n            });\n            await axios.delete(url);\n            // Remove from current view\n            emit('files:node:deleted', node);\n            return true;\n        }\n        catch (error) {\n            return false;\n        }\n    },\n    async execBatch(nodes, view, dir) {\n        return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n    },\n    order: 2,\n    inline: () => true,\n});\nregisterFileAction(action);\n","import { emit } from '@nextcloud/event-bus';\nimport { FileAction, registerFileAction } from '@nextcloud/files';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { translatePlural as n } from '@nextcloud/l10n';\nimport ArrowULeftTopSvg from '@mdi/svg/svg/arrow-u-left-top.svg?raw';\nimport axios from '@nextcloud/axios';\nimport { deletedSharesViewId } from '../views/shares';\nexport const action = new FileAction({\n    id: 'restore-share',\n    displayName: (nodes) => n('files_sharing', 'Restore share', 'Restore shares', nodes.length),\n    iconSvgInline: () => ArrowULeftTopSvg,\n    enabled: (nodes, view) => nodes.length > 0 && view.id === deletedSharesViewId,\n    async exec(node) {\n        try {\n            const url = generateOcsUrl('apps/files_sharing/api/v1/deletedshares/{id}', {\n                id: node.attributes.id,\n            });\n            await axios.post(url);\n            // Remove from current view\n            emit('files:node:deleted', node);\n            return true;\n        }\n        catch (error) {\n            return false;\n        }\n    },\n    async execBatch(nodes, view, dir) {\n        return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n    },\n    order: 1,\n    inline: () => true,\n});\nregisterFileAction(action);\n","/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { Permission, View, FileAction, FileType } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport InformationSvg from '@mdi/svg/svg/information-variant.svg?raw';\nimport logger from '../logger.js';\nexport const ACTION_DETAILS = 'details';\nexport const action = new FileAction({\n    id: ACTION_DETAILS,\n    displayName: () => t('files', 'Open details'),\n    iconSvgInline: () => InformationSvg,\n    // Sidebar currently supports user folder only, /files/USER\n    enabled: (nodes) => {\n        // Only works on single node\n        if (nodes.length !== 1) {\n            return false;\n        }\n        if (!nodes[0]) {\n            return false;\n        }\n        // Only work if the sidebar is available\n        if (!window?.OCA?.Files?.Sidebar) {\n            return false;\n        }\n        return (nodes[0].root?.startsWith('/files/') && nodes[0].permissions !== Permission.NONE) ?? false;\n    },\n    async exec(node, view, dir) {\n        try {\n            // TODO: migrate Sidebar to use a Node instead\n            await window.OCA.Files.Sidebar.open(node.path);\n            // Silently update current fileid\n            window.OCP.Files.Router.goToRoute(null, { view: view.id, fileid: node.fileid }, { dir }, true);\n            return null;\n        }\n        catch (error) {\n            logger.error('Error while opening sidebar', { error });\n            return false;\n        }\n    },\n    order: -50,\n});\n","\n      import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n      import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n      import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n      import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n      import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n      import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n      import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./sharingStatusAction.scss\";\n      \n      \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n      options.insert = insertFn.bind(null, \"head\");\n    \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./sharingStatusAction.scss\";\n       export default content && content.locals ? content.locals : undefined;\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { Node, View, registerFileAction, FileAction, Permission } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport { Type } from '@nextcloud/sharing';\nimport AccountGroupSvg from '@mdi/svg/svg/account-group.svg?raw';\nimport AccountPlusSvg from '@mdi/svg/svg/account-plus.svg?raw';\nimport LinkSvg from '@mdi/svg/svg/link.svg?raw';\nimport CircleSvg from '../../../../core/img/apps/circles.svg?raw';\nimport { action as sidebarAction } from '../../../files/src/actions/sidebarAction';\nimport { generateUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport './sharingStatusAction.scss';\nconst generateAvatarSvg = (userId) => {\n    const avatarUrl = generateUrl('/avatar/{userId}/32', { userId });\n    return `<svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\"\n\t\txmlns=\"http://www.w3.org/2000/svg\" class=\"sharing-status__avatar\">\n\t\t<image href=\"${avatarUrl}\" height=\"32\" width=\"32\" />\n\t</svg>`;\n};\nexport const action = new FileAction({\n    id: 'sharing-status',\n    displayName(nodes) {\n        const node = nodes[0];\n        const shareTypes = Object.values(node?.attributes?.['share-types'] || {}).flat();\n        const ownerId = node?.attributes?.['owner-id'];\n        if (shareTypes.length > 0\n            || (ownerId && ownerId !== getCurrentUser()?.uid)) {\n            return t('files_sharing', 'Shared');\n        }\n        return '';\n    },\n    title(nodes) {\n        const node = nodes[0];\n        const ownerId = node?.attributes?.['owner-id'];\n        const ownerDisplayName = node?.attributes?.['owner-display-name'];\n        if (ownerId && ownerId !== getCurrentUser()?.uid) {\n            return t('files_sharing', 'Shared by {ownerDisplayName}', { ownerDisplayName });\n        }\n        return t('files_sharing', 'Show sharing options');\n    },\n    iconSvgInline(nodes) {\n        const node = nodes[0];\n        const shareTypes = Object.values(node?.attributes?.['share-types'] || {}).flat();\n        // Link shares\n        if (shareTypes.includes(Type.SHARE_TYPE_LINK)\n            || shareTypes.includes(Type.SHARE_TYPE_EMAIL)) {\n            return LinkSvg;\n        }\n        // Group shares\n        if (shareTypes.includes(Type.SHARE_TYPE_GROUP)\n            || shareTypes.includes(Type.SHARE_TYPE_REMOTE_GROUP)) {\n            return AccountGroupSvg;\n        }\n        // Circle shares\n        if (shareTypes.includes(Type.SHARE_TYPE_CIRCLE)) {\n            return CircleSvg;\n        }\n        const ownerId = node?.attributes?.['owner-id'];\n        if (ownerId && ownerId !== getCurrentUser()?.uid) {\n            return generateAvatarSvg(ownerId);\n        }\n        return AccountPlusSvg;\n    },\n    enabled(nodes) {\n        if (nodes.length !== 1) {\n            return false;\n        }\n        const node = nodes[0];\n        const ownerId = node?.attributes?.['owner-id'];\n        if (ownerId && ownerId !== getCurrentUser()?.uid) {\n            return true;\n        }\n        return (node.permissions & Permission.SHARE) !== 0;\n    },\n    async exec(node, view, dir) {\n        // You need read permissions to see the sidebar\n        if ((node.permissions & Permission.READ) !== 0) {\n            window.OCA?.Files?.Sidebar?.setActiveTab?.('sharing');\n            return sidebarAction.exec(node, view, dir);\n        }\n        return null;\n    },\n    inline: () => true,\n});\nregisterFileAction(action);\n","/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport registerSharingViews from './views/shares';\nimport './actions/acceptShareAction';\nimport './actions/openInFilesAction';\nimport './actions/rejectShareAction';\nimport './actions/restoreShareAction';\nimport './actions/sharingStatusAction';\nregisterSharingViews();\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.action-items>.files-list__row-action-sharing-status{direction:rtl;padding-right:0 !important}svg.sharing-status__avatar{height:32px !important;width:32px !important;max-height:32px !important;max-width:32px !important;border-radius:32px;overflow:hidden}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files_sharing/src/actions/sharingStatusAction.scss\"],\"names\":[],\"mappings\":\"AAsBA,qDAEC,aAAA,CAEG,0BAAA,CAGJ,2BACC,sBAAA,CACA,qBAAA,CACA,0BAAA,CACA,yBAAA,CACA,kBAAA,CACA,eAAA\",\"sourcesContent\":[\"/**\\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\\n *\\n * @author John Molakvoæ <skjnldsv@protonmail.com>\\n *\\n * @license AGPL-3.0-or-later\\n *\\n * This program is free software: you can redistribute it and/or modify\\n * it under the terms of the GNU Affero General Public License as\\n * published by the Free Software Foundation, either version 3 of the\\n * License, or (at your option) any later version.\\n *\\n * This program is distributed in the hope that it will be useful,\\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n * GNU Affero General Public License for more details.\\n *\\n * You should have received a copy of the GNU Affero General Public License\\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\\n *\\n */\\n // Only when rendered inline, when not enough space, this is put in the menu\\n.action-items > .files-list__row-action-sharing-status {\\n\\t// put icon at the end of the button\\n\\tdirection: rtl;\\n\\t// align icons with textless inline actions\\n    padding-right: 0 !important;\\n}\\n\\nsvg.sharing-status__avatar {\\n\\theight: 32px !important;\\n\\twidth: 32px !important;\\n\\tmax-height: 32px !important;\\n\\tmax-width: 32px !important;\\n\\tborder-radius: 32px;\\n\\toverflow: hidden;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","// The chunk loading function for additional chunks\n// Since all referenced chunks are already included\n// in this file, this function is empty here.\n__webpack_require__.e = () => (Promise.resolve());","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 1609;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t1609: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], () => (__webpack_require__(11090)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","m","e","setApp","build","setUid","uid","Z","DEFAULT","HIDDEN","Qt","_action","constructor","t","this","validateAction","id","displayName","title","iconSvgInline","enabled","exec","execBatch","order","parent","default","inline","renderInline","Error","Object","values","includes","Dt","window","_nc_fileactions","debug","find","error","action","push","N","NONE","CREATE","READ","UPDATE","DELETE","SHARE","ALL","R","Folder","File","J","match","X","source","URL","startsWith","mtime","Date","crtime","mime","size","permissions","owner","attributes","root","r","status","Q","NEW","FAILED","LOADING","LOCKED","D","_data","_attributes","_knownDavService","s","set","n","i","d","updateMtime","Reflect","deleteProperty","Proxy","replace","encodedSource","origin","slice","length","basename","extension","dirname","indexOf","pathname","isDavRessource","split","pop","path","fileid","move","rename","ye","type","_e","super","Te","_views","_currentView","register","remove","findIndex","splice","views","setActive","active","Ie","_column","Ae","render","sort","summary","S","O","RegExp","isExist","u","isEmptyObject","keys","merge","o","a","l","f","c","getValue","isName","getAllMatches","startIndex","lastIndex","g","nameRegexp","M","Oe","allowBooleanAttributes","unpairedTags","U","G","substr","p","w","z","validate","assign","err","trim","substring","Re","xe","value","index","H","code","msg","line","tagClosed","tagName","tagStartPos","col","Ve","JSON","stringify","map","Ce","Pe","$e","v","Le","hasOwnProperty","Fe","B","re","preserveOrder","attributeNamePrefix","attributesGroupName","textNodeName","ignoreAttributes","removeNSPrefix","parseTagValue","parseAttributeValue","trimValues","cdataPropName","numberParseOptions","hex","leadingZeros","eNotation","tagValueProcessor","attributeValueProcessor","stopNodes","alwaysCreateTextNode","isArray","commentPropName","processEntities","htmlEntities","ignoreDeclaration","ignorePiTags","transformTagName","transformAttributeName","updateTag","buildOptions","defaultOptions","ke","Xe","Ue","Ge","ze","He","Ke","We","je","Ye","Number","parseInt","parseFloat","Je","decimalPoint","k","T","tagname","child","add","addChild","tt","entityName","val","regx","entities","rt","skipLike","test","De","search","it","lastEntities","regex","st","options","replaceEntitiesValue","$","ot","charAt","ut","dt","resolveNameSpace","at","y","saveTextToParentTag","lastIndexOf","tagsNodeStack","x","tagExp","attrExpPresent","buildAttributesMap","closeIndex","docTypeEntities","parseTextData","rawTagName","isItStopNode","h","E","readStopNodeData","tagContent","_","lt","ft","ampEntity","ct","ht","data","pt","gt","ne","ie","Nt","bt","Et","Array","prettify","yt","_t","currentNode","apos","quot","space","cent","pound","yen","euro","copyright","reg","inr","addExternalEntities","parseXml","vt","Tt","se","Pt","xt","oe","K","indentBy","suppressUnpairedNode","suppressEmptyNode","endsWith","suppressBooleanAttributes","Ft","format","Vt","oneListGroup","b","isAttribute","attrPrefixLen","St","processTextOrObjNode","Lt","indentate","Rt","tagEndChar","newLine","j2x","buildTextValNode","attrStr","buildObjectNode","repeat","prototype","arrayNodeName","call","buildAttrPairStr","closeTag","W","XMLParser","externalEntities","parse","toString","addEntity","XMLValidator","XMLBuilder","cr","_view","Ut","name","caption","emptyTitle","emptyCaption","getContents","icon","params","columns","emptyView","sticky","expanded","defaultSortKey","TypeError","Xt","forEach","getLoggerBuilder","detectUser","rootPath","getCurrentUser","headers","ocsEntryToNode","ocsEntry","isFolder","item_type","hasPreview","has_preview","Node","file_source","file_target","generateRemoteUrl","replaceAll","item_mtime","undefined","stime","uid_owner","mimetype","item_size","item_permissions","favorite","tags","OC","TAG_FAVORITE","logger","getShares","shared_with_me","arguments","url","generateOcsUrl","axios","get","include_tags","async","sharedWithOthers","pendingShares","deletedshares","filterTypes","promises","getRemoteShares","getPendingShares","getRemotePendingShares","getDeletedShares","contents","Promise","all","response","ocs","flat","filter","node","share_type","folder","sharesViewId","sharedWithYouViewId","sharedWithOthersViewId","sharingByLinksViewId","deletedSharesViewId","pendingSharesViewId","registerFileAction","FileAction","nodes","view","isRemote","remote","shareBase","post","emit","dir","OCP","Files","Router","goToRoute","DefaultType","some","remote_id","Share","SHARE_TYPE_REMOTE_GROUP","delete","InformationSvg","OCA","Sidebar","Permission","open","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","shareTypes","ownerId","ownerDisplayName","Type","SHARE_TYPE_LINK","SHARE_TYPE_EMAIL","LinkSvg","SHARE_TYPE_GROUP","AccountGroupSvg","SHARE_TYPE_CIRCLE","userId","generateUrl","AccountPlusSvg","setActiveTab","sidebarAction","Navigation","_nc_navigation","View","registerSharingViews","___CSS_LOADER_EXPORT___","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","result","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","every","key","getter","__esModule","definition","defineProperty","enumerable","resolve","globalThis","Function","obj","prop","Symbol","toStringTag","nmd","paths","children","document","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","bind","nc","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file