aboutsummaryrefslogtreecommitdiffstats
path: root/dist/systemtags-init.js
diff options
context:
space:
mode:
Diffstat (limited to 'dist/systemtags-init.js')
-rw-r--r--dist/systemtags-init.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/dist/systemtags-init.js b/dist/systemtags-init.js
index 0f12c3544bd..5ac45ff83c2 100644
--- a/dist/systemtags-init.js
+++ b/dist/systemtags-init.js
@@ -1,2 +1,2 @@
-(()=>{var t,e,r,n={8828:(t,e,r)=>{"use strict";r.d(e,{R:()=>s});var n=r(60669),i=r(63814),a=r(21777);const o=(0,i.dC)("dav"),s=(0,n.UU)(o),l=t=>{s.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})};(0,a.zo)(l),l((0,a.do)())},12686:(t,e,r)=>{"use strict";r.d(e,{GX:()=>o,Pq:()=>c,_3:()=>s,rA:()=>l,rL:()=>a});var n=r(71654),i=r(85471);const a=t=>t.map((t=>{let{props:e}=t;return Object.fromEntries(Object.entries(e).map((t=>{let[e,r]=t;return[(0,n.A)(e),"displayName"===(0,n.A)(e)?String(r):r]})))})),o=t=>{const e=t.indexOf("?");e>0&&(t=t.substring(0,e));const r=t.split("/");let n;do{n=r[r.length-1],r.pop()}while(!n&&r.length>0);return Number(n)},s=t=>{if("name"in t&&!("displayName"in t))return{...t};const e={...t};return e.name=e.displayName,delete e.displayName,e},l=function(t){const e=t.attributes?.["system-tags"]?.["system-tag"];return void 0===e?[]:[e].flat().map((t=>"string"==typeof t?t:t.text))},c=function(t,e){i.Ay.set(t.attributes,"system-tags",{"system-tag":e})}},25631:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=(0,r(35947).YK)().setApp("systemtags").detectUser().build()},35810:(t,e,r)=>{"use strict";r.d(e,{Al:()=>n.r,CP:()=>n.k,Gg:()=>h,H4:()=>n.c,KT:()=>W,PY:()=>n.b,Q$:()=>n.e,R3:()=>n.n,Ss:()=>q,VL:()=>n.l,VX:()=>n.j,Yc:()=>n.i,aX:()=>n.P,bh:()=>k,di:()=>z,hY:()=>d,lJ:()=>n.d,m9:()=>u,nF:()=>H,pt:()=>n.F,ur:()=>tt,v7:()=>Z,vd:()=>n.s,zI:()=>n.t});var n=r(68896),i=r(380),a=r(83141),o=r(87485),s=(r(43627),r(53334)),l=r(65606),c=r(62045).hp,u=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(u||{});class d{_action;constructor(t){this.validateAction(t),this._action=t}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get hotkey(){return this._action.hotkey}get order(){return this._action.order}get parent(){return this._action.parent}get default(){return this._action.default}get destructive(){return this._action.destructive}get inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(t){if(!t.id||"string"!=typeof t.id)throw new Error("Invalid id");if(!t.displayName||"function"!=typeof t.displayName)throw new Error("Invalid displayName function");if("title"in t&&"function"!=typeof t.title)throw new Error("Invalid title function");if(!t.iconSvgInline||"function"!=typeof t.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!t.exec||"function"!=typeof t.exec)throw new Error("Invalid exec function");if("enabled"in t&&"function"!=typeof t.enabled)throw new Error("Invalid enabled function");if("execBatch"in t&&"function"!=typeof t.execBatch)throw new Error("Invalid execBatch function");if("order"in t&&"number"!=typeof t.order)throw new Error("Invalid order");if(void 0!==t.destructive&&"boolean"!=typeof t.destructive)throw new Error("Invalid destructive flag");if("parent"in t&&"string"!=typeof t.parent)throw new Error("Invalid parent");if(t.default&&!Object.values(u).includes(t.default))throw new Error("Invalid default");if("inline"in t&&"function"!=typeof t.inline)throw new Error("Invalid inline function");if("renderInline"in t&&"function"!=typeof t.renderInline)throw new Error("Invalid renderInline function");if("hotkey"in t&&void 0!==t.hotkey){if("object"!=typeof t.hotkey)throw new Error("Invalid hotkey configuration");if("string"!=typeof t.hotkey.key||!t.hotkey.key)throw new Error("Missing or invalid hotkey key");if("string"!=typeof t.hotkey.description||!t.hotkey.description)throw new Error("Missing or invalid hotkey description")}}}const h=function(t){void 0===window._nc_fileactions&&(window._nc_fileactions=[],n.o.debug("FileActions initialized")),window._nc_fileactions.find((e=>e.id===t.id))?n.o.error(`FileAction ${t.id} already registered`,{action:t}):window._nc_fileactions.push(t)};function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var m,g,f,E;function b(){if(g)return m;g=1;const t="object"==typeof l&&l.env&&l.env.NODE_DEBUG&&/\bsemver\b/i.test(l.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};return m=t}function y(){if(E)return f;E=1;const t=Number.MAX_SAFE_INTEGER||9007199254740991;return f={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}var w,A,v,T,N,I,_,C,O,x,R,L,D,S={exports:{}};function M(){if(_)return I;_=1;const t=b(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:r}=y(),{safeRe:n,t:i}=(w||(w=1,function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=y(),a=b(),o=(e=t.exports={}).re=[],s=e.safeRe=[],l=e.src=[],c=e.t={};let u=0;const d="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",i],[d,n]],p=(t,e,r)=>{const n=(t=>{for(const[e,r]of h)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t})(e),i=u++;a(t,i,e),c[t]=i,l[i]=e,o[i]=new RegExp(e,r?"g":void 0),s[i]=new RegExp(n,r?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),p("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[c.NUMERICIDENTIFIER]}|${l[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NUMERICIDENTIFIERLOOSE]}|${l[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${d}+`),p("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),p("FULL",`^${l[c.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),p("LOOSE",`^${l[c.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),p("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),p("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[c.COERCE],!0),p("COERCERTLFULL",l[c.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",p("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",p("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(S,S.exports)),S.exports),a=function(){if(v)return A;v=1;const t=Object.freeze({loose:!0}),e=Object.freeze({});return A=r=>r?"object"!=typeof r?t:r:e}(),{compareIdentifiers:o}=function(){if(N)return T;N=1;const t=/^[0-9]+$/,e=(e,r)=>{const n=t.test(e),i=t.test(r);return n&&i&&(e=+e,r=+r),e===r?0:n&&!i?-1:i&&!n?1:e<r?-1:1};return T={compareIdentifiers:e,rcompareIdentifiers:(t,r)=>e(r,t)}}();class s{constructor(o,l){if(l=a(l),o instanceof s){if(o.loose===!!l.loose&&o.includePrerelease===!!l.includePrerelease)return o;o=o.version}else if("string"!=typeof o)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof o}".`);if(o.length>e)throw new TypeError(`version is longer than ${e} characters`);t("SemVer",o,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const c=o.trim().match(l.loose?n[i.LOOSE]:n[i.FULL]);if(!c)throw new TypeError(`Invalid Version: ${o}`);if(this.raw=o,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const e=+t;if(e>=0&&e<r)return e}return t})):this.prerelease=[],this.build=c[5]?c[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(t("SemVer.compare",this.version,this.options,e),!(e instanceof s)){if("string"==typeof e&&e===this.version)return 0;e=new s(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(t){return t instanceof s||(t=new s(t,this.options)),o(this.major,t.major)||o(this.minor,t.minor)||o(this.patch,t.patch)}comparePre(e){if(e instanceof s||(e=new s(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{const n=this.prerelease[r],i=e.prerelease[r];if(t("prerelease compare",r,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return o(n,i)}while(++r)}compareBuild(e){e instanceof s||(e=new s(e,this.options));let r=0;do{const n=this.build[r],i=e.build[r];if(t("build compare",r,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return o(n,i)}while(++r)}inc(t,e,r){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e,r),this.inc("pre",e,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e,r),this.inc("pre",e,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const t=Number(r)?1:0;if(!e&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[t];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(e===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(t)}}if(e){let n=[e,t];!1===r&&(n=[e]),0===o(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return I=s}!function(){if(R)return x;R=1;const t=function(){if(O)return C;O=1;const t=M();return C=(e,r,n=!1)=>{if(e instanceof t)return e;try{return new t(e,r)}catch(t){if(!n)return null;throw t}}}();x=(e,r)=>{const n=t(e,r);return n?n.version:null}}(),function(){if(D)return L;D=1;const t=M();L=(e,r)=>new t(e,r).major}(),i.m;class F extends i.m{_views=[];_currentView=null;register(t){if(this._views.find((e=>e.id===t.id)))throw new Error(`View id ${t.id} is already registered`);this._views.push(t),this.dispatchTypedEvent("update",new CustomEvent("update"))}remove(t){const e=this._views.findIndex((e=>e.id===t));-1!==e&&(this._views.splice(e,1),this.dispatchTypedEvent("update",new CustomEvent("update")))}setActive(t){this._currentView=t;const e=new CustomEvent("updateActive",{detail:t});this.dispatchTypedEvent("updateActive",e)}get active(){return this._currentView}get views(){return this._views}}const k=function(){return void 0===window._nc_navigation&&(window._nc_navigation=new F,n.o.debug("Navigation service initialized")),window._nc_navigation};class P{_column;constructor(t){$(t),this._column=t}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(t){if(!t.id||"string"!=typeof t.id)throw new Error("A column id is required");if(!t.title||"string"!=typeof t.title)throw new Error("A column title is required");if(!t.render||"function"!=typeof t.render)throw new Error("A render function is required");if(t.sort&&"function"!=typeof t.sort)throw new Error("Column sortFunction must be a function");if(t.summary&&"function"!=typeof t.summary)throw new Error("Column summary must be a function");return!0};var B,U={};const G=p((B||(B=1,function(t){t.parser=function(t,e){return new n(t,e)},t.SAXParser=n,t.SAXStream=o,t.createStream=function(t,e){return new o(t,e)},t.MAX_BUFFER_LENGTH=65536;var e,r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function n(e,i){if(!(this instanceof n))return new n(e,i);var a=this;!function(t){for(var e=0,n=r.length;e<n;e++)t[r[e]]=""}(a),a.q=a.c="",a.bufferCheckPosition=t.MAX_BUFFER_LENGTH,a.opt=i||{},a.opt.lowercase=a.opt.lowercase||a.opt.lowercasetags,a.looseCase=a.opt.lowercase?"toLowerCase":"toUpperCase",a.tags=[],a.closed=a.closedRoot=a.sawRoot=!1,a.tag=a.error=null,a.strict=!!e,a.noscript=!(!e&&!a.opt.noscript),a.state=I.BEGIN,a.strictEntities=a.opt.strictEntities,a.ENTITIES=a.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),a.attribList=[],a.opt.xmlns&&(a.ns=Object.create(h)),void 0===a.opt.unquotedAttributeValues&&(a.opt.unquotedAttributeValues=!e),a.trackPosition=!1!==a.opt.position,a.trackPosition&&(a.position=a.line=a.column=0),C(a,"onready")}t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(t){function e(){}return e.prototype=t,new e}),Object.keys||(Object.keys=function(t){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);return e}),n.prototype={end:function(){D(this)},write:function(e){var n=this;if(this.error)throw this.error;if(n.closed)return L(n,"Cannot write after close. Assign an onready handler.");if(null===e)return D(n);"object"==typeof e&&(e=e.toString());for(var i=0,a="";a=G(e,i++),n.c=a,a;)switch(n.trackPosition&&(n.position++,"\n"===a?(n.line++,n.column=0):n.column++),n.state){case I.BEGIN:if(n.state=I.BEGIN_WHITESPACE,"\ufeff"===a)continue;U(n,a);continue;case I.BEGIN_WHITESPACE:U(n,a);continue;case I.TEXT:if(n.sawRoot&&!n.closedRoot){for(var o=i-1;a&&"<"!==a&&"&"!==a;)(a=G(e,i++))&&n.trackPosition&&(n.position++,"\n"===a?(n.line++,n.column=0):n.column++);n.textNode+=e.substring(o,i-1)}"<"!==a||n.sawRoot&&n.closedRoot&&!n.strict?(E(a)||n.sawRoot&&!n.closedRoot||S(n,"Text data outside of root node."),"&"===a?n.state=I.TEXT_ENTITY:n.textNode+=a):(n.state=I.OPEN_WAKA,n.startTagPosition=n.position);continue;case I.SCRIPT:"<"===a?n.state=I.SCRIPT_ENDING:n.script+=a;continue;case I.SCRIPT_ENDING:"/"===a?n.state=I.CLOSE_TAG:(n.script+="<"+a,n.state=I.SCRIPT);continue;case I.OPEN_WAKA:if("!"===a)n.state=I.SGML_DECL,n.sgmlDecl="";else if(E(a));else if(w(p,a))n.state=I.OPEN_TAG,n.tagName=a;else if("/"===a)n.state=I.CLOSE_TAG,n.tagName="";else if("?"===a)n.state=I.PROC_INST,n.procInstName=n.procInstBody="";else{if(S(n,"Unencoded <"),n.startTagPosition+1<n.position){var c=n.position-n.startTagPosition;a=new Array(c).join(" ")+a}n.textNode+="<"+a,n.state=I.TEXT}continue;case I.SGML_DECL:if(n.sgmlDecl+a==="--"){n.state=I.COMMENT,n.comment="",n.sgmlDecl="";continue}n.doctype&&!0!==n.doctype&&n.sgmlDecl?(n.state=I.DOCTYPE_DTD,n.doctype+="<!"+n.sgmlDecl+a,n.sgmlDecl=""):(n.sgmlDecl+a).toUpperCase()===s?(O(n,"onopencdata"),n.state=I.CDATA,n.sgmlDecl="",n.cdata=""):(n.sgmlDecl+a).toUpperCase()===l?(n.state=I.DOCTYPE,(n.doctype||n.sawRoot)&&S(n,"Inappropriately located doctype declaration"),n.doctype="",n.sgmlDecl=""):">"===a?(O(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=I.TEXT):b(a)?(n.state=I.SGML_DECL_QUOTED,n.sgmlDecl+=a):n.sgmlDecl+=a;continue;case I.SGML_DECL_QUOTED:a===n.q&&(n.state=I.SGML_DECL,n.q=""),n.sgmlDecl+=a;continue;case I.DOCTYPE:">"===a?(n.state=I.TEXT,O(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=a,"["===a?n.state=I.DOCTYPE_DTD:b(a)&&(n.state=I.DOCTYPE_QUOTED,n.q=a));continue;case I.DOCTYPE_QUOTED:n.doctype+=a,a===n.q&&(n.q="",n.state=I.DOCTYPE);continue;case I.DOCTYPE_DTD:"]"===a?(n.doctype+=a,n.state=I.DOCTYPE):"<"===a?(n.state=I.OPEN_WAKA,n.startTagPosition=n.position):b(a)?(n.doctype+=a,n.state=I.DOCTYPE_DTD_QUOTED,n.q=a):n.doctype+=a;continue;case I.DOCTYPE_DTD_QUOTED:n.doctype+=a,a===n.q&&(n.state=I.DOCTYPE_DTD,n.q="");continue;case I.COMMENT:"-"===a?n.state=I.COMMENT_ENDING:n.comment+=a;continue;case I.COMMENT_ENDING:"-"===a?(n.state=I.COMMENT_ENDED,n.comment=R(n.opt,n.comment),n.comment&&O(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+a,n.state=I.COMMENT);continue;case I.COMMENT_ENDED:">"!==a?(S(n,"Malformed comment"),n.comment+="--"+a,n.state=I.COMMENT):n.doctype&&!0!==n.doctype?n.state=I.DOCTYPE_DTD:n.state=I.TEXT;continue;case I.CDATA:"]"===a?n.state=I.CDATA_ENDING:n.cdata+=a;continue;case I.CDATA_ENDING:"]"===a?n.state=I.CDATA_ENDING_2:(n.cdata+="]"+a,n.state=I.CDATA);continue;case I.CDATA_ENDING_2:">"===a?(n.cdata&&O(n,"oncdata",n.cdata),O(n,"onclosecdata"),n.cdata="",n.state=I.TEXT):"]"===a?n.cdata+="]":(n.cdata+="]]"+a,n.state=I.CDATA);continue;case I.PROC_INST:"?"===a?n.state=I.PROC_INST_ENDING:E(a)?n.state=I.PROC_INST_BODY:n.procInstName+=a;continue;case I.PROC_INST_BODY:if(!n.procInstBody&&E(a))continue;"?"===a?n.state=I.PROC_INST_ENDING:n.procInstBody+=a;continue;case I.PROC_INST_ENDING:">"===a?(O(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=I.TEXT):(n.procInstBody+="?"+a,n.state=I.PROC_INST_BODY);continue;case I.OPEN_TAG:w(m,a)?n.tagName+=a:(M(n),">"===a?P(n):"/"===a?n.state=I.OPEN_TAG_SLASH:(E(a)||S(n,"Invalid character in tag name"),n.state=I.ATTRIB));continue;case I.OPEN_TAG_SLASH:">"===a?(P(n,!0),$(n)):(S(n,"Forward-slash in opening tag not followed by >"),n.state=I.ATTRIB);continue;case I.ATTRIB:if(E(a))continue;">"===a?P(n):"/"===a?n.state=I.OPEN_TAG_SLASH:w(p,a)?(n.attribName=a,n.attribValue="",n.state=I.ATTRIB_NAME):S(n,"Invalid attribute name");continue;case I.ATTRIB_NAME:"="===a?n.state=I.ATTRIB_VALUE:">"===a?(S(n,"Attribute without value"),n.attribValue=n.attribName,k(n),P(n)):E(a)?n.state=I.ATTRIB_NAME_SAW_WHITE:w(m,a)?n.attribName+=a:S(n,"Invalid attribute name");continue;case I.ATTRIB_NAME_SAW_WHITE:if("="===a)n.state=I.ATTRIB_VALUE;else{if(E(a))continue;S(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",O(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",">"===a?P(n):w(p,a)?(n.attribName=a,n.state=I.ATTRIB_NAME):(S(n,"Invalid attribute name"),n.state=I.ATTRIB)}continue;case I.ATTRIB_VALUE:if(E(a))continue;b(a)?(n.q=a,n.state=I.ATTRIB_VALUE_QUOTED):(n.opt.unquotedAttributeValues||L(n,"Unquoted attribute value"),n.state=I.ATTRIB_VALUE_UNQUOTED,n.attribValue=a);continue;case I.ATTRIB_VALUE_QUOTED:if(a!==n.q){"&"===a?n.state=I.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=a;continue}k(n),n.q="",n.state=I.ATTRIB_VALUE_CLOSED;continue;case I.ATTRIB_VALUE_CLOSED:E(a)?n.state=I.ATTRIB:">"===a?P(n):"/"===a?n.state=I.OPEN_TAG_SLASH:w(p,a)?(S(n,"No whitespace between attributes"),n.attribName=a,n.attribValue="",n.state=I.ATTRIB_NAME):S(n,"Invalid attribute name");continue;case I.ATTRIB_VALUE_UNQUOTED:if(!y(a)){"&"===a?n.state=I.ATTRIB_VALUE_ENTITY_U:n.attribValue+=a;continue}k(n),">"===a?P(n):n.state=I.ATTRIB;continue;case I.CLOSE_TAG:if(n.tagName)">"===a?$(n):w(m,a)?n.tagName+=a:n.script?(n.script+="</"+n.tagName,n.tagName="",n.state=I.SCRIPT):(E(a)||S(n,"Invalid tagname in closing tag"),n.state=I.CLOSE_TAG_SAW_WHITE);else{if(E(a))continue;A(p,a)?n.script?(n.script+="</"+a,n.state=I.SCRIPT):S(n,"Invalid tagname in closing tag."):n.tagName=a}continue;case I.CLOSE_TAG_SAW_WHITE:if(E(a))continue;">"===a?$(n):S(n,"Invalid characters in closing tag");continue;case I.TEXT_ENTITY:case I.ATTRIB_VALUE_ENTITY_Q:case I.ATTRIB_VALUE_ENTITY_U:var u,d;switch(n.state){case I.TEXT_ENTITY:u=I.TEXT,d="textNode";break;case I.ATTRIB_VALUE_ENTITY_Q:u=I.ATTRIB_VALUE_QUOTED,d="attribValue";break;case I.ATTRIB_VALUE_ENTITY_U:u=I.ATTRIB_VALUE_UNQUOTED,d="attribValue"}if(";"===a){var h=B(n);n.opt.unparsedEntities&&!Object.values(t.XML_ENTITIES).includes(h)?(n.entity="",n.state=u,n.write(h)):(n[d]+=h,n.entity="",n.state=u)}else w(n.entity.length?f:g,a)?n.entity+=a:(S(n,"Invalid character in entity name"),n[d]+="&"+n.entity+a,n.entity="",n.state=u);continue;default:throw new Error(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&function(e){for(var n=Math.max(t.MAX_BUFFER_LENGTH,10),i=0,a=0,o=r.length;a<o;a++){var s=e[r[a]].length;if(s>n)switch(r[a]){case"textNode":x(e);break;case"cdata":O(e,"oncdata",e.cdata),e.cdata="";break;case"script":O(e,"onscript",e.script),e.script="";break;default:L(e,"Max buffer length exceeded: "+r[a])}i=Math.max(i,s)}var l=t.MAX_BUFFER_LENGTH-i;e.bufferCheckPosition=l+e.position}(n),n},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var t;x(t=this),""!==t.cdata&&(O(t,"oncdata",t.cdata),t.cdata=""),""!==t.script&&(O(t,"onscript",t.script),t.script="")}};try{e=require("stream").Stream}catch(t){e=function(){}}e||(e=function(){});var i=t.EVENTS.filter((function(t){return"error"!==t&&"end"!==t}));function o(t,r){if(!(this instanceof o))return new o(t,r);e.apply(this),this._parser=new n(t,r),this.writable=!0,this.readable=!0;var a=this;this._parser.onend=function(){a.emit("end")},this._parser.onerror=function(t){a.emit("error",t),a._parser.error=null},this._decoder=null,i.forEach((function(t){Object.defineProperty(a,"on"+t,{get:function(){return a._parser["on"+t]},set:function(e){if(!e)return a.removeAllListeners(t),a._parser["on"+t]=e,e;a.on(t,e)},enumerable:!0,configurable:!1})}))}o.prototype=Object.create(e.prototype,{constructor:{value:o}}),o.prototype.write=function(t){if("function"==typeof c&&"function"==typeof c.isBuffer&&c.isBuffer(t)){if(!this._decoder){var e=a.I;this._decoder=new e("utf8")}t=this._decoder.write(t)}return this._parser.write(t.toString()),this.emit("data",t),!0},o.prototype.end=function(t){return t&&t.length&&this.write(t),this._parser.end(),!0},o.prototype.on=function(t,r){var n=this;return n._parser["on"+t]||-1===i.indexOf(t)||(n._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),n.emit.apply(n,e)}),e.prototype.on.call(n,t,r)};var s="[CDATA[",l="DOCTYPE",u="http://www.w3.org/XML/1998/namespace",d="http://www.w3.org/2000/xmlns/",h={xml:u,xmlns:d},p=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,m=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,g=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,f=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function E(t){return" "===t||"\n"===t||"\r"===t||"\t"===t}function b(t){return'"'===t||"'"===t}function y(t){return">"===t||E(t)}function w(t,e){return t.test(e)}function A(t,e){return!w(t,e)}var v,T,N,I=0;for(var _ in t.STATE={BEGIN:I++,BEGIN_WHITESPACE:I++,TEXT:I++,TEXT_ENTITY:I++,OPEN_WAKA:I++,SGML_DECL:I++,SGML_DECL_QUOTED:I++,DOCTYPE:I++,DOCTYPE_QUOTED:I++,DOCTYPE_DTD:I++,DOCTYPE_DTD_QUOTED:I++,COMMENT_STARTING:I++,COMMENT:I++,COMMENT_ENDING:I++,COMMENT_ENDED:I++,CDATA:I++,CDATA_ENDING:I++,CDATA_ENDING_2:I++,PROC_INST:I++,PROC_INST_BODY:I++,PROC_INST_ENDING:I++,OPEN_TAG:I++,OPEN_TAG_SLASH:I++,ATTRIB:I++,ATTRIB_NAME:I++,ATTRIB_NAME_SAW_WHITE:I++,ATTRIB_VALUE:I++,ATTRIB_VALUE_QUOTED:I++,ATTRIB_VALUE_CLOSED:I++,ATTRIB_VALUE_UNQUOTED:I++,ATTRIB_VALUE_ENTITY_Q:I++,ATTRIB_VALUE_ENTITY_U:I++,CLOSE_TAG:I++,CLOSE_TAG_SAW_WHITE:I++,SCRIPT:I++,SCRIPT_ENDING:I++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach((function(e){var r=t.ENTITIES[e],n="number"==typeof r?String.fromCharCode(r):r;t.ENTITIES[e]=n})),t.STATE)t.STATE[t.STATE[_]]=_;function C(t,e,r){t[e]&&t[e](r)}function O(t,e,r){t.textNode&&x(t),C(t,e,r)}function x(t){t.textNode=R(t.opt,t.textNode),t.textNode&&C(t,"ontext",t.textNode),t.textNode=""}function R(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function L(t,e){return x(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=new Error(e),t.error=e,C(t,"onerror",e),t}function D(t){return t.sawRoot&&!t.closedRoot&&S(t,"Unclosed root tag"),t.state!==I.BEGIN&&t.state!==I.BEGIN_WHITESPACE&&t.state!==I.TEXT&&L(t,"Unexpected end"),x(t),t.c="",t.closed=!0,C(t,"onend"),n.call(t,t.strict,t.opt),t}function S(t,e){if("object"!=typeof t||!(t instanceof n))throw new Error("bad call to strictFail");t.strict&&L(t,e)}function M(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,r=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(r.ns=e.ns),t.attribList.length=0,O(t,"onopentagstart",r)}function F(t,e){var r=t.indexOf(":")<0?["",t]:t.split(":"),n=r[0],i=r[1];return e&&"xmlns"===t&&(n="xmlns",i=""),{prefix:n,local:i}}function k(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))t.attribName=t.attribValue="";else{if(t.opt.xmlns){var e=F(t.attribName,!0),r=e.prefix,n=e.local;if("xmlns"===r)if("xml"===n&&t.attribValue!==u)S(t,"xml: prefix must be bound to "+u+"\nActual: "+t.attribValue);else if("xmlns"===n&&t.attribValue!==d)S(t,"xmlns: prefix must be bound to "+d+"\nActual: "+t.attribValue);else{var i=t.tag,a=t.tags[t.tags.length-1]||t;i.ns===a.ns&&(i.ns=Object.create(a.ns)),i.ns[n]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,O(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}}function P(t,e){if(t.opt.xmlns){var r=t.tag,n=F(t.tagName);r.prefix=n.prefix,r.local=n.local,r.uri=r.ns[n.prefix]||"",r.prefix&&!r.uri&&(S(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),r.uri=n.prefix);var i=t.tags[t.tags.length-1]||t;r.ns&&i.ns!==r.ns&&Object.keys(r.ns).forEach((function(e){O(t,"onopennamespace",{prefix:e,uri:r.ns[e]})}));for(var a=0,o=t.attribList.length;a<o;a++){var s=t.attribList[a],l=s[0],c=s[1],u=F(l,!0),d=u.prefix,h=u.local,p=""===d?"":r.ns[d]||"",m={name:l,value:c,prefix:d,local:h,uri:p};d&&"xmlns"!==d&&!p&&(S(t,"Unbound namespace prefix: "+JSON.stringify(d)),m.uri=d),t.tag.attributes[l]=m,O(t,"onattribute",m)}t.attribList.length=0}t.tag.isSelfClosing=!!e,t.sawRoot=!0,t.tags.push(t.tag),O(t,"onopentag",t.tag),e||(t.noscript||"script"!==t.tagName.toLowerCase()?t.state=I.TEXT:t.state=I.SCRIPT,t.tag=null,t.tagName=""),t.attribName=t.attribValue="",t.attribList.length=0}function $(t){if(!t.tagName)return S(t,"Weird empty close tag."),t.textNode+="</>",void(t.state=I.TEXT);if(t.script){if("script"!==t.tagName)return t.script+="</"+t.tagName+">",t.tagName="",void(t.state=I.SCRIPT);O(t,"onscript",t.script),t.script=""}var e=t.tags.length,r=t.tagName;t.strict||(r=r[t.looseCase]());for(var n=r;e--&&t.tags[e].name!==n;)S(t,"Unexpected close tag");if(e<0)return S(t,"Unmatched closing tag: "+t.tagName),t.textNode+="</"+t.tagName+">",void(t.state=I.TEXT);t.tagName=r;for(var i=t.tags.length;i-- >e;){var a=t.tag=t.tags.pop();t.tagName=t.tag.name,O(t,"onclosetag",t.tagName);var o={};for(var s in a.ns)o[s]=a.ns[s];var l=t.tags[t.tags.length-1]||t;t.opt.xmlns&&a.ns!==l.ns&&Object.keys(a.ns).forEach((function(e){var r=a.ns[e];O(t,"onclosenamespace",{prefix:e,uri:r})}))}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=I.TEXT}function B(t){var e,r=t.entity,n=r.toLowerCase(),i="";return t.ENTITIES[r]?t.ENTITIES[r]:t.ENTITIES[n]?t.ENTITIES[n]:("#"===(r=n).charAt(0)&&("x"===r.charAt(1)?(r=r.slice(2),i=(e=parseInt(r,16)).toString(16)):(r=r.slice(1),i=(e=parseInt(r,10)).toString(10))),r=r.replace(/^0+/,""),isNaN(e)||i.toLowerCase()!==r?(S(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCodePoint(e))}function U(t,e){"<"===e?(t.state=I.OPEN_WAKA,t.startTagPosition=t.position):E(e)||(S(t,"Non-whitespace before first tag."),t.textNode=e,t.state=I.TEXT)}function G(t,e){var r="";return e<t.length&&(r=t.charAt(e)),r}I=t.STATE,String.fromCodePoint||(v=String.fromCharCode,T=Math.floor,N=function(){var t,e,r=[],n=-1,i=arguments.length;if(!i)return"";for(var a="";++n<i;){var o=Number(arguments[n]);if(!isFinite(o)||o<0||o>1114111||T(o)!==o)throw RangeError("Invalid code point: "+o);o<=65535?r.push(o):(t=55296+((o-=65536)>>10),e=o%1024+56320,r.push(t,e)),(n+1===i||r.length>16384)&&(a+=v.apply(null,r),r.length=0)}return a},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:N,configurable:!0,writable:!0}):String.fromCodePoint=N)}(U)),U)),j={"http://www.w3.org/2000/svg":{ext:"svg",mime:"image/svg+xml"},"http://www.w3.org/1999/xhtml":{ext:"xhtml",mime:"application/xhtml+xml"},"http://www.opengis.net/kml/2.2":{ext:"kml",mime:"application/vnd.google-earth.kml+xml"},"http://www.opengis.net/gml":{ext:"gml",mime:"application/gml+xml"}},V={rss:{ext:"rss",mime:"application/rss+xml"},"score-partwise":{ext:"musicxml",mime:"application/vnd.recordare.musicxml+xml"},svg:{ext:"svg",mime:"image/svg+xml"}};class X{constructor(t){this.options=t??{},this.firstTag=!0,this.onEnd=!1,this.parser=G.parser(!0,{xmlns:!0}),this.nesting=0,this.parser.onerror=t=>{t.message.startsWith("Invalid character entity")||(this.fileType=void 0,this.onEnd=!0)},this.parser.onopentag=t=>{++this.nesting,this.firstTag&&!this.onEnd&&(this.firstTag=!1,t.uri?this.fileType=j[t.uri]:t.name&&(this.fileType=V[t.name.toLowerCase()]),this.fileType&&!this.options.fullScan&&(this.onEnd=!0))},this.parser.onclosetag=()=>{--this.nesting}}write(t){this.parser.write(t)}close(){this.parser.close(),this.onEnd=!0}isValid(){return 0===this.nesting}}class q{_view;constructor(t){Y(t),this._view=t}get id(){return this._view.id}get name(){return this._view.name}get caption(){return this._view.caption}get emptyTitle(){return this._view.emptyTitle}get emptyCaption(){return this._view.emptyCaption}get getContents(){return this._view.getContents}get hidden(){return this._view.hidden}get icon(){return this._view.icon}set icon(t){this._view.icon=t}get order(){return this._view.order}set order(t){this._view.order=t}get params(){return this._view.params}set params(t){this._view.params=t}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(t){this._view.expanded=t}get defaultSortKey(){return this._view.defaultSortKey}get loadChildViews(){return this._view.loadChildViews}}const Y=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("View id is required and must be a string");if(!t.name||"string"!=typeof t.name)throw new Error("View name is required and must be a string");if("caption"in t&&"string"!=typeof t.caption)throw new Error("View caption must be a string");if(!t.getContents||"function"!=typeof t.getContents)throw new Error("View getContents is required and must be a function");if("hidden"in t&&"boolean"!=typeof t.hidden)throw new Error("View hidden must be a boolean");if(!t.icon||"string"!=typeof t.icon||!function(t){if("string"!=typeof t)throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);if(0===(t=t.trim()).length)return!1;const e=new X;return e.write(t),e.isValid()&&"svg"===e.fileType?.ext}(t.icon))throw new Error("View icon is required and must be a valid svg string");if("order"in t&&"number"!=typeof t.order)throw new Error("View order must be a number");if(t.columns&&t.columns.forEach((t=>{if(!(t instanceof P))throw new Error("View columns must be an array of Column. Invalid column found")})),t.emptyView&&"function"!=typeof t.emptyView)throw new Error("View emptyView must be a function");if(t.parent&&"string"!=typeof t.parent)throw new Error("View parent must be a string");if("sticky"in t&&"boolean"!=typeof t.sticky)throw new Error("View sticky must be a boolean");if("expanded"in t&&"boolean"!=typeof t.expanded)throw new Error("View expanded must be a boolean");if(t.defaultSortKey&&"string"!=typeof t.defaultSortKey)throw new Error("View defaultSortKey must be a string");if(t.loadChildViews&&"function"!=typeof t.loadChildViews)throw new Error("View loadChildViews must be a function");return!0};var H=(t=>(t.ReservedName="reserved name",t.Character="character",t.Extension="extension",t))(H||{});class z extends Error{constructor(t){super(`Invalid ${t.reason} '${t.segment}' in filename '${t.filename}'`,{cause:t})}get filename(){return this.cause.filename}get reason(){return this.cause.reason}get segment(){return this.cause.segment}}function W(t){const e=(0,o.F)().files,r=e.forbidden_filename_characters??window._oc_config?.forbidden_filenames_characters??["/","\\"];for(const e of r)if(t.includes(e))throw new z({segment:e,reason:"character",filename:t});if(t=t.toLocaleLowerCase(),(e.forbidden_filenames??[".htaccess"]).includes(t))throw new z({filename:t,segment:t,reason:"reserved name"});const n=t.indexOf(".",1),i=t.substring(0,-1===n?void 0:n);if((e.forbidden_filename_basenames??[]).includes(i))throw new z({filename:t,segment:i,reason:"reserved name"});const a=e.forbidden_filename_extensions??[".part",".filepart"];for(const e of a)if(t.length>e.length&&t.endsWith(e))throw new z({segment:e,reason:"extension",filename:t})}const Q=["B","KB","MB","GB","TB","PB"],K=["B","KiB","MiB","GiB","TiB","PiB"];function Z(t,e=!1,r=!1,n=!1){r=r&&!n,"string"==typeof t&&(t=Number(t));let i=t>0?Math.floor(Math.log(t)/Math.log(n?1e3:1024)):0;i=Math.min((r?K.length:Q.length)-1,i);const a=r?K[i]:Q[i];let o=(t/Math.pow(n?1e3:1024,i)).toFixed(1);return!0===e&&0===i?("0.0"!==o?"< 1 ":"0 ")+(r?K[1]:Q[1]):(o=i<2?parseFloat(o).toFixed(0):parseFloat(o).toLocaleString((0,s.lO)()),o+" "+a)}function J(t){return t instanceof Date?t.toISOString():String(t)}function tt(t,e={}){const r={sortingMode:"basename",sortingOrder:"asc",...e};return function(t,e,r){r=r??[];const n=(e=e??[t=>t]).map(((t,e)=>"asc"===(r[e]??"asc")?1:-1)),i=Intl.Collator([(0,s.Z0)(),(0,s.lO)()],{numeric:!0,usage:"sort"});return[...t].sort(((t,r)=>{for(const[a,o]of e.entries()){const e=i.compare(J(o(t)),J(o(r)));if(0!==e)return e*n[a]}return 0}))}(t,[...r.sortFavoritesFirst?[t=>1!==t.attributes?.favorite]:[],...r.sortFoldersFirst?[t=>"folder"!==t.type]:[],..."basename"!==r.sortingMode?[t=>t[r.sortingMode]??t.attributes[r.sortingMode]]:[],t=>{return(e=t.displayname||t.attributes?.displayname||t.basename||"").lastIndexOf(".")>0?e.slice(0,e.lastIndexOf(".")):e;var e},t=>t.basename],[...r.sortFavoritesFirst?["asc"]:[],...r.sortFoldersFirst?["asc"]:[],..."mtime"===r.sortingMode?["asc"===r.sortingOrder?"desc":"asc"]:[],..."mtime"!==r.sortingMode&&"basename"!==r.sortingMode?[r.sortingOrder]:[],r.sortingOrder,r.sortingOrder])}},42634:()=>{},45218:(t,e,r)=>{"use strict";var n=r(35810),i=r(94205),a=r(85471),o=r(82680),s=r(85168),l=r(53334);const c='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-tag-multiple-outline" viewBox="0 0 24 24"><path d="M6.5 10C7.3 10 8 9.3 8 8.5S7.3 7 6.5 7 5 7.7 5 8.5 5.7 10 6.5 10M9 6L16 13L11 18L4 11V6H9M9 4H4C2.9 4 2 4.9 2 6V11C2 11.6 2.2 12.1 2.6 12.4L9.6 19.4C9.9 19.8 10.4 20 11 20S12.1 19.8 12.4 19.4L17.4 14.4C17.8 14 18 13.5 18 13C18 12.4 17.8 11.9 17.4 11.6L10.4 4.6C10.1 4.2 9.6 4 9 4M13.5 5.7L14.5 4.7L21.4 11.6C21.8 12 22 12.5 22 13S21.8 14.1 21.4 14.4L16 19.8L15 18.8L20.7 13L13.5 5.7Z" /></svg>';async function u(t){const e=await new Promise((e=>{(0,s.Ss)((0,a.$V)((()=>Promise.all([r.e(4208),r.e(2474)]).then(r.bind(r,52474)))),{nodes:t},(t=>{e(t)}))}));return Array(t.length).fill(e)}const d=new n.hY({id:"systemtags:bulk",displayName:()=>(0,l.t)("systemtags","Manage tags"),iconSvgInline:()=>c,enabled:t=>!(0,o.f)()&&0!==t.length&&!t.some((t=>!t.isDavResource))&&!t.some((t=>!(t.permissions&n.aX.UPDATE))),exec:async t=>u([t])[0],execBatch:u});var h=r(65899),p=r(61338);const m=(0,r(35947).YK)().setApp("files").detectUser().build(),g=(0,h.nY)("active",(()=>{const t=(0,a.KR)(),e=(0,a.KR)(),r=(0,a.KR)(),i=(0,a.KR)();function o(t){r.value&&r.value.source===t.source&&(r.value=void 0)}function s(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;m.debug("Setting active view",{view:t}),i.value=t??void 0,r.value=void 0}return function(){const t=(0,n.bh)();(0,p.B1)("files:node:deleted",o),s(t.active),t.addEventListener("updateActive",(t=>{s(t.detail)}))}(),{activeAction:t,activeFolder:e,activeNode:r,activeView:i}}));var f=r(25631),E=r(21777),b=r(82528);const y="/systemtags",w=(0,n.H4)(),A=t=>(0,n.Al)(t),v=t=>`<?xml version="1.0"?>\n<oc:filter-files ${(0,n.CP)()}>\n\t<d:prop>\n\t\t${(0,n.VX)()}\n\t</d:prop>\n\t<oc:filter-rules>\n\t\t<oc:systemtag>${t}</oc:systemtag>\n\t</oc:filter-rules>\n</oc:filter-files>`,T=function(t){return new n.vd({id:t.id,source:`${n.PY}${y}/${t.id}`,owner:String((0,E.HW)()?.uid??"anonymous"),root:y,displayname:t.displayName,permissions:n.aX.READ,attributes:{...t,"is-tag":!0}})},N="tags";var I=r(85072),_=r.n(I),C=r(97825),O=r.n(C),x=r(77659),R=r.n(x),L=r(55056),D=r.n(L),S=r(10540),M=r.n(S),F=r(41113),k=r.n(F),P=r(73911),$={};$.styleTagTransform=k(),$.setAttributes=D(),$.insert=R().bind(null,"head"),$.domAPI=O(),$.insertStyleElement=M(),_()(P.A,$),P.A&&P.A.locals&&P.A.locals;var B=r(57599),U=r(12686);const G=[],j=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=document.createElement("li");r.classList.add("files-list__system-tag"),r.setAttribute("data-systemtag-name",t),r.textContent=t;const n=G.find((e=>e.displayName===t));if(n?.color){const t=getComputedStyle(document.body).getPropertyValue("--color-main-background").replace("#","")||((0,B.j2)()?"000000":"ffffff"),e=(0,B.W7)(`#${n.color}`,`#${t}`);r.style.setProperty("--systemtag-color",e),r.setAttribute("data-systemtag-color","true")}return e&&r.classList.add("files-list__system-tag--more"),r},V=async function(t){const e=(0,U.rA)(t),r=document.createElement("ul");if(r.classList.add("files-list__system-tags"),r.setAttribute("aria-label",(0,l.t)("files","Assigned collaborative tags")),r.setAttribute("data-systemtags-fileid",t.fileid?.toString()||""),0===e.length)return r;if(0===G.length)try{G.push(...await(0,b.un)())}catch(t){f.A.error("Failed to fetch tags",{error:t})}if(r.append(j(e[0])),2===e.length)r.append(j(e[1]));else if(e.length>1){const t=j("+"+(e.length-1),!0);t.setAttribute("title",e.slice(1).join(", ")),t.setAttribute("aria-hidden","true"),t.setAttribute("role","presentation"),r.append(t);for(const t of e.slice(1)){const e=j(t);e.classList.add("hidden-visually"),r.append(e)}}return r},X=new n.hY({id:"system-tags",displayName:()=>"",iconSvgInline:()=>"",enabled:t=>1===t.length,exec:async()=>null,renderInline:V,order:0});(0,p.B1)("systemtags:node:updated",(function(t){V(t).then((e=>{document.querySelectorAll(`[data-systemtags-fileid="${t.fileid}"]`).forEach((t=>{t.replaceWith(e)}))}))})),(0,p.B1)("systemtags:tag:created",(function(t){G.push(t)})),(0,p.B1)("systemtags:tag:deleted",(function(t){G.splice(G.findIndex((e=>e.id===t.id)),1)})),(0,p.B1)("systemtags:tag:updated",(function(t){const e=G.findIndex((e=>e.id===t.id));-1!==e&&(G[e]=t),function(t){document.querySelectorAll(`[data-systemtag-name="${t.displayName}"]`).forEach((e=>{e.style.setProperty("--systemtag-color",`#${t.color}`)}))}(t)}));const q=new n.hY({id:"systemtags:open-in-files",displayName:()=>(0,l.t)("systemtags","Open in Files"),iconSvgInline:()=>"",enabled:(t,e)=>e.id===N&&1===t.length&&!0!==t[0].attributes["is-tag"]&&t[0].type===n.pt.Folder,async exec(t){let e=t.dirname;return t.type===n.pt.Folder&&(e=t.path),window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:String(t.fileid)},{dir:e,openfile:"true"}),null},order:-1e3,default:n.m9.HIDDEN});(0,n.Yc)("nc:system-tags"),(0,n.Gg)(d),(0,n.Gg)(X),(0,n.Gg)(q),(0,n.bh)().register(new n.Ss({id:N,name:(0,l.Tl)("systemtags","Tags"),caption:(0,l.Tl)("systemtags","List of tags and their associated files and folders."),emptyTitle:(0,l.Tl)("systemtags","No tags found"),emptyCaption:(0,l.Tl)("systemtags","Tags you have created will show up here."),icon:c,order:25,getContents:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const e=(await(0,b.un)()).filter((t=>t.userVisible));if("/"===t)return{folder:new n.vd({id:0,source:`${n.PY}${y}`,owner:(0,E.HW)()?.uid,root:y,permissions:n.aX.NONE}),contents:e.map(T)};const r=parseInt(t.split("/",2)[1]),i=e.find((t=>t.id===r));if(!i)throw new Error("Tag not found");return{folder:T(i),contents:(await w.getDirectoryContents(n.lJ,{details:!0,data:v(r),headers:{method:"REPORT"}})).data.map(A)}}})),document.addEventListener("DOMContentLoaded",(()=>{(0,i.C)("t",(()=>(async t=>{const e=g((window._nc_files_pinia||(window._nc_files_pinia=(0,h.Ey)()),window._nc_files_pinia)),r=window?.OCP?.Files?.Router?.query?.dir||"/",i=e.activeNode,o=e.activeView;if(!i||!o)return void m.error("No active node or view",{node:i,view:o});if(i.status===n.zI.LOADING)return void m.debug("Node is already loading",{node:i});if(!t.enabled([i],o))return void m.debug("Action is not not available for the current context",{action:t,node:i,view:o});let c=t.id;try{c=t.displayName([i],o)}catch(e){m.error("Error while getting action display name",{action:t,error:e})}try{a.Ay.set(i,"status",n.zI.LOADING),e.activeAction=t;const u=await t.exec(i,o,r);if(null==u)return;if(u)return void(0,s.Te)((0,l.t)("files",'"{displayName}" action executed successfully',{displayName:c}));(0,s.Qg)((0,l.t)("files",'"{displayName}" action failed',{displayName:c}))}catch(e){m.error("Error while executing action",{action:t,error:e}),(0,s.Qg)((0,l.t)("files",'"{displayName}" action failed',{displayName:c}))}finally{a.Ay.set(i,"status",void 0),e.activeAction=void 0}})(d)),{stop:!0,prevent:!0}),f.A.debug("Hotkeys registered")}))},57599:(t,e,r)=>{"use strict";r.d(e,{W7:()=>S,Pj:()=>D,j2:()=>L});const n={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},i=Object.create(null);for(const t in n)Object.hasOwn(n,t)&&(i[n[t]]=t);const a={to:{},get:{}};function o(t,e,r){return Math.min(Math.max(e,t),r)}function s(t){const e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}a.get=function(t){let e,r;switch(t.slice(0,3).toLowerCase()){case"hsl":e=a.get.hsl(t),r="hsl";break;case"hwb":e=a.get.hwb(t),r="hwb";break;default:e=a.get.rgb(t),r="rgb"}return e?{model:r,value:e}:null},a.get.rgb=function(t){if(!t)return null;let e,r,i,a=[0,0,0,1];if(e=t.match(/^#([a-f\d]{6})([a-f\d]{2})?$/i)){for(i=e[2],e=e[1],r=0;r<3;r++){const t=2*r;a[r]=Number.parseInt(e.slice(t,t+2),16)}i&&(a[3]=Number.parseInt(i,16)/255)}else if(e=t.match(/^#([a-f\d]{3,4})$/i)){for(e=e[1],i=e[3],r=0;r<3;r++)a[r]=Number.parseInt(e[r]+e[r],16);i&&(a[3]=Number.parseInt(i+i,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/)){for(r=0;r<3;r++)a[r]=Number.parseInt(e[r+1],10);e[4]&&(a[3]=e[5]?.01*Number.parseFloat(e[4]):Number.parseFloat(e[4]))}else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:Object.hasOwn(n,e[1])?(a=n[e[1]],a[3]=1,a):null:null;for(r=0;r<3;r++)a[r]=Math.round(2.55*Number.parseFloat(e[r+1]));e[4]&&(a[3]=e[5]?.01*Number.parseFloat(e[4]):Number.parseFloat(e[4]))}for(r=0;r<3;r++)a[r]=o(a[r],0,255);return a[3]=o(a[3],0,1),a},a.get.hsl=function(t){if(!t)return null;const e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){const t=Number.parseFloat(e[4]);return[(Number.parseFloat(e[1])%360+360)%360,o(Number.parseFloat(e[2]),0,100),o(Number.parseFloat(e[3]),0,100),o(Number.isNaN(t)?1:t,0,1)]}return null},a.get.hwb=function(t){if(!t)return null;const e=t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d.]+)%\s*,\s*([+-]?[\d.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){const t=Number.parseFloat(e[4]);return[(Number.parseFloat(e[1])%360+360)%360,o(Number.parseFloat(e[2]),0,100),o(Number.parseFloat(e[3]),0,100),o(Number.isNaN(t)?1:t,0,1)]}return null},a.to.hex=function(...t){return"#"+s(t[0])+s(t[1])+s(t[2])+(t[3]<1?s(Math.round(255*t[3])):"")},a.to.rgb=function(...t){return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},a.to.rgb.percent=function(...t){const e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),n=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+r+"%, "+n+"%)":"rgba("+e+"%, "+r+"%, "+n+"%, "+t[3]+")"},a.to.hsl=function(...t){return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},a.to.hwb=function(...t){let e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},a.to.keyword=function(...t){return i[t.slice(0,3)]};const l=a,c={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},u={};for(const t of Object.keys(c))u[c[t]]=t;const d={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},h=d,p=(6/29)**3;for(const t of Object.keys(d)){if(!("channels"in d[t]))throw new Error("missing channels property: "+t);if(!("labels"in d[t]))throw new Error("missing channel labels property: "+t);if(d[t].labels.length!==d[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:r}=d[t];delete d[t].channels,delete d[t].labels,Object.defineProperty(d[t],"channels",{value:e}),Object.defineProperty(d[t],"labels",{value:r})}function m(t,e){return function(r){return e(t(r))}}function g(t,e){const r=[e[t].parent,t];let n=h[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=m(h[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}d.rgb.hsl=function(t){const e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=a-i;let s,l;switch(a){case i:s=0;break;case e:s=(r-n)/o;break;case r:s=2+(n-e)/o;break;case n:s=4+(e-r)/o}s=Math.min(60*s,360),s<0&&(s+=360);const c=(i+a)/2;return l=a===i?0:c<=.5?o/(a+i):o/(2-a-i),[s,100*l,100*c]},d.rgb.hsv=function(t){let e,r,n,i,a;const o=t[0]/255,s=t[1]/255,l=t[2]/255,c=Math.max(o,s,l),u=c-Math.min(o,s,l),d=function(t){return(c-t)/6/u+.5};if(0===u)i=0,a=0;else{switch(a=u/c,e=d(o),r=d(s),n=d(l),c){case o:i=n-r;break;case s:i=1/3+e-n;break;case l:i=2/3+r-e}i<0?i+=1:i>1&&(i-=1)}return[360*i,100*a,100*c]},d.rgb.hwb=function(t){const e=t[0],r=t[1];let n=t[2];const i=d.rgb.hsl(t)[0],a=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,100*a,100*n]},d.rgb.cmyk=function(t){const e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(1-e,1-r,1-n);return[100*((1-e-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*i]},d.rgb.keyword=function(t){const e=u[t];if(e)return e;let r,n=Number.POSITIVE_INFINITY;for(const e of Object.keys(c)){const o=(a=c[e],((i=t)[0]-a[0])**2+(i[1]-a[1])**2+(i[2]-a[2])**2);o<n&&(n=o,r=e)}var i,a;return r},d.keyword.rgb=function(t){return c[t]},d.rgb.xyz=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255;return e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,[100*(.4124564*e+.3575761*r+.1804375*n),100*(.2126729*e+.7151522*r+.072175*n),100*(.0193339*e+.119192*r+.9503041*n)]},d.rgb.lab=function(t){const e=d.rgb.xyz(t);let r=e[0],n=e[1],i=e[2];return r/=95.047,n/=100,i/=108.883,r=r>p?r**(1/3):7.787*r+16/116,n=n>p?n**(1/3):7.787*n+16/116,i=i>p?i**(1/3):7.787*i+16/116,[116*n-16,500*(r-n),200*(n-i)]},d.hsl.rgb=function(t){const e=t[0]/360,r=t[1]/100,n=t[2]/100;let i,a;if(0===r)return a=255*n,[a,a,a];const o=n<.5?n*(1+r):n+r-n*r,s=2*n-o,l=[0,0,0];for(let t=0;t<3;t++)i=e+1/3*-(t-1),i<0&&i++,i>1&&i--,a=6*i<1?s+6*(o-s)*i:2*i<1?o:3*i<2?s+(o-s)*(2/3-i)*6:s,l[t]=255*a;return l},d.hsl.hsv=function(t){const e=t[0];let r=t[1]/100,n=t[2]/100,i=r;const a=Math.max(n,.01);return n*=2,r*=n<=1?n:2-n,i*=a<=1?a:2-a,[e,100*(0===n?2*i/(a+i):2*r/(n+r)),(n+r)/2*100]},d.hsv.rgb=function(t){const e=t[0]/60,r=t[1]/100;let n=t[2]/100;const i=Math.floor(e)%6,a=e-Math.floor(e),o=255*n*(1-r),s=255*n*(1-r*a),l=255*n*(1-r*(1-a));switch(n*=255,i){case 0:return[n,l,o];case 1:return[s,n,o];case 2:return[o,n,l];case 3:return[o,s,n];case 4:return[l,o,n];case 5:return[n,o,s]}},d.hsv.hsl=function(t){const e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01);let a,o;o=(2-r)*n;const s=(2-r)*i;return a=r*i,a/=s<=1?s:2-s,a=a||0,o/=2,[e,100*a,100*o]},d.hwb.rgb=function(t){const e=t[0]/360;let r=t[1]/100,n=t[2]/100;const i=r+n;let a;i>1&&(r/=i,n/=i);const o=Math.floor(6*e),s=1-n;a=6*e-o,1&o&&(a=1-a);const l=r+a*(s-r);let c,u,d;switch(o){default:case 6:case 0:c=s,u=l,d=r;break;case 1:c=l,u=s,d=r;break;case 2:c=r,u=s,d=l;break;case 3:c=r,u=l,d=s;break;case 4:c=l,u=r,d=s;break;case 5:c=s,u=r,d=l}return[255*c,255*u,255*d]},d.cmyk.rgb=function(t){const e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100;return[255*(1-Math.min(1,e*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},d.xyz.rgb=function(t){const e=t[0]/100,r=t[1]/100,n=t[2]/100;let i,a,o;return i=3.2404542*e+-1.5371385*r+-.4985314*n,a=-.969266*e+1.8760108*r+.041556*n,o=.0556434*e+-.2040259*r+1.0572252*n,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[255*i,255*a,255*o]},d.xyz.lab=function(t){let e=t[0],r=t[1],n=t[2];return e/=95.047,r/=100,n/=108.883,e=e>p?e**(1/3):7.787*e+16/116,r=r>p?r**(1/3):7.787*r+16/116,n=n>p?n**(1/3):7.787*n+16/116,[116*r-16,500*(e-r),200*(r-n)]},d.lab.xyz=function(t){let e,r,n;r=(t[0]+16)/116,e=t[1]/500+r,n=r-t[2]/200;const i=r**3,a=e**3,o=n**3;return r=i>p?i:(r-16/116)/7.787,e=a>p?a:(e-16/116)/7.787,n=o>p?o:(n-16/116)/7.787,e*=95.047,r*=100,n*=108.883,[e,r,n]},d.lab.lch=function(t){const e=t[0],r=t[1],n=t[2];let i;return i=360*Math.atan2(n,r)/2/Math.PI,i<0&&(i+=360),[e,Math.sqrt(r*r+n*n),i]},d.lch.lab=function(t){const e=t[0],r=t[1],n=t[2]/360*2*Math.PI;return[e,r*Math.cos(n),r*Math.sin(n)]},d.rgb.ansi16=function(t,e=null){const[r,n,i]=t;let a=null===e?d.rgb.hsv(t)[2]:e;if(a=Math.round(a/50),0===a)return 30;let o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return 2===a&&(o+=60),o},d.hsv.ansi16=function(t){return d.rgb.ansi16(d.hsv.rgb(t),t[2])},d.rgb.ansi256=function(t){const e=t[0],r=t[1],n=t[2];return e>>4==r>>4&&r>>4==n>>4?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},d.ansi16.rgb=function(t){let e=(t=t[0])%10;if(0===e||7===e)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const r=.5*(Math.trunc(t>50)+1);return[(1&e)*r*255,(e>>1&1)*r*255,(e>>2&1)*r*255]},d.ansi256.rgb=function(t){if((t=t[0])>=232){const e=10*(t-232)+8;return[e,e,e]}let e;return t-=16,[Math.floor(t/36)/5*255,Math.floor((e=t%36)/6)/5*255,e%6/5*255]},d.rgb.hex=function(t){const e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".slice(e.length)+e},d.hex.rgb=function(t){const e=t.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!e)return[0,0,0];let r=e[0];3===e[0].length&&(r=[...r].map((t=>t+t)).join(""));const n=Number.parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},d.rgb.hcg=function(t){const e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),a=Math.min(Math.min(e,r),n),o=i-a;let s;return s=o<=0?0:i===e?(r-n)/o%6:i===r?2+(n-e)/o:4+(e-r)/o,s/=6,s%=1,[360*s,100*o,100*(o<1?a/(1-o):0)]},d.hsl.hcg=function(t){const e=t[1]/100,r=t[2]/100,n=r<.5?2*e*r:2*e*(1-r);let i=0;return n<1&&(i=(r-.5*n)/(1-n)),[t[0],100*n,100*i]},d.hsv.hcg=function(t){const e=t[1]/100,r=t[2]/100,n=e*r;let i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],100*n,100*i]},d.hcg.rgb=function(t){const e=t[0]/360,r=t[1]/100,n=t[2]/100;if(0===r)return[255*n,255*n,255*n];const i=[0,0,0],a=e%1*6,o=a%1,s=1-o;let l=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return l=(1-r)*n,[255*(r*i[0]+l),255*(r*i[1]+l),255*(r*i[2]+l)]},d.hcg.hsv=function(t){const e=t[1]/100,r=e+t[2]/100*(1-e);let n=0;return r>0&&(n=e/r),[t[0],100*n,100*r]},d.hcg.hsl=function(t){const e=t[1]/100,r=t[2]/100*(1-e)+.5*e;let n=0;return r>0&&r<.5?n=e/(2*r):r>=.5&&r<1&&(n=e/(2*(1-r))),[t[0],100*n,100*r]},d.hcg.hwb=function(t){const e=t[1]/100,r=e+t[2]/100*(1-e);return[t[0],100*(r-e),100*(1-r)]},d.hwb.hcg=function(t){const e=t[1]/100,r=1-t[2]/100,n=r-e;let i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],100*n,100*i]},d.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},d.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},d.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},d.gray.hsl=function(t){return[0,0,t[0]]},d.gray.hsv=d.gray.hsl,d.gray.hwb=function(t){return[0,100,t[0]]},d.gray.cmyk=function(t){return[0,0,0,t[0]]},d.gray.lab=function(t){return[t[0],0,0]},d.gray.hex=function(t){const e=255&Math.round(t[0]/100*255),r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".slice(r.length)+r},d.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const f=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(h);for(let{length:r}=e,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}(),r=[t];for(e[t].distance=0;r.length>0;){const t=r.pop(),n=Object.keys(h[t]);for(let{length:i}=n,a=0;a<i;a++){const i=n[a],o=e[i];-1===o.distance&&(o.distance=e[t].distance+1,o.parent=t,r.unshift(i))}}return e}(t),r={},n=Object.keys(e);for(let{length:t}=n,i=0;i<t;i++){const t=n[i];null!==e[t].parent&&(r[t]=g(t,e))}return r},E={},b=Object.keys(h);function y(t){const e=function(...e){const r=e[0];return null==r?r:(r.length>1&&(e=r),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}function w(t){const e=function(...e){const r=e[0];if(null==r)return r;r.length>1&&(e=r);const n=t(e);if("object"==typeof n)for(let{length:t}=n,e=0;e<t;e++)n[e]=Math.round(n[e]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}for(const t of b){E[t]={},Object.defineProperty(E[t],"channels",{value:h[t].channels}),Object.defineProperty(E[t],"labels",{value:h[t].labels});const e=f(t),r=Object.keys(e);for(const n of r){const r=e[n];E[t][n]=w(r),E[t][n].raw=y(r)}}const A=E,v=["keyword","gray","hex"],T={};for(const t of Object.keys(A))T[[...A[t].labels].sort().join("")]=t;const N={};function I(t,e){if(!(this instanceof I))return new I(t,e);if(e&&e in v&&(e=null),e&&!(e in A))throw new Error("Unknown model: "+e);let r,n;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof I)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=l.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,n=A[this.model].channels,this.color=e.value.slice(0,n),this.valpha="number"==typeof e.value[n]?e.value[n]:1}else if(t.length>0){this.model=e||"rgb",n=A[this.model].channels;const r=Array.prototype.slice.call(t,0,n);this.color=x(r,n),this.valpha="number"==typeof t[n]?t[n]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const n=e.sort().join("");if(!(n in T))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=T[n];const{labels:i}=A[this.model],a=[];for(r=0;r<i.length;r++)a.push(t[i[r]]);this.color=x(a)}if(N[this.model])for(n=A[this.model].channels,r=0;r<n;r++){const t=N[this.model][r];t&&(this.color[r]=t(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}I.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in l.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const r=1===e.valpha?e.color:[...e.color,this.valpha];return l.to[e.model](...r)},percentString(t){const e=this.rgb().round("number"==typeof t?t:1),r=1===e.valpha?e.color:[...e.color,this.valpha];return l.to.rgb.percent(...r)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const t={},{channels:e}=A[this.model],{labels:r}=A[this.model];for(let n=0;n<e;n++)t[r[n]]=this.color[n];return 1!==this.valpha&&(t.alpha=this.valpha),t},unitArray(){const t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,1!==this.valpha&&t.push(this.valpha),t},unitObject(){const t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,1!==this.valpha&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new I([...this.color.map(_(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new I([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:C("rgb",0,O(255)),green:C("rgb",1,O(255)),blue:C("rgb",2,O(255)),hue:C(["hsl","hsv","hsl","hwb","hcg"],0,(t=>(t%360+360)%360)),saturationl:C("hsl",1,O(100)),lightness:C("hsl",2,O(100)),saturationv:C("hsv",1,O(100)),value:C("hsv",2,O(100)),chroma:C("hcg",1,O(100)),gray:C("hcg",2,O(100)),white:C("hwb",1,O(100)),wblack:C("hwb",2,O(100)),cyan:C("cmyk",0,O(100)),magenta:C("cmyk",1,O(100)),yellow:C("cmyk",2,O(100)),black:C("cmyk",3,O(100)),x:C("xyz",0,O(95.047)),y:C("xyz",1,O(100)),z:C("xyz",2,O(108.833)),l:C("lab",0,O(100)),a:C("lab",1),b:C("lab",2),keyword(t){return void 0!==t?new I(t):A[this.model].keyword(this.color)},hex(t){return void 0!==t?new I(t):l.to.hex(...this.rgb().round().color)},hexa(t){if(void 0!==t)return new I(t);const e=this.rgb().round().color;let r=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===r.length&&(r="0"+r),l.to.hex(...e)+r},rgbNumber(){const t=this.rgb().color;return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},luminosity(){const t=this.rgb().color,e=[];for(const[r,n]of t.entries()){const t=n/255;e[r]=t<=.04045?t/12.92:((t+.055)/1.055)**2.4}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){const e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level(t){const e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){const t=this.rgb().color;return(2126*t[0]+7152*t[1]+722*t[2])/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){const e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){const e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){const e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){const e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){const t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return I.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const e=this.hsl();let r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const r=t.rgb(),n=this.rgb(),i=void 0===e?.5:e,a=2*i-1,o=r.alpha()-n.alpha(),s=((a*o==-1?a:(a+o)/(1+a*o))+1)/2,l=1-s;return I.rgb(s*r.red()+l*n.red(),s*r.green()+l*n.green(),s*r.blue()+l*n.blue(),r.alpha()*i+n.alpha()*(1-i))}};for(const t of Object.keys(A)){if(v.includes(t))continue;const{channels:e}=A[t];I.prototype[t]=function(...e){return this.model===t?new I(this):e.length>0?new I(e,t):new I([...(r=A[this.model][t].raw(this.color),Array.isArray(r)?r:[r]),this.valpha],t);var r},I[t]=function(...r){let n=r[0];return"number"==typeof n&&(n=x(r,e)),new I(n,t)}}function _(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function C(t,e,r){t=Array.isArray(t)?t:[t];for(const n of t)(N[n]||=[])[e]=r;return t=t[0],function(n){let i;return void 0!==n?(r&&(n=r(n)),i=this[t](),i.color[e]=n,i):(i=this[t]().color[e],r&&(i=r(i)),i)}}function O(t){return function(e){return Math.max(0,Math.min(t,e))}}function x(t,e){for(let r=0;r<e;r++)"number"!=typeof t[r]&&(t[r]=0);return t}const R=I;function L(){const t=window?.matchMedia?.("(prefers-color-scheme: dark)")?.matches,e=document.body.getAttribute("data-themes")?.includes("dark");return e||t||!1}function D(t){return F(t,"#ffffff")<4.5}function S(t,e){const r=function(t){return M(t)>.6}(e),n=(i=e,new R(r?t:"#ffffff").mix(new R(i),.83).hex());var i;let a=F(t,n);const o=function(){const t=window?.matchMedia?.("(forced-colors: active)")?.matches,e=document.body.getAttribute("data-themes")?.includes("highcontrast");return e||t||!1}()?5.6:3.2;let s=0,l=t;const c=(r?-100:100)/255;for(;a<o&&s++<100;){const t=k(l),e=Math.max(0,Math.min(255,t.l+c));l=P({h:t.h,s:t.s,l:e}),a=F(l,n)}return l}function M(t){const e=function(t){return new R(t).rgb().array()}(t).map((t=>(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))),[r,n,i]=e;return.2126*r+.7152*n+.0722*i}function F(t,e){const r=M(t)+.05,n=M(e)+.05;return Math.max(r,n)/Math.min(r,n)}function k(t){const e=new R(t).hsl();return{h:e.color[0],s:e.color[1],l:e.color[2]}}function P(t){return new R(t).hex()}},59169:()=>{},63779:()=>{},73911:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(71354),i=r.n(n),a=r(76314),o=r.n(a)()(i());o.push([t.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:20px;text-align:center}.files-list__system-tag--more{overflow:visible;text-overflow:initial}.files-list__system-tag+.files-list__system-tag{margin-inline-start:5px}.files-list__system-tag[data-systemtag-color]{border-color:var(--systemtag-color);color:var(--systemtag-color);border-width:2px;line-height:18px}@media(min-width: 512px){.files-list__system-tags{display:flex}}","",{version:3,sources:["webpack://./apps/systemtags/src/css/fileEntryInlineSystemTags.scss"],names:[],mappings:"AAKA,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,uBAAA,CAID,8CACC,mCAAA,CACA,4BAAA,CACA,gBAAA,CACA,gBAAA,CAIF,yBACC,yBACC,YAAA,CAAA",sourcesContent:["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\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: 20px; // min-size - 2 * 5px padding - 2 * 1px border\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-inline-start: 5px;\n\t}\n\n\t// With color\n\t&[data-systemtag-color] {\n\t\tborder-color: var(--systemtag-color);\n\t\tcolor: var(--systemtag-color);\n\t\tborder-width: 2px;\n\t\tline-height: 18px; // min-size - 2 * 5px padding - 2 * 2px border\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 s=o},77199:()=>{},82528:(t,e,r)=>{"use strict";r.d(e,{Gw:()=>h,T0:()=>m,VZ:()=>d,b0:()=>p,un:()=>c,xI:()=>u}),r(65043);var n=r(53334),i=r(8828),a=r(12686),o=r(25631),s=r(61338);r(56760);const l='<?xml version="1.0"?>\n<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.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\t<d:getetag />\n\t\t<nc:color />\n\t</d:prop>\n</d:propfind>',c=async()=>{try{const{data:t}=await i.R.getDirectoryContents("/systemtags",{data:l,details:!0,glob:"/systemtags/*"});return(0,a.rL)(t)}catch(t){throw o.A.error((0,n.t)("systemtags","Failed to load tags"),{error:t}),new Error((0,n.t)("systemtags","Failed to load tags"))}},u=async t=>{const e="/systemtags/"+t;try{const{data:t}=await i.R.stat(e,{data:l,details:!0});return(0,a.rL)([t])[0]}catch(t){throw o.A.error((0,n.t)("systemtags","Failed to load tag"),{error:t}),new Error((0,n.t)("systemtags","Failed to load tag"))}},d=async t=>{const e=(0,a._3)(t);try{const{headers:r}=await i.R.customRequest("/systemtags",{method:"POST",data:e}),l=r.get("content-location");if(l)return(0,s.Ic)("systemtags:tag:created",t),(0,a.GX)(l);throw o.A.error((0,n.t)("systemtags",'Missing "Content-Location" header')),new Error((0,n.t)("systemtags",'Missing "Content-Location" header'))}catch(t){if(409===t?.response?.status)throw o.A.error((0,n.t)("systemtags","A tag with the same name already exists"),{error:t}),new Error((0,n.t)("systemtags","A tag with the same name already exists"));throw o.A.error((0,n.t)("systemtags","Failed to create tag"),{error:t}),new Error((0,n.t)("systemtags","Failed to create tag"))}},h=async t=>{const e="/systemtags/"+t.id,r=`<?xml version="1.0"?>\n\t<d:propertyupdate xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">\n\t\t<d:set>\n\t\t\t<d:prop>\n\t\t\t\t<oc:display-name>${t.displayName}</oc:display-name>\n\t\t\t\t<oc:user-visible>${t.userVisible}</oc:user-visible>\n\t\t\t\t<oc:user-assignable>${t.userAssignable}</oc:user-assignable>\n\t\t\t\t<nc:color>${t?.color||null}</nc:color>\n\t\t\t</d:prop>\n\t\t</d:set>\n\t</d:propertyupdate>`;try{await i.R.customRequest(e,{method:"PROPPATCH",data:r}),(0,s.Ic)("systemtags:tag:updated",t)}catch(t){throw o.A.error((0,n.t)("systemtags","Failed to update tag"),{error:t}),new Error((0,n.t)("systemtags","Failed to update tag"))}},p=async function(t,e){const r=`/systemtags/${t.id}/${e}`,n=await i.R.stat(r,{data:'<?xml version="1.0"?>\n\t<d:propfind xmlns:d="DAV:" xmlns:nc="http://nextcloud.org/ns">\n\t\t<d:prop>\n\t\t\t<nc:object-ids />\n\t\t\t<d:getetag />\n\t\t</d:prop>\n\t</d:propfind>',details:!0});return{etag:n?.data?.props?.getetag||'""',objects:Object.values(n?.data?.props?.["object-ids"]||[]).flat()}},m=async function(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const a=`/systemtags/${t.id}/${e}`;let o=`<?xml version="1.0"?>\n\t<d:propertyupdate xmlns:d="DAV:" xmlns:nc="http://nextcloud.org/ns">\n\t\t<d:set>\n\t\t\t<d:prop>\n\t\t\t\t<nc:object-ids>${r.map((t=>{let{id:e,type:r}=t;return`<nc:object-id><nc:id>${e}</nc:id><nc:type>${r}</nc:type></nc:object-id>`})).join("")}</nc:object-ids>\n\t\t\t</d:prop>\n\t\t</d:set>\n\t</d:propertyupdate>`;0===r.length&&(o='<?xml version="1.0"?>\n\t\t<d:propertyupdate xmlns:d="DAV:" xmlns:nc="http://nextcloud.org/ns">\n\t\t\t<d:remove>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<nc:object-ids />\n\t\t\t\t</d:prop>\n\t\t\t</d:remove>\n\t\t</d:propertyupdate>'),await i.R.customRequest(a,{method:"PROPPATCH",data:o,headers:{"if-match":n}})}},86833:()=>{}},i={};function a(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={id:t,loaded:!1,exports:{}};return n[t].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.m=n,t=[],a.O=(e,r,n,i)=>{if(!r){var o=1/0;for(u=0;u<t.length;u++){r=t[u][0],n=t[u][1],i=t[u][2];for(var s=!0,l=0;l<r.length;l++)(!1&i||o>=i)&&Object.keys(a.O).every((t=>a.O[t](r[l])))?r.splice(l--,1):(s=!1,i<o&&(o=i));if(s){t.splice(u--,1);var c=n();void 0!==c&&(e=c)}}return e}i=i||0;for(var u=t.length;u>0&&t[u-1][2]>i;u--)t[u]=t[u-1];t[u]=[r,n,i]},a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var r in e)a.o(e,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},a.f={},a.e=t=>Promise.all(Object.keys(a.f).reduce(((e,r)=>(a.f[r](t,e),e)),[])),a.u=t=>t+"-"+t+".js?v="+{640:"b2fa23a809053c6305c5",2474:"52113c8387a54d3320f2",5771:"a4e2a98efcfb7393c5bd",5810:"e0ecfcd31fb108c51bfd",7432:"1f201e1e5efef3bbb343"}[t],a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),e={},r="nextcloud:",a.l=(t,n,i,o)=>{if(e[t])e[t].push(n);else{var s,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==r+i){s=d;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",r+i),s.src=t),e[t]=[n];var h=(r,n)=>{s.onerror=s.onload=null,clearTimeout(p);var i=e[t];if(delete e[t],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((t=>t(n))),r)return r(n)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),l&&document.head.appendChild(s)}},a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),a.j=2766,(()=>{var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t})(),(()=>{a.b=document.baseURI||self.location.href;var t={2766:0,5810:0};a.f.j=(e,r)=>{var n=a.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise(((r,i)=>n=t[e]=[r,i]));r.push(n[2]=i);var o=a.p+a.u(e),s=new Error;a.l(o,(r=>{if(a.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;s.message="Loading chunk "+e+" failed.\n("+i+": "+o+")",s.name="ChunkLoadError",s.type=i,s.request=o,n[1](s)}}),"chunk-"+e,e)}},a.O.j=e=>0===t[e];var e=(e,r)=>{var n,i,o=r[0],s=r[1],l=r[2],c=0;if(o.some((e=>0!==t[e]))){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);if(l)var u=l(a)}for(e&&e(r);c<o.length;c++)i=o[c],a.o(t,i)&&t[i]&&t[i][0](),t[i]=0;return a.O(u)},r=self.webpackChunknextcloud=self.webpackChunknextcloud||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})(),a.nc=void 0;var o=a.O(void 0,[4208],(()=>a(45218)));o=a.O(o)})();
-//# sourceMappingURL=systemtags-init.js.map?v=6677cdcea7dc8fd4ad14 \ No newline at end of file
+(()=>{var t,e,r,n={8828:(t,e,r)=>{"use strict";r.d(e,{R:()=>s});var n=r(60669),i=r(63814),a=r(21777);const o=(0,i.dC)("dav"),s=(0,n.UU)(o),l=t=>{s.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})};(0,a.zo)(l),l((0,a.do)())},12686:(t,e,r)=>{"use strict";r.d(e,{GX:()=>o,Pq:()=>c,_3:()=>s,rA:()=>l,rL:()=>a});var n=r(71654),i=r(85471);const a=t=>t.map((t=>{let{props:e}=t;return Object.fromEntries(Object.entries(e).map((t=>{let[e,r]=t;return[(0,n.A)(e),"displayName"===(0,n.A)(e)?String(r):r]})))})),o=t=>{const e=t.indexOf("?");e>0&&(t=t.substring(0,e));const r=t.split("/");let n;do{n=r[r.length-1],r.pop()}while(!n&&r.length>0);return Number(n)},s=t=>{if("name"in t&&!("displayName"in t))return{...t};const e={...t};return e.name=e.displayName,delete e.displayName,e},l=function(t){const e=t.attributes?.["system-tags"]?.["system-tag"];return void 0===e?[]:[e].flat().map((t=>"string"==typeof t?t:t.text))},c=function(t,e){i.Ay.set(t.attributes,"system-tags",{"system-tag":e})}},25631:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=(0,r(35947).YK)().setApp("systemtags").detectUser().build()},35810:(t,e,r)=>{"use strict";r.d(e,{Al:()=>n.r,CP:()=>n.k,Gg:()=>h,H4:()=>n.c,KT:()=>W,PY:()=>n.b,Q$:()=>n.e,R3:()=>n.n,Ss:()=>q,VL:()=>n.l,VX:()=>n.j,Yc:()=>n.i,aX:()=>n.P,bh:()=>k,di:()=>z,hY:()=>d,lJ:()=>n.d,m9:()=>u,nF:()=>H,pt:()=>n.F,ur:()=>tt,v7:()=>Z,vd:()=>n.s,zI:()=>n.t});var n=r(68896),i=r(380),a=r(83141),o=r(87485),s=(r(43627),r(53334)),l=r(65606),c=r(62045).hp,u=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(u||{});class d{_action;constructor(t){this.validateAction(t),this._action=t}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get hotkey(){return this._action.hotkey}get order(){return this._action.order}get parent(){return this._action.parent}get default(){return this._action.default}get destructive(){return this._action.destructive}get inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(t){if(!t.id||"string"!=typeof t.id)throw new Error("Invalid id");if(!t.displayName||"function"!=typeof t.displayName)throw new Error("Invalid displayName function");if("title"in t&&"function"!=typeof t.title)throw new Error("Invalid title function");if(!t.iconSvgInline||"function"!=typeof t.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!t.exec||"function"!=typeof t.exec)throw new Error("Invalid exec function");if("enabled"in t&&"function"!=typeof t.enabled)throw new Error("Invalid enabled function");if("execBatch"in t&&"function"!=typeof t.execBatch)throw new Error("Invalid execBatch function");if("order"in t&&"number"!=typeof t.order)throw new Error("Invalid order");if(void 0!==t.destructive&&"boolean"!=typeof t.destructive)throw new Error("Invalid destructive flag");if("parent"in t&&"string"!=typeof t.parent)throw new Error("Invalid parent");if(t.default&&!Object.values(u).includes(t.default))throw new Error("Invalid default");if("inline"in t&&"function"!=typeof t.inline)throw new Error("Invalid inline function");if("renderInline"in t&&"function"!=typeof t.renderInline)throw new Error("Invalid renderInline function");if("hotkey"in t&&void 0!==t.hotkey){if("object"!=typeof t.hotkey)throw new Error("Invalid hotkey configuration");if("string"!=typeof t.hotkey.key||!t.hotkey.key)throw new Error("Missing or invalid hotkey key");if("string"!=typeof t.hotkey.description||!t.hotkey.description)throw new Error("Missing or invalid hotkey description")}}}const h=function(t){void 0===window._nc_fileactions&&(window._nc_fileactions=[],n.o.debug("FileActions initialized")),window._nc_fileactions.find((e=>e.id===t.id))?n.o.error(`FileAction ${t.id} already registered`,{action:t}):window._nc_fileactions.push(t)};function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var m,g,f,E;function b(){if(g)return m;g=1;const t="object"==typeof l&&l.env&&l.env.NODE_DEBUG&&/\bsemver\b/i.test(l.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};return m=t}function y(){if(E)return f;E=1;const t=Number.MAX_SAFE_INTEGER||9007199254740991;return f={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}var w,A,v,T,N,I,_,C,O,x,R,L,D,S={exports:{}};function M(){if(_)return I;_=1;const t=b(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:r}=y(),{safeRe:n,t:i}=(w||(w=1,function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=y(),a=b(),o=(e=t.exports={}).re=[],s=e.safeRe=[],l=e.src=[],c=e.t={};let u=0;const d="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",i],[d,n]],p=(t,e,r)=>{const n=(t=>{for(const[e,r]of h)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t})(e),i=u++;a(t,i,e),c[t]=i,l[i]=e,o[i]=new RegExp(e,r?"g":void 0),s[i]=new RegExp(n,r?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),p("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[c.NUMERICIDENTIFIER]}|${l[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NUMERICIDENTIFIERLOOSE]}|${l[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${d}+`),p("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),p("FULL",`^${l[c.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),p("LOOSE",`^${l[c.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),p("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),p("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[c.COERCE],!0),p("COERCERTLFULL",l[c.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",p("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",p("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(S,S.exports)),S.exports),a=function(){if(v)return A;v=1;const t=Object.freeze({loose:!0}),e=Object.freeze({});return A=r=>r?"object"!=typeof r?t:r:e}(),{compareIdentifiers:o}=function(){if(N)return T;N=1;const t=/^[0-9]+$/,e=(e,r)=>{const n=t.test(e),i=t.test(r);return n&&i&&(e=+e,r=+r),e===r?0:n&&!i?-1:i&&!n?1:e<r?-1:1};return T={compareIdentifiers:e,rcompareIdentifiers:(t,r)=>e(r,t)}}();class s{constructor(o,l){if(l=a(l),o instanceof s){if(o.loose===!!l.loose&&o.includePrerelease===!!l.includePrerelease)return o;o=o.version}else if("string"!=typeof o)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof o}".`);if(o.length>e)throw new TypeError(`version is longer than ${e} characters`);t("SemVer",o,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const c=o.trim().match(l.loose?n[i.LOOSE]:n[i.FULL]);if(!c)throw new TypeError(`Invalid Version: ${o}`);if(this.raw=o,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const e=+t;if(e>=0&&e<r)return e}return t})):this.prerelease=[],this.build=c[5]?c[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(t("SemVer.compare",this.version,this.options,e),!(e instanceof s)){if("string"==typeof e&&e===this.version)return 0;e=new s(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(t){return t instanceof s||(t=new s(t,this.options)),o(this.major,t.major)||o(this.minor,t.minor)||o(this.patch,t.patch)}comparePre(e){if(e instanceof s||(e=new s(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{const n=this.prerelease[r],i=e.prerelease[r];if(t("prerelease compare",r,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return o(n,i)}while(++r)}compareBuild(e){e instanceof s||(e=new s(e,this.options));let r=0;do{const n=this.build[r],i=e.build[r];if(t("build compare",r,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return o(n,i)}while(++r)}inc(t,e,r){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e,r),this.inc("pre",e,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e,r),this.inc("pre",e,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const t=Number(r)?1:0;if(!e&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[t];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(e===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(t)}}if(e){let n=[e,t];!1===r&&(n=[e]),0===o(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return I=s}!function(){if(R)return x;R=1;const t=function(){if(O)return C;O=1;const t=M();return C=(e,r,n=!1)=>{if(e instanceof t)return e;try{return new t(e,r)}catch(t){if(!n)return null;throw t}}}();x=(e,r)=>{const n=t(e,r);return n?n.version:null}}(),function(){if(D)return L;D=1;const t=M();L=(e,r)=>new t(e,r).major}(),i.m;class F extends i.m{_views=[];_currentView=null;register(t){if(this._views.find((e=>e.id===t.id)))throw new Error(`View id ${t.id} is already registered`);this._views.push(t),this.dispatchTypedEvent("update",new CustomEvent("update"))}remove(t){const e=this._views.findIndex((e=>e.id===t));-1!==e&&(this._views.splice(e,1),this.dispatchTypedEvent("update",new CustomEvent("update")))}setActive(t){this._currentView=t;const e=new CustomEvent("updateActive",{detail:t});this.dispatchTypedEvent("updateActive",e)}get active(){return this._currentView}get views(){return this._views}}const k=function(){return void 0===window._nc_navigation&&(window._nc_navigation=new F,n.o.debug("Navigation service initialized")),window._nc_navigation};class P{_column;constructor(t){$(t),this._column=t}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(t){if(!t.id||"string"!=typeof t.id)throw new Error("A column id is required");if(!t.title||"string"!=typeof t.title)throw new Error("A column title is required");if(!t.render||"function"!=typeof t.render)throw new Error("A render function is required");if(t.sort&&"function"!=typeof t.sort)throw new Error("Column sortFunction must be a function");if(t.summary&&"function"!=typeof t.summary)throw new Error("Column summary must be a function");return!0};var B,U={};const G=p((B||(B=1,function(t){t.parser=function(t,e){return new n(t,e)},t.SAXParser=n,t.SAXStream=o,t.createStream=function(t,e){return new o(t,e)},t.MAX_BUFFER_LENGTH=65536;var e,r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function n(e,i){if(!(this instanceof n))return new n(e,i);var a=this;!function(t){for(var e=0,n=r.length;e<n;e++)t[r[e]]=""}(a),a.q=a.c="",a.bufferCheckPosition=t.MAX_BUFFER_LENGTH,a.opt=i||{},a.opt.lowercase=a.opt.lowercase||a.opt.lowercasetags,a.looseCase=a.opt.lowercase?"toLowerCase":"toUpperCase",a.tags=[],a.closed=a.closedRoot=a.sawRoot=!1,a.tag=a.error=null,a.strict=!!e,a.noscript=!(!e&&!a.opt.noscript),a.state=I.BEGIN,a.strictEntities=a.opt.strictEntities,a.ENTITIES=a.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),a.attribList=[],a.opt.xmlns&&(a.ns=Object.create(h)),void 0===a.opt.unquotedAttributeValues&&(a.opt.unquotedAttributeValues=!e),a.trackPosition=!1!==a.opt.position,a.trackPosition&&(a.position=a.line=a.column=0),C(a,"onready")}t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(t){function e(){}return e.prototype=t,new e}),Object.keys||(Object.keys=function(t){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);return e}),n.prototype={end:function(){D(this)},write:function(e){var n=this;if(this.error)throw this.error;if(n.closed)return L(n,"Cannot write after close. Assign an onready handler.");if(null===e)return D(n);"object"==typeof e&&(e=e.toString());for(var i=0,a="";a=G(e,i++),n.c=a,a;)switch(n.trackPosition&&(n.position++,"\n"===a?(n.line++,n.column=0):n.column++),n.state){case I.BEGIN:if(n.state=I.BEGIN_WHITESPACE,"\ufeff"===a)continue;U(n,a);continue;case I.BEGIN_WHITESPACE:U(n,a);continue;case I.TEXT:if(n.sawRoot&&!n.closedRoot){for(var o=i-1;a&&"<"!==a&&"&"!==a;)(a=G(e,i++))&&n.trackPosition&&(n.position++,"\n"===a?(n.line++,n.column=0):n.column++);n.textNode+=e.substring(o,i-1)}"<"!==a||n.sawRoot&&n.closedRoot&&!n.strict?(E(a)||n.sawRoot&&!n.closedRoot||S(n,"Text data outside of root node."),"&"===a?n.state=I.TEXT_ENTITY:n.textNode+=a):(n.state=I.OPEN_WAKA,n.startTagPosition=n.position);continue;case I.SCRIPT:"<"===a?n.state=I.SCRIPT_ENDING:n.script+=a;continue;case I.SCRIPT_ENDING:"/"===a?n.state=I.CLOSE_TAG:(n.script+="<"+a,n.state=I.SCRIPT);continue;case I.OPEN_WAKA:if("!"===a)n.state=I.SGML_DECL,n.sgmlDecl="";else if(E(a));else if(w(p,a))n.state=I.OPEN_TAG,n.tagName=a;else if("/"===a)n.state=I.CLOSE_TAG,n.tagName="";else if("?"===a)n.state=I.PROC_INST,n.procInstName=n.procInstBody="";else{if(S(n,"Unencoded <"),n.startTagPosition+1<n.position){var c=n.position-n.startTagPosition;a=new Array(c).join(" ")+a}n.textNode+="<"+a,n.state=I.TEXT}continue;case I.SGML_DECL:if(n.sgmlDecl+a==="--"){n.state=I.COMMENT,n.comment="",n.sgmlDecl="";continue}n.doctype&&!0!==n.doctype&&n.sgmlDecl?(n.state=I.DOCTYPE_DTD,n.doctype+="<!"+n.sgmlDecl+a,n.sgmlDecl=""):(n.sgmlDecl+a).toUpperCase()===s?(O(n,"onopencdata"),n.state=I.CDATA,n.sgmlDecl="",n.cdata=""):(n.sgmlDecl+a).toUpperCase()===l?(n.state=I.DOCTYPE,(n.doctype||n.sawRoot)&&S(n,"Inappropriately located doctype declaration"),n.doctype="",n.sgmlDecl=""):">"===a?(O(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=I.TEXT):b(a)?(n.state=I.SGML_DECL_QUOTED,n.sgmlDecl+=a):n.sgmlDecl+=a;continue;case I.SGML_DECL_QUOTED:a===n.q&&(n.state=I.SGML_DECL,n.q=""),n.sgmlDecl+=a;continue;case I.DOCTYPE:">"===a?(n.state=I.TEXT,O(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=a,"["===a?n.state=I.DOCTYPE_DTD:b(a)&&(n.state=I.DOCTYPE_QUOTED,n.q=a));continue;case I.DOCTYPE_QUOTED:n.doctype+=a,a===n.q&&(n.q="",n.state=I.DOCTYPE);continue;case I.DOCTYPE_DTD:"]"===a?(n.doctype+=a,n.state=I.DOCTYPE):"<"===a?(n.state=I.OPEN_WAKA,n.startTagPosition=n.position):b(a)?(n.doctype+=a,n.state=I.DOCTYPE_DTD_QUOTED,n.q=a):n.doctype+=a;continue;case I.DOCTYPE_DTD_QUOTED:n.doctype+=a,a===n.q&&(n.state=I.DOCTYPE_DTD,n.q="");continue;case I.COMMENT:"-"===a?n.state=I.COMMENT_ENDING:n.comment+=a;continue;case I.COMMENT_ENDING:"-"===a?(n.state=I.COMMENT_ENDED,n.comment=R(n.opt,n.comment),n.comment&&O(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+a,n.state=I.COMMENT);continue;case I.COMMENT_ENDED:">"!==a?(S(n,"Malformed comment"),n.comment+="--"+a,n.state=I.COMMENT):n.doctype&&!0!==n.doctype?n.state=I.DOCTYPE_DTD:n.state=I.TEXT;continue;case I.CDATA:"]"===a?n.state=I.CDATA_ENDING:n.cdata+=a;continue;case I.CDATA_ENDING:"]"===a?n.state=I.CDATA_ENDING_2:(n.cdata+="]"+a,n.state=I.CDATA);continue;case I.CDATA_ENDING_2:">"===a?(n.cdata&&O(n,"oncdata",n.cdata),O(n,"onclosecdata"),n.cdata="",n.state=I.TEXT):"]"===a?n.cdata+="]":(n.cdata+="]]"+a,n.state=I.CDATA);continue;case I.PROC_INST:"?"===a?n.state=I.PROC_INST_ENDING:E(a)?n.state=I.PROC_INST_BODY:n.procInstName+=a;continue;case I.PROC_INST_BODY:if(!n.procInstBody&&E(a))continue;"?"===a?n.state=I.PROC_INST_ENDING:n.procInstBody+=a;continue;case I.PROC_INST_ENDING:">"===a?(O(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=I.TEXT):(n.procInstBody+="?"+a,n.state=I.PROC_INST_BODY);continue;case I.OPEN_TAG:w(m,a)?n.tagName+=a:(M(n),">"===a?P(n):"/"===a?n.state=I.OPEN_TAG_SLASH:(E(a)||S(n,"Invalid character in tag name"),n.state=I.ATTRIB));continue;case I.OPEN_TAG_SLASH:">"===a?(P(n,!0),$(n)):(S(n,"Forward-slash in opening tag not followed by >"),n.state=I.ATTRIB);continue;case I.ATTRIB:if(E(a))continue;">"===a?P(n):"/"===a?n.state=I.OPEN_TAG_SLASH:w(p,a)?(n.attribName=a,n.attribValue="",n.state=I.ATTRIB_NAME):S(n,"Invalid attribute name");continue;case I.ATTRIB_NAME:"="===a?n.state=I.ATTRIB_VALUE:">"===a?(S(n,"Attribute without value"),n.attribValue=n.attribName,k(n),P(n)):E(a)?n.state=I.ATTRIB_NAME_SAW_WHITE:w(m,a)?n.attribName+=a:S(n,"Invalid attribute name");continue;case I.ATTRIB_NAME_SAW_WHITE:if("="===a)n.state=I.ATTRIB_VALUE;else{if(E(a))continue;S(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",O(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",">"===a?P(n):w(p,a)?(n.attribName=a,n.state=I.ATTRIB_NAME):(S(n,"Invalid attribute name"),n.state=I.ATTRIB)}continue;case I.ATTRIB_VALUE:if(E(a))continue;b(a)?(n.q=a,n.state=I.ATTRIB_VALUE_QUOTED):(n.opt.unquotedAttributeValues||L(n,"Unquoted attribute value"),n.state=I.ATTRIB_VALUE_UNQUOTED,n.attribValue=a);continue;case I.ATTRIB_VALUE_QUOTED:if(a!==n.q){"&"===a?n.state=I.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=a;continue}k(n),n.q="",n.state=I.ATTRIB_VALUE_CLOSED;continue;case I.ATTRIB_VALUE_CLOSED:E(a)?n.state=I.ATTRIB:">"===a?P(n):"/"===a?n.state=I.OPEN_TAG_SLASH:w(p,a)?(S(n,"No whitespace between attributes"),n.attribName=a,n.attribValue="",n.state=I.ATTRIB_NAME):S(n,"Invalid attribute name");continue;case I.ATTRIB_VALUE_UNQUOTED:if(!y(a)){"&"===a?n.state=I.ATTRIB_VALUE_ENTITY_U:n.attribValue+=a;continue}k(n),">"===a?P(n):n.state=I.ATTRIB;continue;case I.CLOSE_TAG:if(n.tagName)">"===a?$(n):w(m,a)?n.tagName+=a:n.script?(n.script+="</"+n.tagName,n.tagName="",n.state=I.SCRIPT):(E(a)||S(n,"Invalid tagname in closing tag"),n.state=I.CLOSE_TAG_SAW_WHITE);else{if(E(a))continue;A(p,a)?n.script?(n.script+="</"+a,n.state=I.SCRIPT):S(n,"Invalid tagname in closing tag."):n.tagName=a}continue;case I.CLOSE_TAG_SAW_WHITE:if(E(a))continue;">"===a?$(n):S(n,"Invalid characters in closing tag");continue;case I.TEXT_ENTITY:case I.ATTRIB_VALUE_ENTITY_Q:case I.ATTRIB_VALUE_ENTITY_U:var u,d;switch(n.state){case I.TEXT_ENTITY:u=I.TEXT,d="textNode";break;case I.ATTRIB_VALUE_ENTITY_Q:u=I.ATTRIB_VALUE_QUOTED,d="attribValue";break;case I.ATTRIB_VALUE_ENTITY_U:u=I.ATTRIB_VALUE_UNQUOTED,d="attribValue"}if(";"===a){var h=B(n);n.opt.unparsedEntities&&!Object.values(t.XML_ENTITIES).includes(h)?(n.entity="",n.state=u,n.write(h)):(n[d]+=h,n.entity="",n.state=u)}else w(n.entity.length?f:g,a)?n.entity+=a:(S(n,"Invalid character in entity name"),n[d]+="&"+n.entity+a,n.entity="",n.state=u);continue;default:throw new Error(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&function(e){for(var n=Math.max(t.MAX_BUFFER_LENGTH,10),i=0,a=0,o=r.length;a<o;a++){var s=e[r[a]].length;if(s>n)switch(r[a]){case"textNode":x(e);break;case"cdata":O(e,"oncdata",e.cdata),e.cdata="";break;case"script":O(e,"onscript",e.script),e.script="";break;default:L(e,"Max buffer length exceeded: "+r[a])}i=Math.max(i,s)}var l=t.MAX_BUFFER_LENGTH-i;e.bufferCheckPosition=l+e.position}(n),n},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var t;x(t=this),""!==t.cdata&&(O(t,"oncdata",t.cdata),t.cdata=""),""!==t.script&&(O(t,"onscript",t.script),t.script="")}};try{e=require("stream").Stream}catch(t){e=function(){}}e||(e=function(){});var i=t.EVENTS.filter((function(t){return"error"!==t&&"end"!==t}));function o(t,r){if(!(this instanceof o))return new o(t,r);e.apply(this),this._parser=new n(t,r),this.writable=!0,this.readable=!0;var a=this;this._parser.onend=function(){a.emit("end")},this._parser.onerror=function(t){a.emit("error",t),a._parser.error=null},this._decoder=null,i.forEach((function(t){Object.defineProperty(a,"on"+t,{get:function(){return a._parser["on"+t]},set:function(e){if(!e)return a.removeAllListeners(t),a._parser["on"+t]=e,e;a.on(t,e)},enumerable:!0,configurable:!1})}))}o.prototype=Object.create(e.prototype,{constructor:{value:o}}),o.prototype.write=function(t){if("function"==typeof c&&"function"==typeof c.isBuffer&&c.isBuffer(t)){if(!this._decoder){var e=a.I;this._decoder=new e("utf8")}t=this._decoder.write(t)}return this._parser.write(t.toString()),this.emit("data",t),!0},o.prototype.end=function(t){return t&&t.length&&this.write(t),this._parser.end(),!0},o.prototype.on=function(t,r){var n=this;return n._parser["on"+t]||-1===i.indexOf(t)||(n._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),n.emit.apply(n,e)}),e.prototype.on.call(n,t,r)};var s="[CDATA[",l="DOCTYPE",u="http://www.w3.org/XML/1998/namespace",d="http://www.w3.org/2000/xmlns/",h={xml:u,xmlns:d},p=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,m=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,g=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,f=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function E(t){return" "===t||"\n"===t||"\r"===t||"\t"===t}function b(t){return'"'===t||"'"===t}function y(t){return">"===t||E(t)}function w(t,e){return t.test(e)}function A(t,e){return!w(t,e)}var v,T,N,I=0;for(var _ in t.STATE={BEGIN:I++,BEGIN_WHITESPACE:I++,TEXT:I++,TEXT_ENTITY:I++,OPEN_WAKA:I++,SGML_DECL:I++,SGML_DECL_QUOTED:I++,DOCTYPE:I++,DOCTYPE_QUOTED:I++,DOCTYPE_DTD:I++,DOCTYPE_DTD_QUOTED:I++,COMMENT_STARTING:I++,COMMENT:I++,COMMENT_ENDING:I++,COMMENT_ENDED:I++,CDATA:I++,CDATA_ENDING:I++,CDATA_ENDING_2:I++,PROC_INST:I++,PROC_INST_BODY:I++,PROC_INST_ENDING:I++,OPEN_TAG:I++,OPEN_TAG_SLASH:I++,ATTRIB:I++,ATTRIB_NAME:I++,ATTRIB_NAME_SAW_WHITE:I++,ATTRIB_VALUE:I++,ATTRIB_VALUE_QUOTED:I++,ATTRIB_VALUE_CLOSED:I++,ATTRIB_VALUE_UNQUOTED:I++,ATTRIB_VALUE_ENTITY_Q:I++,ATTRIB_VALUE_ENTITY_U:I++,CLOSE_TAG:I++,CLOSE_TAG_SAW_WHITE:I++,SCRIPT:I++,SCRIPT_ENDING:I++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach((function(e){var r=t.ENTITIES[e],n="number"==typeof r?String.fromCharCode(r):r;t.ENTITIES[e]=n})),t.STATE)t.STATE[t.STATE[_]]=_;function C(t,e,r){t[e]&&t[e](r)}function O(t,e,r){t.textNode&&x(t),C(t,e,r)}function x(t){t.textNode=R(t.opt,t.textNode),t.textNode&&C(t,"ontext",t.textNode),t.textNode=""}function R(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function L(t,e){return x(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=new Error(e),t.error=e,C(t,"onerror",e),t}function D(t){return t.sawRoot&&!t.closedRoot&&S(t,"Unclosed root tag"),t.state!==I.BEGIN&&t.state!==I.BEGIN_WHITESPACE&&t.state!==I.TEXT&&L(t,"Unexpected end"),x(t),t.c="",t.closed=!0,C(t,"onend"),n.call(t,t.strict,t.opt),t}function S(t,e){if("object"!=typeof t||!(t instanceof n))throw new Error("bad call to strictFail");t.strict&&L(t,e)}function M(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,r=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(r.ns=e.ns),t.attribList.length=0,O(t,"onopentagstart",r)}function F(t,e){var r=t.indexOf(":")<0?["",t]:t.split(":"),n=r[0],i=r[1];return e&&"xmlns"===t&&(n="xmlns",i=""),{prefix:n,local:i}}function k(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))t.attribName=t.attribValue="";else{if(t.opt.xmlns){var e=F(t.attribName,!0),r=e.prefix,n=e.local;if("xmlns"===r)if("xml"===n&&t.attribValue!==u)S(t,"xml: prefix must be bound to "+u+"\nActual: "+t.attribValue);else if("xmlns"===n&&t.attribValue!==d)S(t,"xmlns: prefix must be bound to "+d+"\nActual: "+t.attribValue);else{var i=t.tag,a=t.tags[t.tags.length-1]||t;i.ns===a.ns&&(i.ns=Object.create(a.ns)),i.ns[n]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,O(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}}function P(t,e){if(t.opt.xmlns){var r=t.tag,n=F(t.tagName);r.prefix=n.prefix,r.local=n.local,r.uri=r.ns[n.prefix]||"",r.prefix&&!r.uri&&(S(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),r.uri=n.prefix);var i=t.tags[t.tags.length-1]||t;r.ns&&i.ns!==r.ns&&Object.keys(r.ns).forEach((function(e){O(t,"onopennamespace",{prefix:e,uri:r.ns[e]})}));for(var a=0,o=t.attribList.length;a<o;a++){var s=t.attribList[a],l=s[0],c=s[1],u=F(l,!0),d=u.prefix,h=u.local,p=""===d?"":r.ns[d]||"",m={name:l,value:c,prefix:d,local:h,uri:p};d&&"xmlns"!==d&&!p&&(S(t,"Unbound namespace prefix: "+JSON.stringify(d)),m.uri=d),t.tag.attributes[l]=m,O(t,"onattribute",m)}t.attribList.length=0}t.tag.isSelfClosing=!!e,t.sawRoot=!0,t.tags.push(t.tag),O(t,"onopentag",t.tag),e||(t.noscript||"script"!==t.tagName.toLowerCase()?t.state=I.TEXT:t.state=I.SCRIPT,t.tag=null,t.tagName=""),t.attribName=t.attribValue="",t.attribList.length=0}function $(t){if(!t.tagName)return S(t,"Weird empty close tag."),t.textNode+="</>",void(t.state=I.TEXT);if(t.script){if("script"!==t.tagName)return t.script+="</"+t.tagName+">",t.tagName="",void(t.state=I.SCRIPT);O(t,"onscript",t.script),t.script=""}var e=t.tags.length,r=t.tagName;t.strict||(r=r[t.looseCase]());for(var n=r;e--&&t.tags[e].name!==n;)S(t,"Unexpected close tag");if(e<0)return S(t,"Unmatched closing tag: "+t.tagName),t.textNode+="</"+t.tagName+">",void(t.state=I.TEXT);t.tagName=r;for(var i=t.tags.length;i-- >e;){var a=t.tag=t.tags.pop();t.tagName=t.tag.name,O(t,"onclosetag",t.tagName);var o={};for(var s in a.ns)o[s]=a.ns[s];var l=t.tags[t.tags.length-1]||t;t.opt.xmlns&&a.ns!==l.ns&&Object.keys(a.ns).forEach((function(e){var r=a.ns[e];O(t,"onclosenamespace",{prefix:e,uri:r})}))}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=I.TEXT}function B(t){var e,r=t.entity,n=r.toLowerCase(),i="";return t.ENTITIES[r]?t.ENTITIES[r]:t.ENTITIES[n]?t.ENTITIES[n]:("#"===(r=n).charAt(0)&&("x"===r.charAt(1)?(r=r.slice(2),i=(e=parseInt(r,16)).toString(16)):(r=r.slice(1),i=(e=parseInt(r,10)).toString(10))),r=r.replace(/^0+/,""),isNaN(e)||i.toLowerCase()!==r?(S(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCodePoint(e))}function U(t,e){"<"===e?(t.state=I.OPEN_WAKA,t.startTagPosition=t.position):E(e)||(S(t,"Non-whitespace before first tag."),t.textNode=e,t.state=I.TEXT)}function G(t,e){var r="";return e<t.length&&(r=t.charAt(e)),r}I=t.STATE,String.fromCodePoint||(v=String.fromCharCode,T=Math.floor,N=function(){var t,e,r=[],n=-1,i=arguments.length;if(!i)return"";for(var a="";++n<i;){var o=Number(arguments[n]);if(!isFinite(o)||o<0||o>1114111||T(o)!==o)throw RangeError("Invalid code point: "+o);o<=65535?r.push(o):(t=55296+((o-=65536)>>10),e=o%1024+56320,r.push(t,e)),(n+1===i||r.length>16384)&&(a+=v.apply(null,r),r.length=0)}return a},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:N,configurable:!0,writable:!0}):String.fromCodePoint=N)}(U)),U)),j={"http://www.w3.org/2000/svg":{ext:"svg",mime:"image/svg+xml"},"http://www.w3.org/1999/xhtml":{ext:"xhtml",mime:"application/xhtml+xml"},"http://www.opengis.net/kml/2.2":{ext:"kml",mime:"application/vnd.google-earth.kml+xml"},"http://www.opengis.net/gml":{ext:"gml",mime:"application/gml+xml"}},V={rss:{ext:"rss",mime:"application/rss+xml"},"score-partwise":{ext:"musicxml",mime:"application/vnd.recordare.musicxml+xml"},svg:{ext:"svg",mime:"image/svg+xml"}};class X{constructor(t){this.options=t??{},this.firstTag=!0,this.onEnd=!1,this.parser=G.parser(!0,{xmlns:!0}),this.nesting=0,this.parser.onerror=t=>{t.message.startsWith("Invalid character entity")||(this.fileType=void 0,this.onEnd=!0)},this.parser.onopentag=t=>{++this.nesting,this.firstTag&&!this.onEnd&&(this.firstTag=!1,t.uri?this.fileType=j[t.uri]:t.name&&(this.fileType=V[t.name.toLowerCase()]),this.fileType&&!this.options.fullScan&&(this.onEnd=!0))},this.parser.onclosetag=()=>{--this.nesting}}write(t){this.parser.write(t)}close(){this.parser.close(),this.onEnd=!0}isValid(){return 0===this.nesting}}class q{_view;constructor(t){Y(t),this._view=t}get id(){return this._view.id}get name(){return this._view.name}get caption(){return this._view.caption}get emptyTitle(){return this._view.emptyTitle}get emptyCaption(){return this._view.emptyCaption}get getContents(){return this._view.getContents}get hidden(){return this._view.hidden}get icon(){return this._view.icon}set icon(t){this._view.icon=t}get order(){return this._view.order}set order(t){this._view.order=t}get params(){return this._view.params}set params(t){this._view.params=t}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(t){this._view.expanded=t}get defaultSortKey(){return this._view.defaultSortKey}get loadChildViews(){return this._view.loadChildViews}}const Y=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("View id is required and must be a string");if(!t.name||"string"!=typeof t.name)throw new Error("View name is required and must be a string");if("caption"in t&&"string"!=typeof t.caption)throw new Error("View caption must be a string");if(!t.getContents||"function"!=typeof t.getContents)throw new Error("View getContents is required and must be a function");if("hidden"in t&&"boolean"!=typeof t.hidden)throw new Error("View hidden must be a boolean");if(!t.icon||"string"!=typeof t.icon||!function(t){if("string"!=typeof t)throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);if(0===(t=t.trim()).length)return!1;const e=new X;return e.write(t),e.isValid()&&"svg"===e.fileType?.ext}(t.icon))throw new Error("View icon is required and must be a valid svg string");if("order"in t&&"number"!=typeof t.order)throw new Error("View order must be a number");if(t.columns&&t.columns.forEach((t=>{if(!(t instanceof P))throw new Error("View columns must be an array of Column. Invalid column found")})),t.emptyView&&"function"!=typeof t.emptyView)throw new Error("View emptyView must be a function");if(t.parent&&"string"!=typeof t.parent)throw new Error("View parent must be a string");if("sticky"in t&&"boolean"!=typeof t.sticky)throw new Error("View sticky must be a boolean");if("expanded"in t&&"boolean"!=typeof t.expanded)throw new Error("View expanded must be a boolean");if(t.defaultSortKey&&"string"!=typeof t.defaultSortKey)throw new Error("View defaultSortKey must be a string");if(t.loadChildViews&&"function"!=typeof t.loadChildViews)throw new Error("View loadChildViews must be a function");return!0};var H=(t=>(t.ReservedName="reserved name",t.Character="character",t.Extension="extension",t))(H||{});class z extends Error{constructor(t){super(`Invalid ${t.reason} '${t.segment}' in filename '${t.filename}'`,{cause:t})}get filename(){return this.cause.filename}get reason(){return this.cause.reason}get segment(){return this.cause.segment}}function W(t){const e=(0,o.F)().files,r=e.forbidden_filename_characters??window._oc_config?.forbidden_filenames_characters??["/","\\"];for(const e of r)if(t.includes(e))throw new z({segment:e,reason:"character",filename:t});if(t=t.toLocaleLowerCase(),(e.forbidden_filenames??[".htaccess"]).includes(t))throw new z({filename:t,segment:t,reason:"reserved name"});const n=t.indexOf(".",1),i=t.substring(0,-1===n?void 0:n);if((e.forbidden_filename_basenames??[]).includes(i))throw new z({filename:t,segment:i,reason:"reserved name"});const a=e.forbidden_filename_extensions??[".part",".filepart"];for(const e of a)if(t.length>e.length&&t.endsWith(e))throw new z({segment:e,reason:"extension",filename:t})}const Q=["B","KB","MB","GB","TB","PB"],K=["B","KiB","MiB","GiB","TiB","PiB"];function Z(t,e=!1,r=!1,n=!1){r=r&&!n,"string"==typeof t&&(t=Number(t));let i=t>0?Math.floor(Math.log(t)/Math.log(n?1e3:1024)):0;i=Math.min((r?K.length:Q.length)-1,i);const a=r?K[i]:Q[i];let o=(t/Math.pow(n?1e3:1024,i)).toFixed(1);return!0===e&&0===i?("0.0"!==o?"< 1 ":"0 ")+(r?K[1]:Q[1]):(o=i<2?parseFloat(o).toFixed(0):parseFloat(o).toLocaleString((0,s.lO)()),o+" "+a)}function J(t){return t instanceof Date?t.toISOString():String(t)}function tt(t,e={}){const r={sortingMode:"basename",sortingOrder:"asc",...e};return function(t,e,r){r=r??[];const n=(e=e??[t=>t]).map(((t,e)=>"asc"===(r[e]??"asc")?1:-1)),i=Intl.Collator([(0,s.Z0)(),(0,s.lO)()],{numeric:!0,usage:"sort"});return[...t].sort(((t,r)=>{for(const[a,o]of e.entries()){const e=i.compare(J(o(t)),J(o(r)));if(0!==e)return e*n[a]}return 0}))}(t,[...r.sortFavoritesFirst?[t=>1!==t.attributes?.favorite]:[],...r.sortFoldersFirst?[t=>"folder"!==t.type]:[],..."basename"!==r.sortingMode?[t=>t[r.sortingMode]??t.attributes[r.sortingMode]]:[],t=>{return(e=t.displayname||t.attributes?.displayname||t.basename||"").lastIndexOf(".")>0?e.slice(0,e.lastIndexOf(".")):e;var e},t=>t.basename],[...r.sortFavoritesFirst?["asc"]:[],...r.sortFoldersFirst?["asc"]:[],..."mtime"===r.sortingMode?["asc"===r.sortingOrder?"desc":"asc"]:[],..."mtime"!==r.sortingMode&&"basename"!==r.sortingMode?[r.sortingOrder]:[],r.sortingOrder,r.sortingOrder])}},42634:()=>{},45218:(t,e,r)=>{"use strict";var n=r(35810),i=r(94205),a=r(85471),o=r(82680),s=r(85168),l=r(53334);const c='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-tag-multiple-outline" viewBox="0 0 24 24"><path d="M6.5 10C7.3 10 8 9.3 8 8.5S7.3 7 6.5 7 5 7.7 5 8.5 5.7 10 6.5 10M9 6L16 13L11 18L4 11V6H9M9 4H4C2.9 4 2 4.9 2 6V11C2 11.6 2.2 12.1 2.6 12.4L9.6 19.4C9.9 19.8 10.4 20 11 20S12.1 19.8 12.4 19.4L17.4 14.4C17.8 14 18 13.5 18 13C18 12.4 17.8 11.9 17.4 11.6L10.4 4.6C10.1 4.2 9.6 4 9 4M13.5 5.7L14.5 4.7L21.4 11.6C21.8 12 22 12.5 22 13S21.8 14.1 21.4 14.4L16 19.8L15 18.8L20.7 13L13.5 5.7Z" /></svg>';async function u(t){const e=await new Promise((e=>{(0,s.Ss)((0,a.$V)((()=>Promise.all([r.e(4208),r.e(3596)]).then(r.bind(r,3596)))),{nodes:t},(t=>{e(t)}))}));return Array(t.length).fill(e)}const d=new n.hY({id:"systemtags:bulk",displayName:()=>(0,l.t)("systemtags","Manage tags"),iconSvgInline:()=>c,enabled:t=>!(0,o.f)()&&0!==t.length&&!t.some((t=>!t.isDavResource))&&!t.some((t=>!(t.permissions&n.aX.UPDATE))),exec:async t=>u([t])[0],execBatch:u});var h=r(65899),p=r(61338);const m=(0,r(35947).YK)().setApp("files").detectUser().build(),g=(0,h.nY)("active",(()=>{const t=(0,a.KR)(),e=(0,a.KR)(),r=(0,a.KR)(),i=(0,a.KR)();function o(t){r.value&&r.value.source===t.source&&(r.value=void 0)}function s(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;m.debug("Setting active view",{view:t}),i.value=t??void 0,r.value=void 0}return function(){const t=(0,n.bh)();(0,p.B1)("files:node:deleted",o),s(t.active),t.addEventListener("updateActive",(t=>{s(t.detail)}))}(),{activeAction:t,activeFolder:e,activeNode:r,activeView:i}}));var f=r(25631),E=r(21777),b=r(82528);const y="/systemtags",w=(0,n.H4)(),A=t=>(0,n.Al)(t),v=t=>`<?xml version="1.0"?>\n<oc:filter-files ${(0,n.CP)()}>\n\t<d:prop>\n\t\t${(0,n.VX)()}\n\t</d:prop>\n\t<oc:filter-rules>\n\t\t<oc:systemtag>${t}</oc:systemtag>\n\t</oc:filter-rules>\n</oc:filter-files>`,T=function(t){return new n.vd({id:t.id,source:`${n.PY}${y}/${t.id}`,owner:String((0,E.HW)()?.uid??"anonymous"),root:y,displayname:t.displayName,permissions:n.aX.READ,attributes:{...t,"is-tag":!0}})},N="tags";var I=r(85072),_=r.n(I),C=r(97825),O=r.n(C),x=r(77659),R=r.n(x),L=r(55056),D=r.n(L),S=r(10540),M=r.n(S),F=r(41113),k=r.n(F),P=r(73911),$={};$.styleTagTransform=k(),$.setAttributes=D(),$.insert=R().bind(null,"head"),$.domAPI=O(),$.insertStyleElement=M(),_()(P.A,$),P.A&&P.A.locals&&P.A.locals;var B=r(57599),U=r(12686);const G=[],j=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=document.createElement("li");r.classList.add("files-list__system-tag"),r.setAttribute("data-systemtag-name",t),r.textContent=t;const n=G.find((e=>e.displayName===t));if(n?.color){const t=getComputedStyle(document.body).getPropertyValue("--color-main-background").replace("#","")||((0,B.j2)()?"000000":"ffffff"),e=(0,B.W7)(`#${n.color}`,`#${t}`);r.style.setProperty("--systemtag-color",e),r.setAttribute("data-systemtag-color","true")}return e&&r.classList.add("files-list__system-tag--more"),r},V=async function(t){const e=(0,U.rA)(t),r=document.createElement("ul");if(r.classList.add("files-list__system-tags"),r.setAttribute("aria-label",(0,l.t)("files","Assigned collaborative tags")),r.setAttribute("data-systemtags-fileid",t.fileid?.toString()||""),0===e.length)return r;if(0===G.length)try{G.push(...await(0,b.un)())}catch(t){f.A.error("Failed to fetch tags",{error:t})}if(r.append(j(e[0])),2===e.length)r.append(j(e[1]));else if(e.length>1){const t=j("+"+(e.length-1),!0);t.setAttribute("title",e.slice(1).join(", ")),t.setAttribute("aria-hidden","true"),t.setAttribute("role","presentation"),r.append(t);for(const t of e.slice(1)){const e=j(t);e.classList.add("hidden-visually"),r.append(e)}}return r},X=new n.hY({id:"system-tags",displayName:()=>"",iconSvgInline:()=>"",enabled:t=>1===t.length,exec:async()=>null,renderInline:V,order:0});(0,p.B1)("systemtags:node:updated",(function(t){V(t).then((e=>{document.querySelectorAll(`[data-systemtags-fileid="${t.fileid}"]`).forEach((t=>{t.replaceWith(e)}))}))})),(0,p.B1)("systemtags:tag:created",(function(t){G.push(t)})),(0,p.B1)("systemtags:tag:deleted",(function(t){G.splice(G.findIndex((e=>e.id===t.id)),1)})),(0,p.B1)("systemtags:tag:updated",(function(t){const e=G.findIndex((e=>e.id===t.id));-1!==e&&(G[e]=t),function(t){document.querySelectorAll(`[data-systemtag-name="${t.displayName}"]`).forEach((e=>{e.style.setProperty("--systemtag-color",`#${t.color}`)}))}(t)}));const q=new n.hY({id:"systemtags:open-in-files",displayName:()=>(0,l.t)("systemtags","Open in Files"),iconSvgInline:()=>"",enabled:(t,e)=>e.id===N&&1===t.length&&!0!==t[0].attributes["is-tag"]&&t[0].type===n.pt.Folder,async exec(t){let e=t.dirname;return t.type===n.pt.Folder&&(e=t.path),window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:String(t.fileid)},{dir:e,openfile:"true"}),null},order:-1e3,default:n.m9.HIDDEN});(0,n.Yc)("nc:system-tags"),(0,n.Gg)(d),(0,n.Gg)(X),(0,n.Gg)(q),(0,n.bh)().register(new n.Ss({id:N,name:(0,l.Tl)("systemtags","Tags"),caption:(0,l.Tl)("systemtags","List of tags and their associated files and folders."),emptyTitle:(0,l.Tl)("systemtags","No tags found"),emptyCaption:(0,l.Tl)("systemtags","Tags you have created will show up here."),icon:c,order:25,getContents:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const e=(await(0,b.un)()).filter((t=>t.userVisible));if("/"===t)return{folder:new n.vd({id:0,source:`${n.PY}${y}`,owner:(0,E.HW)()?.uid,root:y,permissions:n.aX.NONE}),contents:e.map(T)};const r=parseInt(t.split("/",2)[1]),i=e.find((t=>t.id===r));if(!i)throw new Error("Tag not found");return{folder:T(i),contents:(await w.getDirectoryContents(n.lJ,{details:!0,data:v(r),headers:{method:"REPORT"}})).data.map(A)}}})),document.addEventListener("DOMContentLoaded",(()=>{(0,i.C)("t",(()=>(async t=>{const e=g((window._nc_files_pinia||(window._nc_files_pinia=(0,h.Ey)()),window._nc_files_pinia)),r=window?.OCP?.Files?.Router?.query?.dir||"/",i=e.activeNode,o=e.activeView;if(!i||!o)return void m.error("No active node or view",{node:i,view:o});if(i.status===n.zI.LOADING)return void m.debug("Node is already loading",{node:i});if(!t.enabled([i],o))return void m.debug("Action is not not available for the current context",{action:t,node:i,view:o});let c=t.id;try{c=t.displayName([i],o)}catch(e){m.error("Error while getting action display name",{action:t,error:e})}try{a.Ay.set(i,"status",n.zI.LOADING),e.activeAction=t;const u=await t.exec(i,o,r);if(null==u)return;if(u)return void(0,s.Te)((0,l.t)("files",'"{displayName}" action executed successfully',{displayName:c}));(0,s.Qg)((0,l.t)("files",'"{displayName}" action failed',{displayName:c}))}catch(e){m.error("Error while executing action",{action:t,error:e}),(0,s.Qg)((0,l.t)("files",'"{displayName}" action failed',{displayName:c}))}finally{a.Ay.set(i,"status",void 0),e.activeAction=void 0}})(d)),{stop:!0,prevent:!0}),f.A.debug("Hotkeys registered")}))},57599:(t,e,r)=>{"use strict";r.d(e,{W7:()=>S,Pj:()=>D,j2:()=>L});const n={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},i=Object.create(null);for(const t in n)Object.hasOwn(n,t)&&(i[n[t]]=t);const a={to:{},get:{}};function o(t,e,r){return Math.min(Math.max(e,t),r)}function s(t){const e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}a.get=function(t){let e,r;switch(t.slice(0,3).toLowerCase()){case"hsl":e=a.get.hsl(t),r="hsl";break;case"hwb":e=a.get.hwb(t),r="hwb";break;default:e=a.get.rgb(t),r="rgb"}return e?{model:r,value:e}:null},a.get.rgb=function(t){if(!t)return null;let e,r,i,a=[0,0,0,1];if(e=t.match(/^#([a-f\d]{6})([a-f\d]{2})?$/i)){for(i=e[2],e=e[1],r=0;r<3;r++){const t=2*r;a[r]=Number.parseInt(e.slice(t,t+2),16)}i&&(a[3]=Number.parseInt(i,16)/255)}else if(e=t.match(/^#([a-f\d]{3,4})$/i)){for(e=e[1],i=e[3],r=0;r<3;r++)a[r]=Number.parseInt(e[r]+e[r],16);i&&(a[3]=Number.parseInt(i+i,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/)){for(r=0;r<3;r++)a[r]=Number.parseInt(e[r+1],10);e[4]&&(a[3]=e[5]?.01*Number.parseFloat(e[4]):Number.parseFloat(e[4]))}else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:Object.hasOwn(n,e[1])?(a=n[e[1]],a[3]=1,a):null:null;for(r=0;r<3;r++)a[r]=Math.round(2.55*Number.parseFloat(e[r+1]));e[4]&&(a[3]=e[5]?.01*Number.parseFloat(e[4]):Number.parseFloat(e[4]))}for(r=0;r<3;r++)a[r]=o(a[r],0,255);return a[3]=o(a[3],0,1),a},a.get.hsl=function(t){if(!t)return null;const e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){const t=Number.parseFloat(e[4]);return[(Number.parseFloat(e[1])%360+360)%360,o(Number.parseFloat(e[2]),0,100),o(Number.parseFloat(e[3]),0,100),o(Number.isNaN(t)?1:t,0,1)]}return null},a.get.hwb=function(t){if(!t)return null;const e=t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d.]+)%\s*,\s*([+-]?[\d.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){const t=Number.parseFloat(e[4]);return[(Number.parseFloat(e[1])%360+360)%360,o(Number.parseFloat(e[2]),0,100),o(Number.parseFloat(e[3]),0,100),o(Number.isNaN(t)?1:t,0,1)]}return null},a.to.hex=function(...t){return"#"+s(t[0])+s(t[1])+s(t[2])+(t[3]<1?s(Math.round(255*t[3])):"")},a.to.rgb=function(...t){return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},a.to.rgb.percent=function(...t){const e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),n=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+r+"%, "+n+"%)":"rgba("+e+"%, "+r+"%, "+n+"%, "+t[3]+")"},a.to.hsl=function(...t){return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},a.to.hwb=function(...t){let e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},a.to.keyword=function(...t){return i[t.slice(0,3)]};const l=a,c={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},u={};for(const t of Object.keys(c))u[c[t]]=t;const d={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},h=d,p=(6/29)**3;for(const t of Object.keys(d)){if(!("channels"in d[t]))throw new Error("missing channels property: "+t);if(!("labels"in d[t]))throw new Error("missing channel labels property: "+t);if(d[t].labels.length!==d[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:r}=d[t];delete d[t].channels,delete d[t].labels,Object.defineProperty(d[t],"channels",{value:e}),Object.defineProperty(d[t],"labels",{value:r})}function m(t,e){return function(r){return e(t(r))}}function g(t,e){const r=[e[t].parent,t];let n=h[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=m(h[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}d.rgb.hsl=function(t){const e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=a-i;let s,l;switch(a){case i:s=0;break;case e:s=(r-n)/o;break;case r:s=2+(n-e)/o;break;case n:s=4+(e-r)/o}s=Math.min(60*s,360),s<0&&(s+=360);const c=(i+a)/2;return l=a===i?0:c<=.5?o/(a+i):o/(2-a-i),[s,100*l,100*c]},d.rgb.hsv=function(t){let e,r,n,i,a;const o=t[0]/255,s=t[1]/255,l=t[2]/255,c=Math.max(o,s,l),u=c-Math.min(o,s,l),d=function(t){return(c-t)/6/u+.5};if(0===u)i=0,a=0;else{switch(a=u/c,e=d(o),r=d(s),n=d(l),c){case o:i=n-r;break;case s:i=1/3+e-n;break;case l:i=2/3+r-e}i<0?i+=1:i>1&&(i-=1)}return[360*i,100*a,100*c]},d.rgb.hwb=function(t){const e=t[0],r=t[1];let n=t[2];const i=d.rgb.hsl(t)[0],a=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,100*a,100*n]},d.rgb.cmyk=function(t){const e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(1-e,1-r,1-n);return[100*((1-e-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*i]},d.rgb.keyword=function(t){const e=u[t];if(e)return e;let r,n=Number.POSITIVE_INFINITY;for(const e of Object.keys(c)){const o=(a=c[e],((i=t)[0]-a[0])**2+(i[1]-a[1])**2+(i[2]-a[2])**2);o<n&&(n=o,r=e)}var i,a;return r},d.keyword.rgb=function(t){return c[t]},d.rgb.xyz=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255;return e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,[100*(.4124564*e+.3575761*r+.1804375*n),100*(.2126729*e+.7151522*r+.072175*n),100*(.0193339*e+.119192*r+.9503041*n)]},d.rgb.lab=function(t){const e=d.rgb.xyz(t);let r=e[0],n=e[1],i=e[2];return r/=95.047,n/=100,i/=108.883,r=r>p?r**(1/3):7.787*r+16/116,n=n>p?n**(1/3):7.787*n+16/116,i=i>p?i**(1/3):7.787*i+16/116,[116*n-16,500*(r-n),200*(n-i)]},d.hsl.rgb=function(t){const e=t[0]/360,r=t[1]/100,n=t[2]/100;let i,a;if(0===r)return a=255*n,[a,a,a];const o=n<.5?n*(1+r):n+r-n*r,s=2*n-o,l=[0,0,0];for(let t=0;t<3;t++)i=e+1/3*-(t-1),i<0&&i++,i>1&&i--,a=6*i<1?s+6*(o-s)*i:2*i<1?o:3*i<2?s+(o-s)*(2/3-i)*6:s,l[t]=255*a;return l},d.hsl.hsv=function(t){const e=t[0];let r=t[1]/100,n=t[2]/100,i=r;const a=Math.max(n,.01);return n*=2,r*=n<=1?n:2-n,i*=a<=1?a:2-a,[e,100*(0===n?2*i/(a+i):2*r/(n+r)),(n+r)/2*100]},d.hsv.rgb=function(t){const e=t[0]/60,r=t[1]/100;let n=t[2]/100;const i=Math.floor(e)%6,a=e-Math.floor(e),o=255*n*(1-r),s=255*n*(1-r*a),l=255*n*(1-r*(1-a));switch(n*=255,i){case 0:return[n,l,o];case 1:return[s,n,o];case 2:return[o,n,l];case 3:return[o,s,n];case 4:return[l,o,n];case 5:return[n,o,s]}},d.hsv.hsl=function(t){const e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01);let a,o;o=(2-r)*n;const s=(2-r)*i;return a=r*i,a/=s<=1?s:2-s,a=a||0,o/=2,[e,100*a,100*o]},d.hwb.rgb=function(t){const e=t[0]/360;let r=t[1]/100,n=t[2]/100;const i=r+n;let a;i>1&&(r/=i,n/=i);const o=Math.floor(6*e),s=1-n;a=6*e-o,1&o&&(a=1-a);const l=r+a*(s-r);let c,u,d;switch(o){default:case 6:case 0:c=s,u=l,d=r;break;case 1:c=l,u=s,d=r;break;case 2:c=r,u=s,d=l;break;case 3:c=r,u=l,d=s;break;case 4:c=l,u=r,d=s;break;case 5:c=s,u=r,d=l}return[255*c,255*u,255*d]},d.cmyk.rgb=function(t){const e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100;return[255*(1-Math.min(1,e*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},d.xyz.rgb=function(t){const e=t[0]/100,r=t[1]/100,n=t[2]/100;let i,a,o;return i=3.2404542*e+-1.5371385*r+-.4985314*n,a=-.969266*e+1.8760108*r+.041556*n,o=.0556434*e+-.2040259*r+1.0572252*n,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[255*i,255*a,255*o]},d.xyz.lab=function(t){let e=t[0],r=t[1],n=t[2];return e/=95.047,r/=100,n/=108.883,e=e>p?e**(1/3):7.787*e+16/116,r=r>p?r**(1/3):7.787*r+16/116,n=n>p?n**(1/3):7.787*n+16/116,[116*r-16,500*(e-r),200*(r-n)]},d.lab.xyz=function(t){let e,r,n;r=(t[0]+16)/116,e=t[1]/500+r,n=r-t[2]/200;const i=r**3,a=e**3,o=n**3;return r=i>p?i:(r-16/116)/7.787,e=a>p?a:(e-16/116)/7.787,n=o>p?o:(n-16/116)/7.787,e*=95.047,r*=100,n*=108.883,[e,r,n]},d.lab.lch=function(t){const e=t[0],r=t[1],n=t[2];let i;return i=360*Math.atan2(n,r)/2/Math.PI,i<0&&(i+=360),[e,Math.sqrt(r*r+n*n),i]},d.lch.lab=function(t){const e=t[0],r=t[1],n=t[2]/360*2*Math.PI;return[e,r*Math.cos(n),r*Math.sin(n)]},d.rgb.ansi16=function(t,e=null){const[r,n,i]=t;let a=null===e?d.rgb.hsv(t)[2]:e;if(a=Math.round(a/50),0===a)return 30;let o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return 2===a&&(o+=60),o},d.hsv.ansi16=function(t){return d.rgb.ansi16(d.hsv.rgb(t),t[2])},d.rgb.ansi256=function(t){const e=t[0],r=t[1],n=t[2];return e>>4==r>>4&&r>>4==n>>4?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},d.ansi16.rgb=function(t){let e=(t=t[0])%10;if(0===e||7===e)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const r=.5*(Math.trunc(t>50)+1);return[(1&e)*r*255,(e>>1&1)*r*255,(e>>2&1)*r*255]},d.ansi256.rgb=function(t){if((t=t[0])>=232){const e=10*(t-232)+8;return[e,e,e]}let e;return t-=16,[Math.floor(t/36)/5*255,Math.floor((e=t%36)/6)/5*255,e%6/5*255]},d.rgb.hex=function(t){const e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".slice(e.length)+e},d.hex.rgb=function(t){const e=t.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!e)return[0,0,0];let r=e[0];3===e[0].length&&(r=[...r].map((t=>t+t)).join(""));const n=Number.parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},d.rgb.hcg=function(t){const e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),a=Math.min(Math.min(e,r),n),o=i-a;let s;return s=o<=0?0:i===e?(r-n)/o%6:i===r?2+(n-e)/o:4+(e-r)/o,s/=6,s%=1,[360*s,100*o,100*(o<1?a/(1-o):0)]},d.hsl.hcg=function(t){const e=t[1]/100,r=t[2]/100,n=r<.5?2*e*r:2*e*(1-r);let i=0;return n<1&&(i=(r-.5*n)/(1-n)),[t[0],100*n,100*i]},d.hsv.hcg=function(t){const e=t[1]/100,r=t[2]/100,n=e*r;let i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],100*n,100*i]},d.hcg.rgb=function(t){const e=t[0]/360,r=t[1]/100,n=t[2]/100;if(0===r)return[255*n,255*n,255*n];const i=[0,0,0],a=e%1*6,o=a%1,s=1-o;let l=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return l=(1-r)*n,[255*(r*i[0]+l),255*(r*i[1]+l),255*(r*i[2]+l)]},d.hcg.hsv=function(t){const e=t[1]/100,r=e+t[2]/100*(1-e);let n=0;return r>0&&(n=e/r),[t[0],100*n,100*r]},d.hcg.hsl=function(t){const e=t[1]/100,r=t[2]/100*(1-e)+.5*e;let n=0;return r>0&&r<.5?n=e/(2*r):r>=.5&&r<1&&(n=e/(2*(1-r))),[t[0],100*n,100*r]},d.hcg.hwb=function(t){const e=t[1]/100,r=e+t[2]/100*(1-e);return[t[0],100*(r-e),100*(1-r)]},d.hwb.hcg=function(t){const e=t[1]/100,r=1-t[2]/100,n=r-e;let i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],100*n,100*i]},d.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},d.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},d.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},d.gray.hsl=function(t){return[0,0,t[0]]},d.gray.hsv=d.gray.hsl,d.gray.hwb=function(t){return[0,100,t[0]]},d.gray.cmyk=function(t){return[0,0,0,t[0]]},d.gray.lab=function(t){return[t[0],0,0]},d.gray.hex=function(t){const e=255&Math.round(t[0]/100*255),r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".slice(r.length)+r},d.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const f=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(h);for(let{length:r}=e,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}(),r=[t];for(e[t].distance=0;r.length>0;){const t=r.pop(),n=Object.keys(h[t]);for(let{length:i}=n,a=0;a<i;a++){const i=n[a],o=e[i];-1===o.distance&&(o.distance=e[t].distance+1,o.parent=t,r.unshift(i))}}return e}(t),r={},n=Object.keys(e);for(let{length:t}=n,i=0;i<t;i++){const t=n[i];null!==e[t].parent&&(r[t]=g(t,e))}return r},E={},b=Object.keys(h);function y(t){const e=function(...e){const r=e[0];return null==r?r:(r.length>1&&(e=r),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}function w(t){const e=function(...e){const r=e[0];if(null==r)return r;r.length>1&&(e=r);const n=t(e);if("object"==typeof n)for(let{length:t}=n,e=0;e<t;e++)n[e]=Math.round(n[e]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}for(const t of b){E[t]={},Object.defineProperty(E[t],"channels",{value:h[t].channels}),Object.defineProperty(E[t],"labels",{value:h[t].labels});const e=f(t),r=Object.keys(e);for(const n of r){const r=e[n];E[t][n]=w(r),E[t][n].raw=y(r)}}const A=E,v=["keyword","gray","hex"],T={};for(const t of Object.keys(A))T[[...A[t].labels].sort().join("")]=t;const N={};function I(t,e){if(!(this instanceof I))return new I(t,e);if(e&&e in v&&(e=null),e&&!(e in A))throw new Error("Unknown model: "+e);let r,n;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof I)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=l.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,n=A[this.model].channels,this.color=e.value.slice(0,n),this.valpha="number"==typeof e.value[n]?e.value[n]:1}else if(t.length>0){this.model=e||"rgb",n=A[this.model].channels;const r=Array.prototype.slice.call(t,0,n);this.color=x(r,n),this.valpha="number"==typeof t[n]?t[n]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const n=e.sort().join("");if(!(n in T))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=T[n];const{labels:i}=A[this.model],a=[];for(r=0;r<i.length;r++)a.push(t[i[r]]);this.color=x(a)}if(N[this.model])for(n=A[this.model].channels,r=0;r<n;r++){const t=N[this.model][r];t&&(this.color[r]=t(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}I.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in l.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const r=1===e.valpha?e.color:[...e.color,this.valpha];return l.to[e.model](...r)},percentString(t){const e=this.rgb().round("number"==typeof t?t:1),r=1===e.valpha?e.color:[...e.color,this.valpha];return l.to.rgb.percent(...r)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const t={},{channels:e}=A[this.model],{labels:r}=A[this.model];for(let n=0;n<e;n++)t[r[n]]=this.color[n];return 1!==this.valpha&&(t.alpha=this.valpha),t},unitArray(){const t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,1!==this.valpha&&t.push(this.valpha),t},unitObject(){const t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,1!==this.valpha&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new I([...this.color.map(_(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new I([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:C("rgb",0,O(255)),green:C("rgb",1,O(255)),blue:C("rgb",2,O(255)),hue:C(["hsl","hsv","hsl","hwb","hcg"],0,(t=>(t%360+360)%360)),saturationl:C("hsl",1,O(100)),lightness:C("hsl",2,O(100)),saturationv:C("hsv",1,O(100)),value:C("hsv",2,O(100)),chroma:C("hcg",1,O(100)),gray:C("hcg",2,O(100)),white:C("hwb",1,O(100)),wblack:C("hwb",2,O(100)),cyan:C("cmyk",0,O(100)),magenta:C("cmyk",1,O(100)),yellow:C("cmyk",2,O(100)),black:C("cmyk",3,O(100)),x:C("xyz",0,O(95.047)),y:C("xyz",1,O(100)),z:C("xyz",2,O(108.833)),l:C("lab",0,O(100)),a:C("lab",1),b:C("lab",2),keyword(t){return void 0!==t?new I(t):A[this.model].keyword(this.color)},hex(t){return void 0!==t?new I(t):l.to.hex(...this.rgb().round().color)},hexa(t){if(void 0!==t)return new I(t);const e=this.rgb().round().color;let r=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===r.length&&(r="0"+r),l.to.hex(...e)+r},rgbNumber(){const t=this.rgb().color;return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},luminosity(){const t=this.rgb().color,e=[];for(const[r,n]of t.entries()){const t=n/255;e[r]=t<=.04045?t/12.92:((t+.055)/1.055)**2.4}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){const e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level(t){const e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){const t=this.rgb().color;return(2126*t[0]+7152*t[1]+722*t[2])/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){const e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){const e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){const e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){const e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){const t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return I.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const e=this.hsl();let r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const r=t.rgb(),n=this.rgb(),i=void 0===e?.5:e,a=2*i-1,o=r.alpha()-n.alpha(),s=((a*o==-1?a:(a+o)/(1+a*o))+1)/2,l=1-s;return I.rgb(s*r.red()+l*n.red(),s*r.green()+l*n.green(),s*r.blue()+l*n.blue(),r.alpha()*i+n.alpha()*(1-i))}};for(const t of Object.keys(A)){if(v.includes(t))continue;const{channels:e}=A[t];I.prototype[t]=function(...e){return this.model===t?new I(this):e.length>0?new I(e,t):new I([...(r=A[this.model][t].raw(this.color),Array.isArray(r)?r:[r]),this.valpha],t);var r},I[t]=function(...r){let n=r[0];return"number"==typeof n&&(n=x(r,e)),new I(n,t)}}function _(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function C(t,e,r){t=Array.isArray(t)?t:[t];for(const n of t)(N[n]||=[])[e]=r;return t=t[0],function(n){let i;return void 0!==n?(r&&(n=r(n)),i=this[t](),i.color[e]=n,i):(i=this[t]().color[e],r&&(i=r(i)),i)}}function O(t){return function(e){return Math.max(0,Math.min(t,e))}}function x(t,e){for(let r=0;r<e;r++)"number"!=typeof t[r]&&(t[r]=0);return t}const R=I;function L(){const t=window?.matchMedia?.("(prefers-color-scheme: dark)")?.matches,e=document.body.getAttribute("data-themes")?.includes("dark");return e||t||!1}function D(t){return F(t,"#ffffff")<4.5}function S(t,e){const r=function(t){return M(t)>.6}(e),n=(i=e,new R(r?t:"#ffffff").mix(new R(i),.83).hex());var i;let a=F(t,n);const o=function(){const t=window?.matchMedia?.("(forced-colors: active)")?.matches,e=document.body.getAttribute("data-themes")?.includes("highcontrast");return e||t||!1}()?5.6:3.2;let s=0,l=t;const c=(r?-100:100)/255;for(;a<o&&s++<100;){const t=k(l),e=Math.max(0,Math.min(255,t.l+c));l=P({h:t.h,s:t.s,l:e}),a=F(l,n)}return l}function M(t){const e=function(t){return new R(t).rgb().array()}(t).map((t=>(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))),[r,n,i]=e;return.2126*r+.7152*n+.0722*i}function F(t,e){const r=M(t)+.05,n=M(e)+.05;return Math.max(r,n)/Math.min(r,n)}function k(t){const e=new R(t).hsl();return{h:e.color[0],s:e.color[1],l:e.color[2]}}function P(t){return new R(t).hex()}},59169:()=>{},63779:()=>{},73911:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(71354),i=r.n(n),a=r(76314),o=r.n(a)()(i());o.push([t.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:20px;text-align:center}.files-list__system-tag--more{overflow:visible;text-overflow:initial}.files-list__system-tag+.files-list__system-tag{margin-inline-start:5px}.files-list__system-tag[data-systemtag-color]{border-color:var(--systemtag-color);color:var(--systemtag-color);border-width:2px;line-height:18px}@media(min-width: 512px){.files-list__system-tags{display:flex}}","",{version:3,sources:["webpack://./apps/systemtags/src/css/fileEntryInlineSystemTags.scss"],names:[],mappings:"AAKA,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,uBAAA,CAID,8CACC,mCAAA,CACA,4BAAA,CACA,gBAAA,CACA,gBAAA,CAIF,yBACC,yBACC,YAAA,CAAA",sourcesContent:["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\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: 20px; // min-size - 2 * 5px padding - 2 * 1px border\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-inline-start: 5px;\n\t}\n\n\t// With color\n\t&[data-systemtag-color] {\n\t\tborder-color: var(--systemtag-color);\n\t\tcolor: var(--systemtag-color);\n\t\tborder-width: 2px;\n\t\tline-height: 18px; // min-size - 2 * 5px padding - 2 * 2px border\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 s=o},77199:()=>{},82528:(t,e,r)=>{"use strict";r.d(e,{Gw:()=>h,T0:()=>m,VZ:()=>d,b0:()=>p,un:()=>c,xI:()=>u}),r(65043);var n=r(53334),i=r(8828),a=r(12686),o=r(25631),s=r(61338);r(56760);const l='<?xml version="1.0"?>\n<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.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\t<d:getetag />\n\t\t<nc:color />\n\t</d:prop>\n</d:propfind>',c=async()=>{try{const{data:t}=await i.R.getDirectoryContents("/systemtags",{data:l,details:!0,glob:"/systemtags/*"});return(0,a.rL)(t)}catch(t){throw o.A.error((0,n.t)("systemtags","Failed to load tags"),{error:t}),new Error((0,n.t)("systemtags","Failed to load tags"))}},u=async t=>{const e="/systemtags/"+t;try{const{data:t}=await i.R.stat(e,{data:l,details:!0});return(0,a.rL)([t])[0]}catch(t){throw o.A.error((0,n.t)("systemtags","Failed to load tag"),{error:t}),new Error((0,n.t)("systemtags","Failed to load tag"))}},d=async t=>{const e=(0,a._3)(t);try{const{headers:r}=await i.R.customRequest("/systemtags",{method:"POST",data:e}),l=r.get("content-location");if(l)return(0,s.Ic)("systemtags:tag:created",t),(0,a.GX)(l);throw o.A.error((0,n.t)("systemtags",'Missing "Content-Location" header')),new Error((0,n.t)("systemtags",'Missing "Content-Location" header'))}catch(t){if(409===t?.response?.status)throw o.A.error((0,n.t)("systemtags","A tag with the same name already exists"),{error:t}),new Error((0,n.t)("systemtags","A tag with the same name already exists"));throw o.A.error((0,n.t)("systemtags","Failed to create tag"),{error:t}),new Error((0,n.t)("systemtags","Failed to create tag"))}},h=async t=>{const e="/systemtags/"+t.id,r=`<?xml version="1.0"?>\n\t<d:propertyupdate xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">\n\t\t<d:set>\n\t\t\t<d:prop>\n\t\t\t\t<oc:display-name>${t.displayName}</oc:display-name>\n\t\t\t\t<oc:user-visible>${t.userVisible}</oc:user-visible>\n\t\t\t\t<oc:user-assignable>${t.userAssignable}</oc:user-assignable>\n\t\t\t\t<nc:color>${t?.color||null}</nc:color>\n\t\t\t</d:prop>\n\t\t</d:set>\n\t</d:propertyupdate>`;try{await i.R.customRequest(e,{method:"PROPPATCH",data:r}),(0,s.Ic)("systemtags:tag:updated",t)}catch(t){throw o.A.error((0,n.t)("systemtags","Failed to update tag"),{error:t}),new Error((0,n.t)("systemtags","Failed to update tag"))}},p=async function(t,e){const r=`/systemtags/${t.id}/${e}`,n=await i.R.stat(r,{data:'<?xml version="1.0"?>\n\t<d:propfind xmlns:d="DAV:" xmlns:nc="http://nextcloud.org/ns">\n\t\t<d:prop>\n\t\t\t<nc:object-ids />\n\t\t\t<d:getetag />\n\t\t</d:prop>\n\t</d:propfind>',details:!0});return{etag:n?.data?.props?.getetag||'""',objects:Object.values(n?.data?.props?.["object-ids"]||[]).flat()}},m=async function(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const a=`/systemtags/${t.id}/${e}`;let o=`<?xml version="1.0"?>\n\t<d:propertyupdate xmlns:d="DAV:" xmlns:nc="http://nextcloud.org/ns">\n\t\t<d:set>\n\t\t\t<d:prop>\n\t\t\t\t<nc:object-ids>${r.map((t=>{let{id:e,type:r}=t;return`<nc:object-id><nc:id>${e}</nc:id><nc:type>${r}</nc:type></nc:object-id>`})).join("")}</nc:object-ids>\n\t\t\t</d:prop>\n\t\t</d:set>\n\t</d:propertyupdate>`;0===r.length&&(o='<?xml version="1.0"?>\n\t\t<d:propertyupdate xmlns:d="DAV:" xmlns:nc="http://nextcloud.org/ns">\n\t\t\t<d:remove>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<nc:object-ids />\n\t\t\t\t</d:prop>\n\t\t\t</d:remove>\n\t\t</d:propertyupdate>'),await i.R.customRequest(a,{method:"PROPPATCH",data:o,headers:{"if-match":n}})}},86833:()=>{}},i={};function a(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={id:t,loaded:!1,exports:{}};return n[t].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.m=n,t=[],a.O=(e,r,n,i)=>{if(!r){var o=1/0;for(u=0;u<t.length;u++){r=t[u][0],n=t[u][1],i=t[u][2];for(var s=!0,l=0;l<r.length;l++)(!1&i||o>=i)&&Object.keys(a.O).every((t=>a.O[t](r[l])))?r.splice(l--,1):(s=!1,i<o&&(o=i));if(s){t.splice(u--,1);var c=n();void 0!==c&&(e=c)}}return e}i=i||0;for(var u=t.length;u>0&&t[u-1][2]>i;u--)t[u]=t[u-1];t[u]=[r,n,i]},a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var r in e)a.o(e,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},a.f={},a.e=t=>Promise.all(Object.keys(a.f).reduce(((e,r)=>(a.f[r](t,e),e)),[])),a.u=t=>t+"-"+t+".js?v="+{640:"b2fa23a809053c6305c5",3596:"2823b44214c5288c1e46",5771:"a4e2a98efcfb7393c5bd",5810:"e0ecfcd31fb108c51bfd",7432:"1f201e1e5efef3bbb343"}[t],a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),e={},r="nextcloud:",a.l=(t,n,i,o)=>{if(e[t])e[t].push(n);else{var s,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==r+i){s=d;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",r+i),s.src=t),e[t]=[n];var h=(r,n)=>{s.onerror=s.onload=null,clearTimeout(p);var i=e[t];if(delete e[t],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((t=>t(n))),r)return r(n)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),l&&document.head.appendChild(s)}},a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),a.j=2766,(()=>{var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t})(),(()=>{a.b=document.baseURI||self.location.href;var t={2766:0,5810:0};a.f.j=(e,r)=>{var n=a.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise(((r,i)=>n=t[e]=[r,i]));r.push(n[2]=i);var o=a.p+a.u(e),s=new Error;a.l(o,(r=>{if(a.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;s.message="Loading chunk "+e+" failed.\n("+i+": "+o+")",s.name="ChunkLoadError",s.type=i,s.request=o,n[1](s)}}),"chunk-"+e,e)}},a.O.j=e=>0===t[e];var e=(e,r)=>{var n,i,o=r[0],s=r[1],l=r[2],c=0;if(o.some((e=>0!==t[e]))){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);if(l)var u=l(a)}for(e&&e(r);c<o.length;c++)i=o[c],a.o(t,i)&&t[i]&&t[i][0](),t[i]=0;return a.O(u)},r=self.webpackChunknextcloud=self.webpackChunknextcloud||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})(),a.nc=void 0;var o=a.O(void 0,[4208],(()=>a(45218)));o=a.O(o)})();
+//# sourceMappingURL=systemtags-init.js.map?v=21454a9ffdae223f252c \ No newline at end of file