Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

systemtags-init.js 70KB

123
  1. /*! For license information please see systemtags-init.js.LICENSE.txt */
  2. (()=>{var e,t={49662:(e,t,n)=>{"use strict";var r=n(77958),i=n(17499),o=n(31352),s=n(62520),a=n(65358),u=n(79753),l=n(14596);const c=null===(d=(0,r.ts)())?(0,i.IY)().setApp("files").build():(0,i.IY)().setApp("files").setUid(d.uid).build();var d,f=(e=>(e.DEFAULT="default",e.HIDDEN="hidden",e))(f||{}),h=(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))(h||{});const p=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","nc:share-attributes","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:share-types","oc:size","ocs:share-permissions"],g={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"};var m=(e=>(e.Folder="folder",e.File="file",e))(m||{});const y=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>=h.NONE&&e.permissions<=h.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&&y(e.source,t)){const n=e.source.match(t)[0];if(!e.source.includes((0,s.join)(n,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 n={set:(e,t,n)=>(this.updateMtime(),Reflect.set(e,t,n)),deleteProperty:(e,t)=>(this.updateMtime(),Reflect.deleteProperty(e,t))};this._attributes=new Proxy(e.attributes||{},n),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,s.basename)(this.source)}get extension(){return(0,s.extname)(this.source)}get dirname(){if(this.root){let e=this.source;this.isDavRessource&&(e=e.split(this._knownDavService).pop());const t=e.indexOf(this.root),n=this.root.replace(/\/$/,"");return(0,s.dirname)(e.slice(t+n.length)||"/")}const e=new URL(this.source);return(0,s.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:h.NONE:h.READ}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return y(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,s.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let e=this.source;this.isDavRessource&&(e=e.split(this._knownDavService).pop());const t=e.indexOf(this.root),n=this.root.replace(/\/$/,"");return e.slice(t+n.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,s.dirname)(this.source)+"/"+e)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}}class _ extends b{get type(){return m.File}}class x extends b{constructor(e){super({...e,mime:"httpd/unix-directory"})}get type(){return m.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}(0,u.generateRemoteUrl)("dav");class A{_column;constructor(e){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 E=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 N={},T={};!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",n="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",r=new RegExp("^"+n+"$");e.isExist=function(e){return typeof e<"u"},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,n){if(t){const r=Object.keys(t),i=r.length;for(let o=0;o<i;o++)e[r[o]]="strict"===n?[t[r[o]]]:t[r[o]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){const t=r.exec(e);return!(null===t||typeof t>"u")},e.getAllMatches=function(e,t){const n=[];let r=t.exec(e);for(;r;){const i=[];i.startIndex=t.lastIndex-r[0].length;const o=r.length;for(let e=0;e<o;e++)i.push(r[e]);n.push(i),r=t.exec(e)}return n},e.nameRegexp=n}(T);const C=T,O={allowBooleanAttributes:!1,unpairedTags:[]};function P(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function I(e,t){const n=t;for(;t<e.length;t++)if("?"==e[t]||" "==e[t]){const r=e.substr(n,t-n);if(t>5&&"xml"===r)return M("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 n=1;for(t+=8;t<e.length;t++)if("<"===e[t])n++;else if(">"===e[t]&&(n--,0===n))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}N.validate=function(e,t){t=Object.assign({},O,t);const n=[];let r=!1,i=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let o=0;o<e.length;o++)if("<"===e[o]&&"?"===e[o+1]){if(o+=2,o=I(e,o),o.err)return o}else{if("<"!==e[o]){if(P(e[o]))continue;return M("InvalidChar","char '"+e[o]+"' is not expected.",B(e,o))}{let s=o;if(o++,"!"===e[o]){o=S(e,o);continue}{let a=!1;"/"===e[o]&&(a=!0,o++);let u="";for(;o<e.length&&">"!==e[o]&&" "!==e[o]&&"\t"!==e[o]&&"\n"!==e[o]&&"\r"!==e[o];o++)u+=e[o];if(u=u.trim(),"/"===u[u.length-1]&&(u=u.substring(0,u.length-1),o--),!V(u)){let t;return t=0===u.trim().length?"Invalid space after '<'.":"Tag '"+u+"' is an invalid name.",M("InvalidTag",t,B(e,o))}const l=j(e,o);if(!1===l)return M("InvalidAttr","Attributes for '"+u+"' have open quote.",B(e,o));let c=l.value;if(o=l.index,"/"===c[c.length-1]){const n=o-c.length;c=c.substring(0,c.length-1);const i=D(c,t);if(!0!==i)return M(i.err.code,i.err.msg,B(e,n+i.err.line));r=!0}else if(a){if(!l.tagClosed)return M("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",B(e,o));if(c.trim().length>0)return M("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",B(e,s));{const t=n.pop();if(u!==t.tagName){let n=B(e,t.tagStartPos);return M("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+u+"'.",B(e,s))}0==n.length&&(i=!0)}}else{const a=D(c,t);if(!0!==a)return M(a.err.code,a.err.msg,B(e,o-c.length+a.err.line));if(!0===i)return M("InvalidXml","Multiple possible root nodes found.",B(e,o));-1!==t.unpairedTags.indexOf(u)||n.push({tagName:u,tagStartPos:s}),r=!0}for(o++;o<e.length;o++)if("<"===e[o]){if("!"===e[o+1]){o++,o=S(e,o);continue}if("?"!==e[o+1])break;if(o=I(e,++o),o.err)return o}else if("&"===e[o]){const t=$(e,o);if(-1==t)return M("InvalidChar","char '&' is not expected.",B(e,o));o=t}else if(!0===i&&!P(e[o]))return M("InvalidXml","Extra text at the end",B(e,o));"<"===e[o]&&o--}}}return r?1==n.length?M("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",B(e,n[0].tagStartPos)):!(n.length>0)||M("InvalidXml","Invalid '"+JSON.stringify(n.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):M("InvalidXml","Start tag expected.",1)};const R='"',k="'";function j(e,t){let n="",r="",i=!1;for(;t<e.length;t++){if(e[t]===R||e[t]===k)""===r?r=e[t]:r!==e[t]||(r="");else if(">"===e[t]&&""===r){i=!0;break}n+=e[t]}return""===r&&{value:n,index:t,tagClosed:i}}const L=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function D(e,t){const n=C.getAllMatches(e,L),r={};for(let e=0;e<n.length;e++){if(0===n[e][1].length)return M("InvalidAttr","Attribute '"+n[e][2]+"' has no space in starting.",q(n[e]));if(void 0!==n[e][3]&&void 0===n[e][4])return M("InvalidAttr","Attribute '"+n[e][2]+"' is without value.",q(n[e]));if(void 0===n[e][3]&&!t.allowBooleanAttributes)return M("InvalidAttr","boolean attribute '"+n[e][2]+"' is not allowed.",q(n[e]));const i=n[e][2];if(!F(i))return M("InvalidAttr","Attribute '"+i+"' is an invalid name.",q(n[e]));if(r.hasOwnProperty(i))return M("InvalidAttr","Attribute '"+i+"' is repeated.",q(n[e]));r[i]=1}return!0}function $(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let n=/\d/;for("x"===e[t]&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(n))break}return-1}(e,++t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(";"===e[t])break;return-1}return t}function M(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function F(e){return C.isName(e)}function V(e){return C.isName(e)}function B(e,t){const n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function q(e){return e.startIndex+e[1].length}var U={};const H={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,n){return e}};U.buildOptions=function(e){return Object.assign({},H,e)},U.defaultOptions=H;const z=T;function G(e,t){let n="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)n+=e[t];if(n=n.trim(),-1!==n.indexOf(" "))throw new Error("External entites are not supported");const r=e[t++];let i="";for(;t<e.length&&e[t]!==r;t++)i+=e[t];return[n,i,t]}function X(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function W(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 Y(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 Z(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(z.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 ne=T,re=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})}},ie=function(e,t){const n={};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 r=1,i=!1,o=!1,s="";for(;t<e.length;t++)if("<"!==e[t]||o)if(">"===e[t]){if(o?"-"===e[t-1]&&"-"===e[t-2]&&(o=!1,r--):r--,0===r)break}else"["===e[t]?i=!0:s+=e[t];else{if(i&&W(e,t))t+=7,[entityName,val,t]=G(e,t+1),-1===val.indexOf("&")&&(n[J(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(i&&Y(e,t))t+=8;else if(i&&K(e,t))t+=8;else if(i&&Z(e,t))t+=9;else{if(!X)throw new Error("Invalid DOCTYPE");o=!0}r++,s=""}if(0!==r)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:t}},oe=function(e,t={}){if(t=Object.assign({},te,t),!e||"string"!=typeof e)return e;let n=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(n))return e;if(t.hex&&Q.test(n))return Number.parseInt(n,16);{const r=ee.exec(n);if(r){const i=r[1],o=r[2];let s=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}(r[3]);const a=r[4]||r[6];if(!t.leadingZeros&&o.length>0&&i&&"."!==n[2])return e;if(!t.leadingZeros&&o.length>0&&!i&&"."!==n[1])return e;{const r=Number(n),u=""+r;return-1!==u.search(/[eE]/)||a?t.eNotation?r:e:-1!==n.indexOf(".")?"0"===u&&""===s||u===s||i&&u==="-"+s?r:e:o?s===u||i+s===u?r:e:n===u||n===i+u?r:e}}return e}};function se(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n];this.lastEntities[r]={regex:new RegExp("&"+r+";","g"),val:e[r]}}}function ae(e,t,n,r,i,o,s){if(void 0!==e&&(this.options.trimValues&&!r&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e));const r=this.options.tagValueProcessor(t,e,n,i,o);return null==r?e:typeof r!=typeof e||r!==e?r:this.options.trimValues||e.trim()===e?ve(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function ue(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,ne.nameRegexp);const le=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function ce(e,t,n){if(!this.options.ignoreAttributes&&"string"==typeof e){const n=ne.getAllMatches(e,le),r=n.length,i={};for(let e=0;e<r;e++){const r=this.resolveNameSpace(n[e][1]);let o=n[e][4],s=this.options.attributeNamePrefix+r;if(r.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),"__proto__"===s&&(s="#__proto__"),void 0!==o){this.options.trimValues&&(o=o.trim()),o=this.replaceEntitiesValue(o);const e=this.options.attributeValueProcessor(r,o,t);i[s]=null==e?o:typeof e!=typeof o||e!==o?e:ve(o,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[s]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=i,e}return i}}const de=function(e){e=e.replace(/\r\n?/g,"\n");const t=new re("!xml");let n=t,r="",i="";for(let o=0;o<e.length;o++)if("<"===e[o])if("/"===e[o+1]){const t=me(e,">",o,"Closing Tag is not closed.");let s=e.substring(o+2,t).trim();if(this.options.removeNSPrefix){const e=s.indexOf(":");-1!==e&&(s=s.substr(e+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),n&&(r=this.saveTextToParentTag(r,n,i));const a=i.substring(i.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw new Error(`Unpaired tag can not be used as closing tag: </${s}>`);let u=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(u=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=i.lastIndexOf("."),i=i.substring(0,u),n=this.tagsNodeStack.pop(),r="",o=t}else if("?"===e[o+1]){let t=ye(e,o,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,i),!(this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags)){const e=new re(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,i,t.tagName)),this.addChild(n,e,i)}o=t.closeIndex+1}else if("!--"===e.substr(o+1,3)){const t=me(e,"--\x3e",o+4,"Comment is not closed.");if(this.options.commentPropName){const s=e.substring(o+4,t-2);r=this.saveTextToParentTag(r,n,i),n.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}o=t}else if("!D"===e.substr(o+1,2)){const t=ie(e,o);this.docTypeEntities=t.entities,o=t.i}else if("!["===e.substr(o+1,2)){const t=me(e,"]]>",o,"CDATA is not closed.")-2,s=e.substring(o+9,t);if(r=this.saveTextToParentTag(r,n,i),this.options.cdataPropName)n.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]);else{let e=this.parseTextData(s,n.tagname,i,!0,!1,!0);null==e&&(e=""),n.add(this.options.textNodeName,e)}o=t+2}else{let s=ye(e,o,this.options.removeNSPrefix),a=s.tagName;const u=s.rawTagName;let l=s.tagExp,c=s.attrExpPresent,d=s.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&r&&"!xml"!==n.tagname&&(r=this.saveTextToParentTag(r,n,i,!1));const f=n;if(f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(n=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),a!==t.tagname&&(i+=i?"."+a:a),this.isItStopNode(this.options.stopNodes,i,a)){let t="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)o=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))o=s.closeIndex;else{const n=this.readStopNodeData(e,u,d+1);if(!n)throw new Error(`Unexpected end of ${u}`);o=n.i,t=n.tagContent}const r=new re(a);a!==l&&c&&(r[":@"]=this.buildAttributesMap(l,i,a)),t&&(t=this.parseTextData(t,a,i,!0,c,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),r.add(this.options.textNodeName,t),this.addChild(n,r,i)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),i=i.substr(0,i.length-1),l=a):l=l.substr(0,l.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const e=new re(a);a!==l&&c&&(e[":@"]=this.buildAttributesMap(l,i,a)),this.addChild(n,e,i),i=i.substr(0,i.lastIndexOf("."))}else{const e=new re(a);this.tagsNodeStack.push(n),a!==l&&c&&(e[":@"]=this.buildAttributesMap(l,i,a)),this.addChild(n,e,i),n=e}r="",o=d}}else r+=e[o];return t.child};function fe(e,t,n){const r=this.options.updateTag(t.tagname,n,t[":@"]);!1===r||("string"==typeof r&&(t.tagname=r),e.addChild(t))}const he=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function pe(e,t,n,r){return e&&(void 0===r&&(r=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,r))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function ge(e,t,n){const r="*."+n;for(const n in e){const i=e[n];if(r===i||t===i)return!0}return!1}function me(e,t,n,r){const i=e.indexOf(t,n);if(-1===i)throw new Error(r);return i+t.length-1}function ye(e,t,n,r=">"){const i=function(e,t,n=">"){let r,i="";for(let o=t;o<e.length;o++){let t=e[o];if(r)t===r&&(r="");else if('"'===t||"'"===t)r=t;else if(t===n[0]){if(!n[1])return{data:i,index:o};if(e[o+1]===n[1])return{data:i,index:o}}else"\t"===t&&(t=" ");i+=t}}(e,t+1,r);if(!i)return;let o=i.data;const s=i.index,a=o.search(/\s/);let u=o,l=!0;-1!==a&&(u=o.substr(0,a).replace(/\s\s*$/,""),o=o.substr(a+1));const c=u;if(n){const e=u.indexOf(":");-1!==e&&(u=u.substr(e+1),l=u!==i.data.substr(e+1))}return{tagName:u,tagExp:o,closeIndex:s,attrExpPresent:l,rawTagName:c}}function we(e,t,n){const r=n;let i=1;for(;n<e.length;n++)if("<"===e[n])if("/"===e[n+1]){const o=me(e,">",n,`${t} is not closed`);if(e.substring(n+2,o).trim()===t&&(i--,0===i))return{tagContent:e.substring(r,n),i:o};n=o}else if("?"===e[n+1])n=me(e,"?>",n+1,"StopNode is not closed.");else if("!--"===e.substr(n+1,3))n=me(e,"--\x3e",n+3,"StopNode is not closed.");else if("!["===e.substr(n+1,2))n=me(e,"]]>",n,"StopNode is not closed.")-2;else{const r=ye(e,n,">");r&&((r&&r.tagName)===t&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex)}}function ve(e,t,n){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&oe(e,n)}return ne.isExist(e)?e:""}var be={};function _e(e,t,n){let r;const i={};for(let o=0;o<e.length;o++){const s=e[o],a=xe(s);let u="";if(u=void 0===n?a:n+"."+a,a===t.textNodeName)void 0===r?r=s[a]:r+=""+s[a];else{if(void 0===a)continue;if(s[a]){let e=_e(s[a],t,u);const n=Ee(e,t);s[":@"]?Ae(e,s[":@"],u,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!==i[a]&&i.hasOwnProperty(a)?(Array.isArray(i[a])||(i[a]=[i[a]]),i[a].push(e)):t.isArray(a,u,n)?i[a]=[e]:i[a]=e}}}return"string"==typeof r?r.length>0&&(i[t.textNodeName]=r):void 0!==r&&(i[t.textNodeName]=r),i}function xe(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const n=t[e];if(":@"!==n)return n}}function Ae(e,t,n,r){if(t){const i=Object.keys(t),o=i.length;for(let s=0;s<o;s++){const o=i[s];r.isArray(o,n+"."+o,!0,!0)?e[o]=[t[o]]:e[o]=t[o]}}}function Ee(e,t){const{textNodeName:n}=t,r=Object.keys(e).length;return!(0!==r&&(1!==r||!e[n]&&"boolean"!=typeof e[n]&&0!==e[n]))}be.prettify=function(e,t){return _e(e,t)};const{buildOptions:Ne}=U,Te=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=se,this.parseXml=de,this.parseTextData=ae,this.resolveNameSpace=ue,this.buildAttributesMap=ce,this.isItStopNode=ge,this.replaceEntitiesValue=he,this.readStopNodeData=we,this.saveTextToParentTag=pe,this.addChild=fe}},{prettify:Ce}=be,Oe=N;function Pe(e,t,n,r){let i="",o=!1;for(let s=0;s<e.length;s++){const a=e[s],u=Ie(a);if(void 0===u)continue;let l="";if(l=0===n.length?u:`${n}.${u}`,u===t.textNodeName){let e=a[u];Re(l,t)||(e=t.tagValueProcessor(u,e),e=ke(e,t)),o&&(i+=r),i+=e,o=!1;continue}if(u===t.cdataPropName){o&&(i+=r),i+=`<![CDATA[${a[u][0][t.textNodeName]}]]>`,o=!1;continue}if(u===t.commentPropName){i+=r+`\x3c!--${a[u][0][t.textNodeName]}--\x3e`,o=!0;continue}if("?"===u[0]){const e=Se(a[":@"],t),n="?xml"===u?"":r;let s=a[u][0][t.textNodeName];s=0!==s.length?" "+s:"",i+=n+`<${u}${s}${e}?>`,o=!0;continue}let c=r;""!==c&&(c+=t.indentBy);const d=r+`<${u}${Se(a[":@"],t)}`,f=Pe(a[u],t,l,c);-1!==t.unpairedTags.indexOf(u)?t.suppressUnpairedNode?i+=d+">":i+=d+"/>":f&&0!==f.length||!t.suppressEmptyNode?f&&f.endsWith(">")?i+=d+`>${f}${r}</${u}>`:(i+=d+">",f&&""!==r&&(f.includes("/>")||f.includes("</"))?i+=r+t.indentBy+f+r:i+=f,i+=`</${u}>`):i+=d+"/>",o=!0}return i}function Ie(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n];if(e.hasOwnProperty(r)&&":@"!==r)return r}}function Se(e,t){let n="";if(e&&!t.ignoreAttributes)for(let r in e){if(!e.hasOwnProperty(r))continue;let i=t.attributeValueProcessor(r,e[r]);i=ke(i,t),!0===i&&t.suppressBooleanAttributes?n+=` ${r.substr(t.attributeNamePrefix.length)}`:n+=` ${r.substr(t.attributeNamePrefix.length)}="${i}"`}return n}function Re(e,t){let n=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let r in t.stopNodes)if(t.stopNodes[r]===e||t.stopNodes[r]==="*."+n)return!0;return!1}function ke(e,t){if(e&&e.length>0&&t.processEntities)for(let n=0;n<t.entities.length;n++){const r=t.entities[n];e=e.replace(r.regex,r.val)}return e}const je=function(e,t){let n="";return t.format&&t.indentBy.length>0&&(n="\n"),Pe(e,t,"",n)},Le={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 De(e){this.options=Object.assign({},Le,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Fe),this.processTextOrObjNode=$e,this.options.format?(this.indentate=Me,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function $e(e,t,n){const r=this.j2x(e,n+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,r.attrStr,n):this.buildObjectNode(r.val,t,r.attrStr,n)}function Me(e){return this.options.indentBy.repeat(e)}function Fe(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}De.prototype.build=function(e){return this.options.preserveOrder?je(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},De.prototype.j2x=function(e,t){let n="",r="";for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i))if(typeof e[i]>"u")this.isAttribute(i)&&(r+="");else if(null===e[i])this.isAttribute(i)?r+="":"?"===i[0]?r+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(e[i]instanceof Date)r+=this.buildTextValNode(e[i],i,"",t);else if("object"!=typeof e[i]){const o=this.isAttribute(i);if(o)n+=this.buildAttrPairStr(o,""+e[i]);else if(i===this.options.textNodeName){let t=this.options.tagValueProcessor(i,""+e[i]);r+=this.replaceEntitiesValue(t)}else r+=this.buildTextValNode(e[i],i,"",t)}else if(Array.isArray(e[i])){const n=e[i].length;let o="";for(let s=0;s<n;s++){const n=e[i][s];typeof n>"u"||(null===n?"?"===i[0]?r+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+i+"/"+this.tagEndChar:"object"==typeof n?this.options.oneListGroup?o+=this.j2x(n,t+1).val:o+=this.processTextOrObjNode(n,i,t):o+=this.buildTextValNode(n,i,"",t))}this.options.oneListGroup&&(o=this.buildObjectNode(o,i,"",t)),r+=o}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){const t=Object.keys(e[i]),r=t.length;for(let o=0;o<r;o++)n+=this.buildAttrPairStr(t[o],""+e[i][t[o]])}else r+=this.processTextOrObjNode(e[i],i,t);return{attrStr:n,val:r}},De.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},De.prototype.buildObjectNode=function(e,t,n,r){if(""===e)return"?"===t[0]?this.indentate(r)+"<"+t+n+"?"+this.tagEndChar:this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar;{let i="</"+t+this.tagEndChar,o="";return"?"===t[0]&&(o="?",i=""),!n&&""!==n||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===o.length?this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(r)+"<"+t+n+o+this.tagEndChar+e+this.indentate(r)+i:this.indentate(r)+"<"+t+n+o+">"+e+i}},De.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},De.prototype.buildTextValNode=function(e,t,n,r){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(r)+"<"+t+n+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),""===i?this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+"<"+t+n+">"+i+"</"+t+this.tagEndChar}},De.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e};var Ve={XMLParser:class{constructor(e){this.externalEntities={},this.options=Ne(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 n=Oe.validate(e,t);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new Te(this.options);n.addExternalEntities(this.externalEntities);const r=n.parseXml(e);return this.options.preserveOrder||void 0===r?r:Ce(r,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:N,XMLBuilder:De};var Be=n(93379),qe=n.n(Be),Ue=n(7795),He=n.n(Ue),ze=n(90569),Ge=n.n(ze),Xe=n(3565),We=n.n(Xe),Ye=n(19216),Ke=n.n(Ye),Ze=n(44589),Je=n.n(Ze),Qe=n(15735),et={};et.styleTagTransform=Je(),et.setAttributes=We(),et.insert=Ge().bind(null,"head"),et.domAPI=He(),et.insertStyleElement=Ke(),qe()(Qe.Z,et),Qe.Z&&Qe.Z.locals&&Qe.Z.locals;const tt=function(e){const t=e.attributes?.["system-tags"]?.["system-tag"];return void 0===t?[]:[t].flat()},nt=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=document.createElement("li");return n.classList.add("files-list__system-tag"),n.textContent=e,t&&n.classList.add("files-list__system-tag--more"),n},rt=new class{_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(f).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")}}({id:"system-tags",displayName:()=>"",iconSvgInline:()=>"",enabled(e){if(1!==e.length)return!1;const t=e[0];return 0!==tt(t).length},exec:async()=>null,async renderInline(e){const t=tt(e);if(0===t.length)return null;const n=document.createElement("ul");if(n.classList.add("files-list__system-tags"),1===t.length)n.setAttribute("aria-label",(0,o.Iu)("files","This file has the tag {tag}",{tag:t[0]}));else{const e=t.slice(0,-1).join(", "),r=t[t.length-1];n.setAttribute("aria-label",(0,o.Iu)("files","This file has the tags {firstTags} and {lastTag}",{firstTags:e,lastTag:r}))}if(n.append(nt(t[0])),t.length>1){const e=nt("+"+(t.length-1),!0);e.setAttribute("title",t.slice(1).join(", ")),n.append(e)}return n},order:0});!function(e,t={nc:"http://nextcloud.org/ns"}){typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...p],window._nc_dav_namespaces={...g});const n={...window._nc_dav_namespaces,...t};window._nc_dav_properties.find((t=>t===e))?c.error(`${e} already registered`,{prop:e}):e.startsWith("<")||2!==e.split(":").length?c.error(`${e} is not valid. See example: 'oc:fileid'`,{prop:e}):n[e.split(":")[0]]?(window._nc_dav_properties.push(e),window._nc_dav_namespaces=n):c.error(`${e} namespace unknown`,{prop:e,namespaces:n})}("nc:system-tags"),function(e){typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],c.debug("FileActions initialized")),window._nc_fileactions.find((t=>t.id===e.id))?c.error(`FileAction ${e.id} already registered`,{action:e}):window._nc_fileactions.push(e)}(rt),n(93664);const it=(0,u.generateRemoteUrl)("dav"),ot=(0,l.eI)(it,{headers:{requesttoken:(0,r.IH)()??""}});var st=n(36906);const at=(0,i.IY)().setApp("systemtags").detectUser().build();var ut=n(8501),lt=n(79267);const ct="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:"undefined"!=typeof window?window:globalThis,dt=ct.fetch.bind(ct);ct.Headers,ct.Request,ct.Response;const ft="@@HOTPATCHER",ht=()=>{};function pt(e){return{original:e,methods:[e],final:!1}}class gt{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=ft}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(e){this.configuration.getEmptyAction=e}control(e,t=!1){if(!e||e.__type__!==ft)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(e.configuration.registry).forEach((n=>{this.configuration.registry.hasOwnProperty(n)?t&&(this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])})),e._configuration=this.configuration,this}execute(e,...t){return(this.get(e)||ht)(...t)}get(e){const t=this.configuration.registry[e];if(!t)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${e}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return function(...e){if(0===e.length)throw new Error("Failed creating sequence: No functions provided");return function(...t){let n=t;const r=this;for(;e.length>0;)n=[e.shift().apply(r,n)];return n[0]}}(...t.methods)}isPatched(e){return!!this.configuration.registry[e]}patch(e,t,n={}){const{chain:r=!1}=n;if(this.configuration.registry[e]&&this.configuration.registry[e].final)throw new Error(`Failed patching '${e}': Method marked as being final`);if("function"!=typeof t)throw new Error(`Failed patching '${e}': Provided method is not a function`);if(r)this.configuration.registry[e]?this.configuration.registry[e].methods.push(t):this.configuration.registry[e]=pt(t);else if(this.isPatched(e)){const{original:n}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(pt(t),{original:n})}else this.configuration.registry[e]=pt(t);return this}patchInline(e,t,...n){return this.isPatched(e)||this.patch(e,t),this.execute(e,...n)}plugin(e,...t){return t.forEach((t=>{this.patch(e,t,{chain:!0})})),this}restore(e){if(!this.isPatched(e))throw new Error(`Failed restoring method: No method present for key: ${e}`);if("function"!=typeof this.configuration.registry[e].original)throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${e}`);return this.configuration.registry[e].methods=[this.configuration.registry[e].original],this}setFinal(e){if(!this.configuration.registry.hasOwnProperty(e))throw new Error(`Failed marking '${e}' as final: No method found for key`);return this.configuration.registry[e].final=!0,this}}let mt=null;function yt(){return"boolean"==typeof WEB&&!0===WEB}var wt=n(2568);const vt="abcdef0123456789";function bt(e,t){const n=e.url.replace("//",""),r=-1==n.indexOf("/")?"/":n.slice(n.indexOf("/")),i=e.method?e.method.toUpperCase():"GET",o=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",s=`00000000${t.nc}`.slice(-8),a=function(e,t,n,r,i,o,s){const a=s||wt(`${t}:${n}:${r}`);return e&&"md5-sess"===e.toLowerCase()?wt(`${a}:${i}:${o}`):a}(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),u=wt(`${i}:${r}`),l=wt(o?`${a}:${t.nonce}:${s}:${t.cnonce}:${o}:${u}`:`${a}:${t.nonce}:${u}`),c={username:t.username,realm:t.realm,nonce:t.nonce,uri:r,qop:o,response:l,nc:s,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},d=[];for(const e in c)c[e]&&("qop"===e||"nc"===e||"algorithm"===e?d.push(`${e}=${c[e]}`):d.push(`${e}="${c[e]}"`));return`Digest ${d.join(", ")}`}function _t(e){return function(e){if("object"!=typeof e||null===e||"[object Object]"!=Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)?Object.assign({},e):Object.setPrototypeOf(Object.assign({},e),Object.getPrototypeOf(e))}function xt(...e){let t=null,n=[...e];for(;n.length>0;){const e=n.shift();t=t?At(t,e):_t(e)}return t}function At(e,t){const n=_t(e);return Object.keys(t).forEach((e=>{n.hasOwnProperty(e)?Array.isArray(t[e])?n[e]=Array.isArray(n[e])?[...n[e],...t[e]]:[...t[e]]:"object"==typeof t[e]&&t[e]?n[e]="object"==typeof n[e]&&n[e]?At(n[e],t[e]):_t(t[e]):n[e]=t[e]:n[e]=t[e]})),n}function Et(...e){if(0===e.length)return{};const t={};return e.reduce(((e,n)=>(Object.keys(n).forEach((r=>{const i=r.toLowerCase();t.hasOwnProperty(i)?e[t[i]]=n[r]:(t[i]=r,e[r]=n[r])})),e)),{})}var Nt=n(42830);const Tt="function"==typeof ArrayBuffer,{toString:Ct}=Object.prototype;function Ot(e){const t=(mt||(mt=new gt),mt);return t.patchInline("request",(e=>t.patchInline("fetch",dt,e.url,function(e){let t={};const n={method:e.method};if(e.headers&&(t=Et(t,e.headers)),void 0!==e.data){const[r,i]=function(e){if(!yt()&&e instanceof Nt.Readable)return[e,{}];if("string"==typeof e)return[e,{}];if(null!=(t=e)&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return[e,{}];if(function(e){return Tt&&(e instanceof ArrayBuffer||"[object ArrayBuffer]"===Ct.call(e))}(e))return[e,{}];if(e&&"object"==typeof e)return[JSON.stringify(e),{"content-type":"application/json"}];var t;throw new Error("Unable to convert request body: Unexpected body type: "+typeof e)}(e.data);n.body=r,t=Et(t,i)}return e.signal&&(n.signal=e.signal),e.withCredentials&&(n.credentials="include"),yt()||(e.httpAgent||e.httpsAgent)&&(n.agent=t=>"http:"===t.protocol?e.httpAgent||new ut.Agent:e.httpsAgent||new lt.Agent),n.headers=t,n}(e))),e)}const Pt=`/files/${(0,r.ts)()?.uid}`,It=(0,u.generateRemoteUrl)("dav"+Pt),St=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:It;const t=(0,l.eI)(e,{headers:{requesttoken:(0,r.IH)()||""}});return(0,l.lD)().patch("request",(e=>(e.headers?.method&&(e.method=e.headers.method,delete e.headers.method),async function(e){if(!e._digest)return Ot(e);const t=e._digest;delete e._digest,t.hasDigestAuth&&(e=xt(e,{headers:{Authorization:bt(e,t)}}));const n=await Ot(e);if(401==n.status){if(t.hasDigestAuth=function(e,t){const n=e.headers&&e.headers.get("www-authenticate")||"";if("digest"!==n.split(/\s/)[0].toLowerCase())return!1;const r=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const e=r.exec(n);if(!e)break;t[e[1]]=e[2]||e[3]}return t.nc+=1,t.cnonce=function(){let e="";for(let t=0;t<32;++t)e=`${e}${vt[Math.floor(16*Math.random())]}`;return e}(),!0}(n,t),t.hasDigestAuth){e=xt(e,{headers:{Authorization:bt(e,t)}});const n=await Ot(e);return 401==n.status?t.hasDigestAuth=!1:t.nc++,n}}else t.nc++;return n}(e)))),t};n(3443),(0,i.IY)().setApp("files").detectUser().build(),St();const Rt=function(e){const t=(0,r.ts)()?.uid;if(!t)throw new Error("No user id found");const n=e.props,i=function(e=""){let t=h.NONE;return e&&((e.includes("C")||e.includes("K"))&&(t|=h.CREATE),e.includes("G")&&(t|=h.READ),(e.includes("W")||e.includes("N")||e.includes("V"))&&(t|=h.UPDATE),e.includes("D")&&(t|=h.DELETE),e.includes("R")&&(t|=h.SHARE)),t}(n?.permissions),o=(n["owner-id"]||t).toString(),s=(0,u.generateRemoteUrl)("dav"+Pt+e.filename),a=n?.fileid<0?s.split("").reduce((function(e,t){return(e=(e<<5)-e+t.charCodeAt(0))&e}),0):n?.fileid||0,l={id:a,source:s,mtime:new Date(e.lastmod),mime:e.mime||"application/octet-stream",size:n?.size||0,permissions:i,owner:o,root:Pt,attributes:{...e,...n,hasPreview:n?.["has-preview"],failed:n?.fileid<0}};return delete l.attributes.props,"file"===e.type?new _(l):new x(l)},kt=e=>`<?xml version="1.0"?>\n<oc:filter-files ${typeof window._nc_dav_namespaces>"u"&&(window._nc_dav_namespaces={...g}),Object.keys(window._nc_dav_namespaces).map((e=>`xmlns:${e}="${window._nc_dav_namespaces?.[e]}"`)).join(" ")}>\n\t<d:prop>\n\t\t${typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...p]),window._nc_dav_properties.map((e=>`<${e} />`)).join(" ")}\n\t</d:prop>\n <oc:filter-rules>\n <oc:systemtag>${e}</oc:systemtag>\n </oc:filter-rules>\n</oc:filter-files>`,jt=function(e){return new x({id:e.id,source:(0,u.generateRemoteUrl)("dav/systemtags/"+e.id),owner:(0,r.ts)()?.uid,root:"/systemtags",permissions:h.READ,attributes:{...e,"is-tag":!0}})};(typeof window._nc_navigation>"u"&&(window._nc_navigation=new class{_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}},c.debug("Navigation service initialized")),window._nc_navigation).register(new class{_view;constructor(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!==Ve.XMLValidator.validate(e))return!1;let t;const n=new Ve.XMLParser;try{t=n.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 A))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")})(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}}({id:"tags",name:(0,o.Iu)("systemtags","Tags"),caption:(0,o.Iu)("systemtags","List of tags and their associated files and folders."),emptyTitle:(0,o.Iu)("systemtags","No tags found"),emptyCaption:(0,o.Iu)("systemtags","Tags you have created will show up here."),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-tag-multiple" viewBox="0 0 24 24"><path d="M5.5,9A1.5,1.5 0 0,0 7,7.5A1.5,1.5 0 0,0 5.5,6A1.5,1.5 0 0,0 4,7.5A1.5,1.5 0 0,0 5.5,9M17.41,11.58C17.77,11.94 18,12.44 18,13C18,13.55 17.78,14.05 17.41,14.41L12.41,19.41C12.05,19.77 11.55,20 11,20C10.45,20 9.95,19.78 9.58,19.41L2.59,12.42C2.22,12.05 2,11.55 2,11V6C2,4.89 2.89,4 4,4H9C9.55,4 10.05,4.22 10.41,4.58L17.41,11.58M13.54,5.71L14.54,4.71L21.41,11.58C21.78,11.94 22,12.45 22,13C22,13.55 21.78,14.05 21.42,14.41L16.04,19.79L15.04,18.79L20.75,13L13.54,5.71Z" /></svg>',order:25,getContents:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=(await(async()=>{try{const{data:e}=await ot.getDirectoryContents("/systemtags",{data:'<?xml version="1.0"?>\n<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">\n\t<d:prop>\n\t\t<oc:id />\n\t\t<oc:display-name />\n\t\t<oc:user-visible />\n\t\t<oc:user-assignable />\n\t\t<oc:can-assign />\n\t</d:prop>\n</d:propfind>',details:!0,glob:"/systemtags/*"});return(e=>e.map((e=>{let{props:t}=e;return Object.fromEntries(Object.entries(t).map((e=>{let[t,n]=e;return[(0,st.Z)(t),"displayName"===(0,st.Z)(t)?String(n):n]})))})))(e)}catch(e){throw at.error((0,o.Iu)("systemtags","Failed to load tags"),{error:e}),new Error((0,o.Iu)("systemtags","Failed to load tags"))}})()).filter((e=>e.userVisible));if("/"===e)return{folder:new x({id:0,source:(0,u.generateRemoteUrl)("dav/systemtags"),owner:(0,r.ts)()?.uid,root:"/systemtags",permissions:h.NONE}),contents:t.map(jt)};const n=parseInt(e.replace("/",""),10),i=t.find((e=>e.id===n));if(!i)throw new Error("Tag not found");return{folder:jt(i),contents:(await St().getDirectoryContents("/",{details:!0,data:kt(n),headers:{method:"REPORT"}})).data.map(Rt)}}}))},50584:e=>{e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},3443:function(e,t,n){var r,i,o=n(25108);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=function(e){"use strict";function t(e,n){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},t(e,n)}function n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=r(e);if(t){var o=r(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function h(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,g(e,t,"get"))}function p(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,g(e,t,"set"),n),n}function g(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.CancelablePromise=void 0,e.cancelable=x,e.default=void 0,e.isCancelablePromise=A;var m="undefined"!=typeof Symbol?Symbol.toStringTag:"@@toStringTag",y=new WeakMap,w=new WeakMap,v=function(){function e(t){var n=t.executor,r=void 0===n?function(){}:n,i=t.internals,o=void 0===i?{isCanceled:!1,onCancelList:[]}:i,s=t.promise,a=void 0===s?new Promise((function(e,t){return r(e,t,(function(e){o.onCancelList.push(e)}))})):s;u(this,e),f(this,y,{writable:!0,value:void 0}),f(this,w,{writable:!0,value:void 0}),d(this,m,"CancelablePromise"),this.cancel=this.cancel.bind(this),p(this,y,o),p(this,w,a||new Promise((function(e,t){return r(e,t,(function(e){o.onCancelList.push(e)}))})))}return c(e,[{key:"then",value:function(e,t){return N(h(this,w).then(E(e,h(this,y)),E(t,h(this,y))),h(this,y))}},{key:"catch",value:function(e){return N(h(this,w).catch(E(e,h(this,y))),h(this,y))}},{key:"finally",value:function(e,t){var n=this;return t&&h(this,y).onCancelList.push(e),N(h(this,w).finally(E((function(){if(e)return t&&(h(n,y).onCancelList=h(n,y).onCancelList.filter((function(t){return t!==e}))),e()}),h(this,y))),h(this,y))}},{key:"cancel",value:function(){h(this,y).isCanceled=!0;var e=h(this,y).onCancelList;h(this,y).onCancelList=[];var t,n=i(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;if("function"==typeof r)try{r()}catch(e){o.error(e)}}}catch(e){n.e(e)}finally{n.f()}}},{key:"isCanceled",value:function(){return!0===h(this,y).isCanceled}}]),e}(),b=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&t(e,n)}(i,e);var r=n(i);function i(e){return u(this,i),r.call(this,{executor:e})}return c(i)}(v);e.CancelablePromise=b,d(b,"all",(function(e){return T(e,Promise.all(e))})),d(b,"allSettled",(function(e){return T(e,Promise.allSettled(e))})),d(b,"any",(function(e){return T(e,Promise.any(e))})),d(b,"race",(function(e){return T(e,Promise.race(e))})),d(b,"resolve",(function(e){return x(Promise.resolve(e))})),d(b,"reject",(function(e){return x(Promise.reject(e))})),d(b,"isCancelable",A);var _=b;function x(e){return N(e,{isCanceled:!1,onCancelList:[]})}function A(e){return e instanceof b||e instanceof v}function E(e,t){if(e)return function(n){if(!t.isCanceled){var r=e(n);return A(r)&&t.onCancelList.push(r.cancel),r}return n}}function N(e,t){return new v({internals:t,promise:e})}function T(e,t){var n={isCanceled:!1,onCancelList:[]};return n.onCancelList.push((function(){var t,n=i(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;A(r)&&r.cancel()}}catch(e){n.e(e)}finally{n.f()}})),new v({internals:n,promise:t})}e.default=_},void 0===(i=r.apply(t,[t]))||(e.exports=i)},15735:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(87537),i=n.n(r),o=n(23645),s=n.n(o)()(i());s.push([e.id,".files-list__system-tags{--min-size: 32px;display:none;justify-content:center;align-items:center;min-width:calc(var(--min-size)*2);max-width:300px}.files-list__system-tag{padding:5px 10px;border:1px solid;border-radius:var(--border-radius-pill);border-color:var(--color-border);color:var(--color-text-maxcontrast);height:var(--min-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:22px;text-align:center}.files-list__system-tag--more{overflow:visible;text-overflow:initial}.files-list__system-tag+.files-list__system-tag{margin-left:5px}@media(min-width: 512px){.files-list__system-tags{display:flex}}","",{version:3,sources:["webpack://./apps/systemtags/src/css/fileEntryInlineSystemTags.scss"],names:[],mappings:"AAsBA,yBACC,gBAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,iCAAA,CACA,eAAA,CAGD,wBACC,gBAAA,CACA,gBAAA,CACA,uCAAA,CACA,gCAAA,CACA,mCAAA,CACA,sBAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,gBAAA,CACA,iBAAA,CAEA,8BACC,gBAAA,CACA,qBAAA,CAID,gDACC,eAAA,CAIF,yBACC,yBACC,YAAA,CAAA",sourcesContent:["/**\n * @copyright Copyright (c) 2023 Lucas Azevedo <lhs_azevedo@hotmail.com>\n *\n * @author Lucas Azevedo <lhs_azevedo@hotmail.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\n.files-list__system-tags {\n\t--min-size: 32px;\n\tdisplay: none;\n\tjustify-content: center;\n\talign-items: center;\n\tmin-width: calc(var(--min-size) * 2);\n\tmax-width: 300px;\n}\n\n.files-list__system-tag {\n\tpadding: 5px 10px;\n\tborder: 1px solid;\n\tborder-radius: var(--border-radius-pill);\n\tborder-color: var(--color-border);\n\tcolor: var(--color-text-maxcontrast);\n\theight: var(--min-size);\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tline-height: 22px; // min-size - 2 * 5px padding\n\ttext-align: center;\n\n\t&--more {\n\t\toverflow: visible;\n\t\ttext-overflow: initial;\n\t}\n\n\t// Proper spacing if multiple shown\n\t& + .files-list__system-tag {\n\t\tmargin-left: 5px;\n\t}\n}\n\n@media (min-width: 512px) {\n\t.files-list__system-tags {\n\t\tdisplay: flex;\n\t}\n}\n"],sourceRoot:""}]);const a=s},79267:(e,t,n)=>{var r=n(8501),i=n(8575),o=e.exports;for(var s in r)r.hasOwnProperty(s)&&(o[s]=r[s]);function a(e){if("string"==typeof e&&(e=i.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}o.request=function(e,t){return e=a(e),r.request.call(this,e,t)},o.get=function(e,t){return e=a(e),r.get.call(this,e,t)}},88473:(e,t,n)=>{(t=e.exports=n(79481)).Stream=t,t.Readable=t,t.Writable=n(64229),t.Duplex=n(56753),t.Transform=n(74605),t.PassThrough=n(82725),t.finished=n(8610),t.pipeline=n(59946)},8501:(e,t,n)=>{var r=n(11989),i=n(55676),o=n(47529),s=n(50584),a=n(8575),u=t;u.request=function(e,t){e="string"==typeof e?a.parse(e):o(e);var i=-1===n.g.location.protocol.search(/^https?:$/)?"http:":"",s=e.protocol||i,u=e.hostname||e.host,l=e.port,c=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?s+"//"+u:"")+(l?":"+l:"")+c,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var d=new r(e);return t&&d.on("response",t),d},u.get=function(e,t){var n=u.request(e,t);return n.end(),n},u.ClientRequest=r,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},8725:(e,t,n)=>{var r;function i(){if(void 0!==r)return r;if(n.g.XMLHttpRequest){r=new n.g.XMLHttpRequest;try{r.open("GET",n.g.XDomainRequest?"/":"https://example.com")}catch(e){r=null}}else r=null;return r}function o(e){var t=i();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function s(e){return"function"==typeof e}t.fetch=s(n.g.fetch)&&s(n.g.ReadableStream),t.writableStream=s(n.g.WritableStream),t.abortController=s(n.g.AbortController),t.arraybuffer=t.fetch||o("arraybuffer"),t.msstream=!t.fetch&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!i()&&s(i().overrideMimeType),r=null},11989:(e,t,n)=>{var r=n(48764).Buffer,i=n(34155),o=n(8725),s=n(35717),a=n(55676),u=n(88473),l=a.IncomingMessage,c=a.readyStates,d=e.exports=function(e){var t,n=this;u.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+r.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)i=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}n._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":"text"}(t,i),n._fetchTimer=null,n._socketTimeout=null,n._socketTimer=null,n.on("finish",(function(){n._onFinish()}))};s(d,u.Writable),d.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===f.indexOf(n)&&(this._headers[n]={name:e,value:t})},d.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},d.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},d.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var r=e._headers,s=null;"GET"!==t.method&&"HEAD"!==t.method&&(s=new Blob(e._body,{type:(r["content-type"]||{}).value||""}));var a=[];if(Object.keys(r).forEach((function(e){var t=r[e].name,n=r[e].value;Array.isArray(n)?n.forEach((function(e){a.push([t,e])})):a.push([t,n])})),"fetch"===e._mode){var u=null;if(o.abortController){var l=new AbortController;u=l.signal,e._fetchAbortController=l,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=n.g.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}n.g.fetch(e._opts.url,{method:e._opts.method,headers:a,body:s||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:u}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var d=e._xhr=new n.g.XMLHttpRequest;try{d.open(e._opts.method,e._opts.url,!0)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}"responseType"in d&&(d.responseType=e._mode),"withCredentials"in d&&(d.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in d&&d.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(d.timeout=t.requestTimeout,d.ontimeout=function(){e.emit("requestTimeout")}),a.forEach((function(e){d.setRequestHeader(e[0],e[1])})),e._response=null,d.onreadystatechange=function(){switch(d.readyState){case c.LOADING:case c.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(d.onprogress=function(){e._onXHRProgress()}),d.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{d.send(s)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}}}},d.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},d.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},d.prototype._write=function(e,t,n){this._body.push(e),n()},d.prototype._resetTimers=function(e){var t=this;n.g.clearTimeout(t._socketTimer),t._socketTimer=null,e?(n.g.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=n.g.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},d.prototype.abort=d.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},d.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),u.Writable.prototype.end.call(this,e,t,n)},d.prototype.setTimeout=function(e,t){var n=this;t&&n.once("timeout",t),n._socketTimeout=e,n._resetTimers(!1)},d.prototype.flushHeaders=function(){},d.prototype.setNoDelay=function(){},d.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},55676:(e,t,n)=>{var r=n(34155),i=n(48764).Buffer,o=n(8725),s=n(35717),a=n(88473),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=t.IncomingMessage=function(e,t,n,s){var u=this;if(a.Readable.call(u),u._mode=n,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){r.nextTick((function(){u.emit("close")}))})),"fetch"===n){if(u._fetchResponse=t,u.url=t.url,u.statusCode=t.status,u.statusMessage=t.statusText,t.headers.forEach((function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)})),o.writableStream){var l=new WritableStream({write:function(e){return s(!1),new Promise((function(t,n){u._destroyed?n():u.push(i.from(e))?t():u._resumeFetch=t}))},close:function(){s(!0),u._destroyed||u.push(null)},abort:function(e){s(!0),u._destroyed||u.emit("error",e)}});try{return void t.body.pipeTo(l).catch((function(e){s(!0),u._destroyed||u.emit("error",e)}))}catch(e){}}var c=t.body.getReader();!function e(){c.read().then((function(t){u._destroyed||(s(t.done),t.done?u.push(null):(u.push(i.from(t.value)),e()))})).catch((function(e){s(!0),u._destroyed||u.emit("error",e)}))}()}else if(u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===u.headers[n]&&(u.headers[n]=[]),u.headers[n].push(t[2])):void 0!==u.headers[n]?u.headers[n]+=", "+t[2]:u.headers[n]=t[2],u.rawHeaders.push(t[1],t[2])}})),u._charset="x-user-defined",!o.overrideMimeType){var d=u.rawHeaders["mime-type"];if(d){var f=d.match(/;\s*charset=([^;])(;|$)/);f&&(u._charset=f[1].toLowerCase())}u._charset||(u._charset="utf-8")}};s(l,a.Readable),l.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},l.prototype._onXHRProgress=function(e){var t=this,r=t._xhr,o=null;switch(t._mode){case"text":if((o=r.responseText).length>t._pos){var s=o.substr(t._pos);if("x-user-defined"===t._charset){for(var a=i.alloc(s.length),l=0;l<s.length;l++)a[l]=255&s.charCodeAt(l);t.push(a)}else t.push(s,t._charset);t._pos=o.length}break;case"arraybuffer":if(r.readyState!==u.DONE||!r.response)break;o=r.response,t.push(i.from(new Uint8Array(o)));break;case"moz-chunked-arraybuffer":if(o=r.response,r.readyState!==u.LOADING||!o)break;t.push(i.from(new Uint8Array(o)));break;case"ms-stream":if(o=r.response,r.readyState!==u.LOADING)break;var c=new n.g.MSStreamReader;c.onprogress=function(){c.result.byteLength>t._pos&&(t.push(i.from(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){e(!0),t.push(null)},c.readAsArrayBuffer(o)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},47529:e=>{e.exports=function(){for(var e={},n=0;n<arguments.length;n++){var r=arguments[n];for(var i in r)t.call(r,i)&&(e[i]=r[i])}return e};var t=Object.prototype.hasOwnProperty},24654:()=>{},52361:()=>{},94616:()=>{}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.m=t,e=[],r.O=(t,n,i,o)=>{if(!n){var s=1/0;for(c=0;c<e.length;c++){n=e[c][0],i=e[c][1],o=e[c][2];for(var a=!0,u=0;u<n.length;u++)(!1&o||s>=o)&&Object.keys(r.O).every((e=>r.O[e](n[u])))?n.splice(u--,1):(a=!1,o<s&&(s=o));if(a){e.splice(c--,1);var l=i();void 0!==l&&(t=l)}}return t}o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[n,i,o]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.e=()=>Promise.resolve(),r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.j=5191,(()=>{r.b=document.baseURI||self.location.href;var e={5191:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var i,o,s=n[0],a=n[1],u=n[2],l=0;if(s.some((t=>0!==e[t]))){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);if(u)var c=u(r)}for(t&&t(n);l<s.length;l++)o=s[l],r.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return r.O(c)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),r.nc=void 0;var i=r.O(void 0,[7874],(()=>r(49662)));i=r.O(i)})();
  3. //# sourceMappingURL=systemtags-init.js.map?v=52de491329f4523f3607