@shgysk8zer0/polyfills 0.5.5 → 0.5.6
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/CHANGELOG.md +5 -0
- package/all.min.js +1 -1
- package/all.min.js.map +1 -1
- package/browser.min.js +1 -1
- package/browser.min.js.map +1 -1
- package/iterator.js +5 -1
- package/node.cjs +2 -2
- package/node.min.js +2 -2
- package/node.min.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [v0.5.6] - 2025-12-30
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- Fix getting `Iterator.prototype` when polyfilling Iterator helpers
|
|
14
|
+
|
|
10
15
|
## [v0.5.5] - 2025-12-23
|
|
11
16
|
|
|
12
17
|
### Fixed
|
package/all.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}!function(){"undefined"==typeof globalThis&&("undefined"!=typeof window?Object.defineProperty(Window.prototype,"globalThis",{enumerable:!1,writable:!0,configurable:!0,value:window}):"undefined"!=typeof global?Object.defineProperty(global,"globalThis",{enumerable:!1,writable:!0,configurable:!0,value:global}):"undefined"!=typeof self?Object.defineProperty(self,"globalThis",{enumerable:!1,writable:!0,configurable:!0,value:self}):Object.defineProperty(this,"globalThis",{enumerable:!1,writable:!0,configurable:!0,value:this}))}();var t,r,n,o={exports:{}};function i(){return t||(t=1,o.exports=function(){const e=new WeakMap,t=/(\n|\r\n?|\u2028|\u2029)/g,r=/^\s*/,n=/\S/,o=Array.prototype.slice,i="0".charCodeAt(0),a="9".charCodeAt(0),s="a".charCodeAt(0),l="f".charCodeAt(0),c="A".charCodeAt(0),u="F".charCodeAt(0);function p(e){if("string"==typeof e)return d([e])[0];if("function"==typeof e)return function(){const t=o.call(arguments);return t[0]=f(t[0]),e.apply(this,t)};const t=f(e);let r=h(t,0);for(let e=1;e<t.length;e++)r+=arguments[e]+h(t,e);return r}function h(e,t){const r=e[t];if(void 0===r)throw new TypeError(`invalid cooked string at index ${t}`);return r}function f(t){const r=e.get(t);if(r)return r;const n=d(t.raw),o=n.map(g);return Object.defineProperty(o,"raw",{value:Object.freeze(n)}),Object.freeze(o),e.set(t,o),o}function d(e){const o=e.map(e=>e.split(t));let i;for(let e=0;e<o.length;e++){const t=o[e],a=0===e,s=e+1===o.length;if(a){if(1===t.length||t[0].length>0)throw new Error("invalid content on opening line");t[1]=""}if(s){if(1===t.length||n.test(t[t.length-1]))throw new Error("invalid content on closing line");t[t.length-2]="",t[t.length-1]=""}for(let e=2;e<t.length;e+=2){const n=t[e],o=e+1===t.length&&!s,a=r.exec(n)[0];o||a.length!==n.length?i=m(a,i):t[e]=""}}const a=i?i.length:0;return o.map(e=>{let t=e[0];for(let r=1;r<e.length;r+=2)t+=e[r]+e[r+1].slice(a);return t})}function m(e,t){if(void 0===t||e===t)return e;let r=0;for(const n=Math.min(e.length,t.length);r<n&&e[r]===t[r];r++);return e.slice(0,r)}function g(e){let t="",r=0,n=0;for(;(n=e.indexOf("\\",n))>-1;){if(t+=e.slice(r,n),++n===e.length)return;const o=e[n++];switch(o){case"b":t+="\b";break;case"t":t+="\t";break;case"n":t+="\n";break;case"v":t+="\v";break;case"f":t+="\f";break;case"r":t+="\r";break;case"\r":n<e.length&&"\n"===e[n]&&++n;case"\n":case"\u2028":case"\u2029":break;case"0":if(b(e,n))return;t+="\0";break;case"x":{const r=y(e,n,n+2);if(-1===r)return;n+=2,t+=String.fromCharCode(r);break}case"u":{let r;if(n<e.length&&"{"===e[n]){const t=e.indexOf("}",++n);if(-1===t)return;r=y(e,n,t),n=t+1}else r=y(e,n,n+4),n+=4;if(-1===r||r>1114111)return;t+=String.fromCodePoint(r);break}default:if(b(o,0))return;t+=o}r=n}return t+e.slice(r)}function b(e,t){const r=e.charCodeAt(t);return r>=i&&r<=a}function y(e,t,r){if(r>=e.length)return-1;let n=0;for(;t<r;t++){const r=w(e.charCodeAt(t));if(-1===r)return-1;n=16*n+r}return n}function w(e){return e>=i&&e<=a?e-i:e>=s&&e<=l?e-s+10:e>=c&&e<=u?e-c+10:-1}return p}()),o.exports}var a=e(n?r:(n=1,r=i()));String.dedent instanceof Function||(String.dedent=a),!("crypto"in window)&&"msCrypto"in window&&(globalThis.crypto=globalThis.msCrypto),"Notification"in window||(globalThis.Notification=globalThis.notifications||globalThis.webkitNotifications||globalThis.oNotifications||globalThis.msNotifications||!1),"doNotTrack"in navigator||(navigator.doNotTrack=globalThis.doNotTrack||navigator.msDoNotTrack||"unspecified"),"indexedDB"in window||(globalThis.indexedDB=globalThis.indexedDB||globalThis.mozIndexedDB||globalThis.webkitIndexedDB||globalThis.msIndexedDB||!1),"hidden"in document||(document.hidden=document.webkitHidden||document.msHidden||document.mozHidden||!1),"visibilityState"in document||(document.visibilityState=document.webkitVisibilityState||document.msVisibilityState||document.mozVisibilityState||"visible"),"fullscreenElement"in document||(document.fullscreenElement=document.mozFullScreenElement||document.webkitFullscreenElement||!1),"requestAnimationFrame"in window||(globalThis.requestAnimationFrame=globalThis.mozRequestAnimationFrame||globalThis.webkitRequestAnimationFrame||globalThis.msRequestAnimationFrame||!1),"exitFullscreen"in Document.prototype||(Document.prototype.exitFullscreen=document.mozCancelFullScreen||document.webkitCancelFullScreen||document.msCancelFullScreen||!1),"requestFullscreen"in HTMLElement.prototype||(HTMLElement.prototype.requestFullscreen=HTMLElement.prototype.requestFullScreen||HTMLElement.prototype.mozRequestFullScreen||HTMLElement.prototype.webkitRequestFullScreen||!1),"fullscreen"in Document.prototype||Object.defineProperty(Document.prototype,"fullscreen",{get:()=>document.fullscreenElement instanceof Element}),Object.groupBy instanceof Function||(Object.groupBy=function(e,t){return Array.from(e).reduce((e,r,n)=>{const o=t.call(e,r,n);return e.hasOwnProperty(o)?e[o].push(r):e[o]=[r],e},{})}),Map.prototype.getOrInsert instanceof Function||(Map.prototype.getOrInsert=function(e,t){return this.has(e)?this.get(e):(this.set(e,t),t)},Map.prototype.getOrInsertComputed=function(e,t){if(this.has(e))return this.get(e);{const r=t(e);return this.set(e,r),r}}),WeakMap.prototype.getOrInsert instanceof Function||(WeakMap.prototype.getOrInsert=function(e,t){return Map.prototype.getOrInsert.call(this,e,t)},WeakMap.prototype.getOrInsertComputed=function(e,t){return WeakMap.prototype.getOrInsertComputed.call(this,e,t)}),Map.groupBy instanceof Function||(Map.groupBy=function(e,t){return Array.from(e).reduce((e,r,n)=>(e.emplace(t.call(e,r,n),{insert:()=>[r],update:e=>(e.push(r),e)}),e),new Map)}),Map.prototype.emplace instanceof Function||(Map.prototype.emplace=function(e,{insert:t,update:r}={}){console.warn("`Map.prototype.emplace()` has been removed from the proposal and will be removed in the future.");const n=this.has(e);if(n&&r instanceof Function){const t=this.get(e),n=r.call(this,t,e,this);return n!==t&&this.set(e,n),n}if(n)return this.get(e);if(t instanceof Function){const r=t.call(this,e,this);return this.set(e,r),r}throw new Error("Key is not found and no `insert()` given")});const s=[Array,String,globalThis.Int8Array,globalThis.Uint8Array,globalThis.Uint8ClampedArray,globalThis.Int16Array,globalThis.Uint16Array,globalThis.Int32Array,globalThis.Uint32Array,globalThis.Float32Array,globalThis.Float64Array,globalThis.BigInt64Array,globalThis.BigUint64Array];if(Array.prototype.flat instanceof Function||(Array.prototype.flat=function(e=1){const t=[];e=Math.min(Number.MAX_SAFE_INTEGER,Math.max(0,e));const r=(e,n)=>{Array.isArray(e)&&n>=0?e.forEach(e=>r(e,n-1)):t.push(e)};return r(this,Number.isNaN(e)?0:e),t}),Array.prototype.flatMap instanceof Function||(Array.prototype.flatMap=function(e,t){return this.map(e,t).flat(1)}),Array.prototype.findLast instanceof Function||(Array.prototype.findLast=function(e,t){let r;return this.forEach((n,o,i)=>{e.call(t,n,o,i)&&(r=n)},t),r}),"lastIndex"in Array.prototype||Object.defineProperty(Array.prototype,"lastIndex",{enumerable:!1,configurable:!1,get:function(){return Math.max(0,this.length-1)}}),"lastItem"in Array.prototype||Object.defineProperty(Array.prototype,"lastItem",{enumerable:!1,configurable:!1,get:function(){return this[this.lastIndex]},set:function(e){this[this.lastIndex]=e}}),Array.prototype.findLastIndex instanceof Function||(Array.prototype.findLastIndex=function(e,t){let r=-1;return this.forEach((n,o,i)=>{e.call(t,n,o,i)&&(r=o)},t),r}),!(Array.prototype.at instanceof Function)){const Ze=function(e){if((e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this[e]};for(const et of s)void 0!==et&&Object.defineProperty(et.prototype,"at",{value:Ze,writable:!0,enumerable:!1,configurable:!0})}function l(e,t,r,{writable:n=!0,enumerable:o=!0,configurable:i=!0}={}){e[t]instanceof Function||Object.defineProperty(e,t,{value:r,writable:n,enumerable:o,configurable:i})}function c(e,t,{get:r,set:n,enumerable:o=!0,configurable:i=!0}={}){e.hasOwnProperty(t)||Object.defineProperty(e,t,{get:r,set:n,enumerable:o,configurable:i})}function u(e,t,r){const{value:n,enumerable:o,configurable:i,writable:a}=Object.getOwnPropertyDescriptor(e,t),s=r(n);if(!(s instanceof Function))throw new TypeError(`Error overwriting ${t}. The func MUST be a function that accepts the original as an argument and return a function.`);Object.defineProperty(e,t,{value:s,enumerable:o,configurable:i,writable:a})}if(!(Array.prototype.group instanceof Function)&&Object.groupBy instanceof Function&&(Array.prototype.group=function(e){return console.warn("`Array.group()` is deprecated. Please use `Object.groupBy()` instead."),Object.groupBy(this,e)}),!(Array.prototype.groupBy instanceof Function)&&Object.groupBy instanceof Function&&(Array.prototype.groupBy=function(e){return console.warn("`Array.goupBy()` is deprecated. Please use `Object.groupBy()` instead."),Object.groupBy(this,e)}),!(Array.prototype.groupToMap instanceof Function)&&Map.groupBy instanceof Function&&(Array.prototype.groupToMap=function(e){return console.warn("`Array.groupToMap()` is deprecated. Please use `Map.groupBy()` instead."),Map.groupBy(this,e)}),Map.groupBy instanceof Function&&(Array.prototype.groupByToMap=function(e){return console.warn("`Array.groupByToMap()` is deprecated. Please use `Map.groupBy()` instead."),Map.groupBy(this,e)}),Array.fromAsync instanceof Function||(Array.fromAsync=async function(e,t,r=globalThis){let n=[];for await(const t of e)n.push(await t);return Array.from(n,t,r)}),Array.prototype.equals instanceof Function||(Array.prototype.equals=function(e){return this===e||!!Array.isArray(e)&&(this.length===e.length&&this.every((t,r)=>{const n=e[r];return Array.isArray(t)?Array.isArray(n)&&t.equals(n):Object.is(t,n)}))}),Array.prototype.uniqueBy instanceof Function||(Array.prototype.uniqueBy=function(e){switch(typeof e){case"undefined":return[...new Set(this)];case"string":case"number":case"symbol":return this.uniqueBy(t=>t[e]);case"function":{const t=new Set;return this.filter((...r)=>{const n=e.apply(this,r);return!t.has(n)&&(t.add(n),!0)})}default:throw new TypeError("Not a valid argument for uniqueBy")}}),Array.prototype.toReversed instanceof Function||(Array.prototype.toReversed=function(){return[...this].reverse()}),Array.prototype.toSorted instanceof Function||(Array.prototype.toSorted=function(e){return[...this].sort(e)}),Array.prototype.toSpliced instanceof Function||(Array.prototype.toSpliced=function(e,t,...r){const n=[...this];return n.splice(e,t,...r),n}),Array.prototype.with instanceof Function||(Array.prototype.with=function(e,t){const r=[...this];return r[e]=t,r}),Array.isTemplateObject instanceof Function||(Array.isTemplateObject=function(e){return!!(Array.isArray(e)&&Array.isArray(e.raw)&&Object.isFrozen(e)&&Object.isFrozen(e.raw))&&(0!==e.length&&e.length===e.raw.length)}),Uint8Array.prototype.toHex instanceof Function||(Uint8Array.prototype.toHex=function(){return Array.from(this,e=>e.toString(16).padStart(2,"0")).join("")}),Uint8Array.prototype.toBase64 instanceof Function||(Uint8Array.prototype.toBase64=function({alphabet:e="base64"}={}){if("base64"===e){const e=32768;let t="";for(let r=0;r<this.length;r+=e){const n=this.subarray(r,r+e);t+=String.fromCharCode.apply(null,n)}return btoa(t)}if("base64url"===e)return this.toBase64({alphabet:"base64"}).replaceAll("+","-").replaceAll("/","_");throw new TypeError('expected alphabet to be either "base64" or "base64url')}),Uint8Array.fromHex instanceof Function||(Uint8Array.fromHex=function(e){if("string"!=typeof e)throw new TypeError("expected input to be a string");if(0===!(1&e.length))throw new SyntaxError("string should be an even number of characters");return Uint8Array.from(globalThis.Iterator.range(0,e.length,{step:2}),t=>parseInt(e.substring(t,t+2),16))}),Uint8Array.fromBase64 instanceof Function||(Uint8Array.fromBase64=function(e,{alphabet:t="base64",lastChunkHandling:r="loose"}={}){if("string"!=typeof e)throw new TypeError("expected input to be a string");if(!["base64","base64url"].includes(t))throw new TypeError('expected alphabet to be either "base64" or "base64url');if(!["loose","strict","stop-before-partial"].includes(r))throw new TypeError(`Invalid \`lastChunkHandling\`: "${r}".`);if("base64"!==t)return Uint8Array.fromBase64(e.replaceAll("-","+").replaceAll("_","/"),{alphabet:"base64"});{const t=e.length%4;if(1===t)throw new TypeError("Invalid string length.");if(0===t)return Uint8Array.from(atob(e),e=>e.charCodeAt(0));switch(r){case"strict":throw new SyntaxError("Missing padding.");case"loose":return Uint8Array.fromBase64(e.padEnd(e.length+(4-t),"="),{alphabet:"base64",lastChunkHandling:"strict"});case"stop-before-partial":return Uint8Array.fromBase64(e.slice(0,e.length-t),{alphabet:"base64",lastChunkHandling:"strict"})}}}),"Symbol"in globalThis){const tt=new Set(Reflect.ownKeys(Symbol).filter(e=>"symbol"==typeof Symbol[e]).map(e=>Symbol[e]));void 0===Symbol.toStringTag&&(Symbol.toStringTag=Symbol("Symbol.toStringTag")),void 0===Symbol.iterator&&(Symbol.iterator=Symbol("Symbol.iterator")),l(Symbol,"isRegistered",function(e){return"symbol"==typeof e&&"string"==typeof Symbol.keyFor(e)}),l(Symbol,"isWellKnown",function(e){return tt.has(e)})}function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h,f,d,m,g,b;function y(){if(f)return h;f=1;var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,i=(e,r)=>t(e,"name",{value:r,configurable:!0}),a={};((e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})})(a,{URLPattern:()=>oe}),e=a,h=((e,i,a,s)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let l of n(i))!o.call(e,l)&&l!==a&&t(e,l,{get:()=>i[l],enumerable:!(s=r(i,l))||s.enumerable});return e})(t({},"__esModule",{value:!0}),e);var s=class{type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(e,t,r,n,o,i){this.type=e,this.name=t,this.prefix=r,this.value=n,this.suffix=o,this.modifier=i}hasCustomName(){return""!==this.name&&"number"!=typeof this.name}};i(s,"Part");var l=/[$_\p{ID_Start}]/u,c=/[$_\u200C\u200D\p{ID_Continue}]/u,u=".*";function p(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}function d(e,t=!1){let r=[],n=0;for(;n<e.length;){let o=e[n],a=i(function(o){if(!t)throw new TypeError(o);r.push({type:"INVALID_CHAR",index:n,value:e[n++]})},"ErrorOrInvalid");if("*"!==o)if("+"!==o&&"?"!==o)if("\\"!==o)if("{"!==o)if("}"!==o){if(":"===o){let t="",o=n+1;for(;o<e.length;){let r=e.substr(o,1);if(!(o===n+1&&l.test(r)||o!==n+1&&c.test(r)))break;t+=e[o++]}if(!t){a(`Missing parameter name at ${n}`);continue}r.push({type:"NAME",index:n,value:t}),n=o;continue}if("("===o){let t=1,o="",i=n+1,s=!1;if("?"===e[i]){a(`Pattern cannot start with "?" at ${i}`);continue}for(;i<e.length;){if(!p(e[i],!1)){a(`Invalid character '${e[i]}' at ${i}.`),s=!0;break}if("\\"!==e[i]){if(")"===e[i]){if(t--,0===t){i++;break}}else if("("===e[i]&&(t++,"?"!==e[i+1])){a(`Capturing groups are not allowed at ${i}`),s=!0;break}o+=e[i++]}else o+=e[i++]+e[i++]}if(s)continue;if(t){a(`Unbalanced pattern at ${n}`);continue}if(!o){a(`Missing pattern at ${n}`);continue}r.push({type:"REGEX",index:n,value:o}),n=i;continue}r.push({type:"CHAR",index:n,value:e[n++]})}else r.push({type:"CLOSE",index:n,value:e[n++]});else r.push({type:"OPEN",index:n,value:e[n++]});else r.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else r.push({type:"OTHER_MODIFIER",index:n,value:e[n++]});else r.push({type:"ASTERISK",index:n,value:e[n++]})}return r.push({type:"END",index:n,value:""}),r}function m(e,t={}){let r=d(e);t.delimiter??="/#?",t.prefixes??="./";let n=`[^${g(t.delimiter)}]+?`,o=[],a=0,l=0,c=new Set,p=i(e=>{if(l<r.length&&r[l].type===e)return r[l++].value},"tryConsume"),h=i(()=>p("OTHER_MODIFIER")??p("ASTERISK"),"tryConsumeModifier"),f=i(e=>{let t=p(e);if(void 0!==t)return t;let{type:n,index:o}=r[l];throw new TypeError(`Unexpected ${n} at ${o}, expected ${e}`)},"mustConsume"),m=i(()=>{let e,t="";for(;e=p("CHAR")??p("ESCAPED_CHAR");)t+=e;return t},"consumeText"),b=i(e=>e,"DefaultEncodePart"),y=t.encodePart||b,w="",v=i(e=>{w+=e},"appendToPendingFixedValue"),T=i(()=>{w.length&&(o.push(new s(3,"","",y(w),"",3)),w="")},"maybeAddPartFromPendingFixedValue"),E=i((e,t,r,i,l)=>{let p,h=3;switch(l){case"?":h=1;break;case"*":h=0;break;case"+":h=2}if(!t&&!r&&3===h)return void v(e);if(T(),!t&&!r){if(!e)return;return void o.push(new s(3,"","",y(e),"",h))}p=r?"*"===r?u:r:n;let f,d=2;if(p===n?(d=1,p=""):p===u&&(d=0,p=""),t?f=t:r&&(f=a++),c.has(f))throw new TypeError(`Duplicate name '${f}'.`);c.add(f),o.push(new s(d,f,y(e),p,y(i),h))},"addPart");for(;l<r.length;){let e=p("CHAR"),r=p("NAME"),n=p("REGEX");if(!r&&!n&&(n=p("ASTERISK")),r||n){let o=e??"";-1===t.prefixes.indexOf(o)&&(v(o),o=""),T(),E(o,r,n,"",h());continue}let o=e??p("ESCAPED_CHAR");if(o)v(o);else{if(p("OPEN")){let e=m(),t=p("NAME"),r=p("REGEX");!t&&!r&&(r=p("ASTERISK"));let n=m();f("CLOSE"),E(e,t,r,n,h());continue}T(),f("END")}}return o}function g(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function b(e){return e&&e.ignoreCase?"ui":"u"}function y(e,t,r){return v(m(e,r),t,r)}function w(e){switch(e){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}function v(e,t,r={}){r.delimiter??="/#?",r.prefixes??="./",r.sensitive??=!1,r.strict??=!1,r.end??=!0,r.start??=!0,r.endsWith="";let n=r.start?"^":"";for(let o of e){if(3===o.type){3===o.modifier?n+=g(o.value):n+=`(?:${g(o.value)})${w(o.modifier)}`;continue}t&&t.push(o.name);let e=`[^${g(r.delimiter)}]+?`,i=o.value;(1===o.type?i=e:0===o.type&&(i=u),o.prefix.length||o.suffix.length)?3!==o.modifier&&1!==o.modifier?(n+=`(?:${g(o.prefix)}`,n+=`((?:${i})(?:`,n+=g(o.suffix),n+=g(o.prefix),n+=`(?:${i}))*)${g(o.suffix)})`,0===o.modifier&&(n+="?")):(n+=`(?:${g(o.prefix)}(${i})${g(o.suffix)})`,n+=w(o.modifier)):3===o.modifier||1===o.modifier?n+=`(${i})${w(o.modifier)}`:n+=`((?:${i})${w(o.modifier)})`}let o=`[${g(r.endsWith)}]|$`,i=`[${g(r.delimiter)}]`;if(r.end)return r.strict||(n+=`${i}?`),r.endsWith.length?n+=`(?=${o})`:n+="$",new RegExp(n,b(r));r.strict||(n+=`(?:${i}(?=${o}))?`);let a=!1;if(e.length){let t=e[e.length-1];3===t.type&&3===t.modifier&&(a=r.delimiter.indexOf(t)>-1)}return a||(n+=`(?=${i}|${o})`),new RegExp(n,b(r))}i(p,"isASCII"),i(d,"lexer"),i(m,"parse"),i(g,"escapeString"),i(b,"flags"),i(y,"stringToRegexp"),i(w,"modifierToString"),i(v,"partsToRegexp");var T={delimiter:"",prefixes:"",sensitive:!0,strict:!0},E={delimiter:".",prefixes:"",sensitive:!0,strict:!0},S={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function A(e,t){return!!e.length&&("/"===e[0]||!(!t||e.length<2)&&(("\\"==e[0]||"{"==e[0])&&"/"==e[1]))}function M(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}function x(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}function L(e){return!(!e||e.length<2)&&("["===e[0]||("\\"===e[0]||"{"===e[0])&&"["===e[1])}i(A,"isAbsolutePathname"),i(M,"maybeStripPrefix"),i(x,"maybeStripSuffix"),i(L,"treatAsIPv6Hostname");var O=["ftp","file","http","https","ws","wss"];function k(e){if(!e)return!0;for(let t of O)if(e.test(t))return!0;return!1}function P(e,t){if(e=M(e,"#"),t||""===e)return e;let r=new URL("https://example.com");return r.hash=e,r.hash?r.hash.substring(1,r.hash.length):""}function R(e,t){if(e=M(e,"?"),t||""===e)return e;let r=new URL("https://example.com");return r.search=e,r.search?r.search.substring(1,r.search.length):""}function F(e,t){return t||""===e?e:L(e)?B(e):q(e)}function C(e,t){if(t||""===e)return e;let r=new URL("https://example.com");return r.password=e,r.password}function j(e,t){if(t||""===e)return e;let r=new URL("https://example.com");return r.username=e,r.username}function I(e,t,r){if(r||""===e)return e;if(t&&!O.includes(t))return new URL(`${t}:${e}`).pathname;let n="/"==e[0];return e=new URL(n?e:"/-"+e,"https://example.com").pathname,n||(e=e.substring(2,e.length)),e}function N(e,t,r){return U(t)===e&&(e=""),r||""===e?e:_(e)}function H(e,t){return e=x(e,":"),t||""===e?e:D(e)}function U(e){switch(e){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function D(e){if(""===e)return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw new TypeError(`Invalid protocol '${e}'.`)}function z(e){if(""===e)return e;let t=new URL("https://example.com");return t.username=e,t.username}function $(e){if(""===e)return e;let t=new URL("https://example.com");return t.password=e,t.password}function q(e){if(""===e)return e;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e))throw new TypeError(`Invalid hostname '${e}'`);let t=new URL("https://example.com");return t.hostname=e,t.hostname}function B(e){if(""===e)return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw new TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}function _(e){if(""===e||/^[0-9]*$/.test(e)&&parseInt(e)<=65535)return e;throw new TypeError(`Invalid port '${e}'.`)}function V(e){if(""===e)return e;let t=new URL("https://example.com");return t.pathname="/"!==e[0]?"/-"+e:e,"/"!==e[0]?t.pathname.substring(2,t.pathname.length):t.pathname}function W(e){return""===e?e:new URL(`data:${e}`).pathname}function G(e){if(""===e)return e;let t=new URL("https://example.com");return t.search=e,t.search.substring(1,t.search.length)}function X(e){if(""===e)return e;let t=new URL("https://example.com");return t.hash=e,t.hash.substring(1,t.hash.length)}i(k,"isSpecialScheme"),i(P,"canonicalizeHash"),i(R,"canonicalizeSearch"),i(F,"canonicalizeHostname"),i(C,"canonicalizePassword"),i(j,"canonicalizeUsername"),i(I,"canonicalizePathname"),i(N,"canonicalizePort"),i(H,"canonicalizeProtocol"),i(U,"defaultPortForProtocol"),i(D,"protocolEncodeCallback"),i(z,"usernameEncodeCallback"),i($,"passwordEncodeCallback"),i(q,"hostnameEncodeCallback"),i(B,"ipv6HostnameEncodeCallback"),i(_,"portEncodeCallback"),i(V,"standardURLPathnameEncodeCallback"),i(W,"pathURLPathnameEncodeCallback"),i(G,"searchEncodeCallback"),i(X,"hashEncodeCallback");var K=class{#e;#t=[];#r={};#n=0;#o=1;#i=0;#a=0;#s=0;#l=0;#c=!1;constructor(e){this.#e=e}get result(){return this.#r}parse(){for(this.#t=d(this.#e,!0);this.#n<this.#t.length;this.#n+=this.#o){if(this.#o=1,"END"===this.#t[this.#n].type){if(0===this.#a){this.#u(),this.#p()?this.#h(9,1):this.#f()?this.#h(8,1):this.#h(7,0);continue}if(2===this.#a){this.#d(5);continue}this.#h(10,0);break}if(this.#s>0){if(!this.#m())continue;this.#s-=1}if(this.#g())this.#s+=1;else switch(this.#a){case 0:this.#b()&&this.#d(1);break;case 1:if(this.#b()){this.#y();let e=7,t=1;this.#w()?(e=2,t=3):this.#c&&(e=2),this.#h(e,t)}break;case 2:this.#v()?this.#d(3):(this.#T()||this.#f()||this.#p())&&this.#d(5);break;case 3:this.#E()?this.#h(4,1):this.#v()&&this.#h(5,1);break;case 4:this.#v()&&this.#h(5,1);break;case 5:this.#S()?this.#l+=1:this.#A()&&(this.#l-=1),this.#M()&&!this.#l?this.#h(6,1):this.#T()?this.#h(7,0):this.#f()?this.#h(8,1):this.#p()&&this.#h(9,1);break;case 6:this.#T()?this.#h(7,0):this.#f()?this.#h(8,1):this.#p()&&this.#h(9,1);break;case 7:this.#f()?this.#h(8,1):this.#p()&&this.#h(9,1);break;case 8:this.#p()&&this.#h(9,1)}}void 0!==this.#r.hostname&&void 0===this.#r.port&&(this.#r.port="")}#h(e,t){switch(this.#a){case 0:case 2:break;case 1:this.#r.protocol=this.#x();break;case 3:this.#r.username=this.#x();break;case 4:this.#r.password=this.#x();break;case 5:this.#r.hostname=this.#x();break;case 6:this.#r.port=this.#x();break;case 7:this.#r.pathname=this.#x();break;case 8:this.#r.search=this.#x();break;case 9:this.#r.hash=this.#x()}0!==this.#a&&10!==e&&([1,2,3,4].includes(this.#a)&&[6,7,8,9].includes(e)&&(this.#r.hostname??=""),[1,2,3,4,5,6].includes(this.#a)&&[8,9].includes(e)&&(this.#r.pathname??=this.#c?"/":""),[1,2,3,4,5,6,7].includes(this.#a)&&9===e&&(this.#r.search??="")),this.#L(e,t)}#L(e,t){this.#a=e,this.#i=this.#n+t,this.#n+=t,this.#o=0}#u(){this.#n=this.#i,this.#o=0}#d(e){this.#u(),this.#a=e}#O(e){return e<0&&(e=this.#t.length-e),e<this.#t.length?this.#t[e]:this.#t[this.#t.length-1]}#k(e,t){let r=this.#O(e);return r.value===t&&("CHAR"===r.type||"ESCAPED_CHAR"===r.type||"INVALID_CHAR"===r.type)}#b(){return this.#k(this.#n,":")}#w(){return this.#k(this.#n+1,"/")&&this.#k(this.#n+2,"/")}#v(){return this.#k(this.#n,"@")}#E(){return this.#k(this.#n,":")}#M(){return this.#k(this.#n,":")}#T(){return this.#k(this.#n,"/")}#f(){if(this.#k(this.#n,"?"))return!0;if("?"!==this.#t[this.#n].value)return!1;let e=this.#O(this.#n-1);return"NAME"!==e.type&&"REGEX"!==e.type&&"CLOSE"!==e.type&&"ASTERISK"!==e.type}#p(){return this.#k(this.#n,"#")}#g(){return"OPEN"==this.#t[this.#n].type}#m(){return"CLOSE"==this.#t[this.#n].type}#S(){return this.#k(this.#n,"[")}#A(){return this.#k(this.#n,"]")}#x(){let e=this.#t[this.#n],t=this.#O(this.#i).index;return this.#e.substring(t,e.index)}#y(){let e={};Object.assign(e,T),e.encodePart=D;let t=y(this.#x(),void 0,e);this.#c=k(t)}};i(K,"Parser");var Q=["protocol","username","password","hostname","port","pathname","search","hash"],J="*";function Y(e,t){if("string"!=typeof e)throw new TypeError("parameter 1 is not of type 'string'.");let r=new URL(e,t);return{protocol:r.protocol.substring(0,r.protocol.length-1),username:r.username,password:r.password,hostname:r.hostname,port:r.port,pathname:r.pathname,search:""!==r.search?r.search.substring(1,r.search.length):void 0,hash:""!==r.hash?r.hash.substring(1,r.hash.length):void 0}}function Z(e,t){return t?te(e):e}function ee(e,t,r){let n;if("string"==typeof t.baseURL)try{n=new URL(t.baseURL),void 0===t.protocol&&(e.protocol=Z(n.protocol.substring(0,n.protocol.length-1),r)),!r&&void 0===t.protocol&&void 0===t.hostname&&void 0===t.port&&void 0===t.username&&(e.username=Z(n.username,r)),!r&&void 0===t.protocol&&void 0===t.hostname&&void 0===t.port&&void 0===t.username&&void 0===t.password&&(e.password=Z(n.password,r)),void 0===t.protocol&&void 0===t.hostname&&(e.hostname=Z(n.hostname,r)),void 0===t.protocol&&void 0===t.hostname&&void 0===t.port&&(e.port=Z(n.port,r)),void 0===t.protocol&&void 0===t.hostname&&void 0===t.port&&void 0===t.pathname&&(e.pathname=Z(n.pathname,r)),void 0===t.protocol&&void 0===t.hostname&&void 0===t.port&&void 0===t.pathname&&void 0===t.search&&(e.search=Z(n.search.substring(1,n.search.length),r)),void 0===t.protocol&&void 0===t.hostname&&void 0===t.port&&void 0===t.pathname&&void 0===t.search&&void 0===t.hash&&(e.hash=Z(n.hash.substring(1,n.hash.length),r))}catch{throw new TypeError(`invalid baseURL '${t.baseURL}'.`)}if("string"==typeof t.protocol&&(e.protocol=H(t.protocol,r)),"string"==typeof t.username&&(e.username=j(t.username,r)),"string"==typeof t.password&&(e.password=C(t.password,r)),"string"==typeof t.hostname&&(e.hostname=F(t.hostname,r)),"string"==typeof t.port&&(e.port=N(t.port,e.protocol,r)),"string"==typeof t.pathname){if(e.pathname=t.pathname,n&&!A(e.pathname,r)){let t=n.pathname.lastIndexOf("/");t>=0&&(e.pathname=Z(n.pathname.substring(0,t+1),r)+e.pathname)}e.pathname=I(e.pathname,e.protocol,r)}return"string"==typeof t.search&&(e.search=R(t.search,r)),"string"==typeof t.hash&&(e.hash=P(t.hash,r)),e}function te(e){return e.replace(/([+*?:{}()\\])/g,"\\$1")}function re(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function ne(e,t){t.delimiter??="/#?",t.prefixes??="./",t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith="";let r=`[^${re(t.delimiter)}]+?`,n=/[$_\u200C\u200D\p{ID_Continue}]/u,o="";for(let i=0;i<e.length;++i){let a=e[i];if(3===a.type){if(3===a.modifier){o+=te(a.value);continue}o+=`{${te(a.value)}}${w(a.modifier)}`;continue}let s=a.hasCustomName(),l=!!a.suffix.length||!!a.prefix.length&&(1!==a.prefix.length||!t.prefixes.includes(a.prefix)),c=i>0?e[i-1]:null,u=i<e.length-1?e[i+1]:null;if(!l&&s&&1===a.type&&3===a.modifier&&u&&!u.prefix.length&&!u.suffix.length)if(3===u.type){let e=u.value.length>0?u.value[0]:"";l=n.test(e)}else l=!u.hasCustomName();if(!l&&!a.prefix.length&&c&&3===c.type){let e=c.value[c.value.length-1];l=t.prefixes.includes(e)}l&&(o+="{"),o+=te(a.prefix),s&&(o+=`:${a.name}`),2===a.type?o+=`(${a.value})`:1===a.type?s||(o+=`(${r})`):0===a.type&&(s||c&&3!==c.type&&3===c.modifier&&!l&&""===a.prefix?o+="(.*)":o+="*"),1===a.type&&s&&a.suffix.length&&n.test(a.suffix[0])&&(o+="\\"),o+=te(a.suffix),l&&(o+="}"),3!==a.modifier&&(o+=w(a.modifier))}return o}i(Y,"extractValues"),i(Z,"processBaseURLString"),i(ee,"applyInit"),i(te,"escapePatternString"),i(re,"escapeRegexpString"),i(ne,"partsToPattern");var oe=class{#e;#t={};#r={};#n={};#o={};#i=!1;constructor(e={},t,r){try{let n;if("string"==typeof t?n=t:r=t,"string"==typeof e){let t=new K(e);if(t.parse(),e=t.result,void 0===n&&"string"!=typeof e.protocol)throw new TypeError("A base URL must be provided for a relative constructor string.");e.baseURL=n}else{if(!e||"object"!=typeof e)throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(n)throw new TypeError("parameter 1 is not of type 'string'.")}typeof r>"u"&&(r={ignoreCase:!1});let o,i={ignoreCase:!0===r.ignoreCase},a={pathname:J,protocol:J,username:J,password:J,hostname:J,port:J,search:J,hash:J};for(o of(this.#e=ee(a,e,!0),U(this.#e.protocol)===this.#e.port&&(this.#e.port=""),Q)){if(!(o in this.#e))continue;let e={},t=this.#e[o];switch(this.#r[o]=[],o){case"protocol":Object.assign(e,T),e.encodePart=D;break;case"username":Object.assign(e,T),e.encodePart=z;break;case"password":Object.assign(e,T),e.encodePart=$;break;case"hostname":Object.assign(e,E),L(t)?e.encodePart=B:e.encodePart=q;break;case"port":Object.assign(e,T),e.encodePart=_;break;case"pathname":k(this.#t.protocol)?(Object.assign(e,S,i),e.encodePart=V):(Object.assign(e,T,i),e.encodePart=W);break;case"search":Object.assign(e,T,i),e.encodePart=G;break;case"hash":Object.assign(e,T,i),e.encodePart=X}try{this.#o[o]=m(t,e),this.#t[o]=v(this.#o[o],this.#r[o],e),this.#n[o]=ne(this.#o[o],e),this.#i=this.#i||this.#o[o].some(e=>2===e.type)}catch{throw new TypeError(`invalid ${o} pattern '${this.#e[o]}'.`)}}}catch(e){throw new TypeError(`Failed to construct 'URLPattern': ${e.message}`)}}get[Symbol.toStringTag](){return"URLPattern"}test(e={},t){let r,n={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if("string"!=typeof e&&t)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof e>"u")return!1;try{n=ee(n,"object"==typeof e?e:Y(e,t),!1)}catch{return!1}for(r of Q)if(!this.#t[r].exec(n[r]))return!1;return!0}exec(e={},t){let r={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if("string"!=typeof e&&t)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof e>"u")return;try{r=ee(r,"object"==typeof e?e:Y(e,t),!1)}catch{return null}let n,o={};for(n of(o.inputs=t?[e,t]:[e],Q)){let e=this.#t[n].exec(r[n]);if(!e)return null;let t={};for(let[r,o]of this.#r[n].entries())if("string"==typeof o||"number"==typeof o){let n=e[r+1];t[o]=n}o[n]={input:r[n]??"",groups:t}}return o}static compareComponent(e,t,r){let n=i((e,t)=>{for(let r of["type","modifier","prefix","value","suffix"]){if(e[r]<t[r])return-1;if(e[r]!==t[r])return 1}return 0},"comparePart"),o=new s(3,"","","","",3),a=new s(0,"","","","",3),l=i((e,t)=>{let r=0;for(;r<Math.min(e.length,t.length);++r){let o=n(e[r],t[r]);if(o)return o}return e.length===t.length?0:n(e[r]??o,t[r]??o)},"comparePartList");return t.#n[e]||r.#n[e]?t.#n[e]&&!r.#n[e]?l(t.#o[e],[a]):!t.#n[e]&&r.#n[e]?l([a],r.#o[e]):l(t.#o[e],r.#o[e]):0}get protocol(){return this.#n.protocol}get username(){return this.#n.username}get password(){return this.#n.password}get hostname(){return this.#n.hostname}get port(){return this.#n.port}get pathname(){return this.#n.pathname}get search(){return this.#n.search}get hash(){return this.#n.hash}get hasRegExpGroups(){return this.#i}};return i(oe,"URLPattern"),h}!function(){if(!(Function.prototype.once instanceof Function)){const e=new WeakMap;Function.prototype.once=function(t){const r=this;return function(...n){if(e.has(r))return e.get(r);if("AsyncFunction"===r.constructor.name){const o=r.apply(t||r,n).catch(t=>{throw e.delete(r),t});return e.set(r,o),o}if(r instanceof Function){const o=r.apply(t||r,n);return e.set(r,o),o}}}}}();var w=p(b?g:(b=1,g=function(){if(m)return d;m=1;const{URLPattern:e}=y();return d={URLPattern:e},globalThis.URLPattern||(globalThis.URLPattern=e),d}()));"URLPattern"in globalThis||(globalThis.URLPattern=w),l(URL,"parse",(e,t)=>{try{return new URL(e,t)}catch{return null}}),l(URL,"canParse",(e,t)=>{try{return new URL(e,t)instanceof URL}catch{return!1}}),Number.range instanceof Function||(Number.range=function(e,t,r=1){return console.warn("`Number.range()` is deprecated. Use `Iterator.range()` instead."),globalThis.Iterator.range(e,t,{step:r})});const v="Iterator"in globalThis,T=v?Object.getPrototypeOf(globalThis.Iterator):Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())),E=v?globalThis.Iterator:(e=>{class t{[Symbol.iterator](){return this}}return Object.setPrototypeOf(t,e),t})(T);var S;E.range instanceof Function||(E.range=function(e,t,r){if("number"==typeof r||"bigint"==typeof r)return E.range(e,t,{step:r});if("object"!=typeof r||Object.is(r,null))return E.range(e,t,{});{const{step:n=("number"==typeof e?e<t?1:-1:e<t?1n:-1n),inclusive:o=!1}=r;if("number"!=typeof e&&"bigint"!=typeof e)throw new TypeError("Start must be a number");if(Number.isNaN(e))throw new RangeError("Invalid start");if("number"!=typeof t&&"bigint"!=typeof t)throw new TypeError("End must be a number");if(Number.isNaN(t))throw new RangeError("Invalid end");if("number"!=typeof n&&"bigint"!=typeof n)throw new TypeError("Step must be a number");if(Number.isNaN(n))throw new RangeError("Invalid step");if(0===n)throw new RangeError("Step must not be 0");if(n<0&&e<t||n>0&&e>t)return;if(o){let r=e;return n>0?E.from({next(){const e=r<=t?{value:r,done:!1}:{done:!0};return r+=n,e}}):E.from({next(){const e=r>=t?{value:r,done:!1}:{done:!0};return r+=n,e}})}{let r=e;if(n>0)return E.from({next(){const e=r<t?{value:r,done:!1}:{done:!0};return r+=n,e}});{let r=e;return E.from({next(){const e=r>t?{value:r,done:!1}:{done:!0};return r+=n,e}})}}}}),T[Symbol.toStringTag]||(T[Symbol.toStringTag]="Iterator"),T.take instanceof Function||(T.take=function(e){let t=0;const r=this;return E.from({next:()=>t++>=e?{done:!0}:r.next()})}),T.drop instanceof Function||(T.drop=function(e){for(let t=0;t<e;t++){const{done:e}=this.next();if(e)break}return this}),T.toArray instanceof Function||(T.toArray=function(){return Array.from(this)}),T.forEach instanceof Function||(T.forEach=function(e){for(const t of this)e.call(this,t)}),T.flatMap instanceof Function||(T.flatMap=function(e){const t=this;let r=this.next();const n=({value:r,done:n=!0}={})=>n?E.from({next:()=>({done:!0})}):E.from(e.call(t,r));let o=n(r);return E.from({next(){const{value:e,done:i=!0}=o.next();return r.done&&i?{done:!0}:i?r.done?{done:!0}:(r=t.next(),o=n(r),o.next()):{value:e,done:i}}})}),T.map instanceof Function||(T.map=function(e){const t=this;return E.from({next(){const{done:r,value:n}=t.next();return r?{done:r}:{value:e.call(t,n),done:!1}}})}),T.reduce instanceof Function||(T.reduce=function(e,t){let r=void 0===t?this.next().value:t;for(const t of this)r=e.call(this,r,t);return r}),T.filter instanceof Function||(T.filter=function(e){const t=this;let r,n=!1;return E.from({next(){for(;!n;){const o=t.next();if(n=o.done,n)break;if(e.call(t,o.value)){r=o.value;break}}return{done:n,value:r}}})}),T.some instanceof Function||(T.some=function(e){let t=!1;for(const r of this)if(e.call(this,r)){t=!0;break}return t}),T.every instanceof Function||(T.every=function(e){let t=!0;for(const r of this)if(!e.call(this,r)){t=!1;break}return t}),T.find instanceof Function||(T.find=function(e){for(const t of this)if(e.call(this,t))return t}),T.indexed instanceof Function||(T.indexed=function(){let e=0;return this.map(t=>[e++,t])}),T.chunks instanceof Function||(T.chunks=function(e){if(!Number.isSafeInteger(e)||e<1)throw new TypeError("Size must be a positive integer.");{const t=this;let r=!1;return E.from({next(){if(r)return{done:r};{const n=[];let o=0;for(;o++<e&&!r;){const e=t.next();if(e.done){r=!0,void 0!==e.value&&n.push(e.value);break}n.push(e.value)}return{value:n,done:!1}}}})}}),E.from instanceof Function||(E.from=function(e){if("object"!=typeof e||null===e)throw new TypeError("Not an object.");if(e.next instanceof Function){return Object.create(T,{next:{enumerable:!0,configurable:!1,writable:!1,value:(...t)=>e.next(...t)}})}if(e[Symbol.iterator]instanceof Function)return E.from(e[Symbol.iterator]())}),v||(globalThis.Iterator=E),l(ReadableStream,"from",function(e){if(e[Symbol.iterator]instanceof Function)return new ReadableStream({start(t){try{for(const r of e)t.enqueue(r)}catch(e){t.error(e)}finally{t.close()}}});if(e[Symbol.asyncIterator]instanceof Function)return new ReadableStream({async start(t){try{for await(const r of e)t.enqueue(r)}catch(e){t.error(e)}finally{t.close()}}});throw new TypeError("`ReadableStream.from()` requires an iterable source.")}),Number.hasOwnProperty("isSafeInteger")||(Number.MAX_SAFE_INTEGER=2**53-1,Number.MIN_SAFE_INTEGER=-Number.MAX_SAFE_INTEGER,Number.isSafeInteger=e=>e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER),Number.hasOwnProperty("EPSILON")||(Number.EPSILON=2**-52),Math.hasOwnProperty("sign")||(Math.sign=e=>(e>0)-(e<0)||+e),Math.hasOwnProperty("trunc")||(Math.trunc=e=>{const t=e-e%1;return 0===t&&(e<0||0===e&&1/e!=1/0)?-0:t}),Math.hasOwnProperty("expm1")||(Math.expm1=e=>Math.exp(e)-1),Math.hasOwnProperty("hypot")||(Math.hypot=(...e)=>Math.sqrt(e.reduce((e,t)=>e+t**2,0))),Math.hasOwnProperty("cbrt")||(Math.cbrt=e=>e**(1/3)),Math.hasOwnProperty("log10")||(Math.log10=e=>Math.log(e)*Math.LOG10E),Math.hasOwnProperty("log2")||(Math.log2=e=>Math.log(e)*Math.LOG2E),Math.hasOwnProperty("log1p")||(Math.log1p=e=>Math.log(1+e)),Math.hasOwnProperty("fround")||(Math.fround=(S=new Float32Array(1),function(e){return S[0]=e,S[0]})),Math.clamp instanceof Function||(Math.clamp=function(e,t,r){return Math.min(Math.max(e,t),r)}),Math.constrain instanceof Function||(Math.constrain=Math.clamp),Math.sumPrecise instanceof Function||(Math.sumPrecise=function(e){let t=-0;for(const r of e){if(!Number.isFinite(r)){t=-0;break}t+=r}return t}),Math.sum instanceof Function||(Math.sum=function(...e){return console.warn("Math.sum is deprecated. Please use Math.sumPrecise instead."),Math.sumPrecise(e)}),function(){if(!("isSecureContext"in globalThis)){const e=["localhost","127.0.0.1"],t="https:",r=[t,"file:","wss:"],n=(e=globalThis.document)=>[...e.scripts].every(({src:r})=>{if(0===r.length)return!0;{const{protocol:n,hostname:o}=new URL(r,e.baseURI);return n===t||o===location.hostname}});Object.defineProperty(globalThis,"isSecureContext",{enumerable:!0,configurable:!0,get:function(){return window.parent===window&&(!(!r.includes(location.protocol)&&!e.includes(location.hostname))&&n())}})}}();function A(e){return function(e){return e instanceof Function&&"AsyncFunction"===e.constructor.name}(e)||e instanceof Promise}
|
|
1
|
+
!function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}!function(){"undefined"==typeof globalThis&&("undefined"!=typeof window?Object.defineProperty(Window.prototype,"globalThis",{enumerable:!1,writable:!0,configurable:!0,value:window}):"undefined"!=typeof global?Object.defineProperty(global,"globalThis",{enumerable:!1,writable:!0,configurable:!0,value:global}):"undefined"!=typeof self?Object.defineProperty(self,"globalThis",{enumerable:!1,writable:!0,configurable:!0,value:self}):Object.defineProperty(this,"globalThis",{enumerable:!1,writable:!0,configurable:!0,value:this}))}();var t,r,n,o={exports:{}};function i(){return t||(t=1,o.exports=function(){const e=new WeakMap,t=/(\n|\r\n?|\u2028|\u2029)/g,r=/^\s*/,n=/\S/,o=Array.prototype.slice,i="0".charCodeAt(0),a="9".charCodeAt(0),s="a".charCodeAt(0),l="f".charCodeAt(0),c="A".charCodeAt(0),u="F".charCodeAt(0);function p(e){if("string"==typeof e)return d([e])[0];if("function"==typeof e)return function(){const t=o.call(arguments);return t[0]=f(t[0]),e.apply(this,t)};const t=f(e);let r=h(t,0);for(let e=1;e<t.length;e++)r+=arguments[e]+h(t,e);return r}function h(e,t){const r=e[t];if(void 0===r)throw new TypeError(`invalid cooked string at index ${t}`);return r}function f(t){const r=e.get(t);if(r)return r;const n=d(t.raw),o=n.map(g);return Object.defineProperty(o,"raw",{value:Object.freeze(n)}),Object.freeze(o),e.set(t,o),o}function d(e){const o=e.map(e=>e.split(t));let i;for(let e=0;e<o.length;e++){const t=o[e],a=0===e,s=e+1===o.length;if(a){if(1===t.length||t[0].length>0)throw new Error("invalid content on opening line");t[1]=""}if(s){if(1===t.length||n.test(t[t.length-1]))throw new Error("invalid content on closing line");t[t.length-2]="",t[t.length-1]=""}for(let e=2;e<t.length;e+=2){const n=t[e],o=e+1===t.length&&!s,a=r.exec(n)[0];o||a.length!==n.length?i=m(a,i):t[e]=""}}const a=i?i.length:0;return o.map(e=>{let t=e[0];for(let r=1;r<e.length;r+=2)t+=e[r]+e[r+1].slice(a);return t})}function m(e,t){if(void 0===t||e===t)return e;let r=0;for(const n=Math.min(e.length,t.length);r<n&&e[r]===t[r];r++);return e.slice(0,r)}function g(e){let t="",r=0,n=0;for(;(n=e.indexOf("\\",n))>-1;){if(t+=e.slice(r,n),++n===e.length)return;const o=e[n++];switch(o){case"b":t+="\b";break;case"t":t+="\t";break;case"n":t+="\n";break;case"v":t+="\v";break;case"f":t+="\f";break;case"r":t+="\r";break;case"\r":n<e.length&&"\n"===e[n]&&++n;case"\n":case"\u2028":case"\u2029":break;case"0":if(b(e,n))return;t+="\0";break;case"x":{const r=y(e,n,n+2);if(-1===r)return;n+=2,t+=String.fromCharCode(r);break}case"u":{let r;if(n<e.length&&"{"===e[n]){const t=e.indexOf("}",++n);if(-1===t)return;r=y(e,n,t),n=t+1}else r=y(e,n,n+4),n+=4;if(-1===r||r>1114111)return;t+=String.fromCodePoint(r);break}default:if(b(o,0))return;t+=o}r=n}return t+e.slice(r)}function b(e,t){const r=e.charCodeAt(t);return r>=i&&r<=a}function y(e,t,r){if(r>=e.length)return-1;let n=0;for(;t<r;t++){const r=w(e.charCodeAt(t));if(-1===r)return-1;n=16*n+r}return n}function w(e){return e>=i&&e<=a?e-i:e>=s&&e<=l?e-s+10:e>=c&&e<=u?e-c+10:-1}return p}()),o.exports}var a=e(n?r:(n=1,r=i()));String.dedent instanceof Function||(String.dedent=a),!("crypto"in window)&&"msCrypto"in window&&(globalThis.crypto=globalThis.msCrypto),"Notification"in window||(globalThis.Notification=globalThis.notifications||globalThis.webkitNotifications||globalThis.oNotifications||globalThis.msNotifications||!1),"doNotTrack"in navigator||(navigator.doNotTrack=globalThis.doNotTrack||navigator.msDoNotTrack||"unspecified"),"indexedDB"in window||(globalThis.indexedDB=globalThis.indexedDB||globalThis.mozIndexedDB||globalThis.webkitIndexedDB||globalThis.msIndexedDB||!1),"hidden"in document||(document.hidden=document.webkitHidden||document.msHidden||document.mozHidden||!1),"visibilityState"in document||(document.visibilityState=document.webkitVisibilityState||document.msVisibilityState||document.mozVisibilityState||"visible"),"fullscreenElement"in document||(document.fullscreenElement=document.mozFullScreenElement||document.webkitFullscreenElement||!1),"requestAnimationFrame"in window||(globalThis.requestAnimationFrame=globalThis.mozRequestAnimationFrame||globalThis.webkitRequestAnimationFrame||globalThis.msRequestAnimationFrame||!1),"exitFullscreen"in Document.prototype||(Document.prototype.exitFullscreen=document.mozCancelFullScreen||document.webkitCancelFullScreen||document.msCancelFullScreen||!1),"requestFullscreen"in HTMLElement.prototype||(HTMLElement.prototype.requestFullscreen=HTMLElement.prototype.requestFullScreen||HTMLElement.prototype.mozRequestFullScreen||HTMLElement.prototype.webkitRequestFullScreen||!1),"fullscreen"in Document.prototype||Object.defineProperty(Document.prototype,"fullscreen",{get:()=>document.fullscreenElement instanceof Element}),Object.groupBy instanceof Function||(Object.groupBy=function(e,t){return Array.from(e).reduce((e,r,n)=>{const o=t.call(e,r,n);return e.hasOwnProperty(o)?e[o].push(r):e[o]=[r],e},{})}),Map.prototype.getOrInsert instanceof Function||(Map.prototype.getOrInsert=function(e,t){return this.has(e)?this.get(e):(this.set(e,t),t)},Map.prototype.getOrInsertComputed=function(e,t){if(this.has(e))return this.get(e);{const r=t(e);return this.set(e,r),r}}),WeakMap.prototype.getOrInsert instanceof Function||(WeakMap.prototype.getOrInsert=function(e,t){return Map.prototype.getOrInsert.call(this,e,t)},WeakMap.prototype.getOrInsertComputed=function(e,t){return WeakMap.prototype.getOrInsertComputed.call(this,e,t)}),Map.groupBy instanceof Function||(Map.groupBy=function(e,t){return Array.from(e).reduce((e,r,n)=>(e.emplace(t.call(e,r,n),{insert:()=>[r],update:e=>(e.push(r),e)}),e),new Map)}),Map.prototype.emplace instanceof Function||(Map.prototype.emplace=function(e,{insert:t,update:r}={}){console.warn("`Map.prototype.emplace()` has been removed from the proposal and will be removed in the future.");const n=this.has(e);if(n&&r instanceof Function){const t=this.get(e),n=r.call(this,t,e,this);return n!==t&&this.set(e,n),n}if(n)return this.get(e);if(t instanceof Function){const r=t.call(this,e,this);return this.set(e,r),r}throw new Error("Key is not found and no `insert()` given")});const s=[Array,String,globalThis.Int8Array,globalThis.Uint8Array,globalThis.Uint8ClampedArray,globalThis.Int16Array,globalThis.Uint16Array,globalThis.Int32Array,globalThis.Uint32Array,globalThis.Float32Array,globalThis.Float64Array,globalThis.BigInt64Array,globalThis.BigUint64Array];if(Array.prototype.flat instanceof Function||(Array.prototype.flat=function(e=1){const t=[];e=Math.min(Number.MAX_SAFE_INTEGER,Math.max(0,e));const r=(e,n)=>{Array.isArray(e)&&n>=0?e.forEach(e=>r(e,n-1)):t.push(e)};return r(this,Number.isNaN(e)?0:e),t}),Array.prototype.flatMap instanceof Function||(Array.prototype.flatMap=function(e,t){return this.map(e,t).flat(1)}),Array.prototype.findLast instanceof Function||(Array.prototype.findLast=function(e,t){let r;return this.forEach((n,o,i)=>{e.call(t,n,o,i)&&(r=n)},t),r}),"lastIndex"in Array.prototype||Object.defineProperty(Array.prototype,"lastIndex",{enumerable:!1,configurable:!1,get:function(){return Math.max(0,this.length-1)}}),"lastItem"in Array.prototype||Object.defineProperty(Array.prototype,"lastItem",{enumerable:!1,configurable:!1,get:function(){return this[this.lastIndex]},set:function(e){this[this.lastIndex]=e}}),Array.prototype.findLastIndex instanceof Function||(Array.prototype.findLastIndex=function(e,t){let r=-1;return this.forEach((n,o,i)=>{e.call(t,n,o,i)&&(r=o)},t),r}),!(Array.prototype.at instanceof Function)){const Ze=function(e){if((e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this[e]};for(const et of s)void 0!==et&&Object.defineProperty(et.prototype,"at",{value:Ze,writable:!0,enumerable:!1,configurable:!0})}function l(e,t,r,{writable:n=!0,enumerable:o=!0,configurable:i=!0}={}){e[t]instanceof Function||Object.defineProperty(e,t,{value:r,writable:n,enumerable:o,configurable:i})}function c(e,t,{get:r,set:n,enumerable:o=!0,configurable:i=!0}={}){e.hasOwnProperty(t)||Object.defineProperty(e,t,{get:r,set:n,enumerable:o,configurable:i})}function u(e,t,r){const{value:n,enumerable:o,configurable:i,writable:a}=Object.getOwnPropertyDescriptor(e,t),s=r(n);if(!(s instanceof Function))throw new TypeError(`Error overwriting ${t}. The func MUST be a function that accepts the original as an argument and return a function.`);Object.defineProperty(e,t,{value:s,enumerable:o,configurable:i,writable:a})}if(!(Array.prototype.group instanceof Function)&&Object.groupBy instanceof Function&&(Array.prototype.group=function(e){return console.warn("`Array.group()` is deprecated. Please use `Object.groupBy()` instead."),Object.groupBy(this,e)}),!(Array.prototype.groupBy instanceof Function)&&Object.groupBy instanceof Function&&(Array.prototype.groupBy=function(e){return console.warn("`Array.goupBy()` is deprecated. Please use `Object.groupBy()` instead."),Object.groupBy(this,e)}),!(Array.prototype.groupToMap instanceof Function)&&Map.groupBy instanceof Function&&(Array.prototype.groupToMap=function(e){return console.warn("`Array.groupToMap()` is deprecated. Please use `Map.groupBy()` instead."),Map.groupBy(this,e)}),Map.groupBy instanceof Function&&(Array.prototype.groupByToMap=function(e){return console.warn("`Array.groupByToMap()` is deprecated. Please use `Map.groupBy()` instead."),Map.groupBy(this,e)}),Array.fromAsync instanceof Function||(Array.fromAsync=async function(e,t,r=globalThis){let n=[];for await(const t of e)n.push(await t);return Array.from(n,t,r)}),Array.prototype.equals instanceof Function||(Array.prototype.equals=function(e){return this===e||!!Array.isArray(e)&&(this.length===e.length&&this.every((t,r)=>{const n=e[r];return Array.isArray(t)?Array.isArray(n)&&t.equals(n):Object.is(t,n)}))}),Array.prototype.uniqueBy instanceof Function||(Array.prototype.uniqueBy=function(e){switch(typeof e){case"undefined":return[...new Set(this)];case"string":case"number":case"symbol":return this.uniqueBy(t=>t[e]);case"function":{const t=new Set;return this.filter((...r)=>{const n=e.apply(this,r);return!t.has(n)&&(t.add(n),!0)})}default:throw new TypeError("Not a valid argument for uniqueBy")}}),Array.prototype.toReversed instanceof Function||(Array.prototype.toReversed=function(){return[...this].reverse()}),Array.prototype.toSorted instanceof Function||(Array.prototype.toSorted=function(e){return[...this].sort(e)}),Array.prototype.toSpliced instanceof Function||(Array.prototype.toSpliced=function(e,t,...r){const n=[...this];return n.splice(e,t,...r),n}),Array.prototype.with instanceof Function||(Array.prototype.with=function(e,t){const r=[...this];return r[e]=t,r}),Array.isTemplateObject instanceof Function||(Array.isTemplateObject=function(e){return!!(Array.isArray(e)&&Array.isArray(e.raw)&&Object.isFrozen(e)&&Object.isFrozen(e.raw))&&(0!==e.length&&e.length===e.raw.length)}),Uint8Array.prototype.toHex instanceof Function||(Uint8Array.prototype.toHex=function(){return Array.from(this,e=>e.toString(16).padStart(2,"0")).join("")}),Uint8Array.prototype.toBase64 instanceof Function||(Uint8Array.prototype.toBase64=function({alphabet:e="base64"}={}){if("base64"===e){const e=32768;let t="";for(let r=0;r<this.length;r+=e){const n=this.subarray(r,r+e);t+=String.fromCharCode.apply(null,n)}return btoa(t)}if("base64url"===e)return this.toBase64({alphabet:"base64"}).replaceAll("+","-").replaceAll("/","_");throw new TypeError('expected alphabet to be either "base64" or "base64url')}),Uint8Array.fromHex instanceof Function||(Uint8Array.fromHex=function(e){if("string"!=typeof e)throw new TypeError("expected input to be a string");if(0===!(1&e.length))throw new SyntaxError("string should be an even number of characters");return Uint8Array.from(globalThis.Iterator.range(0,e.length,{step:2}),t=>parseInt(e.substring(t,t+2),16))}),Uint8Array.fromBase64 instanceof Function||(Uint8Array.fromBase64=function(e,{alphabet:t="base64",lastChunkHandling:r="loose"}={}){if("string"!=typeof e)throw new TypeError("expected input to be a string");if(!["base64","base64url"].includes(t))throw new TypeError('expected alphabet to be either "base64" or "base64url');if(!["loose","strict","stop-before-partial"].includes(r))throw new TypeError(`Invalid \`lastChunkHandling\`: "${r}".`);if("base64"!==t)return Uint8Array.fromBase64(e.replaceAll("-","+").replaceAll("_","/"),{alphabet:"base64"});{const t=e.length%4;if(1===t)throw new TypeError("Invalid string length.");if(0===t)return Uint8Array.from(atob(e),e=>e.charCodeAt(0));switch(r){case"strict":throw new SyntaxError("Missing padding.");case"loose":return Uint8Array.fromBase64(e.padEnd(e.length+(4-t),"="),{alphabet:"base64",lastChunkHandling:"strict"});case"stop-before-partial":return Uint8Array.fromBase64(e.slice(0,e.length-t),{alphabet:"base64",lastChunkHandling:"strict"})}}}),"Symbol"in globalThis){const tt=new Set(Reflect.ownKeys(Symbol).filter(e=>"symbol"==typeof Symbol[e]).map(e=>Symbol[e]));void 0===Symbol.toStringTag&&(Symbol.toStringTag=Symbol("Symbol.toStringTag")),void 0===Symbol.iterator&&(Symbol.iterator=Symbol("Symbol.iterator")),l(Symbol,"isRegistered",function(e){return"symbol"==typeof e&&"string"==typeof Symbol.keyFor(e)}),l(Symbol,"isWellKnown",function(e){return tt.has(e)})}function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h,f,d,m,g,b;function y(){if(f)return h;f=1;var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,i=(e,r)=>t(e,"name",{value:r,configurable:!0}),a={};((e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})})(a,{URLPattern:()=>oe}),e=a,h=((e,i,a,s)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let l of n(i))!o.call(e,l)&&l!==a&&t(e,l,{get:()=>i[l],enumerable:!(s=r(i,l))||s.enumerable});return e})(t({},"__esModule",{value:!0}),e);var s=class{type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(e,t,r,n,o,i){this.type=e,this.name=t,this.prefix=r,this.value=n,this.suffix=o,this.modifier=i}hasCustomName(){return""!==this.name&&"number"!=typeof this.name}};i(s,"Part");var l=/[$_\p{ID_Start}]/u,c=/[$_\u200C\u200D\p{ID_Continue}]/u,u=".*";function p(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}function d(e,t=!1){let r=[],n=0;for(;n<e.length;){let o=e[n],a=i(function(o){if(!t)throw new TypeError(o);r.push({type:"INVALID_CHAR",index:n,value:e[n++]})},"ErrorOrInvalid");if("*"!==o)if("+"!==o&&"?"!==o)if("\\"!==o)if("{"!==o)if("}"!==o){if(":"===o){let t="",o=n+1;for(;o<e.length;){let r=e.substr(o,1);if(!(o===n+1&&l.test(r)||o!==n+1&&c.test(r)))break;t+=e[o++]}if(!t){a(`Missing parameter name at ${n}`);continue}r.push({type:"NAME",index:n,value:t}),n=o;continue}if("("===o){let t=1,o="",i=n+1,s=!1;if("?"===e[i]){a(`Pattern cannot start with "?" at ${i}`);continue}for(;i<e.length;){if(!p(e[i],!1)){a(`Invalid character '${e[i]}' at ${i}.`),s=!0;break}if("\\"!==e[i]){if(")"===e[i]){if(t--,0===t){i++;break}}else if("("===e[i]&&(t++,"?"!==e[i+1])){a(`Capturing groups are not allowed at ${i}`),s=!0;break}o+=e[i++]}else o+=e[i++]+e[i++]}if(s)continue;if(t){a(`Unbalanced pattern at ${n}`);continue}if(!o){a(`Missing pattern at ${n}`);continue}r.push({type:"REGEX",index:n,value:o}),n=i;continue}r.push({type:"CHAR",index:n,value:e[n++]})}else r.push({type:"CLOSE",index:n,value:e[n++]});else r.push({type:"OPEN",index:n,value:e[n++]});else r.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else r.push({type:"OTHER_MODIFIER",index:n,value:e[n++]});else r.push({type:"ASTERISK",index:n,value:e[n++]})}return r.push({type:"END",index:n,value:""}),r}function m(e,t={}){let r=d(e);t.delimiter??="/#?",t.prefixes??="./";let n=`[^${g(t.delimiter)}]+?`,o=[],a=0,l=0,c=new Set,p=i(e=>{if(l<r.length&&r[l].type===e)return r[l++].value},"tryConsume"),h=i(()=>p("OTHER_MODIFIER")??p("ASTERISK"),"tryConsumeModifier"),f=i(e=>{let t=p(e);if(void 0!==t)return t;let{type:n,index:o}=r[l];throw new TypeError(`Unexpected ${n} at ${o}, expected ${e}`)},"mustConsume"),m=i(()=>{let e,t="";for(;e=p("CHAR")??p("ESCAPED_CHAR");)t+=e;return t},"consumeText"),b=i(e=>e,"DefaultEncodePart"),y=t.encodePart||b,w="",v=i(e=>{w+=e},"appendToPendingFixedValue"),T=i(()=>{w.length&&(o.push(new s(3,"","",y(w),"",3)),w="")},"maybeAddPartFromPendingFixedValue"),E=i((e,t,r,i,l)=>{let p,h=3;switch(l){case"?":h=1;break;case"*":h=0;break;case"+":h=2}if(!t&&!r&&3===h)return void v(e);if(T(),!t&&!r){if(!e)return;return void o.push(new s(3,"","",y(e),"",h))}p=r?"*"===r?u:r:n;let f,d=2;if(p===n?(d=1,p=""):p===u&&(d=0,p=""),t?f=t:r&&(f=a++),c.has(f))throw new TypeError(`Duplicate name '${f}'.`);c.add(f),o.push(new s(d,f,y(e),p,y(i),h))},"addPart");for(;l<r.length;){let e=p("CHAR"),r=p("NAME"),n=p("REGEX");if(!r&&!n&&(n=p("ASTERISK")),r||n){let o=e??"";-1===t.prefixes.indexOf(o)&&(v(o),o=""),T(),E(o,r,n,"",h());continue}let o=e??p("ESCAPED_CHAR");if(o)v(o);else{if(p("OPEN")){let e=m(),t=p("NAME"),r=p("REGEX");!t&&!r&&(r=p("ASTERISK"));let n=m();f("CLOSE"),E(e,t,r,n,h());continue}T(),f("END")}}return o}function g(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function b(e){return e&&e.ignoreCase?"ui":"u"}function y(e,t,r){return v(m(e,r),t,r)}function w(e){switch(e){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}function v(e,t,r={}){r.delimiter??="/#?",r.prefixes??="./",r.sensitive??=!1,r.strict??=!1,r.end??=!0,r.start??=!0,r.endsWith="";let n=r.start?"^":"";for(let o of e){if(3===o.type){3===o.modifier?n+=g(o.value):n+=`(?:${g(o.value)})${w(o.modifier)}`;continue}t&&t.push(o.name);let e=`[^${g(r.delimiter)}]+?`,i=o.value;(1===o.type?i=e:0===o.type&&(i=u),o.prefix.length||o.suffix.length)?3!==o.modifier&&1!==o.modifier?(n+=`(?:${g(o.prefix)}`,n+=`((?:${i})(?:`,n+=g(o.suffix),n+=g(o.prefix),n+=`(?:${i}))*)${g(o.suffix)})`,0===o.modifier&&(n+="?")):(n+=`(?:${g(o.prefix)}(${i})${g(o.suffix)})`,n+=w(o.modifier)):3===o.modifier||1===o.modifier?n+=`(${i})${w(o.modifier)}`:n+=`((?:${i})${w(o.modifier)})`}let o=`[${g(r.endsWith)}]|$`,i=`[${g(r.delimiter)}]`;if(r.end)return r.strict||(n+=`${i}?`),r.endsWith.length?n+=`(?=${o})`:n+="$",new RegExp(n,b(r));r.strict||(n+=`(?:${i}(?=${o}))?`);let a=!1;if(e.length){let t=e[e.length-1];3===t.type&&3===t.modifier&&(a=r.delimiter.indexOf(t)>-1)}return a||(n+=`(?=${i}|${o})`),new RegExp(n,b(r))}i(p,"isASCII"),i(d,"lexer"),i(m,"parse"),i(g,"escapeString"),i(b,"flags"),i(y,"stringToRegexp"),i(w,"modifierToString"),i(v,"partsToRegexp");var T={delimiter:"",prefixes:"",sensitive:!0,strict:!0},E={delimiter:".",prefixes:"",sensitive:!0,strict:!0},S={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function A(e,t){return!!e.length&&("/"===e[0]||!(!t||e.length<2)&&(("\\"==e[0]||"{"==e[0])&&"/"==e[1]))}function M(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}function x(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}function L(e){return!(!e||e.length<2)&&("["===e[0]||("\\"===e[0]||"{"===e[0])&&"["===e[1])}i(A,"isAbsolutePathname"),i(M,"maybeStripPrefix"),i(x,"maybeStripSuffix"),i(L,"treatAsIPv6Hostname");var O=["ftp","file","http","https","ws","wss"];function k(e){if(!e)return!0;for(let t of O)if(e.test(t))return!0;return!1}function P(e,t){if(e=M(e,"#"),t||""===e)return e;let r=new URL("https://example.com");return r.hash=e,r.hash?r.hash.substring(1,r.hash.length):""}function R(e,t){if(e=M(e,"?"),t||""===e)return e;let r=new URL("https://example.com");return r.search=e,r.search?r.search.substring(1,r.search.length):""}function F(e,t){return t||""===e?e:L(e)?B(e):q(e)}function C(e,t){if(t||""===e)return e;let r=new URL("https://example.com");return r.password=e,r.password}function j(e,t){if(t||""===e)return e;let r=new URL("https://example.com");return r.username=e,r.username}function I(e,t,r){if(r||""===e)return e;if(t&&!O.includes(t))return new URL(`${t}:${e}`).pathname;let n="/"==e[0];return e=new URL(n?e:"/-"+e,"https://example.com").pathname,n||(e=e.substring(2,e.length)),e}function N(e,t,r){return U(t)===e&&(e=""),r||""===e?e:_(e)}function H(e,t){return e=x(e,":"),t||""===e?e:D(e)}function U(e){switch(e){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function D(e){if(""===e)return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw new TypeError(`Invalid protocol '${e}'.`)}function z(e){if(""===e)return e;let t=new URL("https://example.com");return t.username=e,t.username}function $(e){if(""===e)return e;let t=new URL("https://example.com");return t.password=e,t.password}function q(e){if(""===e)return e;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e))throw new TypeError(`Invalid hostname '${e}'`);let t=new URL("https://example.com");return t.hostname=e,t.hostname}function B(e){if(""===e)return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw new TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}function _(e){if(""===e||/^[0-9]*$/.test(e)&&parseInt(e)<=65535)return e;throw new TypeError(`Invalid port '${e}'.`)}function V(e){if(""===e)return e;let t=new URL("https://example.com");return t.pathname="/"!==e[0]?"/-"+e:e,"/"!==e[0]?t.pathname.substring(2,t.pathname.length):t.pathname}function W(e){return""===e?e:new URL(`data:${e}`).pathname}function G(e){if(""===e)return e;let t=new URL("https://example.com");return t.search=e,t.search.substring(1,t.search.length)}function X(e){if(""===e)return e;let t=new URL("https://example.com");return t.hash=e,t.hash.substring(1,t.hash.length)}i(k,"isSpecialScheme"),i(P,"canonicalizeHash"),i(R,"canonicalizeSearch"),i(F,"canonicalizeHostname"),i(C,"canonicalizePassword"),i(j,"canonicalizeUsername"),i(I,"canonicalizePathname"),i(N,"canonicalizePort"),i(H,"canonicalizeProtocol"),i(U,"defaultPortForProtocol"),i(D,"protocolEncodeCallback"),i(z,"usernameEncodeCallback"),i($,"passwordEncodeCallback"),i(q,"hostnameEncodeCallback"),i(B,"ipv6HostnameEncodeCallback"),i(_,"portEncodeCallback"),i(V,"standardURLPathnameEncodeCallback"),i(W,"pathURLPathnameEncodeCallback"),i(G,"searchEncodeCallback"),i(X,"hashEncodeCallback");var K=class{#e;#t=[];#r={};#n=0;#o=1;#i=0;#a=0;#s=0;#l=0;#c=!1;constructor(e){this.#e=e}get result(){return this.#r}parse(){for(this.#t=d(this.#e,!0);this.#n<this.#t.length;this.#n+=this.#o){if(this.#o=1,"END"===this.#t[this.#n].type){if(0===this.#a){this.#u(),this.#p()?this.#h(9,1):this.#f()?this.#h(8,1):this.#h(7,0);continue}if(2===this.#a){this.#d(5);continue}this.#h(10,0);break}if(this.#s>0){if(!this.#m())continue;this.#s-=1}if(this.#g())this.#s+=1;else switch(this.#a){case 0:this.#b()&&this.#d(1);break;case 1:if(this.#b()){this.#y();let e=7,t=1;this.#w()?(e=2,t=3):this.#c&&(e=2),this.#h(e,t)}break;case 2:this.#v()?this.#d(3):(this.#T()||this.#f()||this.#p())&&this.#d(5);break;case 3:this.#E()?this.#h(4,1):this.#v()&&this.#h(5,1);break;case 4:this.#v()&&this.#h(5,1);break;case 5:this.#S()?this.#l+=1:this.#A()&&(this.#l-=1),this.#M()&&!this.#l?this.#h(6,1):this.#T()?this.#h(7,0):this.#f()?this.#h(8,1):this.#p()&&this.#h(9,1);break;case 6:this.#T()?this.#h(7,0):this.#f()?this.#h(8,1):this.#p()&&this.#h(9,1);break;case 7:this.#f()?this.#h(8,1):this.#p()&&this.#h(9,1);break;case 8:this.#p()&&this.#h(9,1)}}void 0!==this.#r.hostname&&void 0===this.#r.port&&(this.#r.port="")}#h(e,t){switch(this.#a){case 0:case 2:break;case 1:this.#r.protocol=this.#x();break;case 3:this.#r.username=this.#x();break;case 4:this.#r.password=this.#x();break;case 5:this.#r.hostname=this.#x();break;case 6:this.#r.port=this.#x();break;case 7:this.#r.pathname=this.#x();break;case 8:this.#r.search=this.#x();break;case 9:this.#r.hash=this.#x()}0!==this.#a&&10!==e&&([1,2,3,4].includes(this.#a)&&[6,7,8,9].includes(e)&&(this.#r.hostname??=""),[1,2,3,4,5,6].includes(this.#a)&&[8,9].includes(e)&&(this.#r.pathname??=this.#c?"/":""),[1,2,3,4,5,6,7].includes(this.#a)&&9===e&&(this.#r.search??="")),this.#L(e,t)}#L(e,t){this.#a=e,this.#i=this.#n+t,this.#n+=t,this.#o=0}#u(){this.#n=this.#i,this.#o=0}#d(e){this.#u(),this.#a=e}#O(e){return e<0&&(e=this.#t.length-e),e<this.#t.length?this.#t[e]:this.#t[this.#t.length-1]}#k(e,t){let r=this.#O(e);return r.value===t&&("CHAR"===r.type||"ESCAPED_CHAR"===r.type||"INVALID_CHAR"===r.type)}#b(){return this.#k(this.#n,":")}#w(){return this.#k(this.#n+1,"/")&&this.#k(this.#n+2,"/")}#v(){return this.#k(this.#n,"@")}#E(){return this.#k(this.#n,":")}#M(){return this.#k(this.#n,":")}#T(){return this.#k(this.#n,"/")}#f(){if(this.#k(this.#n,"?"))return!0;if("?"!==this.#t[this.#n].value)return!1;let e=this.#O(this.#n-1);return"NAME"!==e.type&&"REGEX"!==e.type&&"CLOSE"!==e.type&&"ASTERISK"!==e.type}#p(){return this.#k(this.#n,"#")}#g(){return"OPEN"==this.#t[this.#n].type}#m(){return"CLOSE"==this.#t[this.#n].type}#S(){return this.#k(this.#n,"[")}#A(){return this.#k(this.#n,"]")}#x(){let e=this.#t[this.#n],t=this.#O(this.#i).index;return this.#e.substring(t,e.index)}#y(){let e={};Object.assign(e,T),e.encodePart=D;let t=y(this.#x(),void 0,e);this.#c=k(t)}};i(K,"Parser");var Q=["protocol","username","password","hostname","port","pathname","search","hash"],J="*";function Y(e,t){if("string"!=typeof e)throw new TypeError("parameter 1 is not of type 'string'.");let r=new URL(e,t);return{protocol:r.protocol.substring(0,r.protocol.length-1),username:r.username,password:r.password,hostname:r.hostname,port:r.port,pathname:r.pathname,search:""!==r.search?r.search.substring(1,r.search.length):void 0,hash:""!==r.hash?r.hash.substring(1,r.hash.length):void 0}}function Z(e,t){return t?te(e):e}function ee(e,t,r){let n;if("string"==typeof t.baseURL)try{n=new URL(t.baseURL),void 0===t.protocol&&(e.protocol=Z(n.protocol.substring(0,n.protocol.length-1),r)),!r&&void 0===t.protocol&&void 0===t.hostname&&void 0===t.port&&void 0===t.username&&(e.username=Z(n.username,r)),!r&&void 0===t.protocol&&void 0===t.hostname&&void 0===t.port&&void 0===t.username&&void 0===t.password&&(e.password=Z(n.password,r)),void 0===t.protocol&&void 0===t.hostname&&(e.hostname=Z(n.hostname,r)),void 0===t.protocol&&void 0===t.hostname&&void 0===t.port&&(e.port=Z(n.port,r)),void 0===t.protocol&&void 0===t.hostname&&void 0===t.port&&void 0===t.pathname&&(e.pathname=Z(n.pathname,r)),void 0===t.protocol&&void 0===t.hostname&&void 0===t.port&&void 0===t.pathname&&void 0===t.search&&(e.search=Z(n.search.substring(1,n.search.length),r)),void 0===t.protocol&&void 0===t.hostname&&void 0===t.port&&void 0===t.pathname&&void 0===t.search&&void 0===t.hash&&(e.hash=Z(n.hash.substring(1,n.hash.length),r))}catch{throw new TypeError(`invalid baseURL '${t.baseURL}'.`)}if("string"==typeof t.protocol&&(e.protocol=H(t.protocol,r)),"string"==typeof t.username&&(e.username=j(t.username,r)),"string"==typeof t.password&&(e.password=C(t.password,r)),"string"==typeof t.hostname&&(e.hostname=F(t.hostname,r)),"string"==typeof t.port&&(e.port=N(t.port,e.protocol,r)),"string"==typeof t.pathname){if(e.pathname=t.pathname,n&&!A(e.pathname,r)){let t=n.pathname.lastIndexOf("/");t>=0&&(e.pathname=Z(n.pathname.substring(0,t+1),r)+e.pathname)}e.pathname=I(e.pathname,e.protocol,r)}return"string"==typeof t.search&&(e.search=R(t.search,r)),"string"==typeof t.hash&&(e.hash=P(t.hash,r)),e}function te(e){return e.replace(/([+*?:{}()\\])/g,"\\$1")}function re(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function ne(e,t){t.delimiter??="/#?",t.prefixes??="./",t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith="";let r=`[^${re(t.delimiter)}]+?`,n=/[$_\u200C\u200D\p{ID_Continue}]/u,o="";for(let i=0;i<e.length;++i){let a=e[i];if(3===a.type){if(3===a.modifier){o+=te(a.value);continue}o+=`{${te(a.value)}}${w(a.modifier)}`;continue}let s=a.hasCustomName(),l=!!a.suffix.length||!!a.prefix.length&&(1!==a.prefix.length||!t.prefixes.includes(a.prefix)),c=i>0?e[i-1]:null,u=i<e.length-1?e[i+1]:null;if(!l&&s&&1===a.type&&3===a.modifier&&u&&!u.prefix.length&&!u.suffix.length)if(3===u.type){let e=u.value.length>0?u.value[0]:"";l=n.test(e)}else l=!u.hasCustomName();if(!l&&!a.prefix.length&&c&&3===c.type){let e=c.value[c.value.length-1];l=t.prefixes.includes(e)}l&&(o+="{"),o+=te(a.prefix),s&&(o+=`:${a.name}`),2===a.type?o+=`(${a.value})`:1===a.type?s||(o+=`(${r})`):0===a.type&&(s||c&&3!==c.type&&3===c.modifier&&!l&&""===a.prefix?o+="(.*)":o+="*"),1===a.type&&s&&a.suffix.length&&n.test(a.suffix[0])&&(o+="\\"),o+=te(a.suffix),l&&(o+="}"),3!==a.modifier&&(o+=w(a.modifier))}return o}i(Y,"extractValues"),i(Z,"processBaseURLString"),i(ee,"applyInit"),i(te,"escapePatternString"),i(re,"escapeRegexpString"),i(ne,"partsToPattern");var oe=class{#e;#t={};#r={};#n={};#o={};#i=!1;constructor(e={},t,r){try{let n;if("string"==typeof t?n=t:r=t,"string"==typeof e){let t=new K(e);if(t.parse(),e=t.result,void 0===n&&"string"!=typeof e.protocol)throw new TypeError("A base URL must be provided for a relative constructor string.");e.baseURL=n}else{if(!e||"object"!=typeof e)throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(n)throw new TypeError("parameter 1 is not of type 'string'.")}typeof r>"u"&&(r={ignoreCase:!1});let o,i={ignoreCase:!0===r.ignoreCase},a={pathname:J,protocol:J,username:J,password:J,hostname:J,port:J,search:J,hash:J};for(o of(this.#e=ee(a,e,!0),U(this.#e.protocol)===this.#e.port&&(this.#e.port=""),Q)){if(!(o in this.#e))continue;let e={},t=this.#e[o];switch(this.#r[o]=[],o){case"protocol":Object.assign(e,T),e.encodePart=D;break;case"username":Object.assign(e,T),e.encodePart=z;break;case"password":Object.assign(e,T),e.encodePart=$;break;case"hostname":Object.assign(e,E),L(t)?e.encodePart=B:e.encodePart=q;break;case"port":Object.assign(e,T),e.encodePart=_;break;case"pathname":k(this.#t.protocol)?(Object.assign(e,S,i),e.encodePart=V):(Object.assign(e,T,i),e.encodePart=W);break;case"search":Object.assign(e,T,i),e.encodePart=G;break;case"hash":Object.assign(e,T,i),e.encodePart=X}try{this.#o[o]=m(t,e),this.#t[o]=v(this.#o[o],this.#r[o],e),this.#n[o]=ne(this.#o[o],e),this.#i=this.#i||this.#o[o].some(e=>2===e.type)}catch{throw new TypeError(`invalid ${o} pattern '${this.#e[o]}'.`)}}}catch(e){throw new TypeError(`Failed to construct 'URLPattern': ${e.message}`)}}get[Symbol.toStringTag](){return"URLPattern"}test(e={},t){let r,n={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if("string"!=typeof e&&t)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof e>"u")return!1;try{n=ee(n,"object"==typeof e?e:Y(e,t),!1)}catch{return!1}for(r of Q)if(!this.#t[r].exec(n[r]))return!1;return!0}exec(e={},t){let r={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if("string"!=typeof e&&t)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof e>"u")return;try{r=ee(r,"object"==typeof e?e:Y(e,t),!1)}catch{return null}let n,o={};for(n of(o.inputs=t?[e,t]:[e],Q)){let e=this.#t[n].exec(r[n]);if(!e)return null;let t={};for(let[r,o]of this.#r[n].entries())if("string"==typeof o||"number"==typeof o){let n=e[r+1];t[o]=n}o[n]={input:r[n]??"",groups:t}}return o}static compareComponent(e,t,r){let n=i((e,t)=>{for(let r of["type","modifier","prefix","value","suffix"]){if(e[r]<t[r])return-1;if(e[r]!==t[r])return 1}return 0},"comparePart"),o=new s(3,"","","","",3),a=new s(0,"","","","",3),l=i((e,t)=>{let r=0;for(;r<Math.min(e.length,t.length);++r){let o=n(e[r],t[r]);if(o)return o}return e.length===t.length?0:n(e[r]??o,t[r]??o)},"comparePartList");return t.#n[e]||r.#n[e]?t.#n[e]&&!r.#n[e]?l(t.#o[e],[a]):!t.#n[e]&&r.#n[e]?l([a],r.#o[e]):l(t.#o[e],r.#o[e]):0}get protocol(){return this.#n.protocol}get username(){return this.#n.username}get password(){return this.#n.password}get hostname(){return this.#n.hostname}get port(){return this.#n.port}get pathname(){return this.#n.pathname}get search(){return this.#n.search}get hash(){return this.#n.hash}get hasRegExpGroups(){return this.#i}};return i(oe,"URLPattern"),h}!function(){if(!(Function.prototype.once instanceof Function)){const e=new WeakMap;Function.prototype.once=function(t){const r=this;return function(...n){if(e.has(r))return e.get(r);if("AsyncFunction"===r.constructor.name){const o=r.apply(t||r,n).catch(t=>{throw e.delete(r),t});return e.set(r,o),o}if(r instanceof Function){const o=r.apply(t||r,n);return e.set(r,o),o}}}}}();var w=p(b?g:(b=1,g=function(){if(m)return d;m=1;const{URLPattern:e}=y();return d={URLPattern:e},globalThis.URLPattern||(globalThis.URLPattern=e),d}()));"URLPattern"in globalThis||(globalThis.URLPattern=w),l(URL,"parse",(e,t)=>{try{return new URL(e,t)}catch{return null}}),l(URL,"canParse",(e,t)=>{try{return new URL(e,t)instanceof URL}catch{return!1}}),Number.range instanceof Function||(Number.range=function(e,t,r=1){return console.warn("`Number.range()` is deprecated. Use `Iterator.range()` instead."),globalThis.Iterator.range(e,t,{step:r})});const v="Iterator"in globalThis,T=v?globalThis.Iterator.prototype:Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())),E=v?globalThis.Iterator:(e=>{class t{[Symbol.iterator](){return this}get[Symbol.toStringTag](){return"Iterator"}}return Object.setPrototypeOf(t,e),t})(T);var S;E.range instanceof Function||(E.range=function(e,t,r){if("number"==typeof r||"bigint"==typeof r)return E.range(e,t,{step:r});if("object"!=typeof r||Object.is(r,null))return E.range(e,t,{});{const{step:n=("number"==typeof e?e<t?1:-1:e<t?1n:-1n),inclusive:o=!1}=r;if("number"!=typeof e&&"bigint"!=typeof e)throw new TypeError("Start must be a number");if(Number.isNaN(e))throw new RangeError("Invalid start");if("number"!=typeof t&&"bigint"!=typeof t)throw new TypeError("End must be a number");if(Number.isNaN(t))throw new RangeError("Invalid end");if("number"!=typeof n&&"bigint"!=typeof n)throw new TypeError("Step must be a number");if(Number.isNaN(n))throw new RangeError("Invalid step");if(0===n)throw new RangeError("Step must not be 0");if(n<0&&e<t||n>0&&e>t)return;if(o){let r=e;return n>0?E.from({next(){const e=r<=t?{value:r,done:!1}:{done:!0};return r+=n,e}}):E.from({next(){const e=r>=t?{value:r,done:!1}:{done:!0};return r+=n,e}})}{let r=e;if(n>0)return E.from({next(){const e=r<t?{value:r,done:!1}:{done:!0};return r+=n,e}});{let r=e;return E.from({next(){const e=r>t?{value:r,done:!1}:{done:!0};return r+=n,e}})}}}}),T[Symbol.toStringTag]||(T[Symbol.toStringTag]="Iterator"),T.take instanceof Function||(T.take=function(e){let t=0;const r=this;return E.from({next:()=>t++>=e?{done:!0}:r.next()})}),T.drop instanceof Function||(T.drop=function(e){for(let t=0;t<e;t++){const{done:e}=this.next();if(e)break}return this}),T.toArray instanceof Function||(T.toArray=function(){return Array.from(this)}),T.forEach instanceof Function||(T.forEach=function(e){for(const t of this)e.call(this,t)}),T.flatMap instanceof Function||(T.flatMap=function(e){const t=this;let r=this.next();const n=({value:r,done:n=!0}={})=>n?E.from({next:()=>({done:!0})}):E.from(e.call(t,r));let o=n(r);return E.from({next(){const{value:e,done:i=!0}=o.next();return r.done&&i?{done:!0}:i?r.done?{done:!0}:(r=t.next(),o=n(r),o.next()):{value:e,done:i}}})}),T.map instanceof Function||(T.map=function(e){const t=this;return E.from({next(){const{done:r,value:n}=t.next();return r?{done:r}:{value:e.call(t,n),done:!1}}})}),T.reduce instanceof Function||(T.reduce=function(e,t){let r=void 0===t?this.next().value:t;for(const t of this)r=e.call(this,r,t);return r}),T.filter instanceof Function||(T.filter=function(e){const t=this;let r,n=!1;return E.from({next(){for(;!n;){const o=t.next();if(n=o.done,n)break;if(e.call(t,o.value)){r=o.value;break}}return{done:n,value:r}}})}),T.some instanceof Function||(T.some=function(e){let t=!1;for(const r of this)if(e.call(this,r)){t=!0;break}return t}),T.every instanceof Function||(T.every=function(e){let t=!0;for(const r of this)if(!e.call(this,r)){t=!1;break}return t}),T.find instanceof Function||(T.find=function(e){for(const t of this)if(e.call(this,t))return t}),T.indexed instanceof Function||(T.indexed=function(){let e=0;return this.map(t=>[e++,t])}),T.chunks instanceof Function||(T.chunks=function(e){if(!Number.isSafeInteger(e)||e<1)throw new TypeError("Size must be a positive integer.");{const t=this;let r=!1;return E.from({next(){if(r)return{done:r};{const n=[];let o=0;for(;o++<e&&!r;){const e=t.next();if(e.done){r=!0,void 0!==e.value&&n.push(e.value);break}n.push(e.value)}return{value:n,done:!1}}}})}}),E.from instanceof Function||(E.from=function(e){if("object"!=typeof e||null===e)throw new TypeError("Not an object.");if(e.next instanceof Function){return Object.create(T,{next:{enumerable:!0,configurable:!1,writable:!1,value:(...t)=>e.next(...t)}})}if(e[Symbol.iterator]instanceof Function)return E.from(e[Symbol.iterator]())}),v||(globalThis.Iterator=E),l(ReadableStream,"from",function(e){if(e[Symbol.iterator]instanceof Function)return new ReadableStream({start(t){try{for(const r of e)t.enqueue(r)}catch(e){t.error(e)}finally{t.close()}}});if(e[Symbol.asyncIterator]instanceof Function)return new ReadableStream({async start(t){try{for await(const r of e)t.enqueue(r)}catch(e){t.error(e)}finally{t.close()}}});throw new TypeError("`ReadableStream.from()` requires an iterable source.")}),Number.hasOwnProperty("isSafeInteger")||(Number.MAX_SAFE_INTEGER=2**53-1,Number.MIN_SAFE_INTEGER=-Number.MAX_SAFE_INTEGER,Number.isSafeInteger=e=>e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER),Number.hasOwnProperty("EPSILON")||(Number.EPSILON=2**-52),Math.hasOwnProperty("sign")||(Math.sign=e=>(e>0)-(e<0)||+e),Math.hasOwnProperty("trunc")||(Math.trunc=e=>{const t=e-e%1;return 0===t&&(e<0||0===e&&1/e!=1/0)?-0:t}),Math.hasOwnProperty("expm1")||(Math.expm1=e=>Math.exp(e)-1),Math.hasOwnProperty("hypot")||(Math.hypot=(...e)=>Math.sqrt(e.reduce((e,t)=>e+t**2,0))),Math.hasOwnProperty("cbrt")||(Math.cbrt=e=>e**(1/3)),Math.hasOwnProperty("log10")||(Math.log10=e=>Math.log(e)*Math.LOG10E),Math.hasOwnProperty("log2")||(Math.log2=e=>Math.log(e)*Math.LOG2E),Math.hasOwnProperty("log1p")||(Math.log1p=e=>Math.log(1+e)),Math.hasOwnProperty("fround")||(Math.fround=(S=new Float32Array(1),function(e){return S[0]=e,S[0]})),Math.clamp instanceof Function||(Math.clamp=function(e,t,r){return Math.min(Math.max(e,t),r)}),Math.constrain instanceof Function||(Math.constrain=Math.clamp),Math.sumPrecise instanceof Function||(Math.sumPrecise=function(e){let t=-0;for(const r of e){if(!Number.isFinite(r)){t=-0;break}t+=r}return t}),Math.sum instanceof Function||(Math.sum=function(...e){return console.warn("Math.sum is deprecated. Please use Math.sumPrecise instead."),Math.sumPrecise(e)}),function(){if(!("isSecureContext"in globalThis)){const e=["localhost","127.0.0.1"],t="https:",r=[t,"file:","wss:"],n=(e=globalThis.document)=>[...e.scripts].every(({src:r})=>{if(0===r.length)return!0;{const{protocol:n,hostname:o}=new URL(r,e.baseURI);return n===t||o===location.hostname}});Object.defineProperty(globalThis,"isSecureContext",{enumerable:!0,configurable:!0,get:function(){return window.parent===window&&(!(!r.includes(location.protocol)&&!e.includes(location.hostname))&&n())}})}}();function A(e){return function(e){return e instanceof Function&&"AsyncFunction"===e.constructor.name}(e)||e instanceof Promise}
|
|
2
2
|
/**
|
|
3
3
|
* @copyright 2023 Chris Zuber <admin@kernvalley.us>
|
|
4
4
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Lock
|