@joclaim/browser-extension-sdk 0.2.5 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/174.bundle.js +1 -1
- package/build/975.bundle.js +1 -1
- package/build/975.bundle.js.map +1 -1
- package/build/JoclaimExtensionSDK-mv2.bundle.js +6 -6
- package/build/JoclaimExtensionSDK-mv2.bundle.js.map +1 -1
- package/build/JoclaimExtensionSDK.bundle.js +6 -6
- package/build/JoclaimExtensionSDK.bundle.js.map +1 -1
- package/build/background/background-mv2.bundle.js +4 -4
- package/build/background/background-mv2.bundle.js.map +1 -1
- package/build/background/background.bundle.js +4 -4
- package/build/background/background.bundle.js.map +1 -1
- package/build/content/content.bundle.js +4 -4
- package/build/content/content.bundle.js.map +1 -1
- package/build/interceptor/injection-scripts.bundle.js +1 -1
- package/build/interceptor/injection-scripts.bundle.js.map +1 -1
- package/build/offscreen/offscreen.bundle.js +16 -24
- package/build/offscreen/offscreen.bundle.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var t={
|
|
2
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
3
|
-
e.read=function(t,e,r,n,o){var i,s,a=8*o-n-1,c=(1<<a)-1,u=c>>1,l=-7,f=r?o-1:0,h=r?-1:1,p=t[e+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+t[e+f],f+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=u}return(p?-1:1)*s*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var s,a,c,u=8*i-o-1,l=(1<<u)-1,f=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,E=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*c-1)*Math.pow(2,o),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;t[r+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,u+=o;u>0;t[r+p]=255&s,p+=d,s/=256,u-=8);t[r+p-d]|=128*E}},287:(t,e,r)=>{
|
|
1
|
+
var t={526(t,e){e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=a(t),s=i[0],c=i[1],u=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,c)),l=0,f=c>0?s-4:s;for(r=0;r<f;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===c&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[l++]=255&e);1===c&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],s=16383,a=0,c=n-o;a<c;a+=s)i.push(u(t,a,a+s>c?c:a+s));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=i[s],n[i.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function u(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(255&t[i+2]),o.push(c(n));return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},287(t,e,r){
|
|
4
2
|
/*!
|
|
5
3
|
* The buffer module from node.js, for the browser.
|
|
6
4
|
*
|
|
7
5
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
8
6
|
* @license MIT
|
|
9
7
|
*/
|
|
10
|
-
const n=r(526),o=r(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=c,e.IS=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|E(t,e);let n=a(r);const o=n.write(t,e);o!==r&&(n=n.slice(0,o));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(Q(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return h(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Q(t,ArrayBuffer)||t&&Q(t.buffer,ArrayBuffer))return p(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(Q(t,SharedArrayBuffer)||t&&Q(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return c.from(n,e,r);const o=function(t){if(c.isBuffer(t)){const e=0|d(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!=typeof t.length||J(t.length)?a(0):h(t);if("Buffer"===t.type&&Array.isArray(t.data))return h(t.data)}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return l(t),a(t<0?0:0|d(t))}function h(t){const e=t.length<0?0:0|d(t.length),r=a(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function p(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,c.prototype),n}function d(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function E(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return W(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(t).length;default:if(o)return n?-1:W(t).length;e=(""+e).toLowerCase(),o=!0}}function y(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return m(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:_(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):_(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function _(t,e,r,n,o){let i,s=1,a=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){let n=-1;for(i=r;i<a;i++)if(u(t,i)===u(e,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===c)return n*s}else-1!==n&&(i-=i-n),n=-1}else for(r+c>a&&(r=a-c),i=r;i>=0;i--){let r=!0;for(let n=0;n<c;n++)if(u(t,i+n)!==u(e,n)){r=!1;break}if(r)return i}return-1}function O(t,e,r,n){r=Number(r)||0;const o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=e.length;let s;for(n>i/2&&(n=i/2),s=0;s<n;++s){const n=parseInt(e.substr(2*s,2),16);if(J(n))return s;t[r+s]=n}return s}function I(t,e,r,n){return X(W(e,t.length-r),t,r,n)}function v(t,e,r,n){return X(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function w(t,e,r,n){return X(H(e),t,r,n)}function A(t,e,r,n){return X(function(t,e){let r,n,o;const i=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function m(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);const n=[];let o=e;for(;o<r;){const e=t[o];let i=null,s=e>239?4:e>223?3:e>191?2:1;if(o+s<=r){let r,n,a,c;switch(s){case 1:e<128&&(i=e);break;case 2:r=t[o+1],128==(192&r)&&(c=(31&e)<<6|63&r,c>127&&(i=c));break;case 3:r=t[o+1],n=t[o+2],128==(192&r)&&128==(192&n)&&(c=(15&e)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:r=t[o+1],n=t[o+2],a=t[o+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,s=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=s}return function(t){const e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=S));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const 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}}(),c.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(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(t,e,r){return function(t,e,r){return l(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},c.allocUnsafe=function(t){return f(t)},c.allocUnsafeSlow=function(t){return f(t)},c.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==c.prototype},c.compare=function(t,e){if(Q(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),Q(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},c.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}},c.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=c.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(Q(e,Uint8Array))o+e.length>n.length?(c.isBuffer(e)||(e=c.from(e)),e.copy(n,o)):Uint8Array.prototype.set.call(n,e,o);else{if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},c.byteLength=E,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)g(this,e,e+1);return this},c.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},c.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},c.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):y.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){let t="";const r=e.IS;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(t,e,r,n,o){if(Q(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;let i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(i,s),u=this.slice(n,o),l=t.slice(e,r);for(let t=0;t<a;++t)if(u[t]!==l[t]){i=u[t],s=l[t];break}return i<s?-1:s<i?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return O(this,t,e,r);case"utf8":case"utf-8":return I(this,t,e,r);case"ascii":case"latin1":case"binary":return v(this,t,e,r);case"base64":return w(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function R(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function C(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function L(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=e;n<r;++n)o+=z[t[n]];return o}function P(t,e,r){const n=t.slice(e,r);let o="";for(let t=0;t<n.length-1;t+=2)o+=String.fromCharCode(n[t]+256*n[t+1]);return o}function x(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function N(t,e,r,n,o,i){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function F(t,e,r,n,o){Y(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function D(t,e,r,n,o){Y(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r+7]=i,i>>=8,t[r+6]=i,i>>=8,t[r+5]=i,i>>=8,t[r+4]=i;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function U(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function k(t,e,r,n,i){return e=+e,r>>>=0,i||U(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function B(t,e,r,n,i){return e=+e,r>>>=0,i||U(t,0,r,8),o.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||x(t,e,this.length);let n=this[t],o=1,i=0;for(;++i<e&&(o*=256);)n+=this[t+i]*o;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||x(t,e,this.length);let n=this[t+--e],o=1;for(;e>0&&(o*=256);)n+=this[t+--e]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(t,e){return t>>>=0,e||x(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||x(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||x(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||x(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||x(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readBigUInt64LE=q(function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||V(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))}),c.prototype.readBigUInt64BE=q(function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||V(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)}),c.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||x(t,e,this.length);let n=this[t],o=1,i=0;for(;++i<e&&(o*=256);)n+=this[t+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||x(t,e,this.length);let n=e,o=1,i=this[t+--n];for(;n>0&&(o*=256);)i+=this[t+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},c.prototype.readInt8=function(t,e){return t>>>=0,e||x(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||x(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){t>>>=0,e||x(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||x(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||x(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readBigInt64LE=q(function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||V(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)}),c.prototype.readBigInt64BE=q(function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||V(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)}),c.prototype.readFloatLE=function(t,e){return t>>>=0,e||x(t,4,this.length),o.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||x(t,4,this.length),o.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||x(t,8,this.length),o.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||x(t,8,this.length),o.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){N(this,t,e,r,Math.pow(2,8*r)-1,0)}let o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){N(this,t,e,r,Math.pow(2,8*r)-1,0)}let o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||N(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},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||N(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},c.prototype.writeBigUInt64LE=q(function(t,e=0){return F(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=q(function(t,e=0){return D(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,t,e,r,n-1,-n)}let o=0,i=1,s=0;for(this[e]=255&t;++o<r&&(i*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/i|0)-s&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,t,e,r,n-1,-n)}let o=r-1,i=1,s=0;for(this[e+o]=255&t;--o>=0&&(i*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/i|0)-s&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||N(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},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||N(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},c.prototype.writeBigInt64LE=q(function(t,e=0){return F(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=q(function(t,e=0){return D(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(t,e,r){return k(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return k(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return B(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return B(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const o=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),o},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=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&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{const i=c.isBuffer(t)?t:c.from(t,n),s=i.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=i[o%s]}return this};const M={};function j(t,e,r){M[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function G(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function Y(t,e,r,n,o,i){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let o;throw o=i>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new M.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,r){$(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||V(e,t.length-(r+1))}(n,o,i)}function $(t,e){if("number"!=typeof t)throw new M.ERR_INVALID_ARG_TYPE(e,"number",t)}function V(t,e,r){if(Math.floor(t)!==t)throw $(t,r),new M.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new M.ERR_BUFFER_OUT_OF_BOUNDS;throw new M.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}j("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),j("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=G(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=G(o)),o+="n"),n+=` It must be ${e}. Received ${o}`,n},RangeError);const K=/[^+/0-9A-Za-z-_]/g;function W(t,e){let r;e=e||1/0;const n=t.length;let o=null;const i=[];for(let s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function H(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function X(t,e,r,n){let o;for(o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function Q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function J(t){return t!=t}const z=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)e[n+o]=t[r]+t[o]}return e}();function q(t){return"undefined"==typeof BigInt?Z:t}function Z(){throw new Error("BigInt not supported")}},296:(t,e,r)=>{r.r(e),r.d(e,{WebSocket:()=>d,default:()=>E});var n,o=r(153);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function c(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==i(e)?e:e+""}function l(t,e,r){return e=h(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,r||[],h(t).constructor):e.apply(t,r))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}(t=r.hmd(t),"undefined"==typeof window)?(n=function(){return c(function t(e,r){var n=this;s(this,t),o.w9.info(o.Ey.POLYFILLS,"[WEBSOCKET-POLYFILL] Creating mock WebSocket for background context"),this.url=e,this.protocols=r,this.readyState=3,setTimeout(function(){"function"==typeof n.onclose&&n.onclose({code:1e3,reason:"WebSockets not supported in background context"})},0)},[{key:"send",value:function(){throw o.w9.warn(o.Ey.POLYFILLS,"[WEBSOCKET-POLYFILL] Cannot use WebSockets in background context"),new Error("WebSockets are not available in background context")}},{key:"close",value:function(){}},{key:"sendPromise",value:function(){return Promise.reject(new Error("WebSockets are not available in background context"))}},{key:"addEventListener",value:function(){}},{key:"removeEventListener",value:function(){}}])}(),o.w9.info(o.Ey.POLYFILLS,"[WEBSOCKET-POLYFILL] Using mock WebSocket implementation for background context")):(n=function(t){function e(t,r){var n;return s(this,e),o.w9.info(o.Ey.POLYFILLS,"[WEBSOCKET-POLYFILL] Creating WebSocket with URL:",t),(n=l(this,e,[t,r])).addEventListener("error",function(t){"function"==typeof n.onerror&&n.onerror(t)}),n.addEventListener("open",function(t){"function"==typeof n.onopen&&n.onopen(t)}),n.addEventListener("close",function(t){"function"==typeof n.onclose&&n.onclose(t)}),n.addEventListener("message",function(t){"function"==typeof n.onmessage&&n.onmessage(t)}),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),c(e,[{key:"sendPromise",value:function(t){var e=this;return new Promise(function(r,n){try{e.send(t),r()}catch(t){n(t)}})}}])}(window.WebSocket),o.w9.info(o.Ey.POLYFILLS,"[WEBSOCKET-POLYFILL] Using browser WebSocket implementation"));var d=n;const E=n;t.exports&&(t.exports=n,t.exports.WebSocket=n,t.exports.default=n),o.w9.info(o.Ey.POLYFILLS,"[WEBSOCKET-POLYFILL] WebSocket polyfill initialized")},526:(t,e)=>{e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=a(t),s=i[0],c=i[1],u=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,c)),l=0,f=c>0?s-4:s;for(r=0;r<f;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===c&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[l++]=255&e);1===c&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],s=16383,a=0,c=n-o;a<c;a+=s)i.push(u(t,a,a+s>c?c:a+s));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=i[s],n[i.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function u(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(255&t[i+2]),o.push(c(n));return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},606:t=>{var e,r,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(t){r=i}}();var a,c=[],u=!1,l=-1;function f(){u&&a&&(u=!1,a.length?c=a.concat(c):l=-1,c.length&&h())}function h(){if(!u){var t=s(f);u=!0;for(var e=c.length;e;){for(a=c,c=[];++l<e;)a&&a[l].run();l=-1,e=c.length}a=null,u=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function d(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new p(t,e)),1!==c.length||u||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=d,n.addListener=d,n.once=d,n.off=d,n.removeListener=d,n.removeAllListeners=d,n.emit=d,n.prependListener=d,n.prependOnceListener=d,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},770:(t,e,r)=>{r.d(e,{y8:()=>I});var n=r(859);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s(n.key),n)}}function s(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}var a=function(){function t(e){var r=e.sessionId,n=e.providerId,o=e.appId,i=e.logLine,s=e.type,a=e.eventType,c=e.logLevel,u=e.source,l=e.tabId,f=e.url,h=e.meta,p=e.time,d=void 0===p?null:p,E=e.deviceId;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sessionId=r,this.providerId=n,this.appId=o,this.logLine=i,this.type=s,this.eventType=a,this.logLevel=c,this.source=u,this.tabId=l,this.url=f,this.meta=h||void 0,this.time=d||new Date,this.deviceId=E}return e=t,n=[{key:"fromDateTimeToTimeStamp",value:function(t){return(1e6*t.getTime()).toString()}}],(r=[{key:"toJson",value:function(){var e={logLine:this.logLine,ts:t.fromDateTimeToTimeStamp(this.time),logLevel:this.logLevel,sessionId:this.sessionId,providerId:this.providerId,appId:this.appId,source:this.source,deviceId:this.deviceId};return this.type&&(e.type=this.type),this.eventType&&(e.eventType=this.eventType),this.tabId&&(e.tabId=this.tabId),this.url&&(e.url=this.url),this.meta&&(e.meta=this.meta),e}}])&&i(e.prototype,r),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n}();function c(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function l(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof a?n:a,u=Object.create(c.prototype);return f(u,"_invoke",function(r,n,o){var i,a,c,u=0,l=o||[],f=!1,h={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,r){return i=e,a=0,c=t,h.n=r,s}};function p(r,n){for(a=r,c=n,e=0;!f&&u&&!o&&e<l.length;e++){var o,i=l[e],p=h.p,d=i[2];r>3?(o=d===n)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=r<2&&p<i[1])?(a=0,h.v=n,h.n=i[1]):p<d&&(o=r<3||i[0]>n||n>d)&&(i[4]=r,i[5]=n,h.n=d,a=0))}if(o||r>1)return s;throw f=!0,n}return function(o,l,d){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&p(l,d),a=l,c=d;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(h.n=-1),p(a,c)):h.n=c:h.v=c);try{if(u=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=h.n<0)?c:r.call(n,h))!==s)break}catch(e){i=t,a=1,c=e}finally{u=1}}return{value:e,done:f}}}(r,o,i),!0),u}var s={};function a(){}function c(){}function u(){}e=Object.getPrototypeOf;var h=[][n]?e(e([][n]())):(f(e={},n,function(){return this}),e),p=u.prototype=a.prototype=Object.create(h);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,f(t,o,"GeneratorFunction")),t.prototype=Object.create(p),t}return c.prototype=u,f(p,"constructor",u),f(u,"constructor",c),c.displayName="GeneratorFunction",f(u,o,"GeneratorFunction"),f(p),f(p,o,"Generator"),f(p,n,function(){return this}),f(p,"toString",function(){return"[object Generator]"}),(l=function(){return{w:i,m:d}})()}function f(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}f=function(t,e,r,n){function i(e,r){f(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},f(t,e,r,n)}function h(t,e,r,n,o,i,s){try{var a=t[i](s),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,o)}function p(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function s(t){h(i,n,o,s,a,"next",t)}function a(t){h(i,n,o,s,a,"throw",t)}s(void 0)})}}function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?E(Object(r),!0).forEach(function(e){g(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function g(t,e,r){return(e=_(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function b(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,_(n.key),n)}}function _(t){var e=function(t,e){if("object"!=d(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==d(e)?e:e+""}var O=new(function(){return t=function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.logs=[],this.isSending=!1,this.maxBatchSize=20,this.flushInterval=5e3,this.flushIntervalId=null,this.config=y({},n.DEFAULT_LOG_CONFIG),this.deviceId=null;try{var r;"undefined"!=typeof chrome&&null!==(r=chrome.storage)&&void 0!==r&&r.local&&(chrome.storage.local.get([n.LOG_CONFIG_STORAGE_KEY],function(t){var r=null==t?void 0:t[n.LOG_CONFIG_STORAGE_KEY];r&&"object"===d(r)&&e.setConfig(r)}),chrome.storage.onChanged.addListener(function(t,r){if("local"===r&&t[n.LOG_CONFIG_STORAGE_KEY]){var o=t[n.LOG_CONFIG_STORAGE_KEY].newValue||{};e.setConfig(o)}}))}catch(t){}this.startFlushInterval()},e=[{key:"setConfig",value:function(t){this.config=y(y({},this.config),t)}},{key:"startFlushInterval",value:function(){var t=this;this.flushIntervalId&&clearInterval(this.flushIntervalId),this.flushIntervalId=setInterval(function(){return t.flush()},this.flushInterval)}},{key:"stopFlushInterval",value:function(){this.flushIntervalId&&(clearInterval(this.flushIntervalId),this.flushIntervalId=null)}},{key:"getDeviceLoggingId",value:(s=p(l().m(function t(){var e;return l().w(function(t){for(;;)switch(t.p=t.n){case 0:if(!this.deviceId){t.n=1;break}return t.a(2,this.deviceId);case 1:if(t.p=1,"undefined"==typeof chrome||!chrome.storage){t.n=3;break}return t.n=2,chrome.storage.local.get(["reclaim_device_id"]);case 2:if(!(e=t.v).reclaim_device_id){t.n=3;break}return this.deviceId=e.reclaim_device_id,t.a(2,this.deviceId);case 3:t.n=5;break;case 4:t.p=4,t.v;case 5:if(this.deviceId="undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():String(Date.now()),t.p=6,"undefined"==typeof chrome||!chrome.storage){t.n=7;break}return t.n=7,chrome.storage.local.set({reclaim_device_id:this.deviceId});case 7:t.n=9;break;case 8:t.p=8,t.v;case 9:return t.a(2,this.deviceId)}},t,this,[[6,8],[1,4]])})),function(){return s.apply(this,arguments)})},{key:"addLog",value:function(t){this.logs.push(t),this.logs.length>=this.maxBatchSize&&this.flush()}},{key:"shouldLog",value:function(t){return t<=(n.LOG_LEVEL_MAP[this.config.logLevel]||n.LOG_LEVEL.INFO)}},{key:"emitToConsole",value:function(t,e,r){var n="[".concat(t,"]"),o="".concat(n," ").concat(e);r?console.log(o,r):console.log(o)}},{key:"log",value:function(t){var e=t.message,r=t.logLevel,n=t.type,o=t.eventType,i=t.meta,s=t.sessionId,c=t.providerId,u=t.appId,l=t.source,f=t.tabId,h=t.url;if(e&&r){if(this.shouldLog(r)){this.config.consoleEnabled&&this.emitToConsole(r,e,i);var p=new a({sessionId:s||"unknown",providerId:c||"unknown",appId:u||"unknown",logLine:e,type:n,eventType:o,logLevel:r,source:l||this.config.source,tabId:f,url:h,meta:i,time:new Date});this.addLog(p)}}else console.error("Logger: message and logLevel are required")}},{key:"flush",value:(i=p(l().m(function t(){var e,r;return l().w(function(t){for(;;)switch(t.p=t.n){case 0:if(0!==this.logs.length&&!this.isSending){t.n=1;break}return t.a(2);case 1:return e=c(this.logs),this.logs=[],t.p=2,this.isSending=!0,t.n=3,this.sendLogs(e);case 3:t.n=5;break;case 4:t.p=4,r=t.v,console.error("Error flushing logs:",r),this.logs=[].concat(c(this.logs),c(e));case 5:return t.p=5,this.isSending=!1,t.f(5);case 6:return t.a(2)}},t,this,[[2,4,5,6]])})),function(){return i.apply(this,arguments)})},{key:"sendLogs",value:(o=p(l().m(function t(e){var r,o,i,s,a,c,u;return l().w(function(t){for(;;)switch(t.n){case 0:if(null!=e&&e.length){t.n=1;break}return t.a(2);case 1:return t.n=2,this.getDeviceLoggingId();case 2:return r=t.v,o=e.map(function(t){var e=t.toJson();return e.deviceId=e.deviceId||r,e}),i=JSON.stringify({logs:o,source:this.config.source,deviceId:r}),t.n=3,fetch(n.LOGGING_ENDPOINTS.DIAGNOSTIC_LOGGING,{method:"POST",headers:{"Content-Type":"application/json"},body:i});case 3:if((s=t.v).ok){t.n=5;break}return a=console,c="Failed to send ".concat(e.length," logs"),t.n=4,s.text();case 4:u=t.v,a.error.call(a,c,u);case 5:return t.a(2)}},t,this)})),function(t){return o.apply(this,arguments)})}],e&&b(t.prototype,e),r&&b(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,o,i,s}()),I=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=y({sessionId:"unknown",providerId:"unknown",appId:"unknown",source:(null===(t=O.config)||void 0===t?void 0:t.source)||"reclaim-extension-sdk"},e);return{get context(){return y({},r)},setContext:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(r,t)},log:function(t){O.log(y(y({},r),t))},info:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};O.log(y(y({},r),{},{logLevel:"INFO"},t))},debug:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};O.log(y(y({},r),{},{logLevel:"DEBUG"},t))},all:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};O.log(y(y({},r),{},{logLevel:"ALL"},t))},error:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};O.log(y(y({},r),{},{logLevel:"ALL"},t))}}}},859:(t,e,r)=>{r.r(e),r.d(e,{DEFAULT_LOG_CONFIG:()=>u,EVENT_TYPES:()=>s,LOGGING_ENDPOINTS:()=>n,LOG_CONFIG_STORAGE_KEY:()=>l,LOG_LEVEL:()=>a,LOG_LEVEL_MAP:()=>c,LOG_SOURCES:()=>i,LOG_TYPES:()=>o});var n={DIAGNOSTIC_LOGGING:"http://localhost:8001/api/logs"},o={BACKGROUND:"reclaim_browser_extension.BackgroundProcess",CONTENT:"reclaim_browser_extension.ContentScript",POPUP:"reclaim_browser_extension.Popup",INIT:"reclaim_browser_extension.Initialization",VERIFICATION:"reclaim_browser_extension.Verification",FETCH_DATA:"reclaim_browser_extension.FetchData",PROVIDER_DATA:"reclaim_browser_extension.ProviderData",CLAIM_CREATION:"reclaim_browser_extension.ClaimCreation",PROOF_GENERATION:"reclaim_browser_extension.ProofGeneration",PROOF_SUBMISSION:"reclaim_browser_extension.ProofSubmission",PROOF_VERIFICATION:"reclaim_browser_extension.ProofVerification",OFFSCREEN:"reclaim_browser_extension.Offscreen"},i={BACKGROUND:"background",CONTENT:"content",OFFSCREEN:"offscreen",POPUP:"popup",INJECTION:"injection"},s={IS_RECLAIM_EXTENSION_SDK:"IS_RECLAIM_EXTENSION_SDK",VERIFICATION_FLOW_STARTED:"VERIFICATION_FLOW_STARTED",RECLAIM_VERIFICATION_DISMISSED:"RECLAIM_VERIFICATION_DISMISSED",RECLAIM_VERIFICATION_PROVIDER_LOAD_EXCEPTION:"RECLAIM_VERIFICATION_PROVIDER_LOAD_EXCEPTION",REQUEST_MATCHED:"REQUEST_MATCHED",RESPONSE_MATCH_FAILED:"RESPONSE_MATCH_FAILED",X_PATH_MATCH_REQUIREMENT_FAILED:"X_PATH_MATCH_REQUIREMENT_FAILED",JSON_PATH_MATCH_REQUIREMENT_FAILED:"JSON_PATH_MATCH_REQUIREMENT_FAILED",REGEX_MATCH_REQUIREMENT_FAILED:"REGEX_MATCH_REQUIREMENT_FAILED",FILTERED_REQUEST_FOUND:"FILTERED_REQUEST_FOUND",FILTER_REQUEST_ERROR:"FILTER_REQUEST_ERROR",STARTING_CLAIM_CREATION:"STARTING_CLAIM_CREATION",CLAIM_CREATION_STARTED:"CLAIM_CREATION_STARTED",CLAIM_CREATION_SUCCESS:"CLAIM_CREATION_SUCCESS",CLAIM_CREATION_FAILED:"CLAIM_CREATION_FAILED",CLAIM_PARAMETER_VALIDATION_FAILED_EXCEPTION:"CLAIM_PARAMETER_VALIDATION_FAILED_EXCEPTION",OFFSCREEN_DOCUMENT_READY:"OFFSCREEN_DOCUMENT_READY",OFFSCREEN_DOCUMENT_NOT_READY_EXCEPTION:"OFFSCREEN_DOCUMENT_NOT_READY_EXCEPTION",PROOF_GENERATION_STARTED:"PROOF_GENERATION_STARTED",PROOF_GENERATION_SUCCESS:"PROOF_GENERATION_SUCCESS",PROOF_GENERATION_ABORTED:"PROOF_GENERATION_ABORTED",PROOF_GENERATION_FAILED:"PROOF_GENERATION_FAILED",RESULT_RECEIVED:"RESULT_RECEIVED",SUBMITTING_PROOF:"SUBMITTING_PROOF",SUBMITTING_PROOF_TO_CALLBACK_URL:"SUBMITTING_PROOF_TO_CALLBACK_URL",SUBMITTING_PROOF_TO_CALLBACK_URL_SUCCESS:"SUBMITTING_PROOF_TO_CALLBACK_URL_SUCCESS",SUBMITTING_PROOF_TO_CALLBACK_URL_FAILED:"SUBMITTING_PROOF_TO_CALLBACK_URL_FAILED",PROOF_SUBMISSION_FAILED:"PROOF_SUBMISSION_FAILED",PROOF_SUBMITTED:"PROOF_SUBMITTED",VERIFICATION_FLOW_FAILED:"VERIFICATION_FLOW_FAILED",TAB_NOT_MANAGED_BY_EXTENSION_EXCEPTION:"TAB_NOT_MANAGED_BY_EXTENSION_EXCEPTION",INJECTION_SCRIPT_SET_IN_LOCAL_STORAGE_FAILED:"INJECTION_SCRIPT_SET_IN_LOCAL_STORAGE_FAILED",VERIFICATION_POPUP_ERROR:"VERIFICATION_POPUP_ERROR",UPDATE_SESSION_STATUS_ERROR:"UPDATE_SESSION_STATUS_ERROR"},a={INFO:10,DEBUG:20,ALL:30},c={INFO:a.INFO,DEBUG:a.DEBUG,ALL:a.ALL},u={logLevel:"INFO",consoleEnabled:!1,source:"reclaim-extension-sdk"},l="reclaim_extension_sdk_log_config"},952:(t,e,r)=>{r.d(e,{wx:()=>o,J_:()=>n});var n={CONTENT_SCRIPT:"content-script",BACKGROUND:"background",OFFSCREEN:"offscreen"},o={START_VERIFICATION:"START_VERIFICATION",CANCEL_VERIFICATION:"CANCEL_VERIFICATION",GENERATE_PROOF_REQUEST:"GENERATE_PROOF_REQUEST",CLAIM_CREATION_REQUESTED:"CLAIM_CREATION_REQUESTED",CLAIM_CREATION_SUCCESS:"CLAIM_CREATION_SUCCESS",CLAIM_CREATION_FAILED:"CLAIM_CREATION_FAILED",PROOF_GENERATION_STARTED:"PROOF_GENERATION_STARTED",PROOF_GENERATION_SUCCESS:"PROOF_GENERATION_SUCCESS",PROOF_GENERATION_FAILED:"PROOF_GENERATION_FAILED",PROOF_SUBMITTED:"PROOF_SUBMITTED",PROOF_SUBMISSION_FAILED:"PROOF_SUBMISSION_FAILED",GENERATE_PROOF:"GENERATE_PROOF",GENERATED_PROOF_RESPONSE:"GENERATED_PROOF_RESPONSE",GENERATE_CLAIM_ON_ATTESTOR:"GENERATE_CLAIM_ON_ATTESTOR",GET_PRIVATE_KEY:"GET_PRIVATE_KEY",GET_PRIVATE_KEY_RESPONSE:"GET_PRIVATE_KEY_RESPONSE",SHOW_PROVIDER_VERIFICATION_POPUP:"SHOW_PROVIDER_VERIFICATION_POPUP",OFFSCREEN_DOCUMENT_READY:"OFFSCREEN_DOCUMENT_READY",GENERATE_PROOF_RESPONSE:"GENERATE_PROOF_RESPONSE",PING_OFFSCREEN:"PING_OFFSCREEN",CLOSE_CURRENT_TAB:"CLOSE_CURRENT_TAB",GET_CURRENT_TAB_ID:"GET_CURRENT_TAB_ID",REQUEST_PROVIDER_DATA:"REQUEST_PROVIDER_DATA",PROVIDER_DATA_READY:"PROVIDER_DATA_READY",CONTENT_SCRIPT_LOADED:"CONTENT_SCRIPT_LOADED",SHOULD_INITIALIZE:"SHOULD_INITIALIZE",CHECK_IF_MANAGED_TAB:"CHECK_IF_MANAGED_TAB",FILTERED_REQUEST_FOUND:"FILTERED_REQUEST_FOUND",INTERCEPTED_REQUEST_AND_RESPONSE:"INTERCEPTED_REQUEST_AND_RESPONSE",UPDATE_PUBLIC_DATA:"UPDATE_PUBLIC_DATA",UPDATE_EXPECT_MANY_CLAIMS:"UPDATE_EXPECT_MANY_CLAIMS",GET_PARAMETERS:"GET_PARAMETERS",REPORT_PROVIDER_ERROR:"REPORT_PROVIDER_ERROR",REQUEST_CLAIM:"REQUEST_CLAIM",INJECT_VIA_SCRIPTING:"INJECT_VIA_SCRIPTING"}},997:(t,e,r)=>{var n=r(287),o=r(606),i=r.n(o),s=r(153);function a(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var a=n&&n.prototype instanceof u?n:u,l=Object.create(a.prototype);return c(l,"_invoke",function(r,n,o){var i,a,c,u=0,l=o||[],f=!1,h={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,r){return i=e,a=0,c=t,h.n=r,s}};function p(r,n){for(a=r,c=n,e=0;!f&&u&&!o&&e<l.length;e++){var o,i=l[e],p=h.p,d=i[2];r>3?(o=d===n)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=r<2&&p<i[1])?(a=0,h.v=n,h.n=i[1]):p<d&&(o=r<3||i[0]>n||n>d)&&(i[4]=r,i[5]=n,h.n=d,a=0))}if(o||r>1)return s;throw f=!0,n}return function(o,l,d){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&p(l,d),a=l,c=d;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(h.n=-1),p(a,c)):h.n=c:h.v=c);try{if(u=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=h.n<0)?c:r.call(n,h))!==s)break}catch(e){i=t,a=1,c=e}finally{u=1}}return{value:e,done:f}}}(r,o,i),!0),l}var s={};function u(){}function l(){}function f(){}e=Object.getPrototypeOf;var h=[][n]?e(e([][n]())):(c(e={},n,function(){return this}),e),p=f.prototype=u.prototype=Object.create(h);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,c(t,o,"GeneratorFunction")),t.prototype=Object.create(p),t}return l.prototype=f,c(p,"constructor",f),c(f,"constructor",l),l.displayName="GeneratorFunction",c(f,o,"GeneratorFunction"),c(p),c(p,o,"Generator"),c(p,n,function(){return this}),c(p,"toString",function(){return"[object Generator]"}),(a=function(){return{w:i,m:d}})()}function c(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}c=function(t,e,r,n){function i(e,r){c(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},c(t,e,r,n)}function u(t,e,r,n,o,i,s){try{var a=t[i](s),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,o)}function l(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function s(t){u(i,n,o,s,a,"next",t)}function a(t){u(i,n,o,s,a,"throw",t)}s(void 0)})}}var f,h,p,d="undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==d?d:Function("return this")(),E="undefined"==typeof window,y="undefined"!=typeof document&&void 0!==document.contentType;if(d.Buffer=d.Buffer||n.hp,d.process=d.process||i(),void 0!==d.WebSocket||y)y?s.w9.info(s.Ey.POLYFILLS,"Skipping WebSocket in content script context"):s.w9.info(s.Ey.POLYFILLS,"Using native WebSocket implementation");else try{var g=r(296).WebSocket;d.WebSocket=g,s.w9.info(s.Ey.POLYFILLS,"WebSocket polyfill added to global")}catch(t){s.w9.warn(s.Ey.POLYFILLS,"Failed to load WebSocket polyfill:",t)}if(d.process&&(d.process.browser=!0),"function"!=typeof d.require)d.require=function(t){switch(t){case"ws":if(y)return s.w9.info(s.Ey.POLYFILLS,"Blocking ws module in content script"),{};try{return{WebSocket:r(296).WebSocket}}catch(t){return s.w9.warn(s.Ey.POLYFILLS,"Failed to load WebSocket for ws module:",t),{}}case"fs":return d.fs;case"path":return d.path;case"os":return d.os;case"crypto":return d.crypto;case"worker_threads":case"koffi":case"re2":return{};default:return console.warn("Mock require called for module: ".concat(t)),{}}};else{var b=d.require;d.require=function(t){if("ws"===t){if(y)return s.w9.info(s.Ey.POLYFILLS,"Blocking ws module in content script"),{};try{return{WebSocket:r(296).WebSocket}}catch(t){return s.w9.warn(s.Ey.POLYFILLS,"Failed to load WebSocket for ws module:",t),{}}}try{return b(t)}catch(e){return s.w9.warn(s.Ey.POLYFILLS,"Failed to require module: ".concat(t)),{}}}}if(void 0!==i()&&(i().browser=!0,i().version||(i().version="v16.0.0"),i().cwd||(i().cwd=function(){return"/"})),void 0===d.global&&(d.global=d),void 0===d.crypto&&(d.crypto={}),void 0===d.crypto.getRandomValues&&(d.crypto.getRandomValues=function(t){for(var e=new Uint8Array(t.length),r=0;r<e.length;r++)e[r]=Math.floor(256*Math.random());return e}),void 0===d.crypto.subtle&&(s.w9.warn(s.Ey.POLYFILLS,"WebCrypto subtle API not available. Some functionality may not work."),d.crypto.subtle={digest:(f=l(a().m(function t(e,r){var n,o,i;return a().w(function(t){for(;;)if(0===t.n){for(s.w9.warn(s.Ey.POLYFILLS,"Crypto subtle digest (".concat(e,") called with browser fallback")),n=Array.from(new Uint8Array(r)).reduce(function(t,e){return 31*t+e&4294967295},0),o=new Uint8Array(32),i=0;i<32;i++)o[i]=n>>8*i&255;return t.a(2,o.buffer)}},t)})),function(t,e){return f.apply(this,arguments)})}),!E){var _=function(t,e){return"string"==typeof t&&t.startsWith("node:")&&(t=t.replace(/^node:/,"")),new O(t,e)};void 0===d.domain&&(d.domain={create:function(){return{run:function(t){return t()},on:function(){},bind:function(t){return t}}}});var O=d.URL;_.prototype=O.prototype;try{Object.getOwnPropertyNames(O).forEach(function(t){if("prototype"!==t&&"constructor"!==t)try{_[t]=O[t]}catch(t){}})}catch(t){s.w9.warn(s.Ey.POLYFILLS,"Could not copy all URL static properties:",t)}try{d.URL=_}catch(t){s.w9.warn(s.Ey.POLYFILLS,"Could not override URL constructor:",t)}}void 0===d.module&&(d.module={exports:{}}),d.fs=d.fs||{readFileSync:function(t){throw s.w9.warn(s.Ey.POLYFILLS,"Attempted to readFileSync: ".concat(t)),new Error("fs.readFileSync is not available in this environment")},writeFileSync:function(t,e){s.w9.warn(s.Ey.POLYFILLS,"Attempted to writeFileSync: ".concat(t))},existsSync:function(t){return s.w9.warn(s.Ey.POLYFILLS,"Attempted to check if file exists: ".concat(t)),!1},promises:{readFile:(p=l(a().m(function t(e){return a().w(function(t){for(;;)switch(t.n){case 0:throw s.w9.warn(s.Ey.POLYFILLS,"Attempted to readFile: ".concat(e)),new Error("fs.promises.readFile is not available in this environment");case 1:return t.a(2)}},t)})),function(t){return p.apply(this,arguments)}),writeFile:(h=l(a().m(function t(e,r){return a().w(function(t){for(;;)switch(t.n){case 0:s.w9.warn(s.Ey.POLYFILLS,"Attempted to writeFile: ".concat(e));case 1:return t.a(2)}},t)})),function(t,e){return h.apply(this,arguments)})}},d.os=d.os||{tmpdir:function(){return"/tmp"},homedir:function(){return"/home/user"},platform:function(){return"browser"},type:function(){return"Browser"},cpus:function(){return[{model:"Browser CPU",speed:1e3}]},totalmem:function(){return 8589934592},freemem:function(){return 4294967296}},d.path=d.path||{join:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.join("/").replace(/\/+/g,"/")},resolve:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.join("/").replace(/\/+/g,"/")},dirname:function(t){return t.split("/").slice(0,-1).join("/")||"."},basename:function(t,e){var r=t.split("/").pop()||"";return e&&r.endsWith(e)&&(r=r.slice(0,-e.length)),r},extname:function(t){var e=t.split("/").pop()||"",r=e.lastIndexOf(".");return r<0?"":e.slice(r)},sep:"/"};n.hp,i()}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={id:n,loaded:!1,exports:{}};return t[n](i,i.exports,r),i.loaded=!0,i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};r(997);var n=r(952),o=r(770),i=r(859);var s=(0,o.y8)({sessionId:"unknown",providerId:"unknown",appId:"unknown",source:"reclaim-extension-sdk",type:i.LOG_TYPES.OFFSCREEN}),a=null,c=function(t){(null==t?void 0:t.action)===n.wx.OFFSCREEN_DOCUMENT_READY&&(null==t?void 0:t.source)===n.J_.OFFSCREEN&&(null==t?void 0:t.target)===n.J_.BACKGROUND&&(s.info({message:"[OFFSCREEN-MANAGER] Received offscreen ready signal (global listener).",logLevel:i.LOG_LEVEL.INFO,type:i.LOG_TYPES.OFFSCREEN}),a&&(clearTimeout(a),a=null))},u=function(){"undefined"!=typeof chrome&&chrome.runtime&&chrome.runtime.onMessage&&chrome.runtime.onMessage.addListener&&chrome.runtime.onMessage.hasListener&&(chrome.runtime.onMessage.hasListener(c)||chrome.runtime.onMessage.addListener(c))};"undefined"!=typeof chrome&&chrome.runtime&&chrome.runtime.onMessage&&u(),u();r(153);class l{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+l.version}static addUnaryOp(t){return l.max_unop_len=Math.max(t.length,l.max_unop_len),l.unary_ops[t]=1,l}static addBinaryOp(t,e,r){return l.max_binop_len=Math.max(t.length,l.max_binop_len),l.binary_ops[t]=e,r?l.right_associative.add(t):l.right_associative.delete(t),l}static addIdentifierChar(t){return l.additional_identifier_chars.add(t),l}static addLiteral(t,e){return l.literals[t]=e,l}static removeUnaryOp(t){return delete l.unary_ops[t],t.length===l.max_unop_len&&(l.max_unop_len=l.getMaxKeyLen(l.unary_ops)),l}static removeAllUnaryOps(){return l.unary_ops={},l.max_unop_len=0,l}static removeIdentifierChar(t){return l.additional_identifier_chars.delete(t),l}static removeBinaryOp(t){return delete l.binary_ops[t],t.length===l.max_binop_len&&(l.max_binop_len=l.getMaxKeyLen(l.binary_ops)),l.right_associative.delete(t),l}static removeAllBinaryOps(){return l.binary_ops={},l.max_binop_len=0,l}static removeLiteral(t){return delete l.literals[t],l}static removeAllLiterals(){return l.literals={},l}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new l(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(t=>t.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return l.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!l.binary_ops[String.fromCharCode(t)]||l.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return l.isIdentifierStart(t)||l.isDecimalDigit(t)}throwError(t){const e=new Error(t+" at character "+this.index);throw e.index=this.index,e.description=t,e}runHook(t,e){if(l.hooks[t]){const r={context:this,node:e};return l.hooks.run(t,r),r.node}return e}searchHook(t){if(l.hooks[t]){const e={context:this};return l.hooks[t].find(function(t){return t.call(e.context,e),e.node}),e.node}}gobbleSpaces(){let t=this.code;for(;t===l.SPACE_CODE||t===l.TAB_CODE||t===l.LF_CODE||t===l.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const t=this.gobbleExpressions(),e=1===t.length?t[0]:{type:l.COMPOUND,body:t};return this.runHook("after-all",e)}gobbleExpressions(t){let e,r,n=[];for(;this.index<this.expr.length;)if(e=this.code,e===l.SEMCOL_CODE||e===l.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())n.push(r);else if(this.index<this.expr.length){if(e===t)break;this.throwError('Unexpected "'+this.char+'"')}return n}gobbleExpression(){const t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,l.max_binop_len),e=t.length;for(;e>0;){if(l.binary_ops.hasOwnProperty(t)&&(!l.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!l.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=e,t;t=t.substr(0,--e)}return!1}gobbleBinaryExpression(){let t,e,r,n,o,i,s,a,c;if(i=this.gobbleToken(),!i)return i;if(e=this.gobbleBinaryOp(),!e)return i;for(o={value:e,prec:l.binaryPrecedence(e),right_a:l.right_associative.has(e)},s=this.gobbleToken(),s||this.throwError("Expected expression after "+e),n=[i,o,s];e=this.gobbleBinaryOp();){if(r=l.binaryPrecedence(e),0===r){this.index-=e.length;break}o={value:e,prec:r,right_a:l.right_associative.has(e)},c=e;const a=t=>o.right_a&&t.right_a?r>t.prec:r<=t.prec;for(;n.length>2&&a(n[n.length-2]);)s=n.pop(),e=n.pop().value,i=n.pop(),t={type:l.BINARY_EXP,operator:e,left:i,right:s},n.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+c),n.push(o,t)}for(a=n.length-1,t=n[a];a>1;)t={type:l.BINARY_EXP,operator:n[a-1].value,left:n[a-2],right:t},a-=2;return t}gobbleToken(){let t,e,r,n;if(this.gobbleSpaces(),n=this.searchHook("gobble-token"),n)return this.runHook("after-token",n);if(t=this.code,l.isDecimalDigit(t)||t===l.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===l.SQUOTE_CODE||t===l.DQUOTE_CODE)n=this.gobbleStringLiteral();else if(t===l.OBRACK_CODE)n=this.gobbleArray();else{for(e=this.expr.substr(this.index,l.max_unop_len),r=e.length;r>0;){if(l.unary_ops.hasOwnProperty(e)&&(!l.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!l.isIdentifierPart(this.expr.charCodeAt(this.index+e.length)))){this.index+=r;const t=this.gobbleToken();return t||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:l.UNARY_EXP,operator:e,argument:t,prefix:!0})}e=e.substr(0,--r)}l.isIdentifierStart(t)?(n=this.gobbleIdentifier(),l.literals.hasOwnProperty(n.name)?n={type:l.LITERAL,value:l.literals[n.name],raw:n.name}:n.name===l.this_str&&(n={type:l.THIS_EXP})):t===l.OPAREN_CODE&&(n=this.gobbleGroup())}return n?(n=this.gobbleTokenProperty(n),this.runHook("after-token",n)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let e=this.code;for(;e===l.PERIOD_CODE||e===l.OBRACK_CODE||e===l.OPAREN_CODE||e===l.QUMARK_CODE;){let r;if(e===l.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==l.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),e=this.code}this.index++,e===l.OBRACK_CODE?((t={type:l.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),e=this.code,e!==l.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):e===l.OPAREN_CODE?t={type:l.CALL_EXP,arguments:this.gobbleArguments(l.CPAREN_CODE),callee:t}:(e===l.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),t={type:l.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),r&&(t.optional=!0),this.gobbleSpaces(),e=this.code}return t}gobbleNumericLiteral(){let t,e,r="";for(;l.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);if(this.code===l.PERIOD_CODE)for(r+=this.expr.charAt(this.index++);l.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);if(t=this.char,"e"===t||"E"===t){for(r+=this.expr.charAt(this.index++),t=this.char,"+"!==t&&"-"!==t||(r+=this.expr.charAt(this.index++));l.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);l.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+r+this.char+")")}return e=this.code,l.isIdentifierStart(e)?this.throwError("Variable names cannot start with a number ("+r+this.char+")"):(e===l.PERIOD_CODE||1===r.length&&r.charCodeAt(0)===l.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:l.LITERAL,value:parseFloat(r),raw:r}}gobbleStringLiteral(){let t="";const e=this.index,r=this.expr.charAt(this.index++);let n=!1;for(;this.index<this.expr.length;){let e=this.expr.charAt(this.index++);if(e===r){n=!0;break}if("\\"===e)switch(e=this.expr.charAt(this.index++),e){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=e}else t+=e}return n||this.throwError('Unclosed quote after "'+t+'"'),{type:l.LITERAL,value:t,raw:this.expr.substring(e,this.index)}}gobbleIdentifier(){let t=this.code,e=this.index;for(l.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,l.isIdentifierPart(t));)this.index++;return{type:l.IDENTIFIER,name:this.expr.slice(e,this.index)}}gobbleArguments(t){const e=[];let r=!1,n=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===t){r=!0,this.index++,t===l.CPAREN_CODE&&n&&n>=e.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}if(o===l.COMMA_CODE){if(this.index++,n++,n!==e.length)if(t===l.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===l.CBRACK_CODE)for(let t=e.length;t<n;t++)e.push(null)}else if(e.length!==n&&0!==n)this.throwError("Expected comma");else{const t=this.gobbleExpression();t&&t.type!==l.COMPOUND||this.throwError("Expected comma"),e.push(t)}}return r||this.throwError("Expected "+String.fromCharCode(t)),e}gobbleGroup(){this.index++;let t=this.gobbleExpressions(l.CPAREN_CODE);if(this.code===l.CPAREN_CODE)return this.index++,1===t.length?t[0]:!!t.length&&{type:l.SEQUENCE_EXP,expressions:t};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:l.ARRAY_EXP,elements:this.gobbleArguments(l.CBRACK_CODE)}}}const f=new class{add(t,e,r){if("string"!=typeof arguments[0])for(let t in arguments[0])this.add(t,arguments[0][t],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(t){this[t]=this[t]||[],e&&this[t][r?"unshift":"push"](e)},this)}run(t,e){this[t]=this[t]||[],this[t].forEach(function(t){t.call(e&&e.context?e.context:e,e)})}};Object.assign(l,{hooks:f,plugins:new class{constructor(t){this.jsep=t,this.registered={}}register(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(t=>{if("object"!=typeof t||!t.name||!t.init)throw new Error("Invalid JSEP plugin format");this.registered[t.name]||(t.init(this.jsep),this.registered[t.name]=t)})}}(l),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),l.max_unop_len=l.getMaxKeyLen(l.unary_ops),l.max_binop_len=l.getMaxKeyLen(l.binary_ops);const h=t=>new l(t).parse(),p=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(l).filter(t=>!p.includes(t)&&void 0===h[t]).forEach(t=>{h[t]=l[t]}),h.Jsep=l;var d={name:"ternary",init(t){t.hooks.add("after-expression",function(e){if(e.node&&this.code===t.QUMARK_CODE){this.index++;const r=e.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===t.COLON_CODE){this.index++;const o=this.gobbleExpression();if(o||this.throwError("Expected expression"),e.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&t.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&t.binary_ops[n.right.operator]<=.9;)n=n.right;e.node.test=n.right,n.right=e.node,e.node=r}}else this.throwError("Expected :")}})}};h.plugins.register(d);var E={name:"regex",init(t){t.hooks.add("gobble-token",function(e){if(47===this.code){const r=++this.index;let n=!1;for(;this.index<this.expr.length;){if(47===this.code&&!n){const n=this.expr.slice(r,this.index);let o,i="";for(;++this.index<this.expr.length;){const t=this.code;if(!(t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57))break;i+=this.char}try{o=new RegExp(n,i)}catch(t){this.throwError(t.message)}return e.node={type:t.LITERAL,value:o,raw:this.expr.slice(r-1,this.index)},e.node=this.gobbleTokenProperty(e.node),e.node}this.code===t.OBRACK_CODE?n=!0:n&&this.code===t.CBRACK_CODE&&(n=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}};const y={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|=","||=","&&=","??="]),updateOperators:[43,45],assignmentPrecedence:.9,init(t){const e=[t.IDENTIFIER,t.MEMBER_EXP];function r(t){y.assignmentOperators.has(t.operator)?(t.type="AssignmentExpression",r(t.left),r(t.right)):t.operator||Object.values(t).forEach(t=>{t&&"object"==typeof t&&r(t)})}y.assignmentOperators.forEach(e=>t.addBinaryOp(e,y.assignmentPrecedence,!0)),t.hooks.add("gobble-token",function(t){const r=this.code;y.updateOperators.some(t=>t===r&&t===this.expr.charCodeAt(this.index+1))&&(this.index+=2,t.node={type:"UpdateExpression",operator:43===r?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},t.node.argument&&e.includes(t.node.argument.type)||this.throwError(`Unexpected ${t.node.operator}`))}),t.hooks.add("after-token",function(t){if(t.node){const r=this.code;y.updateOperators.some(t=>t===r&&t===this.expr.charCodeAt(this.index+1))&&(e.includes(t.node.type)||this.throwError(`Unexpected ${t.node.operator}`),this.index+=2,t.node={type:"UpdateExpression",operator:43===r?"++":"--",argument:t.node,prefix:!1})}}),t.hooks.add("after-expression",function(t){t.node&&r(t.node)})}};h.plugins.register(E,y),h.addUnaryOp("typeof"),h.addLiteral("null",null),h.addLiteral("undefined",void 0);const g=new Set(["constructor","__proto__","__defineGetter__","__defineSetter__"]),b={evalAst(t,e){switch(t.type){case"BinaryExpression":case"LogicalExpression":return b.evalBinaryExpression(t,e);case"Compound":return b.evalCompound(t,e);case"ConditionalExpression":return b.evalConditionalExpression(t,e);case"Identifier":return b.evalIdentifier(t,e);case"Literal":return b.evalLiteral(t,e);case"MemberExpression":return b.evalMemberExpression(t,e);case"UnaryExpression":return b.evalUnaryExpression(t,e);case"ArrayExpression":return b.evalArrayExpression(t,e);case"CallExpression":return b.evalCallExpression(t,e);case"AssignmentExpression":return b.evalAssignmentExpression(t,e);default:throw SyntaxError("Unexpected expression",t)}},evalBinaryExpression:(t,e)=>({"||":(t,e)=>t||e(),"&&":(t,e)=>t&&e(),"|":(t,e)=>t|e(),"^":(t,e)=>t^e(),"&":(t,e)=>t&e(),"==":(t,e)=>t==e(),"!=":(t,e)=>t!=e(),"===":(t,e)=>t===e(),"!==":(t,e)=>t!==e(),"<":(t,e)=>t<e(),">":(t,e)=>t>e(),"<=":(t,e)=>t<=e(),">=":(t,e)=>t>=e(),"<<":(t,e)=>t<<e(),">>":(t,e)=>t>>e(),">>>":(t,e)=>t>>>e(),"+":(t,e)=>t+e(),"-":(t,e)=>t-e(),"*":(t,e)=>t*e(),"/":(t,e)=>t/e(),"%":(t,e)=>t%e()}[t.operator](b.evalAst(t.left,e),()=>b.evalAst(t.right,e))),evalCompound(t,e){let r;for(let n=0;n<t.body.length;n++){"Identifier"===t.body[n].type&&["var","let","const"].includes(t.body[n].name)&&t.body[n+1]&&"AssignmentExpression"===t.body[n+1].type&&(n+=1);const o=t.body[n];r=b.evalAst(o,e)}return r},evalConditionalExpression:(t,e)=>b.evalAst(t.test,e)?b.evalAst(t.consequent,e):b.evalAst(t.alternate,e),evalIdentifier(t,e){if(Object.hasOwn(e,t.name))return e[t.name];throw ReferenceError(`${t.name} is not defined`)},evalLiteral:t=>t.value,evalMemberExpression(t,e){const r=String(t.computed?b.evalAst(t.property):t.property.name),n=b.evalAst(t.object,e);if(null==n)throw TypeError(`Cannot read properties of ${n} (reading '${r}')`);if(!Object.hasOwn(n,r)&&g.has(r))throw TypeError(`Cannot read properties of ${n} (reading '${r}')`);const o=n[r];return"function"==typeof o?o.bind(n):o},evalUnaryExpression:(t,e)=>({"-":t=>-b.evalAst(t,e),"!":t=>!b.evalAst(t,e),"~":t=>~b.evalAst(t,e),"+":t=>+b.evalAst(t,e),typeof:t=>typeof b.evalAst(t,e)}[t.operator](t.argument)),evalArrayExpression:(t,e)=>t.elements.map(t=>b.evalAst(t,e)),evalCallExpression(t,e){const r=t.arguments.map(t=>b.evalAst(t,e));return b.evalAst(t.callee,e)(...r)},evalAssignmentExpression(t,e){if("Identifier"!==t.left.type)throw SyntaxError("Invalid left-hand side in assignment");const r=t.left.name,n=b.evalAst(t.right,e);return e[r]=n,e[r]}};function _(t,e){return(t=t.slice()).push(e),t}function O(t,e){return(e=e.slice()).unshift(t),e}class I extends Error{constructor(t){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=t,this.name="NewError"}}function v(t,e,r,n,o){if(!(this instanceof v))try{return new v(t,e,r,n,o)}catch(t){if(!t.avoidNew)throw t;return t.value}"string"==typeof t&&(o=n,n=r,r=e,e=t,t=null);const i=t&&"object"==typeof t;if(t=t||{},this.json=t.json||r,this.path=t.path||e,this.resultType=t.resultType||"value",this.flatten=t.flatten||!1,this.wrap=!Object.hasOwn(t,"wrap")||t.wrap,this.sandbox=t.sandbox||{},this.eval=void 0===t.eval?"safe":t.eval,this.ignoreEvalErrors=void 0!==t.ignoreEvalErrors&&t.ignoreEvalErrors,this.parent=t.parent||null,this.parentProperty=t.parentProperty||null,this.callback=t.callback||n||null,this.otherTypeCallback=t.otherTypeCallback||o||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},!1!==t.autostart){const n={path:i?t.path:e};i?"json"in t&&(n.json=t.json):n.json=r;const o=this.evaluate(n);if(!o||"object"!=typeof o)throw new I(o);return o}}v.prototype.evaluate=function(t,e,r,n){let o=this.parent,i=this.parentProperty,{flatten:s,wrap:a}=this;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=n||this.otherTypeCallback,e=e||this.json,(t=t||this.path)&&"object"==typeof t&&!Array.isArray(t)){if(!t.path&&""!==t.path)throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!Object.hasOwn(t,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:e}=t),s=Object.hasOwn(t,"flatten")?t.flatten:s,this.currResultType=Object.hasOwn(t,"resultType")?t.resultType:this.currResultType,this.currSandbox=Object.hasOwn(t,"sandbox")?t.sandbox:this.currSandbox,a=Object.hasOwn(t,"wrap")?t.wrap:a,this.currEval=Object.hasOwn(t,"eval")?t.eval:this.currEval,r=Object.hasOwn(t,"callback")?t.callback:r,this.currOtherTypeCallback=Object.hasOwn(t,"otherTypeCallback")?t.otherTypeCallback:this.currOtherTypeCallback,o=Object.hasOwn(t,"parent")?t.parent:o,i=Object.hasOwn(t,"parentProperty")?t.parentProperty:i,t=t.path}if(o=o||null,i=i||null,Array.isArray(t)&&(t=v.toPathString(t)),!t&&""!==t||!e)return;const c=v.toPathArray(t);"$"===c[0]&&c.length>1&&c.shift(),this._hasParentSelector=null;const u=this._trace(c,e,["$"],o,i,r).filter(function(t){return t&&!t.isParentSelector});return u.length?a||1!==u.length||u[0].hasArrExpr?u.reduce((t,e)=>{const r=this._getPreferredOutput(e);return s&&Array.isArray(r)?t=t.concat(r):t.push(r),t},[]):this._getPreferredOutput(u[0]):a?[]:void 0},v.prototype._getPreferredOutput=function(t){const e=this.currResultType;switch(e){case"all":{const e=Array.isArray(t.path)?t.path:v.toPathArray(t.path);return t.pointer=v.toPointer(e),t.path="string"==typeof t.path?t.path:v.toPathString(t.path),t}case"value":case"parent":case"parentProperty":return t[e];case"path":return v.toPathString(t[e]);case"pointer":return v.toPointer(t.path);default:throw new TypeError("Unknown result type")}},v.prototype._handleCallback=function(t,e,r){if(e){const n=this._getPreferredOutput(t);t.path="string"==typeof t.path?t.path:v.toPathString(t.path),e(n,r,t)}},v.prototype._trace=function(t,e,r,n,o,i,s,a){let c;if(!t.length)return c={path:r,value:e,parent:n,parentProperty:o,hasArrExpr:s},this._handleCallback(c,i,"value"),c;const u=t[0],l=t.slice(1),f=[];function h(t){Array.isArray(t)?t.forEach(t=>{f.push(t)}):f.push(t)}if(("string"!=typeof u||a)&&e&&Object.hasOwn(e,u))h(this._trace(l,e[u],_(r,u),e,u,i,s));else if("*"===u)this._walk(e,t=>{h(this._trace(l,e[t],_(r,t),e,t,i,!0,!0))});else if(".."===u)h(this._trace(l,e,r,n,o,i,s)),this._walk(e,n=>{"object"==typeof e[n]&&h(this._trace(t.slice(),e[n],_(r,n),e,n,i,!0))});else{if("^"===u)return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:l,isParentSelector:!0};if("~"===u)return c={path:_(r,u),value:o,parent:n,parentProperty:null},this._handleCallback(c,i,"property"),c;if("$"===u)h(this._trace(l,e,r,null,null,i,s));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(u))h(this._slice(u,l,e,r,n,o,i));else if(0===u.indexOf("?(")){if(!1===this.currEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");const t=u.replace(/^\?\((.*?)\)$/u,"$1"),s=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(t);s?this._walk(e,t=>{const a=[s[2]],c=s[1]?e[t][s[1]]:e[t];this._trace(a,c,r,n,o,i,!0).length>0&&h(this._trace(l,e[t],_(r,t),e,t,i,!0))}):this._walk(e,s=>{this._eval(t,e[s],s,r,n,o)&&h(this._trace(l,e[s],_(r,s),e,s,i,!0))})}else if("("===u[0]){if(!1===this.currEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");h(this._trace(O(this._eval(u,e,r.at(-1),r.slice(0,-1),n,o),l),e,r,n,o,i,s))}else if("@"===u[0]){let t=!1;const s=u.slice(1,-2);switch(s){case"scalar":e&&["object","function"].includes(typeof e)||(t=!0);break;case"boolean":case"string":case"undefined":case"function":typeof e===s&&(t=!0);break;case"integer":!Number.isFinite(e)||e%1||(t=!0);break;case"number":Number.isFinite(e)&&(t=!0);break;case"nonFinite":"number"!=typeof e||Number.isFinite(e)||(t=!0);break;case"object":e&&typeof e===s&&(t=!0);break;case"array":Array.isArray(e)&&(t=!0);break;case"other":t=this.currOtherTypeCallback(e,r,n,o);break;case"null":null===e&&(t=!0);break;default:throw new TypeError("Unknown value type "+s)}if(t)return c={path:r,value:e,parent:n,parentProperty:o},this._handleCallback(c,i,"value"),c}else if("`"===u[0]&&e&&Object.hasOwn(e,u.slice(1))){const t=u.slice(1);h(this._trace(l,e[t],_(r,t),e,t,i,s,!0))}else if(u.includes(",")){const t=u.split(",");for(const s of t)h(this._trace(O(s,l),e,r,n,o,i,!0))}else!a&&e&&Object.hasOwn(e,u)&&h(this._trace(l,e[u],_(r,u),e,u,i,s,!0))}if(this._hasParentSelector)for(let t=0;t<f.length;t++){const r=f[t];if(r&&r.isParentSelector){const a=this._trace(r.expr,e,r.path,n,o,i,s);if(Array.isArray(a)){f[t]=a[0];const e=a.length;for(let r=1;r<e;r++)t++,f.splice(t,0,a[r])}else f[t]=a}}return f},v.prototype._walk=function(t,e){if(Array.isArray(t)){const r=t.length;for(let t=0;t<r;t++)e(t)}else t&&"object"==typeof t&&Object.keys(t).forEach(t=>{e(t)})},v.prototype._slice=function(t,e,r,n,o,i,s){if(!Array.isArray(r))return;const a=r.length,c=t.split(":"),u=c[2]&&Number.parseInt(c[2])||1;let l=c[0]&&Number.parseInt(c[0])||0,f=c[1]&&Number.parseInt(c[1])||a;l=l<0?Math.max(0,l+a):Math.min(a,l),f=f<0?Math.max(0,f+a):Math.min(a,f);const h=[];for(let t=l;t<f;t+=u){this._trace(O(t,e),r,n,o,i,s,!0).forEach(t=>{h.push(t)})}return h},v.prototype._eval=function(t,e,r,n,o,i){this.currSandbox._$_parentProperty=i,this.currSandbox._$_parent=o,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=e;const s=t.includes("@path");s&&(this.currSandbox._$_path=v.toPathString(n.concat([r])));const a=this.currEval+"Script:"+t;if(!v.cache[a]){let e=t.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");if(s&&(e=e.replaceAll("@path","_$_path")),"safe"===this.currEval||!0===this.currEval||void 0===this.currEval)v.cache[a]=new this.safeVm.Script(e);else if("native"===this.currEval)v.cache[a]=new this.vm.Script(e);else if("function"==typeof this.currEval&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){const t=this.currEval;v.cache[a]=new t(e)}else{if("function"!=typeof this.currEval)throw new TypeError(`Unknown "eval" property "${this.currEval}"`);v.cache[a]={runInNewContext:t=>this.currEval(e,t)}}}try{return v.cache[a].runInNewContext(this.currSandbox)}catch(e){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+e.message+": "+t)}},v.cache={},v.toPathString=function(t){const e=t,r=e.length;let n="$";for(let t=1;t<r;t++)/^(~|\^|@.*?\(\))$/u.test(e[t])||(n+=/^[0-9*]+$/u.test(e[t])?"["+e[t]+"]":"['"+e[t]+"']");return n},v.toPointer=function(t){const e=t,r=e.length;let n="";for(let t=1;t<r;t++)/^(~|\^|@.*?\(\))$/u.test(e[t])||(n+="/"+e[t].toString().replaceAll("~","~0").replaceAll("/","~1"));return n},v.toPathArray=function(t){const{cache:e}=v;if(e[t])return e[t].concat();const r=[],n=t.replaceAll(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu,";$&;").replaceAll(/[['](\??\(.*?\))[\]'](?!.\])/gu,function(t,e){return"[#"+(r.push(e)-1)+"]"}).replaceAll(/\[['"]([^'\]]*)['"]\]/gu,function(t,e){return"['"+e.replaceAll(".","%@%").replaceAll("~","%%@@%%")+"']"}).replaceAll("~",";~;").replaceAll(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replaceAll("%@%",".").replaceAll("%%@@%%","~").replaceAll(/(?:;)?(\^+)(?:;)?/gu,function(t,e){return";"+e.split("").join(";")+";"}).replaceAll(/;;;|;;/gu,";..;").replaceAll(/;$|'?\]|'$/gu,"").split(";").map(function(t){const e=t.match(/#(\d+)/u);return e&&e[1]?r[e[1]]:t});return e[t]=n,e[t].concat()},v.prototype.safeVm={Script:class{constructor(t){this.code=t,this.ast=h(this.code)}runInNewContext(t){const e=Object.assign(Object.create(null),t);return b.evalAst(this.ast,e)}}};v.prototype.vm={Script:class{constructor(t){this.code=t}runInNewContext(t){let e=this.code;const r=Object.keys(t),n=[];!function(t,e,r){const n=t.length;for(let o=0;o<n;o++)r(t[o])&&e.push(t.splice(o--,1)[0])}(r,n,e=>"function"==typeof t[e]);const o=r.map(e=>t[e]);e=n.reduce((e,r)=>{let n=t[r].toString();return/function/u.test(n)||(n="function "+n),"var "+r+"="+n+";"+e},"")+e,/(['"])use strict\1/u.test(e)||r.includes("arguments")||(e="var arguments = undefined;"+e),e=e.replace(/;\s*$/u,"");const i=e.lastIndexOf(";"),s=-1!==i?e.slice(0,i+1)+" return "+e.slice(i+1):" return "+e;return new Function(...r,s)(...o)}}};(0,o.y8)({sessionId:"unknown",providerId:"unknown",appId:"unknown",source:"reclaim-extension-sdk"});
|
|
8
|
+
const n=r(526),o=r(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=c,e.IS=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|E(t,e);let n=a(r);const o=n.write(t,e);o!==r&&(n=n.slice(0,o));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(Q(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return h(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Q(t,ArrayBuffer)||t&&Q(t.buffer,ArrayBuffer))return p(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(Q(t,SharedArrayBuffer)||t&&Q(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return c.from(n,e,r);const o=function(t){if(c.isBuffer(t)){const e=0|d(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!=typeof t.length||J(t.length)?a(0):h(t);if("Buffer"===t.type&&Array.isArray(t.data))return h(t.data)}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return l(t),a(t<0?0:0|d(t))}function h(t){const e=t.length<0?0:0|d(t.length),r=a(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function p(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,c.prototype),n}function d(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function E(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return W(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(t).length;default:if(o)return n?-1:W(t).length;e=(""+e).toLowerCase(),o=!0}}function y(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return m(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:_(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):_(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function _(t,e,r,n,o){let i,s=1,a=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){let n=-1;for(i=r;i<a;i++)if(u(t,i)===u(e,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===c)return n*s}else-1!==n&&(i-=i-n),n=-1}else for(r+c>a&&(r=a-c),i=r;i>=0;i--){let r=!0;for(let n=0;n<c;n++)if(u(t,i+n)!==u(e,n)){r=!1;break}if(r)return i}return-1}function O(t,e,r,n){r=Number(r)||0;const o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=e.length;let s;for(n>i/2&&(n=i/2),s=0;s<n;++s){const n=parseInt(e.substr(2*s,2),16);if(J(n))return s;t[r+s]=n}return s}function I(t,e,r,n){return X(W(e,t.length-r),t,r,n)}function v(t,e,r,n){return X(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function w(t,e,r,n){return X(H(e),t,r,n)}function A(t,e,r,n){return X(function(t,e){let r,n,o;const i=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function m(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);const n=[];let o=e;for(;o<r;){const e=t[o];let i=null,s=e>239?4:e>223?3:e>191?2:1;if(o+s<=r){let r,n,a,c;switch(s){case 1:e<128&&(i=e);break;case 2:r=t[o+1],128==(192&r)&&(c=(31&e)<<6|63&r,c>127&&(i=c));break;case 3:r=t[o+1],n=t[o+2],128==(192&r)&&128==(192&n)&&(c=(15&e)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:r=t[o+1],n=t[o+2],a=t[o+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,s=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=s}return function(t){const e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=S));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const 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}}(),c.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(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(t,e,r){return function(t,e,r){return l(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},c.allocUnsafe=function(t){return f(t)},c.allocUnsafeSlow=function(t){return f(t)},c.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==c.prototype},c.compare=function(t,e){if(Q(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),Q(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},c.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}},c.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=c.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(Q(e,Uint8Array))o+e.length>n.length?(c.isBuffer(e)||(e=c.from(e)),e.copy(n,o)):Uint8Array.prototype.set.call(n,e,o);else{if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},c.byteLength=E,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)g(this,e,e+1);return this},c.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},c.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},c.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):y.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){let t="";const r=e.IS;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(t,e,r,n,o){if(Q(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;let i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(i,s),u=this.slice(n,o),l=t.slice(e,r);for(let t=0;t<a;++t)if(u[t]!==l[t]){i=u[t],s=l[t];break}return i<s?-1:s<i?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return O(this,t,e,r);case"utf8":case"utf-8":return I(this,t,e,r);case"ascii":case"latin1":case"binary":return v(this,t,e,r);case"base64":return w(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function R(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function C(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function L(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=e;n<r;++n)o+=z[t[n]];return o}function P(t,e,r){const n=t.slice(e,r);let o="";for(let t=0;t<n.length-1;t+=2)o+=String.fromCharCode(n[t]+256*n[t+1]);return o}function x(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function N(t,e,r,n,o,i){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function F(t,e,r,n,o){Y(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function D(t,e,r,n,o){Y(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r+7]=i,i>>=8,t[r+6]=i,i>>=8,t[r+5]=i,i>>=8,t[r+4]=i;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function U(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function k(t,e,r,n,i){return e=+e,r>>>=0,i||U(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function B(t,e,r,n,i){return e=+e,r>>>=0,i||U(t,0,r,8),o.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||x(t,e,this.length);let n=this[t],o=1,i=0;for(;++i<e&&(o*=256);)n+=this[t+i]*o;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||x(t,e,this.length);let n=this[t+--e],o=1;for(;e>0&&(o*=256);)n+=this[t+--e]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(t,e){return t>>>=0,e||x(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||x(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||x(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||x(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||x(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readBigUInt64LE=q(function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||V(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))}),c.prototype.readBigUInt64BE=q(function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||V(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)}),c.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||x(t,e,this.length);let n=this[t],o=1,i=0;for(;++i<e&&(o*=256);)n+=this[t+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||x(t,e,this.length);let n=e,o=1,i=this[t+--n];for(;n>0&&(o*=256);)i+=this[t+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},c.prototype.readInt8=function(t,e){return t>>>=0,e||x(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||x(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){t>>>=0,e||x(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||x(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||x(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readBigInt64LE=q(function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||V(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)}),c.prototype.readBigInt64BE=q(function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||V(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)}),c.prototype.readFloatLE=function(t,e){return t>>>=0,e||x(t,4,this.length),o.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||x(t,4,this.length),o.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||x(t,8,this.length),o.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||x(t,8,this.length),o.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){N(this,t,e,r,Math.pow(2,8*r)-1,0)}let o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){N(this,t,e,r,Math.pow(2,8*r)-1,0)}let o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||N(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},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||N(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},c.prototype.writeBigUInt64LE=q(function(t,e=0){return F(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=q(function(t,e=0){return D(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,t,e,r,n-1,-n)}let o=0,i=1,s=0;for(this[e]=255&t;++o<r&&(i*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/i|0)-s&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,t,e,r,n-1,-n)}let o=r-1,i=1,s=0;for(this[e+o]=255&t;--o>=0&&(i*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/i|0)-s&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||N(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||N(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},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||N(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},c.prototype.writeBigInt64LE=q(function(t,e=0){return F(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=q(function(t,e=0){return D(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(t,e,r){return k(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return k(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return B(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return B(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const o=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),o},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=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&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{const i=c.isBuffer(t)?t:c.from(t,n),s=i.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=i[o%s]}return this};const M={};function j(t,e,r){M[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function G(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function Y(t,e,r,n,o,i){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let o;throw o=i>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new M.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,r){$(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||V(e,t.length-(r+1))}(n,o,i)}function $(t,e){if("number"!=typeof t)throw new M.ERR_INVALID_ARG_TYPE(e,"number",t)}function V(t,e,r){if(Math.floor(t)!==t)throw $(t,r),new M.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new M.ERR_BUFFER_OUT_OF_BOUNDS;throw new M.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}j("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),j("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=G(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=G(o)),o+="n"),n+=` It must be ${e}. Received ${o}`,n},RangeError);const K=/[^+/0-9A-Za-z-_]/g;function W(t,e){let r;e=e||1/0;const n=t.length;let o=null;const i=[];for(let s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function H(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function X(t,e,r,n){let o;for(o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function Q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function J(t){return t!=t}const z=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)e[n+o]=t[r]+t[o]}return e}();function q(t){return"undefined"==typeof BigInt?Z:t}function Z(){throw new Error("BigInt not supported")}},251(t,e){
|
|
9
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
10
|
+
e.read=function(t,e,r,n,o){var i,s,a=8*o-n-1,c=(1<<a)-1,u=c>>1,l=-7,f=r?o-1:0,h=r?-1:1,p=t[e+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+t[e+f],f+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=u}return(p?-1:1)*s*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var s,a,c,u=8*i-o-1,l=(1<<u)-1,f=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,E=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*c-1)*Math.pow(2,o),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;t[r+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,u+=o;u>0;t[r+p]=255&s,p+=d,s/=256,u-=8);t[r+p-d]|=128*E}},606(t){var e,r,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(t){r=i}}();var a,c=[],u=!1,l=-1;function f(){u&&a&&(u=!1,a.length?c=a.concat(c):l=-1,c.length&&h())}function h(){if(!u){var t=s(f);u=!0;for(var e=c.length;e;){for(a=c,c=[];++l<e;)a&&a[l].run();l=-1,e=c.length}a=null,u=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function d(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new p(t,e)),1!==c.length||u||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=d,n.addListener=d,n.once=d,n.off=d,n.removeListener=d,n.removeAllListeners=d,n.emit=d,n.prependListener=d,n.prependOnceListener=d,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},952(t,e,r){r.d(e,{wx:()=>o,J_:()=>n});var n={CONTENT_SCRIPT:"content-script",BACKGROUND:"background",OFFSCREEN:"offscreen"},o={START_VERIFICATION:"START_VERIFICATION",CANCEL_VERIFICATION:"CANCEL_VERIFICATION",GENERATE_PROOF_REQUEST:"GENERATE_PROOF_REQUEST",CLAIM_CREATION_REQUESTED:"CLAIM_CREATION_REQUESTED",CLAIM_CREATION_SUCCESS:"CLAIM_CREATION_SUCCESS",CLAIM_CREATION_FAILED:"CLAIM_CREATION_FAILED",PROOF_GENERATION_STARTED:"PROOF_GENERATION_STARTED",PROOF_GENERATION_SUCCESS:"PROOF_GENERATION_SUCCESS",PROOF_GENERATION_FAILED:"PROOF_GENERATION_FAILED",PROOF_SUBMITTED:"PROOF_SUBMITTED",PROOF_SUBMISSION_FAILED:"PROOF_SUBMISSION_FAILED",GENERATE_PROOF:"GENERATE_PROOF",GENERATED_PROOF_RESPONSE:"GENERATED_PROOF_RESPONSE",GENERATE_CLAIM_ON_ATTESTOR:"GENERATE_CLAIM_ON_ATTESTOR",GET_PRIVATE_KEY:"GET_PRIVATE_KEY",GET_PRIVATE_KEY_RESPONSE:"GET_PRIVATE_KEY_RESPONSE",SHOW_PROVIDER_VERIFICATION_POPUP:"SHOW_PROVIDER_VERIFICATION_POPUP",OFFSCREEN_DOCUMENT_READY:"OFFSCREEN_DOCUMENT_READY",GENERATE_PROOF_RESPONSE:"GENERATE_PROOF_RESPONSE",PING_OFFSCREEN:"PING_OFFSCREEN",CLOSE_CURRENT_TAB:"CLOSE_CURRENT_TAB",GET_CURRENT_TAB_ID:"GET_CURRENT_TAB_ID",REQUEST_PROVIDER_DATA:"REQUEST_PROVIDER_DATA",PROVIDER_DATA_READY:"PROVIDER_DATA_READY",CONTENT_SCRIPT_LOADED:"CONTENT_SCRIPT_LOADED",SHOULD_INITIALIZE:"SHOULD_INITIALIZE",CHECK_IF_MANAGED_TAB:"CHECK_IF_MANAGED_TAB",FILTERED_REQUEST_FOUND:"FILTERED_REQUEST_FOUND",INTERCEPTED_REQUEST_AND_RESPONSE:"INTERCEPTED_REQUEST_AND_RESPONSE",UPDATE_PUBLIC_DATA:"UPDATE_PUBLIC_DATA",UPDATE_EXPECT_MANY_CLAIMS:"UPDATE_EXPECT_MANY_CLAIMS",GET_PARAMETERS:"GET_PARAMETERS",REPORT_PROVIDER_ERROR:"REPORT_PROVIDER_ERROR",REQUEST_CLAIM:"REQUEST_CLAIM",INJECT_VIA_SCRIPTING:"INJECT_VIA_SCRIPTING"}},770(t,e,r){r.d(e,{y8:()=>v});var n=r(859);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s(n.key),n)}}function s(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}var a=function(){function t(e){var r=e.sessionId,n=e.providerId,o=e.appId,i=e.logLine,s=e.type,a=e.eventType,c=e.logLevel,u=e.source,l=e.tabId,f=e.url,h=e.meta,p=e.time,d=void 0===p?null:p,E=e.deviceId;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sessionId=r,this.providerId=n,this.appId=o,this.logLine=i,this.type=s,this.eventType=a,this.logLevel=c,this.source=u,this.tabId=l,this.url=f,this.meta=h||void 0,this.time=d||new Date,this.deviceId=E}return e=t,n=[{key:"fromDateTimeToTimeStamp",value:function(t){return(1e6*t.getTime()).toString()}}],(r=[{key:"toJson",value:function(){var e={logLine:this.logLine,ts:t.fromDateTimeToTimeStamp(this.time),logLevel:this.logLevel,sessionId:this.sessionId,providerId:this.providerId,appId:this.appId,source:this.source,deviceId:this.deviceId};return this.type&&(e.type=this.type),this.eventType&&(e.eventType=this.eventType),this.tabId&&(e.tabId=this.tabId),this.url&&(e.url=this.url),this.meta&&(e.meta=this.meta),e}}])&&i(e.prototype,r),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n}();function c(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function l(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof a?n:a,u=Object.create(c.prototype);return f(u,"_invoke",function(r,n,o){var i,a,c,u=0,l=o||[],f=!1,h={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,r){return i=e,a=0,c=t,h.n=r,s}};function p(r,n){for(a=r,c=n,e=0;!f&&u&&!o&&e<l.length;e++){var o,i=l[e],p=h.p,d=i[2];r>3?(o=d===n)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=r<2&&p<i[1])?(a=0,h.v=n,h.n=i[1]):p<d&&(o=r<3||i[0]>n||n>d)&&(i[4]=r,i[5]=n,h.n=d,a=0))}if(o||r>1)return s;throw f=!0,n}return function(o,l,d){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&p(l,d),a=l,c=d;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(h.n=-1),p(a,c)):h.n=c:h.v=c);try{if(u=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=h.n<0)?c:r.call(n,h))!==s)break}catch(e){i=t,a=1,c=e}finally{u=1}}return{value:e,done:f}}}(r,o,i),!0),u}var s={};function a(){}function c(){}function u(){}e=Object.getPrototypeOf;var h=[][n]?e(e([][n]())):(f(e={},n,function(){return this}),e),p=u.prototype=a.prototype=Object.create(h);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,f(t,o,"GeneratorFunction")),t.prototype=Object.create(p),t}return c.prototype=u,f(p,"constructor",u),f(u,"constructor",c),c.displayName="GeneratorFunction",f(u,o,"GeneratorFunction"),f(p),f(p,o,"Generator"),f(p,n,function(){return this}),f(p,"toString",function(){return"[object Generator]"}),(l=function(){return{w:i,m:d}})()}function f(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}f=function(t,e,r,n){function i(e,r){f(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},f(t,e,r,n)}function h(t,e,r,n,o,i,s){try{var a=t[i](s),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,o)}function p(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function s(t){h(i,n,o,s,a,"next",t)}function a(t){h(i,n,o,s,a,"throw",t)}s(void 0)})}}function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?E(Object(r),!0).forEach(function(e){g(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function g(t,e,r){return(e=_(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function b(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,_(n.key),n)}}function _(t){var e=function(t,e){if("object"!=d(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==d(e)?e:e+""}var O=function(){return t=function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.logs=[],this.isSending=!1,this.maxBatchSize=20,this.flushInterval=5e3,this.flushIntervalId=null,this.config=y({},n.DEFAULT_LOG_CONFIG),this.deviceId=null;try{var r;"undefined"!=typeof chrome&&null!==(r=chrome.storage)&&void 0!==r&&r.local&&(chrome.storage.local.get([n.LOG_CONFIG_STORAGE_KEY],function(t){var r=null==t?void 0:t[n.LOG_CONFIG_STORAGE_KEY];r&&"object"===d(r)&&e.setConfig(r)}),chrome.storage.onChanged.addListener(function(t,r){if("local"===r&&t[n.LOG_CONFIG_STORAGE_KEY]){var o=t[n.LOG_CONFIG_STORAGE_KEY].newValue||{};e.setConfig(o)}}))}catch(t){}this.startFlushInterval()},e=[{key:"setConfig",value:function(t){this.config=y(y({},this.config),t)}},{key:"startFlushInterval",value:function(){var t=this;this.flushIntervalId&&clearInterval(this.flushIntervalId),this.flushIntervalId=setInterval(function(){return t.flush()},this.flushInterval)}},{key:"stopFlushInterval",value:function(){this.flushIntervalId&&(clearInterval(this.flushIntervalId),this.flushIntervalId=null)}},{key:"getDeviceLoggingId",value:(s=p(l().m(function t(){var e;return l().w(function(t){for(;;)switch(t.p=t.n){case 0:if(!this.deviceId){t.n=1;break}return t.a(2,this.deviceId);case 1:if(t.p=1,"undefined"==typeof chrome||!chrome.storage){t.n=3;break}return t.n=2,chrome.storage.local.get(["reclaim_device_id"]);case 2:if(!(e=t.v).reclaim_device_id){t.n=3;break}return this.deviceId=e.reclaim_device_id,t.a(2,this.deviceId);case 3:t.n=5;break;case 4:t.p=4,t.v;case 5:if(this.deviceId="undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():String(Date.now()),t.p=6,"undefined"==typeof chrome||!chrome.storage){t.n=7;break}return t.n=7,chrome.storage.local.set({reclaim_device_id:this.deviceId});case 7:t.n=9;break;case 8:t.p=8,t.v;case 9:return t.a(2,this.deviceId)}},t,this,[[6,8],[1,4]])})),function(){return s.apply(this,arguments)})},{key:"addLog",value:function(t){this.logs.push(t),this.logs.length>=this.maxBatchSize&&this.flush()}},{key:"shouldLog",value:function(t){return t<=(n.LOG_LEVEL_MAP[this.config.logLevel]||n.LOG_LEVEL.INFO)}},{key:"emitToConsole",value:function(t,e,r){var n="[".concat(t,"]"),o="".concat(n," ").concat(e);r?console.log(o,r):console.log(o)}},{key:"log",value:function(t){var e=t.message,r=t.logLevel,n=t.type,o=t.eventType,i=t.meta,s=t.sessionId,c=t.providerId,u=t.appId,l=t.source,f=t.tabId,h=t.url;if(e&&r){if(this.shouldLog(r)){this.config.consoleEnabled&&this.emitToConsole(r,e,i);var p=new a({sessionId:s||"unknown",providerId:c||"unknown",appId:u||"unknown",logLine:e,type:n,eventType:o,logLevel:r,source:l||this.config.source,tabId:f,url:h,meta:i,time:new Date});this.addLog(p)}}else console.error("Logger: message and logLevel are required")}},{key:"flush",value:(i=p(l().m(function t(){var e,r;return l().w(function(t){for(;;)switch(t.p=t.n){case 0:if(0!==this.logs.length&&!this.isSending){t.n=1;break}return t.a(2);case 1:return e=c(this.logs),this.logs=[],t.p=2,this.isSending=!0,t.n=3,this.sendLogs(e);case 3:t.n=5;break;case 4:t.p=4,r=t.v,console.error("Error flushing logs:",r),this.logs=[].concat(c(this.logs),c(e));case 5:return t.p=5,this.isSending=!1,t.f(5);case 6:return t.a(2)}},t,this,[[2,4,5,6]])})),function(){return i.apply(this,arguments)})},{key:"sendLogs",value:(o=p(l().m(function t(e){var r,o,i,s,a,c;return l().w(function(t){for(;;)switch(t.n){case 0:if(null!=e&&e.length){t.n=1;break}return t.a(2);case 1:return t.n=2,this.getDeviceLoggingId();case 2:return r=t.v,o=e.map(function(t){var e=t.toJson();return e.deviceId=e.deviceId||r,e}),i=JSON.stringify({logs:o,source:this.config.source,deviceId:r}),t.n=3,fetch(n.LOGGING_ENDPOINTS.DIAGNOSTIC_LOGGING,{method:"POST",headers:{"Content-Type":"application/json"},body:i});case 3:if((s=t.v).ok){t.n=5;break}return a=console,c="Failed to send ".concat(e.length," logs"),t.n=4,s.text();case 4:a.error.call(a,c,t.v);case 5:return t.a(2)}},t,this)})),function(t){return o.apply(this,arguments)})}],e&&b(t.prototype,e),r&&b(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,o,i,s}(),I=new O,v=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=y({sessionId:"unknown",providerId:"unknown",appId:"unknown",source:(null===(t=I.config)||void 0===t?void 0:t.source)||"reclaim-extension-sdk"},e);return{get context(){return y({},r)},setContext:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(r,t)},log:function(t){I.log(y(y({},r),t))},info:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};I.log(y(y({},r),{},{logLevel:"INFO"},t))},debug:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};I.log(y(y({},r),{},{logLevel:"DEBUG"},t))},all:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};I.log(y(y({},r),{},{logLevel:"ALL"},t))},error:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};I.log(y(y({},r),{},{logLevel:"ALL"},t))}}}},859(t,e,r){r.r(e),r.d(e,{DEFAULT_LOG_CONFIG:()=>u,EVENT_TYPES:()=>s,LOGGING_ENDPOINTS:()=>n,LOG_CONFIG_STORAGE_KEY:()=>l,LOG_LEVEL:()=>a,LOG_LEVEL_MAP:()=>c,LOG_SOURCES:()=>i,LOG_TYPES:()=>o});var n={DIAGNOSTIC_LOGGING:"http://localhost:8001/api/logs"},o={BACKGROUND:"reclaim_browser_extension.BackgroundProcess",CONTENT:"reclaim_browser_extension.ContentScript",POPUP:"reclaim_browser_extension.Popup",INIT:"reclaim_browser_extension.Initialization",VERIFICATION:"reclaim_browser_extension.Verification",FETCH_DATA:"reclaim_browser_extension.FetchData",PROVIDER_DATA:"reclaim_browser_extension.ProviderData",CLAIM_CREATION:"reclaim_browser_extension.ClaimCreation",PROOF_GENERATION:"reclaim_browser_extension.ProofGeneration",PROOF_SUBMISSION:"reclaim_browser_extension.ProofSubmission",PROOF_VERIFICATION:"reclaim_browser_extension.ProofVerification",OFFSCREEN:"reclaim_browser_extension.Offscreen"},i={BACKGROUND:"background",CONTENT:"content",OFFSCREEN:"offscreen",POPUP:"popup",INJECTION:"injection"},s={IS_RECLAIM_EXTENSION_SDK:"IS_RECLAIM_EXTENSION_SDK",VERIFICATION_FLOW_STARTED:"VERIFICATION_FLOW_STARTED",RECLAIM_VERIFICATION_DISMISSED:"RECLAIM_VERIFICATION_DISMISSED",RECLAIM_VERIFICATION_PROVIDER_LOAD_EXCEPTION:"RECLAIM_VERIFICATION_PROVIDER_LOAD_EXCEPTION",REQUEST_MATCHED:"REQUEST_MATCHED",RESPONSE_MATCH_FAILED:"RESPONSE_MATCH_FAILED",X_PATH_MATCH_REQUIREMENT_FAILED:"X_PATH_MATCH_REQUIREMENT_FAILED",JSON_PATH_MATCH_REQUIREMENT_FAILED:"JSON_PATH_MATCH_REQUIREMENT_FAILED",REGEX_MATCH_REQUIREMENT_FAILED:"REGEX_MATCH_REQUIREMENT_FAILED",FILTERED_REQUEST_FOUND:"FILTERED_REQUEST_FOUND",FILTER_REQUEST_ERROR:"FILTER_REQUEST_ERROR",STARTING_CLAIM_CREATION:"STARTING_CLAIM_CREATION",CLAIM_CREATION_STARTED:"CLAIM_CREATION_STARTED",CLAIM_CREATION_SUCCESS:"CLAIM_CREATION_SUCCESS",CLAIM_CREATION_FAILED:"CLAIM_CREATION_FAILED",CLAIM_PARAMETER_VALIDATION_FAILED_EXCEPTION:"CLAIM_PARAMETER_VALIDATION_FAILED_EXCEPTION",OFFSCREEN_DOCUMENT_READY:"OFFSCREEN_DOCUMENT_READY",OFFSCREEN_DOCUMENT_NOT_READY_EXCEPTION:"OFFSCREEN_DOCUMENT_NOT_READY_EXCEPTION",PROOF_GENERATION_STARTED:"PROOF_GENERATION_STARTED",PROOF_GENERATION_SUCCESS:"PROOF_GENERATION_SUCCESS",PROOF_GENERATION_ABORTED:"PROOF_GENERATION_ABORTED",PROOF_GENERATION_FAILED:"PROOF_GENERATION_FAILED",RESULT_RECEIVED:"RESULT_RECEIVED",SUBMITTING_PROOF:"SUBMITTING_PROOF",SUBMITTING_PROOF_TO_CALLBACK_URL:"SUBMITTING_PROOF_TO_CALLBACK_URL",SUBMITTING_PROOF_TO_CALLBACK_URL_SUCCESS:"SUBMITTING_PROOF_TO_CALLBACK_URL_SUCCESS",SUBMITTING_PROOF_TO_CALLBACK_URL_FAILED:"SUBMITTING_PROOF_TO_CALLBACK_URL_FAILED",PROOF_SUBMISSION_FAILED:"PROOF_SUBMISSION_FAILED",PROOF_SUBMITTED:"PROOF_SUBMITTED",VERIFICATION_FLOW_FAILED:"VERIFICATION_FLOW_FAILED",TAB_NOT_MANAGED_BY_EXTENSION_EXCEPTION:"TAB_NOT_MANAGED_BY_EXTENSION_EXCEPTION",INJECTION_SCRIPT_SET_IN_LOCAL_STORAGE_FAILED:"INJECTION_SCRIPT_SET_IN_LOCAL_STORAGE_FAILED",VERIFICATION_POPUP_ERROR:"VERIFICATION_POPUP_ERROR",UPDATE_SESSION_STATUS_ERROR:"UPDATE_SESSION_STATUS_ERROR"},a={INFO:10,DEBUG:20,ALL:30},c={INFO:a.INFO,DEBUG:a.DEBUG,ALL:a.ALL},u={logLevel:"INFO",consoleEnabled:!1,source:"reclaim-extension-sdk"},l="reclaim_extension_sdk_log_config"},153(t,e,r){r.d(e,{Ey:()=>s,w9:()=>c});r(770);function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}var s=Object.freeze({BACKGROUND:"background",CONTENT:"content",POPUP:"popup",INIT:"init",VERIFICATION:"verification",FETCH:"fetch",PROVIDER:"provider",CLAIM:"claim",PROOF:"proof",OFFSCREEN:"offscreen",POLYFILLS:"polyfills",SESSION_TIMER:"session-timer"}),a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.enabled=!0,this.allowedTypes=new Set}return e=t,r=[{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1}},{key:"setTypes",value:function(t){Array.isArray(t)&&(this.allowedTypes=new Set(t))}},{key:"clearTypes",value:function(){this.allowedTypes.clear()}},{key:"log",value:function(e){var r;if(this.enabled&&(!(this.allowedTypes.size>0)||this.allowedTypes.has(e))){for(var n=t.typeColor(e),o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];(r=console).log.apply(r,["%c[".concat(e,"][INFO]"),"color: ".concat(n,"; font-weight: bold;")].concat(i))}}},{key:"info",value:function(e){var r;if(this.enabled&&(!(this.allowedTypes.size>0)||this.allowedTypes.has(e))){for(var n=t.typeColor(e),o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];(r=console).info.apply(r,["%c[".concat(e,"][INFO]"),"color: ".concat(n,"; font-weight: bold;")].concat(i))}}},{key:"warn",value:function(e){var r;if(this.enabled&&(!(this.allowedTypes.size>0)||this.allowedTypes.has(e))){for(var n=t.typeColor(e,"warn"),o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];(r=console).warn.apply(r,["%c[".concat(e,"][WARN]"),"color: ".concat(n,"; font-weight: bold;")].concat(i))}}},{key:"error",value:function(e){var r;if(this.enabled&&(!(this.allowedTypes.size>0)||this.allowedTypes.has(e))){for(var n=t.typeColor(e,"error"),o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];(r=console).error.apply(r,["%c[".concat(e,"][ERROR]"),"color: ".concat(n,"; font-weight: bold;")].concat(i))}}}],n=[{key:"typeColor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",r={background:"#0074D9",content:"#2ECC40",popup:"#FF851B",init:"#B10DC9",verification:"#FF4136",fetch:"#39CCCC",provider:"#FFDC00",claim:"#7FDBFF",proof:"#85144b",offscreen:"#AAAAAA",polyfills:"#0074D9","session-timer":"#2ECC40"},n=r[Object.keys(r).find(function(e){return t.toLowerCase().includes(e)})]||"#888888";return"info"!==e&&(n={info:"",warn:"#FFA500",error:"#FF0000"}[e]||n),n}}],r&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n}(),c=new a,u=(r(859),r(606));void 0!==u&&u.env?c.disable():c.enable()},997(t,e,r){var n=r(287),o=r(606),i=r.n(o),s=r(153);function a(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var a=n&&n.prototype instanceof u?n:u,l=Object.create(a.prototype);return c(l,"_invoke",function(r,n,o){var i,a,c,u=0,l=o||[],f=!1,h={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,r){return i=e,a=0,c=t,h.n=r,s}};function p(r,n){for(a=r,c=n,e=0;!f&&u&&!o&&e<l.length;e++){var o,i=l[e],p=h.p,d=i[2];r>3?(o=d===n)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=r<2&&p<i[1])?(a=0,h.v=n,h.n=i[1]):p<d&&(o=r<3||i[0]>n||n>d)&&(i[4]=r,i[5]=n,h.n=d,a=0))}if(o||r>1)return s;throw f=!0,n}return function(o,l,d){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&p(l,d),a=l,c=d;(e=a<2?t:c)||!f;){i||(a?a<3?(a>1&&(h.n=-1),p(a,c)):h.n=c:h.v=c);try{if(u=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=h.n<0)?c:r.call(n,h))!==s)break}catch(e){i=t,a=1,c=e}finally{u=1}}return{value:e,done:f}}}(r,o,i),!0),l}var s={};function u(){}function l(){}function f(){}e=Object.getPrototypeOf;var h=[][n]?e(e([][n]())):(c(e={},n,function(){return this}),e),p=f.prototype=u.prototype=Object.create(h);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,c(t,o,"GeneratorFunction")),t.prototype=Object.create(p),t}return l.prototype=f,c(p,"constructor",f),c(f,"constructor",l),l.displayName="GeneratorFunction",c(f,o,"GeneratorFunction"),c(p),c(p,o,"Generator"),c(p,n,function(){return this}),c(p,"toString",function(){return"[object Generator]"}),(a=function(){return{w:i,m:d}})()}function c(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}c=function(t,e,r,n){function i(e,r){c(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},c(t,e,r,n)}function u(t,e,r,n,o,i,s){try{var a=t[i](s),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,o)}function l(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function s(t){u(i,n,o,s,a,"next",t)}function a(t){u(i,n,o,s,a,"throw",t)}s(void 0)})}}var f,h,p,d="undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==d?d:Function("return this")(),E="undefined"==typeof window,y="undefined"!=typeof document&&void 0!==document.contentType;if(d.Buffer=d.Buffer||n.hp,d.process=d.process||i(),void 0!==d.WebSocket||y)y?s.w9.info(s.Ey.POLYFILLS,"Skipping WebSocket in content script context"):s.w9.info(s.Ey.POLYFILLS,"Using native WebSocket implementation");else try{var g=r(296).WebSocket;d.WebSocket=g,s.w9.info(s.Ey.POLYFILLS,"WebSocket polyfill added to global")}catch(t){s.w9.warn(s.Ey.POLYFILLS,"Failed to load WebSocket polyfill:",t)}if(d.process&&(d.process.browser=!0),"function"!=typeof d.require)d.require=function(t){switch(t){case"ws":if(y)return s.w9.info(s.Ey.POLYFILLS,"Blocking ws module in content script"),{};try{return{WebSocket:r(296).WebSocket}}catch(t){return s.w9.warn(s.Ey.POLYFILLS,"Failed to load WebSocket for ws module:",t),{}}case"fs":return d.fs;case"path":return d.path;case"os":return d.os;case"crypto":return d.crypto;case"worker_threads":case"koffi":case"re2":return{};default:return console.warn("Mock require called for module: ".concat(t)),{}}};else{var b=d.require;d.require=function(t){if("ws"===t){if(y)return s.w9.info(s.Ey.POLYFILLS,"Blocking ws module in content script"),{};try{return{WebSocket:r(296).WebSocket}}catch(t){return s.w9.warn(s.Ey.POLYFILLS,"Failed to load WebSocket for ws module:",t),{}}}try{return b(t)}catch(e){return s.w9.warn(s.Ey.POLYFILLS,"Failed to require module: ".concat(t)),{}}}}if(void 0!==i()&&(i().browser=!0,i().version||(i().version="v16.0.0"),i().cwd||(i().cwd=function(){return"/"})),void 0===d.global&&(d.global=d),void 0===d.crypto&&(d.crypto={}),void 0===d.crypto.getRandomValues&&(d.crypto.getRandomValues=function(t){for(var e=new Uint8Array(t.length),r=0;r<e.length;r++)e[r]=Math.floor(256*Math.random());return e}),void 0===d.crypto.subtle&&(s.w9.warn(s.Ey.POLYFILLS,"WebCrypto subtle API not available. Some functionality may not work."),d.crypto.subtle={digest:(f=l(a().m(function t(e,r){var n,o,i;return a().w(function(t){for(;;)if(0===t.n){for(s.w9.warn(s.Ey.POLYFILLS,"Crypto subtle digest (".concat(e,") called with browser fallback")),n=Array.from(new Uint8Array(r)).reduce(function(t,e){return 31*t+e&4294967295},0),o=new Uint8Array(32),i=0;i<32;i++)o[i]=n>>8*i&255;return t.a(2,o.buffer)}},t)})),function(t,e){return f.apply(this,arguments)})}),!E){var _=function(t,e){return"string"==typeof t&&t.startsWith("node:")&&(t=t.replace(/^node:/,"")),new O(t,e)};void 0===d.domain&&(d.domain={create:function(){return{run:function(t){return t()},on:function(){},bind:function(t){return t}}}});var O=d.URL;_.prototype=O.prototype;try{Object.getOwnPropertyNames(O).forEach(function(t){if("prototype"!==t&&"constructor"!==t)try{_[t]=O[t]}catch(t){}})}catch(t){s.w9.warn(s.Ey.POLYFILLS,"Could not copy all URL static properties:",t)}try{d.URL=_}catch(t){s.w9.warn(s.Ey.POLYFILLS,"Could not override URL constructor:",t)}}void 0===d.module&&(d.module={exports:{}}),d.fs=d.fs||{readFileSync:function(t){throw s.w9.warn(s.Ey.POLYFILLS,"Attempted to readFileSync: ".concat(t)),new Error("fs.readFileSync is not available in this environment")},writeFileSync:function(t,e){s.w9.warn(s.Ey.POLYFILLS,"Attempted to writeFileSync: ".concat(t))},existsSync:function(t){return s.w9.warn(s.Ey.POLYFILLS,"Attempted to check if file exists: ".concat(t)),!1},promises:{readFile:(p=l(a().m(function t(e){return a().w(function(t){for(;;)switch(t.n){case 0:throw s.w9.warn(s.Ey.POLYFILLS,"Attempted to readFile: ".concat(e)),new Error("fs.promises.readFile is not available in this environment");case 1:return t.a(2)}},t)})),function(t){return p.apply(this,arguments)}),writeFile:(h=l(a().m(function t(e,r){return a().w(function(t){for(;;)switch(t.n){case 0:s.w9.warn(s.Ey.POLYFILLS,"Attempted to writeFile: ".concat(e));case 1:return t.a(2)}},t)})),function(t,e){return h.apply(this,arguments)})}},d.os=d.os||{tmpdir:function(){return"/tmp"},homedir:function(){return"/home/user"},platform:function(){return"browser"},type:function(){return"Browser"},cpus:function(){return[{model:"Browser CPU",speed:1e3}]},totalmem:function(){return 8589934592},freemem:function(){return 4294967296}},d.path=d.path||{join:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.join("/").replace(/\/+/g,"/")},resolve:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.join("/").replace(/\/+/g,"/")},dirname:function(t){return t.split("/").slice(0,-1).join("/")||"."},basename:function(t,e){var r=t.split("/").pop()||"";return e&&r.endsWith(e)&&(r=r.slice(0,-e.length)),r},extname:function(t){var e=t.split("/").pop()||"",r=e.lastIndexOf(".");return r<0?"":e.slice(r)},sep:"/"};n.hp,i()},296(t,e,r){r.r(e),r.d(e,{WebSocket:()=>d,default:()=>E});var n,o=r(153);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function c(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==i(e)?e:e+""}function l(t,e,r){return e=h(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,r||[],h(t).constructor):e.apply(t,r))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}(t=r.hmd(t),"undefined"==typeof window)?(n=function(){return c(function t(e,r){var n=this;s(this,t),o.w9.info(o.Ey.POLYFILLS,"[WEBSOCKET-POLYFILL] Creating mock WebSocket for background context"),this.url=e,this.protocols=r,this.readyState=3,setTimeout(function(){"function"==typeof n.onclose&&n.onclose({code:1e3,reason:"WebSockets not supported in background context"})},0)},[{key:"send",value:function(){throw o.w9.warn(o.Ey.POLYFILLS,"[WEBSOCKET-POLYFILL] Cannot use WebSockets in background context"),new Error("WebSockets are not available in background context")}},{key:"close",value:function(){}},{key:"sendPromise",value:function(){return Promise.reject(new Error("WebSockets are not available in background context"))}},{key:"addEventListener",value:function(){}},{key:"removeEventListener",value:function(){}}])}(),o.w9.info(o.Ey.POLYFILLS,"[WEBSOCKET-POLYFILL] Using mock WebSocket implementation for background context")):(n=function(t){function e(t,r){var n;return s(this,e),o.w9.info(o.Ey.POLYFILLS,"[WEBSOCKET-POLYFILL] Creating WebSocket with URL:",t),(n=l(this,e,[t,r])).addEventListener("error",function(t){"function"==typeof n.onerror&&n.onerror(t)}),n.addEventListener("open",function(t){"function"==typeof n.onopen&&n.onopen(t)}),n.addEventListener("close",function(t){"function"==typeof n.onclose&&n.onclose(t)}),n.addEventListener("message",function(t){"function"==typeof n.onmessage&&n.onmessage(t)}),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),c(e,[{key:"sendPromise",value:function(t){var e=this;return new Promise(function(r,n){try{e.send(t),r()}catch(t){n(t)}})}}])}(window.WebSocket),o.w9.info(o.Ey.POLYFILLS,"[WEBSOCKET-POLYFILL] Using browser WebSocket implementation"));var d=n;const E=n;t.exports&&(t.exports=n,t.exports.WebSocket=n,t.exports.default=n),o.w9.info(o.Ey.POLYFILLS,"[WEBSOCKET-POLYFILL] WebSocket polyfill initialized")}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={id:n,loaded:!1,exports:{}};return t[n](i,i.exports,r),i.loaded=!0,i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};r(997);var n=r(952),o=r(770),i=r(859);var s=(0,o.y8)({sessionId:"unknown",providerId:"unknown",appId:"unknown",source:"reclaim-extension-sdk",type:i.LOG_TYPES.OFFSCREEN}),a=null,c=function(t){(null==t?void 0:t.action)===n.wx.OFFSCREEN_DOCUMENT_READY&&(null==t?void 0:t.source)===n.J_.OFFSCREEN&&(null==t?void 0:t.target)===n.J_.BACKGROUND&&(s.info({message:"[OFFSCREEN-MANAGER] Received offscreen ready signal (global listener).",logLevel:i.LOG_LEVEL.INFO,type:i.LOG_TYPES.OFFSCREEN}),a&&(clearTimeout(a),a=null))},u=function(){"undefined"!=typeof chrome&&chrome.runtime&&chrome.runtime.onMessage&&chrome.runtime.onMessage.addListener&&chrome.runtime.onMessage.hasListener&&(chrome.runtime.onMessage.hasListener(c)||chrome.runtime.onMessage.addListener(c))};"undefined"!=typeof chrome&&chrome.runtime&&chrome.runtime.onMessage&&u(),u();r(153);class l{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+l.version}static addUnaryOp(t){return l.max_unop_len=Math.max(t.length,l.max_unop_len),l.unary_ops[t]=1,l}static addBinaryOp(t,e,r){return l.max_binop_len=Math.max(t.length,l.max_binop_len),l.binary_ops[t]=e,r?l.right_associative.add(t):l.right_associative.delete(t),l}static addIdentifierChar(t){return l.additional_identifier_chars.add(t),l}static addLiteral(t,e){return l.literals[t]=e,l}static removeUnaryOp(t){return delete l.unary_ops[t],t.length===l.max_unop_len&&(l.max_unop_len=l.getMaxKeyLen(l.unary_ops)),l}static removeAllUnaryOps(){return l.unary_ops={},l.max_unop_len=0,l}static removeIdentifierChar(t){return l.additional_identifier_chars.delete(t),l}static removeBinaryOp(t){return delete l.binary_ops[t],t.length===l.max_binop_len&&(l.max_binop_len=l.getMaxKeyLen(l.binary_ops)),l.right_associative.delete(t),l}static removeAllBinaryOps(){return l.binary_ops={},l.max_binop_len=0,l}static removeLiteral(t){return delete l.literals[t],l}static removeAllLiterals(){return l.literals={},l}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new l(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(t=>t.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return l.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!l.binary_ops[String.fromCharCode(t)]||l.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return l.isIdentifierStart(t)||l.isDecimalDigit(t)}throwError(t){const e=new Error(t+" at character "+this.index);throw e.index=this.index,e.description=t,e}runHook(t,e){if(l.hooks[t]){const r={context:this,node:e};return l.hooks.run(t,r),r.node}return e}searchHook(t){if(l.hooks[t]){const e={context:this};return l.hooks[t].find(function(t){return t.call(e.context,e),e.node}),e.node}}gobbleSpaces(){let t=this.code;for(;t===l.SPACE_CODE||t===l.TAB_CODE||t===l.LF_CODE||t===l.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const t=this.gobbleExpressions(),e=1===t.length?t[0]:{type:l.COMPOUND,body:t};return this.runHook("after-all",e)}gobbleExpressions(t){let e,r,n=[];for(;this.index<this.expr.length;)if(e=this.code,e===l.SEMCOL_CODE||e===l.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())n.push(r);else if(this.index<this.expr.length){if(e===t)break;this.throwError('Unexpected "'+this.char+'"')}return n}gobbleExpression(){const t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,l.max_binop_len),e=t.length;for(;e>0;){if(l.binary_ops.hasOwnProperty(t)&&(!l.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!l.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=e,t;t=t.substr(0,--e)}return!1}gobbleBinaryExpression(){let t,e,r,n,o,i,s,a,c;if(i=this.gobbleToken(),!i)return i;if(e=this.gobbleBinaryOp(),!e)return i;for(o={value:e,prec:l.binaryPrecedence(e),right_a:l.right_associative.has(e)},s=this.gobbleToken(),s||this.throwError("Expected expression after "+e),n=[i,o,s];e=this.gobbleBinaryOp();){if(r=l.binaryPrecedence(e),0===r){this.index-=e.length;break}o={value:e,prec:r,right_a:l.right_associative.has(e)},c=e;const a=t=>o.right_a&&t.right_a?r>t.prec:r<=t.prec;for(;n.length>2&&a(n[n.length-2]);)s=n.pop(),e=n.pop().value,i=n.pop(),t={type:l.BINARY_EXP,operator:e,left:i,right:s},n.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+c),n.push(o,t)}for(a=n.length-1,t=n[a];a>1;)t={type:l.BINARY_EXP,operator:n[a-1].value,left:n[a-2],right:t},a-=2;return t}gobbleToken(){let t,e,r,n;if(this.gobbleSpaces(),n=this.searchHook("gobble-token"),n)return this.runHook("after-token",n);if(t=this.code,l.isDecimalDigit(t)||t===l.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===l.SQUOTE_CODE||t===l.DQUOTE_CODE)n=this.gobbleStringLiteral();else if(t===l.OBRACK_CODE)n=this.gobbleArray();else{for(e=this.expr.substr(this.index,l.max_unop_len),r=e.length;r>0;){if(l.unary_ops.hasOwnProperty(e)&&(!l.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!l.isIdentifierPart(this.expr.charCodeAt(this.index+e.length)))){this.index+=r;const t=this.gobbleToken();return t||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:l.UNARY_EXP,operator:e,argument:t,prefix:!0})}e=e.substr(0,--r)}l.isIdentifierStart(t)?(n=this.gobbleIdentifier(),l.literals.hasOwnProperty(n.name)?n={type:l.LITERAL,value:l.literals[n.name],raw:n.name}:n.name===l.this_str&&(n={type:l.THIS_EXP})):t===l.OPAREN_CODE&&(n=this.gobbleGroup())}return n?(n=this.gobbleTokenProperty(n),this.runHook("after-token",n)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let e=this.code;for(;e===l.PERIOD_CODE||e===l.OBRACK_CODE||e===l.OPAREN_CODE||e===l.QUMARK_CODE;){let r;if(e===l.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==l.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),e=this.code}this.index++,e===l.OBRACK_CODE?((t={type:l.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),e=this.code,e!==l.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):e===l.OPAREN_CODE?t={type:l.CALL_EXP,arguments:this.gobbleArguments(l.CPAREN_CODE),callee:t}:(e===l.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),t={type:l.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),r&&(t.optional=!0),this.gobbleSpaces(),e=this.code}return t}gobbleNumericLiteral(){let t,e,r="";for(;l.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);if(this.code===l.PERIOD_CODE)for(r+=this.expr.charAt(this.index++);l.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);if(t=this.char,"e"===t||"E"===t){for(r+=this.expr.charAt(this.index++),t=this.char,"+"!==t&&"-"!==t||(r+=this.expr.charAt(this.index++));l.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);l.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+r+this.char+")")}return e=this.code,l.isIdentifierStart(e)?this.throwError("Variable names cannot start with a number ("+r+this.char+")"):(e===l.PERIOD_CODE||1===r.length&&r.charCodeAt(0)===l.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:l.LITERAL,value:parseFloat(r),raw:r}}gobbleStringLiteral(){let t="";const e=this.index,r=this.expr.charAt(this.index++);let n=!1;for(;this.index<this.expr.length;){let e=this.expr.charAt(this.index++);if(e===r){n=!0;break}if("\\"===e)switch(e=this.expr.charAt(this.index++),e){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=e}else t+=e}return n||this.throwError('Unclosed quote after "'+t+'"'),{type:l.LITERAL,value:t,raw:this.expr.substring(e,this.index)}}gobbleIdentifier(){let t=this.code,e=this.index;for(l.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,l.isIdentifierPart(t));)this.index++;return{type:l.IDENTIFIER,name:this.expr.slice(e,this.index)}}gobbleArguments(t){const e=[];let r=!1,n=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===t){r=!0,this.index++,t===l.CPAREN_CODE&&n&&n>=e.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}if(o===l.COMMA_CODE){if(this.index++,n++,n!==e.length)if(t===l.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===l.CBRACK_CODE)for(let t=e.length;t<n;t++)e.push(null)}else if(e.length!==n&&0!==n)this.throwError("Expected comma");else{const t=this.gobbleExpression();t&&t.type!==l.COMPOUND||this.throwError("Expected comma"),e.push(t)}}return r||this.throwError("Expected "+String.fromCharCode(t)),e}gobbleGroup(){this.index++;let t=this.gobbleExpressions(l.CPAREN_CODE);if(this.code===l.CPAREN_CODE)return this.index++,1===t.length?t[0]:!!t.length&&{type:l.SEQUENCE_EXP,expressions:t};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:l.ARRAY_EXP,elements:this.gobbleArguments(l.CBRACK_CODE)}}}const f=new class{add(t,e,r){if("string"!=typeof arguments[0])for(let t in arguments[0])this.add(t,arguments[0][t],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(t){this[t]=this[t]||[],e&&this[t][r?"unshift":"push"](e)},this)}run(t,e){this[t]=this[t]||[],this[t].forEach(function(t){t.call(e&&e.context?e.context:e,e)})}};Object.assign(l,{hooks:f,plugins:new class{constructor(t){this.jsep=t,this.registered={}}register(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(t=>{if("object"!=typeof t||!t.name||!t.init)throw new Error("Invalid JSEP plugin format");this.registered[t.name]||(t.init(this.jsep),this.registered[t.name]=t)})}}(l),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),l.max_unop_len=l.getMaxKeyLen(l.unary_ops),l.max_binop_len=l.getMaxKeyLen(l.binary_ops);const h=t=>new l(t).parse(),p=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(l).filter(t=>!p.includes(t)&&void 0===h[t]).forEach(t=>{h[t]=l[t]}),h.Jsep=l;var d={name:"ternary",init(t){t.hooks.add("after-expression",function(e){if(e.node&&this.code===t.QUMARK_CODE){this.index++;const r=e.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===t.COLON_CODE){this.index++;const o=this.gobbleExpression();if(o||this.throwError("Expected expression"),e.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&t.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&t.binary_ops[n.right.operator]<=.9;)n=n.right;e.node.test=n.right,n.right=e.node,e.node=r}}else this.throwError("Expected :")}})}};h.plugins.register(d);var E={name:"regex",init(t){t.hooks.add("gobble-token",function(e){if(47===this.code){const r=++this.index;let n=!1;for(;this.index<this.expr.length;){if(47===this.code&&!n){const n=this.expr.slice(r,this.index);let o,i="";for(;++this.index<this.expr.length;){const t=this.code;if(!(t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57))break;i+=this.char}try{o=new RegExp(n,i)}catch(t){this.throwError(t.message)}return e.node={type:t.LITERAL,value:o,raw:this.expr.slice(r-1,this.index)},e.node=this.gobbleTokenProperty(e.node),e.node}this.code===t.OBRACK_CODE?n=!0:n&&this.code===t.CBRACK_CODE&&(n=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}};const y={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|=","||=","&&=","??="]),updateOperators:[43,45],assignmentPrecedence:.9,init(t){const e=[t.IDENTIFIER,t.MEMBER_EXP];function r(t){y.assignmentOperators.has(t.operator)?(t.type="AssignmentExpression",r(t.left),r(t.right)):t.operator||Object.values(t).forEach(t=>{t&&"object"==typeof t&&r(t)})}y.assignmentOperators.forEach(e=>t.addBinaryOp(e,y.assignmentPrecedence,!0)),t.hooks.add("gobble-token",function(t){const r=this.code;y.updateOperators.some(t=>t===r&&t===this.expr.charCodeAt(this.index+1))&&(this.index+=2,t.node={type:"UpdateExpression",operator:43===r?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},t.node.argument&&e.includes(t.node.argument.type)||this.throwError(`Unexpected ${t.node.operator}`))}),t.hooks.add("after-token",function(t){if(t.node){const r=this.code;y.updateOperators.some(t=>t===r&&t===this.expr.charCodeAt(this.index+1))&&(e.includes(t.node.type)||this.throwError(`Unexpected ${t.node.operator}`),this.index+=2,t.node={type:"UpdateExpression",operator:43===r?"++":"--",argument:t.node,prefix:!1})}}),t.hooks.add("after-expression",function(t){t.node&&r(t.node)})}};h.plugins.register(E,y),h.addUnaryOp("typeof"),h.addLiteral("null",null),h.addLiteral("undefined",void 0);const g=new Set(["constructor","__proto__","__defineGetter__","__defineSetter__"]),b={evalAst(t,e){switch(t.type){case"BinaryExpression":case"LogicalExpression":return b.evalBinaryExpression(t,e);case"Compound":return b.evalCompound(t,e);case"ConditionalExpression":return b.evalConditionalExpression(t,e);case"Identifier":return b.evalIdentifier(t,e);case"Literal":return b.evalLiteral(t,e);case"MemberExpression":return b.evalMemberExpression(t,e);case"UnaryExpression":return b.evalUnaryExpression(t,e);case"ArrayExpression":return b.evalArrayExpression(t,e);case"CallExpression":return b.evalCallExpression(t,e);case"AssignmentExpression":return b.evalAssignmentExpression(t,e);default:throw SyntaxError("Unexpected expression",t)}},evalBinaryExpression:(t,e)=>({"||":(t,e)=>t||e(),"&&":(t,e)=>t&&e(),"|":(t,e)=>t|e(),"^":(t,e)=>t^e(),"&":(t,e)=>t&e(),"==":(t,e)=>t==e(),"!=":(t,e)=>t!=e(),"===":(t,e)=>t===e(),"!==":(t,e)=>t!==e(),"<":(t,e)=>t<e(),">":(t,e)=>t>e(),"<=":(t,e)=>t<=e(),">=":(t,e)=>t>=e(),"<<":(t,e)=>t<<e(),">>":(t,e)=>t>>e(),">>>":(t,e)=>t>>>e(),"+":(t,e)=>t+e(),"-":(t,e)=>t-e(),"*":(t,e)=>t*e(),"/":(t,e)=>t/e(),"%":(t,e)=>t%e()}[t.operator](b.evalAst(t.left,e),()=>b.evalAst(t.right,e))),evalCompound(t,e){let r;for(let n=0;n<t.body.length;n++){"Identifier"===t.body[n].type&&["var","let","const"].includes(t.body[n].name)&&t.body[n+1]&&"AssignmentExpression"===t.body[n+1].type&&(n+=1);const o=t.body[n];r=b.evalAst(o,e)}return r},evalConditionalExpression:(t,e)=>b.evalAst(t.test,e)?b.evalAst(t.consequent,e):b.evalAst(t.alternate,e),evalIdentifier(t,e){if(Object.hasOwn(e,t.name))return e[t.name];throw ReferenceError(`${t.name} is not defined`)},evalLiteral:t=>t.value,evalMemberExpression(t,e){const r=String(t.computed?b.evalAst(t.property):t.property.name),n=b.evalAst(t.object,e);if(null==n)throw TypeError(`Cannot read properties of ${n} (reading '${r}')`);if(!Object.hasOwn(n,r)&&g.has(r))throw TypeError(`Cannot read properties of ${n} (reading '${r}')`);const o=n[r];return"function"==typeof o?o.bind(n):o},evalUnaryExpression:(t,e)=>({"-":t=>-b.evalAst(t,e),"!":t=>!b.evalAst(t,e),"~":t=>~b.evalAst(t,e),"+":t=>+b.evalAst(t,e),typeof:t=>typeof b.evalAst(t,e)}[t.operator](t.argument)),evalArrayExpression:(t,e)=>t.elements.map(t=>b.evalAst(t,e)),evalCallExpression(t,e){const r=t.arguments.map(t=>b.evalAst(t,e));return b.evalAst(t.callee,e)(...r)},evalAssignmentExpression(t,e){if("Identifier"!==t.left.type)throw SyntaxError("Invalid left-hand side in assignment");const r=t.left.name,n=b.evalAst(t.right,e);return e[r]=n,e[r]}};function _(t,e){return(t=t.slice()).push(e),t}function O(t,e){return(e=e.slice()).unshift(t),e}class I extends Error{constructor(t){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=t,this.name="NewError"}}function v(t,e,r,n,o){if(!(this instanceof v))try{return new v(t,e,r,n,o)}catch(t){if(!t.avoidNew)throw t;return t.value}"string"==typeof t&&(o=n,n=r,r=e,e=t,t=null);const i=t&&"object"==typeof t;if(t=t||{},this.json=t.json||r,this.path=t.path||e,this.resultType=t.resultType||"value",this.flatten=t.flatten||!1,this.wrap=!Object.hasOwn(t,"wrap")||t.wrap,this.sandbox=t.sandbox||{},this.eval=void 0===t.eval?"safe":t.eval,this.ignoreEvalErrors=void 0!==t.ignoreEvalErrors&&t.ignoreEvalErrors,this.parent=t.parent||null,this.parentProperty=t.parentProperty||null,this.callback=t.callback||n||null,this.otherTypeCallback=t.otherTypeCallback||o||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},!1!==t.autostart){const n={path:i?t.path:e};i?"json"in t&&(n.json=t.json):n.json=r;const o=this.evaluate(n);if(!o||"object"!=typeof o)throw new I(o);return o}}v.prototype.evaluate=function(t,e,r,n){let o=this.parent,i=this.parentProperty,{flatten:s,wrap:a}=this;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=n||this.otherTypeCallback,e=e||this.json,(t=t||this.path)&&"object"==typeof t&&!Array.isArray(t)){if(!t.path&&""!==t.path)throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!Object.hasOwn(t,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:e}=t),s=Object.hasOwn(t,"flatten")?t.flatten:s,this.currResultType=Object.hasOwn(t,"resultType")?t.resultType:this.currResultType,this.currSandbox=Object.hasOwn(t,"sandbox")?t.sandbox:this.currSandbox,a=Object.hasOwn(t,"wrap")?t.wrap:a,this.currEval=Object.hasOwn(t,"eval")?t.eval:this.currEval,r=Object.hasOwn(t,"callback")?t.callback:r,this.currOtherTypeCallback=Object.hasOwn(t,"otherTypeCallback")?t.otherTypeCallback:this.currOtherTypeCallback,o=Object.hasOwn(t,"parent")?t.parent:o,i=Object.hasOwn(t,"parentProperty")?t.parentProperty:i,t=t.path}if(o=o||null,i=i||null,Array.isArray(t)&&(t=v.toPathString(t)),!t&&""!==t||!e)return;const c=v.toPathArray(t);"$"===c[0]&&c.length>1&&c.shift(),this._hasParentSelector=null;const u=this._trace(c,e,["$"],o,i,r).filter(function(t){return t&&!t.isParentSelector});return u.length?a||1!==u.length||u[0].hasArrExpr?u.reduce((t,e)=>{const r=this._getPreferredOutput(e);return s&&Array.isArray(r)?t=t.concat(r):t.push(r),t},[]):this._getPreferredOutput(u[0]):a?[]:void 0},v.prototype._getPreferredOutput=function(t){const e=this.currResultType;switch(e){case"all":{const e=Array.isArray(t.path)?t.path:v.toPathArray(t.path);return t.pointer=v.toPointer(e),t.path="string"==typeof t.path?t.path:v.toPathString(t.path),t}case"value":case"parent":case"parentProperty":return t[e];case"path":return v.toPathString(t[e]);case"pointer":return v.toPointer(t.path);default:throw new TypeError("Unknown result type")}},v.prototype._handleCallback=function(t,e,r){if(e){const n=this._getPreferredOutput(t);t.path="string"==typeof t.path?t.path:v.toPathString(t.path),e(n,r,t)}},v.prototype._trace=function(t,e,r,n,o,i,s,a){let c;if(!t.length)return c={path:r,value:e,parent:n,parentProperty:o,hasArrExpr:s},this._handleCallback(c,i,"value"),c;const u=t[0],l=t.slice(1),f=[];function h(t){Array.isArray(t)?t.forEach(t=>{f.push(t)}):f.push(t)}if(("string"!=typeof u||a)&&e&&Object.hasOwn(e,u))h(this._trace(l,e[u],_(r,u),e,u,i,s));else if("*"===u)this._walk(e,t=>{h(this._trace(l,e[t],_(r,t),e,t,i,!0,!0))});else if(".."===u)h(this._trace(l,e,r,n,o,i,s)),this._walk(e,n=>{"object"==typeof e[n]&&h(this._trace(t.slice(),e[n],_(r,n),e,n,i,!0))});else{if("^"===u)return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:l,isParentSelector:!0};if("~"===u)return c={path:_(r,u),value:o,parent:n,parentProperty:null},this._handleCallback(c,i,"property"),c;if("$"===u)h(this._trace(l,e,r,null,null,i,s));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(u))h(this._slice(u,l,e,r,n,o,i));else if(0===u.indexOf("?(")){if(!1===this.currEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");const t=u.replace(/^\?\((.*?)\)$/u,"$1"),s=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(t);s?this._walk(e,t=>{const a=[s[2]],c=s[1]?e[t][s[1]]:e[t];this._trace(a,c,r,n,o,i,!0).length>0&&h(this._trace(l,e[t],_(r,t),e,t,i,!0))}):this._walk(e,s=>{this._eval(t,e[s],s,r,n,o)&&h(this._trace(l,e[s],_(r,s),e,s,i,!0))})}else if("("===u[0]){if(!1===this.currEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");h(this._trace(O(this._eval(u,e,r.at(-1),r.slice(0,-1),n,o),l),e,r,n,o,i,s))}else if("@"===u[0]){let t=!1;const s=u.slice(1,-2);switch(s){case"scalar":e&&["object","function"].includes(typeof e)||(t=!0);break;case"boolean":case"string":case"undefined":case"function":typeof e===s&&(t=!0);break;case"integer":!Number.isFinite(e)||e%1||(t=!0);break;case"number":Number.isFinite(e)&&(t=!0);break;case"nonFinite":"number"!=typeof e||Number.isFinite(e)||(t=!0);break;case"object":e&&typeof e===s&&(t=!0);break;case"array":Array.isArray(e)&&(t=!0);break;case"other":t=this.currOtherTypeCallback(e,r,n,o);break;case"null":null===e&&(t=!0);break;default:throw new TypeError("Unknown value type "+s)}if(t)return c={path:r,value:e,parent:n,parentProperty:o},this._handleCallback(c,i,"value"),c}else if("`"===u[0]&&e&&Object.hasOwn(e,u.slice(1))){const t=u.slice(1);h(this._trace(l,e[t],_(r,t),e,t,i,s,!0))}else if(u.includes(",")){const t=u.split(",");for(const s of t)h(this._trace(O(s,l),e,r,n,o,i,!0))}else!a&&e&&Object.hasOwn(e,u)&&h(this._trace(l,e[u],_(r,u),e,u,i,s,!0))}if(this._hasParentSelector)for(let t=0;t<f.length;t++){const r=f[t];if(r&&r.isParentSelector){const a=this._trace(r.expr,e,r.path,n,o,i,s);if(Array.isArray(a)){f[t]=a[0];const e=a.length;for(let r=1;r<e;r++)t++,f.splice(t,0,a[r])}else f[t]=a}}return f},v.prototype._walk=function(t,e){if(Array.isArray(t)){const r=t.length;for(let t=0;t<r;t++)e(t)}else t&&"object"==typeof t&&Object.keys(t).forEach(t=>{e(t)})},v.prototype._slice=function(t,e,r,n,o,i,s){if(!Array.isArray(r))return;const a=r.length,c=t.split(":"),u=c[2]&&Number.parseInt(c[2])||1;let l=c[0]&&Number.parseInt(c[0])||0,f=c[1]&&Number.parseInt(c[1])||a;l=l<0?Math.max(0,l+a):Math.min(a,l),f=f<0?Math.max(0,f+a):Math.min(a,f);const h=[];for(let t=l;t<f;t+=u){this._trace(O(t,e),r,n,o,i,s,!0).forEach(t=>{h.push(t)})}return h},v.prototype._eval=function(t,e,r,n,o,i){this.currSandbox._$_parentProperty=i,this.currSandbox._$_parent=o,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=e;const s=t.includes("@path");s&&(this.currSandbox._$_path=v.toPathString(n.concat([r])));const a=this.currEval+"Script:"+t;if(!v.cache[a]){let e=t.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");if(s&&(e=e.replaceAll("@path","_$_path")),"safe"===this.currEval||!0===this.currEval||void 0===this.currEval)v.cache[a]=new this.safeVm.Script(e);else if("native"===this.currEval)v.cache[a]=new this.vm.Script(e);else if("function"==typeof this.currEval&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){const t=this.currEval;v.cache[a]=new t(e)}else{if("function"!=typeof this.currEval)throw new TypeError(`Unknown "eval" property "${this.currEval}"`);v.cache[a]={runInNewContext:t=>this.currEval(e,t)}}}try{return v.cache[a].runInNewContext(this.currSandbox)}catch(e){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+e.message+": "+t)}},v.cache={},v.toPathString=function(t){const e=t,r=e.length;let n="$";for(let t=1;t<r;t++)/^(~|\^|@.*?\(\))$/u.test(e[t])||(n+=/^[0-9*]+$/u.test(e[t])?"["+e[t]+"]":"['"+e[t]+"']");return n},v.toPointer=function(t){const e=t,r=e.length;let n="";for(let t=1;t<r;t++)/^(~|\^|@.*?\(\))$/u.test(e[t])||(n+="/"+e[t].toString().replaceAll("~","~0").replaceAll("/","~1"));return n},v.toPathArray=function(t){const{cache:e}=v;if(e[t])return e[t].concat();const r=[],n=t.replaceAll(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu,";$&;").replaceAll(/[['](\??\(.*?\))[\]'](?!.\])/gu,function(t,e){return"[#"+(r.push(e)-1)+"]"}).replaceAll(/\[['"]([^'\]]*)['"]\]/gu,function(t,e){return"['"+e.replaceAll(".","%@%").replaceAll("~","%%@@%%")+"']"}).replaceAll("~",";~;").replaceAll(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replaceAll("%@%",".").replaceAll("%%@@%%","~").replaceAll(/(?:;)?(\^+)(?:;)?/gu,function(t,e){return";"+e.split("").join(";")+";"}).replaceAll(/;;;|;;/gu,";..;").replaceAll(/;$|'?\]|'$/gu,"").split(";").map(function(t){const e=t.match(/#(\d+)/u);return e&&e[1]?r[e[1]]:t});return e[t]=n,e[t].concat()},v.prototype.safeVm={Script:class{constructor(t){this.code=t,this.ast=h(this.code)}runInNewContext(t){const e=Object.assign(Object.create(null),t);return b.evalAst(this.ast,e)}}};v.prototype.vm={Script:class{constructor(t){this.code=t}runInNewContext(t){let e=this.code;const r=Object.keys(t),n=[];!function(t,e,r){const n=t.length;for(let o=0;o<n;o++)r(t[o])&&e.push(t.splice(o--,1)[0])}(r,n,e=>"function"==typeof t[e]);const o=r.map(e=>t[e]);e=n.reduce((e,r)=>{let n=t[r].toString();return/function/u.test(n)||(n="function "+n),"var "+r+"="+n+";"+e},"")+e,/(['"])use strict\1/u.test(e)||r.includes("arguments")||(e="var arguments = undefined;"+e),e=e.replace(/;\s*$/u,"");const i=e.lastIndexOf(";"),s=-1!==i?e.slice(0,i+1)+" return "+e.slice(i+1):" return "+e;return new Function(...r,s)(...o)}}};(0,o.y8)({sessionId:"unknown",providerId:"unknown",appId:"unknown",source:"reclaim-extension-sdk"});
|
|
11
11
|
//# sourceMappingURL=background.bundle.js.map
|