coinley-test
Version:
Beautiful blockchain payment gateway SDK for seamless crypto payments - React & vanilla js
10 lines • 807 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react/jsx-runtime"),require("react"),require("wagmi"),require("@tanstack/react-query"),require("@wagmi/core"),require("@wagmi/core/chains"),require("@wagmi/connectors"),require("viem"),require("react-dom"),require("qrcode"),require("axios"),require("react-dom/client")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime","react","wagmi","@tanstack/react-query","@wagmi/core","@wagmi/core/chains","@wagmi/connectors","viem","react-dom","qrcode","axios","react-dom/client"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).CoinleyTest={},e.React,e.React,e.Wagmi,e.ReactQuery,e.WagmiCore,e.chains,e.connectors,e.Viem,e.ReactDOM,e.QRCode,e.axios,e.ReactDOM)}(this,function(e,t,r,n,i,o,s,a,c,l,u,h,d){"use strict";for(var p=Object.defineProperty,f=((e,t,r)=>((e,t,r)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r)),m={},g={byteLength:function(e){var t=k(e),r=t[0],n=t[1];return 3*(r+n)/4-n},toByteArray:function(e){var t,r,n=k(e),i=n[0],o=n[1],s=new b(function(e,t,r){return 3*(t+r)/4-r}(0,i,o)),a=0,c=o>0?i-4:i;for(r=0;r<c;r+=4)t=v[e.charCodeAt(r)]<<18|v[e.charCodeAt(r+1)]<<12|v[e.charCodeAt(r+2)]<<6|v[e.charCodeAt(r+3)],s[a++]=t>>16&255,s[a++]=t>>8&255,s[a++]=255&t;2===o&&(t=v[e.charCodeAt(r)]<<2|v[e.charCodeAt(r+1)]>>4,s[a++]=255&t);1===o&&(t=v[e.charCodeAt(r)]<<10|v[e.charCodeAt(r+1)]<<4|v[e.charCodeAt(r+2)]>>2,s[a++]=t>>8&255,s[a++]=255&t);return s},fromByteArray:function(e){for(var t,r=e.length,n=r%3,i=[],o=16383,s=0,a=r-n;s<a;s+=o)i.push(S(e,s,s+o>a?a:s+o));1===n?(t=e[r-1],i.push(y[t>>2]+y[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],i.push(y[t>>10]+y[t>>4&63]+y[t<<2&63]+"="));return i.join("")}},y=[],v=[],b="undefined"!=typeof Uint8Array?Uint8Array:Array,w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",x=0;x<64;++x)y[x]=w[x],v[w.charCodeAt(x)]=x;function k(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function _(e){return y[e>>18&63]+y[e>>12&63]+y[e>>6&63]+y[63&e]}function S(e,t,r){for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(_(n));return i.join("")}v["-".charCodeAt(0)]=62,v["_".charCodeAt(0)]=63;var C={
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
read:function(e,t,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,l=c>>1,u=-7,h=r?i-1:0,d=r?-1:1,p=e[t+h];for(h+=d,o=p&(1<<-u)-1,p>>=-u,u+=a;u>0;o=256*o+e[t+h],h+=d,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=256*s+e[t+h],h+=d,u-=8);if(0===o)o=1-l;else{if(o===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=l}return(p?-1:1)*s*Math.pow(2,o-n)},write:function(e,t,r,n,i,o){var s,a,c,l=8*o-i-1,u=(1<<l)-1,h=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,f=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+h>=1?d/c:d*Math.pow(2,1-h))*c>=2&&(s++,c/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*c-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=255&a,p+=f,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;e[r+p]=255&s,p+=f,s/=256,l-=8);e[r+p-f]|=128*m}};
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
!function(e){const t=g,r=C,n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=l,e.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i;const{Uint8Array:o,ArrayBuffer:s,SharedArrayBuffer:a}=globalThis;function c(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new o(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=c(r);const i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(s.isView(e))return function(e){if(X(e,o)){const t=new o(e);return f(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,s)||e&&X(e.buffer,s))return f(e,t,r);if(void 0!==a&&(X(e,a)||e&&X(e.buffer,a)))return f(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,r);const i=function(e){if(l.isBuffer(e)){const t=0|m(e.length),r=c(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||Q(e.length)?c(0):p(e);if("Buffer"===e.type&&Array.isArray(e.data))return p(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return h(e),c(e<0?0:0|m(e))}function p(e){const t=e.length<0?0:0|m(e.length),r=c(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function f(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new o(e):void 0===r?new o(e,t):new o(e,t,r),Object.setPrototypeOf(n,l.prototype),n}function m(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function y(e,t){if(l.isBuffer(e))return e.length;if(s.isView(e)||X(e,s))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(e).length;default:if(i)return n?-1:Z(e).length;t=(""+t).toLowerCase(),i=!0}}function v(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return M(this,t,r);case"ascii":return P(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function w(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Q(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:x(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof o.prototype.indexOf?i?o.prototype.indexOf.call(e,t,r):o.prototype.lastIndexOf.call(e,t,r):x(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function x(e,t,r,n,i){let o,s=1,a=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,r/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;o<a;o++)if(l(e,o)===l(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===c)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){let r=!0;for(let n=0;n<c;n++)if(l(e,o+n)!==l(t,n)){r=!1;break}if(r)return o}return-1}function k(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(Q(n))return s;e[r+s]=n}return s}function _(e,t,r,n){return J(Z(t,e.length-r),e,r,n)}function S(e,t,r,n){return J(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function I(e,t,r,n){return J(Y(t),e,r,n)}function E(e,t,r,n){return J(function(e,t){let r,n,i;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function A(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function M(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,c;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(o=c));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=N)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=N));return r}(n)}l.TYPED_ARRAY_SUPPORT=function(){try{const e=new o(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,o.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.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(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(l.prototype,o.prototype),Object.setPrototypeOf(l,o),l.alloc=function(e,t,r){return function(e,t,r){return h(e),e<=0?c(e):void 0!==t?"string"==typeof r?c(e).fill(t,r):c(e).fill(t):c(e)}(e,t,r)},l.allocUnsafe=function(e){return d(e)},l.allocUnsafeSlow=function(e){return d(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(X(e,o)&&(e=l.from(e,e.offset,e.byteLength)),X(t,o)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},l.isEncoding=function(e){switch(String(e).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}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=l.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(X(t,o))i+t.length>n.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(n,i)):o.prototype.set.call(n,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},l.byteLength=y,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)b(this,t,t+1);return this},l.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},l.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},l.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?M(this,0,e):v.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},n&&(l.prototype[n]=l.prototype.inspect),l.prototype.compare=function(e,t,r,n,i){if(X(e,o)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let s=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const c=Math.min(s,a),u=this.slice(n,i),h=e.slice(t,r);for(let o=0;o<c;++o)if(u[o]!==h[o]){s=u[o],a=h[o];break}return s<a?-1:a<s?1:0},l.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},l.prototype.indexOf=function(e,t,r){return w(this,e,t,r,!0)},l.prototype.lastIndexOf=function(e,t,r){return w(this,e,t,r,!1)},l.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return k(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return I(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const N=4096;function P(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function T(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function O(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let o=t;o<r;++o)i+=ee[e[o]];return i}function B(e,t,r){const n=e.slice(t,r);let i="";for(let o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function R(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,r,n,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function j(e,t,r,n,i){H(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function U(e,t,r,n,i){H(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function D(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(e,t,n,i,o){return t=+t,n>>>=0,o||D(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function z(e,t,n,i,o){return t=+t,n>>>=0,o||D(e,0,n,8),r.write(e,t,n,i,52,8),n+8}l.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,l.prototype),n},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=te(function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))}),l.prototype.readBigUInt64BE=te(function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),l.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=te(function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),l.prototype.readBigInt64BE=te(function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),r.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),r.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),r.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),r.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){L(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){L(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=te(function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=te(function(e,t=0){return U(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=te(function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=te(function(e,t=0){return U(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeFloatLE=function(e,t,r){return F(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return F(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return z(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return z(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof o.prototype.copyWithin?this.copyWithin(t,r,n):o.prototype.set.call(e,this.subarray(r,n),t),i},l.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=l.isBuffer(e)?e:l.from(e,n),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};const q={};function $(e,t,r){q[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function W(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function H(e,t,r,n,i,o){if(e>r||e<t){const r="bigint"==typeof t?"n":"";let n;throw n=0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`,new q.ERR_OUT_OF_RANGE("value",n,e)}!function(e,t,r){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||V(t,e.length-(r+1))}(n,i,o)}function G(e,t){if("number"!=typeof e)throw new q.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,r){if(Math.floor(e)!==e)throw G(e,r),new q.ERR_OUT_OF_RANGE("offset","an integer",e);if(t<0)throw new q.ERR_BUFFER_OUT_OF_BOUNDS;throw new q.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${t}`,e)}$("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),$("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),$("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=W(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=W(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);const K=/[^+/0-9A-Za-z-_]/g;function Z(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Y(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function J(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!=e}const ee=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function te(e){return"undefined"==typeof BigInt?re:e}function re(){throw new Error("BigInt not supported")}}(m);const I=m.Buffer,E=m.Blob,A=m.BlobOptions,M=m.Buffer,N=m.File,P=m.FileOptions,T=m.INSPECT_MAX_BYTES,O=m.SlowBuffer,B=m.TranscodeEncoding,R=m.atob,L=m.btoa,j=m.constants,U=m.isAscii,D=m.isUtf8,F=m.kMaxLength,z=m.kStringMaxLength,q=m.resolveObjectURL,$=m.transcode,W=Object.freeze(Object.defineProperty({__proto__:null,Blob:E,BlobOptions:A,Buffer:M,File:N,FileOptions:P,INSPECT_MAX_BYTES:T,SlowBuffer:O,TranscodeEncoding:B,atob:R,btoa:L,constants:j,default:I,isAscii:U,isUtf8:D,kMaxLength:F,kStringMaxLength:z,resolveObjectURL:q,transcode:$},Symbol.toStringTag,{value:"Module"}));function H(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var G,V,K={exports:{}},Z=K.exports={};function Y(){throw new Error("setTimeout has not been defined")}function J(){throw new Error("clearTimeout has not been defined")}function X(e){if(G===setTimeout)return setTimeout(e,0);if((G===Y||!G)&&setTimeout)return G=setTimeout,setTimeout(e,0);try{return G(e,0)}catch(t){try{return G.call(null,e,0)}catch(r){return G.call(this,e,0)}}}!function(){try{G="function"==typeof setTimeout?setTimeout:Y}catch(e){G=Y}try{V="function"==typeof clearTimeout?clearTimeout:J}catch(e){V=J}}();var Q,ee=[],te=!1,re=-1;function ne(){te&&Q&&(te=!1,Q.length?ee=Q.concat(ee):re=-1,ee.length&&ie())}function ie(){if(!te){var e=X(ne);te=!0;for(var t=ee.length;t;){for(Q=ee,ee=[];++re<t;)Q&&Q[re].run();re=-1,t=ee.length}Q=null,te=!1,function(e){if(V===clearTimeout)return clearTimeout(e);if((V===J||!V)&&clearTimeout)return V=clearTimeout,clearTimeout(e);try{return V(e)}catch(t){try{return V.call(null,e)}catch(r){return V.call(this,e)}}}(e)}}function oe(e,t){this.fun=e,this.array=t}function se(){}Z.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];ee.push(new oe(e,t)),1!==ee.length||te||X(ie)},oe.prototype.run=function(){this.fun.apply(null,this.array)},Z.title="browser",Z.browser=!0,Z.env={},Z.argv=[],Z.version="",Z.versions={},Z.on=se,Z.addListener=se,Z.once=se,Z.off=se,Z.removeListener=se,Z.removeAllListeners=se,Z.emit=se,Z.prependListener=se,Z.prependOnceListener=se,Z.listeners=function(e){return[]},Z.binding=function(e){throw new Error("process.binding is not supported")},Z.cwd=function(){return"/"},Z.chdir=function(e){throw new Error("process.chdir is not supported")},Z.umask=function(){return 0};const ae=H(K.exports);var ce;if("undefined"==typeof window){var le={hostname:""};ce={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:le,referrer:""},screen:{width:0,height:0},location:le,addEventListener:function(){},removeEventListener:function(){}}}else ce=window;function ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function he(e,t,r,n,i,o,s){try{var a=e[o](s),c=a.value}catch(uh){return void r(uh)}a.done?t(c):Promise.resolve(c).then(n,i)}function de(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function s(e){he(o,n,i,s,a,"next",e)}function a(e){he(o,n,i,s,a,"throw",e)}s(void 0)})}}function pe(e,t,r){return(pe=_e()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&we(i,r.prototype),i}).apply(null,arguments)}function fe(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}function me(){return me=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},me.apply(this,arguments)}function ge(e){return(ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ye(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&we(e,t)}function ve(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function be(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}function we(e,t){return(we=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xe(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function ke(e){var t="function"==typeof Map?new Map:void 0;return ke=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return pe(e,arguments,ge(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),we(n,e)},ke(e)}function _e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_e=function(){return!!e})()}function Se(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return ue(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ue(e,t):void 0}}(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ce(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function Ie(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var Ee,Ae=Object.defineProperty,Me=function(e,t,r){return function(e,t,r){return t in e?Ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r}(e,"symbol"!==(void 0===t?"undefined":xe(t))?t+"":t,r)},Ne=Object.defineProperty,Pe=function(e,t,r){return function(e,t,r){return t in e?Ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r}(e,"symbol"!==(void 0===t?"undefined":xe(t))?t+"":t,r)},Te=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(Te||{}),Oe={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Be={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Re={};function Le(e){if(Re[e])return Re[e];var t=globalThis[e],r=t.prototype,n=e in Oe?Oe[e]:void 0,i=Boolean(n&&n.every(function(e){var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),o=e in Be?Be[e]:void 0,s=Boolean(o&&o.every(function(e){var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(i&&s&&!globalThis.Zone)return Re[e]=t.prototype,t.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var c=a.contentWindow;if(!c)return t.prototype;var l=c[e].prototype;return document.body.removeChild(a),l?Re[e]=l:r}catch(u){return r}}var je={};function Ue(e,t,r){var n,i=e+"."+String(r);if(je[i])return je[i].call(t);var o=Le(e),s=null==(n=Object.getOwnPropertyDescriptor(o,r))?void 0:n.get;return s?(je[i]=s,s.call(t)):t[r]}var De={};function Fe(e,t,r){var n=e+"."+String(r);if(De[n])return De[n].bind(t);var i=Le(e)[r];return"function"!=typeof i?t[r]:(De[n]=i,i.bind(t))}var ze={childNodes:function(e){return Ue("Node",e,"childNodes")},parentNode:function(e){return Ue("Node",e,"parentNode")},parentElement:function(e){return Ue("Node",e,"parentElement")},textContent:function(e){return Ue("Node",e,"textContent")},contains:function(e,t){return Fe("Node",e,"contains")(t)},getRootNode:function(e){return Fe("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ue("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ue("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ue("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ue("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Le("MutationObserver").constructor},patch:function(e,t,r){try{if(!(t in e))return function(){};var n=e[t],i=r(n);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,function(){e[t]=n}}catch(o){return function(){}}}};function qe(e){return e.nodeType===e.ELEMENT_NODE}function $e(e){var t=e&&"host"in e&&"mode"in e&&ze.host(e)||null;return Boolean(t&&"shadowRoot"in t&&ze.shadowRoot(t)===e)}function We(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function He(e){try{var t=e.rules||e.cssRules;if(!t)return null;var r=e.href;!r&&e.ownerNode&&e.ownerNode.ownerDocument&&(r=e.ownerNode.ownerDocument.location.href);var n=Array.from(t,function(e){return Ge(e,r)}).join("");return(i=n).includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}catch(uh){return null}var i}function Ge(e,t){if(function(e){return"styleSheet"in e}(e)){var r;try{r=He(e.styleSheet)||function(e){var t=e.cssText;if(t.split('"').length<3)return t;var r=["@import","url("+JSON.stringify(e.href)+")"];return""===e.layerName?r.push("layer"):e.layerName&&r.push("layer("+e.layerName+")"),e.supportsText&&r.push("supports("+e.supportsText+")"),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(uh){r=e.cssText}return e.styleSheet.href?nt(r,e.styleSheet.href):r}var n,i=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(n=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,i=i.replace(n,"$1\\$2")),t?nt(i,t):i}var Ve=function(){function e(){Pe(this,"idNodeMap",new Map),Pe(this,"nodeMetaMap",new WeakMap)}var t=e.prototype;return t.getId=function(e){var t;if(!e)return-1;var r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1},t.getNode=function(e){return this.idNodeMap.get(e)||null},t.getIds=function(){return Array.from(this.idNodeMap.keys())},t.getMeta=function(e){return this.nodeMetaMap.get(e)||null},t.removeNodeFromMap=function(e){var t=this,r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})},t.has=function(e){return this.idNodeMap.has(e)},t.hasNode=function(e){return this.nodeMetaMap.has(e)},t.add=function(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)},t.replace=function(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)},t.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Ke(e){var t=e.element,r=e.maskInputOptions,n=e.tagName,i=e.type,o=e.value,s=e.maskInputFn,a=o||"",c=i&&Ze(i);return(r[n.toLowerCase()]||c&&r[c])&&(a=s?s(a,t):"*".repeat(a.length)),a}function Ze(e){return e.toLowerCase()}var Ye="__rrweb_original__";function Je(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ze(t):null}function Xe(e,t){var r;try{r=new URL(e,null!=t?t:window.location.href)}catch(o){return null}var n,i=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!=(n=null==i?void 0:i[1])?n:null}var Qe=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,et=/^(?:[a-z+]+:)?\/\//i,tt=/^www\..*/i,rt=/^(data:)([^,]*),(.*)/i;function nt(e,t){return(e||"").replace(Qe,function(e,r,n,i,o,s){var a,c=n||o||s,l=r||i||"";if(!c)return e;if(et.test(c)||tt.test(c))return"url("+l+c+l+")";if(rt.test(c))return"url("+l+c+l+")";if("/"===c[0])return"url("+l+(((a=t).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+c)+l+")";var u=t.split("/"),h=c.split("/");u.pop();for(var d,p=Se(h);!(d=p()).done;){var f=d.value;"."!==f&&(".."===f?u.pop():u.push(f))}return"url("+l+u.join("/")+l+")"})}function it(e,t){return void 0===t&&(t=!1),t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function ot(e,t){return function(e,t,r){void 0===r&&(r=!1);var n=Array.from(t.childNodes),i=[],o=0;if(n.length>1&&e&&"string"==typeof e)for(var s=it(e,r),a=s.length/e.length,c=1;c<n.length;c++)if(n[c].textContent&&"string"==typeof n[c].textContent){for(var l=it(n[c].textContent,r),u=3;u<l.length&&(l[u].match(/[a-zA-Z0-9]/)||-1!==l.indexOf(l.substring(0,u),1));u++);for(;u<l.length;u++){var h=l.substring(0,u),d=s.split(h),p=-1;if(2===d.length)p=d[0].length;else if(d.length>2&&""===d[0]&&""!==n[c-1].textContent)p=s.indexOf(h,1);else if(1===d.length){if(h=h.substring(0,h.length-1),(d=s.split(h)).length<=1)return i.push(e),i;u=101}else u===l.length-1&&(p=s.indexOf(h));if(d.length>=2&&u>100){var f=n[c-1].textContent;if(f&&"string"==typeof f){var m=it(f).length;p=s.indexOf(h,m)}-1===p&&(p=d[0].length)}if(-1!==p){for(var g=Math.floor(p/a);g>0&&g<e.length;){if((o+=1)>50*n.length)return i.push(e),i;var y=it(e.substring(0,g),r);if(y.length===p){i.push(e.substring(0,g)),e=e.substring(g),s=s.substring(p);break}y.length<p?g+=Math.max(1,Math.floor((p-y.length)/a)):g-=Math.max(1,Math.floor((y.length-p)*a))}break}}}return i.push(e),i}(e,t).join("/* rr_split */")}var st,at,ct=1,lt=new RegExp("[^a-z0-9-_:]");function ut(){return ct++}var ht=/^[^ \t\n\r\u000c]+/,dt=/^[, \t\n\r\u000c]+/;var pt=new WeakMap;function ft(e,t){return t&&""!==t.trim()?gt(e,t):t}function mt(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function gt(e,t){var r=pt.get(e);if(r||(r=e.createElement("a"),pt.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function yt(e,t,r,n){return n?"src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0]?ft(e,n):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,i=e.exec(t.substring(r));return i?(n=i[0],r+=n.length,n):""}for(var i=[];n(dt),!(r>=t.length);){var o=n(ht);if(","===o.slice(-1))o=ft(e,o.substring(0,o.length-1)),i.push(o);else{var s="";o=ft(e,o);for(var a=!1;;){var c=t.charAt(r);if(""===c){i.push((o+s).trim());break}if(a)")"===c&&(a=!1);else{if(","===c){r+=1,i.push((o+s).trim());break}"("===c&&(a=!0)}s+=c,r+=1}}}return i.join(", ")}(e,n):"style"===r?nt(n,gt(e)):"object"===t&&"data"===r?ft(e,n):n:ft(e,n):n}function vt(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function bt(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&bt(ze.parentNode(e),t,r);for(var n=e.classList.length;n--;){var i=e.classList[n];if(t.test(i))return!0}return!!r&&bt(ze.parentNode(e),t,r)}function wt(e,t,r,n){var i;if(qe(e)){if(i=e,!ze.childNodes(i).length)return!1}else{if(null===ze.parentElement(e))return!1;i=ze.parentElement(e)}try{if("string"==typeof t){if(n){if(i.closest("."+t))return!0}else if(i.classList.contains(t))return!0}else if(bt(i,t,n))return!0;if(r)if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}catch(o){}return!1}function xt(e,t){var r=t.doc,n=t.mirror,i=t.blockClass,o=t.blockSelector,s=t.needsMask,a=t.inlineStylesheet,c=t.maskInputOptions,l=void 0===c?{}:c,u=t.maskTextFn,h=t.maskInputFn,d=t.dataURLOptions,p=void 0===d?{}:d,f=t.inlineImages,m=t.recordCanvas,g=t.keepIframeSrcFn,y=t.newlyAddedElement,v=void 0!==y&&y,b=t.cssCaptured,w=void 0!==b&&b,x=function(e,t){if(!t.hasNode(e))return;var r=t.getId(e);return 1===r?void 0:r}(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Te.Document,childNodes:[],compatMode:e.compatMode}:{type:Te.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Te.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:x};case e.ELEMENT_NODE:return function(e,t){for(var r,n=t.doc,i=t.blockClass,o=t.blockSelector,s=t.inlineStylesheet,a=t.maskInputOptions,c=void 0===a?{}:a,l=t.maskInputFn,u=t.dataURLOptions,h=void 0===u?{}:u,d=t.inlineImages,p=t.recordCanvas,f=t.keepIframeSrcFn,m=t.newlyAddedElement,g=void 0!==m&&m,y=t.rootId,v=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var i=e.classList[n];if(t.test(i))return!0}if(r)return e.matches(r)}catch(o){}return!1}(e,i,o),b=function(e){if(ve(e,HTMLFormElement))return"form";var t=Ze(e.tagName);return lt.test(t)?"div":t}(e),w={},x=e.attributes.length,k=0;k<x;k++){var _=e.attributes[k];vt(b,_.name,_.value)||(w[_.name]=yt(n,b,Ze(_.name),_.value))}if("link"===b&&s){var S=Array.from(n.styleSheets).find(function(t){return t.href===e.href}),C=null;S&&(C=He(S)),C&&(delete w.rel,delete w.href,w._cssText=C)}if("style"===b&&e.sheet){var I=He(e.sheet);I&&(e.childNodes.length>1&&(I=ot(I,e)),w._cssText=I)}if("input"===b||"textarea"===b||"select"===b){var E=e.value,A=e.checked;"radio"!==w.type&&"checkbox"!==w.type&&"submit"!==w.type&&"button"!==w.type&&E?w.value=Ke({element:e,type:Je(e),tagName:b,value:E,maskInputOptions:c,maskInputFn:l}):A&&(w.checked=A)}"option"===b&&(e.selected&&!c.select?w.selected=!0:delete w.selected);"dialog"===b&&e.open&&(w.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===b&&p)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r<e.width;r+=50)for(var n=0;n<e.height;n+=50){var i=t.getImageData,o=Ye in i?i[Ye]:i;if(new Uint32Array(o.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some(function(e){return 0!==e}))return!1}return!0})(e)||(w.rr_dataURL=e.toDataURL(h.type,h.quality));else if(!("__context"in e)){var M=e.toDataURL(h.type,h.quality),N=n.createElement("canvas");N.width=e.width,N.height=e.height,M!==N.toDataURL(h.type,h.quality)&&(w.rr_dataURL=M)}if("img"===b&&d){st||(st=n.createElement("canvas"),at=st.getContext("2d"));var P=e,T=P.currentSrc||P.getAttribute("src")||"<unknown-src>",O=P.crossOrigin,B=function(){P.removeEventListener("load",B);try{st.width=P.naturalWidth,st.height=P.naturalHeight,at.drawImage(P,0,0),w.rr_dataURL=st.toDataURL(h.type,h.quality)}catch(e){if("anonymous"!==P.crossOrigin)return P.crossOrigin="anonymous",void(P.complete&&0!==P.naturalWidth?B():P.addEventListener("load",B));console.warn("Cannot inline img src="+T+"! Error: "+e)}"anonymous"===P.crossOrigin&&(O?w.crossOrigin=O:P.removeAttribute("crossorigin"))};P.complete&&0!==P.naturalWidth?B():P.addEventListener("load",B)}if("audio"===b||"video"===b){var R=w;R.rr_mediaState=e.paused?"paused":"played",R.rr_mediaCurrentTime=e.currentTime,R.rr_mediaPlaybackRate=e.playbackRate,R.rr_mediaMuted=e.muted,R.rr_mediaLoop=e.loop,R.rr_mediaVolume=e.volume}g||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop));if(v){var L=e.getBoundingClientRect(),j=L.width,U=L.height;w={class:w.class,rr_width:j+"px",rr_height:U+"px"}}"iframe"!==b||f(w.src)||(e.contentDocument||(w.rr_src=w.src),delete w.src);try{customElements.get(b)&&(r=!0)}catch(D){}return{type:Te.Element,tagName:b,attributes:w,childNodes:[],isSVG:mt(e)||void 0,needBlock:v,rootId:y,isCustom:r}}(e,{doc:r,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:h,dataURLOptions:p,inlineImages:f,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:v,rootId:x});case e.TEXT_NODE:return function(e,t){var r=t.needsMask,n=t.maskTextFn,i=t.rootId,o=t.cssCaptured,s=ze.parentNode(e),a=s&&s.tagName,c="",l="STYLE"===a||void 0,u="SCRIPT"===a||void 0;u?c="SCRIPT_PLACEHOLDER":o||(c=ze.textContent(e),l&&c&&(c=nt(c,gt(t.doc))));!l&&!u&&c&&r&&(c=n?n(c,ze.parentElement(e)):c.replace(/[\S]/g,"*"));return{type:Te.Text,textContent:c||"",rootId:i}}(e,{doc:r,needsMask:s,maskTextFn:u,rootId:x,cssCaptured:w});case e.CDATA_SECTION_NODE:return{type:Te.CDATA,textContent:"",rootId:x};case e.COMMENT_NODE:return{type:Te.Comment,textContent:ze.textContent(e)||"",rootId:x};default:return!1}}function kt(e){return null==e?"":e.toLowerCase()}function _t(e,t){var r=t.doc,n=t.mirror,i=t.blo