|
|
import{ai as Pe,aj as $e,a1 as Me,a3 as nr,ab as ir,ac as or,ak as Gt,O as sr}from"./TrashCanOutline-Das_T9Qh.chunk.mjs";import{a as ar,u as ur}from"./index-C5gME6tY.chunk.mjs";import{g as cr}from"./Plus-ClaUDINn.chunk.mjs";function lr(i){return i&&i.split("/").map(encodeURIComponent).join("/")}function Wr(i){return i.replace(/\\/g,"/").replace(/\/[^\/]*$/,"")}function Qr(...i){return hr(...i)}function hr(...i){if(arguments.length<1)return"";const o=i.filter(E=>E.length>0);if(o.length<1)return"";const d=o[o.length-1],v=o[0].charAt(0)==="/",l=d.charAt(d.length-1)==="/",y=o.reduce((E,u)=>E.concat(u.split("/")),[]);let m=!v;const I=y.reduce((E,u)=>u===""?E:m?(m=!1,E+u):E+"/"+u,"");return l?I+"/":I}function ke(i,o,d){const v=document.querySelector(`#initial-state-${i}-${o}`);if(v===null)return d;try{return JSON.parse(atob(v.value))}catch{throw new Error(`Could not parse initial state ${o} of ${i}`)}}function re(){return ke("files_sharing","isPublic",null)??document.querySelector('input#isPublic[type="hidden"][name="isPublic"][value="1"]')!==null}function fr(){return ke("files_sharing","sharingToken",null)??document.querySelector('input#sharingToken[type="hidden"]')?.value??null}function dt(i,o,d){return o in i?Object.defineProperty(i,o,{value:d,enumerable:!0,configurable:!0,writable:!0}):i[o]=d,i}function me(i,o,d){pr(i,o),o.set(i,d)}function pr(i,o){if(o.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object")}function J(i,o){var d=Ge(i,o,"get");return dr(i,d)}function dr(i,o){return o.get?o.get.call(i):o.value}function we(i,o,d){var v=Ge(i,o,"set");return Er(i,v,d),d}function Ge(i,o,d){if(!o.has(i))throw new TypeError("attempted to "+d+" private field on non-instance");return o.get(i)}function Er(i,o,d){if(o.set)o.set.call(i,d);else{if(!o.writable)throw new TypeError("attempted to set read only private field");o.value=d}}var gr=typeof Symbol<"u"?Symbol.toStringTag:"@@toStringTag",et=new WeakMap,Ot=new WeakMap;class Ft{constructor(o){var{executor:d=()=>{},internals:v=ie(),promise:l=new Promise((y,m)=>d(y,m,I=>{v.onCancelList.push(I)}))}=o;me(this,et,{writable:!0,value:void 0}),me(this,Ot,{writable:!0,value:void 0}),dt(this,gr,"CancelablePromise"),this.cancel=this.cancel.bind(this),we(this,et,v),we(this,Ot,l||new Promise((y,m)=>d(y,m,I=>{v.onCancelList.push(I)})))}then(o,d){return Bt(J(this,Ot).then(Ct(o,J(this,et)),Ct(d,J(this,et))),J(this,et))}catch(o){return Bt(J(this,Ot).catch(Ct(o,J(this,et))),J(this,et))}finally(o,d){return d&&J(this,et).onCancelList.push(o),Bt(J(this,Ot).finally(Ct(()=>{if(o)return d&&(J(this,et).onCancelList=J(this,et).onCancelList.filter(v=>v!==o)),o()},J(this,et))),J(this,et))}cancel(){J(this,et).isCanceled=!0;var o=J(this,et).onCancelList;J(this,et).onCancelList=[];for(var d of o)if(typeof d=="function")try{d()}catch(v){console.error(v)}}isCanceled(){return J(this,et).isCanceled===!0}}class Et extends Ft{constructor(o){super({executor:o})}}dt(Et,"all",function(i){return Dt(i,Promise.all(i))}),dt(Et,"allSettled",function(i){return Dt(i,Promise.allSettled(i))}),dt(Et,"any",function(i){return Dt(i,Promise.any(i))}),dt(Et,"race",function(i){return Dt(i,Promise.race(i))}),dt(Et,"resolve",function(i){return ye(Promise.resolve(i))}),dt(Et,"reject",function(i){return ye(Promise.reject(i))}),dt(Et,"isCancelable",ne);function ye(i){return Bt(i,ie())}function ne(i){return i instanceof Et||i instanceof Ft}function Ct(i,o){if(i)return d=>{if(!o.isCanceled){var v=i(d);return ne(v)&&o.onCancelList.push(v.cancel),v}return d}}function Bt(i,o){return new Ft({internals:o,promise:i})}function Dt(i,o){var d=ie();return d.onCancelList.push(()=>{for(var v of i)ne(v)&&v.cancel()}),new Ft({internals:d,promise:o})}function ie(){return{isCanceled:!1,onCancelList:[]}}var Vt,Te;function mr(){if(Te)return Vt;Te=1;function i(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function o(l,y){for(var m="",I=0,E=-1,u=0,A,O=0;O<=l.length;++O){if(O<l.length)A=l.charCodeAt(O);else{if(A===47)break;A=47}if(A===47){if(!(E===O-1||u===1))if(E!==O-1&&u===2){if(m.length<2||I!==2||m.charCodeAt(m.length-1)!==46||m.charCodeAt(m.length-2)!==46){if(m.length>2){var B=m.lastIndexOf("/");if(B!==m.length-1){B===-1?(m="",I=0):(m=m.slice(0,B),I=m.length-1-m.lastIndexOf("/")),E=O,u=0;continue}}else if(m.length===2||m.length===1){m="",I=0,E=O,u=0;continue}}y&&(m.length>0?m+="/..":m="..",I=2)}else m.length>0?m+="/"+l.slice(E+1,O):m=l.slice(E+1,O),I=O-E-1;E=O,u=0}else A===46&&u!==-1?++u:u=-1}return m}function d(l,y){var m=y.dir||y.root,I=y.base||(y.name||"")+(y.ext||"");return m?m===y.root?m+I:m+l+I:I}var v={resolve:function(){for(var l="",y=!1,m,I=arguments.length-1;I>=-1&&!y;I--){var E;I>=0?E=arguments[I]:(m===void 0&&(m=Pe.cwd()),E=m),i(E),E.length!==0&&(l=E+"/"+l,y=E.charCodeAt(0)===47)}return l=o(l,!y),y?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(l){if(i(l),l.length===0)return".";var y=l.charCodeAt(0)===47,m=l.charCodeAt(l.length-1)===47;return l=o(l,!y),l.length===0&&!y&&(l="."),l.length>0&&m&&(l+="/"),y?"/"+l:l},isAbsolute:function(l){return i(l),l.length>0&&l.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var l,y=0;y<arguments.length;++y){var m=arguments[y];i(m),m.length>0&&(l===void 0?l=m:l+="/"+m)}return l===void 0?".":v.normalize(l)},relative:function(l,y){if(i(l),i(y),l===y||(l=v.resolve(l),y=v.resolve(y),l===y))return"";for(var m=1;m<l.length&&l.charCodeAt(m)===47;++m);for(var I=l.length,E=I-m,u=1;u<y.length&&y.charCodeAt(u)===47;++u);for(var A=y.length,O=A-u,B=E<O?E:O,F=-1,R=0;R<=B;++R){if(R===B){if(O>B){if(y.charCodeAt(u+R)===47)return y.slice(u+R+1);if(R===0)return y.slice(u+R)}else E>B&&(l.charCodeAt(m+R)===47?F=R:R===0&&(F=0));break}var rt=l.charCodeAt(m+R),V=y.charCodeAt(u+R);if(rt!==V)break;rt===47&&(F=R)}var w="";for(R=m+F+1;R<=I;++R)(R===I||l.charCodeAt(R)===47)&&(w.length===0?w+="..":w+="/..");return w.length>0?w+y.slice(u+F):(u+=F,y.charCodeAt(u)===47&&++u,y.slice(u))},_makeLong:function(l){return l},dirname:function(l){if(i(l),l.length===0)return".";for(var y=l.charCodeAt(0),m=y===47,I=-1,E=!0,u=l.length-1;u>=1;--u)if(y=l.charCodeAt(u),y===47){if(!E){I=u;break}}else E=!1;return I===-1?m?"/":".":m&&I===1?"//":l.slice(0,I)},basename:function(l,y){if(y!==void 0&&typeof y!="string")throw new TypeError('"ext" argument must be a string');i(l);var m=0,I=-1,E=!0,u;if(y!==void 0&&y.length>0&&y.length<=l.length){if(y.length===l.length&&y===l)return"";var A=y.length-1,O=-1;for(u=l.length-1;u>=0;--u){var B=l.charCodeAt(u);if(B===47){if(!E){m=u+1;break}}else O===-1&&(E=!1,O=u+1),A>=0&&(B===y.charCodeAt(A)?--A===-1&&(I=u):(A=-1,I=O))}return m===I?I=O:I===-1&&(I=l.length),l.slice(m,I)}else{for(u=l.length-1;u>=0;--u)if(l.charCodeAt(u)===47){if(!E){m=u+1;break}}else I===-1&&(E=!1,I=u+1);return I===-1?"":l.slice(m,I)}},extname:function(l){i(l);for(var y=-1,m=0,I=-1,E=!0,u=0,A=l.length-1;A>=0;--A){var O=l.charCodeAt(A);if(O===47){if(!E){m=A+1;break}continue}I===-1&&(E=!1,I=A+1),O===46?y===-1?y=A:u!==1&&(u=1):y!==-1&&(u=-1)}return y===-1||I===-1||u===0||u===1&&y===I-1&&y===m+1?"":l.slice(y,I)},format:function(l){if(l===null||typeof l!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof l);return d("/",l)},parse:function(l){i(l);var y={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return y;var m=l.charCodeAt(0),I=m===47,E;I?(y.root="/",E=1):E=0;for(var u=-1,A=0,O=-1,B=!0,F=l.length-1,R=0;F>=E;--F){if(m=l.charCodeAt(F),m===47){if(!B){A=F+1;break}continue}O===-1&&(B=!1,O=F+1),m===46?u===-1?u=F:R!==1&&(R=1):u!==-1&&(R=-1)}return u===-1||O===-1||R===0||R===1&&u===O-1&&u===A+1?O!==-1&&(A===0&&I?y.base=y.name=l.slice(1,O):y.base=y.name=l.slice(A,O)):(A===0&&I?(y.name=l.slice(1,u),y.base=l.slice(1,O)):(y.name=l.slice(A,u),y.base=l.slice(A,O)),y.ext=l.slice(u,O)),A>0?y.dir=l.slice(0,A-1):I&&(y.dir="/"),y},sep:"/",delimiter:":",win32:null,posix:null};return v.posix=v,Vt=v,Vt}var gt=mr();const Zr=$e(gt),mt=cr().setApp("@nextcloud/files").detectUser().build();var oe=(i=>(i.Folder="folder",i.File="file",i))(oe||{}),st=(i=>(i[i.NONE=0]="NONE",i[i.CREATE=4]="CREATE",i[i.READ=1]="READ",i[i.UPDATE=2]="UPDATE",i[i.DELETE=8]="DELETE",i[i.SHARE=16]="SHARE",i[i.ALL=31]="ALL",i))(st||{});const Ve=function(i,o){return i.match(o)!==null},pt=(i,o)=>{if(i.id&&typeof i.id!="number")throw new Error("Invalid id type of value");if(!i.source)throw new Error("Missing mandatory source");try{new URL(i.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!i.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(i.displayname&&typeof i.displayname!="string")throw new Error("Invalid displayname type");if(i.mtime&&!(i.mtime instanceof Date))throw new Error("Invalid mtime type");if(i.crtime&&!(i.crtime instanceof Date))throw new Error("Invalid crtime type");if(!i.mime||typeof i.mime!="string"||!i.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in i&&typeof i.size!="number"&&i.size!==void 0)throw new Error("Invalid size type");if("permissions"in i&&i.permissions!==void 0&&!(typeof i.permissions=="number"&&i.permissions>=st.NONE&&i.permissions<=st.ALL))throw new Error("Invalid permissions");if(i.owner&&i.owner!==null&&typeof i.owner!="string")throw new Error("Invalid owner type");if(i.attributes&&typeof i.attributes!="object")throw new Error("Invalid attributes type");if(i.root&&typeof i.root!="string")throw new Error("Invalid root type");if(i.root&&!i.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(i.root&&!i.source.includes(i.root))throw new Error("Root must be part of the source");if(i.root&&Ve(i.source,o)){const d=i.source.match(o)[0];if(!i.source.includes(gt.join(d,i.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(i.status&&!Object.values(se).includes(i.status))throw new Error("Status must be a valid NodeStatus")};var se=(i=>(i.NEW="new",i.FAILED="failed",i.LOADING="loading",i.LOCKED="locked",i))(se||{});class xt{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(xt.prototype)).filter(o=>typeof o[1].get=="function"&&o[0]!=="__proto__").map(o=>o[0]);handler={set:(o,d,v)=>this.readonlyAttributes.includes(d)?!1:Reflect.set(o,d,v),deleteProperty:(o,d)=>this.readonlyAttributes.includes(d)?!1:Reflect.deleteProperty(o,d),get:(o,d,v)=>this.readonlyAttributes.includes(d)?(mt.warn(`Accessing "Node.attributes.${d}" is deprecated, access it directly on the Node instance.`),Reflect.get(this,d)):Reflect.get(o,d,v)};constructor(o,d){o.mime||(o.mime="application/octet-stream"),pt(o,d||this._knownDavService),this._data={displayname:o.attributes?.displayname,...o,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(o.attributes??{}),d&&(this._knownDavService=d)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:o}=new URL(this.source);return o+lr(this.source.slice(o.length))}get basename(){return gt.basename(this.source)}get displayname(){return this._data.displayname||this.basename}set displayname(o){pt({...this._data,displayname:o},this._knownDavService),this._data.displayname=o}get extension(){return gt.extname(this.source)}get dirname(){if(this.root){let d=this.source;this.isDavResource&&(d=d.split(this._knownDavService).pop());const v=d.indexOf(this.root),l=this.root.replace(/\/$/,"");return gt.dirname(d.slice(v+l.length)||"/")}const o=new URL(this.source);return gt.dirname(o.pathname)}get mime(){return this._data.mime||"application/octet-stream"}set mime(o){o??="application/octet-stream",pt({...this._data,mime:o},this._knownDavService),this._data.mime=o}get mtime(){return this._data.mtime}set mtime(o){pt({...this._data,mtime:o},this._knownDavService),this._data.mtime=o}get crtime(){return this._data.crtime}get size(){return this._data.size}set size(o){pt({...this._data,size:o},this._knownDavService),this.updateMtime(),this._data.size=o}get attributes(){return this._attributes}get permissions(){return this.owner===null&&!this.isDavResource?st.READ:this._data.permissions!==void 0?this._data.permissions:st.NONE}set permissions(o){pt({...this._data,permissions:o},this._knownDavService),this.updateMtime(),this._data.permissions=o}get owner(){return this.isDavResource?this._data.owner:null}get isDavResource(){return Ve(this.source,this._knownDavService)}get isDavRessource(){return this.isDavResource}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavResource&>.dirname(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let o=this.source;this.isDavResource&&(o=o.split(this._knownDavService).pop());const d=o.indexOf(this.root),v=this.root.replace(/\/$/,"");return o.slice(d+v.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id}get status(){return this._data?.status}set status(o){pt({...this._data,status:o},this._knownDavService),this._data.status=o}get data(){return structuredClone(this._data)}move(o){pt({...this._data,source:o},this._knownDavService);const d=this.basename;this._data.source=o,this.displayname===d&&this.basename!==d&&(this.displayname=this.basename)}rename(o){if(o.includes("/"))throw new Error("Invalid basename");this.move(gt.dirname(this.source)+"/"+o)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}update(o){for(const[d,v]of Object.entries(o))try{v===void 0?delete this.attributes[d]:this.attributes[d]=v}catch(l){if(l instanceof TypeError)continue;throw l}}}class ae extends xt{get type(){return oe.File}clone(){return new ae(this.data)}}class ue extends xt{constructor(o){super({...o,mime:"httpd/unix-directory"})}get type(){return oe.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}clone(){return new ue(this.data)}}const wr=function(i=""){let o=st.NONE;return i&&((i.includes("C")||i.includes("K"))&&(o|=st.CREATE),i.includes("G")&&(o|=st.READ),(i.includes("W")||i.includes("N")||i.includes("V"))&&(o|=st.UPDATE),i.includes("D")&&(o|=st.DELETE),i.includes("R")&&(o|=st.SHARE)),o},je=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:creationdate","d:displayname","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],Xe={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},Kr=function(i,o={nc:"http://nextcloud.org/ns"}){typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...je],window._nc_dav_namespaces={...Xe});const d={...window._nc_dav_namespaces,...o};if(window._nc_dav_properties.find(l=>l===i))return mt.warn(`${i} already registered`,{prop:i}),!1;if(i.startsWith("<")||i.split(":").length!==2)return mt.error(`${i} is not valid. See example: 'oc:fileid'`,{prop:i}),!1;const v=i.split(":")[0];return d[v]?(window._nc_dav_properties.push(i),window._nc_dav_namespaces=d,!0):(mt.error(`${i} namespace unknown`,{prop:i,namespaces:d}),!1)},Jr=function(){return typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...je]),window._nc_dav_properties.map(i=>`<${i} />`).join(" ")},tn=function(){return typeof window._nc_dav_namespaces>"u"&&(window._nc_dav_namespaces={...Xe}),Object.keys(window._nc_dav_namespaces).map(i=>`xmlns:${i}="${window._nc_dav_namespaces?.[i]}"`).join(" ")};function yr(){return re()?`/files/${fr()}`:`/files/${Me()?.uid}`}const Tr=yr();function vr(){const i=nr("dav");return re()?i.replace("remote.php","public.php"):i}const Ye=vr(),en=function(i=Ye,o={}){const d=ar(i,{headers:o});function v(l){d.setHeaders({...o,"X-Requested-With":"XMLHttpRequest",requesttoken:l??""})}return or(v),v(ir()),ur().patch("fetch",(l,y)=>{const m=y.headers;return m?.method&&(y.method=m.method,delete m.method),fetch(l,y)}),d},rn=function(i,o=Tr,d=Ye){let v=Me()?.uid;if(re())v=v??"anonymous";else if(!v)throw new Error("No user id found");const l=i.props,y=wr(l?.permissions),m=String(l?.["owner-id"]||v),I=l.fileid||0,E=new Date(Date.parse(i.lastmod)),u=new Date(Date.parse(l.creationdate)),A={id:I,source:`${d}${i.filename}`,mtime:!isNaN(E.getTime())&&E.getTime()!==0?E:void 0,crtime:!isNaN(u.getTime())&&u.getTime()!==0?u:void 0,mime:i.mime||"application/octet-stream",displayname:l.displayname!==void 0?String(l.displayname):void 0,size:l?.size||Number.parseInt(l.getcontentlength||"0"),status:I<0?se.FAILED:void 0,permissions:y,owner:m,root:o,attributes:{...i,...l,hasPreview:l?.["has-preview"]}};return delete A.attributes?.props,i.type==="file"?new ae(A):new ue(A)};var br=class extends EventTarget{dispatchTypedEvent(i,o){return super.dispatchEvent(o)}},jt={},Xt={exports:{}},ve={},be;function Ir(){return be||(be=1,(function(i){Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var o={},d={};d.byteLength=A,d.toByteArray=B,d.fromByteArray=rt;for(var v=[],l=[],y=typeof Uint8Array<"u"?Uint8Array:Array,m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",I=0,E=m.length;I<E;++I)v[I]=m[I],l[m.charCodeAt(I)]=I;l[45]=62,l[95]=63;function u(b){var N=b.length;if(N%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var S=b.indexOf("=");S===-1&&(S=N);var C=S===N?0:4-S%4;return[S,C]}function A(b){var N=u(b),S=N[0],C=N[1];return(S+C)*3/4-C}function O(b,N,S){return(N+S)*3/4-S}function B(b){var N,S=u(b),C=S[0],x=S[1],L=new y(O(b,C,x)),D=0,c=x>0?C-4:C,$;for($=0;$<c;$+=4)N=l[b.charCodeAt($)]<<18|l[b.charCodeAt($+1)]<<12|l[b.charCodeAt($+2)]<<6|l[b.charCodeAt($+3)],L[D++]=N>>16&255,L[D++]=N>>8&255,L[D++]=N&255;return x===2&&(N=l[b.charCodeAt($)]<<2|l[b.charCodeAt($+1)]>>4,L[D++]=N&255),x===1&&(N=l[b.charCodeAt($)]<<10|l[b.charCodeAt($+1)]<<4|l[b.charCodeAt($+2)]>>2,L[D++]=N>>8&255,L[D++]=N&255),L}function F(b){return v[b>>18&63]+v[b>>12&63]+v[b>>6&63]+v[b&63]}function R(b,N,S){for(var C,x=[],L=N;L<S;L+=3)C=(b[L]<<16&16711680)+(b[L+1]<<8&65280)+(b[L+2]&255),x.push(F(C));return x.join("")}function rt(b){for(var N,S=b.length,C=S%3,x=[],L=16383,D=0,c=S-C;D<c;D+=L)x.push(R(b,D,D+L>c?c:D+L));return C===1?(N=b[S-1],x.push(v[N>>2]+v[N<<4&63]+"==")):C===2&&(N=(b[S-2]<<8)+b[S-1],x.push(v[N>>10]+v[N>>4&63]+v[N<<2&63]+"=")),x.join("")}var V={};V.read=function(b,N,S,C,x){var L,D,c=x*8-C-1,$=(1<<c)-1,j=$>>1,f=-7,X=S?x-1:0,it=S?-1:1,Q=b[N+X];for(X+=it,L=Q&(1<<-f)-1,Q>>=-f,f+=c;f>0;L=L*256+b[N+X],X+=it,f-=8);for(D=L&(1<<-f)-1,L>>=-f,f+=C;f>0;D=D*256+b[N+X],X+=it,f-=8);if(L===0)L=1-j;else{if(L===$)return D?NaN:(Q?-1:1)*(1/0);D=D+Math.pow(2,C),L=L-j}return(Q?-1:1)*D*Math.pow(2,L-C)},V.write=function(b,N,S,C,x,L){var D,c,$,j=L*8-x-1,f=(1<<j)-1,X=f>>1,it=x===23?Math.pow(2,-24)-Math.pow(2,-77):0,Q=C?0:L-1,at=C?1:-1,U=N<0||N===0&&1/N<0?1:0;for(N=Math.abs(N),isNaN(N)||N===1/0?(c=isNaN(N)?1:0,D=f):(D=Math.floor(Math.log(N)/Math.LN2),N*($=Math.pow(2,-D))<1&&(D--,$*=2),D+X>=1?N+=it/$:N+=it*Math.pow(2,1-X),N*$>=2&&(D++,$/=2),D+X>=f?(c=0,D=f):D+X>=1?(c=(N*$-1)*Math.pow(2,x),D=D+X):(c=N*Math.pow(2,X-1)*Math.pow(2,x),D=0));x>=8;b[S+Q]=c&255,Q+=at,c/=256,x-=8);for(D=D<<x|c,j+=x;j>0;b[S+Q]=D&255,Q+=at,D/=256,j-=8);b[S+Q-at]|=U*128},(function(b){const N=d,S=V,C=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;b.Buffer=f,b.SlowBuffer=Ut,b.INSPECT_MAX_BYTES=50;const x=2147483647;b.kMaxLength=x;const{Uint8Array:L,ArrayBuffer:D,SharedArrayBuffer:c}=globalThis;f.TYPED_ARRAY_SUPPORT=$(),!f.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function $(){try{const t=new L(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,L.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function j(t){if(t>x)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new L(t);return Object.setPrototypeOf(e,f.prototype),e}function f(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return at(t)}return X(t,e,r)}f.poolSize=8192;function X(t,e,r){if(typeof t=="string")return U(t,e);if(D.isView(t))return It(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(ut(t,D)||t&&ut(t.buffer,D)||typeof c<"u"&&(ut(t,c)||t&&ut(t.buffer,c)))return yt(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const a=t.valueOf&&t.valueOf();if(a!=null&&a!==t)return f.from(a,e,r);const p=ct(t);if(p)return p;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return f.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}f.from=function(t,e,r){return X(t,e,r)},Object.setPrototypeOf(f.prototype,L.prototype),Object.setPrototypeOf(f,L);function it(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function Q(t,e,r){return it(t),t<=0?j(t):e!==void 0?typeof r=="string"?j(t).fill(e,r):j(t).fill(e):j(t)}f.alloc=function(t,e,r){return Q(t,e,r)};function at(t){return it(t),j(t<0?0:wt(t)|0)}f.allocUnsafe=function(t){return at(t)},f.allocUnsafeSlow=function(t){return at(t)};function U(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!f.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=Nt(t,e)|0;let a=j(r);const p=a.write(t,e);return p!==r&&(a=a.slice(0,p)),a}function bt(t){const e=t.length<0?0:wt(t.length)|0,r=j(e);for(let a=0;a<e;a+=1)r[a]=t[a]&255;return r}function It(t){if(ut(t,L)){const e=new L(t);return yt(e.buffer,e.byteOffset,e.byteLength)}return bt(t)}function yt(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let a;return e===void 0&&r===void 0?a=new L(t):r===void 0?a=new L(t,e):a=new L(t,e,r),Object.setPrototypeOf(a,f.prototype),a}function ct(t){if(f.isBuffer(t)){const e=wt(t.length)|0,r=j(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||kt(t.length)?j(0):bt(t);if(t.type==="Buffer"&&Array.isArray(t.data))return bt(t.data)}function wt(t){if(t>=x)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+x.toString(16)+" bytes");return t|0}function Ut(t){return+t!=t&&(t=0),f.alloc(+t)}f.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==f.prototype},f.compare=function(t,e){if(ut(t,L)&&(t=f.from(t,t.offset,t.byteLength)),ut(e,L)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(t)||!f.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,a=e.length;for(let p=0,g=Math.min(r,a);p<g;++p)if(t[p]!==e[p]){r=t[p],a=e[p];break}return r<a?-1:a<r?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return f.alloc(0);let r;if(e===void 0)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const a=f.allocUnsafe(e);let p=0;for(r=0;r<t.length;++r){let g=t[r];if(ut(g,L))p+g.length>a.length?(f.isBuffer(g)||(g=f.from(g)),g.copy(a,p)):L.prototype.set.call(a,g,p);else if(f.isBuffer(g))g.copy(a,p);else throw new TypeError('"list" argument must be an Array of Buffers');p+=g.length}return a};function Nt(t,e){if(f.isBuffer(t))return t.length;if(D.isView(t)||ut(t,D))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,a=arguments.length>2&&arguments[2]===!0;if(!a&&r===0)return 0;let p=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Mt(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return ge(t).length;default:if(p)return a?-1:Mt(t).length;e=(""+e).toLowerCase(),p=!0}}f.byteLength=Nt;function Rt(t,e,r){let a=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return St(this,e,r);case"utf8":case"utf-8":return Z(this,e,r);case"ascii":return ot(this,e,r);case"latin1":case"binary":return Pt(this,e,r);case"base64":return tt(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _t(this,e,r);default:if(a)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),a=!0}}f.prototype._isBuffer=!0;function lt(t,e,r){const a=t[e];t[e]=t[r],t[r]=a}f.prototype.swap16=function(){const t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)lt(this,e,e+1);return this},f.prototype.swap32=function(){const t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)lt(this,e,e+3),lt(this,e+1,e+2);return this},f.prototype.swap64=function(){const t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)lt(this,e,e+7),lt(this,e+1,e+6),lt(this,e+2,e+5),lt(this,e+3,e+4);return this},f.prototype.toString=function(){const t=this.length;return t===0?"":arguments.length===0?Z(this,0,t):Rt.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:f.compare(this,t)===0},f.prototype.inspect=function(){let t="";const e=b.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},C&&(f.prototype[C]=f.prototype.inspect),f.prototype.compare=function(t,e,r,a,p){if(ut(t,L)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(e===void 0&&(e=0),r===void 0&&(r=t?t.length:0),a===void 0&&(a=0),p===void 0&&(p=this.length),e<0||r>t.length||a<0||p>this.length)throw new RangeError("out of range index");if(a>=p&&e>=r)return 0;if(a>=p)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,a>>>=0,p>>>=0,this===t)return 0;let g=p-a,_=r-e;const k=Math.min(g,_),K=this.slice(a,p),G=t.slice(e,r);for(let M=0;M<k;++M)if(K[M]!==G[M]){g=K[M],_=G[M];break}return g<_?-1:_<g?1:0};function s(t,e,r,a,p){if(t.length===0)return-1;if(typeof r=="string"?(a=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,kt(r)&&(r=p?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(p)return-1;r=t.length-1}else if(r<0)if(p)r=0;else return-1;if(typeof e=="string"&&(e=f.from(e,a)),f.isBuffer(e))return e.length===0?-1:n(t,e,r,a,p);if(typeof e=="number")return e=e&255,typeof L.prototype.indexOf=="function"?p?L.prototype.indexOf.call(t,e,r):L.prototype.lastIndexOf.call(t,e,r):n(t,[e],r,a,p);throw new TypeError("val must be string, number or Buffer")}function n(t,e,r,a,p){let g=1,_=t.length,k=e.length;if(a!==void 0&&(a=String(a).toLowerCase(),a==="ucs2"||a==="ucs-2"||a==="utf16le"||a==="utf-16le")){if(t.length<2||e.length<2)return-1;g=2,_/=2,k/=2,r/=2}function K(M,z){return g===1?M[z]:M.readUInt16BE(z*g)}let G;if(p){let M=-1;for(G=r;G<_;G++)if(K(t,G)===K(e,M===-1?0:G-M)){if(M===-1&&(M=G),G-M+1===k)return M*g}else M!==-1&&(G-=G-M),M=-1}else for(r+k>_&&(r=_-k),G=r;G>=0;G--){let M=!0;for(let z=0;z<k;z++)if(K(t,G+z)!==K(e,z)){M=!1;break}if(M)return G}return-1}f.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},f.prototype.indexOf=function(t,e,r){return s(this,t,e,r,!0)},f.prototype.lastIndexOf=function(t,e,r){return s(this,t,e,r,!1)};function T(t,e,r,a){r=Number(r)||0;const p=t.length-r;a?(a=Number(a),a>p&&(a=p)):a=p;const g=e.length;a>g/2&&(a=g/2);let _;for(_=0;_<a;++_){const k=parseInt(e.substr(_*2,2),16);if(kt(k))return _;t[r+_]=k}return _}function h(t,e,r,a){return Lt(Mt(e,t.length-r),t,r,a)}function P(t,e,r,a){return Lt(Je(e),t,r,a)}function Y(t,e,r,a){return Lt(ge(e),t,r,a)}function q(t,e,r,a){return Lt(tr(e,t.length-r),t,r,a)}f.prototype.write=function(t,e,r,a){if(e===void 0)a="utf8",r=this.length,e=0;else if(r===void 0&&typeof e=="string")a=e,r=this.length,e=0;else if(isFinite(e))e=e>>>0,isFinite(r)?(r=r>>>0,a===void 0&&(a="utf8")):(a=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const p=this.length-e;if((r===void 0||r>p)&&(r=p),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");let g=!1;for(;;)switch(a){case"hex":return T(this,t,e,r);case"utf8":case"utf-8":return h(this,t,e,r);case"ascii":case"latin1":case"binary":return P(this,t,e,r);case"base64":return Y(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,t,e,r);default:if(g)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),g=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function tt(t,e,r){return e===0&&r===t.length?N.fromByteArray(t):N.fromByteArray(t.slice(e,r))}function Z(t,e,r){r=Math.min(t.length,r);const a=[];let p=e;for(;p<r;){const g=t[p];let _=null,k=g>239?4:g>223?3:g>191?2:1;if(p+k<=r){let K,G,M,z;switch(k){case 1:g<128&&(_=g);break;case 2:K=t[p+1],(K&192)===128&&(z=(g&31)<<6|K&63,z>127&&(_=z));break;case 3:K=t[p+1],G=t[p+2],(K&192)===128&&(G&192)===128&&(z=(g&15)<<12|(K&63)<<6|G&63,z>2047&&(z<55296||z>57343)&&(_=z));break;case 4:K=t[p+1],G=t[p+2],M=t[p+3],(K&192)===128&&(G&192)===128&&(M&192)===128&&(z=(g&15)<<18|(K&63)<<12|(G&63)<<6|M&63,z>65535&&z<1114112&&(_=z))}}_===null?(_=65533,k=1):_>65535&&(_-=65536,a.push(_>>>10&1023|55296),_=56320|_&1023),a.push(_),p+=k}return W(a)}const ht=4096;function W(t){const e=t.length;if(e<=ht)return String.fromCharCode.apply(String,t);let r="",a=0;for(;a<e;)r+=String.fromCharCode.apply(String,t.slice(a,a+=ht));return r}function ot(t,e,r){let a="";r=Math.min(t.length,r);for(let p=e;p<r;++p)a+=String.fromCharCode(t[p]&127);return a}function Pt(t,e,r){let a="";r=Math.min(t.length,r);for(let p=e;p<r;++p)a+=String.fromCharCode(t[p]);return a}function St(t,e,r){const a=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>a)&&(r=a);let p="";for(let g=e;g<r;++g)p+=er[t[g]];return p}function _t(t,e,r){const a=t.slice(e,r);let p="";for(let g=0;g<a.length-1;g+=2)p+=String.fromCharCode(a[g]+a[g+1]*256);return p}f.prototype.slice=function(t,e){const r=this.length;t=~~t,e=e===void 0?r:~~e,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),e<t&&(e=t);const a=this.subarray(t,e);return Object.setPrototypeOf(a,f.prototype),a};function H(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(t,e,r){t=t>>>0,e=e>>>0,r||H(t,e,this.length);let a=this[t],p=1,g=0;for(;++g<e&&(p*=256);)a+=this[t+g]*p;return a},f.prototype.readUintBE=f.prototype.readUIntBE=function(t,e,r){t=t>>>0,e=e>>>0,r||H(t,e,this.length);let a=this[t+--e],p=1;for(;e>0&&(p*=256);)a+=this[t+--e]*p;return a},f.prototype.readUint8=f.prototype.readUInt8=function(t,e){return t=t>>>0,e||H(t,1,this.length),this[t]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(t,e){return t=t>>>0,e||H(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(t,e){return t=t>>>0,e||H(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(t,e){return t=t>>>0,e||H(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(t,e){return t=t>>>0,e||H(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readBigUInt64LE=ft(function(t){t=t>>>0,vt(t,"offset");const e=this[t],r=this[t+7];(e===void 0||r===void 0)&&At(t,this.length-8);const a=e+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,p=this[++t]+this[++t]*2**8+this[++t]*2**16+r*2**24;return BigInt(a)+(BigInt(p)<<BigInt(32))}),f.prototype.readBigUInt64BE=ft(function(t){t=t>>>0,vt(t,"offset");const e=this[t],r=this[t+7];(e===void 0||r===void 0)&&At(t,this.length-8);const a=e*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],p=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+r;return(BigInt(a)<<BigInt(32))+BigInt(p)}),f.prototype.readIntLE=function(t,e,r){t=t>>>0,e=e>>>0,r||H(t,e,this.length);let a=this[t],p=1,g=0;for(;++g<e&&(p*=256);)a+=this[t+g]*p;return p*=128,a>=p&&(a-=Math.pow(2,8*e)),a},f.prototype.readIntBE=function(t,e,r){t=t>>>0,e=e>>>0,r||H(t,e,this.length);let a=e,p=1,g=this[t+--a];for(;a>0&&(p*=256);)g+=this[t+--a]*p;return p*=128,g>=p&&(g-=Math.pow(2,8*e)),g},f.prototype.readInt8=function(t,e){return t=t>>>0,e||H(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},f.prototype.readInt16LE=function(t,e){t=t>>>0,e||H(t,2,this.length);const r=this[t]|this[t+1]<<8;return r&32768?r|4294901760:r},f.prototype.readInt16BE=function(t,e){t=t>>>0,e||H(t,2,this.length);const r=this[t+1]|this[t]<<8;return r&32768?r|4294901760:r},f.prototype.readInt32LE=function(t,e){return t=t>>>0,e||H(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t=t>>>0,e||H(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readBigInt64LE=ft(function(t){t=t>>>0,vt(t,"offset");const e=this[t],r=this[t+7];(e===void 0||r===void 0)&&At(t,this.length-8);const a=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(r<<24);return(BigInt(a)<<BigInt(32))+BigInt(e+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)}),f.prototype.readBigInt64BE=ft(function(t){t=t>>>0,vt(t,"offset");const e=this[t],r=this[t+7];(e===void 0||r===void 0)&&At(t,this.length-8);const a=(e<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(a)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+r)}),f.prototype.readFloatLE=function(t,e){return t=t>>>0,e||H(t,4,this.length),S.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t=t>>>0,e||H(t,4,this.length),S.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t=t>>>0,e||H(t,8,this.length),S.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t=t>>>0,e||H(t,8,this.length),S.read(this,t,!1,52,8)};function nt(t,e,r,a,p,g){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>p||e<g)throw new RangeError('"value" argument is out of bounds');if(r+a>t.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(t,e,r,a){if(t=+t,e=e>>>0,r=r>>>0,!a){const _=Math.pow(2,8*r)-1;nt(this,t,e,r,_,0)}let p=1,g=0;for(this[e]=t&255;++g<r&&(p*=256);)this[e+g]=t/p&255;return e+r},f.prototype.writeUintBE=f.prototype.writeUIntBE=function(t,e,r,a){if(t=+t,e=e>>>0,r=r>>>0,!a){const _=Math.pow(2,8*r)-1;nt(this,t,e,r,_,0)}let p=r-1,g=1;for(this[e+p]=t&255;--p>=0&&(g*=256);)this[e+p]=t/g&255;return e+r},f.prototype.writeUint8=f.prototype.writeUInt8=function(t,e,r){return t=+t,e=e>>>0,r||nt(this,t,e,1,255,0),this[e]=t&255,e+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(t,e,r){return t=+t,e=e>>>0,r||nt(this,t,e,2,65535,0),this[e]=t&255,this[e+1]=t>>>8,e+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(t,e,r){return t=+t,e=e>>>0,r||nt(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=t&255,e+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(t,e,r){return t=+t,e=e>>>0,r||nt(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255,e+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(t,e,r){return t=+t,e=e>>>0,r||nt(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4};function ce(t,e,r,a,p){Ee(e,a,p,t,r,7);let g=Number(e&BigInt(4294967295));t[r++]=g,g=g>>8,t[r++]=g,g=g>>8,t[r++]=g,g=g>>8,t[r++]=g;let _=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=_,_=_>>8,t[r++]=_,_=_>>8,t[r++]=_,_=_>>8,t[r++]=_,r}function le(t,e,r,a,p){Ee(e,a,p,t,r,7);let g=Number(e&BigInt(4294967295));t[r+7]=g,g=g>>8,t[r+6]=g,g=g>>8,t[r+5]=g,g=g>>8,t[r+4]=g;let _=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=_,_=_>>8,t[r+2]=_,_=_>>8,t[r+1]=_,_=_>>8,t[r]=_,r+8}f.prototype.writeBigUInt64LE=ft(function(t,e=0){return ce(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=ft(function(t,e=0){return le(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(t,e,r,a){if(t=+t,e=e>>>0,!a){const k=Math.pow(2,8*r-1);nt(this,t,e,r,k-1,-k)}let p=0,g=1,_=0;for(this[e]=t&255;++p<r&&(g*=256);)t<0&&_===0&&this[e+p-1]!==0&&(_=1),this[e+p]=(t/g>>0)-_&255;return e+r},f.prototype.writeIntBE=function(t,e,r,a){if(t=+t,e=e>>>0,!a){const k=Math.pow(2,8*r-1);nt(this,t,e,r,k-1,-k)}let p=r-1,g=1,_=0;for(this[e+p]=t&255;--p>=0&&(g*=256);)t<0&&_===0&&this[e+p+1]!==0&&(_=1),this[e+p]=(t/g>>0)-_&255;return e+r},f.prototype.writeInt8=function(t,e,r){return t=+t,e=e>>>0,r||nt(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=t&255,e+1},f.prototype.writeInt16LE=function(t,e,r){return t=+t,e=e>>>0,r||nt(this,t,e,2,32767,-32768),this[e]=t&255,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,r){return t=+t,e=e>>>0,r||nt(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=t&255,e+2},f.prototype.writeInt32LE=function(t,e,r){return t=+t,e=e>>>0,r||nt(this,t,e,4,2147483647,-2147483648),this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,r){return t=+t,e=e>>>0,r||nt(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4},f.prototype.writeBigInt64LE=ft(function(t,e=0){return ce(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=ft(function(t,e=0){return le(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function he(t,e,r,a,p,g){if(r+a>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function fe(t,e,r,a,p){return e=+e,r=r>>>0,p||he(t,e,r,4),S.write(t,e,r,a,23,4),r+4}f.prototype.writeFloatLE=function(t,e,r){return fe(this,t,e,!0,r)},f.prototype.writeFloatBE=function(t,e,r){return fe(this,t,e,!1,r)};function pe(t,e,r,a,p){return e=+e,r=r>>>0,p||he(t,e,r,8),S.write(t,e,r,a,52,8),r+8}f.prototype.writeDoubleLE=function(t,e,r){return pe(this,t,e,!0,r)},f.prototype.writeDoubleBE=function(t,e,r){return pe(this,t,e,!1,r)},f.prototype.copy=function(t,e,r,a){if(!f.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),!a&&a!==0&&(a=this.length),e>=t.length&&(e=t.length),e||(e=0),a>0&&a<r&&(a=r),a===r||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),t.length-e<a-r&&(a=t.length-e+r);const p=a-r;return this===t&&typeof L.prototype.copyWithin=="function"?this.copyWithin(e,r,a):L.prototype.set.call(t,this.subarray(r,a),e),p},f.prototype.fill=function(t,e,r,a){if(typeof t=="string"){if(typeof e=="string"?(a=e,e=0,r=this.length):typeof r=="string"&&(a=r,r=this.length),a!==void 0&&typeof a!="string")throw new TypeError("encoding must be a string");if(typeof a=="string"&&!f.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(t.length===1){const g=t.charCodeAt(0);(a==="utf8"&&g<128||a==="latin1")&&(t=g)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;e=e>>>0,r=r===void 0?this.length:r>>>0,t||(t=0);let p;if(typeof t=="number")for(p=e;p<r;++p)this[p]=t;else{const g=f.isBuffer(t)?t:f.from(t,a),_=g.length;if(_===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(p=0;p<r-e;++p)this[p+e]=g[p%_]}return this};const Tt={};function $t(t,e,r){Tt[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(a){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:a,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}$t("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),$t("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),$t("ERR_OUT_OF_RANGE",function(t,e,r){let a=`The value of "${t}" is out of range.`,p=r;return Number.isInteger(r)&&Math.abs(r)>2**32?p=de(String(r)):typeof r=="bigint"&&(p=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(p=de(p)),p+="n"),a+=` It must be ${e}. Received ${p}`,a},RangeError);function de(t){let e="",r=t.length;const a=t[0]==="-"?1:0;for(;r>=a+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function Qe(t,e,r){vt(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&At(e,t.length-(r+1))}function Ee(t,e,r,a,p,g){if(t>r||t<e){const _=typeof e=="bigint"?"n":"";let k;throw e===0||e===BigInt(0)?k=`>= 0${_} and < 2${_} ** ${(g+1)*8}${_}`:k=`>= -(2${_} ** ${(g+1)*8-1}${_}) and < 2 ** ${(g+1)*8-1}${_}`,new Tt.ERR_OUT_OF_RANGE("value",k,t)}Qe(a,p,g)}function vt(t,e){if(typeof t!="number")throw new Tt.ERR_INVALID_ARG_TYPE(e,"number",t)}function At(t,e,r){throw Math.floor(t)!==t?(vt(t,r),new Tt.ERR_OUT_OF_RANGE("offset","an integer",t)):e<0?new Tt.ERR_BUFFER_OUT_OF_BOUNDS:new Tt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${e}`,t)}const Ze=/[^+/0-9A-Za-z-_]/g;function Ke(t){if(t=t.split("=")[0],t=t.trim().replace(Ze,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function Mt(t,e){e=e||1/0;let r;const a=t.length;let p=null;const g=[];for(let _=0;_<a;++_){if(r=t.charCodeAt(_),r>55295&&r<57344){if(!p){if(r>56319){(e-=3)>-1&&g.push(239,191,189);continue}else if(_+1===a){(e-=3)>-1&&g.push(239,191,189);continue}p=r;continue}if(r<56320){(e-=3)>-1&&g.push(239,191,189),p=r;continue}r=(p-55296<<10|r-56320)+65536}else p&&(e-=3)>-1&&g.push(239,191,189);if(p=null,r<128){if((e-=1)<0)break;g.push(r)}else if(r<2048){if((e-=2)<0)break;g.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;g.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;g.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return g}function Je(t){const e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function tr(t,e){let r,a,p;const g=[];for(let _=0;_<t.length&&!((e-=2)<0);++_)r=t.charCodeAt(_),a=r>>8,p=r%256,g.push(p),g.push(a);return g}function ge(t){return N.toByteArray(Ke(t))}function Lt(t,e,r,a){let p;for(p=0;p<a&&!(p+r>=e.length||p>=t.length);++p)e[p+r]=t[p];return p}function ut(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function kt(t){return t!==t}const er=(function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const a=r*16;for(let p=0;p<16;++p)e[a+p]=t[r]+t[p]}return e})();function ft(t){return typeof BigInt>"u"?rr:t}function rr(){throw new Error("BigInt not supported")}})(o);const w=o.Buffer;i.Blob=o.Blob,i.BlobOptions=o.BlobOptions,i.Buffer=o.Buffer,i.File=o.File,i.FileOptions=o.FileOptions,i.INSPECT_MAX_BYTES=o.INSPECT_MAX_BYTES,i.SlowBuffer=o.SlowBuffer,i.TranscodeEncoding=o.TranscodeEncoding,i.atob=o.atob,i.btoa=o.btoa,i.constants=o.constants,i.default=w,i.isAscii=o.isAscii,i.isUtf8=o.isUtf8,i.kMaxLength=o.kMaxLength,i.kStringMaxLength=o.kStringMaxLength,i.resolveObjectURL=o.resolveObjectURL,i.transcode=o.transcode})(ve)),ve}var Ie;function Nr(){return Ie||(Ie=1,(function(i,o){var d=Ir(),v=d.Buffer;function l(m,I){for(var E in m)I[E]=m[E]}v.from&&v.alloc&&v.allocUnsafe&&v.allocUnsafeSlow?i.exports=d:(l(d,o),o.Buffer=y);function y(m,I,E){return v(m,I,E)}l(v,y),y.from=function(m,I,E){if(typeof m=="number")throw new TypeError("Argument must not be a number");return v(m,I,E)},y.alloc=function(m,I,E){if(typeof m!="number")throw new TypeError("Argument must be a number");var u=v(m);return I!==void 0?typeof E=="string"?u.fill(I,E):u.fill(I):u.fill(0),u},y.allocUnsafe=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return v(m)},y.allocUnsafeSlow=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return d.SlowBuffer(m)}})(Xt,Xt.exports)),Xt.exports}var Ne;function _r(){if(Ne)return jt;Ne=1;var i=Nr().Buffer,o=i.isEncoding||function(w){switch(w=""+w,w&&w.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function d(w){if(!w)return"utf8";for(var b;;)switch(w){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return w;default:if(b)return;w=(""+w).toLowerCase(),b=!0}}function v(w){var b=d(w);if(typeof b!="string"&&(i.isEncoding===o||!o(w)))throw new Error("Unknown encoding: "+w);return b||w}jt.StringDecoder=l;function l(w){this.encoding=v(w);var b;switch(this.encoding){case"utf16le":this.text=O,this.end=B,b=4;break;case"utf8":this.fillLast=E,b=4;break;case"base64":this.text=F,this.end=R,b=3;break;default:this.write=rt,this.end=V;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(b)}l.prototype.write=function(w){if(w.length===0)return"";var b,N;if(this.lastNeed){if(b=this.fillLast(w),b===void 0)return"";N=this.lastNeed,this.lastNeed=0}else N=0;return N<w.length?b?b+this.text(w,N):this.text(w,N):b||""},l.prototype.end=A,l.prototype.text=u,l.prototype.fillLast=function(w){if(this.lastNeed<=w.length)return w.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);w.copy(this.lastChar,this.lastTotal-this.lastNeed,0,w.length),this.lastNeed-=w.length};function y(w){return w<=127?0:w>>5===6?2:w>>4===14?3:w>>3===30?4:w>>6===2?-1:-2}function m(w,b,N){var S=b.length-1;if(S<N)return 0;var C=y(b[S]);return C>=0?(C>0&&(w.lastNeed=C-1),C):--S<N||C===-2?0:(C=y(b[S]),C>=0?(C>0&&(w.lastNeed=C-2),C):--S<N||C===-2?0:(C=y(b[S]),C>=0?(C>0&&(C===2?C=0:w.lastNeed=C-3),C):0))}function I(w,b,N){if((b[0]&192)!==128)return w.lastNeed=0,"<22>";if(w.lastNeed>1&&b.length>1){if((b[1]&192)!==128)return w.lastNeed=1,"<22>";if(w.lastNeed>2&&b.length>2&&(b[2]&192)!==128)return w.lastNeed=2,"<22>"}}function E(w){var b=this.lastTotal-this.lastNeed,N=I(this,w);if(N!==void 0)return N;if(this.lastNeed<=w.length)return w.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);w.copy(this.lastChar,b,0,w.length),this.lastNeed-=w.length}function u(w,b){var N=m(this,w,b);if(!this.lastNeed)return w.toString("utf8",b);this.lastTotal=N;var S=w.length-(N-this.lastNeed);return w.copy(this.lastChar,0,S),w.toString("utf8",b,S)}function A(w){var b=w&&w.length?this.write(w):"";return this.lastNeed?b+"<22>":b}function O(w,b){if((w.length-b)%2===0){var N=w.toString("utf16le",b);if(N){var S=N.charCodeAt(N.length-1);if(S>=55296&&S<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1],N.slice(0,-1)}return N}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=w[w.length-1],w.toString("utf16le",b,w.length-1)}function B(w){var b=w&&w.length?this.write(w):"";if(this.lastNeed){var N=this.lastTotal-this.lastNeed;return b+this.lastChar.toString("utf16le",0,N)}return b}function F(w,b){var N=(w.length-b)%3;return N===0?w.toString("base64",b):(this.lastNeed=3-N,this.lastTotal=3,N===1?this.lastChar[0]=w[w.length-1]:(this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1]),w.toString("base64",b,w.length-N))}function R(w){var b=w&&w.length?this.write(w):"";return this.lastNeed?b+this.lastChar.toString("base64",0,3-this.lastNeed):b}function rt(w){return w.toString(this.encoding)}function V(w){return w&&w.length?this.write(w):""}return jt}var Ar=_r();const Or=$e(Ar);var Yt={},qe=(i=>(i.DEFAULT="default",i.HIDDEN="hidden",i))(qe||{});class nn{_action;constructor(o){this.validateAction(o),this._action=o}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(o){if(!o.id||typeof o.id!="string")throw new Error("Invalid id");if(!o.displayName||typeof o.displayName!="function")throw new Error("Invalid displayName function");if("title"in o&&typeof o.title!="function")throw new Error("Invalid title function");if(!o.iconSvgInline||typeof o.iconSvgInline!="function")throw new Error("Invalid iconSvgInline function");if(!o.exec||typeof o.exec!="function")throw new Error("Invalid exec function");if("enabled"in o&&typeof o.enabled!="function")throw new Error("Invalid enabled function");if("execBatch"in o&&typeof o.execBatch!="function")throw new Error("Invalid execBatch function");if("order"in o&&typeof o.order!="number")throw new Error("Invalid order");if(o.destructive!==void 0&&typeof o.destructive!="boolean")throw new Error("Invalid destructive flag");if("parent"in o&&typeof o.parent!="string")throw new Error("Invalid parent");if(o.default&&!Object.values(qe).includes(o.default))throw new Error("Invalid default");if("inline"in o&&typeof o.inline!="function")throw new Error("Invalid inline function");if("renderInline"in o&&typeof o.renderInline!="function")throw new Error("Invalid renderInline function");if("hotkey"in o&&o.hotkey!==void 0){if(typeof o.hotkey!="object")throw new Error("Invalid hotkey configuration");if(typeof o.hotkey.key!="string"||!o.hotkey.key)throw new Error("Missing or invalid hotkey key");if(typeof o.hotkey.description!="string"||!o.hotkey.description)throw new Error("Missing or invalid hotkey description")}}}const on=function(i){if(typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],mt.debug("FileActions initialized")),window._nc_fileactions.find(o=>o.id===i.id)){mt.error(`FileAction ${i.id} already registered`,{action:i});return}window._nc_fileactions.push(i)};class sn{_action;constructor(o){this.validateAction(o),this._action=o}get id(){return this._action.id}get displayName(){return this._action.displayName}get iconSvgInline(){return this._action.iconSvgInline}get order(){return this._action.order}get enabled(){return this._action.enabled}get exec(){return this._action.exec}validateAction(o){if(!o.id||typeof o.id!="string")throw new Error("Invalid id");if(!o.displayName||typeof o.displayName!="function")throw new Error("Invalid displayName function");if("iconSvgInline"in o&&typeof o.iconSvgInline!="function")throw new Error("Invalid iconSvgInline function");if("order"in o&&typeof o.order!="number")throw new Error("Invalid order");if("enabled"in o&&typeof o.enabled!="function")throw new Error("Invalid enabled function");if(!o.exec||typeof o.exec!="function")throw new Error("Invalid exec function")}}const an=i=>{if(typeof window._nc_filelistactions>"u"&&(window._nc_filelistactions=[]),window._nc_filelistactions.find(o=>o.id===i.id)){mt.error(`FileListAction with id "${i.id}" is already registered`,{action:i});return}window._nc_filelistactions.push(i)};function Rr(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var _e,Ae;function He(){return Ae||(Ae=1,_e=typeof Pe=="object"&&Yt&&Yt.NODE_DEBUG&&/\bsemver\b/i.test(Yt.NODE_DEBUG)?(...i)=>console.error("SEMVER",...i):()=>{}),_e}var qt,Oe;function ze(){if(Oe)return qt;Oe=1;const i="2.0.0",o=256,d=Number.MAX_SAFE_INTEGER||9007199254740991,v=16,l=o-6;return qt={MAX_LENGTH:o,MAX_SAFE_COMPONENT_LENGTH:v,MAX_SAFE_BUILD_LENGTH:l,MAX_SAFE_INTEGER:d,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:i,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},qt}var Ht={exports:{}},Re;function Sr(){return Re||(Re=1,(function(i,o){const{MAX_SAFE_COMPONENT_LENGTH:d,MAX_SAFE_BUILD_LENGTH:v,MAX_LENGTH:l}=ze(),y=He();o=i.exports={};const m=o.re=[],I=o.safeRe=[],E=o.src=[],u=o.t={};let A=0;const O="[a-zA-Z0-9-]",B=[["\\s",1],["\\d",l],[O,v]],F=rt=>{for(const[V,w]of B)rt=rt.split(`${V}*`).join(`${V}{0,${w}}`).split(`${V}+`).join(`${V}{1,${w}}`);return rt},R=(rt,V,w)=>{const b=F(V),N=A++;y(rt,N,V),u[rt]=N,E[N]=V,m[N]=new RegExp(V,w?"g":void 0),I[N]=new RegExp(b,w?"g":void 0)};R("NUMERICIDENTIFIER","0|[1-9]\\d*"),R("NUMERICIDENTIFIERLOOSE","\\d+"),R("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${O}*`),R("MAINVERSION",`(${E[u.NUMERICIDENTIFIER]})\\.(${E[u.NUMERICIDENTIFIER]})\\.(${E[u.NUMERICIDENTIFIER]})`),R("MAINVERSIONLOOSE",`(${E[u.NUMERICIDENTIFIERLOOSE]})\\.(${E[u.NUMERICIDENTIFIERLOOSE]})\\.(${E[u.NUMERICIDENTIFIERLOOSE]})`),R("PRERELEASEIDENTIFIER",`(?:${E[u.NUMERICIDENTIFIER]}|${E[u.NONNUMERICIDENTIFIER]})`),R("PRERELEASEIDENTIFIERLOOSE",`(?:${E[u.NUMERICIDENTIFIERLOOSE]}|${E[u.NONNUMERICIDENTIFIER]})`),R("PRERELEASE",`(?:-(${E[u.PRERELEASEIDENTIFIER]}(?:\\.${E[u.PRERELEASEIDENTIFIER]})*))`),R("PRERELEASELOOSE",`(?:-?(${E[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${E[u.PRERELEASEIDENTIFIERLOOSE]})*))`),R("BUILDIDENTIFIER",`${O}+`),R("BUILD",`(?:\\+(${E[u.BUILDIDENTIFIER]}(?:\\.${E[u.BUILDIDENTIFIER]})*))`),R("FULLPLAIN",`v?${E[u.MAINVERSION]}${E[u.PRERELEASE]}?${E[u.BUILD]}?`),R("FULL",`^${E[u.FULLPLAIN]}$`),R("LOOSEPLAIN",`[v=\\s]*${E[u.MAINVERSIONLOOSE]}${E[u.PRERELEASELOOSE]}?${E[u.BUILD]}?`),R("LOOSE",`^${E[u.LOOSEPLAIN]}$`),R("GTLT","((?:<|>)?=?)"),R("XRANGEIDENTIFIERLOOSE",`${E[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),R("XRANGEIDENTIFIER",`${E[u.NUMERICIDENTIFIER]}|x|X|\\*`),R("XRANGEPLAIN",`[v=\\s]*(${E[u.XRANGEIDENTIFIER]})(?:\\.(${E[u.XRANGEIDENTIFIER]})(?:\\.(${E[u.XRANGEIDENTIFIER]})(?:${E[u.PRERELEASE]})?${E[u.BUILD]}?)?)?`),R("XRANGEPLAINLOOSE",`[v=\\s]*(${E[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${E[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${E[u.XRANGEIDENTIFIERLOOSE]})(?:${E[u.PRERELEASELOOSE]})?${E[u.BUILD]}?)?)?`),R("XRANGE",`^${E[u.GTLT]}\\s*${E[u.XRANGEPLAIN]}$`),R("XRANGELOOSE",`^${E[u.GTLT]}\\s*${E[u.XRANGEPLAINLOOSE]}$`),R("COERCEPLAIN",`(^|[^\\d])(\\d{1,${d}})(?:\\.(\\d{1,${d}}))?(?:\\.(\\d{1,${d}}))?`),R("COERCE",`${E[u.COERCEPLAIN]}(?:$|[^\\d])`),R("COERCEFULL",E[u.COERCEPLAIN]+`(?:${E[u.PRERELEASE]})?(?:${E[u.BUILD]})?(?:$|[^\\d])`),R("COERCERTL",E[u.COERCE],!0),R("COERCERTLFULL",E[u.COERCEFULL],!0),R("LONETILDE","(?:~>?)"),R("TILDETRIM",`(\\s*)${E[u.LONETILDE]}\\s+`,!0),o.tildeTrimReplace="$1~",R("TILDE",`^${E[u.LONETILDE]}${E[u.XRANGEPLAIN]}$`),R("TILDELOOSE",`^${E[u.LONETILDE]}${E[u.XRANGEPLAINLOOSE]}$`),R("LONECARET","(?:\\^)"),R("CARETTRIM",`(\\s*)${E[u.LONECARET]}\\s+`,!0),o.caretTrimReplace="$1^",R("CARET",`^${E[u.LONECARET]}${E[u.XRANGEPLAIN]}$`),R("CARETLOOSE",`^${E[u.LONECARET]}${E[u.XRANGEPLAINLOOSE]}$`),R("COMPARATORLOOSE",`^${E[u.GTLT]}\\s*(${E[u.LOOSEPLAIN]})$|^$`),R("COMPARATOR",`^${E[u.GTLT]}\\s*(${E[u.FULLPLAIN]})$|^$`),R("COMPARATORTRIM",`(\\s*)${E[u.GTLT]}\\s*(${E[u.LOOSEPLAIN]}|${E[u.XRANGEPLAIN]})`,!0),o.comparatorTrimReplace="$1$2$3",R("HYPHENRANGE",`^\\s*(${E[u.XRANGEPLAIN]})\\s+-\\s+(${E[u.XRANGEPLAIN]})\\s*$`),R("HYPHENRANGELOOSE",`^\\s*(${E[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${E[u.XRANGEPLAINLOOSE]})\\s*$`),R("STAR","(<|>)?=?\\s*\\*"),R("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),R("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Ht,Ht.exports)),Ht.exports}var zt,Se;function Lr(){if(Se)return zt;Se=1;const i=Object.freeze({loose:!0}),o=Object.freeze({});return zt=d=>d?typeof d!="object"?i:d:o,zt}var Wt,Le;function Cr(){if(Le)return Wt;Le=1;const i=/^[0-9]+$/,o=(d,v)=>{const l=i.test(d),y=i.test(v);return l&&y&&(d=+d,v=+v),d===v?0:l&&!y?-1:y&&!l?1:d<v?-1:1};return Wt={compareIdentifiers:o,rcompareIdentifiers:(d,v)=>o(v,d)},Wt}var Qt,Ce;function We(){if(Ce)return Qt;Ce=1;const i=He(),{MAX_LENGTH:o,MAX_SAFE_INTEGER:d}=ze(),{safeRe:v,t:l}=Sr(),y=Lr(),{compareIdentifiers:m}=Cr();class I{constructor(u,A){if(A=y(A),u instanceof I){if(u.loose===!!A.loose&&u.includePrerelease===!!A.includePrerelease)return u;u=u.version}else if(typeof u!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof u}".`);if(u.length>o)throw new TypeError(`version is longer than ${o} characters`);i("SemVer",u,A),this.options=A,this.loose=!!A.loose,this.includePrerelease=!!A.includePrerelease;const O=u.trim().match(A.loose?v[l.LOOSE]:v[l.FULL]);if(!O)throw new TypeError(`Invalid Version: ${u}`);if(this.raw=u,this.major=+O[1],this.minor=+O[2],this.patch=+O[3],this.major>d||this.major<0)throw new TypeError("Invalid major version");if(this.minor>d||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>d||this.patch<0)throw new TypeError("Invalid patch version");O[4]?this.prerelease=O[4].split(".").map(B=>{if(/^[0-9]+$/.test(B)){const F=+B;if(F>=0&&F<d)return F}return B}):this.prerelease=[],this.build=O[5]?O[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(u){if(i("SemVer.compare",this.version,this.options,u),!(u instanceof I)){if(typeof u=="string"&&u===this.version)return 0;u=new I(u,this.options)}return u.version===this.version?0:this.compareMain(u)||this.comparePre(u)}compareMain(u){return u instanceof I||(u=new I(u,this.options)),m(this.major,u.major)||m(this.minor,u.minor)||m(this.patch,u.patch)}comparePre(u){if(u instanceof I||(u=new I(u,this.options)),this.prerelease.length&&!u.prerelease.length)return-1;if(!this.prerelease.length&&u.prerelease.length)return 1;if(!this.prerelease.length&&!u.prerelease.length)return 0;let A=0;do{const O=this.prerelease[A],B=u.prerelease[A];if(i("prerelease compare",A,O,B),O===void 0&&B===void 0)return 0;if(B===void 0)return 1;if(O===void 0)return-1;if(O!==B)return m(O,B)}while(++A)}compareBuild(u){u instanceof I||(u=new I(u,this.options));let A=0;do{const O=this.build[A],B=u.build[A];if(i("build compare",A,O,B),O===void 0&&B===void 0)return 0;if(B===void 0)return 1;if(O===void 0)return-1;if(O!==B)return m(O,B)}while(++A)}inc(u,A,O){switch(u){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",A,O);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",A,O);break;case"prepatch":this.prerelease.length=0,this.inc("patch",A,O),this.inc("pre",A,O);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",A,O),this.inc("pre",A,O);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const B=Number(O)?1:0;if(!A&&O===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[B];else{let F=this.prerelease.length;for(;--F>=0;)typeof this.prerelease[F]=="number"&&(this.prerelease[F]++,F=-2);if(F===-1){if(A===this.prerelease.join(".")&&O===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(B)}}if(A){let F=[A,B];O===!1&&(F=[A]),m(this.prerelease[0],A)===0?isNaN(this.prerelease[1])&&(this.prerelease=F):this.prerelease=F}break}default:throw new Error(`invalid increment argument: ${u}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Qt=I,Qt}var Zt,De;function Dr(){if(De)return Zt;De=1;const i=We();return Zt=(o,d,v=!1)=>{if(o instanceof i)return o;try{return new i(o,d)}catch(l){if(!v)return null;throw l}},Zt}var Kt,Be;function Br(){if(Be)return Kt;Be=1;const i=Dr();return Kt=(o,d)=>{const v=i(o,d);return v?v.version:null},Kt}Br();var Jt,Fe;function Fr(){if(Fe)return Jt;Fe=1;const i=We();return Jt=(o,d)=>new i(o,d).major,Jt}Fr();class xr extends br{_views=[];_currentView=null;register(o){if(this._views.find(d=>d.id===o.id))throw new Error(`View id ${o.id} is already registered`);this._views.push(o),this.dispatchTypedEvent("update",new CustomEvent("update"))}remove(o){const d=this._views.findIndex(v=>v.id===o);d!==-1&&(this._views.splice(d,1),this.dispatchTypedEvent("update",new CustomEvent("update")))}setActive(o){this._currentView=o;const d=new CustomEvent("updateActive",{detail:o});this.dispatchTypedEvent("updateActive",d)}get active(){return this._currentView}get views(){return this._views}}const un=function(){return typeof window._nc_navigation>"u"&&(window._nc_navigation=new xr,mt.debug("Navigation service initialized")),window._nc_navigation};class Ur{_column;constructor(o){Pr(o),this._column=o}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 Pr=function(i){if(!i.id||typeof i.id!="string")throw new Error("A column id is required");if(!i.title||typeof i.title!="string")throw new Error("A column title is required");if(!i.render||typeof i.render!="function")throw new Error("A render function is required");if(i.sort&&typeof i.sort!="function")throw new Error("Column sortFunction must be a function");if(i.summary&&typeof i.summary!="function")throw new Error("Column summary must be a function");return!0};var xe={},Ue;function $r(){return Ue||(Ue=1,(function(i){(function(o){o.parser=function(s,n){return new v(s,n)},o.SAXParser=v,o.SAXStream=A,o.createStream=u,o.MAX_BUFFER_LENGTH=64*1024;var d=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];o.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function v(s,n){if(!(this instanceof v))return new v(s,n);var T=this;y(T),T.q=T.c="",T.bufferCheckPosition=o.MAX_BUFFER_LENGTH,T.opt=n||{},T.opt.lowercase=T.opt.lowercase||T.opt.lowercasetags,T.looseCase=T.opt.lowercase?"toLowerCase":"toUpperCase",T.tags=[],T.closed=T.closedRoot=T.sawRoot=!1,T.tag=T.error=null,T.strict=!!s,T.noscript=!!(s||T.opt.noscript),T.state=c.BEGIN,T.strictEntities=T.opt.strictEntities,T.ENTITIES=T.strictEntities?Object.create(o.XML_ENTITIES):Object.create(o.ENTITIES),T.attribList=[],T.opt.xmlns&&(T.ns=Object.create(rt)),T.opt.unquotedAttributeValues===void 0&&(T.opt.unquotedAttributeValues=!s),T.trackPosition=T.opt.position!==!1,T.trackPosition&&(T.position=T.line=T.column=0),j(T,"onready")}Object.create||(Object.create=function(s){function n(){}n.prototype=s;var T=new n;return T}),Object.keys||(Object.keys=function(s){var n=[];for(var T in s)s.hasOwnProperty(T)&&n.push(T);return n});function l(s){for(var n=Math.max(o.MAX_BUFFER_LENGTH,10),T=0,h=0,P=d.length;h<P;h++){var Y=s[d[h]].length;if(Y>n)switch(d[h]){case"textNode":X(s);break;case"cdata":f(s,"oncdata",s.cdata),s.cdata="";break;case"script":f(s,"onscript",s.script),s.script="";break;default:Q(s,"Max buffer length exceeded: "+d[h])}T=Math.max(T,Y)}var q=o.MAX_BUFFER_LENGTH-T;s.bufferCheckPosition=q+s.position}function y(s){for(var n=0,T=d.length;n<T;n++)s[d[n]]=""}function m(s){X(s),s.cdata!==""&&(f(s,"oncdata",s.cdata),s.cdata=""),s.script!==""&&(f(s,"onscript",s.script),s.script="")}v.prototype={end:function(){at(this)},write:lt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){m(this)}};var I;try{I=require("stream").Stream}catch{I=function(){}}I||(I=function(){});var E=o.EVENTS.filter(function(s){return s!=="error"&&s!=="end"});function u(s,n){return new A(s,n)}function A(s,n){if(!(this instanceof A))return new A(s,n);I.apply(this),this._parser=new v(s,n),this.writable=!0,this.readable=!0;var T=this;this._parser.onend=function(){T.emit("end")},this._parser.onerror=function(h){T.emit("error",h),T._parser.error=null},this._decoder=null,E.forEach(function(h){Object.defineProperty(T,"on"+h,{get:function(){return T._parser["on"+h]},set:function(P){if(!P)return T.removeAllListeners(h),T._parser["on"+h]=P,P;T.on(h,P)},enumerable:!0,configurable:!1})})}A.prototype=Object.create(I.prototype,{constructor:{value:A}}),A.prototype.write=function(s){if(typeof Gt=="function"&&typeof Gt.isBuffer=="function"&&Gt.isBuffer(s)){if(!this._decoder){var n=Or.StringDecoder;this._decoder=new n("utf8")}s=this._decoder.write(s)}return this._parser.write(s.toString()),this.emit("data",s),!0},A.prototype.end=function(s){return s&&s.length&&this.write(s),this._parser.end(),!0},A.prototype.on=function(s,n){var T=this;return!T._parser["on"+s]&&E.indexOf(s)!==-1&&(T._parser["on"+s]=function(){var h=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);h.splice(0,0,s),T.emit.apply(T,h)}),I.prototype.on.call(T,s,n)};var O="[CDATA[",B="DOCTYPE",F="http://www.w3.org/XML/1998/namespace",R="http://www.w3.org/2000/xmlns/",rt={xml:F,xmlns:R},V=/[:_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]/,w=/[:_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-]/,b=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,N=/[#:_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 S(s){return s===" "||s===`
|