@dodoex/wallet-web3 0.0.56 → 0.0.57-beta.1
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/dist/{alchemy-provider-5870b6fa-c3458ce0.js → alchemy-provider-5870b6fa-6b210484.js} +1 -1
- package/dist/{alchemy-websocket-provider-213da986-b76aadd7.js → alchemy-websocket-provider-213da986-3ac05e5b.js} +1 -1
- package/dist/{blocto-8dcd5378.js → blocto-8f5fd7d3.js} +1 -1
- package/dist/{ccip-2cdc0e6e.js → ccip-d1744cf2.js} +1 -1
- package/dist/cjs/{alchemy-provider-5870b6fa-22229235.cjs → alchemy-provider-5870b6fa-7453f6a0.cjs} +1 -1
- package/dist/cjs/{alchemy-websocket-provider-213da986-d0bd62ee.cjs → alchemy-websocket-provider-213da986-3b95cee6.cjs} +1 -1
- package/dist/cjs/{blocto-9189db02.cjs → blocto-b4a7092b.cjs} +1 -1
- package/dist/cjs/{ccip-cf4c8958.cjs → ccip-ce28d6bf.cjs} +1 -1
- package/dist/cjs/{draggabilly-4a795874.cjs → draggabilly-753ccd30.cjs} +1 -1
- package/dist/cjs/id-30b440b2.cjs +1 -0
- package/dist/cjs/{index-8df03db9.cjs → index-09b465f6.cjs} +2 -2
- package/dist/cjs/{index-32e6540a.cjs → index-17256a18.cjs} +6 -6
- package/dist/cjs/{index-1d309dce.cjs → index-2a98c637.cjs} +1 -1
- package/dist/cjs/{index-63281f6f.cjs → index-90a9af5d.cjs} +1 -1
- package/dist/cjs/{index-d229b8b4.cjs → index-c32675d7.cjs} +1 -1
- package/dist/cjs/{index-b289395f.cjs → index-c53fd9aa.cjs} +9 -9
- package/dist/cjs/{index-0d59d3a4.cjs → index-ecc3408d.cjs} +2 -2
- package/dist/cjs/{index-458ec813.cjs → index-edb35915.cjs} +1 -1
- package/dist/cjs/{index-f92b0bd8.cjs → index-fb968ad2.cjs} +1 -1
- package/dist/cjs/{index-2b5e634c.cjs → index-fc09a87b.cjs} +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/{index.es-f9414662.cjs → index.es-9ddf4378.cjs} +1 -1
- package/dist/cjs/{interface-af41c890.cjs → interface-2a09f64e.cjs} +1 -1
- package/dist/cjs/{lib-typedarrays-b768ceaf.cjs → lib-typedarrays-51607293.cjs} +1 -1
- package/dist/cjs/{portis-e8a9cfb5.cjs → portis-f57258db.cjs} +1 -1
- package/dist/cjs/{provider-bc656af9.cjs → provider-74da7349.cjs} +1 -1
- package/dist/cjs/{rainbow-3b59bcb8.cjs → rainbow-727e8ea5.cjs} +1 -1
- package/dist/cjs/{sha224-542ed113.cjs → sha224-423d5841.cjs} +1 -1
- package/dist/cjs/{sha256-56f21b8c.cjs → sha256-874c9a4f.cjs} +1 -1
- package/dist/cjs/{typed-data-a777dbe1.cjs → typed-data-d288b47c.cjs} +1 -1
- package/dist/cjs/{uAuth-977cd558.cjs → uAuth-361814ef.cjs} +1 -1
- package/dist/cjs/{walletConnect-59deaaa7.cjs → walletConnect-90bdf48f.cjs} +1 -1
- package/dist/cjs/{walletLink-8c611440.cjs → walletLink-1f27a868.cjs} +1 -1
- package/dist/{draggabilly-36d7b3a5.js → draggabilly-9d05d32a.js} +1 -1
- package/dist/id-d456493a.js +1 -0
- package/dist/{index-b967e22c.js → index-013d9a80.js} +1 -1
- package/dist/{index-7646623f.js → index-179c2bb2.js} +1 -1
- package/dist/{index-8c308a55.js → index-20266fbe.js} +1 -1
- package/dist/index-2270e11e.js +37 -0
- package/dist/{index-b6011204.js → index-4b539ae1.js} +2 -2
- package/dist/{index-8af79cad.js → index-54585d0b.js} +1 -1
- package/dist/{index-98d378b6.js → index-5865e5b8.js} +4 -4
- package/dist/{index-3e23698a.js → index-72b1f8bd.js} +1 -1
- package/dist/{index-7e946bf1.js → index-9aad50a9.js} +1 -1
- package/dist/{index-0a7c220d.js → index-afee6d12.js} +9 -9
- package/dist/{index.es-68fc128f.js → index.es-22ab18a7.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{interface-746c1865.js → interface-76e42a07.js} +1 -1
- package/dist/{lib-typedarrays-5c5921fd.js → lib-typedarrays-60ecdf93.js} +1 -1
- package/dist/{portis-00d754f6.js → portis-b9004d27.js} +1 -1
- package/dist/{provider-4fe47dba.js → provider-7049aff5.js} +1 -1
- package/dist/{rainbow-ba579cad.js → rainbow-1e89ee8a.js} +1 -1
- package/dist/sha224-778cae22.js +1 -0
- package/dist/{sha256-6b5b8897.js → sha256-a1fc65fb.js} +1 -1
- package/dist/{typed-data-a96333aa.js → typed-data-976cda33.js} +1 -1
- package/dist/{uAuth-6ea836c7.js → uAuth-1ec9ee54.js} +1 -1
- package/dist/{walletConnect-6b2a7a4e.js → walletConnect-4755969f.js} +1 -1
- package/dist/{walletLink-8d027247.js → walletLink-88901ef9.js} +1 -1
- package/package.json +1 -1
- package/dist/cjs/id-5a06c725.cjs +0 -1
- package/dist/id-cb48006b.js +0 -1
- package/dist/index-36aa5fe1.js +0 -37
- package/dist/sha224-ee67389b.js +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import{c as e,_ as t,A as n}from"./index-5865e5b8.js";import"@ethersproject/address";import"@ethersproject/providers";import"zustand";import"@ethersproject/bytes";import"@ethersproject/properties";import"@ethersproject/abstract-signer";import"buffer";import"@ethersproject/abstract-provider";import"@ethersproject/contracts";import"events";import"@ethersproject/constants";import"@ethersproject/transactions";var r={exports:{}};function i(e,i){return t(this,void 0,void 0,(function*(){const t={};e.rpc&&Object.entries(e.rpc).forEach((([e,n])=>{const r=`0x${Number(e).toString(16)}`;t[r]=n}));const o=new r.exports.MetaMaskSDK({useDeeplink:!0,dappMetadata:{name:e.appName,iconUrl:e.appLogoUrl},readonlyRPCMap:t});o.isInitialized()||(yield o.init());const a=o.getProvider();a.on("connect",i.connect),a.on("disconnect",i.disconnect),a.on("accountsChanged",i.accountsChanged),a.on("chainChanged",i.chainChanged),a.on("message",i.message),yield o.connect();return n(a)}))}!function(t){var n=void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function o(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var a={exports:{}};!function(e,t){var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r&&r,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==n&&n,r="URLSearchParams"in n,i="Symbol"in n&&"iterator"in Symbol,o="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in n,s="ArrayBuffer"in n;if(s)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&u.indexOf(Object.prototype.toString.call(e))>-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function m(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=m(t);return t.readAsArrayBuffer(e),n}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&o&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(g)}),this.text=function(){var e,t,n,r=p(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=m(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=c(e),t=d(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},h.prototype.delete=function(e){delete this.map[c(e)]},h.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},h.prototype.set=function(e,t){this.map[c(e)]=d(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},i&&(h.prototype[Symbol.iterator]=h.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(e,t){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(t=t||{}).body;if(e instanceof w){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=function(e){var t=e.toUpperCase();return y.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var r=/([?&])_=[^&]*/;r.test(this.url)?this.url=this.url.replace(r,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function S(e,t){if(!(this instanceof S))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},b.call(w.prototype),b.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},S.error=function(){var e=new S(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];S.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new S(null,{status:t,headers:{location:e}})},t.DOMException=n.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function k(e,r){return new Promise((function(i,a){var u=new w(e,r);if(u.signal&&u.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function c(){l.abort()}l.onload=function(){var e,t,n={status:l.status,statusText:l.statusText,headers:(e=l.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};n.url="responseURL"in l?l.responseURL:n.headers.get("X-Request-URL");var r="response"in l?l.response:l.responseText;setTimeout((function(){i(new S(r,n))}),0)},l.onerror=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},l.ontimeout=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},l.onabort=function(){setTimeout((function(){a(new t.DOMException("Aborted","AbortError"))}),0)},l.open(u.method,function(e){try{return""===e&&n.location.href?n.location.href:e}catch(t){return e}}(u.url),!0),"include"===u.credentials?l.withCredentials=!0:"omit"===u.credentials&&(l.withCredentials=!1),"responseType"in l&&(o?l.responseType="blob":s&&u.headers.get("Content-Type")&&-1!==u.headers.get("Content-Type").indexOf("application/octet-stream")&&(l.responseType="arraybuffer")),!r||"object"!=typeof r.headers||r.headers instanceof h?u.headers.forEach((function(e,t){l.setRequestHeader(t,e)})):Object.getOwnPropertyNames(r.headers).forEach((function(e){l.setRequestHeader(e,d(r.headers[e]))})),u.signal&&(u.signal.addEventListener("abort",c),l.onreadystatechange=function(){4===l.readyState&&u.signal.removeEventListener("abort",c)}),l.send(void 0===u._bodyInit?null:u._bodyInit)}))}k.polyfill=!0,n.fetch||(n.fetch=k,n.Headers=h,n.Request=w,n.Response=S),t.Headers=h,t.Request=w,t.Response=S,t.fetch=k}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=n.fetch?n:i;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(a,a.exports);var s=i(a.exports),u=[],l=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,d=!1;function f(){d=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)u[t]=e[t],l[e.charCodeAt(t)]=t;l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63}function h(e,t,n){for(var r,i,o=[],a=t;a<n;a+=3)r=(e[a]<<16)+(e[a+1]<<8)+e[a+2],o.push(u[(i=r)>>18&63]+u[i>>12&63]+u[i>>6&63]+u[63&i]);return o.join("")}function p(e){var t;d||f();for(var n=e.length,r=n%3,i="",o=[],a=16383,s=0,l=n-r;s<l;s+=a)o.push(h(e,s,s+a>l?l:s+a));return 1===r?(t=e[n-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),o.push(i),o.join("")}function m(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,d=n?i-1:0,f=n?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=f,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+d],d+=f,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=l}return(h?-1:1)*a*Math.pow(2,o-r)}function g(e,t,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,d=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+d>=1?f/u:f*Math.pow(2,1-d))*u>=2&&(a++,u/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*u-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;e[n+h]=255&a,h+=p,a/=256,l-=8);e[n+h-p]|=128*m}var v={}.toString,b=Array.isArray||function(e){return"[object Array]"==v.call(e)};S.TYPED_ARRAY_SUPPORT=void 0===n.TYPED_ARRAY_SUPPORT||n.TYPED_ARRAY_SUPPORT;var y=w();function w(){return S.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function _(e,t){if(w()<t)throw new RangeError("Invalid typed array length");return S.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=S.prototype:(null===e&&(e=new S(t)),e.length=t),e}function S(e,t,n){if(!(S.TYPED_ARRAY_SUPPORT||this instanceof S))return new S(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return M(this,e)}return E(this,e,t,n)}function E(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),S.TYPED_ARRAY_SUPPORT?(e=t).__proto__=S.prototype:e=C(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!S.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|T(t,n),i=(e=_(e,r)).write(t,n);return i!==r&&(e=e.slice(0,i)),e}(e,t,n):function(e,t){if(A(t)){var n=0|x(t.length);return 0===(e=_(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?_(e,0):C(e,t);if("Buffer"===t.type&&b(t.data))return C(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function k(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function M(e,t){if(k(t),e=_(e,t<0?0:0|x(t)),!S.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function C(e,t){var n=t.length<0?0:0|x(t.length);e=_(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function x(e){if(e>=w())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w().toString(16)+" bytes");return 0|e}function A(e){return!(null==e||!e._isBuffer)}function T(e,t){if(A(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return ne(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return re(e).length;default:if(r)return ne(e).length;t=(""+t).toLowerCase(),r=!0}}function R(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return W(this,t,n);case"utf8":case"utf-8":return F(this,t,n);case"ascii":return q(this,t,n);case"latin1":case"binary":return H(this,t,n);case"base64":return U(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function P(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function L(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=S.from(t,r)),A(t))return 0===t.length?-1:I(e,t,n,r,i);if("number"==typeof t)return t&=255,S.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):I(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function I(e,t,n,r,i){var o,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;o<s;o++)if(l(e,o)===l(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var d=!0,f=0;f<u;f++)if(l(e,o+f)!==l(t,f)){d=!1;break}if(d)return o}return-1}function O(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function N(e,t,n,r){return ie(ne(t,e.length-n),e,n,r)}function D(e,t,n,r){return ie(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function B(e,t,n,r){return D(e,t,n,r)}function j(e,t,n,r){return ie(re(t),e,n,r)}function z(e,t,n,r){return ie(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function U(e,t,n){return 0===t&&n===e.length?p(e):p(e.slice(t,n))}function F(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,u,l=e[i],c=null,d=l>239?4:l>223?3:l>191?2:1;if(i+d<=n)switch(d){case 1:l<128&&(c=l);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&l)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=d}return function(e){var t=e.length;if(t<=K)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=K));return n}(r)}S.poolSize=8192,S._augment=function(e){return e.__proto__=S.prototype,e},S.from=function(e,t,n){return E(null,e,t,n)},S.TYPED_ARRAY_SUPPORT&&(S.prototype.__proto__=Uint8Array.prototype,S.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&S[Symbol.species]),S.alloc=function(e,t,n){return function(e,t,n,r){return k(t),t<=0?_(e,t):void 0!==n?"string"==typeof r?_(e,t).fill(n,r):_(e,t).fill(n):_(e,t)}(null,e,t,n)},S.allocUnsafe=function(e){return M(null,e)},S.allocUnsafeSlow=function(e){return M(null,e)},S.isBuffer=oe,S.compare=function(e,t){if(!A(e)||!A(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},S.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},S.concat=function(e,t){if(!b(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return S.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=S.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!A(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},S.byteLength=T,S.prototype._isBuffer=!0,S.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)P(this,t,t+1);return this},S.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)P(this,t,t+3),P(this,t+1,t+2);return this},S.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)P(this,t,t+7),P(this,t+1,t+6),P(this,t+2,t+5),P(this,t+3,t+4);return this},S.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?F(this,0,e):R.apply(this,arguments)},S.prototype.equals=function(e){if(!A(e))throw new TypeError("Argument must be a Buffer");return this===e||0===S.compare(this,e)},S.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},S.prototype.compare=function(e,t,n,r,i){if(!A(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(r,i),l=e.slice(t,n),c=0;c<s;++c)if(u[c]!==l[c]){o=u[c],a=l[c];break}return o<a?-1:a<o?1:0},S.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},S.prototype.indexOf=function(e,t,n){return L(this,e,t,n,!0)},S.prototype.lastIndexOf=function(e,t,n){return L(this,e,t,n,!1)},S.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return O(this,e,t,n);case"utf8":case"utf-8":return N(this,e,t,n);case"ascii":return D(this,e,t,n);case"latin1":case"binary":return B(this,e,t,n);case"base64":return j(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},S.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var K=4096;function q(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function H(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function W(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=te(e[o]);return i}function $(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function V(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function Y(e,t,n,r,i,o){if(!A(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function G(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function Z(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function Q(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function X(e,t,n,r,i){return i||Q(e,0,n,4),g(e,t,n,r,23,4),n+4}function J(e,t,n,r,i){return i||Q(e,0,n,8),g(e,t,n,r,52,8),n+8}S.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),S.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=S.prototype;else{var i=t-e;n=new S(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},S.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||V(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},S.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||V(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},S.prototype.readUInt8=function(e,t){return t||V(e,1,this.length),this[e]},S.prototype.readUInt16LE=function(e,t){return t||V(e,2,this.length),this[e]|this[e+1]<<8},S.prototype.readUInt16BE=function(e,t){return t||V(e,2,this.length),this[e]<<8|this[e+1]},S.prototype.readUInt32LE=function(e,t){return t||V(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},S.prototype.readUInt32BE=function(e,t){return t||V(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},S.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||V(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},S.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||V(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},S.prototype.readInt8=function(e,t){return t||V(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},S.prototype.readInt16LE=function(e,t){t||V(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},S.prototype.readInt16BE=function(e,t){t||V(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},S.prototype.readInt32LE=function(e,t){return t||V(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},S.prototype.readInt32BE=function(e,t){return t||V(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},S.prototype.readFloatLE=function(e,t){return t||V(e,4,this.length),m(this,e,!0,23,4)},S.prototype.readFloatBE=function(e,t){return t||V(e,4,this.length),m(this,e,!1,23,4)},S.prototype.readDoubleLE=function(e,t){return t||V(e,8,this.length),m(this,e,!0,52,8)},S.prototype.readDoubleBE=function(e,t){return t||V(e,8,this.length),m(this,e,!1,52,8)},S.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||Y(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},S.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||Y(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},S.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||Y(this,e,t,1,255,0),S.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},S.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||Y(this,e,t,2,65535,0),S.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):G(this,e,t,!0),t+2},S.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||Y(this,e,t,2,65535,0),S.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):G(this,e,t,!1),t+2},S.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||Y(this,e,t,4,4294967295,0),S.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Z(this,e,t,!0),t+4},S.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||Y(this,e,t,4,4294967295,0),S.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Z(this,e,t,!1),t+4},S.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);Y(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},S.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);Y(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},S.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||Y(this,e,t,1,127,-128),S.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},S.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||Y(this,e,t,2,32767,-32768),S.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):G(this,e,t,!0),t+2},S.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||Y(this,e,t,2,32767,-32768),S.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):G(this,e,t,!1),t+2},S.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||Y(this,e,t,4,2147483647,-2147483648),S.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Z(this,e,t,!0),t+4},S.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||Y(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),S.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Z(this,e,t,!1),t+4},S.prototype.writeFloatLE=function(e,t,n){return X(this,e,t,!0,n)},S.prototype.writeFloatBE=function(e,t,n){return X(this,e,t,!1,n)},S.prototype.writeDoubleLE=function(e,t,n){return J(this,e,t,!0,n)},S.prototype.writeDoubleBE=function(e,t,n){return J(this,e,t,!1,n)},S.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!S.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},S.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!S.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=A(e)?e:ne(new S(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var ee=/[^+\/0-9A-Za-z-_]/g;function te(e){return e<16?"0"+e.toString(16):e.toString(16)}function ne(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function re(e){return function(e){var t,n,r,i,o,a;d||f();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[s-2]?2:"="===e[s-1]?1:0,a=new c(3*s/4-o),r=o>0?s-4:s;var u=0;for(t=0,n=0;t<r;t+=4,n+=3)i=l[e.charCodeAt(t)]<<18|l[e.charCodeAt(t+1)]<<12|l[e.charCodeAt(t+2)]<<6|l[e.charCodeAt(t+3)],a[u++]=i>>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===o?(i=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,a[u++]=255&i):1===o&&(i=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(ee,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function ie(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function oe(e){return null!=e&&(!!e._isBuffer||ae(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&ae(e.slice(0,0))}(e))}function ae(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var se=Object.freeze({__proto__:null,Buffer:S,INSPECT_MAX_BYTES:50,SlowBuffer:function(e){return+e!=e&&(e=0),S.alloc(+e)},isBuffer:oe,kMaxLength:y}),ue={},le={},ce={},de=o(se),fe={};function he(){throw new Error("setTimeout has not been defined")}function pe(){throw new Error("clearTimeout has not been defined")}var me=he,ge=pe;function ve(e){if(me===setTimeout)return setTimeout(e,0);if((me===he||!me)&&setTimeout)return me=setTimeout,setTimeout(e,0);try{return me(e,0)}catch(t){try{return me.call(null,e,0)}catch(t){return me.call(this,e,0)}}}"function"==typeof n.setTimeout&&(me=setTimeout),"function"==typeof n.clearTimeout&&(ge=clearTimeout);var be,ye=[],we=!1,_e=-1;function Se(){we&&be&&(we=!1,be.length?ye=be.concat(ye):_e=-1,ye.length&&Ee())}function Ee(){if(!we){var e=ve(Se);we=!0;for(var t=ye.length;t;){for(be=ye,ye=[];++_e<t;)be&&be[_e].run();_e=-1,t=ye.length}be=null,we=!1,function(e){if(ge===clearTimeout)return clearTimeout(e);if((ge===pe||!ge)&&clearTimeout)return ge=clearTimeout,clearTimeout(e);try{return ge(e)}catch(t){try{return ge.call(null,e)}catch(t){return ge.call(this,e)}}}(e)}}function ke(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];ye.push(new Me(e,t)),1!==ye.length||we||ve(Ee)}function Me(e,t){this.fun=e,this.array=t}function Ce(){}Me.prototype.run=function(){this.fun.apply(null,this.array)};var xe,Ae=Ce,Te=Ce,Re=Ce,Pe=Ce,Le=Ce,Ie=Ce,Oe=Ce,Ne=n.performance||{},De=Ne.now||Ne.mozNow||Ne.msNow||Ne.oNow||Ne.webkitNow||function(){return(new Date).getTime()},Be=new Date,je={nextTick:ke,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Ae,addListener:Te,once:Re,off:Pe,removeListener:Le,removeAllListeners:Ie,emit:Oe,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*De.call(Ne),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Be)/1e3}},ze={exports:{}},Ue={exports:{}};function Fe(){return xe||(xe=1,function(e,t){var n=de,r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=o),o.prototype=Object.create(r.prototype),i(r,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=r(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}(Ue,Ue.exports)),Ue.exports}var Ke=65536,qe=4294967295,He=Fe().Buffer,We=r.crypto||r.msCrypto;We&&We.getRandomValues?ze.exports=function(e,t){if(e>qe)throw new RangeError("requested too many random bytes");var n=He.allocUnsafe(e);if(e>0)if(e>Ke)for(var r=0;r<e;r+=Ke)We.getRandomValues(n.slice(r,r+Ke));else We.getRandomValues(n);return"function"==typeof t?ke((function(){t(null,n)})):n}:ze.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")};var $e=ze.exports,Ve={exports:{}};"function"==typeof Object.create?Ve.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Ve.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}};var Ye=Ve.exports,Ge={exports:{}};function Ze(){}function Qe(){Qe.init.call(this)}function Xe(e){return void 0===e._maxListeners?Qe.defaultMaxListeners:e._maxListeners}function Je(e,t,n,r){var i,o,a;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((o=e._events)?(o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]):(o=e._events=new Ze,e._eventsCount=0),a){if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),!a.warned&&(i=Xe(e))&&i>0&&a.length>i){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(s)}}else a=o[t]=n,++e._eventsCount;return e}function et(e,t,n){var r=!1;function i(){e.removeListener(t,i),r||(r=!0,n.apply(e,arguments))}return i.listener=n,i}function tt(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function nt(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}Ze.prototype=Object.create(null),Qe.EventEmitter=Qe,Qe.usingDomains=!1,Qe.prototype.domain=void 0,Qe.prototype._events=void 0,Qe.prototype._maxListeners=void 0,Qe.defaultMaxListeners=10,Qe.init=function(){this.domain=null,Qe.usingDomains&&(void 0).active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Ze,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Qe.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},Qe.prototype.getMaxListeners=function(){return Xe(this)},Qe.prototype.emit=function(e){var t,n,r,i,o,a,s,u="error"===e;if(a=this._events)u=u&&null==a.error;else if(!u)return!1;if(s=this.domain,u){if(t=arguments[1],!s){if(t instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(n=a[e]))return!1;var c="function"==typeof n;switch(r=arguments.length){case 1:!function(e,t,n){if(t)e.call(n);else for(var r=e.length,i=nt(e,r),o=0;o<r;++o)i[o].call(n)}(n,c,this);break;case 2:!function(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,o=nt(e,i),a=0;a<i;++a)o[a].call(n,r)}(n,c,this,arguments[1]);break;case 3:!function(e,t,n,r,i){if(t)e.call(n,r,i);else for(var o=e.length,a=nt(e,o),s=0;s<o;++s)a[s].call(n,r,i)}(n,c,this,arguments[1],arguments[2]);break;case 4:!function(e,t,n,r,i,o){if(t)e.call(n,r,i,o);else for(var a=e.length,s=nt(e,a),u=0;u<a;++u)s[u].call(n,r,i,o)}(n,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];!function(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,o=nt(e,i),a=0;a<i;++a)o[a].apply(n,r)}(n,c,this,i)}return!0},Qe.prototype.addListener=function(e,t){return Je(this,e,t,!1)},Qe.prototype.on=Qe.prototype.addListener,Qe.prototype.prependListener=function(e,t){return Je(this,e,t,!0)},Qe.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,et(this,e,t)),this},Qe.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,et(this,e,t)),this},Qe.prototype.removeListener=function(e,t){var n,r,i,o,a;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[e]))return this;if(n===t||n.listener&&n.listener===t)0==--this._eventsCount?this._events=new Ze:(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new Ze,this;delete r[e]}else!function(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}(n,i);r.removeListener&&this.emit("removeListener",e,a||t)}return this},Qe.prototype.removeAllListeners=function(e){var t,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new Ze,this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=new Ze:delete n[e]),this;if(0===arguments.length){for(var r,i=Object.keys(n),o=0;o<i.length;++o)"removeListener"!==(r=i[o])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new Ze,this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},Qe.prototype.listeners=function(e){var t,n,r=this._events;return n=r&&(t=r[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(t):[],n},Qe.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):tt.call(e,t)},Qe.prototype.listenerCount=tt,Qe.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var rt=o(Object.freeze({__proto__:null,EventEmitter:Qe,default:Qe})),it=rt.EventEmitter,ot="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},at=/%[sdj%]/g;function st(e){if(!Et(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(ft(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,o=String(e).replace(at,(function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),a=r[n];n<i;a=r[++n])wt(a)||!xt(a)?o+=" "+a:o+=" "+ft(a);return o}function ut(e,t){if(Mt(n.process))return function(){return ut(e,t).apply(this,arguments)};if(!0===je.noDeprecation)return e;var r=!1;return function(){if(!r){if(je.throwDeprecation)throw new Error(t);je.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}}var lt,ct={};function dt(e){return Mt(lt)&&(lt=je.env.NODE_DEBUG||""),e=e.toUpperCase(),ct[e]||(new RegExp("\\b"+e+"\\b","i").test(lt)?ct[e]=function(){var t=st.apply(null,arguments);console.error("%s %d: %s",e,0,t)}:ct[e]=function(){}),ct[e]}function ft(e,t){var n={seen:[],stylize:pt};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),yt(t)?n.showHidden=t:t&&Bt(n,t),Mt(n.showHidden)&&(n.showHidden=!1),Mt(n.depth)&&(n.depth=2),Mt(n.colors)&&(n.colors=!1),Mt(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=ht),mt(n,e,n.depth)}function ht(e,t){var n=ft.styles[t];return n?"["+ft.colors[n][0]+"m"+e+"["+ft.colors[n][1]+"m":e}function pt(e,t){return e}function mt(e,t,n){if(e.customInspect&&t&&Rt(t.inspect)&&t.inspect!==ft&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(n,e);return Et(r)||(r=mt(e,r,n)),r}var i=function(e,t){if(Mt(t))return e.stylize("undefined","undefined");if(Et(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return St(t)?e.stylize(""+t,"number"):yt(t)?e.stylize(""+t,"boolean"):wt(t)?e.stylize("null","null"):void 0}(e,t);if(i)return i;var o=Object.keys(t),a=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),Tt(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return gt(t);if(0===o.length){if(Rt(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(Ct(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(At(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Tt(t))return gt(t)}var u,l="",c=!1,d=["{","}"];return bt(t)&&(c=!0,d=["[","]"]),Rt(t)&&(l=" [Function"+(t.name?": "+t.name:"")+"]"),Ct(t)&&(l=" "+RegExp.prototype.toString.call(t)),At(t)&&(l=" "+Date.prototype.toUTCString.call(t)),Tt(t)&&(l=" "+gt(t)),0!==o.length||c&&0!=t.length?n<0?Ct(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),u=c?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)jt(t,String(a))?o.push(vt(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(vt(e,t,n,r,i,!0))})),o}(e,t,n,a,o):o.map((function(r){return vt(e,t,n,a,r,c)})),e.seen.pop(),function(e,t,n){var r=e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return r>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(u,l,d)):d[0]+l+d[1]}function gt(e){return"["+Error.prototype.toString.call(e)+"]"}function vt(e,t,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),jt(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=wt(n)?mt(e,u.value,null):mt(e,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),Mt(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function bt(e){return Array.isArray(e)}function yt(e){return"boolean"==typeof e}function wt(e){return null===e}function _t(e){return null==e}function St(e){return"number"==typeof e}function Et(e){return"string"==typeof e}function kt(e){return"symbol"==typeof e}function Mt(e){return void 0===e}function Ct(e){return xt(e)&&"[object RegExp]"===It(e)}function xt(e){return"object"==typeof e&&null!==e}function At(e){return xt(e)&&"[object Date]"===It(e)}function Tt(e){return xt(e)&&("[object Error]"===It(e)||e instanceof Error)}function Rt(e){return"function"==typeof e}function Pt(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function Lt(e){return oe(e)}function It(e){return Object.prototype.toString.call(e)}function Ot(e){return e<10?"0"+e.toString(10):e.toString(10)}ft.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},ft.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var Nt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Dt(){console.log("%s - %s",function(){var e=new Date,t=[Ot(e.getHours()),Ot(e.getMinutes()),Ot(e.getSeconds())].join(":");return[e.getDate(),Nt[e.getMonth()],t].join(" ")}(),st.apply(null,arguments))}function Bt(e,t){if(!t||!xt(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}function jt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var zt,Ut,Ft={inherits:ot,_extend:Bt,log:Dt,isBuffer:Lt,isPrimitive:Pt,isFunction:Rt,isError:Tt,isDate:At,isObject:xt,isRegExp:Ct,isUndefined:Mt,isSymbol:kt,isString:Et,isNumber:St,isNullOrUndefined:_t,isNull:wt,isBoolean:yt,isArray:bt,inspect:ft,deprecate:ut,format:st,debuglog:dt},Kt=o(Object.freeze({__proto__:null,_extend:Bt,debuglog:dt,default:Ft,deprecate:ut,format:st,inherits:ot,inspect:ft,isArray:bt,isBoolean:yt,isBuffer:Lt,isDate:At,isError:Tt,isFunction:Rt,isNull:wt,isNullOrUndefined:_t,isNumber:St,isObject:xt,isPrimitive:Pt,isRegExp:Ct,isString:Et,isSymbol:kt,isUndefined:Mt,log:Dt}));function qt(){if(Ut)return zt;function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function n(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function i(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}Ut=1;var o=de.Buffer,a=Kt.inspect,s=a&&a.custom||"inspect";return zt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var n,i;return n=e,i=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,r,i=o.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,r=s,o.prototype.copy.call(t,n,r),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0==(e-=o)){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,t}},{key:s,value:function(e,n){return a(this,t(t({},n),{},{depth:0,customInspect:!1}))}}],i&&r(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),e}(),zt}function Ht(e,t){$t(e,t),Wt(e)}function Wt(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function $t(e,t){e.emit("error",t)}var Vt={destroy:function(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return r||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ke($t,this,e)):ke($t,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?n._writableState?n._writableState.errorEmitted?ke(Wt,n):(n._writableState.errorEmitted=!0,ke(Ht,n,e)):ke(Ht,n,e):t?(ke(Wt,n),t(e)):ke(Wt,n)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}},Yt={},Gt={};function Zt(e,t,n){n||(n=Error);var r=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);r.prototype.name=n.name,r.prototype.code=e,Gt[e]=r}function Qt(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}Zt("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),Zt("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,o;if("string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))o="The ".concat(e," ").concat(r," ").concat(Qt(t,"type"));else{var a=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(a," ").concat(r," ").concat(Qt(t,"type"))}return o+". Received type ".concat(typeof n)}),TypeError),Zt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Zt("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),Zt("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Zt("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),Zt("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Zt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Zt("ERR_STREAM_WRITE_AFTER_END","write after end"),Zt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Zt("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),Zt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Yt.codes=Gt;var Xt,Jt,en,tn,nn=Yt.codes.ERR_INVALID_OPT_VALUE,rn={getHighWaterMark:function(e,t,n,r){var i=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,r,n);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new nn(r?n:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}},on=function(e,t){if(an("noDeprecation"))return e;var n=!1;return function(){if(!n){if(an("throwDeprecation"))throw new Error(t);an("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}};function an(e){try{if(!r.localStorage)return!1}catch(e){return!1}var t=r.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}function sn(){if(Jt)return Xt;function e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var t;Jt=1,Xt=S,S.WritableState=_;var n,i={deprecate:on},o=it,a=de.Buffer,s=(void 0!==r?r:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},u=Vt,l=rn.getHighWaterMark,c=Yt.codes,d=c.ERR_INVALID_ARG_TYPE,f=c.ERR_METHOD_NOT_IMPLEMENTED,h=c.ERR_MULTIPLE_CALLBACK,p=c.ERR_STREAM_CANNOT_PIPE,m=c.ERR_STREAM_DESTROYED,g=c.ERR_STREAM_NULL_VALUES,v=c.ERR_STREAM_WRITE_AFTER_END,b=c.ERR_UNKNOWN_ENCODING,y=u.errorOrDestroy;function w(){}function _(n,r,i){t=t||un(),n=n||{},"boolean"!=typeof i&&(i=r instanceof t),this.objectMode=!!n.objectMode,i&&(this.objectMode=this.objectMode||!!n.writableObjectMode),this.highWaterMark=l(this,n,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===n.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=n.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if("function"!=typeof i)throw new h;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(ke(i,r),ke(A,e,t),e._writableState.errorEmitted=!0,y(e,r)):(i(r),e._writableState.errorEmitted=!0,y(e,r),A(e,t))}(e,n,r,t,i);else{var o=C(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||M(e,n),r?ke(k,e,n,o,i):k(e,n,o,i)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==n.emitClose,this.autoDestroy=!!n.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function S(e){var r=this instanceof(t=t||un());if(!r&&!n.call(S,this))return new S(e);this._writableState=new _(e,this,r),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function E(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new m("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function k(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),A(e,t)}function M(t,n){n.bufferProcessing=!0;var r=n.bufferedRequest;if(t._writev&&r&&r.next){var i=n.bufferedRequestCount,o=new Array(i),a=n.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,E(t,n,!0,n.length,o,"",a.finish),n.pendingcb++,n.lastBufferedRequest=null,a.next?(n.corkedRequestsFree=a.next,a.next=null):n.corkedRequestsFree=new e(n),n.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,c=r.encoding,d=r.callback;if(E(t,n,!1,n.objectMode?1:l.length,l,c,d),r=r.next,n.bufferedRequestCount--,n.writing)break}null===r&&(n.lastBufferedRequest=null)}n.bufferedRequest=r,n.bufferProcessing=!1}function C(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function x(e,t){e._final((function(n){t.pendingcb--,n&&y(e,n),t.prefinished=!0,e.emit("prefinish"),A(e,t)}))}function A(e,t){var n=C(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,ke(x,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}return Ye(S,o),_.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(_.prototype,"buffer",{get:i.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(n=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(e){return!!n.call(this,e)||this===S&&e&&e._writableState instanceof _}})):n=function(e){return e instanceof this},S.prototype.pipe=function(){y(this,new p)},S.prototype.write=function(e,t,n){var r,i=this._writableState,o=!1,u=!i.objectMode&&(r=e,a.isBuffer(r)||r instanceof s);return u&&!a.isBuffer(e)&&(e=function(e){return a.from(e)}(e)),"function"==typeof t&&(n=t,t=null),u?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=w),i.ending?function(e,t){var n=new v;y(e,n),ke(t,n)}(this,n):(u||function(e,t,n,r){var i;return null===n?i=new g:"string"==typeof n||t.objectMode||(i=new d("chunk",["string","Buffer"],n)),!i||(y(e,i),ke(r,i),!1)}(this,i,e,n))&&(i.pendingcb++,o=function(e,t,n,r,i,o){if(!n){var s=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=a.from(t,n)),t}(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var u=t.objectMode?1:r.length;t.length+=u;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else E(e,t,!1,u,r,i,o);return l}(this,i,u,e,t,n)),o},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||M(this,e))},S.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new b(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(e,t,n){n(new f("_write()"))},S.prototype._writev=null,S.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,A(e,t),n&&(t.finished?ke(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),S.prototype.destroy=u.destroy,S.prototype._undestroy=u.undestroy,S.prototype._destroy=function(e,t){t(e)},Xt}function un(){if(tn)return en;tn=1;var e=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};en=a;var t=Sn(),n=sn();Ye(a,t);for(var r=e(n.prototype),i=0;i<r.length;i++){var o=r[i];a.prototype[o]||(a.prototype[o]=n.prototype[o])}function a(e){if(!(this instanceof a))return new a(e);t.call(this,e),n.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",s)))}function s(){this._writableState.ended||ke(u,this)}function u(e){e.end()}return Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),en}var ln,cn={};function dn(){if(ln)return cn;ln=1;var e=Fe().Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(n){var r;switch(this.encoding=function(n){var r=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(n);if("string"!=typeof r&&(e.isEncoding===t||!t(n)))throw new Error("Unknown encoding: "+n);return r||n}(n),this.encoding){case"utf16le":this.text=o,this.end=a,r=4;break;case"utf8":this.fillLast=i,r=4;break;case"base64":this.text=s,this.end=u,r=3;break;default:return this.write=l,void(this.end=c)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(r)}function r(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function i(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function o(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function a(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function s(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function u(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function c(e){return e&&e.length?this.write(e):""}return cn.StringDecoder=n,n.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},n.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},n.prototype.text=function(e,t){var n=function(e,t,n){var i=t.length-1;if(i<n)return 0;var o=r(t[i]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--i<n||-2===o?0:(o=r(t[i]))>=0?(o>0&&(e.lastNeed=o-2),o):--i<n||-2===o?0:(o=r(t[i]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var i=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},n.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},cn}var fn=Yt.codes.ERR_STREAM_PREMATURE_CLOSE;function hn(){}var pn,mn,gn,vn,bn,yn,wn=function e(t,n,r){if("function"==typeof n)return e(t,null,n);n||(n={}),r=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(r||hn);var i=n.readable||!1!==n.readable&&t.readable,o=n.writable||!1!==n.writable&&t.writable,a=function(){t.writable||u()},s=t._writableState&&t._writableState.finished,u=function(){o=!1,s=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,c=function(){i=!1,l=!0,o||r.call(t)},d=function(e){r.call(t,e)},f=function(){var e;return i&&!l?(t._readableState&&t._readableState.ended||(e=new fn),r.call(t,e)):o&&!s?(t._writableState&&t._writableState.ended||(e=new fn),r.call(t,e)):void 0},h=function(){t.req.on("finish",u)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",u),t.on("abort",f),t.req?h():t.on("request",h)):o&&!t._writableState&&(t.on("end",a),t.on("close",a)),t.on("end",c),t.on("finish",u),!1!==n.error&&t.on("error",d),t.on("close",f),function(){t.removeListener("complete",u),t.removeListener("abort",f),t.removeListener("request",h),t.req&&t.req.removeListener("finish",u),t.removeListener("end",a),t.removeListener("close",a),t.removeListener("finish",u),t.removeListener("end",c),t.removeListener("error",d),t.removeListener("close",f)}};function _n(){if(mn)return pn;var e;function t(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}mn=1;var n=wn,r=Symbol("lastResolve"),i=Symbol("lastReject"),o=Symbol("error"),a=Symbol("ended"),s=Symbol("lastPromise"),u=Symbol("handlePromise"),l=Symbol("stream");function c(e,t){return{value:e,done:t}}function d(e){var t=e[r];if(null!==t){var n=e[l].read();null!==n&&(e[s]=null,e[r]=null,e[i]=null,t(c(n,!1)))}}function f(e){ke(d,e)}var h=Object.getPrototypeOf((function(){})),p=Object.setPrototypeOf((t(e={get stream(){return this[l]},next:function(){var e=this,t=this[o];if(null!==t)return Promise.reject(t);if(this[a])return Promise.resolve(c(void 0,!0));if(this[l].destroyed)return new Promise((function(t,n){ke((function(){e[o]?n(e[o]):t(c(void 0,!0))}))}));var n,r=this[s];if(r)n=new Promise(function(e,t){return function(n,r){e.then((function(){t[a]?n(c(void 0,!0)):t[u](n,r)}),r)}}(r,this));else{var i=this[l].read();if(null!==i)return Promise.resolve(c(i,!1));n=new Promise(this[u])}return this[s]=n,n}},Symbol.asyncIterator,(function(){return this})),t(e,"return",(function(){var e=this;return new Promise((function(t,n){e[l].destroy(null,(function(e){e?n(e):t(c(void 0,!0))}))}))})),e),h);return pn=function(e){var d,h=Object.create(p,(t(d={},l,{value:e,writable:!0}),t(d,r,{value:null,writable:!0}),t(d,i,{value:null,writable:!0}),t(d,o,{value:null,writable:!0}),t(d,a,{value:e._readableState.endEmitted,writable:!0}),t(d,u,{value:function(e,t){var n=h[l].read();n?(h[s]=null,h[r]=null,h[i]=null,e(c(n,!1))):(h[r]=e,h[i]=t)},writable:!0}),d));return h[s]=null,n(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=h[i];return null!==t&&(h[s]=null,h[r]=null,h[i]=null,t(e)),void(h[o]=e)}var n=h[r];null!==n&&(h[s]=null,h[r]=null,h[i]=null,n(c(void 0,!0))),h[a]=!0})),e.on("readable",f.bind(null,h)),h},pn}function Sn(){if(yn)return bn;var e;yn=1,bn=S,S.ReadableState=_,rt.EventEmitter;var t,n=function(e,t){return e.listeners(t).length},i=it,o=de.Buffer,a=(void 0!==r?r:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},s=Kt;t=s&&s.debuglog?s.debuglog("stream"):function(){};var u,l,c,d=qt(),f=Vt,h=rn.getHighWaterMark,p=Yt.codes,m=p.ERR_INVALID_ARG_TYPE,g=p.ERR_STREAM_PUSH_AFTER_EOF,v=p.ERR_METHOD_NOT_IMPLEMENTED,b=p.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;Ye(S,i);var y=f.errorOrDestroy,w=["error","close","destroy","pause","resume"];function _(t,n,r){e=e||un(),t=t||{},"boolean"!=typeof r&&(r=n instanceof e),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=h(this,t,"readableHighWaterMark",r),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(u||(u=dn().StringDecoder),this.decoder=new u(t.encoding),this.encoding=t.encoding)}function S(t){if(e=e||un(),!(this instanceof S))return new S(t);var n=this instanceof e;this._readableState=new _(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),i.call(this)}function E(e,n,r,i,s){t("readableAddChunk",n);var u,l=e._readableState;if(null===n)l.reading=!1,function(e,n){if(t("onEofChunk"),!n.ended){if(n.decoder){var r=n.decoder.end();r&&r.length&&(n.buffer.push(r),n.length+=n.objectMode?1:r.length)}n.ended=!0,n.sync?x(e):(n.needReadable=!1,n.emittedReadable||(n.emittedReadable=!0,A(e)))}}(e,l);else if(s||(u=function(e,t){var n,r;return r=t,o.isBuffer(r)||r instanceof a||"string"==typeof t||void 0===t||e.objectMode||(n=new m("chunk",["string","Buffer","Uint8Array"],t)),n}(l,n)),u)y(e,u);else if(l.objectMode||n&&n.length>0)if("string"==typeof n||l.objectMode||Object.getPrototypeOf(n)===o.prototype||(n=function(e){return o.from(e)}(n)),i)l.endEmitted?y(e,new b):k(e,l,n,!0);else if(l.ended)y(e,new g);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!r?(n=l.decoder.write(n),l.objectMode||0!==n.length?k(e,l,n,!1):T(e,l)):k(e,l,n,!1)}else i||(l.reading=!1,T(e,l));return!l.ended&&(l.length<l.highWaterMark||0===l.length)}function k(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&x(e)),T(e,t)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=f.destroy,S.prototype._undestroy=f.undestroy,S.prototype._destroy=function(e,t){t(e)},S.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=o.from(e,t),t=""),n=!0),E(this,e,t,!1,n)},S.prototype.unshift=function(e){return E(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){u||(u=dn().StringDecoder);var t=new u(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,r="";null!==n;)r+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==r&&this._readableState.buffer.push(r),this._readableState.length=r.length,this};var M=1073741824;function C(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=M?e=M:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function x(e){var n=e._readableState;t("emitReadable",n.needReadable,n.emittedReadable),n.needReadable=!1,n.emittedReadable||(t("emitReadable",n.flowing),n.emittedReadable=!0,ke(A,e))}function A(e){var n=e._readableState;t("emitReadable_",n.destroyed,n.length,n.ended),n.destroyed||!n.length&&!n.ended||(e.emit("readable"),n.emittedReadable=!1),n.needReadable=!n.flowing&&!n.ended&&n.length<=n.highWaterMark,O(e)}function T(e,t){t.readingMore||(t.readingMore=!0,ke(R,e,t))}function R(e,n){for(;!n.reading&&!n.ended&&(n.length<n.highWaterMark||n.flowing&&0===n.length);){var r=n.length;if(t("maybeReadMore read 0"),e.read(0),r===n.length)break}n.readingMore=!1}function P(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function L(e){t("readable nexttick read 0"),e.read(0)}function I(e,n){t("resume",n.reading),n.reading||e.read(0),n.resumeScheduled=!1,e.emit("resume"),O(e),n.flowing&&!n.reading&&e.read(0)}function O(e){var n=e._readableState;for(t("flow",n.flowing);n.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function D(e){var n=e._readableState;t("endReadable",n.endEmitted),n.endEmitted||(n.ended=!0,ke(B,n,e))}function B(e,n){if(t("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,n.readable=!1,n.emit("end"),e.autoDestroy)){var r=n._writableState;(!r||r.autoDestroy&&r.finished)&&n.destroy()}}function j(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}return S.prototype.read=function(e){t("read",e),e=parseInt(e,10);var n=this._readableState,r=e;if(0!==e&&(n.emittedReadable=!1),0===e&&n.needReadable&&((0!==n.highWaterMark?n.length>=n.highWaterMark:n.length>0)||n.ended))return t("read: emitReadable",n.length,n.ended),0===n.length&&n.ended?D(this):x(this),null;if(0===(e=C(e,n))&&n.ended)return 0===n.length&&D(this),null;var i,o=n.needReadable;return t("need readable",o),(0===n.length||n.length-e<n.highWaterMark)&&t("length less than watermark",o=!0),n.ended||n.reading?t("reading or ended",o=!1):o&&(t("do read"),n.reading=!0,n.sync=!0,0===n.length&&(n.needReadable=!0),this._read(n.highWaterMark),n.sync=!1,n.reading||(e=C(r,n))),null===(i=e>0?N(e,n):null)?(n.needReadable=n.length<=n.highWaterMark,e=0):(n.length-=e,n.awaitDrain=0),0===n.length&&(n.ended||(n.needReadable=!0),r!==e&&n.ended&&D(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){y(this,new v("_read()"))},S.prototype.pipe=function(e,r){var i=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,t("pipe count=%d opts=%j",o.pipesCount,r);var a=r&&!1===r.end||e===je.stdout||e===je.stderr?m:u;function s(n,r){t("onunpipe"),n===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,t("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),e.removeListener("drain",l),e.removeListener("error",f),e.removeListener("unpipe",s),i.removeListener("end",u),i.removeListener("end",m),i.removeListener("data",d),c=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function u(){t("onend"),e.end()}o.endEmitted?ke(a):i.once("end",a),e.on("unpipe",s);var l=function(e){return function(){var r=e._readableState;t("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,0===r.awaitDrain&&n(e,"data")&&(r.flowing=!0,O(e))}}(i);e.on("drain",l);var c=!1;function d(n){t("ondata");var r=e.write(n);t("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==j(o.pipes,e))&&!c&&(t("false write response, pause",o.awaitDrain),o.awaitDrain++),i.pause())}function f(r){t("onerror",r),m(),e.removeListener("error",f),0===n(e,"error")&&y(e,r)}function h(){e.removeListener("finish",p),m()}function p(){t("onfinish"),e.removeListener("close",h),m()}function m(){t("unpipe"),i.unpipe(e)}return i.on("data",d),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",f),e.once("close",h),e.once("finish",p),e.emit("pipe",i),o.flowing||(t("pipe resume"),i.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=j(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},S.prototype.on=function(e,n){var r=i.prototype.on.call(this,e,n),o=this._readableState;return"data"===e?(o.readableListening=this.listenerCount("readable")>0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,t("on readable",o.length,o.reading),o.length?x(this):o.reading||ke(L,this))),r},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(e,t){var n=i.prototype.removeListener.call(this,e,t);return"readable"===e&&ke(P,this),n},S.prototype.removeAllListeners=function(e){var t=i.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||ke(P,this),t},S.prototype.resume=function(){var e=this._readableState;return e.flowing||(t("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,ke(I,e,t))}(this,e)),e.paused=!1,this},S.prototype.pause=function(){return t("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(t("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(e){var n=this,r=this._readableState,i=!1;for(var o in e.on("end",(function(){if(t("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&n.push(e)}n.push(null)})),e.on("data",(function(o){t("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o||(r.objectMode||o&&o.length)&&(n.push(o)||(i=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var a=0;a<w.length;a++)e.on(w[a],this.emit.bind(this,w[a]));return this._read=function(n){t("wrapped _read",n),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===l&&(l=_n()),l(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),S._fromList=N,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(e,t){return void 0===c&&(c=vn?gn:(vn=1,gn=function(){throw new Error("Readable.from is not available in the browser")})),c(S,e,t)}),bn}var En=Pn,kn=Yt.codes,Mn=kn.ERR_METHOD_NOT_IMPLEMENTED,Cn=kn.ERR_MULTIPLE_CALLBACK,xn=kn.ERR_TRANSFORM_ALREADY_TRANSFORMING,An=kn.ERR_TRANSFORM_WITH_LENGTH_0,Tn=un();function Rn(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new Cn);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Pn(e){if(!(this instanceof Pn))return new Pn(e);Tn.call(this,e),this._transformState={afterTransform:Rn.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",Ln)}function Ln(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?In(this,null,null):this._flush((function(t,n){In(e,t,n)}))}function In(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new An;if(e._transformState.transforming)throw new xn;return e.push(null)}Ye(Pn,Tn),Pn.prototype.push=function(e,t){return this._transformState.needTransform=!1,Tn.prototype.push.call(this,e,t)},Pn.prototype._transform=function(e,t,n){n(new Mn("_transform()"))},Pn.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},Pn.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},Pn.prototype._destroy=function(e,t){Tn.prototype._destroy.call(this,e,(function(e){t(e)}))};var On,Nn=Bn,Dn=En;function Bn(e){if(!(this instanceof Bn))return new Bn(e);Dn.call(this,e)}Ye(Bn,Dn),Bn.prototype._transform=function(e,t,n){n(null,e)};var jn=Yt.codes,zn=jn.ERR_MISSING_ARGS,Un=jn.ERR_STREAM_DESTROYED;function Fn(e){if(e)throw e}function Kn(e){e()}function qn(e,t){return e.pipe(t)}var Hn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=function(e){return e.length?"function"!=typeof e[e.length-1]?Fn:e.pop():Fn}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new zn("streams");var o=t.map((function(e,n){var a=n<t.length-1;return function(e,t,n,r){r=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(r);var i=!1;e.on("close",(function(){i=!0})),void 0===On&&(On=wn),On(e,{readable:t,writable:n},(function(e){if(e)return r(e);i=!0,r()}));var o=!1;return function(t){if(!i&&!o)return o=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void r(t||new Un("pipe"))}}(e,a,n>0,(function(e){r||(r=e),e&&o.forEach(Kn),a||(o.forEach(Kn),i(r))}))}));return t.reduce(qn)};!function(e,t){(t=e.exports=Sn()).Stream=t,t.Readable=t,t.Writable=sn(),t.Duplex=un(),t.Transform=En,t.PassThrough=Nn,t.finished=wn,t.pipeline=Hn}(Ge,Ge.exports);var Wn=Ge.exports,$n=Fe().Buffer,Vn=Wn.Transform;function Yn(e){Vn.call(this),this._block=$n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Ye(Yn,Vn),Yn.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},Yn.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},Yn.prototype.update=function(e,t){if(function(e,t){if(!$n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");$n.isBuffer(e)||(e=$n.from(e,t));for(var n=this._block,r=0;this._blockOffset+e.length-r>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)n[i++]=e[r++];this._update(),this._blockOffset=0}for(;r<e.length;)n[this._blockOffset++]=e[r++];for(var o=0,a=8*e.length;a>0;++o)this._length[o]+=a,(a=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*a);return this},Yn.prototype._update=function(){throw new Error("_update is not implemented")},Yn.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t},Yn.prototype._digest=function(){throw new Error("_digest is not implemented")};var Gn=Yn,Zn=Ye,Qn=Gn,Xn=Fe().Buffer,Jn=new Array(16);function er(){Qn.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function tr(e,t){return e<<t|e>>>32-t}function nr(e,t,n,r,i,o,a){return tr(e+(t&n|~t&r)+i+o|0,a)+t|0}function rr(e,t,n,r,i,o,a){return tr(e+(t&r|n&~r)+i+o|0,a)+t|0}function ir(e,t,n,r,i,o,a){return tr(e+(t^n^r)+i+o|0,a)+t|0}function or(e,t,n,r,i,o,a){return tr(e+(n^(t|~r))+i+o|0,a)+t|0}Zn(er,Qn),er.prototype._update=function(){for(var e=Jn,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,r=this._b,i=this._c,o=this._d;n=nr(n,r,i,o,e[0],3614090360,7),o=nr(o,n,r,i,e[1],3905402710,12),i=nr(i,o,n,r,e[2],606105819,17),r=nr(r,i,o,n,e[3],3250441966,22),n=nr(n,r,i,o,e[4],4118548399,7),o=nr(o,n,r,i,e[5],1200080426,12),i=nr(i,o,n,r,e[6],2821735955,17),r=nr(r,i,o,n,e[7],4249261313,22),n=nr(n,r,i,o,e[8],1770035416,7),o=nr(o,n,r,i,e[9],2336552879,12),i=nr(i,o,n,r,e[10],4294925233,17),r=nr(r,i,o,n,e[11],2304563134,22),n=nr(n,r,i,o,e[12],1804603682,7),o=nr(o,n,r,i,e[13],4254626195,12),i=nr(i,o,n,r,e[14],2792965006,17),n=rr(n,r=nr(r,i,o,n,e[15],1236535329,22),i,o,e[1],4129170786,5),o=rr(o,n,r,i,e[6],3225465664,9),i=rr(i,o,n,r,e[11],643717713,14),r=rr(r,i,o,n,e[0],3921069994,20),n=rr(n,r,i,o,e[5],3593408605,5),o=rr(o,n,r,i,e[10],38016083,9),i=rr(i,o,n,r,e[15],3634488961,14),r=rr(r,i,o,n,e[4],3889429448,20),n=rr(n,r,i,o,e[9],568446438,5),o=rr(o,n,r,i,e[14],3275163606,9),i=rr(i,o,n,r,e[3],4107603335,14),r=rr(r,i,o,n,e[8],1163531501,20),n=rr(n,r,i,o,e[13],2850285829,5),o=rr(o,n,r,i,e[2],4243563512,9),i=rr(i,o,n,r,e[7],1735328473,14),n=ir(n,r=rr(r,i,o,n,e[12],2368359562,20),i,o,e[5],4294588738,4),o=ir(o,n,r,i,e[8],2272392833,11),i=ir(i,o,n,r,e[11],1839030562,16),r=ir(r,i,o,n,e[14],4259657740,23),n=ir(n,r,i,o,e[1],2763975236,4),o=ir(o,n,r,i,e[4],1272893353,11),i=ir(i,o,n,r,e[7],4139469664,16),r=ir(r,i,o,n,e[10],3200236656,23),n=ir(n,r,i,o,e[13],681279174,4),o=ir(o,n,r,i,e[0],3936430074,11),i=ir(i,o,n,r,e[3],3572445317,16),r=ir(r,i,o,n,e[6],76029189,23),n=ir(n,r,i,o,e[9],3654602809,4),o=ir(o,n,r,i,e[12],3873151461,11),i=ir(i,o,n,r,e[15],530742520,16),n=or(n,r=ir(r,i,o,n,e[2],3299628645,23),i,o,e[0],4096336452,6),o=or(o,n,r,i,e[7],1126891415,10),i=or(i,o,n,r,e[14],2878612391,15),r=or(r,i,o,n,e[5],4237533241,21),n=or(n,r,i,o,e[12],1700485571,6),o=or(o,n,r,i,e[3],2399980690,10),i=or(i,o,n,r,e[10],4293915773,15),r=or(r,i,o,n,e[1],2240044497,21),n=or(n,r,i,o,e[8],1873313359,6),o=or(o,n,r,i,e[15],4264355552,10),i=or(i,o,n,r,e[6],2734768916,15),r=or(r,i,o,n,e[13],1309151649,21),n=or(n,r,i,o,e[4],4149444226,6),o=or(o,n,r,i,e[11],3174756917,10),i=or(i,o,n,r,e[2],718787259,15),r=or(r,i,o,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+o|0},er.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=Xn.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e};var ar=er,sr=de.Buffer,ur=Ye,lr=Gn,cr=new Array(16),dr=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],fr=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],hr=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],pr=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],mr=[0,1518500249,1859775393,2400959708,2840853838],gr=[1352829926,1548603684,1836072691,2053994217,0];function vr(){lr.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function br(e,t){return e<<t|e>>>32-t}function yr(e,t,n,r,i,o,a,s){return br(e+(t^n^r)+o+a|0,s)+i|0}function wr(e,t,n,r,i,o,a,s){return br(e+(t&n|~t&r)+o+a|0,s)+i|0}function _r(e,t,n,r,i,o,a,s){return br(e+((t|~n)^r)+o+a|0,s)+i|0}function Sr(e,t,n,r,i,o,a,s){return br(e+(t&r|n&~r)+o+a|0,s)+i|0}function Er(e,t,n,r,i,o,a,s){return br(e+(t^(n|~r))+o+a|0,s)+i|0}ur(vr,lr),vr.prototype._update=function(){for(var e=cr,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,s=0|this._a,u=0|this._b,l=0|this._c,c=0|this._d,d=0|this._e,f=0;f<80;f+=1){var h,p;f<16?(h=yr(n,r,i,o,a,e[dr[f]],mr[0],hr[f]),p=Er(s,u,l,c,d,e[fr[f]],gr[0],pr[f])):f<32?(h=wr(n,r,i,o,a,e[dr[f]],mr[1],hr[f]),p=Sr(s,u,l,c,d,e[fr[f]],gr[1],pr[f])):f<48?(h=_r(n,r,i,o,a,e[dr[f]],mr[2],hr[f]),p=_r(s,u,l,c,d,e[fr[f]],gr[2],pr[f])):f<64?(h=Sr(n,r,i,o,a,e[dr[f]],mr[3],hr[f]),p=wr(s,u,l,c,d,e[fr[f]],gr[3],pr[f])):(h=Er(n,r,i,o,a,e[dr[f]],mr[4],hr[f]),p=yr(s,u,l,c,d,e[fr[f]],gr[4],pr[f])),n=a,a=o,o=br(i,10),i=r,r=h,s=d,d=c,c=br(l,10),l=u,u=p}var m=this._b+i+c|0;this._b=this._c+o+d|0,this._c=this._d+a+s|0,this._d=this._e+n+u|0,this._e=this._a+r+l|0,this._a=m},vr.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=sr.alloc?sr.alloc(20):new sr(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e};var kr=vr,Mr={exports:{}},Cr=Fe().Buffer;function xr(e,t){this._block=Cr.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}xr.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=Cr.from(e,t));for(var n=this._block,r=this._blockSize,i=e.length,o=this._len,a=0;a<i;){for(var s=o%r,u=Math.min(i-a,r-s),l=0;l<u;l++)n[s+l]=e[a+l];a+=u,(o+=u)%r==0&&this._update(n)}return this._len+=i,this},xr.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},xr.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var Ar=xr,Tr=Ye,Rr=Ar,Pr=Fe().Buffer,Lr=[1518500249,1859775393,-1894007588,-899497514],Ir=new Array(80);function Or(){this.init(),this._w=Ir,Rr.call(this,64,56)}function Nr(e){return e<<30|e>>>2}function Dr(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}Tr(Or,Rr),Or.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Or.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,u=0;u<16;++u)n[u]=e.readInt32BE(4*u);for(;u<80;++u)n[u]=n[u-3]^n[u-8]^n[u-14]^n[u-16];for(var l=0;l<80;++l){var c=~~(l/20),d=0|((t=r)<<5|t>>>27)+Dr(c,i,o,a)+s+n[l]+Lr[c];s=a,a=o,o=Nr(i),i=r,r=d}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},Or.prototype._hash=function(){var e=Pr.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e};var Br=Or,jr=Ye,zr=Ar,Ur=Fe().Buffer,Fr=[1518500249,1859775393,-1894007588,-899497514],Kr=new Array(80);function qr(){this.init(),this._w=Kr,zr.call(this,64,56)}function Hr(e){return e<<5|e>>>27}function Wr(e){return e<<30|e>>>2}function $r(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}jr(qr,zr),qr.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},qr.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,u=0;u<16;++u)n[u]=e.readInt32BE(4*u);for(;u<80;++u)n[u]=(t=n[u-3]^n[u-8]^n[u-14]^n[u-16])<<1|t>>>31;for(var l=0;l<80;++l){var c=~~(l/20),d=Hr(r)+$r(c,i,o,a)+s+n[l]+Fr[c]|0;s=a,a=o,o=Wr(i),i=r,r=d}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},qr.prototype._hash=function(){var e=Ur.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e};var Vr=qr,Yr=Ye,Gr=Ar,Zr=Fe().Buffer,Qr=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Xr=new Array(64);function Jr(){this.init(),this._w=Xr,Gr.call(this,64,56)}function ei(e,t,n){return n^e&(t^n)}function ti(e,t,n){return e&t|n&(e|t)}function ni(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function ri(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function ii(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function oi(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}Yr(Jr,Gr),Jr.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},Jr.prototype._update=function(e){for(var t=this._w,n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,s=0|this._f,u=0|this._g,l=0|this._h,c=0;c<16;++c)t[c]=e.readInt32BE(4*c);for(;c<64;++c)t[c]=oi(t[c-2])+t[c-7]+ii(t[c-15])+t[c-16]|0;for(var d=0;d<64;++d){var f=l+ri(a)+ei(a,s,u)+Qr[d]+t[d]|0,h=ni(n)+ti(n,r,i)|0;l=u,u=s,s=a,a=o+f|0,o=i,i=r,r=n,n=f+h|0}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0,this._f=s+this._f|0,this._g=u+this._g|0,this._h=l+this._h|0},Jr.prototype._hash=function(){var e=Zr.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};var ai=Jr,si=Ye,ui=ai,li=Ar,ci=Fe().Buffer,di=new Array(64);function fi(){this.init(),this._w=di,li.call(this,64,56)}si(fi,ui),fi.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},fi.prototype._hash=function(){var e=ci.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};var hi=fi,pi=Ye,mi=Ar,gi=Fe().Buffer,vi=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],bi=new Array(160);function yi(){this.init(),this._w=bi,mi.call(this,128,112)}function wi(e,t,n){return n^e&(t^n)}function _i(e,t,n){return e&t|n&(e|t)}function Si(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function Ei(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function ki(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function Mi(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function Ci(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function xi(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function Ai(e,t){return e>>>0<t>>>0?1:0}pi(yi,mi),yi.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},yi.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,s=0|this._fh,u=0|this._gh,l=0|this._hh,c=0|this._al,d=0|this._bl,f=0|this._cl,h=0|this._dl,p=0|this._el,m=0|this._fl,g=0|this._gl,v=0|this._hl,b=0;b<32;b+=2)t[b]=e.readInt32BE(4*b),t[b+1]=e.readInt32BE(4*b+4);for(;b<160;b+=2){var y=t[b-30],w=t[b-30+1],_=ki(y,w),S=Mi(w,y),E=Ci(y=t[b-4],w=t[b-4+1]),k=xi(w,y),M=t[b-14],C=t[b-14+1],x=t[b-32],A=t[b-32+1],T=S+C|0,R=_+M+Ai(T,S)|0;R=(R=R+E+Ai(T=T+k|0,k)|0)+x+Ai(T=T+A|0,A)|0,t[b]=R,t[b+1]=T}for(var P=0;P<160;P+=2){R=t[P],T=t[P+1];var L=_i(n,r,i),I=_i(c,d,f),O=Si(n,c),N=Si(c,n),D=Ei(a,p),B=Ei(p,a),j=vi[P],z=vi[P+1],U=wi(a,s,u),F=wi(p,m,g),K=v+B|0,q=l+D+Ai(K,v)|0;q=(q=(q=q+U+Ai(K=K+F|0,F)|0)+j+Ai(K=K+z|0,z)|0)+R+Ai(K=K+T|0,T)|0;var H=N+I|0,W=O+L+Ai(H,N)|0;l=u,v=g,u=s,g=m,s=a,m=p,a=o+q+Ai(p=h+K|0,h)|0,o=i,h=f,i=r,f=d,r=n,d=c,n=q+W+Ai(c=K+H|0,K)|0}this._al=this._al+c|0,this._bl=this._bl+d|0,this._cl=this._cl+f|0,this._dl=this._dl+h|0,this._el=this._el+p|0,this._fl=this._fl+m|0,this._gl=this._gl+g|0,this._hl=this._hl+v|0,this._ah=this._ah+n+Ai(this._al,c)|0,this._bh=this._bh+r+Ai(this._bl,d)|0,this._ch=this._ch+i+Ai(this._cl,f)|0,this._dh=this._dh+o+Ai(this._dl,h)|0,this._eh=this._eh+a+Ai(this._el,p)|0,this._fh=this._fh+s+Ai(this._fl,m)|0,this._gh=this._gh+u+Ai(this._gl,g)|0,this._hh=this._hh+l+Ai(this._hl,v)|0},yi.prototype._hash=function(){var e=gi.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};var Ti=yi,Ri=Ye,Pi=Ti,Li=Ar,Ii=Fe().Buffer,Oi=new Array(160);function Ni(){this.init(),this._w=Oi,Li.call(this,128,112)}Ri(Ni,Pi),Ni.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},Ni.prototype._hash=function(){var e=Ii.allocUnsafe(48);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};var Di=Ni,Bi=Mr.exports=function(e){e=e.toLowerCase();var t=Bi[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};Bi.sha=Br,Bi.sha1=Vr,Bi.sha224=hi,Bi.sha256=ai,Bi.sha384=Di,Bi.sha512=Ti;var ji=Mr.exports;function zi(){this.head=null,this.tail=null,this.length=0}zi.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},zi.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},zi.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},zi.prototype.clear=function(){this.head=this.tail=null,this.length=0},zi.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},zi.prototype.concat=function(e){if(0===this.length)return S.alloc(0);if(1===this.length)return this.head.data;for(var t=S.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t};var Ui=S.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Fi(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!Ui(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=qi;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Hi;break;default:return void(this.write=Ki)}this.charBuffer=new S(6),this.charReceived=0,this.charLength=0}function Ki(e){return e.toString(this.encoding)}function qi(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function Hi(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}Fi.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(e=e.slice(n,e.length),!((r=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r,i=e.length;if(this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),i=(t+=e.toString(this.encoding,0,i)).length-1,(r=t.charCodeAt(i))>=55296&&r<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},Fi.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},Fi.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t};var Wi=Object.freeze({__proto__:null,StringDecoder:Fi});Yi.ReadableState=Vi;var $i=dt("stream");function Vi(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof Eo&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new zi,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new Fi(e.encoding),this.encoding=e.encoding)}function Yi(e){if(!(this instanceof Yi))return new Yi(e);this._readableState=new Vi(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),Qe.call(this)}function Gi(e,t,n,r,i){var o=function(e,t){var n=null;return oe(t)||"string"==typeof t||null==t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}(t,n);if(o)e.emit("error",o);else if(null===n)t.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,Xi(e)}}(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var u;!t.decoder||i||r||(n=t.decoder.write(n),u=!t.objectMode&&0===n.length),i||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&Xi(e))),function(e,t){t.readingMore||(t.readingMore=!0,ke(eo,e,t))}(e,t)}else i||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}ot(Yi,Qe),Yi.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding)!==n.encoding&&(e=S.from(e,t),t=""),Gi(this,n,e,t,!1)},Yi.prototype.unshift=function(e){return Gi(this,this._readableState,e,"",!0)},Yi.prototype.isPaused=function(){return!1===this._readableState.flowing},Yi.prototype.setEncoding=function(e){return this._readableState.decoder=new Fi(e),this._readableState.encoding=e,this};var Zi=8388608;function Qi(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=Zi?e=Zi:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function Xi(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||($i("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?ke(Ji,e):Ji(e))}function Ji(e){$i("emit readable"),e.emit("readable"),ro(e)}function eo(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&($i("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function to(e){$i("readable nexttick read 0"),e.read(0)}function no(e,t){t.reading||($i("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),ro(e),t.flowing&&!t.reading&&e.read(0)}function ro(e){var t=e._readableState;for($i("flow",t.flowing);t.flowing&&null!==e.read(););}function io(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0==(e-=a)){a===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=S.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),0==(e-=a)){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}(e,t),r}(e,t.buffer,t.decoder),n);var n}function oo(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,ke(ao,t,e))}function ao(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function so(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function uo(){}function lo(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function co(e,t){Object.defineProperty(this,"buffer",{get:ut((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof Eo&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?ke(i,r):i(r),e._writableState.errorEmitted=!0,e.emit("error",r)}(e,n,r,t,i);else{var o=go(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||mo(e,n),r?ke(po,e,n,o,i):po(e,n,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new yo(this)}function fo(e){if(!(this instanceof fo||this instanceof Eo))return new fo(e);this._writableState=new co(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),Qe.call(this)}function ho(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function po(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),bo(e,t)}function mo(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0;n;)i[a]=n,n=n.next,a+=1;ho(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new yo(t)}else{for(;n;){var s=n.chunk,u=n.encoding,l=n.callback;if(ho(e,t,!1,t.objectMode?1:s.length,s,u,l),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function go(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function vo(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function bo(e,t){var n=go(t);return n&&(0===t.pendingcb?(vo(e,t),t.finished=!0,e.emit("finish")):vo(e,t)),n}function yo(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}Yi.prototype.read=function(e){$i("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return $i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?oo(this):Xi(this),null;if(0===(e=Qi(e,t))&&t.ended)return 0===t.length&&oo(this),null;var r,i=t.needReadable;return $i("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&$i("length less than watermark",i=!0),t.ended||t.reading?$i("reading or ended",i=!1):i&&($i("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=Qi(n,t))),null===(r=e>0?io(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&oo(this)),null!==r&&this.emit("data",r),r},Yi.prototype._read=function(e){this.emit("error",new Error("not implemented"))},Yi.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,$i("pipe count=%d opts=%j",r.pipesCount,t);var i=t&&!1===t.end?l:a;function o(e){$i("onunpipe"),e===n&&l()}function a(){$i("onend"),e.end()}r.endEmitted?ke(i):n.once("end",i),e.on("unpipe",o);var s=function(e){return function(){var t=e._readableState;$i("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,ro(e))}}(n);e.on("drain",s);var u=!1;function l(){$i("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),e.removeListener("drain",s),e.removeListener("error",f),e.removeListener("unpipe",o),n.removeListener("end",a),n.removeListener("end",l),n.removeListener("data",d),u=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||s()}var c=!1;function d(t){$i("ondata"),c=!1,!1!==e.write(t)||c||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==so(r.pipes,e))&&!u&&($i("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,c=!0),n.pause())}function f(t){var n;$i("onerror",t),m(),e.removeListener("error",f),0===(n="error",e.listeners(n).length)&&e.emit("error",t)}function h(){e.removeListener("finish",p),m()}function p(){$i("onfinish"),e.removeListener("close",h),m()}function m(){$i("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",f),e.once("close",h),e.once("finish",p),e.emit("pipe",n),r.flowing||($i("pipe resume"),n.resume()),e},Yi.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var o=so(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},Yi.prototype.on=function(e,t){var n=Qe.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&Xi(this):ke(to,this))}return n},Yi.prototype.addListener=Yi.prototype.on,Yi.prototype.resume=function(){var e=this._readableState;return e.flowing||($i("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,ke(no,e,t))}(this,e)),this},Yi.prototype.pause=function(){return $i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&($i("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Yi.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;for(var i in e.on("end",(function(){if($i("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)})),e.on("data",(function(i){$i("wrapped data"),t.decoder&&(i=t.decoder.write(i)),t.objectMode&&null==i||(t.objectMode||i&&i.length)&&(r.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}(["error","close","destroy","pause","resume"],(function(t){e.on(t,r.emit.bind(r,t))})),r._read=function(t){$i("wrapped _read",t),n&&(n=!1,e.resume())},r},Yi._fromList=io,fo.WritableState=co,ot(fo,Qe),co.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},fo.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},fo.prototype.write=function(e,t,n){var r=this._writableState,i=!1;return"function"==typeof t&&(n=t,t=null),S.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=uo),r.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),ke(t,n)}(this,n):function(e,t,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):S.isBuffer(n)||"string"==typeof n||void 0===n||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),ke(r,o),i=!1),i}(this,r,e,n)&&(r.pendingcb++,i=function(e,t,n,r,i){n=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=S.from(t,n)),t}(t,n,r),S.isBuffer(n)&&(r="buffer");var o=t.objectMode?1:n.length;t.length+=o;var a=t.length<t.highWaterMark;if(a||(t.needDrain=!0),t.writing||t.corked){var s=t.lastBufferedRequest;t.lastBufferedRequest=new lo(n,r,i),s?s.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else ho(e,t,!1,o,n,r,i);return a}(this,r,e,t,n)),i},fo.prototype.cork=function(){this._writableState.corked++},fo.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||mo(this,e))},fo.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},fo.prototype._write=function(e,t,n){n(new Error("not implemented"))},fo.prototype._writev=null,fo.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,bo(e,t),n&&(t.finished?ke(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n)},ot(Eo,Yi);for(var wo=Object.keys(fo.prototype),_o=0;_o<wo.length;_o++){var So=wo[_o];Eo.prototype[So]||(Eo.prototype[So]=fo.prototype[So])}function Eo(e){if(!(this instanceof Eo))return new Eo(e);Yi.call(this,e),fo.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",ko)}function ko(){this.allowHalfOpen||this._writableState.ended||ke(Mo,this)}function Mo(e){e.end()}function Co(e){this.afterTransform=function(t,n){return function(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=n&&e.push(n),i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function xo(e){if(!(this instanceof xo))return new xo(e);Eo.call(this,e),this._transformState=new Co(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e){Ao(t,e)})):Ao(t)}))}function Ao(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}function To(e){if(!(this instanceof To))return new To(e);xo.call(this,e)}function Ro(){Qe.call(this)}ot(xo,Eo),xo.prototype.push=function(e,t){return this._transformState.needTransform=!1,Eo.prototype.push.call(this,e,t)},xo.prototype._transform=function(e,t,n){throw new Error("Not implemented")},xo.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},xo.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},ot(To,xo),To.prototype._transform=function(e,t,n){n(null,e)},ot(Ro,Qe),Ro.Readable=Yi,Ro.Writable=fo,Ro.Duplex=Eo,Ro.Transform=xo,Ro.PassThrough=To,Ro.Stream=Ro,Ro.prototype.pipe=function(e,t){var n=this;function r(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function i(){n.readable&&n.resume&&n.resume()}n.on("data",r),e.on("drain",i),e._isStdio||t&&!1===t.end||(n.on("end",a),n.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(l(),0===Qe.listenerCount(this,"error"))throw e}function l(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",a),n.removeListener("close",s),n.removeListener("error",u),e.removeListener("error",u),n.removeListener("end",l),n.removeListener("close",l),e.removeListener("close",l)}return n.on("error",u),e.on("error",u),n.on("end",l),n.on("close",l),e.on("close",l),e.emit("pipe",n),e};var Po=o(Object.freeze({__proto__:null,Duplex:Eo,PassThrough:To,Readable:Yi,Stream:Ro,Transform:xo,Writable:fo,default:Ro})),Lo=o(Wi),Io=Fe().Buffer,Oo=Po.Transform,No=Lo.StringDecoder;function Do(e){Oo.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}Ye(Do,Oo),Do.prototype.update=function(e,t,n){"string"==typeof e&&(e=Io.from(e,t));var r=this._update(e);return this.hashMode?this:(n&&(r=this._toString(r,n)),r)},Do.prototype.setAutoPadding=function(){},Do.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},Do.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},Do.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},Do.prototype._transform=function(e,t,n){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){r=e}finally{n(r)}},Do.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},Do.prototype._finalOrDigest=function(e){var t=this.__final()||Io.alloc(0);return e&&(t=this._toString(t,e,!0)),t},Do.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new No(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return n&&(r+=this._decoder.end()),r};var Bo=Do,jo=ar,zo=kr,Uo=ji,Fo=Bo;function Ko(e){Fo.call(this,"digest"),this._hash=e}Ye(Ko,Fo),Ko.prototype._update=function(e){this._hash.update(e)},Ko.prototype._final=function(){return this._hash.digest()};var qo=function(e){return"md5"===(e=e.toLowerCase())?new jo:"rmd160"===e||"ripemd160"===e?new zo:new Ko(Uo(e))},Ho=Ye,Wo=Fe().Buffer,$o=Bo,Vo=Wo.alloc(128),Yo=64;function Go(e,t){$o.call(this,"digest"),"string"==typeof t&&(t=Wo.from(t)),this._alg=e,this._key=t,t.length>Yo?t=e(t):t.length<Yo&&(t=Wo.concat([t,Vo],Yo));for(var n=this._ipad=Wo.allocUnsafe(Yo),r=this._opad=Wo.allocUnsafe(Yo),i=0;i<Yo;i++)n[i]=54^t[i],r[i]=92^t[i];this._hash=[n]}Ho(Go,$o),Go.prototype._update=function(e){this._hash.push(e)},Go.prototype._final=function(){var e=this._alg(Wo.concat(this._hash));return this._alg(Wo.concat([this._opad,e]))};var Zo=ar,Qo=function(e){return(new Zo).update(e).digest()},Xo=Ye,Jo=Go,ea=Bo,ta=Fe().Buffer,na=Qo,ra=kr,ia=ji,oa=ta.alloc(128);function aa(e,t){ea.call(this,"digest"),"string"==typeof t&&(t=ta.from(t));var n="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>n?t=("rmd160"===e?new ra:ia(e)).update(t).digest():t.length<n&&(t=ta.concat([t,oa],n));for(var r=this._ipad=ta.allocUnsafe(n),i=this._opad=ta.allocUnsafe(n),o=0;o<n;o++)r[o]=54^t[o],i[o]=92^t[o];this._hash="rmd160"===e?new ra:ia(e),this._hash.update(r)}Xo(aa,ea),aa.prototype._update=function(e){this._hash.update(e)},aa.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new ra:ia(this._alg)).update(this._opad).update(e).digest()};var sa=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new aa("rmd160",t):"md5"===e?new Jo(na,t):new aa(e,t)},ua={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}},la=ua,ca={},da=Math.pow(2,30)-1,fa=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>da||t!=t)throw new TypeError("Bad key length")},ha=r.process&&r.process.browser?"utf-8":r.process&&r.process.version?parseInt(je.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",pa=Fe().Buffer,ma=function(e,t,n){if(pa.isBuffer(e))return e;if("string"==typeof e)return pa.from(e,t);if(ArrayBuffer.isView(e))return pa.from(e.buffer);throw new TypeError(n+" must be a string, a Buffer, a typed array or a DataView")},ga=Qo,va=kr,ba=ji,ya=Fe().Buffer,wa=fa,_a=ha,Sa=ma,Ea=ya.alloc(128),ka={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function Ma(e,t,n){var r=function(e){function t(t){return ba(e).update(t).digest()}function n(e){return(new va).update(e).digest()}return"rmd160"===e||"ripemd160"===e?n:"md5"===e?ga:t}(e),i="sha512"===e||"sha384"===e?128:64;t.length>i?t=r(t):t.length<i&&(t=ya.concat([t,Ea],i));for(var o=ya.allocUnsafe(i+ka[e]),a=ya.allocUnsafe(i+ka[e]),s=0;s<i;s++)o[s]=54^t[s],a[s]=92^t[s];var u=ya.allocUnsafe(i+n+4);o.copy(u,0,0,i),this.ipad1=u,this.ipad2=o,this.opad=a,this.alg=e,this.blocksize=i,this.hash=r,this.size=ka[e]}Ma.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)};var Ca,xa,Aa=function(e,t,n,r,i){wa(n,r);var o=new Ma(i=i||"sha1",e=Sa(e,_a,"Password"),(t=Sa(t,_a,"Salt")).length),a=ya.allocUnsafe(r),s=ya.allocUnsafe(t.length+4);t.copy(s,0,0,t.length);for(var u=0,l=ka[i],c=Math.ceil(r/l),d=1;d<=c;d++){s.writeUInt32BE(d,t.length);for(var f=o.run(s,o.ipad1),h=f,p=1;p<n;p++){h=o.run(h,o.ipad2);for(var m=0;m<l;m++)f[m]^=h[m]}f.copy(a,u),u+=l}return a},Ta=Fe().Buffer,Ra=fa,Pa=ha,La=Aa,Ia=ma,Oa=r.crypto&&r.crypto.subtle,Na={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},Da=[];function Ba(){return xa||(xa=r.process&&r.process.nextTick?r.process.nextTick:r.queueMicrotask?r.queueMicrotask:r.setImmediate?r.setImmediate:r.setTimeout)}function ja(e,t,n,r,i){return Oa.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return Oa.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:i}},e,r<<3)})).then((function(e){return Ta.from(e)}))}ca.pbkdf2=function(e,t,n,i,o,a){"function"==typeof o&&(a=o,o=void 0);var s=Na[(o=o||"sha1").toLowerCase()];if(s&&"function"==typeof r.Promise){if(Ra(n,i),e=Ia(e,Pa,"Password"),t=Ia(t,Pa,"Salt"),"function"!=typeof a)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){Ba()((function(){t(null,e)}))}),(function(e){Ba()((function(){t(e)}))}))}(function(e){if(r.process&&!r.process.browser)return Promise.resolve(!1);if(!Oa||!Oa.importKey||!Oa.deriveBits)return Promise.resolve(!1);if(void 0!==Da[e])return Da[e];var t=ja(Ca=Ca||Ta.alloc(8),Ca,10,128,e).then((function(){return!0})).catch((function(){return!1}));return Da[e]=t,t}(s).then((function(r){return r?ja(e,t,n,i,s):La(e,t,n,i,o)})),a)}else Ba()((function(){var r;try{r=La(e,t,n,i,o)}catch(e){return a(e)}a(null,r)}))},ca.pbkdf2Sync=Aa;var za={},Ua={},Fa={readUInt32BE:function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},writeUInt32BE:function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},ip:function(e,t,n,r){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}n[r+0]=i>>>0,n[r+1]=o>>>0},rip:function(e,t,n,r){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;n[r+0]=i>>>0,n[r+1]=o>>>0},pc1:function(e,t,n,r){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;n[r+0]=i>>>0,n[r+1]=o>>>0},r28shl:function(e,t){return e<<t&268435455|e>>>28-t}},Ka=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];Fa.pc2=function(e,t,n,r){for(var i=0,o=0,a=Ka.length>>>1,s=0;s<a;s++)i<<=1,i|=e>>>Ka[s]&1;for(s=a;s<Ka.length;s++)o<<=1,o|=t>>>Ka[s]&1;n[r+0]=i>>>0,n[r+1]=o>>>0},Fa.expand=function(e,t,n){var r=0,i=0;r=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[n+0]=r>>>0,t[n+1]=i>>>0};var qa=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];Fa.substitute=function(e,t){for(var n=0,r=0;r<4;r++)n<<=4,n|=qa[64*r+(e>>>18-6*r&63)];for(r=0;r<4;r++)n<<=4,n|=qa[256+64*r+(t>>>18-6*r&63)];return n>>>0};var Ha=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];Fa.permute=function(e){for(var t=0,n=0;n<Ha.length;n++)t<<=1,t|=e>>>Ha[n]&1;return t>>>0},Fa.padSplit=function(e,t,n){for(var r=e.toString(2);r.length<t;)r="0"+r;for(var i=[],o=0;o<t;o+=n)i.push(r.slice(o,o+n));return i.join(" ")};var Wa=$a;function $a(e,t){if(!e)throw new Error(t||"Assertion failed")}$a.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var Va=Wa;function Ya(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==e.padding}var Ga=Ya;Ya.prototype._init=function(){},Ya.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},Ya.prototype._buffer=function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r<n;r++)this.buffer[this.bufferOff+r]=e[t+r];return this.bufferOff+=n,n},Ya.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},Ya.prototype._updateEncrypt=function(e){var t=0,n=0,r=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(r*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(i,n)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,i,n),n+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},Ya.prototype._updateDecrypt=function(e){for(var t=0,n=0,r=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(r*this.blockSize);r>0;r--)t+=this._buffer(e,t),n+=this._flushBuffer(i,n);return t+=this._buffer(e,t),i},Ya.prototype.final=function(e){var t,n;return e&&(t=this.update(e)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},Ya.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},Ya.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},Ya.prototype._unpad=function(e){return e},Ya.prototype._finalDecrypt=function(){Va.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)};var Za=Wa,Qa=Fa,Xa=Ga;function Ja(){this.tmp=new Array(2),this.keys=null}function es(e){Xa.call(this,e);var t=new Ja;this._desState=t,this.deriveKeys(t,e.key)}Ye(es,Xa);var ts=es;es.create=function(e){return new es(e)};var ns=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];es.prototype.deriveKeys=function(e,t){e.keys=new Array(32),Za.equal(t.length,this.blockSize,"Invalid key length");var n=Qa.readUInt32BE(t,0),r=Qa.readUInt32BE(t,4);Qa.pc1(n,r,e.tmp,0),n=e.tmp[0],r=e.tmp[1];for(var i=0;i<e.keys.length;i+=2){var o=ns[i>>>1];n=Qa.r28shl(n,o),r=Qa.r28shl(r,o),Qa.pc2(n,r,e.keys,i)}},es.prototype._update=function(e,t,n,r){var i=this._desState,o=Qa.readUInt32BE(e,t),a=Qa.readUInt32BE(e,t+4);Qa.ip(o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,a,i.tmp,0):this._decrypt(i,o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],Qa.writeUInt32BE(n,o,r),Qa.writeUInt32BE(n,a,r+4)},es.prototype._pad=function(e,t){if(!1===this.padding)return!1;for(var n=e.length-t,r=t;r<e.length;r++)e[r]=n;return!0},es.prototype._unpad=function(e){if(!1===this.padding)return e;for(var t=e[e.length-1],n=e.length-t;n<e.length;n++)Za.equal(e[n],t);return e.slice(0,e.length-t)},es.prototype._encrypt=function(e,t,n,r,i){for(var o=t,a=n,s=0;s<e.keys.length;s+=2){var u=e.keys[s],l=e.keys[s+1];Qa.expand(a,e.tmp,0),u^=e.tmp[0],l^=e.tmp[1];var c=Qa.substitute(u,l),d=a;a=(o^Qa.permute(c))>>>0,o=d}Qa.rip(a,o,r,i)},es.prototype._decrypt=function(e,t,n,r,i){for(var o=n,a=t,s=e.keys.length-2;s>=0;s-=2){var u=e.keys[s],l=e.keys[s+1];Qa.expand(o,e.tmp,0),u^=e.tmp[0],l^=e.tmp[1];var c=Qa.substitute(u,l),d=o;o=(a^Qa.permute(c))>>>0,a=d}Qa.rip(o,a,r,i)};var rs={},is=Wa,os=Ye,as={};function ss(e){is.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}rs.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}os(t,e);for(var n=Object.keys(as),r=0;r<n.length;r++){var i=n[r];t.prototype[i]=as[i]}return t.create=function(e){return new t(e)},t},as._cbcInit=function(){var e=new ss(this.options.iv);this._cbcState=e},as._update=function(e,t,n,r){var i=this._cbcState,o=this.constructor.super_.prototype,a=i.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)a[s]^=e[t+s];for(o._update.call(this,a,0,n,r),s=0;s<this.blockSize;s++)a[s]=n[r+s]}else{for(o._update.call(this,e,t,n,r),s=0;s<this.blockSize;s++)n[r+s]^=a[s];for(s=0;s<this.blockSize;s++)a[s]=e[t+s]}};var us=Wa,ls=Ga,cs=ts;function ds(e,t){us.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),r=t.slice(8,16),i=t.slice(16,24);this.ciphers="encrypt"===e?[cs.create({type:"encrypt",key:n}),cs.create({type:"decrypt",key:r}),cs.create({type:"encrypt",key:i})]:[cs.create({type:"decrypt",key:i}),cs.create({type:"encrypt",key:r}),cs.create({type:"decrypt",key:n})]}function fs(e){ls.call(this,e);var t=new ds(this.type,this.options.key);this._edeState=t}Ye(fs,ls);var hs=fs;fs.create=function(e){return new fs(e)},fs.prototype._update=function(e,t,n,r){var i=this._edeState;i.ciphers[0]._update(e,t,n,r),i.ciphers[1]._update(n,r,n,r),i.ciphers[2]._update(n,r,n,r)},fs.prototype._pad=cs.prototype._pad,fs.prototype._unpad=cs.prototype._unpad,Ua.utils=Fa,Ua.Cipher=Ga,Ua.DES=ts,Ua.CBC=rs,Ua.EDE=hs;var ps=Bo,ms=Ua,gs=Ye,vs=Fe().Buffer,bs={"des-ede3-cbc":ms.CBC.instantiate(ms.EDE),"des-ede3":ms.EDE,"des-ede-cbc":ms.CBC.instantiate(ms.EDE),"des-ede":ms.EDE,"des-cbc":ms.CBC.instantiate(ms.DES),"des-ecb":ms.DES};bs.des=bs["des-cbc"],bs.des3=bs["des-ede3-cbc"];var ys=ws;function ws(e){ps.call(this);var t,n=e.mode.toLowerCase(),r=bs[n];t=e.decrypt?"decrypt":"encrypt";var i=e.key;vs.isBuffer(i)||(i=vs.from(i)),"des-ede"!==n&&"des-ede-cbc"!==n||(i=vs.concat([i,i.slice(0,8)]));var o=e.iv;vs.isBuffer(o)||(o=vs.from(o)),this._des=r.create({key:i,iv:o,type:t})}gs(ws,ps),ws.prototype._update=function(e){return vs.from(this._des.update(e))},ws.prototype._final=function(){return vs.from(this._des.final())};var _s={},Ss={},Es={encrypt:function(e,t){return e._cipher.encryptBlock(t)},decrypt:function(e,t){return e._cipher.decryptBlock(t)}},ks={},Ms=function(e,t){for(var n=Math.min(e.length,t.length),r=new S(n),i=0;i<n;++i)r[i]=e[i]^t[i];return r},Cs=Ms;ks.encrypt=function(e,t){var n=Cs(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},ks.decrypt=function(e,t){var n=e._prev;e._prev=t;var r=e._cipher.decryptBlock(t);return Cs(r,n)};var xs={},As=Fe().Buffer,Ts=Ms;function Rs(e,t,n){var r=t.length,i=Ts(t,e._cache);return e._cache=e._cache.slice(r),e._prev=As.concat([e._prev,n?t:i]),i}xs.encrypt=function(e,t,n){for(var r,i=As.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=As.allocUnsafe(0)),!(e._cache.length<=t.length)){i=As.concat([i,Rs(e,t,n)]);break}r=e._cache.length,i=As.concat([i,Rs(e,t.slice(0,r),n)]),t=t.slice(r)}return i};var Ps={},Ls=Fe().Buffer;function Is(e,t,n){var r=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=Ls.concat([e._prev.slice(1),Ls.from([n?t:r])]),r}Ps.encrypt=function(e,t,n){for(var r=t.length,i=Ls.allocUnsafe(r),o=-1;++o<r;)i[o]=Is(e,t[o],n);return i};var Os={},Ns=Fe().Buffer;function Ds(e,t,n){for(var r,i,o=-1,a=0;++o<8;)r=t&1<<7-o?128:0,a+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^r))>>o%8,e._prev=Bs(e._prev,n?r:i);return a}function Bs(e,t){var n=e.length,r=-1,i=Ns.allocUnsafe(e.length);for(e=Ns.concat([e,Ns.from([t])]);++r<n;)i[r]=e[r]<<1|e[r+1]>>7;return i}Os.encrypt=function(e,t,n){for(var r=t.length,i=Ns.allocUnsafe(r),o=-1;++o<r;)i[o]=Ds(e,t[o],n);return i};var js={},zs=Ms;function Us(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}js.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=S.concat([e._cache,Us(e)]);var n=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),zs(t,n)};var Fs={},Ks=function(e){for(var t,n=e.length;n--;){if(255!==(t=e.readUInt8(n))){t++,e.writeUInt8(t,n);break}e.writeUInt8(0,n)}},qs=Ms,Hs=Fe().Buffer,Ws=Ks;function $s(e){var t=e._cipher.encryptBlockRaw(e._prev);return Ws(e._prev),t}Fs.encrypt=function(e,t){var n=Math.ceil(t.length/16),r=e._cache.length;e._cache=Hs.concat([e._cache,Hs.allocUnsafe(16*n)]);for(var i=0;i<n;i++){var o=$s(e),a=r+16*i;e._cache.writeUInt32BE(o[0],a+0),e._cache.writeUInt32BE(o[1],a+4),e._cache.writeUInt32BE(o[2],a+8),e._cache.writeUInt32BE(o[3],a+12)}var s=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),qs(t,s)};var Vs={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},Ys={ECB:Es,CBC:ks,CFB:xs,CFB8:Ps,CFB1:Os,OFB:js,CTR:Fs,GCM:Fs},Gs=Vs;for(var Zs in Gs)Gs[Zs].module=Ys[Gs[Zs].mode];var Qs=Gs,Xs={},Js=Fe().Buffer;function eu(e){Js.isBuffer(e)||(e=Js.from(e));for(var t=e.length/4|0,n=new Array(t),r=0;r<t;r++)n[r]=e.readUInt32BE(4*r);return n}function tu(e){for(;0<e.length;e++)e[0]=0}function nu(e,t,n,r,i){for(var o,a,s,u,l=n[0],c=n[1],d=n[2],f=n[3],h=e[0]^t[0],p=e[1]^t[1],m=e[2]^t[2],g=e[3]^t[3],v=4,b=1;b<i;b++)o=l[h>>>24]^c[p>>>16&255]^d[m>>>8&255]^f[255&g]^t[v++],a=l[p>>>24]^c[m>>>16&255]^d[g>>>8&255]^f[255&h]^t[v++],s=l[m>>>24]^c[g>>>16&255]^d[h>>>8&255]^f[255&p]^t[v++],u=l[g>>>24]^c[h>>>16&255]^d[p>>>8&255]^f[255&m]^t[v++],h=o,p=a,m=s,g=u;return o=(r[h>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^t[v++],a=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&h])^t[v++],s=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[h>>>8&255]<<8|r[255&p])^t[v++],u=(r[g>>>24]<<24|r[h>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^t[v++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var ru=[0,1,2,4,8,16,32,64,128,27,54],iu=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],r=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var l=s^s<<1^s<<2^s<<3^s<<4;l=l>>>8^255&l^99,n[a]=l,r[l]=a;var c=e[a],d=e[c],f=e[d],h=257*e[l]^16843008*l;i[0][a]=h<<24|h>>>8,i[1][a]=h<<16|h>>>16,i[2][a]=h<<8|h>>>24,i[3][a]=h,h=16843009*f^65537*d^257*c^16843008*a,o[0][l]=h<<24|h>>>8,o[1][l]=h<<16|h>>>16,o[2][l]=h<<8|h>>>24,o[3][l]=h,0===a?a=s=1:(a=c^e[e[e[f^c]]],s^=e[e[s]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:o}}();function ou(e){this._key=eu(e),this._reset()}ou.blockSize=16,ou.keySize=32,ou.prototype.blockSize=ou.blockSize,ou.prototype.keySize=ou.keySize,ou.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,r=4*(n+1),i=[],o=0;o<t;o++)i[o]=e[o];for(o=t;o<r;o++){var a=i[o-1];o%t==0?(a=a<<8|a>>>24,a=iu.SBOX[a>>>24]<<24|iu.SBOX[a>>>16&255]<<16|iu.SBOX[a>>>8&255]<<8|iu.SBOX[255&a],a^=ru[o/t|0]<<24):t>6&&o%t==4&&(a=iu.SBOX[a>>>24]<<24|iu.SBOX[a>>>16&255]<<16|iu.SBOX[a>>>8&255]<<8|iu.SBOX[255&a]),i[o]=i[o-t]^a}for(var s=[],u=0;u<r;u++){var l=r-u,c=i[l-(u%4?0:4)];s[u]=u<4||l<=4?c:iu.INV_SUB_MIX[0][iu.SBOX[c>>>24]]^iu.INV_SUB_MIX[1][iu.SBOX[c>>>16&255]]^iu.INV_SUB_MIX[2][iu.SBOX[c>>>8&255]]^iu.INV_SUB_MIX[3][iu.SBOX[255&c]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=s},ou.prototype.encryptBlockRaw=function(e){return nu(e=eu(e),this._keySchedule,iu.SUB_MIX,iu.SBOX,this._nRounds)},ou.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=Js.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},ou.prototype.decryptBlock=function(e){var t=(e=eu(e))[1];e[1]=e[3],e[3]=t;var n=nu(e,this._invKeySchedule,iu.INV_SUB_MIX,iu.INV_SBOX,this._nRounds),r=Js.allocUnsafe(16);return r.writeUInt32BE(n[0],0),r.writeUInt32BE(n[3],4),r.writeUInt32BE(n[2],8),r.writeUInt32BE(n[1],12),r},ou.prototype.scrub=function(){tu(this._keySchedule),tu(this._invKeySchedule),tu(this._key)},Xs.AES=ou;var au=Fe().Buffer,su=au.alloc(16,0);function uu(e){var t=au.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function lu(e){this.h=e,this.state=au.alloc(16,0),this.cache=au.allocUnsafe(0)}lu.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},lu.prototype._multiply=function(){for(var e,t,n,r=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%8)&&(i[0]^=r[0],i[1]^=r[1],i[2]^=r[2],i[3]^=r[3]),n=0!=(1&r[3]),t=3;t>0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,n&&(r[0]=r[0]^225<<24)}this.state=uu(i)},lu.prototype.update=function(e){var t;for(this.cache=au.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},lu.prototype.final=function(e,t){return this.cache.length&&this.ghash(au.concat([this.cache,su],16)),this.ghash(uu([0,e,0,t])),this.state};var cu=lu,du=Xs,fu=Fe().Buffer,hu=Bo,pu=cu,mu=Ms,gu=Ks;function vu(e,t,n,r){hu.call(this);var i=fu.alloc(4,0);this._cipher=new du.AES(t);var o=this._cipher.encryptBlock(i);this._ghash=new pu(o),n=function(e,t,n){if(12===t.length)return e._finID=fu.concat([t,fu.from([0,0,0,1])]),fu.concat([t,fu.from([0,0,0,2])]);var r=new pu(n),i=t.length,o=i%16;r.update(t),o&&(o=16-o,r.update(fu.alloc(o,0))),r.update(fu.alloc(8,0));var a=8*i,s=fu.alloc(8);s.writeUIntBE(a,0,8),r.update(s),e._finID=r.state;var u=fu.from(e._finID);return gu(u),u}(this,n,o),this._prev=fu.from(n),this._cache=fu.allocUnsafe(0),this._secCache=fu.allocUnsafe(0),this._decrypt=r,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}Ye(vu,hu),vu.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=fu.alloc(t,0),this._ghash.update(t))}this._called=!0;var n=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(n),this._len+=e.length,n},vu.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=mu(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var n=0;e.length!==t.length&&n++;for(var r=Math.min(e.length,t.length),i=0;i<r;++i)n+=e[i]^t[i];return n}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},vu.prototype.getAuthTag=function(){if(this._decrypt||!fu.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},vu.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},vu.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length};var bu=vu,yu=Xs,wu=Fe().Buffer,_u=Bo;function Su(e,t,n,r){_u.call(this),this._cipher=new yu.AES(t),this._prev=wu.from(n),this._cache=wu.allocUnsafe(0),this._secCache=wu.allocUnsafe(0),this._decrypt=r,this._mode=e}Ye(Su,_u),Su.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},Su.prototype._final=function(){this._cipher.scrub()};var Eu=Su,ku=Fe().Buffer,Mu=ar,Cu=function(e,t,n,r){if(ku.isBuffer(e)||(e=ku.from(e,"binary")),t&&(ku.isBuffer(t)||(t=ku.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var i=n/8,o=ku.alloc(i),a=ku.alloc(r||0),s=ku.alloc(0);i>0||r>0;){var u=new Mu;u.update(s),u.update(e),t&&u.update(t),s=u.digest();var l=0;if(i>0){var c=o.length-i;l=Math.min(i,s.length),s.copy(o,c,0,l),i-=l}if(l<s.length&&r>0){var d=a.length-r,f=Math.min(r,s.length-l);s.copy(a,d,l,l+f),r-=f}}return s.fill(0),{key:o,iv:a}},xu=Qs,Au=bu,Tu=Fe().Buffer,Ru=Eu,Pu=Bo,Lu=Xs,Iu=Cu;function Ou(e,t,n){Pu.call(this),this._cache=new Du,this._cipher=new Lu.AES(t),this._prev=Tu.from(n),this._mode=e,this._autopadding=!0}Ye(Ou,Pu),Ou.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get();)n=this._mode.encrypt(this,t),r.push(n);return Tu.concat(r)};var Nu=Tu.alloc(16,16);function Du(){this.cache=Tu.allocUnsafe(0)}function Bu(e,t,n){var r=xu[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=Tu.from(t)),t.length!==r.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=Tu.from(n)),"GCM"!==r.mode&&n.length!==r.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===r.type?new Ru(r.module,t,n):"auth"===r.type?new Au(r.module,t,n):new Ou(r.module,t,n)}Ou.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(Nu))throw this._cipher.scrub(),new Error("data not multiple of block length")},Ou.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},Du.prototype.add=function(e){this.cache=Tu.concat([this.cache,e])},Du.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},Du.prototype.flush=function(){for(var e=16-this.cache.length,t=Tu.allocUnsafe(e),n=-1;++n<e;)t.writeUInt8(e,n);return Tu.concat([this.cache,t])},Ss.createCipheriv=Bu,Ss.createCipher=function(e,t){var n=xu[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=Iu(t,!1,n.key,n.iv);return Bu(e,r.key,r.iv)};var ju={},zu=bu,Uu=Fe().Buffer,Fu=Qs,Ku=Eu,qu=Bo,Hu=Xs,Wu=Cu;function $u(e,t,n){qu.call(this),this._cache=new Vu,this._last=void 0,this._cipher=new Hu.AES(t),this._prev=Uu.from(n),this._mode=e,this._autopadding=!0}function Vu(){this.cache=Uu.allocUnsafe(0)}function Yu(e,t,n){var r=Fu[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=Uu.from(n)),"GCM"!==r.mode&&n.length!==r.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof t&&(t=Uu.from(t)),t.length!==r.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===r.type?new Ku(r.module,t,n,!0):"auth"===r.type?new zu(r.module,t,n,!0):new $u(r.module,t,n)}Ye($u,qu),$u.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,t),r.push(n);return Uu.concat(r)},$u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var n=-1;++n<t;)if(e[n+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},$u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},Vu.prototype.add=function(e){this.cache=Uu.concat([this.cache,e])},Vu.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},Vu.prototype.flush=function(){if(this.cache.length)return this.cache},ju.createDecipher=function(e,t){var n=Fu[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=Wu(t,!1,n.key,n.iv);return Yu(e,r.key,r.iv)},ju.createDecipheriv=Yu;var Gu=Ss,Zu=ju,Qu=Vs;_s.createCipher=_s.Cipher=Gu.createCipher,_s.createCipheriv=_s.Cipheriv=Gu.createCipheriv,_s.createDecipher=_s.Decipher=Zu.createDecipher,_s.createDecipheriv=_s.Decipheriv=Zu.createDecipheriv,_s.listCiphers=_s.getCiphers=function(){return Object.keys(Qu)};var Xu={};!function(e){e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}}(Xu);var Ju=ys,el=_s,tl=Qs,nl=Xu,rl=Cu;function il(e,t,n){if(e=e.toLowerCase(),tl[e])return el.createCipheriv(e,t,n);if(nl[e])return new Ju({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function ol(e,t,n){if(e=e.toLowerCase(),tl[e])return el.createDecipheriv(e,t,n);if(nl[e])return new Ju({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}za.createCipher=za.Cipher=function(e,t){var n,r;if(e=e.toLowerCase(),tl[e])n=tl[e].key,r=tl[e].iv;else{if(!nl[e])throw new TypeError("invalid suite type");n=8*nl[e].key,r=nl[e].iv}var i=rl(t,!1,n,r);return il(e,i.key,i.iv)},za.createCipheriv=za.Cipheriv=il,za.createDecipher=za.Decipher=function(e,t){var n,r;if(e=e.toLowerCase(),tl[e])n=tl[e].key,r=tl[e].iv;else{if(!nl[e])throw new TypeError("invalid suite type");n=8*nl[e].key,r=nl[e].iv}var i=rl(t,!1,n,r);return ol(e,i.key,i.iv)},za.createDecipheriv=za.Decipheriv=ol,za.listCiphers=za.getCiphers=function(){return Object.keys(nl).concat(el.getCiphers())};var al={},sl={exports:{}};!function(e){!function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:de.Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function s(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function u(e,t,n,r){for(var i=0,o=Math.min(e.length,n),a=t;a<o;a++){var s=e.charCodeAt(a)-48;i*=r,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=s(e,t,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=s(e,t,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,l=0,c=n;c<s;c+=r)l=u(e,c,c+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==a){var d=1;for(l=u(e,c,e.length,t),c=0;c<a;c++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var l=1;l<r;l++){for(var c=u>>>26,d=67108863&u,f=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=f;h++){var p=l-h|0;c+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}n.words[l]=0|d,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);r=0!=(o=s>>>24-i&16777215)||a!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var f=c[e],h=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:l[f-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,l=new e(o),c=this.clone();if(u){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),l[s]=a;for(;s<o;s++)l[s]=0}else{for(s=0;s<o-i;s++)l[s]=0;for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),l[o-s-1]=a}return l},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a<r.length;a++)o=(t=(0|n.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<n.length;a++)o=(t=(0|n.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var h=function(e,t,n){var r,i,o,a=e.words,s=t.words,u=n.words,l=0,c=0|a[0],d=8191&c,f=c>>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,b=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,S=0|a[4],E=8191&S,k=S>>>13,M=0|a[5],C=8191&M,x=M>>>13,A=0|a[6],T=8191&A,R=A>>>13,P=0|a[7],L=8191&P,I=P>>>13,O=0|a[8],N=8191&O,D=O>>>13,B=0|a[9],j=8191&B,z=B>>>13,U=0|s[0],F=8191&U,K=U>>>13,q=0|s[1],H=8191&q,W=q>>>13,$=0|s[2],V=8191&$,Y=$>>>13,G=0|s[3],Z=8191&G,Q=G>>>13,X=0|s[4],J=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,le=se>>>13,ce=0|s[8],de=8191&ce,fe=ce>>>13,he=0|s[9],pe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(l+(r=Math.imul(d,F))|0)+((8191&(i=(i=Math.imul(d,K))+Math.imul(f,F)|0))<<13)|0;l=((o=Math.imul(f,K))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,K))+Math.imul(m,F)|0,o=Math.imul(m,K);var ve=(l+(r=r+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(f,H)|0))<<13)|0;l=((o=o+Math.imul(f,W)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,F),i=(i=Math.imul(v,K))+Math.imul(b,F)|0,o=Math.imul(b,K),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var be=(l+(r=r+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(f,V)|0))<<13)|0;l=((o=o+Math.imul(f,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,F),i=(i=Math.imul(w,K))+Math.imul(_,F)|0,o=Math.imul(_,K),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0,r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Y)|0;var ye=(l+(r=r+Math.imul(d,Z)|0)|0)+((8191&(i=(i=i+Math.imul(d,Q)|0)+Math.imul(f,Z)|0))<<13)|0;l=((o=o+Math.imul(f,Q)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,F),i=(i=Math.imul(E,K))+Math.imul(k,F)|0,o=Math.imul(k,K),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(v,V)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Y)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Q)|0;var we=(l+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,J)|0))<<13)|0;l=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(C,F),i=(i=Math.imul(C,K))+Math.imul(x,F)|0,o=Math.imul(x,K),r=r+Math.imul(E,H)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,W)|0,r=r+Math.imul(w,V)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,ee)|0;var _e=(l+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;l=((o=o+Math.imul(f,re)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,K))+Math.imul(R,F)|0,o=Math.imul(R,K),r=r+Math.imul(C,H)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,W)|0,r=r+Math.imul(E,V)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,Y)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Q)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var Se=(l+(r=r+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;l=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,F),i=(i=Math.imul(L,K))+Math.imul(I,F)|0,o=Math.imul(I,K),r=r+Math.imul(T,H)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,W)|0,r=r+Math.imul(C,V)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Q)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(b,ne)|0,o=o+Math.imul(b,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var Ee=(l+(r=r+Math.imul(d,ue)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(f,ue)|0))<<13)|0;l=((o=o+Math.imul(f,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(N,F),i=(i=Math.imul(N,K))+Math.imul(D,F)|0,o=Math.imul(D,K),r=r+Math.imul(L,H)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,r=r+Math.imul(T,V)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Y)|0,r=r+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(_,ne)|0,o=o+Math.imul(_,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,r=r+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0;var ke=(l+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;l=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,F),i=(i=Math.imul(j,K))+Math.imul(z,F)|0,o=Math.imul(z,K),r=r+Math.imul(N,H)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(D,H)|0,o=o+Math.imul(D,W)|0,r=r+Math.imul(L,V)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,Y)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(C,J)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(k,ne)|0,o=o+Math.imul(k,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,r=r+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,le)|0,r=r+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,fe)|0;var Me=(l+(r=r+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;l=((o=o+Math.imul(f,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,H),i=(i=Math.imul(j,W))+Math.imul(z,H)|0,o=Math.imul(z,W),r=r+Math.imul(N,V)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,Q)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,Q)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,ee)|0,r=r+Math.imul(C,ne)|0,i=(i=i+Math.imul(C,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,r=r+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,le)|0,r=r+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(b,de)|0,o=o+Math.imul(b,fe)|0;var Ce=(l+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;l=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,V),i=(i=Math.imul(j,Y))+Math.imul(z,V)|0,o=Math.imul(z,Y),r=r+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(L,J)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(R,ne)|0,o=o+Math.imul(R,re)|0,r=r+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,r=r+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,le)|0,r=r+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(_,de)|0,o=o+Math.imul(_,fe)|0;var xe=(l+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(b,pe)|0))<<13)|0;l=((o=o+Math.imul(b,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,Z),i=(i=Math.imul(j,Q))+Math.imul(z,Z)|0,o=Math.imul(z,Q),r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(D,J)|0,o=o+Math.imul(D,ee)|0,r=r+Math.imul(L,ne)|0,i=(i=i+Math.imul(L,re)|0)+Math.imul(I,ne)|0,o=o+Math.imul(I,re)|0,r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,r=r+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,le)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,le)|0,r=r+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(k,de)|0,o=o+Math.imul(k,fe)|0;var Ae=(l+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;l=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(j,J),i=(i=Math.imul(j,ee))+Math.imul(z,J)|0,o=Math.imul(z,ee),r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(D,ne)|0,o=o+Math.imul(D,re)|0,r=r+Math.imul(L,oe)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,r=r+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,le)|0,r=r+Math.imul(C,de)|0,i=(i=i+Math.imul(C,fe)|0)+Math.imul(x,de)|0,o=o+Math.imul(x,fe)|0;var Te=(l+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(k,pe)|0))<<13)|0;l=((o=o+Math.imul(k,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(z,ne)|0,o=Math.imul(z,re),r=r+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,ae)|0,r=r+Math.imul(L,ue)|0,i=(i=i+Math.imul(L,le)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,le)|0,r=r+Math.imul(T,de)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Re=(l+(r=r+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,me)|0)+Math.imul(x,pe)|0))<<13)|0;l=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(z,oe)|0,o=Math.imul(z,ae),r=r+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(D,ue)|0,o=o+Math.imul(D,le)|0,r=r+Math.imul(L,de)|0,i=(i=i+Math.imul(L,fe)|0)+Math.imul(I,de)|0,o=o+Math.imul(I,fe)|0;var Pe=(l+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(R,pe)|0))<<13)|0;l=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,ue),i=(i=Math.imul(j,le))+Math.imul(z,ue)|0,o=Math.imul(z,le),r=r+Math.imul(N,de)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul(D,de)|0,o=o+Math.imul(D,fe)|0;var Le=(l+(r=r+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,me)|0)+Math.imul(I,pe)|0))<<13)|0;l=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,r=Math.imul(j,de),i=(i=Math.imul(j,fe))+Math.imul(z,de)|0,o=Math.imul(z,fe);var Ie=(l+(r=r+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(D,pe)|0))<<13)|0;l=((o=o+Math.imul(D,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var Oe=(l+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(z,pe)|0))<<13)|0;return l=((o=Math.imul(z,me))+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,u[0]=ge,u[1]=ve,u[2]=be,u[3]=ye,u[4]=we,u[5]=_e,u[6]=Se,u[7]=Ee,u[8]=ke,u[9]=Me,u[10]=Ce,u[11]=xe,u[12]=Ae,u[13]=Te,u[14]=Re,u[15]=Pe,u[16]=Le,u[17]=Ie,u[18]=Oe,0!==l&&(u[19]=l,n.length++),n};function p(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(h=f),i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?h(this,e,t):r<63?f(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var a=i;i=0;for(var s=67108863&r,u=Math.min(o,t.length-1),l=Math.max(0,o-e.length+1);l<=u;l++){var c=o-l,d=(0|e.words[c])*(0|t.words[l]),f=67108863&d;s=67108863&(f=f+s|0),i+=(a=(a=a+(d/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):p(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},m.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},m.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a<o;a++)r[a]=t[e[a]],i[a]=n[e[a]]},m.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),l=Math.sin(2*Math.PI/s),c=0;c<i;c+=s)for(var d=u,f=l,h=0;h<a;h++){var p=n[c+h],m=r[c+h],g=n[c+h+a],v=r[c+h+a],b=d*g-f*v;v=d*v+f*g,g=b,n[c+h]=p+g,r[c+h]=m+v,n[c+h+a]=p-g,r[c+h+a]=m-v,h!==s&&(b=u*d-l*f,f=u*f+l*d,d=b)}},m.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},m.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},m.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),a=new Array(r),s=new Array(r),u=new Array(r),l=new Array(r),c=new Array(r),d=new Array(r),f=n.words;f.length=r,this.convert13b(e.words,e.length,a,r),this.convert13b(t.words,t.length,l,r),this.transform(a,o,s,u,r,i),this.transform(l,o,c,d,r,i);for(var h=0;h<r;h++){var p=s[h]*c[h]-u[h]*d[h];u[h]=s[h]*d[h]+u[h]*c[h],s[h]=p}return this.conjugate(s,u,r),this.transform(s,u,f,o,r,i),this.conjugate(f,o,r),this.normalize13b(f,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),p(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,u=(0|this.words[t])-s<<r;this.words[t]=u|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var l=0;l<a;l++)u.words[l]=this.words[l];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,l=0;l<this.length;l++)this.words[l]=this.words[l+a];else this.words[0]=0,this.length=1;var c=0;for(l=this.length-1;l>=0&&(0!==c||l>=i);l--){var d=0|this.words[l];this.words[l]=c<<26-o|d>>>o,c=d&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,o,a=e.length+r;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,a=0|o.words[o.length-1];0!=(n=26-this._countBits(a))&&(o=o.ushln(n),r.iushln(n),a=0|o.words[o.length-1]);var s,u=r.length-o.length;if("mod"!==t){(s=new i(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l<s.length;l++)s.words[l]=0}var c=r.clone()._ishlnsubmul(o,1,u);0===c.negative&&(r=c,s&&(s.words[u]=1));for(var d=u-1;d>=0;d--){var f=67108864*(0|r.words[o.length+d])+(0|r.words[o.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(o,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(o,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),u=new i(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0==(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(c),a.isub(d)),o.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(d)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s),a.isub(u)):(r.isub(t),s.isub(o),u.isub(a))}return{a:s,b:u,gcd:r.iushln(l)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var d=0,f=1;0==(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new S(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},r(b,v),b.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&n)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(y,v),r(w,v),r(_,v),_.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new y;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return g[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);n(!o.isZero());var s=new i(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var d=this.pow(c,o),f=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var v=this.pow(d,new i(1).iushln(p-g-1));f=f.redMul(v),d=v.redSqr(),h=h.redMul(d),p=g}return f},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var o=n[0],a=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),r=t.length-1;r>=0;r--){for(var l=t.words[r],c=u-1;c>=0;c--){var d=l>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==d||0!==a?(a<<=1,a|=d,(4==++s||0===r&&0===c)&&(o=this.mul(o,n[a]),s=0,a=0)):s=0}u=26}return o},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new E(e)},r(E,S),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,r)}(sl);var ul,ll,cl,dl,fl,hl=sl.exports,pl={exports:{}};function ml(){if(ul)return pl.exports;var e;function t(e){this.rand=e}if(ul=1,pl.exports=function(n){return e||(e=new t(null)),e.generate(n)},pl.exports.Rand=t,t.prototype.generate=function(e){return this._rand(e)},t.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(t.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var n=zm();if("function"!=typeof n.randomBytes)throw new Error("Not supported");t.prototype._rand=function(e){return n.randomBytes(e)}}catch(e){}return pl.exports}function gl(){if(cl)return ll;cl=1;var e=hl,t=ml();function n(e){this.rand=e||new t.Rand}return ll=n,n.create=function(e){return new n(e)},n.prototype._randbelow=function(t){var n=t.bitLength(),r=Math.ceil(n/8);do{var i=new e(this.rand.generate(r))}while(i.cmp(t)>=0);return i},n.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},n.prototype.test=function(t,n,r){var i=t.bitLength(),o=e.mont(t),a=new e(1).toRed(o);n||(n=Math.max(1,i/48|0));for(var s=t.subn(1),u=0;!s.testn(u);u++);for(var l=t.shrn(u),c=s.toRed(o);n>0;n--){var d=this._randrange(new e(2),s);r&&r(d);var f=d.toRed(o).redPow(l);if(0!==f.cmp(a)&&0!==f.cmp(c)){for(var h=1;h<u;h++){if(0===(f=f.redSqr()).cmp(a))return!1;if(0===f.cmp(c))break}if(h===u)return!1}}return!0},n.prototype.getDivisor=function(t,n){var r=t.bitLength(),i=e.mont(t),o=new e(1).toRed(i);n||(n=Math.max(1,r/48|0));for(var a=t.subn(1),s=0;!a.testn(s);s++);for(var u=t.shrn(s),l=a.toRed(i);n>0;n--){var c=this._randrange(new e(2),a),d=t.gcd(c);if(0!==d.cmpn(1))return d;var f=c.toRed(i).redPow(u);if(0!==f.cmp(o)&&0!==f.cmp(l)){for(var h=1;h<s;h++){if(0===(f=f.redSqr()).cmp(o))return f.fromRed().subn(1).gcd(t);if(0===f.cmp(l))break}if(h===s)return(f=f.redSqr()).fromRed().subn(1).gcd(t)}}return!1},ll}function vl(){if(fl)return dl;fl=1;var e=$e;dl=m,m.simpleSieve=h,m.fermatTest=p;var t=hl,n=new t(24),r=new(gl()),i=new t(1),o=new t(2),a=new t(5);new t(16),new t(8);var s=new t(10),u=new t(3);new t(7);var l=new t(11),c=new t(4);new t(12);var d=null;function f(){if(null!==d)return d;var e=[];e[0]=2;for(var t=1,n=3;n<1048576;n+=2){for(var r=Math.ceil(Math.sqrt(n)),i=0;i<t&&e[i]<=r&&n%e[i]!=0;i++);t!==i&&e[i]<=r||(e[t++]=n)}return d=e,e}function h(e){for(var t=f(),n=0;n<t.length;n++)if(0===e.modn(t[n]))return 0===e.cmpn(t[n]);return!0}function p(e){var n=t.mont(e);return 0===o.toRed(n).redPow(e.subn(1)).fromRed().cmpn(1)}function m(d,f){if(d<16)return new t(2===f||5===f?[140,123]:[140,39]);var m,g;for(f=new t(f);;){for(m=new t(e(Math.ceil(d/8)));m.bitLength()>d;)m.ishrn(1);if(m.isEven()&&m.iadd(i),m.testn(1)||m.iadd(o),f.cmp(o)){if(!f.cmp(a))for(;m.mod(s).cmp(u);)m.iadd(c)}else for(;m.mod(n).cmp(l);)m.iadd(c);if(h(g=m.shrn(1))&&h(m)&&p(g)&&p(m)&&r.test(g)&&r.test(m))return m}}return dl}var bl,yl,wl,_l={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}};function Sl(){if(yl)return bl;yl=1;var e=hl,t=new(gl()),n=new e(24),r=new e(11),i=new e(10),o=new e(3),a=new e(7),s=vl(),u=$e;function l(t,n){return n=n||"utf8",oe(t)||(t=new S(t,n)),this._pub=new e(t),this}function c(t,n){return n=n||"utf8",oe(t)||(t=new S(t,n)),this._priv=new e(t),this}bl=f;var d={};function f(t,n,r){this.setGenerator(n),this.__prime=new e(t),this._prime=e.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=l,this.setPrivateKey=c):this._primeCode=8}function h(e,t){var n=new S(e.toArray());return t?n.toString(t):n}return Object.defineProperty(f.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,u){var l=u.toString("hex"),c=[l,e.toString(16)].join("_");if(c in d)return d[c];var f,h=0;if(e.isEven()||!s.simpleSieve||!s.fermatTest(e)||!t.test(e))return h+=1,h+="02"===l||"05"===l?8:4,d[c]=h,h;switch(t.test(e.shrn(1))||(h+=2),l){case"02":e.mod(n).cmp(r)&&(h+=8);break;case"05":(f=e.mod(i)).cmp(o)&&f.cmp(a)&&(h+=8);break;default:h+=4}return d[c]=h,h}(this.__prime,this.__gen)),this._primeCode}}),f.prototype.generateKeys=function(){return this._priv||(this._priv=new e(u(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},f.prototype.computeSecret=function(t){var n=new S((t=(t=new e(t)).toRed(this._prime)).redPow(this._priv).fromRed().toArray()),r=this.getPrime();if(n.length<r.length){var i=new S(r.length-n.length);i.fill(0),n=S.concat([i,n])}return n},f.prototype.getPublicKey=function(e){return h(this._pub,e)},f.prototype.getPrivateKey=function(e){return h(this._priv,e)},f.prototype.getPrime=function(e){return h(this.__prime,e)},f.prototype.getGenerator=function(e){return h(this._gen,e)},f.prototype.setGenerator=function(t,n){return n=n||"utf8",oe(t)||(t=new S(t,n)),this.__gen=t,this._gen=new e(t),this},bl}var El={exports:{}},kl={exports:{}};!function(e){!function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:de.Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function s(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function u(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),u=t;u<s;u++){var l=e.charCodeAt(u)-48;o*=i,a=l>=49?l-49+10:l>=17?l-17+10:l,n(l>=0&&a<i,"Invalid character"),o+=a}return o}function l(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=s(e,t,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=s(e,t,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,l=0,c=n;c<s;c+=r)l=u(e,c,c+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==a){var d=1;for(l=u(e,c,e.length,t),c=0;c<a;c++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype._move=function(e){l(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch(e){i.prototype.inspect=c}else i.prototype.inspect=c;function c(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var l=1;l<r;l++){for(var c=u>>>26,d=67108863&u,f=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=f;h++){var p=l-h|0;c+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}n.words[l]=0|d,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n._strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);o=s>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?d[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],c=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(c).toString(e);r=(p=p.idivn(c)).isZero()?m+r:d[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},i.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|r;e[n++]=255&a,n<e.length&&(e[n++]=a>>8&255),n<e.length&&(e[n++]=a>>16&255),6===o?(n<e.length&&(e[n++]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},i.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|r;e[n--]=255&a,n>=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===o?(n>=0&&(e[n--]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},i.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},i.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},i.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a<r.length;a++)o=(t=(0|n.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<n.length;a++)o=(t=(0|n.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,n){var r,i,o,a=e.words,s=t.words,u=n.words,l=0,c=0|a[0],d=8191&c,f=c>>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,b=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,S=0|a[4],E=8191&S,k=S>>>13,M=0|a[5],C=8191&M,x=M>>>13,A=0|a[6],T=8191&A,R=A>>>13,P=0|a[7],L=8191&P,I=P>>>13,O=0|a[8],N=8191&O,D=O>>>13,B=0|a[9],j=8191&B,z=B>>>13,U=0|s[0],F=8191&U,K=U>>>13,q=0|s[1],H=8191&q,W=q>>>13,$=0|s[2],V=8191&$,Y=$>>>13,G=0|s[3],Z=8191&G,Q=G>>>13,X=0|s[4],J=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,le=se>>>13,ce=0|s[8],de=8191&ce,fe=ce>>>13,he=0|s[9],pe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(l+(r=Math.imul(d,F))|0)+((8191&(i=(i=Math.imul(d,K))+Math.imul(f,F)|0))<<13)|0;l=((o=Math.imul(f,K))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,K))+Math.imul(m,F)|0,o=Math.imul(m,K);var ve=(l+(r=r+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(f,H)|0))<<13)|0;l=((o=o+Math.imul(f,W)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,F),i=(i=Math.imul(v,K))+Math.imul(b,F)|0,o=Math.imul(b,K),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var be=(l+(r=r+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(f,V)|0))<<13)|0;l=((o=o+Math.imul(f,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,F),i=(i=Math.imul(w,K))+Math.imul(_,F)|0,o=Math.imul(_,K),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0,r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Y)|0;var ye=(l+(r=r+Math.imul(d,Z)|0)|0)+((8191&(i=(i=i+Math.imul(d,Q)|0)+Math.imul(f,Z)|0))<<13)|0;l=((o=o+Math.imul(f,Q)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,F),i=(i=Math.imul(E,K))+Math.imul(k,F)|0,o=Math.imul(k,K),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(v,V)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Y)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Q)|0;var we=(l+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,J)|0))<<13)|0;l=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(C,F),i=(i=Math.imul(C,K))+Math.imul(x,F)|0,o=Math.imul(x,K),r=r+Math.imul(E,H)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,W)|0,r=r+Math.imul(w,V)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,ee)|0;var _e=(l+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;l=((o=o+Math.imul(f,re)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,K))+Math.imul(R,F)|0,o=Math.imul(R,K),r=r+Math.imul(C,H)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,W)|0,r=r+Math.imul(E,V)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,Y)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Q)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var Se=(l+(r=r+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;l=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,F),i=(i=Math.imul(L,K))+Math.imul(I,F)|0,o=Math.imul(I,K),r=r+Math.imul(T,H)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,W)|0,r=r+Math.imul(C,V)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Q)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(b,ne)|0,o=o+Math.imul(b,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var Ee=(l+(r=r+Math.imul(d,ue)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(f,ue)|0))<<13)|0;l=((o=o+Math.imul(f,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(N,F),i=(i=Math.imul(N,K))+Math.imul(D,F)|0,o=Math.imul(D,K),r=r+Math.imul(L,H)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,r=r+Math.imul(T,V)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Y)|0,r=r+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(_,ne)|0,o=o+Math.imul(_,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,r=r+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0;var ke=(l+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;l=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,F),i=(i=Math.imul(j,K))+Math.imul(z,F)|0,o=Math.imul(z,K),r=r+Math.imul(N,H)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(D,H)|0,o=o+Math.imul(D,W)|0,r=r+Math.imul(L,V)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,Y)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(C,J)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(k,ne)|0,o=o+Math.imul(k,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,r=r+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,le)|0,r=r+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,fe)|0;var Me=(l+(r=r+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;l=((o=o+Math.imul(f,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,H),i=(i=Math.imul(j,W))+Math.imul(z,H)|0,o=Math.imul(z,W),r=r+Math.imul(N,V)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,Q)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,Q)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,ee)|0,r=r+Math.imul(C,ne)|0,i=(i=i+Math.imul(C,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,r=r+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,le)|0,r=r+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(b,de)|0,o=o+Math.imul(b,fe)|0;var Ce=(l+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;l=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,V),i=(i=Math.imul(j,Y))+Math.imul(z,V)|0,o=Math.imul(z,Y),r=r+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(L,J)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(R,ne)|0,o=o+Math.imul(R,re)|0,r=r+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,r=r+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,le)|0,r=r+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(_,de)|0,o=o+Math.imul(_,fe)|0;var xe=(l+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(b,pe)|0))<<13)|0;l=((o=o+Math.imul(b,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,Z),i=(i=Math.imul(j,Q))+Math.imul(z,Z)|0,o=Math.imul(z,Q),r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(D,J)|0,o=o+Math.imul(D,ee)|0,r=r+Math.imul(L,ne)|0,i=(i=i+Math.imul(L,re)|0)+Math.imul(I,ne)|0,o=o+Math.imul(I,re)|0,r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,r=r+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,le)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,le)|0,r=r+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(k,de)|0,o=o+Math.imul(k,fe)|0;var Ae=(l+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;l=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(j,J),i=(i=Math.imul(j,ee))+Math.imul(z,J)|0,o=Math.imul(z,ee),r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(D,ne)|0,o=o+Math.imul(D,re)|0,r=r+Math.imul(L,oe)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,r=r+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,le)|0,r=r+Math.imul(C,de)|0,i=(i=i+Math.imul(C,fe)|0)+Math.imul(x,de)|0,o=o+Math.imul(x,fe)|0;var Te=(l+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(k,pe)|0))<<13)|0;l=((o=o+Math.imul(k,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(z,ne)|0,o=Math.imul(z,re),r=r+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,ae)|0,r=r+Math.imul(L,ue)|0,i=(i=i+Math.imul(L,le)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,le)|0,r=r+Math.imul(T,de)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Re=(l+(r=r+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,me)|0)+Math.imul(x,pe)|0))<<13)|0;l=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(z,oe)|0,o=Math.imul(z,ae),r=r+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(D,ue)|0,o=o+Math.imul(D,le)|0,r=r+Math.imul(L,de)|0,i=(i=i+Math.imul(L,fe)|0)+Math.imul(I,de)|0,o=o+Math.imul(I,fe)|0;var Pe=(l+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(R,pe)|0))<<13)|0;l=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,ue),i=(i=Math.imul(j,le))+Math.imul(z,ue)|0,o=Math.imul(z,le),r=r+Math.imul(N,de)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul(D,de)|0,o=o+Math.imul(D,fe)|0;var Le=(l+(r=r+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,me)|0)+Math.imul(I,pe)|0))<<13)|0;l=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,r=Math.imul(j,de),i=(i=Math.imul(j,fe))+Math.imul(z,de)|0,o=Math.imul(z,fe);var Ie=(l+(r=r+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(D,pe)|0))<<13)|0;l=((o=o+Math.imul(D,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var Oe=(l+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(z,pe)|0))<<13)|0;return l=((o=Math.imul(z,me))+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,u[0]=ge,u[1]=ve,u[2]=be,u[3]=ye,u[4]=we,u[5]=_e,u[6]=Se,u[7]=Ee,u[8]=ke,u[9]=Me,u[10]=Ce,u[11]=xe,u[12]=Ae,u[13]=Te,u[14]=Re,u[15]=Pe,u[16]=Le,u[17]=Ie,u[18]=Oe,0!==l&&(u[19]=l,n.length++),n};function g(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var a=i;i=0;for(var s=67108863&r,u=Math.min(o,t.length-1),l=Math.max(0,o-e.length+1);l<=u;l++){var c=o-l,d=(0|e.words[c])*(0|t.words[l]),f=67108863&d;s=67108863&(f=f+s|0),i+=(a=(a=a+(d/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function v(e,t,n){return g(e,t,n)}Math.imul||(m=p),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?p(this,e,t):n<1024?g(this,e,t):v(this,e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),v(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,a=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,u=(0|this.words[t])-s<<r;this.words[t]=u|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var l=0;l<a;l++)u.words[l]=this.words[l];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,l=0;l<this.length;l++)this.words[l]=this.words[l+a];else this.words[0]=0,this.length=1;var c=0;for(l=this.length-1;l>=0&&(0!==c||l>=i);l--){var d=0|this.words[l];this.words[l]=c<<26-o|d>>>o,c=d&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,o,a=e.length+r;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,a=0|o.words[o.length-1];0!=(n=26-this._countBits(a))&&(o=o.ushln(n),r.iushln(n),a=0|o.words[o.length-1]);var s,u=r.length-o.length;if("mod"!==t){(s=new i(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l<s.length;l++)s.words[l]=0}var c=r.clone()._ishlnsubmul(o,1,u);0===c.negative&&(r=c,s&&(s.words[u]=1));for(var d=u-1;d>=0;d--){var f=67108864*(0|r.words[o.length+d])+(0|r.words[o.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(o,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(o,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),u=new i(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0==(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(c),a.isub(d)),o.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(d)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s),a.isub(u)):(r.isub(t),s.isub(o),u.isub(a))}return{a:s,b:u,gcd:r.iushln(l)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var d=0,f=1;0==(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new k(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},r(w,y),w.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&n)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(_,y),r(S,y),r(E,y),E.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new _;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return b[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},k.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);n(!o.isZero());var s=new i(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var d=this.pow(c,o),f=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var v=this.pow(d,new i(1).iushln(p-g-1));f=f.redMul(v),d=v.redSqr(),h=h.redMul(d),p=g}return f},k.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},k.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var o=n[0],a=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),r=t.length-1;r>=0;r--){for(var l=t.words[r],c=u-1;c>=0;c--){var d=l>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==d||0!==a?(a<<=1,a|=d,(4==++s||0===r&&0===c)&&(o=this.mul(o,n[a]),s=0,a=0)):s=0}u=26}return o},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new M(e)},r(M,k),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,r)}(kl);var Ml=kl.exports,Cl=$e;function xl(e){var t,n=e.modulus.byteLength();do{t=new Ml(Cl(n))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function Al(e,t){var n=function(e){var t=xl(e);return{blinder:t.toRed(Ml.mont(e.modulus)).redPow(new Ml(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),r=t.modulus.byteLength(),i=new Ml(e).mul(n.blinder).umod(t.modulus),o=i.toRed(Ml.mont(t.prime1)),a=i.toRed(Ml.mont(t.prime2)),s=t.coefficient,u=t.prime1,l=t.prime2,c=o.redPow(t.exponent1).fromRed(),d=a.redPow(t.exponent2).fromRed(),f=c.isub(d).imul(s).umod(u).imul(l);return d.iadd(f).imul(n.unblinder).umod(t.modulus).toArrayLike(S,"be",r)}Al.getr=xl;var Tl=Al,Rl={},Pl={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}},Ll={},Il={};!function(e){var t=e;function n(e){return 1===e.length?"0"+e:e}function r(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16));else for(r=0;r<e.length;r++){var i=e.charCodeAt(r),o=i>>8,a=255&i;o?n.push(o,a):n.push(a)}return n},t.zero2=n,t.toHex=r,t.encode=function(e,t){return"hex"===t?r(e):e}}(Il),function(e){var t=e,n=hl,r=Wa,i=Il;t.assert=r,t.toArray=i.toArray,t.zero2=i.zero2,t.toHex=i.toHex,t.encode=i.encode,t.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var i=1<<t+1,o=e.clone(),a=0;a<r.length;a++){var s,u=o.andln(i-1);o.isOdd()?(s=u>(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,r[a]=s,o.iushrn(1)}return r},t.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,l=t.andln(3)+o&3;3===u&&(u=-1),3===l&&(l=-1),a=0==(1&u)?0:3!=(r=e.andln(7)+i&7)&&5!==r||2!==l?u:-u,n[0].push(a),s=0==(1&l)?0:3!=(r=t.andln(7)+o&7)&&5!==r||2!==u?l:-l,n[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return n},t.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},t.parseBytes=function(e){return"string"==typeof e?t.toArray(e,"hex"):e},t.intFromLE=function(e){return new n(e,"hex","le")}}(Ll);var Ol={},Nl=hl,Dl=Ll,Bl=Dl.getNAF,jl=Dl.getJSF,zl=Dl.assert;function Ul(e,t){this.type=e,this.p=new Nl(t.p,16),this.red=t.prime?Nl.red(t.prime):Nl.mont(this.p),this.zero=new Nl(0).toRed(this.red),this.one=new Nl(1).toRed(this.red),this.two=new Nl(2).toRed(this.red),this.n=t.n&&new Nl(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Fl=Ul;function Kl(e,t){this.curve=e,this.type=t,this.precomputed=null}Ul.prototype.point=function(){throw new Error("Not implemented")},Ul.prototype.validate=function(){throw new Error("Not implemented")},Ul.prototype._fixedNafMul=function(e,t){zl(e.precomputed);var n=e._getDoubles(),r=Bl(t,1,this._bitLength),i=(1<<n.step+1)-(n.step%2==0?2:1);i/=3;var o,a,s=[];for(o=0;o<r.length;o+=n.step){a=0;for(var u=o+n.step-1;u>=o;u--)a=(a<<1)+r[u];s.push(a)}for(var l=this.jpoint(null,null,null),c=this.jpoint(null,null,null),d=i;d>0;d--){for(o=0;o<s.length;o++)(a=s[o])===d?c=c.mixedAdd(n.points[o]):a===-d&&(c=c.mixedAdd(n.points[o].neg()));l=l.add(c)}return l.toP()},Ul.prototype._wnafMul=function(e,t){var n=4,r=e._getNAFPoints(n);n=r.wnd;for(var i=r.points,o=Bl(t,n,this._bitLength),a=this.jpoint(null,null,null),s=o.length-1;s>=0;s--){for(var u=0;s>=0&&0===o[s];s--)u++;if(s>=0&&u++,a=a.dblp(u),s<0)break;var l=o[s];zl(0!==l),a="affine"===e.type?l>0?a.mixedAdd(i[l-1>>1]):a.mixedAdd(i[-l-1>>1].neg()):l>0?a.add(i[l-1>>1]):a.add(i[-l-1>>1].neg())}return"affine"===e.type?a.toP():a},Ul.prototype._wnafMulAdd=function(e,t,n,r,i){var o,a,s,u=this._wnafT1,l=this._wnafT2,c=this._wnafT3,d=0;for(o=0;o<r;o++){var f=(s=t[o])._getNAFPoints(e);u[o]=f.wnd,l[o]=f.points}for(o=r-1;o>=1;o-=2){var h=o-1,p=o;if(1===u[h]&&1===u[p]){var m=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(m[1]=t[h].add(t[p]),m[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(m[1]=t[h].toJ().mixedAdd(t[p]),m[2]=t[h].add(t[p].neg())):(m[1]=t[h].toJ().mixedAdd(t[p]),m[2]=t[h].toJ().mixedAdd(t[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=jl(n[h],n[p]);for(d=Math.max(v[0].length,d),c[h]=new Array(d),c[p]=new Array(d),a=0;a<d;a++){var b=0|v[0][a],y=0|v[1][a];c[h][a]=g[3*(b+1)+(y+1)],c[p][a]=0,l[h]=m}}else c[h]=Bl(n[h],u[h],this._bitLength),c[p]=Bl(n[p],u[p],this._bitLength),d=Math.max(c[h].length,d),d=Math.max(c[p].length,d)}var w=this.jpoint(null,null,null),_=this._wnafT4;for(o=d;o>=0;o--){for(var S=0;o>=0;){var E=!0;for(a=0;a<r;a++)_[a]=0|c[a][o],0!==_[a]&&(E=!1);if(!E)break;S++,o--}if(o>=0&&S++,w=w.dblp(S),o<0)break;for(a=0;a<r;a++){var k=_[a];0!==k&&(k>0?s=l[a][k-1>>1]:k<0&&(s=l[a][-k-1>>1].neg()),w="affine"===s.type?w.mixedAdd(s):w.add(s))}}for(o=0;o<r;o++)l[o]=null;return i?w:w.toP()},Ul.BasePoint=Kl,Kl.prototype.eq=function(){throw new Error("Not implemented")},Kl.prototype.validate=function(){return this.curve.validate(this)},Ul.prototype.decodePoint=function(e,t){e=Dl.toArray(e,t);var n=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*n)return 6===e[0]?zl(e[e.length-1]%2==0):7===e[0]&&zl(e[e.length-1]%2==1),this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));if((2===e[0]||3===e[0])&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),3===e[0]);throw new Error("Unknown point format")},Kl.prototype.encodeCompressed=function(e){return this.encode(e,!0)},Kl.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},Kl.prototype.encode=function(e,t){return Dl.encode(this._encode(t),e)},Kl.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},Kl.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},Kl.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)r=r.dbl();n.push(r)}return{step:e,points:n}},Kl.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},Kl.prototype._getBeta=function(){return null},Kl.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t};var ql=hl,Hl=Ye,Wl=Fl,$l=Ll.assert;function Vl(e){Wl.call(this,"short",e),this.a=new ql(e.a,16).toRed(this.red),this.b=new ql(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Hl(Vl,Wl);var Yl=Vl;function Gl(e,t,n,r){Wl.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new ql(t,16),this.y=new ql(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function Zl(e,t,n,r){Wl.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new ql(0)):(this.x=new ql(t,16),this.y=new ql(n,16),this.z=new ql(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Vl.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new ql(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)n=new ql(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?n=i[0]:(n=i[1],$l(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:n,basis:e.basis?e.basis.map((function(e){return{a:new ql(e.a,16),b:new ql(e.b,16)}})):this._getEndoBasis(n)}}},Vl.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:ql.mont(e),n=new ql(2).toRed(t).redInvm(),r=n.redNeg(),i=new ql(3).toRed(t).redNeg().redSqrt().redMul(n);return[r.redAdd(i).fromRed(),r.redSub(i).fromRed()]},Vl.prototype._getEndoBasis=function(e){for(var t,n,r,i,o,a,s,u,l,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,f=this.n.clone(),h=new ql(1),p=new ql(0),m=new ql(0),g=new ql(1),v=0;0!==d.cmpn(0);){var b=f.div(d);u=f.sub(b.mul(d)),l=m.sub(b.mul(h));var y=g.sub(b.mul(p));if(!r&&u.cmp(c)<0)t=s.neg(),n=h,r=u.neg(),i=l;else if(r&&2==++v)break;s=u,f=d,d=u,m=h,h=l,g=p,p=y}o=u.neg(),a=l;var w=r.sqr().add(i.sqr());return o.sqr().add(a.sqr()).cmp(w)>=0&&(o=t,a=n),r.negative&&(r=r.neg(),i=i.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:r,b:i},{a:o,b:a}]},Vl.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=i.mul(n.a),s=o.mul(r.a),u=i.mul(n.b),l=o.mul(r.b);return{k1:e.sub(a).sub(s),k2:u.add(l).neg()}},Vl.prototype.pointFromX=function(e,t){(e=new ql(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var i=r.fromRed().isOdd();return(t&&!i||!t&&i)&&(r=r.redNeg()),this.point(e,r)},Vl.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},Vl.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),s=e[o],u=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),r[2*o]=s,r[2*o+1]=u,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var l=this._wnafMulAdd(1,r,i,2*o,n),c=0;c<2*o;c++)r[c]=null,i[c]=null;return l},Hl(Gl,Wl.BasePoint),Vl.prototype.point=function(e,t,n){return new Gl(this,e,t,n)},Vl.prototype.pointFromJSON=function(e,t){return Gl.fromJSON(this,e,t)},Gl.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},Gl.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Gl.fromJSON=function(e,t,n){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function i(t){return e.point(t[0],t[1],n)}var o=t[2];return r.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[r].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[r].concat(o.naf.points.map(i))}},r},Gl.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Gl.prototype.isInfinity=function(){return this.inf},Gl.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},Gl.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},Gl.prototype.getX=function(){return this.x.fromRed()},Gl.prototype.getY=function(){return this.y.fromRed()},Gl.prototype.mul=function(e){return e=new ql(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},Gl.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},Gl.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},Gl.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},Gl.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},Gl.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},Hl(Zl,Wl.BasePoint),Vl.prototype.jpoint=function(e,t,n){return new Zl(this,e,t,n)},Zl.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},Zl.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Zl.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),s=r.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),c=l.redMul(s),d=r.redMul(l),f=u.redSqr().redIAdd(c).redISub(d).redISub(d),h=u.redMul(d.redISub(f)).redISub(o.redMul(c)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,h,p)},Zl.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=n.redSub(r),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),l=u.redMul(a),c=n.redMul(u),d=s.redSqr().redIAdd(l).redISub(c).redISub(c),f=s.redMul(c.redISub(d)).redISub(i.redMul(l)),h=this.z.redMul(a);return this.curve.jpoint(d,f,h)},Zl.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t<e;t++)n=n.dbl();return n}var r=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,u=s.redSqr().redSqr(),l=a.redAdd(a);for(t=0;t<e;t++){var c=o.redSqr(),d=l.redSqr(),f=d.redSqr(),h=c.redAdd(c).redIAdd(c).redIAdd(r.redMul(u)),p=o.redMul(d),m=h.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),v=h.redMul(g);v=v.redIAdd(v).redISub(f);var b=l.redMul(s);t+1<e&&(u=u.redMul(f)),o=m,s=b,l=v}return this.curve.jpoint(o,l.redMul(i),s)},Zl.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},Zl.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(r).redISub(o);a=a.redIAdd(a);var s=r.redAdd(r).redIAdd(r),u=s.redSqr().redISub(a).redISub(a),l=o.redIAdd(o);l=(l=l.redIAdd(l)).redIAdd(l),e=u,t=s.redMul(a.redISub(u)).redISub(l),n=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),d=this.y.redSqr(),f=d.redSqr(),h=this.x.redAdd(d).redSqr().redISub(c).redISub(f);h=h.redIAdd(h);var p=c.redAdd(c).redIAdd(c),m=p.redSqr(),g=f.redIAdd(f);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(g),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,t,n)},Zl.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(r).redISub(o);a=a.redIAdd(a);var s=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),u=s.redSqr().redISub(a).redISub(a);e=u;var l=o.redIAdd(o);l=(l=l.redIAdd(l)).redIAdd(l),t=s.redMul(a.redISub(u)).redISub(l),n=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),d=this.y.redSqr(),f=this.x.redMul(d),h=this.x.redSub(c).redMul(this.x.redAdd(c));h=h.redAdd(h).redIAdd(h);var p=f.redIAdd(f),m=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(d).redISub(c);var g=d.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=h.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,n)},Zl.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),o=t.redSqr(),a=n.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),u=t.redAdd(t),l=(u=u.redIAdd(u)).redMul(a),c=s.redSqr().redISub(l.redAdd(l)),d=l.redISub(c),f=a.redSqr();f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var h=s.redMul(d).redISub(f),p=n.redAdd(n).redMul(r);return this.curve.jpoint(c,h,p)},Zl.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(r),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),u=r.redIAdd(r);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var l=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(u),c=t.redMul(l);c=(c=c.redIAdd(c)).redIAdd(c);var d=this.x.redMul(s).redISub(c);d=(d=d.redIAdd(d)).redIAdd(d);var f=this.y.redMul(l.redMul(u.redISub(l)).redISub(a.redMul(s)));f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var h=this.z.redAdd(a).redSqr().redISub(n).redISub(s);return this.curve.jpoint(d,f,h)},Zl.prototype.mul=function(e,t){return e=new ql(e,t),this.curve._wnafMul(this,e)},Zl.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(0!==this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),i=n.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)},Zl.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},Zl.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},Zl.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Ql=hl,Xl=Ye,Jl=Fl,ec=Ll;function tc(e){Jl.call(this,"mont",e),this.a=new Ql(e.a,16).toRed(this.red),this.b=new Ql(e.b,16).toRed(this.red),this.i4=new Ql(4).toRed(this.red).redInvm(),this.two=new Ql(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Xl(tc,Jl);var nc=tc;function rc(e,t,n){Jl.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Ql(t,16),this.z=new Ql(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}tc.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},Xl(rc,Jl.BasePoint),tc.prototype.decodePoint=function(e,t){return this.point(ec.toArray(e,t),1)},tc.prototype.point=function(e,t){return new rc(this,e,t)},tc.prototype.pointFromJSON=function(e){return rc.fromJSON(this,e)},rc.prototype.precompute=function(){},rc.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},rc.fromJSON=function(e,t){return new rc(e,t[0],t[1]||e.one)},rc.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},rc.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},rc.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),r=e.redMul(t),i=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},rc.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},rc.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(n),a=i.redMul(r),s=t.z.redMul(o.redAdd(a).redSqr()),u=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},rc.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},rc.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},rc.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},rc.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},rc.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},rc.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var ic=hl,oc=Ye,ac=Fl,sc=Ll.assert;function uc(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,ac.call(this,"edwards",e),this.a=new ic(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new ic(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new ic(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),sc(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}oc(uc,ac);var lc=uc;function cc(e,t,n,r,i){ac.BasePoint.call(this,e,"projective"),null===t&&null===n&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new ic(t,16),this.y=new ic(n,16),this.z=r?new ic(r,16):this.curve.one,this.t=i&&new ic(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}uc.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},uc.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},uc.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},uc.prototype.pointFromX=function(e,t){(e=new ic(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=this.c2.redSub(this.a.redMul(n)),i=this.one.redSub(this.c2.redMul(this.d).redMul(n)),o=r.redMul(i.redInvm()),a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var s=a.fromRed().isOdd();return(t&&!s||!t&&s)&&(a=a.redNeg()),this.point(e,a)},uc.prototype.pointFromY=function(e,t){(e=new ic(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=n.redSub(this.c2),i=n.redMul(this.d).redMul(this.c2).redSub(this.a),o=r.redMul(i.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},uc.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===r.cmp(i)},oc(cc,ac.BasePoint),uc.prototype.pointFromJSON=function(e){return cc.fromJSON(this,e)},uc.prototype.point=function(e,t,n,r){return new cc(this,e,t,n,r)},cc.fromJSON=function(e,t){return new cc(e,t[0],t[1],t[2])},cc.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},cc.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},cc.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=r.redAdd(t),a=o.redSub(n),s=r.redSub(t),u=i.redMul(a),l=o.redMul(s),c=i.redMul(s),d=a.redMul(o);return this.curve.point(u,l,d,c)},cc.prototype._projDbl=function(){var e,t,n,r,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var l=(r=this.curve._mulA(s)).redAdd(u);this.zOne?(e=a.redSub(s).redSub(u).redMul(l.redSub(this.curve.two)),t=l.redMul(r.redSub(u)),n=l.redSqr().redSub(l).redSub(l)):(i=this.z.redSqr(),o=l.redSub(i).redISub(i),e=a.redSub(s).redISub(u).redMul(o),t=l.redMul(r.redSub(u)),n=l.redMul(o))}else r=s.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=r.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(r)).redMul(o),t=this.curve._mulC(r).redMul(s.redISub(u)),n=r.redMul(o);return this.curve.point(e,t,n)},cc.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},cc.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=n.redSub(t),a=i.redSub(r),s=i.redAdd(r),u=n.redAdd(t),l=o.redMul(a),c=s.redMul(u),d=o.redMul(u),f=a.redMul(s);return this.curve.point(l,c,f,d)},cc.prototype._projAdd=function(e){var t,n,r=this.z.redMul(e.z),i=r.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),l=i.redAdd(s),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=r.redMul(u).redMul(c);return this.curve.twisted?(t=r.redMul(l).redMul(a.redSub(this.curve._mulA(o))),n=u.redMul(l)):(t=r.redMul(l).redMul(a.redSub(o)),n=this.curve._mulC(u).redMul(l)),this.curve.point(d,t,n)},cc.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},cc.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},cc.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},cc.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},cc.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},cc.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},cc.prototype.getX=function(){return this.normalize(),this.x.fromRed()},cc.prototype.getY=function(){return this.normalize(),this.y.fromRed()},cc.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},cc.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},cc.prototype.toP=cc.prototype.normalize,cc.prototype.mixedAdd=cc.prototype.add,function(e){var t=e;t.base=Fl,t.short=Yl,t.mont=nc,t.edwards=lc}(Ol);var dc={},fc={},hc={},pc=Wa,mc=Ye;function gc(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function vc(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function bc(e){return 1===e.length?"0"+e:e}function yc(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}hc.inherits=mc,hc.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var r=0,i=0;i<e.length;i++){var o=e.charCodeAt(i);o<128?n[r++]=o:o<2048?(n[r++]=o>>6|192,n[r++]=63&o|128):gc(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),n[r++]=o>>18|240,n[r++]=o>>12&63|128,n[r++]=o>>6&63|128,n[r++]=63&o|128):(n[r++]=o>>12|224,n[r++]=o>>6&63|128,n[r++]=63&o|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},hc.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=bc(e[n].toString(16));return t},hc.htonl=vc,hc.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=vc(i)),n+=yc(i.toString(16))}return n},hc.zero2=bc,hc.zero8=yc,hc.join32=function(e,t,n,r){var i=n-t;pc(i%4==0);for(var o=new Array(i/4),a=0,s=t;a<o.length;a++,s+=4){var u;u="big"===r?e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s],o[a]=u>>>0}return o},hc.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var o=e[r];"big"===t?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},hc.rotr32=function(e,t){return e>>>t|e<<32-t},hc.rotl32=function(e,t){return e<<t|e>>>32-t},hc.sum32=function(e,t){return e+t>>>0},hc.sum32_3=function(e,t,n){return e+t+n>>>0},hc.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},hc.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},hc.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0,a=(o<r?1:0)+n+i;e[t]=a>>>0,e[t+1]=o},hc.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},hc.sum64_lo=function(e,t,n,r){return t+r>>>0},hc.sum64_4_hi=function(e,t,n,r,i,o,a,s){var u=0,l=t;return u+=(l=l+r>>>0)<t?1:0,u+=(l=l+o>>>0)<o?1:0,e+n+i+a+(u+=(l=l+s>>>0)<s?1:0)>>>0},hc.sum64_4_lo=function(e,t,n,r,i,o,a,s){return t+r+o+s>>>0},hc.sum64_5_hi=function(e,t,n,r,i,o,a,s,u,l){var c=0,d=t;return c+=(d=d+r>>>0)<t?1:0,c+=(d=d+o>>>0)<o?1:0,c+=(d=d+s>>>0)<s?1:0,e+n+i+a+u+(c+=(d=d+l>>>0)<l?1:0)>>>0},hc.sum64_5_lo=function(e,t,n,r,i,o,a,s,u,l){return t+r+o+s+l>>>0},hc.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},hc.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},hc.shr64_hi=function(e,t,n){return e>>>n},hc.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0};var wc={},_c=hc,Sc=Wa;function Ec(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}wc.BlockHash=Ec,Ec.prototype.update=function(e,t){if(e=_c.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=_c.join32(e,0,e.length-n,this.endian);for(var r=0;r<e.length;r+=this._delta32)this._update(e,r,r+this._delta32)}return this},Ec.prototype.digest=function(e){return this.update(this._pad()),Sc(null===this.pending),this._digest(e)},Ec.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r};var kc={},Mc={},Cc=hc.rotr32;function xc(e,t,n){return e&t^~e&n}function Ac(e,t,n){return e&t^e&n^t&n}function Tc(e,t,n){return e^t^n}Mc.ft_1=function(e,t,n,r){return 0===e?xc(t,n,r):1===e||3===e?Tc(t,n,r):2===e?Ac(t,n,r):void 0},Mc.ch32=xc,Mc.maj32=Ac,Mc.p32=Tc,Mc.s0_256=function(e){return Cc(e,2)^Cc(e,13)^Cc(e,22)},Mc.s1_256=function(e){return Cc(e,6)^Cc(e,11)^Cc(e,25)},Mc.g0_256=function(e){return Cc(e,7)^Cc(e,18)^e>>>3},Mc.g1_256=function(e){return Cc(e,17)^Cc(e,19)^e>>>10};var Rc=hc,Pc=wc,Lc=Mc,Ic=Rc.rotl32,Oc=Rc.sum32,Nc=Rc.sum32_5,Dc=Lc.ft_1,Bc=Pc.BlockHash,jc=[1518500249,1859775393,2400959708,3395469782];function zc(){if(!(this instanceof zc))return new zc;Bc.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Rc.inherits(zc,Bc);var Uc=zc;zc.blockSize=512,zc.outSize=160,zc.hmacStrength=80,zc.padLength=64,zc.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=Ic(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4];for(r=0;r<n.length;r++){var l=~~(r/20),c=Nc(Ic(i,5),Dc(l,o,a,s),u,n[r],jc[l]);u=s,s=a,a=Ic(o,30),o=i,i=c}this.h[0]=Oc(this.h[0],i),this.h[1]=Oc(this.h[1],o),this.h[2]=Oc(this.h[2],a),this.h[3]=Oc(this.h[3],s),this.h[4]=Oc(this.h[4],u)},zc.prototype._digest=function(e){return"hex"===e?Rc.toHex32(this.h,"big"):Rc.split32(this.h,"big")};var Fc=hc,Kc=wc,qc=Mc,Hc=Wa,Wc=Fc.sum32,$c=Fc.sum32_4,Vc=Fc.sum32_5,Yc=qc.ch32,Gc=qc.maj32,Zc=qc.s0_256,Qc=qc.s1_256,Xc=qc.g0_256,Jc=qc.g1_256,ed=Kc.BlockHash,td=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function nd(){if(!(this instanceof nd))return new nd;ed.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=td,this.W=new Array(64)}Fc.inherits(nd,ed);var rd=nd;nd.blockSize=512,nd.outSize=256,nd.hmacStrength=192,nd.padLength=64,nd.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=$c(Jc(n[r-2]),n[r-7],Xc(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4],l=this.h[5],c=this.h[6],d=this.h[7];for(Hc(this.k.length===n.length),r=0;r<n.length;r++){var f=Vc(d,Qc(u),Yc(u,l,c),this.k[r],n[r]),h=Wc(Zc(i),Gc(i,o,a));d=c,c=l,l=u,u=Wc(s,f),s=a,a=o,o=i,i=Wc(f,h)}this.h[0]=Wc(this.h[0],i),this.h[1]=Wc(this.h[1],o),this.h[2]=Wc(this.h[2],a),this.h[3]=Wc(this.h[3],s),this.h[4]=Wc(this.h[4],u),this.h[5]=Wc(this.h[5],l),this.h[6]=Wc(this.h[6],c),this.h[7]=Wc(this.h[7],d)},nd.prototype._digest=function(e){return"hex"===e?Fc.toHex32(this.h,"big"):Fc.split32(this.h,"big")};var id=hc,od=rd;function ad(){if(!(this instanceof ad))return new ad;od.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}id.inherits(ad,od);var sd=ad;ad.blockSize=512,ad.outSize=224,ad.hmacStrength=192,ad.padLength=64,ad.prototype._digest=function(e){return"hex"===e?id.toHex32(this.h.slice(0,7),"big"):id.split32(this.h.slice(0,7),"big")};var ud=hc,ld=wc,cd=Wa,dd=ud.rotr64_hi,fd=ud.rotr64_lo,hd=ud.shr64_hi,pd=ud.shr64_lo,md=ud.sum64,gd=ud.sum64_hi,vd=ud.sum64_lo,bd=ud.sum64_4_hi,yd=ud.sum64_4_lo,wd=ud.sum64_5_hi,_d=ud.sum64_5_lo,Sd=ld.BlockHash,Ed=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function kd(){if(!(this instanceof kd))return new kd;Sd.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Ed,this.W=new Array(160)}ud.inherits(kd,Sd);var Md=kd;function Cd(e,t,n,r,i){var o=e&n^~e&i;return o<0&&(o+=4294967296),o}function xd(e,t,n,r,i,o){var a=t&r^~t&o;return a<0&&(a+=4294967296),a}function Ad(e,t,n,r,i){var o=e&n^e&i^n&i;return o<0&&(o+=4294967296),o}function Td(e,t,n,r,i,o){var a=t&r^t&o^r&o;return a<0&&(a+=4294967296),a}function Rd(e,t){var n=dd(e,t,28)^dd(t,e,2)^dd(t,e,7);return n<0&&(n+=4294967296),n}function Pd(e,t){var n=fd(e,t,28)^fd(t,e,2)^fd(t,e,7);return n<0&&(n+=4294967296),n}function Ld(e,t){var n=dd(e,t,14)^dd(e,t,18)^dd(t,e,9);return n<0&&(n+=4294967296),n}function Id(e,t){var n=fd(e,t,14)^fd(e,t,18)^fd(t,e,9);return n<0&&(n+=4294967296),n}function Od(e,t){var n=dd(e,t,1)^dd(e,t,8)^hd(e,t,7);return n<0&&(n+=4294967296),n}function Nd(e,t){var n=fd(e,t,1)^fd(e,t,8)^pd(e,t,7);return n<0&&(n+=4294967296),n}function Dd(e,t){var n=dd(e,t,19)^dd(t,e,29)^hd(e,t,6);return n<0&&(n+=4294967296),n}function Bd(e,t){var n=fd(e,t,19)^fd(t,e,29)^pd(e,t,6);return n<0&&(n+=4294967296),n}kd.blockSize=1024,kd.outSize=512,kd.hmacStrength=192,kd.padLength=128,kd.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var i=Dd(n[r-4],n[r-3]),o=Bd(n[r-4],n[r-3]),a=n[r-14],s=n[r-13],u=Od(n[r-30],n[r-29]),l=Nd(n[r-30],n[r-29]),c=n[r-32],d=n[r-31];n[r]=bd(i,o,a,s,u,l,c,d),n[r+1]=yd(i,o,a,s,u,l,c,d)}},kd.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],i=this.h[1],o=this.h[2],a=this.h[3],s=this.h[4],u=this.h[5],l=this.h[6],c=this.h[7],d=this.h[8],f=this.h[9],h=this.h[10],p=this.h[11],m=this.h[12],g=this.h[13],v=this.h[14],b=this.h[15];cd(this.k.length===n.length);for(var y=0;y<n.length;y+=2){var w=v,_=b,S=Ld(d,f),E=Id(d,f),k=Cd(d,f,h,p,m),M=xd(d,f,h,p,m,g),C=this.k[y],x=this.k[y+1],A=n[y],T=n[y+1],R=wd(w,_,S,E,k,M,C,x,A,T),P=_d(w,_,S,E,k,M,C,x,A,T);w=Rd(r,i),_=Pd(r,i),S=Ad(r,i,o,a,s),E=Td(r,i,o,a,s,u);var L=gd(w,_,S,E),I=vd(w,_,S,E);v=m,b=g,m=h,g=p,h=d,p=f,d=gd(l,c,R,P),f=vd(c,c,R,P),l=s,c=u,s=o,u=a,o=r,a=i,r=gd(R,P,L,I),i=vd(R,P,L,I)}md(this.h,0,r,i),md(this.h,2,o,a),md(this.h,4,s,u),md(this.h,6,l,c),md(this.h,8,d,f),md(this.h,10,h,p),md(this.h,12,m,g),md(this.h,14,v,b)},kd.prototype._digest=function(e){return"hex"===e?ud.toHex32(this.h,"big"):ud.split32(this.h,"big")};var jd=hc,zd=Md;function Ud(){if(!(this instanceof Ud))return new Ud;zd.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}jd.inherits(Ud,zd);var Fd=Ud;Ud.blockSize=1024,Ud.outSize=384,Ud.hmacStrength=192,Ud.padLength=128,Ud.prototype._digest=function(e){return"hex"===e?jd.toHex32(this.h.slice(0,12),"big"):jd.split32(this.h.slice(0,12),"big")},kc.sha1=Uc,kc.sha224=sd,kc.sha256=rd,kc.sha384=Fd,kc.sha512=Md;var Kd={},qd=hc,Hd=wc,Wd=qd.rotl32,$d=qd.sum32,Vd=qd.sum32_3,Yd=qd.sum32_4,Gd=Hd.BlockHash;function Zd(){if(!(this instanceof Zd))return new Zd;Gd.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function Qd(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function Xd(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function Jd(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}qd.inherits(Zd,Gd),Kd.ripemd160=Zd,Zd.blockSize=512,Zd.outSize=160,Zd.hmacStrength=192,Zd.padLength=64,Zd.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],i=this.h[2],o=this.h[3],a=this.h[4],s=n,u=r,l=i,c=o,d=a,f=0;f<80;f++){var h=$d(Wd(Yd(n,Qd(f,r,i,o),e[ef[f]+t],Xd(f)),nf[f]),a);n=a,a=o,o=Wd(i,10),i=r,r=h,h=$d(Wd(Yd(s,Qd(79-f,u,l,c),e[tf[f]+t],Jd(f)),rf[f]),d),s=d,d=c,c=Wd(l,10),l=u,u=h}h=Vd(this.h[1],i,c),this.h[1]=Vd(this.h[2],o,d),this.h[2]=Vd(this.h[3],a,s),this.h[3]=Vd(this.h[4],n,u),this.h[4]=Vd(this.h[0],r,l),this.h[0]=h},Zd.prototype._digest=function(e){return"hex"===e?qd.toHex32(this.h,"little"):qd.split32(this.h,"little")};var ef=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],tf=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],nf=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],rf=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],of=hc,af=Wa;function sf(e,t,n){if(!(this instanceof sf))return new sf(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(of.toArray(t,n))}var uf,lf,cf=sf;sf.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),af(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},sf.prototype.update=function(e,t){return this.inner.update(e,t),this},sf.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},function(e){var t=e;t.utils=hc,t.common=wc,t.sha=kc,t.ripemd=Kd,t.hmac=cf,t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160}(fc),function(e){var t,n=e,r=fc,i=Ol,o=Ll.assert;function a(e){"short"===e.type?this.curve=new i.short(e):"edwards"===e.type?this.curve=new i.edwards(e):this.curve=new i.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new a(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=a,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{t=lf?uf:(lf=1,uf={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}catch(e){t=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",t]})}(dc);var df=fc,ff=Il,hf=Wa;function pf(e){if(!(this instanceof pf))return new pf(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=ff.toArray(e.entropy,e.entropyEnc||"hex"),n=ff.toArray(e.nonce,e.nonceEnc||"hex"),r=ff.toArray(e.pers,e.persEnc||"hex");hf(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}var mf=pf;pf.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},pf.prototype._hmac=function(){return new df.hmac(this.hash,this.K)},pf.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},pf.prototype.reseed=function(e,t,n,r){"string"!=typeof t&&(r=n,n=t,t=null),e=ff.toArray(e,t),n=ff.toArray(n,r),hf(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},pf.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=n,n=t,t=null),n&&(n=ff.toArray(n,r||"hex"),this._update(n));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var o=i.slice(0,e);return this._update(n),this._reseed++,ff.encode(o,t)};var gf=hl,vf=Ll.assert;function bf(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var yf=bf;bf.fromPublic=function(e,t,n){return t instanceof bf?t:new bf(e,{pub:t,pubEnc:n})},bf.fromPrivate=function(e,t,n){return t instanceof bf?t:new bf(e,{priv:t,privEnc:n})},bf.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},bf.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},bf.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},bf.prototype._importPrivate=function(e,t){this.priv=new gf(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},bf.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?vf(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||vf(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},bf.prototype.derive=function(e){return e.validate()||vf(e.validate(),"public point not validated"),e.mul(this.priv).getX()},bf.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},bf.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},bf.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var wf=hl,_f=Ll,Sf=_f.assert;function Ef(e,t){if(e instanceof Ef)return e;this._importDER(e,t)||(Sf(e.r&&e.s,"Signature without r or s"),this.r=new wf(e.r,16),this.s=new wf(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var kf,Mf,Cf=Ef;function xf(){this.place=0}function Af(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var i=0,o=0,a=t.place;o<r;o++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function Tf(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function Rf(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}Ef.prototype._importDER=function(e,t){e=_f.toArray(e,t);var n=new xf;if(48!==e[n.place++])return!1;var r=Af(e,n);if(!1===r)return!1;if(r+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var i=Af(e,n);if(!1===i)return!1;var o=e.slice(n.place,i+n.place);if(n.place+=i,2!==e[n.place++])return!1;var a=Af(e,n);if(!1===a)return!1;if(e.length!==a+n.place)return!1;var s=e.slice(n.place,a+n.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new wf(o),this.s=new wf(s),this.recoveryParam=null,!0},Ef.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=Tf(t),n=Tf(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];Rf(r,t.length),(r=r.concat(t)).push(2),Rf(r,n.length);var i=r.concat(n),o=[48];return Rf(o,i.length),o=o.concat(i),_f.encode(o,e)};var Pf=Ll,Lf=Pf.assert,If=Pf.parseBytes,Of=Pf.cachedProperty;function Nf(e,t){this.eddsa=e,this._secret=If(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=If(t.pub)}Nf.fromPublic=function(e,t){return t instanceof Nf?t:new Nf(e,{pub:t})},Nf.fromSecret=function(e,t){return t instanceof Nf?t:new Nf(e,{secret:t})},Nf.prototype.secret=function(){return this._secret},Of(Nf,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),Of(Nf,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),Of(Nf,"privBytes",(function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r})),Of(Nf,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),Of(Nf,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),Of(Nf,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),Nf.prototype.sign=function(e){return Lf(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},Nf.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},Nf.prototype.getSecret=function(e){return Lf(this._secret,"KeyPair is public only"),Pf.encode(this.secret(),e)},Nf.prototype.getPublic=function(e){return Pf.encode(this.pubBytes(),e)};var Df=Nf,Bf=hl,jf=Ll,zf=jf.assert,Uf=jf.cachedProperty,Ff=jf.parseBytes;function Kf(e,t){this.eddsa=e,"object"!=typeof t&&(t=Ff(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),zf(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof Bf&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}Uf(Kf,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),Uf(Kf,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),Uf(Kf,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),Uf(Kf,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),Kf.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Kf.prototype.toHex=function(){return jf.encode(this.toBytes(),"hex").toUpperCase()};var qf=Kf,Hf=fc,Wf=dc,$f=Ll,Vf=$f.assert,Yf=$f.parseBytes,Gf=Df,Zf=qf;function Qf(e){if(Vf("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof Qf))return new Qf(e);e=Wf[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=Hf.sha512}var Xf,Jf=Qf;function eh(){return Xf||(Xf=1,function(e){var t=e;t.version=Pl.version,t.utils=Ll,t.rand=ml(),t.curve=Ol,t.curves=dc,t.ec=function(){if(Mf)return kf;Mf=1;var e=hl,t=mf,n=Ll,r=dc,i=ml(),o=n.assert,a=yf,s=Cf;function u(e){if(!(this instanceof u))return new u(e);"string"==typeof e&&(o(Object.prototype.hasOwnProperty.call(r,e),"Unknown curve "+e),e=r[e]),e instanceof r.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}return kf=u,u.prototype.keyPair=function(e){return new a(this,e)},u.prototype.keyFromPrivate=function(e,t){return a.fromPrivate(this,e,t)},u.prototype.keyFromPublic=function(e,t){return a.fromPublic(this,e,t)},u.prototype.genKeyPair=function(n){n||(n={});for(var r=new t({hash:this.hash,pers:n.pers,persEnc:n.persEnc||"utf8",entropy:n.entropy||i(this.hash.hmacStrength),entropyEnc:n.entropy&&n.entropyEnc||"utf8",nonce:this.n.toArray()}),o=this.n.byteLength(),a=this.n.sub(new e(2));;){var s=new e(r.generate(o));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}},u.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},u.prototype.sign=function(n,r,i,o){"object"==typeof i&&(o=i,i=null),o||(o={}),r=this.keyFromPrivate(r,i),n=this._truncateToN(new e(n,16));for(var a=this.n.byteLength(),u=r.getPrivate().toArray("be",a),l=n.toArray("be",a),c=new t({hash:this.hash,entropy:u,nonce:l,pers:o.pers,persEnc:o.persEnc||"utf8"}),d=this.n.sub(new e(1)),f=0;;f++){var h=o.k?o.k(f):new e(c.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(d)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var v=h.invm(this.n).mul(g.mul(r.getPrivate()).iadd(n));if(0!==(v=v.umod(this.n)).cmpn(0)){var b=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),b^=1),new s({r:g,s:v,recoveryParam:b})}}}}}},u.prototype.verify=function(t,n,r,i){t=this._truncateToN(new e(t,16)),r=this.keyFromPublic(r,i);var o=(n=new s(n,"hex")).r,a=n.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var u,l=a.invm(this.n),c=l.mul(t).umod(this.n),d=l.mul(o).umod(this.n);return this.curve._maxwellTrick?!(u=this.g.jmulAdd(c,r.getPublic(),d)).isInfinity()&&u.eqXToP(o):!(u=this.g.mulAdd(c,r.getPublic(),d)).isInfinity()&&0===u.getX().umod(this.n).cmp(o)},u.prototype.recoverPubKey=function(t,n,r,i){o((3&r)===r,"The recovery param is more than two bits"),n=new s(n,i);var a=this.n,u=new e(t),l=n.r,c=n.s,d=1&r,f=r>>1;if(l.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");l=f?this.curve.pointFromX(l.add(this.curve.n),d):this.curve.pointFromX(l,d);var h=n.r.invm(a),p=a.sub(u).mul(h).umod(a),m=c.mul(h).umod(a);return this.g.mulAdd(p,l,m)},u.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new s(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(n))return i}throw new Error("Unable to find valid recovery factor")},kf}(),t.eddsa=Jf}(Rl)),Rl}Qf.prototype.sign=function(e,t){e=Yf(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),i=this.g.mul(r),o=this.encodePoint(i),a=this.hashInt(o,n.pubBytes(),e).mul(n.priv()),s=r.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:o})},Qf.prototype.verify=function(e,t,n){e=Yf(e),t=this.makeSignature(t);var r=this.keyFromPublic(n),i=this.hashInt(t.Rencoded(),r.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(r.pub().mul(i)).eq(o)},Qf.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return $f.intFromLE(e.digest()).umod(this.curve.n)},Qf.prototype.keyFromPublic=function(e){return Gf.fromPublic(this,e)},Qf.prototype.keyFromSecret=function(e){return Gf.fromSecret(this,e)},Qf.prototype.makeSignature=function(e){return e instanceof Zf?e:new Zf(this,e)},Qf.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},Qf.prototype.decodePoint=function(e){var t=(e=$f.parseBytes(e)).length-1,n=e.slice(0,t).concat(-129&e[t]),r=0!=(128&e[t]),i=$f.intFromLE(n);return this.curve.pointFromY(i,r)},Qf.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},Qf.prototype.decodeInt=function(e){return $f.intFromLE(e)},Qf.prototype.isPoint=function(e){return e instanceof this.pointClass};var th={exports:{}};!function(e){!function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:de.Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function s(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function u(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),u=t;u<s;u++){var l=e.charCodeAt(u)-48;o*=i,a=l>=49?l-49+10:l>=17?l-17+10:l,n(l>=0&&a<i,"Invalid character"),o+=a}return o}function l(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=s(e,t,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=s(e,t,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,l=0,c=n;c<s;c+=r)l=u(e,c,c+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==a){var d=1;for(l=u(e,c,e.length,t),c=0;c<a;c++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype._move=function(e){l(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch(e){i.prototype.inspect=c}else i.prototype.inspect=c;function c(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var l=1;l<r;l++){for(var c=u>>>26,d=67108863&u,f=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=f;h++){var p=l-h|0;c+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}n.words[l]=0|d,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n._strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);o=s>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?d[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],c=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(c).toString(e);r=(p=p.idivn(c)).isZero()?m+r:d[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},i.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|r;e[n++]=255&a,n<e.length&&(e[n++]=a>>8&255),n<e.length&&(e[n++]=a>>16&255),6===o?(n<e.length&&(e[n++]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},i.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|r;e[n--]=255&a,n>=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===o?(n>=0&&(e[n--]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},i.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},i.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},i.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a<r.length;a++)o=(t=(0|n.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<n.length;a++)o=(t=(0|n.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,n){var r,i,o,a=e.words,s=t.words,u=n.words,l=0,c=0|a[0],d=8191&c,f=c>>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,b=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,S=0|a[4],E=8191&S,k=S>>>13,M=0|a[5],C=8191&M,x=M>>>13,A=0|a[6],T=8191&A,R=A>>>13,P=0|a[7],L=8191&P,I=P>>>13,O=0|a[8],N=8191&O,D=O>>>13,B=0|a[9],j=8191&B,z=B>>>13,U=0|s[0],F=8191&U,K=U>>>13,q=0|s[1],H=8191&q,W=q>>>13,$=0|s[2],V=8191&$,Y=$>>>13,G=0|s[3],Z=8191&G,Q=G>>>13,X=0|s[4],J=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,le=se>>>13,ce=0|s[8],de=8191&ce,fe=ce>>>13,he=0|s[9],pe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(l+(r=Math.imul(d,F))|0)+((8191&(i=(i=Math.imul(d,K))+Math.imul(f,F)|0))<<13)|0;l=((o=Math.imul(f,K))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,K))+Math.imul(m,F)|0,o=Math.imul(m,K);var ve=(l+(r=r+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(f,H)|0))<<13)|0;l=((o=o+Math.imul(f,W)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,F),i=(i=Math.imul(v,K))+Math.imul(b,F)|0,o=Math.imul(b,K),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var be=(l+(r=r+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(f,V)|0))<<13)|0;l=((o=o+Math.imul(f,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,F),i=(i=Math.imul(w,K))+Math.imul(_,F)|0,o=Math.imul(_,K),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0,r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Y)|0;var ye=(l+(r=r+Math.imul(d,Z)|0)|0)+((8191&(i=(i=i+Math.imul(d,Q)|0)+Math.imul(f,Z)|0))<<13)|0;l=((o=o+Math.imul(f,Q)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,F),i=(i=Math.imul(E,K))+Math.imul(k,F)|0,o=Math.imul(k,K),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(v,V)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Y)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Q)|0;var we=(l+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,J)|0))<<13)|0;l=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(C,F),i=(i=Math.imul(C,K))+Math.imul(x,F)|0,o=Math.imul(x,K),r=r+Math.imul(E,H)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,W)|0,r=r+Math.imul(w,V)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,ee)|0;var _e=(l+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;l=((o=o+Math.imul(f,re)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,K))+Math.imul(R,F)|0,o=Math.imul(R,K),r=r+Math.imul(C,H)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,W)|0,r=r+Math.imul(E,V)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,Y)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Q)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var Se=(l+(r=r+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;l=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,F),i=(i=Math.imul(L,K))+Math.imul(I,F)|0,o=Math.imul(I,K),r=r+Math.imul(T,H)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,W)|0,r=r+Math.imul(C,V)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Q)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(b,ne)|0,o=o+Math.imul(b,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var Ee=(l+(r=r+Math.imul(d,ue)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(f,ue)|0))<<13)|0;l=((o=o+Math.imul(f,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(N,F),i=(i=Math.imul(N,K))+Math.imul(D,F)|0,o=Math.imul(D,K),r=r+Math.imul(L,H)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,r=r+Math.imul(T,V)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Y)|0,r=r+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(_,ne)|0,o=o+Math.imul(_,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,r=r+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0;var ke=(l+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;l=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,F),i=(i=Math.imul(j,K))+Math.imul(z,F)|0,o=Math.imul(z,K),r=r+Math.imul(N,H)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(D,H)|0,o=o+Math.imul(D,W)|0,r=r+Math.imul(L,V)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,Y)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(C,J)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(k,ne)|0,o=o+Math.imul(k,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,r=r+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,le)|0,r=r+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,fe)|0;var Me=(l+(r=r+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;l=((o=o+Math.imul(f,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,H),i=(i=Math.imul(j,W))+Math.imul(z,H)|0,o=Math.imul(z,W),r=r+Math.imul(N,V)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,Q)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,Q)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,ee)|0,r=r+Math.imul(C,ne)|0,i=(i=i+Math.imul(C,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,r=r+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,le)|0,r=r+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(b,de)|0,o=o+Math.imul(b,fe)|0;var Ce=(l+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;l=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,V),i=(i=Math.imul(j,Y))+Math.imul(z,V)|0,o=Math.imul(z,Y),r=r+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(L,J)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(R,ne)|0,o=o+Math.imul(R,re)|0,r=r+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,r=r+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,le)|0,r=r+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(_,de)|0,o=o+Math.imul(_,fe)|0;var xe=(l+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(b,pe)|0))<<13)|0;l=((o=o+Math.imul(b,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,Z),i=(i=Math.imul(j,Q))+Math.imul(z,Z)|0,o=Math.imul(z,Q),r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(D,J)|0,o=o+Math.imul(D,ee)|0,r=r+Math.imul(L,ne)|0,i=(i=i+Math.imul(L,re)|0)+Math.imul(I,ne)|0,o=o+Math.imul(I,re)|0,r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,r=r+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,le)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,le)|0,r=r+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(k,de)|0,o=o+Math.imul(k,fe)|0;var Ae=(l+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;l=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(j,J),i=(i=Math.imul(j,ee))+Math.imul(z,J)|0,o=Math.imul(z,ee),r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(D,ne)|0,o=o+Math.imul(D,re)|0,r=r+Math.imul(L,oe)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,r=r+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,le)|0,r=r+Math.imul(C,de)|0,i=(i=i+Math.imul(C,fe)|0)+Math.imul(x,de)|0,o=o+Math.imul(x,fe)|0;var Te=(l+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(k,pe)|0))<<13)|0;l=((o=o+Math.imul(k,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(z,ne)|0,o=Math.imul(z,re),r=r+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,ae)|0,r=r+Math.imul(L,ue)|0,i=(i=i+Math.imul(L,le)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,le)|0,r=r+Math.imul(T,de)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Re=(l+(r=r+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,me)|0)+Math.imul(x,pe)|0))<<13)|0;l=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(z,oe)|0,o=Math.imul(z,ae),r=r+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(D,ue)|0,o=o+Math.imul(D,le)|0,r=r+Math.imul(L,de)|0,i=(i=i+Math.imul(L,fe)|0)+Math.imul(I,de)|0,o=o+Math.imul(I,fe)|0;var Pe=(l+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(R,pe)|0))<<13)|0;l=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,ue),i=(i=Math.imul(j,le))+Math.imul(z,ue)|0,o=Math.imul(z,le),r=r+Math.imul(N,de)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul(D,de)|0,o=o+Math.imul(D,fe)|0;var Le=(l+(r=r+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,me)|0)+Math.imul(I,pe)|0))<<13)|0;l=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,r=Math.imul(j,de),i=(i=Math.imul(j,fe))+Math.imul(z,de)|0,o=Math.imul(z,fe);var Ie=(l+(r=r+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(D,pe)|0))<<13)|0;l=((o=o+Math.imul(D,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var Oe=(l+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(z,pe)|0))<<13)|0;return l=((o=Math.imul(z,me))+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,u[0]=ge,u[1]=ve,u[2]=be,u[3]=ye,u[4]=we,u[5]=_e,u[6]=Se,u[7]=Ee,u[8]=ke,u[9]=Me,u[10]=Ce,u[11]=xe,u[12]=Ae,u[13]=Te,u[14]=Re,u[15]=Pe,u[16]=Le,u[17]=Ie,u[18]=Oe,0!==l&&(u[19]=l,n.length++),n};function g(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var a=i;i=0;for(var s=67108863&r,u=Math.min(o,t.length-1),l=Math.max(0,o-e.length+1);l<=u;l++){var c=o-l,d=(0|e.words[c])*(0|t.words[l]),f=67108863&d;s=67108863&(f=f+s|0),i+=(a=(a=a+(d/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function v(e,t,n){return g(e,t,n)}Math.imul||(m=p),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?p(this,e,t):n<1024?g(this,e,t):v(this,e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),v(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,a=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,u=(0|this.words[t])-s<<r;this.words[t]=u|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var l=0;l<a;l++)u.words[l]=this.words[l];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,l=0;l<this.length;l++)this.words[l]=this.words[l+a];else this.words[0]=0,this.length=1;var c=0;for(l=this.length-1;l>=0&&(0!==c||l>=i);l--){var d=0|this.words[l];this.words[l]=c<<26-o|d>>>o,c=d&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,o,a=e.length+r;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,a=0|o.words[o.length-1];0!=(n=26-this._countBits(a))&&(o=o.ushln(n),r.iushln(n),a=0|o.words[o.length-1]);var s,u=r.length-o.length;if("mod"!==t){(s=new i(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l<s.length;l++)s.words[l]=0}var c=r.clone()._ishlnsubmul(o,1,u);0===c.negative&&(r=c,s&&(s.words[u]=1));for(var d=u-1;d>=0;d--){var f=67108864*(0|r.words[o.length+d])+(0|r.words[o.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(o,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(o,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),u=new i(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0==(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(c),a.isub(d)),o.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(d)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s),a.isub(u)):(r.isub(t),s.isub(o),u.isub(a))}return{a:s,b:u,gcd:r.iushln(l)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var d=0,f=1;0==(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new k(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},r(w,y),w.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&n)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(_,y),r(S,y),r(E,y),E.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new _;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return b[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},k.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);n(!o.isZero());var s=new i(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var d=this.pow(c,o),f=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var v=this.pow(d,new i(1).iushln(p-g-1));f=f.redMul(v),d=v.redSqr(),h=h.redMul(d),p=g}return f},k.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},k.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var o=n[0],a=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),r=t.length-1;r>=0;r--){for(var l=t.words[r],c=u-1;c>=0;c--){var d=l>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==d||0!==a?(a<<=1,a|=d,(4==++s||0===r&&0===c)&&(o=this.mul(o,n[a]),s=0,a=0)):s=0}u=26}return o},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new M(e)},r(M,k),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,r)}(th);var nh,rh=th.exports,ih={},oh={},ah={},sh={},uh=de,lh=uh.Buffer,ch={};for(nh in uh)uh.hasOwnProperty(nh)&&"SlowBuffer"!==nh&&"Buffer"!==nh&&(ch[nh]=uh[nh]);var dh=ch.Buffer={};for(nh in lh)lh.hasOwnProperty(nh)&&"allocUnsafe"!==nh&&"allocUnsafeSlow"!==nh&&(dh[nh]=lh[nh]);if(ch.Buffer.prototype=lh.prototype,dh.from&&dh.from!==Uint8Array.from||(dh.from=function(e,t,n){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return lh(e,t,n)}),dh.alloc||(dh.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=lh(e);return t&&0!==t.length?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r}),!ch.kStringMaxLength)try{ch.kStringMaxLength=je.binding("buffer").kStringMaxLength}catch(s){}ch.constants||(ch.constants={MAX_LENGTH:ch.kMaxLength},ch.kStringMaxLength&&(ch.constants.MAX_STRING_LENGTH=ch.kStringMaxLength));var fh=ch,hh={};const ph=Ye;function mh(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function gh(e,t){this.path=e,this.rethrow(t)}hh.Reporter=mh,mh.prototype.isError=function(e){return e instanceof gh},mh.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},mh.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},mh.prototype.enterKey=function(e){return this._reporterState.path.push(e)},mh.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},mh.prototype.leaveKey=function(e,t,n){const r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=n)},mh.prototype.path=function(){return this._reporterState.path.join("/")},mh.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},mh.prototype.leaveObject=function(e){const t=this._reporterState,n=t.obj;return t.obj=e,n},mh.prototype.error=function(e){let t;const n=this._reporterState,r=e instanceof gh;if(t=r?e:new gh(n.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!n.options.partial)throw t;return r||n.errors.push(t),t},mh.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},ph(gh,Error),gh.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,gh),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this};var vh={};const bh=Ye,yh=hh.Reporter,wh=fh.Buffer;function _h(e,t){yh.call(this,t),wh.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function Sh(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return Sh.isEncoderBuffer(e)||(e=new Sh(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=wh.byteLength(e);else{if(!wh.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}bh(_h,yh),vh.DecoderBuffer=_h,_h.isDecoderBuffer=function(e){return e instanceof _h||"object"==typeof e&&wh.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},_h.prototype.save=function(){return{offset:this.offset,reporter:yh.prototype.save.call(this)}},_h.prototype.restore=function(e){const t=new _h(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,yh.prototype.restore.call(this,e.reporter),t},_h.prototype.isEmpty=function(){return this.offset===this.length},_h.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},_h.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const n=new _h(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n},_h.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},vh.EncoderBuffer=Sh,Sh.isEncoderBuffer=function(e){return e instanceof Sh||"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},Sh.prototype.join=function(e,t){return e||(e=wh.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(n){n.join(e,t),t+=n.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):wh.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e};const Eh=hh.Reporter,kh=vh.EncoderBuffer,Mh=vh.DecoderBuffer,Ch=Wa,xh=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],Ah=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(xh);function Th(e,t,n){const r={};this._baseState=r,r.name=n,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}var Rh=Th;const Ph=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Th.prototype.clone=function(){const e=this._baseState,t={};Ph.forEach((function(n){t[n]=e[n]}));const n=new this.constructor(t.parent);return n._baseState=t,n},Th.prototype._wrap=function(){const e=this._baseState;Ah.forEach((function(t){this[t]=function(){const n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}}),this)},Th.prototype._init=function(e){const t=this._baseState;Ch(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),Ch.equal(t.children.length,1,"Root node can have only one child")},Th.prototype._useArgs=function(e){const t=this._baseState,n=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==n.length&&(Ch(null===t.children),t.children=n,n.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(Ch(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(n){n==(0|n)&&(n|=0);const r=e[n];t[r]=n})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){Th.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),xh.forEach((function(e){Th.prototype[e]=function(){const t=this._baseState,n=Array.prototype.slice.call(arguments);return Ch(null===t.tag),t.tag=e,this._useArgs(n),this}})),Th.prototype.use=function(e){Ch(e);const t=this._baseState;return Ch(null===t.use),t.use=e,this},Th.prototype.optional=function(){return this._baseState.optional=!0,this},Th.prototype.def=function(e){const t=this._baseState;return Ch(null===t.default),t.default=e,t.optional=!0,this},Th.prototype.explicit=function(e){const t=this._baseState;return Ch(null===t.explicit&&null===t.implicit),t.explicit=e,this},Th.prototype.implicit=function(e){const t=this._baseState;return Ch(null===t.explicit&&null===t.implicit),t.implicit=e,this},Th.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},Th.prototype.key=function(e){const t=this._baseState;return Ch(null===t.key),t.key=e,this},Th.prototype.any=function(){return this._baseState.any=!0,this},Th.prototype.choice=function(e){const t=this._baseState;return Ch(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},Th.prototype.contains=function(e){const t=this._baseState;return Ch(null===t.use),t.contains=e,this},Th.prototype._decode=function(e,t){const n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));let r,i=n.default,o=!0,a=null;if(null!==n.key&&(a=e.enterKey(n.key)),n.optional){let r=null;if(null!==n.explicit?r=n.explicit:null!==n.implicit?r=n.implicit:null!==n.tag&&(r=n.tag),null!==r||n.any){if(o=this._peekTag(e,r,n.any),e.isError(o))return o}else{const r=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(r)}}if(n.obj&&o&&(r=e.enterObject()),o){if(null!==n.explicit){const t=this._decodeTag(e,n.explicit);if(e.isError(t))return t;e=t}const r=e.offset;if(null===n.use&&null===n.choice){let t;n.any&&(t=e.save());const r=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(r))return r;n.any?i=e.raw(t):e=r}if(t&&t.track&&null!==n.tag&&t.track(e.path(),r,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),n.any||(i=null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(e,t)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){const r=new Mh(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(r,t)}}return n.obj&&o&&(i=e.leaveObject(r)),null===n.key||null===i&&!0!==o?null!==a&&e.exitKey(a):e.leaveKey(a,n.key,i),i},Th.prototype._decodeGeneric=function(e,t,n){const r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],n):/str$/.test(e)?this._decodeStr(t,e,n):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],n):"objid"===e?this._decodeObjid(t,null,null,n):"gentime"===e||"utctime"===e?this._decodeTime(t,e,n):"null_"===e?this._decodeNull(t,n):"bool"===e?this._decodeBool(t,n):"objDesc"===e?this._decodeStr(t,e,n):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,n):t.error("unknown tag: "+e)},Th.prototype._getUse=function(e,t){const n=this._baseState;return n.useDecoder=this._use(e,t),Ch(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},Th.prototype._decodeChoice=function(e,t){const n=this._baseState;let r=null,i=!1;return Object.keys(n.choice).some((function(o){const a=e.save(),s=n.choice[o];try{const n=s._decode(e,t);if(e.isError(n))return!1;r={type:o,value:n},i=!0}catch(t){return e.restore(a),!1}return!0}),this),i?r:e.error("Choice not matched")},Th.prototype._createEncoderBuffer=function(e){return new kh(e,this.reporter)},Th.prototype._encode=function(e,t,n){const r=this._baseState;if(null!==r.default&&r.default===e)return;const i=this._encodeValue(e,t,n);return void 0===i||this._skipDefault(i,t,n)?void 0:i},Th.prototype._encodeValue=function(e,t,n){const r=this._baseState;if(null===r.parent)return r.children[0]._encode(e,t||new Eh);let i=null;if(this.reporter=t,r.optional&&void 0===e){if(null===r.default)return;e=r.default}let o=null,a=!1;if(r.any)i=this._createEncoderBuffer(e);else if(r.choice)i=this._encodeChoice(e,t);else if(r.contains)o=this._getUse(r.contains,n)._encode(e,t),a=!0;else if(r.children)o=r.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,t,e);if(null===n._baseState.key)return t.error("Child should have a key");const r=t.enterKey(n._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const i=n._encode(e[n._baseState.key],t,e);return t.leaveKey(r),i}),this).filter((function(e){return e})),o=this._createEncoderBuffer(o);else if("seqof"===r.tag||"setof"===r.tag){if(!r.args||1!==r.args.length)return t.error("Too many args for : "+r.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const n=this.clone();n._baseState.implicit=null,o=this._createEncoderBuffer(e.map((function(n){const r=this._baseState;return this._getUse(r.args[0],e)._encode(n,t)}),n))}else null!==r.use?i=this._getUse(r.use,n)._encode(e,t):(o=this._encodePrimitive(r.tag,e),a=!0);if(!r.any&&null===r.choice){const e=null!==r.implicit?r.implicit:r.tag,n=null===r.implicit?"universal":"context";null===e?null===r.use&&t.error("Tag could be omitted only for .use()"):null===r.use&&(i=this._encodeComposite(e,a,n,o))}return null!==r.explicit&&(i=this._encodeComposite(r.explicit,!1,"context",i)),i},Th.prototype._encodeChoice=function(e,t){const n=this._baseState,r=n.choice[e.type];return r||Ch(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(e.value,t)},Th.prototype._encodePrimitive=function(e,t){const n=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,n.args&&n.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},Th.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},Th.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)};var Lh={};!function(e){function t(e){const t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);const r=e[n];t[r]=n})),t}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=t(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=t(e.tag)}(Lh);const Ih=Ye,Oh=fh.Buffer,Nh=Rh,Dh=Lh;function Bh(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new zh,this.tree._init(e.body)}var jh=Bh;function zh(e){Nh.call(this,"der",e)}function Uh(e){return e<10?"0"+e:e}Bh.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},Ih(zh,Nh),zh.prototype._encodeComposite=function(e,t,n,r){const i=function(e,t,n,r){let i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),Dh.tagByName.hasOwnProperty(e))i=Dh.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);i=e}return i>=31?r.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=Dh.tagClassByName[n||"universal"]<<6,i)}(e,t,n,this.reporter);if(r.length<128){const e=Oh.alloc(2);return e[0]=i,e[1]=r.length,this._createEncoderBuffer([e,r])}let o=1;for(let e=r.length;e>=256;e>>=8)o++;const a=Oh.alloc(2+o);a[0]=i,a[1]=128|o;for(let e=1+o,t=r.length;t>0;e--,t>>=8)a[e]=255&t;return this._createEncoderBuffer([a,r])},zh.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=Oh.alloc(2*e.length);for(let n=0;n<e.length;n++)t.writeUInt16BE(e.charCodeAt(n),2*n);return this._createEncoderBuffer(t)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},zh.prototype._encodeObjid=function(e,t,n){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s.]+/g);for(let t=0;t<e.length;t++)e[t]|=0}else if(Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!n){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let r=0;for(let t=0;t<e.length;t++){let n=e[t];for(r++;n>=128;n>>=7)r++}const i=Oh.alloc(r);let o=i.length-1;for(let t=e.length-1;t>=0;t--){let n=e[t];for(i[o--]=127&n;(n>>=7)>0;)i[o--]=128|127&n}return this._createEncoderBuffer(i)},zh.prototype._encodeTime=function(e,t){let n;const r=new Date(e);return"gentime"===t?n=[Uh(r.getUTCFullYear()),Uh(r.getUTCMonth()+1),Uh(r.getUTCDate()),Uh(r.getUTCHours()),Uh(r.getUTCMinutes()),Uh(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[Uh(r.getUTCFullYear()%100),Uh(r.getUTCMonth()+1),Uh(r.getUTCDate()),Uh(r.getUTCHours()),Uh(r.getUTCMinutes()),Uh(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},zh.prototype._encodeNull=function(){return this._createEncoderBuffer("")},zh.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!Oh.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=Oh.from(t)}if(Oh.isBuffer(e)){let t=e.length;0===e.length&&t++;const n=Oh.alloc(t);return e.copy(n),0===e.length&&(n[0]=0),this._createEncoderBuffer(n)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let n=1;for(let t=e;t>=256;t>>=8)n++;const r=new Array(n);for(let t=r.length-1;t>=0;t--)r[t]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(Oh.from(r))},zh.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},zh.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},zh.prototype._skipDefault=function(e,t,n){const r=this._baseState;let i;if(null===r.default)return!1;const o=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,t,n).join()),o.length!==r.defaultBuffer.length)return!1;for(i=0;i<o.length;i++)if(o[i]!==r.defaultBuffer[i])return!1;return!0};const Fh=jh;function Kh(e){Fh.call(this,e),this.enc="pem"}Ye(Kh,Fh);var qh=Kh;Kh.prototype.encode=function(e,t){const n=Fh.prototype.encode.call(this,e).toString("base64"),r=["-----BEGIN "+t.label+"-----"];for(let e=0;e<n.length;e+=64)r.push(n.slice(e,e+64));return r.push("-----END "+t.label+"-----"),r.join("\n")},function(e){const t=e;t.der=jh,t.pem=qh}(sh);var Hh={};const Wh=Ye,$h=hl,Vh=vh.DecoderBuffer,Yh=Rh,Gh=Lh;function Zh(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new Xh,this.tree._init(e.body)}var Qh=Zh;function Xh(e){Yh.call(this,"der",e)}function Jh(e,t){let n=e.readUInt8(t);if(e.isError(n))return n;const r=Gh.tagClass[n>>6],i=0==(32&n);if(31==(31&n)){let r=n;for(n=0;128==(128&r);){if(r=e.readUInt8(t),e.isError(r))return r;n<<=7,n|=127&r}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:Gh.tag[n]}}function ep(e,t,n){let r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;const i=127&r;if(i>4)return e.error("length octect is too long");r=0;for(let t=0;t<i;t++){r<<=8;const t=e.readUInt8(n);if(e.isError(t))return t;r|=t}return r}Zh.prototype.decode=function(e,t){return Vh.isDecoderBuffer(e)||(e=new Vh(e,t)),this.tree._decode(e,t)},Wh(Xh,Yh),Xh.prototype._peekTag=function(e,t,n){if(e.isEmpty())return!1;const r=e.save(),i=Jh(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(r),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||n)},Xh.prototype._decodeTag=function(e,t,n){const r=Jh(e,'Failed to decode tag of "'+t+'"');if(e.isError(r))return r;let i=ep(e,r.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!n&&r.tag!==t&&r.tagStr!==t&&r.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(r.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');const o=e.save(),a=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(a)?a:(i=e.offset-o.offset,e.restore(o),e.skip(i,'Failed to match body of: "'+t+'"'))},Xh.prototype._skipUntilEnd=function(e,t){for(;;){const n=Jh(e,t);if(e.isError(n))return n;const r=ep(e,n.primitive,t);if(e.isError(r))return r;let i;if(i=n.primitive||null!==r?e.skip(r):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===n.tagStr)break}},Xh.prototype._decodeList=function(e,t,n,r){const i=[];for(;!e.isEmpty();){const t=this._peekTag(e,"end");if(e.isError(t))return t;const o=n.decode(e,"der",r);if(e.isError(o)&&t)break;i.push(o)}return i},Xh.prototype._decodeStr=function(e,t){if("bitstr"===t){const t=e.readUInt8();return e.isError(t)?t:{unused:t,data:e.raw()}}if("bmpstr"===t){const t=e.raw();if(t.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");let n="";for(let e=0;e<t.length/2;e++)n+=String.fromCharCode(t.readUInt16BE(2*e));return n}if("numstr"===t){const t=e.raw().toString("ascii");return this._isNumstr(t)?t:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){const t=e.raw().toString("ascii");return this._isPrintstr(t)?t:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},Xh.prototype._decodeObjid=function(e,t,n){let r;const i=[];let o=0,a=0;for(;!e.isEmpty();)a=e.readUInt8(),o<<=7,o|=127&a,0==(128&a)&&(i.push(o),o=0);128&a&&i.push(o);const s=i[0]/40|0,u=i[0]%40;if(r=n?i:[s,u].concat(i.slice(1)),t){let e=t[r.join(" ")];void 0===e&&(e=t[r.join(".")]),void 0!==e&&(r=e)}return r},Xh.prototype._decodeTime=function(e,t){const n=e.raw().toString();let r,i,o,a,s,u;if("gentime"===t)r=0|n.slice(0,4),i=0|n.slice(4,6),o=0|n.slice(6,8),a=0|n.slice(8,10),s=0|n.slice(10,12),u=0|n.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");r=0|n.slice(0,2),i=0|n.slice(2,4),o=0|n.slice(4,6),a=0|n.slice(6,8),s=0|n.slice(8,10),u=0|n.slice(10,12),r=r<70?2e3+r:1900+r}return Date.UTC(r,i-1,o,a,s,u,0)},Xh.prototype._decodeNull=function(){return null},Xh.prototype._decodeBool=function(e){const t=e.readUInt8();return e.isError(t)?t:0!==t},Xh.prototype._decodeInt=function(e,t){const n=e.raw();let r=new $h(n);return t&&(r=t[r.toString(10)]||r),r},Xh.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree};const tp=Ye,np=fh.Buffer,rp=Qh;function ip(e){rp.call(this,e),this.enc="pem"}tp(ip,rp);var op=ip;ip.prototype.decode=function(e,t){const n=e.toString().split(/[\r\n]+/g),r=t.label.toUpperCase(),i=/^-----(BEGIN|END) ([^-]+)-----$/;let o=-1,a=-1;for(let e=0;e<n.length;e++){const t=n[e].match(i);if(null!==t&&t[2]===r){if(-1!==o){if("END"!==t[1])break;a=e;break}if("BEGIN"!==t[1])break;o=e}}if(-1===o||-1===a)throw new Error("PEM section not found for: "+r);const s=n.slice(o+1,a).join("");s.replace(/[^a-z0-9+/=]+/gi,"");const u=np.from(s,"base64");return rp.prototype.decode.call(this,u,t)},function(e){const t=e;t.der=Qh,t.pem=op}(Hh),function(e){const t=sh,n=Hh,r=Ye;function i(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}e.define=function(e,t){return new i(e,t)},i.prototype._createNamed=function(e){const t=this.name;function n(e){this._initNamed(e,t)}return r(n,e),n.prototype._initNamed=function(t,n){e.call(this,t,n)},new n(this)},i.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n[e])),this.decoders[e]},i.prototype.decode=function(e,t,n){return this._getDecoder(t).decode(e,n)},i.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(t[e])),this.encoders[e]},i.prototype.encode=function(e,t,n){return this._getEncoder(t).encode(e,n)}}(ah);var ap={};!function(e){const t=e;t.Reporter=hh.Reporter,t.DecoderBuffer=vh.DecoderBuffer,t.EncoderBuffer=vh.EncoderBuffer,t.Node=Rh}(ap);var sp={};!function(e){const t=e;t._reverse=function(e){const t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);const r=e[n];t[r]=n})),t},t.der=Lh}(sp),function(e){const t=e;t.bignum=hl,t.define=ah.define,t.base=ap,t.constants=sp,t.decoders=Hh,t.encoders=sh}(oh);var up=oh,lp=up.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),cp=up.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),dp=up.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),fp=up.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(dp),this.key("subjectPublicKey").bitstr())})),hp=up.define("RelativeDistinguishedName",(function(){this.setof(cp)})),pp=up.define("RDNSequence",(function(){this.seqof(hp)})),mp=up.define("Name",(function(){this.choice({rdnSequence:this.use(pp)})})),gp=up.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(lp),this.key("notAfter").use(lp))})),vp=up.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),bp=up.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(dp),this.key("issuer").use(mp),this.key("validity").use(gp),this.key("subject").use(mp),this.key("subjectPublicKeyInfo").use(fp),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(vp).optional())})),yp=up.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(bp),this.key("signatureAlgorithm").use(dp),this.key("signatureValue").bitstr())})),wp=oh;ih.certificate=yp;var _p=wp.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));ih.RSAPrivateKey=_p;var Sp=wp.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));ih.RSAPublicKey=Sp;var Ep=wp.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(kp),this.key("subjectPublicKey").bitstr())}));ih.PublicKey=Ep;var kp=wp.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),Mp=wp.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(kp),this.key("subjectPrivateKey").octstr())}));ih.PrivateKey=Mp;var Cp=wp.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));ih.EncryptedPrivateKey=Cp;var xp=wp.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));ih.DSAPrivateKey=xp,ih.DSAparam=wp.define("DSAparam",(function(){this.int()}));var Ap=wp.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(Tp),this.key("publicKey").optional().explicit(1).bitstr())}));ih.ECPrivateKey=Ap;var Tp=wp.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));ih.signature=wp.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}));var Rp=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,Pp=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,Lp=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,Ip=Cu,Op=_s,Np=Fe().Buffer,Dp=ih,Bp={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"},jp=function(e,t){var n,r=e.toString(),i=r.match(Rp);if(i){var o="aes"+i[1],a=Np.from(i[2],"hex"),s=Np.from(i[3].replace(/[\r\n]/g,""),"base64"),u=Ip(t,a.slice(0,8),parseInt(i[1],10)).key,l=[],c=Op.createDecipheriv(o,u,a);l.push(c.update(s)),l.push(c.final()),n=Np.concat(l)}else{var d=r.match(Lp);n=Np.from(d[2].replace(/[\r\n]/g,""),"base64")}return{tag:r.match(Pp)[1],data:n}},zp=_s,Up=ca,Fp=Fe().Buffer,Kp=qp;function qp(e){var t;"object"!=typeof e||Fp.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=Fp.from(e));var n,r,i=jp(e,t),o=i.tag,a=i.data;switch(o){case"CERTIFICATE":r=Dp.certificate.decode(a,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(r||(r=Dp.PublicKey.decode(a,"der")),n=r.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return Dp.RSAPublicKey.decode(r.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return r.subjectPrivateKey=r.subjectPublicKey,{type:"ec",data:r};case"1.2.840.10040.4.1":return r.algorithm.params.pub_key=Dp.DSAparam.decode(r.subjectPublicKey.data,"der"),{type:"dsa",data:r.algorithm.params};default:throw new Error("unknown key id "+n)}case"ENCRYPTED PRIVATE KEY":a=function(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=Bp[e.algorithm.decrypt.cipher.algo.join(".")],o=e.algorithm.decrypt.cipher.iv,a=e.subjectPrivateKey,s=parseInt(i.split("-")[1],10)/8,u=Up.pbkdf2Sync(t,n,r,s,"sha1"),l=zp.createDecipheriv(i,u,o),c=[];return c.push(l.update(a)),c.push(l.final()),Fp.concat(c)}(a=Dp.EncryptedPrivateKey.decode(a,"der"),t);case"PRIVATE KEY":switch(n=(r=Dp.PrivateKey.decode(a,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return Dp.RSAPrivateKey.decode(r.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:r.algorithm.curve,privateKey:Dp.ECPrivateKey.decode(r.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return r.algorithm.params.priv_key=Dp.DSAparam.decode(r.subjectPrivateKey,"der"),{type:"dsa",params:r.algorithm.params};default:throw new Error("unknown key id "+n)}case"RSA PUBLIC KEY":return Dp.RSAPublicKey.decode(a,"der");case"RSA PRIVATE KEY":return Dp.RSAPrivateKey.decode(a,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:Dp.DSAPrivateKey.decode(a,"der")};case"EC PRIVATE KEY":return{curve:(a=Dp.ECPrivateKey.decode(a,"der")).parameters.value,privateKey:a.privateKey};default:throw new Error("unknown key type "+o)}}qp.signature=Dp.signature;var Hp,Wp,$p,Vp,Yp,Gp,Zp,Qp={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"};function Xp(){if(Hp)return El.exports;Hp=1;var e=Fe().Buffer,t=sa,n=Tl,r=eh().ec,i=rh,o=Kp,a=Qp;function s(n,r,i,o){if((n=e.from(n.toArray())).length<r.byteLength()){var a=e.alloc(r.byteLength()-n.length);n=e.concat([a,n])}var s=i.length,l=function(t,n){t=(t=u(t,n)).mod(n);var r=e.from(t.toArray());if(r.length<n.byteLength()){var i=e.alloc(n.byteLength()-r.length);r=e.concat([i,r])}return r}(i,r),c=e.alloc(s);c.fill(1);var d=e.alloc(s);return d=t(o,d).update(c).update(e.from([0])).update(n).update(l).digest(),c=t(o,d).update(c).digest(),{k:d=t(o,d).update(c).update(e.from([1])).update(n).update(l).digest(),v:c=t(o,d).update(c).digest()}}function u(e,t){var n=new i(e),r=(e.length<<3)-t.bitLength();return r>0&&n.ishrn(r),n}function l(n,r,i){var o,a;do{for(o=e.alloc(0);8*o.length<n.bitLength();)r.v=t(i,r.k).update(r.v).digest(),o=e.concat([o,r.v]);a=u(o,n),r.k=t(i,r.k).update(r.v).update(e.from([0])).digest(),r.v=t(i,r.k).update(r.v).digest()}while(-1!==a.cmp(n));return a}function c(e,t,n,r){return e.toRed(i.mont(n)).redPow(t).fromRed().mod(r)}return El.exports=function(t,d,f,h,p){var m=o(d);if(m.curve){if("ecdsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong private key type");return function(t,n){var i=a[n.curve.join(".")];if(!i)throw new Error("unknown curve "+n.curve.join("."));var o=new r(i).keyFromPrivate(n.privateKey).sign(t);return e.from(o.toDER())}(t,m)}if("dsa"===m.type){if("dsa"!==h)throw new Error("wrong private key type");return function(t,n,r){for(var o,a=n.params.priv_key,d=n.params.p,f=n.params.q,h=n.params.g,p=new i(0),m=u(t,f).mod(f),g=!1,v=s(a,f,t,r);!1===g;)p=c(h,o=l(f,v,r),d,f),0===(g=o.invm(f).imul(m.add(a.mul(p))).mod(f)).cmpn(0)&&(g=!1,p=new i(0));return function(t,n){t=t.toArray(),n=n.toArray(),128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n));var r=[48,t.length+n.length+4,2,t.length];return r=r.concat(t,[2,n.length],n),e.from(r)}(p,g)}(t,m,f)}if("rsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong private key type");t=e.concat([p,t]);for(var g=m.modulus.byteLength(),v=[0,1];t.length+v.length+1<g;)v.push(255);v.push(0);for(var b=-1;++b<t.length;)v.push(t[b]);return n(v,m)},El.exports.getKey=s,El.exports.makeKey=l,El.exports}function Jp(){if($p)return Wp;$p=1;var e=Fe().Buffer,t=rh,n=eh().ec,r=Kp,i=Qp;function o(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}return Wp=function(a,s,u,l,c){var d=r(u);if("ec"===d.type){if("ecdsa"!==l&&"ecdsa/rsa"!==l)throw new Error("wrong public key type");return function(e,t,r){var o=i[r.data.algorithm.curve.join(".")];if(!o)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var a=new n(o),s=r.data.subjectPrivateKey.data;return a.verify(t,e,s)}(a,s,d)}if("dsa"===d.type){if("dsa"!==l)throw new Error("wrong public key type");return function(e,n,i){var a=i.data.p,s=i.data.q,u=i.data.g,l=i.data.pub_key,c=r.signature.decode(e,"der"),d=c.s,f=c.r;o(d,s),o(f,s);var h=t.mont(a),p=d.invm(s);return 0===u.toRed(h).redPow(new t(n).mul(p).mod(s)).fromRed().mul(l.toRed(h).redPow(f.mul(p).mod(s)).fromRed()).mod(a).mod(s).cmp(f)}(a,s,d)}if("rsa"!==l&&"ecdsa/rsa"!==l)throw new Error("wrong public key type");s=e.concat([c,s]);for(var f=d.modulus.byteLength(),h=[1],p=0;s.length+h.length+2<f;)h.push(255),p++;h.push(0);for(var m=-1;++m<s.length;)h.push(s[m]);h=e.from(h);var g=t.mont(d.modulus);a=(a=new t(a).toRed(g)).redPow(new t(d.publicExponent)),a=e.from(a.fromRed().toArray());var v=p<8?1:0;for(f=Math.min(a.length,h.length),a.length!==h.length&&(v=1),m=-1;++m<f;)v|=a[m]^h[m];return 0===v},Wp}var em={},tm=qo,nm=Fe().Buffer,rm=function(e,t){for(var n,r=nm.alloc(0),i=0;r.length<t;)n=im(i++),r=nm.concat([r,tm("sha1").update(e).update(n).digest()]);return r.slice(0,t)};function im(e){var t=nm.allocUnsafe(4);return t.writeUInt32BE(e,0),t}var om=function(e,t){for(var n=e.length,r=-1;++r<n;)e[r]^=t[r];return e},am=hl,sm=Fe().Buffer,um=function(e,t){return sm.from(e.toRed(am.mont(t.modulus)).redPow(new am(t.publicExponent)).fromRed().toArray())},lm=Kp,cm=$e,dm=qo,fm=rm,hm=om,pm=hl,mm=um,gm=Tl,vm=Fe().Buffer,bm=function(e,t,n){var r;r=e.padding?e.padding:n?1:4;var i,o=lm(e);if(4===r)i=function(e,t){var n=e.modulus.byteLength(),r=t.length,i=dm("sha1").update(vm.alloc(0)).digest(),o=i.length,a=2*o;if(r>n-a-2)throw new Error("message too long");var s=vm.alloc(n-r-a-2),u=n-o-1,l=cm(o),c=hm(vm.concat([i,s,vm.alloc(1,1),t],u),fm(l,u)),d=hm(l,fm(c,o));return new pm(vm.concat([vm.alloc(1),d,c],n))}(o,t);else if(1===r)i=function(e,t,n){var r,i=t.length,o=e.modulus.byteLength();if(i>o-11)throw new Error("message too long");return r=n?vm.alloc(o-i-3,255):function(e){for(var t,n=vm.allocUnsafe(e),r=0,i=cm(2*e),o=0;r<e;)o===i.length&&(i=cm(2*e),o=0),(t=i[o++])&&(n[r++]=t);return n}(o-i-3),new pm(vm.concat([vm.from([0,n?1:2]),r,vm.alloc(1),t],o))}(o,t,n);else{if(3!==r)throw new Error("unknown padding");if((i=new pm(t)).cmp(o.modulus)>=0)throw new Error("data too long for modulus")}return n?gm(i,o):mm(i,o)},ym=Kp,wm=rm,_m=om,Sm=hl,Em=Tl,km=qo,Mm=um,Cm=Fe().Buffer,xm=function(e,t,n){var r;r=e.padding?e.padding:n?1:4;var i,o=ym(e),a=o.modulus.byteLength();if(t.length>a||new Sm(t).cmp(o.modulus)>=0)throw new Error("decryption error");i=n?Mm(new Sm(t),o):Em(t,o);var s=Cm.alloc(a-i.length);if(i=Cm.concat([s,i],a),4===r)return function(e,t){var n=e.modulus.byteLength(),r=km("sha1").update(Cm.alloc(0)).digest(),i=r.length;if(0!==t[0])throw new Error("decryption error");var o=t.slice(1,i+1),a=t.slice(i+1),s=_m(o,wm(a,i)),u=_m(a,wm(s,n-i-1));if(function(e,t){e=Cm.from(e),t=Cm.from(t);var n=0,r=e.length;e.length!==t.length&&(n++,r=Math.min(e.length,t.length));for(var i=-1;++i<r;)n+=e[i]^t[i];return n}(r,u.slice(0,i)))throw new Error("decryption error");for(var l=i;0===u[l];)l++;if(1!==u[l++])throw new Error("decryption error");return u.slice(l)}(o,i);if(1===r)return function(e,t,n){for(var r=t.slice(0,2),i=2,o=0;0!==t[i++];)if(i>=t.length){o++;break}var a=t.slice(2,i-1);if(("0002"!==r.toString("hex")&&!n||"0001"!==r.toString("hex")&&n)&&o++,a.length<8&&o++,o)throw new Error("decryption error");return t.slice(i)}(0,i,n);if(3===r)return i;throw new Error("unknown padding")};!function(e){e.publicEncrypt=bm,e.privateDecrypt=xm,e.privateEncrypt=function(t,n){return e.publicEncrypt(t,n,!0)},e.publicDecrypt=function(t,n){return e.privateDecrypt(t,n,!0)}}(em);var Am={};function Tm(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var Rm,Pm=Fe(),Lm=Pm.Buffer,Im=Pm.kMaxLength,Om=r.crypto||r.msCrypto,Nm=Math.pow(2,32)-1;function Dm(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>Nm||e<0)throw new TypeError("offset must be a uint32");if(e>Im||e>t)throw new RangeError("offset out of range")}function Bm(e,t,n){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>Nm||e<0)throw new TypeError("size must be a uint32");if(e+t>n||e>Im)throw new RangeError("buffer too small")}function jm(e,t,n,r){var i=e.buffer,o=new Uint8Array(i,t,n);return Om.getRandomValues(o),r?void ke((function(){r(null,e)})):e}function zm(){if(Rm)return fe;Rm=1,fe.randomBytes=fe.rng=fe.pseudoRandomBytes=fe.prng=$e,fe.createHash=fe.Hash=qo,fe.createHmac=fe.Hmac=sa;var e=la,t=Object.keys(e),n=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(t);fe.getHashes=function(){return n};var r=ca;fe.pbkdf2=r.pbkdf2,fe.pbkdf2Sync=r.pbkdf2Sync;var i=za;fe.Cipher=i.Cipher,fe.createCipher=i.createCipher,fe.Cipheriv=i.Cipheriv,fe.createCipheriv=i.createCipheriv,fe.Decipher=i.Decipher,fe.createDecipher=i.createDecipher,fe.Decipheriv=i.Decipheriv,fe.createDecipheriv=i.createDecipheriv,fe.getCiphers=i.getCiphers,fe.listCiphers=i.listCiphers;var o=function(){if(wl)return al;wl=1;var e=vl(),t=_l,n=Sl(),r={binary:!0,hex:!0,base64:!0};return al.DiffieHellmanGroup=al.createDiffieHellmanGroup=al.getDiffieHellman=function(e){var r=new S(t[e].prime,"hex"),i=new S(t[e].gen,"hex");return new n(r,i)},al.createDiffieHellman=al.DiffieHellman=function t(i,o,a,s){return oe(o)||void 0===r[o]?t(i,"binary",o,a):(o=o||"binary",s=s||"binary",oe(a=a||new S([2]))||(a=new S(a,s)),"number"==typeof i?new n(e(i,a),a,!0):(oe(i)||(i=new S(i,o)),new n(i,a,!0)))},al}();fe.DiffieHellmanGroup=o.DiffieHellmanGroup,fe.createDiffieHellmanGroup=o.createDiffieHellmanGroup,fe.getDiffieHellman=o.getDiffieHellman,fe.createDiffieHellman=o.createDiffieHellman,fe.DiffieHellman=o.DiffieHellman;var a=function(){if(Yp)return Vp;Yp=1;var e=Fe().Buffer,t=qo,n=Wn,r=Ye,i=Xp(),o=Jp(),a=ua;function s(e){n.Writable.call(this);var r=a[e];if(!r)throw new Error("Unknown message digest");this._hashType=r.hash,this._hash=t(r.hash),this._tag=r.id,this._signType=r.sign}function u(e){n.Writable.call(this);var r=a[e];if(!r)throw new Error("Unknown message digest");this._hash=t(r.hash),this._tag=r.id,this._signType=r.sign}function l(e){return new s(e)}function c(e){return new u(e)}return Object.keys(a).forEach((function(t){a[t].id=e.from(a[t].id,"hex"),a[t.toLowerCase()]=a[t]})),r(s,n.Writable),s.prototype._write=function(e,t,n){this._hash.update(e),n()},s.prototype.update=function(t,n){return"string"==typeof t&&(t=e.from(t,n)),this._hash.update(t),this},s.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),r=i(n,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},r(u,n.Writable),u.prototype._write=function(e,t,n){this._hash.update(e),n()},u.prototype.update=function(t,n){return"string"==typeof t&&(t=e.from(t,n)),this._hash.update(t),this},u.prototype.verify=function(t,n,r){"string"==typeof n&&(n=e.from(n,r)),this.end();var i=this._hash.digest();return o(n,i,t,this._signType,this._tag)},Vp={Sign:l,Verify:c,createSign:l,createVerify:c}}();fe.createSign=a.createSign,fe.Sign=a.Sign,fe.createVerify=a.createVerify,fe.Verify=a.Verify,fe.createECDH=function(){if(Zp)return Gp;Zp=1;var e=eh(),t=hl;Gp=function(e){return new r(e)};var n={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function r(t){this.curveType=n[t],this.curveType||(this.curveType={name:t}),this.curve=new e.ec(this.curveType.name),this.keys=void 0}function i(e,t,n){Array.isArray(e)||(e=e.toArray());var r=new S(e);if(n&&r.length<n){var i=new S(n-r.length);i.fill(0),r=S.concat([i,r])}return t?r.toString(t):r}return n.p224=n.secp224r1,n.p256=n.secp256r1=n.prime256v1,n.p192=n.secp192r1=n.prime192v1,n.p384=n.secp384r1,n.p521=n.secp521r1,r.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},r.prototype.computeSecret=function(e,t,n){return t=t||"utf8",oe(e)||(e=new S(e,t)),i(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),n,this.curveType.byteLength)},r.prototype.getPublicKey=function(e,t){var n=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(n[n.length-1]%2?n[0]=7:n[0]=6),i(n,e)},r.prototype.getPrivateKey=function(e){return i(this.keys.getPrivate(),e)},r.prototype.setPublicKey=function(e,t){return t=t||"utf8",oe(e)||(e=new S(e,t)),this.keys._importPublic(e),this},r.prototype.setPrivateKey=function(e,n){n=n||"utf8",oe(e)||(e=new S(e,n));var r=new t(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this},Gp}();var s=em;fe.publicEncrypt=s.publicEncrypt,fe.privateEncrypt=s.privateEncrypt,fe.publicDecrypt=s.publicDecrypt,fe.privateDecrypt=s.privateDecrypt;var u=Am;return fe.randomFill=u.randomFill,fe.randomFillSync=u.randomFillSync,fe.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},fe.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},fe}Om&&Om.getRandomValues?(Am.randomFill=function(e,t,n,i){if(!(Lm.isBuffer(e)||e instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)i=t,t=0,n=e.length;else if("function"==typeof n)i=n,n=e.length-t;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return Dm(t,e.length),Bm(n,t,e.length),jm(e,t,n,i)},Am.randomFillSync=function(e,t,n){if(void 0===t&&(t=0),!(Lm.isBuffer(e)||e instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return Dm(t,e.length),void 0===n&&(n=e.length-t),Bm(n,t,e.length),jm(e,t,n)}):(Am.randomFill=Tm,Am.randomFillSync=Tm);const{Buffer:Um}=de,{createHash:Fm,createHmac:Km}=zm(),qm={},Hm=e=>{switch(e){case"sha256":case"sha3-256":case"blake2s256":return 32;case"sha512":case"sha3-512":case"blake2b512":return 64;case"sha224":case"sha3-224":return 28;case"sha384":case"sha3-384":return 48;case"sha1":return 20;case"md5":return 16;default:{let t=qm[e];return void 0===t&&(t=Fm(e).digest().length,qm[e]=t),t}}},Wm=(e,t,n,r)=>{const i=Um.isBuffer(n)?n:Um.from(n),o=r&&r.length?Um.from(r):Um.alloc(t,0);return Km(e,o).update(i).digest()},$m=(e,t,n,r,i)=>{const o=Um.isBuffer(i)?i:Um.from(i||""),a=o.length,s=Math.ceil(r/t);if(s>255)throw new Error(`OKM length ${r} is too long for ${e} hash`);const u=Um.alloc(t*s+a+1);for(let r=1,i=0,l=0;r<=s;++r)o.copy(u,l),u[l+a]=r,Km(e,n).update(u.slice(i,l+a+1)).digest().copy(u,l),i=l,l+=t;return u.slice(0,r)};function Vm(e,t,{salt:n="",info:r="",hash:i="SHA-256"}={}){i=i.toLowerCase().replace("-","");const o=Hm(i),a=Wm(i,o,e,n);return $m(i,o,a,t,r)}Object.defineProperties(Vm,{hash_length:{configurable:!1,enumerable:!1,writable:!1,value:Hm},extract:{configurable:!1,enumerable:!1,writable:!1,value:Wm},expand:{configurable:!1,enumerable:!1,writable:!1,value:$m}});var Ym=Vm;const Gm="Impossible case. Please create issue.",Zm="The tweak was out of range or the resulted private key is invalid",Qm="The tweak was out of range or equal to zero",Xm="Unknow error on context randomization",Jm="Private Key is invalid",eg="Public Key could not be parsed",tg="Public Key serialization error",ng="The sum of the public keys is not valid",rg="Signature could not be parsed",ig="The nonce generation function failed, or the private key was invalid",og="Public key could not be recover",ag="Scalar was invalid (zero or overflow)";function sg(e,t){if(!e)throw new Error(t)}function ug(e,t,n){if(sg(t instanceof Uint8Array,`Expected ${e} to be an Uint8Array`),void 0!==n)if(Array.isArray(n)){const r=`Expected ${e} to be an Uint8Array with length [${n.join(", ")}]`;sg(n.includes(t.length),r)}else{const r=`Expected ${e} to be an Uint8Array with length ${n}`;sg(t.length===n,r)}}function lg(e){sg("Boolean"===dg(e),"Expected compressed to be a Boolean")}function cg(e=(e=>new Uint8Array(e)),t){return"function"==typeof e&&(e=e(t)),ug("output",e,t),e}function dg(e){return Object.prototype.toString.call(e).slice(8,-1)}var fg={},hg="6.5.4",pg={},mg={exports:{}};!function(e){!function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:de.Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function s(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function u(e,t,n,r){for(var i=0,o=Math.min(e.length,n),a=t;a<o;a++){var s=e.charCodeAt(a)-48;i*=r,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=s(e,t,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=s(e,t,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,l=0,c=n;c<s;c+=r)l=u(e,c,c+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==a){var d=1;for(l=u(e,c,e.length,t),c=0;c<a;c++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var l=1;l<r;l++){for(var c=u>>>26,d=67108863&u,f=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=f;h++){var p=l-h|0;c+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}n.words[l]=0|d,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);r=0!=(o=s>>>24-i&16777215)||a!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var f=c[e],h=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:l[f-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,l=new e(o),c=this.clone();if(u){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),l[s]=a;for(;s<o;s++)l[s]=0}else{for(s=0;s<o-i;s++)l[s]=0;for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),l[o-s-1]=a}return l},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a<r.length;a++)o=(t=(0|n.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<n.length;a++)o=(t=(0|n.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var h=function(e,t,n){var r,i,o,a=e.words,s=t.words,u=n.words,l=0,c=0|a[0],d=8191&c,f=c>>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,b=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,S=0|a[4],E=8191&S,k=S>>>13,M=0|a[5],C=8191&M,x=M>>>13,A=0|a[6],T=8191&A,R=A>>>13,P=0|a[7],L=8191&P,I=P>>>13,O=0|a[8],N=8191&O,D=O>>>13,B=0|a[9],j=8191&B,z=B>>>13,U=0|s[0],F=8191&U,K=U>>>13,q=0|s[1],H=8191&q,W=q>>>13,$=0|s[2],V=8191&$,Y=$>>>13,G=0|s[3],Z=8191&G,Q=G>>>13,X=0|s[4],J=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,le=se>>>13,ce=0|s[8],de=8191&ce,fe=ce>>>13,he=0|s[9],pe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(l+(r=Math.imul(d,F))|0)+((8191&(i=(i=Math.imul(d,K))+Math.imul(f,F)|0))<<13)|0;l=((o=Math.imul(f,K))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,K))+Math.imul(m,F)|0,o=Math.imul(m,K);var ve=(l+(r=r+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(f,H)|0))<<13)|0;l=((o=o+Math.imul(f,W)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,F),i=(i=Math.imul(v,K))+Math.imul(b,F)|0,o=Math.imul(b,K),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var be=(l+(r=r+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(f,V)|0))<<13)|0;l=((o=o+Math.imul(f,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,F),i=(i=Math.imul(w,K))+Math.imul(_,F)|0,o=Math.imul(_,K),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0,r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Y)|0;var ye=(l+(r=r+Math.imul(d,Z)|0)|0)+((8191&(i=(i=i+Math.imul(d,Q)|0)+Math.imul(f,Z)|0))<<13)|0;l=((o=o+Math.imul(f,Q)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,F),i=(i=Math.imul(E,K))+Math.imul(k,F)|0,o=Math.imul(k,K),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(v,V)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Y)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Q)|0;var we=(l+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,J)|0))<<13)|0;l=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(C,F),i=(i=Math.imul(C,K))+Math.imul(x,F)|0,o=Math.imul(x,K),r=r+Math.imul(E,H)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,W)|0,r=r+Math.imul(w,V)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,ee)|0;var _e=(l+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;l=((o=o+Math.imul(f,re)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,K))+Math.imul(R,F)|0,o=Math.imul(R,K),r=r+Math.imul(C,H)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,W)|0,r=r+Math.imul(E,V)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,Y)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Q)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var Se=(l+(r=r+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;l=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,F),i=(i=Math.imul(L,K))+Math.imul(I,F)|0,o=Math.imul(I,K),r=r+Math.imul(T,H)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,W)|0,r=r+Math.imul(C,V)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Q)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(b,ne)|0,o=o+Math.imul(b,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var Ee=(l+(r=r+Math.imul(d,ue)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(f,ue)|0))<<13)|0;l=((o=o+Math.imul(f,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(N,F),i=(i=Math.imul(N,K))+Math.imul(D,F)|0,o=Math.imul(D,K),r=r+Math.imul(L,H)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,r=r+Math.imul(T,V)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Y)|0,r=r+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(_,ne)|0,o=o+Math.imul(_,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,r=r+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0;var ke=(l+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;l=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,F),i=(i=Math.imul(j,K))+Math.imul(z,F)|0,o=Math.imul(z,K),r=r+Math.imul(N,H)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(D,H)|0,o=o+Math.imul(D,W)|0,r=r+Math.imul(L,V)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,Y)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(C,J)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(k,ne)|0,o=o+Math.imul(k,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,r=r+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,le)|0,r=r+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,fe)|0;var Me=(l+(r=r+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;l=((o=o+Math.imul(f,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,H),i=(i=Math.imul(j,W))+Math.imul(z,H)|0,o=Math.imul(z,W),r=r+Math.imul(N,V)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,Q)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,Q)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,ee)|0,r=r+Math.imul(C,ne)|0,i=(i=i+Math.imul(C,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,r=r+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,le)|0,r=r+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(b,de)|0,o=o+Math.imul(b,fe)|0;var Ce=(l+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;l=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,V),i=(i=Math.imul(j,Y))+Math.imul(z,V)|0,o=Math.imul(z,Y),r=r+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(L,J)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(R,ne)|0,o=o+Math.imul(R,re)|0,r=r+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,r=r+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,le)|0,r=r+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(_,de)|0,o=o+Math.imul(_,fe)|0;var xe=(l+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(b,pe)|0))<<13)|0;l=((o=o+Math.imul(b,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,Z),i=(i=Math.imul(j,Q))+Math.imul(z,Z)|0,o=Math.imul(z,Q),r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(D,J)|0,o=o+Math.imul(D,ee)|0,r=r+Math.imul(L,ne)|0,i=(i=i+Math.imul(L,re)|0)+Math.imul(I,ne)|0,o=o+Math.imul(I,re)|0,r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,r=r+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,le)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,le)|0,r=r+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(k,de)|0,o=o+Math.imul(k,fe)|0;var Ae=(l+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;l=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(j,J),i=(i=Math.imul(j,ee))+Math.imul(z,J)|0,o=Math.imul(z,ee),r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(D,ne)|0,o=o+Math.imul(D,re)|0,r=r+Math.imul(L,oe)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,r=r+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,le)|0,r=r+Math.imul(C,de)|0,i=(i=i+Math.imul(C,fe)|0)+Math.imul(x,de)|0,o=o+Math.imul(x,fe)|0;var Te=(l+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(k,pe)|0))<<13)|0;l=((o=o+Math.imul(k,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(z,ne)|0,o=Math.imul(z,re),r=r+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,ae)|0,r=r+Math.imul(L,ue)|0,i=(i=i+Math.imul(L,le)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,le)|0,r=r+Math.imul(T,de)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Re=(l+(r=r+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,me)|0)+Math.imul(x,pe)|0))<<13)|0;l=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(z,oe)|0,o=Math.imul(z,ae),r=r+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(D,ue)|0,o=o+Math.imul(D,le)|0,r=r+Math.imul(L,de)|0,i=(i=i+Math.imul(L,fe)|0)+Math.imul(I,de)|0,o=o+Math.imul(I,fe)|0;var Pe=(l+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(R,pe)|0))<<13)|0;l=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,ue),i=(i=Math.imul(j,le))+Math.imul(z,ue)|0,o=Math.imul(z,le),r=r+Math.imul(N,de)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul(D,de)|0,o=o+Math.imul(D,fe)|0;var Le=(l+(r=r+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,me)|0)+Math.imul(I,pe)|0))<<13)|0;l=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,r=Math.imul(j,de),i=(i=Math.imul(j,fe))+Math.imul(z,de)|0,o=Math.imul(z,fe);var Ie=(l+(r=r+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(D,pe)|0))<<13)|0;l=((o=o+Math.imul(D,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var Oe=(l+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(z,pe)|0))<<13)|0;return l=((o=Math.imul(z,me))+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,u[0]=ge,u[1]=ve,u[2]=be,u[3]=ye,u[4]=we,u[5]=_e,u[6]=Se,u[7]=Ee,u[8]=ke,u[9]=Me,u[10]=Ce,u[11]=xe,u[12]=Ae,u[13]=Te,u[14]=Re,u[15]=Pe,u[16]=Le,u[17]=Ie,u[18]=Oe,0!==l&&(u[19]=l,n.length++),n};function p(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(h=f),i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?h(this,e,t):r<63?f(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var a=i;i=0;for(var s=67108863&r,u=Math.min(o,t.length-1),l=Math.max(0,o-e.length+1);l<=u;l++){var c=o-l,d=(0|e.words[c])*(0|t.words[l]),f=67108863&d;s=67108863&(f=f+s|0),i+=(a=(a=a+(d/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):p(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},m.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},m.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a<o;a++)r[a]=t[e[a]],i[a]=n[e[a]]},m.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),l=Math.sin(2*Math.PI/s),c=0;c<i;c+=s)for(var d=u,f=l,h=0;h<a;h++){var p=n[c+h],m=r[c+h],g=n[c+h+a],v=r[c+h+a],b=d*g-f*v;v=d*v+f*g,g=b,n[c+h]=p+g,r[c+h]=m+v,n[c+h+a]=p-g,r[c+h+a]=m-v,h!==s&&(b=u*d-l*f,f=u*f+l*d,d=b)}},m.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},m.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},m.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),a=new Array(r),s=new Array(r),u=new Array(r),l=new Array(r),c=new Array(r),d=new Array(r),f=n.words;f.length=r,this.convert13b(e.words,e.length,a,r),this.convert13b(t.words,t.length,l,r),this.transform(a,o,s,u,r,i),this.transform(l,o,c,d,r,i);for(var h=0;h<r;h++){var p=s[h]*c[h]-u[h]*d[h];u[h]=s[h]*d[h]+u[h]*c[h],s[h]=p}return this.conjugate(s,u,r),this.transform(s,u,f,o,r,i),this.conjugate(f,o,r),this.normalize13b(f,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),p(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,u=(0|this.words[t])-s<<r;this.words[t]=u|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var l=0;l<a;l++)u.words[l]=this.words[l];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,l=0;l<this.length;l++)this.words[l]=this.words[l+a];else this.words[0]=0,this.length=1;var c=0;for(l=this.length-1;l>=0&&(0!==c||l>=i);l--){var d=0|this.words[l];this.words[l]=c<<26-o|d>>>o,c=d&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,o,a=e.length+r;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,a=0|o.words[o.length-1];0!=(n=26-this._countBits(a))&&(o=o.ushln(n),r.iushln(n),a=0|o.words[o.length-1]);var s,u=r.length-o.length;if("mod"!==t){(s=new i(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l<s.length;l++)s.words[l]=0}var c=r.clone()._ishlnsubmul(o,1,u);0===c.negative&&(r=c,s&&(s.words[u]=1));for(var d=u-1;d>=0;d--){var f=67108864*(0|r.words[o.length+d])+(0|r.words[o.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(o,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(o,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),u=new i(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0==(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(c),a.isub(d)),o.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(d)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s),a.isub(u)):(r.isub(t),s.isub(o),u.isub(a))}return{a:s,b:u,gcd:r.iushln(l)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var d=0,f=1;0==(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new S(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},r(b,v),b.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&n)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(y,v),r(w,v),r(_,v),_.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new y;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return g[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);n(!o.isZero());var s=new i(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var d=this.pow(c,o),f=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var v=this.pow(d,new i(1).iushln(p-g-1));f=f.redMul(v),d=v.redSqr(),h=h.redMul(d),p=g}return f},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var o=n[0],a=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),r=t.length-1;r>=0;r--){for(var l=t.words[r],c=u-1;c>=0;c--){var d=l>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==d||0!==a?(a<<=1,a|=d,(4==++s||0===r&&0===c)&&(o=this.mul(o,n[a]),s=0,a=0)):s=0}u=26}return o},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new E(e)},r(E,S),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,r)}(mg);var gg=mg.exports,vg=bg;function bg(e,t){if(!e)throw new Error(t||"Assertion failed")}bg.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var yg={};!function(e){var t=e;function n(e){return 1===e.length?"0"+e:e}function r(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16));else for(r=0;r<e.length;r++){var i=e.charCodeAt(r),o=i>>8,a=255&i;o?n.push(o,a):n.push(a)}return n},t.zero2=n,t.toHex=r,t.encode=function(e,t){return"hex"===t?r(e):e}}(yg),function(e){var t=e,n=gg,r=vg,i=yg;t.assert=r,t.toArray=i.toArray,t.zero2=i.zero2,t.toHex=i.toHex,t.encode=i.encode,t.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var i=1<<t+1,o=e.clone(),a=0;a<r.length;a++){var s,u=o.andln(i-1);o.isOdd()?(s=u>(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,r[a]=s,o.iushrn(1)}return r},t.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,l=t.andln(3)+o&3;3===u&&(u=-1),3===l&&(l=-1),a=0==(1&u)?0:3!=(r=e.andln(7)+i&7)&&5!==r||2!==l?u:-u,n[0].push(a),s=0==(1&l)?0:3!=(r=t.andln(7)+o&7)&&5!==r||2!==u?l:-l,n[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return n},t.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},t.parseBytes=function(e){return"string"==typeof e?t.toArray(e,"hex"):e},t.intFromLE=function(e){return new n(e,"hex","le")}}(pg);var wg,_g={exports:{}};function Sg(e){this.rand=e}if(_g.exports=function(e){return wg||(wg=new Sg(null)),wg.generate(e)},_g.exports.Rand=Sg,Sg.prototype.generate=function(e){return this._rand(e)},Sg.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?Sg.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?Sg.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(Sg.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var Eg=zm();if("function"!=typeof Eg.randomBytes)throw new Error("Not supported");Sg.prototype._rand=function(e){return Eg.randomBytes(e)}}catch(s){}var kg=_g.exports,Mg={},Cg=gg,xg=pg,Ag=xg.getNAF,Tg=xg.getJSF,Rg=xg.assert;function Pg(e,t){this.type=e,this.p=new Cg(t.p,16),this.red=t.prime?Cg.red(t.prime):Cg.mont(this.p),this.zero=new Cg(0).toRed(this.red),this.one=new Cg(1).toRed(this.red),this.two=new Cg(2).toRed(this.red),this.n=t.n&&new Cg(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Lg=Pg;function Ig(e,t){this.curve=e,this.type=t,this.precomputed=null}Pg.prototype.point=function(){throw new Error("Not implemented")},Pg.prototype.validate=function(){throw new Error("Not implemented")},Pg.prototype._fixedNafMul=function(e,t){Rg(e.precomputed);var n=e._getDoubles(),r=Ag(t,1,this._bitLength),i=(1<<n.step+1)-(n.step%2==0?2:1);i/=3;var o,a,s=[];for(o=0;o<r.length;o+=n.step){a=0;for(var u=o+n.step-1;u>=o;u--)a=(a<<1)+r[u];s.push(a)}for(var l=this.jpoint(null,null,null),c=this.jpoint(null,null,null),d=i;d>0;d--){for(o=0;o<s.length;o++)(a=s[o])===d?c=c.mixedAdd(n.points[o]):a===-d&&(c=c.mixedAdd(n.points[o].neg()));l=l.add(c)}return l.toP()},Pg.prototype._wnafMul=function(e,t){var n=4,r=e._getNAFPoints(n);n=r.wnd;for(var i=r.points,o=Ag(t,n,this._bitLength),a=this.jpoint(null,null,null),s=o.length-1;s>=0;s--){for(var u=0;s>=0&&0===o[s];s--)u++;if(s>=0&&u++,a=a.dblp(u),s<0)break;var l=o[s];Rg(0!==l),a="affine"===e.type?l>0?a.mixedAdd(i[l-1>>1]):a.mixedAdd(i[-l-1>>1].neg()):l>0?a.add(i[l-1>>1]):a.add(i[-l-1>>1].neg())}return"affine"===e.type?a.toP():a},Pg.prototype._wnafMulAdd=function(e,t,n,r,i){var o,a,s,u=this._wnafT1,l=this._wnafT2,c=this._wnafT3,d=0;for(o=0;o<r;o++){var f=(s=t[o])._getNAFPoints(e);u[o]=f.wnd,l[o]=f.points}for(o=r-1;o>=1;o-=2){var h=o-1,p=o;if(1===u[h]&&1===u[p]){var m=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(m[1]=t[h].add(t[p]),m[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(m[1]=t[h].toJ().mixedAdd(t[p]),m[2]=t[h].add(t[p].neg())):(m[1]=t[h].toJ().mixedAdd(t[p]),m[2]=t[h].toJ().mixedAdd(t[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=Tg(n[h],n[p]);for(d=Math.max(v[0].length,d),c[h]=new Array(d),c[p]=new Array(d),a=0;a<d;a++){var b=0|v[0][a],y=0|v[1][a];c[h][a]=g[3*(b+1)+(y+1)],c[p][a]=0,l[h]=m}}else c[h]=Ag(n[h],u[h],this._bitLength),c[p]=Ag(n[p],u[p],this._bitLength),d=Math.max(c[h].length,d),d=Math.max(c[p].length,d)}var w=this.jpoint(null,null,null),_=this._wnafT4;for(o=d;o>=0;o--){for(var S=0;o>=0;){var E=!0;for(a=0;a<r;a++)_[a]=0|c[a][o],0!==_[a]&&(E=!1);if(!E)break;S++,o--}if(o>=0&&S++,w=w.dblp(S),o<0)break;for(a=0;a<r;a++){var k=_[a];0!==k&&(k>0?s=l[a][k-1>>1]:k<0&&(s=l[a][-k-1>>1].neg()),w="affine"===s.type?w.mixedAdd(s):w.add(s))}}for(o=0;o<r;o++)l[o]=null;return i?w:w.toP()},Pg.BasePoint=Ig,Ig.prototype.eq=function(){throw new Error("Not implemented")},Ig.prototype.validate=function(){return this.curve.validate(this)},Pg.prototype.decodePoint=function(e,t){e=xg.toArray(e,t);var n=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*n)return 6===e[0]?Rg(e[e.length-1]%2==0):7===e[0]&&Rg(e[e.length-1]%2==1),this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));if((2===e[0]||3===e[0])&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),3===e[0]);throw new Error("Unknown point format")},Ig.prototype.encodeCompressed=function(e){return this.encode(e,!0)},Ig.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},Ig.prototype.encode=function(e,t){return xg.encode(this._encode(t),e)},Ig.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},Ig.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},Ig.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)r=r.dbl();n.push(r)}return{step:e,points:n}},Ig.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},Ig.prototype._getBeta=function(){return null},Ig.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t};var Og={exports:{}};"function"==typeof Object.create?Og.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Og.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}};var Ng=Og.exports,Dg=gg,Bg=Ng,jg=Lg,zg=pg.assert;function Ug(e){jg.call(this,"short",e),this.a=new Dg(e.a,16).toRed(this.red),this.b=new Dg(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Bg(Ug,jg);var Fg=Ug;function Kg(e,t,n,r){jg.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new Dg(t,16),this.y=new Dg(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function qg(e,t,n,r){jg.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Dg(0)):(this.x=new Dg(t,16),this.y=new Dg(n,16),this.z=new Dg(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Ug.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new Dg(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)n=new Dg(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?n=i[0]:(n=i[1],zg(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:n,basis:e.basis?e.basis.map((function(e){return{a:new Dg(e.a,16),b:new Dg(e.b,16)}})):this._getEndoBasis(n)}}},Ug.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:Dg.mont(e),n=new Dg(2).toRed(t).redInvm(),r=n.redNeg(),i=new Dg(3).toRed(t).redNeg().redSqrt().redMul(n);return[r.redAdd(i).fromRed(),r.redSub(i).fromRed()]},Ug.prototype._getEndoBasis=function(e){for(var t,n,r,i,o,a,s,u,l,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,f=this.n.clone(),h=new Dg(1),p=new Dg(0),m=new Dg(0),g=new Dg(1),v=0;0!==d.cmpn(0);){var b=f.div(d);u=f.sub(b.mul(d)),l=m.sub(b.mul(h));var y=g.sub(b.mul(p));if(!r&&u.cmp(c)<0)t=s.neg(),n=h,r=u.neg(),i=l;else if(r&&2==++v)break;s=u,f=d,d=u,m=h,h=l,g=p,p=y}o=u.neg(),a=l;var w=r.sqr().add(i.sqr());return o.sqr().add(a.sqr()).cmp(w)>=0&&(o=t,a=n),r.negative&&(r=r.neg(),i=i.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:r,b:i},{a:o,b:a}]},Ug.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=i.mul(n.a),s=o.mul(r.a),u=i.mul(n.b),l=o.mul(r.b);return{k1:e.sub(a).sub(s),k2:u.add(l).neg()}},Ug.prototype.pointFromX=function(e,t){(e=new Dg(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var i=r.fromRed().isOdd();return(t&&!i||!t&&i)&&(r=r.redNeg()),this.point(e,r)},Ug.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},Ug.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),s=e[o],u=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),r[2*o]=s,r[2*o+1]=u,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var l=this._wnafMulAdd(1,r,i,2*o,n),c=0;c<2*o;c++)r[c]=null,i[c]=null;return l},Bg(Kg,jg.BasePoint),Ug.prototype.point=function(e,t,n){return new Kg(this,e,t,n)},Ug.prototype.pointFromJSON=function(e,t){return Kg.fromJSON(this,e,t)},Kg.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},Kg.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Kg.fromJSON=function(e,t,n){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function i(t){return e.point(t[0],t[1],n)}var o=t[2];return r.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[r].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[r].concat(o.naf.points.map(i))}},r},Kg.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Kg.prototype.isInfinity=function(){return this.inf},Kg.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},Kg.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},Kg.prototype.getX=function(){return this.x.fromRed()},Kg.prototype.getY=function(){return this.y.fromRed()},Kg.prototype.mul=function(e){return e=new Dg(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},Kg.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},Kg.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},Kg.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},Kg.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},Kg.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},Bg(qg,jg.BasePoint),Ug.prototype.jpoint=function(e,t,n){return new qg(this,e,t,n)},qg.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},qg.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},qg.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),s=r.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),c=l.redMul(s),d=r.redMul(l),f=u.redSqr().redIAdd(c).redISub(d).redISub(d),h=u.redMul(d.redISub(f)).redISub(o.redMul(c)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,h,p)},qg.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=n.redSub(r),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),l=u.redMul(a),c=n.redMul(u),d=s.redSqr().redIAdd(l).redISub(c).redISub(c),f=s.redMul(c.redISub(d)).redISub(i.redMul(l)),h=this.z.redMul(a);return this.curve.jpoint(d,f,h)},qg.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t<e;t++)n=n.dbl();return n}var r=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,u=s.redSqr().redSqr(),l=a.redAdd(a);for(t=0;t<e;t++){var c=o.redSqr(),d=l.redSqr(),f=d.redSqr(),h=c.redAdd(c).redIAdd(c).redIAdd(r.redMul(u)),p=o.redMul(d),m=h.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),v=h.redMul(g);v=v.redIAdd(v).redISub(f);var b=l.redMul(s);t+1<e&&(u=u.redMul(f)),o=m,s=b,l=v}return this.curve.jpoint(o,l.redMul(i),s)},qg.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},qg.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(r).redISub(o);a=a.redIAdd(a);var s=r.redAdd(r).redIAdd(r),u=s.redSqr().redISub(a).redISub(a),l=o.redIAdd(o);l=(l=l.redIAdd(l)).redIAdd(l),e=u,t=s.redMul(a.redISub(u)).redISub(l),n=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),d=this.y.redSqr(),f=d.redSqr(),h=this.x.redAdd(d).redSqr().redISub(c).redISub(f);h=h.redIAdd(h);var p=c.redAdd(c).redIAdd(c),m=p.redSqr(),g=f.redIAdd(f);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(g),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,t,n)},qg.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(r).redISub(o);a=a.redIAdd(a);var s=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),u=s.redSqr().redISub(a).redISub(a);e=u;var l=o.redIAdd(o);l=(l=l.redIAdd(l)).redIAdd(l),t=s.redMul(a.redISub(u)).redISub(l),n=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),d=this.y.redSqr(),f=this.x.redMul(d),h=this.x.redSub(c).redMul(this.x.redAdd(c));h=h.redAdd(h).redIAdd(h);var p=f.redIAdd(f),m=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(d).redISub(c);var g=d.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=h.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,n)},qg.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),o=t.redSqr(),a=n.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),u=t.redAdd(t),l=(u=u.redIAdd(u)).redMul(a),c=s.redSqr().redISub(l.redAdd(l)),d=l.redISub(c),f=a.redSqr();f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var h=s.redMul(d).redISub(f),p=n.redAdd(n).redMul(r);return this.curve.jpoint(c,h,p)},qg.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(r),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),u=r.redIAdd(r);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var l=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(u),c=t.redMul(l);c=(c=c.redIAdd(c)).redIAdd(c);var d=this.x.redMul(s).redISub(c);d=(d=d.redIAdd(d)).redIAdd(d);var f=this.y.redMul(l.redMul(u.redISub(l)).redISub(a.redMul(s)));f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var h=this.z.redAdd(a).redSqr().redISub(n).redISub(s);return this.curve.jpoint(d,f,h)},qg.prototype.mul=function(e,t){return e=new Dg(e,t),this.curve._wnafMul(this,e)},qg.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(0!==this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),i=n.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)},qg.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},qg.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},qg.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Hg=gg,Wg=Ng,$g=Lg,Vg=pg;function Yg(e){$g.call(this,"mont",e),this.a=new Hg(e.a,16).toRed(this.red),this.b=new Hg(e.b,16).toRed(this.red),this.i4=new Hg(4).toRed(this.red).redInvm(),this.two=new Hg(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Wg(Yg,$g);var Gg=Yg;function Zg(e,t,n){$g.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Hg(t,16),this.z=new Hg(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}Yg.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},Wg(Zg,$g.BasePoint),Yg.prototype.decodePoint=function(e,t){return this.point(Vg.toArray(e,t),1)},Yg.prototype.point=function(e,t){return new Zg(this,e,t)},Yg.prototype.pointFromJSON=function(e){return Zg.fromJSON(this,e)},Zg.prototype.precompute=function(){},Zg.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},Zg.fromJSON=function(e,t){return new Zg(e,t[0],t[1]||e.one)},Zg.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},Zg.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},Zg.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),r=e.redMul(t),i=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},Zg.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},Zg.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(n),a=i.redMul(r),s=t.z.redMul(o.redAdd(a).redSqr()),u=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},Zg.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},Zg.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},Zg.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},Zg.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},Zg.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},Zg.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var Qg=gg,Xg=Ng,Jg=Lg,ev=pg.assert;function tv(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,Jg.call(this,"edwards",e),this.a=new Qg(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Qg(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Qg(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),ev(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}Xg(tv,Jg);var nv=tv;function rv(e,t,n,r,i){Jg.BasePoint.call(this,e,"projective"),null===t&&null===n&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new Qg(t,16),this.y=new Qg(n,16),this.z=r?new Qg(r,16):this.curve.one,this.t=i&&new Qg(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}tv.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},tv.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},tv.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},tv.prototype.pointFromX=function(e,t){(e=new Qg(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=this.c2.redSub(this.a.redMul(n)),i=this.one.redSub(this.c2.redMul(this.d).redMul(n)),o=r.redMul(i.redInvm()),a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var s=a.fromRed().isOdd();return(t&&!s||!t&&s)&&(a=a.redNeg()),this.point(e,a)},tv.prototype.pointFromY=function(e,t){(e=new Qg(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=n.redSub(this.c2),i=n.redMul(this.d).redMul(this.c2).redSub(this.a),o=r.redMul(i.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},tv.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===r.cmp(i)},Xg(rv,Jg.BasePoint),tv.prototype.pointFromJSON=function(e){return rv.fromJSON(this,e)},tv.prototype.point=function(e,t,n,r){return new rv(this,e,t,n,r)},rv.fromJSON=function(e,t){return new rv(e,t[0],t[1],t[2])},rv.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},rv.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},rv.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=r.redAdd(t),a=o.redSub(n),s=r.redSub(t),u=i.redMul(a),l=o.redMul(s),c=i.redMul(s),d=a.redMul(o);return this.curve.point(u,l,d,c)},rv.prototype._projDbl=function(){var e,t,n,r,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var l=(r=this.curve._mulA(s)).redAdd(u);this.zOne?(e=a.redSub(s).redSub(u).redMul(l.redSub(this.curve.two)),t=l.redMul(r.redSub(u)),n=l.redSqr().redSub(l).redSub(l)):(i=this.z.redSqr(),o=l.redSub(i).redISub(i),e=a.redSub(s).redISub(u).redMul(o),t=l.redMul(r.redSub(u)),n=l.redMul(o))}else r=s.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=r.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(r)).redMul(o),t=this.curve._mulC(r).redMul(s.redISub(u)),n=r.redMul(o);return this.curve.point(e,t,n)},rv.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},rv.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=n.redSub(t),a=i.redSub(r),s=i.redAdd(r),u=n.redAdd(t),l=o.redMul(a),c=s.redMul(u),d=o.redMul(u),f=a.redMul(s);return this.curve.point(l,c,f,d)},rv.prototype._projAdd=function(e){var t,n,r=this.z.redMul(e.z),i=r.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),l=i.redAdd(s),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=r.redMul(u).redMul(c);return this.curve.twisted?(t=r.redMul(l).redMul(a.redSub(this.curve._mulA(o))),n=u.redMul(l)):(t=r.redMul(l).redMul(a.redSub(o)),n=this.curve._mulC(u).redMul(l)),this.curve.point(d,t,n)},rv.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},rv.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},rv.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},rv.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},rv.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},rv.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},rv.prototype.getX=function(){return this.normalize(),this.x.fromRed()},rv.prototype.getY=function(){return this.normalize(),this.y.fromRed()},rv.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},rv.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},rv.prototype.toP=rv.prototype.normalize,rv.prototype.mixedAdd=rv.prototype.add,function(e){var t=e;t.base=Lg,t.short=Fg,t.mont=Gg,t.edwards=nv}(Mg);var iv={},ov={},av={},sv=vg,uv=Ng;function lv(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function cv(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function dv(e){return 1===e.length?"0"+e:e}function fv(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}av.inherits=uv,av.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var r=0,i=0;i<e.length;i++){var o=e.charCodeAt(i);o<128?n[r++]=o:o<2048?(n[r++]=o>>6|192,n[r++]=63&o|128):lv(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),n[r++]=o>>18|240,n[r++]=o>>12&63|128,n[r++]=o>>6&63|128,n[r++]=63&o|128):(n[r++]=o>>12|224,n[r++]=o>>6&63|128,n[r++]=63&o|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},av.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=dv(e[n].toString(16));return t},av.htonl=cv,av.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=cv(i)),n+=fv(i.toString(16))}return n},av.zero2=dv,av.zero8=fv,av.join32=function(e,t,n,r){var i=n-t;sv(i%4==0);for(var o=new Array(i/4),a=0,s=t;a<o.length;a++,s+=4){var u;u="big"===r?e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s],o[a]=u>>>0}return o},av.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var o=e[r];"big"===t?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},av.rotr32=function(e,t){return e>>>t|e<<32-t},av.rotl32=function(e,t){return e<<t|e>>>32-t},av.sum32=function(e,t){return e+t>>>0},av.sum32_3=function(e,t,n){return e+t+n>>>0},av.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},av.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},av.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0,a=(o<r?1:0)+n+i;e[t]=a>>>0,e[t+1]=o},av.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},av.sum64_lo=function(e,t,n,r){return t+r>>>0},av.sum64_4_hi=function(e,t,n,r,i,o,a,s){var u=0,l=t;return u+=(l=l+r>>>0)<t?1:0,u+=(l=l+o>>>0)<o?1:0,e+n+i+a+(u+=(l=l+s>>>0)<s?1:0)>>>0},av.sum64_4_lo=function(e,t,n,r,i,o,a,s){return t+r+o+s>>>0},av.sum64_5_hi=function(e,t,n,r,i,o,a,s,u,l){var c=0,d=t;return c+=(d=d+r>>>0)<t?1:0,c+=(d=d+o>>>0)<o?1:0,c+=(d=d+s>>>0)<s?1:0,e+n+i+a+u+(c+=(d=d+l>>>0)<l?1:0)>>>0},av.sum64_5_lo=function(e,t,n,r,i,o,a,s,u,l){return t+r+o+s+l>>>0},av.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},av.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},av.shr64_hi=function(e,t,n){return e>>>n},av.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0};var hv={},pv=av,mv=vg;function gv(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}hv.BlockHash=gv,gv.prototype.update=function(e,t){if(e=pv.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=pv.join32(e,0,e.length-n,this.endian);for(var r=0;r<e.length;r+=this._delta32)this._update(e,r,r+this._delta32)}return this},gv.prototype.digest=function(e){return this.update(this._pad()),mv(null===this.pending),this._digest(e)},gv.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r};var vv={},bv={},yv=av.rotr32;function wv(e,t,n){return e&t^~e&n}function _v(e,t,n){return e&t^e&n^t&n}function Sv(e,t,n){return e^t^n}bv.ft_1=function(e,t,n,r){return 0===e?wv(t,n,r):1===e||3===e?Sv(t,n,r):2===e?_v(t,n,r):void 0},bv.ch32=wv,bv.maj32=_v,bv.p32=Sv,bv.s0_256=function(e){return yv(e,2)^yv(e,13)^yv(e,22)},bv.s1_256=function(e){return yv(e,6)^yv(e,11)^yv(e,25)},bv.g0_256=function(e){return yv(e,7)^yv(e,18)^e>>>3},bv.g1_256=function(e){return yv(e,17)^yv(e,19)^e>>>10};var Ev=av,kv=hv,Mv=bv,Cv=Ev.rotl32,xv=Ev.sum32,Av=Ev.sum32_5,Tv=Mv.ft_1,Rv=kv.BlockHash,Pv=[1518500249,1859775393,2400959708,3395469782];function Lv(){if(!(this instanceof Lv))return new Lv;Rv.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Ev.inherits(Lv,Rv);var Iv=Lv;Lv.blockSize=512,Lv.outSize=160,Lv.hmacStrength=80,Lv.padLength=64,Lv.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=Cv(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4];for(r=0;r<n.length;r++){var l=~~(r/20),c=Av(Cv(i,5),Tv(l,o,a,s),u,n[r],Pv[l]);u=s,s=a,a=Cv(o,30),o=i,i=c}this.h[0]=xv(this.h[0],i),this.h[1]=xv(this.h[1],o),this.h[2]=xv(this.h[2],a),this.h[3]=xv(this.h[3],s),this.h[4]=xv(this.h[4],u)},Lv.prototype._digest=function(e){return"hex"===e?Ev.toHex32(this.h,"big"):Ev.split32(this.h,"big")};var Ov=av,Nv=hv,Dv=bv,Bv=vg,jv=Ov.sum32,zv=Ov.sum32_4,Uv=Ov.sum32_5,Fv=Dv.ch32,Kv=Dv.maj32,qv=Dv.s0_256,Hv=Dv.s1_256,Wv=Dv.g0_256,$v=Dv.g1_256,Vv=Nv.BlockHash,Yv=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Gv(){if(!(this instanceof Gv))return new Gv;Vv.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Yv,this.W=new Array(64)}Ov.inherits(Gv,Vv);var Zv=Gv;Gv.blockSize=512,Gv.outSize=256,Gv.hmacStrength=192,Gv.padLength=64,Gv.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=zv($v(n[r-2]),n[r-7],Wv(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4],l=this.h[5],c=this.h[6],d=this.h[7];for(Bv(this.k.length===n.length),r=0;r<n.length;r++){var f=Uv(d,Hv(u),Fv(u,l,c),this.k[r],n[r]),h=jv(qv(i),Kv(i,o,a));d=c,c=l,l=u,u=jv(s,f),s=a,a=o,o=i,i=jv(f,h)}this.h[0]=jv(this.h[0],i),this.h[1]=jv(this.h[1],o),this.h[2]=jv(this.h[2],a),this.h[3]=jv(this.h[3],s),this.h[4]=jv(this.h[4],u),this.h[5]=jv(this.h[5],l),this.h[6]=jv(this.h[6],c),this.h[7]=jv(this.h[7],d)},Gv.prototype._digest=function(e){return"hex"===e?Ov.toHex32(this.h,"big"):Ov.split32(this.h,"big")};var Qv=av,Xv=Zv;function Jv(){if(!(this instanceof Jv))return new Jv;Xv.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Qv.inherits(Jv,Xv);var eb=Jv;Jv.blockSize=512,Jv.outSize=224,Jv.hmacStrength=192,Jv.padLength=64,Jv.prototype._digest=function(e){return"hex"===e?Qv.toHex32(this.h.slice(0,7),"big"):Qv.split32(this.h.slice(0,7),"big")};var tb=av,nb=hv,rb=vg,ib=tb.rotr64_hi,ob=tb.rotr64_lo,ab=tb.shr64_hi,sb=tb.shr64_lo,ub=tb.sum64,lb=tb.sum64_hi,cb=tb.sum64_lo,db=tb.sum64_4_hi,fb=tb.sum64_4_lo,hb=tb.sum64_5_hi,pb=tb.sum64_5_lo,mb=nb.BlockHash,gb=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function vb(){if(!(this instanceof vb))return new vb;mb.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=gb,this.W=new Array(160)}tb.inherits(vb,mb);var bb=vb;function yb(e,t,n,r,i){var o=e&n^~e&i;return o<0&&(o+=4294967296),o}function wb(e,t,n,r,i,o){var a=t&r^~t&o;return a<0&&(a+=4294967296),a}function _b(e,t,n,r,i){var o=e&n^e&i^n&i;return o<0&&(o+=4294967296),o}function Sb(e,t,n,r,i,o){var a=t&r^t&o^r&o;return a<0&&(a+=4294967296),a}function Eb(e,t){var n=ib(e,t,28)^ib(t,e,2)^ib(t,e,7);return n<0&&(n+=4294967296),n}function kb(e,t){var n=ob(e,t,28)^ob(t,e,2)^ob(t,e,7);return n<0&&(n+=4294967296),n}function Mb(e,t){var n=ib(e,t,14)^ib(e,t,18)^ib(t,e,9);return n<0&&(n+=4294967296),n}function Cb(e,t){var n=ob(e,t,14)^ob(e,t,18)^ob(t,e,9);return n<0&&(n+=4294967296),n}function xb(e,t){var n=ib(e,t,1)^ib(e,t,8)^ab(e,t,7);return n<0&&(n+=4294967296),n}function Ab(e,t){var n=ob(e,t,1)^ob(e,t,8)^sb(e,t,7);return n<0&&(n+=4294967296),n}function Tb(e,t){var n=ib(e,t,19)^ib(t,e,29)^ab(e,t,6);return n<0&&(n+=4294967296),n}function Rb(e,t){var n=ob(e,t,19)^ob(t,e,29)^sb(e,t,6);return n<0&&(n+=4294967296),n}vb.blockSize=1024,vb.outSize=512,vb.hmacStrength=192,vb.padLength=128,vb.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var i=Tb(n[r-4],n[r-3]),o=Rb(n[r-4],n[r-3]),a=n[r-14],s=n[r-13],u=xb(n[r-30],n[r-29]),l=Ab(n[r-30],n[r-29]),c=n[r-32],d=n[r-31];n[r]=db(i,o,a,s,u,l,c,d),n[r+1]=fb(i,o,a,s,u,l,c,d)}},vb.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],i=this.h[1],o=this.h[2],a=this.h[3],s=this.h[4],u=this.h[5],l=this.h[6],c=this.h[7],d=this.h[8],f=this.h[9],h=this.h[10],p=this.h[11],m=this.h[12],g=this.h[13],v=this.h[14],b=this.h[15];rb(this.k.length===n.length);for(var y=0;y<n.length;y+=2){var w=v,_=b,S=Mb(d,f),E=Cb(d,f),k=yb(d,f,h,p,m),M=wb(d,f,h,p,m,g),C=this.k[y],x=this.k[y+1],A=n[y],T=n[y+1],R=hb(w,_,S,E,k,M,C,x,A,T),P=pb(w,_,S,E,k,M,C,x,A,T);w=Eb(r,i),_=kb(r,i),S=_b(r,i,o,a,s),E=Sb(r,i,o,a,s,u);var L=lb(w,_,S,E),I=cb(w,_,S,E);v=m,b=g,m=h,g=p,h=d,p=f,d=lb(l,c,R,P),f=cb(c,c,R,P),l=s,c=u,s=o,u=a,o=r,a=i,r=lb(R,P,L,I),i=cb(R,P,L,I)}ub(this.h,0,r,i),ub(this.h,2,o,a),ub(this.h,4,s,u),ub(this.h,6,l,c),ub(this.h,8,d,f),ub(this.h,10,h,p),ub(this.h,12,m,g),ub(this.h,14,v,b)},vb.prototype._digest=function(e){return"hex"===e?tb.toHex32(this.h,"big"):tb.split32(this.h,"big")};var Pb=av,Lb=bb;function Ib(){if(!(this instanceof Ib))return new Ib;Lb.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Pb.inherits(Ib,Lb);var Ob=Ib;Ib.blockSize=1024,Ib.outSize=384,Ib.hmacStrength=192,Ib.padLength=128,Ib.prototype._digest=function(e){return"hex"===e?Pb.toHex32(this.h.slice(0,12),"big"):Pb.split32(this.h.slice(0,12),"big")},vv.sha1=Iv,vv.sha224=eb,vv.sha256=Zv,vv.sha384=Ob,vv.sha512=bb;var Nb={},Db=av,Bb=hv,jb=Db.rotl32,zb=Db.sum32,Ub=Db.sum32_3,Fb=Db.sum32_4,Kb=Bb.BlockHash;function qb(){if(!(this instanceof qb))return new qb;Kb.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function Hb(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function Wb(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function $b(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}Db.inherits(qb,Kb),Nb.ripemd160=qb,qb.blockSize=512,qb.outSize=160,qb.hmacStrength=192,qb.padLength=64,qb.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],i=this.h[2],o=this.h[3],a=this.h[4],s=n,u=r,l=i,c=o,d=a,f=0;f<80;f++){var h=zb(jb(Fb(n,Hb(f,r,i,o),e[Vb[f]+t],Wb(f)),Gb[f]),a);n=a,a=o,o=jb(i,10),i=r,r=h,h=zb(jb(Fb(s,Hb(79-f,u,l,c),e[Yb[f]+t],$b(f)),Zb[f]),d),s=d,d=c,c=jb(l,10),l=u,u=h}h=Ub(this.h[1],i,c),this.h[1]=Ub(this.h[2],o,d),this.h[2]=Ub(this.h[3],a,s),this.h[3]=Ub(this.h[4],n,u),this.h[4]=Ub(this.h[0],r,l),this.h[0]=h},qb.prototype._digest=function(e){return"hex"===e?Db.toHex32(this.h,"little"):Db.split32(this.h,"little")};var Vb=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Yb=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Gb=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Zb=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],Qb=av,Xb=vg;function Jb(e,t,n){if(!(this instanceof Jb))return new Jb(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(Qb.toArray(t,n))}var ey,ty,ny=Jb;Jb.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),Xb(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},Jb.prototype.update=function(e,t){return this.inner.update(e,t),this},Jb.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},function(e){var t=e;t.utils=av,t.common=hv,t.sha=vv,t.ripemd=Nb,t.hmac=ny,t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160}(ov),function(e){var t,n=e,r=ov,i=Mg,o=pg.assert;function a(e){"short"===e.type?this.curve=new i.short(e):"edwards"===e.type?this.curve=new i.edwards(e):this.curve=new i.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new a(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=a,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{t=ty?ey:(ty=1,ey={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}catch(e){t=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",t]})}(iv);var ry=ov,iy=yg,oy=vg;function ay(e){if(!(this instanceof ay))return new ay(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=iy.toArray(e.entropy,e.entropyEnc||"hex"),n=iy.toArray(e.nonce,e.nonceEnc||"hex"),r=iy.toArray(e.pers,e.persEnc||"hex");oy(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}var sy=ay;ay.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},ay.prototype._hmac=function(){return new ry.hmac(this.hash,this.K)},ay.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},ay.prototype.reseed=function(e,t,n,r){"string"!=typeof t&&(r=n,n=t,t=null),e=iy.toArray(e,t),n=iy.toArray(n,r),oy(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},ay.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=n,n=t,t=null),n&&(n=iy.toArray(n,r||"hex"),this._update(n));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var o=i.slice(0,e);return this._update(n),this._reseed++,iy.encode(o,t)};var uy=gg,ly=pg.assert;function cy(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var dy=cy;cy.fromPublic=function(e,t,n){return t instanceof cy?t:new cy(e,{pub:t,pubEnc:n})},cy.fromPrivate=function(e,t,n){return t instanceof cy?t:new cy(e,{priv:t,privEnc:n})},cy.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},cy.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},cy.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},cy.prototype._importPrivate=function(e,t){this.priv=new uy(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},cy.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?ly(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||ly(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},cy.prototype.derive=function(e){return e.validate()||ly(e.validate(),"public point not validated"),e.mul(this.priv).getX()},cy.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},cy.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},cy.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var fy=gg,hy=pg,py=hy.assert;function my(e,t){if(e instanceof my)return e;this._importDER(e,t)||(py(e.r&&e.s,"Signature without r or s"),this.r=new fy(e.r,16),this.s=new fy(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var gy=my;function vy(){this.place=0}function by(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var i=0,o=0,a=t.place;o<r;o++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function yy(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function wy(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}my.prototype._importDER=function(e,t){e=hy.toArray(e,t);var n=new vy;if(48!==e[n.place++])return!1;var r=by(e,n);if(!1===r)return!1;if(r+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var i=by(e,n);if(!1===i)return!1;var o=e.slice(n.place,i+n.place);if(n.place+=i,2!==e[n.place++])return!1;var a=by(e,n);if(!1===a)return!1;if(e.length!==a+n.place)return!1;var s=e.slice(n.place,a+n.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new fy(o),this.s=new fy(s),this.recoveryParam=null,!0},my.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=yy(t),n=yy(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];wy(r,t.length),(r=r.concat(t)).push(2),wy(r,n.length);var i=r.concat(n),o=[48];return wy(o,i.length),o=o.concat(i),hy.encode(o,e)};var _y=gg,Sy=sy,Ey=iv,ky=kg,My=pg.assert,Cy=dy,xy=gy;function Ay(e){if(!(this instanceof Ay))return new Ay(e);"string"==typeof e&&(My(Object.prototype.hasOwnProperty.call(Ey,e),"Unknown curve "+e),e=Ey[e]),e instanceof Ey.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var Ty=Ay;Ay.prototype.keyPair=function(e){return new Cy(this,e)},Ay.prototype.keyFromPrivate=function(e,t){return Cy.fromPrivate(this,e,t)},Ay.prototype.keyFromPublic=function(e,t){return Cy.fromPublic(this,e,t)},Ay.prototype.genKeyPair=function(e){e||(e={});for(var t=new Sy({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||ky(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new _y(2));;){var i=new _y(t.generate(n));if(!(i.cmp(r)>0))return i.iaddn(1),this.keyFromPrivate(i)}},Ay.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},Ay.prototype.sign=function(e,t,n,r){"object"==typeof n&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new _y(e,16));for(var i=this.n.byteLength(),o=t.getPrivate().toArray("be",i),a=e.toArray("be",i),s=new Sy({hash:this.hash,entropy:o,nonce:a,pers:r.pers,persEnc:r.persEnc||"utf8"}),u=this.n.sub(new _y(1)),l=0;;l++){var c=r.k?r.k(l):new _y(s.generate(this.n.byteLength()));if(!((c=this._truncateToN(c,!0)).cmpn(1)<=0||c.cmp(u)>=0)){var d=this.g.mul(c);if(!d.isInfinity()){var f=d.getX(),h=f.umod(this.n);if(0!==h.cmpn(0)){var p=c.invm(this.n).mul(h.mul(t.getPrivate()).iadd(e));if(0!==(p=p.umod(this.n)).cmpn(0)){var m=(d.getY().isOdd()?1:0)|(0!==f.cmp(h)?2:0);return r.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),m^=1),new xy({r:h,s:p,recoveryParam:m})}}}}}},Ay.prototype.verify=function(e,t,n,r){e=this._truncateToN(new _y(e,16)),n=this.keyFromPublic(n,r);var i=(t=new xy(t,"hex")).r,o=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a,s=o.invm(this.n),u=s.mul(e).umod(this.n),l=s.mul(i).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(u,n.getPublic(),l)).isInfinity()&&a.eqXToP(i):!(a=this.g.mulAdd(u,n.getPublic(),l)).isInfinity()&&0===a.getX().umod(this.n).cmp(i)},Ay.prototype.recoverPubKey=function(e,t,n,r){My((3&n)===n,"The recovery param is more than two bits"),t=new xy(t,r);var i=this.n,o=new _y(e),a=t.r,s=t.s,u=1&n,l=n>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");a=l?this.curve.pointFromX(a.add(this.curve.n),u):this.curve.pointFromX(a,u);var c=t.r.invm(i),d=i.sub(o).mul(c).umod(i),f=s.mul(c).umod(i);return this.g.mulAdd(d,a,f)},Ay.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new xy(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(n))return i}throw new Error("Unable to find valid recovery factor")};var Ry=pg,Py=Ry.assert,Ly=Ry.parseBytes,Iy=Ry.cachedProperty;function Oy(e,t){this.eddsa=e,this._secret=Ly(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=Ly(t.pub)}Oy.fromPublic=function(e,t){return t instanceof Oy?t:new Oy(e,{pub:t})},Oy.fromSecret=function(e,t){return t instanceof Oy?t:new Oy(e,{secret:t})},Oy.prototype.secret=function(){return this._secret},Iy(Oy,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),Iy(Oy,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),Iy(Oy,"privBytes",(function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r})),Iy(Oy,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),Iy(Oy,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),Iy(Oy,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),Oy.prototype.sign=function(e){return Py(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},Oy.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},Oy.prototype.getSecret=function(e){return Py(this._secret,"KeyPair is public only"),Ry.encode(this.secret(),e)},Oy.prototype.getPublic=function(e){return Ry.encode(this.pubBytes(),e)};var Ny=Oy,Dy=gg,By=pg,jy=By.assert,zy=By.cachedProperty,Uy=By.parseBytes;function Fy(e,t){this.eddsa=e,"object"!=typeof t&&(t=Uy(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),jy(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof Dy&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}zy(Fy,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),zy(Fy,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),zy(Fy,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),zy(Fy,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),Fy.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Fy.prototype.toHex=function(){return By.encode(this.toBytes(),"hex").toUpperCase()};var Ky=Fy,qy=ov,Hy=iv,Wy=pg,$y=Wy.assert,Vy=Wy.parseBytes,Yy=Ny,Gy=Ky;function Zy(e){if($y("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof Zy))return new Zy(e);e=Hy[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=qy.sha512}var Qy=Zy;Zy.prototype.sign=function(e,t){e=Vy(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),i=this.g.mul(r),o=this.encodePoint(i),a=this.hashInt(o,n.pubBytes(),e).mul(n.priv()),s=r.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:o})},Zy.prototype.verify=function(e,t,n){e=Vy(e),t=this.makeSignature(t);var r=this.keyFromPublic(n),i=this.hashInt(t.Rencoded(),r.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(r.pub().mul(i)).eq(o)},Zy.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return Wy.intFromLE(e.digest()).umod(this.curve.n)},Zy.prototype.keyFromPublic=function(e){return Yy.fromPublic(this,e)},Zy.prototype.keyFromSecret=function(e){return Yy.fromSecret(this,e)},Zy.prototype.makeSignature=function(e){return e instanceof Gy?e:new Gy(this,e)},Zy.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},Zy.prototype.decodePoint=function(e){var t=(e=Wy.parseBytes(e)).length-1,n=e.slice(0,t).concat(-129&e[t]),r=0!=(128&e[t]),i=Wy.intFromLE(n);return this.curve.pointFromY(i,r)},Zy.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},Zy.prototype.decodeInt=function(e){return Wy.intFromLE(e)},Zy.prototype.isPoint=function(e){return e instanceof this.pointClass},function(e){var t=e;t.version=hg,t.utils=pg,t.rand=kg,t.curve=Mg,t.curves=iv,t.ec=Ty,t.eddsa=Qy}(fg);const Xy=new fg.ec("secp256k1"),Jy=Xy.curve,ew=Jy.n.constructor;function tw(e){const t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){let n=new ew(t);if(n.cmp(Jy.p)>=0)return null;n=n.toRed(Jy.red);let r=n.redSqr().redIMul(n).redIAdd(Jy.b).redSqrt();return 3===e!==r.isOdd()&&(r=r.redNeg()),Xy.keyPair({pub:{x:n,y:r}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,n){let r=new ew(t),i=new ew(n);if(r.cmp(Jy.p)>=0||i.cmp(Jy.p)>=0)return null;if(r=r.toRed(Jy.red),i=i.toRed(Jy.red),(6===e||7===e)&&i.isOdd()!==(7===e))return null;const o=r.redSqr().redIMul(r);return i.redSqr().redISub(o.redIAdd(Jy.b)).isZero()?Xy.keyPair({pub:{x:r,y:i}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function nw(e,t){const n=t.encode(null,33===e.length);for(let t=0;t<e.length;++t)e[t]=n[t]}var rw={contextRandomize:()=>0,privateKeyVerify(e){const t=new ew(e);return t.cmp(Jy.n)<0&&!t.isZero()?0:1},privateKeyNegate(e){const t=new ew(e),n=Jy.n.sub(t).umod(Jy.n).toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakAdd(e,t){const n=new ew(t);if(n.cmp(Jy.n)>=0)return 1;if(n.iadd(new ew(e)),n.cmp(Jy.n)>=0&&n.isub(Jy.n),n.isZero())return 1;const r=n.toArrayLike(Uint8Array,"be",32);return e.set(r),0},privateKeyTweakMul(e,t){let n=new ew(t);if(n.cmp(Jy.n)>=0||n.isZero())return 1;n.imul(new ew(e)),n.cmp(Jy.n)>=0&&(n=n.umod(Jy.n));const r=n.toArrayLike(Uint8Array,"be",32);return e.set(r),0},publicKeyVerify:e=>null===tw(e)?1:0,publicKeyCreate(e,t){const n=new ew(t);return n.cmp(Jy.n)>=0||n.isZero()?1:(nw(e,Xy.keyFromPrivate(t).getPublic()),0)},publicKeyConvert(e,t){const n=tw(t);return null===n?1:(nw(e,n.getPublic()),0)},publicKeyNegate(e,t){const n=tw(t);if(null===n)return 1;const r=n.getPublic();return r.y=r.y.redNeg(),nw(e,r),0},publicKeyCombine(e,t){const n=new Array(t.length);for(let e=0;e<t.length;++e)if(n[e]=tw(t[e]),null===n[e])return 1;let r=n[0].getPublic();for(let e=1;e<n.length;++e)r=r.add(n[e].pub);return r.isInfinity()?2:(nw(e,r),0)},publicKeyTweakAdd(e,t,n){const r=tw(t);if(null===r)return 1;if((n=new ew(n)).cmp(Jy.n)>=0)return 2;const i=r.getPublic().add(Jy.g.mul(n));return i.isInfinity()?2:(nw(e,i),0)},publicKeyTweakMul(e,t,n){const r=tw(t);return null===r?1:(n=new ew(n)).cmp(Jy.n)>=0||n.isZero()?2:(nw(e,r.getPublic().mul(n)),0)},signatureNormalize(e){const t=new ew(e.subarray(0,32)),n=new ew(e.subarray(32,64));return t.cmp(Jy.n)>=0||n.cmp(Jy.n)>=0?1:(1===n.cmp(Xy.nh)&&e.set(Jy.n.sub(n).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(e,t){const n=t.subarray(0,32),r=t.subarray(32,64);if(new ew(n).cmp(Jy.n)>=0)return 1;if(new ew(r).cmp(Jy.n)>=0)return 1;const{output:i}=e;let o=i.subarray(4,37);o[0]=0,o.set(n,1);let a=33,s=0;for(;a>1&&0===o[s]&&!(128&o[s+1]);--a,++s);if(o=o.subarray(s),128&o[0])return 1;if(a>1&&0===o[0]&&!(128&o[1]))return 1;let u=i.subarray(39,72);u[0]=0,u.set(r,1);let l=33,c=0;for(;l>1&&0===u[c]&&!(128&u[c+1]);--l,++c);return u=u.subarray(c),128&u[0]||l>1&&0===u[0]&&!(128&u[1])?1:(e.outputlen=6+a+l,i[0]=48,i[1]=e.outputlen-2,i[2]=2,i[3]=o.length,i.set(o,4),i[4+a]=2,i[5+a]=u.length,i.set(u,6+a),0)},signatureImport(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;const n=t[3];if(0===n)return 1;if(5+n>=t.length)return 1;if(2!==t[4+n])return 1;const r=t[5+n];if(0===r)return 1;if(6+n+r!==t.length)return 1;if(128&t[4])return 1;if(n>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[n+6])return 1;if(r>1&&0===t[n+6]&&!(128&t[n+7]))return 1;let i=t.subarray(4,4+n);if(33===i.length&&0===i[0]&&(i=i.subarray(1)),i.length>32)return 1;let o=t.subarray(6+n);if(33===o.length&&0===o[0]&&(o=o.slice(1)),o.length>32)throw new Error("S length is too long");let a=new ew(i);a.cmp(Jy.n)>=0&&(a=new ew(0));let s=new ew(t.subarray(6+n));return s.cmp(Jy.n)>=0&&(s=new ew(0)),e.set(a.toArrayLike(Uint8Array,"be",32),0),e.set(s.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(e,t,n,r,i){if(i){const e=i;i=i=>{const o=e(t,n,null,r,i);if(!(o instanceof Uint8Array&&32===o.length))throw new Error("This is the way");return new ew(o)}}const o=new ew(n);if(o.cmp(Jy.n)>=0||o.isZero())return 1;let a;try{a=Xy.sign(t,n,{canonical:!0,k:i,pers:r})}catch(e){return 1}return e.signature.set(a.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(a.s.toArrayLike(Uint8Array,"be",32),32),e.recid=a.recoveryParam,0},ecdsaVerify(e,t,n){const r={r:e.subarray(0,32),s:e.subarray(32,64)},i=new ew(r.r),o=new ew(r.s);if(i.cmp(Jy.n)>=0||o.cmp(Jy.n)>=0)return 1;if(1===o.cmp(Xy.nh)||i.isZero()||o.isZero())return 3;const a=tw(n);if(null===a)return 2;const s=a.getPublic();return Xy.verify(t,r,s)?0:3},ecdsaRecover(e,t,n,r){const i={r:t.slice(0,32),s:t.slice(32,64)},o=new ew(i.r),a=new ew(i.s);if(o.cmp(Jy.n)>=0||a.cmp(Jy.n)>=0)return 1;if(o.isZero()||a.isZero())return 2;let s;try{s=Xy.recoverPubKey(r,i,n)}catch(e){return 2}return nw(e,s),0},ecdh(e,t,n,r,i,o,a){const s=tw(t);if(null===s)return 1;const u=new ew(n);if(u.cmp(Jy.n)>=0||u.isZero())return 2;const l=s.getPublic().mul(u);if(void 0===i){const t=l.encode(null,!0),n=Xy.hash().update(t).digest();for(let t=0;t<32;++t)e[t]=n[t]}else{o||(o=new Uint8Array(32));const t=l.getX().toArray("be",32);for(let e=0;e<32;++e)o[e]=t[e];a||(a=new Uint8Array(32));const n=l.getY().toArray("be",32);for(let e=0;e<32;++e)a[e]=n[e];const s=i(o,a,r);if(!(s instanceof Uint8Array&&s.length===e.length))return 2;e.set(s)}return 0}},iw=(e=>({contextRandomize(t){if(sg(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&ug("seed",t,32),1===e.contextRandomize(t))throw new Error(Xm)},privateKeyVerify:t=>(ug("private key",t,32),0===e.privateKeyVerify(t)),privateKeyNegate(t){switch(ug("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(Gm)}},privateKeyTweakAdd(t,n){switch(ug("private key",t,32),ug("tweak",n,32),e.privateKeyTweakAdd(t,n)){case 0:return t;case 1:throw new Error(Zm)}},privateKeyTweakMul(t,n){switch(ug("private key",t,32),ug("tweak",n,32),e.privateKeyTweakMul(t,n)){case 0:return t;case 1:throw new Error(Qm)}},publicKeyVerify:t=>(ug("public key",t,[33,65]),0===e.publicKeyVerify(t)),publicKeyCreate(t,n=!0,r){switch(ug("private key",t,32),lg(n),r=cg(r,n?33:65),e.publicKeyCreate(r,t)){case 0:return r;case 1:throw new Error(Jm);case 2:throw new Error(tg)}},publicKeyConvert(t,n=!0,r){switch(ug("public key",t,[33,65]),lg(n),r=cg(r,n?33:65),e.publicKeyConvert(r,t)){case 0:return r;case 1:throw new Error(eg);case 2:throw new Error(tg)}},publicKeyNegate(t,n=!0,r){switch(ug("public key",t,[33,65]),lg(n),r=cg(r,n?33:65),e.publicKeyNegate(r,t)){case 0:return r;case 1:throw new Error(eg);case 2:throw new Error(Gm);case 3:throw new Error(tg)}},publicKeyCombine(t,n=!0,r){sg(Array.isArray(t),"Expected public keys to be an Array"),sg(t.length>0,"Expected public keys array will have more than zero items");for(const e of t)ug("public key",e,[33,65]);switch(lg(n),r=cg(r,n?33:65),e.publicKeyCombine(r,t)){case 0:return r;case 1:throw new Error(eg);case 2:throw new Error(ng);case 3:throw new Error(tg)}},publicKeyTweakAdd(t,n,r=!0,i){switch(ug("public key",t,[33,65]),ug("tweak",n,32),lg(r),i=cg(i,r?33:65),e.publicKeyTweakAdd(i,t,n)){case 0:return i;case 1:throw new Error(eg);case 2:throw new Error(Zm)}},publicKeyTweakMul(t,n,r=!0,i){switch(ug("public key",t,[33,65]),ug("tweak",n,32),lg(r),i=cg(i,r?33:65),e.publicKeyTweakMul(i,t,n)){case 0:return i;case 1:throw new Error(eg);case 2:throw new Error(Qm)}},signatureNormalize(t){switch(ug("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(rg)}},signatureExport(t,n){ug("signature",t,64);const r={output:n=cg(n,72),outputlen:72};switch(e.signatureExport(r,t)){case 0:return n.slice(0,r.outputlen);case 1:throw new Error(rg);case 2:throw new Error(Gm)}},signatureImport(t,n){switch(ug("signature",t),n=cg(n,64),e.signatureImport(n,t)){case 0:return n;case 1:throw new Error(rg);case 2:throw new Error(Gm)}},ecdsaSign(t,n,r={},i){ug("message",t,32),ug("private key",n,32),sg("Object"===dg(r),"Expected options to be an Object"),void 0!==r.data&&ug("options.data",r.data),void 0!==r.noncefn&&sg("Function"===dg(r.noncefn),"Expected options.noncefn to be a Function");const o={signature:i=cg(i,64),recid:null};switch(e.ecdsaSign(o,t,n,r.data,r.noncefn)){case 0:return o;case 1:throw new Error(ig);case 2:throw new Error(Gm)}},ecdsaVerify(t,n,r){switch(ug("signature",t,64),ug("message",n,32),ug("public key",r,[33,65]),e.ecdsaVerify(t,n,r)){case 0:return!0;case 3:return!1;case 1:throw new Error(rg);case 2:throw new Error(eg)}},ecdsaRecover(t,n,r,i=!0,o){switch(ug("signature",t,64),sg("Number"===dg(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),ug("message",r,32),lg(i),o=cg(o,i?33:65),e.ecdsaRecover(o,t,n,r)){case 0:return o;case 1:throw new Error(rg);case 2:throw new Error(og);case 3:throw new Error(Gm)}},ecdh(t,n,r={},i){switch(ug("public key",t,[33,65]),ug("private key",n,32),sg("Object"===dg(r),"Expected options to be an Object"),void 0!==r.data&&ug("options.data",r.data),void 0!==r.hashfn?(sg("Function"===dg(r.hashfn),"Expected options.hashfn to be a Function"),void 0!==r.xbuf&&ug("options.xbuf",r.xbuf,32),void 0!==r.ybuf&&ug("options.ybuf",r.ybuf,32),ug("output",i)):i=cg(i,32),e.ecdh(i,t,n,r.data,r.hashfn,r.xbuf,r.ybuf)){case 0:return i;case 1:throw new Error(eg);case 2:throw new Error(ag)}}}))(rw),ow={},aw={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SECRET_KEY_LENGTH=e.AES_IV_PLUS_TAG_LENGTH=e.AES_TAG_LENGTH=e.AES_IV_LENGTH=e.UNCOMPRESSED_PUBLIC_KEY_SIZE=void 0,e.UNCOMPRESSED_PUBLIC_KEY_SIZE=65,e.AES_IV_LENGTH=16,e.AES_TAG_LENGTH=16,e.AES_IV_PLUS_TAG_LENGTH=e.AES_IV_LENGTH+e.AES_TAG_LENGTH,e.SECRET_KEY_LENGTH=32}(aw);var sw=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ow,"__esModule",{value:!0}),ow.aesDecrypt=ow.aesEncrypt=ow.getValidSecret=ow.decodeHex=ow.remove0x=void 0;var uw=zm(),lw=sw(iw),cw=aw;function dw(e){return e.startsWith("0x")||e.startsWith("0X")?e.slice(2):e}ow.remove0x=dw,ow.decodeHex=function(e){return S.from(dw(e),"hex")},ow.getValidSecret=function(){var e;do{e=(0,uw.randomBytes)(cw.SECRET_KEY_LENGTH)}while(!lw.default.privateKeyVerify(e));return e},ow.aesEncrypt=function(e,t){var n=(0,uw.randomBytes)(cw.AES_IV_LENGTH),r=(0,uw.createCipheriv)("aes-256-gcm",e,n),i=S.concat([r.update(t),r.final()]),o=r.getAuthTag();return S.concat([n,o,i])},ow.aesDecrypt=function(e,t){var n=t.slice(0,cw.AES_IV_LENGTH),r=t.slice(cw.AES_IV_LENGTH,cw.AES_IV_PLUS_TAG_LENGTH),i=t.slice(cw.AES_IV_PLUS_TAG_LENGTH),o=(0,uw.createDecipheriv)("aes-256-gcm",e,n);return o.setAuthTag(r),S.concat([o.update(i),o.final()])};var fw={},hw=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fw,"__esModule",{value:!0});var pw=hw(Ym),mw=hw(iw),gw=ow,vw=aw,bw=function(){function e(e){this.uncompressed=S.from(mw.default.publicKeyConvert(e,!1)),this.compressed=S.from(mw.default.publicKeyConvert(e,!0))}return e.fromHex=function(t){var n=(0,gw.decodeHex)(t);if(n.length===vw.UNCOMPRESSED_PUBLIC_KEY_SIZE-1){var r=S.from([4]);return new e(S.concat([r,n]))}return new e(n)},e.prototype.toHex=function(e){return void 0===e&&(e=!0),e?this.compressed.toString("hex"):this.uncompressed.toString("hex")},e.prototype.decapsulate=function(e){var t=S.concat([this.uncompressed,e.multiply(this)]);return(0,pw.default)(t,32,{hash:"SHA-256"})},e.prototype.equals=function(e){return this.uncompressed.equals(e.uncompressed)},e}();fw.default=bw;var yw=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ce,"__esModule",{value:!0});var ww=yw(Ym),_w=yw(iw),Sw=ow,Ew=yw(fw),kw=function(){function e(e){if(this.secret=e||(0,Sw.getValidSecret)(),!_w.default.privateKeyVerify(this.secret))throw new Error("Invalid private key");this.publicKey=new Ew.default(S.from(_w.default.publicKeyCreate(this.secret)))}return e.fromHex=function(t){return new e((0,Sw.decodeHex)(t))},e.prototype.toHex=function(){return"0x".concat(this.secret.toString("hex"))},e.prototype.encapsulate=function(e){var t=S.concat([this.publicKey.uncompressed,this.multiply(e)]);return(0,ww.default)(t,32,{hash:"SHA-256"})},e.prototype.multiply=function(e){return S.from(_w.default.publicKeyTweakMul(e.compressed,this.secret,!1))},e.prototype.equals=function(e){return this.secret.equals(e.secret)},e}();ce.default=kw,function(e){var t=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.PublicKey=e.PrivateKey=void 0;var n=ce;Object.defineProperty(e,"PrivateKey",{enumerable:!0,get:function(){return t(n).default}});var i=fw;Object.defineProperty(e,"PublicKey",{enumerable:!0,get:function(){return t(i).default}})}(le),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.PublicKey=e.PrivateKey=e.decrypt=e.encrypt=void 0;var t=le,n=ow,r=aw;e.encrypt=function(e,r){var i=new t.PrivateKey,o=e instanceof S?new t.PublicKey(e):t.PublicKey.fromHex(e),a=i.encapsulate(o),s=(0,n.aesEncrypt)(a,r);return S.concat([i.publicKey.uncompressed,s])},e.decrypt=function(e,i){var o=e instanceof S?new t.PrivateKey(e):t.PrivateKey.fromHex(e),a=new t.PublicKey(i.slice(0,r.UNCOMPRESSED_PUBLIC_KEY_SIZE)),s=i.slice(r.UNCOMPRESSED_PUBLIC_KEY_SIZE),u=a.decapsulate(o);return(0,n.aesDecrypt)(u,s)};var i=le;Object.defineProperty(e,"PrivateKey",{enumerable:!0,get:function(){return i.PrivateKey}}),Object.defineProperty(e,"PublicKey",{enumerable:!0,get:function(){return i.PublicKey}}),e.utils={aesDecrypt:n.aesDecrypt,aesEncrypt:n.aesEncrypt,decodeHex:n.decodeHex,getValidSecret:n.getValidSecret,remove0x:n.remove0x}}(ue);var Mw={exports:{}};!function(e,t){!function(t){var n=Object.hasOwnProperty,r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i="object"==typeof je&&!0,o="function"==typeof Symbol,a="object"==typeof Reflect,s="function"==typeof setImmediate?setImmediate:setTimeout,u=o?a&&"function"==typeof Reflect.ownKeys?Reflect.ownKeys:function(e){var t=Object.getOwnPropertyNames(e);return t.push.apply(t,Object.getOwnPropertySymbols(e)),t}:Object.keys;function l(){this._events={},this._conf&&c.call(this,this._conf)}function c(e){e&&(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),e.maxListeners!==t&&(this._maxListeners=e.maxListeners),e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this._newListener=e.newListener),e.removeListener&&(this._removeListener=e.removeListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),e.ignoreErrors&&(this.ignoreErrors=e.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function d(e,t){var n="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(n+=" Event name: "+t+"."),void 0!==je&&je.emitWarning){var r=new Error(n);r.name="MaxListenersExceededWarning",r.emitter=this,r.count=e,je.emitWarning(r)}else console.error(n),console.trace&&console.trace()}var f=function(e,t,n){var r=arguments.length;switch(r){case 0:return[];case 1:return[e];case 2:return[e,t];case 3:return[e,t,n];default:for(var i=new Array(r);r--;)i[r]=arguments[r];return i}};function h(e,n){for(var r={},i=e.length,o=n?n.length:0,a=0;a<i;a++)r[e[a]]=a<o?n[a]:t;return r}function p(e,t,n){var r,i;if(this._emitter=e,this._target=t,this._listeners={},this._listenersCount=0,(n.on||n.off)&&(r=n.on,i=n.off),t.addEventListener?(r=t.addEventListener,i=t.removeEventListener):t.addListener?(r=t.addListener,i=t.removeListener):t.on&&(r=t.on,i=t.off),!r&&!i)throw Error("target does not implement any known event API");if("function"!=typeof r)throw TypeError("on method must be a function");if("function"!=typeof i)throw TypeError("off method must be a function");this._on=r,this._off=i;var o=e._observers;o?o.push(this):e._observers=[this]}function m(e,r,i,o){var a=Object.assign({},r);if(!e)return a;if("object"!=typeof e)throw TypeError("options must be an object");var s,u,l,c=Object.keys(e),d=c.length;function f(e){throw Error('Invalid "'+s+'" option value'+(e?". Reason: "+e:""))}for(var h=0;h<d;h++){if(s=c[h],!o&&!n.call(r,s))throw Error('Unknown "'+s+'" option');(u=e[s])!==t&&(l=i[s],a[s]=l?l(u,f):u)}return a}function g(e,t){return"function"==typeof e&&e.hasOwnProperty("prototype")||t("value must be a constructor"),e}function v(e){var t="value must be type of "+e.join("|"),n=e.length,r=e[0],i=e[1];return 1===n?function(e,n){if(typeof e===r)return e;n(t)}:2===n?function(e,n){var o=typeof e;if(o===r||o===i)return e;n(t)}:function(r,i){for(var o=typeof r,a=n;a-- >0;)if(o===e[a])return r;i(t)}}Object.assign(p.prototype,{subscribe:function(e,t,n){var r=this,i=this._target,o=this._emitter,a=this._listeners,s=function(){var r=f.apply(null,arguments),a={data:r,name:t,original:e};n?!1!==n.call(i,a)&&o.emit.apply(o,[a.name].concat(r)):o.emit.apply(o,[t].concat(r))};if(a[e])throw Error("Event '"+e+"' is already listening");this._listenersCount++,o._newListener&&o._removeListener&&!r._onNewListener?(this._onNewListener=function(n){n===t&&null===a[e]&&(a[e]=s,r._on.call(i,e,s))},o.on("newListener",this._onNewListener),this._onRemoveListener=function(n){n===t&&!o.hasListeners(n)&&a[e]&&(a[e]=null,r._off.call(i,e,s))},a[e]=null,o.on("removeListener",this._onRemoveListener)):(a[e]=s,r._on.call(i,e,s))},unsubscribe:function(e){var t,n,r,i=this,o=this._listeners,a=this._emitter,s=this._off,l=this._target;if(e&&"string"!=typeof e)throw TypeError("event must be a string");function c(){i._onNewListener&&(a.off("newListener",i._onNewListener),a.off("removeListener",i._onRemoveListener),i._onNewListener=null,i._onRemoveListener=null);var e=_.call(a,i);a._observers.splice(e,1)}if(e){if(!(t=o[e]))return;s.call(l,e,t),delete o[e],--this._listenersCount||c()}else{for(r=(n=u(o)).length;r-- >0;)e=n[r],s.call(l,e,o[e]);this._listeners={},this._listenersCount=0,c()}}});var b=v(["function"]),y=v(["object","function"]);function w(e,t,n){var r,i,o,a=0,s=new e((function(u,l,c){function d(){i&&(i=null),a&&(clearTimeout(a),a=0)}n=m(n,{timeout:0,overload:!1},{timeout:function(e,t){return("number"!=typeof(e*=1)||e<0||!Number.isFinite(e))&&t("timeout must be a positive number"),e}}),r=!n.overload&&"function"==typeof e.prototype.cancel&&"function"==typeof c;var f=function(e){d(),u(e)},h=function(e){d(),l(e)};r?t(f,h,c):(i=[function(e){h(e||Error("canceled"))}],t(f,h,(function(e){if(o)throw Error("Unable to subscribe on cancel event asynchronously");if("function"!=typeof e)throw TypeError("onCancel callback must be a function");i.push(e)})),o=!0),n.timeout>0&&(a=setTimeout((function(){var e=Error("timeout");e.code="ETIMEDOUT",a=0,s.cancel(e),l(e)}),n.timeout))}));return r||(s.cancel=function(e){if(i){for(var t=i.length,n=1;n<t;n++)i[n](e);i[0](e),i=null}}),s}function _(e){var t=this._observers;if(!t)return-1;for(var n=t.length,r=0;r<n;r++)if(t[r]._target===e)return r;return-1}function S(e,t,n,r,i){if(!n)return null;if(0===r){var o=typeof t;if("string"===o){var a,s,l=0,c=0,d=this.delimiter,f=d.length;if(-1!==(s=t.indexOf(d))){a=new Array(5);do{a[l++]=t.slice(c,s),c=s+f}while(-1!==(s=t.indexOf(d,c)));a[l++]=t.slice(c),t=a,i=l}else t=[t],i=1}else"object"===o?i=t.length:(t=[t],i=1)}var h,p,m,g,v,b,y,w=null,_=t[r],E=t[r+1];if(r===i)n._listeners&&("function"==typeof n._listeners?(e&&e.push(n._listeners),w=[n]):(e&&e.push.apply(e,n._listeners),w=[n]));else{if("*"===_){for(s=(b=u(n)).length;s-- >0;)"_listeners"!==(h=b[s])&&(y=S(e,t,n[h],r+1,i))&&(w?w.push.apply(w,y):w=y);return w}if("**"===_){for((v=r+1===i||r+2===i&&"*"===E)&&n._listeners&&(w=S(e,t,n,i,i)),s=(b=u(n)).length;s-- >0;)"_listeners"!==(h=b[s])&&("*"===h||"**"===h?(n[h]._listeners&&!v&&(y=S(e,t,n[h],i,i))&&(w?w.push.apply(w,y):w=y),y=S(e,t,n[h],r,i)):y=S(e,t,n[h],h===E?r+2:r,i),y&&(w?w.push.apply(w,y):w=y));return w}n[_]&&(w=S(e,t,n[_],r+1,i))}if((p=n["*"])&&S(e,t,p,r+1,i),m=n["**"])if(r<i)for(m._listeners&&S(e,t,m,i,i),s=(b=u(m)).length;s-- >0;)"_listeners"!==(h=b[s])&&(h===E?S(e,t,m[h],r+2,i):h===_?S(e,t,m[h],r+1,i):((g={})[h]=m[h],S(e,t,{"**":g},r+1,i)));else m._listeners?S(e,t,m,i,i):m["*"]&&m["*"]._listeners&&S(e,t,m["*"],i,i);return w}function E(e,t,n){var r,i,o=0,a=0,s=this.delimiter,u=s.length;if("string"==typeof e)if(-1!==(r=e.indexOf(s))){i=new Array(5);do{i[o++]=e.slice(a,r),a=r+u}while(-1!==(r=e.indexOf(s,a)));i[o++]=e.slice(a)}else i=[e],o=1;else i=e,o=e.length;if(o>1)for(r=0;r+1<o;r++)if("**"===i[r]&&"**"===i[r+1])return;var l,c=this.listenerTree;for(r=0;r<o;r++)if(c=c[l=i[r]]||(c[l]={}),r===o-1)return c._listeners?("function"==typeof c._listeners&&(c._listeners=[c._listeners]),n?c._listeners.unshift(t):c._listeners.push(t),!c._listeners.warned&&this._maxListeners>0&&c._listeners.length>this._maxListeners&&(c._listeners.warned=!0,d.call(this,c._listeners.length,l))):c._listeners=t,!0;return!0}function k(e,t,n,r){for(var i,o,a,s,l=u(e),c=l.length,d=e._listeners;c-- >0;)i=e[o=l[c]],a="_listeners"===o?n:n?n.concat(o):[o],s=r||"symbol"==typeof o,d&&t.push(s?a:a.join(this.delimiter)),"object"==typeof i&&k.call(this,i,t,a,s);return t}function M(e){for(var t,n,r,i=u(e),o=i.length;o-- >0;)(t=e[n=i[o]])&&(r=!0,"_listeners"===n||M(t)||delete e[n]);return r}function C(e,t,n){this.emitter=e,this.event=t,this.listener=n}function x(e,n,r){if(!0===r)a=!0;else if(!1===r)o=!0;else{if(!r||"object"!=typeof r)throw TypeError("options should be an object or true");var o=r.async,a=r.promisify,u=r.nextTick,l=r.objectify}if(o||u||a){var c=n,d=n._origin||n;if(u&&!i)throw Error("process.nextTick is not supported");a===t&&(a="AsyncFunction"===n.constructor.name),n=function(){var e=arguments,t=this,n=this.event;return a?u?Promise.resolve():new Promise((function(e){s(e)})).then((function(){return t.event=n,c.apply(t,e)})):(u?ke:s)((function(){t.event=n,c.apply(t,e)}))},n._async=!0,n._origin=d}return[n,l?new C(this,e,n):this]}function A(e){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,c.call(this,e)}C.prototype.off=function(){return this.emitter.off(this.event,this.listener),this},A.EventEmitter2=A,A.prototype.listenTo=function(e,n,i){if("object"!=typeof e)throw TypeError("target musts be an object");var o=this;function a(t){if("object"!=typeof t)throw TypeError("events must be an object");var n,r=i.reducers,a=_.call(o,e);n=-1===a?new p(o,e,i):o._observers[a];for(var s,l=u(t),c=l.length,d="function"==typeof r,f=0;f<c;f++)s=l[f],n.subscribe(s,t[s]||s,d?r:r&&r[s])}return i=m(i,{on:t,off:t,reducers:t},{on:b,off:b,reducers:y}),r(n)?a(h(n)):a("string"==typeof n?h(n.split(/\s+/)):n),this},A.prototype.stopListeningTo=function(e,t){var n=this._observers;if(!n)return!1;var r,i=n.length,o=!1;if(e&&"object"!=typeof e)throw TypeError("target should be an object");for(;i-- >0;)r=n[i],e&&r._target!==e||(r.unsubscribe(t),o=!0);return o},A.prototype.delimiter=".",A.prototype.setMaxListeners=function(e){e!==t&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},A.prototype.getMaxListeners=function(){return this._maxListeners},A.prototype.event="",A.prototype.once=function(e,t,n){return this._once(e,t,!1,n)},A.prototype.prependOnceListener=function(e,t,n){return this._once(e,t,!0,n)},A.prototype._once=function(e,t,n,r){return this._many(e,1,t,n,r)},A.prototype.many=function(e,t,n,r){return this._many(e,t,n,!1,r)},A.prototype.prependMany=function(e,t,n,r){return this._many(e,t,n,!0,r)},A.prototype._many=function(e,t,n,r,i){var o=this;if("function"!=typeof n)throw new Error("many only accepts instances of Function");function a(){return 0==--t&&o.off(e,a),n.apply(this,arguments)}return a._origin=n,this._on(e,a,r,i)},A.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||l.call(this);var e,t,n,r,i,a,s=arguments[0],u=this.wildcard;if("newListener"===s&&!this._newListener&&!this._events.newListener)return!1;if(u&&(e=s,"newListener"!==s&&"removeListener"!==s&&"object"==typeof s)){if(n=s.length,o)for(r=0;r<n;r++)if("symbol"==typeof s[r]){a=!0;break}a||(s=s.join(this.delimiter))}var c,d=arguments.length;if(this._all&&this._all.length)for(r=0,n=(c=this._all.slice()).length;r<n;r++)switch(this.event=s,d){case 1:c[r].call(this,s);break;case 2:c[r].call(this,s,arguments[1]);break;case 3:c[r].call(this,s,arguments[1],arguments[2]);break;default:c[r].apply(this,arguments)}if(u)c=[],S.call(this,c,e,this.listenerTree,0,n);else{if("function"==typeof(c=this._events[s])){switch(this.event=s,d){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(t=new Array(d-1),i=1;i<d;i++)t[i-1]=arguments[i];c.apply(this,t)}return!0}c&&(c=c.slice())}if(c&&c.length){if(d>3)for(t=new Array(d-1),i=1;i<d;i++)t[i-1]=arguments[i];for(r=0,n=c.length;r<n;r++)switch(this.event=s,d){case 1:c[r].call(this);break;case 2:c[r].call(this,arguments[1]);break;case 3:c[r].call(this,arguments[1],arguments[2]);break;default:c[r].apply(this,t)}return!0}if(!this.ignoreErrors&&!this._all&&"error"===s)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},A.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||l.call(this);var e,t,n,r,i,a,s=arguments[0],u=this.wildcard;if("newListener"===s&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(u&&(e=s,"newListener"!==s&&"removeListener"!==s&&"object"==typeof s)){if(r=s.length,o)for(i=0;i<r;i++)if("symbol"==typeof s[i]){t=!0;break}t||(s=s.join(this.delimiter))}var c,d=[],f=arguments.length;if(this._all)for(i=0,r=this._all.length;i<r;i++)switch(this.event=s,f){case 1:d.push(this._all[i].call(this,s));break;case 2:d.push(this._all[i].call(this,s,arguments[1]));break;case 3:d.push(this._all[i].call(this,s,arguments[1],arguments[2]));break;default:d.push(this._all[i].apply(this,arguments))}if(u?(c=[],S.call(this,c,e,this.listenerTree,0)):c=this._events[s],"function"==typeof c)switch(this.event=s,f){case 1:d.push(c.call(this));break;case 2:d.push(c.call(this,arguments[1]));break;case 3:d.push(c.call(this,arguments[1],arguments[2]));break;default:for(n=new Array(f-1),a=1;a<f;a++)n[a-1]=arguments[a];d.push(c.apply(this,n))}else if(c&&c.length){if(c=c.slice(),f>3)for(n=new Array(f-1),a=1;a<f;a++)n[a-1]=arguments[a];for(i=0,r=c.length;i<r;i++)switch(this.event=s,f){case 1:d.push(c[i].call(this));break;case 2:d.push(c[i].call(this,arguments[1]));break;case 3:d.push(c[i].call(this,arguments[1],arguments[2]));break;default:d.push(c[i].apply(this,n))}}else if(!this.ignoreErrors&&!this._all&&"error"===s)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(d)},A.prototype.on=function(e,t,n){return this._on(e,t,!1,n)},A.prototype.prependListener=function(e,t,n){return this._on(e,t,!0,n)},A.prototype.onAny=function(e){return this._onAny(e,!1)},A.prototype.prependAny=function(e){return this._onAny(e,!0)},A.prototype.addListener=A.prototype.on,A.prototype._onAny=function(e,t){if("function"!=typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),t?this._all.unshift(e):this._all.push(e),this},A.prototype._on=function(e,n,r,i){if("function"==typeof e)return this._onAny(e,n),this;if("function"!=typeof n)throw new Error("on only accepts instances of Function");this._events||l.call(this);var o,a=this;return i!==t&&(n=(o=x.call(this,e,n,i))[0],a=o[1]),this._newListener&&this.emit("newListener",e,n),this.wildcard?(E.call(this,e,n,r),a):(this._events[e]?("function"==typeof this._events[e]&&(this._events[e]=[this._events[e]]),r?this._events[e].unshift(n):this._events[e].push(n),!this._events[e].warned&&this._maxListeners>0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,d.call(this,this._events[e].length,e))):this._events[e]=n,a)},A.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var n,i=[];if(this.wildcard){var o="string"==typeof e?e.split(this.delimiter):e.slice();if(!(i=S.call(this,null,o,this.listenerTree,0)))return this}else{if(!this._events[e])return this;n=this._events[e],i.push({_listeners:n})}for(var a=0;a<i.length;a++){var s=i[a];if(n=s._listeners,r(n)){for(var u=-1,l=0,c=n.length;l<c;l++)if(n[l]===t||n[l].listener&&n[l].listener===t||n[l]._origin&&n[l]._origin===t){u=l;break}if(u<0)continue;return this.wildcard?s._listeners.splice(u,1):this._events[e].splice(u,1),0===n.length&&(this.wildcard?delete s._listeners:delete this._events[e]),this._removeListener&&this.emit("removeListener",e,t),this}(n===t||n.listener&&n.listener===t||n._origin&&n._origin===t)&&(this.wildcard?delete s._listeners:delete this._events[e],this._removeListener&&this.emit("removeListener",e,t))}return this.listenerTree&&M(this.listenerTree),this},A.prototype.offAny=function(e){var t,n=0,r=0;if(e&&this._all&&this._all.length>0){for(n=0,r=(t=this._all).length;n<r;n++)if(e===t[n])return t.splice(n,1),this._removeListener&&this.emit("removeListenerAny",e),this}else{if(t=this._all,this._removeListener)for(n=0,r=t.length;n<r;n++)this.emit("removeListenerAny",t[n]);this._all=[]}return this},A.prototype.removeListener=A.prototype.off,A.prototype.removeAllListeners=function(e){if(e===t)return!this._events||l.call(this),this;if(this.wildcard){var n,r=S.call(this,null,e,this.listenerTree,0);if(!r)return this;for(n=0;n<r.length;n++)r[n]._listeners=null;this.listenerTree&&M(this.listenerTree)}else this._events&&(this._events[e]=null);return this},A.prototype.listeners=function(e){var n,r,i,o,a,s=this._events;if(e===t){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!s)return[];for(o=(n=u(s)).length,i=[];o-- >0;)"function"==typeof(r=s[n[o]])?i.push(r):i.push.apply(i,r);return i}if(this.wildcard){if(!(a=this.listenerTree))return[];var l=[],c="string"==typeof e?e.split(this.delimiter):e.slice();return S.call(this,l,c,a,0),l}return s&&(r=s[e])?"function"==typeof r?[r]:r:[]},A.prototype.eventNames=function(e){var t=this._events;return this.wildcard?k.call(this,this.listenerTree,[],null,e):t?u(t):[]},A.prototype.listenerCount=function(e){return this.listeners(e).length},A.prototype.hasListeners=function(e){if(this.wildcard){var n=[],r="string"==typeof e?e.split(this.delimiter):e.slice();return S.call(this,n,r,this.listenerTree,0),n.length>0}var i=this._events,o=this._all;return!!(o&&o.length||i&&(e===t?u(i).length:i[e]))},A.prototype.listenersAny=function(){return this._all?this._all:[]},A.prototype.waitFor=function(e,n){var r=this,i=typeof n;return"number"===i?n={timeout:n}:"function"===i&&(n={filter:n}),w((n=m(n,{timeout:0,filter:t,handleError:!1,Promise:Promise,overload:!1},{filter:b,Promise:g})).Promise,(function(t,i,o){function a(){var o=n.filter;if(!o||o.apply(r,arguments))if(r.off(e,a),n.handleError){var s=arguments[0];s?i(s):t(f.apply(null,arguments).slice(1))}else t(f.apply(null,arguments))}o((function(){r.off(e,a)})),r._on(e,a,!1)}),{timeout:n.timeout,overload:n.overload})};var T=A.prototype;Object.defineProperties(A,{defaultMaxListeners:{get:function(){return T._maxListeners},set:function(e){if("number"!=typeof e||e<0||Number.isNaN(e))throw TypeError("n must be a non-negative number");T._maxListeners=e},enumerable:!0},once:{value:function(e,t,n){return w((n=m(n,{Promise:Promise,timeout:0,overload:!1},{Promise:g})).Promise,(function(n,r,i){var o;if("function"==typeof e.addEventListener)return o=function(){n(f.apply(null,arguments))},i((function(){e.removeEventListener(t,o)})),void e.addEventListener(t,o,{once:!0});var a,s=function(){a&&e.removeListener("error",a),n(f.apply(null,arguments))};"error"!==t&&(a=function(n){e.removeListener(t,s),r(n)},e.once("error",a)),i((function(){a&&e.removeListener("error",a),e.removeListener(t,s)})),e.once(t,s)}),{timeout:n.timeout,overload:n.overload})},writable:!0,configurable:!0}}),Object.defineProperties(T,{_maxListeners:{value:10,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),"function"==typeof t&&t.amd?t((function(){return A})):e.exports=A}()}(Mw);var Cw,xw=Mw.exports,Aw=new Uint8Array(16);function Tw(){if(!Cw&&!(Cw="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Cw(Aw)}var Rw=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Pw(e){return"string"==typeof e&&Rw.test(e)}for(var Lw=[],Iw=0;Iw<256;++Iw)Lw.push((Iw+256).toString(16).substr(1));function Ow(e,t,n){var r=(e=e||{}).random||(e.rng||Tw)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Lw[e[t+0]]+Lw[e[t+1]]+Lw[e[t+2]]+Lw[e[t+3]]+"-"+Lw[e[t+4]]+Lw[e[t+5]]+"-"+Lw[e[t+6]]+Lw[e[t+7]]+"-"+Lw[e[t+8]]+Lw[e[t+9]]+"-"+Lw[e[t+10]]+Lw[e[t+11]]+Lw[e[t+12]]+Lw[e[t+13]]+Lw[e[t+14]]+Lw[e[t+15]]).toLowerCase();if(!Pw(n))throw TypeError("Stringified UUID is invalid");return n}(r)}const Nw=Object.create(null);Nw.open="0",Nw.close="1",Nw.ping="2",Nw.pong="3",Nw.message="4",Nw.upgrade="5",Nw.noop="6";const Dw=Object.create(null);Object.keys(Nw).forEach((e=>{Dw[Nw[e]]=e}));const Bw={type:"error",data:"parser error"},jw="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),zw="function"==typeof ArrayBuffer,Uw=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Fw=({type:e,data:t},n,r)=>jw&&t instanceof Blob?n?r(t):Kw(t,r):zw&&(t instanceof ArrayBuffer||Uw(t))?n?r(t):Kw(new Blob([t]),r):r(Nw[e]+(t||"")),Kw=(e,t)=>{const n=new FileReader;return n.onload=function(){const e=n.result.split(",")[1];t("b"+(e||""))},n.readAsDataURL(e)};function qw(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Hw;function Ww(e,t){return jw&&e.data instanceof Blob?e.data.arrayBuffer().then(qw).then(t):zw&&(e.data instanceof ArrayBuffer||Uw(e.data))?t(qw(e.data)):void Fw(e,!1,(e=>{Hw||(Hw=new TextEncoder),t(Hw.encode(e))}))}const $w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vw="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<64;e++)Vw[$w.charCodeAt(e)]=e;const Yw="function"==typeof ArrayBuffer,Gw=(e,t)=>{if("string"!=typeof e)return{type:"message",data:Qw(e,t)};const n=e.charAt(0);return"b"===n?{type:"message",data:Zw(e.substring(1),t)}:Dw[n]?e.length>1?{type:Dw[n],data:e.substring(1)}:{type:Dw[n]}:Bw},Zw=(e,t)=>{if(Yw){const n=(e=>{let t,n,r,i,o,a=.75*e.length,s=e.length,u=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);const l=new ArrayBuffer(a),c=new Uint8Array(l);for(t=0;t<s;t+=4)n=Vw[e.charCodeAt(t)],r=Vw[e.charCodeAt(t+1)],i=Vw[e.charCodeAt(t+2)],o=Vw[e.charCodeAt(t+3)],c[u++]=n<<2|r>>4,c[u++]=(15&r)<<4|i>>2,c[u++]=(3&i)<<6|63&o;return l})(e);return Qw(n,t)}return{base64:!0,data:e}},Qw=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Xw=String.fromCharCode(30);let Jw;function e_(e){if(e)return function(e){for(var t in e_.prototype)e[t]=e_.prototype[t];return e}(e)}e_.prototype.on=e_.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},e_.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},e_.prototype.off=e_.prototype.removeListener=e_.prototype.removeAllListeners=e_.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},e_.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},e_.prototype.emitReserved=e_.prototype.emit,e_.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},e_.prototype.hasListeners=function(e){return!!this.listeners(e).length};const t_="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function n_(e,...t){return t.reduce(((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t)),{})}const r_=t_.setTimeout,i_=t_.clearTimeout;function o_(e,t){t.useNativeTimers?(e.setTimeoutFn=r_.bind(t_),e.clearTimeoutFn=i_.bind(t_)):(e.setTimeoutFn=t_.setTimeout.bind(t_),e.clearTimeoutFn=t_.clearTimeout.bind(t_))}class a_ extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class s_ extends e_{constructor(e){super(),this.writable=!1,o_(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,n){return super.emitReserved("error",new a_(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=Gw(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}(e);return t.length?"?"+t:""}}const u_="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),l_=64,c_={};let d_,f_=0,h_=0;function p_(e){let t="";do{t=u_[e%l_]+t,e=Math.floor(e/l_)}while(e>0);return t}function m_(){const e=p_(+new Date);return e!==d_?(f_=0,d_=e):e+"."+p_(f_++)}for(;h_<l_;h_++)c_[u_[h_]]=h_;let g_=!1;try{g_="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}const v_=g_;function b_(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||v_))return new XMLHttpRequest}catch(e){}if(!t)try{return new(t_[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}function y_(){}const w_=null!=new b_({xdomain:!1}).responseType;class __ extends e_{constructor(e,t){super(),o_(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.data=void 0!==t.data?t.data:null,this.create()}create(){var e;const t=n_(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd;const n=this.xhr=new b_(t);try{n.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let e in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(e)&&n.setRequestHeader(e,this.opts.extraHeaders[e])}}catch(e){}if("POST"===this.method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{n.setRequestHeader("Accept","*/*")}catch(e){}null===(e=this.opts.cookieJar)||void 0===e||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{var e;3===n.readyState&&(null===(e=this.opts.cookieJar)||void 0===e||e.parseCookies(n)),4===n.readyState&&(200===n.status||1223===n.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof n.status?n.status:0)}),0))},n.send(this.data)}catch(e){return void this.setTimeoutFn((()=>{this.onError(e)}),0)}"undefined"!=typeof document&&(this.index=__.requestsCount++,__.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=y_,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete __.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}function S_(){for(let e in __.requests)__.requests.hasOwnProperty(e)&&__.requests[e].abort()}__.requestsCount=0,__.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",S_):"function"==typeof addEventListener&&addEventListener("onpagehide"in t_?"pagehide":"unload",S_,!1));const E_="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),k_=t_.WebSocket||t_.MozWebSocket,M_="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();function C_(e,t){return"message"===e.type&&"string"!=typeof e.data&&t[0]>=48&&t[0]<=54}const x_={websocket:class extends s_{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,n=M_?{}:n_(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=M_?new k_(e,t,n):t?new k_(e,t):new k_(e)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType||"arraybuffer",this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;Fw(n,this.supportsBinary,(e=>{try{this.ws.send(e)}catch(e){}r&&E_((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=m_()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}check(){return!!k_}},webtransport:class extends s_{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then((()=>{this.onClose()})).catch((e=>{this.onError("webtransport error",e)})),this.transport.ready.then((()=>{this.transport.createBidirectionalStream().then((e=>{const t=e.readable.getReader();let n;this.writer=e.writable.getWriter();const r=()=>{t.read().then((({done:e,value:t})=>{e||(n||1!==t.byteLength||54!==t[0]?(this.onPacket(function(e,t,n){Jw||(Jw=new TextDecoder);const r=t||e[0]<48||e[0]>54;return Gw(r?e:Jw.decode(e),n)}(t,n,"arraybuffer")),n=!1):n=!0,r())})).catch((e=>{}))};r();const i=this.query.sid?`0{"sid":"${this.query.sid}"}`:"0";this.writer.write((new TextEncoder).encode(i)).then((()=>this.onOpen()))}))})))}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;Ww(n,(e=>{C_(n,e)&&this.writer.write(Uint8Array.of(54)),this.writer.write(e).then((()=>{r&&E_((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}))}}doClose(){var e;null===(e=this.transport)||void 0===e||e.close()}},polling:class extends s_{constructor(e){if(super(e),this.polling=!1,"undefined"!=typeof location){const t="https:"===location.protocol;let n=location.port;n||(n=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port}const t=e&&e.forceBase64;this.supportsBinary=w_&&!t,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let e=0;this.polling&&(e++,this.once("pollComplete",(function(){--e||t()}))),this.writable||(e++,this.once("drain",(function(){--e||t()})))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const n=e.split(Xw),r=[];for(let e=0;e<n.length;e++){const i=Gw(n[e],t);if(r.push(i),"error"===i.type)break}return r})(e,this.socket.binaryType).forEach((e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach(((e,o)=>{Fw(e,!1,(e=>{r[o]=e,++i===n&&t(r.join(Xw))}))}))})(e,(e=>{this.doWrite(e,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=m_()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new __(this.uri(),e)}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",((e,t)=>{this.onError("xhr post error",e,t)}))}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",((e,t)=>{this.onError("xhr poll error",e,t)})),this.pollXhr=e}}},A_=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,T_=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function R_(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=A_.exec(e||""),o={},a=14;for(;a--;)o[T_[a]]=i[a]||"";return-1!=n&&-1!=r&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=function(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1),"/"==t.slice(-1)&&r.splice(r.length-1,1),r}(0,o.path),o.queryKey=function(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,r){t&&(n[t]=r)})),n}(0,o.query),o}let P_=class e extends e_{constructor(e,t={}){super(),this.writeBuffer=[],e&&"object"==typeof e&&(t=e,e=null),e?(e=R_(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=R_(t.host).host),o_(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},n=e.split("&");for(let e=0,r=n.length;e<r;e++){let r=n[e].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new x_[e](n)}open(){let t;if(this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(e){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(e=>this.onClose("transport close",e)))}probe(t){let n=this.createTransport(t),r=!1;e.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",(t=>{if(!r)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;e.priorWebsocketSuccess="websocket"===n.name,this.transport.pause((()=>{r||"closed"!==this.readyState&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())}))}else{const e=new Error("probe error");e.transport=n.name,this.emitReserved("upgradeError",e)}})))};function o(){r||(r=!0,c(),n.close(),n=null)}const a=e=>{const t=new Error("probe error: "+e);t.transport=n.name,o(),this.emitReserved("upgradeError",t)};function s(){a("transport closed")}function u(){a("socket closed")}function l(e){n&&e.name!==n.name&&o()}const c=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",u),this.off("upgrading",l)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",u),this.once("upgrading",l),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn((()=>{r||n.open()}),200):n.open()}onOpen(){if(this.readyState="open",e.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let n=0;n<this.writeBuffer.length;n++){const r=this.writeBuffer[n].data;if(r&&(e+="string"==typeof(t=r)?function(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))),n>0&&e>this.maxPayload)return this.writeBuffer.slice(0,n);e+=2}var t;return this.writeBuffer}write(e,t,n){return this.sendPacket("message",e,t,n),this}send(e,t,n){return this.sendPacket("message",e,t,n),this}sendPacket(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const i={type:e,data:t,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?n():e()})):this.upgrading?n():e()),this}onError(t){e.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let n=0;const r=e.length;for(;n<r;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}};P_.protocol=4;const L_="function"==typeof ArrayBuffer,I_=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,O_=Object.prototype.toString,N_="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===O_.call(Blob),D_="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===O_.call(File);function B_(e){return L_&&(e instanceof ArrayBuffer||I_(e))||N_&&e instanceof Blob||D_&&e instanceof File}function j_(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(j_(e[t]))return!0;return!1}if(B_(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return j_(e.toJSON(),!0);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&j_(e[t]))return!0;return!1}function z_(e){const t=[],n=e.data,r=e;return r.data=U_(n,t),r.attachments=t.length,{packet:r,buffers:t}}function U_(e,t){if(!e)return e;if(B_(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=U_(e[r],t);return n}if("object"==typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=U_(e[r],t));return n}return e}function F_(e,t){return e.data=K_(e.data,t),delete e.attachments,e}function K_(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=K_(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=K_(e[n],t));return e}const q_=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var H_;function W_(e){return"[object Object]"===Object.prototype.toString.call(e)}!function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(H_||(H_={}));class $_ extends e_{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===H_.BINARY_EVENT;n||t.type===H_.BINARY_ACK?(t.type=n?H_.EVENT:H_.ACK,this.reconstructor=new V_(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!B_(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===H_[n.type])throw new Error("unknown packet type "+n.type);if(n.type===H_.BINARY_EVENT||n.type===H_.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const i=e.substring(r,t);if(i!=Number(i)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t&&","!==e.charAt(t)&&t!==e.length;);n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!$_.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case H_.CONNECT:return W_(t);case H_.DISCONNECT:return void 0===t;case H_.CONNECT_ERROR:return"string"==typeof t||W_(t);case H_.EVENT:case H_.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===q_.indexOf(t[0]));case H_.ACK:case H_.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class V_{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=F_(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}var Y_=Object.freeze({__proto__:null,Decoder:$_,Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==H_.EVENT&&e.type!==H_.ACK||!j_(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===H_.EVENT?H_.BINARY_EVENT:H_.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==H_.BINARY_EVENT&&e.type!==H_.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=z_(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},get PacketType(){return H_},protocol:5});function G_(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Z_=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Q_ extends e_{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[G_(e,"open",this.onopen.bind(this)),G_(e,"packet",this.onpacket.bind(this)),G_(e,"error",this.onerror.bind(this)),G_(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(Z_.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const n={type:H_.EVENT,data:t,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)||(this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[e]=t);const i=this.io.setTimeoutFn((()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))}),r);this.acks[e]=(...e)=>{this.io.clearTimeoutFn(i),t.apply(this,[null,...e])}}emitWithAck(e,...t){const n=void 0!==this.flags.timeout||void 0!==this._opts.ackTimeout;return new Promise(((r,i)=>{t.push(((e,t)=>n?e?i(e):r(t):r(e))),this.emit(e,...t)}))}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push(((e,...r)=>{if(n===this._queue[0])return null!==e?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...r)),n.pending=!1,this._drainQueue()})),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth((e=>{this._sendConnectPacket(e)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:H_.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case H_.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case H_.EVENT:case H_.BINARY_EVENT:this.onevent(e);break;case H_.ACK:case H_.BINARY_ACK:this.onack(e);break;case H_.DISCONNECT:this.ondisconnect();break;case H_.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...r){n||(n=!0,t.packet({type:H_.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(t.apply(this,e.data),delete this.acks[e.id])}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((e=>this.emitEvent(e))),this.receiveBuffer=[],this.sendBuffer.forEach((e=>{this.notifyOutgoingListeners(e),this.packet(e)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((e=>e())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:H_.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function X_(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}X_.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},X_.prototype.reset=function(){this.attempts=0},X_.prototype.setMin=function(e){this.ms=e},X_.prototype.setMax=function(e){this.max=e},X_.prototype.setJitter=function(e){this.jitter=e};class J_ extends e_{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,o_(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=t.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new X_({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||Y_;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new P_(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=G_(t,"open",(function(){n.onopen(),e&&e()})),i=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},o=G_(t,"error",i);if(!1!==this._timeout){const e=this._timeout,n=this.setTimeoutFn((()=>{r(),i(new Error("timeout")),t.close()}),e);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}return this.subs.push(r),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(G_(e,"ping",this.onping.bind(this)),G_(e,"data",this.ondata.bind(this)),G_(e,"error",this.onerror.bind(this)),G_(e,"close",this.onclose.bind(this)),G_(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){E_((()=>{this.emitReserved("packet",e)}),this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Q_(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const e of t)if(this.nsps[e].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach((e=>e())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn((()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()})))}),t);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const eS={};function tS(e,t){"object"==typeof e&&(t=e,e=void 0);const n=function(e,t="",n){let r=e;n=n||"undefined"!=typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==n?n.protocol+"//"+e:"https://"+e),r=R_(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=eS[i]&&o in eS[i].nsps;let s;return t.forceNew||t["force new connection"]||!1===t.multiplex||a?s=new J_(r,t):(eS[i]||(eS[i]=new J_(r,t)),s=eS[i]),n.query&&!t.query&&(t.query=n.queryKey),s.socket(n.path,t)}function nS(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}Object.assign(tS,{Manager:J_,Socket:Q_,io:tS,connect:tS}),"function"==typeof SuppressedError&&SuppressedError;var rS=void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function iS(){throw new Error("setTimeout has not been defined")}function oS(){throw new Error("clearTimeout has not been defined")}var aS=iS,sS=oS;function uS(e){if(aS===setTimeout)return setTimeout(e,0);if((aS===iS||!aS)&&setTimeout)return aS=setTimeout,setTimeout(e,0);try{return aS(e,0)}catch(t){try{return aS.call(null,e,0)}catch(t){return aS.call(this,e,0)}}}"function"==typeof rS.setTimeout&&(aS=setTimeout),"function"==typeof rS.clearTimeout&&(sS=clearTimeout);var lS,cS=[],dS=!1,fS=-1;function hS(){dS&&lS&&(dS=!1,lS.length?cS=lS.concat(cS):fS=-1,cS.length&&pS())}function pS(){if(!dS){var e=uS(hS);dS=!0;for(var t=cS.length;t;){for(lS=cS,cS=[];++fS<t;)lS&&lS[fS].run();fS=-1,t=cS.length}lS=null,dS=!1,function(e){if(sS===clearTimeout)return clearTimeout(e);if((sS===oS||!sS)&&clearTimeout)return sS=clearTimeout,clearTimeout(e);try{return sS(e)}catch(t){try{return sS.call(null,e)}catch(t){return sS.call(this,e)}}}(e)}}function mS(e,t){this.fun=e,this.array=t}function gS(){}mS.prototype.run=function(){this.fun.apply(null,this.array)};var vS,bS,yS=gS,wS=gS,_S=gS,SS=gS,ES=gS,kS=gS,MS=gS,CS=rS.performance||{},xS=CS.now||CS.mozNow||CS.msNow||CS.oNow||CS.webkitNow||function(){return(new Date).getTime()},AS=new Date,TS={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];cS.push(new mS(e,t)),1!==cS.length||dS||uS(pS)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:yS,addListener:wS,once:_S,off:SS,removeListener:ES,removeAllListeners:kS,emit:MS,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*xS.call(CS),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-AS)/1e3}},RS={exports:{}},PS=function(e){function t(e){let r,i,o,a=null;function s(...e){if(!s.enabled)return;const n=s,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";a++;const o=t.formatters[i];if("function"==typeof o){const t=e[a];r=o.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=function(){if(bS)return vS;bS=1;var e=1e3,t=60*e,n=60*t,r=24*n;function i(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return vS=function(o,a){a=a||{};var s=typeof o;if("string"===s&&o.length>0)return function(i){if(!((i=String(i)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(o){var a=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*r;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*t;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(o);if("number"===s&&isFinite(o))return a.long?function(o){var a=Math.abs(o);return a>=r?i(o,a,r,"day"):a>=n?i(o,a,n,"hour"):a>=t?i(o,a,t,"minute"):a>=e?i(o,a,e,"second"):o+" ms"}(o):function(i){var o=Math.abs(i);return o>=r?Math.round(i/r)+"d":o>=n?Math.round(i/n)+"h":o>=t?Math.round(i/t)+"m":o>=e?Math.round(i/e)+"s":i+"ms"}(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))}}(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t};!function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==TS&&"env"in TS&&(e=TS.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=PS(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(RS,RS.exports);var LS=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(RS.exports);const IS=LS("KeyExchange:Layer"),OS=LS("SocketService:Layer"),NS=LS("Ecies:Layer"),DS=LS("RemoteCommunication:Layer");IS.color="##95c44e",OS.color="#f638d7",NS.color="#465b9c",DS.color="#47a2be";const BS={KeyExchange:IS,SocketService:OS,Ecies:NS,RemoteCommunication:DS};let jS,zS=[],US=[];function FS(e){return nS(this,void 0,void 0,(function*(){if(!jS||!e)return;!function(){const e=US;US=zS,zS=e}();const t=jS.endsWith("/")?`${jS}debug`:`${jS}/debug`,n=Object.assign({},e);if(delete n.params,e.params)for(const[t,r]of Object.entries(e.params))n[t]=r;const r=JSON.stringify(n);BS.RemoteCommunication(`[sendBufferedEvents] Sending ${zS.length} analytics events to ${t}`);try{const e=yield s(t,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:r}),n=yield e.text();BS.RemoteCommunication(`[sendBufferedEvents] Response: ${n}`),zS.length=0}catch(e){console.warn("Error sending analytics",e)}}))}const KS=(e,t)=>nS(void 0,void 0,void 0,(function*(){var n;jS=t,n=e,US.push(n),FS(e).catch((()=>{}))}));var qS=[],HS=[],WS="undefined"!=typeof Uint8Array?Uint8Array:Array,$S=!1;function VS(){$S=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)qS[t]=e[t],HS[e.charCodeAt(t)]=t;HS["-".charCodeAt(0)]=62,HS["_".charCodeAt(0)]=63}function YS(e,t,n){for(var r,i,o=[],a=t;a<n;a+=3)r=(e[a]<<16)+(e[a+1]<<8)+e[a+2],o.push(qS[(i=r)>>18&63]+qS[i>>12&63]+qS[i>>6&63]+qS[63&i]);return o.join("")}function GS(e){var t;$S||VS();for(var n=e.length,r=n%3,i="",o=[],a=16383,s=0,u=n-r;s<u;s+=a)o.push(YS(e,s,s+a>u?u:s+a));return 1===r?(t=e[n-1],i+=qS[t>>2],i+=qS[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=qS[t>>10],i+=qS[t>>4&63],i+=qS[t<<2&63],i+="="),o.push(i),o.join("")}function ZS(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,d=n?i-1:0,f=n?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=f,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+d],d+=f,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=l}return(h?-1:1)*a*Math.pow(2,o-r)}function QS(e,t,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,d=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+d>=1?f/u:f*Math.pow(2,1-d))*u>=2&&(a++,u/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*u-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;e[n+h]=255&a,h+=p,a/=256,l-=8);e[n+h-p]|=128*m}var XS={}.toString,JS=Array.isArray||function(e){return"[object Array]"==XS.call(e)};function eE(){return nE.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function tE(e,t){if(eE()<t)throw new RangeError("Invalid typed array length");return nE.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=nE.prototype:(null===e&&(e=new nE(t)),e.length=t),e}function nE(e,t,n){if(!(nE.TYPED_ARRAY_SUPPORT||this instanceof nE))return new nE(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return oE(this,e)}return rE(this,e,t,n)}function rE(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),nE.TYPED_ARRAY_SUPPORT?(e=t).__proto__=nE.prototype:e=aE(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!nE.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|lE(t,n),i=(e=tE(e,r)).write(t,n);return i!==r&&(e=e.slice(0,i)),e}(e,t,n):function(e,t){if(uE(t)){var n=0|sE(t.length);return 0===(e=tE(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?tE(e,0):aE(e,t);if("Buffer"===t.type&&JS(t.data))return aE(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function iE(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function oE(e,t){if(iE(t),e=tE(e,t<0?0:0|sE(t)),!nE.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function aE(e,t){var n=t.length<0?0:0|sE(t.length);e=tE(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function sE(e){if(e>=eE())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+eE().toString(16)+" bytes");return 0|e}function uE(e){return!(null==e||!e._isBuffer)}function lE(e,t){if(uE(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return DE(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return BE(e).length;default:if(r)return DE(e).length;t=(""+t).toLowerCase(),r=!0}}function cE(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return ME(this,t,n);case"utf8":case"utf-8":return _E(this,t,n);case"ascii":return EE(this,t,n);case"latin1":case"binary":return kE(this,t,n);case"base64":return wE(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return CE(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function dE(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function fE(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=nE.from(t,r)),uE(t))return 0===t.length?-1:hE(e,t,n,r,i);if("number"==typeof t)return t&=255,nE.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):hE(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function hE(e,t,n,r,i){var o,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;o<s;o++)if(l(e,o)===l(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var d=!0,f=0;f<u;f++)if(l(e,o+f)!==l(t,f)){d=!1;break}if(d)return o}return-1}function pE(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function mE(e,t,n,r){return jE(DE(t,e.length-n),e,n,r)}function gE(e,t,n,r){return jE(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function vE(e,t,n,r){return gE(e,t,n,r)}function bE(e,t,n,r){return jE(BE(t),e,n,r)}function yE(e,t,n,r){return jE(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function wE(e,t,n){return 0===t&&n===e.length?GS(e):GS(e.slice(t,n))}function _E(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,u,l=e[i],c=null,d=l>239?4:l>223?3:l>191?2:1;if(i+d<=n)switch(d){case 1:l<128&&(c=l);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&l)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=d}return function(e){var t=e.length;if(t<=SE)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=SE));return n}(r)}nE.TYPED_ARRAY_SUPPORT=void 0===rS.TYPED_ARRAY_SUPPORT||rS.TYPED_ARRAY_SUPPORT,eE(),nE.poolSize=8192,nE._augment=function(e){return e.__proto__=nE.prototype,e},nE.from=function(e,t,n){return rE(null,e,t,n)},nE.TYPED_ARRAY_SUPPORT&&(nE.prototype.__proto__=Uint8Array.prototype,nE.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&nE[Symbol.species]),nE.alloc=function(e,t,n){return function(e,t,n,r){return iE(t),t<=0?tE(e,t):void 0!==n?"string"==typeof r?tE(e,t).fill(n,r):tE(e,t).fill(n):tE(e,t)}(null,e,t,n)},nE.allocUnsafe=function(e){return oE(null,e)},nE.allocUnsafeSlow=function(e){return oE(null,e)},nE.isBuffer=function(e){return null!=e&&(!!e._isBuffer||zE(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&zE(e.slice(0,0))}(e))},nE.compare=function(e,t){if(!uE(e)||!uE(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},nE.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},nE.concat=function(e,t){if(!JS(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return nE.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=nE.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!uE(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},nE.byteLength=lE,nE.prototype._isBuffer=!0,nE.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)dE(this,t,t+1);return this},nE.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)dE(this,t,t+3),dE(this,t+1,t+2);return this},nE.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)dE(this,t,t+7),dE(this,t+1,t+6),dE(this,t+2,t+5),dE(this,t+3,t+4);return this},nE.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?_E(this,0,e):cE.apply(this,arguments)},nE.prototype.equals=function(e){if(!uE(e))throw new TypeError("Argument must be a Buffer");return this===e||0===nE.compare(this,e)},nE.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},nE.prototype.compare=function(e,t,n,r,i){if(!uE(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(r,i),l=e.slice(t,n),c=0;c<s;++c)if(u[c]!==l[c]){o=u[c],a=l[c];break}return o<a?-1:a<o?1:0},nE.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},nE.prototype.indexOf=function(e,t,n){return fE(this,e,t,n,!0)},nE.prototype.lastIndexOf=function(e,t,n){return fE(this,e,t,n,!1)},nE.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return pE(this,e,t,n);case"utf8":case"utf-8":return mE(this,e,t,n);case"ascii":return gE(this,e,t,n);case"latin1":case"binary":return vE(this,e,t,n);case"base64":return bE(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return yE(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},nE.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var SE=4096;function EE(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function kE(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function ME(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=NE(e[o]);return i}function CE(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function xE(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function AE(e,t,n,r,i,o){if(!uE(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function TE(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function RE(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function PE(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function LE(e,t,n,r,i){return i||PE(e,0,n,4),QS(e,t,n,r,23,4),n+4}function IE(e,t,n,r,i){return i||PE(e,0,n,8),QS(e,t,n,r,52,8),n+8}nE.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),nE.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=nE.prototype;else{var i=t-e;n=new nE(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},nE.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||xE(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},nE.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||xE(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},nE.prototype.readUInt8=function(e,t){return t||xE(e,1,this.length),this[e]},nE.prototype.readUInt16LE=function(e,t){return t||xE(e,2,this.length),this[e]|this[e+1]<<8},nE.prototype.readUInt16BE=function(e,t){return t||xE(e,2,this.length),this[e]<<8|this[e+1]},nE.prototype.readUInt32LE=function(e,t){return t||xE(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},nE.prototype.readUInt32BE=function(e,t){return t||xE(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},nE.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||xE(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},nE.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||xE(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},nE.prototype.readInt8=function(e,t){return t||xE(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},nE.prototype.readInt16LE=function(e,t){t||xE(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},nE.prototype.readInt16BE=function(e,t){t||xE(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},nE.prototype.readInt32LE=function(e,t){return t||xE(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},nE.prototype.readInt32BE=function(e,t){return t||xE(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},nE.prototype.readFloatLE=function(e,t){return t||xE(e,4,this.length),ZS(this,e,!0,23,4)},nE.prototype.readFloatBE=function(e,t){return t||xE(e,4,this.length),ZS(this,e,!1,23,4)},nE.prototype.readDoubleLE=function(e,t){return t||xE(e,8,this.length),ZS(this,e,!0,52,8)},nE.prototype.readDoubleBE=function(e,t){return t||xE(e,8,this.length),ZS(this,e,!1,52,8)},nE.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||AE(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},nE.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||AE(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},nE.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||AE(this,e,t,1,255,0),nE.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},nE.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||AE(this,e,t,2,65535,0),nE.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):TE(this,e,t,!0),t+2},nE.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||AE(this,e,t,2,65535,0),nE.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):TE(this,e,t,!1),t+2},nE.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||AE(this,e,t,4,4294967295,0),nE.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):RE(this,e,t,!0),t+4},nE.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||AE(this,e,t,4,4294967295,0),nE.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):RE(this,e,t,!1),t+4},nE.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);AE(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},nE.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);AE(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},nE.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||AE(this,e,t,1,127,-128),nE.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},nE.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||AE(this,e,t,2,32767,-32768),nE.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):TE(this,e,t,!0),t+2},nE.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||AE(this,e,t,2,32767,-32768),nE.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):TE(this,e,t,!1),t+2},nE.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||AE(this,e,t,4,2147483647,-2147483648),nE.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):RE(this,e,t,!0),t+4},nE.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||AE(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),nE.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):RE(this,e,t,!1),t+4},nE.prototype.writeFloatLE=function(e,t,n){return LE(this,e,t,!0,n)},nE.prototype.writeFloatBE=function(e,t,n){return LE(this,e,t,!1,n)},nE.prototype.writeDoubleLE=function(e,t,n){return IE(this,e,t,!0,n)},nE.prototype.writeDoubleBE=function(e,t,n){return IE(this,e,t,!1,n)},nE.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!nE.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},nE.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!nE.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=uE(e)?e:DE(new nE(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var OE=/[^+\/0-9A-Za-z-_]/g;function NE(e){return e<16?"0"+e.toString(16):e.toString(16)}function DE(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function BE(e){return function(e){var t,n,r,i,o,a;$S||VS();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[s-2]?2:"="===e[s-1]?1:0,a=new WS(3*s/4-o),r=o>0?s-4:s;var u=0;for(t=0,n=0;t<r;t+=4,n+=3)i=HS[e.charCodeAt(t)]<<18|HS[e.charCodeAt(t+1)]<<12|HS[e.charCodeAt(t+2)]<<6|HS[e.charCodeAt(t+3)],a[u++]=i>>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===o?(i=HS[e.charCodeAt(t)]<<2|HS[e.charCodeAt(t+1)]>>4,a[u++]=255&i):1===o&&(i=HS[e.charCodeAt(t)]<<10|HS[e.charCodeAt(t+1)]<<4|HS[e.charCodeAt(t+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(OE,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function jE(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function zE(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}class UE{constructor(e){this.enabled=!0,(null==e?void 0:e.debug)&&LS.enable("Ecies:Layer"),(null==e?void 0:e.privateKey)?this.ecies=ue.PrivateKey.fromHex(e.privateKey):this.ecies=new ue.PrivateKey,BS.Ecies("[ECIES constructor()] initialized secret: ",this.ecies.toHex()),BS.Ecies("[ECIES constructor()] initialized public: ",this.ecies.publicKey.toHex()),BS.Ecies("[ECIES constructor()] init with",this)}generateECIES(){this.ecies=new ue.PrivateKey}getPublicKey(){return this.ecies.publicKey.toHex()}encrypt(e,t){let n=e;if(this.enabled)try{BS.Ecies("[ECIES: encrypt()] using otherPublicKey",t);const r=nE.from(e),i=ue.encrypt(t,r);n=nE.from(i).toString("base64")}catch(n){throw BS.Ecies("[ECIES: encrypt()] error encrypt:",n),BS.Ecies("[ECIES: encrypt()] private: ",this.ecies.toHex()),BS.Ecies("[ECIES: encrypt()] data: ",e),BS.Ecies("[ECIES: encrypt()] otherkey: ",t),n}return n}decrypt(e){let t=e;if(this.enabled)try{BS.Ecies("[ECIES: decrypt()] using privateKey",this.ecies.toHex());const n=nE.from(e.toString(),"base64");t=ue.decrypt(this.ecies.toHex(),n).toString()}catch(t){throw BS.Ecies("[ECIES: decrypt()] error decrypt",t),BS.Ecies("[ECIES: decrypt()] private: ",this.ecies.toHex()),BS.Ecies("[ECIES: decrypt()] encryptedData: ",e),t}return t}getKeyInfo(){return{private:this.ecies.toHex(),public:this.ecies.publicKey.toHex()}}toString(){BS.Ecies("[ECIES: toString()]",this.getKeyInfo())}}var FE="0.28.2";const KE="https://metamask-sdk.api.cx.metamask.io/",qE=["websocket"],HE=6048e5,WE={METAMASK_GETPROVIDERSTATE:"metamask_getProviderState",ETH_REQUESTACCOUNTS:"eth_requestAccounts"};function $E(e){const{context:t}=e;BS.RemoteCommunication(`[RemoteCommunication: clean()] context=${t}`),e.channelConfig=void 0,e.ready=!1,e.originatorConnectStarted=!1}var VE,YE;t.ConnectionStatus=void 0,t.EventType=void 0,t.MessageType=void 0,function(e){e.DISCONNECTED="disconnected",e.WAITING="waiting",e.TIMEOUT="timeout",e.LINKED="linked",e.PAUSED="paused",e.TERMINATED="terminated"}(t.ConnectionStatus||(t.ConnectionStatus={})),function(e){e.KEY_INFO="key_info",e.SERVICE_STATUS="service_status",e.PROVIDER_UPDATE="provider_update",e.RPC_UPDATE="rpc_update",e.KEYS_EXCHANGED="keys_exchanged",e.JOIN_CHANNEL="join_channel",e.PUBLIC_KEY="public_key",e.CHANNEL_CREATED="channel_created",e.CLIENTS_CONNECTED="clients_connected",e.CLIENTS_DISCONNECTED="clients_disconnected",e.CLIENTS_WAITING="clients_waiting",e.CLIENTS_READY="clients_ready",e.WALLET_INIT="wallet_init",e.CHANNEL_PERSISTENCE="channel_persistence",e.MESSAGE_ACK="ack",e.SOCKET_DISCONNECTED="socket_disconnected",e.SOCKET_RECONNECT="socket_reconnect",e.OTP="otp",e.SDK_RPC_CALL="sdk_rpc_call",e.AUTHORIZED="authorized",e.CONNECTION_STATUS="connection_status",e.MESSAGE="message",e.TERMINATE="terminate"}(t.EventType||(t.EventType={})),function(e){e.KEY_EXCHANGE="key_exchange"}(VE||(VE={})),function(e){e.KEY_HANDSHAKE_START="key_handshake_start",e.KEY_HANDSHAKE_CHECK="key_handshake_check",e.KEY_HANDSHAKE_SYN="key_handshake_SYN",e.KEY_HANDSHAKE_SYNACK="key_handshake_SYNACK",e.KEY_HANDSHAKE_ACK="key_handshake_ACK",e.KEY_HANDSHAKE_WALLET="key_handshake_wallet",e.KEY_HANDSHAKE_NONE="none"}(YE||(YE={}));class GE extends xw.EventEmitter2{constructor({communicationLayer:e,otherPublicKey:t,context:n,ecies:r,logging:i}){super(),this.keysExchanged=!1,this.step=YE.KEY_HANDSHAKE_NONE,this.debug=!1,this.context=n,this.communicationLayer=e,(null==r?void 0:r.privateKey)&&t&&(BS.KeyExchange(`[KeyExchange: constructor()] otherPubKey=${t} set keysExchanged to true!`,r),this.keysExchanged=!0),this.myECIES=new UE(Object.assign(Object.assign({},r),{debug:null==i?void 0:i.eciesLayer})),this.communicationLayer.state.eciesInstance=this.myECIES,this.myPublicKey=this.myECIES.getPublicKey(),this.debug=!0===(null==i?void 0:i.keyExchangeLayer),t&&this.setOtherPublicKey(t),this.communicationLayer.on(VE.KEY_EXCHANGE,this.onKeyExchangeMessage.bind(this))}onKeyExchangeMessage(e){const{relayPersistence:n}=this.communicationLayer.remote.state;if(BS.KeyExchange(`[KeyExchange: onKeyExchangeMessage()] context=${this.context} keysExchanged=${this.keysExchanged} relayPersistence=${n}`,e),n)return void BS.KeyExchange("[KeyExchange: onKeyExchangeMessage()] Ignoring key exchange message because relay persistence is activated");const{message:r}=e;this.keysExchanged&&BS.KeyExchange(`[KeyExchange: onKeyExchangeMessage()] context=${this.context} received handshake while already exchanged. step=${this.step} otherPubKey=${this.otherPublicKey}`),this.emit(t.EventType.KEY_INFO,r.type),r.type===YE.KEY_HANDSHAKE_SYN?(this.checkStep([YE.KEY_HANDSHAKE_NONE,YE.KEY_HANDSHAKE_ACK]),BS.KeyExchange("[KeyExchange: onKeyExchangeMessage()] KEY_HANDSHAKE_SYN",r),r.pubkey&&this.setOtherPublicKey(r.pubkey),this.communicationLayer.sendMessage({type:YE.KEY_HANDSHAKE_SYNACK,pubkey:this.myPublicKey}),this.setStep(YE.KEY_HANDSHAKE_ACK)):r.type===YE.KEY_HANDSHAKE_SYNACK?(this.checkStep([YE.KEY_HANDSHAKE_SYNACK,YE.KEY_HANDSHAKE_ACK,YE.KEY_HANDSHAKE_NONE]),BS.KeyExchange("[KeyExchange: onKeyExchangeMessage()] KEY_HANDSHAKE_SYNACK"),r.pubkey&&this.setOtherPublicKey(r.pubkey),this.communicationLayer.sendMessage({type:YE.KEY_HANDSHAKE_ACK}),this.keysExchanged=!0,this.setStep(YE.KEY_HANDSHAKE_ACK),this.emit(t.EventType.KEYS_EXCHANGED)):r.type===YE.KEY_HANDSHAKE_ACK&&(BS.KeyExchange("[KeyExchange: onKeyExchangeMessage()] KEY_HANDSHAKE_ACK set keysExchanged to true!"),this.checkStep([YE.KEY_HANDSHAKE_ACK,YE.KEY_HANDSHAKE_NONE]),this.keysExchanged=!0,this.setStep(YE.KEY_HANDSHAKE_ACK),this.emit(t.EventType.KEYS_EXCHANGED))}resetKeys(e){this.clean(),this.myECIES=new UE(e)}clean(){BS.KeyExchange(`[KeyExchange: clean()] context=${this.context} reset handshake state`),this.setStep(YE.KEY_HANDSHAKE_NONE),this.emit(t.EventType.KEY_INFO,this.step),this.keysExchanged=!1}start({isOriginator:e,force:t}){const{relayPersistence:n,protocolVersion:r}=this.communicationLayer.remote.state,i=r>=2;if(n)return BS.KeyExchange("[KeyExchange: start()] Ignoring key exchange message because relay persistence is activated"),void console.log(`[KeyExchange: start()] relayPersistence=${n}`);BS.KeyExchange(`[KeyExchange: start()] context=${this.context} protocolVersion=${r} isOriginator=${e} step=${this.step} force=${t} relayPersistence=${n} keysExchanged=${this.keysExchanged}`),e?!(this.keysExchanged||this.step!==YE.KEY_HANDSHAKE_NONE&&this.step!==YE.KEY_HANDSHAKE_SYNACK)||t?(BS.KeyExchange(`[KeyExchange: start()] context=${this.context} -- start key exchange (force=${t}) -- step=${this.step}`,this.step),this.clean(),this.setStep(YE.KEY_HANDSHAKE_SYNACK),this.communicationLayer.sendMessage({type:YE.KEY_HANDSHAKE_SYN,pubkey:this.myPublicKey,v:2})):BS.KeyExchange(`[KeyExchange: start()] context=${this.context} -- key exchange already ${this.keysExchanged?"done":"in progress"} -- aborted.`,this.step):this.keysExchanged&&!0!==t?BS.KeyExchange("[KeyExchange: start()] don't send KEY_HANDSHAKE_START -- exchange already done."):i?this.communicationLayer.sendMessage({type:YE.KEY_HANDSHAKE_SYNACK,pubkey:this.myPublicKey,v:2}):(this.communicationLayer.sendMessage({type:YE.KEY_HANDSHAKE_START}),this.clean())}setStep(e){this.step=e,this.emit(t.EventType.KEY_INFO,e)}checkStep(e){e.length>0&&-1===e.indexOf(this.step.toString())&&console.warn(`[KeyExchange: checkStep()] Wrong Step "${this.step}" not within ${e}`)}setRelayPersistence({localKey:e,otherKey:t}){this.otherPublicKey=t,this.myECIES=new UE({privateKey:e,debug:this.debug}),this.keysExchanged=!0}setKeysExchanged(e){this.keysExchanged=e}areKeysExchanged(){return this.keysExchanged}getMyPublicKey(){return this.myPublicKey}getOtherPublicKey(){return this.otherPublicKey}setOtherPublicKey(e){BS.KeyExchange("[KeyExchange: setOtherPubKey()]",e),this.otherPublicKey=e}encryptMessage(e){if(!this.otherPublicKey)throw new Error("encryptMessage: Keys not exchanged - missing otherPubKey");return this.myECIES.encrypt(e,this.otherPublicKey)}decryptMessage(e){if(!this.otherPublicKey)throw new Error("decryptMessage: Keys not exchanged - missing otherPubKey");return this.myECIES.decrypt(e)}getKeyInfo(){return{ecies:Object.assign(Object.assign({},this.myECIES.getKeyInfo()),{otherPubKey:this.otherPublicKey}),step:this.step,keysExchanged:this.areKeysExchanged()}}toString(){const e={keyInfo:this.getKeyInfo(),keysExchanged:this.keysExchanged,step:this.step};return JSON.stringify(e)}}!function(e){e.TERMINATE="terminate",e.ANSWER="answer",e.OFFER="offer",e.CANDIDATE="candidate",e.JSONRPC="jsonrpc",e.WALLET_INFO="wallet_info",e.WALLET_INIT="wallet_init",e.ORIGINATOR_INFO="originator_info",e.PAUSE="pause",e.OTP="otp",e.AUTHORIZED="authorized",e.PING="ping",e.READY="ready"}(t.MessageType||(t.MessageType={}));const ZE=(e,n,r)=>nS(void 0,void 0,void 0,(function*(){var i,o,a,s,u;const{remote:l,state:c}=e,{channelId:d,isOriginator:f}=c;if("error_terminated"===n)return BS.SocketService(`handleJoinChannelResults: Channel ${d} terminated`),void e.emit(t.EventType.TERMINATE);if(!r)return void BS.SocketService(`handleJoinChannelResults: No result for channel ${d}`);const{persistence:h,walletKey:p}=r;if(BS.SocketService(`handleJoinChannelResults: Channel ${d} persistence=${h} walletKey=${p}`),p&&!(null===(i=l.state.channelConfig)||void 0===i?void 0:i.otherKey)){e.getKeyExchange().setOtherPublicKey(p),null===(o=e.state.keyExchange)||void 0===o||o.setKeysExchanged(!0),l.state.ready=!0,l.state.authorized=!0,l.emit(t.EventType.AUTHORIZED);const{communicationLayer:n,storageManager:r}=l.state,i=Object.assign(Object.assign({},l.state.channelConfig),{channelId:null!==(a=l.state.channelId)&&void 0!==a?a:"",validUntil:Date.now()+HE,localKey:null==n?void 0:n.getKeyInfo().ecies.private,otherKey:p});e.sendMessage({type:YE.KEY_HANDSHAKE_ACK}),null===(s=e.state.socket)||void 0===s||s.emit(t.MessageType.PING,{id:d,clientType:f?"dapp":"wallet",context:"on_channel_reconnect",message:""}),yield null==r?void 0:r.persistChannelConfig(i),l.emitServiceStatusEvent(),l.setConnectionStatus(t.ConnectionStatus.LINKED)}h&&(e.emit(t.EventType.CHANNEL_PERSISTENCE),null===(u=e.state.keyExchange)||void 0===u||u.setKeysExchanged(!0),l.state.ready=!0,l.state.authorized=!0,l.emit(t.EventType.AUTHORIZED))})),QE=e=>new Promise((t=>{setTimeout(t,e)})),XE=(e,t,n=200)=>nS(void 0,void 0,void 0,(function*(){let r;const i=Date.now();let o=!1;for(;!o;){if(o=Date.now()-i>3e5,r=t[e],void 0!==r.elapsedTime)return r;yield QE(n)}throw new Error(`RPC ${e} timed out`)})),JE=e=>nS(void 0,void 0,void 0,(function*(){const{state:n}=e,{socket:r,channelId:i,context:o,isOriginator:a,isReconnecting:s}=n;if(s)return BS.SocketService("[SocketService: reconnectSocket()] Reconnection already in progress, skipping",e),!1;if(!r)return BS.SocketService("[SocketService: reconnectSocket()] socket is not defined",e),!1;if(!i)return!1;const{connected:u}=r;n.isReconnecting=!0,n.reconnectionAttempts=0,BS.SocketService(`[SocketService: reconnectSocket()] connected=${u} trying to reconnect after socketio disconnection`,e);try{for(;n.reconnectionAttempts<3;){if(BS.SocketService(`[SocketService: reconnectSocket()] Attempt ${n.reconnectionAttempts+1} of 3`,e),yield QE(200),r.connected)return BS.SocketService("Socket already connected --- ping to retrieve messages"),r.emit(t.MessageType.PING,{id:i,clientType:a?"dapp":"wallet",context:"on_channel_config",message:""}),!0;n.resumed=!0,r.connect(),e.emit(t.EventType.SOCKET_RECONNECT);try{if(yield new Promise(((n,s)=>{r.emit(t.EventType.JOIN_CHANNEL,{channelId:i,context:`${o}connect_again`,clientType:a?"dapp":"wallet"},((t,r)=>nS(void 0,void 0,void 0,(function*(){try{yield ZE(e,t,r),n()}catch(e){s(e)}}))))})),yield QE(100),r.connected)return BS.SocketService(`Reconnection successful on attempt ${n.reconnectionAttempts+1}`),!0}catch(e){BS.SocketService(`Error during reconnection attempt ${n.reconnectionAttempts+1}:`,e)}n.reconnectionAttempts+=1,n.reconnectionAttempts<3&&(yield QE(200))}return BS.SocketService("Failed to reconnect after 3 attempts"),!1}finally{n.isReconnecting=!1,n.reconnectionAttempts=0}}));var ek,tk;!function(e){e.REQUEST="sdk_connect_request_started",e.REQUEST_MOBILE="sdk_connect_request_started_mobile",e.RECONNECT="sdk_reconnect_request_started",e.CONNECTED="sdk_connection_established",e.CONNECTED_MOBILE="sdk_connection_established_mobile",e.AUTHORIZED="sdk_connection_authorized",e.REJECTED="sdk_connection_rejected",e.TERMINATED="sdk_connection_terminated",e.DISCONNECTED="sdk_disconnected",e.SDK_USE_EXTENSION="sdk_use_extension",e.SDK_RPC_REQUEST="sdk_rpc_request",e.SDK_RPC_REQUEST_RECEIVED="sdk_rpc_request_received",e.SDK_RPC_REQUEST_DONE="sdk_rpc_request_done",e.SDK_EXTENSION_UTILIZED="sdk_extension_utilized",e.SDK_USE_INAPP_BROWSER="sdk_use_inapp_browser"}(ek||(ek={})),function(e){e.RPC_CHECK="rpcCheck",e.SKIPPED_RPC="skippedRpc"}(tk||(tk={}));const nk=["eth_sendTransaction","eth_signTypedData","eth_signTransaction","personal_sign","wallet_requestPermissions","wallet_switchEthereumChain","eth_signTypedData_v3","eth_signTypedData_v4","metamask_connectSign","metamask_connectWith","metamask_batch"].map((e=>e.toLowerCase()));function rk(e,n){var r,i,o,a;if(!e.state.channelId)throw BS.SocketService("handleSendMessage: no channelId - Create a channel first"),new Error("Create a channel first");BS.SocketService(`[SocketService: handleSendMessage()] context=${e.state.context} areKeysExchanged=${null===(r=e.state.keyExchange)||void 0===r?void 0:r.areKeysExchanged()}`,n),(null===(i=null==n?void 0:n.type)||void 0===i?void 0:i.startsWith("key_handshake"))?function(e,n){var r;BS.SocketService(`[SocketService: handleKeyHandshake()] context=${e.state.context}`,n),null===(r=e.state.socket)||void 0===r||r.emit(t.EventType.MESSAGE,{id:e.state.channelId,context:e.state.context,clientType:e.state.isOriginator?"dapp":"wallet",message:n})}(e,n):(function(e,t){var n;if(!(null===(n=e.state.keyExchange)||void 0===n?void 0:n.areKeysExchanged())&&!e.remote.state.relayPersistence)throw BS.SocketService(`[SocketService: validateKeyExchange()] context=${e.state.context} ERROR keys not exchanged`,t),console.error("[SocketService: validateKeyExchange()] ERROR keys not exchanged",t),new Error("Keys not exchanged BBB")}(e,n),function(e,n){var r;const i=null!==(r=null==n?void 0:n.method)&&void 0!==r?r:"",o=null==n?void 0:n.id;e.state.isOriginator&&o&&(e.state.rpcMethodTracker[o]={id:o,timestamp:Date.now(),method:i},e.emit(t.EventType.RPC_UPDATE,e.state.rpcMethodTracker[o]))}(e,n),function(e,n){var r,i;const o=null===(r=e.state.keyExchange)||void 0===r?void 0:r.encryptMessage(JSON.stringify(n)),a={id:e.state.channelId,context:e.state.context,clientType:e.state.isOriginator?"dapp":"wallet",message:o,plaintext:e.state.hasPlaintext?JSON.stringify(n):void 0};BS.SocketService(`[SocketService: encryptAndSendMessage()] context=${e.state.context}`,a),n.type===t.MessageType.TERMINATE&&(e.state.manualDisconnect=!0),null===(i=e.state.socket)||void 0===i||i.emit(t.EventType.MESSAGE,a)}(e,n),e.remote.state.analytics&&e.remote.state.isOriginator&&n.method&&nk.includes(n.method.toLowerCase())&&KS({id:null!==(o=e.remote.state.channelId)&&void 0!==o?o:"",event:ek.SDK_RPC_REQUEST,sdkVersion:e.remote.state.sdkVersion,commLayerVersion:FE,walletVersion:null===(a=e.remote.state.walletInfo)||void 0===a?void 0:a.version,params:{method:n.method,from:"mobile"}},e.remote.state.communicationServerUrl).catch((e=>{console.error("Cannot send analytics",e)})),function(e,n){var r;return nS(this,void 0,void 0,(function*(){const i=null==n?void 0:n.id,o=null!==(r=null==n?void 0:n.method)&&void 0!==r?r:"";if(e.state.isOriginator&&i)try{const r=XE(i,e.state.rpcMethodTracker,200).then((e=>({type:tk.RPC_CHECK,result:e}))),a=(()=>nS(this,void 0,void 0,(function*(){const t=yield(({rpcId:e,instance:t})=>nS(void 0,void 0,void 0,(function*(){for(;t.state.lastRpcId===e||void 0===t.state.lastRpcId;)yield QE(200);return t.state.lastRpcId})))({instance:e,rpcId:i}),n=yield XE(t,e.state.rpcMethodTracker,200);return{type:tk.SKIPPED_RPC,result:n}})))(),s=yield Promise.race([r,a]);if(s.type===tk.RPC_CHECK){const e=s.result;BS.SocketService(`[SocketService:handleRpcReplies()] id=${n.id} ${o} ( ${e.elapsedTime} ms)`,e.result)}else{if(s.type!==tk.SKIPPED_RPC)throw new Error(`Error handling RPC replies for ${i}`);{const{result:n}=s;console.warn(`[SocketService handleRpcReplies()] RPC METHOD HAS BEEN SKIPPED rpcid=${i} method=${o}`,n);const r=Object.assign(Object.assign({},e.state.rpcMethodTracker[i]),{error:new Error("SDK_CONNECTION_ISSUE")});e.emit(t.EventType.RPC_UPDATE,r);const a={data:Object.assign(Object.assign({},r),{jsonrpc:"2.0"}),name:"metamask-provider"};e.emit(t.EventType.MESSAGE,{message:a})}}}catch(e){throw console.warn(`[SocketService handleRpcReplies()] Error rpcId=${n.id} ${o}`,e),e}}))}(e,n).catch((e=>{console.warn("Error handleRpcReplies",e)})))}const ik=[{event:"clients_connected",handler:function(e,n){return r=>nS(this,void 0,void 0,(function*(){var r,i,o,a,s,u,l,c,d,f,h;const p=null!==(i=null===(r=e.remote.state.channelConfig)||void 0===r?void 0:r.relayPersistence)&&void 0!==i&&i;if(BS.SocketService(`[SocketService: handleClientsConnected()] context=${e.state.context} on 'clients_connected-${n}' relayPersistence=${p} resumed=${e.state.resumed} clientsPaused=${e.state.clientsPaused} keysExchanged=${null===(o=e.state.keyExchange)||void 0===o?void 0:o.areKeysExchanged()} isOriginator=${e.state.isOriginator}`),e.emit(t.EventType.CLIENTS_CONNECTED,{isOriginator:e.state.isOriginator,keysExchanged:null===(a=e.state.keyExchange)||void 0===a?void 0:a.areKeysExchanged(),context:e.state.context}),e.state.resumed)e.state.isOriginator||(BS.SocketService(`[SocketService: handleClientsConnected()] context=${e.state.context} 'clients_connected' / keysExchanged=${null===(s=e.state.keyExchange)||void 0===s?void 0:s.areKeysExchanged()} -- backward compatibility`),null===(u=e.state.keyExchange)||void 0===u||u.start({isOriginator:null!==(l=e.state.isOriginator)&&void 0!==l&&l})),e.state.resumed=!1;else if(e.state.clientsPaused)BS.SocketService("[SocketService: handleClientsConnected()] 'clients_connected' skip sending originatorInfo on pause");else if(!e.state.isOriginator){const t=!p;BS.SocketService(`[SocketService: handleClientsConnected()] context=${e.state.context} on 'clients_connected' / keysExchanged=${null===(c=e.state.keyExchange)||void 0===c?void 0:c.areKeysExchanged()} -- force=${t} -- backward compatibility`),BS.SocketService(`[SocketService: handleClientsConnected()] context=${e.state.context} on 'clients_connected' / keysExchanged=${null===(d=e.state.keyExchange)||void 0===d?void 0:d.areKeysExchanged()} -- force=${t} -- backward compatibility`),null===(f=e.state.keyExchange)||void 0===f||f.start({isOriginator:null!==(h=e.state.isOriginator)&&void 0!==h&&h,force:t})}e.state.clientsConnected=!0,e.state.clientsPaused=!1}))}},{event:"channel_created",handler:function(e,n){return r=>{BS.SocketService(`[SocketService: handleChannelCreated()] context=${e.state.context} on 'channel_created-${n}'`,r),e.emit(t.EventType.CHANNEL_CREATED,r)}}},{event:"clients_disconnected",handler:function(e,n){return()=>{var r;e.state.clientsConnected=!1,BS.SocketService(`[SocketService: handlesClientsDisconnected()] context=${e.state.context} on 'clients_disconnected-${n}'`),e.remote.state.relayPersistence?BS.SocketService(`[SocketService: handlesClientsDisconnected()] context=${e.state.context} on 'clients_disconnected-${n}' - relayPersistence enabled, skipping key exchange cleanup.`):(e.state.isOriginator&&!e.state.clientsPaused&&(null===(r=e.state.keyExchange)||void 0===r||r.clean()),e.emit(t.EventType.CLIENTS_DISCONNECTED,n))}}},{event:"config",handler:function(e,n){return r=>nS(this,void 0,void 0,(function*(){var i,o,a;BS.SocketService(`[SocketService: handleChannelConfig()] update relayPersistence on 'config-${n}'`,r);const{persistence:s,walletKey:u}=r;e.state.isOriginator&&e.remote.state.channelConfig?(r.walletKey&&!e.remote.state.channelConfig.otherKey&&(BS.SocketService(`Setting wallet key ${u}`),e.remote.state.channelConfig.otherKey=u,e.getKeyExchange().setOtherPublicKey(r.walletKey),null===(i=e.state.keyExchange)||void 0===i||i.setKeysExchanged(!0),yield e.remote.sendMessage({type:YE.KEY_HANDSHAKE_ACK}),yield e.remote.sendMessage({type:t.MessageType.PING}),yield null===(o=e.remote.state.storageManager)||void 0===o?void 0:o.persistChannelConfig(e.remote.state.channelConfig)),!0!==s||e.remote.state.channelConfig.relayPersistence||(BS.SocketService(`Setting relay persistence ${s}`),e.remote.state.channelConfig.relayPersistence=s,e.remote.state.relayPersistence=!0,e.remote.emit(t.EventType.CHANNEL_PERSISTENCE),e.remote.state.authorized=!0,e.remote.state.ready=!0,e.remote.emit(t.EventType.AUTHORIZED),yield null===(a=e.remote.state.storageManager)||void 0===a?void 0:a.persistChannelConfig(e.remote.state.channelConfig))):e.state.isOriginator||r.persistence&&(e.remote.state.relayPersistence=!0,e.remote.emit(t.EventType.CHANNEL_PERSISTENCE))}))}},{event:"message",handler:function(e,n){return r=>{var i,o,a,s,u,l,c,d,f,h,p,m,g,v,b,y,w,_;const{id:S,ackId:E,message:k,error:M}=r,C=null!==(i=e.remote.state.relayPersistence)&&void 0!==i&&i;if(BS.SocketService(`[SocketService handleMessage()] relayPersistence=${C} context=${e.state.context} on 'message' ${n} keysExchanged=${null===(o=e.state.keyExchange)||void 0===o?void 0:o.areKeysExchanged()}`,r),M)throw BS.SocketService(`\n [SocketService handleMessage()] context=${e.state.context}::on 'message' error=${M}`),new Error(M);try{!function(e,t){if(t!==e.channelId)throw e.debug&&console.error(`Wrong id ${t} - should be ${e.channelId}`),new Error("Wrong id")}(e.state,S)}catch(e){return void console.error("ignore message --- wrong id ",k)}const x="string"==typeof k;if(!x&&(null==k?void 0:k.type)===YE.KEY_HANDSHAKE_START)return C?void console.warn("[SocketService handleMessage()] Ignoring key exchange message because relay persistence is activated",k):(BS.SocketService(`[SocketService handleMessage()] context=${e.state.context}::on 'message' received HANDSHAKE_START isOriginator=${e.state.isOriginator}`,k),void(null===(a=e.state.keyExchange)||void 0===a||a.start({isOriginator:null!==(s=e.state.isOriginator)&&void 0!==s&&s,force:!0})));if(!x&&(null===(u=null==k?void 0:k.type)||void 0===u?void 0:u.startsWith("key_handshake")))return C?void console.warn("[SocketService handleMessage()] Ignoring key exchange message because relay persistence is activated",k):(BS.SocketService(`[SocketService handleMessage()] context=${e.state.context}::on 'message' emit KEY_EXCHANGE`,k),void e.emit(VE.KEY_EXCHANGE,{message:k,context:e.state.context}));if(x&&!(null===(l=e.state.keyExchange)||void 0===l?void 0:l.areKeysExchanged())){let t=!1;try{BS.SocketService(`[SocketService handleMessage()] context=${e.state.context}::on 'message' trying to decrypt message`),null===(c=e.state.keyExchange)||void 0===c||c.decryptMessage(k),t=!0}catch(t){BS.SocketService(`[SocketService handleMessage()] context=${e.state.context}::on 'message' error`,t)}if(!t)return e.state.isOriginator?null===(f=e.state.keyExchange)||void 0===f||f.start({isOriginator:null!==(h=e.state.isOriginator)&&void 0!==h&&h}):e.sendMessage({type:YE.KEY_HANDSHAKE_START}),void BS.SocketService(`Message ignored because invalid key exchange status. step=${null===(p=e.state.keyExchange)||void 0===p?void 0:p.getKeyInfo().step}`,null===(m=e.state.keyExchange)||void 0===m?void 0:m.getKeyInfo(),k);BS.SocketService("Invalid key exchange status detected --- updating it."),null===(d=e.state.keyExchange)||void 0===d||d.setKeysExchanged(!0)}else if(!x&&(null==k?void 0:k.type))return console.warn("[SocketService handleMessage() ::on 'message' received non encrypted unkwown message"),void e.emit(t.EventType.MESSAGE,k);if(!x)return console.warn("[SocketService handleMessage() ::on 'message' received unkwown message",k),void e.emit(t.EventType.MESSAGE,k);const A=null===(g=e.state.keyExchange)||void 0===g?void 0:g.decryptMessage(k),T=JSON.parse(null!=A?A:"{}");if(E&&(null==E?void 0:E.length)>0&&(BS.SocketService(`[SocketService handleMessage()] context=${e.state.context}::on 'message' ackid=${E} channelId=${S}`),null===(v=e.state.socket)||void 0===v||v.emit(t.EventType.MESSAGE_ACK,{ackId:E,channelId:S,clientType:e.state.isOriginator?"dapp":"wallet"})),(null==T?void 0:T.type)===t.MessageType.PAUSE?e.state.clientsPaused=!0:e.state.clientsPaused=!1,e.state.isOriginator&&T.data){const n=T.data,r=e.state.rpcMethodTracker[n.id];if(r){const i=Date.now()-r.timestamp;BS.SocketService(`[SocketService handleMessage()] context=${e.state.context}::on 'message' received answer for id=${n.id} method=${r.method} responseTime=${i}`,T),e.remote.state.analytics&&nk.includes(r.method.toLowerCase())&&KS({id:null!==(b=e.remote.state.channelId)&&void 0!==b?b:"",event:ek.SDK_RPC_REQUEST_DONE,sdkVersion:e.remote.state.sdkVersion,commLayerVersion:FE,walletVersion:null===(y=e.remote.state.walletInfo)||void 0===y?void 0:y.version,params:{method:r.method,from:"mobile"}},e.remote.state.communicationServerUrl).catch((e=>{console.error("Cannot send analytics",e)}));const o=Object.assign(Object.assign({},r),{result:n.result,error:n.error?{code:null===(w=n.error)||void 0===w?void 0:w.code,message:null===(_=n.error)||void 0===_?void 0:_.message}:void 0,elapsedTime:i});e.state.rpcMethodTracker[n.id]=o,e.emit(t.EventType.RPC_UPDATE,o)}}e.emit(t.EventType.MESSAGE,{message:T})}}},{event:"clients_waiting_to_join",handler:function(e,n){return r=>{BS.SocketService(`[SocketService: handleClientsWaitingToJoin()] context=${e.state.context} on 'clients_waiting_to_join-${n}'`,r),e.emit(t.EventType.CLIENTS_WAITING,r)}}}],ok=[{event:t.EventType.KEY_INFO,handler:function(e){return n=>{BS.SocketService("[SocketService: handleKeyInfo()] on 'KEY_INFO'",n),e.emit(t.EventType.KEY_INFO,n)}}},{event:t.EventType.KEYS_EXCHANGED,handler:function(e){return()=>{var n,r,i;BS.SocketService(`[SocketService: handleKeysExchanged()] on 'keys_exchanged' keyschanged=${null===(n=e.state.keyExchange)||void 0===n?void 0:n.areKeysExchanged()}`);const{channelConfig:o}=e.remote.state;if(o){const t=e.getKeyExchange().getKeyInfo().ecies;o.localKey=t.private,o.otherKey=t.otherPubKey,e.remote.state.channelConfig=o,null===(r=e.remote.state.storageManager)||void 0===r||r.persistChannelConfig(o).catch((e=>{console.error("Error persisting channel config",e)}))}e.emit(t.EventType.KEYS_EXCHANGED,{keysExchanged:null===(i=e.state.keyExchange)||void 0===i?void 0:i.areKeysExchanged(),isOriginator:e.state.isOriginator});const a={keyInfo:e.getKeyInfo()};e.emit(t.EventType.SERVICE_STATUS,a)}}}];function ak(e,n){BS.SocketService(`[SocketService: setupChannelListener()] context=${e.state.context} setting socket listeners for channel ${n}...`);const{socket:r}=e.state,{keyExchange:i}=e.state;r&&e.state.isOriginator&&(e.state.debug&&(null==r||r.io.on("error",(t=>{BS.SocketService(`[SocketService: setupChannelListener()] context=${e.state.context} socket event=error`,t)})),null==r||r.io.on("reconnect",(t=>{BS.SocketService(`[SocketService: setupChannelListener()] context=${e.state.context} socket event=reconnect`,t),JE(e).catch((e=>{}))})),null==r||r.io.on("reconnect_error",(t=>{BS.SocketService(`[SocketService: setupChannelListener()] context=${e.state.context} socket event=reconnect_error`,t)})),null==r||r.io.on("reconnect_failed",(()=>{BS.SocketService(`[SocketService: setupChannelListener()] context=${e.state.context} socket event=reconnect_failed`)})),null==r||r.io.on("ping",(()=>{BS.SocketService(`[SocketService: setupChannelListener()] context=${e.state.context} socket`)}))),null==r||r.on("disconnect",(n=>(BS.SocketService(`[SocketService: setupChannelListener()] on 'disconnect' -- MetaMaskSDK socket disconnected '${n}' begin recovery...`),function(e){return n=>{BS.SocketService(`[SocketService: handleDisconnect()] on 'disconnect' manualDisconnect=${e.state.manualDisconnect}`,n),e.state.manualDisconnect||(e.emit(t.EventType.SOCKET_DISCONNECTED),JE(e).catch((e=>{console.error("SocketService::handleDisconnect Error reconnecting socket",e)})))}}(e)(n))))),ik.forEach((({event:t,handler:i})=>{const o=`${t}-${n}`;null==r||r.on(o,i(e,n))})),ok.forEach((({event:t,handler:n})=>{null==i||i.on(t,n(e))})),e.state.setupChannelListeners=!0}class sk extends xw.EventEmitter2{constructor(e){super(),this.state={clientsConnected:!1,clientsPaused:!1,manualDisconnect:!1,lastRpcId:void 0,rpcMethodTracker:{},hasPlaintext:!1,communicationServerUrl:"",focusListenerAdded:!1,removeFocusListener:void 0,isReconnecting:!1,reconnectionAttempts:0},this.options=e;const{reconnect:t,communicationLayerPreference:n,communicationServerUrl:r,context:i,remote:o,logging:a}=e;this.state.resumed=t,this.state.context=i,this.state.isOriginator=o.state.isOriginator,this.state.communicationLayerPreference=n,this.state.debug=!0===(null==a?void 0:a.serviceLayer),this.remote=o,!0===(null==a?void 0:a.serviceLayer)&&LS.enable("SocketService:Layer"),this.state.communicationServerUrl=r,this.state.hasPlaintext=this.state.communicationServerUrl!==KE&&!0===(null==a?void 0:a.plaintext),BS.SocketService(`[SocketService: constructor()] Socket IO url: ${this.state.communicationServerUrl}`),this.initSocket()}initSocket(){var e;const{otherPublicKey:t,ecies:n,logging:r}=this.options,i={autoConnect:!1,transports:qE,withCredentials:!0},o=this.state.communicationServerUrl;BS.SocketService(`[SocketService: initSocket()] Socket IO url: ${o}`),this.state.socket=tS(o,i),function(e){if("undefined"!=typeof window&&"undefined"!=typeof document&&(BS.SocketService(`[SocketService: setupSocketFocusListener()] hasFocus=${document.hasFocus()}`,e),!e.state.focusListenerAdded)){const t=()=>{BS.SocketService("Document has focus --- reconnecting socket"),JE(e).catch((e=>{console.error("setupSocketFocusListeners Error reconnecting socket",e)}))};window.addEventListener("focus",t),e.state.focusListenerAdded=!0,e.state.removeFocusListener=()=>{window.removeEventListener("focus",t),e.state.focusListenerAdded=!1}}}(this);const a={communicationLayer:this,otherPublicKey:t,sendPublicKey:!1,context:null!==(e=this.state.context)&&void 0!==e?e:"",ecies:n,logging:r};this.state.keyExchange=new GE(a)}resetKeys(){return BS.SocketService("[SocketService: resetKeys()] Resetting keys."),void(null===(e=this.state.keyExchange)||void 0===e||e.resetKeys());var e}createChannel(){return nS(this,void 0,void 0,(function*(){return function(e){var n,r,i;return nS(this,void 0,void 0,(function*(){if(BS.SocketService(`[SocketService: createChannel()] context=${e.state.context}`),e.state.socket||e.initSocket(),null===(n=e.state.socket)||void 0===n?void 0:n.connected)throw console.error("[SocketService: createChannel()] socket already connected"),new Error("socket already connected");null===(r=e.state.socket)||void 0===r||r.connect(),e.state.manualDisconnect=!1,e.state.isOriginator=!0;const o=Ow();e.state.channelId=o,ak(e,o),yield new Promise(((n,r)=>{var i;null===(i=e.state.socket)||void 0===i||i.emit(t.EventType.JOIN_CHANNEL,{channelId:o,context:`${e.state.context}createChannel`,clientType:"dapp"},((t,i)=>nS(this,void 0,void 0,(function*(){try{yield ZE(e,t,i),n()}catch(e){r(e)}}))))}));const a=null===(i=e.state.keyExchange)||void 0===i?void 0:i.getKeyInfo();return{channelId:o,pubKey:(null==a?void 0:a.ecies.public)||"",privKey:(null==a?void 0:a.ecies.private)||""}}))}(this)}))}connectToChannel({channelId:e,withKeyExchange:n=!1,authorized:r}){return function({options:e,instance:n}){return nS(this,void 0,void 0,(function*(){const{channelId:r,authorized:i,withKeyExchange:o}=e,{state:a,remote:s}=n,{isOriginator:u=!1,socket:l,keyExchange:c}=a,{channelConfig:d}=s.state;if(null==l?void 0:l.connected)throw console.error("[SocketService: connectToChannel()] socket already connected"),new Error("socket already connected");if(u&&(null==d?void 0:d.relayPersistence)){const{localKey:e,otherKey:t}=d;e&&t?null==c||c.setRelayPersistence({localKey:e,otherKey:t}):console.warn("Missing keys in relay persistence",d)}return Object.assign(a,{manualDisconnect:!1,withKeyExchange:o,isOriginator:u,channelId:r}),null==l||l.connect(),ak(n,r),!u&&i&&(null==c||c.setKeysExchanged(!0),Object.assign(s.state,{ready:!0,authorized:!0})),new Promise((e=>{var o;const s=null===(o=null==c?void 0:c.getKeyInfo())||void 0===o?void 0:o.ecies.public,d=i&&!u?s:void 0;null==l||l.emit(t.EventType.JOIN_CHANNEL,{channelId:r,context:`${a.context}_connectToChannel`,clientType:u?"dapp":"wallet",publicKey:d},((t,r)=>nS(this,void 0,void 0,(function*(){yield ZE(n,t,r),e()}))))}))}))}({options:{channelId:e,withKeyExchange:n,authorized:r},instance:this})}getKeyInfo(){return this.state.keyExchange.getKeyInfo()}keyCheck(){var e,n;null===(n=(e=this).state.socket)||void 0===n||n.emit(t.EventType.MESSAGE,{id:e.state.channelId,context:e.state.context,message:{type:YE.KEY_HANDSHAKE_CHECK,pubkey:e.getKeyInfo().ecies.otherPubKey}})}getKeyExchange(){return this.state.keyExchange}sendMessage(e){return rk(this,e)}ping(){return e=this,BS.SocketService(`[SocketService: ping()] context=${e.state.context} originator=${e.state.isOriginator} keysExchanged=${null===(n=e.state.keyExchange)||void 0===n?void 0:n.areKeysExchanged()}`),e.state.isOriginator&&((null===(r=e.state.keyExchange)||void 0===r?void 0:r.areKeysExchanged())?(console.warn(`[SocketService:ping()] context=${e.state.context} sending READY message`),e.sendMessage({type:t.MessageType.READY})):(console.warn(`[SocketService: ping()] context=${e.state.context} starting key exchange`),null===(i=e.state.keyExchange)||void 0===i||i.start({isOriginator:null!==(o=e.state.isOriginator)&&void 0!==o&&o}))),void(null===(a=e.state.socket)||void 0===a||a.emit(t.EventType.MESSAGE,{id:e.state.channelId,context:e.state.context,clientType:e.remote.state.isOriginator?"dapp":"wallet",message:{type:t.MessageType.PING}}));var e,n,r,i,o,a}pause(){return e=this,BS.SocketService(`[SocketService: pause()] context=${e.state.context}`),e.state.manualDisconnect=!0,(null===(n=e.state.keyExchange)||void 0===n?void 0:n.areKeysExchanged())&&e.sendMessage({type:t.MessageType.PAUSE}),void(null===(r=e.state.socket)||void 0===r||r.disconnect());var e,n,r}isConnected(){var e;return null===(e=this.state.socket)||void 0===e?void 0:e.connected}resume(){return function(e){const{state:n,remote:r}=e,{socket:i,channelId:o,context:a,keyExchange:s,isOriginator:u}=n,{isOriginator:l}=r.state;if(BS.SocketService(`[SocketService: resume()] channelId=${o} context=${a} connected=${null==i?void 0:i.connected} manualDisconnect=${n.manualDisconnect} resumed=${n.resumed} keysExchanged=${null==s?void 0:s.areKeysExchanged()}`),!o)throw BS.SocketService("[SocketService: resume()] channelId is not defined"),new Error("ChannelId is not defined");(null==i?void 0:i.connected)?(BS.SocketService("[SocketService: resume()] already connected."),i.emit(t.MessageType.PING,{id:o,clientType:l?"dapp":"wallet",context:"on_channel_config",message:""}),r.hasRelayPersistence()||(null==s?void 0:s.areKeysExchanged())||(u?e.sendMessage({type:t.MessageType.READY}):null==s||s.start({isOriginator:!1}))):(null==i||i.connect(),BS.SocketService(`[SocketService: resume()] after connecting socket --\x3e connected=${null==i?void 0:i.connected}`),null==i||i.emit(t.EventType.JOIN_CHANNEL,{channelId:o,context:`${a}_resume`,clientType:l?"dapp":"wallet"},((t,n)=>nS(this,void 0,void 0,(function*(){try{yield ZE(e,t,n)}catch(e){console.warn("Error reconnecting to channel",e)}}))))),n.manualDisconnect=!1,n.resumed=!0}(this)}getRPCMethodTracker(){return this.state.rpcMethodTracker}disconnect(e){return function(e,t){var n,r,i,o,a;BS.SocketService(`[SocketService: disconnect()] context=${e.state.context}`,t),(null==t?void 0:t.terminate)&&(null===(r=(n=e.state).removeFocusListener)||void 0===r||r.call(n),e.state.channelId=t.channelId,null===(i=e.state.socket)||void 0===i||i.removeAllListeners(),null===(o=e.state.keyExchange)||void 0===o||o.clean(),e.remote.state.ready=!1,e.state.socket=void 0,e.state.rpcMethodTracker={}),e.state.manualDisconnect=!0,null===(a=e.state.socket)||void 0===a||a.disconnect()}(this,e)}}var uk;function lk(e){return()=>nS(this,void 0,void 0,(function*(){var n,r,i;const{state:o}=e;if(o.authorized)return;yield(()=>nS(this,void 0,void 0,(function*(){for(;!o.walletInfo;)yield QE(500)})))();const a="7.3".localeCompare((null===(n=o.walletInfo)||void 0===n?void 0:n.version)||"");if(BS.RemoteCommunication(`[RemoteCommunication: handleAuthorizedEvent()] HACK 'authorized' version=${null===(r=o.walletInfo)||void 0===r?void 0:r.version} compareValue=${a}`),1!==a)return;const s=o.platformType===t.PlatformType.MobileWeb||o.platformType===t.PlatformType.ReactNative||o.platformType===t.PlatformType.MetaMaskMobileWebview;BS.RemoteCommunication(`[RemoteCommunication: handleAuthorizedEvent()] HACK 'authorized' platform=${o.platformType} secure=${s} channel=${o.channelId} walletVersion=${null===(i=o.walletInfo)||void 0===i?void 0:i.version}`),s&&(o.authorized=!0,e.emit(t.EventType.AUTHORIZED))}))}function ck(e){return n=>{const{state:r}=e;BS.RemoteCommunication(`[RemoteCommunication: handleChannelCreatedEvent()] context=${r.context} on 'channel_created' channelId=${n}`),e.emit(t.EventType.CHANNEL_CREATED,n)}}function dk(e,n){return()=>{var r,i,o,a;const{state:s}=e;if(BS.RemoteCommunication(`[RemoteCommunication: handleClientsConnectedEvent()] on 'clients_connected' channel=${s.channelId} keysExchanged=${null===(i=null===(r=s.communicationLayer)||void 0===r?void 0:r.getKeyInfo())||void 0===i?void 0:i.keysExchanged}`),s.analytics){const e=s.isOriginator?ek.REQUEST:ek.REQUEST_MOBILE;KS(Object.assign(Object.assign({id:null!==(o=s.channelId)&&void 0!==o?o:"",event:s.reconnection?ek.RECONNECT:e},s.originatorInfo),{commLayer:n,sdkVersion:s.sdkVersion,walletVersion:null===(a=s.walletInfo)||void 0===a?void 0:a.version,commLayerVersion:FE}),s.communicationServerUrl).catch((e=>{console.error("Cannot send analytics",e)}))}s.clientsConnected=!0,s.originatorInfoSent=!1,e.emit(t.EventType.CLIENTS_CONNECTED)}}function fk(e,n){return r=>{var i;const{state:o}=e;BS.RemoteCommunication(`[RemoteCommunication: handleClientsDisconnectedEvent()] context=${o.context} on 'clients_disconnected' channelId=${r}`),o.relayPersistence||(o.clientsConnected=!1,o.ready=!1,o.authorized=!1),e.emit(t.EventType.CLIENTS_DISCONNECTED,o.channelId),e.setConnectionStatus(t.ConnectionStatus.DISCONNECTED),o.analytics&&o.channelId&&KS({id:o.channelId,event:ek.DISCONNECTED,sdkVersion:o.sdkVersion,commLayer:n,commLayerVersion:FE,walletVersion:null===(i=o.walletInfo)||void 0===i?void 0:i.version},o.communicationServerUrl).catch((e=>{console.error("Cannot send analytics",e)}))}}function hk(e){return n=>{var r;const{state:i}=e;if(BS.RemoteCommunication(`[RemoteCommunication: handleClientsWaitingEvent()] context=${i.context} on 'clients_waiting' numberUsers=${n} ready=${i.ready} autoStarted=${i.originatorConnectStarted}`),e.setConnectionStatus(t.ConnectionStatus.WAITING),e.emit(t.EventType.CLIENTS_WAITING,n),i.originatorConnectStarted){BS.RemoteCommunication(`[RemoteCommunication: handleClientsWaitingEvent()] on 'clients_waiting' watch autoStarted=${i.originatorConnectStarted} timeout`,i.autoConnectOptions);const n=(null===(r=i.autoConnectOptions)||void 0===r?void 0:r.timeout)||3e3,o=setTimeout((()=>{BS.RemoteCommunication(`[RemoteCommunication: handleClientsWaitingEvent()] setTimeout(${n}) terminate channelConfig`,i.autoConnectOptions),i.originatorConnectStarted=!1,i.ready||e.setConnectionStatus(t.ConnectionStatus.TIMEOUT),clearTimeout(o)}),n)}}}function pk(e,n){return r=>{var i,o,a,s,u,l,c,d;const{state:f}=e;if(BS.RemoteCommunication(`[RemoteCommunication: handleKeysExchangedEvent()] context=${f.context} on commLayer.'keys_exchanged' channel=${f.channelId}`,r),null===(o=null===(i=f.communicationLayer)||void 0===i?void 0:i.getKeyInfo())||void 0===o?void 0:o.keysExchanged){const n=Object.assign(Object.assign({},f.channelConfig),{channelId:null!==(a=f.channelId)&&void 0!==a?a:"",validUntil:(null===(s=f.channelConfig)||void 0===s?void 0:s.validUntil)||HE,localKey:f.communicationLayer.getKeyInfo().ecies.private,otherKey:f.communicationLayer.getKeyInfo().ecies.otherPubKey});null===(u=f.storageManager)||void 0===u||u.persistChannelConfig(n).catch((e=>{console.error("Error persisting channel config",e)})),e.setConnectionStatus(t.ConnectionStatus.LINKED)}!function(e,t){var n,r,i,o,a,s,u,l;const{state:c}=e;BS.RemoteCommunication(`[RemoteCommunication: setLastActiveDate()] channel=${c.channelId}`,t);const d=Object.assign(Object.assign({},c.channelConfig),{channelId:null!==(n=c.channelId)&&void 0!==n?n:"",validUntil:null!==(i=null===(r=c.channelConfig)||void 0===r?void 0:r.validUntil)&&void 0!==i?i:0,relayPersistence:c.relayPersistence,localKey:null===(a=null===(o=c.communicationLayer)||void 0===o?void 0:o.state.keyExchange)||void 0===a?void 0:a.getKeyInfo().ecies.private,otherKey:null===(u=null===(s=c.communicationLayer)||void 0===s?void 0:s.state.keyExchange)||void 0===u?void 0:u.getKeyInfo().ecies.otherPubKey,lastActive:t.getTime()});null===(l=c.storageManager)||void 0===l||l.persistChannelConfig(d)}(e,new Date),f.analytics&&f.channelId&&KS({id:f.channelId,event:r.isOriginator?ek.CONNECTED:ek.CONNECTED_MOBILE,sdkVersion:f.sdkVersion,commLayer:n,commLayerVersion:FE,walletVersion:null===(l=f.walletInfo)||void 0===l?void 0:l.version},f.communicationServerUrl).catch((e=>{console.error("Cannot send analytics",e)})),f.isOriginator=r.isOriginator,r.isOriginator||(null===(c=f.communicationLayer)||void 0===c||c.sendMessage({type:t.MessageType.READY}),f.ready=!0,f.paused=!1),r.isOriginator&&!f.originatorInfoSent&&(null===(d=f.communicationLayer)||void 0===d||d.sendMessage({type:t.MessageType.ORIGINATOR_INFO,originatorInfo:f.originatorInfo,originator:f.originatorInfo}),f.originatorInfoSent=!0)}}function mk(e){return n=>{let r=n;n.message&&(r=r.message),function(e,n){const{state:r}=n;if(BS.RemoteCommunication(`[RemoteCommunication: onCommunicationLayerMessage()] context=${r.context} on 'message' typeof=${typeof e}`,e),n.state.ready=!0,r.isOriginator||e.type!==t.MessageType.ORIGINATOR_INFO)if(r.isOriginator&&e.type===t.MessageType.WALLET_INFO)!function(e,t){const{state:n}=e;n.walletInfo=t.walletInfo,n.paused=!1}(n,e);else{if(r.isOriginator&&e.type===t.MessageType.WALLET_INIT)(function(e,n){var r,i,o;return nS(this,void 0,void 0,(function*(){const{state:a}=e;if(a.isOriginator){const a=n.data||{};if("object"==typeof a&&"accounts"in a&&"chainId"in a&&"walletKey"in a)try{const{channelConfig:n}=e.state;if(BS.RemoteCommunication("WALLET_INIT: channelConfig",JSON.stringify(n,null,2)),n){const t=a.accounts,s=a.chainId,u=a.walletKey;yield null===(r=e.state.storageManager)||void 0===r?void 0:r.persistChannelConfig(Object.assign(Object.assign({},n),{otherKey:u,relayPersistence:!0})),yield null===(i=e.state.storageManager)||void 0===i?void 0:i.persistAccounts(t),yield null===(o=e.state.storageManager)||void 0===o?void 0:o.persistChainId(s)}e.emit(t.EventType.WALLET_INIT,{accounts:a.accounts,chainId:a.chainId})}catch(e){console.error('RemoteCommunication::on "wallet_init" -- error',e)}else console.error('RemoteCommunication::on "wallet_init" -- invalid data format',a)}}))})(n,e).catch((e=>{BS.RemoteCommunication(`[RemoteCommunication: onCommunicationLayerMessage()] error=${e}`)}));else if(e.type===t.MessageType.TERMINATE)!function(e){const{state:n}=e;n.isOriginator&&(yk({options:{terminate:!0,sendMessage:!1},instance:e}),console.debug(),e.emit(t.EventType.TERMINATE))}(n);else if(e.type===t.MessageType.PAUSE)!function(e){const{state:n}=e;n.paused=!0,e.setConnectionStatus(t.ConnectionStatus.PAUSED)}(n);else if(e.type===t.MessageType.READY&&r.isOriginator)!function(e){const{state:n}=e;e.setConnectionStatus(t.ConnectionStatus.LINKED);const r=n.paused;n.paused=!1,e.emit(t.EventType.CLIENTS_READY,{isOriginator:n.isOriginator,walletInfo:n.walletInfo}),r&&(n.authorized=!0,e.emit(t.EventType.AUTHORIZED))}(n);else{if(e.type===t.MessageType.OTP&&r.isOriginator)return void function(e,n){var r;const{state:i}=e;e.emit(t.EventType.OTP,n.otpAnswer),1==="6.6".localeCompare((null===(r=i.walletInfo)||void 0===r?void 0:r.version)||"")&&(console.warn("RemoteCommunication::on 'otp' -- backward compatibility <6.6 -- triger eth_requestAccounts"),e.emit(t.EventType.SDK_RPC_CALL,{method:WE.ETH_REQUESTACCOUNTS,params:[]}))}(n,e);e.type===t.MessageType.AUTHORIZED&&r.isOriginator&&function(e){const{state:n}=e;n.authorized=!0,e.emit(t.EventType.AUTHORIZED)}(n)}n.emit(t.EventType.MESSAGE,e)}else!function(e,n){var r;const{state:i}=e;null===(r=i.communicationLayer)||void 0===r||r.sendMessage({type:t.MessageType.WALLET_INFO,walletInfo:i.walletInfo}),i.originatorInfo=n.originatorInfo||n.originator,e.emit(t.EventType.CLIENTS_READY,{isOriginator:i.isOriginator,originatorInfo:i.originatorInfo}),i.paused=!1}(n,e)}(r,e)}}function gk(e){return()=>{const{state:t}=e;BS.RemoteCommunication("[RemoteCommunication: handleSocketReconnectEvent()] on 'socket_reconnect' -- reset key exchange status / set ready to false"),t.ready=!1,t.authorized=!1,$E(t),e.emitServiceStatusEvent({context:"socket_reconnect"})}}function vk(e){return()=>{const{state:t}=e;BS.RemoteCommunication("[RemoteCommunication: handleSocketDisconnectedEvent()] on 'socket_Disconnected' set ready to false"),t.ready=!1}}function bk(e){return()=>nS(this,void 0,void 0,(function*(){var n,r,i,o,a,s,u;const{state:l}=e;BS.RemoteCommunication(`[RemoteCommunication: handleFullPersistenceEvent()] context=${l.context}`),e.state.ready=!0,e.state.clientsConnected=!0,e.state.authorized=!0,e.state.relayPersistence=!0,null===(n=e.state.communicationLayer)||void 0===n||n.getKeyExchange().setKeysExchanged(!0),e.emit(t.EventType.KEYS_EXCHANGED,{keysExchanged:!0,isOriginator:!0}),e.emit(t.EventType.AUTHORIZED),e.emit(t.EventType.CLIENTS_READY),e.emit(t.EventType.CHANNEL_PERSISTENCE);try{l.channelConfig=Object.assign(Object.assign({},l.channelConfig),{localKey:null===(r=l.communicationLayer)||void 0===r?void 0:r.getKeyExchange().getKeyInfo().ecies.private,otherKey:null===(i=l.communicationLayer)||void 0===i?void 0:i.getKeyExchange().getOtherPublicKey(),channelId:null!==(o=l.channelId)&&void 0!==o?o:"",validUntil:null!==(s=null===(a=l.channelConfig)||void 0===a?void 0:a.validUntil)&&void 0!==s?s:HE,relayPersistence:!0}),yield null===(u=l.storageManager)||void 0===u?void 0:u.persistChannelConfig(l.channelConfig)}catch(e){console.error("Error persisting channel config",e)}}))}function yk({options:e,instance:n}){var r,i,o,a,s,u;const{state:l}=n;BS.RemoteCommunication(`[RemoteCommunication: disconnect()] channel=${l.channelId}`,e),l.ready=!1,l.paused=!1,(null==e?void 0:e.terminate)?(null===(r=l.storageManager)||void 0===r||r.terminate(null!==(i=l.channelId)&&void 0!==i?i:""),n.state.terminated=!0,e.sendMessage&&(null===(o=l.communicationLayer)||void 0===o?void 0:o.getKeyInfo().keysExchanged)&&(null===(a=l.communicationLayer)||void 0===a||a.sendMessage({type:t.MessageType.TERMINATE})),l.authorized=!1,l.relayPersistence=!1,l.channelId=Ow(),e.channelId=l.channelId,l.channelConfig=void 0,l.originatorConnectStarted=!1,null===(s=l.communicationLayer)||void 0===s||s.disconnect(e),n.setConnectionStatus(t.ConnectionStatus.TERMINATED)):(null===(u=l.communicationLayer)||void 0===u||u.disconnect(e),n.setConnectionStatus(t.ConnectionStatus.DISCONNECTED))}t.CommunicationLayerPreference=void 0,t.PlatformType=void 0,function(e){e.SOCKET="socket"}(t.CommunicationLayerPreference||(t.CommunicationLayerPreference={})),function(e){e.NonBrowser="nodejs",e.MetaMaskMobileWebview="in-app-browser",e.DesktopWeb="web-desktop",e.MobileWeb="web-mobile",e.ReactNative="react-native"}(t.PlatformType||(t.PlatformType={}));class wk extends xw.EventEmitter2{constructor({platformType:e,communicationLayerPreference:n,otherPublicKey:r,reconnect:i,walletInfo:o,dappMetadata:a,protocolVersion:s,transports:u,context:l,relayPersistence:c,ecies:d,analytics:f=!1,storage:h,sdkVersion:p,communicationServerUrl:m=KE,logging:g,autoConnect:v={timeout:3e3}}){super(),this.state={ready:!1,authorized:!1,isOriginator:!1,terminated:!1,protocolVersion:1,paused:!1,platformType:"metamask-mobile",analytics:!1,reconnection:!1,originatorInfoSent:!1,communicationServerUrl:KE,context:"",persist:!1,clientsConnected:!1,sessionDuration:HE,originatorConnectStarted:!1,debug:!1,_connectionStatus:t.ConnectionStatus.DISCONNECTED},this.state.otherPublicKey=r,this.state.dappMetadata=a,this.state.walletInfo=o,this.state.transports=u,this.state.platformType=e,this.state.analytics=f,this.state.protocolVersion=null!=s?s:1,this.state.isOriginator=!r,this.state.relayPersistence=c,this.state.communicationServerUrl=m,this.state.context=l,this.state.terminated=!1,this.state.sdkVersion=p,this.setMaxListeners(50),this.setConnectionStatus(t.ConnectionStatus.DISCONNECTED),(null==h?void 0:h.duration)&&(this.state.sessionDuration=HE),this.state.storageOptions=h,this.state.autoConnectOptions=v,this.state.debug=!0===(null==g?void 0:g.remoteLayer),!0===(null==g?void 0:g.remoteLayer)&&LS.enable("RemoteCommunication:Layer"),!0===(null==g?void 0:g.serviceLayer)&&LS.enable("SocketService:Layer"),!0===(null==g?void 0:g.eciesLayer)&&LS.enable("ECIES:Layer"),!0===(null==g?void 0:g.keyExchangeLayer)&&LS.enable("KeyExchange:Layer"),this.state.logging=g,(null==h?void 0:h.storageManager)&&(this.state.storageManager=h.storageManager),BS.RemoteCommunication(`[RemoteCommunication: constructor()] protocolVersion=${s} relayPersistence=${c} isOriginator=${this.state.isOriginator} communicationLayerPreference=${n} otherPublicKey=${r} reconnect=${i}`),this.initCommunicationLayer({communicationLayerPreference:n,otherPublicKey:r,reconnect:i,ecies:d,communicationServerUrl:m}),this.emitServiceStatusEvent({context:"constructor"})}initCommunicationLayer({communicationLayerPreference:e,otherPublicKey:n,reconnect:r,ecies:i,communicationServerUrl:o=KE}){return function({communicationLayerPreference:e,otherPublicKey:n,reconnect:r,ecies:i,communicationServerUrl:o=KE,instance:a}){var s,u,l,c,d,f,h,p,m,g,v;const{state:b}=a;if(BS.RemoteCommunication("[initCommunicationLayer()] ",JSON.stringify(b,null,2)),e!==t.CommunicationLayerPreference.SOCKET)throw new Error("Invalid communication protocol");b.communicationLayer=new sk({communicationLayerPreference:e,otherPublicKey:n,reconnect:r,transports:b.transports,communicationServerUrl:o,context:b.context,ecies:i,logging:b.logging,remote:a});let y="undefined"!=typeof document&&document.URL||"",w="undefined"!=typeof document&&document.title||"";(null===(s=b.dappMetadata)||void 0===s?void 0:s.url)&&(y=b.dappMetadata.url),(null===(u=b.dappMetadata)||void 0===u?void 0:u.name)&&(w=b.dappMetadata.name);const _=null!==(f=null!==(c=null===(l=b.dappMetadata)||void 0===l?void 0:l.name)&&void 0!==c?c:null===(d=b.dappMetadata)||void 0===d?void 0:d.url)&&void 0!==f?f:"N/A",S="undefined"!=typeof window&&void 0!==window.location&&null!==(h=window.location.hostname)&&void 0!==h?h:_,E={url:y,title:w,source:null===(p=b.dappMetadata)||void 0===p?void 0:p.source,dappId:S,icon:(null===(m=b.dappMetadata)||void 0===m?void 0:m.iconUrl)||(null===(g=b.dappMetadata)||void 0===g?void 0:g.base64Icon),platform:b.platformType,apiVersion:FE,connector:null===(v=b.dappMetadata)||void 0===v?void 0:v.connector};b.originatorInfo=E;const k={[t.EventType.AUTHORIZED]:lk(a),[t.EventType.MESSAGE]:mk(a),[t.EventType.CHANNEL_PERSISTENCE]:bk(a),[t.EventType.CLIENTS_CONNECTED]:dk(a,e),[t.EventType.KEYS_EXCHANGED]:pk(a,e),[t.EventType.SOCKET_DISCONNECTED]:vk(a),[t.EventType.SOCKET_RECONNECT]:gk(a),[t.EventType.CLIENTS_DISCONNECTED]:fk(a,e),[t.EventType.KEY_INFO]:()=>{},[t.EventType.CHANNEL_CREATED]:ck(a),[t.EventType.CLIENTS_WAITING]:hk(a),[t.EventType.RPC_UPDATE]:e=>{a.emit(t.EventType.RPC_UPDATE,e)}};for(const[e,t]of Object.entries(k))try{b.communicationLayer.on(e,t)}catch(n){console.error(`Error registering handler for ${e}:`,n)}}({communicationLayerPreference:e,otherPublicKey:n,reconnect:r,ecies:i,communicationServerUrl:o,instance:this})}initFromDappStorage(){return nS(this,void 0,void 0,(function*(){if(this.state.storageManager){const e=yield this.state.storageManager.getPersistedChannelConfig({});e&&(this.state.channelConfig=e,this.state.channelId=e.channelId,e.relayPersistence&&(this.state.authorized=!0,this.state.ready=!0,this.setConnectionStatus(t.ConnectionStatus.LINKED),yield this.connectToChannel({channelId:e.channelId})))}}))}originatorSessionConnect(){return nS(this,void 0,void 0,(function*(){return yield function(e){var t;return nS(this,void 0,void 0,(function*(){const{state:n}=e;if(!n.storageManager)return void BS.RemoteCommunication("[RemoteCommunication: originatorSessionConnect()] no storage manager defined - skip");const r=yield n.storageManager.getPersistedChannelConfig({});if(BS.RemoteCommunication(`[RemoteCommunication: originatorSessionConnect()] autoStarted=${n.originatorConnectStarted} channelConfig`,r),null===(t=n.communicationLayer)||void 0===t?void 0:t.isConnected())return BS.RemoteCommunication("[RemoteCommunication: originatorSessionConnect()] socket already connected - skip"),r;if(r){if(r.validUntil>Date.now())return n.channelConfig=r,n.originatorConnectStarted=!0,n.channelId=null==r?void 0:r.channelId,n.reconnection=!0,r;BS.RemoteCommunication("[RemoteCommunication: autoConnect()] Session has expired")}n.originatorConnectStarted=!1}))}(this)}))}generateChannelIdConnect(){return nS(this,void 0,void 0,(function*(){return function(e){var t,n,r,i,o,a;return nS(this,void 0,void 0,(function*(){if(!e.communicationLayer)throw new Error("communication layer not initialized");if(e.ready)throw new Error("Channel already connected");if(e.channelId&&(null===(t=e.communicationLayer)||void 0===t?void 0:t.isConnected()))return e.channelConfig=Object.assign(Object.assign({},e.channelConfig),{channelId:e.channelId,validUntil:Date.now()+e.sessionDuration}),null===(n=e.storageManager)||void 0===n||n.persistChannelConfig(e.channelConfig),{channelId:e.channelId,privKey:null===(i=null===(r=e.communicationLayer)||void 0===r?void 0:r.getKeyInfo())||void 0===i?void 0:i.ecies.private,pubKey:null===(a=null===(o=e.communicationLayer)||void 0===o?void 0:o.getKeyInfo())||void 0===a?void 0:a.ecies.public};BS.RemoteCommunication("[RemoteCommunication: generateChannelId()]");const s=yield e.communicationLayer.createChannel();BS.RemoteCommunication("[RemoteCommunication: generateChannelId()] channel created",s);const u=Object.assign(Object.assign({},e.channelConfig),{channelId:s.channelId,localKey:s.privKey,validUntil:Date.now()+e.sessionDuration});return e.channelId=s.channelId,e.channelConfig=u,{channelId:e.channelId,pubKey:s.pubKey,privKey:s.privKey}}))}(this.state)}))}clean(){return $E(this.state)}connectToChannel({channelId:e,withKeyExchange:t,authorized:n}){return function({channelId:e,withKeyExchange:t,authorized:n,state:r}){var i,o,a;return nS(this,void 0,void 0,(function*(){if(!Pw(e))throw BS.RemoteCommunication(`[RemoteCommunication: connectToChannel()] context=${r.context} invalid channel channelId=${e}`),new Error(`Invalid channel ${e}`);if(BS.RemoteCommunication(`[RemoteCommunication: connectToChannel()] context=${r.context} channelId=${e} withKeyExchange=${t}`),null===(i=r.communicationLayer)||void 0===i?void 0:i.isConnected())return void BS.RemoteCommunication(`[RemoteCommunication: connectToChannel()] context=${r.context} already connected - interrupt connection.`);r.channelId=e,yield null===(o=r.communicationLayer)||void 0===o?void 0:o.connectToChannel({channelId:e,authorized:n,withKeyExchange:t});const s=Object.assign(Object.assign({},r.channelConfig),{channelId:e,validUntil:Date.now()+r.sessionDuration});r.channelConfig=s,null===(a=r.storageManager)||void 0===a||a.persistChannelConfig(s)}))}({channelId:e,authorized:n,withKeyExchange:t,state:this.state})}sendMessage(e){return function(e,n){var r,i;return nS(this,void 0,void 0,(function*(){const{state:o}=e;BS.RemoteCommunication(`[RemoteCommunication: sendMessage()] context=${o.context} paused=${o.paused} ready=${o.ready} relayPersistence=${o.relayPersistence} authorized=${o.authorized} socket=${null===(r=o.communicationLayer)||void 0===r?void 0:r.isConnected()} clientsConnected=${o.clientsConnected} status=${o._connectionStatus}`,n),o.relayPersistence||o.ready&&(null===(i=o.communicationLayer)||void 0===i?void 0:i.isConnected())&&o.clientsConnected||(BS.RemoteCommunication(`[RemoteCommunication: sendMessage()] context=${o.context} SKIP message waiting for MM mobile readiness.`),yield new Promise((n=>{e.once(t.EventType.CLIENTS_READY,n)})),BS.RemoteCommunication(`[RemoteCommunication: sendMessage()] context=${o.context} AFTER SKIP / READY -- sending pending message`));try{yield function(e,n){return nS(this,void 0,void 0,(function*(){return new Promise((r=>{var i;const{state:o}=e;BS.RemoteCommunication(`[RemoteCommunication: handleAuthorization()] context=${o.context} ready=${o.ready} authorized=${o.authorized} method=${n.method}`),!o.isOriginator||o.authorized||o.relayPersistence?(null===(i=o.communicationLayer)||void 0===i||i.sendMessage(n),r()):e.once(t.EventType.AUTHORIZED,(()=>{var e;BS.RemoteCommunication(`[RemoteCommunication: handleAuthorization()] context=${o.context} AFTER SKIP / AUTHORIZED -- sending pending message`),null===(e=o.communicationLayer)||void 0===e||e.sendMessage(n),r()}))}))}))}(e,n)}catch(e){throw console.error(`[RemoteCommunication: sendMessage()] context=${o.context} ERROR`,e),e}}))}(this,e)}testStorage(){return nS(this,void 0,void 0,(function*(){return function(e){var t;return nS(this,void 0,void 0,(function*(){const n=yield null===(t=e.storageManager)||void 0===t?void 0:t.getPersistedChannelConfig();BS.RemoteCommunication("[RemoteCommunication: testStorage()] res",n)}))}(this.state)}))}getChannelConfig(){return this.state.channelConfig}isReady(){return this.state.ready}isConnected(){var e;return null===(e=this.state.communicationLayer)||void 0===e?void 0:e.isConnected()}isAuthorized(){return this.state.authorized}isPaused(){return this.state.paused}getCommunicationLayer(){return this.state.communicationLayer}ping(){var e;BS.RemoteCommunication(`[RemoteCommunication: ping()] channel=${this.state.channelId}`),null===(e=this.state.communicationLayer)||void 0===e||e.ping()}testLogger(){BS.RemoteCommunication(`testLogger() channel=${this.state.channelId}`),BS.SocketService(`testLogger() channel=${this.state.channelId}`),BS.Ecies(`testLogger() channel=${this.state.channelId}`),BS.KeyExchange(`testLogger() channel=${this.state.channelId}`)}keyCheck(){var e;BS.RemoteCommunication(`[RemoteCommunication: keyCheck()] channel=${this.state.channelId}`),null===(e=this.state.communicationLayer)||void 0===e||e.keyCheck()}setConnectionStatus(e){this.state._connectionStatus!==e&&(this.state._connectionStatus=e,this.emit(t.EventType.CONNECTION_STATUS,e),this.emitServiceStatusEvent({context:"setConnectionStatus"}))}emitServiceStatusEvent(e={}){this.emit(t.EventType.SERVICE_STATUS,this.getServiceStatus())}getConnectionStatus(){return this.state._connectionStatus}getServiceStatus(){return{originatorInfo:this.state.originatorInfo,keyInfo:this.getKeyInfo(),connectionStatus:this.state._connectionStatus,channelConfig:this.state.channelConfig,channelId:this.state.channelId}}getKeyInfo(){var e;return null===(e=this.state.communicationLayer)||void 0===e?void 0:e.getKeyInfo()}resetKeys(){var e;null===(e=this.state.communicationLayer)||void 0===e||e.resetKeys()}setOtherPublicKey(e){var t;const n=null===(t=this.state.communicationLayer)||void 0===t?void 0:t.getKeyExchange();if(!n)throw new Error("KeyExchange is not initialized.");n.getOtherPublicKey()!==e&&n.setOtherPublicKey(e)}pause(){var e;BS.RemoteCommunication(`[RemoteCommunication: pause()] channel=${this.state.channelId}`),null===(e=this.state.communicationLayer)||void 0===e||e.pause(),this.setConnectionStatus(t.ConnectionStatus.PAUSED)}getVersion(){return FE}hasRelayPersistence(){var e;return null!==(e=this.state.relayPersistence)&&void 0!==e&&e}resume(){return function(e){var n;const{state:r}=e;BS.RemoteCommunication(`[RemoteCommunication: resume()] channel=${r.channelId}`),null===(n=r.communicationLayer)||void 0===n||n.resume(),e.setConnectionStatus(t.ConnectionStatus.LINKED)}(this)}encrypt(e){var t,n,r;const i=null===(t=this.state.communicationLayer)||void 0===t?void 0:t.getKeyExchange(),o=null==i?void 0:i.getOtherPublicKey();if(!o)throw new Error("KeyExchange not completed");return null===(r=null===(n=this.state.communicationLayer)||void 0===n?void 0:n.state.eciesInstance)||void 0===r?void 0:r.encrypt(e,o)}decrypt(e){var t,n,r;if(!(null===(t=this.state.communicationLayer)||void 0===t?void 0:t.state.eciesInstance))throw new Error("ECIES instance is not initialized");return null===(r=null===(n=this.state.communicationLayer)||void 0===n?void 0:n.state.eciesInstance)||void 0===r?void 0:r.decrypt(e)}getChannelId(){return this.state.channelId}getRPCMethodTracker(){var e;return null===(e=this.state.communicationLayer)||void 0===e?void 0:e.getRPCMethodTracker()}disconnect(e){return yk({options:e,instance:this})}}function _k(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function Sk(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function Ek(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}!function(e){e.RENEW="renew",e.LINK="link"}(uk||(uk={})),"function"==typeof SuppressedError&&SuppressedError;var kk="ERC721",Mk="ERC1155",Ck={errors:{disconnected:()=>"MetaMask: Disconnected from chain. Attempting to connect.",permanentlyDisconnected:()=>"MetaMask: Disconnected from MetaMask background. Page reload required.",sendSiteMetadata:()=>"MetaMask: Failed to send site metadata. This is an internal error, please report this bug.",unsupportedSync:e=>`MetaMask: The MetaMask Ethereum provider does not support synchronous methods like ${e} without a callback parameter.`,invalidDuplexStream:()=>"Must provide a Node.js-style duplex stream.",invalidNetworkParams:()=>"MetaMask: Received invalid network parameters. Please report this bug.",invalidRequestArgs:()=>"Expected a single, non-array, object argument.",invalidRequestMethod:()=>"'args.method' must be a non-empty string.",invalidRequestParams:()=>"'args.params' must be an object or array if provided.",invalidLoggerObject:()=>"'args.logger' must be an object if provided.",invalidLoggerMethod:e=>`'args.logger' must include required method '${e}'.`},info:{connected:e=>`MetaMask: Connected to chain with ID "${e}".`},warnings:{chainIdDeprecation:"MetaMask: 'ethereum.chainId' is deprecated and may be removed in the future. Please use the 'eth_chainId' RPC method instead.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/discussions/23",networkVersionDeprecation:"MetaMask: 'ethereum.networkVersion' is deprecated and may be removed in the future. Please use the 'net_version' RPC method instead.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/discussions/23",selectedAddressDeprecation:"MetaMask: 'ethereum.selectedAddress' is deprecated and may be removed in the future. Please use the 'eth_accounts' RPC method instead.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/discussions/23",enableDeprecation:"MetaMask: 'ethereum.enable()' is deprecated and may be removed in the future. Please use the 'eth_requestAccounts' RPC method instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1102",sendDeprecation:"MetaMask: 'ethereum.send(...)' is deprecated and may be removed in the future. Please use 'ethereum.sendAsync(...)' or 'ethereum.request(...)' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193",events:{close:"MetaMask: The event 'close' is deprecated and may be removed in the future. Please use 'disconnect' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#disconnect",data:"MetaMask: The event 'data' is deprecated and will be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message",networkChanged:"MetaMask: The event 'networkChanged' is deprecated and may be removed in the future. Use 'chainChanged' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#chainchanged",notification:"MetaMask: The event 'notification' is deprecated and may be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message"},rpc:{ethDecryptDeprecation:"MetaMask: The RPC method 'eth_decrypt' is deprecated and may be removed in the future.\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686",ethGetEncryptionPublicKeyDeprecation:"MetaMask: The RPC method 'eth_getEncryptionPublicKey' is deprecated and may be removed in the future.\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686",walletWatchAssetNFTExperimental:"MetaMask: The RPC method 'wallet_watchAsset' is experimental for ERC721/ERC1155 assets and may change in the future.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/blob/main/MIPs/mip-1.md and https://github.com/MetaMask/metamask-improvement-proposals/blob/main/PROCESS-GUIDE.md#proposal-lifecycle"},experimentalMethods:"MetaMask: 'ethereum._metamask' exposes non-standard, experimental methods. They may be removed or changed without warning."}},xk=Ck;function Ak(e){const t={ethDecryptDeprecation:!1,ethGetEncryptionPublicKeyDeprecation:!1,walletWatchAssetNFTExperimental:!1};return(n,r,i)=>{t.ethDecryptDeprecation||"eth_decrypt"!==n.method?t.ethGetEncryptionPublicKeyDeprecation||"eth_getEncryptionPublicKey"!==n.method?!t.walletWatchAssetNFTExperimental&&"wallet_watchAsset"===n.method&&[kk,Mk].includes(n.params?.type||"")&&(e.warn(xk.warnings.rpc.walletWatchAssetNFTExperimental),t.walletWatchAssetNFTExperimental=!0):(e.warn(xk.warnings.rpc.ethGetEncryptionPublicKeyDeprecation),t.ethGetEncryptionPublicKeyDeprecation=!0):(e.warn(xk.warnings.rpc.ethDecryptDeprecation),t.ethDecryptDeprecation=!0),i()}}var Tk=4294967295,Rk=Math.floor(Math.random()*Tk);function Pk(){return(e,t,n,r)=>{const i=e.id,o=Rk=(Rk+1)%Tk;e.id=o,t.id=o,n((n=>{e.id=i,t.id=i,n()}))}}var Lk=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ik=(e,t,n)=>(Lk(e,t,"read from private field"),n?n.call(e):t.get(e)),Ok=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Nk=(e,t,n,r)=>(Lk(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Dk=(e,t,n)=>(Lk(e,t,"access private method"),n),Bk={invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},jk={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};function zk(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)}var Uk=(e,t)=>Object.hasOwnProperty.call(e,t);class Fk extends TypeError{constructor(e,t){let n;const{message:r,explanation:i,...o}=e,{path:a}=e,s=0===a.length?r:`At path: ${a.join(".")} -- ${r}`;super(i??s),null!=i&&(this.cause=s),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...t()])}}function Kk(e){return"object"==typeof e&&null!=e}function qk(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function Hk(e,t,n,r){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:i,branch:o}=t,{type:a}=n,{refinement:s,message:u=`Expected a value of type \`${a}\`${s?` with refinement \`${s}\``:""}, but received: \`${qk(r)}\``}=e;return{value:r,type:a,refinement:s,key:i[i.length-1],path:i,branch:o,...e,message:u}}function*Wk(e,t,n,r){(function(e){return Kk(e)&&"function"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(const i of e){const e=Hk(i,t,n,r);e&&(yield e)}}function*$k(e,t,n={}){const{path:r=[],branch:i=[e],coerce:o=!1,mask:a=!1}=n,s={path:r,branch:i};if(o&&(e=t.coercer(e,s),a&&"type"!==t.type&&Kk(t.schema)&&Kk(e)&&!Array.isArray(e)))for(const n in e)void 0===t.schema[n]&&delete e[n];let u="valid";for(const r of t.validator(e,s))r.explanation=n.message,u="not_valid",yield[r,void 0];for(let[l,c,d]of t.entries(e,s)){const t=$k(c,d,{path:void 0===l?r:[...r,l],branch:void 0===l?i:[...i,c],coerce:o,mask:a,message:n.message});for(const n of t)n[0]?(u=null!=n[0].refinement?"not_refined":"not_valid",yield[n[0],void 0]):o&&(c=n[1],void 0===l?e=c:e instanceof Map?e.set(l,c):e instanceof Set?e.add(c):Kk(e)&&(void 0!==c||l in e)&&(e[l]=c))}if("not_valid"!==u)for(const r of t.refiner(e,s))r.explanation=n.message,u="not_refined",yield[r,void 0];"valid"===u&&(yield[void 0,e])}class Vk{constructor(e){const{type:t,schema:n,validator:r,refiner:i,coercer:o=(e=>e),entries:a=function*(){}}=e;this.type=t,this.schema=n,this.entries=a,this.coercer=o,this.validator=r?(e,t)=>Wk(r(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>Wk(i(e,t),t,this,e):()=>[]}assert(e,t){return Yk(e,this,t)}create(e,t){return Gk(e,this,t)}is(e){return Zk(e,this)}mask(e,t){return function(e,t,n){const r=Qk(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}(e,this,t)}validate(e,t={}){return Qk(e,this,t)}}function Yk(e,t,n){const r=Qk(e,t,{message:n});if(r[0])throw r[0]}function Gk(e,t,n){const r=Qk(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function Zk(e,t){return!Qk(e,t)[0]}function Qk(e,t,n={}){const r=$k(e,t,n),i=function(e){const{done:t,value:n}=e.next();return t?void 0:n}(r);return i[0]?[new Fk(i[0],(function*(){for(const e of r)e[0]&&(yield e[0])})),void 0]:[void 0,i[1]]}function Xk(e,t){return new Vk({type:e,schema:null,validator:t})}function Jk(e){let t;return new Vk({type:"lazy",schema:null,*entries(n,r){t??(t=e()),yield*t.entries(n,r)},validator:(n,r)=>(t??(t=e()),t.validator(n,r)),coercer:(n,r)=>(t??(t=e()),t.coercer(n,r)),refiner:(n,r)=>(t??(t=e()),t.refiner(n,r))})}function eM(e){return new Vk({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${qk(e)}`})}function tM(e){const t=qk(e),n=typeof e;return new Vk({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||`Expected the literal \`${t}\`, but received: ${qk(n)}`})}function nM(){return Xk("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${qk(e)}`))}function rM(e){const t=e?Object.keys(e):[],n=Xk("never",(()=>!1));return new Vk({type:"object",schema:e||null,*entries(r){if(e&&Kk(r)){const i=new Set(Object.keys(r));for(const n of t)i.delete(n),yield[n,r[n],e[n]];for(const e of i)yield[e,r[e],n]}},validator:e=>Kk(e)||`Expected an object, but received: ${qk(e)}`,coercer:e=>Kk(e)?{...e}:e})}function iM(e){return new Vk({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})}function oM(e,t){return new Vk({type:"record",schema:null,*entries(n){if(Kk(n))for(const r in n){const i=n[r];yield[r,r,e],yield[r,i,t]}},validator:e=>Kk(e)||`Expected an object, but received: ${qk(e)}`})}function aM(){return Xk("string",(e=>"string"==typeof e||`Expected a string, but received: ${qk(e)}`))}function sM(e){const t=e.map((e=>e.type)).join(" | ");return new Vk({type:"union",schema:null,coercer(t){for(const n of e){const[e,r]=n.validate(t,{coerce:!0});if(!e)return r}return t},validator(n,r){const i=[];for(const t of e){const[...e]=$k(n,t,r),[o]=e;if(!o[0])return[];for(const[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${qk(n)}`,...i]}})}function uM(e){return function(e){return function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)&&"string"==typeof e.message?e.message:function(e){return null==e}(e)?"":String(e)}(e).replace(/\.$/u,"")}function lM(e,t){return n=e,Boolean("string"==typeof n?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var n}var cM=class extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}},dM=e=>rM(e);function fM({path:e,branch:t}){const n=e[e.length-1];return Uk(t[t.length-2],n)}function hM(e){return new Vk({...e,type:`optional ${e.type}`,validator:(t,n)=>!fM(n)||e.validator(t,n),refiner:(t,n)=>!fM(n)||e.refiner(t,n)})}var pM,mM,gM,vM=sM([tM(null),Xk("boolean",(e=>"boolean"==typeof e)),Xk("finite number",(e=>Zk(e,nM())&&Number.isFinite(e))),aM(),eM(Jk((()=>vM))),oM(aM(),Jk((()=>vM)))]),bM=(pM=vM,mM=Xk("any",(()=>!0)),gM=e=>(function(e,t,n="Assertion failed",r=cM){try{Yk(e,t)}catch(e){throw lM(r,`${n}: ${uM(e)}.`)}}(e,vM),JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t})))),new Vk({...pM,coercer:(e,t)=>Zk(e,mM)?pM.coercer(gM(e,t),t):pM.coercer(e,t)}));function yM(e){try{return function(e){Gk(e,bM)}(e),!0}catch{return!1}}var wM=tM("2.0"),_M=function(e){return new Vk({...e,validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)})}(sM([nM(),aM()])),SM=dM({code:Xk("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${qk(e)}`)),message:aM(),data:hM(bM),stack:hM(aM())}),EM=sM([oM(aM(),bM),eM(bM)]),kM=dM({id:_M,jsonrpc:wM,method:aM(),params:hM(EM)}),MM=dM({jsonrpc:wM,method:aM(),params:hM(EM)});function CM(e){return Zk(e,kM)}function xM(e){return Zk(e,SM)}rM({id:_M,jsonrpc:wM,result:iM(Xk("unknown",(()=>!0))),error:iM(SM)}),sM([dM({id:_M,jsonrpc:wM,result:bM}),dM({id:_M,jsonrpc:wM,error:SM})]);var AM,TM,RM={exports:{}};function PM(){if(TM)return AM;TM=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=7*r,o=365.25*r;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return AM=function(s,u){u=u||{};var l=typeof s;if("string"===l&&s.length>0)return function(a){if(!((a=String(a)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(s){var u=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*i;case"days":case"day":case"d":return u*r;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}}}(s);if("number"===l&&isFinite(s))return u.long?function(i){var o=Math.abs(i);return o>=r?a(i,o,r,"day"):o>=n?a(i,o,n,"hour"):o>=t?a(i,o,t,"minute"):o>=e?a(i,o,e,"second"):i+" ms"}(s):function(i){var o=Math.abs(i);return o>=r?Math.round(i/r)+"d":o>=n?Math.round(i/n)+"h":o>=t?Math.round(i/t)+"m":o>=e?Math.round(i/e)+"s":i+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))}}var LM=function(e){function t(e){let r,i,o,a=null;function s(...e){if(!s.enabled)return;const n=s,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";a++;const o=t.formatters[i];if("function"==typeof o){const t=e[a];r=o.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=PM(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t};!function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==je&&"env"in je&&(e=je.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=LM(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(RM,RM.exports);var IM=i(RM.exports),OM=Bk.internal,NM="Unspecified error message. This is a bug, please report it.",DM={code:OM,message:jM(OM)},BM="Unspecified server error.";function jM(e,t=NM){if(function(e){return Number.isInteger(e)}(e)){const t=e.toString();if(Uk(jk,t))return jk[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return BM}return t}function zM(e,{fallbackError:t=DM,shouldIncludeStack:n=!0}={}){if(!xM(t))throw new Error("Must provide fallback error with integer number code and string message.");const r=function(e,t){return e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize?e.serialize():xM(e)?e:{...t,data:{cause:UM(e)}}}(e,t);return n||delete r.stack,r}function UM(e){return Array.isArray(e)?e.map((e=>yM(e)?e:zk(e)?FM(e):null)):zk(e)?FM(e):yM(e)?e:null}function FM(e){return Object.getOwnPropertyNames(e).reduce(((t,n)=>{const r=e[n];return yM(r)&&(t[n]=r),t}),{})}var KM=YM;YM.default=YM,YM.stable=XM,YM.stableStringify=XM;var qM="[...]",HM="[Circular]",WM=[],$M=[];function VM(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function YM(e,t,n,r){var i;void 0===r&&(r=VM()),ZM(e,"",0,[],void 0,0,r);try{i=0===$M.length?JSON.stringify(e,t,n):JSON.stringify(e,eC(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==WM.length;){var o=WM.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return i}function GM(e,t,n,r){var i=Object.getOwnPropertyDescriptor(r,n);void 0!==i.get?i.configurable?(Object.defineProperty(r,n,{value:e}),WM.push([r,n,t,i])):$M.push([t,n,e]):(r[n]=e,WM.push([r,n,t]))}function ZM(e,t,n,r,i,o,a){var s;if(o+=1,"object"==typeof e&&null!==e){for(s=0;s<r.length;s++)if(r[s]===e)return void GM(HM,e,t,i);if(void 0!==a.depthLimit&&o>a.depthLimit)return void GM(qM,e,t,i);if(void 0!==a.edgesLimit&&n+1>a.edgesLimit)return void GM(qM,e,t,i);if(r.push(e),Array.isArray(e))for(s=0;s<e.length;s++)ZM(e[s],s,s,r,e,o,a);else{var u=Object.keys(e);for(s=0;s<u.length;s++){var l=u[s];ZM(e[l],l,s,r,e,o,a)}}r.pop()}}function QM(e,t){return e<t?-1:e>t?1:0}function XM(e,t,n,r){void 0===r&&(r=VM());var i,o=JM(e,"",0,[],void 0,0,r)||e;try{i=0===$M.length?JSON.stringify(o,t,n):JSON.stringify(o,eC(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==WM.length;){var a=WM.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}}return i}function JM(e,t,n,r,i,o,a){var s;if(o+=1,"object"==typeof e&&null!==e){for(s=0;s<r.length;s++)if(r[s]===e)return void GM(HM,e,t,i);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==a.depthLimit&&o>a.depthLimit)return void GM(qM,e,t,i);if(void 0!==a.edgesLimit&&n+1>a.edgesLimit)return void GM(qM,e,t,i);if(r.push(e),Array.isArray(e))for(s=0;s<e.length;s++)JM(e[s],s,s,r,e,o,a);else{var u={},l=Object.keys(e).sort(QM);for(s=0;s<l.length;s++){var c=l[s];JM(e[c],c,s,r,e,o,a),u[c]=e[c]}if(void 0===i)return u;WM.push([i,t,e]),i[t]=u}r.pop()}}function eC(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if($M.length>0)for(var r=0;r<$M.length;r++){var i=$M[r];if(i[1]===t&&i[0]===n){n=i[2],$M.splice(r,1);break}}return e.call(this,t,n)}}var tC=i(KM),nC=class extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a non-empty string.');super(t),this.code=e,void 0!==n&&(this.data=n)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}}(this.data)&&(e.data.cause=UM(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return tC(this.serialize(),rC,2)}};function rC(e,t){if("[Circular]"!==t)return t}var iC=e=>oC(Bk.invalidRequest,e);function oC(e,t){const[n,r]=function(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t??void 0,n]}}return[]}(t);return new nC(e,n??jM(e),r)}var aC={};Object.defineProperty(aC,"__esModule",{value:!0});const sC=rt;function uC(e,t,n){try{Reflect.apply(e,t,n)}catch(e){setTimeout((()=>{throw e}))}}let lC=class extends sC.EventEmitter{emit(e,...t){let n="error"===e;const r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const n=new Error("Unhandled error."+(e?` (${e.message})`:""));throw n.context=e,n}const i=r[e];if(void 0===i)return!1;if("function"==typeof i)uC(i,this,t);else{const e=i.length,n=function(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r+=1)n[r]=e[r];return n}(i);for(let r=0;r<e;r+=1)uC(n[r],this,t)}return!0}};var cC,dC,fC,hC,pC,mC,gC,vC,bC,yC,wC,_C,SC,EC,kC,MC,CC,xC,AC,TC=aC.default=lC,RC=class e extends TC{constructor({notificationHandler:e}={}){super(),Ok(this,hC),Ok(this,mC),Ok(this,vC),Ok(this,cC,!1),Ok(this,dC,void 0),Ok(this,fC,void 0),Nk(this,dC,[]),Nk(this,fC,e)}destroy(){Ik(this,dC).forEach((e=>{"destroy"in e&&"function"==typeof e.destroy&&e.destroy()})),Nk(this,dC,[]),Nk(this,cC,!0)}push(e){Dk(this,hC,pC).call(this),Ik(this,dC).push(e)}handle(e,t){if(Dk(this,hC,pC).call(this),t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?Dk(this,mC,gC).call(this,e,t):Dk(this,mC,gC).call(this,e):t?Dk(this,vC,bC).call(this,e,t):this._promiseHandle(e)}asMiddleware(){return Dk(this,hC,pC).call(this),async(t,n,r,i)=>{var o,a;try{const[s,u,l]=await Dk(o=e,_C,SC).call(o,t,n,Ik(this,dC));return u?(await Dk(a=e,MC,CC).call(a,l),i(s)):r((async t=>{var n;try{await Dk(n=e,MC,CC).call(n,l)}catch(e){return t(e)}return t()}))}catch(e){return i(e)}}}async _promiseHandle(e){return new Promise(((t,n)=>{Dk(this,vC,bC).call(this,e,((e,r)=>{e&&void 0===r?n(e):t(r)})).catch(n)}))}};cC=new WeakMap,dC=new WeakMap,fC=new WeakMap,hC=new WeakSet,pC=function(){if(Ik(this,cC))throw new Error("This engine is destroyed and can no longer be used.")},mC=new WeakSet,gC=async function(e,t){try{if(0===e.length){const e=[{id:null,jsonrpc:"2.0",error:new nC(Bk.invalidRequest,"Request batch must contain plain objects. Received an empty array")}];return t?t(null,e):e}const n=(await Promise.all(e.map(this._promiseHandle.bind(this)))).filter((e=>void 0!==e));return t?t(null,n):n}catch(e){if(t)return t(e);throw e}},vC=new WeakSet,bC=async function(e,t){var n;if(!e||Array.isArray(e)||"object"!=typeof e){const n=new nC(Bk.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(n,{id:null,jsonrpc:"2.0",error:n})}if("string"!=typeof e.method){const n=new nC(Bk.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return Ik(this,fC)&&!CM(e)?t(null):t(n,{id:e.id??null,jsonrpc:"2.0",error:n})}if(Ik(this,fC)&&function(e){return Zk(e,MM)}(e)&&!CM(e)){try{await Ik(this,fC).call(this,e)}catch(e){return t(e)}return t(null)}let r=null;const i={...e},o={id:i.id,jsonrpc:i.jsonrpc};try{await Dk(n=RC,yC,wC).call(n,i,o,Ik(this,dC))}catch(e){r=e}return r&&(delete o.result,o.error||(o.error=zM(r))),t(r,o)},yC=new WeakSet,wC=async function(e,t,n){var r,i,o;const[a,s,u]=await Dk(r=RC,_C,SC).call(r,e,t,n);if(Dk(i=RC,xC,AC).call(i,e,t,s),await Dk(o=RC,MC,CC).call(o,u),a)throw a},_C=new WeakSet,SC=async function(e,t,n){var r;const i=[];let o=null,a=!1;for(const s of n)if([o,a]=await Dk(r=RC,EC,kC).call(r,e,t,s,i),a)break;return[o,a,i.reverse()]},EC=new WeakSet,kC=async function(e,t,n,r){return new Promise((i=>{const o=e=>{const n=e||t.error;n&&(t.error=zM(n)),i([n,!0])},a=n=>{t.error?o(t.error):(n&&("function"!=typeof n&&o(new nC(Bk.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof n}" for request:\n${LC(e)}`,{request:e})),r.push(n)),i([null,!1]))};try{n(e,t,a,o)}catch(e){o(e)}}))},MC=new WeakSet,CC=async function(e){for(const t of e)await new Promise(((e,n)=>{t((t=>t?n(t):e()))}))},xC=new WeakSet,AC=function(e,t,n){if(!Uk(t,"result")&&!Uk(t,"error"))throw new nC(Bk.internal,`JsonRpcEngine: Response has no error or result for request:\n${LC(e)}`,{request:e});if(!n)throw new nC(Bk.internal,`JsonRpcEngine: Nothing ended request:\n${LC(e)}`,{request:e})},Ok(RC,yC),Ok(RC,_C),Ok(RC,EC),Ok(RC,MC),Ok(RC,xC);var PC=RC;function LC(e){return JSON.stringify(e,null,2)}var IC=Object.freeze(["eth_subscription"]),OC=(e=console)=>[Pk(),NC(e),Ak(e)];function NC(e){return(t,n,r)=>{"string"==typeof t.method&&t.method||(n.error=iC({message:"The request 'method' must be a non-empty string.",data:t})),r((t=>{const{error:r}=n;return r?(e.error(`MetaMask - RPC Error: ${r.message}`,r),t()):t()}))}}var DC=(e,t,n=!0)=>(r,i)=>{r||i.error?t(r||i.error):!n||Array.isArray(i)?e(i):e(i.result)},BC=e=>Boolean(e)&&"string"==typeof e&&e.startsWith("0x"),jC=()=>{};async function zC(e,t){try{const t=await async function(){return{name:UC(window),icon:await FC(window)}}();e.handle({jsonrpc:"2.0",id:1,method:"metamask_sendDomainMetadata",params:t},jC)}catch(e){t.error({message:xk.errors.sendSiteMetadata(),originalError:e})}}function UC(e){const{document:t}=e,n=t.querySelector('head > meta[property="og:site_name"]');if(n)return n.content;const r=t.querySelector('head > meta[name="title"]');return r?r.content:t.title&&t.title.length>0?t.title:window.location.hostname}async function FC(e){const{document:t}=e,n=t.querySelectorAll('head > link[rel~="icon"]');for(const e of Array.from(n))if(e&&await KC(e.href))return e.href;return null}async function KC(e){return new Promise(((t,n)=>{try{const n=document.createElement("img");n.onload=()=>t(!0),n.onerror=()=>t(!1),n.src=e}catch(e){n(e)}}))}var qC=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},HC=(e,t,n)=>(qC(e,t,"read from private field"),n?n.call(e):t.get(e)),WC=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},$C=(e,t,n,r)=>(qC(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);function VC(e,t,n){try{Reflect.apply(e,t,n)}catch(e){setTimeout((()=>{throw e}))}}class YC extends Qe{emit(e,...t){let n="error"===e;const r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const n=new Error("Unhandled error."+(e?` (${e.message})`:""));throw n.context=e,n}const i=r[e];if(void 0===i)return!1;if("function"==typeof i)VC(i,this,t);else{const e=i.length,n=function(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r+=1)n[r]=e[r];return n}(i);for(let r=0;r<e;r+=1)VC(n[r],this,t)}return!0}}var GC,ZC,QC=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){var a=o[i];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n},XC=i(QC),JC=class e extends YC{constructor({logger:t=console,maxEventListeners:n=100,rpcMiddleware:r=[]}={}){super(),WC(this,GC,void 0),WC(this,ZC,void 0),this._log=t,this.setMaxListeners(n),this._state={...e._defaultState},$C(this,ZC,null),$C(this,GC,null),this._handleAccountsChanged=this._handleAccountsChanged.bind(this),this._handleConnect=this._handleConnect.bind(this),this._handleChainChanged=this._handleChainChanged.bind(this),this._handleDisconnect=this._handleDisconnect.bind(this),this._handleUnlockStateChanged=this._handleUnlockStateChanged.bind(this),this._rpcRequest=this._rpcRequest.bind(this),this.request=this.request.bind(this);const i=new PC;r.forEach((e=>i.push(e))),this._rpcEngine=i}get chainId(){return HC(this,GC)}get selectedAddress(){return HC(this,ZC)}isConnected(){return this._state.isConnected}async request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw iC({message:xk.errors.invalidRequestArgs(),data:e});const{method:t,params:n}=e;if("string"!=typeof t||0===t.length)throw iC({message:xk.errors.invalidRequestMethod(),data:e});if(void 0!==n&&!Array.isArray(n)&&("object"!=typeof n||null===n))throw iC({message:xk.errors.invalidRequestParams(),data:e});const r=null==n?{method:t}:{method:t,params:n};return new Promise(((e,t)=>{this._rpcRequest(r,DC(e,t))}))}_initializeState(e){if(this._state.initialized)throw new Error("Provider already initialized.");if(e){const{accounts:t,chainId:n,isUnlocked:r,networkVersion:i}=e;this._handleConnect(n),this._handleChainChanged({chainId:n,networkVersion:i}),this._handleUnlockStateChanged({accounts:t,isUnlocked:r}),this._handleAccountsChanged(t)}this._state.initialized=!0,this.emit("_initialized")}_rpcRequest(e,t){let n=t;return Array.isArray(e)||(e.jsonrpc||(e.jsonrpc="2.0"),"eth_accounts"!==e.method&&"eth_requestAccounts"!==e.method||(n=(n,r)=>{this._handleAccountsChanged(r.result??[],"eth_accounts"===e.method),t(n,r)})),this._rpcEngine.handle(e,n)}_handleConnect(e){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:e}),this._log.debug(xk.info.connected(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){let n;this._state.isConnected=!1,e?(n=new nC(1013,t??xk.errors.disconnected()),this._log.debug(n)):(n=new nC(1011,t??xk.errors.permanentlyDisconnected()),this._log.error(n),$C(this,GC,null),this._state.accounts=null,$C(this,ZC,null),this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",n)}}_handleChainChanged({chainId:e}={}){BC(e)?(this._handleConnect(e),e!==HC(this,GC)&&($C(this,GC,e),this._state.initialized&&this.emit("chainChanged",HC(this,GC)))):this._log.error(xk.errors.invalidNetworkParams(),{chainId:e})}_handleAccountsChanged(e,t=!1){let n=e;Array.isArray(e)||(this._log.error("MetaMask: Received invalid accounts parameter. Please report this bug.",e),n=[]);for(const t of e)if("string"!=typeof t){this._log.error("MetaMask: Received non-string account. Please report this bug.",e),n=[];break}if(!XC(this._state.accounts,n)&&(t&&null!==this._state.accounts&&this._log.error("MetaMask: 'eth_accounts' unexpectedly updated accounts. Please report this bug.",n),this._state.accounts=n,HC(this,ZC)!==n[0]&&$C(this,ZC,n[0]||null),this._state.initialized)){const e=[...n];this.emit("accountsChanged",e)}}_handleUnlockStateChanged({accounts:e,isUnlocked:t}={}){"boolean"==typeof t?t!==this._state.isUnlocked&&(this._state.isUnlocked=t,this._handleAccountsChanged(e??[])):this._log.error("MetaMask: Received invalid isUnlocked parameter. Please report this bug.")}};GC=new WeakMap,ZC=new WeakMap,JC._defaultState={accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1};var ex=JC;function tx(e={}){const t={},n=new Wn.Duplex({objectMode:!0,read:()=>{},write:function(n,o,a){let s=null;try{n.id?function(e){const{id:n}=e;if(null===n)return;const r=t[n];r?(delete t[n],Object.assign(r.res,e),setTimeout(r.end)):console.warn(`StreamMiddleware - Unknown response id "${n}"`)}(n):function(n){e?.retryOnMessage&&n.method===e.retryOnMessage&&Object.values(t).forEach((({req:e,retryCount:n=0})=>{if(!e.id)return;if(n>=3)throw new Error(`StreamMiddleware - Retry limit exceeded for request id "${e.id}"`);const r=t[e.id];r&&(r.retryCount=n+1),i(e)})),r.emit("notification",n)}(n)}catch(e){s=e}a(s)}}),r=new TC;return{events:r,middleware:(e,n,r,o)=>{t[e.id]={req:e,res:n,next:r,end:o},i(e)},stream:n};function i(e){n.push(e)}}var nx={},rx={exports:{}},ix=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r}},ox=ix;function ax(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function sx(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}rx.exports=ox(ax),rx.exports.strict=ox(sx),ax.proto=ax((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return ax(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return sx(this)},configurable:!0})}));var ux=rx.exports,lx={};Object.defineProperty(lx,"__esModule",{value:!0}),lx.Substream=void 0;const cx=Wn;class dx extends cx.Duplex{constructor({parent:e,name:t}){super({objectMode:!0}),this._parent=e,this._name=t}_read(){}_write(e,t,n){this._parent.push({name:this._name,data:e}),n()}}lx.Substream=dx;var fx=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(nx,"__esModule",{value:!0}),nx.ObjectMultiplex=void 0;const hx=Wn,px=fx(ux),mx=lx,gx=Symbol("IGNORE_SUBSTREAM");let vx=class extends hx.Duplex{constructor(e={}){super(Object.assign(Object.assign({},e),{objectMode:!0})),this._substreams={}}createStream(e){if(this.destroyed)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already destroyed`);if(this._readableState.ended||this._writableState.ended)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already ended`);if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);const t=new mx.Substream({parent:this,name:e});return this._substreams[e]=t,function(e,t){const n=(0,px.default)(t);(0,hx.finished)(e,{readable:!1},n),(0,hx.finished)(e,{writable:!1},n)}(this,(e=>t.destroy(e||void 0))),t}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);this._substreams[e]=gx}_read(){}_write(e,t,n){const{name:r,data:i}=e;if(!r)return console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),n();const o=this._substreams[r];return o?(o!==gx&&o.push(i),n()):(console.warn(`ObjectMultiplex - orphaned data for stream "${r}"`),n())}};nx.ObjectMultiplex=vx;var bx=i(nx.ObjectMultiplex);const yx=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;yx.writable=e=>yx(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,yx.readable=e=>yx(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,yx.duplex=e=>yx.writable(e)&&yx.readable(e),yx.transform=e=>yx.duplex(e)&&"function"==typeof e._transform;var wx,_x=yx,Sx=class extends ex{constructor(e,{jsonRpcStreamName:t,logger:n=console,maxEventListeners:r=100,rpcMiddleware:i=[]}){if(super({logger:n,maxEventListeners:r,rpcMiddleware:i}),!_x.duplex(e))throw new Error(xk.errors.invalidDuplexStream());this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this);const o=new bx;Wn.pipeline(e,o,e,this._handleStreamDisconnect.bind(this,"MetaMask")),this._jsonRpcConnection=tx({retryOnMessage:"METAMASK_EXTENSION_CONNECT_CAN_RETRY"}),Wn.pipeline(this._jsonRpcConnection.stream,o.createStream(t),this._jsonRpcConnection.stream,this._handleStreamDisconnect.bind(this,"MetaMask RpcProvider")),this._rpcEngine.push(this._jsonRpcConnection.middleware),this._jsonRpcConnection.events.on("notification",(t=>{const{method:n,params:r}=t;"metamask_accountsChanged"===n?this._handleAccountsChanged(r):"metamask_unlockStateChanged"===n?this._handleUnlockStateChanged(r):"metamask_chainChanged"===n?this._handleChainChanged(r):IC.includes(n)?this.emit("message",{type:n,data:r}):"METAMASK_STREAM_FAILURE"===n&&e.destroy(new Error(xk.errors.permanentlyDisconnected()))}))}async _initializeStateAsync(){let e;try{e=await this.request({method:"metamask_getProviderState"})}catch(e){this._log.error("MetaMask: Failed to get initial state. Please report this bug.",e)}this._initializeState(e)}_handleStreamDisconnect(e,t){let n=`MetaMask: Lost connection to "${e}".`;t?.stack&&(n+=`\n${t.stack}`),this._log.warn(n),this.listenerCount("error")>0&&this.emit("error",n),this._handleDisconnect(!1,t?t.message:void 0)}_handleChainChanged({chainId:e,networkVersion:t}={}){BC(e)&&(e=>Boolean(e)&&"string"==typeof e)(t)?"loading"===t?this._handleDisconnect(!0):super._handleChainChanged({chainId:e}):this._log.error(xk.errors.invalidNetworkParams(),{chainId:e,networkVersion:t})}},Ex=class extends Sx{constructor(e,{jsonRpcStreamName:t="metamask-provider",logger:n=console,maxEventListeners:r=100,shouldSendMetadata:i}={}){if(super(e,{jsonRpcStreamName:t,logger:n,maxEventListeners:r,rpcMiddleware:OC(n)}),this._sentWarnings={chainId:!1,networkVersion:!1,selectedAddress:!1,enable:!1,experimentalMethods:!1,send:!1,events:{close:!1,data:!1,networkChanged:!1,notification:!1}},WC(this,wx,void 0),this._initializeStateAsync(),$C(this,wx,null),this.isMetaMask=!0,this._sendSync=this._sendSync.bind(this),this.enable=this.enable.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this._warnOfDeprecation=this._warnOfDeprecation.bind(this),this._metamask=this._getExperimentalApi(),this._jsonRpcConnection.events.on("notification",(e=>{const{method:t}=e;IC.includes(t)&&(this.emit("data",e),this.emit("notification",e.params.result))})),i)if("complete"===document.readyState)zC(this._rpcEngine,this._log);else{const e=()=>{zC(this._rpcEngine,this._log),window.removeEventListener("DOMContentLoaded",e)};window.addEventListener("DOMContentLoaded",e)}}get chainId(){return this._sentWarnings.chainId||(this._log.warn(xk.warnings.chainIdDeprecation),this._sentWarnings.chainId=!0),super.chainId}get networkVersion(){return this._sentWarnings.networkVersion||(this._log.warn(xk.warnings.networkVersionDeprecation),this._sentWarnings.networkVersion=!0),HC(this,wx)}get selectedAddress(){return this._sentWarnings.selectedAddress||(this._log.warn(xk.warnings.selectedAddressDeprecation),this._sentWarnings.selectedAddress=!0),super.selectedAddress}sendAsync(e,t){this._rpcRequest(e,t)}addListener(e,t){return this._warnOfDeprecation(e),super.addListener(e,t)}on(e,t){return this._warnOfDeprecation(e),super.on(e,t)}once(e,t){return this._warnOfDeprecation(e),super.once(e,t)}prependListener(e,t){return this._warnOfDeprecation(e),super.prependListener(e,t)}prependOnceListener(e,t){return this._warnOfDeprecation(e),super.prependOnceListener(e,t)}_handleDisconnect(e,t){super._handleDisconnect(e,t),HC(this,wx)&&!e&&$C(this,wx,null)}_warnOfDeprecation(e){!1===this._sentWarnings?.events[e]&&(this._log.warn(xk.warnings.events[e]),this._sentWarnings.events[e]=!0)}async enable(){return this._sentWarnings.enable||(this._log.warn(xk.warnings.enableDeprecation),this._sentWarnings.enable=!0),new Promise(((e,t)=>{try{this._rpcRequest({method:"eth_requestAccounts",params:[]},DC(e,t))}catch(e){t(e)}}))}send(e,t){return this._sentWarnings.send||(this._log.warn(xk.warnings.sendDeprecation),this._sentWarnings.send=!0),"string"!=typeof e||t&&!Array.isArray(t)?e&&"object"==typeof e&&"function"==typeof t?this._rpcRequest(e,t):this._sendSync(e):new Promise(((n,r)=>{try{this._rpcRequest({method:e,params:t},DC(n,r,!1))}catch(e){r(e)}}))}_sendSync(e){let t;switch(e.method){case"eth_accounts":t=this.selectedAddress?[this.selectedAddress]:[];break;case"eth_coinbase":t=this.selectedAddress??null;break;case"eth_uninstallFilter":this._rpcRequest(e,jC),t=!0;break;case"net_version":t=HC(this,wx)??null;break;default:throw new Error(xk.errors.unsupportedSync(e.method))}return{id:e.id,jsonrpc:e.jsonrpc,result:t}}_getExperimentalApi(){return new Proxy({isUnlocked:async()=>(this._state.initialized||await new Promise((e=>{this.on("_initialized",(()=>e()))})),this._state.isUnlocked),requestBatch:async e=>{if(!Array.isArray(e))throw iC({message:"Batch requests must be made with an array of request objects.",data:e});return new Promise(((t,n)=>{this._rpcRequest(e,DC(t,n))}))}},{get:(e,t,...n)=>(this._sentWarnings.experimentalMethods||(this._log.warn(xk.warnings.experimentalMethods),this._sentWarnings.experimentalMethods=!0),Reflect.get(e,t,...n))})}_handleChainChanged({chainId:e,networkVersion:t}={}){super._handleChainChanged({chainId:e,networkVersion:t}),this._state.isConnected&&t!==HC(this,wx)&&($C(this,wx,t),this._state.initialized&&this.emit("networkChanged",HC(this,wx)))}};wx=new WeakMap;const kx=IM("MM_SDK");kx.color="#FFAC1C";var Mx={},Cx={};Object.defineProperty(Cx,"__esModule",{value:!0}),Cx.EthereumProviderError=Cx.EthereumRpcError=void 0;const xx=KM;class Ax extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==n&&(this.data=n)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return xx.default(this.serialize(),Tx,2)}}function Tx(e,t){if("[Circular]"!==t)return t}Cx.EthereumRpcError=Ax,Cx.EthereumProviderError=class extends Ax{constructor(e,t,n){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}};var Rx={},Px={};Object.defineProperty(Px,"__esModule",{value:!0}),Px.errorValues=Px.errorCodes=void 0,Px.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},Px.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=Px,n=Cx,r=t.errorCodes.rpc.internal,i="Unspecified error message. This is a bug, please report it.",o={code:r,message:a(r)};function a(n,r=i){if(Number.isInteger(n)){const r=n.toString();if(c(t.errorValues,r))return t.errorValues[r].message;if(u(n))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function s(e){if(!Number.isInteger(e))return!1;const n=e.toString();return!!t.errorValues[n]||!!u(e)}function u(e){return e>=-32099&&e<=-32e3}function l(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=a,e.isValidCode=s,e.serializeError=function(e,{fallbackError:t=o,shouldIncludeStack:r=!1}={}){var i,u;if(!t||!Number.isInteger(t.code)||"string"!=typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof n.EthereumRpcError)return e.serialize();const d={};if(e&&"object"==typeof e&&!Array.isArray(e)&&c(e,"code")&&s(e.code)){const t=e;d.code=t.code,t.message&&"string"==typeof t.message?(d.message=t.message,c(t,"data")&&(d.data=t.data)):(d.message=a(d.code),d.data={originalError:l(e)})}else{d.code=t.code;const n=null===(i=e)||void 0===i?void 0:i.message;d.message=n&&"string"==typeof n?n:t.message,d.data={originalError:l(e)}}const f=null===(u=e)||void 0===u?void 0:u.stack;return r&&e&&f&&"string"==typeof f&&(d.stack=f),d}}(Rx);var Lx={};Object.defineProperty(Lx,"__esModule",{value:!0}),Lx.ethErrors=void 0;const Ix=Cx,Ox=Rx,Nx=Px;function Dx(e,t){const[n,r]=jx(t);return new Ix.EthereumRpcError(e,n||Ox.getMessageFromCode(e),r)}function Bx(e,t){const[n,r]=jx(t);return new Ix.EthereumProviderError(e,n||Ox.getMessageFromCode(e),r)}function jx(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t||void 0,n]}}return[]}Lx.ethErrors={rpc:{parse:e=>Dx(Nx.errorCodes.rpc.parse,e),invalidRequest:e=>Dx(Nx.errorCodes.rpc.invalidRequest,e),invalidParams:e=>Dx(Nx.errorCodes.rpc.invalidParams,e),methodNotFound:e=>Dx(Nx.errorCodes.rpc.methodNotFound,e),internal:e=>Dx(Nx.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return Dx(t,e)},invalidInput:e=>Dx(Nx.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>Dx(Nx.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Dx(Nx.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Dx(Nx.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Dx(Nx.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Dx(Nx.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>Bx(Nx.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>Bx(Nx.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>Bx(Nx.errorCodes.provider.unsupportedMethod,e),disconnected:e=>Bx(Nx.errorCodes.provider.disconnected,e),chainDisconnected:e=>Bx(Nx.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:n,data:r}=e;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new Ix.EthereumProviderError(t,n,r)}}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=Cx;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const n=Rx;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return n.getMessageFromCode}});const r=Lx;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return r.ethErrors}});const i=Px;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})}(Mx);const zx={METAMASK_GETPROVIDERSTATE:"metamask_getProviderState",METAMASK_CONNECTSIGN:"metamask_connectSign",METAMASK_CONNECTWITH:"metamask_connectWith",METAMASK_OPEN:"metamask_open",METAMASK_BATCH:"metamask_batch",PERSONAL_SIGN:"personal_sign",WALLET_REQUESTPERMISSIONS:"wallet_requestPermissions",WALLET_REVOKEPERMISSIONS:"wallet_revokePermissions",WALLET_GETPERMISSIONS:"wallet_getPermissions",WALLET_WATCHASSET:"wallet_watchAsset",WALLET_ADDETHEREUMCHAIN:"wallet_addEthereumChain",WALLET_SWITCHETHETHEREUMCHAIN:"wallet_switchEthereumChain",ETH_REQUESTACCOUNTS:"eth_requestAccounts",ETH_ACCOUNTS:"eth_accounts",ETH_CHAINID:"eth_chainId",ETH_SENDTRANSACTION:"eth_sendTransaction",ETH_SIGNTYPEDDATA:"eth_signTypedData",ETH_SIGNTYPEDDATA_V3:"eth_signTypedData_v3",ETH_SIGNTYPEDDATA_V4:"eth_signTypedData_v4",ETH_SIGNTRANSACTION:"eth_signTransaction",ETH_SIGN:"eth_sign",PERSONAL_EC_RECOVER:"personal_ecRecover"},Ux={[zx.ETH_REQUESTACCOUNTS]:!0,[zx.ETH_SENDTRANSACTION]:!0,[zx.ETH_SIGNTRANSACTION]:!0,[zx.ETH_SIGN]:!0,[zx.ETH_ACCOUNTS]:!1,[zx.ETH_CHAINID]:!1,[zx.PERSONAL_SIGN]:!0,[zx.ETH_SIGNTYPEDDATA]:!0,[zx.ETH_SIGNTYPEDDATA_V3]:!0,[zx.ETH_SIGNTYPEDDATA_V4]:!0,[zx.WALLET_REQUESTPERMISSIONS]:!0,[zx.WALLET_GETPERMISSIONS]:!0,[zx.WALLET_WATCHASSET]:!0,[zx.WALLET_ADDETHEREUMCHAIN]:!0,[zx.WALLET_SWITCHETHETHEREUMCHAIN]:!0,[zx.METAMASK_CONNECTSIGN]:!0,[zx.METAMASK_CONNECTWITH]:!0,[zx.PERSONAL_EC_RECOVER]:!0,[zx.METAMASK_BATCH]:!0,[zx.METAMASK_OPEN]:!0},Fx=Object.keys(Ux).map((e=>e.toLowerCase())),Kx=["eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sign"].map((e=>e.toLowerCase())),qx=".sdk-comm",Hx="providerType",Wx=".MMSDK_cached_address",$x=".MMSDK_cached_chainId",Vx={CHAIN_CHANGED:"chainChanged",ACCOUNTS_CHANGED:"accountsChanged",DISCONNECT:"disconnect",CONNECT:"connect",CONNECTED:"connected"};class Yx{constructor({enabled:e}={enabled:!1}){this.enabled=!1,this.enabled=e}persistChannelConfig(e){return _k(this,void 0,void 0,(function*(){const t=JSON.stringify(e);kx(`[StorageManagerWeb: persistChannelConfig()] enabled=${this.enabled}`,e),localStorage.setItem(qx,t)}))}getPersistedChannelConfig(){return _k(this,void 0,void 0,(function*(){let e;try{if(kx(`[StorageManagerWeb: getPersistedChannelConfig()] enabled=${this.enabled}`),e=localStorage.getItem(qx),kx("[StorageManagerWeb: getPersistedChannelConfig()]",e),!e)return;const t=JSON.parse(e);return kx("[StorageManagerWeb: getPersistedChannelConfig()] channelConfig",t),t}catch(e){return void console.error("[StorageManagerWeb: getPersistedChannelConfig()] Can't find existing channel config",e)}}))}persistAccounts(e){return _k(this,void 0,void 0,(function*(){kx(`[StorageManagerWeb: persistAccounts()] enabled=${this.enabled}`,e);const t=JSON.stringify(e);localStorage.setItem(Wx,t)}))}getCachedAccounts(){return _k(this,void 0,void 0,(function*(){try{const e=localStorage.getItem(Wx);return e?JSON.parse(e):[]}catch(e){throw console.error("[StorageManagerWeb: getCachedAccounts()] Error reading cached accounts",e),e}}))}persistChainId(e){return _k(this,void 0,void 0,(function*(){kx(`[StorageManagerWeb: persistChainId()] enabled=${this.enabled}`,e),localStorage.setItem($x,e)}))}getCachedChainId(){return _k(this,void 0,void 0,(function*(){try{const e=localStorage.getItem($x);return null!=e?e:void 0}catch(e){throw console.error("[StorageManagerWeb: getCachedChainId()] Error reading cached chainId",e),e}}))}terminate(){return _k(this,void 0,void 0,(function*(){kx(`[StorageManagerWeb: terminate()] enabled=${this.enabled}`),localStorage.removeItem(qx)}))}}const Gx=e=>new Yx(e);class Zx extends Ex{constructor({connectionStream:e,shouldSendMetadata:t,autoRequestAccounts:n=!1}){super(e,{logger:console,maxEventListeners:100,shouldSendMetadata:t}),this.state={autoRequestAccounts:!1,providerStateRequested:!1,chainId:"",networkVersion:""},kx(`[SDKProvider: constructor()] autoRequestAccounts=${n}`),this.state.autoRequestAccounts=n}forceInitializeState(){return _k(this,void 0,void 0,(function*(){return kx(`[SDKProvider: forceInitializeState()] autoRequestAccounts=${this.state.autoRequestAccounts}`),this._initializeStateAsync()}))}_setConnected(){kx("[SDKProvider: _setConnected()] Setting connected state"),this._state.isConnected=!0}getState(){return this._state}getSDKProviderState(){return this.state}getSelectedAddress(){var e;const{accounts:t}=this._state;return t&&0!==t.length?(null===(e=t[0])||void 0===e?void 0:e.toLowerCase())||"":(kx("[SDKProvider: getSelectedAddress] No accounts found"),null)}getChainId(){return this.state.chainId}getNetworkVersion(){return this.state.networkVersion}setSDKProviderState(e){this.state=Object.assign(Object.assign({},this.state),e)}handleDisconnect({terminate:e=!1}){!function({terminate:e=!1,instance:t}){const{state:n}=t;t.isConnected()?(kx(`[SDKProvider: handleDisconnect()] cleaning up provider state terminate=${e}`,t),e&&(t._state.accounts=null,t._state.isUnlocked=!1,t._state.isPermanentlyDisconnected=!0,t._state.initialized=!1),t._handleAccountsChanged([]),t._state.isConnected=!1,t.emit("disconnect",Mx.ethErrors.provider.disconnected()),n.providerStateRequested=!1):kx("[SDKProvider: handleDisconnect()] not connected --- interrupt disconnection")}({terminate:e,instance:this})}_initializeStateAsync(){return _k(this,void 0,void 0,(function*(){return function(e){var t,n;return _k(this,void 0,void 0,(function*(){void 0===e.state&&(e.state={autoRequestAccounts:!1,providerStateRequested:!1,chainId:""});const{state:r}=e;let i;if(r.providerStateRequested)kx("[SDKProvider: initializeStateAsync()] initialization already in progress");else{let o;r.providerStateRequested=!0;let a=null,s=!1,u=!1;const l=Gx({enabled:!0});if(l){const e=yield l.getPersistedChannelConfig({});s=null!==(t=null==e?void 0:e.relayPersistence)&&void 0!==t&&t,o=yield l.getCachedChainId();const n=yield l.getCachedAccounts();n.length>0&&(a=n[0])}if(kx(`[SDKProvider: initializeStateAsync()] relayPersistence=${s}`,{relayPersistence:s,cachedChainId:o,cachedSelectedAddress:a}),s)if(o&&a)i={accounts:[a],chainId:o,isUnlocked:!1},u=!0;else try{i=yield e.request({method:"metamask_getProviderState"})}catch(t){return e._log.error("MetaMask: Failed to get initial state. Please report this bug.",t),void(r.providerStateRequested=!1)}if(0===(null===(n=null==i?void 0:i.accounts)||void 0===n?void 0:n.length))if(e.getSelectedAddress())i.accounts=[e.getSelectedAddress()];else{kx("[SDKProvider: initializeStateAsync()] Fetch accounts remotely.");const t=yield e.request({method:"eth_requestAccounts",params:[]});i.accounts=t}e._initializeState(i),r.providerStateRequested=!1,u&&(e._state.isConnected=!0,e.emit("connect",{chainId:null==i?void 0:i.chainId}))}}))}(this)}))}_initializeState(e){return kx("[SDKProvider: _initializeState()]",e),function(e,t,n){return kx("[SDKProvider: initializeState()] set state._initialized to false"),e._state.initialized=!1,t(n)}(this,super._initializeState.bind(this),e)}_handleChainChanged({chainId:e,networkVersion:t}={}){this.state.chainId=e,this.state.networkVersion=t,function({instance:e,chainId:t,networkVersion:n,superHandleChainChanged:r}){kx(`[SDKProvider: handleChainChanged()] chainId=${t} networkVersion=${n}`);let i=n;n||(kx("[SDKProvider: handleChainChanged()] forced network version to prevent provider error"),i="1"),e._state.isConnected=!0,e.emit("connect",{chainId:t}),r({chainId:t,networkVersion:i})}({instance:this,chainId:e,networkVersion:t,superHandleChainChanged:super._handleChainChanged.bind(this)})}}var Qx={exports:{}};!function(e,t){!function(t){var n=Object.hasOwnProperty,r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i="object"==typeof je&&!0,o="function"==typeof Symbol,a="object"==typeof Reflect,s="function"==typeof setImmediate?setImmediate:setTimeout,u=o?a&&"function"==typeof Reflect.ownKeys?Reflect.ownKeys:function(e){var t=Object.getOwnPropertyNames(e);return t.push.apply(t,Object.getOwnPropertySymbols(e)),t}:Object.keys;function l(){this._events={},this._conf&&c.call(this,this._conf)}function c(e){e&&(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),e.maxListeners!==t&&(this._maxListeners=e.maxListeners),e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this._newListener=e.newListener),e.removeListener&&(this._removeListener=e.removeListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),e.ignoreErrors&&(this.ignoreErrors=e.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function d(e,t){var n="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(n+=" Event name: "+t+"."),void 0!==je&&je.emitWarning){var r=new Error(n);r.name="MaxListenersExceededWarning",r.emitter=this,r.count=e,je.emitWarning(r)}else console.error(n),console.trace&&console.trace()}var f=function(e,t,n){var r=arguments.length;switch(r){case 0:return[];case 1:return[e];case 2:return[e,t];case 3:return[e,t,n];default:for(var i=new Array(r);r--;)i[r]=arguments[r];return i}};function h(e,n){for(var r={},i=e.length,o=n?n.length:0,a=0;a<i;a++)r[e[a]]=a<o?n[a]:t;return r}function p(e,t,n){var r,i;if(this._emitter=e,this._target=t,this._listeners={},this._listenersCount=0,(n.on||n.off)&&(r=n.on,i=n.off),t.addEventListener?(r=t.addEventListener,i=t.removeEventListener):t.addListener?(r=t.addListener,i=t.removeListener):t.on&&(r=t.on,i=t.off),!r&&!i)throw Error("target does not implement any known event API");if("function"!=typeof r)throw TypeError("on method must be a function");if("function"!=typeof i)throw TypeError("off method must be a function");this._on=r,this._off=i;var o=e._observers;o?o.push(this):e._observers=[this]}function m(e,r,i,o){var a=Object.assign({},r);if(!e)return a;if("object"!=typeof e)throw TypeError("options must be an object");var s,u,l,c=Object.keys(e),d=c.length;function f(e){throw Error('Invalid "'+s+'" option value'+(e?". Reason: "+e:""))}for(var h=0;h<d;h++){if(s=c[h],!o&&!n.call(r,s))throw Error('Unknown "'+s+'" option');(u=e[s])!==t&&(l=i[s],a[s]=l?l(u,f):u)}return a}function g(e,t){return"function"==typeof e&&e.hasOwnProperty("prototype")||t("value must be a constructor"),e}function v(e){var t="value must be type of "+e.join("|"),n=e.length,r=e[0],i=e[1];return 1===n?function(e,n){if(typeof e===r)return e;n(t)}:2===n?function(e,n){var o=typeof e;if(o===r||o===i)return e;n(t)}:function(r,i){for(var o=typeof r,a=n;a-- >0;)if(o===e[a])return r;i(t)}}Object.assign(p.prototype,{subscribe:function(e,t,n){var r=this,i=this._target,o=this._emitter,a=this._listeners,s=function(){var r=f.apply(null,arguments),a={data:r,name:t,original:e};n?!1!==n.call(i,a)&&o.emit.apply(o,[a.name].concat(r)):o.emit.apply(o,[t].concat(r))};if(a[e])throw Error("Event '"+e+"' is already listening");this._listenersCount++,o._newListener&&o._removeListener&&!r._onNewListener?(this._onNewListener=function(n){n===t&&null===a[e]&&(a[e]=s,r._on.call(i,e,s))},o.on("newListener",this._onNewListener),this._onRemoveListener=function(n){n===t&&!o.hasListeners(n)&&a[e]&&(a[e]=null,r._off.call(i,e,s))},a[e]=null,o.on("removeListener",this._onRemoveListener)):(a[e]=s,r._on.call(i,e,s))},unsubscribe:function(e){var t,n,r,i=this,o=this._listeners,a=this._emitter,s=this._off,l=this._target;if(e&&"string"!=typeof e)throw TypeError("event must be a string");function c(){i._onNewListener&&(a.off("newListener",i._onNewListener),a.off("removeListener",i._onRemoveListener),i._onNewListener=null,i._onRemoveListener=null);var e=_.call(a,i);a._observers.splice(e,1)}if(e){if(!(t=o[e]))return;s.call(l,e,t),delete o[e],--this._listenersCount||c()}else{for(r=(n=u(o)).length;r-- >0;)e=n[r],s.call(l,e,o[e]);this._listeners={},this._listenersCount=0,c()}}});var b=v(["function"]),y=v(["object","function"]);function w(e,t,n){var r,i,o,a=0,s=new e((function(u,l,c){function d(){i&&(i=null),a&&(clearTimeout(a),a=0)}n=m(n,{timeout:0,overload:!1},{timeout:function(e,t){return("number"!=typeof(e*=1)||e<0||!Number.isFinite(e))&&t("timeout must be a positive number"),e}}),r=!n.overload&&"function"==typeof e.prototype.cancel&&"function"==typeof c;var f=function(e){d(),u(e)},h=function(e){d(),l(e)};r?t(f,h,c):(i=[function(e){h(e||Error("canceled"))}],t(f,h,(function(e){if(o)throw Error("Unable to subscribe on cancel event asynchronously");if("function"!=typeof e)throw TypeError("onCancel callback must be a function");i.push(e)})),o=!0),n.timeout>0&&(a=setTimeout((function(){var e=Error("timeout");e.code="ETIMEDOUT",a=0,s.cancel(e),l(e)}),n.timeout))}));return r||(s.cancel=function(e){if(i){for(var t=i.length,n=1;n<t;n++)i[n](e);i[0](e),i=null}}),s}function _(e){var t=this._observers;if(!t)return-1;for(var n=t.length,r=0;r<n;r++)if(t[r]._target===e)return r;return-1}function S(e,t,n,r,i){if(!n)return null;if(0===r){var o=typeof t;if("string"===o){var a,s,l=0,c=0,d=this.delimiter,f=d.length;if(-1!==(s=t.indexOf(d))){a=new Array(5);do{a[l++]=t.slice(c,s),c=s+f}while(-1!==(s=t.indexOf(d,c)));a[l++]=t.slice(c),t=a,i=l}else t=[t],i=1}else"object"===o?i=t.length:(t=[t],i=1)}var h,p,m,g,v,b,y,w=null,_=t[r],E=t[r+1];if(r===i)n._listeners&&("function"==typeof n._listeners?(e&&e.push(n._listeners),w=[n]):(e&&e.push.apply(e,n._listeners),w=[n]));else{if("*"===_){for(s=(b=u(n)).length;s-- >0;)"_listeners"!==(h=b[s])&&(y=S(e,t,n[h],r+1,i))&&(w?w.push.apply(w,y):w=y);return w}if("**"===_){for((v=r+1===i||r+2===i&&"*"===E)&&n._listeners&&(w=S(e,t,n,i,i)),s=(b=u(n)).length;s-- >0;)"_listeners"!==(h=b[s])&&("*"===h||"**"===h?(n[h]._listeners&&!v&&(y=S(e,t,n[h],i,i))&&(w?w.push.apply(w,y):w=y),y=S(e,t,n[h],r,i)):y=S(e,t,n[h],h===E?r+2:r,i),y&&(w?w.push.apply(w,y):w=y));return w}n[_]&&(w=S(e,t,n[_],r+1,i))}if((p=n["*"])&&S(e,t,p,r+1,i),m=n["**"])if(r<i)for(m._listeners&&S(e,t,m,i,i),s=(b=u(m)).length;s-- >0;)"_listeners"!==(h=b[s])&&(h===E?S(e,t,m[h],r+2,i):h===_?S(e,t,m[h],r+1,i):((g={})[h]=m[h],S(e,t,{"**":g},r+1,i)));else m._listeners?S(e,t,m,i,i):m["*"]&&m["*"]._listeners&&S(e,t,m["*"],i,i);return w}function E(e,t,n){var r,i,o=0,a=0,s=this.delimiter,u=s.length;if("string"==typeof e)if(-1!==(r=e.indexOf(s))){i=new Array(5);do{i[o++]=e.slice(a,r),a=r+u}while(-1!==(r=e.indexOf(s,a)));i[o++]=e.slice(a)}else i=[e],o=1;else i=e,o=e.length;if(o>1)for(r=0;r+1<o;r++)if("**"===i[r]&&"**"===i[r+1])return;var l,c=this.listenerTree;for(r=0;r<o;r++)if(c=c[l=i[r]]||(c[l]={}),r===o-1)return c._listeners?("function"==typeof c._listeners&&(c._listeners=[c._listeners]),n?c._listeners.unshift(t):c._listeners.push(t),!c._listeners.warned&&this._maxListeners>0&&c._listeners.length>this._maxListeners&&(c._listeners.warned=!0,d.call(this,c._listeners.length,l))):c._listeners=t,!0;return!0}function k(e,t,n,r){for(var i,o,a,s,l=u(e),c=l.length,d=e._listeners;c-- >0;)i=e[o=l[c]],a="_listeners"===o?n:n?n.concat(o):[o],s=r||"symbol"==typeof o,d&&t.push(s?a:a.join(this.delimiter)),"object"==typeof i&&k.call(this,i,t,a,s);return t}function M(e){for(var t,n,r,i=u(e),o=i.length;o-- >0;)(t=e[n=i[o]])&&(r=!0,"_listeners"===n||M(t)||delete e[n]);return r}function C(e,t,n){this.emitter=e,this.event=t,this.listener=n}function x(e,n,r){if(!0===r)a=!0;else if(!1===r)o=!0;else{if(!r||"object"!=typeof r)throw TypeError("options should be an object or true");var o=r.async,a=r.promisify,u=r.nextTick,l=r.objectify}if(o||u||a){var c=n,d=n._origin||n;if(u&&!i)throw Error("process.nextTick is not supported");a===t&&(a="AsyncFunction"===n.constructor.name),n=function(){var e=arguments,t=this,n=this.event;return a?u?Promise.resolve():new Promise((function(e){s(e)})).then((function(){return t.event=n,c.apply(t,e)})):(u?ke:s)((function(){t.event=n,c.apply(t,e)}))},n._async=!0,n._origin=d}return[n,l?new C(this,e,n):this]}function A(e){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,c.call(this,e)}C.prototype.off=function(){return this.emitter.off(this.event,this.listener),this},A.EventEmitter2=A,A.prototype.listenTo=function(e,n,i){if("object"!=typeof e)throw TypeError("target musts be an object");var o=this;function a(t){if("object"!=typeof t)throw TypeError("events must be an object");var n,r=i.reducers,a=_.call(o,e);n=-1===a?new p(o,e,i):o._observers[a];for(var s,l=u(t),c=l.length,d="function"==typeof r,f=0;f<c;f++)s=l[f],n.subscribe(s,t[s]||s,d?r:r&&r[s])}return i=m(i,{on:t,off:t,reducers:t},{on:b,off:b,reducers:y}),r(n)?a(h(n)):a("string"==typeof n?h(n.split(/\s+/)):n),this},A.prototype.stopListeningTo=function(e,t){var n=this._observers;if(!n)return!1;var r,i=n.length,o=!1;if(e&&"object"!=typeof e)throw TypeError("target should be an object");for(;i-- >0;)r=n[i],e&&r._target!==e||(r.unsubscribe(t),o=!0);return o},A.prototype.delimiter=".",A.prototype.setMaxListeners=function(e){e!==t&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},A.prototype.getMaxListeners=function(){return this._maxListeners},A.prototype.event="",A.prototype.once=function(e,t,n){return this._once(e,t,!1,n)},A.prototype.prependOnceListener=function(e,t,n){return this._once(e,t,!0,n)},A.prototype._once=function(e,t,n,r){return this._many(e,1,t,n,r)},A.prototype.many=function(e,t,n,r){return this._many(e,t,n,!1,r)},A.prototype.prependMany=function(e,t,n,r){return this._many(e,t,n,!0,r)},A.prototype._many=function(e,t,n,r,i){var o=this;if("function"!=typeof n)throw new Error("many only accepts instances of Function");function a(){return 0==--t&&o.off(e,a),n.apply(this,arguments)}return a._origin=n,this._on(e,a,r,i)},A.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||l.call(this);var e,t,n,r,i,a,s=arguments[0],u=this.wildcard;if("newListener"===s&&!this._newListener&&!this._events.newListener)return!1;if(u&&(e=s,"newListener"!==s&&"removeListener"!==s&&"object"==typeof s)){if(n=s.length,o)for(r=0;r<n;r++)if("symbol"==typeof s[r]){a=!0;break}a||(s=s.join(this.delimiter))}var c,d=arguments.length;if(this._all&&this._all.length)for(r=0,n=(c=this._all.slice()).length;r<n;r++)switch(this.event=s,d){case 1:c[r].call(this,s);break;case 2:c[r].call(this,s,arguments[1]);break;case 3:c[r].call(this,s,arguments[1],arguments[2]);break;default:c[r].apply(this,arguments)}if(u)c=[],S.call(this,c,e,this.listenerTree,0,n);else{if("function"==typeof(c=this._events[s])){switch(this.event=s,d){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(t=new Array(d-1),i=1;i<d;i++)t[i-1]=arguments[i];c.apply(this,t)}return!0}c&&(c=c.slice())}if(c&&c.length){if(d>3)for(t=new Array(d-1),i=1;i<d;i++)t[i-1]=arguments[i];for(r=0,n=c.length;r<n;r++)switch(this.event=s,d){case 1:c[r].call(this);break;case 2:c[r].call(this,arguments[1]);break;case 3:c[r].call(this,arguments[1],arguments[2]);break;default:c[r].apply(this,t)}return!0}if(!this.ignoreErrors&&!this._all&&"error"===s)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},A.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||l.call(this);var e,t,n,r,i,a,s=arguments[0],u=this.wildcard;if("newListener"===s&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(u&&(e=s,"newListener"!==s&&"removeListener"!==s&&"object"==typeof s)){if(r=s.length,o)for(i=0;i<r;i++)if("symbol"==typeof s[i]){t=!0;break}t||(s=s.join(this.delimiter))}var c,d=[],f=arguments.length;if(this._all)for(i=0,r=this._all.length;i<r;i++)switch(this.event=s,f){case 1:d.push(this._all[i].call(this,s));break;case 2:d.push(this._all[i].call(this,s,arguments[1]));break;case 3:d.push(this._all[i].call(this,s,arguments[1],arguments[2]));break;default:d.push(this._all[i].apply(this,arguments))}if(u?(c=[],S.call(this,c,e,this.listenerTree,0)):c=this._events[s],"function"==typeof c)switch(this.event=s,f){case 1:d.push(c.call(this));break;case 2:d.push(c.call(this,arguments[1]));break;case 3:d.push(c.call(this,arguments[1],arguments[2]));break;default:for(n=new Array(f-1),a=1;a<f;a++)n[a-1]=arguments[a];d.push(c.apply(this,n))}else if(c&&c.length){if(c=c.slice(),f>3)for(n=new Array(f-1),a=1;a<f;a++)n[a-1]=arguments[a];for(i=0,r=c.length;i<r;i++)switch(this.event=s,f){case 1:d.push(c[i].call(this));break;case 2:d.push(c[i].call(this,arguments[1]));break;case 3:d.push(c[i].call(this,arguments[1],arguments[2]));break;default:d.push(c[i].apply(this,n))}}else if(!this.ignoreErrors&&!this._all&&"error"===s)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(d)},A.prototype.on=function(e,t,n){return this._on(e,t,!1,n)},A.prototype.prependListener=function(e,t,n){return this._on(e,t,!0,n)},A.prototype.onAny=function(e){return this._onAny(e,!1)},A.prototype.prependAny=function(e){return this._onAny(e,!0)},A.prototype.addListener=A.prototype.on,A.prototype._onAny=function(e,t){if("function"!=typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),t?this._all.unshift(e):this._all.push(e),this},A.prototype._on=function(e,n,r,i){if("function"==typeof e)return this._onAny(e,n),this;if("function"!=typeof n)throw new Error("on only accepts instances of Function");this._events||l.call(this);var o,a=this;return i!==t&&(n=(o=x.call(this,e,n,i))[0],a=o[1]),this._newListener&&this.emit("newListener",e,n),this.wildcard?(E.call(this,e,n,r),a):(this._events[e]?("function"==typeof this._events[e]&&(this._events[e]=[this._events[e]]),r?this._events[e].unshift(n):this._events[e].push(n),!this._events[e].warned&&this._maxListeners>0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,d.call(this,this._events[e].length,e))):this._events[e]=n,a)},A.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var n,i=[];if(this.wildcard){var o="string"==typeof e?e.split(this.delimiter):e.slice();if(!(i=S.call(this,null,o,this.listenerTree,0)))return this}else{if(!this._events[e])return this;n=this._events[e],i.push({_listeners:n})}for(var a=0;a<i.length;a++){var s=i[a];if(n=s._listeners,r(n)){for(var u=-1,l=0,c=n.length;l<c;l++)if(n[l]===t||n[l].listener&&n[l].listener===t||n[l]._origin&&n[l]._origin===t){u=l;break}if(u<0)continue;return this.wildcard?s._listeners.splice(u,1):this._events[e].splice(u,1),0===n.length&&(this.wildcard?delete s._listeners:delete this._events[e]),this._removeListener&&this.emit("removeListener",e,t),this}(n===t||n.listener&&n.listener===t||n._origin&&n._origin===t)&&(this.wildcard?delete s._listeners:delete this._events[e],this._removeListener&&this.emit("removeListener",e,t))}return this.listenerTree&&M(this.listenerTree),this},A.prototype.offAny=function(e){var t,n=0,r=0;if(e&&this._all&&this._all.length>0){for(n=0,r=(t=this._all).length;n<r;n++)if(e===t[n])return t.splice(n,1),this._removeListener&&this.emit("removeListenerAny",e),this}else{if(t=this._all,this._removeListener)for(n=0,r=t.length;n<r;n++)this.emit("removeListenerAny",t[n]);this._all=[]}return this},A.prototype.removeListener=A.prototype.off,A.prototype.removeAllListeners=function(e){if(e===t)return!this._events||l.call(this),this;if(this.wildcard){var n,r=S.call(this,null,e,this.listenerTree,0);if(!r)return this;for(n=0;n<r.length;n++)r[n]._listeners=null;this.listenerTree&&M(this.listenerTree)}else this._events&&(this._events[e]=null);return this},A.prototype.listeners=function(e){var n,r,i,o,a,s=this._events;if(e===t){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!s)return[];for(o=(n=u(s)).length,i=[];o-- >0;)"function"==typeof(r=s[n[o]])?i.push(r):i.push.apply(i,r);return i}if(this.wildcard){if(!(a=this.listenerTree))return[];var l=[],c="string"==typeof e?e.split(this.delimiter):e.slice();return S.call(this,l,c,a,0),l}return s&&(r=s[e])?"function"==typeof r?[r]:r:[]},A.prototype.eventNames=function(e){var t=this._events;return this.wildcard?k.call(this,this.listenerTree,[],null,e):t?u(t):[]},A.prototype.listenerCount=function(e){return this.listeners(e).length},A.prototype.hasListeners=function(e){if(this.wildcard){var n=[],r="string"==typeof e?e.split(this.delimiter):e.slice();return S.call(this,n,r,this.listenerTree,0),n.length>0}var i=this._events,o=this._all;return!!(o&&o.length||i&&(e===t?u(i).length:i[e]))},A.prototype.listenersAny=function(){return this._all?this._all:[]},A.prototype.waitFor=function(e,n){var r=this,i=typeof n;return"number"===i?n={timeout:n}:"function"===i&&(n={filter:n}),w((n=m(n,{timeout:0,filter:t,handleError:!1,Promise:Promise,overload:!1},{filter:b,Promise:g})).Promise,(function(t,i,o){function a(){var o=n.filter;if(!o||o.apply(r,arguments))if(r.off(e,a),n.handleError){var s=arguments[0];s?i(s):t(f.apply(null,arguments).slice(1))}else t(f.apply(null,arguments))}o((function(){r.off(e,a)})),r._on(e,a,!1)}),{timeout:n.timeout,overload:n.overload})};var T=A.prototype;Object.defineProperties(A,{defaultMaxListeners:{get:function(){return T._maxListeners},set:function(e){if("number"!=typeof e||e<0||Number.isNaN(e))throw TypeError("n must be a non-negative number");T._maxListeners=e},enumerable:!0},once:{value:function(e,t,n){return w((n=m(n,{Promise:Promise,timeout:0,overload:!1},{Promise:g})).Promise,(function(n,r,i){var o;if("function"==typeof e.addEventListener)return o=function(){n(f.apply(null,arguments))},i((function(){e.removeEventListener(t,o)})),void e.addEventListener(t,o,{once:!0});var a,s=function(){a&&e.removeListener("error",a),n(f.apply(null,arguments))};"error"!==t&&(a=function(n){e.removeListener(t,s),r(n)},e.once("error",a)),i((function(){a&&e.removeListener("error",a),e.removeListener(t,s)})),e.once(t,s)}),{timeout:n.timeout,overload:n.overload})},writable:!0,configurable:!0}}),Object.defineProperties(T,{_maxListeners:{value:10,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),"function"==typeof t&&t.amd?t((function(){return A})):e.exports=A}()}(Qx);var Xx=i(Qx.exports);const Jx={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class eA{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Jx,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new eA(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new eA(this.logger,e)}}var tA=new eA;class nA{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach((e=>{let[t,r]=e;for(let e=0;e<r;e++)t(...n)})),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach((t=>{let[r,i]=t;for(let t=0;t<i;t++)r.apply(r,[e,...n])}))}}function rA(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}function iA(e){return null==e?"":""+e}const oA=/###/g;function aA(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(oA,"."):e}function i(){return!e||"string"==typeof e}const o="string"!=typeof t?t:t.split(".");let a=0;for(;a<o.length-1;){if(i())return{};const t=r(o[a]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++a}return i()?{}:{obj:e,k:r(o[a])}}function sA(e,t,n){const{obj:r,k:i}=aA(e,t,Object);if(void 0!==r||1===t.length)return void(r[i]=n);let o=t[t.length-1],a=t.slice(0,t.length-1),s=aA(e,a,Object);for(;void 0===s.obj&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=aA(e,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${o}`]&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n}function uA(e,t){const{obj:n,k:r}=aA(e,t);if(n)return n[r]}function lA(e,t,n){for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):lA(e[r],t[r],n):e[r]=t[r]);return e}function cA(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var dA={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function fA(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>dA[e])):e}const hA=[" ",",","?","!",";"],pA=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20);function mA(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let e=0;e<r.length;){if(!i||"object"!=typeof i)return;let t,o="";for(let a=e;a<r.length;++a)if(a!==e&&(o+=n),o+=r[a],t=i[o],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}i=t}return i}function gA(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class vA extends nA{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):"string"==typeof n&&i?a.push(...n.split(i)):a.push(n)));const s=uA(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),s||!o||"string"!=typeof n?s:mA(this.data&&this.data[e]&&this.data[e][t],n,i)}addResource(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),sA(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)("string"==typeof n[r]||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=uA(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?lA(s,n,i):s={...s,...n},sA(this.data,a,s),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var bA={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,i))})),t}};const yA={};class wA extends nA{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),function(e,t,n){["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((e=>{t[e]&&(n[e]=t[e])}))}(0,e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=tA.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";const r=hA.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const i=pA.getRegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let o=!i.test(e);if(!o){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o}(e,n,r));if(o&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:i};const o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],u=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(l){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${o}`}return r?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:o}const c=this.resolve(e,t);let d=c&&c.res;const f=c&&c.usedKey||o,h=c&&c.exactUsedKey||o,p=Object.prototype.toString.apply(d),m=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject;if(g&&d&&"string"!=typeof d&&"boolean"!=typeof d&&"number"!=typeof d&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0&&("string"!=typeof m||!Array.isArray(d))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...t,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return r?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(i){const e=Array.isArray(d),n=e?[]:{},r=e?h:f;for(const e in d)if(Object.prototype.hasOwnProperty.call(d,e)){const o=`${r}${i}${e}`;n[e]=this.translate(o,{...t,joinArrays:!1,ns:a}),n[e]===o&&(n[e]=d[e])}d=n}}else if(g&&"string"==typeof m&&Array.isArray(d))d=d.join(m),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,a=!1;const l=void 0!==t.count&&"string"!=typeof t.count,f=wA.hasDefaultValue(t),h=l?this.pluralResolver.getSuffix(u,t.count,t):"",p=t.ordinal&&l?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",m=l&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),g=m&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${h}`]||t[`defaultValue${p}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(r=!0,d=g),this.isValidLookup(d)||(a=!0,d=o);const v=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,b=f&&g!==d&&this.options.updateMissing;if(a||r||b){if(this.logger.log(b?"updateKey":"missingKey",u,s,o,b?g:d),i){const e=this.resolve(o,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const i=f&&r!==d?r:v;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,i,b,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,i,b,t),this.emit("missingKey",e,s,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);m&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach((n=>{r([e],o+n,t[`defaultValue${n}`]||g)}))})):r(e,o,g))}d=this.extendTranslation(d,e,t,c,n),a&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${o}`),(a||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${o}`:o,r?d:void 0):this.options.parseMissingKeyHandler(d))}return r?(c.res=d,c.usedParams=this.getUsedParamsDetails(t),c):d}extendTranslation(e,t,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,n.lng||this.language,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return i&&i[0]===r[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):o.translate(...r,t)}),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=bA.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,i,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),u=s.key;n=u;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==a.count&&"string"!=typeof a.count,d=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,h=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach((e=>{this.isValidLookup(t)||(o=e,!yA[`${h[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(yA[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${h.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach((n=>{if(this.isValidLookup(t))return;i=n;const o=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(o,u,n,e,a);else{let e;c&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(o.push(u+e),a.ordinal&&0===e.indexOf(r)&&o.push(u+e.replace(r,this.options.pluralSeparator)),d&&o.push(u+t)),f){const n=`${u}${this.options.contextSeparator}${a.context}`;o.push(n),c&&(o.push(n+e),a.ordinal&&0===e.indexOf(r)&&o.push(n+e.replace(r,this.options.pluralSeparator)),d&&o.push(n+t))}}let s;for(;s=o.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&"string"!=typeof e.replace;let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}function _A(e){return e.charAt(0).toUpperCase()+e.slice(1)}class SA{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=tA.create("languageUtils")}getScriptPartFromCode(e){if(!(e=gA(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=gA(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map((e=>e.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=_A(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=_A(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=_A(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))})),r}}let EA=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],kA={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};const MA=["v1","v2","v3"],CA=["v4"],xA={zero:0,one:1,two:2,few:3,many:4,other:5};class AA{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=tA.create("pluralResolver"),this.options.compatibilityJSON&&!CA.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=function(){const e={};return EA.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:kA[t.fc]}}))})),e}()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(gA("dev"===e?"en":e),{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((e,t)=>xA[e]-xA[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):n.numbers.map((n=>this.getSuffix(e,n,t))):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const i=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!MA.includes(this.options.compatibilityJSON)}}function TA(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=function(e,t,n){const r=uA(e,n);return void 0!==r?r:uA(t,n)}(e,t,n);return!o&&i&&"string"==typeof n&&(o=mA(e,n,r),void 0===o&&(o=mA(t,n,r))),o}class RA{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=tA.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:s,formatSeparator:u,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:h,nestingSuffixEscaped:p,nestingOptionsSeparator:m,maxReplaces:g,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:fA,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=i?cA(i):o||"{{",this.suffix=a?cA(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=d?cA(d):f||cA("$t("),this.nestingSuffix=h?cA(h):p||cA(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=g||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,o,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}const l=e=>{if(e.indexOf(this.formatSeparator)<0){const i=TA(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),o=i.shift().trim(),a=i.join(this.formatSeparator).trim();return this.format(TA(t,s,o,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:o})};this.resetRegExp();const c=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>u(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?u(this.escape(e)):u(e)}].forEach((t=>{for(a=0;i=t.regex.exec(e);){const n=i[1].trim();if(o=l(n),void 0===o)if("function"==typeof c){const t=c(e,i,r);o="string"==typeof t?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else{if(d){o=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else"string"==typeof o||this.useRawValueToEscape||(o=iA(o));const s=t.safeValue(o);if(e=e.replace(i[0],s),d?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,r,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function a(e,t){const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let o=`{${r[1]}`;e=r[0],o=this.interpolate(o,i);const a=o.match(/'/g),s=o.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){let s=[];i={...o},i=i.replace&&"string"!=typeof i.replace?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),s=e,u=!0}if(r=t(a.call(this,n[1].trim(),i),i),r&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=iA(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),u&&(r=s.reduce(((e,t)=>this.format(e,t,o.lng,{...o,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}function PA(e){const t={};return function(n,r,i){const o=r+JSON.stringify(i);let a=t[o];return a||(a=e(gA(r),i),t[o]=a),a(n)}}class LA{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=tA.create("formatter"),this.options=e,this.formats={number:PA(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:PA(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:PA(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:PA(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:PA(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=PA(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=t.split(this.formatSeparator).reduce(((e,t)=>{const{formatName:i,formatOptions:o}=function(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach((e=>{if(e){const[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=i),"false"===i&&(n[o]=!1),"true"===i&&(n[o]=!0),isNaN(i)||(n[o]=parseInt(i,10))}}))}return{formatName:t,formatOptions:n}}(t);if(this.formats[i]){let t=e;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...o,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e}),e);return i}}class IA extends nA{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=tA.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const i={},o={},a={},s={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===o[a]&&(o[a]=!0):(this.state[a]=1,r=!1,void 0===o[a]&&(o[a]=!0),void 0===i[a]&&(i[a]=!0),void 0===s[t]&&(s[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2;const a={};this.queue.forEach((n=>{!function(e,t,n,r){const{obj:i,k:o}=aA(e,t,Object);i[o]=i[o]||[],r&&(i[o]=i[o].concat(n)),r||i[o].push(n)}(n.loaded,[i],o),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:o});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*i,o)}),i):o(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,((n,o)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,o),this.loaded(e,n,o)}))}saveMissing(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...o,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let i;i=5===u.length?u(e,t,n,r,s):u(e,t,n,r),i&&"function"==typeof i.then?i.then((e=>a(null,e))).catch(a):a(null,i)}catch(e){a(e)}else u(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}function OA(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function NA(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function DA(){}class BA extends nA{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=NA(e),this.services={},this.logger=tA,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=OA();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options={...r,...this.options,...NA(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){let t;this.modules.logger?tA.init(i(this.modules.logger),this.options):tA.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=LA);const n=new SA(this.options);this.store=new vA(this.options.resources,this.options);const o=this.services;o.logger=tA,o.resourceStore=this.store,o.languageUtils=n,o.pluralResolver=new AA(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(o.formatter=i(t),o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new RA(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new IA(i(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)})),this.modules.languageDetector&&(o.languageDetector=i(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=i(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new wA(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=DA),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const o=rA(),a=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),o}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:DA;const n="string"==typeof e?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};n?r(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e))),this.options.preload&&this.options.preload.forEach((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=rA();return e||(e=this.languages),t||(t=this.options.ns),n||(n=DA),this.services.backendConnector.reload(e,t,(e=>{r.resolve(),n(e)})),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&bA.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=rA();this.emit("languageChanging",e);const i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(e,o)=>{o?(i(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||i(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(e=>{o(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const i=function(e,t){let o;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];o=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else o={...t};o.lng=o.lng||i.lng,o.lngs=o.lngs||i.lngs,o.ns=o.ns||i.ns,o.keyPrefix=o.keyPrefix||n||i.keyPrefix;const l=r.options.keySeparator||".";let c;return c=o.keyPrefix&&Array.isArray(e)?e.map((e=>`${o.keyPrefix}${l}${e}`)):o.keyPrefix?`${o.keyPrefix}${l}${e}`:e,r.t(c,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(n,e)||r&&!o(i,e))}loadNamespaces(e,t){const n=rA();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=rA();"string"==typeof e&&(e=[e]);const r=this.options.preload||[],i=e.filter((e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return i.length?(this.options.preload=r.concat(i),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new SA(OA());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new BA(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:DA;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new BA(r);return void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e)),["store","services","language"].forEach((e=>{i[e]=this[e]})),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n&&(i.store=new vA(this.store.data,r),i.services.resourceStore=i.store),i.translator=new wA(i.services,r),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit(e,...n)})),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const jA=BA.createInstance();jA.createInstance=BA.createInstance;const zA=jA.createInstance;jA.dir,jA.init,jA.loadResources,jA.reloadResources,jA.use,jA.changeLanguage,jA.getFixedT,jA.t,jA.exists,jA.setDefaultNamespace,jA.hasLoadedNamespace,jA.loadNamespaces,jA.loadLanguages;var UA,FA={name:"@metamask/sdk",version:"0.28.4",description:"",homepage:"https://github.com/MetaMask/metamask-sdk#readme",bugs:{url:"https://github.com/MetaMask/metamask-sdk/issues"},repository:{type:"git",url:"https://github.com/MetaMask/metamask-sdk",directory:"packages/sdk"},main:"dist/node/cjs/metamask-sdk.js",unpkg:"dist/browser/umd/metamask-sdk.js",module:"dist/node/es/metamask-sdk.js",browser:"dist/browser/umd/metamask-sdk.js","react-native":"dist/react-native/es/metamask-sdk.js",types:"dist/browser/es/src/index.d.ts",sideEffects:!1,files:["/dist"],scripts:{build:"rm -rf dist && rollup -c --bundleConfigAsCjs","build:dev":"rimraf dist && NODE_ENV=dev rollup -c --bundleConfigAsCjs","build:post-tsc":"echo 'N/A'","build:pre-tsc":"echo 'N/A'",clean:"rimraf ./dist",size:"node bundle-size && size-limit",lint:"yarn lint:eslint && yarn lint:misc --check","lint:changelog":"../../scripts/validate-changelog.sh @metamask/sdk","lint:eslint":"eslint . --cache --ext js,ts","lint:fix":"yarn lint:eslint --fix && yarn lint:misc --write","lint:misc":"prettier '**/*.json' '**/*.md' '!CHANGELOG.md' --ignore-path ../../.gitignore",prepack:"../../scripts/prepack.sh","publish:preview":"yarn npm publish --tag preview",reset:"yarn clean && rimraf ./node_modules/",test:'jest --testPathIgnorePatterns "/e2e/"',"test:coverage":'jest --coverage --testPathIgnorePatterns "/e2e/"',"test:e2e":'jest --testPathPattern "/e2e/"',"test:ci":'jest --coverage --passWithNoTests --setupFilesAfterEnv ./jest-preload.js --testPathIgnorePatterns "/e2e/"',"test:dev":'jest -c ./jest.config.ts --detectOpenHandles --testPathIgnorePatterns "/e2e/"',watch:"rollup -c -w"},dependencies:{"@metamask/onboarding":"^1.0.1","@metamask/providers":"16.1.0","@metamask/sdk-communication-layer":"workspace:*","@metamask/sdk-install-modal-web":"workspace:*","@types/dom-screen-wake-lock":"^1.0.0","@types/uuid":"^10.0.0",bowser:"^2.9.0","cross-fetch":"^4.0.0",debug:"^4.3.4",eciesjs:"^0.3.15","eth-rpc-errors":"^4.0.3",eventemitter2:"^6.4.7",i18next:"23.11.5","i18next-browser-languagedetector":"7.1.0","obj-multiplex":"^1.0.0",pump:"^3.0.0","qrcode-terminal-nooctal":"^0.12.1","react-native-webview":"^11.26.0","readable-stream":"^3.6.2","rollup-plugin-visualizer":"^5.9.2","socket.io-client":"^4.5.1",util:"^0.12.4",uuid:"^8.3.2"},devDependencies:{"@jest/globals":"^29.3.1","@lavamoat/allow-scripts":"^2.3.1","@metamask/auto-changelog":"3.1.0","@metamask/eslint-config":"^6.0.0","@metamask/eslint-config-nodejs":"^6.0.0","@metamask/eslint-config-typescript":"^6.0.0","@react-native-async-storage/async-storage":"^1.19.6","@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.0.2","@rollup/plugin-terser":"^0.4.1","@size-limit/preset-big-lib":"^11.0.2","@types/dom-screen-wake-lock":"^1.0.2","@types/node":"^20.1.3","@types/pump":"^1.1.1","@types/qrcode-terminal":"^0.12.0","@typescript-eslint/eslint-plugin":"^4.26.0","@typescript-eslint/parser":"^4.26.0",eslint:"^7.30.0","eslint-config-prettier":"^8.3.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.4.0","eslint-plugin-jsdoc":"^36.1.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^3.4.0",jest:"^29.3.1","jest-environment-jsdom":"^29.3.1",prettier:"^2.3.0",react:"^18.2.0","react-dom":"18.2.0",rimraf:"^4.4.0",rollup:"^3.21.7","rollup-plugin-jscc":"^2.0.0","rollup-plugin-natives":"^0.7.5","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-polyfill-node":"^0.11.0","rollup-plugin-sizes":"^1.0.6","rollup-plugin-typescript2":"^0.31.2","size-limit":"^11.0.2","ts-jest":"^29.0.3","ts-node":"^10.9.1",tslib:"latest",typescript:"^4.3.2"},peerDependencies:{react:"^18.2.0","react-dom":"^18.2.0"},peerDependenciesMeta:{react:{optional:!0},"react-dom":{optional:!0}},publishConfig:{access:"public",registry:"https://registry.npmjs.org/"},lavamoat:{allowScripts:{"eciesjs>secp256k1":!1,"socket.io-client>engine.io-client>ws>bufferutil":!1,"socket.io-client>engine.io-client>ws>utf-8-validate":!1,"@metamask/sdk-communication-layer>bufferutil":!1,"@metamask/sdk-communication-layer>eciesjs>secp256k1":!1,"@metamask/sdk-communication-layer>utf-8-validate":!1}}};!function(e){e.INPAGE="metamask-inpage",e.CONTENT_SCRIPT="metamask-contentscript",e.PROVIDER="metamask-provider"}(UA||(UA={}));const KA="direct",qA="https://metamask.app.link/connect",HA="metamask://connect",WA={NAME:"MetaMask",RDNS:"io.metamask"},$A=/(?:^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}$)|(?:^0{8}-0{4}-0{4}-0{4}-0{12}$)/u;var VA;t.PROVIDER_UPDATE_TYPE=void 0,(VA=t.PROVIDER_UPDATE_TYPE||(t.PROVIDER_UPDATE_TYPE={})).TERMINATE="terminate",VA.EXTENSION="extension",VA.INITIALIZED="initialized";const YA="undefined"!=typeof window&&window.localStorage;function GA(e){var n,r;return _k(this,void 0,void 0,(function*(){kx("[MetaMaskSDK: connectWithExtensionProvider()] ",e),e.sdkProvider=e.activeProvider,e.activeProvider=window.extension,window.ethereum=window.extension;try{const e=yield null===(n=window.extension)||void 0===n?void 0:n.request({method:"eth_requestAccounts"});kx(`[MetaMaskSDK: connectWithExtensionProvider()] accounts=${e}`)}catch(e){return void console.warn("[MetaMaskSDK: connectWithExtensionProvider()] can't request accounts error",e)}localStorage.setItem(Hx,"extension"),e.extensionActive=!0,e.emit(t.EventType.PROVIDER_UPDATE,t.PROVIDER_UPDATE_TYPE.EXTENSION),e.options.enableAnalytics&&(null===(r=e.analytics)||void 0===r||r.send({event:ek.SDK_USE_EXTENSION}))}))}function ZA(t){let n;if("undefined"!=typeof Buffer)n=Buffer.from(t,"utf8").toString("base64");else if("function"==typeof btoa)n=btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/gu,((e,t)=>String.fromCharCode(parseInt(t,16)))));else{if("object"!=typeof e||!("Buffer"in e))throw new Error("Unable to base64 encode: No available method.");n=e.Buffer.from(t,"utf8").toString("base64")}return n}class QA{constructor({shouldSetOnWindow:e,connectionStream:t,shouldSendMetadata:n=!1,shouldShimWeb3:r}){const i=new Zx({connectionStream:t,shouldSendMetadata:n,shouldSetOnWindow:e,shouldShimWeb3:r,autoRequestAccounts:!1}),o=new Proxy(i,{deleteProperty:()=>!0});var a;this.provider=o,e&&"undefined"!=typeof window&&(a=i,window.ethereum=a,window.dispatchEvent(new Event("ethereum#initialized"))),r&&"undefined"!=typeof window&&function(e,t=console){let n=!1,r=!1;if(!window.web3){const i="__isMetaMaskShim__";let o={currentProvider:e};Object.defineProperty(o,i,{value:!0,enumerable:!0,configurable:!1,writable:!1}),o=new Proxy(o,{get:(o,a,...s)=>("currentProvider"!==a||n?"currentProvider"===a||a===i||r||(r=!0,t.error("MetaMask no longer injects web3. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3"),e.request({method:"metamask_logWeb3ShimUsage"}).catch((e=>{t.debug("MetaMask: Failed to log web3 shim usage.",e)}))):(n=!0,t.warn("You are accessing the MetaMask window.web3.currentProvider shim. This property is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3")),Reflect.get(o,a,...s)),set:(...e)=>(t.warn("You are accessing the MetaMask window.web3 shim. This object is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3"),Reflect.set(...e))}),Object.defineProperty(window,"web3",{value:o,enumerable:!1,configurable:!0,writable:!0})}}(this.provider),this.provider.on("_initialized",(()=>{const e={chainId:this.provider.getChainId(),isConnected:this.provider.isConnected(),isMetaNask:this.provider.isMetaMask,selectedAddress:this.provider.getSelectedAddress(),networkVersion:this.provider.getNetworkVersion()};kx("[Ethereum: constructor()] provider initialized",e)}))}static init(e){var t;return kx("[Ethereum: init()] Initializing Ethereum service"),this.instance=new QA(e),null===(t=this.instance)||void 0===t?void 0:t.provider}static destroy(){}static getInstance(){var e;if(!(null===(e=this.instance)||void 0===e?void 0:e.provider))throw new Error("Ethereum instance not intiialized - call Ethereum.factory first.");return this.instance}static getProvider(){var e;if(!(null===(e=this.instance)||void 0===e?void 0:e.provider))throw new Error("Ethereum instance not intiialized - call Ethereum.factory first.");return this.instance.provider}}function XA(e,t,n,r){var i,o,a,s,u,l,c,d,f,h,p,m,g,v,b,y,w,_;return _k(this,void 0,void 0,(function*(){const n=null===(i=e.state.remote)||void 0===i?void 0:i.isReady(),E=null===(o=e.state.remote)||void 0===o?void 0:o.isConnected(),k=null===(a=e.state.remote)||void 0===a?void 0:a.isPaused(),M=QA.getProvider(),C=null===(s=e.state.remote)||void 0===s?void 0:s.getChannelId(),x=null===(u=e.state.remote)||void 0===u?void 0:u.isAuthorized(),{deeplinkProtocol:A}=e.state,{method:T,data:R,triggeredInstaller:P}=(e=>{var t,n,r,i;let o;S.isBuffer(e)?(o=e.toJSON(),o._isBuffer=!0):o=e;const a=null===(t=null==o?void 0:o.data)||void 0===t?void 0:t.method;let s=!1;return"object"==typeof(null===(n=null==o?void 0:o.data)||void 0===n?void 0:n.params)&&!0===(null===(i=null===(r=null==o?void 0:o.data)||void 0===r?void 0:r.params)||void 0===i?void 0:i.__triggeredInstaller)&&(s=!0,o.data.params=o.data.params.wrappedParams),{method:a,data:o,triggeredInstaller:s}})(t);if(kx(`[RCPMS: write()] method='${T}' isRemoteReady=${n} channelId=${C} isSocketConnected=${E} isRemotePaused=${k} providerConnected=${M.isConnected()}`,t),!C)return T!==zx.METAMASK_GETPROVIDERSTATE&&kx(`[RCPMS: write()] ${T} --\x3e channelId is undefined`),r(new Error("disconnected"));kx(`[RCPMS: write()] remote.isPaused()=${null===(l=e.state.remote)||void 0===l?void 0:l.isPaused()} authorized=${x} ready=${n} socketConnected=${E}`,t);const L=null===(c=e.state.platformManager)||void 0===c?void 0:c.isSecure(),I=null!==(f=null===(d=e.state.platformManager)||void 0===d?void 0:d.isMobileWeb())&&void 0!==f&&f,O=A&&I&&x;try{if((!O||P)&&(null===(h=e.state.remote)||void 0===h||h.sendMessage(null==R?void 0:R.data).then((()=>{kx(`[RCPMS: _write()] ${T} sent successfully`)})).catch((e=>{kx("[RCPMS: _write()] error sending message",e)})),!L))return kx(`[RCPMS: _write()] unsecure platform for method ${T} -- return callback`),r();if(P)return kx("[RCPMS: _write()] prevent deeplink -- installation completed separately."),r();const t=null!==(g=null===(m=null===(p=e.state.remote)||void 0===p?void 0:p.getKeyInfo())||void 0===m?void 0:m.ecies.public)&&void 0!==g?g:"";let n=encodeURI(`channelId=${C}&pubkey=${t}&comm=socket&t=d&v=2`);if(O){const t=JSON.stringify(null==R?void 0:R.data),i=null===(v=e.state.remote)||void 0===v?void 0:v.encrypt(t);if(!i)return kx("[RCPMS: _write()] error encrypting message"),r(new Error("RemoteCommunicationPostMessageStream - disconnected"));n+=`&scheme=${A}&rpc=${ZA(i)}`}if(!(null===(b=e.state.platformManager)||void 0===b?void 0:b.isMetaMaskInstalled()))return kx("[RCPMS: _write()] prevent deeplink until installation is completed."),r();Ux[T]?(kx(`[RCPMS: _write()] redirect link for '${T}' socketConnected=${E} connect?${n}`),null===(y=e.state.platformManager)||void 0===y||y.openDeeplink(`${qA}?${n}`,`${HA}?${n}`,"_self")):(null===(w=e.state.remote)||void 0===w?void 0:w.isPaused())?(kx(`[RCPMS: _write()] MM is PAUSED! deeplink with connect! targetMethod=${T}`),null===(_=e.state.platformManager)||void 0===_||_.openDeeplink(`${qA}?redirect=true&${n}`,`${HA}?redirect=true&${n}`,"_self")):kx(`[RCPMS: _write()] method ${T} doesn't need redirect.`)}catch(e){return kx("[RCPMS: _write()] error sending message",e),r(new Error("RemoteCommunicationPostMessageStream - disconnected"))}return r()}))}class JA extends Wn.Duplex{constructor({name:e,remote:n,deeplinkProtocol:r,platformManager:i}){super({objectMode:!0}),this.state={_name:null,remote:null,deeplinkProtocol:!1,platformManager:null},this.state._name=e,this.state.remote=n,this.state.deeplinkProtocol=r,this.state.platformManager=i,this._onMessage=this._onMessage.bind(this),this.state.remote.on(t.EventType.MESSAGE,this._onMessage)}_write(e,t,n){return _k(this,void 0,void 0,(function*(){return XA(this,e,0,n)}))}_read(){}_onMessage(e){return function(e,t){try{if(kx("[RCPMS: onMessage()] message",t),!t||"object"!=typeof t)return;if("object"!=typeof(null==t?void 0:t.data))return;if(!(null==t?void 0:t.name))return void kx("[RCPMS: onMessage()] ignore message without name",t);if((null==t?void 0:t.name)!==UA.PROVIDER)return void kx(`[RCPMS: onMessage()] ignore message with wrong name message=${t}`);if(S.isBuffer(t)){const n=S.from(t);e.push(n)}else e.push(t)}catch(e){kx(`[RCPMS: onMessage()] ignore message error err=${e}`)}}(this,e)}start(){}}var eT={exports:{}};!function(e,t){var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r&&r,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==n&&n,r="URLSearchParams"in n,i="Symbol"in n&&"iterator"in Symbol,o="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in n,s="ArrayBuffer"in n;if(s)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&u.indexOf(Object.prototype.toString.call(e))>-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function m(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=m(t);return t.readAsArrayBuffer(e),n}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&o&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(g)}),this.text=function(){var e,t,n,r=p(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=m(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=c(e),t=d(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},h.prototype.delete=function(e){delete this.map[c(e)]},h.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},h.prototype.set=function(e,t){this.map[c(e)]=d(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},i&&(h.prototype[Symbol.iterator]=h.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(e,t){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(t=t||{}).body;if(e instanceof w){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=function(e){var t=e.toUpperCase();return y.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var r=/([?&])_=[^&]*/;r.test(this.url)?this.url=this.url.replace(r,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function S(e,t){if(!(this instanceof S))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},b.call(w.prototype),b.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},S.error=function(){var e=new S(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];S.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new S(null,{status:t,headers:{location:e}})},t.DOMException=n.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function k(e,r){return new Promise((function(i,a){var u=new w(e,r);if(u.signal&&u.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function c(){l.abort()}l.onload=function(){var e,t,n={status:l.status,statusText:l.statusText,headers:(e=l.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};n.url="responseURL"in l?l.responseURL:n.headers.get("X-Request-URL");var r="response"in l?l.response:l.responseText;setTimeout((function(){i(new S(r,n))}),0)},l.onerror=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},l.ontimeout=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},l.onabort=function(){setTimeout((function(){a(new t.DOMException("Aborted","AbortError"))}),0)},l.open(u.method,function(e){try{return""===e&&n.location.href?n.location.href:e}catch(t){return e}}(u.url),!0),"include"===u.credentials?l.withCredentials=!0:"omit"===u.credentials&&(l.withCredentials=!1),"responseType"in l&&(o?l.responseType="blob":s&&u.headers.get("Content-Type")&&-1!==u.headers.get("Content-Type").indexOf("application/octet-stream")&&(l.responseType="arraybuffer")),!r||"object"!=typeof r.headers||r.headers instanceof h?u.headers.forEach((function(e,t){l.setRequestHeader(t,e)})):Object.getOwnPropertyNames(r.headers).forEach((function(e){l.setRequestHeader(e,d(r.headers[e]))})),u.signal&&(u.signal.addEventListener("abort",c),l.onreadystatechange=function(){4===l.readyState&&u.signal.removeEventListener("abort",c)}),l.send(void 0===u._bodyInit?null:u._bodyInit)}))}k.polyfill=!0,n.fetch||(n.fetch=k,n.Headers=h,n.Request=w,n.Response=S),t.Headers=h,t.Request=w,t.Response=S,t.fetch=k}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=n.fetch?n:i;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(eT,eT.exports);var tT=i(eT.exports);let nT=1;const rT=e=>new Promise((t=>{setTimeout((()=>{t(!0)}),e)})),iT=({checkInstallationOnAllCalls:e=!1,communicationLayerPreference:n,injectProvider:r,shouldShimWeb3:i,platformManager:o,installer:a,sdk:s,remoteConnection:u,debug:l})=>_k(void 0,void 0,void 0,(function*(){var c,d;const f=(({name:e,remoteConnection:t})=>{if(!t||!(null==t?void 0:t.getConnector()))throw new Error("Missing remote connection parameter");return new JA({name:e,remote:null==t?void 0:t.getConnector(),deeplinkProtocol:null==t?void 0:t.state.deeplinkProtocol,platformManager:null==t?void 0:t.getPlatformManager()})})({name:UA.INPAGE,target:UA.CONTENT_SCRIPT,platformManager:o,communicationLayerPreference:n,remoteConnection:u}),h=o.getPlatformType(),p=s.options.dappMetadata,m=`Sdk/Javascript SdkVersion/${FA.version} Platform/${h} dApp/${null!==(c=p.url)&&void 0!==c?c:p.name} dAppTitle/${p.name}`;let g=null,v=null;const b=null===(d=s.options.storage)||void 0===d?void 0:d.storageManager;if(b){try{const e=yield b.getCachedAccounts();e.length>0&&(g=e[0])}catch(e){console.error(`[initializeMobileProvider] failed to get cached addresses: ${e}`)}try{const e=yield b.getCachedChainId();e&&(v=e)}catch(e){console.error(`[initializeMobileProvider] failed to parse cached chainId: ${e}`)}}kx(`[initializeMobileProvider] cachedAccountAddress: ${g}, cachedChainId: ${v}`);const y=!(!r||h===t.PlatformType.NonBrowser||h===t.PlatformType.ReactNative),w=QA.init({shouldSetOnWindow:y,connectionStream:f,shouldShimWeb3:i});let _=!1;const S=e=>{_=e},E=()=>_,k=(n,r,i,l)=>_k(void 0,void 0,void 0,(function*(){var c,d,f,h,p,y,w,k;if(_){null==u||u.showActiveModal();let e=E();for(;e;){const t=E(),n=null==u?void 0:u.isAuthorized();e=t&&!n,kx(`[initializeMobileProvider: sendRequest()] waiting for initialization to complete - initializing: ${t} authorized: ${n}`),yield rT(1e3)}return kx("[initializeMobileProvider: sendRequest()] initial method completed -- prevent installation and call provider"),i(...r)}const M=o.isMetaMaskInstalled(),C=null==u?void 0:u.isConnected(),x=QA.getProvider();let A=null,T=null,R=null;if(A=null!==(c=x.getSelectedAddress())&&void 0!==c?c:g,R=x.getChainId()||v,A&&b&&A!==g&&b.persistAccounts([A]).catch((e=>{console.error(`[initializeMobileProvider] failed to persist account: ${e}`)})),R&&(v=R,b&&b.persistChainId(R).catch((e=>{console.error(`[initializeMobileProvider] failed to persist chainId: ${e}`)}))),kx("[initializeMobileProvider: sendRequest()]",{selectedAddress:A,chainId:R}),l&&kx(`[initializeMobileProvider: sendRequest()] method=${n} ongoing=${_} selectedAddress=${A} isInstalled=${M} checkInstallationOnAllCalls=${e} socketConnected=${C}`),A&&n.toLowerCase()===zx.ETH_ACCOUNTS.toLowerCase())return[A];if(R&&n.toLowerCase()===zx.ETH_CHAINID.toLowerCase())return R;const P=[zx.ETH_REQUESTACCOUNTS,zx.WALLET_REQUESTPERMISSIONS,zx.METAMASK_CONNECTSIGN,zx.METAMASK_CONNECTWITH],L=!Ux[n],I=null===(d=s.options.readonlyRPCMap)||void 0===d?void 0:d[R];if(I&&L)try{const e=null===(f=null==r?void 0:r[0])||void 0===f?void 0:f.params,t=yield(({rpcEndpoint:e,method:t,sdkInfo:n,params:r})=>_k(void 0,void 0,void 0,(function*(){const i=JSON.stringify({jsonrpc:"2.0",method:t,params:r,id:(nT+=1,nT)}),o={Accept:"application/json","Content-Type":"application/json"};let a;e.includes("infura")&&(o["Metamask-Sdk-Info"]=n);try{a=yield tT(e,{method:"POST",headers:o,body:i})}catch(e){throw e instanceof Error?new Error(`Failed to fetch from RPC: ${e.message}`):new Error(`Failed to fetch from RPC: ${e}`)}if(!a.ok)throw new Error(`Server responded with a status of ${a.status}`);return(yield a.json()).result})))({rpcEndpoint:I,sdkInfo:m,method:n,params:e||[]});return l&&kx(`initializeProvider::ReadOnlyRPCResponse ${t}`),t}catch(e){console.warn(`[initializeMobileProvider: sendRequest()] method=${n} readOnlyRPCRequest failed:`,e)}if((!M||M&&!C)&&n!==zx.METAMASK_GETPROVIDERSTATE){const l=(null===(h=null==r?void 0:r[0])||void 0===h?void 0:h.params)||[];if(-1!==P.indexOf(n)||e){S(!0);const e=n===zx.METAMASK_CONNECTWITH,o=`${Date.now()}`;try{yield a.start({wait:!1,connectWith:e?{method:n,id:o,params:l}:void 0}),yield new Promise(((e,n)=>{(null==u?void 0:u.isAuthorized())&&(kx("[initializeMobileProvider: sendRequest()] already authorized"),e(!0)),null==u||u.getConnector().once(t.EventType.AUTHORIZED,(()=>{e(!0)})),s.once(t.EventType.PROVIDER_UPDATE,(e=>{kx(`[initializeMobileProvider: sendRequest()] PROVIDER_UPDATE --- remote provider request interupted type=${e}`),e===t.PROVIDER_UPDATE_TYPE.EXTENSION?n(t.EventType.PROVIDER_UPDATE):n(new Error("Connection Terminated"))}))})),S(!1)}catch(e){if(S(!1),t.PROVIDER_UPDATE_TYPE.EXTENSION===e){if(kx(`[initializeMobileProvider: sendRequest()] extension provider detect: re-create ${n} on the active provider`),n.toLowerCase()===zx.METAMASK_CONNECTSIGN.toLowerCase()){const e=yield null===(p=s.getProvider())||void 0===p?void 0:p.request({method:zx.ETH_REQUESTACCOUNTS,params:[]});if(!e.length)throw new Error("SDK state invalid -- undefined accounts");return yield null===(y=s.getProvider())||void 0===y?void 0:y.request({method:zx.PERSONAL_SIGN,params:[l[0],e[0]]})}if(n.toLowerCase()===zx.METAMASK_CONNECTWITH.toLowerCase()){const[e]=l;return yield(({method:e,sdk:t,params:n})=>_k(void 0,void 0,void 0,(function*(){var r,i,o,a;if(!t.isExtensionActive())throw new Error("SDK state invalid -- extension is not active");kx("[MetaMaskProvider: extensionConnectWithOverwrite()] Overwriting request method",e,n);const s=yield null===(r=t.getProvider())||void 0===r?void 0:r.request({method:zx.ETH_REQUESTACCOUNTS,params:[]});if(!s.length)throw new Error("SDK state invalid -- undefined accounts");if((null==e?void 0:e.toLowerCase())===zx.PERSONAL_SIGN.toLowerCase()){const r={method:e,params:[n[0],s[0]]};return yield null===(i=t.getProvider())||void 0===i?void 0:i.request(r)}if((null==e?void 0:e.toLowerCase())===zx.ETH_SENDTRANSACTION.toLowerCase()){const r={method:e,params:[Object.assign(Object.assign({},n[0]),{from:s[0]})]};return yield null===(o=t.getProvider())||void 0===o?void 0:o.request(r)}return Kx.includes(e.toLowerCase())?(console.warn(`MetaMaskSDK connectWith method=${e} -- not handled by the extension -- call separately`),s):yield null===(a=t.getProvider())||void 0===a?void 0:a.request({method:e,params:n})})))({method:e.method,sdk:s,params:e.params})}return kx(`[initializeMobileProvider: sendRequest()] sending '${n}' on active provider`,l),yield null===(w=s.getProvider())||void 0===w?void 0:w.request({method:n,params:l})}throw kx(`[initializeMobileProvider: sendRequest()] failed to start installer: ${e}`),e}if(n===zx.ETH_REQUESTACCOUNTS)return T=yield new Promise((e=>{const t=setInterval((()=>{const{accounts:n}=x.getState();n&&(clearInterval(t),e(n))}),100)})),kx(`[initializeMobileProvider: sendRequest()] selectedAddress: ${A} --- SKIP rpc call`),T;if(n===zx.METAMASK_CONNECTWITH)try{return yield new Promise(((e,n)=>{const r=null==u?void 0:u.getConnector().getRPCMethodTracker();kx(`TRACKER: method ${o}`,r),(null==r?void 0:r[o].result)?e(null==r?void 0:r[o].result):(null==r?void 0:r[o].error)&&n(null==r?void 0:r[o].error),null==u||u.getConnector().once(t.EventType.RPC_UPDATE,(t=>{kx(`TRACKER: update method ${o}`,t),t.result?e(t.result):n(t.error)}))}))}catch(e){throw kx("[initializeMobileProvider: sendRequest()] error:",e),e}return r[0]&&"object"==typeof r[0]&&(r[0].params={__triggeredInstaller:!0,wrappedParams:r[0].params}),i(...r)}if(o.isSecure()&&Ux[n])return i(...r);if(s.isExtensionActive())return kx(`[initializeMobileProvider: sendRequest()] EXTENSION active - redirect request '${n}' to it`,r,l),yield null===(k=s.getProvider())||void 0===k?void 0:k.request({method:n,params:l});throw kx(`[initializeMobileProvider: sendRequest()] method=${n} --- skip --- not connected/installed`),new Error("MetaMask is not connected/installed, please call eth_requestAccounts to connect first.")}try{const e=yield i(...r);return kx(`[initializeMobileProvider: sendRequest()] method=${n} rpcResponse: ${e}`),e}catch(e){throw console.error("[initializeMobileProvider: sendRequest()] error:",e),e}})),{request:M}=w;w.request=(...e)=>_k(void 0,void 0,void 0,(function*(){return k(null==e?void 0:e[0].method,e,M,l)}));const{send:C}=w;return w.send=(...e)=>_k(void 0,void 0,void 0,(function*(){return k(null==e?void 0:e[0],e,C,l)})),kx("[initializeMobileProvider: sendRequest()] metamaskStream.start()"),f.start(),w}));function oT(e){var n,r,i,o;return _k(this,void 0,void 0,(function*(){const{options:a}=e,s={communicationLayerPreference:null!==(n=a.communicationLayerPreference)&&void 0!==n?n:t.CommunicationLayerPreference.SOCKET,platformManager:e.platformManager,sdk:e,checkInstallationOnAllCalls:a.checkInstallationOnAllCalls,injectProvider:null===(r=a.injectProvider)||void 0===r||r,shouldShimWeb3:null===(i=a.shouldShimWeb3)||void 0===i||i,extensionOnly:null===(o=a.extensionOnly)||void 0===o||o,installer:e.installer,remoteConnection:e.remoteConnection,debug:e.debug},u=yield iT(s);e.activeProvider=u,function(e){var n,r,i,o;null===(r=null===(n=e.remoteConnection)||void 0===n?void 0:n.getConnector())||void 0===r||r.on(t.EventType.CONNECTION_STATUS,(n=>{e.emit(t.EventType.CONNECTION_STATUS,n)})),null===(o=null===(i=e.remoteConnection)||void 0===i?void 0:i.getConnector())||void 0===o||o.on(t.EventType.SERVICE_STATUS,(n=>{e.emit(t.EventType.SERVICE_STATUS,n)}))}(e)}))}var aT,sT,uT;const lT="sdk";class cT{constructor({serverUrl:e,enabled:t,originatorInfo:n}){aT.set(this,KE),sT.set(this,void 0),uT.set(this,void 0),Ek(this,aT,e,"f"),Ek(this,uT,n,"f"),Ek(this,sT,null==t||t,"f")}send({event:e,params:t}){if(!Sk(this,sT,"f"))return;const n={id:lT,event:e,sdkVersion:FA.version,originationInfo:Sk(this,uT,"f"),params:t};kx(`[Analytics: send()] event: ${e}`,n),KS(n,Sk(this,aT,"f")).catch((e=>{kx(`[Analytics: send()] error: ${e}`)}))}}aT=new WeakMap,sT=new WeakMap,uT=new WeakMap;const dT=()=>{if("undefined"==typeof document)return;let e;const t=document.getElementsByTagName("link");for(let n=0;n<t.length;n++)"icon"!==t[n].getAttribute("rel")&&"shortcut icon"!==t[n].getAttribute("rel")||(e=t[n].getAttribute("href"));return e},fT=163400;var hT,pT=new Uint8Array(16);function mT(){if(!hT&&!(hT="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return hT(pT)}for(var gT=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,vT=[],bT=0;bT<256;++bT)vT.push((bT+256).toString(16).substr(1));function yT(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(vT[e[t+0]]+vT[e[t+1]]+vT[e[t+2]]+vT[e[t+3]]+"-"+vT[e[t+4]]+vT[e[t+5]]+"-"+vT[e[t+6]]+vT[e[t+7]]+"-"+vT[e[t+8]]+vT[e[t+9]]+"-"+vT[e[t+10]]+vT[e[t+11]]+vT[e[t+12]]+vT[e[t+13]]+vT[e[t+14]]+vT[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&gT.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n}function wT(e,t,n){var r=(e=e||{}).random||(e.rng||mT)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return yT(r)}function _T(e){var n,r,i;const{dappMetadata:o}=e,a=function({url:e,name:t}){var n;const r=ZA(e+t);if(!localStorage)return"";let i=null!==(n=localStorage.getItem(r))&&void 0!==n?n:"";if(!i){i=wT();try{localStorage.setItem(r,i)}catch(e){return""}}return i}({url:null!==(n=null==o?void 0:o.url)&&void 0!==n?n:"no_url",name:null!==(r=null==o?void 0:o.name)&&void 0!==r?r:"no_name"}),s=null===(i=e.platformManager)||void 0===i?void 0:i.getPlatformType(),u=s===t.PlatformType.DesktopWeb,l=s===t.PlatformType.MetaMaskMobileWebview;let c="N/A";return u?c="extension":l&&(c="mobile"),{id:a,from:c}}const ST=({provider:e,sdkInstance:t})=>{if("state"in e)throw new Error("INVALID EXTENSION PROVIDER");return new Proxy(e,{get:(n,r)=>"request"===r?function(r){var i,o;return _k(this,void 0,void 0,(function*(){kx("[wrapExtensionProvider()] Overwriting request method",r);const{method:a,params:s}=r,u=Fx.includes(a.toLowerCase()),{id:l,from:c}=_T(t);if(u&&(null===(i=t.analytics)||void 0===i||i.send({event:ek.SDK_RPC_REQUEST,params:{method:a,from:c,id:l}})),a===zx.METAMASK_BATCH&&Array.isArray(s))return(({params:e,target:t,args:n,trackEvent:r,provider:i,sdkInstance:o})=>_k(void 0,void 0,void 0,(function*(){var a;for(const t of e)yield null==i?void 0:i.request({method:t.method,params:t.params});const s=yield t.request(n),{id:u,from:l}=_T(o);return r&&(null===(a=o.analytics)||void 0===a||a.send({event:ek.SDK_RPC_REQUEST_DONE,params:{method:n.method,from:l,id:u}})),s})))({params:s,target:n,args:r,trackEvent:u,sdkInstance:t,provider:e});if(a.toLowerCase()===zx.METAMASK_CONNECTSIGN.toLowerCase()&&Array.isArray(s))return(({target:e,params:t})=>_k(void 0,void 0,void 0,(function*(){const n=yield e.request({method:zx.ETH_REQUESTACCOUNTS,params:[]});if(!n.length)throw new Error("SDK state invalid -- undefined accounts");return yield e.request({method:zx.PERSONAL_SIGN,params:[t[0],n[0]]})})))({target:n,params:s});if(a.toLowerCase()===zx.METAMASK_CONNECTWITH.toLowerCase()&&Array.isArray(s))return(({target:e,params:t})=>_k(void 0,void 0,void 0,(function*(){const[n]=t,r=n.method,i=n.params,o=yield e.request({method:zx.ETH_REQUESTACCOUNTS,params:[]});if(!o.length)throw new Error("SDK state invalid -- undefined accounts");return(null==r?void 0:r.toLowerCase())===zx.PERSONAL_SIGN.toLowerCase()?yield e.request({method:r,params:[i[0],o[0]]}):(null==r?void 0:r.toLowerCase())===zx.ETH_SENDTRANSACTION.toLowerCase()?yield e.request({method:r,params:[Object.assign(Object.assign({},i[0]),{from:o[0]})]}):Kx.includes(r.toLowerCase())?(console.warn(`MetaMaskSDK connectWith method=${r} -- not handled by the extension -- call separately`),o):yield e.request({method:r,params:i})})))({target:n,params:s});let d;try{return d=yield n.request(r),d}finally{u&&(null===(o=t.analytics)||void 0===o||o.send({event:ek.SDK_RPC_REQUEST_DONE,params:{method:a,from:c,id:l}}))}}))}:"getChainId"===r?function(){return e.chainId}:"getNetworkVersion"===r?function(){return e.networkVersion}:"getSelectedAddress"===r?function(){return e.selectedAddress}:"isConnected"===r?function(){return e._state.isConnected}:n[r]})};var ET;function kT({mustBeMetaMask:e,sdkInstance:t}){return _k(this,void 0,void 0,(function*(){if("undefined"==typeof window)throw new Error("window not available");let n;try{return n=yield new Promise(((e,t)=>{const n=setTimeout((()=>{t(new Error("eip6963RequestProvider timed out"))}),500);window.addEventListener(ET.Announce,(t=>{const r=t,{detail:{info:i,provider:o}={}}=r,{name:a,rdns:s,uuid:u}=null!=i?i:{};$A.test(u)&&a.startsWith(WA.NAME)&&s===WA.RDNS&&(clearTimeout(n),e(o))})),window.dispatchEvent(new Event(ET.Request))})),ST({provider:n,sdkInstance:t})}catch(n){const{ethereum:r}=window;if(!r)throw new Error("Ethereum not found in window object");if("providers"in r){if(Array.isArray(r.providers)){const n=e?r.providers.find((e=>e.isMetaMask)):r.providers[0];if(!n)throw new Error("No suitable provider found");return ST({provider:n,sdkInstance:t})}}else if(e&&!r.isMetaMask)throw new Error("MetaMask provider not found in Ethereum");return ST({provider:r,sdkInstance:t})}}))}!function(e){e.Announce="eip6963:announceProvider",e.Request="eip6963:requestProvider"}(ET||(ET={}));var MT={exports:{}};!function(e,t){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),a=Math.max(i,o),s=0,u=e.map([t,n],(function(t){var n=a-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===s)return 0;a-=1}else if(u[0][a]<u[1][a])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var s=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=o.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(n=null)&&a(t.prototype,n),r&&a(t,r),e}();t.default=s,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=u(n(92)),i=u(n(93)),o=u(n(94)),a=u(n(95)),s=u(n(17));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(a.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},o=0;if(Object.keys(e).forEach((function(t){var a=e[t];"string"==typeof a?(i[t]=a,o+=1):"object"==typeof a&&(n[t]=a,r+=1)})),r>0){var a=Object.keys(n),u=s.default.find(a,(function(e){return t.isOS(e)}));if(u){var l=this.satisfies(n[u]);if(void 0!==l)return l}var c=s.default.find(a,(function(e){return t.isPlatform(e)}));if(c){var d=this.satisfies(n[c]);if(void 0!==d)return d}}if(o>0){var f=Object.keys(i),h=s.default.find(f,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=l,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),a=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:o.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:o.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=a,e.exports=t.default}})}(MT);var CT=i(MT.exports);class xT{constructor({useDeepLink:e,preferredOpenLink:t,debug:n=!1}){this.state={platformType:void 0,useDeeplink:!1,preferredOpenLink:void 0,debug:!1},this.state.platformType=this.getPlatformType(),this.state.useDeeplink=e,this.state.preferredOpenLink=t,this.state.debug=n}openDeeplink(e,t,n){return function(e,t,n,r){const{state:i}=e;kx(`[PlatfformManager: openDeeplink()] universalLink --\x3e ${t}`),kx(`[PlatfformManager: openDeeplink()] deepLink --\x3e ${n}`);try{if(i.preferredOpenLink)return void i.preferredOpenLink(i.useDeeplink?n:t,r);if(kx(`[PlatfformManager: openDeeplink()] open link now useDeepLink=${i.useDeeplink} link=${i.useDeeplink?n:t}`),i.useDeeplink)"undefined"!=typeof window&&(window.location.href=n);else if("undefined"!=typeof document){const e=document.createElement("a");e.href=t,e.target="_self",e.rel="noreferrer noopener",e.click()}}catch(e){console.log("[PlatfformManager: openDeeplink()] can't open link",e)}}(this,e,t,n)}isReactNative(){var e;return this.isNotBrowser()&&"undefined"!=typeof window&&(null===window||void 0===window?void 0:window.navigator)&&"ReactNative"===(null===(e=window.navigator)||void 0===e?void 0:e.product)}isMetaMaskInstalled(){return function(){const e=QA.getProvider()||(null===window||void 0===window?void 0:window.ethereum);return kx(`[PlatfformManager: isMetaMaskInstalled()] isMetaMask=${null==e?void 0:e.isMetaMask} isConnected=${null==e?void 0:e.isConnected()}`),(null==e?void 0:e.isMetaMask)&&(null==e?void 0:e.isConnected())}()}isDesktopWeb(){return this.isBrowser()&&!this.isMobileWeb()}isMobile(){var e,t;const n=CT.parse(window.navigator.userAgent);return"mobile"===(null===(e=null==n?void 0:n.platform)||void 0===e?void 0:e.type)||"tablet"===(null===(t=null==n?void 0:n.platform)||void 0===t?void 0:t.type)}isSecure(){return this.isReactNative()||this.isMobileWeb()}isMetaMaskMobileWebView(){return"undefined"!=typeof window&&Boolean(window.ReactNativeWebView)&&Boolean(navigator.userAgent.endsWith("MetaMaskMobile"))}isMobileWeb(){return this.state.platformType===t.PlatformType.MobileWeb}isNotBrowser(){var t;return"undefined"==typeof window||!(null===window||void 0===window?void 0:window.navigator)||void 0!==e&&"ReactNative"===(null===(t=null==e?void 0:e.navigator)||void 0===t?void 0:t.product)||"ReactNative"===(null===navigator||void 0===navigator?void 0:navigator.product)}isNodeJS(){return this.isNotBrowser()&&!this.isReactNative()}isBrowser(){return!this.isNotBrowser()}isUseDeepLink(){return this.state.useDeeplink}getPlatformType(){return function(e){const{state:n}=e;return n.platformType?n.platformType:e.isReactNative()?t.PlatformType.ReactNative:e.isNotBrowser()?t.PlatformType.NonBrowser:e.isMetaMaskMobileWebView()?t.PlatformType.MetaMaskMobileWebview:e.isMobile()?t.PlatformType.MobileWeb:t.PlatformType.DesktopWeb}(this)}}
|
|
2
|
+
/*! *****************************************************************************
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
***************************************************************************** */function AT(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function TT(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var RT="INSTALLED",PT="NOT_INSTALLED",LT="REGISTERED",IT="REGISTERING",OT="RELOADING",NT={CHROME:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",FIREFOX:"https://addons.mozilla.org/firefox/addon/ether-metamask/",DEFAULT:"https://metamask.io"},DT="REGISTRATION_IN_PROGRESS",BT="FORWARDER_ID",jT=function(){function e(t){var n=void 0===t?{}:t,r=n.forwarderOrigin,i=void 0===r?"https://fwd.metamask.io":r,o=n.forwarderMode,a=void 0===o?e.FORWARDER_MODE.INJECT:o;this.forwarderOrigin=i,this.forwarderMode=a,this.state=e.isMetaMaskInstalled()?RT:PT;var s=e._detectBrowser();this.downloadUrl=s?NT[s]:NT.DEFAULT,this._onMessage=this._onMessage.bind(this),this._onMessageFromForwarder=this._onMessageFromForwarder.bind(this),this._openForwarder=this._openForwarder.bind(this),this._openDownloadPage=this._openDownloadPage.bind(this),this.startOnboarding=this.startOnboarding.bind(this),this.stopOnboarding=this.stopOnboarding.bind(this),window.addEventListener("message",this._onMessage),a===e.FORWARDER_MODE.INJECT&&"true"===sessionStorage.getItem(DT)&&e._injectForwarder(this.forwarderOrigin)}return e.prototype._onMessage=function(e){if(e.origin===this.forwarderOrigin)return"metamask:reload"===e.data.type?this._onMessageFromForwarder(e):void console.debug("Unknown message from '"+e.origin+"' with data "+JSON.stringify(e.data))},e.prototype._onMessageUnknownStateError=function(e){throw new Error("Unknown state: '"+e+"'")},e.prototype._onMessageFromForwarder=function(t){return AT(this,void 0,void 0,(function(){return TT(this,(function(n){switch(n.label){case 0:switch(this.state){case OT:return[3,1];case PT:return[3,2];case RT:return[3,3];case IT:return[3,5];case LT:return[3,6]}return[3,7];case 1:return console.debug("Ignoring message while reloading"),[3,8];case 2:return console.debug("Reloading now to register with MetaMask"),this.state=OT,location.reload(),[3,8];case 3:return console.debug("Registering with MetaMask"),this.state=IT,[4,e._register()];case 4:return n.sent(),this.state=LT,t.source.postMessage({type:"metamask:registrationCompleted"},t.origin),this.stopOnboarding(),[3,8];case 5:return console.debug("Already registering - ignoring reload message"),[3,8];case 6:return console.debug("Already registered - ignoring reload message"),[3,8];case 7:this._onMessageUnknownStateError(this.state),n.label=8;case 8:return[2]}}))}))},e.prototype.startOnboarding=function(){sessionStorage.setItem(DT,"true"),this._openDownloadPage(),this._openForwarder()},e.prototype.stopOnboarding=function(){"true"===sessionStorage.getItem(DT)&&(this.forwarderMode===e.FORWARDER_MODE.INJECT&&(console.debug("Removing forwarder"),e._removeForwarder()),sessionStorage.setItem(DT,"false"))},e.prototype._openForwarder=function(){this.forwarderMode===e.FORWARDER_MODE.OPEN_TAB?window.open(this.forwarderOrigin,"_blank"):e._injectForwarder(this.forwarderOrigin)},e.prototype._openDownloadPage=function(){window.open(this.downloadUrl,"_blank")},e.isMetaMaskInstalled=function(){return Boolean(window.ethereum&&window.ethereum.isMetaMask)},e._register=function(){return window.ethereum.request({method:"wallet_registerOnboarding"})},e._injectForwarder=function(e){var t=document.body,n=document.createElement("iframe");n.setAttribute("height","0"),n.setAttribute("width","0"),n.setAttribute("style","display: none;"),n.setAttribute("src",e),n.setAttribute("id",BT),t.insertBefore(n,t.children[0])},e._removeForwarder=function(){var e;null===(e=document.getElementById(BT))||void 0===e||e.remove()},e._detectBrowser=function(){var e=CT.parse(window.navigator.userAgent);return"Firefox"===e.browser.name?"FIREFOX":["Chrome","Chromium"].includes(e.browser.name||"")?"CHROME":null},e.FORWARDER_MODE={INJECT:"INJECT",OPEN_TAB:"OPEN_TAB"},e}();function zT(e,{wait:t=!1}){return _k(this,void 0,void 0,(function*(){return kx(`[MetamaskInstaller: startInstaller()] wait=${t}`),t&&(yield rT(1e3)),yield e.checkInstallation()}))}class UT{constructor({remote:e,preferDesktop:t,platformManager:n,debug:r=!1}){this.state={isInstalling:!1,hasInstalled:!1,resendRequest:null,preferDesktop:!1,platformManager:null,remote:null,debug:!1,connectWith:void 0},this.state.remote=e,this.state.preferDesktop=t,this.state.platformManager=n,this.state.debug=r}startDesktopOnboarding(){return function(){return _k(this,void 0,void 0,(function*(){kx("[MetamaskInstaller: startDesktopOnboarding() starting desktop onboarding"),delete window.ethereum,(new jT).startOnboarding()}))}()}redirectToProperInstall(){return _k(this,void 0,void 0,(function*(){return function(e){var n,r;return _k(this,void 0,void 0,(function*(){const{state:i}=e,o=null===(n=i.platformManager)||void 0===n?void 0:n.getPlatformType();if(kx(`[MetamaskInstaller: redirectToProperInstall()] platform=${o}`),o===t.PlatformType.MetaMaskMobileWebview)return!1;i.isInstalling=!0;try{yield null===(r=i.remote)||void 0===r?void 0:r.startConnection({connectWith:i.connectWith}),i.isInstalling=!1,i.hasInstalled=!0}catch(e){throw i.isInstalling=!1,e}return!0}))}(this)}))}checkInstallation(){return _k(this,void 0,void 0,(function*(){return function(e){var t;return _k(this,void 0,void 0,(function*(){const{state:n}=e,r=null===(t=n.platformManager)||void 0===t?void 0:t.isMetaMaskInstalled();return kx(`[MetamaskInstaller: checkInstallation()] isInstalled=${r}`),!!r||(yield e.redirectToProperInstall())}))}(this)}))}start({wait:e=!1,connectWith:t}){return _k(this,void 0,void 0,(function*(){this.state.connectWith=t,kx(`[MetaMaskInstaller: start()] wait=${e}`,t),yield zT(this,{wait:e})}))}}var FT,KT={exports:{}},qT={exports:{}},HT={};function WT(){if(FT)return HT;FT=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),d=Symbol.iterator,f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,p={};function m(e,t,n){this.props=e,this.context=t,this.refs=p,this.updater=n||f}function g(){}function v(e,t,n){this.props=e,this.context=t,this.refs=p,this.updater=n||f}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=m.prototype;var b=v.prototype=new g;b.constructor=v,h(b,m.prototype),b.isPureReactComponent=!0;var y=Array.isArray,w=Object.prototype.hasOwnProperty,_={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function E(t,n,r){var i,o={},a=null,s=null;if(null!=n)for(i in void 0!==n.ref&&(s=n.ref),void 0!==n.key&&(a=""+n.key),n)w.call(n,i)&&!S.hasOwnProperty(i)&&(o[i]=n[i]);var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){for(var l=Array(u),c=0;c<u;c++)l[c]=arguments[c+2];o.children=l}if(t&&t.defaultProps)for(i in u=t.defaultProps)void 0===o[i]&&(o[i]=u[i]);return{$$typeof:e,type:t,key:a,ref:s,props:o,_owner:_.current}}function k(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var M=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function x(n,r,i,o,a){var s=typeof n;"undefined"!==s&&"boolean"!==s||(n=null);var u=!1;if(null===n)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(n.$$typeof){case e:case t:u=!0}}if(u)return a=a(u=n),n=""===o?"."+C(u,0):o,y(a)?(i="",null!=n&&(i=n.replace(M,"$&/")+"/"),x(a,r,i,"",(function(e){return e}))):null!=a&&(k(a)&&(a=function(t,n){return{$$typeof:e,type:t.type,key:n,ref:t.ref,props:t.props,_owner:t._owner}}(a,i+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(M,"$&/")+"/")+n)),r.push(a)),1;if(u=0,o=""===o?".":o+":",y(n))for(var l=0;l<n.length;l++){var c=o+C(s=n[l],l);u+=x(s,r,i,c,a)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(n),"function"==typeof c)for(n=c.call(n),l=0;!(s=n.next()).done;)u+=x(s=s.value,r,i,c=o+C(s,l++),a);else if("object"===s)throw r=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(n).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.");return u}function A(e,t,n){if(null==e)return e;var r=[],i=0;return x(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function T(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var R={current:null},P={transition:null},L={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:P,ReactCurrentOwner:_};return HT.Children={map:A,forEach:function(e,t,n){A(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return A(e,(function(){t++})),t},toArray:function(e){return A(e,(function(e){return e}))||[]},only:function(e){if(!k(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},HT.Component=m,HT.Fragment=n,HT.Profiler=i,HT.PureComponent=v,HT.StrictMode=r,HT.Suspense=u,HT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L,HT.cloneElement=function(t,n,r){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=h({},t.props),o=t.key,a=t.ref,s=t._owner;if(null!=n){if(void 0!==n.ref&&(a=n.ref,s=_.current),void 0!==n.key&&(o=""+n.key),t.type&&t.type.defaultProps)var u=t.type.defaultProps;for(l in n)w.call(n,l)&&!S.hasOwnProperty(l)&&(i[l]=void 0===n[l]&&void 0!==u?u[l]:n[l])}var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){u=Array(l);for(var c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}return{$$typeof:e,type:t.type,key:o,ref:a,props:i,_owner:s}},HT.createContext=function(e){return(e={$$typeof:a,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},HT.createElement=E,HT.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},HT.createRef=function(){return{current:null}},HT.forwardRef=function(e){return{$$typeof:s,render:e}},HT.isValidElement=k,HT.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:T}},HT.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},HT.startTransition=function(e){var t=P.transition;P.transition={};try{e()}finally{P.transition=t}},HT.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},HT.useCallback=function(e,t){return R.current.useCallback(e,t)},HT.useContext=function(e){return R.current.useContext(e)},HT.useDebugValue=function(){},HT.useDeferredValue=function(e){return R.current.useDeferredValue(e)},HT.useEffect=function(e,t){return R.current.useEffect(e,t)},HT.useId=function(){return R.current.useId()},HT.useImperativeHandle=function(e,t,n){return R.current.useImperativeHandle(e,t,n)},HT.useInsertionEffect=function(e,t){return R.current.useInsertionEffect(e,t)},HT.useLayoutEffect=function(e,t){return R.current.useLayoutEffect(e,t)},HT.useMemo=function(e,t){return R.current.useMemo(e,t)},HT.useReducer=function(e,t,n){return R.current.useReducer(e,t,n)},HT.useRef=function(e){return R.current.useRef(e)},HT.useState=function(e){return R.current.useState(e)},HT.useSyncExternalStore=function(e,t,n){return R.current.useSyncExternalStore(e,t,n)},HT.useTransition=function(){return R.current.useTransition()},HT.version="18.2.0",HT}var $T,VT,YT={exports:{}};function GT(){return $T||($T=1,function(e,t){"production"!==je.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=Symbol.iterator,g="@@iterator";function v(e){if(null===e||"object"!=typeof e)return null;var t=m&&e[m]||e[g];return"function"==typeof t?t:null}var b={current:null},y={transition:null},w={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},_={current:null},S={},E=null;function k(e){E=e}S.setExtraStackFrame=function(e){E=e},S.getCurrentStack=null,S.getStackAddendum=function(){var e="";E&&(e+=E);var t=S.getCurrentStack;return t&&(e+=t()||""),e};var M=!1,C=!1,x=!1,A=!1,T=!1,R={ReactCurrentDispatcher:b,ReactCurrentBatchConfig:y,ReactCurrentOwner:_};function P(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];I("warn",e,n)}function L(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];I("error",e,n)}function I(e,t,n){var r=R.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var i=n.map((function(e){return String(e)}));i.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,i)}R.ReactDebugCurrentFrame=S,R.ReactCurrentActQueue=w;var O={};function N(e,t){var n=e.constructor,r=n&&(n.displayName||n.name)||"ReactClass",i=r+"."+t;O[i]||(L("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,r),O[i]=!0)}var D={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){N(e,"forceUpdate")},enqueueReplaceState:function(e,t,n,r){N(e,"replaceState")},enqueueSetState:function(e,t,n,r){N(e,"setState")}},B=Object.assign,j={};function z(e,t,n){this.props=e,this.context=t,this.refs=j,this.updater=n||D}Object.freeze(j),z.prototype.isReactComponent={},z.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},z.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var U={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},F=function(e,t){Object.defineProperty(z.prototype,e,{get:function(){P("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var K in U)U.hasOwnProperty(K)&&F(K,U[K]);function q(){}function H(e,t,n){this.props=e,this.context=t,this.refs=j,this.updater=n||D}q.prototype=z.prototype;var W=H.prototype=new q;W.constructor=H,B(W,z.prototype),W.isPureReactComponent=!0;var $=Array.isArray;function V(e){return $(e)}function Y(e){return""+e}function G(e){if(function(e){try{return Y(e),!1}catch(e){return!0}}(e))return L("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),Y(e)}function Z(e){return e.displayName||"Context"}function Q(e){if(null==e)return null;if("number"==typeof e.tag&&L("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case i:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case d:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case u:return Z(e)+".Consumer";case s:return Z(e._context)+".Provider";case l:return function(e,t,n){var r=e.displayName;if(r)return r;var i=t.displayName||t.name||"";return""!==i?n+"("+i+")":n}(e,e.render,"ForwardRef");case f:var t=e.displayName||null;return null!==t?t:Q(e.type)||"Memo";case h:var n=e,p=n._payload,m=n._init;try{return Q(m(p))}catch(e){return null}}return null}var X,J,ee,te=Object.prototype.hasOwnProperty,ne={key:!0,ref:!0,__self:!0,__source:!0};function re(e){if(te.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}function ie(e){if(te.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}ee={};var oe=function(e,t,r,i,o,a,s){var u={$$typeof:n,type:e,key:t,ref:r,props:s,_owner:a,_store:{}};return Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u};function ae(e,t,n){var r,i={},o=null,a=null,s=null,u=null;if(null!=t)for(r in re(t)&&(a=t.ref,function(e){if("string"==typeof e.ref&&_.current&&e.__self&&_.current.stateNode!==e.__self){var t=Q(_.current.type);ee[t]||(L('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',t,e.ref),ee[t]=!0)}}(t)),ie(t)&&(G(t.key),o=""+t.key),s=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)te.call(t,r)&&!ne.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(l>1){for(var c=Array(l),d=0;d<l;d++)c[d]=arguments[d+2];Object.freeze&&Object.freeze(c),i.children=c}if(e&&e.defaultProps){var f=e.defaultProps;for(r in f)void 0===i[r]&&(i[r]=f[r])}if(o||a){var h="function"==typeof e?e.displayName||e.name||"Unknown":e;o&&function(e,t){var n=function(){X||(X=!0,L("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(i,h),a&&function(e,t){var n=function(){J||(J=!0,L("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(i,h)}return oe(e,o,a,s,u,_.current,i)}function se(e,t,n){if(null==e)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r,i,o=B({},e.props),a=e.key,s=e.ref,u=e._self,l=e._source,c=e._owner;if(null!=t)for(r in re(t)&&(s=t.ref,c=_.current),ie(t)&&(G(t.key),a=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)te.call(t,r)&&!ne.hasOwnProperty(r)&&(void 0===t[r]&&void 0!==i?o[r]=i[r]:o[r]=t[r]);var d=arguments.length-2;if(1===d)o.children=n;else if(d>1){for(var f=Array(d),h=0;h<d;h++)f[h]=arguments[h+2];o.children=f}return oe(e.type,a,s,u,l,c,o)}function ue(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var le=".",ce=":",de=!1,fe=/\/+/g;function he(e){return e.replace(fe,"$&/")}function pe(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(G(e.key),function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key)):t.toString(36)}function me(e,t,i,o,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u,l,c,d=!1;if(null===e)d=!0;else switch(s){case"string":case"number":d=!0;break;case"object":switch(e.$$typeof){case n:case r:d=!0}}if(d){var f=e,h=a(f),p=""===o?le+pe(f,0):o;if(V(h)){var m="";null!=p&&(m=he(p)+"/"),me(h,t,m,"",(function(e){return e}))}else null!=h&&(ue(h)&&(!h.key||f&&f.key===h.key||G(h.key),u=h,l=i+(!h.key||f&&f.key===h.key?"":he(""+h.key)+"/")+p,h=oe(u.type,l,u.ref,u._self,u._source,u._owner,u.props)),t.push(h));return 1}var g=0,b=""===o?le:o+ce;if(V(e))for(var y=0;y<e.length;y++)g+=me(c=e[y],t,i,b+pe(c,y),a);else{var w=v(e);if("function"==typeof w){var _=e;w===_.entries&&(de||P("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),de=!0);for(var S,E=w.call(_),k=0;!(S=E.next()).done;)g+=me(c=S.value,t,i,b+pe(c,k++),a)}else if("object"===s){var M=String(e);throw new Error("Objects are not valid as a React child (found: "+("[object Object]"===M?"object with keys {"+Object.keys(e).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.")}}return g}function ge(e,t,n){if(null==e)return e;var r=[],i=0;return me(e,r,"","",(function(e){return t.call(n,e,i++)})),r}var ve,be=-1,ye=0,we=1,_e=2;function Se(e){if(e._status===be){var t=(0,e._result)();if(t.then((function(t){if(e._status===ye||e._status===be){var n=e;n._status=we,n._result=t}}),(function(t){if(e._status===ye||e._status===be){var n=e;n._status=_e,n._result=t}})),e._status===be){var n=e;n._status=ye,n._result=t}}if(e._status===we){var r=e._result;return void 0===r&&L("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",r),"default"in r||L("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",r),r.default}throw e._result}function Ee(e){return"string"==typeof e||"function"==typeof e||!!(e===i||e===a||T||e===o||e===c||e===d||A||e===p||M||C||x)||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===f||e.$$typeof===s||e.$$typeof===u||e.$$typeof===l||e.$$typeof===ve||void 0!==e.getModuleId)}function ke(){var e=b.current;return null===e&&L("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."),e}ve=Symbol.for("react.module.reference");var Me,Ce,xe,Ae,Te,Re,Pe,Le=0;function Ie(){}Ie.__reactDisabledLog=!0;var Oe,Ne=R.ReactCurrentDispatcher;function De(e,t,n){if(void 0===Oe)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);Oe=r&&r[1]||""}return"\n"+Oe+e}var Be,je=!1,ze="function"==typeof WeakMap?WeakMap:Map;function Ue(e,t){if(!e||je)return"";var n,r=Be.get(e);if(void 0!==r)return r;je=!0;var i,o=Error.prepareStackTrace;Error.prepareStackTrace=void 0,i=Ne.current,Ne.current=null,function(){if(0===Le){Me=console.log,Ce=console.info,xe=console.warn,Ae=console.error,Te=console.group,Re=console.groupCollapsed,Pe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ie,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Le++}();try{if(t){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(e){n=e}Reflect.construct(e,[],a)}else{try{a.call()}catch(e){n=e}e.call(a.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var s=t.stack.split("\n"),u=n.stack.split("\n"),l=s.length-1,c=u.length-1;l>=1&&c>=0&&s[l]!==u[c];)c--;for(;l>=1&&c>=0;l--,c--)if(s[l]!==u[c]){if(1!==l||1!==c)do{if(l--,--c<0||s[l]!==u[c]){var d="\n"+s[l].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),"function"==typeof e&&Be.set(e,d),d}}while(l>=1&&c>=0);break}}}finally{je=!1,Ne.current=i,function(){if(0==--Le){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},e,{value:Me}),info:B({},e,{value:Ce}),warn:B({},e,{value:xe}),error:B({},e,{value:Ae}),group:B({},e,{value:Te}),groupCollapsed:B({},e,{value:Re}),groupEnd:B({},e,{value:Pe})})}Le<0&&L("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=o}var f=e?e.displayName||e.name:"",h=f?De(f):"";return"function"==typeof e&&Be.set(e,h),h}function Fe(e,t,n){if(null==e)return"";if("function"==typeof e)return Ue(e,function(e){var t=e.prototype;return!(!t||!t.isReactComponent)}(e));if("string"==typeof e)return De(e);switch(e){case c:return De("Suspense");case d:return De("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case l:return Ue(e.render,!1);case f:return Fe(e.type,t,n);case h:var r=e,i=r._payload,o=r._init;try{return Fe(o(i),t,n)}catch(e){}}return""}Be=new ze;var Ke,qe={},He=R.ReactDebugCurrentFrame;function We(e){if(e){var t=e._owner,n=Fe(e.type,e._source,t?t.type:null);He.setExtraStackFrame(n)}else He.setExtraStackFrame(null)}function $e(e){if(e){var t=e._owner;k(Fe(e.type,e._source,t?t.type:null))}else k(null)}function Ve(){if(_.current){var e=Q(_.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}Ke=!1;var Ye={};function Ge(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=Ve();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!Ye[n]){Ye[n]=!0;var r="";e&&e._owner&&e._owner!==_.current&&(r=" It was passed a child from "+Q(e._owner.type)+"."),$e(e),L('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),$e(null)}}}function Ze(e,t){if("object"==typeof e)if(V(e))for(var n=0;n<e.length;n++){var r=e[n];ue(r)&&Ge(r,t)}else if(ue(e))e._store&&(e._store.validated=!0);else if(e){var i=v(e);if("function"==typeof i&&i!==e.entries)for(var o,a=i.call(e);!(o=a.next()).done;)ue(o.value)&&Ge(o.value,t)}}function Qe(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==l&&n.$$typeof!==f)return;t=n.propTypes}if(t){var r=Q(n);!function(e,t,n,r,i){var o=Function.call.bind(te);for(var a in e)if(o(e,a)){var s=void 0;try{if("function"!=typeof e[a]){var u=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}s=e[a](t,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){s=e}!s||s instanceof Error||(We(i),L("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,a,typeof s),We(null)),s instanceof Error&&!(s.message in qe)&&(qe[s.message]=!0,We(i),L("Failed %s type: %s",n,s.message),We(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||Ke||(Ke=!0,L("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Q(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||L("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xe(e,t,r){var o,a,s=Ee(e);if(!s){var u,l="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(l+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),l+=(null!=(o=t)&&void 0!==(a=o.__source)?"\n\nCheck your code at "+a.fileName.replace(/^.*[\\\/]/,"")+":"+a.lineNumber+".":"")||Ve(),null===e?u="null":V(e)?u="array":void 0!==e&&e.$$typeof===n?(u="<"+(Q(e.type)||"Unknown")+" />",l=" Did you accidentally export a JSX literal instead of a component?"):u=typeof e,L("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",u,l)}var c=ae.apply(this,arguments);if(null==c)return c;if(s)for(var d=2;d<arguments.length;d++)Ze(arguments[d],e);return e===i?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){$e(e),L("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),$e(null);break}}null!==e.ref&&($e(e),L("Invalid attribute `ref` supplied to `React.Fragment`."),$e(null))}(c):Qe(c),c}var Je=!1,et=!1,tt=null,nt=0,rt=!1;function it(e){e!==nt-1&&L("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),nt=e}function ot(t,n,r){var i=w.current;if(null!==i)try{st(i),function(t){if(null===tt)try{var n=("require"+Math.random()).slice(0,7),r=e&&e[n];tt=r.call(e,"timers").setImmediate}catch(e){tt=function(e){!1===et&&(et=!0,"undefined"==typeof MessageChannel&&L("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}tt(t)}((function(){0===i.length?(w.current=null,n(t)):ot(t,n,r)}))}catch(e){r(e)}else n(t)}var at=!1;function st(e){if(!at){at=!0;var t=0;try{for(;t<e.length;t++){var n=e[t];do{n=n(!0)}while(null!==n)}e.length=0}catch(n){throw e=e.slice(t+1),n}finally{at=!1}}}var ut=Xe,lt=function(e,t,n){for(var r=se.apply(this,arguments),i=2;i<arguments.length;i++)Ze(arguments[i],r.type);return Qe(r),r},ct=function(e){var t=Xe.bind(null,e);return t.type=e,Je||(Je=!0,P("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(t,"type",{enumerable:!1,get:function(){return P("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},dt={map:ge,forEach:function(e,t,n){ge(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return ge(e,(function(){t++})),t},toArray:function(e){return ge(e,(function(e){return e}))||[]},only:function(e){if(!ue(e))throw new Error("React.Children.only expected to receive a single React element child.");return e}};t.Children=dt,t.Component=z,t.Fragment=i,t.Profiler=a,t.PureComponent=H,t.StrictMode=o,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.cloneElement=lt,t.createContext=function(e){var t={$$typeof:u,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};t.Provider={$$typeof:s,_context:t};var n=!1,r=!1,i=!1,o={$$typeof:u,_context:t};return Object.defineProperties(o,{Provider:{get:function(){return r||(r=!0,L("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),t.Provider},set:function(e){t.Provider=e}},_currentValue:{get:function(){return t._currentValue},set:function(e){t._currentValue=e}},_currentValue2:{get:function(){return t._currentValue2},set:function(e){t._currentValue2=e}},_threadCount:{get:function(){return t._threadCount},set:function(e){t._threadCount=e}},Consumer:{get:function(){return n||(n=!0,L("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),t.Consumer}},displayName:{get:function(){return t.displayName},set:function(e){i||(P("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",e),i=!0)}}}),t.Consumer=o,t._currentRenderer=null,t._currentRenderer2=null,t},t.createElement=ut,t.createFactory=ct,t.createRef=function(){var e={current:null};return Object.seal(e),e},t.forwardRef=function(e){null!=e&&e.$$typeof===f?L("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?L("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&L("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null==e.defaultProps&&null==e.propTypes||L("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"));var t,n={$$typeof:l,render:e};return Object.defineProperty(n,"displayName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(n){t=n,e.name||e.displayName||(e.displayName=n)}}),n},t.isValidElement=ue,t.lazy=function(e){var t,n,r={$$typeof:h,_payload:{_status:be,_result:e},_init:Se};return Object.defineProperties(r,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){L("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(r,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return n},set:function(e){L("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),n=e,Object.defineProperty(r,"propTypes",{enumerable:!0})}}}),r},t.memo=function(e,t){Ee(e)||L("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e);var n,r={$$typeof:f,type:e,compare:void 0===t?null:t};return Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,e.name||e.displayName||(e.displayName=t)}}),r},t.startTransition=function(e,t){var n=y.transition;y.transition={};var r=y.transition;y.transition._updatedFibers=new Set;try{e()}finally{y.transition=n,null===n&&r._updatedFibers&&(r._updatedFibers.size>10&&P("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),r._updatedFibers.clear())}},t.unstable_act=function(e){var t=nt;nt++,null===w.current&&(w.current=[]);var n,r=w.isBatchingLegacy;try{if(w.isBatchingLegacy=!0,n=e(),!r&&w.didScheduleLegacyUpdate){var i=w.current;null!==i&&(w.didScheduleLegacyUpdate=!1,st(i))}}catch(e){throw it(t),e}finally{w.isBatchingLegacy=r}if(null!==n&&"object"==typeof n&&"function"==typeof n.then){var o=n,a=!1,s={then:function(e,n){a=!0,o.then((function(r){it(t),0===nt?ot(r,e,n):e(r)}),(function(e){it(t),n(e)}))}};return rt||"undefined"==typeof Promise||Promise.resolve().then((function(){})).then((function(){a||(rt=!0,L("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))})),s}var u=n;if(it(t),0===nt){var l=w.current;return null!==l&&(st(l),w.current=null),{then:function(e,t){null===w.current?(w.current=[],ot(u,e,t)):e(u)}}}return{then:function(e,t){e(u)}}},t.useCallback=function(e,t){return ke().useCallback(e,t)},t.useContext=function(e){var t=ke();if(void 0!==e._context){var n=e._context;n.Consumer===e?L("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):n.Provider===e&&L("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return t.useContext(e)},t.useDebugValue=function(e,t){return ke().useDebugValue(e,t)},t.useDeferredValue=function(e){return ke().useDeferredValue(e)},t.useEffect=function(e,t){return ke().useEffect(e,t)},t.useId=function(){return ke().useId()},t.useImperativeHandle=function(e,t,n){return ke().useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return ke().useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return ke().useLayoutEffect(e,t)},t.useMemo=function(e,t){return ke().useMemo(e,t)},t.useReducer=function(e,t,n){return ke().useReducer(e,t,n)},t.useRef=function(e){return ke().useRef(e)},t.useState=function(e){return ke().useState(e)},t.useSyncExternalStore=function(e,t,n){return ke().useSyncExternalStore(e,t,n)},t.useTransition=function(){return ke().useTransition()},t.version="18.2.0","undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(YT,YT.exports)),YT.exports}function ZT(){return VT||(VT=1,"production"===je.env.NODE_ENV?qT.exports=WT():qT.exports=GT()),qT.exports}YT.exports;var QT,XT,JT,eR,tR={},nR={exports:{}},rR={},iR={exports:{}},oR={},aR={};function sR(){return XT||(XT=1,function(e){"production"!==je.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=!1,n=!1;function r(e,t){var n=e.length;e.push(t),function(e,t,n){for(var r=n;r>0;){var i=r-1>>>1,o=e[i];if(!(a(o,t)>0))return;e[i]=t,e[r]=o,r=i}}(e,t,n)}function i(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();return n!==t&&(e[0]=n,function(e,t,n){for(var r=0,i=e.length,o=i>>>1;r<o;){var s=2*(r+1)-1,u=e[s],l=s+1,c=e[l];if(a(u,t)<0)l<i&&a(c,u)<0?(e[r]=c,e[l]=t,r=l):(e[r]=u,e[s]=t,r=s);else{if(!(l<i&&a(c,t)<0))return;e[r]=c,e[l]=t,r=l}}}(e,n)),t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var c=[],d=[],f=1,h=null,p=3,m=!1,g=!1,v=!1,b="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function _(e){for(var t=i(d);null!==t;){if(null===t.callback)o(d);else{if(!(t.startTime<=e))return;o(d),t.sortIndex=t.expirationTime,r(c,t)}t=i(d)}}function S(e){if(v=!1,_(e),!g)if(null!==i(c))g=!0,O(E);else{var t=i(d);null!==t&&N(S,t.startTime-e)}}function E(r,a){g=!1,v&&(v=!1,D()),m=!0;var s=p;try{if(!n)return function(n,r){var a=r;for(_(a),h=i(c);null!==h&&!t&&(!(h.expirationTime>a)||n&&!T());){var s=h.callback;if("function"==typeof s){h.callback=null,p=h.priorityLevel;var u=s(h.expirationTime<=a);a=e.unstable_now(),"function"==typeof u?h.callback=u:h===i(c)&&o(c),_(a)}else o(c);h=i(c)}if(null!==h)return!0;var l=i(d);return null!==l&&N(S,l.startTime-a),!1}(r,a)}finally{h=null,p=s,m=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k=!1,M=null,C=-1,x=5,A=-1;function T(){return!(e.unstable_now()-A<x)}var R,P=function(){if(null!==M){var t=e.unstable_now();A=t;var n=!0;try{n=M(!0,t)}finally{n?R():(k=!1,M=null)}}else k=!1};if("function"==typeof w)R=function(){w(P)};else if("undefined"!=typeof MessageChannel){var L=new MessageChannel,I=L.port2;L.port1.onmessage=P,R=function(){I.postMessage(null)}}else R=function(){b(P,0)};function O(e){M=e,k||(k=!0,R())}function N(t,n){C=b((function(){t(e.unstable_now())}),n)}function D(){y(C),C=-1}var B=function(){};e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){g||m||(g=!0,O(E))},e.unstable_forceFrameRate=function(e){e<0||e>125?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):x=e>0?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return i(c)},e.unstable_next=function(e){var t;switch(p){case 1:case 2:case 3:t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=B,e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},e.unstable_scheduleCallback=function(t,n,o){var a,s,u=e.unstable_now();if("object"==typeof o&&null!==o){var l=o.delay;a="number"==typeof l&&l>0?u+l:u}else a=u;switch(t){case 1:s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}var h=a+s,p={id:f++,callback:n,priorityLevel:t,startTime:a,expirationTime:h,sortIndex:-1};return a>u?(p.sortIndex=a,r(d,p),null===i(c)&&p===i(d)&&(v?D():v=!0,N(S,a-u))):(p.sortIndex=h,r(c,p),g||m||(g=!0,O(E))),p},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(aR)),aR}function uR(){return JT||(JT=1,"production"===je.env.NODE_ENV?iR.exports=(QT||(QT=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var s=2*(r+1)-1,u=e[s],l=s+1,c=e[l];if(0>i(u,n))l<o&&0>i(c,u)?(e[r]=c,e[l]=n,r=l):(e[r]=u,e[s]=n,r=s);else{if(!(l<o&&0>i(c,n)))break e;e[r]=c,e[l]=n,r=l}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var u=[],l=[],c=1,d=null,f=3,h=!1,p=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function y(e){for(var i=n(l);null!==i;){if(null===i.callback)r(l);else{if(!(i.startTime<=e))break;r(l),i.sortIndex=i.expirationTime,t(u,i)}i=n(l)}}function w(e){if(m=!1,y(e),!p)if(null!==n(u))p=!0,L(_);else{var t=n(l);null!==t&&I(w,t.startTime-e)}}function _(t,i){p=!1,m&&(m=!1,v(M),M=-1),h=!0;var o=f;try{for(y(i),d=n(u);null!==d&&(!(d.expirationTime>i)||t&&!A());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var s=a(d.expirationTime<=i);i=e.unstable_now(),"function"==typeof s?d.callback=s:d===n(u)&&r(u),y(i)}else r(u);d=n(u)}if(null!==d)var c=!0;else{var g=n(l);null!==g&&I(w,g.startTime-i),c=!1}return c}finally{d=null,f=o,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,E=!1,k=null,M=-1,C=5,x=-1;function A(){return!(e.unstable_now()-x<C)}function T(){if(null!==k){var t=e.unstable_now();x=t;var n=!0;try{n=k(!0,t)}finally{n?S():(E=!1,k=null)}}else E=!1}if("function"==typeof b)S=function(){b(T)};else if("undefined"!=typeof MessageChannel){var R=new MessageChannel,P=R.port2;R.port1.onmessage=T,S=function(){P.postMessage(null)}}else S=function(){g(T,0)};function L(e){k=e,E||(E=!0,S())}function I(t,n){M=g((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,L(_))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,o){var a=e.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?a+o:a,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return r={id:c++,callback:i,priorityLevel:r,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(r.sortIndex=o,t(l,r),null===n(u)&&r===n(l)&&(m?(v(M),M=-1):m=!0,I(w,o-a))):(r.sortIndex=s,t(u,r),p||h||(p=!0,L(_))),r},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(oR)),oR):iR.exports=sR()),iR.exports
|
|
16
|
+
/**
|
|
17
|
+
* @license React
|
|
18
|
+
* react-dom.production.min.js
|
|
19
|
+
*
|
|
20
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
21
|
+
*
|
|
22
|
+
* This source code is licensed under the MIT license found in the
|
|
23
|
+
* LICENSE file in the root directory of this source tree.
|
|
24
|
+
*/}function lR(){if(eR)return rR;eR=1;var e=ZT(),t=uR();function n(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function o(e,t){a(e,t),a(e+"Capture",t)}function a(e,t){for(i[e]=t,e=0;e<t.length;e++)r.add(t[e])}var s=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),u=Object.prototype.hasOwnProperty,l=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,c={},d={};function f(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var h={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){h[e]=new f(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];h[t]=new f(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){h[e]=new f(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){h[e]=new f(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){h[e]=new f(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){h[e]=new f(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){h[e]=new f(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){h[e]=new f(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){h[e]=new f(e,5,!1,e.toLowerCase(),null,!1,!1)}));var p=/[\-:]([a-z])/g;function m(e){return e[1].toUpperCase()}function g(e,t,n,r){var i=h.hasOwnProperty(t)?h[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!u.call(d,e)||!u.call(c,e)&&(l.test(e)?d[e]=!0:(c[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(p,m);h[t]=new f(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(p,m);h[t]=new f(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(p,m);h[t]=new f(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){h[e]=new f(e,1,!1,e.toLowerCase(),null,!1,!1)})),h.xlinkHref=new f("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){h[e]=new f(e,1,!1,e.toLowerCase(),null,!0,!0)}));var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,b=Symbol.for("react.element"),y=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),k=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),P=Symbol.iterator;function L(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=P&&e[P]||e["@@iterator"])?e:null}var I,O=Object.assign;function N(e){if(void 0===I)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);I=t&&t[1]||""}return"\n"+I+e}var D=!1;function B(e,t){if(!e||D)return"";D=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var u="\n"+i[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=a&&0<=s);break}}}finally{D=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?N(e):""}function j(e){switch(e.tag){case 5:return N(e.type);case 16:return N("Lazy");case 13:return N("Suspense");case 19:return N("SuspenseList");case 0:case 2:case 15:return B(e.type,!1);case 11:return B(e.type.render,!1);case 1:return B(e.type,!0);default:return""}}function z(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case w:return"Fragment";case y:return"Portal";case S:return"Profiler";case _:return"StrictMode";case C:return"Suspense";case x:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case k:return(e.displayName||"Context")+".Consumer";case E:return(e._context.displayName||"Context")+".Provider";case M:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case A:return null!==(t=e.displayName||null)?t:z(e.type)||"Memo";case T:t=e._payload,e=e._init;try{return z(e(t))}catch(e){}}return null}function U(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return z(t);case 8:return t===_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function F(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function q(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function H(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function W(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function $(e,t){var n=t.checked;return O({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function V(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=F(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Y(e,t){null!=(t=t.checked)&&g(e,"checked",t,!1)}function G(e,t){Y(e,t);var n=F(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Q(e,t.type,n):t.hasOwnProperty("defaultValue")&&Q(e,t.type,F(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Q(e,t,n){"number"===t&&W(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var X=Array.isArray;function J(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+F(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function ee(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(n(91));return O({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function te(e,t){var r=t.value;if(null==r){if(r=t.children,t=t.defaultValue,null!=r){if(null!=t)throw Error(n(92));if(X(r)){if(1<r.length)throw Error(n(93));r=r[0]}t=r}null==t&&(t=""),r=t}e._wrapperState={initialValue:F(r)}}function ne(e,t){var n=F(t.value),r=F(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function re(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ie(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function oe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ie(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ae,se,ue=(se=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ae=ae||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ae.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return se(e,t)}))}:se);function le(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ce={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},de=["Webkit","ms","Moz","O"];function fe(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ce.hasOwnProperty(e)&&ce[e]?(""+t).trim():t+"px"}function he(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=fe(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(ce).forEach((function(e){de.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ce[t]=ce[e]}))}));var pe=O({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function me(e,t){if(t){if(pe[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(n(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(n(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(n(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(n(62))}}function ge(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ve=null;function be(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var ye=null,we=null,_e=null;function Se(e){if(e=gi(e)){if("function"!=typeof ye)throw Error(n(280));var t=e.stateNode;t&&(t=bi(t),ye(e.stateNode,e.type,t))}}function Ee(e){we?_e?_e.push(e):_e=[e]:we=e}function ke(){if(we){var e=we,t=_e;if(_e=we=null,Se(e),t)for(e=0;e<t.length;e++)Se(t[e])}}function Me(e,t){return e(t)}function Ce(){}var xe=!1;function Ae(e,t,n){if(xe)return e(t,n);xe=!0;try{return Me(e,t,n)}finally{xe=!1,(null!==we||null!==_e)&&(Ce(),ke())}}function Te(e,t){var r=e.stateNode;if(null===r)return null;var i=bi(r);if(null===i)return null;r=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(i=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}if(e)return null;if(r&&"function"!=typeof r)throw Error(n(231,t,typeof r));return r}var Re=!1;if(s)try{var Pe={};Object.defineProperty(Pe,"passive",{get:function(){Re=!0}}),window.addEventListener("test",Pe,Pe),window.removeEventListener("test",Pe,Pe)}catch(se){Re=!1}function Le(e,t,n,r,i,o,a,s,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var Ie=!1,Oe=null,Ne=!1,De=null,Be={onError:function(e){Ie=!0,Oe=e}};function je(e,t,n,r,i,o,a,s,u){Ie=!1,Oe=null,Le.apply(Be,arguments)}function ze(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ue(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function Fe(e){if(ze(e)!==e)throw Error(n(188))}function Ke(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=ze(e)))throw Error(n(188));return t!==e?null:e}for(var r=e,i=t;;){var o=r.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(i=o.return)){r=i;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===r)return Fe(o),e;if(a===i)return Fe(o),t;a=a.sibling}throw Error(n(188))}if(r.return!==i.return)r=o,i=a;else{for(var s=!1,u=o.child;u;){if(u===r){s=!0,r=o,i=a;break}if(u===i){s=!0,i=o,r=a;break}u=u.sibling}if(!s){for(u=a.child;u;){if(u===r){s=!0,r=a,i=o;break}if(u===i){s=!0,i=a,r=o;break}u=u.sibling}if(!s)throw Error(n(189))}}if(r.alternate!==i)throw Error(n(190))}if(3!==r.tag)throw Error(n(188));return r.stateNode.current===r?e:t}(e),null!==e?qe(e):null}function qe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=qe(e);if(null!==t)return t;e=e.sibling}return null}var He=t.unstable_scheduleCallback,We=t.unstable_cancelCallback,$e=t.unstable_shouldYield,Ve=t.unstable_requestPaint,Ye=t.unstable_now,Ge=t.unstable_getCurrentPriorityLevel,Ze=t.unstable_ImmediatePriority,Qe=t.unstable_UserBlockingPriority,Xe=t.unstable_NormalPriority,Je=t.unstable_LowPriority,et=t.unstable_IdlePriority,tt=null,nt=null,rt=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(it(e)/ot|0)|0},it=Math.log,ot=Math.LN2,at=64,st=4194304;function ut(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function lt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=ut(s):0!=(o&=a)&&(r=ut(o))}else 0!=(a=n&~i)?r=ut(a):0!==o&&(r=ut(o));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!=(4194240&o)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-rt(t)),r|=e[n],t&=~i;return r}function ct(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function dt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function ft(){var e=at;return 0==(4194240&(at<<=1))&&(at=64),e}function ht(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function pt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-rt(t)]=n}function mt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-rt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var gt=0;function vt(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var bt,yt,wt,_t,St,Et=!1,kt=[],Mt=null,Ct=null,xt=null,At=new Map,Tt=new Map,Rt=[],Pt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Lt(e,t){switch(e){case"focusin":case"focusout":Mt=null;break;case"dragenter":case"dragleave":Ct=null;break;case"mouseover":case"mouseout":xt=null;break;case"pointerover":case"pointerout":At.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tt.delete(t.pointerId)}}function It(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&null!==(t=gi(t))&&yt(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Ot(e){var t=mi(e.target);if(null!==t){var n=ze(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ue(n)))return e.blockedOn=t,void St(e.priority,(function(){wt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Nt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=$t(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=gi(n))&&yt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);ve=r,n.target.dispatchEvent(r),ve=null,t.shift()}return!0}function Dt(e,t,n){Nt(e)&&n.delete(t)}function Bt(){Et=!1,null!==Mt&&Nt(Mt)&&(Mt=null),null!==Ct&&Nt(Ct)&&(Ct=null),null!==xt&&Nt(xt)&&(xt=null),At.forEach(Dt),Tt.forEach(Dt)}function jt(e,n){e.blockedOn===n&&(e.blockedOn=null,Et||(Et=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bt)))}function zt(e){function t(t){return jt(t,e)}if(0<kt.length){jt(kt[0],e);for(var n=1;n<kt.length;n++){var r=kt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Mt&&jt(Mt,e),null!==Ct&&jt(Ct,e),null!==xt&&jt(xt,e),At.forEach(t),Tt.forEach(t),n=0;n<Rt.length;n++)(r=Rt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Rt.length&&null===(n=Rt[0]).blockedOn;)Ot(n),null===n.blockedOn&&Rt.shift()}var Ut=v.ReactCurrentBatchConfig,Ft=!0;function Kt(e,t,n,r){var i=gt,o=Ut.transition;Ut.transition=null;try{gt=1,Ht(e,t,n,r)}finally{gt=i,Ut.transition=o}}function qt(e,t,n,r){var i=gt,o=Ut.transition;Ut.transition=null;try{gt=4,Ht(e,t,n,r)}finally{gt=i,Ut.transition=o}}function Ht(e,t,n,r){if(Ft){var i=$t(e,t,n,r);if(null===i)Fr(e,t,r,Wt,n),Lt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Mt=It(Mt,e,t,n,r,i),!0;case"dragenter":return Ct=It(Ct,e,t,n,r,i),!0;case"mouseover":return xt=It(xt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return At.set(o,It(At.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Tt.set(o,It(Tt.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Lt(e,r),4&t&&-1<Pt.indexOf(e)){for(;null!==i;){var o=gi(i);if(null!==o&&bt(o),null===(o=$t(e,t,n,r))&&Fr(e,t,r,Wt,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Fr(e,t,r,null,n)}}var Wt=null;function $t(e,t,n,r){if(Wt=null,null!==(e=mi(e=be(r))))if(null===(t=ze(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ue(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Wt=e,null}function Vt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ge()){case Ze:return 1;case Qe:return 4;case Xe:case Je:return 16;case et:return 536870912;default:return 16}default:return 16}}var Yt=null,Gt=null,Zt=null;function Qt(){if(Zt)return Zt;var e,t,n=Gt,r=n.length,i="value"in Yt?Yt.value:Yt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Zt=i.slice(e,1<t?1-t:void 0)}function Xt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Jt(){return!0}function en(){return!1}function tn(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?Jt:en,this.isPropagationStopped=en,this}return O(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Jt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Jt)},persist:function(){},isPersistent:Jt}),t}var nn,rn,on,an={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sn=tn(an),un=O({},an,{view:0,detail:0}),ln=tn(un),cn=O({},un,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==on&&(on&&"mousemove"===e.type?(nn=e.screenX-on.screenX,rn=e.screenY-on.screenY):rn=nn=0,on=e),nn)},movementY:function(e){return"movementY"in e?e.movementY:rn}}),dn=tn(cn),fn=tn(O({},cn,{dataTransfer:0})),hn=tn(O({},un,{relatedTarget:0})),pn=tn(O({},an,{animationName:0,elapsedTime:0,pseudoElement:0})),mn=O({},an,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gn=tn(mn),vn=tn(O({},an,{data:0})),bn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},wn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _n(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=wn[e])&&!!t[e]}function Sn(){return _n}var En=O({},un,{key:function(e){if(e.key){var t=bn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Xt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?yn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sn,charCode:function(e){return"keypress"===e.type?Xt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Xt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),kn=tn(En),Mn=tn(O({},cn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Cn=tn(O({},un,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sn})),xn=tn(O({},an,{propertyName:0,elapsedTime:0,pseudoElement:0})),An=O({},cn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Tn=tn(An),Rn=[9,13,27,32],Pn=s&&"CompositionEvent"in window,Ln=null;s&&"documentMode"in document&&(Ln=document.documentMode);var In=s&&"TextEvent"in window&&!Ln,On=s&&(!Pn||Ln&&8<Ln&&11>=Ln),Nn=String.fromCharCode(32),Dn=!1;function Bn(e,t){switch(e){case"keyup":return-1!==Rn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var zn=!1,Un={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Fn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Un[e.type]:"textarea"===t}function Kn(e,t,n,r){Ee(r),0<(t=qr(t,"onChange")).length&&(n=new sn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qn=null,Hn=null;function Wn(e){Nr(e,0)}function $n(e){if(H(vi(e)))return e}function Vn(e,t){if("change"===e)return t}var Yn=!1;if(s){var Gn;if(s){var Zn="oninput"in document;if(!Zn){var Qn=document.createElement("div");Qn.setAttribute("oninput","return;"),Zn="function"==typeof Qn.oninput}Gn=Zn}else Gn=!1;Yn=Gn&&(!document.documentMode||9<document.documentMode)}function Xn(){qn&&(qn.detachEvent("onpropertychange",Jn),Hn=qn=null)}function Jn(e){if("value"===e.propertyName&&$n(Hn)){var t=[];Kn(t,Hn,e,be(e)),Ae(Wn,t)}}function er(e,t,n){"focusin"===e?(Xn(),Hn=n,(qn=t).attachEvent("onpropertychange",Jn)):"focusout"===e&&Xn()}function tr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return $n(Hn)}function nr(e,t){if("click"===e)return $n(t)}function rr(e,t){if("input"===e||"change"===e)return $n(t)}var ir="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function or(e,t){if(ir(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!u.call(t,i)||!ir(e[i],t[i]))return!1}return!0}function ar(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function sr(e,t){var n,r=ar(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ar(r)}}function ur(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ur(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function lr(){for(var e=window,t=W();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=W((e=t.contentWindow).document)}return t}function cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function dr(e){var t=lr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ur(n.ownerDocument.documentElement,n)){if(null!==r&&cr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=sr(n,o);var a=sr(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var fr=s&&"documentMode"in document&&11>=document.documentMode,hr=null,pr=null,mr=null,gr=!1;function vr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;gr||null==hr||hr!==W(r)||(r="selectionStart"in(r=hr)&&cr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},mr&&or(mr,r)||(mr=r,0<(r=qr(pr,"onSelect")).length&&(t=new sn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=hr)))}function br(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var yr={animationend:br("Animation","AnimationEnd"),animationiteration:br("Animation","AnimationIteration"),animationstart:br("Animation","AnimationStart"),transitionend:br("Transition","TransitionEnd")},wr={},_r={};function Sr(e){if(wr[e])return wr[e];if(!yr[e])return e;var t,n=yr[e];for(t in n)if(n.hasOwnProperty(t)&&t in _r)return wr[e]=n[t];return e}s&&(_r=document.createElement("div").style,"AnimationEvent"in window||(delete yr.animationend.animation,delete yr.animationiteration.animation,delete yr.animationstart.animation),"TransitionEvent"in window||delete yr.transitionend.transition);var Er=Sr("animationend"),kr=Sr("animationiteration"),Mr=Sr("animationstart"),Cr=Sr("transitionend"),xr=new Map,Ar="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Tr(e,t){xr.set(e,t),o(t,[e])}for(var Rr=0;Rr<Ar.length;Rr++){var Pr=Ar[Rr];Tr(Pr.toLowerCase(),"on"+(Pr[0].toUpperCase()+Pr.slice(1)))}Tr(Er,"onAnimationEnd"),Tr(kr,"onAnimationIteration"),Tr(Mr,"onAnimationStart"),Tr("dblclick","onDoubleClick"),Tr("focusin","onFocus"),Tr("focusout","onBlur"),Tr(Cr,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ir=new Set("cancel close invalid load scroll toggle".split(" ").concat(Lr));function Or(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,i,o,a,s,u,l){if(je.apply(this,arguments),Ie){if(!Ie)throw Error(n(198));var c=Oe;Ie=!1,Oe=null,Ne||(Ne=!0,De=c)}}(i,t,void 0,e),e.currentTarget=null}function Nr(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],u=s.instance,l=s.currentTarget;if(s=s.listener,u!==o&&i.isPropagationStopped())break e;Or(i,s,l),o=u}else for(a=0;a<r.length;a++){if(u=(s=r[a]).instance,l=s.currentTarget,s=s.listener,u!==o&&i.isPropagationStopped())break e;Or(i,s,l),o=u}}}if(Ne)throw e=De,Ne=!1,De=null,e}function Dr(e,t){var n=t[fi];void 0===n&&(n=t[fi]=new Set);var r=e+"__bubble";n.has(r)||(Ur(t,e,2,!1),n.add(r))}function Br(e,t,n){var r=0;t&&(r|=4),Ur(n,e,r,t)}var jr="_reactListening"+Math.random().toString(36).slice(2);function zr(e){if(!e[jr]){e[jr]=!0,r.forEach((function(t){"selectionchange"!==t&&(Ir.has(t)||Br(t,!1,e),Br(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[jr]||(t[jr]=!0,Br("selectionchange",!1,t))}}function Ur(e,t,n,r){switch(Vt(t)){case 1:var i=Kt;break;case 4:i=qt;break;default:i=Ht}n=i.bind(null,t,n,e),i=void 0,!Re||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Fr(e,t,n,r,i){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var u=a.tag;if((3===u||4===u)&&((u=a.stateNode.containerInfo)===i||8===u.nodeType&&u.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=mi(s)))return;if(5===(u=a.tag)||6===u){r=o=a;continue e}s=s.parentNode}}r=r.return}Ae((function(){var r=o,i=be(n),a=[];e:{var s=xr.get(e);if(void 0!==s){var u=sn,l=e;switch(e){case"keypress":if(0===Xt(n))break e;case"keydown":case"keyup":u=kn;break;case"focusin":l="focus",u=hn;break;case"focusout":l="blur",u=hn;break;case"beforeblur":case"afterblur":u=hn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=dn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=fn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Cn;break;case Er:case kr:case Mr:u=pn;break;case Cr:u=xn;break;case"scroll":u=ln;break;case"wheel":u=Tn;break;case"copy":case"cut":case"paste":u=gn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Mn}var c=0!=(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var h,p=r;null!==p;){var m=(h=p).stateNode;if(5===h.tag&&null!==m&&(h=m,null!==f&&null!=(m=Te(p,f))&&c.push(Kr(p,m,h))),d)break;p=p.return}0<c.length&&(s=new u(s,l,null,n,i),a.push({event:s,listeners:c}))}}if(0==(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===ve||!(l=n.relatedTarget||n.fromElement)||!mi(l)&&!l[di])&&(u||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=r,null!==(l=(l=n.relatedTarget||n.toElement)?mi(l):null)&&(l!==(d=ze(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(u=null,l=r),u!==l)){if(c=dn,m="onMouseLeave",f="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=Mn,m="onPointerLeave",f="onPointerEnter",p="pointer"),d=null==u?s:vi(u),h=null==l?s:vi(l),(s=new c(m,p+"leave",u,n,i)).target=d,s.relatedTarget=h,m=null,mi(i)===r&&((c=new c(f,p+"enter",l,n,i)).target=h,c.relatedTarget=d,m=c),d=m,u&&l)e:{for(f=l,p=0,h=c=u;h;h=Hr(h))p++;for(h=0,m=f;m;m=Hr(m))h++;for(;0<p-h;)c=Hr(c),p--;for(;0<h-p;)f=Hr(f),h--;for(;p--;){if(c===f||null!==f&&c===f.alternate)break e;c=Hr(c),f=Hr(f)}c=null}else c=null;null!==u&&Wr(a,s,u,c,!1),null!==l&&null!==d&&Wr(a,d,l,c,!0)}if("select"===(u=(s=r?vi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var g=Vn;else if(Fn(s))if(Yn)g=rr;else{g=tr;var v=er}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=nr);switch(g&&(g=g(e,r))?Kn(a,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&Q(s,"number",s.value)),v=r?vi(r):window,e){case"focusin":(Fn(v)||"true"===v.contentEditable)&&(hr=v,pr=r,mr=null);break;case"focusout":mr=pr=hr=null;break;case"mousedown":gr=!0;break;case"contextmenu":case"mouseup":case"dragend":gr=!1,vr(a,n,i);break;case"selectionchange":if(fr)break;case"keydown":case"keyup":vr(a,n,i)}var b;if(Pn)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else zn?Bn(e,n)&&(y="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(y="onCompositionStart");y&&(On&&"ko"!==n.locale&&(zn||"onCompositionStart"!==y?"onCompositionEnd"===y&&zn&&(b=Qt()):(Gt="value"in(Yt=i)?Yt.value:Yt.textContent,zn=!0)),0<(v=qr(r,y)).length&&(y=new vn(y,e,null,n,i),a.push({event:y,listeners:v}),(b||null!==(b=jn(n)))&&(y.data=b))),(b=In?function(e,t){switch(e){case"compositionend":return jn(t);case"keypress":return 32!==t.which?null:(Dn=!0,Nn);case"textInput":return(e=t.data)===Nn&&Dn?null:e;default:return null}}(e,n):function(e,t){if(zn)return"compositionend"===e||!Pn&&Bn(e,t)?(e=Qt(),Zt=Gt=Yt=null,zn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return On&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=qr(r,"onBeforeInput")).length&&(i=new vn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=b)}Nr(a,t)}))}function Kr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Te(e,n))&&r.unshift(Kr(e,o,i)),null!=(o=Te(e,t))&&r.push(Kr(e,o,i))),e=e.return}return r}function Hr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Wr(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,u=s.alternate,l=s.stateNode;if(null!==u&&u===r)break;5===s.tag&&null!==l&&(s=l,i?null!=(u=Te(n,o))&&a.unshift(Kr(n,u,s)):i||null!=(u=Te(n,o))&&a.push(Kr(n,u,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var $r=/\r\n?/g,Vr=/\u0000|\uFFFD/g;function Yr(e){return("string"==typeof e?e:""+e).replace($r,"\n").replace(Vr,"")}function Gr(e,t,r){if(t=Yr(t),Yr(e)!==t&&r)throw Error(n(425))}function Zr(){}var Qr=null,Xr=null;function Jr(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ei="function"==typeof setTimeout?setTimeout:void 0,ti="function"==typeof clearTimeout?clearTimeout:void 0,ni="function"==typeof Promise?Promise:void 0,ri="function"==typeof queueMicrotask?queueMicrotask:void 0!==ni?function(e){return ni.resolve(null).then(e).catch(ii)}:ei;function ii(e){setTimeout((function(){throw e}))}function oi(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void zt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);zt(t)}function ai(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function si(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ui=Math.random().toString(36).slice(2),li="__reactFiber$"+ui,ci="__reactProps$"+ui,di="__reactContainer$"+ui,fi="__reactEvents$"+ui,hi="__reactListeners$"+ui,pi="__reactHandles$"+ui;function mi(e){var t=e[li];if(t)return t;for(var n=e.parentNode;n;){if(t=n[di]||n[li]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=si(e);null!==e;){if(n=e[li])return n;e=si(e)}return t}n=(e=n).parentNode}return null}function gi(e){return!(e=e[li]||e[di])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function vi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(n(33))}function bi(e){return e[ci]||null}var yi=[],wi=-1;function _i(e){return{current:e}}function Si(e){0>wi||(e.current=yi[wi],yi[wi]=null,wi--)}function Ei(e,t){wi++,yi[wi]=e.current,e.current=t}var ki={},Mi=_i(ki),Ci=_i(!1),xi=ki;function Ai(e,t){var n=e.type.contextTypes;if(!n)return ki;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ti(e){return null!=e.childContextTypes}function Ri(){Si(Ci),Si(Mi)}function Pi(e,t,r){if(Mi.current!==ki)throw Error(n(168));Ei(Mi,t),Ei(Ci,r)}function Li(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,"function"!=typeof i.getChildContext)return r;for(var o in i=i.getChildContext())if(!(o in t))throw Error(n(108,U(e)||"Unknown",o));return O({},r,i)}function Ii(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ki,xi=Mi.current,Ei(Mi,e),Ei(Ci,Ci.current),!0}function Oi(e,t,r){var i=e.stateNode;if(!i)throw Error(n(169));r?(e=Li(e,t,xi),i.__reactInternalMemoizedMergedChildContext=e,Si(Ci),Si(Mi),Ei(Mi,e)):Si(Ci),Ei(Ci,r)}var Ni=null,Di=!1,Bi=!1;function ji(e){null===Ni?Ni=[e]:Ni.push(e)}function zi(){if(!Bi&&null!==Ni){Bi=!0;var e=0,t=gt;try{var n=Ni;for(gt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ni=null,Di=!1}catch(t){throw null!==Ni&&(Ni=Ni.slice(e+1)),He(Ze,zi),t}finally{gt=t,Bi=!1}}return null}var Ui=[],Fi=0,Ki=null,qi=0,Hi=[],Wi=0,$i=null,Vi=1,Yi="";function Gi(e,t){Ui[Fi++]=qi,Ui[Fi++]=Ki,Ki=e,qi=t}function Zi(e,t,n){Hi[Wi++]=Vi,Hi[Wi++]=Yi,Hi[Wi++]=$i,$i=e;var r=Vi;e=Yi;var i=32-rt(r)-1;r&=~(1<<i),n+=1;var o=32-rt(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Vi=1<<32-rt(t)+i|n<<i|r,Yi=o+e}else Vi=1<<o|n<<i|r,Yi=e}function Qi(e){null!==e.return&&(Gi(e,1),Zi(e,1,0))}function Xi(e){for(;e===Ki;)Ki=Ui[--Fi],Ui[Fi]=null,qi=Ui[--Fi],Ui[Fi]=null;for(;e===$i;)$i=Hi[--Wi],Hi[Wi]=null,Yi=Hi[--Wi],Hi[Wi]=null,Vi=Hi[--Wi],Hi[Wi]=null}var Ji=null,eo=null,to=!1,no=null;function ro(e,t){var n=Tl(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function io(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,Ji=e,eo=ai(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,Ji=e,eo=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==$i?{id:Vi,overflow:Yi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Tl(18,null,null,0)).stateNode=t,n.return=e,e.child=n,Ji=e,eo=null,!0);default:return!1}}function oo(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function ao(e){if(to){var t=eo;if(t){var r=t;if(!io(e,t)){if(oo(e))throw Error(n(418));t=ai(r.nextSibling);var i=Ji;t&&io(e,t)?ro(i,r):(e.flags=-4097&e.flags|2,to=!1,Ji=e)}}else{if(oo(e))throw Error(n(418));e.flags=-4097&e.flags|2,to=!1,Ji=e}}}function so(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Ji=e}function uo(e){if(e!==Ji)return!1;if(!to)return so(e),to=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!Jr(e.type,e.memoizedProps)),t&&(t=eo)){if(oo(e))throw lo(),Error(n(418));for(;t;)ro(e,t),t=ai(t.nextSibling)}if(so(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(n(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){eo=ai(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}eo=null}}else eo=Ji?ai(e.stateNode.nextSibling):null;return!0}function lo(){for(var e=eo;e;)e=ai(e.nextSibling)}function co(){eo=Ji=null,to=!1}function fo(e){null===no?no=[e]:no.push(e)}var ho=v.ReactCurrentBatchConfig;function po(e,t){if(e&&e.defaultProps){for(var n in t=O({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var mo=_i(null),go=null,vo=null,bo=null;function yo(){bo=vo=go=null}function wo(e){var t=mo.current;Si(mo),e._currentValue=t}function _o(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function So(e,t){go=e,bo=vo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(vs=!0),e.firstContext=null)}function Eo(e){var t=e._currentValue;if(bo!==e)if(e={context:e,memoizedValue:t,next:null},null===vo){if(null===go)throw Error(n(308));vo=e,go.dependencies={lanes:0,firstContext:e}}else vo=vo.next=e;return t}var ko=null;function Mo(e){null===ko?ko=[e]:ko.push(e)}function Co(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Mo(t)):(n.next=i.next,i.next=n),t.interleaved=n,xo(e,r)}function xo(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ao=!1;function To(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ro(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Po(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Lo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Cu)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,xo(e,n)}return null===(i=r.interleaved)?(t.next=t,Mo(r)):(t.next=i.next,i.next=t),r.interleaved=t,xo(e,n)}function Io(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,mt(e,n)}}function Oo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function No(e,t,n,r){var i=e.updateQueue;Ao=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var u=s,l=u.next;u.next=null,null===a?o=l:a.next=l,a=u;var c=e.alternate;null!==c&&(s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=l:s.next=l,c.lastBaseUpdate=u)}if(null!==o){var d=i.baseState;for(a=0,c=l=u=null,s=o;;){var f=s.lane,h=s.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,m=s;switch(f=t,h=n,m.tag){case 1:if("function"==typeof(p=m.payload)){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(f="function"==typeof(p=m.payload)?p.call(h,d,f):p))break e;d=O({},d,f);break e;case 2:Ao=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(l=c=h,u=d):c=c.next=h,a|=f;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(f=s).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===c&&(u=d),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Ou|=a,e.lanes=a,e.memoizedState=d}}function Do(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var i=e[t],o=i.callback;if(null!==o){if(i.callback=null,i=r,"function"!=typeof o)throw Error(n(191,o));o.call(i)}}}var Bo=(new e.Component).refs;function jo(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:O({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var zo={isMounted:function(e){return!!(e=e._reactInternals)&&ze(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Xu(),i=Ju(e),o=Po(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=Lo(e,o,i))&&(el(t,e,i,r),Io(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Xu(),i=Ju(e),o=Po(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Lo(e,o,i))&&(el(t,e,i,r),Io(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Xu(),r=Ju(e),i=Po(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Lo(e,i,r))&&(el(t,e,r,n),Io(t,e,r))}};function Uo(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!(t.prototype&&t.prototype.isPureReactComponent&&or(n,r)&&or(i,o))}function Fo(e,t,n){var r=!1,i=ki,o=t.contextType;return"object"==typeof o&&null!==o?o=Eo(o):(i=Ti(t)?xi:Mi.current,o=(r=null!=(r=t.contextTypes))?Ai(e,i):ki),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=zo,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Ko(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&zo.enqueueReplaceState(t,t.state,null)}function qo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Bo,To(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Eo(o):(o=Ti(t)?xi:Mi.current,i.context=Ai(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(jo(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&zo.enqueueReplaceState(i,i.state,null),No(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Ho(e,t,r){if(null!==(e=r.ref)&&"function"!=typeof e&&"object"!=typeof e){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(n(309));var i=r.stateNode}if(!i)throw Error(n(147,e));var o=i,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=o.refs;t===Bo&&(t=o.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(n(284));if(!r._owner)throw Error(n(290,e))}return e}function Wo(e,t){throw e=Object.prototype.toString.call(t),Error(n(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function $o(e){return(0,e._init)(e._payload)}function Vo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function r(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Pl(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Nl(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){var i=n.type;return i===w?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===T&&$o(i)===t.type)?((r=o(t,n.props)).ref=Ho(e,t,n),r.return=e,r):((r=Ll(n.type,n.key,n.props,null,e.mode,r)).ref=Ho(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Dl(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=Il(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Nl(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case b:return(n=Ll(t.type,t.key,t.props,null,e.mode,n)).ref=Ho(e,null,t),n.return=e,n;case y:return(t=Dl(t,e.mode,n)).return=e,t;case T:return f(e,(0,t._init)(t._payload),n)}if(X(t)||L(t))return(t=Il(t,e.mode,n,null)).return=e,t;Wo(e,t)}return null}function h(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case b:return n.key===i?l(e,t,n,r):null;case y:return n.key===i?c(e,t,n,r):null;case T:return h(e,t,(i=n._init)(n._payload),r)}if(X(n)||L(n))return null!==i?null:d(e,t,n,r,null);Wo(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case b:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case y:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case T:return p(e,t,n,(0,r._init)(r._payload),i)}if(X(r)||L(r))return d(t,e=e.get(n)||null,r,i,null);Wo(t,r)}return null}function m(n,o,s,u){for(var l=null,c=null,d=o,m=o=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=h(n,d,s[m],u);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(n,d),o=a(v,o,m),null===c?l=v:c.sibling=v,c=v,d=g}if(m===s.length)return r(n,d),to&&Gi(n,m),l;if(null===d){for(;m<s.length;m++)null!==(d=f(n,s[m],u))&&(o=a(d,o,m),null===c?l=d:c.sibling=d,c=d);return to&&Gi(n,m),l}for(d=i(n,d);m<s.length;m++)null!==(g=p(d,n,m,s[m],u))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),o=a(g,o,m),null===c?l=g:c.sibling=g,c=g);return e&&d.forEach((function(e){return t(n,e)})),to&&Gi(n,m),l}function g(o,s,u,l){var c=L(u);if("function"!=typeof c)throw Error(n(150));if(null==(u=c.call(u)))throw Error(n(151));for(var d=c=null,m=s,g=s=0,v=null,b=u.next();null!==m&&!b.done;g++,b=u.next()){m.index>g?(v=m,m=null):v=m.sibling;var y=h(o,m,b.value,l);if(null===y){null===m&&(m=v);break}e&&m&&null===y.alternate&&t(o,m),s=a(y,s,g),null===d?c=y:d.sibling=y,d=y,m=v}if(b.done)return r(o,m),to&&Gi(o,g),c;if(null===m){for(;!b.done;g++,b=u.next())null!==(b=f(o,b.value,l))&&(s=a(b,s,g),null===d?c=b:d.sibling=b,d=b);return to&&Gi(o,g),c}for(m=i(o,m);!b.done;g++,b=u.next())null!==(b=p(m,o,g,b.value,l))&&(e&&null!==b.alternate&&m.delete(null===b.key?g:b.key),s=a(b,s,g),null===d?c=b:d.sibling=b,d=b);return e&&m.forEach((function(e){return t(o,e)})),to&&Gi(o,g),c}return function e(n,i,a,u){if("object"==typeof a&&null!==a&&a.type===w&&null===a.key&&(a=a.props.children),"object"==typeof a&&null!==a){switch(a.$$typeof){case b:e:{for(var l=a.key,c=i;null!==c;){if(c.key===l){if((l=a.type)===w){if(7===c.tag){r(n,c.sibling),(i=o(c,a.props.children)).return=n,n=i;break e}}else if(c.elementType===l||"object"==typeof l&&null!==l&&l.$$typeof===T&&$o(l)===c.type){r(n,c.sibling),(i=o(c,a.props)).ref=Ho(n,c,a),i.return=n,n=i;break e}r(n,c);break}t(n,c),c=c.sibling}a.type===w?((i=Il(a.props.children,n.mode,u,a.key)).return=n,n=i):((u=Ll(a.type,a.key,a.props,null,n.mode,u)).ref=Ho(n,i,a),u.return=n,n=u)}return s(n);case y:e:{for(c=a.key;null!==i;){if(i.key===c){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){r(n,i.sibling),(i=o(i,a.children||[])).return=n,n=i;break e}r(n,i);break}t(n,i),i=i.sibling}(i=Dl(a,n.mode,u)).return=n,n=i}return s(n);case T:return e(n,i,(c=a._init)(a._payload),u)}if(X(a))return m(n,i,a,u);if(L(a))return g(n,i,a,u);Wo(n,a)}return"string"==typeof a&&""!==a||"number"==typeof a?(a=""+a,null!==i&&6===i.tag?(r(n,i.sibling),(i=o(i,a)).return=n,n=i):(r(n,i),(i=Nl(a,n.mode,u)).return=n,n=i),s(n)):r(n,i)}}var Yo=Vo(!0),Go=Vo(!1),Zo={},Qo=_i(Zo),Xo=_i(Zo),Jo=_i(Zo);function ea(e){if(e===Zo)throw Error(n(174));return e}function ta(e,t){switch(Ei(Jo,t),Ei(Xo,e),Ei(Qo,Zo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:oe(null,"");break;default:t=oe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Si(Qo),Ei(Qo,t)}function na(){Si(Qo),Si(Xo),Si(Jo)}function ra(e){ea(Jo.current);var t=ea(Qo.current),n=oe(t,e.type);t!==n&&(Ei(Xo,e),Ei(Qo,n))}function ia(e){Xo.current===e&&(Si(Qo),Si(Xo))}var oa=_i(0);function aa(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var sa=[];function ua(){for(var e=0;e<sa.length;e++)sa[e]._workInProgressVersionPrimary=null;sa.length=0}var la=v.ReactCurrentDispatcher,ca=v.ReactCurrentBatchConfig,da=0,fa=null,ha=null,pa=null,ma=!1,ga=!1,va=0,ba=0;function ya(){throw Error(n(321))}function wa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ir(e[n],t[n]))return!1;return!0}function _a(e,t,r,i,o,a){if(da=a,fa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,la.current=null===e||null===e.memoizedState?is:os,e=r(i,o),ga){a=0;do{if(ga=!1,va=0,25<=a)throw Error(n(301));a+=1,pa=ha=null,t.updateQueue=null,la.current=as,e=r(i,o)}while(ga)}if(la.current=rs,t=null!==ha&&null!==ha.next,da=0,pa=ha=fa=null,ma=!1,t)throw Error(n(300));return e}function Sa(){var e=0!==va;return va=0,e}function Ea(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===pa?fa.memoizedState=pa=e:pa=pa.next=e,pa}function ka(){if(null===ha){var e=fa.alternate;e=null!==e?e.memoizedState:null}else e=ha.next;var t=null===pa?fa.memoizedState:pa.next;if(null!==t)pa=t,ha=e;else{if(null===e)throw Error(n(310));e={memoizedState:(ha=e).memoizedState,baseState:ha.baseState,baseQueue:ha.baseQueue,queue:ha.queue,next:null},null===pa?fa.memoizedState=pa=e:pa=pa.next=e}return pa}function Ma(e,t){return"function"==typeof t?t(e):t}function Ca(e){var t=ka(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var i=ha,o=i.baseQueue,a=r.pending;if(null!==a){if(null!==o){var s=o.next;o.next=a.next,a.next=s}i.baseQueue=o=a,r.pending=null}if(null!==o){a=o.next,i=i.baseState;var u=s=null,l=null,c=a;do{var d=c.lane;if((da&d)===d)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),i=c.hasEagerState?c.eagerState:e(i,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(u=l=f,s=i):l=l.next=f,fa.lanes|=d,Ou|=d}c=c.next}while(null!==c&&c!==a);null===l?s=i:l.next=u,ir(i,t.memoizedState)||(vs=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,r.lastRenderedState=i}if(null!==(e=r.interleaved)){o=e;do{a=o.lane,fa.lanes|=a,Ou|=a,o=o.next}while(o!==e)}else null===o&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function xa(e){var t=ka(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var i=r.dispatch,o=r.pending,a=t.memoizedState;if(null!==o){r.pending=null;var s=o=o.next;do{a=e(a,s.action),s=s.next}while(s!==o);ir(a,t.memoizedState)||(vs=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),r.lastRenderedState=a}return[a,i]}function Aa(){}function Ta(e,t){var r=fa,i=ka(),o=t(),a=!ir(i.memoizedState,o);if(a&&(i.memoizedState=o,vs=!0),i=i.queue,Fa(La.bind(null,r,i,e),[e]),i.getSnapshot!==t||a||null!==pa&&1&pa.memoizedState.tag){if(r.flags|=2048,Da(9,Pa.bind(null,r,i,o,t),void 0,null),null===xu)throw Error(n(349));0!=(30&da)||Ra(r,t,o)}return o}function Ra(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=fa.updateQueue)?(t={lastEffect:null,stores:null},fa.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Pa(e,t,n,r){t.value=n,t.getSnapshot=r,Ia(t)&&Oa(e)}function La(e,t,n){return n((function(){Ia(t)&&Oa(e)}))}function Ia(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ir(e,n)}catch(e){return!0}}function Oa(e){var t=xo(e,1);null!==t&&el(t,e,1,-1)}function Na(e){var t=Ea();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:e},t.queue=e,e=e.dispatch=Ja.bind(null,fa,e),[t.memoizedState,e]}function Da(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=fa.updateQueue)?(t={lastEffect:null,stores:null},fa.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ba(){return ka().memoizedState}function ja(e,t,n,r){var i=Ea();fa.flags|=e,i.memoizedState=Da(1|t,n,void 0,void 0===r?null:r)}function za(e,t,n,r){var i=ka();r=void 0===r?null:r;var o=void 0;if(null!==ha){var a=ha.memoizedState;if(o=a.destroy,null!==r&&wa(r,a.deps))return void(i.memoizedState=Da(t,n,o,r))}fa.flags|=e,i.memoizedState=Da(1|t,n,o,r)}function Ua(e,t){return ja(8390656,8,e,t)}function Fa(e,t){return za(2048,8,e,t)}function Ka(e,t){return za(4,2,e,t)}function qa(e,t){return za(4,4,e,t)}function Ha(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Wa(e,t,n){return n=null!=n?n.concat([e]):null,za(4,4,Ha.bind(null,t,e),n)}function $a(){}function Va(e,t){var n=ka();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&wa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ya(e,t){var n=ka();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&wa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ga(e,t,n){return 0==(21&da)?(e.baseState&&(e.baseState=!1,vs=!0),e.memoizedState=n):(ir(n,t)||(n=ft(),fa.lanes|=n,Ou|=n,e.baseState=!0),t)}function Za(e,t){var n=gt;gt=0!==n&&4>n?n:4,e(!0);var r=ca.transition;ca.transition={};try{e(!1),t()}finally{gt=n,ca.transition=r}}function Qa(){return ka().memoizedState}function Xa(e,t,n){var r=Ju(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},es(e)?ts(t,n):null!==(n=Co(e,t,n,r))&&(el(n,e,r,Xu()),ns(n,t,r))}function Ja(e,t,n){var r=Ju(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(es(e))ts(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,ir(s,a)){var u=t.interleaved;return null===u?(i.next=i,Mo(t)):(i.next=u.next,u.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Co(e,t,i,r))&&(el(n,e,r,i=Xu()),ns(n,t,r))}}function es(e){var t=e.alternate;return e===fa||null!==t&&t===fa}function ts(e,t){ga=ma=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ns(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,mt(e,n)}}var rs={readContext:Eo,useCallback:ya,useContext:ya,useEffect:ya,useImperativeHandle:ya,useInsertionEffect:ya,useLayoutEffect:ya,useMemo:ya,useReducer:ya,useRef:ya,useState:ya,useDebugValue:ya,useDeferredValue:ya,useTransition:ya,useMutableSource:ya,useSyncExternalStore:ya,useId:ya,unstable_isNewReconciler:!1},is={readContext:Eo,useCallback:function(e,t){return Ea().memoizedState=[e,void 0===t?null:t],e},useContext:Eo,useEffect:Ua,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ja(4194308,4,Ha.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ja(4194308,4,e,t)},useInsertionEffect:function(e,t){return ja(4,2,e,t)},useMemo:function(e,t){var n=Ea();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ea();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Xa.bind(null,fa,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ea().memoizedState=e},useState:Na,useDebugValue:$a,useDeferredValue:function(e){return Ea().memoizedState=e},useTransition:function(){var e=Na(!1),t=e[0];return e=Za.bind(null,e[1]),Ea().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=fa,o=Ea();if(to){if(void 0===r)throw Error(n(407));r=r()}else{if(r=t(),null===xu)throw Error(n(349));0!=(30&da)||Ra(i,t,r)}o.memoizedState=r;var a={value:r,getSnapshot:t};return o.queue=a,Ua(La.bind(null,i,a,e),[e]),i.flags|=2048,Da(9,Pa.bind(null,i,a,r,t),void 0,null),r},useId:function(){var e=Ea(),t=xu.identifierPrefix;if(to){var n=Yi;t=":"+t+"R"+(n=(Vi&~(1<<32-rt(Vi)-1)).toString(32)+n),0<(n=va++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ba++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},os={readContext:Eo,useCallback:Va,useContext:Eo,useEffect:Fa,useImperativeHandle:Wa,useInsertionEffect:Ka,useLayoutEffect:qa,useMemo:Ya,useReducer:Ca,useRef:Ba,useState:function(){return Ca(Ma)},useDebugValue:$a,useDeferredValue:function(e){return Ga(ka(),ha.memoizedState,e)},useTransition:function(){return[Ca(Ma)[0],ka().memoizedState]},useMutableSource:Aa,useSyncExternalStore:Ta,useId:Qa,unstable_isNewReconciler:!1},as={readContext:Eo,useCallback:Va,useContext:Eo,useEffect:Fa,useImperativeHandle:Wa,useInsertionEffect:Ka,useLayoutEffect:qa,useMemo:Ya,useReducer:xa,useRef:Ba,useState:function(){return xa(Ma)},useDebugValue:$a,useDeferredValue:function(e){var t=ka();return null===ha?t.memoizedState=e:Ga(t,ha.memoizedState,e)},useTransition:function(){return[xa(Ma)[0],ka().memoizedState]},useMutableSource:Aa,useSyncExternalStore:Ta,useId:Qa,unstable_isNewReconciler:!1};function ss(e,t){try{var n="",r=t;do{n+=j(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function us(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ls(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var cs="function"==typeof WeakMap?WeakMap:Map;function ds(e,t,n){(n=Po(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ku||(Ku=!0,qu=r),ls(0,t)},n}function fs(e,t,n){(n=Po(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ls(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){ls(0,t),"function"!=typeof r&&(null===Hu?Hu=new Set([this]):Hu.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function hs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new cs;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=El.bind(null,e,t,n),t.then(e,e))}function ps(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ms(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Po(-1,1)).tag=2,Lo(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var gs=v.ReactCurrentOwner,vs=!1;function bs(e,t,n,r){t.child=null===e?Go(t,null,n,r):Yo(t,e.child,n,r)}function ys(e,t,n,r,i){n=n.render;var o=t.ref;return So(t,i),r=_a(e,t,n,r,o,i),n=Sa(),null===e||vs?(to&&n&&Qi(t),t.flags|=1,bs(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ks(e,t,i))}function ws(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Rl(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ll(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,_s(e,t,o,r,i))}if(o=e.child,0==(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:or)(a,r)&&e.ref===t.ref)return Ks(e,t,i)}return t.flags|=1,(e=Pl(o,r)).ref=t.ref,e.return=t,t.child=e}function _s(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(or(o,r)&&e.ref===t.ref){if(vs=!1,t.pendingProps=r=o,0==(e.lanes&i))return t.lanes=e.lanes,Ks(e,t,i);0!=(131072&e.flags)&&(vs=!0)}}return ks(e,t,n,r,i)}function Ss(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ei(Pu,Ru),Ru|=n;else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ei(Pu,Ru),Ru|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Ei(Pu,Ru),Ru|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ei(Pu,Ru),Ru|=r;return bs(e,t,i,n),t.child}function Es(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ks(e,t,n,r,i){var o=Ti(n)?xi:Mi.current;return o=Ai(t,o),So(t,i),n=_a(e,t,n,r,o,i),r=Sa(),null===e||vs?(to&&r&&Qi(t),t.flags|=1,bs(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ks(e,t,i))}function Ms(e,t,n,r,i){if(Ti(n)){var o=!0;Ii(t)}else o=!1;if(So(t,i),null===t.stateNode)Fs(e,t),Fo(t,n,r),qo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,l=n.contextType;l="object"==typeof l&&null!==l?Eo(l):Ai(t,l=Ti(n)?xi:Mi.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||u!==l)&&Ko(t,a,r,l),Ao=!1;var f=t.memoizedState;a.state=f,No(t,r,a,i),u=t.memoizedState,s!==r||f!==u||Ci.current||Ao?("function"==typeof c&&(jo(t,n,c,r),u=t.memoizedState),(s=Ao||Uo(t,n,s,r,f,u,l))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=l,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ro(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:po(t.type,s),a.props=l,d=t.pendingProps,f=a.context,u="object"==typeof(u=n.contextType)&&null!==u?Eo(u):Ai(t,u=Ti(n)?xi:Mi.current);var h=n.getDerivedStateFromProps;(c="function"==typeof h||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||f!==u)&&Ko(t,a,r,u),Ao=!1,f=t.memoizedState,a.state=f,No(t,r,a,i);var p=t.memoizedState;s!==d||f!==p||Ci.current||Ao?("function"==typeof h&&(jo(t,n,h,r),p=t.memoizedState),(l=Ao||Uo(t,n,l,r,f,p,u)||!1)?(c||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,u),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,u)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=u,r=l):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Cs(e,t,n,r,o,i)}function Cs(e,t,n,r,i,o){Es(e,t);var a=0!=(128&t.flags);if(!r&&!a)return i&&Oi(t,n,!1),Ks(e,t,o);r=t.stateNode,gs.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Yo(t,e.child,null,o),t.child=Yo(t,null,s,o)):bs(e,t,s,o),t.memoizedState=r.state,i&&Oi(t,n,!0),t.child}function xs(e){var t=e.stateNode;t.pendingContext?Pi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Pi(0,t.context,!1),ta(e,t.containerInfo)}function As(e,t,n,r,i){return co(),fo(i),t.flags|=256,bs(e,t,n,r),t.child}var Ts,Rs,Ps,Ls,Is={dehydrated:null,treeContext:null,retryLane:0};function Os(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ns(e,t,r){var i,o=t.pendingProps,a=oa.current,s=!1,u=0!=(128&t.flags);if((i=u)||(i=(null===e||null!==e.memoizedState)&&0!=(2&a)),i?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Ei(oa,1&a),null===e)return ao(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(u=o.children,e=o.fallback,s?(o=t.mode,s=t.child,u={mode:"hidden",children:u},0==(1&o)&&null!==s?(s.childLanes=0,s.pendingProps=u):s=Ol(u,o,0,null),e=Il(e,o,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Os(r),t.memoizedState=Is,e):Ds(t,u));if(null!==(a=e.memoizedState)&&null!==(i=a.dehydrated))return function(e,t,r,i,o,a,s){if(r)return 256&t.flags?(t.flags&=-257,Bs(e,t,s,i=us(Error(n(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=i.fallback,o=t.mode,i=Ol({mode:"visible",children:i.children},o,0,null),(a=Il(a,o,s,null)).flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,0!=(1&t.mode)&&Yo(t,e.child,null,s),t.child.memoizedState=Os(s),t.memoizedState=Is,a);if(0==(1&t.mode))return Bs(e,t,s,null);if("$!"===o.data){if(i=o.nextSibling&&o.nextSibling.dataset)var u=i.dgst;return i=u,Bs(e,t,s,i=us(a=Error(n(419)),i,void 0))}if(u=0!=(s&e.childLanes),vs||u){if(null!==(i=xu)){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!=(o&(i.suspendedLanes|s))?0:o)&&o!==a.retryLane&&(a.retryLane=o,xo(e,o),el(i,e,o,-1))}return hl(),Bs(e,t,s,i=us(Error(n(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Ml.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,eo=ai(o.nextSibling),Ji=t,to=!0,no=null,null!==e&&(Hi[Wi++]=Vi,Hi[Wi++]=Yi,Hi[Wi++]=$i,Vi=e.id,Yi=e.overflow,$i=t),(t=Ds(t,i.children)).flags|=4096,t)}(e,t,u,o,i,a,r);if(s){s=o.fallback,u=t.mode,i=(a=e.child).sibling;var l={mode:"hidden",children:o.children};return 0==(1&u)&&t.child!==a?((o=t.child).childLanes=0,o.pendingProps=l,t.deletions=null):(o=Pl(a,l)).subtreeFlags=14680064&a.subtreeFlags,null!==i?s=Pl(i,s):(s=Il(s,u,r,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,u=null===(u=e.child.memoizedState)?Os(r):{baseLanes:u.baseLanes|r,cachePool:null,transitions:u.transitions},s.memoizedState=u,s.childLanes=e.childLanes&~r,t.memoizedState=Is,o}return e=(s=e.child).sibling,o=Pl(s,{mode:"visible",children:o.children}),0==(1&t.mode)&&(o.lanes=r),o.return=t,o.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function Ds(e,t){return(t=Ol({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Bs(e,t,n,r){return null!==r&&fo(r),Yo(t,e.child,null,n),(e=Ds(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function js(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),_o(e.return,t,n)}function zs(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Us(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(bs(e,t,r.children,n),0!=(2&(r=oa.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&js(e,n,t);else if(19===e.tag)js(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ei(oa,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===aa(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),zs(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===aa(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}zs(t,!0,n,null,o);break;case"together":zs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fs(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ks(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Ou|=t.lanes,0==(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(n(153));if(null!==t.child){for(r=Pl(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=Pl(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function qs(e,t){if(!to)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Hs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ws(e,t,r){var o=t.pendingProps;switch(Xi(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Hs(t),null;case 1:case 17:return Ti(t.type)&&Ri(),Hs(t),null;case 3:return o=t.stateNode,na(),Si(Ci),Si(Mi),ua(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),null!==e&&null!==e.child||(uo(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==no&&(il(no),no=null))),Rs(e,t),Hs(t),null;case 5:ia(t);var a=ea(Jo.current);if(r=t.type,null!==e&&null!=t.stateNode)Ps(e,t,r,o,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(null===t.stateNode)throw Error(n(166));return Hs(t),null}if(e=ea(Qo.current),uo(t)){o=t.stateNode,r=t.type;var s=t.memoizedProps;switch(o[li]=t,o[ci]=s,e=0!=(1&t.mode),r){case"dialog":Dr("cancel",o),Dr("close",o);break;case"iframe":case"object":case"embed":Dr("load",o);break;case"video":case"audio":for(a=0;a<Lr.length;a++)Dr(Lr[a],o);break;case"source":Dr("error",o);break;case"img":case"image":case"link":Dr("error",o),Dr("load",o);break;case"details":Dr("toggle",o);break;case"input":V(o,s),Dr("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!s.multiple},Dr("invalid",o);break;case"textarea":te(o,s),Dr("invalid",o)}for(var u in me(r,s),a=null,s)if(s.hasOwnProperty(u)){var l=s[u];"children"===u?"string"==typeof l?o.textContent!==l&&(!0!==s.suppressHydrationWarning&&Gr(o.textContent,l,e),a=["children",l]):"number"==typeof l&&o.textContent!==""+l&&(!0!==s.suppressHydrationWarning&&Gr(o.textContent,l,e),a=["children",""+l]):i.hasOwnProperty(u)&&null!=l&&"onScroll"===u&&Dr("scroll",o)}switch(r){case"input":q(o),Z(o,s,!0);break;case"textarea":q(o),re(o);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(o.onclick=Zr)}o=a,t.updateQueue=o,null!==o&&(t.flags|=4)}else{u=9===a.nodeType?a:a.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ie(r)),"http://www.w3.org/1999/xhtml"===e?"script"===r?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof o.is?e=u.createElement(r,{is:o.is}):(e=u.createElement(r),"select"===r&&(u=e,o.multiple?u.multiple=!0:o.size&&(u.size=o.size))):e=u.createElementNS(e,r),e[li]=t,e[ci]=o,Ts(e,t,!1,!1),t.stateNode=e;e:{switch(u=ge(r,o),r){case"dialog":Dr("cancel",e),Dr("close",e),a=o;break;case"iframe":case"object":case"embed":Dr("load",e),a=o;break;case"video":case"audio":for(a=0;a<Lr.length;a++)Dr(Lr[a],e);a=o;break;case"source":Dr("error",e),a=o;break;case"img":case"image":case"link":Dr("error",e),Dr("load",e),a=o;break;case"details":Dr("toggle",e),a=o;break;case"input":V(e,o),a=$(e,o),Dr("invalid",e);break;case"option":default:a=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},a=O({},o,{value:void 0}),Dr("invalid",e);break;case"textarea":te(e,o),a=ee(e,o),Dr("invalid",e)}for(s in me(r,a),l=a)if(l.hasOwnProperty(s)){var c=l[s];"style"===s?he(e,c):"dangerouslySetInnerHTML"===s?null!=(c=c?c.__html:void 0)&&ue(e,c):"children"===s?"string"==typeof c?("textarea"!==r||""!==c)&&le(e,c):"number"==typeof c&&le(e,""+c):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(i.hasOwnProperty(s)?null!=c&&"onScroll"===s&&Dr("scroll",e):null!=c&&g(e,s,c,u))}switch(r){case"input":q(e),Z(e,o,!1);break;case"textarea":q(e),re(e);break;case"option":null!=o.value&&e.setAttribute("value",""+F(o.value));break;case"select":e.multiple=!!o.multiple,null!=(s=o.value)?J(e,!!o.multiple,s,!1):null!=o.defaultValue&&J(e,!!o.multiple,o.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=Zr)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Hs(t),null;case 6:if(e&&null!=t.stateNode)Ls(e,t,e.memoizedProps,o);else{if("string"!=typeof o&&null===t.stateNode)throw Error(n(166));if(r=ea(Jo.current),ea(Qo.current),uo(t)){if(o=t.stateNode,r=t.memoizedProps,o[li]=t,(s=o.nodeValue!==r)&&null!==(e=Ji))switch(e.tag){case 3:Gr(o.nodeValue,r,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Gr(o.nodeValue,r,0!=(1&e.mode))}s&&(t.flags|=4)}else(o=(9===r.nodeType?r:r.ownerDocument).createTextNode(o))[li]=t,t.stateNode=o}return Hs(t),null;case 13:if(Si(oa),o=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(to&&null!==eo&&0!=(1&t.mode)&&0==(128&t.flags))lo(),co(),t.flags|=98560,s=!1;else if(s=uo(t),null!==o&&null!==o.dehydrated){if(null===e){if(!s)throw Error(n(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(n(317));s[li]=t}else co(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Hs(t),s=!1}else null!==no&&(il(no),no=null),s=!0;if(!s)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=r,t):((o=null!==o)!=(null!==e&&null!==e.memoizedState)&&o&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&oa.current)?0===Lu&&(Lu=3):hl())),null!==t.updateQueue&&(t.flags|=4),Hs(t),null);case 4:return na(),Rs(e,t),null===e&&zr(t.stateNode.containerInfo),Hs(t),null;case 10:return wo(t.type._context),Hs(t),null;case 19:if(Si(oa),null===(s=t.memoizedState))return Hs(t),null;if(o=0!=(128&t.flags),null===(u=s.rendering))if(o)qs(s,!1);else{if(0!==Lu||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(u=aa(e))){for(t.flags|=128,qs(s,!1),null!==(o=u.updateQueue)&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=r,r=t.child;null!==r;)e=o,(s=r).flags&=14680066,null===(u=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=u.childLanes,s.lanes=u.lanes,s.child=u.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=u.memoizedProps,s.memoizedState=u.memoizedState,s.updateQueue=u.updateQueue,s.type=u.type,e=u.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Ei(oa,1&oa.current|2),t.child}e=e.sibling}null!==s.tail&&Ye()>Uu&&(t.flags|=128,o=!0,qs(s,!1),t.lanes=4194304)}else{if(!o)if(null!==(e=aa(u))){if(t.flags|=128,o=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),qs(s,!0),null===s.tail&&"hidden"===s.tailMode&&!u.alternate&&!to)return Hs(t),null}else 2*Ye()-s.renderingStartTime>Uu&&1073741824!==r&&(t.flags|=128,o=!0,qs(s,!1),t.lanes=4194304);s.isBackwards?(u.sibling=t.child,t.child=u):(null!==(r=s.last)?r.sibling=u:t.child=u,s.last=u)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ye(),t.sibling=null,r=oa.current,Ei(oa,o?1&r|2:1&r),t):(Hs(t),null);case 22:case 23:return ll(),o=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==o&&(t.flags|=8192),o&&0!=(1&t.mode)?0!=(1073741824&Ru)&&(Hs(t),6&t.subtreeFlags&&(t.flags|=8192)):Hs(t),null;case 24:case 25:return null}throw Error(n(156,t.tag))}function $s(e,t){switch(Xi(t),t.tag){case 1:return Ti(t.type)&&Ri(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return na(),Si(Ci),Si(Mi),ua(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return ia(t),null;case 13:if(Si(oa),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(n(340));co()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Si(oa),null;case 4:return na(),null;case 10:return wo(t.type._context),null;case 22:case 23:return ll(),null;default:return null}}Ts=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Rs=function(){},Ps=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ea(Qo.current);var a,s=null;switch(n){case"input":o=$(e,o),r=$(e,r),s=[];break;case"select":o=O({},o,{value:void 0}),r=O({},r,{value:void 0}),s=[];break;case"textarea":o=ee(e,o),r=ee(e,r),s=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Zr)}for(c in me(n,r),n=null,o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&null!=o[c])if("style"===c){var u=o[c];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(i.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(u=null!=o?o[c]:void 0,r.hasOwnProperty(c)&&l!==u&&(null!=l||null!=u))if("style"===c)if(u){for(a in u)!u.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&u[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(s||(s=[]),s.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,u=u?u.__html:void 0,null!=l&&u!==l&&(s=s||[]).push(c,l)):"children"===c?"string"!=typeof l&&"number"!=typeof l||(s=s||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(i.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&Dr("scroll",e),s||u===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}},Ls=function(e,t,n,r){n!==r&&(t.flags|=4)};var Vs=!1,Ys=!1,Gs="function"==typeof WeakSet?WeakSet:Set,Zs=null;function Qs(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Sl(e,t,n)}else n.current=null}function Xs(e,t,n){try{n()}catch(n){Sl(e,t,n)}}var Js=!1;function eu(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&Xs(t,n,o)}i=i.next}while(i!==r)}}function tu(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function nu(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function ru(e){var t=e.alternate;null!==t&&(e.alternate=null,ru(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[li],delete t[ci],delete t[fi],delete t[hi],delete t[pi]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function iu(e){return 5===e.tag||3===e.tag||4===e.tag}function ou(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||iu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function au(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Zr));else if(4!==r&&null!==(e=e.child))for(au(e,t,n),e=e.sibling;null!==e;)au(e,t,n),e=e.sibling}function su(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(su(e,t,n),e=e.sibling;null!==e;)su(e,t,n),e=e.sibling}var uu=null,lu=!1;function cu(e,t,n){for(n=n.child;null!==n;)du(e,t,n),n=n.sibling}function du(e,t,n){if(nt&&"function"==typeof nt.onCommitFiberUnmount)try{nt.onCommitFiberUnmount(tt,n)}catch(e){}switch(n.tag){case 5:Ys||Qs(n,t);case 6:var r=uu,i=lu;uu=null,cu(e,t,n),lu=i,null!==(uu=r)&&(lu?(e=uu,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):uu.removeChild(n.stateNode));break;case 18:null!==uu&&(lu?(e=uu,n=n.stateNode,8===e.nodeType?oi(e.parentNode,n):1===e.nodeType&&oi(e,n),zt(e)):oi(uu,n.stateNode));break;case 4:r=uu,i=lu,uu=n.stateNode.containerInfo,lu=!0,cu(e,t,n),uu=r,lu=i;break;case 0:case 11:case 14:case 15:if(!Ys&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!=(2&o)||0!=(4&o))&&Xs(n,t,a),i=i.next}while(i!==r)}cu(e,t,n);break;case 1:if(!Ys&&(Qs(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Sl(n,t,e)}cu(e,t,n);break;case 21:cu(e,t,n);break;case 22:1&n.mode?(Ys=(r=Ys)||null!==n.memoizedState,cu(e,t,n),Ys=r):cu(e,t,n);break;default:cu(e,t,n)}}function fu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Gs),t.forEach((function(t){var r=Cl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function hu(e,t){var r=t.deletions;if(null!==r)for(var i=0;i<r.length;i++){var o=r[i];try{var a=e,s=t,u=s;e:for(;null!==u;){switch(u.tag){case 5:uu=u.stateNode,lu=!1;break e;case 3:case 4:uu=u.stateNode.containerInfo,lu=!0;break e}u=u.return}if(null===uu)throw Error(n(160));du(a,s,o),uu=null,lu=!1;var l=o.alternate;null!==l&&(l.return=null),o.return=null}catch(e){Sl(o,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)pu(t,e),t=t.sibling}function pu(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hu(t,e),mu(e),4&i){try{eu(3,e,e.return),tu(3,e)}catch(t){Sl(e,e.return,t)}try{eu(5,e,e.return)}catch(t){Sl(e,e.return,t)}}break;case 1:hu(t,e),mu(e),512&i&&null!==r&&Qs(r,r.return);break;case 5:if(hu(t,e),mu(e),512&i&&null!==r&&Qs(r,r.return),32&e.flags){var o=e.stateNode;try{le(o,"")}catch(t){Sl(e,e.return,t)}}if(4&i&&null!=(o=e.stateNode)){var a=e.memoizedProps,s=null!==r?r.memoizedProps:a,u=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===u&&"radio"===a.type&&null!=a.name&&Y(o,a),ge(u,s);var c=ge(u,a);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];"style"===d?he(o,f):"dangerouslySetInnerHTML"===d?ue(o,f):"children"===d?le(o,f):g(o,d,f,c)}switch(u){case"input":G(o,a);break;case"textarea":ne(o,a);break;case"select":var h=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?J(o,!!a.multiple,p,!1):h!==!!a.multiple&&(null!=a.defaultValue?J(o,!!a.multiple,a.defaultValue,!0):J(o,!!a.multiple,a.multiple?[]:"",!1))}o[ci]=a}catch(t){Sl(e,e.return,t)}}break;case 6:if(hu(t,e),mu(e),4&i){if(null===e.stateNode)throw Error(n(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(t){Sl(e,e.return,t)}}break;case 3:if(hu(t,e),mu(e),4&i&&null!==r&&r.memoizedState.isDehydrated)try{zt(t.containerInfo)}catch(t){Sl(e,e.return,t)}break;case 4:default:hu(t,e),mu(e);break;case 13:hu(t,e),mu(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(zu=Ye())),4&i&&fu(e);break;case 22:if(d=null!==r&&null!==r.memoizedState,1&e.mode?(Ys=(c=Ys)||d,hu(t,e),Ys=c):hu(t,e),mu(e),8192&i){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!d&&0!=(1&e.mode))for(Zs=e,d=e.child;null!==d;){for(f=Zs=d;null!==Zs;){switch(p=(h=Zs).child,h.tag){case 0:case 11:case 14:case 15:eu(4,h,h.return);break;case 1:Qs(h,h.return);var m=h.stateNode;if("function"==typeof m.componentWillUnmount){i=h,r=h.return;try{t=i,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){Sl(i,r,e)}}break;case 5:Qs(h,h.return);break;case 22:if(null!==h.memoizedState){yu(f);continue}}null!==p?(p.return=h,Zs=p):yu(f)}d=d.sibling}e:for(d=null,f=e;;){if(5===f.tag){if(null===d){d=f;try{o=f.stateNode,c?"function"==typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(u=f.stateNode,s=null!=(l=f.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,u.style.display=fe("display",s))}catch(t){Sl(e,e.return,t)}}}else if(6===f.tag){if(null===d)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(t){Sl(e,e.return,t)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===e)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;null===f.sibling;){if(null===f.return||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:hu(t,e),mu(e),4&i&&fu(e);case 21:}}function mu(e){var t=e.flags;if(2&t){try{e:{for(var r=e.return;null!==r;){if(iu(r)){var i=r;break e}r=r.return}throw Error(n(160))}switch(i.tag){case 5:var o=i.stateNode;32&i.flags&&(le(o,""),i.flags&=-33),su(e,ou(e),o);break;case 3:case 4:var a=i.stateNode.containerInfo;au(e,ou(e),a);break;default:throw Error(n(161))}}catch(t){Sl(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function gu(e,t,n){Zs=e,vu(e)}function vu(e,t,n){for(var r=0!=(1&e.mode);null!==Zs;){var i=Zs,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Vs;if(!a){var s=i.alternate,u=null!==s&&null!==s.memoizedState||Ys;s=Vs;var l=Ys;if(Vs=a,(Ys=u)&&!l)for(Zs=i;null!==Zs;)u=(a=Zs).child,22===a.tag&&null!==a.memoizedState?wu(i):null!==u?(u.return=a,Zs=u):wu(i);for(;null!==o;)Zs=o,vu(o),o=o.sibling;Zs=i,Vs=s,Ys=l}bu(e)}else 0!=(8772&i.subtreeFlags)&&null!==o?(o.return=i,Zs=o):bu(e)}}function bu(e){for(;null!==Zs;){var t=Zs;if(0!=(8772&t.flags)){var r=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ys||tu(5,t);break;case 1:var i=t.stateNode;if(4&t.flags&&!Ys)if(null===r)i.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:po(t.type,r.memoizedProps);i.componentDidUpdate(o,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Do(t,a,i);break;case 3:var s=t.updateQueue;if(null!==s){if(r=null,null!==t.child)switch(t.child.tag){case 5:case 1:r=t.child.stateNode}Do(t,s,r)}break;case 5:var u=t.stateNode;if(null===r&&4&t.flags){r=u;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var d=c.memoizedState;if(null!==d){var f=d.dehydrated;null!==f&&zt(f)}}}break;default:throw Error(n(163))}Ys||512&t.flags&&nu(t)}catch(e){Sl(t,t.return,e)}}if(t===e){Zs=null;break}if(null!==(r=t.sibling)){r.return=t.return,Zs=r;break}Zs=t.return}}function yu(e){for(;null!==Zs;){var t=Zs;if(t===e){Zs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Zs=n;break}Zs=t.return}}function wu(e){for(;null!==Zs;){var t=Zs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{tu(4,t)}catch(e){Sl(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Sl(t,i,e)}}var o=t.return;try{nu(t)}catch(e){Sl(t,o,e)}break;case 5:var a=t.return;try{nu(t)}catch(e){Sl(t,a,e)}}}catch(e){Sl(t,t.return,e)}if(t===e){Zs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Zs=s;break}Zs=t.return}}var _u,Su=Math.ceil,Eu=v.ReactCurrentDispatcher,ku=v.ReactCurrentOwner,Mu=v.ReactCurrentBatchConfig,Cu=0,xu=null,Au=null,Tu=0,Ru=0,Pu=_i(0),Lu=0,Iu=null,Ou=0,Nu=0,Du=0,Bu=null,ju=null,zu=0,Uu=1/0,Fu=null,Ku=!1,qu=null,Hu=null,Wu=!1,$u=null,Vu=0,Yu=0,Gu=null,Zu=-1,Qu=0;function Xu(){return 0!=(6&Cu)?Ye():-1!==Zu?Zu:Zu=Ye()}function Ju(e){return 0==(1&e.mode)?1:0!=(2&Cu)&&0!==Tu?Tu&-Tu:null!==ho.transition?(0===Qu&&(Qu=ft()),Qu):0!==(e=gt)?e:e=void 0===(e=window.event)?16:Vt(e.type)}function el(e,t,r,i){if(50<Yu)throw Yu=0,Gu=null,Error(n(185));pt(e,r,i),0!=(2&Cu)&&e===xu||(e===xu&&(0==(2&Cu)&&(Nu|=r),4===Lu&&ol(e,Tu)),tl(e,i),1===r&&0===Cu&&0==(1&t.mode)&&(Uu=Ye()+500,Di&&zi()))}function tl(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-rt(o),s=1<<a,u=i[a];-1===u?0!=(s&n)&&0==(s&r)||(i[a]=ct(s,t)):u<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=lt(e,e===xu?Tu:0);if(0===r)null!==n&&We(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&We(n),1===t)0===e.tag?function(e){Di=!0,ji(e)}(al.bind(null,e)):ji(al.bind(null,e)),ri((function(){0==(6&Cu)&&zi()})),n=null;else{switch(vt(r)){case 1:n=Ze;break;case 4:n=Qe;break;case 16:default:n=Xe;break;case 536870912:n=et}n=xl(n,nl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function nl(e,t){if(Zu=-1,Qu=0,0!=(6&Cu))throw Error(n(327));var r=e.callbackNode;if(wl()&&e.callbackNode!==r)return null;var i=lt(e,e===xu?Tu:0);if(0===i)return null;if(0!=(30&i)||0!=(i&e.expiredLanes)||t)t=pl(e,i);else{t=i;var o=Cu;Cu|=2;var a=fl();for(xu===e&&Tu===t||(Fu=null,Uu=Ye()+500,cl(e,t));;)try{gl();break}catch(t){dl(e,t)}yo(),Eu.current=a,Cu=o,null!==Au?t=0:(xu=null,Tu=0,t=Lu)}if(0!==t){if(2===t&&0!==(o=dt(e))&&(i=o,t=rl(e,o)),1===t)throw r=Iu,cl(e,0),ol(e,i),tl(e,Ye()),r;if(6===t)ol(e,i);else{if(o=e.current.alternate,0==(30&i)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!ir(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=pl(e,i))&&0!==(a=dt(e))&&(i=a,t=rl(e,a)),1===t))throw r=Iu,cl(e,0),ol(e,i),tl(e,Ye()),r;switch(e.finishedWork=o,e.finishedLanes=i,t){case 0:case 1:throw Error(n(345));case 2:case 5:yl(e,ju,Fu);break;case 3:if(ol(e,i),(130023424&i)===i&&10<(t=zu+500-Ye())){if(0!==lt(e,0))break;if(((o=e.suspendedLanes)&i)!==i){Xu(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ei(yl.bind(null,e,ju,Fu),t);break}yl(e,ju,Fu);break;case 4:if(ol(e,i),(4194240&i)===i)break;for(t=e.eventTimes,o=-1;0<i;){var s=31-rt(i);a=1<<s,(s=t[s])>o&&(o=s),i&=~a}if(i=o,10<(i=(120>(i=Ye()-i)?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Su(i/1960))-i)){e.timeoutHandle=ei(yl.bind(null,e,ju,Fu),i);break}yl(e,ju,Fu);break;default:throw Error(n(329))}}}return tl(e,Ye()),e.callbackNode===r?nl.bind(null,e):null}function rl(e,t){var n=Bu;return e.current.memoizedState.isDehydrated&&(cl(e,t).flags|=256),2!==(e=pl(e,t))&&(t=ju,ju=n,null!==t&&il(t)),e}function il(e){null===ju?ju=e:ju.push.apply(ju,e)}function ol(e,t){for(t&=~Du,t&=~Nu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-rt(t),r=1<<n;e[n]=-1,t&=~r}}function al(e){if(0!=(6&Cu))throw Error(n(327));wl();var t=lt(e,0);if(0==(1&t))return tl(e,Ye()),null;var r=pl(e,t);if(0!==e.tag&&2===r){var i=dt(e);0!==i&&(t=i,r=rl(e,i))}if(1===r)throw r=Iu,cl(e,0),ol(e,t),tl(e,Ye()),r;if(6===r)throw Error(n(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,yl(e,ju,Fu),tl(e,Ye()),null}function sl(e,t){var n=Cu;Cu|=1;try{return e(t)}finally{0===(Cu=n)&&(Uu=Ye()+500,Di&&zi())}}function ul(e){null!==$u&&0===$u.tag&&0==(6&Cu)&&wl();var t=Cu;Cu|=1;var n=Mu.transition,r=gt;try{if(Mu.transition=null,gt=1,e)return e()}finally{gt=r,Mu.transition=n,0==(6&(Cu=t))&&zi()}}function ll(){Ru=Pu.current,Si(Pu)}function cl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ti(n)),null!==Au)for(n=Au.return;null!==n;){var r=n;switch(Xi(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Ri();break;case 3:na(),Si(Ci),Si(Mi),ua();break;case 5:ia(r);break;case 4:na();break;case 13:case 19:Si(oa);break;case 10:wo(r.type._context);break;case 22:case 23:ll()}n=n.return}if(xu=e,Au=e=Pl(e.current,null),Tu=Ru=t,Lu=0,Iu=null,Du=Nu=Ou=0,ju=Bu=null,null!==ko){for(t=0;t<ko.length;t++)if(null!==(r=(n=ko[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}ko=null}return e}function dl(e,t){for(;;){var r=Au;try{if(yo(),la.current=rs,ma){for(var i=fa.memoizedState;null!==i;){var o=i.queue;null!==o&&(o.pending=null),i=i.next}ma=!1}if(da=0,pa=ha=fa=null,ga=!1,va=0,ku.current=null,null===r||null===r.return){Lu=1,Iu=t,Au=null;break}e:{var a=e,s=r.return,u=r,l=t;if(t=Tu,u.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l,d=u,f=d.tag;if(0==(1&d.mode)&&(0===f||11===f||15===f)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=ps(s);if(null!==p){p.flags&=-257,ms(p,s,u,0,t),1&p.mode&&hs(a,c,t),l=c;var m=(t=p).updateQueue;if(null===m){var g=new Set;g.add(l),t.updateQueue=g}else m.add(l);break e}if(0==(1&t)){hs(a,c,t),hl();break e}l=Error(n(426))}else if(to&&1&u.mode){var v=ps(s);if(null!==v){0==(65536&v.flags)&&(v.flags|=256),ms(v,s,u,0,t),fo(ss(l,u));break e}}a=l=ss(l,u),4!==Lu&&(Lu=2),null===Bu?Bu=[a]:Bu.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Oo(a,ds(0,l,t));break e;case 1:u=l;var b=a.type,y=a.stateNode;if(0==(128&a.flags)&&("function"==typeof b.getDerivedStateFromError||null!==y&&"function"==typeof y.componentDidCatch&&(null===Hu||!Hu.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t,Oo(a,fs(a,u,t));break e}}a=a.return}while(null!==a)}bl(r)}catch(e){t=e,Au===r&&null!==r&&(Au=r=r.return);continue}break}}function fl(){var e=Eu.current;return Eu.current=rs,null===e?rs:e}function hl(){0!==Lu&&3!==Lu&&2!==Lu||(Lu=4),null===xu||0==(268435455&Ou)&&0==(268435455&Nu)||ol(xu,Tu)}function pl(e,t){var r=Cu;Cu|=2;var i=fl();for(xu===e&&Tu===t||(Fu=null,cl(e,t));;)try{ml();break}catch(t){dl(e,t)}if(yo(),Cu=r,Eu.current=i,null!==Au)throw Error(n(261));return xu=null,Tu=0,Lu}function ml(){for(;null!==Au;)vl(Au)}function gl(){for(;null!==Au&&!$e();)vl(Au)}function vl(e){var t=_u(e.alternate,e,Ru);e.memoizedProps=e.pendingProps,null===t?bl(e):Au=t,ku.current=null}function bl(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Ws(n,t,Ru)))return void(Au=n)}else{if(null!==(n=$s(n,t)))return n.flags&=32767,void(Au=n);if(null===e)return Lu=6,void(Au=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Au=t);Au=t=e}while(null!==t);0===Lu&&(Lu=5)}function yl(e,t,r){var i=gt,o=Mu.transition;try{Mu.transition=null,gt=1,function(e,t,r,i){do{wl()}while(null!==$u);if(0!=(6&Cu))throw Error(n(327));r=e.finishedWork;var o=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(n(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-rt(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,a),e===xu&&(Au=xu=null,Tu=0),0==(2064&r.subtreeFlags)&&0==(2064&r.flags)||Wu||(Wu=!0,xl(Xe,(function(){return wl(),null}))),a=0!=(15990&r.flags),0!=(15990&r.subtreeFlags)||a){a=Mu.transition,Mu.transition=null;var s=gt;gt=1;var u=Cu;Cu|=4,ku.current=null,function(e,t){if(Qr=Ft,cr(e=lr())){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{var i=(r=(r=e.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(i&&0!==i.rangeCount){r=i.anchorNode;var o=i.anchorOffset,a=i.focusNode;i=i.focusOffset;try{r.nodeType,a.nodeType}catch(e){r=null;break e}var s=0,u=-1,l=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==r||0!==o&&3!==f.nodeType||(u=s+o),f!==a||0!==i&&3!==f.nodeType||(l=s+i),3===f.nodeType&&(s+=f.nodeValue.length),null!==(p=f.firstChild);)h=f,f=p;for(;;){if(f===e)break t;if(h===r&&++c===o&&(u=s),h===a&&++d===i&&(l=s),null!==(p=f.nextSibling))break;h=(f=h).parentNode}f=p}r=-1===u||-1===l?null:{start:u,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Xr={focusedElem:e,selectionRange:r},Ft=!1,Zs=t;null!==Zs;)if(e=(t=Zs).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Zs=e;else for(;null!==Zs;){t=Zs;try{var m=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,v=m.memoizedState,b=t.stateNode,y=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:po(t.type,g),v);b.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(n(163))}}catch(e){Sl(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Zs=e;break}Zs=t.return}m=Js,Js=!1}(e,r),pu(r,e),dr(Xr),Ft=!!Qr,Xr=Qr=null,e.current=r,gu(r),Ve(),Cu=u,gt=s,Mu.transition=a}else e.current=r;if(Wu&&(Wu=!1,$u=e,Vu=o),0===(a=e.pendingLanes)&&(Hu=null),function(e){if(nt&&"function"==typeof nt.onCommitFiberRoot)try{nt.onCommitFiberRoot(tt,e,void 0,128==(128&e.current.flags))}catch(e){}}(r.stateNode),tl(e,Ye()),null!==t)for(i=e.onRecoverableError,r=0;r<t.length;r++)i((o=t[r]).value,{componentStack:o.stack,digest:o.digest});if(Ku)throw Ku=!1,e=qu,qu=null,e;0!=(1&Vu)&&0!==e.tag&&wl(),0!=(1&(a=e.pendingLanes))?e===Gu?Yu++:(Yu=0,Gu=e):Yu=0,zi()}(e,t,r,i)}finally{Mu.transition=o,gt=i}return null}function wl(){if(null!==$u){var e=vt(Vu),t=Mu.transition,r=gt;try{if(Mu.transition=null,gt=16>e?16:e,null===$u)var i=!1;else{if(e=$u,$u=null,Vu=0,0!=(6&Cu))throw Error(n(331));var o=Cu;for(Cu|=4,Zs=e.current;null!==Zs;){var a=Zs,s=a.child;if(0!=(16&Zs.flags)){var u=a.deletions;if(null!==u){for(var l=0;l<u.length;l++){var c=u[l];for(Zs=c;null!==Zs;){var d=Zs;switch(d.tag){case 0:case 11:case 15:eu(8,d,a)}var f=d.child;if(null!==f)f.return=d,Zs=f;else for(;null!==Zs;){var h=(d=Zs).sibling,p=d.return;if(ru(d),d===c){Zs=null;break}if(null!==h){h.return=p,Zs=h;break}Zs=p}}}var m=a.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}Zs=a}}if(0!=(2064&a.subtreeFlags)&&null!==s)s.return=a,Zs=s;else e:for(;null!==Zs;){if(0!=(2048&(a=Zs).flags))switch(a.tag){case 0:case 11:case 15:eu(9,a,a.return)}var b=a.sibling;if(null!==b){b.return=a.return,Zs=b;break e}Zs=a.return}}var y=e.current;for(Zs=y;null!==Zs;){var w=(s=Zs).child;if(0!=(2064&s.subtreeFlags)&&null!==w)w.return=s,Zs=w;else e:for(s=y;null!==Zs;){if(0!=(2048&(u=Zs).flags))try{switch(u.tag){case 0:case 11:case 15:tu(9,u)}}catch(e){Sl(u,u.return,e)}if(u===s){Zs=null;break e}var _=u.sibling;if(null!==_){_.return=u.return,Zs=_;break e}Zs=u.return}}if(Cu=o,zi(),nt&&"function"==typeof nt.onPostCommitFiberRoot)try{nt.onPostCommitFiberRoot(tt,e)}catch(e){}i=!0}return i}finally{gt=r,Mu.transition=t}}return!1}function _l(e,t,n){e=Lo(e,t=ds(0,t=ss(n,t),1),1),t=Xu(),null!==e&&(pt(e,1,t),tl(e,t))}function Sl(e,t,n){if(3===e.tag)_l(e,e,n);else for(;null!==t;){if(3===t.tag){_l(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Hu||!Hu.has(r))){t=Lo(t,e=fs(t,e=ss(n,e),1),1),e=Xu(),null!==t&&(pt(t,1,e),tl(t,e));break}}t=t.return}}function El(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Xu(),e.pingedLanes|=e.suspendedLanes&n,xu===e&&(Tu&n)===n&&(4===Lu||3===Lu&&(130023424&Tu)===Tu&&500>Ye()-zu?cl(e,0):Du|=n),tl(e,t)}function kl(e,t){0===t&&(0==(1&e.mode)?t=1:(t=st,0==(130023424&(st<<=1))&&(st=4194304)));var n=Xu();null!==(e=xo(e,t))&&(pt(e,t,n),tl(e,n))}function Ml(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),kl(e,n)}function Cl(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,o=e.memoizedState;null!==o&&(r=o.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(n(314))}null!==i&&i.delete(t),kl(e,r)}function xl(e,t){return He(e,t)}function Al(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tl(e,t,n,r){return new Al(e,t,n,r)}function Rl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Pl(e,t){var n=e.alternate;return null===n?((n=Tl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ll(e,t,r,i,o,a){var s=2;if(i=e,"function"==typeof e)Rl(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case w:return Il(r.children,o,a,t);case _:s=8,o|=8;break;case S:return(e=Tl(12,r,t,2|o)).elementType=S,e.lanes=a,e;case C:return(e=Tl(13,r,t,o)).elementType=C,e.lanes=a,e;case x:return(e=Tl(19,r,t,o)).elementType=x,e.lanes=a,e;case R:return Ol(r,o,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case E:s=10;break e;case k:s=9;break e;case M:s=11;break e;case A:s=14;break e;case T:s=16,i=null;break e}throw Error(n(130,null==e?e:typeof e,""))}return(t=Tl(s,r,t,o)).elementType=e,t.type=i,t.lanes=a,t}function Il(e,t,n,r){return(e=Tl(7,e,r,t)).lanes=n,e}function Ol(e,t,n,r){return(e=Tl(22,e,r,t)).elementType=R,e.lanes=n,e.stateNode={isHidden:!1},e}function Nl(e,t,n){return(e=Tl(6,e,null,t)).lanes=n,e}function Dl(e,t,n){return(t=Tl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bl(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ht(0),this.expirationTimes=ht(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ht(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function jl(e,t,n,r,i,o,a,s,u){return e=new Bl(e,t,n,s,u),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Tl(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},To(o),e}function zl(e){if(!e)return ki;e:{if(ze(e=e._reactInternals)!==e||1!==e.tag)throw Error(n(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ti(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(n(171))}if(1===e.tag){var r=e.type;if(Ti(r))return Li(e,r,t)}return t}function Ul(e,t,n,r,i,o,a,s,u){return(e=jl(n,r,!0,e,0,o,0,s,u)).context=zl(null),n=e.current,(o=Po(r=Xu(),i=Ju(n))).callback=null!=t?t:null,Lo(n,o,i),e.current.lanes=i,pt(e,i,r),tl(e,r),e}function Fl(e,t,n,r){var i=t.current,o=Xu(),a=Ju(i);return n=zl(n),null===t.context?t.context=n:t.pendingContext=n,(t=Po(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Lo(i,t,a))&&(el(e,i,a,o),Io(e,i,a)),a}function Kl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function ql(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Hl(e,t){ql(e,t),(e=e.alternate)&&ql(e,t)}_u=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ci.current)vs=!0;else{if(0==(e.lanes&r)&&0==(128&t.flags))return vs=!1,function(e,t,n){switch(t.tag){case 3:xs(t),co();break;case 5:ra(t);break;case 1:Ti(t.type)&&Ii(t);break;case 4:ta(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ei(mo,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ei(oa,1&oa.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Ns(e,t,n):(Ei(oa,1&oa.current),null!==(e=Ks(e,t,n))?e.sibling:null);Ei(oa,1&oa.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return Us(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ei(oa,oa.current),r)break;return null;case 22:case 23:return t.lanes=0,Ss(e,t,n)}return Ks(e,t,n)}(e,t,r);vs=0!=(131072&e.flags)}else vs=!1,to&&0!=(1048576&t.flags)&&Zi(t,qi,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Fs(e,t),e=t.pendingProps;var o=Ai(t,Mi.current);So(t,r),o=_a(null,t,i,e,o,r);var a=Sa();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ti(i)?(a=!0,Ii(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,To(t),o.updater=zo,t.stateNode=o,o._reactInternals=t,qo(t,i,e,r),t=Cs(null,t,i,!0,a,r)):(t.tag=0,to&&a&&Qi(t),bs(null,t,o,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Fs(e,t),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"==typeof e)return Rl(e)?1:0;if(null!=e){if((e=e.$$typeof)===M)return 11;if(e===A)return 14}return 2}(i),e=po(i,e),o){case 0:t=ks(null,t,i,e,r);break e;case 1:t=Ms(null,t,i,e,r);break e;case 11:t=ys(null,t,i,e,r);break e;case 14:t=ws(null,t,i,po(i.type,e),r);break e}throw Error(n(306,i,""))}return t;case 0:return i=t.type,o=t.pendingProps,ks(e,t,i,o=t.elementType===i?o:po(i,o),r);case 1:return i=t.type,o=t.pendingProps,Ms(e,t,i,o=t.elementType===i?o:po(i,o),r);case 3:e:{if(xs(t),null===e)throw Error(n(387));i=t.pendingProps,o=(a=t.memoizedState).element,Ro(e,t),No(t,i,null,r);var s=t.memoizedState;if(i=s.element,a.isDehydrated){if(a={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=As(e,t,i,r,o=ss(Error(n(423)),t));break e}if(i!==o){t=As(e,t,i,r,o=ss(Error(n(424)),t));break e}for(eo=ai(t.stateNode.containerInfo.firstChild),Ji=t,to=!0,no=null,r=Go(t,null,i,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(co(),i===o){t=Ks(e,t,r);break e}bs(e,t,i,r)}t=t.child}return t;case 5:return ra(t),null===e&&ao(t),i=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,s=o.children,Jr(i,o)?s=null:null!==a&&Jr(i,a)&&(t.flags|=32),Es(e,t),bs(e,t,s,r),t.child;case 6:return null===e&&ao(t),null;case 13:return Ns(e,t,r);case 4:return ta(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=Yo(t,null,i,r):bs(e,t,i,r),t.child;case 11:return i=t.type,o=t.pendingProps,ys(e,t,i,o=t.elementType===i?o:po(i,o),r);case 7:return bs(e,t,t.pendingProps,r),t.child;case 8:case 12:return bs(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,o=t.pendingProps,a=t.memoizedProps,s=o.value,Ei(mo,i._currentValue),i._currentValue=s,null!==a)if(ir(a.value,s)){if(a.children===o.children&&!Ci.current){t=Ks(e,t,r);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var u=a.dependencies;if(null!==u){s=a.child;for(var l=u.firstContext;null!==l;){if(l.context===i){if(1===a.tag){(l=Po(-1,r&-r)).tag=2;var c=a.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}a.lanes|=r,null!==(l=a.alternate)&&(l.lanes|=r),_o(a.return,r,t),u.lanes|=r;break}l=l.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(n(341));s.lanes|=r,null!==(u=s.alternate)&&(u.lanes|=r),_o(s,r,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}bs(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps.children,So(t,r),i=i(o=Eo(o)),t.flags|=1,bs(e,t,i,r),t.child;case 14:return o=po(i=t.type,t.pendingProps),ws(e,t,i,o=po(i.type,o),r);case 15:return _s(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:po(i,o),Fs(e,t),t.tag=1,Ti(i)?(e=!0,Ii(t)):e=!1,So(t,r),Fo(t,i,o),qo(t,i,o,r),Cs(null,t,i,!0,e,r);case 19:return Us(e,t,r);case 22:return Ss(e,t,r)}throw Error(n(156,t.tag))};var Wl="function"==typeof reportError?reportError:function(e){console.error(e)};function $l(e){this._internalRoot=e}function Vl(e){this._internalRoot=e}function Yl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Gl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Zl(){}function Ql(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=Kl(a);s.call(e)}}Fl(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Kl(a);o.call(e)}}var a=Ul(t,r,e,0,null,!1,0,"",Zl);return e._reactRootContainer=a,e[di]=a.current,zr(8===e.nodeType?e.parentNode:e),ul(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=Kl(u);s.call(e)}}var u=jl(e,0,!1,null,0,!1,0,"",Zl);return e._reactRootContainer=u,e[di]=u.current,zr(8===e.nodeType?e.parentNode:e),ul((function(){Fl(t,u,n,r)})),u}(n,t,e,i,r);return Kl(a)}Vl.prototype.render=$l.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(n(409));Fl(e,t,null,null)},Vl.prototype.unmount=$l.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;ul((function(){Fl(null,e,null,null)})),t[di]=null}},Vl.prototype.unstable_scheduleHydration=function(e){if(e){var t=_t();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rt.length&&0!==t&&t<Rt[n].priority;n++);Rt.splice(n,0,e),0===n&&Ot(e)}},bt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ut(t.pendingLanes);0!==n&&(mt(t,1|n),tl(t,Ye()),0==(6&Cu)&&(Uu=Ye()+500,zi()))}break;case 13:ul((function(){var t=xo(e,1);if(null!==t){var n=Xu();el(t,e,1,n)}})),Hl(e,1)}},yt=function(e){if(13===e.tag){var t=xo(e,134217728);null!==t&&el(t,e,134217728,Xu()),Hl(e,134217728)}},wt=function(e){if(13===e.tag){var t=Ju(e),n=xo(e,t);null!==n&&el(n,e,t,Xu()),Hl(e,t)}},_t=function(){return gt},St=function(e,t){var n=gt;try{return gt=e,t()}finally{gt=n}},ye=function(e,t,r){switch(t){case"input":if(G(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var o=bi(i);if(!o)throw Error(n(90));H(i),G(i,o)}}}break;case"textarea":ne(e,r);break;case"select":null!=(t=r.value)&&J(e,!!r.multiple,t,!1)}},Me=sl,Ce=ul;var Xl={usingClientEntryPoint:!1,Events:[gi,vi,bi,Ee,ke,sl]},Jl={findFiberByHostInstance:mi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ec={bundleType:Jl.bundleType,version:Jl.version,rendererPackageName:Jl.rendererPackageName,rendererConfig:Jl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:v.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ke(e))?null:e.stateNode},findFiberByHostInstance:Jl.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var tc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tc.isDisabled&&tc.supportsFiber)try{tt=tc.inject(ec),nt=tc}catch(se){}}return rR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xl,rR.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Yl(t))throw Error(n(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:y,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,r)},rR.createRoot=function(e,t){if(!Yl(e))throw Error(n(299));var r=!1,i="",o=Wl;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=jl(e,1,!1,null,0,r,0,i,o),e[di]=t.current,zr(8===e.nodeType?e.parentNode:e),new $l(t)},rR.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(n(188));throw e=Object.keys(e).join(","),Error(n(268,e))}return null===(e=Ke(t))?null:e.stateNode},rR.flushSync=function(e){return ul(e)},rR.hydrate=function(e,t,r){if(!Gl(t))throw Error(n(200));return Ql(null,e,t,!0,r)},rR.hydrateRoot=function(e,t,r){if(!Yl(e))throw Error(n(405));var i=null!=r&&r.hydratedSources||null,o=!1,a="",s=Wl;if(null!=r&&(!0===r.unstable_strictMode&&(o=!0),void 0!==r.identifierPrefix&&(a=r.identifierPrefix),void 0!==r.onRecoverableError&&(s=r.onRecoverableError)),t=Ul(t,null,e,1,null!=r?r:null,o,0,a,s),e[di]=t.current,zr(e),i)for(e=0;e<i.length;e++)o=(o=(r=i[e])._getVersion)(r._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new Vl(t)},rR.render=function(e,t,r){if(!Gl(t))throw Error(n(200));return Ql(null,e,t,!1,r)},rR.unmountComponentAtNode=function(e){if(!Gl(e))throw Error(n(40));return!!e._reactRootContainer&&(ul((function(){Ql(null,null,e,!1,(function(){e._reactRootContainer=null,e[di]=null}))})),!0)},rR.unstable_batchedUpdates=sl,rR.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!Gl(r))throw Error(n(200));if(null==e||void 0===e._reactInternals)throw Error(n(38));return Ql(e,t,r,!1,i)},rR.version="18.2.0-next-9e3b772b8-20220608",rR}var cR,dR,fR,hR={};function pR(){return cR||(cR=1,"production"!==je.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=ZT(),t=uR(),n=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,r=!1;function i(e){if(!r){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];a("warn",e,n)}}function o(e){if(!r){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];a("error",e,n)}}function a(e,t,r){var i=n.ReactDebugCurrentFrame.getStackAddendum();""!==i&&(t+="%s",r=r.concat([i]));var o=r.map((function(e){return String(e)}));o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}var s=0,u=1,l=2,c=3,d=4,f=5,h=6,p=7,m=8,g=9,v=10,b=11,y=12,w=13,_=14,S=15,E=16,k=17,M=18,C=19,x=21,A=22,T=23,R=24,P=25,L=!0,I=!1,O=!1,N=!1,D=!1,B=!0,j=!1,z=!1,U=!0,F=!0,K=!0,q=new Set,H={},W={};function $(e,t){V(e,t),V(e+"Capture",t)}function V(e,t){H[e]&&o("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),H[e]=t;var n=e.toLowerCase();W[n]=e,"onDoubleClick"===e&&(W.ondblclick=e);for(var r=0;r<t.length;r++)q.add(t[r])}var Y=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),G=Object.prototype.hasOwnProperty;function Z(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}function Q(e){try{return X(e),!1}catch(e){return!0}}function X(e){return""+e}function J(e,t){if(Q(e))return o("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",t,Z(e)),X(e)}function ee(e){if(Q(e))return o("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.",Z(e)),X(e)}var te=0,ne=3,re=4,ie=5,oe=6,ae=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",se=ae+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ue=new RegExp("^["+ae+"]["+se+"]*$"),le={},ce={};function de(e){return!!G.call(ce,e)||!G.call(le,e)&&(ue.test(e)?(ce[e]=!0,!0):(le[e]=!0,o("Invalid attribute name: `%s`",e),!1))}function fe(e,t,n){return null!==t?t.type===te:!n&&e.length>2&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])}function he(e,t,n,r){if(null!==n&&n.type===te)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":if(r)return!1;if(null!==n)return!n.acceptsBooleans;var i=e.toLowerCase().slice(0,5);return"data-"!==i&&"aria-"!==i;default:return!1}}function pe(e,t,n,r){if(null==t)return!0;if(he(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case ne:return!t;case re:return!1===t;case ie:return isNaN(t);case oe:return isNaN(t)||t<1}return!1}function me(e){return ve.hasOwnProperty(e)?ve[e]:null}function ge(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||t===ne||t===re,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var ve={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((function(e){ve[e]=new ge(e,te,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0],n=e[1];ve[t]=new ge(t,1,!1,n,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){ve[e]=new ge(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){ve[e]=new ge(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((function(e){ve[e]=new ge(e,ne,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){ve[e]=new ge(e,ne,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){ve[e]=new ge(e,re,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){ve[e]=new ge(e,oe,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){ve[e]=new ge(e,ie,!1,e.toLowerCase(),null,!1,!1)}));var be=/[\-\:]([a-z])/g,ye=function(e){return e[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((function(e){var t=e.replace(be,ye);ve[t]=new ge(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((function(e){var t=e.replace(be,ye);ve[t]=new ge(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(be,ye);ve[t]=new ge(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){ve[e]=new ge(e,1,!1,e.toLowerCase(),null,!1,!1)})),ve.xlinkHref=new ge("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){ve[e]=new ge(e,1,!1,e.toLowerCase(),null,!0,!0)}));var we=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,_e=!1;function Se(e){!_e&&we.test(e)&&(_e=!0,o("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(e)))}function Ee(e,t,n,r){if(r.mustUseProperty)return e[r.propertyName];J(n,t),r.sanitizeURL&&Se(""+n);var i=r.attributeName,o=null;if(r.type===re){if(e.hasAttribute(i)){var a=e.getAttribute(i);return""===a||(pe(t,n,r,!1)?a:a===""+n?n:a)}}else if(e.hasAttribute(i)){if(pe(t,n,r,!1))return e.getAttribute(i);if(r.type===ne)return n;o=e.getAttribute(i)}return pe(t,n,r,!1)?null===o?n:o:o===""+n?n:o}function ke(e,t,n,r){if(de(t)){if(!e.hasAttribute(t))return void 0===n?void 0:null;var i=e.getAttribute(t);return J(n,t),i===""+n?n:i}}function Me(e,t,n,r){var i=me(t);if(!fe(t,i,r))if(pe(t,n,i,r)&&(n=null),r||null===i){if(de(t)){var o=t;null===n?e.removeAttribute(o):(J(n,t),e.setAttribute(o,""+n))}}else if(i.mustUseProperty){var a=i.propertyName;if(null===n){var s=i.type;e[a]=s!==ne&&""}else e[a]=n}else{var u=i.attributeName,l=i.attributeNamespace;if(null===n)e.removeAttribute(u);else{var c,d=i.type;d===ne||d===re&&!0===n?c="":(J(n,u),c=""+n,i.sanitizeURL&&Se(c.toString())),l?e.setAttributeNS(l,u,c):e.setAttribute(u,c)}}}var Ce=Symbol.for("react.element"),xe=Symbol.for("react.portal"),Ae=Symbol.for("react.fragment"),Te=Symbol.for("react.strict_mode"),Re=Symbol.for("react.profiler"),Pe=Symbol.for("react.provider"),Le=Symbol.for("react.context"),Ie=Symbol.for("react.forward_ref"),Oe=Symbol.for("react.suspense"),Ne=Symbol.for("react.suspense_list"),De=Symbol.for("react.memo"),Be=Symbol.for("react.lazy"),je=Symbol.for("react.offscreen"),ze=Symbol.iterator,Ue="@@iterator";function Fe(e){if(null===e||"object"!=typeof e)return null;var t=ze&&e[ze]||e[Ue];return"function"==typeof t?t:null}var Ke,qe,He,We,$e,Ve,Ye,Ge=Object.assign,Ze=0;function Qe(){}Qe.__reactDisabledLog=!0;var Xe,Je=n.ReactCurrentDispatcher;function et(e,t,n){if(void 0===Xe)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);Xe=r&&r[1]||""}return"\n"+Xe+e}var tt,nt=!1,rt="function"==typeof WeakMap?WeakMap:Map;function it(e,t){if(!e||nt)return"";var n,r=tt.get(e);if(void 0!==r)return r;nt=!0;var i,a=Error.prepareStackTrace;Error.prepareStackTrace=void 0,i=Je.current,Je.current=null,function(){if(0===Ze){Ke=console.log,qe=console.info,He=console.warn,We=console.error,$e=console.group,Ve=console.groupCollapsed,Ye=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Qe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Ze++}();try{if(t){var s=function(){throw Error()};if(Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(s,[])}catch(e){n=e}Reflect.construct(e,[],s)}else{try{s.call()}catch(e){n=e}e.call(s.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var u=t.stack.split("\n"),l=n.stack.split("\n"),c=u.length-1,d=l.length-1;c>=1&&d>=0&&u[c]!==l[d];)d--;for(;c>=1&&d>=0;c--,d--)if(u[c]!==l[d]){if(1!==c||1!==d)do{if(c--,--d<0||u[c]!==l[d]){var f="\n"+u[c].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&tt.set(e,f),f}}while(c>=1&&d>=0);break}}}finally{nt=!1,Je.current=i,function(){if(0==--Ze){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ge({},e,{value:Ke}),info:Ge({},e,{value:qe}),warn:Ge({},e,{value:He}),error:Ge({},e,{value:We}),group:Ge({},e,{value:$e}),groupCollapsed:Ge({},e,{value:Ve}),groupEnd:Ge({},e,{value:Ye})})}Ze<0&&o("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=a}var h=e?e.displayName||e.name:"",p=h?et(h):"";return"function"==typeof e&&tt.set(e,p),p}function ot(e,t,n){return it(e,!1)}function at(e,t,n){if(null==e)return"";if("function"==typeof e)return it(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return et(e);switch(e){case Oe:return et("Suspense");case Ne:return et("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case Ie:return ot(e.render);case De:return at(e.type,t,n);case Be:var i=e,o=i._payload,a=i._init;try{return at(a(o),t,n)}catch(e){}}return""}function st(e){switch(e._debugOwner&&e._debugOwner.type,e._debugSource,e.tag){case f:return et(e.type);case E:return et("Lazy");case w:return et("Suspense");case C:return et("SuspenseList");case s:case l:case S:return ot(e.type);case b:return ot(e.type.render);case u:return it(e.type,!0);default:return""}}function ut(e){try{var t="",n=e;do{t+=st(n),n=n.return}while(n);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}function lt(e){return e.displayName||"Context"}function ct(e){if(null==e)return null;if("number"==typeof e.tag&&o("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Ae:return"Fragment";case xe:return"Portal";case Re:return"Profiler";case Te:return"StrictMode";case Oe:return"Suspense";case Ne:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Le:return lt(e)+".Consumer";case Pe:return lt(e._context)+".Provider";case Ie:return function(e,t,n){var r=e.displayName;if(r)return r;var i=t.displayName||t.name||"";return""!==i?n+"("+i+")":n}(e,e.render,"ForwardRef");case De:var t=e.displayName||null;return null!==t?t:ct(e.type)||"Memo";case Be:var n=e,r=n._payload,i=n._init;try{return ct(i(r))}catch(e){return null}}return null}function dt(e){return e.displayName||"Context"}function ft(e){var t,n,r,i,o=e.tag,a=e.type;switch(o){case R:return"Cache";case g:return dt(a)+".Consumer";case v:return dt(a._context)+".Provider";case M:return"DehydratedFragment";case b:return t=a,r="ForwardRef",i=(n=a.render).displayName||n.name||"",t.displayName||(""!==i?r+"("+i+")":r);case p:return"Fragment";case f:return a;case d:return"Portal";case c:return"Root";case h:return"Text";case E:return ct(a);case m:return a===Te?"StrictMode":"Mode";case A:return"Offscreen";case y:return"Profiler";case x:return"Scope";case w:return"Suspense";case C:return"SuspenseList";case P:return"TracingMarker";case u:case s:case k:case l:case _:case S:if("function"==typeof a)return a.displayName||a.name||null;if("string"==typeof a)return a}return null}tt=new rt;var ht=n.ReactDebugCurrentFrame,pt=null,mt=!1;function gt(){if(null===pt)return null;var e=pt._debugOwner;return null!=e?ft(e):null}function vt(){return null===pt?"":ut(pt)}function bt(){ht.getCurrentStack=null,pt=null,mt=!1}function yt(e){ht.getCurrentStack=null===e?null:vt,pt=e,mt=!1}function wt(e){mt=e}function _t(e){return""+e}function St(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return ee(e),e;default:return""}}var Et={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function kt(e,t){Et[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||null==t.value||o("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),t.onChange||t.readOnly||t.disabled||null==t.checked||o("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function Mt(e){var t=e.type,n=e.nodeName;return n&&"input"===n.toLowerCase()&&("checkbox"===t||"radio"===t)}function Ct(e){return e._valueTracker}function xt(e){Ct(e)||(e._valueTracker=function(e){var t=Mt(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);ee(e[t]);var r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){ee(e),r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable});var a={getValue:function(){return r},setValue:function(e){ee(e),r=""+e},stopTracking:function(){!function(e){e._valueTracker=null}(e),delete e[t]}};return a}}(e))}function At(e){if(!e)return!1;var t=Ct(e);if(!t)return!0;var n=t.getValue(),r=function(e){var t="";return e?t=Mt(e)?e.checked?"true":"false":e.value:t}(e);return r!==n&&(t.setValue(r),!0)}function Tt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var Rt=!1,Pt=!1,Lt=!1,It=!1;function Ot(e){return"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}function Nt(e,t){var n=e,r=t.checked;return Ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:n._wrapperState.initialChecked})}function Dt(e,t){kt(0,t),void 0===t.checked||void 0===t.defaultChecked||Pt||(o("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",gt()||"A component",t.type),Pt=!0),void 0===t.value||void 0===t.defaultValue||Rt||(o("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",gt()||"A component",t.type),Rt=!0);var n=e,r=null==t.defaultValue?"":t.defaultValue;n._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:St(null!=t.value?t.value:r),controlled:Ot(t)}}function Bt(e,t){var n=e,r=t.checked;null!=r&&Me(n,"checked",r,!1)}function jt(e,t){var n=e,r=Ot(t);n._wrapperState.controlled||!r||It||(o("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),It=!0),!n._wrapperState.controlled||r||Lt||(o("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),Lt=!0),Bt(e,t);var i=St(t.value),a=t.type;if(null!=i)"number"===a?(0===i&&""===n.value||n.value!=i)&&(n.value=_t(i)):n.value!==_t(i)&&(n.value=_t(i));else if("submit"===a||"reset"===a)return void n.removeAttribute("value");t.hasOwnProperty("value")?Ft(n,t.type,i):t.hasOwnProperty("defaultValue")&&Ft(n,t.type,St(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(n.defaultChecked=!!t.defaultChecked)}function zt(e,t,n){var r=e;if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!("submit"!==i&&"reset"!==i||void 0!==t.value&&null!==t.value))return;var o=_t(r._wrapperState.initialValue);n||o!==r.value&&(r.value=o),r.defaultValue=o}var a=r.name;""!==a&&(r.name=""),r.defaultChecked=!r.defaultChecked,r.defaultChecked=!!r._wrapperState.initialChecked,""!==a&&(r.name=a)}function Ut(e,t){var n=e;jt(n,t),function(e,t){var n=t.name;if("radio"===t.type&&null!=n){for(var r=e;r.parentNode;)r=r.parentNode;J(n,"name");for(var i=r.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),o=0;o<i.length;o++){var a=i[o];if(a!==e&&a.form===e.form){var s=Gc(a);if(!s)throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");At(a),jt(a,s)}}}}(n,t)}function Ft(e,t,n){"number"===t&&Tt(e.ownerDocument)===e||(null==n?e.defaultValue=_t(e._wrapperState.initialValue):e.defaultValue!==_t(n)&&(e.defaultValue=_t(n)))}var Kt=!1,qt=!1,Ht=!1;function Wt(t,n){null==n.value&&("object"==typeof n.children&&null!==n.children?e.Children.forEach(n.children,(function(e){null!=e&&"string"!=typeof e&&"number"!=typeof e&&(qt||(qt=!0,o("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))})):null!=n.dangerouslySetInnerHTML&&(Ht||(Ht=!0,o("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")))),null==n.selected||Kt||(o("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),Kt=!0)}var $t,Vt=Array.isArray;function Yt(e){return Vt(e)}function Gt(){var e=gt();return e?"\n\nCheck the render method of `"+e+"`.":""}$t=!1;var Zt=["value","defaultValue"];function Qt(e,t,n,r){var i=e.options;if(t){for(var o=n,a={},s=0;s<o.length;s++)a["$"+o[s]]=!0;for(var u=0;u<i.length;u++){var l=a.hasOwnProperty("$"+i[u].value);i[u].selected!==l&&(i[u].selected=l),l&&r&&(i[u].defaultSelected=!0)}}else{for(var c=_t(St(n)),d=null,f=0;f<i.length;f++){if(i[f].value===c)return i[f].selected=!0,void(r&&(i[f].defaultSelected=!0));null!==d||i[f].disabled||(d=i[f])}null!==d&&(d.selected=!0)}}function Xt(e,t){return Ge({},t,{value:void 0})}function Jt(e,t){var n=e;!function(e){kt(0,e);for(var t=0;t<Zt.length;t++){var n=Zt[t];if(null!=e[n]){var r=Yt(e[n]);e.multiple&&!r?o("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",n,Gt()):!e.multiple&&r&&o("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",n,Gt())}}}(t),n._wrapperState={wasMultiple:!!t.multiple},void 0===t.value||void 0===t.defaultValue||$t||(o("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),$t=!0)}var en=!1;function tn(e,t){var n=e;if(null!=t.dangerouslySetInnerHTML)throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");return Ge({},t,{value:void 0,defaultValue:void 0,children:_t(n._wrapperState.initialValue)})}function nn(e,t){var n=e;kt(0,t),void 0===t.value||void 0===t.defaultValue||en||(o("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",gt()||"A component"),en=!0);var r=t.value;if(null==r){var i=t.children,a=t.defaultValue;if(null!=i){if(o("Use the `defaultValue` or `value` props instead of setting children on <textarea>."),null!=a)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Yt(i)){if(i.length>1)throw new Error("<textarea> can only have at most one child.");i=i[0]}a=i}null==a&&(a=""),r=a}n._wrapperState={initialValue:St(r)}}function rn(e,t){var n=e,r=St(t.value),i=St(t.defaultValue);if(null!=r){var o=_t(r);o!==n.value&&(n.value=o),null==t.defaultValue&&n.defaultValue!==o&&(n.defaultValue=o)}null!=i&&(n.defaultValue=_t(i))}function on(e,t){var n=e,r=n.textContent;r===n._wrapperState.initialValue&&""!==r&&null!==r&&(n.value=r)}var an="http://www.w3.org/1999/xhtml",sn="http://www.w3.org/1998/Math/MathML",un="http://www.w3.org/2000/svg";function ln(e){switch(e){case"svg":return un;case"math":return sn;default:return an}}function cn(e,t){return null==e||e===an?ln(t):e===un&&"foreignObject"===t?an:e}var dn,fn,hn=(fn=function(e,t){if(e.namespaceURI!==un||"innerHTML"in e)e.innerHTML=t;else{(dn=dn||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>";for(var n=dn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return fn(e,t,n,r)}))}:fn),pn=1,mn=3,gn=8,vn=9,bn=11,yn=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===mn)return void(n.nodeValue=t)}e.textContent=t},wn={animation:["animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction"],background:["backgroundAttachment","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize"],backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:["borderBottomColor","borderBottomStyle","borderBottomWidth","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRightColor","borderRightStyle","borderRightWidth","borderTopColor","borderTopStyle","borderTopWidth"],borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:["fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontWeight","lineHeight"],fontVariant:["fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition"],gap:["columnGap","rowGap"],grid:["gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:["maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPositionX","maskPositionY","maskRepeat","maskSize"],maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},_n={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Sn=["Webkit","ms","Moz","O"];function En(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||_n.hasOwnProperty(e)&&_n[e]?(function(e,t){Q(e)&&o("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",t,Z(e))}(t,e),(""+t).trim()):t+"px"}Object.keys(_n).forEach((function(e){Sn.forEach((function(t){_n[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(t,e)]=_n[e]}))}));var kn=/([A-Z])/g,Mn=/^ms-/;function Cn(e){return e.replace(kn,"-$1").toLowerCase().replace(Mn,"-ms-")}var xn,An=/^(?:webkit|moz|o)[A-Z]/,Tn=/^-ms-/,Rn=/-(.)/g,Pn=/;\s*$/,Ln={},In={},On=!1,Nn=!1,Dn=function(e){Ln.hasOwnProperty(e)&&Ln[e]||(Ln[e]=!0,o("Unsupported style property %s. Did you mean %s?",e,function(e){return e.replace(Rn,(function(e,t){return t.toUpperCase()}))}(e.replace(Tn,"ms-"))))};xn=function(e,t){e.indexOf("-")>-1?Dn(e):An.test(e)?function(e){Ln.hasOwnProperty(e)&&Ln[e]||(Ln[e]=!0,o("Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)))}(e):Pn.test(t)&&function(e,t){In.hasOwnProperty(t)&&In[t]||(In[t]=!0,o('Style property values shouldn\'t contain a semicolon. Try "%s: %s" instead.',e,t.replace(Pn,"")))}(e,t),"number"==typeof t&&(isNaN(t)?function(e,t){On||(On=!0,o("`NaN` is an invalid value for the `%s` css style property.",e))}(e):isFinite(t)||function(e,t){Nn||(Nn=!0,o("`Infinity` is an invalid value for the `%s` css style property.",e))}(e))};var Bn=xn;function jn(e){var t="",n="";for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];if(null!=i){var o=0===r.indexOf("--");t+=n+(o?r:Cn(r))+":",t+=En(r,i,o),n=";"}}return t||null}function zn(e,t){var n=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=0===r.indexOf("--");i||Bn(r,t[r]);var o=En(r,t[r],i);"float"===r&&(r="cssFloat"),i?n.setProperty(r,o):n[r]=o}}function Un(e){return null==e||"boolean"==typeof e||""===e}function Fn(e){var t={};for(var n in e)for(var r=wn[n]||[n],i=0;i<r.length;i++)t[r[i]]=n;return t}var Kn=Ge({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),qn="__html";function Hn(e,t){if(t){if(Kn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw new Error(e+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if("object"!=typeof t.dangerouslySetInnerHTML||!(qn in t.dangerouslySetInnerHTML))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.")}if(!t.suppressContentEditableWarning&&t.contentEditable&&null!=t.children&&o("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),null!=t.style&&"object"!=typeof t.style)throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.")}}function Wn(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $n={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},Vn={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},Yn={},Gn=new RegExp("^(aria)-["+se+"]*$"),Zn=new RegExp("^(aria)[A-Z]["+se+"]*$");function Qn(e,t){if(G.call(Yn,t)&&Yn[t])return!0;if(Zn.test(t)){var n="aria-"+t.slice(4).toLowerCase(),r=Vn.hasOwnProperty(n)?n:null;if(null==r)return o("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),Yn[t]=!0,!0;if(t!==r)return o("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,r),Yn[t]=!0,!0}if(Gn.test(t)){var i=t.toLowerCase(),a=Vn.hasOwnProperty(i)?i:null;if(null==a)return Yn[t]=!0,!1;if(t!==a)return o("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,a),Yn[t]=!0,!0}return!0}function Xn(e,t){Wn(e,t)||function(e,t){var n=[];for(var r in t)Qn(0,r)||n.push(r);var i=n.map((function(e){return"`"+e+"`"})).join(", ");1===n.length?o("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",i,e):n.length>1&&o("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",i,e)}(e,t)}var Jn,er=!1,tr={},nr=/^on./,rr=/^on[^A-Z]/,ir=new RegExp("^(aria)-["+se+"]*$"),or=new RegExp("^(aria)[A-Z]["+se+"]*$");function ar(e,t,n){Wn(e,t)||function(e,t,n){var r=[];for(var i in t)Jn(0,i,t[i],n)||r.push(i);var a=r.map((function(e){return"`"+e+"`"})).join(", ");1===r.length?o("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",a,e):r.length>1&&o("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",a,e)}(e,t,n)}Jn=function(e,t,n,r){if(G.call(tr,t)&&tr[t])return!0;var i=t.toLowerCase();if("onfocusin"===i||"onfocusout"===i)return o("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),tr[t]=!0,!0;if(null!=r){var a=r.registrationNameDependencies,s=r.possibleRegistrationNames;if(a.hasOwnProperty(t))return!0;var u=s.hasOwnProperty(i)?s[i]:null;if(null!=u)return o("Invalid event handler property `%s`. Did you mean `%s`?",t,u),tr[t]=!0,!0;if(nr.test(t))return o("Unknown event handler property `%s`. It will be ignored.",t),tr[t]=!0,!0}else if(nr.test(t))return rr.test(t)&&o("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),tr[t]=!0,!0;if(ir.test(t)||or.test(t))return!0;if("innerhtml"===i)return o("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),tr[t]=!0,!0;if("aria"===i)return o("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),tr[t]=!0,!0;if("is"===i&&null!=n&&"string"!=typeof n)return o("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof n),tr[t]=!0,!0;if("number"==typeof n&&isNaN(n))return o("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),tr[t]=!0,!0;var l=me(t),c=null!==l&&l.type===te;if($n.hasOwnProperty(i)){var d=$n[i];if(d!==t)return o("Invalid DOM property `%s`. Did you mean `%s`?",t,d),tr[t]=!0,!0}else if(!c&&t!==i)return o("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",t,i),tr[t]=!0,!0;return"boolean"==typeof n&&he(t,n,l,!1)?(n?o('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',n,t,t,n,t):o('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',n,t,t,n,t,t,t),tr[t]=!0,!0):!!c||(he(t,n,l,!1)?(tr[t]=!0,!1):("false"!==n&&"true"!==n||null===l||l.type!==ne||(o("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",n,t,"false"===n?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',t,n),tr[t]=!0),!0))};var sr=1,ur=2,lr=4,cr=sr|ur|lr,dr=null;function fr(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===mn?t.parentNode:t}var hr=null,pr=null,mr=null;function gr(e){var t=Vc(e);if(t){if("function"!=typeof hr)throw new Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var n=t.stateNode;if(n){var r=Gc(n);hr(t.stateNode,t.type,r)}}}function vr(e){pr?mr?mr.push(e):mr=[e]:pr=e}function br(){if(pr){var e=pr,t=mr;if(pr=null,mr=null,gr(e),t)for(var n=0;n<t.length;n++)gr(t[n])}}var yr=function(e,t){return e(t)},wr=function(){},_r=!1;function Sr(){(null!==pr||null!==mr)&&(wr(),br())}function Er(e,t,n){if(_r)return e(t,n);_r=!0;try{return yr(e,t,n)}finally{_r=!1,Sr()}}function kr(e,t){var n=e.stateNode;if(null===n)return null;var r=Gc(n);if(null===r)return null;var i=r[t];if(function(e,t,n){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":return!(!n.disabled||(r=t,"button"!==r&&"input"!==r&&"select"!==r&&"textarea"!==r));default:return!1}var r}(t,e.type,r))return null;if(i&&"function"!=typeof i)throw new Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof i+"` type.");return i}var Mr=!1;if(Y)try{var Cr={};Object.defineProperty(Cr,"passive",{get:function(){Mr=!0}}),window.addEventListener("test",Cr,Cr),window.removeEventListener("test",Cr,Cr)}catch(e){Mr=!1}function xr(e,t,n,r,i,o,a,s,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var Ar=xr;if("undefined"!=typeof window&&"function"==typeof window.dispatchEvent&&"undefined"!=typeof document&&"function"==typeof document.createEvent){var Tr=document.createElement("react");Ar=function(e,t,n,r,i,o,a,s,u){if("undefined"==typeof document||null===document)throw new Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var l=document.createEvent("Event"),c=!1,d=!0,f=window.event,h=Object.getOwnPropertyDescriptor(window,"event");function p(){Tr.removeEventListener(_,v,!1),void 0!==window.event&&window.hasOwnProperty("event")&&(window.event=f)}var m,g=Array.prototype.slice.call(arguments,3);function v(){c=!0,p(),t.apply(n,g),d=!1}var b=!1,y=!1;function w(e){if(m=e.error,b=!0,null===m&&0===e.colno&&0===e.lineno&&(y=!0),e.defaultPrevented&&null!=m&&"object"==typeof m)try{m._suppressLogging=!0}catch(e){}}var _="react-"+(e||"invokeguardedcallback");if(window.addEventListener("error",w),Tr.addEventListener(_,v,!1),l.initEvent(_,!1,!1),Tr.dispatchEvent(l),h&&Object.defineProperty(window,"event",h),c&&d&&(b?y&&(m=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.")):m=new Error("An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the \"Pause on exceptions\" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue."),this.onError(m)),window.removeEventListener("error",w),!c)return p(),xr.apply(this,arguments)}}var Rr=Ar,Pr=!1,Lr=null,Ir=!1,Or=null,Nr={onError:function(e){Pr=!0,Lr=e}};function Dr(e,t,n,r,i,o,a,s,u){Pr=!1,Lr=null,Rr.apply(Nr,arguments)}function Br(){if(Pr){var e=Lr;return Pr=!1,Lr=null,e}throw new Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function jr(e){return e._reactInternals}var zr=0,Ur=1,Fr=2,Kr=4,qr=16,Hr=32,Wr=64,$r=128,Vr=256,Yr=512,Gr=1024,Zr=2048,Qr=4096,Xr=8192,Jr=16384,ei=Zr|Kr|Wr|Yr|Gr|Jr,ti=32767,ni=32768,ri=65536,ii=131072,oi=1048576,ai=2097152,si=4194304,ui=8388608,li=16777216,ci=33554432,di=Kr|Gr|0,fi=Fr|Kr|qr|Hr|Yr|Qr|Xr,hi=Kr|Wr|Yr|Xr,pi=Zr|qr,mi=si|ui|ai,gi=n.ReactCurrentOwner;function vi(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{var r=t;do{((t=r).flags&(Fr|Qr))!==zr&&(n=t.return),r=t.return}while(r)}return t.tag===c?n:null}function bi(e){if(e.tag===w){var t=e.memoizedState;if(null===t){var n=e.alternate;null!==n&&(t=n.memoizedState)}if(null!==t)return t.dehydrated}return null}function yi(e){return e.tag===c?e.stateNode.containerInfo:null}function wi(e){if(vi(e)!==e)throw new Error("Unable to find node on an unmounted component.")}function _i(e){var t=e.alternate;if(!t){var n=vi(e);if(null===n)throw new Error("Unable to find node on an unmounted component.");return n!==e?null:e}for(var r=e,i=t;;){var o=r.return;if(null===o)break;var a=o.alternate;if(null===a){var s=o.return;if(null!==s){r=i=s;continue}break}if(o.child===a.child){for(var u=o.child;u;){if(u===r)return wi(o),e;if(u===i)return wi(o),t;u=u.sibling}throw new Error("Unable to find node on an unmounted component.")}if(r.return!==i.return)r=o,i=a;else{for(var l=!1,d=o.child;d;){if(d===r){l=!0,r=o,i=a;break}if(d===i){l=!0,i=o,r=a;break}d=d.sibling}if(!l){for(d=a.child;d;){if(d===r){l=!0,r=a,i=o;break}if(d===i){l=!0,i=a,r=o;break}d=d.sibling}if(!l)throw new Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(r.alternate!==i)throw new Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(r.tag!==c)throw new Error("Unable to find node on an unmounted component.");return r.stateNode.current===r?e:t}function Si(e){var t=_i(e);return null!==t?Ei(t):null}function Ei(e){if(e.tag===f||e.tag===h)return e;for(var t=e.child;null!==t;){var n=Ei(t);if(null!==n)return n;t=t.sibling}return null}function ki(e){var t=_i(e);return null!==t?Mi(t):null}function Mi(e){if(e.tag===f||e.tag===h)return e;for(var t=e.child;null!==t;){if(t.tag!==d){var n=Mi(t);if(null!==n)return n}t=t.sibling}return null}var Ci=t.unstable_scheduleCallback,xi=t.unstable_cancelCallback,Ai=t.unstable_shouldYield,Ti=t.unstable_requestPaint,Ri=t.unstable_now,Pi=t.unstable_getCurrentPriorityLevel,Li=t.unstable_ImmediatePriority,Ii=t.unstable_UserBlockingPriority,Oi=t.unstable_NormalPriority,Ni=t.unstable_LowPriority,Di=t.unstable_IdlePriority,Bi=t.unstable_yieldValue,ji=t.unstable_setDisableYieldValue,zi=null,Ui=null,Fi=null,Ki=!1,qi="undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;function Hi(e){if("function"==typeof Bi&&(ji(e),r=e),Ui&&"function"==typeof Ui.setStrictMode)try{Ui.setStrictMode(zi,e)}catch(e){Ki||(Ki=!0,o("React instrumentation encountered an error: %s",e))}}function Wi(e){Fi=e}function $i(){for(var e=new Map,t=1,n=0;n<ho;n++){var r=Qo(t);e.set(t,r),t*=2}return e}function Vi(){null!==Fi&&"function"==typeof Fi.markCommitStopped&&Fi.markCommitStopped()}function Yi(e){null!==Fi&&"function"==typeof Fi.markComponentRenderStarted&&Fi.markComponentRenderStarted(e)}function Gi(){null!==Fi&&"function"==typeof Fi.markComponentRenderStopped&&Fi.markComponentRenderStopped()}function Zi(e){null!==Fi&&"function"==typeof Fi.markComponentLayoutEffectMountStarted&&Fi.markComponentLayoutEffectMountStarted(e)}function Qi(e){null!==Fi&&"function"==typeof Fi.markComponentLayoutEffectUnmountStarted&&Fi.markComponentLayoutEffectUnmountStarted(e)}function Xi(){null!==Fi&&"function"==typeof Fi.markComponentLayoutEffectUnmountStopped&&Fi.markComponentLayoutEffectUnmountStopped()}function Ji(e,t,n){null!==Fi&&"function"==typeof Fi.markComponentErrored&&Fi.markComponentErrored(e,t,n)}function eo(e,t,n){null!==Fi&&"function"==typeof Fi.markComponentSuspended&&Fi.markComponentSuspended(e,t,n)}function to(e){null!==Fi&&"function"==typeof Fi.markRenderStarted&&Fi.markRenderStarted(e)}function no(){null!==Fi&&"function"==typeof Fi.markRenderStopped&&Fi.markRenderStopped()}function ro(e,t){null!==Fi&&"function"==typeof Fi.markStateUpdateScheduled&&Fi.markStateUpdateScheduled(e,t)}var io=0,oo=1,ao=2,so=8,uo=16,lo=Math.clz32?Math.clz32:function(e){var t=e>>>0;return 0===t?32:31-(co(t)/fo|0)|0},co=Math.log,fo=Math.LN2,ho=31,po=0,mo=0,go=1,vo=2,bo=4,yo=8,wo=16,_o=32,So=4194240,Eo=64,ko=128,Mo=256,Co=512,xo=1024,Ao=2048,To=4096,Ro=8192,Po=16384,Lo=32768,Io=65536,Oo=131072,No=262144,Do=524288,Bo=1048576,jo=2097152,zo=130023424,Uo=4194304,Fo=8388608,Ko=16777216,qo=33554432,Ho=67108864,Wo=Uo,$o=134217728,Vo=268435455,Yo=268435456,Go=536870912,Zo=1073741824;function Qo(e){return e&go?"Sync":e&vo?"InputContinuousHydration":e&bo?"InputContinuous":e&yo?"DefaultHydration":e&wo?"Default":e&_o?"TransitionHydration":e&So?"Transition":e&zo?"Retry":e&$o?"SelectiveHydration":e&Yo?"IdleHydration":e&Go?"Idle":e&Zo?"Offscreen":void 0}var Xo=-1,Jo=Eo,ea=Uo;function ta(e){switch(ca(e)){case go:return go;case vo:return vo;case bo:return bo;case yo:return yo;case wo:return wo;case _o:return _o;case Eo:case ko:case Mo:case Co:case xo:case Ao:case To:case Ro:case Po:case Lo:case Io:case Oo:case No:case Do:case Bo:case jo:return e&So;case Uo:case Fo:case Ko:case qo:case Ho:return e&zo;case $o:return $o;case Yo:return Yo;case Go:return Go;case Zo:return Zo;default:return o("Should have found matching lanes. This is a bug in React."),e}}function na(e,t){var n=e.pendingLanes;if(n===po)return po;var r=po,i=e.suspendedLanes,o=e.pingedLanes,a=n&Vo;if(a!==po){var s=a&~i;if(s!==po)r=ta(s);else{var u=a&o;u!==po&&(r=ta(u))}}else{var l=n&~i;l!==po?r=ta(l):o!==po&&(r=ta(o))}if(r===po)return po;if(t!==po&&t!==r&&(t&i)===po){var c=ca(r),d=ca(t);if(c>=d||c===wo&&(d&So)!==po)return t}(r&bo)!==po&&(r|=n&wo);var f=e.entangledLanes;if(f!==po)for(var h=e.entanglements,p=r&f;p>0;){var m=fa(p),g=1<<m;r|=h[m],p&=~g}return r}function ra(e,t){switch(e){case go:case vo:case bo:return t+250;case yo:case wo:case _o:case Eo:case ko:case Mo:case Co:case xo:case Ao:case To:case Ro:case Po:case Lo:case Io:case Oo:case No:case Do:case Bo:case jo:return t+5e3;case Uo:case Fo:case Ko:case qo:case Ho:case $o:case Yo:case Go:case Zo:return Xo;default:return o("Should have found matching lanes. This is a bug in React."),Xo}}function ia(e){var t=e.pendingLanes&~Zo;return t!==po?t:t&Zo?Zo:po}function oa(e){return(e&Vo)!==po}function aa(e){return(e&zo)===e}function sa(e,t){return(t&(vo|bo|yo|wo))!==po}function ua(e){return(e&So)!==po}function la(){var e=Jo;return((Jo<<=1)&So)===po&&(Jo=Eo),e}function ca(e){return e&-e}function da(e){return ca(e)}function fa(e){return 31-lo(e)}function ha(e){return fa(e)}function pa(e,t){return(e&t)!==po}function ma(e,t){return(e&t)===t}function ga(e,t){return e|t}function va(e,t){return e&~t}function ba(e,t){return e&t}function ya(e){for(var t=[],n=0;n<ho;n++)t.push(e);return t}function wa(e,t,n){e.pendingLanes|=t,t!==Go&&(e.suspendedLanes=po,e.pingedLanes=po),e.eventTimes[ha(t)]=n}function _a(e,t,n){e.pingedLanes|=e.suspendedLanes&t}function Sa(e,t){for(var n=e.entangledLanes|=t,r=e.entanglements,i=n;i;){var o=fa(i),a=1<<o;a&t|r[o]&t&&(r[o]|=t),i&=~a}}function Ea(e,t,n){if(qi)for(var r=e.pendingUpdatersLaneMap;n>0;){var i=ha(n),o=1<<i;r[i].add(t),n&=~o}}function ka(e,t){if(qi)for(var n=e.pendingUpdatersLaneMap,r=e.memoizedUpdaters;t>0;){var i=ha(t),o=1<<i,a=n[i];a.size>0&&(a.forEach((function(e){var t=e.alternate;null!==t&&r.has(t)||r.add(e)})),a.clear()),t&=~o}}var Ma,Ca,xa,Aa,Ta,Ra=go,Pa=bo,La=wo,Ia=Go,Oa=mo;function Na(){return Oa}function Da(e){Oa=e}function Ba(e,t){return 0!==e&&e<t}function ja(e){var t=ca(e);return Ba(Ra,t)?Ba(Pa,t)?oa(t)?La:Ia:Pa:Ra}function za(e){return e.current.memoizedState.isDehydrated}function Ua(e){Ma(e)}var Fa=!1,Ka=[],qa=null,Ha=null,Wa=null,$a=new Map,Va=new Map,Ya=[],Ga=["mousedown","mouseup","touchcancel","touchend","touchstart","auxclick","dblclick","pointercancel","pointerdown","pointerup","dragend","dragstart","drop","compositionend","compositionstart","keydown","keypress","keyup","input","textInput","copy","cut","paste","click","change","contextmenu","reset","submit"];function Za(e,t){switch(e){case"focusin":case"focusout":qa=null;break;case"dragenter":case"dragleave":Ha=null;break;case"mouseover":case"mouseout":Wa=null;break;case"pointerover":case"pointerout":var n=t.pointerId;$a.delete(n);break;case"gotpointercapture":case"lostpointercapture":var r=t.pointerId;Va.delete(r)}}function Qa(e,t,n,r,i,o){if(null===e||e.nativeEvent!==o){var a=function(e,t,n,r,i){return{blockedOn:e,domEventName:t,eventSystemFlags:n,nativeEvent:i,targetContainers:[r]}}(t,n,r,i,o);if(null!==t){var s=Vc(t);null!==s&&Ca(s)}return a}e.eventSystemFlags|=r;var u=e.targetContainers;return null!==i&&-1===u.indexOf(i)&&u.push(i),e}function Xa(e){var t=$c(e.target);if(null!==t){var n=vi(t);if(null!==n){var r=n.tag;if(r===w){var i=bi(n);if(null!==i)return e.blockedOn=i,void Ta(e.priority,(function(){xa(n)}))}else if(r===c&&za(n.stateNode))return void(e.blockedOn=yi(n))}}e.blockedOn=null}function Ja(e){if(null!==e.blockedOn)return!1;for(var t,n=e.targetContainers;n.length>0;){var r=n[0],i=ds(e.domEventName,e.eventSystemFlags,r,e.nativeEvent);if(null!==i){var a=Vc(i);return null!==a&&Ca(a),e.blockedOn=i,!1}var s=e.nativeEvent,u=new s.constructor(s.type,s);t=u,null!==dr&&o("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),dr=t,s.target.dispatchEvent(u),null===dr&&o("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),dr=null,n.shift()}return!0}function es(e,t,n){Ja(e)&&n.delete(t)}function ts(){Fa=!1,null!==qa&&Ja(qa)&&(qa=null),null!==Ha&&Ja(Ha)&&(Ha=null),null!==Wa&&Ja(Wa)&&(Wa=null),$a.forEach(es),Va.forEach(es)}function ns(e,n){e.blockedOn===n&&(e.blockedOn=null,Fa||(Fa=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,ts)))}function rs(e){if(Ka.length>0){ns(Ka[0],e);for(var t=1;t<Ka.length;t++){var n=Ka[t];n.blockedOn===e&&(n.blockedOn=null)}}null!==qa&&ns(qa,e),null!==Ha&&ns(Ha,e),null!==Wa&&ns(Wa,e);var r=function(t){return ns(t,e)};$a.forEach(r),Va.forEach(r);for(var i=0;i<Ya.length;i++){var o=Ya[i];o.blockedOn===e&&(o.blockedOn=null)}for(;Ya.length>0;){var a=Ya[0];if(null!==a.blockedOn)break;Xa(a),null===a.blockedOn&&Ya.shift()}}var is=n.ReactCurrentBatchConfig,os=!0;function as(e){os=!!e}function ss(e,t,n,r){var i=Na(),o=is.transition;is.transition=null;try{Da(Ra),ls(e,t,n,r)}finally{Da(i),is.transition=o}}function us(e,t,n,r){var i=Na(),o=is.transition;is.transition=null;try{Da(Pa),ls(e,t,n,r)}finally{Da(i),is.transition=o}}function ls(e,t,n,r){os&&function(e,t,n,r){var i=ds(e,t,n,r);if(null===i)return bl(e,t,r,cs,n),void Za(e,r);if(function(e,t,n,r,i){switch(t){case"focusin":return qa=Qa(qa,e,t,n,r,i),!0;case"dragenter":return Ha=Qa(Ha,e,t,n,r,i),!0;case"mouseover":return Wa=Qa(Wa,e,t,n,r,i),!0;case"pointerover":var o=i,a=o.pointerId;return $a.set(a,Qa($a.get(a)||null,e,t,n,r,o)),!0;case"gotpointercapture":var s=i,u=s.pointerId;return Va.set(u,Qa(Va.get(u)||null,e,t,n,r,s)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Za(e,r),t&lr&&function(e){return Ga.indexOf(e)>-1}(e)){for(;null!==i;){var o=Vc(i);null!==o&&Ua(o);var a=ds(e,t,n,r);if(null===a&&bl(e,t,r,cs,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else bl(e,t,r,null,n)}(e,t,n,r)}var cs=null;function ds(e,t,n,r){cs=null;var i=$c(fr(r));if(null!==i){var o=vi(i);if(null===o)i=null;else{var a=o.tag;if(a===w){var s=bi(o);if(null!==s)return s;i=null}else if(a===c){if(za(o.stateNode))return yi(o);i=null}else o!==i&&(i=null)}}return cs=i,null}function fs(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return Ra;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return Pa;case"message":switch(Pi()){case Li:return Ra;case Ii:return Pa;case Oi:case Ni:return La;case Di:return Ia;default:return La}default:return La}}var hs=null,ps=null,ms=null;function gs(){if(ms)return ms;var e,t,n=ps,r=n.length,i=vs(),o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);var s=t>1?1-t:void 0;return ms=i.slice(e,s)}function vs(){return"value"in hs?hs.value:hs.textContent}function bs(e){var t,n=e.keyCode;return"charCode"in e?0===(t=e.charCode)&&13===n&&(t=13):t=n,10===t&&(t=13),t>=32||13===t?t:0}function ys(){return!0}function ws(){return!1}function _s(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)if(e.hasOwnProperty(a)){var s=e[a];this[a]=s?s(i):i[a]}var u=null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue;return this.isDefaultPrevented=u?ys:ws,this.isPropagationStopped=ws,this}return Ge(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ys)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ys)},persist:function(){},isPersistent:ys}),t}var Ss,Es,ks,Ms={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cs=_s(Ms),xs=Ge({},Ms,{view:0,detail:0}),As=_s(xs),Ts=Ge({},xs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fs,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(function(e){e!==ks&&(ks&&"mousemove"===e.type?(Ss=e.screenX-ks.screenX,Es=e.screenY-ks.screenY):(Ss=0,Es=0),ks=e)}(e),Ss)},movementY:function(e){return"movementY"in e?e.movementY:Es}}),Rs=_s(Ts),Ps=_s(Ge({},Ts,{dataTransfer:0})),Ls=_s(Ge({},xs,{relatedTarget:0})),Is=_s(Ge({},Ms,{animationName:0,elapsedTime:0,pseudoElement:0})),Os=_s(Ge({},Ms,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),Ns=_s(Ge({},Ms,{data:0})),Ds=Ns,Bs={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},js={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},zs={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Us(e){var t=this.nativeEvent;if(t.getModifierState)return t.getModifierState(e);var n=zs[e];return!!n&&!!t[n]}function Fs(e){return Us}var Ks=Ge({},xs,{key:function(e){if(e.key){var t=Bs[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=bs(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?js[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fs,charCode:function(e){return"keypress"===e.type?bs(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?bs(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),qs=_s(Ks),Hs=_s(Ge({},Ts,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Ws=_s(Ge({},xs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fs})),$s=_s(Ge({},Ms,{propertyName:0,elapsedTime:0,pseudoElement:0})),Vs=_s(Ge({},Ts,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Ys=[9,13,27,32],Gs=229,Zs=Y&&"CompositionEvent"in window,Qs=null;Y&&"documentMode"in document&&(Qs=document.documentMode);var Xs=Y&&"TextEvent"in window&&!Qs,Js=Y&&(!Zs||Qs&&Qs>8&&Qs<=11),eu=32,tu=String.fromCharCode(eu),nu=!1;function ru(e,t){switch(e){case"keyup":return-1!==Ys.indexOf(t.keyCode);case"keydown":return t.keyCode!==Gs;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function iu(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function ou(e){return"ko"===e.locale}var au=!1;function su(e,t,n,r,i){var o,a;if(Zs?o=function(e){switch(e){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}(t):au?ru(t,r)&&(o="onCompositionEnd"):function(e,t){return"keydown"===e&&t.keyCode===Gs}(t,r)&&(o="onCompositionStart"),!o)return null;Js&&!ou(r)&&(au||"onCompositionStart"!==o?"onCompositionEnd"===o&&au&&(a=gs()):au=function(e){return hs=e,ps=vs(),!0}(i));var s=wl(n,o);if(s.length>0){var u=new Ns(o,t,null,r,i);if(e.push({event:u,listeners:s}),a)u.data=a;else{var l=iu(r);null!==l&&(u.data=l)}}}function uu(e,t){if(au){if("compositionend"===e||!Zs&&ru(e,t)){var n=gs();return hs=null,ps=null,ms=null,au=!1,n}return null}switch(e){case"paste":default:return null;case"keypress":if(!function(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}(t)){if(t.char&&t.char.length>1)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Js&&!ou(t)?null:t.data}}function lu(e,t,n,r,i){var o;if(!(o=Xs?function(e,t){switch(e){case"compositionend":return iu(t);case"keypress":return t.which!==eu?null:(nu=!0,tu);case"textInput":var n=t.data;return n===tu&&nu?null:n;default:return null}}(t,r):uu(t,r)))return null;var a=wl(n,"onBeforeInput");if(a.length>0){var s=new Ds("onBeforeInput","beforeinput",null,r,i);e.push({event:s,listeners:a}),s.data=o}}var cu={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function du(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!cu[e.type]:"textarea"===t}
|
|
25
|
+
/**
|
|
26
|
+
* Checks if an event is supported in the current execution environment.
|
|
27
|
+
*
|
|
28
|
+
* NOTE: This will not work correctly for non-generic events such as `change`,
|
|
29
|
+
* `reset`, `load`, `error`, and `select`.
|
|
30
|
+
*
|
|
31
|
+
* Borrows from Modernizr.
|
|
32
|
+
*
|
|
33
|
+
* @param {string} eventNameSuffix Event name, e.g. "click".
|
|
34
|
+
* @return {boolean} True if the event is supported.
|
|
35
|
+
* @internal
|
|
36
|
+
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
37
|
+
*/function fu(e,t,n,r){vr(r);var i=wl(t,"onChange");if(i.length>0){var o=new Cs("onChange","change",null,n,r);e.push({event:o,listeners:i})}}var hu=null,pu=null;function mu(e){dl(e,0)}function gu(e){if(At(Yc(e)))return e}function vu(e,t){if("change"===e)return t}var bu=!1;function yu(){hu&&(hu.detachEvent("onpropertychange",wu),hu=null,pu=null)}function wu(e){"value"===e.propertyName&&gu(pu)&&function(e){var t=[];fu(t,pu,e,fr(e)),Er(mu,t)}(e)}function _u(e,t,n){"focusin"===e?(yu(),function(e,t){pu=t,(hu=e).attachEvent("onpropertychange",wu)}(t,n)):"focusout"===e&&yu()}function Su(e,t){if("selectionchange"===e||"keyup"===e||"keydown"===e)return gu(pu)}function Eu(e,t){if("click"===e)return gu(t)}function ku(e,t){if("input"===e||"change"===e)return gu(t)}function Mu(e,t,n,r,i,o,a){var s,u,l,c,d=n?Yc(n):window;if("select"===(c=(l=d).nodeName&&l.nodeName.toLowerCase())||"input"===c&&"file"===l.type?s=vu:du(d)?bu?s=ku:(s=Su,u=_u):function(e){var t=e.nodeName;return t&&"input"===t.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}(d)&&(s=Eu),s){var f=s(t,n);if(f)return void fu(e,f,r,i)}u&&u(t,d,n),"focusout"===t&&function(e){var t=e._wrapperState;t&&t.controlled&&"number"===e.type&&Ft(e,"number",e.value)}(d)}function Cu(e,t,n,r,i,o,a){var s="mouseover"===t||"pointerover"===t,u="mouseout"===t||"pointerout"===t;if(s&&r!==dr){var l=r.relatedTarget||r.fromElement;if(l&&($c(l)||Wc(l)))return}if(u||s){var c,d,p;if(i.window===i)c=i;else{var m=i.ownerDocument;c=m?m.defaultView||m.parentWindow:window}if(u){var g=r.relatedTarget||r.toElement;d=n,null!==(p=g?$c(g):null)&&(p!==vi(p)||p.tag!==f&&p.tag!==h)&&(p=null)}else d=null,p=n;if(d!==p){var v=Rs,b="onMouseLeave",y="onMouseEnter",w="mouse";"pointerout"!==t&&"pointerover"!==t||(v=Hs,b="onPointerLeave",y="onPointerEnter",w="pointer");var _=null==d?c:Yc(d),S=null==p?c:Yc(p),E=new v(b,w+"leave",d,r,i);E.target=_,E.relatedTarget=S;var k=null;if($c(i)===n){var M=new v(y,w+"enter",p,r,i);M.target=S,M.relatedTarget=_,k=M}!function(e,t,n,r,i){var o=r&&i?function(e,t){for(var n=e,r=t,i=0,o=n;o;o=_l(o))i++;for(var a=0,s=r;s;s=_l(s))a++;for(;i-a>0;)n=_l(n),i--;for(;a-i>0;)r=_l(r),a--;for(var u=i;u--;){if(n===r||null!==r&&n===r.alternate)return n;n=_l(n),r=_l(r)}return null}(r,i):null;null!==r&&Sl(e,t,r,o,!1),null!==i&&null!==n&&Sl(e,n,i,o,!0)}(e,E,k,d,p)}}}Y&&(bu=function(e){if(!Y)return!1;var t="oninput",n=t in document;if(!n){var r=document.createElement("div");r.setAttribute(t,"return;"),n="function"==typeof r[t]}return n}()&&(!document.documentMode||document.documentMode>9));var xu="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Au(e,t){if(xu(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++){var o=n[i];if(!G.call(t,o)||!xu(e[o],t[o]))return!1}return!0}function Tu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ru(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function Pu(e,t){for(var n=Tu(e),r=0,i=0;n;){if(n.nodeType===mn){if(i=r+n.textContent.length,r<=t&&i>=t)return{node:n,offset:t-r};r=i}n=Tu(Ru(n))}}function Lu(e){var t=e.ownerDocument,n=t&&t.defaultView||window,r=n.getSelection&&n.getSelection();if(!r||0===r.rangeCount)return null;var i=r.anchorNode,o=r.anchorOffset,a=r.focusNode,s=r.focusOffset;try{i.nodeType,a.nodeType}catch(e){return null}return function(e,t,n,r,i){var o=0,a=-1,s=-1,u=0,l=0,c=e,d=null;e:for(;;){for(var f=null;c!==t||0!==n&&c.nodeType!==mn||(a=o+n),c!==r||0!==i&&c.nodeType!==mn||(s=o+i),c.nodeType===mn&&(o+=c.nodeValue.length),null!==(f=c.firstChild);)d=c,c=f;for(;;){if(c===e)break e;if(d===t&&++u===n&&(a=o),d===r&&++l===i&&(s=o),null!==(f=c.nextSibling))break;d=(c=d).parentNode}c=f}return-1===a||-1===s?null:{start:a,end:s}}(e,i,o,a,s)}function Iu(e){return e&&e.nodeType===mn}function Ou(e,t){return!(!e||!t)&&(e===t||!Iu(e)&&(Iu(t)?Ou(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Nu(e){return e&&e.ownerDocument&&Ou(e.ownerDocument.documentElement,e)}function Du(e){try{return"string"==typeof e.contentWindow.location.href}catch(e){return!1}}function Bu(){for(var e=window,t=Tt();t instanceof e.HTMLIFrameElement;){if(!Du(t))return t;t=Tt((e=t.contentWindow).document)}return t}function ju(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function zu(e){var t=Bu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&Nu(n)){null!==r&&ju(n)&&function(e,t){var n=t.start,r=t.end;void 0===r&&(r=n),"selectionStart"in e?(e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length)):function(e,t){var n=e.ownerDocument||document,r=n&&n.defaultView||window;if(r.getSelection){var i=r.getSelection(),o=e.textContent.length,a=Math.min(t.start,o),s=void 0===t.end?a:Math.min(t.end,o);if(!i.extend&&a>s){var u=s;s=a,a=u}var l=Pu(e,a),c=Pu(e,s);if(l&&c){if(1===i.rangeCount&&i.anchorNode===l.node&&i.anchorOffset===l.offset&&i.focusNode===c.node&&i.focusOffset===c.offset)return;var d=n.createRange();d.setStart(l.node,l.offset),i.removeAllRanges(),a>s?(i.addRange(d),i.extend(c.node,c.offset)):(d.setEnd(c.node,c.offset),i.addRange(d))}}}(e,t)}(n,r);for(var i=[],o=n;o=o.parentNode;)o.nodeType===pn&&i.push({element:o,left:o.scrollLeft,top:o.scrollTop});"function"==typeof n.focus&&n.focus();for(var a=0;a<i.length;a++){var s=i[a];s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}}function Uu(e){return("selectionStart"in e?{start:e.selectionStart,end:e.selectionEnd}:Lu(e))||{start:0,end:0}}var Fu=Y&&"documentMode"in document&&document.documentMode<=11,Ku=null,qu=null,Hu=null,Wu=!1;function $u(e,t,n){var r,i=(r=n).window===r?r.document:r.nodeType===vn?r:r.ownerDocument;if(!Wu&&null!=Ku&&Ku===Tt(i)){var o=function(e){if("selectionStart"in e&&ju(e))return{start:e.selectionStart,end:e.selectionEnd};var t=(e.ownerDocument&&e.ownerDocument.defaultView||window).getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}(Ku);if(!Hu||!Au(Hu,o)){Hu=o;var a=wl(qu,"onSelect");if(a.length>0){var s=new Cs("onSelect","select",null,t,n);e.push({event:s,listeners:a}),s.target=Ku}}}}function Vu(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Yu={animationend:Vu("Animation","AnimationEnd"),animationiteration:Vu("Animation","AnimationIteration"),animationstart:Vu("Animation","AnimationStart"),transitionend:Vu("Transition","TransitionEnd")},Gu={},Zu={};function Qu(e){if(Gu[e])return Gu[e];if(!Yu[e])return e;var t=Yu[e];for(var n in t)if(t.hasOwnProperty(n)&&n in Zu)return Gu[e]=t[n];return e}Y&&(Zu=document.createElement("div").style,"AnimationEvent"in window||(delete Yu.animationend.animation,delete Yu.animationiteration.animation,delete Yu.animationstart.animation),"TransitionEvent"in window||delete Yu.transitionend.transition);var Xu=Qu("animationend"),Ju=Qu("animationiteration"),el=Qu("animationstart"),tl=Qu("transitionend"),nl=new Map,rl=["abort","auxClick","cancel","canPlay","canPlayThrough","click","close","contextMenu","copy","cut","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","gotPointerCapture","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","lostPointerCapture","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","pointerCancel","pointerDown","pointerMove","pointerOut","pointerOver","pointerUp","progress","rateChange","reset","resize","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchStart","volumeChange","scroll","toggle","touchMove","waiting","wheel"];function il(e,t){nl.set(e,t),$(t,[e])}function ol(e,t,n,r,i,o,a){var s=nl.get(t);if(void 0!==s){var u=Cs,l=t;switch(t){case"keypress":if(0===bs(r))return;case"keydown":case"keyup":u=qs;break;case"focusin":l="focus",u=Ls;break;case"focusout":l="blur",u=Ls;break;case"beforeblur":case"afterblur":u=Ls;break;case"click":if(2===r.button)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=Rs;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=Ps;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Ws;break;case Xu:case Ju:case el:u=Is;break;case tl:u=$s;break;case"scroll":u=As;break;case"wheel":u=Vs;break;case"copy":case"cut":case"paste":u=Os;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Hs}var c=0!=(o&lr),d=!c&&"scroll"===t,h=function(e,t,n,r,i,o){for(var a=r?null!==t?t+"Capture":null:t,s=[],u=e,l=null;null!==u;){var c=u,d=c.stateNode;if(c.tag===f&&null!==d&&(l=d,null!==a)){var h=kr(u,a);null!=h&&s.push(yl(u,h,l))}if(i)break;u=u.return}return s}(n,s,r.type,c,d);if(h.length>0){var p=new u(s,l,null,r,i);e.push({event:p,listeners:h})}}}function al(e,t,n,r,i,o,a){ol(e,t,n,r,i,o),0==(o&cr)&&(Cu(e,t,n,r,i),Mu(e,t,n,r,i),function(e,t,n,r,i,o,a){var s=n?Yc(n):window;switch(t){case"focusin":(du(s)||"true"===s.contentEditable)&&(Ku=s,qu=n,Hu=null);break;case"focusout":Ku=null,qu=null,Hu=null;break;case"mousedown":Wu=!0;break;case"contextmenu":case"mouseup":case"dragend":Wu=!1,$u(e,r,i);break;case"selectionchange":if(Fu)break;case"keydown":case"keyup":$u(e,r,i)}}(e,t,n,r,i),function(e,t,n,r,i,o,a){su(e,t,n,r,i),lu(e,t,n,r,i)}(e,t,n,r,i))}!function(){for(var e=0;e<rl.length;e++){var t=rl[e];il(t.toLowerCase(),"on"+(t[0].toUpperCase()+t.slice(1)))}il(Xu,"onAnimationEnd"),il(Ju,"onAnimationIteration"),il(el,"onAnimationStart"),il("dblclick","onDoubleClick"),il("focusin","onFocus"),il("focusout","onBlur"),il(tl,"onTransitionEnd")}(),V("onMouseEnter",["mouseout","mouseover"]),V("onMouseLeave",["mouseout","mouseover"]),V("onPointerEnter",["pointerout","pointerover"]),V("onPointerLeave",["pointerout","pointerover"]),$("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"]),$("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"]),$("onBeforeInput",["compositionend","keypress","textInput","paste"]),$("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),$("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),$("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"]);var sl=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],ul=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(sl));function ll(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,a,s,u){if(Dr.apply(this,arguments),Pr){var l=Br();Ir||(Ir=!0,Or=l)}}(r,t,void 0,e),e.currentTarget=null}function cl(e,t,n){var r;if(n)for(var i=t.length-1;i>=0;i--){var o=t[i],a=o.instance,s=o.currentTarget,u=o.listener;if(a!==r&&e.isPropagationStopped())return;ll(e,u,s),r=a}else for(var l=0;l<t.length;l++){var c=t[l],d=c.instance,f=c.currentTarget,h=c.listener;if(d!==r&&e.isPropagationStopped())return;ll(e,h,f),r=d}}function dl(e,t){for(var n=0!=(t&lr),r=0;r<e.length;r++){var i=e[r];cl(i.event,i.listeners,n)}!function(){if(Ir){var e=Or;throw Ir=!1,Or=null,e}}()}function fl(e,t){ul.has(e)||o('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var n=function(e){var t=e[zc];return void 0===t&&(t=e[zc]=new Set),t}(t),r=function(e,t){return e+"__bubble"}(e);n.has(r)||(gl(t,e,ur,!1),n.add(r))}function hl(e,t,n){ul.has(e)&&!t&&o('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var r=0;t&&(r|=lr),gl(n,e,r,t)}var pl="_reactListening"+Math.random().toString(36).slice(2);function ml(e){if(!e[pl]){e[pl]=!0,q.forEach((function(t){"selectionchange"!==t&&(ul.has(t)||hl(t,!1,e),hl(t,!0,e))}));var t=e.nodeType===vn?e:e.ownerDocument;null!==t&&(t[pl]||(t[pl]=!0,hl("selectionchange",!1,t)))}}function gl(e,t,n,r,i){var o=function(e,t,n){var r;switch(fs(t)){case Ra:r=ss;break;case Pa:r=us;break;default:r=ls}return r.bind(null,t,n,e)}(e,t,n),a=void 0;Mr&&("touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0)),r?void 0!==a?function(e,t,n,r){e.addEventListener(t,n,{capture:!0,passive:r})}(e,t,o,a):function(e,t,n){e.addEventListener(t,n,!0)}(e,t,o):void 0!==a?function(e,t,n,r){e.addEventListener(t,n,{passive:r})}(e,t,o,a):function(e,t,n){e.addEventListener(t,n,!1)}(e,t,o)}function vl(e,t){return e===t||e.nodeType===gn&&e.parentNode===t}function bl(e,t,n,r,i){var o=r;if(0==(t&sr)&&0==(t&ur)){var a=i;if(null!==r){var s=r;e:for(;;){if(null===s)return;var u=s.tag;if(u===c||u===d){var l=s.stateNode.containerInfo;if(vl(l,a))break;if(u===d)for(var p=s.return;null!==p;){var m=p.tag;if((m===c||m===d)&&vl(p.stateNode.containerInfo,a))return;p=p.return}for(;null!==l;){var g=$c(l);if(null===g)return;var v=g.tag;if(v===f||v===h){s=o=g;continue e}l=l.parentNode}}s=s.return}}}Er((function(){return function(e,t,n,r,i){var o=[];al(o,e,r,n,fr(n),t),dl(o,t)}(e,t,n,o)}))}function yl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function wl(e,t){for(var n=t+"Capture",r=[],i=e;null!==i;){var o=i,a=o.stateNode;if(o.tag===f&&null!==a){var s=a,u=kr(i,n);null!=u&&r.unshift(yl(i,u,s));var l=kr(i,t);null!=l&&r.push(yl(i,l,s))}i=i.return}return r}function _l(e){if(null===e)return null;do{e=e.return}while(e&&e.tag!==f);return e||null}function Sl(e,t,n,r,i){for(var o=t._reactName,a=[],s=n;null!==s&&s!==r;){var u=s,l=u.alternate,c=u.stateNode,d=u.tag;if(null!==l&&l===r)break;if(d===f&&null!==c){var h=c;if(i){var p=kr(s,o);null!=p&&a.unshift(yl(s,p,h))}else if(!i){var m=kr(s,o);null!=m&&a.push(yl(s,m,h))}}s=s.return}0!==a.length&&e.push({event:t,listeners:a})}var El,kl,Ml,Cl,xl,Al,Tl,Rl=!1,Pl="dangerouslySetInnerHTML",Ll="suppressContentEditableWarning",Il="suppressHydrationWarning",Ol="autoFocus",Nl="children",Dl="style",Bl="__html";El={dialog:!0,webview:!0},kl=function(e,t){Xn(e,t),function(e,t){"input"!==e&&"textarea"!==e&&"select"!==e||null==t||null!==t.value||er||(er=!0,"select"===e&&t.multiple?o("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",e):o("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e))}(e,t),ar(e,t,{registrationNameDependencies:H,possibleRegistrationNames:W})},Al=Y&&!document.documentMode,Ml=function(e,t,n){if(!Rl){var r=Ul(n),i=Ul(t);i!==r&&(Rl=!0,o("Prop `%s` did not match. Server: %s Client: %s",e,JSON.stringify(i),JSON.stringify(r)))}},Cl=function(e){if(!Rl){Rl=!0;var t=[];e.forEach((function(e){t.push(e)})),o("Extra attributes from the server: %s",t)}},xl=function(e,t){!1===t?o("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):o("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)},Tl=function(e,t){var n=e.namespaceURI===an?e.ownerDocument.createElement(e.tagName):e.ownerDocument.createElementNS(e.namespaceURI,e.tagName);return n.innerHTML=t,n.innerHTML};var jl=/\r\n?/g,zl=/\u0000|\uFFFD/g;function Ul(e){return function(e){Q(e)&&o("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",Z(e))}(e),("string"==typeof e?e:""+e).replace(jl,"\n").replace(zl,"")}function Fl(e,t,n,r){var i=Ul(t),a=Ul(e);if(a!==i&&(r&&(Rl||(Rl=!0,o('Text content did not match. Server: "%s" Client: "%s"',a,i))),n&&L))throw new Error("Text content does not match server-rendered HTML.")}function Kl(e){return e.nodeType===vn?e:e.ownerDocument}function ql(){}function Hl(e){e.onclick=ql}function Wl(e,t,n,r){var i,o=Wn(t,n);switch(kl(t,n),t){case"dialog":fl("cancel",e),fl("close",e),i=n;break;case"iframe":case"object":case"embed":fl("load",e),i=n;break;case"video":case"audio":for(var a=0;a<sl.length;a++)fl(sl[a],e);i=n;break;case"source":fl("error",e),i=n;break;case"img":case"image":case"link":fl("error",e),fl("load",e),i=n;break;case"details":fl("toggle",e),i=n;break;case"input":Dt(e,n),i=Nt(e,n),fl("invalid",e);break;case"option":Wt(0,n),i=n;break;case"select":Jt(e,n),i=Xt(0,n),fl("invalid",e);break;case"textarea":nn(e,n),i=tn(e,n),fl("invalid",e);break;default:i=n}switch(Hn(t,i),function(e,t,n,r,i){for(var o in r)if(r.hasOwnProperty(o)){var a=r[o];if(o===Dl)a&&Object.freeze(a),zn(t,a);else if(o===Pl){var s=a?a[Bl]:void 0;null!=s&&hn(t,s)}else o===Nl?"string"==typeof a?("textarea"!==e||""!==a)&&yn(t,a):"number"==typeof a&&yn(t,""+a):o===Ll||o===Il||o===Ol||(H.hasOwnProperty(o)?null!=a&&("function"!=typeof a&&xl(o,a),"onScroll"===o&&fl("scroll",t)):null!=a&&Me(t,o,a,i))}}(t,e,0,i,o),t){case"input":xt(e),zt(e,n,!1);break;case"textarea":xt(e),on(e);break;case"option":!function(e,t){null!=t.value&&e.setAttribute("value",_t(St(t.value)))}(e,n);break;case"select":!function(e,t){var n=e;n.multiple=!!t.multiple;var r=t.value;null!=r?Qt(n,!!t.multiple,r,!1):null!=t.defaultValue&&Qt(n,!!t.multiple,t.defaultValue,!0)}(e,n);break;default:"function"==typeof i.onClick&&Hl(e)}}function $l(e,t,n,r,i){kl(t,r);var a,s,u,l,c=null;switch(t){case"input":a=Nt(e,n),s=Nt(e,r),c=[];break;case"select":a=Xt(0,n),s=Xt(0,r),c=[];break;case"textarea":a=tn(e,n),s=tn(e,r),c=[];break;default:s=r,"function"!=typeof(a=n).onClick&&"function"==typeof s.onClick&&Hl(e)}Hn(t,s);var d=null;for(u in a)if(!s.hasOwnProperty(u)&&a.hasOwnProperty(u)&&null!=a[u])if(u===Dl){var f=a[u];for(l in f)f.hasOwnProperty(l)&&(d||(d={}),d[l]="")}else u===Pl||u===Nl||u===Ll||u===Il||u===Ol||(H.hasOwnProperty(u)?c||(c=[]):(c=c||[]).push(u,null));for(u in s){var h=s[u],p=null!=a?a[u]:void 0;if(s.hasOwnProperty(u)&&h!==p&&(null!=h||null!=p))if(u===Dl)if(h&&Object.freeze(h),p){for(l in p)!p.hasOwnProperty(l)||h&&h.hasOwnProperty(l)||(d||(d={}),d[l]="");for(l in h)h.hasOwnProperty(l)&&p[l]!==h[l]&&(d||(d={}),d[l]=h[l])}else d||(c||(c=[]),c.push(u,d)),d=h;else if(u===Pl){var m=h?h[Bl]:void 0,g=p?p[Bl]:void 0;null!=m&&g!==m&&(c=c||[]).push(u,m)}else u===Nl?"string"!=typeof h&&"number"!=typeof h||(c=c||[]).push(u,""+h):u===Ll||u===Il||(H.hasOwnProperty(u)?(null!=h&&("function"!=typeof h&&xl(u,h),"onScroll"===u&&fl("scroll",e)),c||p===h||(c=[])):(c=c||[]).push(u,h))}return d&&(function(e,t){if(t){var n=Fn(e),r=Fn(t),i={};for(var a in n){var s=n[a],u=r[a];if(u&&s!==u){var l=s+","+u;if(i[l])continue;i[l]=!0,o("%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",Un(e[s])?"Removing":"Updating",s,u)}}}}(d,s[Dl]),(c=c||[]).push(Dl,d)),c}function Vl(e,t,n,r,i){switch("input"===n&&"radio"===i.type&&null!=i.name&&Bt(e,i),Wn(n,r),function(e,t,n,r){for(var i=0;i<t.length;i+=2){var o=t[i],a=t[i+1];o===Dl?zn(e,a):o===Pl?hn(e,a):o===Nl?yn(e,a):Me(e,o,a,r)}}(e,t,0,Wn(n,i)),n){case"input":jt(e,i);break;case"textarea":rn(e,i);break;case"select":!function(e,t){var n=e,r=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!t.multiple;var i=t.value;null!=i?Qt(n,!!t.multiple,i,!1):r!==!!t.multiple&&(null!=t.defaultValue?Qt(n,!!t.multiple,t.defaultValue,!0):Qt(n,!!t.multiple,t.multiple?[]:"",!1))}(e,i)}}function Yl(e,t){Rl||(Rl=!0,o("Did not expect server HTML to contain a <%s> in <%s>.",t.nodeName.toLowerCase(),e.nodeName.toLowerCase()))}function Gl(e,t){Rl||(Rl=!0,o('Did not expect server HTML to contain the text node "%s" in <%s>.',t.nodeValue,e.nodeName.toLowerCase()))}function Zl(e,t,n){Rl||(Rl=!0,o("Expected server HTML to contain a matching <%s> in <%s>.",t,e.nodeName.toLowerCase()))}function Ql(e,t){""!==t&&(Rl||(Rl=!0,o('Expected server HTML to contain a matching text node for "%s" in <%s>.',t,e.nodeName.toLowerCase())))}var Xl=function(){},Jl=function(){},ec=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],tc=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],nc=tc.concat(["button"]),rc=["dd","dt","li","option","optgroup","p","rp","rt"],ic={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};Jl=function(e,t){var n=Ge({},e||ic),r={tag:t};return-1!==tc.indexOf(t)&&(n.aTagInScope=null,n.buttonTagInScope=null,n.nobrTagInScope=null),-1!==nc.indexOf(t)&&(n.pTagInButtonScope=null),-1!==ec.indexOf(t)&&"address"!==t&&"div"!==t&&"p"!==t&&(n.listItemTagAutoclosing=null,n.dlItemTagAutoclosing=null),n.current=r,"form"===t&&(n.formTag=r),"a"===t&&(n.aTagInScope=r),"button"===t&&(n.buttonTagInScope=r),"nobr"===t&&(n.nobrTagInScope=r),"p"===t&&(n.pTagInButtonScope=r),"li"===t&&(n.listItemTagAutoclosing=r),"dd"!==t&&"dt"!==t||(n.dlItemTagAutoclosing=r),n};var oc={};Xl=function(e,t,n){var r=(n=n||ic).current,i=r&&r.tag;null!=t&&(null!=e&&o("validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var a=function(e,t){switch(t){case"select":return"option"===e||"optgroup"===e||"#text"===e;case"optgroup":return"option"===e||"#text"===e;case"option":return"#text"===e;case"tr":return"th"===e||"td"===e||"style"===e||"script"===e||"template"===e;case"tbody":case"thead":case"tfoot":return"tr"===e||"style"===e||"script"===e||"template"===e;case"colgroup":return"col"===e||"template"===e;case"table":return"caption"===e||"colgroup"===e||"tbody"===e||"tfoot"===e||"thead"===e||"style"===e||"script"===e||"template"===e;case"head":return"base"===e||"basefont"===e||"bgsound"===e||"link"===e||"meta"===e||"title"===e||"noscript"===e||"noframes"===e||"style"===e||"script"===e||"template"===e;case"html":return"head"===e||"body"===e||"frameset"===e;case"frameset":return"frame"===e;case"#document":return"html"===e}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t;case"rp":case"rt":return-1===rc.indexOf(t);case"body":case"caption":case"col":case"colgroup":case"frameset":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return null==t}return!0}(e,i)?null:r,s=a?null:function(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null}(e,n),u=a||s;if(u){var l=u.tag,c=!!a+"|"+e+"|"+l;if(!oc[c]){oc[c]=!0;var d=e,f="";if("#text"===e?/\S/.test(t)?d="Text nodes":(d="Whitespace text nodes",f=" Make sure you don't have any extra whitespace between tags on each line of your source code."):d="<"+e+">",a){var h="";"table"===l&&"tr"===e&&(h+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),o("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",d,l,f,h)}else o("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",d,l)}}};var ac="suppressHydrationWarning",sc="$",uc="/$",lc="$?",cc="$!",dc="style",fc=null,hc=null;function pc(e){var t;return fc=os,t=Bu(),hc={focusedElem:t,selectionRange:ju(t)?Uu(t):null},as(!1),null}function mc(e,t,n,r,i){var a=r;if(Xl(e,null,a.ancestorInfo),"string"==typeof t.children||"number"==typeof t.children){var s=""+t.children,u=Jl(a.ancestorInfo,e);Xl(null,s,u)}var l=function(e,t,n,r){var i,a,s=Kl(n),u=r;if(u===an&&(u=ln(e)),u===an){if((i=Wn(e,t))||e===e.toLowerCase()||o("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",e),"script"===e){var l=s.createElement("div");l.innerHTML="<script><\/script>";var c=l.firstChild;a=l.removeChild(c)}else if("string"==typeof t.is)a=s.createElement(e,{is:t.is});else if(a=s.createElement(e),"select"===e){var d=a;t.multiple?d.multiple=!0:t.size&&(d.size=t.size)}}else a=s.createElementNS(u,e);return u===an&&(i||"[object HTMLUnknownElement]"!==Object.prototype.toString.call(a)||G.call(El,e)||(El[e]=!0,o("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",e))),a}(e,t,n,a.namespace);return Kc(i,l),Zc(l,t),l}function gc(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}function vc(e,t,n,r){Xl(null,e,n.ancestorInfo);var i=function(e,t){return Kl(t).createTextNode(e)}(e,t);return Kc(r,i),i}var bc="function"==typeof setTimeout?setTimeout:void 0,yc="function"==typeof clearTimeout?clearTimeout:void 0,wc=-1,_c="function"==typeof Promise?Promise:void 0,Sc="function"==typeof queueMicrotask?queueMicrotask:void 0!==_c?function(e){return _c.resolve(null).then(e).catch(Ec)}:bc;function Ec(e){setTimeout((function(){throw e}))}function kc(e){yn(e,"")}function Mc(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===gn){var o=i.data;if(o===uc){if(0===r)return e.removeChild(i),void rs(t);r--}else o!==sc&&o!==lc&&o!==cc||r++}n=i}while(n);rs(t)}function Cc(e){var t=e.style;"function"==typeof t.setProperty?t.setProperty("display","none","important"):t.display="none"}function xc(e,t){var n=t[dc],r=null!=n&&n.hasOwnProperty("display")?n.display:null;e.style.display=En("display",r)}function Ac(e,t){e.nodeValue=t}function Tc(e){return e.data===lc}function Rc(e){return e.data===cc}function Pc(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(t===pn||t===mn)break;if(t===gn){var n=e.data;if(n===sc||n===cc||n===lc)break;if(n===uc)return null}}return e}function Lc(e){return Pc(e.nextSibling)}function Ic(e,t,n,r,i,o,a){return Kc(o,e),Zc(e,n),function(e,t,n,r,i,o,a){var s,u;switch(s=Wn(t,n),kl(t,n),t){case"dialog":fl("cancel",e),fl("close",e);break;case"iframe":case"object":case"embed":fl("load",e);break;case"video":case"audio":for(var l=0;l<sl.length;l++)fl(sl[l],e);break;case"source":fl("error",e);break;case"img":case"image":case"link":fl("error",e),fl("load",e);break;case"details":fl("toggle",e);break;case"input":Dt(e,n),fl("invalid",e);break;case"option":Wt(0,n);break;case"select":Jt(e,n),fl("invalid",e);break;case"textarea":nn(e,n),fl("invalid",e)}Hn(t,n),u=new Set;for(var c=e.attributes,d=0;d<c.length;d++)switch(c[d].name.toLowerCase()){case"value":case"checked":case"selected":break;default:u.add(c[d].name)}var f,h=null;for(var p in n)if(n.hasOwnProperty(p)){var m=n[p];if(p===Nl)"string"==typeof m?e.textContent!==m&&(!0!==n[Il]&&Fl(e.textContent,m,o,a),h=[Nl,m]):"number"==typeof m&&e.textContent!==""+m&&(!0!==n[Il]&&Fl(e.textContent,m,o,a),h=[Nl,""+m]);else if(H.hasOwnProperty(p))null!=m&&("function"!=typeof m&&xl(p,m),"onScroll"===p&&fl("scroll",e));else if(a&&"boolean"==typeof s){var g=void 0,v=s&&j?null:me(p);if(!0===n[Il]);else if(p===Ll||p===Il||"value"===p||"checked"===p||"selected"===p);else if(p===Pl){var b=e.innerHTML,y=m?m[Bl]:void 0;if(null!=y){var w=Tl(e,y);w!==b&&Ml(p,b,w)}}else if(p===Dl){if(u.delete(p),Al){var _=jn(m);_!==(g=e.getAttribute("style"))&&Ml(p,g,_)}}else if(s&&!j)u.delete(p.toLowerCase()),m!==(g=ke(e,p,m))&&Ml(p,g,m);else if(!fe(p,v,s)&&!pe(p,m,v,s)){var S=!1;if(null!==v)u.delete(v.attributeName),g=Ee(e,p,m,v);else{var E=r;if(E===an&&(E=ln(t)),E===an)u.delete(p.toLowerCase());else{var k=(f=void 0,f=p.toLowerCase(),$n.hasOwnProperty(f)&&$n[f]||null);null!==k&&k!==p&&(S=!0,u.delete(k)),u.delete(p)}g=ke(e,p,m)}m===g||S||Ml(p,g,m)}}}switch(a&&u.size>0&&!0!==n[Il]&&Cl(u),t){case"input":xt(e),zt(e,n,!0);break;case"textarea":xt(e),on(e);break;case"select":case"option":break;default:"function"==typeof n.onClick&&Hl(e)}return h}(e,t,n,i.namespace,0,(o.mode&oo)!==io,a)}function Oc(e){for(var t=e.previousSibling,n=0;t;){if(t.nodeType===gn){var r=t.data;if(r===sc||r===cc||r===lc){if(0===n)return t;n--}else r===uc&&n++}t=t.previousSibling}return null}var Nc=Math.random().toString(36).slice(2),Dc="__reactFiber$"+Nc,Bc="__reactProps$"+Nc,jc="__reactContainer$"+Nc,zc="__reactEvents$"+Nc,Uc="__reactListeners$"+Nc,Fc="__reactHandles$"+Nc;function Kc(e,t){t[Dc]=e}function qc(e,t){t[jc]=e}function Hc(e){e[jc]=null}function Wc(e){return!!e[jc]}function $c(e){var t=e[Dc];if(t)return t;for(var n=e.parentNode;n;){if(t=n[jc]||n[Dc]){var r=t.alternate;if(null!==t.child||null!==r&&null!==r.child)for(var i=Oc(e);null!==i;){var o=i[Dc];if(o)return o;i=Oc(i)}return t}n=(e=n).parentNode}return null}function Vc(e){var t=e[Dc]||e[jc];return!t||t.tag!==f&&t.tag!==h&&t.tag!==w&&t.tag!==c?null:t}function Yc(e){if(e.tag===f||e.tag===h)return e.stateNode;throw new Error("getNodeFromInstance: Invalid argument.")}function Gc(e){return e[Bc]||null}function Zc(e,t){e[Bc]=t}var Qc={},Xc=n.ReactDebugCurrentFrame;function Jc(e){if(e){var t=e._owner,n=at(e.type,e._source,t?t.type:null);Xc.setExtraStackFrame(n)}else Xc.setExtraStackFrame(null)}function ed(e,t,n,r,i){var a=Function.call.bind(G);for(var s in e)if(a(e,s)){var u=void 0;try{if("function"!=typeof e[s]){var l=Error((r||"React class")+": "+n+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}u=e[s](t,s,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){u=e}!u||u instanceof Error||(Jc(i),o("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,s,typeof u),Jc(null)),u instanceof Error&&!(u.message in Qc)&&(Qc[u.message]=!0,Jc(i),o("Failed %s type: %s",n,u.message),Jc(null))}}var td,nd=[];td=[];var rd,id=-1;function od(e){return{current:e}}function ad(e,t){id<0?o("Unexpected pop."):(t!==td[id]&&o("Unexpected Fiber popped."),e.current=nd[id],nd[id]=null,td[id]=null,id--)}function sd(e,t,n){id++,nd[id]=e.current,td[id]=n,e.current=t}rd={};var ud={};Object.freeze(ud);var ld=od(ud),cd=od(!1),dd=ud;function fd(e,t,n){return n&&gd(t)?dd:ld.current}function hd(e,t,n){var r=e.stateNode;r.__reactInternalMemoizedUnmaskedChildContext=t,r.__reactInternalMemoizedMaskedChildContext=n}function pd(e,t){var n=e.type.contextTypes;if(!n)return ud;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={};for(var o in n)i[o]=t[o];return ed(n,i,"context",ft(e)||"Unknown"),r&&hd(e,t,i),i}function md(){return cd.current}function gd(e){return null!=e.childContextTypes}function vd(e){ad(cd,e),ad(ld,e)}function bd(e){ad(cd,e),ad(ld,e)}function yd(e,t,n){if(ld.current!==ud)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");sd(ld,t,e),sd(cd,n,e)}function wd(e,t,n){var r=e.stateNode,i=t.childContextTypes;if("function"!=typeof r.getChildContext){var a=ft(e)||"Unknown";return rd[a]||(rd[a]=!0,o("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",a,a)),n}var s=r.getChildContext();for(var u in s)if(!(u in i))throw new Error((ft(e)||"Unknown")+'.getChildContext(): key "'+u+'" is not defined in childContextTypes.');return ed(i,s,"child context",ft(e)||"Unknown"),Ge({},n,s)}function _d(e){var t=e.stateNode,n=t&&t.__reactInternalMemoizedMergedChildContext||ud;return dd=ld.current,sd(ld,n,e),sd(cd,cd.current,e),!0}function Sd(e,t,n){var r=e.stateNode;if(!r)throw new Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(n){var i=wd(e,t,dd);r.__reactInternalMemoizedMergedChildContext=i,ad(cd,e),ad(ld,e),sd(ld,i,e),sd(cd,n,e)}else ad(cd,e),sd(cd,n,e)}function Ed(e){if(!function(e){return vi(e)===e}(e)||e.tag!==u)throw new Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var t=e;do{switch(t.tag){case c:return t.stateNode.context;case u:if(gd(t.type))return t.stateNode.__reactInternalMemoizedMergedChildContext}t=t.return}while(null!==t);throw new Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}var kd=0,Md=1,Cd=null,xd=!1,Ad=!1;function Td(e){null===Cd?Cd=[e]:Cd.push(e)}function Rd(){xd&&Pd()}function Pd(){if(!Ad&&null!==Cd){Ad=!0;var e=0,t=Na();try{var n=Cd;for(Da(Ra);e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Cd=null,xd=!1}catch(t){throw null!==Cd&&(Cd=Cd.slice(e+1)),Ci(Li,Pd),t}finally{Da(t),Ad=!1}}return null}var Ld=[],Id=0,Od=null,Nd=0,Dd=[],Bd=0,jd=null,zd=1,Ud="";function Fd(){var e=Ud;return(zd&~function(e){return 1<<Wd(e)-1}(zd)).toString(32)+e}function Kd(e,t){Vd(),Ld[Id++]=Nd,Ld[Id++]=Od,Od=e,Nd=t}function qd(e,t,n){Vd(),Dd[Bd++]=zd,Dd[Bd++]=Ud,Dd[Bd++]=jd,jd=e;var r=zd,i=Ud,o=Wd(r)-1,a=r&~(1<<o),s=n+1,u=Wd(t)+o;if(u>30){var l=o-o%5,c=(a&(1<<l)-1).toString(32),d=a>>l,f=o-l,h=Wd(t)+f;zd=1<<h|s<<f|d,Ud=c+i}else zd=1<<u|s<<o|a,Ud=i}function Hd(e){Vd(),null!==e.return&&(Kd(e,1),qd(e,1,0))}function Wd(e){return 32-lo(e)}function $d(e){for(;e===Od;)Od=Ld[--Id],Ld[Id]=null,Nd=Ld[--Id],Ld[Id]=null;for(;e===jd;)jd=Dd[--Bd],Dd[Bd]=null,Ud=Dd[--Bd],Dd[Bd]=null,zd=Dd[--Bd],Dd[Bd]=null}function Vd(){wf()||o("Expected to be hydrating. This is a bug in React. Please file an issue.")}var Yd=null,Gd=null,Zd=!1,Qd=!1,Xd=null;function Jd(){Zd&&o("We should not be hydrating here. This is a bug in React. Please file a bug.")}function ef(){Qd=!0}function tf(e){var t=e.stateNode.containerInfo;return Gd=Pc(t.firstChild),Yd=e,Zd=!0,Xd=null,Qd=!1,!0}function nf(e,t,n){return Gd=Pc(t.nextSibling),Yd=e,Zd=!0,Xd=null,Qd=!1,null!==n&&function(e,t){Vd(),Dd[Bd++]=zd,Dd[Bd++]=Ud,Dd[Bd++]=jd,zd=t.id,Ud=t.overflow,jd=e}(e,n),!0}function rf(e,t){switch(e.tag){case c:!function(e,t){t.nodeType===pn?Yl(e,t):t.nodeType===gn||Gl(e,t)}(e.stateNode.containerInfo,t);break;case f:var n=(e.mode&oo)!==io;!function(e,t,n,r,i){(i||!0!==t[ac])&&(r.nodeType===pn?Yl(n,r):r.nodeType===gn||Gl(n,r))}(e.type,e.memoizedProps,e.stateNode,t,n);break;case w:var r=e.memoizedState;null!==r.dehydrated&&function(e,t){var n=e.parentNode;null!==n&&(t.nodeType===pn?Yl(n,t):t.nodeType===gn||Gl(n,t))}(r.dehydrated,t)}}function of(e,t){rf(e,t);var n,r=((n=s_(f,null,null,io)).elementType="DELETED",n);r.stateNode=t,r.return=e;var i=e.deletions;null===i?(e.deletions=[r],e.flags|=qr):i.push(r)}function af(e,t){if(!Qd)switch(e.tag){case c:var n=e.stateNode.containerInfo;switch(t.tag){case f:var r=t.type;t.pendingProps,function(e,t,n){Zl(e,t)}(n,r);break;case h:!function(e,t){Ql(e,t)}(n,t.pendingProps)}break;case f:e.type;var i=e.memoizedProps,o=e.stateNode;switch(t.tag){case f:var a=t.type;t.pendingProps,function(e,t,n,r,i,o){(o||!0!==t[ac])&&Zl(n,r)}(0,i,o,a,0,(e.mode&oo)!==io);break;case h:!function(e,t,n,r,i){(i||!0!==t[ac])&&Ql(n,r)}(0,i,o,t.pendingProps,(e.mode&oo)!==io)}break;case w:var s=e.memoizedState.dehydrated;if(null!==s)switch(t.tag){case f:var u=t.type;t.pendingProps,function(e,t,n){var r=e.parentNode;null!==r&&Zl(r,t)}(s,u);break;case h:!function(e,t){var n=e.parentNode;null!==n&&Ql(n,t)}(s,t.pendingProps)}break;default:return}}function sf(e,t){t.flags=t.flags&~Qr|Fr,af(e,t)}function uf(e,t){switch(e.tag){case f:var n=e.type;e.pendingProps;var r=function(e,t,n){return e.nodeType!==pn||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e}(t,n);return null!==r&&(e.stateNode=r,Yd=e,Gd=Pc(r.firstChild),!0);case h:var i=function(e,t){return""===t||e.nodeType!==mn?null:e}(t,e.pendingProps);return null!==i&&(e.stateNode=i,Yd=e,Gd=null,!0);case w:var o=function(e){return e.nodeType!==gn?null:e}(t);if(null!==o){var a={dehydrated:o,treeContext:(Vd(),null!==jd?{id:zd,overflow:Ud}:null),retryLane:Zo};e.memoizedState=a;var s=function(e){var t=s_(M,null,null,io);return t.stateNode=e,t}(o);return s.return=e,e.child=s,Yd=e,Gd=null,!0}return!1;default:return!1}}function lf(e){return(e.mode&oo)!==io&&(e.flags&$r)===zr}function cf(e){throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function df(e){if(Zd){var t=Gd;if(!t)return lf(e)&&(af(Yd,e),cf()),sf(Yd,e),Zd=!1,void(Yd=e);var n=t;if(!uf(e,t)){lf(e)&&(af(Yd,e),cf()),t=Lc(n);var r=Yd;if(!t||!uf(e,t))return sf(Yd,e),Zd=!1,void(Yd=e);of(r,n)}}}function ff(e){var t=e.stateNode,n=e.memoizedProps,r=function(e,t,n,r){return Kc(n,e),n.mode,function(e,t,n){return e.nodeValue!==t}(e,t)}(t,n,e);if(r){var i=Yd;if(null!==i)switch(i.tag){case c:i.stateNode.containerInfo,function(e,t,n,r){Fl(t.nodeValue,n,r,!0)}(0,t,n,(i.mode&oo)!==io);break;case f:i.type;var o=i.memoizedProps;i.stateNode,function(e,t,n,r,i,o){!0!==t[ac]&&Fl(r.nodeValue,i,o,!0)}(0,o,0,t,n,(i.mode&oo)!==io)}}return r}function hf(e){var t=e.memoizedState,n=null!==t?t.dehydrated:null;if(!n)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");!function(e,t){Kc(t,e)}(n,e)}function pf(e){var t=e.memoizedState,n=null!==t?t.dehydrated:null;if(!n)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return function(e){for(var t=e.nextSibling,n=0;t;){if(t.nodeType===gn){var r=t.data;if(r===uc){if(0===n)return Lc(t);n--}else r!==sc&&r!==cc&&r!==lc||n++}t=t.nextSibling}return null}(n)}function mf(e){for(var t=e.return;null!==t&&t.tag!==f&&t.tag!==c&&t.tag!==w;)t=t.return;Yd=t}function gf(e){if(e!==Yd)return!1;if(!Zd)return mf(e),Zd=!0,!1;if(e.tag!==c&&(e.tag!==f||"head"!==(n=e.type)&&"body"!==n&&!gc(e.type,e.memoizedProps))){var t=Gd;if(t)if(lf(e))vf(e),cf();else for(;t;)of(e,t),t=Lc(t)}var n;return mf(e),Gd=e.tag===w?pf(e):Yd?Lc(e.stateNode):null,!0}function vf(e){for(var t=Gd;t;)rf(e,t),t=Lc(t)}function bf(){Yd=null,Gd=null,Zd=!1,Qd=!1}function yf(){null!==Xd&&(rw(Xd),Xd=null)}function wf(){return Zd}function _f(e){null===Xd?Xd=[e]:Xd.push(e)}var Sf=n.ReactCurrentBatchConfig,Ef=null,kf={recordUnsafeLifecycleWarnings:function(e,t){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(e,t){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},Mf=function(e){var t=[];return e.forEach((function(e){t.push(e)})),t.sort().join(", ")},Cf=[],xf=[],Af=[],Tf=[],Rf=[],Pf=[],Lf=new Set;kf.recordUnsafeLifecycleWarnings=function(e,t){Lf.has(e.type)||("function"==typeof t.componentWillMount&&!0!==t.componentWillMount.__suppressDeprecationWarning&&Cf.push(e),e.mode&so&&"function"==typeof t.UNSAFE_componentWillMount&&xf.push(e),"function"==typeof t.componentWillReceiveProps&&!0!==t.componentWillReceiveProps.__suppressDeprecationWarning&&Af.push(e),e.mode&so&&"function"==typeof t.UNSAFE_componentWillReceiveProps&&Tf.push(e),"function"==typeof t.componentWillUpdate&&!0!==t.componentWillUpdate.__suppressDeprecationWarning&&Rf.push(e),e.mode&so&&"function"==typeof t.UNSAFE_componentWillUpdate&&Pf.push(e))},kf.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;Cf.length>0&&(Cf.forEach((function(t){e.add(ft(t)||"Component"),Lf.add(t.type)})),Cf=[]);var t=new Set;xf.length>0&&(xf.forEach((function(e){t.add(ft(e)||"Component"),Lf.add(e.type)})),xf=[]);var n=new Set;Af.length>0&&(Af.forEach((function(e){n.add(ft(e)||"Component"),Lf.add(e.type)})),Af=[]);var r=new Set;Tf.length>0&&(Tf.forEach((function(e){r.add(ft(e)||"Component"),Lf.add(e.type)})),Tf=[]);var a=new Set;Rf.length>0&&(Rf.forEach((function(e){a.add(ft(e)||"Component"),Lf.add(e.type)})),Rf=[]);var s=new Set;Pf.length>0&&(Pf.forEach((function(e){s.add(ft(e)||"Component"),Lf.add(e.type)})),Pf=[]),t.size>0&&o("Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n\nPlease update the following components: %s",Mf(t)),r.size>0&&o("Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n\nPlease update the following components: %s",Mf(r)),s.size>0&&o("Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s",Mf(s)),e.size>0&&i("componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",Mf(e)),n.size>0&&i("componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",Mf(n)),a.size>0&&i("componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",Mf(a))};var If=new Map,Of=new Set;function Nf(e,t){if(e&&e.defaultProps){var n=Ge({},t),r=e.defaultProps;for(var i in r)void 0===n[i]&&(n[i]=r[i]);return n}return t}kf.recordLegacyContextWarning=function(e,t){var n=function(e){for(var t=null,n=e;null!==n;)n.mode&so&&(t=n),n=n.return;return t}(e);if(null!==n){if(!Of.has(e.type)){var r=If.get(n);(null!=e.type.contextTypes||null!=e.type.childContextTypes||null!==t&&"function"==typeof t.getChildContext)&&(void 0===r&&(r=[],If.set(n,r)),r.push(e))}}else o("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.")},kf.flushLegacyContextWarning=function(){If.forEach((function(e,t){if(0!==e.length){var n=e[0],r=new Set;e.forEach((function(e){r.add(ft(e)||"Component"),Of.add(e.type)}));var i=Mf(r);try{yt(n),o("Legacy context API has been detected within a strict-mode tree.\n\nThe old API will be supported in all 16.x releases, but applications using it should migrate to the new version.\n\nPlease update the following components: %s\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context",i)}finally{bt()}}}))},kf.discardPendingWarnings=function(){Cf=[],xf=[],Af=[],Tf=[],Rf=[],Pf=[],If=new Map};var Df,Bf=od(null);Df={};var jf=null,zf=null,Uf=null,Ff=!1;function Kf(){jf=null,zf=null,Uf=null,Ff=!1}function qf(){Ff=!0}function Hf(){Ff=!1}function Wf(e,t,n){sd(Bf,t._currentValue,e),t._currentValue=n,void 0!==t._currentRenderer&&null!==t._currentRenderer&&t._currentRenderer!==Df&&o("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=Df}function $f(e,t){var n=Bf.current;ad(Bf,t),e._currentValue=n}function Vf(e,t,n){for(var r=e;null!==r;){var i=r.alternate;if(ma(r.childLanes,t)?null===i||ma(i.childLanes,t)||(i.childLanes=ga(i.childLanes,t)):(r.childLanes=ga(r.childLanes,t),null!==i&&(i.childLanes=ga(i.childLanes,t))),r===n)break;r=r.return}r!==n&&o("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function Yf(e,t,n){!function(e,t,n){var r=e.child;for(null!==r&&(r.return=e);null!==r;){var i=void 0,o=r.dependencies;if(null!==o){i=r.child;for(var a=o.firstContext;null!==a;){if(a.context===t){if(r.tag===u){var s=da(n),l=fh(Xo,s);l.tag=sh;var c=r.updateQueue;if(null===c);else{var d=c.shared,f=d.pending;null===f?l.next=l:(l.next=f.next,f.next=l),d.pending=l}}r.lanes=ga(r.lanes,n);var h=r.alternate;null!==h&&(h.lanes=ga(h.lanes,n)),Vf(r.return,n,e),o.lanes=ga(o.lanes,n);break}a=a.next}}else if(r.tag===v)i=r.type===e.type?null:r.child;else if(r.tag===M){var p=r.return;if(null===p)throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");p.lanes=ga(p.lanes,n);var m=p.alternate;null!==m&&(m.lanes=ga(m.lanes,n)),Vf(p,n,e),i=r.sibling}else i=r.child;if(null!==i)i.return=r;else for(i=r;null!==i;){if(i===e){i=null;break}var g=i.sibling;if(null!==g){g.return=i.return,i=g;break}i=i.return}r=i}}(e,t,n)}function Gf(e,t){jf=e,zf=null,Uf=null;var n=e.dependencies;null!==n&&null!==n.firstContext&&(pa(n.lanes,t)&&xv(),n.firstContext=null)}function Zf(e){Ff&&o("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");var t=e._currentValue;if(Uf===e);else{var n={context:e,memoizedValue:t,next:null};if(null===zf){if(null===jf)throw new Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");zf=n,jf.dependencies={lanes:po,firstContext:n}}else zf=zf.next=n}return t}var Qf=null;function Xf(e){null===Qf?Qf=[e]:Qf.push(e)}function Jf(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Xf(t)):(n.next=i.next,i.next=n),t.interleaved=n,nh(e,r)}function eh(e,t){return nh(e,t)}var th=nh;function nh(e,t){e.lanes=ga(e.lanes,t);var n=e.alternate;null!==n&&(n.lanes=ga(n.lanes,t)),null===n&&(e.flags&(Fr|Qr))!==zr&&Dw(e);for(var r=e,i=e.return;null!==i;)i.childLanes=ga(i.childLanes,t),null!==(n=i.alternate)?n.childLanes=ga(n.childLanes,t):(i.flags&(Fr|Qr))!==zr&&Dw(e),r=i,i=i.return;return r.tag===c?r.stateNode:null}var rh,ih,oh=0,ah=1,sh=2,uh=3,lh=!1;function ch(e){var t={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:po},effects:null};e.updateQueue=t}function dh(e,t){var n=t.updateQueue,r=e.updateQueue;if(n===r){var i={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects};t.updateQueue=i}}function fh(e,t){return{eventTime:e,lane:t,tag:oh,payload:null,callback:null,next:null}}function hh(e,t,n){var r=e.updateQueue;if(null===r)return null;var i=r.shared;if(ih!==i||rh||(o("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),rh=!0),(cy&ty)!==Jb){var a=i.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),i.pending=t,th(e,n)}return function(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Xf(t)):(n.next=i.next,i.next=n),t.interleaved=n,nh(e,r)}(e,i,t,n)}function ph(e,t,n){var r=t.updateQueue;if(null!==r){var i=r.shared;if(ua(n)){var o=i.lanes,a=ga(o=ba(o,e.pendingLanes),n);i.lanes=a,Sa(e,a)}}}function mh(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r){var i=r.updateQueue;if(n===i){var o=null,a=null,s=n.firstBaseUpdate;if(null!==s){var u=s;do{var l={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};null===a?o=a=l:(a.next=l,a=l),u=u.next}while(null!==u);null===a?o=a=t:(a.next=t,a=t)}else o=a=t;return n={baseState:i.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:i.shared,effects:i.effects},void(e.updateQueue=n)}}var c=n.lastBaseUpdate;null===c?n.firstBaseUpdate=t:c.next=t,n.lastBaseUpdate=t}function gh(e,t,n,r,i,o){switch(n.tag){case ah:var a=n.payload;if("function"==typeof a){qf();var s=a.call(o,r,i);if(e.mode&so){Hi(!0);try{a.call(o,r,i)}finally{Hi(!1)}}return Hf(),s}return a;case uh:e.flags=e.flags&~ri|$r;case oh:var u,l=n.payload;if("function"==typeof l){if(qf(),u=l.call(o,r,i),e.mode&so){Hi(!0);try{l.call(o,r,i)}finally{Hi(!1)}}Hf()}else u=l;return null==u?r:Ge({},r,u);case sh:return lh=!0,r}return r}function vh(e,t,n,r){var i=e.updateQueue;lh=!1,ih=i.shared;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var u=s,l=u.next;u.next=null,null===a?o=l:a.next=l,a=u;var c=e.alternate;if(null!==c){var d=c.updateQueue,f=d.lastBaseUpdate;f!==a&&(null===f?d.firstBaseUpdate=l:f.next=l,d.lastBaseUpdate=u)}}if(null!==o){for(var h=i.baseState,p=po,m=null,g=null,v=null,b=o;;){var y=b.lane,w=b.eventTime;if(ma(r,y)){if(null!==v){var _={eventTime:w,lane:mo,tag:b.tag,payload:b.payload,callback:b.callback,next:null};v=v.next=_}if(h=gh(e,0,b,h,t,n),null!==b.callback&&b.lane!==mo){e.flags|=Wr;var S=i.effects;null===S?i.effects=[b]:S.push(b)}}else{var E={eventTime:w,lane:y,tag:b.tag,payload:b.payload,callback:b.callback,next:null};null===v?(g=v=E,m=h):v=v.next=E,p=ga(p,y)}if(null===(b=b.next)){if(null===(s=i.shared.pending))break;var k=s,M=k.next;k.next=null,b=M,i.lastBaseUpdate=k,i.shared.pending=null}}null===v&&(m=h),i.baseState=m,i.firstBaseUpdate=g,i.lastBaseUpdate=v;var C=i.shared.interleaved;if(null!==C){var x=C;do{p=ga(p,x.lane),x=x.next}while(x!==C)}else null===o&&(i.shared.lanes=po);mw(p),e.lanes=p,e.memoizedState=h}ih=null}function bh(e,t){if("function"!=typeof e)throw new Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(t)}function yh(){lh=!1}function wh(){return lh}function _h(e,t,n){var r=t.effects;if(t.effects=null,null!==r)for(var i=0;i<r.length;i++){var o=r[i],a=o.callback;null!==a&&(o.callback=null,bh(a,n))}}rh=!1,ih=null;var Sh,Eh,kh,Mh,Ch,xh,Ah,Th,Rh,Ph,Lh={},Ih=(new e.Component).refs;Sh=new Set,Eh=new Set,kh=new Set,Mh=new Set,Th=new Set,Ch=new Set,Rh=new Set,Ph=new Set;var Oh=new Set;function Nh(e,t,n,r){var i=e.memoizedState,o=n(r,i);if(e.mode&so){Hi(!0);try{o=n(r,i)}finally{Hi(!1)}}xh(t,o);var a=null==o?i:Ge({},i,o);e.memoizedState=a,e.lanes===po&&(e.updateQueue.baseState=a)}Ah=function(e,t){if(null!==e&&"function"!=typeof e){var n=t+"_"+e;Oh.has(n)||(Oh.add(n),o("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e))}},xh=function(e,t){if(void 0===t){var n=ct(e)||"Component";Ch.has(n)||(Ch.add(n),o("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))}},Object.defineProperty(Lh,"_processChildContext",{enumerable:!1,value:function(){throw new Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(Lh);var Dh,Bh,jh,zh,Uh,Fh,Kh={isMounted:function(e){var t=gi.current;if(null!==t&&t.tag===u){var n=t,r=n.stateNode;r._warnedAboutRefsInRender||o("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",ft(n)||"A component"),r._warnedAboutRefsInRender=!0}var i=jr(e);return!!i&&vi(i)===i},enqueueSetState:function(e,t,n){var r=jr(e),i=Zy(),o=Qy(r),a=fh(i,o);a.payload=t,null!=n&&(Ah(n,"setState"),a.callback=n);var s=hh(r,a,o);null!==s&&(Jy(s,r,o,i),ph(s,r,o)),ro(r,o)},enqueueReplaceState:function(e,t,n){var r=jr(e),i=Zy(),o=Qy(r),a=fh(i,o);a.tag=ah,a.payload=t,null!=n&&(Ah(n,"replaceState"),a.callback=n);var s=hh(r,a,o);null!==s&&(Jy(s,r,o,i),ph(s,r,o)),ro(r,o)},enqueueForceUpdate:function(e,t){var n=jr(e),r=Zy(),i=Qy(n),o=fh(r,i);o.tag=sh,null!=t&&(Ah(t,"forceUpdate"),o.callback=t);var a=hh(n,o,i);null!==a&&(Jy(a,n,i,r),ph(a,n,i)),function(e,t){null!==Fi&&"function"==typeof Fi.markForceUpdateScheduled&&Fi.markForceUpdateScheduled(e,t)}(n,i)}};function qh(e,t,n,r,i,a,s){var u=e.stateNode;if("function"==typeof u.shouldComponentUpdate){var l=u.shouldComponentUpdate(r,a,s);if(e.mode&so){Hi(!0);try{l=u.shouldComponentUpdate(r,a,s)}finally{Hi(!1)}}return void 0===l&&o("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",ct(t)||"Component"),l}return!(t.prototype&&t.prototype.isPureReactComponent&&Au(n,r)&&Au(i,a))}function Hh(e,t){t.updater=Kh,e.stateNode=t,function(e,t){e._reactInternals=t}(t,e),t._reactInternalInstance=Lh}function Wh(e,t,n){var r=!1,i=ud,a=ud,s=t.contextType;if("contextType"in t&&null!==s&&(void 0===s||s.$$typeof!==Le||void 0!==s._context)&&!Ph.has(t)){Ph.add(t);var u="";u=void 0===s?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":"object"!=typeof s?" However, it is set to a "+typeof s+".":s.$$typeof===Pe?" Did you accidentally pass the Context.Provider instead?":void 0!==s._context?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(s).join(", ")+"}.",o("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",ct(t)||"Component",u)}"object"==typeof s&&null!==s?a=Zf(s):(i=fd(0,t,!0),a=(r=null!=t.contextTypes)?pd(e,i):ud);var l=new t(n,a);if(e.mode&so){Hi(!0);try{l=new t(n,a)}finally{Hi(!1)}}var c=e.memoizedState=null!==l.state&&void 0!==l.state?l.state:null;if(Hh(e,l),"function"==typeof t.getDerivedStateFromProps&&null===c){var d=ct(t)||"Component";Eh.has(d)||(Eh.add(d),o("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",d,null===l.state?"null":"undefined",d))}if("function"==typeof t.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate){var f=null,h=null,p=null;if("function"==typeof l.componentWillMount&&!0!==l.componentWillMount.__suppressDeprecationWarning?f="componentWillMount":"function"==typeof l.UNSAFE_componentWillMount&&(f="UNSAFE_componentWillMount"),"function"==typeof l.componentWillReceiveProps&&!0!==l.componentWillReceiveProps.__suppressDeprecationWarning?h="componentWillReceiveProps":"function"==typeof l.UNSAFE_componentWillReceiveProps&&(h="UNSAFE_componentWillReceiveProps"),"function"==typeof l.componentWillUpdate&&!0!==l.componentWillUpdate.__suppressDeprecationWarning?p="componentWillUpdate":"function"==typeof l.UNSAFE_componentWillUpdate&&(p="UNSAFE_componentWillUpdate"),null!==f||null!==h||null!==p){var m=ct(t)||"Component",g="function"==typeof t.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";Mh.has(m)||(Mh.add(m),o("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://reactjs.org/link/unsafe-component-lifecycles",m,g,null!==f?"\n "+f:"",null!==h?"\n "+h:"",null!==p?"\n "+p:""))}}return r&&hd(e,i,a),l}function $h(e,t,n,r){var i=t.state;if("function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==i){var a=ft(e)||"Component";Sh.has(a)||(Sh.add(a),o("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",a)),Kh.enqueueReplaceState(t,t.state,null)}}function Vh(e,t,n,r){!function(e,t,n){var r=e.stateNode,i=ct(t)||"Component";r.render||(t.prototype&&"function"==typeof t.prototype.render?o("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",i):o("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",i)),!r.getInitialState||r.getInitialState.isReactClassApproved||r.state||o("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",i),r.getDefaultProps&&!r.getDefaultProps.isReactClassApproved&&o("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",i),r.propTypes&&o("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",i),r.contextType&&o("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",i),r.contextTypes&&o("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",i),t.contextType&&t.contextTypes&&!Rh.has(t)&&(Rh.add(t),o("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",i)),"function"==typeof r.componentShouldUpdate&&o("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",i),t.prototype&&t.prototype.isPureReactComponent&&void 0!==r.shouldComponentUpdate&&o("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",ct(t)||"A pure component"),"function"==typeof r.componentDidUnmount&&o("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",i),"function"==typeof r.componentDidReceiveProps&&o("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",i),"function"==typeof r.componentWillRecieveProps&&o("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",i),"function"==typeof r.UNSAFE_componentWillRecieveProps&&o("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",i);var a=r.props!==n;void 0!==r.props&&a&&o("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",i,i),r.defaultProps&&o("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",i,i),"function"!=typeof r.getSnapshotBeforeUpdate||"function"==typeof r.componentDidUpdate||kh.has(t)||(kh.add(t),o("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",ct(t))),"function"==typeof r.getDerivedStateFromProps&&o("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",i),"function"==typeof r.getDerivedStateFromError&&o("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",i),"function"==typeof t.getSnapshotBeforeUpdate&&o("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",i);var s=r.state;s&&("object"!=typeof s||Yt(s))&&o("%s.state: must be set to an object or null",i),"function"==typeof r.getChildContext&&"object"!=typeof t.childContextTypes&&o("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",i)}(e,t,n);var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Ih,ch(e);var a=t.contextType;if("object"==typeof a&&null!==a)i.context=Zf(a);else{var s=fd(0,t,!0);i.context=pd(e,s)}if(i.state===n){var u=ct(t)||"Component";Th.has(u)||(Th.add(u),o("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",u))}e.mode&so&&kf.recordLegacyContextWarning(e,i),kf.recordUnsafeLifecycleWarnings(e,i),i.state=e.memoizedState;var l=t.getDerivedStateFromProps;if("function"==typeof l&&(Nh(e,t,l,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(function(e,t){var n=t.state;"function"==typeof t.componentWillMount&&t.componentWillMount(),"function"==typeof t.UNSAFE_componentWillMount&&t.UNSAFE_componentWillMount(),n!==t.state&&(o("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",ft(e)||"Component"),Kh.enqueueReplaceState(t,t.state,null))}(e,i),vh(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount){var c=Kr;c|=si,(e.mode&uo)!==io&&(c|=li),e.flags|=c}}function Yh(e,t,n){var r=n.ref;if(null!==r&&"function"!=typeof r&&"object"!=typeof r){if((e.mode&so||z)&&(!n._owner||!n._self||n._owner.stateNode===n._self)){var i=ft(e)||"Component";jh[i]||(o('A string ref, "%s", has been found within a strict mode tree. String refs are a source of potential bugs and should be avoided. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',r),jh[i]=!0)}if(n._owner){var a,s=n._owner;if(s){var l=s;if(l.tag!==u)throw new Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");a=l.stateNode}if(!a)throw new Error("Missing owner for string ref "+r+". This error is likely caused by a bug in React. Please file an issue.");var c=a;!function(e,t){Q(e)&&o("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",t,Z(e))}(r,"ref");var d=""+r;if(null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===d)return t.ref;var f=function(e){var t=c.refs;t===Ih&&(t=c.refs={}),null===e?delete t[d]:t[d]=e};return f._stringRef=d,f}if("string"!=typeof r)throw new Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!n._owner)throw new Error("Element ref was specified as a string ("+r+") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information.")}return r}function Gh(e,t){var n=Object.prototype.toString.call(t);throw new Error("Objects are not valid as a React child (found: "+("[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.")}function Zh(e){var t=ft(e)||"Component";Uh[t]||(Uh[t]=!0,o("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it."))}function Qh(e){var t=e._payload;return(0,e._init)(t)}function Xh(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=qr):r.push(n)}}function n(n,r){if(!e)return null;for(var i=r;null!==i;)t(n,i),i=i.sibling;return null}function r(e,t){for(var n=new Map,r=t;null!==r;)null!==r.key?n.set(r.key,r):n.set(r.index,r),r=r.sibling;return n}function i(e,t){var n=l_(e,t);return n.index=0,n.sibling=null,n}function a(t,n,r){if(t.index=r,!e)return t.flags|=oi,n;var i=t.alternate;if(null!==i){var o=i.index;return o<n?(t.flags|=Fr,n):o}return t.flags|=Fr,n}function s(t){return e&&null===t.alternate&&(t.flags|=Fr),t}function u(e,t,n,r){if(null===t||t.tag!==h){var o=m_(n,e.mode,r);return o.return=e,o}var a=i(t,n);return a.return=e,a}function l(e,t,n,r){var o=n.type;if(o===Ae)return f(e,t,n.props.children,r,n.key);if(null!==t&&(t.elementType===o||Qw(t,n)||"object"==typeof o&&null!==o&&o.$$typeof===Be&&Qh(o)===t.type)){var a=i(t,n.props);return a.ref=Yh(e,t,n),a.return=e,a._debugSource=n._source,a._debugOwner=n._owner,a}var s=f_(n,e.mode,r);return s.ref=Yh(e,t,n),s.return=e,s}function c(e,t,n,r){if(null===t||t.tag!==d||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation){var o=g_(n,e.mode,r);return o.return=e,o}var a=i(t,n.children||[]);return a.return=e,a}function f(e,t,n,r,o){if(null===t||t.tag!==p){var a=h_(n,e.mode,r,o);return a.return=e,a}var s=i(t,n);return s.return=e,s}function m(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t){var r=m_(""+t,e.mode,n);return r.return=e,r}if("object"==typeof t&&null!==t){switch(t.$$typeof){case Ce:var i=f_(t,e.mode,n);return i.ref=Yh(e,null,t),i.return=e,i;case xe:var o=g_(t,e.mode,n);return o.return=e,o;case Be:var a=t._payload;return m(e,(0,t._init)(a),n)}if(Yt(t)||Fe(t)){var s=h_(t,e.mode,n,null);return s.return=e,s}Gh(0,t)}return"function"==typeof t&&Zh(e),null}function g(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Ce:return n.key===i?l(e,t,n,r):null;case xe:return n.key===i?c(e,t,n,r):null;case Be:var o=n._payload;return g(e,t,(0,n._init)(o),r)}if(Yt(n)||Fe(n))return null!==i?null:f(e,t,n,r,null);Gh(0,n)}return"function"==typeof n&&Zh(e),null}function v(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return u(t,e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Ce:return l(t,e.get(null===r.key?n:r.key)||null,r,i);case xe:return c(t,e.get(null===r.key?n:r.key)||null,r,i);case Be:var o=r._payload;return v(e,t,n,(0,r._init)(o),i)}if(Yt(r)||Fe(r))return f(t,e.get(n)||null,r,i,null);Gh(0,r)}return"function"==typeof r&&Zh(t),null}function b(e,t,n){if("object"!=typeof e||null===e)return t;switch(e.$$typeof){case Ce:case xe:Fh(e,n);var r=e.key;if("string"!=typeof r)break;if(null===t){(t=new Set).add(r);break}if(!t.has(r)){t.add(r);break}o("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",r);break;case Be:var i=e._payload;b((0,e._init)(i),t,n)}return t}return function u(l,c,f,y){if("object"==typeof f&&null!==f&&f.type===Ae&&null===f.key&&(f=f.props.children),"object"==typeof f&&null!==f){switch(f.$$typeof){case Ce:return s(function(e,r,o,a){for(var s=o.key,u=r;null!==u;){if(u.key===s){var l=o.type;if(l===Ae){if(u.tag===p){n(e,u.sibling);var c=i(u,o.props.children);return c.return=e,c._debugSource=o._source,c._debugOwner=o._owner,c}}else if(u.elementType===l||Qw(u,o)||"object"==typeof l&&null!==l&&l.$$typeof===Be&&Qh(l)===u.type){n(e,u.sibling);var d=i(u,o.props);return d.ref=Yh(e,u,o),d.return=e,d._debugSource=o._source,d._debugOwner=o._owner,d}n(e,u);break}t(e,u),u=u.sibling}if(o.type===Ae){var f=h_(o.props.children,e.mode,a,o.key);return f.return=e,f}var h=f_(o,e.mode,a);return h.ref=Yh(e,r,o),h.return=e,h}(l,c,f,y));case xe:return s(function(e,r,o,a){for(var s=o.key,u=r;null!==u;){if(u.key===s){if(u.tag===d&&u.stateNode.containerInfo===o.containerInfo&&u.stateNode.implementation===o.implementation){n(e,u.sibling);var l=i(u,o.children||[]);return l.return=e,l}n(e,u);break}t(e,u),u=u.sibling}var c=g_(o,e.mode,a);return c.return=e,c}(l,c,f,y));case Be:var w=f._payload;return u(l,c,(0,f._init)(w),y)}if(Yt(f))return function(i,o,s,u){for(var l=null,c=0;c<s.length;c++)l=b(s[c],l,i);for(var d=null,f=null,h=o,p=0,y=0,w=null;null!==h&&y<s.length;y++){h.index>y?(w=h,h=null):w=h.sibling;var _=g(i,h,s[y],u);if(null===_){null===h&&(h=w);break}e&&h&&null===_.alternate&&t(i,h),p=a(_,p,y),null===f?d=_:f.sibling=_,f=_,h=w}if(y===s.length)return n(i,h),wf()&&Kd(i,y),d;if(null===h){for(;y<s.length;y++){var S=m(i,s[y],u);null!==S&&(p=a(S,p,y),null===f?d=S:f.sibling=S,f=S)}return wf()&&Kd(i,y),d}for(var E=r(0,h);y<s.length;y++){var k=v(E,i,y,s[y],u);null!==k&&(e&&null!==k.alternate&&E.delete(null===k.key?y:k.key),p=a(k,p,y),null===f?d=k:f.sibling=k,f=k)}return e&&E.forEach((function(e){return t(i,e)})),wf()&&Kd(i,y),d}(l,c,f,y);if(Fe(f))return function(i,s,u,l){var c=Fe(u);if("function"!=typeof c)throw new Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");"function"==typeof Symbol&&"Generator"===u[Symbol.toStringTag]&&(Bh||o("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),Bh=!0),u.entries===c&&(Dh||o("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Dh=!0);var d=c.call(u);if(d)for(var f=null,h=d.next();!h.done;h=d.next())f=b(h.value,f,i);var p=c.call(u);if(null==p)throw new Error("An iterable object provided no iterator.");for(var y=null,w=null,_=s,S=0,E=0,k=null,M=p.next();null!==_&&!M.done;E++,M=p.next()){_.index>E?(k=_,_=null):k=_.sibling;var C=g(i,_,M.value,l);if(null===C){null===_&&(_=k);break}e&&_&&null===C.alternate&&t(i,_),S=a(C,S,E),null===w?y=C:w.sibling=C,w=C,_=k}if(M.done)return n(i,_),wf()&&Kd(i,E),y;if(null===_){for(;!M.done;E++,M=p.next()){var x=m(i,M.value,l);null!==x&&(S=a(x,S,E),null===w?y=x:w.sibling=x,w=x)}return wf()&&Kd(i,E),y}for(var A=r(0,_);!M.done;E++,M=p.next()){var T=v(A,i,E,M.value,l);null!==T&&(e&&null!==T.alternate&&A.delete(null===T.key?E:T.key),S=a(T,S,E),null===w?y=T:w.sibling=T,w=T)}return e&&A.forEach((function(e){return t(i,e)})),wf()&&Kd(i,E),y}(l,c,f,y);Gh(0,f)}return"string"==typeof f&&""!==f||"number"==typeof f?s(function(e,t,r,o){if(null!==t&&t.tag===h){n(e,t.sibling);var a=i(t,r);return a.return=e,a}n(e,t);var s=m_(r,e.mode,o);return s.return=e,s}(l,c,""+f,y)):("function"==typeof f&&Zh(l),n(l,c))}}Dh=!1,Bh=!1,jh={},zh={},Uh={},Fh=function(e,t){if(null!==e&&"object"==typeof e&&e._store&&!e._store.validated&&null==e.key){if("object"!=typeof e._store)throw new Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");e._store.validated=!0;var n=ft(t)||"Component";zh[n]||(zh[n]=!0,o('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};var Jh=Xh(!0),ep=Xh(!1);function tp(e,t){for(var n=e.child;null!==n;)c_(n,t),n=n.sibling}var np={},rp=od(np),ip=od(np),op=od(np);function ap(e){if(e===np)throw new Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return e}function sp(){return ap(op.current)}function up(e,t){sd(op,t,e),sd(ip,e,e),sd(rp,np,e);var n=function(e){var t,n,r=e.nodeType;switch(r){case vn:case bn:t=r===vn?"#document":"#fragment";var i=e.documentElement;n=i?i.namespaceURI:cn(null,"");break;default:var o=r===gn?e.parentNode:e;n=cn(o.namespaceURI||null,t=o.tagName)}var a=t.toLowerCase();return{namespace:n,ancestorInfo:Jl(null,a)}}(t);ad(rp,e),sd(rp,n,e)}function lp(e){ad(rp,e),ad(ip,e),ad(op,e)}function cp(){return ap(rp.current)}function dp(e){ap(op.current);var t,n,r,i=ap(rp.current),o=(t=i,n=e.type,{namespace:cn((r=t).namespace,n),ancestorInfo:Jl(r.ancestorInfo,n)});i!==o&&(sd(ip,e,e),sd(rp,o,e))}function fp(e){ip.current===e&&(ad(rp,e),ad(ip,e))}var hp=1,pp=1,mp=2,gp=od(0);function vp(e,t){return 0!=(e&t)}function bp(e){return e&hp}function yp(e,t){return e&hp|t}function wp(e,t){sd(gp,t,e)}function _p(e){ad(gp,e)}function Sp(e,t){var n=e.memoizedState;return null!==n?null!==n.dehydrated:(e.memoizedProps,!0)}function Ep(e){for(var t=e;null!==t;){if(t.tag===w){var n=t.memoizedState;if(null!==n){var r=n.dehydrated;if(null===r||Tc(r)||Rc(r))return t}}else if(t.tag===C&&void 0!==t.memoizedProps.revealOrder){if((t.flags&$r)!==zr)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)return null;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var kp=0,Mp=1,Cp=2,xp=4,Ap=8,Tp=[];function Rp(){for(var e=0;e<Tp.length;e++)Tp[e]._workInProgressVersionPrimary=null;Tp.length=0}function Pp(e,t){var n=(0,t._getVersion)(t._source);null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)}var Lp,Ip,Op=n.ReactCurrentDispatcher,Np=n.ReactCurrentBatchConfig;Lp=new Set;var Dp=po,Bp=null,jp=null,zp=null,Up=!1,Fp=!1,Kp=0,qp=0,Hp=25,Wp=null,$p=null,Vp=-1,Yp=!1;function Gp(){var e=Wp;null===$p?$p=[e]:$p.push(e)}function Zp(){var e=Wp;null!==$p&&(Vp++,$p[Vp]!==e&&function(e){var t=ft(Bp);if(!Lp.has(t)&&(Lp.add(t),null!==$p)){for(var n="",r=30,i=0;i<=Vp;i++){for(var a=$p[i],s=i===Vp?e:a,u=i+1+". "+a;u.length<r;)u+=" ";n+=u+=s+"\n"}o("React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",t,n)}}(e))}function Qp(e){null==e||Yt(e)||o("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",Wp,typeof e)}function Xp(){throw new Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.")}function Jp(e,t){if(Yp)return!1;if(null===t)return o("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",Wp),!1;e.length!==t.length&&o("The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s",Wp,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var n=0;n<t.length&&n<e.length;n++)if(!xu(e[n],t[n]))return!1;return!0}function em(e,t,n,r,i,a){Dp=a,Bp=t,$p=null!==e?e._debugHookTypes:null,Vp=-1,Yp=null!==e&&e.type!==t.type,t.memoizedState=null,t.updateQueue=null,t.lanes=po,null!==e&&null!==e.memoizedState?Op.current=ag:Op.current=null!==$p?og:ig;var s=n(r,i);if(Fp){var u=0;do{if(Fp=!1,Kp=0,u>=Hp)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");u+=1,Yp=!1,jp=null,zp=null,t.updateQueue=null,Vp=-1,Op.current=sg,s=n(r,i)}while(Fp)}Op.current=rg,t._debugHookTypes=$p;var l=null!==jp&&null!==jp.next;if(Dp=po,Bp=null,jp=null,zp=null,Wp=null,$p=null,Vp=-1,null!==e&&(e.flags&mi)!=(t.flags&mi)&&(e.mode&oo)!==io&&o("Internal React error: Expected static flag was missing. Please notify the React team."),Up=!1,l)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return s}function tm(){var e=0!==Kp;return Kp=0,e}function nm(e,t,n){t.updateQueue=e.updateQueue,(t.mode&uo)!==io?t.flags&=~(ci|li|Zr|Kr):t.flags&=~(Zr|Kr),e.lanes=va(e.lanes,n)}function rm(){if(Op.current=rg,Up){for(var e=Bp.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Up=!1}Dp=po,Bp=null,jp=null,zp=null,$p=null,Vp=-1,Wp=null,Ym=!1,Fp=!1,Kp=0}function im(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===zp?Bp.memoizedState=zp=e:zp=zp.next=e,zp}function om(){var e,t;if(null===jp){var n=Bp.alternate;e=null!==n?n.memoizedState:null}else e=jp.next;if(null!==(t=null===zp?Bp.memoizedState:zp.next))t=(zp=t).next,jp=e;else{if(null===e)throw new Error("Rendered more hooks than during the previous render.");var r={memoizedState:(jp=e).memoizedState,baseState:jp.baseState,baseQueue:jp.baseQueue,queue:jp.queue,next:null};null===zp?Bp.memoizedState=zp=r:zp=zp.next=r}return zp}function am(e,t){return"function"==typeof t?t(e):t}function sm(e,t,n){var r,i=im();r=void 0!==n?n(t):t,i.memoizedState=i.baseState=r;var o={pending:null,interleaved:null,lanes:po,dispatch:null,lastRenderedReducer:e,lastRenderedState:r};i.queue=o;var a=o.dispatch=Qm.bind(null,Bp,o);return[i.memoizedState,a]}function um(e,t,n){var r=om(),i=r.queue;if(null===i)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");i.lastRenderedReducer=e;var a=jp,s=a.baseQueue,u=i.pending;if(null!==u){if(null!==s){var l=s.next,c=u.next;s.next=c,u.next=l}a.baseQueue!==s&&o("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),a.baseQueue=s=u,i.pending=null}if(null!==s){var d=s.next,f=a.baseState,h=null,p=null,m=null,g=d;do{var v=g.lane;if(ma(Dp,v)){if(null!==m){var b={lane:mo,action:g.action,hasEagerState:g.hasEagerState,eagerState:g.eagerState,next:null};m=m.next=b}f=g.hasEagerState?g.eagerState:e(f,g.action)}else{var y={lane:v,action:g.action,hasEagerState:g.hasEagerState,eagerState:g.eagerState,next:null};null===m?(p=m=y,h=f):m=m.next=y,Bp.lanes=ga(Bp.lanes,v),mw(v)}g=g.next}while(null!==g&&g!==d);null===m?h=f:m.next=p,xu(f,r.memoizedState)||xv(),r.memoizedState=f,r.baseState=h,r.baseQueue=m,i.lastRenderedState=f}var w=i.interleaved;if(null!==w){var _=w;do{var S=_.lane;Bp.lanes=ga(Bp.lanes,S),mw(S),_=_.next}while(_!==w)}else null===s&&(i.lanes=po);var E=i.dispatch;return[r.memoizedState,E]}function lm(e,t,n){var r=om(),i=r.queue;if(null===i)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");i.lastRenderedReducer=e;var o=i.dispatch,a=i.pending,s=r.memoizedState;if(null!==a){i.pending=null;var u=a.next,l=u;do{s=e(s,l.action),l=l.next}while(l!==u);xu(s,r.memoizedState)||xv(),r.memoizedState=s,null===r.baseQueue&&(r.baseState=s),i.lastRenderedState=s}return[s,o]}function cm(e,t,n){var r,i=Bp,a=im();if(wf()){if(void 0===n)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");r=n(),Ip||r!==n()&&(o("The result of getServerSnapshot should be cached to avoid an infinite loop"),Ip=!0)}else{if(r=t(),!Ip){var s=t();xu(r,s)||(o("The result of getSnapshot should be cached to avoid an infinite loop"),Ip=!0)}if(null===Gy())throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");sa(0,Dp)||fm(i,t,r)}a.memoizedState=r;var u={value:r,getSnapshot:t};return a.queue=u,Mm(pm.bind(null,i,u,e),[e]),i.flags|=Zr,wm(Mp|Ap,hm.bind(null,i,u,r,t),void 0,null),r}function dm(e,t,n){var r=Bp,i=om(),a=t();if(!Ip){var s=t();xu(a,s)||(o("The result of getSnapshot should be cached to avoid an infinite loop"),Ip=!0)}var u=i.memoizedState,l=!xu(u,a);l&&(i.memoizedState=a,xv());var c=i.queue;if(Cm(pm.bind(null,r,c,e),[e]),c.getSnapshot!==t||l||null!==zp&&zp.memoizedState.tag&Mp){if(r.flags|=Zr,wm(Mp|Ap,hm.bind(null,r,c,a,t),void 0,null),null===Gy())throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");sa(0,Dp)||fm(r,t,a)}return a}function fm(e,t,n){e.flags|=Jr;var r={getSnapshot:t,value:n},i=Bp.updateQueue;if(null===i)i={lastEffect:null,stores:null},Bp.updateQueue=i,i.stores=[r];else{var o=i.stores;null===o?i.stores=[r]:o.push(r)}}function hm(e,t,n,r){t.value=n,t.getSnapshot=r,mm(t)&&gm(e)}function pm(e,t,n){return n((function(){mm(t)&&gm(e)}))}function mm(e){var t=e.getSnapshot,n=e.value;try{var r=t();return!xu(n,r)}catch(e){return!0}}function gm(e){var t=eh(e,go);null!==t&&Jy(t,e,go,Xo)}function vm(e){var t=im();"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e;var n={pending:null,interleaved:null,lanes:po,dispatch:null,lastRenderedReducer:am,lastRenderedState:e};t.queue=n;var r=n.dispatch=Xm.bind(null,Bp,n);return[t.memoizedState,r]}function bm(e){return um(am)}function ym(e){return lm(am)}function wm(e,t,n,r){var i={tag:e,create:t,destroy:n,deps:r,next:null},o=Bp.updateQueue;if(null===o)o={lastEffect:null,stores:null},Bp.updateQueue=o,o.lastEffect=i.next=i;else{var a=o.lastEffect;if(null===a)o.lastEffect=i.next=i;else{var s=a.next;a.next=i,i.next=s,o.lastEffect=i}}return i}function _m(e){var t={current:e};return im().memoizedState=t,t}function Sm(e){return om().memoizedState}function Em(e,t,n,r){var i=im(),o=void 0===r?null:r;Bp.flags|=e,i.memoizedState=wm(Mp|t,n,void 0,o)}function km(e,t,n,r){var i=om(),o=void 0===r?null:r,a=void 0;if(null!==jp){var s=jp.memoizedState;if(a=s.destroy,null!==o&&Jp(o,s.deps))return void(i.memoizedState=wm(t,n,a,o))}Bp.flags|=e,i.memoizedState=wm(Mp|t,n,a,o)}function Mm(e,t){return(Bp.mode&uo)!==io?Em(ci|Zr|ui,Ap,e,t):Em(Zr|ui,Ap,e,t)}function Cm(e,t){return km(Zr,Ap,e,t)}function xm(e,t){return Em(Kr,Cp,e,t)}function Am(e,t){return km(Kr,Cp,e,t)}function Tm(e,t){var n=Kr;return n|=si,(Bp.mode&uo)!==io&&(n|=li),Em(n,xp,e,t)}function Rm(e,t){return km(Kr,xp,e,t)}function Pm(e,t){if("function"==typeof t){var n=t,r=e();return n(r),function(){n(null)}}if(null!=t){var i=t;i.hasOwnProperty("current")||o("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(i).join(", ")+"}");var a=e();return i.current=a,function(){i.current=null}}}function Lm(e,t,n){"function"!=typeof t&&o("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",null!==t?typeof t:"null");var r=null!=n?n.concat([e]):null,i=Kr;return i|=si,(Bp.mode&uo)!==io&&(i|=li),Em(i,xp,Pm.bind(null,t,e),r)}function Im(e,t,n){"function"!=typeof t&&o("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",null!==t?typeof t:"null");var r=null!=n?n.concat([e]):null;return km(Kr,xp,Pm.bind(null,t,e),r)}function Om(e,t){}var Nm=Om;function Dm(e,t){var n=void 0===t?null:t;return im().memoizedState=[e,n],e}function Bm(e,t){var n=om(),r=void 0===t?null:t,i=n.memoizedState;return null!==i&&null!==r&&Jp(r,i[1])?i[0]:(n.memoizedState=[e,r],e)}function jm(e,t){var n=im(),r=void 0===t?null:t,i=e();return n.memoizedState=[i,r],i}function zm(e,t){var n=om(),r=void 0===t?null:t,i=n.memoizedState;if(null!==i&&null!==r&&Jp(r,i[1]))return i[0];var o=e();return n.memoizedState=[o,r],o}function Um(e){return im().memoizedState=e,e}function Fm(e){return qm(om(),jp.memoizedState,e)}function Km(e){var t=om();return null===jp?(t.memoizedState=e,e):qm(t,jp.memoizedState,e)}function qm(e,t,n){if((Dp&(go|bo|wo))!==po){if(!xu(n,t)){var r=la();Bp.lanes=ga(Bp.lanes,r),mw(r),e.baseState=!0}return t}return e.baseState&&(e.baseState=!1,xv()),e.memoizedState=n,n}function Hm(e,t,n){var r=Na();Da(function(e,t){return 0!==e&&e<t?e:t}(r,Pa)),e(!0);var o=Np.transition;Np.transition={};var a=Np.transition;Np.transition._updatedFibers=new Set;try{e(!1),t()}finally{Da(r),Np.transition=o,null===o&&a._updatedFibers&&(a._updatedFibers.size>10&&i("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),a._updatedFibers.clear())}}function Wm(){var e=vm(!1),t=e[0],n=e[1],r=Hm.bind(null,n);return im().memoizedState=r,[t,r]}function $m(){return[bm()[0],om().memoizedState]}function Vm(){return[ym()[0],om().memoizedState]}var Ym=!1;function Gm(){var e,t=im(),n=Gy().identifierPrefix;if(wf()){e=":"+n+"R"+Fd();var r=Kp++;r>0&&(e+="H"+r.toString(32)),e+=":"}else e=":"+n+"r"+(qp++).toString(32)+":";return t.memoizedState=e,e}function Zm(){return om().memoizedState}function Qm(e,t,n){"function"==typeof arguments[3]&&o("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var r=Qy(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Jm(e))eg(t,i);else{var a=Jf(e,t,i,r);null!==a&&(Jy(a,e,r,Zy()),tg(a,t,r))}ng(e,r)}function Xm(e,t,n){"function"==typeof arguments[3]&&o("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var r=Qy(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Jm(e))eg(t,i);else{var a=e.alternate;if(e.lanes===po&&(null===a||a.lanes===po)){var s=t.lastRenderedReducer;if(null!==s){var u;u=Op.current,Op.current=lg;try{var l=t.lastRenderedState,c=s(l,n);if(i.hasEagerState=!0,i.eagerState=c,xu(c,l))return void function(e,t,n,r){var i=t.interleaved;null===i?(n.next=n,Xf(t)):(n.next=i.next,i.next=n),t.interleaved=n}(0,t,i)}catch(e){}finally{Op.current=u}}}var d=Jf(e,t,i,r);null!==d&&(Jy(d,e,r,Zy()),tg(d,t,r))}ng(e,r)}function Jm(e){var t=e.alternate;return e===Bp||null!==t&&t===Bp}function eg(e,t){Fp=Up=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function tg(e,t,n){if(ua(n)){var r=t.lanes,i=ga(r=ba(r,e.pendingLanes),n);t.lanes=i,Sa(e,i)}}function ng(e,t,n){ro(e,t)}var rg={readContext:Zf,useCallback:Xp,useContext:Xp,useEffect:Xp,useImperativeHandle:Xp,useInsertionEffect:Xp,useLayoutEffect:Xp,useMemo:Xp,useReducer:Xp,useRef:Xp,useState:Xp,useDebugValue:Xp,useDeferredValue:Xp,useTransition:Xp,useMutableSource:Xp,useSyncExternalStore:Xp,useId:Xp,unstable_isNewReconciler:I},ig=null,og=null,ag=null,sg=null,ug=null,lg=null,cg=null,dg=function(){o("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},fg=function(){o("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};ig={readContext:function(e){return Zf(e)},useCallback:function(e,t){return Wp="useCallback",Gp(),Qp(t),Dm(e,t)},useContext:function(e){return Wp="useContext",Gp(),Zf(e)},useEffect:function(e,t){return Wp="useEffect",Gp(),Qp(t),Mm(e,t)},useImperativeHandle:function(e,t,n){return Wp="useImperativeHandle",Gp(),Qp(n),Lm(e,t,n)},useInsertionEffect:function(e,t){return Wp="useInsertionEffect",Gp(),Qp(t),xm(e,t)},useLayoutEffect:function(e,t){return Wp="useLayoutEffect",Gp(),Qp(t),Tm(e,t)},useMemo:function(e,t){Wp="useMemo",Gp(),Qp(t);var n=Op.current;Op.current=ug;try{return jm(e,t)}finally{Op.current=n}},useReducer:function(e,t,n){Wp="useReducer",Gp();var r=Op.current;Op.current=ug;try{return sm(e,t,n)}finally{Op.current=r}},useRef:function(e){return Wp="useRef",Gp(),_m(e)},useState:function(e){Wp="useState",Gp();var t=Op.current;Op.current=ug;try{return vm(e)}finally{Op.current=t}},useDebugValue:function(e,t){Wp="useDebugValue",Gp()},useDeferredValue:function(e){return Wp="useDeferredValue",Gp(),Um(e)},useTransition:function(){return Wp="useTransition",Gp(),Wm()},useMutableSource:function(e,t,n){Wp="useMutableSource",Gp()},useSyncExternalStore:function(e,t,n){return Wp="useSyncExternalStore",Gp(),cm(e,t,n)},useId:function(){return Wp="useId",Gp(),Gm()},unstable_isNewReconciler:I},og={readContext:function(e){return Zf(e)},useCallback:function(e,t){return Wp="useCallback",Zp(),Dm(e,t)},useContext:function(e){return Wp="useContext",Zp(),Zf(e)},useEffect:function(e,t){return Wp="useEffect",Zp(),Mm(e,t)},useImperativeHandle:function(e,t,n){return Wp="useImperativeHandle",Zp(),Lm(e,t,n)},useInsertionEffect:function(e,t){return Wp="useInsertionEffect",Zp(),xm(e,t)},useLayoutEffect:function(e,t){return Wp="useLayoutEffect",Zp(),Tm(e,t)},useMemo:function(e,t){Wp="useMemo",Zp();var n=Op.current;Op.current=ug;try{return jm(e,t)}finally{Op.current=n}},useReducer:function(e,t,n){Wp="useReducer",Zp();var r=Op.current;Op.current=ug;try{return sm(e,t,n)}finally{Op.current=r}},useRef:function(e){return Wp="useRef",Zp(),_m(e)},useState:function(e){Wp="useState",Zp();var t=Op.current;Op.current=ug;try{return vm(e)}finally{Op.current=t}},useDebugValue:function(e,t){Wp="useDebugValue",Zp()},useDeferredValue:function(e){return Wp="useDeferredValue",Zp(),Um(e)},useTransition:function(){return Wp="useTransition",Zp(),Wm()},useMutableSource:function(e,t,n){Wp="useMutableSource",Zp()},useSyncExternalStore:function(e,t,n){return Wp="useSyncExternalStore",Zp(),cm(e,t,n)},useId:function(){return Wp="useId",Zp(),Gm()},unstable_isNewReconciler:I},ag={readContext:function(e){return Zf(e)},useCallback:function(e,t){return Wp="useCallback",Zp(),Bm(e,t)},useContext:function(e){return Wp="useContext",Zp(),Zf(e)},useEffect:function(e,t){return Wp="useEffect",Zp(),Cm(e,t)},useImperativeHandle:function(e,t,n){return Wp="useImperativeHandle",Zp(),Im(e,t,n)},useInsertionEffect:function(e,t){return Wp="useInsertionEffect",Zp(),Am(e,t)},useLayoutEffect:function(e,t){return Wp="useLayoutEffect",Zp(),Rm(e,t)},useMemo:function(e,t){Wp="useMemo",Zp();var n=Op.current;Op.current=lg;try{return zm(e,t)}finally{Op.current=n}},useReducer:function(e,t,n){Wp="useReducer",Zp();var r=Op.current;Op.current=lg;try{return um(e)}finally{Op.current=r}},useRef:function(e){return Wp="useRef",Zp(),Sm()},useState:function(e){Wp="useState",Zp();var t=Op.current;Op.current=lg;try{return bm()}finally{Op.current=t}},useDebugValue:function(e,t){return Wp="useDebugValue",Zp(),Nm()},useDeferredValue:function(e){return Wp="useDeferredValue",Zp(),Fm(e)},useTransition:function(){return Wp="useTransition",Zp(),$m()},useMutableSource:function(e,t,n){Wp="useMutableSource",Zp()},useSyncExternalStore:function(e,t,n){return Wp="useSyncExternalStore",Zp(),dm(e,t)},useId:function(){return Wp="useId",Zp(),Zm()},unstable_isNewReconciler:I},sg={readContext:function(e){return Zf(e)},useCallback:function(e,t){return Wp="useCallback",Zp(),Bm(e,t)},useContext:function(e){return Wp="useContext",Zp(),Zf(e)},useEffect:function(e,t){return Wp="useEffect",Zp(),Cm(e,t)},useImperativeHandle:function(e,t,n){return Wp="useImperativeHandle",Zp(),Im(e,t,n)},useInsertionEffect:function(e,t){return Wp="useInsertionEffect",Zp(),Am(e,t)},useLayoutEffect:function(e,t){return Wp="useLayoutEffect",Zp(),Rm(e,t)},useMemo:function(e,t){Wp="useMemo",Zp();var n=Op.current;Op.current=cg;try{return zm(e,t)}finally{Op.current=n}},useReducer:function(e,t,n){Wp="useReducer",Zp();var r=Op.current;Op.current=cg;try{return lm(e)}finally{Op.current=r}},useRef:function(e){return Wp="useRef",Zp(),Sm()},useState:function(e){Wp="useState",Zp();var t=Op.current;Op.current=cg;try{return ym()}finally{Op.current=t}},useDebugValue:function(e,t){return Wp="useDebugValue",Zp(),Nm()},useDeferredValue:function(e){return Wp="useDeferredValue",Zp(),Km(e)},useTransition:function(){return Wp="useTransition",Zp(),Vm()},useMutableSource:function(e,t,n){Wp="useMutableSource",Zp()},useSyncExternalStore:function(e,t,n){return Wp="useSyncExternalStore",Zp(),dm(e,t)},useId:function(){return Wp="useId",Zp(),Zm()},unstable_isNewReconciler:I},ug={readContext:function(e){return dg(),Zf(e)},useCallback:function(e,t){return Wp="useCallback",fg(),Gp(),Dm(e,t)},useContext:function(e){return Wp="useContext",fg(),Gp(),Zf(e)},useEffect:function(e,t){return Wp="useEffect",fg(),Gp(),Mm(e,t)},useImperativeHandle:function(e,t,n){return Wp="useImperativeHandle",fg(),Gp(),Lm(e,t,n)},useInsertionEffect:function(e,t){return Wp="useInsertionEffect",fg(),Gp(),xm(e,t)},useLayoutEffect:function(e,t){return Wp="useLayoutEffect",fg(),Gp(),Tm(e,t)},useMemo:function(e,t){Wp="useMemo",fg(),Gp();var n=Op.current;Op.current=ug;try{return jm(e,t)}finally{Op.current=n}},useReducer:function(e,t,n){Wp="useReducer",fg(),Gp();var r=Op.current;Op.current=ug;try{return sm(e,t,n)}finally{Op.current=r}},useRef:function(e){return Wp="useRef",fg(),Gp(),_m(e)},useState:function(e){Wp="useState",fg(),Gp();var t=Op.current;Op.current=ug;try{return vm(e)}finally{Op.current=t}},useDebugValue:function(e,t){Wp="useDebugValue",fg(),Gp()},useDeferredValue:function(e){return Wp="useDeferredValue",fg(),Gp(),Um(e)},useTransition:function(){return Wp="useTransition",fg(),Gp(),Wm()},useMutableSource:function(e,t,n){Wp="useMutableSource",fg(),Gp()},useSyncExternalStore:function(e,t,n){return Wp="useSyncExternalStore",fg(),Gp(),cm(e,t,n)},useId:function(){return Wp="useId",fg(),Gp(),Gm()},unstable_isNewReconciler:I},lg={readContext:function(e){return dg(),Zf(e)},useCallback:function(e,t){return Wp="useCallback",fg(),Zp(),Bm(e,t)},useContext:function(e){return Wp="useContext",fg(),Zp(),Zf(e)},useEffect:function(e,t){return Wp="useEffect",fg(),Zp(),Cm(e,t)},useImperativeHandle:function(e,t,n){return Wp="useImperativeHandle",fg(),Zp(),Im(e,t,n)},useInsertionEffect:function(e,t){return Wp="useInsertionEffect",fg(),Zp(),Am(e,t)},useLayoutEffect:function(e,t){return Wp="useLayoutEffect",fg(),Zp(),Rm(e,t)},useMemo:function(e,t){Wp="useMemo",fg(),Zp();var n=Op.current;Op.current=lg;try{return zm(e,t)}finally{Op.current=n}},useReducer:function(e,t,n){Wp="useReducer",fg(),Zp();var r=Op.current;Op.current=lg;try{return um(e)}finally{Op.current=r}},useRef:function(e){return Wp="useRef",fg(),Zp(),Sm()},useState:function(e){Wp="useState",fg(),Zp();var t=Op.current;Op.current=lg;try{return bm()}finally{Op.current=t}},useDebugValue:function(e,t){return Wp="useDebugValue",fg(),Zp(),Nm()},useDeferredValue:function(e){return Wp="useDeferredValue",fg(),Zp(),Fm(e)},useTransition:function(){return Wp="useTransition",fg(),Zp(),$m()},useMutableSource:function(e,t,n){Wp="useMutableSource",fg(),Zp()},useSyncExternalStore:function(e,t,n){return Wp="useSyncExternalStore",fg(),Zp(),dm(e,t)},useId:function(){return Wp="useId",fg(),Zp(),Zm()},unstable_isNewReconciler:I},cg={readContext:function(e){return dg(),Zf(e)},useCallback:function(e,t){return Wp="useCallback",fg(),Zp(),Bm(e,t)},useContext:function(e){return Wp="useContext",fg(),Zp(),Zf(e)},useEffect:function(e,t){return Wp="useEffect",fg(),Zp(),Cm(e,t)},useImperativeHandle:function(e,t,n){return Wp="useImperativeHandle",fg(),Zp(),Im(e,t,n)},useInsertionEffect:function(e,t){return Wp="useInsertionEffect",fg(),Zp(),Am(e,t)},useLayoutEffect:function(e,t){return Wp="useLayoutEffect",fg(),Zp(),Rm(e,t)},useMemo:function(e,t){Wp="useMemo",fg(),Zp();var n=Op.current;Op.current=lg;try{return zm(e,t)}finally{Op.current=n}},useReducer:function(e,t,n){Wp="useReducer",fg(),Zp();var r=Op.current;Op.current=lg;try{return lm(e)}finally{Op.current=r}},useRef:function(e){return Wp="useRef",fg(),Zp(),Sm()},useState:function(e){Wp="useState",fg(),Zp();var t=Op.current;Op.current=lg;try{return ym()}finally{Op.current=t}},useDebugValue:function(e,t){return Wp="useDebugValue",fg(),Zp(),Nm()},useDeferredValue:function(e){return Wp="useDeferredValue",fg(),Zp(),Km(e)},useTransition:function(){return Wp="useTransition",fg(),Zp(),Vm()},useMutableSource:function(e,t,n){Wp="useMutableSource",fg(),Zp()},useSyncExternalStore:function(e,t,n){return Wp="useSyncExternalStore",fg(),Zp(),dm(e,t)},useId:function(){return Wp="useId",fg(),Zp(),Zm()},unstable_isNewReconciler:I};var hg=t.unstable_now,pg=0,mg=-1,gg=-1,vg=-1,bg=!1,yg=!1;function wg(){return bg}function _g(){return pg}function Sg(){pg=hg()}function Eg(e){gg=hg(),e.actualStartTime<0&&(e.actualStartTime=hg())}function kg(e){gg=-1}function Mg(e,t){if(gg>=0){var n=hg()-gg;e.actualDuration+=n,t&&(e.selfBaseDuration=n),gg=-1}}function Cg(e){if(mg>=0){var t=hg()-mg;mg=-1;for(var n=e.return;null!==n;){switch(n.tag){case c:case y:return void(n.stateNode.effectDuration+=t)}n=n.return}}}function xg(e){if(vg>=0){var t=hg()-vg;vg=-1;for(var n=e.return;null!==n;){switch(n.tag){case c:var r=n.stateNode;return void(null!==r&&(r.passiveEffectDuration+=t));case y:var i=n.stateNode;return void(null!==i&&(i.passiveEffectDuration+=t))}n=n.return}}}function Ag(){mg=hg()}function Tg(){vg=hg()}function Rg(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function Pg(e,t){return{value:e,source:t,stack:ut(t),digest:null}}function Lg(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function Ig(e,t){try{var n=t.value,r=t.source,i=t.stack,o=null!==i?i:"";if(null!=n&&n._suppressLogging){if(e.tag===u)return;console.error(n)}var a=r?ft(r):null,s=(a?"The above error occurred in the <"+a+"> component:":"The above error occurred in one of your React components:")+"\n"+o+"\n\n"+(e.tag===c?"Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://reactjs.org/link/error-boundaries to learn more about error boundaries.":"React will try to recreate this component tree from scratch using the error boundary you provided, "+(ft(e)||"Anonymous")+".");console.error(s)}catch(e){setTimeout((function(){throw e}))}}var Og="function"==typeof WeakMap?WeakMap:Map;function Ng(e,t,n){var r=fh(Xo,n);r.tag=uh,r.payload={element:null};var i=t.value;return r.callback=function(){Mw(i),Ig(e,t)},r}function Dg(e,t,n){var r=fh(Xo,n);r.tag=uh;var i=e.type.getDerivedStateFromError;if("function"==typeof i){var a=t.value;r.payload=function(){return i(a)},r.callback=function(){Xw(e),Ig(e,t)}}var s=e.stateNode;return null!==s&&"function"==typeof s.componentDidCatch&&(r.callback=function(){Xw(e),Ig(e,t),"function"!=typeof i&&function(e){null===Ly?Ly=new Set([e]):Ly.add(e)}(this);var n=t.value,r=t.stack;this.componentDidCatch(n,{componentStack:null!==r?r:""}),"function"!=typeof i&&(pa(e.lanes,go)||o("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",ft(e)||"Unknown"))}),r}function Bg(e,t,n){var r,i=e.pingCache;if(null===i?(i=e.pingCache=new Og,r=new Set,i.set(t,r)):void 0===(r=i.get(t))&&(r=new Set,i.set(t,r)),!r.has(n)){r.add(n);var o=Aw.bind(null,e,t,n);qi&&zw(e,n),t.then(o,o)}}function jg(e){var t=e;do{if(t.tag===w&&Sp(t))return t;t=t.return}while(null!==t);return null}function zg(e,t,n,r,i){if((e.mode&oo)===io){if(e===t)e.flags|=ri;else{if(e.flags|=$r,n.flags|=ii,n.flags&=~(ei|ni),n.tag===u)if(null===n.alternate)n.tag=k;else{var o=fh(Xo,go);o.tag=sh,hh(n,o,go)}n.lanes=ga(n.lanes,go)}return e}return e.flags|=ri,e.lanes=i,e}function Ug(e,t,n,r,i){if(n.flags|=ni,qi&&zw(e,i),null!==r&&"object"==typeof r&&"function"==typeof r.then){var o=r;!function(e,t){var n=e.tag;if((e.mode&oo)===io&&(n===s||n===b||n===S)){var r=e.alternate;r?(e.updateQueue=r.updateQueue,e.memoizedState=r.memoizedState,e.lanes=r.lanes):(e.updateQueue=null,e.memoizedState=null)}}(n),wf()&&n.mode&oo&&ef();var a=jg(t);if(null!==a)return a.flags&=~Vr,zg(a,t,n,0,i),a.mode&oo&&Bg(e,o,i),void function(e,t,n,r){var i=e.updateQueue;if(null===i){var o=new Set;o.add(n),e.updateQueue=o}else i.add(n)}(a,0,o);if((i&go)===po)return Bg(e,o,i),void gw();r=new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.")}else if(wf()&&n.mode&oo){ef();var l=jg(t);if(null!==l)return(l.flags&ri)===zr&&(l.flags|=Vr),zg(l,t,n,0,i),void _f(Pg(r,n))}!function(e){gy!==sy&&(gy=oy),null===_y?_y=[e]:_y.push(e)}(r=Pg(r,n));var d=t;do{switch(d.tag){case c:var f=r;d.flags|=ri;var h=da(i);return d.lanes=ga(d.lanes,h),void mh(d,Ng(d,f,h));case u:var p=r,m=d.type,g=d.stateNode;if((d.flags&$r)===zr&&("function"==typeof m.getDerivedStateFromError||null!==g&&"function"==typeof g.componentDidCatch&&!kw(g))){d.flags|=ri;var v=da(i);return d.lanes=ga(d.lanes,v),void mh(d,Dg(d,p,v))}}d=d.return}while(null!==d)}var Fg,Kg,qg,Hg,Wg,$g,Vg,Yg,Gg=n.ReactCurrentOwner,Zg=!1;function Qg(e,t,n,r){t.child=null===e?ep(t,null,n,r):Jh(t,e.child,n,r)}function Xg(e,t,n,r,i){if(t.type!==t.elementType){var o=n.propTypes;o&&ed(o,r,"prop",ct(n))}var a,s,u=n.render,l=t.ref;if(Gf(t,i),Yi(t),Gg.current=t,wt(!0),a=em(e,t,u,r,l,i),s=tm(),t.mode&so){Hi(!0);try{a=em(e,t,u,r,l,i),s=tm()}finally{Hi(!1)}}return wt(!1),Gi(),null===e||Zg?(wf()&&s&&Hd(t),t.flags|=Ur,Qg(e,t,a,i),t.child):(nm(e,t,i),Tv(e,t,i))}function Jg(e,t,n,r,i){if(null===e){var o,a=n.type;if(function(e){return"function"==typeof e&&!u_(e)&&void 0===e.defaultProps}(a)&&null===n.compare&&void 0===n.defaultProps)return o=Yw(a),t.tag=S,t.type=o,lv(t,a),ev(e,t,o,r,i);var s=a.propTypes;s&&ed(s,r,"prop",ct(a));var u=d_(n.type,null,r,t,t.mode,i);return u.ref=t.ref,u.return=t,t.child=u,u}var l=n.type,c=l.propTypes;c&&ed(c,r,"prop",ct(l));var d=e.child;if(!Rv(e,i)){var f=d.memoizedProps,h=n.compare;if((h=null!==h?h:Au)(f,r)&&e.ref===t.ref)return Tv(e,t,i)}t.flags|=Ur;var p=l_(d,r);return p.ref=t.ref,p.return=t,t.child=p,p}function ev(e,t,n,r,i){if(t.type!==t.elementType){var o=t.elementType;if(o.$$typeof===Be){var a=o,s=a._payload,u=a._init;try{o=u(s)}catch(e){o=null}var l=o&&o.propTypes;l&&ed(l,r,"prop",ct(o))}}if(null!==e){var c=e.memoizedProps;if(Au(c,r)&&e.ref===t.ref&&t.type===e.type){if(Zg=!1,t.pendingProps=r=c,!Rv(e,i))return t.lanes=e.lanes,Tv(e,t,i);(e.flags&ii)!==zr&&(Zg=!0)}}return rv(e,t,n,r,i)}function tv(e,t,n){var r,i=t.pendingProps,o=i.children,a=null!==e?e.memoizedState:null;if("hidden"===i.mode||N)if((t.mode&oo)===io){var s={baseLanes:po,cachePool:null,transitions:null};t.memoizedState=s,lw(t,n)}else{if(!pa(n,Zo)){var u;u=null!==a?ga(a.baseLanes,n):n,t.lanes=t.childLanes=Zo;var l={baseLanes:u,cachePool:null,transitions:null};return t.memoizedState=l,t.updateQueue=null,lw(t,u),null}var c={baseLanes:po,cachePool:null,transitions:null};t.memoizedState=c,lw(t,null!==a?a.baseLanes:n)}else null!==a?(r=ga(a.baseLanes,n),t.memoizedState=null):r=n,lw(t,r);return Qg(e,t,o,n),t.child}function nv(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=Yr,t.flags|=ai)}function rv(e,t,n,r,i){if(t.type!==t.elementType){var o=n.propTypes;o&&ed(o,r,"prop",ct(n))}var a,s,u;if(a=pd(t,fd(0,n,!0)),Gf(t,i),Yi(t),Gg.current=t,wt(!0),s=em(e,t,n,r,a,i),u=tm(),t.mode&so){Hi(!0);try{s=em(e,t,n,r,a,i),u=tm()}finally{Hi(!1)}}return wt(!1),Gi(),null===e||Zg?(wf()&&u&&Hd(t),t.flags|=Ur,Qg(e,t,s,i),t.child):(nm(e,t,i),Tv(e,t,i))}function iv(e,t,n,r,i){switch(F_(t)){case!1:var a=t.stateNode,s=new t.type(t.memoizedProps,a.context).state;a.updater.enqueueSetState(a,s,null);break;case!0:t.flags|=$r,t.flags|=ri;var u=new Error("Simulated error coming from DevTools"),l=da(i);t.lanes=ga(t.lanes,l),mh(t,Dg(t,Pg(u,t),l))}if(t.type!==t.elementType){var c=n.propTypes;c&&ed(c,r,"prop",ct(n))}var d,f;gd(n)?(d=!0,_d(t)):d=!1,Gf(t,i),null===t.stateNode?(Av(e,t),Wh(t,n,r),Vh(t,n,r,i),f=!0):f=null===e?function(e,t,n,r){var i=e.stateNode,o=e.memoizedProps;i.props=o;var a=i.context,s=t.contextType,u=ud;u="object"==typeof s&&null!==s?Zf(s):pd(e,fd(0,t,!0));var l=t.getDerivedStateFromProps,c="function"==typeof l||"function"==typeof i.getSnapshotBeforeUpdate;c||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||o===n&&a===u||$h(e,i,n,u),yh();var d=e.memoizedState,f=i.state=d;if(vh(e,n,i,r),f=e.memoizedState,o===n&&d===f&&!md()&&!wh()){if("function"==typeof i.componentDidMount){var h=Kr;h|=si,(e.mode&uo)!==io&&(h|=li),e.flags|=h}return!1}"function"==typeof l&&(Nh(e,t,l,n),f=e.memoizedState);var p=wh()||qh(e,t,o,n,d,f,u);if(p){if(c||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount){var m=Kr;m|=si,(e.mode&uo)!==io&&(m|=li),e.flags|=m}}else{if("function"==typeof i.componentDidMount){var g=Kr;g|=si,(e.mode&uo)!==io&&(g|=li),e.flags|=g}e.memoizedProps=n,e.memoizedState=f}return i.props=n,i.state=f,i.context=u,p}(t,n,r,i):function(e,t,n,r,i){var o=t.stateNode;dh(e,t);var a=t.memoizedProps,s=t.type===t.elementType?a:Nf(t.type,a);o.props=s;var u=t.pendingProps,l=o.context,c=n.contextType,d=ud;d="object"==typeof c&&null!==c?Zf(c):pd(t,fd(0,n,!0));var f=n.getDerivedStateFromProps,h="function"==typeof f||"function"==typeof o.getSnapshotBeforeUpdate;h||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||a===u&&l===d||$h(t,o,r,d),yh();var p=t.memoizedState,m=o.state=p;if(vh(t,r,o,i),m=t.memoizedState,a===u&&p===m&&!md()&&!wh()&&!O)return"function"==typeof o.componentDidUpdate&&(a===e.memoizedProps&&p===e.memoizedState||(t.flags|=Kr)),"function"==typeof o.getSnapshotBeforeUpdate&&(a===e.memoizedProps&&p===e.memoizedState||(t.flags|=Gr)),!1;"function"==typeof f&&(Nh(t,n,f,r),m=t.memoizedState);var g=wh()||qh(t,n,s,r,p,m,d)||O;return g?(h||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,m,d),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,m,d)),"function"==typeof o.componentDidUpdate&&(t.flags|=Kr),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=Gr)):("function"==typeof o.componentDidUpdate&&(a===e.memoizedProps&&p===e.memoizedState||(t.flags|=Kr)),"function"==typeof o.getSnapshotBeforeUpdate&&(a===e.memoizedProps&&p===e.memoizedState||(t.flags|=Gr)),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=d,g}(e,t,n,r,i);var h=ov(e,t,n,f,d,i),p=t.stateNode;return f&&p.props!==r&&($g||o("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",ft(t)||"a component"),$g=!0),h}function ov(e,t,n,r,i,o){nv(e,t);var a=(t.flags&$r)!==zr;if(!r&&!a)return i&&Sd(t,n,!1),Tv(e,t,o);var s,u=t.stateNode;if(Gg.current=t,a&&"function"!=typeof n.getDerivedStateFromError)s=null,kg();else{if(Yi(t),wt(!0),s=u.render(),t.mode&so){Hi(!0);try{u.render()}finally{Hi(!1)}}wt(!1),Gi()}return t.flags|=Ur,null!==e&&a?function(e,t,n,r){t.child=Jh(t,e.child,null,r),t.child=Jh(t,null,n,r)}(e,t,s,o):Qg(e,t,s,o),t.memoizedState=u.state,i&&Sd(t,n,!0),t.child}function av(e){var t=e.stateNode;t.pendingContext?yd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&yd(e,t.context,!1),up(e,t.containerInfo)}function sv(e,t,n,r,i){return bf(),_f(i),t.flags|=Vr,Qg(e,t,n,r),t.child}function uv(e,t,n,r){Av(e,t);var i=t.pendingProps,o=n,a=o._payload,c=(0,o._init)(a);t.type=c;var d=t.tag=function(e){if("function"==typeof e)return u_(e)?u:s;if(null!=e){var t=e.$$typeof;if(t===Ie)return b;if(t===De)return _}return l}(c),f=Nf(c,i);switch(d){case s:return lv(t,c),t.type=c=Yw(c),rv(null,t,c,f,r);case u:return t.type=c=Gw(c),iv(null,t,c,f,r);case b:return t.type=c=Zw(c),Xg(null,t,c,f,r);case _:if(t.type!==t.elementType){var h=c.propTypes;h&&ed(h,f,"prop",ct(c))}return Jg(null,t,c,Nf(c.type,f),r)}var p="";throw null!==c&&"object"==typeof c&&c.$$typeof===Be&&(p=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+c+". Lazy element type must resolve to a class or function."+p)}function lv(e,t){if(t&&t.childContextTypes&&o("%s(...): childContextTypes cannot be defined on a function component.",t.displayName||t.name||"Component"),null!==e.ref){var n="",r=gt();r&&(n+="\n\nCheck the render method of `"+r+"`.");var i=r||"",a=e._debugSource;a&&(i=a.fileName+":"+a.lineNumber),Wg[i]||(Wg[i]=!0,o("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",n))}if("function"==typeof t.getDerivedStateFromProps){var s=ct(t)||"Unknown";Hg[s]||(o("%s: Function components do not support getDerivedStateFromProps.",s),Hg[s]=!0)}if("object"==typeof t.contextType&&null!==t.contextType){var u=ct(t)||"Unknown";qg[u]||(o("%s: Function components do not support contextType.",u),qg[u]=!0)}}Fg={},Kg={},qg={},Hg={},Wg={},$g=!1,Vg={},Yg={};var cv={dehydrated:null,treeContext:null,retryLane:mo};function dv(e){return{baseLanes:e,cachePool:null,transitions:null}}function fv(e,t,n){var r=t.pendingProps;K_(t)&&(t.flags|=$r);var i=gp.current,a=!1,s=(t.flags&$r)!==zr;if(s||function(e,t,n,r){return(null===t||null!==t.memoizedState)&&vp(e,mp)}(i,e)?(a=!0,t.flags&=~$r):null!==e&&null===e.memoizedState||(i|=pp),wp(t,i=bp(i)),null===e){df(t);var u=t.memoizedState;if(null!==u){var l=u.dehydrated;if(null!==l)return function(e,t,n){return(e.mode&oo)===io?(o("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."),e.lanes=go):Rc(t)?e.lanes=yo:e.lanes=Zo,null}(t,l)}var c=r.children,d=r.fallback;if(a){var f=function(e,t,n,r){var i,o,a=e.mode,s=e.child,u={mode:"hidden",children:t};return(a&oo)===io&&null!==s?((i=s).childLanes=po,i.pendingProps=u,e.mode&ao&&(i.actualDuration=0,i.actualStartTime=-1,i.selfBaseDuration=0,i.treeBaseDuration=0),o=h_(n,a,r,null)):(i=pv(u,a),o=h_(n,a,r,null)),i.return=e,o.return=e,i.sibling=o,e.child=i,o}(t,c,d,n);return t.child.memoizedState=dv(n),t.memoizedState=cv,f}return hv(t,c)}var h=e.memoizedState;if(null!==h){var p=h.dehydrated;if(null!==p)return function(e,t,n,r,i,o,a){if(n){if(t.flags&Vr)return t.flags&=~Vr,gv(e,t,a,Lg(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering.")));if(null!==t.memoizedState)return t.child=e.child,t.flags|=$r,null;var s=function(e,t,n,r,i){var o=t.mode,a=pv({mode:"visible",children:n},o),s=h_(r,o,i,null);return s.flags|=Fr,a.return=t,s.return=t,a.sibling=s,t.child=a,(t.mode&oo)!==io&&Jh(t,e.child,null,i),s}(e,t,r.children,r.fallback,a);return t.child.memoizedState=dv(a),t.memoizedState=cv,s}if(Jd(),(t.mode&oo)===io)return gv(e,t,a,null);if(Rc(i)){var u,l,c,d=function(e){var t,n,r,i=e.nextSibling&&e.nextSibling.dataset;return i&&(t=i.dgst,n=i.msg,r=i.stck),{message:n,digest:t,stack:r}}(i);return u=d.digest,l=d.message,c=d.stack,gv(e,t,a,Lg(l?new Error(l):new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),u,c))}var f=pa(a,e.childLanes);if(Zg||f){var h=Gy();if(null!==h){var p=function(e,t){var n;switch(ca(t)){case bo:n=vo;break;case wo:n=yo;break;case Eo:case ko:case Mo:case Co:case xo:case Ao:case To:case Ro:case Po:case Lo:case Io:case Oo:case No:case Do:case Bo:case jo:case Uo:case Fo:case Ko:case qo:case Ho:n=_o;break;case Go:n=Yo;break;default:n=mo}return(n&(e.suspendedLanes|t))!==mo?mo:n}(h,a);if(p!==mo&&p!==o.retryLane){o.retryLane=p;var m=Xo;eh(e,p),Jy(h,e,p,m)}}return gw(),gv(e,t,a,Lg(new Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition.")))}if(Tc(i))return t.flags|=$r,t.child=e.child,function(e,t){e._reactRetry=t}(i,Rw.bind(null,e)),null;nf(t,i,o.treeContext);var g=hv(t,r.children);return g.flags|=Qr,g}(e,t,s,r,p,h,n)}if(a){var m=r.fallback,g=function(e,t,n,r,i){var o,a,s=t.mode,u=e.child,l=u.sibling,c={mode:"hidden",children:n};return(s&oo)===io&&t.child!==u?((o=t.child).childLanes=po,o.pendingProps=c,t.mode&ao&&(o.actualDuration=0,o.actualStartTime=-1,o.selfBaseDuration=u.selfBaseDuration,o.treeBaseDuration=u.treeBaseDuration),t.deletions=null):(o=mv(u,c)).subtreeFlags=u.subtreeFlags&mi,null!==l?a=l_(l,r):(a=h_(r,s,i,null)).flags|=Fr,a.return=t,o.return=t,o.sibling=a,t.child=o,a}(e,t,r.children,m,n),v=t.child,b=e.child.memoizedState;return v.memoizedState=null===b?dv(n):function(e,t){return{baseLanes:ga(e.baseLanes,t),cachePool:null,transitions:e.transitions}}(b,n),v.childLanes=function(e,t){return va(e.childLanes,t)}(e,n),t.memoizedState=cv,g}var y=function(e,t,n,r){var i=e.child,o=i.sibling,a=mv(i,{mode:"visible",children:n});if((t.mode&oo)===io&&(a.lanes=r),a.return=t,a.sibling=null,null!==o){var s=t.deletions;null===s?(t.deletions=[o],t.flags|=qr):s.push(o)}return t.child=a,a}(e,t,r.children,n);return t.memoizedState=null,y}function hv(e,t,n){var r=pv({mode:"visible",children:t},e.mode);return r.return=e,e.child=r,r}function pv(e,t,n){return p_(e,t,po,null)}function mv(e,t){return l_(e,t)}function gv(e,t,n,r){null!==r&&_f(r),Jh(t,e.child,null,n);var i=hv(t,t.pendingProps.children);return i.flags|=Fr,t.memoizedState=null,i}function vv(e,t,n){e.lanes=ga(e.lanes,t);var r=e.alternate;null!==r&&(r.lanes=ga(r.lanes,t)),Vf(e.return,t,n)}function bv(e,t){var n=Yt(e),r=!n&&"function"==typeof Fe(e);if(n||r){var i=n?"array":"iterable";return o("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",i,t,i),!1}return!0}function yv(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function wv(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail,s=r.children;!function(e){if(void 0!==e&&"forwards"!==e&&"backwards"!==e&&"together"!==e&&!Vg[e])if(Vg[e]=!0,"string"==typeof e)switch(e.toLowerCase()){case"together":case"forwards":case"backwards":o('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',e,e.toLowerCase());break;case"forward":case"backward":o('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',e,e.toLowerCase());break;default:o('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e)}else o('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e)}(i),function(e,t){void 0===e||Yg[e]||("collapsed"!==e&&"hidden"!==e?(Yg[e]=!0,o('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',e)):"forwards"!==t&&"backwards"!==t&&(Yg[e]=!0,o('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',e)))}(a,i),function(e,t){if(("forwards"===t||"backwards"===t)&&null!=e&&!1!==e)if(Yt(e)){for(var n=0;n<e.length;n++)if(!bv(e[n],n))return}else{var r=Fe(e);if("function"==typeof r){var i=r.call(e);if(i)for(var a=i.next(),s=0;!a.done;a=i.next()){if(!bv(a.value,s))return;s++}}else o('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',t)}}(s,i),Qg(e,t,s,n);var u=gp.current;if(vp(u,mp)?(u=yp(u,mp),t.flags|=$r):(null!==e&&(e.flags&$r)!==zr&&function(e,t,n){for(var r=t;null!==r;){if(r.tag===w)null!==r.memoizedState&&vv(r,n,e);else if(r.tag===C)vv(r,n,e);else if(null!==r.child){r.child.return=r,r=r.child;continue}if(r===e)return;for(;null===r.sibling;){if(null===r.return||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}}(t,t.child,n),u=bp(u)),wp(t,u),(t.mode&oo)===io)t.memoizedState=null;else switch(i){case"forwards":var l,c=function(e){for(var t=e,n=null;null!==t;){var r=t.alternate;null!==r&&null===Ep(r)&&(n=t),t=t.sibling}return n}(t.child);null===c?(l=t.child,t.child=null):(l=c.sibling,c.sibling=null),yv(t,!1,l,c,a);break;case"backwards":var d=null,f=t.child;for(t.child=null;null!==f;){var h=f.alternate;if(null!==h&&null===Ep(h)){t.child=f;break}var p=f.sibling;f.sibling=d,d=f,f=p}yv(t,!0,d,null,a);break;case"together":yv(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}var _v,Sv,Ev,kv,Mv=!1,Cv=!1;function xv(){Zg=!0}function Av(e,t){(t.mode&oo)===io&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=Fr)}function Tv(e,t,n){return null!==e&&(t.dependencies=e.dependencies),kg(),mw(t.lanes),pa(n,t.childLanes)?(function(e,t){if(null!==e&&t.child!==e.child)throw new Error("Resuming work not yet implemented.");if(null!==t.child){var n=t.child,r=l_(n,n.pendingProps);for(t.child=r,r.return=t;null!==n.sibling;)n=n.sibling,(r=r.sibling=l_(n,n.pendingProps)).return=t;r.sibling=null}}(e,t),t.child):null}function Rv(e,t){return!!pa(e.lanes,t)}function Pv(e,t,n){if(t._debugNeedsRemount&&null!==e)return function(e,t,n){var r=t.return;if(null===r)throw new Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,n.index=t.index,n.sibling=t.sibling,n.return=t.return,n.ref=t.ref,t===r.child)r.child=n;else{var i=r.child;if(null===i)throw new Error("Expected parent to have a child.");for(;i.sibling!==t;)if(null===(i=i.sibling))throw new Error("Expected to find the previous sibling.");i.sibling=n}var o=r.deletions;return null===o?(r.deletions=[e],r.flags|=qr):o.push(e),n.flags|=Fr,n}(e,t,d_(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes));if(null!==e)if(e.memoizedProps!==t.pendingProps||md()||t.type!==e.type)Zg=!0;else{if(!Rv(e,n)&&(t.flags&$r)===zr)return Zg=!1,function(e,t,n){switch(t.tag){case c:av(t),t.stateNode,bf();break;case f:dp(t);break;case u:gd(t.type)&&_d(t);break;case d:up(t,t.stateNode.containerInfo);break;case v:var r=t.memoizedProps.value;Wf(t,t.type._context,r);break;case y:pa(n,t.childLanes)&&(t.flags|=Kr);var i=t.stateNode;i.effectDuration=0,i.passiveEffectDuration=0;break;case w:var o=t.memoizedState;if(null!==o){if(null!==o.dehydrated)return wp(t,bp(gp.current)),t.flags|=$r,null;if(pa(n,t.child.childLanes))return fv(e,t,n);wp(t,bp(gp.current));var a=Tv(e,t,n);return null!==a?a.sibling:null}wp(t,bp(gp.current));break;case C:var s=(e.flags&$r)!==zr,l=pa(n,t.childLanes);if(s){if(l)return wv(e,t,n);t.flags|=$r}var h=t.memoizedState;if(null!==h&&(h.rendering=null,h.tail=null,h.lastEffect=null),wp(t,gp.current),l)break;return null;case A:case T:return t.lanes=po,tv(e,t,n)}return Tv(e,t,n)}(e,t,n);Zg=(e.flags&ii)!==zr}else if(Zg=!1,wf()&&function(e){return Vd(),(e.flags&oi)!==zr}(t)){var r=t.index;qd(t,(Vd(),Nd),r)}switch(t.lanes=po,t.tag){case l:return function(e,t,n,r){Av(e,t);var i,a,l,c=t.pendingProps;if(i=pd(t,fd(0,n,!1)),Gf(t,r),Yi(t),n.prototype&&"function"==typeof n.prototype.render){var d=ct(n)||"Unknown";Fg[d]||(o("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",d,d),Fg[d]=!0)}if(t.mode&so&&kf.recordLegacyContextWarning(t,null),wt(!0),Gg.current=t,a=em(null,t,n,c,i,r),l=tm(),wt(!1),Gi(),t.flags|=Ur,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){var f=ct(n)||"Unknown";Kg[f]||(o("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",f,f,f),Kg[f]=!0)}if("object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){var h=ct(n)||"Unknown";Kg[h]||(o("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",h,h,h),Kg[h]=!0),t.tag=u,t.memoizedState=null,t.updateQueue=null;var p=!1;return gd(n)?(p=!0,_d(t)):p=!1,t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,ch(t),Hh(t,a),Vh(t,n,c,r),ov(null,t,n,!0,p,r)}if(t.tag=s,t.mode&so){Hi(!0);try{a=em(null,t,n,c,i,r),l=tm()}finally{Hi(!1)}}return wf()&&l&&Hd(t),Qg(null,t,a,r),lv(t,n),t.child}(e,t,t.type,n);case E:return uv(e,t,t.elementType,n);case s:var i=t.type,a=t.pendingProps;return rv(e,t,i,t.elementType===i?a:Nf(i,a),n);case u:var M=t.type,R=t.pendingProps;return iv(e,t,M,t.elementType===M?R:Nf(M,R),n);case c:return function(e,t,n){if(av(t),null===e)throw new Error("Should have a current fiber. This is a bug in React.");var r=t.pendingProps,i=t.memoizedState,o=i.element;dh(e,t),vh(t,r,null,n);var a=t.memoizedState;t.stateNode;var s=a.element;if(i.isDehydrated){var u={element:s,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions};if(t.updateQueue.baseState=u,t.memoizedState=u,t.flags&Vr)return sv(e,t,s,n,Pg(new Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),t));if(s!==o)return sv(e,t,s,n,Pg(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t));tf(t);var l=ep(t,null,s,n);t.child=l;for(var c=l;c;)c.flags=c.flags&~Fr|Qr,c=c.sibling}else{if(bf(),s===o)return Tv(e,t,n);Qg(e,t,s,n)}return t.child}(e,t,n);case f:return function(e,t,n){dp(t),null===e&&df(t);var r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children;return gc(r,i)?a=null:null!==o&&gc(r,o)&&(t.flags|=Hr),nv(e,t),Qg(e,t,a,n),t.child}(e,t,n);case h:return function(e,t){return null===e&&df(t),null}(e,t);case w:return fv(e,t,n);case d:return function(e,t,n){up(t,t.stateNode.containerInfo);var r=t.pendingProps;return null===e?t.child=Jh(t,null,r,n):Qg(e,t,r,n),t.child}(e,t,n);case b:var P=t.type,L=t.pendingProps;return Xg(e,t,P,t.elementType===P?L:Nf(P,L),n);case p:return function(e,t,n){return Qg(e,t,t.pendingProps,n),t.child}(e,t,n);case m:return function(e,t,n){return Qg(e,t,t.pendingProps.children,n),t.child}(e,t,n);case y:return function(e,t,n){t.flags|=Kr;var r=t.stateNode;return r.effectDuration=0,r.passiveEffectDuration=0,Qg(e,t,t.pendingProps.children,n),t.child}(e,t,n);case v:return function(e,t,n){var r=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value;"value"in i||Mv||(Mv=!0,o("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var u=t.type.propTypes;if(u&&ed(u,i,"prop","Context.Provider"),Wf(t,r,s),null!==a){var l=a.value;if(xu(l,s)){if(a.children===i.children&&!md())return Tv(e,t,n)}else Yf(t,r,n)}return Qg(e,t,i.children,n),t.child}(e,t,n);case g:return function(e,t,n){var r=t.type;void 0===r._context?r!==r.Consumer&&(Cv||(Cv=!0,o("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):r=r._context;var i=t.pendingProps.children;"function"!=typeof i&&o("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Gf(t,n);var a,s=Zf(r);return Yi(t),Gg.current=t,wt(!0),a=i(s),wt(!1),Gi(),t.flags|=Ur,Qg(e,t,a,n),t.child}(e,t,n);case _:var I=t.type,O=Nf(I,t.pendingProps);if(t.type!==t.elementType){var N=I.propTypes;N&&ed(N,O,"prop",ct(I))}return Jg(e,t,I,O=Nf(I.type,O),n);case S:return ev(e,t,t.type,t.pendingProps,n);case k:var D=t.type,B=t.pendingProps;return function(e,t,n,r,i){var o;return Av(e,t),t.tag=u,gd(n)?(o=!0,_d(t)):o=!1,Gf(t,i),Wh(t,n,r),Vh(t,n,r,i),ov(null,t,n,!0,o,i)}(e,t,D,t.elementType===D?B:Nf(D,B),n);case C:return wv(e,t,n);case x:break;case A:return tv(e,t,n)}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Lv(e){e.flags|=Kr}function Iv(e){e.flags|=Yr,e.flags|=ai}function Ov(e,t){if(!wf())switch(e.tailMode){case"hidden":for(var n=e.tail,r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?e.tail=null:r.sibling=null;break;case"collapsed":for(var i=e.tail,o=null;null!==i;)null!==i.alternate&&(o=i),i=i.sibling;null===o?t||null===e.tail?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Nv(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=po,r=zr;if(t){if((e.mode&ao)!==io){for(var i=e.selfBaseDuration,o=e.child;null!==o;)n=ga(n,ga(o.lanes,o.childLanes)),r|=o.subtreeFlags&mi,r|=o.flags&mi,i+=o.treeBaseDuration,o=o.sibling;e.treeBaseDuration=i}else for(var a=e.child;null!==a;)n=ga(n,ga(a.lanes,a.childLanes)),r|=a.subtreeFlags&mi,r|=a.flags&mi,a.return=e,a=a.sibling;e.subtreeFlags|=r}else{if((e.mode&ao)!==io){for(var s=e.actualDuration,u=e.selfBaseDuration,l=e.child;null!==l;)n=ga(n,ga(l.lanes,l.childLanes)),r|=l.subtreeFlags,r|=l.flags,s+=l.actualDuration,u+=l.treeBaseDuration,l=l.sibling;e.actualDuration=s,e.treeBaseDuration=u}else for(var c=e.child;null!==c;)n=ga(n,ga(c.lanes,c.childLanes)),r|=c.subtreeFlags,r|=c.flags,c.return=e,c=c.sibling;e.subtreeFlags|=r}return e.childLanes=n,t}function Dv(e,t,n){if(Zd&&null!==Gd&&(t.mode&oo)!==io&&(t.flags&$r)===zr)return vf(t),bf(),t.flags|=Vr|ni|ri,!1;var r=gf(t);if(null!==n&&null!==n.dehydrated){if(null===e){if(!r)throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(hf(t),Nv(t),(t.mode&ao)!==io&&null!==n){var i=t.child;null!==i&&(t.treeBaseDuration-=i.treeBaseDuration)}return!1}if(bf(),(t.flags&$r)===zr&&(t.memoizedState=null),t.flags|=Kr,Nv(t),(t.mode&ao)!==io&&null!==n){var o=t.child;null!==o&&(t.treeBaseDuration-=o.treeBaseDuration)}return!1}return yf(),!0}function Bv(e,t,n){var r=t.pendingProps;switch($d(t),t.tag){case l:case E:case S:case s:case b:case p:case m:case y:case g:case _:return Nv(t),null;case u:return gd(t.type)&&vd(t),Nv(t),null;case c:var i=t.stateNode;return lp(t),bd(t),Rp(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(null===e||null===e.child)&&(gf(t)?Lv(t):null!==e&&(e.memoizedState.isDehydrated&&(t.flags&Vr)===zr||(t.flags|=Gr,yf()))),Sv(e,t),Nv(t),null;case f:fp(t);var o=sp(),a=t.type;if(null!==e&&null!=t.stateNode)Ev(e,t,a,r,o),e.ref!==t.ref&&Iv(t);else{if(!r){if(null===t.stateNode)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Nv(t),null}var M=cp();if(gf(t))(function(e,t,n){var r=e.stateNode,i=!Qd,o=Ic(r,e.type,e.memoizedProps,0,n,e,i);return e.updateQueue=o,null!==o})(t,0,M)&&Lv(t);else{var L=mc(a,r,o,M,t);_v(L,t,!1,!1),t.stateNode=L,function(e,t,n,r,i){switch(Wl(e,t,n),t){case"button":case"input":case"select":case"textarea":return!!n.autoFocus;case"img":return!0;default:return!1}}(L,a,r)&&Lv(t)}null!==t.ref&&Iv(t)}return Nv(t),null;case h:var I=r;if(e&&null!=t.stateNode){var O=e.memoizedProps;kv(e,t,O,I)}else{if("string"!=typeof I&&null===t.stateNode)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var B=sp(),j=cp();gf(t)?ff(t)&&Lv(t):t.stateNode=vc(I,B,j,t)}return Nv(t),null;case w:_p(t);var z=t.memoizedState;if((null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated)&&!Dv(e,t,z))return t.flags&ri?t:null;if((t.flags&$r)!==zr)return t.lanes=n,(t.mode&ao)!==io&&Rg(t),t;var U=null!==z;if(U!==(null!==e&&null!==e.memoizedState)&&U&&(t.child.flags|=Xr,(t.mode&oo)!==io&&(null===e&&(!0!==t.memoizedProps.unstable_avoidThisFallback||!D)||vp(gp.current,pp)?gy===ry&&(gy=ay):gw())),null!==t.updateQueue&&(t.flags|=Kr),Nv(t),(t.mode&ao)!==io&&U){var F=t.child;null!==F&&(t.treeBaseDuration-=F.treeBaseDuration)}return null;case d:return lp(t),Sv(e,t),null===e&&ml(t.stateNode.containerInfo),Nv(t),null;case v:return $f(t.type._context,t),Nv(t),null;case k:return gd(t.type)&&vd(t),Nv(t),null;case C:_p(t);var K=t.memoizedState;if(null===K)return Nv(t),null;var q=(t.flags&$r)!==zr,H=K.rendering;if(null===H)if(q)Ov(K,!1);else{if(gy!==ry||null!==e&&(e.flags&$r)!==zr)for(var W=t.child;null!==W;){var $=Ep(W);if(null!==$){q=!0,t.flags|=$r,Ov(K,!1);var V=$.updateQueue;return null!==V&&(t.updateQueue=V,t.flags|=Kr),t.subtreeFlags=zr,tp(t,n),wp(t,yp(gp.current,mp)),t.child}W=W.sibling}null!==K.tail&&Ri()>Ty()&&(t.flags|=$r,q=!0,Ov(K,!1),t.lanes=Wo)}else{if(!q){var Y=Ep(H);if(null!==Y){t.flags|=$r,q=!0;var G=Y.updateQueue;if(null!==G&&(t.updateQueue=G,t.flags|=Kr),Ov(K,!0),null===K.tail&&"hidden"===K.tailMode&&!H.alternate&&!wf())return Nv(t),null}else 2*Ri()-K.renderingStartTime>Ty()&&n!==Zo&&(t.flags|=$r,q=!0,Ov(K,!1),t.lanes=Wo)}if(K.isBackwards)H.sibling=t.child,t.child=H;else{var Z=K.last;null!==Z?Z.sibling=H:t.child=H,K.last=H}}if(null!==K.tail){var Q=K.tail;K.rendering=Q,K.tail=Q.sibling,K.renderingStartTime=Ri(),Q.sibling=null;var X=gp.current;return wp(t,X=q?yp(X,mp):bp(X)),Q}return Nv(t),null;case x:break;case A:case T:cw(t);var J=null!==t.memoizedState;return null!==e&&(null!==e.memoizedState===J||N||(t.flags|=Xr)),J&&(t.mode&oo)!==io?pa(py,Zo)&&(Nv(t),t.subtreeFlags&(Fr|Kr)&&(t.flags|=Xr)):Nv(t),null;case R:case P:return null}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function jv(e,t,n){switch($d(t),t.tag){case u:gd(t.type)&&vd(t);var r=t.flags;return r&ri?(t.flags=r&~ri|$r,(t.mode&ao)!==io&&Rg(t),t):null;case c:t.stateNode,lp(t),bd(t),Rp();var i=t.flags;return(i&ri)!==zr&&(i&$r)===zr?(t.flags=i&~ri|$r,t):null;case f:return fp(t),null;case w:_p(t);var o=t.memoizedState;if(null!==o&&null!==o.dehydrated){if(null===t.alternate)throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");bf()}var a=t.flags;return a&ri?(t.flags=a&~ri|$r,(t.mode&ao)!==io&&Rg(t),t):null;case C:return _p(t),null;case d:return lp(t),null;case v:return $f(t.type._context,t),null;case A:case T:return cw(t),null;default:return null}}function zv(e,t,n){switch($d(t),t.tag){case u:null!=t.type.childContextTypes&&vd(t);break;case c:t.stateNode,lp(t),bd(t),Rp();break;case f:fp(t);break;case d:lp(t);break;case w:case C:_p(t);break;case v:$f(t.type._context,t);break;case A:case T:cw(t)}}_v=function(e,t,n,r){for(var i,o,a=t.child;null!==a;){if(a.tag===f||a.tag===h)i=e,o=a.stateNode,i.appendChild(o);else if(a.tag===d);else if(null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)return;for(;null===a.sibling;){if(null===a.return||a.return===t)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},Sv=function(e,t){},Ev=function(e,t,n,r,i){var o=e.memoizedProps;if(o!==r){var a=function(e,t,n,r,i,o){var a=o;if(typeof r.children!=typeof n.children&&("string"==typeof r.children||"number"==typeof r.children)){var s=""+r.children,u=Jl(a.ancestorInfo,t);Xl(null,s,u)}return $l(e,t,n,r)}(t.stateNode,n,o,r,0,cp());t.updateQueue=a,a&&Lv(t)}},kv=function(e,t,n,r){n!==r&&Lv(t)};var Uv=null;Uv=new Set;var Fv=!1,Kv=!1,qv="function"==typeof WeakSet?WeakSet:Set,Hv=null,Wv=null,$v=null,Vv=function(e,t){if(t.props=e.memoizedProps,t.state=e.memoizedState,e.mode&ao)try{Ag(),t.componentWillUnmount()}finally{Cg(e)}else t.componentWillUnmount()};function Yv(e,t){try{ib(xp,e)}catch(n){xw(e,t,n)}}function Gv(e,t,n){try{Vv(e,n)}catch(n){xw(e,t,n)}}function Zv(e,t){try{ub(e)}catch(n){xw(e,t,n)}}function Qv(e,t){var n=e.ref;if(null!==n)if("function"==typeof n){var r;try{if(F&&K&&e.mode&ao)try{Ag(),r=n(null)}finally{Cg(e)}else r=n(null)}catch(n){xw(e,t,n)}"function"==typeof r&&o("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",ft(e))}else n.current=null}function Xv(e,t,n){try{n()}catch(n){xw(e,t,n)}}var Jv=!1;function eb(e,t){pc(e.containerInfo),Hv=t,function(){for(;null!==Hv;){var e=Hv,t=e.child;(e.subtreeFlags&di)!==zr&&null!==t?(t.return=e,Hv=t):tb()}}();var n=Jv;return Jv=!1,n}function tb(){for(;null!==Hv;){var e=Hv;yt(e);try{nb(e)}catch(t){xw(e,e.return,t)}bt();var t=e.sibling;if(null!==t)return t.return=e.return,void(Hv=t);Hv=e.return}}function nb(e){var t,n=e.alternate;if((e.flags&Gr)!==zr){switch(yt(e),e.tag){case s:case b:case S:break;case u:if(null!==n){var r=n.memoizedProps,i=n.memoizedState,a=e.stateNode;e.type!==e.elementType||$g||(a.props!==e.memoizedProps&&o("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ft(e)||"instance"),a.state!==e.memoizedState&&o("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ft(e)||"instance"));var l=a.getSnapshotBeforeUpdate(e.elementType===e.type?r:Nf(e.type,r),i),p=Uv;void 0!==l||p.has(e.type)||(p.add(e.type),o("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",ft(e))),a.__reactInternalSnapshotBeforeUpdate=l}break;case c:(t=e.stateNode.containerInfo).nodeType===pn?t.textContent="":t.nodeType===vn&&t.documentElement&&t.removeChild(t.documentElement);break;case f:case h:case d:case k:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}bt()}}function rb(e,t,n){var r,i=t.updateQueue,o=null!==i?i.lastEffect:null;if(null!==o){var a=o.next,s=a;do{if((s.tag&e)===e){var u=s.destroy;s.destroy=void 0,void 0!==u&&((e&Ap)!==kp?(r=t,null!==Fi&&"function"==typeof Fi.markComponentPassiveEffectUnmountStarted&&Fi.markComponentPassiveEffectUnmountStarted(r)):(e&xp)!==kp&&Qi(t),(e&Cp)!==kp&&Hw(!0),Xv(t,n,u),(e&Cp)!==kp&&Hw(!1),(e&Ap)!==kp?null!==Fi&&"function"==typeof Fi.markComponentPassiveEffectUnmountStopped&&Fi.markComponentPassiveEffectUnmountStopped():(e&xp)!==kp&&Xi())}s=s.next}while(s!==a)}}function ib(e,t){var n,r=t.updateQueue,i=null!==r?r.lastEffect:null;if(null!==i){var a=i.next,s=a;do{if((s.tag&e)===e){(e&Ap)!==kp?(n=t,null!==Fi&&"function"==typeof Fi.markComponentPassiveEffectMountStarted&&Fi.markComponentPassiveEffectMountStarted(n)):(e&xp)!==kp&&Zi(t);var u=s.create;(e&Cp)!==kp&&Hw(!0),s.destroy=u(),(e&Cp)!==kp&&Hw(!1),(e&Ap)!==kp?null!==Fi&&"function"==typeof Fi.markComponentPassiveEffectMountStopped&&Fi.markComponentPassiveEffectMountStopped():(e&xp)!==kp&&null!==Fi&&"function"==typeof Fi.markComponentLayoutEffectMountStopped&&Fi.markComponentLayoutEffectMountStopped();var l=s.destroy;if(void 0!==l&&"function"!=typeof l){var c=void 0;o("%s must not return anything besides a function, which is used for clean-up.%s",c=(s.tag&xp)!==zr?"useLayoutEffect":(s.tag&Cp)!==zr?"useInsertionEffect":"useEffect",null===l?" You returned null. If your effect does not require clean up, return undefined (or nothing).":"function"==typeof l.then?"\n\nIt looks like you wrote "+c+"(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:\n\n"+c+"(() => {\n async function fetchData() {\n // You can await here\n const response = await MyAPI.getData(someId);\n // ...\n }\n fetchData();\n}, [someId]); // Or [] if effect doesn't need props or state\n\nLearn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching":" You returned: "+l)}}s=s.next}while(s!==a)}}function ob(e,t){if((t.flags&Kr)!==zr&&t.tag===y){var n=t.stateNode.passiveEffectDuration,r=t.memoizedProps,i=r.id,o=r.onPostCommit,a=_g(),s=null===t.alternate?"mount":"update";wg()&&(s="nested-update"),"function"==typeof o&&o(i,s,n,a);var u=t.return;e:for(;null!==u;){switch(u.tag){case c:case y:u.stateNode.passiveEffectDuration+=n;break e}u=u.return}}}function ab(e,t,n,r){if((n.flags&hi)!==zr)switch(n.tag){case s:case b:case S:if(!Kv)if(n.mode&ao)try{Ag(),ib(xp|Mp,n)}finally{Cg(n)}else ib(xp|Mp,n);break;case u:var i=n.stateNode;if(n.flags&Kr&&!Kv)if(null===t)if(n.type!==n.elementType||$g||(i.props!==n.memoizedProps&&o("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ft(n)||"instance"),i.state!==n.memoizedState&&o("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ft(n)||"instance")),n.mode&ao)try{Ag(),i.componentDidMount()}finally{Cg(n)}else i.componentDidMount();else{var a=n.elementType===n.type?t.memoizedProps:Nf(n.type,t.memoizedProps),l=t.memoizedState;if(n.type!==n.elementType||$g||(i.props!==n.memoizedProps&&o("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ft(n)||"instance"),i.state!==n.memoizedState&&o("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ft(n)||"instance")),n.mode&ao)try{Ag(),i.componentDidUpdate(a,l,i.__reactInternalSnapshotBeforeUpdate)}finally{Cg(n)}else i.componentDidUpdate(a,l,i.__reactInternalSnapshotBeforeUpdate)}var p=n.updateQueue;null!==p&&(n.type!==n.elementType||$g||(i.props!==n.memoizedProps&&o("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ft(n)||"instance"),i.state!==n.memoizedState&&o("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ft(n)||"instance")),_h(0,p,i));break;case c:var m=n.updateQueue;if(null!==m){var g=null;if(null!==n.child)switch(n.child.tag){case f:case u:g=n.child.stateNode}_h(0,m,g)}break;case f:var v=n.stateNode;null===t&&n.flags&Kr&&function(e,t,n,r){switch(t){case"button":case"input":case"select":case"textarea":return void(n.autoFocus&&e.focus());case"img":n.src&&(e.src=n.src)}}(v,n.type,n.memoizedProps);break;case h:case d:break;case y:var _=n.memoizedProps,E=_.onCommit,M=_.onRender,R=n.stateNode.effectDuration,L=_g(),I=null===t?"mount":"update";wg()&&(I="nested-update"),"function"==typeof M&&M(n.memoizedProps.id,I,n.actualDuration,n.treeBaseDuration,n.actualStartTime,L),"function"==typeof E&&E(n.memoizedProps.id,I,R,L),N=n,Dy.push(N),Iy||(Iy=!0,Fw(Oi,(function(){return Ew(),null})));var O=n.return;e:for(;null!==O;){switch(O.tag){case c:case y:O.stateNode.effectDuration+=R;break e}O=O.return}break;case w:!function(e,t){if(null===t.memoizedState){var n=t.alternate;if(null!==n){var r=n.memoizedState;if(null!==r){var i=r.dehydrated;null!==i&&function(e){rs(e)}(i)}}}}(0,n);break;case C:case k:case x:case A:case T:case P:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}var N;Kv||n.flags&Yr&&ub(n)}function sb(e){switch(e.tag){case s:case b:case S:if(e.mode&ao)try{Ag(),Yv(e,e.return)}finally{Cg(e)}else Yv(e,e.return);break;case u:var t=e.stateNode;"function"==typeof t.componentDidMount&&function(e,t,n){try{n.componentDidMount()}catch(n){xw(e,t,n)}}(e,e.return,t),Zv(e,e.return);break;case f:Zv(e,e.return)}}function ub(e){var t=e.ref;if(null!==t){var n,r=e.stateNode;if(e.tag,n=r,"function"==typeof t){var i;if(e.mode&ao)try{Ag(),i=t(n)}finally{Cg(e)}else i=t(n);"function"==typeof i&&o("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",ft(e))}else t.hasOwnProperty("current")||o("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",ft(e)),t.current=n}}function lb(e){var t=e.alternate;if(null!==t&&(e.alternate=null,lb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===f){var n=e.stateNode;null!==n&&function(e){delete e[Dc],delete e[Bc],delete e[zc],delete e[Uc],delete e[Fc]}(n)}e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function cb(e){return e.tag===f||e.tag===c||e.tag===d}function db(e){var t=e;e:for(;;){for(;null===t.sibling;){if(null===t.return||cb(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==f&&t.tag!==h&&t.tag!==M;){if(t.flags&Fr)continue e;if(null===t.child||t.tag===d)continue e;t.child.return=t,t=t.child}if(!(t.flags&Fr))return t.stateNode}}function fb(e){var t=function(e){for(var t=e.return;null!==t;){if(cb(t))return t;t=t.return}throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}(e);switch(t.tag){case f:var n=t.stateNode;t.flags&Hr&&(kc(n),t.flags&=~Hr),pb(e,db(e),n);break;case c:case d:var r=t.stateNode.containerInfo;hb(e,db(e),r);break;default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function hb(e,t,n){var r=e.tag;if(r===f||r===h){var i=e.stateNode;t?function(e,t,n){e.nodeType===gn?e.parentNode.insertBefore(t,n):e.insertBefore(t,n)}(n,i,t):function(e,t){var n;e.nodeType===gn?(n=e.parentNode).insertBefore(t,e):(n=e).appendChild(t),null==e._reactRootContainer&&null===n.onclick&&Hl(n)}(n,i)}else if(r===d);else{var o=e.child;if(null!==o){hb(o,t,n);for(var a=o.sibling;null!==a;)hb(a,t,n),a=a.sibling}}}function pb(e,t,n){var r=e.tag;if(r===f||r===h){var i=e.stateNode;t?function(e,t,n){e.insertBefore(t,n)}(n,i,t):function(e,t){e.appendChild(t)}(n,i)}else if(r===d);else{var o=e.child;if(null!==o){pb(o,t,n);for(var a=o.sibling;null!==a;)pb(a,t,n),a=a.sibling}}}var mb=null,gb=!1;function vb(e,t,n){var r,i,o=t;e:for(;null!==o;){switch(o.tag){case f:mb=o.stateNode,gb=!1;break e;case c:case d:mb=o.stateNode.containerInfo,gb=!0;break e}o=o.return}if(null===mb)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");yb(e,t,n),mb=null,gb=!1,null!==(i=(r=n).alternate)&&(i.return=null),r.return=null}function bb(e,t,n){for(var r=n.child;null!==r;)yb(e,t,r),r=r.sibling}function yb(e,t,n){switch(function(e){if(Ui&&"function"==typeof Ui.onCommitFiberUnmount)try{Ui.onCommitFiberUnmount(zi,e)}catch(e){Ki||(Ki=!0,o("React instrumentation encountered an error: %s",e))}}(n),n.tag){case f:Kv||Qv(n,t);case h:var r=mb,i=gb;return mb=null,bb(e,t,n),gb=i,void(null!==(mb=r)&&(gb?(C=mb,T=n.stateNode,C.nodeType===gn?C.parentNode.removeChild(T):C.removeChild(T)):function(e,t){e.removeChild(t)}(mb,n.stateNode)));case M:return void(null!==mb&&(gb?function(e,t){e.nodeType===gn?Mc(e.parentNode,t):e.nodeType===pn&&Mc(e,t),rs(e)}(mb,n.stateNode):Mc(mb,n.stateNode)));case d:var a=mb,l=gb;return mb=n.stateNode.containerInfo,gb=!0,bb(e,t,n),mb=a,void(gb=l);case s:case b:case _:case S:if(!Kv){var c=n.updateQueue;if(null!==c){var p=c.lastEffect;if(null!==p){var m=p.next,g=m;do{var v=g,y=v.destroy,w=v.tag;void 0!==y&&((w&Cp)!==kp?Xv(n,t,y):(w&xp)!==kp&&(Qi(n),n.mode&ao?(Ag(),Xv(n,t,y),Cg(n)):Xv(n,t,y),Xi())),g=g.next}while(g!==m)}}}return void bb(e,t,n);case u:if(!Kv){Qv(n,t);var E=n.stateNode;"function"==typeof E.componentWillUnmount&&Gv(n,t,E)}return void bb(e,t,n);case x:return void bb(e,t,n);case A:if(n.mode&oo){var k=Kv;Kv=k||null!==n.memoizedState,bb(e,t,n),Kv=k}else bb(e,t,n);break;default:return void bb(e,t,n)}var C,T}function wb(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new qv),t.forEach((function(t){var r=Pw.bind(null,e,t);if(!n.has(t)){if(n.add(t),qi){if(null===Wv||null===$v)throw Error("Expected finished root and lanes to be set. This is a bug in React.");zw($v,Wv)}t.then(r,r)}}))}}function _b(e,t,n){var r=t.deletions;if(null!==r)for(var i=0;i<r.length;i++){var o=r[i];try{vb(e,t,o)}catch(e){xw(o,t,e)}}var a=pt;if(t.subtreeFlags&fi)for(var s=t.child;null!==s;)yt(s),Sb(s,e),s=s.sibling;yt(a)}function Sb(e,t,n){var r=e.alternate,i=e.flags;switch(e.tag){case s:case b:case _:case S:if(_b(t,e),Eb(e),i&Kr){try{rb(Cp|Mp,e,e.return),ib(Cp|Mp,e)}catch(t){xw(e,e.return,t)}if(e.mode&ao){try{Ag(),rb(xp|Mp,e,e.return)}catch(t){xw(e,e.return,t)}Cg(e)}else try{rb(xp|Mp,e,e.return)}catch(t){xw(e,e.return,t)}}return;case u:return _b(t,e),Eb(e),void(i&Yr&&null!==r&&Qv(r,r.return));case f:if(_b(t,e),Eb(e),i&Yr&&null!==r&&Qv(r,r.return),e.flags&Hr){var o=e.stateNode;try{kc(o)}catch(t){xw(e,e.return,t)}}if(i&Kr){var a=e.stateNode;if(null!=a){var l=e.memoizedProps,p=null!==r?r.memoizedProps:l,m=e.type,g=e.updateQueue;if(e.updateQueue=null,null!==g)try{!function(e,t,n,r,i,o){Vl(e,t,n,r,i),Zc(e,i)}(a,g,m,p,l)}catch(t){xw(e,e.return,t)}}}return;case h:if(_b(t,e),Eb(e),i&Kr){if(null===e.stateNode)throw new Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var v=e.stateNode,y=e.memoizedProps;null!==r&&r.memoizedProps;try{!function(e,t,n){e.nodeValue=n}(v,0,y)}catch(t){xw(e,e.return,t)}}return;case c:if(_b(t,e),Eb(e),i&Kr&&null!==r&&r.memoizedState.isDehydrated)try{rs(t.containerInfo)}catch(t){xw(e,e.return,t)}return;case d:return _b(t,e),void Eb(e);case w:_b(t,e),Eb(e);var E=e.child;if(E.flags&Xr){var k=E.stateNode,M=null!==E.memoizedState;k.isHidden=M,M&&(null!==E.alternate&&null!==E.alternate.memoizedState||(Ey=Ri()))}if(i&Kr){try{!function(e){e.memoizedState}(e)}catch(t){xw(e,e.return,t)}wb(e)}return;case A:var R=null!==r&&null!==r.memoizedState;if(e.mode&oo){var P=Kv;Kv=P||R,_b(t,e),Kv=P}else _b(t,e);if(Eb(e),i&Xr){var L=e.stateNode,I=null!==e.memoizedState,O=e;if(L.isHidden=I,I&&!R&&(O.mode&oo)!==io){Hv=O;for(var N=O.child;null!==N;)Hv=N,xb(N),N=N.sibling}!function(e,t){for(var n=null,r=e;;){if(r.tag===f){if(null===n){n=r;try{var i=r.stateNode;t?Cc(i):xc(r.stateNode,r.memoizedProps)}catch(t){xw(e,e.return,t)}}}else if(r.tag===h){if(null===n)try{var o=r.stateNode;t?o.nodeValue="":Ac(o,r.memoizedProps)}catch(t){xw(e,e.return,t)}}else if((r.tag!==A&&r.tag!==T||null===r.memoizedState||r===e)&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===e)return;for(;null===r.sibling;){if(null===r.return||r.return===e)return;n===r&&(n=null),r=r.return}n===r&&(n=null),r.sibling.return=r.return,r=r.sibling}}(O,I)}return;case C:return _b(t,e),Eb(e),void(i&Kr&&wb(e));case x:return;default:return _b(t,e),void Eb(e)}}function Eb(e){var t=e.flags;if(t&Fr){try{fb(e)}catch(t){xw(e,e.return,t)}e.flags&=~Fr}t&Qr&&(e.flags&=~Qr)}function kb(e,t,n){Wv=n,$v=t,Hv=e,Mb(e),Wv=null,$v=null}function Mb(e,t,n){for(var r=(e.mode&oo)!==io;null!==Hv;){var i=Hv,o=i.child;if(i.tag===A&&r){var a=null!==i.memoizedState||Fv;if(a){Cb(e);continue}var s=i.alternate,u=null!==s&&null!==s.memoizedState,l=Fv,c=Kv;Fv=a,(Kv=u||Kv)&&!c&&(Hv=i,Tb(i));for(var d=o;null!==d;)Hv=d,Mb(d),d=d.sibling;Hv=i,Fv=l,Kv=c,Cb(e)}else(i.subtreeFlags&hi)!==zr&&null!==o?(o.return=i,Hv=o):Cb(e)}}function Cb(e,t,n){for(;null!==Hv;){var r=Hv;if((r.flags&hi)!==zr){var i=r.alternate;yt(r);try{ab(0,i,r)}catch(e){xw(r,r.return,e)}bt()}if(r===e)return void(Hv=null);var o=r.sibling;if(null!==o)return o.return=r.return,void(Hv=o);Hv=r.return}}function xb(e){for(;null!==Hv;){var t=Hv,n=t.child;switch(t.tag){case s:case b:case _:case S:if(t.mode&ao)try{Ag(),rb(xp,t,t.return)}finally{Cg(t)}else rb(xp,t,t.return);break;case u:Qv(t,t.return);var r=t.stateNode;"function"==typeof r.componentWillUnmount&&Gv(t,t.return,r);break;case f:Qv(t,t.return);break;case A:if(null!==t.memoizedState){Ab(e);continue}}null!==n?(n.return=t,Hv=n):Ab(e)}}function Ab(e){for(;null!==Hv;){var t=Hv;if(t===e)return void(Hv=null);var n=t.sibling;if(null!==n)return n.return=t.return,void(Hv=n);Hv=t.return}}function Tb(e){for(;null!==Hv;){var t=Hv,n=t.child;t.tag===A&&null!==t.memoizedState||null===n?Rb(e):(n.return=t,Hv=n)}}function Rb(e){for(;null!==Hv;){var t=Hv;yt(t);try{sb(t)}catch(e){xw(t,t.return,e)}if(bt(),t===e)return void(Hv=null);var n=t.sibling;if(null!==n)return n.return=t.return,void(Hv=n);Hv=t.return}}function Pb(e,t,n,r){Hv=t,function(e,t,n,r){for(;null!==Hv;){var i=Hv,o=i.child;(i.subtreeFlags&pi)!==zr&&null!==o?(o.return=i,Hv=o):Lb(e,t,n,r)}}(t,e,n,r)}function Lb(e,t,n,r){for(;null!==Hv;){var i=Hv;if((i.flags&Zr)!==zr){yt(i);try{Ib(t,i,n,r)}catch(e){xw(i,i.return,e)}bt()}if(i===e)return void(Hv=null);var o=i.sibling;if(null!==o)return o.return=i.return,void(Hv=o);Hv=i.return}}function Ib(e,t,n,r){switch(t.tag){case s:case b:case S:if(t.mode&ao){Tg();try{ib(Ap|Mp,t)}finally{xg(t)}}else ib(Ap|Mp,t)}}function Ob(e){Hv=e,function(){for(;null!==Hv;){var e=Hv,t=e.child;if((Hv.flags&qr)!==zr){var n=e.deletions;if(null!==n){for(var r=0;r<n.length;r++){var i=n[r];Hv=i,Bb(i,e)}var o=e.alternate;if(null!==o){var a=o.child;if(null!==a){o.child=null;do{var s=a.sibling;a.sibling=null,a=s}while(null!==a)}}Hv=e}}(e.subtreeFlags&pi)!==zr&&null!==t?(t.return=e,Hv=t):Nb()}}()}function Nb(){for(;null!==Hv;){var e=Hv;(e.flags&Zr)!==zr&&(yt(e),Db(e),bt());var t=e.sibling;if(null!==t)return t.return=e.return,void(Hv=t);Hv=e.return}}function Db(e){switch(e.tag){case s:case b:case S:e.mode&ao?(Tg(),rb(Ap|Mp,e,e.return),xg(e)):rb(Ap|Mp,e,e.return)}}function Bb(e,t){for(;null!==Hv;){var n=Hv;yt(n),zb(n,t),bt();var r=n.child;null!==r?(r.return=n,Hv=r):jb(e)}}function jb(e){for(;null!==Hv;){var t=Hv,n=t.sibling,r=t.return;if(lb(t),t===e)return void(Hv=null);if(null!==n)return n.return=r,void(Hv=n);Hv=r}}function zb(e,t){switch(e.tag){case s:case b:case S:e.mode&ao?(Tg(),rb(Ap,e,t),xg(e)):rb(Ap,e,t)}}function Ub(e){switch(e.tag){case s:case b:case S:try{ib(xp|Mp,e)}catch(t){xw(e,e.return,t)}break;case u:var t=e.stateNode;try{t.componentDidMount()}catch(t){xw(e,e.return,t)}}}function Fb(e){switch(e.tag){case s:case b:case S:try{ib(Ap|Mp,e)}catch(t){xw(e,e.return,t)}}}function Kb(e){switch(e.tag){case s:case b:case S:try{rb(xp|Mp,e,e.return)}catch(t){xw(e,e.return,t)}break;case u:var t=e.stateNode;"function"==typeof t.componentWillUnmount&&Gv(e,e.return,t)}}function qb(e){switch(e.tag){case s:case b:case S:try{rb(Ap|Mp,e,e.return)}catch(t){xw(e,e.return,t)}}}if("function"==typeof Symbol&&Symbol.for){var Hb=Symbol.for;Hb("selector.component"),Hb("selector.has_pseudo_class"),Hb("selector.role"),Hb("selector.test_id"),Hb("selector.text")}var Wb=[],$b=n.ReactCurrentActQueue;function Vb(){var e="undefined"!=typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:void 0;return e||null===$b.current||o("The current testing environment is not configured to support act(...)"),e}var Yb=Math.ceil,Gb=n.ReactCurrentDispatcher,Zb=n.ReactCurrentOwner,Qb=n.ReactCurrentBatchConfig,Xb=n.ReactCurrentActQueue,Jb=0,ey=1,ty=2,ny=4,ry=0,iy=1,oy=2,ay=3,sy=4,uy=5,ly=6,cy=Jb,dy=null,fy=null,hy=po,py=po,my=od(po),gy=ry,vy=null,by=po,yy=po,wy=po,_y=null,Sy=null,Ey=0,ky=500,My=1/0,Cy=500,xy=null;function Ay(){My=Ri()+Cy}function Ty(){return My}var Ry=!1,Py=null,Ly=null,Iy=!1,Oy=null,Ny=po,Dy=[],By=null,jy=50,zy=0,Uy=null,Fy=!1,Ky=!1,qy=50,Hy=0,Wy=null,$y=Xo,Vy=po,Yy=!1;function Gy(){return dy}function Zy(){return(cy&(ty|ny))!==Jb?Ri():$y!==Xo?$y:$y=Ri()}function Qy(e){if((e.mode&oo)===io)return go;if((cy&ty)!==Jb&&hy!==po)return da(hy);if(Sf.transition!==Ef){if(null!==Qb.transition){var t=Qb.transition;t._updatedFibers||(t._updatedFibers=new Set),t._updatedFibers.add(e)}return Vy===mo&&(Vy=la()),Vy}var n,r=Na();return r!==mo?r:void 0===(n=window.event)?La:fs(n.type)}function Xy(e){var t;return(e.mode&oo)===io?go:(t=ea,((ea<<=1)&zo)===po&&(ea=Uo),t)}function Jy(e,t,n,r){!function(){if(zy>jy)throw zy=0,Uy=null,new Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Hy>qy&&(Hy=0,Wy=null,o("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}(),Yy&&o("useInsertionEffect must not schedule updates."),Fy&&(Ky=!0),wa(e,n,r),(cy&ty)!==po&&e===dy?function(e){if(mt&&!Ym)switch(e.tag){case s:case b:case S:var t=fy&&ft(fy)||"Unknown",n=t;Bw.has(n)||(Bw.add(n),o("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",ft(e)||"Unknown",t,t));break;case u:jw||(o("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),jw=!0)}}(t):(qi&&Ea(e,t,n),function(e){if(e.mode&oo){if(!Vb())return}else{if(t="undefined"!=typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:void 0,"undefined"==typeof jest||!1===t)return;if(cy!==Jb)return;if(e.tag!==s&&e.tag!==b&&e.tag!==S)return}var t;if(null===Xb.current){var n=pt;try{yt(e),o("An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act",ft(e))}finally{n?yt(e):bt()}}}(t),e===dy&&((cy&ty)===Jb&&(yy=ga(yy,n)),gy===sy&&iw(e,hy)),ew(e,r),n!==go||cy!==Jb||(t.mode&oo)!==io||Xb.isBatchingLegacy||(Ay(),Rd()))}function ew(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.pendingLanes,r=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,a=n;a>0;){var s=fa(a),u=1<<s,l=o[s];l===Xo?(u&r)!==po&&(u&i)===po||(o[s]=ra(u,t)):l<=t&&(e.expiredLanes|=u),a&=~u}}(e,t);var r=na(e,e===dy?hy:po);if(r===po)return null!==n&&Kw(n),e.callbackNode=null,void(e.callbackPriority=mo);var i=ca(r),a=e.callbackPriority;if(a!==i||null!==Xb.current&&n!==Uw){var s,u;if(null!=n&&Kw(n),i===go)e.tag===kd?(null!==Xb.isBatchingLegacy&&(Xb.didScheduleLegacyUpdate=!0),u=ow.bind(null,e),xd=!0,Td(u)):Td(ow.bind(null,e)),null!==Xb.current?Xb.current.push(Pd):Sc((function(){(cy&(ty|ny))===Jb&&Pd()})),s=null;else{var l;switch(ja(r)){case Ra:l=Li;break;case Pa:l=Ii;break;case La:l=Oi;break;case Ia:l=Di;break;default:l=Oi}s=Fw(l,tw.bind(null,e))}e.callbackPriority=i,e.callbackNode=s}else null==n&&a!==go&&o("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.")}function tw(e,t){if(bg=!1,yg=!1,$y=Xo,Vy=po,(cy&(ty|ny))!==Jb)throw new Error("Should not already be working.");var n=e.callbackNode;if(Ew()&&e.callbackNode!==n)return null;var r=na(e,e===dy?hy:po);if(r===po)return null;var i=!sa(0,r)&&!function(e,t){return(t&e.expiredLanes)!==po}(e,r)&&!t,o=i?function(e,t){var n=cy;cy|=ty;var r=hw();if(dy!==e||hy!==t){if(qi){var i=e.memoizedUpdaters;i.size>0&&(zw(e,hy),i.clear()),ka(e,t)}xy=null,Ay(),dw(e,t)}for(to(t);;)try{yw();break}catch(t){fw(e,t)}return Kf(),pw(r),cy=n,null!==fy?(null!==Fi&&"function"==typeof Fi.markRenderYielded&&Fi.markRenderYielded(),ry):(no(),dy=null,hy=po,gy)}(e,r):vw(e,r);if(o!==ry){if(o===oy){var a=ia(e);a!==po&&(r=a,o=nw(e,a))}if(o===iy){var s=vy;throw dw(e,po),iw(e,r),ew(e,Ri()),s}if(o===ly)iw(e,r);else{var u=!sa(0,r),l=e.current.alternate;if(u&&!function(e){for(var t=e;;){if(t.flags&Jr){var n=t.updateQueue;if(null!==n){var r=n.stores;if(null!==r)for(var i=0;i<r.length;i++){var o=r[i],a=o.getSnapshot,s=o.value;try{if(!xu(a(),s))return!1}catch(e){return!1}}}}var u=t.child;if(t.subtreeFlags&Jr&&null!==u)u.return=t,t=u;else{if(t===e)return!0;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(l)){if((o=vw(e,r))===oy){var c=ia(e);c!==po&&(r=c,o=nw(e,c))}if(o===iy){var d=vy;throw dw(e,po),iw(e,r),ew(e,Ri()),d}}e.finishedWork=l,e.finishedLanes=r,function(e,t,n){switch(t){case ry:case iy:throw new Error("Root did not complete. This is a bug in React.");case oy:Sw(e,Sy,xy);break;case ay:if(iw(e,n),aa(n)&&!qw()){var r=Ey+ky-Ri();if(r>10){if(na(e,po)!==po)break;var i=e.suspendedLanes;if(!ma(i,n)){Zy(),_a(e,i);break}e.timeoutHandle=bc(Sw.bind(null,e,Sy,xy),r);break}}Sw(e,Sy,xy);break;case sy:if(iw(e,n),function(e){return(e&So)===e}(n))break;if(!qw()){var o=function(e,t){for(var n=e.eventTimes,r=Xo;t>0;){var i=fa(t),o=1<<i,a=n[i];a>r&&(r=a),t&=~o}return r}(e,n),a=o,s=Ri()-a,u=((l=s)<120?120:l<480?480:l<1080?1080:l<1920?1920:l<3e3?3e3:l<4320?4320:1960*Yb(l/1960))-s;if(u>10){e.timeoutHandle=bc(Sw.bind(null,e,Sy,xy),u);break}}Sw(e,Sy,xy);break;case uy:Sw(e,Sy,xy);break;default:throw new Error("Unknown root exit status.")}var l}(e,o,r)}}return ew(e,Ri()),e.callbackNode===n?tw.bind(null,e):null}function nw(e,t){var n=_y;za(e)&&(dw(e,t).flags|=Vr,o("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",e.containerInfo.nodeName.toLowerCase()));var r=vw(e,t);if(r!==oy){var i=Sy;Sy=n,null!==i&&rw(i)}return r}function rw(e){null===Sy?Sy=e:Sy.push.apply(Sy,e)}function iw(e,t){t=va(t,wy),function(e,t){e.suspendedLanes|=t,e.pingedLanes&=~t;for(var n=e.expirationTimes,r=t;r>0;){var i=fa(r),o=1<<i;n[i]=Xo,r&=~o}}(e,t=va(t,yy))}function ow(e){if(bg=yg,yg=!1,(cy&(ty|ny))!==Jb)throw new Error("Should not already be working.");Ew();var t=na(e,po);if(!pa(t,go))return ew(e,Ri()),null;var n=vw(e,t);if(e.tag!==kd&&n===oy){var r=ia(e);r!==po&&(t=r,n=nw(e,r))}if(n===iy){var i=vy;throw dw(e,po),iw(e,t),ew(e,Ri()),i}if(n===ly)throw new Error("Root did not complete. This is a bug in React.");var o=e.current.alternate;return e.finishedWork=o,e.finishedLanes=t,Sw(e,Sy,xy),ew(e,Ri()),null}function aw(e,t){var n=cy;cy|=ey;try{return e(t)}finally{(cy=n)!==Jb||Xb.isBatchingLegacy||(Ay(),Rd())}}function sw(e){null!==Oy&&Oy.tag===kd&&(cy&(ty|ny))===Jb&&Ew();var t=cy;cy|=ey;var n=Qb.transition,r=Na();try{return Qb.transition=null,Da(Ra),e?e():void 0}finally{Da(r),Qb.transition=n,((cy=t)&(ty|ny))===Jb&&Pd()}}function uw(){return(cy&(ty|ny))!==Jb}function lw(e,t){sd(my,py,e),py=ga(py,t)}function cw(e){py=my.current,ad(my,e)}function dw(e,t){e.finishedWork=null,e.finishedLanes=po;var n=e.timeoutHandle;if(n!==wc&&(e.timeoutHandle=wc,yc(n)),null!==fy)for(var r=fy.return;null!==r;)r.alternate,zv(0,r),r=r.return;dy=e;var i=l_(e.current,null);return fy=i,hy=py=t,gy=ry,vy=null,by=po,yy=po,wy=po,_y=null,Sy=null,function(){if(null!==Qf){for(var e=0;e<Qf.length;e++){var t=Qf[e],n=t.interleaved;if(null!==n){t.interleaved=null;var r=n.next,i=t.pending;if(null!==i){var o=i.next;i.next=r,n.next=o}t.pending=n}}Qf=null}}(),kf.discardPendingWarnings(),i}function fw(e,t){for(;;){var n=fy;try{if(Kf(),rm(),bt(),Zb.current=null,null===n||null===n.return)return gy=iy,vy=t,void(fy=null);F&&n.mode&ao&&Mg(n,!0),U&&(Gi(),null!==t&&"object"==typeof t&&"function"==typeof t.then?eo(n,t,hy):Ji(n,t,hy)),Ug(e,n.return,n,t,hy),_w(n)}catch(e){t=e,fy===n&&null!==n?(n=n.return,fy=n):n=fy;continue}return}}function hw(){var e=Gb.current;return Gb.current=rg,null===e?rg:e}function pw(e){Gb.current=e}function mw(e){by=ga(e,by)}function gw(){gy!==ry&&gy!==ay&&gy!==oy||(gy=sy),null!==dy&&(oa(by)||oa(yy))&&iw(dy,hy)}function vw(e,t){var n=cy;cy|=ty;var r=hw();if(dy!==e||hy!==t){if(qi){var i=e.memoizedUpdaters;i.size>0&&(zw(e,hy),i.clear()),ka(e,t)}xy=null,dw(e,t)}for(to(t);;)try{bw();break}catch(t){fw(e,t)}if(Kf(),cy=n,pw(r),null!==fy)throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return no(),dy=null,hy=po,gy}function bw(){for(;null!==fy;)ww(fy)}function yw(){for(;null!==fy&&!Ai();)ww(fy)}function ww(e){var t,n=e.alternate;yt(e),(e.mode&ao)!==io?(Eg(e),t=Ow(n,e,py),Mg(e,!0)):t=Ow(n,e,py),bt(),e.memoizedProps=e.pendingProps,null===t?_w(e):fy=t,Zb.current=null}function _w(e){var t=e;do{var n=t.alternate,r=t.return;if((t.flags&ni)===zr){yt(t);var i=void 0;if((t.mode&ao)===io?i=Bv(n,t,py):(Eg(t),i=Bv(n,t,py),Mg(t,!1)),bt(),null!==i)return void(fy=i)}else{var o=jv(0,t);if(null!==o)return o.flags&=ti,void(fy=o);if((t.mode&ao)!==io){Mg(t,!1);for(var a=t.actualDuration,s=t.child;null!==s;)a+=s.actualDuration,s=s.sibling;t.actualDuration=a}if(null===r)return gy=ly,void(fy=null);r.flags|=ni,r.subtreeFlags=zr,r.deletions=null}var u=t.sibling;if(null!==u)return void(fy=u);fy=t=r}while(null!==t);gy===ry&&(gy=uy)}function Sw(e,t,n){var r=Na(),i=Qb.transition;try{Qb.transition=null,Da(Ra),function(e,t,n,r){do{Ew()}while(null!==Oy);if(kf.flushLegacyContextWarning(),kf.flushPendingUnsafeLifecycleWarnings(),(cy&(ty|ny))!==Jb)throw new Error("Should not already be working.");var i=e.finishedWork,a=e.finishedLanes;if(function(e){null!==Fi&&"function"==typeof Fi.markCommitStarted&&Fi.markCommitStarted(e)}(a),null===i)return Vi(),null;if(a===po&&o("root.finishedLanes should not be empty during a commit. This is a bug in React."),e.finishedWork=null,e.finishedLanes=po,i===e.current)throw new Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");e.callbackNode=null,e.callbackPriority=mo;var s=ga(i.lanes,i.childLanes);(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=po,e.pingedLanes=po,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t;for(var r=e.entanglements,i=e.eventTimes,o=e.expirationTimes,a=n;a>0;){var s=fa(a),u=1<<s;r[s]=po,i[s]=Xo,o[s]=Xo,a&=~u}})(e,s),e===dy&&(dy=null,fy=null,hy=po),(i.subtreeFlags&pi)===zr&&(i.flags&pi)===zr||Iy||(Iy=!0,By=n,Fw(Oi,(function(){return Ew(),null})));var u=(i.subtreeFlags&(di|fi|hi|pi))!==zr,l=(i.flags&(di|fi|hi|pi))!==zr;if(u||l){var c=Qb.transition;Qb.transition=null;var d=Na();Da(Ra);var f=cy;cy|=ny,Zb.current=null,eb(e,i),Sg(),function(e,t,n){Wv=n,$v=e,yt(t),Sb(t,e),yt(t),Wv=null,$v=null}(e,i,a),e.containerInfo,zu(hc),as(fc),fc=null,hc=null,e.current=i,function(e){null!==Fi&&"function"==typeof Fi.markLayoutEffectsStarted&&Fi.markLayoutEffectsStarted(e)}(a),kb(i,e,a),null!==Fi&&"function"==typeof Fi.markLayoutEffectsStopped&&Fi.markLayoutEffectsStopped(),Ti(),cy=f,Da(d),Qb.transition=c}else e.current=i,Sg();var h=Iy;if(Iy?(Iy=!1,Oy=e,Ny=a):(Hy=0,Wy=null),(s=e.pendingLanes)===po&&(Ly=null),h||Lw(e.current,!1),function(e,t){if(Ui&&"function"==typeof Ui.onCommitFiberRoot)try{var n=(e.current.flags&$r)===$r;if(F){var r;switch(t){case Ra:r=Li;break;case Pa:r=Ii;break;case La:r=Oi;break;case Ia:r=Di;break;default:r=Oi}Ui.onCommitFiberRoot(zi,e,r,n)}}catch(e){Ki||(Ki=!0,o("React instrumentation encountered an error: %s",e))}}(i.stateNode,r),qi&&e.memoizedUpdaters.clear(),Wb.forEach((function(e){return e()})),ew(e,Ri()),null!==t)for(var p=e.onRecoverableError,m=0;m<t.length;m++){var g=t[m],v=g.stack,b=g.digest;p(g.value,{componentStack:v,digest:b})}if(Ry){Ry=!1;var y=Py;throw Py=null,y}pa(Ny,go)&&e.tag!==kd&&Ew(),pa(s=e.pendingLanes,go)?(yg=!0,e===Uy?zy++:(zy=0,Uy=e)):zy=0,Pd(),Vi()}(e,t,n,r)}finally{Qb.transition=i,Da(r)}return null}function Ew(){if(null!==Oy){var e=ja(Ny),t=function(e,t){return 0===e||e>t?e:t}(La,e),n=Qb.transition,r=Na();try{return Qb.transition=null,Da(t),function(){if(null===Oy)return!1;var e=By;By=null;var t=Oy,n=Ny;if(Oy=null,Ny=po,(cy&(ty|ny))!==Jb)throw new Error("Cannot flush passive effects while already rendering.");Fy=!0,Ky=!1,function(e){null!==Fi&&"function"==typeof Fi.markPassiveEffectsStarted&&Fi.markPassiveEffectsStarted(e)}(n);var r=cy;cy|=ny,Ob(t.current),Pb(t,t.current,n,e);var i=Dy;Dy=[];for(var a=0;a<i.length;a++)ob(0,i[a]);null!==Fi&&"function"==typeof Fi.markPassiveEffectsStopped&&Fi.markPassiveEffectsStopped(),Lw(t.current,!0),cy=r,Pd(),Ky?t===Wy?Hy++:(Hy=0,Wy=t):Hy=0,Fy=!1,Ky=!1,function(e){if(Ui&&"function"==typeof Ui.onPostCommitFiberRoot)try{Ui.onPostCommitFiberRoot(zi,e)}catch(e){Ki||(Ki=!0,o("React instrumentation encountered an error: %s",e))}}(t);var s=t.current.stateNode;return s.effectDuration=0,s.passiveEffectDuration=0,!0}()}finally{Da(r),Qb.transition=n}}return!1}function kw(e){return null!==Ly&&Ly.has(e)}var Mw=function(e){Ry||(Ry=!0,Py=e)};function Cw(e,t,n){var r=hh(e,Ng(e,Pg(n,t),go),go),i=Zy();null!==r&&(wa(r,go,i),ew(r,i))}function xw(e,t,n){if(function(e){Dr(null,(function(){throw e})),Br()}(n),Hw(!1),e.tag!==c){var r=null;for(r=t;null!==r;){if(r.tag===c)return void Cw(r,e,n);if(r.tag===u){var i=r.type,a=r.stateNode;if("function"==typeof i.getDerivedStateFromError||"function"==typeof a.componentDidCatch&&!kw(a)){var s=hh(r,Dg(r,Pg(n,e),go),go),l=Zy();return void(null!==s&&(wa(s,go,l),ew(s,l)))}}r=r.return}o("Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.\n\nError message:\n\n%s",n)}else Cw(e,e,n)}function Aw(e,t,n){var r=e.pingCache;null!==r&&r.delete(t);var i=Zy();_a(e,n),function(e){e.tag!==kd&&Vb()&&null===Xb.current&&o("A suspended resource finished loading inside a test, but the event was not wrapped in act(...).\n\nWhen testing, code that resolves suspended data should be wrapped into act(...):\n\nact(() => {\n /* finish loading suspended data */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act")}(e),dy===e&&ma(hy,n)&&(gy===sy||gy===ay&&aa(hy)&&Ri()-Ey<ky?dw(e,po):wy=ga(wy,n)),ew(e,i)}function Tw(e,t){t===mo&&(t=Xy(e));var n=Zy(),r=eh(e,t);null!==r&&(wa(r,t,n),ew(r,n))}function Rw(e){var t=e.memoizedState,n=mo;null!==t&&(n=t.retryLane),Tw(e,n)}function Pw(e,t){var n,r=mo;switch(e.tag){case w:n=e.stateNode;var i=e.memoizedState;null!==i&&(r=i.retryLane);break;case C:n=e.stateNode;break;default:throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}null!==n&&n.delete(t),Tw(e,r)}function Lw(e,t){yt(e),Iw(e,li,Kb),t&&Iw(e,ci,qb),Iw(e,li,Ub),t&&Iw(e,ci,Fb),bt()}function Iw(e,t,n){for(var r=e,i=null;null!==r;){var o=r.subtreeFlags&t;r!==i&&null!==r.child&&o!==zr?r=r.child:((r.flags&t)!==zr&&n(r),r=null!==r.sibling?r.sibling:i=r.return)}}var Ow,Nw=null;function Dw(e){if((cy&ty)===Jb&&e.mode&oo){var t=e.tag;if(t===l||t===c||t===u||t===s||t===b||t===_||t===S){var n=ft(e)||"ReactComponent";if(null!==Nw){if(Nw.has(n))return;Nw.add(n)}else Nw=new Set([n]);var r=pt;try{yt(e),o("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{r?yt(e):bt()}}}}Ow=function(e,t,n){var r=v_(null,t);try{return Pv(e,t,n)}catch(o){if(Qd||null!==o&&"object"==typeof o&&"function"==typeof o.then)throw o;if(Kf(),rm(),zv(0,t),v_(t,r),t.mode&ao&&Eg(t),Dr(null,Pv,null,e,t,n),Pr){var i=Br();"object"==typeof i&&null!==i&&i._suppressLogging&&"object"==typeof o&&null!==o&&!o._suppressLogging&&(o._suppressLogging=!0)}throw o}};var Bw,jw=!1;function zw(e,t){qi&&e.memoizedUpdaters.forEach((function(n){Ea(e,n,t)}))}Bw=new Set;var Uw={};function Fw(e,t){var n=Xb.current;return null!==n?(n.push(t),Uw):Ci(e,t)}function Kw(e){if(e!==Uw)return xi(e)}function qw(){return null!==Xb.current}function Hw(e){Yy=e}var Ww=null,$w=null,Vw=function(e){Ww=e};function Yw(e){if(null===Ww)return e;var t=Ww(e);return void 0===t?e:t.current}function Gw(e){return Yw(e)}function Zw(e){if(null===Ww)return e;var t=Ww(e);if(void 0===t){if(null!=e&&"function"==typeof e.render){var n=Yw(e.render);if(e.render!==n){var r={$$typeof:Ie,render:n};return void 0!==e.displayName&&(r.displayName=e.displayName),r}}return e}return t.current}function Qw(e,t){if(null===Ww)return!1;var n=e.elementType,r=t.type,i=!1,o="object"==typeof r&&null!==r?r.$$typeof:null;switch(e.tag){case u:"function"==typeof r&&(i=!0);break;case s:("function"==typeof r||o===Be)&&(i=!0);break;case b:(o===Ie||o===Be)&&(i=!0);break;case _:case S:(o===De||o===Be)&&(i=!0);break;default:return!1}if(i){var a=Ww(n);if(void 0!==a&&a===Ww(r))return!0}return!1}function Xw(e){null!==Ww&&"function"==typeof WeakSet&&(null===$w&&($w=new WeakSet),$w.add(e))}var Jw=function(e,t){if(null!==Ww){var n=t.staleFamilies,r=t.updatedFamilies;Ew(),sw((function(){t_(e.current,r,n)}))}},e_=function(e,t){e.context===ud&&(Ew(),sw((function(){x_(t,e,null,null)})))};function t_(e,t,n){var r=e.alternate,i=e.child,o=e.sibling,a=e.tag,l=e.type,c=null;switch(a){case s:case S:case u:c=l;break;case b:c=l.render}if(null===Ww)throw new Error("Expected resolveFamily to be set during hot reload.");var d=!1,f=!1;if(null!==c){var h=Ww(c);void 0!==h&&(n.has(h)?f=!0:t.has(h)&&(a===u?f=!0:d=!0))}if(null!==$w&&($w.has(e)||null!==r&&$w.has(r))&&(f=!0),f&&(e._debugNeedsRemount=!0),f||d){var p=eh(e,go);null!==p&&Jy(p,e,go,Xo)}null===i||f||t_(i,t,n),null!==o&&t_(o,t,n)}var n_,r_=function(e,t){var n=new Set,r=new Set(t.map((function(e){return e.current})));return i_(e.current,r,n),n};function i_(e,t,n){var r=e.child,i=e.sibling,o=e.tag,a=e.type,l=null;switch(o){case s:case S:case u:l=a;break;case b:l=a.render}var h=!1;null!==l&&t.has(l)&&(h=!0),h?function(e,t){var n=function(e,t){for(var n=e,r=!1;;){if(n.tag===f)r=!0,t.add(n.stateNode);else if(null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)return r;for(;null===n.sibling;){if(null===n.return||n.return===e)return r;n=n.return}n.sibling.return=n.return,n=n.sibling}return!1}(e,t);if(!n)for(var r=e;;){switch(r.tag){case f:return void t.add(r.stateNode);case d:case c:return void t.add(r.stateNode.containerInfo)}if(null===r.return)throw new Error("Expected to reach root first.");r=r.return}}(e,n):null!==r&&i_(r,t,n),null!==i&&i_(i,t,n)}n_=!1;try{var o_=Object.preventExtensions({});new Map([[o_,null]]),new Set([o_])}catch(e){n_=!0}function a_(e,t,n,r){this.tag=e,this.key=n,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=r,this.flags=zr,this.subtreeFlags=zr,this.deletions=null,this.lanes=po,this.childLanes=po,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,n_||"function"!=typeof Object.preventExtensions||Object.preventExtensions(this)}var s_=function(e,t,n,r){return new a_(e,t,n,r)};function u_(e){var t=e.prototype;return!(!t||!t.isReactComponent)}function l_(e,t){var n=e.alternate;null===n?((n=s_(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n._debugSource=e._debugSource,n._debugOwner=e._debugOwner,n._debugHookTypes=e._debugHookTypes,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=zr,n.subtreeFlags=zr,n.deletions=null,n.actualDuration=0,n.actualStartTime=-1),n.flags=e.flags&mi,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue;var r=e.dependencies;switch(n.dependencies=null===r?null:{lanes:r.lanes,firstContext:r.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.selfBaseDuration=e.selfBaseDuration,n.treeBaseDuration=e.treeBaseDuration,n._debugNeedsRemount=e._debugNeedsRemount,n.tag){case l:case s:case S:n.type=Yw(e.type);break;case u:n.type=Gw(e.type);break;case b:n.type=Zw(e.type)}return n}function c_(e,t){e.flags&=mi|Fr;var n=e.alternate;if(null===n)e.childLanes=po,e.lanes=t,e.child=null,e.subtreeFlags=zr,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0;else{e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=zr,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type;var r=n.dependencies;e.dependencies=null===r?null:{lanes:r.lanes,firstContext:r.firstContext},e.selfBaseDuration=n.selfBaseDuration,e.treeBaseDuration=n.treeBaseDuration}return e}function d_(e,t,n,r,i,a){var s=l,c=e;if("function"==typeof e)u_(e)?(s=u,c=Gw(c)):c=Yw(c);else if("string"==typeof e)s=f;else e:switch(e){case Ae:return h_(n.children,i,a,t);case Te:s=m,((i|=so)&oo)!==io&&(i|=uo);break;case Re:return function(e,t,n,r){"string"!=typeof e.id&&o('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id);var i=s_(y,e,r,t|ao);return i.elementType=Re,i.lanes=n,i.stateNode={effectDuration:0,passiveEffectDuration:0},i}(n,i,a,t);case Oe:return function(e,t,n,r){var i=s_(w,e,r,t);return i.elementType=Oe,i.lanes=n,i}(n,i,a,t);case Ne:return function(e,t,n,r){var i=s_(C,e,r,t);return i.elementType=Ne,i.lanes=n,i}(n,i,a,t);case je:return p_(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Pe:s=v;break e;case Le:s=g;break e;case Ie:s=b,c=Zw(c);break e;case De:s=_;break e;case Be:s=E,c=null;break e}var d="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(d+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var h=r?ft(r):null;throw h&&(d+="\n\nCheck the render method of `"+h+"`."),new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(null==e?e:typeof e)+"."+d)}var p=s_(s,n,t,i);return p.elementType=e,p.type=c,p.lanes=a,p._debugOwner=r,p}function f_(e,t,n){var r;r=e._owner;var i=d_(e.type,e.key,e.props,r,t,n);return i._debugSource=e._source,i._debugOwner=e._owner,i}function h_(e,t,n,r){var i=s_(p,e,r,t);return i.lanes=n,i}function p_(e,t,n,r){var i=s_(A,e,r,t);return i.elementType=je,i.lanes=n,i.stateNode={isHidden:!1},i}function m_(e,t,n){var r=s_(h,e,null,t);return r.lanes=n,r}function g_(e,t,n){var r=null!==e.children?e.children:[],i=s_(d,r,e.key,t);return i.lanes=n,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}function v_(e,t){return null===e&&(e=s_(l,null,null,io)),e.tag=t.tag,e.key=t.key,e.elementType=t.elementType,e.type=t.type,e.stateNode=t.stateNode,e.return=t.return,e.child=t.child,e.sibling=t.sibling,e.index=t.index,e.ref=t.ref,e.pendingProps=t.pendingProps,e.memoizedProps=t.memoizedProps,e.updateQueue=t.updateQueue,e.memoizedState=t.memoizedState,e.dependencies=t.dependencies,e.mode=t.mode,e.flags=t.flags,e.subtreeFlags=t.subtreeFlags,e.deletions=t.deletions,e.lanes=t.lanes,e.childLanes=t.childLanes,e.alternate=t.alternate,e.actualDuration=t.actualDuration,e.actualStartTime=t.actualStartTime,e.selfBaseDuration=t.selfBaseDuration,e.treeBaseDuration=t.treeBaseDuration,e._debugSource=t._debugSource,e._debugOwner=t._debugOwner,e._debugNeedsRemount=t._debugNeedsRemount,e._debugHookTypes=t._debugHookTypes,e}function b_(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=wc,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=mo,this.eventTimes=ya(po),this.expirationTimes=ya(Xo),this.pendingLanes=po,this.suspendedLanes=po,this.pingedLanes=po,this.expiredLanes=po,this.mutableReadLanes=po,this.finishedLanes=po,this.entangledLanes=po,this.entanglements=ya(po),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0,this.memoizedUpdaters=new Set;for(var o=this.pendingUpdatersLaneMap=[],a=0;a<ho;a++)o.push(new Set);switch(t){case Md:this._debugRootType=n?"hydrateRoot()":"createRoot()";break;case kd:this._debugRootType=n?"hydrate()":"render()"}}function y_(e,t,n,r,i,o,a,s,u,l){var d=new b_(e,t,n,s,u),f=function(e,t,n){var r;return e===Md?(r=oo,!0===t&&(r|=so,r|=uo)):r=io,qi&&(r|=ao),s_(c,null,null,r)}(t,o);d.current=f,f.stateNode=d;var h={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null};return f.memoizedState=h,ch(f),d}var w_,__,S_="18.2.0";function E_(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return function(e){Q(e)&&o("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Z(e))}(r),{$$typeof:xe,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function k_(e){if(!e)return ud;var t=jr(e),n=Ed(t);if(t.tag===u){var r=t.type;if(gd(r))return wd(t,r,n)}return n}function M_(e,t,n,r,i,o,a,s){return y_(e,t,!1,null,0,r,0,o,a)}function C_(e,t,n,r,i,o,a,s,u,l){var c=y_(n,r,!0,e,0,o,0,s,u);c.context=k_(null);var d=c.current,f=Zy(),h=Qy(d),p=fh(f,h);return p.callback=null!=t?t:null,hh(d,p,h),function(e,t,n){e.current.lanes=t,wa(e,t,n),ew(e,n)}(c,h,f),c}function x_(e,t,n,r){!function(e,t){if(Ui&&"function"==typeof Ui.onScheduleFiberRoot)try{Ui.onScheduleFiberRoot(zi,e,t)}catch(e){Ki||(Ki=!0,o("React instrumentation encountered an error: %s",e))}}(t,e);var i=t.current,a=Zy(),s=Qy(i);!function(e){null!==Fi&&"function"==typeof Fi.markRenderScheduled&&Fi.markRenderScheduled(e)}(s);var u=k_(n);null===t.context?t.context=u:t.pendingContext=u,mt&&null!==pt&&!w_&&(w_=!0,o("Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.",ft(pt)||"Unknown"));var l=fh(a,s);l.payload={element:e},null!==(r=void 0===r?null:r)&&("function"!=typeof r&&o("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",r),l.callback=r);var c=hh(i,l,s);return null!==c&&(Jy(c,i,s,a),ph(c,i,s)),s}function A_(e){var t=e.current;return t.child?(t.child.tag,t.child.stateNode):null}function T_(e,t){var n=e.memoizedState;null!==n&&null!==n.dehydrated&&(n.retryLane=function(e,t){return e!==mo&&e<t?e:t}(n.retryLane,t))}function R_(e,t){T_(e,t);var n=e.alternate;n&&T_(n,t)}function P_(e){var t=ki(e);return null===t?null:t.stateNode}w_=!1,__={};var L_,I_,O_,N_,D_,B_,j_,z_,U_,F_=function(e){return null},K_=function(e){return!1},q_=function(e,t,n){var r=t[n],i=Yt(e)?e.slice():Ge({},e);return n+1===t.length?(Yt(i)?i.splice(r,1):delete i[r],i):(i[r]=q_(e[r],t,n+1),i)},H_=function(e,t){return q_(e,t,0)},W_=function(e,t,n,r){var i=t[r],o=Yt(e)?e.slice():Ge({},e);return r+1===t.length?(o[n[r]]=o[i],Yt(o)?o.splice(i,1):delete o[i]):o[i]=W_(e[i],t,n,r+1),o},$_=function(e,t,n){if(t.length===n.length){for(var r=0;r<n.length-1;r++)if(t[r]!==n[r])return void i("copyWithRename() expects paths to be the same except for the deepest key");return W_(e,t,n,0)}i("copyWithRename() expects paths of the same length")},V_=function(e,t,n,r){if(n>=t.length)return r;var i=t[n],o=Yt(e)?e.slice():Ge({},e);return o[i]=V_(e[i],t,n+1,r),o},Y_=function(e,t,n){return V_(e,t,0,n)},G_=function(e,t){for(var n=e.memoizedState;null!==n&&t>0;)n=n.next,t--;return n};function Z_(e){var t=Si(e);return null===t?null:t.stateNode}function Q_(e){return null}function X_(){return pt}L_=function(e,t,n,r){var i=G_(e,t);if(null!==i){var o=Y_(i.memoizedState,n,r);i.memoizedState=o,i.baseState=o,e.memoizedProps=Ge({},e.memoizedProps);var a=eh(e,go);null!==a&&Jy(a,e,go,Xo)}},I_=function(e,t,n){var r=G_(e,t);if(null!==r){var i=H_(r.memoizedState,n);r.memoizedState=i,r.baseState=i,e.memoizedProps=Ge({},e.memoizedProps);var o=eh(e,go);null!==o&&Jy(o,e,go,Xo)}},O_=function(e,t,n,r){var i=G_(e,t);if(null!==i){var o=$_(i.memoizedState,n,r);i.memoizedState=o,i.baseState=o,e.memoizedProps=Ge({},e.memoizedProps);var a=eh(e,go);null!==a&&Jy(a,e,go,Xo)}},N_=function(e,t,n){e.pendingProps=Y_(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var r=eh(e,go);null!==r&&Jy(r,e,go,Xo)},D_=function(e,t){e.pendingProps=H_(e.memoizedProps,t),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var n=eh(e,go);null!==n&&Jy(n,e,go,Xo)},B_=function(e,t,n){e.pendingProps=$_(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var r=eh(e,go);null!==r&&Jy(r,e,go,Xo)},j_=function(e){var t=eh(e,go);null!==t&&Jy(t,e,go,Xo)},z_=function(e){F_=e},U_=function(e){K_=e};var J_="function"==typeof reportError?reportError:function(e){console.error(e)};function eS(e){this._internalRoot=e}function tS(e){this._internalRoot=e}function nS(e){return!(!e||e.nodeType!==pn&&e.nodeType!==vn&&e.nodeType!==bn&&B)}function rS(e){return!(!e||e.nodeType!==pn&&e.nodeType!==vn&&e.nodeType!==bn&&(e.nodeType!==gn||" react-mount-point-unstable "!==e.nodeValue))}function iS(e){e.nodeType===pn&&e.tagName&&"BODY"===e.tagName.toUpperCase()&&o("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),Wc(e)&&(e._reactRootContainer?o("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):o("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}tS.prototype.render=eS.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw new Error("Cannot update an unmounted root.");"function"==typeof arguments[1]?o("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):nS(arguments[1])?o("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):void 0!==arguments[1]&&o("You passed a second argument to root.render(...) but it only accepts one argument.");var n=t.containerInfo;if(n.nodeType!==gn){var r=P_(t.current);r&&r.parentNode!==n&&o("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}x_(e,t,null,null)},tS.prototype.unmount=eS.prototype.unmount=function(){"function"==typeof arguments[0]&&o("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uw()&&o("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),sw((function(){x_(null,e,null,null)})),Hc(t)}},tS.prototype.unstable_scheduleHydration=function(e){e&&function(e){for(var t=Aa(),n={blockedOn:null,target:e,priority:t},r=0;r<Ya.length&&Ba(t,Ya[r].priority);r++);Ya.splice(r,0,n),0===r&&Xa(n)}(e)};var oS,aS,sS,uS=n.ReactCurrentOwner;function lS(e){return e?e.nodeType===vn?e.documentElement:e.firstChild:null}function cS(){}function dS(e,t,n,r,i){oS(n),function(e,t){null!==e&&"function"!=typeof e&&o("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.","render",e)}(void 0===i?null:i);var a,s=n._reactRootContainer;if(s){if("function"==typeof i){var u=i;i=function(){var e=A_(a);u.call(e)}}x_(t,a=s,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=A_(a);o.call(e)}}var a=C_(t,r,e,kd,0,!1,0,"",cS);return e._reactRootContainer=a,qc(a.current,e),ml(e.nodeType===gn?e.parentNode:e),sw(),a}for(var s;s=e.lastChild;)e.removeChild(s);if("function"==typeof r){var u=r;r=function(){var e=A_(l);u.call(e)}}var l=M_(e,kd,0,!1,0,"",cS);return e._reactRootContainer=l,qc(l.current,e),ml(e.nodeType===gn?e.parentNode:e),sw((function(){x_(t,l,n,r)})),l}(n,t,e,i,r);return A_(a)}oS=function(e){if(e._reactRootContainer&&e.nodeType!==gn){var t=P_(e._reactRootContainer.current);t&&t.parentNode!==e&&o("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var n=!!e._reactRootContainer,r=lS(e);!(!r||!Vc(r))&&!n&&o("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===pn&&e.tagName&&"BODY"===e.tagName.toUpperCase()&&o("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")},aS=function(e){switch(e.tag){case c:var t=e.stateNode;if(za(t)){var n=function(e){return ta(e.pendingLanes)}(t);!function(e,t){t!==po&&(Sa(e,ga(t,go)),ew(e,Ri()),(cy&(ty|ny))===Jb&&(Ay(),Pd()))}(t,n)}break;case w:sw((function(){var t=eh(e,go);if(null!==t){var n=Zy();Jy(t,e,go,n)}})),R_(e,go)}},Ma=aS,function(e){Ca=e}((function(e){if(e.tag===w){var t=$o,n=eh(e,t);null!==n&&Jy(n,e,t,Zy()),R_(e,t)}})),function(e){xa=e}((function(e){if(e.tag===w){var t=Qy(e),n=eh(e,t);null!==n&&Jy(n,e,t,Zy()),R_(e,t)}})),function(e){Aa=e}(Na),function(e){Ta=e}((function(e,t){var n=Oa;try{return Oa=e,t()}finally{Oa=n}})),"function"==typeof Map&&null!=Map.prototype&&"function"==typeof Map.prototype.forEach&&"function"==typeof Set&&null!=Set.prototype&&"function"==typeof Set.prototype.clear&&"function"==typeof Set.prototype.forEach||o("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),sS=function(e,t,n){switch(t){case"input":return void Ut(e,n);case"textarea":return void function(e,t){rn(e,t)}(e,n);case"select":return void function(e,t){var n=e,r=t.value;null!=r&&Qt(n,!!t.multiple,r,!1)}(e,n)}},hr=sS,yr=aw,wr=sw;var fS={usingClientEntryPoint:!1,Events:[Vc,Yc,Gc,vr,br,aw]},hS=function(e){var t=e.findFiberByHostInstance,r=n.ReactCurrentDispatcher;return function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled)return!0;if(!t.supportsFiber)return o("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{U&&(e=Ge({},e,{getLaneLabelMap:$i,injectProfilingHooks:Wi})),zi=t.inject(e),Ui=t}catch(e){o("React instrumentation encountered an error: %s.",e)}return!!t.checkDCE}({bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:L_,overrideHookStateDeletePath:I_,overrideHookStateRenamePath:O_,overrideProps:N_,overridePropsDeletePath:D_,overridePropsRenamePath:B_,setErrorHandler:z_,setSuspenseHandler:U_,scheduleUpdate:j_,currentDispatcherRef:r,findHostInstanceByFiber:Z_,findFiberByHostInstance:t||Q_,findHostInstancesForRefresh:r_,scheduleRefresh:Jw,scheduleRoot:e_,setRefreshHandler:Vw,getCurrentFiber:X_,reconcilerVersion:S_})}({findFiberByHostInstance:$c,bundleType:1,version:S_,rendererPackageName:"react-dom"});if(!hS&&Y&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&-1===navigator.userAgent.indexOf("Edge")||navigator.userAgent.indexOf("Firefox")>-1)){var pS=window.location.protocol;/^(https?|file):$/.test(pS)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+("file:"===pS?"\nYou might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq":""),"font-weight:bold")}hR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fS,hR.createPortal=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!nS(t))throw new Error("Target container is not a DOM element.");return E_(e,t,null,n)},hR.createRoot=function(e,t){return fS.usingClientEntryPoint||o('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),function(e,t){if(!nS(e))throw new Error("createRoot(...): Target container is not a DOM element.");iS(e);var n=!1,r="",a=J_;null!=t&&(t.hydrate?i("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):"object"==typeof t&&null!==t&&t.$$typeof===Ce&&o("You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:\n\n let root = createRoot(domContainer);\n root.render(<App />);"),!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(a=t.onRecoverableError),void 0!==t.transitionCallbacks&&t.transitionCallbacks);var s=M_(e,Md,0,n,0,r,a);return qc(s.current,e),ml(e.nodeType===gn?e.parentNode:e),new eS(s)}(e,t)},hR.findDOMNode=function(e){var t=uS.current;return null!==t&&null!==t.stateNode&&(t.stateNode._warnedAboutRefsInRender||o("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",ct(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0),null==e?null:e.nodeType===pn?e:function(e,t){var n=jr(e);if(void 0===n){if("function"==typeof e.render)throw new Error("Unable to find node on an unmounted component.");var r=Object.keys(e).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+r)}var i=Si(n);if(null===i)return null;if(i.mode&so){var a=ft(n)||"Component";if(!__[a]){__[a]=!0;var s=pt;try{yt(i),n.mode&so?o("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,a):o("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,a)}finally{s?yt(s):bt()}}}return i.stateNode}(e,"findDOMNode")},hR.flushSync=function(e){return uw()&&o("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),sw(e)},hR.hydrate=function(e,t,n){if(o("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!rS(t))throw new Error("Target container is not a DOM element.");return Wc(t)&&void 0===t._reactRootContainer&&o("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?"),dS(null,e,t,!0,n)},hR.hydrateRoot=function(e,t,n){return fS.usingClientEntryPoint||o('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),function(e,t,n){if(!nS(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");iS(e),void 0===t&&o("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var r=null!=n&&n.hydratedSources||null,i=!1,a="",s=J_;null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError));var u=C_(t,null,e,Md,0,i,0,a,s);if(qc(u.current,e),ml(e),r)for(var l=0;l<r.length;l++)Pp(u,r[l]);return new tS(u)}(e,t,n)},hR.render=function(e,t,n){if(o("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!rS(t))throw new Error("Target container is not a DOM element.");return Wc(t)&&void 0===t._reactRootContainer&&o("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?"),dS(null,e,t,!1,n)},hR.unmountComponentAtNode=function(e){if(!rS(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");if(Wc(e)&&void 0===e._reactRootContainer&&o("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?"),e._reactRootContainer){var t=lS(e);return t&&!Vc(t)&&o("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React."),sw((function(){dS(null,null,e,!1,(function(){e._reactRootContainer=null,Hc(e)}))})),!0}var n=lS(e),r=!(!n||!Vc(n)),i=e.nodeType===pn&&rS(e.parentNode)&&!!e.parentNode._reactRootContainer;return r&&o("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",i?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component."),!1},hR.unstable_batchedUpdates=aw,hR.unstable_renderSubtreeIntoContainer=function(e,t,n,r){return function(e,t,n,r){if(o("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!rS(n))throw new Error("Target container is not a DOM element.");if(null==e||!function(e){return void 0!==e._reactInternals}(e))throw new Error("parentComponent must be a valid React Component");return dS(e,t,n,!1,r)}(e,t,n,r)},hR.version=S_,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),hR}function mR(){if(fR)return tR;fR=1;var e=(dR||(dR=1,"production"===je.env.NODE_ENV?(function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){if("production"!==je.env.NODE_ENV)throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),nR.exports=lR()):nR.exports=pR()),nR.exports);if("production"===je.env.NODE_ENV)tR.createRoot=e.createRoot,tR.hydrateRoot=e.hydrateRoot;else{var t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;tR.createRoot=function(n,r){t.usingClientEntryPoint=!0;try{return e.createRoot(n,r)}finally{t.usingClientEntryPoint=!1}},tR.hydrateRoot=function(n,r,i){t.usingClientEntryPoint=!0;try{return e.hydrateRoot(n,r,i)}finally{t.usingClientEntryPoint=!1}}}return tR}var gR,vR={exports:{}};function bR(){return gR||(gR=1,function(e,t){e.exports=(()=>{var e={192:(e,t)=>{var n,r,i=function(){var e=function(e,t){var n=e,r=a[t],i=null,o=0,u=null,g=[],v={},y=function(e,t){i=function(e){for(var t=new Array(e),n=0;n<e;n+=1){t[n]=new Array(e);for(var r=0;r<e;r+=1)t[n][r]=null}return t}(o=4*n+17),w(0,0),w(o-7,0),w(0,o-7),S(),_(),k(e,t),n>=7&&E(e),null==u&&(u=C(n,r,g)),M(u,t)},w=function(e,t){for(var n=-1;n<=7;n+=1)if(!(e+n<=-1||o<=e+n))for(var r=-1;r<=7;r+=1)t+r<=-1||o<=t+r||(i[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},_=function(){for(var e=8;e<o-8;e+=1)null==i[e][6]&&(i[e][6]=e%2==0);for(var t=8;t<o-8;t+=1)null==i[6][t]&&(i[6][t]=t%2==0)},S=function(){for(var e=s.getPatternPosition(n),t=0;t<e.length;t+=1)for(var r=0;r<e.length;r+=1){var o=e[t],a=e[r];if(null==i[o][a])for(var u=-2;u<=2;u+=1)for(var l=-2;l<=2;l+=1)i[o+u][a+l]=-2==u||2==u||-2==l||2==l||0==u&&0==l}},E=function(e){for(var t=s.getBCHTypeNumber(n),r=0;r<18;r+=1){var a=!e&&1==(t>>r&1);i[Math.floor(r/3)][r%3+o-8-3]=a}for(r=0;r<18;r+=1)a=!e&&1==(t>>r&1),i[r%3+o-8-3][Math.floor(r/3)]=a},k=function(e,t){for(var n=r<<3|t,a=s.getBCHTypeInfo(n),u=0;u<15;u+=1){var l=!e&&1==(a>>u&1);u<6?i[u][8]=l:u<8?i[u+1][8]=l:i[o-15+u][8]=l}for(u=0;u<15;u+=1)l=!e&&1==(a>>u&1),u<8?i[8][o-u-1]=l:u<9?i[8][15-u-1+1]=l:i[8][15-u-1]=l;i[o-8][8]=!e},M=function(e,t){for(var n=-1,r=o-1,a=7,u=0,l=s.getMaskFunction(t),c=o-1;c>0;c-=2)for(6==c&&(c-=1);;){for(var d=0;d<2;d+=1)if(null==i[r][c-d]){var f=!1;u<e.length&&(f=1==(e[u]>>>a&1)),l(r,c-d)&&(f=!f),i[r][c-d]=f,-1==(a-=1)&&(u+=1,a=7)}if((r+=n)<0||o<=r){r-=n,n=-n;break}}},C=function(e,t,n){for(var r=c.getRSBlocks(e,t),i=d(),o=0;o<n.length;o+=1){var a=n[o];i.put(a.getMode(),4),i.put(a.getLength(),s.getLengthInBits(a.getMode(),e)),a.write(i)}var u=0;for(o=0;o<r.length;o+=1)u+=r[o].dataCount;if(i.getLengthInBits()>8*u)throw"code length overflow. ("+i.getLengthInBits()+">"+8*u+")";for(i.getLengthInBits()+4<=8*u&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=8*u||(i.put(236,8),i.getLengthInBits()>=8*u));)i.put(17,8);return function(e,t){for(var n=0,r=0,i=0,o=new Array(t.length),a=new Array(t.length),u=0;u<t.length;u+=1){var c=t[u].dataCount,d=t[u].totalCount-c;r=Math.max(r,c),i=Math.max(i,d),o[u]=new Array(c);for(var f=0;f<o[u].length;f+=1)o[u][f]=255&e.getBuffer()[f+n];n+=c;var h=s.getErrorCorrectPolynomial(d),p=l(o[u],h.getLength()-1).mod(h);for(a[u]=new Array(h.getLength()-1),f=0;f<a[u].length;f+=1){var m=f+p.getLength()-a[u].length;a[u][f]=m>=0?p.getAt(m):0}}var g=0;for(f=0;f<t.length;f+=1)g+=t[f].totalCount;var v=new Array(g),b=0;for(f=0;f<r;f+=1)for(u=0;u<t.length;u+=1)f<o[u].length&&(v[b]=o[u][f],b+=1);for(f=0;f<i;f+=1)for(u=0;u<t.length;u+=1)f<a[u].length&&(v[b]=a[u][f],b+=1);return v}(i,r)};v.addData=function(e,t){var n=null;switch(t=t||"Byte"){case"Numeric":n=f(e);break;case"Alphanumeric":n=h(e);break;case"Byte":n=p(e);break;case"Kanji":n=m(e);break;default:throw"mode:"+t}g.push(n),u=null},v.isDark=function(e,t){if(e<0||o<=e||t<0||o<=t)throw e+","+t;return i[e][t]},v.getModuleCount=function(){return o},v.make=function(){if(n<1){for(var e=1;e<40;e++){for(var t=c.getRSBlocks(e,r),i=d(),o=0;o<g.length;o++){var a=g[o];i.put(a.getMode(),4),i.put(a.getLength(),s.getLengthInBits(a.getMode(),e)),a.write(i)}var u=0;for(o=0;o<t.length;o++)u+=t[o].dataCount;if(i.getLengthInBits()<=8*u)break}n=e}y(!1,function(){for(var e=0,t=0,n=0;n<8;n+=1){y(!0,n);var r=s.getLostPoint(v);(0==n||e>r)&&(e=r,t=n)}return t}())},v.createTableTag=function(e,t){e=e||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(t=void 0===t?4*e:t)+"px;",n+='">',n+="<tbody>";for(var r=0;r<v.getModuleCount();r+=1){n+="<tr>";for(var i=0;i<v.getModuleCount();i+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+e+"px;",n+=" height: "+e+"px;",n+=" background-color: ",n+=v.isDark(r,i)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return(n+="</tbody>")+"</table>"},v.createSvgTag=function(e,t,n,r){var i={};"object"==typeof arguments[0]&&(e=(i=arguments[0]).cellSize,t=i.margin,n=i.alt,r=i.title),e=e||2,t=void 0===t?4*e:t,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-description":null,(r="string"==typeof r?{text:r}:r||{}).text=r.text||null,r.id=r.text?r.id||"qrcode-title":null;var o,a,s,u,l=v.getModuleCount()*e+2*t,c="";for(u="l"+e+",0 0,"+e+" -"+e+",0 0,-"+e+"z ",c+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',c+=i.scalable?"":' width="'+l+'px" height="'+l+'px"',c+=' viewBox="0 0 '+l+" "+l+'" ',c+=' preserveAspectRatio="xMinYMin meet"',c+=r.text||n.text?' role="img" aria-labelledby="'+x([r.id,n.id].join(" ").trim())+'"':"",c+=">",c+=r.text?'<title id="'+x(r.id)+'">'+x(r.text)+"</title>":"",c+=n.text?'<description id="'+x(n.id)+'">'+x(n.text)+"</description>":"",c+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',c+='<path d="',a=0;a<v.getModuleCount();a+=1)for(s=a*e+t,o=0;o<v.getModuleCount();o+=1)v.isDark(a,o)&&(c+="M"+(o*e+t)+","+s+u);return(c+='" stroke="transparent" fill="black"/>')+"</svg>"},v.createDataURL=function(e,t){e=e||2,t=void 0===t?4*e:t;var n=v.getModuleCount()*e+2*t,r=t,i=n-t;return b(n,n,(function(t,n){if(r<=t&&t<i&&r<=n&&n<i){var o=Math.floor((t-r)/e),a=Math.floor((n-r)/e);return v.isDark(a,o)?0:1}return 1}))},v.createImgTag=function(e,t,n){e=e||2,t=void 0===t?4*e:t;var r=v.getModuleCount()*e+2*t,i="";return i+="<img",i+=' src="',i+=v.createDataURL(e,t),i+='"',i+=' width="',i+=r,i+='"',i+=' height="',i+=r,i+='"',n&&(i+=' alt="',i+=x(n),i+='"'),i+"/>"};var x=function(e){for(var t="",n=0;n<e.length;n+=1){var r=e.charAt(n);switch(r){case"<":t+="<";break;case">":t+=">";break;case"&":t+="&";break;case'"':t+=""";break;default:t+=r}}return t};return v.createASCII=function(e,t){if((e=e||1)<2)return function(e){e=void 0===e?2:e;var t,n,r,i,o,a=1*v.getModuleCount()+2*e,s=e,u=a-e,l={"██":"█","█ ":"▀"," █":"▄"," ":" "},c={"██":"▀","█ ":"▀"," █":" "," ":" "},d="";for(t=0;t<a;t+=2){for(r=Math.floor((t-s)/1),i=Math.floor((t+1-s)/1),n=0;n<a;n+=1)o="█",s<=n&&n<u&&s<=t&&t<u&&v.isDark(r,Math.floor((n-s)/1))&&(o=" "),s<=n&&n<u&&s<=t+1&&t+1<u&&v.isDark(i,Math.floor((n-s)/1))?o+=" ":o+="█",d+=e<1&&t+1>=u?c[o]:l[o];d+="\n"}return a%2&&e>0?d.substring(0,d.length-a-1)+Array(a+1).join("▀"):d.substring(0,d.length-1)}(t);e-=1,t=void 0===t?2*e:t;var n,r,i,o,a=v.getModuleCount()*e+2*t,s=t,u=a-t,l=Array(e+1).join("██"),c=Array(e+1).join(" "),d="",f="";for(n=0;n<a;n+=1){for(i=Math.floor((n-s)/e),f="",r=0;r<a;r+=1)o=1,s<=r&&r<u&&s<=n&&n<u&&v.isDark(i,Math.floor((r-s)/e))&&(o=0),f+=o?l:c;for(i=0;i<e;i+=1)d+=f+"\n"}return d.substring(0,d.length-1)},v.renderTo2dContext=function(e,t){t=t||2;for(var n=v.getModuleCount(),r=0;r<n;r++)for(var i=0;i<n;i++)e.fillStyle=v.isDark(r,i)?"black":"white",e.fillRect(r*t,i*t,t,t)},v};e.stringToBytes=(e.stringToBytesFuncs={default:function(e){for(var t=[],n=0;n<e.length;n+=1){var r=e.charCodeAt(n);t.push(255&r)}return t}}).default,e.createStringToBytes=function(e,t){var n=function(){for(var n=v(e),r=function(){var e=n.read();if(-1==e)throw"eof";return e},i=0,o={};;){var a=n.read();if(-1==a)break;var s=r(),u=r()<<8|r();o[String.fromCharCode(a<<8|s)]=u,i+=1}if(i!=t)throw i+" != "+t;return o}(),r="?".charCodeAt(0);return function(e){for(var t=[],i=0;i<e.length;i+=1){var o=e.charCodeAt(i);if(o<128)t.push(o);else{var a=n[e.charAt(i)];"number"==typeof a?(255&a)==a?t.push(a):(t.push(a>>>8),t.push(255&a)):t.push(r)}}return t}};var t,n,r,i,o,a={L:1,M:0,Q:3,H:2},s=(t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,r=7973,o=function(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t},(i={}).getBCHTypeInfo=function(e){for(var t=e<<10;o(t)-o(n)>=0;)t^=n<<o(t)-o(n);return 21522^(e<<10|t)},i.getBCHTypeNumber=function(e){for(var t=e<<12;o(t)-o(r)>=0;)t^=r<<o(t)-o(r);return e<<12|t},i.getPatternPosition=function(e){return t[e-1]},i.getMaskFunction=function(e){switch(e){case 0:return function(e,t){return(e+t)%2==0};case 1:return function(e,t){return e%2==0};case 2:return function(e,t){return t%3==0};case 3:return function(e,t){return(e+t)%3==0};case 4:return function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2==0};case 5:return function(e,t){return e*t%2+e*t%3==0};case 6:return function(e,t){return(e*t%2+e*t%3)%2==0};case 7:return function(e,t){return(e*t%3+(e+t)%2)%2==0};default:throw"bad maskPattern:"+e}},i.getErrorCorrectPolynomial=function(e){for(var t=l([1],0),n=0;n<e;n+=1)t=t.multiply(l([1,u.gexp(n)],0));return t},i.getLengthInBits=function(e,t){if(1<=t&&t<10)switch(e){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+e}else if(t<27)switch(e){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+e}else{if(!(t<41))throw"type:"+t;switch(e){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+e}}},i.getLostPoint=function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r+=1)for(var i=0;i<t;i+=1){for(var o=0,a=e.isDark(r,i),s=-1;s<=1;s+=1)if(!(r+s<0||t<=r+s))for(var u=-1;u<=1;u+=1)i+u<0||t<=i+u||0==s&&0==u||a==e.isDark(r+s,i+u)&&(o+=1);o>5&&(n+=3+o-5)}for(r=0;r<t-1;r+=1)for(i=0;i<t-1;i+=1){var l=0;e.isDark(r,i)&&(l+=1),e.isDark(r+1,i)&&(l+=1),e.isDark(r,i+1)&&(l+=1),e.isDark(r+1,i+1)&&(l+=1),0!=l&&4!=l||(n+=3)}for(r=0;r<t;r+=1)for(i=0;i<t-6;i+=1)e.isDark(r,i)&&!e.isDark(r,i+1)&&e.isDark(r,i+2)&&e.isDark(r,i+3)&&e.isDark(r,i+4)&&!e.isDark(r,i+5)&&e.isDark(r,i+6)&&(n+=40);for(i=0;i<t;i+=1)for(r=0;r<t-6;r+=1)e.isDark(r,i)&&!e.isDark(r+1,i)&&e.isDark(r+2,i)&&e.isDark(r+3,i)&&e.isDark(r+4,i)&&!e.isDark(r+5,i)&&e.isDark(r+6,i)&&(n+=40);var c=0;for(i=0;i<t;i+=1)for(r=0;r<t;r+=1)e.isDark(r,i)&&(c+=1);return n+Math.abs(100*c/t/t-50)/5*10},i),u=function(){for(var e=new Array(256),t=new Array(256),n=0;n<8;n+=1)e[n]=1<<n;for(n=8;n<256;n+=1)e[n]=e[n-4]^e[n-5]^e[n-6]^e[n-8];for(n=0;n<255;n+=1)t[e[n]]=n;return{glog:function(e){if(e<1)throw"glog("+e+")";return t[e]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e[t]}}}();function l(e,t){if(void 0===e.length)throw e.length+"/"+t;var n=function(){for(var n=0;n<e.length&&0==e[n];)n+=1;for(var r=new Array(e.length-n+t),i=0;i<e.length-n;i+=1)r[i]=e[i+n];return r}(),r={getAt:function(e){return n[e]},getLength:function(){return n.length},multiply:function(e){for(var t=new Array(r.getLength()+e.getLength()-1),n=0;n<r.getLength();n+=1)for(var i=0;i<e.getLength();i+=1)t[n+i]^=u.gexp(u.glog(r.getAt(n))+u.glog(e.getAt(i)));return l(t,0)},mod:function(e){if(r.getLength()-e.getLength()<0)return r;for(var t=u.glog(r.getAt(0))-u.glog(e.getAt(0)),n=new Array(r.getLength()),i=0;i<r.getLength();i+=1)n[i]=r.getAt(i);for(i=0;i<e.getLength();i+=1)n[i]^=u.gexp(u.glog(e.getAt(i))+t);return l(n,0).mod(e)}};return r}var c=function(){var e=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t=function(e,t){var n={};return n.totalCount=e,n.dataCount=t,n},n={getRSBlocks:function(n,r){var i=function(t,n){switch(n){case a.L:return e[4*(t-1)+0];case a.M:return e[4*(t-1)+1];case a.Q:return e[4*(t-1)+2];case a.H:return e[4*(t-1)+3];default:return}}(n,r);if(void 0===i)throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+r;for(var o=i.length/3,s=[],u=0;u<o;u+=1)for(var l=i[3*u+0],c=i[3*u+1],d=i[3*u+2],f=0;f<l;f+=1)s.push(t(c,d));return s}};return n}(),d=function(){var e=[],t=0,n={getBuffer:function(){return e},getAt:function(t){var n=Math.floor(t/8);return 1==(e[n]>>>7-t%8&1)},put:function(e,t){for(var r=0;r<t;r+=1)n.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return t},putBit:function(n){var r=Math.floor(t/8);e.length<=r&&e.push(0),n&&(e[r]|=128>>>t%8),t+=1}};return n},f=function(e){var t=e,n={getMode:function(){return 1},getLength:function(e){return t.length},write:function(e){for(var n=t,i=0;i+2<n.length;)e.put(r(n.substring(i,i+3)),10),i+=3;i<n.length&&(n.length-i==1?e.put(r(n.substring(i,i+1)),4):n.length-i==2&&e.put(r(n.substring(i,i+2)),7))}},r=function(e){for(var t=0,n=0;n<e.length;n+=1)t=10*t+i(e.charAt(n));return t},i=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+e};return n},h=function(e){var t=e,n={getMode:function(){return 2},getLength:function(e){return t.length},write:function(e){for(var n=t,i=0;i+1<n.length;)e.put(45*r(n.charAt(i))+r(n.charAt(i+1)),11),i+=2;i<n.length&&e.put(r(n.charAt(i)),6)}},r=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);if("A"<=e&&e<="Z")return e.charCodeAt(0)-"A".charCodeAt(0)+10;switch(e){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+e}};return n},p=function(t){var n=e.stringToBytes(t);return{getMode:function(){return 4},getLength:function(e){return n.length},write:function(e){for(var t=0;t<n.length;t+=1)e.put(n[t],8)}}},m=function(t){var n=e.stringToBytesFuncs.SJIS;if(!n)throw"sjis not supported.";!function(e,t){var r=n("友");if(2!=r.length||38726!=(r[0]<<8|r[1]))throw"sjis not supported."}();var r=n(t);return{getMode:function(){return 8},getLength:function(e){return~~(r.length/2)},write:function(e){for(var t=r,n=0;n+1<t.length;){var i=(255&t[n])<<8|255&t[n+1];if(33088<=i&&i<=40956)i-=33088;else{if(!(57408<=i&&i<=60351))throw"illegal char at "+(n+1)+"/"+i;i-=49472}i=192*(i>>>8&255)+(255&i),e.put(i,13),n+=2}if(n<t.length)throw"illegal char at "+(n+1)}}},g=function(){var e=[],t={writeByte:function(t){e.push(255&t)},writeShort:function(e){t.writeByte(e),t.writeByte(e>>>8)},writeBytes:function(e,n,r){n=n||0,r=r||e.length;for(var i=0;i<r;i+=1)t.writeByte(e[i+n])},writeString:function(e){for(var n=0;n<e.length;n+=1)t.writeByte(e.charCodeAt(n))},toByteArray:function(){return e},toString:function(){var t="";t+="[";for(var n=0;n<e.length;n+=1)n>0&&(t+=","),t+=e[n];return t+"]"}};return t},v=function(e){var t=e,n=0,r=0,i=0,o={read:function(){for(;i<8;){if(n>=t.length){if(0==i)return-1;throw"unexpected end of file./"+i}var e=t.charAt(n);if(n+=1,"="==e)return i=0,-1;e.match(/^\s$/)||(r=r<<6|a(e.charCodeAt(0)),i+=6)}var o=r>>>i-8&255;return i-=8,o}},a=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(43==e)return 62;if(47==e)return 63;throw"c:"+e};return o},b=function(e,t,n){for(var r=function(e,t){var n=e,r=t,i=new Array(e*t),o={setPixel:function(e,t,r){i[t*n+e]=r},write:function(e){e.writeString("GIF87a"),e.writeShort(n),e.writeShort(r),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(","),e.writeShort(0),e.writeShort(0),e.writeShort(n),e.writeShort(r),e.writeByte(0);var t=a(2);e.writeByte(2);for(var i=0;t.length-i>255;)e.writeByte(255),e.writeBytes(t,i,255),i+=255;e.writeByte(t.length-i),e.writeBytes(t,i,t.length-i),e.writeByte(0),e.writeString(";")}},a=function(e){for(var t=1<<e,n=1+(1<<e),r=e+1,o=s(),a=0;a<t;a+=1)o.add(String.fromCharCode(a));o.add(String.fromCharCode(t)),o.add(String.fromCharCode(n));var u,l,c,d=g(),f=(u=d,l=0,c=0,{write:function(e,t){if(e>>>t!=0)throw"length over";for(;l+t>=8;)u.writeByte(255&(e<<l|c)),t-=8-l,e>>>=8-l,c=0,l=0;c|=e<<l,l+=t},flush:function(){l>0&&u.writeByte(c)}});f.write(t,r);var h=0,p=String.fromCharCode(i[h]);for(h+=1;h<i.length;){var m=String.fromCharCode(i[h]);h+=1,o.contains(p+m)?p+=m:(f.write(o.indexOf(p),r),o.size()<4095&&(o.size()==1<<r&&(r+=1),o.add(p+m)),p=m)}return f.write(o.indexOf(p),r),f.write(n,r),f.flush(),d.toByteArray()},s=function(){var e={},t=0,n={add:function(r){if(n.contains(r))throw"dup key:"+r;e[r]=t,t+=1},size:function(){return t},indexOf:function(t){return e[t]},contains:function(t){return void 0!==e[t]}};return n};return o}(e,t),i=0;i<t;i+=1)for(var o=0;o<e;o+=1)r.setPixel(o,i,n(o,i));var a=g();r.write(a);for(var s=function(){var e=0,t=0,n=0,r="",i={},o=function(e){r+=String.fromCharCode(a(63&e))},a=function(e){if(e<0);else{if(e<26)return 65+e;if(e<52)return e-26+97;if(e<62)return e-52+48;if(62==e)return 43;if(63==e)return 47}throw"n:"+e};return i.writeByte=function(r){for(e=e<<8|255&r,t+=8,n+=1;t>=6;)o(e>>>t-6),t-=6},i.flush=function(){if(t>0&&(o(e<<6-t),e=0,t=0),n%3!=0)for(var i=3-n%3,a=0;a<i;a+=1)r+="="},i.toString=function(){return r},i}(),u=a.toByteArray(),l=0;l<u.length;l+=1)s.writeByte(u[l]);return s.flush(),"data:image/gif;base64,"+s};return e}();i.stringToBytesFuncs["UTF-8"]=function(e){return function(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t.push(r):r<2048?t.push(192|r>>6,128|63&r):r<55296||r>=57344?t.push(224|r>>12,128|r>>6&63,128|63&r):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r))}return t}(e)},void 0===(r="function"==typeof(n=function(){return i})?n.apply(t,[]):n)||(e.exports=r)},676:(e,t,n)=>{n.d(t,{default:()=>I});var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},o=function(e){return!!e&&"object"==typeof e&&!Array.isArray(e)};function a(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!t.length)return e;var s=t.shift();return void 0!==s&&o(e)&&o(s)?(e=r({},e),Object.keys(s).forEach((function(t){var n=e[t],r=s[t];Array.isArray(n)&&Array.isArray(r)?e[t]=r:o(n)&&o(r)?e[t]=a(Object.assign({},n),r):e[t]=r})),a.apply(void 0,i([e],t))):e}function s(e,t){var n=document.createElement("a");n.download=t,n.href=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function u(e){return t=this,n=void 0,i=function(){return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(t){return[2,new Promise((function(t){var n=new XMLHttpRequest;n.onload=function(){var e=new FileReader;e.onloadend=function(){t(e.result)},e.readAsDataURL(n.response)},n.open("GET",e),n.responseType="blob",n.send()}))]}))},new((r=void 0)||(r=Promise))((function(e,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,s)}u((i=i.apply(t,n||[])).next())}));var t,n,r,i}const l={L:.07,M:.15,Q:.25,H:.3};var c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};const d=function(){function e(e){var t=e.svg,n=e.type;this._svg=t,this._type=n}return e.prototype.draw=function(e,t,n,r){var i;switch(this._type){case"dots":i=this._drawDot;break;case"classy":i=this._drawClassy;break;case"classy-rounded":i=this._drawClassyRounded;break;case"rounded":i=this._drawRounded;break;case"extra-rounded":i=this._drawExtraRounded;break;default:i=this._drawSquare}i.call(this,{x:e,y:t,size:n,getNeighbor:r})},e.prototype._rotateFigure=function(e){var t,n=e.x,r=e.y,i=e.size,o=e.rotation,a=void 0===o?0:o,s=n+i/2,u=r+i/2;(0,e.draw)(),null===(t=this._element)||void 0===t||t.setAttribute("transform","rotate("+180*a/Math.PI+","+s+","+u+")")},e.prototype._basicDot=function(e){var t=this,n=e.size,r=e.x,i=e.y;this._rotateFigure(c(c({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),t._element.setAttribute("cx",String(r+n/2)),t._element.setAttribute("cy",String(i+n/2)),t._element.setAttribute("r",String(n/2))}}))},e.prototype._basicSquare=function(e){var t=this,n=e.size,r=e.x,i=e.y;this._rotateFigure(c(c({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),t._element.setAttribute("x",String(r)),t._element.setAttribute("y",String(i)),t._element.setAttribute("width",String(n)),t._element.setAttribute("height",String(n))}}))},e.prototype._basicSideRounded=function(e){var t=this,n=e.size,r=e.x,i=e.y;this._rotateFigure(c(c({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("d","M "+r+" "+i+"v "+n+"h "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, 0 "+-n)}}))},e.prototype._basicCornerRounded=function(e){var t=this,n=e.size,r=e.x,i=e.y;this._rotateFigure(c(c({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("d","M "+r+" "+i+"v "+n+"h "+n+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},e.prototype._basicCornerExtraRounded=function(e){var t=this,n=e.size,r=e.x,i=e.y;this._rotateFigure(c(c({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("d","M "+r+" "+i+"v "+n+"h "+n+"a "+n+" "+n+", 0, 0, 0, "+-n+" "+-n)}}))},e.prototype._basicCornersRounded=function(e){var t=this,n=e.size,r=e.x,i=e.y;this._rotateFigure(c(c({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("d","M "+r+" "+i+"v "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+n/2+" "+n/2+"h "+n/2+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},e.prototype._drawDot=function(e){var t=e.x,n=e.y,r=e.size;this._basicDot({x:t,y:n,size:r,rotation:0})},e.prototype._drawSquare=function(e){var t=e.x,n=e.y,r=e.size;this._basicSquare({x:t,y:n,size:r,rotation:0})},e.prototype._drawRounded=function(e){var t=e.x,n=e.y,r=e.size,i=e.getNeighbor,o=i?+i(-1,0):0,a=i?+i(1,0):0,s=i?+i(0,-1):0,u=i?+i(0,1):0,l=o+a+s+u;if(0!==l)if(l>2||o&&a||s&&u)this._basicSquare({x:t,y:n,size:r,rotation:0});else{if(2===l){var c=0;return o&&s?c=Math.PI/2:s&&a?c=Math.PI:a&&u&&(c=-Math.PI/2),void this._basicCornerRounded({x:t,y:n,size:r,rotation:c})}if(1===l)return c=0,s?c=Math.PI/2:a?c=Math.PI:u&&(c=-Math.PI/2),void this._basicSideRounded({x:t,y:n,size:r,rotation:c})}else this._basicDot({x:t,y:n,size:r,rotation:0})},e.prototype._drawExtraRounded=function(e){var t=e.x,n=e.y,r=e.size,i=e.getNeighbor,o=i?+i(-1,0):0,a=i?+i(1,0):0,s=i?+i(0,-1):0,u=i?+i(0,1):0,l=o+a+s+u;if(0!==l)if(l>2||o&&a||s&&u)this._basicSquare({x:t,y:n,size:r,rotation:0});else{if(2===l){var c=0;return o&&s?c=Math.PI/2:s&&a?c=Math.PI:a&&u&&(c=-Math.PI/2),void this._basicCornerExtraRounded({x:t,y:n,size:r,rotation:c})}if(1===l)return c=0,s?c=Math.PI/2:a?c=Math.PI:u&&(c=-Math.PI/2),void this._basicSideRounded({x:t,y:n,size:r,rotation:c})}else this._basicDot({x:t,y:n,size:r,rotation:0})},e.prototype._drawClassy=function(e){var t=e.x,n=e.y,r=e.size,i=e.getNeighbor,o=i?+i(-1,0):0,a=i?+i(1,0):0,s=i?+i(0,-1):0,u=i?+i(0,1):0;0!==o+a+s+u?o||s?a||u?this._basicSquare({x:t,y:n,size:r,rotation:0}):this._basicCornerRounded({x:t,y:n,size:r,rotation:Math.PI/2}):this._basicCornerRounded({x:t,y:n,size:r,rotation:-Math.PI/2}):this._basicCornersRounded({x:t,y:n,size:r,rotation:Math.PI/2})},e.prototype._drawClassyRounded=function(e){var t=e.x,n=e.y,r=e.size,i=e.getNeighbor,o=i?+i(-1,0):0,a=i?+i(1,0):0,s=i?+i(0,-1):0,u=i?+i(0,1):0;0!==o+a+s+u?o||s?a||u?this._basicSquare({x:t,y:n,size:r,rotation:0}):this._basicCornerExtraRounded({x:t,y:n,size:r,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:t,y:n,size:r,rotation:-Math.PI/2}):this._basicCornersRounded({x:t,y:n,size:r,rotation:Math.PI/2})},e}();var f=function(){return(f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};const h=function(){function e(e){var t=e.svg,n=e.type;this._svg=t,this._type=n}return e.prototype.draw=function(e,t,n,r){var i;switch(this._type){case"square":i=this._drawSquare;break;case"extra-rounded":i=this._drawExtraRounded;break;default:i=this._drawDot}i.call(this,{x:e,y:t,size:n,rotation:r})},e.prototype._rotateFigure=function(e){var t,n=e.x,r=e.y,i=e.size,o=e.rotation,a=void 0===o?0:o,s=n+i/2,u=r+i/2;(0,e.draw)(),null===(t=this._element)||void 0===t||t.setAttribute("transform","rotate("+180*a/Math.PI+","+s+","+u+")")},e.prototype._basicDot=function(e){var t=this,n=e.size,r=e.x,i=e.y,o=n/7;this._rotateFigure(f(f({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("clip-rule","evenodd"),t._element.setAttribute("d","M "+(r+n/2)+" "+i+"a "+n/2+" "+n/2+" 0 1 0 0.1 0zm 0 "+o+"a "+(n/2-o)+" "+(n/2-o)+" 0 1 1 -0.1 0Z")}}))},e.prototype._basicSquare=function(e){var t=this,n=e.size,r=e.x,i=e.y,o=n/7;this._rotateFigure(f(f({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("clip-rule","evenodd"),t._element.setAttribute("d","M "+r+" "+i+"v "+n+"h "+n+"v "+-n+"zM "+(r+o)+" "+(i+o)+"h "+(n-2*o)+"v "+(n-2*o)+"h "+(2*o-n)+"z")}}))},e.prototype._basicExtraRounded=function(e){var t=this,n=e.size,r=e.x,i=e.y,o=n/7;this._rotateFigure(f(f({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("clip-rule","evenodd"),t._element.setAttribute("d","M "+r+" "+(i+2.5*o)+"v "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*o+"h "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*-o+"v "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*-o+"h "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*o+"M "+(r+2.5*o)+" "+(i+o)+"h "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*o+"v "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*o+"h "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*-o+"v "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*-o)}}))},e.prototype._drawDot=function(e){var t=e.x,n=e.y,r=e.size,i=e.rotation;this._basicDot({x:t,y:n,size:r,rotation:i})},e.prototype._drawSquare=function(e){var t=e.x,n=e.y,r=e.size,i=e.rotation;this._basicSquare({x:t,y:n,size:r,rotation:i})},e.prototype._drawExtraRounded=function(e){var t=e.x,n=e.y,r=e.size,i=e.rotation;this._basicExtraRounded({x:t,y:n,size:r,rotation:i})},e}();var p=function(){return(p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};const m=function(){function e(e){var t=e.svg,n=e.type;this._svg=t,this._type=n}return e.prototype.draw=function(e,t,n,r){("square"===this._type?this._drawSquare:this._drawDot).call(this,{x:e,y:t,size:n,rotation:r})},e.prototype._rotateFigure=function(e){var t,n=e.x,r=e.y,i=e.size,o=e.rotation,a=void 0===o?0:o,s=n+i/2,u=r+i/2;(0,e.draw)(),null===(t=this._element)||void 0===t||t.setAttribute("transform","rotate("+180*a/Math.PI+","+s+","+u+")")},e.prototype._basicDot=function(e){var t=this,n=e.size,r=e.x,i=e.y;this._rotateFigure(p(p({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),t._element.setAttribute("cx",String(r+n/2)),t._element.setAttribute("cy",String(i+n/2)),t._element.setAttribute("r",String(n/2))}}))},e.prototype._basicSquare=function(e){var t=this,n=e.size,r=e.x,i=e.y;this._rotateFigure(p(p({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),t._element.setAttribute("x",String(r)),t._element.setAttribute("y",String(i)),t._element.setAttribute("width",String(n)),t._element.setAttribute("height",String(n))}}))},e.prototype._drawDot=function(e){var t=e.x,n=e.y,r=e.size,i=e.rotation;this._basicDot({x:t,y:n,size:r,rotation:i})},e.prototype._drawSquare=function(e){var t=e.x,n=e.y,r=e.size,i=e.rotation;this._basicSquare({x:t,y:n,size:r,rotation:i})},e}(),g="circle";var v=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},b=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},y=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],w=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];const _=function(){function e(e){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(e.width)),this._element.setAttribute("height",String(e.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._options=e}return Object.defineProperty(e.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),e.prototype.getElement=function(){return this._element},e.prototype.drawQR=function(e){return v(this,void 0,void 0,(function(){var t,n,r,i,o,a,s,u,c,d,f=this;return b(this,(function(h){switch(h.label){case 0:return t=e.getModuleCount(),n=Math.min(this._options.width,this._options.height)-2*this._options.margin,r=this._options.shape===g?n/Math.sqrt(2):n,i=Math.floor(r/t),o={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=e,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(h.sent(),!this._image)return[2];a=this._options,s=a.imageOptions,u=a.qrOptions,c=s.imageSize*l[u.errorCorrectionLevel],d=Math.floor(c*t*t),o=function(e){var t=e.originalHeight,n=e.originalWidth,r=e.maxHiddenDots,i=e.maxHiddenAxisDots,o=e.dotSize,a={x:0,y:0},s={x:0,y:0};if(t<=0||n<=0||r<=0||o<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var u=t/n;return a.x=Math.floor(Math.sqrt(r/u)),a.x<=0&&(a.x=1),i&&i<a.x&&(a.x=i),a.x%2==0&&a.x--,s.x=a.x*o,a.y=1+2*Math.ceil((a.x*u-1)/2),s.y=Math.round(s.x*u),(a.y*a.x>r||i&&i<a.y)&&(i&&i<a.y?(a.y=i,a.y%2==0&&a.x--):a.y-=2,s.y=a.y*o,a.x=1+2*Math.ceil((a.y/u-1)/2),s.x=Math.round(s.y/u)),{height:s.y,width:s.x,hideYDots:a.y,hideXDots:a.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:d,maxHiddenAxisDots:t-14,dotSize:i}),h.label=2;case 2:return this.drawBackground(),this.drawDots((function(e,n){var r,i,a,s,u,l;return!(f._options.imageOptions.hideBackgroundDots&&e>=(t-o.hideXDots)/2&&e<(t+o.hideXDots)/2&&n>=(t-o.hideYDots)/2&&n<(t+o.hideYDots)/2||(null===(r=y[e])||void 0===r?void 0:r[n])||(null===(i=y[e-t+7])||void 0===i?void 0:i[n])||(null===(a=y[e])||void 0===a?void 0:a[n-t+7])||(null===(s=w[e])||void 0===s?void 0:s[n])||(null===(u=w[e-t+7])||void 0===u?void 0:u[n])||(null===(l=w[e])||void 0===l?void 0:l[n-t+7]))})),this.drawCorners(),this._options.image?[4,this.drawImage({width:o.width,height:o.height,count:t,dotSize:i})]:[3,4];case 3:h.sent(),h.label=4;case 4:return[2]}}))}))},e.prototype.drawBackground=function(){var e,t,n,r=this._element,i=this._options;if(r){var o=null===(e=i.backgroundOptions)||void 0===e?void 0:e.gradient,a=null===(t=i.backgroundOptions)||void 0===t?void 0:t.color;if((o||a)&&this._createColor({options:o,color:a,additionalRotation:0,x:0,y:0,height:i.height,width:i.width,name:"background-color"}),null===(n=i.backgroundOptions)||void 0===n?void 0:n.round){var s=Math.min(i.width,i.height),u=document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id","clip-path-background-color"),this._defs.appendChild(this._backgroundClipPath),u.setAttribute("x",String((i.width-s)/2)),u.setAttribute("y",String((i.height-s)/2)),u.setAttribute("width",String(s)),u.setAttribute("height",String(s)),u.setAttribute("rx",String(s/2*i.backgroundOptions.round)),this._backgroundClipPath.appendChild(u)}}},e.prototype.drawDots=function(e){var t,n,r=this;if(!this._qr)throw"QR code is not defined";var i=this._options,o=this._qr.getModuleCount();if(o>i.width||o>i.height)throw"The canvas is too small.";var a=Math.min(i.width,i.height)-2*i.margin,s=i.shape===g?a/Math.sqrt(2):a,u=Math.floor(s/o),l=Math.floor((i.width-o*u)/2),c=Math.floor((i.height-o*u)/2),f=new d({svg:this._element,type:i.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color"),this._defs.appendChild(this._dotsClipPath),this._createColor({options:null===(t=i.dotsOptions)||void 0===t?void 0:t.gradient,color:i.dotsOptions.color,additionalRotation:0,x:0,y:0,height:i.height,width:i.width,name:"dot-color"});for(var h=function(t){for(var i=function(i){return e&&!e(t,i)?"continue":(null===(n=p._qr)||void 0===n?void 0:n.isDark(t,i))?(f.draw(l+t*u,c+i*u,u,(function(n,a){return!(t+n<0||i+a<0||t+n>=o||i+a>=o)&&!(e&&!e(t+n,i+a))&&!!r._qr&&r._qr.isDark(t+n,i+a)})),void(f._element&&p._dotsClipPath&&p._dotsClipPath.appendChild(f._element))):"continue"},a=0;a<o;a++)i(a)},p=this,m=0;m<o;m++)h(m);if(i.shape===g){var v=Math.floor((a/u-o)/2),b=o+2*v,y=l-v*u,w=c-v*u,_=[],S=Math.floor(b/2);for(m=0;m<b;m++){_[m]=[];for(var E=0;E<b;E++)m>=v-1&&m<=b-v&&E>=v-1&&E<=b-v||Math.sqrt((m-S)*(m-S)+(E-S)*(E-S))>S?_[m][E]=0:_[m][E]=this._qr.isDark(E-2*v<0?E:E>=o?E-2*v:E-v,m-2*v<0?m:m>=o?m-2*v:m-v)?1:0}var k=function(e){for(var t=function(t){if(!_[e][t])return"continue";f.draw(y+e*u,w+t*u,u,(function(n,r){var i;return!!(null===(i=_[e+n])||void 0===i?void 0:i[t+r])})),f._element&&M._dotsClipPath&&M._dotsClipPath.appendChild(f._element)},n=0;n<b;n++)t(n)},M=this;for(m=0;m<b;m++)k(m)}},e.prototype.drawCorners=function(){var e=this;if(!this._qr)throw"QR code is not defined";var t=this._element,n=this._options;if(!t)throw"Element code is not defined";var r=this._qr.getModuleCount(),i=Math.min(n.width,n.height)-2*n.margin,o=n.shape===g?i/Math.sqrt(2):i,a=Math.floor(o/r),s=7*a,u=3*a,l=Math.floor((n.width-r*a)/2),c=Math.floor((n.height-r*a)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((function(t){var i,o,f,p,g,v,b,_,S,E,k,M,C=t[0],x=t[1],A=t[2],T=l+C*a*(r-7),R=c+x*a*(r-7),P=e._dotsClipPath,L=e._dotsClipPath;if(((null===(i=n.cornersSquareOptions)||void 0===i?void 0:i.gradient)||(null===(o=n.cornersSquareOptions)||void 0===o?void 0:o.color))&&((P=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+C+"-"+x),e._defs.appendChild(P),e._cornersSquareClipPath=e._cornersDotClipPath=L=P,e._createColor({options:null===(f=n.cornersSquareOptions)||void 0===f?void 0:f.gradient,color:null===(p=n.cornersSquareOptions)||void 0===p?void 0:p.color,additionalRotation:A,x:T,y:R,height:s,width:s,name:"corners-square-color-"+C+"-"+x})),null===(g=n.cornersSquareOptions)||void 0===g?void 0:g.type){var I=new h({svg:e._element,type:n.cornersSquareOptions.type});I.draw(T,R,s,A),I._element&&P&&P.appendChild(I._element)}else for(var O=new d({svg:e._element,type:n.dotsOptions.type}),N=function(e){for(var t=function(t){if(!(null===(v=y[e])||void 0===v?void 0:v[t]))return"continue";O.draw(T+e*a,R+t*a,a,(function(n,r){var i;return!!(null===(i=y[e+n])||void 0===i?void 0:i[t+r])})),O._element&&P&&P.appendChild(O._element)},n=0;n<y[e].length;n++)t(n)},D=0;D<y.length;D++)N(D);if(((null===(b=n.cornersDotOptions)||void 0===b?void 0:b.gradient)||(null===(_=n.cornersDotOptions)||void 0===_?void 0:_.color))&&((L=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+C+"-"+x),e._defs.appendChild(L),e._cornersDotClipPath=L,e._createColor({options:null===(S=n.cornersDotOptions)||void 0===S?void 0:S.gradient,color:null===(E=n.cornersDotOptions)||void 0===E?void 0:E.color,additionalRotation:A,x:T+2*a,y:R+2*a,height:u,width:u,name:"corners-dot-color-"+C+"-"+x})),null===(k=n.cornersDotOptions)||void 0===k?void 0:k.type){var B=new m({svg:e._element,type:n.cornersDotOptions.type});B.draw(T+2*a,R+2*a,u,A),B._element&&L&&L.appendChild(B._element)}else{O=new d({svg:e._element,type:n.dotsOptions.type});var j=function(e){for(var t=function(t){if(!(null===(M=w[e])||void 0===M?void 0:M[t]))return"continue";O.draw(T+e*a,R+t*a,a,(function(n,r){var i;return!!(null===(i=w[e+n])||void 0===i?void 0:i[t+r])})),O._element&&L&&L.appendChild(O._element)},n=0;n<w[e].length;n++)t(n)};for(D=0;D<w.length;D++)j(D)}}))},e.prototype.loadImage=function(){var e=this;return new Promise((function(t,n){var r=e._options,i=new Image;if(!r.image)return n("Image is not defined");"string"==typeof r.imageOptions.crossOrigin&&(i.crossOrigin=r.imageOptions.crossOrigin),e._image=i,i.onload=function(){t()},i.src=r.image}))},e.prototype.drawImage=function(e){var t=e.width,n=e.height,r=e.count,i=e.dotSize;return v(this,void 0,void 0,(function(){var e,o,a,s,l,c,d,f,h;return b(this,(function(p){switch(p.label){case 0:return e=this._options,o=Math.floor((e.width-r*i)/2),a=Math.floor((e.height-r*i)/2),s=o+e.imageOptions.margin+(r*i-t)/2,l=a+e.imageOptions.margin+(r*i-n)/2,c=t-2*e.imageOptions.margin,d=n-2*e.imageOptions.margin,(f=document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("x",String(s)),f.setAttribute("y",String(l)),f.setAttribute("width",c+"px"),f.setAttribute("height",d+"px"),[4,u(e.image||"")];case 1:return h=p.sent(),f.setAttribute("href",h||""),this._element.appendChild(f),[2]}}))}))},e.prototype._createColor=function(e){var t=e.options,n=e.color,r=e.additionalRotation,i=e.x,o=e.y,a=e.height,s=e.width,u=e.name,l=s>a?s:a,c=document.createElementNS("http://www.w3.org/2000/svg","rect");if(c.setAttribute("x",String(i)),c.setAttribute("y",String(o)),c.setAttribute("height",String(a)),c.setAttribute("width",String(s)),c.setAttribute("clip-path","url('#clip-path-"+u+"')"),t){var d;if("radial"===t.type)(d=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",u),d.setAttribute("gradientUnits","userSpaceOnUse"),d.setAttribute("fx",String(i+s/2)),d.setAttribute("fy",String(o+a/2)),d.setAttribute("cx",String(i+s/2)),d.setAttribute("cy",String(o+a/2)),d.setAttribute("r",String(l/2));else{var f=((t.rotation||0)+r)%(2*Math.PI),h=(f+2*Math.PI)%(2*Math.PI),p=i+s/2,m=o+a/2,g=i+s/2,v=o+a/2;h>=0&&h<=.25*Math.PI||h>1.75*Math.PI&&h<=2*Math.PI?(p-=s/2,m-=a/2*Math.tan(f),g+=s/2,v+=a/2*Math.tan(f)):h>.25*Math.PI&&h<=.75*Math.PI?(m-=a/2,p-=s/2/Math.tan(f),v+=a/2,g+=s/2/Math.tan(f)):h>.75*Math.PI&&h<=1.25*Math.PI?(p+=s/2,m+=a/2*Math.tan(f),g-=s/2,v-=a/2*Math.tan(f)):h>1.25*Math.PI&&h<=1.75*Math.PI&&(m+=a/2,p+=s/2/Math.tan(f),v-=a/2,g-=s/2/Math.tan(f)),(d=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",u),d.setAttribute("gradientUnits","userSpaceOnUse"),d.setAttribute("x1",String(Math.round(p))),d.setAttribute("y1",String(Math.round(m))),d.setAttribute("x2",String(Math.round(g))),d.setAttribute("y2",String(Math.round(v)))}t.colorStops.forEach((function(e){var t=e.offset,n=e.color,r=document.createElementNS("http://www.w3.org/2000/svg","stop");r.setAttribute("offset",100*t+"%"),r.setAttribute("stop-color",n),d.appendChild(r)})),c.setAttribute("fill","url('#"+u+"')"),this._defs.appendChild(d)}else n&&c.setAttribute("fill",n);this._element.appendChild(c)},e}(),S="canvas";for(var E={},k=0;k<=40;k++)E[k]=k;const M={type:S,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:E[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{round:0,color:"#fff"}};var C=function(){return(C=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function x(e){var t=C({},e);if(!t.colorStops||!t.colorStops.length)throw"Field 'colorStops' is required in gradient";return t.rotation?t.rotation=Number(t.rotation):t.rotation=0,t.colorStops=t.colorStops.map((function(e){return C(C({},e),{offset:Number(e.offset)})})),t}function A(e){var t=C({},e);return t.width=Number(t.width),t.height=Number(t.height),t.margin=Number(t.margin),t.imageOptions=C(C({},t.imageOptions),{hideBackgroundDots:Boolean(t.imageOptions.hideBackgroundDots),imageSize:Number(t.imageOptions.imageSize),margin:Number(t.imageOptions.margin)}),t.margin>Math.min(t.width,t.height)&&(t.margin=Math.min(t.width,t.height)),t.dotsOptions=C({},t.dotsOptions),t.dotsOptions.gradient&&(t.dotsOptions.gradient=x(t.dotsOptions.gradient)),t.cornersSquareOptions&&(t.cornersSquareOptions=C({},t.cornersSquareOptions),t.cornersSquareOptions.gradient&&(t.cornersSquareOptions.gradient=x(t.cornersSquareOptions.gradient))),t.cornersDotOptions&&(t.cornersDotOptions=C({},t.cornersDotOptions),t.cornersDotOptions.gradient&&(t.cornersDotOptions.gradient=x(t.cornersDotOptions.gradient))),t.backgroundOptions&&(t.backgroundOptions=C({},t.backgroundOptions),t.backgroundOptions.gradient&&(t.backgroundOptions.gradient=x(t.backgroundOptions.gradient))),t}var T=n(192),R=n.n(T),P=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},L=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};const I=function(){function e(e){this._options=e?A(a(M,e)):M,this.update()}return e._clearContainer=function(e){e&&(e.innerHTML="")},e.prototype._setupSvg=function(){var e=this;if(this._qr){var t=new _(this._options);this._svg=t.getElement(),this._svgDrawingPromise=t.drawQR(this._qr).then((function(){var n;e._svg&&(null===(n=e._extension)||void 0===n||n.call(e,t.getElement(),e._options))}))}},e.prototype._setupCanvas=function(){var e,t=this;this._qr&&(this._canvas=document.createElement("canvas"),this._canvas.width=this._options.width,this._canvas.height=this._options.height,this._setupSvg(),this._canvasDrawingPromise=null===(e=this._svgDrawingPromise)||void 0===e?void 0:e.then((function(){if(t._svg){var e=t._svg,n=(new XMLSerializer).serializeToString(e),r="data:image/svg+xml;base64,"+btoa(n),i=new Image;return new Promise((function(e){i.onload=function(){var n,r;null===(r=null===(n=t._canvas)||void 0===n?void 0:n.getContext("2d"))||void 0===r||r.drawImage(i,0,0),e()},i.src=r}))}})))},e.prototype._getElement=function(e){return void 0===e&&(e="png"),P(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:if(!this._qr)throw"QR code is empty";return"svg"!==e.toLowerCase()?[3,2]:(this._svg&&this._svgDrawingPromise||this._setupSvg(),[4,this._svgDrawingPromise]);case 1:return t.sent(),[2,this._svg];case 2:return this._canvas&&this._canvasDrawingPromise||this._setupCanvas(),[4,this._canvasDrawingPromise];case 3:return t.sent(),[2,this._canvas]}}))}))},e.prototype.update=function(t){e._clearContainer(this._container),this._options=t?A(a(this._options,t)):this._options,this._options.data&&(this._qr=R()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(e){switch(!0){case/^[0-9]*$/.test(e):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(e):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===S?this._setupCanvas():this._setupSvg(),this.append(this._container))},e.prototype.append=function(e){if(e){if("function"!=typeof e.appendChild)throw"Container should be a single DOM node";this._options.type===S?this._canvas&&e.appendChild(this._canvas):this._svg&&e.appendChild(this._svg),this._container=e}},e.prototype.applyExtension=function(e){if(!e)throw"Extension function should be defined.";this._extension=e,this.update()},e.prototype.deleteExtension=function(){this._extension=void 0,this.update()},e.prototype.getRawData=function(e){return void 0===e&&(e="png"),P(this,void 0,void 0,(function(){var t,n,r;return L(this,(function(i){switch(i.label){case 0:if(!this._qr)throw"QR code is empty";return[4,this._getElement(e)];case 1:return(t=i.sent())?"svg"===e.toLowerCase()?(n=new XMLSerializer,r=n.serializeToString(t),[2,new Blob(['<?xml version="1.0" standalone="no"?>\r\n'+r],{type:"image/svg+xml"})]):[2,new Promise((function(n){return t.toBlob(n,"image/"+e,1)}))]:[2,null]}}))}))},e.prototype.download=function(e){return P(this,void 0,void 0,(function(){var t,n,r,i,o;return L(this,(function(a){switch(a.label){case 0:if(!this._qr)throw"QR code is empty";return t="png",n="qr","string"==typeof e?(t=e,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof e&&null!==e&&(e.name&&(n=e.name),e.extension&&(t=e.extension)),[4,this._getElement(t)];case 1:return(r=a.sent())?("svg"===t.toLowerCase()?(i=new XMLSerializer,o='<?xml version="1.0" standalone="no"?>\r\n'+(o=i.serializeToString(r)),s("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(o),n+".svg")):s(r.toDataURL("image/"+t),n+"."+t),[2]):[2]}}))}))},e}()}},t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n(676)})().default}(vR)),vR.exports}!function(e,t){!function(e,t,n){var r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA2CAYAAACbZ/oUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAb1SURBVHgB3Vrdcds4EN4FJVo/fnAqOKWCOBVEqcBKBbbeLvLNWFeBnQpiz+SUe4tTwckVWK4gTgVRB9ZD9BNaBG4XJGiIon4oUYrtb0YiCIIEFvuD3QUQLPxslI8cUG98wJvdVv8SnihUc29v5HknVKyAKz8Uz0dd8wxNYfhnoaKE+GG916WHHRDya/HTqAOPHJrI8WgflHOqlKqaekTsFP/pv43uTYG5K0B9CasvENSB4hkK0JVKXTg7qm3P1mPA8K9CVUmnpkAdEjF7XMdEEtE9Ktb0vStfmnEL86KDcGgal1r9Jkj5Vin4Gj6uCMSPyhM/hsfla54cnlH4TeC+h43S6eC49E1JcU01JyGxPVDqb+boL9etR+1/Yc2UNYdtcUbAetHS32GjcETzcmpxO/gIfZxmq70tkWci+96o5qBzaItsBMTvUnlHu637W1PFzOG2tlhrgm1xttkfvUgTIlGcYSgFCaD2eIWuf561yCeJ7DTwQktl4rssAQDE8Rcvznu9gMNmJgAui61BfVbng+NiExSewsyOA5XwSRVc8G591+nBqvDEoQRo4ry+eKKFrM+SsDuSih3P+6HHS6Je+jw8R1ucSWfflT8P2jAH3B4c50uiWG0VeFF082dIXJvXiqT3XLCOh2KN/felGonqfzxbxN2XsCT6jdIZvXMKW8YirsYRF2uRR+zyDenId0iBcmtwhlK+1APYGvCi4Lqv0xjJoK3qUrHHOizcVp+tGokF/gEpUfx3pKWCLPYH2CB4UlHIt2yYFolwHFoFASsk0tp663U4vNm/W3Ft3TC322m5aoNWl319VeqGr5pgsqpanN1fXhVWxAa43XMEvCu1Bu/ScjUG7XQIITv6GtT5mt3E6SqsiSy4zRaV/IHXO5/mrxhLQcArvoxyhQeRdiQFCRrqADIAc3tEYijJyEA6RK5hFg4M6y8qYJG+fRFKiTADDC1Z5S4jH5k72GUjQ8ZmKW6Ta8hcZecAMoIvnKr+NBFs6qLgQSnUSp337muQIdjYKKvDObjO2i3FyDkKaGNEBFM4qAfFCQDICCxS7LZCaDjmQqkmR0CQIcih0rQ45OaaugeCnYBg4kYVMsDPRn6fXNbrNC4o9X3GEzRs8tq5HrxGmXW3Qr+ea0VQEcGhFWPFrqzb4ahRPBGQ/waxkHIZ8ARR3H3t0YTBGvBAGyvjY0SICNahU/jQDpjTIAzMv5B1XtfwVMY0YeuIOAUMmgYV+hgP9RaMA0KEv4KU0Prqed9ILI8gI7CID47LH1dcObT+ksR07MrcZBt2QAR3xLNTX/RFkzjjAF3ODdDXABkzimlrP98XL1wcd2x9nAXW3zEoPRaxIyfao30TBsx3XM7B/eukj3O45fu47whxQP7p/kaInANOLTmUTR1ThsVx/U7SUjZ4T4kKysElhbwTHGY9HjSKXY4uxipXBbi/ZQPmk047JOaUgagpCXsCtahMztaWwBPM42AdJeMGg0ZJp5OlgKtSzu2w343EDB5fUsg7NWZKCFyGuatuWFWBpwQ2vCR5uhymdezHIt5eOPIyLFbgqRHLMMQSkPLo8cdTBDtyjcTb40IvSb+nCDYL9jPAHhvYeOU0h2fnnp8ceLmM100QrFO2vz39miXUFPMmPa0wfnxGmBLrCYKzEmfec9KBP/3SvKcdBcodI8h6VglBKUU11kcA28taA20acN1OupltnGVeXnYjLyW6JcvbijicSaaDkvojGE26mugvlcUM3MAHYsPRdRWsjYot1rmHb6v1CSZHn9y9JkU45O3ADQq/DWPeGlniVVo3ORgZjL2qkHBg3FjIAKFYd7isRTojcX60sPeH9dyvk4B/CmAbYrI4RtgyzVQ+RkhPHPE13FvKLlP5WEErQJAQ4D8J4gqeOUwyPthqYWv63EHZEb5EjgdlDthKbzVdsy3YVjpahykjcoWbjZR64S8JFdgglJSRyj4QjLKDIDZDMG2UFfP56qx9XvscxiaQo2ynKUc+0L1b2Jge0zrYnrepbZ3DyBzssiZutYQ7Dx3YACi/2V3cClMdqkmBjn0z4eWacxBZg1aB7qI2ZEM2kkuTZJvs+4m8NJ+DIF1Ks5+j96N4omjmDmeFcSjFSb9Rqs77EIZbI4nPSPJ0H4hv0mZkvB23Q2uQ3c8kFi5PSAs4bZ5zJFSgHUejm2EAwuc1M3ZTJ89R6ogq8P1rtCHwZl6sHD8rHQw/BnNUz6riA5ltH+RNmQzbohM1GZ7Q41M89UUHW/Q5LAFVBYLPp1TBYlY8oRDUJXxACadJi1dXkjnfXWLzKnkQtBm+4vqqjWfer69yBIKXOJPW4RNFU9+GDWIFbvMpng9ZHmyJY+P7YdqpUOIjrU1z3VbkM58rcjUN/geU/3c0eMPNdAAAAABJRU5ErkJggg==",i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var o={fontFamily:"Roboto, sans-serif"},a=function(e){var n=e.children,r=e.className;return t.createElement("div",{style:o,className:r},n)},s={flexContainer:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"row"},flexItem:{flex:1,justifyContent:"center",alignItems:"center"},flexItem11:{flex:11,justifyContent:"center",alignItems:"center"},flexItem1:{flex:1,justifyContent:"center",alignItems:"center"},tab:{padding:8,cursor:"pointer",backgroundColor:"#F2F4F6",fontSize:12,textAlign:"center",color:"#24292E"},tabcontainer:{padding:"4px",backgroundColor:"#F2F4F6",borderRadius:"8px",marginBottom:30,marginTop:30},tabactive:{backgroundColor:"white",WebkitTransition:"background-color 300ms linear",msTransition:"background-color 300ms linear",transition:"background-color 300ms linear",borderRadius:"8px"},item:{fontSize:"12px",marginBottom:16,borderRadius:"8px",padding:"10px",border:"2px #F2F4F6 solid",color:"#24292E"},extensionLabel:{fontsStyle:"normal",fontWeight:"bold",fontSize:14,textAlign:"center",color:"#24272A"},notice:{fontSize:12,marginLeft:10,marginRight:10,color:"grey"},button:{marginTop:"41.5px",marginBottom:"20px",width:"100%",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",padding:"12px 20px",background:"#037DD6",borderRadius:"32px",color:"white",border:"0",fontSize:"14px",cursor:"pointer"},backdrop:{visibility:"visible",position:"fixed",top:"0",left:"0",right:"0",bottom:"0",width:"100%",zIndex:99998,background:"rgba(0, 0, 0, 0.87)",opacity:.3},modal:{visibility:"visible",position:"fixed",left:"50%",transform:"translate(-50%, -50%)",zIndex:99999,background:"#fff",padding:"20px",borderRadius:"8px",top:"50%",maxWidth:"100%",width:460,minWidth:300,boxShadow:"rgba(0, 0, 0, 0.2) 0px 11px 15px -7px, rgba(0, 0, 0, 0.14) 0px 24px 38px 3px, rgba(0, 0, 0, 0.12) 0px 9px 46px 8px",WebkitFontSmoothing:"antialiased"},closeButton:{color:"#BBC0C5",cursor:"pointer"},closeButtonContainer:{},logoContainer:{marginHorizontal:24,marginTop:24,display:"flex",alignItems:"center",justifyContent:"center"},connectMobileText:{fontSize:14,color:"black",marginTop:28,marginBottom:28,lineHeight:2},blue:{color:"#037DD6",fontWeight:700},installExtensionText:{marginLeft:10},center:{display:"flex",alignItems:"center",justifyContent:"center"},right:{display:"flex",alignItems:"center",justifyContent:"right"}},u=function(e){var n=e.Icon,r=e.text;return t.createElement("div",{style:i(i({padding:6},s.flexContainer),{flexDirection:"row"})},t.createElement("div",{style:s.flexItem1},t.createElement(n,null)),t.createElement("div",{style:s.flexItem11},t.createElement("span",{style:{lineHeight:"2",color:"black"}},r)))},l=function(){return t.createElement("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("rect",{width:"16",height:"16",fill:"white"}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.40554 2.40554C2.94627 1.86482 3.82296 1.86482 4.36369 2.40554L8 6.04186L11.6363 2.40554C12.177 1.86482 13.0537 1.86482 13.5945 2.40554C14.1352 2.94627 14.1352 3.82296 13.5945 4.36369L9.95814 8L13.5945 11.6363C14.1352 12.177 14.1352 13.0537 13.5945 13.5945C13.0537 14.1352 12.177 14.1352 11.6363 13.5945L8 9.95814L4.36369 13.5945C3.82296 14.1352 2.94627 14.1352 2.40554 13.5945C1.86482 13.0537 1.86482 12.177 2.40554 11.6363L6.04186 8L2.40554 4.36369C1.86482 3.82296 1.86482 2.94627 2.40554 2.40554Z",fill:"#BBC0C5"}))},c=function(){return t.createElement("svg",{width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M14.44 0.0999756C12.63 0.0999756 11.01 0.979976 10 2.32998C8.99 0.979976 7.37 0.0999756 5.56 0.0999756C2.49 0.0999756 0 2.59998 0 5.68998C0 6.87998 0.19 7.97998 0.52 8.99998C2.1 14 6.97 16.99 9.38 17.81C9.72 17.93 10.28 17.93 10.62 17.81C13.03 16.99 17.9 14 19.48 8.99998C19.81 7.97998 20 6.87998 20 5.68998C20 2.59998 17.51 0.0999756 14.44 0.0999756Z",fill:"#037DD6"}))},d=function(){return t.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M16.4405 8.8999C20.0405 9.2099 21.5105 11.0599 21.5105 15.1099V15.2399C21.5105 19.7099 19.7205 21.4999 15.2505 21.4999H8.74047C4.27047 21.4999 2.48047 19.7099 2.48047 15.2399V15.1099C2.48047 11.0899 3.93047 9.2399 7.47047 8.9099",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M12 2V14.88",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M15.3504 12.6499L12.0004 15.9999L8.65039 12.6499",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},f=function(){return t.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M16.28 7.53V6.28C16.28 3.58 15.63 0 10 0C4.37 0 3.72 3.58 3.72 6.28V7.53C0.92 7.88 0 9.3 0 12.79V14.65C0 18.75 1.25 20 5.35 20H14.65C18.75 20 20 18.75 20 14.65V12.79C20 9.3 19.08 7.88 16.28 7.53ZM10 16.74C8.33 16.74 6.98 15.38 6.98 13.72C6.98 12.05 8.34 10.7 10 10.7C11.66 10.7 13.02 12.06 13.02 13.72C13.02 15.39 11.67 16.74 10 16.74ZM5.35 7.44C5.27 7.44 5.2 7.44 5.12 7.44V6.28C5.12 3.35 5.95 1.4 10 1.4C14.05 1.4 14.88 3.35 14.88 6.28V7.45C14.8 7.45 14.73 7.45 14.65 7.45H5.35V7.44Z",fill:"#037DD6"}))},h=function(){return t.createElement("svg",{width:"273",height:"51",viewBox:"0 0 273 51",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M240.882 25.9263C239.472 24.997 237.916 24.3361 236.443 23.5101C235.489 22.9731 234.473 22.4982 233.643 21.8167C232.233 20.6602 232.524 18.3885 233.996 17.3973C236.112 15.993 239.617 16.7777 239.99 19.6483C239.99 19.7102 240.052 19.7515 240.114 19.7515H243.308C243.391 19.7515 243.454 19.6896 243.433 19.607C243.267 17.6244 242.5 15.9723 241.089 14.9191C239.741 13.9072 238.206 13.3702 236.568 13.3702C228.127 13.3702 227.359 22.271 231.901 25.0796C232.42 25.41 236.879 27.6404 238.455 28.611C240.032 29.5816 240.529 31.3576 239.845 32.7619C239.223 34.0423 237.605 34.9303 235.987 34.8271C234.224 34.7238 232.855 33.7738 232.378 32.2869C232.295 32.0185 232.254 31.5022 232.254 31.275C232.254 31.2131 232.192 31.1511 232.129 31.1511H228.666C228.604 31.1511 228.541 31.2131 228.541 31.275C228.541 33.7738 229.164 35.1575 230.864 36.4172C232.461 37.615 234.203 38.1106 236.008 38.1106C240.737 38.1106 243.184 35.4466 243.682 32.6793C244.117 29.974 243.308 27.5371 240.882 25.9263Z",fill:"#24292E"}),t.createElement("path",{d:"M90.4943 13.8246H88.9595H87.2795C87.2173 13.8246 87.1758 13.8659 87.1551 13.9072L84.3137 23.2416C84.2722 23.3655 84.1063 23.3655 84.0648 23.2416L81.2234 13.9072C81.2026 13.8452 81.1612 13.8246 81.0989 13.8246H79.419H77.8842H75.8102C75.748 13.8246 75.6857 13.8865 75.6857 13.9485V37.7802C75.6857 37.8422 75.748 37.9041 75.8102 37.9041H79.2738C79.336 37.9041 79.3982 37.8422 79.3982 37.7802V19.6689C79.3982 19.5244 79.6056 19.5037 79.6471 19.6276L82.5093 29.024L82.7167 29.6849C82.7374 29.7468 82.7789 29.7675 82.8411 29.7675H85.4959C85.5581 29.7675 85.5996 29.7262 85.6203 29.6849L85.8277 29.024L88.6899 19.6276C88.7313 19.4831 88.9387 19.5244 88.9387 19.6689V37.7802C88.9387 37.8422 89.001 37.9041 89.0632 37.9041H92.5268C92.589 37.9041 92.6513 37.8422 92.6513 37.7802V13.9485C92.6513 13.8865 92.589 13.8246 92.5268 13.8246H90.4943Z",fill:"#24292E"}),t.createElement("path",{d:"M187.849 13.8246C187.787 13.8246 187.745 13.8659 187.725 13.9072L184.883 23.2416C184.842 23.3655 184.676 23.3655 184.634 23.2416L181.793 13.9072C181.772 13.8452 181.731 13.8246 181.668 13.8246H176.4C176.338 13.8246 176.276 13.8865 176.276 13.9485V37.7802C176.276 37.8422 176.338 37.9041 176.4 37.9041H179.864C179.926 37.9041 179.988 37.8422 179.988 37.7802V19.6689C179.988 19.5244 180.196 19.5037 180.237 19.6276L183.099 29.024L183.307 29.6849C183.328 29.7468 183.369 29.7675 183.431 29.7675H186.086C186.148 29.7675 186.19 29.7262 186.211 29.6849L186.418 29.024L189.28 19.6276C189.322 19.4831 189.529 19.5244 189.529 19.6689V37.7802C189.529 37.8422 189.591 37.9041 189.653 37.9041H193.117C193.179 37.9041 193.241 37.8422 193.241 37.7802V13.9485C193.241 13.8865 193.179 13.8246 193.117 13.8246H187.849Z",fill:"#24292E"}),t.createElement("path",{d:"M143.174 13.8246H136.724H133.261H126.81C126.748 13.8246 126.686 13.8865 126.686 13.9485V16.9223C126.686 16.9843 126.748 17.0462 126.81 17.0462H133.136V37.7802C133.136 37.8422 133.198 37.9041 133.261 37.9041H136.724C136.786 37.9041 136.849 37.8422 136.849 37.7802V17.0462H143.174C143.237 17.0462 143.299 16.9843 143.299 16.9223V13.9485C143.299 13.8865 143.257 13.8246 143.174 13.8246Z",fill:"#24292E"}),t.createElement("path",{d:"M163.604 37.9041H166.756C166.839 37.9041 166.901 37.8215 166.881 37.7389L160.368 13.8245C160.347 13.7626 160.306 13.7419 160.244 13.7419H159.041H156.925H155.722C155.66 13.7419 155.619 13.7832 155.598 13.8245L149.085 37.7389C149.065 37.8215 149.127 37.9041 149.21 37.9041H152.362C152.425 37.9041 152.466 37.8628 152.487 37.8215L154.374 30.862C154.395 30.8 154.436 30.7794 154.499 30.7794H161.467C161.53 30.7794 161.571 30.8207 161.592 30.862L163.479 37.8215C163.5 37.8628 163.562 37.9041 163.604 37.9041ZM155.328 27.3719L157.859 18.0581C157.9 17.9342 158.066 17.9342 158.107 18.0581L160.638 27.3719C160.659 27.4545 160.596 27.5371 160.513 27.5371H155.453C155.37 27.5371 155.308 27.4545 155.328 27.3719Z",fill:"#24292E"}),t.createElement("path",{d:"M217.362 37.9041H220.515C220.598 37.9041 220.66 37.8215 220.639 37.7389L214.127 13.8245C214.106 13.7626 214.065 13.7419 214.002 13.7419H212.8H210.684H209.481C209.419 13.7419 209.377 13.7832 209.357 13.8245L202.844 37.7389C202.823 37.8215 202.886 37.9041 202.969 37.9041H206.121C206.183 37.9041 206.225 37.8628 206.246 37.8215L208.133 30.862C208.154 30.8 208.195 30.7794 208.257 30.7794H215.226C215.288 30.7794 215.33 30.8207 215.351 30.862L217.238 37.8215C217.259 37.8628 217.3 37.9041 217.362 37.9041ZM209.087 27.3719L211.617 18.0581C211.659 17.9342 211.825 17.9342 211.866 18.0581L214.397 27.3719C214.417 27.4545 214.355 27.5371 214.272 27.5371H209.211C209.129 27.5371 209.066 27.4545 209.087 27.3719Z",fill:"#24292E"}),t.createElement("path",{d:"M106.713 34.3727V26.9795C106.713 26.9176 106.775 26.8556 106.837 26.8556H116.067C116.129 26.8556 116.191 26.7936 116.191 26.7317V23.7579C116.191 23.6959 116.129 23.634 116.067 23.634H106.837C106.775 23.634 106.713 23.572 106.713 23.5101V17.1907C106.713 17.1288 106.775 17.0668 106.837 17.0668H117.332C117.394 17.0668 117.457 17.0049 117.457 16.9429V13.9691C117.457 13.9072 117.394 13.8452 117.332 13.8452H106.713H103.125C103.063 13.8452 103.001 13.9072 103.001 13.9691V17.0668V23.6546V26.8763V34.5173V37.7802C103.001 37.8422 103.063 37.9041 103.125 37.9041H106.713H117.768C117.83 37.9041 117.892 37.8422 117.892 37.7802V34.6412C117.892 34.5792 117.83 34.5173 117.768 34.5173H106.817C106.755 34.4966 106.713 34.4553 106.713 34.3727Z",fill:"#24292E"}),t.createElement("path",{d:"M272.532 37.6976L260.544 25.3687C260.502 25.3274 260.502 25.2448 260.544 25.2035L271.329 14.0517C271.412 13.9691 271.349 13.8452 271.246 13.8452H266.828C266.787 13.8452 266.766 13.8659 266.745 13.8865L257.599 23.3449C257.516 23.4275 257.391 23.3655 257.391 23.2623V13.9691C257.391 13.9072 257.329 13.8452 257.267 13.8452H253.803C253.741 13.8452 253.679 13.9072 253.679 13.9691V37.8009C253.679 37.8628 253.741 37.9248 253.803 37.9248H257.267C257.329 37.9248 257.391 37.8628 257.391 37.8009V27.3099C257.391 27.2067 257.536 27.1447 257.599 27.2273L267.969 37.8835C267.989 37.9041 268.031 37.9248 268.052 37.9248H272.469C272.552 37.9041 272.615 37.7596 272.532 37.6976Z",fill:"#24292E"}),t.createElement("path",{d:"M52.021 1L31.0526 16.4886L34.9517 7.36063L52.021 1Z",fill:"#E17726",stroke:"#E17726",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M3.65491 1L24.4366 16.6331L20.7241 7.36063L3.65491 1Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M44.4716 36.9127L38.8925 45.4211L50.8389 48.7047L54.261 37.0986L44.4716 36.9127Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M1.43555 37.0986L4.83695 48.7047L16.7626 45.4211L11.2042 36.9127L1.43555 37.0986Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M16.1197 22.5395L12.8013 27.5371L24.6232 28.074L24.2292 15.3734L16.1197 22.5395Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M39.5561 22.5394L31.3222 15.2288L31.0526 28.0739L42.8746 27.537L39.5561 22.5394Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M16.7626 45.4212L23.918 41.9724L17.7582 37.1813L16.7626 45.4212Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M31.7578 41.9724L38.8925 45.4212L37.9177 37.1813L31.7578 41.9724Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M38.8923 45.4212L31.7577 41.9724L32.3384 46.5983L32.2762 48.5602L38.8923 45.4212Z",fill:"#D5BFB2",stroke:"#D5BFB2",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M16.7625 45.4212L23.3994 48.5602L23.3579 46.5983L23.9179 41.9724L16.7625 45.4212Z",fill:"#D5BFB2",stroke:"#D5BFB2",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M23.5239 34.1249L17.5922 32.3902L21.7818 30.4696L23.5239 34.1249Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M32.1517 34.1249L33.8939 30.4696L38.1042 32.3902L32.1517 34.1249Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M16.7626 45.4212L17.7996 36.9128L11.2042 37.0987L16.7626 45.4212Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M37.8761 36.9128L38.8924 45.4212L44.4715 37.0987L37.8761 36.9128Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M42.8745 27.5371L31.0526 28.074L32.1518 34.1249L33.894 30.4696L38.1042 32.3902L42.8745 27.5371Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M17.5922 32.3902L21.7817 30.4696L23.5239 34.1249L24.6232 28.074L12.8012 27.5371L17.5922 32.3902Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M12.8013 27.5371L17.7582 37.1813L17.5923 32.3902L12.8013 27.5371Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M38.1044 32.3902L37.9177 37.1813L42.8746 27.5371L38.1044 32.3902Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M24.6232 28.0741L23.524 34.125L24.9136 41.2703L25.2247 31.8533L24.6232 28.0741Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M31.0526 28.0741L30.4719 31.8327L30.7623 41.2703L32.1519 34.125L31.0526 28.0741Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M32.1519 34.1249L30.7623 41.2702L31.7578 41.9724L37.9177 37.1813L38.1043 32.3901L32.1519 34.1249Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M17.5922 32.3901L17.7581 37.1813L23.918 41.9724L24.9135 41.2702L23.5239 34.1249L17.5922 32.3901Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M32.2763 48.5602L32.3385 46.5983L31.7993 46.1439H23.8765L23.358 46.5983L23.3995 48.5602L16.7626 45.4211L19.0855 47.3211L23.7935 50.5633H31.8615L36.5903 47.3211L38.8924 45.4211L32.2763 48.5602Z",fill:"#C0AC9D",stroke:"#C0AC9D",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M31.7578 41.9724L30.7622 41.2703H24.9135L23.918 41.9724L23.358 46.5983L23.8765 46.144H31.7993L32.3385 46.5983L31.7578 41.9724Z",fill:"#24292E",stroke:"#24292E",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M52.9128 17.5005L54.6757 8.95079L52.021 1L31.7578 15.9723L39.5561 22.5394L50.5692 25.7404L52.9958 22.9111L51.938 22.147L53.618 20.6188L52.3321 19.6276L54.0121 18.3472L52.9128 17.5005Z",fill:"#763E1A",stroke:"#763E1A",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M1 8.95079L2.78366 17.5005L1.64295 18.3472L3.34365 19.6276L2.05775 20.6188L3.73771 22.147L2.67996 22.9111L5.10657 25.7404L16.1196 22.5394L23.918 15.9723L3.65475 1L1 8.95079Z",fill:"#763E1A",stroke:"#763E1A",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M50.5692 25.7404L39.5561 22.5394L42.8746 27.5371L37.9177 37.1813L44.4716 37.0987H54.261L50.5692 25.7404Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M16.1196 22.5394L5.10651 25.7404L1.43549 37.0987H11.2041L17.7581 37.1813L12.8011 27.5371L16.1196 22.5394Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M31.0526 28.0741L31.7578 15.9724L34.9518 7.36072H20.7239L23.9179 15.9724L24.6231 28.0741L24.8927 31.8739L24.9135 41.2703H30.7622L30.783 31.8739L31.0526 28.0741Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}))},p=function(){return t.createElement("svg",{width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M20.0002 7.9702V10.0302C20.0002 10.5802 19.5602 11.0302 19.0002 11.0502H17.0402C15.9602 11.0502 14.9702 10.2602 14.8802 9.1802C14.8202 8.5502 15.0602 7.9602 15.4802 7.5502C15.8502 7.1702 16.3602 6.9502 16.9202 6.9502H19.0002C19.5602 6.9702 20.0002 7.4202 20.0002 7.9702Z",fill:"#037DD6"}),t.createElement("path",{d:"M18.47 12.55H17.04C15.14 12.55 13.54 11.12 13.38 9.3C13.29 8.26 13.67 7.22 14.43 6.48C15.07 5.82 15.96 5.45 16.92 5.45H18.47C18.76 5.45 19 5.21 18.97 4.92C18.75 2.49 17.14 0.83 14.75 0.55C14.51 0.51 14.26 0.5 14 0.5H5C4.72 0.5 4.45 0.52 4.19 0.56C1.64 0.88 0 2.78 0 5.5V12.5C0 15.26 2.24 17.5 5 17.5H14C16.8 17.5 18.73 15.75 18.97 13.08C19 12.79 18.76 12.55 18.47 12.55ZM11 6.75H5C4.59 6.75 4.25 6.41 4.25 6C4.25 5.59 4.59 5.25 5 5.25H11C11.41 5.25 11.75 5.59 11.75 6C11.75 6.41 11.41 6.75 11 6.75Z",fill:"#037DD6"}))};function m(e){var n=e.version;return t.createElement("div",{style:{textAlign:"center",color:"#BBC0C5",fontSize:12}},"SDK Version ",n?"v".concat(n):"unknown")}var g=function(e){var n=t.useState(e.preferDesktop?1:2),o=n[0],g=n[1],v=t.useRef(null),b=e.sdkVersion,y=e.i18nInstance.t;return t.useEffect((function(){v.current&&new(bR())({width:270,height:270,type:"svg",data:e.link,image:r,dotsOptions:{color:"black",type:"rounded"},imageOptions:{margin:5},cornersDotOptions:{color:"#f66a07"},qrOptions:{errorCorrectionLevel:"M"}}).append(v.current)}),[v]),t.createElement(a,{className:"install-model"},t.createElement("div",{style:s.backdrop,onClick:e.onClose}),t.createElement("div",{style:s.modal},t.createElement("div",{style:s.closeButtonContainer},t.createElement("div",{style:s.right},t.createElement("span",{style:s.closeButton,onClick:e.onClose},t.createElement(l,null)))),t.createElement("div",{style:s.logoContainer},t.createElement(h,null)),t.createElement("div",null,t.createElement("div",{style:s.tabcontainer},t.createElement("div",{style:s.flexContainer},t.createElement("div",{onClick:function(){return g(1)},style:i(i(i({},s.tab),1===o?s.tabactive:{}),s.flexItem)},y("DESKTOP")),t.createElement("div",{onClick:function(){return g(2)},style:i(i(i({},s.tab),2===o?s.tabactive:{}),s.flexItem)},y("MOBILE")))),t.createElement("div",{style:{display:1===o?"none":"block"}},t.createElement("div",{style:s.flexContainer},t.createElement("div",{style:i({textAlign:"center",marginTop:4},s.flexItem)},t.createElement("div",{ref:v,style:s.center}),t.createElement("div",{style:s.connectMobileText},y("SCAN_TO_CONNECT")," ",t.createElement("br",null),t.createElement("span",{style:s.blue},t.createElement("b",null,y("META_MASK_MOBILE_APP"))))))),t.createElement("div",{style:{display:2===o?"none":"block"}},t.createElement("div",{style:s.item},t.createElement(u,{Icon:c,text:y("INSTALL_MODAL.TRUSTED_BY_USERS")})),t.createElement("div",{style:s.item},t.createElement(u,{Icon:f,text:y("INSTALL_MODAL.LEADING_CRYPTO_WALLET")})),t.createElement("div",{style:s.item},t.createElement(u,{Icon:p,text:y("INSTALL_MODAL.CONTROL_DIGITAL_INTERACTIONS")})),t.createElement("button",{style:s.button,onClick:e.metaMaskInstaller.startDesktopOnboarding},t.createElement(d,null),t.createElement("span",{style:s.installExtensionText},y("INSTALL_MODAL.INSTALL_META_MASK_EXTENSION"))))),t.createElement(m,{version:b})))},v=function(e){var n,r=null===(n=e.displayOTP)||void 0===n||n,o=e.sdkVersion,u=e.i18nInstance.t;return t.createElement(a,{className:"pending-modal"},t.createElement("div",{style:s.backdrop,onClick:e.onClose}),t.createElement("div",{style:s.modal},t.createElement("div",{style:s.closeButtonContainer},t.createElement("div",{style:s.right},t.createElement("span",{style:s.closeButton,onClick:e.onClose},t.createElement(l,null)))),t.createElement("div",{style:s.logoContainer},t.createElement(h,null)),t.createElement("div",null,t.createElement("div",{style:i(i({},s.flexContainer),{flexDirection:"column",color:"black"})},t.createElement("div",{style:i(i({textAlign:"center",marginTop:"30px",marginBottom:"30px"},s.flexItem),{fontSize:16})},u(r?"PENDING_MODAL.OPEN_META_MASK_SELECT_CODE":"PENDING_MODAL.OPEN_META_MASK_CONTINUE")),t.createElement("div",{id:"sdk-mm-otp-value",style:{padding:10,fontSize:32,display:"none"}}),r&&t.createElement("div",{style:i({},s.notice)},"* ",u("PENDING_MODAL.NUMBER_AFTER_OPEN_NOTICE"))),t.createElement("div",{style:{marginTop:"20px"}},t.createElement("button",{style:i(i(i({},s.button),s.blue),{marginTop:"5px",color:"#0376C9",borderColor:"#0376C9",borderWidth:"1px",borderStyle:"solid",backgroundColor:"white"}),onClick:e.onDisconnect},u("PENDING_MODAL.DISCONNECT")))),t.createElement(m,{version:o})))},b=function(){return t.createElement("svg",{width:"21",height:"15",viewBox:"0 0 21 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M14.1364 14.9851C13.5909 14.9851 13.2273 14.5851 13.2273 13.9851C13.2273 13.3851 13.5909 12.9851 14.1364 12.9851C16.6818 12.9851 18.6818 10.7851 18.6818 7.98508C18.6818 5.18508 16.6818 2.98508 14.1364 2.98508C11.5909 2.98508 9.59091 5.18508 9.59091 7.98508C9.59091 8.58508 9.22727 8.98508 8.68182 8.98508C8.13636 8.98508 7.77273 8.58508 7.77273 7.98508C7.77273 4.08508 10.5909 0.985077 14.1364 0.985077C17.6818 0.985077 20.5 4.08508 20.5 7.98508C20.5 11.8851 17.6818 14.9851 14.1364 14.9851ZM6.68182 14.7851C3.22727 14.7851 0.5 11.6851 0.5 7.98508C0.5 4.28508 3.22727 1.18508 6.68182 1.18508C7.22727 1.18508 7.59091 1.58508 7.59091 2.18508C7.59091 2.78508 7.22727 3.18508 6.68182 3.18508C4.22727 3.18508 2.31818 5.38508 2.31818 7.98508C2.31818 10.5851 4.22727 12.7851 6.68182 12.7851C9.13636 12.7851 11.0455 10.6851 11.0455 7.98508C11.0455 7.38508 11.4091 6.98508 11.9545 6.98508C12.5 6.98508 12.8636 7.38508 12.8636 7.98508C12.7727 11.6851 10.0455 14.7851 6.68182 14.7851Z",fill:"white"}))},y=function(){return t.createElement("svg",{width:"400",height:"300",viewBox:"0 0 467 300",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M312.387 280.629C312.549 280.583 312.247 280.735 312.387 280.629L339.678 260.425C340.088 260.118 340.132 259.156 340.07 258.647C340.008 258.138 339.573 258.257 339.106 258.084L311.712 247.455C311.292 247.301 311.308 247.402 310.939 247.673C310.569 247.944 310.356 248.21 310.356 248.672L310.459 279.504C310.461 280.025 311.163 280.619 311.614 280.847C311.913 280.996 312.072 280.718 312.387 280.629ZM336.204 259.736L312.979 276.292L313.439 251.139L336.204 259.736Z",fill:"url(#paint0_linear_1356_14057)"}),t.createElement("path",{d:"M324.639 260.342C324.358 259.547 323.485 258.91 322.707 259.215C319.6 260.432 318.17 262.313 317.287 264.066C316.482 265.665 316.197 267.482 314.188 268.269C312.178 269.055 310.763 268.663 309.162 268.007C307.406 267.287 305.504 266.182 302.397 267.399C299.289 268.616 297.859 270.497 296.976 272.25C296.171 273.849 295.697 274.886 293.685 275.673C291.675 276.459 290.261 276.067 288.659 275.411C286.903 274.691 284.999 273.587 281.894 274.803C278.789 276.019 277.549 278.681 276.666 280.434C275.861 282.034 275.386 283.07 273.374 283.857C272.596 284.161 271.931 285.055 272.211 285.849C272.492 286.644 273.365 287.281 274.143 286.977C277.25 285.76 278.68 283.879 279.563 282.125C280.368 280.526 280.65 278.71 282.662 277.923C284.672 277.136 286.087 277.528 287.688 278.184C289.444 278.904 291.348 280.009 294.453 278.793C297.561 277.576 298.991 275.695 299.874 273.941C300.679 272.342 301.153 271.306 303.165 270.519C305.175 269.732 306.589 270.124 308.191 270.78C309.947 271.5 311.849 272.605 314.956 271.388C318.063 270.172 319.301 267.511 320.184 265.757C320.989 264.158 321.466 263.121 323.476 262.335C324.254 262.032 324.919 261.137 324.639 260.342Z",fill:"url(#paint1_linear_1356_14057)"}),t.createElement("path",{d:"M389.034 111.124C388.968 112.406 387.342 113.113 386.324 113.549C384.297 114.419 382.089 114.493 379.942 114.5C376.607 114.509 373.215 114.163 369.89 113.976C366.712 113.798 363.156 113.311 360.03 114.232C357.705 114.919 355.667 116.762 353.452 117.739C351.129 118.765 348.957 119.198 346.489 119.687C335.569 121.85 323.587 120.825 312.656 119.977C311.92 119.92 312.539 118.997 313.237 118.981C313.207 118.815 313.001 118.394 313.045 118.201C313.086 118.029 312.781 117.586 312.853 117.421C312.67 117.198 313.316 117.427 313.626 117.204C315.912 115.557 318.721 114.79 321.363 115.041C324.677 115.355 327.293 116.04 330.641 115.781C334.392 115.491 338.125 114.787 341.857 114.312C345.142 113.892 349.09 113.941 352.106 112.28C352.916 111.834 353.137 111.262 353.269 110.287C353.331 109.828 353.672 108.969 353.658 108.511C353.629 107.529 354.191 107.886 355.013 107.298C356.857 105.981 358.274 105.516 360.428 105.784C362.841 106.083 365.264 107.273 367.578 107.953C370.761 108.888 374.328 108.646 377.631 108.477C380.517 108.329 383.141 107.901 385.944 108.653C387.013 108.941 389.104 109.745 389.034 111.124Z",fill:"url(#paint2_linear_1356_14057)"}),t.createElement("path",{d:"M278.118 85.4414C280.313 83.8186 283.302 83.9 285.853 83.2728C290.501 82.127 295.644 78.4476 300.549 79.1524C301.299 79.2595 300.904 81.0355 300.159 80.9295C300.131 80.9256 300.187 80.9333 300.159 80.9295C300.089 81.0185 299.516 81.1051 299.385 81.1463C294.999 82.515 292.895 87.5083 289.126 89.8598C287.799 90.688 286.771 90.8351 285.258 90.9441C283.515 91.0691 280.964 90.5775 279.269 90.1219C277.15 89.5532 275.965 87.034 278.118 85.4414Z",fill:"url(#paint3_linear_1356_14057)"}),t.createElement("path",{d:"M122.567 166.093C113.597 172.832 104.535 179.836 99.517 190.092C98.5342 192.099 97.519 195.019 97.9533 197.204C98.9699 202.316 105.76 203.049 110.691 201.96C113.468 201.347 116.325 199.231 115.921 196.319C115.576 193.81 113.158 192.986 112.072 190.73C110.779 188.04 112.35 184.97 114.218 182.62C128.134 165.099 150.074 157.394 171.093 151.607C175.385 150.425 180.897 147.69 180.581 143.099C180.372 140.072 177.118 137.683 174.221 137.383C171.324 137.082 168.481 138.773 165.715 139.776C158.416 142.419 151.17 143.799 143.489 143.526C136.865 143.29 130.976 143.316 129.562 150.781C128.138 158.276 129.53 160.863 122.567 166.093Z",fill:"url(#paint4_linear_1356_14057)"}),t.createElement("path",{d:"M79.1056 153.531C60.3932 164.378 43.7478 178.354 32.8214 197.415C30.3313 201.76 27.9216 206.554 27.1821 211.512C26.4448 216.47 27.7591 222.525 30.8133 226.337C34.908 231.446 41.6938 232.915 48.1811 233.125C50.7248 233.208 53.0035 233.066 55.3316 231.947C57.6602 230.83 59.7548 228.359 59.5978 225.742C59.3303 221.315 54.5491 219.665 50.9271 217.34C42.6566 212.037 40.4958 199.493 44.2381 190.032C47.9803 180.57 55.8228 173.173 63.2316 166.338C67.229 162.651 71.5194 158.372 76.777 157.522C79.9167 157.015 83.4706 157.589 86.6295 157.252C93.9004 156.479 99.64 151.404 105.588 146.912C115.048 139.765 126.045 134.283 137.501 132.093C141.913 131.248 146.293 130.493 149.682 127.831C151.37 126.507 150.803 123.567 148.726 123.93C138.542 125.713 128.652 131.135 119.142 134.758C105.627 139.914 91.7133 146.223 79.1056 153.531Z",fill:"url(#paint5_linear_1356_14057)"}),t.createElement("path",{d:"M96.3677 117.321C96.0315 116.64 95.2914 116.612 94.6293 116.975C91.9858 118.417 91.5452 120.509 90.9466 122.178C90.4004 123.702 89.3647 124.67 87.6542 125.604C85.9437 126.538 85.0983 126.316 83.5956 125.91C81.9481 125.465 79.8603 125.424 77.2168 126.866C74.5734 128.309 74.1348 130.401 73.5341 132.07C72.9879 133.593 71.9522 134.562 70.2417 135.496C68.5313 136.43 67.6859 136.208 66.1832 135.801C64.5357 135.357 62.2569 134.538 59.6128 135.978C56.9694 137.42 56.5308 139.512 55.9301 141.181C55.3839 142.705 54.5398 144.454 52.8293 145.388C52.1667 145.748 52.1006 146.485 52.439 147.165C52.7752 147.845 53.5153 147.874 54.1773 147.511C56.8208 146.069 57.2594 143.977 57.86 142.307C58.4062 140.784 59.4419 139.815 61.1524 138.881C62.8629 137.948 63.7083 138.17 65.211 138.576C66.8585 139.021 68.9458 139.059 71.5898 137.619C74.2333 136.177 74.6718 134.085 75.2725 132.416C75.8187 130.892 76.8544 129.924 78.5649 128.99C80.2754 128.056 81.1207 128.278 82.6235 128.684C84.2709 129.129 86.5503 129.95 89.1938 128.507C91.8373 127.065 92.2779 124.973 92.8765 123.304C93.4227 121.78 94.2663 120.03 95.9773 119.098C96.6378 118.738 96.7039 118.001 96.3677 117.321Z",fill:"#FBC49D"}),t.createElement("path",{d:"M391.827 164.699C392.04 164.639 392.39 164.573 392.6 164.481C393.87 163.921 395.363 162.429 395.893 161.051C396.421 159.673 396.237 158.321 395.712 156.931C394.629 154.061 391.777 152.62 389.155 153.775C386.531 154.931 384.962 158.455 386.042 161.325C387.038 163.963 389.369 165.392 391.827 164.699ZM394.166 157.367C394.529 158.332 394.52 159.751 394.156 160.706C393.792 161.662 393.1 162.534 392.218 162.921C390.398 163.723 388.338 162.878 387.589 160.889C387.226 159.925 387.234 158.506 387.599 157.55C387.963 156.594 388.654 155.723 389.536 155.336C391.356 154.534 393.416 155.376 394.166 157.367Z",fill:"#86E29B"}),t.createElement("path",{d:"M62.7198 108.691C64.4912 108.191 66.6152 106.609 67.5596 104.824C68.4273 103.187 68.465 101.455 67.9609 99.7066C67.4547 97.9586 66.0792 96.5141 64.4963 95.6786C62.9135 94.843 61.2077 94.8578 59.4756 95.4255C57.7435 95.9933 56.2768 97.4364 55.409 99.074C53.6185 102.456 55.2032 106.494 58.4723 108.22C60.0142 109.035 61.1315 109.138 62.7198 108.691ZM60.6304 96.7682C61.819 96.4332 63.0232 96.8871 64.1048 97.4571C65.2463 98.0603 66.0495 98.8796 66.4145 100.142C66.7791 101.403 66.4488 103.299 65.8224 104.48C64.5299 106.919 61.2212 107.686 58.8638 106.441C56.5063 105.197 55.8538 101.858 57.1462 99.4185C57.7726 98.2375 58.6059 97.3957 59.8573 96.9862C59.9214 96.9635 60.5631 96.7872 60.6304 96.7682Z",fill:"#FFB0EB"}),t.createElement("path",{d:"M77.0217 242.979C75.9542 243.28 75.1664 242.151 74.9029 241.074C74.6394 239.996 75 239.378 76.0676 239.077C77.1351 238.776 78.5053 238.907 78.7688 239.984C79.0323 241.061 78.0893 242.678 77.0217 242.979Z",fill:"url(#paint6_linear_1356_14057)"}),t.createElement("path",{d:"M380.506 184.577C379.439 184.878 378.651 183.749 378.387 182.672C378.124 181.594 378.484 180.976 379.552 180.675C380.619 180.374 381.99 180.505 382.253 181.582C382.517 182.659 381.574 184.276 380.506 184.577Z",fill:"url(#paint7_linear_1356_14057)"}),t.createElement("path",{d:"M348.82 246.969C347.752 247.27 346.382 247.14 346.119 246.063C345.855 244.985 346.798 243.369 347.866 243.068C348.933 242.767 349.721 243.896 349.985 244.973C350.248 246.05 349.888 246.669 348.82 246.969Z",fill:"url(#paint8_linear_1356_14057)"}),t.createElement("path",{d:"M140.419 282.412C139.351 282.713 138.754 282.365 138.491 281.288C138.227 280.21 138.397 278.812 139.464 278.511C140.532 278.21 142.093 279.121 142.357 280.198C142.62 281.275 141.486 282.111 140.419 282.412Z",fill:"url(#paint9_linear_1356_14057)"}),t.createElement("path",{d:"M121.462 101.679C120.395 101.979 119.798 101.631 119.534 100.554C119.271 99.4764 119.44 98.0779 120.508 97.777C121.575 97.4761 123.136 98.3868 123.4 99.4642C123.663 100.542 122.53 101.378 121.462 101.679Z",fill:"url(#paint10_linear_1356_14057)"}),t.createElement("path",{d:"M370.749 159.005C369.682 159.306 368.311 159.175 368.048 158.098C367.784 157.021 368.727 155.404 369.795 155.103C370.863 154.802 371.65 155.931 371.914 157.008C372.177 158.086 371.817 158.704 370.749 159.005Z",fill:"url(#paint11_linear_1356_14057)"}),t.createElement("path",{d:"M384.211 245.345C383.143 245.646 381.773 245.515 381.51 244.438C381.246 243.361 382.189 241.744 383.257 241.443C384.324 241.142 385.112 242.271 385.376 243.348C385.639 244.426 385.278 245.044 384.211 245.345Z",fill:"url(#paint12_linear_1356_14057)"}),t.createElement("path",{d:"M364.771 41.3873C363.063 41.8687 361.337 40.8616 360.915 39.1378C360.493 37.414 361.536 35.6263 363.244 35.1449C364.953 34.6634 366.679 35.6706 367.101 37.3944C367.522 39.1182 366.479 40.9059 364.771 41.3873Z",fill:"url(#paint13_linear_1356_14057)"}),t.createElement("path",{d:"M404.311 77.905C404.602 77.8231 404.875 77.9236 405.084 77.6871C405.437 77.2908 404.814 76.6385 404.703 76.1265L401.277 58.7418C401.149 58.163 400.687 57.5371 400.123 57.3991C399.558 57.2611 398.969 57.3812 398.576 57.835L385.784 73.1179C385.395 73.564 385.199 74.3453 385.393 74.8964C385.585 75.4481 385.978 76.1646 386.548 76.2391L403.538 78.123C403.744 78.1479 404.114 77.9607 404.311 77.905ZM398.948 62.7348L401.811 74.4394L389.841 72.8085L398.948 62.7348Z",fill:"#FFB0EB"}),t.createElement("path",{d:"M97.5393 295.311C97.7108 295.263 97.4284 295.461 97.5393 295.311L108.785 280.464C108.975 280.211 108.718 279.972 108.594 279.684C108.47 279.396 108.124 279.917 107.821 279.902L88.5106 278.672C88.2101 278.659 87.895 278.62 87.7374 278.89C87.5798 279.159 87.7755 279.402 87.9283 279.67L96.5753 294.749C96.7102 294.99 97.2696 295.297 97.5393 295.311C97.6283 295.319 97.4556 295.335 97.5393 295.311ZM106.465 281.118L96.9667 292.97L90.6295 280.577L106.465 281.118Z",fill:"#86E29B"}),t.createElement("path",{d:"M393.699 108.848C389.518 104.446 414.629 114.366 413.945 120.659C413.259 126.952 401.355 129.102 403.894 123.491C406.042 118.747 400.376 115.876 393.699 108.848Z",fill:"#FBC49D"}),t.createElement("path",{d:"M139.414 115.959C139.434 115.953 139.392 115.965 139.414 115.959C141.963 115.2 143.436 111.976 142.717 109.189C142.37 107.839 141.526 107.199 140.408 106.504C139.289 105.808 138.171 105.449 136.933 105.815C135.698 106.182 134.85 107.033 134.222 108.247C133.595 109.461 133.282 111.234 133.63 112.585C133.978 113.935 134.821 114.574 135.94 115.27C137.04 115.952 138.199 116.301 139.414 115.959ZM137.315 107.375C138.222 107.12 139.005 106.994 139.825 107.502C140.661 108.02 140.912 108.618 141.171 109.625C141.708 111.704 140.935 113.834 139.032 114.398C138.11 114.675 137.356 114.791 136.522 114.272C135.686 113.753 135.436 113.155 135.176 112.149C134.917 111.142 134.718 109.714 135.186 108.81C135.654 107.905 136.394 107.649 137.315 107.375C137.329 107.371 137.299 107.38 137.315 107.375Z",fill:"#75C4FD"}),t.createElement("path",{d:"M308.981 78.7519C310.052 78.4043 311.158 78.7096 312.265 78.6613C313.655 78.6006 314.936 78.517 316.323 78.3531C319.497 77.9795 322.798 77.4906 325.984 77.3012C329.309 77.1025 332.514 76.8551 335.836 77.0295C338.809 77.1842 342.163 77.3405 345.105 77.7558C352.129 78.7468 359.331 79.0578 366.347 80.1158C372.252 81.008 377.93 82.1319 383.722 83.5644C385.925 84.0054 388.267 85.0754 389.126 85.3792C389.421 85.4833 389.37 85.8347 389.317 86.1595C389.306 86.2271 389.353 86.1146 389.317 86.1595C388.269 87.414 386.564 86.8124 385.259 86.4677C384.406 86.241 381.488 85.9494 381.011 85.9957C380.14 86.0815 379.277 86.014 379.656 87.2114C380.122 88.6824 382.391 89.7375 383.704 90.2419C385.883 91.0803 388.771 91.2561 390.845 92.4015C392.968 92.821 395.425 93.5002 397.022 93.9986C402.83 95.8103 407.806 98.8678 413.033 102.002C415.503 103.482 417.829 104.764 419.973 106.72C421.647 108.248 423.771 109.882 424.595 112.091C425.113 113.482 424.451 115.471 422.848 115.085C420.353 114.488 419.638 111.665 418.227 109.714C415.003 105.251 410.067 102.067 405.118 100.06C402.64 99.0556 399.803 98.729 397.204 98.1176C394.411 97.4613 391.597 97.0442 388.707 97.1736C385.646 97.3097 382.846 97.5534 379.819 98.0078C377.027 98.4264 374.252 98.4441 371.514 97.8441C368.766 97.2421 366.276 96.7553 363.6 95.9021C361.662 95.2848 359.013 94.5583 357.232 93.5247C355.699 92.6339 355.631 91.2381 357.241 90.186C359.87 88.4656 362.778 89.8021 365.546 90.3497C365.561 90.3527 365.532 90.3468 365.546 90.3497C367.858 90.804 369.649 90.098 371.923 89.3884C372.489 89.2128 373.255 89.0482 373.47 88.953C374.383 88.5432 375.895 87.8227 375.407 86.7394C374.868 85.5457 372.659 84.8846 371.55 84.4891C369.74 83.8428 368.053 82.9215 366.147 82.6743C365.654 82.6095 365.109 83.1606 364.6 83.1097C363.36 83.1121 361.769 83.348 360.543 83.418C357.43 83.5916 354.583 83.6228 351.464 83.4719C348.714 83.3377 346.432 82.8542 343.741 82.3102C340.773 81.7101 337.52 81.5879 334.471 81.5839C331.393 81.5811 328.6 81.7214 325.583 82.4181C322.758 83.0702 319.757 83.6198 316.887 84.0326C314.698 84.3481 312.467 84.6054 310.319 84.2137C309.079 83.9871 306.994 83.3394 306.461 81.9635C305.846 80.3659 307.736 79.1556 308.981 78.7519Z",fill:"url(#paint14_linear_1356_14057)"}),t.createElement("path",{d:"M242.269 242.95C242.295 242.947 242.244 242.955 242.269 242.95C244.934 242.606 247.53 241.858 250.2 241.574C253.133 241.264 256.006 240.56 258.906 239.982C263.26 239.117 268.026 238.52 272.254 237.097C274.429 236.365 276.067 235.298 278.251 234.592C280.361 233.909 283.058 233.12 285.216 232.652C289.317 231.764 293.049 231.66 297.016 230.198C301.109 228.69 305.088 226.673 308.819 224.409C312.645 222.086 316.282 219.769 320.622 218.62C322.381 218.154 323.919 218.219 325.65 218.886C327.016 219.413 327.739 220.337 327.196 221.79C326.557 223.504 324.659 224.7 323.131 225.423C320.854 226.5 319.53 227.184 317.134 227.927C314.619 228.707 311.888 229.24 309.395 230.083C308.226 230.947 307.17 232.522 306.105 233.501C303.996 235.441 301.666 237.03 298.945 237.996C292.934 240.129 286.354 238.602 280.183 239.056C279.661 239.095 279.162 239.442 278.635 239.487C275.592 240.135 272.2 240.63 269.156 241.294C264.546 242.299 260.456 243.409 255.808 244.179C251.971 244.814 243.815 245.854 243.815 245.854L242.074 245.505C240.575 245.281 240.751 243.152 242.269 242.95Z",fill:"url(#paint15_linear_1356_14057)"}),t.createElement("path",{d:"M432.985 171.626C438.212 165.465 445.109 153.64 442.906 144.649C442.162 137.999 433.671 132.912 424.963 135.518C420.16 136.957 416.435 142.146 419.724 144.498C420.656 145.164 422.187 145.591 423.391 145.969C434.204 149.375 434.925 162.538 425.069 169.683C421.087 172.569 416.347 174.292 411.914 176.719C400.151 183.162 399.887 196.847 387.7 202.712C382.326 205.298 375.761 206.838 370.297 209.275C359.98 213.88 352.555 221.733 342.241 226.341C337.225 228.584 330.266 231.632 323.483 234.12C321.475 234.855 321.999 237.058 324.056 236.46C324.098 236.449 324.017 236.474 324.056 236.46C329.079 234.971 334.437 233.161 339.331 231.33C352.278 226.48 365.28 220.971 377.43 214.775C401.78 202.367 416.881 190.609 432.985 171.626Z",fill:"url(#paint16_linear_1356_14057)"}),t.createElement("path",{d:"M343.644 241.104C348.002 234.144 357.126 232.455 364.343 231.134C368.176 230.431 372.406 229.878 376.137 228.662C380.691 227.175 384.558 224.095 388.327 221.077C389.452 220.177 391.204 218.466 392.393 217.436C393.185 216.748 393.644 216.026 394.33 215.225C396 213.275 399.599 209.812 401.687 208.16C403.263 206.914 407.779 204.758 408.259 207.986C408.611 210.359 406.379 213.087 404.961 214.747C402.224 217.953 398.998 221.079 395.475 223.243C391.749 225.531 387.701 227.439 383.674 229.051C381.672 229.853 379.519 230.073 377.486 230.785C376.001 231.307 374.486 232.236 373.037 232.866C371.034 233.738 368.99 234.28 367.041 235.38C364.436 236.849 361.782 238.783 359.108 240.105C356.331 241.477 353.823 242.691 350.791 243.27C348.6 243.687 345.501 243.641 343.836 241.884C343.526 241.554 343.389 241.51 343.644 241.104Z",fill:"url(#paint17_linear_1356_14057)"}),t.createElement("path",{d:"M190.163 273.219C222.905 268.849 232.64 262.943 213.962 259.057C195.285 255.172 187.5 262.08 188.434 266.2C189.366 270.32 180.381 271.326 169.286 272.39C158.193 273.454 157.141 276.354 190.163 273.219Z",fill:"url(#paint18_linear_1356_14057)"}),t.createElement("path",{d:"M295.952 95.4242L241.395 135.226L251.54 111.77L295.952 95.4242Z",fill:"#E17726",stroke:"#E17726",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M170.111 95.4242L224.181 135.598L214.522 111.77L170.111 95.4242Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M276.309 187.712L261.793 209.576L292.876 218.014L301.78 188.189L276.309 187.712Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M164.336 188.189L173.186 218.014L204.215 209.576L189.753 187.712L164.336 188.189Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M202.542 150.776L193.908 163.618L224.667 164.998L223.642 132.36L202.542 150.776Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M263.52 150.775L242.097 131.989L241.395 164.998L272.154 163.618L263.52 150.775Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M204.215 209.576L222.832 200.714L206.805 188.402L204.215 209.576Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M243.23 200.714L261.793 209.576L259.257 188.402L243.23 200.714Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M261.793 209.576L243.23 200.714L244.741 212.601L244.579 217.643L261.793 209.576Z",fill:"#D5BFB2",stroke:"#D5BFB2",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M204.215 209.576L221.483 217.643L221.375 212.601L222.832 200.714L204.215 209.576Z",fill:"#D5BFB2",stroke:"#D5BFB2",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M221.807 180.547L206.373 176.09L217.274 171.154L221.807 180.547Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M244.255 180.547L248.788 171.154L259.742 176.09L244.255 180.547Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M204.215 209.576L206.913 187.712L189.753 188.189L204.215 209.576Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M259.149 187.712L261.793 209.576L276.309 188.189L259.149 187.712Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M272.154 163.618L241.395 164.998L244.255 180.547L248.788 171.154L259.742 176.09L272.154 163.618Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M206.373 176.09L217.274 171.154L221.807 180.547L224.667 164.998L193.908 163.618L206.373 176.09Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M193.908 163.618L206.805 188.402L206.373 176.09L193.908 163.618Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M259.743 176.09L259.257 188.402L272.154 163.618L259.743 176.09Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M224.667 164.998L221.807 180.548L225.422 198.909L226.232 174.71L224.667 164.998Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M241.395 164.998L239.884 174.657L240.64 198.909L244.255 180.548L241.395 164.998Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M244.255 180.547L240.64 198.909L243.23 200.714L259.257 188.402L259.743 176.09L244.255 180.547Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M206.373 176.09L206.805 188.402L222.832 200.714L225.422 198.909L221.807 180.547L206.373 176.09Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M244.579 217.643L244.741 212.601L243.338 211.434H222.724L221.375 212.601L221.483 217.643L204.215 209.576L210.259 214.459L222.508 222.791H243.5L255.803 214.459L261.793 209.576L244.579 217.643Z",fill:"#C0AC9D",stroke:"#C0AC9D",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M243.23 200.714L240.64 198.909H225.422L222.832 200.714L221.375 212.601L222.724 211.434H243.338L244.741 212.601L243.23 200.714Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M298.272 137.827L302.859 115.856L295.952 95.4242L243.23 133.899L263.52 150.775L292.174 159.001L298.488 151.731L295.736 149.767L300.107 145.84L296.761 143.293L301.132 140.002L298.272 137.827Z",fill:"#763E1A",stroke:"#763E1A",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M163.203 115.856L167.844 137.827L164.876 140.002L169.301 143.293L165.955 145.84L170.326 149.767L167.574 151.731L173.888 159.001L202.542 150.775L222.832 133.899L170.11 95.4242L163.203 115.856Z",fill:"#763E1A",stroke:"#763E1A",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M292.175 159.001L263.52 150.775L272.154 163.618L259.257 188.402L276.309 188.189H301.78L292.175 159.001Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M202.542 150.775L173.888 159.001L164.336 188.189H189.753L206.805 188.402L193.908 163.618L202.542 150.775Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{d:"M241.395 164.998L243.23 133.9L251.54 111.77H214.522L222.832 133.9L224.667 164.998L225.368 174.763L225.422 198.909H240.64L240.694 174.763L241.395 164.998Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.94513",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("defs",null,t.createElement("linearGradient",{id:"paint0_linear_1356_14057",x1:"335.991",y1:"250.487",x2:"303.873",y2:"266.801",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#FFE466"}),t.createElement("stop",{offset:"1",stopColor:"#FFAFEA"})),t.createElement("linearGradient",{id:"paint1_linear_1356_14057",x1:"276.993",y1:"303.722",x2:"205.254",y2:"401.574",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#75C3FC"}),t.createElement("stop",{offset:"0.0929",stopColor:"#81C2F6"}),t.createElement("stop",{offset:"1",stopColor:"#F0B8BD"})),t.createElement("linearGradient",{id:"paint2_linear_1356_14057",x1:"271.074",y1:"119.924",x2:"553.077",y2:"104.53",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#FFE466"}),t.createElement("stop",{offset:"1",stopColor:"#FFAFEA"})),t.createElement("linearGradient",{id:"paint3_linear_1356_14057",x1:"264.209",y1:"91.0943",x2:"357.834",y2:"72.8792",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#FFE466"}),t.createElement("stop",{offset:"1",stopColor:"#FFAFEA"})),t.createElement("linearGradient",{id:"paint4_linear_1356_14057",x1:"212.46",y1:"121.997",x2:"92.6119",y2:"183.406",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#FFE466"}),t.createElement("stop",{offset:"1",stopColor:"#FFAFEA"})),t.createElement("linearGradient",{id:"paint5_linear_1356_14057",x1:"23.0498",y1:"204.411",x2:"161.86",y2:"163.003",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#75C3FC"}),t.createElement("stop",{offset:"0.0929",stopColor:"#81C2F6"}),t.createElement("stop",{offset:"1",stopColor:"#F0B8BD"})),t.createElement("linearGradient",{id:"paint6_linear_1356_14057",x1:"78.8647",y1:"240.375",x2:"74.9655",y2:"241.328",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#75C3FC"}),t.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),t.createElement("linearGradient",{id:"paint7_linear_1356_14057",x1:"382.349",y1:"181.971",x2:"378.45",y2:"182.925",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#75C3FC"}),t.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),t.createElement("linearGradient",{id:"paint8_linear_1356_14057",x1:"349.889",y1:"244.583",x2:"345.99",y2:"245.537",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#75C3FC"}),t.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),t.createElement("linearGradient",{id:"paint9_linear_1356_14057",x1:"142.262",y1:"279.808",x2:"138.362",y2:"280.762",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#75C3FC"}),t.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),t.createElement("linearGradient",{id:"paint10_linear_1356_14057",x1:"123.305",y1:"99.0746",x2:"119.406",y2:"100.028",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#75C3FC"}),t.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),t.createElement("linearGradient",{id:"paint11_linear_1356_14057",x1:"371.818",y1:"156.617",x2:"367.919",y2:"157.571",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#75C3FC"}),t.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),t.createElement("linearGradient",{id:"paint12_linear_1356_14057",x1:"385.281",y1:"242.958",x2:"381.382",y2:"243.911",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#75C3FC"}),t.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),t.createElement("linearGradient",{id:"paint13_linear_1356_14057",x1:"367.125",y1:"37.5052",x2:"360.843",y2:"38.8076",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#75C3FC"}),t.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),t.createElement("linearGradient",{id:"paint14_linear_1356_14057",x1:"300.182",y1:"91.321",x2:"479.464",y2:"104.041",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#FFE466"}),t.createElement("stop",{offset:"1",stopColor:"#FFAFEA"})),t.createElement("linearGradient",{id:"paint15_linear_1356_14057",x1:"363.434",y1:"201.232",x2:"102.977",y2:"302.269",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#FFE466"}),t.createElement("stop",{offset:"1",stopColor:"#FFAFEA"})),t.createElement("linearGradient",{id:"paint16_linear_1356_14057",x1:"447.962",y1:"165.159",x2:"313.049",y2:"197.95",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#75C3FC"}),t.createElement("stop",{offset:"0.0929",stopColor:"#81C2F6"}),t.createElement("stop",{offset:"1",stopColor:"#F0B8BD"})),t.createElement("linearGradient",{id:"paint17_linear_1356_14057",x1:"410.211",y1:"215.859",x2:"341.378",y2:"232.788",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#75C3FC"}),t.createElement("stop",{offset:"0.0929",stopColor:"#81C2F6"}),t.createElement("stop",{offset:"1",stopColor:"#F0B8BD"})),t.createElement("linearGradient",{id:"paint18_linear_1356_14057",x1:"222.282",y1:"258.986",x2:"162.257",y2:"273.774",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{stopColor:"#FFE466"}),t.createElement("stop",{offset:"1",stopColor:"#FFAFEA"}))))},w=function(e){var n=t.useState(2),r=n[0],o=n[1],u=e.sdkVersion,c=e.i18nInstance.t;return t.createElement(a,{className:"select-modal"},t.createElement("div",{style:s.backdrop,onClick:function(){return e.onClose(!0)}}),t.createElement("div",{style:s.modal},t.createElement("div",{style:s.closeButtonContainer},t.createElement("div",{style:s.right},t.createElement("span",{style:s.closeButton,onClick:function(){return e.onClose(!0)}},t.createElement(l,null)))),t.createElement("div",{style:s.logoContainer},t.createElement(h,null)),t.createElement("div",null,t.createElement("div",{style:s.tabcontainer},t.createElement("div",{style:s.flexContainer},t.createElement("div",{onClick:function(){return o(1)},style:i(i(i({},s.tab),1===r?s.tabactive:{}),s.flexItem)},c("DESKTOP")),t.createElement("div",{onClick:function(){return o(2)},style:i(i(i({},s.tab),2===r?s.tabactive:{}),s.flexItem)},c("MOBILE")))),t.createElement("div",{style:{display:1===r?"none":"block"}},t.createElement("div",{style:s.flexContainer},t.createElement("div",{style:i({textAlign:"center",marginTop:4},s.flexItem)},t.createElement("div",{id:"sdk-qrcode-container",style:s.center}),t.createElement("div",{style:s.connectMobileText},c("SCAN_TO_CONNECT"),t.createElement("br",null),t.createElement("span",{style:s.blue},t.createElement("b",null,c("META_MASK_MOBILE_APP"))))))),t.createElement("div",{style:{display:2===r?"none":"block"}},t.createElement("div",{style:{display:"flex",justifyContent:"center",height:300,marginTop:-20}},t.createElement(y,null)),t.createElement("div",{style:s.extensionLabel},c("SELECT_MODAL.CRYPTO_TAKE_CONTROL_TEXT")),t.createElement("button",{style:s.button,onClick:e.connectWithExtension},t.createElement(b,null),t.createElement("span",{style:s.installExtensionText},c("CONNECT_WITH_EXTENSION"))))),t.createElement(m,{version:u})))},_=function(){function e(e){var t=e.debug,n=e.sdkVersion,i=this;this.debug=!1,this.updateOTPValue=function(e){i.debug&&console.debug("ModalLoader: updateOTPValue",e),setTimeout((function(){var t;i.debug&&console.debug("ModalLoader: updateOTPValue: delayed otp update"),t=document.getElementById("sdk-mm-otp-value"),i.debug&&console.debug("ModalLoader: updateOTPValue: otpNode",t),t&&(t.textContent=e,t.style.display="block")}),800)},this.updateQRCode=function(e){i.debug&&console.debug("ModalLoader: updateQRCode",e);var t=document.getElementById("sdk-qrcode-container");t&&(t.innerHTML="",new(bR())({width:270,height:270,type:"svg",data:e,image:r,dotsOptions:{color:"black",type:"rounded"},imageOptions:{margin:5},cornersDotOptions:{color:"#f66a07"},qrOptions:{errorCorrectionLevel:"M"}}).append(t))},this.debug=null!=t&&t,this.sdkVersion=n}return e.prototype.renderInstallModal=function(e){this.debug&&console.debug("ModalLoader: renderInstallModal",e),this.installContainer=e.parentElement,n.createRoot(e.parentElement).render(t.createElement(g,{link:e.link,preferDesktop:e.preferDesktop,onClose:e.onClose,sdkVersion:this.sdkVersion,metaMaskInstaller:e.metaMaskInstaller,i18nInstance:e.i18nInstance}))},e.prototype.renderSelectModal=function(e){var r=this;this.debug&&console.debug("ModalLoader: renderSelectModal",e),this.selectContainer=e.parentElement,n.createRoot(e.parentElement).render(t.createElement(w,{link:e.link,sdkVersion:this.sdkVersion,onClose:e.onClose,connectWithExtension:e.connectWithExtension,i18nInstance:e.i18nInstance})),setTimeout((function(){r.updateQRCode(e.link)}),100)},e.prototype.renderPendingModal=function(e){this.debug&&console.debug("ModalLoader: renderPendingModal",e),this.pendingContainer=e.parentElement,n.createRoot(e.parentElement).render(t.createElement(v,{onClose:e.onClose,onDisconnect:e.onDisconnect,sdkVersion:this.sdkVersion,updateOTPValue:e.updateOTPValue,displayOTP:e.displayOTP,i18nInstance:e.i18nInstance}))},e.prototype.unmount=function(){var e,t,n,r,i,o;null===(t=null===(e=this.pendingContainer)||void 0===e?void 0:e.parentNode)||void 0===t||t.removeChild(this.pendingContainer),this.pendingContainer=void 0,null===(r=null===(n=this.installContainer)||void 0===n?void 0:n.parentNode)||void 0===r||r.removeChild(this.installContainer),this.installContainer=void 0,null===(o=null===(i=this.selectContainer)||void 0===i?void 0:i.parentNode)||void 0===o||o.removeChild(this.selectContainer),this.selectContainer=void 0},e}();e.ModalLoader=_}(t,ZT(),mR())}(0,KT.exports);var yR=KT.exports;const wR=({link:e,debug:t,installer:n,terminate:r,connectWithExtension:i,preferDesktop:o,i18nInstance:a})=>{let s=null,u=null;kx("[UI: InstallModal-web: sdkWebInstallModal()] ################## Installing Modal #################"),kx(`[UI: InstallModal-web: sdkWebInstallModal()] link=${e}`),kx(`[UI: InstallModal-web: sdkWebInstallModal()] npx uri-scheme open "${e}" --ios`),kx(`[UI: InstallModal-web: sdkWebInstallModal()] npx uri-scheme open "${e}" --android`),kx(`[UI: InstallModal-web: sdkWebInstallModal()] adb shell am start -a android.intent.action.VIEW -d "${e}"`);const l=e=>{var t;kx("[UI: InstallModal-web: sdkWebInstallModal()] installModal-web unmounting install modal -- shouldTerminate:",e,u),(null==u?void 0:u.parentNode)&&(null===(t=u.parentNode)||void 0===t||t.removeChild(u)),u=null,s=null,!0===e&&(null==r||r())};return{mount:r=>{if(kx("[UI: InstallModal-web: sdkWebInstallModal()] installModal-web mounting install modal",u),u)return u.style.display="block",void(null==s||s.updateQRCode(r));s=new yR.ModalLoader({debug:t,sdkVersion:FA.version}),u=document.createElement("div"),document.body.appendChild(u),window.extension?s.renderSelectModal({i18nInstance:a,parentElement:u,connectWithExtension:()=>{l(),null==i||i()},onClose:l,link:e}):s.renderInstallModal({i18nInstance:a,parentElement:u,preferDesktop:null!=o&&o,link:e,metaMaskInstaller:n,onClose:l})},unmount:l}},_R=({onDisconnect:e,i18nInstance:t,debug:n})=>{let r=null,i=null;const o=()=>{kx("[UI: pendingModal-web: sdkWebPendingModal()] pendingModal-web unmount",r),(null==r?void 0:r.parentNode)&&r.parentNode.removeChild(r),r=null,i=null},a=e=>{kx("[UI: pendingModal-web: sdkWebPendingModal()] pendingModal-web updateOTPValue",e),i&&i.updateOTPValue(e)},s=({displayOTP:s}={displayOTP:!0})=>{kx("[UI: pendingModal-web: sdkWebPendingModal()] pendingModal-web mount",r),r?r.style.display="block":(i=new yR.ModalLoader({debug:n,sdkVersion:FA.version}),r=document.createElement("div"),document.body.appendChild(r),i.renderPendingModal({i18nInstance:t,parentElement:r,onClose:o,onDisconnect:e,updateOTPValue:a,displayOTP:s}))};return s(),{mount:s,unmount:o,updateOTPValue:a}};function SR(e,t){var n,r,i,o;e.connector||(kx("[RemoteConnection: initializeConnector()] initialize connector"),e.connector=new wk({platformType:t.platformManager.getPlatformType(),communicationLayerPreference:t.communicationLayerPreference,transports:t.transports,dappMetadata:Object.assign(Object.assign({},t.dappMetadata),{source:t._source}),analytics:t.enableAnalytics,communicationServerUrl:t.communicationServerUrl,sdkVersion:FA.version,context:"dapp",ecies:t.ecies,storage:t.storage,logging:t.logging}),t.timer&&(kx("[RemoteConnection: initializeConnector()] reset background timer",t.timer),null===(r=null===(n=t.timer)||void 0===n?void 0:n.stopBackgroundTimer)||void 0===r||r.call(n),null===(o=null===(i=t.timer)||void 0===i?void 0:i.runBackgroundTimer)||void 0===o||o.call(i,(()=>!1),1e4)))}function ER(e){e.listeners.forEach((({event:t,handler:n})=>{var r;null===(r=e.connector)||void 0===r||r.off(t,n)})),e.listeners=[]}function kR(e,n,r){return _k(this,void 0,void 0,(function*(){return new Promise(((i,o)=>{if(!e.connector)return void o(new Error("No connector available"));kx("[RemoteConnection: connectWithModalInstaller()]",{state:e,options:n,linkParams:r});const a=`${e.useDeeplink?HA:qA}?${r}`;!function(e,t,n){var r,i,o,a;e.installModal=null===(i=(r=t.modals).install)||void 0===i?void 0:i.call(r,{i18nInstance:t.sdk.i18nInstance,link:n,preferDesktop:e.preferDesktop,installer:t.getMetaMaskInstaller(),terminate:()=>{kx("[RemoteConnection: showInstallModal() => terminate()] terminate connection"),t.sdk.terminate().catch((e=>{console.warn("[MMSDK] failed to terminate connection",e)}))},debug:e.developerMode,connectWithExtension:()=>{var e;return null===(e=t.connectWithExtensionProvider)||void 0===e||e.call(t),!1}}),null===(a=null===(o=e.installModal)||void 0===o?void 0:o.mount)||void 0===a||a.call(o,n)}(e,n,a),n.sdk.once(t.EventType.PROVIDER_UPDATE,(e=>_k(this,void 0,void 0,(function*(){kx("[RemoteConnection: connectWithModalInstaller()] once provider_update -- resolving startConnection promise"),e!==t.PROVIDER_UPDATE_TYPE.TERMINATE?o(e):o({code:4001,message:"User rejected the request."})})))),e.connector.once(t.EventType.AUTHORIZED,(()=>{i()})),e.connector.once(t.EventType.CLIENTS_READY,(()=>_k(this,void 0,void 0,(function*(){kx("[RemoteConnection: connectWithModalInstaller()] once clients_ready -- resolving startConnection promise"),i()}))))}))}))}function MR(e,n){function r(t,n){var r;null===(r=e.connector)||void 0===r||r.on(t,n),e.listeners.push({event:t,handler:n})}e.connector&&(ER(e),r(t.EventType.WALLET_INIT,(({accounts:e,chainId:t})=>_k(this,void 0,void 0,(function*(){kx(`[RemoteConnection: setupListeners() => EventType.WALLET_INIT] 'wallet_init' accounts=${e} chainId=${t}`);const n=QA.getProvider();n._setConnected();const r={accounts:e,chainId:t,isUnlocked:!1};n._initializeState(r),n.emit("chainChanged",t),n.emit("accountsChanged",e)})))),r(t.EventType.AUTHORIZED,(()=>_k(this,void 0,void 0,(function*(){var t,r,i,o,a;try{kx("[RemoteConnection: setupListeners() => EventType.AUTHORIZED] 'authorized' closing modals",e.pendingModal,e.installModal),n.enableAnalytics&&(null===(t=e.analytics)||void 0===t||t.send({event:ek.AUTHORIZED}));const s=QA.getProvider();s._setConnected(),null===(i=null===(r=e.pendingModal)||void 0===r?void 0:r.unmount)||void 0===i||i.call(r),null===(a=null===(o=e.installModal)||void 0===o?void 0:o.unmount)||void 0===a||a.call(o,!1),e.otpAnswer=void 0,e.authorized=!0,kx("[RemoteConnection: setupListeners() => EventType.AUTHORIZED] 'authorized' provider.state",s.getState()),yield s.forceInitializeState()}catch(t){}})))),r(t.EventType.TERMINATE,(()=>{var t,r,i,o,a,s,u,l;(null===(t=e.connector)||void 0===t?void 0:t.isAuthorized())||n.enableAnalytics&&(null===(r=e.analytics)||void 0===r||r.send({event:ek.REJECTED})),(null===(i=e.platformManager)||void 0===i?void 0:i.isBrowser())?alert("SDK Connection has been terminated from MetaMask."):console.info("SDK Connection has been terminated"),null===(a=null===(o=e.pendingModal)||void 0===o?void 0:o.unmount)||void 0===a||a.call(o),null===(u=null===(s=e.installModal)||void 0===s?void 0:s.unmount)||void 0===u||u.call(s,!0),e.pendingModal=void 0,e.installModal=void 0,e.otpAnswer=void 0,null===(l=e.connector)||void 0===l||l.disconnect({terminate:!0}),e.authorized=!1,QA.getProvider().handleDisconnect({terminate:!0}),ER(e),kx("[RemoteConnection: setupListeners()] All listeners cleaned up")})))}function CR(e,n,{initialCheck:r,connectWith:i}={}){var o,a,s,u,l,c,d,f,h,p,m,g,v,b,y,w,_,S,E;return _k(this,void 0,void 0,(function*(){try{if(SR(e,n),!e.connector)throw new Error("no connector defined");MR(e,n);const k=QA.getProvider();e.authorized=!1,k.emit("connecting");const M=yield null===(o=e.connector)||void 0===o?void 0:o.originatorSessionConnect();kx(`[RemoteConnection: startConnection()] after originatorSessionConnect initialCheck=${r}`,M);let C=null!==(a=null==M?void 0:M.channelId)&&void 0!==a?a:"",x=null!==(u=null===(s=e.connector.getKeyInfo())||void 0===s?void 0:s.ecies.public)&&void 0!==u?u:"",A=null!==(c=null===(l=e.connector.getKeyInfo())||void 0===l?void 0:l.ecies.private)&&void 0!==c?c:"";if(r&&!M)return Promise.resolve();if(!M&&!r){const t=yield e.connector.generateChannelIdConnect();C=null!==(d=t.channelId)&&void 0!==d?d:"",x=null!==(f=t.pubKey)&&void 0!==f?f:"",A=null!==(h=t.privKey)&&void 0!==h?h:"";const n=Date.now();null===(p=e.connector.state.storageManager)||void 0===p||p.persistChannelConfig({channelId:C,localKey:A,lastActive:n,validUntil:n+HE})}if(r&&(null==M?void 0:M.channelId))return(null===(m=e.connector)||void 0===m?void 0:m.isConnected())||(kx(`[RemoteConnection: startConnection()] reconnecting to channel initialCheck=${r}`,M),yield null===(g=e.connector)||void 0===g?void 0:g.connectToChannel({channelId:C})),Promise.resolve();M&&!(null===(v=e.connector)||void 0===v?void 0:v.isConnected())&&(kx("[RemoteConnection: startConnection()] reconnecting to channel",M),yield null===(b=e.connector)||void 0===b?void 0:b.connectToChannel({channelId:C}));const T=(null===(y=e.platformManager)||void 0===y?void 0:y.isSecure())?"":"&t=q",R=FA.version,{iconUrl:P,name:L,url:I,scheme:O}=n.dappMetadata||{},N=null===(w=e.platformManager)||void 0===w?void 0:w.getPlatformType();let D="N/A";"undefined"!=typeof window&&window.location&&window.location.hostname?D=window.location.hostname:void 0!==L?D=L:void 0!==I&&(D=I);const B={url:null!=I?I:"",title:null!=L?L:"",icon:P,scheme:null!=O?O:"",apiVersion:R,dappId:D,platform:null!=N?N:"",source:null!==(_=n._source)&&void 0!==_?_:""},j=ZA(JSON.stringify(B));let z=`channelId=${C}&v=2&comm=${null!==(S=e.communicationLayerPreference)&&void 0!==S?S:""}&pubkey=${x}${T}&originatorInfo=${j}`;if(i){z+=`&rpc=${ZA(JSON.stringify(i))}`;const t=e.connector.getRPCMethodTracker();t&&(t[`${i.id}`]=Object.assign(Object.assign({},i),{id:`${i.id}`,timestamp:Date.now()}))}const U=encodeURI(z),F=`${e.useDeeplink?HA:qA}?${z}`;return e.qrcodeLink=F,e.developerMode&&kx(`[RemoteConnection: startConnection()] qrcodeLink=${U}`),k.emit("display_uri",F),(null===(E=e.platformManager)||void 0===E?void 0:E.isSecure())?(yield function(e,t){var n,r;return _k(this,void 0,void 0,(function*(){const i=`${qA}?${t}`,o=`${HA}?${t}`;null===(r=null===(n=e.platformManager)||void 0===n?void 0:n.openDeeplink)||void 0===r||r.call(n,i,o,"_self")}))}(e,U),new Promise((n=>{var r,i;(null===(r=e.connector)||void 0===r?void 0:r.isAuthorized())?n():null===(i=e.connector)||void 0===i||i.once(t.EventType.AUTHORIZED,(()=>{n()}))}))):kR(e,n,U)}catch(e){throw console.error("[startConnection] error",e),e}}))}class xR{constructor(e){var t,n,r,i;this.state={connector:void 0,qrcodeLink:void 0,analytics:void 0,developerMode:!1,authorized:!1,reconnection:!1,preferDesktop:!1,deeplinkProtocol:!1,listeners:[],communicationLayerPreference:void 0,platformManager:void 0,pendingModal:void 0,installModal:void 0,otpAnswer:void 0},this.options=e;const o=!0===(null===(t=e.logging)||void 0===t?void 0:t.developerMode)||!0===(null===(n=e.logging)||void 0===n?void 0:n.sdk);this.state.developerMode=o,this.state.analytics=e.analytics,this.state.preferDesktop=null!==(r=e.preferDesktop)&&void 0!==r&&r,this.state.useDeeplink=e.sdk.options.useDeeplink,this.state.communicationLayerPreference=e.communicationLayerPreference,this.state.platformManager=e.platformManager,this.state.deeplinkProtocol=null!==(i=e.sdk.options._experimentalDeeplinkProtocol)&&void 0!==i&&i,e.modals.install||(e.modals.install=wR),e.modals.otp||(e.modals.otp=_R)}startConnection(e){return _k(this,void 0,void 0,(function*(){return CR(this.state,this.options,e)}))}initRemoteCommunication({sdkInstance:e}){var t,n,r;return _k(this,void 0,void 0,(function*(){const i=yield null===(n=null===(t=e.options.storage)||void 0===t?void 0:t.storageManager)||void 0===n?void 0:n.getPersistedChannelConfig();if(!this.options.ecies){const e={privateKey:null==i?void 0:i.localKey};this.options.ecies=e}return SR(this.state,this.options),MR(this.state,this.options),null===(r=this.getConnector())||void 0===r?void 0:r.initFromDappStorage()}))}showActiveModal(){return function(e){var t,n,r,i;e.authorized?kx("[RemoteConnection: showActiveModal()] already authorized"):e.pendingModal?null===(n=(t=e.pendingModal).mount)||void 0===n||n.call(t):e.installModal&&(null===(i=(r=e.installModal).mount)||void 0===i||i.call(r,e.qrcodeLink||""))}(this.state)}getUniversalLink(){if(!this.state.qrcodeLink)throw new Error("connection not started. run startConnection() first.");return this.state.qrcodeLink}getChannelConfig(){var e;return null===(e=this.state.connector)||void 0===e?void 0:e.getChannelConfig()}getKeyInfo(){var e;return null===(e=this.state.connector)||void 0===e?void 0:e.getKeyInfo()}getConnector(){if(!this.state.connector)throw new Error("invalid remote connector");return this.state.connector}getPlatformManager(){if(!this.state.platformManager)throw new Error("PlatformManager not available");return this.state.platformManager}isConnected(){var e;return(null===(e=this.state.connector)||void 0===e?void 0:e.isReady())||!1}isAuthorized(){var e;return(null===(e=this.state.connector)||void 0===e?void 0:e.isAuthorized())||!1}isPaused(){var e;return null===(e=this.state.connector)||void 0===e?void 0:e.isPaused()}disconnect(e){var t,n,r;kx("[RemoteConnection: disconnect()]",e),(null==e?void 0:e.terminate)&&(QA.getProvider().handleDisconnect({terminate:!0}),null===(n=null===(t=this.state.pendingModal)||void 0===t?void 0:t.unmount)||void 0===n||n.call(t),this.state.otpAnswer=void 0),null===(r=this.state.connector)||void 0===r||r.disconnect(e),function(e){kx("[RemoteConnection: cleanupConnector()] cleaning up connector"),e.connector&&(ER(e),e.connector.disconnect({terminate:!0}))}(this.state)}}const AR=e=>_k(void 0,void 0,void 0,(function*(){const{options:t}=e,{infuraAPIKey:n}=t;if(!n)return;const r={"0x1":`https://mainnet.infura.io/v3/${n}`,"0x5":`https://goerli.infura.io/v3/${n}`,"0x2a":`https://sepolia.infura.io/v3/${n}`,"0xe708":`https://linea-mainnet.infura.io/v3/${n}`,"0xe704":`https://linea-goerli.infura.io/v3/${n}`,"0x89":`https://polygon-mainnet.infura.io/v3/${n}`,"0x13881":`https://polygon-mumbai.infura.io/v3/${n}`,"0x45":`https://optimism-mainnet.infura.io/v3/${n}`,"0x1a4":`https://optimism-goerli.infura.io/v3/${n}`,"0xa4b1":`https://arbitrum-mainnet.infura.io/v3/${n}`,"0x66eed":`https://arbitrum-goerli.infura.io/v3/${n}`,"0x2a15c308d":`https://palm-mainnet.infura.io/v3/${n}`,"0x2a15c3083":`https://palm-testnet.infura.io/v3/${n}`,"0xa86a":`https://avalanche-mainnet.infura.io/v3/${n}`,"0xa869":`https://avalanche-fuji.infura.io/v3/${n}`,"0x4e454152":`https://aurora-mainnet.infura.io/v3/${n}`,"0x4e454153":`https://aurora-testnet.infura.io/v3/${n}`,"0x534e5f4d41494e":`https://starknet-mainnet.infura.io/v3/${n}`,"0x534e5f474f45524c49":`https://starknet-goerli.infura.io/v3/${n}`,"0x534e5f474f45524c4932":`https://starknet-goerli2.infura.io/v3/${n}`,"0xa4ec":`https://celo-mainnet.infura.io/v3/${n}`,"0xaef3":`https://celo-alfajores.infura.io/v3/${n}`};e.options.readonlyRPCMap?e.options.readonlyRPCMap=Object.assign(Object.assign({},e.options.readonlyRPCMap),r):e.options.readonlyRPCMap=r})),TR=e=>_k(void 0,void 0,void 0,(function*(){const{options:t}=e,{readonlyRPCMap:n}=t;if(n)try{kx("[MetaMaskSDK: setupReadOnlyRPCProviders()] Setting up Readonly RPC Providers",n),e.setReadOnlyRPCCalls(!0)}catch(e){throw new Error("Invalid Infura Settings")}}));function RR(e){return RR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},RR(e)}function PR(e){var t=function(e,t){if("object"!==RR(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==RR(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===RR(t)?t:String(t)}function LR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,PR(r.key),r)}}var IR=[],OR=IR.forEach,NR=IR.slice,DR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,BR=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+60*n*1e3)),r&&(i.domain=r),document.cookie=function(e,t,n){var r=n||{};r.path=r.path||"/";var i=encodeURIComponent(t),o="".concat(e,"=").concat(i);if(r.maxAge>0){var a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(a))}if(r.domain){if(!DR.test(r.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(r.domain)}if(r.path){if(!DR.test(r.path))throw new TypeError("option path is invalid");o+="; Path=".concat(r.path)}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");o+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o}(e,encodeURIComponent(t),i)},jR=function(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null},zR={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!=typeof document){var n=jR(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!=typeof document&&BR(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},UR={name:"querystring",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=n.substring(1).split("&"),i=0;i<r.length;i++){var o=r[i].indexOf("=");o>0&&r[i].substring(0,o)===e.lookupQuerystring&&(t=r[i].substring(o+1))}}return t}},FR=null,KR=function(){if(null!==FR)return FR;try{FR="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){FR=!1}return FR},qR={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&KR()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&KR()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},HR=null,WR=function(){if(null!==HR)return HR;try{HR="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){HR=!1}return HR},$R={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&WR()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&WR()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},VR={name:"navigator",lookup:function(e){var t=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)t.push(navigator.languages[n]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},YR={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},GR={name:"path",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof n[e.lookupFromPathIndex])return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},ZR={name:"subdomain",lookup:function(e){var t="number"==typeof e.lookupFromSubdomainIndex?e.lookupFromSubdomainIndex+1:1,n="undefined"!=typeof window&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}},QR=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}var t,n;return t=e,n=[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=function(e){return OR.call(NR.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}(t,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(e){return e.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(zR),this.addDetector(UR),this.addDetector(qR),this.addDetector($R),this.addDetector(VR),this.addDetector(YR),this.addDetector(GR),this.addDetector(ZR)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var n=[];return e.forEach((function(e){if(t.detectors[e]){var r=t.detectors[e].lookup(t.options);r&&"string"==typeof r&&(r=[r]),r&&(n=n.concat(r))}})),n=n.map((function(e){return t.options.convertDetectedLanguage(e)})),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var n=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((function(t){n.detectors[t]&&n.detectors[t].cacheUserLanguage(e,n.options)})))}}],n&&LR(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();QR.type="languageDetector";var XR={DESKTOP:"Desktop",MOBILE:"Mobile",META_MASK_MOBILE_APP:"MetaMask mobile app",SCAN_TO_CONNECT:"Scan to connect and sign with",CONNECT_WITH_EXTENSION:"Connect With MetaMask Extension",INSTALL_MODAL:{TRUSTED_BY_USERS:"Trusted by over 30 million users to buy, store, send and swap crypto securely",LEADING_CRYPTO_WALLET:"The leading crypto wallet & gateway to blockchain apps built on Ethereum Mainnet, Polygon, Optimism, and many other networks",CONTROL_DIGITAL_INTERACTIONS:"Puts you in control of your digital interactions by making power of cryptography more accessible",INSTALL_META_MASK_EXTENSION:"Install MetaMask Extension"},PENDING_MODAL:{OPEN_META_MASK_SELECT_CODE:"Please open the MetaMask wallet app and select the code on the screen OR disconnect",OPEN_META_MASK_CONTINUE:"Open the MetaMask app to continue with your session.",NUMBER_AFTER_OPEN_NOTICE:"If a number doesn't appear after opening MetaMask, please click disconnect and re-scan the QRCode.",DISCONNECT:"Disconnect"},SELECT_MODAL:{CRYPTO_TAKE_CONTROL_TEXT:"Take control of your crypto and explore the blockchain with the wallet trusted by over 30 million people worldwide"},META_MASK_MODAL:{ADDRESS_COPIED:"Address copied to clipboard!",DISCONNECT:"Disconnect",ACTIVE_NETWORK:"Active Network"}},JR={DESKTOP:"Escritorio",MOBILE:"Móvil",META_MASK_MOBILE_APP:"Aplicación móvil de MetaMask",SCAN_TO_CONNECT:"Escanear para conectar y firmar con",CONNECT_WITH_EXTENSION:"Conectar con la Extensión de MetaMask",INSTALL_MODAL:{TRUSTED_BY_USERS:"Confiado por más de 30 millones de usuarios para comprar, almacenar, enviar e intercambiar cripto de manera segura",LEADING_CRYPTO_WALLET:"La principal billetera de criptomonedas y pasarela hacia aplicaciones blockchain construidas en Ethereum Mainnet, Polygon, Optimism y muchas otras redes",CONTROL_DIGITAL_INTERACTIONS:"Te da el control de tus interacciones digitales al hacer que el poder de la criptografía sea más accesible",INSTALL_META_MASK_EXTENSION:"Instalar la Extensión de MetaMask"},PENDING_MODAL:{OPEN_META_MASK_SELECT_CODE:"Por favor, abre la aplicación de billetera MetaMask y selecciona el código en la pantalla O desconecta",OPEN_META_MASK_CONTINUE:"Abre la aplicación de MetaMask para continuar con tu sesión.",NUMBER_AFTER_OPEN_NOTICE:"Si no aparece un número después de abrir MetaMask, por favor haz clic en desconectar y vuelve a escanear el código QR.",DISCONNECT:"Desconectar"},SELECT_MODAL:{CRYPTO_TAKE_CONTROL_TEXT:"Toma el control de tu cripto y explora la blockchain con la billetera en la que confían más de 30 millones de personas en todo el mundo"},META_MASK_MODAL:{ADDRESS_COPIED:"¡Dirección copiada al portapapeles!",DISCONNECT:"Desconectar",ACTIVE_NETWORK:"Red activa"}},eP={DESKTOP:"Bureau",MOBILE:"Mobile",META_MASK_MOBILE_APP:"Application mobile MetaMask",SCAN_TO_CONNECT:"Scannez pour vous connecter et signer avec",CONNECT_WITH_EXTENSION:"Connectez-vous avec l'extension MetaMask",INSTALL_MODAL:{TRUSTED_BY_USERS:"Fait confiance à plus de 30 millions d'utilisateurs pour acheter, stocker, envoyer et échanger des crypto en toute sécurité",LEADING_CRYPTO_WALLET:"Le portefeuille crypto leader et la passerelle vers des applications blockchain basées sur Ethereum Mainnet, Polygon, Optimism, et de nombreux autres réseaux",CONTROL_DIGITAL_INTERACTIONS:"Vous donne le contrôle de vos interactions numériques en rendant la puissance de la cryptographie plus accessible",INSTALL_META_MASK_EXTENSION:"Installez l'extension MetaMask"},PENDING_MODAL:{OPEN_META_MASK_SELECT_CODE:"Veuillez ouvrir l'application MetaMask et sélectionnez le code à l'écran OU déconnectez-vous",OPEN_META_MASK_CONTINUE:"Ouvrez l'application MetaMask pour continuer votre session.",NUMBER_AFTER_OPEN_NOTICE:"Si un numéro n'apparaît pas après avoir ouvert MetaMask, veuillez cliquer sur déconnecter et rescanner le QRCode.",DISCONNECT:"Déconnecter"},SELECT_MODAL:{CRYPTO_TAKE_CONTROL_TEXT:"Prenez le contrôle de votre crypto et explorez la blockchain avec le portefeuille fait confiance par plus de 30 millions de personnes à travers le monde"},META_MASK_MODAL:{ADDRESS_COPIED:"Adresse copiée dans le presse-papiers!",DISCONNECT:"Déconnecter",ACTIVE_NETWORK:"Réseau actif"}},tP={DESKTOP:"שולחן עבודה",MOBILE:"נייד",META_MASK_MOBILE_APP:"אפליקציית מטא מאסק לנייד",SCAN_TO_CONNECT:"סרוק כדי להתחבר ולחתום עם",CONNECT_WITH_EXTENSION:"התחבר עם התוסף של מטא מאסק",INSTALL_MODAL:{TRUSTED_BY_USERS:"מהימנים על ידי למעלה מ-30 מיליון משתמשים לקנות, לאחסן, לשלוח ולהחליף מטבע קריפטוגרפי בבטחה",LEADING_CRYPTO_WALLET:"ארנק הקריפטו המוביל והשער ליישומי בלוקצ'יין המתוכנתים על אתריום, פוליגון, ורשתות רבות נוספות",CONTROL_DIGITAL_INTERACTIONS:"מכניס אותך לשליטה על האינטראקציות הדיגיטליות שלך על ידי הפיכת כוח הקריפטוגרפיה לנגיש יותר",INSTALL_META_MASK_EXTENSION:"התקן את ההרחבה של מטא מאסק"},PENDING_MODAL:{OPEN_META_MASK_SELECT_CODE:"אנא פתח את אפליקציית ארנק מטא מאסק ובחר את הקוד שמופיע על המסך או התנתק",OPEN_META_MASK_CONTINUE:"פתח את האפליקציה של מטא מאסק כדי להמשיך בפעולה שלך.",NUMBER_AFTER_OPEN_NOTICE:"אם מספר אינו מופיע לאחר פתיחת מטא מאסק, אנא לחץ על התנתקות וסרוק מחדש את ה-QRCode.",DISCONNECT:"התנתק"},SELECT_MODAL:{CRYPTO_TAKE_CONTROL_TEXT:"קח שליטה על הקריפטו שלך וחקור את הבלוקצ'יין עם הארנק האמין שבשימוש על ידי למעלה מ-30 מיליון אנשים ברחבי העולם"},META_MASK_MODAL:{ADDRESS_COPIED:"הכתובת הועתקה ללוח!",DISCONNECT:"התנתק",ACTIVE_NETWORK:"רשת פעילה"}},nP={DESKTOP:"Desktop",MOBILE:"Mobile",META_MASK_MOBILE_APP:"App mobile MetaMask",SCAN_TO_CONNECT:"Scansiona per connetterti e firmare con",CONNECT_WITH_EXTENSION:"Connettiti con l'estensione MetaMask",INSTALL_MODAL:{TRUSTED_BY_USERS:"Ritenuto affidabile da oltre 30 milioni di utenti per acquistare, conservare, inviare e scambiare cripto in modo sicuro",LEADING_CRYPTO_WALLET:"Il principale portafoglio cripto e gateway per applicazioni blockchain funzionanti su Ethereum Mainnet, Polygon, Optimism e molte altre reti",CONTROL_DIGITAL_INTERACTIONS:"Ti da il controllo delle tue interazioni digitali rendendo piu' accessibile il potere della crittografia",INSTALL_META_MASK_EXTENSION:"Installa l'estensione MetaMask"},PENDING_MODAL:{OPEN_META_MASK_SELECT_CODE:"Si prega di aprire l'app mobile MetaMask Wallet e selezionare il codice sullo schermo OPPURE scollegarsi",OPEN_META_MASK_CONTINUE:"Apri l'app mobile MetaMask per continuare con la tua sessione.",NUMBER_AFTER_OPEN_NOTICE:"Se, dopo aver aperto MetaMask, non appare alcun numero, si prega di fare clic su disconnetti e ris canzionare il QRCode.",DISCONNECT:"Disconnetti"},SELECT_MODAL:{CRYPTO_TAKE_CONTROL_TEXT:"Prendi il controllo delle tue cripto e esplora la blockchain con il portafoglio ritenuto affidabile da oltre 30 milioni di persone in tutto il mondo"},META_MASK_MODAL:{ADDRESS_COPIED:"Indirizzo copiato negli appunti!",DISCONNECT:"Disconnetti",ACTIVE_NETWORK:"Rete attiva"}},rP={DESKTOP:"Desktop",MOBILE:"Móvel",META_MASK_MOBILE_APP:"Aplicativo móvel MetaMask",SCAN_TO_CONNECT:"Escanear para conectar e assinar com",CONNECT_WITH_EXTENSION:"Conectar com a extensão MetaMask",INSTALL_MODAL:{TRUSTED_BY_USERS:"Confiado por mais de 30 milhões de usuários para comprar, armazenar, enviar e trocar cripto com segurança",LEADING_CRYPTO_WALLET:"A principal carteira de cripto & portal para aplicativos blockchain construídos em Ethereum Mainnet, Polygon, Optimism, e muitas outras redes",CONTROL_DIGITAL_INTERACTIONS:"Coloca você no controle de suas interações digitais, tornando o poder da criptografia mais acessível",INSTALL_META_MASK_EXTENSION:"Instalar a extensão MetaMask"},PENDING_MODAL:{OPEN_META_MASK_SELECT_CODE:"Por favor, abra o aplicativo MetaMask e selecione o código na tela OU desconecte",OPEN_META_MASK_CONTINUE:"Abra o aplicativo MetaMask para continuar sua sessão.",NUMBER_AFTER_OPEN_NOTICE:"Se um número não aparecer após abrir o MetaMask, por favor clique em desconectar e re-escaneie o QRCode.",DISCONNECT:"Desconectar"},SELECT_MODAL:{CRYPTO_TAKE_CONTROL_TEXT:"Assuma o controle de sua cripto e explore a blockchain com a carteira confiada por mais de 30 milhões de pessoas em todo o mundo"},META_MASK_MODAL:{ADDRESS_COPIED:"Endereço copiado para a área de transferência!",DISCONNECT:"Desconectar",ACTIVE_NETWORK:"Rede ativa"}},iP={DESKTOP:"Masaüstü",MOBILE:"Mobil",META_MASK_MOBILE_APP:"MetaMask mobil uygulama",SCAN_TO_CONNECT:"Bağlanmak ve imzalamak için tarayın",CONNECT_WITH_EXTENSION:"MetaMask Eklentisi ile Bağlan",INSTALL_MODAL:{TRUSTED_BY_USERS:"Kriptoyu güvenle satın almak, saklamak, göndermek ve değiştirmek için 30 milyondan fazla kullanıcı tarafından güvenilir",LEADING_CRYPTO_WALLET:"Ethereum Ana Ağı, Polygon, Optimism ve birçok diğer ağda kurulu blockchain uygulamalarına erişim sağlayan öncü kripto cüzdanı",CONTROL_DIGITAL_INTERACTIONS:"Kriptografinin gücünü daha erişilebilir kılarak dijital etkileşimlerinizin kontrolünü size verir",INSTALL_META_MASK_EXTENSION:"MetaMask Eklentisini Yükleyin"},PENDING_MODAL:{OPEN_META_MASK_SELECT_CODE:"Lütfen MetaMask cüzdan uygulamasını açın ve ekrandaki kodu seçin YA DA bağlantıyı kesin",OPEN_META_MASK_CONTINUE:"Oturumunuzla devam etmek için MetaMask uygulamasını açın.",NUMBER_AFTER_OPEN_NOTICE:"MetaMask'ı açtıktan sonra bir numara görünmezse, lütfen bağlantıyı kesin ve QR Kodunu tekrar tarayın.",DISCONNECT:"Bağlantıyı Kes"},SELECT_MODAL:{CRYPTO_TAKE_CONTROL_TEXT:"Kriptonuzu kontrol edin ve dünya genelinde 30 milyondan fazla kişi tarafından güvenilen cüzdanla blockchain'i keşfedin"},META_MASK_MODAL:{ADDRESS_COPIED:"Adres panoya kopyalandı!",DISCONNECT:"Bağlantıyı Kes",ACTIVE_NETWORK:"Aktif Ağ"}};function oP(e){var n,r,i,o,a,s,u,l,c,d,f,h;return _k(this,void 0,void 0,(function*(){const{options:p}=e;p.logging=null!==(n=p.logging)&&void 0!==n?n:{},p.communicationLayerPreference=null!==(r=p.communicationLayerPreference)&&void 0!==r?r:t.CommunicationLayerPreference.SOCKET,void 0!==p.enableDebug&&(IM.enable("MM_SDK"),console.warn("enableDebug is removed. Please use enableAnalytics instead.")),p.enableAnalytics=null===(i=p.enableAnalytics)||void 0===i||i,p.injectProvider=null===(o=p.injectProvider)||void 0===o||o,p.shouldShimWeb3=null===(a=p.shouldShimWeb3)||void 0===a||a,p.extensionOnly=null===(s=p.extensionOnly)||void 0===s||s,p.useDeeplink=null!==(u=p.useDeeplink)&&void 0!==u&&u,p._experimentalDeeplinkProtocol=null!==(l=p._experimentalDeeplinkProtocol)&&void 0!==l&&l,p.storage=null!==(c=p.storage)&&void 0!==c?c:{enabled:!0};const m=!0===(null===(d=p.logging)||void 0===d?void 0:d.developerMode);e.debug=(null===(f=p.logging)||void 0===f?void 0:f.sdk)||m,kx("[MetaMaskSDK: performSDKInitialization()] options",e.options);const g=Object.assign({},p.logging);m&&(g.sdk=!0,g.eciesLayer=!0,g.keyExchangeLayer=!0,g.remoteLayer=!0,g.serviceLayer=!0,g.plaintext=!0),yield function(e){var t,n,r;return _k(this,void 0,void 0,(function*(){const i=null!==(t=e.options.i18nOptions)&&void 0!==t?t:{},o=i.enabled;yield e.i18nInstance.use(QR).init({debug:null!==(n=i.debug)&&void 0!==n&&n,compatibilityJSON:"v3",fallbackLng:"en",interpolation:{escapeValue:!1},resources:o?{en:{translation:XR},es:{translation:JR},it:{translation:nP},fr:{translation:eP},pt:{translation:rP},tr:{translation:iP},he:{translation:tP}}:{en:{translation:XR}},detection:{order:["localStorage","navigator"],lookupLocalStorage:"MetaMaskSDKLng",caches:["localStorage"]}}),e.availableLanguages=Object.keys(null!==(r=e.i18nInstance.services.resourceStore.data)&&void 0!==r?r:{})}))}(e),yield function(e){var t;return _k(this,void 0,void 0,(function*(){const{options:n}=e;e.platformManager=new xT({useDeepLink:null!==(t=n.useDeeplink)&&void 0!==t&&t,preferredOpenLink:n.openDeeplink,debug:e.debug})}))}(e),yield function(e){var t,n,r,i,o,a,s,u,l;return _k(this,void 0,void 0,(function*(){const{options:c}=e,d=null===(t=e.platformManager)||void 0===t?void 0:t.getPlatformType();e.analytics=new cT({serverUrl:null!==(n=c.communicationServerUrl)&&void 0!==n?n:KE,enabled:c.enableAnalytics,originatorInfo:{url:null!==(r=c.dappMetadata.url)&&void 0!==r?r:"",title:null!==(i=c.dappMetadata.name)&&void 0!==i?i:"",dappId:"undefined"==typeof window||void 0===window.location?null!==(u=null!==(a=null===(o=c.dappMetadata)||void 0===o?void 0:o.name)&&void 0!==a?a:null===(s=c.dappMetadata)||void 0===s?void 0:s.url)&&void 0!==u?u:"N/A":window.location.hostname,platform:null!=d?d:"",source:null!==(l=c._source)&&void 0!==l?l:""}})}))}(e),yield function(e){var t;return _k(this,void 0,void 0,(function*(){const{options:n}=e;!0!==(null===(t=n.storage)||void 0===t?void 0:t.enabled)||n.storage.storageManager||(n.storage.storageManager=Gx(n.storage))}))}(e),yield function(e){return _k(this,void 0,void 0,(function*(){const{options:t}=e,n=/^(http|https):\/\/[^\s]*$/;if(t.dappMetadata){t.dappMetadata.iconUrl&&!n.test(t.dappMetadata.iconUrl)&&(console.warn("Invalid dappMetadata.iconUrl: URL must start with http:// or https://"),t.dappMetadata.iconUrl=void 0),t.dappMetadata.base64Icon&&t.dappMetadata.base64Icon.length>fT&&(console.warn("Invalid dappMetadata.base64Icon: Base64-encoded icon string length must be less than 163400 characters"),t.dappMetadata.base64Icon=void 0),t.dappMetadata.url&&!n.test(t.dappMetadata.url)&&console.warn("Invalid dappMetadata.url: URL must start with http:// or https://");const e=dT();if(e&&!t.dappMetadata.iconUrl&&!t.dappMetadata.base64Icon){const n=`${window.location.protocol}//${window.location.host}${e}`;t.dappMetadata.iconUrl=n}}e.dappMetadata=t.dappMetadata}))}(e),yield AR(e),yield TR(e);const{metamaskBrowserExtension:v,preferExtension:b,shouldReturn:y}=yield function(e){var t,n,r,i;return _k(this,void 0,void 0,(function*(){const{options:o}=e;let a,s=!1,u=!1;if("undefined"!=typeof window&&window.ethereum&&!(null===(t=e.platformManager)||void 0===t?void 0:t.isMetaMaskMobileWebView())){s="extension"===localStorage.getItem(Hx);try{a=yield kT({mustBeMetaMask:!0,sdkInstance:e}),window.extension=a,a.on(Vx.CHAIN_CHANGED,(t=>{kx(`[MetaMaskSDK: setupExtensionPreferences()] PROPAGATE chainChanged chainId=${t}`),Boolean(e.sdkProvider)&&e.getMobileProvider().emit(Vx.CHAIN_CHANGED,t)})),a.on(Vx.ACCOUNTS_CHANGED,(t=>{kx(`[MetaMaskSDK: setupExtensionPreferences()] PROPAGATE accountsChanged accounts=${t}`);const n=Boolean(e.sdkProvider),r=Boolean(e.extensionActive);n&&e.getMobileProvider().emit(Vx.ACCOUNTS_CHANGED,t),r&&0===(null==t?void 0:t.length)&&e.terminate().catch((e=>{kx("[MetaMaskSDK: setupExtensionPreferences()] Error terminating",e)}))})),a.on(Vx.DISCONNECT,(t=>{kx(`[MetaMaskSDK: setupExtensionPreferences()] PROPAGATE disconnect error=${t}`),Boolean(e.sdkProvider)&&e.getMobileProvider().emit(Vx.DISCONNECT,t)})),a.on(Vx.CONNECT,(t=>{kx(`[MetaMaskSDK: setupExtensionPreferences()] PROPAGATE connect args=${t}`),Boolean(e.sdkProvider)&&e.getMobileProvider().emit(Vx.CONNECT,t)})),a.on(Vx.CONNECTED,(t=>{kx("[MetaMaskSDK: setupExtensionPreferences()] PROPAGATE connected",t),Boolean(e.sdkProvider)&&e.getMobileProvider().emit(Vx.CONNECTED,t)}))}catch(e){window.extension=void 0}}else(null===(n=e.platformManager)||void 0===n?void 0:n.isMetaMaskMobileWebView())&&(null===(r=e.analytics)||void 0===r||r.send({event:ek.SDK_USE_INAPP_BROWSER}),e.activeProvider=ST({provider:window.ethereum,sdkInstance:e}),e._initialized=!0,u=!0);return a&&o.extensionOnly&&(kx("[MetaMaskSDK: setupExtensionPreferences()] EXTENSION ONLY --- prevent sdk initialization"),null===(i=e.analytics)||void 0===i||i.send({event:ek.SDK_USE_EXTENSION}),e.activeProvider=a,e.extensionActive=!0,e.extension=a,e._initialized=!0,u=!0),{preferExtension:s,shouldReturn:u,metamaskBrowserExtension:a}}))}(e);if(y)kx("[MetaMaskSDK: performSDKInitialization()] shouldReturn=true --- prevent sdk initialization");else{yield function(e,n){var r,i,o,a,s;return _k(this,void 0,void 0,(function*(){const{options:u}=e,l=Object.assign({},u.logging);e.remoteConnection=new xR({i18nInstance:e.i18nInstance,preferDesktop:null!==(r=u.preferDesktop)&&void 0!==r&&r,communicationLayerPreference:null!==(i=u.communicationLayerPreference)&&void 0!==i?i:t.CommunicationLayerPreference.SOCKET,analytics:e.analytics,dappMetadata:u.dappMetadata,_source:u._source,enableAnalytics:null===(o=u.enableAnalytics)||void 0===o||o,timer:u.timer,sdk:e,platformManager:e.platformManager,transports:u.transports,communicationServerUrl:u.communicationServerUrl,storage:null!==(a=u.storage)&&void 0!==a?a:{enabled:!0},getMetaMaskInstaller:()=>{if(!e.installer)throw new Error("Invalid SDK status -- installer not initialized");return e.installer},logging:l,connectWithExtensionProvider:void 0===n?void 0:()=>GA(e),modals:Object.assign(Object.assign({},u.modals),{onPendingModalDisconnect:e.terminate.bind(e)})}),yield e.remoteConnection.initRemoteCommunication({sdkInstance:e}),e.installer=new UT({remote:e.remoteConnection,preferDesktop:null!==(s=u.preferDesktop)&&void 0!==s&&s,platformManager:e.platformManager,debug:e.debug})}))}(e,v),yield oT(e),yield function(e,t){var n,r;return _k(this,void 0,void 0,(function*(){const{options:i}=e;t?(kx("[MetaMaskSDK: handleAutoAndExtensionConnections()] preferExtension is detected -- connect with it."),null===(n=e.analytics)||void 0===n||n.send({event:ek.SDK_EXTENSION_UTILIZED}),GA(e).catch((e=>{console.warn("Can't connect with MetaMask extension...",e),localStorage.removeItem(Hx)}))):i.checkInstallationImmediately&&((null===(r=e.platformManager)||void 0===r?void 0:r.isDesktopWeb())?(kx("[MetaMaskSDK: handleAutoAndExtensionConnections()] checkInstallationImmediately"),e.connect().catch((e=>{kx(`[MetaMaskSDK: handleAutoAndExtensionConnections()] checkInstallationImmediately --- IGNORED --- error on autoconnect _err=${e}`)}))):console.warn("[handleAutoAndExtensionConnections()] checkInstallationImmediately --- IGNORED --- only for web desktop")),e._initialized=!0}))}(e,b);try{yield null===(h=e.remoteConnection)||void 0===h?void 0:h.startConnection({initialCheck:!0})}catch(e){console.error("[MetaMaskSDK: setupRemoteConnectionAndInstaller()] Error while checking installation",e)}e.emit(t.EventType.PROVIDER_UPDATE,t.PROVIDER_UPDATE_TYPE.INITIALIZED)}}))}class aP extends Xx{constructor(e={storage:{enabled:!0},injectProvider:!0,forceInjectProvider:!1,enableAnalytics:!0,shouldShimWeb3:!0,useDeeplink:!0,extensionOnly:!0,dappMetadata:{name:"",url:"",iconUrl:""},_source:KA,i18nOptions:{enabled:!1}}){var t,n,r,i;super(),this.extensionActive=!1,this._initialized=!1,this.sdkInitPromise=void 0,this.debug=!1,this.readonlyRPCCalls=!1,this.i18nInstance=zA(),this.availableLanguages=["en"],IM.disable();const o=!0===(null===(t=e.logging)||void 0===t?void 0:t.developerMode);if(((null===(n=e.logging)||void 0===n?void 0:n.sdk)||o)&&IM.enable("MM_SDK"),kx("[MetaMaskSDK: constructor()]: begin."),this.setMaxListeners(50),!(null===(r=e.dappMetadata)||void 0===r?void 0:r.name)&&!(null===(i=e.dappMetadata)||void 0===i?void 0:i.url)){if("undefined"==typeof window||"undefined"==typeof document)throw new Error("You must provide dAppMetadata option (name and/or url)");e.dappMetadata={url:window.location.href,name:document.title}}this.options=e,this.options._source||(e._source=KA),this.init().then((()=>{kx("[MetaMaskSDK: constructor()]: initialized successfully."),"undefined"!=typeof window&&(window.mmsdk=this)})).catch((e=>{console.error("[MetaMaskSDK: constructor()] error during initialization",e)}))}init(){return _k(this,void 0,void 0,(function*(){return function(e){var t;return _k(this,void 0,void 0,(function*(){if("undefined"!=typeof window&&(null===(t=window.mmsdk)||void 0===t?void 0:t.isInitialized()))return kx("[MetaMaskSDK: initializeMetaMaskSDK()] already initialized"),Promise.resolve(window.mmsdk);if(e._initialized)return kx("[MetaMaskSDK: initializeMetaMaskSDK()] already initialized"),e.sdkInitPromise;if(e.sdkInitPromise)return kx("[MetaMaskSDK: initializeMetaMaskSDK()] already initializing"),e.sdkInitPromise;try{e.sdkInitPromise=oP(e),yield e.sdkInitPromise}catch(e){throw console.error(e),e}return e.sdkInitPromise}))}(this)}))}isExtensionActive(){return this.extensionActive}connect(){return _k(this,void 0,void 0,(function*(){return function(e){return _k(this,void 0,void 0,(function*(){if(e._initialized||(kx("[MetaMaskSDK: connect()] provider not ready -- wait for init()"),yield e.init()),kx(`[MetaMaskSDK: connect()] isExtensionActive=${e.isExtensionActive()} activeProvider`,e.activeProvider),!e.activeProvider)throw new Error("SDK state invalid -- undefined provider");return e.activeProvider.request({method:zx.ETH_REQUESTACCOUNTS,params:[]})}))}(this)}))}connectAndSign({msg:e}){return _k(this,void 0,void 0,(function*(){return function({instance:e,msg:t}){return _k(this,void 0,void 0,(function*(){if(e._initialized||(kx("[MetaMaskSDK: connectAndSign()] provider not ready -- wait for init()"),yield e.init()),kx(`[MetaMaskSDK: connectAndSign()] activeProvider=${e.activeProvider}`),!e.activeProvider)throw new Error("SDK state invalid -- undefined provider");return e.activeProvider.request({method:zx.METAMASK_CONNECTWITH,params:[{method:zx.PERSONAL_SIGN,params:[t]}]})}))}({instance:this,msg:e})}))}connectWith(e){return _k(this,void 0,void 0,(function*(){return function({instance:e,rpc:t}){return _k(this,void 0,void 0,(function*(){if(e._initialized||(kx("[MetaMaskSDK: connectWith()] provider not ready -- wait for init()"),yield e.init()),kx(`[MetaMaskSDK: connectWith()] method: ${t.method} rpc=${t}`),!e.activeProvider)throw new Error("SDK state invalid -- undefined provider");return e.activeProvider.request({method:zx.METAMASK_CONNECTWITH,params:[t]})}))}({instance:this,rpc:e})}))}resume(){return function(e){var t,n,r;return _k(this,void 0,void 0,(function*(){if(!(null===(n=null===(t=e.remoteConnection)||void 0===t?void 0:t.getConnector())||void 0===n?void 0:n.isReady()))return kx("[MetaMaskSDK: resume()] channel is not ready -- starting connection"),void(null===(r=e.remoteConnection)||void 0===r||r.startConnection());kx("[MetaMaskSDK: resume()] channel is ready")}))}(this)}disconnect(){return console.warn("MetaMaskSDK.disconnect() is deprecated, use terminate()"),this.terminate()}isAuthorized(){var e;null===(e=this.remoteConnection)||void 0===e||e.isAuthorized()}terminate(){return function(e){var n,r,i;return _k(this,void 0,void 0,(function*(){if(!(null===(n=e.platformManager)||void 0===n?void 0:n.isMetaMaskMobileWebView())){if(YA&&(window.localStorage.removeItem(Hx),window.localStorage.removeItem($x),window.localStorage.removeItem(Wx)),e.extensionActive){try{yield null===(r=e.activeProvider)||void 0===r?void 0:r.request({method:zx.WALLET_REVOKEPERMISSIONS,params:[{eth_accounts:{}}]})}catch(e){kx("[MetaMaskSDK: terminate()] error revoking permissions",e)}return e.options.extensionOnly?void kx("[MetaMaskSDK: terminate()] extensionOnly --- prevent switching providers"):(e.activeProvider=e.sdkProvider,window.ethereum=e.activeProvider,e.extensionActive=!1,void e.emit(t.EventType.PROVIDER_UPDATE,t.PROVIDER_UPDATE_TYPE.TERMINATE))}e.emit(t.EventType.PROVIDER_UPDATE,t.PROVIDER_UPDATE_TYPE.TERMINATE),kx(`[MetaMaskSDK: terminate()] remoteConnection=${e.remoteConnection}`),null===(i=e.remoteConnection)||void 0===i||i.disconnect({terminate:!0,sendMessage:!0})}}))}(this)}isInitialized(){return this._initialized}setReadOnlyRPCCalls(e){this.readonlyRPCCalls=e}hasReadOnlyRPCCalls(){return this.readonlyRPCCalls}getProvider(){if(this.activeProvider)return this.activeProvider;console.warn("MetaMaskSDK: No active provider found")}getMobileProvider(){if(!this.sdkProvider)throw new Error("SDK state invalid -- undefined mobile provider");return this.sdkProvider}getUniversalLink(){var e;const t=null===(e=this.remoteConnection)||void 0===e?void 0:e.getUniversalLink();if(!t)throw new Error("No Universal Link available, please call eth_requestAccounts first.");return t}getChannelId(){var e,t;return null===(t=null===(e=this.remoteConnection)||void 0===e?void 0:e.getChannelConfig())||void 0===t?void 0:t.channelId}getRPCHistory(){var e,t;return null===(t=null===(e=this.remoteConnection)||void 0===e?void 0:e.getConnector())||void 0===t?void 0:t.getRPCMethodTracker()}getVersion(){return FA.version}getWalletStatus(){var e,t;return null===(t=null===(e=this.remoteConnection)||void 0===e?void 0:e.getConnector())||void 0===t?void 0:t.getConnectionStatus()}_getChannelConfig(){var e;return null===(e=this.remoteConnection)||void 0===e?void 0:e.getChannelConfig()}_ping(){var e,t;null===(t=null===(e=this.remoteConnection)||void 0===e?void 0:e.getConnector())||void 0===t||t.ping()}_keyCheck(){var e,t;null===(t=null===(e=this.remoteConnection)||void 0===e?void 0:e.getConnector())||void 0===t||t.keyCheck()}_getServiceStatus(){var e,t;return null===(t=null===(e=this.remoteConnection)||void 0===e?void 0:e.getConnector())||void 0===t?void 0:t.getServiceStatus()}_getRemoteConnection(){return this.remoteConnection}_getDappMetadata(){return this.dappMetadata}_getKeyInfo(){var e;return null===(e=this.remoteConnection)||void 0===e?void 0:e.getKeyInfo()}_resetKeys(){var e,t;null===(t=null===(e=this.remoteConnection)||void 0===e?void 0:e.getConnector())||void 0===t||t.resetKeys()}_getConnection(){return this.remoteConnection}}t.DEFAULT_SERVER_URL=KE,t.MetaMaskSDK=aP,t.SDKProvider=Zx,t.default=aP,Object.defineProperty(t,"__esModule",{value:!0})}(r.exports);export{i as default};
|