(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[71292],{595766:function(t,e){"use strict";e.byteLength=function(t){var e=a(t),i=e[0],r=e[1];return(i+r)*3/4-r},e.toByteArray=function(t){var e,i,n=a(t),o=n[0],h=n[1],l=new s((o+h)*3/4-h),f=0,u=h>0?o-4:o;for(i=0;i<u;i+=4)e=r[t.charCodeAt(i)]<<18|r[t.charCodeAt(i+1)]<<12|r[t.charCodeAt(i+2)]<<6|r[t.charCodeAt(i+3)],l[f++]=e>>16&255,l[f++]=e>>8&255,l[f++]=255&e;return 2===h&&(e=r[t.charCodeAt(i)]<<2|r[t.charCodeAt(i+1)]>>4,l[f++]=255&e),1===h&&(e=r[t.charCodeAt(i)]<<10|r[t.charCodeAt(i+1)]<<4|r[t.charCodeAt(i+2)]>>2,l[f++]=e>>8&255,l[f++]=255&e),l},e.fromByteArray=function(t){for(var e,r=t.length,s=r%3,n=[],o=0,h=r-s;o<h;o+=16383)n.push(function(t,e,r){for(var s,n=[],o=e;o<r;o+=3)n.push(i[(s=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]))>>18&63]+i[s>>12&63]+i[s>>6&63]+i[63&s]);return n.join("")}(t,o,o+16383>h?h:o+16383));return 1===s?n.push(i[(e=t[r-1])>>2]+i[e<<4&63]+"=="):2===s&&n.push(i[(e=(t[r-2]<<8)+t[r-1])>>10]+i[e>>4&63]+i[e<<2&63]+"="),n.join("")};for(var i=[],r=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,h=n.length;o<h;++o)i[o]=n[o],r[n.charCodeAt(o)]=o;function a(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var i=t.indexOf("=");-1===i&&(i=e);var r=i===e?0:4-i%4;return[i,r]}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},600390:function(t,e,i){"use strict";i.d(e,{Jx:function(){return d},cv:function(){return v}});var r=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],s=t=>{let e=0;for(let i=0;i<t.length;i++){let s=t[i];e=83*e+r.indexOf(s)}return e},n=(t,e)=>{var i="";for(let s=1;s<=e;s++)i+=r[Math.floor(Math.floor(t)/Math.pow(83,e-s)%83)];return i},o=t=>{let e=t/255;return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},h=t=>{let e=Math.max(0,Math.min(1,t));return e<=.0031308?Math.trunc(3294.6*e+.5):Math.trunc((1.055*Math.pow(e,.4166666666666667)-.055)*255+.5)},a=t=>t<0?-1:1,l=(t,e)=>a(t)*Math.pow(Math.abs(t),e),f=class extends Error{constructor(t){super(t),this.name="ValidationError",this.message=t}},u=t=>{if(!t||t.length<6)throw new f("The blurhash string must be at least 6 characters");let e=s(t[0]),i=Math.floor(e/9)+1,r=e%9+1;if(t.length!==4+2*r*i)throw new f(`blurhash length mismatch: length is ${t.length} but it should be ${4+2*r*i}`)},c=t=>[o(t>>16),o(t>>8&255),o(255&t)],p=(t,e)=>[l((Math.floor(t/361)-9)/9,2)*e,l((Math.floor(t/19)%19-9)/9,2)*e,l((t%19-9)/9,2)*e],d=(t,e,i,r)=>{u(t),r|=1;let n=s(t[0]),o=Math.floor(n/9)+1,a=n%9+1,l=(s(t[1])+1)/166,f=Array(a*o);for(let e=0;e<f.length;e++)if(0===e){let i=s(t.substring(2,6));f[e]=c(i)}else{let i=s(t.substring(4+2*e,6+2*e));f[e]=p(i,l*r)}let d=4*e,g=new Uint8ClampedArray(d*i);for(let t=0;t<i;t++)for(let r=0;r<e;r++){let s=0,n=0,l=0;for(let h=0;h<o;h++)for(let o=0;o<a;o++){let u=Math.cos(Math.PI*r*o/e)*Math.cos(Math.PI*t*h/i),c=f[o+h*a];s+=c[0]*u,n+=c[1]*u,l+=c[2]*u}let u=h(s),c=h(n),p=h(l);g[4*r+0+t*d]=u,g[4*r+1+t*d]=c,g[4*r+2+t*d]=p,g[4*r+3+t*d]=255}return g},g=(t,e,i,r)=>{let s=0,n=0,h=0,a=4*e;for(let l=0;l<e;l++){let e=4*l;for(let f=0;f<i;f++){let i=e+f*a,u=r(l,f);s+=u*o(t[i]),n+=u*o(t[i+1]),h+=u*o(t[i+2])}}let l=1/(e*i);return[s*l,n*l,h*l]},y=t=>(h(t[0])<<16)+(h(t[1])<<8)+h(t[2]),m=(t,e)=>361*Math.floor(Math.max(0,Math.min(18,Math.floor(9*l(t[0]/e,.5)+9.5))))+19*Math.floor(Math.max(0,Math.min(18,Math.floor(9*l(t[1]/e,.5)+9.5))))+Math.floor(Math.max(0,Math.min(18,Math.floor(9*l(t[2]/e,.5)+9.5)))),v=(t,e,i,r,s)=>{let o;if(r<1||r>9||s<1||s>9)throw new f("BlurHash must have between 1 and 9 components");if(e*i*4!==t.length)throw new f("Width and height must match the pixels array");let h=[];for(let n=0;n<s;n++)for(let s=0;s<r;s++){let r=0==s&&0==n?1:2,o=g(t,e,i,(t,o)=>r*Math.cos(Math.PI*s*t/e)*Math.cos(Math.PI*n*o/i));h.push(o)}let a=h[0],l=h.slice(1),u="";if(u+=n(r-1+(s-1)*9,1),l.length>0){let t=Math.floor(Math.max(0,Math.min(82,Math.floor(166*Math.max(...l.map(t=>Math.max(...t)))-.5))));o=(t+1)/166,u+=n(t,1)}else o=1,u+=n(0,1);return u+=n(y(a),4),l.forEach(t=>{u+=n(m(t,o),2)}),u}},348834:function(t,e,i){"use strict";let r=i(595766),s=i(462333),n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(t){if(t>2147483647)throw RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,h.prototype),e}function h(t,e,i){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return f(t)}return a(t,e,i)}function a(t,e,i){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!h.isEncoding(e))throw TypeError("Unknown encoding: "+e);let i=0|d(t,e),r=o(i),s=r.write(t,e);return s!==i&&(r=r.slice(0,s)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(C(t,Uint8Array)){let e=new Uint8Array(t);return c(e.buffer,e.byteOffset,e.byteLength)}return u(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(C(t,ArrayBuffer)||t&&C(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(C(t,SharedArrayBuffer)||t&&C(t.buffer,SharedArrayBuffer)))return c(t,e,i);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');let r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return h.from(r,e,i);let s=function(t){var e;if(h.isBuffer(t)){let e=0|p(t.length),i=o(e);return 0===i.length||t.copy(i,0,0,e),i}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?o(0):u(t):"Buffer"===t.type&&Array.isArray(t.data)?u(t.data):void 0}(t);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return h.from(t[Symbol.toPrimitive]("string"),e,i);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return l(t),o(t<0?0:0|p(t))}function u(t){let e=t.length<0?0:0|p(t.length),i=o(e);for(let r=0;r<e;r+=1)i[r]=255&t[r];return i}function c(t,e,i){let r;if(e<0||t.byteLength<e)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(i||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(r=void 0===e&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,e):new Uint8Array(t,e,i),h.prototype),r}function p(t){if(t>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function d(t,e){if(h.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||C(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let i=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===i)return 0;let s=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return O(t).length;default:if(s)return r?-1:U(t).length;e=(""+e).toLowerCase(),s=!0}}function g(t,e,i){let s=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===i||i>this.length)&&(i=this.length),i<=0||(i>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,i){let r=t.length;(!e||e<0)&&(e=0),(!i||i<0||i>r)&&(i=r);let s="";for(let r=e;r<i;++r)s+=D[t[r]];return s}(this,e,i);case"utf8":case"utf-8":return b(this,e,i);case"ascii":return function(t,e,i){let r="";i=Math.min(t.length,i);for(let s=e;s<i;++s)r+=String.fromCharCode(127&t[s]);return r}(this,e,i);case"latin1":case"binary":return function(t,e,i){let r="";i=Math.min(t.length,i);for(let s=e;s<i;++s)r+=String.fromCharCode(t[s]);return r}(this,e,i);case"base64":var n,o;return n=e,o=i,0===n&&o===this.length?r.fromByteArray(this):r.fromByteArray(this.slice(n,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,i){let r=t.slice(e,i),s="";for(let t=0;t<r.length-1;t+=2)s+=String.fromCharCode(r[t]+256*r[t+1]);return s}(this,e,i);default:if(s)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),s=!0}}function y(t,e,i){let r=t[e];t[e]=t[i],t[i]=r}function m(t,e,i,r,s){var n;if(0===t.length)return -1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),(n=i=+i)!=n&&(i=s?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(s)return -1;i=t.length-1}else if(i<0){if(!s)return -1;i=0}if("string"==typeof e&&(e=h.from(e,r)),h.isBuffer(e))return 0===e.length?-1:v(t,e,i,r,s);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?s?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):v(t,[e],i,r,s);throw TypeError("val must be string, number or Buffer")}function v(t,e,i,r,s){let n,o=1,h=t.length,a=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return -1;o=2,h/=2,a/=2,i/=2}function l(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(s){let r=-1;for(n=i;n<h;n++)if(l(t,n)===l(e,-1===r?0:n-r)){if(-1===r&&(r=n),n-r+1===a)return r*o}else -1!==r&&(n-=n-r),r=-1}else for(i+a>h&&(i=h-a),n=i;n>=0;n--){let i=!0;for(let r=0;r<a;r++)if(l(t,n+r)!==l(e,r)){i=!1;break}if(i)return n}return -1}function b(t,e,i){i=Math.min(t.length,i);let r=[],s=e;for(;s<i;){let e=t[s],n=null,o=e>239?4:e>223?3:e>191?2:1;if(s+o<=i){let i,r,h,a;switch(o){case 1:e<128&&(n=e);break;case 2:(192&(i=t[s+1]))==128&&(a=(31&e)<<6|63&i)>127&&(n=a);break;case 3:i=t[s+1],r=t[s+2],(192&i)==128&&(192&r)==128&&(a=(15&e)<<12|(63&i)<<6|63&r)>2047&&(a<55296||a>57343)&&(n=a);break;case 4:i=t[s+1],r=t[s+2],h=t[s+3],(192&i)==128&&(192&r)==128&&(192&h)==128&&(a=(15&e)<<18|(63&i)<<12|(63&r)<<6|63&h)>65535&&a<1114112&&(n=a)}}null===n?(n=65533,o=1):n>65535&&(n-=65536,r.push(n>>>10&1023|55296),n=56320|1023&n),r.push(n),s+=o}return function(t){let e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);let i="",r=0;for(;r<e;)i+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return i}(r)}function w(t,e,i){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>i)throw RangeError("Trying to access beyond buffer length")}function E(t,e,i,r,s,n){if(!h.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>s||e<n)throw RangeError('"value" argument is out of bounds');if(i+r>t.length)throw RangeError("Index out of range")}function A(t,e,i,r,s){z(e,r,s,t,i,7);let n=Number(e&BigInt(4294967295));t[i++]=n,n>>=8,t[i++]=n,n>>=8,t[i++]=n,n>>=8,t[i++]=n;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[i++]=o,o>>=8,t[i++]=o,o>>=8,t[i++]=o,o>>=8,t[i++]=o,i}function B(t,e,i,r,s){z(e,r,s,t,i,7);let n=Number(e&BigInt(4294967295));t[i+7]=n,n>>=8,t[i+6]=n,n>>=8,t[i+5]=n,n>>=8,t[i+4]=n;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[i+3]=o,o>>=8,t[i+2]=o,o>>=8,t[i+1]=o,o>>=8,t[i]=o,i+8}function L(t,e,i,r,s,n){if(i+r>t.length||i<0)throw RangeError("Index out of range")}function S(t,e,i,r,n){return e=+e,i>>>=0,n||L(t,e,i,4,34028234663852886e22,-34028234663852886e22),s.write(t,e,i,r,23,4),i+4}function T(t,e,i,r,n){return e=+e,i>>>=0,n||L(t,e,i,8,17976931348623157e292,-17976931348623157e292),s.write(t,e,i,r,52,8),i+8}e.lW=h,e.h2=50,h.TYPED_ARRAY_SUPPORT=function(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),h.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),h.poolSize=8192,h.from=function(t,e,i){return a(t,e,i)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array),h.alloc=function(t,e,i){return(l(t),t<=0)?o(t):void 0!==e?"string"==typeof i?o(t).fill(e,i):o(t).fill(e):o(t)},h.allocUnsafe=function(t){return f(t)},h.allocUnsafeSlow=function(t){return f(t)},h.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==h.prototype},h.compare=function(t,e){if(C(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),C(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(t)||!h.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let i=t.length,r=e.length;for(let s=0,n=Math.min(i,r);s<n;++s)if(t[s]!==e[s]){i=t[s],r=e[s];break}return i<r?-1:r<i?1:0},h.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(t,e){let i;if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return h.alloc(0);if(void 0===e)for(i=0,e=0;i<t.length;++i)e+=t[i].length;let r=h.allocUnsafe(e),s=0;for(i=0;i<t.length;++i){let e=t[i];if(C(e,Uint8Array))s+e.length>r.length?(h.isBuffer(e)||(e=h.from(e)),e.copy(r,s)):Uint8Array.prototype.set.call(r,e,s);else if(h.isBuffer(e))e.copy(r,s);else throw TypeError('"list" argument must be an Array of Buffers');s+=e.length}return r},h.byteLength=d,h.prototype._isBuffer=!0,h.prototype.swap16=function(){let t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)y(this,e,e+1);return this},h.prototype.swap32=function(){let t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},h.prototype.swap64=function(){let t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},h.prototype.toString=function(){let t=this.length;return 0===t?"":0==arguments.length?b(this,0,t):g.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(t){if(!h.isBuffer(t))throw TypeError("Argument must be a Buffer");return this===t||0===h.compare(this,t)},h.prototype.inspect=function(){let t="",i=e.h2;return t=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(t+=" ... "),"<Buffer "+t+">"},n&&(h.prototype[n]=h.prototype.inspect),h.prototype.compare=function(t,e,i,r,s){if(C(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===i&&(i=t?t.length:0),void 0===r&&(r=0),void 0===s&&(s=this.length),e<0||i>t.length||r<0||s>this.length)throw RangeError("out of range index");if(r>=s&&e>=i)return 0;if(r>=s)return -1;if(e>=i)return 1;if(e>>>=0,i>>>=0,r>>>=0,s>>>=0,this===t)return 0;let n=s-r,o=i-e,a=Math.min(n,o),l=this.slice(r,s),f=t.slice(e,i);for(let t=0;t<a;++t)if(l[t]!==f[t]){n=l[t],o=f[t];break}return n<o?-1:o<n?1:0},h.prototype.includes=function(t,e,i){return -1!==this.indexOf(t,e,i)},h.prototype.indexOf=function(t,e,i){return m(this,t,e,i,!0)},h.prototype.lastIndexOf=function(t,e,i){return m(this,t,e,i,!1)},h.prototype.write=function(t,e,i,r){var s,n,o,h,a,l,f,u;if(void 0===e)r="utf8",i=this.length,e=0;else if(void 0===i&&"string"==typeof e)r=e,i=this.length,e=0;else if(isFinite(e))e>>>=0,isFinite(i)?(i>>>=0,void 0===r&&(r="utf8")):(r=i,i=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let c=this.length-e;if((void 0===i||i>c)&&(i=c),t.length>0&&(i<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let p=!1;for(;;)switch(r){case"hex":return function(t,e,i,r){let s;i=Number(i)||0;let n=t.length-i;r?(r=Number(r))>n&&(r=n):r=n;let o=e.length;for(r>o/2&&(r=o/2),s=0;s<r;++s){let r=parseInt(e.substr(2*s,2),16);if(r!=r)break;t[i+s]=r}return s}(this,t,e,i);case"utf8":case"utf-8":return s=e,n=i,R(U(t,this.length-s),this,s,n);case"ascii":case"latin1":case"binary":return o=e,h=i,R(function(t){let e=[];for(let i=0;i<t.length;++i)e.push(255&t.charCodeAt(i));return e}(t),this,o,h);case"base64":return a=e,l=i,R(O(t),this,a,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f=e,u=i,R(function(t,e){let i,r;let s=[];for(let n=0;n<t.length&&!((e-=2)<0);++n)r=(i=t.charCodeAt(n))>>8,s.push(i%256),s.push(r);return s}(t,this.length-f),this,f,u);default:if(p)throw TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),p=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},h.prototype.slice=function(t,e){let i=this.length;t=~~t,e=void 0===e?i:~~e,t<0?(t+=i)<0&&(t=0):t>i&&(t=i),e<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<t&&(e=t);let r=this.subarray(t,e);return Object.setPrototypeOf(r,h.prototype),r},h.prototype.readUintLE=h.prototype.readUIntLE=function(t,e,i){t>>>=0,e>>>=0,i||w(t,e,this.length);let r=this[t],s=1,n=0;for(;++n<e&&(s*=256);)r+=this[t+n]*s;return r},h.prototype.readUintBE=h.prototype.readUIntBE=function(t,e,i){t>>>=0,e>>>=0,i||w(t,e,this.length);let r=this[t+--e],s=1;for(;e>0&&(s*=256);)r+=this[t+--e]*s;return r},h.prototype.readUint8=h.prototype.readUInt8=function(t,e){return t>>>=0,e||w(t,1,this.length),this[t]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(t,e){return t>>>=0,e||w(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(t,e){return t>>>=0,e||w(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(t,e){return t>>>=0,e||w(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(t,e){return t>>>=0,e||w(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readBigUInt64LE=N(function(t){k(t>>>=0,"offset");let e=this[t],i=this[t+7];(void 0===e||void 0===i)&&M(t,this.length-8);let r=e+256*this[++t]+65536*this[++t]+16777216*this[++t],s=this[++t]+256*this[++t]+65536*this[++t]+16777216*i;return BigInt(r)+(BigInt(s)<<BigInt(32))}),h.prototype.readBigUInt64BE=N(function(t){k(t>>>=0,"offset");let e=this[t],i=this[t+7];(void 0===e||void 0===i)&&M(t,this.length-8);let r=16777216*e+65536*this[++t]+256*this[++t]+this[++t],s=16777216*this[++t]+65536*this[++t]+256*this[++t]+i;return(BigInt(r)<<BigInt(32))+BigInt(s)}),h.prototype.readIntLE=function(t,e,i){t>>>=0,e>>>=0,i||w(t,e,this.length);let r=this[t],s=1,n=0;for(;++n<e&&(s*=256);)r+=this[t+n]*s;return r>=(s*=128)&&(r-=Math.pow(2,8*e)),r},h.prototype.readIntBE=function(t,e,i){t>>>=0,e>>>=0,i||w(t,e,this.length);let r=e,s=1,n=this[t+--r];for(;r>0&&(s*=256);)n+=this[t+--r]*s;return n>=(s*=128)&&(n-=Math.pow(2,8*e)),n},h.prototype.readInt8=function(t,e){return(t>>>=0,e||w(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},h.prototype.readInt16LE=function(t,e){t>>>=0,e||w(t,2,this.length);let i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},h.prototype.readInt16BE=function(t,e){t>>>=0,e||w(t,2,this.length);let i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},h.prototype.readInt32LE=function(t,e){return t>>>=0,e||w(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,e){return t>>>=0,e||w(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readBigInt64LE=N(function(t){k(t>>>=0,"offset");let e=this[t],i=this[t+7];return(void 0===e||void 0===i)&&M(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(i<<24))<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+16777216*this[++t])}),h.prototype.readBigInt64BE=N(function(t){k(t>>>=0,"offset");let e=this[t],i=this[t+7];return(void 0===e||void 0===i)&&M(t,this.length-8),(BigInt((e<<24)+65536*this[++t]+256*this[++t]+this[++t])<<BigInt(32))+BigInt(16777216*this[++t]+65536*this[++t]+256*this[++t]+i)}),h.prototype.readFloatLE=function(t,e){return t>>>=0,e||w(t,4,this.length),s.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,e){return t>>>=0,e||w(t,4,this.length),s.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,e){return t>>>=0,e||w(t,8,this.length),s.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,e){return t>>>=0,e||w(t,8,this.length),s.read(this,t,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(t,e,i,r){if(t=+t,e>>>=0,i>>>=0,!r){let r=Math.pow(2,8*i)-1;E(this,t,e,i,r,0)}let s=1,n=0;for(this[e]=255&t;++n<i&&(s*=256);)this[e+n]=t/s&255;return e+i},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(t,e,i,r){if(t=+t,e>>>=0,i>>>=0,!r){let r=Math.pow(2,8*i)-1;E(this,t,e,i,r,0)}let s=i-1,n=1;for(this[e+s]=255&t;--s>=0&&(n*=256);)this[e+s]=t/n&255;return e+i},h.prototype.writeUint8=h.prototype.writeUInt8=function(t,e,i){return t=+t,e>>>=0,i||E(this,t,e,1,255,0),this[e]=255&t,e+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(t,e,i){return t=+t,e>>>=0,i||E(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(t,e,i){return t=+t,e>>>=0,i||E(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(t,e,i){return t=+t,e>>>=0,i||E(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(t,e,i){return t=+t,e>>>=0,i||E(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeBigUInt64LE=N(function(t,e=0){return A(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=N(function(t,e=0){return B(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(t,e,i,r){if(t=+t,e>>>=0,!r){let r=Math.pow(2,8*i-1);E(this,t,e,i,r-1,-r)}let s=0,n=1,o=0;for(this[e]=255&t;++s<i&&(n*=256);)t<0&&0===o&&0!==this[e+s-1]&&(o=1),this[e+s]=(t/n>>0)-o&255;return e+i},h.prototype.writeIntBE=function(t,e,i,r){if(t=+t,e>>>=0,!r){let r=Math.pow(2,8*i-1);E(this,t,e,i,r-1,-r)}let s=i-1,n=1,o=0;for(this[e+s]=255&t;--s>=0&&(n*=256);)t<0&&0===o&&0!==this[e+s+1]&&(o=1),this[e+s]=(t/n>>0)-o&255;return e+i},h.prototype.writeInt8=function(t,e,i){return t=+t,e>>>=0,i||E(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},h.prototype.writeInt16LE=function(t,e,i){return t=+t,e>>>=0,i||E(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeInt16BE=function(t,e,i){return t=+t,e>>>=0,i||E(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeInt32LE=function(t,e,i){return t=+t,e>>>=0,i||E(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},h.prototype.writeInt32BE=function(t,e,i){return t=+t,e>>>=0,i||E(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeBigInt64LE=N(function(t,e=0){return A(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=N(function(t,e=0){return B(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeFloatLE=function(t,e,i){return S(this,t,e,!0,i)},h.prototype.writeFloatBE=function(t,e,i){return S(this,t,e,!1,i)},h.prototype.writeDoubleLE=function(t,e,i){return T(this,t,e,!0,i)},h.prototype.writeDoubleBE=function(t,e,i){return T(this,t,e,!1,i)},h.prototype.copy=function(t,e,i,r){if(!h.isBuffer(t))throw TypeError("argument should be a Buffer");if(i||(i=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<i&&(r=i),r===i||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw RangeError("Index out of range");if(r<0)throw RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-i&&(r=t.length-e+i);let s=r-i;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,i,r):Uint8Array.prototype.set.call(t,this.subarray(i,r),e),s},h.prototype.fill=function(t,e,i,r){let s;if("string"==typeof t){if("string"==typeof e?(r=e,e=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),void 0!==r&&"string"!=typeof r)throw TypeError("encoding must be a string");if("string"==typeof r&&!h.isEncoding(r))throw TypeError("Unknown encoding: "+r);if(1===t.length){let e=t.charCodeAt(0);("utf8"===r&&e<128||"latin1"===r)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<i)throw RangeError("Out of range index");if(i<=e)return this;if(e>>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(s=e;s<i;++s)this[s]=t;else{let n=h.isBuffer(t)?t:h.from(t,r),o=n.length;if(0===o)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(s=0;s<i-e;++s)this[s+e]=n[s%o]}return this};let _={};function x(t,e,i){_[t]=class extends i{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function I(t){let e="",i=t.length,r="-"===t[0]?1:0;for(;i>=r+4;i-=3)e=`_${t.slice(i-3,i)}${e}`;return`${t.slice(0,i)}${e}`}function z(t,e,i,r,s,n){if(t>i||t<e){let r;let s="bigint"==typeof e?"n":"";throw r=n>3?0===e||e===BigInt(0)?`>= 0${s} and < 2${s} ** ${(n+1)*8}${s}`:`>= -(2${s} ** ${(n+1)*8-1}${s}) and < 2 ** ${(n+1)*8-1}${s}`:`>= ${e}${s} and <= ${i}${s}`,new _.ERR_OUT_OF_RANGE("value",r,t)}k(s,"offset"),(void 0===r[s]||void 0===r[s+n])&&M(s,r.length-(n+1))}function k(t,e){if("number"!=typeof t)throw new _.ERR_INVALID_ARG_TYPE(e,"number",t)}function M(t,e,i){if(Math.floor(t)!==t)throw k(t,i),new _.ERR_OUT_OF_RANGE(i||"offset","an integer",t);if(e<0)throw new _.ERR_BUFFER_OUT_OF_BOUNDS;throw new _.ERR_OUT_OF_RANGE(i||"offset",`>= ${i?1:0} and <= ${e}`,t)}x("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),x("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),x("ERR_OUT_OF_RANGE",function(t,e,i){let r=`The value of "${t}" is out of range.`,s=i;return Number.isInteger(i)&&Math.abs(i)>4294967296?s=I(String(i)):"bigint"==typeof i&&(s=String(i),(i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))&&(s=I(s)),s+="n"),r+=` It must be ${e}. Received ${s}`},RangeError);let F=/[^+/0-9A-Za-z-_]/g;function U(t,e){let i;e=e||1/0;let r=t.length,s=null,n=[];for(let o=0;o<r;++o){if((i=t.charCodeAt(o))>55295&&i<57344){if(!s){if(i>56319||o+1===r){(e-=3)>-1&&n.push(239,191,189);continue}s=i;continue}if(i<56320){(e-=3)>-1&&n.push(239,191,189),s=i;continue}i=(s-55296<<10|i-56320)+65536}else s&&(e-=3)>-1&&n.push(239,191,189);if(s=null,i<128){if((e-=1)<0)break;n.push(i)}else if(i<2048){if((e-=2)<0)break;n.push(i>>6|192,63&i|128)}else if(i<65536){if((e-=3)<0)break;n.push(i>>12|224,i>>6&63|128,63&i|128)}else if(i<1114112){if((e-=4)<0)break;n.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else throw Error("Invalid code point")}return n}function O(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function R(t,e,i,r){let s;for(s=0;s<r&&!(s+i>=e.length)&&!(s>=t.length);++s)e[s+i]=t[s];return s}function C(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}let D=function(){let t="0123456789abcdef",e=Array(256);for(let i=0;i<16;++i){let r=16*i;for(let s=0;s<16;++s)e[r+s]=t[i]+t[s]}return e}();function N(t){return"undefined"==typeof BigInt?W:t}function W(){throw Error("BigInt not supported")}},462333:function(t,e){e.read=function(t,e,i,r,s){var n,o,h=8*s-r-1,a=(1<<h)-1,l=a>>1,f=-7,u=i?s-1:0,c=i?-1:1,p=t[e+u];for(u+=c,n=p&(1<<-f)-1,p>>=-f,f+=h;f>0;n=256*n+t[e+u],u+=c,f-=8);for(o=n&(1<<-f)-1,n>>=-f,f+=r;f>0;o=256*o+t[e+u],u+=c,f-=8);if(0===n)n=1-l;else{if(n===a)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),n-=l}return(p?-1:1)*o*Math.pow(2,n-r)},e.write=function(t,e,i,r,s,n){var o,h,a,l=8*n-s-1,f=(1<<l)-1,u=f>>1,c=23===s?5960464477539062e-23:0,p=r?0:n-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(isNaN(e=Math.abs(e))||e===1/0?(h=isNaN(e)?1:0,o=f):(o=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-o))<1&&(o--,a*=2),o+u>=1?e+=c/a:e+=c*Math.pow(2,1-u),e*a>=2&&(o++,a/=2),o+u>=f?(h=0,o=f):o+u>=1?(h=(e*a-1)*Math.pow(2,s),o+=u):(h=e*Math.pow(2,u-1)*Math.pow(2,s),o=0));s>=8;t[i+p]=255&h,p+=d,h/=256,s-=8);for(o=o<<s|h,l+=s;l>0;t[i+p]=255&o,p+=d,o/=256,l-=8);t[i+p-d]|=128*g}},680537:function(t,e,i){var r=i(853366),s=i(315125);t.exports=function(t){return"number"==typeof t||s(t)&&"[object Number]"==r(t)}},834406:function(t){var e,i,r,s=t.exports={};function n(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function h(t){if(e===setTimeout)return setTimeout(t,0);if((e===n||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(i){try{return e.call(null,t,0)}catch(i){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:n}catch(t){e=n}try{i="function"==typeof clearTimeout?clearTimeout:o}catch(t){i=o}}();var a=[],l=!1,f=-1;function u(){l&&r&&(l=!1,r.length?a=r.concat(a):f=-1,a.length&&c())}function c(){if(!l){var t=h(u);l=!0;for(var e=a.length;e;){for(r=a,a=[];++f<e;)r&&r[f].run();f=-1,e=a.length}r=null,l=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===o||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function d(){}s.nextTick=function(t){var e=Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];a.push(new p(t,e)),1!==a.length||l||h(c)},p.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=d,s.addListener=d,s.once=d,s.off=d,s.removeListener=d,s.removeAllListeners=d,s.emit=d,s.prependListener=d,s.prependOnceListener=d,s.listeners=function(t){return[]},s.binding=function(t){throw Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(t){throw Error("process.chdir is not supported")},s.umask=function(){return 0}},5410:function(t,e,i){"use strict";i.d(e,{z:function(){return g}});var r=i(834406);let s="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,n=new Set,o="object"==typeof r&&r?r:{},h=(t,e,i,r)=>{"function"==typeof o.emitWarning?o.emitWarning(t,e,i,r):console.error(`[${i}] ${e}: ${t}`)},a=globalThis.AbortController,l=globalThis.AbortSignal;if(void 0===a){l=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(t,e){this._onabort.push(e)}},a=class{constructor(){e()}signal=new l;abort(t){if(!this.signal.aborted){for(let e of(this.signal.reason=t,this.signal.aborted=!0,this.signal._onabort))e(t);this.signal.onabort?.(t)}}};let t=o.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,h("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}let f=t=>!n.has(t);Symbol("type");let u=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),c=t=>u(t)?t<=256?Uint8Array:t<=65536?Uint16Array:t<=4294967296?Uint32Array:t<=Number.MAX_SAFE_INTEGER?p:null:null;class p extends Array{constructor(t){super(t),this.fill(0)}}class d{heap;length;static #t=!1;static create(t){let e=c(t);if(!e)return[];d.#t=!0;let i=new d(t,e);return d.#t=!1,i}constructor(t,e){if(!d.#t)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class g{#e;#i;#r;#s;#n;#o;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#h;#a;#l;#f;#u;#c;#p;#d;#g;#y;#m;#v;#b;#w;#E;#A;#B;static unsafeExposeInternals(t){return{starts:t.#b,ttls:t.#w,sizes:t.#v,keyMap:t.#l,keyList:t.#f,valList:t.#u,next:t.#c,prev:t.#p,get head(){return t.#d},get tail(){return t.#g},free:t.#y,isBackgroundFetch:e=>t.#L(e),backgroundFetch:(e,i,r,s)=>t.#S(e,i,r,s),moveToTail:e=>t.#T(e),indexes:e=>t.#_(e),rindexes:e=>t.#x(e),isStale:e=>t.#I(e)}}get max(){return this.#e}get maxSize(){return this.#i}get calculatedSize(){return this.#a}get size(){return this.#h}get fetchMethod(){return this.#n}get memoMethod(){return this.#o}get dispose(){return this.#r}get disposeAfter(){return this.#s}constructor(t){let{max:e=0,ttl:i,ttlResolution:r=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:p,disposeAfter:y,noDisposeOnSet:m,noUpdateTTL:v,maxSize:b=0,maxEntrySize:w=0,sizeCalculation:E,fetchMethod:A,memoMethod:B,noDeleteOnFetchRejection:L,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:_,ignoreFetchAbort:x}=t;if(0!==e&&!u(e))throw TypeError("max option must be a nonnegative integer");let I=e?c(e):Array;if(!I)throw Error("invalid max value: "+e);if(this.#e=e,this.#i=b,this.maxEntrySize=w||this.#i,this.sizeCalculation=E,this.sizeCalculation){if(!this.#i&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw TypeError("sizeCalculation set to non-function")}if(void 0!==B&&"function"!=typeof B)throw TypeError("memoMethod must be a function if defined");if(this.#o=B,void 0!==A&&"function"!=typeof A)throw TypeError("fetchMethod must be a function if specified");if(this.#n=A,this.#A=!!A,this.#l=new Map,this.#f=Array(e).fill(void 0),this.#u=Array(e).fill(void 0),this.#c=new I(e),this.#p=new I(e),this.#d=0,this.#g=0,this.#y=d.create(e),this.#h=0,this.#a=0,"function"==typeof p&&(this.#r=p),"function"==typeof y?(this.#s=y,this.#m=[]):(this.#s=void 0,this.#m=void 0),this.#E=!!this.#r,this.#B=!!this.#s,this.noDisposeOnSet=!!m,this.noUpdateTTL=!!v,this.noDeleteOnFetchRejection=!!L,this.allowStaleOnFetchRejection=!!T,this.allowStaleOnFetchAbort=!!_,this.ignoreFetchAbort=!!x,0!==this.maxEntrySize){if(0!==this.#i&&!u(this.#i))throw TypeError("maxSize must be a positive integer if specified");if(!u(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#z()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=u(r)||0===r?r:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!u(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#k()}if(0===this.#e&&0===this.ttl&&0===this.#i)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#i){let t="LRU_CACHE_UNBOUNDED";f(t)&&(n.add(t),h("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,g))}}getRemainingTTL(t){return this.#l.has(t)?1/0:0}#k(){let t=new p(this.#e),e=new p(this.#e);this.#w=t,this.#b=e,this.#M=(i,r,n=s.now())=>{if(e[i]=0!==r?n:0,t[i]=r,0!==r&&this.ttlAutopurge){let t=setTimeout(()=>{this.#I(i)&&this.#F(this.#f[i],"expire")},r+1);t.unref&&t.unref()}},this.#U=i=>{e[i]=0!==t[i]?s.now():0},this.#O=(s,n)=>{if(t[n]){let o=t[n],h=e[n];if(!o||!h)return;s.ttl=o,s.start=h,s.now=i||r();let a=s.now-h;s.remainingTTL=o-a}};let i=0,r=()=>{let t=s.now();if(this.ttlResolution>0){i=t;let e=setTimeout(()=>i=0,this.ttlResolution);e.unref&&e.unref()}return t};this.getRemainingTTL=s=>{let n=this.#l.get(s);if(void 0===n)return 0;let o=t[n],h=e[n];return o&&h?o-((i||r())-h):1/0},this.#I=s=>{let n=e[s],o=t[s];return!!o&&!!n&&(i||r())-n>o}}#U=()=>{};#O=()=>{};#M=()=>{};#I=()=>!1;#z(){let t=new p(this.#e);this.#a=0,this.#v=t,this.#R=e=>{this.#a-=t[e],t[e]=0},this.#C=(t,e,i,r)=>{if(this.#L(e))return 0;if(!u(i)){if(r){if("function"!=typeof r)throw TypeError("sizeCalculation must be a function");if(!u(i=r(e,t)))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return i},this.#D=(e,i,r)=>{if(t[e]=i,this.#i){let i=this.#i-t[e];for(;this.#a>i;)this.#N(!0)}this.#a+=t[e],r&&(r.entrySize=i,r.totalCalculatedSize=this.#a)}}#R=t=>{};#D=(t,e,i)=>{};#C=(t,e,i,r)=>{if(i||r)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#_({allowStale:t=this.allowStale}={}){if(this.#h)for(let e=this.#g;this.#W(e)&&((t||!this.#I(e))&&(yield e),e!==this.#d);)e=this.#p[e]}*#x({allowStale:t=this.allowStale}={}){if(this.#h)for(let e=this.#d;this.#W(e)&&((t||!this.#I(e))&&(yield e),e!==this.#g);)e=this.#c[e]}#W(t){return void 0!==t&&this.#l.get(this.#f[t])===t}*entries(){for(let t of this.#_())void 0===this.#u[t]||void 0===this.#f[t]||this.#L(this.#u[t])||(yield[this.#f[t],this.#u[t]])}*rentries(){for(let t of this.#x())void 0===this.#u[t]||void 0===this.#f[t]||this.#L(this.#u[t])||(yield[this.#f[t],this.#u[t]])}*keys(){for(let t of this.#_()){let e=this.#f[t];void 0===e||this.#L(this.#u[t])||(yield e)}}*rkeys(){for(let t of this.#x()){let e=this.#f[t];void 0===e||this.#L(this.#u[t])||(yield e)}}*values(){for(let t of this.#_())void 0===this.#u[t]||this.#L(this.#u[t])||(yield this.#u[t])}*rvalues(){for(let t of this.#x())void 0===this.#u[t]||this.#L(this.#u[t])||(yield this.#u[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#_()){let r=this.#u[i],s=this.#L(r)?r.__staleWhileFetching:r;if(void 0!==s&&t(s,this.#f[i],this))return this.get(this.#f[i],e)}}forEach(t,e=this){for(let i of this.#_()){let r=this.#u[i],s=this.#L(r)?r.__staleWhileFetching:r;void 0!==s&&t.call(e,s,this.#f[i],this)}}rforEach(t,e=this){for(let i of this.#x()){let r=this.#u[i],s=this.#L(r)?r.__staleWhileFetching:r;void 0!==s&&t.call(e,s,this.#f[i],this)}}purgeStale(){let t=!1;for(let e of this.#x({allowStale:!0}))this.#I(e)&&(this.#F(this.#f[e],"expire"),t=!0);return t}info(t){let e=this.#l.get(t);if(void 0===e)return;let i=this.#u[e],r=this.#L(i)?i.__staleWhileFetching:i;if(void 0===r)return;let n={value:r};if(this.#w&&this.#b){let t=this.#w[e],i=this.#b[e];if(t&&i){let e=t-(s.now()-i);n.ttl=e,n.start=Date.now()}}return this.#v&&(n.size=this.#v[e]),n}dump(){let t=[];for(let e of this.#_({allowStale:!0})){let i=this.#f[e],r=this.#u[e],n=this.#L(r)?r.__staleWhileFetching:r;if(void 0===n||void 0===i)continue;let o={value:n};if(this.#w&&this.#b){o.ttl=this.#w[e];let t=s.now()-this.#b[e];o.start=Math.floor(Date.now()-t)}this.#v&&(o.size=this.#v[e]),t.unshift([i,o])}return t}load(t){for(let[e,i]of(this.clear(),t)){if(i.start){let t=Date.now()-i.start;i.start=s.now()-t}this.set(e,i.value,i)}}set(t,e,i={}){if(void 0===e)return this.delete(t),this;let{ttl:r=this.ttl,start:s,noDisposeOnSet:n=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:h}=i,{noUpdateTTL:a=this.noUpdateTTL}=i,l=this.#C(t,e,i.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize)return h&&(h.set="miss",h.maxEntrySizeExceeded=!0),this.#F(t,"set"),this;let f=0===this.#h?void 0:this.#l.get(t);if(void 0===f)f=0===this.#h?this.#g:0!==this.#y.length?this.#y.pop():this.#h===this.#e?this.#N(!1):this.#h,this.#f[f]=t,this.#u[f]=e,this.#l.set(t,f),this.#c[this.#g]=f,this.#p[f]=this.#g,this.#g=f,this.#h++,this.#D(f,l,h),h&&(h.set="add"),a=!1;else{this.#T(f);let i=this.#u[f];if(e!==i){if(this.#A&&this.#L(i)){i.__abortController.abort(Error("replaced"));let{__staleWhileFetching:e}=i;void 0!==e&&!n&&(this.#E&&this.#r?.(e,t,"set"),this.#B&&this.#m?.push([e,t,"set"]))}else!n&&(this.#E&&this.#r?.(i,t,"set"),this.#B&&this.#m?.push([i,t,"set"]));if(this.#R(f),this.#D(f,l,h),this.#u[f]=e,h){h.set="replace";let t=i&&this.#L(i)?i.__staleWhileFetching:i;void 0!==t&&(h.oldValue=t)}}else h&&(h.set="update")}if(0===r||this.#w||this.#k(),this.#w&&(a||this.#M(f,r,s),h&&this.#O(h,f)),!n&&this.#B&&this.#m){let t;let e=this.#m;for(;t=e?.shift();)this.#s?.(...t)}return this}pop(){try{for(;this.#h;){let t=this.#u[this.#d];if(this.#N(!0),this.#L(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(void 0!==t)return t}}finally{if(this.#B&&this.#m){let t;let e=this.#m;for(;t=e?.shift();)this.#s?.(...t)}}}#N(t){let e=this.#d,i=this.#f[e],r=this.#u[e];return this.#A&&this.#L(r)?r.__abortController.abort(Error("evicted")):(this.#E||this.#B)&&(this.#E&&this.#r?.(r,i,"evict"),this.#B&&this.#m?.push([r,i,"evict"])),this.#R(e),t&&(this.#f[e]=void 0,this.#u[e]=void 0,this.#y.push(e)),1===this.#h?(this.#d=this.#g=0,this.#y.length=0):this.#d=this.#c[e],this.#l.delete(i),this.#h--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:r}=e,s=this.#l.get(t);if(void 0!==s){let t=this.#u[s];if(this.#L(t)&&void 0===t.__staleWhileFetching)return!1;if(!this.#I(s))return i&&this.#U(s),r&&(r.has="hit",this.#O(r,s)),!0;r&&(r.has="stale",this.#O(r,s))}else r&&(r.has="miss");return!1}peek(t,e={}){let{allowStale:i=this.allowStale}=e,r=this.#l.get(t);if(void 0===r||!i&&this.#I(r))return;let s=this.#u[r];return this.#L(s)?s.__staleWhileFetching:s}#S(t,e,i,r){let s=void 0===e?void 0:this.#u[e];if(this.#L(s))return s;let n=new a,{signal:o}=i;o?.addEventListener("abort",()=>n.abort(o.reason),{signal:n.signal});let h={signal:n.signal,options:i,context:r},l=(r,s=!1)=>{let{aborted:o}=n.signal,a=i.ignoreFetchAbort&&void 0!==r;return(i.status&&(o&&!s?(i.status.fetchAborted=!0,i.status.fetchError=n.signal.reason,a&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),!o||a||s)?(this.#u[e]===u&&(void 0===r?u.__staleWhileFetching?this.#u[e]=u.__staleWhileFetching:this.#F(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,r,h.options))),r):f(n.signal.reason)},f=r=>{let{aborted:s}=n.signal,o=s&&i.allowStaleOnFetchAbort,h=o||i.allowStaleOnFetchRejection,a=h||i.noDeleteOnFetchRejection;if(this.#u[e]!==u||(a&&void 0!==u.__staleWhileFetching?o||(this.#u[e]=u.__staleWhileFetching):this.#F(t,"fetch")),h)return i.status&&void 0!==u.__staleWhileFetching&&(i.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw r};i.status&&(i.status.fetchDispatched=!0);let u=new Promise((e,r)=>{let o=this.#n?.(t,s,h);o&&o instanceof Promise&&o.then(t=>e(void 0===t?void 0:t),r),n.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(e(void 0),i.allowStaleOnFetchAbort&&(e=t=>l(t,!0)))})}).then(l,t=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=t),f(t))),c=Object.assign(u,{__abortController:n,__staleWhileFetching:s,__returned:void 0});return void 0===e?(this.set(t,c,{...h.options,status:void 0}),e=this.#l.get(t)):this.#u[e]=c,c}#L(t){return!!this.#A&&!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof a}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:n=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:h=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:c=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:d,forceRefresh:g=!1,status:y,signal:m}=e;if(!this.#A)return y&&(y.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:s,status:y});let v={allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:s,ttl:n,noDisposeOnSet:o,size:h,sizeCalculation:a,noUpdateTTL:l,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:p,ignoreFetchAbort:c,status:y,signal:m},b=this.#l.get(t);if(void 0===b){y&&(y.fetch="miss");let e=this.#S(t,b,v,d);return e.__returned=e}{let e=this.#u[b];if(this.#L(e)){let t=i&&void 0!==e.__staleWhileFetching;return y&&(y.fetch="inflight",t&&(y.returnedStale=!0)),t?e.__staleWhileFetching:e.__returned=e}let s=this.#I(b);if(!g&&!s)return y&&(y.fetch="hit"),this.#T(b),r&&this.#U(b),y&&this.#O(y,b),e;let n=this.#S(t,b,v,d),o=void 0!==n.__staleWhileFetching&&i;return y&&(y.fetch=s?"stale":"refresh",o&&s&&(y.returnedStale=!0)),o?n.__staleWhileFetching:n.__returned=n}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(void 0===i)throw Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#o;if(!i)throw Error("no memoMethod provided to constructor");let{context:r,forceRefresh:s,...n}=e,o=this.get(t,n);if(!s&&void 0!==o)return o;let h=i(t,o,{options:n,context:r});return this.set(t,h,n),h}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:n}=e,o=this.#l.get(t);if(void 0!==o){let e=this.#u[o],h=this.#L(e);return(n&&this.#O(n,o),this.#I(o))?(n&&(n.get="stale"),h)?(n&&i&&void 0!==e.__staleWhileFetching&&(n.returnedStale=!0),i?e.__staleWhileFetching:void 0):(s||this.#F(t,"expire"),n&&i&&(n.returnedStale=!0),i?e:void 0):(n&&(n.get="hit"),h)?e.__staleWhileFetching:(this.#T(o),r&&this.#U(o),e)}n&&(n.get="miss")}#$(t,e){this.#p[e]=t,this.#c[t]=e}#T(t){t!==this.#g&&(t===this.#d?this.#d=this.#c[t]:this.#$(this.#p[t],this.#c[t]),this.#$(this.#g,t),this.#g=t)}delete(t){return this.#F(t,"delete")}#F(t,e){let i=!1;if(0!==this.#h){let r=this.#l.get(t);if(void 0!==r){if(i=!0,1===this.#h)this.#P(e);else{this.#R(r);let i=this.#u[r];if(this.#L(i)?i.__abortController.abort(Error("deleted")):(this.#E||this.#B)&&(this.#E&&this.#r?.(i,t,e),this.#B&&this.#m?.push([i,t,e])),this.#l.delete(t),this.#f[r]=void 0,this.#u[r]=void 0,r===this.#g)this.#g=this.#p[r];else if(r===this.#d)this.#d=this.#c[r];else{let t=this.#p[r];this.#c[t]=this.#c[r];let e=this.#c[r];this.#p[e]=this.#p[r]}this.#h--,this.#y.push(r)}}}if(this.#B&&this.#m?.length){let t;let e=this.#m;for(;t=e?.shift();)this.#s?.(...t)}return i}clear(){return this.#P("delete")}#P(t){for(let e of this.#x({allowStale:!0})){let i=this.#u[e];if(this.#L(i))i.__abortController.abort(Error("deleted"));else{let r=this.#f[e];this.#E&&this.#r?.(i,r,t),this.#B&&this.#m?.push([i,r,t])}}if(this.#l.clear(),this.#u.fill(void 0),this.#f.fill(void 0),this.#w&&this.#b&&(this.#w.fill(0),this.#b.fill(0)),this.#v&&this.#v.fill(0),this.#d=0,this.#g=0,this.#y.length=0,this.#a=0,this.#h=0,this.#B&&this.#m){let t;let e=this.#m;for(;t=e?.shift();)this.#s?.(...t)}}}}}]);
//# sourceMappingURL=71292-7e6bbd97cf463901.js.map