@nejs/basic-extensions 2.8.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +268 -147
- package/bin/version +100 -0
- package/dist/@nejs/basic-extensions.bundle.2.8.0.js +19 -0
- package/dist/@nejs/basic-extensions.bundle.2.8.0.js.map +7 -0
- package/dist/cjs/json.extensions.js +3 -2
- package/dist/cjs/json.extensions.js.map +1 -1
- package/dist/cjs/object.extensions.js +18 -6
- package/dist/cjs/object.extensions.js.map +1 -1
- package/dist/cjs/string.extensions.js +218 -28
- package/dist/cjs/string.extensions.js.map +1 -1
- package/dist/cjs/symbol.extensions.js +150 -29
- package/dist/cjs/symbol.extensions.js.map +1 -1
- package/dist/mjs/json.extensions.js +3 -2
- package/dist/mjs/json.extensions.js.map +1 -1
- package/dist/mjs/object.extensions.js +18 -6
- package/dist/mjs/object.extensions.js.map +1 -1
- package/dist/mjs/string.extensions.js +218 -28
- package/dist/mjs/string.extensions.js.map +1 -1
- package/dist/mjs/symbol.extensions.js +151 -30
- package/dist/mjs/symbol.extensions.js.map +1 -1
- package/docs/index.html +1045 -525
- package/package.json +4 -4
- package/src/json.extensions.js +3 -2
- package/src/object.extensions.js +21 -6
- package/src/string.extensions.js +259 -40
- package/src/symbol.extensions.js +151 -30
- package/dist/@nejs/basic-extensions.bundle.2.7.0.js +0 -19
- package/dist/@nejs/basic-extensions.bundle.2.7.0.js.map +0 -7
package/bin/version
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = await import('fs')
|
|
4
|
+
const path = await import('path')
|
|
5
|
+
const { SemVer } = await import('@nejs/extension')
|
|
6
|
+
|
|
7
|
+
async function main(interpreter, script, args, SemVer) {
|
|
8
|
+
const packageJSON = (
|
|
9
|
+
JSON.parse(fs
|
|
10
|
+
.readFileSync('./package.json')
|
|
11
|
+
.toString()
|
|
12
|
+
)
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
const version = new SemVer(packageJSON.version)
|
|
16
|
+
let [versionPart, versionValue] = args
|
|
17
|
+
let numericPart = (part) => ['major', 'minor', 'patch'].includes(part)
|
|
18
|
+
let textualPart = (part) => ['prerelease', 'metadata'].includes(part)
|
|
19
|
+
|
|
20
|
+
if (versionValue === 'bump' && numericPart(versionPart)) {
|
|
21
|
+
versionValue = Number(version[versionPart] + 1)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
versionPart = String(versionPart).toLowerCase()
|
|
25
|
+
versionValue = textualPart(versionPart)
|
|
26
|
+
? String(versionValue).toLowerCase()
|
|
27
|
+
: Number(versionValue)
|
|
28
|
+
|
|
29
|
+
const handleBrowserVersion = (newVersion) => {
|
|
30
|
+
if (Reflect.has(packageJSON, "browser")) {
|
|
31
|
+
const browserPath = packageJSON.browser
|
|
32
|
+
let browserVer = SemVer.from(browserPath)
|
|
33
|
+
|
|
34
|
+
let newPath = [
|
|
35
|
+
browserPath.slice(0, browserVer.range[0]),
|
|
36
|
+
newVersion.get(),
|
|
37
|
+
browserPath.slice(browserVer.range[1]),
|
|
38
|
+
].join('')
|
|
39
|
+
|
|
40
|
+
console.log(` "browser": ${browserPath}`)
|
|
41
|
+
console.log(` -> ${newPath}`)
|
|
42
|
+
|
|
43
|
+
packageJSON.browser = newPath
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (
|
|
48
|
+
(typeof versionPart === 'string' && numericPart(versionPart)) &&
|
|
49
|
+
typeof versionValue === 'number'
|
|
50
|
+
) {
|
|
51
|
+
const oldVersion = version.get()
|
|
52
|
+
const newVersion = version.set(versionValue, versionPart)
|
|
53
|
+
|
|
54
|
+
console.log(`New versions`)
|
|
55
|
+
console.log(` "version": ${oldVersion} -> ${newVersion}`)
|
|
56
|
+
|
|
57
|
+
packageJSON.version = newVersion.get()
|
|
58
|
+
handleBrowserVersion(newVersion)
|
|
59
|
+
|
|
60
|
+
fs.writeFileSync('./package.json', JSON.stringify(packageJSON, null, 2))
|
|
61
|
+
}
|
|
62
|
+
else if (
|
|
63
|
+
(typeof versionPart === 'string' && textualPart(versionPart)) &&
|
|
64
|
+
typeof versionValue === 'string'
|
|
65
|
+
) {
|
|
66
|
+
const oldVersion = version.get()
|
|
67
|
+
const newVersion = version.set(versionValue, versionPart).get()
|
|
68
|
+
|
|
69
|
+
console.log(`New versions`)
|
|
70
|
+
console.log(` "version": ${oldVersion} -> ${newVersion}`)
|
|
71
|
+
|
|
72
|
+
packageJSON.version = newVersion.get()
|
|
73
|
+
handleBrowserVersion(newVersion)
|
|
74
|
+
|
|
75
|
+
fs.writeFileSync('./package.json', JSON.stringify(packageJSON, null, 2))
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
console.log([
|
|
79
|
+
`Usage: ${script} <major|minor|patch|prerelease|metadata> <newvalue>`,
|
|
80
|
+
`where:`,
|
|
81
|
+
` major|minor|patch|prerelease|metadata - refers to part of version`,
|
|
82
|
+
` newvalue - refers to the new value for that part of the version`,
|
|
83
|
+
``,
|
|
84
|
+
` note: if "newvalue" is the word "bump", then it increases the`,
|
|
85
|
+
` specified portion of the version accordingly. This only works`,
|
|
86
|
+
` for major, minor and patch version parts`,
|
|
87
|
+
``,
|
|
88
|
+
`Current version: ${packageJSON.version}`,
|
|
89
|
+
].join('\n'))
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
process.exit(0)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
main(
|
|
96
|
+
process.argv[0], // usually `node`
|
|
97
|
+
path.basename(process.argv[1]), // usually `/path/to/curdir/version`
|
|
98
|
+
process.argv.slice(2), // all command line arguments after
|
|
99
|
+
SemVer // SemVer class from above
|
|
100
|
+
)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var nejsBasicExtensions=(()=>{var re=Object.defineProperty;var it=Object.getOwnPropertyDescriptor;var ot=Object.getOwnPropertyNames;var at=Object.prototype.hasOwnProperty;var ct=(t,e)=>{for(var r in e)re(t,r,{get:e[r],enumerable:!0})},lt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ot(e))!at.call(t,s)&&s!==r&&re(t,s,{get:()=>e[s],enumerable:!(n=it(e,s))||n.enumerable});return t};var ut=t=>lt(re({},"__esModule",{value:!0}),t);var mr={};ct(mr,{Classes:()=>rt,Controls:()=>M,Extensions:()=>I,GlobalFunctionsAndProps:()=>V,InstancePatches:()=>K,Patches:()=>Y,StaticPatches:()=>W,all:()=>nt,default:()=>dr});var ft=t=>/(\w+)]/.exec(Object.prototype.toString.call(t))[1],q=class extends Error{constructor(e,r){super(`${ft(e)} disallows tampering with ${r}.`),Object.assign(this,{owner:e,key:r})}get[Symbol.toStringTag](){return this.constructor.name}};var pt=t=>/(\w+)]/.exec(Object.prototype.toString.call(t))[1],z=class extends Error{constructor(e,r){super(`${pt(e)} does not have a property named '${r}'.`),Object.assign(this,{owner:e,key:r})}get[Symbol.toStringTag](){return this.constructor.name}};var v=class{constructor(e,r=!1){this.started=!1,this.preventRevert=r,this.patch=e,this.patchName=e.owner?.name??e.owner?.constructor?.name??/(\w+)]/.exec(Object.prototype.toString.call(e.owner))[1],this.state={needsApplication:!1,needsReversion:!1}}start(){return this.started||(this.state.needsApplication=!this.patch.applied,this.state.needsReversion=this.patch.applied,this.started=!0,this.state.needsApplication&&this.patch.apply()),this}stop(){return this.started&&((this.preventRevert||this.patch.applied)&&this.patch.revert(),this.state.needsApplication=!1,this.state.needsReversion=!1,this.started=!1),this}get[Symbol.toStringTag](){return`${this.constructor.name}:${this.patchName}`}[Symbol.for("nodejs.util.inspect.custom")](e,r,n){let s=this[Symbol.toStringTag],i=`(started: ${this.started} needed: ${this.state.needsApplication})`;return n(`${s} ${i}`,{...r,depth:e})}};var N=class{constructor(e,r=globalThis,n=void 0,s={}){let i=p=>p==null,o=(p,c=["string","symbol"])=>!i(p)&&!!c.find(f=>f===typeof p),a=p=>o(p,["object"]);if(!o(e))throw console.error("Property",e,`(type: ${typeof e})`,"owningObject",r,`(type: ${typeof r})`,"condition",n,`(type: ${typeof n})`),new TypeError("Property must be non-null and either a string or symbol");if(!a(r))throw new TypeError("Cannot create Patch entry as owning object is invalid");let u={...Object.getOwnPropertyDescriptor(r,e),...Object(s)};Object.assign(this,{key:e,descriptor:u,owner:r,condition:typeof n=="function"?n:void 0})}get computed(){return this.isAccessor?this.descriptor.get.bind(this.owner).call():this.descriptor.value}get isData(){return Reflect.has(this.descriptor,"value")}get isAccessor(){return Reflect.has(this.descriptor,"get")}get isReadOnly(){return Reflect.has(this.descriptor,"configurable")&&!this.descriptor.configurable||Reflect.has(this.descriptor,"writable")&&!this.descriptor.writable}get isAllowed(){return this.condition&&typeof this.condition=="function"?this.condition():!0}applyTo(e,r=!1){let n={...this.descriptor};r&&(typeof n.get=="function"&&(n.get=n.get.bind(this.owner)),typeof n.set=="function"&&(n.set=n.set.bind(this.owner))),Object.defineProperty(e,this.key,n)}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.for("nodejs.util.inspect.custom")](e,r,n){let s=`\x1B[33m${this.key}\x1B[39m`,i=this.isData?" Data":" Accessor",o=this.isReadOnly?" [\x1B[2;3mReadOnly\x1B[22;23m]":"";return`PatchEntry<${s}${i}${o}>`}};var l=class t{patchConflicts=Object.create(null);patchEntries=Object.create(null);patchesOwner=void 0;patchCount=0;patchesApplied=0;ownerDisplayName=void 0;constructor(e,r,n=Object.create(null)){Object.assign(this,{owner:e,options:n}),this.ownerDisplayName=n?.displayName??t.extractName(e),this.patchesOwner=t.constructWithStore(r,this),this.generatePatchEntries(this.patchesOwner),t.patches.has(e)||t.patches.set(e,[]),t.patches.get(e).push(this)}generatePatchEntries(e,r=void 0){let n=this?.options.condition;Reflect.ownKeys(e).forEach(s=>{let i=this?.options?.conditions?.[s]??n;try{let o=r??t.getDescriptorOverridesFromSymbol(s),a=e;if(t.isKnownPatchSymbol(s)){a=t.constructWithStore(e[s],this,s),e[s]=a,this.generatePatchEntries(a,o);return}this.patchEntries[s]=new N(s,e,i,r),this.patchCount+=1}catch(o){console.error(`Failed to process patch for ${String(s)}
|
|
2
|
+
`,o)}if(Reflect.has(this.owner,s))try{this.patchConflicts[s]=new N(s,this.owner)}catch(o){console.error(`Cannot capture conflicting patch key ${s}
|
|
3
|
+
`,o)}})}get entries(){return Reflect.ownKeys(this.patchEntries).map(e=>[e,this.patchEntries[e]])}get appliedEntries(){return Reflect.ownKeys(this.patchEntries).filter(e=>this.patchState.get(e)===!0).map(e=>[e,this.patchEntries[e]])}get unappliedEntries(){return Reflect.ownKeys(this.patchEntries).filter(e=>this.patchState.get(e)===!1).map(e=>[e,this.patchEntries[e]])}get patches(){return this.entries.reduce((e,[r,n])=>(e[r]=n.computed,e),Object.create(null))}get appliedPatches(){return this.entries.reduce((e,[r,n])=>(this.patchState.get(r)===!0&&(e[r]=n.computed),e),Object.create(null))}get unappliedPatches(){return this.entries.reduce((e,[r,n])=>(this.patchState.get(r)===!1&&(e[r]=n.computed),e),Object.create(null))}get patchKeys(){return this.entries.map(([e,r])=>e)}get prettyEntries(){let e=this.entries.map(([r,n])=>t.stringRef(t.extractName(r),r,n));return Object.defineProperty(e,"asEntries",{get(){return this.map(r=>r.entry)},enumerable:!1,configurable:!0}),e}get conflicts(){return Reflect.ownKeys(this.patchConflicts).map(e=>[e,this.patchConflicts[e]])}get applied(){return this.patchesApplied>0}get isPartiallyPatched(){return this.applied}get isFullyPatched(){return this.patchCount==this.patchesApplied}apply(e){let r=this.entries,n={patches:r.length,applied:0,errors:[],notApplied:r.length};this.patchState.clear(),r.forEach(([,s])=>{if(s.isAllowed){Object.defineProperty(this.owner,s.key,s.descriptor);let i=Object.getOwnPropertyDescriptor(this.owner,s.key);this.#e(i,s.descriptor)?(n.applied+=1,n.notApplied-=1,this.patchState.set(s,!0)):(n.errors.push([s,new Error(`Could not apply patch for key ${s.key}`)]),this.patchState.set(s,!1))}else this.patchState.set(s,!1)}),this.patchesApplied=n.applied,typeof e=="function"&&e(n)}createToggle(e=!1){return new v(this,e)}revert(e){if(!this.applied)return;let r=this.entries,n=this.conflicts,s={patches:r.length,reverted:0,restored:0,conflicts:n.length,errors:[],stillApplied:0};r.forEach(([,i])=>{delete this.owner[i.key]?(this.patchesApplied-=1,s.reverted+=1,this.patchState.set(i,!1)):s.errors.push([i,new Error(`Failed to revert patch ${i.key}`)])}),n.forEach(([,i])=>{Object.defineProperty(this.owner,i.key,i.descriptor);let o=Object.getOwnPropertyDescriptor(this.owner,i.key);this.#e(i.descriptor,o)?s.restored+=1:s.errors.push([i,new Error(`Failed to restore original ${i.key}`)])}),s.stillApplied=this.patchesApplied,typeof e=="function"&&e(s)}release(){let e=t.patches.get(this.owner);e.splice(e.find(r=>r===this),1)}owner=null;options=null;patchState=new Map;[Symbol.iterator](){return this.entries.values()}#e(e,r){return!e||!r?!1:e.configurable===r.configurable&&e.enumerable===r.enumerable&&e.value===r.value&&e.writable===r.writable&&e.get===r.get&&e.set===r.set}[Symbol.for("nodejs.util.inspect.custom")](e,r,n){let s=this.ownerDisplayName??"",i=s.length?`[\x1B[32m${s}\x1B[39m]`:"",o=this.prettyEntries.map(a=>`\x1B[2;33m${a}\x1B[22;39m`).join(", ");return`${this.constructor.name}${i} { ${o} }`}static patches=new Map;static enableFor(e){if(t.patches.has(e))for(let r of t.patches.get(e))r.apply()}static enableProbableStatics(){for(let e of t.patches.keys())typeof e=="function"&&t.enableFor(e)}static enableProbableInstances(){for(let e of t.patches.keys())typeof e!="function"&&t.enableFor(e)}static enableAll(){for(let e of t.patches.keys())t.enableFor(e)}static disableFor(e){if(t.patches.has(e))for(let r of t.patches.get(e))r.revert()}static disableAll(){for(let e of t.patches.keys())t.disableFor(e)}static disableProbableStatics(){for(let e of t.patches.keys())typeof e=="function"&&t.disableFor(e)}static disableProbableInstances(){for(let e of t.patches.keys())typeof e!="function"&&t.disableFor(e)}static get applied(){return this.#t(globalThis,!0)}static get known(){return this.#t(globalThis,!1)}static get use(){return this.#t(globalThis,!1,!0)}static get lazy(){return this.#t(globalThis,!1,!1,!0)}static scopedTo(e){let r=(n,s,i=!1,o=!1)=>this.#t(n,s,i,o);return{get applied(){return r(e,!0,!1)},get known(){return r(e,!1,!1)},get use(){return r(e,!1,!0)},get lazy(){return r(e,!1,!1,!0)}}}static#t(e,r,n=!1,s=!1){return[...t.patches.values()].flat().filter(i=>i.owner===e).reduce((i,o)=>{for(let[,a]of o.entries)if(!(r&&o.patchState.get(a)!==!0)){if(n){i[a.key]=async u=>{if(typeof u!="function")return;let p=Object.prototype.toString.call(u),c=o.createToggle();c.start(),p==="[object AsyncFunction]"?await u(a.computed,a):u(a.computed,a),c.stop()};continue}if(s){Object.defineProperty(i,a.key,{get(){return o.apply(),a.computed},enumerable:!0,configurable:!0});continue}if(a.isAccessor){let u=`applyAccessorFor_${String(a.key)}`,p={[u](c){return a.applyTo(c),c}};i[a.key]=p[u]}else a.applyTo(i)}return i},Object.create(null))}static get CustomInspect(){return Symbol.for("nodejs.util.inspect.custom")}static stripExtras(e){return e.replaceAll(/^(\x1B\[\d+m)?[\[\{]\s?|\s?[\]\}](\x1B\[\d+m)?$/gm,"$1$2").replaceAll(/['"](.*?)['"]/gm,"$1")}static get kMutablyHidden(){return Symbol.for('{"enumerable":false,"configurable":true}')}static mutablyHidden(e,r=Object.create(null)){return this.customDescriptorPatch(e,this.kMutablyHidden,r)}static get kMutablyVisible(){return Symbol.for('{"enumerable":true,"configurable":true}')}static mutablyVisible(e,r=Object.create(null)){return this.customDescriptorPatch(e,this.kMutablyVisible,r)}static get kImmutablyHidden(){return Symbol.for('{"enumerable":false,"configurable":false}')}static immutablyHidden(e,r=Object.create(null)){return this.customDescriptorPatch(e,this.kImmutablyHidden,r)}static get kImmutablyVisible(){return Symbol.for('{"enumerable":true,"configurable":false}')}static immutablyVisible(e,r=Object.create(null)){return this.customDescriptorPatch(e,this.kImmutablyVisible,r)}static customDescriptorPatch(e,r,n=Object.create(null)){return!this.stores.has(e)&&(this.stores.set(e,n),t.isKnownPatchSymbol(r))?(n[r]=Object.create(null),this.stores.get(e)[r]):this.stores.get(e)}static isKnownPatchSymbol(e){return typeof e=="symbol"?[this.kImmutablyHidden,this.kImmutablyVisible,this.kMutablyHidden,this.kMutablyVisible].some(r=>r===e):!1}static constructWithStore(e,r,n,s=Object.create(null)){if(typeof e!="function")return e;try{let i=t.customDescriptorPatch(r,n,s);return e(i)}catch(i){return console.error(i),e}}static getDescriptorOverridesFromSymbol(e){let r=Object.create(null);return this.isKnownPatchSymbol(e)&&(r=JSON.parse(e.description)),r}static stores=new WeakMap;static stringRef(e,r,n){return Object.assign(Object(e),{get key(){return r},get value(){return n},get entry(){return[r,n]},get entries(){return[this.entry]},valueOf(){return String(this)},[Symbol.toStringTag]:"String",[Symbol.for("nodejs.util.inspect.custom")](i,o,a){return a(String(this),{colors:!0})}})}static shareOwnPropertyNames(e,r){let n=s=>Object.getOwnPropertyNames(Object(s));return n(e).every(s=>n(r??e?.constructor?.prototype).some(i=>i==s))}static extractName(e,r){let n=(o,a)=>o.some(u=>u===a),s;n([Symbol.prototype,Date.prototype,BigInt.prototype],e)||(s=e?.valueOf?.());let i=s&&(s instanceof String||typeof s=="string")?String(s):void 0;return((typeof e=="symbol"?String(e):void 0)??(typeof e=="string"?e:void 0)??(e instanceof String?String(e):void 0))||(e===Function.prototype||typeof e!="function")&&typeof e!="symbol"&&t.shareOwnPropertyNames(e)&&e?.constructor?.name&&`${e.constructor.name}.prototype`||(e?.[Symbol.toStringTag]??e?.name??i??(typeof r=="function"?r(e):void 0)??(typeof r=="string"?r:void 0)??Object.entries({Reflect}).find(([o,a])=>a===e)?.[0]??`Unknown.${Math.random().toString(36).slice(2)}`)}};l.patches[Symbol.for("nodejs.util.inspect.custom")]=function(t,e,r){let n=["Patches [",[...this.entries()].map(([s,i])=>{let o=i.map(a=>`${" ".repeat(2)}${r(a,e)}`).toSorted().join(`
|
|
4
|
+
`);return`\x1B[22;1m${l.extractName(s)}\x1B[22m =>
|
|
5
|
+
${o}
|
|
6
|
+
`}).toSorted().join(`
|
|
7
|
+
`),"]"];return n[1].includes(`
|
|
8
|
+
`)?(n[1]=n[1].split(`
|
|
9
|
+
`).map(i=>`${" ".repeat(2)}${i}`).join(`
|
|
10
|
+
`),n.join(`
|
|
11
|
+
`).replace(/\n\s*\n]$/m,`
|
|
12
|
+
]`)):(n[1]||(n[1]="\x1B[2;3mNo patches or extensions yet\x1B[22;23m"),n.join(""))};var dt=["number","boolean","bigint","string","symbol"],h=class t extends l{constructor(e,r,n=globalThis,s={}){let i=t.determineInput(e),{key:o,extension:a,valid:u}=i;if(a=r||a,!u)throw new z(n,o);let p=Object.getOwnPropertyDescriptor(n,o);if(p&&(Reflect.has(p,"writable")&&!p.writable||Reflect.has(p,"configurable")&&!p.configurable))throw new q(n,o);super(n,{[o]:a},s),this.key=o,this.class=i.class,this.function=i.function}get isFunction(){return!!this.function}get isClass(){return!!this.class}get isPrimitive(){return~dt.indexOf(typeof this.value)}get isObject(){return Object(this.value)===this.value}static get applied(){return l.applied}static get known(){return l.known}static get use(){return l.use}static get lazy(){return l.lazy}static scopedTo(e){return l.scopedTo(e)}static determineInput(e){let r={key:null,extension:null,valid:!1};return e instanceof Function?(r={key:e.name,extension:e,valid:!0},/^class .*/.exec(e.toString())&&(r.class=e),/^(async )?function .*/.exec(e.toString())&&(r.function=e)):(typeof e=="string"||e instanceof String)&&(r={key:e,extension:null,valid:!0}),r}[Symbol.for("nodejs.util.inspect.custom")](e,r,n){let s={get braces(){return/^(\x1B\[\d+m)?[\[\{]|[\]\}](\x1B\[\d+m)?$/g}};return`Extension[${n(this.patches[this.key],r).replaceAll(s.braces,"$1$2")}]`}get[Symbol.toStringTag](){return this.constructor.name}static createSet(e,...r){return new t.ExtensionSet(e,...r)}static ExtensionSet=class{constructor(r,...n){this.name=r,this.extensionObjects=new Set,this.extensions=new Set;for(let s of n)s instanceof t?(this.extensions.add(s),this.extensionObjects.add(s.patches[s.key])):s instanceof Function&&(this.extensionObjects.add(s),this.extensions.add(new t(s)))}apply(){for(let r of this.extensions)r.apply()}revert(){for(let r of this.extensions)r.revert()}}};var ne=new l(Array,{ifArray(t,e,r){return ht(Array.isArray(t),e,r)}}),{ifArray:mt}=ne.patches,Le=new l(Array.prototype,{[l.kMutablyHidden]:{contains(t){return!!this.find(e=>e===t)},findEntry(t){let e=this.entries(),r=1;for(let n of e)if(t(n[r]))return n},get first(){return this[0]},get isArray(){return Array.isArray(this)},ifArray(t,e){return mt(this,t,e)},oneIs(t,e=!0){return this.some(r=>e?r==t:r===t)},someAre(...t){return this.some(e=>!!~t.indexOf(e))},allAre(t,e=!0){return this.every(r=>e?r==t:r===t)},get last(){return this[this.length-1]},variants(){let t=this.map(s=>Object.keys(s)?.[0]),e=this.map(s=>Object.entries(s)?.[0]),r=e.reduce((s,[i,o])=>(s[i]=o,s),{}),n={order:t,entries:e,object:r};return Object.defineProperty(n,"check",{value(s){if(typeof s!="number"&&s>=0&&s<this.order.length)return!1;let i=this.entries[s][1];return!!(typeof i=="object"&&i&&Object.keys(i).every(o=>~this.order.indexOf(o)))},enumerable:!1,configurable:!0}),n}}});function ht(t,e,r){if(arguments.length>1){var n=isFunction(e)?e(t):e;if(arguments.length>2){var s=isFunction(r)?e(t):r;return t?n:s}return t||n}return t}var se=new l(BigInt,{isBigInt(t){return typeof t=="bigint"||t instanceof BigInt},ifBigInt(t,e,r){return bt(this.isBigInt(t),e,r)}}),{isBigInt:yt,ifBigInt:gt}=se.patches,Ge=new l(BigInt.prototype,{get instance(){return Object(this)},get isBigInt(){return yt(this)},ifBigInt(t,e){return gt(this,t,e)}});function bt(t,e,r){if(arguments.length>1){var n=isFunction(e)?e(t):e;if(arguments.length>2){var s=isFunction(r)?e(t):r;return t?n:s}return t||n}return t}var L=new l(Function,{[l.kMutablyHidden]:{getClassProperties(t){let e=Reflect.ownKeys(t).reduce((n,s)=>(n[s]=Object.getOwnPropertyDescriptor(t,s),n),{}),r=Reflect.ownKeys(t.prototype).reduce((n,s)=>(n[s]=Object.getOwnPropertyDescriptor(t.prototype,s),n),{});return[t,e,t.prototype,r]},isAsync(t){let e=/(\w+)]/g.exec(Object.prototype.toString.call(t))[1];return t instanceof Function&&e.includes("Async")},ifAsync(t,e,r){return D(this.isAsync(t),e,r)},isAsyncGenerator(t){let e=Ve(t);return t instanceof Function&&e=="AsyncGeneratorFunction"},ifAsyncGenerator(t,e,r){return D(this.isAsyncGenerator(t),e,r)},isBigArrow(t){return t instanceof Function&&String(t).includes("=>")&&!String(t).startsWith("bound")&&!Reflect.has(t,"prototype")},ifBigArrow(t,e,r){return D(this.isBigArrow(t),e,r)},isBound(t){return t instanceof Function&&String(t).startsWith("bound")&&!Reflect.has(t,"prototype")},ifBound(t,e,r){return D(this.isBound(t),e,r)},isClass(t){return t instanceof Function&&!!/^class\s/.exec(String(t))},ifClass(t,e,r){return D(this.isClass(t),e,r)},isFunction(t){return t instanceof Function&&!Function.isClass(t)},ifFunction(t,e,r){return D(this.isFunction(t),e,r)},isGenerator(t){let e=Ve(t);return t instanceof Function&&e=="GeneratorFunction"},ifGenerator(t,e,r){return D(this.isGenerator(t),e,r)},StringTagHasInstance(t){Object.defineProperty(t,Symbol.hasInstance,{value:function(r){let n=kt(r);return r[Symbol.toStringTag]===this.name||r instanceof this}})}}}),{isAsyncGenerator:St,ifAsyncGenerator:Et,isAsync:xt,ifAsync:Tt,isBigArrow:Ot,ifBigArrow:Pt,isBound:wt,ifBound:At,isClass:Rt,ifClass:Mt,isFunction:jt,ifFunction:Ct,isGenerator:vt,ifGenerator:Dt}=L.patches,Fe=new l(Function.prototype,{[l.kMutablyHidden]:{get isAsync(){return xt(this)},ifAsync(t,e){return Tt(this,t,e)},get isAsyncGenerator(){return St(this)},ifAsyncGenerator(t,e){return Et(this,t,e)},get isBigArrow(){return Ot(this)},ifBigArrow(t,e){return Pt(this,t,e)},get isBound(){return wt(this)},ifBound(t,e){return At(this,t,e)},get isClass(){return Rt(this)},ifClass(t,e){return Mt(this,t,e)},get isFunction(){return jt(this)},ifFunction(t,e){return Ct(this,t,e)},get isGenerator(){return vt(this)},ifGenerator(t,e){return Dt(this,t,e)},getClassProperties(){return L.patches.getClassProperties(this)}}});function D(t,e,r){if(arguments.length>1){var n=isFunction(e)?e(t):e;if(arguments.length>2){var s=isFunction(r)?e(t):r;return t?n:s}return t||n}return t}function Ve(t,e=!1){if(Object.hasStringTag(t))return t[Symbol.toStringTag];if(!e)return t&&typeof t=="function"?t.name:/\s(.+)]/.exec(Object.prototype.toString.call(t))[1]}function kt(t){let e=[],r=Object.getPrototypeOf(t);for(;r;){let n=Reflect.ownKeys(r).reduce((s,i)=>(s[i]=Object.getOwnPropertyDescriptor(r,i),s),{});e.push([r,n]),r=Object.getPrototypeOf(r)}return e}var{isClass:It,isFunction:G}=L.patches,Nt=Symbol.for("nodejs.util.inspect.custom"),V=new l(globalThis,{[l.kMutablyHidden]:{isThenElse(t,e,r){if(arguments.length>1){let n=G(e)?e(t):e;if(arguments.length>2){let s=G(r)?e(t):r;return t?n:s}return t||n}return t},maskAs(t,e,r){let{prototype:n,toPrimitive:s}=GenericMask({...r,prototype:e}),i={configurable:!0,enumerable:!1},o=G(n)?n.prototype:n,a=It(n)?n:o?.constructor;return!a&&!o?null:(Object.setPrototypeOf(t,o),Object.defineProperties(t,{valueOf:{value(){return String(s("default",t))},...i},[Symbol.toPrimitive]:{value(u){return s(u,t)},...i},[Symbol.toStringTag]:{value:a.name,...i},[Symbol.species]:{get(){return a},...i},[Nt]:{...i,value(u,p,c){return c(this[Symbol.toPrimitive](),{...p,depth:u})}}}),t)},maskAsString(t,e,r){return t&&Reflect.has(t,e)?maskAs(t,StringMask(e??"value",r)):null},maskAsNumber(t,e,r){return t&&Reflect.has(t,e)?maskAs(t,NumberMask(e??"value",r)):null},GenericMask({prototype:t,targetKey:e="value",toPrimitive:r}){let n={targetKey:e,toPrimitive:r,prototype:t};return G(r)||(n.toPrimitive=(s,i)=>{let o=i[e],a=typeof o=="number"&&Number.isFinite(o)||typeof o=="string"&&!isNaN(parseFloat(o))&&isFinite(o);switch(s){case"string":return a?String(o):o??String(i);case"number":return a?Number(o):NaN;case"default":default:return a?Number(o):o}}),n},StringMask(t,e){let r={targetKey:t,toPrimitive:e,prototype:String.prototype};return G(e)||(r.toPrimitive=function(s,i){switch(s){case"default":return i[t];case"number":return parseInt(i[t],36);case"string":return String(i[t]);default:return i}}),r},NumberMask(t,e){let r={targetKey:t,toPrimitive:e,prototype:Number.prototype};return G(e)||(r.toPrimitive=function(s,i){switch(s){case"default":return i[t];case"number":return Number(i[t]);case"string":return String(i[t]);default:return i}}),r},blendProtos(t,...e){let r=(c,f)=>Object.getOwnPropertyDescriptor(c,f),n=c=>Object.getPrototypeOf(c),s=c=>Reflect.ownKeys(c).reduce((f,d)=>({...f,[d]:r(c,d)}),{}),i=Object.create(n(t),e.reduce),o=e.map(c=>n(c)),a=Object.create(null),u=new Set;for(let c of o){let f=c;for(;f;)u.has(f)||(u.add(f),a={...a,...s(f)}),f=n(f)}let p=Object.create(n(t),a);return Object.setPrototypeOf(i,p)}}});var k=new l(JSON,{[l.kMutablyHidden]:{extractFrom(t){let e=/([\w\{\[\"]+) ?/g,r=n=>{try{return JSON.parse(n)}catch{return}};for(let n=e.exec(t);n;n=e.exec(t))if(n&&n?.index){let s=r(t.substring(n.index));if(s)return s}},mightContain(t,e=!1){let r=this.JSONStartPattern.exec(t);return e?[!!r,r?.index??-1,r]:!!r},get JSONStartPattern(){return new RegExp(["(?:","(null)|","(true|false)|","(\\d+\\.?\\d*)|",'("[^\\"]*(?:[^:])")|',"((?:\\{.*\\})+)|","((?:\\[.*\\]+))",")+"].join(""),"gm")}}});var ie=new l(Map,{[l.kMutablyHidden]:{isMap(t){return t?.[Symbol.toStringTag]===Map.name&&t instanceof Map},ifMap(t,e,r){return Vt(this.isMap(t),e,r)}}}),{isMap:Lt,ifMap:Gt}=ie.patches,Be=new l(Map.prototype,{[l.kMutablyHidden]:{get isMap(){return Lt(this)},ifMap(t,e){return Gt(this,t,e)},getKey(t,e=!0){for(let[r,n]of this)return e&&t===n&&!e&&t==n?r:null}}});function Vt(t,e,r){if(arguments.length>1){var n=isFunction(e)?e(t):e;if(arguments.length>2){var s=isFunction(r)?e(t):r;return t?n:s}return t||n}return t}var oe=new l(Number,{[l.kMutablyHidden]:{isNumber(t){return!isNaN(t)&&typeof t=="number"},areNumbers(t=["every","some"][0],...e){return t!=="every"&&t!=="some"?!1:e[t](r=>this.isNumber(r))},ifNumber(t,e,r){return He(this.isNumber(t),e,r)},ifNumbers(t,e,r=["every","some"][0],...n){return He(this.areNumbers(r,...n),t,e)},clamp(t,e=-1/0,r=1/0){return this.areNumbers("every",t,e,r)?Math.max(e,Math.min(r,t)):t}}}),{isNumber:Ft,ifNumber:Bt}=oe.patches,$e=new l(Number.prototype,{[l.kMutablyHidden]:{get instance(){return Object(this)},get isNumber(){return Ft(this)},ifNumber(t,e){return Bt(this,t,e)}}});function He(t,e,r){if(arguments.length>1){var n=isFunction(e)?e(t):e;if(arguments.length>2){var s=isFunction(r)?e(t):r;return t?n:s}return t||n}return t}var w=class t{add(e,r={}){let n=t.token,s=this.calculateName(e),i=Symbol.for(`@${s} #${n}`);return this[t.kDataKey].set(i,r),i}data(e){return this[t.kDataKey].get(e)}deleteData(e,r=void 0){if(this.hasData(e)){let n=this[t.kDataKey].delete(e);return r!==void 0&&this[t.kDataKey].set(e,r),n}return!1}hasData(e){return this[t.kDataKey].has(e)}setData(e,r){return this.hasData(e)?(this[t.kDataKey].set(e,r),!0):!1}token(e){return/^.* \#(.*?)$/.exec(e).description?.[1]}get separator(){return this[kSeparator]}symbols(){return this[t.kDataKey].keys()}calculateName(e,r,n){let s=String(r||this[t.kDomain]),i=String(n||this[t.kSeparator]),o=String(e).startsWith(i)?e.substring(1):e;return s.length?s.endsWith(i)&&(s=s.substring(0,s.length-1)):i="",`${s}${i}${o}`}constructor(e="",r="."){let n=Object.create(Object.getPrototypeOf(this));this[t.kPrototype]=n,this[t.kDataKey]=new Map,this[t.kDomain]=typeof e=="string"&&e,this[t.kSeparator]=r;let s=this[t.kDataKey];Object.setPrototypeOf(this,new Proxy(Object.create(n),{getPrototypeOf(i){return n},get(i,o,a){return s.has(o)?s.get(o):Reflect.get(i,o,a)},has(i,o){return s.has(o)||Reflect.has(i,o)},ownKeys(i){return[...Array.from(s.keys()),...Reflect.ownKeys(i)]},set(i,o,a,u){return s.has(o)?(s.set(o,a),!0):!1},getOwnPropertyDescriptor(i,o){let a=[...s.entries()].reduce((u,p)=>Object.assign(u,{[p[0]]:p[1]}),{});return Object.getOwnPropertyDescriptor(a,o)}}))}static isSymkey(e){return typeof e=="symbol"||e instanceof Symbol?!!/^@.*? #\w+$/.exec(e.description):!1}static get token(){return Math.random().toString(36).slice(2)}static get kDataKey(){return Symbol.for("symkeys.data")}static get kPrototype(){return Symbol.for("symkeys.prototype")}static get kDomain(){return Symbol.for("symkeys.domain")}static get kSeparator(){return Symbol.for("symkeys.separator")}},ae=new h(w);var A=new v(k),F=new l(Symbol,{add(t,e={}){return this.keys.add(t,e)},deleteData(t,e=void 0){return this.keys.deleteData(t,e)},hasData(t){return this.keys.hasData(t)},isSymbol(t){return t&&typeof t=="symbol"},isRegistered(t,e=!1){if(!Symbol.isSymbol(t)){if(e)throw new TypeError("allowOnlySymbols specified; value is not a symbol");return!1}return Symbol.keyFor(t)!==void 0},isNonRegistered(t,e=!1){return!Symbol.isRegistered(t,e)},keys:new w("nejs"),setData(t,e){this.keys.setData(t,e)},withData(t,e){return e!==void 0?Symbol.for(`${t} ${JSON.stringify(e)}`):Symbol.for(t)}}),We=new l(Symbol.prototype,{[l.kMutablyHidden]:{get instance(){return Object(this)},get data(){if(Symbol?.keys&&w.isSymkey(this)){let r=Symbol.keys[this];if(r)return r}let t,e=!1;if(k.applied||(A.start(),e=!0),JSON.mightContain(this.description))try{t=JSON.extractFrom(this.description)}catch{}return e&&A.stop(),t},set data(t){w.isSymkey(this)&&w.hasData(this)&&Symbol.keys.setData(this,t)},get mightHaveEmbeddedJSON(){return mightContain(this.description)},get sgrString(){let t=!1,e,{sgr:r}=String;if(r||(r=(n,...s)=>n),k.applied||(A.start(),t=!0),e=JSON.mightContain(this.description,!0)){let n=e[2][0],s=e[1];if(~s&&n&&n.length>30){let i=this.description,o=[r(`Symbol.for(${i.slice(0,s)}`,"green"),r(n.slice(0,10),"di"),"...",r(n.slice(-5),"di"),r(`${i.slice(s+n.length+1)})`,"green")].join("");return t&&A.stop(),`${o}`}}return t&&A.stop(),newDescription},[Symbol.for("nodejs.util.inspect.custom")](t,e,r){let n=!1,s,{sgr:i}=String;if(i||(i=(o,...a)=>o),k.applied||(A.start(),n=!0),s=JSON.mightContain(this.description,!0)){let o=s[2][0],a=s[1];if(~a&&o&&o.length>30){let u=this.description,p=[i(`Symbol.for(${u.slice(0,a)}`,"green"),i(o.slice(0,10),"di"),"...",i(o.slice(-5),"di"),i(`${u.slice(a+o.length+1)})`,"green")].join("");return n&&A.stop(),`${p}`}}return n&&A.stop(),r(this,{colors:!0})}}});var R=class t{#e=void 0;#t=void 0;constructor(e,r){if((e??r)===void 0?this.#e=t.enigmatic:t.isDescriptor(e)?(this.#e=e,this.#t=x(r)?r:void 0):x(e)&&ce(r)&&(this.#e=Object.getOwnPropertyDescriptor(e,r),this.#t=e),!this.isDescriptor)throw console.error(`
|
|
13
|
+
Descriptor(object,key) FAILED:
|
|
14
|
+
object: ${e===globalThis?"[GLOBAL]":typeof r=="object"?JSON.stringify(e):String(e)}
|
|
15
|
+
key: ${r===globalThis?"[GLOBAL]":typeof r=="object"?JSON.stringify(r):String(r)}
|
|
16
|
+
descriptor: `,this.#e),new Error("Not a valid descriptor:",this.#e)}get isAccessor(){return t.isAccessor(this.#e)}get isData(){return t.isData(this.#e)}get isDescriptor(){return t.isDescriptor(this.#e)}get configurable(){return!!this.#e?.configurable}set configurable(e){(this.#e||{}).configurable=!!e}get enumerable(){return this.#e?.enumerable}set enumerable(e){(this.#e||{}).enumerable=e}get writable(){return this.#e?.writable}set writable(e){(this.#e||{}).writable=e}get value(){return this.#e?.value}set value(e){(this.#e||{}).value=e}get get(){return this.#e?.get}get boundGet(){return x(this.#t)?this.get?.bind(this.#t):this.get}set get(e){(this.#e||{}).get=e}get set(){return(this.#e||{}).set}get boundSet(){return x(this.#t)?this.set?.bind(this.#t):this.set}set set(e){(this.#e||{}).set=e}get hasObject(){return x(this.#t)}get object(){return this.#t}set object(e){this.#t=Object(e)}[Symbol.for("nodejs.util.inspect.custom")](e,r,n){return`Descriptor${this.isAccessor?" (Accessor)":this.isData?" (Data)":""} ${n(this.#e,{...r,depth:e})}`}static for(e,r,n=!1){return!x(e)||!ce(r)||!Reflect.has(e,r)?null:n?new t(Object.getOwnPropertyDescriptor(e,r)):Object.getOwnPropertyDescriptor(e,r)}applyTo(e,r,n=!1){if(!x(e)||!ce(r))throw new Error("Cannot apply descriptor to non-object or invalid key");return Object.defineProperty(e,r,this.toObject(n))}toObject(e=!1){let r={...this.#e};return e&&this.isAccessor&&(this.hasObject?r={...r,get:this.boundGet,set:this.boundSet}:x(e)&&(r={...r,get:this.get?.bind(e),set:this.set?.bind(e)})),r}[Symbol.toPrimitive](e){switch(e){case"string":if(this.isAccessor){let r=Reflect.has(this.#e,"get")?"getter":"",n=Reflect.has(this.#e,"set")?"setter":"";return`Accessor (${r}${r&&n?", ":""}${n})`}else if(this.isData){let r=Reflect.has(this.#e,"value")?"value":"",n=Reflect.has(this.#e,"writable")?"writable":"";return`Data (${r}${r&&n?", ":""}${n})`}break;case"number":return NaN;default:return this.toObject()}}get[Symbol.toStringTag](){return this.constructor.name}static getData(e,r){if(!x(e)||!Reflect.has(e,r))return;let n=t.for(e,r,!0);return n.isData?n.value:null}static getAccessor(e,r){if(!x(e)||!Reflect.has(e,r))return;let n=t.for(e,r,!0);return n.isAccessor?n.get.bind(e)():null}static base(e=!1,r=!1){return{enumerable:e,configurable:r}}static accessor(e,r,{enumerable:n,configurable:s}=t.base()){return{get:e,set:r,enumerable:n,configurable:s}}static data(e,r=!0,{enumerable:n,configurable:s}=t.base()){return{value:e,enumerable:n,writable:r,configurable:s}}static isDescriptor(e){let r=[...t.SHARED_KEYS,...t.ACCESSOR_KEYS,...t.DATA_KEYS];return le(e,r)}static isData(e,r){let s=(typeof e=="object"||e instanceof Object)&&r instanceof String?t.for(e,r):e,{DATA_KEYS:i}=this,o=!1;return le(s,i)&&(o=!0),o}static isAccessor(e,r){let s=e&&r&&(typeof e=="object"||e instanceof Object)&&(r instanceof String||typeof r=="symbol")?t.for(e,r):e,{ACCESSOR_KEYS:i}=this,o=!1;return le(s,i)&&(o=!0),o}static get flexible(){return this.base(!0,!0)}static get enigmatic(){return this.base(!1,!0)}static get intrinsic(){return this.base(!1,!1)}static get transparent(){return this.base(!0,!1)}static get SHARED_KEYS(){return["configurable","enumerable"]}static get ACCESSOR_KEYS(){return["get","set"]}static get DATA_KEYS(){return["value","writable"]}},ue=new h(R);function x(t){return t&&typeof t=="object"}function ce(t){return["string","symbol"].some(e=>typeof t===e)}function le(t,...e){return x(t)&&e.flat(1/0).map(r=>Reflect.has(t,r)).some(r=>r)}var{keys:Ht}=F.patches,X=t=>typeof t=="function"||t instanceof Function;var $t=t=>typeof t=="boolean",pe=t=>$t(t)&&t===!0,Ke=t=>pe(!!t);var B=new l(Object,{[l.kMutablyHidden]:{copy(t,...e){return de(!1,t,...e)},deepCopy(t,...e){return de(!0,t,...e)},get definitionType(){return{get mutablyHidden(){return l.kMutablyHidden},get mutablyVisible(){return l.kMutablyVisible},get immutablyHidden(){return l.kImmutablyHidden},get immutablyVisible(){return l.kImmutablyVisible}}},define(t,e,r,n=Object.definitionType.mutablyHidden){let s=l.getDescriptorOverridesFromSymbol(n);return Object.defineProperty(t,e,{...s,value:r})},defineAccessor(t,e,r,n,s=Object.definitionType.mutablyHidden){let i=l.getDescriptorOverridesFromSymbol(s);return Object.defineProperty(t,e,{...i,get:r,set:n})},addAccessor(t,e,r,n,s){let i=s??(!r&&!n)?!0:void 0;return this.add({to:t,key:e,get:r,set:n,storage:i})},addData(t,e,r){return this.add({to:t,key:e,value:r})},add(...t){let{isDescriptor:e}=R,{isObject:r}=this,{kDescriptorStore:n}=this,s,i,o,a,u,p,c,f,d,m;if(t.length&&r(t[0])?{to:s,key:i,value:o,get:a,set:u,storage:p,storageKey:c,type:f=["accessor","data"][1],flag:d=void 0,descriptorBase:m=void 0}=t[0]:t.length>1&&([to,f,i,getOrValue,u,p,c,d,m]=t,s=to,f=["accessor","data"].includes(f.toLowerCase())?f.toLowerCase():"data",a=f==="accessor"?getOrValue:void 0,_value=f==="data"?getOrValue:void 0),!this.isObject(s))return console.warn("Object.add() must receive an object for `toObject`"),s;let P=e(m)?m:{},O=d||Object.definitionType.mutablyVisible,j={...l.getDescriptorOverridesFromSymbol(O),...P};switch(["accessor","data"].includes(f)?String(f).toLowerCase():"data"){case"accessor":let y=p,U=c||i,T=!1,b=a,S=u;if(!Ke(b)&&!X(b)&&(b=void 0),!Ke(S)&&!X(S)&&(S=void 0),(r(y)||pe(y)||X(y))&&(T=pe(y),y=X(y)?y():y,y=r(y)?y:T&&{}||void 0),!b&&!S&&T)Object.defineProperty(s,n,{value:Ht.add("descriptor.store",y),configurable:!0,enumerable:!1,writable:!0}),b=()=>this[n]?.data?.[U],S=C=>{this[n].data[U]=C};else if(b?.length&&S?.length>1&&y){let C=b,E=S;b=()=>C(y),S=J=>E(J,y)}Object.defineProperty(s,i,{...j,get:b,set:S});break;case"data":Object.defineProperty(s,i,{...j,value:o});break}return s},fromEntriesUsing(t,e=Object.prototype,r=void 0){if(!Array.isArray(t))return;let n=t.filter(i=>Array.isArray(i)&&i.length>=2);if(!n.length)return;let s=r instanceof Function?r:(i,[o,a])=>(i[o]=a,i);return n.reduce(s,Object.create(e??Object.prototype))},getPrototypeChainEntries(t){let e=[],r=Object.getPrototypeOf(t);for(;r;){let n=Reflect.ownKeys(r).reduce((s,i)=>(s[i]=Object.getOwnPropertyDescriptor(r,i),s),{});e.push([r,n]),r=Object.getPrototypeOf(r)}return e},getStringTag(t,e=!1){if(Object.hasStringTag(t))return t[Symbol.toStringTag];if(!e)return t&&typeof t=="function"?t.name:/\s(.+)]/.exec(Object.prototype.toString.call(t))[1]},getType(t,e=globalThis){let r=Object.getStringTag(t);switch(r){case"Null":return null;case"Undefined":return;default:return e[r]}},hasStringTag(t){return Object.isObject(t)&&Reflect.has(t,Symbol.toStringTag)},isNullDefined(t){return t==null},ifNullDefined(t,e,r){return fe(this.isNullDefined(t),e,r)},isObject(t){return t instanceof Object||t&&typeof t=="object"},isPrimitive(t){if(t===null)return!0;switch(typeof t){case"string":case"number":case"bigint":case"boolean":case"undefined":case"symbol":return!0;default:return!1}},ifPrimitive(t,e,r){return fe(this.isPrimitive(t),e,r)},isValidKey(t){return typeof t=="string"||typeof t=="symbol"},ifValidKey(t,e,r){return fe(this.isValidKey(t),e,r)},get kDescriptorStore(){return Symbol.for("@nejs.object.descriptor.storage")},prekeyed(t,e=void 0,r=["data","accessor"][0],n={get:void 0,set:void 0,thisArg:void 0},s={enumerable:!0,configurable:!0},i=void 0,o=Object.prototype){let a=Object.create(o,i),u={};if(Array.isArray(t))u=t.reduce((p,c)=>({...p,[c]:e}),{});else if(t&&typeof t=="object")Object.assign(u,t);else return console.warn("skipping"),a;for(let[p,c]of Object.entries(u)){let f=Symbol.for(`${p}#${Math.random().toString(36).slice(2)}`),d=u[p]??e;r==="accessor"&&n.get===void 0&&(Object.defineProperty(a,f,{value:d,enumerable:!1,configurable:!0}),n.thisArg=a);let m=r==="data"?{value:c??e,writable:!0}:{get:n.get??function(){return this[f]},set:n.set??function(P){this[f]=P}};n.thisArg&&(m.get=m.get.bind(n.thisArg),m.set=m.set.bind(n.thisArg)),Object.defineProperty(a,p,{...s,...m})}return a},stripTo(t,e,r=!0){if(!t||typeof t!="object")throw new TypeError("Object.stripTo requires an object to strip. Received",t);let n={};if(!Array.isArray(e))return n;for(let s of e)if(Reflect.has(t,s)){let o={...Object.getOwnPropertyDescriptor(t,s)};(typeof o.get=="function"||typeof o.set=="function")&&r&&(o.get=o.get?.bind(t),o.set=o.set?.bind(t)),Object.defineProperty(n,s,o)}return n}}}),{isObject:Wt,ifObject:Kt,isNullDefined:Ut,ifNullDefined:Jt,isPrimitive:qt,ifPrimitive:zt,isValidKey:Qt,ifValidKey:Yt,hasStringTag:Xt,getStringTag:Zt,stripTo:_t}=B.patches,Ue=new l(Object.prototype,{[l.kMutablyHidden]:{getPrototypeChainEntries(){return B.patches.getPrototypeChainEntries(this)},get isObject(){return Wt(this)},ifObject(t,e){return Kt(this,t,e)},get isNullDefined(){return Ut(this)},ifNullDefined(t,e){return Jt(this,t,e)},get isPrimitive(){return qt(this)},ifPrimitive(t,e){return zt(this,t,e)},get isValidKey(){return Qt(this)},ifValidKey(t,e){return Yt(this,t,e)},get hasStringTag(){return Xt(this)},getStringTag(t=!1){return Zt(this,t)},stripTo(t,e=!0){return _t(this,t,e)}}});function fe(t,e,r){if(arguments.length>1){var n=isFunction(e)?e(t):e;if(arguments.length>2){var s=isFunction(r)?e(t):r;return t?n:s}return t||n}return t}function de(t,e,...r){let n=new Set;for(let s of r){if(s===null||typeof s!="object"||n.has(s))continue;n.add(s);let i=Reflect.ownKeys(s);for(let o of i){let a;try{a=Object.getOwnPropertyDescriptor(s,o)}catch(f){console.warn(`Failed to get descriptor for key "${o}": ${f}`);continue}let u=Reflect.has(a,"value"),p=a?.value;if([u,p,typeof p=="object",!n.has(p)].every(f=>f)){n.add(p);let f=Object.getPrototypeOf(p),d=Object.getOwnPropertyDescriptors(p),m=Object.create(f,d);a.value=t?de(t,m,p):m}try{Object.defineProperty(e,o,a)}catch(f){console.error(`Failed to define property "${o}": ${f}`)}}}return e}var Je=new l(Reflect,{hasAll(t,...e){return Object.isObject(t)&&e.flat(1/0).map(r=>Reflect.has(t,r)).every(r=>r)},hasSome(t,...e){return me(t)&&e.flat(1/0).map(r=>Reflect.has(t,r)).some(r=>r)},metadata(t,e=globalThis){let n=tr([{key:t},{owner:e}])();n.check(0)&&(t=n.object.key,e=n.object.owner);let s=me(e)&&er(t)?Object.getOwnPropertyDescriptor(e,t):void 0,i=()=>s?.get?.bind(e)?.()??e[t];return s?{get owner(){return e},get key(){return t},get value(){return i()},get descriptor(){return s},get isReadOnly(){return this.isAccessor&&!s?.set},get isAssignable(){return s?.configurable??s?.writable},get isAccessor(){return!!(this?.descriptor?.get||this?.descriptor?.set)},get isData(){return!!(this?.descriptor?.value||this?.descriptor?.writable)}}:void 0},ownDescriptors(t){if(!me(t))throw new TypeError("The supplied object must be non-null and an object");let e={},r=Reflect.ownKeys(t);for(let n of r)e[n]=Object.getOwnPropertyDescriptor(n);return e},entries(t){return!t||typeof t!="object"?[]:Reflect.ownKeys(t).map(e=>[e,Object.getOwnPropertyDescriptor(t,e)])},values(t){return Reflect.entries.map(([,e])=>e)}});function me(t){return t&&typeof t=="object"}function er(t){return["string","symbol"].some(e=>typeof t===e)}function tr(t){return function(){let r=this.map(o=>Object.keys(o)?.[0]),n=this.map(o=>Object.entries(o)?.[0]),s=n.reduce((o,[a,u])=>(o[a]=u,o),{}),i={order:r,entries:n,object:s};return Object.defineProperty(i,"check",{value(o){if(typeof o!="number"&&o>=0&&o<this.order.length)return!1;let a=this.entries[o][1];return!!(typeof a=="object"&&a&&Object.keys(a).every(u=>~this.order.indexOf(u)))},enumerable:!1,configurable:!0}),i}.bind(t)}var qe=new l(RegExp,{[l.kMutablyHidden]:{anything(t=!1,e=!1){return`[.${e?"\\n\\r":""}]*${t?"":"?"}`},nonCaptureGroup(t){return`(?:${t})`},captureGroup(t){return`(${t})`},oneOf(...t){return t.join("|")},zeroOrMore(t){return`(?:${t})*`},zeroOrOne(t){return`(?:${t})?`},escape(t){return rr(t)},get null(){return"null"},get bool(){return this.oneOf("true","false")},currencySymbols(t=[["*"],["USD","GBP"]][0],e="en-US"){let r=Intl.supportedValuesOf("currency"),n=a=>!!~r.indexOf(a);typeof t=="string"&&n(t)&&(t=[t]),Array.isArray(t)||(t=r),t=t.filter(a=>n(a)),t.length||(t=r);let s=a=>({style:"currency",currency:a}),i=(a,u)=>Intl.NumberFormat(a,s(u));return(t.length===1&&t[0]==="*"?r:t).filter(a=>n(a)).map(a=>{let u=i(e,a).formatToParts()?.[0].value;return u&&`(?:${RegExp.escape(u)})`}).join("|")},get number(){let t=Object("\\d+\\.?\\d*"),e=this;return Object.defineProperties(t,{any:{get(){return String(t)}},float:{get(){return String(t)}},money:{get(){return`(?:${e.currencySymbols()})?${this.float}`}},integer:{get(){return"\\d+"}},pretty:{value(r="en-US"){return`${e.zeroOrMore(e.currencySymbols(["*"],r))}[\\d,]+\\.?[\\d]*`}},jsLiteral:{get(){return"[\\d_]+"}}}),t},get integer(){return"\\d+"},get string(){return{get doubleQuoted(){return'"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"'},get singleQuoted(){return"'[^'\\\\]*(?:\\\\.[^'\\\\]*)*'"}}},get whitespace(){return"\\s*"},get comma(){return`,${this.whitespace}`}}},{conditions:{escape(){return!Reflect.has(RegExp,"escape")}}});function rr(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var he=new l(Set,{[l.kMutablyHidden]:{isSet(t){return t?.[Symbol.toStringTag]===Set.name||t instanceof Set},ifSet(t,e,r){return Ye(this.isSet(t),e,r)}}}),{isSet:ze}=he.patches,Qe=new l(Set.prototype,{[l.kMutablyHidden]:{concat(...t){for(let e of t){if(typeof e=="string"||!Reflect.has(e,Symbol.iterator)){this.add(e);continue}for(let r of e)this.add(r)}},contains(t){for(let e of this)if(t==e)return!0;return!1},every(t,e){if(typeof t!="function")throw new TypeError(`everyFn must be a function! Received ${String(t)}`);let r=0;for(let n of this)t.call(e,n,NaN,this)&&r++;return r===this.size},find(t,e){if(typeof t!="function")throw new TypeError(`findFn must be a function! Received ${String(t)}`);for(let r of this)if(t.call(e,r,NaN,this))return r},findLast(t,e){if(typeof t!="function")throw new TypeError(`findFn must be a function! Received ${String(t)}`);let r=[];for(let n of this)t.call(e,n,NaN,this)&&r.push(n);if(r.length)return r[r.length-1]},get isSet(){return ze(this)},ifSet(t,e){return Ye(ze(this),t,e)},get length(){return this.size},map(t,e){if(typeof t!="function")throw new TypeError(`mapFn must be a function! Received ${String(t)}`);let r=[];for(let n of this)r.push(t.call(e,n,NaN,this));return r},reduce(t,e,r){if(typeof t!="function")throw new TypeError(`reduceFn must be a Function! Received ${String(t)}`);let n=e;for(let s of this)n=t.call(r,n,s,NaN,this);return n},some(t,e){if(typeof t!="function")throw new TypeError(`someFn must be a function! Received ${String(t)}`);for(let r of this)if(t.call(e,r,NaN,this))return!0;return!1}}});function Ye(t,e,r){if(arguments.length>1){var n=isFunction(e)?e(t):e;if(arguments.length>2){var s=isFunction(r)?e(t):r;return t?n:s}return t||n}return t}var nr=["(",")"],ye=new l(String,{isString(t){return t!=null&&(typeof t=="string"||t instanceof String)},ifString(t,e,r){return or(this.isString(t),e,r)},get parenthesisPair(){return["(",")"]},get squareBracketsPair(){return["[","]"]},get curlyBracketsPair(){return["{","}"]},random36(){return Math.random().toString(36).slice(2)},random16(){return Math.random().toString(16).slice(2)},randomRGBHex(t="#"){let e=Math.random().toString(16).slice(2).substring(0,6);return`${t}${e.padEnd(6,"0")}`},randomARGBHex(t="#"){let e=Math.random().toString(16).slice(2).substring(0,8);return`${t}${e.padStart(6,"0").padEnd(8,"0")}`},randomRGBAHex(t="#"){let e=Math.random().toString(16).slice(2).substring(0,8);return`${t}${e.padStart(6,"0").padStart(8,"0")}`},randomRGB(){let t=Math.random().toString(16).slice(2).padEnd(8,"0"),e=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),n=parseInt(t.substring(4,6),16);return`rgb(${e}, ${r}, ${n})`},randomRGBA(t={red:void 0,green:void 0,blue:void 0,alpha:void 0}){let e=Math.random().toString(16).slice(2).padEnd(8,"0"),r=t.red??parseInt(e.substring(0,2),16),n=t.green??parseInt(e.substring(2,4),16),s=t.blue??parseInt(e.substring(4,6),16),i=t.alpha??parseInt(e.substring(6,8),16)/255*1;return`rgba(${r}, ${n}, ${s}, ${i.toFixed(2)})`},sgr(t,...e){let r=Object.assign(["black","red","green","yellow","blue","magenta","cyan","white"],{isBG:c=>!!/bg/i.exec(c),isBright:c=>!!/bright/i.exec(c),isColor:c=>{let f=r.find(d=>new RegExp(d,"i").exec(c));return[!!f,r.indexOf(f)]}}),n=c=>{if(Array.isArray(c)){let f=[];for(let d of c)f=[...f,...n(d)];return f.flat().filter(d=>d.length)}return!c||typeof c!="string"?[""]:c.includes(",")?n(c.split(",")):!r.isColor(c)[0]&&c.length>1?[...c]:[c]},s=n(e),i={blink:["\x1B[5m","\x1B[25m","k"],bold:["\x1B[1m","\x1B[22m","b"],conceal:["\x1B[8m","\x1B[28m","c"],dim:["\x1B[2m","\x1B[22m","d"],italics:["\x1B[3m","\x1B[23m","i"],negative:["\x1B[7m","\x1B[27m","n"],strike:["\x1B[9m","\x1B[29m","s"],underline:["\x1B[4m","\x1B[24m","u"]};Object.values(i).forEach(c=>i[c[2]]=c);let o=c=>{let f="",d="",m=String(c).toLowerCase(),[P,O]=r.isColor(m);return P?(f=r.isBG(m)?`\x1B[${r.isBright(m)?10:4}${O}m`:`\x1B[${r.isBright(m)?9:3}${O}m`,d=r.isBG(m)?"\x1B[49m":"\x1B[39m"):i[m]&&(f=i[m][0],d=i[m][1]),[f,d]},a=s.map(c=>o(c)[0]).join(""),u=s.map(c=>o(c)[1]).reverse().join(""),p=Object(`${a}${t}${u}`);return Object.defineProperties(p,{show:{get(){return console.log(String(this)),this},enumerable:!1},[Symbol.for("nodejs.util.inspect.custom")]:{value(c,f,d){return d(String(this),f)},enumerable:!1}}),p},wrap(t,e={colorProperties:void 0,indent:2,indentCharacter:" ",inspector:[Object,"getOwnPropertyNames"],lineEnding:`
|
|
17
|
+
`,maxLen:78,perLine:void 0,perLinePerProperty:void 0,preProcess:void 0,preReturn:void 0,separator:", "}){let{colorProperties:r=void 0,indent:n=e?.indent??2,indentCharacter:s=e?.indentCharacter??" ",inspector:i=e?.inspector??[Object,"getOwnPropertyNames"],lineEnding:o=e?.lineEnding??`
|
|
18
|
+
`,maxLen:a=e?.maxLen??78,perLine:u=e?.perLine??void 0,perLinePerProperty:p=e?.perLinePerProperty??void 0,preProcess:c=e?.preProcess??void 0,preReturn:f=e?.preReturn??void 0,separator:d=e?.separator??", "}=e??{},m=n===0?"":s.repeat(Number(n)||2);a=78-m.length;let P=this.sgr,O=b=>typeof b=="function",j=[],Ne=i[0][i[1]],y=Array.isArray(t)?t:Ne(Object(t));O(c)&&(y=c(y));let U={indent:n,indentCharacter:s,lineEnding:o,maxLen:a,tab:m,sgr:P},T=y.reduce((b,S)=>{let C=[...j,S].join(d);if(m.length+C.length<=a)j.push(S);else{let E=[...j];if(O(p)&&(E=E.map((J,te,st)=>p(J,te,st,U))),r){let J=Array.isArray(r)?r:[r];E=E.map(te=>P(te,...J))}E=[m,E.join(d)].join(""),O(u)&&(E=u(E[0],0,E)?.[0]??E[0]),b.push(E),j=[]}return b},[]);return O(f)&&(T=T.map((b,S,C)=>f(b,S,C,U))),Symbol.for(`@nejs.string.wrap ${JSON.stringify({lines:T})}`),o&&(T=T.join(o)),T}}),{isString:sr,ifString:ir}=ye.patches,Xe=new l(String.prototype,{[l.kMutablyHidden]:{get isString(){return sr(this)},ifString(t,e){return ir(this,t,e)},get instance(){return Object(this)},extractSubstring(t=0,e=nr){let[r,n]=e,s=0,i=-1,o=-1,a="",u=0;for(let d=t;d<this.length;d++){let m=this[d];if(m===r)s++,i===-1&&(i=d);else if(m===n&&(s--,s===0)){o=d;break}}let p=[Math.max(0,i-100),i],c=[...this.substring(p[0],p[1])].reverse().join(""),f;try{f=/([^ \,\"\'\`]+)/.exec(c)[1]??"",a=[...f].reverse().join("")}catch{}if(i!==-1&&o!==-1){let d=[i,o+1];return{extracted:this.slice(d[0],d[1]),range:[i,o],newOffset:o+1,leadingToken:a}}else return{extracted:null,range:[i,o],newOffset:t,leadingToken:a}}}});function or(t,e,r){if(arguments.length>1){var n=isFunction(e)?e(t):e;if(arguments.length>2){var s=isFunction(r)?e(t):r;return t?n:s}return t||n}return t}var ge=class t extends Promise{#e=null;#t=null;#r=null;#s=!1;#i=!1;value=null;reason=null;#n=!1;constructor(e){let r=e&&typeof e=="object"?e:{};if(r?.resolve&&r?.reject)throw new TypeError("resolve and reject options cannot be simultaneously provided");let n,s;super((i,o)=>{n=i,s=o,r?.executor&&typeof r?.executor=="function"&&r?.executor(i,o)}),this.#r=i=>(r?.doNotTrackAnswers!==!0&&(this.value=i),this.#n=!0,this.#i=!0,n(i)),this.#t=async i=>(r?.doNotTrackAnswers!==!0&&(this.reason=i),this.#n=!0,this.#s=!0,s(i)),this.#e=this,r?.resolve?this.#r(r?.resolve):r?.reject&&this.#t(r?.reject)}get settled(){return this.#n}get wasRejected(){return this.#s}get wasResolved(){return this.#i}get promise(){return this.#e}resolve(e){return this.#r(e)}reject(e){return this.#t(e)}[Symbol.for("nodejs.util.inspect.custom")](e,r,n){return["\x1B[1mDeferred [\x1B[22;3mPromise\x1B[23;1m]\x1B[22m ","{ ",this.settled?this.wasResolved?`resolved with \x1B[32m${this.value}\x1B[39m`:`rejected with \x1B[31m${this.reason?.message??this.reason}\x1B[39m`:"\x1B[33munsettled valued or reason\x1B[39m"," }"].join("")}static get[Symbol.species](){return class extends t{constructor(r){super({executor:r})}}}},be=new h(ge);var g=class{static addExpansion(e){let r=(n=globalThis)=>(s,i)=>{let o=s.length;try{let a=n[i];s.splice(o,0,[i,a],[a,i])}catch(a){s.splice(o,0,[i,a])}return s};return Object.defineProperty(e,"expand",{get(){return new Map(this.reduce(r(globalThis),[]))},configurable:!0,enumerable:!0})}static accessors(e=globalThis,r=[]){let n=[];for(let s of r)try{let i=this.metadata(e,s);(i.get||i.set)&&n.push([s,i]);continue}catch(i){n.push([s,i])}return new Map(n)}static classes(e=globalThis){return this.fetcher("function",/^[A-Z]/,Object,"getOwnPropertyNames",e)}static functions(e=globalThis){return this.fetcher("function",/^[a-z]/,Object,"getOwnPropertyNames",e)}static objects(e=globalThis){return this.fetcher("object",null,Object,"getOwnPropertyNames",e)}static properties(e=globalThis){return this.fetcher((r,n,s)=>n!=="object"&&n!=="function",null,Object,"getOwnPropertyNames",e)}static symbols(e=globalThis){return this.addExpansion(Object.getOwnPropertySymbols(e))}static metadata(e,r){let n={owner:e,key:r,descriptor:void 0,value:void 0,get type(){return typeof this.value}};try{n.descriptor=Object.getOwnPropertyDescriptor(e,r)}catch(s){n.descriptor=s}try{n.value=n.descriptor?.value??n.descriptor?.get?.bind(e)?.()??e[r]}catch(s){n.value=s}return n}static fetcher(e,r=void 0,n=Object,s="getOwnPropertyNames",i=globalThis){let o=e;if(typeof e!="function"){let a=String(e);o=function(u,p,c){return p===a}.bind(this)}return this.addExpansion(n[s](i).filter(a=>{let u=this.metadata(i,a);return(!r||r.exec(String(a)))&&o(u.value,u.type,u.descriptor)}).toSorted())}static makeReport(e=globalThis){let r=["classes","functions","objects","properties","symbols","accessors"],n=r.reduce((f,d)=>(f[d]=this[d].bind(this),f),{}),{classes:s,functions:i,objects:o,properties:a,symbols:u,accessors:p}=n,c={};return Object.assign(c,{accessors:{classes:void 0,functions:void 0,objects:void 0,properties:void 0,symbols:void 0},classes:this[s.name](),functions:this[i.name](),objects:this[o.name](),properties:this[a.name](),symbols:this[u.name](),expandAll(){r.forEach(f=>{c[f]=c?.[f]?.expand})}})(r.forEach(f=>{debugger;c.accessors[f]=p(globalThis,c[f])})),c}},Se=new h(g);var Q=class{#e=[];constructor(e,...r){e!=null&&typeof e[Symbol.iterator]=="function"?this.#e=[...e,...r]:this.#e=[e,...r]}*[Symbol.iterator](){for(let e of this.#e)yield e}get asArray(){return this.#e}get[Symbol.toStringTag](){return this.constructor.name}static isIterable(e){return Object.prototype.toString.call(e?.[Symbol.iterator])==="[object GeneratorFunction]"}},H=class{#e=void 0;constructor(e,r){if(!e||!Reflect.has(e,Symbol.iterator))throw new TypeError("Value used to instantiate Iterator is not iterable");this.#t=e,this.#r=e[Symbol.iterator](),this.#e=typeof r=="function"?r:void 0}get asArray(){return Array.from(this.#t)}get iterable(){return this.#t}next(){let e=this.#r.next(),r=e;return r.done?{value:void 0,done:!0}:(this.#e&&typeof this.#e=="function"&&(r.value=this.#e(e.value)),{value:r.value,done:!1})}reset(){this.#r=this.#t[Symbol.iterator]()}[Symbol.iterator](){return this}get[Symbol.toStringTag](){return this.constructor.name}#t=null;#r=null},Ee=new h(Q),xe=new h(H);var Te=class t{constructor(e,r=()=>{},n=()=>{}){this.args=e,this.parser=n,this.validator=r,this.result=void 0,this.success=this.validate(this.args),this.success&&(this.results=this.parse(this.args))}parse(e){return this.parser?.(e)}validate(e){return this.validator?.(e)}static tryParsers(e,r){return this.safeTryParsers(e,r,!0)}static safeTryParsers(e,r,n=!1){if((!Array.isArray(e)||!Array.isArray(r))&&n)throw new this.ParametersMustBeArrayError(`${this.name}.tryParsers must receive two arrays as args`);if(!r.some(o=>o?.prototype instanceof t&&typeof o=="function")&&n)throw new this.ParsersArrayMustContainParsersError(`${this.name}.tryParsers parsers argument must contain at least one ParamParser derived class`);let s=!1,i;for(let o of r){let a=new o(e);if(a.success){s=!0,i=a.result;break}}if(!s&&n)throw new this.NoValidParsersFound("No valid parsers found");return{success:s,data:i}}static get NoValidParsersFound(){return class extends Error{}}static get ParametersMustBeArrayError(){return class extends Error{}}static get ParsersArrayMustContainParsersError(){return class extends Error{}}},Oe=new h(Te);var{toStringTag:Ze,hasInstance:ar}=Symbol,_e=class{constructor(e=!1,r=void 0,n=void 0){Object.assign(this,{succes,value:r,context:n})}get[Ze](){return this.constructor.name}static[ar](e){return e?.[Ze]===this.name||e?.constructor===this}},$=class t{constructor(e,r=t.type.get){this.handler=e,this.typeName=Array.isArray(r)?t.nameFromType(r)??"get":String(r),this.type=Array.isArray(r)?r:t.type[r??"get"]}invoke(...e){let r={defaultValue:Reflect[this.typeName](...e),proxyHandler:this,typeHandler:this.handler};try{let n=this.handler.apply(r,e);return n?.[Symbol.toStringTag]!==t.ResponseType?t.response(!!n,n,r):(n.context=r,n)}catch(n){return t.response(!1,n)}}static response(e,r,n){return{success:e,value:r,context:n,get[Symbol.toStringTag](){return this.ResponseType}}}static get ResponseType(){return"ProxyHandlerResponse"}static nameFromType(e){if(!Array.isArray(e))return"custom";let r=Object.entries(t.type);for(let[n,s]of r)if(e.every(i=>~s.indexOf(i)))return n;return"custom"}static get typeNames(){return Object.keys(t.type)}static get type(){return{get apply(){return["target","thisArg","argumentsList"]},get construct(){return["target","args"]},get defineProperty(){return["target","key","descriptor"]},get deleteProperty(){return["target","property"]},get get(){return["target","property","receiver"]},get getOwnPropertyDescriptor(){return["target","property"]},get getPrototypeOf(){return["target"]},get has(){return["target","prototype"]},get isExtensible(){return["target"]},get ownKeys(){return["target"]},get preventExtensions(){return["target"]},get set(){return["target","property","value","receiver"]},get setPrototypeOf(){return["target","prototype"]}}}},Pe=class t{constructor(e,r,n={prototype:void 0,apply:!0}){let s=r.filter(i=>i instanceof $);Object.assign(this,{class:e instanceof Function?e:e.constructor,instance:e instanceof Function?null:e}),this.handlers=new Map;for(let i of $.typeNames){let o=[].concat(s.filter(a=>a.typeName===i));this.handlers.set(i,o)}if(this[t.kOriginal]=n?.prototype??Object.getPrototypeOf(this.class),this[t.kCreated]=Object.create(this[t.kOriginal],this.instance),this[t.kProxy]=new Proxy(this[t.kCreated],this),n?.apply!=!0){let i=this?.instance??this.class;Object.setPrototypeOf(i,this[t.kCreated])}}handlersOfType(e){return this.handlers.get(e)}tryEachOfType(e,...r){let n=$.typeNames,s=[];for(let i of n){let o=i.invoke(...r);if(o.success)return[o,s];s.push(o)}return[void 0,s]}apply(e,r,n){let s="apply",i=[e,r,n],[o,a]=tryEachOfType(s,...i);return o||Reflect[s](...i)}construct(e,r){let n="construct",s=[e,r],[i,o]=tryEachOfType(n,...s);return i||Reflect[n](...s)}defineProperty(e,r,n){let s="defineProperty",i=[e,r,n],[o,a]=tryEachOfType(s,...i);return o||Reflect[s](...i)}deleteProperty(e,r){let n="deleteProperty",s=[e,r],[i,o]=tryEachOfType(n,...s);return i||Reflect[n](...s)}get(e,r,n){let s="get",i=[e,r,n],[o,a]=tryEachOfType(s,...i);return o||Reflect[s](...i)}getOwnPropertyDescriptor(e,r){let n="getOwnPropertyDescriptor",s=[e,r],[i,o]=tryEachOfType(n,...s);return i||Reflect[n](...s)}getPrototypeOf(e){let r="getPrototypeOf",n=[e],[s,i]=tryEachOfType(r,...n);return s||Reflect[r](...n)}has(e,r){let n="has",s=[e,r],[i,o]=tryEachOfType(n,...s);return i||Reflect[n](...s)}isExtensible(e){let r="isExtensible",n=[e],[s,i]=tryEachOfType(r,...n);return s||Reflect[r](...n)}ownKeys(e){let r="ownKeys",n=[e],[s,i]=tryEachOfType(r,...n);return s||Reflect[r](...n)}preventExtensions(e){let r="preventExtensions",n=[e],[s,i]=tryEachOfType(r,...n);return s||Reflect[r](...n)}set(e,r,n,s){let i="set",o=[e,r,n,s],[a,u]=tryEachOfType(i,...o);return a||Reflect[i](...o)}setPrototypeOf(e,r){let n="setPrototypeOf",s=[e,r],[i,o]=tryEachOfType(n,...s);return i||Reflect[n](...s)}static get kCreated(){return Symbol.for("pp.prototype.created")}static get kOriginal(){return Symbol.for("pp.prototype.original")}static get kProxy(){return Symbol.for("pp.proxy")}},Z=new h($),_=new h(Pe),Dn=new h.ExtensionSet("PluggableProxyExtensionSet",Z,_);var et=new l(WeakRef,{isValidReference(t){return!(typeof t=="symbol"&&Symbol.keyFor(t)===void 0||typeof t!="object"&&typeof t!="symbol"||t==null)}});var{isObject:cr,isNullDefined:lr,isValidKey:ur}=B.patches,{isRegistered:fr}=F.patches,{isValidReference:tt}=et.patches,we=class t extends Map{#e=!1;constructor(...e){super(...e)}objectifying(e=!0){return this.objectifyValues=e,this}asObject(){let e={};for(let[r,n]of this){let s=ur(r)?r:String(r),i=n?.valueOf()||n;e[s]=i}return e}get objectifyValues(){return this.#e}get(e,r){let n=super.get(e);return!n||!n?.deref()?r:n?.deref()}set objectifyValues(e){this.#e=!!e}set(e,r){let n=r;if(this.#e&&(typeof n=="number"||typeof n=="string"||typeof n=="boolean"||typeof n=="bigint")&&(n=Object(n)),typeof n=="symbol"&&Symbol.keyFor(n)!==void 0)throw new TypeError("RefMap cannot accept registered symbols as values");if(typeof n!="object"&&typeof n!="symbol")throw new TypeError("RefMap values must be objects, non-registered symbols, or objectified primitives");if(n==null)throw new TypeError("RefMap values cannot be null or undefined");let s=new WeakRef(n);super.set(e,s)}setAll(e){if(!Q.isIterable(e))throw new TypeError("The supplied list of entries must be an array of arrays in the format [[key1, value1], [key2, value2], ...].");let r=n=>{let[s,i]=n;!s||!cr(i)||!fr(i)||this.set(s,i)};for(let n of e)r(n);return this}clean(){for(let[e,r]of this)r||this.delete(e);return this}entries(){let e=super.entries();return new H(e,n=>{if(n){let[s,i]=n,o=i?.deref();return[s,o]}return n})}forEach(e,r){for(let[n,s]of super.entries()){let i=s?.deref();i&&e.call(r,i,n,this)}}values(){return new H(super.values(),function(r){return r?.deref()||r})}hasValue(e,r=!0){if(lr(e))return!1;this.#e&&(r=!1);for(let[n,s]of this)if(r&&e===s||!r&&e==s)return!0;return!1}filter(e,r){let n=[];for(let[s,i]of this)e.call(r,i,s,this)&&n.push([s,i]);return n}find(e,r){for(let[n,s]of this){let i=super.get(n),o=e.call(r,i,n,map);if(o||(o=e.call(r,s,n,map)),o)return s}return null}map(e,r,n,s){if(typeof e!="function")throw new TypeError("mapFn must be a function! Received",e);let i=[],o=[],a=s&&this.objectifyValues,u=s===void 0,p=a;for(let[c,f]of this){let[,d]=[0,1],m=e.call(r,[c,f],c,this);tt(m[d])||tt(Object(m[d]))&&(a=!0,u&&!p&&(p=!0,m[d]=Object(m[d]))),i.push(m)}return n?new t(i).objectifying(p):i}*[Symbol.iterator](){for(let[e,r]of this.entries())yield[e,r]}get[Symbol.toStringTag](){return this.constructor.name}},Ae=new h(we);var Re=class t extends Set{#e=!1;objectifying(e=!0){return this.objectifyValues=e,this}get objectifyValues(){return this.#e}set objectifyValues(e){this.#e=!!e}add(e){if(this.#e&&(typeof e=="number"||typeof e=="string"||typeof e=="boolean"||typeof e=="bigint")&&(e=Object(e)),typeof e=="symbol"&&Symbol.keyFor(e)!==void 0)throw new TypeError("RefSet cannot accept registered symbols as values");if(typeof e!="object"&&typeof e!="symbol")throw new TypeError("RefSet values must be objects, non-registered symbols, or objectified primitives");if(e==null)throw new TypeError("RefSet values cannot be null or undefined");super.add(new WeakRef(e))}addAll(e){if(!e||typeof e!="object"||!Reflect.has(e,Symbol.iterator))throw new TypeError("The supplied values are either falsey or non-iterable");for(let r of e)this.add(r)}clean(){for(let e of this)e.deref()||this.delete(e);return this}entries(){return Array.from(super.entries()).map(([r,n])=>[n.deref(),n.deref()]).filter(([r,n])=>!!n)}forEach(e,r){let n=this;super.forEach(function(s){let i=s.deref();i&&e.call(r,i,i,n)})}values(){let e=[];for(let r of this){let n=r.deref();n&&e.push(n)}return e}keys(){return this.values()}has(e){if(this.#e)return this.contains(e);for(let r of this.values())if(r===e)return!0;return!1}contains(e){return!!Array.from(this.values()).filter(r=>e==r).length}filter(e,r){let n=[];for(let s of this){let i=s?.deref();i&&e.call(r,i,NaN,this)&&n.push(i)}return n}find(e,r){for(let n of this){let s=n?.deref();if(s&&e.call(r,s,NaN,this))return s}}map(e,r,n,s){let i=[],o=!0,a=!0;for(let u of this){let p=u?.deref();if(p){let c=e.call(r,p,NaN,this);(o||a)&&(this.#t(c)||(o=!1,a&&(a=this.#t(Object(c))))),i.push(c)}}if(n){if(o)return new t(i).objectifying(s?this.objectifyValues:!1);if(a)return new t(i.map(u=>this.#t(u)?u:Object(u))).objectifying()}return i}get[Symbol.toStringTag](){return this.constructor.name}#t(e){return!(typeof e=="symbol"&&Symbol.keyFor(e)===void 0||typeof e!="object"&&typeof e!="symbol"||e==null)}},Me=new h(Re);var je=class t{mapped=new Map(t.mapped.entries());of(e){return t.of(e)}class(e){return t.class(e)}isPrimitive(e){return t.isPrimitive(e)}static is(e,r){return t.of(e)===t.name(r)}static of(e){return typeof e}static named(e){let r=/ (.*?)\]/.exec(Object.prototype.toString.call(e))?.[1];return e?.[Symbol.toStringTag]??r??(e instanceof Function?e.name:void 0)??t.mapped.get(typeof e).name}static class(e,r){r=r??t.mapped;let n=e?.[Symbol.toStringTag]??(e instanceof Function?e.name:void 0)??typeof e,s=r.has(n)?t.mapped.get(n):e?.constructor;return t.of(s)==="function"&&!r.has(n)&&this!==t&&(r.set(n,s),r.set(s,n)),s||r.get(typeof e)}static isPrimitive(e){return new Set([...t.primitives]).has(typeof e)}static get primitives(){return function*(){yield"bigint",yield"boolean",yield"number",yield"string",yield"symbol",yield"undefined"}}static get typeOfTypes(){return function*(){yield"bigint",yield"boolean",yield"function",yield"number",yield"object",yield"string",yield"symbol",yield"undefined"}}static mapped=new Map([["bigint",BigInt],["boolean",Boolean],["function",Function],["number",Number],["object",Object],["string",String],["symbol",Symbol],["undefined",void 0],[BigInt,"bigint"],[Boolean,"boolean"],[Function,"function"],[Number,"number"],[Object,"object"],[String,"string"],[Symbol,"symbol"],[BigInt.name,BigInt],[Boolean.name,Boolean],[Function.name,Function],[Number.name,Number],[Object.name,Object],[String.name,String],[Symbol.name,Symbol],[void 0,"undefined"]]);serverJs={nodejs:{"v21.1.0":{version:"v21.1.0",date:new Date("2024-04-21T15:58:12.490Z"),classes:g.addExpansion(["AbortController","AbortSignal","AggregateError","Array","ArrayBuffer","BigInt","BigInt64Array","BigUint64Array","Blob","Boolean","BroadcastChannel","Buffer","ByteLengthQueuingStrategy","CompressionStream","CountQueuingStrategy","Crypto","CryptoKey","CustomEvent","DataView","Date","DecompressionStream","DOMException","Error","EvalError","Event","EventTarget","File","FinalizationRegistry","Float32Array","Float64Array","FormData","Function","Headers","Int16Array","Int32Array","Int8Array","Map","MessageChannel","MessageEvent","MessagePort","Navigator","Number","Object","Performance","PerformanceEntry","PerformanceMark","PerformanceMeasure","PerformanceObserver","PerformanceObserverEntryList","PerformanceResourceTiming","Promise","Proxy","RangeError","ReadableByteStreamController","ReadableStream","ReadableStreamBYOBReader","ReadableStreamBYOBRequest","ReadableStreamDefaultController","ReadableStreamDefaultReader","ReferenceError","RegExp","Request","Response","Set","SharedArrayBuffer","String","SubtleCrypto","Symbol","SyntaxError","TextDecoder","TextDecoderStream","TextEncoder","TextEncoderStream","TransformStream","TransformStreamDefaultController","TypeError","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError","URL","URLSearchParams","WeakMap","WeakRef","WeakSet","WritableStream","WritableStreamDefaultController","WritableStreamDefaultWriter"]),nodeSpecificClasses:g.addExpansion(["Buffer","CryptoKey","SharedArrayBuffer","SubtleCrypto"]),functions:g.addExpansion(["assert","atob","btoa","clearImmediate","clearInterval","clearTimeout","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","events","fetch","isFinite","isNaN","parseFloat","parseInt","queueMicrotask","require","setImmediate","setInterval","setTimeout","stream","structuredClone","unescape"]),objects:g.addExpansion(["Atomics","Intl","JSON","Math","Reflect","WebAssembly","_","_error","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","domain","fs","global","globalThis","http","http2","https","inspector","module","navigator","net","os","path","perf_hooks","performance","process","punycode","querystring","readline","repl","string_decoder","sys","timers","tls","trace_events","tty","url","util","v8","vm","wasi","worker_threads","zlib"]),properties:g.addExpansion(["Infinity","NaN","undefined"]),symbols:g.addExpansion([Symbol.toStringTag])}},qjs:{v:{version:"v",classes:g.addExpansion(["AggregateError","Array","ArrayBuffer","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","Error","EvalError","Float32Array","Float64Array","Function","Int16Array","Int32Array","Int8Array","InternalError","Map","Number","Object","Promise","Proxy","RangeError","ReferenceError","RegExp","Set","SharedArrayBuffer","String","Symbol","SyntaxError","TypeError","URIError","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","WeakMap","WeakSet"]),functions:g.addExpansion(["decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","print","unescape"]),objects:g.addExpansion(["Atomics","JSON","Math","Reflect","_","console","globalThis","os","scriptArgs","std"]),properties:g.addExpansion(["Infinity","NaN","undefined"]),symbols:g.addExpansion([])}}};browser={arc:{version:"Version 1.39.0 (48951)",userAgent:["Mozilla/5.0","(Macintosh; Intel Mac OS X 10_15_7)","AppleWebKit/537.36","(KHTML, like Gecko)","Chrome/124.0.0.0","Safari/537.36"].join(" "),types:{classes:g.addExpansion(["AbortController","AbortSignal","AggregateError","Array","ArrayBuffer","BigInt","BigInt64Array","BigUint64Array","Blob","Boolean","BroadcastChannel","ByteLengthQueuingStrategy","CompressionStream","CountQueuingStrategy","Crypto","CustomEvent","DOMException","DataView","Date","DecompressionStream","Error","EvalError","Event","EventTarget","File","FinalizationRegistry","Float32Array","Float64Array","FormData","Function","Headers","Int16Array","Int32Array","Int8Array","Map","MessageChannel","MessageEvent","MessagePort","Navigator","Number","Object","Performance","PerformanceEntry","PerformanceMark","PerformanceMeasure","PerformanceObserver","PerformanceObserverEntryList","PerformanceResourceTiming","Promise","Proxy","RangeError","ReadableByteStreamController","ReadableStream","ReadableStreamBYOBReader","ReadableStreamBYOBRequest","ReadableStreamDefaultController","ReadableStreamDefaultReader","ReferenceError","RegExp","Request","Response","Set","String","Symbol","SyntaxError","TextDecoder","TextDecoderStream","TextEncoder","TextEncoderStream","TransformStream","TransformStreamDefaultController","TypeError","URIError","URL","URLSearchParams","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","WeakMap","WeakRef","WeakSet","WritableStream","WritableStreamDefaultController","WritableStreamDefaultWriter"]),browserClasses:g.addExpansion(["AbstractRange","AnalyserNode","Animation","AnimationEffect","AnimationEvent","AnimationPlaybackEvent","AnimationTimeline","Attr","Audio","AudioBuffer","AudioBufferSourceNode","AudioContext","AudioData","AudioDestinationNode","AudioListener","AudioNode","AudioParam","AudioParamMap","AudioProcessingEvent","AudioScheduledSourceNode","AudioSinkInfo","AudioWorkletNode","BackgroundFetchManager","BackgroundFetchRecord","BackgroundFetchRegistration","BarProp","BaseAudioContext","BeforeInstallPromptEvent","BeforeUnloadEvent","BiquadFilterNode","BlobEvent","BluetoothUUID","BrowserCaptureMediaStreamTrack","CDATASection","CSSAnimation","CSSConditionRule","CSSContainerRule","CSSCounterStyleRule","CSSFontFaceRule","CSSFontPaletteValuesRule","CSSGroupingRule","CSSImageValue","CSSImportRule","CSSKeyframeRule","CSSKeyframesRule","CSSKeywordValue","CSSLayerBlockRule","CSSLayerStatementRule","CSSMathClamp","CSSMathInvert","CSSMathMax","CSSMathMin","CSSMathNegate","CSSMathProduct","CSSMathSum","CSSMathValue","CSSMatrixComponent","CSSMediaRule","CSSNamespaceRule","CSSNumericArray","CSSNumericValue","CSSPageRule","CSSPerspective","CSSPositionValue","CSSPropertyRule","CSSRotate","CSSRule","CSSRuleList","CSSScale","CSSScopeRule","CSSSkew","CSSSkewX","CSSSkewY","CSSStartingStyleRule","CSSStyleDeclaration","CSSStyleRule","CSSStyleSheet","CSSStyleValue","CSSSupportsRule","CSSTransformComponent","CSSTransformValue","CSSTransition","CSSTranslate","CSSUnitValue","CSSUnparsedValue","CSSVariableReferenceValue","CanvasCaptureMediaStreamTrack","CanvasGradient","CanvasPattern","CanvasRenderingContext2D","ChannelMergerNode","ChannelSplitterNode","CharacterBoundsUpdateEvent","CharacterData","ClipboardEvent","CloseEvent","Comment","CompositionEvent","ConstantSourceNode","ContentVisibilityAutoStateChangeEvent","ConvolverNode","CropTarget","CustomElementRegistry","CustomStateSet","DOMError","DOMImplementation","DOMMatrix","DOMMatrixReadOnly","DOMParser","DOMPoint","DOMPointReadOnly","DOMQuad","DOMRect","DOMRectList","DOMRectReadOnly","DOMStringList","DOMStringMap","DOMTokenList","DataTransfer","DataTransferItem","DataTransferItemList","DelayNode","DelegatedInkTrailPresenter","Document","DocumentFragment","DocumentPictureInPictureEvent","DocumentTimeline","DocumentType","DragEvent","DynamicsCompressorNode","EditContext","Element","ElementInternals","EncodedAudioChunk","EncodedVideoChunk","ErrorEvent","EventCounts","EventSource","External","FeaturePolicy","FileList","FileReader","FocusEvent","FontFace","FontFaceSetLoadEvent","FormDataEvent","FragmentDirective","GainNode","Gamepad","GamepadButton","GamepadEvent","GamepadHapticActuator","Geolocation","GeolocationCoordinates","GeolocationPosition","GeolocationPositionError","HTMLAllCollection","HTMLAnchorElement","HTMLAreaElement","HTMLAudioElement","HTMLBRElement","HTMLBaseElement","HTMLBodyElement","HTMLButtonElement","HTMLCanvasElement","HTMLCollection","HTMLDListElement","HTMLDataElement","HTMLDataListElement","HTMLDetailsElement","HTMLDialogElement","HTMLDirectoryElement","HTMLDivElement","HTMLDocument","HTMLElement","HTMLEmbedElement","HTMLFieldSetElement","HTMLFontElement","HTMLFormControlsCollection","HTMLFormElement","HTMLFrameElement","HTMLFrameSetElement","HTMLHRElement","HTMLHeadElement","HTMLHeadingElement","HTMLHtmlElement","HTMLIFrameElement","HTMLImageElement","HTMLInputElement","HTMLLIElement","HTMLLabelElement","HTMLLegendElement","HTMLLinkElement","HTMLMapElement","HTMLMarqueeElement","HTMLMediaElement","HTMLMenuElement","HTMLMetaElement","HTMLMeterElement","HTMLModElement","HTMLOListElement","HTMLObjectElement","HTMLOptGroupElement","HTMLOptionElement","HTMLOptionsCollection","HTMLOutputElement","HTMLParagraphElement","HTMLParamElement","HTMLPictureElement","HTMLPreElement","HTMLProgressElement","HTMLQuoteElement","HTMLScriptElement","HTMLSelectElement","HTMLSlotElement","HTMLSourceElement","HTMLSpanElement","HTMLStyleElement","HTMLTableCaptionElement","HTMLTableCellElement","HTMLTableColElement","HTMLTableElement","HTMLTableRowElement","HTMLTableSectionElement","HTMLTemplateElement","HTMLTextAreaElement","HTMLTimeElement","HTMLTitleElement","HTMLTrackElement","HTMLUListElement","HTMLUnknownElement","HTMLVideoElement","HashChangeEvent","Highlight","HighlightRegistry","History","IDBCursor","IDBCursorWithValue","IDBDatabase","IDBFactory","IDBIndex","IDBKeyRange","IDBObjectStore","IDBOpenDBRequest","IDBRequest","IDBTransaction","IDBVersionChangeEvent","IIRFilterNode","IdleDeadline","Image","ImageBitmap","ImageBitmapRenderingContext","ImageCapture","ImageData","ImageTrack","ImageTrackList","Ink","InputDeviceCapabilities","InputDeviceInfo","InputEvent","IntersectionObserver","IntersectionObserverEntry","Iterator","KeyboardEvent","KeyframeEffect","LargestContentfulPaint","LaunchParams","LaunchQueue","LayoutShift","LayoutShiftAttribution","Location","MathMLElement","MediaCapabilities","MediaElementAudioSourceNode","MediaEncryptedEvent","MediaError","MediaList","MediaMetadata","MediaQueryList","MediaQueryListEvent","MediaRecorder","MediaSession","MediaSource","MediaSourceHandle","MediaStream","MediaStreamAudioDestinationNode","MediaStreamAudioSourceNode","MediaStreamEvent","MediaStreamTrack","MediaStreamTrackEvent","MediaStreamTrackGenerator","MediaStreamTrackProcessor","MediaStreamTrackVideoStats","MimeType","MimeTypeArray","MouseEvent","MutationEvent","MutationObserver","MutationRecord","NamedNodeMap","NavigateEvent","Navigation","NavigationActivation","NavigationCurrentEntryChangeEvent","NavigationDestination","NavigationHistoryEntry","NavigationTransition","NavigatorUAData","NetworkInformation","Node","NodeFilter","NodeIterator","NodeList","Notification","OfflineAudioCompletionEvent","OfflineAudioContext","OffscreenCanvas","OffscreenCanvasRenderingContext2D","Option","OscillatorNode","OverconstrainedError","PageRevealEvent","PageSwapEvent","PageTransitionEvent","PannerNode","Path2D","PerformanceElementTiming","PerformanceEventTiming","PerformanceLongAnimationFrameTiming","PerformanceLongTaskTiming","PerformanceNavigation","PerformanceNavigationTiming","PerformancePaintTiming","PerformanceScriptTiming","PerformanceServerTiming","PerformanceTiming","PeriodicSyncManager","PeriodicWave","PermissionStatus","Permissions","PictureInPictureEvent","PictureInPictureWindow","Plugin","PluginArray","PointerEvent","PopStateEvent","ProcessingInstruction","Profiler","ProgressEvent","PromiseRejectionEvent","PushManager","PushSubscription","PushSubscriptionOptions","RTCCertificate","RTCDTMFSender","RTCDTMFToneChangeEvent","RTCDataChannel","RTCDataChannelEvent","RTCDtlsTransport","RTCEncodedAudioFrame","RTCEncodedVideoFrame","RTCError","RTCErrorEvent","RTCIceCandidate","RTCIceTransport","RTCPeerConnection","RTCPeerConnectionIceErrorEvent","RTCPeerConnectionIceEvent","RTCRtpReceiver","RTCRtpSender","RTCRtpTransceiver","RTCSctpTransport","RTCSessionDescription","RTCStatsReport","RTCTrackEvent","RadioNodeList","Range","RemotePlayback","ReportingObserver","ResizeObserver","ResizeObserverEntry","ResizeObserverSize","SVGAElement","SVGAngle","SVGAnimateElement","SVGAnimateMotionElement","SVGAnimateTransformElement","SVGAnimatedAngle","SVGAnimatedBoolean","SVGAnimatedEnumeration","SVGAnimatedInteger","SVGAnimatedLength","SVGAnimatedLengthList","SVGAnimatedNumber","SVGAnimatedNumberList","SVGAnimatedPreserveAspectRatio","SVGAnimatedRect","SVGAnimatedString","SVGAnimatedTransformList","SVGAnimationElement","SVGCircleElement","SVGClipPathElement","SVGComponentTransferFunctionElement","SVGDefsElement","SVGDescElement","SVGElement","SVGEllipseElement","SVGFEBlendElement","SVGFEColorMatrixElement","SVGFEComponentTransferElement","SVGFECompositeElement","SVGFEConvolveMatrixElement","SVGFEDiffuseLightingElement","SVGFEDisplacementMapElement","SVGFEDistantLightElement","SVGFEDropShadowElement","SVGFEFloodElement","SVGFEFuncAElement","SVGFEFuncBElement","SVGFEFuncGElement","SVGFEFuncRElement","SVGFEGaussianBlurElement","SVGFEImageElement","SVGFEMergeElement","SVGFEMergeNodeElement","SVGFEMorphologyElement","SVGFEOffsetElement","SVGFEPointLightElement","SVGFESpecularLightingElement","SVGFESpotLightElement","SVGFETileElement","SVGFETurbulenceElement","SVGFilterElement","SVGForeignObjectElement","SVGGElement","SVGGeometryElement","SVGGradientElement","SVGGraphicsElement","SVGImageElement","SVGLength","SVGLengthList","SVGLineElement","SVGLinearGradientElement","SVGMPathElement","SVGMarkerElement","SVGMaskElement","SVGMatrix","SVGMetadataElement","SVGNumber","SVGNumberList","SVGPathElement","SVGPatternElement","SVGPoint","SVGPointList","SVGPolygonElement","SVGPolylineElement","SVGPreserveAspectRatio","SVGRadialGradientElement","SVGRect","SVGRectElement","SVGSVGElement","SVGScriptElement","SVGSetElement","SVGStopElement","SVGStringList","SVGStyleElement","SVGSwitchElement","SVGSymbolElement","SVGTSpanElement","SVGTextContentElement","SVGTextElement","SVGTextPathElement","SVGTextPositioningElement","SVGTitleElement","SVGTransform","SVGTransformList","SVGUnitTypes","SVGUseElement","SVGViewElement","Scheduler","Scheduling","Screen","ScreenOrientation","ScriptProcessorNode","ScrollTimeline","SecurityPolicyViolationEvent","Selection","ShadowRoot","SharedWorker","SourceBuffer","SourceBufferList","SpeechSynthesis","SpeechSynthesisErrorEvent","SpeechSynthesisEvent","SpeechSynthesisUtterance","SpeechSynthesisVoice","StaticRange","StereoPannerNode","Storage","StorageEvent","StylePropertyMap","StylePropertyMapReadOnly","StyleSheet","StyleSheetList","SubmitEvent","SyncManager","TaskAttributionTiming","TaskController","TaskPriorityChangeEvent","TaskSignal","Text","TextEvent","TextFormat","TextFormatUpdateEvent","TextMetrics","TextTrack","TextTrackCue","TextTrackCueList","TextTrackList","TextUpdateEvent","TimeRanges","ToggleEvent","Touch","TouchEvent","TouchList","TrackEvent","TransitionEvent","TreeWalker","TrustedHTML","TrustedScript","TrustedScriptURL","TrustedTypePolicy","TrustedTypePolicyFactory","UIEvent","URLPattern","UserActivation","VTTCue","ValidityState","VideoColorSpace","VideoFrame","VideoPlaybackQuality","ViewTimeline","ViewTransition","VirtualKeyboardGeometryChangeEvent","VisibilityStateEntry","VisualViewport","WaveShaperNode","WebGL2RenderingContext","WebGLActiveInfo","WebGLBuffer","WebGLContextEvent","WebGLFramebuffer","WebGLProgram","WebGLQuery","WebGLRenderbuffer","WebGLRenderingContext","WebGLSampler","WebGLShader","WebGLShaderPrecisionFormat","WebGLSync","WebGLTexture","WebGLTransformFeedback","WebGLUniformLocation","WebGLVertexArrayObject","WebKitCSSMatrix","WebKitMutationObserver","WebSocket","WebSocketError","WebSocketStream","WheelEvent","Window","WindowControlsOverlay","WindowControlsOverlayGeometryChangeEvent","Worker","XMLDocument","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload","XMLSerializer","XPathEvaluator","XPathExpression","XPathResult","XSLTProcessor"])},methods:{get classes(){return addExpansion(fetcher("function",/^[A-Z]/))},get functions(){},get objects(){}}},safari:{}}},Ce=new h(je);var ve=class{#e=[];constructor(e,...r){e!=null&&(typeof e[Symbol.iterator]=="function"||typeof e[Symbol.asyncIterator]=="function")?this.#e=[...e,...r]:typeof e=="function"&&e.constructor.name==="AsyncGeneratorFunction"?this.#e=e():this.#e=[e,...r]}async*[Symbol.asyncIterator](){for await(let e of this.#e)yield e}get[Symbol.toStringTag](){return this.constructor.name}static isAsyncIterable(e){return Object.prototype.toString.call(e?.[Symbol.asyncIterator])==="[object AsyncGeneratorFunction]"}},De=class{constructor(e){if(typeof e=="function"&&e.constructor.name==="AsyncGeneratorFunction")this.#e=e();else{if(!e||!Reflect.has(e,Symbol.asyncIterator))throw new TypeError("Value used to instantiate AsyncIterator is not an async iterable");this.#e=e}this.#t=this.#e[Symbol.asyncIterator]()}async asArray(){let e=[];for await(let r of this)e.push(r);return e}get asyncIterable(){return this.#e}async next(){let e=await this.#t.next();return e.done?{value:void 0,done:!0}:{value:e.value,done:!1}}async reset(){this.#t=this.#e[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this}get[Symbol.toStringTag](){return this.constructor.name}#e=null;#t=null},ke=new h(ve),Ie=new h(De);var W=[[Array,ne,Array.name],[BigInt,se,BigInt.name],[Function,L,Function.name],[JSON,k,"JSON"],[Map,ie,Map.name],[Number,oe,Number.name],[Object,B,Object.name],[Reflect,Je,"Reflect"],[RegExp,qe,RegExp.name],[Set,he,Set.name],[String,ye,String.name],[Symbol,F,"Symbol"]],K=[[Array.prototype,Le,Array.name],[BigInt.prototype,Ge,BigInt.name],[Function.prototype,Fe,Function.name],[Map.prototype,Be,Map.name],[Number.prototype,$e,Number.name],[Object.prototype,Ue,Object.name],[Set.prototype,Qe,Set.name],[String.prototype,Xe,String.name],[Symbol.prototype,We,Symbol.name]],Y=new Map([...W,...K]),I={[ke.key]:ke,[Ie.key]:Ie,[be.key]:be,[ue.key]:ue,[Se.key]:Se,[Ee.key]:Ee,[xe.key]:xe,[Oe.key]:Oe,[_.key]:_,[Z.key]:Z,[Ae.key]:Ae,[Me.key]:Me,[ae.key]:ae,[Ce.key]:Ce},rt={};for(let t of Object.values(I)){let e=t.class||t.function;rt[e.name]=e}var M={};Object.assign(M,{enableAll(){M.enablePatches(),M.enableExtensions()},enablePatches(){Y.forEach(t=>{t.apply()})},enableStaticPatches(t=([e,r])=>!0){let e=W.filter(ee(t));return e.forEach(([r,n])=>n.apply()),e},enableInstancePatches(t=([e,r])=>!0){let e=K.filter(ee(t));return e.forEach(([r,n])=>n.apply()),e},enableExtensions(){Object.values(I).forEach(t=>{t.apply()}),V.apply()},disableAll(){M.disablePatches(),M.disableExtensions()},disablePatches(){Y.forEach(t=>{t.revert()})},disableStaticPatches(t=([e,r])=>!0){let e=W.filter(ee(t));return e.forEach(([r,n])=>n.revert()),e},disableInstancePatches(t=([e,r])=>!0){let e=K.filter(ee(t));return e.forEach(([r,n])=>n.revert()),e},disableExtensions(){Object.values(I).forEach(t=>{t.revert()}),V.revert()}});var nt=(()=>{let t={patches:{},classes:{},global:{}},e=(s,[i,o])=>(new R(o.descriptor,o.owner).applyTo(s,i,!0),s),r=(s,[i,o,a])=>(s?.[a]||(s[a]={}),[...o].reduce(e,s[a]),s),n=(s,[i,o,a])=>(s?.[a]||(s[a]={}),s[a]?.prototype||(s[a].prototype={}),[...o].reduce(e,s[a].prototype),s);W.reduce(r,t.patches),K.reduce(n,t.patches),Object.values(I).flatMap(s=>[...s]).reduce(e,t.classes);for(let[s,i]of V){let o=new R(i.descriptor,i.owner);Object.defineProperty(t.global,s,o.toObject(!0))}return t})(),pr={...M,Extensions:I,Patches:Y,GlobalFunctionsAndProps:V,StaticPatches:W,InstancePatches:K,Controls:M,extensions:I,patches:Y,all:nt},dr=pr;function ee(t=([e,r])=>!0){let e=t;if(typeof e!="function"){let r=Array.isArray(t)?t:[t];e=([n,s])=>{for(let i of r){let o=String(i);if(o.startsWith("^")&&(n?.name??n)!=o.substring(1)||(n?.name??n)==o)return!0}return!1}}return e}return ut(mr);})();
|
|
19
|
+
//# sourceMappingURL=basic-extensions.bundle.2.8.0.js.map
|