|
|
import{a4 as Pe,a5 as $e,G as Me,U as er,a6 as rr,a7 as nr,a8 as Gt,I as ir}from"./NcSettingsSection-DFav6ob5-DwBgvX10.chunk.mjs";import{a as or,u as sr}from"./TrashCanOutline-C-NZ7KHV.chunk.mjs";import{g as ar}from"./check-JUc8IOXP.chunk.mjs";function ke(o,i,d){const I=document.querySelector(`#initial-state-${o}-${i}`);if(I===null)return d;try{return JSON.parse(atob(I.value))}catch{throw new Error(`Could not parse initial state ${i} of ${o}`)}}function re(){return ke("files_sharing","isPublic",null)??document.querySelector('input#isPublic[type="hidden"][name="isPublic"][value="1"]')!==null}function ur(){return ke("files_sharing","sharingToken",null)??document.querySelector('input#sharingToken[type="hidden"]')?.value??null}function dt(o,i,d){return i in o?Object.defineProperty(o,i,{value:d,enumerable:!0,configurable:!0,writable:!0}):o[i]=d,o}function me(o,i,d){cr(o,i),i.set(o,d)}function cr(o,i){if(i.has(o))throw new TypeError("Cannot initialize the same private elements twice on an object")}function J(o,i){var d=Ge(o,i,"get");return lr(o,d)}function lr(o,i){return i.get?i.get.call(o):i.value}function we(o,i,d){var I=Ge(o,i,"set");return hr(o,I,d),d}function Ge(o,i,d){if(!i.has(o))throw new TypeError("attempted to "+d+" private field on non-instance");return i.get(o)}function hr(o,i,d){if(i.set)i.set.call(o,d);else{if(!i.writable)throw new TypeError("attempted to set read only private field");i.value=d}}var fr=typeof Symbol<"u"?Symbol.toStringTag:"@@toStringTag",et=new WeakMap,_t=new WeakMap;class Ft{constructor(i){var{executor:d=()=>{},internals:I=ie(),promise:l=new Promise((y,m)=>d(y,m,b=>{I.onCancelList.push(b)}))}=i;me(this,et,{writable:!0,value:void 0}),me(this,_t,{writable:!0,value:void 0}),dt(this,fr,"CancelablePromise"),this.cancel=this.cancel.bind(this),we(this,et,I),we(this,_t,l||new Promise((y,m)=>d(y,m,b=>{I.onCancelList.push(b)})))}then(i,d){return Bt(J(this,_t).then(Ct(i,J(this,et)),Ct(d,J(this,et))),J(this,et))}catch(i){return Bt(J(this,_t).catch(Ct(i,J(this,et))),J(this,et))}finally(i,d){return d&&J(this,et).onCancelList.push(i),Bt(J(this,_t).finally(Ct(()=>{if(i)return d&&(J(this,et).onCancelList=J(this,et).onCancelList.filter(I=>I!==i)),i()},J(this,et))),J(this,et))}cancel(){J(this,et).isCanceled=!0;var i=J(this,et).onCancelList;J(this,et).onCancelList=[];for(var d of i)if(typeof d=="function")try{d()}catch(I){console.error(I)}}isCanceled(){return J(this,et).isCanceled===!0}}class gt extends Ft{constructor(i){super({executor:i})}}dt(gt,"all",function(o){return Dt(o,Promise.all(o))}),dt(gt,"allSettled",function(o){return Dt(o,Promise.allSettled(o))}),dt(gt,"any",function(o){return Dt(o,Promise.any(o))}),dt(gt,"race",function(o){return Dt(o,Promise.race(o))}),dt(gt,"resolve",function(o){return ye(Promise.resolve(o))}),dt(gt,"reject",function(o){return ye(Promise.reject(o))}),dt(gt,"isCancelable",ne);function ye(o){return Bt(o,ie())}function ne(o){return o instanceof gt||o instanceof Ft}function Ct(o,i){if(o)return d=>{if(!i.isCanceled){var I=o(d);return ne(I)&&i.onCancelList.push(I.cancel),I}return d}}function Bt(o,i){return new Ft({internals:i,promise:o})}function Dt(o,i){var d=ie();return d.onCancelList.push(()=>{for(var I of o)ne(I)&&I.cancel()}),new Ft({internals:d,promise:i})}function ie(){return{isCanceled:!1,onCancelList:[]}}var Vt,Te;function pr(){if(Te)return Vt;Te=1;function o(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function i(l,y){for(var m="",b=0,g=-1,u=0,_,O=0;O<=l.length;++O){if(O<l.length)_=l.charCodeAt(O);else{if(_===47)break;_=47}if(_===47){if(!(g===O-1||u===1))if(g!==O-1&&u===2){if(m.length<2||b!==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="",b=0):(m=m.slice(0,B),b=m.length-1-m.lastIndexOf("/")),g=O,u=0;continue}}else if(m.length===2||m.length===1){m="",b=0,g=O,u=0;continue}}y&&(m.length>0?m+="/..":m="..",b=2)}else m.length>0?m+="/"+l.slice(g+1,O):m=l.slice(g+1,O),b=O-g-1;g=O,u=0}else _===46&&u!==-1?++u:u=-1}return m}function d(l,y){var m=y.dir||y.root,b=y.base||(y.name||"")+(y.ext||"");return m?m===y.root?m+b:m+l+b:b}var I={resolve:function(){for(var l="",y=!1,m,b=arguments.length-1;b>=-1&&!y;b--){var g;b>=0?g=arguments[b]:(m===void 0&&(m=Pe.cwd()),g=m),o(g),g.length!==0&&(l=g+"/"+l,y=g.charCodeAt(0)===47)}return l=i(l,!y),y?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(l){if(o(l),l.length===0)return".";var y=l.charCodeAt(0)===47,m=l.charCodeAt(l.length-1)===47;return l=i(l,!y),l.length===0&&!y&&(l="."),l.length>0&&m&&(l+="/"),y?"/"+l:l},isAbsolute:function(l){return o(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];o(m),m.length>0&&(l===void 0?l=m:l+="/"+m)}return l===void 0?".":I.normalize(l)},relative:function(l,y){if(o(l),o(y),l===y||(l=I.resolve(l),y=I.resolve(y),l===y))return"";for(var m=1;m<l.length&&l.charCodeAt(m)===47;++m);for(var b=l.length,g=b-m,u=1;u<y.length&&y.charCodeAt(u)===47;++u);for(var _=y.length,O=_-u,B=g<O?g: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 g>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<=b;++R)(R===b||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(o(l),l.length===0)return".";for(var y=l.charCodeAt(0),m=y===47,b=-1,g=!0,u=l.length-1;u>=1;--u)if(y=l.charCodeAt(u),y===47){if(!g){b=u;break}}else g=!1;return b===-1?m?"/":".":m&&b===1?"//":l.slice(0,b)},basename:function(l,y){if(y!==void 0&&typeof y!="string")throw new TypeError('"ext" argument must be a string');o(l);var m=0,b=-1,g=!0,u;if(y!==void 0&&y.length>0&&y.length<=l.length){if(y.length===l.length&&y===l)return"";var _=y.length-1,O=-1;for(u=l.length-1;u>=0;--u){var B=l.charCodeAt(u);if(B===47){if(!g){m=u+1;break}}else O===-1&&(g=!1,O=u+1),_>=0&&(B===y.charCodeAt(_)?--_===-1&&(b=u):(_=-1,b=O))}return m===b?b=O:b===-1&&(b=l.length),l.slice(m,b)}else{for(u=l.length-1;u>=0;--u)if(l.charCodeAt(u)===47){if(!g){m=u+1;break}}else b===-1&&(g=!1,b=u+1);return b===-1?"":l.slice(m,b)}},extname:function(l){o(l);for(var y=-1,m=0,b=-1,g=!0,u=0,_=l.length-1;_>=0;--_){var O=l.charCodeAt(_);if(O===47){if(!g){m=_+1;break}continue}b===-1&&(g=!1,b=_+1),O===46?y===-1?y=_:u!==1&&(u=1):y!==-1&&(u=-1)}return y===-1||b===-1||u===0||u===1&&y===b-1&&y===m+1?"":l.slice(y,b)},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){o(l);var y={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return y;var m=l.charCodeAt(0),b=m===47,g;b?(y.root="/",g=1):g=0;for(var u=-1,_=0,O=-1,B=!0,F=l.length-1,R=0;F>=g;--F){if(m=l.charCodeAt(F),m===47){if(!B){_=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===_+1?O!==-1&&(_===0&&b?y.base=y.name=l.slice(1,O):y.base=y.name=l.slice(_,O)):(_===0&&b?(y.name=l.slice(1,u),y.base=l.slice(1,O)):(y.name=l.slice(_,u),y.base=l.slice(_,O)),y.ext=l.slice(u,O)),_>0?y.dir=l.slice(0,_-1):b&&(y.dir="/"),y},sep:"/",delimiter:":",win32:null,posix:null};return I.posix=I,Vt=I,Vt}var Et=pr();const zr=$e(Et);function dr(o){return o&&o.split("/").map(encodeURIComponent).join("/")}function Wr(o){return o.replace(/\\/g,"/").replace(/\/[^\/]*$/,"")}function Qr(...o){if(arguments.length<1)return"";const i=o.filter(g=>g.length>0);if(i.length<1)return"";const d=i[i.length-1],I=i[0].charAt(0)==="/",l=d.charAt(d.length-1)==="/",y=i.reduce((g,u)=>g.concat(u.split("/")),[]);let m=!I;const b=y.reduce((g,u)=>u===""?g:m?(m=!1,g+u):g+"/"+u,"");return l?b+"/":b}const Ot=ar().setApp("@nextcloud/files").detectUser().build();var oe=(o=>(o.Folder="folder",o.File="file",o))(oe||{}),st=(o=>(o[o.NONE=0]="NONE",o[o.CREATE=4]="CREATE",o[o.READ=1]="READ",o[o.UPDATE=2]="UPDATE",o[o.DELETE=8]="DELETE",o[o.SHARE=16]="SHARE",o[o.ALL=31]="ALL",o))(st||{});const Ve=function(o,i){return o.match(i)!==null},pt=(o,i)=>{if(o.id&&typeof o.id!="number")throw new Error("Invalid id type of value");if(!o.source)throw new Error("Missing mandatory source");try{new URL(o.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!o.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(o.displayname&&typeof o.displayname!="string")throw new Error("Invalid displayname type");if(o.mtime&&!(o.mtime instanceof Date))throw new Error("Invalid mtime type");if(o.crtime&&!(o.crtime instanceof Date))throw new Error("Invalid crtime type");if(!o.mime||typeof o.mime!="string"||!o.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in o&&typeof o.size!="number"&&o.size!==void 0)throw new Error("Invalid size type");if("permissions"in o&&o.permissions!==void 0&&!(typeof o.permissions=="number"&&o.permissions>=st.NONE&&o.permissions<=st.ALL))throw new Error("Invalid permissions");if(o.owner&&o.owner!==null&&typeof o.owner!="string")throw new Error("Invalid owner type");if(o.attributes&&typeof o.attributes!="object")throw new Error("Invalid attributes type");if(o.root&&typeof o.root!="string")throw new Error("Invalid root type");if(o.root&&!o.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(o.root&&!o.source.includes(o.root))throw new Error("Root must be part of the source");if(o.root&&Ve(o.source,i)){const d=o.source.match(i)[0];if(!o.source.includes(Et.join(d,o.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(o.status&&!Object.values(se).includes(o.status))throw new Error("Status must be a valid NodeStatus")};var se=(o=>(o.NEW="new",o.FAILED="failed",o.LOADING="loading",o.LOCKED="locked",o))(se||{});class Ut{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(Ut.prototype)).filter(i=>typeof i[1].get=="function"&&i[0]!=="__proto__").map(i=>i[0]);handler={set:(i,d,I)=>this.readonlyAttributes.includes(d)?!1:Reflect.set(i,d,I),deleteProperty:(i,d)=>this.readonlyAttributes.includes(d)?!1:Reflect.deleteProperty(i,d),get:(i,d,I)=>this.readonlyAttributes.includes(d)?(Ot.warn(`Accessing "Node.attributes.${d}" is deprecated, access it directly on the Node instance.`),Reflect.get(this,d)):Reflect.get(i,d,I)};constructor(i,d){i.mime||(i.mime="application/octet-stream"),pt(i,d||this._knownDavService),this._data={displayname:i.attributes?.displayname,...i,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(i.attributes??{}),d&&(this._knownDavService=d)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:i}=new URL(this.source);return i+dr(this.source.slice(i.length))}get basename(){return Et.basename(this.source)}get displayname(){return this._data.displayname||this.basename}set displayname(i){pt({...this._data,displayname:i},this._knownDavService),this._data.displayname=i}get extension(){return Et.extname(this.source)}get dirname(){if(this.root){let d=this.source;this.isDavResource&&(d=d.split(this._knownDavService).pop());const I=d.indexOf(this.root),l=this.root.replace(/\/$/,"");return Et.dirname(d.slice(I+l.length)||"/")}const i=new URL(this.source);return Et.dirname(i.pathname)}get mime(){return this._data.mime||"application/octet-stream"}set mime(i){i??="application/octet-stream",pt({...this._data,mime:i},this._knownDavService),this._data.mime=i}get mtime(){return this._data.mtime}set mtime(i){pt({...this._data,mtime:i},this._knownDavService),this._data.mtime=i}get crtime(){return this._data.crtime}get size(){return this._data.size}set size(i){pt({...this._data,size:i},this._knownDavService),this.updateMtime(),this._data.size=i}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(i){pt({...this._data,permissions:i},this._knownDavService),this.updateMtime(),this._data.permissions=i}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&&Et.dirname(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let i=this.source;this.isDavResource&&(i=i.split(this._knownDavService).pop());const d=i.indexOf(this.root),I=this.root.replace(/\/$/,"");return i.slice(d+I.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id}get status(){return this._data?.status}set status(i){pt({...this._data,status:i},this._knownDavService),this._data.status=i}get data(){return structuredClone(this._data)}move(i){pt({...this._data,source:i},this._knownDavService);const d=this.basename;this._data.source=i,this.displayname===d&&this.basename!==d&&(this.displayname=this.basename)}rename(i){if(i.includes("/"))throw new Error("Invalid basename");this.move(Et.dirname(this.source)+"/"+i)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}update(i){for(const[d,I]of Object.entries(i))try{I===void 0?delete this.attributes[d]:this.attributes[d]=I}catch(l){if(l instanceof TypeError)continue;throw l}}}class ae extends Ut{get type(){return oe.File}clone(){return new ae(this.data)}}class ue extends Ut{constructor(i){super({...i,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 gr=function(o=""){let i=st.NONE;return o&&((o.includes("C")||o.includes("K"))&&(i|=st.CREATE),o.includes("G")&&(i|=st.READ),(o.includes("W")||o.includes("N")||o.includes("V"))&&(i|=st.UPDATE),o.includes("D")&&(i|=st.DELETE),o.includes("R")&&(i|=st.SHARE)),i},Er=["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"],mr={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},Zr=function(){return typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...Er]),window._nc_dav_properties.map(o=>`<${o} />`).join(" ")},Kr=function(){return typeof window._nc_dav_namespaces>"u"&&(window._nc_dav_namespaces={...mr}),Object.keys(window._nc_dav_namespaces).map(o=>`xmlns:${o}="${window._nc_dav_namespaces?.[o]}"`).join(" ")};function wr(){return re()?`/files/${ur()}`:`/files/${Me()?.uid}`}const yr=wr();function Tr(){const o=er("dav");return re()?o.replace("remote.php","public.php"):o}const je=Tr(),Jr=function(o=je,i={}){const d=or(o,{headers:i});function I(l){d.setHeaders({...i,"X-Requested-With":"XMLHttpRequest",requesttoken:l??""})}return nr(I),I(rr()),sr().patch("fetch",(l,y)=>{const m=y.headers;return m?.method&&(y.method=m.method,delete m.method),fetch(l,y)}),d},tn=function(o,i=yr,d=je){let I=Me()?.uid;if(re())I=I??"anonymous";else if(!I)throw new Error("No user id found");const l=o.props,y=gr(l?.permissions),m=String(l?.["owner-id"]||I),b=l.fileid||0,g=new Date(Date.parse(o.lastmod)),u=new Date(Date.parse(l.creationdate)),_={id:b,source:`${d}${o.filename}`,mtime:!isNaN(g.getTime())&&g.getTime()!==0?g:void 0,crtime:!isNaN(u.getTime())&&u.getTime()!==0?u:void 0,mime:o.mime||"application/octet-stream",displayname:l.displayname!==void 0?String(l.displayname):void 0,size:l?.size||Number.parseInt(l.getcontentlength||"0"),status:b<0?se.FAILED:void 0,permissions:y,owner:m,root:i,attributes:{...o,...l,hasPreview:l?.["has-preview"]}};return delete _.attributes?.props,o.type==="file"?new ae(_):new ue(_)};var Ir=class extends EventTarget{dispatchTypedEvent(o,i){return super.dispatchEvent(i)}},jt={},Xt={exports:{}},Ie={},ve;function vr(){return ve||(ve=1,(function(o){Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var i={},d={};d.byteLength=_,d.toByteArray=B,d.fromByteArray=rt;for(var I=[],l=[],y=typeof Uint8Array<"u"?Uint8Array:Array,m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b=0,g=m.length;b<g;++b)I[b]=m[b],l[m.charCodeAt(b)]=b;l[45]=62,l[95]=63;function u(v){var N=v.length;if(N%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var S=v.indexOf("=");S===-1&&(S=N);var C=S===N?0:4-S%4;return[S,C]}function _(v){var N=u(v),S=N[0],C=N[1];return(S+C)*3/4-C}function O(v,N,S){return(N+S)*3/4-S}function B(v){var N,S=u(v),C=S[0],U=S[1],L=new y(O(v,C,U)),D=0,c=U>0?C-4:C,$;for($=0;$<c;$+=4)N=l[v.charCodeAt($)]<<18|l[v.charCodeAt($+1)]<<12|l[v.charCodeAt($+2)]<<6|l[v.charCodeAt($+3)],L[D++]=N>>16&255,L[D++]=N>>8&255,L[D++]=N&255;return U===2&&(N=l[v.charCodeAt($)]<<2|l[v.charCodeAt($+1)]>>4,L[D++]=N&255),U===1&&(N=l[v.charCodeAt($)]<<10|l[v.charCodeAt($+1)]<<4|l[v.charCodeAt($+2)]>>2,L[D++]=N>>8&255,L[D++]=N&255),L}function F(v){return I[v>>18&63]+I[v>>12&63]+I[v>>6&63]+I[v&63]}function R(v,N,S){for(var C,U=[],L=N;L<S;L+=3)C=(v[L]<<16&16711680)+(v[L+1]<<8&65280)+(v[L+2]&255),U.push(F(C));return U.join("")}function rt(v){for(var N,S=v.length,C=S%3,U=[],L=16383,D=0,c=S-C;D<c;D+=L)U.push(R(v,D,D+L>c?c:D+L));return C===1?(N=v[S-1],U.push(I[N>>2]+I[N<<4&63]+"==")):C===2&&(N=(v[S-2]<<8)+v[S-1],U.push(I[N>>10]+I[N>>4&63]+I[N<<2&63]+"=")),U.join("")}var V={};V.read=function(v,N,S,C,U){var L,D,c=U*8-C-1,$=(1<<c)-1,j=$>>1,f=-7,X=S?U-1:0,it=S?-1:1,Q=v[N+X];for(X+=it,L=Q&(1<<-f)-1,Q>>=-f,f+=c;f>0;L=L*256+v[N+X],X+=it,f-=8);for(D=L&(1<<-f)-1,L>>=-f,f+=C;f>0;D=D*256+v[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(v,N,S,C,U,L){var D,c,$,j=L*8-U-1,f=(1<<j)-1,X=f>>1,it=U===23?Math.pow(2,-24)-Math.pow(2,-77):0,Q=C?0:L-1,at=C?1:-1,x=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,U),D=D+X):(c=N*Math.pow(2,X-1)*Math.pow(2,U),D=0));U>=8;v[S+Q]=c&255,Q+=at,c/=256,U-=8);for(D=D<<U|c,j+=U;j>0;v[S+Q]=D&255,Q+=at,D/=256,j-=8);v[S+Q-at]|=x*128},(function(v){const N=d,S=V,C=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;v.Buffer=f,v.SlowBuffer=xt,v.INSPECT_MAX_BYTES=50;const U=2147483647;v.kMaxLength=U;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>U)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 x(t,e);if(D.isView(t))return vt(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 wt(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:mt(t)|0)}f.allocUnsafe=function(t){return at(t)},f.allocUnsafeSlow=function(t){return at(t)};function x(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!f.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=bt(t,e)|0;let a=j(r);const p=a.write(t,e);return p!==r&&(a=a.slice(0,p)),a}function It(t){const e=t.length<0?0:mt(t.length)|0,r=j(e);for(let a=0;a<e;a+=1)r[a]=t[a]&255;return r}function vt(t){if(ut(t,L)){const e=new L(t);return wt(e.buffer,e.byteOffset,e.byteLength)}return It(t)}function wt(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=mt(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):It(t);if(t.type==="Buffer"&&Array.isArray(t.data))return It(t.data)}function mt(t){if(t>=U)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+U.toString(16)+" bytes");return t|0}function xt(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,E=Math.min(r,a);p<E;++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 E=t[r];if(ut(E,L))p+E.length>a.length?(f.isBuffer(E)||(E=f.from(E)),E.copy(a,p)):L.prototype.set.call(a,E,p);else if(f.isBuffer(E))E.copy(a,p);else throw new TypeError('"list" argument must be an Array of Buffers');p+=E.length}return a};function bt(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 Ee(t).length;default:if(p)return a?-1:Mt(t).length;e=(""+e).toLowerCase(),p=!0}}f.byteLength=bt;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 Nt(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=v.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 E=p-a,A=r-e;const k=Math.min(E,A),K=this.slice(a,p),G=t.slice(e,r);for(let M=0;M<k;++M)if(K[M]!==G[M]){E=K[M],A=G[M];break}return E<A?-1:A<E?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 E=1,A=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;E=2,A/=2,k/=2,r/=2}function K(M,z){return E===1?M[z]:M.readUInt16BE(z*E)}let G;if(p){let M=-1;for(G=r;G<A;G++)if(K(t,G)===K(e,M===-1?0:G-M)){if(M===-1&&(M=G),G-M+1===k)return M*E}else M!==-1&&(G-=G-M),M=-1}else for(r+k>A&&(r=A-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 E=e.length;a>E/2&&(a=E/2);let A;for(A=0;A<a;++A){const k=parseInt(e.substr(A*2,2),16);if(kt(k))return A;t[r+A]=k}return A}function h(t,e,r,a){return Lt(Mt(e,t.length-r),t,r,a)}function P(t,e,r,a){return Lt(Ze(e),t,r,a)}function Y(t,e,r,a){return Lt(Ee(e),t,r,a)}function q(t,e,r,a){return Lt(Ke(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 E=!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(E)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),E=!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 E=t[p];let A=null,k=E>239?4:E>223?3:E>191?2:1;if(p+k<=r){let K,G,M,z;switch(k){case 1:E<128&&(A=E);break;case 2:K=t[p+1],(K&192)===128&&(z=(E&31)<<6|K&63,z>127&&(A=z));break;case 3:K=t[p+1],G=t[p+2],(K&192)===128&&(G&192)===128&&(z=(E&15)<<12|(K&63)<<6|G&63,z>2047&&(z<55296||z>57343)&&(A=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=(E&15)<<18|(K&63)<<12|(G&63)<<6|M&63,z>65535&&z<1114112&&(A=z))}}A===null?(A=65533,k=1):A>65535&&(A-=65536,a.push(A>>>10&1023|55296),A=56320|A&1023),a.push(A),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 E=e;E<r;++E)p+=Je[t[E]];return p}function Nt(t,e,r){const a=t.slice(e,r);let p="";for(let E=0;E<a.length-1;E+=2)p+=String.fromCharCode(a[E]+a[E+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,E=0;for(;++E<e&&(p*=256);)a+=this[t+E]*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,Tt(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,Tt(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,E=0;for(;++E<e&&(p*=256);)a+=this[t+E]*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,E=this[t+--a];for(;a>0&&(p*=256);)E+=this[t+--a]*p;return p*=128,E>=p&&(E-=Math.pow(2,8*e)),E},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,Tt(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,Tt(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,E){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>p||e<E)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 A=Math.pow(2,8*r)-1;nt(this,t,e,r,A,0)}let p=1,E=0;for(this[e]=t&255;++E<r&&(p*=256);)this[e+E]=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 A=Math.pow(2,8*r)-1;nt(this,t,e,r,A,0)}let p=r-1,E=1;for(this[e+p]=t&255;--p>=0&&(E*=256);)this[e+p]=t/E&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){ge(e,a,p,t,r,7);let E=Number(e&BigInt(4294967295));t[r++]=E,E=E>>8,t[r++]=E,E=E>>8,t[r++]=E,E=E>>8,t[r++]=E;let A=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=A,A=A>>8,t[r++]=A,A=A>>8,t[r++]=A,A=A>>8,t[r++]=A,r}function le(t,e,r,a,p){ge(e,a,p,t,r,7);let E=Number(e&BigInt(4294967295));t[r+7]=E,E=E>>8,t[r+6]=E,E=E>>8,t[r+5]=E,E=E>>8,t[r+4]=E;let A=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=A,A=A>>8,t[r+2]=A,A=A>>8,t[r+1]=A,A=A>>8,t[r]=A,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,E=1,A=0;for(this[e]=t&255;++p<r&&(E*=256);)t<0&&A===0&&this[e+p-1]!==0&&(A=1),this[e+p]=(t/E>>0)-A&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,E=1,A=0;for(this[e+p]=t&255;--p>=0&&(E*=256);)t<0&&A===0&&this[e+p+1]!==0&&(A=1),this[e+p]=(t/E>>0)-A&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,E){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 E=t.charCodeAt(0);(a==="utf8"&&E<128||a==="latin1")&&(t=E)}}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 E=f.isBuffer(t)?t:f.from(t,a),A=E.length;if(A===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(p=0;p<r-e;++p)this[p+e]=E[p%A]}return this};const yt={};function $t(t,e,r){yt[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 ze(t,e,r){Tt(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&At(e,t.length-(r+1))}function ge(t,e,r,a,p,E){if(t>r||t<e){const A=typeof e=="bigint"?"n":"";let k;throw e===0||e===BigInt(0)?k=`>= 0${A} and < 2${A} ** ${(E+1)*8}${A}`:k=`>= -(2${A} ** ${(E+1)*8-1}${A}) and < 2 ** ${(E+1)*8-1}${A}`,new yt.ERR_OUT_OF_RANGE("value",k,t)}ze(a,p,E)}function Tt(t,e){if(typeof t!="number")throw new yt.ERR_INVALID_ARG_TYPE(e,"number",t)}function At(t,e,r){throw Math.floor(t)!==t?(Tt(t,r),new yt.ERR_OUT_OF_RANGE("offset","an integer",t)):e<0?new yt.ERR_BUFFER_OUT_OF_BOUNDS:new yt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${e}`,t)}const We=/[^+/0-9A-Za-z-_]/g;function Qe(t){if(t=t.split("=")[0],t=t.trim().replace(We,""),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 E=[];for(let A=0;A<a;++A){if(r=t.charCodeAt(A),r>55295&&r<57344){if(!p){if(r>56319){(e-=3)>-1&&E.push(239,191,189);continue}else if(A+1===a){(e-=3)>-1&&E.push(239,191,189);continue}p=r;continue}if(r<56320){(e-=3)>-1&&E.push(239,191,189),p=r;continue}r=(p-55296<<10|r-56320)+65536}else p&&(e-=3)>-1&&E.push(239,191,189);if(p=null,r<128){if((e-=1)<0)break;E.push(r)}else if(r<2048){if((e-=2)<0)break;E.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;E.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;E.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return E}function Ze(t){const e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function Ke(t,e){let r,a,p;const E=[];for(let A=0;A<t.length&&!((e-=2)<0);++A)r=t.charCodeAt(A),a=r>>8,p=r%256,E.push(p),E.push(a);return E}function Ee(t){return N.toByteArray(Qe(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 Je=(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"?tr:t}function tr(){throw new Error("BigInt not supported")}})(i);const w=i.Buffer;o.Blob=i.Blob,o.BlobOptions=i.BlobOptions,o.Buffer=i.Buffer,o.File=i.File,o.FileOptions=i.FileOptions,o.INSPECT_MAX_BYTES=i.INSPECT_MAX_BYTES,o.SlowBuffer=i.SlowBuffer,o.TranscodeEncoding=i.TranscodeEncoding,o.atob=i.atob,o.btoa=i.btoa,o.constants=i.constants,o.default=w,o.isAscii=i.isAscii,o.isUtf8=i.isUtf8,o.kMaxLength=i.kMaxLength,o.kStringMaxLength=i.kStringMaxLength,o.resolveObjectURL=i.resolveObjectURL,o.transcode=i.transcode})(Ie)),Ie}var be;function br(){return be||(be=1,(function(o,i){var d=vr(),I=d.Buffer;function l(m,b){for(var g in m)b[g]=m[g]}I.from&&I.alloc&&I.allocUnsafe&&I.allocUnsafeSlow?o.exports=d:(l(d,i),i.Buffer=y);function y(m,b,g){return I(m,b,g)}l(I,y),y.from=function(m,b,g){if(typeof m=="number")throw new TypeError("Argument must not be a number");return I(m,b,g)},y.alloc=function(m,b,g){if(typeof m!="number")throw new TypeError("Argument must be a number");var u=I(m);return b!==void 0?typeof g=="string"?u.fill(b,g):u.fill(b):u.fill(0),u},y.allocUnsafe=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return I(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 Nr(){if(Ne)return jt;Ne=1;var o=br().Buffer,i=o.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 v;;)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(v)return;w=(""+w).toLowerCase(),v=!0}}function I(w){var v=d(w);if(typeof v!="string"&&(o.isEncoding===i||!i(w)))throw new Error("Unknown encoding: "+w);return v||w}jt.StringDecoder=l;function l(w){this.encoding=I(w);var v;switch(this.encoding){case"utf16le":this.text=O,this.end=B,v=4;break;case"utf8":this.fillLast=g,v=4;break;case"base64":this.text=F,this.end=R,v=3;break;default:this.write=rt,this.end=V;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=o.allocUnsafe(v)}l.prototype.write=function(w){if(w.length===0)return"";var v,N;if(this.lastNeed){if(v=this.fillLast(w),v===void 0)return"";N=this.lastNeed,this.lastNeed=0}else N=0;return N<w.length?v?v+this.text(w,N):this.text(w,N):v||""},l.prototype.end=_,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,v,N){var S=v.length-1;if(S<N)return 0;var C=y(v[S]);return C>=0?(C>0&&(w.lastNeed=C-1),C):--S<N||C===-2?0:(C=y(v[S]),C>=0?(C>0&&(w.lastNeed=C-2),C):--S<N||C===-2?0:(C=y(v[S]),C>=0?(C>0&&(C===2?C=0:w.lastNeed=C-3),C):0))}function b(w,v,N){if((v[0]&192)!==128)return w.lastNeed=0,"<22>";if(w.lastNeed>1&&v.length>1){if((v[1]&192)!==128)return w.lastNeed=1,"<22>";if(w.lastNeed>2&&v.length>2&&(v[2]&192)!==128)return w.lastNeed=2,"<22>"}}function g(w){var v=this.lastTotal-this.lastNeed,N=b(this,w);if(N!==void 0)return N;if(this.lastNeed<=w.length)return w.copy(this.lastChar,v,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);w.copy(this.lastChar,v,0,w.length),this.lastNeed-=w.length}function u(w,v){var N=m(this,w,v);if(!this.lastNeed)return w.toString("utf8",v);this.lastTotal=N;var S=w.length-(N-this.lastNeed);return w.copy(this.lastChar,0,S),w.toString("utf8",v,S)}function _(w){var v=w&&w.length?this.write(w):"";return this.lastNeed?v+"<22>":v}function O(w,v){if((w.length-v)%2===0){var N=w.toString("utf16le",v);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",v,w.length-1)}function B(w){var v=w&&w.length?this.write(w):"";if(this.lastNeed){var N=this.lastTotal-this.lastNeed;return v+this.lastChar.toString("utf16le",0,N)}return v}function F(w,v){var N=(w.length-v)%3;return N===0?w.toString("base64",v):(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",v,w.length-N))}function R(w){var v=w&&w.length?this.write(w):"";return this.lastNeed?v+this.lastChar.toString("base64",0,3-this.lastNeed):v}function rt(w){return w.toString(this.encoding)}function V(w){return w&&w.length?this.write(w):""}return jt}var Ar=Nr();const _r=$e(Ar);var Yt={},Xe=(o=>(o.DEFAULT="default",o.HIDDEN="hidden",o))(Xe||{});class en{_action;constructor(i){this.validateAction(i),this._action=i}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(i){if(!i.id||typeof i.id!="string")throw new Error("Invalid id");if(!i.displayName||typeof i.displayName!="function")throw new Error("Invalid displayName function");if("title"in i&&typeof i.title!="function")throw new Error("Invalid title function");if(!i.iconSvgInline||typeof i.iconSvgInline!="function")throw new Error("Invalid iconSvgInline function");if(!i.exec||typeof i.exec!="function")throw new Error("Invalid exec function");if("enabled"in i&&typeof i.enabled!="function")throw new Error("Invalid enabled function");if("execBatch"in i&&typeof i.execBatch!="function")throw new Error("Invalid execBatch function");if("order"in i&&typeof i.order!="number")throw new Error("Invalid order");if(i.destructive!==void 0&&typeof i.destructive!="boolean")throw new Error("Invalid destructive flag");if("parent"in i&&typeof i.parent!="string")throw new Error("Invalid parent");if(i.default&&!Object.values(Xe).includes(i.default))throw new Error("Invalid default");if("inline"in i&&typeof i.inline!="function")throw new Error("Invalid inline function");if("renderInline"in i&&typeof i.renderInline!="function")throw new Error("Invalid renderInline function");if("hotkey"in i&&i.hotkey!==void 0){if(typeof i.hotkey!="object")throw new Error("Invalid hotkey configuration");if(typeof i.hotkey.key!="string"||!i.hotkey.key)throw new Error("Missing or invalid hotkey key");if(typeof i.hotkey.description!="string"||!i.hotkey.description)throw new Error("Missing or invalid hotkey description")}}}const rn=function(o){if(typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],Ot.debug("FileActions initialized")),window._nc_fileactions.find(i=>i.id===o.id)){Ot.error(`FileAction ${o.id} already registered`,{action:o});return}window._nc_fileactions.push(o)};class nn{_action;constructor(i){this.validateAction(i),this._action=i}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(i){if(!i.id||typeof i.id!="string")throw new Error("Invalid id");if(!i.displayName||typeof i.displayName!="function")throw new Error("Invalid displayName function");if("iconSvgInline"in i&&typeof i.iconSvgInline!="function")throw new Error("Invalid iconSvgInline function");if("order"in i&&typeof i.order!="number")throw new Error("Invalid order");if("enabled"in i&&typeof i.enabled!="function")throw new Error("Invalid enabled function");if(!i.exec||typeof i.exec!="function")throw new Error("Invalid exec function")}}const on=o=>{if(typeof window._nc_filelistactions>"u"&&(window._nc_filelistactions=[]),window._nc_filelistactions.find(i=>i.id===o.id)){Ot.error(`FileListAction with id "${o.id}" is already registered`,{action:o});return}window._nc_filelistactions.push(o)};function Or(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Ae,_e;function Ye(){return _e||(_e=1,Ae=typeof Pe=="object"&&Yt&&Yt.NODE_DEBUG&&/\bsemver\b/i.test(Yt.NODE_DEBUG)?(...o)=>console.error("SEMVER",...o):()=>{}),Ae}var qt,Oe;function qe(){if(Oe)return qt;Oe=1;const o="2.0.0",i=256,d=Number.MAX_SAFE_INTEGER||9007199254740991,I=16,l=i-6;return qt={MAX_LENGTH:i,MAX_SAFE_COMPONENT_LENGTH:I,MAX_SAFE_BUILD_LENGTH:l,MAX_SAFE_INTEGER:d,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:o,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},qt}var Ht={exports:{}},Re;function Rr(){return Re||(Re=1,(function(o,i){const{MAX_SAFE_COMPONENT_LENGTH:d,MAX_SAFE_BUILD_LENGTH:I,MAX_LENGTH:l}=qe(),y=Ye();i=o.exports={};const m=i.re=[],b=i.safeRe=[],g=i.src=[],u=i.t={};let _=0;const O="[a-zA-Z0-9-]",B=[["\\s",1],["\\d",l],[O,I]],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 v=F(V),N=_++;y(rt,N,V),u[rt]=N,g[N]=V,m[N]=new RegExp(V,w?"g":void 0),b[N]=new RegExp(v,w?"g":void 0)};R("NUMERICIDENTIFIER","0|[1-9]\\d*"),R("NUMERICIDENTIFIERLOOSE","\\d+"),R("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${O}*`),R("MAINVERSION",`(${g[u.NUMERICIDENTIFIER]})\\.(${g[u.NUMERICIDENTIFIER]})\\.(${g[u.NUMERICIDENTIFIER]})`),R("MAINVERSIONLOOSE",`(${g[u.NUMERICIDENTIFIERLOOSE]})\\.(${g[u.NUMERICIDENTIFIERLOOSE]})\\.(${g[u.NUMERICIDENTIFIERLOOSE]})`),R("PRERELEASEIDENTIFIER",`(?:${g[u.NUMERICIDENTIFIER]}|${g[u.NONNUMERICIDENTIFIER]})`),R("PRERELEASEIDENTIFIERLOOSE",`(?:${g[u.NUMERICIDENTIFIERLOOSE]}|${g[u.NONNUMERICIDENTIFIER]})`),R("PRERELEASE",`(?:-(${g[u.PRERELEASEIDENTIFIER]}(?:\\.${g[u.PRERELEASEIDENTIFIER]})*))`),R("PRERELEASELOOSE",`(?:-?(${g[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${g[u.PRERELEASEIDENTIFIERLOOSE]})*))`),R("BUILDIDENTIFIER",`${O}+`),R("BUILD",`(?:\\+(${g[u.BUILDIDENTIFIER]}(?:\\.${g[u.BUILDIDENTIFIER]})*))`),R("FULLPLAIN",`v?${g[u.MAINVERSION]}${g[u.PRERELEASE]}?${g[u.BUILD]}?`),R("FULL",`^${g[u.FULLPLAIN]}$`),R("LOOSEPLAIN",`[v=\\s]*${g[u.MAINVERSIONLOOSE]}${g[u.PRERELEASELOOSE]}?${g[u.BUILD]}?`),R("LOOSE",`^${g[u.LOOSEPLAIN]}$`),R("GTLT","((?:<|>)?=?)"),R("XRANGEIDENTIFIERLOOSE",`${g[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),R("XRANGEIDENTIFIER",`${g[u.NUMERICIDENTIFIER]}|x|X|\\*`),R("XRANGEPLAIN",`[v=\\s]*(${g[u.XRANGEIDENTIFIER]})(?:\\.(${g[u.XRANGEIDENTIFIER]})(?:\\.(${g[u.XRANGEIDENTIFIER]})(?:${g[u.PRERELEASE]})?${g[u.BUILD]}?)?)?`),R("XRANGEPLAINLOOSE",`[v=\\s]*(${g[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${g[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${g[u.XRANGEIDENTIFIERLOOSE]})(?:${g[u.PRERELEASELOOSE]})?${g[u.BUILD]}?)?)?`),R("XRANGE",`^${g[u.GTLT]}\\s*${g[u.XRANGEPLAIN]}$`),R("XRANGELOOSE",`^${g[u.GTLT]}\\s*${g[u.XRANGEPLAINLOOSE]}$`),R("COERCEPLAIN",`(^|[^\\d])(\\d{1,${d}})(?:\\.(\\d{1,${d}}))?(?:\\.(\\d{1,${d}}))?`),R("COERCE",`${g[u.COERCEPLAIN]}(?:$|[^\\d])`),R("COERCEFULL",g[u.COERCEPLAIN]+`(?:${g[u.PRERELEASE]})?(?:${g[u.BUILD]})?(?:$|[^\\d])`),R("COERCERTL",g[u.COERCE],!0),R("COERCERTLFULL",g[u.COERCEFULL],!0),R("LONETILDE","(?:~>?)"),R("TILDETRIM",`(\\s*)${g[u.LONETILDE]}\\s+`,!0),i.tildeTrimReplace="$1~",R("TILDE",`^${g[u.LONETILDE]}${g[u.XRANGEPLAIN]}$`),R("TILDELOOSE",`^${g[u.LONETILDE]}${g[u.XRANGEPLAINLOOSE]}$`),R("LONECARET","(?:\\^)"),R("CARETTRIM",`(\\s*)${g[u.LONECARET]}\\s+`,!0),i.caretTrimReplace="$1^",R("CARET",`^${g[u.LONECARET]}${g[u.XRANGEPLAIN]}$`),R("CARETLOOSE",`^${g[u.LONECARET]}${g[u.XRANGEPLAINLOOSE]}$`),R("COMPARATORLOOSE",`^${g[u.GTLT]}\\s*(${g[u.LOOSEPLAIN]})$|^$`),R("COMPARATOR",`^${g[u.GTLT]}\\s*(${g[u.FULLPLAIN]})$|^$`),R("COMPARATORTRIM",`(\\s*)${g[u.GTLT]}\\s*(${g[u.LOOSEPLAIN]}|${g[u.XRANGEPLAIN]})`,!0),i.comparatorTrimReplace="$1$2$3",R("HYPHENRANGE",`^\\s*(${g[u.XRANGEPLAIN]})\\s+-\\s+(${g[u.XRANGEPLAIN]})\\s*$`),R("HYPHENRANGELOOSE",`^\\s*(${g[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${g[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 Sr(){if(Se)return zt;Se=1;const o=Object.freeze({loose:!0}),i=Object.freeze({});return zt=d=>d?typeof d!="object"?o:d:i,zt}var Wt,Le;function Lr(){if(Le)return Wt;Le=1;const o=/^[0-9]+$/,i=(d,I)=>{const l=o.test(d),y=o.test(I);return l&&y&&(d=+d,I=+I),d===I?0:l&&!y?-1:y&&!l?1:d<I?-1:1};return Wt={compareIdentifiers:i,rcompareIdentifiers:(d,I)=>i(I,d)},Wt}var Qt,Ce;function He(){if(Ce)return Qt;Ce=1;const o=Ye(),{MAX_LENGTH:i,MAX_SAFE_INTEGER:d}=qe(),{safeRe:I,t:l}=Rr(),y=Sr(),{compareIdentifiers:m}=Lr();class b{constructor(u,_){if(_=y(_),u instanceof b){if(u.loose===!!_.loose&&u.includePrerelease===!!_.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>i)throw new TypeError(`version is longer than ${i} characters`);o("SemVer",u,_),this.options=_,this.loose=!!_.loose,this.includePrerelease=!!_.includePrerelease;const O=u.trim().match(_.loose?I[l.LOOSE]:I[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(o("SemVer.compare",this.version,this.options,u),!(u instanceof b)){if(typeof u=="string"&&u===this.version)return 0;u=new b(u,this.options)}return u.version===this.version?0:this.compareMain(u)||this.comparePre(u)}compareMain(u){return u instanceof b||(u=new b(u,this.options)),m(this.major,u.major)||m(this.minor,u.minor)||m(this.patch,u.patch)}comparePre(u){if(u instanceof b||(u=new b(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 _=0;do{const O=this.prerelease[_],B=u.prerelease[_];if(o("prerelease compare",_,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(++_)}compareBuild(u){u instanceof b||(u=new b(u,this.options));let _=0;do{const O=this.build[_],B=u.build[_];if(o("build compare",_,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(++_)}inc(u,_,O){switch(u){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",_,O);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",_,O);break;case"prepatch":this.prerelease.length=0,this.inc("patch",_,O),this.inc("pre",_,O);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",_,O),this.inc("pre",_,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(!_&&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(_===this.prerelease.join(".")&&O===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(B)}}if(_){let F=[_,B];O===!1&&(F=[_]),m(this.prerelease[0],_)===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=b,Qt}var Zt,De;function Cr(){if(De)return Zt;De=1;const o=He();return Zt=(i,d,I=!1)=>{if(i instanceof o)return i;try{return new o(i,d)}catch(l){if(!I)return null;throw l}},Zt}var Kt,Be;function Dr(){if(Be)return Kt;Be=1;const o=Cr();return Kt=(i,d)=>{const I=o(i,d);return I?I.version:null},Kt}Dr();var Jt,Fe;function Br(){if(Fe)return Jt;Fe=1;const o=He();return Jt=(i,d)=>new o(i,d).major,Jt}Br();class Fr extends Ir{_views=[];_currentView=null;register(i){if(this._views.find(d=>d.id===i.id))throw new Error(`View id ${i.id} is already registered`);this._views.push(i),this.dispatchTypedEvent("update",new CustomEvent("update"))}remove(i){const d=this._views.findIndex(I=>I.id===i);d!==-1&&(this._views.splice(d,1),this.dispatchTypedEvent("update",new CustomEvent("update")))}setActive(i){this._currentView=i;const d=new CustomEvent("updateActive",{detail:i});this.dispatchTypedEvent("updateActive",d)}get active(){return this._currentView}get views(){return this._views}}const sn=function(){return typeof window._nc_navigation>"u"&&(window._nc_navigation=new Fr,Ot.debug("Navigation service initialized")),window._nc_navigation};class Ur{_column;constructor(i){xr(i),this._column=i}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 xr=function(o){if(!o.id||typeof o.id!="string")throw new Error("A column id is required");if(!o.title||typeof o.title!="string")throw new Error("A column title is required");if(!o.render||typeof o.render!="function")throw new Error("A render function is required");if(o.sort&&typeof o.sort!="function")throw new Error("Column sortFunction must be a function");if(o.summary&&typeof o.summary!="function")throw new Error("Column summary must be a function");return!0};var Ue={},xe;function Pr(){return xe||(xe=1,(function(o){(function(i){i.parser=function(s,n){return new I(s,n)},i.SAXParser=I,i.SAXStream=_,i.createStream=u,i.MAX_BUFFER_LENGTH=64*1024;var d=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];i.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function I(s,n){if(!(this instanceof I))return new I(s,n);var T=this;y(T),T.q=T.c="",T.bufferCheckPosition=i.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(i.XML_ENTITIES):Object.create(i.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(i.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=i.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="")}I.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 b;try{b=require("stream").Stream}catch{b=function(){}}b||(b=function(){});var g=i.EVENTS.filter(function(s){return s!=="error"&&s!=="end"});function u(s,n){return new _(s,n)}function _(s,n){if(!(this instanceof _))return new _(s,n);b.apply(this),this._parser=new I(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,g.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})})}_.prototype=Object.create(b.prototype,{constructor:{value:_}}),_.prototype.write=function(s){if(typeof Gt=="function"&&typeof Gt.isBuffer=="function"&&Gt.isBuffer(s)){if(!this._decoder){var n=_r.StringDecoder;this._decoder=new n("utf8")}s=this._decoder.write(s)}return this._parser.write(s.toString()),this.emit("data",s),!0},_.prototype.end=function(s){return s&&s.length&&this.write(s),this._parser.end(),!0},_.prototype.on=function(s,n){var T=this;return!T._parser["on"+s]&&g.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)}),b.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-]/,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]/,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===`
|