@imtbl/sdk 1.30.1-alpha.1 → 1.30.2
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/blockchain_data.js +2 -2
- package/dist/browser/checkout/{BridgeWidget-8aeecc8a.js → BridgeWidget-3a91dd4a.js} +1 -1
- package/dist/browser/checkout/{HorizontalMenu-6f805a0a.js → HorizontalMenu-5b788c13.js} +1 -1
- package/dist/browser/checkout/{OnRampWidget-e2d024b4.js → OnRampWidget-34004912.js} +1 -1
- package/dist/browser/checkout/{SaleWidget-95845350.js → SaleWidget-c080a8c0.js} +1 -1
- package/dist/browser/checkout/{SpendingCapHero-3f8779b4.js → SpendingCapHero-e2f0a5ae.js} +1 -1
- package/dist/browser/checkout/{SwapWidget-d03eff6e.js → SwapWidget-66cfc7f6.js} +1 -1
- package/dist/browser/checkout/{TopUpView-68d487f1.js → TopUpView-b411750b.js} +1 -1
- package/dist/browser/checkout/{WalletWidget-ea630464.js → WalletWidget-ba2c64bd.js} +1 -1
- package/dist/browser/checkout/{auto-track-5d58c0ca.js → auto-track-14d9b5c6.js} +1 -1
- package/dist/browser/checkout/{balance-debfa1d2.js → balance-d666ee5b.js} +1 -1
- package/dist/browser/checkout/index-48ca0d60.js +1 -0
- package/dist/browser/checkout/{index-57c60fe3.js → index-4d3759b8.js} +1 -1
- package/dist/browser/checkout/{index-1c9e791f.js → index-4edd9b1a.js} +1 -1
- package/dist/browser/checkout/{index-c4d53e04.js → index-6e43efe0.js} +1 -1
- package/dist/browser/checkout/{index-72bd75f0.js → index-76d4a18f.js} +1 -1
- package/dist/browser/checkout/{index-f20bd771.js → index-80e29a5a.js} +1 -1
- package/dist/browser/checkout/{index-e849efd2.js → index-c162016d.js} +2 -2
- package/dist/browser/checkout/{index-f9ab7f0a.js → index-c3ac2c1c.js} +1 -1
- package/dist/browser/checkout/{index.umd-a1bc7d1d.js → index.umd-9fd423ee.js} +1 -1
- package/dist/browser/checkout/{retry-8f3668c1.js → retry-1145551a.js} +1 -1
- package/dist/browser/checkout/sdk.js +4 -4
- package/dist/browser/checkout/widgets-esm.js +1 -1
- package/dist/browser/checkout/widgets.js +1 -1
- package/dist/checkout.js +4 -4
- package/dist/config.js +1 -1
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.js +7 -7
- package/dist/orderbook.js +1 -1
- package/dist/passport.js +4 -4
- package/dist/x.js +3 -3
- package/package.json +1 -1
- package/dist/browser/checkout/index-76e905c6.js +0 -1
|
@@ -89,7 +89,7 @@ function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=i.create([0,1,2,
|
|
|
89
89
|
* LICENSE file in the root directory of this source tree.
|
|
90
90
|
*/function Dve(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 Lve=new Set,Fve={};function Bve(e,t){jve(e,t),jve(e+"Capture",t)}function jve(e,t){for(Fve[e]=t,e=0;e<t.length;e++)Lve.add(t[e])}var Uve=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),zve=Object.prototype.hasOwnProperty,Hve=/^[: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]*$/,Wve={},Vve={};function Gve(e,t,n,r,i,a,o){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=a,this.removeEmptyString=o}var qve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){qve[e]=new Gve(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];qve[t]=new Gve(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){qve[e]=new Gve(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){qve[e]=new Gve(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){qve[e]=new Gve(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){qve[e]=new Gve(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){qve[e]=new Gve(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){qve[e]=new Gve(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){qve[e]=new Gve(e,5,!1,e.toLowerCase(),null,!1,!1)}));var Kve=/[\-:]([a-z])/g;function Xve(e){return e[1].toUpperCase()}function Yve(e,t,n,r){var i=qve.hasOwnProperty(t)?qve[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!!zve.call(Vve,e)||!zve.call(Wve,e)&&(Hve.test(e)?Vve[e]=!0:(Wve[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(Kve,Xve);qve[t]=new Gve(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(Kve,Xve);qve[t]=new Gve(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(Kve,Xve);qve[t]=new Gve(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){qve[e]=new Gve(e,1,!1,e.toLowerCase(),null,!1,!1)})),qve.xlinkHref=new Gve("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){qve[e]=new Gve(e,1,!1,e.toLowerCase(),null,!0,!0)}));var Jve=Nve.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Zve=Symbol.for("react.element"),Qve=Symbol.for("react.portal"),$ve=Symbol.for("react.fragment"),ewe=Symbol.for("react.strict_mode"),twe=Symbol.for("react.profiler"),nwe=Symbol.for("react.provider"),rwe=Symbol.for("react.context"),iwe=Symbol.for("react.forward_ref"),awe=Symbol.for("react.suspense"),owe=Symbol.for("react.suspense_list"),swe=Symbol.for("react.memo"),cwe=Symbol.for("react.lazy"),uwe=Symbol.for("react.offscreen"),lwe=Symbol.iterator;function dwe(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=lwe&&e[lwe]||e["@@iterator"])?e:null}var fwe,pwe=Object.assign;function hwe(e){if(void 0===fwe)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fwe=t&&t[1]||""}return"\n"+fwe+e}var mwe=!1;function ywe(e,t){if(!e||mwe)return"";mwe=!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"),a=r.stack.split("\n"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||i[o]!==a[s]){var c="\n"+i[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=o&&0<=s);break}}}finally{mwe=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?hwe(e):""}function bwe(e){switch(e.tag){case 5:return hwe(e.type);case 16:return hwe("Lazy");case 13:return hwe("Suspense");case 19:return hwe("SuspenseList");case 0:case 2:case 15:return e=ywe(e.type,!1);case 11:return e=ywe(e.type.render,!1);case 1:return e=ywe(e.type,!0);default:return""}}function gwe(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 $ve:return"Fragment";case Qve:return"Portal";case twe:return"Profiler";case ewe:return"StrictMode";case awe:return"Suspense";case owe:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case rwe:return(e.displayName||"Context")+".Consumer";case nwe:return(e._context.displayName||"Context")+".Provider";case iwe:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case swe:return null!==(t=e.displayName||null)?t:gwe(e.type)||"Memo";case cwe:t=e._payload,e=e._init;try{return gwe(e(t))}catch(e){}}return null}function vwe(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 gwe(t);case 8:return t===ewe?"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 wwe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Twe(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Ewe(e){e._valueTracker||(e._valueTracker=function(e){var t=Twe(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,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.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 Awe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Twe(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function xwe(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 Owe(e,t){var n=t.checked;return pwe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Cwe(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=wwe(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 Iwe(e,t){null!=(t=t.checked)&&Yve(e,"checked",t,!1)}function Swe(e,t){Iwe(e,t);var n=wwe(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")?Pwe(e,t.type,n):t.hasOwnProperty("defaultValue")&&Pwe(e,t.type,wwe(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function _we(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 Pwe(e,t,n){"number"===t&&xwe(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var kwe=Array.isArray;function Rwe(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=""+wwe(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 Nwe(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(Dve(91));return pwe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Mwe(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(Dve(92));if(kwe(n)){if(1<n.length)throw Error(Dve(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:wwe(n)}}function Dwe(e,t){var n=wwe(t.value),r=wwe(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 Lwe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Fwe(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 Bwe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Fwe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var jwe,Uwe=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((jwe=jwe||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=jwe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function zwe(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 Hwe={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},Wwe=["Webkit","ms","Moz","O"];function Vwe(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Hwe.hasOwnProperty(e)&&Hwe[e]?(""+t).trim():t+"px"}function Gwe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=Vwe(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(Hwe).forEach((function(e){Wwe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Hwe[t]=Hwe[e]}))}));var qwe=pwe({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 Kwe(e,t){if(t){if(qwe[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(Dve(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(Dve(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(Dve(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(Dve(62))}}function Xwe(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 Ywe=null;function Jwe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Zwe=null,Qwe=null,$we=null;function eTe(e){if(e=Kxe(e)){if("function"!=typeof Zwe)throw Error(Dve(280));var t=e.stateNode;t&&(t=Yxe(t),Zwe(e.stateNode,e.type,t))}}function tTe(e){Qwe?$we?$we.push(e):$we=[e]:Qwe=e}function nTe(){if(Qwe){var e=Qwe,t=$we;if($we=Qwe=null,eTe(e),t)for(e=0;e<t.length;e++)eTe(t[e])}}function rTe(e,t){return e(t)}function iTe(){}var aTe=!1;function oTe(e,t,n){if(aTe)return e(t,n);aTe=!0;try{return rTe(e,t,n)}finally{aTe=!1,(null!==Qwe||null!==$we)&&(iTe(),nTe())}}function sTe(e,t){var n=e.stateNode;if(null===n)return null;var r=Yxe(n);if(null===r)return null;n=r[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":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(Dve(231,t,typeof n));return n}var cTe=!1;if(Uve)try{var uTe={};Object.defineProperty(uTe,"passive",{get:function(){cTe=!0}}),window.addEventListener("test",uTe,uTe),window.removeEventListener("test",uTe,uTe)}catch(K8e){cTe=!1}function lTe(e,t,n,r,i,a,o,s,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var dTe=!1,fTe=null,pTe=!1,hTe=null,mTe={onError:function(e){dTe=!0,fTe=e}};function yTe(e,t,n,r,i,a,o,s,c){dTe=!1,fTe=null,lTe.apply(mTe,arguments)}function bTe(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 gTe(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 vTe(e){if(bTe(e)!==e)throw Error(Dve(188))}function wTe(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=bTe(e)))throw Error(Dve(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return vTe(i),e;if(a===r)return vTe(i),t;a=a.sibling}throw Error(Dve(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,s=i.child;s;){if(s===n){o=!0,n=i,r=a;break}if(s===r){o=!0,r=i,n=a;break}s=s.sibling}if(!o){for(s=a.child;s;){if(s===n){o=!0,n=a,r=i;break}if(s===r){o=!0,r=a,n=i;break}s=s.sibling}if(!o)throw Error(Dve(189))}}if(n.alternate!==r)throw Error(Dve(190))}if(3!==n.tag)throw Error(Dve(188));return n.stateNode.current===n?e:t}(e),null!==e?TTe(e):null}function TTe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=TTe(e);if(null!==t)return t;e=e.sibling}return null}var ETe=Mve.unstable_scheduleCallback,ATe=Mve.unstable_cancelCallback,xTe=Mve.unstable_shouldYield,OTe=Mve.unstable_requestPaint,CTe=Mve.unstable_now,ITe=Mve.unstable_getCurrentPriorityLevel,STe=Mve.unstable_ImmediatePriority,_Te=Mve.unstable_UserBlockingPriority,PTe=Mve.unstable_NormalPriority,kTe=Mve.unstable_LowPriority,RTe=Mve.unstable_IdlePriority,NTe=null,MTe=null;var DTe=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(LTe(e)/FTe|0)|0},LTe=Math.log,FTe=Math.LN2;var BTe=64,jTe=4194304;function UTe(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 zTe(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=268435455&n;if(0!==o){var s=o&~i;0!==s?r=UTe(s):0!==(a&=o)&&(r=UTe(a))}else 0!==(o=n&~i)?r=UTe(o):0!==a&&(r=UTe(a));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&0!=(4194240&a)))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-DTe(t)),r|=e[n],t&=~i;return r}function HTe(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 WTe(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function VTe(){var e=BTe;return 0==(4194240&(BTe<<=1))&&(BTe=64),e}function GTe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qTe(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-DTe(t)]=n}function KTe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-DTe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var XTe=0;function YTe(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var JTe,ZTe,QTe,$Te,eEe,tEe=!1,nEe=[],rEe=null,iEe=null,aEe=null,oEe=new Map,sEe=new Map,cEe=[],uEe="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 lEe(e,t){switch(e){case"focusin":case"focusout":rEe=null;break;case"dragenter":case"dragleave":iEe=null;break;case"mouseover":case"mouseout":aEe=null;break;case"pointerover":case"pointerout":oEe.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":sEe.delete(t.pointerId)}}function dEe(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&(null!==(t=Kxe(t))&&ZTe(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function fEe(e){var t=qxe(e.target);if(null!==t){var n=bTe(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=gTe(n)))return e.blockedOn=t,void eEe(e.priority,(function(){QTe(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 pEe(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=xEe(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Kxe(n))&&ZTe(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Ywe=r,n.target.dispatchEvent(r),Ywe=null,t.shift()}return!0}function hEe(e,t,n){pEe(e)&&n.delete(t)}function mEe(){tEe=!1,null!==rEe&&pEe(rEe)&&(rEe=null),null!==iEe&&pEe(iEe)&&(iEe=null),null!==aEe&&pEe(aEe)&&(aEe=null),oEe.forEach(hEe),sEe.forEach(hEe)}function yEe(e,t){e.blockedOn===t&&(e.blockedOn=null,tEe||(tEe=!0,Mve.unstable_scheduleCallback(Mve.unstable_NormalPriority,mEe)))}function bEe(e){function t(t){return yEe(t,e)}if(0<nEe.length){yEe(nEe[0],e);for(var n=1;n<nEe.length;n++){var r=nEe[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==rEe&&yEe(rEe,e),null!==iEe&&yEe(iEe,e),null!==aEe&&yEe(aEe,e),oEe.forEach(t),sEe.forEach(t),n=0;n<cEe.length;n++)(r=cEe[n]).blockedOn===e&&(r.blockedOn=null);for(;0<cEe.length&&null===(n=cEe[0]).blockedOn;)fEe(n),null===n.blockedOn&&cEe.shift()}var gEe=Jve.ReactCurrentBatchConfig,vEe=!0;function wEe(e,t,n,r){var i=XTe,a=gEe.transition;gEe.transition=null;try{XTe=1,EEe(e,t,n,r)}finally{XTe=i,gEe.transition=a}}function TEe(e,t,n,r){var i=XTe,a=gEe.transition;gEe.transition=null;try{XTe=4,EEe(e,t,n,r)}finally{XTe=i,gEe.transition=a}}function EEe(e,t,n,r){if(vEe){var i=xEe(e,t,n,r);if(null===i)gxe(e,t,r,AEe,n),lEe(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return rEe=dEe(rEe,e,t,n,r,i),!0;case"dragenter":return iEe=dEe(iEe,e,t,n,r,i),!0;case"mouseover":return aEe=dEe(aEe,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return oEe.set(a,dEe(oEe.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,sEe.set(a,dEe(sEe.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(lEe(e,r),4&t&&-1<uEe.indexOf(e)){for(;null!==i;){var a=Kxe(i);if(null!==a&&JTe(a),null===(a=xEe(e,t,n,r))&&gxe(e,t,r,AEe,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else gxe(e,t,r,null,n)}}var AEe=null;function xEe(e,t,n,r){if(AEe=null,null!==(e=qxe(e=Jwe(r))))if(null===(t=bTe(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=gTe(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 AEe=e,null}function OEe(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(ITe()){case STe:return 1;case _Te:return 4;case PTe:case kTe:return 16;case RTe:return 536870912;default:return 16}default:return 16}}var CEe=null,IEe=null,SEe=null;function _Ee(){if(SEe)return SEe;var e,t,n=IEe,r=n.length,i="value"in CEe?CEe.value:CEe.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return SEe=i.slice(e,1<t?1-t:void 0)}function PEe(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 kEe(){return!0}function REe(){return!1}function NEe(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?kEe:REe,this.isPropagationStopped=REe,this}return pwe(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=kEe)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=kEe)},persist:function(){},isPersistent:kEe}),t}var MEe,DEe,LEe,FEe={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},BEe=NEe(FEe),jEe=pwe({},FEe,{view:0,detail:0}),UEe=NEe(jEe),zEe=pwe({},jEe,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$Ee,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!==LEe&&(LEe&&"mousemove"===e.type?(MEe=e.screenX-LEe.screenX,DEe=e.screenY-LEe.screenY):DEe=MEe=0,LEe=e),MEe)},movementY:function(e){return"movementY"in e?e.movementY:DEe}}),HEe=NEe(zEe),WEe=NEe(pwe({},zEe,{dataTransfer:0})),VEe=NEe(pwe({},jEe,{relatedTarget:0})),GEe=NEe(pwe({},FEe,{animationName:0,elapsedTime:0,pseudoElement:0})),qEe=pwe({},FEe,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),KEe=NEe(qEe),XEe=NEe(pwe({},FEe,{data:0})),YEe={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},JEe={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"},ZEe={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function QEe(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=ZEe[e])&&!!t[e]}function $Ee(){return QEe}var eAe=pwe({},jEe,{key:function(e){if(e.key){var t=YEe[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=PEe(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?JEe[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$Ee,charCode:function(e){return"keypress"===e.type?PEe(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?PEe(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),tAe=NEe(eAe),nAe=NEe(pwe({},zEe,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),rAe=NEe(pwe({},jEe,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$Ee})),iAe=NEe(pwe({},FEe,{propertyName:0,elapsedTime:0,pseudoElement:0})),aAe=pwe({},zEe,{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}),oAe=NEe(aAe),sAe=[9,13,27,32],cAe=Uve&&"CompositionEvent"in window,uAe=null;Uve&&"documentMode"in document&&(uAe=document.documentMode);var lAe=Uve&&"TextEvent"in window&&!uAe,dAe=Uve&&(!cAe||uAe&&8<uAe&&11>=uAe),fAe=String.fromCharCode(32),pAe=!1;function hAe(e,t){switch(e){case"keyup":return-1!==sAe.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mAe(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var yAe=!1;var bAe={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 gAe(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!bAe[e.type]:"textarea"===t}function vAe(e,t,n,r){tTe(r),0<(t=wxe(t,"onChange")).length&&(n=new BEe("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var wAe=null,TAe=null;function EAe(e){fxe(e,0)}function AAe(e){if(Awe(Xxe(e)))return e}function xAe(e,t){if("change"===e)return t}var OAe=!1;if(Uve){var CAe;if(Uve){var IAe="oninput"in document;if(!IAe){var SAe=document.createElement("div");SAe.setAttribute("oninput","return;"),IAe="function"==typeof SAe.oninput}CAe=IAe}else CAe=!1;OAe=CAe&&(!document.documentMode||9<document.documentMode)}function _Ae(){wAe&&(wAe.detachEvent("onpropertychange",PAe),TAe=wAe=null)}function PAe(e){if("value"===e.propertyName&&AAe(TAe)){var t=[];vAe(t,TAe,e,Jwe(e)),oTe(EAe,t)}}function kAe(e,t,n){"focusin"===e?(_Ae(),TAe=n,(wAe=t).attachEvent("onpropertychange",PAe)):"focusout"===e&&_Ae()}function RAe(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return AAe(TAe)}function NAe(e,t){if("click"===e)return AAe(t)}function MAe(e,t){if("input"===e||"change"===e)return AAe(t)}var DAe="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function LAe(e,t){if(DAe(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(!zve.call(t,i)||!DAe(e[i],t[i]))return!1}return!0}function FAe(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function BAe(e,t){var n,r=FAe(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=FAe(r)}}function jAe(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?jAe(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function UAe(){for(var e=window,t=xwe();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=xwe((e=t.contentWindow).document)}return t}function zAe(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 HAe(e){var t=UAe(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&jAe(n.ownerDocument.documentElement,n)){if(null!==r&&zAe(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,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=BAe(n,a);var o=BAe(n,r);i&&o&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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 WAe=Uve&&"documentMode"in document&&11>=document.documentMode,VAe=null,GAe=null,qAe=null,KAe=!1;function XAe(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;KAe||null==VAe||VAe!==xwe(r)||("selectionStart"in(r=VAe)&&zAe(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},qAe&&LAe(qAe,r)||(qAe=r,0<(r=wxe(GAe,"onSelect")).length&&(t=new BEe("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=VAe)))}function YAe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var JAe={animationend:YAe("Animation","AnimationEnd"),animationiteration:YAe("Animation","AnimationIteration"),animationstart:YAe("Animation","AnimationStart"),transitionend:YAe("Transition","TransitionEnd")},ZAe={},QAe={};function $Ae(e){if(ZAe[e])return ZAe[e];if(!JAe[e])return e;var t,n=JAe[e];for(t in n)if(n.hasOwnProperty(t)&&t in QAe)return ZAe[e]=n[t];return e}Uve&&(QAe=document.createElement("div").style,"AnimationEvent"in window||(delete JAe.animationend.animation,delete JAe.animationiteration.animation,delete JAe.animationstart.animation),"TransitionEvent"in window||delete JAe.transitionend.transition);var exe=$Ae("animationend"),txe=$Ae("animationiteration"),nxe=$Ae("animationstart"),rxe=$Ae("transitionend"),ixe=new Map,axe="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 oxe(e,t){ixe.set(e,t),Bve(t,[e])}for(var sxe=0;sxe<axe.length;sxe++){var cxe=axe[sxe];oxe(cxe.toLowerCase(),"on"+(cxe[0].toUpperCase()+cxe.slice(1)))}oxe(exe,"onAnimationEnd"),oxe(txe,"onAnimationIteration"),oxe(nxe,"onAnimationStart"),oxe("dblclick","onDoubleClick"),oxe("focusin","onFocus"),oxe("focusout","onBlur"),oxe(rxe,"onTransitionEnd"),jve("onMouseEnter",["mouseout","mouseover"]),jve("onMouseLeave",["mouseout","mouseover"]),jve("onPointerEnter",["pointerout","pointerover"]),jve("onPointerLeave",["pointerout","pointerover"]),Bve("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Bve("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Bve("onBeforeInput",["compositionend","keypress","textInput","paste"]),Bve("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Bve("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Bve("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var uxe="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(" "),lxe=new Set("cancel close invalid load scroll toggle".split(" ").concat(uxe));function dxe(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,o,s,c){if(yTe.apply(this,arguments),dTe){if(!dTe)throw Error(Dve(198));var u=fTe;dTe=!1,fTe=null,pTe||(pTe=!0,hTe=u)}}(r,t,void 0,e),e.currentTarget=null}function fxe(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 a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,u=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break e;dxe(i,s,u),a=c}else for(o=0;o<r.length;o++){if(c=(s=r[o]).instance,u=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break e;dxe(i,s,u),a=c}}}if(pTe)throw e=hTe,pTe=!1,hTe=null,e}function pxe(e,t){var n=t[Wxe];void 0===n&&(n=t[Wxe]=new Set);var r=e+"__bubble";n.has(r)||(bxe(t,e,2,!1),n.add(r))}function hxe(e,t,n){var r=0;t&&(r|=4),bxe(n,e,r,t)}var mxe="_reactListening"+Math.random().toString(36).slice(2);function yxe(e){if(!e[mxe]){e[mxe]=!0,Lve.forEach((function(t){"selectionchange"!==t&&(lxe.has(t)||hxe(t,!1,e),hxe(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[mxe]||(t[mxe]=!0,hxe("selectionchange",!1,t))}}function bxe(e,t,n,r){switch(OEe(t)){case 1:var i=wEe;break;case 4:i=TEe;break;default:i=EEe}n=i.bind(null,t,n,e),i=void 0,!cTe||"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 gxe(e,t,n,r,i){var a=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var c=o.tag;if((3===c||4===c)&&((c=o.stateNode.containerInfo)===i||8===c.nodeType&&c.parentNode===i))return;o=o.return}for(;null!==s;){if(null===(o=qxe(s)))return;if(5===(c=o.tag)||6===c){r=a=o;continue e}s=s.parentNode}}r=r.return}oTe((function(){var r=a,i=Jwe(n),o=[];e:{var s=ixe.get(e);if(void 0!==s){var c=BEe,u=e;switch(e){case"keypress":if(0===PEe(n))break e;case"keydown":case"keyup":c=tAe;break;case"focusin":u="focus",c=VEe;break;case"focusout":u="blur",c=VEe;break;case"beforeblur":case"afterblur":c=VEe;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":c=HEe;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=WEe;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=rAe;break;case exe:case txe:case nxe:c=GEe;break;case rxe:c=iAe;break;case"scroll":c=UEe;break;case"wheel":c=oAe;break;case"copy":case"cut":case"paste":c=KEe;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=nAe}var l=0!=(4&t),d=!l&&"scroll"===e,f=l?null!==s?s+"Capture":null:s;l=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=sTe(h,f))&&l.push(vxe(h,m,p)))),d)break;h=h.return}0<l.length&&(s=new c(s,u,null,n,i),o.push({event:s,listeners:l}))}}if(0==(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===Ywe||!(u=n.relatedTarget||n.fromElement)||!qxe(u)&&!u[Hxe])&&(c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(c=r,null!==(u=(u=n.relatedTarget||n.toElement)?qxe(u):null)&&(u!==(d=bTe(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(c=null,u=r),c!==u)){if(l=HEe,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(l=nAe,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==c?s:Xxe(c),p=null==u?s:Xxe(u),(s=new l(m,h+"leave",c,n,i)).target=d,s.relatedTarget=p,m=null,qxe(i)===r&&((l=new l(f,h+"enter",u,n,i)).target=p,l.relatedTarget=d,m=l),d=m,c&&u)e:{for(f=u,h=0,p=l=c;p;p=Txe(p))h++;for(p=0,m=f;m;m=Txe(m))p++;for(;0<h-p;)l=Txe(l),h--;for(;0<p-h;)f=Txe(f),p--;for(;h--;){if(l===f||null!==f&&l===f.alternate)break e;l=Txe(l),f=Txe(f)}l=null}else l=null;null!==c&&Exe(o,s,c,l,!1),null!==u&&null!==d&&Exe(o,d,u,l,!0)}if("select"===(c=(s=r?Xxe(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===c&&"file"===s.type)var y=xAe;else if(gAe(s))if(OAe)y=MAe;else{y=RAe;var b=kAe}else(c=s.nodeName)&&"input"===c.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(y=NAe);switch(y&&(y=y(e,r))?vAe(o,y,n,i):(b&&b(e,s,r),"focusout"===e&&(b=s._wrapperState)&&b.controlled&&"number"===s.type&&Pwe(s,"number",s.value)),b=r?Xxe(r):window,e){case"focusin":(gAe(b)||"true"===b.contentEditable)&&(VAe=b,GAe=r,qAe=null);break;case"focusout":qAe=GAe=VAe=null;break;case"mousedown":KAe=!0;break;case"contextmenu":case"mouseup":case"dragend":KAe=!1,XAe(o,n,i);break;case"selectionchange":if(WAe)break;case"keydown":case"keyup":XAe(o,n,i)}var g;if(cAe)e:{switch(e){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else yAe?hAe(e,n)&&(v="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(v="onCompositionStart");v&&(dAe&&"ko"!==n.locale&&(yAe||"onCompositionStart"!==v?"onCompositionEnd"===v&&yAe&&(g=_Ee()):(IEe="value"in(CEe=i)?CEe.value:CEe.textContent,yAe=!0)),0<(b=wxe(r,v)).length&&(v=new XEe(v,e,null,n,i),o.push({event:v,listeners:b}),g?v.data=g:null!==(g=mAe(n))&&(v.data=g))),(g=lAe?function(e,t){switch(e){case"compositionend":return mAe(t);case"keypress":return 32!==t.which?null:(pAe=!0,fAe);case"textInput":return(e=t.data)===fAe&&pAe?null:e;default:return null}}(e,n):function(e,t){if(yAe)return"compositionend"===e||!cAe&&hAe(e,t)?(e=_Ee(),SEe=IEe=CEe=null,yAe=!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 dAe&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=wxe(r,"onBeforeInput")).length&&(i=new XEe("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=g))}fxe(o,t)}))}function vxe(e,t,n){return{instance:e,listener:t,currentTarget:n}}function wxe(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5===i.tag&&null!==a&&(i=a,null!=(a=sTe(e,n))&&r.unshift(vxe(e,a,i)),null!=(a=sTe(e,t))&&r.push(vxe(e,a,i))),e=e.return}return r}function Txe(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Exe(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var s=n,c=s.alternate,u=s.stateNode;if(null!==c&&c===r)break;5===s.tag&&null!==u&&(s=u,i?null!=(c=sTe(n,a))&&o.unshift(vxe(n,c,s)):i||null!=(c=sTe(n,a))&&o.push(vxe(n,c,s))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var Axe=/\r\n?/g,xxe=/\u0000|\uFFFD/g;function Oxe(e){return("string"==typeof e?e:""+e).replace(Axe,"\n").replace(xxe,"")}function Cxe(e,t,n){if(t=Oxe(t),Oxe(e)!==t&&n)throw Error(Dve(425))}function Ixe(){}var Sxe=null,_xe=null;function Pxe(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 kxe="function"==typeof setTimeout?setTimeout:void 0,Rxe="function"==typeof clearTimeout?clearTimeout:void 0,Nxe="function"==typeof Promise?Promise:void 0,Mxe="function"==typeof queueMicrotask?queueMicrotask:void 0!==Nxe?function(e){return Nxe.resolve(null).then(e).catch(Dxe)}:kxe;function Dxe(e){setTimeout((function(){throw e}))}function Lxe(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 bEe(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);bEe(t)}function Fxe(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 Bxe(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 jxe=Math.random().toString(36).slice(2),Uxe="__reactFiber$"+jxe,zxe="__reactProps$"+jxe,Hxe="__reactContainer$"+jxe,Wxe="__reactEvents$"+jxe,Vxe="__reactListeners$"+jxe,Gxe="__reactHandles$"+jxe;function qxe(e){var t=e[Uxe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Hxe]||n[Uxe]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Bxe(e);null!==e;){if(n=e[Uxe])return n;e=Bxe(e)}return t}n=(e=n).parentNode}return null}function Kxe(e){return!(e=e[Uxe]||e[Hxe])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Xxe(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(Dve(33))}function Yxe(e){return e[zxe]||null}var Jxe=[],Zxe=-1;function Qxe(e){return{current:e}}function $xe(e){0>Zxe||(e.current=Jxe[Zxe],Jxe[Zxe]=null,Zxe--)}function eOe(e,t){Zxe++,Jxe[Zxe]=e.current,e.current=t}var tOe={},nOe=Qxe(tOe),rOe=Qxe(!1),iOe=tOe;function aOe(e,t){var n=e.type.contextTypes;if(!n)return tOe;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function oOe(e){return null!=(e=e.childContextTypes)}function sOe(){$xe(rOe),$xe(nOe)}function cOe(e,t,n){if(nOe.current!==tOe)throw Error(Dve(168));eOe(nOe,t),eOe(rOe,n)}function uOe(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(Dve(108,vwe(e)||"Unknown",i));return pwe({},n,r)}function lOe(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||tOe,iOe=nOe.current,eOe(nOe,e),eOe(rOe,rOe.current),!0}function dOe(e,t,n){var r=e.stateNode;if(!r)throw Error(Dve(169));n?(e=uOe(e,t,iOe),r.__reactInternalMemoizedMergedChildContext=e,$xe(rOe),$xe(nOe),eOe(nOe,e)):$xe(rOe),eOe(rOe,n)}var fOe=null,pOe=!1,hOe=!1;function mOe(e){null===fOe?fOe=[e]:fOe.push(e)}function yOe(){if(!hOe&&null!==fOe){hOe=!0;var e=0,t=XTe;try{var n=fOe;for(XTe=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}fOe=null,pOe=!1}catch(t){throw null!==fOe&&(fOe=fOe.slice(e+1)),ETe(STe,yOe),t}finally{XTe=t,hOe=!1}}return null}var bOe=[],gOe=0,vOe=null,wOe=0,TOe=[],EOe=0,AOe=null,xOe=1,OOe="";function COe(e,t){bOe[gOe++]=wOe,bOe[gOe++]=vOe,vOe=e,wOe=t}function IOe(e,t,n){TOe[EOe++]=xOe,TOe[EOe++]=OOe,TOe[EOe++]=AOe,AOe=e;var r=xOe;e=OOe;var i=32-DTe(r)-1;r&=~(1<<i),n+=1;var a=32-DTe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,xOe=1<<32-DTe(t)+i|n<<i|r,OOe=a+e}else xOe=1<<a|n<<i|r,OOe=e}function SOe(e){null!==e.return&&(COe(e,1),IOe(e,1,0))}function _Oe(e){for(;e===vOe;)vOe=bOe[--gOe],bOe[gOe]=null,wOe=bOe[--gOe],bOe[gOe]=null;for(;e===AOe;)AOe=TOe[--EOe],TOe[EOe]=null,OOe=TOe[--EOe],TOe[EOe]=null,xOe=TOe[--EOe],TOe[EOe]=null}var POe=null,kOe=null,ROe=!1,NOe=null;function MOe(e,t){var n=aPe(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 DOe(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,POe=e,kOe=Fxe(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,POe=e,kOe=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==AOe?{id:xOe,overflow:OOe}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=aPe(18,null,null,0)).stateNode=t,n.return=e,e.child=n,POe=e,kOe=null,!0);default:return!1}}function LOe(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function FOe(e){if(ROe){var t=kOe;if(t){var n=t;if(!DOe(e,t)){if(LOe(e))throw Error(Dve(418));t=Fxe(n.nextSibling);var r=POe;t&&DOe(e,t)?MOe(r,n):(e.flags=-4097&e.flags|2,ROe=!1,POe=e)}}else{if(LOe(e))throw Error(Dve(418));e.flags=-4097&e.flags|2,ROe=!1,POe=e}}}function BOe(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;POe=e}function jOe(e){if(e!==POe)return!1;if(!ROe)return BOe(e),ROe=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!Pxe(e.type,e.memoizedProps)),t&&(t=kOe)){if(LOe(e))throw UOe(),Error(Dve(418));for(;t;)MOe(e,t),t=Fxe(t.nextSibling)}if(BOe(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(Dve(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){kOe=Fxe(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}kOe=null}}else kOe=POe?Fxe(e.stateNode.nextSibling):null;return!0}function UOe(){for(var e=kOe;e;)e=Fxe(e.nextSibling)}function zOe(){kOe=POe=null,ROe=!1}function HOe(e){null===NOe?NOe=[e]:NOe.push(e)}var WOe=Jve.ReactCurrentBatchConfig;function VOe(e,t){if(e&&e.defaultProps){for(var n in t=pwe({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var GOe=Qxe(null),qOe=null,KOe=null,XOe=null;function YOe(){XOe=KOe=qOe=null}function JOe(e){var t=GOe.current;$xe(GOe),e._currentValue=t}function ZOe(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 QOe(e,t){qOe=e,XOe=KOe=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(KIe=!0),e.firstContext=null)}function $Oe(e){var t=e._currentValue;if(XOe!==e)if(e={context:e,memoizedValue:t,next:null},null===KOe){if(null===qOe)throw Error(Dve(308));KOe=e,qOe.dependencies={lanes:0,firstContext:e}}else KOe=KOe.next=e;return t}var eCe=null;function tCe(e){null===eCe?eCe=[e]:eCe.push(e)}function nCe(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,tCe(t)):(n.next=i.next,i.next=n),t.interleaved=n,rCe(e,r)}function rCe(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 iCe=!1;function aCe(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function oCe(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 sCe(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function cCe(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&n_e)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,rCe(e,n)}return null===(i=r.interleaved)?(t.next=t,tCe(r)):(t.next=i.next,i.next=t),r.interleaved=t,rCe(e,n)}function uCe(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,KTe(e,n)}}function lCe(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function dCe(e,t,n,r){var i=e.updateQueue;iCe=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var c=s,u=c.next;c.next=null,null===o?a=u:o.next=u,o=c;var l=e.alternate;null!==l&&((s=(l=l.updateQueue).lastBaseUpdate)!==o&&(null===s?l.firstBaseUpdate=u:s.next=u,l.lastBaseUpdate=c))}if(null!==a){var d=i.baseState;for(o=0,l=u=c=null,s=a;;){var f=s.lane,p=s.eventTime;if((r&f)===f){null!==l&&(l=l.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=m.payload)?h.call(p,d,f):h))break e;d=pwe({},d,f);break e;case 2:iCe=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===l?(u=l=p,c=d):l=l.next=p,o|=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===l&&(c=d),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=l,null!==(t=i.shared.interleaved)){i=t;do{o|=i.lane,i=i.next}while(i!==t)}else null===a&&(i.shared.lanes=0);l_e|=o,e.lanes=o,e.memoizedState=d}}function fCe(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(Dve(191,i));i.call(r)}}}var pCe=(new Nve.Component).refs;function hCe(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:pwe({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var mCe={isMounted:function(e){return!!(e=e._reactInternals)&&bTe(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=S_e(),i=__e(e),a=sCe(r,i);a.payload=t,null!=n&&(a.callback=n),null!==(t=cCe(e,a,i))&&(P_e(t,e,i,r),uCe(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=S_e(),i=__e(e),a=sCe(r,i);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=cCe(e,a,i))&&(P_e(t,e,i,r),uCe(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=S_e(),r=__e(e),i=sCe(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=cCe(e,i,r))&&(P_e(t,e,r,n),uCe(t,e,r))}};function yCe(e,t,n,r,i,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!LAe(n,r)||!LAe(i,a))}function bCe(e,t,n){var r=!1,i=tOe,a=t.contextType;return"object"==typeof a&&null!==a?a=$Oe(a):(i=oOe(t)?iOe:nOe.current,a=(r=null!=(r=t.contextTypes))?aOe(e,i):tOe),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=mCe,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function gCe(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&&mCe.enqueueReplaceState(t,t.state,null)}function vCe(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=pCe,aCe(e);var a=t.contextType;"object"==typeof a&&null!==a?i.context=$Oe(a):(a=oOe(t)?iOe:nOe.current,i.context=aOe(e,a)),i.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(hCe(e,t,a,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&&mCe.enqueueReplaceState(i,i.state,null),dCe(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function wCe(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(Dve(309));var r=n.stateNode}if(!r)throw Error(Dve(147,e));var i=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=i.refs;t===pCe&&(t=i.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(Dve(284));if(!n._owner)throw Error(Dve(290,e))}return e}function TCe(e,t){throw e=Object.prototype.toString.call(t),Error(Dve(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ECe(e){return(0,e._init)(e._payload)}function ACe(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(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 i(e,t){return(e=sPe(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 o(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=dPe(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var a=n.type;return a===$ve?l(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===cwe&&ECe(a)===t.type)?((r=i(t,n.props)).ref=wCe(e,t,n),r.return=e,r):((r=cPe(n.type,n.key,n.props,null,e.mode,r)).ref=wCe(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=fPe(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function l(e,t,n,r,a){return null===t||7!==t.tag?((t=uPe(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=dPe(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Zve:return(n=cPe(t.type,t.key,t.props,null,e.mode,n)).ref=wCe(e,null,t),n.return=e,n;case Qve:return(t=fPe(t,e.mode,n)).return=e,t;case cwe:return d(e,(0,t._init)(t._payload),n)}if(kwe(t)||dwe(t))return(t=uPe(t,e.mode,n,null)).return=e,t;TCe(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Zve:return n.key===i?c(e,t,n,r):null;case Qve:return n.key===i?u(e,t,n,r):null;case cwe:return f(e,t,(i=n._init)(n._payload),r)}if(kwe(n)||dwe(n))return null!==i?null:l(e,t,n,r,null);TCe(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Zve:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case Qve:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case cwe:return p(e,t,n,(0,r._init)(r._payload),i)}if(kwe(r)||dwe(r))return l(t,e=e.get(n)||null,r,i,null);TCe(t,r)}return null}function h(i,o,s,c){for(var u=null,l=null,h=o,m=o=0,y=null;null!==h&&m<s.length;m++){h.index>m?(y=h,h=null):y=h.sibling;var b=f(i,h,s[m],c);if(null===b){null===h&&(h=y);break}e&&h&&null===b.alternate&&t(i,h),o=a(b,o,m),null===l?u=b:l.sibling=b,l=b,h=y}if(m===s.length)return n(i,h),ROe&&COe(i,m),u;if(null===h){for(;m<s.length;m++)null!==(h=d(i,s[m],c))&&(o=a(h,o,m),null===l?u=h:l.sibling=h,l=h);return ROe&&COe(i,m),u}for(h=r(i,h);m<s.length;m++)null!==(y=p(h,i,m,s[m],c))&&(e&&null!==y.alternate&&h.delete(null===y.key?m:y.key),o=a(y,o,m),null===l?u=y:l.sibling=y,l=y);return e&&h.forEach((function(e){return t(i,e)})),ROe&&COe(i,m),u}function m(i,o,s,c){var u=dwe(s);if("function"!=typeof u)throw Error(Dve(150));if(null==(s=u.call(s)))throw Error(Dve(151));for(var l=u=null,h=o,m=o=0,y=null,b=s.next();null!==h&&!b.done;m++,b=s.next()){h.index>m?(y=h,h=null):y=h.sibling;var g=f(i,h,b.value,c);if(null===g){null===h&&(h=y);break}e&&h&&null===g.alternate&&t(i,h),o=a(g,o,m),null===l?u=g:l.sibling=g,l=g,h=y}if(b.done)return n(i,h),ROe&&COe(i,m),u;if(null===h){for(;!b.done;m++,b=s.next())null!==(b=d(i,b.value,c))&&(o=a(b,o,m),null===l?u=b:l.sibling=b,l=b);return ROe&&COe(i,m),u}for(h=r(i,h);!b.done;m++,b=s.next())null!==(b=p(h,i,m,b.value,c))&&(e&&null!==b.alternate&&h.delete(null===b.key?m:b.key),o=a(b,o,m),null===l?u=b:l.sibling=b,l=b);return e&&h.forEach((function(e){return t(i,e)})),ROe&&COe(i,m),u}return function e(r,a,s,c){if("object"==typeof s&&null!==s&&s.type===$ve&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case Zve:e:{for(var u=s.key,l=a;null!==l;){if(l.key===u){if((u=s.type)===$ve){if(7===l.tag){n(r,l.sibling),(a=i(l,s.props.children)).return=r,r=a;break e}}else if(l.elementType===u||"object"==typeof u&&null!==u&&u.$$typeof===cwe&&ECe(u)===l.type){n(r,l.sibling),(a=i(l,s.props)).ref=wCe(r,l,s),a.return=r,r=a;break e}n(r,l);break}t(r,l),l=l.sibling}s.type===$ve?((a=uPe(s.props.children,r.mode,c,s.key)).return=r,r=a):((c=cPe(s.type,s.key,s.props,null,r.mode,c)).ref=wCe(r,a,s),c.return=r,r=c)}return o(r);case Qve:e:{for(l=s.key;null!==a;){if(a.key===l){if(4===a.tag&&a.stateNode.containerInfo===s.containerInfo&&a.stateNode.implementation===s.implementation){n(r,a.sibling),(a=i(a,s.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=fPe(s,r.mode,c)).return=r,r=a}return o(r);case cwe:return e(r,a,(l=s._init)(s._payload),c)}if(kwe(s))return h(r,a,s,c);if(dwe(s))return m(r,a,s,c);TCe(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,s)).return=r,r=a):(n(r,a),(a=dPe(s,r.mode,c)).return=r,r=a),o(r)):n(r,a)}}var xCe=ACe(!0),OCe=ACe(!1),CCe={},ICe=Qxe(CCe),SCe=Qxe(CCe),_Ce=Qxe(CCe);function PCe(e){if(e===CCe)throw Error(Dve(174));return e}function kCe(e,t){switch(eOe(_Ce,t),eOe(SCe,e),eOe(ICe,CCe),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Bwe(null,"");break;default:t=Bwe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}$xe(ICe),eOe(ICe,t)}function RCe(){$xe(ICe),$xe(SCe),$xe(_Ce)}function NCe(e){PCe(_Ce.current);var t=PCe(ICe.current),n=Bwe(t,e.type);t!==n&&(eOe(SCe,e),eOe(ICe,n))}function MCe(e){SCe.current===e&&($xe(ICe),$xe(SCe))}var DCe=Qxe(0);function LCe(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 FCe=[];function BCe(){for(var e=0;e<FCe.length;e++)FCe[e]._workInProgressVersionPrimary=null;FCe.length=0}var jCe=Jve.ReactCurrentDispatcher,UCe=Jve.ReactCurrentBatchConfig,zCe=0,HCe=null,WCe=null,VCe=null,GCe=!1,qCe=!1,KCe=0,XCe=0;function YCe(){throw Error(Dve(321))}function JCe(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!DAe(e[n],t[n]))return!1;return!0}function ZCe(e,t,n,r,i,a){if(zCe=a,HCe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,jCe.current=null===e||null===e.memoizedState?MIe:DIe,e=n(r,i),qCe){a=0;do{if(qCe=!1,KCe=0,25<=a)throw Error(Dve(301));a+=1,VCe=WCe=null,t.updateQueue=null,jCe.current=LIe,e=n(r,i)}while(qCe)}if(jCe.current=NIe,t=null!==WCe&&null!==WCe.next,zCe=0,VCe=WCe=HCe=null,GCe=!1,t)throw Error(Dve(300));return e}function QCe(){var e=0!==KCe;return KCe=0,e}function $Ce(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===VCe?HCe.memoizedState=VCe=e:VCe=VCe.next=e,VCe}function eIe(){if(null===WCe){var e=HCe.alternate;e=null!==e?e.memoizedState:null}else e=WCe.next;var t=null===VCe?HCe.memoizedState:VCe.next;if(null!==t)VCe=t,WCe=e;else{if(null===e)throw Error(Dve(310));e={memoizedState:(WCe=e).memoizedState,baseState:WCe.baseState,baseQueue:WCe.baseQueue,queue:WCe.queue,next:null},null===VCe?HCe.memoizedState=VCe=e:VCe=VCe.next=e}return VCe}function tIe(e,t){return"function"==typeof t?t(e):t}function nIe(e){var t=eIe(),n=t.queue;if(null===n)throw Error(Dve(311));n.lastRenderedReducer=e;var r=WCe,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var o=i.next;i.next=a.next,a.next=o}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var s=o=null,c=null,u=a;do{var l=u.lane;if((zCe&l)===l)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:l,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(s=c=d,o=r):c=c.next=d,HCe.lanes|=l,l_e|=l}u=u.next}while(null!==u&&u!==a);null===c?o=r:c.next=s,DAe(r,t.memoizedState)||(KIe=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{a=i.lane,HCe.lanes|=a,l_e|=a,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function rIe(e){var t=eIe(),n=t.queue;if(null===n)throw Error(Dve(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var o=i=i.next;do{a=e(a,o.action),o=o.next}while(o!==i);DAe(a,t.memoizedState)||(KIe=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function iIe(){}function aIe(e,t){var n=HCe,r=eIe(),i=t(),a=!DAe(r.memoizedState,i);if(a&&(r.memoizedState=i,KIe=!0),r=r.queue,bIe(cIe.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==VCe&&1&VCe.memoizedState.tag){if(n.flags|=2048,fIe(9,sIe.bind(null,n,r,i,t),void 0,null),null===r_e)throw Error(Dve(349));0!=(30&zCe)||oIe(n,t,i)}return i}function oIe(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=HCe.updateQueue)?(t={lastEffect:null,stores:null},HCe.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function sIe(e,t,n,r){t.value=n,t.getSnapshot=r,uIe(t)&&lIe(e)}function cIe(e,t,n){return n((function(){uIe(t)&&lIe(e)}))}function uIe(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!DAe(e,n)}catch(e){return!0}}function lIe(e){var t=rCe(e,1);null!==t&&P_e(t,e,1,-1)}function dIe(e){var t=$Ce();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:tIe,lastRenderedState:e},t.queue=e,e=e.dispatch=_Ie.bind(null,HCe,e),[t.memoizedState,e]}function fIe(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=HCe.updateQueue)?(t={lastEffect:null,stores:null},HCe.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 pIe(){return eIe().memoizedState}function hIe(e,t,n,r){var i=$Ce();HCe.flags|=e,i.memoizedState=fIe(1|t,n,void 0,void 0===r?null:r)}function mIe(e,t,n,r){var i=eIe();r=void 0===r?null:r;var a=void 0;if(null!==WCe){var o=WCe.memoizedState;if(a=o.destroy,null!==r&&JCe(r,o.deps))return void(i.memoizedState=fIe(t,n,a,r))}HCe.flags|=e,i.memoizedState=fIe(1|t,n,a,r)}function yIe(e,t){return hIe(8390656,8,e,t)}function bIe(e,t){return mIe(2048,8,e,t)}function gIe(e,t){return mIe(4,2,e,t)}function vIe(e,t){return mIe(4,4,e,t)}function wIe(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 TIe(e,t,n){return n=null!=n?n.concat([e]):null,mIe(4,4,wIe.bind(null,t,e),n)}function EIe(){}function AIe(e,t){var n=eIe();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&JCe(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xIe(e,t){var n=eIe();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&JCe(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function OIe(e,t,n){return 0==(21&zCe)?(e.baseState&&(e.baseState=!1,KIe=!0),e.memoizedState=n):(DAe(n,t)||(n=VTe(),HCe.lanes|=n,l_e|=n,e.baseState=!0),t)}function CIe(e,t){var n=XTe;XTe=0!==n&&4>n?n:4,e(!0);var r=UCe.transition;UCe.transition={};try{e(!1),t()}finally{XTe=n,UCe.transition=r}}function IIe(){return eIe().memoizedState}function SIe(e,t,n){var r=__e(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},PIe(e))kIe(t,n);else if(null!==(n=nCe(e,t,n,r))){P_e(n,e,r,S_e()),RIe(n,t,r)}}function _Ie(e,t,n){var r=__e(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(PIe(e))kIe(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,DAe(s,o)){var c=t.interleaved;return null===c?(i.next=i,tCe(t)):(i.next=c.next,c.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=nCe(e,t,i,r))&&(P_e(n,e,r,i=S_e()),RIe(n,t,r))}}function PIe(e){var t=e.alternate;return e===HCe||null!==t&&t===HCe}function kIe(e,t){qCe=GCe=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function RIe(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,KTe(e,n)}}var NIe={readContext:$Oe,useCallback:YCe,useContext:YCe,useEffect:YCe,useImperativeHandle:YCe,useInsertionEffect:YCe,useLayoutEffect:YCe,useMemo:YCe,useReducer:YCe,useRef:YCe,useState:YCe,useDebugValue:YCe,useDeferredValue:YCe,useTransition:YCe,useMutableSource:YCe,useSyncExternalStore:YCe,useId:YCe,unstable_isNewReconciler:!1},MIe={readContext:$Oe,useCallback:function(e,t){return $Ce().memoizedState=[e,void 0===t?null:t],e},useContext:$Oe,useEffect:yIe,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,hIe(4194308,4,wIe.bind(null,t,e),n)},useLayoutEffect:function(e,t){return hIe(4194308,4,e,t)},useInsertionEffect:function(e,t){return hIe(4,2,e,t)},useMemo:function(e,t){var n=$Ce();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$Ce();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=SIe.bind(null,HCe,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},$Ce().memoizedState=e},useState:dIe,useDebugValue:EIe,useDeferredValue:function(e){return $Ce().memoizedState=e},useTransition:function(){var e=dIe(!1),t=e[0];return e=CIe.bind(null,e[1]),$Ce().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=HCe,i=$Ce();if(ROe){if(void 0===n)throw Error(Dve(407));n=n()}else{if(n=t(),null===r_e)throw Error(Dve(349));0!=(30&zCe)||oIe(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,yIe(cIe.bind(null,r,a,e),[e]),r.flags|=2048,fIe(9,sIe.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=$Ce(),t=r_e.identifierPrefix;if(ROe){var n=OOe;t=":"+t+"R"+(n=(xOe&~(1<<32-DTe(xOe)-1)).toString(32)+n),0<(n=KCe++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=XCe++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},DIe={readContext:$Oe,useCallback:AIe,useContext:$Oe,useEffect:bIe,useImperativeHandle:TIe,useInsertionEffect:gIe,useLayoutEffect:vIe,useMemo:xIe,useReducer:nIe,useRef:pIe,useState:function(){return nIe(tIe)},useDebugValue:EIe,useDeferredValue:function(e){return OIe(eIe(),WCe.memoizedState,e)},useTransition:function(){return[nIe(tIe)[0],eIe().memoizedState]},useMutableSource:iIe,useSyncExternalStore:aIe,useId:IIe,unstable_isNewReconciler:!1},LIe={readContext:$Oe,useCallback:AIe,useContext:$Oe,useEffect:bIe,useImperativeHandle:TIe,useInsertionEffect:gIe,useLayoutEffect:vIe,useMemo:xIe,useReducer:rIe,useRef:pIe,useState:function(){return rIe(tIe)},useDebugValue:EIe,useDeferredValue:function(e){var t=eIe();return null===WCe?t.memoizedState=e:OIe(t,WCe.memoizedState,e)},useTransition:function(){return[rIe(tIe)[0],eIe().memoizedState]},useMutableSource:iIe,useSyncExternalStore:aIe,useId:IIe,unstable_isNewReconciler:!1};function FIe(e,t){try{var n="",r=t;do{n+=bwe(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 BIe(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function jIe(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var UIe="function"==typeof WeakMap?WeakMap:Map;function zIe(e,t,n){(n=sCe(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){g_e||(g_e=!0,v_e=r),jIe(0,t)},n}function HIe(e,t,n){(n=sCe(-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(){jIe(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){jIe(0,t),"function"!=typeof r&&(null===w_e?w_e=new Set([this]):w_e.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function WIe(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new UIe;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=$_e.bind(null,e,t,n),t.then(e,e))}function VIe(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 GIe(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=sCe(-1,1)).tag=2,cCe(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var qIe=Jve.ReactCurrentOwner,KIe=!1;function XIe(e,t,n,r){t.child=null===e?OCe(t,null,n,r):xCe(t,e.child,n,r)}function YIe(e,t,n,r,i){n=n.render;var a=t.ref;return QOe(t,i),r=ZCe(e,t,n,r,a,i),n=QCe(),null===e||KIe?(ROe&&n&&SOe(t),t.flags|=1,XIe(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,gSe(e,t,i))}function JIe(e,t,n,r,i){if(null===e){var a=n.type;return"function"!=typeof a||oPe(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=cPe(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ZIe(e,t,a,r,i))}if(a=e.child,0==(e.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:LAe)(o,r)&&e.ref===t.ref)return gSe(e,t,i)}return t.flags|=1,(e=sPe(a,r)).ref=t.ref,e.return=t,t.child=e}function ZIe(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(LAe(a,r)&&e.ref===t.ref){if(KIe=!1,t.pendingProps=r=a,0==(e.lanes&i))return t.lanes=e.lanes,gSe(e,t,i);0!=(131072&e.flags)&&(KIe=!0)}}return eSe(e,t,n,r,i)}function QIe(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},eOe(s_e,o_e),o_e|=n;else{if(0==(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,eOe(s_e,o_e),o_e|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,eOe(s_e,o_e),o_e|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,eOe(s_e,o_e),o_e|=r;return XIe(e,t,i,n),t.child}function $Ie(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function eSe(e,t,n,r,i){var a=oOe(n)?iOe:nOe.current;return a=aOe(t,a),QOe(t,i),n=ZCe(e,t,n,r,a,i),r=QCe(),null===e||KIe?(ROe&&r&&SOe(t),t.flags|=1,XIe(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,gSe(e,t,i))}function tSe(e,t,n,r,i){if(oOe(n)){var a=!0;lOe(t)}else a=!1;if(QOe(t,i),null===t.stateNode)bSe(e,t),bCe(t,n,r),vCe(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,u=n.contextType;"object"==typeof u&&null!==u?u=$Oe(u):u=aOe(t,u=oOe(n)?iOe:nOe.current);var l=n.getDerivedStateFromProps,d="function"==typeof l||"function"==typeof o.getSnapshotBeforeUpdate;d||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==r||c!==u)&&gCe(t,o,r,u),iCe=!1;var f=t.memoizedState;o.state=f,dCe(t,r,o,i),c=t.memoizedState,s!==r||f!==c||rOe.current||iCe?("function"==typeof l&&(hCe(t,n,l,r),c=t.memoizedState),(s=iCe||yCe(t,n,s,r,f,c,u))?(d||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=u,r=s):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,oCe(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:VOe(t.type,s),o.props=u,d=t.pendingProps,f=o.context,"object"==typeof(c=n.contextType)&&null!==c?c=$Oe(c):c=aOe(t,c=oOe(n)?iOe:nOe.current);var p=n.getDerivedStateFromProps;(l="function"==typeof p||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==d||f!==c)&&gCe(t,o,r,c),iCe=!1,f=t.memoizedState,o.state=f,dCe(t,r,o,i);var h=t.memoizedState;s!==d||f!==h||rOe.current||iCe?("function"==typeof p&&(hCe(t,n,p,r),h=t.memoizedState),(u=iCe||yCe(t,n,u,r,f,h,c)||!1)?(l||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,h,c),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,h,c)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),o.props=r,o.state=h,o.context=c,r=u):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return nSe(e,t,n,r,a,i)}function nSe(e,t,n,r,i,a){$Ie(e,t);var o=0!=(128&t.flags);if(!r&&!o)return i&&dOe(t,n,!1),gSe(e,t,a);r=t.stateNode,qIe.current=t;var s=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=xCe(t,e.child,null,a),t.child=xCe(t,null,s,a)):XIe(e,t,s,a),t.memoizedState=r.state,i&&dOe(t,n,!0),t.child}function rSe(e){var t=e.stateNode;t.pendingContext?cOe(0,t.pendingContext,t.pendingContext!==t.context):t.context&&cOe(0,t.context,!1),kCe(e,t.containerInfo)}function iSe(e,t,n,r,i){return zOe(),HOe(i),t.flags|=256,XIe(e,t,n,r),t.child}var aSe,oSe,sSe,cSe,uSe={dehydrated:null,treeContext:null,retryLane:0};function lSe(e){return{baseLanes:e,cachePool:null,transitions:null}}function dSe(e,t,n){var r,i=t.pendingProps,a=DCe.current,o=!1,s=0!=(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&0!=(2&a)),r?(o=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),eOe(DCe,1&a),null===e)return FOe(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):(s=i.children,e=i.fallback,o?(i=t.mode,o=t.child,s={mode:"hidden",children:s},0==(1&i)&&null!==o?(o.childLanes=0,o.pendingProps=s):o=lPe(s,i,0,null),e=uPe(e,i,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=lSe(n),t.memoizedState=uSe,e):fSe(t,s));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,i,a,o){if(n)return 256&t.flags?(t.flags&=-257,pSe(e,t,o,r=BIe(Error(Dve(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=lPe({mode:"visible",children:r.children},i,0,null),(a=uPe(a,i,o,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!=(1&t.mode)&&xCe(t,e.child,null,o),t.child.memoizedState=lSe(o),t.memoizedState=uSe,a);if(0==(1&t.mode))return pSe(e,t,o,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var s=r.dgst;return r=s,pSe(e,t,o,r=BIe(a=Error(Dve(419)),r,void 0))}if(s=0!=(o&e.childLanes),KIe||s){if(null!==(r=r_e)){switch(o&-o){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|o))?0:i)&&i!==a.retryLane&&(a.retryLane=i,rCe(e,i),P_e(r,e,i,-1))}return W_e(),pSe(e,t,o,r=BIe(Error(Dve(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=tPe.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,kOe=Fxe(i.nextSibling),POe=t,ROe=!0,NOe=null,null!==e&&(TOe[EOe++]=xOe,TOe[EOe++]=OOe,TOe[EOe++]=AOe,xOe=e.id,OOe=e.overflow,AOe=t),t=fSe(t,r.children),t.flags|=4096,t)}(e,t,s,i,r,a,n);if(o){o=i.fallback,s=t.mode,r=(a=e.child).sibling;var c={mode:"hidden",children:i.children};return 0==(1&s)&&t.child!==a?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=sPe(a,c)).subtreeFlags=14680064&a.subtreeFlags,null!==r?o=sPe(r,o):(o=uPe(o,s,n,null)).flags|=2,o.return=t,i.return=t,i.sibling=o,t.child=i,i=o,o=t.child,s=null===(s=e.child.memoizedState)?lSe(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=uSe,i}return e=(o=e.child).sibling,i=sPe(o,{mode:"visible",children:i.children}),0==(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function fSe(e,t){return(t=lPe({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function pSe(e,t,n,r){return null!==r&&HOe(r),xCe(t,e.child,null,n),(e=fSe(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function hSe(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),ZOe(e.return,t,n)}function mSe(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function ySe(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(XIe(e,t,r.children,n),0!=(2&(r=DCe.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&&hSe(e,n,t);else if(19===e.tag)hSe(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(eOe(DCe,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===LCe(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),mSe(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===LCe(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}mSe(t,!0,n,null,a);break;case"together":mSe(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function bSe(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function gSe(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),l_e|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(Dve(153));if(null!==t.child){for(n=sPe(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=sPe(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function vSe(e,t){if(!ROe)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 wSe(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 TSe(e,t,n){var r=t.pendingProps;switch(_Oe(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wSe(t),null;case 1:case 17:return oOe(t.type)&&sOe(),wSe(t),null;case 3:return r=t.stateNode,RCe(),$xe(rOe),$xe(nOe),BCe(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(jOe(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==NOe&&(M_e(NOe),NOe=null))),oSe(e,t),wSe(t),null;case 5:MCe(t);var i=PCe(_Ce.current);if(n=t.type,null!==e&&null!=t.stateNode)sSe(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(Dve(166));return wSe(t),null}if(e=PCe(ICe.current),jOe(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Uxe]=t,r[zxe]=a,e=0!=(1&t.mode),n){case"dialog":pxe("cancel",r),pxe("close",r);break;case"iframe":case"object":case"embed":pxe("load",r);break;case"video":case"audio":for(i=0;i<uxe.length;i++)pxe(uxe[i],r);break;case"source":pxe("error",r);break;case"img":case"image":case"link":pxe("error",r),pxe("load",r);break;case"details":pxe("toggle",r);break;case"input":Cwe(r,a),pxe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},pxe("invalid",r);break;case"textarea":Mwe(r,a),pxe("invalid",r)}for(var o in Kwe(n,a),i=null,a)if(a.hasOwnProperty(o)){var s=a[o];"children"===o?"string"==typeof s?r.textContent!==s&&(!0!==a.suppressHydrationWarning&&Cxe(r.textContent,s,e),i=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==a.suppressHydrationWarning&&Cxe(r.textContent,s,e),i=["children",""+s]):Fve.hasOwnProperty(o)&&null!=s&&"onScroll"===o&&pxe("scroll",r)}switch(n){case"input":Ewe(r),_we(r,a,!0);break;case"textarea":Ewe(r),Lwe(r);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(r.onclick=Ixe)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{o=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=Fwe(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=o.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),"select"===n&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Uxe]=t,e[zxe]=r,aSe(e,t,!1,!1),t.stateNode=e;e:{switch(o=Xwe(n,r),n){case"dialog":pxe("cancel",e),pxe("close",e),i=r;break;case"iframe":case"object":case"embed":pxe("load",e),i=r;break;case"video":case"audio":for(i=0;i<uxe.length;i++)pxe(uxe[i],e);i=r;break;case"source":pxe("error",e),i=r;break;case"img":case"image":case"link":pxe("error",e),pxe("load",e),i=r;break;case"details":pxe("toggle",e),i=r;break;case"input":Cwe(e,r),i=Owe(e,r),pxe("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=pwe({},r,{value:void 0}),pxe("invalid",e);break;case"textarea":Mwe(e,r),i=Nwe(e,r),pxe("invalid",e)}for(a in Kwe(n,i),s=i)if(s.hasOwnProperty(a)){var c=s[a];"style"===a?Gwe(e,c):"dangerouslySetInnerHTML"===a?null!=(c=c?c.__html:void 0)&&Uwe(e,c):"children"===a?"string"==typeof c?("textarea"!==n||""!==c)&&zwe(e,c):"number"==typeof c&&zwe(e,""+c):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(Fve.hasOwnProperty(a)?null!=c&&"onScroll"===a&&pxe("scroll",e):null!=c&&Yve(e,a,c,o))}switch(n){case"input":Ewe(e),_we(e,r,!1);break;case"textarea":Ewe(e),Lwe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+wwe(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?Rwe(e,!!r.multiple,a,!1):null!=r.defaultValue&&Rwe(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Ixe)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return wSe(t),null;case 6:if(e&&null!=t.stateNode)cSe(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(Dve(166));if(n=PCe(_Ce.current),PCe(ICe.current),jOe(t)){if(r=t.stateNode,n=t.memoizedProps,r[Uxe]=t,(a=r.nodeValue!==n)&&null!==(e=POe))switch(e.tag){case 3:Cxe(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Cxe(r.nodeValue,n,0!=(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Uxe]=t,t.stateNode=r}return wSe(t),null;case 13:if($xe(DCe),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ROe&&null!==kOe&&0!=(1&t.mode)&&0==(128&t.flags))UOe(),zOe(),t.flags|=98560,a=!1;else if(a=jOe(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(Dve(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(Dve(317));a[Uxe]=t}else zOe(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;wSe(t),a=!1}else null!==NOe&&(M_e(NOe),NOe=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&DCe.current)?0===c_e&&(c_e=3):W_e())),null!==t.updateQueue&&(t.flags|=4),wSe(t),null);case 4:return RCe(),oSe(e,t),null===e&&yxe(t.stateNode.containerInfo),wSe(t),null;case 10:return JOe(t.type._context),wSe(t),null;case 19:if($xe(DCe),null===(a=t.memoizedState))return wSe(t),null;if(r=0!=(128&t.flags),null===(o=a.rendering))if(r)vSe(a,!1);else{if(0!==c_e||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(o=LCe(e))){for(t.flags|=128,vSe(a,!1),null!==(r=o.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(o=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return eOe(DCe,1&DCe.current|2),t.child}e=e.sibling}null!==a.tail&&CTe()>y_e&&(t.flags|=128,r=!0,vSe(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=LCe(o))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),vSe(a,!0),null===a.tail&&"hidden"===a.tailMode&&!o.alternate&&!ROe)return wSe(t),null}else 2*CTe()-a.renderingStartTime>y_e&&1073741824!==n&&(t.flags|=128,r=!0,vSe(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(null!==(n=a.last)?n.sibling=o:t.child=o,a.last=o)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=CTe(),t.sibling=null,n=DCe.current,eOe(DCe,r?1&n|2:1&n),t):(wSe(t),null);case 22:case 23:return j_e(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&o_e)&&(wSe(t),6&t.subtreeFlags&&(t.flags|=8192)):wSe(t),null;case 24:case 25:return null}throw Error(Dve(156,t.tag))}function ESe(e,t){switch(_Oe(t),t.tag){case 1:return oOe(t.type)&&sOe(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return RCe(),$xe(rOe),$xe(nOe),BCe(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return MCe(t),null;case 13:if($xe(DCe),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(Dve(340));zOe()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return $xe(DCe),null;case 4:return RCe(),null;case 10:return JOe(t.type._context),null;case 22:case 23:return j_e(),null;default:return null}}aSe=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}},oSe=function(){},sSe=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,PCe(ICe.current);var a,o=null;switch(n){case"input":i=Owe(e,i),r=Owe(e,r),o=[];break;case"select":i=pwe({},i,{value:void 0}),r=pwe({},r,{value:void 0}),o=[];break;case"textarea":i=Nwe(e,i),r=Nwe(e,r),o=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Ixe)}for(u in Kwe(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var s=i[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(Fve.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(s=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==s&&(null!=c||null!=s))if("style"===u)if(s){for(a in s)!s.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&s[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(o||(o=[]),o.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,s=s?s.__html:void 0,null!=c&&s!==c&&(o=o||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(o=o||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(Fve.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&pxe("scroll",e),o||s===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},cSe=function(e,t,n,r){n!==r&&(t.flags|=4)};var ASe=!1,xSe=!1,OSe="function"==typeof WeakSet?WeakSet:Set,CSe=null;function ISe(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Q_e(e,t,n)}else n.current=null}function SSe(e,t,n){try{n()}catch(n){Q_e(e,t,n)}}var _Se=!1;function PSe(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 a=i.destroy;i.destroy=void 0,void 0!==a&&SSe(t,n,a)}i=i.next}while(i!==r)}}function kSe(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 RSe(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 NSe(e){var t=e.alternate;null!==t&&(e.alternate=null,NSe(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[Uxe],delete t[zxe],delete t[Wxe],delete t[Vxe],delete t[Gxe])),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 MSe(e){return 5===e.tag||3===e.tag||4===e.tag}function DSe(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||MSe(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 LSe(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=Ixe));else if(4!==r&&null!==(e=e.child))for(LSe(e,t,n),e=e.sibling;null!==e;)LSe(e,t,n),e=e.sibling}function FSe(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(FSe(e,t,n),e=e.sibling;null!==e;)FSe(e,t,n),e=e.sibling}var BSe=null,jSe=!1;function USe(e,t,n){for(n=n.child;null!==n;)zSe(e,t,n),n=n.sibling}function zSe(e,t,n){if(MTe&&"function"==typeof MTe.onCommitFiberUnmount)try{MTe.onCommitFiberUnmount(NTe,n)}catch(e){}switch(n.tag){case 5:xSe||ISe(n,t);case 6:var r=BSe,i=jSe;BSe=null,USe(e,t,n),jSe=i,null!==(BSe=r)&&(jSe?(e=BSe,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):BSe.removeChild(n.stateNode));break;case 18:null!==BSe&&(jSe?(e=BSe,n=n.stateNode,8===e.nodeType?Lxe(e.parentNode,n):1===e.nodeType&&Lxe(e,n),bEe(e)):Lxe(BSe,n.stateNode));break;case 4:r=BSe,i=jSe,BSe=n.stateNode.containerInfo,jSe=!0,USe(e,t,n),BSe=r,jSe=i;break;case 0:case 11:case 14:case 15:if(!xSe&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,void 0!==o&&(0!=(2&a)||0!=(4&a))&&SSe(n,t,o),i=i.next}while(i!==r)}USe(e,t,n);break;case 1:if(!xSe&&(ISe(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Q_e(n,t,e)}USe(e,t,n);break;case 21:USe(e,t,n);break;case 22:1&n.mode?(xSe=(r=xSe)||null!==n.memoizedState,USe(e,t,n),xSe=r):USe(e,t,n);break;default:USe(e,t,n)}}function HSe(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new OSe),t.forEach((function(t){var r=nPe.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function WSe(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,o=t,s=o;e:for(;null!==s;){switch(s.tag){case 5:BSe=s.stateNode,jSe=!1;break e;case 3:case 4:BSe=s.stateNode.containerInfo,jSe=!0;break e}s=s.return}if(null===BSe)throw Error(Dve(160));zSe(a,o,i),BSe=null,jSe=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(e){Q_e(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)VSe(t,e),t=t.sibling}function VSe(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(WSe(t,e),GSe(e),4&r){try{PSe(3,e,e.return),kSe(3,e)}catch(t){Q_e(e,e.return,t)}try{PSe(5,e,e.return)}catch(t){Q_e(e,e.return,t)}}break;case 1:WSe(t,e),GSe(e),512&r&&null!==n&&ISe(n,n.return);break;case 5:if(WSe(t,e),GSe(e),512&r&&null!==n&&ISe(n,n.return),32&e.flags){var i=e.stateNode;try{zwe(i,"")}catch(t){Q_e(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var a=e.memoizedProps,o=null!==n?n.memoizedProps:a,s=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===s&&"radio"===a.type&&null!=a.name&&Iwe(i,a),Xwe(s,o);var u=Xwe(s,a);for(o=0;o<c.length;o+=2){var l=c[o],d=c[o+1];"style"===l?Gwe(i,d):"dangerouslySetInnerHTML"===l?Uwe(i,d):"children"===l?zwe(i,d):Yve(i,l,d,u)}switch(s){case"input":Swe(i,a);break;case"textarea":Dwe(i,a);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?Rwe(i,!!a.multiple,p,!1):f!==!!a.multiple&&(null!=a.defaultValue?Rwe(i,!!a.multiple,a.defaultValue,!0):Rwe(i,!!a.multiple,a.multiple?[]:"",!1))}i[zxe]=a}catch(t){Q_e(e,e.return,t)}}break;case 6:if(WSe(t,e),GSe(e),4&r){if(null===e.stateNode)throw Error(Dve(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(t){Q_e(e,e.return,t)}}break;case 3:if(WSe(t,e),GSe(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{bEe(t.containerInfo)}catch(t){Q_e(e,e.return,t)}break;case 4:default:WSe(t,e),GSe(e);break;case 13:WSe(t,e),GSe(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(m_e=CTe())),4&r&&HSe(e);break;case 22:if(l=null!==n&&null!==n.memoizedState,1&e.mode?(xSe=(u=xSe)||l,WSe(t,e),xSe=u):WSe(t,e),GSe(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!l&&0!=(1&e.mode))for(CSe=e,l=e.child;null!==l;){for(d=CSe=l;null!==CSe;){switch(p=(f=CSe).child,f.tag){case 0:case 11:case 14:case 15:PSe(4,f,f.return);break;case 1:ISe(f,f.return);var h=f.stateNode;if("function"==typeof h.componentWillUnmount){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){Q_e(r,n,e)}}break;case 5:ISe(f,f.return);break;case 22:if(null!==f.memoizedState){YSe(d);continue}}null!==p?(p.return=f,CSe=p):YSe(d)}l=l.sibling}e:for(l=null,d=e;;){if(5===d.tag){if(null===l){l=d;try{i=d.stateNode,u?"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(s=d.stateNode,o=null!=(c=d.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,s.style.display=Vwe("display",o))}catch(t){Q_e(e,e.return,t)}}}else if(6===d.tag){if(null===l)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(t){Q_e(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;l===d&&(l=null),d=d.return}l===d&&(l=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:WSe(t,e),GSe(e),4&r&&HSe(e);case 21:}}function GSe(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(MSe(n)){var r=n;break e}n=n.return}throw Error(Dve(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(zwe(i,""),r.flags&=-33),FSe(e,DSe(e),i);break;case 3:case 4:var a=r.stateNode.containerInfo;LSe(e,DSe(e),a);break;default:throw Error(Dve(161))}}catch(t){Q_e(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function qSe(e,t,n){CSe=e,KSe(e)}function KSe(e,t,n){for(var r=0!=(1&e.mode);null!==CSe;){var i=CSe,a=i.child;if(22===i.tag&&r){var o=null!==i.memoizedState||ASe;if(!o){var s=i.alternate,c=null!==s&&null!==s.memoizedState||xSe;s=ASe;var u=xSe;if(ASe=o,(xSe=c)&&!u)for(CSe=i;null!==CSe;)c=(o=CSe).child,22===o.tag&&null!==o.memoizedState?JSe(i):null!==c?(c.return=o,CSe=c):JSe(i);for(;null!==a;)CSe=a,KSe(a),a=a.sibling;CSe=i,ASe=s,xSe=u}XSe(e)}else 0!=(8772&i.subtreeFlags)&&null!==a?(a.return=i,CSe=a):XSe(e)}}function XSe(e){for(;null!==CSe;){var t=CSe;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:xSe||kSe(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!xSe)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:VOe(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&fCe(t,a,r);break;case 3:var o=t.updateQueue;if(null!==o){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}fCe(t,o,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.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 u=t.alternate;if(null!==u){var l=u.memoizedState;if(null!==l){var d=l.dehydrated;null!==d&&bEe(d)}}}break;default:throw Error(Dve(163))}xSe||512&t.flags&&RSe(t)}catch(e){Q_e(t,t.return,e)}}if(t===e){CSe=null;break}if(null!==(n=t.sibling)){n.return=t.return,CSe=n;break}CSe=t.return}}function YSe(e){for(;null!==CSe;){var t=CSe;if(t===e){CSe=null;break}var n=t.sibling;if(null!==n){n.return=t.return,CSe=n;break}CSe=t.return}}function JSe(e){for(;null!==CSe;){var t=CSe;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{kSe(4,t)}catch(e){Q_e(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Q_e(t,i,e)}}var a=t.return;try{RSe(t)}catch(e){Q_e(t,a,e)}break;case 5:var o=t.return;try{RSe(t)}catch(e){Q_e(t,o,e)}}}catch(e){Q_e(t,t.return,e)}if(t===e){CSe=null;break}var s=t.sibling;if(null!==s){s.return=t.return,CSe=s;break}CSe=t.return}}var ZSe,QSe=Math.ceil,$Se=Jve.ReactCurrentDispatcher,e_e=Jve.ReactCurrentOwner,t_e=Jve.ReactCurrentBatchConfig,n_e=0,r_e=null,i_e=null,a_e=0,o_e=0,s_e=Qxe(0),c_e=0,u_e=null,l_e=0,d_e=0,f_e=0,p_e=null,h_e=null,m_e=0,y_e=1/0,b_e=null,g_e=!1,v_e=null,w_e=null,T_e=!1,E_e=null,A_e=0,x_e=0,O_e=null,C_e=-1,I_e=0;function S_e(){return 0!=(6&n_e)?CTe():-1!==C_e?C_e:C_e=CTe()}function __e(e){return 0==(1&e.mode)?1:0!=(2&n_e)&&0!==a_e?a_e&-a_e:null!==WOe.transition?(0===I_e&&(I_e=VTe()),I_e):0!==(e=XTe)?e:e=void 0===(e=window.event)?16:OEe(e.type)}function P_e(e,t,n,r){if(50<x_e)throw x_e=0,O_e=null,Error(Dve(185));qTe(e,n,r),0!=(2&n_e)&&e===r_e||(e===r_e&&(0==(2&n_e)&&(d_e|=n),4===c_e&&D_e(e,a_e)),k_e(e,r),1===n&&0===n_e&&0==(1&t.mode)&&(y_e=CTe()+500,pOe&&yOe()))}function k_e(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-DTe(a),s=1<<o,c=i[o];-1===c?0!=(s&n)&&0==(s&r)||(i[o]=HTe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=zTe(e,e===r_e?a_e:0);if(0===r)null!==n&&ATe(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&ATe(n),1===t)0===e.tag?function(e){pOe=!0,mOe(e)}(L_e.bind(null,e)):mOe(L_e.bind(null,e)),Mxe((function(){0==(6&n_e)&&yOe()})),n=null;else{switch(YTe(r)){case 1:n=STe;break;case 4:n=_Te;break;case 16:default:n=PTe;break;case 536870912:n=RTe}n=rPe(n,R_e.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function R_e(e,t){if(C_e=-1,I_e=0,0!=(6&n_e))throw Error(Dve(327));var n=e.callbackNode;if(J_e()&&e.callbackNode!==n)return null;var r=zTe(e,e===r_e?a_e:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=V_e(e,r);else{t=r;var i=n_e;n_e|=2;var a=H_e();for(r_e===e&&a_e===t||(b_e=null,y_e=CTe()+500,U_e(e,t));;)try{q_e();break}catch(t){z_e(e,t)}YOe(),$Se.current=a,n_e=i,null!==i_e?t=0:(r_e=null,a_e=0,t=c_e)}if(0!==t){if(2===t&&(0!==(i=WTe(e))&&(r=i,t=N_e(e,i))),1===t)throw n=u_e,U_e(e,0),D_e(e,r),k_e(e,CTe()),n;if(6===t)D_e(e,r);else{if(i=e.current.alternate,0==(30&r)&&!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],a=i.getSnapshot;i=i.value;try{if(!DAe(a(),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}(i)&&(2===(t=V_e(e,r))&&(0!==(a=WTe(e))&&(r=a,t=N_e(e,a))),1===t))throw n=u_e,U_e(e,0),D_e(e,r),k_e(e,CTe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Dve(345));case 2:case 5:Y_e(e,h_e,b_e);break;case 3:if(D_e(e,r),(130023424&r)===r&&10<(t=m_e+500-CTe())){if(0!==zTe(e,0))break;if(((i=e.suspendedLanes)&r)!==r){S_e(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=kxe(Y_e.bind(null,e,h_e,b_e),t);break}Y_e(e,h_e,b_e);break;case 4:if(D_e(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-DTe(r);a=1<<o,(o=t[o])>i&&(i=o),r&=~a}if(r=i,10<(r=(120>(r=CTe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*QSe(r/1960))-r)){e.timeoutHandle=kxe(Y_e.bind(null,e,h_e,b_e),r);break}Y_e(e,h_e,b_e);break;default:throw Error(Dve(329))}}}return k_e(e,CTe()),e.callbackNode===n?R_e.bind(null,e):null}function N_e(e,t){var n=p_e;return e.current.memoizedState.isDehydrated&&(U_e(e,t).flags|=256),2!==(e=V_e(e,t))&&(t=h_e,h_e=n,null!==t&&M_e(t)),e}function M_e(e){null===h_e?h_e=e:h_e.push.apply(h_e,e)}function D_e(e,t){for(t&=~f_e,t&=~d_e,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-DTe(t),r=1<<n;e[n]=-1,t&=~r}}function L_e(e){if(0!=(6&n_e))throw Error(Dve(327));J_e();var t=zTe(e,0);if(0==(1&t))return k_e(e,CTe()),null;var n=V_e(e,t);if(0!==e.tag&&2===n){var r=WTe(e);0!==r&&(t=r,n=N_e(e,r))}if(1===n)throw n=u_e,U_e(e,0),D_e(e,t),k_e(e,CTe()),n;if(6===n)throw Error(Dve(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Y_e(e,h_e,b_e),k_e(e,CTe()),null}function F_e(e,t){var n=n_e;n_e|=1;try{return e(t)}finally{0===(n_e=n)&&(y_e=CTe()+500,pOe&&yOe())}}function B_e(e){null!==E_e&&0===E_e.tag&&0==(6&n_e)&&J_e();var t=n_e;n_e|=1;var n=t_e.transition,r=XTe;try{if(t_e.transition=null,XTe=1,e)return e()}finally{XTe=r,t_e.transition=n,0==(6&(n_e=t))&&yOe()}}function j_e(){o_e=s_e.current,$xe(s_e)}function U_e(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Rxe(n)),null!==i_e)for(n=i_e.return;null!==n;){var r=n;switch(_Oe(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&sOe();break;case 3:RCe(),$xe(rOe),$xe(nOe),BCe();break;case 5:MCe(r);break;case 4:RCe();break;case 13:case 19:$xe(DCe);break;case 10:JOe(r.type._context);break;case 22:case 23:j_e()}n=n.return}if(r_e=e,i_e=e=sPe(e.current,null),a_e=o_e=t,c_e=0,u_e=null,f_e=d_e=l_e=0,h_e=p_e=null,null!==eCe){for(t=0;t<eCe.length;t++)if(null!==(r=(n=eCe[t]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var o=a.next;a.next=i,r.next=o}n.pending=r}eCe=null}return e}function z_e(e,t){for(;;){var n=i_e;try{if(YOe(),jCe.current=NIe,GCe){for(var r=HCe.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}GCe=!1}if(zCe=0,VCe=WCe=HCe=null,qCe=!1,KCe=0,e_e.current=null,null===n||null===n.return){c_e=1,u_e=t,i_e=null;break}e:{var a=e,o=n.return,s=n,c=t;if(t=a_e,s.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,l=s,d=l.tag;if(0==(1&l.mode)&&(0===d||11===d||15===d)){var f=l.alternate;f?(l.updateQueue=f.updateQueue,l.memoizedState=f.memoizedState,l.lanes=f.lanes):(l.updateQueue=null,l.memoizedState=null)}var p=VIe(o);if(null!==p){p.flags&=-257,GIe(p,o,s,0,t),1&p.mode&&WIe(a,u,t),c=u;var h=(t=p).updateQueue;if(null===h){var m=new Set;m.add(c),t.updateQueue=m}else h.add(c);break e}if(0==(1&t)){WIe(a,u,t),W_e();break e}c=Error(Dve(426))}else if(ROe&&1&s.mode){var y=VIe(o);if(null!==y){0==(65536&y.flags)&&(y.flags|=256),GIe(y,o,s,0,t),HOe(FIe(c,s));break e}}a=c=FIe(c,s),4!==c_e&&(c_e=2),null===p_e?p_e=[a]:p_e.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,lCe(a,zIe(0,c,t));break e;case 1:s=c;var b=a.type,g=a.stateNode;if(0==(128&a.flags)&&("function"==typeof b.getDerivedStateFromError||null!==g&&"function"==typeof g.componentDidCatch&&(null===w_e||!w_e.has(g)))){a.flags|=65536,t&=-t,a.lanes|=t,lCe(a,HIe(a,s,t));break e}}a=a.return}while(null!==a)}X_e(n)}catch(e){t=e,i_e===n&&null!==n&&(i_e=n=n.return);continue}break}}function H_e(){var e=$Se.current;return $Se.current=NIe,null===e?NIe:e}function W_e(){0!==c_e&&3!==c_e&&2!==c_e||(c_e=4),null===r_e||0==(268435455&l_e)&&0==(268435455&d_e)||D_e(r_e,a_e)}function V_e(e,t){var n=n_e;n_e|=2;var r=H_e();for(r_e===e&&a_e===t||(b_e=null,U_e(e,t));;)try{G_e();break}catch(t){z_e(e,t)}if(YOe(),n_e=n,$Se.current=r,null!==i_e)throw Error(Dve(261));return r_e=null,a_e=0,c_e}function G_e(){for(;null!==i_e;)K_e(i_e)}function q_e(){for(;null!==i_e&&!xTe();)K_e(i_e)}function K_e(e){var t=ZSe(e.alternate,e,o_e);e.memoizedProps=e.pendingProps,null===t?X_e(e):i_e=t,e_e.current=null}function X_e(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=TSe(n,t,o_e)))return void(i_e=n)}else{if(null!==(n=ESe(n,t)))return n.flags&=32767,void(i_e=n);if(null===e)return c_e=6,void(i_e=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(i_e=t);i_e=t=e}while(null!==t);0===c_e&&(c_e=5)}function Y_e(e,t,n){var r=XTe,i=t_e.transition;try{t_e.transition=null,XTe=1,function(e,t,n,r){do{J_e()}while(null!==E_e);if(0!=(6&n_e))throw Error(Dve(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Dve(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.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-DTe(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}(e,a),e===r_e&&(i_e=r_e=null,a_e=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||T_e||(T_e=!0,rPe(PTe,(function(){return J_e(),null}))),a=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||a){a=t_e.transition,t_e.transition=null;var o=XTe;XTe=1;var s=n_e;n_e|=4,e_e.current=null,function(e,t){if(Sxe=vEe,zAe(e=UAe())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var o=0,s=-1,c=-1,u=0,l=0,d=e,f=null;t:for(;;){for(var p;d!==n||0!==i&&3!==d.nodeType||(s=o+i),d!==a||0!==r&&3!==d.nodeType||(c=o+r),3===d.nodeType&&(o+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===i&&(s=o),f===a&&++l===r&&(c=o),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===s||-1===c?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(_xe={focusedElem:e,selectionRange:n},vEe=!1,CSe=t;null!==CSe;)if(e=(t=CSe).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,CSe=e;else for(;null!==CSe;){t=CSe;try{var h=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!==h){var m=h.memoizedProps,y=h.memoizedState,b=t.stateNode,g=b.getSnapshotBeforeUpdate(t.elementType===t.type?m:VOe(t.type,m),y);b.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=t.stateNode.containerInfo;1===v.nodeType?v.textContent="":9===v.nodeType&&v.documentElement&&v.removeChild(v.documentElement);break;default:throw Error(Dve(163))}}catch(e){Q_e(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,CSe=e;break}CSe=t.return}h=_Se,_Se=!1}(e,n),VSe(n,e),HAe(_xe),vEe=!!Sxe,_xe=Sxe=null,e.current=n,qSe(n),OTe(),n_e=s,XTe=o,t_e.transition=a}else e.current=n;if(T_e&&(T_e=!1,E_e=e,A_e=i),a=e.pendingLanes,0===a&&(w_e=null),function(e){if(MTe&&"function"==typeof MTe.onCommitFiberRoot)try{MTe.onCommitFiberRoot(NTe,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),k_e(e,CTe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(g_e)throw g_e=!1,e=v_e,v_e=null,e;0!=(1&A_e)&&0!==e.tag&&J_e(),a=e.pendingLanes,0!=(1&a)?e===O_e?x_e++:(x_e=0,O_e=e):x_e=0,yOe()}(e,t,n,r)}finally{t_e.transition=i,XTe=r}return null}function J_e(){if(null!==E_e){var e=YTe(A_e),t=t_e.transition,n=XTe;try{if(t_e.transition=null,XTe=16>e?16:e,null===E_e)var r=!1;else{if(e=E_e,E_e=null,A_e=0,0!=(6&n_e))throw Error(Dve(331));var i=n_e;for(n_e|=4,CSe=e.current;null!==CSe;){var a=CSe,o=a.child;if(0!=(16&CSe.flags)){var s=a.deletions;if(null!==s){for(var c=0;c<s.length;c++){var u=s[c];for(CSe=u;null!==CSe;){var l=CSe;switch(l.tag){case 0:case 11:case 15:PSe(8,l,a)}var d=l.child;if(null!==d)d.return=l,CSe=d;else for(;null!==CSe;){var f=(l=CSe).sibling,p=l.return;if(NSe(l),l===u){CSe=null;break}if(null!==f){f.return=p,CSe=f;break}CSe=p}}}var h=a.alternate;if(null!==h){var m=h.child;if(null!==m){h.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(null!==m)}}CSe=a}}if(0!=(2064&a.subtreeFlags)&&null!==o)o.return=a,CSe=o;else e:for(;null!==CSe;){if(0!=(2048&(a=CSe).flags))switch(a.tag){case 0:case 11:case 15:PSe(9,a,a.return)}var b=a.sibling;if(null!==b){b.return=a.return,CSe=b;break e}CSe=a.return}}var g=e.current;for(CSe=g;null!==CSe;){var v=(o=CSe).child;if(0!=(2064&o.subtreeFlags)&&null!==v)v.return=o,CSe=v;else e:for(o=g;null!==CSe;){if(0!=(2048&(s=CSe).flags))try{switch(s.tag){case 0:case 11:case 15:kSe(9,s)}}catch(e){Q_e(s,s.return,e)}if(s===o){CSe=null;break e}var w=s.sibling;if(null!==w){w.return=s.return,CSe=w;break e}CSe=s.return}}if(n_e=i,yOe(),MTe&&"function"==typeof MTe.onPostCommitFiberRoot)try{MTe.onPostCommitFiberRoot(NTe,e)}catch(e){}r=!0}return r}finally{XTe=n,t_e.transition=t}}return!1}function Z_e(e,t,n){e=cCe(e,t=zIe(0,t=FIe(n,t),1),1),t=S_e(),null!==e&&(qTe(e,1,t),k_e(e,t))}function Q_e(e,t,n){if(3===e.tag)Z_e(e,e,n);else for(;null!==t;){if(3===t.tag){Z_e(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===w_e||!w_e.has(r))){t=cCe(t,e=HIe(t,e=FIe(n,e),1),1),e=S_e(),null!==t&&(qTe(t,1,e),k_e(t,e));break}}t=t.return}}function $_e(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=S_e(),e.pingedLanes|=e.suspendedLanes&n,r_e===e&&(a_e&n)===n&&(4===c_e||3===c_e&&(130023424&a_e)===a_e&&500>CTe()-m_e?U_e(e,0):f_e|=n),k_e(e,t)}function ePe(e,t){0===t&&(0==(1&e.mode)?t=1:(t=jTe,0==(130023424&(jTe<<=1))&&(jTe=4194304)));var n=S_e();null!==(e=rCe(e,t))&&(qTe(e,t,n),k_e(e,n))}function tPe(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),ePe(e,n)}function nPe(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Dve(314))}null!==r&&r.delete(t),ePe(e,n)}function rPe(e,t){return ETe(e,t)}function iPe(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 aPe(e,t,n,r){return new iPe(e,t,n,r)}function oPe(e){return!(!(e=e.prototype)||!e.isReactComponent)}function sPe(e,t){var n=e.alternate;return null===n?((n=aPe(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 cPe(e,t,n,r,i,a){var o=2;if(r=e,"function"==typeof e)oPe(e)&&(o=1);else if("string"==typeof e)o=5;else e:switch(e){case $ve:return uPe(n.children,i,a,t);case ewe:o=8,i|=8;break;case twe:return(e=aPe(12,n,t,2|i)).elementType=twe,e.lanes=a,e;case awe:return(e=aPe(13,n,t,i)).elementType=awe,e.lanes=a,e;case owe:return(e=aPe(19,n,t,i)).elementType=owe,e.lanes=a,e;case uwe:return lPe(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case nwe:o=10;break e;case rwe:o=9;break e;case iwe:o=11;break e;case swe:o=14;break e;case cwe:o=16,r=null;break e}throw Error(Dve(130,null==e?e:typeof e,""))}return(t=aPe(o,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function uPe(e,t,n,r){return(e=aPe(7,e,r,t)).lanes=n,e}function lPe(e,t,n,r){return(e=aPe(22,e,r,t)).elementType=uwe,e.lanes=n,e.stateNode={isHidden:!1},e}function dPe(e,t,n){return(e=aPe(6,e,null,t)).lanes=n,e}function fPe(e,t,n){return(t=aPe(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pPe(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=GTe(0),this.expirationTimes=GTe(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=GTe(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function hPe(e,t,n,r,i,a,o,s,c){return e=new pPe(e,t,n,s,c),1===t?(t=1,!0===a&&(t|=8)):t=0,a=aPe(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},aCe(a),e}function mPe(e){if(!e)return tOe;e:{if(bTe(e=e._reactInternals)!==e||1!==e.tag)throw Error(Dve(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(oOe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(Dve(171))}if(1===e.tag){var n=e.type;if(oOe(n))return uOe(e,n,t)}return t}function yPe(e,t,n,r,i,a,o,s,c){return(e=hPe(n,r,!0,e,0,a,0,s,c)).context=mPe(null),n=e.current,(a=sCe(r=S_e(),i=__e(n))).callback=null!=t?t:null,cCe(n,a,i),e.current.lanes=i,qTe(e,i,r),k_e(e,r),e}function bPe(e,t,n,r){var i=t.current,a=S_e(),o=__e(i);return n=mPe(n),null===t.context?t.context=n:t.pendingContext=n,(t=sCe(a,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=cCe(i,t,o))&&(P_e(e,i,o,a),uCe(e,i,o)),o}function gPe(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function vPe(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function wPe(e,t){vPe(e,t),(e=e.alternate)&&vPe(e,t)}ZSe=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||rOe.current)KIe=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return KIe=!1,function(e,t,n){switch(t.tag){case 3:rSe(t),zOe();break;case 5:NCe(t);break;case 1:oOe(t.type)&&lOe(t);break;case 4:kCe(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;eOe(GOe,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(eOe(DCe,1&DCe.current),t.flags|=128,null):0!=(n&t.child.childLanes)?dSe(e,t,n):(eOe(DCe,1&DCe.current),null!==(e=gSe(e,t,n))?e.sibling:null);eOe(DCe,1&DCe.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return ySe(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),eOe(DCe,DCe.current),r)break;return null;case 22:case 23:return t.lanes=0,QIe(e,t,n)}return gSe(e,t,n)}(e,t,n);KIe=0!=(131072&e.flags)}else KIe=!1,ROe&&0!=(1048576&t.flags)&&IOe(t,wOe,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;bSe(e,t),e=t.pendingProps;var i=aOe(t,nOe.current);QOe(t,n),i=ZCe(null,t,r,e,i,n);var a=QCe();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,oOe(r)?(a=!0,lOe(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,aCe(t),i.updater=mCe,t.stateNode=i,i._reactInternals=t,vCe(t,r,e,n),t=nSe(null,t,r,!0,a,n)):(t.tag=0,ROe&&a&&SOe(t),XIe(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(bSe(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return oPe(e)?1:0;if(null!=e){if((e=e.$$typeof)===iwe)return 11;if(e===swe)return 14}return 2}(r),e=VOe(r,e),i){case 0:t=eSe(null,t,r,e,n);break e;case 1:t=tSe(null,t,r,e,n);break e;case 11:t=YIe(null,t,r,e,n);break e;case 14:t=JIe(null,t,r,VOe(r.type,e),n);break e}throw Error(Dve(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,eSe(e,t,r,i=t.elementType===r?i:VOe(r,i),n);case 1:return r=t.type,i=t.pendingProps,tSe(e,t,r,i=t.elementType===r?i:VOe(r,i),n);case 3:e:{if(rSe(t),null===e)throw Error(Dve(387));r=t.pendingProps,i=(a=t.memoizedState).element,oCe(e,t),dCe(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=iSe(e,t,r,n,i=FIe(Error(Dve(423)),t));break e}if(r!==i){t=iSe(e,t,r,n,i=FIe(Error(Dve(424)),t));break e}for(kOe=Fxe(t.stateNode.containerInfo.firstChild),POe=t,ROe=!0,NOe=null,n=OCe(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(zOe(),r===i){t=gSe(e,t,n);break e}XIe(e,t,r,n)}t=t.child}return t;case 5:return NCe(t),null===e&&FOe(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,o=i.children,Pxe(r,i)?o=null:null!==a&&Pxe(r,a)&&(t.flags|=32),$Ie(e,t),XIe(e,t,o,n),t.child;case 6:return null===e&&FOe(t),null;case 13:return dSe(e,t,n);case 4:return kCe(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=xCe(t,null,r,n):XIe(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,YIe(e,t,r,i=t.elementType===r?i:VOe(r,i),n);case 7:return XIe(e,t,t.pendingProps,n),t.child;case 8:case 12:return XIe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,eOe(GOe,r._currentValue),r._currentValue=o,null!==a)if(DAe(a.value,o)){if(a.children===i.children&&!rOe.current){t=gSe(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var s=a.dependencies;if(null!==s){o=a.child;for(var c=s.firstContext;null!==c;){if(c.context===r){if(1===a.tag){(c=sCe(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var l=(u=u.shared).pending;null===l?c.next=c:(c.next=l.next,l.next=c),u.pending=c}}a.lanes|=n,null!==(c=a.alternate)&&(c.lanes|=n),ZOe(a.return,n,t),s.lanes|=n;break}c=c.next}}else if(10===a.tag)o=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(o=a.return))throw Error(Dve(341));o.lanes|=n,null!==(s=o.alternate)&&(s.lanes|=n),ZOe(o,n,t),o=a.sibling}else o=a.child;if(null!==o)o.return=a;else for(o=a;null!==o;){if(o===t){o=null;break}if(null!==(a=o.sibling)){a.return=o.return,o=a;break}o=o.return}a=o}XIe(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,QOe(t,n),r=r(i=$Oe(i)),t.flags|=1,XIe(e,t,r,n),t.child;case 14:return i=VOe(r=t.type,t.pendingProps),JIe(e,t,r,i=VOe(r.type,i),n);case 15:return ZIe(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:VOe(r,i),bSe(e,t),t.tag=1,oOe(r)?(e=!0,lOe(t)):e=!1,QOe(t,n),bCe(t,r,i),vCe(t,r,i,n),nSe(null,t,r,!0,e,n);case 19:return ySe(e,t,n);case 22:return QIe(e,t,n)}throw Error(Dve(156,t.tag))};var TPe="function"==typeof reportError?reportError:function(e){console.error(e)};function EPe(e){this._internalRoot=e}function APe(e){this._internalRoot=e}function xPe(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function OPe(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function CPe(){}function IPe(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if("function"==typeof i){var s=i;i=function(){var e=gPe(o);s.call(e)}}bPe(t,o,e,i)}else o=function(e,t,n,r,i){if(i){if("function"==typeof r){var a=r;r=function(){var e=gPe(o);a.call(e)}}var o=yPe(t,r,e,0,null,!1,0,"",CPe);return e._reactRootContainer=o,e[Hxe]=o.current,yxe(8===e.nodeType?e.parentNode:e),B_e(),o}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=gPe(c);s.call(e)}}var c=hPe(e,0,!1,null,0,!1,0,"",CPe);return e._reactRootContainer=c,e[Hxe]=c.current,yxe(8===e.nodeType?e.parentNode:e),B_e((function(){bPe(t,c,n,r)})),c}(n,t,e,i,r);return gPe(o)}APe.prototype.render=EPe.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(Dve(409));bPe(e,t,null,null)},APe.prototype.unmount=EPe.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;B_e((function(){bPe(null,e,null,null)})),t[Hxe]=null}},APe.prototype.unstable_scheduleHydration=function(e){if(e){var t=$Te();e={blockedOn:null,target:e,priority:t};for(var n=0;n<cEe.length&&0!==t&&t<cEe[n].priority;n++);cEe.splice(n,0,e),0===n&&fEe(e)}},JTe=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=UTe(t.pendingLanes);0!==n&&(KTe(t,1|n),k_e(t,CTe()),0==(6&n_e)&&(y_e=CTe()+500,yOe()))}break;case 13:B_e((function(){var t=rCe(e,1);if(null!==t){var n=S_e();P_e(t,e,1,n)}})),wPe(e,1)}},ZTe=function(e){if(13===e.tag){var t=rCe(e,134217728);if(null!==t)P_e(t,e,134217728,S_e());wPe(e,134217728)}},QTe=function(e){if(13===e.tag){var t=__e(e),n=rCe(e,t);if(null!==n)P_e(n,e,t,S_e());wPe(e,t)}},$Te=function(){return XTe},eEe=function(e,t){var n=XTe;try{return XTe=e,t()}finally{XTe=n}},Zwe=function(e,t,n){switch(t){case"input":if(Swe(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Yxe(r);if(!i)throw Error(Dve(90));Awe(r),Swe(r,i)}}}break;case"textarea":Dwe(e,n);break;case"select":null!=(t=n.value)&&Rwe(e,!!n.multiple,t,!1)}},rTe=F_e,iTe=B_e;var SPe={usingClientEntryPoint:!1,Events:[Kxe,Xxe,Yxe,tTe,nTe,F_e]},_Pe={findFiberByHostInstance:qxe,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},PPe={bundleType:_Pe.bundleType,version:_Pe.version,rendererPackageName:_Pe.rendererPackageName,rendererConfig:_Pe.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Jve.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=wTe(e))?null:e.stateNode},findFiberByHostInstance:_Pe.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 kPe=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kPe.isDisabled&&kPe.supportsFiber)try{NTe=kPe.inject(PPe),MTe=kPe}catch(K8e){}}_ve.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=SPe,_ve.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!xPe(t))throw Error(Dve(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Qve,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},_ve.createRoot=function(e,t){if(!xPe(e))throw Error(Dve(299));var n=!1,r="",i=TPe;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=hPe(e,1,!1,null,0,n,0,r,i),e[Hxe]=t.current,yxe(8===e.nodeType?e.parentNode:e),new EPe(t)},_ve.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(Dve(188));throw e=Object.keys(e).join(","),Error(Dve(268,e))}return e=null===(e=wTe(t))?null:e.stateNode},_ve.flushSync=function(e){return B_e(e)},_ve.hydrate=function(e,t,n){if(!OPe(t))throw Error(Dve(200));return IPe(null,e,t,!0,n)},_ve.hydrateRoot=function(e,t,n){if(!xPe(e))throw Error(Dve(405));var r=null!=n&&n.hydratedSources||null,i=!1,a="",o=TPe;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(o=n.onRecoverableError)),t=yPe(t,null,e,1,null!=n?n:null,i,0,a,o),e[Hxe]=t.current,yxe(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new APe(t)},_ve.render=function(e,t,n){if(!OPe(t))throw Error(Dve(200));return IPe(null,e,t,!1,n)},_ve.unmountComponentAtNode=function(e){if(!OPe(e))throw Error(Dve(40));return!!e._reactRootContainer&&(B_e((function(){IPe(null,null,e,!1,(function(){e._reactRootContainer=null,e[Hxe]=null}))})),!0)},_ve.unstable_batchedUpdates=F_e,_ve.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!OPe(n))throw Error(Dve(200));if(null==e||void 0===e._reactInternals)throw Error(Dve(38));return IPe(e,t,n,!1,r)},_ve.version="18.2.0-next-9e3b772b8-20220608",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),Sve.exports=_ve;var RPe=Sve.exports;function NPe(e){var t=e.children,n=e.selector,r=$Q.useContext(Bme),i=$Q.useRef(null),a=e5($Q.useState(!1),2),o=a[0],s=a[1];return bde((function(){return i.current=r?r.querySelector(n):document.querySelector(n),i.current&&s(!0),function(){return s(!1)}}),[n]),o&&i.current?RPe.createPortal(t,i.current):null}function MPe(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 DPe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MPe(Object(n),!0).forEach((function(t){r5(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MPe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function LPe(e){switch(e){case"topLeft":return{top:"base.spacing.x6",left:"base.spacing.x6",marginRight:"base.spacing.x4"};case"topCenter":return{top:"base.spacing.x6",left:"50%",translate:"-50% 0",marginLeft:"base.spacing.x4",marginRight:"base.spacing.x4"};case"bottomLeft":return{bottom:"base.spacing.x6",left:"base.spacing.x6",marginRight:"base.spacing.x4"};case"bottomRight":return{bottom:"base.spacing.x6",right:"base.spacing.x6",marginLeft:"base.spacing.x4"};case"bottomCenter":return{bottom:"base.spacing.x6",left:"50%",translate:"-50% 0",marginLeft:"base.spacing.x4",marginRight:"base.spacing.x4"};default:return{top:"base.spacing.x6",right:"base.spacing.x6",marginLeft:"base.spacing.x6"}}}var FPe="12px",BPe="-12px",jPe="-12px",UPe="12px",zPe="0px";function HPe(){var e=fde((function(e){return e.toastList})).state,t=$Q.useMemo((function(){return{topLeft:e.filter((function(e){var t=e.position,n=t.x;return"top"===t.y&&"left"===n})),topCenter:e.filter((function(e){var t=e.position,n=t.x;return"top"===t.y&&"center"===n})),topRight:e.filter((function(e){var t=e.position,n=t.x;return"top"===t.y&&"right"===n})),bottomLeft:e.filter((function(e){var t=e.position,n=t.x;return"bottom"===t.y&&"left"===n})),bottomRight:e.filter((function(e){var t=e.position,n=t.x;return"bottom"===t.y&&"right"===n})),bottomCenter:e.filter((function(e){var t=e.position,n=t.x;return"bottom"===t.y&&"center"===n}))}}),[e]);return y1(N7,{children:Object.keys(t).map((function(e){var n=e,r=t[n];return 0===r.length?null:y1(Rae,{"data-toast-group":n,testId:"toastsContainer--".concat(n),sx:DPe(DPe(DPe({},Sae),LPe(n)),{},{gap:"base.spacing.x2",position:"fixed",zIndex:"base.zLevel.toast",alignItems:"center"}),rc:y1(C7.div,{initial:DPe(DPe(DPe(DPe(DPe(DPe({opacity:0},"topRight"===n&&{x:FPe}),"topLeft"===n&&{x:BPe}),"topCenter"===n&&{y:jPe}),"bottomRight"===n&&{x:FPe}),"bottomLeft"===n&&{x:BPe}),"bottomCenter"===n&&{y:UPe}),exit:DPe(DPe(DPe(DPe(DPe(DPe({opacity:0},"topRight"===n&&{x:FPe}),"topLeft"===n&&{x:BPe}),"topCenter"===n&&{y:jPe}),"bottomRight"===n&&{x:FPe}),"bottomLeft"===n&&{x:BPe}),"bottomCenter"===n&&{y:UPe}),animate:DPe(DPe(DPe(DPe(DPe(DPe({opacity:1},"topRight"===n&&{x:zPe}),"topLeft"===n&&{x:zPe}),"topCenter"===n&&{y:zPe}),"bottomRight"===n&&{x:zPe}),"bottomLeft"===n&&{x:zPe}),"bottomCenter"===n&&{y:zPe}),transition:{duration:cce.base.motion.normal.fast.jsDuration,ease:cce.base.motion.normal.fast.jsEase}}),children:y1(N7,{children:r.map((function(e){var t=e.id,r=e.content,i=e.hideDismissButton,a=e.variant,o=e.onCloseToast,s=e.buttonsPosition,c=e.testId,u=e.sx,l=void 0===u?{}:u,d=function(e,t){var n=t;Array.isArray(t)||(n=[t]);var r=[],i=[],a=nee(e);return $Q.Children.forEach(a,(function(e){Yse(e,n)?r.push(e):i.push(e)})),{subcomponents:r,otherChildren:0===i.length?null:1===i.length?i[0]:i}}(r,[Gge,Fge,zge]),f=d.otherChildren;return b1(Rae,{"data-id":t,testId:null!=c?c:"toastsContainer__toast",sx:D7(DPe(DPe({},"right"===s?DPe(DPe({},Iae),{},{alignItems:"center",justifyContent:"space-between"}):DPe({},Sae)),{},{gap:"base.spacing.x4",bg:"base.color.translucent.standard.1000",p:"base.spacing.x2",pr:"base.spacing.x3",pl:"base.spacing.x9",brad:"base.borderRadius.x6",minw:"230px",maxw:"450px",minh:"64px",boxShadow:"base.shadow.500",position:"relative"}),l),rc:y1(C7.div,{initial:DPe(DPe(DPe(DPe(DPe(DPe({opacity:0},"topRight"===n&&{x:FPe}),"topLeft"===n&&{x:BPe}),"topCenter"===n&&{y:jPe}),"bottomRight"===n&&{x:FPe}),"bottomLeft"===n&&{x:BPe}),"bottomCenter"===n&&{y:UPe}),exit:DPe(DPe(DPe(DPe(DPe(DPe({opacity:0},"topRight"===n&&{x:FPe}),"topLeft"===n&&{x:FPe}),"topCenter"===n&&{y:jPe}),"bottomRight"===n&&{x:FPe}),"bottomLeft"===n&&{x:BPe}),"bottomCenter"===n&&{y:UPe}),animate:DPe(DPe(DPe(DPe(DPe(DPe({opacity:1},"topRight"===n&&{x:zPe}),"topLeft"===n&&{x:zPe}),"topCenter"===n&&{y:zPe}),"bottomRight"===n&&{x:zPe}),"bottomLeft"===n&&{x:zPe}),"bottomCenter"===n&&{y:zPe}),transition:{duration:cce.base.motion.normal.fast.jsDuration,ease:cce.base.motion.normal.fast.jsEase}}),children:[y1(Rae,{testId:"toastVariantBar",sx:{top:"base.spacing.x2",bottom:"base.spacing.x2",position:"absolute",left:"base.spacing.x2",width:"6px",brad:"base.borderRadius.x6",bg:"base.color.status.".concat(a,".bright")}}),$Q.Children.map(r,(function(e){return Iee(e,Gge)?e:null})),b1(Rae,{sx:DPe(DPe(DPe({},Iae),"bottomRight"===s?{justifyContent:"flex-end"}:{}),{},{gap:"base.spacing.x1"}),children:[$Q.Children.map(r,(function(e){return Iee(e,Fge)||Iee(e,zge)?e:null})),i?null:y1(zge,{testId:"dismissToastButton",onClick:function(){null==o||o()},children:"Dismiss"})]}),f]},t)}))})},n)}))})}var WPe="modal-container",VPe="drawer-container",GPe="popover-container",qPe="toast-container";function KPe(e){var t=e.children,n=e.modalContainerId,r=e.drawerContainerId,i=e.popoverContainerId,a=e.toastContainerId,o=$Q.useContext(Ove),s=Nte().base.zLevel;return b1(dde,{children:[t,y1(NPe,{selector:n?"#".concat(n):"#".concat(WPe).concat(o),children:y1(ive,{hasExternalContainer:Boolean(n)})}),!n&&y1("div",{id:"".concat(WPe).concat(o)}),y1(NPe,{selector:r?"#".concat(r):"#".concat(VPe).concat(o),children:y1(tve,{hasExternalContainer:Boolean(r)})}),!r&&y1("div",{id:"".concat(VPe).concat(o)}),y1(NPe,{selector:i?"".concat(i):"#".concat(GPe).concat(o),children:y1(mve,{})}),!i&&y1("div",{id:"".concat(GPe).concat(o),css:D7(Ive,{zIndex:s.popover})}),y1(NPe,{selector:a?"#".concat(a):"#".concat(qPe).concat(o),children:y1(HPe,{})}),!a&&y1("div",{id:"".concat(qPe).concat(o)})]})}var XPe=40;function YPe(e){var t=e.resizeDebounceDuration,n=void 0===t?XPe:t,r=kie((function(e){return e})).setState;return Lle("resize",Yoe((function(){r({width:window.innerWidth,height:window.innerHeight})}),n),{current:"undefined"!=typeof window?window:null}),cse((function(){return r({width:window.innerWidth,height:window.innerHeight})}),[]),null}var JPe="tooltip-container";function ZPe(e){var t=e.children,n=$Q.useContext(Ove),r=Nte().base.zLevel;return b1(jye,{children:[t,y1(NPe,{selector:"#".concat(JPe).concat(n),children:y1(xve,{})}),y1("div",{id:"".concat(JPe).concat(n),css:D7(Ive,{zIndex:r.tooltip})})]})}var QPe={"*, *::before, *::after":{boxSizing:"border-box"},"html, body":{height:"100%",margin:0},"pre, p, h1, h2, h3, h4, h5, h6":{margin:0},body:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",textRendering:"optimizeLegibility"}},$Pe={name:"thqmy6",styles:"@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap');{}@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');{}"};function eke(e){return e?[]:[$Pe,{"@font-face":{fontFamily:"Suisse-Intl",fontWeight:400,fontStyle:"normal",fontDisplay:"swap",src:"url('https://biome.immutable.com/hosted-assets/fonts/suisseintl-regular.woff2')\n format('woff2')"}},{"@font-face":{fontFamily:"Suisse-Intl",fontWeight:600,fontStyle:"normal",fontDisplay:"swap",src:"url('https://biome.immutable.com/hosted-assets/fonts/suisseintl-medium.woff2')\n format('woff2')"}},{"@font-face":{fontFamily:"Suisse-Intl",fontWeight:700,fontStyle:"normal",fontDisplay:"swap",src:"url('https://biome.immutable.com/hosted-assets/fonts/suisseintl-bold.woff2')\n format('woff2')"}}]}var tke=["base"];function nke(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 rke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nke(Object(n),!0).forEach((function(t){r5(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ike(e,t){var n;if(function(e){return"string"!=typeof e&&"number"!=typeof e&&!Array.isArray(e)&&null!=e}(e))for(n in e){var r=e[n];"object"===t5(r)?e[n]=ike(e[n],t):"string"==typeof r&&r.includes("base.")&&(e[n]=xte(t,r))}return e}var ake=cce;function oke(e){var t=e.children,n=e.theme,r=void 0===n?ake:n,i=e.globalSx,a=void 0===i?{}:i,o=e.skipFontLoad,s=void 0!==o&&o,c=function(e){var t=e.base,n=i5(e,tke),r=t.color;return rke({base:rke(rke({},t),{},{color:ike(r,e),breakpointAsArray:Object.values(t.breakpoint)})},n)}(r),u=Mte(D7(QPe,a),c);return b1(u1,{theme:c,children:[y1(o5,{styles:[].concat(iee(eke(s)),[u,"",""])}),t]})}var ske=$Q.createContext({toggleTheme:function(){},currentTheme:{base:oce}});function cke(e){var t=e.children,n=e.lightTheme,r=void 0===n?{base:oce}:n,i=e.darkTheme,a=void 0===i?{base:sce}:i,o=e.autoPickTheme,s=void 0!==o&&o,c=e.globalSx,u=e.skipFontLoad,l=e5($Q.useState({base:oce}),2),d=l[0],f=l[1],p=$Q.useCallback((function(){f(d.base===oce?a:r)}),[d.base,a,r]);cse((function(){var e,t;s&&(null!==(e=(t=window).matchMedia)&&void 0!==e&&e.call(t,"(prefers-color-scheme: dark)").matches&&f(a),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(function(e){f(e.matches?a:r)})))}),[]);var h=$Q.useMemo((function(){return{toggleTheme:p,currentTheme:d}}),[d,p]);return y1(ske.Provider,{value:h,children:y1(oke,{theme:d,globalSx:c,skipFontLoad:u,children:t})})}var uke="0.22.5";function lke(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 dke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lke(Object(n),!0).forEach((function(t){r5(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fke(e){var t=e.children,n=e.skipFontLoad,r=e.withThemeToggle,i=e.resizeDebounceDuration,a=void 0===i?XPe:i,o=e.modalContainerId,s=e.drawerContainerId,c=e.popoverContainerId,u=e.toastContainerId,l=e.shadowRoot,d=e.globalSx,f=dke(dke({},e),{},r?{theme:void 0}:{autoPickTheme:void 0,lightTheme:void 0,darkTheme:void 0}),p=f.autoPickTheme,h=f.lightTheme,m=f.darkTheme,y=f.theme,b=b1(Pie,{children:[y1(YPe,{resizeDebounceDuration:a}),y1(ZPe,{children:y1(KPe,{modalContainerId:o,drawerContainerId:s,popoverContainerId:c,toastContainerId:u,children:t})})]});return y1(Cve,{children:y1(Bme.Provider,{value:l,children:r?y1(cke,{lightTheme:h,darkTheme:m,globalSx:d,autoPickTheme:p,skipFontLoad:n,children:b}):y1(oke,{theme:y,globalSx:d,skipFontLoad:n,children:b})})})}console.log("\n @biom3/react\n \n version: ".concat(uke,"\n\n"));var pke="__lodash_hash_undefined__",hke=1/0,mke="[object Function]",yke="[object GeneratorFunction]",bke="[object Symbol]",gke=/^\./,vke=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wke=/\\(\\)?/g,Tke=/^\[object .+?Constructor\]$/,Eke="object"==typeof ut&&ut&&ut.Object===Object&&ut,Ake="object"==typeof self&&self&&self.Object===Object&&self,xke=Eke||Ake||Function("return this")();var Oke=Array.prototype,Cke=Function.prototype,Ike=Object.prototype,Ske=xke["__core-js_shared__"],_ke=function(){var e=/[^.]+$/.exec(Ske&&Ske.keys&&Ske.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Pke=Cke.toString,kke=Ike.hasOwnProperty,Rke=Ike.toString,Nke=RegExp("^"+Pke.call(kke).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mke=xke.Symbol,Dke=Oke.splice,Lke=Kke(xke,"Map"),Fke=Kke(Object,"create"),Bke=Mke?Mke.prototype:void 0,jke=Bke?Bke.toString:void 0;function Uke(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function zke(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hke(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Wke(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function Vke(e){if(!Yke(e)||(t=e,_ke&&_ke in t))return!1;var t,n=function(e){var t=Yke(e)?Rke.call(e):"";return t==mke||t==yke}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?Nke:Tke;return n.test(function(e){if(null!=e){try{return Pke.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function Gke(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&Rke.call(e)==bke}(e))return jke?jke.call(e):"";var t=e+"";return"0"==t&&1/e==-hke?"-0":t}function qke(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Kke(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Vke(n)?n:void 0}function Xke(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o),o};return n.cache=new(Xke.Cache||Hke),n}function Yke(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}Uke.prototype.clear=function(){this.__data__=Fke?Fke(null):{}},Uke.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Uke.prototype.get=function(e){var t=this.__data__;if(Fke){var n=t[e];return n===pke?void 0:n}return kke.call(t,e)?t[e]:void 0},Uke.prototype.has=function(e){var t=this.__data__;return Fke?void 0!==t[e]:kke.call(t,e)},Uke.prototype.set=function(e,t){return this.__data__[e]=Fke&&void 0===t?pke:t,this},zke.prototype.clear=function(){this.__data__=[]},zke.prototype.delete=function(e){var t=this.__data__,n=Wke(t,e);return!(n<0)&&(n==t.length-1?t.pop():Dke.call(t,n,1),!0)},zke.prototype.get=function(e){var t=this.__data__,n=Wke(t,e);return n<0?void 0:t[n][1]},zke.prototype.has=function(e){return Wke(this.__data__,e)>-1},zke.prototype.set=function(e,t){var n=this.__data__,r=Wke(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Hke.prototype.clear=function(){this.__data__={hash:new Uke,map:new(Lke||zke),string:new Uke}},Hke.prototype.delete=function(e){return qke(this,e).delete(e)},Hke.prototype.get=function(e){return qke(this,e).get(e)},Hke.prototype.has=function(e){return qke(this,e).has(e)},Hke.prototype.set=function(e,t){return qke(this,e).set(e,t),this},Xke((function(e){var t;e=null==(t=e)?"":Gke(t);var n=[];return gke.test(e)&&n.push(""),e.replace(vke,(function(e,t,r,i){n.push(r?i.replace(wke,"$1"):t||e)})),n})),Xke.Cache=Hke;var Jke={size:{600:"6px",500:"5px",400:"4px",300:"3px",200:"2px",100:"1px"}},Zke={size:{600:"64px",500:"48px",400:"32px",300:"24px",250:"20px",200:"16px",100:"12px"}},Qke={family:{heading:{primary:"'Suisse-Intl', sans-serif",secondary:"'Suisse-Intl', sans-serif"},body:{primary:"'Roboto', sans-serif",secondary:"'Roboto Mono', monospace"}},decoration:{underline:"underline",lineThrough:"line-through",none:"none"},casing:{uppercase:"uppercase",none:"none"}},$ke={body:{large:{regular:{fontSize:"20px",lineHeight:"28px",fontWeight:400},bold:{fontWeight:500}},medium:{regular:{fontSize:"16px",lineHeight:"24px",fontWeight:400},bold:{fontWeight:500}},small:{regular:{fontSize:"14px",lineHeight:"20px",fontWeight:400},bold:{fontWeight:700}},xSmall:{regular:{fontSize:"12px",lineHeight:"16px",fontWeight:400},bold:{fontWeight:700}},xxSmall:{regular:{fontSize:"10px",lineHeight:"14px",fontWeight:400},bold:{fontWeight:700}}},caption:{medium:{regular:{fontSize:"14px",lineHeight:"20px",fontWeight:400,casing:"uppercase",letterSpacing:"2px"},bold:{fontSize:"14px",lineHeight:"20px",fontWeight:700,casing:"uppercase",letterSpacing:"2px"}},small:{regular:{fontSize:"10px",lineHeight:"14px",fontWeight:400,casing:"uppercase",letterSpacing:"2px"},bold:{fontSize:"10px",lineHeight:"14px",fontWeight:700,casing:"uppercase",letterSpacing:"2px"}}},heading:{xxLarge:{regular:{fontSize:"96px",lineHeight:"112px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},xLarge:{regular:{fontSize:"64px",lineHeight:"72px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},large:{regular:{fontSize:"40px",lineHeight:"48px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},medium:{regular:{fontSize:"28px",lineHeight:"32px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},small:{regular:{fontSize:"20px",lineHeight:"28px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},xSmall:{regular:{fontSize:"16px",lineHeight:"24px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}}}},eRe={x1:"4px",x2:"8px",x3:"12px",x4:"16px",x5:"20px",x6:"24px",x7:"28px",x8:"32px",x9:"36px",x10:"40px",x11:"44px",x12:"48px",x13:"52px",x14:"56px",x15:"60px",x16:"64px",x17:"68px",x18:"72px",x19:"76px",x20:"80px",x21:"84px",x22:"88px",x23:"92px",x24:"96px",x25:"100px",x26:"104px",x27:"108px",x28:"112px",x29:"116px",x30:"120px",x31:"124px",x32:"128px",x33:"132px",x34:"136px",x35:"140px",x36:"144px",x37:"148px",x38:"152px",x39:"156px",x40:"160px",x41:"164px",x42:"168px",x43:"172px",x44:"176px",x45:"180px",x46:"184px",x47:"188px",x48:"192px",x49:"196px",x50:"200px"},tRe={x1:"2px",x2:"4px",x3:"6px",x4:"8px",x5:"10px",x6:"12px",x7:"14px",x8:"16px",x9:"18px",x10:"20px",x11:"22px",x12:"24px",x13:"26px",x14:"28px",x15:"30px",x16:"32px",x17:"34px",x18:"36px",x19:"38px",x20:"40px",x21:"42px",x22:"44px",x23:"46px",x24:"48px",x25:"50px"},nRe={small:450,medium:768,large:1024,xLarge:1280,xxLarge:1536,xxxLarge:1920},rRe={tooltip:12,toast:11,popover:10,modal:9,drawer:8},iRe={normal:{gentle:{cssDuration:"0.4s",jsDuration:.4,cssEase:"ease-in-out",jsEase:"easeInOut"},fast:{cssDuration:"0.25s",jsDuration:.25,cssEase:"ease-in-out",jsEase:"easeInOut"}},bounce:{gentle:{cssDuration:"0.6s",jsDuration:.6,cssEase:"cubic-bezier(0.47, 1.74, 0.41, 0.8)",jsEase:[.47,1.74,.41,.8]},fast:{cssDuration:"0.45s",jsDuration:.45,cssEase:"cubic-bezier(0.47, 1.74, 0.41, 0.8)",jsEase:[.47,1.74,.41,.8]}}},aRe={colorMode:"darkOnLight",color:{brand:{1:"#131313",2:"#FFFFFF",3:"#E0E0E0",4:"#868686",5:"#36E0F8",6:"#1F8290"},neutral:{1e3:"#E7E7E7",900:"#ECECEC",800:"#F1F1F1",700:"#F6F6F6",600:"#FAFAFA",500:"#FFFFFF"},accent:{1:"#B026BD",2:"#1FD3F5",3:"#67C6E0",4:"#5AA0D9",5:"#8395E5",6:"#D8EFF4",7:"#F5BDD0",8:"#EC98CA"},translucent:{emphasis:{500:"#0D0D0D1F",400:"#0D0D0D1A",300:"#0D0D0D14",200:"#0D0D0D0F",100:"#0D0D0D0A"},standard:{1e3:"#0D0D0DFF",900:"#0D0D0DE0",800:"#0D0D0DCC",700:"#0D0D0DA3",600:"#0D0D0D7A",500:"#0D0D0D3D",400:"#0D0D0D29",300:"#0D0D0D1F",200:"#0D0D0D1A",150:"#0D0D0D14",100:"#0D0D0D0A",50:"#0D0D0D05"},inverse:{1e3:"#FFFFFFFF",900:"#FFFFFFE6",800:"#FFFFFFCC",700:"#FFFFFFA3",600:"#FFFFFF7A",500:"#FFFFFF3D",400:"#FFFFFF29",300:"#FFFFFF1F",200:"#FFFFFF14",150:"#FFFFFF0F",100:"#FFFFFF0A",50:"#FFFFFF05"}},status:{guidance:{bright:"#36E0F8",dim:"#9AEFFB"},success:{bright:"#ABF790",dim:"#D5FAC7"},attention:{bright:"#FBFF6D",dim:"#FCFEBF"},fatal:{bright:"#FF637F",dim:"#FFB1BF"},destructive:{bright:"#E01A3D",dim:"#FF637F"}},fixed:{black:{1e3:"#0D0D0D",100:"#0D0D0D14"},white:{1e3:"#FFFFFF",100:"#FFFFFF14"}},text:{highlight:"#36E0F866",heading:{primary:"base.color.brand.1",secondary:"base.color.brand.4",emphasis:"base.gradient.1",inverse:{primary:"base.color.brand.2",secondary:"base.color.brand.3"}},body:{primary:"base.color.brand.1",secondary:"base.color.brand.4",inverse:{primary:"base.color.brand.2",secondary:"base.color.brand.3"}},caption:{primary:"base.color.brand.1",secondary:"base.color.brand.4",inverse:{primary:"base.color.brand.2",secondary:"base.color.brand.3"}},link:{primary:"base.color.accent.1",secondary:"base.color.brand.1",inverse:{primary:"#f191fa",secondary:"base.color.brand.2"}},status:{success:{primary:"#426336",secondary:"#486D3B"},guidance:{primary:"#206A74",secondary:"#22727E"},attention:{primary:"base.color.status.attention.bright",secondary:"base.color.status.attention.dim"},fatal:{primary:"base.color.status.fatal.bright",secondary:"base.color.status.fatal.dim"},destructive:{primary:"base.color.status.destructive.bright",secondary:"#b61833"}}},button:{primary:{background:{default:"#TODO",hover:"#TODO",active:"#TODO"},text:{default:"#TODO",hover:"#TODO",active:"#TODO"},border:{default:"#TODO",hover:"#TODO",active:"#TODO"}},primaryDestructive:{background:{default:"#TODO",hover:"#TODO",active:"#TODO"},text:{default:"#TODO",hover:"#TODO",active:"#TODO"},border:{default:"#TODO",hover:"#TODO",active:"#TODO"}},primaryInverse:{background:{default:"#TODO",hover:"#TODO",active:"#TODO"},text:{default:"#TODO",hover:"#TODO",active:"#TODO"},border:{default:"#TODO",hover:"#TODO",active:"#TODO"}},secondary:{background:{default:"#TODO",hover:"#TODO",active:"#TODO"},text:{default:"#TODO",hover:"#TODO",active:"#TODO"},border:{default:"#TODO",hover:"#TODO",active:"#TODO"}},secondaryDestrcutive:{background:{default:"#TODO",hover:"#TODO",active:"#TODO"},text:{default:"#TODO",hover:"#TODO",active:"#TODO"},border:{default:"#TODO",hover:"#TODO",active:"#TODO"}},tertiary:{background:{default:"#TODO",hover:"#TODO",active:"#TODO"},text:{default:"#TODO",hover:"#TODO",active:"#TODO"},border:{default:"#TODO",hover:"#TODO",active:"#TODO"}},tertiaryInverse:{background:{default:"#TODO",hover:"#TODO",active:"#TODO"},text:{default:"#TODO",hover:"#TODO",active:"#TODO"},border:{default:"#TODO",hover:"#TODO",active:"#TODO"}}},overlay:"base.color.translucent.standard.600"},gradient:{1:{spectrum:"linear-gradient(90.68deg, #F191FA 0%, #83E3F0 99.82%)",blendMode:"normal",svgDefs:'<linearGradient id="gradient-1-singleLayer" x1="0" y1="0" x2="24" y2="0.214702"\n gradientUnits="userSpaceOnUse">\n <stop stop-color="#F191FA" />\n <stop offset="1" stop-color="#83E3F0" />\n </linearGradient>',svgDefIds:"gradient-1-singleLayer"},2:{spectrum:"radial-gradient(96.87% 65.57% at 54.34% 93.79%, #FCF5EE 0%, rgba(236, 190, 225, 0) 71.51%), radial-gradient(73.48% 242.97% at 26.54% 26.42%, #A3EEF8 0%, #A4DCF5 17.71%, #A6AEEC 38.02%, #ECBEE1 100%)",blendMode:"normal, normal",svgDefs:'<radialGradient id="gradient-2-bottomLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(4.7777 4.75595) rotate(44.9817) scale(18.6995 39.6574)">\n <stop stop-color="#A3EEF8" />\n <stop offset="0.177083" stop-color="#A4DCF5" />\n <stop offset="0.380208" stop-color="#A6AEEC" />\n <stop offset="1" stop-color="#ECBEE1" />\n </radialGradient>\n <radialGradient id="gradient-2-topLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(9.7806 16.8827) rotate(84.265) scale(9.68552 18.5286)">\n <stop stop-color="#FCF5EE" />\n <stop offset="0.715135" stop-color="#ECBEE1" stop-opacity="0" />\n </radialGradient>',svgDefIds:"gradient-2-bottomLayer, gradient-2-topLayer"},3:{spectrum:"radial-gradient(100% 100% at 24.5% 100%, rgba(106, 160, 242, 0.9) 0%, rgba(198, 229, 247, 0) 100%), linear-gradient(81.66deg, rgba(124, 246, 251, 0.48) 9.38%, rgba(254, 253, 248, 0.7) 98.47%), radial-gradient(4009.6% 10453.55% at 0% 0%, #7EF8FE 0%, #7ABFEC 30.21%, #AEC3ED 45.54%, #DEF3F6 61.46%, #FAF9F3 100%)",blendMode:"normal, normal, normal",svgDefs:'<radialGradient id="gradient-3-bottomLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="rotate(60.6728) scale(36.75 1550.85)">\n <stop stop-color="#7EF8FE" />\n <stop offset="0.302083" stop-color="#7ABFEC" />\n <stop offset="0.455396" stop-color="#AEC3ED" />\n <stop offset="0.614583" stop-color="#DEF3F6" />\n <stop offset="1" stop-color="#FAF9F3" />\n </radialGradient>\n <linearGradient id="gradient-3-middleLayer" x1="-1.26123e-07" y1="4.8" x2="24" y2="2.16"\n gradientUnits="userSpaceOnUse">\n <stop stop-color="#7CF6FB" stop-opacity="0.48" />\n <stop offset="1" stop-color="#FEFDF8" stop-opacity="0.7" />\n </linearGradient>\n <radialGradient id="gradient-3-topLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(4.41 18) rotate(-52.9472) scale(22.5541)">\n <stop stop-color="#6AA0F2" />\n <stop offset="1" stop-color="#C6E5F7" stop-opacity="0" />\n </radialGradient>',svgDefIds:"gradient-3-bottomLayer,\n gradient-3-middleLayer,\n gradient-3-topLayer"}},shadow:{100:"0px 1px 2px rgba(0, 0, 0, 0.16), 0px 1px 4px 1px rgba(0, 0, 0, 0.32)",200:"0px 2px 6px 2px rgba(0, 0, 0, 0.16), 0px 1px 2px rgba(0, 0, 0, 0.32)",300:"0px 4px 8px 4px rgba(0, 0, 0, 0.16), 0px 1px 4px rgba(0, 0, 0, 0.32)",400:"0px 8px 10px 4px rgba(0, 0, 0, 0.16), 0px 2px 4px rgba(0, 0, 0, 0.32)",500:"0px 8px 12px 6px rgba(0, 0, 0, 0.16), 0px 4px 4px rgba(0, 0, 0, 0.32)"},spacing:eRe,borderRadius:tRe,font:Qke,text:$ke,breakpoint:nRe,icon:Zke,border:Jke,zLevel:rRe,motion:iRe},oRe={colorMode:"lightOnDark",color:{brand:{1:"#F3F3F3",2:"#131313",3:"#E0E0E0",4:"#B6B6B6",5:"#36E0F8",6:"#1F8290"},neutral:{1e3:"#0D0D0D",900:"#131313",800:"#1C1C1C",700:"#202020",600:"#252525",500:"#292929"},accent:{1:"#F191FA",2:"#36E0F8",3:"#6FD6F2",4:"#61ADEB",5:"#99A8EA",6:"#E4F4F7",7:"#F8D1DE",8:"#F2B7DA"},translucent:{emphasis:{500:"#F3F3F329",400:"#F3F3F31F",300:"#F3F3F31A",200:"#F3F3F314",100:"#F3F3F30F"},standard:{1e3:"#F3F3F3",900:"#F3F3F3E0",800:"#F3F3F3CC",700:"#F3F3F3A3",600:"#F3F3F37A",500:"#F3F3F33D",400:"#F3F3F329",300:"#F3F3F31F",200:"#F3F3F314",150:"#F3F3F30F",100:"#F3F3F30A",50:"#F3F3F305"},inverse:{1e3:"#0D0D0D",900:"#0D0D0DE0",800:"#0D0D0DCC",700:"#0D0D0DA3",600:"#0D0D0D7A",500:"#0D0D0D3D",400:"#0D0D0D29",300:"#0D0D0D1F",200:"#0D0D0D14",150:"#0D0D0D0F",100:"#0D0D0D0A",50:"#0D0D0D05"}},status:{guidance:{bright:"#36E0F8",dim:"#94E9F5 "},success:{bright:"#ABF790",dim:"#D5FAC7"},attention:{bright:"#FAFD7E",dim:"#F6F8B9"},fatal:{bright:"#FF637F",dim:"#F9ABB9"},destructive:{bright:"#E01A3D",dim:"#FF637F"}},fixed:{black:{1e3:"#131313",100:"#13131314"},white:{1e3:"#F3F3F3",100:"#F3F3F314"}},text:{highlight:"#36E0F833",heading:{primary:"base.color.brand.1",secondary:"base.color.brand.4",emphasis:"base.gradient.1",inverse:{primary:"base.color.brand.2",secondary:"base.color.brand.4"}},body:{primary:"base.color.brand.1",secondary:"base.color.brand.4",inverse:{primary:"base.color.brand.2",secondary:"base.color.brand.4"}},caption:{primary:"base.color.brand.1",secondary:"base.color.brand.4",inverse:{primary:"base.color.brand.2",secondary:"base.color.brand.4"}},link:{primary:"base.color.accent.1",secondary:"base.color.brand.1",inverse:{primary:"#b026bd",secondary:"base.color.brand.2"}},status:{success:{primary:"base.color.status.success.bright",secondary:"base.color.status.success.dim"},guidance:{primary:"base.color.status.guidance.bright",secondary:"base.color.status.guidance.dim"},attention:{primary:"base.color.status.attention.bright",secondary:"base.color.status.attention.dim"},fatal:{primary:"base.color.status.fatal.bright",secondary:"base.color.status.fatal.dim"},destructive:{primary:"#ff2d55",secondary:"base.color.status.destructive.dim"}}},button:{primary:{background:{default:"#TODO",hover:"#TODO",active:"#TODO"},text:{default:"#TODO",hover:"#TODO",active:"#TODO"},border:{default:"#TODO",hover:"#TODO",active:"#TODO"}},primaryDestructive:{background:{default:"#TODO",hover:"#TODO",active:"#TODO"},text:{default:"#TODO",hover:"#TODO",active:"#TODO"},border:{default:"#TODO",hover:"#TODO",active:"#TODO"}},primaryInverse:{background:{default:"#TODO",hover:"#TODO",active:"#TODO"},text:{default:"#TODO",hover:"#TODO",active:"#TODO"},border:{default:"#TODO",hover:"#TODO",active:"#TODO"}},secondary:{background:{default:"#TODO",hover:"#TODO",active:"#TODO"},text:{default:"#TODO",hover:"#TODO",active:"#TODO"},border:{default:"#TODO",hover:"#TODO",active:"#TODO"}},secondaryDestrcutive:{background:{default:"#TODO",hover:"#TODO",active:"#TODO"},text:{default:"#TODO",hover:"#TODO",active:"#TODO"},border:{default:"#TODO",hover:"#TODO",active:"#TODO"}},tertiary:{background:{default:"#TODO",hover:"#TODO",active:"#TODO"},text:{default:"#TODO",hover:"#TODO",active:"#TODO"},border:{default:"#TODO",hover:"#TODO",active:"#TODO"}},tertiaryInverse:{background:{default:"#TODO",hover:"#TODO",active:"#TODO"},text:{default:"#TODO",hover:"#TODO",active:"#TODO"},border:{default:"#TODO",hover:"#TODO",active:"#TODO"}}},overlay:"base.color.translucent.standard.500"},gradient:{1:{spectrum:"linear-gradient(105.76deg, #F191FA -46.96%, #83E3F0 99.99%)",blendMode:"normal",svgDefs:'\n <linearGradient id="gradient-1-singleLayer" x1="0" y1="0" x2="24" y2="0.214702"\n gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9A2F6" />\n <stop offset="1" stop-color="#83E3F0" />\n </linearGradient>',svgDefIds:"gradient-1-singleLayer"},2:{spectrum:"radial-gradient(96.87% 65.57% at 54.34% 93.79%, #FCF5EE 0%, rgba(236, 190, 225, 0) 71.51%), radial-gradient(73.48% 242.97% at 26.54% 26.42%, #A3EEF8 0%, #A4DCF5 17.71%, #A6AEEC 38.02%, #ECBEE1 100%)",blendMode:"normal, normal",svgDefs:'\n <radialGradient id="gradient-2-bottomLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(4.7777 4.75595) rotate(44.9817) scale(18.6995 39.6574)">\n <stop stop-color="#A3EEF8" />\n <stop offset="0.177083" stop-color="#A4DCF5" />\n <stop offset="0.380208" stop-color="#A6AEEC" />\n <stop offset="1" stop-color="#ECBEE1" />\n </radialGradient>\n <radialGradient id="gradient-2-topLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(9.7806 16.8827) rotate(84.265) scale(9.68552 18.5286)">\n <stop stop-color="#FCF5EE" />\n <stop offset="0.715135" stop-color="#ECBEE1" stop-opacity="0" />\n </radialGradient>',svgDefIds:"gradient-2-bottomLayer, gradient-2-topLayer"},3:{spectrum:"radial-gradient(100% 100% at 24.5% 100%, rgba(106, 160, 242, 0.9) 0%, rgba(198, 229, 247, 0) 100%), linear-gradient(81.66deg, rgba(124, 246, 251, 0.48) 9.38%, rgba(254, 253, 248, 0.7) 98.47%), radial-gradient(4009.6% 10453.55% at 0% 0%, #7EF8FE 0%, #7ABFEC 30.21%, #AEC3ED 45.54%, #DEF3F6 61.46%, #FAF9F3 100%)",blendMode:"normal, normal, normal",svgDefs:'\n <radialGradient id="gradient-3-bottomLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="rotate(60.6728) scale(36.75 1550.85)">\n <stop stop-color="#7EF8FE" />\n <stop offset="0.302083" stop-color="#7ABFEC" />\n <stop offset="0.455396" stop-color="#AEC3ED" />\n <stop offset="0.614583" stop-color="#DEF3F6" />\n <stop offset="1" stop-color="#FAF9F3" />\n </radialGradient>\n <linearGradient id="gradient-3-middleLayer" x1="-1.26123e-07" y1="4.8" x2="24" y2="2.16"\n gradientUnits="userSpaceOnUse">\n <stop stop-color="#7CF6FB" stop-opacity="0.48" />\n <stop offset="1" stop-color="#FEFDF8" stop-opacity="0.7" />\n </linearGradient>\n <radialGradient id="gradient-3-topLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(4.41 18) rotate(-52.9472) scale(22.5541)">\n <stop stop-color="#6AA0F2" />\n <stop offset="1" stop-color="#C6E5F7" stop-opacity="0" />\n </radialGradient>',svgDefIds:"gradient-3-bottomLayer,\n gradient-3-middleLayer,\n gradient-3-topLayer"}},shadow:{100:"0px 1px 2px rgba(0, 0, 0, 0.16), 0px 1px 4px 1px rgba(0, 0, 0, 0.32)",200:"0px 2px 6px 2px rgba(0, 0, 0, 0.16), 0px 1px 2px rgba(0, 0, 0, 0.32)",300:"0px 4px 8px 4px rgba(0, 0, 0, 0.16), 0px 1px 4px rgba(0, 0, 0, 0.32)",400:"0px 6px 10px 4px rgba(0, 0, 0, 0.16), 0px 2px 4px rgba(0, 0, 0, 0.32)",500:"0px 8px 12px 6px rgba(0, 0, 0, 0.16), 0px 4px 4px rgba(0, 0, 0, 0.32)"},spacing:eRe,borderRadius:tRe,font:Qke,text:$ke,breakpoint:nRe,icon:Zke,border:Jke,zLevel:rRe,motion:iRe},{version:sRe}={name:"@biom3/design-tokens",version:"0.3.7",main:"./src/index.ts",module:"./src/index.ts",types:"./src/index.ts",directories:{css:"css",fonts:"fonts"},license:"Apache-2.0",sideEffects:!1,scripts:{lint:"npm run typecheck && npm run lint:check","lint:check":"biome check ./","lint:check:fix":"biome check --apply ./","format:fix":"biome format --write ./",typecheck:"tsc --noEmit",prebuild:"rm -rf ./dist",build:"npm run build:tokens; npm run build:ts",pack:"npm pack","prebuild:tokens":"rm -rf ./css; mkdir css;","build:tokens":"ts-node ./src/packageScripts/dumpTokens.ts","build:ts":"tsup src/index.ts --dts","publish-package":"if can-npm-publish; then cd dist; npm publish --access public; else echo 'Skipping package npm publish'; fi"},dependencies:{"lodash.get":"^4.4.2"},devDependencies:{"@biomejs/biome":"1.7.0","@types/node":"^18.15.11","can-npm-publish":"^1.3.6",nodemon:"^2.0.20","prepend-file":"^2.0.1","ts-config":"*","ts-node":"^10.9.1",tsup:"^7.2.0",typescript:"^4.9.5"}};console.log(`\n @biom3/design-tokens\n \n version: ${sRe}\n\n`);const cRe=e=>e.toLowerCase()===NZ.LIGHT.toLowerCase()?aRe:oRe;const uRe={width:"clamp(320px, 100vw, 430px)",minHeight:"500px",height:"100vh",maxHeight:"650px",position:"relative",overflow:"hidden",borderRadius:"base.borderRadius.x4"},lRe={position:"relative",display:"flex",flexDirection:"column",backgroundColor:"base.color.neutral.1000",height:"100%",width:"100%"},dRe=e=>({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",position:e?"absolute":"relative",zIndex:1}),fRe=e=>({display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",backgroundColor:e??""}),pRe={flex:1,display:"flex",flexDirection:"column",justifyContent:"flex-start"},hRe={flex:"1 0 0",width:"100%"},mRe={display:"flex",flexDirection:"column",flex:"1 0 0",width:"100%"},yRe={...uRe};function bRe({id:e,config:t,children:n,globalSx:r}){const i=cRe(t.theme),a=$Q.useId().replaceAll(":","-");return y1(fke,{globalSx:r,theme:{base:i},drawerContainerId:`${e}${a}`,modalContainerId:`${e}${a}`,children:y1(Rae,{sx:yRe,id:`${e}${a}`,children:n})})}var gRe=function(){function e(){this.callbacks={}}return e.prototype.on=function(e,t){return this.callbacks[e]?this.callbacks[e].push(t):this.callbacks[e]=[t],this},e.prototype.once=function(e,t){var n=this,r=function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];n.off(e,r),t.apply(n,i)};return this.on(e,r),this},e.prototype.off=function(e,t){var n,r=(null!==(n=this.callbacks[e])&&void 0!==n?n:[]).filter((function(e){return e!==t}));return this.callbacks[e]=r,this},e.prototype.emit=function(e){for(var t,n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];return(null!==(t=this.callbacks[e])&&void 0!==t?t:[]).forEach((function(e){e.apply(n,r)})),this},e}();function vRe(e,t,n){t.split&&(t=t.split("."));for(var r,i,a=0,o=t.length,s=e;a<o&&"__proto__"!==(i=t[a++])&&"constructor"!==i&&"prototype"!==i;)s=s[i]=a===o?n:typeof(r=s[i])==typeof t?r:0*t[a]!=0||~(""+t[a]).indexOf(".")?{}:[]}var wRe=function(e){function t(t,n){var r=e.call(this,"".concat(t," ").concat(n))||this;return r.field=t,r}return bD(t,e),t}(Error);function TRe(e){return"string"==typeof e}function ERe(e){return"number"==typeof e}function ARe(e){return"function"==typeof e}function xRe(e){return null!=e}function ORe(e){return"object"===Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var CRe="is not a string",IRe="is not an object",SRe="is nil";function _Re(e,t){return new Promise((function(n,r){var i=setTimeout((function(){r(Error("Promise timed out"))}),t);e.then((function(e){return clearTimeout(i),n(e)})).catch(r)}))}function PRe(e,t,n){var r;return(r=n,new Promise((function(e){return setTimeout(e,r)}))).then((function(){return _Re(function(){try{return Promise.resolve(t(e))}catch(e){return Promise.reject(e)}}(),1e3)})).catch((function(t){null==e||e.log("warn","Callback Error",{error:t}),null==e||e.stats.increment("callback_error")})).then((function(){return e}))}for(var kRe,RRe="onRemoveFromFuture",NRe=function(e){function t(t,n,r){var i=e.call(this)||this;return i.future=[],i.maxAttempts=t,i.queue=n,i.seen=null!=r?r:{},i}return bD(t,e),t.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.map((function(t){return!(e.updateAttempts(t)>e.maxAttempts||e.includes(t))&&(e.queue.push(t),!0)}));return this.queue=this.queue.sort((function(t,n){return e.getAttempts(t)-e.getAttempts(n)})),r},t.prototype.pushWithBackoff=function(e){var t=this;if(0===this.getAttempts(e))return this.push(e)[0];var n=this.updateAttempts(e);if(n>this.maxAttempts||this.includes(e))return!1;var r=function(e){var t=Math.random()+1,n=e.minTimeout,r=void 0===n?500:n,i=e.factor,a=void 0===i?2:i,o=e.attempt,s=e.maxTimeout,c=void 0===s?1/0:s;return Math.min(t*r*Math.pow(a,o),c)}({attempt:n-1});return setTimeout((function(){t.queue.push(e),t.future=t.future.filter((function(t){return t.id!==e.id})),t.emit(RRe)}),r),this.future.push(e),!0},t.prototype.getAttempts=function(e){var t;return null!==(t=this.seen[e.id])&&void 0!==t?t:0},t.prototype.updateAttempts=function(e){return this.seen[e.id]=this.getAttempts(e)+1,this.getAttempts(e)},t.prototype.includes=function(e){return this.queue.includes(e)||this.future.includes(e)||Boolean(this.queue.find((function(t){return t.id===e.id})))||Boolean(this.future.find((function(t){return t.id===e.id})))},t.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(t.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),t}(gRe),MRe=256,DRe=[];MRe--;)DRe[MRe]=(MRe+256).toString(16).substring(1);function LRe(){var e,t=0,n="";if(!kRe||MRe+16>256){for(kRe=Array(t=256);t--;)kRe[t]=256*Math.random()|0;t=MRe=0}for(;t<16;t++)e=kRe[MRe+t],n+=6==t?DRe[15&e|64]:8==t?DRe[63&e|128]:DRe[e],1&t&&t>1&&t<11&&(n+="-");return MRe++,n}var FRe=function(){function e(){this._logs=[]}return e.prototype.log=function(e,t,n){var r=new Date;this._logs.push({level:e,message:t,time:r,extras:n})},Object.defineProperty(e.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),e.prototype.flush=function(){if(this.logs.length>1){var e=this._logs.reduce((function(e,t){var n,r,i,a=gD(gD({},t),{json:JSON.stringify(t.extras,null," "),extras:t.extras});delete a.time;var o=null!==(i=null===(r=t.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return e[o]&&(o="".concat(o,"-").concat(Math.random())),gD(gD({},e),((n={})[o]=a,n))}),{});console.table?console.table(e):console.log(e)}else this.logs.forEach((function(e){var t=e.level,n=e.message,r=e.extras;"info"===t||"debug"===t?console.log(n,null!=r?r:""):console[t](n,null!=r?r:"")}));this._logs=[]},e}(),BRe=function(){function e(){this.metrics=[]}return e.prototype.increment=function(e,t,n){void 0===t&&(t=1),this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"counter",timestamp:Date.now()})},e.prototype.gauge=function(e,t,n){this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},e.prototype.flush=function(){var e=this.metrics.map((function(e){return gD(gD({},e),{tags:e.tags.join(",")})}));console.table?console.table(e):console.log(e),this.metrics=[]},e.prototype.serialize=function(){return this.metrics.map((function(e){return{m:e.metric,v:e.value,t:e.tags,k:(t=e.type,{gauge:"g",counter:"c"}[t]),e:e.timestamp};var t}))},e}(),jRe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return bD(t,e),t.prototype.gauge=function(){},t.prototype.increment=function(){},t.prototype.flush=function(){},t.prototype.serialize=function(){return[]},t}(BRe),URe=function(e){var t,n,r;this.retry=null===(t=e.retry)||void 0===t||t,this.type=null!==(n=e.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=e.reason)&&void 0!==r?r:""},zRe=function(){function e(e,t,n,r){void 0===t&&(t=LRe()),void 0===n&&(n=new jRe),void 0===r&&(r=new FRe),this.attempts=0,this.event=e,this._id=t,this.logger=r,this.stats=n}return e.system=function(){},e.prototype.isSame=function(e){return e.id===this.id},e.prototype.cancel=function(e){if(e)throw e;throw new URe({reason:"Context Cancel"})},e.prototype.log=function(e,t,n){this.logger.log(e,t,n)},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),e.prototype.updateEvent=function(e,t){var n;if("integrations"===e.split(".")[0]){var r=e.split(".")[1];if(!1===(null===(n=this.event.integrations)||void 0===n?void 0:n[r]))return this.event}return vRe(this.event,e,t),this.event},e.prototype.failedDelivery=function(){return this._failedDelivery},e.prototype.setFailedDelivery=function(e){this._failedDelivery=e},e.prototype.logs=function(){return this.logger.logs},e.prototype.flush=function(){this.logger.flush(),this.stats.flush()},e.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},e}();function HRe(e,t){e.log("debug","plugin",{plugin:t.name});var n=(new Date).getTime(),r=t[e.event.type];if(void 0===r)return Promise.resolve(e);var i=function(e){return AD(this,void 0,void 0,(function(){var t;return xD(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e()];case 1:return[2,n.sent()];case 2:return t=n.sent(),[2,Promise.reject(t)];case 3:return[2]}}))}))}((function(){return r.apply(t,[e])})).then((function(e){var r=(new Date).getTime()-n;return e.stats.gauge("plugin_time",r,["plugin:".concat(t.name)]),e})).catch((function(n){if(n instanceof URe&&"middleware_cancellation"===n.type)throw n;return n instanceof URe?(e.log("warn",n.type,{plugin:t.name,error:n}),n):(e.log("error","plugin Error",{plugin:t.name,error:n}),e.stats.increment("plugin_error",1,["plugin:".concat(t.name)]),n)}));return i}function WRe(e,t){return HRe(e,t).then((function(t){if(t instanceof zRe)return t;e.log("debug","Context canceled"),e.stats.increment("context_canceled"),e.cancel(t)}))}var VRe=function(e){function t(t){var n,r,i,a=e.call(this)||this;return a.criticalTasks=(i=0,{done:function(){return n},run:function(e){var t,a=e();return"object"==typeof(t=a)&&null!==t&&"then"in t&&"function"==typeof t.then&&(1==++i&&(n=new Promise((function(e){return r=e}))),a.finally((function(){return 0==--i&&r()}))),a}}),a.plugins=[],a.failedInitializations=[],a.flushing=!1,a.queue=t,a.queue.on(RRe,(function(){a.scheduleFlush(0)})),a}return bD(t,e),t.prototype.register=function(e,t,n){return AD(this,void 0,void 0,(function(){var r=this;return xD(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve(t.load(e,n)).then((function(){r.plugins.push(t)})).catch((function(n){if("destination"===t.type)return r.failedInitializations.push(t.name),console.warn(t.name,n),void e.log("warn","Failed to load destination",{plugin:t.name,error:n});throw n}))];case 1:return i.sent(),[2]}}))}))},t.prototype.deregister=function(e,t,n){return AD(this,void 0,void 0,(function(){var r;return xD(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.unload?[4,Promise.resolve(t.unload(e,n))]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.plugins=this.plugins.filter((function(e){return e.name!==t.name})),[3,4];case 3:return r=i.sent(),e.log("warn","Failed to unload destination",{plugin:t.name,error:r}),[3,4];case 4:return[2]}}))}))},t.prototype.dispatch=function(e){return AD(this,void 0,void 0,(function(){var t;return xD(this,(function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.push(e),t=this.subscribeToDelivery(e),this.scheduleFlush(0),[2,t]}))}))},t.prototype.subscribeToDelivery=function(e){return AD(this,void 0,void 0,(function(){var t=this;return xD(this,(function(n){return[2,new Promise((function(n){var r=function(i,a){i.isSame(e)&&(t.off("flush",r),n(i))};t.on("flush",r)}))]}))}))},t.prototype.dispatchSingle=function(e){return AD(this,void 0,void 0,(function(){var t=this;return xD(this,(function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.updateAttempts(e),e.attempts=1,[2,this.deliver(e).catch((function(n){return t.enqueuRetry(n,e)?t.subscribeToDelivery(e):(e.setFailedDelivery({reason:n}),e)}))]}))}))},t.prototype.isEmpty=function(){return 0===this.queue.length},t.prototype.scheduleFlush=function(e){var t=this;void 0===e&&(e=500),this.flushing||(this.flushing=!0,setTimeout((function(){t.flush().then((function(){setTimeout((function(){t.flushing=!1,t.queue.length&&t.scheduleFlush(0)}),0)}))}),e))},t.prototype.deliver=function(e){return AD(this,void 0,void 0,(function(){var t,n,r,i;return xD(this,(function(a){switch(a.label){case 0:return[4,this.criticalTasks.done()];case 1:a.sent(),t=Date.now(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.flushOne(e)];case 3:return e=a.sent(),n=Date.now()-t,this.emit("delivery_success",e),e.stats.gauge("delivered",n),e.log("debug","Delivered",e.event),[2,e];case 4:throw r=a.sent(),i=r,e.log("error","Failed to deliver",i),this.emit("delivery_failure",e,i),e.stats.increment("delivery_failed"),r;case 5:return[2]}}))}))},t.prototype.enqueuRetry=function(e,t){return!(e instanceof URe&&!e.retry)&&this.queue.pushWithBackoff(t)},t.prototype.flush=function(){return AD(this,void 0,void 0,(function(){var e,t;return xD(this,(function(n){switch(n.label){case 0:if(0===this.queue.length)return[2,[]];if(!(e=this.queue.pop()))return[2,[]];e.attempts=this.queue.getAttempts(e),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deliver(e)];case 2:return e=n.sent(),this.emit("flush",e,!0),[3,4];case 3:return t=n.sent(),this.enqueuRetry(t,e)||(e.setFailedDelivery({reason:t}),this.emit("flush",e,!1)),[2,[]];case 4:return[2,[e]]}}))}))},t.prototype.isReady=function(){return!0},t.prototype.availableExtensions=function(e){var t=this.plugins.filter((function(t){var n,r,i;if("destination"!==t.type&&"Segment.io"!==t.name)return!0;var a=void 0;return null===(n=t.alternativeNames)||void 0===n||n.forEach((function(t){void 0!==e[t]&&(a=e[t])})),null!==(i=null!==(r=e[t.name])&&void 0!==r?r:a)&&void 0!==i?i:!1!==("Segment.io"===t.name||e.All)})),n=function(e,t){var n={};return e.forEach((function(e){var r,i=void 0;if("string"==typeof t){var a=e[t];i="string"!=typeof a?JSON.stringify(a):a}else t instanceof Function&&(i=t(e));void 0!==i&&(n[i]=kD(kD([],null!==(r=n[i])&&void 0!==r?r:[],!0),[e],!1))})),n}(t,"type"),r=n.before,i=void 0===r?[]:r,a=n.enrichment,o=void 0===a?[]:a,s=n.destination,c=void 0===s?[]:s,u=n.after;return{before:i,enrichment:o,destinations:c,after:void 0===u?[]:u}},t.prototype.flushOne=function(e){var t,n;return AD(this,void 0,void 0,(function(){var r,i,a,o,s,c,u,l,d,f,p,h,m,y;return xD(this,(function(b){switch(b.label){case 0:if(!this.isReady())throw new Error("Not ready");e.attempts>1&&this.emit("delivery_retry",e),r=this.availableExtensions(null!==(t=e.event.integrations)&&void 0!==t?t:{}),i=r.before,a=r.enrichment,o=0,s=i,b.label=1;case 1:return o<s.length?(c=s[o],[4,WRe(e,c)]):[3,4];case 2:(f=b.sent())instanceof zRe&&(e=f),this.emit("message_enriched",e,c),b.label=3;case 3:return o++,[3,1];case 4:u=0,l=a,b.label=5;case 5:return u<l.length?(d=l[u],[4,HRe(e,d)]):[3,8];case 6:(f=b.sent())instanceof zRe&&(e=f),this.emit("message_enriched",e,d),b.label=7;case 7:return u++,[3,5];case 8:return p=this.availableExtensions(null!==(n=e.event.integrations)&&void 0!==n?n:{}),h=p.destinations,m=p.after,[4,new Promise((function(t,n){setTimeout((function(){var r=h.map((function(t){return HRe(e,t)}));Promise.all(r).then(t).catch(n)}),0)}))];case 9:return b.sent(),e.stats.increment("message_delivered"),this.emit("message_delivered",e),y=m.map((function(t){return HRe(e,t)})),[4,Promise.all(y)];case 10:return b.sent(),[2,e]}}))}))},t}(gRe);function GRe(e,t,n,r){return AD(this,void 0,void 0,(function(){var i,a;return xD(this,(function(o){switch(o.label){case 0:return n.emit("dispatch_start",e),i=Date.now(),t.isEmpty()?[4,t.dispatchSingle(e)]:[3,2];case 1:return a=o.sent(),[3,4];case 2:return[4,t.dispatch(e)];case 3:a=o.sent(),o.label=4;case 4:return(null==r?void 0:r.callback)?[4,PRe(a,r.callback,(s=i,c=r.timeout,u=Date.now()-s,Math.max((null!=c?c:300)-u,0)))]:[3,6];case 5:a=o.sent(),o.label=6;case 6:return(null==r?void 0:r.debug)&&a.flush(),[2,a]}var s,c,u}))}))}function qRe(e,t,n,r){var i,a=[e,t,n,r],o=ORe(e)?e.event:e;if(!o||!TRe(o))throw new Error("Event missing");var s=ORe(e)?null!==(i=e.properties)&&void 0!==i?i:{}:ORe(t)?t:{},c={};return ARe(n)||(c=null!=n?n:{}),ORe(e)&&!ARe(t)&&(c=null!=t?t:{}),[o,s,c,a.find(ARe)]}function KRe(e,t,n,r,i){var a,o,s=null,c=null,u=[e,t,n,r,i],l=u.filter(TRe);void 0!==l[0]&&void 0!==l[1]&&(s=l[0],c=l[1]),1===l.length&&(s=null,c=l[0]);var d=u.find(ARe),f=u.filter((function(e){return null===c?ORe(e):ORe(e)||null===e})),p=null!==(a=f[0])&&void 0!==a?a:{},h=null!==(o=f[1])&&void 0!==o?o:{};return[s,c,p,h,d]}var XRe=function(e){return function(){for(var t,n,r,i,a,o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var c;c=null!==(r=null!==(t=o.find(TRe))&&void 0!==t?t:null===(n=o.find(ERe))||void 0===n?void 0:n.toString())&&void 0!==r?r:e.id();var u=o.filter((function(e){return null===c?ORe(e):ORe(e)||null===e})),l=null!==(i=u[0])&&void 0!==i?i:{},d=null!==(a=u[1])&&void 0!==a?a:{},f=o.find(ARe);return[c,l,d,f]}};function YRe(e,t,n,r){ERe(e)&&(e=e.toString()),ERe(t)&&(t=t.toString());var i=[e,t,n,r],a=i.filter(TRe),o=a[0],s=void 0===o?e:o,c=a[1],u=void 0===c?null:c,l=i.filter(ORe)[0];return[s,u,void 0===l?{}:l,i.find(ARe)]}function JRe(){return"undefined"!=typeof window}function ZRe(){return!JRe()}function QRe(){return!JRe()||window.navigator.onLine}function $Re(){return!QRe()}function eNe(e,t){return t=t||{},new Promise((function(n,r){var i=new XMLHttpRequest,a=[],o=[],s={},c=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:c,headers:{keys:function(){return a},entries:function(){return o},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var u in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){a.push(t=t.toLowerCase()),o.push([t,n]),s[t]=s[t]?s[t]+","+n:n})),n(c())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(u,t.headers[u]);i.send(t.body||null)}))}var tNe=Object.freeze({__proto__:null,default:eNe}),nNe=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null},rNe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=nNe();return(n&&n.fetch||eNe).apply(void 0,e)},iNe="1.54.0";
|
|
91
91
|
/*! js-cookie v3.0.1 | MIT */
|
|
92
|
-
function aNe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var oNe=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=aNe({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var o in i)i[o]&&(a+="; "+o,!0!==i[o]&&(a+="="+i[o].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+a}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var a=n[i].split("="),o=a.slice(1).join("=");try{var s=decodeURIComponent(a[0]);if(r[s]=t.read(o,s),e===s)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",aNe({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,aNe({},this.attributes,t))},withConverter:function(t){return e(aNe({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function sNe(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function cNe(e){var t=function(e){try{return new URL(e)}catch(e){return}}(e);if(t)for(var n=function(e){var t=e.hostname.split("."),n=t[t.length-1],r=[];if(4===t.length&&parseInt(n,10)>0)return r;if(t.length<=1)return r;for(var i=t.length-2;i>=0;--i)r.push(t.slice(i).join("."));return r}(t),r=0;r<n.length;++r){var i="__tld__",a=n[r],o={domain:"."+a};try{if(oNe.set(i,"1",o),oNe.get(i))return oNe.remove(i,o),a}catch(e){return}}}var uNe=function(){function e(t){void 0===t&&(t=e.defaults),this.options=gD(gD({},e.defaults),t)}return Object.defineProperty(e,"defaults",{get:function(){return{maxage:365,domain:cNe(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),e.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},e.prototype.get=function(e){var t;try{var n=oNe.get(e);if(null==n)return null;try{return null!==(t=JSON.parse(n))&&void 0!==t?t:null}catch(e){return null!=n?n:null}}catch(e){return null}},e.prototype.set=function(e,t){"string"==typeof t?oNe.set(e,t,this.opts()):null===t?oNe.remove(e,this.opts()):oNe.set(e,JSON.stringify(t),this.opts())},e.prototype.remove=function(e){return oNe.remove(e,this.opts())},e}(),lNe=function(){function e(){}return e.prototype.localStorageWarning=function(e,t){console.warn("Unable to access ".concat(e,", localStorage may be ").concat(t))},e.prototype.get=function(e){var t;try{var n=localStorage.getItem(e);if(null===n)return null;try{return null!==(t=JSON.parse(n))&&void 0!==t?t:null}catch(e){return null!=n?n:null}}catch(t){return this.localStorageWarning(e,"unavailable"),null}},e.prototype.set=function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){this.localStorageWarning(e,"full")}},e.prototype.remove=function(e){try{return localStorage.removeItem(e)}catch(t){this.localStorageWarning(e,"unavailable")}},e}(),dNe=function(){function e(){this.cache={}}return e.prototype.get=function(e){var t;return null!==(t=this.cache[e])&&void 0!==t?t:null},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.remove=function(e){delete this.cache[e]},e}(),fNe={Cookie:"cookie",LocalStorage:"localStorage",Memory:"memory"};function pNe(e){return e&&e.stores&&Array.isArray(e.stores)&&e.stores.every((function(e){return Object.values(fNe).includes(e)}))}var hNe,mNe=function(){function e(e){this.stores=e}return e.prototype.get=function(e){for(var t=null,n=0,r=this.stores;n<r.length;n++){var i=r[n];try{if(null!=(t=i.get(e)))return t}catch(t){console.warn("Can't access ".concat(e,": ").concat(t))}}return null},e.prototype.set=function(e,t){this.stores.forEach((function(n){try{n.set(e,t)}catch(t){console.warn("Can't set ".concat(e,": ").concat(t))}}))},e.prototype.clear=function(e){this.stores.forEach((function(t){try{t.remove(e)}catch(t){console.warn("Can't remove ".concat(e,": ").concat(t))}}))},e.prototype.getAndSync=function(e){var t=this.get(e),n="number"==typeof t?t.toString():t;return this.set(e,n),n},e}();function yNe(e){var t=e.map((function(e){var t,n;switch(!function(e){return"object"==typeof e&&void 0!==e.name}(e)?t=e:(t=e.name,n=e.settings),t){case fNe.Cookie:return new uNe(n);case fNe.LocalStorage:return new lNe;case fNe.Memory:return new dNe;default:throw new Error("Unknown Store Type: ".concat(e))}}));return t}function bNe(e,t){return e.map((function(e){return t&&e===fNe.Cookie?{name:e,settings:t}:e}))}function gNe(){if(hNe)return hNe;var e=cNe(window.location.href);return hNe={expires:31536e6,secure:!1,path:"/"},e&&(hNe.domain=e),hNe}var vNe="npm";function wNe(){return vNe}function TNe(e,t,n,r){var i,a,o,s,c,u,l=e.user();t.context=null!==(a=null!==(i=t.context)&&void 0!==i?i:t.options)&&void 0!==a?a:{};var d=t.context,f="string"==typeof(null===(o=d.page)||void 0===o?void 0:o.search)?null===(s=d.page)||void 0===s?void 0:s.search:"";delete t.options,t.writeKey=null==n?void 0:n.apiKey,d.userAgent=navigator.userAgent;var p=navigator.userLanguage||navigator.language;if(void 0===d.locale&&void 0!==p&&(d.locale=p),!d.library){var h=wNe();d.library="web"===h?{name:"analytics.js",version:"next-".concat(iNe)}:{name:"analytics.js",version:"npm:next-".concat(iNe)}}f&&!d.campaign&&(d.campaign=function(e){return e.startsWith("?")&&(e=e.substring(1)),(e=e.replace(/\?/g,"&")).split("&").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1],a=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var o=r.substr(4);"campaign"===o&&(o="name"),e[o]=sNe(a)}return e}),{})}(f)),function(e,t,n){var r=new mNe(n?[]:[new uNe(gNe())]),i=r.get("s:context.referrer"),a=function(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1));for(var n=0,r=(e=e.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),a=i[0],o=i[1];if(t[a])return{id:o,type:t[a]}}}(e);(a=null!=a?a:i)&&(t&&(t.referrer=gD(gD({},t.referrer),a)),r.set("s:context.referrer",a))}(f,d,null!==(c=e.options.disableClientPersistence)&&void 0!==c&&c),t.userId=t.userId||l.id(),t.anonymousId=t.anonymousId||l.anonymousId(),t.sentAt=new Date;var m=e.queue.failedInitializations||[];m.length>0&&(t._metadata={failedInitializations:m});var y=[],b=[];for(var g in r){var v=r[g];"Segment.io"===g&&y.push(g),"bundled"===v.bundlingStatus&&y.push(g),"unbundled"===v.bundlingStatus&&b.push(g)}for(var w=0,T=(null==n?void 0:n.unbundledIntegrations)||[];w<T.length;w++){var E=T[w];b.includes(E)||b.push(E)}var A=null!==(u=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==u?u:{},x=[];y.sort().forEach((function(e){var t;(null!==(t=A[e])&&void 0!==t?t:[]).forEach((function(e){x.push(e)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(t._metadata=gD(gD({},t._metadata),{bundled:y.sort(),unbundled:b.sort(),bundledIds:x}));var O=function(){var e=oNe.get("_ga");if(e&&e.startsWith("amp"))return e}();return O&&(d.amp={id:O}),t}var ENe="api.segment.io/v1";function ANe(e){console.error("Error sending segment performance metrics",e)}var xNe,ONe=function(){function e(e){var t,n,r,i,a=this;if(this.host=null!==(t=null==e?void 0:e.host)&&void 0!==t?t:ENe,this.sampleRate=null!==(n=null==e?void 0:e.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==e?void 0:e.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==e?void 0:e.maxQueueSize)&&void 0!==i?i:20,this.queue=[],this.sampleRate>0){var o=!1,s=function(){o||(o=!0,a.flush().catch(ANe),o=!1,setTimeout(s,a.flushTimer))};s()}}return e.prototype.increment=function(e,t){if(e.includes("analytics_js.")&&0!==t.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=function(e,t,n){var r=t.reduce((function(e,t){var n=t.split(":"),r=n[0],i=n[1];return e[r]=i,e}),{});return{type:"Counter",metric:e,value:1,tags:gD(gD({},r),{library:"analytics.js",library_version:"web"===n?"next-".concat(iNe):"npm:next-".concat(iNe)})}}(e,t,wNe());this.queue.push(n),e.includes("error")&&this.flush().catch(ANe)}},e.prototype.flush=function(){return AD(this,void 0,void 0,(function(){var e=this;return xD(this,(function(t){switch(t.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(t){ANe(t),e.sampleRate=0}))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(){return AD(this,void 0,void 0,(function(){var e,t,n;return xD(this,(function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":"text/plain"},n="https://".concat(this.host,"/m"),[2,rNe(n,{headers:t,body:JSON.stringify(e),method:"POST"})]}))}))},e}(),CNe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return bD(t,e),t.initRemoteMetrics=function(e){xNe=new ONe(e)},t.prototype.increment=function(t,n,r){e.prototype.increment.call(this,t,n,r),null==xNe||xNe.increment(t,null!=r?r:[])},t}(BRe),INe=function(e){function t(t,n){return e.call(this,t,n,new CNe)||this}return bD(t,e),t.system=function(){return new this({type:"track",event:"system"})},t}(zRe),SNe={exports:{}};!function(e,t){e.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],r=e[1],i=e[2],a=e[3];r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|a>>>20)+n|0)&n|~a&r)+t[2]+606105819|0)<<17|i>>>15)+a|0)&a|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|a>>>20)+n|0)&n|~a&r)+t[6]-1473231341|0)<<17|i>>>15)+a|0)&a|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|a>>>20)+n|0)&n|~a&r)+t[10]-42063|0)<<17|i>>>15)+a|0)&a|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|a>>>20)+n|0)&n|~a&r)+t[14]-1502002290|0)<<17|i>>>15)+a|0)&a|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|a>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+a|0)&n|a&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|a>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+a|0)&n|a&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|a>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+a|0)&n|a&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|a>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+a|0)&n|a&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|a>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+a|0)^a^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|a>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+a|0)^a^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|a>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+a|0)^a^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|a>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+a|0)^a^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[14]-1416354905|0)<<15|i>>>17)+a|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[10]-1051523|0)<<15|i>>>17)+a|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[6]-1560198380|0)<<15|i>>>17)+a|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[2]+718787259|0)<<15|i>>>17)+a|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=a+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function a(e){var t,i,a,o,s,c,u=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=u;t+=64)n(l,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)a[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(n(l,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,n(l,a),l}function o(e){var t,r,a,o,s,c,u=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=u;t+=64)n(l,i(e.subarray(t-64,t)));for(r=(e=t-64<u?e.subarray(t-64):new Uint8Array(0)).length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)a[t>>2]|=e[t]<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(n(l,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,n(l,a),l}function s(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function c(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join("")}function u(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function l(e,t){var n,r=e.length,i=new ArrayBuffer(r),a=new Uint8Array(i);for(n=0;n<r;n+=1)a[n]=e.charCodeAt(n);return t?a:i}function d(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function f(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function p(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function h(){this.reset()}return c(a("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,a,o,s,c=this.byteLength,u=t(n,c),l=c;return r!==e&&(l=t(r,c)),u>l?new ArrayBuffer(0):(i=l-u,a=new ArrayBuffer(i),o=new Uint8Array(a),s=new Uint8Array(this,u,i),o.set(s),a)}}(),h.prototype.append=function(e){return this.appendBinary(u(e)),this},h.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},h.prototype.end=function(e){var t,n,r=this._buff,i=r.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)a[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(a,i),n=c(this._hash),e&&(n=p(n)),this.reset(),n},h.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},h.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},h.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},h.prototype._finish=function(e,t){var r,i,a,o=t;if(e[o>>2]|=128<<(o%4<<3),o>55)for(n(this._hash,e),o=0;o<16;o+=1)e[o]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),a=parseInt(r[1],16)||0,e[14]=i,e[15]=a,n(this._hash,e)},h.hash=function(e,t){return h.hashBinary(u(e),t)},h.hashBinary=function(e,t){var n=c(a(e));return t?p(n):n},h.ArrayBuffer=function(){this.reset()},h.ArrayBuffer.prototype.append=function(e){var t,r=f(this._buff.buffer,e,!0),a=r.length;for(this._length+=e.byteLength,t=64;t<=a;t+=64)n(this._hash,i(r.subarray(t-64,t)));return this._buff=t-64<a?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},h.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)a[t>>2]|=r[t]<<(t%4<<3);return this._finish(a,i),n=c(this._hash),e&&(n=p(n)),this.reset(),n},h.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.ArrayBuffer.prototype.getState=function(){var e=h.prototype.getState.call(this);return e.buff=d(e.buff),e},h.ArrayBuffer.prototype.setState=function(e){return e.buff=l(e.buff,!0),h.prototype.setState.call(this,e)},h.ArrayBuffer.prototype.destroy=h.prototype.destroy,h.ArrayBuffer.prototype._finish=h.prototype._finish,h.ArrayBuffer.hash=function(e,t){var n=c(o(new Uint8Array(e)));return t?p(n):n},h}()}(SNe);var _Ne=lt(SNe.exports),PNe=function(){function e(e){this.user=e}return e.prototype.track=function(e,t,n,r){return this.normalize(gD(gD({},this.baseEvent()),{event:e,type:"track",properties:t,options:gD({},n),integrations:gD({},r)}))},e.prototype.page=function(e,t,n,r,i){var a,o={type:"page",properties:gD({},n),options:gD({},r),integrations:gD({},i)};return null!==e&&(o.category=e,o.properties=null!==(a=o.properties)&&void 0!==a?a:{},o.properties.category=e),null!==t&&(o.name=t),this.normalize(gD(gD({},this.baseEvent()),o))},e.prototype.screen=function(e,t,n,r,i){var a={type:"screen",properties:gD({},n),options:gD({},r),integrations:gD({},i)};return null!==e&&(a.category=e),null!==t&&(a.name=t),this.normalize(gD(gD({},this.baseEvent()),a))},e.prototype.identify=function(e,t,n,r){return this.normalize(gD(gD({},this.baseEvent()),{type:"identify",userId:e,traits:t,options:gD({},n),integrations:gD({},r)}))},e.prototype.group=function(e,t,n,r){return this.normalize(gD(gD({},this.baseEvent()),{type:"group",traits:t,options:gD({},n),integrations:gD({},r),groupId:e}))},e.prototype.alias=function(e,t,n,r){var i={userId:e,type:"alias",options:gD({},n),integrations:gD({},r)};return null!==t&&(i.previousId=t),void 0===e?this.normalize(gD(gD({},i),this.baseEvent())):this.normalize(gD(gD({},this.baseEvent()),i))},e.prototype.baseEvent=function(){var e={integrations:{},options:{}},t=this.user;return t.id()&&(e.userId=t.id()),t.anonymousId()&&(e.anonymousId=t.anonymousId()),e},e.prototype.context=function(e){var t,n,r,i=["integrations","anonymousId","timestamp","userId"],a=null!==(t=e.options)&&void 0!==t?t:{};delete a.integrations;var o=Object.keys(a),s=null!==(r=null===(n=e.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},c={};return o.forEach((function(e){"context"!==e&&(i.includes(e)?vRe(c,e,a[e]):vRe(s,e,a[e]))})),[s,c]},e.prototype.normalize=function(e){var t,n,r;(null===(t=e.options)||void 0===t?void 0:t.anonymousId)&&this.user.anonymousId(e.options.anonymousId);var i=Object.keys(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(t,n){var r,i;return gD(gD({},t),((r={})[n]=Boolean(null===(i=e.integrations)||void 0===i?void 0:i[n]),r))}),{}),a=gD(gD({},i),null===(r=e.options)||void 0===r?void 0:r.integrations),o=this.context(e),s=o[0],c=o[1];e.options;var u=vD(e,["options"]),l=gD(gD(gD({timestamp:new Date},u),{context:s,integrations:a}),c),d="ajs-next-"+_Ne.hash(JSON.stringify(l)+LRe());return gD(gD({},l),{messageId:d})},e}(),kNe={getItem:function(){},setItem:function(){},removeItem:function(){}};try{kNe=JRe()&&window.localStorage?window.localStorage:kNe}catch(e){console.warn("Unable to access localStorage",e)}function RNe(e){var t=kNe.getItem(e);return(t?JSON.parse(t):[]).map((function(e){return new INe(e.event,e.id)}))}function NNe(e){var t=kNe.getItem(e);return t?JSON.parse(t):{}}function MNe(e){kNe.removeItem(e)}function DNe(e,t,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(e,":lock"),i=kNe.getItem(r),a=i?JSON.parse(i):null,o=null===a||function(e){return(new Date).getTime()>e}(a);if(o)return kNe.setItem(r,JSON.stringify((new Date).getTime()+50)),t(),void kNe.removeItem(r);!o&&n<3?setTimeout((function(){DNe(e,t,n+1)}),50):console.error("Unable to retrieve lock")}var LNe=function(e){function t(t,n){var r=e.call(this,t,[])||this,i="persisted-queue:v1:".concat(n,":items"),a="persisted-queue:v1:".concat(n,":seen"),o=[],s={};return DNe(n,(function(){try{o=RNe(i),s=NNe(a),MNe(i),MNe(a),r.queue=kD(kD([],o,!0),r.queue,!0),r.seen=gD(gD({},s),r.seen)}catch(e){console.error(e)}})),window.addEventListener("pagehide",(function(){if(r.todo>0){var e=kD(kD([],r.queue,!0),r.future,!0);try{DNe(n,(function(){!function(e,t){var n=RNe(e),r=kD(kD([],t,!0),n,!0).reduce((function(e,t){var n;return gD(gD({},e),((n={})[t.id]=t,n))}),{});kNe.setItem(e,JSON.stringify(Object.values(r)))}(i,e),function(e,t){var n=NNe(e);kNe.setItem(e,JSON.stringify(gD(gD({},n),t)))}(a,r.seen)}))}catch(e){console.error(e)}}})),r}return bD(t,e),t}(NRe),FNe=function(e){function t(t){return e.call(this,"string"==typeof t?new LNe(4,t):t)||this}return bD(t,e),t.prototype.flush=function(){return AD(this,void 0,void 0,(function(){return xD(this,(function(t){return $Re()?[2,[]]:[2,e.prototype.flush.call(this)]}))}))},t}(VRe);function BNe(e){for(var t=e.constructor.prototype,n=0,r=Object.getOwnPropertyNames(t);n<r.length;n++){var i=r[n];if("constructor"!==i){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);a&&"function"==typeof a.value&&(e[i]=e[i].bind(e))}}return e}var jNe={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},UNe=function(){function e(e,t){void 0===e&&(e=jNe);var n,r,i,a,o=this;this.options={},this.id=function(e){if(o.options.disable)return null;var t=o.identityStore.getAndSync(o.idKey);void 0!==e&&(o.identityStore.set(o.idKey,e),e!==t&&null!==t&&null!==e&&o.anonymousId(null));var n=o.identityStore.getAndSync(o.idKey);if(n)return n;var r=o.legacyUserStore.get(jNe.cookie.oldKey);return r?"object"==typeof r?r.id:r:null},this.anonymousId=function(e){var t,n;if(o.options.disable)return null;if(void 0===e){var r=null!==(t=o.identityStore.getAndSync(o.anonKey))&&void 0!==t?t:null===(n=o.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===e?(o.identityStore.set(o.anonKey,null),o.identityStore.getAndSync(o.anonKey)):(o.identityStore.set(o.anonKey,null!=e?e:LRe()),o.identityStore.getAndSync(o.anonKey))},this.traits=function(e){var t;if(!o.options.disable)return null===e&&(e={}),e&&o.traitsStore.set(o.traitsKey,null!=e?e:{}),null!==(t=o.traitsStore.get(o.traitsKey))&&void 0!==t?t:{}},this.options=gD(gD({},jNe),e),this.cookieOptions=t,this.idKey=null!==(r=null===(n=e.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:jNe.cookie.key,this.traitsKey=null!==(a=null===(i=e.localStorage)||void 0===i?void 0:i.key)&&void 0!==a?a:jNe.localStorage.key,this.anonKey="ajs_anonymous_id",this.identityStore=this.createStorage(this.options,t),this.legacyUserStore=this.createStorage(this.options,t,(function(e){return e===fNe.Cookie})),this.traitsStore=this.createStorage(this.options,t,(function(e){return e!==fNe.Cookie}));var s=this.legacyUserStore.get(jNe.cookie.oldKey);s&&"object"==typeof s&&(s.id&&this.id(s.id),s.traits&&this.traits(s.traits)),BNe(this)}return e.prototype.legacySIO=function(){var e=this.legacyUserStore.get("_sio");if(!e)return null;var t=e.split("----");return[t[0],t[1]]},e.prototype.identify=function(e,t){if(!this.options.disable){t=null!=t?t:{};var n=this.id();null!==n&&n!==e||(t=gD(gD({},this.traits()),t)),e&&this.id(e),this.traits(t)}},e.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},e.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},e.prototype.load=function(){return new e(this.options,this.cookieOptions)},e.prototype.save=function(){return!0},e.prototype.createStorage=function(e,t,n){var r=[fNe.LocalStorage,fNe.Cookie,fNe.Memory];return e.disable?new mNe([]):e.persist?(void 0!==e.storage&&null!==e.storage&&pNe(e.storage)&&(r=e.storage.stores),e.localStorageFallbackDisabled&&(r=r.filter((function(e){return e!==fNe.LocalStorage}))),n&&(r=r.filter(n)),new mNe(yNe(bNe(r,t)))):new mNe([new dNe])},e.defaults=jNe,e}(),zNe={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},HNe=function(e){function t(t,n){void 0===t&&(t=zNe);var r=e.call(this,gD(gD({},zNe),t),n)||this;return r.anonymousId=function(e){},BNe(r),r}return bD(t,e),t}(UNe),WNe="This is being deprecated and will be not be available in future releases of Analytics JS",VNe=nNe(),GNe=null==VNe?void 0:VNe.analytics;function qNe(){console.warn(WNe)}var KNe=function(e){function t(t,n,r,i,a){var o,s,c,u=this;(u=e.call(this)||this)._debug=!1,u.initialized=!1,u.user=function(){return u._user},u.init=u.initialize.bind(u),u.log=qNe,u.addIntegrationMiddleware=qNe,u.listeners=qNe,u.addEventListener=qNe,u.removeAllListeners=qNe,u.removeListener=qNe,u.removeEventListener=qNe,u.hasListeners=qNe,u.add=qNe,u.addIntegration=qNe;var l=null==n?void 0:n.cookie,d=null!==(o=null==n?void 0:n.disableClientPersistence)&&void 0!==o&&o;u.settings=t,u.settings.timeout=null!==(s=u.settings.timeout)&&void 0!==s?s:300,u.queue=null!=r?r:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=t?4:1,i=n?new NRe(r,[]):new LNe(r,e);return new FNe(i)}("".concat(t.writeKey,":event-queue"),null==n?void 0:n.retryQueue,d);var f=null==n?void 0:n.storage;return u._universalStorage=u.createStore(d,f,l),u._user=null!=i?i:new UNe(gD({persist:!d,storage:null==n?void 0:n.storage},null==n?void 0:n.user),l).load(),u._group=null!=a?a:new HNe(gD({persist:!d,storage:null==n?void 0:n.storage},null==n?void 0:n.group),l).load(),u.eventFactory=new PNe(u._user),u.integrations=null!==(c=null==n?void 0:n.integrations)&&void 0!==c?c:{},u.options=null!=n?n:{},BNe(u),u}return bD(t,e),t.prototype.createStore=function(e,t,n){return e?new mNe([new dNe]):t&&pNe(t)?new mNe(yNe(bNe(t.stores,n))):new mNe(yNe([fNe.LocalStorage,{name:fNe.Cookie,settings:n},fNe.Memory]))},Object.defineProperty(t.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),t.prototype.track=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n,r,i,a,o,s=this;return xD(this,(function(c){return t=qRe.apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],o=this.eventFactory.track(n,r,i,this.integrations),[2,this._dispatch(o,a).then((function(e){return s.emit("track",n,e.event.properties,e.event.options),e}))]}))}))},t.prototype.page=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n,r,i,a,o,s,c=this;return xD(this,(function(u){return t=KRe.apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=this.eventFactory.page(n,r,i,a,this.integrations),[2,this._dispatch(s,o).then((function(e){return c.emit("page",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.identify=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n,r,i,a,o,s=this;return xD(this,(function(c){return t=XRe(this._user).apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],this._user.identify(n,r),o=this.eventFactory.identify(this._user.id(),this._user.traits(),i,this.integrations),[2,this._dispatch(o,a).then((function(e){return s.emit("identify",e.event.userId,e.event.traits,e.event.options),e}))]}))}))},t.prototype.group=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(0===t.length)return this._group;var r=XRe(this._group).apply(void 0,t),i=r[0],a=r[1],o=r[2],s=r[3];this._group.identify(i,a);var c=this._group.id(),u=this._group.traits(),l=this.eventFactory.group(c,u,o,this.integrations);return this._dispatch(l,s).then((function(t){return e.emit("group",t.event.groupId,t.event.traits,t.event.options),t}))},t.prototype.alias=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n,r,i,a,o,s=this;return xD(this,(function(c){return t=YRe.apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],o=this.eventFactory.alias(n,r,i,this.integrations),[2,this._dispatch(o,a).then((function(e){return s.emit("alias",n,r,e.event.options),e}))]}))}))},t.prototype.screen=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n,r,i,a,o,s,c=this;return xD(this,(function(u){return t=KRe.apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=this.eventFactory.screen(n,r,i,a,this.integrations),[2,this._dispatch(s,o).then((function(e){return c.emit("screen",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.trackClick=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n;return xD(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return Q1e}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,kD([this],e,!1))]}}))}))},t.prototype.trackLink=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n;return xD(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return Q1e}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,kD([this],e,!1))]}}))}))},t.prototype.trackSubmit=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n;return xD(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return Q1e}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,kD([this],e,!1))]}}))}))},t.prototype.trackForm=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n;return xD(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return Q1e}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,kD([this],e,!1))]}}))}))},t.prototype.register=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n,r=this;return xD(this,(function(i){switch(i.label){case 0:return t=INe.system(),n=e.map((function(e){return r.queue.register(t,e,r)})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.deregister=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n,r=this;return xD(this,(function(i){switch(i.label){case 0:return t=INe.system(),n=e.map((function(e){var n=r.queue.plugins.find((function(t){return t.name===e}));if(n)return r.queue.deregister(t,n,r);t.log("warn","plugin ".concat(e," not found"))})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.debug=function(e){return!1===e&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=e,this},t.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},t.prototype.timeout=function(e){this.settings.timeout=e},t.prototype._dispatch=function(e,t){return AD(this,void 0,void 0,(function(){var n;return xD(this,(function(r){return n=new INe(e),$Re()&&!this.options.retryQueue?[2,n]:[2,GRe(n,this.queue,this,{callback:t,debug:this._debug,timeout:this.settings.timeout})]}))}))},t.prototype.addSourceMiddleware=function(e){return AD(this,void 0,void 0,(function(){var t=this;return xD(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return AD(t,void 0,void 0,(function(){var t,n,r;return xD(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve().then((function(){return VDe}))];case 1:return t=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach((function(e){if("destination"===e.type)return n[e.name]=!0})),r=t(e,n),[4,this.register(r)];case 2:return i.sent(),[2]}}))}))}))];case 1:return n.sent(),[2,this]}}))}))},t.prototype.addDestinationMiddleware=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.queue.plugins.filter((function(t){return t.name.toLowerCase()===e.toLowerCase()}));return r.forEach((function(e){e.addMiddleware.apply(e,t)})),Promise.resolve(this)},t.prototype.setAnonymousId=function(e){return this._user.anonymousId(e)},t.prototype.queryString=function(e){return AD(this,void 0,void 0,(function(){return xD(this,(function(t){switch(t.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,Promise.resolve().then((function(){return e5e}))];case 1:return[2,(0,t.sent().queryString)(this,e)]}}))}))},t.prototype.use=function(e){return e(this),this},t.prototype.ready=function(e){return void 0===e&&(e=function(e){return e}),AD(this,void 0,void 0,(function(){return xD(this,(function(t){return[2,Promise.all(this.queue.plugins.map((function(e){return e.ready?e.ready():Promise.resolve()}))).then((function(t){return e(t),t}))]}))}))},t.prototype.noConflict=function(){return console.warn(WNe),window.analytics=null!=GNe?GNe:this,this},t.prototype.normalize=function(e){return console.warn(WNe),this.eventFactory.normalize(e)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(WNe),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return iNe},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e,t){return AD(this,void 0,void 0,(function(){return xD(this,(function(e){return console.warn(WNe),[2,Promise.resolve(this)]}))}))},t.prototype.pageview=function(e){return AD(this,void 0,void 0,(function(){return xD(this,(function(t){switch(t.label){case 0:return console.warn(WNe),[4,this.page({path:e})];case 1:return t.sent(),[2,this]}}))}))},Object.defineProperty(t.prototype,"plugins",{get:function(){var e;return console.warn(WNe),null!==(e=this._plugins)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(WNe);var e=this.queue.plugins.filter((function(e){return"destination"===e.type})).reduce((function(e,t){var n="".concat(t.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return e;var i=r.Integration;return i?(e[t.name]=i,e):(e[t.name]=r,e)}),{});return e},enumerable:!1,configurable:!0}),t.prototype.push=function(e){var t=e.shift();t&&!this[t]||this[t].apply(this,e)},t}(gRe);function XNe(){return"undefined"!=typeof process&&process.env?process.env:{}}var YNe,JNe=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,ZNe=function(){var e=function(){var e;return null!=YNe?YNe:null===(e=window.analytics)||void 0===e?void 0:e._cdn}();if(e)return e;var t,n=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach((function(e){var n,r=null!==(n=e.getAttribute("src"))&&void 0!==n?n:"",i=JNe.exec(r);i&&i[1]&&(t=i[1])})),t);return n||"https://cdn.segment.com"},QNe=function(){var e=ZNe();return"".concat(e,"/next-integrations")};function $Ne(e,t){var n,r=Object.entries(null!==(n=t.integrations)&&void 0!==n?n:{}).reduce((function(e,t){var n,r,i=t[0],a=t[1];return gD(gD({},e),"object"==typeof a?((n={})[i]=a,n):((r={})[i]={},r))}),{});return Object.entries(e.integrations).reduce((function(e,t){var n,i=t[0],a=t[1];return gD(gD({},e),((n={})[i]=gD(gD({},a),r[i]),n))}),{})}function eMe(){var e=document.querySelector("link[rel='canonical']");if(e)return e.getAttribute("href")||void 0}function tMe(){var e=eMe();if(!e)return window.location.pathname;var t=document.createElement("a");return t.href=e,t.pathname.startsWith("/")?t.pathname:"/"+t.pathname}function nMe(e){void 0===e&&(e="");var t=eMe();if(t)return t.includes("?")?t:"".concat(t).concat(e);var n=window.location.href,r=n.indexOf("#");return-1===r?n:n.slice(0,r)}function rMe(e){var t=e.event;t.context=t.context||{};var n={path:tMe(),referrer:document.referrer,search:location.search,title:document.title,url:nMe(location.search)},r=void 0;return"page"===t.type&&(r=t.properties&&function(e,t){return Object.assign.apply(Object,kD([{}],t.map((function(t){var n;if(e&&Object.prototype.hasOwnProperty.call(e,t))return(n={})[t]=e[t],n})),!1))}(t.properties,Object.keys(n)),t.properties=gD(gD(gD({},n),t.properties),t.name?{name:t.name}:{})),t.context.page=gD(gD(gD({},n),r),t.context.page),e}var iMe={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:rMe,alias:rMe,track:rMe,identify:rMe,group:rMe};function aMe(e){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(t){return t.src===e}))}function oMe(e,t){var n=aMe(e);if(void 0!==n){var r=null==n?void 0:n.getAttribute("status");if("loaded"===r)return Promise.resolve(n);if("loading"===r)return new Promise((function(e,t){n.addEventListener("load",(function(){return e(n)})),n.addEventListener("error",(function(e){return t(e)}))}))}return new Promise((function(n,r){var i,a=window.document.createElement("script");a.type="text/javascript",a.src=e,a.async=!0,a.setAttribute("status","loading");for(var o=0,s=Object.entries(null!=t?t:{});o<s.length;o++){var c=s[o],u=c[0],l=c[1];a.setAttribute(u,l)}a.onload=function(){a.onerror=a.onload=null,a.setAttribute("status","loaded"),n(a)},a.onerror=function(){a.onerror=a.onload=null,a.setAttribute("status","error"),r(new Error("Failed to load ".concat(e)))};var d=window.document.getElementsByTagName("script")[0];null===(i=d.parentElement)||void 0===i||i.insertBefore(a,d)}))}function sMe(e){var t=aMe(e);return void 0!==t&&t.remove(),Promise.resolve()}var cMe={},uMe={},lMe={},dMe={exports:{}};!function(e){function t(e){return function(t,n,r,a){var o,s=a&&function(e){return"function"==typeof e}(a.normalizer)?a.normalizer:i;n=s(n);for(var c=!1;!c;)u();function u(){for(o in t){var e=s(o);if(0===n.indexOf(e)){var r=n.substr(e.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=t[o];return null==i?void(c=!0):n.length?void(t=i):void(c=!0)}}}o=void 0,c=!0}if(o)return null==t?t:e(t,o,r)}}function n(e,t){return e.hasOwnProperty(t)&&delete e[t],e}function r(e,t,n){return e.hasOwnProperty(t)&&(e[t]=n),e}function i(e){return e.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}e.exports=t((function(e,t){if(e.hasOwnProperty(t))return e[t]})),e.exports.find=e.exports,e.exports.replace=function(e,n,i,a){return t(r).call(this,e,n,i,a),e},e.exports.del=function(e,r,i){return t(n).call(this,e,r,null,i),e}}(dMe);var fMe=dMe.exports,pMe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lMe,"__esModule",{value:!0});var hMe=pMe(fMe);function mMe(e,t){return function(){var n=this.traits(),r=this.properties?this.properties():{};return hMe.default(n,"address."+e)||hMe.default(n,e)||(t?hMe.default(n,"address."+t):null)||(t?hMe.default(n,t):null)||hMe.default(r,"address."+e)||hMe.default(r,e)||(t?hMe.default(r,"address."+t):null)||(t?hMe.default(r,t):null)}}lMe.default=function(e){e.zip=mMe("postalCode","zip"),e.country=mMe("country"),e.street=mMe("street"),e.state=mMe("state"),e.city=mMe("city"),e.region=mMe("region")};var yMe={};Object.defineProperty(yMe,"__esModule",{value:!0}),yMe.clone=void 0,yMe.clone=function e(t){if("object"!=typeof t)return t;if("[object Object]"===Object.prototype.toString.call(t)){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=e(t[r]));return n}return Array.isArray(t)?t.map(e):t};var bMe={};Object.defineProperty(bMe,"__esModule",{value:!0});var gMe={Salesforce:!0};bMe.default=function(e){return!gMe[e]};var vMe={},wMe=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;vMe.parse=function(e){var t=[1,5,6,7,11,12],n=wMe.exec(e),r=0;if(!n)return new Date(e);for(var i,a=0;i=t[a];a++)n[i]=parseInt(n[i],10)||0;n[2]=parseInt(n[2],10)||1,n[3]=parseInt(n[3],10)||1,n[2]--,n[8]=n[8]?(n[8]+"00").substring(0,3):0," "===n[4]?r=(new Date).getTimezoneOffset():"Z"!==n[9]&&n[10]&&(r=60*n[11]+n[12],"+"===n[10]&&(r=0-r));var o=Date.UTC(n[1],n[2],n[3],n[5],n[6]+r,n[7],n[8]);return new Date(o)},vMe.is=function(e,t){return"string"==typeof e&&((!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&wMe.test(e))};var TMe={},EMe=/\d{13}/;TMe.is=function(e){return EMe.test(e)},TMe.parse=function(e){return e=parseInt(e,10),new Date(e)};var AMe={},xMe=/\d{10}/;AMe.is=function(e){return xMe.test(e)},AMe.parse=function(e){var t=1e3*parseInt(e,10);return new Date(t)};var OMe=vMe,CMe=TMe,IMe=AMe,SMe=Object.prototype.toString;var _Me=function(e){return t=e,"[object Date]"===SMe.call(t)?e:function(e){return"[object Number]"===SMe.call(e)}(e)?new Date((n=e)<315576e5?1e3*n:n):OMe.is(e)?OMe.parse(e):CMe.is(e)?CMe.parse(e):IMe.is(e)?IMe.parse(e):new Date(e);var t,n};var PMe=vMe,kMe=RMe;function RMe(e,t){return void 0===t&&(t=!0),e&&"object"==typeof e?function(e,t){return Object.keys(e).forEach((function(n){e[n]=RMe(e[n],t)})),e}(e,t):Array.isArray(e)?function(e,t){return e.forEach((function(n,r){e[r]=RMe(n,t)})),e}(e,t):PMe.is(e,t)?PMe.parse(e):e}var NMe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(uMe,"__esModule",{value:!0}),uMe.Facade=void 0;var MMe=NMe(lMe),DMe=yMe,LMe=NMe(bMe),FMe=NMe(_Me),BMe=NMe(fMe),jMe=NMe(kMe);function UMe(e,t){t=t||{},this.raw=DMe.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=DMe.clone(e)),"traverse"in t||(t.traverse=!0),e.timestamp="timestamp"in e?FMe.default(e.timestamp):new Date,t.traverse&&jMe.default(e),this.opts=t,this.obj=e}uMe.Facade=UMe;var zMe=UMe.prototype;function HMe(e){return DMe.clone(e)}zMe.proxy=function(e){var t=e.split("."),n=this[e=t.shift()]||this.obj[e];return n?("function"==typeof n&&(n=n.call(this)||{}),0===t.length||(n=BMe.default(n,t.join("."))),this.opts.clone?HMe(n):n):n},zMe.field=function(e){var t=this.obj[e];return this.opts.clone?HMe(t):t},UMe.proxy=function(e){return function(){return this.proxy(e)}},UMe.field=function(e){return function(){return this.field(e)}},UMe.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var n=this.proxy(e);return n&&(n=[this.opts.clone?DMe.clone(n):n]),n||[]}},UMe.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var n=this.proxy(e+"s");return Array.isArray(n)?n[0]:void 0}},zMe.json=function(){var e=this.opts.clone?DMe.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},zMe.rawEvent=function(){return this.raw},zMe.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?DMe.clone(t):t;if(!e)return n;if(this.enabled(e)){var r=this.integrations(),i=r[e]||BMe.default(r,e);return"object"!=typeof i&&(i=BMe.default(this.options(),e)),"object"==typeof i?i:{}}},zMe.context=zMe.options,zMe.enabled=function(e){var t=this.proxy("options.providers.all");"boolean"!=typeof t&&(t=this.proxy("options.all")),"boolean"!=typeof t&&(t=this.proxy("integrations.all")),"boolean"!=typeof t&&(t=!0);var n=t&&LMe.default(e),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(e)&&(n=r.providers[e]),r.hasOwnProperty(e)){var i=r[e];n="boolean"!=typeof i||i}return!!n},zMe.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},zMe.active=function(){var e=this.proxy("options.active");return null==e&&(e=!0),e},zMe.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},zMe.sessionId=zMe.anonymousId,zMe.groupId=UMe.proxy("options.groupId"),zMe.traits=function(e){var t=this.proxy("options.traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},zMe.library=function(){var e=this.proxy("options.library");return e?"string"==typeof e?{name:e,version:null}:e:{name:"unknown",version:null}},zMe.device=function(){var e=this.proxy("context.device");"object"==typeof e&&null!==e||(e={});var t=this.library().name;return e.type||(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android")),e},zMe.userAgent=UMe.proxy("context.userAgent"),zMe.timezone=UMe.proxy("context.timezone"),zMe.timestamp=UMe.field("timestamp"),zMe.channel=UMe.field("channel"),zMe.ip=UMe.proxy("context.ip"),zMe.userId=UMe.field("userId"),MMe.default(zMe);var WMe={},VMe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(WMe,"__esModule",{value:!0}),WMe.Alias=void 0;var GMe=VMe(_s),qMe=uMe;function KMe(e,t){qMe.Facade.call(this,e,t)}WMe.Alias=KMe,GMe.default(KMe,qMe.Facade),KMe.prototype.action=function(){return"alias"},KMe.prototype.type=KMe.prototype.action,KMe.prototype.previousId=function(){return this.field("previousId")||this.field("from")},KMe.prototype.from=KMe.prototype.previousId,KMe.prototype.userId=function(){return this.field("userId")||this.field("to")},KMe.prototype.to=KMe.prototype.userId;var XMe={},YMe={};Object.defineProperty(YMe,"__esModule",{value:!0});var JMe=/.+\@.+\..+/;YMe.default=function(e){return JMe.test(e)};var ZMe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(XMe,"__esModule",{value:!0}),XMe.Group=void 0;var QMe=ZMe(_s),$Me=ZMe(YMe),eDe=ZMe(_Me),tDe=uMe;function nDe(e,t){tDe.Facade.call(this,e,t)}XMe.Group=nDe,QMe.default(nDe,tDe.Facade);var rDe=nDe.prototype;rDe.action=function(){return"group"},rDe.type=rDe.action,rDe.groupId=tDe.Facade.field("groupId"),rDe.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return eDe.default(e)},rDe.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();return $Me.default(t)?t:void 0},rDe.traits=function(e){var t=this.properties(),n=this.groupId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},rDe.name=tDe.Facade.proxy("traits.name"),rDe.industry=tDe.Facade.proxy("traits.industry"),rDe.employees=tDe.Facade.proxy("traits.employees"),rDe.properties=function(){return this.field("traits")||this.field("properties")||{}};var iDe={},aDe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(iDe,"__esModule",{value:!0}),iDe.Identify=void 0;var oDe=uMe,sDe=aDe(fMe),cDe=aDe(_s),uDe=aDe(YMe),lDe=aDe(_Me),dDe=function(e){return e.trim()};function fDe(e,t){oDe.Facade.call(this,e,t)}iDe.Identify=fDe,cDe.default(fDe,oDe.Facade);var pDe=fDe.prototype;pDe.action=function(){return"identify"},pDe.type=pDe.action,pDe.traits=function(e){var t=this.field("traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(t[e[r]]=i,r!==e[r]&&delete t[r])}return t},pDe.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();return uDe.default(t)?t:void 0},pDe.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return lDe.default(e)},pDe.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return lDe.default(e)},pDe.companyName=function(){return this.proxy("traits.company.name")},pDe.name=function(){var e=this.proxy("traits.name");if("string"==typeof e)return dDe(e);var t=this.firstName(),n=this.lastName();return t&&n?dDe(t+" "+n):void 0},pDe.firstName=function(){var e=this.proxy("traits.firstName");if("string"==typeof e)return dDe(e);var t=this.proxy("traits.name");return"string"==typeof t?dDe(t).split(" ")[0]:void 0},pDe.lastName=function(){var e=this.proxy("traits.lastName");if("string"==typeof e)return dDe(e);var t=this.proxy("traits.name");if("string"==typeof t){var n=dDe(t).indexOf(" ");if(-1!==n)return dDe(t.substr(n+1))}},pDe.uid=function(){return this.userId()||this.username()||this.email()},pDe.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},pDe.age=function(){var e=this.birthday(),t=sDe.default(this.traits(),"age");return null!=t?t:e instanceof Date?(new Date).getFullYear()-e.getFullYear():void 0},pDe.avatar=function(){var e=this.traits();return sDe.default(e,"avatar")||sDe.default(e,"photoUrl")||sDe.default(e,"avatarUrl")},pDe.position=function(){var e=this.traits();return sDe.default(e,"position")||sDe.default(e,"jobTitle")},pDe.username=oDe.Facade.proxy("traits.username"),pDe.website=oDe.Facade.one("traits.website"),pDe.websites=oDe.Facade.multi("traits.website"),pDe.phone=oDe.Facade.one("traits.phone"),pDe.phones=oDe.Facade.multi("traits.phone"),pDe.address=oDe.Facade.proxy("traits.address"),pDe.gender=oDe.Facade.proxy("traits.gender"),pDe.birthday=oDe.Facade.proxy("traits.birthday");var hDe={},mDe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hDe,"__esModule",{value:!0}),hDe.Track=void 0;var yDe=mDe(_s),bDe=uMe,gDe=iDe,vDe=mDe(YMe),wDe=mDe(fMe);function TDe(e,t){bDe.Facade.call(this,e,t)}hDe.Track=TDe,yDe.default(TDe,bDe.Facade);var EDe=TDe.prototype;EDe.action=function(){return"track"},EDe.type=EDe.action,EDe.event=bDe.Facade.field("event"),EDe.value=bDe.Facade.proxy("properties.value"),EDe.category=bDe.Facade.proxy("properties.category"),EDe.id=bDe.Facade.proxy("properties.id"),EDe.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},EDe.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},EDe.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},EDe.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},EDe.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},EDe.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},EDe.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},EDe.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},EDe.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},EDe.sku=bDe.Facade.proxy("properties.sku"),EDe.tax=bDe.Facade.proxy("properties.tax"),EDe.name=bDe.Facade.proxy("properties.name"),EDe.price=bDe.Facade.proxy("properties.price"),EDe.total=bDe.Facade.proxy("properties.total"),EDe.repeat=bDe.Facade.proxy("properties.repeat"),EDe.coupon=bDe.Facade.proxy("properties.coupon"),EDe.shipping=bDe.Facade.proxy("properties.shipping"),EDe.discount=bDe.Facade.proxy("properties.discount"),EDe.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},EDe.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},EDe.description=bDe.Facade.proxy("properties.description"),EDe.plan=bDe.Facade.proxy("properties.plan"),EDe.subtotal=function(){var e=wDe.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var n=this.tax();n&&(t-=n),(n=this.shipping())&&(t-=n),(n=this.discount())&&(t+=n)}return t},EDe.products=function(){var e=this.properties(),t=wDe.default(e,"products");return Array.isArray(t)?t.filter((function(e){return null!==e})):[]},EDe.quantity=function(){return(this.obj.properties||{}).quantity||1},EDe.currency=function(){return(this.obj.properties||{}).currency||"USD"},EDe.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},EDe.query=bDe.Facade.proxy("options.query"),EDe.properties=function(e){var t=this.field("properties")||{};for(var n in e=e||{})if(Object.prototype.hasOwnProperty.call(e,n)){var r=null==this[n]?this.proxy("properties."+n):this[n]();if(null==r)continue;t[e[n]]=r,delete t[n]}return t},EDe.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},EDe.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();return vDe.default(t)?t:void 0},EDe.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event();return!e&&t&&t.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(e=this.proxy("properties.total")),function(e){if(!e)return;if("number"==typeof e)return e;if("string"!=typeof e)return;if(e=e.replace(/\$/g,""),e=parseFloat(e),!isNaN(e))return e}(e)},EDe.cents=function(){var e=this.revenue();return"number"!=typeof e?this.value()||0:100*e},EDe.identify=function(){var e=this.json();return e.traits=this.traits(),new gDe.Identify(e,this.opts)};var ADe={},xDe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ADe,"__esModule",{value:!0}),ADe.Page=void 0;var ODe=xDe(_s),CDe=uMe,IDe=hDe,SDe=xDe(YMe);function _De(e,t){CDe.Facade.call(this,e,t)}ADe.Page=_De,ODe.default(_De,CDe.Facade);var PDe=_De.prototype;PDe.action=function(){return"page"},PDe.type=PDe.action,PDe.category=CDe.Facade.field("category"),PDe.name=CDe.Facade.field("name"),PDe.title=CDe.Facade.proxy("properties.title"),PDe.path=CDe.Facade.proxy("properties.path"),PDe.url=CDe.Facade.proxy("properties.url"),PDe.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},PDe.properties=function(e){var t=this.field("properties")||{},n=this.category(),r=this.name();for(var i in e=e||{},n&&(t.category=n),r&&(t.name=r),e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=null==this[i]?this.proxy("properties."+i):this[i]();if(null==a)continue;t[e[i]]=a,i!==e[i]&&delete t[i]}return t},PDe.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();return SDe.default(t)?t:void 0},PDe.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t},PDe.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"},PDe.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new IDe.Track(t,this.opts)};var kDe={},RDe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(kDe,"__esModule",{value:!0}),kDe.Screen=void 0;var NDe=RDe(_s),MDe=ADe,DDe=hDe;function LDe(e,t){MDe.Page.call(this,e,t)}kDe.Screen=LDe,NDe.default(LDe,MDe.Page),LDe.prototype.action=function(){return"screen"},LDe.prototype.type=LDe.prototype.action,LDe.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"},LDe.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new DDe.Track(t,this.opts)};var FDe={},BDe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(FDe,"__esModule",{value:!0}),FDe.Delete=void 0;var jDe=BDe(_s),UDe=uMe;function zDe(e,t){UDe.Facade.call(this,e,t)}function HDe(e,t){var n=new cMe.Facade(e,t);return"track"===e.type&&(n=new cMe.Track(e,t)),"identify"===e.type&&(n=new cMe.Identify(e,t)),"page"===e.type&&(n=new cMe.Page(e,t)),"alias"===e.type&&(n=new cMe.Alias(e,t)),"group"===e.type&&(n=new cMe.Group(e,t)),"screen"===e.type&&(n=new cMe.Screen(e,t)),Object.defineProperty(n,"obj",{value:e,writable:!0}),n}function WDe(e,t,n){return AD(this,void 0,void 0,(function(){function r(t,n){return AD(this,void 0,void 0,(function(){var r,i,a;return xD(this,(function(o){switch(o.label){case 0:return r=!1,i=null,[4,n({payload:HDe(t,{clone:!0,traverse:!1}),integration:e,next:function(e){r=!0,null===e&&(i=null),e&&(i=e.obj)}})];case 1:return o.sent(),r||null===i||(i.integrations=gD(gD({},t.integrations),((a={})[e]=!1,a))),[2,i]}}))}))}var i,a,o,s,c;return xD(this,(function(e){switch(e.label){case 0:i=HDe(t,{clone:!0,traverse:!1}).rawEvent(),a=0,o=n,e.label=1;case 1:return a<o.length?(s=o[a],[4,r(i,s)]):[3,4];case 2:if(null===(c=e.sent()))return[2,null];i=c,e.label=3;case 3:return a++,[3,1];case 4:return[2,i]}}))}))}FDe.Delete=zDe,jDe.default(zDe,UDe.Facade),zDe.prototype.type=function(){return"delete"},function(e){var t=ut&&ut.__assign||function(){return t=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},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=e.Screen=e.Page=e.Track=e.Identify=e.Group=e.Alias=e.Facade=void 0;var n=uMe;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=WMe;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=XMe;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var a=iDe;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return a.Identify}});var o=hDe;Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return o.Track}});var s=ADe;Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return s.Page}});var c=kDe;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return c.Screen}});var u=FDe;Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return u.Delete}}),e.default=t(t({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:a.Identify,Track:o.Track,Page:s.Page,Screen:c.Screen,Delete:u.Delete})}(cMe);var VDe=Object.freeze({__proto__:null,applyDestinationMiddleware:WDe,sourceMiddlewarePlugin:function(e,t){function n(n){return AD(this,void 0,void 0,(function(){var r;return xD(this,(function(i){switch(i.label){case 0:return r=!1,[4,e({payload:HDe(n.event,{clone:!0,traverse:!1}),integrations:null!=t?t:{},next:function(e){r=!0,e&&(n.event=e.obj)}})];case 1:if(i.sent(),!r)throw new URe({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(e.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(e){return Promise.resolve(e)},track:n,page:n,identify:n,alias:n,group:n}}}),GDe=function(){function e(e,t){this.version="1.0.0",this.alternativeNames=[],this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=t,this.name=e,this.type=t.type,this.alternativeNames.push(t.name)}return e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"destination"===this.type&&(e=this.middleware).push.apply(e,t)},e.prototype.transform=function(e){return AD(this,void 0,void 0,(function(){var t;return xD(this,(function(n){switch(n.label){case 0:return[4,WDe(this.name,e.event,this.middleware)];case 1:return null===(t=n.sent())&&e.cancel(new URe({retry:!1,reason:"dropped by destination middleware"})),[2,new INe(t)]}}))}))},e.prototype._createMethod=function(e){var t=this;return function(n){return AD(t,void 0,void 0,(function(){var t;return xD(this,(function(r){switch(r.label){case 0:return this.action[e]?(t=n,"destination"!==this.type?[3,2]:[4,this.transform(n)]):[2,n];case 1:t=r.sent(),r.label=2;case 2:return[4,this.action[e](t)];case 3:return r.sent(),[2,n]}}))}))}},e.prototype.isLoaded=function(){return this.action.isLoaded()},e.prototype.ready=function(){return this.action.ready?this.action.ready():Promise.resolve()},e.prototype.load=function(e,t){return this.action.load(e,t)},e.prototype.unload=function(e,t){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,e,t)},e}();function qDe(e,t,n,r,i){var a,o,s;return AD(this,void 0,void 0,(function(){var c,u,l,d,f=this;return xD(this,(function(p){switch(p.label){case 0:return c=[],u=ZNe(),l=null!==(o=null===(a=e.middlewareSettings)||void 0===a?void 0:a.routingRules)&&void 0!==o?o:[],d=(null!==(s=e.remotePlugins)&&void 0!==s?s:[]).map((function(e){return AD(f,void 0,void 0,(function(){var a,o,s,d,f,p,h,m,y;return xD(this,(function(b){switch(b.label){case 0:if(function(e,t){var n=e[t.creationName],r=e[t.name];return!1===e.All&&!n&&!r||!1===n||!1===r}(t,e))return[2];b.label=1;case 1:if(b.trys.push([1,12,,13]),a=new RegExp("https://cdn.segment.(com|build)"),!r)return[3,7];o=e.url.split("/"),s=o[o.length-2],d=e.url.replace(s,btoa(s).replace(/=/g,"")),b.label=2;case 2:return b.trys.push([2,4,,6]),[4,oMe(d.replace(a,u))];case 3:return b.sent(),[3,6];case 4:return b.sent(),[4,oMe(e.url.replace(a,u))];case 5:return b.sent(),[3,6];case 6:return[3,9];case 7:return[4,oMe(e.url.replace(a,u))];case 8:b.sent(),b.label=9;case 9:return f=e.libraryName,"function"!=typeof window[f]?[3,11]:[4,(0,window[f])(gD(gD({},e.settings),n[e.name]))];case 10:p=b.sent(),function(e){if(!Array.isArray(e))throw new Error("Not a valid list of plugins");var t=["load","isLoaded","name","version","type"];e.forEach((function(e){t.forEach((function(t){var n;if(void 0===e[t])throw new Error("Plugin: ".concat(null!==(n=e.name)&&void 0!==n?n:"unknown"," missing required function ").concat(t))}))}))}(h=Array.isArray(p)?p:[p]),m=l.filter((function(t){return t.destinationName===e.creationName})),h.forEach((function(t){var n=new GDe(e.creationName,t);m.length&&i&&"destination"===t.type&&n.addMiddleware(i),c.push(n)})),b.label=11;case 11:return[3,13];case 12:return y=b.sent(),console.warn("Failed to load Remote Plugin",y),[3,13];case 13:return[2]}}))}))})),[4,Promise.all(d)];case 1:return p.sent(),[2,c.filter(Boolean)]}}))}))}var KDe=function(e){var t=!1;window.addEventListener("pagehide",(function(){t||e(t=!0)})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(t)return;t=!0}else t=!1;e(t)}))},XDe=500;function YDe(e){return(encodeURI(JSON.stringify(e)).split(/%..|./).length-1)/1024}function JDe(e,t){var n,r,i,a=[],o=!1,s=null!==(n=null==t?void 0:t.size)&&void 0!==n?n:10,c=null!==(r=null==t?void 0:t.timeout)&&void 0!==r?r:5e3;function u(t){var n;if(0!==t.length){var r=null===(n=t[0])||void 0===n?void 0:n.writeKey,i=t.map((function(e){var t=e;return t.sentAt,vD(t,["sentAt"])}));return rNe("https://".concat(e,"/b"),{keepalive:o,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({writeKey:r,batch:i,sentAt:(new Date).toISOString()})})}}function l(){return AD(this,void 0,void 0,(function(){var e;return xD(this,(function(t){return a.length?(e=a,a=[],[2,u(e)]):[2]}))}))}return KDe((function(e){if((o=e)&&a.length){var t=function(e){var t=[],n=0;return e.forEach((function(e){YDe(t[n])>=64&&n++,t[n]?t[n].push(e):t[n]=[e]})),t}(a).map(u);Promise.all(t).catch(console.error)}})),{dispatch:function(e,t){return AD(this,void 0,void 0,(function(){var e;return xD(this,(function(n){return a.push(t),e=a.length>=s||function(e){return YDe(e)>=XDe-50}(a),[2,e||o?l():void(i||(i=setTimeout((function(){i=void 0,l().catch(console.error)}),c)))]}))}))}}}var ZDe=function(e,t){return AD(void 0,void 0,void 0,(function(){var n;return xD(this,(function(r){return n=function(r){return AD(void 0,void 0,void 0,(function(){var i;return xD(this,(function(a){switch(a.label){case 0:return e(r)?(i=n,[4,t()]):[3,2];case 1:return[2,i.apply(void 0,[a.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))};function QDe(e,t){return AD(this,void 0,void 0,(function(){var n,r=this;return xD(this,(function(i){switch(i.label){case 0:return n=[],$Re()?[2,t]:[4,ZDe((function(){return t.length>0&&!$Re()}),(function(){return AD(r,void 0,void 0,(function(){var r,i;return xD(this,(function(a){switch(a.label){case 0:return(r=t.pop())?[4,HRe(r,e)]:[2];case 1:return i=a.sent(),i instanceof INe||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}function $De(e,t,n,r){var i=this;e||setTimeout((function(){return AD(i,void 0,void 0,(function(){var e,i;return xD(this,(function(a){switch(a.label){case 0:return e=!0,[4,QDe(n,t)];case 1:return i=a.sent(),e=!1,t.todo>0&&r(e,i,n,r),[2]}}))}))}),5e3*Math.random())}function eLe(e){return AD(this,void 0,void 0,(function(){var t;return xD(this,(function(n){return(t=navigator.userAgentData)?e?[2,t.getHighEntropyValues(e).catch((function(){return t.toJSON()}))]:[2,t.toJSON()]:[2,void 0]}))}))}function tLe(e,t,n){var r,i,a;return AD(this,void 0,void 0,(function(){function o(r){return AD(this,void 0,void 0,(function(){var i,a;return xD(this,(function(o){return $Re()?(c.push(r),$De(l,c,b,$De),[2,r]):(u.add(r),i=r.event.type.charAt(0),y&&r.event.context&&(r.event.context.userAgentData=y),a=HDe(r.event).json(),"track"===r.event.type&&delete a.traits,"alias"===r.event.type&&(a=function(e,t){var n,r,i,a,o=e.user();return t.previousId=null!==(i=null!==(r=null!==(n=t.previousId)&&void 0!==n?n:t.from)&&void 0!==r?r:o.id())&&void 0!==i?i:o.anonymousId(),t.userId=null!==(a=t.userId)&&void 0!==a?a:t.to,delete t.from,delete t.to,t}(e,a)),[2,m.dispatch("".concat(p,"/").concat(i),TNe(e,a,t,n)).then((function(){return r})).catch((function(){return c.pushWithBackoff(r),$De(l,c,b,$De),r})).finally((function(){u.delete(r)}))])}))}))}var s,c,u,l,d,f,p,h,m,y,b;return xD(this,(function(n){switch(n.label){case 0:window.addEventListener("pagehide",(function(){c.push.apply(c,Array.from(u)),u.clear()})),s=null!==(r=null==t?void 0:t.apiKey)&&void 0!==r?r:"",c=e.options.disableClientPersistence?new NRe(e.queue.queue.maxAttempts,[]):new LNe(e.queue.queue.maxAttempts,"".concat(s,":dest-Segment.io")),u=new Set,l=!1,d=null!==(i=null==t?void 0:t.apiHost)&&void 0!==i?i:ENe,f=null!==(a=null==t?void 0:t.protocol)&&void 0!==a?a:"https",p="".concat(f,"://").concat(d),h=null==t?void 0:t.deliveryStrategy,m="batching"===(null==h?void 0:h.strategy)?JDe(d,h.config):(g=null==h?void 0:h.config,{dispatch:function(e,t){return rNe(e,{keepalive:null==g?void 0:g.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(t)})}}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,eLe(e.options.highEntropyValuesClientHints)];case 2:return y=n.sent(),[3,4];case 3:return n.sent(),y=void 0,[3,4];case 4:return b={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:o,identify:o,page:o,alias:o,group:o,screen:o},c.todo&&$De(l,c,b,$De),[2,b]}var g}))}))}function nLe(e){var t,n=e.event;!function(e){if(!xRe(e))throw new wRe("Event",SRe);if("object"!=typeof e)throw new wRe("Event",IRe)}(n),function(e){if(!TRe(e.type))throw new wRe(".type",CRe)}(n),"track"===n.type&&function(e){if(!TRe(e.event))throw new wRe(".event",CRe)}(n);var r=null!==(t=n.properties)&&void 0!==t?t:n.traits;if("alias"!==n.type&&!ORe(r))throw new wRe(".properties","is not an object");return function(e){var t=".userId/anonymousId/previousId/groupId",n=function(e){var t,n,r;return null!==(r=null!==(n=null!==(t=e.userId)&&void 0!==t?t:e.anonymousId)&&void 0!==n?n:e.groupId)&&void 0!==r?r:e.previousId}(e);if(!xRe(n))throw new wRe(t,SRe);if(!TRe(n))throw new wRe(t,CRe)}(n),e}var rLe={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:nLe,identify:nLe,page:nLe,alias:nLe,group:nLe,screen:nLe},iLe=function(e,t,n){n.getCalls(e).forEach((function(e){lLe(t,e).catch(console.error)}))},aLe=function(e,t){return AD(void 0,void 0,void 0,(function(){var n,r,i;return xD(this,(function(a){switch(a.label){case 0:n=0,r=t.getCalls("addSourceMiddleware"),a.label=1;case 1:return n<r.length?(i=r[n],[4,lLe(e,i).catch(console.error)]):[3,4];case 2:a.sent(),a.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},oLe=iLe.bind(window,"on"),sLe=iLe.bind(window,"setAnonymousId"),cLe=function(e,t){t.toArray().forEach((function(t){setTimeout((function(){lLe(e,t).catch(console.error)}),0)}))},uLe=function(){function e(){this._value={}}return e.prototype.toArray=function(){var e;return(e=[]).concat.apply(e,Object.values(this._value))},e.prototype.getCalls=function(e){var t;return null!==(t=this._value[e])&&void 0!==t?t:[]},e.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach((function(t){e._value[t.method]?e._value[t.method].push(t):e._value[t.method]=[t]})),this},e.prototype.clear=function(){return this._value={},this},e}();function lLe(e,t){return AD(this,void 0,void 0,(function(){var n,r;return xD(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.called?[2,void 0]:(t.called=!0,n=e[t.method].apply(e,t.args),"object"==typeof(a=n)&&null!==a&&"then"in a&&"function"==typeof a.then?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return t.resolve(n),[3,4];case 3:return r=i.sent(),t.reject(r),[3,4];case 4:return[2]}var a}))}))}var dLe=function(){function e(e){var t=this;this._preInitBuffer=new uLe,this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=iNe,this._promise=e(this._preInitBuffer),this._promise.then((function(e){var n=e[0],r=e[1];t.instance=n,t.ctx=r})).catch((function(){}))}return e.prototype.then=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).then.apply(e,t)},e.prototype.catch=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).catch.apply(e,t)},e.prototype.finally=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).finally.apply(e,t)},e.prototype._createMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t.instance){var a=(n=t.instance)[e].apply(n,r);return Promise.resolve(a)}return new Promise((function(n,i){t._preInitBuffer.push({method:e,args:r,resolve:n,reject:i,called:!1})}))}},e.prototype._createChainableMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.instance?((n=t.instance)[e].apply(n,r),t):(t._preInitBuffer.push({method:e,args:r,resolve:function(){},reject:console.error,called:!1}),t)}},e}();function fLe(e){var t=e[0],n=e.slice(1);return{method:t,resolve:function(){},reject:console.error,args:n,called:!1}}var pLe,hLe,mLe=function(){var e=window.analytics;if(!Array.isArray(e))return[];var t=e.splice(0,e.length);return t.map(fLe)},yLe=null!==(pLe=(hLe=nNe()).__SEGMENT_INSPECTOR__)&&void 0!==pLe?pLe:hLe.__SEGMENT_INSPECTOR__={};function bLe(e,t){return AD(this,void 0,void 0,(function(){return xD(this,(function(n){switch(n.label){case 0:return t.push.apply(t,mLe()),[4,aLe(e,t)];case 1:return n.sent(),t.push.apply(t,mLe()),cLe(e,t),t.clear(),[2]}}))}))}function gLe(e,t,n,r,i,a,o){var s,c,u;return AD(this,void 0,void 0,(function(){var l,d,f,p,h,m,y,b,g,v,w,T,E=this;return xD(this,(function(A){switch(A.label){case 0:return function(e){var t,n,r;return"test"!==XNe().NODE_ENV&&(null!==(r=null===(n=null===(t=e.middlewareSettings)||void 0===t?void 0:t.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(t)?[4,Promise.resolve().then((function(){return s8e})).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return d=A.sent(),[3,3];case 2:d=void 0,A.label=3;case 3:return l=d,x=t,"test"!==XNe().NODE_ENV&&Object.keys(x.integrations).length>1||o.length>0?[4,Promise.resolve().then((function(){return h8e})).then((function(i){return i.ajsDestinations(e,t,n.integrations,r,l,o)}))]:[3,5];case 4:return p=A.sent(),[3,6];case 5:p=[],A.label=6;case 6:return f=p,t.legacyVideoPluginsEnabled?[4,Promise.resolve().then((function(){return m8e})).then((function(e){return e.loadLegacyVideoPlugins(n)}))]:[3,8];case 7:A.sent(),A.label=8;case 8:return(null===(s=r.plan)||void 0===s?void 0:s.track)?[4,Promise.resolve().then((function(){return y8e})).then((function(e){var n;return e.schemaFilter(null===(n=r.plan)||void 0===n?void 0:n.track,t)}))]:[3,10];case 9:return m=A.sent(),[3,11];case 10:m=void 0,A.label=11;case 11:return h=m,y=$Ne(t,i),[4,qDe(t,n.integrations,y,i.obfuscate,l).catch((function(){return[]}))];case 12:return b=A.sent(),g=kD(kD(kD([rLe,iMe],a,!0),f,!0),b,!0),h&&g.push(h),!1===(null===(c=r.integrations)||void 0===c?void 0:c.All)&&!r.integrations["Segment.io"]||r.integrations&&!1===r.integrations["Segment.io"]?[3,14]:(w=(v=g).push,[4,tLe(n,y["Segment.io"],t.integrations)]);case 13:w.apply(v,[A.sent()]),A.label=14;case 14:return[4,n.register.apply(n,g)];case 15:return T=A.sent(),Object.entries(null!==(u=t.enabledMiddleware)&&void 0!==u?u:{}).some((function(e){return e[1]}))?[4,Promise.resolve().then((function(){return b8e})).then((function(e){var r=e.remoteMiddlewares;return AD(E,void 0,void 0,(function(){var e,a;return xD(this,(function(o){switch(o.label){case 0:return[4,r(T,t,i.obfuscate)];case 1:return e=o.sent(),a=e.map((function(e){return n.addSourceMiddleware(e)})),[2,Promise.all(a)]}}))}))}))]:[3,17];case 16:A.sent(),A.label=17;case 17:return[2,T]}var x}))}))}function vLe(e,t,n){var r,i,a,o,s,c,u;return void 0===t&&(t={}),AD(this,void 0,void 0,(function(){var l,d,f,p,h,m,y,b,g,v,w;return xD(this,(function(T){switch(T.label){case 0:return e.cdnURL&&(O=e.cdnURL,window.analytics&&(window.analytics._cdn=O),YNe=O),null===(r=e.cdnSettings)||void 0===r?[3,1]:(d=r,[3,3]);case 1:return[4,(E=e.writeKey,A=e.cdnURL,x=null!=A?A:ZNe(),rNe("".concat(x,"/v1/projects/").concat(E,"/settings")).then((function(e){return e.ok?e.json():e.text().then((function(e){throw new Error(e)}))})).catch((function(e){throw console.error(e.message),e})))];case 2:d=T.sent(),T.label=3;case 3:return l=d,t.updateCDNSettings&&(l=t.updateCDNSettings(l)),f=null===(a=null===(i=l.integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===a||a,p=gD({retryQueue:f},t),function(e){var t;null===(t=yLe.attach)||void 0===t||t.call(yLe,e)}(h=new KNe(e,p)),m=null!==(o=e.plugins)&&void 0!==o?o:[],y=null!==(s=e.classicIntegrations)&&void 0!==s?s:[],CNe.initRemoteMetrics(l.metrics),function(e,t){t.push.apply(t,mLe()),sLe(e,t),oLe(e,t)}(h,n),[4,gLe(e.writeKey,l,h,p,t,m,y)];case 4:return b=T.sent(),g=null!==(c=window.location.search)&&void 0!==c?c:"",v=null!==(u=window.location.hash)&&void 0!==u?u:"",(w=g.length?g:v.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,h.queryString(w).catch(console.error)]:[3,6];case 5:T.sent(),T.label=6;case 6:return h.initialized=!0,h.emit("initialize",e,t),t.initialPageview&&h.page().catch(console.error),[4,bLe(h,n)];case 7:return T.sent(),[2,[h,b]]}var E,A,x,O}))}))}var wLe=function(e){function t(){var t,n,r,i=this,a=(r=new Promise((function(e,r){t=e,n=r})),{resolve:t,reject:n,promise:r}),o=a.promise,s=a.resolve;return i=e.call(this,(function(e){return o.then((function(t){return vLe(t[0],t[1],e)}))}))||this,i._resolveLoadStart=function(e,t){return s([e,t])},i}return bD(t,e),t.prototype.load=function(e,t){return void 0===t&&(t={}),this._resolveLoadStart(e,t),this},t.load=function(e,n){return void 0===n&&(n={}),(new t).load(e,n)},t.standalone=function(e,n){return t.load({writeKey:e},n).then((function(e){return e[0]}))},t}(dLe),TLe=Object.create,ELe=Object.defineProperty,ALe=Object.getOwnPropertyDescriptor,xLe=Object.getOwnPropertyNames,OLe=Object.getOwnPropertySymbols,CLe=Object.getPrototypeOf,ILe=Object.prototype.hasOwnProperty,SLe=Object.prototype.propertyIsEnumerable,_Le=(e,t,n)=>t in e?ELe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,PLe=(e,t)=>{for(var n in t||(t={}))ILe.call(t,n)&&_Le(e,n,t[n]);if(OLe)for(var n of OLe(t))SLe.call(t,n)&&_Le(e,n,t[n]);return e},kLe=(e,t)=>function(){return t||(0,e[xLe(e)[0]])((t={exports:{}}).exports,t),t.exports},RLe=(e,t,n)=>(n=null!=e?TLe(CLe(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of xLe(t))ILe.call(e,n)||undefined===n||ELe(e,n,{get:()=>t[n],enumerable:!(r=ALe(t,n))||r.enumerable});return e})(!t&&e&&e.__esModule?n:ELe(n,"default",{value:e,enumerable:!0}),e)),NLe=kLe({"../../node_modules/react-is/cjs/react-is.production.min.js"(e){var t="function"==typeof Symbol&&Symbol.for,n=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,c=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,b=t?Symbol.for("react.fundamental"):60117,g=t?Symbol.for("react.responder"):60118,v=t?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case u:case l:case i:case o:case a:case f:return e;default:switch(e=e&&e.$$typeof){case c:case d:case m:case h:case s:return e;default:return t}}case r:return t}}}function T(e){return w(e)===l}e.AsyncMode=u,e.ConcurrentMode=l,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=m,e.Memo=h,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return T(e)||w(e)===u},e.isConcurrentMode=T,e.isContextConsumer=function(e){return w(e)===c},e.isContextProvider=function(e){return w(e)===s},e.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},e.isForwardRef=function(e){return w(e)===d},e.isFragment=function(e){return w(e)===i},e.isLazy=function(e){return w(e)===m},e.isMemo=function(e){return w(e)===h},e.isPortal=function(e){return w(e)===r},e.isProfiler=function(e){return w(e)===o},e.isStrictMode=function(e){return w(e)===a},e.isSuspense=function(e){return w(e)===f},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===l||e===o||e===a||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===b||e.$$typeof===g||e.$$typeof===v||e.$$typeof===y)},e.typeOf=w}}),MLe=kLe({"../../node_modules/react-is/index.js"(e,t){t.exports=NLe()}}),DLe=kLe({"../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"(e,t){var n=MLe(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function s(e){return n.isMemo(e)?a:o[e.$$typeof]||r}o[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[n.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;t.exports=function e(t,n,r){if("string"!=typeof n){if(p){var a=f(n);a&&a!==p&&e(t,a,r)}var o=u(n);l&&(o=o.concat(l(n)));for(var h=s(t),m=s(n),y=0;y<o.length;++y){var b=o[y];if(!(i[b]||r&&r[b]||m&&m[b]||h&&h[b])){var g=d(n,b);try{c(t,b,g)}catch(e){}}}}return t}}}),LLe=kLe({"../../node_modules/@babel/runtime/helpers/extends.js"(e,t){function n(){return t.exports=n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.exports.__esModule=!0,t.exports.default=t.exports,n.apply(this,arguments)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}});function FLe(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}var BLe=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(t){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),jLe="-ms-",ULe="-moz-",zLe="-webkit-",HLe="comm",WLe="rule",VLe="decl",GLe="@keyframes",qLe=Math.abs,KLe=String.fromCharCode,XLe=Object.assign;function YLe(e){return e.trim()}function JLe(e,t,n){return e.replace(t,n)}function ZLe(e,t){return e.indexOf(t)}function QLe(e,t){return 0|e.charCodeAt(t)}function $Le(e,t,n){return e.slice(t,n)}function eFe(e){return e.length}function tFe(e){return e.length}function nFe(e,t){return t.push(e),e}var rFe=1,iFe=1,aFe=0,oFe=0,sFe=0,cFe="";function uFe(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:rFe,column:iFe,length:o,return:""}}function lFe(e,t){return XLe(uFe("",null,null,"",null,null,0),e,{length:-e.length},t)}function dFe(){return sFe=oFe<aFe?QLe(cFe,oFe++):0,iFe++,10===sFe&&(iFe=1,rFe++),sFe}function fFe(){return QLe(cFe,oFe)}function pFe(){return oFe}function hFe(e,t){return $Le(cFe,e,t)}function mFe(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function yFe(e){return rFe=iFe=1,aFe=eFe(cFe=e),oFe=0,[]}function bFe(e){return cFe="",e}function gFe(e){return YLe(hFe(oFe-1,TFe(91===e?e+2:40===e?e+1:e)))}function vFe(e){for(;(sFe=fFe())&&sFe<33;)dFe();return mFe(e)>2||mFe(sFe)>3?"":" "}function wFe(e,t){for(;--t&&dFe()&&!(sFe<48||sFe>102||sFe>57&&sFe<65||sFe>70&&sFe<97););return hFe(e,pFe()+(t<6&&32==fFe()&&32==dFe()))}function TFe(e){for(;dFe();)switch(sFe){case e:return oFe;case 34:case 39:34!==e&&39!==e&&TFe(sFe);break;case 40:41===e&&TFe(e);break;case 92:dFe()}return oFe}function EFe(e,t){for(;dFe()&&e+sFe!==57&&(e+sFe!==84||47!==fFe()););return"/*"+hFe(t,oFe-1)+"*"+KLe(47===e?e:dFe())}function AFe(e){for(;!mFe(fFe());)dFe();return hFe(e,oFe)}function xFe(e){return bFe(OFe("",null,null,null,[""],e=yFe(e),0,[0],e))}function OFe(e,t,n,r,i,a,o,s,c){for(var u=0,l=0,d=o,f=0,p=0,h=0,m=1,y=1,b=1,g=0,v="",w=i,T=a,E=r,A=v;y;)switch(h=g,g=dFe()){case 40:if(108!=h&&58==QLe(A,d-1)){-1!=ZLe(A+=JLe(gFe(g),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:A+=gFe(g);break;case 9:case 10:case 13:case 32:A+=vFe(h);break;case 92:A+=wFe(pFe()-1,7);continue;case 47:switch(fFe()){case 42:case 47:nFe(IFe(EFe(dFe(),pFe()),t,n),c);break;default:A+="/"}break;case 123*m:s[u++]=eFe(A)*b;case 125*m:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+l:-1==b&&(A=JLe(A,/\f/g,"")),p>0&&eFe(A)-d&&nFe(p>32?SFe(A+";",r,n,d-1):SFe(JLe(A," ","")+";",r,n,d-2),c);break;case 59:A+=";";default:if(nFe(E=CFe(A,t,n,u,l,i,s,v,w=[],T=[],d),a),123===g)if(0===l)OFe(A,t,E,E,w,a,d,s,T);else switch(99===f&&110===QLe(A,3)?100:f){case 100:case 108:case 109:case 115:OFe(e,E,E,r&&nFe(CFe(e,E,E,0,0,i,s,v,i,w=[],d),T),i,T,d,s,r?w:T);break;default:OFe(A,E,E,E,[""],T,0,s,T)}}u=l=p=0,m=b=1,v=A="",d=o;break;case 58:d=1+eFe(A),p=h;default:if(m<1)if(123==g)--m;else if(125==g&&0==m++&&125==(sFe=oFe>0?QLe(cFe,--oFe):0,iFe--,10===sFe&&(iFe=1,rFe--),sFe))continue;switch(A+=KLe(g),g*m){case 38:b=l>0?1:(A+="\f",-1);break;case 44:s[u++]=(eFe(A)-1)*b,b=1;break;case 64:45===fFe()&&(A+=gFe(dFe())),f=fFe(),l=d=eFe(v=A+=AFe(pFe())),g++;break;case 45:45===h&&2==eFe(A)&&(m=0)}}return a}function CFe(e,t,n,r,i,a,o,s,c,u,l){for(var d=i-1,f=0===i?a:[""],p=tFe(f),h=0,m=0,y=0;h<r;++h)for(var b=0,g=$Le(e,d+1,d=qLe(m=o[h])),v=e;b<p;++b)(v=YLe(m>0?f[b]+" "+g:JLe(g,/&\f/g,f[b])))&&(c[y++]=v);return uFe(e,t,n,0===i?WLe:s,c,u,l)}function IFe(e,t,n){return uFe(e,t,n,HLe,KLe(sFe),$Le(e,2,-2),0)}function SFe(e,t,n,r){return uFe(e,t,n,VLe,$Le(e,0,r),$Le(e,r+1,-1),r)}function _Fe(e,t){for(var n="",r=tFe(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function PFe(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case VLe:return e.return=e.return||e.value;case HLe:return"";case GLe:return e.return=e.value+"{"+_Fe(e.children,r)+"}";case WLe:e.value=e.props.join(",")}return eFe(n=_Fe(e.children,r))?e.return=e.value+"{"+n+"}":""}function kFe(e){var t=tFe(e);return function(n,r,i,a){for(var o="",s=0;s<t;s++)o+=e[s](n,r,i,a)||"";return o}}function RFe(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var NFe=function(e,t,n){for(var r=0,i=0;r=i,i=fFe(),38===r&&12===i&&(t[n]=1),!mFe(i);)dFe();return hFe(e,oFe)},MFe=new WeakMap,DFe=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||MFe.get(n))&&!r){MFe.set(e,!0);for(var i=[],a=function(e,t){return bFe(function(e,t){var n=-1,r=44;do{switch(mFe(r)){case 0:38===r&&12===fFe()&&(t[n]=1),e[n]+=NFe(oFe-1,t,n);break;case 2:e[n]+=gFe(r);break;case 4:if(44===r){e[++n]=58===fFe()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=KLe(r)}}while(r=dFe());return e}(yFe(e),t))}(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var u=0;u<o.length;u++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[u]):o[u]+" "+a[s]}}},LFe=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function FFe(e,t){switch(function(e,t){return 45^QLe(e,0)?(((t<<2^QLe(e,0))<<2^QLe(e,1))<<2^QLe(e,2))<<2^QLe(e,3):0}(e,t)){case 5103:return zLe+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return zLe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return zLe+e+ULe+e+jLe+e+e;case 6828:case 4268:return zLe+e+jLe+e+e;case 6165:return zLe+e+jLe+"flex-"+e+e;case 5187:return zLe+e+JLe(e,/(\w+).+(:[^]+)/,zLe+"box-$1$2"+jLe+"flex-$1$2")+e;case 5443:return zLe+e+jLe+"flex-item-"+JLe(e,/flex-|-self/,"")+e;case 4675:return zLe+e+jLe+"flex-line-pack"+JLe(e,/align-content|flex-|-self/,"")+e;case 5548:return zLe+e+jLe+JLe(e,"shrink","negative")+e;case 5292:return zLe+e+jLe+JLe(e,"basis","preferred-size")+e;case 6060:return zLe+"box-"+JLe(e,"-grow","")+zLe+e+jLe+JLe(e,"grow","positive")+e;case 4554:return zLe+JLe(e,/([^-])(transform)/g,"$1"+zLe+"$2")+e;case 6187:return JLe(JLe(JLe(e,/(zoom-|grab)/,zLe+"$1"),/(image-set)/,zLe+"$1"),e,"")+e;case 5495:case 3959:return JLe(e,/(image-set\([^]*)/,zLe+"$1$`$1");case 4968:return JLe(JLe(e,/(.+:)(flex-)?(.*)/,zLe+"box-pack:$3"+jLe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+zLe+e+e;case 4095:case 3583:case 4068:case 2532:return JLe(e,/(.+)-inline(.+)/,zLe+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(eFe(e)-1-t>6)switch(QLe(e,t+1)){case 109:if(45!==QLe(e,t+4))break;case 102:return JLe(e,/(.+:)(.+)-([^]+)/,"$1"+zLe+"$2-$3$1"+ULe+(108==QLe(e,t+3)?"$3":"$2-$3"))+e;case 115:return~ZLe(e,"stretch")?FFe(JLe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==QLe(e,t+1))break;case 6444:switch(QLe(e,eFe(e)-3-(~ZLe(e,"!important")&&10))){case 107:return JLe(e,":",":"+zLe)+e;case 101:return JLe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+zLe+(45===QLe(e,14)?"inline-":"")+"box$3$1"+zLe+"$2$3$1"+jLe+"$2box$3")+e}break;case 5936:switch(QLe(e,t+11)){case 114:return zLe+e+jLe+JLe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return zLe+e+jLe+JLe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return zLe+e+jLe+JLe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return zLe+e+jLe+e+e}return e}var BFe,jFe,UFe="undefined"!=typeof document,zFe=UFe?void 0:(BFe=function(){return RFe((function(){var e={};return function(t){return e[t]}}))},jFe=new WeakMap,function(e){if(jFe.has(e))return jFe.get(e);var t=BFe();return jFe.set(e,t),t}),HFe=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case VLe:e.return=FFe(e.value,e.length);break;case GLe:return _Fe([lFe(e,{value:JLe(e.value,"@","@"+zLe)})],r);case WLe:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return _Fe([lFe(e,{props:[JLe(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return _Fe([lFe(e,{props:[JLe(t,/:(plac\w+)/,":"+zLe+"input-$1")]}),lFe(e,{props:[JLe(t,/:(plac\w+)/,":-moz-$1")]}),lFe(e,{props:[JLe(t,/:(plac\w+)/,jLe+"input-$1")]})],r)}return""}))}}],WFe=function(e){var t=e.key;if(UFe&&"css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i,a=e.stylisPlugins||HFe,o={},s=[];UFe&&(r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)o[t[n]]=!0;s.push(e)})));var c,u=[DFe,LFe];if(UFe){var l,d=[PFe,(c=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],f=kFe(u.concat(a,d));i=function(e,t,n,r){l=n,_Fe(xFe(e?e+"{"+t.styles+"}":t.styles),f),r&&(y.inserted[t.name]=!0)}}else{var p=[PFe],h=kFe(u.concat(a,p)),m=zFe(a)(t);i=function(e,t,n,r){var i=t.name,a=function(e,t){var n=t.name;return void 0===m[n]&&(m[n]=_Fe(xFe(e?e+"{"+t.styles+"}":t.styles),h)),m[n]}(e,t);return void 0===y.compat?(r&&(y.inserted[i]=!0),a):r?void(y.inserted[i]=a):a}}var y={key:t,sheet:new BLe({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:i};return y.sheet.hydrate(s),y},VFe="undefined"!=typeof document,GFe=function(e,t,n){var r=e.key+"-"+t.name;(!1===n||!1===VFe&&void 0!==e.compat)&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},qFe={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},KFe=/[A-Z]|^ms/g,XFe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,YFe=function(e){return 45===e.charCodeAt(1)},JFe=function(e){return null!=e&&"boolean"!=typeof e},ZFe=RFe((function(e){return YFe(e)?e:e.replace(KFe,"-$&").toLowerCase()})),QFe=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(XFe,(function(e,t,n){return eBe={name:t,styles:n,next:eBe},t}))}return 1===qFe[e]||YFe(e)||"number"!=typeof t||0===t?t:t+"px"};function $Fe(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return eBe={name:n.name,styles:n.styles,next:eBe},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)eBe={name:r.name,styles:r.styles,next:eBe},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=$Fe(e,t,n[i])+";";else for(var a in n){var o=n[a];if("object"!=typeof o)null!=t&&void 0!==t[o]?r+=a+"{"+t[o]+"}":JFe(o)&&(r+=ZFe(a)+":"+QFe(a,o)+";");else if(!Array.isArray(o)||"string"!=typeof o[0]||null!=t&&void 0!==t[o[0]]){var s=$Fe(e,t,o);switch(a){case"animation":case"animationName":r+=ZFe(a)+":"+s+";";break;default:r+=a+"{"+s+"}"}}else for(var c=0;c<o.length;c++)JFe(o[c])&&(r+=ZFe(a)+":"+QFe(a,o[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=eBe,a=n(e);return eBe=i,$Fe(e,t,a)}}if(null==t)return n;var o=t[n];return void 0!==o?o:n}var eBe,tBe=/label:\s*([^\s;\n{]+)\s*(;|$)/g,nBe="undefined"!=typeof document,rBe=!!$Q.useInsertionEffect&&$Q.useInsertionEffect,iBe=nBe&&rBe||function(e){return e()},aBe="undefined"!=typeof document,oBe={}.hasOwnProperty,sBe=$Q.createContext("undefined"!=typeof HTMLElement?WFe({key:"css"}):null);sBe.Provider;var cBe=function(e){return $Q.forwardRef((function(t,n){var r=$Q.useContext(sBe);return e(t,r,n)}))};aBe||(cBe=function(e){return function(t){var n=$Q.useContext(sBe);return null===n?(n=WFe({key:"css"}),$Q.createElement(sBe.Provider,{value:n},e(t,n))):e(t,n)}});var uBe,lBe=$Q.createContext({}),dBe="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",fBe=function(e,t){var n={};for(var r in t)oBe.call(t,r)&&(n[r]=t[r]);return n[dBe]=e,n},pBe=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;GFe(t,n,r);var i=iBe((function(){return function(e,t,n){GFe(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i="",a=t;do{var o=e.insert(t===a?"."+r:"",a,e.sheet,!0);VFe||void 0===o||(i+=o),a=a.next}while(void 0!==a);if(!VFe&&0!==i.length)return i}}(t,n,r)}));if(!aBe&&void 0!==i){for(var a,o=n.name,s=n.next;void 0!==s;)o+=" "+s.name,s=s.next;return $Q.createElement("style",((a={})["data-emotion"]=t.key+" "+o,a.dangerouslySetInnerHTML={__html:i},a.nonce=t.sheet.nonce,a))}return null},hBe=cBe((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[dBe],a=[r],o="";"string"==typeof e.className?o=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(t.registered,a,e.className):null!=e.className&&(o=e.className+" ");var s=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";eBe=void 0;var a=e[0];null==a||void 0===a.raw?(r=!1,i+=$Fe(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=$Fe(n,t,e[o]),r&&(i+=a[o]);tBe.lastIndex=0;for(var s,c="";null!==(s=tBe.exec(i));)c+="-"+s[1];var u=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+c;return{name:u,styles:i,next:eBe}}(a,void 0,$Q.useContext(lBe));o+=t.key+"-"+s.name;var c={};for(var u in e)!oBe.call(e,u)||"css"===u||u===dBe||(c[u]=e[u]);return c.ref=n,c.className=o,$Q.createElement($Q.Fragment,null,$Q.createElement(pBe,{cache:t,serialized:s,isStringTag:"string"==typeof i}),$Q.createElement(i,c))})),mBe=hBe;RLe(LLe()),RLe(DLe()),function(e){e.CONNECT="Connect",e.WALLET="Wallet",e.ON_RAMP="OnRamp",e.SWAP="Swap",e.BRIDGE="Bridge",e.SALE="PrimarySale"}(uBe||(uBe={}));const{AnalyticsProvider:yBe,useAnalytics:bBe}=function({appName:e,writeKey:t}){const n=$Q.createContext(void 0);return{AnalyticsProvider:function({children:r,loaderOverride:i=wLe,log:a=console.log}){const[o,s]=$Q.useState(t),c=$Q.useMemo((()=>o?i.load({writeKey:o}):function(e,t){const n=e.load({writeKey:"",cdnSettings:{integrations:{}}},{integrations:{All:!1}});return["identify","group","alias","page","track"].forEach((e=>{n.on(e,((...n)=>t(PLe({method:e},n))))})),n}(i,a)),[i,o,a]),u=$Q.useCallback((({userJourney:t,screen:n,action:r,extras:i={}})=>{const a=[e+FLe(t)+FLe(n)+FLe(r)].join("");return c.page(a,i)}),[c]),l=$Q.useCallback((t=>{var n=t,{userJourney:r,screen:i,action:a,extras:o={}}=n,s=((e,t)=>{var n={};for(var r in e)ILe.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&OLe)for(var r of OLe(e))t.indexOf(r)<0&&SLe.call(e,r)&&(n[r]=e[r]);return n})(n,["userJourney","screen","action","extras"]);let u="";"control"in s&&"controlType"in s&&(u=FLe(s.control)+FLe(s.controlType));const l=[e+FLe(r)+FLe(i),u+FLe(a)].join("_");return c.track(l,PLe({},o))}),[c]),d=$Q.useCallback((()=>{return e=this,null,t=function*(){const e=("undefined"==typeof document?"":document.cookie).split("; ").find((e=>e.startsWith("ajs_user_id=")));if(e){const t=e.split("=")[1];return c.identify(t)}return Promise.reject(new Error("No user ID found in cookie"))},new Promise(((n,r)=>{var i=e=>{try{o(t.next(e))}catch(e){r(e)}},a=e=>{try{o(t.throw(e))}catch(e){r(e)}},o=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,a);o((t=t.apply(e,null)).next())}));var e,t}),[c]),f=$Q.useMemo((()=>({page:u,track:l,identifyFromCookie:d,identify:c.identify,group:c.group,alias:c.alias,updateWriteKey:s})),[c,u,l,d]);return function(e,t,n){return oBe.call(t,"css")?u$.jsx(mBe,fBe(e,t),n):u$.jsx(e,t,n)}(n.Provider,{value:f,children:r})},useAnalytics:function(){const e=$Q.useContext(n);if(!e)throw new Error("useAnalytics: Store not found");return e}}}({writeKey:"",appName:"checkout"});function gBe({children:e,checkout:t}){const{updateWriteKey:n}=bBe(),r=$Q.useCallback((async()=>{try{return await(t?.config?.remote.getConfig("telemetry"))}catch(e){console.error("unable to fetch telemetry config: ",e)}}),[t]);return $Q.useEffect((()=>{(async()=>{await r()&&n("7G7Iw5Ax2NnCerubm2C7aHCgwRToOprX")})()}),[r]),y1(m1,{children:e})}function vBe({children:e,checkout:t}){return y1(yBe,{children:y1(gBe,{checkout:t,children:e})})}function wBe({header:e,footer:t,children:n,heroContent:r,testId:i,floatHeader:a=!1,footerBackgroundColor:o,bodyStyleOverrides:s}){return y1(Rae,{sx:uRe,children:b1(Rae,{testId:i,sx:lRe,children:[e&&y1(Rae,{sx:dRe(a),children:e}),b1(Rae,{sx:pRe,children:[r&&y1(Rae,{sx:hRe,children:r}),n&&y1(Rae,{sx:{...mRe,...s},children:n})]}),t&&y1(Rae,{sx:fRe(o),children:t})]})})}function TBe({loadingText:e,textDuration:t}){const n=Array.isArray(e)?e:[e],r=t||2500;return y1(wBe,{children:y1(_ge,{visible:!0,children:y1(_ge.Content,{children:y1(_ge.Content.LoopingText,{text:[...n],textDuration:r})})})})}function EBe(e){switch(e){case MZ.ETHEREUM:return DZ.ETHEREUM;case MZ.IMTBL_ZKEVM_TESTNET:return DZ.IMTBL_ZKEVM_TESTNET;case MZ.IMTBL_ZKEVM_MAINNET:return DZ.IMTBL_ZKEVM_MAINNET;case MZ.IMTBL_ZKEVM_DEVNET:return DZ.IMTBL_ZKEVM_DEVNET;case MZ.SEPOLIA:return DZ.SEPOLIA;default:return""}}function ABe(e){switch(e){case MZ.ETHEREUM:return LZ.ETHEREUM;case MZ.IMTBL_ZKEVM_TESTNET:return LZ.IMTBL_ZKEVM_TESTNET;case MZ.IMTBL_ZKEVM_MAINNET:return LZ.IMTBL_ZKEVM_MAINNET;case MZ.IMTBL_ZKEVM_DEVNET:return LZ.IMTBL_ZKEVM_DEVNET;case MZ.SEPOLIA:return LZ.SEPOLIA;default:return""}}function xBe(e){switch(e){case LZ.ETHEREUM:return MZ.ETHEREUM;case LZ.IMTBL_ZKEVM_TESTNET:return MZ.IMTBL_ZKEVM_TESTNET;case LZ.IMTBL_ZKEVM_MAINNET:return MZ.IMTBL_ZKEVM_MAINNET;case LZ.IMTBL_ZKEVM_DEVNET:return MZ.IMTBL_ZKEVM_DEVNET;case LZ.SEPOLIA:return MZ.SEPOLIA;default:return 0}}const OBe={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 CBe{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||OBe,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 CBe(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new CBe(this.logger,e)}}var IBe=new CBe;let SBe=class{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]=this.observers[e]||[],this.observers[e].push(t)})),this}off(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((e=>e!==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];if(this.observers[e]){[].concat(this.observers[e]).forEach((e=>{e(...n)}))}if(this.observers["*"]){[].concat(this.observers["*"]).forEach((t=>{t.apply(t,[e,...n])}))}}};function _Be(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}function PBe(e){return null==e?"":""+e}function kBe(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}const a="string"!=typeof t?[].concat(t):t.split(".");for(;a.length>1;){if(i())return{};const t=r(a.shift());!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{}}return i()?{}:{obj:e,k:r(a.shift())}}function RBe(e,t,n){const{obj:r,k:i}=kBe(e,t,Object);r[i]=n}function NBe(e,t){const{obj:n,k:r}=kBe(e,t);if(n)return n[r]}function MBe(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]):MBe(e[r],t[r],n):e[r]=t[r]);return e}function DBe(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var LBe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function FBe(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>LBe[e])):e}const BBe=[" ",",","?","!",";"];function jBe(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;++e){if(!i)return;if("string"==typeof i[r[e]]&&e+1<r.length)return;if(void 0===i[r[e]]){let a=2,o=r.slice(e,e+a).join(n),s=i[o];for(;void 0===s&&r.length>e+a;)a++,o=r.slice(e,e+a).join(n),s=i[o];if(void 0===s)return;if(null===s)return null;if(t.endsWith(o)){if("string"==typeof s)return s;if(o&&"string"==typeof s[o])return s[o]}const c=r.slice(e+a).join(n);return c?jBe(s,c,n):void 0}i=i[r[e]]}return i}function UBe(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class zBe extends SBe{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,a=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let o=[e,t];n&&"string"!=typeof n&&(o=o.concat(n)),n&&"string"==typeof n&&(o=o.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(o=e.split("."));const s=NBe(this.data,o);return s||!a||"string"!=typeof n?s:jBe(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 a=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(o=e.split("."),r=t,t=o[1]),this.addNamespaces(t),RBe(this.data,o,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]&&"[object Array]"!==Object.prototype.toString.apply(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 a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=NBe(this.data,o)||{};r?MBe(s,n,i):s={...s,...n},RBe(this.data,o,s),a.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 HBe={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 WBe={};class VBe extends SBe{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),function(e,t,n){e.forEach((e=>{t[e]&&(n[e]=t[e])}))}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=IBe.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 a=n&&e.indexOf(n)>-1,o=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";const r=BBe.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const i=new RegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let a=!i.test(e);if(!a){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a}(e,n,r));if(a&&!o){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:i};const a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.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:a,namespaces:o}=this.extractFromKey(e[e.length-1],t),s=o[o.length-1],c=t.lng||this.language,u=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(u){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${a}`}return r?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:a}const l=this.resolve(e,t);let d=l&&l.res;const f=l&&l.usedKey||a,p=l&&l.exactUsedKey||a,h=Object.prototype.toString.apply(d),m=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject;if(y&&d&&("string"!=typeof d&&"boolean"!=typeof d&&"number"!=typeof d)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(h)<0&&("string"!=typeof m||"[object Array]"!==h)){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:o}):`key '${a} (${this.language})' returned an object instead of string.`;return r?(l.res=e,l.usedParams=this.getUsedParamsDetails(t),l):e}if(i){const e="[object Array]"===h,n=e?[]:{},r=e?p:f;for(const e in d)if(Object.prototype.hasOwnProperty.call(d,e)){const a=`${r}${i}${e}`;n[e]=this.translate(a,{...t,joinArrays:!1,ns:o}),n[e]===a&&(n[e]=d[e])}d=n}}else if(y&&"string"==typeof m&&"[object Array]"===h)d=d.join(m),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,o=!1;const u=void 0!==t.count&&"string"!=typeof t.count,f=VBe.hasDefaultValue(t),p=u?this.pluralResolver.getSuffix(c,t.count,t):"",h=t.ordinal&&u?this.pluralResolver.getSuffix(c,t.count,{ordinal:!1}):"",m=t[`defaultValue${p}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(r=!0,d=m),this.isValidLookup(d)||(o=!0,d=a);const y=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:d,b=f&&m!==d&&this.options.updateMissing;if(o||r||b){if(this.logger.log(b?"updateKey":"missingKey",c,s,a,b?m:d),i){const e=this.resolve(a,{...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:y;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&&u?e.forEach((e=>{this.pluralResolver.getSuffixes(e,t).forEach((n=>{r([e],a+n,t[`defaultValue${n}`]||m)}))})):r(e,a,m))}d=this.extendTranslation(d,e,t,l,n),o&&d===a&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${a}`),(o||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${a}`:a,r?d:void 0):this.options.parseMissingKeyHandler(d))}return r?(l.res=d,l.usedParams=this.getUsedParamsDetails(t),l):d}extendTranslation(e,t,n,r,i){var a=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 o="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(o){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),o){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),o=0;o<e;o++)r[o]=arguments[o];return i&&i[0]===r[0]&&!n.context?(a.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):a.translate(...r,t)}),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,s="string"==typeof o?[o]:o;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=HBe.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,a,o=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,o),c=s.key;n=c;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const l=void 0!==o.count&&"string"!=typeof o.count,d=l&&!o.ordinal&&0===o.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==o.context&&("string"==typeof o.context||"number"==typeof o.context)&&""!==o.context,p=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);u.forEach((e=>{this.isValidLookup(t)||(a=e,!WBe[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(WBe[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${a}" 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!!!")),p.forEach((n=>{if(this.isValidLookup(t))return;i=n;const a=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(a,c,n,e,o);else{let e;l&&(e=this.pluralResolver.getSuffix(n,o.count,o));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(l&&(a.push(c+e),o.ordinal&&0===e.indexOf(r)&&a.push(c+e.replace(r,this.options.pluralSeparator)),d&&a.push(c+t)),f){const n=`${c}${this.options.contextSeparator}${o.context}`;a.push(n),l&&(a.push(n+e),o.ordinal&&0===e.indexOf(r)&&a.push(n+e.replace(r,this.options.pluralSeparator)),d&&a.push(n+t))}}let s;for(;s=a.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,o))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:a}}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 GBe(e){return e.charAt(0).toUpperCase()+e.slice(1)}class qBe{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=IBe.create("languageUtils")}getScriptPartFromCode(e){if(!(e=UBe(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=UBe(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]=GBe(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]=GBe(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=GBe(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:0===e.indexOf(n)?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]),"[object Array]"===Object.prototype.toString.apply(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 KBe=[{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}],XBe={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 YBe=["v1","v2","v3"],JBe=["v4"],ZBe={zero:0,one:1,two:2,few:3,many:4,other:5};class QBe{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=IBe.create("pluralResolver"),this.options.compatibilityJSON&&!JBe.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 KBe.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:XBe[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(UBe(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)=>ZBe[e]-ZBe[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!YBe.includes(this.options.compatibilityJSON)}}function $Be(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=function(e,t,n){const r=NBe(e,n);return void 0!==r?r:NBe(t,n)}(e,t,n);return!a&&i&&"string"==typeof n&&(a=jBe(e,n,r),void 0===a&&(a=jBe(t,n,r))),a}class eje{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=IBe.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 t=e.interpolation;this.escape=void 0!==t.escape?t.escape:FBe,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?DBe(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?DBe(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?DBe(t.nestingPrefix):t.nestingPrefixEscaped||DBe("$t("),this.nestingSuffix=t.nestingSuffix?DBe(t.nestingSuffix):t.nestingSuffixEscaped||DBe(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const t=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(t,"g");const n=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(n,"g")}interpolate(e,t,n,r){let i,a,o;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}const u=e=>{if(e.indexOf(this.formatSeparator)<0){const i=$Be(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),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format($Be(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();const l=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=>c(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?c(this.escape(e)):c(e)}].forEach((t=>{for(o=0;i=t.regex.exec(e);){const n=i[1].trim();if(a=u(n),void 0===a)if("function"==typeof l){const t=l(e,i,r);a="string"==typeof t?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a="";else{if(d){a=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=""}else"string"==typeof a||this.useRawValueToEscape||(a=PBe(a));const s=t.safeValue(a);if(e=e.replace(i[0],s),d?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}})),e}nest(e,t){let n,r,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function o(e,t){const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let a=`{${r[1]}`;e=r[0],a=this.interpolate(a,i);const o=a.match(/'/g),s=a.match(/"/g);(o&&o.length%2==0&&!s||s.length%2!=0)&&(a=a.replace(/'/g,'"'));try{i=JSON.parse(a),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${a}`}return delete i.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){let s=[];i={...a},i=i.replace&&"string"!=typeof i.replace?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let c=!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,c=!0}if(r=t(o.call(this,n[1].trim(),i),i),r&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=PBe(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),c&&(r=s.reduce(((e,t)=>this.format(e,t,a.lng,{...a,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}function tje(e){const t={};return function(n,r,i){const a=r+JSON.stringify(i);let o=t[a];return o||(o=e(UBe(r),i),t[a]=o),o(n)}}class nje{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=IBe.create("formatter"),this.options=e,this.formats={number:tje(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:tje(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:tje(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:tje(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:tje(((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()]=tje(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:a}=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)return;const[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,"");n[t.trim()]||(n[t.trim()]=i),"false"===i&&(n[t.trim()]=!1),"true"===i&&(n[t.trim()]=!0),isNaN(i)||(n[t.trim()]=parseInt(i,10))}))}return{formatName:t,formatOptions:n}}(t);if(this.formats[i]){let t=e;try{const o=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e}),e);return i}}class rje extends SBe{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=IBe.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={},a={},o={},s={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(1===this.state[o]?void 0===a[o]&&(a[o]=!0):(this.state[o]=1,r=!1,void 0===a[o]&&(a[o]=!0),void 0===i[o]&&(i[o]=!0),void 0===s[t]&&(s[t]=!0)))})),r||(o[e]=!0)})),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),i=r[0],a=r[1];t&&this.emit("failedLoading",i,a,t),n&&this.store.addResourceBundle(i,a,n),this.state[e]=t?-1:2;const o={};this.queue.forEach((n=>{!function(e,t,n,r){const{obj:i,k:a}=kBe(e,t,Object);i[a]=i[a]||[],r&&(i[a]=i[a].concat(n)),r||i[a].push(n)}(n.loaded,[i],a),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=>{o[e]||(o[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===o[e][t]&&(o[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",o),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,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});this.readingCalls++;const o=(o,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)}o&&s&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*i,a)}),i):a(o,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,o);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>o(null,e))).catch(o):o(null,n)}catch(e){o(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,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)}))}saveMissing(e,t,n,r,i){let a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=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={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=5===c.length?c(e,t,n,r,s):c(e,t,n,r),i&&"function"==typeof i.then?i.then((e=>o(null,e))).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}function ije(){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,t,n,r)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function aje(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 oje(){}class sje extends SBe{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=aje(e),this.services={},this.logger=IBe,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;"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=ije();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options={...r,...this.options,...aje(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?IBe.init(i(this.modules.logger),this.options):IBe.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=nje);const n=new qBe(this.options);this.store=new zBe(this.options.resources,this.options);const a=this.services;a.logger=IBe,a.resourceStore=this.store,a.languageUtils=n,a.pluralResolver=new QBe(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||(a.formatter=i(t),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new eje(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new rje(i(this.modules.backend),a.resourceStore,a,this.options),a.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&&(a.languageDetector=i(this.modules.languageDetector),a.languageDetector.init&&a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=i(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new VBe(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=oje),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 a=_Be(),o=()=>{const e=(e,t)=>{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),a.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?o():setTimeout(o,0),a}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oje;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=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)r(n);else{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=_Be();return e||(e=this.languages),t||(t=this.options.ns),n||(n=oje),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&&HBe.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=_Be();this.emit("languageChanging",e);const i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(e,a)=>{a?(i(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit("languageChanged",a),this.logger.log("languageChanged",a)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},o=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=>{a(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(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const i=function(e,t){let a;if("object"!=typeof t){for(var o=arguments.length,s=new Array(o>2?o-2:0),c=2;c<o;c++)s[c-2]=arguments[c];a=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else a={...t};a.lng=a.lng||i.lng,a.lngs=a.lngs||i.lngs,a.ns=a.ns||i.ns,a.keyPrefix=a.keyPrefix||n||i.keyPrefix;const u=r.options.keySeparator||".";let l;return l=a.keyPrefix&&Array.isArray(e)?e.map((e=>`${a.keyPrefix}${u}${e}`)):a.keyPrefix?`${a.keyPrefix}${u}${e}`:e,r.t(l,a)};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 a=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||2===n};if(t.precheck){const e=t.precheck(this,a);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!a(n,e)||r&&!a(i,e)))}loadNamespaces(e,t){const n=_Be();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=_Be();"string"==typeof e&&(e=[e]);const r=this.options.preload||[],i=e.filter((e=>r.indexOf(e)<0));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 qBe(ije());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 sje(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]:oje;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new sje(r);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));return["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 zBe(this.store.data,r),i.services.resourceStore=i.store),i.translator=new VBe(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 cje=sje.createInstance();function uje(e){return uje="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},uje(e)}function lje(e){var t=function(e,t){if("object"!=uje(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=uje(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uje(t)?t:String(t)}function dje(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,lje(r.key),r)}}cje.createInstance=sje.createInstance,cje.createInstance,cje.dir,cje.init,cje.loadResources,cje.reloadResources,cje.use,cje.changeLanguage,cje.getFixedT,cje.t,cje.exists,cje.setDefaultNamespace,cje.hasLoadedNamespace,cje.loadNamespaces,cje.loadLanguages;var fje=[],pje=fje.forEach,hje=fje.slice;var mje=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,yje=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),a="".concat(e,"=").concat(i);if(r.maxAge>0){var o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(o))}if(r.domain){if(!mje.test(r.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(r.domain)}if(r.path){if(!mje.test(r.path))throw new TypeError("option path is invalid");a+="; Path=".concat(r.path)}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");a+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a}(e,encodeURIComponent(t),i)},bje=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},gje={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!=typeof document){var n=bje(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!=typeof document&&yje(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},vje={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 a=r[i].indexOf("=");if(a>0)r[i].substring(0,a)===e.lookupQuerystring&&(t=r[i].substring(a+1))}}return t}},wje=null,Tje=function(){if(null!==wje)return wje;try{wje="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){wje=!1}return wje},Eje={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&Tje()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&Tje()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},Aje=null,xje=function(){if(null!==Aje)return Aje;try{Aje="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Aje=!1}return Aje},Oje={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&xje()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&xje()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},Cje={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}},Ije={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}},Sje={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}},_je={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]}};var Pje=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,r;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 pje.call(hje.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(gje),this.addDetector(vje),this.addDetector(Eje),this.addDetector(Oje),this.addDetector(Cje),this.addDetector(Ije),this.addDetector(Sje),this.addDetector(_je)}},{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&&dje(t.prototype,n),r&&dje(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function kje(){return kje=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kje.apply(this,arguments)}Pje.type="languageDetector";var Rje=lt({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),Nje=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function Mje(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(Rje[n[1]]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var i=new RegExp(Nje),a=null;null!==(a=i.exec(e));)if(a[0].trim())if(a[1]){var o=a[1].trim(),s=[o,""];o.indexOf("=")>-1&&(s=o.split("=")),t.attrs[s[0]]=s[1],i.lastIndex--}else a[2]&&(t.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return t}var Dje=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Lje=/^\s*$/,Fje=Object.create(null);function Bje(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+'="'+e[n]+'"');return t.length?" "+t.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(Bje,"")+"</"+t.name+">";case"comment":return e+"\x3c!--"+t.comment+"--\x3e"}}var jje={parse:function(e,t){t||(t={}),t.components||(t.components=Fje);var n,r=[],i=[],a=-1,o=!1;if(0!==e.indexOf("<")){var s=e.indexOf("<");r.push({type:"text",content:-1===s?e:e.substring(0,s)})}return e.replace(Dje,(function(s,c){if(o){if(s!=="</"+n.name+">")return;o=!1}var u,l="/"!==s.charAt(1),d=s.startsWith("\x3c!--"),f=c+s.length,p=e.charAt(f);if(d){var h=Mje(s);return a<0?(r.push(h),r):((u=i[a]).children.push(h),r)}if(l&&(a++,"tag"===(n=Mje(s)).type&&t.components[n.name]&&(n.type="component",o=!0),n.voidElement||o||!p||"<"===p||n.children.push({type:"text",content:e.slice(f,e.indexOf("<",f))}),0===a&&r.push(n),(u=i[a-1])&&u.children.push(n),i[a]=n),(!l||n.voidElement)&&(a>-1&&(n.voidElement||n.name===s.slice(2,-1))&&(a--,n=-1===a?r:i[a]),!o&&"<"!==p&&p)){u=-1===a?r:i[a].children;var m=e.indexOf("<",f),y=e.slice(f,-1===m?void 0:m);Lje.test(y)&&(y=" "),(m>-1&&a+u.length>=0||" "!==y)&&u.push({type:"text",content:y})}})),r},stringify:function(e){return e.reduce((function(e,t){return e+Bje("",t)}),"")}};function Uje(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&(t[0]=`react-i18next:: ${t[0]}`),console.warn(...t)}}const zje={};function Hje(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&zje[t[0]]||("string"==typeof t[0]&&(zje[t[0]]=new Date),Uje(...t))}const Wje=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout((()=>{e.off("initialized",n)}),0),t()};e.on("initialized",n)}};function Vje(e,t,n){e.loadNamespaces(t,Wje(e,n))}function Gje(e,t,n,r){"string"==typeof n&&(n=[n]),n.forEach((t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)})),e.loadLanguages(t,Wje(e,r))}const qje=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Kje={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Xje=e=>Kje[e];let Yje,Jje={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(qje,Xje)};function Zje(){return Jje}function Qje(){return Yje}function $je(e,t){if(!e)return!1;const n=e.props?e.props.children:e.children;return t?n.length>0:!!n}function eUe(e){if(!e)return[];const t=e.props?e.props.children:e.children;return e.props&&e.props.i18nIsDynamicList?tUe(t):t}function tUe(e){return Array.isArray(e)?e:[e]}function nUe(e,t){if(!e)return"";let n="";const r=tUe(e),i=t.transSupportBasicHtmlNodes&&t.transKeepBasicHtmlNodesFor?t.transKeepBasicHtmlNodesFor:[];return r.forEach(((e,r)=>{if("string"==typeof e)n+=`${e}`;else if($Q.isValidElement(e)){const a=Object.keys(e.props).length,o=i.indexOf(e.type)>-1,s=e.props.children;if(!s&&o&&0===a)n+=`<${e.type}/>`;else if(s||o&&0===a)if(e.props.i18nIsDynamicList)n+=`<${r}></${r}>`;else if(o&&1===a&&"string"==typeof s)n+=`<${e.type}>${s}</${e.type}>`;else{const e=nUe(s,t);n+=`<${r}>${e}</${r}>`}else n+=`<${r}></${r}>`}else if(null===e)Uje("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"==typeof e){const{format:t,...r}=e,i=Object.keys(r);if(1===i.length){const e=t?`${i[0]}, ${t}`:i[0];n+=`{{${e}}}`}else Uje("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",e)}else Uje("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",e)})),n}function rUe(e,t,n,r,i,a){if(""===t)return[];const o=r.transKeepBasicHtmlNodesFor||[],s=t&&new RegExp(o.map((e=>`<${e}`)).join("|")).test(t);if(!e&&!s&&!a)return[t];const c={};!function e(t){tUe(t).forEach((t=>{"string"!=typeof t&&($je(t)?e(eUe(t)):"object"!=typeof t||$Q.isValidElement(t)||Object.assign(c,t))}))}(e);const u=jje.parse(`<0>${t}</0>`),l={...c,...i};function d(e,t,n){const r=eUe(e),i=p(r,t.children,n);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((e=>$Q.isValidElement(e)))}(r)&&0===i.length||e.props&&e.props.i18nIsDynamicList?r:i}function f(e,t,n,r,i){e.dummy?(e.children=t,n.push($Q.cloneElement(e,{key:r},i?void 0:t))):n.push(...$Q.Children.map([e],(e=>{const n={...e.props};return delete n.i18nIsDynamicList,e$.createElement(e.type,kje({},n,{key:r,ref:e.ref},i?{}:{children:t}))})))}function p(t,i,c){const u=tUe(t);return tUe(i).reduce(((t,i,h)=>{const m=i.children&&i.children[0]&&i.children[0].content&&n.services.interpolator.interpolate(i.children[0].content,l,n.language);if("tag"===i.type){let a=u[parseInt(i.name,10)];1!==c.length||a||(a=c[0][i.name]),a||(a={});const y=0!==Object.keys(i.attrs).length?function(e,t){const n={...t};return n.props=Object.assign(e.props,t.props),n}({props:i.attrs},a):a,b=$Q.isValidElement(y),g=b&&$je(i,!0)&&!i.voidElement,v=s&&"object"==typeof y&&y.dummy&&!b,w="object"==typeof e&&null!==e&&Object.hasOwnProperty.call(e,i.name);if("string"==typeof y){const e=n.services.interpolator.interpolate(y,l,n.language);t.push(e)}else if($je(y)||g){f(y,d(y,i,c),t,h)}else if(v){f(y,p(u,i.children,c),t,h)}else if(Number.isNaN(parseFloat(i.name)))if(w){f(y,d(y,i,c),t,h,i.voidElement)}else if(r.transSupportBasicHtmlNodes&&o.indexOf(i.name)>-1)if(i.voidElement)t.push($Q.createElement(i.name,{key:`${i.name}-${h}`}));else{const e=p(u,i.children,c);t.push($Q.createElement(i.name,{key:`${i.name}-${h}`},e))}else if(i.voidElement)t.push(`<${i.name} />`);else{const e=p(u,i.children,c);t.push(`<${i.name}>${e}</${i.name}>`)}else if("object"!=typeof y||b)f(y,m,t,h,1!==i.children.length||!m);else{const e=i.children[0]?m:null;e&&t.push(e)}}else if("text"===i.type){const e=r.transWrapTextNodes,o=a?r.unescape(n.services.interpolator.interpolate(i.content,l,n.language)):n.services.interpolator.interpolate(i.content,l,n.language);e?t.push($Q.createElement(e,{key:`${i.name}-${h}`},o)):t.push(o)}return t}),[])}return eUe(p([{dummy:!0,children:e||[]}],u,tUe(e||[]))[0])}function iUe(e){let{children:t,count:n,parent:r,i18nKey:i,context:a,tOptions:o={},values:s,defaults:c,components:u,ns:l,i18n:d,t:f,shouldUnescape:p,...h}=e;const m=d||Qje();if(!m)return Hje("You will need to pass in an i18next instance by using i18nextReactModule"),t;const y=f||m.t.bind(m)||(e=>e);a&&(o.context=a);const b={...Zje(),...m.options&&m.options.react};let g=l||y.ns||m.options&&m.options.defaultNS;g="string"==typeof g?[g]:g||["translation"];const v=nUe(t,b),w=c||v||b.transEmptyNodeValue||i,{hashTransKey:T}=b,E=i||(T?T(v||w):v||w);m.options&&m.options.interpolation&&m.options.interpolation.defaultVariables&&(s=s&&Object.keys(s).length>0?{...s,...m.options.interpolation.defaultVariables}:{...m.options.interpolation.defaultVariables});const A=s?o.interpolation:{interpolation:{...o.interpolation,prefix:"#$?",suffix:"?$#"}},x={...o,count:n,...s,...A,defaultValue:w,ns:g},O=E?y(E,x):w;u&&Object.keys(u).forEach((e=>{const t=u[e];"function"==typeof t.type||!t.props||!t.props.children||O.indexOf(`${e}/>`)<0&&O.indexOf(`${e} />`)<0||(u[e]=e$.createElement((function(){return e$.createElement(e$.Fragment,null,t)}),null))}));const C=rUe(u||t,O,m,b,x,p),I=void 0!==r?r:b.defaultTransParent;return I?$Q.createElement(I,h,C):C}const aUe={type:"3rdParty",init(e){!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Jje={...Jje,...e}}(e.options.react),function(e){Yje=e}(e)}},oUe=$Q.createContext();class sUe{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach((e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)}))}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function cUe(e){let{children:t,count:n,parent:r,i18nKey:i,context:a,tOptions:o={},values:s,defaults:c,components:u,ns:l,i18n:d,t:f,shouldUnescape:p,...h}=e;const{i18n:m,defaultNS:y}=$Q.useContext(oUe)||{},b=d||m||Qje(),g=f||b&&b.t.bind(b);return iUe({children:t,count:n,parent:r,i18nKey:i,context:a,tOptions:o,values:s,defaults:c,components:u,ns:l||g&&g.ns||y||b&&b.options&&b.options.defaultNS,i18n:b,t:f,shouldUnescape:p,...h})}const uUe=(e,t)=>{const n=$Q.useRef();return $Q.useEffect((()=>{n.current=t?n.current:e}),[e,t]),n.current};function lUe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=$Q.useContext(oUe)||{},a=n||r||Qje();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new sUe),!a){Hje("You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.defaultValue?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}a.options.react&&void 0!==a.options.react.wait&&Hje("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...Zje(),...a.options.react,...t},{useSuspense:s,keyPrefix:c}=o;let u=e||i||a.options&&a.options.defaultNS;u="string"==typeof u?[u]:u||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(u);const l=(a.isInitialized||a.initializedStoreOnce)&&u.every((e=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?void 0!==t.options.ignoreJSONStructure?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=t.languages[0],i=!!t.options&&t.options.fallbackLng,a=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;const o=(e,n)=>{const r=t.services.backendConnector.state[`${e}|${n}`];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)||!t.hasResourceBundle(r,e)&&t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages)&&(!o(r,e)||i&&!o(a,e)))}(e,t,n):(Hje("i18n.languages were undefined or empty",t.languages),!0)}(e,a,o)));function d(){return a.getFixedT(t.lng||null,"fallback"===o.nsMode?u:u[0],c)}const[f,p]=$Q.useState(d);let h=u.join();t.lng&&(h=`${t.lng}${h}`);const m=uUe(h),y=$Q.useRef(!0);$Q.useEffect((()=>{const{bindI18n:e,bindI18nStore:n}=o;function r(){y.current&&p(d)}return y.current=!0,l||s||(t.lng?Gje(a,t.lng,u,(()=>{y.current&&p(d)})):Vje(a,u,(()=>{y.current&&p(d)}))),l&&m&&m!==h&&y.current&&p(d),e&&a&&a.on(e,r),n&&a&&a.store.on(n,r),()=>{y.current=!1,e&&a&&e.split(" ").forEach((e=>a.off(e,r))),n&&a&&n.split(" ").forEach((e=>a.store.off(e,r)))}}),[a,h]);const b=$Q.useRef(!0);$Q.useEffect((()=>{y.current&&!b.current&&p(d),b.current=!1}),[a,c]);const g=[f,a,l];if(g.t=f,g.i18n=a,g.ready=l,l)return g;if(!l&&!s)return g;throw new Promise((e=>{t.lng?Gje(a,t.lng,u,(()=>e())):Vje(a,u,(()=>e()))}))}const dUe={en:{translation:{views:{CONNECT_WALLET:{body:{heading:"Connect a wallet",content:"You'll need to connect or create a digital wallet to buy, sell, trade and store your coins and collectibles."},walletSelection:{heading:"Choose a wallet"}},CONNECT_SUCCESS:{status:"Connection secure",action:"Continue"},READY_TO_CONNECT:{header:{title:"Connect"},metamask:{body:{heading:"Check for the pop-up from MetaMask",content:"Follow the prompts in the MetaMask popup to connect"},footer:{buttonText1:"Ready to connect",buttonText2:"Try again"}},passport:{body:{heading:"Connect with Immutable Passport",content:"Follow the prompts to connect with Immutable Passport"},footer:{buttonText1:"Continue",buttonText2:"Try again"}}},SWITCH_NETWORK:{eth:{heading:"You'll need to switch to the {{networkName}} network",body:"You'll be prompted to switch networks in your wallet.",button:{text:"Ready to Switch",retryText:"Try Again"}},zkEVM:{heading:"You’ll be asked to switch to the Immutable zkEVM network",body:"Check for the pop-up from MetaMask and 'Approve' to switch. If this is the first time, MetaMask will also ask you to add the network.",bodyWalletConnect:"Check for the pop-up from your wallet to switch. If this is the first time, your wallet will also ask you to add the network.",button:{text:"Ready to Switch",retryText:"Try Again"}}},ERROR_VIEW:{heading:"Something's gone wrong",body:["You can try again or contact","support","for help."],actionText:"Try again"},SERVICE_UNAVAILABLE_ERROR_VIEW:{heading:{swap:"Swapping is not available in your region"},body:{swap:"Please refer to <quickswapLink>Quickswap’s</quickswapLink> website for further information."}},LOADING_VIEW:{text:"Loading"},WALLET_BALANCES:{header:{title:"Wallet"},networkStatus:{heading:"Network"},totalTokenBalance:{heading:"Coins",totalHeading:"Value"},tokenBalancesList:{noTokensFound:"No tokens found"},addCoins:"Add coins"},SETTINGS:{header:{title:"Settings"},disconnectButton:{label:"Disconnect Wallet"}},COIN_INFO:{metamask:{heading:"Coins and collectibles are native to networks",body:"You can switch networks to add coins or move them from one network to another"},passport:{heading:"Coins and collectibles are native to networks",body1:"This network is called Immutable zkEVM. If you have other coins in your Passport and can’t see them here, they might be on another network. ",body2:" for more info.",linkText:"Visit our FAQs"}},SWAP:{header:{title:"Swap coins"},content:{title:"What would you like to swap?",fiatPricePrefix:"~ USD",availableBalancePrefix:"Available"},swapForm:{from:{label:"From",inputPlaceholder:"0",selectorTitle:"What would you like to swap from?"},to:{label:"To",inputPlaceholder:"0",selectorTitle:"What would you like to swap to?"},buttonText:"Swap"},fees:{title:"Fees total"},validation:{noAmountInputted:"Please input amount",insufficientBalance:"Insufficient balance",noFromTokenSelected:"Select a coin to swap",noToTokenSelected:"Select a coin to receive"},success:{text:"Success",actionText:"Continue"},failed:{text:"Transaction rejected",actionText:"Try again"},rejected:{text:"Price surge",actionText:"Review & try again"},IN_PROGRESS:{loading:{text:"Swap in progress"}}},APPROVE_ERC20:{approveSwap:{content:{heading:"Now you'll just need to confirm the transaction",body:"Follow the prompts in your wallet."},footer:{buttonText:"Okay",retryText:"Try again"}},approveSpending:{content:{metamask:{heading:"You'll be asked to set a spending cap for this transaction",body:"Input at least {{amount}} for this transaction and future transactions, then follow the prompts."},passport:{heading:"You'll be asked to approve a spending cap for this transaction",body:"Follow the prompts in your wallet to approve the spending cap."}},footer:{buttonText:"Got it",retryText:"Try again"},loading:{text:"Approving spending cap"}}},ONRAMP:{header:{title:"Add coins"},initialLoadingText:"Taking you to Transak",IN_PROGRESS_LOADING:{loading:{text:"Transak is processing your order"}},IN_PROGRESS:{content:{heading:"Order in progress",body1:"You’ll receive an email from Transak when complete. This can take up to 3 mins.",body2:"You can close this window, the transaction will be reflected in your wallet once complete."}},SUCCESS:{text:"Coins are on the way",actionText:"Done"},FAIL:{text:"Transaction failed",actionText:"Try again"}},TOP_UP_VIEW:{header:{title:"How would you like to add coins?"},topUpOptions:{onramp:{heading:"Buy",caption:"With card, Google pay or Apple pay available.",subcaption:"Fees ",disabledCaption:""},swap:{heading:"Swap",caption:"With the coins I have in my balance.",subcaption:"Fees",disabledCaption:"Not available in your region"},bridge:{heading:"Move",caption:"The coins I have in another wallet or network.",subcaption:"Fees ",disabledCaption:""},advanced:{heading:"Advanced options",caption:"Perform a fast bridge or CEX deposit.",subcaption:"Fees ",disabledCaption:""}}},ORDER_SUMMARY:{loading:{balances:"Crunching numbers"},currency:{fiat:"≈ USD ${{amount}}",price:"{{symbol}} {{amount}}"},orderItem:{quantity:"Quantity x{{qty}}"},coinsDrawer:{header:"Pay with...",caption1:"Coins",caption2:"Balance",divider:"More options",payWithCard:{caption:"Buy this items with card instead"},stepType:{SWAP:"Swap {{symbol}} ≈ {{amount}}",ONRAMP:"Buy {{symbol}} ≈ {{amount}}",BRIDGE:"Move {{symbol}} ≈ {{amount}}",SUFFICIENT:"Pay {{symbol}} {{amount}}",delta:{SWAP:"Swap {{symbol}} ≈ {{amount}}",ONRAMP:"Buy {{symbol}} ≈ {{amount}}",BRIDGE:"Move {{symbol}} ≈ {{amount}}",SUFFICIENT:"Pay {{symbol}} {{amount}}"}},fee:"Fees {{symbol}} ≈ {{amount}}"},orderReview:{heading:"Payment summary",continue:"Proceed",payWith:"Pay with {{symbol}}",balance:"Balance {{amount}}"}},FUND_WITH_SMART_CHECKOUT:{loading:{checkingBalances:"Crunching numbers"},currency:{usdEstimate:"≈ USD $",fees:"Fees"},fundingRouteDrawer:{header:"Available balance"},fundingRouteSelect:{heading:"Pay with your",noRoutesAvailable:"Insufficient coin balance. Please proceed with card instead.",continue:"Continue",payWithCardInstead:"No thanks, I'll pay with card",payWithCard:"Pay with card"}},PAYMENT_METHODS:{header:{heading:"How would you like to pay?"},options:{crypto:{heading:"Coins",caption:"Pay with the coins in your wallet, or buy coins with card",disabledCaption:"Currently not available for this purchase"},debit:{heading:"Debit Card",caption:"The recommended way to pay with card.",disabledCaption:"Currently working on this. Proceed with Coins & you’ll be guided on how to add them if needed."},credit:{heading:"Credit Card",caption:"Not recommended since transactions may be blocked by your bank.",disabledCaption:"Currently working on this. Proceed with Coins & you’ll be guided on how to add them if needed."}},topUp:{heading:"You’ll need to add some coins",subheading:{both:"Add {{erc20.value}} {{erc20.symbol}} and {{native.value}} {{native.symbol}} to cover this purchase plus gas.",erc20:"Add {{erc20.value}} {{erc20.symbol}} to your balance through one of the following options.",native:"Add {{native.value}} {{native.symbol}} for gas, through one of the following options."}},loading:{ready1:"Collecting your order",ready2:"Talking to wallet",ready3:"Readying assets",processing1:"Initialising payment",processing2:"Securing your assets",processing3:"Finalising payment"},creditCardWarningDrawer:{heading:"We recommend debit over credit",body:"Most banks will charge cash advance fees or block the transaction altogether when using credit card on these types of purchases.",ctaButton:"Try anyway"}},PAY_WITH_COINS:{header:{heading:"Pay with your",caption:"Using the coins balance in your wallet"},button:{buyNow:"Buy now"}},PAY_WITH_CARD:{screenTitle:"Pay with card",loading:"Taking you to Transak"},SALE_FAIL:{errors:{TRANSACTION_FAILED:{description:"Transaction failed",primaryAction:"Try again",secondaryAction:"View details"},SERVICE_BREAKDOWN:{description:"Sorry, we're unable to process your payment right now. Please try again in a few minutes.",secondaryAction:"Dismiss"},PRODUCT_NOT_FOUND:{description:"Sorry, this item is no longer available",secondaryAction:"Dismiss"},INSUFFICIENT_STOCK:{description:"Sorry, the requested quantity is not in stock. Consider buying a smaller quantity.",secondaryAction:"Dismiss"},TRANSAK_FAILED:{description:"Sorry, something went wrong. Please try again.",primaryAction:"Try again",secondaryAction:"Dismiss"},WALLET_FAILED:{description:"Sorry, we're unable to process this right now.",primaryAction:"Go back",secondaryAction:"Dismiss"},WALLET_REJECTED_NO_FUNDS:{description:"Sorry, something went wrong. Please try again.",primaryAction:"Go back",secondaryAction:"Dismiss"},WALLET_REJECTED:{description:"You'll need to approve the transaction in your wallet to proceed.",primaryAction:"Try again",secondaryAction:"Cancel"},WALLET_POPUP_BLOCKED:{description:"You'll need to allow pop-ups in your browser to proceed.",primaryAction:"I've fixed this, Try again",secondaryAction:"Cancel"},SMART_CHECKOUT_ERROR:{description:"Unable to check your wallets balance. Please try again.",primaryAction:"Try again",secondaryAction:"Cancel"},SMART_CHECKOUT_EXECUTE_ERROR:{description:"Sorry, something went wrong while moving funds. Please try again.",primaryAction:"Try again",secondaryAction:"Cancel"},DEFAULT_ERROR:{description:"Sorry, something went wrong. Please try again.",primaryAction:"Try again",secondaryAction:"Dismiss"},INVALID_PARAMETERS:{description:"Sorry, we're unable to process your order. Missing information from client",secondaryAction:"Dismiss"}}},SALE_SUCCESS:{text:"Order completed",actionText:"Continue"},WALLET_NETWORK_SELECTION:{layoutHeading:"Move",heading:"Where would you like to move funds between?",fromFormInput:{heading:"From",selectDefaultText:"Select wallet and network",walletSelectorHeading:"From wallet",networkSelectorHeading:"From network"},toFormInput:{heading:"To",selectDefaultText:"Select wallet and network",walletSelectorHeading:"To wallet"},submitButton:{text:"Next"}},BRIDGE_FORM:{header:{title:"Move coins"},fees:{title:"Gas Fee",fiatPricePrefix:"~ USD $"},content:{title:"How much would you like to move?",fiatPricePrefix:"~ USD",availableBalancePrefix:"Available"},bridgeForm:{from:{inputPlaceholder:"0",selectorTitle:"What would you like to move?"},buttonText:"Review"},validation:{noAmountInputted:"Please input amount",insufficientBalance:"Insufficient balance",noTokenSelected:"Select a coin to move"}},BRIDGE_REVIEW:{layoutHeading:"Move",heading:"Ok, how does this look?",fromLabel:{amountHeading:"Moving",heading:"From"},toLabel:{heading:"To"},fees:{heading:"Gas fee"},submitButton:{buttonText:"Confirm move"},fiatPricePrefix:"~ USD $"},BRIDGE_FAILURE:{bridgeFailureText:{statusText:"Transaction failed",actionText:"Review & Try again"}},APPROVE_TRANSACTION:{content:{heading:"Approve the transaction in your wallet",body:"Follow the prompts in your wallet popup to confirm."},footer:{buttonText:"Okay",retryText:"Try again"},loadingView:{text:"Initiating move"}},IN_PROGRESS:{heading:"Move in progress",body1:"Your funds have been sent, with less than 20 mins remaining until they're received. You can return and view progress by clicking on the rocket icon.",body2:"You can close this window."},TRANSACTIONS:{layoutHeading:"In progress",passportDashboard:"View the full transaction history in your",status:{withdrawalPending:{actionButtonText:"Proceed",withdrawalDelayText:"This move has been paused, please return ",withdrawalReadyText:"Action required to receive your coins",caption:"Paused"},inProgress:{heading:"In Progress",txnEstimate:"Usually takes 20 mins",stepInfo:"View Details"},emptyState:{notConnected:{body:"Connect your wallet to view the transactions",buttonText:"Connect"}},noTransactions:{body:"You're all done here.",passport:{body:"View your completed transactions in ",link:"Passport"}}},changeWallet:{buttonText:"Change wallet"},fiatPricePrefix:"~ USD $",support:{body1:"Need help?",body2:" Contact ",body3:"support",supportLink:"https://support.immutable.com/en/",passport:{body1:"Or view completed transactions in your ",body2:"Passport"}},walletSelection:{heading:"Choose a wallet to view"}},CLAIM_WITHDRAWAL:{content:{heading:"Follow the prompts to receive your coins on ",body:"You’ll be asked to pay a small gas fee to claim your withdrawal.",body2:"Destination wallet address: "},footer:{buttonText:"Continue",retryText:"Try again"},IN_PROGRESS:{loading:{text:"Processing"},success:{text:"Success",actionText:"Done"},failure:{text:"Transaction failed",actionText:"Try again"}}}},footers:{quickswapFooter:{disclaimerText:"Quickswap is a third party app. Immutable neither builds, owns, operates or deploys Quickswap. For further info, refer to Quickswap’s website."}},wallets:{passport:{heading:"Immutable Passport",description:"Your gaming wallet to pay with card, manage items & more."},metamask:{heading:"MetaMask",description:"Digital wallet for accessing blockchain applications and web3."},walletconnect:{heading:"Other wallets",description:"Allows you to connect with any blockchain mobile wallet including MetaMask."},browserwallet:{heading:"Browser wallets",description:"Digital wallet for accessing blockchain applications and web3."},recommended:"Recommended"},drawers:{feesBreakdown:{heading:"Fees",total:"Total fees",fees:{fiatPricePrefix:"USD $",gasFeeSwap:{label:"Gas fee swap"},gasFeeMove:{label:"Gas fee move"},gasFeeApproval:{label:"Gas fee approval"},serviceFee:{label:"Service fee"}}},transactionFailed:{content:{heading1:"We’ll need you to confirm in your",heading2:"wallet before proceeding",body1:"When the MetaMask pop up appears, be sure to",body2:"sign the transaction"},buttons:{retry:"Got it",cancel:"Dismiss"}},coinSelector:{option:{fiatPricePrefix:"~ USD $"},noCoins:"You have no available coins to select in your wallet."},notEnoughGas:{content:{heading:"You'll need more {{token}} for gas",body:"Your {{token}} balance is too low to cover the gas fee on this move, so you'll need to add more before proceeding."},buttons:{adjustAmount:"Adjust amount",addMoreImx:"Add IMX coins",copyAddress:"Copy wallet address",cancel:"Dismiss"}},notEnoughImx:{content:{noImx:{heading:"You'll need IMX coins to swap",body:"Swap fees are paid in IMX coins, so you'll need to add this before you can swap"},insufficientImx:{heading:"You'll need more IMX coins",body:"In order to cover the fees for the amount specified, you'll need to add more IMX coins"}},buttons:{adjustAmount:"Adjust amount",addMoreImx:"Add IMX coins",cancel:"Dismiss"}},notEnoughEthWithdrawal:{content:{heading1:"Insufficient",heading2:"for gas",body1:"Add",body2:"to your destination account, or select another account to pay the gas. Your destination account will remain the same."},buttons:{retry:"Pay gas with another account",dismiss:"Dismiss"}},unableToSwap:{heading:"Unable to swap this coin",body:"This coin pairing isn't available to swap right now. Try another selection.",buttons:{cancel:"Dismiss"}},networkSwitch:{heading:"Switch network in your {{wallet}}",manualSwitch:{body:"You'll need to open your mobile wallet and switch to the {{chain}} network to proceed"},controlledSwitch:{body:"You'll need to switch to the {{chain}} network to proceed"},switchButton:"Switch to {{chain}}"},walletConnectionError:{unableToConnect:{heading:"Unable to connect",body:"Check your wallet and try again, or close and try a different option",actionButtonText:"Try again"},changedYourMind:{heading:"Changed your mind?",body:"Make sure pop ups are enabled and follow the prompts in your wallet to connect",actionButtonText:"Try again"}}}}},ja:{translation:{views:{CONNECT_WALLET:{body:{heading:"ウォレットを接続する",content:"購入、販売、取引、およびコインとコレクティブルを保存するには、デジタルウォレットを接続または作成する必要があります。"},walletSelection:{heading:"ウォレットを選択"}},CONNECT_SUCCESS:{status:"接続が安全です",action:"続ける"},READY_TO_CONNECT:{header:{title:"接続する"},metamask:{body:{heading:"MetaMaskからのポップアップを確認する",content:"MetaMaskのポップアップに従って接続してください"},footer:{buttonText1:"接続する準備ができました",buttonText2:"再試行する"}},passport:{body:{heading:"Immutable Passportで接続する",content:"Immutable Passportに接続するためのプロンプトに従ってください"},footer:{buttonText1:"続ける",buttonText2:"再試行する"}}},SWITCH_NETWORK:{eth:{heading:"{{networkName}}ネットワークに切り替える必要があります",body:"MetaMaskでネットワークを切り替えるように求められます。必要に応じて後で切り替えることができます。",button:{text:"切り替えの準備ができました",retryText:"再試行する"}},zkEVM:{heading:"Immutable zkEVMネットワークに切り替えるように求められます",body:"MetaMaskからのポップアップを確認し、「承認」して切り替えてください。これが初めての場合、MetaMaskはネットワークを追加するように求めることもあります。",bodyWalletConnect:"ウォレットからのポップアップを確認して切り替えます。これが初めての場合、ウォレットはネットワークの追加を求めます。",button:{text:"切り替えの準備ができました",retryText:"再試行する"}}},ERROR_VIEW:{heading:"何かがうまくいかない",body:["もう一度やってみるか、","サポート","に連絡して助けを求めることができます。"],actionText:"もう一度試す"},SERVICE_UNAVAILABLE_ERROR_VIEW:{heading:{swap:"お住まいの地域では交換が利用できません"},body:{swap:"<quickswapLink>Quickswap</quickswapLink>のウェブサイトで詳細情報をご覧ください。"}},LOADING_VIEW:{text:"読み込み中"},WALLET_BALANCES:{header:{title:"ウォレット"},networkStatus:{heading:"ネットワーク"},totalTokenBalance:{heading:"コイン",totalHeading:"価値"},tokenBalancesList:{noTokensFound:"トークンが見つかりません"},addCoins:"コインを追加"},SETTINGS:{header:{title:"設定"},disconnectButton:{label:"ウォレットを切断"}},COIN_INFO:{metamask:{heading:"コインとコレクティブルはネットワーク固有です",body:"コインを追加したり、ネットワーク間でコインを移動したりするには、ネットワークを切り替えることができます"},passport:{heading:"コインとコレクティブルはネットワーク固有です",body1:"このネットワークはImmutable zkEVMと呼ばれます。Passportに他のコインがあり、ここに表示されない場合、それらは別のネットワークにあるかもしれません。",body2:"詳細については、",linkText:"FAQをご覧ください"}},SWAP:{header:{title:"コインをスワップ"},content:{title:"何をスワップしたいですか?",fiatPricePrefix:"約USD",availableBalancePrefix:"利用可能"},swapForm:{from:{label:"出金元",inputPlaceholder:"0",selectorTitle:"何からスワップしたいですか?"},to:{label:"宛先",inputPlaceholder:"0",selectorTitle:"何にスワップしたいですか?"},buttonText:"スワップ"},fees:{title:"手数料合計"},validation:{noAmountInputted:"金額を入力してください",insufficientBalance:"残高不足",noFromTokenSelected:"スワップするコインを選択してください",noToTokenSelected:"受け取るコインを選択してください"},success:{text:"成功",actionText:"続行"},failed:{text:"トランザクションが拒否されました",actionText:"もう一度試す"},rejected:{text:"価格が急騰しています",actionText:"レビューしてもう一度試す"},IN_PROGRESS:{loading:{text:"スワップ進行中"}}},APPROVE_ERC20:{approveSwap:{content:{heading:"これでトランザクションを承認する必要があります",body:"ウォレットのプロンプトに従ってください。"},footer:{buttonText:"はい",retryText:"もう一度試す"}},approveSpending:{content:{metamask:{heading:"このトランザクションのために支出上限を設定するように求められます",body:["少なくとも入力してください","このトランザクションおよび将来のトランザクションのために、その後、プロンプトに従ってください。"]},passport:{heading:"このトランザクションのために支出上限を承認するように求められます",body:"ウォレットのプロンプトに従って支出上限を承認してください。"}},footer:{buttonText:"了解",retryText:"もう一度試す"},loading:{text:"支出上限を承認しています"}}},ONRAMP:{header:{title:"コインを追加"},initialLoadingText:"Transakに移動しています",IN_PROGRESS_LOADING:{loading:{text:"Transakが注文を処理しています"}},IN_PROGRESS:{content:{heading:"注文進行中",body1:"完了するとTransakからメールが届きます。これには最大3分かかる場合があります。",body2:"このウィンドウを閉じても、トランザクションは完了次第ウォレットに反映されます。"}},SUCCESS:{text:"コインが途中にあります",actionText:"完了"},FAIL:{text:"トランザクションが失敗しました",actionText:"もう一度試す"}},TOP_UP_VIEW:{header:{title:"コインを追加する方法は?"},topUpOptions:{onramp:{heading:"購入",caption:"カード、Googleペイ、またはAppleペイが利用可能。",subcaption:"手数料",disabledCaption:""},swap:{heading:"交換",caption:"私の残高にあるコインで。",subcaption:"手数料",disabledCaption:"お住まいの地域では利用できません"},bridge:{heading:"移動",caption:"別のウォレットやネットワークにある私のコイン。",subcaption:"手数料",disabledCaption:""},advanced:{heading:"高度なオプション",caption:"迅速なブリッジまたはCEX入金を実行します。",subcaption:"手数料",disabledCaption:""}}},ORDER_SUMMARY:{loading:{balances:"数字を計算中"},currency:{fiat:"≈ USD ${{amount}}",price:"{{symbol}} {{amount}}"},orderItem:{quantity:"数量 x{{qty}}"},coinsDrawer:{header:"支払い方法…",caption1:"コイン",caption2:"残高",divider:"その他のオプション",payWithCard:{caption:"代わりにカードで購入"},stepType:{SWAP:"{{symbol}}を{{amount}}でスワップ",ONRAMP:"{{symbol}}を{{amount}}で購入",BRIDGE:"{{symbol}}を{{amount}}で移動",SUFFICIENT:"{{symbol}} {{amount}}で支払う",delta:{SWAP:"{{symbol}}を{{amount}}でスワップ",ONRAMP:"{{symbol}}を{{amount}}で購入",BRIDGE:"{{symbol}}を{{amount}}で移動",SUFFICIENT:"{{symbol}} {{amount}}で支払う"}},fee:"手数料 {{symbol}} ≈ {{amount}}"},orderReview:{heading:"支払いの概要",continue:"続行",payWith:"{{symbol}}で支払う",balance:"残高{{amount}}"}},FUND_WITH_SMART_CHECKOUT:{loading:{checkingBalances:"数値を計算しています"},currency:{usdEstimate:"≈ USD $",fees:"手数料"},fundingRouteDrawer:{header:"利用可能な残高"},fundingRouteSelect:{heading:"で支払う",noRoutesAvailable:"コインの残高が不足しています。代わりにカードで続行してください。",continue:"続行",payWithCardInstead:"いいえ、カードで支払います",payWithCard:"カードで支払う"}},PAYMENT_METHODS:{header:{heading:"どの支払い方法をご希望ですか?"},options:{crypto:{heading:"コイン",caption:"財布の中のコインで支払うか、カードでコインを購入してください。",disabledCaption:"現在、この支払い方法は利用できません。"},debit:{heading:"デビットカード",caption:"カードでの支払いに推奨される方法です。",disabledCaption:"現在作業中です。コインを使って進んでください。必要に応じて、追加する方法が案内されます。"},credit:{heading:"クレジットカード",caption:"銀行によって取引がブロックされる可能性があるため、推奨されません。",disabledCaption:"現在作業中です。コインを使って進んでください。必要に応じて、追加する方法が案内されます。"}},topUp:{heading:"残高が不足しています",subheading:{both:"この購入とガスをカバーするために{{erc20.value}} {{erc20.symbol}}と{{native.value}} {{native.symbol}}を追加する必要があります。",erc20:"残高が不足しているため、{{erc20.value}} {{erc20.symbol}}を追加する必要があります。",native:"残高が不足しているため、{{native.value}} {{native.symbol}}を追加する必要があります。"}},loading:{ready1:"注文を受け取り中",ready2:"ウォレットと通信中",ready3:"資産を準備中",processing1:"支払いを初期化中",processing2:"資産を確保中",processing3:"支払いを完了中"},creditCardWarningDrawer:{heading:"デビットカードの使用をお勧めします",body:"この種の購入にクレジットカードを使用する場合、ほとんどの銀行は現金前払い手数料を請求するか、または取引を完全にブロックします。",ctaButton:"それでも試す"}},PAY_WITH_COINS:{header:{heading:"あなたので支払う",caption:"ウォレットのコイン残高を使用して"},button:{buyNow:"今すぐ購入"}},PAY_WITH_CARD:{screenTitle:"カードで支払う",loading:"Transakに移動しています"},SALE_FAIL:{errors:{TRANSACTION_FAILED:{description:"トランザクションが失敗しました",primaryAction:"もう一度試す",secondaryAction:"詳細を表示"},SERVICE_BREAKDOWN:{description:"申し訳ありませんが、現在お支払いを処理できません。数分後にもう一度お試しください。",secondaryAction:"閉じる"},PRODUCT_NOT_FOUND:{description:"申し訳ありませんが、このアイテムはもう利用できません。",secondaryAction:"閉じる"},INSUFFICIENT_STOCK:{description:"申し訳ありませんが、ご希望の数量は在庫がありません。少ない数量の購入をご検討ください。",secondaryAction:"閉じる"},TRANSAK_FAILED:{description:"申し訳ありませんが、何かがうまくいかなかったようです。もう一度お試しください。",primaryAction:"もう一度試す",secondaryAction:"閉じる"},WALLET_FAILED:{description:"申し訳ありませんが、現在これを処理できません。",primaryAction:"戻る",secondaryAction:"閉じる"},WALLET_REJECTED_NO_FUNDS:{description:"申し訳ありませんが、何かがうまくいかなかったようです。もう一度お試しください。",primaryAction:"戻る",secondaryAction:"閉じる"},WALLET_REJECTED:{description:"取引を承認するには、ウォレットで承認する必要があります。",primaryAction:"もう一度試す",secondaryAction:"キャンセル"},WALLET_POPUP_BLOCKED:{description:"続行するには、ブラウザでポップアップを許可する必要があります。",primaryAction:"もう一度試す",secondaryAction:"キャンセル"},SMART_CHECKOUT_ERROR:{description:"ウォレットの残高を確認できません。もう一度お試しください。",primaryAction:"もう一度試す",secondaryAction:"キャンセル"},SMART_CHECKOUT_EXECUTE_ERROR:{description:"資金を移動する際に何かがうまくいかなかったようです。もう一度お試しください。",primaryAction:"もう一度試す",secondaryAction:"キャンセル"},DEFAULT_ERROR:{description:"申し訳ありませんが、何かがうまくいかなかったようです。もう一度お試しください。",primaryAction:"もう一度試す",secondaryAction:"閉じる"},INVALID_PARAMETERS:{description:"申し訳ありませんが、ご注文を処理できません。クライアントからの情報が不足しています。",secondaryAction:"閉じる"}}},SALE_SUCCESS:{text:"注文が完了しました",actionText:"続行"},WALLET_NETWORK_SELECTION:{layoutHeading:"移動",heading:"どこに資金を移動させたいですか?",fromFormInput:{heading:"From",selectDefaultText:"ウォレットとネットワークを選択",walletSelectorHeading:"From wallet",networkSelectorHeading:"From network"},toFormInput:{heading:"To",selectDefaultText:"ウォレットとネットワークを選択",walletSelectorHeading:"To wallet"},submitButton:{text:"次へ"}},BRIDGE_FORM:{header:{title:"コインを移動"},fees:{title:"ガス手数料",fiatPricePrefix:"~ USD $"},content:{title:"いくら移動しますか?",fiatPricePrefix:"約USD",availableBalancePrefix:"利用可能"},bridgeForm:{from:{inputPlaceholder:"0",selectorTitle:"移動するコインを選択"},buttonText:"確認"},validation:{noAmountInputted:"金額を入力してください",insufficientBalance:"残高が不足しています",noTokenSelected:"移動するコインを選択してください"}},BRIDGE_REVIEW:{layoutHeading:"移動",heading:"これはどう見えますか?",fromLabel:{amountHeading:"移動中",heading:"From"},toLabel:{heading:"To"},fees:{heading:"ガス手数料"},submitButton:{buttonText:"移動を確認"},fiatPricePrefix:"~ USD $"},BRIDGE_FAILURE:{bridgeFailureText:{statusText:"トランザクションが失敗しました",actionText:"再確認してもう一度試す"}},APPROVE_TRANSACTION:{content:{heading:"ウォレットでトランザクションを承認してください",body:"ウォレットのポップアップで表示されるプロンプトに従って承認してください。"},footer:{buttonText:"OK",retryText:"もう一度試す"},loadingView:{text:"移動を開始しています"}},IN_PROGRESS:{heading:"移動進行中",body1:"資金は送信されました。受信まで残り20分未満です。進捗状況は、ロケットアイコンをクリックして戻って確認できます。",body2:"このウィンドウを閉じてもよろしいです。"},TRANSACTIONS:{layoutHeading:"進行中",passportDashboard:"完全な取引履歴を表示する",status:{withdrawalPending:{actionButtonText:"続行",withdrawalDelayText:"この移動は一時停止されました。戻ってください",withdrawalReadyText:"コインを受け取るためには行動が必要です",caption:"一時停止中"},inProgress:{heading:"進行中",txnEstimate:"通常、20分かかります",stepInfo:"詳細を表示"},emptyState:{notConnected:{body:"トランザクションを表示するにはウォレットを接続してください",buttonText:"接続する"}},noTransactions:{body:"ここで完了しました。",passport:{body:"完了した取引は",link:"パスポート"}}},changeWallet:{buttonText:"ウォレットを変更する"},fiatPricePrefix:"≈ USD $",support:{body1:"サポートが必要ですか?",body2:" お問い合わせは ",body3:"サポートへ",supportLink:"https://support.immutable.com/ja/",passport:{body1:"または、完了した取引をご覧になるには ",body2:"パスポート"}},walletSelection:{heading:"表示するウォレットを選択"}},CLAIM_WITHDRAWAL:{content:{heading:"コインを受け取るためのプロンプトに従ってください",body:"引き出しを請求するには小額のガス手数料が必要です。",body2:"目的地ウォレットアドレス:"},footer:{buttonText:"続行",retryText:"もう一度試す"},IN_PROGRESS:{loading:{text:"処理中"},success:{text:"成功",actionText:"完了"},failure:{text:"取引失敗",actionText:"再試行"}}}},footers:{quickswapFooter:{disclaimerText:"Quickswapはサードパーティアプリケーションです。ImmutableはQuickswapをビルド、所有、運営、デプロイしていません。詳細については、Quickswapのウェブサイトを参照してください。"}},wallets:{passport:{heading:"Immutable Passport",description:"カードで支払い、アイテムを管理するなど、ゲーム用ウォレットです。"},metamask:{heading:"MetaMask",description:"ブロックチェーンアプリケーションおよびweb3にアクセスするためのデジタルウォレット。"},walletconnect:{heading:"その他のウォレット",description:"MetaMaskを含む任意のブロックチェーンモバイルウォレットに接続できます。"},browserwallet:{heading:"ブラウザウォレット",description:"ブロックチェーンアプリケーションおよびweb3にアクセスするためのデジタルウォレット。"},recommended:"推奨"},drawers:{feesBreakdown:{heading:"手数料の内訳",total:"総手数料",fees:{gas:{label:"ガス手数料"}}},transactionFailed:{content:{heading1:"続行する前に、",heading2:"ウォレットで確認が必要です",body1:"MetaMaskのポップアップが表示されたら、",body2:"トランザクションに署名してください"},buttons:{retry:"了解",cancel:"閉じる"}},coinSelector:{option:{fiatPricePrefix:"約USD $"},noCoins:"ウォレットで選択できるコインがありません。"},notEnoughGas:{content:{heading:"{{token}}が不足しています",body:"この操作のガス手数料をカバーするには{{token}}残高が十分にありません。続行する前に、もっと{{token}}を追加する必要があります。"},buttons:{adjustAmount:"金額を調整",addMoreImx:"IMXコインを追加",copyAddress:"ウォレットアドレスをコピー",cancel:"閉じる"}},notEnoughImx:{content:{noImx:{heading:"IMXコインが必要です",body:"スワップ手数料はIMXコインで支払われるため、スワップする前にこれを追加する必要があります。"},insufficientImx:{heading:"IMXコインが不足しています",body:"指定された金額の手数料をカバーするためには、IMXコインを追加する必要があります。"}},buttons:{adjustAmount:"金額を調整",addMoreImx:"IMXコインを追加",cancel:"閉じる"}},notEnoughEthWithdrawal:{content:{heading1:"不足",heading2:"ガス用",body1:"追加",body2:"あなたの宛先アカウントに追加するか、別のアカウントを選択してガスを支払います。宛先アカウントは変更されません。"},buttons:{retry:"別のアカウントでガスを支払う",dismiss:"閉じる"}},unableToSwap:{heading:"このコインはスワップできません",body:"このコインのペアは現在スワップできません。別の選択肢を試してください。",buttons:{cancel:"閉じる"}},networkSwitch:{heading:"あなたの{{wallet}}でネットワークを切り替える",manualSwitch:{body:"続行するにはモバイルウォレットを開き、{{chain}}ネットワークに切り替える必要があります"},controlledSwitch:{body:"{{chain}}ネットワークに切り替える必要があります"},switchButton:"{{chain}}に切り替える"},walletConnectionError:{unableToConnect:{heading:"接続できません",body:"ウォレットを確認してもう一度お試しください。または、閉じて別のオプションを試してください。",actionButtonText:"もう一度試す"},changedYourMind:{heading:"考えを変えましたか?",body:"ポップアップが有効になっていることを確認し、ウォレットのプロンプトに従って接続してください。",actionButtonText:"もう一度試す"}}}}},ko:{translation:{views:{CONNECT_WALLET:{body:{heading:"지갑 연결",content:"구매, 판매, 거래 및 코인과 수집품을 저장하려면 디지털 지갑을 연결하거나 만들어야 합니다."},walletSelection:{heading:"지갑 선택"}},CONNECT_SUCCESS:{status:"연결이 안전함",action:"계속하기"},READY_TO_CONNECT:{header:{title:"연결 준비됨"},metamask:{body:{heading:"MetaMask에서 팝업을 확인하세요",content:"MetaMask 팝업의 안내에 따라 연결하세요"},footer:{buttonText1:"연결 준비됨",buttonText2:"다시 시도"}},passport:{body:{heading:"Immutable Passport로 연결",content:"Immutable Passport와 연결하기 위한 안내를 따르세요"},footer:{buttonText1:"계속",buttonText2:"다시 시도"}}},SWITCH_NETWORK:{eth:{heading:"{{networkName}} 네트워크로 전환해야 합니다",body:"MetaMask에서 네트워크 전환을 요청받게 됩니다. 필요할 때 다시 전환할 수 있습니다.",button:{text:"전환 준비됨",retryText:"다시 시도"}},zkEVM:{heading:"Immutable zkEVM 네트워크로 전환하라는 요청을 받게 됩니다",body:"MetaMask 팝업에서 '승인'을 선택하고 전환하세요. 처음이라면 MetaMask에서 네트워크 추가를 요구할 수도 있습니다.",bodyWalletConnect:"지갑에서 팝업을 확인하여 전환하십시오. 처음이라면 지갑에서 네트워크 추가를 요청합니다.",button:{text:"전환 준비됨",retryText:"다시 시도"}}},ERROR_VIEW:{heading:"문제가 발생했습니다",body:["다시 시도하거나","지원팀에","도움을 요청하세요."],actionText:"다시 시도"},SERVICE_UNAVAILABLE_ERROR_VIEW:{heading:{swap:"귀하의 지역에서는 스왑이 가능하지 않습니다"},body:{swap:"자세한 정보는 <quickswapLink>Quickswap</quickswapLink> 웹사이트를 참조하십시오."}},LOADING_VIEW:{text:"로딩 중"},WALLET_BALANCES:{header:{title:"지갑"},networkStatus:{heading:"네트워크"},totalTokenBalance:{heading:"코인",totalHeading:"가치"},tokenBalancesList:{noTokensFound:"토큰을 찾을 수 없습니다"},addCoins:"동전 추가"},SETTINGS:{header:{title:"설정"},disconnectButton:{label:"지갑 연결 해제"}},COIN_INFO:{metamask:{heading:"코인과 수집품은 네트워크에 기반을 두고 있습니다",body:"네트워크를 전환하여 코인을 추가하거나 다른 네트워크로 옮길 수 있습니다"},passport:{heading:"코인과 수집품은 네트워크에 기반을 두고 있습니다",body1:"이 네트워크는 Immutable zkEVM입니다. Passport에 다른 코인이 있고 여기서 볼 수 없다면 다른 네트워크에 있을 수 있습니다.",body2:" 자세한 정보를 위해 우리의 FAQ를 방문하세요.",linkText:"FAQ 방문하기"}},SWAP:{header:{title:"코인 교환"},content:{title:"무엇을 교환하고 싶으신가요?",fiatPricePrefix:"약 USD",availableBalancePrefix:"사용 가능"},swapForm:{from:{label:"From",inputPlaceholder:"0",selectorTitle:"무엇을 교환하고 싶으신가요?"},to:{label:"To",inputPlaceholder:"0",selectorTitle:"무엇을 받으시겠습니까?"},buttonText:"교환"},fees:{title:"수수료 총액"},validation:{noAmountInputted:"금액을 입력해 주세요",insufficientBalance:"잔고가 부족합니다",noFromTokenSelected:"교환할 코인을 선택하세요",noToTokenSelected:"받을 코인을 선택하세요"},success:{text:"성공",actionText:"계속하기"},failed:{text:"거래 거절됨",actionText:"다시 시도"},rejected:{text:"가격 급등",actionText:"검토하고 다시 시도하세요"},IN_PROGRESS:{loading:{text:"교환 진행 중"}}},APPROVE_ERC20:{approveSwap:{content:{heading:"이제 거래를 확인하기만 하면 됩니다",body:"지갑의 안내를 따르세요."},footer:{buttonText:"확인",retryText:"다시 시도"}},approveSpending:{content:{metamask:{heading:"이 거래에 대한 지출 한도를 설정하라는 요청을 받게 될 것입니다",body:"이 거래 및 향후 거래를 위해 최소 {{amount}}을 입력한 후, 안내를 따르세요."},passport:{heading:"이 거래에 대한 지출 한도 승인을 받게 됩니다",body:"지출 한도를 승인하기 위해 지갑의 안내를 따르세요."}},footer:{buttonText:"알겠습니다",retryText:"다시 시도"},loading:{text:"지출 한도 승인 중"}}},ONRAMP:{header:{title:"코인 추가"},initialLoadingText:"Transak으로 이동하는 중",IN_PROGRESS_LOADING:{loading:{text:"Transak가 주문을 처리 중입니다"}},IN_PROGRESS:{content:{heading:"주문 진행 중",body1:"완료되면 Transak에서 이메일을 받게 됩니다. 최대 3분이 소요될 수 있습니다.",body2:"이 창을 닫을 수 있으며, 완료되면 거래가 지갑에 반영됩니다."}},SUCCESS:{text:"코인이 도착하는 중입니다",actionText:"완료"},FAIL:{text:"거래 실패",actionText:"다시 시도"}},TOP_UP_VIEW:{header:{title:"코인을 어떻게 추가하시겠습니까?"},topUpOptions:{onramp:{heading:"구매",caption:"카드, 구글 페이 또는 애플 페이 가능.",subcaption:"수수료",disabledCaption:""},swap:{heading:"스왑",caption:"내 잔액에 있는 코인으로.",subcaption:"수수료",disabledCaption:"귀하의 지역에서 사용할 수 없음"},bridge:{heading:"이동",caption:"다른 지갑이나 네트워크에 있는 내 코인.",subcaption:"수수료",disabledCaption:""},advanced:{heading:"고급 옵션",caption:"빠른 브릿지 또는 CEX 입금을 수행합니다.",subcaption:"수수료",disabledCaption:""}}},ORDER_SUMMARY:{loading:{balances:"숫자 계산 중"},currency:{fiat:"≈ USD ${{amount}}",price:"{{symbol}} {{amount}}"},orderItem:{quantity:"수량 x{{qty}}"},coinsDrawer:{header:"결제 수단...",caption1:"코인",caption2:"잔액",divider:"더 많은 옵션",payWithCard:{caption:"대신 카드로 구매"},stepType:{SWAP:"{{symbol}} ≈ {{amount}} 교환",ONRAMP:"{{symbol}} ≈ {{amount}} 구매",BRIDGE:"{{symbol}} ≈ {{amount}} 이동",SUFFICIENT:"{{symbol}} {{amount}} 지불",delta:{SWAP:"{{symbol}} ≈ {{amount}} 교환",ONRAMP:"{{symbol}} ≈ {{amount}} 구매",BRIDGE:"{{symbol}} ≈ {{amount}} 이동",SUFFICIENT:"{{symbol}} {{amount}} 지불"}},fee:"수수료 {{symbol}} ≈ {{amount}}"},orderReview:{heading:"결제 요약",continue:"계속",payWith:"{{symbol}}로 결제",balance:"잔액 {{amount}}"}},FUND_WITH_SMART_CHECKOUT:{loading:{checkingBalances:"숫자를 계산하는 중"},currency:{usdEstimate:"≈ USD $",fees:"수수료"},fundingRouteDrawer:{header:"사용 가능한 잔액"},fundingRouteSelect:{heading:"Pay with your",noRoutesAvailable:"코인 잔액이 부족합니다. 대신 카드로 진행하세요.",continue:"계속",payWithCardInstead:"괜찮습니다, 카드로 결제할게요",payWithCard:"카드로 결제하기"}},PAYMENT_METHODS:{header:{heading:"어떤 결제 방법을 원하시나요?"},options:{crypto:{heading:"코인",caption:"지갑 안의 동전으로 지불하거나 카드로 동전을 구입하세요.",disabledCaption:"현재 이 구매에는 사용할 수 없습니다."},debit:{heading:"직불카드",caption:"카드로 결제하는 권장 방법입니다.",disabledCaption:"현재 작업 중입니다. 코인을 사용하여 계속 진행하시면 필요한 경우 추가하는 방법을 안내받을 수 있습니다."},credit:{heading:"신용카드",caption:"은행에서 거래를 차단할 수 있으므로 권장하지 않습니다.",disabledCaption:"현재 작업 중입니다. 코인을 사용하여 계속 진행하시면 필요한 경우 추가하는 방법을 안내받을 수 있습니다."}},topUp:{heading:"일부 코인을 추가해야합니다",subheading:{both:"이 구매 및 가스를 포함하여 이를 커버하기 위해 {{erc20.value}} {{erc20.symbol}} 및 {{native.value}} {{native.symbol}}를 추가하십시오.",erc20:"다음 옵션 중 하나를 통해 균형에 {{erc20.value}} {{erc20.symbol}}를 추가하십시오.",native:"다음 옵션 중 하나를 통해 가스에 {{native.value}} {{native.symbol}}를 추가하십시오."}},loading:{ready1:"주문 수집 중",ready2:"지갑과 대화 중",ready3:"자산 준비 중",processing1:"결제 초기화 중",processing2:"자산 보호 중",processing3:"결제 완료 중"},creditCardWarningDrawer:{heading:"신용카드보다는 체크카드 사용을 권장합니다",body:"이런 종류의 구매에 신용카드를 사용할 경우 대부분의 은행에서 현금 서비스 수수료를 부과하거나 거래를 전체적으로 차단할 수 있습니다.",ctaButton:"그래도 시도하기"}},PAY_WITH_COINS:{header:{heading:"코인으로 결제",caption:"지갑에 있는 코인 잔액을 이용하여"},button:{buyNow:"지금 구매"}},PAY_WITH_CARD:{screenTitle:"카드로 결제",loading:"Transak으로 이동하는 중"},SALE_FAIL:{errors:{TRANSACTION_FAILED:{description:"거래 실패",primaryAction:"다시 시도",secondaryAction:"세부 정보 보기"},SERVICE_BREAKDOWN:{description:"죄송합니다, 현재 지불 처리가 불가능합니다. 몇 분 후에 다시 시도하세요.",secondaryAction:"닫기"},PRODUCT_NOT_FOUND:{description:"죄송합니다, 이 상품은 더 이상 구매할 수 없습니다.",secondaryAction:"닫기"},INSUFFICIENT_STOCK:{description:"죄송합니다. 요청하신 수량은 재고가 없습니다. 더 적은 수량을 고려해 주십시오.",secondaryAction:"닫기"},TRANSAK_FAILED:{description:"죄송합니다, 문제가 발생했습니다. 다시 시도하세요.",primaryAction:"다시 시도",secondaryAction:"닫기"},WALLET_FAILED:{description:"죄송합니다, 지금은 이를 처리할 수 없습니다.",primaryAction:"돌아가기",secondaryAction:"닫기"},WALLET_REJECTED_NO_FUNDS:{description:"죄송합니다, 문제가 발생했습니다. 다시 시도하세요.",primaryAction:"돌아가기",secondaryAction:"닫기"},WALLET_REJECTED:{description:"거래를 진행하려면 지갑에서 거래 승인이 필요합니다.",primaryAction:"다시 시도",secondaryAction:"취소"},WALLET_POPUP_BLOCKED:{description:"계속 진행하려면 브라우저에서 팝업을 허용해야 합니다.",primaryAction:"이 문제를 해결했습니다. 다시 시도하세요.",secondaryAction:"취소"},SMART_CHECKOUT_ERROR:{description:"지갑 잔액을 확인할 수 없습니다. 다시 시도하세요.",primaryAction:"다시 시도",secondaryAction:"취소"},SMART_CHECKOUT_EXECUTE_ERROR:{description:"죄송합니다, 자금 이동 중 문제가 발생했습니다. 다시 시도하세요.",primaryAction:"다시 시도",secondaryAction:"취소"},DEFAULT_ERROR:{description:"죄송합니다, 문제가 발생했습니다. 다시 시도하세요.",primaryAction:"다시 시도",secondaryAction:"닫기"},INVALID_PARAMETERS:{description:"죄송합니다. 주문을 처리할 수 없습니다. 고객으로부터의 정보가 누락되었습니다.",secondaryAction:"닫기"}}},SALE_SUCCESS:{text:"주문 완료",actionText:"계속"},WALLET_NETWORK_SELECTION:{layoutHeading:"이동",heading:"자금을 어디에서 어디로 이동하시겠습니까?",fromFormInput:{heading:"From",selectDefaultText:"지갑과 네트워크를 선택하세요",walletSelectorHeading:"지갑에서",networkSelectorHeading:"네트워크에서"},toFormInput:{heading:"To",selectDefaultText:"지갑과 네트워크를 선택하세요",walletSelectorHeading:"지갑으로"},submitButton:{text:"다음"}},BRIDGE_FORM:{header:{title:"코인 이동"},fees:{title:"가스 요금",fiatPricePrefix:"~ USD $"},content:{title:"얼마나 많이 이동하시겠습니까?",fiatPricePrefix:"약 USD",availableBalancePrefix:"사용 가능"},bridgeForm:{from:{inputPlaceholder:"0",selectorTitle:"무엇을 이동하고 싶으신가요?"},buttonText:"검토"},validation:{noAmountInputted:"금액을 입력해 주세요",insufficientBalance:"잔고가 부족합니다",noTokenSelected:"이동할 코인을 선택하세요"}},BRIDGE_REVIEW:{layoutHeading:"이동",heading:"이렇게 보이면 괜찮으십니까?",fromLabel:{amountHeading:"이동 중",heading:"From"},toLabel:{heading:"To"},fees:{heading:"가스 요금"},submitButton:{buttonText:"이동 확인"},fiatPricePrefix:"~ USD $"},BRIDGE_FAILURE:{bridgeFailureText:{statusText:"거래 실패",actionText:"검토하고 다시 시도하세요"}},APPROVE_TRANSACTION:{content:{heading:"지갑에서 거래 승인",body:"지갑 팝업의 안내를 따라 확인하세요."},footer:{buttonText:"확인",retryText:"다시 시도"},loadingView:{text:"이동 시작 중"}},IN_PROGRESS:{heading:"이동 중",body1:"자금이 송금되었습니다. 수령까지 남은 시간은 20분 미만입니다. 로켓 아이콘을 클릭하여 진행 상황을 확인할 수 있습니다.",body2:"이 창을 닫아도 됩니다."},TRANSACTIONS:{layoutHeading:"진행 중",passportDashboard:"전체 거래 내역을 확인하세요",status:{withdrawalPending:{actionButtonText:"계속",withdrawalDelayText:"이 이동은 일시 중지되었습니다. 돌아가세요",withdrawalReadyText:"코인을 받으려면 조치가 필요합니다",caption:"일시중지됨"},inProgress:{heading:"진행 중",txnEstimate:"보통 20분 소요됩니다",stepInfo:"세부 정보 보기"},emptyState:{notConnected:{body:"트랜잭션을 보려면 지갑을 연결하세요",buttonText:"연결하다"}},noTransactions:{body:"여기까지 완료되었습니다.",passport:{body:"완료된 거래는",link:"패스포트"}}},changeWallet:{buttonText:"지갑 변경"},fiatPricePrefix:"≈ USD $",support:{body1:"도움이 필요하신가요?",body2:" 문의하기 ",body3:"지원팀",supportLink:"https://support.immutable.com/ko/",passport:{body1:"또는 귀하의 ",body2:"패스포트"}},walletSelection:{heading:"보려는 지갑 선택"}},CLAIM_WITHDRAWAL:{content:{heading:"코인을 받으려면 프롬프트에 따라 진행하십시오",body:"출금을 청구하려면 소액의 가스 수수료를 지불해야 합니다.",body2:"목적지 지갑 주소: "},footer:{buttonText:"계속",retryText:"다시 시도"},IN_PROGRESS:{loading:{text:"처리 중"},success:{text:"성공",actionText:"완료"},failure:{text:"거래 실패",actionText:"다시 시도"}}}},footers:{quickswapFooter:{disclaimerText:"Quickswap는 타사 앱입니다. Immutable은 Quickswap를 만들거나 소유하거나 운영하거나 배포하지 않습니다. 자세한 정보는 Quickswap의 웹사이트를 참조하십시오."}},wallets:{passport:{heading:"Immutable Passport",description:"카드로 결제하고, 아이템을 관리하는 게임용 지갑입니다."},metamask:{heading:"MetaMask",description:"블록체인 애플리케이션 및 web3에 접근하는 디지털 지갑입니다."},walletconnect:{heading:"기타 지갑",description:"MetaMask를 포함한 모든 블록체인 모바일 지갑에 연결할 수 있습니다."},browserwallet:{heading:"브라우저 지갑",description:"블록체인 애플리케이션 및 web3에 접근하는 디지털 지갑입니다."},recommended:"추천"},drawers:{feesBreakdown:{heading:"수수료 내역",total:"수수료 총액",fees:{gas:{label:"가스 수수료"}}},transactionFailed:{content:{heading1:"계속하기 전에 지갑에서 확인이 필요합니다",heading2:"지갑 확인 필요",body1:"MetaMask 팝업이 나타날 때 거래에",body2:"서명을 꼭 하십시오"},buttons:{retry:"알겠습니다",cancel:"취소"}},coinSelector:{option:{fiatPricePrefix:"대략 USD $"},noCoins:"지갑에 선택 가능한 코인이 없습니다."},notEnoughGas:{content:{heading:"가스를 위해 {{token}}이 더 필요합니다",body:"이 작업에 필요한 가스 수수료를 지불하기 위해 {{token}} 잔액이 너무 낮습니다. 계속하기 전에 더 추가해야 합니다."},buttons:{adjustAmount:"금액 조정",addMoreImx:"IMX 코인 추가",copyAddress:"지갑 주소 복사",cancel:"취소"}},notEnoughImx:{content:{noImx:{heading:"IMX 코인이 필요합니다",body:"교환 수수료는 IMX 코인으로 지불되므로 교환 전에 이를 추가해야 합니다"},insufficientImx:{heading:"더 많은 IMX 코인이 필요합니다",body:"지정된 금액의 수수료를 충당하기 위해 더 많은 IMX 코인을 추가해야 합니다"}},buttons:{adjustAmount:"금액 조정",addMoreImx:"IMX 코인 추가",cancel:"취소"}},notEnoughEthWithdrawal:{content:{heading1:"부족함",heading2:"가스용",body1:"추가",body2:"목적지 계정에 추가하거나 다른 계정을 선택하여 가스를 지불하십시오. 목적지 계정은 그대로 유지됩니다."},buttons:{retry:"다른 계정으로 가스 지불",dismiss:"닫기"}},unableToSwap:{heading:"해당 코인 교환 불가",body:"지금은 이 코인 페어를 교환할 수 없습니다. 다른 선택을 시도해보세요.",buttons:{cancel:"취소"}},networkSwitch:{heading:"귀하의 {{wallet}}에서 네트워크를 전환하세요",manualSwitch:{body:"계속하려면 모바일 지갑을 열고 {{chain}} 네트워크로 전환해야 합니다"},controlledSwitch:{body:"{{chain}} 네트워크로 전환해야 합니다"},switchButton:"{{chain}}로 전환하기"},walletConnectionError:{unableToConnect:{heading:"연결할 수 없음",body:"지갑을 확인한 후 다시 시도하거나 닫고 다른 옵션을 시도하세요.",actionButtonText:"다시 시도"},changedYourMind:{heading:"생각을 바꾸셨나요?",body:"팝업이 활성화되어 있는지 확인하고 지갑의 프롬프트를 따라 연결하세요.",actionButtonText:"다시 시도"}}}}},zh:{translation:{views:{CONNECT_WALLET:{body:{heading:"连接钱包",content:"您需要连接或创建数字钱包以购买、出售、交易和存储您的硬币和收藏品。"},walletSelection:{heading:"选择一个钱包"}},CONNECT_SUCCESS:{status:"连接安全",action:"继续"},READY_TO_CONNECT:{header:{title:"连接"},metamask:{body:{heading:"检查MetaMask的弹窗",content:"按照MetaMask弹窗中的提示进行连接"},footer:{buttonText1:"准备好连接",buttonText2:"再试一次"}},passport:{body:{heading:"使用Immutable Passport连接",content:"按照提示使用Immutable Passport进行连接"},footer:{buttonText1:"继续",buttonText2:"再试一次"}}},SWITCH_NETWORK:{eth:{heading:"您需要切换到{{networkName}}网络",body:"MetaMask将提示您切换网络。需要时可以切回。",button:{text:"准备切换",retryText:"再试一次"}},zkEVM:{heading:"将要求您切换到Immutable zkEVM网络",body:"检查MetaMask的弹窗并选择'批准'以切换。如果这是第一次,MetaMask还会要求您添加网络。",bodyWalletConnect:"请检查您的钱包弹出窗口以进行切换。如果这是第一次,您的钱包还会要求您添加网络。",button:{text:"准备切换",retryText:"再试一次"}}},ERROR_VIEW:{heading:"出了些问题",body:["您可以再试一次或联系","支持","寻求帮助。"],actionText:"再试一次"},SERVICE_UNAVAILABLE_ERROR_VIEW:{heading:{swap:"您所在的地区不支持兑换"},body:{swap:"请参考<quickswapLink>Quickswap</quickswapLink>的网站了解更多信息。"}},LOADING_VIEW:{text:"加载中"},WALLET_BALANCES:{header:{title:"钱包"},networkStatus:{heading:"网络"},totalTokenBalance:{heading:"硬币",totalHeading:"价值"},tokenBalancesList:{noTokensFound:"未发现代币"},addCoins:"添加硬币"},SETTINGS:{header:{title:"设置"},disconnectButton:{label:"断开钱包连接"}},COIN_INFO:{metamask:{heading:"硬币和收藏品是网络原生的",body:"您可以切换网络来添加硬币或将它们从一个网络移动到另一个网络"},passport:{heading:"硬币和收藏品是网络原生的",body1:"这个网络称为Immutable zkEVM。如果您在Passport中有其他硬币在这里看不到,它们可能在另一个网络上。",body2:"欲了解更多信息,请",linkText:"访问我们的常见问题"}},SWAP:{header:{title:"兑换硬币"},content:{title:"您想要兑换什么?",fiatPricePrefix:"约合美元",availableBalancePrefix:"可用余额"},swapForm:{from:{label:"从",inputPlaceholder:"0",selectorTitle:"您想从哪里兑换?"},to:{label:"至",inputPlaceholder:"0",selectorTitle:"您想兑换到哪里?"},buttonText:"兑换"},fees:{title:"总费用"},validation:{noAmountInputted:"请输入金额",insufficientBalance:"余额不足",noFromTokenSelected:"选择一个要兑换的硬币",noToTokenSelected:"选择一个要接收的硬币"},success:{text:"成功",actionText:"继续"},failed:{text:"交易被拒绝",actionText:"再试一次"},rejected:{text:"价格飙升",actionText:"审查并重试"},IN_PROGRESS:{loading:{text:"交换进行中"}}},APPROVE_ERC20:{approveSwap:{content:{heading:"现在您只需要确认交易",body:"按照钱包中的提示操作。"},footer:{buttonText:"好的",retryText:"再试一次"}},approveSpending:{content:{metamask:{heading:"您将被要求为这笔交易设置支出上限",body:"至少输入{{amount}}用于本次及未来交易,然后按照提示操作。"},passport:{heading:"您将被要求批准这笔交易的支出上限",body:"按照钱包中的提示批准支出上限。"}},footer:{buttonText:"明白",retryText:"再试一次"},loading:{text:"批准支出上限"}}},ONRAMP:{header:{title:"添加硬币"},initialLoadingText:"带您前往Transak",IN_PROGRESS_LOADING:{loading:{text:"Transak正在处理您的订单"}},IN_PROGRESS:{content:{heading:"订单进行中",body1:"当完成时,您将从Transak收到一封电子邮件。这可能需要长达3分钟的时间。",body2:"您可以关闭这个窗口,一旦交易完成,将会反映在您的钱包中。"}},SUCCESS:{text:"硬币正在途中",actionText:"完成"},FAIL:{text:"交易失败",actionText:"再试一次"}},TOP_UP_VIEW:{header:{title:"您想如何添加代币?"},topUpOptions:{onramp:{heading:"购买",caption:"可通过卡、谷歌支付或苹果支付。",subcaption:"费用",disabledCaption:""},swap:{heading:"兑换",caption:"使用我在余额中的代币。",subcaption:"费用",disabledCaption:"您所在的地区不可用"},bridge:{heading:"转移",caption:"我在其他钱包或网络中的代币。",subcaption:"费用",disabledCaption:""},advanced:{heading:"高级选项",caption:"进行快速桥接或CEX存款。",subcaption:"费用",disabledCaption:""}}},ORDER_SUMMARY:{loading:{balances:"正在计算数字"},currency:{fiat:"≈ USD ${{amount}}",price:"{{symbol}} {{amount}}"},orderItem:{quantity:"数量 x{{qty}}"},coinsDrawer:{header:"支付方式…",caption1:"硬币",caption2:"余额",divider:"更多选项",payWithCard:{caption:"使用银行卡购买此商品"},stepType:{SWAP:"交换 {{symbol}} ≈ {{amount}}",ONRAMP:"购买 {{symbol}} ≈ {{amount}}",BRIDGE:"移动 {{symbol}} ≈ {{amount}}",SUFFICIENT:"支付 {{symbol}} {{amount}}",delta:{SWAP:"交换 {{symbol}} ≈ {{amount}}",ONRAMP:"购买 {{symbol}} ≈ {{amount}}",BRIDGE:"移动 {{symbol}} ≈ {{amount}}",SUFFICIENT:"支付 {{symbol}} {{amount}}"}},fee:"费用 {{symbol}} ≈ {{amount}}"},orderReview:{heading:"付款摘要",continue:"继续",payWith:"使用{{symbol}}支付",balance:"余额{{amount}}"}},FUND_WITH_SMART_CHECKOUT:{loading:{checkingBalances:"正在计算数字"},currency:{usdEstimate:"≈ 美元 $",fees:"费用"},fundingRouteDrawer:{header:"可用余额"},fundingRouteSelect:{heading:"用您的支付",noRoutesAvailable:"硬币余额不足。请改用卡继续操作。",continue:"继续",payWithCardInstead:"不用了,我要用卡支付",payWithCard:"用卡支付"}},PAYMENT_METHODS:{header:{heading:"您希望如何支付?"},options:{crypto:{heading:"硬币",caption:"请用钱包里的硬币付款,或用卡购买硬币。",disabledCaption:"目前无法进行此购买。"},debit:{heading:"借记卡",caption:"使用卡支付的推荐方式。",disabledCaption:"我们正在处理此事。请使用硬币继续,如果需要,我们将指导您如何添加它们。"},credit:{heading:"信用卡",caption:"不推荐使用,因为您的银行可能会阻止交易。",disabledCaption:"我们正在处理此事。请使用硬币继续,如果需要,我们将指导您如何添加它们。"}},topUp:{heading:"您需要添加一些硬币",subheading:{both:"添加{{erc20.value}} {{erc20.symbol}}和{{native.value}} {{native.symbol}}以支付本次购买及燃气费。",erc20:"通过以下选项之一将{{erc20.value}} {{erc20.symbol}}添加到您的余额。",native:"通过以下选项之一,为燃气添加{{native.value}} {{native.symbol}}。"}},loading:{ready1:"正在收集您的订单",ready2:"正在与钱包交流",ready3:"正在准备资产",processing1:"正在初始化支付",processing2:"正在保护您的资产",processing3:"正在完成支付"},creditCardWarningDrawer:{heading:"我们推荐使用借记卡而非信用卡",body:"在这类购买中使用信用卡时,大多数银行将收取现金预付费用或完全阻止交易。",ctaButton:"尝试一下"}},PAY_WITH_COINS:{header:{heading:"用您的硬币支付",caption:"使用您钱包中的硬币余额"},button:{buyNow:"立即购买"}},PAY_WITH_CARD:{screenTitle:"用卡支付",loading:"带您前往Transak"},SALE_FAIL:{errors:{TRANSACTION_FAILED:{description:"交易失败",primaryAction:"再试一次",secondaryAction:"查看详情"},SERVICE_BREAKDOWN:{description:"抱歉,我们现在无法处理您的付款。请几分钟后再试。",secondaryAction:"关闭"},PRODUCT_NOT_FOUND:{description:"抱歉,所请求的数量缺货。请考虑购买较少数量。",secondaryAction:"关闭"},INSUFFICIENT_STOCK:{description:"抱歉,库存不足。请考虑购买较少数量。",secondaryAction:"关闭"},TRANSAK_FAILED:{description:"抱歉,出了点问题。请再试一次。",primaryAction:"再试一次",secondaryAction:"关闭"},WALLET_FAILED:{description:"抱歉,我们现在无法处理。请返回。",primaryAction:"返回",secondaryAction:"关闭"},WALLET_REJECTED_NO_FUNDS:{description:"抱歉,出了点问题。请再试一次。",primaryAction:"返回",secondaryAction:"关闭"},WALLET_REJECTED:{description:"您需要在钱包中批准交易才能继续。",primaryAction:"再试一次",secondaryAction:"取消"},WALLET_POPUP_BLOCKED:{description:"您需要允许浏览器中的弹出窗口才能继续。",primaryAction:"我已经解决了这个问题,再试一次",secondaryAction:"取消"},SMART_CHECKOUT_ERROR:{description:"无法检查您的钱包余额。请再试一次。",primaryAction:"再试一次",secondaryAction:"取消"},SMART_CHECKOUT_EXECUTE_ERROR:{description:"抱歉,转移资金时出错。请再试一次。",primaryAction:"再试一次",secondaryAction:"取消"},DEFAULT_ERROR:{description:"抱歉,出了点问题。请再试一次。",primaryAction:"再试一次",secondaryAction:"关闭"},INVALID_PARAMETERS:{description:"抱歉,我们无法处理您的订单。客户提供的信息不完整。",secondaryAction:"关闭"}}},SALE_SUCCESS:{text:"订单已完成",actionText:"继续"},WALLET_NETWORK_SELECTION:{layoutHeading:"转移资金",heading:"您想在哪两个地方之间转移资金?",fromFormInput:{heading:"从",selectDefaultText:"选择钱包和网络",walletSelectorHeading:"来自钱包",networkSelectorHeading:"来自网络"},toFormInput:{heading:"至",selectDefaultText:"选择钱包和网络",walletSelectorHeading:"至钱包"},submitButton:{text:"下一步"}},BRIDGE_FORM:{header:{title:"转移硬币"},fees:{title:"燃气费",fiatPricePrefix:"~ 美元 $"},content:{title:"您想要转移多少金额?",fiatPricePrefix:"约美元",availableBalancePrefix:"可用余额"},bridgeForm:{from:{inputPlaceholder:"0",selectorTitle:"您想要转移什么?"},buttonText:"审阅"},validation:{noAmountInputted:"请输入金额",insufficientBalance:"余额不足",noTokenSelected:"选择一个要转移的硬币"}},BRIDGE_REVIEW:{layoutHeading:"转移资金",heading:"这样看起来怎么样?",fromLabel:{amountHeading:"正在转移",heading:"从"},toLabel:{heading:"至"},fees:{heading:"燃气费"},submitButton:{buttonText:"确认转移"},fiatPricePrefix:"~ 美元 $"},BRIDGE_FAILURE:{bridgeFailureText:{statusText:"交易失败",actionText:"审查并重试"}},APPROVE_TRANSACTION:{content:{heading:"在您的钱包中批准交易",body:"按照钱包弹出窗口中的提示进行确认。"},footer:{buttonText:"好的",retryText:"再试一次"},loadingView:{text:"开始转移"}},IN_PROGRESS:{heading:"转移进行中",body1:"您的资金已经发送,距离收到不到20分钟。您可以点击火箭图标返回并查看进展。",body2:"您可以关闭这个窗口。"},TRANSACTIONS:{layoutHeading:"进行中",passportDashboard:"在您的完整交易历史中查看",status:{withdrawalPending:{actionButtonText:"继续",withdrawalDelayText:"此操作已暂停,请返回",withdrawalReadyText:"需要采取行动以收取您的硬币",caption:"已暂停"},inProgress:{heading:"进行中",txnEstimate:"通常需要20分钟",stepInfo:"查看详情"},emptyState:{notConnected:{body:"连接您的钱包以查看交易",buttonText:"连接"}},noTransactions:{body:"您已完成所有操作。",passport:{body:"在",link:"护照"}}},changeWallet:{buttonText:"更换钱包"},fiatPricePrefix:"≈ 美元 $",support:{body1:"需要帮助吗?",body2:" 联系 ",body3:"支持",supportLink:"https://support.immutable.com/en/",passport:{body1:"或在您的 ",body2:"护照"}},walletSelection:{heading:"选择要查看的钱包"}},CLAIM_WITHDRAWAL:{content:{heading:"按照提示在此处收取您的硬币",body:"您将被要求支付一笔小额燃气费以领取您的提款。",body2:"目标钱包地址:"},footer:{buttonText:"继续",retryText:"重试"},IN_PROGRESS:{loading:{text:"处理中"},success:{text:"成功",actionText:"完成"},failure:{text:"交易失败",actionText:"请重试"}}}},footers:{quickswapFooter:{disclaimerText:"Quickswap是第三方应用。Immutable不构建、拥有、操作或部署Quickswap。更多信息请参阅Quickswap的网站。"}},wallets:{passport:{heading:"Immutable Passport",description:"您的游戏钱包,可以用卡支付、管理物品等。"},metamask:{heading:"MetaMask",description:"用于访问区块链应用和web3的数字钱包。"},walletconnect:{heading:"其他钱包",description:"允许您连接任何区块链移动钱包,包括MetaMask。"},browserwallet:{heading:"浏览器钱包",description:"用于访问区块链应用和web3的数字钱包。"},recommended:"推荐"},drawers:{feesBreakdown:{heading:"费用分解",total:"费用总计",fees:{gas:{label:"燃气费"}}},transactionFailed:{content:{heading1:"在继续前我们需要您在钱包中确认",heading2:"钱包确认",body1:"当MetaMask弹出时,请确保",body2:"签署交易"},buttons:{retry:"明白了",cancel:"关闭"}},coinSelector:{option:{fiatPricePrefix:"约美元 $"},noCoins:"您的钱包中没有可用的硬币。"},notEnoughGas:{content:{heading:"您需要更多{{token}}来支付燃气费",body:"您的{{token}}余额不足以支付此操作的燃气费,因此在继续之前,您需要添加更多{{token}}。"},buttons:{adjustAmount:"调整金额",addMoreImx:"添加IMX币",copyAddress:"复制钱包地址",cancel:"关闭"}},notEnoughImx:{content:{noImx:{heading:"您需要IMX币来兑换",body:"兑换费用需要用IMX币支付,因此在您可以进行兑换之前需要添加此币"},insufficientImx:{heading:"您需要更多IMX币",body:"为了支付指定金额的费用,您需要添加更多IMX币"}},buttons:{adjustAmount:"调整金额",addMoreImx:"添加IMX币",cancel:"关闭"}},notEnoughEthWithdrawal:{content:{heading1:"不足",heading2:"用于燃气",body1:"添加",body2:"到您的目标账户,或选择另一个账户支付燃气费。您的目标账户将保持不变。"},buttons:{retry:"使用另一个账户支付燃气费",dismiss:"取消"}},unableToSwap:{heading:"无法兑换此币种",body:"现在无法兑换这种币对。请尝试选择其他币种。",buttons:{cancel:"关闭"}},networkSwitch:{heading:"在您的{{wallet}}中切换网络",manualSwitch:{body:"您需要打开您的移动钱包并切换到{{chain}}网络才能继续进行"},controlledSwitch:{body:"您需要切换到{{chain}}网络才能继续进行"},switchButton:"切换到{{chain}}"},walletConnectionError:{unableToConnect:{heading:"无法连接",body:"请检查您的钱包并重试,或关闭并尝试其他选项。",actionButtonText:"重试"},changedYourMind:{heading:"改变主意了吗?",body:"确保弹出窗口已启用,并按照钱包中的提示进行连接。",actionButtonText:"重试"}}}}}};var fUe;cje.use(aUe).use(Pje).init({fallbackLng:"en",resources:dUe,interpolation:{escapeValue:!1}});var pUe=RPe;fUe=pUe.createRoot,pUe.hydrateRoot;const hUe="development",mUe="native",yUe=18,bUe=6,gUe=700,vUe="IMX",wUe="ETH",TUe="https://support.immutable.com/en/",EUe={retryIntervalMs:1e4,retries:60,nonRetryable:e=>e?.data?.code>=500||e.type===$Z.GET_ERC20_BALANCE_ERROR,nonRetryableSilently:e=>e.type===$Z.WEB3_PROVIDER_ERROR},AUe={retryIntervalMs:1e4,retries:60,nonRetryableSilently:e=>!!e},xUe=qt.SANDBOX,OUe=NZ.DARK;WZ.METAMASK;const CUe=3e4,IUe={[hUe]:"https://checkout-cdn.dev.immutable.com",[qt.SANDBOX]:"https://checkout-cdn.sandbox.immutable.com",[qt.PRODUCTION]:"https://checkout-cdn.immutable.com"},SUe={[hUe]:"https://testnet.axelarscan.io/gmp/",[qt.SANDBOX]:"https://testnet.axelarscan.io/gmp/",[qt.PRODUCTION]:"https://axelarscan.io/gmp/"},_Ue={[hUe]:"https://passport.sandbox.immutable.com/",[qt.SANDBOX]:"https://passport.sandbox.immutable.com/",[qt.PRODUCTION]:"https://passport.immutable.com/"},PUe={[hUe]:"https://image-resizer-cache.dev.immutable.com",[qt.SANDBOX]:"https://image-resizer-cache.dev.immutable.com",[qt.PRODUCTION]:"https://image-resizer-cache.prod.immutable.com"},kUe=91e3;function RUe(e){return e&&Object.values(qt).includes(e)?e:xUe}function NUe(e,t){return t?"true"===t||"false"!==t&&e:e}const MUe=e=>e.isProduction?MZ.ETHEREUM:MZ.SEPOLIA,DUe=e=>e.isDevelopment?MZ.IMTBL_ZKEVM_DEVNET:e.isProduction?MZ.IMTBL_ZKEVM_MAINNET:MZ.IMTBL_ZKEVM_TESTNET,LUe={[MZ.IMTBL_ZKEVM_DEVNET]:"base.color.text.link.primary",[MZ.IMTBL_ZKEVM_TESTNET]:"base.color.text.link.primary",[MZ.IMTBL_ZKEVM_MAINNET]:"base.color.text.link.primary",[MZ.ETHEREUM]:"base.color.accent.5",[MZ.SEPOLIA]:"base.color.accent.5"},FUe={[MZ.IMTBL_ZKEVM_DEVNET]:"Immutable",[MZ.IMTBL_ZKEVM_MAINNET]:"Immutable",[MZ.IMTBL_ZKEVM_TESTNET]:"Immutable",[MZ.ETHEREUM]:"EthToken",[MZ.SEPOLIA]:"EthToken"},BUe={[MZ.IMTBL_ZKEVM_DEVNET]:DZ.IMTBL_ZKEVM_DEVNET,[MZ.IMTBL_ZKEVM_MAINNET]:DZ.IMTBL_ZKEVM_MAINNET,[MZ.IMTBL_ZKEVM_TESTNET]:DZ.IMTBL_ZKEVM_TESTNET,[MZ.ETHEREUM]:DZ.ETHEREUM,[MZ.SEPOLIA]:DZ.SEPOLIA},jUe="IMTBL_WIDGET_PROVIDER_EVENT";var UUe;function zUe(e,t){e.provider.on(UUe.CHAIN_CHANGED,t)}function HUe(e,t){e.provider.removeListener(UUe.CHAIN_CHANGED,t)}function WUe(){window.dispatchEvent(new CustomEvent(jUe))}function VUe(e){var t;t=WUe,e.provider.removeListener(UUe.ACCOUNTS_CHANGED,t),HUe(e,WUe),function(e,t){e.provider.on(UUe.ACCOUNTS_CHANGED,t)}(e,WUe),zUe(e,WUe)}function GUe(e){const t=new CustomEvent(TZ.IMTBL_WIDGETS_PROVIDER,{detail:{type:EZ.PROVIDER_UPDATED,data:e}});void 0!==window&&window.dispatchEvent(t)}!function(e){e.CHAIN_CHANGED="chainChanged",e.ACCOUNTS_CHANGED="accountsChanged"}(UUe||(UUe={}));class qUe{checkout;targetId;reactRoot;widgetElement;properties;parameters;web3Provider;eventHandlers=new Map;eventHandlersFunction;eventTopic="";constructor(e,t){const n=this.getValidatedProperties(t);this.parameters={},this.checkout=e,this.properties=n,this.web3Provider=t?.provider,this.web3Provider&&VUe(this.web3Provider),this.setupProviderUpdatedListener(),this.setupDisconnectProviderListener()}unmount(){this.parameters=this.getValidatedParameters({}),this.reactRoot?.unmount(),document.getElementById(this.targetId)?.replaceChildren(),this.reactRoot=void 0}mount(e,t){this.parameters=this.getValidatedParameters({...this.parameters??{},...t??{}}),this.targetId=e;const n=document.getElementById(e);this.widgetElement||(this.widgetElement=document.createElement("div")),0===n?.children.length?n?.appendChild(this.widgetElement):n?.replaceChildren(this.widgetElement),!this.reactRoot&&n&&this.widgetElement&&(this.reactRoot=fUe(this.widgetElement)),this.render()}update(e){this.properties=this.getValidatedProperties({config:{...this.properties.config??{},...e.config??{}}}),e.provider&&console.warn("Updating a widget provider through the update() method is not supported yet"),e.config?.language&&cje.changeLanguage(e.config.language).then((()=>{console.log("Language changed:",e.config?.language)})),this.render()}addListener(e,t){this.eventHandlers.set(e,t),this.eventHandlersFunction&&(window.removeEventListener(this.eventTopic,this.eventHandlersFunction),window.removeEventListener(TZ.IMTBL_WIDGETS_PROVIDER,this.eventHandlersFunction)),this.eventHandlersFunction=e=>{const t=this.eventHandlers.get(e.detail.type);t&&t(e.detail.data)},window.addEventListener(this.eventTopic,this.eventHandlersFunction),window.addEventListener(TZ.IMTBL_WIDGETS_PROVIDER,this.eventHandlersFunction)}removeListener(e){this.eventHandlers.delete(e),this.eventHandlersFunction&&(window.removeEventListener(this.eventTopic,this.eventHandlersFunction),window.removeEventListener(TZ.IMTBL_WIDGETS_PROVIDER,this.eventHandlersFunction)),this.eventHandlers.size<=0||(this.eventHandlersFunction=e=>{const t=this.eventHandlers.get(e.detail.type);t&&t(e.detail.data)},window.addEventListener(this.eventTopic,this.eventHandlersFunction),window.addEventListener(TZ.IMTBL_WIDGETS_PROVIDER,this.eventHandlersFunction))}strongConfig(){return e={theme:this.properties.config?.theme,environment:this.checkout.config.environment,isOnRampEnabled:this.checkout.config.isOnRampEnabled,isSwapEnabled:this.checkout.config.isSwapEnabled,isBridgeEnabled:this.checkout.config.isBridgeEnabled},{theme:(t=e?.theme,t&&Object.values(NZ).includes(t)?t:OUe),environment:RUe(e?.environment),isOnRampEnabled:NUe(!0,e?.isOnRampEnabled?.toString()),isSwapEnabled:NUe(!0,e?.isSwapEnabled?.toString()),isBridgeEnabled:NUe(!0,e?.isBridgeEnabled?.toString())};var e,t}setupProviderUpdatedListener(){window.addEventListener(TZ.IMTBL_WIDGETS_PROVIDER,this.handleProviderUpdatedEvent);const e=this;window.addEventListener(jUe,(()=>e.handleEIP1193ProviderEvents(e)))}setupDisconnectProviderListener(){window.addEventListener(TZ.IMTBL_WALLET_WIDGET_EVENT,this.handleDisconnectEvent)}handleEIP1193ProviderEvents(e){e.web3Provider&&(e.web3Provider=new Rp(e.web3Provider.provider)),e.render()}handleProviderUpdatedEvent=e=>{const t=this;switch(e.detail.type){case EZ.PROVIDER_UPDATED:{const n=e.detail.data;t.web3Provider=n.provider,this.render();break}}};handleDisconnectEvent=e=>{const t=this;if(e.detail.type===xZ.DISCONNECT_WALLET)t.web3Provider=void 0,this.render()}}const KUe=e$.lazy((()=>Promise.resolve().then((function(){return A1e}))));class XUe extends qUe{eventTopic=TZ.IMTBL_CONNECT_WIDGET_EVENT;getValidatedProperties({config:e}){return{config:e}}getValidatedParameters(e){const t=e;return!e.targetChainId&&this.checkout.config.isProduction?t.targetChainId=MZ.IMTBL_ZKEVM_MAINNET:e.targetChainId&&this.checkout.config.isProduction&&e.targetChainId!==MZ.ETHEREUM&&e.targetChainId!==MZ.IMTBL_ZKEVM_MAINNET&&(console.warn(`Cannot set targetChainId to ${e.targetChainId} in ${qt.PRODUCTION} environment, defaulting to ${EBe(MZ.IMTBL_ZKEVM_MAINNET)}, chainId ${MZ.IMTBL_ZKEVM_MAINNET}`),t.targetChainId=MZ.IMTBL_ZKEVM_MAINNET),e.targetChainId||this.checkout.config.environment!==qt.SANDBOX?e.targetChainId&&this.checkout.config.environment===qt.SANDBOX&&e.targetChainId!==MZ.SEPOLIA&&e.targetChainId!==MZ.IMTBL_ZKEVM_TESTNET&&(console.warn(`Cannot set targetChainId to ${e.targetChainId} in ${qt.SANDBOX} environment, defaulting to ${EBe(MZ.IMTBL_ZKEVM_TESTNET)}, chainId ${MZ.IMTBL_ZKEVM_TESTNET}`),t.targetChainId=MZ.IMTBL_ZKEVM_TESTNET):t.targetChainId=MZ.IMTBL_ZKEVM_TESTNET,e}render(){if(!this.reactRoot)return;const{t:e}=cje;this.reactRoot.render(y1(e$.StrictMode,{children:y1(vBe,{checkout:this.checkout,children:y1(bRe,{id:"connect-container",config:this.strongConfig(),children:y1($Q.Suspense,{fallback:y1(TBe,{loadingText:e("views.LOADING_VIEW.text")}),children:y1(KUe,{config:this.strongConfig(),checkout:this.checkout,targetWalletRdns:this.parameters.targetWalletRdns,targetChainId:this.parameters.targetChainId,blocklistWalletRdns:this.parameters.blocklistWalletRdns})})})})}))}}const YUe={width:"100%",display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",padding:"base.spacing.x4",paddingBottom:"base.spacing.x10"},JUe={maxHeight:"base.spacing.x20",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",paddingTop:"base.spacing.x4",paddingBottom:"base.spacing.x5"},ZUe={width:"base.icon.size.400"},QUe={display:"flex",flexDirection:"column",paddingX:"base.spacing.x4",paddingBottom:"base.spacing.x4"},$Ue={display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"base.spacing.x2",color:"base.color.text.body.primary"},eze={display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",color:"base.color.text.body.secondary"};function tze({actionText:e,onActionClick:t,hideActionButton:n=!1,loading:r=!1,variant:i="secondary"}){return y1(Rae,{testId:"footer-button-container",sx:YUe,children:!n&&y1(Oae,{testId:"footer-button",size:"large",sx:{width:"100%"},variant:i,disabled:r,onClick:t,children:r?y1(Oae.Icon,{icon:"Loading",sx:ZUe}):e})})}const nze=e=>({backgroundColor:e?"transparent":""}),rze=(e=!1)=>({backgroundColor:e?"base.color.translucent.standard.200":""});var ize;!function(e){e.LOADING_VIEW="LOADING_VIEW",e.ERROR_VIEW="ERROR_VIEW",e.SERVICE_UNAVAILABLE_ERROR_VIEW="SERVICE_UNAVAILABLE_ERROR_VIEW",e.TOP_UP_VIEW="TOP_UP_VIEW"}(ize||(ize={}));const aze={view:{type:ize.LOADING_VIEW},history:[]};var oze;!function(e){e.UPDATE_VIEW="UPDATE_VIEW",e.GO_BACK="GO_BACK",e.GO_BACK_TO="GO_BACK_TO"}(oze||(oze={}));const sze=$Q.createContext({viewState:aze,viewDispatch:()=>{}});sze.displayName="ViewContext";const cze=(e,t)=>{switch(t.payload.type){case oze.UPDATE_VIEW:{const{view:n,currentViewData:r}=t.payload;n.type===ize.ERROR_VIEW&&console.error(n.error);const{history:i}=e;return 0!==i.length&&i[i.length-1].type===n.type||(r&&(i[i.length-1]={...i[i.length-1],data:r}),i.push(n)),{...e,view:n,history:i}}case oze.GO_BACK:{if(e.history.length<=1)return{...e};const t=e.history.slice(0,-1);return{...e,history:t,view:t[t.length-1]}}case oze.GO_BACK_TO:{if(e.history.length<=1)return{...e};const{history:n}=e,r=[...n];let i=!1;for(let a=n.length-1;a>=0;a--){if(e.history[a].type===t.payload.view.type){i=!0;break}r.pop()}return i?{...e,history:r,view:r[r.length-1]}:{...e}}default:return e}};function uze({title:e,showBack:t=!1,transparent:n=!1,onBackButtonClick:r,onCloseButtonClick:i,rightActions:a}){const{viewDispatch:o}=$Q.useContext(sze);return b1(pme,{testId:"header-navigation-container",sx:nze(n),contentAlign:t?"center":"left",size:"small",children:[t&&y1(pme.LeftButtCon,{sx:rze(n),icon:"ArrowBackward",iconVariant:"bold",onClick:()=>{r?r():(async()=>{o({payload:{type:oze.GO_BACK}})})()},testId:"back-button"}),y1(pme.Title,{testId:"header-title",size:"small",children:e}),b1(pme.RightSlot,{children:[a,i&&y1(coe,{iconVariant:"bold",sx:rze(n),icon:"Close",onClick:i,testId:"close-button"})]})]})}const lze={position:"absolute",top:"0",left:"0",height:"100%",width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},dze={justifyContent:"flex-end"},fze={position:"relative",height:"305px",width:"100%"};function pze(){return b1(Rae,{sx:fze,children:[b1("svg",{width:"430",height:"306",viewBox:"0 0 430 306",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y1("rect",{x:"-1",y:"0.978516",width:"446",height:"305",fill:"url(#paint0_linear_3034_48563)"}),y1("defs",{children:b1("linearGradient",{id:"paint0_linear_3034_48563",x1:"222",y1:"0.978516",x2:"222",y2:"305.979",gradientUnits:"userSpaceOnUse",children:[y1("stop",{stopColor:"#01003F",stopOpacity:"0"}),y1("stop",{offset:"1",stopColor:"#6B4292",stopOpacity:"0.432292"})]})})]}),y1(Rae,{sx:lze,children:b1("svg",{width:"174",height:"180",viewBox:"0 0 174 180",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y1("path",{opacity:"0.5",d:"M135.919 70.8386C136.877 67.1564 136.676 62.3424 133.109 57.2929C129.543 52.2434 125.073 50.4446 121.282 50.116",stroke:"#443F58",strokeLinecap:"round",strokeLinejoin:"round"}),y1("path",{opacity:"0.5",d:"M128.95 72.1044C129.792 69.2107 129.738 65.4595 127.01 61.5982C124.283 57.7368 120.766 56.4311 117.757 56.2577",stroke:"#443F58",strokeLinecap:"round",strokeLinejoin:"round"}),y1("rect",{x:"49.3672",y:"30.5654",width:"49.9943",height:"27.6088",rx:"2.10366",transform:"rotate(54.7665 49.3672 30.5654)",fill:"url(#paint0_linear_2795_41752)"}),y1("g",{filter:"url(#filter0_d_2795_41752)",children:y1("circle",{cx:"118.481",cy:"67.6248",r:"2.23855",transform:"rotate(54.7665 118.481 67.6248)",fill:"#D0D2E2"})}),y1("path",{d:"M47.6489 31.7791L28.5344 45.2796C27.5854 45.9499 27.3595 47.2625 28.0297 48.2115L48.5554 77.2724L54.7482 38.184L50.5808 32.2837C49.9105 31.3347 48.5979 31.1088 47.6489 31.7791Z",fill:"#D9D9D9",fillOpacity:"0.1"}),y1("line",{x1:"63.724",y1:"50.8925",x2:"41.1729",y2:"66.8203",stroke:"#1E182A",strokeWidth:"0.525916"}),y1("line",{x1:"67.0235",y1:"79.3011",x2:"38.1813",y2:"38.4654",stroke:"#1E182A",strokeWidth:"0.525916"}),y1("line",{x1:"55.9759",y1:"39.9228",x2:"33.4249",y2:"55.8506",stroke:"#1E182A",strokeWidth:"0.525916"}),y1("line",{x1:"71.0423",y1:"61.2538",x2:"48.4913",y2:"77.1816",stroke:"#1E182A",strokeWidth:"0.525916"}),y1("rect",{x:"101.025",y:"103.704",width:"49.9943",height:"27.6088",rx:"2.10366",transform:"rotate(54.7665 101.025 103.704)",fill:"url(#paint1_linear_2795_41752)"}),y1("line",{x1:"115.384",y1:"124.032",x2:"92.8331",y2:"139.96",stroke:"#1E182A",strokeWidth:"0.525916"}),y1("line",{x1:"118.684",y1:"152.44",x2:"89.8414",y2:"111.604",stroke:"#1E182A",strokeWidth:"0.525916"}),y1("line",{x1:"107.632",y1:"113.06",x2:"85.0811",y2:"128.988",stroke:"#1E182A",strokeWidth:"0.525916"}),y1("line",{x1:"122.702",y1:"134.393",x2:"100.151",y2:"150.321",stroke:"#1E182A",strokeWidth:"0.525916"}),y1("path",{d:"M96.3684 97.1098C97.0387 98.0588 96.8127 99.3715 95.8637 100.042L53.3683 130.056C50.5214 132.067 46.5834 131.389 44.5726 128.542L35.9266 116.301C33.9158 113.454 34.5936 109.516 37.4406 107.505L79.936 77.4907C80.8849 76.8204 82.1976 77.0464 82.8679 77.9953L96.3684 97.1098Z",fill:"url(#paint2_linear_2795_41752)"}),y1("path",{d:"M123.831 88.136C124.166 88.6105 124.053 89.2668 123.578 89.6019L123.336 89.7733C113.846 96.476 100.719 94.2165 94.0166 84.7267L93.7517 84.3516C87.049 74.8617 89.3085 61.7351 98.7983 55.0325L99.041 54.8611C99.5154 54.526 100.172 54.6389 100.507 55.1134L123.831 88.136Z",fill:"url(#paint3_linear_2795_41752)"}),b1("defs",{children:[b1("filter",{id:"filter0_d_2795_41752",x:"114.664",y:"63.808",width:"7.63206",height:"7.63303",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[y1("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),y1("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),y1("feMorphology",{radius:"0.525916",operator:"dilate",in:"SourceAlpha",result:"effect1_dropShadow_2795_41752"}),y1("feOffset",{}),y1("feGaussianBlur",{stdDeviation:"0.525916"}),y1("feComposite",{in2:"hardAlpha",operator:"out"}),y1("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.384314 0 0 0 0 0.4 0 0 0 0 0.580392 0 0 0 1 0"}),y1("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2795_41752"}),y1("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2795_41752",result:"shape"})]}),b1("linearGradient",{id:"paint0_linear_2795_41752",x1:"53.8443",y1:"29.4462",x2:"98.6153",y2:"58.1742",gradientUnits:"userSpaceOnUse",children:[y1("stop",{stopColor:"#8395E5",stopOpacity:"0.44"}),y1("stop",{offset:"0.526042",stopColor:"#989AD1",stopOpacity:"0.734583"}),y1("stop",{offset:"1",stopColor:"#2D203D"})]}),b1("linearGradient",{id:"paint1_linear_2795_41752",x1:"105.502",y1:"102.585",x2:"150.273",y2:"131.313",gradientUnits:"userSpaceOnUse",children:[y1("stop",{stopColor:"#8395E5",stopOpacity:"0.44"}),y1("stop",{offset:"0.526042",stopColor:"#989AD1",stopOpacity:"0.734583"}),y1("stop",{offset:"1",stopColor:"#2D203D"})]}),b1("linearGradient",{id:"paint2_linear_2795_41752",x1:"88.8945",y1:"89.2396",x2:"42.7826",y2:"120.454",gradientUnits:"userSpaceOnUse",children:[y1("stop",{stopColor:"#7676A3"}),y1("stop",{offset:"1",stopColor:"#EDEFF5"})]}),b1("linearGradient",{id:"paint3_linear_2795_41752",x1:"112.599",y1:"72.2342",x2:"91.9662",y2:"86.3506",gradientUnits:"userSpaceOnUse",children:[y1("stop",{stopColor:"#DEDFEB"}),y1("stop",{offset:"0.916667",stopColor:"#656997"})]})]})]})})]})}const hze={paddingX:"base.spacing.x4",paddingTop:"base.spacing.x10"},mze={marginTop:"base.spacing.x3"},yze={color:"base.color.text.body.secondary"};function bze(e){const{heading:t,children:n}=e;return b1(Rae,{sx:hze,children:[y1($ue,{testId:"simple-text-body__heading",size:"small",children:t}),y1(Rae,{sx:mze,children:y1(Uce,{testId:"simple-text-body__body",size:"small",sx:yze,children:n})})]})}function gze({actionText:e,onActionClick:t,errorEventAction:n,errorEventActionLoading:r=!1,onCloseClick:i}){const{t:a}=lUe();"function"==typeof n&&n();return y1(wBe,{header:y1(uze,{transparent:!0,onCloseButtonClick:i}),footer:y1(tze,{loading:r,actionText:e,onActionClick:()=>"function"==typeof t&&t()}),heroContent:y1(pze,{}),floatHeader:!0,testId:"error-view",children:b1(bze,{heading:a("views.ERROR_VIEW.heading"),children:[a("views.ERROR_VIEW.body",{returnObjects:!0})[0]," ",y1(Ohe,{size:"small",rc:y1("a",{href:"https://support.immutable.com/en/"}),children:a("views.ERROR_VIEW.body",{returnObjects:!0})[1]})," ",a("views.ERROR_VIEW.body",{returnObjects:!0})[2]]})})}var vze;!function(e){e.NOT_CONNECTED_NO_PROVIDER="NOT_CONNECTED_NO_PROVIDER",e.NOT_CONNECTED="NOT_CONNECTED",e.CONNECTED_WRONG_NETWORK="CONNECTED_WRONG_NETWORK",e.CONNECTED_WITH_NETWORK="CONNECTED_WITH_NETWORK",e.ERROR="ERROR",e.LOADING="LOADING"}(vze||(vze={}));const wze={connectionStatus:vze.LOADING,checkout:void 0,provider:void 0};var Tze;!function(e){e.UPDATE_CONNECTION_STATUS="UPDATE_CONNECTION_STATUS",e.SET_CHECKOUT="SET_CHECKOUT",e.SET_PROVIDER="SET_PROVIDER"}(Tze||(Tze={}));const Eze=$Q.createContext({connectLoaderState:wze,connectLoaderDispatch:()=>{}}),Aze=(e,t)=>{switch(t.payload.type){case Tze.UPDATE_CONNECTION_STATUS:return{...e,connectionStatus:t.payload.connectionStatus,deepLink:t.payload.deepLink};case Tze.SET_CHECKOUT:return{...e,checkout:t.payload.checkout};case Tze.SET_PROVIDER:return{...e,provider:t.payload.provider};default:return e}},xze=(e,t,n)=>e.chainId===DUe(n)?-1:e.chainId===MUe(n)?0:1,Oze=e=>(Math.round(100*e)/100).toFixed(2),Cze=(e,t,n,r="0.00")=>{if(!e)return r;const i=n.get(t.toLowerCase());if(!i)return r;const a=parseFloat(e);return 0===parseFloat(e)||Number.isNaN(a)?r:Oze(a*i)},Ize=(e,t=!1)=>{const n="-.--";return e&&("0.00"!==e||t)?e:n},Sze=(e,t)=>{const n=e.indexOf(".");return parseFloat(e.substring(0,n+t+1)).toFixed(t)},_ze=(e,t=6)=>{const n=e.toString();if(-1===n.indexOf("."))return n;if("."===n[0]||0===parseInt(n[0],10)){let e=Math.min(t,6),r=Sze(n,e);if(0===parseFloat(r))for(;"0"===(r[r.length-1]||"")&&e<t&&(e+=1,r=Sze(n,e),"0"===(r[r.length-1]||"")););return r}let r=Sze(n,2);return r.endsWith(".00")&&(r=Sze(r,0)),r},Pze=e=>e===MZ.IMTBL_ZKEVM_DEVNET||e===MZ.IMTBL_ZKEVM_TESTNET||e===MZ.IMTBL_ZKEVM_MAINNET,kze=e=>e===MZ.SEPOLIA||e===MZ.ETHEREUM,Rze=e=>!e||e.toLocaleLowerCase()===mUe;function Nze(e,t){return`${IUe[e??qt.PRODUCTION]}/v1/blob/img${t}`}function Mze(e,t){return Nze(e,`/tokens/${t.toLowerCase()}.svg`)}function Dze(e,t){return t===NZ.LIGHT?Nze(e,"/tokens/defaultonlight.svg"):Nze(e,"/tokens/defaultondark.svg")}const Lze={checkout:null,provider:null,passport:void 0,walletProviderInfo:null,walletProviderName:null,sendCloseEvent:()=>{}};var Fze;!function(e){e.SET_CHECKOUT="SET_CHECKOUT",e.SET_PROVIDER="SET_PROVIDER",e.SET_PASSPORT="SET_PASSPORT",e.SET_WALLET_PROVIDER_NAME="SET_WALLET_PROVIDER_NAME",e.SET_SEND_CLOSE_EVENT="SET_SEND_CLOSE_EVENT"}(Fze||(Fze={}));const Bze=$Q.createContext({connectState:Lze,connectDispatch:()=>{}});Bze.displayName="ConnectContext";const jze=(e,t)=>{switch(t.payload.type){case Fze.SET_CHECKOUT:return{...e,checkout:t.payload.checkout};case Fze.SET_PROVIDER:return{...e,provider:t.payload.provider};case Fze.SET_PASSPORT:return{...e,passport:t.payload.passport};case Fze.SET_WALLET_PROVIDER_NAME:return{...e,walletProviderName:t.payload.walletProviderName};case Fze.SET_SEND_CLOSE_EVENT:return{...e,sendCloseEvent:t.payload.sendCloseEvent};default:return e}};var Uze;function zze({hideLogo:e}){return y1(Rae,{testId:"footer-logo-container",sx:JUe,children:!e&&y1(Oie,{testId:"footer-logo-image",logo:"ImmutableHorizontalLockup",sx:{width:"base.spacing.x25"}})})}function Hze({visible:e,checkout:t,onCloseDrawer:n,onTryAgain:r}){const{t:i}=lUe(),a=Nze(t.config.environment??qt.PRODUCTION,"/walleterroryellow.svg");return y1(Ide,{size:"threeQuarter",visible:e,onCloseDrawer:n,showHeaderBar:!1,children:b1(Ide.Content,{testId:"unable-to-connect-bottom-sheet",sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center"},children:[b1(Rae,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center"},children:[y1(Ose,{imageUrl:a,imageResizeServiceUrl:PUe[t.config.environment],sx:{paddingTop:"base.spacing.x4",paddingBottom:"base.spacing.x9"}}),y1(coe,{icon:"Close",variant:"tertiary",sx:{pos:"absolute",top:"base.spacing.x5",left:"base.spacing.x5",backdropFilter:"blur(30px)"},onClick:n}),b1(Rae,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"base.spacing.x4",paddingX:"base.spacing.x6"},children:[y1($ue,{size:"medium",weight:"bold",sx:{textAlign:"center",paddingX:"base.spacing.x6"},children:i("drawers.walletConnectionError.unableToConnect.heading")}),y1(Uce,{size:"medium",weight:"regular",sx:{color:"base.color.text.body.secondary",textAlign:"center",paddingX:"base.spacing.x6"},children:i("drawers.walletConnectionError.unableToConnect.body")})]})]}),y1(Rae,{sx:{display:"flex",flexDirection:"column",paddingX:"base.spacing.x6",width:"100%"},children:y1(Oae,{size:"large",variant:"primary",sx:{width:"100%",marginBottom:"base.spacing.x10"},onClick:r,children:i("drawers.walletConnectionError.unableToConnect.actionButtonText")})})]})})}function Wze({visible:e,checkout:t,onCloseDrawer:n,onTryAgain:r}){const{t:i}=lUe(),a=Nze(t.config.environment??qt.PRODUCTION,"/walleterrorred.svg");return y1(Ide,{size:"threeQuarter",visible:e,onCloseDrawer:n,showHeaderBar:!1,children:b1(Ide.Content,{testId:"changed-your-mind-bottom-sheet",sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center"},children:[b1(Rae,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center"},children:[y1(Ose,{imageUrl:a,imageResizeServiceUrl:PUe[t.config.environment],sx:{paddingTop:"base.spacing.x4",paddingBottom:"base.spacing.x9"}}),y1(coe,{icon:"Close",variant:"tertiary",sx:{pos:"absolute",top:"base.spacing.x5",left:"base.spacing.x5",backdropFilter:"blur(30px)"},onClick:n}),b1(Rae,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"base.spacing.x4",paddingX:"base.spacing.x6"},children:[y1($ue,{size:"medium",weight:"bold",sx:{textAlign:"center",paddingX:"base.spacing.x6"},children:i("drawers.walletConnectionError.changedYourMind.heading")}),y1(Uce,{size:"medium",weight:"regular",sx:{color:"base.color.text.body.secondary",textAlign:"center",paddingX:"base.spacing.x6"},children:i("drawers.walletConnectionError.changedYourMind.body")})]})]}),y1(Rae,{sx:{display:"flex",flexDirection:"column",paddingX:"base.spacing.x6",width:"100%"},children:y1(Oae,{size:"large",variant:"primary",sx:{width:"100%",marginBottom:"base.spacing.x10"},onClick:r,children:i("drawers.walletConnectionError.changedYourMind.actionButtonText")})})]})})}!function(e){e.CONNECT_WALLET="CONNECT_WALLET",e.PASSPORT="PASSPORT",e.SWITCH_NETWORK="SWITCH_NETWORK",e.SUCCESS="SUCCESS"}(Uze||(Uze={}));const Vze={minw:"16px",padding:"8px",display:"flex",bg:"base.color.translucent.standard.100",overflow:"hidden",borderRadius:"4px",objectFit:"cover",objectPosition:"center",backgroundColor:"base.color.translucent.standard.200",justifyContent:"center",alignItems:"center",flexShrink:0,width:"48px",height:"48px"},Gze={width:"auto",height:"100%",objectFit:"contain",objectPosition:"50% 50%"};function qze({src:e,alt:t,sx:n={},...r}){return y1(Rae,{className:"FramedImage AspectRatioImage",sx:{...Vze,...n},rc:y1("span",{}),...r,children:y1("img",{src:e,alt:t,className:"CloudImage",style:Mte(Gze),loading:"lazy"})})}function Kze(e){return!0===e?.provider?.isPassport}function Xze(e){return!0===e?.provider?.isMetaMask}function Yze(e){return!0===e?.provider?.isWalletConnect}function Jze(e,t){if(Xze(e))return WZ.METAMASK.toString();if(Kze(e))return WZ.PASSPORT.toString();if(Yze(e))return"walletconnect";if(t&&e){const n=t.find((t=>t.provider===e.provider));if(n)return n.info.name}return"Other"}function Zze(e){let t="";switch(e){case"com.immutable.passport":t="passport";break;case"io.metamask":t="metamask";break;case"com.coinbase.wallet":t="coinbase-wallet";break;default:t=e}return t}async function Qze(e,t,n){let r=!1,i=t;try{const{isConnected:n}=await e.checkIsWalletConnected({provider:t});r=n}catch(e){throw console.error(e),e}if(!r||n)try{const{provider:a}=await e.connect({provider:t,requestWalletPermissions:n});i=a,r=!0}catch(e){throw e.type===$Z.USER_REJECTED_REQUEST_ERROR&&console.log("User rejected request"),console.error(e),e}return i}function $ze({rc:e=y1("span",{}),loading:t=!1,recommended:n=!1,providerDetail:r,onWalletItemClick:i}){const{t:a}=lUe(),{isSmallScreenMode:o}=function(){const{state:e}=kie((e=>e.width));return{isSmallScreenMode:"number"==typeof e&&e<aRe.breakpoint.medium}}(),[s,c]=$Q.useState(!1),u=Zze(r.info.rdns),l=u===WZ.PASSPORT||u===WZ.METAMASK,d={marginLeft:"65px"};return b1(rhe,{rc:$Q.cloneElement(e,{onClick:async()=>{if(!t){c(!0);try{await i(r)}finally{c(!1)}}}}),testId:`wallet-list-${r.info.rdns}`,size:"medium",emphasized:!0,sx:{marginBottom:"base.spacing.x1",position:"relative"},children:[y1(qze,{src:r.info.icon,alt:r.info.name,sx:{position:"absolute",left:"base.spacing.x3"}}),y1(rhe.Label,{size:"medium",sx:d,children:r.info.name}),!s&&y1(rhe.IntentIcon,{}),y1(rhe.Caption,{sx:{...d,width:"200px"},children:l&&a(`wallets.${u}.description`)}),(n||s)&&y1(rhe.Badge,{variant:"guidance",isAnimated:s,badgeContent:s||o?"":a("wallets.recommended")})]})}const eHe=Symbol(),tHe=Object.getPrototypeOf,nHe=new WeakMap,rHe=e=>(e=>e&&(nHe.has(e)?nHe.get(e):tHe(e)===Object.prototype||tHe(e)===Array.prototype))(e)&&e[eHe]||null,iHe=(e,t=!0)=>{nHe.set(e,t)},aHe=e=>"object"==typeof e&&null!==e,oHe=new WeakMap,sHe=new WeakSet,[cHe]=((e=Object.is,t=((e,t)=>new Proxy(e,t)),n=(e=>aHe(e)&&!sHe.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)),r=(e=>{switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e}}),i=new WeakMap,a=((e,t,n=r)=>{const o=i.get(e);if((null==o?void 0:o[0])===t)return o[1];const s=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return iHe(s,!0),i.set(e,[t,s]),Reflect.ownKeys(e).forEach((t=>{if(Object.getOwnPropertyDescriptor(s,t))return;const r=Reflect.get(e,t),i={value:r,enumerable:!0,configurable:!0};if(sHe.has(r))iHe(r,!1);else if(r instanceof Promise)delete i.value,i.get=()=>n(r);else if(oHe.has(r)){const[e,t]=oHe.get(r);i.value=a(e,t(),n)}Object.defineProperty(s,t,i)})),Object.preventExtensions(s)}),o=new WeakMap,s=[1,1],c=(r=>{if(!aHe(r))throw new Error("object required");const i=o.get(r);if(i)return i;let u=s[0];const l=new Set,d=(e,t=++s[0])=>{u!==t&&(u=t,l.forEach((n=>n(e,t))))};let f=s[1];const p=e=>(t,n)=>{const r=[...t];r[1]=[e,...r[1]],d(r,n)},h=new Map,m=e=>{var t;const n=h.get(e);n&&(h.delete(e),null==(t=n[1])||t.call(n))},y=Array.isArray(r)?[]:Object.create(Object.getPrototypeOf(r)),b={deleteProperty(e,t){const n=Reflect.get(e,t);m(t);const r=Reflect.deleteProperty(e,t);return r&&d(["delete",[t],n]),r},set(t,r,i,a){const s=Reflect.has(t,r),u=Reflect.get(t,r,a);if(s&&(e(u,i)||o.has(i)&&e(u,o.get(i))))return!0;m(r),aHe(i)&&(i=rHe(i)||i);let f=i;if(i instanceof Promise)i.then((e=>{i.status="fulfilled",i.value=e,d(["resolve",[r],e])})).catch((e=>{i.status="rejected",i.reason=e,d(["reject",[r],e])}));else{!oHe.has(i)&&n(i)&&(f=c(i));const e=!sHe.has(f)&&oHe.get(f);e&&((e,t)=>{if(h.has(e))throw new Error("prop listener already exists");if(l.size){const n=t[3](p(e));h.set(e,[t,n])}else h.set(e,[t])})(r,e)}return Reflect.set(t,r,f,a),d(["set",[r],i,u]),!0}},g=t(y,b);o.set(r,g);const v=[y,(e=++s[1])=>(f===e||l.size||(f=e,h.forEach((([t])=>{const n=t[1](e);n>u&&(u=n)}))),u),a,e=>{l.add(e),1===l.size&&h.forEach((([e,t],n)=>{if(t)throw new Error("remove already exists");const r=e[3](p(n));h.set(n,[e,r])}));return()=>{l.delete(e),0===l.size&&h.forEach((([e,t],n)=>{t&&(t(),h.set(n,[e]))}))}}];return oHe.set(g,v),Reflect.ownKeys(r).forEach((e=>{const t=Object.getOwnPropertyDescriptor(r,e);"value"in t&&(g[e]=r[e],delete t.value,delete t.writable),Object.defineProperty(y,e,t)})),g}))=>[c,oHe,sHe,e,t,n,r,i,a,o,s])();function uHe(e={}){return cHe(e)}function lHe(e,t,n){const r=oHe.get(e);let i;r||console.warn("Please use proxy object");const a=[],o=r[3];let s=!1;const c=o((e=>{a.push(e),n?t(a.splice(0)):i||(i=Promise.resolve().then((()=>{i=void 0,s&&t(a.splice(0))})))}));return s=!0,()=>{s=!1,c()}}const dHe=uHe({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),fHe={state:dHe,subscribe:e=>lHe(dHe,(()=>e(dHe))),push(e,t){e!==dHe.view&&(dHe.view=e,t&&(dHe.data=t),dHe.history.push(e))},reset(e){dHe.view=e,dHe.history=[e]},replace(e){dHe.history.length>1&&(dHe.history[dHe.history.length-1]=e,dHe.view=e)},goBack(){if(dHe.history.length>1){dHe.history.pop();const[e]=dHe.history.slice(-1);dHe.view=e}},setData(e){dHe.data=e}},pHe={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile:()=>typeof window<"u"&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),isAndroid:()=>pHe.isMobile()&&navigator.userAgent.toLowerCase().includes("android"),isIos(){const e=navigator.userAgent.toLowerCase();return pHe.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),isArray:e=>Array.isArray(e)&&e.length>0,formatNativeUrl(e,t,n){if(pHe.isHttpUrl(e))return this.formatUniversalUrl(e,t,n);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,n);return`${r}wc?uri=${encodeURIComponent(t)}`},formatUniversalUrl(e,t,n){if(!pHe.isHttpUrl(e))return this.formatNativeUrl(e,t,n);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,n);return`${r}wc?uri=${encodeURIComponent(t)}`},wait:async e=>new Promise((t=>{setTimeout(t,e)})),openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(pHe.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(pHe.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(pHe.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(pHe.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=null==(e=fHe.state.data)?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},hHe=uHe({enabled:typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),userSessionId:"",events:[],connectedWalletId:void 0}),mHe={state:hHe,subscribe:e=>lHe(hHe.events,(()=>e(function(e,t){const n=oHe.get(e);n||console.warn("Please use proxy object");const[r,i,a]=n;return a(r,i(),t)}(hHe.events[hHe.events.length-1])))),initialize(){hHe.enabled&&typeof(null==crypto?void 0:crypto.randomUUID)<"u"&&(hHe.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){hHe.connectedWalletId=e},click(e){if(hHe.enabled){const t={type:"CLICK",name:e.name,userSessionId:hHe.userSessionId,timestamp:Date.now(),data:e};hHe.events.push(t)}},track(e){if(hHe.enabled){const t={type:"TRACK",name:e.name,userSessionId:hHe.userSessionId,timestamp:Date.now(),data:e};hHe.events.push(t)}},view(e){if(hHe.enabled){const t={type:"VIEW",name:e.name,userSessionId:hHe.userSessionId,timestamp:Date.now(),data:e};hHe.events.push(t)}}},yHe=uHe({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),bHe={state:yHe,subscribe:e=>lHe(yHe,(()=>e(yHe))),setChains(e){yHe.chains=e},setWalletConnectUri(e){yHe.walletConnectUri=e},setIsCustomDesktop(e){yHe.isCustomDesktop=e},setIsCustomMobile(e){yHe.isCustomMobile=e},setIsDataLoaded(e){yHe.isDataLoaded=e},setIsUiLoaded(e){yHe.isUiLoaded=e},setIsAuth(e){yHe.isAuth=e}},gHe=uHe({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),vHe={state:gHe,subscribe:e=>lHe(gHe,(()=>e(gHe))),setConfig(e){var t,n;mHe.initialize(),bHe.setChains(e.chains),bHe.setIsAuth(Boolean(e.enableAuthMode)),bHe.setIsCustomMobile(Boolean(null==(t=e.mobileWallets)?void 0:t.length)),bHe.setIsCustomDesktop(Boolean(null==(n=e.desktopWallets)?void 0:n.length)),pHe.setModalVersionInStorage(),Object.assign(gHe,e)}};var wHe=Object.defineProperty,THe=Object.getOwnPropertySymbols,EHe=Object.prototype.hasOwnProperty,AHe=Object.prototype.propertyIsEnumerable,xHe=(e,t,n)=>t in e?wHe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const OHe="https://explorer-api.walletconnect.com",CHe="wcm",IHe="js-2.6.2";async function SHe(e,t){const n=((e,t)=>{for(var n in t||(t={}))EHe.call(t,n)&&xHe(e,n,t[n]);if(THe)for(var n of THe(t))AHe.call(t,n)&&xHe(e,n,t[n]);return e})({sdkType:CHe,sdkVersion:IHe},t),r=new URL(e,OHe);return r.searchParams.append("projectId",vHe.state.projectId),Object.entries(n).forEach((([e,t])=>{t&&r.searchParams.append(e,String(t))})),(await fetch(r)).json()}const _He={getDesktopListings:async e=>SHe("/w3m/v1/getDesktopListings",e),getMobileListings:async e=>SHe("/w3m/v1/getMobileListings",e),getInjectedListings:async e=>SHe("/w3m/v1/getInjectedListings",e),getAllListings:async e=>SHe("/w3m/v1/getAllListings",e),getWalletImageUrl:e=>`${OHe}/w3m/v1/getWalletImage/${e}?projectId=${vHe.state.projectId}&sdkType=${CHe}&sdkVersion=${IHe}`,getAssetImageUrl:e=>`${OHe}/w3m/v1/getAssetImage/${e}?projectId=${vHe.state.projectId}&sdkType=${CHe}&sdkVersion=${IHe}`};var PHe=Object.defineProperty,kHe=Object.getOwnPropertySymbols,RHe=Object.prototype.hasOwnProperty,NHe=Object.prototype.propertyIsEnumerable,MHe=(e,t,n)=>t in e?PHe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const DHe=pHe.isMobile(),LHe=uHe({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),FHe={state:LHe,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=vHe.state;if("NONE"===e||"ALL"===t&&!e)return LHe.recomendedWallets;if(pHe.isArray(e)){const t={recommendedIds:e.join(",")},{listings:n}=await _He.getAllListings(t),r=Object.values(n);r.sort(((t,n)=>e.indexOf(t.id)-e.indexOf(n.id))),LHe.recomendedWallets=r}else{const{chains:e,isAuth:n}=bHe.state,r=e?.join(","),i=pHe.isArray(t),a={page:1,sdks:n?"auth_v1":void 0,entries:pHe.RECOMMENDED_WALLET_AMOUNT,chains:r,version:2,excludedIds:i?t.join(","):void 0},{listings:o}=DHe?await _He.getMobileListings(a):await _He.getDesktopListings(a);LHe.recomendedWallets=Object.values(o)}return LHe.recomendedWallets},async getWallets(e){const t=((e,t)=>{for(var n in t||(t={}))RHe.call(t,n)&&MHe(e,n,t[n]);if(kHe)for(var n of kHe(t))NHe.call(t,n)&&MHe(e,n,t[n]);return e})({},e),{explorerRecommendedWalletIds:n,explorerExcludedWalletIds:r}=vHe.state,{recomendedWallets:i}=LHe;if("ALL"===r)return LHe.wallets;i.length?t.excludedIds=i.map((e=>e.id)).join(","):pHe.isArray(n)&&(t.excludedIds=n.join(",")),pHe.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),bHe.state.isAuth&&(t.sdks="auth_v1");const{page:a,search:o}=e,{listings:s,total:c}=DHe?await _He.getMobileListings(t):await _He.getDesktopListings(t),u=Object.values(s),l=o?"search":"wallets";return LHe[l]={listings:[...LHe[l].listings,...u],total:c,page:a??1},{listings:u,total:c}},getWalletImageUrl:e=>_He.getWalletImageUrl(e),getAssetImageUrl:e=>_He.getAssetImageUrl(e),resetSearch(){LHe.search={listings:[],total:0,page:1}}},BHe=uHe({open:!1}),jHe={state:BHe,subscribe:e=>lHe(BHe,(()=>e(BHe))),open:async e=>new Promise((t=>{const{isUiLoaded:n,isDataLoaded:r}=bHe.state;if(pHe.removeWalletConnectDeepLink(),bHe.setWalletConnectUri(e?.uri),bHe.setChains(e?.chains),fHe.reset("ConnectWallet"),n&&r)BHe.open=!0,t();else{const e=setInterval((()=>{const n=bHe.state;n.isUiLoaded&&n.isDataLoaded&&(clearInterval(e),BHe.open=!0,t())}),200)}})),close(){BHe.open=!1}};var UHe=Object.defineProperty,zHe=Object.getOwnPropertySymbols,HHe=Object.prototype.hasOwnProperty,WHe=Object.prototype.propertyIsEnumerable,VHe=(e,t,n)=>t in e?UHe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const GHe=uHe({themeMode:typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}),qHe={state:GHe,subscribe:e=>lHe(GHe,(()=>e(GHe))),setThemeConfig(e){const{themeMode:t,themeVariables:n}=e;t&&(GHe.themeMode=t),n&&(GHe.themeVariables=((e,t)=>{for(var n in t||(t={}))HHe.call(t,n)&&VHe(e,n,t[n]);if(zHe)for(var n of zHe(t))WHe.call(t,n)&&VHe(e,n,t[n]);return e})({},n))}},KHe=uHe({open:!1,message:"",variant:"success"}),XHe={state:KHe,subscribe:e=>lHe(KHe,(()=>e(KHe))),openToast(e,t){KHe.open=!0,KHe.message=e,KHe.variant=t},closeToast(){KHe.open=!1}};let YHe=class{constructor(e){this.openModal=jHe.open,this.closeModal=jHe.close,this.subscribeModal=jHe.subscribe,this.setTheme=qHe.setThemeConfig,qHe.setThemeConfig(e),vHe.setConfig(e),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then((function(){return Ant}));const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),bHe.setIsUiLoaded(!0)}}};var JHe=Object.freeze({__proto__:null,WalletConnectModal:YHe});function ZHe(){}function QHe(){QHe.init.call(this)}function $He(e){return void 0===e._maxListeners?QHe.defaultMaxListeners:e._maxListeners}function eWe(e,t,n,r){var i,a,o;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((a=e._events)?(a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]):(a=e._events=new ZHe,e._eventsCount=0),o){if("function"==typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),!o.warned&&(i=$He(e))&&i>0&&o.length>i){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(s)}}else o=a[t]=n,++e._eventsCount;return e}function tWe(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 nWe(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 rWe(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}ZHe.prototype=Object.create(null),QHe.EventEmitter=QHe,QHe.usingDomains=!1,QHe.prototype.domain=void 0,QHe.prototype._events=void 0,QHe.prototype._maxListeners=void 0,QHe.defaultMaxListeners=10,QHe.init=function(){this.domain=null,QHe.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new ZHe,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},QHe.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},QHe.prototype.getMaxListeners=function(){return $He(this)},QHe.prototype.emit=function(e){var t,n,r,i,a,o,s,c="error"===e;if(o=this._events)c=c&&null==o.error;else if(!c)return!1;if(s=this.domain,c){if(t=arguments[1],!s){if(t instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}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=o[e]))return!1;var l="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=rWe(e,r),a=0;a<r;++a)i[a].call(n)}(n,l,this);break;case 2:!function(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,a=rWe(e,i),o=0;o<i;++o)a[o].call(n,r)}(n,l,this,arguments[1]);break;case 3:!function(e,t,n,r,i){if(t)e.call(n,r,i);else for(var a=e.length,o=rWe(e,a),s=0;s<a;++s)o[s].call(n,r,i)}(n,l,this,arguments[1],arguments[2]);break;case 4:!function(e,t,n,r,i,a){if(t)e.call(n,r,i,a);else for(var o=e.length,s=rWe(e,o),c=0;c<o;++c)s[c].call(n,r,i,a)}(n,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),a=1;a<r;a++)i[a-1]=arguments[a];!function(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,a=rWe(e,i),o=0;o<i;++o)a[o].apply(n,r)}(n,l,this,i)}return!0},QHe.prototype.addListener=function(e,t){return eWe(this,e,t,!1)},QHe.prototype.on=QHe.prototype.addListener,QHe.prototype.prependListener=function(e,t){return eWe(this,e,t,!0)},QHe.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,tWe(this,e,t)),this},QHe.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,tWe(this,e,t)),this},QHe.prototype.removeListener=function(e,t){var n,r,i,a,o;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 ZHe:(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new ZHe,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,o||t)}return this},QHe.prototype.off=function(e,t){return this.removeListener(e,t)},QHe.prototype.removeAllListeners=function(e){var t,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new ZHe,this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=new ZHe:delete n[e]),this;if(0===arguments.length){for(var r,i=Object.keys(n),a=0;a<i.length;++a)"removeListener"!==(r=i[a])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new ZHe,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},QHe.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},QHe.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):nWe.call(e,t)},QHe.prototype.listenerCount=nWe,QHe.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var iWe=Object.freeze({__proto__:null,EventEmitter:QHe,default:QHe}),aWe={},oWe={},sWe={},cWe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mul=Math.imul||function(e,t){var n=65535&e,r=65535&t;return n*r+((e>>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},e.add=function(e,t){return e+t|0},e.sub=function(e,t){return e-t|0},e.rotl=function(e,t){return e<<t|e>>>32-t},e.rotr=function(e,t){return e<<32-t|e>>>t},e.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}}(cWe),Object.defineProperty(sWe,"__esModule",{value:!0});var uWe=cWe;function lWe(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}function dWe(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}function fWe(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function pWe(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function hWe(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function mWe(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function yWe(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function bWe(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function gWe(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),yWe(e/4294967296>>>0,t,n),yWe(e>>>0,t,n+4),t}function vWe(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),bWe(e>>>0,t,n),bWe(e/4294967296>>>0,t,n+4),t}sWe.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},sWe.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},sWe.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},sWe.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},sWe.writeUint16BE=lWe,sWe.writeInt16BE=lWe,sWe.writeUint16LE=dWe,sWe.writeInt16LE=dWe,sWe.readInt32BE=fWe,sWe.readUint32BE=pWe,sWe.readInt32LE=hWe,sWe.readUint32LE=mWe,sWe.writeUint32BE=yWe,sWe.writeInt32BE=yWe,sWe.writeUint32LE=bWe,sWe.writeInt32LE=bWe,sWe.readInt64BE=function(e,t){void 0===t&&(t=0);var n=fWe(e,t),r=fWe(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},sWe.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*pWe(e,t)+pWe(e,t+4)},sWe.readInt64LE=function(e,t){void 0===t&&(t=0);var n=hWe(e,t);return 4294967296*hWe(e,t+4)+n-4294967296*(n>>31)},sWe.readUint64LE=function(e,t){void 0===t&&(t=0);var n=mWe(e,t);return 4294967296*mWe(e,t+4)+n},sWe.writeUint64BE=gWe,sWe.writeInt64BE=gWe,sWe.writeUint64LE=vWe,sWe.writeInt64LE=vWe,sWe.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,a=e/8+n-1;a>=n;a--)r+=t[a]*i,i*=256;return r},sWe.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,a=n;a<n+e/8;a++)r+=t[a]*i,i*=256;return r},sWe.writeUintBE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!uWe.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var i=1,a=e/8+r-1;a>=r;a--)n[a]=t/i&255,i*=256;return n},sWe.writeUintLE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!uWe.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,a=r;a<r+e/8;a++)n[a]=t/i&255,i*=256;return n},sWe.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},sWe.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},sWe.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},sWe.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},sWe.writeFloat32BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e),t},sWe.writeFloat32LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e,!0),t},sWe.writeFloat64BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e),t},sWe.writeFloat64LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e,!0),t};var wWe={};Object.defineProperty(wWe,"__esModule",{value:!0}),wWe.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e},Object.defineProperty(oWe,"__esModule",{value:!0});var TWe=sWe,EWe=wWe,AWe=20;function xWe(e,t,n){for(var r=1634760805,i=857760878,a=2036477234,o=1797285236,s=n[3]<<24|n[2]<<16|n[1]<<8|n[0],c=n[7]<<24|n[6]<<16|n[5]<<8|n[4],u=n[11]<<24|n[10]<<16|n[9]<<8|n[8],l=n[15]<<24|n[14]<<16|n[13]<<8|n[12],d=n[19]<<24|n[18]<<16|n[17]<<8|n[16],f=n[23]<<24|n[22]<<16|n[21]<<8|n[20],p=n[27]<<24|n[26]<<16|n[25]<<8|n[24],h=n[31]<<24|n[30]<<16|n[29]<<8|n[28],m=t[3]<<24|t[2]<<16|t[1]<<8|t[0],y=t[7]<<24|t[6]<<16|t[5]<<8|t[4],b=t[11]<<24|t[10]<<16|t[9]<<8|t[8],g=t[15]<<24|t[14]<<16|t[13]<<8|t[12],v=r,w=i,T=a,E=o,A=s,x=c,O=u,C=l,I=d,S=f,_=p,P=h,k=m,R=y,N=b,M=g,D=0;D<AWe;D+=2)A=(A^=I=I+(k=(k^=v=v+A|0)>>>16|k<<16)|0)>>>20|A<<12,x=(x^=S=S+(R=(R^=w=w+x|0)>>>16|R<<16)|0)>>>20|x<<12,O=(O^=_=_+(N=(N^=T=T+O|0)>>>16|N<<16)|0)>>>20|O<<12,C=(C^=P=P+(M=(M^=E=E+C|0)>>>16|M<<16)|0)>>>20|C<<12,O=(O^=_=_+(N=(N^=T=T+O|0)>>>24|N<<8)|0)>>>25|O<<7,C=(C^=P=P+(M=(M^=E=E+C|0)>>>24|M<<8)|0)>>>25|C<<7,x=(x^=S=S+(R=(R^=w=w+x|0)>>>24|R<<8)|0)>>>25|x<<7,A=(A^=I=I+(k=(k^=v=v+A|0)>>>24|k<<8)|0)>>>25|A<<7,x=(x^=_=_+(M=(M^=v=v+x|0)>>>16|M<<16)|0)>>>20|x<<12,O=(O^=P=P+(k=(k^=w=w+O|0)>>>16|k<<16)|0)>>>20|O<<12,C=(C^=I=I+(R=(R^=T=T+C|0)>>>16|R<<16)|0)>>>20|C<<12,A=(A^=S=S+(N=(N^=E=E+A|0)>>>16|N<<16)|0)>>>20|A<<12,C=(C^=I=I+(R=(R^=T=T+C|0)>>>24|R<<8)|0)>>>25|C<<7,A=(A^=S=S+(N=(N^=E=E+A|0)>>>24|N<<8)|0)>>>25|A<<7,O=(O^=P=P+(k=(k^=w=w+O|0)>>>24|k<<8)|0)>>>25|O<<7,x=(x^=_=_+(M=(M^=v=v+x|0)>>>24|M<<8)|0)>>>25|x<<7;TWe.writeUint32LE(v+r|0,e,0),TWe.writeUint32LE(w+i|0,e,4),TWe.writeUint32LE(T+a|0,e,8),TWe.writeUint32LE(E+o|0,e,12),TWe.writeUint32LE(A+s|0,e,16),TWe.writeUint32LE(x+c|0,e,20),TWe.writeUint32LE(O+u|0,e,24),TWe.writeUint32LE(C+l|0,e,28),TWe.writeUint32LE(I+d|0,e,32),TWe.writeUint32LE(S+f|0,e,36),TWe.writeUint32LE(_+p|0,e,40),TWe.writeUint32LE(P+h|0,e,44),TWe.writeUint32LE(k+m|0,e,48),TWe.writeUint32LE(R+y|0,e,52),TWe.writeUint32LE(N+b|0,e,56),TWe.writeUint32LE(M+g|0,e,60)}function OWe(e,t,n,r,i){if(void 0===i&&(i=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(r.length<n.length)throw new Error("ChaCha: destination is shorter than source");var a,o;if(0===i){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");o=(a=new Uint8Array(16)).length-t.length,a.set(t,o)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");a=t,o=i}for(var s=new Uint8Array(64),c=0;c<n.length;c+=64){xWe(s,a,e);for(var u=c;u<c+64&&u<n.length;u++)r[u]=n[u]^s[u-c];CWe(a,0,o)}return EWe.wipe(s),0===i&&EWe.wipe(a),r}function CWe(e,t,n){for(var r=1;n--;)r=r+(255&e[t])|0,e[t]=255&r,r>>>=8,t++;if(r>0)throw new Error("ChaCha: counter overflow")}oWe.streamXOR=OWe,oWe.stream=function(e,t,n,r){return void 0===r&&(r=0),EWe.wipe(n),OWe(e,t,n,n,r)};var IWe={},SWe={};function _We(e,t){if(e.length!==t.length)return 0;for(var n=0,r=0;r<e.length;r++)n|=e[r]^t[r];return 1&n-1>>>8}Object.defineProperty(SWe,"__esModule",{value:!0}),SWe.select=function(e,t,n){return~(e-1)&t|e-1&n},SWe.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},SWe.compare=_We,SWe.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==_We(e,t)},function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=SWe,n=wWe;e.DIGEST_LENGTH=16;var r=function(){function t(t){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var n=t[0]|t[1]<<8;this._r[0]=8191&n;var r=t[2]|t[3]<<8;this._r[1]=8191&(n>>>13|r<<3);var i=t[4]|t[5]<<8;this._r[2]=7939&(r>>>10|i<<6);var a=t[6]|t[7]<<8;this._r[3]=8191&(i>>>7|a<<9);var o=t[8]|t[9]<<8;this._r[4]=255&(a>>>4|o<<12),this._r[5]=o>>>1&8190;var s=t[10]|t[11]<<8;this._r[6]=8191&(o>>>14|s<<2);var c=t[12]|t[13]<<8;this._r[7]=8065&(s>>>11|c<<5);var u=t[14]|t[15]<<8;this._r[8]=8191&(c>>>8|u<<8),this._r[9]=u>>>5&127,this._pad[0]=t[16]|t[17]<<8,this._pad[1]=t[18]|t[19]<<8,this._pad[2]=t[20]|t[21]<<8,this._pad[3]=t[22]|t[23]<<8,this._pad[4]=t[24]|t[25]<<8,this._pad[5]=t[26]|t[27]<<8,this._pad[6]=t[28]|t[29]<<8,this._pad[7]=t[30]|t[31]<<8}return t.prototype._blocks=function(e,t,n){for(var r=this._fin?0:2048,i=this._h[0],a=this._h[1],o=this._h[2],s=this._h[3],c=this._h[4],u=this._h[5],l=this._h[6],d=this._h[7],f=this._h[8],p=this._h[9],h=this._r[0],m=this._r[1],y=this._r[2],b=this._r[3],g=this._r[4],v=this._r[5],w=this._r[6],T=this._r[7],E=this._r[8],A=this._r[9];n>=16;){var x=e[t+0]|e[t+1]<<8;i+=8191&x;var O=e[t+2]|e[t+3]<<8;a+=8191&(x>>>13|O<<3);var C=e[t+4]|e[t+5]<<8;o+=8191&(O>>>10|C<<6);var I=e[t+6]|e[t+7]<<8;s+=8191&(C>>>7|I<<9);var S=e[t+8]|e[t+9]<<8;c+=8191&(I>>>4|S<<12),u+=S>>>1&8191;var _=e[t+10]|e[t+11]<<8;l+=8191&(S>>>14|_<<2);var P=e[t+12]|e[t+13]<<8;d+=8191&(_>>>11|P<<5);var k=e[t+14]|e[t+15]<<8,R=0,N=R;N+=i*h,N+=a*(5*A),N+=o*(5*E),N+=s*(5*T),R=(N+=c*(5*w))>>>13,N&=8191,N+=u*(5*v),N+=l*(5*g),N+=d*(5*b),N+=(f+=8191&(P>>>8|k<<8))*(5*y);var M=R+=(N+=(p+=k>>>5|r)*(5*m))>>>13;M+=i*m,M+=a*h,M+=o*(5*A),M+=s*(5*E),R=(M+=c*(5*T))>>>13,M&=8191,M+=u*(5*w),M+=l*(5*v),M+=d*(5*g),M+=f*(5*b),R+=(M+=p*(5*y))>>>13,M&=8191;var D=R;D+=i*y,D+=a*m,D+=o*h,D+=s*(5*A),R=(D+=c*(5*E))>>>13,D&=8191,D+=u*(5*T),D+=l*(5*w),D+=d*(5*v),D+=f*(5*g);var L=R+=(D+=p*(5*b))>>>13;L+=i*b,L+=a*y,L+=o*m,L+=s*h,R=(L+=c*(5*A))>>>13,L&=8191,L+=u*(5*E),L+=l*(5*T),L+=d*(5*w),L+=f*(5*v);var F=R+=(L+=p*(5*g))>>>13;F+=i*g,F+=a*b,F+=o*y,F+=s*m,R=(F+=c*h)>>>13,F&=8191,F+=u*(5*A),F+=l*(5*E),F+=d*(5*T),F+=f*(5*w);var B=R+=(F+=p*(5*v))>>>13;B+=i*v,B+=a*g,B+=o*b,B+=s*y,R=(B+=c*m)>>>13,B&=8191,B+=u*h,B+=l*(5*A),B+=d*(5*E),B+=f*(5*T);var j=R+=(B+=p*(5*w))>>>13;j+=i*w,j+=a*v,j+=o*g,j+=s*b,R=(j+=c*y)>>>13,j&=8191,j+=u*m,j+=l*h,j+=d*(5*A),j+=f*(5*E);var U=R+=(j+=p*(5*T))>>>13;U+=i*T,U+=a*w,U+=o*v,U+=s*g,R=(U+=c*b)>>>13,U&=8191,U+=u*y,U+=l*m,U+=d*h,U+=f*(5*A);var z=R+=(U+=p*(5*E))>>>13;z+=i*E,z+=a*T,z+=o*w,z+=s*v,R=(z+=c*g)>>>13,z&=8191,z+=u*b,z+=l*y,z+=d*m,z+=f*h;var H=R+=(z+=p*(5*A))>>>13;H+=i*A,H+=a*E,H+=o*T,H+=s*w,R=(H+=c*v)>>>13,H&=8191,H+=u*g,H+=l*b,H+=d*y,H+=f*m,i=N=8191&(R=(R=((R+=(H+=p*h)>>>13)<<2)+R|0)+(N&=8191)|0),a=M+=R>>>=13,o=D&=8191,s=L&=8191,c=F&=8191,u=B&=8191,l=j&=8191,d=U&=8191,f=z&=8191,p=H&=8191,t+=16,n-=16}this._h[0]=i,this._h[1]=a,this._h[2]=o,this._h[3]=s,this._h[4]=c,this._h[5]=u,this._h[6]=l,this._h[7]=d,this._h[8]=f,this._h[9]=p},t.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,i,a,o=new Uint16Array(10);if(this._leftover){for(a=this._leftover,this._buffer[a++]=1;a<16;a++)this._buffer[a]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,a=2;a<10;a++)this._h[a]+=n,n=this._h[a]>>>13,this._h[a]&=8191;for(this._h[0]+=5*n,n=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=n,n=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=n,o[0]=this._h[0]+5,n=o[0]>>>13,o[0]&=8191,a=1;a<10;a++)o[a]=this._h[a]+n,n=o[a]>>>13,o[a]&=8191;for(o[9]-=8192,r=(1^n)-1,a=0;a<10;a++)o[a]&=r;for(r=~r,a=0;a<10;a++)this._h[a]=this._h[a]&r|o[a];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,a=1;a<8;a++)i=(this._h[a]+this._pad[a]|0)+(i>>>16)|0,this._h[a]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(e){var t,n=0,r=e.length;if(this._leftover){(t=16-this._leftover)>r&&(t=r);for(var i=0;i<t;i++)this._buffer[this._leftover+i]=e[n+i];if(r-=t,n+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(r>=16&&(t=r-r%16,this._blocks(e,n,t),n+=t,r-=t),r){for(i=0;i<r;i++)this._buffer[this._leftover+i]=e[n+i];this._leftover+=r}return this},t.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},t.prototype.clean=function(){return n.wipe(this._buffer),n.wipe(this._r),n.wipe(this._h),n.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},t}();e.Poly1305=r,e.oneTimeAuth=function(e,t){var n=new r(e);n.update(t);var i=n.digest();return n.clean(),i},e.equal=function(n,r){return n.length===e.DIGEST_LENGTH&&r.length===e.DIGEST_LENGTH&&t.equal(n,r)}}(IWe),function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=oWe,n=IWe,r=wWe,i=sWe,a=SWe;e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var o=new Uint8Array(16),s=function(){function s(t){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,t.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(t)}return s.prototype.seal=function(e,n,i,a){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var o=new Uint8Array(16);o.set(e,o.length-e.length);var s=new Uint8Array(32);t.stream(this._key,o,s,4);var c,u=n.length+this.tagLength;if(a){if(a.length!==u)throw new Error("ChaCha20Poly1305: incorrect destination length");c=a}else c=new Uint8Array(u);return t.streamXOR(this._key,o,n,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),s,c.subarray(0,c.length-this.tagLength),i),r.wipe(o),c},s.prototype.open=function(e,n,i,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(n.length<this.tagLength)return null;var s=new Uint8Array(16);s.set(e,s.length-e.length);var c=new Uint8Array(32);t.stream(this._key,s,c,4);var u=new Uint8Array(this.tagLength);if(this._authenticate(u,c,n.subarray(0,n.length-this.tagLength),i),!a.equal(u,n.subarray(n.length-this.tagLength,n.length)))return null;var l,d=n.length-this.tagLength;if(o){if(o.length!==d)throw new Error("ChaCha20Poly1305: incorrect destination length");l=o}else l=new Uint8Array(d);return t.streamXOR(this._key,s,n.subarray(0,n.length-this.tagLength),l,4),r.wipe(s),l},s.prototype.clean=function(){return r.wipe(this._key),this},s.prototype._authenticate=function(e,t,a,s){var c=new n.Poly1305(t);s&&(c.update(s),s.length%16>0&&c.update(o.subarray(s.length%16))),c.update(a),a.length%16>0&&c.update(o.subarray(a.length%16));var u=new Uint8Array(8);s&&i.writeUint64LE(s.length,u),c.update(u),i.writeUint64LE(a.length,u),c.update(u);for(var l=c.digest(),d=0;d<l.length;d++)e[d]=l[d];c.clean(),r.wipe(l),r.wipe(u)},s}();e.ChaCha20Poly1305=s}(aWe);var PWe={},kWe={},RWe={};Object.defineProperty(RWe,"__esModule",{value:!0}),RWe.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState},Object.defineProperty(kWe,"__esModule",{value:!0});var NWe=RWe,MWe=SWe,DWe=wWe,LWe=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var r=0;r<n.length;r++)n[r]^=54;this._inner.update(n);for(r=0;r<n.length;r++)n[r]^=106;this._outer.update(n),NWe.isSerializableHash(this._inner)&&NWe.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),DWe.wipe(n)}return e.prototype.reset=function(){if(!NWe.isSerializableHash(this._inner)||!NWe.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){NWe.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),NWe.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!NWe.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!NWe.isSerializableHash(this._inner)||!NWe.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!NWe.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();kWe.HMAC=LWe,kWe.hmac=function(e,t,n){var r=new LWe(e,t);r.update(n);var i=r.digest();return r.clean(),i},kWe.equal=MWe.equal,Object.defineProperty(PWe,"__esModule",{value:!0});var FWe=kWe,BWe=wWe,jWe=function(){function e(e,t,n,r){void 0===n&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=r;var i=FWe.hmac(this._hash,n,t);this._hmac=new FWe.HMAC(e,i),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;n<t.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[n]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),BWe.wipe(this._buffer),BWe.wipe(this._counter),this._bufpos=0},e}(),UWe=PWe.HKDF=jWe,zWe={},HWe={},WWe={};Object.defineProperty(WWe,"__esModule",{value:!0}),WWe.BrowserRandomSource=void 0;WWe.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let e=0;e<t.length;e+=65536)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,65536)));return t}};var VWe={};Object.defineProperty(VWe,"__esModule",{value:!0}),VWe.NodeRandomSource=void 0;const GWe=wWe;VWe.NodeRandomSource=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,void 0!==zK){const e=VK;e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let e=0;e<n.length;e++)n[e]=t[e];return(0,GWe.wipe)(t),n}},Object.defineProperty(HWe,"__esModule",{value:!0}),HWe.SystemRandomSource=void 0;const qWe=WWe,KWe=VWe;HWe.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new qWe.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new KWe.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const t=HWe,n=sWe,r=wWe;function i(t,n=e.defaultRandomSource){return n.randomBytes(t)}e.defaultRandomSource=new t.SystemRandomSource,e.randomBytes=i,e.randomUint32=function(t=e.defaultRandomSource){const a=i(4,t),o=(0,n.readUint32LE)(a);return(0,r.wipe)(a),o};const a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function o(t,n=a,o=e.defaultRandomSource){if(n.length<2)throw new Error("randomString charset is too short");if(n.length>256)throw new Error("randomString charset is too long");let s="";const c=n.length,u=256-256%c;for(;t>0;){const e=i(Math.ceil(256*t/u),o);for(let r=0;r<e.length&&t>0;r++){const i=e[r];i<u&&(s+=n.charAt(i%c),t--)}(0,r.wipe)(e)}return s}e.randomString=o,e.randomStringForEntropy=function(t,n=a,r=e.defaultRandomSource){return o(Math.ceil(t/(Math.log(n.length)/Math.LN2)),n,r)}}(zWe);var XWe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=sWe,n=wWe;e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var r=function(){function r(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return r.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},r.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},r.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._temp),this.reset()},r.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(a(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=a(this._temp,this._state,e,n,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[n++],t--;return this},r.prototype.finish=function(e){if(!this._finished){var n=this._bytesHashed,r=this._bufferLength,i=n/536870912|0,o=n<<3,s=n%64<56?64:128;this._buffer[r]=128;for(var c=r+1;c<s-8;c++)this._buffer[c]=0;t.writeUint32BE(i,this._buffer,s-8),t.writeUint32BE(o,this._buffer,s-4),a(this._temp,this._state,this._buffer,0,s),this._finished=!0}for(c=0;c<this.digestLength/4;c++)t.writeUint32BE(this._state[c],e,4*c);return this},r.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},r.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},r.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},r.prototype.cleanSavedState=function(e){n.wipe(e.state),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},r}();e.SHA256=r;var i=new Int32Array([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 a(e,n,r,a,o){for(;o>=64;){for(var s=n[0],c=n[1],u=n[2],l=n[3],d=n[4],f=n[5],p=n[6],h=n[7],m=0;m<16;m++){var y=a+4*m;e[m]=t.readUint32BE(r,y)}for(m=16;m<64;m++){var b=e[m-2],g=(b>>>17|b<<15)^(b>>>19|b<<13)^b>>>10,v=((b=e[m-15])>>>7|b<<25)^(b>>>18|b<<14)^b>>>3;e[m]=(g+e[m-7]|0)+(v+e[m-16]|0)}for(m=0;m<64;m++){g=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&f^~d&p)|0)+(h+(i[m]+e[m]|0)|0)|0,v=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&c^s&u^c&u)|0;h=p,p=f,f=d,d=l+g|0,l=u,u=c,c=s,s=g+v|0}n[0]+=s,n[1]+=c,n[2]+=u,n[3]+=l,n[4]+=d,n[5]+=f,n[6]+=p,n[7]+=h,a+=64,o-=64}return a}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}}(XWe);var YWe={};function JWe(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function ZWe(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?JWe(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function QWe(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const n=ZWe(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return JWe(n)}!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;const t=zWe,n=wWe;function r(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;const i=new Uint8Array(32);i[0]=9;const a=r([56129,1]);function o(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function s(e,t,n){const r=~(n-1);for(let n=0;n<16;n++){const i=r&(e[n]^t[n]);e[n]^=i,t[n]^=i}}function c(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function u(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function l(e,t,n){let r,i,a=0,o=0,s=0,c=0,u=0,l=0,d=0,f=0,p=0,h=0,m=0,y=0,b=0,g=0,v=0,w=0,T=0,E=0,A=0,x=0,O=0,C=0,I=0,S=0,_=0,P=0,k=0,R=0,N=0,M=0,D=0,L=n[0],F=n[1],B=n[2],j=n[3],U=n[4],z=n[5],H=n[6],W=n[7],V=n[8],G=n[9],q=n[10],K=n[11],X=n[12],Y=n[13],J=n[14],Z=n[15];r=t[0],a+=r*L,o+=r*F,s+=r*B,c+=r*j,u+=r*U,l+=r*z,d+=r*H,f+=r*W,p+=r*V,h+=r*G,m+=r*q,y+=r*K,b+=r*X,g+=r*Y,v+=r*J,w+=r*Z,r=t[1],o+=r*L,s+=r*F,c+=r*B,u+=r*j,l+=r*U,d+=r*z,f+=r*H,p+=r*W,h+=r*V,m+=r*G,y+=r*q,b+=r*K,g+=r*X,v+=r*Y,w+=r*J,T+=r*Z,r=t[2],s+=r*L,c+=r*F,u+=r*B,l+=r*j,d+=r*U,f+=r*z,p+=r*H,h+=r*W,m+=r*V,y+=r*G,b+=r*q,g+=r*K,v+=r*X,w+=r*Y,T+=r*J,E+=r*Z,r=t[3],c+=r*L,u+=r*F,l+=r*B,d+=r*j,f+=r*U,p+=r*z,h+=r*H,m+=r*W,y+=r*V,b+=r*G,g+=r*q,v+=r*K,w+=r*X,T+=r*Y,E+=r*J,A+=r*Z,r=t[4],u+=r*L,l+=r*F,d+=r*B,f+=r*j,p+=r*U,h+=r*z,m+=r*H,y+=r*W,b+=r*V,g+=r*G,v+=r*q,w+=r*K,T+=r*X,E+=r*Y,A+=r*J,x+=r*Z,r=t[5],l+=r*L,d+=r*F,f+=r*B,p+=r*j,h+=r*U,m+=r*z,y+=r*H,b+=r*W,g+=r*V,v+=r*G,w+=r*q,T+=r*K,E+=r*X,A+=r*Y,x+=r*J,O+=r*Z,r=t[6],d+=r*L,f+=r*F,p+=r*B,h+=r*j,m+=r*U,y+=r*z,b+=r*H,g+=r*W,v+=r*V,w+=r*G,T+=r*q,E+=r*K,A+=r*X,x+=r*Y,O+=r*J,C+=r*Z,r=t[7],f+=r*L,p+=r*F,h+=r*B,m+=r*j,y+=r*U,b+=r*z,g+=r*H,v+=r*W,w+=r*V,T+=r*G,E+=r*q,A+=r*K,x+=r*X,O+=r*Y,C+=r*J,I+=r*Z,r=t[8],p+=r*L,h+=r*F,m+=r*B,y+=r*j,b+=r*U,g+=r*z,v+=r*H,w+=r*W,T+=r*V,E+=r*G,A+=r*q,x+=r*K,O+=r*X,C+=r*Y,I+=r*J,S+=r*Z,r=t[9],h+=r*L,m+=r*F,y+=r*B,b+=r*j,g+=r*U,v+=r*z,w+=r*H,T+=r*W,E+=r*V,A+=r*G,x+=r*q,O+=r*K,C+=r*X,I+=r*Y,S+=r*J,_+=r*Z,r=t[10],m+=r*L,y+=r*F,b+=r*B,g+=r*j,v+=r*U,w+=r*z,T+=r*H,E+=r*W,A+=r*V,x+=r*G,O+=r*q,C+=r*K,I+=r*X,S+=r*Y,_+=r*J,P+=r*Z,r=t[11],y+=r*L,b+=r*F,g+=r*B,v+=r*j,w+=r*U,T+=r*z,E+=r*H,A+=r*W,x+=r*V,O+=r*G,C+=r*q,I+=r*K,S+=r*X,_+=r*Y,P+=r*J,k+=r*Z,r=t[12],b+=r*L,g+=r*F,v+=r*B,w+=r*j,T+=r*U,E+=r*z,A+=r*H,x+=r*W,O+=r*V,C+=r*G,I+=r*q,S+=r*K,_+=r*X,P+=r*Y,k+=r*J,R+=r*Z,r=t[13],g+=r*L,v+=r*F,w+=r*B,T+=r*j,E+=r*U,A+=r*z,x+=r*H,O+=r*W,C+=r*V,I+=r*G,S+=r*q,_+=r*K,P+=r*X,k+=r*Y,R+=r*J,N+=r*Z,r=t[14],v+=r*L,w+=r*F,T+=r*B,E+=r*j,A+=r*U,x+=r*z,O+=r*H,C+=r*W,I+=r*V,S+=r*G,_+=r*q,P+=r*K,k+=r*X,R+=r*Y,N+=r*J,M+=r*Z,r=t[15],w+=r*L,T+=r*F,E+=r*B,A+=r*j,x+=r*U,O+=r*z,C+=r*H,I+=r*W,S+=r*V,_+=r*G,P+=r*q,k+=r*K,R+=r*X,N+=r*Y,M+=r*J,D+=r*Z,a+=38*T,o+=38*E,s+=38*A,c+=38*x,u+=38*O,l+=38*C,d+=38*I,f+=38*S,p+=38*_,h+=38*P,m+=38*k,y+=38*R,b+=38*N,g+=38*M,v+=38*D,i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,a+=i-1+37*(i-1),i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=c,e[4]=u,e[5]=l,e[6]=d,e[7]=f,e[8]=p,e[9]=h,e[10]=m,e[11]=y,e[12]=b,e[13]=g,e[14]=v,e[15]=w}function d(e,t){l(e,t,t)}function f(e,t){const n=new Uint8Array(32),i=new Float64Array(80),f=r(),p=r(),h=r(),m=r(),y=r(),b=r();for(let t=0;t<31;t++)n[t]=e[t];n[31]=127&e[31]|64,n[0]&=248,function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(i,t);for(let e=0;e<16;e++)p[e]=i[e];f[0]=m[0]=1;for(let e=254;e>=0;--e){const t=n[e>>>3]>>>(7&e)&1;s(f,p,t),s(h,m,t),c(y,f,h),u(f,f,h),c(h,p,m),u(p,p,m),d(m,y),d(b,f),l(f,h,f),l(h,p,y),c(y,f,h),u(f,f,h),d(p,f),u(h,m,b),l(f,h,a),c(f,f,m),l(h,h,f),l(f,m,b),l(m,p,i),d(p,y),s(f,p,t),s(h,m,t)}for(let e=0;e<16;e++)i[e+16]=f[e],i[e+32]=h[e],i[e+48]=p[e],i[e+64]=m[e];const g=i.subarray(32),v=i.subarray(16);!function(e,t){const n=r();for(let e=0;e<16;e++)n[e]=t[e];for(let e=253;e>=0;e--)d(n,n),2!==e&&4!==e&&l(n,n,t);for(let t=0;t<16;t++)e[t]=n[t]}(g,g),l(v,v,g);const w=new Uint8Array(32);return function(e,t){const n=r(),i=r();for(let e=0;e<16;e++)i[e]=t[e];o(i),o(i),o(i);for(let e=0;e<2;e++){n[0]=i[0]-65517;for(let e=1;e<15;e++)n[e]=i[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=i[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,s(i,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&i[t],e[2*t+1]=i[t]>>8}(w,v),w}function p(e){return f(e,i)}function h(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const n=new Uint8Array(t);return{publicKey:p(n),secretKey:n}}e.scalarMult=f,e.scalarMultBase=p,e.generateKeyPairFromSeed=h,e.generateKeyPair=function(e){const r=(0,t.randomBytes)(32,e),i=h(r);return(0,n.wipe)(r),i},e.sharedKey=function(t,n,r=!1){if(t.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(n.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const i=f(t,n);if(r){let e=0;for(let t=0;t<i.length;t++)e|=i[t];if(0===e)throw new Error("X25519: invalid shared key")}return i}}(YWe);var $We=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var a=e.charAt(i),o=a.charCodeAt(0);if(255!==n[o])throw new TypeError(a+" is ambiguous");n[o]=i}var s=e.length,c=e.charAt(0),u=Math.log(s)/Math.log(256),l=Math.log(256)/Math.log(s);function d(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===c;)r++,t++;for(var a=(e.length-t)*u+1>>>0,o=new Uint8Array(a);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var d=0,f=a-1;(0!==l||d<i)&&-1!==f;f--,d++)l+=s*o[f]>>>0,o[f]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var p=a-i;p!==a&&0===o[p];)p++;for(var h=new Uint8Array(r+(a-p)),m=r;p!==a;)h[m++]=o[p++];return h}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,a=t.length;i!==a&&0===t[i];)i++,n++;for(var o=(a-i)*l+1>>>0,u=new Uint8Array(o);i!==a;){for(var d=t[i],f=0,p=o-1;(0!==d||f<r)&&-1!==p;p--,f++)d+=256*u[p]>>>0,u[p]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");r=f,i++}for(var h=o-r;h!==o&&0===u[h];)h++;for(var m=c.repeat(n);h<o;++h)m+=e.charAt(u[h]);return m},decodeUnsafe:d,decode:function(e){var n=d(e);if(n)return n;throw new Error(`Non-${t} character`)}}},eVe=$We;class tVe{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class nVe{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return iVe(this,e)}}class rVe{constructor(e){this.decoders=e}or(e){return iVe(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const iVe=(e,t)=>new rVe({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class aVe{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new tVe(e,t,n),this.decoder=new nVe(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const oVe=({name:e,prefix:t,encode:n,decode:r})=>new aVe(e,t,n,r),sVe=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=eVe(n,t);return oVe({prefix:e,name:t,encode:r,decode:e=>(e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")})(i(e))})},cVe=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>oVe({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let a="",o=0,s=0;for(let r=0;r<e.length;++r)for(s=s<<8|e[r],o+=8;o>n;)o-=n,a+=t[i&s>>o];if(o&&(a+=t[i&s<<n-o]),r)for(;a.length*n&7;)a+="=";return a})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let a=e.length;for(;"="===e[a-1];)--a;const o=new Uint8Array(a*n/8|0);let s=0,c=0,u=0;for(let t=0;t<a;++t){const a=i[e[t]];if(void 0===a)throw new SyntaxError(`Non-${r} character`);c=c<<n|a,s+=n,s>=8&&(s-=8,o[u++]=255&c>>s)}if(s>=n||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return o})(t,r,n,e)}),uVe=oVe({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var lVe=Object.freeze({__proto__:null,identity:uVe});const dVe=cVe({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var fVe=Object.freeze({__proto__:null,base2:dVe});const pVe=cVe({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var hVe=Object.freeze({__proto__:null,base8:pVe});const mVe=sVe({prefix:"9",name:"base10",alphabet:"0123456789"});var yVe=Object.freeze({__proto__:null,base10:mVe});const bVe=cVe({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),gVe=cVe({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var vVe=Object.freeze({__proto__:null,base16:bVe,base16upper:gVe});const wVe=cVe({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),TVe=cVe({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),EVe=cVe({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),AVe=cVe({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),xVe=cVe({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),OVe=cVe({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),CVe=cVe({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),IVe=cVe({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),SVe=cVe({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var _Ve=Object.freeze({__proto__:null,base32:wVe,base32hex:xVe,base32hexpad:CVe,base32hexpadupper:IVe,base32hexupper:OVe,base32pad:EVe,base32padupper:AVe,base32upper:TVe,base32z:SVe});const PVe=sVe({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),kVe=sVe({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var RVe=Object.freeze({__proto__:null,base36:PVe,base36upper:kVe});const NVe=sVe({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),MVe=sVe({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var DVe=Object.freeze({__proto__:null,base58btc:NVe,base58flickr:MVe});const LVe=cVe({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),FVe=cVe({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),BVe=cVe({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),jVe=cVe({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var UVe=Object.freeze({__proto__:null,base64:LVe,base64pad:FVe,base64url:BVe,base64urlpad:jVe});const zVe=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),HVe=zVe.reduce(((e,t,n)=>(e[n]=t,e)),[]),WVe=zVe.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const VVe=oVe({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=HVe[t]),"")},decode:function(e){const t=[];for(const n of e){const e=WVe[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var GVe=Object.freeze({__proto__:null,base256emoji:VVe});new TextEncoder,new TextDecoder;const qVe={...lVe,...fVe,...hVe,...yVe,...vVe,..._Ve,...RVe,...DVe,...UVe,...GVe};function KVe(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const XVe=KVe("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),YVe=KVe("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{const t=ZWe((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),JVe={utf8:XVe,"utf-8":XVe,hex:qVe.base16,latin1:YVe,ascii:YVe,binary:YVe,...qVe};function ZVe(e,t="utf8"){const n=JVe[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${e}`):JWe(globalThis.Buffer.from(e,"utf-8"))}function QVe(e,t="utf8"){const n=JVe[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.encoder.encode(e).substring(1):globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}var $Ve=window&&window.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},eGe=function(e,t,n){this.name=e,this.version=t,this.os=n,this.type="browser"},tGe=function(e){this.version=e,this.type="node",this.name="node",this.os=process.platform},nGe=function(e,t,n,r){this.name=e,this.version=t,this.os=n,this.bot=r,this.type="bot-device"},rGe=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},iGe=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},aGe=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,oGe=3,sGe=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],cGe=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function uGe(e){return e?lGe(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new iGe:"undefined"!=typeof navigator?lGe(navigator.userAgent):function(){var e="undefined"!=typeof process&&process.version;return e?new tGe(process.version.slice(1)):null}()}function lGe(e){var t=function(e){return""!==e&&sGe.reduce((function(t,n){var r=n[0],i=n[1];if(t)return t;var a=i.exec(e);return!!a&&[r,a]}),!1)}(e);if(!t)return null;var n=t[0],r=t[1];if("searchbot"===n)return new rGe;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length<oGe&&(i=$Ve($Ve([],i,!0),function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(oGe-i.length),!0)):i=[];var a=i.join("."),o=function(e){for(var t=0,n=cGe.length;t<n;t++){var r=cGe[t],i=r[0];if(r[1].exec(e))return i}return null}(e),s=aGe.exec(e);return s&&s[1]?new nGe(n,a,o,s[1]):new eGe(n,a,o)}var dGe,fGe={},pGe={},hGe={};var mGe,yGe={},bGe={},gGe={};var vGe,wGe,TGe,EGe,AGe={};function xGe(){return wGe||(wGe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=YD;t.__exportStar((mGe||(mGe=1,Object.defineProperty(gGe,"__esModule",{value:!0}),gGe.ONE_THOUSAND=gGe.ONE_HUNDRED=void 0,gGe.ONE_HUNDRED=100,gGe.ONE_THOUSAND=1e3),gGe),e),t.__exportStar((vGe||(vGe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_YEAR=e.FOUR_WEEKS=e.THREE_WEEKS=e.TWO_WEEKS=e.ONE_WEEK=e.THIRTY_DAYS=e.SEVEN_DAYS=e.FIVE_DAYS=e.THREE_DAYS=e.ONE_DAY=e.TWENTY_FOUR_HOURS=e.TWELVE_HOURS=e.SIX_HOURS=e.THREE_HOURS=e.ONE_HOUR=e.SIXTY_MINUTES=e.THIRTY_MINUTES=e.TEN_MINUTES=e.FIVE_MINUTES=e.ONE_MINUTE=e.SIXTY_SECONDS=e.THIRTY_SECONDS=e.TEN_SECONDS=e.FIVE_SECONDS=e.ONE_SECOND=void 0,e.ONE_SECOND=1,e.FIVE_SECONDS=5,e.TEN_SECONDS=10,e.THIRTY_SECONDS=30,e.SIXTY_SECONDS=60,e.ONE_MINUTE=e.SIXTY_SECONDS,e.FIVE_MINUTES=5*e.ONE_MINUTE,e.TEN_MINUTES=10*e.ONE_MINUTE,e.THIRTY_MINUTES=30*e.ONE_MINUTE,e.SIXTY_MINUTES=60*e.ONE_MINUTE,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=3*e.ONE_HOUR,e.SIX_HOURS=6*e.ONE_HOUR,e.TWELVE_HOURS=12*e.ONE_HOUR,e.TWENTY_FOUR_HOURS=24*e.ONE_HOUR,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=3*e.ONE_DAY,e.FIVE_DAYS=5*e.ONE_DAY,e.SEVEN_DAYS=7*e.ONE_DAY,e.THIRTY_DAYS=30*e.ONE_DAY,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=2*e.ONE_WEEK,e.THREE_WEEKS=3*e.ONE_WEEK,e.FOUR_WEEKS=4*e.ONE_WEEK,e.ONE_YEAR=365*e.ONE_DAY}(AGe)),AGe),e)}(bGe)),bGe}function OGe(){return EGe||(EGe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=YD;t.__exportStar((dGe||(dGe=1,Object.defineProperty(hGe,"__esModule",{value:!0}),hGe.delay=void 0,hGe.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}),hGe),e),t.__exportStar(function(){if(TGe)return yGe;TGe=1,Object.defineProperty(yGe,"__esModule",{value:!0}),yGe.fromMiliseconds=yGe.toMiliseconds=void 0;const e=xGe();return yGe.toMiliseconds=function(t){return t*e.ONE_THOUSAND},yGe.fromMiliseconds=function(t){return Math.floor(t/e.ONE_THOUSAND)},yGe}(),e)}(pGe)),pGe}var CGe,IGe={};var SGe,_Ge,PGe={},kGe={};function RGe(){return _Ge||(_Ge=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});YD.__exportStar((SGe||(SGe=1,Object.defineProperty(kGe,"__esModule",{value:!0}),kGe.IWatch=void 0,kGe.IWatch=class{}),kGe),e)}(PGe)),PGe}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=YD;t.__exportStar(OGe(),e),t.__exportStar(function(){if(CGe)return IGe;CGe=1,Object.defineProperty(IGe,"__esModule",{value:!0}),IGe.Watch=void 0;class e{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if(void 0!==t.elapsed)throw new Error(`Watch already stopped for label: ${e}`);const n=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:n})}get(e){const t=this.timestamps.get(e);if(void 0===t)throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}return IGe.Watch=e,IGe.default=e,IGe}(),e),t.__exportStar(RGe(),e),t.__exportStar(xGe(),e)}(fGe);var NGe={};function MGe(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function DGe(e){const t=MGe(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(NGe,"__esModule",{value:!0}),NGe.getLocalStorage=NGe.getLocalStorageOrThrow=NGe.getCrypto=NGe.getCryptoOrThrow=BGe=NGe.getLocation=NGe.getLocationOrThrow=FGe=NGe.getNavigator=NGe.getNavigatorOrThrow=LGe=NGe.getDocument=NGe.getDocumentOrThrow=NGe.getFromWindowOrThrow=NGe.getFromWindow=void 0,NGe.getFromWindow=MGe,NGe.getFromWindowOrThrow=DGe,NGe.getDocumentOrThrow=function(){return DGe("document")};var LGe=NGe.getDocument=function(){return MGe("document")};NGe.getNavigatorOrThrow=function(){return DGe("navigator")};var FGe=NGe.getNavigator=function(){return MGe("navigator")};NGe.getLocationOrThrow=function(){return DGe("location")};var BGe=NGe.getLocation=function(){return MGe("location")};NGe.getCryptoOrThrow=function(){return DGe("crypto")},NGe.getCrypto=function(){return MGe("crypto")},NGe.getLocalStorageOrThrow=function(){return DGe("localStorage")},NGe.getLocalStorage=function(){return MGe("localStorage")};var jGe={};Object.defineProperty(jGe,"__esModule",{value:!0});var UGe=jGe.getWindowMetadata=void 0;const zGe=NGe;UGe=jGe.getWindowMetadata=function(){let e,t;try{e=zGe.getDocumentOrThrow(),t=zGe.getLocationOrThrow()}catch(e){return null}function n(...t){const n=e.getElementsByTagName("meta");for(let e=0;e<n.length;e++){const r=n[e],i=["itemprop","property","name"].map((e=>r.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(i.length&&i){const e=r.getAttribute("content");if(e)return e}}return""}const r=function(){let t=n("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}(),i=n("description","og:description","twitter:description","keywords"),a=t.origin,o=function(){const n=e.getElementsByTagName("link"),r=[];for(let e=0;e<n.length;e++){const i=n[e],a=i.getAttribute("rel");if(a&&a.toLowerCase().indexOf("icon")>-1){const e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let n=t.protocol+"//"+t.host;if(0===e.indexOf("/"))n+=e;else{const r=t.pathname.split("/");r.pop();n+=r.join("/")+"/"+e}r.push(n)}else if(0===e.indexOf("//")){const n=t.protocol+e;r.push(n)}else r.push(e)}}return r}();return{description:i,url:a,icons:o,name:r}};var HGe={},WGe=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),VGe="%[a-f0-9]{2}",GGe=new RegExp("("+VGe+")|([^%]+?)","gi"),qGe=new RegExp("("+VGe+")+","gi");function KGe(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],KGe(n),KGe(r))}function XGe(e){try{return decodeURIComponent(e)}catch(r){for(var t=e.match(GGe)||[],n=1;n<t.length;n++)t=(e=KGe(t,n).join("")).match(GGe)||[];return e}}var YGe=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=qGe.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=XGe(n[0]);r!==n[0]&&(t[n[0]]=r)}n=qGe.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),a=0;a<i.length;a++){var o=i[a];e=e.replace(new RegExp(o,"g"),t[o])}return e}(e)}},JGe=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]},ZGe=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),a=0;a<r.length;a++){var o=r[a],s=e[o];(i?-1!==t.indexOf(o):t(o,s,e))&&(n[o]=s)}return n};!function(e){const t=WGe,n=YGe,r=JGe,i=ZGe,a=Symbol("encodeFragmentIdentifier");function o(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function s(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function c(e,t){return t.decode?n(e):e}function u(e){return Array.isArray(e)?e.sort():"object"==typeof e?u(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function d(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function f(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function p(e,t){o((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"==typeof n&&n.includes(e.arrayFormatSeparator),a="string"==typeof n&&!i&&c(n,e).includes(e.arrayFormatSeparator);n=a?c(n,e):n;const o=i||a?n.split(e.arrayFormatSeparator).map((t=>c(t,e))):null===n?n:c(n,e);r[t]=o};case"bracket-separator":return(t,n,r)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n?c(n,e):n);const a=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>c(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],a):r[t]=a};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),i=Object.create(null);if("string"!=typeof e)return i;if(!(e=e.trim().replace(/^[?#&]/,"")))return i;for(const a of e.split("&")){if(""===a)continue;let[e,o]=r(t.decode?a.replace(/\+/g," "):a,"=");o=void 0===o?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?o:c(o,t),n(c(e,t),o,i)}for(const e of Object.keys(i)){const n=i[e];if("object"==typeof n&&null!==n)for(const e of Object.keys(n))n[e]=f(n[e],t);else i[e]=f(n,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{const n=i[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=u(n):e[t]=n,e}),Object.create(null))}e.extract=d,e.parse=p,e.stringify=(e,t)=>{if(!e)return"";o((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&null==e[n]||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[s(t,e),"[",i,"]"].join("")]:[...n,[s(t,e),"[",s(i,e),"]=",s(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[s(t,e),"[]"].join("")]:[...n,[s(t,e),"[]=",s(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[s(t,e),":list="].join("")]:[...n,[s(t,e),":list=",s(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[s(n,e),t,s(i,e)].join("")]:[[r,s(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,s(t,e)]:[...n,[s(t,e),"=",s(r,e)].join("")]}}(t),i={};for(const t of Object.keys(e))n(t)||(i[t]=e[t]);const a=Object.keys(i);return!1!==t.sort&&a.sort(t.sort),a.map((n=>{const i=e[n];return void 0===i?"":null===i?s(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?s(n,t)+"[]":i.reduce(r(n),[]).join("&"):s(n,t)+"="+s(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,i]=r(e,"#");return Object.assign({url:n.split("?")[0]||"",query:p(d(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:c(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[a]:!0},n);const r=l(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),c=Object.assign(o,t.query);let u=e.stringify(c,n);u&&(u=`?${u}`);let d=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(t.url);return t.fragmentIdentifier&&(d=`#${n[a]?s(t.fragmentIdentifier,n):t.fragmentIdentifier}`),`${r}${u}${d}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[a]:!1},r);const{url:o,query:s,fragmentIdentifier:c}=e.parseUrl(t,r);return e.stringifyUrl({url:o,query:i(s,n),fragmentIdentifier:c},r)},e.exclude=(t,n,r)=>{const i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return e.pick(t,i,r)}}(HGe);const QGe={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}},$Ge=":";function eqe(e,t){return e.includes(":")?[e]:t.chains||[]}const tqe="base10",nqe="base16",rqe="base64pad",iqe="utf8",aqe=0,oqe=1,sqe=0,cqe=1,uqe=12,lqe=32;function dqe(){return QVe(zWe.randomBytes(lqe),nqe)}function fqe(e){return QVe(XWe.hash(ZVe(e,iqe)),nqe)}function pqe(e){return Number(QVe(e,tqe))}function hqe(e){const t=function(e){return ZVe(`${e}`,tqe)}(typeof e.type<"u"?e.type:aqe);if(pqe(t)===oqe&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof e.senderPublicKey<"u"?ZVe(e.senderPublicKey,nqe):void 0,r=typeof e.iv<"u"?ZVe(e.iv,nqe):zWe.randomBytes(uqe);return function(e){if(pqe(e.type)===oqe){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return QVe(QWe([e.type,e.senderPublicKey,e.iv,e.sealed]),rqe)}return QVe(QWe([e.type,e.iv,e.sealed]),rqe)}({type:t,sealed:new aWe.ChaCha20Poly1305(ZVe(e.symKey,nqe)).seal(r,ZVe(e.message,iqe)),iv:r,senderPublicKey:n})}function mqe(e){const t=ZVe(e,rqe),n=t.slice(sqe,cqe),r=cqe;if(pqe(n)===oqe){const e=r+lqe,i=e+uqe,a=t.slice(r,e),o=t.slice(e,i);return{type:n,sealed:t.slice(i),iv:o,senderPublicKey:a}}const i=r+uqe,a=t.slice(r,i);return{type:n,sealed:t.slice(i),iv:a}}function yqe(e){const t=e?.type||aqe;if(t===oqe){if(typeof e?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function bqe(e){return e.type===oqe&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var gqe=Object.defineProperty,vqe=Object.getOwnPropertySymbols,wqe=Object.prototype.hasOwnProperty,Tqe=Object.prototype.propertyIsEnumerable,Eqe=(e,t,n)=>t in e?gqe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Aqe=(e,t)=>{for(var n in t||(t={}))wqe.call(t,n)&&Eqe(e,n,t[n]);if(vqe)for(var n of vqe(t))Tqe.call(t,n)&&Eqe(e,n,t[n]);return e};const xqe="ReactNative",Oqe={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},Cqe="js";function Iqe(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function Sqe(){return!LGe()&&!!FGe()&&navigator.product===xqe}function _qe(){return!Iqe()&&!!FGe()&&!!LGe()}function Pqe(){return Sqe()?Oqe.reactNative:Iqe()?Oqe.node:_qe()?Oqe.browser:Oqe.unknown}function kqe(e,t,n){const r=function(){if(Pqe()===Oqe.reactNative&&typeof global<"u"&&typeof(null==global?void 0:global.Platform)<"u"){const{OS:e,Version:t}=global.Platform;return[e,t].join("-")}const e=uGe();if(null===e)return"unknown";const t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return"browser"===e.type?[t,e.name,e.version].join("-"):[t,e.version].join("-")}(),i=function(){var e;const t=Pqe();return t===Oqe.browser?[t,(null==(e=BGe())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),[Cqe,n].join("-"),r,i].join("/")}function Rqe({protocol:e,version:t,relayUrl:n,sdkVersion:r,auth:i,projectId:a,useOnCloseEvent:o,bundleId:s}){const c=n.split("?"),u={auth:i,ua:kqe(e,t,r),projectId:a,useOnCloseEvent:o||void 0,origin:s||void 0},l=function(e,t){let n=HGe.parse(e);return n=Aqe(Aqe({},n),t),HGe.stringify(n)}(c[1]||"",u);return c[0]+"?"+l}function Nqe(e,t){return e.filter((e=>t.includes(e))).length===e.length}function Mqe(e){return Object.fromEntries(e.entries())}function Dqe(e){return new Map(Object.entries(e))}function Lqe(e=fGe.FIVE_MINUTES,t){const n=fGe.toMiliseconds(e||fGe.FIVE_MINUTES);let r,i,a;return{resolve:e=>{a&&r&&(clearTimeout(a),r(e))},reject:e=>{a&&i&&(clearTimeout(a),i(e))},done:()=>new Promise(((e,o)=>{a=setTimeout((()=>{o(new Error(t))}),n),r=e,i=o}))}}function Fqe(e,t,n){return new Promise((async(r,i)=>{const a=setTimeout((()=>i(new Error(n))),t);try{r(await e)}catch(e){i(e)}clearTimeout(a)}))}function Bqe(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function jqe(e){const[t,n]=e.split(":"),r={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof n)r.topic=n;else{if("id"!==t||!Number.isInteger(Number(n)))throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${n}`);r.id=Number(n)}return r}function Uqe(e,t){return fGe.fromMiliseconds((t||Date.now())+fGe.toMiliseconds(e))}function zqe(e){return Date.now()>=fGe.toMiliseconds(e)}function Hqe(e,t){return`${e}${t?`:${t}`:""}`}function Wqe(e=[],t=[]){return[...new Set([...e,...t])]}function Vqe(e){return e?.relay||{protocol:"irn"}}function Gqe(e){const t=QGe[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var qqe=Object.defineProperty,Kqe=Object.defineProperties,Xqe=Object.getOwnPropertyDescriptors,Yqe=Object.getOwnPropertySymbols,Jqe=Object.prototype.hasOwnProperty,Zqe=Object.prototype.propertyIsEnumerable,Qqe=(e,t,n)=>t in e?qqe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function $qe(e,t="-"){const n={},r="relay"+t;return Object.keys(e).forEach((t=>{if(t.startsWith(r)){const i=t.replace(r,""),a=e[t];n[i]=a}})),n}function eKe(e){const t=(e=(e=e.includes("wc://")?e.replace("wc://",""):e).includes("wc:")?e.replace("wc:",""):e).indexOf(":"),n=-1!==e.indexOf("?")?e.indexOf("?"):void 0,r=e.substring(0,t),i=e.substring(t+1,n).split("@"),a=typeof n<"u"?e.substring(n):"",o=HGe.parse(a);return{protocol:r,topic:tKe(i[0]),version:parseInt(i[1],10),symKey:o.symKey,relay:$qe(o),expiryTimestamp:o.expiryTimestamp?parseInt(o.expiryTimestamp,10):void 0}}function tKe(e){return e.startsWith("//")?e.substring(2):e}function nKe(e){return`${e.protocol}:${e.topic}@${e.version}?`+HGe.stringify(((e,t)=>Kqe(e,Xqe(t)))(((e,t)=>{for(var n in t||(t={}))Jqe.call(t,n)&&Qqe(e,n,t[n]);if(Yqe)for(var n of Yqe(t))Zqe.call(t,n)&&Qqe(e,n,t[n]);return e})({symKey:e.symKey},function(e,t="-"){const n={};return Object.keys(e).forEach((r=>{const i="relay"+t+r;e[r]&&(n[i]=e[r])})),n}(e.relay)),{expiryTimestamp:e.expiryTimestamp}))}function rKe(e){const t=[];return e.forEach((e=>{const[n,r]=e.split(":");t.push(`${n}:${r}`)})),t}function iKe(e){return e.includes(":")}function aKe(e){return iKe(e)?e.split(":")[0]:e}const oKe={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},sKe={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function cKe(e,t){const{message:n,code:r}=sKe[e];return{message:t?`${n} ${t}`:n,code:r}}function uKe(e,t){const{message:n,code:r}=oKe[e];return{message:t?`${n} ${t}`:n,code:r}}function lKe(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function dKe(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function fKe(e){return typeof e>"u"}function pKe(e,t){return!(!t||!fKe(e))||"string"==typeof e&&!!e.trim().length}function hKe(e,t){return!(!t||!fKe(e))||"number"==typeof e&&!isNaN(e)}function mKe(e){return!(!pKe(e,!1)||!e.includes(":"))&&2===e.split(":").length}function yKe(e){let t=!0;return lKe(e)?e.length&&(t=e.every((e=>pKe(e,!1)))):t=!1,t}function bKe(e,t,n){let r=null;return Object.entries(e).forEach((([e,i])=>{if(r)return;const a=function(e,t,n){let r=null;return lKe(t)&&t.length?t.forEach((e=>{r||mKe(e)||(r=uKe("UNSUPPORTED_CHAINS",`${n}, chain ${e} should be a string and conform to "namespace:chainId" format`))})):mKe(e)||(r=uKe("UNSUPPORTED_CHAINS",`${n}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),r}(e,eqe(e,i),`${t} ${n}`);a&&(r=a)})),r}function gKe(e,t){let n=null;return lKe(e)?e.forEach((e=>{n||function(e){if(pKe(e,!1)&&e.includes(":")){const t=e.split(":");if(3===t.length){const e=t[0]+":"+t[1];return!!t[2]&&mKe(e)}}return!1}(e)||(n=uKe("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):n=uKe("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function vKe(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=function(e,t){let n=null;return yKe(e?.methods)?yKe(e?.events)||(n=uKe("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):n=uKe("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),n}(e,`${t}, namespace`);r&&(n=r)})),n}function wKe(e,t){let n=null;if(e&&dKe(e)){const r=vKe(e,t);r&&(n=r);const i=function(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=gKe(e?.accounts,`${t} namespace`);r&&(n=r)})),n}(e,t);i&&(n=i)}else n=cKe("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return n}function TKe(e){return pKe(e.protocol,!0)}function EKe(e){return typeof e<"u"&&null!==typeof e}function AKe(e,t){return!(!mKe(t)||!function(e){const t=[];return Object.values(e).forEach((e=>{t.push(...rKe(e.accounts))})),t}(e).includes(t))}function xKe(e,t,n){return!!pKe(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{rKe(e.accounts).includes(t)&&n.push(...e.methods)})),n}(e,t).includes(n)}function OKe(e,t,n){return!!pKe(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{rKe(e.accounts).includes(t)&&n.push(...e.events)})),n}(e,t).includes(n)}function CKe(e,t,n){let r=null;const i=function(e){const t={};return Object.keys(e).forEach((n=>{var r;n.includes(":")?t[n]=e[n]:null==(r=e[n].chains)||r.forEach((r=>{t[r]={methods:e[n].methods,events:e[n].events}}))})),t}(e),a=function(e){const t={};return Object.keys(e).forEach((n=>{if(n.includes(":"))t[n]=e[n];else{const r=rKe(e[n].accounts);r?.forEach((r=>{t[r]={accounts:e[n].accounts.filter((e=>e.includes(`${r}:`))),methods:e[n].methods,events:e[n].events}}))}})),t}(t),o=Object.keys(i),s=Object.keys(a),c=IKe(Object.keys(e)),u=IKe(Object.keys(t)),l=c.filter((e=>!u.includes(e)));return l.length&&(r=cKe("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.\n Required: ${l.toString()}\n Received: ${Object.keys(t).toString()}`)),Nqe(o,s)||(r=cKe("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.\n Required: ${o.toString()}\n Approved: ${s.toString()}`)),Object.keys(t).forEach((e=>{if(!e.includes(":")||r)return;const i=rKe(t[e].accounts);i.includes(e)||(r=cKe("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${e}\n Required: ${e}\n Approved: ${i.toString()}`))})),o.forEach((e=>{r||(Nqe(i[e].methods,a[e].methods)?Nqe(i[e].events,a[e].events)||(r=cKe("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${e}`)):r=cKe("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${e}`))})),r}function IKe(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}function SKe(){const e=Pqe();return new Promise((t=>{switch(e){case Oqe.browser:t(_qe()&&navigator?.onLine);break;case Oqe.reactNative:t(async function(){if(Sqe()&&typeof global<"u"&&null!=global&&global.NetInfo){const e=await(null==global?void 0:global.NetInfo.fetch());return e?.isConnected}return!0}());break;case Oqe.node:default:t(!0)}}))}function _Ke(e){switch(Pqe()){case Oqe.browser:!function(e){!Sqe()&&_qe()&&(window.addEventListener("online",(()=>e(!0))),window.addEventListener("offline",(()=>e(!1))))}(e);break;case Oqe.reactNative:!function(e){Sqe()&&typeof global<"u"&&null!=global&&global.NetInfo&&global?.NetInfo.addEventListener((t=>e(t?.isConnected)))}(e)}}const PKe={};let kKe=class{static get(e){return PKe[e]}static set(e,t){PKe[e]=t}static delete(e){delete PKe[e]}};const RKe=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,NKe=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,MKe=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function DKe(e,t){if(!("__proto__"===e||"constructor"===e&&t&&"object"==typeof t&&"prototype"in t))return t;!function(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}(e)}function LKe(e,t={}){if("string"!=typeof e)return e;const n=e.trim();if('"'===e[0]&&'"'===e.at(-1)&&!e.includes("\\"))return n.slice(1,-1);if(n.length<=9){const e=n.toLowerCase();if("true"===e)return!0;if("false"===e)return!1;if("undefined"===e)return;if("null"===e)return null;if("nan"===e)return Number.NaN;if("infinity"===e)return Number.POSITIVE_INFINITY;if("-infinity"===e)return Number.NEGATIVE_INFINITY}if(!MKe.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(RKe.test(e)||NKe.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,DKe)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}function FKe(e,...t){try{return(n=e(...t))&&"function"==typeof n.then?n:Promise.resolve(n)}catch(e){return Promise.reject(e)}var n}function BKe(e){if(function(e){const t=typeof e;return null===e||"object"!==t&&"function"!==t}(e))return String(e);if(function(e){const t=Object.getPrototypeOf(e);return!t||t.isPrototypeOf(Object)}(e)||Array.isArray(e))return JSON.stringify(e);if("function"==typeof e.toJSON)return BKe(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function jKe(){if(void 0===typeof Buffer)throw new TypeError("[unstorage] Buffer is not supported!")}const UKe="base64:";function zKe(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function HKe(...e){return zKe(e.join(":"))}function WKe(e){return(e=zKe(e))?e+":":""}const VKe=()=>{const e=new Map;return{name:"memory",options:{},hasItem:t=>e.has(t),getItem:t=>e.get(t)??null,getItemRaw:t=>e.get(t)??null,setItem(t,n){e.set(t,n)},setItemRaw(t,n){e.set(t,n)},removeItem(t){e.delete(t)},getKeys:()=>Array.from(e.keys()),clear(){e.clear()},dispose(){e.clear()}}};function GKe(e={}){const t={mounts:{"":e.driver||VKe()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=e=>{for(const n of t.mountpoints)if(e.startsWith(n))return{base:n,relativeKey:e.slice(n.length),driver:t.mounts[n]};return{base:"",relativeKey:e,driver:t.mounts[""]}},r=(e,n)=>t.mountpoints.filter((t=>t.startsWith(e)||n&&e.startsWith(t))).map((n=>({relativeBase:e.length>n.length?e.slice(n.length):void 0,mountpoint:n,driver:t.mounts[n]}))),i=(e,n)=>{if(t.watching){n=zKe(n);for(const r of t.watchListeners)r(e,n)}},a=async()=>{if(t.watching){for(const e in t.unwatch)await t.unwatch[e]();t.unwatch={},t.watching=!1}},o=(e,t,r)=>{const i=new Map,a=e=>{let t=i.get(e.base);return t||(t={driver:e.driver,base:e.base,items:[]},i.set(e.base,t)),t};for(const r of e){const e="string"==typeof r,i=zKe(e?r:r.key),o=e?void 0:r.value,s=e||!r.options?t:{...t,...r.options},c=n(i);a(c).items.push({key:i,value:o,relativeKey:c.relativeKey,options:s})}return Promise.all([...i.values()].map((e=>r(e)))).then((e=>e.flat()))},s={hasItem(e,t={}){e=zKe(e);const{relativeKey:r,driver:i}=n(e);return FKe(i.hasItem,r,t)},getItem(e,t={}){e=zKe(e);const{relativeKey:r,driver:i}=n(e);return FKe(i.getItem,r,t).then((e=>LKe(e)))},getItems:(e,t)=>o(e,t,(e=>e.driver.getItems?FKe(e.driver.getItems,e.items.map((e=>({key:e.relativeKey,options:e.options}))),t).then((t=>t.map((t=>({key:HKe(e.base,t.key),value:LKe(t.value)}))))):Promise.all(e.items.map((t=>FKe(e.driver.getItem,t.relativeKey,t.options).then((e=>({key:t.key,value:LKe(e)})))))))),getItemRaw(e,t={}){e=zKe(e);const{relativeKey:r,driver:i}=n(e);return i.getItemRaw?FKe(i.getItemRaw,r,t):FKe(i.getItem,r,t).then((e=>function(e){return"string"!=typeof e?e:e.startsWith(UKe)?(jKe(),Buffer.from(e.slice(UKe.length),"base64")):e}(e)))},async setItem(e,t,r={}){if(void 0===t)return s.removeItem(e);e=zKe(e);const{relativeKey:a,driver:o}=n(e);o.setItem&&(await FKe(o.setItem,a,BKe(t),r),o.watch||i("update",e))},async setItems(e,t){await o(e,t,(async e=>{e.driver.setItems&&await FKe(e.driver.setItems,e.items.map((e=>({key:e.relativeKey,value:BKe(e.value),options:e.options}))),t),e.driver.setItem&&await Promise.all(e.items.map((t=>FKe(e.driver.setItem,t.relativeKey,BKe(t.value),t.options))))}))},async setItemRaw(e,t,r={}){if(void 0===t)return s.removeItem(e,r);e=zKe(e);const{relativeKey:a,driver:o}=n(e);if(o.setItemRaw)await FKe(o.setItemRaw,a,t,r);else{if(!o.setItem)return;await FKe(o.setItem,a,function(e){if("string"==typeof e)return e;jKe();const t=Buffer.from(e).toString("base64");return UKe+t}(t),r)}o.watch||i("update",e)},async removeItem(e,t={}){"boolean"==typeof t&&(t={removeMeta:t}),e=zKe(e);const{relativeKey:r,driver:a}=n(e);a.removeItem&&(await FKe(a.removeItem,r,t),(t.removeMeta||t.removeMata)&&await FKe(a.removeItem,r+"$",t),a.watch||i("remove",e))},async getMeta(e,t={}){"boolean"==typeof t&&(t={nativeOnly:t}),e=zKe(e);const{relativeKey:r,driver:i}=n(e),a=Object.create(null);if(i.getMeta&&Object.assign(a,await FKe(i.getMeta,r,t)),!t.nativeOnly){const e=await FKe(i.getItem,r+"$",t).then((e=>LKe(e)));e&&"object"==typeof e&&("string"==typeof e.atime&&(e.atime=new Date(e.atime)),"string"==typeof e.mtime&&(e.mtime=new Date(e.mtime)),Object.assign(a,e))}return a},setMeta(e,t,n={}){return this.setItem(e+"$",t,n)},removeMeta(e,t={}){return this.removeItem(e+"$",t)},async getKeys(e,t={}){e=WKe(e);const n=r(e,!0);let i=[];const a=[];for(const e of n){const n=(await FKe(e.driver.getKeys,e.relativeBase,t)).map((t=>e.mountpoint+zKe(t))).filter((e=>!i.some((t=>e.startsWith(t)))));a.push(...n),i=[e.mountpoint,...i.filter((t=>!t.startsWith(e.mountpoint)))]}return e?a.filter((t=>t.startsWith(e)&&!t.endsWith("$"))):a.filter((e=>!e.endsWith("$")))},async clear(e,t={}){e=WKe(e),await Promise.all(r(e,!1).map((async e=>{if(e.driver.clear)return FKe(e.driver.clear,e.relativeBase,t);if(e.driver.removeItem){const n=await e.driver.getKeys(e.relativeBase||"",t);return Promise.all(n.map((n=>e.driver.removeItem(n,t))))}})))},async dispose(){await Promise.all(Object.values(t.mounts).map((e=>KKe(e))))},watch:async e=>(await(async()=>{if(!t.watching){t.watching=!0;for(const e in t.mounts)t.unwatch[e]=await qKe(t.mounts[e],i,e)}})(),t.watchListeners.push(e),async()=>{t.watchListeners=t.watchListeners.filter((t=>t!==e)),0===t.watchListeners.length&&await a()}),async unwatch(){t.watchListeners=[],await a()},mount(e,n){if((e=WKe(e))&&t.mounts[e])throw new Error(`already mounted at ${e}`);return e&&(t.mountpoints.push(e),t.mountpoints.sort(((e,t)=>t.length-e.length))),t.mounts[e]=n,t.watching&&Promise.resolve(qKe(n,i,e)).then((n=>{t.unwatch[e]=n})).catch(console.error),s},async unmount(e,n=!0){(e=WKe(e))&&t.mounts[e]&&(t.watching&&e in t.unwatch&&(t.unwatch[e](),delete t.unwatch[e]),n&&await KKe(t.mounts[e]),t.mountpoints=t.mountpoints.filter((t=>t!==e)),delete t.mounts[e])},getMount(e=""){e=zKe(e)+":";const t=n(e);return{driver:t.driver,base:t.base}},getMounts(e="",t={}){e=zKe(e);return r(e,t.parents).map((e=>({driver:e.driver,base:e.mountpoint})))}};return s}function qKe(e,t,n){return e.watch?e.watch(((e,r)=>t(e,n+r))):()=>{}}async function KKe(e){"function"==typeof e.dispose&&await FKe(e.dispose)}function XKe(e){return new Promise(((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)}))}function YKe(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=XKe(n);return(e,n)=>r.then((r=>n(r.transaction(t,e).objectStore(t))))}let JKe;function ZKe(){return JKe||(JKe=YKe("keyval-store","keyval")),JKe}function QKe(e,t=ZKe()){return t("readonly",(t=>XKe(t.get(e))))}function $Ke(e=ZKe()){return e("readonly",(e=>{if(e.getAllKeys)return XKe(e.getAllKeys());const t=[];return function(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},XKe(e.transaction)}(e,(e=>t.push(e.key))).then((()=>t))}))}const eXe=e=>JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString()+"n":t)),tXe=e=>{const t=e.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(t,((e,t)=>"string"==typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t))};function nXe(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return tXe(e)}catch(t){return e}}function rXe(e){return"string"==typeof e?e:eXe(e)||""}var iXe=(e={})=>{const t=e.base&&e.base.length>0?`${e.base}:`:"",n=e=>t+e;let r;return e.dbName&&e.storeName&&(r=YKe(e.dbName,e.storeName)),{name:"idb-keyval",options:e,hasItem:async e=>!(typeof await QKe(n(e),r)>"u"),getItem:async e=>await QKe(n(e),r)??null,setItem:(e,t)=>function(e,t,n=ZKe()){return n("readwrite",(n=>(n.put(t,e),XKe(n.transaction))))}(n(e),t,r),removeItem:e=>function(e,t=ZKe()){return t("readwrite",(t=>(t.delete(e),XKe(t.transaction))))}(n(e),r),getKeys:()=>$Ke(r),clear:()=>function(e=ZKe()){return e("readwrite",(e=>(e.clear(),XKe(e.transaction))))}(r)}};var aXe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},oXe={exports:{}};function sXe(e){var t;return[e[0],nXe(null!=(t=e[1])?t:"")]}!function(){let e;function t(){}e=t,e.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},e.prototype.setItem=function(e,t){this[e]=String(t)},e.prototype.removeItem=function(e){delete this[e]},e.prototype.clear=function(){const e=this;Object.keys(e).forEach((function(t){e[t]=void 0,delete e[t]}))},e.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},e.prototype.__defineGetter__("length",(function(){return Object.keys(this).length})),typeof aXe<"u"&&aXe.localStorage?oXe.exports=aXe.localStorage:typeof window<"u"&&window.localStorage?oXe.exports=window.localStorage:oXe.exports=new t}();const cXe=async(e,t)=>{t.length&&t.forEach((async t=>{await e.removeItem(t)}))};var uXe={},lXe={},dXe=dt(iWe),fXe={},pXe={};let hXe=class{};var mXe,yXe,bXe=dt(Object.freeze({__proto__:null,IEvents:hXe}));function gXe(){return yXe||(yXe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});YD.__exportStar(function(){if(mXe)return pXe;mXe=1,Object.defineProperty(pXe,"__esModule",{value:!0}),pXe.IHeartBeat=void 0;const e=bXe;class t extends e.IEvents{constructor(e){super()}}return pXe.IHeartBeat=t,pXe}(),e)}(fXe)),fXe}var vXe,wXe,TXe,EXe={},AXe={};function xXe(){return wXe||(wXe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});YD.__exportStar(function(){if(vXe)return AXe;vXe=1,Object.defineProperty(AXe,"__esModule",{value:!0}),AXe.HEARTBEAT_EVENTS=AXe.HEARTBEAT_INTERVAL=void 0;const e=fGe;return AXe.HEARTBEAT_INTERVAL=e.FIVE_SECONDS,AXe.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},AXe}(),e)}(EXe)),EXe}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=YD;t.__exportStar(function(){if(TXe)return lXe;TXe=1,Object.defineProperty(lXe,"__esModule",{value:!0}),lXe.HeartBeat=void 0;const e=YD,t=dXe,n=fGe,r=gXe(),i=xXe();class a extends r.IHeartBeat{constructor(e){super(e),this.events=new t.EventEmitter,this.interval=i.HEARTBEAT_INTERVAL,this.interval=(null==e?void 0:e.interval)||i.HEARTBEAT_INTERVAL}static init(t){return e.__awaiter(this,void 0,void 0,(function*(){const e=new a(t);return yield e.init(),e}))}init(){return e.__awaiter(this,void 0,void 0,(function*(){yield this.initialize()}))}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}initialize(){return e.__awaiter(this,void 0,void 0,(function*(){this.intervalRef=setInterval((()=>this.pulse()),n.toMiliseconds(this.interval))}))}pulse(){this.events.emit(i.HEARTBEAT_EVENTS.pulse)}}return lXe.HeartBeat=a,lXe}(),e),t.__exportStar(gXe(),e),t.__exportStar(xXe(),e)}(uXe);var OXe,CXe,IXe,SXe,_Xe={};function PXe(){if(SXe)return IXe;SXe=1;const e=function(){if(CXe)return OXe;function e(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}return CXe=1,OXe=function(t,n,r){var i=r&&r.stringify||e;if("object"==typeof t&&null!==t){var a=n.length+1;if(1===a)return t;var o=new Array(a);o[0]=i(t);for(var s=1;s<a;s++)o[s]=i(n[s]);return o.join(" ")}if("string"!=typeof t)return t;var c=n.length;if(0===c)return t;for(var u="",l=0,d=-1,f=t&&t.length||0,p=0;p<f;){if(37===t.charCodeAt(p)&&p+1<f){switch(d=d>-1?d:0,t.charCodeAt(p+1)){case 100:case 102:if(l>=c)break;if(null==n[l])break;d<p&&(u+=t.slice(d,p)),u+=Number(n[l]),d=p+2,p++;break;case 105:if(l>=c)break;if(null==n[l])break;d<p&&(u+=t.slice(d,p)),u+=Math.floor(Number(n[l])),d=p+2,p++;break;case 79:case 111:case 106:if(l>=c)break;if(void 0===n[l])break;d<p&&(u+=t.slice(d,p));var h=typeof n[l];if("string"===h){u+="'"+n[l]+"'",d=p+2,p++;break}if("function"===h){u+=n[l].name||"<anonymous>",d=p+2,p++;break}u+=i(n[l]),d=p+2,p++;break;case 115:if(l>=c)break;d<p&&(u+=t.slice(d,p)),u+=String(n[l]),d=p+2,p++;break;case 37:d<p&&(u+=t.slice(d,p)),u+="%",d=p+2,p++,l--}++l}++p}return-1===d?t:(d<f&&(u+=t.slice(d)),u)},OXe}();IXe=r;const t=function(){function e(e){return void 0!==e&&e}try{return"undefined"!=typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},n={mapHttpRequest:u,mapHttpResponse:u,wrapRequestSerializer:l,wrapResponseSerializer:l,wrapErrorSerializer:l,req:u,res:u,err:function(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const n in e)void 0===t[n]&&(t[n]=e[n]);return t}};function r(e){(e=e||{}).browser=e.browser||{};const n=e.browser.transmit;if(n&&"function"!=typeof n.send)throw Error("pino: transmit option must have a send function");const u=e.browser.write||t;e.browser.write&&(e.browser.asObject=!0);const l=e.serializers||{},f=function(e,t){if(Array.isArray(e)){const t=e.filter((function(e){return"!stdSerializers.err"!==e}));return t}return!0===e&&Object.keys(t)}(e.browser.serialize,l);let p=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(p=!1);"function"==typeof u&&(u.error=u.fatal=u.warn=u.info=u.debug=u.trace=u),!1===e.enabled&&(e.level="silent");const h=e.level||"info",m=Object.create(u);m.log||(m.log=d),Object.defineProperty(m,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(m,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,i(y,m,"error","log"),i(y,m,"fatal","error"),i(y,m,"warn","error"),i(y,m,"info","log"),i(y,m,"debug","log"),i(y,m,"trace","log")}});const y={transmit:n,serialize:f,asObject:e.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:c(e)};return m.levels=r.levels,m.level=h,m.setMaxListeners=m.getMaxListeners=m.emit=m.addListener=m.on=m.prependListener=m.once=m.prependOnceListener=m.removeListener=m.removeAllListeners=m.listeners=m.listenerCount=m.eventNames=m.write=m.flush=d,m.serializers=l,m._serialize=f,m._stdErrSerialize=p,m.child=function(t,r){if(!t)throw new Error("missing bindings for child Pino");r=r||{},f&&t.serializers&&(r.serializers=t.serializers);const i=r.serializers;if(f&&i){var c=Object.assign({},l,i),u=!0===e.browser.serialize?Object.keys(c):f;delete t.serializers,a([t],u,c,this._stdErrSerialize)}function d(e){this._childLevel=1+(0|e._childLevel),this.error=o(e,t,"error"),this.fatal=o(e,t,"fatal"),this.warn=o(e,t,"warn"),this.info=o(e,t,"info"),this.debug=o(e,t,"debug"),this.trace=o(e,t,"trace"),c&&(this.serializers=c,this._serialize=u),n&&(this._logEvent=s([].concat(e._logEvent.bindings,t)))}return d.prototype=this,new d(this)},n&&(m._logEvent=s()),m}function i(n,i,o,c){const u=Object.getPrototypeOf(i);i[o]=i.levelVal>i.levels.values[o]?d:u[o]?u[o]:t[o]||t[c]||d,function(n,i,o){if(!n.transmit&&i[o]===d)return;i[o]=function(c){return function(){const u=n.timestamp(),l=new Array(arguments.length),d=Object.getPrototypeOf&&Object.getPrototypeOf(this)===t?t:this;for(var f=0;f<l.length;f++)l[f]=arguments[f];if(n.serialize&&!n.asObject&&a(l,this._serialize,this.serializers,this._stdErrSerialize),n.asObject?c.call(d,function(t,n,i,o){t._serialize&&a(i,t._serialize,t.serializers,t._stdErrSerialize);const s=i.slice();let c=s[0];const u={};o&&(u.time=o);u.level=r.levels.values[n];let l=1+(0|t._childLevel);l<1&&(l=1);if(null!==c&&"object"==typeof c){for(;l--&&"object"==typeof s[0];)Object.assign(u,s.shift());c=s.length?e(s.shift(),s):void 0}else"string"==typeof c&&(c=e(s.shift(),s));void 0!==c&&(u.msg=c);return u}(this,o,l,u)):c.apply(d,l),n.transmit){const e=n.transmit.level||i.level,t=r.levels.values[e],c=r.levels.values[o];if(c<t)return;!function(e,t,n){const r=t.send,i=t.ts,o=t.methodLevel,c=t.methodValue,u=t.val,l=e._logEvent.bindings;a(n,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=n.filter((function(e){return-1===l.indexOf(e)})),e._logEvent.level.label=o,e._logEvent.level.value=c,r(o,e._logEvent,u),e._logEvent=s(l)}(this,{ts:u,methodLevel:o,methodValue:c,transmitLevel:e,transmitValue:r.levels.values[n.transmit.level||i.level],send:n.transmit.send,val:i.levelVal},l)}}}(i[o])}(n,i,o)}function a(e,t,n,i){for(const a in e)if(i&&e[a]instanceof Error)e[a]=r.stdSerializers.err(e[a]);else if("object"==typeof e[a]&&!Array.isArray(e[a]))for(const r in e[a])t&&t.indexOf(r)>-1&&r in n&&(e[a][r]=n[r](e[a][r]))}function o(e,t,n){return function(){const r=new Array(1+arguments.length);r[0]=t;for(var i=1;i<r.length;i++)r[i]=arguments[i-1];return e[n].apply(this,r)}}function s(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function c(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?f:p}function u(){return{}}function l(e){return e}function d(){}function f(){return!1}function p(){return Date.now()}return r.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},r.stdSerializers=n,r.stdTimeFunctions=Object.assign({},{nullTime:f,epochTime:p,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),IXe}var kXe,RXe={};function NXe(){return kXe||(kXe=1,Object.defineProperty(RXe,"__esModule",{value:!0}),RXe.PINO_CUSTOM_CONTEXT_KEY=RXe.PINO_LOGGER_DEFAULTS=void 0,RXe.PINO_LOGGER_DEFAULTS={level:"info"},RXe.PINO_CUSTOM_CONTEXT_KEY="custom_context"),RXe}var MXe,DXe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pino=void 0;const t=YD,n=t.__importDefault(PXe());Object.defineProperty(e,"pino",{enumerable:!0,get:function(){return n.default}}),t.__exportStar(NXe(),e),t.__exportStar(function(){if(MXe)return DXe;MXe=1,Object.defineProperty(DXe,"__esModule",{value:!0}),DXe.generateChildLogger=DXe.formatChildLoggerContext=DXe.getLoggerContext=DXe.setBrowserLoggerContext=DXe.getBrowserLoggerContext=DXe.getDefaultLoggerOptions=void 0;const e=NXe();function t(t,n=e.PINO_CUSTOM_CONTEXT_KEY){return t[n]||""}function n(t,n,r=e.PINO_CUSTOM_CONTEXT_KEY){return t[r]=n,t}function r(n,r=e.PINO_CUSTOM_CONTEXT_KEY){let i="";return i=void 0===n.bindings?t(n,r):n.bindings().context||"",i}function i(t,n,i=e.PINO_CUSTOM_CONTEXT_KEY){const a=r(t,i);return a.trim()?`${a}/${n}`:n}return DXe.getDefaultLoggerOptions=function(t){return Object.assign(Object.assign({},t),{level:(null==t?void 0:t.level)||e.PINO_LOGGER_DEFAULTS.level})},DXe.getBrowserLoggerContext=t,DXe.setBrowserLoggerContext=n,DXe.getLoggerContext=r,DXe.formatChildLoggerContext=i,DXe.generateChildLogger=function(t,r,a=e.PINO_CUSTOM_CONTEXT_KEY){const o=i(t,r,a);return n(t.child({context:o}),o,a)},DXe}(),e)}(_Xe);let LXe=class extends hXe{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}},FXe=class extends hXe{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}},BXe=class{constructor(e,t){this.logger=e,this.core=t}},jXe=class extends hXe{constructor(e,t){super(),this.relayer=e,this.logger=t}},UXe=class extends hXe{constructor(e){super()}},zXe=class{constructor(e,t,n,r){this.core=e,this.logger=t,this.name=n}},HXe=class extends hXe{constructor(e,t){super(),this.relayer=e,this.logger=t}},WXe=class extends hXe{constructor(e,t){super(),this.core=e,this.logger=t}},VXe=class{constructor(e,t){this.projectId=e,this.logger=t}},GXe=class{constructor(e,t){this.projectId=e,this.logger=t}},qXe=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}},KXe=class{constructor(e){this.client=e}};var XXe={},YXe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=sWe,n=wWe;e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var r=function(){function r(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return r.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},r.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},r.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._tempHi),n.wipe(this._tempLo),this.reset()},r.prototype.update=function(t,n){if(void 0===n&&(n=t.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var r=0;if(this._bytesHashed+=n,this._bufferLength>0){for(;this._bufferLength<e.BLOCK_SIZE&&n>0;)this._buffer[this._bufferLength++]=t[r++],n--;this._bufferLength===this.blockSize&&(a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(n>=this.blockSize&&(r=a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,t,r,n),n%=this.blockSize);n>0;)this._buffer[this._bufferLength++]=t[r++],n--;return this},r.prototype.finish=function(e){if(!this._finished){var n=this._bytesHashed,r=this._bufferLength,i=n/536870912|0,o=n<<3,s=n%128<112?128:256;this._buffer[r]=128;for(var c=r+1;c<s-8;c++)this._buffer[c]=0;t.writeUint32BE(i,this._buffer,s-8),t.writeUint32BE(o,this._buffer,s-4),a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,s),this._finished=!0}for(c=0;c<this.digestLength/8;c++)t.writeUint32BE(this._stateHi[c],e,8*c),t.writeUint32BE(this._stateLo[c],e,8*c+4);return this},r.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},r.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},r.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},r.prototype.cleanSavedState=function(e){n.wipe(e.stateHi),n.wipe(e.stateLo),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},r}();e.SHA512=r;var i=new Int32Array([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 a(e,n,r,a,o,s,c){for(var u,l,d,f,p,h,m,y,b=r[0],g=r[1],v=r[2],w=r[3],T=r[4],E=r[5],A=r[6],x=r[7],O=a[0],C=a[1],I=a[2],S=a[3],_=a[4],P=a[5],k=a[6],R=a[7];c>=128;){for(var N=0;N<16;N++){var M=8*N+s;e[N]=t.readUint32BE(o,M),n[N]=t.readUint32BE(o,M+4)}for(N=0;N<80;N++){var D,L,F=b,B=g,j=v,U=w,z=T,H=E,W=A,V=O,G=C,q=I,K=S,X=_,Y=P,J=k;if(p=65535&(l=R),h=l>>>16,m=65535&(u=x),y=u>>>16,p+=65535&(l=(_>>>14|T<<18)^(_>>>18|T<<14)^(T>>>9|_<<23)),h+=l>>>16,m+=65535&(u=(T>>>14|_<<18)^(T>>>18|_<<14)^(_>>>9|T<<23)),y+=u>>>16,p+=65535&(l=_&P^~_&k),h+=l>>>16,m+=65535&(u=T&E^~T&A),y+=u>>>16,u=i[2*N],p+=65535&(l=i[2*N+1]),h+=l>>>16,m+=65535&u,y+=u>>>16,u=e[N%16],h+=(l=n[N%16])>>>16,m+=65535&u,y+=u>>>16,m+=(h+=(p+=65535&l)>>>16)>>>16,p=65535&(l=f=65535&p|h<<16),h=l>>>16,m=65535&(u=d=65535&m|(y+=m>>>16)<<16),y=u>>>16,p+=65535&(l=(O>>>28|b<<4)^(b>>>2|O<<30)^(b>>>7|O<<25)),h+=l>>>16,m+=65535&(u=(b>>>28|O<<4)^(O>>>2|b<<30)^(O>>>7|b<<25)),y+=u>>>16,h+=(l=O&C^O&I^C&I)>>>16,m+=65535&(u=b&g^b&v^g&v),y+=u>>>16,D=65535&(m+=(h+=(p+=65535&l)>>>16)>>>16)|(y+=m>>>16)<<16,L=65535&p|h<<16,p=65535&(l=K),h=l>>>16,m=65535&(u=U),y=u>>>16,h+=(l=f)>>>16,m+=65535&(u=d),y+=u>>>16,g=F,v=B,w=j,T=U=65535&(m+=(h+=(p+=65535&l)>>>16)>>>16)|(y+=m>>>16)<<16,E=z,A=H,x=W,b=D,C=V,I=G,S=q,_=K=65535&p|h<<16,P=X,k=Y,R=J,O=L,N%16==15)for(M=0;M<16;M++)u=e[M],p=65535&(l=n[M]),h=l>>>16,m=65535&u,y=u>>>16,u=e[(M+9)%16],p+=65535&(l=n[(M+9)%16]),h+=l>>>16,m+=65535&u,y+=u>>>16,d=e[(M+1)%16],p+=65535&(l=((f=n[(M+1)%16])>>>1|d<<31)^(f>>>8|d<<24)^(f>>>7|d<<25)),h+=l>>>16,m+=65535&(u=(d>>>1|f<<31)^(d>>>8|f<<24)^d>>>7),y+=u>>>16,d=e[(M+14)%16],h+=(l=((f=n[(M+14)%16])>>>19|d<<13)^(d>>>29|f<<3)^(f>>>6|d<<26))>>>16,m+=65535&(u=(d>>>19|f<<13)^(f>>>29|d<<3)^d>>>6),y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,e[M]=65535&m|y<<16,n[M]=65535&p|h<<16}p=65535&(l=O),h=l>>>16,m=65535&(u=b),y=u>>>16,u=r[0],h+=(l=a[0])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[0]=b=65535&m|y<<16,a[0]=O=65535&p|h<<16,p=65535&(l=C),h=l>>>16,m=65535&(u=g),y=u>>>16,u=r[1],h+=(l=a[1])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[1]=g=65535&m|y<<16,a[1]=C=65535&p|h<<16,p=65535&(l=I),h=l>>>16,m=65535&(u=v),y=u>>>16,u=r[2],h+=(l=a[2])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[2]=v=65535&m|y<<16,a[2]=I=65535&p|h<<16,p=65535&(l=S),h=l>>>16,m=65535&(u=w),y=u>>>16,u=r[3],h+=(l=a[3])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[3]=w=65535&m|y<<16,a[3]=S=65535&p|h<<16,p=65535&(l=_),h=l>>>16,m=65535&(u=T),y=u>>>16,u=r[4],h+=(l=a[4])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[4]=T=65535&m|y<<16,a[4]=_=65535&p|h<<16,p=65535&(l=P),h=l>>>16,m=65535&(u=E),y=u>>>16,u=r[5],h+=(l=a[5])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[5]=E=65535&m|y<<16,a[5]=P=65535&p|h<<16,p=65535&(l=k),h=l>>>16,m=65535&(u=A),y=u>>>16,u=r[6],h+=(l=a[6])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[6]=A=65535&m|y<<16,a[6]=k=65535&p|h<<16,p=65535&(l=R),h=l>>>16,m=65535&(u=x),y=u>>>16,u=r[7],h+=(l=a[7])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[7]=x=65535&m|y<<16,a[7]=R=65535&p|h<<16,s+=128,c-=128}return s}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}}(YXe),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.convertSecretKeyToX25519=e.convertPublicKeyToX25519=e.verify=e.sign=e.extractPublicKeyFromSecretKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.SEED_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=e.SIGNATURE_LENGTH=void 0;const t=zWe,n=YXe,r=wWe;function i(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;new Uint8Array(32)[0]=9;const a=i(),o=i([1]),s=i([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=i([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),u=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),l=i([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=i([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function f(e,t){for(let n=0;n<16;n++)e[n]=0|t[n]}function p(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function h(e,t,n){const r=~(n-1);for(let n=0;n<16;n++){const i=r&(e[n]^t[n]);e[n]^=i,t[n]^=i}}function m(e,t){const n=i(),r=i();for(let e=0;e<16;e++)r[e]=t[e];p(r),p(r),p(r);for(let e=0;e<2;e++){n[0]=r[0]-65517;for(let e=1;e<15;e++)n[e]=r[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=r[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,h(r,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&r[t],e[2*t+1]=r[t]>>8}function y(e,t){let n=0;for(let r=0;r<32;r++)n|=e[r]^t[r];return(1&n-1>>>8)-1}function b(e,t){const n=new Uint8Array(32),r=new Uint8Array(32);return m(n,e),m(r,t),y(n,r)}function g(e){const t=new Uint8Array(32);return m(t,e),1&t[0]}function v(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function w(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function T(e,t,n){let r,i,a=0,o=0,s=0,c=0,u=0,l=0,d=0,f=0,p=0,h=0,m=0,y=0,b=0,g=0,v=0,w=0,T=0,E=0,A=0,x=0,O=0,C=0,I=0,S=0,_=0,P=0,k=0,R=0,N=0,M=0,D=0,L=n[0],F=n[1],B=n[2],j=n[3],U=n[4],z=n[5],H=n[6],W=n[7],V=n[8],G=n[9],q=n[10],K=n[11],X=n[12],Y=n[13],J=n[14],Z=n[15];r=t[0],a+=r*L,o+=r*F,s+=r*B,c+=r*j,u+=r*U,l+=r*z,d+=r*H,f+=r*W,p+=r*V,h+=r*G,m+=r*q,y+=r*K,b+=r*X,g+=r*Y,v+=r*J,w+=r*Z,r=t[1],o+=r*L,s+=r*F,c+=r*B,u+=r*j,l+=r*U,d+=r*z,f+=r*H,p+=r*W,h+=r*V,m+=r*G,y+=r*q,b+=r*K,g+=r*X,v+=r*Y,w+=r*J,T+=r*Z,r=t[2],s+=r*L,c+=r*F,u+=r*B,l+=r*j,d+=r*U,f+=r*z,p+=r*H,h+=r*W,m+=r*V,y+=r*G,b+=r*q,g+=r*K,v+=r*X,w+=r*Y,T+=r*J,E+=r*Z,r=t[3],c+=r*L,u+=r*F,l+=r*B,d+=r*j,f+=r*U,p+=r*z,h+=r*H,m+=r*W,y+=r*V,b+=r*G,g+=r*q,v+=r*K,w+=r*X,T+=r*Y,E+=r*J,A+=r*Z,r=t[4],u+=r*L,l+=r*F,d+=r*B,f+=r*j,p+=r*U,h+=r*z,m+=r*H,y+=r*W,b+=r*V,g+=r*G,v+=r*q,w+=r*K,T+=r*X,E+=r*Y,A+=r*J,x+=r*Z,r=t[5],l+=r*L,d+=r*F,f+=r*B,p+=r*j,h+=r*U,m+=r*z,y+=r*H,b+=r*W,g+=r*V,v+=r*G,w+=r*q,T+=r*K,E+=r*X,A+=r*Y,x+=r*J,O+=r*Z,r=t[6],d+=r*L,f+=r*F,p+=r*B,h+=r*j,m+=r*U,y+=r*z,b+=r*H,g+=r*W,v+=r*V,w+=r*G,T+=r*q,E+=r*K,A+=r*X,x+=r*Y,O+=r*J,C+=r*Z,r=t[7],f+=r*L,p+=r*F,h+=r*B,m+=r*j,y+=r*U,b+=r*z,g+=r*H,v+=r*W,w+=r*V,T+=r*G,E+=r*q,A+=r*K,x+=r*X,O+=r*Y,C+=r*J,I+=r*Z,r=t[8],p+=r*L,h+=r*F,m+=r*B,y+=r*j,b+=r*U,g+=r*z,v+=r*H,w+=r*W,T+=r*V,E+=r*G,A+=r*q,x+=r*K,O+=r*X,C+=r*Y,I+=r*J,S+=r*Z,r=t[9],h+=r*L,m+=r*F,y+=r*B,b+=r*j,g+=r*U,v+=r*z,w+=r*H,T+=r*W,E+=r*V,A+=r*G,x+=r*q,O+=r*K,C+=r*X,I+=r*Y,S+=r*J,_+=r*Z,r=t[10],m+=r*L,y+=r*F,b+=r*B,g+=r*j,v+=r*U,w+=r*z,T+=r*H,E+=r*W,A+=r*V,x+=r*G,O+=r*q,C+=r*K,I+=r*X,S+=r*Y,_+=r*J,P+=r*Z,r=t[11],y+=r*L,b+=r*F,g+=r*B,v+=r*j,w+=r*U,T+=r*z,E+=r*H,A+=r*W,x+=r*V,O+=r*G,C+=r*q,I+=r*K,S+=r*X,_+=r*Y,P+=r*J,k+=r*Z,r=t[12],b+=r*L,g+=r*F,v+=r*B,w+=r*j,T+=r*U,E+=r*z,A+=r*H,x+=r*W,O+=r*V,C+=r*G,I+=r*q,S+=r*K,_+=r*X,P+=r*Y,k+=r*J,R+=r*Z,r=t[13],g+=r*L,v+=r*F,w+=r*B,T+=r*j,E+=r*U,A+=r*z,x+=r*H,O+=r*W,C+=r*V,I+=r*G,S+=r*q,_+=r*K,P+=r*X,k+=r*Y,R+=r*J,N+=r*Z,r=t[14],v+=r*L,w+=r*F,T+=r*B,E+=r*j,A+=r*U,x+=r*z,O+=r*H,C+=r*W,I+=r*V,S+=r*G,_+=r*q,P+=r*K,k+=r*X,R+=r*Y,N+=r*J,M+=r*Z,r=t[15],w+=r*L,T+=r*F,E+=r*B,A+=r*j,x+=r*U,O+=r*z,C+=r*H,I+=r*W,S+=r*V,_+=r*G,P+=r*q,k+=r*K,R+=r*X,N+=r*Y,M+=r*J,D+=r*Z,a+=38*T,o+=38*E,s+=38*A,c+=38*x,u+=38*O,l+=38*C,d+=38*I,f+=38*S,p+=38*_,h+=38*P,m+=38*k,y+=38*R,b+=38*N,g+=38*M,v+=38*D,i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,a+=i-1+37*(i-1),i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=c,e[4]=u,e[5]=l,e[6]=d,e[7]=f,e[8]=p,e[9]=h,e[10]=m,e[11]=y,e[12]=b,e[13]=g,e[14]=v,e[15]=w}function E(e,t){T(e,t,t)}function A(e,t){const n=i();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)E(n,n),2!==r&&4!==r&&T(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function x(e,t){const n=i(),r=i(),a=i(),o=i(),s=i(),u=i(),l=i(),d=i(),f=i();w(n,e[1],e[0]),w(f,t[1],t[0]),T(n,n,f),v(r,e[0],e[1]),v(f,t[0],t[1]),T(r,r,f),T(a,e[3],t[3]),T(a,a,c),T(o,e[2],t[2]),v(o,o,o),w(s,r,n),w(u,o,a),v(l,o,a),v(d,r,n),T(e[0],s,u),T(e[1],d,l),T(e[2],l,u),T(e[3],s,d)}function O(e,t,n){for(let r=0;r<4;r++)h(e[r],t[r],n)}function C(e,t){const n=i(),r=i(),a=i();A(a,t[2]),T(n,t[0],a),T(r,t[1],a),m(e,r),e[31]^=g(n)<<7}function I(e,t,n){f(e[0],a),f(e[1],o),f(e[2],o),f(e[3],a);for(let r=255;r>=0;--r){const i=n[r/8|0]>>(7&r)&1;O(e,t,i),x(t,e),x(e,e),O(e,t,i)}}function S(e,t){const n=[i(),i(),i(),i()];f(n[0],u),f(n[1],l),f(n[2],o),T(n[3],u,l),I(e,n,t)}function _(t){if(t.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);const r=(0,n.hash)(t);r[0]&=248,r[31]&=127,r[31]|=64;const a=new Uint8Array(32),o=[i(),i(),i(),i()];S(o,r),C(a,o);const s=new Uint8Array(64);return s.set(t),s.set(a,32),{publicKey:a,secretKey:s}}e.generateKeyPairFromSeed=_,e.generateKeyPair=function(e){const n=(0,t.randomBytes)(32,e),i=_(n);return(0,r.wipe)(n),i},e.extractPublicKeyFromSecretKey=function(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(t.subarray(32))};const P=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function k(e,t){let n,r,i,a;for(r=63;r>=32;--r){for(n=0,i=r-32,a=r-12;i<a;++i)t[i]+=n-16*t[r]*P[i-(r-32)],n=Math.floor((t[i]+128)/256),t[i]-=256*n;t[i]+=n,t[r]=0}for(n=0,i=0;i<32;i++)t[i]+=n-(t[31]>>4)*P[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*P[i];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function R(e){const t=new Float64Array(64);for(let n=0;n<64;n++)t[n]=e[n];for(let t=0;t<64;t++)e[t]=0;k(e,t)}function N(e,t){const n=i(),r=i(),c=i(),u=i(),l=i(),p=i(),h=i();return f(e[2],o),function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(e[1],t),E(c,e[1]),T(u,c,s),w(c,c,e[2]),v(u,e[2],u),E(l,u),E(p,l),T(h,p,l),T(n,h,c),T(n,n,u),function(e,t){const n=i();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=250;r>=0;r--)E(n,n),1!==r&&T(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}(n,n),T(n,n,c),T(n,n,u),T(n,n,u),T(e[0],n,u),E(r,e[0]),T(r,r,u),b(r,c)&&T(e[0],e[0],d),E(r,e[0]),T(r,r,u),b(r,c)?-1:(g(e[0])===t[31]>>7&&w(e[0],a,e[0]),T(e[3],e[0],e[1]),0)}e.sign=function(e,t){const r=new Float64Array(64),a=[i(),i(),i(),i()],o=(0,n.hash)(e.subarray(0,32));o[0]&=248,o[31]&=127,o[31]|=64;const s=new Uint8Array(64);s.set(o.subarray(32),32);const c=new n.SHA512;c.update(s.subarray(32)),c.update(t);const u=c.digest();c.clean(),R(u),S(a,u),C(s,a),c.reset(),c.update(s.subarray(0,32)),c.update(e.subarray(32)),c.update(t);const l=c.digest();R(l);for(let e=0;e<32;e++)r[e]=u[e];for(let e=0;e<32;e++)for(let t=0;t<32;t++)r[e+t]+=l[e]*o[t];return k(s.subarray(32),r),s},e.verify=function(t,r,a){const o=new Uint8Array(32),s=[i(),i(),i(),i()],c=[i(),i(),i(),i()];if(a.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if(N(c,t))return!1;const u=new n.SHA512;u.update(a.subarray(0,32)),u.update(t),u.update(r);const l=u.digest();return R(l),I(s,c,l),S(c,a.subarray(32)),x(s,c),C(o,s),!y(a,o)},e.convertPublicKeyToX25519=function(e){let t=[i(),i(),i(),i()];if(N(t,e))throw new Error("Ed25519: invalid public key");let n=i(),r=i(),a=t[1];v(n,o,a),w(r,o,a),A(r,r),T(n,n,r);let s=new Uint8Array(32);return m(s,n),s},e.convertSecretKeyToX25519=function(e){const t=(0,n.hash)(e.subarray(0,32));t[0]&=248,t[31]&=127,t[31]|=64;const i=new Uint8Array(t.subarray(0,32));return(0,r.wipe)(t),i}}(XXe);const JXe=".",ZXe="base64url",QXe="utf8",$Xe="utf8",eYe=":",tYe="did",nYe="key",rYe="base58btc",iYe="z",aYe="K36";function oYe(e){return QVe(ZVe(rXe(e),QXe),ZXe)}function sYe(e){const t=ZVe(aYe,rYe),n=iYe+QVe(QWe([t,e]),rYe);return[tYe,nYe,n].join(eYe)}function cYe(e){return QVe(e,ZXe)}function uYe(e=zWe.randomBytes(32)){return XXe.generateKeyPairFromSeed(e)}async function lYe(e,t,n,r,i=fGe.fromMiliseconds(Date.now())){const a={alg:"EdDSA",typ:"JWT"},o={iss:sYe(r.publicKey),sub:e,aud:t,iat:i,exp:i+n},s=ZVe([oYe((c={header:a,payload:o}).header),oYe(c.payload)].join(JXe),$Xe);var c;return function(e){return[oYe(e.header),oYe(e.payload),cYe(e.signature)].join(JXe)}({header:a,payload:o,signature:XXe.sign(r.secretKey,s)})}const dYe="INTERNAL_ERROR",fYe="SERVER_ERROR",pYe=[-32700,-32600,-32601,-32602,-32603],hYe={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[dYe]:{code:-32603,message:"Internal error"},[fYe]:{code:-32e3,message:"Server error"}},mYe=fYe;function yYe(e){return Object.keys(hYe).includes(e)?hYe[e]:hYe[mYe]}function bYe(e,t,n){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${t}`):e}var gYe,vYe={},wYe={};var TYe,EYe={};function AYe(e=3){return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function xYe(e=6){return BigInt(AYe(e))}function OYe(e,t,n){return{id:n||AYe(),jsonrpc:"2.0",method:e,params:t}}function CYe(e,t){return{id:e,jsonrpc:"2.0",result:t}}function IYe(e,t,n){return{id:e,jsonrpc:"2.0",error:SYe(t,n)}}function SYe(e,t){return void 0===e?yYe(dYe):("string"==typeof e&&(e=Object.assign(Object.assign({},yYe(fYe)),{message:e})),void 0!==t&&(e.data=t),n=e.code,pYe.includes(n)&&(e=function(e){const t=Object.values(hYe).find((t=>t.code===e));return t||hYe[mYe]}(e.code)),e);var n}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=YD;t.__exportStar(function(){if(gYe)return wYe;function e(){return(null==ut?void 0:ut.crypto)||(null==ut?void 0:ut.msCrypto)||{}}function t(){const t=e();return t.subtle||t.webkitSubtle}return gYe=1,Object.defineProperty(wYe,"__esModule",{value:!0}),wYe.isBrowserCryptoAvailable=wYe.getSubtleCrypto=wYe.getBrowerCrypto=void 0,wYe.getBrowerCrypto=e,wYe.getSubtleCrypto=t,wYe.isBrowserCryptoAvailable=function(){return!!e()&&!!t()},wYe}(),e),t.__exportStar(function(){if(TYe)return EYe;function e(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function t(){return"undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.node}return TYe=1,Object.defineProperty(EYe,"__esModule",{value:!0}),EYe.isBrowser=EYe.isNode=EYe.isReactNative=void 0,EYe.isReactNative=e,EYe.isNode=t,EYe.isBrowser=function(){return!e()&&!t()},EYe}(),e)}(vYe);class _Ye{}class PYe extends _Ye{constructor(){super()}}class kYe extends PYe{constructor(e){super()}}function RYe(e,t){const n=function(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return void 0!==n&&new RegExp(t).test(n)}function NYe(e){return RYe(e,"^https?:")}function MYe(e){return RYe(e,"^wss?:")}function DYe(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function LYe(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function FYe(e){return LYe(e)&&"method"in e}function BYe(e){return LYe(e)&&(jYe(e)||UYe(e))}function jYe(e){return"result"in e}function UYe(e){return"error"in e}class zYe extends kYe{constructor(e){super(e),this.events=new QHe,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(OYe(e.method,e.params||[],e.id||xYe().toString()),t)}async requestStrict(e,t){return new Promise((async(n,r)=>{if(!this.connection.connected)try{await this.open()}catch(e){r(e)}this.events.on(`${e.id}`,(e=>{UYe(e)?r(e.error):n(e.result)}));try{await this.connection.send(e,t)}catch(e){r(e)}}))}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),BYe(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",(e=>this.onPayload(e))),this.connection.on("close",(e=>this.onClose(e))),this.connection.on("error",(e=>this.events.emit("error",e))),this.connection.on("register_error",(e=>this.onClose())),this.hasRegisteredEventListeners=!0)}}const HYe=e=>e.split("?")[0],WYe=typeof WebSocket<"u"?WebSocket:typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:require("ws");var VYe={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=1,i=2,a=9007199254740991,o="[object Arguments]",s="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",l="[object Date]",d="[object Error]",f="[object Function]",p="[object GeneratorFunction]",h="[object Map]",m="[object Number]",y="[object Null]",b="[object Object]",g="[object Promise]",v="[object Proxy]",w="[object RegExp]",T="[object Set]",E="[object String]",A="[object Symbol]",x="[object Undefined]",O="[object WeakMap]",C="[object ArrayBuffer]",I="[object DataView]",S=/^\[object .+?Constructor\]$/,_=/^(?:0|[1-9]\d*)$/,P={};P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P[o]=P[s]=P[C]=P[u]=P[I]=P[l]=P[d]=P[f]=P[h]=P[m]=P[b]=P[w]=P[T]=P[E]=P[O]=!1;var k="object"==typeof ut&&ut&&ut.Object===Object&&ut,R="object"==typeof self&&self&&self.Object===Object&&self,N=k||R||Function("return this")(),M=t&&!t.nodeType&&t,D=M&&e&&!e.nodeType&&e,L=D&&D.exports===M,F=L&&k.process,B=function(){try{return F&&F.binding&&F.binding("util")}catch(e){}}(),j=B&&B.isTypedArray;function U(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function z(e,t){return e.has(t)}function H(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function W(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var V=Array.prototype,G=Function.prototype,q=Object.prototype,K=N["__core-js_shared__"],X=G.toString,Y=q.hasOwnProperty,J=function(){var e=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Z=q.toString,Q=RegExp("^"+X.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=L?N.Buffer:void 0,ee=N.Symbol,te=N.Uint8Array,ne=q.propertyIsEnumerable,re=V.splice,ie=ee?ee.toStringTag:void 0,ae=Object.getOwnPropertySymbols,oe=$?$.isBuffer:void 0,se=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),ce=Le(N,"DataView"),ue=Le(N,"Map"),le=Le(N,"Promise"),de=Le(N,"Set"),fe=Le(N,"WeakMap"),pe=Le(Object,"create"),he=Ue(ce),me=Ue(ue),ye=Ue(le),be=Ue(de),ge=Ue(fe),ve=ee?ee.prototype:void 0,we=ve?ve.valueOf:void 0;function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ae(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ae;++t<n;)this.add(e[t])}function Oe(e){var t=this.__data__=new Ee(e);this.size=t.size}function Ce(e,t){var n=We(e),r=!n&&He(e),i=!n&&!r&&Ve(e),a=!n&&!r&&!i&&Je(e),o=n||r||i||a,s=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=s.length;for(var u in e)!t&&!Y.call(e,u)||o&&("length"==u||i&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||je(u,c))||s.push(u);return s}function Ie(e,t){for(var n=e.length;n--;)if(ze(e[n][0],t))return n;return-1}function Se(e){return null==e?void 0===e?x:y:ie&&ie in Object(e)?function(e){var t=Y.call(e,ie),n=e[ie];try{e[ie]=void 0;var r=!0}catch(e){}var i=Z.call(e);r&&(t?e[ie]=n:delete e[ie]);return i}(e):function(e){return Z.call(e)}(e)}function _e(e){return Xe(e)&&Se(e)==o}function Pe(e,t,n,a,c){return e===t||(null==e||null==t||!Xe(e)&&!Xe(t)?e!=e&&t!=t:function(e,t,n,a,c,f){var p=We(e),y=We(t),g=p?s:Be(e),v=y?s:Be(t),x=(g=g==o?b:g)==b,O=(v=v==o?b:v)==b,S=g==v;if(S&&Ve(e)){if(!Ve(t))return!1;p=!0,x=!1}if(S&&!x)return f||(f=new Oe),p||Je(e)?Ne(e,t,n,a,c,f):function(e,t,n,a,o,s,c){switch(n){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case C:return!(e.byteLength!=t.byteLength||!s(new te(e),new te(t)));case u:case l:case m:return ze(+e,+t);case d:return e.name==t.name&&e.message==t.message;case w:case E:return e==t+"";case h:var f=H;case T:var p=a&r;if(f||(f=W),e.size!=t.size&&!p)return!1;var y=c.get(e);if(y)return y==t;a|=i,c.set(e,t);var b=Ne(f(e),f(t),a,o,s,c);return c.delete(e),b;case A:if(we)return we.call(e)==we.call(t)}return!1}(e,t,g,n,a,c,f);if(!(n&r)){var _=x&&Y.call(e,"__wrapped__"),P=O&&Y.call(t,"__wrapped__");if(_||P){var k=_?e.value():e,R=P?t.value():t;return f||(f=new Oe),c(k,R,n,a,f)}}if(!S)return!1;return f||(f=new Oe),function(e,t,n,i,a,o){var s=n&r,c=Me(e),u=c.length,l=Me(t),d=l.length;if(u!=d&&!s)return!1;var f=u;for(;f--;){var p=c[f];if(!(s?p in t:Y.call(t,p)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var m=!0;o.set(e,t),o.set(t,e);var y=s;for(;++f<u;){var b=e[p=c[f]],g=t[p];if(i)var v=s?i(g,b,p,t,e,o):i(b,g,p,e,t,o);if(!(void 0===v?b===g||a(b,g,n,i,o):v)){m=!1;break}y||(y="constructor"==p)}if(m&&!y){var w=e.constructor,T=t.constructor;w==T||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof T&&T instanceof T||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,a,c,f)}(e,t,n,a,Pe,c))}function ke(e){return!(!Ke(e)||(t=e,J&&J in t))&&(Ge(e)?Q:S).test(Ue(e));var t}function Re(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||q,t!==r)return se(e);var t,n,r,i=[];for(var a in Object(e))Y.call(e,a)&&"constructor"!=a&&i.push(a);return i}function Ne(e,t,n,a,o,s){var c=n&r,u=e.length,l=t.length;if(u!=l&&!(c&&l>u))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var f=-1,p=!0,h=n&i?new xe:void 0;for(s.set(e,t),s.set(t,e);++f<u;){var m=e[f],y=t[f];if(a)var b=c?a(y,m,f,t,e,s):a(m,y,f,e,t,s);if(void 0!==b){if(b)continue;p=!1;break}if(h){if(!U(t,(function(e,t){if(!z(h,t)&&(m===e||o(m,e,n,a,s)))return h.push(t)}))){p=!1;break}}else if(m!==y&&!o(m,y,n,a,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function Me(e){return function(e,t,n){var r=t(e);return We(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Ze,Fe)}function De(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Le(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ke(n)?n:void 0}Te.prototype.clear=function(){this.__data__=pe?pe(null):{},this.size=0},Te.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Te.prototype.get=function(e){var t=this.__data__;if(pe){var r=t[e];return r===n?void 0:r}return Y.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__;return pe?void 0!==t[e]:Y.call(t,e)},Te.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=pe&&void 0===t?n:t,this},Ee.prototype.clear=function(){this.__data__=[],this.size=0},Ee.prototype.delete=function(e){var t=this.__data__,n=Ie(t,e);return!(n<0)&&(n==t.length-1?t.pop():re.call(t,n,1),--this.size,!0)},Ee.prototype.get=function(e){var t=this.__data__,n=Ie(t,e);return n<0?void 0:t[n][1]},Ee.prototype.has=function(e){return Ie(this.__data__,e)>-1},Ee.prototype.set=function(e,t){var n=this.__data__,r=Ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Ae.prototype.clear=function(){this.size=0,this.__data__={hash:new Te,map:new(ue||Ee),string:new Te}},Ae.prototype.delete=function(e){var t=De(this,e).delete(e);return this.size-=t?1:0,t},Ae.prototype.get=function(e){return De(this,e).get(e)},Ae.prototype.has=function(e){return De(this,e).has(e)},Ae.prototype.set=function(e,t){var n=De(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},xe.prototype.add=xe.prototype.push=function(e){return this.__data__.set(e,n),this},xe.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.clear=function(){this.__data__=new Ee,this.size=0},Oe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Oe.prototype.get=function(e){return this.__data__.get(e)},Oe.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ee){var r=n.__data__;if(!ue||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ae(r)}return n.set(e,t),this.size=n.size,this};var Fe=ae?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}(ae(e),(function(t){return ne.call(e,t)})))}:function(){return[]},Be=Se;function je(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||_.test(e))&&e>-1&&e%1==0&&e<t}function Ue(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function ze(e,t){return e===t||e!=e&&t!=t}(ce&&Be(new ce(new ArrayBuffer(1)))!=I||ue&&Be(new ue)!=h||le&&Be(le.resolve())!=g||de&&Be(new de)!=T||fe&&Be(new fe)!=O)&&(Be=function(e){var t=Se(e),n=t==b?e.constructor:void 0,r=n?Ue(n):"";if(r)switch(r){case he:return I;case me:return h;case ye:return g;case be:return T;case ge:return O}return t});var He=_e(function(){return arguments}())?_e:function(e){return Xe(e)&&Y.call(e,"callee")&&!ne.call(e,"callee")},We=Array.isArray;var Ve=oe||function(){return!1};function Ge(e){if(!Ke(e))return!1;var t=Se(e);return t==f||t==p||t==c||t==v}function qe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Ke(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Xe(e){return null!=e&&"object"==typeof e}var Ye,Je=j?(Ye=j,function(e){return Ye(e)}):function(e){return Xe(e)&&qe(e.length)&&!!P[Se(e)]};function Ze(e){return null!=(t=e)&&qe(t.length)&&!Ge(t)?Ce(e):Re(e);var t}e.exports=function(e,t){return Pe(e,t)}}(VYe,VYe.exports);var GYe=lt(VYe.exports),qYe=dt(tNe),KYe=lt(self.fetch||(self.fetch=qYe.default||qYe));var XYe=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var a=e.charAt(i),o=a.charCodeAt(0);if(255!==n[o])throw new TypeError(a+" is ambiguous");n[o]=i}var s=e.length,c=e.charAt(0),u=Math.log(s)/Math.log(256),l=Math.log(256)/Math.log(s);function d(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===c;)r++,t++;for(var a=(e.length-t)*u+1>>>0,o=new Uint8Array(a);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var d=0,f=a-1;(0!==l||d<i)&&-1!==f;f--,d++)l+=s*o[f]>>>0,o[f]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var p=a-i;p!==a&&0===o[p];)p++;for(var h=new Uint8Array(r+(a-p)),m=r;p!==a;)h[m++]=o[p++];return h}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,a=t.length;i!==a&&0===t[i];)i++,n++;for(var o=(a-i)*l+1>>>0,u=new Uint8Array(o);i!==a;){for(var d=t[i],f=0,p=o-1;(0!==d||f<r)&&-1!==p;p--,f++)d+=256*u[p]>>>0,u[p]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");r=f,i++}for(var h=o-r;h!==o&&0===u[h];)h++;for(var m=c.repeat(n);h<o;++h)m+=e.charAt(u[h]);return m},decodeUnsafe:d,decode:function(e){var n=d(e);if(n)return n;throw new Error(`Non-${t} character`)}}},YYe=XYe;const JYe=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class ZYe{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class QYe{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return eJe(this,e)}}class $Ye{constructor(e){this.decoders=e}or(e){return eJe(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const eJe=(e,t)=>new $Ye({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class tJe{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new ZYe(e,t,n),this.decoder=new QYe(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const nJe=({name:e,prefix:t,encode:n,decode:r})=>new tJe(e,t,n,r),rJe=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=YYe(n,t);return nJe({prefix:e,name:t,encode:r,decode:e=>JYe(i(e))})},iJe=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>nJe({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let a="",o=0,s=0;for(let r=0;r<e.length;++r)for(s=s<<8|e[r],o+=8;o>n;)o-=n,a+=t[i&s>>o];if(o&&(a+=t[i&s<<n-o]),r)for(;a.length*n&7;)a+="=";return a})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let a=e.length;for(;"="===e[a-1];)--a;const o=new Uint8Array(a*n/8|0);let s=0,c=0,u=0;for(let t=0;t<a;++t){const a=i[e[t]];if(void 0===a)throw new SyntaxError(`Non-${r} character`);c=c<<n|a,s+=n,s>=8&&(s-=8,o[u++]=255&c>>s)}if(s>=n||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return o})(t,r,n,e)}),aJe=nJe({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var oJe=Object.freeze({__proto__:null,identity:aJe});const sJe=iJe({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var cJe=Object.freeze({__proto__:null,base2:sJe});const uJe=iJe({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var lJe=Object.freeze({__proto__:null,base8:uJe});const dJe=rJe({prefix:"9",name:"base10",alphabet:"0123456789"});var fJe=Object.freeze({__proto__:null,base10:dJe});const pJe=iJe({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),hJe=iJe({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var mJe=Object.freeze({__proto__:null,base16:pJe,base16upper:hJe});const yJe=iJe({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),bJe=iJe({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),gJe=iJe({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),vJe=iJe({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),wJe=iJe({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),TJe=iJe({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),EJe=iJe({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),AJe=iJe({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),xJe=iJe({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var OJe=Object.freeze({__proto__:null,base32:yJe,base32upper:bJe,base32pad:gJe,base32padupper:vJe,base32hex:wJe,base32hexupper:TJe,base32hexpad:EJe,base32hexpadupper:AJe,base32z:xJe});const CJe=rJe({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),IJe=rJe({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var SJe=Object.freeze({__proto__:null,base36:CJe,base36upper:IJe});const _Je=rJe({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),PJe=rJe({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var kJe=Object.freeze({__proto__:null,base58btc:_Je,base58flickr:PJe});const RJe=iJe({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),NJe=iJe({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),MJe=iJe({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),DJe=iJe({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var LJe=Object.freeze({__proto__:null,base64:RJe,base64pad:NJe,base64url:MJe,base64urlpad:DJe});const FJe=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),BJe=FJe.reduce(((e,t,n)=>(e[n]=t,e)),[]),jJe=FJe.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const UJe=nJe({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=BJe[t]),"")},decode:function(e){const t=[];for(const n of e){const e=jJe[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var zJe=Object.freeze({__proto__:null,base256emoji:UJe}),HJe=function e(t,n,r){n=n||[];for(var i=r=r||0;t>=GJe;)n[r++]=255&t|WJe,t/=128;for(;t&VJe;)n[r++]=255&t|WJe,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},WJe=128,VJe=-128,GJe=Math.pow(2,31);var qJe=function e(t,n){var r,i=0,a=(n=n||0,0),o=n,s=t.length;do{if(o>=s)throw e.bytes=0,new RangeError("Could not decode varint");r=t[o++],i+=a<28?(r&XJe)<<a:(r&XJe)*Math.pow(2,a),a+=7}while(r>=KJe);return e.bytes=o-n,i},KJe=128,XJe=127;var YJe=Math.pow(2,7),JJe=Math.pow(2,14),ZJe=Math.pow(2,21),QJe=Math.pow(2,28),$Je=Math.pow(2,35),eZe=Math.pow(2,42),tZe=Math.pow(2,49),nZe=Math.pow(2,56),rZe=Math.pow(2,63),iZe={encode:HJe,decode:qJe,encodingLength:function(e){return e<YJe?1:e<JJe?2:e<ZJe?3:e<QJe?4:e<$Je?5:e<eZe?6:e<tZe?7:e<nZe?8:e<rZe?9:10}},aZe=iZe;const oZe=(e,t,n=0)=>(aZe.encode(e,t,n),t),sZe=e=>aZe.encodingLength(e),cZe=(e,t)=>{const n=t.byteLength,r=sZe(e),i=r+sZe(n),a=new Uint8Array(i+n);return oZe(e,a,0),oZe(n,a,r),a.set(t,i),new uZe(e,n,t,a)};let uZe=class{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}};const lZe=({name:e,code:t,encode:n})=>new dZe(e,t,n);let dZe=class{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?cZe(this.code,t):t.then((e=>cZe(this.code,e)))}throw Error("Unknown type, must be binary type")}};const fZe=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),pZe=lZe({name:"sha2-256",code:18,encode:fZe("SHA-256")}),hZe=lZe({name:"sha2-512",code:19,encode:fZe("SHA-512")});Object.freeze({__proto__:null,sha256:pZe,sha512:hZe});const mZe=JYe,yZe={code:0,name:"identity",encode:mZe,digest:e=>cZe(0,mZe(e))};Object.freeze({__proto__:null,identity:yZe});new TextEncoder,new TextDecoder;const bZe={...oJe,...cJe,...lJe,...fJe,...mJe,...OJe,...SJe,...kJe,...LJe,...zJe};function gZe(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function vZe(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const wZe=vZe("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),TZe=vZe("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{const t=function(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?gZe(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),EZe={utf8:wZe,"utf-8":wZe,hex:bZe.base16,latin1:TZe,ascii:TZe,binary:TZe,...bZe};const AZe="core",xZe=`wc@2:${AZe}:`,OZe="error",CZe={database:":memory:"},IZe="client_ed25519_seed",SZe=fGe.ONE_DAY,_Ze=fGe.SIX_HOURS,PZe="wss://relay.walletconnect.com",kZe="wss://relay.walletconnect.org",RZe="relayer_message",NZe="relayer_message_ack",MZe="relayer_connect",DZe="relayer_disconnect",LZe="relayer_error",FZe="relayer_connection_stalled",BZe="relayer_publish",jZe="payload",UZe="connect",zZe="disconnect",HZe="error",WZe=fGe.ONE_SECOND,VZe="subscription_created",GZe="subscription_deleted",qZe="subscription_sync",KZe="subscription_resubscribed",XZe=1e3*fGe.FIVE_SECONDS,YZe={wc_pairingDelete:{req:{ttl:fGe.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:fGe.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:fGe.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:fGe.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:fGe.ONE_DAY,prompt:!1,tag:0},res:{ttl:fGe.ONE_DAY,prompt:!1,tag:0}}},JZe="pairing_create",ZZe="pairing_expire",QZe="pairing_delete",$Ze="pairing_ping",eQe="history_created",tQe="history_updated",nQe="history_deleted",rQe="history_sync",iQe="expirer_created",aQe="expirer_deleted",oQe="expirer_expired",sQe="expirer_sync",cQe="verify-api",uQe="https://verify.walletconnect.com",lQe="https://verify.walletconnect.org",dQe=[uQe,lQe];let fQe=class extends BXe{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=xZe,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const e=await this.getRelayerMessages();typeof e<"u"&&(this.messages=e),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}finally{this.initialized=!0}}},this.set=async(e,t)=>{this.isInitialized();const n=fqe(t);let r=this.messages.get(e);return typeof r>"u"&&(r={}),typeof r[n]<"u"||(r[n]=t,this.messages.set(e,r),await this.persist()),n},this.get=e=>{this.isInitialized();let t=this.messages.get(e);return typeof t>"u"&&(t={}),t},this.has=(e,t)=>{this.isInitialized();return typeof this.get(e)[fqe(t)]<"u"},this.del=async e=>{this.isInitialized(),this.messages.delete(e),await this.persist()},this.logger=_Xe.generateChildLogger(e,this.name),this.core=t}get context(){return _Xe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,Mqe(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Dqe(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}}};class pQe extends jXe{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new QHe,this.name="publisher",this.queue=new Map,this.publishTimeout=fGe.toMiliseconds(2*fGe.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=async(e,t,n)=>{var r;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:n}});try{const i=n?.ttl||_Ze,a=Vqe(n),o=n?.prompt||!1,s=n?.tag||0,c=n?.id||xYe().toString(),u={topic:e,message:t,opts:{ttl:i,relay:a,prompt:o,tag:s,id:c}},l=setTimeout((()=>this.queue.set(c,u)),this.publishTimeout);try{await await Fqe(this.rpcPublish(e,t,i,a,o,s,c),this.publishTimeout,`Failed to publish payload, please try again. id:${c} tag:${s}`),this.removeRequestFromQueue(c),this.relayer.events.emit(BZe,u)}catch(e){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,null!=(r=n?.internal)&&r.throwOnFailedPublish)throw this.removeRequestFromQueue(c),e;return}finally{clearTimeout(l)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:n}})}catch(e){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(e),e}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.relayer=e,this.logger=_Xe.generateChildLogger(t,this.name),this.registerEventListeners()}get context(){return _Xe.getLoggerContext(this.logger)}rpcPublish(e,t,n,r,i,a,o){var s,c,u,l;const d={method:Gqe(r.protocol).publish,params:{topic:e,message:t,ttl:n,prompt:i,tag:a},id:o};return fKe(null==(s=d.params)?void 0:s.prompt)&&(null==(c=d.params)||delete c.prompt),fKe(null==(u=d.params)?void 0:u.tag)&&(null==(l=d.params)||delete l.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:d}),this.relayer.request(d)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach((async e=>{const{topic:t,message:n,opts:r}=e;await this.publish(t,n,r)}))}registerEventListeners(){this.relayer.core.heartbeat.on(uXe.HEARTBEAT_EVENTS.pulse,(()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(FZe);this.checkQueue()})),this.relayer.on(NZe,(e=>{this.removeRequestFromQueue(e.id.toString())}))}}class hQe{constructor(){this.map=new Map,this.set=(e,t)=>{const n=this.get(e);this.exists(e,t)||this.map.set(e,[...n,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u")return void this.map.delete(e);if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,t))return;const r=n.filter((e=>e!==t));r.length?this.map.set(e,r):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var mQe=Object.defineProperty,yQe=Object.defineProperties,bQe=Object.getOwnPropertyDescriptors,gQe=Object.getOwnPropertySymbols,vQe=Object.prototype.hasOwnProperty,wQe=Object.prototype.propertyIsEnumerable,TQe=(e,t,n)=>t in e?mQe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,EQe=(e,t)=>{for(var n in t||(t={}))vQe.call(t,n)&&TQe(e,n,t[n]);if(gQe)for(var n of gQe(t))wQe.call(t,n)&&TQe(e,n,t[n]);return e},AQe=(e,t)=>yQe(e,bQe(t));let xQe=class extends HXe{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new hQe,this.events=new QHe,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=xZe,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}});try{const n=Vqe(t),r={topic:e,relay:n};this.pending.set(e,r);const i=await this.rpcSubscribe(e,n);return this.onSubscribe(i,r),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}}),i}catch(e){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(e),e}},this.unsubscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),typeof t?.id<"u"?await this.unsubscribeById(e,t.id,t):await this.unsubscribeByTopic(e,t)},this.isSubscribed=async e=>{if(this.topics.includes(e))return!0;const t=`${this.pendingSubscriptionWatchLabel}_${e}`;return await new Promise(((n,r)=>{const i=new fGe.Watch;i.start(t);const a=setInterval((()=>{!this.pending.has(e)&&this.topics.includes(e)&&(clearInterval(a),i.stop(t),n(!0)),i.elapsed(t)>=XZe&&(clearInterval(a),i.stop(t),r(new Error("Subscription resolution timeout")))}),this.pollingInterval)})).catch((()=>!1))},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=_Xe.generateChildLogger(t,this.name),this.clientId=""}get context(){return _Xe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let n=!1;try{n=this.getSubscription(e).topic===t}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const n=this.topicMap.get(e);await Promise.all(n.map((async n=>await this.unsubscribeById(e,n,t))))}async unsubscribeById(e,t,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}});try{const r=Vqe(n);await this.rpcUnsubscribe(e,t,r);const i=uKe("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}})}catch(e){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(e),e}}async rpcSubscribe(e,t){const n={method:Gqe(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await Fqe(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(FZe)}return fqe(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const t={method:Gqe(e[0].relay.protocol).batchSubscribe,params:{topics:e.map((e=>e.topic))}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:t});try{return await await Fqe(this.relayer.request(t),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(FZe)}}rpcUnsubscribe(e,t,n){const r={method:Gqe(n.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r}),this.relayer.request(r)}onSubscribe(e,t){this.setSubscription(e,AQe(EQe({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach((e=>{this.setSubscription(e.id,EQe({},e)),this.pending.delete(e.topic)}))}async onUnsubscribe(e,t,n){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t))}addSubscription(e,t){this.subscriptions.set(e,EQe({},t)),this.topicMap.set(t.topic,e),this.events.emit(VZe,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:t}=cKe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(GZe,AQe(EQe({},n),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(qZe)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t<e;t++){const e=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(e)}}this.events.emit(KZe)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:e}=cKe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);lKe(t)&&this.onBatchSubscribe(t.map(((t,n)=>AQe(EQe({},e[n]),{id:t}))))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach((t=>{e.push(t)})),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(uXe.HEARTBEAT_EVENTS.pulse,(async()=>{await this.checkPending()})),this.relayer.on(MZe,(async()=>{await this.onConnect()})),this.relayer.on(DZe,(()=>{this.onDisconnect()})),this.events.on(VZe,(async e=>{const t=VZe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})),this.events.on(GZe,(async e=>{const t=GZe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise((e=>{const t=setInterval((()=>{this.restartInProgress||(clearInterval(t),e())}),this.pollingInterval)}))}};var OQe=Object.defineProperty,CQe=Object.getOwnPropertySymbols,IQe=Object.prototype.hasOwnProperty,SQe=Object.prototype.propertyIsEnumerable,_Qe=(e,t,n)=>t in e?OQe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let PQe=class extends UXe{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new QHe,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.request=async e=>{this.logger.debug("Publishing Request Payload");const t=e.id,n=this.provider.request(e);this.requestsInFlight.set(t,{promise:n,request:e});try{return await this.toEstablishConnection(),await n}catch(e){throw this.logger.debug("Failed to Publish Request"),this.logger.error(e),e}finally{this.requestsInFlight.delete(t)}},this.onPayloadHandler=e=>{this.onProviderPayload(e)},this.onConnectHandler=()=>{this.events.emit(MZe)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=e=>{this.logger.error(e),this.events.emit(LZe,e),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(jZe,this.onPayloadHandler),this.provider.on(UZe,this.onConnectHandler),this.provider.on(zZe,this.onDisconnectHandler),this.provider.on(HZe,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?_Xe.generateChildLogger(e.logger,this.name):_Xe.pino(_Xe.getDefaultLoggerOptions({level:e.logger||"error"})),this.messages=new fQe(this.logger,e.core),this.subscriber=new xQe(this,this.logger),this.publisher=new pQe(this,this.logger),this.relayUrl=e?.relayUrl||PZe,this.projectId=e.projectId,this.bundleId=function(){var e;try{return Sqe()&&typeof global<"u"&&typeof(null==global?void 0:global.Application)<"u"?null==(e=global.Application)?void 0:e.applicationId:void 0}catch{return}}(),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${kZe}...`),await this.restartTransport(kZe)}this.initialized=!0,setTimeout((async()=>{0===this.subscriber.topics.length&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)}),1e4)}get context(){return _Xe.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,t,n){this.isInitialized(),await this.publisher.publish(e,t,n),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var n;this.isInitialized();let r,i=(null==(n=this.subscriber.topicMap.get(e))?void 0:n[0])||"";if(i)return i;const a=t=>{t.topic===e&&(this.subscriber.off(VZe,a),r())};return await Promise.all([new Promise((e=>{r=e,this.subscriber.on(VZe,a)})),new Promise((async n=>{i=await this.subscriber.subscribe(e,t),n()}))]),i}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportClose(){this.requestsInFlight.size>0&&(this.logger.debug("Waiting for all in-flight requests to finish before closing transport..."),this.requestsInFlight.forEach((async e=>{await e.promise}))),this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await Fqe(this.provider.disconnect(),1e3,"provider.disconnect()").catch((()=>this.onProviderDisconnect())):this.connected&&await this.provider.disconnect()}async transportOpen(e){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise((e=>{if(!this.initialized)return e();this.subscriber.once(KZe,(()=>{e()}))})),new Promise((async(e,t)=>{try{await Fqe(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(e){return void t(e)}e()}))])}catch(e){this.logger.error(e);const t=e;if(!this.isConnectionStalled(t.message))throw e;this.provider.events.emit(zZe)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(e){await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await SKe())throw new Error("No internet connection detected. Please restart your network and try again.")}isConnectionStalled(e){return this.staleConnectionErrors.some((t=>e.includes(t)))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new zYe(new class{constructor(e){if(this.url=e,this.events=new QHe,this.registering=!1,!MYe(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise(((e,t)=>{typeof this.socket>"u"?t(new Error("Connection already closed")):(this.socket.onclose=t=>{this.onClose(t),e()},this.socket.close())}))}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(rXe(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!MYe(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return t(new Error("WebSocket connection is missing or invalid"));e(this.socket)}))}))}return this.url=e,this.registering=!0,new Promise(((t,n)=>{const r=new URLSearchParams(e).get("origin"),i=vYe.isReactNative()?{headers:{origin:r}}:{rejectUnauthorized:!DYe(e)},a=new WYe(e,[],i);typeof WebSocket<"u"||typeof global<"u"&&typeof global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u"?a.onerror=e=>{const t=e;n(this.emitError(t.error))}:a.on("error",(e=>{n(this.emitError(e))})),a.onopen=()=>{this.onOpen(a),t(a)}}))}onOpen(e){e.onmessage=e=>this.onPayload(e),e.onclose=e=>this.onClose(e),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?nXe(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=IYe(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return bYe(e,HYe(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const t=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${HYe(this.url)}`));return this.events.emit("register_error",t),t}}(Rqe({sdkVersion:"2.11.1",protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:n}=e;await this.messages.set(t,n)}async shouldIgnoreMessageEvent(e){const{topic:t,message:n}=e;if(!n||0===n.length)return this.logger.debug(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const r=this.messages.has(t,n);return r&&this.logger.debug(`Ignoring duplicate message: ${n}`),r}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),FYe(e)){if(!e.method.endsWith("_subscription"))return;const t=e.params,{topic:n,message:r,publishedAt:i}=t.data,a={topic:n,message:r,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(((e,t)=>{for(var n in t||(t={}))IQe.call(t,n)&&_Qe(e,n,t[n]);if(CQe)for(var n of CQe(t))SQe.call(t,n)&&_Qe(e,n,t[n]);return e})({type:"event",event:t.id},a)),this.events.emit(t.id,a),await this.acknowledgePayload(e),await this.onMessageEvent(a)}else BYe(e)&&this.events.emit(NZe,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(RZe,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=CYe(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(jZe,this.onPayloadHandler),this.provider.off(UZe,this.onConnectHandler),this.provider.off(zZe,this.onDisconnectHandler),this.provider.off(HZe,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(FZe,(()=>{this.restartTransport().catch((e=>this.logger.error(e)))}));let e=await SKe();_Ke((async t=>{this.initialized&&e!==t&&(e=t,t?await this.restartTransport().catch((e=>this.logger.error(e))):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch((e=>this.logger.error(e)))))}))}onProviderDisconnect(){this.events.emit(DZe),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout((async()=>{await this.restartTransport().catch((e=>this.logger.error(e)))}),fGe.toMiliseconds(WZe)))}isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise((e=>{const t=setInterval((()=>{this.connected&&(clearInterval(t),e())}),this.connectionStatusPollingInterval)}));await this.restartTransport()}}};var kQe=Object.defineProperty,RQe=Object.getOwnPropertySymbols,NQe=Object.prototype.hasOwnProperty,MQe=Object.prototype.propertyIsEnumerable,DQe=(e,t,n)=>t in e?kQe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LQe=(e,t)=>{for(var n in t||(t={}))NQe.call(t,n)&&DQe(e,n,t[n]);if(RQe)for(var n of RQe(t))MQe.call(t,n)&&DQe(e,n,t[n]);return e};let FQe=class extends zXe{constructor(e,t,n,r=xZe,i=void 0){super(e,t,n,r),this.core=e,this.logger=t,this.name=n,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=xZe,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>{this.getKey&&null!==e&&!fKe(e)?this.map.set(this.getKey(e),e):function(e){var t;return null==(t=e?.proposer)?void 0:t.publicKey}(e)?this.map.set(e.id,e):function(e){return e?.topic}(e)&&this.map.set(e.topic,e)})),this.cached=[],this.initialized=!0)},this.set=async(e,t)=>{this.isInitialized(),this.map.has(e)?await this.update(e,t):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:e,value:t}),this.map.set(e,t),await this.persist())},this.get=e=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:e}),this.getData(e)),this.getAll=e=>(this.isInitialized(),e?this.values.filter((t=>Object.keys(e).every((n=>GYe(t[n],e[n]))))):this.values),this.update=async(e,t)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:e,update:t});const n=LQe(LQe({},this.getData(e)),t);this.map.set(e,n),await this.persist()},this.delete=async(e,t)=>{this.isInitialized(),this.map.has(e)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:e,reason:t}),this.map.delete(e),await this.persist())},this.logger=_Xe.generateChildLogger(t,this.name),this.storagePrefix=r,this.getKey=i}get context(){return _Xe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){const{message:t}=cKe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:e}=cKe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}}},BQe=class extends FXe{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new QHe,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=xZe,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.records.set(e.id,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(e,t,n)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:e,request:t,chainId:n}),this.records.has(t.id))return;const r={id:t.id,topic:e,request:{method:t.method,params:t.params||null},chainId:n,expiry:Uqe(fGe.THIRTY_DAYS)};this.records.set(r.id,r),this.events.emit(eQe,r)},this.resolve=async e=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:e}),!this.records.has(e.id))return;const t=await this.getRecord(e.id);typeof t.response>"u"&&(t.response=UYe(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.events.emit(tQe,t))},this.get=async(e,t)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:e,id:t}),await this.getRecord(t)),this.delete=(e,t)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:t}),this.values.forEach((n=>{if(n.topic===e){if(typeof t<"u"&&n.id!==t)return;this.records.delete(n.id),this.events.emit(nQe,n)}}))},this.exists=async(e,t)=>(this.isInitialized(),!!this.records.has(t)&&(await this.getRecord(t)).topic===e),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=_Xe.generateChildLogger(t,this.name)}get context(){return _Xe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach((t=>{if(typeof t.response<"u")return;const n={topic:t.topic,request:OYe(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(n)})),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:t}=cKe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(rQe)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:e}=cKe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(eQe,(e=>{const t=eQe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(tQe,(e=>{const t=tQe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(nQe,(e=>{const t=nQe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.core.heartbeat.on(uXe.HEARTBEAT_EVENTS.pulse,(()=>{this.cleanup()}))}cleanup(){try{this.records.forEach((e=>{fGe.toMiliseconds(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))}))}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}}},jQe=class extends WXe{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new QHe,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=xZe,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.expirations.set(e.target,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=e=>{try{const t=this.formatTarget(e);return typeof this.getExpiration(t)<"u"}catch{return!1}},this.set=(e,t)=>{this.isInitialized();const n=this.formatTarget(e),r={target:n,expiry:t};this.expirations.set(n,r),this.checkExpiry(n,r),this.events.emit(iQe,{target:n,expiration:r})},this.get=e=>{this.isInitialized();const t=this.formatTarget(e);return this.getExpiration(t)},this.del=e=>{if(this.isInitialized(),this.has(e)){const t=this.formatTarget(e),n=this.getExpiration(t);this.expirations.delete(t),this.events.emit(aQe,{target:t,expiration:n})}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=_Xe.generateChildLogger(t,this.name)}get context(){return _Xe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return function(e){return Bqe("topic",e)}(e);if("number"==typeof e)return function(e){return Bqe("id",e)}(e);const{message:t}=cKe("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(sQe)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:e}=cKe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:t}=cKe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}checkExpiry(e,t){const{expiry:n}=t;fGe.toMiliseconds(n)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(oQe,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach(((e,t)=>this.checkExpiry(t,e)))}registerEventListeners(){this.core.heartbeat.on(uXe.HEARTBEAT_EVENTS.pulse,(()=>this.checkExpirations())),this.events.on(iQe,(e=>{const t=iQe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(oQe,(e=>{const t=oQe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(aQe,(e=>{const t=aQe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}}},UQe=class extends VXe{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=cQe,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async e=>{if(this.verifyDisabled||Sqe()||!_qe())return;const t=this.getVerifyUrl(e?.verifyUrl);this.verifyUrl!==t&&this.removeIframe(),this.verifyUrl=t;try{await this.createIframe()}catch(e){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(e)}if(!this.initialized){this.removeIframe(),this.verifyUrl=lQe;try{await this.createIframe()}catch(e){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(e),this.verifyDisabled=!0}}},this.register=async e=>{this.initialized?this.sendPost(e.attestationId):(this.addToQueue(e.attestationId),await this.init())},this.resolve=async e=>{if(this.isDevEnv)return"";const t=this.getVerifyUrl(e?.verifyUrl);let n;try{n=await this.fetchAttestation(e.attestationId,t)}catch(r){this.logger.info(`failed to resolve attestation: ${e.attestationId} from url: ${t}`),this.logger.info(r),n=await this.fetchAttestation(e.attestationId,lQe)}return n},this.fetchAttestation=async(e,t)=>{this.logger.info(`resolving attestation: ${e} from url: ${t}`);const n=this.startAbortTimer(2*fGe.ONE_SECOND),r=await fetch(`${t}/attestation/${e}`,{signal:this.abortController.signal});return clearTimeout(n),200===r.status?await r.json():void 0},this.addToQueue=e=>{this.queue.push(e)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach((e=>this.sendPost(e))),this.queue=[])},this.sendPost=e=>{var t;try{if(!this.iframe)return;null==(t=this.iframe.contentWindow)||t.postMessage(e,"*"),this.logger.info(`postMessage sent: ${e} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let e;const t=n=>{"verify_ready"===n.data&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",t),e())};await Promise.race([new Promise((n=>{if(document.getElementById(cQe))return n();window.addEventListener("message",t);const r=document.createElement("iframe");r.id=cQe,r.src=`${this.verifyUrl}/${this.projectId}`,r.style.display="none",document.body.append(r),this.iframe=r,e=n})),new Promise(((e,n)=>setTimeout((()=>{window.removeEventListener("message",t),n("verify iframe load timeout")}),fGe.toMiliseconds(fGe.FIVE_SECONDS))))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=e=>{let t=e||uQe;return dQe.includes(t)||(this.logger.info(`verify url: ${t}, not included in trusted list, assigning default: ${uQe}`),t=uQe),t},this.logger=_Xe.generateChildLogger(t,this.name),this.verifyUrl=uQe,this.abortController=new AbortController,this.isDevEnv=Iqe()&&process.env.IS_VITEST}get context(){return _Xe.getLoggerContext(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout((()=>this.abortController.abort()),fGe.toMiliseconds(e))}},zQe=class extends GXe{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context="echo",this.registerDeviceToken=async e=>{const{clientId:t,token:n,notificationType:r,enableEncrypted:i=!1}=e,a=`https://echo.walletconnect.com/${this.projectId}/clients`;await KYe(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:t,type:r,token:n,always_raw:i})})},this.logger=_Xe.generateChildLogger(t,this.context)}};var HQe=Object.defineProperty,WQe=Object.getOwnPropertySymbols,VQe=Object.prototype.hasOwnProperty,GQe=Object.prototype.propertyIsEnumerable,qQe=(e,t,n)=>t in e?HQe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,KQe=(e,t)=>{for(var n in t||(t={}))VQe.call(t,n)&&qQe(e,n,t[n]);if(WQe)for(var n of WQe(t))GQe.call(t,n)&&qQe(e,n,t[n]);return e};const XQe=class e extends LXe{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=AZe,this.events=new QHe,this.initialized=!1,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||PZe,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:_Xe.pino(_Xe.getDefaultLoggerOptions({level:e?.logger||OZe}));this.logger=_Xe.generateChildLogger(t,this.name),this.heartbeat=new uXe.HeartBeat,this.crypto=new class{constructor(e,t,n){this.core=e,this.logger=t,this.name="crypto",this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=e=>(this.isInitialized(),this.keychain.has(e)),this.getClientId=async()=>(this.isInitialized(),sYe(uYe(await this.getClientSeed()).publicKey)),this.generateKeyPair=()=>{this.isInitialized();const e=function(){const e=YWe.generateKeyPair();return{privateKey:QVe(e.secretKey,nqe),publicKey:QVe(e.publicKey,nqe)}}();return this.setPrivateKey(e.publicKey,e.privateKey)},this.signJWT=async e=>{this.isInitialized();const t=uYe(await this.getClientSeed()),n=dqe(),r=SZe;return await lYe(n,e,r,t)},this.generateSharedKey=(e,t,n)=>{this.isInitialized();const r=function(e,t){const n=YWe.sharedKey(ZVe(e,nqe),ZVe(t,nqe),!0);return QVe(new UWe(XWe.SHA256,n).expand(lqe),nqe)}(this.getPrivateKey(e),t);return this.setSymKey(r,n)},this.setSymKey=async(e,t)=>{this.isInitialized();const n=t||function(e){return QVe(XWe.hash(ZVe(e,nqe)),nqe)}(e);return await this.keychain.set(n,e),n},this.deleteKeyPair=async e=>{this.isInitialized(),await this.keychain.del(e)},this.deleteSymKey=async e=>{this.isInitialized(),await this.keychain.del(e)},this.encode=async(e,t,n)=>{this.isInitialized();const r=yqe(n),i=rXe(t);if(bqe(r)){const t=r.senderPublicKey,n=r.receiverPublicKey;e=await this.generateSharedKey(t,n)}const a=this.getSymKey(e),{type:o,senderPublicKey:s}=r;return hqe({type:o,symKey:a,message:i,senderPublicKey:s})},this.decode=async(e,t,n)=>{this.isInitialized();const r=function(e,t){const n=mqe(e);return yqe({type:pqe(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?QVe(n.senderPublicKey,nqe):void 0,receiverPublicKey:t?.receiverPublicKey})}(t,n);if(bqe(r)){const t=r.receiverPublicKey,n=r.senderPublicKey;e=await this.generateSharedKey(t,n)}try{const n=function(e){const t=new aWe.ChaCha20Poly1305(ZVe(e.symKey,nqe)),{sealed:n,iv:r}=mqe(e.encoded),i=t.open(r,n);if(null===i)throw new Error("Failed to decrypt");return QVe(i,iqe)}({symKey:this.getSymKey(e),encoded:t});return nXe(n)}catch(t){this.logger.error(`Failed to decode message from topic: '${e}', clientId: '${await this.getClientId()}'`),this.logger.error(t)}},this.getPayloadType=e=>pqe(mqe(e).type),this.getPayloadSenderPublicKey=e=>{const t=mqe(e);return t.senderPublicKey?QVe(t.senderPublicKey,nqe):void 0},this.core=e,this.logger=_Xe.generateChildLogger(t,this.name),this.keychain=n||new class{constructor(e,t){this.core=e,this.logger=t,this.keychain=new Map,this.name="keychain",this.version="0.3",this.initialized=!1,this.storagePrefix=xZe,this.init=async()=>{if(!this.initialized){const e=await this.getKeyChain();typeof e<"u"&&(this.keychain=e),this.initialized=!0}},this.has=e=>(this.isInitialized(),this.keychain.has(e)),this.set=async(e,t)=>{this.isInitialized(),this.keychain.set(e,t),await this.persist()},this.get=e=>{this.isInitialized();const t=this.keychain.get(e);if(typeof t>"u"){const{message:t}=cKe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t},this.del=async e=>{this.isInitialized(),this.keychain.delete(e),await this.persist()},this.core=e,this.logger=_Xe.generateChildLogger(t,this.name)}get context(){return _Xe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,Mqe(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Dqe(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}}}(this.core,this.logger)}get context(){return _Xe.getLoggerContext(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(IZe)}catch{e=dqe(),await this.keychain.set(IZe,e)}return function(e,t="utf8"){const n=EZe[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${e}`):gZe(globalThis.Buffer.from(e,"utf-8"))}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}}}(this,this.logger,e?.keychain),this.history=new BQe(this,this.logger),this.expirer=new jQe(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new class{constructor(){this.initialized=!1,this.setInitialized=e=>{this.storage=e,this.initialized=!0};const e=new class{constructor(){this.localStorage=oXe.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(sXe)}async getItem(e){const t=this.localStorage.getItem(e);if(null!==t)return nXe(t)}async setItem(e,t){this.localStorage.setItem(e,rXe(t))}async removeItem(e){this.localStorage.removeItem(e)}};this.storage=e;try{const t=new class{constructor(){this.indexedDb=GKe({driver:iXe({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map((e=>[e.key,e.value]))}async getItem(e){const t=await this.indexedDb.getItem(e);if(null!==t)return t}async setItem(e,t){await this.indexedDb.setItem(e,rXe(t))}async removeItem(e){await this.indexedDb.removeItem(e)}};(async(e,t,n)=>{const r="wc_storage_version",i=await t.getItem(r);if(i&&i>=1)return void n(t);const a=await e.getKeys();if(!a.length)return void n(t);const o=[];for(;a.length;){const n=a.shift();if(!n)continue;const r=n.toLowerCase();if(r.includes("wc@")||r.includes("walletconnect")||r.includes("wc_")||r.includes("wallet_connect")){const r=await e.getItem(n);await t.setItem(n,r),o.push(n)}}await t.setItem(r,1),n(t),cXe(e,o)})(e,t,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise((e=>{const t=setInterval((()=>{this.initialized&&(clearInterval(t),e())}),20)}))}}(KQe(KQe({},CZe),e?.storageOptions)),this.relayer=new PQe({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new class{constructor(e,t){this.core=e,this.logger=t,this.name="pairing",this.version="0.3",this.events=new QHe,this.initialized=!1,this.storagePrefix=xZe,this.ignoredPayloadTypes=[oqe],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:e})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...e])]},this.create=async()=>{this.isInitialized();const e=dqe(),t=await this.core.crypto.setSymKey(e),n=Uqe(fGe.FIVE_MINUTES),r={protocol:"irn"},i={topic:t,expiry:n,relay:r,active:!1},a=nKe({protocol:this.core.protocol,version:this.core.version,topic:t,symKey:e,relay:r,expiryTimestamp:n});return await this.pairings.set(t,i),await this.core.relayer.subscribe(t),this.core.expirer.set(t,n),{topic:t,uri:a}},this.pair=async e=>{this.isInitialized(),this.isValidPair(e);const{topic:t,symKey:n,relay:r,expiryTimestamp:i}=eKe(e.uri);let a;if(this.pairings.keys.includes(t)&&(a=this.pairings.get(t),a.active))throw new Error(`Pairing already exists: ${t}. Please try again with a new connection URI.`);const o=i||Uqe(fGe.FIVE_MINUTES),s={topic:t,relay:r,expiry:o,active:!1};return await this.pairings.set(t,s),this.core.expirer.set(t,o),e.activatePairing&&await this.activate({topic:t}),this.events.emit(JZe,s),this.core.crypto.keychain.has(t)||(await this.core.crypto.setSymKey(n,t),await this.core.relayer.subscribe(t,{relay:r})),s},this.activate=async({topic:e})=>{this.isInitialized();const t=Uqe(fGe.THIRTY_DAYS);await this.pairings.update(e,{active:!0,expiry:t}),this.core.expirer.set(e,t)},this.ping=async e=>{this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.pairings.keys.includes(t)){const e=await this.sendRequest(t,"wc_pairingPing",{}),{done:n,resolve:r,reject:i}=Lqe();this.events.once(Hqe("pairing_ping",e),(({error:e})=>{e?i(e):r()})),await n()}},this.updateExpiry=async({topic:e,expiry:t})=>{this.isInitialized(),await this.pairings.update(e,{expiry:t})},this.updateMetadata=async({topic:e,metadata:t})=>{this.isInitialized(),await this.pairings.update(e,{peerMetadata:t})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async e=>{this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;this.pairings.keys.includes(t)&&(await this.sendRequest(t,"wc_pairingDelete",uKe("USER_DISCONNECTED")),await this.deletePairing(t))},this.sendRequest=async(e,t,n)=>{const r=OYe(t,n),i=await this.core.crypto.encode(e,r),a=YZe[t].req;return this.core.history.set(e,r),this.core.relayer.publish(e,i,a),r.id},this.sendResult=async(e,t,n)=>{const r=CYe(e,n),i=await this.core.crypto.encode(t,r),a=await this.core.history.get(t,e),o=YZe[a.request.method].res;await this.core.relayer.publish(t,i,o),await this.core.history.resolve(r)},this.sendError=async(e,t,n)=>{const r=IYe(e,n),i=await this.core.crypto.encode(t,r),a=await this.core.history.get(t,e),o=YZe[a.request.method]?YZe[a.request.method].res:YZe.unregistered_method.res;await this.core.relayer.publish(t,i,o),await this.core.history.resolve(r)},this.deletePairing=async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,uKe("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(e),t?Promise.resolve():this.core.expirer.del(e)])},this.cleanup=async()=>{const e=this.pairings.getAll().filter((e=>zqe(e.expiry)));await Promise.all(e.map((e=>this.deletePairing(e.topic))))},this.onRelayEventRequest=e=>{const{topic:t,payload:n}=e;switch(n.method){case"wc_pairingPing":return this.onPairingPingRequest(t,n);case"wc_pairingDelete":return this.onPairingDeleteRequest(t,n);default:return this.onUnknownRpcMethodRequest(t,n)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:n}=e,r=(await this.core.history.get(t,n.id)).request.method;return"wc_pairingPing"===r?this.onPairingPingResponse(t,n):this.onUnknownRpcMethodResponse(r)},this.onPairingPingRequest=async(e,t)=>{const{id:n}=t;try{this.isValidPing({topic:e}),await this.sendResult(n,e,!0),this.events.emit($Ze,{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.logger.error(t)}},this.onPairingPingResponse=(e,t)=>{const{id:n}=t;setTimeout((()=>{jYe(t)?this.events.emit(Hqe("pairing_ping",n),{}):UYe(t)&&this.events.emit(Hqe("pairing_ping",n),{error:t.error})}),500)},this.onPairingDeleteRequest=async(e,t)=>{const{id:n}=t;try{this.isValidDisconnect({topic:e}),await this.deletePairing(e),this.events.emit(QZe,{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.logger.error(t)}},this.onUnknownRpcMethodRequest=async(e,t)=>{const{id:n,method:r}=t;try{if(this.registeredMethods.includes(r))return;const t=uKe("WC_METHOD_UNSUPPORTED",r);await this.sendError(n,e,t),this.logger.error(t)}catch(t){await this.sendError(n,e,t),this.logger.error(t)}},this.onUnknownRpcMethodResponse=e=>{this.registeredMethods.includes(e)||this.logger.error(uKe("WC_METHOD_UNSUPPORTED",e))},this.isValidPair=e=>{var t;if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`pair() params: ${e}`);throw new Error(t)}if(!function(e){if(pKe(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}(e.uri)){const{message:t}=cKe("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw new Error(t)}const n=eKe(e.uri);if(null==(t=n?.relay)||!t.protocol){const{message:e}=cKe("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(e)}if(null==n||!n.symKey){const{message:e}=cKe("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(e)}if(null!=n&&n.expiryTimestamp&&fGe.toMiliseconds(n?.expiryTimestamp)<Date.now()){const{message:e}=cKe("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw new Error(e)}},this.isValidPing=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidDisconnect=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidPairingTopic=async e=>{if(!pKe(e,!1)){const{message:t}=cKe("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.pairings.keys.includes(e)){const{message:t}=cKe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(zqe(this.pairings.get(e).expiry)){await this.deletePairing(e);const{message:t}=cKe("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}},this.core=e,this.logger=_Xe.generateChildLogger(t,this.name),this.pairings=new FQe(this.core,this.logger,this.name,this.storagePrefix)}get context(){return _Xe.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(RZe,(async e=>{const{topic:t,message:n}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const r=await this.core.crypto.decode(t,n);try{FYe(r)?(this.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):BYe(r)&&(await this.core.history.resolve(r),await this.onRelayEventResponse({topic:t,payload:r}),this.core.history.delete(t,r.id))}catch(e){this.logger.error(e)}}))}registerExpirerEvents(){this.core.expirer.on(oQe,(async e=>{const{topic:t}=jqe(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(ZZe,{topic:t}))}))}}(this,this.logger),this.verify=new UQe(this.projectId||"",this.logger),this.echoClient=new zQe(this.projectId||"",this.logger)}static async init(t){const n=new e(t);await n.initialize();const r=await n.crypto.getClientId();return await n.storage.setItem("WALLETCONNECT_CLIENT_ID",r),n}get context(){return _Xe.getLoggerContext(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}},YQe="client",JQe=`wc@2:${YQe}:`,ZQe=YQe,QQe="error",$Qe="WALLETCONNECT_DEEPLINK_CHOICE",e$e="Proposal expired",t$e=fGe.SEVEN_DAYS,n$e={wc_sessionPropose:{req:{ttl:fGe.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:fGe.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:fGe.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:fGe.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:fGe.ONE_DAY,prompt:!1,tag:1104},res:{ttl:fGe.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:fGe.ONE_DAY,prompt:!1,tag:1106},res:{ttl:fGe.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:fGe.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:fGe.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:fGe.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:fGe.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:fGe.ONE_DAY,prompt:!1,tag:1112},res:{ttl:fGe.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:fGe.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:fGe.THIRTY_SECONDS,prompt:!1,tag:1115}}},r$e={min:fGe.FIVE_MINUTES,max:fGe.SEVEN_DAYS},i$e="IDLE",a$e="ACTIVE",o$e=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var s$e=Object.defineProperty,c$e=Object.defineProperties,u$e=Object.getOwnPropertyDescriptors,l$e=Object.getOwnPropertySymbols,d$e=Object.prototype.hasOwnProperty,f$e=Object.prototype.propertyIsEnumerable,p$e=(e,t,n)=>t in e?s$e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,h$e=(e,t)=>{for(var n in t||(t={}))d$e.call(t,n)&&p$e(e,n,t[n]);if(l$e)for(var n of l$e(t))f$e.call(t,n)&&p$e(e,n,t[n]);return e},m$e=(e,t)=>c$e(e,u$e(t));class y$e extends KXe{constructor(e){super(e),this.name="engine",this.events=new QHe,this.initialized=!1,this.ignoredPayloadTypes=[oqe],this.requestQueue={state:i$e,queue:[]},this.sessionRequestQueue={state:i$e,queue:[]},this.requestQueueDelay=fGe.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(n$e)}),this.initialized=!0,setTimeout((()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()}),fGe.toMiliseconds(this.requestQueueDelay)))},this.connect=async e=>{await this.isInitialized();const t=m$e(h$e({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t);const{pairingTopic:n,requiredNamespaces:r,optionalNamespaces:i,sessionProperties:a,relays:o}=t;let s,c=n,u=!1;if(c&&(u=this.client.core.pairing.pairings.get(c).active),!c||!u){const{topic:e,uri:t}=await this.client.core.pairing.create();c=e,s=t}const l=await this.client.core.crypto.generateKeyPair(),d=n$e.wc_sessionPropose.req.ttl||fGe.FIVE_MINUTES,f=Uqe(d),p=h$e({requiredNamespaces:r,optionalNamespaces:i,relays:o??[{protocol:"irn"}],proposer:{publicKey:l,metadata:this.client.metadata},expiryTimestamp:f},a&&{sessionProperties:a}),{reject:h,resolve:m,done:y}=Lqe(d,e$e);if(this.events.once(Hqe("session_connect"),(async({error:e,session:t})=>{if(e)h(e);else if(t){t.self.publicKey=l;const e=m$e(h$e({},t),{requiredNamespaces:p.requiredNamespaces,optionalNamespaces:p.optionalNamespaces});await this.client.session.set(t.topic,e),await this.setExpiry(t.topic,t.expiry),c&&await this.client.core.pairing.updateMetadata({topic:c,metadata:t.peer.metadata}),m(e)}})),!c){const{message:e}=cKe("NO_MATCHING_KEY",`connect() pairing topic: ${c}`);throw new Error(e)}const b=await this.sendRequest({topic:c,method:"wc_sessionPropose",params:p,throwOnFailedPublish:!0});return await this.setProposal(b,h$e({id:b},p)),{uri:s,approval:y}},this.pair=async e=>(await this.isInitialized(),await this.client.core.pairing.pair(e)),this.approve=async e=>{await this.isInitialized(),await this.isValidApprove(e);const{id:t,relayProtocol:n,namespaces:r,sessionProperties:i}=e,a=this.client.proposal.get(t);let{pairingTopic:o,proposer:s,requiredNamespaces:c,optionalNamespaces:u}=a;o=o||"";const l=await this.client.core.crypto.generateKeyPair(),d=s.publicKey,f=await this.client.core.crypto.generateSharedKey(l,d);o&&t&&(await this.client.core.pairing.updateMetadata({topic:o,metadata:s.metadata}),await this.sendResult({id:t,topic:o,result:{relay:{protocol:n??"irn"},responderPublicKey:l}}),await this.client.proposal.delete(t,uKe("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:o}));const p=h$e({relay:{protocol:n??"irn"},namespaces:r,pairingTopic:o,controller:{publicKey:l,metadata:this.client.metadata},expiry:Uqe(t$e)},i&&{sessionProperties:i});await this.client.core.relayer.subscribe(f);const h=m$e(h$e({},p),{topic:f,requiredNamespaces:c,optionalNamespaces:u,pairingTopic:o,acknowledged:!1,self:p.controller,peer:{publicKey:s.publicKey,metadata:s.metadata},controller:l});await this.client.session.set(f,h);try{await this.sendRequest({topic:f,method:"wc_sessionSettle",params:p,throwOnFailedPublish:!0})}catch(e){throw this.client.logger.error(e),this.client.session.delete(f,uKe("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(f),e}return await this.setExpiry(f,Uqe(t$e)),{topic:f,acknowledged:()=>new Promise((e=>setTimeout((()=>e(this.client.session.get(f))),500)))}},this.reject=async e=>{await this.isInitialized(),await this.isValidReject(e);const{id:t,reason:n}=e,{pairingTopic:r}=this.client.proposal.get(t);r&&(await this.sendError(t,r,n),await this.client.proposal.delete(t,uKe("USER_DISCONNECTED")))},this.update=async e=>{await this.isInitialized(),await this.isValidUpdate(e);const{topic:t,namespaces:n}=e,r=await this.sendRequest({topic:t,method:"wc_sessionUpdate",params:{namespaces:n}}),{done:i,resolve:a,reject:o}=Lqe();return this.events.once(Hqe("session_update",r),(({error:e})=>{e?o(e):a()})),await this.client.session.update(t,{namespaces:n}),{acknowledged:i}},this.extend=async e=>{await this.isInitialized(),await this.isValidExtend(e);const{topic:t}=e,n=await this.sendRequest({topic:t,method:"wc_sessionExtend",params:{}}),{done:r,resolve:i,reject:a}=Lqe();return this.events.once(Hqe("session_extend",n),(({error:e})=>{e?a(e):i()})),await this.setExpiry(t,Uqe(t$e)),{acknowledged:r}},this.request=async e=>{await this.isInitialized(),await this.isValidRequest(e);const{chainId:t,request:n,topic:r,expiry:i=n$e.wc_sessionRequest.req.ttl}=e,a=AYe(),{done:o,resolve:s,reject:c}=Lqe(i,"Request expired. Please try again.");return this.events.once(Hqe("session_request",a),(({error:e,result:t})=>{e?c(e):s(t)})),await Promise.all([new Promise((async e=>{await this.sendRequest({clientRpcId:a,topic:r,method:"wc_sessionRequest",params:{request:m$e(h$e({},n),{expiryTimestamp:Uqe(i)}),chainId:t},expiry:i,throwOnFailedPublish:!0}).catch((e=>c(e))),this.client.events.emit("session_request_sent",{topic:r,request:n,chainId:t,id:a}),e()})),new Promise((async e=>{const t=await async function(e,t){try{return await e.getItem(t)||(_qe()?localStorage.getItem(t):void 0)}catch(e){console.error(e)}}(this.client.core.storage,$Qe);(async function({id:e,topic:t,wcDeepLink:n}){try{if(!n)return;const r="string"==typeof n?JSON.parse(n):n;let i=r?.href;if("string"!=typeof i)return;i.endsWith("/")&&(i=i.slice(0,-1));const a=`${i}/wc?requestId=${e}&sessionTopic=${t}`,o=Pqe();o===Oqe.browser?a.startsWith("https://")?window.open(a,"_blank","noreferrer noopener"):window.open(a,"_self","noreferrer noopener"):o===Oqe.reactNative&&typeof(null==global?void 0:global.Linking)<"u"&&await global.Linking.openURL(a)}catch(e){console.error(e)}})({id:a,topic:r,wcDeepLink:t}),e()})),o()]).then((e=>e[2]))},this.respond=async e=>{await this.isInitialized(),await this.isValidRespond(e);const{topic:t,response:n}=e,{id:r}=n;jYe(n)?await this.sendResult({id:r,topic:t,result:n.result,throwOnFailedPublish:!0}):UYe(n)&&await this.sendError(r,t,n.error),this.cleanupAfterResponse(e)},this.ping=async e=>{await this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.client.session.keys.includes(t)){const e=await this.sendRequest({topic:t,method:"wc_sessionPing",params:{}}),{done:n,resolve:r,reject:i}=Lqe();this.events.once(Hqe("session_ping",e),(({error:e})=>{e?i(e):r()})),await n()}else this.client.core.pairing.pairings.keys.includes(t)&&await this.client.core.pairing.ping({topic:t})},this.emit=async e=>{await this.isInitialized(),await this.isValidEmit(e);const{topic:t,event:n,chainId:r}=e;await this.sendRequest({topic:t,method:"wc_sessionEvent",params:{event:n,chainId:r}})},this.disconnect=async e=>{await this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;if(this.client.session.keys.includes(t))await this.sendRequest({topic:t,method:"wc_sessionDelete",params:uKe("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:t,emitEvent:!1});else{if(!this.client.core.pairing.pairings.keys.includes(t)){const{message:e}=cKe("MISMATCHED_TOPIC",`Session or pairing topic not found: ${t}`);throw new Error(e)}await this.client.core.pairing.disconnect({topic:t})}},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter((t=>function(e,t){const{requiredNamespaces:n}=t,r=Object.keys(e.namespaces),i=Object.keys(n);let a=!0;return!!Nqe(i,r)&&(r.forEach((t=>{const{accounts:r,methods:i,events:o}=e.namespaces[t],s=rKe(r),c=n[t];Nqe(eqe(t,c),s)&&Nqe(c.methods,i)&&Nqe(c.events,o)||(a=!1)})),a)}(t,e)))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.cleanupDuplicatePairings=async e=>{if(e.pairingTopic)try{const t=this.client.core.pairing.pairings.get(e.pairingTopic),n=this.client.core.pairing.pairings.getAll().filter((n=>{var r,i;return(null==(r=n.peerMetadata)?void 0:r.url)&&(null==(i=n.peerMetadata)?void 0:i.url)===e.peer.metadata.url&&n.topic&&n.topic!==t.topic}));if(0===n.length)return;this.client.logger.info(`Cleaning up ${n.length} duplicate pairing(s)`),await Promise.all(n.map((e=>this.client.core.pairing.disconnect({topic:e.topic})))),this.client.logger.info("Duplicate pairings clean up finished")}catch(e){this.client.logger.error(e)}},this.deleteSession=async e=>{const{topic:t,expirerHasDeleted:n=!1,emitEvent:r=!0,id:i=0}=e,{self:a}=this.client.session.get(t);await this.client.core.relayer.unsubscribe(t),await this.client.session.delete(t,uKe("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(a.publicKey)&&await this.client.core.crypto.deleteKeyPair(a.publicKey),this.client.core.crypto.keychain.has(t)&&await this.client.core.crypto.deleteSymKey(t),n||this.client.core.expirer.del(t),this.client.core.storage.removeItem($Qe).catch((e=>this.client.logger.warn(e))),this.getPendingSessionRequests().forEach((e=>{e.topic===t&&this.deletePendingSessionRequest(e.id,uKe("USER_DISCONNECTED"))})),r&&this.client.events.emit("session_delete",{id:i,topic:t})},this.deleteProposal=async(e,t)=>{await Promise.all([this.client.proposal.delete(e,uKe("USER_DISCONNECTED")),t?Promise.resolve():this.client.core.expirer.del(e)])},this.deletePendingSessionRequest=async(e,t,n=!1)=>{await Promise.all([this.client.pendingRequest.delete(e,t),n?Promise.resolve():this.client.core.expirer.del(e)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter((t=>t.id!==e)),n&&(this.sessionRequestQueue.state=i$e,this.client.events.emit("session_request_expire",{id:e}))},this.setExpiry=async(e,t)=>{this.client.session.keys.includes(e)&&await this.client.session.update(e,{expiry:t}),this.client.core.expirer.set(e,t)},this.setProposal=async(e,t)=>{await this.client.proposal.set(e,t),this.client.core.expirer.set(e,Uqe(n$e.wc_sessionPropose.req.ttl))},this.setPendingSessionRequest=async e=>{const{id:t,topic:n,params:r,verifyContext:i}=e,a=r.request.expiryTimestamp||Uqe(n$e.wc_sessionRequest.req.ttl);await this.client.pendingRequest.set(t,{id:t,topic:n,params:r,verifyContext:i}),a&&this.client.core.expirer.set(t,a)},this.sendRequest=async e=>{const{topic:t,method:n,params:r,expiry:i,relayRpcId:a,clientRpcId:o,throwOnFailedPublish:s}=e,c=OYe(n,r,o);if(_qe()&&o$e.includes(n)){const e=fqe(JSON.stringify(c));this.client.core.verify.register({attestationId:e})}const u=await this.client.core.crypto.encode(t,c),l=n$e[n].req;return i&&(l.ttl=i),a&&(l.id=a),this.client.core.history.set(t,c),s?(l.internal=m$e(h$e({},l.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(t,u,l)):this.client.core.relayer.publish(t,u,l).catch((e=>this.client.logger.error(e))),c.id},this.sendResult=async e=>{const{id:t,topic:n,result:r,throwOnFailedPublish:i}=e,a=CYe(t,r),o=await this.client.core.crypto.encode(n,a),s=await this.client.core.history.get(n,t),c=n$e[s.request.method].res;i?(c.internal=m$e(h$e({},c.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,o,c)):this.client.core.relayer.publish(n,o,c).catch((e=>this.client.logger.error(e))),await this.client.core.history.resolve(a)},this.sendError=async(e,t,n)=>{const r=IYe(e,n),i=await this.client.core.crypto.encode(t,r),a=await this.client.core.history.get(t,e),o=n$e[a.request.method].res;this.client.core.relayer.publish(t,i,o),await this.client.core.history.resolve(r)},this.cleanup=async()=>{const e=[],t=[];this.client.session.getAll().forEach((t=>{let n=!1;zqe(t.expiry)&&(n=!0),this.client.core.crypto.keychain.has(t.topic)||(n=!0),n&&e.push(t.topic)})),this.client.proposal.getAll().forEach((e=>{zqe(e.expiryTimestamp)&&t.push(e.id)})),await Promise.all([...e.map((e=>this.deleteSession({topic:e}))),...t.map((e=>this.deleteProposal(e)))])},this.onRelayEventRequest=async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state!==a$e){for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=a$e;const e=this.requestQueue.queue.shift();if(e)try{this.processRequest(e),await new Promise((e=>setTimeout(e,300)))}catch(e){this.client.logger.warn(e)}}this.requestQueue.state=i$e}else this.client.logger.info("Request queue already active, skipping...")},this.processRequest=e=>{const{topic:t,payload:n}=e,r=n.method;switch(r){case"wc_sessionPropose":return this.onSessionProposeRequest(t,n);case"wc_sessionSettle":return this.onSessionSettleRequest(t,n);case"wc_sessionUpdate":return this.onSessionUpdateRequest(t,n);case"wc_sessionExtend":return this.onSessionExtendRequest(t,n);case"wc_sessionPing":return this.onSessionPingRequest(t,n);case"wc_sessionDelete":return this.onSessionDeleteRequest(t,n);case"wc_sessionRequest":return this.onSessionRequest(t,n);case"wc_sessionEvent":return this.onSessionEventRequest(t,n);default:return this.client.logger.info(`Unsupported request method ${r}`)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:n}=e,r=(await this.client.core.history.get(t,n.id)).request.method;switch(r){case"wc_sessionPropose":return this.onSessionProposeResponse(t,n);case"wc_sessionSettle":return this.onSessionSettleResponse(t,n);case"wc_sessionUpdate":return this.onSessionUpdateResponse(t,n);case"wc_sessionExtend":return this.onSessionExtendResponse(t,n);case"wc_sessionPing":return this.onSessionPingResponse(t,n);case"wc_sessionRequest":return this.onSessionRequestResponse(t,n);default:return this.client.logger.info(`Unsupported response method ${r}`)}},this.onRelayEventUnknownPayload=e=>{const{topic:t}=e,{message:n}=cKe("MISSING_OR_INVALID",`Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);throw new Error(n)},this.onSessionProposeRequest=async(e,t)=>{const{params:n,id:r}=t;try{this.isValidConnect(h$e({},t.params));const i=n.expiryTimestamp||Uqe(n$e.wc_sessionPropose.req.ttl),a=h$e({id:r,pairingTopic:e,expiryTimestamp:i},n);await this.setProposal(r,a);const o=fqe(JSON.stringify(t)),s=await this.getVerifyContext(o,a.proposer.metadata);this.client.events.emit("session_proposal",{id:r,params:a,verifyContext:s})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionProposeResponse=async(e,t)=>{const{id:n}=t;if(jYe(t)){const{result:r}=t;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:r});const i=this.client.proposal.get(n);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:i});const a=i.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:a});const o=r.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:o});const s=await this.client.core.crypto.generateSharedKey(a,o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:s});const c=await this.client.core.relayer.subscribe(s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:c}),await this.client.core.pairing.activate({topic:e})}else UYe(t)&&(await this.client.proposal.delete(n,uKe("USER_DISCONNECTED")),this.events.emit(Hqe("session_connect"),{error:t.error}))},this.onSessionSettleRequest=async(e,t)=>{const{id:n,params:r}=t;try{this.isValidSessionSettleRequest(r);const{relay:n,controller:i,expiry:a,namespaces:o,sessionProperties:s,pairingTopic:c}=t.params,u=h$e({topic:e,relay:n,expiry:a,namespaces:o,acknowledged:!0,pairingTopic:c,requiredNamespaces:{},optionalNamespaces:{},controller:i.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:i.publicKey,metadata:i.metadata}},s&&{sessionProperties:s});await this.sendResult({id:t.id,topic:e,result:!0}),this.events.emit(Hqe("session_connect"),{session:u}),this.cleanupDuplicatePairings(u)}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionSettleResponse=async(e,t)=>{const{id:n}=t;jYe(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(Hqe("session_approve",n),{})):UYe(t)&&(await this.client.session.delete(e,uKe("USER_DISCONNECTED")),this.events.emit(Hqe("session_approve",n),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{const{params:n,id:r}=t;try{const t=`${e}_session_update`,i=kKe.get(t);if(i&&this.isRequestOutOfSync(i,r))return void this.client.logger.info(`Discarding out of sync request - ${r}`);this.isValidUpdate(h$e({topic:e},n)),await this.client.session.update(e,{namespaces:n.namespaces}),await this.sendResult({id:r,topic:e,result:!0}),this.client.events.emit("session_update",{id:r,topic:e,params:n}),kKe.set(t,r)}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.isRequestOutOfSync=(e,t)=>parseInt(t.toString().slice(0,-3))<=parseInt(e.toString().slice(0,-3)),this.onSessionUpdateResponse=(e,t)=>{const{id:n}=t;jYe(t)?this.events.emit(Hqe("session_update",n),{}):UYe(t)&&this.events.emit(Hqe("session_update",n),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{const{id:n}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,Uqe(t$e)),await this.sendResult({id:n,topic:e,result:!0}),this.client.events.emit("session_extend",{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionExtendResponse=(e,t)=>{const{id:n}=t;jYe(t)?this.events.emit(Hqe("session_extend",n),{}):UYe(t)&&this.events.emit(Hqe("session_extend",n),{error:t.error})},this.onSessionPingRequest=async(e,t)=>{const{id:n}=t;try{this.isValidPing({topic:e}),await this.sendResult({id:n,topic:e,result:!0}),this.client.events.emit("session_ping",{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionPingResponse=(e,t)=>{const{id:n}=t;setTimeout((()=>{jYe(t)?this.events.emit(Hqe("session_ping",n),{}):UYe(t)&&this.events.emit(Hqe("session_ping",n),{error:t.error})}),500)},this.onSessionDeleteRequest=async(e,t)=>{const{id:n}=t;try{this.isValidDisconnect({topic:e,reason:t.params}),await Promise.all([new Promise((t=>{this.client.core.relayer.once(BZe,(async()=>{t(await this.deleteSession({topic:e,id:n}))}))})),this.sendResult({id:n,topic:e,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:e,error:uKe("USER_DISCONNECTED")})])}catch(e){this.client.logger.error(e)}},this.onSessionRequest=async(e,t)=>{const{id:n,params:r}=t;try{this.isValidRequest(h$e({topic:e},r));const t=fqe(JSON.stringify(OYe("wc_sessionRequest",r,n))),i=this.client.session.get(e),a={id:n,topic:e,params:r,verifyContext:await this.getVerifyContext(t,i.peer.metadata)};await this.setPendingSessionRequest(a),this.addSessionRequestToSessionRequestQueue(a),this.processSessionRequestQueue()}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionRequestResponse=(e,t)=>{const{id:n}=t;jYe(t)?this.events.emit(Hqe("session_request",n),{result:t.result}):UYe(t)&&this.events.emit(Hqe("session_request",n),{error:t.error})},this.onSessionEventRequest=async(e,t)=>{const{id:n,params:r}=t;try{const t=`${e}_session_event_${r.event.name}`,i=kKe.get(t);if(i&&this.isRequestOutOfSync(i,n))return void this.client.logger.info(`Discarding out of sync request - ${n}`);this.isValidEmit(h$e({topic:e},r)),this.client.events.emit("session_event",{id:n,topic:e,params:r}),kKe.set(t,n)}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.addSessionRequestToSessionRequestQueue=e=>{this.sessionRequestQueue.queue.push(e)},this.cleanupAfterResponse=e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout((()=>{this.sessionRequestQueue.state=i$e,this.processSessionRequestQueue()}),fGe.toMiliseconds(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:e,error:t})=>{const n=this.client.core.history.pending;n.length>0&&n.filter((t=>t.topic===e&&"wc_sessionRequest"===t.request.method)).forEach((e=>{this.events.emit(Hqe("session_request",e.request.id),{error:t})}))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===a$e)return void this.client.logger.info("session request queue is already active.");const e=this.sessionRequestQueue.queue[0];if(e)try{this.sessionRequestQueue.state=a$e,this.client.events.emit("session_request",e)}catch(e){this.client.logger.error(e)}else this.client.logger.info("session request queue is empty.")},this.onPairingCreated=e=>{if(e.active)return;const t=this.client.proposal.getAll().find((t=>t.pairingTopic===e.topic));t&&this.onSessionProposeRequest(e.topic,OYe("wc_sessionPropose",{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties},t.id))},this.isValidConnect=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw new Error(t)}const{pairingTopic:t,requiredNamespaces:n,optionalNamespaces:r,sessionProperties:i,relays:a}=e;if(fKe(t)||await this.isValidPairingTopic(t),!function(e,t){let n=!1;return t&&!e?n=!0:e&&lKe(e)&&e.length&&e.forEach((e=>{n=TKe(e)})),n}(a,!0)){const{message:e}=cKe("MISSING_OR_INVALID",`connect() relays: ${a}`);throw new Error(e)}!fKe(n)&&0!==dKe(n)&&this.validateNamespaces(n,"requiredNamespaces"),!fKe(r)&&0!==dKe(r)&&this.validateNamespaces(r,"optionalNamespaces"),fKe(i)||this.validateSessionProps(i,"sessionProperties")},this.validateNamespaces=(e,t)=>{const n=function(e,t,n){let r=null;if(e&&dKe(e)){const i=vKe(e,t);i&&(r=i);const a=bKe(e,t,n);a&&(r=a)}else r=cKe("MISSING_OR_INVALID",`${t}, ${n} should be an object with data`);return r}(e,"connect()",t);if(n)throw new Error(n.message)},this.isValidApprove=async e=>{if(!EKe(e))throw new Error(cKe("MISSING_OR_INVALID",`approve() params: ${e}`).message);const{id:t,namespaces:n,relayProtocol:r,sessionProperties:i}=e;await this.isValidProposalId(t);const a=this.client.proposal.get(t),o=wKe(n,"approve()");if(o)throw new Error(o.message);const s=CKe(a.requiredNamespaces,n,"approve()");if(s)throw new Error(s.message);if(!pKe(r,!0)){const{message:e}=cKe("MISSING_OR_INVALID",`approve() relayProtocol: ${r}`);throw new Error(e)}fKe(i)||this.validateSessionProps(i,"sessionProperties")},this.isValidReject=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`reject() params: ${e}`);throw new Error(t)}const{id:t,reason:n}=e;if(await this.isValidProposalId(t),!function(e){return!!(e&&"object"==typeof e&&e.code&&hKe(e.code,!1)&&e.message&&pKe(e.message,!1))}(n)){const{message:e}=cKe("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidSessionSettleRequest=e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw new Error(t)}const{relay:t,controller:n,namespaces:r,expiry:i}=e;if(!TKe(t)){const{message:e}=cKe("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(e)}const a=function(e,t){let n=null;return pKe(e?.publicKey,!1)||(n=cKe("MISSING_OR_INVALID",`${t} controller public key should be a string`)),n}(n,"onSessionSettleRequest()");if(a)throw new Error(a.message);const o=wKe(r,"onSessionSettleRequest()");if(o)throw new Error(o.message);if(zqe(i)){const{message:e}=cKe("EXPIRED","onSessionSettleRequest()");throw new Error(e)}},this.isValidUpdate=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`update() params: ${e}`);throw new Error(t)}const{topic:t,namespaces:n}=e;await this.isValidSessionTopic(t);const r=this.client.session.get(t),i=wKe(n,"update()");if(i)throw new Error(i.message);const a=CKe(r.requiredNamespaces,n,"update()");if(a)throw new Error(a.message)},this.isValidExtend=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`extend() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`request() params: ${e}`);throw new Error(t)}const{topic:t,request:n,chainId:r,expiry:i}=e;await this.isValidSessionTopic(t);const{namespaces:a}=this.client.session.get(t);if(!AKe(a,r)){const{message:e}=cKe("MISSING_OR_INVALID",`request() chainId: ${r}`);throw new Error(e)}if(!function(e){return!(fKe(e)||!pKe(e.method,!1))}(n)){const{message:e}=cKe("MISSING_OR_INVALID",`request() ${JSON.stringify(n)}`);throw new Error(e)}if(!xKe(a,r,n.method)){const{message:e}=cKe("MISSING_OR_INVALID",`request() method: ${n.method}`);throw new Error(e)}if(i&&!function(e,t){return hKe(e,!1)&&e<=t.max&&e>=t.min}(i,r$e)){const{message:e}=cKe("MISSING_OR_INVALID",`request() expiry: ${i}. Expiry must be a number (in seconds) between ${r$e.min} and ${r$e.max}`);throw new Error(e)}},this.isValidRespond=async e=>{var t;if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`respond() params: ${e}`);throw new Error(t)}const{topic:n,response:r}=e;try{await this.isValidSessionTopic(n)}catch(n){throw null!=(t=e?.response)&&t.id&&this.cleanupAfterResponse(e),n}if(!function(e){return!(fKe(e)||fKe(e.result)&&fKe(e.error)||!hKe(e.id,!1)||!pKe(e.jsonrpc,!1))}(r)){const{message:e}=cKe("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidPing=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`emit() params: ${e}`);throw new Error(t)}const{topic:t,event:n,chainId:r}=e;await this.isValidSessionTopic(t);const{namespaces:i}=this.client.session.get(t);if(!AKe(i,r)){const{message:e}=cKe("MISSING_OR_INVALID",`emit() chainId: ${r}`);throw new Error(e)}if(!function(e){return!(fKe(e)||!pKe(e.name,!1))}(n)){const{message:e}=cKe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}if(!OKe(i,r,n.name)){const{message:e}=cKe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidDisconnect=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.getVerifyContext=async(e,t)=>{const n={verified:{verifyUrl:t.verifyUrl||uQe,validation:"UNKNOWN",origin:t.url||""}};try{const r=await this.client.core.verify.resolve({attestationId:e,verifyUrl:t.verifyUrl});r&&(n.verified.origin=r.origin,n.verified.isScam=r.isScam,n.verified.validation=r.origin===new URL(t.url).origin?"VALID":"INVALID")}catch(e){this.client.logger.info(e)}return this.client.logger.info(`Verify context: ${JSON.stringify(n)}`),n},this.validateSessionProps=(e,t)=>{Object.values(e).forEach((e=>{if(!pKe(e,!1)){const{message:n}=cKe("MISSING_OR_INVALID",`${t} must be in Record<string, string> format. Received: ${JSON.stringify(e)}`);throw new Error(n)}}))}}async isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(RZe,(async e=>{const{topic:t,message:n}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const r=await this.client.core.crypto.decode(t,n);try{FYe(r)?(this.client.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):BYe(r)?(await this.client.core.history.resolve(r),await this.onRelayEventResponse({topic:t,payload:r}),this.client.core.history.delete(t,r.id)):this.onRelayEventUnknownPayload({topic:t,payload:r})}catch(e){this.client.logger.error(e)}}))}registerExpirerEvents(){this.client.core.expirer.on(oQe,(async e=>{const{topic:t,id:n}=jqe(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,cKe("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:t})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))}))}registerPairingEvents(){this.client.core.pairing.events.on(JZe,(e=>this.onPairingCreated(e)))}isValidPairingTopic(e){if(!pKe(e,!1)){const{message:t}=cKe("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=cKe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(zqe(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=cKe("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!pKe(e,!1)){const{message:t}=cKe("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(!this.client.session.keys.includes(e)){const{message:t}=cKe("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if(zqe(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:t}=cKe("EXPIRED",`session topic: ${e}`);throw new Error(t)}if(!this.client.core.crypto.keychain.has(e)){const{message:t}=cKe("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else{if(!this.client.core.pairing.pairings.keys.includes(e)){if(pKe(e,!1)){const{message:t}=cKe("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}{const{message:t}=cKe("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}this.isValidPairingTopic(e)}}async isValidProposalId(e){if(!function(e){return"number"==typeof e}(e)){const{message:t}=cKe("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=cKe("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if(zqe(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:t}=cKe("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}}class b$e extends FQe{constructor(e,t){super(e,t,"proposal",JQe),this.core=e,this.logger=t}}let g$e=class extends FQe{constructor(e,t){super(e,t,"session",JQe),this.core=e,this.logger=t}};class v$e extends FQe{constructor(e,t){super(e,t,"request",JQe,(e=>e.id)),this.core=e,this.logger=t}}let w$e=class e extends qXe{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=ZQe,this.events=new QHe,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.removeAllListeners=e=>this.events.removeAllListeners(e),this.connect=async e=>{try{return await this.engine.connect(e)}catch(e){throw this.logger.error(e.message),e}},this.pair=async e=>{try{return await this.engine.pair(e)}catch(e){throw this.logger.error(e.message),e}},this.approve=async e=>{try{return await this.engine.approve(e)}catch(e){throw this.logger.error(e.message),e}},this.reject=async e=>{try{return await this.engine.reject(e)}catch(e){throw this.logger.error(e.message),e}},this.update=async e=>{try{return await this.engine.update(e)}catch(e){throw this.logger.error(e.message),e}},this.extend=async e=>{try{return await this.engine.extend(e)}catch(e){throw this.logger.error(e.message),e}},this.request=async e=>{try{return await this.engine.request(e)}catch(e){throw this.logger.error(e.message),e}},this.respond=async e=>{try{return await this.engine.respond(e)}catch(e){throw this.logger.error(e.message),e}},this.ping=async e=>{try{return await this.engine.ping(e)}catch(e){throw this.logger.error(e.message),e}},this.emit=async e=>{try{return await this.engine.emit(e)}catch(e){throw this.logger.error(e.message),e}},this.disconnect=async e=>{try{return await this.engine.disconnect(e)}catch(e){throw this.logger.error(e.message),e}},this.find=e=>{try{return this.engine.find(e)}catch(e){throw this.logger.error(e.message),e}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}},this.name=e?.name||ZQe,this.metadata=e?.metadata||UGe()||{name:"",description:"",url:"",icons:[""]};const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:_Xe.pino(_Xe.getDefaultLoggerOptions({level:e?.logger||QQe}));this.core=e?.core||new XQe(e),this.logger=_Xe.generateChildLogger(t,this.name),this.session=new g$e(this.core,this.logger),this.proposal=new b$e(this.core,this.logger),this.pendingRequest=new v$e(this.core,this.logger),this.engine=new y$e(this)}static async init(t){const n=new e(t);return await n.initialize(),n}get context(){return _Xe.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}};var T$e={exports:{}};!function(e,t){var n="undefined"!=typeof self?self:ut,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in e,o="ArrayBuffer"in e;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?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 h(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function m(e){var t=new FileReader,n=h(t);return t.readAsArrayBuffer(e),n}function y(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._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=y(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):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(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)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e,t,n,r=p(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=h(t),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(w)}),this.json=function(){return this.text().then(JSON.parse)},this}f.prototype.append=function(e,t){e=u(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},f.prototype.delete=function(e){delete this.map[u(e)]},f.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},f.prototype.set=function(e,t){this.map[u(e)]=l(t)},f.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},f.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),d(e)},f.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),d(e)},f.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),d(e)},r&&(f.prototype[Symbol.iterator]=f.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function v(e,t){var n,r,i=(t=t||{}).body;if(e instanceof v){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new f(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=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 f(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),g.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function w(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 T(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},b.call(v.prototype),b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},T.error=function(){var e=new T(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];T.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new T(null,{status:t,headers:{location:e}})},t.DOMException=e.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 A(e,n){return new Promise((function(r,a){var o=new v(e,n);if(o.signal&&o.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).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 s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new T(i,n))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}A.polyfill=!0,e.fetch||(e.fetch=A,e.Headers=f,e.Request=v,e.Response=T),t.Headers=f,t.Request=v,t.Response=T,t.fetch=A,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(T$e,T$e.exports);var E$e=lt(T$e.exports);const A$e={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class x$e{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new QHe,this.isAvailable=!1,this.registering=!1,!NYe(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{const t=rXe(e),n=await E$e(this.url,Object.assign(Object.assign({},A$e),{body:t})),r=await n.json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!NYe(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),void 0===this.isAvailable)return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=rXe({id:1,jsonrpc:"2.0",method:"test",params:[]});await E$e(e,Object.assign(Object.assign({},A$e),{body:t}))}this.onOpen()}catch(e){const t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(void 0===e.data)return;const t="string"==typeof e.data?nXe(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=IYe(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return bYe(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}const O$e="error",C$e="wc@2:universal_provider:",I$e="default_chain_changed";var S$e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_$e={exports:{}};
|
|
92
|
+
function aNe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var oNe=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=aNe({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var o in i)i[o]&&(a+="; "+o,!0!==i[o]&&(a+="="+i[o].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+a}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var a=n[i].split("="),o=a.slice(1).join("=");try{var s=decodeURIComponent(a[0]);if(r[s]=t.read(o,s),e===s)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",aNe({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,aNe({},this.attributes,t))},withConverter:function(t){return e(aNe({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function sNe(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function cNe(e){var t=function(e){try{return new URL(e)}catch(e){return}}(e);if(t)for(var n=function(e){var t=e.hostname.split("."),n=t[t.length-1],r=[];if(4===t.length&&parseInt(n,10)>0)return r;if(t.length<=1)return r;for(var i=t.length-2;i>=0;--i)r.push(t.slice(i).join("."));return r}(t),r=0;r<n.length;++r){var i="__tld__",a=n[r],o={domain:"."+a};try{if(oNe.set(i,"1",o),oNe.get(i))return oNe.remove(i,o),a}catch(e){return}}}var uNe=function(){function e(t){void 0===t&&(t=e.defaults),this.options=gD(gD({},e.defaults),t)}return Object.defineProperty(e,"defaults",{get:function(){return{maxage:365,domain:cNe(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),e.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},e.prototype.get=function(e){var t;try{var n=oNe.get(e);if(null==n)return null;try{return null!==(t=JSON.parse(n))&&void 0!==t?t:null}catch(e){return null!=n?n:null}}catch(e){return null}},e.prototype.set=function(e,t){"string"==typeof t?oNe.set(e,t,this.opts()):null===t?oNe.remove(e,this.opts()):oNe.set(e,JSON.stringify(t),this.opts())},e.prototype.remove=function(e){return oNe.remove(e,this.opts())},e}(),lNe=function(){function e(){}return e.prototype.localStorageWarning=function(e,t){console.warn("Unable to access ".concat(e,", localStorage may be ").concat(t))},e.prototype.get=function(e){var t;try{var n=localStorage.getItem(e);if(null===n)return null;try{return null!==(t=JSON.parse(n))&&void 0!==t?t:null}catch(e){return null!=n?n:null}}catch(t){return this.localStorageWarning(e,"unavailable"),null}},e.prototype.set=function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){this.localStorageWarning(e,"full")}},e.prototype.remove=function(e){try{return localStorage.removeItem(e)}catch(t){this.localStorageWarning(e,"unavailable")}},e}(),dNe=function(){function e(){this.cache={}}return e.prototype.get=function(e){var t;return null!==(t=this.cache[e])&&void 0!==t?t:null},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.remove=function(e){delete this.cache[e]},e}(),fNe={Cookie:"cookie",LocalStorage:"localStorage",Memory:"memory"};function pNe(e){return e&&e.stores&&Array.isArray(e.stores)&&e.stores.every((function(e){return Object.values(fNe).includes(e)}))}var hNe,mNe=function(){function e(e){this.stores=e}return e.prototype.get=function(e){for(var t=null,n=0,r=this.stores;n<r.length;n++){var i=r[n];try{if(null!=(t=i.get(e)))return t}catch(t){console.warn("Can't access ".concat(e,": ").concat(t))}}return null},e.prototype.set=function(e,t){this.stores.forEach((function(n){try{n.set(e,t)}catch(t){console.warn("Can't set ".concat(e,": ").concat(t))}}))},e.prototype.clear=function(e){this.stores.forEach((function(t){try{t.remove(e)}catch(t){console.warn("Can't remove ".concat(e,": ").concat(t))}}))},e.prototype.getAndSync=function(e){var t=this.get(e),n="number"==typeof t?t.toString():t;return this.set(e,n),n},e}();function yNe(e){var t=e.map((function(e){var t,n;switch(!function(e){return"object"==typeof e&&void 0!==e.name}(e)?t=e:(t=e.name,n=e.settings),t){case fNe.Cookie:return new uNe(n);case fNe.LocalStorage:return new lNe;case fNe.Memory:return new dNe;default:throw new Error("Unknown Store Type: ".concat(e))}}));return t}function bNe(e,t){return e.map((function(e){return t&&e===fNe.Cookie?{name:e,settings:t}:e}))}function gNe(){if(hNe)return hNe;var e=cNe(window.location.href);return hNe={expires:31536e6,secure:!1,path:"/"},e&&(hNe.domain=e),hNe}var vNe="npm";function wNe(){return vNe}function TNe(e,t,n,r){var i,a,o,s,c,u,l=e.user();t.context=null!==(a=null!==(i=t.context)&&void 0!==i?i:t.options)&&void 0!==a?a:{};var d=t.context,f="string"==typeof(null===(o=d.page)||void 0===o?void 0:o.search)?null===(s=d.page)||void 0===s?void 0:s.search:"";delete t.options,t.writeKey=null==n?void 0:n.apiKey,d.userAgent=navigator.userAgent;var p=navigator.userLanguage||navigator.language;if(void 0===d.locale&&void 0!==p&&(d.locale=p),!d.library){var h=wNe();d.library="web"===h?{name:"analytics.js",version:"next-".concat(iNe)}:{name:"analytics.js",version:"npm:next-".concat(iNe)}}f&&!d.campaign&&(d.campaign=function(e){return e.startsWith("?")&&(e=e.substring(1)),(e=e.replace(/\?/g,"&")).split("&").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1],a=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var o=r.substr(4);"campaign"===o&&(o="name"),e[o]=sNe(a)}return e}),{})}(f)),function(e,t,n){var r=new mNe(n?[]:[new uNe(gNe())]),i=r.get("s:context.referrer"),a=function(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1));for(var n=0,r=(e=e.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),a=i[0],o=i[1];if(t[a])return{id:o,type:t[a]}}}(e);(a=null!=a?a:i)&&(t&&(t.referrer=gD(gD({},t.referrer),a)),r.set("s:context.referrer",a))}(f,d,null!==(c=e.options.disableClientPersistence)&&void 0!==c&&c),t.userId=t.userId||l.id(),t.anonymousId=t.anonymousId||l.anonymousId(),t.sentAt=new Date;var m=e.queue.failedInitializations||[];m.length>0&&(t._metadata={failedInitializations:m});var y=[],b=[];for(var g in r){var v=r[g];"Segment.io"===g&&y.push(g),"bundled"===v.bundlingStatus&&y.push(g),"unbundled"===v.bundlingStatus&&b.push(g)}for(var w=0,T=(null==n?void 0:n.unbundledIntegrations)||[];w<T.length;w++){var E=T[w];b.includes(E)||b.push(E)}var A=null!==(u=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==u?u:{},x=[];y.sort().forEach((function(e){var t;(null!==(t=A[e])&&void 0!==t?t:[]).forEach((function(e){x.push(e)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(t._metadata=gD(gD({},t._metadata),{bundled:y.sort(),unbundled:b.sort(),bundledIds:x}));var O=function(){var e=oNe.get("_ga");if(e&&e.startsWith("amp"))return e}();return O&&(d.amp={id:O}),t}var ENe="api.segment.io/v1";function ANe(e){console.error("Error sending segment performance metrics",e)}var xNe,ONe=function(){function e(e){var t,n,r,i,a=this;if(this.host=null!==(t=null==e?void 0:e.host)&&void 0!==t?t:ENe,this.sampleRate=null!==(n=null==e?void 0:e.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==e?void 0:e.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==e?void 0:e.maxQueueSize)&&void 0!==i?i:20,this.queue=[],this.sampleRate>0){var o=!1,s=function(){o||(o=!0,a.flush().catch(ANe),o=!1,setTimeout(s,a.flushTimer))};s()}}return e.prototype.increment=function(e,t){if(e.includes("analytics_js.")&&0!==t.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=function(e,t,n){var r=t.reduce((function(e,t){var n=t.split(":"),r=n[0],i=n[1];return e[r]=i,e}),{});return{type:"Counter",metric:e,value:1,tags:gD(gD({},r),{library:"analytics.js",library_version:"web"===n?"next-".concat(iNe):"npm:next-".concat(iNe)})}}(e,t,wNe());this.queue.push(n),e.includes("error")&&this.flush().catch(ANe)}},e.prototype.flush=function(){return AD(this,void 0,void 0,(function(){var e=this;return xD(this,(function(t){switch(t.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(t){ANe(t),e.sampleRate=0}))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(){return AD(this,void 0,void 0,(function(){var e,t,n;return xD(this,(function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":"text/plain"},n="https://".concat(this.host,"/m"),[2,rNe(n,{headers:t,body:JSON.stringify(e),method:"POST"})]}))}))},e}(),CNe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return bD(t,e),t.initRemoteMetrics=function(e){xNe=new ONe(e)},t.prototype.increment=function(t,n,r){e.prototype.increment.call(this,t,n,r),null==xNe||xNe.increment(t,null!=r?r:[])},t}(BRe),INe=function(e){function t(t,n){return e.call(this,t,n,new CNe)||this}return bD(t,e),t.system=function(){return new this({type:"track",event:"system"})},t}(zRe),SNe={exports:{}};!function(e,t){e.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],r=e[1],i=e[2],a=e[3];r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|a>>>20)+n|0)&n|~a&r)+t[2]+606105819|0)<<17|i>>>15)+a|0)&a|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|a>>>20)+n|0)&n|~a&r)+t[6]-1473231341|0)<<17|i>>>15)+a|0)&a|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|a>>>20)+n|0)&n|~a&r)+t[10]-42063|0)<<17|i>>>15)+a|0)&a|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|a>>>20)+n|0)&n|~a&r)+t[14]-1502002290|0)<<17|i>>>15)+a|0)&a|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|a>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+a|0)&n|a&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|a>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+a|0)&n|a&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|a>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+a|0)&n|a&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|a>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+a|0)&n|a&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|a>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+a|0)^a^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|a>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+a|0)^a^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|a>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+a|0)^a^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|a>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+a|0)^a^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[14]-1416354905|0)<<15|i>>>17)+a|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[10]-1051523|0)<<15|i>>>17)+a|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[6]-1560198380|0)<<15|i>>>17)+a|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[2]+718787259|0)<<15|i>>>17)+a|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=a+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function a(e){var t,i,a,o,s,c,u=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=u;t+=64)n(l,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)a[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(n(l,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,n(l,a),l}function o(e){var t,r,a,o,s,c,u=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=u;t+=64)n(l,i(e.subarray(t-64,t)));for(r=(e=t-64<u?e.subarray(t-64):new Uint8Array(0)).length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)a[t>>2]|=e[t]<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(n(l,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,n(l,a),l}function s(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function c(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join("")}function u(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function l(e,t){var n,r=e.length,i=new ArrayBuffer(r),a=new Uint8Array(i);for(n=0;n<r;n+=1)a[n]=e.charCodeAt(n);return t?a:i}function d(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function f(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function p(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function h(){this.reset()}return c(a("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,a,o,s,c=this.byteLength,u=t(n,c),l=c;return r!==e&&(l=t(r,c)),u>l?new ArrayBuffer(0):(i=l-u,a=new ArrayBuffer(i),o=new Uint8Array(a),s=new Uint8Array(this,u,i),o.set(s),a)}}(),h.prototype.append=function(e){return this.appendBinary(u(e)),this},h.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},h.prototype.end=function(e){var t,n,r=this._buff,i=r.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)a[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(a,i),n=c(this._hash),e&&(n=p(n)),this.reset(),n},h.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},h.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},h.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},h.prototype._finish=function(e,t){var r,i,a,o=t;if(e[o>>2]|=128<<(o%4<<3),o>55)for(n(this._hash,e),o=0;o<16;o+=1)e[o]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),a=parseInt(r[1],16)||0,e[14]=i,e[15]=a,n(this._hash,e)},h.hash=function(e,t){return h.hashBinary(u(e),t)},h.hashBinary=function(e,t){var n=c(a(e));return t?p(n):n},h.ArrayBuffer=function(){this.reset()},h.ArrayBuffer.prototype.append=function(e){var t,r=f(this._buff.buffer,e,!0),a=r.length;for(this._length+=e.byteLength,t=64;t<=a;t+=64)n(this._hash,i(r.subarray(t-64,t)));return this._buff=t-64<a?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},h.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)a[t>>2]|=r[t]<<(t%4<<3);return this._finish(a,i),n=c(this._hash),e&&(n=p(n)),this.reset(),n},h.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.ArrayBuffer.prototype.getState=function(){var e=h.prototype.getState.call(this);return e.buff=d(e.buff),e},h.ArrayBuffer.prototype.setState=function(e){return e.buff=l(e.buff,!0),h.prototype.setState.call(this,e)},h.ArrayBuffer.prototype.destroy=h.prototype.destroy,h.ArrayBuffer.prototype._finish=h.prototype._finish,h.ArrayBuffer.hash=function(e,t){var n=c(o(new Uint8Array(e)));return t?p(n):n},h}()}(SNe);var _Ne=lt(SNe.exports),PNe=function(){function e(e){this.user=e}return e.prototype.track=function(e,t,n,r){return this.normalize(gD(gD({},this.baseEvent()),{event:e,type:"track",properties:t,options:gD({},n),integrations:gD({},r)}))},e.prototype.page=function(e,t,n,r,i){var a,o={type:"page",properties:gD({},n),options:gD({},r),integrations:gD({},i)};return null!==e&&(o.category=e,o.properties=null!==(a=o.properties)&&void 0!==a?a:{},o.properties.category=e),null!==t&&(o.name=t),this.normalize(gD(gD({},this.baseEvent()),o))},e.prototype.screen=function(e,t,n,r,i){var a={type:"screen",properties:gD({},n),options:gD({},r),integrations:gD({},i)};return null!==e&&(a.category=e),null!==t&&(a.name=t),this.normalize(gD(gD({},this.baseEvent()),a))},e.prototype.identify=function(e,t,n,r){return this.normalize(gD(gD({},this.baseEvent()),{type:"identify",userId:e,traits:t,options:gD({},n),integrations:gD({},r)}))},e.prototype.group=function(e,t,n,r){return this.normalize(gD(gD({},this.baseEvent()),{type:"group",traits:t,options:gD({},n),integrations:gD({},r),groupId:e}))},e.prototype.alias=function(e,t,n,r){var i={userId:e,type:"alias",options:gD({},n),integrations:gD({},r)};return null!==t&&(i.previousId=t),void 0===e?this.normalize(gD(gD({},i),this.baseEvent())):this.normalize(gD(gD({},this.baseEvent()),i))},e.prototype.baseEvent=function(){var e={integrations:{},options:{}},t=this.user;return t.id()&&(e.userId=t.id()),t.anonymousId()&&(e.anonymousId=t.anonymousId()),e},e.prototype.context=function(e){var t,n,r,i=["integrations","anonymousId","timestamp","userId"],a=null!==(t=e.options)&&void 0!==t?t:{};delete a.integrations;var o=Object.keys(a),s=null!==(r=null===(n=e.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},c={};return o.forEach((function(e){"context"!==e&&(i.includes(e)?vRe(c,e,a[e]):vRe(s,e,a[e]))})),[s,c]},e.prototype.normalize=function(e){var t,n,r;(null===(t=e.options)||void 0===t?void 0:t.anonymousId)&&this.user.anonymousId(e.options.anonymousId);var i=Object.keys(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(t,n){var r,i;return gD(gD({},t),((r={})[n]=Boolean(null===(i=e.integrations)||void 0===i?void 0:i[n]),r))}),{}),a=gD(gD({},i),null===(r=e.options)||void 0===r?void 0:r.integrations),o=this.context(e),s=o[0],c=o[1];e.options;var u=vD(e,["options"]),l=gD(gD(gD({timestamp:new Date},u),{context:s,integrations:a}),c),d="ajs-next-"+_Ne.hash(JSON.stringify(l)+LRe());return gD(gD({},l),{messageId:d})},e}(),kNe={getItem:function(){},setItem:function(){},removeItem:function(){}};try{kNe=JRe()&&window.localStorage?window.localStorage:kNe}catch(e){console.warn("Unable to access localStorage",e)}function RNe(e){var t=kNe.getItem(e);return(t?JSON.parse(t):[]).map((function(e){return new INe(e.event,e.id)}))}function NNe(e){var t=kNe.getItem(e);return t?JSON.parse(t):{}}function MNe(e){kNe.removeItem(e)}function DNe(e,t,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(e,":lock"),i=kNe.getItem(r),a=i?JSON.parse(i):null,o=null===a||function(e){return(new Date).getTime()>e}(a);if(o)return kNe.setItem(r,JSON.stringify((new Date).getTime()+50)),t(),void kNe.removeItem(r);!o&&n<3?setTimeout((function(){DNe(e,t,n+1)}),50):console.error("Unable to retrieve lock")}var LNe=function(e){function t(t,n){var r=e.call(this,t,[])||this,i="persisted-queue:v1:".concat(n,":items"),a="persisted-queue:v1:".concat(n,":seen"),o=[],s={};return DNe(n,(function(){try{o=RNe(i),s=NNe(a),MNe(i),MNe(a),r.queue=kD(kD([],o,!0),r.queue,!0),r.seen=gD(gD({},s),r.seen)}catch(e){console.error(e)}})),window.addEventListener("pagehide",(function(){if(r.todo>0){var e=kD(kD([],r.queue,!0),r.future,!0);try{DNe(n,(function(){!function(e,t){var n=RNe(e),r=kD(kD([],t,!0),n,!0).reduce((function(e,t){var n;return gD(gD({},e),((n={})[t.id]=t,n))}),{});kNe.setItem(e,JSON.stringify(Object.values(r)))}(i,e),function(e,t){var n=NNe(e);kNe.setItem(e,JSON.stringify(gD(gD({},n),t)))}(a,r.seen)}))}catch(e){console.error(e)}}})),r}return bD(t,e),t}(NRe),FNe=function(e){function t(t){return e.call(this,"string"==typeof t?new LNe(4,t):t)||this}return bD(t,e),t.prototype.flush=function(){return AD(this,void 0,void 0,(function(){return xD(this,(function(t){return $Re()?[2,[]]:[2,e.prototype.flush.call(this)]}))}))},t}(VRe);function BNe(e){for(var t=e.constructor.prototype,n=0,r=Object.getOwnPropertyNames(t);n<r.length;n++){var i=r[n];if("constructor"!==i){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);a&&"function"==typeof a.value&&(e[i]=e[i].bind(e))}}return e}var jNe={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},UNe=function(){function e(e,t){void 0===e&&(e=jNe);var n,r,i,a,o=this;this.options={},this.id=function(e){if(o.options.disable)return null;var t=o.identityStore.getAndSync(o.idKey);void 0!==e&&(o.identityStore.set(o.idKey,e),e!==t&&null!==t&&null!==e&&o.anonymousId(null));var n=o.identityStore.getAndSync(o.idKey);if(n)return n;var r=o.legacyUserStore.get(jNe.cookie.oldKey);return r?"object"==typeof r?r.id:r:null},this.anonymousId=function(e){var t,n;if(o.options.disable)return null;if(void 0===e){var r=null!==(t=o.identityStore.getAndSync(o.anonKey))&&void 0!==t?t:null===(n=o.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===e?(o.identityStore.set(o.anonKey,null),o.identityStore.getAndSync(o.anonKey)):(o.identityStore.set(o.anonKey,null!=e?e:LRe()),o.identityStore.getAndSync(o.anonKey))},this.traits=function(e){var t;if(!o.options.disable)return null===e&&(e={}),e&&o.traitsStore.set(o.traitsKey,null!=e?e:{}),null!==(t=o.traitsStore.get(o.traitsKey))&&void 0!==t?t:{}},this.options=gD(gD({},jNe),e),this.cookieOptions=t,this.idKey=null!==(r=null===(n=e.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:jNe.cookie.key,this.traitsKey=null!==(a=null===(i=e.localStorage)||void 0===i?void 0:i.key)&&void 0!==a?a:jNe.localStorage.key,this.anonKey="ajs_anonymous_id",this.identityStore=this.createStorage(this.options,t),this.legacyUserStore=this.createStorage(this.options,t,(function(e){return e===fNe.Cookie})),this.traitsStore=this.createStorage(this.options,t,(function(e){return e!==fNe.Cookie}));var s=this.legacyUserStore.get(jNe.cookie.oldKey);s&&"object"==typeof s&&(s.id&&this.id(s.id),s.traits&&this.traits(s.traits)),BNe(this)}return e.prototype.legacySIO=function(){var e=this.legacyUserStore.get("_sio");if(!e)return null;var t=e.split("----");return[t[0],t[1]]},e.prototype.identify=function(e,t){if(!this.options.disable){t=null!=t?t:{};var n=this.id();null!==n&&n!==e||(t=gD(gD({},this.traits()),t)),e&&this.id(e),this.traits(t)}},e.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},e.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},e.prototype.load=function(){return new e(this.options,this.cookieOptions)},e.prototype.save=function(){return!0},e.prototype.createStorage=function(e,t,n){var r=[fNe.LocalStorage,fNe.Cookie,fNe.Memory];return e.disable?new mNe([]):e.persist?(void 0!==e.storage&&null!==e.storage&&pNe(e.storage)&&(r=e.storage.stores),e.localStorageFallbackDisabled&&(r=r.filter((function(e){return e!==fNe.LocalStorage}))),n&&(r=r.filter(n)),new mNe(yNe(bNe(r,t)))):new mNe([new dNe])},e.defaults=jNe,e}(),zNe={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},HNe=function(e){function t(t,n){void 0===t&&(t=zNe);var r=e.call(this,gD(gD({},zNe),t),n)||this;return r.anonymousId=function(e){},BNe(r),r}return bD(t,e),t}(UNe),WNe="This is being deprecated and will be not be available in future releases of Analytics JS",VNe=nNe(),GNe=null==VNe?void 0:VNe.analytics;function qNe(){console.warn(WNe)}var KNe=function(e){function t(t,n,r,i,a){var o,s,c,u=this;(u=e.call(this)||this)._debug=!1,u.initialized=!1,u.user=function(){return u._user},u.init=u.initialize.bind(u),u.log=qNe,u.addIntegrationMiddleware=qNe,u.listeners=qNe,u.addEventListener=qNe,u.removeAllListeners=qNe,u.removeListener=qNe,u.removeEventListener=qNe,u.hasListeners=qNe,u.add=qNe,u.addIntegration=qNe;var l=null==n?void 0:n.cookie,d=null!==(o=null==n?void 0:n.disableClientPersistence)&&void 0!==o&&o;u.settings=t,u.settings.timeout=null!==(s=u.settings.timeout)&&void 0!==s?s:300,u.queue=null!=r?r:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=t?4:1,i=n?new NRe(r,[]):new LNe(r,e);return new FNe(i)}("".concat(t.writeKey,":event-queue"),null==n?void 0:n.retryQueue,d);var f=null==n?void 0:n.storage;return u._universalStorage=u.createStore(d,f,l),u._user=null!=i?i:new UNe(gD({persist:!d,storage:null==n?void 0:n.storage},null==n?void 0:n.user),l).load(),u._group=null!=a?a:new HNe(gD({persist:!d,storage:null==n?void 0:n.storage},null==n?void 0:n.group),l).load(),u.eventFactory=new PNe(u._user),u.integrations=null!==(c=null==n?void 0:n.integrations)&&void 0!==c?c:{},u.options=null!=n?n:{},BNe(u),u}return bD(t,e),t.prototype.createStore=function(e,t,n){return e?new mNe([new dNe]):t&&pNe(t)?new mNe(yNe(bNe(t.stores,n))):new mNe(yNe([fNe.LocalStorage,{name:fNe.Cookie,settings:n},fNe.Memory]))},Object.defineProperty(t.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),t.prototype.track=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n,r,i,a,o,s=this;return xD(this,(function(c){return t=qRe.apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],o=this.eventFactory.track(n,r,i,this.integrations),[2,this._dispatch(o,a).then((function(e){return s.emit("track",n,e.event.properties,e.event.options),e}))]}))}))},t.prototype.page=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n,r,i,a,o,s,c=this;return xD(this,(function(u){return t=KRe.apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=this.eventFactory.page(n,r,i,a,this.integrations),[2,this._dispatch(s,o).then((function(e){return c.emit("page",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.identify=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n,r,i,a,o,s=this;return xD(this,(function(c){return t=XRe(this._user).apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],this._user.identify(n,r),o=this.eventFactory.identify(this._user.id(),this._user.traits(),i,this.integrations),[2,this._dispatch(o,a).then((function(e){return s.emit("identify",e.event.userId,e.event.traits,e.event.options),e}))]}))}))},t.prototype.group=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(0===t.length)return this._group;var r=XRe(this._group).apply(void 0,t),i=r[0],a=r[1],o=r[2],s=r[3];this._group.identify(i,a);var c=this._group.id(),u=this._group.traits(),l=this.eventFactory.group(c,u,o,this.integrations);return this._dispatch(l,s).then((function(t){return e.emit("group",t.event.groupId,t.event.traits,t.event.options),t}))},t.prototype.alias=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n,r,i,a,o,s=this;return xD(this,(function(c){return t=YRe.apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],o=this.eventFactory.alias(n,r,i,this.integrations),[2,this._dispatch(o,a).then((function(e){return s.emit("alias",n,r,e.event.options),e}))]}))}))},t.prototype.screen=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n,r,i,a,o,s,c=this;return xD(this,(function(u){return t=KRe.apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=this.eventFactory.screen(n,r,i,a,this.integrations),[2,this._dispatch(s,o).then((function(e){return c.emit("screen",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.trackClick=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n;return xD(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return Q1e}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,kD([this],e,!1))]}}))}))},t.prototype.trackLink=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n;return xD(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return Q1e}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,kD([this],e,!1))]}}))}))},t.prototype.trackSubmit=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n;return xD(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return Q1e}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,kD([this],e,!1))]}}))}))},t.prototype.trackForm=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n;return xD(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return Q1e}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,kD([this],e,!1))]}}))}))},t.prototype.register=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n,r=this;return xD(this,(function(i){switch(i.label){case 0:return t=INe.system(),n=e.map((function(e){return r.queue.register(t,e,r)})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.deregister=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AD(this,void 0,void 0,(function(){var t,n,r=this;return xD(this,(function(i){switch(i.label){case 0:return t=INe.system(),n=e.map((function(e){var n=r.queue.plugins.find((function(t){return t.name===e}));if(n)return r.queue.deregister(t,n,r);t.log("warn","plugin ".concat(e," not found"))})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.debug=function(e){return!1===e&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=e,this},t.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},t.prototype.timeout=function(e){this.settings.timeout=e},t.prototype._dispatch=function(e,t){return AD(this,void 0,void 0,(function(){var n;return xD(this,(function(r){return n=new INe(e),$Re()&&!this.options.retryQueue?[2,n]:[2,GRe(n,this.queue,this,{callback:t,debug:this._debug,timeout:this.settings.timeout})]}))}))},t.prototype.addSourceMiddleware=function(e){return AD(this,void 0,void 0,(function(){var t=this;return xD(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return AD(t,void 0,void 0,(function(){var t,n,r;return xD(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve().then((function(){return VDe}))];case 1:return t=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach((function(e){if("destination"===e.type)return n[e.name]=!0})),r=t(e,n),[4,this.register(r)];case 2:return i.sent(),[2]}}))}))}))];case 1:return n.sent(),[2,this]}}))}))},t.prototype.addDestinationMiddleware=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.queue.plugins.filter((function(t){return t.name.toLowerCase()===e.toLowerCase()}));return r.forEach((function(e){e.addMiddleware.apply(e,t)})),Promise.resolve(this)},t.prototype.setAnonymousId=function(e){return this._user.anonymousId(e)},t.prototype.queryString=function(e){return AD(this,void 0,void 0,(function(){return xD(this,(function(t){switch(t.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,Promise.resolve().then((function(){return e5e}))];case 1:return[2,(0,t.sent().queryString)(this,e)]}}))}))},t.prototype.use=function(e){return e(this),this},t.prototype.ready=function(e){return void 0===e&&(e=function(e){return e}),AD(this,void 0,void 0,(function(){return xD(this,(function(t){return[2,Promise.all(this.queue.plugins.map((function(e){return e.ready?e.ready():Promise.resolve()}))).then((function(t){return e(t),t}))]}))}))},t.prototype.noConflict=function(){return console.warn(WNe),window.analytics=null!=GNe?GNe:this,this},t.prototype.normalize=function(e){return console.warn(WNe),this.eventFactory.normalize(e)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(WNe),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return iNe},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e,t){return AD(this,void 0,void 0,(function(){return xD(this,(function(e){return console.warn(WNe),[2,Promise.resolve(this)]}))}))},t.prototype.pageview=function(e){return AD(this,void 0,void 0,(function(){return xD(this,(function(t){switch(t.label){case 0:return console.warn(WNe),[4,this.page({path:e})];case 1:return t.sent(),[2,this]}}))}))},Object.defineProperty(t.prototype,"plugins",{get:function(){var e;return console.warn(WNe),null!==(e=this._plugins)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(WNe);var e=this.queue.plugins.filter((function(e){return"destination"===e.type})).reduce((function(e,t){var n="".concat(t.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return e;var i=r.Integration;return i?(e[t.name]=i,e):(e[t.name]=r,e)}),{});return e},enumerable:!1,configurable:!0}),t.prototype.push=function(e){var t=e.shift();t&&!this[t]||this[t].apply(this,e)},t}(gRe);function XNe(){return"undefined"!=typeof process&&process.env?process.env:{}}var YNe,JNe=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,ZNe=function(){var e=function(){var e;return null!=YNe?YNe:null===(e=window.analytics)||void 0===e?void 0:e._cdn}();if(e)return e;var t,n=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach((function(e){var n,r=null!==(n=e.getAttribute("src"))&&void 0!==n?n:"",i=JNe.exec(r);i&&i[1]&&(t=i[1])})),t);return n||"https://cdn.segment.com"},QNe=function(){var e=ZNe();return"".concat(e,"/next-integrations")};function $Ne(e,t){var n,r=Object.entries(null!==(n=t.integrations)&&void 0!==n?n:{}).reduce((function(e,t){var n,r,i=t[0],a=t[1];return gD(gD({},e),"object"==typeof a?((n={})[i]=a,n):((r={})[i]={},r))}),{});return Object.entries(e.integrations).reduce((function(e,t){var n,i=t[0],a=t[1];return gD(gD({},e),((n={})[i]=gD(gD({},a),r[i]),n))}),{})}function eMe(){var e=document.querySelector("link[rel='canonical']");if(e)return e.getAttribute("href")||void 0}function tMe(){var e=eMe();if(!e)return window.location.pathname;var t=document.createElement("a");return t.href=e,t.pathname.startsWith("/")?t.pathname:"/"+t.pathname}function nMe(e){void 0===e&&(e="");var t=eMe();if(t)return t.includes("?")?t:"".concat(t).concat(e);var n=window.location.href,r=n.indexOf("#");return-1===r?n:n.slice(0,r)}function rMe(e){var t=e.event;t.context=t.context||{};var n={path:tMe(),referrer:document.referrer,search:location.search,title:document.title,url:nMe(location.search)},r=void 0;return"page"===t.type&&(r=t.properties&&function(e,t){return Object.assign.apply(Object,kD([{}],t.map((function(t){var n;if(e&&Object.prototype.hasOwnProperty.call(e,t))return(n={})[t]=e[t],n})),!1))}(t.properties,Object.keys(n)),t.properties=gD(gD(gD({},n),t.properties),t.name?{name:t.name}:{})),t.context.page=gD(gD(gD({},n),r),t.context.page),e}var iMe={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:rMe,alias:rMe,track:rMe,identify:rMe,group:rMe};function aMe(e){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(t){return t.src===e}))}function oMe(e,t){var n=aMe(e);if(void 0!==n){var r=null==n?void 0:n.getAttribute("status");if("loaded"===r)return Promise.resolve(n);if("loading"===r)return new Promise((function(e,t){n.addEventListener("load",(function(){return e(n)})),n.addEventListener("error",(function(e){return t(e)}))}))}return new Promise((function(n,r){var i,a=window.document.createElement("script");a.type="text/javascript",a.src=e,a.async=!0,a.setAttribute("status","loading");for(var o=0,s=Object.entries(null!=t?t:{});o<s.length;o++){var c=s[o],u=c[0],l=c[1];a.setAttribute(u,l)}a.onload=function(){a.onerror=a.onload=null,a.setAttribute("status","loaded"),n(a)},a.onerror=function(){a.onerror=a.onload=null,a.setAttribute("status","error"),r(new Error("Failed to load ".concat(e)))};var d=window.document.getElementsByTagName("script")[0];null===(i=d.parentElement)||void 0===i||i.insertBefore(a,d)}))}function sMe(e){var t=aMe(e);return void 0!==t&&t.remove(),Promise.resolve()}var cMe={},uMe={},lMe={},dMe={exports:{}};!function(e){function t(e){return function(t,n,r,a){var o,s=a&&function(e){return"function"==typeof e}(a.normalizer)?a.normalizer:i;n=s(n);for(var c=!1;!c;)u();function u(){for(o in t){var e=s(o);if(0===n.indexOf(e)){var r=n.substr(e.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=t[o];return null==i?void(c=!0):n.length?void(t=i):void(c=!0)}}}o=void 0,c=!0}if(o)return null==t?t:e(t,o,r)}}function n(e,t){return e.hasOwnProperty(t)&&delete e[t],e}function r(e,t,n){return e.hasOwnProperty(t)&&(e[t]=n),e}function i(e){return e.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}e.exports=t((function(e,t){if(e.hasOwnProperty(t))return e[t]})),e.exports.find=e.exports,e.exports.replace=function(e,n,i,a){return t(r).call(this,e,n,i,a),e},e.exports.del=function(e,r,i){return t(n).call(this,e,r,null,i),e}}(dMe);var fMe=dMe.exports,pMe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lMe,"__esModule",{value:!0});var hMe=pMe(fMe);function mMe(e,t){return function(){var n=this.traits(),r=this.properties?this.properties():{};return hMe.default(n,"address."+e)||hMe.default(n,e)||(t?hMe.default(n,"address."+t):null)||(t?hMe.default(n,t):null)||hMe.default(r,"address."+e)||hMe.default(r,e)||(t?hMe.default(r,"address."+t):null)||(t?hMe.default(r,t):null)}}lMe.default=function(e){e.zip=mMe("postalCode","zip"),e.country=mMe("country"),e.street=mMe("street"),e.state=mMe("state"),e.city=mMe("city"),e.region=mMe("region")};var yMe={};Object.defineProperty(yMe,"__esModule",{value:!0}),yMe.clone=void 0,yMe.clone=function e(t){if("object"!=typeof t)return t;if("[object Object]"===Object.prototype.toString.call(t)){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=e(t[r]));return n}return Array.isArray(t)?t.map(e):t};var bMe={};Object.defineProperty(bMe,"__esModule",{value:!0});var gMe={Salesforce:!0};bMe.default=function(e){return!gMe[e]};var vMe={},wMe=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;vMe.parse=function(e){var t=[1,5,6,7,11,12],n=wMe.exec(e),r=0;if(!n)return new Date(e);for(var i,a=0;i=t[a];a++)n[i]=parseInt(n[i],10)||0;n[2]=parseInt(n[2],10)||1,n[3]=parseInt(n[3],10)||1,n[2]--,n[8]=n[8]?(n[8]+"00").substring(0,3):0," "===n[4]?r=(new Date).getTimezoneOffset():"Z"!==n[9]&&n[10]&&(r=60*n[11]+n[12],"+"===n[10]&&(r=0-r));var o=Date.UTC(n[1],n[2],n[3],n[5],n[6]+r,n[7],n[8]);return new Date(o)},vMe.is=function(e,t){return"string"==typeof e&&((!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&wMe.test(e))};var TMe={},EMe=/\d{13}/;TMe.is=function(e){return EMe.test(e)},TMe.parse=function(e){return e=parseInt(e,10),new Date(e)};var AMe={},xMe=/\d{10}/;AMe.is=function(e){return xMe.test(e)},AMe.parse=function(e){var t=1e3*parseInt(e,10);return new Date(t)};var OMe=vMe,CMe=TMe,IMe=AMe,SMe=Object.prototype.toString;var _Me=function(e){return t=e,"[object Date]"===SMe.call(t)?e:function(e){return"[object Number]"===SMe.call(e)}(e)?new Date((n=e)<315576e5?1e3*n:n):OMe.is(e)?OMe.parse(e):CMe.is(e)?CMe.parse(e):IMe.is(e)?IMe.parse(e):new Date(e);var t,n};var PMe=vMe,kMe=RMe;function RMe(e,t){return void 0===t&&(t=!0),e&&"object"==typeof e?function(e,t){return Object.keys(e).forEach((function(n){e[n]=RMe(e[n],t)})),e}(e,t):Array.isArray(e)?function(e,t){return e.forEach((function(n,r){e[r]=RMe(n,t)})),e}(e,t):PMe.is(e,t)?PMe.parse(e):e}var NMe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(uMe,"__esModule",{value:!0}),uMe.Facade=void 0;var MMe=NMe(lMe),DMe=yMe,LMe=NMe(bMe),FMe=NMe(_Me),BMe=NMe(fMe),jMe=NMe(kMe);function UMe(e,t){t=t||{},this.raw=DMe.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=DMe.clone(e)),"traverse"in t||(t.traverse=!0),e.timestamp="timestamp"in e?FMe.default(e.timestamp):new Date,t.traverse&&jMe.default(e),this.opts=t,this.obj=e}uMe.Facade=UMe;var zMe=UMe.prototype;function HMe(e){return DMe.clone(e)}zMe.proxy=function(e){var t=e.split("."),n=this[e=t.shift()]||this.obj[e];return n?("function"==typeof n&&(n=n.call(this)||{}),0===t.length||(n=BMe.default(n,t.join("."))),this.opts.clone?HMe(n):n):n},zMe.field=function(e){var t=this.obj[e];return this.opts.clone?HMe(t):t},UMe.proxy=function(e){return function(){return this.proxy(e)}},UMe.field=function(e){return function(){return this.field(e)}},UMe.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var n=this.proxy(e);return n&&(n=[this.opts.clone?DMe.clone(n):n]),n||[]}},UMe.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var n=this.proxy(e+"s");return Array.isArray(n)?n[0]:void 0}},zMe.json=function(){var e=this.opts.clone?DMe.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},zMe.rawEvent=function(){return this.raw},zMe.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?DMe.clone(t):t;if(!e)return n;if(this.enabled(e)){var r=this.integrations(),i=r[e]||BMe.default(r,e);return"object"!=typeof i&&(i=BMe.default(this.options(),e)),"object"==typeof i?i:{}}},zMe.context=zMe.options,zMe.enabled=function(e){var t=this.proxy("options.providers.all");"boolean"!=typeof t&&(t=this.proxy("options.all")),"boolean"!=typeof t&&(t=this.proxy("integrations.all")),"boolean"!=typeof t&&(t=!0);var n=t&&LMe.default(e),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(e)&&(n=r.providers[e]),r.hasOwnProperty(e)){var i=r[e];n="boolean"!=typeof i||i}return!!n},zMe.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},zMe.active=function(){var e=this.proxy("options.active");return null==e&&(e=!0),e},zMe.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},zMe.sessionId=zMe.anonymousId,zMe.groupId=UMe.proxy("options.groupId"),zMe.traits=function(e){var t=this.proxy("options.traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},zMe.library=function(){var e=this.proxy("options.library");return e?"string"==typeof e?{name:e,version:null}:e:{name:"unknown",version:null}},zMe.device=function(){var e=this.proxy("context.device");"object"==typeof e&&null!==e||(e={});var t=this.library().name;return e.type||(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android")),e},zMe.userAgent=UMe.proxy("context.userAgent"),zMe.timezone=UMe.proxy("context.timezone"),zMe.timestamp=UMe.field("timestamp"),zMe.channel=UMe.field("channel"),zMe.ip=UMe.proxy("context.ip"),zMe.userId=UMe.field("userId"),MMe.default(zMe);var WMe={},VMe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(WMe,"__esModule",{value:!0}),WMe.Alias=void 0;var GMe=VMe(_s),qMe=uMe;function KMe(e,t){qMe.Facade.call(this,e,t)}WMe.Alias=KMe,GMe.default(KMe,qMe.Facade),KMe.prototype.action=function(){return"alias"},KMe.prototype.type=KMe.prototype.action,KMe.prototype.previousId=function(){return this.field("previousId")||this.field("from")},KMe.prototype.from=KMe.prototype.previousId,KMe.prototype.userId=function(){return this.field("userId")||this.field("to")},KMe.prototype.to=KMe.prototype.userId;var XMe={},YMe={};Object.defineProperty(YMe,"__esModule",{value:!0});var JMe=/.+\@.+\..+/;YMe.default=function(e){return JMe.test(e)};var ZMe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(XMe,"__esModule",{value:!0}),XMe.Group=void 0;var QMe=ZMe(_s),$Me=ZMe(YMe),eDe=ZMe(_Me),tDe=uMe;function nDe(e,t){tDe.Facade.call(this,e,t)}XMe.Group=nDe,QMe.default(nDe,tDe.Facade);var rDe=nDe.prototype;rDe.action=function(){return"group"},rDe.type=rDe.action,rDe.groupId=tDe.Facade.field("groupId"),rDe.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return eDe.default(e)},rDe.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();return $Me.default(t)?t:void 0},rDe.traits=function(e){var t=this.properties(),n=this.groupId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},rDe.name=tDe.Facade.proxy("traits.name"),rDe.industry=tDe.Facade.proxy("traits.industry"),rDe.employees=tDe.Facade.proxy("traits.employees"),rDe.properties=function(){return this.field("traits")||this.field("properties")||{}};var iDe={},aDe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(iDe,"__esModule",{value:!0}),iDe.Identify=void 0;var oDe=uMe,sDe=aDe(fMe),cDe=aDe(_s),uDe=aDe(YMe),lDe=aDe(_Me),dDe=function(e){return e.trim()};function fDe(e,t){oDe.Facade.call(this,e,t)}iDe.Identify=fDe,cDe.default(fDe,oDe.Facade);var pDe=fDe.prototype;pDe.action=function(){return"identify"},pDe.type=pDe.action,pDe.traits=function(e){var t=this.field("traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(t[e[r]]=i,r!==e[r]&&delete t[r])}return t},pDe.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();return uDe.default(t)?t:void 0},pDe.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return lDe.default(e)},pDe.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return lDe.default(e)},pDe.companyName=function(){return this.proxy("traits.company.name")},pDe.name=function(){var e=this.proxy("traits.name");if("string"==typeof e)return dDe(e);var t=this.firstName(),n=this.lastName();return t&&n?dDe(t+" "+n):void 0},pDe.firstName=function(){var e=this.proxy("traits.firstName");if("string"==typeof e)return dDe(e);var t=this.proxy("traits.name");return"string"==typeof t?dDe(t).split(" ")[0]:void 0},pDe.lastName=function(){var e=this.proxy("traits.lastName");if("string"==typeof e)return dDe(e);var t=this.proxy("traits.name");if("string"==typeof t){var n=dDe(t).indexOf(" ");if(-1!==n)return dDe(t.substr(n+1))}},pDe.uid=function(){return this.userId()||this.username()||this.email()},pDe.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},pDe.age=function(){var e=this.birthday(),t=sDe.default(this.traits(),"age");return null!=t?t:e instanceof Date?(new Date).getFullYear()-e.getFullYear():void 0},pDe.avatar=function(){var e=this.traits();return sDe.default(e,"avatar")||sDe.default(e,"photoUrl")||sDe.default(e,"avatarUrl")},pDe.position=function(){var e=this.traits();return sDe.default(e,"position")||sDe.default(e,"jobTitle")},pDe.username=oDe.Facade.proxy("traits.username"),pDe.website=oDe.Facade.one("traits.website"),pDe.websites=oDe.Facade.multi("traits.website"),pDe.phone=oDe.Facade.one("traits.phone"),pDe.phones=oDe.Facade.multi("traits.phone"),pDe.address=oDe.Facade.proxy("traits.address"),pDe.gender=oDe.Facade.proxy("traits.gender"),pDe.birthday=oDe.Facade.proxy("traits.birthday");var hDe={},mDe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hDe,"__esModule",{value:!0}),hDe.Track=void 0;var yDe=mDe(_s),bDe=uMe,gDe=iDe,vDe=mDe(YMe),wDe=mDe(fMe);function TDe(e,t){bDe.Facade.call(this,e,t)}hDe.Track=TDe,yDe.default(TDe,bDe.Facade);var EDe=TDe.prototype;EDe.action=function(){return"track"},EDe.type=EDe.action,EDe.event=bDe.Facade.field("event"),EDe.value=bDe.Facade.proxy("properties.value"),EDe.category=bDe.Facade.proxy("properties.category"),EDe.id=bDe.Facade.proxy("properties.id"),EDe.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},EDe.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},EDe.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},EDe.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},EDe.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},EDe.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},EDe.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},EDe.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},EDe.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},EDe.sku=bDe.Facade.proxy("properties.sku"),EDe.tax=bDe.Facade.proxy("properties.tax"),EDe.name=bDe.Facade.proxy("properties.name"),EDe.price=bDe.Facade.proxy("properties.price"),EDe.total=bDe.Facade.proxy("properties.total"),EDe.repeat=bDe.Facade.proxy("properties.repeat"),EDe.coupon=bDe.Facade.proxy("properties.coupon"),EDe.shipping=bDe.Facade.proxy("properties.shipping"),EDe.discount=bDe.Facade.proxy("properties.discount"),EDe.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},EDe.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},EDe.description=bDe.Facade.proxy("properties.description"),EDe.plan=bDe.Facade.proxy("properties.plan"),EDe.subtotal=function(){var e=wDe.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var n=this.tax();n&&(t-=n),(n=this.shipping())&&(t-=n),(n=this.discount())&&(t+=n)}return t},EDe.products=function(){var e=this.properties(),t=wDe.default(e,"products");return Array.isArray(t)?t.filter((function(e){return null!==e})):[]},EDe.quantity=function(){return(this.obj.properties||{}).quantity||1},EDe.currency=function(){return(this.obj.properties||{}).currency||"USD"},EDe.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},EDe.query=bDe.Facade.proxy("options.query"),EDe.properties=function(e){var t=this.field("properties")||{};for(var n in e=e||{})if(Object.prototype.hasOwnProperty.call(e,n)){var r=null==this[n]?this.proxy("properties."+n):this[n]();if(null==r)continue;t[e[n]]=r,delete t[n]}return t},EDe.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},EDe.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();return vDe.default(t)?t:void 0},EDe.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event();return!e&&t&&t.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(e=this.proxy("properties.total")),function(e){if(!e)return;if("number"==typeof e)return e;if("string"!=typeof e)return;if(e=e.replace(/\$/g,""),e=parseFloat(e),!isNaN(e))return e}(e)},EDe.cents=function(){var e=this.revenue();return"number"!=typeof e?this.value()||0:100*e},EDe.identify=function(){var e=this.json();return e.traits=this.traits(),new gDe.Identify(e,this.opts)};var ADe={},xDe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ADe,"__esModule",{value:!0}),ADe.Page=void 0;var ODe=xDe(_s),CDe=uMe,IDe=hDe,SDe=xDe(YMe);function _De(e,t){CDe.Facade.call(this,e,t)}ADe.Page=_De,ODe.default(_De,CDe.Facade);var PDe=_De.prototype;PDe.action=function(){return"page"},PDe.type=PDe.action,PDe.category=CDe.Facade.field("category"),PDe.name=CDe.Facade.field("name"),PDe.title=CDe.Facade.proxy("properties.title"),PDe.path=CDe.Facade.proxy("properties.path"),PDe.url=CDe.Facade.proxy("properties.url"),PDe.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},PDe.properties=function(e){var t=this.field("properties")||{},n=this.category(),r=this.name();for(var i in e=e||{},n&&(t.category=n),r&&(t.name=r),e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=null==this[i]?this.proxy("properties."+i):this[i]();if(null==a)continue;t[e[i]]=a,i!==e[i]&&delete t[i]}return t},PDe.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();return SDe.default(t)?t:void 0},PDe.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t},PDe.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"},PDe.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new IDe.Track(t,this.opts)};var kDe={},RDe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(kDe,"__esModule",{value:!0}),kDe.Screen=void 0;var NDe=RDe(_s),MDe=ADe,DDe=hDe;function LDe(e,t){MDe.Page.call(this,e,t)}kDe.Screen=LDe,NDe.default(LDe,MDe.Page),LDe.prototype.action=function(){return"screen"},LDe.prototype.type=LDe.prototype.action,LDe.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"},LDe.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new DDe.Track(t,this.opts)};var FDe={},BDe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(FDe,"__esModule",{value:!0}),FDe.Delete=void 0;var jDe=BDe(_s),UDe=uMe;function zDe(e,t){UDe.Facade.call(this,e,t)}function HDe(e,t){var n=new cMe.Facade(e,t);return"track"===e.type&&(n=new cMe.Track(e,t)),"identify"===e.type&&(n=new cMe.Identify(e,t)),"page"===e.type&&(n=new cMe.Page(e,t)),"alias"===e.type&&(n=new cMe.Alias(e,t)),"group"===e.type&&(n=new cMe.Group(e,t)),"screen"===e.type&&(n=new cMe.Screen(e,t)),Object.defineProperty(n,"obj",{value:e,writable:!0}),n}function WDe(e,t,n){return AD(this,void 0,void 0,(function(){function r(t,n){return AD(this,void 0,void 0,(function(){var r,i,a;return xD(this,(function(o){switch(o.label){case 0:return r=!1,i=null,[4,n({payload:HDe(t,{clone:!0,traverse:!1}),integration:e,next:function(e){r=!0,null===e&&(i=null),e&&(i=e.obj)}})];case 1:return o.sent(),r||null===i||(i.integrations=gD(gD({},t.integrations),((a={})[e]=!1,a))),[2,i]}}))}))}var i,a,o,s,c;return xD(this,(function(e){switch(e.label){case 0:i=HDe(t,{clone:!0,traverse:!1}).rawEvent(),a=0,o=n,e.label=1;case 1:return a<o.length?(s=o[a],[4,r(i,s)]):[3,4];case 2:if(null===(c=e.sent()))return[2,null];i=c,e.label=3;case 3:return a++,[3,1];case 4:return[2,i]}}))}))}FDe.Delete=zDe,jDe.default(zDe,UDe.Facade),zDe.prototype.type=function(){return"delete"},function(e){var t=ut&&ut.__assign||function(){return t=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},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=e.Screen=e.Page=e.Track=e.Identify=e.Group=e.Alias=e.Facade=void 0;var n=uMe;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=WMe;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=XMe;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var a=iDe;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return a.Identify}});var o=hDe;Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return o.Track}});var s=ADe;Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return s.Page}});var c=kDe;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return c.Screen}});var u=FDe;Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return u.Delete}}),e.default=t(t({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:a.Identify,Track:o.Track,Page:s.Page,Screen:c.Screen,Delete:u.Delete})}(cMe);var VDe=Object.freeze({__proto__:null,applyDestinationMiddleware:WDe,sourceMiddlewarePlugin:function(e,t){function n(n){return AD(this,void 0,void 0,(function(){var r;return xD(this,(function(i){switch(i.label){case 0:return r=!1,[4,e({payload:HDe(n.event,{clone:!0,traverse:!1}),integrations:null!=t?t:{},next:function(e){r=!0,e&&(n.event=e.obj)}})];case 1:if(i.sent(),!r)throw new URe({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(e.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(e){return Promise.resolve(e)},track:n,page:n,identify:n,alias:n,group:n}}}),GDe=function(){function e(e,t){this.version="1.0.0",this.alternativeNames=[],this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=t,this.name=e,this.type=t.type,this.alternativeNames.push(t.name)}return e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"destination"===this.type&&(e=this.middleware).push.apply(e,t)},e.prototype.transform=function(e){return AD(this,void 0,void 0,(function(){var t;return xD(this,(function(n){switch(n.label){case 0:return[4,WDe(this.name,e.event,this.middleware)];case 1:return null===(t=n.sent())&&e.cancel(new URe({retry:!1,reason:"dropped by destination middleware"})),[2,new INe(t)]}}))}))},e.prototype._createMethod=function(e){var t=this;return function(n){return AD(t,void 0,void 0,(function(){var t;return xD(this,(function(r){switch(r.label){case 0:return this.action[e]?(t=n,"destination"!==this.type?[3,2]:[4,this.transform(n)]):[2,n];case 1:t=r.sent(),r.label=2;case 2:return[4,this.action[e](t)];case 3:return r.sent(),[2,n]}}))}))}},e.prototype.isLoaded=function(){return this.action.isLoaded()},e.prototype.ready=function(){return this.action.ready?this.action.ready():Promise.resolve()},e.prototype.load=function(e,t){return this.action.load(e,t)},e.prototype.unload=function(e,t){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,e,t)},e}();function qDe(e,t,n,r,i){var a,o,s;return AD(this,void 0,void 0,(function(){var c,u,l,d,f=this;return xD(this,(function(p){switch(p.label){case 0:return c=[],u=ZNe(),l=null!==(o=null===(a=e.middlewareSettings)||void 0===a?void 0:a.routingRules)&&void 0!==o?o:[],d=(null!==(s=e.remotePlugins)&&void 0!==s?s:[]).map((function(e){return AD(f,void 0,void 0,(function(){var a,o,s,d,f,p,h,m,y;return xD(this,(function(b){switch(b.label){case 0:if(function(e,t){var n=e[t.creationName],r=e[t.name];return!1===e.All&&!n&&!r||!1===n||!1===r}(t,e))return[2];b.label=1;case 1:if(b.trys.push([1,12,,13]),a=new RegExp("https://cdn.segment.(com|build)"),!r)return[3,7];o=e.url.split("/"),s=o[o.length-2],d=e.url.replace(s,btoa(s).replace(/=/g,"")),b.label=2;case 2:return b.trys.push([2,4,,6]),[4,oMe(d.replace(a,u))];case 3:return b.sent(),[3,6];case 4:return b.sent(),[4,oMe(e.url.replace(a,u))];case 5:return b.sent(),[3,6];case 6:return[3,9];case 7:return[4,oMe(e.url.replace(a,u))];case 8:b.sent(),b.label=9;case 9:return f=e.libraryName,"function"!=typeof window[f]?[3,11]:[4,(0,window[f])(gD(gD({},e.settings),n[e.name]))];case 10:p=b.sent(),function(e){if(!Array.isArray(e))throw new Error("Not a valid list of plugins");var t=["load","isLoaded","name","version","type"];e.forEach((function(e){t.forEach((function(t){var n;if(void 0===e[t])throw new Error("Plugin: ".concat(null!==(n=e.name)&&void 0!==n?n:"unknown"," missing required function ").concat(t))}))}))}(h=Array.isArray(p)?p:[p]),m=l.filter((function(t){return t.destinationName===e.creationName})),h.forEach((function(t){var n=new GDe(e.creationName,t);m.length&&i&&"destination"===t.type&&n.addMiddleware(i),c.push(n)})),b.label=11;case 11:return[3,13];case 12:return y=b.sent(),console.warn("Failed to load Remote Plugin",y),[3,13];case 13:return[2]}}))}))})),[4,Promise.all(d)];case 1:return p.sent(),[2,c.filter(Boolean)]}}))}))}var KDe=function(e){var t=!1;window.addEventListener("pagehide",(function(){t||e(t=!0)})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(t)return;t=!0}else t=!1;e(t)}))},XDe=500;function YDe(e){return(encodeURI(JSON.stringify(e)).split(/%..|./).length-1)/1024}function JDe(e,t){var n,r,i,a=[],o=!1,s=null!==(n=null==t?void 0:t.size)&&void 0!==n?n:10,c=null!==(r=null==t?void 0:t.timeout)&&void 0!==r?r:5e3;function u(t){var n;if(0!==t.length){var r=null===(n=t[0])||void 0===n?void 0:n.writeKey,i=t.map((function(e){var t=e;return t.sentAt,vD(t,["sentAt"])}));return rNe("https://".concat(e,"/b"),{keepalive:o,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({writeKey:r,batch:i,sentAt:(new Date).toISOString()})})}}function l(){return AD(this,void 0,void 0,(function(){var e;return xD(this,(function(t){return a.length?(e=a,a=[],[2,u(e)]):[2]}))}))}return KDe((function(e){if((o=e)&&a.length){var t=function(e){var t=[],n=0;return e.forEach((function(e){YDe(t[n])>=64&&n++,t[n]?t[n].push(e):t[n]=[e]})),t}(a).map(u);Promise.all(t).catch(console.error)}})),{dispatch:function(e,t){return AD(this,void 0,void 0,(function(){var e;return xD(this,(function(n){return a.push(t),e=a.length>=s||function(e){return YDe(e)>=XDe-50}(a),[2,e||o?l():void(i||(i=setTimeout((function(){i=void 0,l().catch(console.error)}),c)))]}))}))}}}var ZDe=function(e,t){return AD(void 0,void 0,void 0,(function(){var n;return xD(this,(function(r){return n=function(r){return AD(void 0,void 0,void 0,(function(){var i;return xD(this,(function(a){switch(a.label){case 0:return e(r)?(i=n,[4,t()]):[3,2];case 1:return[2,i.apply(void 0,[a.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))};function QDe(e,t){return AD(this,void 0,void 0,(function(){var n,r=this;return xD(this,(function(i){switch(i.label){case 0:return n=[],$Re()?[2,t]:[4,ZDe((function(){return t.length>0&&!$Re()}),(function(){return AD(r,void 0,void 0,(function(){var r,i;return xD(this,(function(a){switch(a.label){case 0:return(r=t.pop())?[4,HRe(r,e)]:[2];case 1:return i=a.sent(),i instanceof INe||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}function $De(e,t,n,r){var i=this;e||setTimeout((function(){return AD(i,void 0,void 0,(function(){var e,i;return xD(this,(function(a){switch(a.label){case 0:return e=!0,[4,QDe(n,t)];case 1:return i=a.sent(),e=!1,t.todo>0&&r(e,i,n,r),[2]}}))}))}),5e3*Math.random())}function eLe(e){return AD(this,void 0,void 0,(function(){var t;return xD(this,(function(n){return(t=navigator.userAgentData)?e?[2,t.getHighEntropyValues(e).catch((function(){return t.toJSON()}))]:[2,t.toJSON()]:[2,void 0]}))}))}function tLe(e,t,n){var r,i,a;return AD(this,void 0,void 0,(function(){function o(r){return AD(this,void 0,void 0,(function(){var i,a;return xD(this,(function(o){return $Re()?(c.push(r),$De(l,c,b,$De),[2,r]):(u.add(r),i=r.event.type.charAt(0),y&&r.event.context&&(r.event.context.userAgentData=y),a=HDe(r.event).json(),"track"===r.event.type&&delete a.traits,"alias"===r.event.type&&(a=function(e,t){var n,r,i,a,o=e.user();return t.previousId=null!==(i=null!==(r=null!==(n=t.previousId)&&void 0!==n?n:t.from)&&void 0!==r?r:o.id())&&void 0!==i?i:o.anonymousId(),t.userId=null!==(a=t.userId)&&void 0!==a?a:t.to,delete t.from,delete t.to,t}(e,a)),[2,m.dispatch("".concat(p,"/").concat(i),TNe(e,a,t,n)).then((function(){return r})).catch((function(){return c.pushWithBackoff(r),$De(l,c,b,$De),r})).finally((function(){u.delete(r)}))])}))}))}var s,c,u,l,d,f,p,h,m,y,b;return xD(this,(function(n){switch(n.label){case 0:window.addEventListener("pagehide",(function(){c.push.apply(c,Array.from(u)),u.clear()})),s=null!==(r=null==t?void 0:t.apiKey)&&void 0!==r?r:"",c=e.options.disableClientPersistence?new NRe(e.queue.queue.maxAttempts,[]):new LNe(e.queue.queue.maxAttempts,"".concat(s,":dest-Segment.io")),u=new Set,l=!1,d=null!==(i=null==t?void 0:t.apiHost)&&void 0!==i?i:ENe,f=null!==(a=null==t?void 0:t.protocol)&&void 0!==a?a:"https",p="".concat(f,"://").concat(d),h=null==t?void 0:t.deliveryStrategy,m="batching"===(null==h?void 0:h.strategy)?JDe(d,h.config):(g=null==h?void 0:h.config,{dispatch:function(e,t){return rNe(e,{keepalive:null==g?void 0:g.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(t)})}}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,eLe(e.options.highEntropyValuesClientHints)];case 2:return y=n.sent(),[3,4];case 3:return n.sent(),y=void 0,[3,4];case 4:return b={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:o,identify:o,page:o,alias:o,group:o,screen:o},c.todo&&$De(l,c,b,$De),[2,b]}var g}))}))}function nLe(e){var t,n=e.event;!function(e){if(!xRe(e))throw new wRe("Event",SRe);if("object"!=typeof e)throw new wRe("Event",IRe)}(n),function(e){if(!TRe(e.type))throw new wRe(".type",CRe)}(n),"track"===n.type&&function(e){if(!TRe(e.event))throw new wRe(".event",CRe)}(n);var r=null!==(t=n.properties)&&void 0!==t?t:n.traits;if("alias"!==n.type&&!ORe(r))throw new wRe(".properties","is not an object");return function(e){var t=".userId/anonymousId/previousId/groupId",n=function(e){var t,n,r;return null!==(r=null!==(n=null!==(t=e.userId)&&void 0!==t?t:e.anonymousId)&&void 0!==n?n:e.groupId)&&void 0!==r?r:e.previousId}(e);if(!xRe(n))throw new wRe(t,SRe);if(!TRe(n))throw new wRe(t,CRe)}(n),e}var rLe={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:nLe,identify:nLe,page:nLe,alias:nLe,group:nLe,screen:nLe},iLe=function(e,t,n){n.getCalls(e).forEach((function(e){lLe(t,e).catch(console.error)}))},aLe=function(e,t){return AD(void 0,void 0,void 0,(function(){var n,r,i;return xD(this,(function(a){switch(a.label){case 0:n=0,r=t.getCalls("addSourceMiddleware"),a.label=1;case 1:return n<r.length?(i=r[n],[4,lLe(e,i).catch(console.error)]):[3,4];case 2:a.sent(),a.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},oLe=iLe.bind(window,"on"),sLe=iLe.bind(window,"setAnonymousId"),cLe=function(e,t){t.toArray().forEach((function(t){setTimeout((function(){lLe(e,t).catch(console.error)}),0)}))},uLe=function(){function e(){this._value={}}return e.prototype.toArray=function(){var e;return(e=[]).concat.apply(e,Object.values(this._value))},e.prototype.getCalls=function(e){var t;return null!==(t=this._value[e])&&void 0!==t?t:[]},e.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach((function(t){e._value[t.method]?e._value[t.method].push(t):e._value[t.method]=[t]})),this},e.prototype.clear=function(){return this._value={},this},e}();function lLe(e,t){return AD(this,void 0,void 0,(function(){var n,r;return xD(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.called?[2,void 0]:(t.called=!0,n=e[t.method].apply(e,t.args),"object"==typeof(a=n)&&null!==a&&"then"in a&&"function"==typeof a.then?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return t.resolve(n),[3,4];case 3:return r=i.sent(),t.reject(r),[3,4];case 4:return[2]}var a}))}))}var dLe=function(){function e(e){var t=this;this._preInitBuffer=new uLe,this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=iNe,this._promise=e(this._preInitBuffer),this._promise.then((function(e){var n=e[0],r=e[1];t.instance=n,t.ctx=r})).catch((function(){}))}return e.prototype.then=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).then.apply(e,t)},e.prototype.catch=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).catch.apply(e,t)},e.prototype.finally=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).finally.apply(e,t)},e.prototype._createMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t.instance){var a=(n=t.instance)[e].apply(n,r);return Promise.resolve(a)}return new Promise((function(n,i){t._preInitBuffer.push({method:e,args:r,resolve:n,reject:i,called:!1})}))}},e.prototype._createChainableMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.instance?((n=t.instance)[e].apply(n,r),t):(t._preInitBuffer.push({method:e,args:r,resolve:function(){},reject:console.error,called:!1}),t)}},e}();function fLe(e){var t=e[0],n=e.slice(1);return{method:t,resolve:function(){},reject:console.error,args:n,called:!1}}var pLe,hLe,mLe=function(){var e=window.analytics;if(!Array.isArray(e))return[];var t=e.splice(0,e.length);return t.map(fLe)},yLe=null!==(pLe=(hLe=nNe()).__SEGMENT_INSPECTOR__)&&void 0!==pLe?pLe:hLe.__SEGMENT_INSPECTOR__={};function bLe(e,t){return AD(this,void 0,void 0,(function(){return xD(this,(function(n){switch(n.label){case 0:return t.push.apply(t,mLe()),[4,aLe(e,t)];case 1:return n.sent(),t.push.apply(t,mLe()),cLe(e,t),t.clear(),[2]}}))}))}function gLe(e,t,n,r,i,a,o){var s,c,u;return AD(this,void 0,void 0,(function(){var l,d,f,p,h,m,y,b,g,v,w,T,E=this;return xD(this,(function(A){switch(A.label){case 0:return function(e){var t,n,r;return"test"!==XNe().NODE_ENV&&(null!==(r=null===(n=null===(t=e.middlewareSettings)||void 0===t?void 0:t.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(t)?[4,Promise.resolve().then((function(){return s8e})).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return d=A.sent(),[3,3];case 2:d=void 0,A.label=3;case 3:return l=d,x=t,"test"!==XNe().NODE_ENV&&Object.keys(x.integrations).length>1||o.length>0?[4,Promise.resolve().then((function(){return h8e})).then((function(i){return i.ajsDestinations(e,t,n.integrations,r,l,o)}))]:[3,5];case 4:return p=A.sent(),[3,6];case 5:p=[],A.label=6;case 6:return f=p,t.legacyVideoPluginsEnabled?[4,Promise.resolve().then((function(){return m8e})).then((function(e){return e.loadLegacyVideoPlugins(n)}))]:[3,8];case 7:A.sent(),A.label=8;case 8:return(null===(s=r.plan)||void 0===s?void 0:s.track)?[4,Promise.resolve().then((function(){return y8e})).then((function(e){var n;return e.schemaFilter(null===(n=r.plan)||void 0===n?void 0:n.track,t)}))]:[3,10];case 9:return m=A.sent(),[3,11];case 10:m=void 0,A.label=11;case 11:return h=m,y=$Ne(t,i),[4,qDe(t,n.integrations,y,i.obfuscate,l).catch((function(){return[]}))];case 12:return b=A.sent(),g=kD(kD(kD([rLe,iMe],a,!0),f,!0),b,!0),h&&g.push(h),!1===(null===(c=r.integrations)||void 0===c?void 0:c.All)&&!r.integrations["Segment.io"]||r.integrations&&!1===r.integrations["Segment.io"]?[3,14]:(w=(v=g).push,[4,tLe(n,y["Segment.io"],t.integrations)]);case 13:w.apply(v,[A.sent()]),A.label=14;case 14:return[4,n.register.apply(n,g)];case 15:return T=A.sent(),Object.entries(null!==(u=t.enabledMiddleware)&&void 0!==u?u:{}).some((function(e){return e[1]}))?[4,Promise.resolve().then((function(){return b8e})).then((function(e){var r=e.remoteMiddlewares;return AD(E,void 0,void 0,(function(){var e,a;return xD(this,(function(o){switch(o.label){case 0:return[4,r(T,t,i.obfuscate)];case 1:return e=o.sent(),a=e.map((function(e){return n.addSourceMiddleware(e)})),[2,Promise.all(a)]}}))}))}))]:[3,17];case 16:A.sent(),A.label=17;case 17:return[2,T]}var x}))}))}function vLe(e,t,n){var r,i,a,o,s,c,u;return void 0===t&&(t={}),AD(this,void 0,void 0,(function(){var l,d,f,p,h,m,y,b,g,v,w;return xD(this,(function(T){switch(T.label){case 0:return e.cdnURL&&(O=e.cdnURL,window.analytics&&(window.analytics._cdn=O),YNe=O),null===(r=e.cdnSettings)||void 0===r?[3,1]:(d=r,[3,3]);case 1:return[4,(E=e.writeKey,A=e.cdnURL,x=null!=A?A:ZNe(),rNe("".concat(x,"/v1/projects/").concat(E,"/settings")).then((function(e){return e.ok?e.json():e.text().then((function(e){throw new Error(e)}))})).catch((function(e){throw console.error(e.message),e})))];case 2:d=T.sent(),T.label=3;case 3:return l=d,t.updateCDNSettings&&(l=t.updateCDNSettings(l)),f=null===(a=null===(i=l.integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===a||a,p=gD({retryQueue:f},t),function(e){var t;null===(t=yLe.attach)||void 0===t||t.call(yLe,e)}(h=new KNe(e,p)),m=null!==(o=e.plugins)&&void 0!==o?o:[],y=null!==(s=e.classicIntegrations)&&void 0!==s?s:[],CNe.initRemoteMetrics(l.metrics),function(e,t){t.push.apply(t,mLe()),sLe(e,t),oLe(e,t)}(h,n),[4,gLe(e.writeKey,l,h,p,t,m,y)];case 4:return b=T.sent(),g=null!==(c=window.location.search)&&void 0!==c?c:"",v=null!==(u=window.location.hash)&&void 0!==u?u:"",(w=g.length?g:v.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,h.queryString(w).catch(console.error)]:[3,6];case 5:T.sent(),T.label=6;case 6:return h.initialized=!0,h.emit("initialize",e,t),t.initialPageview&&h.page().catch(console.error),[4,bLe(h,n)];case 7:return T.sent(),[2,[h,b]]}var E,A,x,O}))}))}var wLe=function(e){function t(){var t,n,r,i=this,a=(r=new Promise((function(e,r){t=e,n=r})),{resolve:t,reject:n,promise:r}),o=a.promise,s=a.resolve;return i=e.call(this,(function(e){return o.then((function(t){return vLe(t[0],t[1],e)}))}))||this,i._resolveLoadStart=function(e,t){return s([e,t])},i}return bD(t,e),t.prototype.load=function(e,t){return void 0===t&&(t={}),this._resolveLoadStart(e,t),this},t.load=function(e,n){return void 0===n&&(n={}),(new t).load(e,n)},t.standalone=function(e,n){return t.load({writeKey:e},n).then((function(e){return e[0]}))},t}(dLe),TLe=Object.create,ELe=Object.defineProperty,ALe=Object.getOwnPropertyDescriptor,xLe=Object.getOwnPropertyNames,OLe=Object.getOwnPropertySymbols,CLe=Object.getPrototypeOf,ILe=Object.prototype.hasOwnProperty,SLe=Object.prototype.propertyIsEnumerable,_Le=(e,t,n)=>t in e?ELe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,PLe=(e,t)=>{for(var n in t||(t={}))ILe.call(t,n)&&_Le(e,n,t[n]);if(OLe)for(var n of OLe(t))SLe.call(t,n)&&_Le(e,n,t[n]);return e},kLe=(e,t)=>function(){return t||(0,e[xLe(e)[0]])((t={exports:{}}).exports,t),t.exports},RLe=(e,t,n)=>(n=null!=e?TLe(CLe(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of xLe(t))ILe.call(e,n)||undefined===n||ELe(e,n,{get:()=>t[n],enumerable:!(r=ALe(t,n))||r.enumerable});return e})(!t&&e&&e.__esModule?n:ELe(n,"default",{value:e,enumerable:!0}),e)),NLe=kLe({"../../node_modules/react-is/cjs/react-is.production.min.js"(e){var t="function"==typeof Symbol&&Symbol.for,n=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,c=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,b=t?Symbol.for("react.fundamental"):60117,g=t?Symbol.for("react.responder"):60118,v=t?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case u:case l:case i:case o:case a:case f:return e;default:switch(e=e&&e.$$typeof){case c:case d:case m:case h:case s:return e;default:return t}}case r:return t}}}function T(e){return w(e)===l}e.AsyncMode=u,e.ConcurrentMode=l,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=m,e.Memo=h,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return T(e)||w(e)===u},e.isConcurrentMode=T,e.isContextConsumer=function(e){return w(e)===c},e.isContextProvider=function(e){return w(e)===s},e.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},e.isForwardRef=function(e){return w(e)===d},e.isFragment=function(e){return w(e)===i},e.isLazy=function(e){return w(e)===m},e.isMemo=function(e){return w(e)===h},e.isPortal=function(e){return w(e)===r},e.isProfiler=function(e){return w(e)===o},e.isStrictMode=function(e){return w(e)===a},e.isSuspense=function(e){return w(e)===f},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===l||e===o||e===a||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===b||e.$$typeof===g||e.$$typeof===v||e.$$typeof===y)},e.typeOf=w}}),MLe=kLe({"../../node_modules/react-is/index.js"(e,t){t.exports=NLe()}}),DLe=kLe({"../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"(e,t){var n=MLe(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function s(e){return n.isMemo(e)?a:o[e.$$typeof]||r}o[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[n.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;t.exports=function e(t,n,r){if("string"!=typeof n){if(p){var a=f(n);a&&a!==p&&e(t,a,r)}var o=u(n);l&&(o=o.concat(l(n)));for(var h=s(t),m=s(n),y=0;y<o.length;++y){var b=o[y];if(!(i[b]||r&&r[b]||m&&m[b]||h&&h[b])){var g=d(n,b);try{c(t,b,g)}catch(e){}}}}return t}}}),LLe=kLe({"../../node_modules/@babel/runtime/helpers/extends.js"(e,t){function n(){return t.exports=n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.exports.__esModule=!0,t.exports.default=t.exports,n.apply(this,arguments)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}});function FLe(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}var BLe=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(t){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),jLe="-ms-",ULe="-moz-",zLe="-webkit-",HLe="comm",WLe="rule",VLe="decl",GLe="@keyframes",qLe=Math.abs,KLe=String.fromCharCode,XLe=Object.assign;function YLe(e){return e.trim()}function JLe(e,t,n){return e.replace(t,n)}function ZLe(e,t){return e.indexOf(t)}function QLe(e,t){return 0|e.charCodeAt(t)}function $Le(e,t,n){return e.slice(t,n)}function eFe(e){return e.length}function tFe(e){return e.length}function nFe(e,t){return t.push(e),e}var rFe=1,iFe=1,aFe=0,oFe=0,sFe=0,cFe="";function uFe(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:rFe,column:iFe,length:o,return:""}}function lFe(e,t){return XLe(uFe("",null,null,"",null,null,0),e,{length:-e.length},t)}function dFe(){return sFe=oFe<aFe?QLe(cFe,oFe++):0,iFe++,10===sFe&&(iFe=1,rFe++),sFe}function fFe(){return QLe(cFe,oFe)}function pFe(){return oFe}function hFe(e,t){return $Le(cFe,e,t)}function mFe(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function yFe(e){return rFe=iFe=1,aFe=eFe(cFe=e),oFe=0,[]}function bFe(e){return cFe="",e}function gFe(e){return YLe(hFe(oFe-1,TFe(91===e?e+2:40===e?e+1:e)))}function vFe(e){for(;(sFe=fFe())&&sFe<33;)dFe();return mFe(e)>2||mFe(sFe)>3?"":" "}function wFe(e,t){for(;--t&&dFe()&&!(sFe<48||sFe>102||sFe>57&&sFe<65||sFe>70&&sFe<97););return hFe(e,pFe()+(t<6&&32==fFe()&&32==dFe()))}function TFe(e){for(;dFe();)switch(sFe){case e:return oFe;case 34:case 39:34!==e&&39!==e&&TFe(sFe);break;case 40:41===e&&TFe(e);break;case 92:dFe()}return oFe}function EFe(e,t){for(;dFe()&&e+sFe!==57&&(e+sFe!==84||47!==fFe()););return"/*"+hFe(t,oFe-1)+"*"+KLe(47===e?e:dFe())}function AFe(e){for(;!mFe(fFe());)dFe();return hFe(e,oFe)}function xFe(e){return bFe(OFe("",null,null,null,[""],e=yFe(e),0,[0],e))}function OFe(e,t,n,r,i,a,o,s,c){for(var u=0,l=0,d=o,f=0,p=0,h=0,m=1,y=1,b=1,g=0,v="",w=i,T=a,E=r,A=v;y;)switch(h=g,g=dFe()){case 40:if(108!=h&&58==QLe(A,d-1)){-1!=ZLe(A+=JLe(gFe(g),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:A+=gFe(g);break;case 9:case 10:case 13:case 32:A+=vFe(h);break;case 92:A+=wFe(pFe()-1,7);continue;case 47:switch(fFe()){case 42:case 47:nFe(IFe(EFe(dFe(),pFe()),t,n),c);break;default:A+="/"}break;case 123*m:s[u++]=eFe(A)*b;case 125*m:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+l:-1==b&&(A=JLe(A,/\f/g,"")),p>0&&eFe(A)-d&&nFe(p>32?SFe(A+";",r,n,d-1):SFe(JLe(A," ","")+";",r,n,d-2),c);break;case 59:A+=";";default:if(nFe(E=CFe(A,t,n,u,l,i,s,v,w=[],T=[],d),a),123===g)if(0===l)OFe(A,t,E,E,w,a,d,s,T);else switch(99===f&&110===QLe(A,3)?100:f){case 100:case 108:case 109:case 115:OFe(e,E,E,r&&nFe(CFe(e,E,E,0,0,i,s,v,i,w=[],d),T),i,T,d,s,r?w:T);break;default:OFe(A,E,E,E,[""],T,0,s,T)}}u=l=p=0,m=b=1,v=A="",d=o;break;case 58:d=1+eFe(A),p=h;default:if(m<1)if(123==g)--m;else if(125==g&&0==m++&&125==(sFe=oFe>0?QLe(cFe,--oFe):0,iFe--,10===sFe&&(iFe=1,rFe--),sFe))continue;switch(A+=KLe(g),g*m){case 38:b=l>0?1:(A+="\f",-1);break;case 44:s[u++]=(eFe(A)-1)*b,b=1;break;case 64:45===fFe()&&(A+=gFe(dFe())),f=fFe(),l=d=eFe(v=A+=AFe(pFe())),g++;break;case 45:45===h&&2==eFe(A)&&(m=0)}}return a}function CFe(e,t,n,r,i,a,o,s,c,u,l){for(var d=i-1,f=0===i?a:[""],p=tFe(f),h=0,m=0,y=0;h<r;++h)for(var b=0,g=$Le(e,d+1,d=qLe(m=o[h])),v=e;b<p;++b)(v=YLe(m>0?f[b]+" "+g:JLe(g,/&\f/g,f[b])))&&(c[y++]=v);return uFe(e,t,n,0===i?WLe:s,c,u,l)}function IFe(e,t,n){return uFe(e,t,n,HLe,KLe(sFe),$Le(e,2,-2),0)}function SFe(e,t,n,r){return uFe(e,t,n,VLe,$Le(e,0,r),$Le(e,r+1,-1),r)}function _Fe(e,t){for(var n="",r=tFe(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function PFe(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case VLe:return e.return=e.return||e.value;case HLe:return"";case GLe:return e.return=e.value+"{"+_Fe(e.children,r)+"}";case WLe:e.value=e.props.join(",")}return eFe(n=_Fe(e.children,r))?e.return=e.value+"{"+n+"}":""}function kFe(e){var t=tFe(e);return function(n,r,i,a){for(var o="",s=0;s<t;s++)o+=e[s](n,r,i,a)||"";return o}}function RFe(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var NFe=function(e,t,n){for(var r=0,i=0;r=i,i=fFe(),38===r&&12===i&&(t[n]=1),!mFe(i);)dFe();return hFe(e,oFe)},MFe=new WeakMap,DFe=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||MFe.get(n))&&!r){MFe.set(e,!0);for(var i=[],a=function(e,t){return bFe(function(e,t){var n=-1,r=44;do{switch(mFe(r)){case 0:38===r&&12===fFe()&&(t[n]=1),e[n]+=NFe(oFe-1,t,n);break;case 2:e[n]+=gFe(r);break;case 4:if(44===r){e[++n]=58===fFe()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=KLe(r)}}while(r=dFe());return e}(yFe(e),t))}(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var u=0;u<o.length;u++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[u]):o[u]+" "+a[s]}}},LFe=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function FFe(e,t){switch(function(e,t){return 45^QLe(e,0)?(((t<<2^QLe(e,0))<<2^QLe(e,1))<<2^QLe(e,2))<<2^QLe(e,3):0}(e,t)){case 5103:return zLe+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return zLe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return zLe+e+ULe+e+jLe+e+e;case 6828:case 4268:return zLe+e+jLe+e+e;case 6165:return zLe+e+jLe+"flex-"+e+e;case 5187:return zLe+e+JLe(e,/(\w+).+(:[^]+)/,zLe+"box-$1$2"+jLe+"flex-$1$2")+e;case 5443:return zLe+e+jLe+"flex-item-"+JLe(e,/flex-|-self/,"")+e;case 4675:return zLe+e+jLe+"flex-line-pack"+JLe(e,/align-content|flex-|-self/,"")+e;case 5548:return zLe+e+jLe+JLe(e,"shrink","negative")+e;case 5292:return zLe+e+jLe+JLe(e,"basis","preferred-size")+e;case 6060:return zLe+"box-"+JLe(e,"-grow","")+zLe+e+jLe+JLe(e,"grow","positive")+e;case 4554:return zLe+JLe(e,/([^-])(transform)/g,"$1"+zLe+"$2")+e;case 6187:return JLe(JLe(JLe(e,/(zoom-|grab)/,zLe+"$1"),/(image-set)/,zLe+"$1"),e,"")+e;case 5495:case 3959:return JLe(e,/(image-set\([^]*)/,zLe+"$1$`$1");case 4968:return JLe(JLe(e,/(.+:)(flex-)?(.*)/,zLe+"box-pack:$3"+jLe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+zLe+e+e;case 4095:case 3583:case 4068:case 2532:return JLe(e,/(.+)-inline(.+)/,zLe+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(eFe(e)-1-t>6)switch(QLe(e,t+1)){case 109:if(45!==QLe(e,t+4))break;case 102:return JLe(e,/(.+:)(.+)-([^]+)/,"$1"+zLe+"$2-$3$1"+ULe+(108==QLe(e,t+3)?"$3":"$2-$3"))+e;case 115:return~ZLe(e,"stretch")?FFe(JLe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==QLe(e,t+1))break;case 6444:switch(QLe(e,eFe(e)-3-(~ZLe(e,"!important")&&10))){case 107:return JLe(e,":",":"+zLe)+e;case 101:return JLe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+zLe+(45===QLe(e,14)?"inline-":"")+"box$3$1"+zLe+"$2$3$1"+jLe+"$2box$3")+e}break;case 5936:switch(QLe(e,t+11)){case 114:return zLe+e+jLe+JLe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return zLe+e+jLe+JLe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return zLe+e+jLe+JLe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return zLe+e+jLe+e+e}return e}var BFe,jFe,UFe="undefined"!=typeof document,zFe=UFe?void 0:(BFe=function(){return RFe((function(){var e={};return function(t){return e[t]}}))},jFe=new WeakMap,function(e){if(jFe.has(e))return jFe.get(e);var t=BFe();return jFe.set(e,t),t}),HFe=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case VLe:e.return=FFe(e.value,e.length);break;case GLe:return _Fe([lFe(e,{value:JLe(e.value,"@","@"+zLe)})],r);case WLe:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return _Fe([lFe(e,{props:[JLe(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return _Fe([lFe(e,{props:[JLe(t,/:(plac\w+)/,":"+zLe+"input-$1")]}),lFe(e,{props:[JLe(t,/:(plac\w+)/,":-moz-$1")]}),lFe(e,{props:[JLe(t,/:(plac\w+)/,jLe+"input-$1")]})],r)}return""}))}}],WFe=function(e){var t=e.key;if(UFe&&"css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i,a=e.stylisPlugins||HFe,o={},s=[];UFe&&(r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)o[t[n]]=!0;s.push(e)})));var c,u=[DFe,LFe];if(UFe){var l,d=[PFe,(c=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],f=kFe(u.concat(a,d));i=function(e,t,n,r){l=n,_Fe(xFe(e?e+"{"+t.styles+"}":t.styles),f),r&&(y.inserted[t.name]=!0)}}else{var p=[PFe],h=kFe(u.concat(a,p)),m=zFe(a)(t);i=function(e,t,n,r){var i=t.name,a=function(e,t){var n=t.name;return void 0===m[n]&&(m[n]=_Fe(xFe(e?e+"{"+t.styles+"}":t.styles),h)),m[n]}(e,t);return void 0===y.compat?(r&&(y.inserted[i]=!0),a):r?void(y.inserted[i]=a):a}}var y={key:t,sheet:new BLe({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:i};return y.sheet.hydrate(s),y},VFe="undefined"!=typeof document,GFe=function(e,t,n){var r=e.key+"-"+t.name;(!1===n||!1===VFe&&void 0!==e.compat)&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},qFe={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},KFe=/[A-Z]|^ms/g,XFe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,YFe=function(e){return 45===e.charCodeAt(1)},JFe=function(e){return null!=e&&"boolean"!=typeof e},ZFe=RFe((function(e){return YFe(e)?e:e.replace(KFe,"-$&").toLowerCase()})),QFe=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(XFe,(function(e,t,n){return eBe={name:t,styles:n,next:eBe},t}))}return 1===qFe[e]||YFe(e)||"number"!=typeof t||0===t?t:t+"px"};function $Fe(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return eBe={name:n.name,styles:n.styles,next:eBe},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)eBe={name:r.name,styles:r.styles,next:eBe},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=$Fe(e,t,n[i])+";";else for(var a in n){var o=n[a];if("object"!=typeof o)null!=t&&void 0!==t[o]?r+=a+"{"+t[o]+"}":JFe(o)&&(r+=ZFe(a)+":"+QFe(a,o)+";");else if(!Array.isArray(o)||"string"!=typeof o[0]||null!=t&&void 0!==t[o[0]]){var s=$Fe(e,t,o);switch(a){case"animation":case"animationName":r+=ZFe(a)+":"+s+";";break;default:r+=a+"{"+s+"}"}}else for(var c=0;c<o.length;c++)JFe(o[c])&&(r+=ZFe(a)+":"+QFe(a,o[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=eBe,a=n(e);return eBe=i,$Fe(e,t,a)}}if(null==t)return n;var o=t[n];return void 0!==o?o:n}var eBe,tBe=/label:\s*([^\s;\n{]+)\s*(;|$)/g,nBe="undefined"!=typeof document,rBe=!!$Q.useInsertionEffect&&$Q.useInsertionEffect,iBe=nBe&&rBe||function(e){return e()},aBe="undefined"!=typeof document,oBe={}.hasOwnProperty,sBe=$Q.createContext("undefined"!=typeof HTMLElement?WFe({key:"css"}):null);sBe.Provider;var cBe=function(e){return $Q.forwardRef((function(t,n){var r=$Q.useContext(sBe);return e(t,r,n)}))};aBe||(cBe=function(e){return function(t){var n=$Q.useContext(sBe);return null===n?(n=WFe({key:"css"}),$Q.createElement(sBe.Provider,{value:n},e(t,n))):e(t,n)}});var uBe,lBe=$Q.createContext({}),dBe="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",fBe=function(e,t){var n={};for(var r in t)oBe.call(t,r)&&(n[r]=t[r]);return n[dBe]=e,n},pBe=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;GFe(t,n,r);var i=iBe((function(){return function(e,t,n){GFe(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i="",a=t;do{var o=e.insert(t===a?"."+r:"",a,e.sheet,!0);VFe||void 0===o||(i+=o),a=a.next}while(void 0!==a);if(!VFe&&0!==i.length)return i}}(t,n,r)}));if(!aBe&&void 0!==i){for(var a,o=n.name,s=n.next;void 0!==s;)o+=" "+s.name,s=s.next;return $Q.createElement("style",((a={})["data-emotion"]=t.key+" "+o,a.dangerouslySetInnerHTML={__html:i},a.nonce=t.sheet.nonce,a))}return null},hBe=cBe((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[dBe],a=[r],o="";"string"==typeof e.className?o=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(t.registered,a,e.className):null!=e.className&&(o=e.className+" ");var s=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";eBe=void 0;var a=e[0];null==a||void 0===a.raw?(r=!1,i+=$Fe(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=$Fe(n,t,e[o]),r&&(i+=a[o]);tBe.lastIndex=0;for(var s,c="";null!==(s=tBe.exec(i));)c+="-"+s[1];var u=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+c;return{name:u,styles:i,next:eBe}}(a,void 0,$Q.useContext(lBe));o+=t.key+"-"+s.name;var c={};for(var u in e)!oBe.call(e,u)||"css"===u||u===dBe||(c[u]=e[u]);return c.ref=n,c.className=o,$Q.createElement($Q.Fragment,null,$Q.createElement(pBe,{cache:t,serialized:s,isStringTag:"string"==typeof i}),$Q.createElement(i,c))})),mBe=hBe;RLe(LLe()),RLe(DLe()),function(e){e.CONNECT="Connect",e.WALLET="Wallet",e.ON_RAMP="OnRamp",e.SWAP="Swap",e.BRIDGE="Bridge",e.SALE="PrimarySale"}(uBe||(uBe={}));const{AnalyticsProvider:yBe,useAnalytics:bBe}=function({appName:e,writeKey:t}){const n=$Q.createContext(void 0);return{AnalyticsProvider:function({children:r,loaderOverride:i=wLe,log:a=console.log}){const[o,s]=$Q.useState(t),c=$Q.useMemo((()=>o?i.load({writeKey:o}):function(e,t){const n=e.load({writeKey:"",cdnSettings:{integrations:{}}},{integrations:{All:!1}});return["identify","group","alias","page","track"].forEach((e=>{n.on(e,((...n)=>t(PLe({method:e},n))))})),n}(i,a)),[i,o,a]),u=$Q.useCallback((({userJourney:t,screen:n,action:r,extras:i={}})=>{const a=[e+FLe(t)+FLe(n)+FLe(r)].join("");return c.page(a,i)}),[c]),l=$Q.useCallback((t=>{var n=t,{userJourney:r,screen:i,action:a,extras:o={}}=n,s=((e,t)=>{var n={};for(var r in e)ILe.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&OLe)for(var r of OLe(e))t.indexOf(r)<0&&SLe.call(e,r)&&(n[r]=e[r]);return n})(n,["userJourney","screen","action","extras"]);let u="";"control"in s&&"controlType"in s&&(u=FLe(s.control)+FLe(s.controlType));const l=[e+FLe(r)+FLe(i),u+FLe(a)].join("_");return c.track(l,PLe({},o))}),[c]),d=$Q.useCallback((()=>{return e=this,null,t=function*(){const e=("undefined"==typeof document?"":document.cookie).split("; ").find((e=>e.startsWith("ajs_user_id=")));if(e){const t=e.split("=")[1];return c.identify(t)}return Promise.reject(new Error("No user ID found in cookie"))},new Promise(((n,r)=>{var i=e=>{try{o(t.next(e))}catch(e){r(e)}},a=e=>{try{o(t.throw(e))}catch(e){r(e)}},o=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,a);o((t=t.apply(e,null)).next())}));var e,t}),[c]),f=$Q.useMemo((()=>({page:u,track:l,identifyFromCookie:d,identify:c.identify,group:c.group,alias:c.alias,updateWriteKey:s})),[c,u,l,d]);return function(e,t,n){return oBe.call(t,"css")?u$.jsx(mBe,fBe(e,t),n):u$.jsx(e,t,n)}(n.Provider,{value:f,children:r})},useAnalytics:function(){const e=$Q.useContext(n);if(!e)throw new Error("useAnalytics: Store not found");return e}}}({writeKey:"",appName:"checkout"});function gBe({children:e,checkout:t}){const{updateWriteKey:n}=bBe(),r=$Q.useCallback((async()=>{try{return await(t?.config?.remote.getConfig("telemetry"))}catch(e){console.error("unable to fetch telemetry config: ",e)}}),[t]);return $Q.useEffect((()=>{(async()=>{const e=await r();e&&n(e.segmentPublishableKey)})()}),[r]),y1(m1,{children:e})}function vBe({children:e,checkout:t}){return y1(yBe,{children:y1(gBe,{checkout:t,children:e})})}function wBe({header:e,footer:t,children:n,heroContent:r,testId:i,floatHeader:a=!1,footerBackgroundColor:o,bodyStyleOverrides:s}){return y1(Rae,{sx:uRe,children:b1(Rae,{testId:i,sx:lRe,children:[e&&y1(Rae,{sx:dRe(a),children:e}),b1(Rae,{sx:pRe,children:[r&&y1(Rae,{sx:hRe,children:r}),n&&y1(Rae,{sx:{...mRe,...s},children:n})]}),t&&y1(Rae,{sx:fRe(o),children:t})]})})}function TBe({loadingText:e,textDuration:t}){const n=Array.isArray(e)?e:[e],r=t||2500;return y1(wBe,{children:y1(_ge,{visible:!0,children:y1(_ge.Content,{children:y1(_ge.Content.LoopingText,{text:[...n],textDuration:r})})})})}function EBe(e){switch(e){case MZ.ETHEREUM:return DZ.ETHEREUM;case MZ.IMTBL_ZKEVM_TESTNET:return DZ.IMTBL_ZKEVM_TESTNET;case MZ.IMTBL_ZKEVM_MAINNET:return DZ.IMTBL_ZKEVM_MAINNET;case MZ.IMTBL_ZKEVM_DEVNET:return DZ.IMTBL_ZKEVM_DEVNET;case MZ.SEPOLIA:return DZ.SEPOLIA;default:return""}}function ABe(e){switch(e){case MZ.ETHEREUM:return LZ.ETHEREUM;case MZ.IMTBL_ZKEVM_TESTNET:return LZ.IMTBL_ZKEVM_TESTNET;case MZ.IMTBL_ZKEVM_MAINNET:return LZ.IMTBL_ZKEVM_MAINNET;case MZ.IMTBL_ZKEVM_DEVNET:return LZ.IMTBL_ZKEVM_DEVNET;case MZ.SEPOLIA:return LZ.SEPOLIA;default:return""}}function xBe(e){switch(e){case LZ.ETHEREUM:return MZ.ETHEREUM;case LZ.IMTBL_ZKEVM_TESTNET:return MZ.IMTBL_ZKEVM_TESTNET;case LZ.IMTBL_ZKEVM_MAINNET:return MZ.IMTBL_ZKEVM_MAINNET;case LZ.IMTBL_ZKEVM_DEVNET:return MZ.IMTBL_ZKEVM_DEVNET;case LZ.SEPOLIA:return MZ.SEPOLIA;default:return 0}}const OBe={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 CBe{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||OBe,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 CBe(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new CBe(this.logger,e)}}var IBe=new CBe;let SBe=class{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]=this.observers[e]||[],this.observers[e].push(t)})),this}off(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((e=>e!==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];if(this.observers[e]){[].concat(this.observers[e]).forEach((e=>{e(...n)}))}if(this.observers["*"]){[].concat(this.observers["*"]).forEach((t=>{t.apply(t,[e,...n])}))}}};function _Be(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}function PBe(e){return null==e?"":""+e}function kBe(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}const a="string"!=typeof t?[].concat(t):t.split(".");for(;a.length>1;){if(i())return{};const t=r(a.shift());!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{}}return i()?{}:{obj:e,k:r(a.shift())}}function RBe(e,t,n){const{obj:r,k:i}=kBe(e,t,Object);r[i]=n}function NBe(e,t){const{obj:n,k:r}=kBe(e,t);if(n)return n[r]}function MBe(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]):MBe(e[r],t[r],n):e[r]=t[r]);return e}function DBe(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var LBe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function FBe(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>LBe[e])):e}const BBe=[" ",",","?","!",";"];function jBe(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;++e){if(!i)return;if("string"==typeof i[r[e]]&&e+1<r.length)return;if(void 0===i[r[e]]){let a=2,o=r.slice(e,e+a).join(n),s=i[o];for(;void 0===s&&r.length>e+a;)a++,o=r.slice(e,e+a).join(n),s=i[o];if(void 0===s)return;if(null===s)return null;if(t.endsWith(o)){if("string"==typeof s)return s;if(o&&"string"==typeof s[o])return s[o]}const c=r.slice(e+a).join(n);return c?jBe(s,c,n):void 0}i=i[r[e]]}return i}function UBe(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class zBe extends SBe{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,a=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let o=[e,t];n&&"string"!=typeof n&&(o=o.concat(n)),n&&"string"==typeof n&&(o=o.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(o=e.split("."));const s=NBe(this.data,o);return s||!a||"string"!=typeof n?s:jBe(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 a=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(o=e.split("."),r=t,t=o[1]),this.addNamespaces(t),RBe(this.data,o,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]&&"[object Array]"!==Object.prototype.toString.apply(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 a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=NBe(this.data,o)||{};r?MBe(s,n,i):s={...s,...n},RBe(this.data,o,s),a.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 HBe={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 WBe={};class VBe extends SBe{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),function(e,t,n){e.forEach((e=>{t[e]&&(n[e]=t[e])}))}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=IBe.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 a=n&&e.indexOf(n)>-1,o=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";const r=BBe.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const i=new RegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let a=!i.test(e);if(!a){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a}(e,n,r));if(a&&!o){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:i};const a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.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:a,namespaces:o}=this.extractFromKey(e[e.length-1],t),s=o[o.length-1],c=t.lng||this.language,u=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(u){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${a}`}return r?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:a}const l=this.resolve(e,t);let d=l&&l.res;const f=l&&l.usedKey||a,p=l&&l.exactUsedKey||a,h=Object.prototype.toString.apply(d),m=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject;if(y&&d&&("string"!=typeof d&&"boolean"!=typeof d&&"number"!=typeof d)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(h)<0&&("string"!=typeof m||"[object Array]"!==h)){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:o}):`key '${a} (${this.language})' returned an object instead of string.`;return r?(l.res=e,l.usedParams=this.getUsedParamsDetails(t),l):e}if(i){const e="[object Array]"===h,n=e?[]:{},r=e?p:f;for(const e in d)if(Object.prototype.hasOwnProperty.call(d,e)){const a=`${r}${i}${e}`;n[e]=this.translate(a,{...t,joinArrays:!1,ns:o}),n[e]===a&&(n[e]=d[e])}d=n}}else if(y&&"string"==typeof m&&"[object Array]"===h)d=d.join(m),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,o=!1;const u=void 0!==t.count&&"string"!=typeof t.count,f=VBe.hasDefaultValue(t),p=u?this.pluralResolver.getSuffix(c,t.count,t):"",h=t.ordinal&&u?this.pluralResolver.getSuffix(c,t.count,{ordinal:!1}):"",m=t[`defaultValue${p}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(r=!0,d=m),this.isValidLookup(d)||(o=!0,d=a);const y=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:d,b=f&&m!==d&&this.options.updateMissing;if(o||r||b){if(this.logger.log(b?"updateKey":"missingKey",c,s,a,b?m:d),i){const e=this.resolve(a,{...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:y;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&&u?e.forEach((e=>{this.pluralResolver.getSuffixes(e,t).forEach((n=>{r([e],a+n,t[`defaultValue${n}`]||m)}))})):r(e,a,m))}d=this.extendTranslation(d,e,t,l,n),o&&d===a&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${a}`),(o||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${a}`:a,r?d:void 0):this.options.parseMissingKeyHandler(d))}return r?(l.res=d,l.usedParams=this.getUsedParamsDetails(t),l):d}extendTranslation(e,t,n,r,i){var a=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 o="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(o){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),o){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),o=0;o<e;o++)r[o]=arguments[o];return i&&i[0]===r[0]&&!n.context?(a.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):a.translate(...r,t)}),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,s="string"==typeof o?[o]:o;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=HBe.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,a,o=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,o),c=s.key;n=c;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const l=void 0!==o.count&&"string"!=typeof o.count,d=l&&!o.ordinal&&0===o.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==o.context&&("string"==typeof o.context||"number"==typeof o.context)&&""!==o.context,p=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);u.forEach((e=>{this.isValidLookup(t)||(a=e,!WBe[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(WBe[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${a}" 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!!!")),p.forEach((n=>{if(this.isValidLookup(t))return;i=n;const a=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(a,c,n,e,o);else{let e;l&&(e=this.pluralResolver.getSuffix(n,o.count,o));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(l&&(a.push(c+e),o.ordinal&&0===e.indexOf(r)&&a.push(c+e.replace(r,this.options.pluralSeparator)),d&&a.push(c+t)),f){const n=`${c}${this.options.contextSeparator}${o.context}`;a.push(n),l&&(a.push(n+e),o.ordinal&&0===e.indexOf(r)&&a.push(n+e.replace(r,this.options.pluralSeparator)),d&&a.push(n+t))}}let s;for(;s=a.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,o))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:a}}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 GBe(e){return e.charAt(0).toUpperCase()+e.slice(1)}class qBe{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=IBe.create("languageUtils")}getScriptPartFromCode(e){if(!(e=UBe(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=UBe(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]=GBe(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]=GBe(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=GBe(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:0===e.indexOf(n)?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]),"[object Array]"===Object.prototype.toString.apply(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 KBe=[{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}],XBe={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 YBe=["v1","v2","v3"],JBe=["v4"],ZBe={zero:0,one:1,two:2,few:3,many:4,other:5};class QBe{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=IBe.create("pluralResolver"),this.options.compatibilityJSON&&!JBe.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 KBe.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:XBe[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(UBe(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)=>ZBe[e]-ZBe[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!YBe.includes(this.options.compatibilityJSON)}}function $Be(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=function(e,t,n){const r=NBe(e,n);return void 0!==r?r:NBe(t,n)}(e,t,n);return!a&&i&&"string"==typeof n&&(a=jBe(e,n,r),void 0===a&&(a=jBe(t,n,r))),a}class eje{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=IBe.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 t=e.interpolation;this.escape=void 0!==t.escape?t.escape:FBe,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?DBe(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?DBe(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?DBe(t.nestingPrefix):t.nestingPrefixEscaped||DBe("$t("),this.nestingSuffix=t.nestingSuffix?DBe(t.nestingSuffix):t.nestingSuffixEscaped||DBe(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const t=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(t,"g");const n=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(n,"g")}interpolate(e,t,n,r){let i,a,o;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}const u=e=>{if(e.indexOf(this.formatSeparator)<0){const i=$Be(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),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format($Be(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();const l=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=>c(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?c(this.escape(e)):c(e)}].forEach((t=>{for(o=0;i=t.regex.exec(e);){const n=i[1].trim();if(a=u(n),void 0===a)if("function"==typeof l){const t=l(e,i,r);a="string"==typeof t?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a="";else{if(d){a=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=""}else"string"==typeof a||this.useRawValueToEscape||(a=PBe(a));const s=t.safeValue(a);if(e=e.replace(i[0],s),d?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}})),e}nest(e,t){let n,r,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function o(e,t){const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let a=`{${r[1]}`;e=r[0],a=this.interpolate(a,i);const o=a.match(/'/g),s=a.match(/"/g);(o&&o.length%2==0&&!s||s.length%2!=0)&&(a=a.replace(/'/g,'"'));try{i=JSON.parse(a),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${a}`}return delete i.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){let s=[];i={...a},i=i.replace&&"string"!=typeof i.replace?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let c=!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,c=!0}if(r=t(o.call(this,n[1].trim(),i),i),r&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=PBe(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),c&&(r=s.reduce(((e,t)=>this.format(e,t,a.lng,{...a,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}function tje(e){const t={};return function(n,r,i){const a=r+JSON.stringify(i);let o=t[a];return o||(o=e(UBe(r),i),t[a]=o),o(n)}}class nje{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=IBe.create("formatter"),this.options=e,this.formats={number:tje(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:tje(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:tje(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:tje(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:tje(((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()]=tje(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:a}=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)return;const[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,"");n[t.trim()]||(n[t.trim()]=i),"false"===i&&(n[t.trim()]=!1),"true"===i&&(n[t.trim()]=!0),isNaN(i)||(n[t.trim()]=parseInt(i,10))}))}return{formatName:t,formatOptions:n}}(t);if(this.formats[i]){let t=e;try{const o=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e}),e);return i}}class rje extends SBe{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=IBe.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={},a={},o={},s={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(1===this.state[o]?void 0===a[o]&&(a[o]=!0):(this.state[o]=1,r=!1,void 0===a[o]&&(a[o]=!0),void 0===i[o]&&(i[o]=!0),void 0===s[t]&&(s[t]=!0)))})),r||(o[e]=!0)})),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),i=r[0],a=r[1];t&&this.emit("failedLoading",i,a,t),n&&this.store.addResourceBundle(i,a,n),this.state[e]=t?-1:2;const o={};this.queue.forEach((n=>{!function(e,t,n,r){const{obj:i,k:a}=kBe(e,t,Object);i[a]=i[a]||[],r&&(i[a]=i[a].concat(n)),r||i[a].push(n)}(n.loaded,[i],a),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=>{o[e]||(o[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===o[e][t]&&(o[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",o),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,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});this.readingCalls++;const o=(o,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)}o&&s&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*i,a)}),i):a(o,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,o);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>o(null,e))).catch(o):o(null,n)}catch(e){o(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,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)}))}saveMissing(e,t,n,r,i){let a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=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={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=5===c.length?c(e,t,n,r,s):c(e,t,n,r),i&&"function"==typeof i.then?i.then((e=>o(null,e))).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}function ije(){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,t,n,r)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function aje(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 oje(){}class sje extends SBe{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=aje(e),this.services={},this.logger=IBe,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;"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=ije();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options={...r,...this.options,...aje(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?IBe.init(i(this.modules.logger),this.options):IBe.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=nje);const n=new qBe(this.options);this.store=new zBe(this.options.resources,this.options);const a=this.services;a.logger=IBe,a.resourceStore=this.store,a.languageUtils=n,a.pluralResolver=new QBe(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||(a.formatter=i(t),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new eje(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new rje(i(this.modules.backend),a.resourceStore,a,this.options),a.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&&(a.languageDetector=i(this.modules.languageDetector),a.languageDetector.init&&a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=i(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new VBe(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=oje),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 a=_Be(),o=()=>{const e=(e,t)=>{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),a.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?o():setTimeout(o,0),a}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oje;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=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)r(n);else{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=_Be();return e||(e=this.languages),t||(t=this.options.ns),n||(n=oje),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&&HBe.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=_Be();this.emit("languageChanging",e);const i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(e,a)=>{a?(i(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit("languageChanged",a),this.logger.log("languageChanged",a)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},o=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=>{a(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(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const i=function(e,t){let a;if("object"!=typeof t){for(var o=arguments.length,s=new Array(o>2?o-2:0),c=2;c<o;c++)s[c-2]=arguments[c];a=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else a={...t};a.lng=a.lng||i.lng,a.lngs=a.lngs||i.lngs,a.ns=a.ns||i.ns,a.keyPrefix=a.keyPrefix||n||i.keyPrefix;const u=r.options.keySeparator||".";let l;return l=a.keyPrefix&&Array.isArray(e)?e.map((e=>`${a.keyPrefix}${u}${e}`)):a.keyPrefix?`${a.keyPrefix}${u}${e}`:e,r.t(l,a)};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 a=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||2===n};if(t.precheck){const e=t.precheck(this,a);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!a(n,e)||r&&!a(i,e)))}loadNamespaces(e,t){const n=_Be();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=_Be();"string"==typeof e&&(e=[e]);const r=this.options.preload||[],i=e.filter((e=>r.indexOf(e)<0));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 qBe(ije());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 sje(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]:oje;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new sje(r);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));return["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 zBe(this.store.data,r),i.services.resourceStore=i.store),i.translator=new VBe(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 cje=sje.createInstance();function uje(e){return uje="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},uje(e)}function lje(e){var t=function(e,t){if("object"!=uje(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=uje(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uje(t)?t:String(t)}function dje(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,lje(r.key),r)}}cje.createInstance=sje.createInstance,cje.createInstance,cje.dir,cje.init,cje.loadResources,cje.reloadResources,cje.use,cje.changeLanguage,cje.getFixedT,cje.t,cje.exists,cje.setDefaultNamespace,cje.hasLoadedNamespace,cje.loadNamespaces,cje.loadLanguages;var fje=[],pje=fje.forEach,hje=fje.slice;var mje=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,yje=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),a="".concat(e,"=").concat(i);if(r.maxAge>0){var o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(o))}if(r.domain){if(!mje.test(r.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(r.domain)}if(r.path){if(!mje.test(r.path))throw new TypeError("option path is invalid");a+="; Path=".concat(r.path)}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");a+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a}(e,encodeURIComponent(t),i)},bje=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},gje={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!=typeof document){var n=bje(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!=typeof document&&yje(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},vje={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 a=r[i].indexOf("=");if(a>0)r[i].substring(0,a)===e.lookupQuerystring&&(t=r[i].substring(a+1))}}return t}},wje=null,Tje=function(){if(null!==wje)return wje;try{wje="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){wje=!1}return wje},Eje={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&Tje()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&Tje()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},Aje=null,xje=function(){if(null!==Aje)return Aje;try{Aje="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Aje=!1}return Aje},Oje={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&xje()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&xje()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},Cje={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}},Ije={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}},Sje={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}},_je={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]}};var Pje=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,r;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 pje.call(hje.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(gje),this.addDetector(vje),this.addDetector(Eje),this.addDetector(Oje),this.addDetector(Cje),this.addDetector(Ije),this.addDetector(Sje),this.addDetector(_je)}},{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&&dje(t.prototype,n),r&&dje(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function kje(){return kje=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kje.apply(this,arguments)}Pje.type="languageDetector";var Rje=lt({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),Nje=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function Mje(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(Rje[n[1]]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var i=new RegExp(Nje),a=null;null!==(a=i.exec(e));)if(a[0].trim())if(a[1]){var o=a[1].trim(),s=[o,""];o.indexOf("=")>-1&&(s=o.split("=")),t.attrs[s[0]]=s[1],i.lastIndex--}else a[2]&&(t.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return t}var Dje=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Lje=/^\s*$/,Fje=Object.create(null);function Bje(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+'="'+e[n]+'"');return t.length?" "+t.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(Bje,"")+"</"+t.name+">";case"comment":return e+"\x3c!--"+t.comment+"--\x3e"}}var jje={parse:function(e,t){t||(t={}),t.components||(t.components=Fje);var n,r=[],i=[],a=-1,o=!1;if(0!==e.indexOf("<")){var s=e.indexOf("<");r.push({type:"text",content:-1===s?e:e.substring(0,s)})}return e.replace(Dje,(function(s,c){if(o){if(s!=="</"+n.name+">")return;o=!1}var u,l="/"!==s.charAt(1),d=s.startsWith("\x3c!--"),f=c+s.length,p=e.charAt(f);if(d){var h=Mje(s);return a<0?(r.push(h),r):((u=i[a]).children.push(h),r)}if(l&&(a++,"tag"===(n=Mje(s)).type&&t.components[n.name]&&(n.type="component",o=!0),n.voidElement||o||!p||"<"===p||n.children.push({type:"text",content:e.slice(f,e.indexOf("<",f))}),0===a&&r.push(n),(u=i[a-1])&&u.children.push(n),i[a]=n),(!l||n.voidElement)&&(a>-1&&(n.voidElement||n.name===s.slice(2,-1))&&(a--,n=-1===a?r:i[a]),!o&&"<"!==p&&p)){u=-1===a?r:i[a].children;var m=e.indexOf("<",f),y=e.slice(f,-1===m?void 0:m);Lje.test(y)&&(y=" "),(m>-1&&a+u.length>=0||" "!==y)&&u.push({type:"text",content:y})}})),r},stringify:function(e){return e.reduce((function(e,t){return e+Bje("",t)}),"")}};function Uje(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&(t[0]=`react-i18next:: ${t[0]}`),console.warn(...t)}}const zje={};function Hje(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&zje[t[0]]||("string"==typeof t[0]&&(zje[t[0]]=new Date),Uje(...t))}const Wje=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout((()=>{e.off("initialized",n)}),0),t()};e.on("initialized",n)}};function Vje(e,t,n){e.loadNamespaces(t,Wje(e,n))}function Gje(e,t,n,r){"string"==typeof n&&(n=[n]),n.forEach((t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)})),e.loadLanguages(t,Wje(e,r))}const qje=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Kje={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Xje=e=>Kje[e];let Yje,Jje={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(qje,Xje)};function Zje(){return Jje}function Qje(){return Yje}function $je(e,t){if(!e)return!1;const n=e.props?e.props.children:e.children;return t?n.length>0:!!n}function eUe(e){if(!e)return[];const t=e.props?e.props.children:e.children;return e.props&&e.props.i18nIsDynamicList?tUe(t):t}function tUe(e){return Array.isArray(e)?e:[e]}function nUe(e,t){if(!e)return"";let n="";const r=tUe(e),i=t.transSupportBasicHtmlNodes&&t.transKeepBasicHtmlNodesFor?t.transKeepBasicHtmlNodesFor:[];return r.forEach(((e,r)=>{if("string"==typeof e)n+=`${e}`;else if($Q.isValidElement(e)){const a=Object.keys(e.props).length,o=i.indexOf(e.type)>-1,s=e.props.children;if(!s&&o&&0===a)n+=`<${e.type}/>`;else if(s||o&&0===a)if(e.props.i18nIsDynamicList)n+=`<${r}></${r}>`;else if(o&&1===a&&"string"==typeof s)n+=`<${e.type}>${s}</${e.type}>`;else{const e=nUe(s,t);n+=`<${r}>${e}</${r}>`}else n+=`<${r}></${r}>`}else if(null===e)Uje("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"==typeof e){const{format:t,...r}=e,i=Object.keys(r);if(1===i.length){const e=t?`${i[0]}, ${t}`:i[0];n+=`{{${e}}}`}else Uje("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",e)}else Uje("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",e)})),n}function rUe(e,t,n,r,i,a){if(""===t)return[];const o=r.transKeepBasicHtmlNodesFor||[],s=t&&new RegExp(o.map((e=>`<${e}`)).join("|")).test(t);if(!e&&!s&&!a)return[t];const c={};!function e(t){tUe(t).forEach((t=>{"string"!=typeof t&&($je(t)?e(eUe(t)):"object"!=typeof t||$Q.isValidElement(t)||Object.assign(c,t))}))}(e);const u=jje.parse(`<0>${t}</0>`),l={...c,...i};function d(e,t,n){const r=eUe(e),i=p(r,t.children,n);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((e=>$Q.isValidElement(e)))}(r)&&0===i.length||e.props&&e.props.i18nIsDynamicList?r:i}function f(e,t,n,r,i){e.dummy?(e.children=t,n.push($Q.cloneElement(e,{key:r},i?void 0:t))):n.push(...$Q.Children.map([e],(e=>{const n={...e.props};return delete n.i18nIsDynamicList,e$.createElement(e.type,kje({},n,{key:r,ref:e.ref},i?{}:{children:t}))})))}function p(t,i,c){const u=tUe(t);return tUe(i).reduce(((t,i,h)=>{const m=i.children&&i.children[0]&&i.children[0].content&&n.services.interpolator.interpolate(i.children[0].content,l,n.language);if("tag"===i.type){let a=u[parseInt(i.name,10)];1!==c.length||a||(a=c[0][i.name]),a||(a={});const y=0!==Object.keys(i.attrs).length?function(e,t){const n={...t};return n.props=Object.assign(e.props,t.props),n}({props:i.attrs},a):a,b=$Q.isValidElement(y),g=b&&$je(i,!0)&&!i.voidElement,v=s&&"object"==typeof y&&y.dummy&&!b,w="object"==typeof e&&null!==e&&Object.hasOwnProperty.call(e,i.name);if("string"==typeof y){const e=n.services.interpolator.interpolate(y,l,n.language);t.push(e)}else if($je(y)||g){f(y,d(y,i,c),t,h)}else if(v){f(y,p(u,i.children,c),t,h)}else if(Number.isNaN(parseFloat(i.name)))if(w){f(y,d(y,i,c),t,h,i.voidElement)}else if(r.transSupportBasicHtmlNodes&&o.indexOf(i.name)>-1)if(i.voidElement)t.push($Q.createElement(i.name,{key:`${i.name}-${h}`}));else{const e=p(u,i.children,c);t.push($Q.createElement(i.name,{key:`${i.name}-${h}`},e))}else if(i.voidElement)t.push(`<${i.name} />`);else{const e=p(u,i.children,c);t.push(`<${i.name}>${e}</${i.name}>`)}else if("object"!=typeof y||b)f(y,m,t,h,1!==i.children.length||!m);else{const e=i.children[0]?m:null;e&&t.push(e)}}else if("text"===i.type){const e=r.transWrapTextNodes,o=a?r.unescape(n.services.interpolator.interpolate(i.content,l,n.language)):n.services.interpolator.interpolate(i.content,l,n.language);e?t.push($Q.createElement(e,{key:`${i.name}-${h}`},o)):t.push(o)}return t}),[])}return eUe(p([{dummy:!0,children:e||[]}],u,tUe(e||[]))[0])}function iUe(e){let{children:t,count:n,parent:r,i18nKey:i,context:a,tOptions:o={},values:s,defaults:c,components:u,ns:l,i18n:d,t:f,shouldUnescape:p,...h}=e;const m=d||Qje();if(!m)return Hje("You will need to pass in an i18next instance by using i18nextReactModule"),t;const y=f||m.t.bind(m)||(e=>e);a&&(o.context=a);const b={...Zje(),...m.options&&m.options.react};let g=l||y.ns||m.options&&m.options.defaultNS;g="string"==typeof g?[g]:g||["translation"];const v=nUe(t,b),w=c||v||b.transEmptyNodeValue||i,{hashTransKey:T}=b,E=i||(T?T(v||w):v||w);m.options&&m.options.interpolation&&m.options.interpolation.defaultVariables&&(s=s&&Object.keys(s).length>0?{...s,...m.options.interpolation.defaultVariables}:{...m.options.interpolation.defaultVariables});const A=s?o.interpolation:{interpolation:{...o.interpolation,prefix:"#$?",suffix:"?$#"}},x={...o,count:n,...s,...A,defaultValue:w,ns:g},O=E?y(E,x):w;u&&Object.keys(u).forEach((e=>{const t=u[e];"function"==typeof t.type||!t.props||!t.props.children||O.indexOf(`${e}/>`)<0&&O.indexOf(`${e} />`)<0||(u[e]=e$.createElement((function(){return e$.createElement(e$.Fragment,null,t)}),null))}));const C=rUe(u||t,O,m,b,x,p),I=void 0!==r?r:b.defaultTransParent;return I?$Q.createElement(I,h,C):C}const aUe={type:"3rdParty",init(e){!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Jje={...Jje,...e}}(e.options.react),function(e){Yje=e}(e)}},oUe=$Q.createContext();class sUe{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach((e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)}))}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function cUe(e){let{children:t,count:n,parent:r,i18nKey:i,context:a,tOptions:o={},values:s,defaults:c,components:u,ns:l,i18n:d,t:f,shouldUnescape:p,...h}=e;const{i18n:m,defaultNS:y}=$Q.useContext(oUe)||{},b=d||m||Qje(),g=f||b&&b.t.bind(b);return iUe({children:t,count:n,parent:r,i18nKey:i,context:a,tOptions:o,values:s,defaults:c,components:u,ns:l||g&&g.ns||y||b&&b.options&&b.options.defaultNS,i18n:b,t:f,shouldUnescape:p,...h})}const uUe=(e,t)=>{const n=$Q.useRef();return $Q.useEffect((()=>{n.current=t?n.current:e}),[e,t]),n.current};function lUe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=$Q.useContext(oUe)||{},a=n||r||Qje();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new sUe),!a){Hje("You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.defaultValue?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}a.options.react&&void 0!==a.options.react.wait&&Hje("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...Zje(),...a.options.react,...t},{useSuspense:s,keyPrefix:c}=o;let u=e||i||a.options&&a.options.defaultNS;u="string"==typeof u?[u]:u||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(u);const l=(a.isInitialized||a.initializedStoreOnce)&&u.every((e=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?void 0!==t.options.ignoreJSONStructure?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=t.languages[0],i=!!t.options&&t.options.fallbackLng,a=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;const o=(e,n)=>{const r=t.services.backendConnector.state[`${e}|${n}`];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)||!t.hasResourceBundle(r,e)&&t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages)&&(!o(r,e)||i&&!o(a,e)))}(e,t,n):(Hje("i18n.languages were undefined or empty",t.languages),!0)}(e,a,o)));function d(){return a.getFixedT(t.lng||null,"fallback"===o.nsMode?u:u[0],c)}const[f,p]=$Q.useState(d);let h=u.join();t.lng&&(h=`${t.lng}${h}`);const m=uUe(h),y=$Q.useRef(!0);$Q.useEffect((()=>{const{bindI18n:e,bindI18nStore:n}=o;function r(){y.current&&p(d)}return y.current=!0,l||s||(t.lng?Gje(a,t.lng,u,(()=>{y.current&&p(d)})):Vje(a,u,(()=>{y.current&&p(d)}))),l&&m&&m!==h&&y.current&&p(d),e&&a&&a.on(e,r),n&&a&&a.store.on(n,r),()=>{y.current=!1,e&&a&&e.split(" ").forEach((e=>a.off(e,r))),n&&a&&n.split(" ").forEach((e=>a.store.off(e,r)))}}),[a,h]);const b=$Q.useRef(!0);$Q.useEffect((()=>{y.current&&!b.current&&p(d),b.current=!1}),[a,c]);const g=[f,a,l];if(g.t=f,g.i18n=a,g.ready=l,l)return g;if(!l&&!s)return g;throw new Promise((e=>{t.lng?Gje(a,t.lng,u,(()=>e())):Vje(a,u,(()=>e()))}))}const dUe={en:{translation:{views:{CONNECT_WALLET:{body:{heading:"Connect a wallet",content:"You'll need to connect or create a digital wallet to buy, sell, trade and store your coins and collectibles."},walletSelection:{heading:"Choose a wallet"}},CONNECT_SUCCESS:{status:"Connection secure",action:"Continue"},READY_TO_CONNECT:{header:{title:"Connect"},metamask:{body:{heading:"Check for the pop-up from MetaMask",content:"Follow the prompts in the MetaMask popup to connect"},footer:{buttonText1:"Ready to connect",buttonText2:"Try again"}},passport:{body:{heading:"Connect with Immutable Passport",content:"Follow the prompts to connect with Immutable Passport"},footer:{buttonText1:"Continue",buttonText2:"Try again"}}},SWITCH_NETWORK:{eth:{heading:"You'll need to switch to the {{networkName}} network",body:"You'll be prompted to switch networks in your wallet.",button:{text:"Ready to Switch",retryText:"Try Again"}},zkEVM:{heading:"You’ll be asked to switch to the Immutable zkEVM network",body:"Check for the pop-up from MetaMask and 'Approve' to switch. If this is the first time, MetaMask will also ask you to add the network.",bodyWalletConnect:"Check for the pop-up from your wallet to switch. If this is the first time, your wallet will also ask you to add the network.",button:{text:"Ready to Switch",retryText:"Try Again"}}},ERROR_VIEW:{heading:"Something's gone wrong",body:["You can try again or contact","support","for help."],actionText:"Try again"},SERVICE_UNAVAILABLE_ERROR_VIEW:{heading:{swap:"Swapping is not available in your region"},body:{swap:"Please refer to <quickswapLink>Quickswap’s</quickswapLink> website for further information."}},LOADING_VIEW:{text:"Loading"},WALLET_BALANCES:{header:{title:"Wallet"},networkStatus:{heading:"Network"},totalTokenBalance:{heading:"Coins",totalHeading:"Value"},tokenBalancesList:{noTokensFound:"No tokens found"},addCoins:"Add coins"},SETTINGS:{header:{title:"Settings"},disconnectButton:{label:"Disconnect Wallet"}},COIN_INFO:{metamask:{heading:"Coins and collectibles are native to networks",body:"You can switch networks to add coins or move them from one network to another"},passport:{heading:"Coins and collectibles are native to networks",body1:"This network is called Immutable zkEVM. If you have other coins in your Passport and can’t see them here, they might be on another network. ",body2:" for more info.",linkText:"Visit our FAQs"}},SWAP:{header:{title:"Swap coins"},content:{title:"What would you like to swap?",fiatPricePrefix:"~ USD",availableBalancePrefix:"Available"},swapForm:{from:{label:"From",inputPlaceholder:"0",selectorTitle:"What would you like to swap from?"},to:{label:"To",inputPlaceholder:"0",selectorTitle:"What would you like to swap to?"},buttonText:"Swap"},fees:{title:"Fees total"},validation:{noAmountInputted:"Please input amount",insufficientBalance:"Insufficient balance",noFromTokenSelected:"Select a coin to swap",noToTokenSelected:"Select a coin to receive"},success:{text:"Success",actionText:"Continue"},failed:{text:"Transaction rejected",actionText:"Try again"},rejected:{text:"Price surge",actionText:"Review & try again"},IN_PROGRESS:{loading:{text:"Swap in progress"}}},APPROVE_ERC20:{approveSwap:{content:{heading:"Now you'll just need to confirm the transaction",body:"Follow the prompts in your wallet."},footer:{buttonText:"Okay",retryText:"Try again"}},approveSpending:{content:{metamask:{heading:"You'll be asked to set a spending cap for this transaction",body:"Input at least {{amount}} for this transaction and future transactions, then follow the prompts."},passport:{heading:"You'll be asked to approve a spending cap for this transaction",body:"Follow the prompts in your wallet to approve the spending cap."}},footer:{buttonText:"Got it",retryText:"Try again"},loading:{text:"Approving spending cap"}}},ONRAMP:{header:{title:"Add coins"},initialLoadingText:"Taking you to Transak",IN_PROGRESS_LOADING:{loading:{text:"Transak is processing your order"}},IN_PROGRESS:{content:{heading:"Order in progress",body1:"You’ll receive an email from Transak when complete. This can take up to 3 mins.",body2:"You can close this window, the transaction will be reflected in your wallet once complete."}},SUCCESS:{text:"Coins are on the way",actionText:"Done"},FAIL:{text:"Transaction failed",actionText:"Try again"}},TOP_UP_VIEW:{header:{title:"How would you like to add coins?"},topUpOptions:{onramp:{heading:"Buy",caption:"With card, Google pay or Apple pay available.",subcaption:"Fees ",disabledCaption:""},swap:{heading:"Swap",caption:"With the coins I have in my balance.",subcaption:"Fees",disabledCaption:"Not available in your region"},bridge:{heading:"Move",caption:"The coins I have in another wallet or network.",subcaption:"Fees ",disabledCaption:""},advanced:{heading:"Advanced options",caption:"Perform a fast bridge or CEX deposit.",subcaption:"Fees ",disabledCaption:""}}},ORDER_SUMMARY:{loading:{balances:"Crunching numbers"},currency:{fiat:"≈ USD ${{amount}}",price:"{{symbol}} {{amount}}"},orderItem:{quantity:"Quantity x{{qty}}"},coinsDrawer:{header:"Pay with...",caption1:"Coins",caption2:"Balance",divider:"More options",payWithCard:{caption:"Buy this items with card instead"},stepType:{SWAP:"Swap {{symbol}} ≈ {{amount}}",ONRAMP:"Buy {{symbol}} ≈ {{amount}}",BRIDGE:"Move {{symbol}} ≈ {{amount}}",SUFFICIENT:"Pay {{symbol}} {{amount}}",delta:{SWAP:"Swap {{symbol}} ≈ {{amount}}",ONRAMP:"Buy {{symbol}} ≈ {{amount}}",BRIDGE:"Move {{symbol}} ≈ {{amount}}",SUFFICIENT:"Pay {{symbol}} {{amount}}"}},fee:"Fees {{symbol}} ≈ {{amount}}"},orderReview:{heading:"Payment summary",continue:"Proceed",payWith:"Pay with {{symbol}}",balance:"Balance {{amount}}"}},FUND_WITH_SMART_CHECKOUT:{loading:{checkingBalances:"Crunching numbers"},currency:{usdEstimate:"≈ USD $",fees:"Fees"},fundingRouteDrawer:{header:"Available balance"},fundingRouteSelect:{heading:"Pay with your",noRoutesAvailable:"Insufficient coin balance. Please proceed with card instead.",continue:"Continue",payWithCardInstead:"No thanks, I'll pay with card",payWithCard:"Pay with card"}},PAYMENT_METHODS:{header:{heading:"How would you like to pay?"},options:{crypto:{heading:"Coins",caption:"Pay with the coins in your wallet, or buy coins with card",disabledCaption:"Currently not available for this purchase"},debit:{heading:"Debit Card",caption:"The recommended way to pay with card.",disabledCaption:"Currently working on this. Proceed with Coins & you’ll be guided on how to add them if needed."},credit:{heading:"Credit Card",caption:"Not recommended since transactions may be blocked by your bank.",disabledCaption:"Currently working on this. Proceed with Coins & you’ll be guided on how to add them if needed."}},topUp:{heading:"You’ll need to add some coins",subheading:{both:"Add {{erc20.value}} {{erc20.symbol}} and {{native.value}} {{native.symbol}} to cover this purchase plus gas.",erc20:"Add {{erc20.value}} {{erc20.symbol}} to your balance through one of the following options.",native:"Add {{native.value}} {{native.symbol}} for gas, through one of the following options."}},loading:{ready1:"Collecting your order",ready2:"Talking to wallet",ready3:"Readying assets",processing1:"Initialising payment",processing2:"Securing your assets",processing3:"Finalising payment"},creditCardWarningDrawer:{heading:"We recommend debit over credit",body:"Most banks will charge cash advance fees or block the transaction altogether when using credit card on these types of purchases.",ctaButton:"Try anyway"}},PAY_WITH_COINS:{header:{heading:"Pay with your",caption:"Using the coins balance in your wallet"},button:{buyNow:"Buy now"}},PAY_WITH_CARD:{screenTitle:"Pay with card",loading:"Taking you to Transak"},SALE_FAIL:{errors:{TRANSACTION_FAILED:{description:"Transaction failed",primaryAction:"Try again",secondaryAction:"View details"},SERVICE_BREAKDOWN:{description:"Sorry, we're unable to process your payment right now. Please try again in a few minutes.",secondaryAction:"Dismiss"},PRODUCT_NOT_FOUND:{description:"Sorry, this item is no longer available",secondaryAction:"Dismiss"},INSUFFICIENT_STOCK:{description:"Sorry, the requested quantity is not in stock. Consider buying a smaller quantity.",secondaryAction:"Dismiss"},TRANSAK_FAILED:{description:"Sorry, something went wrong. Please try again.",primaryAction:"Try again",secondaryAction:"Dismiss"},WALLET_FAILED:{description:"Sorry, we're unable to process this right now.",primaryAction:"Go back",secondaryAction:"Dismiss"},WALLET_REJECTED_NO_FUNDS:{description:"Sorry, something went wrong. Please try again.",primaryAction:"Go back",secondaryAction:"Dismiss"},WALLET_REJECTED:{description:"You'll need to approve the transaction in your wallet to proceed.",primaryAction:"Try again",secondaryAction:"Cancel"},WALLET_POPUP_BLOCKED:{description:"You'll need to allow pop-ups in your browser to proceed.",primaryAction:"I've fixed this, Try again",secondaryAction:"Cancel"},SMART_CHECKOUT_ERROR:{description:"Unable to check your wallets balance. Please try again.",primaryAction:"Try again",secondaryAction:"Cancel"},SMART_CHECKOUT_EXECUTE_ERROR:{description:"Sorry, something went wrong while moving funds. Please try again.",primaryAction:"Try again",secondaryAction:"Cancel"},DEFAULT_ERROR:{description:"Sorry, something went wrong. Please try again.",primaryAction:"Try again",secondaryAction:"Dismiss"},INVALID_PARAMETERS:{description:"Sorry, we're unable to process your order. Missing information from client",secondaryAction:"Dismiss"}}},SALE_SUCCESS:{text:"Order completed",actionText:"Continue"},WALLET_NETWORK_SELECTION:{layoutHeading:"Move",heading:"Where would you like to move funds between?",fromFormInput:{heading:"From",selectDefaultText:"Select wallet and network",walletSelectorHeading:"From wallet",networkSelectorHeading:"From network"},toFormInput:{heading:"To",selectDefaultText:"Select wallet and network",walletSelectorHeading:"To wallet"},submitButton:{text:"Next"}},BRIDGE_FORM:{header:{title:"Move coins"},fees:{title:"Gas Fee",fiatPricePrefix:"~ USD $"},content:{title:"How much would you like to move?",fiatPricePrefix:"~ USD",availableBalancePrefix:"Available"},bridgeForm:{from:{inputPlaceholder:"0",selectorTitle:"What would you like to move?"},buttonText:"Review"},validation:{noAmountInputted:"Please input amount",insufficientBalance:"Insufficient balance",noTokenSelected:"Select a coin to move"}},BRIDGE_REVIEW:{layoutHeading:"Move",heading:"Ok, how does this look?",fromLabel:{amountHeading:"Moving",heading:"From"},toLabel:{heading:"To"},fees:{heading:"Gas fee"},submitButton:{buttonText:"Confirm move"},fiatPricePrefix:"~ USD $"},BRIDGE_FAILURE:{bridgeFailureText:{statusText:"Transaction failed",actionText:"Review & Try again"}},APPROVE_TRANSACTION:{content:{heading:"Approve the transaction in your wallet",body:"Follow the prompts in your wallet popup to confirm."},footer:{buttonText:"Okay",retryText:"Try again"},loadingView:{text:"Initiating move"}},IN_PROGRESS:{heading:"Move in progress",body1:"Your funds have been sent, with less than 20 mins remaining until they're received. You can return and view progress by clicking on the rocket icon.",body2:"You can close this window."},TRANSACTIONS:{layoutHeading:"In progress",passportDashboard:"View the full transaction history in your",status:{withdrawalPending:{actionButtonText:"Proceed",withdrawalDelayText:"This move has been paused, please return ",withdrawalReadyText:"Action required to receive your coins",caption:"Paused"},inProgress:{heading:"In Progress",txnEstimate:"Usually takes 20 mins",stepInfo:"View Details"},emptyState:{notConnected:{body:"Connect your wallet to view the transactions",buttonText:"Connect"}},noTransactions:{body:"You're all done here.",passport:{body:"View your completed transactions in ",link:"Passport"}}},changeWallet:{buttonText:"Change wallet"},fiatPricePrefix:"~ USD $",support:{body1:"Need help?",body2:" Contact ",body3:"support",supportLink:"https://support.immutable.com/en/",passport:{body1:"Or view completed transactions in your ",body2:"Passport"}},walletSelection:{heading:"Choose a wallet to view"}},CLAIM_WITHDRAWAL:{content:{heading:"Follow the prompts to receive your coins on ",body:"You’ll be asked to pay a small gas fee to claim your withdrawal.",body2:"Destination wallet address: "},footer:{buttonText:"Continue",retryText:"Try again"},IN_PROGRESS:{loading:{text:"Processing"},success:{text:"Success",actionText:"Done"},failure:{text:"Transaction failed",actionText:"Try again"}}}},footers:{quickswapFooter:{disclaimerText:"Quickswap is a third party app. Immutable neither builds, owns, operates or deploys Quickswap. For further info, refer to Quickswap’s website."}},wallets:{passport:{heading:"Immutable Passport",description:"Your gaming wallet to pay with card, manage items & more."},metamask:{heading:"MetaMask",description:"Digital wallet for accessing blockchain applications and web3."},walletconnect:{heading:"Other wallets",description:"Allows you to connect with any blockchain mobile wallet including MetaMask."},browserwallet:{heading:"Browser wallets",description:"Digital wallet for accessing blockchain applications and web3."},recommended:"Recommended"},drawers:{feesBreakdown:{heading:"Fees",total:"Total fees",fees:{fiatPricePrefix:"USD $",gasFeeSwap:{label:"Gas fee swap"},gasFeeMove:{label:"Gas fee move"},gasFeeApproval:{label:"Gas fee approval"},serviceFee:{label:"Service fee"}}},transactionFailed:{content:{heading1:"We’ll need you to confirm in your",heading2:"wallet before proceeding",body1:"When the MetaMask pop up appears, be sure to",body2:"sign the transaction"},buttons:{retry:"Got it",cancel:"Dismiss"}},coinSelector:{option:{fiatPricePrefix:"~ USD $"},noCoins:"You have no available coins to select in your wallet."},notEnoughGas:{content:{heading:"You'll need more {{token}} for gas",body:"Your {{token}} balance is too low to cover the gas fee on this move, so you'll need to add more before proceeding."},buttons:{adjustAmount:"Adjust amount",addMoreImx:"Add IMX coins",copyAddress:"Copy wallet address",cancel:"Dismiss"}},notEnoughImx:{content:{noImx:{heading:"You'll need IMX coins to swap",body:"Swap fees are paid in IMX coins, so you'll need to add this before you can swap"},insufficientImx:{heading:"You'll need more IMX coins",body:"In order to cover the fees for the amount specified, you'll need to add more IMX coins"}},buttons:{adjustAmount:"Adjust amount",addMoreImx:"Add IMX coins",cancel:"Dismiss"}},notEnoughEthWithdrawal:{content:{heading1:"Insufficient",heading2:"for gas",body1:"Add",body2:"to your destination account, or select another account to pay the gas. Your destination account will remain the same."},buttons:{retry:"Pay gas with another account",dismiss:"Dismiss"}},unableToSwap:{heading:"Unable to swap this coin",body:"This coin pairing isn't available to swap right now. Try another selection.",buttons:{cancel:"Dismiss"}},networkSwitch:{heading:"Switch network in your {{wallet}}",manualSwitch:{body:"You'll need to open your mobile wallet and switch to the {{chain}} network to proceed"},controlledSwitch:{body:"You'll need to switch to the {{chain}} network to proceed"},switchButton:"Switch to {{chain}}"},walletConnectionError:{unableToConnect:{heading:"Unable to connect",body:"Check your wallet and try again, or close and try a different option",actionButtonText:"Try again"},changedYourMind:{heading:"Changed your mind?",body:"Make sure pop ups are enabled and follow the prompts in your wallet to connect",actionButtonText:"Try again"}}}}},ja:{translation:{views:{CONNECT_WALLET:{body:{heading:"ウォレットを接続する",content:"購入、販売、取引、およびコインとコレクティブルを保存するには、デジタルウォレットを接続または作成する必要があります。"},walletSelection:{heading:"ウォレットを選択"}},CONNECT_SUCCESS:{status:"接続が安全です",action:"続ける"},READY_TO_CONNECT:{header:{title:"接続する"},metamask:{body:{heading:"MetaMaskからのポップアップを確認する",content:"MetaMaskのポップアップに従って接続してください"},footer:{buttonText1:"接続する準備ができました",buttonText2:"再試行する"}},passport:{body:{heading:"Immutable Passportで接続する",content:"Immutable Passportに接続するためのプロンプトに従ってください"},footer:{buttonText1:"続ける",buttonText2:"再試行する"}}},SWITCH_NETWORK:{eth:{heading:"{{networkName}}ネットワークに切り替える必要があります",body:"MetaMaskでネットワークを切り替えるように求められます。必要に応じて後で切り替えることができます。",button:{text:"切り替えの準備ができました",retryText:"再試行する"}},zkEVM:{heading:"Immutable zkEVMネットワークに切り替えるように求められます",body:"MetaMaskからのポップアップを確認し、「承認」して切り替えてください。これが初めての場合、MetaMaskはネットワークを追加するように求めることもあります。",bodyWalletConnect:"ウォレットからのポップアップを確認して切り替えます。これが初めての場合、ウォレットはネットワークの追加を求めます。",button:{text:"切り替えの準備ができました",retryText:"再試行する"}}},ERROR_VIEW:{heading:"何かがうまくいかない",body:["もう一度やってみるか、","サポート","に連絡して助けを求めることができます。"],actionText:"もう一度試す"},SERVICE_UNAVAILABLE_ERROR_VIEW:{heading:{swap:"お住まいの地域では交換が利用できません"},body:{swap:"<quickswapLink>Quickswap</quickswapLink>のウェブサイトで詳細情報をご覧ください。"}},LOADING_VIEW:{text:"読み込み中"},WALLET_BALANCES:{header:{title:"ウォレット"},networkStatus:{heading:"ネットワーク"},totalTokenBalance:{heading:"コイン",totalHeading:"価値"},tokenBalancesList:{noTokensFound:"トークンが見つかりません"},addCoins:"コインを追加"},SETTINGS:{header:{title:"設定"},disconnectButton:{label:"ウォレットを切断"}},COIN_INFO:{metamask:{heading:"コインとコレクティブルはネットワーク固有です",body:"コインを追加したり、ネットワーク間でコインを移動したりするには、ネットワークを切り替えることができます"},passport:{heading:"コインとコレクティブルはネットワーク固有です",body1:"このネットワークはImmutable zkEVMと呼ばれます。Passportに他のコインがあり、ここに表示されない場合、それらは別のネットワークにあるかもしれません。",body2:"詳細については、",linkText:"FAQをご覧ください"}},SWAP:{header:{title:"コインをスワップ"},content:{title:"何をスワップしたいですか?",fiatPricePrefix:"約USD",availableBalancePrefix:"利用可能"},swapForm:{from:{label:"出金元",inputPlaceholder:"0",selectorTitle:"何からスワップしたいですか?"},to:{label:"宛先",inputPlaceholder:"0",selectorTitle:"何にスワップしたいですか?"},buttonText:"スワップ"},fees:{title:"手数料合計"},validation:{noAmountInputted:"金額を入力してください",insufficientBalance:"残高不足",noFromTokenSelected:"スワップするコインを選択してください",noToTokenSelected:"受け取るコインを選択してください"},success:{text:"成功",actionText:"続行"},failed:{text:"トランザクションが拒否されました",actionText:"もう一度試す"},rejected:{text:"価格が急騰しています",actionText:"レビューしてもう一度試す"},IN_PROGRESS:{loading:{text:"スワップ進行中"}}},APPROVE_ERC20:{approveSwap:{content:{heading:"これでトランザクションを承認する必要があります",body:"ウォレットのプロンプトに従ってください。"},footer:{buttonText:"はい",retryText:"もう一度試す"}},approveSpending:{content:{metamask:{heading:"このトランザクションのために支出上限を設定するように求められます",body:["少なくとも入力してください","このトランザクションおよび将来のトランザクションのために、その後、プロンプトに従ってください。"]},passport:{heading:"このトランザクションのために支出上限を承認するように求められます",body:"ウォレットのプロンプトに従って支出上限を承認してください。"}},footer:{buttonText:"了解",retryText:"もう一度試す"},loading:{text:"支出上限を承認しています"}}},ONRAMP:{header:{title:"コインを追加"},initialLoadingText:"Transakに移動しています",IN_PROGRESS_LOADING:{loading:{text:"Transakが注文を処理しています"}},IN_PROGRESS:{content:{heading:"注文進行中",body1:"完了するとTransakからメールが届きます。これには最大3分かかる場合があります。",body2:"このウィンドウを閉じても、トランザクションは完了次第ウォレットに反映されます。"}},SUCCESS:{text:"コインが途中にあります",actionText:"完了"},FAIL:{text:"トランザクションが失敗しました",actionText:"もう一度試す"}},TOP_UP_VIEW:{header:{title:"コインを追加する方法は?"},topUpOptions:{onramp:{heading:"購入",caption:"カード、Googleペイ、またはAppleペイが利用可能。",subcaption:"手数料",disabledCaption:""},swap:{heading:"交換",caption:"私の残高にあるコインで。",subcaption:"手数料",disabledCaption:"お住まいの地域では利用できません"},bridge:{heading:"移動",caption:"別のウォレットやネットワークにある私のコイン。",subcaption:"手数料",disabledCaption:""},advanced:{heading:"高度なオプション",caption:"迅速なブリッジまたはCEX入金を実行します。",subcaption:"手数料",disabledCaption:""}}},ORDER_SUMMARY:{loading:{balances:"数字を計算中"},currency:{fiat:"≈ USD ${{amount}}",price:"{{symbol}} {{amount}}"},orderItem:{quantity:"数量 x{{qty}}"},coinsDrawer:{header:"支払い方法…",caption1:"コイン",caption2:"残高",divider:"その他のオプション",payWithCard:{caption:"代わりにカードで購入"},stepType:{SWAP:"{{symbol}}を{{amount}}でスワップ",ONRAMP:"{{symbol}}を{{amount}}で購入",BRIDGE:"{{symbol}}を{{amount}}で移動",SUFFICIENT:"{{symbol}} {{amount}}で支払う",delta:{SWAP:"{{symbol}}を{{amount}}でスワップ",ONRAMP:"{{symbol}}を{{amount}}で購入",BRIDGE:"{{symbol}}を{{amount}}で移動",SUFFICIENT:"{{symbol}} {{amount}}で支払う"}},fee:"手数料 {{symbol}} ≈ {{amount}}"},orderReview:{heading:"支払いの概要",continue:"続行",payWith:"{{symbol}}で支払う",balance:"残高{{amount}}"}},FUND_WITH_SMART_CHECKOUT:{loading:{checkingBalances:"数値を計算しています"},currency:{usdEstimate:"≈ USD $",fees:"手数料"},fundingRouteDrawer:{header:"利用可能な残高"},fundingRouteSelect:{heading:"で支払う",noRoutesAvailable:"コインの残高が不足しています。代わりにカードで続行してください。",continue:"続行",payWithCardInstead:"いいえ、カードで支払います",payWithCard:"カードで支払う"}},PAYMENT_METHODS:{header:{heading:"どの支払い方法をご希望ですか?"},options:{crypto:{heading:"コイン",caption:"財布の中のコインで支払うか、カードでコインを購入してください。",disabledCaption:"現在、この支払い方法は利用できません。"},debit:{heading:"デビットカード",caption:"カードでの支払いに推奨される方法です。",disabledCaption:"現在作業中です。コインを使って進んでください。必要に応じて、追加する方法が案内されます。"},credit:{heading:"クレジットカード",caption:"銀行によって取引がブロックされる可能性があるため、推奨されません。",disabledCaption:"現在作業中です。コインを使って進んでください。必要に応じて、追加する方法が案内されます。"}},topUp:{heading:"残高が不足しています",subheading:{both:"この購入とガスをカバーするために{{erc20.value}} {{erc20.symbol}}と{{native.value}} {{native.symbol}}を追加する必要があります。",erc20:"残高が不足しているため、{{erc20.value}} {{erc20.symbol}}を追加する必要があります。",native:"残高が不足しているため、{{native.value}} {{native.symbol}}を追加する必要があります。"}},loading:{ready1:"注文を受け取り中",ready2:"ウォレットと通信中",ready3:"資産を準備中",processing1:"支払いを初期化中",processing2:"資産を確保中",processing3:"支払いを完了中"},creditCardWarningDrawer:{heading:"デビットカードの使用をお勧めします",body:"この種の購入にクレジットカードを使用する場合、ほとんどの銀行は現金前払い手数料を請求するか、または取引を完全にブロックします。",ctaButton:"それでも試す"}},PAY_WITH_COINS:{header:{heading:"あなたので支払う",caption:"ウォレットのコイン残高を使用して"},button:{buyNow:"今すぐ購入"}},PAY_WITH_CARD:{screenTitle:"カードで支払う",loading:"Transakに移動しています"},SALE_FAIL:{errors:{TRANSACTION_FAILED:{description:"トランザクションが失敗しました",primaryAction:"もう一度試す",secondaryAction:"詳細を表示"},SERVICE_BREAKDOWN:{description:"申し訳ありませんが、現在お支払いを処理できません。数分後にもう一度お試しください。",secondaryAction:"閉じる"},PRODUCT_NOT_FOUND:{description:"申し訳ありませんが、このアイテムはもう利用できません。",secondaryAction:"閉じる"},INSUFFICIENT_STOCK:{description:"申し訳ありませんが、ご希望の数量は在庫がありません。少ない数量の購入をご検討ください。",secondaryAction:"閉じる"},TRANSAK_FAILED:{description:"申し訳ありませんが、何かがうまくいかなかったようです。もう一度お試しください。",primaryAction:"もう一度試す",secondaryAction:"閉じる"},WALLET_FAILED:{description:"申し訳ありませんが、現在これを処理できません。",primaryAction:"戻る",secondaryAction:"閉じる"},WALLET_REJECTED_NO_FUNDS:{description:"申し訳ありませんが、何かがうまくいかなかったようです。もう一度お試しください。",primaryAction:"戻る",secondaryAction:"閉じる"},WALLET_REJECTED:{description:"取引を承認するには、ウォレットで承認する必要があります。",primaryAction:"もう一度試す",secondaryAction:"キャンセル"},WALLET_POPUP_BLOCKED:{description:"続行するには、ブラウザでポップアップを許可する必要があります。",primaryAction:"もう一度試す",secondaryAction:"キャンセル"},SMART_CHECKOUT_ERROR:{description:"ウォレットの残高を確認できません。もう一度お試しください。",primaryAction:"もう一度試す",secondaryAction:"キャンセル"},SMART_CHECKOUT_EXECUTE_ERROR:{description:"資金を移動する際に何かがうまくいかなかったようです。もう一度お試しください。",primaryAction:"もう一度試す",secondaryAction:"キャンセル"},DEFAULT_ERROR:{description:"申し訳ありませんが、何かがうまくいかなかったようです。もう一度お試しください。",primaryAction:"もう一度試す",secondaryAction:"閉じる"},INVALID_PARAMETERS:{description:"申し訳ありませんが、ご注文を処理できません。クライアントからの情報が不足しています。",secondaryAction:"閉じる"}}},SALE_SUCCESS:{text:"注文が完了しました",actionText:"続行"},WALLET_NETWORK_SELECTION:{layoutHeading:"移動",heading:"どこに資金を移動させたいですか?",fromFormInput:{heading:"From",selectDefaultText:"ウォレットとネットワークを選択",walletSelectorHeading:"From wallet",networkSelectorHeading:"From network"},toFormInput:{heading:"To",selectDefaultText:"ウォレットとネットワークを選択",walletSelectorHeading:"To wallet"},submitButton:{text:"次へ"}},BRIDGE_FORM:{header:{title:"コインを移動"},fees:{title:"ガス手数料",fiatPricePrefix:"~ USD $"},content:{title:"いくら移動しますか?",fiatPricePrefix:"約USD",availableBalancePrefix:"利用可能"},bridgeForm:{from:{inputPlaceholder:"0",selectorTitle:"移動するコインを選択"},buttonText:"確認"},validation:{noAmountInputted:"金額を入力してください",insufficientBalance:"残高が不足しています",noTokenSelected:"移動するコインを選択してください"}},BRIDGE_REVIEW:{layoutHeading:"移動",heading:"これはどう見えますか?",fromLabel:{amountHeading:"移動中",heading:"From"},toLabel:{heading:"To"},fees:{heading:"ガス手数料"},submitButton:{buttonText:"移動を確認"},fiatPricePrefix:"~ USD $"},BRIDGE_FAILURE:{bridgeFailureText:{statusText:"トランザクションが失敗しました",actionText:"再確認してもう一度試す"}},APPROVE_TRANSACTION:{content:{heading:"ウォレットでトランザクションを承認してください",body:"ウォレットのポップアップで表示されるプロンプトに従って承認してください。"},footer:{buttonText:"OK",retryText:"もう一度試す"},loadingView:{text:"移動を開始しています"}},IN_PROGRESS:{heading:"移動進行中",body1:"資金は送信されました。受信まで残り20分未満です。進捗状況は、ロケットアイコンをクリックして戻って確認できます。",body2:"このウィンドウを閉じてもよろしいです。"},TRANSACTIONS:{layoutHeading:"進行中",passportDashboard:"完全な取引履歴を表示する",status:{withdrawalPending:{actionButtonText:"続行",withdrawalDelayText:"この移動は一時停止されました。戻ってください",withdrawalReadyText:"コインを受け取るためには行動が必要です",caption:"一時停止中"},inProgress:{heading:"進行中",txnEstimate:"通常、20分かかります",stepInfo:"詳細を表示"},emptyState:{notConnected:{body:"トランザクションを表示するにはウォレットを接続してください",buttonText:"接続する"}},noTransactions:{body:"ここで完了しました。",passport:{body:"完了した取引は",link:"パスポート"}}},changeWallet:{buttonText:"ウォレットを変更する"},fiatPricePrefix:"≈ USD $",support:{body1:"サポートが必要ですか?",body2:" お問い合わせは ",body3:"サポートへ",supportLink:"https://support.immutable.com/ja/",passport:{body1:"または、完了した取引をご覧になるには ",body2:"パスポート"}},walletSelection:{heading:"表示するウォレットを選択"}},CLAIM_WITHDRAWAL:{content:{heading:"コインを受け取るためのプロンプトに従ってください",body:"引き出しを請求するには小額のガス手数料が必要です。",body2:"目的地ウォレットアドレス:"},footer:{buttonText:"続行",retryText:"もう一度試す"},IN_PROGRESS:{loading:{text:"処理中"},success:{text:"成功",actionText:"完了"},failure:{text:"取引失敗",actionText:"再試行"}}}},footers:{quickswapFooter:{disclaimerText:"Quickswapはサードパーティアプリケーションです。ImmutableはQuickswapをビルド、所有、運営、デプロイしていません。詳細については、Quickswapのウェブサイトを参照してください。"}},wallets:{passport:{heading:"Immutable Passport",description:"カードで支払い、アイテムを管理するなど、ゲーム用ウォレットです。"},metamask:{heading:"MetaMask",description:"ブロックチェーンアプリケーションおよびweb3にアクセスするためのデジタルウォレット。"},walletconnect:{heading:"その他のウォレット",description:"MetaMaskを含む任意のブロックチェーンモバイルウォレットに接続できます。"},browserwallet:{heading:"ブラウザウォレット",description:"ブロックチェーンアプリケーションおよびweb3にアクセスするためのデジタルウォレット。"},recommended:"推奨"},drawers:{feesBreakdown:{heading:"手数料の内訳",total:"総手数料",fees:{gas:{label:"ガス手数料"}}},transactionFailed:{content:{heading1:"続行する前に、",heading2:"ウォレットで確認が必要です",body1:"MetaMaskのポップアップが表示されたら、",body2:"トランザクションに署名してください"},buttons:{retry:"了解",cancel:"閉じる"}},coinSelector:{option:{fiatPricePrefix:"約USD $"},noCoins:"ウォレットで選択できるコインがありません。"},notEnoughGas:{content:{heading:"{{token}}が不足しています",body:"この操作のガス手数料をカバーするには{{token}}残高が十分にありません。続行する前に、もっと{{token}}を追加する必要があります。"},buttons:{adjustAmount:"金額を調整",addMoreImx:"IMXコインを追加",copyAddress:"ウォレットアドレスをコピー",cancel:"閉じる"}},notEnoughImx:{content:{noImx:{heading:"IMXコインが必要です",body:"スワップ手数料はIMXコインで支払われるため、スワップする前にこれを追加する必要があります。"},insufficientImx:{heading:"IMXコインが不足しています",body:"指定された金額の手数料をカバーするためには、IMXコインを追加する必要があります。"}},buttons:{adjustAmount:"金額を調整",addMoreImx:"IMXコインを追加",cancel:"閉じる"}},notEnoughEthWithdrawal:{content:{heading1:"不足",heading2:"ガス用",body1:"追加",body2:"あなたの宛先アカウントに追加するか、別のアカウントを選択してガスを支払います。宛先アカウントは変更されません。"},buttons:{retry:"別のアカウントでガスを支払う",dismiss:"閉じる"}},unableToSwap:{heading:"このコインはスワップできません",body:"このコインのペアは現在スワップできません。別の選択肢を試してください。",buttons:{cancel:"閉じる"}},networkSwitch:{heading:"あなたの{{wallet}}でネットワークを切り替える",manualSwitch:{body:"続行するにはモバイルウォレットを開き、{{chain}}ネットワークに切り替える必要があります"},controlledSwitch:{body:"{{chain}}ネットワークに切り替える必要があります"},switchButton:"{{chain}}に切り替える"},walletConnectionError:{unableToConnect:{heading:"接続できません",body:"ウォレットを確認してもう一度お試しください。または、閉じて別のオプションを試してください。",actionButtonText:"もう一度試す"},changedYourMind:{heading:"考えを変えましたか?",body:"ポップアップが有効になっていることを確認し、ウォレットのプロンプトに従って接続してください。",actionButtonText:"もう一度試す"}}}}},ko:{translation:{views:{CONNECT_WALLET:{body:{heading:"지갑 연결",content:"구매, 판매, 거래 및 코인과 수집품을 저장하려면 디지털 지갑을 연결하거나 만들어야 합니다."},walletSelection:{heading:"지갑 선택"}},CONNECT_SUCCESS:{status:"연결이 안전함",action:"계속하기"},READY_TO_CONNECT:{header:{title:"연결 준비됨"},metamask:{body:{heading:"MetaMask에서 팝업을 확인하세요",content:"MetaMask 팝업의 안내에 따라 연결하세요"},footer:{buttonText1:"연결 준비됨",buttonText2:"다시 시도"}},passport:{body:{heading:"Immutable Passport로 연결",content:"Immutable Passport와 연결하기 위한 안내를 따르세요"},footer:{buttonText1:"계속",buttonText2:"다시 시도"}}},SWITCH_NETWORK:{eth:{heading:"{{networkName}} 네트워크로 전환해야 합니다",body:"MetaMask에서 네트워크 전환을 요청받게 됩니다. 필요할 때 다시 전환할 수 있습니다.",button:{text:"전환 준비됨",retryText:"다시 시도"}},zkEVM:{heading:"Immutable zkEVM 네트워크로 전환하라는 요청을 받게 됩니다",body:"MetaMask 팝업에서 '승인'을 선택하고 전환하세요. 처음이라면 MetaMask에서 네트워크 추가를 요구할 수도 있습니다.",bodyWalletConnect:"지갑에서 팝업을 확인하여 전환하십시오. 처음이라면 지갑에서 네트워크 추가를 요청합니다.",button:{text:"전환 준비됨",retryText:"다시 시도"}}},ERROR_VIEW:{heading:"문제가 발생했습니다",body:["다시 시도하거나","지원팀에","도움을 요청하세요."],actionText:"다시 시도"},SERVICE_UNAVAILABLE_ERROR_VIEW:{heading:{swap:"귀하의 지역에서는 스왑이 가능하지 않습니다"},body:{swap:"자세한 정보는 <quickswapLink>Quickswap</quickswapLink> 웹사이트를 참조하십시오."}},LOADING_VIEW:{text:"로딩 중"},WALLET_BALANCES:{header:{title:"지갑"},networkStatus:{heading:"네트워크"},totalTokenBalance:{heading:"코인",totalHeading:"가치"},tokenBalancesList:{noTokensFound:"토큰을 찾을 수 없습니다"},addCoins:"동전 추가"},SETTINGS:{header:{title:"설정"},disconnectButton:{label:"지갑 연결 해제"}},COIN_INFO:{metamask:{heading:"코인과 수집품은 네트워크에 기반을 두고 있습니다",body:"네트워크를 전환하여 코인을 추가하거나 다른 네트워크로 옮길 수 있습니다"},passport:{heading:"코인과 수집품은 네트워크에 기반을 두고 있습니다",body1:"이 네트워크는 Immutable zkEVM입니다. Passport에 다른 코인이 있고 여기서 볼 수 없다면 다른 네트워크에 있을 수 있습니다.",body2:" 자세한 정보를 위해 우리의 FAQ를 방문하세요.",linkText:"FAQ 방문하기"}},SWAP:{header:{title:"코인 교환"},content:{title:"무엇을 교환하고 싶으신가요?",fiatPricePrefix:"약 USD",availableBalancePrefix:"사용 가능"},swapForm:{from:{label:"From",inputPlaceholder:"0",selectorTitle:"무엇을 교환하고 싶으신가요?"},to:{label:"To",inputPlaceholder:"0",selectorTitle:"무엇을 받으시겠습니까?"},buttonText:"교환"},fees:{title:"수수료 총액"},validation:{noAmountInputted:"금액을 입력해 주세요",insufficientBalance:"잔고가 부족합니다",noFromTokenSelected:"교환할 코인을 선택하세요",noToTokenSelected:"받을 코인을 선택하세요"},success:{text:"성공",actionText:"계속하기"},failed:{text:"거래 거절됨",actionText:"다시 시도"},rejected:{text:"가격 급등",actionText:"검토하고 다시 시도하세요"},IN_PROGRESS:{loading:{text:"교환 진행 중"}}},APPROVE_ERC20:{approveSwap:{content:{heading:"이제 거래를 확인하기만 하면 됩니다",body:"지갑의 안내를 따르세요."},footer:{buttonText:"확인",retryText:"다시 시도"}},approveSpending:{content:{metamask:{heading:"이 거래에 대한 지출 한도를 설정하라는 요청을 받게 될 것입니다",body:"이 거래 및 향후 거래를 위해 최소 {{amount}}을 입력한 후, 안내를 따르세요."},passport:{heading:"이 거래에 대한 지출 한도 승인을 받게 됩니다",body:"지출 한도를 승인하기 위해 지갑의 안내를 따르세요."}},footer:{buttonText:"알겠습니다",retryText:"다시 시도"},loading:{text:"지출 한도 승인 중"}}},ONRAMP:{header:{title:"코인 추가"},initialLoadingText:"Transak으로 이동하는 중",IN_PROGRESS_LOADING:{loading:{text:"Transak가 주문을 처리 중입니다"}},IN_PROGRESS:{content:{heading:"주문 진행 중",body1:"완료되면 Transak에서 이메일을 받게 됩니다. 최대 3분이 소요될 수 있습니다.",body2:"이 창을 닫을 수 있으며, 완료되면 거래가 지갑에 반영됩니다."}},SUCCESS:{text:"코인이 도착하는 중입니다",actionText:"완료"},FAIL:{text:"거래 실패",actionText:"다시 시도"}},TOP_UP_VIEW:{header:{title:"코인을 어떻게 추가하시겠습니까?"},topUpOptions:{onramp:{heading:"구매",caption:"카드, 구글 페이 또는 애플 페이 가능.",subcaption:"수수료",disabledCaption:""},swap:{heading:"스왑",caption:"내 잔액에 있는 코인으로.",subcaption:"수수료",disabledCaption:"귀하의 지역에서 사용할 수 없음"},bridge:{heading:"이동",caption:"다른 지갑이나 네트워크에 있는 내 코인.",subcaption:"수수료",disabledCaption:""},advanced:{heading:"고급 옵션",caption:"빠른 브릿지 또는 CEX 입금을 수행합니다.",subcaption:"수수료",disabledCaption:""}}},ORDER_SUMMARY:{loading:{balances:"숫자 계산 중"},currency:{fiat:"≈ USD ${{amount}}",price:"{{symbol}} {{amount}}"},orderItem:{quantity:"수량 x{{qty}}"},coinsDrawer:{header:"결제 수단...",caption1:"코인",caption2:"잔액",divider:"더 많은 옵션",payWithCard:{caption:"대신 카드로 구매"},stepType:{SWAP:"{{symbol}} ≈ {{amount}} 교환",ONRAMP:"{{symbol}} ≈ {{amount}} 구매",BRIDGE:"{{symbol}} ≈ {{amount}} 이동",SUFFICIENT:"{{symbol}} {{amount}} 지불",delta:{SWAP:"{{symbol}} ≈ {{amount}} 교환",ONRAMP:"{{symbol}} ≈ {{amount}} 구매",BRIDGE:"{{symbol}} ≈ {{amount}} 이동",SUFFICIENT:"{{symbol}} {{amount}} 지불"}},fee:"수수료 {{symbol}} ≈ {{amount}}"},orderReview:{heading:"결제 요약",continue:"계속",payWith:"{{symbol}}로 결제",balance:"잔액 {{amount}}"}},FUND_WITH_SMART_CHECKOUT:{loading:{checkingBalances:"숫자를 계산하는 중"},currency:{usdEstimate:"≈ USD $",fees:"수수료"},fundingRouteDrawer:{header:"사용 가능한 잔액"},fundingRouteSelect:{heading:"Pay with your",noRoutesAvailable:"코인 잔액이 부족합니다. 대신 카드로 진행하세요.",continue:"계속",payWithCardInstead:"괜찮습니다, 카드로 결제할게요",payWithCard:"카드로 결제하기"}},PAYMENT_METHODS:{header:{heading:"어떤 결제 방법을 원하시나요?"},options:{crypto:{heading:"코인",caption:"지갑 안의 동전으로 지불하거나 카드로 동전을 구입하세요.",disabledCaption:"현재 이 구매에는 사용할 수 없습니다."},debit:{heading:"직불카드",caption:"카드로 결제하는 권장 방법입니다.",disabledCaption:"현재 작업 중입니다. 코인을 사용하여 계속 진행하시면 필요한 경우 추가하는 방법을 안내받을 수 있습니다."},credit:{heading:"신용카드",caption:"은행에서 거래를 차단할 수 있으므로 권장하지 않습니다.",disabledCaption:"현재 작업 중입니다. 코인을 사용하여 계속 진행하시면 필요한 경우 추가하는 방법을 안내받을 수 있습니다."}},topUp:{heading:"일부 코인을 추가해야합니다",subheading:{both:"이 구매 및 가스를 포함하여 이를 커버하기 위해 {{erc20.value}} {{erc20.symbol}} 및 {{native.value}} {{native.symbol}}를 추가하십시오.",erc20:"다음 옵션 중 하나를 통해 균형에 {{erc20.value}} {{erc20.symbol}}를 추가하십시오.",native:"다음 옵션 중 하나를 통해 가스에 {{native.value}} {{native.symbol}}를 추가하십시오."}},loading:{ready1:"주문 수집 중",ready2:"지갑과 대화 중",ready3:"자산 준비 중",processing1:"결제 초기화 중",processing2:"자산 보호 중",processing3:"결제 완료 중"},creditCardWarningDrawer:{heading:"신용카드보다는 체크카드 사용을 권장합니다",body:"이런 종류의 구매에 신용카드를 사용할 경우 대부분의 은행에서 현금 서비스 수수료를 부과하거나 거래를 전체적으로 차단할 수 있습니다.",ctaButton:"그래도 시도하기"}},PAY_WITH_COINS:{header:{heading:"코인으로 결제",caption:"지갑에 있는 코인 잔액을 이용하여"},button:{buyNow:"지금 구매"}},PAY_WITH_CARD:{screenTitle:"카드로 결제",loading:"Transak으로 이동하는 중"},SALE_FAIL:{errors:{TRANSACTION_FAILED:{description:"거래 실패",primaryAction:"다시 시도",secondaryAction:"세부 정보 보기"},SERVICE_BREAKDOWN:{description:"죄송합니다, 현재 지불 처리가 불가능합니다. 몇 분 후에 다시 시도하세요.",secondaryAction:"닫기"},PRODUCT_NOT_FOUND:{description:"죄송합니다, 이 상품은 더 이상 구매할 수 없습니다.",secondaryAction:"닫기"},INSUFFICIENT_STOCK:{description:"죄송합니다. 요청하신 수량은 재고가 없습니다. 더 적은 수량을 고려해 주십시오.",secondaryAction:"닫기"},TRANSAK_FAILED:{description:"죄송합니다, 문제가 발생했습니다. 다시 시도하세요.",primaryAction:"다시 시도",secondaryAction:"닫기"},WALLET_FAILED:{description:"죄송합니다, 지금은 이를 처리할 수 없습니다.",primaryAction:"돌아가기",secondaryAction:"닫기"},WALLET_REJECTED_NO_FUNDS:{description:"죄송합니다, 문제가 발생했습니다. 다시 시도하세요.",primaryAction:"돌아가기",secondaryAction:"닫기"},WALLET_REJECTED:{description:"거래를 진행하려면 지갑에서 거래 승인이 필요합니다.",primaryAction:"다시 시도",secondaryAction:"취소"},WALLET_POPUP_BLOCKED:{description:"계속 진행하려면 브라우저에서 팝업을 허용해야 합니다.",primaryAction:"이 문제를 해결했습니다. 다시 시도하세요.",secondaryAction:"취소"},SMART_CHECKOUT_ERROR:{description:"지갑 잔액을 확인할 수 없습니다. 다시 시도하세요.",primaryAction:"다시 시도",secondaryAction:"취소"},SMART_CHECKOUT_EXECUTE_ERROR:{description:"죄송합니다, 자금 이동 중 문제가 발생했습니다. 다시 시도하세요.",primaryAction:"다시 시도",secondaryAction:"취소"},DEFAULT_ERROR:{description:"죄송합니다, 문제가 발생했습니다. 다시 시도하세요.",primaryAction:"다시 시도",secondaryAction:"닫기"},INVALID_PARAMETERS:{description:"죄송합니다. 주문을 처리할 수 없습니다. 고객으로부터의 정보가 누락되었습니다.",secondaryAction:"닫기"}}},SALE_SUCCESS:{text:"주문 완료",actionText:"계속"},WALLET_NETWORK_SELECTION:{layoutHeading:"이동",heading:"자금을 어디에서 어디로 이동하시겠습니까?",fromFormInput:{heading:"From",selectDefaultText:"지갑과 네트워크를 선택하세요",walletSelectorHeading:"지갑에서",networkSelectorHeading:"네트워크에서"},toFormInput:{heading:"To",selectDefaultText:"지갑과 네트워크를 선택하세요",walletSelectorHeading:"지갑으로"},submitButton:{text:"다음"}},BRIDGE_FORM:{header:{title:"코인 이동"},fees:{title:"가스 요금",fiatPricePrefix:"~ USD $"},content:{title:"얼마나 많이 이동하시겠습니까?",fiatPricePrefix:"약 USD",availableBalancePrefix:"사용 가능"},bridgeForm:{from:{inputPlaceholder:"0",selectorTitle:"무엇을 이동하고 싶으신가요?"},buttonText:"검토"},validation:{noAmountInputted:"금액을 입력해 주세요",insufficientBalance:"잔고가 부족합니다",noTokenSelected:"이동할 코인을 선택하세요"}},BRIDGE_REVIEW:{layoutHeading:"이동",heading:"이렇게 보이면 괜찮으십니까?",fromLabel:{amountHeading:"이동 중",heading:"From"},toLabel:{heading:"To"},fees:{heading:"가스 요금"},submitButton:{buttonText:"이동 확인"},fiatPricePrefix:"~ USD $"},BRIDGE_FAILURE:{bridgeFailureText:{statusText:"거래 실패",actionText:"검토하고 다시 시도하세요"}},APPROVE_TRANSACTION:{content:{heading:"지갑에서 거래 승인",body:"지갑 팝업의 안내를 따라 확인하세요."},footer:{buttonText:"확인",retryText:"다시 시도"},loadingView:{text:"이동 시작 중"}},IN_PROGRESS:{heading:"이동 중",body1:"자금이 송금되었습니다. 수령까지 남은 시간은 20분 미만입니다. 로켓 아이콘을 클릭하여 진행 상황을 확인할 수 있습니다.",body2:"이 창을 닫아도 됩니다."},TRANSACTIONS:{layoutHeading:"진행 중",passportDashboard:"전체 거래 내역을 확인하세요",status:{withdrawalPending:{actionButtonText:"계속",withdrawalDelayText:"이 이동은 일시 중지되었습니다. 돌아가세요",withdrawalReadyText:"코인을 받으려면 조치가 필요합니다",caption:"일시중지됨"},inProgress:{heading:"진행 중",txnEstimate:"보통 20분 소요됩니다",stepInfo:"세부 정보 보기"},emptyState:{notConnected:{body:"트랜잭션을 보려면 지갑을 연결하세요",buttonText:"연결하다"}},noTransactions:{body:"여기까지 완료되었습니다.",passport:{body:"완료된 거래는",link:"패스포트"}}},changeWallet:{buttonText:"지갑 변경"},fiatPricePrefix:"≈ USD $",support:{body1:"도움이 필요하신가요?",body2:" 문의하기 ",body3:"지원팀",supportLink:"https://support.immutable.com/ko/",passport:{body1:"또는 귀하의 ",body2:"패스포트"}},walletSelection:{heading:"보려는 지갑 선택"}},CLAIM_WITHDRAWAL:{content:{heading:"코인을 받으려면 프롬프트에 따라 진행하십시오",body:"출금을 청구하려면 소액의 가스 수수료를 지불해야 합니다.",body2:"목적지 지갑 주소: "},footer:{buttonText:"계속",retryText:"다시 시도"},IN_PROGRESS:{loading:{text:"처리 중"},success:{text:"성공",actionText:"완료"},failure:{text:"거래 실패",actionText:"다시 시도"}}}},footers:{quickswapFooter:{disclaimerText:"Quickswap는 타사 앱입니다. Immutable은 Quickswap를 만들거나 소유하거나 운영하거나 배포하지 않습니다. 자세한 정보는 Quickswap의 웹사이트를 참조하십시오."}},wallets:{passport:{heading:"Immutable Passport",description:"카드로 결제하고, 아이템을 관리하는 게임용 지갑입니다."},metamask:{heading:"MetaMask",description:"블록체인 애플리케이션 및 web3에 접근하는 디지털 지갑입니다."},walletconnect:{heading:"기타 지갑",description:"MetaMask를 포함한 모든 블록체인 모바일 지갑에 연결할 수 있습니다."},browserwallet:{heading:"브라우저 지갑",description:"블록체인 애플리케이션 및 web3에 접근하는 디지털 지갑입니다."},recommended:"추천"},drawers:{feesBreakdown:{heading:"수수료 내역",total:"수수료 총액",fees:{gas:{label:"가스 수수료"}}},transactionFailed:{content:{heading1:"계속하기 전에 지갑에서 확인이 필요합니다",heading2:"지갑 확인 필요",body1:"MetaMask 팝업이 나타날 때 거래에",body2:"서명을 꼭 하십시오"},buttons:{retry:"알겠습니다",cancel:"취소"}},coinSelector:{option:{fiatPricePrefix:"대략 USD $"},noCoins:"지갑에 선택 가능한 코인이 없습니다."},notEnoughGas:{content:{heading:"가스를 위해 {{token}}이 더 필요합니다",body:"이 작업에 필요한 가스 수수료를 지불하기 위해 {{token}} 잔액이 너무 낮습니다. 계속하기 전에 더 추가해야 합니다."},buttons:{adjustAmount:"금액 조정",addMoreImx:"IMX 코인 추가",copyAddress:"지갑 주소 복사",cancel:"취소"}},notEnoughImx:{content:{noImx:{heading:"IMX 코인이 필요합니다",body:"교환 수수료는 IMX 코인으로 지불되므로 교환 전에 이를 추가해야 합니다"},insufficientImx:{heading:"더 많은 IMX 코인이 필요합니다",body:"지정된 금액의 수수료를 충당하기 위해 더 많은 IMX 코인을 추가해야 합니다"}},buttons:{adjustAmount:"금액 조정",addMoreImx:"IMX 코인 추가",cancel:"취소"}},notEnoughEthWithdrawal:{content:{heading1:"부족함",heading2:"가스용",body1:"추가",body2:"목적지 계정에 추가하거나 다른 계정을 선택하여 가스를 지불하십시오. 목적지 계정은 그대로 유지됩니다."},buttons:{retry:"다른 계정으로 가스 지불",dismiss:"닫기"}},unableToSwap:{heading:"해당 코인 교환 불가",body:"지금은 이 코인 페어를 교환할 수 없습니다. 다른 선택을 시도해보세요.",buttons:{cancel:"취소"}},networkSwitch:{heading:"귀하의 {{wallet}}에서 네트워크를 전환하세요",manualSwitch:{body:"계속하려면 모바일 지갑을 열고 {{chain}} 네트워크로 전환해야 합니다"},controlledSwitch:{body:"{{chain}} 네트워크로 전환해야 합니다"},switchButton:"{{chain}}로 전환하기"},walletConnectionError:{unableToConnect:{heading:"연결할 수 없음",body:"지갑을 확인한 후 다시 시도하거나 닫고 다른 옵션을 시도하세요.",actionButtonText:"다시 시도"},changedYourMind:{heading:"생각을 바꾸셨나요?",body:"팝업이 활성화되어 있는지 확인하고 지갑의 프롬프트를 따라 연결하세요.",actionButtonText:"다시 시도"}}}}},zh:{translation:{views:{CONNECT_WALLET:{body:{heading:"连接钱包",content:"您需要连接或创建数字钱包以购买、出售、交易和存储您的硬币和收藏品。"},walletSelection:{heading:"选择一个钱包"}},CONNECT_SUCCESS:{status:"连接安全",action:"继续"},READY_TO_CONNECT:{header:{title:"连接"},metamask:{body:{heading:"检查MetaMask的弹窗",content:"按照MetaMask弹窗中的提示进行连接"},footer:{buttonText1:"准备好连接",buttonText2:"再试一次"}},passport:{body:{heading:"使用Immutable Passport连接",content:"按照提示使用Immutable Passport进行连接"},footer:{buttonText1:"继续",buttonText2:"再试一次"}}},SWITCH_NETWORK:{eth:{heading:"您需要切换到{{networkName}}网络",body:"MetaMask将提示您切换网络。需要时可以切回。",button:{text:"准备切换",retryText:"再试一次"}},zkEVM:{heading:"将要求您切换到Immutable zkEVM网络",body:"检查MetaMask的弹窗并选择'批准'以切换。如果这是第一次,MetaMask还会要求您添加网络。",bodyWalletConnect:"请检查您的钱包弹出窗口以进行切换。如果这是第一次,您的钱包还会要求您添加网络。",button:{text:"准备切换",retryText:"再试一次"}}},ERROR_VIEW:{heading:"出了些问题",body:["您可以再试一次或联系","支持","寻求帮助。"],actionText:"再试一次"},SERVICE_UNAVAILABLE_ERROR_VIEW:{heading:{swap:"您所在的地区不支持兑换"},body:{swap:"请参考<quickswapLink>Quickswap</quickswapLink>的网站了解更多信息。"}},LOADING_VIEW:{text:"加载中"},WALLET_BALANCES:{header:{title:"钱包"},networkStatus:{heading:"网络"},totalTokenBalance:{heading:"硬币",totalHeading:"价值"},tokenBalancesList:{noTokensFound:"未发现代币"},addCoins:"添加硬币"},SETTINGS:{header:{title:"设置"},disconnectButton:{label:"断开钱包连接"}},COIN_INFO:{metamask:{heading:"硬币和收藏品是网络原生的",body:"您可以切换网络来添加硬币或将它们从一个网络移动到另一个网络"},passport:{heading:"硬币和收藏品是网络原生的",body1:"这个网络称为Immutable zkEVM。如果您在Passport中有其他硬币在这里看不到,它们可能在另一个网络上。",body2:"欲了解更多信息,请",linkText:"访问我们的常见问题"}},SWAP:{header:{title:"兑换硬币"},content:{title:"您想要兑换什么?",fiatPricePrefix:"约合美元",availableBalancePrefix:"可用余额"},swapForm:{from:{label:"从",inputPlaceholder:"0",selectorTitle:"您想从哪里兑换?"},to:{label:"至",inputPlaceholder:"0",selectorTitle:"您想兑换到哪里?"},buttonText:"兑换"},fees:{title:"总费用"},validation:{noAmountInputted:"请输入金额",insufficientBalance:"余额不足",noFromTokenSelected:"选择一个要兑换的硬币",noToTokenSelected:"选择一个要接收的硬币"},success:{text:"成功",actionText:"继续"},failed:{text:"交易被拒绝",actionText:"再试一次"},rejected:{text:"价格飙升",actionText:"审查并重试"},IN_PROGRESS:{loading:{text:"交换进行中"}}},APPROVE_ERC20:{approveSwap:{content:{heading:"现在您只需要确认交易",body:"按照钱包中的提示操作。"},footer:{buttonText:"好的",retryText:"再试一次"}},approveSpending:{content:{metamask:{heading:"您将被要求为这笔交易设置支出上限",body:"至少输入{{amount}}用于本次及未来交易,然后按照提示操作。"},passport:{heading:"您将被要求批准这笔交易的支出上限",body:"按照钱包中的提示批准支出上限。"}},footer:{buttonText:"明白",retryText:"再试一次"},loading:{text:"批准支出上限"}}},ONRAMP:{header:{title:"添加硬币"},initialLoadingText:"带您前往Transak",IN_PROGRESS_LOADING:{loading:{text:"Transak正在处理您的订单"}},IN_PROGRESS:{content:{heading:"订单进行中",body1:"当完成时,您将从Transak收到一封电子邮件。这可能需要长达3分钟的时间。",body2:"您可以关闭这个窗口,一旦交易完成,将会反映在您的钱包中。"}},SUCCESS:{text:"硬币正在途中",actionText:"完成"},FAIL:{text:"交易失败",actionText:"再试一次"}},TOP_UP_VIEW:{header:{title:"您想如何添加代币?"},topUpOptions:{onramp:{heading:"购买",caption:"可通过卡、谷歌支付或苹果支付。",subcaption:"费用",disabledCaption:""},swap:{heading:"兑换",caption:"使用我在余额中的代币。",subcaption:"费用",disabledCaption:"您所在的地区不可用"},bridge:{heading:"转移",caption:"我在其他钱包或网络中的代币。",subcaption:"费用",disabledCaption:""},advanced:{heading:"高级选项",caption:"进行快速桥接或CEX存款。",subcaption:"费用",disabledCaption:""}}},ORDER_SUMMARY:{loading:{balances:"正在计算数字"},currency:{fiat:"≈ USD ${{amount}}",price:"{{symbol}} {{amount}}"},orderItem:{quantity:"数量 x{{qty}}"},coinsDrawer:{header:"支付方式…",caption1:"硬币",caption2:"余额",divider:"更多选项",payWithCard:{caption:"使用银行卡购买此商品"},stepType:{SWAP:"交换 {{symbol}} ≈ {{amount}}",ONRAMP:"购买 {{symbol}} ≈ {{amount}}",BRIDGE:"移动 {{symbol}} ≈ {{amount}}",SUFFICIENT:"支付 {{symbol}} {{amount}}",delta:{SWAP:"交换 {{symbol}} ≈ {{amount}}",ONRAMP:"购买 {{symbol}} ≈ {{amount}}",BRIDGE:"移动 {{symbol}} ≈ {{amount}}",SUFFICIENT:"支付 {{symbol}} {{amount}}"}},fee:"费用 {{symbol}} ≈ {{amount}}"},orderReview:{heading:"付款摘要",continue:"继续",payWith:"使用{{symbol}}支付",balance:"余额{{amount}}"}},FUND_WITH_SMART_CHECKOUT:{loading:{checkingBalances:"正在计算数字"},currency:{usdEstimate:"≈ 美元 $",fees:"费用"},fundingRouteDrawer:{header:"可用余额"},fundingRouteSelect:{heading:"用您的支付",noRoutesAvailable:"硬币余额不足。请改用卡继续操作。",continue:"继续",payWithCardInstead:"不用了,我要用卡支付",payWithCard:"用卡支付"}},PAYMENT_METHODS:{header:{heading:"您希望如何支付?"},options:{crypto:{heading:"硬币",caption:"请用钱包里的硬币付款,或用卡购买硬币。",disabledCaption:"目前无法进行此购买。"},debit:{heading:"借记卡",caption:"使用卡支付的推荐方式。",disabledCaption:"我们正在处理此事。请使用硬币继续,如果需要,我们将指导您如何添加它们。"},credit:{heading:"信用卡",caption:"不推荐使用,因为您的银行可能会阻止交易。",disabledCaption:"我们正在处理此事。请使用硬币继续,如果需要,我们将指导您如何添加它们。"}},topUp:{heading:"您需要添加一些硬币",subheading:{both:"添加{{erc20.value}} {{erc20.symbol}}和{{native.value}} {{native.symbol}}以支付本次购买及燃气费。",erc20:"通过以下选项之一将{{erc20.value}} {{erc20.symbol}}添加到您的余额。",native:"通过以下选项之一,为燃气添加{{native.value}} {{native.symbol}}。"}},loading:{ready1:"正在收集您的订单",ready2:"正在与钱包交流",ready3:"正在准备资产",processing1:"正在初始化支付",processing2:"正在保护您的资产",processing3:"正在完成支付"},creditCardWarningDrawer:{heading:"我们推荐使用借记卡而非信用卡",body:"在这类购买中使用信用卡时,大多数银行将收取现金预付费用或完全阻止交易。",ctaButton:"尝试一下"}},PAY_WITH_COINS:{header:{heading:"用您的硬币支付",caption:"使用您钱包中的硬币余额"},button:{buyNow:"立即购买"}},PAY_WITH_CARD:{screenTitle:"用卡支付",loading:"带您前往Transak"},SALE_FAIL:{errors:{TRANSACTION_FAILED:{description:"交易失败",primaryAction:"再试一次",secondaryAction:"查看详情"},SERVICE_BREAKDOWN:{description:"抱歉,我们现在无法处理您的付款。请几分钟后再试。",secondaryAction:"关闭"},PRODUCT_NOT_FOUND:{description:"抱歉,所请求的数量缺货。请考虑购买较少数量。",secondaryAction:"关闭"},INSUFFICIENT_STOCK:{description:"抱歉,库存不足。请考虑购买较少数量。",secondaryAction:"关闭"},TRANSAK_FAILED:{description:"抱歉,出了点问题。请再试一次。",primaryAction:"再试一次",secondaryAction:"关闭"},WALLET_FAILED:{description:"抱歉,我们现在无法处理。请返回。",primaryAction:"返回",secondaryAction:"关闭"},WALLET_REJECTED_NO_FUNDS:{description:"抱歉,出了点问题。请再试一次。",primaryAction:"返回",secondaryAction:"关闭"},WALLET_REJECTED:{description:"您需要在钱包中批准交易才能继续。",primaryAction:"再试一次",secondaryAction:"取消"},WALLET_POPUP_BLOCKED:{description:"您需要允许浏览器中的弹出窗口才能继续。",primaryAction:"我已经解决了这个问题,再试一次",secondaryAction:"取消"},SMART_CHECKOUT_ERROR:{description:"无法检查您的钱包余额。请再试一次。",primaryAction:"再试一次",secondaryAction:"取消"},SMART_CHECKOUT_EXECUTE_ERROR:{description:"抱歉,转移资金时出错。请再试一次。",primaryAction:"再试一次",secondaryAction:"取消"},DEFAULT_ERROR:{description:"抱歉,出了点问题。请再试一次。",primaryAction:"再试一次",secondaryAction:"关闭"},INVALID_PARAMETERS:{description:"抱歉,我们无法处理您的订单。客户提供的信息不完整。",secondaryAction:"关闭"}}},SALE_SUCCESS:{text:"订单已完成",actionText:"继续"},WALLET_NETWORK_SELECTION:{layoutHeading:"转移资金",heading:"您想在哪两个地方之间转移资金?",fromFormInput:{heading:"从",selectDefaultText:"选择钱包和网络",walletSelectorHeading:"来自钱包",networkSelectorHeading:"来自网络"},toFormInput:{heading:"至",selectDefaultText:"选择钱包和网络",walletSelectorHeading:"至钱包"},submitButton:{text:"下一步"}},BRIDGE_FORM:{header:{title:"转移硬币"},fees:{title:"燃气费",fiatPricePrefix:"~ 美元 $"},content:{title:"您想要转移多少金额?",fiatPricePrefix:"约美元",availableBalancePrefix:"可用余额"},bridgeForm:{from:{inputPlaceholder:"0",selectorTitle:"您想要转移什么?"},buttonText:"审阅"},validation:{noAmountInputted:"请输入金额",insufficientBalance:"余额不足",noTokenSelected:"选择一个要转移的硬币"}},BRIDGE_REVIEW:{layoutHeading:"转移资金",heading:"这样看起来怎么样?",fromLabel:{amountHeading:"正在转移",heading:"从"},toLabel:{heading:"至"},fees:{heading:"燃气费"},submitButton:{buttonText:"确认转移"},fiatPricePrefix:"~ 美元 $"},BRIDGE_FAILURE:{bridgeFailureText:{statusText:"交易失败",actionText:"审查并重试"}},APPROVE_TRANSACTION:{content:{heading:"在您的钱包中批准交易",body:"按照钱包弹出窗口中的提示进行确认。"},footer:{buttonText:"好的",retryText:"再试一次"},loadingView:{text:"开始转移"}},IN_PROGRESS:{heading:"转移进行中",body1:"您的资金已经发送,距离收到不到20分钟。您可以点击火箭图标返回并查看进展。",body2:"您可以关闭这个窗口。"},TRANSACTIONS:{layoutHeading:"进行中",passportDashboard:"在您的完整交易历史中查看",status:{withdrawalPending:{actionButtonText:"继续",withdrawalDelayText:"此操作已暂停,请返回",withdrawalReadyText:"需要采取行动以收取您的硬币",caption:"已暂停"},inProgress:{heading:"进行中",txnEstimate:"通常需要20分钟",stepInfo:"查看详情"},emptyState:{notConnected:{body:"连接您的钱包以查看交易",buttonText:"连接"}},noTransactions:{body:"您已完成所有操作。",passport:{body:"在",link:"护照"}}},changeWallet:{buttonText:"更换钱包"},fiatPricePrefix:"≈ 美元 $",support:{body1:"需要帮助吗?",body2:" 联系 ",body3:"支持",supportLink:"https://support.immutable.com/en/",passport:{body1:"或在您的 ",body2:"护照"}},walletSelection:{heading:"选择要查看的钱包"}},CLAIM_WITHDRAWAL:{content:{heading:"按照提示在此处收取您的硬币",body:"您将被要求支付一笔小额燃气费以领取您的提款。",body2:"目标钱包地址:"},footer:{buttonText:"继续",retryText:"重试"},IN_PROGRESS:{loading:{text:"处理中"},success:{text:"成功",actionText:"完成"},failure:{text:"交易失败",actionText:"请重试"}}}},footers:{quickswapFooter:{disclaimerText:"Quickswap是第三方应用。Immutable不构建、拥有、操作或部署Quickswap。更多信息请参阅Quickswap的网站。"}},wallets:{passport:{heading:"Immutable Passport",description:"您的游戏钱包,可以用卡支付、管理物品等。"},metamask:{heading:"MetaMask",description:"用于访问区块链应用和web3的数字钱包。"},walletconnect:{heading:"其他钱包",description:"允许您连接任何区块链移动钱包,包括MetaMask。"},browserwallet:{heading:"浏览器钱包",description:"用于访问区块链应用和web3的数字钱包。"},recommended:"推荐"},drawers:{feesBreakdown:{heading:"费用分解",total:"费用总计",fees:{gas:{label:"燃气费"}}},transactionFailed:{content:{heading1:"在继续前我们需要您在钱包中确认",heading2:"钱包确认",body1:"当MetaMask弹出时,请确保",body2:"签署交易"},buttons:{retry:"明白了",cancel:"关闭"}},coinSelector:{option:{fiatPricePrefix:"约美元 $"},noCoins:"您的钱包中没有可用的硬币。"},notEnoughGas:{content:{heading:"您需要更多{{token}}来支付燃气费",body:"您的{{token}}余额不足以支付此操作的燃气费,因此在继续之前,您需要添加更多{{token}}。"},buttons:{adjustAmount:"调整金额",addMoreImx:"添加IMX币",copyAddress:"复制钱包地址",cancel:"关闭"}},notEnoughImx:{content:{noImx:{heading:"您需要IMX币来兑换",body:"兑换费用需要用IMX币支付,因此在您可以进行兑换之前需要添加此币"},insufficientImx:{heading:"您需要更多IMX币",body:"为了支付指定金额的费用,您需要添加更多IMX币"}},buttons:{adjustAmount:"调整金额",addMoreImx:"添加IMX币",cancel:"关闭"}},notEnoughEthWithdrawal:{content:{heading1:"不足",heading2:"用于燃气",body1:"添加",body2:"到您的目标账户,或选择另一个账户支付燃气费。您的目标账户将保持不变。"},buttons:{retry:"使用另一个账户支付燃气费",dismiss:"取消"}},unableToSwap:{heading:"无法兑换此币种",body:"现在无法兑换这种币对。请尝试选择其他币种。",buttons:{cancel:"关闭"}},networkSwitch:{heading:"在您的{{wallet}}中切换网络",manualSwitch:{body:"您需要打开您的移动钱包并切换到{{chain}}网络才能继续进行"},controlledSwitch:{body:"您需要切换到{{chain}}网络才能继续进行"},switchButton:"切换到{{chain}}"},walletConnectionError:{unableToConnect:{heading:"无法连接",body:"请检查您的钱包并重试,或关闭并尝试其他选项。",actionButtonText:"重试"},changedYourMind:{heading:"改变主意了吗?",body:"确保弹出窗口已启用,并按照钱包中的提示进行连接。",actionButtonText:"重试"}}}}}};var fUe;cje.use(aUe).use(Pje).init({fallbackLng:"en",resources:dUe,interpolation:{escapeValue:!1}});var pUe=RPe;fUe=pUe.createRoot,pUe.hydrateRoot;const hUe="development",mUe="native",yUe=18,bUe=6,gUe=700,vUe="IMX",wUe="ETH",TUe="https://support.immutable.com/en/",EUe={retryIntervalMs:1e4,retries:60,nonRetryable:e=>e?.data?.code>=500||e.type===$Z.GET_ERC20_BALANCE_ERROR,nonRetryableSilently:e=>e.type===$Z.WEB3_PROVIDER_ERROR},AUe={retryIntervalMs:1e4,retries:60,nonRetryableSilently:e=>!!e},xUe=qt.SANDBOX,OUe=NZ.DARK;WZ.METAMASK;const CUe=3e4,IUe={[hUe]:"https://checkout-cdn.dev.immutable.com",[qt.SANDBOX]:"https://checkout-cdn.sandbox.immutable.com",[qt.PRODUCTION]:"https://checkout-cdn.immutable.com"},SUe={[hUe]:"https://testnet.axelarscan.io/gmp/",[qt.SANDBOX]:"https://testnet.axelarscan.io/gmp/",[qt.PRODUCTION]:"https://axelarscan.io/gmp/"},_Ue={[hUe]:"https://passport.sandbox.immutable.com/",[qt.SANDBOX]:"https://passport.sandbox.immutable.com/",[qt.PRODUCTION]:"https://passport.immutable.com/"},PUe={[hUe]:"https://image-resizer-cache.dev.immutable.com",[qt.SANDBOX]:"https://image-resizer-cache.dev.immutable.com",[qt.PRODUCTION]:"https://image-resizer-cache.prod.immutable.com"},kUe=91e3;function RUe(e){return e&&Object.values(qt).includes(e)?e:xUe}function NUe(e,t){return t?"true"===t||"false"!==t&&e:e}const MUe=e=>e.isProduction?MZ.ETHEREUM:MZ.SEPOLIA,DUe=e=>e.isDevelopment?MZ.IMTBL_ZKEVM_DEVNET:e.isProduction?MZ.IMTBL_ZKEVM_MAINNET:MZ.IMTBL_ZKEVM_TESTNET,LUe={[MZ.IMTBL_ZKEVM_DEVNET]:"base.color.text.link.primary",[MZ.IMTBL_ZKEVM_TESTNET]:"base.color.text.link.primary",[MZ.IMTBL_ZKEVM_MAINNET]:"base.color.text.link.primary",[MZ.ETHEREUM]:"base.color.accent.5",[MZ.SEPOLIA]:"base.color.accent.5"},FUe={[MZ.IMTBL_ZKEVM_DEVNET]:"Immutable",[MZ.IMTBL_ZKEVM_MAINNET]:"Immutable",[MZ.IMTBL_ZKEVM_TESTNET]:"Immutable",[MZ.ETHEREUM]:"EthToken",[MZ.SEPOLIA]:"EthToken"},BUe={[MZ.IMTBL_ZKEVM_DEVNET]:DZ.IMTBL_ZKEVM_DEVNET,[MZ.IMTBL_ZKEVM_MAINNET]:DZ.IMTBL_ZKEVM_MAINNET,[MZ.IMTBL_ZKEVM_TESTNET]:DZ.IMTBL_ZKEVM_TESTNET,[MZ.ETHEREUM]:DZ.ETHEREUM,[MZ.SEPOLIA]:DZ.SEPOLIA},jUe="IMTBL_WIDGET_PROVIDER_EVENT";var UUe;function zUe(e,t){e.provider.on(UUe.CHAIN_CHANGED,t)}function HUe(e,t){e.provider.removeListener(UUe.CHAIN_CHANGED,t)}function WUe(){window.dispatchEvent(new CustomEvent(jUe))}function VUe(e){var t;t=WUe,e.provider.removeListener(UUe.ACCOUNTS_CHANGED,t),HUe(e,WUe),function(e,t){e.provider.on(UUe.ACCOUNTS_CHANGED,t)}(e,WUe),zUe(e,WUe)}function GUe(e){const t=new CustomEvent(TZ.IMTBL_WIDGETS_PROVIDER,{detail:{type:EZ.PROVIDER_UPDATED,data:e}});void 0!==window&&window.dispatchEvent(t)}!function(e){e.CHAIN_CHANGED="chainChanged",e.ACCOUNTS_CHANGED="accountsChanged"}(UUe||(UUe={}));class qUe{checkout;targetId;reactRoot;widgetElement;properties;parameters;web3Provider;eventHandlers=new Map;eventHandlersFunction;eventTopic="";constructor(e,t){const n=this.getValidatedProperties(t);this.parameters={},this.checkout=e,this.properties=n,this.web3Provider=t?.provider,this.web3Provider&&VUe(this.web3Provider),this.setupProviderUpdatedListener(),this.setupDisconnectProviderListener()}unmount(){this.parameters=this.getValidatedParameters({}),this.reactRoot?.unmount(),document.getElementById(this.targetId)?.replaceChildren(),this.reactRoot=void 0}mount(e,t){this.parameters=this.getValidatedParameters({...this.parameters??{},...t??{}}),this.targetId=e;const n=document.getElementById(e);this.widgetElement||(this.widgetElement=document.createElement("div")),0===n?.children.length?n?.appendChild(this.widgetElement):n?.replaceChildren(this.widgetElement),!this.reactRoot&&n&&this.widgetElement&&(this.reactRoot=fUe(this.widgetElement)),this.render()}update(e){this.properties=this.getValidatedProperties({config:{...this.properties.config??{},...e.config??{}}}),e.provider&&console.warn("Updating a widget provider through the update() method is not supported yet"),e.config?.language&&cje.changeLanguage(e.config.language).then((()=>{console.log("Language changed:",e.config?.language)})),this.render()}addListener(e,t){this.eventHandlers.set(e,t),this.eventHandlersFunction&&(window.removeEventListener(this.eventTopic,this.eventHandlersFunction),window.removeEventListener(TZ.IMTBL_WIDGETS_PROVIDER,this.eventHandlersFunction)),this.eventHandlersFunction=e=>{const t=this.eventHandlers.get(e.detail.type);t&&t(e.detail.data)},window.addEventListener(this.eventTopic,this.eventHandlersFunction),window.addEventListener(TZ.IMTBL_WIDGETS_PROVIDER,this.eventHandlersFunction)}removeListener(e){this.eventHandlers.delete(e),this.eventHandlersFunction&&(window.removeEventListener(this.eventTopic,this.eventHandlersFunction),window.removeEventListener(TZ.IMTBL_WIDGETS_PROVIDER,this.eventHandlersFunction)),this.eventHandlers.size<=0||(this.eventHandlersFunction=e=>{const t=this.eventHandlers.get(e.detail.type);t&&t(e.detail.data)},window.addEventListener(this.eventTopic,this.eventHandlersFunction),window.addEventListener(TZ.IMTBL_WIDGETS_PROVIDER,this.eventHandlersFunction))}strongConfig(){return e={theme:this.properties.config?.theme,environment:this.checkout.config.environment,isOnRampEnabled:this.checkout.config.isOnRampEnabled,isSwapEnabled:this.checkout.config.isSwapEnabled,isBridgeEnabled:this.checkout.config.isBridgeEnabled},{theme:(t=e?.theme,t&&Object.values(NZ).includes(t)?t:OUe),environment:RUe(e?.environment),isOnRampEnabled:NUe(!0,e?.isOnRampEnabled?.toString()),isSwapEnabled:NUe(!0,e?.isSwapEnabled?.toString()),isBridgeEnabled:NUe(!0,e?.isBridgeEnabled?.toString())};var e,t}setupProviderUpdatedListener(){window.addEventListener(TZ.IMTBL_WIDGETS_PROVIDER,this.handleProviderUpdatedEvent);const e=this;window.addEventListener(jUe,(()=>e.handleEIP1193ProviderEvents(e)))}setupDisconnectProviderListener(){window.addEventListener(TZ.IMTBL_WALLET_WIDGET_EVENT,this.handleDisconnectEvent)}handleEIP1193ProviderEvents(e){e.web3Provider&&(e.web3Provider=new Rp(e.web3Provider.provider)),e.render()}handleProviderUpdatedEvent=e=>{const t=this;switch(e.detail.type){case EZ.PROVIDER_UPDATED:{const n=e.detail.data;t.web3Provider=n.provider,this.render();break}}};handleDisconnectEvent=e=>{const t=this;if(e.detail.type===xZ.DISCONNECT_WALLET)t.web3Provider=void 0,this.render()}}const KUe=e$.lazy((()=>Promise.resolve().then((function(){return A1e}))));class XUe extends qUe{eventTopic=TZ.IMTBL_CONNECT_WIDGET_EVENT;getValidatedProperties({config:e}){return{config:e}}getValidatedParameters(e){const t=e;return!e.targetChainId&&this.checkout.config.isProduction?t.targetChainId=MZ.IMTBL_ZKEVM_MAINNET:e.targetChainId&&this.checkout.config.isProduction&&e.targetChainId!==MZ.ETHEREUM&&e.targetChainId!==MZ.IMTBL_ZKEVM_MAINNET&&(console.warn(`Cannot set targetChainId to ${e.targetChainId} in ${qt.PRODUCTION} environment, defaulting to ${EBe(MZ.IMTBL_ZKEVM_MAINNET)}, chainId ${MZ.IMTBL_ZKEVM_MAINNET}`),t.targetChainId=MZ.IMTBL_ZKEVM_MAINNET),e.targetChainId||this.checkout.config.environment!==qt.SANDBOX?e.targetChainId&&this.checkout.config.environment===qt.SANDBOX&&e.targetChainId!==MZ.SEPOLIA&&e.targetChainId!==MZ.IMTBL_ZKEVM_TESTNET&&(console.warn(`Cannot set targetChainId to ${e.targetChainId} in ${qt.SANDBOX} environment, defaulting to ${EBe(MZ.IMTBL_ZKEVM_TESTNET)}, chainId ${MZ.IMTBL_ZKEVM_TESTNET}`),t.targetChainId=MZ.IMTBL_ZKEVM_TESTNET):t.targetChainId=MZ.IMTBL_ZKEVM_TESTNET,e}render(){if(!this.reactRoot)return;const{t:e}=cje;this.reactRoot.render(y1(e$.StrictMode,{children:y1(vBe,{checkout:this.checkout,children:y1(bRe,{id:"connect-container",config:this.strongConfig(),children:y1($Q.Suspense,{fallback:y1(TBe,{loadingText:e("views.LOADING_VIEW.text")}),children:y1(KUe,{config:this.strongConfig(),checkout:this.checkout,targetWalletRdns:this.parameters.targetWalletRdns,targetChainId:this.parameters.targetChainId,blocklistWalletRdns:this.parameters.blocklistWalletRdns})})})})}))}}const YUe={width:"100%",display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",padding:"base.spacing.x4",paddingBottom:"base.spacing.x10"},JUe={maxHeight:"base.spacing.x20",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",paddingTop:"base.spacing.x4",paddingBottom:"base.spacing.x5"},ZUe={width:"base.icon.size.400"},QUe={display:"flex",flexDirection:"column",paddingX:"base.spacing.x4",paddingBottom:"base.spacing.x4"},$Ue={display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"base.spacing.x2",color:"base.color.text.body.primary"},eze={display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",color:"base.color.text.body.secondary"};function tze({actionText:e,onActionClick:t,hideActionButton:n=!1,loading:r=!1,variant:i="secondary"}){return y1(Rae,{testId:"footer-button-container",sx:YUe,children:!n&&y1(Oae,{testId:"footer-button",size:"large",sx:{width:"100%"},variant:i,disabled:r,onClick:t,children:r?y1(Oae.Icon,{icon:"Loading",sx:ZUe}):e})})}const nze=e=>({backgroundColor:e?"transparent":""}),rze=(e=!1)=>({backgroundColor:e?"base.color.translucent.standard.200":""});var ize;!function(e){e.LOADING_VIEW="LOADING_VIEW",e.ERROR_VIEW="ERROR_VIEW",e.SERVICE_UNAVAILABLE_ERROR_VIEW="SERVICE_UNAVAILABLE_ERROR_VIEW",e.TOP_UP_VIEW="TOP_UP_VIEW"}(ize||(ize={}));const aze={view:{type:ize.LOADING_VIEW},history:[]};var oze;!function(e){e.UPDATE_VIEW="UPDATE_VIEW",e.GO_BACK="GO_BACK",e.GO_BACK_TO="GO_BACK_TO"}(oze||(oze={}));const sze=$Q.createContext({viewState:aze,viewDispatch:()=>{}});sze.displayName="ViewContext";const cze=(e,t)=>{switch(t.payload.type){case oze.UPDATE_VIEW:{const{view:n,currentViewData:r}=t.payload;n.type===ize.ERROR_VIEW&&console.error(n.error);const{history:i}=e;return 0!==i.length&&i[i.length-1].type===n.type||(r&&(i[i.length-1]={...i[i.length-1],data:r}),i.push(n)),{...e,view:n,history:i}}case oze.GO_BACK:{if(e.history.length<=1)return{...e};const t=e.history.slice(0,-1);return{...e,history:t,view:t[t.length-1]}}case oze.GO_BACK_TO:{if(e.history.length<=1)return{...e};const{history:n}=e,r=[...n];let i=!1;for(let a=n.length-1;a>=0;a--){if(e.history[a].type===t.payload.view.type){i=!0;break}r.pop()}return i?{...e,history:r,view:r[r.length-1]}:{...e}}default:return e}};function uze({title:e,showBack:t=!1,transparent:n=!1,onBackButtonClick:r,onCloseButtonClick:i,rightActions:a}){const{viewDispatch:o}=$Q.useContext(sze);return b1(pme,{testId:"header-navigation-container",sx:nze(n),contentAlign:t?"center":"left",size:"small",children:[t&&y1(pme.LeftButtCon,{sx:rze(n),icon:"ArrowBackward",iconVariant:"bold",onClick:()=>{r?r():(async()=>{o({payload:{type:oze.GO_BACK}})})()},testId:"back-button"}),y1(pme.Title,{testId:"header-title",size:"small",children:e}),b1(pme.RightSlot,{children:[a,i&&y1(coe,{iconVariant:"bold",sx:rze(n),icon:"Close",onClick:i,testId:"close-button"})]})]})}const lze={position:"absolute",top:"0",left:"0",height:"100%",width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},dze={justifyContent:"flex-end"},fze={position:"relative",height:"305px",width:"100%"};function pze(){return b1(Rae,{sx:fze,children:[b1("svg",{width:"430",height:"306",viewBox:"0 0 430 306",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y1("rect",{x:"-1",y:"0.978516",width:"446",height:"305",fill:"url(#paint0_linear_3034_48563)"}),y1("defs",{children:b1("linearGradient",{id:"paint0_linear_3034_48563",x1:"222",y1:"0.978516",x2:"222",y2:"305.979",gradientUnits:"userSpaceOnUse",children:[y1("stop",{stopColor:"#01003F",stopOpacity:"0"}),y1("stop",{offset:"1",stopColor:"#6B4292",stopOpacity:"0.432292"})]})})]}),y1(Rae,{sx:lze,children:b1("svg",{width:"174",height:"180",viewBox:"0 0 174 180",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y1("path",{opacity:"0.5",d:"M135.919 70.8386C136.877 67.1564 136.676 62.3424 133.109 57.2929C129.543 52.2434 125.073 50.4446 121.282 50.116",stroke:"#443F58",strokeLinecap:"round",strokeLinejoin:"round"}),y1("path",{opacity:"0.5",d:"M128.95 72.1044C129.792 69.2107 129.738 65.4595 127.01 61.5982C124.283 57.7368 120.766 56.4311 117.757 56.2577",stroke:"#443F58",strokeLinecap:"round",strokeLinejoin:"round"}),y1("rect",{x:"49.3672",y:"30.5654",width:"49.9943",height:"27.6088",rx:"2.10366",transform:"rotate(54.7665 49.3672 30.5654)",fill:"url(#paint0_linear_2795_41752)"}),y1("g",{filter:"url(#filter0_d_2795_41752)",children:y1("circle",{cx:"118.481",cy:"67.6248",r:"2.23855",transform:"rotate(54.7665 118.481 67.6248)",fill:"#D0D2E2"})}),y1("path",{d:"M47.6489 31.7791L28.5344 45.2796C27.5854 45.9499 27.3595 47.2625 28.0297 48.2115L48.5554 77.2724L54.7482 38.184L50.5808 32.2837C49.9105 31.3347 48.5979 31.1088 47.6489 31.7791Z",fill:"#D9D9D9",fillOpacity:"0.1"}),y1("line",{x1:"63.724",y1:"50.8925",x2:"41.1729",y2:"66.8203",stroke:"#1E182A",strokeWidth:"0.525916"}),y1("line",{x1:"67.0235",y1:"79.3011",x2:"38.1813",y2:"38.4654",stroke:"#1E182A",strokeWidth:"0.525916"}),y1("line",{x1:"55.9759",y1:"39.9228",x2:"33.4249",y2:"55.8506",stroke:"#1E182A",strokeWidth:"0.525916"}),y1("line",{x1:"71.0423",y1:"61.2538",x2:"48.4913",y2:"77.1816",stroke:"#1E182A",strokeWidth:"0.525916"}),y1("rect",{x:"101.025",y:"103.704",width:"49.9943",height:"27.6088",rx:"2.10366",transform:"rotate(54.7665 101.025 103.704)",fill:"url(#paint1_linear_2795_41752)"}),y1("line",{x1:"115.384",y1:"124.032",x2:"92.8331",y2:"139.96",stroke:"#1E182A",strokeWidth:"0.525916"}),y1("line",{x1:"118.684",y1:"152.44",x2:"89.8414",y2:"111.604",stroke:"#1E182A",strokeWidth:"0.525916"}),y1("line",{x1:"107.632",y1:"113.06",x2:"85.0811",y2:"128.988",stroke:"#1E182A",strokeWidth:"0.525916"}),y1("line",{x1:"122.702",y1:"134.393",x2:"100.151",y2:"150.321",stroke:"#1E182A",strokeWidth:"0.525916"}),y1("path",{d:"M96.3684 97.1098C97.0387 98.0588 96.8127 99.3715 95.8637 100.042L53.3683 130.056C50.5214 132.067 46.5834 131.389 44.5726 128.542L35.9266 116.301C33.9158 113.454 34.5936 109.516 37.4406 107.505L79.936 77.4907C80.8849 76.8204 82.1976 77.0464 82.8679 77.9953L96.3684 97.1098Z",fill:"url(#paint2_linear_2795_41752)"}),y1("path",{d:"M123.831 88.136C124.166 88.6105 124.053 89.2668 123.578 89.6019L123.336 89.7733C113.846 96.476 100.719 94.2165 94.0166 84.7267L93.7517 84.3516C87.049 74.8617 89.3085 61.7351 98.7983 55.0325L99.041 54.8611C99.5154 54.526 100.172 54.6389 100.507 55.1134L123.831 88.136Z",fill:"url(#paint3_linear_2795_41752)"}),b1("defs",{children:[b1("filter",{id:"filter0_d_2795_41752",x:"114.664",y:"63.808",width:"7.63206",height:"7.63303",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[y1("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),y1("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),y1("feMorphology",{radius:"0.525916",operator:"dilate",in:"SourceAlpha",result:"effect1_dropShadow_2795_41752"}),y1("feOffset",{}),y1("feGaussianBlur",{stdDeviation:"0.525916"}),y1("feComposite",{in2:"hardAlpha",operator:"out"}),y1("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.384314 0 0 0 0 0.4 0 0 0 0 0.580392 0 0 0 1 0"}),y1("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2795_41752"}),y1("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2795_41752",result:"shape"})]}),b1("linearGradient",{id:"paint0_linear_2795_41752",x1:"53.8443",y1:"29.4462",x2:"98.6153",y2:"58.1742",gradientUnits:"userSpaceOnUse",children:[y1("stop",{stopColor:"#8395E5",stopOpacity:"0.44"}),y1("stop",{offset:"0.526042",stopColor:"#989AD1",stopOpacity:"0.734583"}),y1("stop",{offset:"1",stopColor:"#2D203D"})]}),b1("linearGradient",{id:"paint1_linear_2795_41752",x1:"105.502",y1:"102.585",x2:"150.273",y2:"131.313",gradientUnits:"userSpaceOnUse",children:[y1("stop",{stopColor:"#8395E5",stopOpacity:"0.44"}),y1("stop",{offset:"0.526042",stopColor:"#989AD1",stopOpacity:"0.734583"}),y1("stop",{offset:"1",stopColor:"#2D203D"})]}),b1("linearGradient",{id:"paint2_linear_2795_41752",x1:"88.8945",y1:"89.2396",x2:"42.7826",y2:"120.454",gradientUnits:"userSpaceOnUse",children:[y1("stop",{stopColor:"#7676A3"}),y1("stop",{offset:"1",stopColor:"#EDEFF5"})]}),b1("linearGradient",{id:"paint3_linear_2795_41752",x1:"112.599",y1:"72.2342",x2:"91.9662",y2:"86.3506",gradientUnits:"userSpaceOnUse",children:[y1("stop",{stopColor:"#DEDFEB"}),y1("stop",{offset:"0.916667",stopColor:"#656997"})]})]})]})})]})}const hze={paddingX:"base.spacing.x4",paddingTop:"base.spacing.x10"},mze={marginTop:"base.spacing.x3"},yze={color:"base.color.text.body.secondary"};function bze(e){const{heading:t,children:n}=e;return b1(Rae,{sx:hze,children:[y1($ue,{testId:"simple-text-body__heading",size:"small",children:t}),y1(Rae,{sx:mze,children:y1(Uce,{testId:"simple-text-body__body",size:"small",sx:yze,children:n})})]})}function gze({actionText:e,onActionClick:t,errorEventAction:n,errorEventActionLoading:r=!1,onCloseClick:i}){const{t:a}=lUe();"function"==typeof n&&n();return y1(wBe,{header:y1(uze,{transparent:!0,onCloseButtonClick:i}),footer:y1(tze,{loading:r,actionText:e,onActionClick:()=>"function"==typeof t&&t()}),heroContent:y1(pze,{}),floatHeader:!0,testId:"error-view",children:b1(bze,{heading:a("views.ERROR_VIEW.heading"),children:[a("views.ERROR_VIEW.body",{returnObjects:!0})[0]," ",y1(Ohe,{size:"small",rc:y1("a",{href:"https://support.immutable.com/en/"}),children:a("views.ERROR_VIEW.body",{returnObjects:!0})[1]})," ",a("views.ERROR_VIEW.body",{returnObjects:!0})[2]]})})}var vze;!function(e){e.NOT_CONNECTED_NO_PROVIDER="NOT_CONNECTED_NO_PROVIDER",e.NOT_CONNECTED="NOT_CONNECTED",e.CONNECTED_WRONG_NETWORK="CONNECTED_WRONG_NETWORK",e.CONNECTED_WITH_NETWORK="CONNECTED_WITH_NETWORK",e.ERROR="ERROR",e.LOADING="LOADING"}(vze||(vze={}));const wze={connectionStatus:vze.LOADING,checkout:void 0,provider:void 0};var Tze;!function(e){e.UPDATE_CONNECTION_STATUS="UPDATE_CONNECTION_STATUS",e.SET_CHECKOUT="SET_CHECKOUT",e.SET_PROVIDER="SET_PROVIDER"}(Tze||(Tze={}));const Eze=$Q.createContext({connectLoaderState:wze,connectLoaderDispatch:()=>{}}),Aze=(e,t)=>{switch(t.payload.type){case Tze.UPDATE_CONNECTION_STATUS:return{...e,connectionStatus:t.payload.connectionStatus,deepLink:t.payload.deepLink};case Tze.SET_CHECKOUT:return{...e,checkout:t.payload.checkout};case Tze.SET_PROVIDER:return{...e,provider:t.payload.provider};default:return e}},xze=(e,t,n)=>e.chainId===DUe(n)?-1:e.chainId===MUe(n)?0:1,Oze=e=>(Math.round(100*e)/100).toFixed(2),Cze=(e,t,n,r="0.00")=>{if(!e)return r;const i=n.get(t.toLowerCase());if(!i)return r;const a=parseFloat(e);return 0===parseFloat(e)||Number.isNaN(a)?r:Oze(a*i)},Ize=(e,t=!1)=>{const n="-.--";return e&&("0.00"!==e||t)?e:n},Sze=(e,t)=>{const n=e.indexOf(".");return parseFloat(e.substring(0,n+t+1)).toFixed(t)},_ze=(e,t=6)=>{const n=e.toString();if(-1===n.indexOf("."))return n;if("."===n[0]||0===parseInt(n[0],10)){let e=Math.min(t,6),r=Sze(n,e);if(0===parseFloat(r))for(;"0"===(r[r.length-1]||"")&&e<t&&(e+=1,r=Sze(n,e),"0"===(r[r.length-1]||"")););return r}let r=Sze(n,2);return r.endsWith(".00")&&(r=Sze(r,0)),r},Pze=e=>e===MZ.IMTBL_ZKEVM_DEVNET||e===MZ.IMTBL_ZKEVM_TESTNET||e===MZ.IMTBL_ZKEVM_MAINNET,kze=e=>e===MZ.SEPOLIA||e===MZ.ETHEREUM,Rze=e=>!e||e.toLocaleLowerCase()===mUe;function Nze(e,t){return`${IUe[e??qt.PRODUCTION]}/v1/blob/img${t}`}function Mze(e,t){return Nze(e,`/tokens/${t.toLowerCase()}.svg`)}function Dze(e,t){return t===NZ.LIGHT?Nze(e,"/tokens/defaultonlight.svg"):Nze(e,"/tokens/defaultondark.svg")}const Lze={checkout:null,provider:null,passport:void 0,walletProviderInfo:null,walletProviderName:null,sendCloseEvent:()=>{}};var Fze;!function(e){e.SET_CHECKOUT="SET_CHECKOUT",e.SET_PROVIDER="SET_PROVIDER",e.SET_PASSPORT="SET_PASSPORT",e.SET_WALLET_PROVIDER_NAME="SET_WALLET_PROVIDER_NAME",e.SET_SEND_CLOSE_EVENT="SET_SEND_CLOSE_EVENT"}(Fze||(Fze={}));const Bze=$Q.createContext({connectState:Lze,connectDispatch:()=>{}});Bze.displayName="ConnectContext";const jze=(e,t)=>{switch(t.payload.type){case Fze.SET_CHECKOUT:return{...e,checkout:t.payload.checkout};case Fze.SET_PROVIDER:return{...e,provider:t.payload.provider};case Fze.SET_PASSPORT:return{...e,passport:t.payload.passport};case Fze.SET_WALLET_PROVIDER_NAME:return{...e,walletProviderName:t.payload.walletProviderName};case Fze.SET_SEND_CLOSE_EVENT:return{...e,sendCloseEvent:t.payload.sendCloseEvent};default:return e}};var Uze;function zze({hideLogo:e}){return y1(Rae,{testId:"footer-logo-container",sx:JUe,children:!e&&y1(Oie,{testId:"footer-logo-image",logo:"ImmutableHorizontalLockup",sx:{width:"base.spacing.x25"}})})}function Hze({visible:e,checkout:t,onCloseDrawer:n,onTryAgain:r}){const{t:i}=lUe(),a=Nze(t.config.environment??qt.PRODUCTION,"/walleterroryellow.svg");return y1(Ide,{size:"threeQuarter",visible:e,onCloseDrawer:n,showHeaderBar:!1,children:b1(Ide.Content,{testId:"unable-to-connect-bottom-sheet",sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center"},children:[b1(Rae,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center"},children:[y1(Ose,{imageUrl:a,imageResizeServiceUrl:PUe[t.config.environment],sx:{paddingTop:"base.spacing.x4",paddingBottom:"base.spacing.x9"}}),y1(coe,{icon:"Close",variant:"tertiary",sx:{pos:"absolute",top:"base.spacing.x5",left:"base.spacing.x5",backdropFilter:"blur(30px)"},onClick:n}),b1(Rae,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"base.spacing.x4",paddingX:"base.spacing.x6"},children:[y1($ue,{size:"medium",weight:"bold",sx:{textAlign:"center",paddingX:"base.spacing.x6"},children:i("drawers.walletConnectionError.unableToConnect.heading")}),y1(Uce,{size:"medium",weight:"regular",sx:{color:"base.color.text.body.secondary",textAlign:"center",paddingX:"base.spacing.x6"},children:i("drawers.walletConnectionError.unableToConnect.body")})]})]}),y1(Rae,{sx:{display:"flex",flexDirection:"column",paddingX:"base.spacing.x6",width:"100%"},children:y1(Oae,{size:"large",variant:"primary",sx:{width:"100%",marginBottom:"base.spacing.x10"},onClick:r,children:i("drawers.walletConnectionError.unableToConnect.actionButtonText")})})]})})}function Wze({visible:e,checkout:t,onCloseDrawer:n,onTryAgain:r}){const{t:i}=lUe(),a=Nze(t.config.environment??qt.PRODUCTION,"/walleterrorred.svg");return y1(Ide,{size:"threeQuarter",visible:e,onCloseDrawer:n,showHeaderBar:!1,children:b1(Ide.Content,{testId:"changed-your-mind-bottom-sheet",sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center"},children:[b1(Rae,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center"},children:[y1(Ose,{imageUrl:a,imageResizeServiceUrl:PUe[t.config.environment],sx:{paddingTop:"base.spacing.x4",paddingBottom:"base.spacing.x9"}}),y1(coe,{icon:"Close",variant:"tertiary",sx:{pos:"absolute",top:"base.spacing.x5",left:"base.spacing.x5",backdropFilter:"blur(30px)"},onClick:n}),b1(Rae,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"base.spacing.x4",paddingX:"base.spacing.x6"},children:[y1($ue,{size:"medium",weight:"bold",sx:{textAlign:"center",paddingX:"base.spacing.x6"},children:i("drawers.walletConnectionError.changedYourMind.heading")}),y1(Uce,{size:"medium",weight:"regular",sx:{color:"base.color.text.body.secondary",textAlign:"center",paddingX:"base.spacing.x6"},children:i("drawers.walletConnectionError.changedYourMind.body")})]})]}),y1(Rae,{sx:{display:"flex",flexDirection:"column",paddingX:"base.spacing.x6",width:"100%"},children:y1(Oae,{size:"large",variant:"primary",sx:{width:"100%",marginBottom:"base.spacing.x10"},onClick:r,children:i("drawers.walletConnectionError.changedYourMind.actionButtonText")})})]})})}!function(e){e.CONNECT_WALLET="CONNECT_WALLET",e.PASSPORT="PASSPORT",e.SWITCH_NETWORK="SWITCH_NETWORK",e.SUCCESS="SUCCESS"}(Uze||(Uze={}));const Vze={minw:"16px",padding:"8px",display:"flex",bg:"base.color.translucent.standard.100",overflow:"hidden",borderRadius:"4px",objectFit:"cover",objectPosition:"center",backgroundColor:"base.color.translucent.standard.200",justifyContent:"center",alignItems:"center",flexShrink:0,width:"48px",height:"48px"},Gze={width:"auto",height:"100%",objectFit:"contain",objectPosition:"50% 50%"};function qze({src:e,alt:t,sx:n={},...r}){return y1(Rae,{className:"FramedImage AspectRatioImage",sx:{...Vze,...n},rc:y1("span",{}),...r,children:y1("img",{src:e,alt:t,className:"CloudImage",style:Mte(Gze),loading:"lazy"})})}function Kze(e){return!0===e?.provider?.isPassport}function Xze(e){return!0===e?.provider?.isMetaMask}function Yze(e){return!0===e?.provider?.isWalletConnect}function Jze(e,t){if(Xze(e))return WZ.METAMASK.toString();if(Kze(e))return WZ.PASSPORT.toString();if(Yze(e))return"walletconnect";if(t&&e){const n=t.find((t=>t.provider===e.provider));if(n)return n.info.name}return"Other"}function Zze(e){let t="";switch(e){case"com.immutable.passport":t="passport";break;case"io.metamask":t="metamask";break;case"com.coinbase.wallet":t="coinbase-wallet";break;default:t=e}return t}async function Qze(e,t,n){let r=!1,i=t;try{const{isConnected:n}=await e.checkIsWalletConnected({provider:t});r=n}catch(e){throw console.error(e),e}if(!r||n)try{const{provider:a}=await e.connect({provider:t,requestWalletPermissions:n});i=a,r=!0}catch(e){throw e.type===$Z.USER_REJECTED_REQUEST_ERROR&&console.log("User rejected request"),console.error(e),e}return i}function $ze({rc:e=y1("span",{}),loading:t=!1,recommended:n=!1,providerDetail:r,onWalletItemClick:i}){const{t:a}=lUe(),{isSmallScreenMode:o}=function(){const{state:e}=kie((e=>e.width));return{isSmallScreenMode:"number"==typeof e&&e<aRe.breakpoint.medium}}(),[s,c]=$Q.useState(!1),u=Zze(r.info.rdns),l=u===WZ.PASSPORT||u===WZ.METAMASK,d={marginLeft:"65px"};return b1(rhe,{rc:$Q.cloneElement(e,{onClick:async()=>{if(!t){c(!0);try{await i(r)}finally{c(!1)}}}}),testId:`wallet-list-${r.info.rdns}`,size:"medium",emphasized:!0,sx:{marginBottom:"base.spacing.x1",position:"relative"},children:[y1(qze,{src:r.info.icon,alt:r.info.name,sx:{position:"absolute",left:"base.spacing.x3"}}),y1(rhe.Label,{size:"medium",sx:d,children:r.info.name}),!s&&y1(rhe.IntentIcon,{}),y1(rhe.Caption,{sx:{...d,width:"200px"},children:l&&a(`wallets.${u}.description`)}),(n||s)&&y1(rhe.Badge,{variant:"guidance",isAnimated:s,badgeContent:s||o?"":a("wallets.recommended")})]})}const eHe=Symbol(),tHe=Object.getPrototypeOf,nHe=new WeakMap,rHe=e=>(e=>e&&(nHe.has(e)?nHe.get(e):tHe(e)===Object.prototype||tHe(e)===Array.prototype))(e)&&e[eHe]||null,iHe=(e,t=!0)=>{nHe.set(e,t)},aHe=e=>"object"==typeof e&&null!==e,oHe=new WeakMap,sHe=new WeakSet,[cHe]=((e=Object.is,t=((e,t)=>new Proxy(e,t)),n=(e=>aHe(e)&&!sHe.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)),r=(e=>{switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e}}),i=new WeakMap,a=((e,t,n=r)=>{const o=i.get(e);if((null==o?void 0:o[0])===t)return o[1];const s=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return iHe(s,!0),i.set(e,[t,s]),Reflect.ownKeys(e).forEach((t=>{if(Object.getOwnPropertyDescriptor(s,t))return;const r=Reflect.get(e,t),i={value:r,enumerable:!0,configurable:!0};if(sHe.has(r))iHe(r,!1);else if(r instanceof Promise)delete i.value,i.get=()=>n(r);else if(oHe.has(r)){const[e,t]=oHe.get(r);i.value=a(e,t(),n)}Object.defineProperty(s,t,i)})),Object.preventExtensions(s)}),o=new WeakMap,s=[1,1],c=(r=>{if(!aHe(r))throw new Error("object required");const i=o.get(r);if(i)return i;let u=s[0];const l=new Set,d=(e,t=++s[0])=>{u!==t&&(u=t,l.forEach((n=>n(e,t))))};let f=s[1];const p=e=>(t,n)=>{const r=[...t];r[1]=[e,...r[1]],d(r,n)},h=new Map,m=e=>{var t;const n=h.get(e);n&&(h.delete(e),null==(t=n[1])||t.call(n))},y=Array.isArray(r)?[]:Object.create(Object.getPrototypeOf(r)),b={deleteProperty(e,t){const n=Reflect.get(e,t);m(t);const r=Reflect.deleteProperty(e,t);return r&&d(["delete",[t],n]),r},set(t,r,i,a){const s=Reflect.has(t,r),u=Reflect.get(t,r,a);if(s&&(e(u,i)||o.has(i)&&e(u,o.get(i))))return!0;m(r),aHe(i)&&(i=rHe(i)||i);let f=i;if(i instanceof Promise)i.then((e=>{i.status="fulfilled",i.value=e,d(["resolve",[r],e])})).catch((e=>{i.status="rejected",i.reason=e,d(["reject",[r],e])}));else{!oHe.has(i)&&n(i)&&(f=c(i));const e=!sHe.has(f)&&oHe.get(f);e&&((e,t)=>{if(h.has(e))throw new Error("prop listener already exists");if(l.size){const n=t[3](p(e));h.set(e,[t,n])}else h.set(e,[t])})(r,e)}return Reflect.set(t,r,f,a),d(["set",[r],i,u]),!0}},g=t(y,b);o.set(r,g);const v=[y,(e=++s[1])=>(f===e||l.size||(f=e,h.forEach((([t])=>{const n=t[1](e);n>u&&(u=n)}))),u),a,e=>{l.add(e),1===l.size&&h.forEach((([e,t],n)=>{if(t)throw new Error("remove already exists");const r=e[3](p(n));h.set(n,[e,r])}));return()=>{l.delete(e),0===l.size&&h.forEach((([e,t],n)=>{t&&(t(),h.set(n,[e]))}))}}];return oHe.set(g,v),Reflect.ownKeys(r).forEach((e=>{const t=Object.getOwnPropertyDescriptor(r,e);"value"in t&&(g[e]=r[e],delete t.value,delete t.writable),Object.defineProperty(y,e,t)})),g}))=>[c,oHe,sHe,e,t,n,r,i,a,o,s])();function uHe(e={}){return cHe(e)}function lHe(e,t,n){const r=oHe.get(e);let i;r||console.warn("Please use proxy object");const a=[],o=r[3];let s=!1;const c=o((e=>{a.push(e),n?t(a.splice(0)):i||(i=Promise.resolve().then((()=>{i=void 0,s&&t(a.splice(0))})))}));return s=!0,()=>{s=!1,c()}}const dHe=uHe({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),fHe={state:dHe,subscribe:e=>lHe(dHe,(()=>e(dHe))),push(e,t){e!==dHe.view&&(dHe.view=e,t&&(dHe.data=t),dHe.history.push(e))},reset(e){dHe.view=e,dHe.history=[e]},replace(e){dHe.history.length>1&&(dHe.history[dHe.history.length-1]=e,dHe.view=e)},goBack(){if(dHe.history.length>1){dHe.history.pop();const[e]=dHe.history.slice(-1);dHe.view=e}},setData(e){dHe.data=e}},pHe={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile:()=>typeof window<"u"&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),isAndroid:()=>pHe.isMobile()&&navigator.userAgent.toLowerCase().includes("android"),isIos(){const e=navigator.userAgent.toLowerCase();return pHe.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),isArray:e=>Array.isArray(e)&&e.length>0,formatNativeUrl(e,t,n){if(pHe.isHttpUrl(e))return this.formatUniversalUrl(e,t,n);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,n);return`${r}wc?uri=${encodeURIComponent(t)}`},formatUniversalUrl(e,t,n){if(!pHe.isHttpUrl(e))return this.formatNativeUrl(e,t,n);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,n);return`${r}wc?uri=${encodeURIComponent(t)}`},wait:async e=>new Promise((t=>{setTimeout(t,e)})),openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(pHe.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(pHe.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(pHe.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(pHe.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=null==(e=fHe.state.data)?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},hHe=uHe({enabled:typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),userSessionId:"",events:[],connectedWalletId:void 0}),mHe={state:hHe,subscribe:e=>lHe(hHe.events,(()=>e(function(e,t){const n=oHe.get(e);n||console.warn("Please use proxy object");const[r,i,a]=n;return a(r,i(),t)}(hHe.events[hHe.events.length-1])))),initialize(){hHe.enabled&&typeof(null==crypto?void 0:crypto.randomUUID)<"u"&&(hHe.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){hHe.connectedWalletId=e},click(e){if(hHe.enabled){const t={type:"CLICK",name:e.name,userSessionId:hHe.userSessionId,timestamp:Date.now(),data:e};hHe.events.push(t)}},track(e){if(hHe.enabled){const t={type:"TRACK",name:e.name,userSessionId:hHe.userSessionId,timestamp:Date.now(),data:e};hHe.events.push(t)}},view(e){if(hHe.enabled){const t={type:"VIEW",name:e.name,userSessionId:hHe.userSessionId,timestamp:Date.now(),data:e};hHe.events.push(t)}}},yHe=uHe({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),bHe={state:yHe,subscribe:e=>lHe(yHe,(()=>e(yHe))),setChains(e){yHe.chains=e},setWalletConnectUri(e){yHe.walletConnectUri=e},setIsCustomDesktop(e){yHe.isCustomDesktop=e},setIsCustomMobile(e){yHe.isCustomMobile=e},setIsDataLoaded(e){yHe.isDataLoaded=e},setIsUiLoaded(e){yHe.isUiLoaded=e},setIsAuth(e){yHe.isAuth=e}},gHe=uHe({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),vHe={state:gHe,subscribe:e=>lHe(gHe,(()=>e(gHe))),setConfig(e){var t,n;mHe.initialize(),bHe.setChains(e.chains),bHe.setIsAuth(Boolean(e.enableAuthMode)),bHe.setIsCustomMobile(Boolean(null==(t=e.mobileWallets)?void 0:t.length)),bHe.setIsCustomDesktop(Boolean(null==(n=e.desktopWallets)?void 0:n.length)),pHe.setModalVersionInStorage(),Object.assign(gHe,e)}};var wHe=Object.defineProperty,THe=Object.getOwnPropertySymbols,EHe=Object.prototype.hasOwnProperty,AHe=Object.prototype.propertyIsEnumerable,xHe=(e,t,n)=>t in e?wHe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const OHe="https://explorer-api.walletconnect.com",CHe="wcm",IHe="js-2.6.2";async function SHe(e,t){const n=((e,t)=>{for(var n in t||(t={}))EHe.call(t,n)&&xHe(e,n,t[n]);if(THe)for(var n of THe(t))AHe.call(t,n)&&xHe(e,n,t[n]);return e})({sdkType:CHe,sdkVersion:IHe},t),r=new URL(e,OHe);return r.searchParams.append("projectId",vHe.state.projectId),Object.entries(n).forEach((([e,t])=>{t&&r.searchParams.append(e,String(t))})),(await fetch(r)).json()}const _He={getDesktopListings:async e=>SHe("/w3m/v1/getDesktopListings",e),getMobileListings:async e=>SHe("/w3m/v1/getMobileListings",e),getInjectedListings:async e=>SHe("/w3m/v1/getInjectedListings",e),getAllListings:async e=>SHe("/w3m/v1/getAllListings",e),getWalletImageUrl:e=>`${OHe}/w3m/v1/getWalletImage/${e}?projectId=${vHe.state.projectId}&sdkType=${CHe}&sdkVersion=${IHe}`,getAssetImageUrl:e=>`${OHe}/w3m/v1/getAssetImage/${e}?projectId=${vHe.state.projectId}&sdkType=${CHe}&sdkVersion=${IHe}`};var PHe=Object.defineProperty,kHe=Object.getOwnPropertySymbols,RHe=Object.prototype.hasOwnProperty,NHe=Object.prototype.propertyIsEnumerable,MHe=(e,t,n)=>t in e?PHe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const DHe=pHe.isMobile(),LHe=uHe({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),FHe={state:LHe,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=vHe.state;if("NONE"===e||"ALL"===t&&!e)return LHe.recomendedWallets;if(pHe.isArray(e)){const t={recommendedIds:e.join(",")},{listings:n}=await _He.getAllListings(t),r=Object.values(n);r.sort(((t,n)=>e.indexOf(t.id)-e.indexOf(n.id))),LHe.recomendedWallets=r}else{const{chains:e,isAuth:n}=bHe.state,r=e?.join(","),i=pHe.isArray(t),a={page:1,sdks:n?"auth_v1":void 0,entries:pHe.RECOMMENDED_WALLET_AMOUNT,chains:r,version:2,excludedIds:i?t.join(","):void 0},{listings:o}=DHe?await _He.getMobileListings(a):await _He.getDesktopListings(a);LHe.recomendedWallets=Object.values(o)}return LHe.recomendedWallets},async getWallets(e){const t=((e,t)=>{for(var n in t||(t={}))RHe.call(t,n)&&MHe(e,n,t[n]);if(kHe)for(var n of kHe(t))NHe.call(t,n)&&MHe(e,n,t[n]);return e})({},e),{explorerRecommendedWalletIds:n,explorerExcludedWalletIds:r}=vHe.state,{recomendedWallets:i}=LHe;if("ALL"===r)return LHe.wallets;i.length?t.excludedIds=i.map((e=>e.id)).join(","):pHe.isArray(n)&&(t.excludedIds=n.join(",")),pHe.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),bHe.state.isAuth&&(t.sdks="auth_v1");const{page:a,search:o}=e,{listings:s,total:c}=DHe?await _He.getMobileListings(t):await _He.getDesktopListings(t),u=Object.values(s),l=o?"search":"wallets";return LHe[l]={listings:[...LHe[l].listings,...u],total:c,page:a??1},{listings:u,total:c}},getWalletImageUrl:e=>_He.getWalletImageUrl(e),getAssetImageUrl:e=>_He.getAssetImageUrl(e),resetSearch(){LHe.search={listings:[],total:0,page:1}}},BHe=uHe({open:!1}),jHe={state:BHe,subscribe:e=>lHe(BHe,(()=>e(BHe))),open:async e=>new Promise((t=>{const{isUiLoaded:n,isDataLoaded:r}=bHe.state;if(pHe.removeWalletConnectDeepLink(),bHe.setWalletConnectUri(e?.uri),bHe.setChains(e?.chains),fHe.reset("ConnectWallet"),n&&r)BHe.open=!0,t();else{const e=setInterval((()=>{const n=bHe.state;n.isUiLoaded&&n.isDataLoaded&&(clearInterval(e),BHe.open=!0,t())}),200)}})),close(){BHe.open=!1}};var UHe=Object.defineProperty,zHe=Object.getOwnPropertySymbols,HHe=Object.prototype.hasOwnProperty,WHe=Object.prototype.propertyIsEnumerable,VHe=(e,t,n)=>t in e?UHe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const GHe=uHe({themeMode:typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}),qHe={state:GHe,subscribe:e=>lHe(GHe,(()=>e(GHe))),setThemeConfig(e){const{themeMode:t,themeVariables:n}=e;t&&(GHe.themeMode=t),n&&(GHe.themeVariables=((e,t)=>{for(var n in t||(t={}))HHe.call(t,n)&&VHe(e,n,t[n]);if(zHe)for(var n of zHe(t))WHe.call(t,n)&&VHe(e,n,t[n]);return e})({},n))}},KHe=uHe({open:!1,message:"",variant:"success"}),XHe={state:KHe,subscribe:e=>lHe(KHe,(()=>e(KHe))),openToast(e,t){KHe.open=!0,KHe.message=e,KHe.variant=t},closeToast(){KHe.open=!1}};let YHe=class{constructor(e){this.openModal=jHe.open,this.closeModal=jHe.close,this.subscribeModal=jHe.subscribe,this.setTheme=qHe.setThemeConfig,qHe.setThemeConfig(e),vHe.setConfig(e),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then((function(){return Ant}));const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),bHe.setIsUiLoaded(!0)}}};var JHe=Object.freeze({__proto__:null,WalletConnectModal:YHe});function ZHe(){}function QHe(){QHe.init.call(this)}function $He(e){return void 0===e._maxListeners?QHe.defaultMaxListeners:e._maxListeners}function eWe(e,t,n,r){var i,a,o;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((a=e._events)?(a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]):(a=e._events=new ZHe,e._eventsCount=0),o){if("function"==typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),!o.warned&&(i=$He(e))&&i>0&&o.length>i){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(s)}}else o=a[t]=n,++e._eventsCount;return e}function tWe(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 nWe(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 rWe(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}ZHe.prototype=Object.create(null),QHe.EventEmitter=QHe,QHe.usingDomains=!1,QHe.prototype.domain=void 0,QHe.prototype._events=void 0,QHe.prototype._maxListeners=void 0,QHe.defaultMaxListeners=10,QHe.init=function(){this.domain=null,QHe.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new ZHe,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},QHe.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},QHe.prototype.getMaxListeners=function(){return $He(this)},QHe.prototype.emit=function(e){var t,n,r,i,a,o,s,c="error"===e;if(o=this._events)c=c&&null==o.error;else if(!c)return!1;if(s=this.domain,c){if(t=arguments[1],!s){if(t instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}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=o[e]))return!1;var l="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=rWe(e,r),a=0;a<r;++a)i[a].call(n)}(n,l,this);break;case 2:!function(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,a=rWe(e,i),o=0;o<i;++o)a[o].call(n,r)}(n,l,this,arguments[1]);break;case 3:!function(e,t,n,r,i){if(t)e.call(n,r,i);else for(var a=e.length,o=rWe(e,a),s=0;s<a;++s)o[s].call(n,r,i)}(n,l,this,arguments[1],arguments[2]);break;case 4:!function(e,t,n,r,i,a){if(t)e.call(n,r,i,a);else for(var o=e.length,s=rWe(e,o),c=0;c<o;++c)s[c].call(n,r,i,a)}(n,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),a=1;a<r;a++)i[a-1]=arguments[a];!function(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,a=rWe(e,i),o=0;o<i;++o)a[o].apply(n,r)}(n,l,this,i)}return!0},QHe.prototype.addListener=function(e,t){return eWe(this,e,t,!1)},QHe.prototype.on=QHe.prototype.addListener,QHe.prototype.prependListener=function(e,t){return eWe(this,e,t,!0)},QHe.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,tWe(this,e,t)),this},QHe.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,tWe(this,e,t)),this},QHe.prototype.removeListener=function(e,t){var n,r,i,a,o;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 ZHe:(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new ZHe,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,o||t)}return this},QHe.prototype.off=function(e,t){return this.removeListener(e,t)},QHe.prototype.removeAllListeners=function(e){var t,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new ZHe,this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=new ZHe:delete n[e]),this;if(0===arguments.length){for(var r,i=Object.keys(n),a=0;a<i.length;++a)"removeListener"!==(r=i[a])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new ZHe,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},QHe.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},QHe.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):nWe.call(e,t)},QHe.prototype.listenerCount=nWe,QHe.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var iWe=Object.freeze({__proto__:null,EventEmitter:QHe,default:QHe}),aWe={},oWe={},sWe={},cWe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mul=Math.imul||function(e,t){var n=65535&e,r=65535&t;return n*r+((e>>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},e.add=function(e,t){return e+t|0},e.sub=function(e,t){return e-t|0},e.rotl=function(e,t){return e<<t|e>>>32-t},e.rotr=function(e,t){return e<<32-t|e>>>t},e.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}}(cWe),Object.defineProperty(sWe,"__esModule",{value:!0});var uWe=cWe;function lWe(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}function dWe(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}function fWe(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function pWe(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function hWe(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function mWe(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function yWe(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function bWe(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function gWe(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),yWe(e/4294967296>>>0,t,n),yWe(e>>>0,t,n+4),t}function vWe(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),bWe(e>>>0,t,n),bWe(e/4294967296>>>0,t,n+4),t}sWe.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},sWe.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},sWe.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},sWe.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},sWe.writeUint16BE=lWe,sWe.writeInt16BE=lWe,sWe.writeUint16LE=dWe,sWe.writeInt16LE=dWe,sWe.readInt32BE=fWe,sWe.readUint32BE=pWe,sWe.readInt32LE=hWe,sWe.readUint32LE=mWe,sWe.writeUint32BE=yWe,sWe.writeInt32BE=yWe,sWe.writeUint32LE=bWe,sWe.writeInt32LE=bWe,sWe.readInt64BE=function(e,t){void 0===t&&(t=0);var n=fWe(e,t),r=fWe(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},sWe.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*pWe(e,t)+pWe(e,t+4)},sWe.readInt64LE=function(e,t){void 0===t&&(t=0);var n=hWe(e,t);return 4294967296*hWe(e,t+4)+n-4294967296*(n>>31)},sWe.readUint64LE=function(e,t){void 0===t&&(t=0);var n=mWe(e,t);return 4294967296*mWe(e,t+4)+n},sWe.writeUint64BE=gWe,sWe.writeInt64BE=gWe,sWe.writeUint64LE=vWe,sWe.writeInt64LE=vWe,sWe.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,a=e/8+n-1;a>=n;a--)r+=t[a]*i,i*=256;return r},sWe.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,a=n;a<n+e/8;a++)r+=t[a]*i,i*=256;return r},sWe.writeUintBE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!uWe.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var i=1,a=e/8+r-1;a>=r;a--)n[a]=t/i&255,i*=256;return n},sWe.writeUintLE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!uWe.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,a=r;a<r+e/8;a++)n[a]=t/i&255,i*=256;return n},sWe.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},sWe.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},sWe.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},sWe.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},sWe.writeFloat32BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e),t},sWe.writeFloat32LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e,!0),t},sWe.writeFloat64BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e),t},sWe.writeFloat64LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e,!0),t};var wWe={};Object.defineProperty(wWe,"__esModule",{value:!0}),wWe.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e},Object.defineProperty(oWe,"__esModule",{value:!0});var TWe=sWe,EWe=wWe,AWe=20;function xWe(e,t,n){for(var r=1634760805,i=857760878,a=2036477234,o=1797285236,s=n[3]<<24|n[2]<<16|n[1]<<8|n[0],c=n[7]<<24|n[6]<<16|n[5]<<8|n[4],u=n[11]<<24|n[10]<<16|n[9]<<8|n[8],l=n[15]<<24|n[14]<<16|n[13]<<8|n[12],d=n[19]<<24|n[18]<<16|n[17]<<8|n[16],f=n[23]<<24|n[22]<<16|n[21]<<8|n[20],p=n[27]<<24|n[26]<<16|n[25]<<8|n[24],h=n[31]<<24|n[30]<<16|n[29]<<8|n[28],m=t[3]<<24|t[2]<<16|t[1]<<8|t[0],y=t[7]<<24|t[6]<<16|t[5]<<8|t[4],b=t[11]<<24|t[10]<<16|t[9]<<8|t[8],g=t[15]<<24|t[14]<<16|t[13]<<8|t[12],v=r,w=i,T=a,E=o,A=s,x=c,O=u,C=l,I=d,S=f,_=p,P=h,k=m,R=y,N=b,M=g,D=0;D<AWe;D+=2)A=(A^=I=I+(k=(k^=v=v+A|0)>>>16|k<<16)|0)>>>20|A<<12,x=(x^=S=S+(R=(R^=w=w+x|0)>>>16|R<<16)|0)>>>20|x<<12,O=(O^=_=_+(N=(N^=T=T+O|0)>>>16|N<<16)|0)>>>20|O<<12,C=(C^=P=P+(M=(M^=E=E+C|0)>>>16|M<<16)|0)>>>20|C<<12,O=(O^=_=_+(N=(N^=T=T+O|0)>>>24|N<<8)|0)>>>25|O<<7,C=(C^=P=P+(M=(M^=E=E+C|0)>>>24|M<<8)|0)>>>25|C<<7,x=(x^=S=S+(R=(R^=w=w+x|0)>>>24|R<<8)|0)>>>25|x<<7,A=(A^=I=I+(k=(k^=v=v+A|0)>>>24|k<<8)|0)>>>25|A<<7,x=(x^=_=_+(M=(M^=v=v+x|0)>>>16|M<<16)|0)>>>20|x<<12,O=(O^=P=P+(k=(k^=w=w+O|0)>>>16|k<<16)|0)>>>20|O<<12,C=(C^=I=I+(R=(R^=T=T+C|0)>>>16|R<<16)|0)>>>20|C<<12,A=(A^=S=S+(N=(N^=E=E+A|0)>>>16|N<<16)|0)>>>20|A<<12,C=(C^=I=I+(R=(R^=T=T+C|0)>>>24|R<<8)|0)>>>25|C<<7,A=(A^=S=S+(N=(N^=E=E+A|0)>>>24|N<<8)|0)>>>25|A<<7,O=(O^=P=P+(k=(k^=w=w+O|0)>>>24|k<<8)|0)>>>25|O<<7,x=(x^=_=_+(M=(M^=v=v+x|0)>>>24|M<<8)|0)>>>25|x<<7;TWe.writeUint32LE(v+r|0,e,0),TWe.writeUint32LE(w+i|0,e,4),TWe.writeUint32LE(T+a|0,e,8),TWe.writeUint32LE(E+o|0,e,12),TWe.writeUint32LE(A+s|0,e,16),TWe.writeUint32LE(x+c|0,e,20),TWe.writeUint32LE(O+u|0,e,24),TWe.writeUint32LE(C+l|0,e,28),TWe.writeUint32LE(I+d|0,e,32),TWe.writeUint32LE(S+f|0,e,36),TWe.writeUint32LE(_+p|0,e,40),TWe.writeUint32LE(P+h|0,e,44),TWe.writeUint32LE(k+m|0,e,48),TWe.writeUint32LE(R+y|0,e,52),TWe.writeUint32LE(N+b|0,e,56),TWe.writeUint32LE(M+g|0,e,60)}function OWe(e,t,n,r,i){if(void 0===i&&(i=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(r.length<n.length)throw new Error("ChaCha: destination is shorter than source");var a,o;if(0===i){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");o=(a=new Uint8Array(16)).length-t.length,a.set(t,o)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");a=t,o=i}for(var s=new Uint8Array(64),c=0;c<n.length;c+=64){xWe(s,a,e);for(var u=c;u<c+64&&u<n.length;u++)r[u]=n[u]^s[u-c];CWe(a,0,o)}return EWe.wipe(s),0===i&&EWe.wipe(a),r}function CWe(e,t,n){for(var r=1;n--;)r=r+(255&e[t])|0,e[t]=255&r,r>>>=8,t++;if(r>0)throw new Error("ChaCha: counter overflow")}oWe.streamXOR=OWe,oWe.stream=function(e,t,n,r){return void 0===r&&(r=0),EWe.wipe(n),OWe(e,t,n,n,r)};var IWe={},SWe={};function _We(e,t){if(e.length!==t.length)return 0;for(var n=0,r=0;r<e.length;r++)n|=e[r]^t[r];return 1&n-1>>>8}Object.defineProperty(SWe,"__esModule",{value:!0}),SWe.select=function(e,t,n){return~(e-1)&t|e-1&n},SWe.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},SWe.compare=_We,SWe.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==_We(e,t)},function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=SWe,n=wWe;e.DIGEST_LENGTH=16;var r=function(){function t(t){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var n=t[0]|t[1]<<8;this._r[0]=8191&n;var r=t[2]|t[3]<<8;this._r[1]=8191&(n>>>13|r<<3);var i=t[4]|t[5]<<8;this._r[2]=7939&(r>>>10|i<<6);var a=t[6]|t[7]<<8;this._r[3]=8191&(i>>>7|a<<9);var o=t[8]|t[9]<<8;this._r[4]=255&(a>>>4|o<<12),this._r[5]=o>>>1&8190;var s=t[10]|t[11]<<8;this._r[6]=8191&(o>>>14|s<<2);var c=t[12]|t[13]<<8;this._r[7]=8065&(s>>>11|c<<5);var u=t[14]|t[15]<<8;this._r[8]=8191&(c>>>8|u<<8),this._r[9]=u>>>5&127,this._pad[0]=t[16]|t[17]<<8,this._pad[1]=t[18]|t[19]<<8,this._pad[2]=t[20]|t[21]<<8,this._pad[3]=t[22]|t[23]<<8,this._pad[4]=t[24]|t[25]<<8,this._pad[5]=t[26]|t[27]<<8,this._pad[6]=t[28]|t[29]<<8,this._pad[7]=t[30]|t[31]<<8}return t.prototype._blocks=function(e,t,n){for(var r=this._fin?0:2048,i=this._h[0],a=this._h[1],o=this._h[2],s=this._h[3],c=this._h[4],u=this._h[5],l=this._h[6],d=this._h[7],f=this._h[8],p=this._h[9],h=this._r[0],m=this._r[1],y=this._r[2],b=this._r[3],g=this._r[4],v=this._r[5],w=this._r[6],T=this._r[7],E=this._r[8],A=this._r[9];n>=16;){var x=e[t+0]|e[t+1]<<8;i+=8191&x;var O=e[t+2]|e[t+3]<<8;a+=8191&(x>>>13|O<<3);var C=e[t+4]|e[t+5]<<8;o+=8191&(O>>>10|C<<6);var I=e[t+6]|e[t+7]<<8;s+=8191&(C>>>7|I<<9);var S=e[t+8]|e[t+9]<<8;c+=8191&(I>>>4|S<<12),u+=S>>>1&8191;var _=e[t+10]|e[t+11]<<8;l+=8191&(S>>>14|_<<2);var P=e[t+12]|e[t+13]<<8;d+=8191&(_>>>11|P<<5);var k=e[t+14]|e[t+15]<<8,R=0,N=R;N+=i*h,N+=a*(5*A),N+=o*(5*E),N+=s*(5*T),R=(N+=c*(5*w))>>>13,N&=8191,N+=u*(5*v),N+=l*(5*g),N+=d*(5*b),N+=(f+=8191&(P>>>8|k<<8))*(5*y);var M=R+=(N+=(p+=k>>>5|r)*(5*m))>>>13;M+=i*m,M+=a*h,M+=o*(5*A),M+=s*(5*E),R=(M+=c*(5*T))>>>13,M&=8191,M+=u*(5*w),M+=l*(5*v),M+=d*(5*g),M+=f*(5*b),R+=(M+=p*(5*y))>>>13,M&=8191;var D=R;D+=i*y,D+=a*m,D+=o*h,D+=s*(5*A),R=(D+=c*(5*E))>>>13,D&=8191,D+=u*(5*T),D+=l*(5*w),D+=d*(5*v),D+=f*(5*g);var L=R+=(D+=p*(5*b))>>>13;L+=i*b,L+=a*y,L+=o*m,L+=s*h,R=(L+=c*(5*A))>>>13,L&=8191,L+=u*(5*E),L+=l*(5*T),L+=d*(5*w),L+=f*(5*v);var F=R+=(L+=p*(5*g))>>>13;F+=i*g,F+=a*b,F+=o*y,F+=s*m,R=(F+=c*h)>>>13,F&=8191,F+=u*(5*A),F+=l*(5*E),F+=d*(5*T),F+=f*(5*w);var B=R+=(F+=p*(5*v))>>>13;B+=i*v,B+=a*g,B+=o*b,B+=s*y,R=(B+=c*m)>>>13,B&=8191,B+=u*h,B+=l*(5*A),B+=d*(5*E),B+=f*(5*T);var j=R+=(B+=p*(5*w))>>>13;j+=i*w,j+=a*v,j+=o*g,j+=s*b,R=(j+=c*y)>>>13,j&=8191,j+=u*m,j+=l*h,j+=d*(5*A),j+=f*(5*E);var U=R+=(j+=p*(5*T))>>>13;U+=i*T,U+=a*w,U+=o*v,U+=s*g,R=(U+=c*b)>>>13,U&=8191,U+=u*y,U+=l*m,U+=d*h,U+=f*(5*A);var z=R+=(U+=p*(5*E))>>>13;z+=i*E,z+=a*T,z+=o*w,z+=s*v,R=(z+=c*g)>>>13,z&=8191,z+=u*b,z+=l*y,z+=d*m,z+=f*h;var H=R+=(z+=p*(5*A))>>>13;H+=i*A,H+=a*E,H+=o*T,H+=s*w,R=(H+=c*v)>>>13,H&=8191,H+=u*g,H+=l*b,H+=d*y,H+=f*m,i=N=8191&(R=(R=((R+=(H+=p*h)>>>13)<<2)+R|0)+(N&=8191)|0),a=M+=R>>>=13,o=D&=8191,s=L&=8191,c=F&=8191,u=B&=8191,l=j&=8191,d=U&=8191,f=z&=8191,p=H&=8191,t+=16,n-=16}this._h[0]=i,this._h[1]=a,this._h[2]=o,this._h[3]=s,this._h[4]=c,this._h[5]=u,this._h[6]=l,this._h[7]=d,this._h[8]=f,this._h[9]=p},t.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,i,a,o=new Uint16Array(10);if(this._leftover){for(a=this._leftover,this._buffer[a++]=1;a<16;a++)this._buffer[a]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,a=2;a<10;a++)this._h[a]+=n,n=this._h[a]>>>13,this._h[a]&=8191;for(this._h[0]+=5*n,n=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=n,n=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=n,o[0]=this._h[0]+5,n=o[0]>>>13,o[0]&=8191,a=1;a<10;a++)o[a]=this._h[a]+n,n=o[a]>>>13,o[a]&=8191;for(o[9]-=8192,r=(1^n)-1,a=0;a<10;a++)o[a]&=r;for(r=~r,a=0;a<10;a++)this._h[a]=this._h[a]&r|o[a];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,a=1;a<8;a++)i=(this._h[a]+this._pad[a]|0)+(i>>>16)|0,this._h[a]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(e){var t,n=0,r=e.length;if(this._leftover){(t=16-this._leftover)>r&&(t=r);for(var i=0;i<t;i++)this._buffer[this._leftover+i]=e[n+i];if(r-=t,n+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(r>=16&&(t=r-r%16,this._blocks(e,n,t),n+=t,r-=t),r){for(i=0;i<r;i++)this._buffer[this._leftover+i]=e[n+i];this._leftover+=r}return this},t.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},t.prototype.clean=function(){return n.wipe(this._buffer),n.wipe(this._r),n.wipe(this._h),n.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},t}();e.Poly1305=r,e.oneTimeAuth=function(e,t){var n=new r(e);n.update(t);var i=n.digest();return n.clean(),i},e.equal=function(n,r){return n.length===e.DIGEST_LENGTH&&r.length===e.DIGEST_LENGTH&&t.equal(n,r)}}(IWe),function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=oWe,n=IWe,r=wWe,i=sWe,a=SWe;e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var o=new Uint8Array(16),s=function(){function s(t){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,t.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(t)}return s.prototype.seal=function(e,n,i,a){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var o=new Uint8Array(16);o.set(e,o.length-e.length);var s=new Uint8Array(32);t.stream(this._key,o,s,4);var c,u=n.length+this.tagLength;if(a){if(a.length!==u)throw new Error("ChaCha20Poly1305: incorrect destination length");c=a}else c=new Uint8Array(u);return t.streamXOR(this._key,o,n,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),s,c.subarray(0,c.length-this.tagLength),i),r.wipe(o),c},s.prototype.open=function(e,n,i,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(n.length<this.tagLength)return null;var s=new Uint8Array(16);s.set(e,s.length-e.length);var c=new Uint8Array(32);t.stream(this._key,s,c,4);var u=new Uint8Array(this.tagLength);if(this._authenticate(u,c,n.subarray(0,n.length-this.tagLength),i),!a.equal(u,n.subarray(n.length-this.tagLength,n.length)))return null;var l,d=n.length-this.tagLength;if(o){if(o.length!==d)throw new Error("ChaCha20Poly1305: incorrect destination length");l=o}else l=new Uint8Array(d);return t.streamXOR(this._key,s,n.subarray(0,n.length-this.tagLength),l,4),r.wipe(s),l},s.prototype.clean=function(){return r.wipe(this._key),this},s.prototype._authenticate=function(e,t,a,s){var c=new n.Poly1305(t);s&&(c.update(s),s.length%16>0&&c.update(o.subarray(s.length%16))),c.update(a),a.length%16>0&&c.update(o.subarray(a.length%16));var u=new Uint8Array(8);s&&i.writeUint64LE(s.length,u),c.update(u),i.writeUint64LE(a.length,u),c.update(u);for(var l=c.digest(),d=0;d<l.length;d++)e[d]=l[d];c.clean(),r.wipe(l),r.wipe(u)},s}();e.ChaCha20Poly1305=s}(aWe);var PWe={},kWe={},RWe={};Object.defineProperty(RWe,"__esModule",{value:!0}),RWe.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState},Object.defineProperty(kWe,"__esModule",{value:!0});var NWe=RWe,MWe=SWe,DWe=wWe,LWe=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var r=0;r<n.length;r++)n[r]^=54;this._inner.update(n);for(r=0;r<n.length;r++)n[r]^=106;this._outer.update(n),NWe.isSerializableHash(this._inner)&&NWe.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),DWe.wipe(n)}return e.prototype.reset=function(){if(!NWe.isSerializableHash(this._inner)||!NWe.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){NWe.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),NWe.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!NWe.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!NWe.isSerializableHash(this._inner)||!NWe.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!NWe.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();kWe.HMAC=LWe,kWe.hmac=function(e,t,n){var r=new LWe(e,t);r.update(n);var i=r.digest();return r.clean(),i},kWe.equal=MWe.equal,Object.defineProperty(PWe,"__esModule",{value:!0});var FWe=kWe,BWe=wWe,jWe=function(){function e(e,t,n,r){void 0===n&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=r;var i=FWe.hmac(this._hash,n,t);this._hmac=new FWe.HMAC(e,i),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;n<t.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[n]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),BWe.wipe(this._buffer),BWe.wipe(this._counter),this._bufpos=0},e}(),UWe=PWe.HKDF=jWe,zWe={},HWe={},WWe={};Object.defineProperty(WWe,"__esModule",{value:!0}),WWe.BrowserRandomSource=void 0;WWe.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let e=0;e<t.length;e+=65536)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,65536)));return t}};var VWe={};Object.defineProperty(VWe,"__esModule",{value:!0}),VWe.NodeRandomSource=void 0;const GWe=wWe;VWe.NodeRandomSource=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,void 0!==zK){const e=VK;e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let e=0;e<n.length;e++)n[e]=t[e];return(0,GWe.wipe)(t),n}},Object.defineProperty(HWe,"__esModule",{value:!0}),HWe.SystemRandomSource=void 0;const qWe=WWe,KWe=VWe;HWe.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new qWe.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new KWe.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const t=HWe,n=sWe,r=wWe;function i(t,n=e.defaultRandomSource){return n.randomBytes(t)}e.defaultRandomSource=new t.SystemRandomSource,e.randomBytes=i,e.randomUint32=function(t=e.defaultRandomSource){const a=i(4,t),o=(0,n.readUint32LE)(a);return(0,r.wipe)(a),o};const a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function o(t,n=a,o=e.defaultRandomSource){if(n.length<2)throw new Error("randomString charset is too short");if(n.length>256)throw new Error("randomString charset is too long");let s="";const c=n.length,u=256-256%c;for(;t>0;){const e=i(Math.ceil(256*t/u),o);for(let r=0;r<e.length&&t>0;r++){const i=e[r];i<u&&(s+=n.charAt(i%c),t--)}(0,r.wipe)(e)}return s}e.randomString=o,e.randomStringForEntropy=function(t,n=a,r=e.defaultRandomSource){return o(Math.ceil(t/(Math.log(n.length)/Math.LN2)),n,r)}}(zWe);var XWe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=sWe,n=wWe;e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var r=function(){function r(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return r.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},r.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},r.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._temp),this.reset()},r.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(a(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=a(this._temp,this._state,e,n,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[n++],t--;return this},r.prototype.finish=function(e){if(!this._finished){var n=this._bytesHashed,r=this._bufferLength,i=n/536870912|0,o=n<<3,s=n%64<56?64:128;this._buffer[r]=128;for(var c=r+1;c<s-8;c++)this._buffer[c]=0;t.writeUint32BE(i,this._buffer,s-8),t.writeUint32BE(o,this._buffer,s-4),a(this._temp,this._state,this._buffer,0,s),this._finished=!0}for(c=0;c<this.digestLength/4;c++)t.writeUint32BE(this._state[c],e,4*c);return this},r.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},r.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},r.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},r.prototype.cleanSavedState=function(e){n.wipe(e.state),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},r}();e.SHA256=r;var i=new Int32Array([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 a(e,n,r,a,o){for(;o>=64;){for(var s=n[0],c=n[1],u=n[2],l=n[3],d=n[4],f=n[5],p=n[6],h=n[7],m=0;m<16;m++){var y=a+4*m;e[m]=t.readUint32BE(r,y)}for(m=16;m<64;m++){var b=e[m-2],g=(b>>>17|b<<15)^(b>>>19|b<<13)^b>>>10,v=((b=e[m-15])>>>7|b<<25)^(b>>>18|b<<14)^b>>>3;e[m]=(g+e[m-7]|0)+(v+e[m-16]|0)}for(m=0;m<64;m++){g=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&f^~d&p)|0)+(h+(i[m]+e[m]|0)|0)|0,v=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&c^s&u^c&u)|0;h=p,p=f,f=d,d=l+g|0,l=u,u=c,c=s,s=g+v|0}n[0]+=s,n[1]+=c,n[2]+=u,n[3]+=l,n[4]+=d,n[5]+=f,n[6]+=p,n[7]+=h,a+=64,o-=64}return a}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}}(XWe);var YWe={};function JWe(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function ZWe(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?JWe(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function QWe(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const n=ZWe(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return JWe(n)}!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;const t=zWe,n=wWe;function r(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;const i=new Uint8Array(32);i[0]=9;const a=r([56129,1]);function o(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function s(e,t,n){const r=~(n-1);for(let n=0;n<16;n++){const i=r&(e[n]^t[n]);e[n]^=i,t[n]^=i}}function c(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function u(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function l(e,t,n){let r,i,a=0,o=0,s=0,c=0,u=0,l=0,d=0,f=0,p=0,h=0,m=0,y=0,b=0,g=0,v=0,w=0,T=0,E=0,A=0,x=0,O=0,C=0,I=0,S=0,_=0,P=0,k=0,R=0,N=0,M=0,D=0,L=n[0],F=n[1],B=n[2],j=n[3],U=n[4],z=n[5],H=n[6],W=n[7],V=n[8],G=n[9],q=n[10],K=n[11],X=n[12],Y=n[13],J=n[14],Z=n[15];r=t[0],a+=r*L,o+=r*F,s+=r*B,c+=r*j,u+=r*U,l+=r*z,d+=r*H,f+=r*W,p+=r*V,h+=r*G,m+=r*q,y+=r*K,b+=r*X,g+=r*Y,v+=r*J,w+=r*Z,r=t[1],o+=r*L,s+=r*F,c+=r*B,u+=r*j,l+=r*U,d+=r*z,f+=r*H,p+=r*W,h+=r*V,m+=r*G,y+=r*q,b+=r*K,g+=r*X,v+=r*Y,w+=r*J,T+=r*Z,r=t[2],s+=r*L,c+=r*F,u+=r*B,l+=r*j,d+=r*U,f+=r*z,p+=r*H,h+=r*W,m+=r*V,y+=r*G,b+=r*q,g+=r*K,v+=r*X,w+=r*Y,T+=r*J,E+=r*Z,r=t[3],c+=r*L,u+=r*F,l+=r*B,d+=r*j,f+=r*U,p+=r*z,h+=r*H,m+=r*W,y+=r*V,b+=r*G,g+=r*q,v+=r*K,w+=r*X,T+=r*Y,E+=r*J,A+=r*Z,r=t[4],u+=r*L,l+=r*F,d+=r*B,f+=r*j,p+=r*U,h+=r*z,m+=r*H,y+=r*W,b+=r*V,g+=r*G,v+=r*q,w+=r*K,T+=r*X,E+=r*Y,A+=r*J,x+=r*Z,r=t[5],l+=r*L,d+=r*F,f+=r*B,p+=r*j,h+=r*U,m+=r*z,y+=r*H,b+=r*W,g+=r*V,v+=r*G,w+=r*q,T+=r*K,E+=r*X,A+=r*Y,x+=r*J,O+=r*Z,r=t[6],d+=r*L,f+=r*F,p+=r*B,h+=r*j,m+=r*U,y+=r*z,b+=r*H,g+=r*W,v+=r*V,w+=r*G,T+=r*q,E+=r*K,A+=r*X,x+=r*Y,O+=r*J,C+=r*Z,r=t[7],f+=r*L,p+=r*F,h+=r*B,m+=r*j,y+=r*U,b+=r*z,g+=r*H,v+=r*W,w+=r*V,T+=r*G,E+=r*q,A+=r*K,x+=r*X,O+=r*Y,C+=r*J,I+=r*Z,r=t[8],p+=r*L,h+=r*F,m+=r*B,y+=r*j,b+=r*U,g+=r*z,v+=r*H,w+=r*W,T+=r*V,E+=r*G,A+=r*q,x+=r*K,O+=r*X,C+=r*Y,I+=r*J,S+=r*Z,r=t[9],h+=r*L,m+=r*F,y+=r*B,b+=r*j,g+=r*U,v+=r*z,w+=r*H,T+=r*W,E+=r*V,A+=r*G,x+=r*q,O+=r*K,C+=r*X,I+=r*Y,S+=r*J,_+=r*Z,r=t[10],m+=r*L,y+=r*F,b+=r*B,g+=r*j,v+=r*U,w+=r*z,T+=r*H,E+=r*W,A+=r*V,x+=r*G,O+=r*q,C+=r*K,I+=r*X,S+=r*Y,_+=r*J,P+=r*Z,r=t[11],y+=r*L,b+=r*F,g+=r*B,v+=r*j,w+=r*U,T+=r*z,E+=r*H,A+=r*W,x+=r*V,O+=r*G,C+=r*q,I+=r*K,S+=r*X,_+=r*Y,P+=r*J,k+=r*Z,r=t[12],b+=r*L,g+=r*F,v+=r*B,w+=r*j,T+=r*U,E+=r*z,A+=r*H,x+=r*W,O+=r*V,C+=r*G,I+=r*q,S+=r*K,_+=r*X,P+=r*Y,k+=r*J,R+=r*Z,r=t[13],g+=r*L,v+=r*F,w+=r*B,T+=r*j,E+=r*U,A+=r*z,x+=r*H,O+=r*W,C+=r*V,I+=r*G,S+=r*q,_+=r*K,P+=r*X,k+=r*Y,R+=r*J,N+=r*Z,r=t[14],v+=r*L,w+=r*F,T+=r*B,E+=r*j,A+=r*U,x+=r*z,O+=r*H,C+=r*W,I+=r*V,S+=r*G,_+=r*q,P+=r*K,k+=r*X,R+=r*Y,N+=r*J,M+=r*Z,r=t[15],w+=r*L,T+=r*F,E+=r*B,A+=r*j,x+=r*U,O+=r*z,C+=r*H,I+=r*W,S+=r*V,_+=r*G,P+=r*q,k+=r*K,R+=r*X,N+=r*Y,M+=r*J,D+=r*Z,a+=38*T,o+=38*E,s+=38*A,c+=38*x,u+=38*O,l+=38*C,d+=38*I,f+=38*S,p+=38*_,h+=38*P,m+=38*k,y+=38*R,b+=38*N,g+=38*M,v+=38*D,i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,a+=i-1+37*(i-1),i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=c,e[4]=u,e[5]=l,e[6]=d,e[7]=f,e[8]=p,e[9]=h,e[10]=m,e[11]=y,e[12]=b,e[13]=g,e[14]=v,e[15]=w}function d(e,t){l(e,t,t)}function f(e,t){const n=new Uint8Array(32),i=new Float64Array(80),f=r(),p=r(),h=r(),m=r(),y=r(),b=r();for(let t=0;t<31;t++)n[t]=e[t];n[31]=127&e[31]|64,n[0]&=248,function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(i,t);for(let e=0;e<16;e++)p[e]=i[e];f[0]=m[0]=1;for(let e=254;e>=0;--e){const t=n[e>>>3]>>>(7&e)&1;s(f,p,t),s(h,m,t),c(y,f,h),u(f,f,h),c(h,p,m),u(p,p,m),d(m,y),d(b,f),l(f,h,f),l(h,p,y),c(y,f,h),u(f,f,h),d(p,f),u(h,m,b),l(f,h,a),c(f,f,m),l(h,h,f),l(f,m,b),l(m,p,i),d(p,y),s(f,p,t),s(h,m,t)}for(let e=0;e<16;e++)i[e+16]=f[e],i[e+32]=h[e],i[e+48]=p[e],i[e+64]=m[e];const g=i.subarray(32),v=i.subarray(16);!function(e,t){const n=r();for(let e=0;e<16;e++)n[e]=t[e];for(let e=253;e>=0;e--)d(n,n),2!==e&&4!==e&&l(n,n,t);for(let t=0;t<16;t++)e[t]=n[t]}(g,g),l(v,v,g);const w=new Uint8Array(32);return function(e,t){const n=r(),i=r();for(let e=0;e<16;e++)i[e]=t[e];o(i),o(i),o(i);for(let e=0;e<2;e++){n[0]=i[0]-65517;for(let e=1;e<15;e++)n[e]=i[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=i[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,s(i,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&i[t],e[2*t+1]=i[t]>>8}(w,v),w}function p(e){return f(e,i)}function h(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const n=new Uint8Array(t);return{publicKey:p(n),secretKey:n}}e.scalarMult=f,e.scalarMultBase=p,e.generateKeyPairFromSeed=h,e.generateKeyPair=function(e){const r=(0,t.randomBytes)(32,e),i=h(r);return(0,n.wipe)(r),i},e.sharedKey=function(t,n,r=!1){if(t.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(n.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const i=f(t,n);if(r){let e=0;for(let t=0;t<i.length;t++)e|=i[t];if(0===e)throw new Error("X25519: invalid shared key")}return i}}(YWe);var $We=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var a=e.charAt(i),o=a.charCodeAt(0);if(255!==n[o])throw new TypeError(a+" is ambiguous");n[o]=i}var s=e.length,c=e.charAt(0),u=Math.log(s)/Math.log(256),l=Math.log(256)/Math.log(s);function d(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===c;)r++,t++;for(var a=(e.length-t)*u+1>>>0,o=new Uint8Array(a);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var d=0,f=a-1;(0!==l||d<i)&&-1!==f;f--,d++)l+=s*o[f]>>>0,o[f]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var p=a-i;p!==a&&0===o[p];)p++;for(var h=new Uint8Array(r+(a-p)),m=r;p!==a;)h[m++]=o[p++];return h}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,a=t.length;i!==a&&0===t[i];)i++,n++;for(var o=(a-i)*l+1>>>0,u=new Uint8Array(o);i!==a;){for(var d=t[i],f=0,p=o-1;(0!==d||f<r)&&-1!==p;p--,f++)d+=256*u[p]>>>0,u[p]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");r=f,i++}for(var h=o-r;h!==o&&0===u[h];)h++;for(var m=c.repeat(n);h<o;++h)m+=e.charAt(u[h]);return m},decodeUnsafe:d,decode:function(e){var n=d(e);if(n)return n;throw new Error(`Non-${t} character`)}}},eVe=$We;class tVe{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class nVe{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return iVe(this,e)}}class rVe{constructor(e){this.decoders=e}or(e){return iVe(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const iVe=(e,t)=>new rVe({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class aVe{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new tVe(e,t,n),this.decoder=new nVe(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const oVe=({name:e,prefix:t,encode:n,decode:r})=>new aVe(e,t,n,r),sVe=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=eVe(n,t);return oVe({prefix:e,name:t,encode:r,decode:e=>(e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")})(i(e))})},cVe=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>oVe({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let a="",o=0,s=0;for(let r=0;r<e.length;++r)for(s=s<<8|e[r],o+=8;o>n;)o-=n,a+=t[i&s>>o];if(o&&(a+=t[i&s<<n-o]),r)for(;a.length*n&7;)a+="=";return a})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let a=e.length;for(;"="===e[a-1];)--a;const o=new Uint8Array(a*n/8|0);let s=0,c=0,u=0;for(let t=0;t<a;++t){const a=i[e[t]];if(void 0===a)throw new SyntaxError(`Non-${r} character`);c=c<<n|a,s+=n,s>=8&&(s-=8,o[u++]=255&c>>s)}if(s>=n||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return o})(t,r,n,e)}),uVe=oVe({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var lVe=Object.freeze({__proto__:null,identity:uVe});const dVe=cVe({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var fVe=Object.freeze({__proto__:null,base2:dVe});const pVe=cVe({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var hVe=Object.freeze({__proto__:null,base8:pVe});const mVe=sVe({prefix:"9",name:"base10",alphabet:"0123456789"});var yVe=Object.freeze({__proto__:null,base10:mVe});const bVe=cVe({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),gVe=cVe({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var vVe=Object.freeze({__proto__:null,base16:bVe,base16upper:gVe});const wVe=cVe({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),TVe=cVe({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),EVe=cVe({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),AVe=cVe({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),xVe=cVe({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),OVe=cVe({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),CVe=cVe({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),IVe=cVe({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),SVe=cVe({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var _Ve=Object.freeze({__proto__:null,base32:wVe,base32hex:xVe,base32hexpad:CVe,base32hexpadupper:IVe,base32hexupper:OVe,base32pad:EVe,base32padupper:AVe,base32upper:TVe,base32z:SVe});const PVe=sVe({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),kVe=sVe({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var RVe=Object.freeze({__proto__:null,base36:PVe,base36upper:kVe});const NVe=sVe({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),MVe=sVe({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var DVe=Object.freeze({__proto__:null,base58btc:NVe,base58flickr:MVe});const LVe=cVe({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),FVe=cVe({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),BVe=cVe({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),jVe=cVe({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var UVe=Object.freeze({__proto__:null,base64:LVe,base64pad:FVe,base64url:BVe,base64urlpad:jVe});const zVe=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),HVe=zVe.reduce(((e,t,n)=>(e[n]=t,e)),[]),WVe=zVe.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const VVe=oVe({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=HVe[t]),"")},decode:function(e){const t=[];for(const n of e){const e=WVe[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var GVe=Object.freeze({__proto__:null,base256emoji:VVe});new TextEncoder,new TextDecoder;const qVe={...lVe,...fVe,...hVe,...yVe,...vVe,..._Ve,...RVe,...DVe,...UVe,...GVe};function KVe(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const XVe=KVe("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),YVe=KVe("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{const t=ZWe((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),JVe={utf8:XVe,"utf-8":XVe,hex:qVe.base16,latin1:YVe,ascii:YVe,binary:YVe,...qVe};function ZVe(e,t="utf8"){const n=JVe[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${e}`):JWe(globalThis.Buffer.from(e,"utf-8"))}function QVe(e,t="utf8"){const n=JVe[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.encoder.encode(e).substring(1):globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}var $Ve=window&&window.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},eGe=function(e,t,n){this.name=e,this.version=t,this.os=n,this.type="browser"},tGe=function(e){this.version=e,this.type="node",this.name="node",this.os=process.platform},nGe=function(e,t,n,r){this.name=e,this.version=t,this.os=n,this.bot=r,this.type="bot-device"},rGe=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},iGe=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},aGe=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,oGe=3,sGe=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],cGe=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function uGe(e){return e?lGe(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new iGe:"undefined"!=typeof navigator?lGe(navigator.userAgent):function(){var e="undefined"!=typeof process&&process.version;return e?new tGe(process.version.slice(1)):null}()}function lGe(e){var t=function(e){return""!==e&&sGe.reduce((function(t,n){var r=n[0],i=n[1];if(t)return t;var a=i.exec(e);return!!a&&[r,a]}),!1)}(e);if(!t)return null;var n=t[0],r=t[1];if("searchbot"===n)return new rGe;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length<oGe&&(i=$Ve($Ve([],i,!0),function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(oGe-i.length),!0)):i=[];var a=i.join("."),o=function(e){for(var t=0,n=cGe.length;t<n;t++){var r=cGe[t],i=r[0];if(r[1].exec(e))return i}return null}(e),s=aGe.exec(e);return s&&s[1]?new nGe(n,a,o,s[1]):new eGe(n,a,o)}var dGe,fGe={},pGe={},hGe={};var mGe,yGe={},bGe={},gGe={};var vGe,wGe,TGe,EGe,AGe={};function xGe(){return wGe||(wGe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=YD;t.__exportStar((mGe||(mGe=1,Object.defineProperty(gGe,"__esModule",{value:!0}),gGe.ONE_THOUSAND=gGe.ONE_HUNDRED=void 0,gGe.ONE_HUNDRED=100,gGe.ONE_THOUSAND=1e3),gGe),e),t.__exportStar((vGe||(vGe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_YEAR=e.FOUR_WEEKS=e.THREE_WEEKS=e.TWO_WEEKS=e.ONE_WEEK=e.THIRTY_DAYS=e.SEVEN_DAYS=e.FIVE_DAYS=e.THREE_DAYS=e.ONE_DAY=e.TWENTY_FOUR_HOURS=e.TWELVE_HOURS=e.SIX_HOURS=e.THREE_HOURS=e.ONE_HOUR=e.SIXTY_MINUTES=e.THIRTY_MINUTES=e.TEN_MINUTES=e.FIVE_MINUTES=e.ONE_MINUTE=e.SIXTY_SECONDS=e.THIRTY_SECONDS=e.TEN_SECONDS=e.FIVE_SECONDS=e.ONE_SECOND=void 0,e.ONE_SECOND=1,e.FIVE_SECONDS=5,e.TEN_SECONDS=10,e.THIRTY_SECONDS=30,e.SIXTY_SECONDS=60,e.ONE_MINUTE=e.SIXTY_SECONDS,e.FIVE_MINUTES=5*e.ONE_MINUTE,e.TEN_MINUTES=10*e.ONE_MINUTE,e.THIRTY_MINUTES=30*e.ONE_MINUTE,e.SIXTY_MINUTES=60*e.ONE_MINUTE,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=3*e.ONE_HOUR,e.SIX_HOURS=6*e.ONE_HOUR,e.TWELVE_HOURS=12*e.ONE_HOUR,e.TWENTY_FOUR_HOURS=24*e.ONE_HOUR,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=3*e.ONE_DAY,e.FIVE_DAYS=5*e.ONE_DAY,e.SEVEN_DAYS=7*e.ONE_DAY,e.THIRTY_DAYS=30*e.ONE_DAY,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=2*e.ONE_WEEK,e.THREE_WEEKS=3*e.ONE_WEEK,e.FOUR_WEEKS=4*e.ONE_WEEK,e.ONE_YEAR=365*e.ONE_DAY}(AGe)),AGe),e)}(bGe)),bGe}function OGe(){return EGe||(EGe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=YD;t.__exportStar((dGe||(dGe=1,Object.defineProperty(hGe,"__esModule",{value:!0}),hGe.delay=void 0,hGe.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}),hGe),e),t.__exportStar(function(){if(TGe)return yGe;TGe=1,Object.defineProperty(yGe,"__esModule",{value:!0}),yGe.fromMiliseconds=yGe.toMiliseconds=void 0;const e=xGe();return yGe.toMiliseconds=function(t){return t*e.ONE_THOUSAND},yGe.fromMiliseconds=function(t){return Math.floor(t/e.ONE_THOUSAND)},yGe}(),e)}(pGe)),pGe}var CGe,IGe={};var SGe,_Ge,PGe={},kGe={};function RGe(){return _Ge||(_Ge=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});YD.__exportStar((SGe||(SGe=1,Object.defineProperty(kGe,"__esModule",{value:!0}),kGe.IWatch=void 0,kGe.IWatch=class{}),kGe),e)}(PGe)),PGe}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=YD;t.__exportStar(OGe(),e),t.__exportStar(function(){if(CGe)return IGe;CGe=1,Object.defineProperty(IGe,"__esModule",{value:!0}),IGe.Watch=void 0;class e{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if(void 0!==t.elapsed)throw new Error(`Watch already stopped for label: ${e}`);const n=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:n})}get(e){const t=this.timestamps.get(e);if(void 0===t)throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}return IGe.Watch=e,IGe.default=e,IGe}(),e),t.__exportStar(RGe(),e),t.__exportStar(xGe(),e)}(fGe);var NGe={};function MGe(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function DGe(e){const t=MGe(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(NGe,"__esModule",{value:!0}),NGe.getLocalStorage=NGe.getLocalStorageOrThrow=NGe.getCrypto=NGe.getCryptoOrThrow=BGe=NGe.getLocation=NGe.getLocationOrThrow=FGe=NGe.getNavigator=NGe.getNavigatorOrThrow=LGe=NGe.getDocument=NGe.getDocumentOrThrow=NGe.getFromWindowOrThrow=NGe.getFromWindow=void 0,NGe.getFromWindow=MGe,NGe.getFromWindowOrThrow=DGe,NGe.getDocumentOrThrow=function(){return DGe("document")};var LGe=NGe.getDocument=function(){return MGe("document")};NGe.getNavigatorOrThrow=function(){return DGe("navigator")};var FGe=NGe.getNavigator=function(){return MGe("navigator")};NGe.getLocationOrThrow=function(){return DGe("location")};var BGe=NGe.getLocation=function(){return MGe("location")};NGe.getCryptoOrThrow=function(){return DGe("crypto")},NGe.getCrypto=function(){return MGe("crypto")},NGe.getLocalStorageOrThrow=function(){return DGe("localStorage")},NGe.getLocalStorage=function(){return MGe("localStorage")};var jGe={};Object.defineProperty(jGe,"__esModule",{value:!0});var UGe=jGe.getWindowMetadata=void 0;const zGe=NGe;UGe=jGe.getWindowMetadata=function(){let e,t;try{e=zGe.getDocumentOrThrow(),t=zGe.getLocationOrThrow()}catch(e){return null}function n(...t){const n=e.getElementsByTagName("meta");for(let e=0;e<n.length;e++){const r=n[e],i=["itemprop","property","name"].map((e=>r.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(i.length&&i){const e=r.getAttribute("content");if(e)return e}}return""}const r=function(){let t=n("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}(),i=n("description","og:description","twitter:description","keywords"),a=t.origin,o=function(){const n=e.getElementsByTagName("link"),r=[];for(let e=0;e<n.length;e++){const i=n[e],a=i.getAttribute("rel");if(a&&a.toLowerCase().indexOf("icon")>-1){const e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let n=t.protocol+"//"+t.host;if(0===e.indexOf("/"))n+=e;else{const r=t.pathname.split("/");r.pop();n+=r.join("/")+"/"+e}r.push(n)}else if(0===e.indexOf("//")){const n=t.protocol+e;r.push(n)}else r.push(e)}}return r}();return{description:i,url:a,icons:o,name:r}};var HGe={},WGe=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),VGe="%[a-f0-9]{2}",GGe=new RegExp("("+VGe+")|([^%]+?)","gi"),qGe=new RegExp("("+VGe+")+","gi");function KGe(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],KGe(n),KGe(r))}function XGe(e){try{return decodeURIComponent(e)}catch(r){for(var t=e.match(GGe)||[],n=1;n<t.length;n++)t=(e=KGe(t,n).join("")).match(GGe)||[];return e}}var YGe=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=qGe.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=XGe(n[0]);r!==n[0]&&(t[n[0]]=r)}n=qGe.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),a=0;a<i.length;a++){var o=i[a];e=e.replace(new RegExp(o,"g"),t[o])}return e}(e)}},JGe=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]},ZGe=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),a=0;a<r.length;a++){var o=r[a],s=e[o];(i?-1!==t.indexOf(o):t(o,s,e))&&(n[o]=s)}return n};!function(e){const t=WGe,n=YGe,r=JGe,i=ZGe,a=Symbol("encodeFragmentIdentifier");function o(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function s(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function c(e,t){return t.decode?n(e):e}function u(e){return Array.isArray(e)?e.sort():"object"==typeof e?u(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function d(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function f(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function p(e,t){o((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"==typeof n&&n.includes(e.arrayFormatSeparator),a="string"==typeof n&&!i&&c(n,e).includes(e.arrayFormatSeparator);n=a?c(n,e):n;const o=i||a?n.split(e.arrayFormatSeparator).map((t=>c(t,e))):null===n?n:c(n,e);r[t]=o};case"bracket-separator":return(t,n,r)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n?c(n,e):n);const a=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>c(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],a):r[t]=a};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),i=Object.create(null);if("string"!=typeof e)return i;if(!(e=e.trim().replace(/^[?#&]/,"")))return i;for(const a of e.split("&")){if(""===a)continue;let[e,o]=r(t.decode?a.replace(/\+/g," "):a,"=");o=void 0===o?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?o:c(o,t),n(c(e,t),o,i)}for(const e of Object.keys(i)){const n=i[e];if("object"==typeof n&&null!==n)for(const e of Object.keys(n))n[e]=f(n[e],t);else i[e]=f(n,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{const n=i[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=u(n):e[t]=n,e}),Object.create(null))}e.extract=d,e.parse=p,e.stringify=(e,t)=>{if(!e)return"";o((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&null==e[n]||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[s(t,e),"[",i,"]"].join("")]:[...n,[s(t,e),"[",s(i,e),"]=",s(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[s(t,e),"[]"].join("")]:[...n,[s(t,e),"[]=",s(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[s(t,e),":list="].join("")]:[...n,[s(t,e),":list=",s(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[s(n,e),t,s(i,e)].join("")]:[[r,s(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,s(t,e)]:[...n,[s(t,e),"=",s(r,e)].join("")]}}(t),i={};for(const t of Object.keys(e))n(t)||(i[t]=e[t]);const a=Object.keys(i);return!1!==t.sort&&a.sort(t.sort),a.map((n=>{const i=e[n];return void 0===i?"":null===i?s(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?s(n,t)+"[]":i.reduce(r(n),[]).join("&"):s(n,t)+"="+s(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,i]=r(e,"#");return Object.assign({url:n.split("?")[0]||"",query:p(d(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:c(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[a]:!0},n);const r=l(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),c=Object.assign(o,t.query);let u=e.stringify(c,n);u&&(u=`?${u}`);let d=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(t.url);return t.fragmentIdentifier&&(d=`#${n[a]?s(t.fragmentIdentifier,n):t.fragmentIdentifier}`),`${r}${u}${d}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[a]:!1},r);const{url:o,query:s,fragmentIdentifier:c}=e.parseUrl(t,r);return e.stringifyUrl({url:o,query:i(s,n),fragmentIdentifier:c},r)},e.exclude=(t,n,r)=>{const i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return e.pick(t,i,r)}}(HGe);const QGe={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}},$Ge=":";function eqe(e,t){return e.includes(":")?[e]:t.chains||[]}const tqe="base10",nqe="base16",rqe="base64pad",iqe="utf8",aqe=0,oqe=1,sqe=0,cqe=1,uqe=12,lqe=32;function dqe(){return QVe(zWe.randomBytes(lqe),nqe)}function fqe(e){return QVe(XWe.hash(ZVe(e,iqe)),nqe)}function pqe(e){return Number(QVe(e,tqe))}function hqe(e){const t=function(e){return ZVe(`${e}`,tqe)}(typeof e.type<"u"?e.type:aqe);if(pqe(t)===oqe&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof e.senderPublicKey<"u"?ZVe(e.senderPublicKey,nqe):void 0,r=typeof e.iv<"u"?ZVe(e.iv,nqe):zWe.randomBytes(uqe);return function(e){if(pqe(e.type)===oqe){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return QVe(QWe([e.type,e.senderPublicKey,e.iv,e.sealed]),rqe)}return QVe(QWe([e.type,e.iv,e.sealed]),rqe)}({type:t,sealed:new aWe.ChaCha20Poly1305(ZVe(e.symKey,nqe)).seal(r,ZVe(e.message,iqe)),iv:r,senderPublicKey:n})}function mqe(e){const t=ZVe(e,rqe),n=t.slice(sqe,cqe),r=cqe;if(pqe(n)===oqe){const e=r+lqe,i=e+uqe,a=t.slice(r,e),o=t.slice(e,i);return{type:n,sealed:t.slice(i),iv:o,senderPublicKey:a}}const i=r+uqe,a=t.slice(r,i);return{type:n,sealed:t.slice(i),iv:a}}function yqe(e){const t=e?.type||aqe;if(t===oqe){if(typeof e?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function bqe(e){return e.type===oqe&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var gqe=Object.defineProperty,vqe=Object.getOwnPropertySymbols,wqe=Object.prototype.hasOwnProperty,Tqe=Object.prototype.propertyIsEnumerable,Eqe=(e,t,n)=>t in e?gqe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Aqe=(e,t)=>{for(var n in t||(t={}))wqe.call(t,n)&&Eqe(e,n,t[n]);if(vqe)for(var n of vqe(t))Tqe.call(t,n)&&Eqe(e,n,t[n]);return e};const xqe="ReactNative",Oqe={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},Cqe="js";function Iqe(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function Sqe(){return!LGe()&&!!FGe()&&navigator.product===xqe}function _qe(){return!Iqe()&&!!FGe()&&!!LGe()}function Pqe(){return Sqe()?Oqe.reactNative:Iqe()?Oqe.node:_qe()?Oqe.browser:Oqe.unknown}function kqe(e,t,n){const r=function(){if(Pqe()===Oqe.reactNative&&typeof global<"u"&&typeof(null==global?void 0:global.Platform)<"u"){const{OS:e,Version:t}=global.Platform;return[e,t].join("-")}const e=uGe();if(null===e)return"unknown";const t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return"browser"===e.type?[t,e.name,e.version].join("-"):[t,e.version].join("-")}(),i=function(){var e;const t=Pqe();return t===Oqe.browser?[t,(null==(e=BGe())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),[Cqe,n].join("-"),r,i].join("/")}function Rqe({protocol:e,version:t,relayUrl:n,sdkVersion:r,auth:i,projectId:a,useOnCloseEvent:o,bundleId:s}){const c=n.split("?"),u={auth:i,ua:kqe(e,t,r),projectId:a,useOnCloseEvent:o||void 0,origin:s||void 0},l=function(e,t){let n=HGe.parse(e);return n=Aqe(Aqe({},n),t),HGe.stringify(n)}(c[1]||"",u);return c[0]+"?"+l}function Nqe(e,t){return e.filter((e=>t.includes(e))).length===e.length}function Mqe(e){return Object.fromEntries(e.entries())}function Dqe(e){return new Map(Object.entries(e))}function Lqe(e=fGe.FIVE_MINUTES,t){const n=fGe.toMiliseconds(e||fGe.FIVE_MINUTES);let r,i,a;return{resolve:e=>{a&&r&&(clearTimeout(a),r(e))},reject:e=>{a&&i&&(clearTimeout(a),i(e))},done:()=>new Promise(((e,o)=>{a=setTimeout((()=>{o(new Error(t))}),n),r=e,i=o}))}}function Fqe(e,t,n){return new Promise((async(r,i)=>{const a=setTimeout((()=>i(new Error(n))),t);try{r(await e)}catch(e){i(e)}clearTimeout(a)}))}function Bqe(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function jqe(e){const[t,n]=e.split(":"),r={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof n)r.topic=n;else{if("id"!==t||!Number.isInteger(Number(n)))throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${n}`);r.id=Number(n)}return r}function Uqe(e,t){return fGe.fromMiliseconds((t||Date.now())+fGe.toMiliseconds(e))}function zqe(e){return Date.now()>=fGe.toMiliseconds(e)}function Hqe(e,t){return`${e}${t?`:${t}`:""}`}function Wqe(e=[],t=[]){return[...new Set([...e,...t])]}function Vqe(e){return e?.relay||{protocol:"irn"}}function Gqe(e){const t=QGe[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var qqe=Object.defineProperty,Kqe=Object.defineProperties,Xqe=Object.getOwnPropertyDescriptors,Yqe=Object.getOwnPropertySymbols,Jqe=Object.prototype.hasOwnProperty,Zqe=Object.prototype.propertyIsEnumerable,Qqe=(e,t,n)=>t in e?qqe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function $qe(e,t="-"){const n={},r="relay"+t;return Object.keys(e).forEach((t=>{if(t.startsWith(r)){const i=t.replace(r,""),a=e[t];n[i]=a}})),n}function eKe(e){const t=(e=(e=e.includes("wc://")?e.replace("wc://",""):e).includes("wc:")?e.replace("wc:",""):e).indexOf(":"),n=-1!==e.indexOf("?")?e.indexOf("?"):void 0,r=e.substring(0,t),i=e.substring(t+1,n).split("@"),a=typeof n<"u"?e.substring(n):"",o=HGe.parse(a);return{protocol:r,topic:tKe(i[0]),version:parseInt(i[1],10),symKey:o.symKey,relay:$qe(o),expiryTimestamp:o.expiryTimestamp?parseInt(o.expiryTimestamp,10):void 0}}function tKe(e){return e.startsWith("//")?e.substring(2):e}function nKe(e){return`${e.protocol}:${e.topic}@${e.version}?`+HGe.stringify(((e,t)=>Kqe(e,Xqe(t)))(((e,t)=>{for(var n in t||(t={}))Jqe.call(t,n)&&Qqe(e,n,t[n]);if(Yqe)for(var n of Yqe(t))Zqe.call(t,n)&&Qqe(e,n,t[n]);return e})({symKey:e.symKey},function(e,t="-"){const n={};return Object.keys(e).forEach((r=>{const i="relay"+t+r;e[r]&&(n[i]=e[r])})),n}(e.relay)),{expiryTimestamp:e.expiryTimestamp}))}function rKe(e){const t=[];return e.forEach((e=>{const[n,r]=e.split(":");t.push(`${n}:${r}`)})),t}function iKe(e){return e.includes(":")}function aKe(e){return iKe(e)?e.split(":")[0]:e}const oKe={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},sKe={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function cKe(e,t){const{message:n,code:r}=sKe[e];return{message:t?`${n} ${t}`:n,code:r}}function uKe(e,t){const{message:n,code:r}=oKe[e];return{message:t?`${n} ${t}`:n,code:r}}function lKe(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function dKe(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function fKe(e){return typeof e>"u"}function pKe(e,t){return!(!t||!fKe(e))||"string"==typeof e&&!!e.trim().length}function hKe(e,t){return!(!t||!fKe(e))||"number"==typeof e&&!isNaN(e)}function mKe(e){return!(!pKe(e,!1)||!e.includes(":"))&&2===e.split(":").length}function yKe(e){let t=!0;return lKe(e)?e.length&&(t=e.every((e=>pKe(e,!1)))):t=!1,t}function bKe(e,t,n){let r=null;return Object.entries(e).forEach((([e,i])=>{if(r)return;const a=function(e,t,n){let r=null;return lKe(t)&&t.length?t.forEach((e=>{r||mKe(e)||(r=uKe("UNSUPPORTED_CHAINS",`${n}, chain ${e} should be a string and conform to "namespace:chainId" format`))})):mKe(e)||(r=uKe("UNSUPPORTED_CHAINS",`${n}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),r}(e,eqe(e,i),`${t} ${n}`);a&&(r=a)})),r}function gKe(e,t){let n=null;return lKe(e)?e.forEach((e=>{n||function(e){if(pKe(e,!1)&&e.includes(":")){const t=e.split(":");if(3===t.length){const e=t[0]+":"+t[1];return!!t[2]&&mKe(e)}}return!1}(e)||(n=uKe("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):n=uKe("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function vKe(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=function(e,t){let n=null;return yKe(e?.methods)?yKe(e?.events)||(n=uKe("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):n=uKe("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),n}(e,`${t}, namespace`);r&&(n=r)})),n}function wKe(e,t){let n=null;if(e&&dKe(e)){const r=vKe(e,t);r&&(n=r);const i=function(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=gKe(e?.accounts,`${t} namespace`);r&&(n=r)})),n}(e,t);i&&(n=i)}else n=cKe("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return n}function TKe(e){return pKe(e.protocol,!0)}function EKe(e){return typeof e<"u"&&null!==typeof e}function AKe(e,t){return!(!mKe(t)||!function(e){const t=[];return Object.values(e).forEach((e=>{t.push(...rKe(e.accounts))})),t}(e).includes(t))}function xKe(e,t,n){return!!pKe(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{rKe(e.accounts).includes(t)&&n.push(...e.methods)})),n}(e,t).includes(n)}function OKe(e,t,n){return!!pKe(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{rKe(e.accounts).includes(t)&&n.push(...e.events)})),n}(e,t).includes(n)}function CKe(e,t,n){let r=null;const i=function(e){const t={};return Object.keys(e).forEach((n=>{var r;n.includes(":")?t[n]=e[n]:null==(r=e[n].chains)||r.forEach((r=>{t[r]={methods:e[n].methods,events:e[n].events}}))})),t}(e),a=function(e){const t={};return Object.keys(e).forEach((n=>{if(n.includes(":"))t[n]=e[n];else{const r=rKe(e[n].accounts);r?.forEach((r=>{t[r]={accounts:e[n].accounts.filter((e=>e.includes(`${r}:`))),methods:e[n].methods,events:e[n].events}}))}})),t}(t),o=Object.keys(i),s=Object.keys(a),c=IKe(Object.keys(e)),u=IKe(Object.keys(t)),l=c.filter((e=>!u.includes(e)));return l.length&&(r=cKe("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.\n Required: ${l.toString()}\n Received: ${Object.keys(t).toString()}`)),Nqe(o,s)||(r=cKe("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.\n Required: ${o.toString()}\n Approved: ${s.toString()}`)),Object.keys(t).forEach((e=>{if(!e.includes(":")||r)return;const i=rKe(t[e].accounts);i.includes(e)||(r=cKe("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${e}\n Required: ${e}\n Approved: ${i.toString()}`))})),o.forEach((e=>{r||(Nqe(i[e].methods,a[e].methods)?Nqe(i[e].events,a[e].events)||(r=cKe("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${e}`)):r=cKe("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${e}`))})),r}function IKe(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}function SKe(){const e=Pqe();return new Promise((t=>{switch(e){case Oqe.browser:t(_qe()&&navigator?.onLine);break;case Oqe.reactNative:t(async function(){if(Sqe()&&typeof global<"u"&&null!=global&&global.NetInfo){const e=await(null==global?void 0:global.NetInfo.fetch());return e?.isConnected}return!0}());break;case Oqe.node:default:t(!0)}}))}function _Ke(e){switch(Pqe()){case Oqe.browser:!function(e){!Sqe()&&_qe()&&(window.addEventListener("online",(()=>e(!0))),window.addEventListener("offline",(()=>e(!1))))}(e);break;case Oqe.reactNative:!function(e){Sqe()&&typeof global<"u"&&null!=global&&global.NetInfo&&global?.NetInfo.addEventListener((t=>e(t?.isConnected)))}(e)}}const PKe={};let kKe=class{static get(e){return PKe[e]}static set(e,t){PKe[e]=t}static delete(e){delete PKe[e]}};const RKe=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,NKe=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,MKe=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function DKe(e,t){if(!("__proto__"===e||"constructor"===e&&t&&"object"==typeof t&&"prototype"in t))return t;!function(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}(e)}function LKe(e,t={}){if("string"!=typeof e)return e;const n=e.trim();if('"'===e[0]&&'"'===e.at(-1)&&!e.includes("\\"))return n.slice(1,-1);if(n.length<=9){const e=n.toLowerCase();if("true"===e)return!0;if("false"===e)return!1;if("undefined"===e)return;if("null"===e)return null;if("nan"===e)return Number.NaN;if("infinity"===e)return Number.POSITIVE_INFINITY;if("-infinity"===e)return Number.NEGATIVE_INFINITY}if(!MKe.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(RKe.test(e)||NKe.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,DKe)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}function FKe(e,...t){try{return(n=e(...t))&&"function"==typeof n.then?n:Promise.resolve(n)}catch(e){return Promise.reject(e)}var n}function BKe(e){if(function(e){const t=typeof e;return null===e||"object"!==t&&"function"!==t}(e))return String(e);if(function(e){const t=Object.getPrototypeOf(e);return!t||t.isPrototypeOf(Object)}(e)||Array.isArray(e))return JSON.stringify(e);if("function"==typeof e.toJSON)return BKe(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function jKe(){if(void 0===typeof Buffer)throw new TypeError("[unstorage] Buffer is not supported!")}const UKe="base64:";function zKe(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function HKe(...e){return zKe(e.join(":"))}function WKe(e){return(e=zKe(e))?e+":":""}const VKe=()=>{const e=new Map;return{name:"memory",options:{},hasItem:t=>e.has(t),getItem:t=>e.get(t)??null,getItemRaw:t=>e.get(t)??null,setItem(t,n){e.set(t,n)},setItemRaw(t,n){e.set(t,n)},removeItem(t){e.delete(t)},getKeys:()=>Array.from(e.keys()),clear(){e.clear()},dispose(){e.clear()}}};function GKe(e={}){const t={mounts:{"":e.driver||VKe()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=e=>{for(const n of t.mountpoints)if(e.startsWith(n))return{base:n,relativeKey:e.slice(n.length),driver:t.mounts[n]};return{base:"",relativeKey:e,driver:t.mounts[""]}},r=(e,n)=>t.mountpoints.filter((t=>t.startsWith(e)||n&&e.startsWith(t))).map((n=>({relativeBase:e.length>n.length?e.slice(n.length):void 0,mountpoint:n,driver:t.mounts[n]}))),i=(e,n)=>{if(t.watching){n=zKe(n);for(const r of t.watchListeners)r(e,n)}},a=async()=>{if(t.watching){for(const e in t.unwatch)await t.unwatch[e]();t.unwatch={},t.watching=!1}},o=(e,t,r)=>{const i=new Map,a=e=>{let t=i.get(e.base);return t||(t={driver:e.driver,base:e.base,items:[]},i.set(e.base,t)),t};for(const r of e){const e="string"==typeof r,i=zKe(e?r:r.key),o=e?void 0:r.value,s=e||!r.options?t:{...t,...r.options},c=n(i);a(c).items.push({key:i,value:o,relativeKey:c.relativeKey,options:s})}return Promise.all([...i.values()].map((e=>r(e)))).then((e=>e.flat()))},s={hasItem(e,t={}){e=zKe(e);const{relativeKey:r,driver:i}=n(e);return FKe(i.hasItem,r,t)},getItem(e,t={}){e=zKe(e);const{relativeKey:r,driver:i}=n(e);return FKe(i.getItem,r,t).then((e=>LKe(e)))},getItems:(e,t)=>o(e,t,(e=>e.driver.getItems?FKe(e.driver.getItems,e.items.map((e=>({key:e.relativeKey,options:e.options}))),t).then((t=>t.map((t=>({key:HKe(e.base,t.key),value:LKe(t.value)}))))):Promise.all(e.items.map((t=>FKe(e.driver.getItem,t.relativeKey,t.options).then((e=>({key:t.key,value:LKe(e)})))))))),getItemRaw(e,t={}){e=zKe(e);const{relativeKey:r,driver:i}=n(e);return i.getItemRaw?FKe(i.getItemRaw,r,t):FKe(i.getItem,r,t).then((e=>function(e){return"string"!=typeof e?e:e.startsWith(UKe)?(jKe(),Buffer.from(e.slice(UKe.length),"base64")):e}(e)))},async setItem(e,t,r={}){if(void 0===t)return s.removeItem(e);e=zKe(e);const{relativeKey:a,driver:o}=n(e);o.setItem&&(await FKe(o.setItem,a,BKe(t),r),o.watch||i("update",e))},async setItems(e,t){await o(e,t,(async e=>{e.driver.setItems&&await FKe(e.driver.setItems,e.items.map((e=>({key:e.relativeKey,value:BKe(e.value),options:e.options}))),t),e.driver.setItem&&await Promise.all(e.items.map((t=>FKe(e.driver.setItem,t.relativeKey,BKe(t.value),t.options))))}))},async setItemRaw(e,t,r={}){if(void 0===t)return s.removeItem(e,r);e=zKe(e);const{relativeKey:a,driver:o}=n(e);if(o.setItemRaw)await FKe(o.setItemRaw,a,t,r);else{if(!o.setItem)return;await FKe(o.setItem,a,function(e){if("string"==typeof e)return e;jKe();const t=Buffer.from(e).toString("base64");return UKe+t}(t),r)}o.watch||i("update",e)},async removeItem(e,t={}){"boolean"==typeof t&&(t={removeMeta:t}),e=zKe(e);const{relativeKey:r,driver:a}=n(e);a.removeItem&&(await FKe(a.removeItem,r,t),(t.removeMeta||t.removeMata)&&await FKe(a.removeItem,r+"$",t),a.watch||i("remove",e))},async getMeta(e,t={}){"boolean"==typeof t&&(t={nativeOnly:t}),e=zKe(e);const{relativeKey:r,driver:i}=n(e),a=Object.create(null);if(i.getMeta&&Object.assign(a,await FKe(i.getMeta,r,t)),!t.nativeOnly){const e=await FKe(i.getItem,r+"$",t).then((e=>LKe(e)));e&&"object"==typeof e&&("string"==typeof e.atime&&(e.atime=new Date(e.atime)),"string"==typeof e.mtime&&(e.mtime=new Date(e.mtime)),Object.assign(a,e))}return a},setMeta(e,t,n={}){return this.setItem(e+"$",t,n)},removeMeta(e,t={}){return this.removeItem(e+"$",t)},async getKeys(e,t={}){e=WKe(e);const n=r(e,!0);let i=[];const a=[];for(const e of n){const n=(await FKe(e.driver.getKeys,e.relativeBase,t)).map((t=>e.mountpoint+zKe(t))).filter((e=>!i.some((t=>e.startsWith(t)))));a.push(...n),i=[e.mountpoint,...i.filter((t=>!t.startsWith(e.mountpoint)))]}return e?a.filter((t=>t.startsWith(e)&&!t.endsWith("$"))):a.filter((e=>!e.endsWith("$")))},async clear(e,t={}){e=WKe(e),await Promise.all(r(e,!1).map((async e=>{if(e.driver.clear)return FKe(e.driver.clear,e.relativeBase,t);if(e.driver.removeItem){const n=await e.driver.getKeys(e.relativeBase||"",t);return Promise.all(n.map((n=>e.driver.removeItem(n,t))))}})))},async dispose(){await Promise.all(Object.values(t.mounts).map((e=>KKe(e))))},watch:async e=>(await(async()=>{if(!t.watching){t.watching=!0;for(const e in t.mounts)t.unwatch[e]=await qKe(t.mounts[e],i,e)}})(),t.watchListeners.push(e),async()=>{t.watchListeners=t.watchListeners.filter((t=>t!==e)),0===t.watchListeners.length&&await a()}),async unwatch(){t.watchListeners=[],await a()},mount(e,n){if((e=WKe(e))&&t.mounts[e])throw new Error(`already mounted at ${e}`);return e&&(t.mountpoints.push(e),t.mountpoints.sort(((e,t)=>t.length-e.length))),t.mounts[e]=n,t.watching&&Promise.resolve(qKe(n,i,e)).then((n=>{t.unwatch[e]=n})).catch(console.error),s},async unmount(e,n=!0){(e=WKe(e))&&t.mounts[e]&&(t.watching&&e in t.unwatch&&(t.unwatch[e](),delete t.unwatch[e]),n&&await KKe(t.mounts[e]),t.mountpoints=t.mountpoints.filter((t=>t!==e)),delete t.mounts[e])},getMount(e=""){e=zKe(e)+":";const t=n(e);return{driver:t.driver,base:t.base}},getMounts(e="",t={}){e=zKe(e);return r(e,t.parents).map((e=>({driver:e.driver,base:e.mountpoint})))}};return s}function qKe(e,t,n){return e.watch?e.watch(((e,r)=>t(e,n+r))):()=>{}}async function KKe(e){"function"==typeof e.dispose&&await FKe(e.dispose)}function XKe(e){return new Promise(((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)}))}function YKe(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=XKe(n);return(e,n)=>r.then((r=>n(r.transaction(t,e).objectStore(t))))}let JKe;function ZKe(){return JKe||(JKe=YKe("keyval-store","keyval")),JKe}function QKe(e,t=ZKe()){return t("readonly",(t=>XKe(t.get(e))))}function $Ke(e=ZKe()){return e("readonly",(e=>{if(e.getAllKeys)return XKe(e.getAllKeys());const t=[];return function(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},XKe(e.transaction)}(e,(e=>t.push(e.key))).then((()=>t))}))}const eXe=e=>JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString()+"n":t)),tXe=e=>{const t=e.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(t,((e,t)=>"string"==typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t))};function nXe(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return tXe(e)}catch(t){return e}}function rXe(e){return"string"==typeof e?e:eXe(e)||""}var iXe=(e={})=>{const t=e.base&&e.base.length>0?`${e.base}:`:"",n=e=>t+e;let r;return e.dbName&&e.storeName&&(r=YKe(e.dbName,e.storeName)),{name:"idb-keyval",options:e,hasItem:async e=>!(typeof await QKe(n(e),r)>"u"),getItem:async e=>await QKe(n(e),r)??null,setItem:(e,t)=>function(e,t,n=ZKe()){return n("readwrite",(n=>(n.put(t,e),XKe(n.transaction))))}(n(e),t,r),removeItem:e=>function(e,t=ZKe()){return t("readwrite",(t=>(t.delete(e),XKe(t.transaction))))}(n(e),r),getKeys:()=>$Ke(r),clear:()=>function(e=ZKe()){return e("readwrite",(e=>(e.clear(),XKe(e.transaction))))}(r)}};var aXe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},oXe={exports:{}};function sXe(e){var t;return[e[0],nXe(null!=(t=e[1])?t:"")]}!function(){let e;function t(){}e=t,e.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},e.prototype.setItem=function(e,t){this[e]=String(t)},e.prototype.removeItem=function(e){delete this[e]},e.prototype.clear=function(){const e=this;Object.keys(e).forEach((function(t){e[t]=void 0,delete e[t]}))},e.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},e.prototype.__defineGetter__("length",(function(){return Object.keys(this).length})),typeof aXe<"u"&&aXe.localStorage?oXe.exports=aXe.localStorage:typeof window<"u"&&window.localStorage?oXe.exports=window.localStorage:oXe.exports=new t}();const cXe=async(e,t)=>{t.length&&t.forEach((async t=>{await e.removeItem(t)}))};var uXe={},lXe={},dXe=dt(iWe),fXe={},pXe={};let hXe=class{};var mXe,yXe,bXe=dt(Object.freeze({__proto__:null,IEvents:hXe}));function gXe(){return yXe||(yXe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});YD.__exportStar(function(){if(mXe)return pXe;mXe=1,Object.defineProperty(pXe,"__esModule",{value:!0}),pXe.IHeartBeat=void 0;const e=bXe;class t extends e.IEvents{constructor(e){super()}}return pXe.IHeartBeat=t,pXe}(),e)}(fXe)),fXe}var vXe,wXe,TXe,EXe={},AXe={};function xXe(){return wXe||(wXe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});YD.__exportStar(function(){if(vXe)return AXe;vXe=1,Object.defineProperty(AXe,"__esModule",{value:!0}),AXe.HEARTBEAT_EVENTS=AXe.HEARTBEAT_INTERVAL=void 0;const e=fGe;return AXe.HEARTBEAT_INTERVAL=e.FIVE_SECONDS,AXe.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},AXe}(),e)}(EXe)),EXe}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=YD;t.__exportStar(function(){if(TXe)return lXe;TXe=1,Object.defineProperty(lXe,"__esModule",{value:!0}),lXe.HeartBeat=void 0;const e=YD,t=dXe,n=fGe,r=gXe(),i=xXe();class a extends r.IHeartBeat{constructor(e){super(e),this.events=new t.EventEmitter,this.interval=i.HEARTBEAT_INTERVAL,this.interval=(null==e?void 0:e.interval)||i.HEARTBEAT_INTERVAL}static init(t){return e.__awaiter(this,void 0,void 0,(function*(){const e=new a(t);return yield e.init(),e}))}init(){return e.__awaiter(this,void 0,void 0,(function*(){yield this.initialize()}))}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}initialize(){return e.__awaiter(this,void 0,void 0,(function*(){this.intervalRef=setInterval((()=>this.pulse()),n.toMiliseconds(this.interval))}))}pulse(){this.events.emit(i.HEARTBEAT_EVENTS.pulse)}}return lXe.HeartBeat=a,lXe}(),e),t.__exportStar(gXe(),e),t.__exportStar(xXe(),e)}(uXe);var OXe,CXe,IXe,SXe,_Xe={};function PXe(){if(SXe)return IXe;SXe=1;const e=function(){if(CXe)return OXe;function e(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}return CXe=1,OXe=function(t,n,r){var i=r&&r.stringify||e;if("object"==typeof t&&null!==t){var a=n.length+1;if(1===a)return t;var o=new Array(a);o[0]=i(t);for(var s=1;s<a;s++)o[s]=i(n[s]);return o.join(" ")}if("string"!=typeof t)return t;var c=n.length;if(0===c)return t;for(var u="",l=0,d=-1,f=t&&t.length||0,p=0;p<f;){if(37===t.charCodeAt(p)&&p+1<f){switch(d=d>-1?d:0,t.charCodeAt(p+1)){case 100:case 102:if(l>=c)break;if(null==n[l])break;d<p&&(u+=t.slice(d,p)),u+=Number(n[l]),d=p+2,p++;break;case 105:if(l>=c)break;if(null==n[l])break;d<p&&(u+=t.slice(d,p)),u+=Math.floor(Number(n[l])),d=p+2,p++;break;case 79:case 111:case 106:if(l>=c)break;if(void 0===n[l])break;d<p&&(u+=t.slice(d,p));var h=typeof n[l];if("string"===h){u+="'"+n[l]+"'",d=p+2,p++;break}if("function"===h){u+=n[l].name||"<anonymous>",d=p+2,p++;break}u+=i(n[l]),d=p+2,p++;break;case 115:if(l>=c)break;d<p&&(u+=t.slice(d,p)),u+=String(n[l]),d=p+2,p++;break;case 37:d<p&&(u+=t.slice(d,p)),u+="%",d=p+2,p++,l--}++l}++p}return-1===d?t:(d<f&&(u+=t.slice(d)),u)},OXe}();IXe=r;const t=function(){function e(e){return void 0!==e&&e}try{return"undefined"!=typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},n={mapHttpRequest:u,mapHttpResponse:u,wrapRequestSerializer:l,wrapResponseSerializer:l,wrapErrorSerializer:l,req:u,res:u,err:function(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const n in e)void 0===t[n]&&(t[n]=e[n]);return t}};function r(e){(e=e||{}).browser=e.browser||{};const n=e.browser.transmit;if(n&&"function"!=typeof n.send)throw Error("pino: transmit option must have a send function");const u=e.browser.write||t;e.browser.write&&(e.browser.asObject=!0);const l=e.serializers||{},f=function(e,t){if(Array.isArray(e)){const t=e.filter((function(e){return"!stdSerializers.err"!==e}));return t}return!0===e&&Object.keys(t)}(e.browser.serialize,l);let p=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(p=!1);"function"==typeof u&&(u.error=u.fatal=u.warn=u.info=u.debug=u.trace=u),!1===e.enabled&&(e.level="silent");const h=e.level||"info",m=Object.create(u);m.log||(m.log=d),Object.defineProperty(m,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(m,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,i(y,m,"error","log"),i(y,m,"fatal","error"),i(y,m,"warn","error"),i(y,m,"info","log"),i(y,m,"debug","log"),i(y,m,"trace","log")}});const y={transmit:n,serialize:f,asObject:e.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:c(e)};return m.levels=r.levels,m.level=h,m.setMaxListeners=m.getMaxListeners=m.emit=m.addListener=m.on=m.prependListener=m.once=m.prependOnceListener=m.removeListener=m.removeAllListeners=m.listeners=m.listenerCount=m.eventNames=m.write=m.flush=d,m.serializers=l,m._serialize=f,m._stdErrSerialize=p,m.child=function(t,r){if(!t)throw new Error("missing bindings for child Pino");r=r||{},f&&t.serializers&&(r.serializers=t.serializers);const i=r.serializers;if(f&&i){var c=Object.assign({},l,i),u=!0===e.browser.serialize?Object.keys(c):f;delete t.serializers,a([t],u,c,this._stdErrSerialize)}function d(e){this._childLevel=1+(0|e._childLevel),this.error=o(e,t,"error"),this.fatal=o(e,t,"fatal"),this.warn=o(e,t,"warn"),this.info=o(e,t,"info"),this.debug=o(e,t,"debug"),this.trace=o(e,t,"trace"),c&&(this.serializers=c,this._serialize=u),n&&(this._logEvent=s([].concat(e._logEvent.bindings,t)))}return d.prototype=this,new d(this)},n&&(m._logEvent=s()),m}function i(n,i,o,c){const u=Object.getPrototypeOf(i);i[o]=i.levelVal>i.levels.values[o]?d:u[o]?u[o]:t[o]||t[c]||d,function(n,i,o){if(!n.transmit&&i[o]===d)return;i[o]=function(c){return function(){const u=n.timestamp(),l=new Array(arguments.length),d=Object.getPrototypeOf&&Object.getPrototypeOf(this)===t?t:this;for(var f=0;f<l.length;f++)l[f]=arguments[f];if(n.serialize&&!n.asObject&&a(l,this._serialize,this.serializers,this._stdErrSerialize),n.asObject?c.call(d,function(t,n,i,o){t._serialize&&a(i,t._serialize,t.serializers,t._stdErrSerialize);const s=i.slice();let c=s[0];const u={};o&&(u.time=o);u.level=r.levels.values[n];let l=1+(0|t._childLevel);l<1&&(l=1);if(null!==c&&"object"==typeof c){for(;l--&&"object"==typeof s[0];)Object.assign(u,s.shift());c=s.length?e(s.shift(),s):void 0}else"string"==typeof c&&(c=e(s.shift(),s));void 0!==c&&(u.msg=c);return u}(this,o,l,u)):c.apply(d,l),n.transmit){const e=n.transmit.level||i.level,t=r.levels.values[e],c=r.levels.values[o];if(c<t)return;!function(e,t,n){const r=t.send,i=t.ts,o=t.methodLevel,c=t.methodValue,u=t.val,l=e._logEvent.bindings;a(n,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=n.filter((function(e){return-1===l.indexOf(e)})),e._logEvent.level.label=o,e._logEvent.level.value=c,r(o,e._logEvent,u),e._logEvent=s(l)}(this,{ts:u,methodLevel:o,methodValue:c,transmitLevel:e,transmitValue:r.levels.values[n.transmit.level||i.level],send:n.transmit.send,val:i.levelVal},l)}}}(i[o])}(n,i,o)}function a(e,t,n,i){for(const a in e)if(i&&e[a]instanceof Error)e[a]=r.stdSerializers.err(e[a]);else if("object"==typeof e[a]&&!Array.isArray(e[a]))for(const r in e[a])t&&t.indexOf(r)>-1&&r in n&&(e[a][r]=n[r](e[a][r]))}function o(e,t,n){return function(){const r=new Array(1+arguments.length);r[0]=t;for(var i=1;i<r.length;i++)r[i]=arguments[i-1];return e[n].apply(this,r)}}function s(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function c(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?f:p}function u(){return{}}function l(e){return e}function d(){}function f(){return!1}function p(){return Date.now()}return r.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},r.stdSerializers=n,r.stdTimeFunctions=Object.assign({},{nullTime:f,epochTime:p,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),IXe}var kXe,RXe={};function NXe(){return kXe||(kXe=1,Object.defineProperty(RXe,"__esModule",{value:!0}),RXe.PINO_CUSTOM_CONTEXT_KEY=RXe.PINO_LOGGER_DEFAULTS=void 0,RXe.PINO_LOGGER_DEFAULTS={level:"info"},RXe.PINO_CUSTOM_CONTEXT_KEY="custom_context"),RXe}var MXe,DXe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pino=void 0;const t=YD,n=t.__importDefault(PXe());Object.defineProperty(e,"pino",{enumerable:!0,get:function(){return n.default}}),t.__exportStar(NXe(),e),t.__exportStar(function(){if(MXe)return DXe;MXe=1,Object.defineProperty(DXe,"__esModule",{value:!0}),DXe.generateChildLogger=DXe.formatChildLoggerContext=DXe.getLoggerContext=DXe.setBrowserLoggerContext=DXe.getBrowserLoggerContext=DXe.getDefaultLoggerOptions=void 0;const e=NXe();function t(t,n=e.PINO_CUSTOM_CONTEXT_KEY){return t[n]||""}function n(t,n,r=e.PINO_CUSTOM_CONTEXT_KEY){return t[r]=n,t}function r(n,r=e.PINO_CUSTOM_CONTEXT_KEY){let i="";return i=void 0===n.bindings?t(n,r):n.bindings().context||"",i}function i(t,n,i=e.PINO_CUSTOM_CONTEXT_KEY){const a=r(t,i);return a.trim()?`${a}/${n}`:n}return DXe.getDefaultLoggerOptions=function(t){return Object.assign(Object.assign({},t),{level:(null==t?void 0:t.level)||e.PINO_LOGGER_DEFAULTS.level})},DXe.getBrowserLoggerContext=t,DXe.setBrowserLoggerContext=n,DXe.getLoggerContext=r,DXe.formatChildLoggerContext=i,DXe.generateChildLogger=function(t,r,a=e.PINO_CUSTOM_CONTEXT_KEY){const o=i(t,r,a);return n(t.child({context:o}),o,a)},DXe}(),e)}(_Xe);let LXe=class extends hXe{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}},FXe=class extends hXe{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}},BXe=class{constructor(e,t){this.logger=e,this.core=t}},jXe=class extends hXe{constructor(e,t){super(),this.relayer=e,this.logger=t}},UXe=class extends hXe{constructor(e){super()}},zXe=class{constructor(e,t,n,r){this.core=e,this.logger=t,this.name=n}},HXe=class extends hXe{constructor(e,t){super(),this.relayer=e,this.logger=t}},WXe=class extends hXe{constructor(e,t){super(),this.core=e,this.logger=t}},VXe=class{constructor(e,t){this.projectId=e,this.logger=t}},GXe=class{constructor(e,t){this.projectId=e,this.logger=t}},qXe=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}},KXe=class{constructor(e){this.client=e}};var XXe={},YXe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=sWe,n=wWe;e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var r=function(){function r(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return r.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},r.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},r.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._tempHi),n.wipe(this._tempLo),this.reset()},r.prototype.update=function(t,n){if(void 0===n&&(n=t.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var r=0;if(this._bytesHashed+=n,this._bufferLength>0){for(;this._bufferLength<e.BLOCK_SIZE&&n>0;)this._buffer[this._bufferLength++]=t[r++],n--;this._bufferLength===this.blockSize&&(a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(n>=this.blockSize&&(r=a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,t,r,n),n%=this.blockSize);n>0;)this._buffer[this._bufferLength++]=t[r++],n--;return this},r.prototype.finish=function(e){if(!this._finished){var n=this._bytesHashed,r=this._bufferLength,i=n/536870912|0,o=n<<3,s=n%128<112?128:256;this._buffer[r]=128;for(var c=r+1;c<s-8;c++)this._buffer[c]=0;t.writeUint32BE(i,this._buffer,s-8),t.writeUint32BE(o,this._buffer,s-4),a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,s),this._finished=!0}for(c=0;c<this.digestLength/8;c++)t.writeUint32BE(this._stateHi[c],e,8*c),t.writeUint32BE(this._stateLo[c],e,8*c+4);return this},r.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},r.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},r.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},r.prototype.cleanSavedState=function(e){n.wipe(e.stateHi),n.wipe(e.stateLo),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},r}();e.SHA512=r;var i=new Int32Array([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 a(e,n,r,a,o,s,c){for(var u,l,d,f,p,h,m,y,b=r[0],g=r[1],v=r[2],w=r[3],T=r[4],E=r[5],A=r[6],x=r[7],O=a[0],C=a[1],I=a[2],S=a[3],_=a[4],P=a[5],k=a[6],R=a[7];c>=128;){for(var N=0;N<16;N++){var M=8*N+s;e[N]=t.readUint32BE(o,M),n[N]=t.readUint32BE(o,M+4)}for(N=0;N<80;N++){var D,L,F=b,B=g,j=v,U=w,z=T,H=E,W=A,V=O,G=C,q=I,K=S,X=_,Y=P,J=k;if(p=65535&(l=R),h=l>>>16,m=65535&(u=x),y=u>>>16,p+=65535&(l=(_>>>14|T<<18)^(_>>>18|T<<14)^(T>>>9|_<<23)),h+=l>>>16,m+=65535&(u=(T>>>14|_<<18)^(T>>>18|_<<14)^(_>>>9|T<<23)),y+=u>>>16,p+=65535&(l=_&P^~_&k),h+=l>>>16,m+=65535&(u=T&E^~T&A),y+=u>>>16,u=i[2*N],p+=65535&(l=i[2*N+1]),h+=l>>>16,m+=65535&u,y+=u>>>16,u=e[N%16],h+=(l=n[N%16])>>>16,m+=65535&u,y+=u>>>16,m+=(h+=(p+=65535&l)>>>16)>>>16,p=65535&(l=f=65535&p|h<<16),h=l>>>16,m=65535&(u=d=65535&m|(y+=m>>>16)<<16),y=u>>>16,p+=65535&(l=(O>>>28|b<<4)^(b>>>2|O<<30)^(b>>>7|O<<25)),h+=l>>>16,m+=65535&(u=(b>>>28|O<<4)^(O>>>2|b<<30)^(O>>>7|b<<25)),y+=u>>>16,h+=(l=O&C^O&I^C&I)>>>16,m+=65535&(u=b&g^b&v^g&v),y+=u>>>16,D=65535&(m+=(h+=(p+=65535&l)>>>16)>>>16)|(y+=m>>>16)<<16,L=65535&p|h<<16,p=65535&(l=K),h=l>>>16,m=65535&(u=U),y=u>>>16,h+=(l=f)>>>16,m+=65535&(u=d),y+=u>>>16,g=F,v=B,w=j,T=U=65535&(m+=(h+=(p+=65535&l)>>>16)>>>16)|(y+=m>>>16)<<16,E=z,A=H,x=W,b=D,C=V,I=G,S=q,_=K=65535&p|h<<16,P=X,k=Y,R=J,O=L,N%16==15)for(M=0;M<16;M++)u=e[M],p=65535&(l=n[M]),h=l>>>16,m=65535&u,y=u>>>16,u=e[(M+9)%16],p+=65535&(l=n[(M+9)%16]),h+=l>>>16,m+=65535&u,y+=u>>>16,d=e[(M+1)%16],p+=65535&(l=((f=n[(M+1)%16])>>>1|d<<31)^(f>>>8|d<<24)^(f>>>7|d<<25)),h+=l>>>16,m+=65535&(u=(d>>>1|f<<31)^(d>>>8|f<<24)^d>>>7),y+=u>>>16,d=e[(M+14)%16],h+=(l=((f=n[(M+14)%16])>>>19|d<<13)^(d>>>29|f<<3)^(f>>>6|d<<26))>>>16,m+=65535&(u=(d>>>19|f<<13)^(f>>>29|d<<3)^d>>>6),y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,e[M]=65535&m|y<<16,n[M]=65535&p|h<<16}p=65535&(l=O),h=l>>>16,m=65535&(u=b),y=u>>>16,u=r[0],h+=(l=a[0])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[0]=b=65535&m|y<<16,a[0]=O=65535&p|h<<16,p=65535&(l=C),h=l>>>16,m=65535&(u=g),y=u>>>16,u=r[1],h+=(l=a[1])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[1]=g=65535&m|y<<16,a[1]=C=65535&p|h<<16,p=65535&(l=I),h=l>>>16,m=65535&(u=v),y=u>>>16,u=r[2],h+=(l=a[2])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[2]=v=65535&m|y<<16,a[2]=I=65535&p|h<<16,p=65535&(l=S),h=l>>>16,m=65535&(u=w),y=u>>>16,u=r[3],h+=(l=a[3])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[3]=w=65535&m|y<<16,a[3]=S=65535&p|h<<16,p=65535&(l=_),h=l>>>16,m=65535&(u=T),y=u>>>16,u=r[4],h+=(l=a[4])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[4]=T=65535&m|y<<16,a[4]=_=65535&p|h<<16,p=65535&(l=P),h=l>>>16,m=65535&(u=E),y=u>>>16,u=r[5],h+=(l=a[5])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[5]=E=65535&m|y<<16,a[5]=P=65535&p|h<<16,p=65535&(l=k),h=l>>>16,m=65535&(u=A),y=u>>>16,u=r[6],h+=(l=a[6])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[6]=A=65535&m|y<<16,a[6]=k=65535&p|h<<16,p=65535&(l=R),h=l>>>16,m=65535&(u=x),y=u>>>16,u=r[7],h+=(l=a[7])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[7]=x=65535&m|y<<16,a[7]=R=65535&p|h<<16,s+=128,c-=128}return s}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}}(YXe),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.convertSecretKeyToX25519=e.convertPublicKeyToX25519=e.verify=e.sign=e.extractPublicKeyFromSecretKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.SEED_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=e.SIGNATURE_LENGTH=void 0;const t=zWe,n=YXe,r=wWe;function i(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;new Uint8Array(32)[0]=9;const a=i(),o=i([1]),s=i([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=i([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),u=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),l=i([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=i([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function f(e,t){for(let n=0;n<16;n++)e[n]=0|t[n]}function p(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function h(e,t,n){const r=~(n-1);for(let n=0;n<16;n++){const i=r&(e[n]^t[n]);e[n]^=i,t[n]^=i}}function m(e,t){const n=i(),r=i();for(let e=0;e<16;e++)r[e]=t[e];p(r),p(r),p(r);for(let e=0;e<2;e++){n[0]=r[0]-65517;for(let e=1;e<15;e++)n[e]=r[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=r[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,h(r,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&r[t],e[2*t+1]=r[t]>>8}function y(e,t){let n=0;for(let r=0;r<32;r++)n|=e[r]^t[r];return(1&n-1>>>8)-1}function b(e,t){const n=new Uint8Array(32),r=new Uint8Array(32);return m(n,e),m(r,t),y(n,r)}function g(e){const t=new Uint8Array(32);return m(t,e),1&t[0]}function v(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function w(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function T(e,t,n){let r,i,a=0,o=0,s=0,c=0,u=0,l=0,d=0,f=0,p=0,h=0,m=0,y=0,b=0,g=0,v=0,w=0,T=0,E=0,A=0,x=0,O=0,C=0,I=0,S=0,_=0,P=0,k=0,R=0,N=0,M=0,D=0,L=n[0],F=n[1],B=n[2],j=n[3],U=n[4],z=n[5],H=n[6],W=n[7],V=n[8],G=n[9],q=n[10],K=n[11],X=n[12],Y=n[13],J=n[14],Z=n[15];r=t[0],a+=r*L,o+=r*F,s+=r*B,c+=r*j,u+=r*U,l+=r*z,d+=r*H,f+=r*W,p+=r*V,h+=r*G,m+=r*q,y+=r*K,b+=r*X,g+=r*Y,v+=r*J,w+=r*Z,r=t[1],o+=r*L,s+=r*F,c+=r*B,u+=r*j,l+=r*U,d+=r*z,f+=r*H,p+=r*W,h+=r*V,m+=r*G,y+=r*q,b+=r*K,g+=r*X,v+=r*Y,w+=r*J,T+=r*Z,r=t[2],s+=r*L,c+=r*F,u+=r*B,l+=r*j,d+=r*U,f+=r*z,p+=r*H,h+=r*W,m+=r*V,y+=r*G,b+=r*q,g+=r*K,v+=r*X,w+=r*Y,T+=r*J,E+=r*Z,r=t[3],c+=r*L,u+=r*F,l+=r*B,d+=r*j,f+=r*U,p+=r*z,h+=r*H,m+=r*W,y+=r*V,b+=r*G,g+=r*q,v+=r*K,w+=r*X,T+=r*Y,E+=r*J,A+=r*Z,r=t[4],u+=r*L,l+=r*F,d+=r*B,f+=r*j,p+=r*U,h+=r*z,m+=r*H,y+=r*W,b+=r*V,g+=r*G,v+=r*q,w+=r*K,T+=r*X,E+=r*Y,A+=r*J,x+=r*Z,r=t[5],l+=r*L,d+=r*F,f+=r*B,p+=r*j,h+=r*U,m+=r*z,y+=r*H,b+=r*W,g+=r*V,v+=r*G,w+=r*q,T+=r*K,E+=r*X,A+=r*Y,x+=r*J,O+=r*Z,r=t[6],d+=r*L,f+=r*F,p+=r*B,h+=r*j,m+=r*U,y+=r*z,b+=r*H,g+=r*W,v+=r*V,w+=r*G,T+=r*q,E+=r*K,A+=r*X,x+=r*Y,O+=r*J,C+=r*Z,r=t[7],f+=r*L,p+=r*F,h+=r*B,m+=r*j,y+=r*U,b+=r*z,g+=r*H,v+=r*W,w+=r*V,T+=r*G,E+=r*q,A+=r*K,x+=r*X,O+=r*Y,C+=r*J,I+=r*Z,r=t[8],p+=r*L,h+=r*F,m+=r*B,y+=r*j,b+=r*U,g+=r*z,v+=r*H,w+=r*W,T+=r*V,E+=r*G,A+=r*q,x+=r*K,O+=r*X,C+=r*Y,I+=r*J,S+=r*Z,r=t[9],h+=r*L,m+=r*F,y+=r*B,b+=r*j,g+=r*U,v+=r*z,w+=r*H,T+=r*W,E+=r*V,A+=r*G,x+=r*q,O+=r*K,C+=r*X,I+=r*Y,S+=r*J,_+=r*Z,r=t[10],m+=r*L,y+=r*F,b+=r*B,g+=r*j,v+=r*U,w+=r*z,T+=r*H,E+=r*W,A+=r*V,x+=r*G,O+=r*q,C+=r*K,I+=r*X,S+=r*Y,_+=r*J,P+=r*Z,r=t[11],y+=r*L,b+=r*F,g+=r*B,v+=r*j,w+=r*U,T+=r*z,E+=r*H,A+=r*W,x+=r*V,O+=r*G,C+=r*q,I+=r*K,S+=r*X,_+=r*Y,P+=r*J,k+=r*Z,r=t[12],b+=r*L,g+=r*F,v+=r*B,w+=r*j,T+=r*U,E+=r*z,A+=r*H,x+=r*W,O+=r*V,C+=r*G,I+=r*q,S+=r*K,_+=r*X,P+=r*Y,k+=r*J,R+=r*Z,r=t[13],g+=r*L,v+=r*F,w+=r*B,T+=r*j,E+=r*U,A+=r*z,x+=r*H,O+=r*W,C+=r*V,I+=r*G,S+=r*q,_+=r*K,P+=r*X,k+=r*Y,R+=r*J,N+=r*Z,r=t[14],v+=r*L,w+=r*F,T+=r*B,E+=r*j,A+=r*U,x+=r*z,O+=r*H,C+=r*W,I+=r*V,S+=r*G,_+=r*q,P+=r*K,k+=r*X,R+=r*Y,N+=r*J,M+=r*Z,r=t[15],w+=r*L,T+=r*F,E+=r*B,A+=r*j,x+=r*U,O+=r*z,C+=r*H,I+=r*W,S+=r*V,_+=r*G,P+=r*q,k+=r*K,R+=r*X,N+=r*Y,M+=r*J,D+=r*Z,a+=38*T,o+=38*E,s+=38*A,c+=38*x,u+=38*O,l+=38*C,d+=38*I,f+=38*S,p+=38*_,h+=38*P,m+=38*k,y+=38*R,b+=38*N,g+=38*M,v+=38*D,i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,a+=i-1+37*(i-1),i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=c,e[4]=u,e[5]=l,e[6]=d,e[7]=f,e[8]=p,e[9]=h,e[10]=m,e[11]=y,e[12]=b,e[13]=g,e[14]=v,e[15]=w}function E(e,t){T(e,t,t)}function A(e,t){const n=i();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)E(n,n),2!==r&&4!==r&&T(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function x(e,t){const n=i(),r=i(),a=i(),o=i(),s=i(),u=i(),l=i(),d=i(),f=i();w(n,e[1],e[0]),w(f,t[1],t[0]),T(n,n,f),v(r,e[0],e[1]),v(f,t[0],t[1]),T(r,r,f),T(a,e[3],t[3]),T(a,a,c),T(o,e[2],t[2]),v(o,o,o),w(s,r,n),w(u,o,a),v(l,o,a),v(d,r,n),T(e[0],s,u),T(e[1],d,l),T(e[2],l,u),T(e[3],s,d)}function O(e,t,n){for(let r=0;r<4;r++)h(e[r],t[r],n)}function C(e,t){const n=i(),r=i(),a=i();A(a,t[2]),T(n,t[0],a),T(r,t[1],a),m(e,r),e[31]^=g(n)<<7}function I(e,t,n){f(e[0],a),f(e[1],o),f(e[2],o),f(e[3],a);for(let r=255;r>=0;--r){const i=n[r/8|0]>>(7&r)&1;O(e,t,i),x(t,e),x(e,e),O(e,t,i)}}function S(e,t){const n=[i(),i(),i(),i()];f(n[0],u),f(n[1],l),f(n[2],o),T(n[3],u,l),I(e,n,t)}function _(t){if(t.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);const r=(0,n.hash)(t);r[0]&=248,r[31]&=127,r[31]|=64;const a=new Uint8Array(32),o=[i(),i(),i(),i()];S(o,r),C(a,o);const s=new Uint8Array(64);return s.set(t),s.set(a,32),{publicKey:a,secretKey:s}}e.generateKeyPairFromSeed=_,e.generateKeyPair=function(e){const n=(0,t.randomBytes)(32,e),i=_(n);return(0,r.wipe)(n),i},e.extractPublicKeyFromSecretKey=function(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(t.subarray(32))};const P=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function k(e,t){let n,r,i,a;for(r=63;r>=32;--r){for(n=0,i=r-32,a=r-12;i<a;++i)t[i]+=n-16*t[r]*P[i-(r-32)],n=Math.floor((t[i]+128)/256),t[i]-=256*n;t[i]+=n,t[r]=0}for(n=0,i=0;i<32;i++)t[i]+=n-(t[31]>>4)*P[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*P[i];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function R(e){const t=new Float64Array(64);for(let n=0;n<64;n++)t[n]=e[n];for(let t=0;t<64;t++)e[t]=0;k(e,t)}function N(e,t){const n=i(),r=i(),c=i(),u=i(),l=i(),p=i(),h=i();return f(e[2],o),function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(e[1],t),E(c,e[1]),T(u,c,s),w(c,c,e[2]),v(u,e[2],u),E(l,u),E(p,l),T(h,p,l),T(n,h,c),T(n,n,u),function(e,t){const n=i();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=250;r>=0;r--)E(n,n),1!==r&&T(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}(n,n),T(n,n,c),T(n,n,u),T(n,n,u),T(e[0],n,u),E(r,e[0]),T(r,r,u),b(r,c)&&T(e[0],e[0],d),E(r,e[0]),T(r,r,u),b(r,c)?-1:(g(e[0])===t[31]>>7&&w(e[0],a,e[0]),T(e[3],e[0],e[1]),0)}e.sign=function(e,t){const r=new Float64Array(64),a=[i(),i(),i(),i()],o=(0,n.hash)(e.subarray(0,32));o[0]&=248,o[31]&=127,o[31]|=64;const s=new Uint8Array(64);s.set(o.subarray(32),32);const c=new n.SHA512;c.update(s.subarray(32)),c.update(t);const u=c.digest();c.clean(),R(u),S(a,u),C(s,a),c.reset(),c.update(s.subarray(0,32)),c.update(e.subarray(32)),c.update(t);const l=c.digest();R(l);for(let e=0;e<32;e++)r[e]=u[e];for(let e=0;e<32;e++)for(let t=0;t<32;t++)r[e+t]+=l[e]*o[t];return k(s.subarray(32),r),s},e.verify=function(t,r,a){const o=new Uint8Array(32),s=[i(),i(),i(),i()],c=[i(),i(),i(),i()];if(a.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if(N(c,t))return!1;const u=new n.SHA512;u.update(a.subarray(0,32)),u.update(t),u.update(r);const l=u.digest();return R(l),I(s,c,l),S(c,a.subarray(32)),x(s,c),C(o,s),!y(a,o)},e.convertPublicKeyToX25519=function(e){let t=[i(),i(),i(),i()];if(N(t,e))throw new Error("Ed25519: invalid public key");let n=i(),r=i(),a=t[1];v(n,o,a),w(r,o,a),A(r,r),T(n,n,r);let s=new Uint8Array(32);return m(s,n),s},e.convertSecretKeyToX25519=function(e){const t=(0,n.hash)(e.subarray(0,32));t[0]&=248,t[31]&=127,t[31]|=64;const i=new Uint8Array(t.subarray(0,32));return(0,r.wipe)(t),i}}(XXe);const JXe=".",ZXe="base64url",QXe="utf8",$Xe="utf8",eYe=":",tYe="did",nYe="key",rYe="base58btc",iYe="z",aYe="K36";function oYe(e){return QVe(ZVe(rXe(e),QXe),ZXe)}function sYe(e){const t=ZVe(aYe,rYe),n=iYe+QVe(QWe([t,e]),rYe);return[tYe,nYe,n].join(eYe)}function cYe(e){return QVe(e,ZXe)}function uYe(e=zWe.randomBytes(32)){return XXe.generateKeyPairFromSeed(e)}async function lYe(e,t,n,r,i=fGe.fromMiliseconds(Date.now())){const a={alg:"EdDSA",typ:"JWT"},o={iss:sYe(r.publicKey),sub:e,aud:t,iat:i,exp:i+n},s=ZVe([oYe((c={header:a,payload:o}).header),oYe(c.payload)].join(JXe),$Xe);var c;return function(e){return[oYe(e.header),oYe(e.payload),cYe(e.signature)].join(JXe)}({header:a,payload:o,signature:XXe.sign(r.secretKey,s)})}const dYe="INTERNAL_ERROR",fYe="SERVER_ERROR",pYe=[-32700,-32600,-32601,-32602,-32603],hYe={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[dYe]:{code:-32603,message:"Internal error"},[fYe]:{code:-32e3,message:"Server error"}},mYe=fYe;function yYe(e){return Object.keys(hYe).includes(e)?hYe[e]:hYe[mYe]}function bYe(e,t,n){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${t}`):e}var gYe,vYe={},wYe={};var TYe,EYe={};function AYe(e=3){return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function xYe(e=6){return BigInt(AYe(e))}function OYe(e,t,n){return{id:n||AYe(),jsonrpc:"2.0",method:e,params:t}}function CYe(e,t){return{id:e,jsonrpc:"2.0",result:t}}function IYe(e,t,n){return{id:e,jsonrpc:"2.0",error:SYe(t,n)}}function SYe(e,t){return void 0===e?yYe(dYe):("string"==typeof e&&(e=Object.assign(Object.assign({},yYe(fYe)),{message:e})),void 0!==t&&(e.data=t),n=e.code,pYe.includes(n)&&(e=function(e){const t=Object.values(hYe).find((t=>t.code===e));return t||hYe[mYe]}(e.code)),e);var n}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=YD;t.__exportStar(function(){if(gYe)return wYe;function e(){return(null==ut?void 0:ut.crypto)||(null==ut?void 0:ut.msCrypto)||{}}function t(){const t=e();return t.subtle||t.webkitSubtle}return gYe=1,Object.defineProperty(wYe,"__esModule",{value:!0}),wYe.isBrowserCryptoAvailable=wYe.getSubtleCrypto=wYe.getBrowerCrypto=void 0,wYe.getBrowerCrypto=e,wYe.getSubtleCrypto=t,wYe.isBrowserCryptoAvailable=function(){return!!e()&&!!t()},wYe}(),e),t.__exportStar(function(){if(TYe)return EYe;function e(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function t(){return"undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.node}return TYe=1,Object.defineProperty(EYe,"__esModule",{value:!0}),EYe.isBrowser=EYe.isNode=EYe.isReactNative=void 0,EYe.isReactNative=e,EYe.isNode=t,EYe.isBrowser=function(){return!e()&&!t()},EYe}(),e)}(vYe);class _Ye{}class PYe extends _Ye{constructor(){super()}}class kYe extends PYe{constructor(e){super()}}function RYe(e,t){const n=function(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return void 0!==n&&new RegExp(t).test(n)}function NYe(e){return RYe(e,"^https?:")}function MYe(e){return RYe(e,"^wss?:")}function DYe(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function LYe(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function FYe(e){return LYe(e)&&"method"in e}function BYe(e){return LYe(e)&&(jYe(e)||UYe(e))}function jYe(e){return"result"in e}function UYe(e){return"error"in e}class zYe extends kYe{constructor(e){super(e),this.events=new QHe,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(OYe(e.method,e.params||[],e.id||xYe().toString()),t)}async requestStrict(e,t){return new Promise((async(n,r)=>{if(!this.connection.connected)try{await this.open()}catch(e){r(e)}this.events.on(`${e.id}`,(e=>{UYe(e)?r(e.error):n(e.result)}));try{await this.connection.send(e,t)}catch(e){r(e)}}))}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),BYe(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",(e=>this.onPayload(e))),this.connection.on("close",(e=>this.onClose(e))),this.connection.on("error",(e=>this.events.emit("error",e))),this.connection.on("register_error",(e=>this.onClose())),this.hasRegisteredEventListeners=!0)}}const HYe=e=>e.split("?")[0],WYe=typeof WebSocket<"u"?WebSocket:typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:require("ws");var VYe={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=1,i=2,a=9007199254740991,o="[object Arguments]",s="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",l="[object Date]",d="[object Error]",f="[object Function]",p="[object GeneratorFunction]",h="[object Map]",m="[object Number]",y="[object Null]",b="[object Object]",g="[object Promise]",v="[object Proxy]",w="[object RegExp]",T="[object Set]",E="[object String]",A="[object Symbol]",x="[object Undefined]",O="[object WeakMap]",C="[object ArrayBuffer]",I="[object DataView]",S=/^\[object .+?Constructor\]$/,_=/^(?:0|[1-9]\d*)$/,P={};P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P[o]=P[s]=P[C]=P[u]=P[I]=P[l]=P[d]=P[f]=P[h]=P[m]=P[b]=P[w]=P[T]=P[E]=P[O]=!1;var k="object"==typeof ut&&ut&&ut.Object===Object&&ut,R="object"==typeof self&&self&&self.Object===Object&&self,N=k||R||Function("return this")(),M=t&&!t.nodeType&&t,D=M&&e&&!e.nodeType&&e,L=D&&D.exports===M,F=L&&k.process,B=function(){try{return F&&F.binding&&F.binding("util")}catch(e){}}(),j=B&&B.isTypedArray;function U(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function z(e,t){return e.has(t)}function H(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function W(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var V=Array.prototype,G=Function.prototype,q=Object.prototype,K=N["__core-js_shared__"],X=G.toString,Y=q.hasOwnProperty,J=function(){var e=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Z=q.toString,Q=RegExp("^"+X.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=L?N.Buffer:void 0,ee=N.Symbol,te=N.Uint8Array,ne=q.propertyIsEnumerable,re=V.splice,ie=ee?ee.toStringTag:void 0,ae=Object.getOwnPropertySymbols,oe=$?$.isBuffer:void 0,se=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),ce=Le(N,"DataView"),ue=Le(N,"Map"),le=Le(N,"Promise"),de=Le(N,"Set"),fe=Le(N,"WeakMap"),pe=Le(Object,"create"),he=Ue(ce),me=Ue(ue),ye=Ue(le),be=Ue(de),ge=Ue(fe),ve=ee?ee.prototype:void 0,we=ve?ve.valueOf:void 0;function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ae(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ae;++t<n;)this.add(e[t])}function Oe(e){var t=this.__data__=new Ee(e);this.size=t.size}function Ce(e,t){var n=We(e),r=!n&&He(e),i=!n&&!r&&Ve(e),a=!n&&!r&&!i&&Je(e),o=n||r||i||a,s=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=s.length;for(var u in e)!t&&!Y.call(e,u)||o&&("length"==u||i&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||je(u,c))||s.push(u);return s}function Ie(e,t){for(var n=e.length;n--;)if(ze(e[n][0],t))return n;return-1}function Se(e){return null==e?void 0===e?x:y:ie&&ie in Object(e)?function(e){var t=Y.call(e,ie),n=e[ie];try{e[ie]=void 0;var r=!0}catch(e){}var i=Z.call(e);r&&(t?e[ie]=n:delete e[ie]);return i}(e):function(e){return Z.call(e)}(e)}function _e(e){return Xe(e)&&Se(e)==o}function Pe(e,t,n,a,c){return e===t||(null==e||null==t||!Xe(e)&&!Xe(t)?e!=e&&t!=t:function(e,t,n,a,c,f){var p=We(e),y=We(t),g=p?s:Be(e),v=y?s:Be(t),x=(g=g==o?b:g)==b,O=(v=v==o?b:v)==b,S=g==v;if(S&&Ve(e)){if(!Ve(t))return!1;p=!0,x=!1}if(S&&!x)return f||(f=new Oe),p||Je(e)?Ne(e,t,n,a,c,f):function(e,t,n,a,o,s,c){switch(n){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case C:return!(e.byteLength!=t.byteLength||!s(new te(e),new te(t)));case u:case l:case m:return ze(+e,+t);case d:return e.name==t.name&&e.message==t.message;case w:case E:return e==t+"";case h:var f=H;case T:var p=a&r;if(f||(f=W),e.size!=t.size&&!p)return!1;var y=c.get(e);if(y)return y==t;a|=i,c.set(e,t);var b=Ne(f(e),f(t),a,o,s,c);return c.delete(e),b;case A:if(we)return we.call(e)==we.call(t)}return!1}(e,t,g,n,a,c,f);if(!(n&r)){var _=x&&Y.call(e,"__wrapped__"),P=O&&Y.call(t,"__wrapped__");if(_||P){var k=_?e.value():e,R=P?t.value():t;return f||(f=new Oe),c(k,R,n,a,f)}}if(!S)return!1;return f||(f=new Oe),function(e,t,n,i,a,o){var s=n&r,c=Me(e),u=c.length,l=Me(t),d=l.length;if(u!=d&&!s)return!1;var f=u;for(;f--;){var p=c[f];if(!(s?p in t:Y.call(t,p)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var m=!0;o.set(e,t),o.set(t,e);var y=s;for(;++f<u;){var b=e[p=c[f]],g=t[p];if(i)var v=s?i(g,b,p,t,e,o):i(b,g,p,e,t,o);if(!(void 0===v?b===g||a(b,g,n,i,o):v)){m=!1;break}y||(y="constructor"==p)}if(m&&!y){var w=e.constructor,T=t.constructor;w==T||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof T&&T instanceof T||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,a,c,f)}(e,t,n,a,Pe,c))}function ke(e){return!(!Ke(e)||(t=e,J&&J in t))&&(Ge(e)?Q:S).test(Ue(e));var t}function Re(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||q,t!==r)return se(e);var t,n,r,i=[];for(var a in Object(e))Y.call(e,a)&&"constructor"!=a&&i.push(a);return i}function Ne(e,t,n,a,o,s){var c=n&r,u=e.length,l=t.length;if(u!=l&&!(c&&l>u))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var f=-1,p=!0,h=n&i?new xe:void 0;for(s.set(e,t),s.set(t,e);++f<u;){var m=e[f],y=t[f];if(a)var b=c?a(y,m,f,t,e,s):a(m,y,f,e,t,s);if(void 0!==b){if(b)continue;p=!1;break}if(h){if(!U(t,(function(e,t){if(!z(h,t)&&(m===e||o(m,e,n,a,s)))return h.push(t)}))){p=!1;break}}else if(m!==y&&!o(m,y,n,a,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function Me(e){return function(e,t,n){var r=t(e);return We(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Ze,Fe)}function De(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Le(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ke(n)?n:void 0}Te.prototype.clear=function(){this.__data__=pe?pe(null):{},this.size=0},Te.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Te.prototype.get=function(e){var t=this.__data__;if(pe){var r=t[e];return r===n?void 0:r}return Y.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__;return pe?void 0!==t[e]:Y.call(t,e)},Te.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=pe&&void 0===t?n:t,this},Ee.prototype.clear=function(){this.__data__=[],this.size=0},Ee.prototype.delete=function(e){var t=this.__data__,n=Ie(t,e);return!(n<0)&&(n==t.length-1?t.pop():re.call(t,n,1),--this.size,!0)},Ee.prototype.get=function(e){var t=this.__data__,n=Ie(t,e);return n<0?void 0:t[n][1]},Ee.prototype.has=function(e){return Ie(this.__data__,e)>-1},Ee.prototype.set=function(e,t){var n=this.__data__,r=Ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Ae.prototype.clear=function(){this.size=0,this.__data__={hash:new Te,map:new(ue||Ee),string:new Te}},Ae.prototype.delete=function(e){var t=De(this,e).delete(e);return this.size-=t?1:0,t},Ae.prototype.get=function(e){return De(this,e).get(e)},Ae.prototype.has=function(e){return De(this,e).has(e)},Ae.prototype.set=function(e,t){var n=De(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},xe.prototype.add=xe.prototype.push=function(e){return this.__data__.set(e,n),this},xe.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.clear=function(){this.__data__=new Ee,this.size=0},Oe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Oe.prototype.get=function(e){return this.__data__.get(e)},Oe.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ee){var r=n.__data__;if(!ue||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ae(r)}return n.set(e,t),this.size=n.size,this};var Fe=ae?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}(ae(e),(function(t){return ne.call(e,t)})))}:function(){return[]},Be=Se;function je(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||_.test(e))&&e>-1&&e%1==0&&e<t}function Ue(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function ze(e,t){return e===t||e!=e&&t!=t}(ce&&Be(new ce(new ArrayBuffer(1)))!=I||ue&&Be(new ue)!=h||le&&Be(le.resolve())!=g||de&&Be(new de)!=T||fe&&Be(new fe)!=O)&&(Be=function(e){var t=Se(e),n=t==b?e.constructor:void 0,r=n?Ue(n):"";if(r)switch(r){case he:return I;case me:return h;case ye:return g;case be:return T;case ge:return O}return t});var He=_e(function(){return arguments}())?_e:function(e){return Xe(e)&&Y.call(e,"callee")&&!ne.call(e,"callee")},We=Array.isArray;var Ve=oe||function(){return!1};function Ge(e){if(!Ke(e))return!1;var t=Se(e);return t==f||t==p||t==c||t==v}function qe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Ke(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Xe(e){return null!=e&&"object"==typeof e}var Ye,Je=j?(Ye=j,function(e){return Ye(e)}):function(e){return Xe(e)&&qe(e.length)&&!!P[Se(e)]};function Ze(e){return null!=(t=e)&&qe(t.length)&&!Ge(t)?Ce(e):Re(e);var t}e.exports=function(e,t){return Pe(e,t)}}(VYe,VYe.exports);var GYe=lt(VYe.exports),qYe=dt(tNe),KYe=lt(self.fetch||(self.fetch=qYe.default||qYe));var XYe=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var a=e.charAt(i),o=a.charCodeAt(0);if(255!==n[o])throw new TypeError(a+" is ambiguous");n[o]=i}var s=e.length,c=e.charAt(0),u=Math.log(s)/Math.log(256),l=Math.log(256)/Math.log(s);function d(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===c;)r++,t++;for(var a=(e.length-t)*u+1>>>0,o=new Uint8Array(a);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var d=0,f=a-1;(0!==l||d<i)&&-1!==f;f--,d++)l+=s*o[f]>>>0,o[f]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var p=a-i;p!==a&&0===o[p];)p++;for(var h=new Uint8Array(r+(a-p)),m=r;p!==a;)h[m++]=o[p++];return h}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,a=t.length;i!==a&&0===t[i];)i++,n++;for(var o=(a-i)*l+1>>>0,u=new Uint8Array(o);i!==a;){for(var d=t[i],f=0,p=o-1;(0!==d||f<r)&&-1!==p;p--,f++)d+=256*u[p]>>>0,u[p]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");r=f,i++}for(var h=o-r;h!==o&&0===u[h];)h++;for(var m=c.repeat(n);h<o;++h)m+=e.charAt(u[h]);return m},decodeUnsafe:d,decode:function(e){var n=d(e);if(n)return n;throw new Error(`Non-${t} character`)}}},YYe=XYe;const JYe=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class ZYe{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class QYe{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return eJe(this,e)}}class $Ye{constructor(e){this.decoders=e}or(e){return eJe(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const eJe=(e,t)=>new $Ye({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class tJe{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new ZYe(e,t,n),this.decoder=new QYe(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const nJe=({name:e,prefix:t,encode:n,decode:r})=>new tJe(e,t,n,r),rJe=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=YYe(n,t);return nJe({prefix:e,name:t,encode:r,decode:e=>JYe(i(e))})},iJe=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>nJe({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let a="",o=0,s=0;for(let r=0;r<e.length;++r)for(s=s<<8|e[r],o+=8;o>n;)o-=n,a+=t[i&s>>o];if(o&&(a+=t[i&s<<n-o]),r)for(;a.length*n&7;)a+="=";return a})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let a=e.length;for(;"="===e[a-1];)--a;const o=new Uint8Array(a*n/8|0);let s=0,c=0,u=0;for(let t=0;t<a;++t){const a=i[e[t]];if(void 0===a)throw new SyntaxError(`Non-${r} character`);c=c<<n|a,s+=n,s>=8&&(s-=8,o[u++]=255&c>>s)}if(s>=n||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return o})(t,r,n,e)}),aJe=nJe({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var oJe=Object.freeze({__proto__:null,identity:aJe});const sJe=iJe({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var cJe=Object.freeze({__proto__:null,base2:sJe});const uJe=iJe({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var lJe=Object.freeze({__proto__:null,base8:uJe});const dJe=rJe({prefix:"9",name:"base10",alphabet:"0123456789"});var fJe=Object.freeze({__proto__:null,base10:dJe});const pJe=iJe({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),hJe=iJe({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var mJe=Object.freeze({__proto__:null,base16:pJe,base16upper:hJe});const yJe=iJe({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),bJe=iJe({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),gJe=iJe({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),vJe=iJe({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),wJe=iJe({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),TJe=iJe({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),EJe=iJe({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),AJe=iJe({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),xJe=iJe({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var OJe=Object.freeze({__proto__:null,base32:yJe,base32upper:bJe,base32pad:gJe,base32padupper:vJe,base32hex:wJe,base32hexupper:TJe,base32hexpad:EJe,base32hexpadupper:AJe,base32z:xJe});const CJe=rJe({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),IJe=rJe({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var SJe=Object.freeze({__proto__:null,base36:CJe,base36upper:IJe});const _Je=rJe({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),PJe=rJe({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var kJe=Object.freeze({__proto__:null,base58btc:_Je,base58flickr:PJe});const RJe=iJe({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),NJe=iJe({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),MJe=iJe({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),DJe=iJe({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var LJe=Object.freeze({__proto__:null,base64:RJe,base64pad:NJe,base64url:MJe,base64urlpad:DJe});const FJe=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),BJe=FJe.reduce(((e,t,n)=>(e[n]=t,e)),[]),jJe=FJe.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const UJe=nJe({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=BJe[t]),"")},decode:function(e){const t=[];for(const n of e){const e=jJe[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var zJe=Object.freeze({__proto__:null,base256emoji:UJe}),HJe=function e(t,n,r){n=n||[];for(var i=r=r||0;t>=GJe;)n[r++]=255&t|WJe,t/=128;for(;t&VJe;)n[r++]=255&t|WJe,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},WJe=128,VJe=-128,GJe=Math.pow(2,31);var qJe=function e(t,n){var r,i=0,a=(n=n||0,0),o=n,s=t.length;do{if(o>=s)throw e.bytes=0,new RangeError("Could not decode varint");r=t[o++],i+=a<28?(r&XJe)<<a:(r&XJe)*Math.pow(2,a),a+=7}while(r>=KJe);return e.bytes=o-n,i},KJe=128,XJe=127;var YJe=Math.pow(2,7),JJe=Math.pow(2,14),ZJe=Math.pow(2,21),QJe=Math.pow(2,28),$Je=Math.pow(2,35),eZe=Math.pow(2,42),tZe=Math.pow(2,49),nZe=Math.pow(2,56),rZe=Math.pow(2,63),iZe={encode:HJe,decode:qJe,encodingLength:function(e){return e<YJe?1:e<JJe?2:e<ZJe?3:e<QJe?4:e<$Je?5:e<eZe?6:e<tZe?7:e<nZe?8:e<rZe?9:10}},aZe=iZe;const oZe=(e,t,n=0)=>(aZe.encode(e,t,n),t),sZe=e=>aZe.encodingLength(e),cZe=(e,t)=>{const n=t.byteLength,r=sZe(e),i=r+sZe(n),a=new Uint8Array(i+n);return oZe(e,a,0),oZe(n,a,r),a.set(t,i),new uZe(e,n,t,a)};let uZe=class{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}};const lZe=({name:e,code:t,encode:n})=>new dZe(e,t,n);let dZe=class{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?cZe(this.code,t):t.then((e=>cZe(this.code,e)))}throw Error("Unknown type, must be binary type")}};const fZe=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),pZe=lZe({name:"sha2-256",code:18,encode:fZe("SHA-256")}),hZe=lZe({name:"sha2-512",code:19,encode:fZe("SHA-512")});Object.freeze({__proto__:null,sha256:pZe,sha512:hZe});const mZe=JYe,yZe={code:0,name:"identity",encode:mZe,digest:e=>cZe(0,mZe(e))};Object.freeze({__proto__:null,identity:yZe});new TextEncoder,new TextDecoder;const bZe={...oJe,...cJe,...lJe,...fJe,...mJe,...OJe,...SJe,...kJe,...LJe,...zJe};function gZe(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function vZe(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const wZe=vZe("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),TZe=vZe("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{const t=function(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?gZe(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),EZe={utf8:wZe,"utf-8":wZe,hex:bZe.base16,latin1:TZe,ascii:TZe,binary:TZe,...bZe};const AZe="core",xZe=`wc@2:${AZe}:`,OZe="error",CZe={database:":memory:"},IZe="client_ed25519_seed",SZe=fGe.ONE_DAY,_Ze=fGe.SIX_HOURS,PZe="wss://relay.walletconnect.com",kZe="wss://relay.walletconnect.org",RZe="relayer_message",NZe="relayer_message_ack",MZe="relayer_connect",DZe="relayer_disconnect",LZe="relayer_error",FZe="relayer_connection_stalled",BZe="relayer_publish",jZe="payload",UZe="connect",zZe="disconnect",HZe="error",WZe=fGe.ONE_SECOND,VZe="subscription_created",GZe="subscription_deleted",qZe="subscription_sync",KZe="subscription_resubscribed",XZe=1e3*fGe.FIVE_SECONDS,YZe={wc_pairingDelete:{req:{ttl:fGe.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:fGe.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:fGe.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:fGe.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:fGe.ONE_DAY,prompt:!1,tag:0},res:{ttl:fGe.ONE_DAY,prompt:!1,tag:0}}},JZe="pairing_create",ZZe="pairing_expire",QZe="pairing_delete",$Ze="pairing_ping",eQe="history_created",tQe="history_updated",nQe="history_deleted",rQe="history_sync",iQe="expirer_created",aQe="expirer_deleted",oQe="expirer_expired",sQe="expirer_sync",cQe="verify-api",uQe="https://verify.walletconnect.com",lQe="https://verify.walletconnect.org",dQe=[uQe,lQe];let fQe=class extends BXe{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=xZe,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const e=await this.getRelayerMessages();typeof e<"u"&&(this.messages=e),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}finally{this.initialized=!0}}},this.set=async(e,t)=>{this.isInitialized();const n=fqe(t);let r=this.messages.get(e);return typeof r>"u"&&(r={}),typeof r[n]<"u"||(r[n]=t,this.messages.set(e,r),await this.persist()),n},this.get=e=>{this.isInitialized();let t=this.messages.get(e);return typeof t>"u"&&(t={}),t},this.has=(e,t)=>{this.isInitialized();return typeof this.get(e)[fqe(t)]<"u"},this.del=async e=>{this.isInitialized(),this.messages.delete(e),await this.persist()},this.logger=_Xe.generateChildLogger(e,this.name),this.core=t}get context(){return _Xe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,Mqe(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Dqe(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}}};class pQe extends jXe{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new QHe,this.name="publisher",this.queue=new Map,this.publishTimeout=fGe.toMiliseconds(2*fGe.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=async(e,t,n)=>{var r;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:n}});try{const i=n?.ttl||_Ze,a=Vqe(n),o=n?.prompt||!1,s=n?.tag||0,c=n?.id||xYe().toString(),u={topic:e,message:t,opts:{ttl:i,relay:a,prompt:o,tag:s,id:c}},l=setTimeout((()=>this.queue.set(c,u)),this.publishTimeout);try{await await Fqe(this.rpcPublish(e,t,i,a,o,s,c),this.publishTimeout,`Failed to publish payload, please try again. id:${c} tag:${s}`),this.removeRequestFromQueue(c),this.relayer.events.emit(BZe,u)}catch(e){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,null!=(r=n?.internal)&&r.throwOnFailedPublish)throw this.removeRequestFromQueue(c),e;return}finally{clearTimeout(l)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:n}})}catch(e){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(e),e}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.relayer=e,this.logger=_Xe.generateChildLogger(t,this.name),this.registerEventListeners()}get context(){return _Xe.getLoggerContext(this.logger)}rpcPublish(e,t,n,r,i,a,o){var s,c,u,l;const d={method:Gqe(r.protocol).publish,params:{topic:e,message:t,ttl:n,prompt:i,tag:a},id:o};return fKe(null==(s=d.params)?void 0:s.prompt)&&(null==(c=d.params)||delete c.prompt),fKe(null==(u=d.params)?void 0:u.tag)&&(null==(l=d.params)||delete l.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:d}),this.relayer.request(d)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach((async e=>{const{topic:t,message:n,opts:r}=e;await this.publish(t,n,r)}))}registerEventListeners(){this.relayer.core.heartbeat.on(uXe.HEARTBEAT_EVENTS.pulse,(()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(FZe);this.checkQueue()})),this.relayer.on(NZe,(e=>{this.removeRequestFromQueue(e.id.toString())}))}}class hQe{constructor(){this.map=new Map,this.set=(e,t)=>{const n=this.get(e);this.exists(e,t)||this.map.set(e,[...n,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u")return void this.map.delete(e);if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,t))return;const r=n.filter((e=>e!==t));r.length?this.map.set(e,r):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var mQe=Object.defineProperty,yQe=Object.defineProperties,bQe=Object.getOwnPropertyDescriptors,gQe=Object.getOwnPropertySymbols,vQe=Object.prototype.hasOwnProperty,wQe=Object.prototype.propertyIsEnumerable,TQe=(e,t,n)=>t in e?mQe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,EQe=(e,t)=>{for(var n in t||(t={}))vQe.call(t,n)&&TQe(e,n,t[n]);if(gQe)for(var n of gQe(t))wQe.call(t,n)&&TQe(e,n,t[n]);return e},AQe=(e,t)=>yQe(e,bQe(t));let xQe=class extends HXe{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new hQe,this.events=new QHe,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=xZe,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}});try{const n=Vqe(t),r={topic:e,relay:n};this.pending.set(e,r);const i=await this.rpcSubscribe(e,n);return this.onSubscribe(i,r),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}}),i}catch(e){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(e),e}},this.unsubscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),typeof t?.id<"u"?await this.unsubscribeById(e,t.id,t):await this.unsubscribeByTopic(e,t)},this.isSubscribed=async e=>{if(this.topics.includes(e))return!0;const t=`${this.pendingSubscriptionWatchLabel}_${e}`;return await new Promise(((n,r)=>{const i=new fGe.Watch;i.start(t);const a=setInterval((()=>{!this.pending.has(e)&&this.topics.includes(e)&&(clearInterval(a),i.stop(t),n(!0)),i.elapsed(t)>=XZe&&(clearInterval(a),i.stop(t),r(new Error("Subscription resolution timeout")))}),this.pollingInterval)})).catch((()=>!1))},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=_Xe.generateChildLogger(t,this.name),this.clientId=""}get context(){return _Xe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let n=!1;try{n=this.getSubscription(e).topic===t}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const n=this.topicMap.get(e);await Promise.all(n.map((async n=>await this.unsubscribeById(e,n,t))))}async unsubscribeById(e,t,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}});try{const r=Vqe(n);await this.rpcUnsubscribe(e,t,r);const i=uKe("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}})}catch(e){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(e),e}}async rpcSubscribe(e,t){const n={method:Gqe(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await Fqe(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(FZe)}return fqe(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const t={method:Gqe(e[0].relay.protocol).batchSubscribe,params:{topics:e.map((e=>e.topic))}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:t});try{return await await Fqe(this.relayer.request(t),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(FZe)}}rpcUnsubscribe(e,t,n){const r={method:Gqe(n.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r}),this.relayer.request(r)}onSubscribe(e,t){this.setSubscription(e,AQe(EQe({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach((e=>{this.setSubscription(e.id,EQe({},e)),this.pending.delete(e.topic)}))}async onUnsubscribe(e,t,n){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t))}addSubscription(e,t){this.subscriptions.set(e,EQe({},t)),this.topicMap.set(t.topic,e),this.events.emit(VZe,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:t}=cKe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(GZe,AQe(EQe({},n),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(qZe)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t<e;t++){const e=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(e)}}this.events.emit(KZe)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:e}=cKe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);lKe(t)&&this.onBatchSubscribe(t.map(((t,n)=>AQe(EQe({},e[n]),{id:t}))))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach((t=>{e.push(t)})),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(uXe.HEARTBEAT_EVENTS.pulse,(async()=>{await this.checkPending()})),this.relayer.on(MZe,(async()=>{await this.onConnect()})),this.relayer.on(DZe,(()=>{this.onDisconnect()})),this.events.on(VZe,(async e=>{const t=VZe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})),this.events.on(GZe,(async e=>{const t=GZe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise((e=>{const t=setInterval((()=>{this.restartInProgress||(clearInterval(t),e())}),this.pollingInterval)}))}};var OQe=Object.defineProperty,CQe=Object.getOwnPropertySymbols,IQe=Object.prototype.hasOwnProperty,SQe=Object.prototype.propertyIsEnumerable,_Qe=(e,t,n)=>t in e?OQe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let PQe=class extends UXe{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new QHe,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.request=async e=>{this.logger.debug("Publishing Request Payload");const t=e.id,n=this.provider.request(e);this.requestsInFlight.set(t,{promise:n,request:e});try{return await this.toEstablishConnection(),await n}catch(e){throw this.logger.debug("Failed to Publish Request"),this.logger.error(e),e}finally{this.requestsInFlight.delete(t)}},this.onPayloadHandler=e=>{this.onProviderPayload(e)},this.onConnectHandler=()=>{this.events.emit(MZe)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=e=>{this.logger.error(e),this.events.emit(LZe,e),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(jZe,this.onPayloadHandler),this.provider.on(UZe,this.onConnectHandler),this.provider.on(zZe,this.onDisconnectHandler),this.provider.on(HZe,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?_Xe.generateChildLogger(e.logger,this.name):_Xe.pino(_Xe.getDefaultLoggerOptions({level:e.logger||"error"})),this.messages=new fQe(this.logger,e.core),this.subscriber=new xQe(this,this.logger),this.publisher=new pQe(this,this.logger),this.relayUrl=e?.relayUrl||PZe,this.projectId=e.projectId,this.bundleId=function(){var e;try{return Sqe()&&typeof global<"u"&&typeof(null==global?void 0:global.Application)<"u"?null==(e=global.Application)?void 0:e.applicationId:void 0}catch{return}}(),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${kZe}...`),await this.restartTransport(kZe)}this.initialized=!0,setTimeout((async()=>{0===this.subscriber.topics.length&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)}),1e4)}get context(){return _Xe.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,t,n){this.isInitialized(),await this.publisher.publish(e,t,n),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var n;this.isInitialized();let r,i=(null==(n=this.subscriber.topicMap.get(e))?void 0:n[0])||"";if(i)return i;const a=t=>{t.topic===e&&(this.subscriber.off(VZe,a),r())};return await Promise.all([new Promise((e=>{r=e,this.subscriber.on(VZe,a)})),new Promise((async n=>{i=await this.subscriber.subscribe(e,t),n()}))]),i}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportClose(){this.requestsInFlight.size>0&&(this.logger.debug("Waiting for all in-flight requests to finish before closing transport..."),this.requestsInFlight.forEach((async e=>{await e.promise}))),this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await Fqe(this.provider.disconnect(),1e3,"provider.disconnect()").catch((()=>this.onProviderDisconnect())):this.connected&&await this.provider.disconnect()}async transportOpen(e){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise((e=>{if(!this.initialized)return e();this.subscriber.once(KZe,(()=>{e()}))})),new Promise((async(e,t)=>{try{await Fqe(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(e){return void t(e)}e()}))])}catch(e){this.logger.error(e);const t=e;if(!this.isConnectionStalled(t.message))throw e;this.provider.events.emit(zZe)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(e){await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await SKe())throw new Error("No internet connection detected. Please restart your network and try again.")}isConnectionStalled(e){return this.staleConnectionErrors.some((t=>e.includes(t)))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new zYe(new class{constructor(e){if(this.url=e,this.events=new QHe,this.registering=!1,!MYe(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise(((e,t)=>{typeof this.socket>"u"?t(new Error("Connection already closed")):(this.socket.onclose=t=>{this.onClose(t),e()},this.socket.close())}))}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(rXe(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!MYe(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return t(new Error("WebSocket connection is missing or invalid"));e(this.socket)}))}))}return this.url=e,this.registering=!0,new Promise(((t,n)=>{const r=new URLSearchParams(e).get("origin"),i=vYe.isReactNative()?{headers:{origin:r}}:{rejectUnauthorized:!DYe(e)},a=new WYe(e,[],i);typeof WebSocket<"u"||typeof global<"u"&&typeof global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u"?a.onerror=e=>{const t=e;n(this.emitError(t.error))}:a.on("error",(e=>{n(this.emitError(e))})),a.onopen=()=>{this.onOpen(a),t(a)}}))}onOpen(e){e.onmessage=e=>this.onPayload(e),e.onclose=e=>this.onClose(e),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?nXe(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=IYe(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return bYe(e,HYe(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const t=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${HYe(this.url)}`));return this.events.emit("register_error",t),t}}(Rqe({sdkVersion:"2.11.1",protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:n}=e;await this.messages.set(t,n)}async shouldIgnoreMessageEvent(e){const{topic:t,message:n}=e;if(!n||0===n.length)return this.logger.debug(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const r=this.messages.has(t,n);return r&&this.logger.debug(`Ignoring duplicate message: ${n}`),r}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),FYe(e)){if(!e.method.endsWith("_subscription"))return;const t=e.params,{topic:n,message:r,publishedAt:i}=t.data,a={topic:n,message:r,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(((e,t)=>{for(var n in t||(t={}))IQe.call(t,n)&&_Qe(e,n,t[n]);if(CQe)for(var n of CQe(t))SQe.call(t,n)&&_Qe(e,n,t[n]);return e})({type:"event",event:t.id},a)),this.events.emit(t.id,a),await this.acknowledgePayload(e),await this.onMessageEvent(a)}else BYe(e)&&this.events.emit(NZe,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(RZe,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=CYe(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(jZe,this.onPayloadHandler),this.provider.off(UZe,this.onConnectHandler),this.provider.off(zZe,this.onDisconnectHandler),this.provider.off(HZe,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(FZe,(()=>{this.restartTransport().catch((e=>this.logger.error(e)))}));let e=await SKe();_Ke((async t=>{this.initialized&&e!==t&&(e=t,t?await this.restartTransport().catch((e=>this.logger.error(e))):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch((e=>this.logger.error(e)))))}))}onProviderDisconnect(){this.events.emit(DZe),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout((async()=>{await this.restartTransport().catch((e=>this.logger.error(e)))}),fGe.toMiliseconds(WZe)))}isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise((e=>{const t=setInterval((()=>{this.connected&&(clearInterval(t),e())}),this.connectionStatusPollingInterval)}));await this.restartTransport()}}};var kQe=Object.defineProperty,RQe=Object.getOwnPropertySymbols,NQe=Object.prototype.hasOwnProperty,MQe=Object.prototype.propertyIsEnumerable,DQe=(e,t,n)=>t in e?kQe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LQe=(e,t)=>{for(var n in t||(t={}))NQe.call(t,n)&&DQe(e,n,t[n]);if(RQe)for(var n of RQe(t))MQe.call(t,n)&&DQe(e,n,t[n]);return e};let FQe=class extends zXe{constructor(e,t,n,r=xZe,i=void 0){super(e,t,n,r),this.core=e,this.logger=t,this.name=n,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=xZe,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>{this.getKey&&null!==e&&!fKe(e)?this.map.set(this.getKey(e),e):function(e){var t;return null==(t=e?.proposer)?void 0:t.publicKey}(e)?this.map.set(e.id,e):function(e){return e?.topic}(e)&&this.map.set(e.topic,e)})),this.cached=[],this.initialized=!0)},this.set=async(e,t)=>{this.isInitialized(),this.map.has(e)?await this.update(e,t):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:e,value:t}),this.map.set(e,t),await this.persist())},this.get=e=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:e}),this.getData(e)),this.getAll=e=>(this.isInitialized(),e?this.values.filter((t=>Object.keys(e).every((n=>GYe(t[n],e[n]))))):this.values),this.update=async(e,t)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:e,update:t});const n=LQe(LQe({},this.getData(e)),t);this.map.set(e,n),await this.persist()},this.delete=async(e,t)=>{this.isInitialized(),this.map.has(e)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:e,reason:t}),this.map.delete(e),await this.persist())},this.logger=_Xe.generateChildLogger(t,this.name),this.storagePrefix=r,this.getKey=i}get context(){return _Xe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){const{message:t}=cKe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:e}=cKe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}}},BQe=class extends FXe{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new QHe,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=xZe,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.records.set(e.id,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(e,t,n)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:e,request:t,chainId:n}),this.records.has(t.id))return;const r={id:t.id,topic:e,request:{method:t.method,params:t.params||null},chainId:n,expiry:Uqe(fGe.THIRTY_DAYS)};this.records.set(r.id,r),this.events.emit(eQe,r)},this.resolve=async e=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:e}),!this.records.has(e.id))return;const t=await this.getRecord(e.id);typeof t.response>"u"&&(t.response=UYe(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.events.emit(tQe,t))},this.get=async(e,t)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:e,id:t}),await this.getRecord(t)),this.delete=(e,t)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:t}),this.values.forEach((n=>{if(n.topic===e){if(typeof t<"u"&&n.id!==t)return;this.records.delete(n.id),this.events.emit(nQe,n)}}))},this.exists=async(e,t)=>(this.isInitialized(),!!this.records.has(t)&&(await this.getRecord(t)).topic===e),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=_Xe.generateChildLogger(t,this.name)}get context(){return _Xe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach((t=>{if(typeof t.response<"u")return;const n={topic:t.topic,request:OYe(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(n)})),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:t}=cKe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(rQe)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:e}=cKe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(eQe,(e=>{const t=eQe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(tQe,(e=>{const t=tQe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(nQe,(e=>{const t=nQe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.core.heartbeat.on(uXe.HEARTBEAT_EVENTS.pulse,(()=>{this.cleanup()}))}cleanup(){try{this.records.forEach((e=>{fGe.toMiliseconds(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))}))}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}}},jQe=class extends WXe{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new QHe,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=xZe,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.expirations.set(e.target,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=e=>{try{const t=this.formatTarget(e);return typeof this.getExpiration(t)<"u"}catch{return!1}},this.set=(e,t)=>{this.isInitialized();const n=this.formatTarget(e),r={target:n,expiry:t};this.expirations.set(n,r),this.checkExpiry(n,r),this.events.emit(iQe,{target:n,expiration:r})},this.get=e=>{this.isInitialized();const t=this.formatTarget(e);return this.getExpiration(t)},this.del=e=>{if(this.isInitialized(),this.has(e)){const t=this.formatTarget(e),n=this.getExpiration(t);this.expirations.delete(t),this.events.emit(aQe,{target:t,expiration:n})}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=_Xe.generateChildLogger(t,this.name)}get context(){return _Xe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return function(e){return Bqe("topic",e)}(e);if("number"==typeof e)return function(e){return Bqe("id",e)}(e);const{message:t}=cKe("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(sQe)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:e}=cKe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:t}=cKe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}checkExpiry(e,t){const{expiry:n}=t;fGe.toMiliseconds(n)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(oQe,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach(((e,t)=>this.checkExpiry(t,e)))}registerEventListeners(){this.core.heartbeat.on(uXe.HEARTBEAT_EVENTS.pulse,(()=>this.checkExpirations())),this.events.on(iQe,(e=>{const t=iQe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(oQe,(e=>{const t=oQe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(aQe,(e=>{const t=aQe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}}},UQe=class extends VXe{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=cQe,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async e=>{if(this.verifyDisabled||Sqe()||!_qe())return;const t=this.getVerifyUrl(e?.verifyUrl);this.verifyUrl!==t&&this.removeIframe(),this.verifyUrl=t;try{await this.createIframe()}catch(e){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(e)}if(!this.initialized){this.removeIframe(),this.verifyUrl=lQe;try{await this.createIframe()}catch(e){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(e),this.verifyDisabled=!0}}},this.register=async e=>{this.initialized?this.sendPost(e.attestationId):(this.addToQueue(e.attestationId),await this.init())},this.resolve=async e=>{if(this.isDevEnv)return"";const t=this.getVerifyUrl(e?.verifyUrl);let n;try{n=await this.fetchAttestation(e.attestationId,t)}catch(r){this.logger.info(`failed to resolve attestation: ${e.attestationId} from url: ${t}`),this.logger.info(r),n=await this.fetchAttestation(e.attestationId,lQe)}return n},this.fetchAttestation=async(e,t)=>{this.logger.info(`resolving attestation: ${e} from url: ${t}`);const n=this.startAbortTimer(2*fGe.ONE_SECOND),r=await fetch(`${t}/attestation/${e}`,{signal:this.abortController.signal});return clearTimeout(n),200===r.status?await r.json():void 0},this.addToQueue=e=>{this.queue.push(e)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach((e=>this.sendPost(e))),this.queue=[])},this.sendPost=e=>{var t;try{if(!this.iframe)return;null==(t=this.iframe.contentWindow)||t.postMessage(e,"*"),this.logger.info(`postMessage sent: ${e} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let e;const t=n=>{"verify_ready"===n.data&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",t),e())};await Promise.race([new Promise((n=>{if(document.getElementById(cQe))return n();window.addEventListener("message",t);const r=document.createElement("iframe");r.id=cQe,r.src=`${this.verifyUrl}/${this.projectId}`,r.style.display="none",document.body.append(r),this.iframe=r,e=n})),new Promise(((e,n)=>setTimeout((()=>{window.removeEventListener("message",t),n("verify iframe load timeout")}),fGe.toMiliseconds(fGe.FIVE_SECONDS))))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=e=>{let t=e||uQe;return dQe.includes(t)||(this.logger.info(`verify url: ${t}, not included in trusted list, assigning default: ${uQe}`),t=uQe),t},this.logger=_Xe.generateChildLogger(t,this.name),this.verifyUrl=uQe,this.abortController=new AbortController,this.isDevEnv=Iqe()&&process.env.IS_VITEST}get context(){return _Xe.getLoggerContext(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout((()=>this.abortController.abort()),fGe.toMiliseconds(e))}},zQe=class extends GXe{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context="echo",this.registerDeviceToken=async e=>{const{clientId:t,token:n,notificationType:r,enableEncrypted:i=!1}=e,a=`https://echo.walletconnect.com/${this.projectId}/clients`;await KYe(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:t,type:r,token:n,always_raw:i})})},this.logger=_Xe.generateChildLogger(t,this.context)}};var HQe=Object.defineProperty,WQe=Object.getOwnPropertySymbols,VQe=Object.prototype.hasOwnProperty,GQe=Object.prototype.propertyIsEnumerable,qQe=(e,t,n)=>t in e?HQe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,KQe=(e,t)=>{for(var n in t||(t={}))VQe.call(t,n)&&qQe(e,n,t[n]);if(WQe)for(var n of WQe(t))GQe.call(t,n)&&qQe(e,n,t[n]);return e};const XQe=class e extends LXe{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=AZe,this.events=new QHe,this.initialized=!1,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||PZe,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:_Xe.pino(_Xe.getDefaultLoggerOptions({level:e?.logger||OZe}));this.logger=_Xe.generateChildLogger(t,this.name),this.heartbeat=new uXe.HeartBeat,this.crypto=new class{constructor(e,t,n){this.core=e,this.logger=t,this.name="crypto",this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=e=>(this.isInitialized(),this.keychain.has(e)),this.getClientId=async()=>(this.isInitialized(),sYe(uYe(await this.getClientSeed()).publicKey)),this.generateKeyPair=()=>{this.isInitialized();const e=function(){const e=YWe.generateKeyPair();return{privateKey:QVe(e.secretKey,nqe),publicKey:QVe(e.publicKey,nqe)}}();return this.setPrivateKey(e.publicKey,e.privateKey)},this.signJWT=async e=>{this.isInitialized();const t=uYe(await this.getClientSeed()),n=dqe(),r=SZe;return await lYe(n,e,r,t)},this.generateSharedKey=(e,t,n)=>{this.isInitialized();const r=function(e,t){const n=YWe.sharedKey(ZVe(e,nqe),ZVe(t,nqe),!0);return QVe(new UWe(XWe.SHA256,n).expand(lqe),nqe)}(this.getPrivateKey(e),t);return this.setSymKey(r,n)},this.setSymKey=async(e,t)=>{this.isInitialized();const n=t||function(e){return QVe(XWe.hash(ZVe(e,nqe)),nqe)}(e);return await this.keychain.set(n,e),n},this.deleteKeyPair=async e=>{this.isInitialized(),await this.keychain.del(e)},this.deleteSymKey=async e=>{this.isInitialized(),await this.keychain.del(e)},this.encode=async(e,t,n)=>{this.isInitialized();const r=yqe(n),i=rXe(t);if(bqe(r)){const t=r.senderPublicKey,n=r.receiverPublicKey;e=await this.generateSharedKey(t,n)}const a=this.getSymKey(e),{type:o,senderPublicKey:s}=r;return hqe({type:o,symKey:a,message:i,senderPublicKey:s})},this.decode=async(e,t,n)=>{this.isInitialized();const r=function(e,t){const n=mqe(e);return yqe({type:pqe(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?QVe(n.senderPublicKey,nqe):void 0,receiverPublicKey:t?.receiverPublicKey})}(t,n);if(bqe(r)){const t=r.receiverPublicKey,n=r.senderPublicKey;e=await this.generateSharedKey(t,n)}try{const n=function(e){const t=new aWe.ChaCha20Poly1305(ZVe(e.symKey,nqe)),{sealed:n,iv:r}=mqe(e.encoded),i=t.open(r,n);if(null===i)throw new Error("Failed to decrypt");return QVe(i,iqe)}({symKey:this.getSymKey(e),encoded:t});return nXe(n)}catch(t){this.logger.error(`Failed to decode message from topic: '${e}', clientId: '${await this.getClientId()}'`),this.logger.error(t)}},this.getPayloadType=e=>pqe(mqe(e).type),this.getPayloadSenderPublicKey=e=>{const t=mqe(e);return t.senderPublicKey?QVe(t.senderPublicKey,nqe):void 0},this.core=e,this.logger=_Xe.generateChildLogger(t,this.name),this.keychain=n||new class{constructor(e,t){this.core=e,this.logger=t,this.keychain=new Map,this.name="keychain",this.version="0.3",this.initialized=!1,this.storagePrefix=xZe,this.init=async()=>{if(!this.initialized){const e=await this.getKeyChain();typeof e<"u"&&(this.keychain=e),this.initialized=!0}},this.has=e=>(this.isInitialized(),this.keychain.has(e)),this.set=async(e,t)=>{this.isInitialized(),this.keychain.set(e,t),await this.persist()},this.get=e=>{this.isInitialized();const t=this.keychain.get(e);if(typeof t>"u"){const{message:t}=cKe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t},this.del=async e=>{this.isInitialized(),this.keychain.delete(e),await this.persist()},this.core=e,this.logger=_Xe.generateChildLogger(t,this.name)}get context(){return _Xe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,Mqe(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Dqe(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}}}(this.core,this.logger)}get context(){return _Xe.getLoggerContext(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(IZe)}catch{e=dqe(),await this.keychain.set(IZe,e)}return function(e,t="utf8"){const n=EZe[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${e}`):gZe(globalThis.Buffer.from(e,"utf-8"))}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}}}(this,this.logger,e?.keychain),this.history=new BQe(this,this.logger),this.expirer=new jQe(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new class{constructor(){this.initialized=!1,this.setInitialized=e=>{this.storage=e,this.initialized=!0};const e=new class{constructor(){this.localStorage=oXe.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(sXe)}async getItem(e){const t=this.localStorage.getItem(e);if(null!==t)return nXe(t)}async setItem(e,t){this.localStorage.setItem(e,rXe(t))}async removeItem(e){this.localStorage.removeItem(e)}};this.storage=e;try{const t=new class{constructor(){this.indexedDb=GKe({driver:iXe({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map((e=>[e.key,e.value]))}async getItem(e){const t=await this.indexedDb.getItem(e);if(null!==t)return t}async setItem(e,t){await this.indexedDb.setItem(e,rXe(t))}async removeItem(e){await this.indexedDb.removeItem(e)}};(async(e,t,n)=>{const r="wc_storage_version",i=await t.getItem(r);if(i&&i>=1)return void n(t);const a=await e.getKeys();if(!a.length)return void n(t);const o=[];for(;a.length;){const n=a.shift();if(!n)continue;const r=n.toLowerCase();if(r.includes("wc@")||r.includes("walletconnect")||r.includes("wc_")||r.includes("wallet_connect")){const r=await e.getItem(n);await t.setItem(n,r),o.push(n)}}await t.setItem(r,1),n(t),cXe(e,o)})(e,t,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise((e=>{const t=setInterval((()=>{this.initialized&&(clearInterval(t),e())}),20)}))}}(KQe(KQe({},CZe),e?.storageOptions)),this.relayer=new PQe({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new class{constructor(e,t){this.core=e,this.logger=t,this.name="pairing",this.version="0.3",this.events=new QHe,this.initialized=!1,this.storagePrefix=xZe,this.ignoredPayloadTypes=[oqe],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:e})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...e])]},this.create=async()=>{this.isInitialized();const e=dqe(),t=await this.core.crypto.setSymKey(e),n=Uqe(fGe.FIVE_MINUTES),r={protocol:"irn"},i={topic:t,expiry:n,relay:r,active:!1},a=nKe({protocol:this.core.protocol,version:this.core.version,topic:t,symKey:e,relay:r,expiryTimestamp:n});return await this.pairings.set(t,i),await this.core.relayer.subscribe(t),this.core.expirer.set(t,n),{topic:t,uri:a}},this.pair=async e=>{this.isInitialized(),this.isValidPair(e);const{topic:t,symKey:n,relay:r,expiryTimestamp:i}=eKe(e.uri);let a;if(this.pairings.keys.includes(t)&&(a=this.pairings.get(t),a.active))throw new Error(`Pairing already exists: ${t}. Please try again with a new connection URI.`);const o=i||Uqe(fGe.FIVE_MINUTES),s={topic:t,relay:r,expiry:o,active:!1};return await this.pairings.set(t,s),this.core.expirer.set(t,o),e.activatePairing&&await this.activate({topic:t}),this.events.emit(JZe,s),this.core.crypto.keychain.has(t)||(await this.core.crypto.setSymKey(n,t),await this.core.relayer.subscribe(t,{relay:r})),s},this.activate=async({topic:e})=>{this.isInitialized();const t=Uqe(fGe.THIRTY_DAYS);await this.pairings.update(e,{active:!0,expiry:t}),this.core.expirer.set(e,t)},this.ping=async e=>{this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.pairings.keys.includes(t)){const e=await this.sendRequest(t,"wc_pairingPing",{}),{done:n,resolve:r,reject:i}=Lqe();this.events.once(Hqe("pairing_ping",e),(({error:e})=>{e?i(e):r()})),await n()}},this.updateExpiry=async({topic:e,expiry:t})=>{this.isInitialized(),await this.pairings.update(e,{expiry:t})},this.updateMetadata=async({topic:e,metadata:t})=>{this.isInitialized(),await this.pairings.update(e,{peerMetadata:t})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async e=>{this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;this.pairings.keys.includes(t)&&(await this.sendRequest(t,"wc_pairingDelete",uKe("USER_DISCONNECTED")),await this.deletePairing(t))},this.sendRequest=async(e,t,n)=>{const r=OYe(t,n),i=await this.core.crypto.encode(e,r),a=YZe[t].req;return this.core.history.set(e,r),this.core.relayer.publish(e,i,a),r.id},this.sendResult=async(e,t,n)=>{const r=CYe(e,n),i=await this.core.crypto.encode(t,r),a=await this.core.history.get(t,e),o=YZe[a.request.method].res;await this.core.relayer.publish(t,i,o),await this.core.history.resolve(r)},this.sendError=async(e,t,n)=>{const r=IYe(e,n),i=await this.core.crypto.encode(t,r),a=await this.core.history.get(t,e),o=YZe[a.request.method]?YZe[a.request.method].res:YZe.unregistered_method.res;await this.core.relayer.publish(t,i,o),await this.core.history.resolve(r)},this.deletePairing=async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,uKe("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(e),t?Promise.resolve():this.core.expirer.del(e)])},this.cleanup=async()=>{const e=this.pairings.getAll().filter((e=>zqe(e.expiry)));await Promise.all(e.map((e=>this.deletePairing(e.topic))))},this.onRelayEventRequest=e=>{const{topic:t,payload:n}=e;switch(n.method){case"wc_pairingPing":return this.onPairingPingRequest(t,n);case"wc_pairingDelete":return this.onPairingDeleteRequest(t,n);default:return this.onUnknownRpcMethodRequest(t,n)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:n}=e,r=(await this.core.history.get(t,n.id)).request.method;return"wc_pairingPing"===r?this.onPairingPingResponse(t,n):this.onUnknownRpcMethodResponse(r)},this.onPairingPingRequest=async(e,t)=>{const{id:n}=t;try{this.isValidPing({topic:e}),await this.sendResult(n,e,!0),this.events.emit($Ze,{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.logger.error(t)}},this.onPairingPingResponse=(e,t)=>{const{id:n}=t;setTimeout((()=>{jYe(t)?this.events.emit(Hqe("pairing_ping",n),{}):UYe(t)&&this.events.emit(Hqe("pairing_ping",n),{error:t.error})}),500)},this.onPairingDeleteRequest=async(e,t)=>{const{id:n}=t;try{this.isValidDisconnect({topic:e}),await this.deletePairing(e),this.events.emit(QZe,{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.logger.error(t)}},this.onUnknownRpcMethodRequest=async(e,t)=>{const{id:n,method:r}=t;try{if(this.registeredMethods.includes(r))return;const t=uKe("WC_METHOD_UNSUPPORTED",r);await this.sendError(n,e,t),this.logger.error(t)}catch(t){await this.sendError(n,e,t),this.logger.error(t)}},this.onUnknownRpcMethodResponse=e=>{this.registeredMethods.includes(e)||this.logger.error(uKe("WC_METHOD_UNSUPPORTED",e))},this.isValidPair=e=>{var t;if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`pair() params: ${e}`);throw new Error(t)}if(!function(e){if(pKe(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}(e.uri)){const{message:t}=cKe("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw new Error(t)}const n=eKe(e.uri);if(null==(t=n?.relay)||!t.protocol){const{message:e}=cKe("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(e)}if(null==n||!n.symKey){const{message:e}=cKe("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(e)}if(null!=n&&n.expiryTimestamp&&fGe.toMiliseconds(n?.expiryTimestamp)<Date.now()){const{message:e}=cKe("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw new Error(e)}},this.isValidPing=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidDisconnect=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidPairingTopic=async e=>{if(!pKe(e,!1)){const{message:t}=cKe("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.pairings.keys.includes(e)){const{message:t}=cKe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(zqe(this.pairings.get(e).expiry)){await this.deletePairing(e);const{message:t}=cKe("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}},this.core=e,this.logger=_Xe.generateChildLogger(t,this.name),this.pairings=new FQe(this.core,this.logger,this.name,this.storagePrefix)}get context(){return _Xe.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(RZe,(async e=>{const{topic:t,message:n}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const r=await this.core.crypto.decode(t,n);try{FYe(r)?(this.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):BYe(r)&&(await this.core.history.resolve(r),await this.onRelayEventResponse({topic:t,payload:r}),this.core.history.delete(t,r.id))}catch(e){this.logger.error(e)}}))}registerExpirerEvents(){this.core.expirer.on(oQe,(async e=>{const{topic:t}=jqe(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(ZZe,{topic:t}))}))}}(this,this.logger),this.verify=new UQe(this.projectId||"",this.logger),this.echoClient=new zQe(this.projectId||"",this.logger)}static async init(t){const n=new e(t);await n.initialize();const r=await n.crypto.getClientId();return await n.storage.setItem("WALLETCONNECT_CLIENT_ID",r),n}get context(){return _Xe.getLoggerContext(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}},YQe="client",JQe=`wc@2:${YQe}:`,ZQe=YQe,QQe="error",$Qe="WALLETCONNECT_DEEPLINK_CHOICE",e$e="Proposal expired",t$e=fGe.SEVEN_DAYS,n$e={wc_sessionPropose:{req:{ttl:fGe.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:fGe.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:fGe.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:fGe.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:fGe.ONE_DAY,prompt:!1,tag:1104},res:{ttl:fGe.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:fGe.ONE_DAY,prompt:!1,tag:1106},res:{ttl:fGe.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:fGe.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:fGe.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:fGe.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:fGe.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:fGe.ONE_DAY,prompt:!1,tag:1112},res:{ttl:fGe.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:fGe.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:fGe.THIRTY_SECONDS,prompt:!1,tag:1115}}},r$e={min:fGe.FIVE_MINUTES,max:fGe.SEVEN_DAYS},i$e="IDLE",a$e="ACTIVE",o$e=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var s$e=Object.defineProperty,c$e=Object.defineProperties,u$e=Object.getOwnPropertyDescriptors,l$e=Object.getOwnPropertySymbols,d$e=Object.prototype.hasOwnProperty,f$e=Object.prototype.propertyIsEnumerable,p$e=(e,t,n)=>t in e?s$e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,h$e=(e,t)=>{for(var n in t||(t={}))d$e.call(t,n)&&p$e(e,n,t[n]);if(l$e)for(var n of l$e(t))f$e.call(t,n)&&p$e(e,n,t[n]);return e},m$e=(e,t)=>c$e(e,u$e(t));class y$e extends KXe{constructor(e){super(e),this.name="engine",this.events=new QHe,this.initialized=!1,this.ignoredPayloadTypes=[oqe],this.requestQueue={state:i$e,queue:[]},this.sessionRequestQueue={state:i$e,queue:[]},this.requestQueueDelay=fGe.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(n$e)}),this.initialized=!0,setTimeout((()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()}),fGe.toMiliseconds(this.requestQueueDelay)))},this.connect=async e=>{await this.isInitialized();const t=m$e(h$e({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t);const{pairingTopic:n,requiredNamespaces:r,optionalNamespaces:i,sessionProperties:a,relays:o}=t;let s,c=n,u=!1;if(c&&(u=this.client.core.pairing.pairings.get(c).active),!c||!u){const{topic:e,uri:t}=await this.client.core.pairing.create();c=e,s=t}const l=await this.client.core.crypto.generateKeyPair(),d=n$e.wc_sessionPropose.req.ttl||fGe.FIVE_MINUTES,f=Uqe(d),p=h$e({requiredNamespaces:r,optionalNamespaces:i,relays:o??[{protocol:"irn"}],proposer:{publicKey:l,metadata:this.client.metadata},expiryTimestamp:f},a&&{sessionProperties:a}),{reject:h,resolve:m,done:y}=Lqe(d,e$e);if(this.events.once(Hqe("session_connect"),(async({error:e,session:t})=>{if(e)h(e);else if(t){t.self.publicKey=l;const e=m$e(h$e({},t),{requiredNamespaces:p.requiredNamespaces,optionalNamespaces:p.optionalNamespaces});await this.client.session.set(t.topic,e),await this.setExpiry(t.topic,t.expiry),c&&await this.client.core.pairing.updateMetadata({topic:c,metadata:t.peer.metadata}),m(e)}})),!c){const{message:e}=cKe("NO_MATCHING_KEY",`connect() pairing topic: ${c}`);throw new Error(e)}const b=await this.sendRequest({topic:c,method:"wc_sessionPropose",params:p,throwOnFailedPublish:!0});return await this.setProposal(b,h$e({id:b},p)),{uri:s,approval:y}},this.pair=async e=>(await this.isInitialized(),await this.client.core.pairing.pair(e)),this.approve=async e=>{await this.isInitialized(),await this.isValidApprove(e);const{id:t,relayProtocol:n,namespaces:r,sessionProperties:i}=e,a=this.client.proposal.get(t);let{pairingTopic:o,proposer:s,requiredNamespaces:c,optionalNamespaces:u}=a;o=o||"";const l=await this.client.core.crypto.generateKeyPair(),d=s.publicKey,f=await this.client.core.crypto.generateSharedKey(l,d);o&&t&&(await this.client.core.pairing.updateMetadata({topic:o,metadata:s.metadata}),await this.sendResult({id:t,topic:o,result:{relay:{protocol:n??"irn"},responderPublicKey:l}}),await this.client.proposal.delete(t,uKe("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:o}));const p=h$e({relay:{protocol:n??"irn"},namespaces:r,pairingTopic:o,controller:{publicKey:l,metadata:this.client.metadata},expiry:Uqe(t$e)},i&&{sessionProperties:i});await this.client.core.relayer.subscribe(f);const h=m$e(h$e({},p),{topic:f,requiredNamespaces:c,optionalNamespaces:u,pairingTopic:o,acknowledged:!1,self:p.controller,peer:{publicKey:s.publicKey,metadata:s.metadata},controller:l});await this.client.session.set(f,h);try{await this.sendRequest({topic:f,method:"wc_sessionSettle",params:p,throwOnFailedPublish:!0})}catch(e){throw this.client.logger.error(e),this.client.session.delete(f,uKe("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(f),e}return await this.setExpiry(f,Uqe(t$e)),{topic:f,acknowledged:()=>new Promise((e=>setTimeout((()=>e(this.client.session.get(f))),500)))}},this.reject=async e=>{await this.isInitialized(),await this.isValidReject(e);const{id:t,reason:n}=e,{pairingTopic:r}=this.client.proposal.get(t);r&&(await this.sendError(t,r,n),await this.client.proposal.delete(t,uKe("USER_DISCONNECTED")))},this.update=async e=>{await this.isInitialized(),await this.isValidUpdate(e);const{topic:t,namespaces:n}=e,r=await this.sendRequest({topic:t,method:"wc_sessionUpdate",params:{namespaces:n}}),{done:i,resolve:a,reject:o}=Lqe();return this.events.once(Hqe("session_update",r),(({error:e})=>{e?o(e):a()})),await this.client.session.update(t,{namespaces:n}),{acknowledged:i}},this.extend=async e=>{await this.isInitialized(),await this.isValidExtend(e);const{topic:t}=e,n=await this.sendRequest({topic:t,method:"wc_sessionExtend",params:{}}),{done:r,resolve:i,reject:a}=Lqe();return this.events.once(Hqe("session_extend",n),(({error:e})=>{e?a(e):i()})),await this.setExpiry(t,Uqe(t$e)),{acknowledged:r}},this.request=async e=>{await this.isInitialized(),await this.isValidRequest(e);const{chainId:t,request:n,topic:r,expiry:i=n$e.wc_sessionRequest.req.ttl}=e,a=AYe(),{done:o,resolve:s,reject:c}=Lqe(i,"Request expired. Please try again.");return this.events.once(Hqe("session_request",a),(({error:e,result:t})=>{e?c(e):s(t)})),await Promise.all([new Promise((async e=>{await this.sendRequest({clientRpcId:a,topic:r,method:"wc_sessionRequest",params:{request:m$e(h$e({},n),{expiryTimestamp:Uqe(i)}),chainId:t},expiry:i,throwOnFailedPublish:!0}).catch((e=>c(e))),this.client.events.emit("session_request_sent",{topic:r,request:n,chainId:t,id:a}),e()})),new Promise((async e=>{const t=await async function(e,t){try{return await e.getItem(t)||(_qe()?localStorage.getItem(t):void 0)}catch(e){console.error(e)}}(this.client.core.storage,$Qe);(async function({id:e,topic:t,wcDeepLink:n}){try{if(!n)return;const r="string"==typeof n?JSON.parse(n):n;let i=r?.href;if("string"!=typeof i)return;i.endsWith("/")&&(i=i.slice(0,-1));const a=`${i}/wc?requestId=${e}&sessionTopic=${t}`,o=Pqe();o===Oqe.browser?a.startsWith("https://")?window.open(a,"_blank","noreferrer noopener"):window.open(a,"_self","noreferrer noopener"):o===Oqe.reactNative&&typeof(null==global?void 0:global.Linking)<"u"&&await global.Linking.openURL(a)}catch(e){console.error(e)}})({id:a,topic:r,wcDeepLink:t}),e()})),o()]).then((e=>e[2]))},this.respond=async e=>{await this.isInitialized(),await this.isValidRespond(e);const{topic:t,response:n}=e,{id:r}=n;jYe(n)?await this.sendResult({id:r,topic:t,result:n.result,throwOnFailedPublish:!0}):UYe(n)&&await this.sendError(r,t,n.error),this.cleanupAfterResponse(e)},this.ping=async e=>{await this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.client.session.keys.includes(t)){const e=await this.sendRequest({topic:t,method:"wc_sessionPing",params:{}}),{done:n,resolve:r,reject:i}=Lqe();this.events.once(Hqe("session_ping",e),(({error:e})=>{e?i(e):r()})),await n()}else this.client.core.pairing.pairings.keys.includes(t)&&await this.client.core.pairing.ping({topic:t})},this.emit=async e=>{await this.isInitialized(),await this.isValidEmit(e);const{topic:t,event:n,chainId:r}=e;await this.sendRequest({topic:t,method:"wc_sessionEvent",params:{event:n,chainId:r}})},this.disconnect=async e=>{await this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;if(this.client.session.keys.includes(t))await this.sendRequest({topic:t,method:"wc_sessionDelete",params:uKe("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:t,emitEvent:!1});else{if(!this.client.core.pairing.pairings.keys.includes(t)){const{message:e}=cKe("MISMATCHED_TOPIC",`Session or pairing topic not found: ${t}`);throw new Error(e)}await this.client.core.pairing.disconnect({topic:t})}},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter((t=>function(e,t){const{requiredNamespaces:n}=t,r=Object.keys(e.namespaces),i=Object.keys(n);let a=!0;return!!Nqe(i,r)&&(r.forEach((t=>{const{accounts:r,methods:i,events:o}=e.namespaces[t],s=rKe(r),c=n[t];Nqe(eqe(t,c),s)&&Nqe(c.methods,i)&&Nqe(c.events,o)||(a=!1)})),a)}(t,e)))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.cleanupDuplicatePairings=async e=>{if(e.pairingTopic)try{const t=this.client.core.pairing.pairings.get(e.pairingTopic),n=this.client.core.pairing.pairings.getAll().filter((n=>{var r,i;return(null==(r=n.peerMetadata)?void 0:r.url)&&(null==(i=n.peerMetadata)?void 0:i.url)===e.peer.metadata.url&&n.topic&&n.topic!==t.topic}));if(0===n.length)return;this.client.logger.info(`Cleaning up ${n.length} duplicate pairing(s)`),await Promise.all(n.map((e=>this.client.core.pairing.disconnect({topic:e.topic})))),this.client.logger.info("Duplicate pairings clean up finished")}catch(e){this.client.logger.error(e)}},this.deleteSession=async e=>{const{topic:t,expirerHasDeleted:n=!1,emitEvent:r=!0,id:i=0}=e,{self:a}=this.client.session.get(t);await this.client.core.relayer.unsubscribe(t),await this.client.session.delete(t,uKe("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(a.publicKey)&&await this.client.core.crypto.deleteKeyPair(a.publicKey),this.client.core.crypto.keychain.has(t)&&await this.client.core.crypto.deleteSymKey(t),n||this.client.core.expirer.del(t),this.client.core.storage.removeItem($Qe).catch((e=>this.client.logger.warn(e))),this.getPendingSessionRequests().forEach((e=>{e.topic===t&&this.deletePendingSessionRequest(e.id,uKe("USER_DISCONNECTED"))})),r&&this.client.events.emit("session_delete",{id:i,topic:t})},this.deleteProposal=async(e,t)=>{await Promise.all([this.client.proposal.delete(e,uKe("USER_DISCONNECTED")),t?Promise.resolve():this.client.core.expirer.del(e)])},this.deletePendingSessionRequest=async(e,t,n=!1)=>{await Promise.all([this.client.pendingRequest.delete(e,t),n?Promise.resolve():this.client.core.expirer.del(e)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter((t=>t.id!==e)),n&&(this.sessionRequestQueue.state=i$e,this.client.events.emit("session_request_expire",{id:e}))},this.setExpiry=async(e,t)=>{this.client.session.keys.includes(e)&&await this.client.session.update(e,{expiry:t}),this.client.core.expirer.set(e,t)},this.setProposal=async(e,t)=>{await this.client.proposal.set(e,t),this.client.core.expirer.set(e,Uqe(n$e.wc_sessionPropose.req.ttl))},this.setPendingSessionRequest=async e=>{const{id:t,topic:n,params:r,verifyContext:i}=e,a=r.request.expiryTimestamp||Uqe(n$e.wc_sessionRequest.req.ttl);await this.client.pendingRequest.set(t,{id:t,topic:n,params:r,verifyContext:i}),a&&this.client.core.expirer.set(t,a)},this.sendRequest=async e=>{const{topic:t,method:n,params:r,expiry:i,relayRpcId:a,clientRpcId:o,throwOnFailedPublish:s}=e,c=OYe(n,r,o);if(_qe()&&o$e.includes(n)){const e=fqe(JSON.stringify(c));this.client.core.verify.register({attestationId:e})}const u=await this.client.core.crypto.encode(t,c),l=n$e[n].req;return i&&(l.ttl=i),a&&(l.id=a),this.client.core.history.set(t,c),s?(l.internal=m$e(h$e({},l.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(t,u,l)):this.client.core.relayer.publish(t,u,l).catch((e=>this.client.logger.error(e))),c.id},this.sendResult=async e=>{const{id:t,topic:n,result:r,throwOnFailedPublish:i}=e,a=CYe(t,r),o=await this.client.core.crypto.encode(n,a),s=await this.client.core.history.get(n,t),c=n$e[s.request.method].res;i?(c.internal=m$e(h$e({},c.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,o,c)):this.client.core.relayer.publish(n,o,c).catch((e=>this.client.logger.error(e))),await this.client.core.history.resolve(a)},this.sendError=async(e,t,n)=>{const r=IYe(e,n),i=await this.client.core.crypto.encode(t,r),a=await this.client.core.history.get(t,e),o=n$e[a.request.method].res;this.client.core.relayer.publish(t,i,o),await this.client.core.history.resolve(r)},this.cleanup=async()=>{const e=[],t=[];this.client.session.getAll().forEach((t=>{let n=!1;zqe(t.expiry)&&(n=!0),this.client.core.crypto.keychain.has(t.topic)||(n=!0),n&&e.push(t.topic)})),this.client.proposal.getAll().forEach((e=>{zqe(e.expiryTimestamp)&&t.push(e.id)})),await Promise.all([...e.map((e=>this.deleteSession({topic:e}))),...t.map((e=>this.deleteProposal(e)))])},this.onRelayEventRequest=async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state!==a$e){for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=a$e;const e=this.requestQueue.queue.shift();if(e)try{this.processRequest(e),await new Promise((e=>setTimeout(e,300)))}catch(e){this.client.logger.warn(e)}}this.requestQueue.state=i$e}else this.client.logger.info("Request queue already active, skipping...")},this.processRequest=e=>{const{topic:t,payload:n}=e,r=n.method;switch(r){case"wc_sessionPropose":return this.onSessionProposeRequest(t,n);case"wc_sessionSettle":return this.onSessionSettleRequest(t,n);case"wc_sessionUpdate":return this.onSessionUpdateRequest(t,n);case"wc_sessionExtend":return this.onSessionExtendRequest(t,n);case"wc_sessionPing":return this.onSessionPingRequest(t,n);case"wc_sessionDelete":return this.onSessionDeleteRequest(t,n);case"wc_sessionRequest":return this.onSessionRequest(t,n);case"wc_sessionEvent":return this.onSessionEventRequest(t,n);default:return this.client.logger.info(`Unsupported request method ${r}`)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:n}=e,r=(await this.client.core.history.get(t,n.id)).request.method;switch(r){case"wc_sessionPropose":return this.onSessionProposeResponse(t,n);case"wc_sessionSettle":return this.onSessionSettleResponse(t,n);case"wc_sessionUpdate":return this.onSessionUpdateResponse(t,n);case"wc_sessionExtend":return this.onSessionExtendResponse(t,n);case"wc_sessionPing":return this.onSessionPingResponse(t,n);case"wc_sessionRequest":return this.onSessionRequestResponse(t,n);default:return this.client.logger.info(`Unsupported response method ${r}`)}},this.onRelayEventUnknownPayload=e=>{const{topic:t}=e,{message:n}=cKe("MISSING_OR_INVALID",`Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);throw new Error(n)},this.onSessionProposeRequest=async(e,t)=>{const{params:n,id:r}=t;try{this.isValidConnect(h$e({},t.params));const i=n.expiryTimestamp||Uqe(n$e.wc_sessionPropose.req.ttl),a=h$e({id:r,pairingTopic:e,expiryTimestamp:i},n);await this.setProposal(r,a);const o=fqe(JSON.stringify(t)),s=await this.getVerifyContext(o,a.proposer.metadata);this.client.events.emit("session_proposal",{id:r,params:a,verifyContext:s})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionProposeResponse=async(e,t)=>{const{id:n}=t;if(jYe(t)){const{result:r}=t;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:r});const i=this.client.proposal.get(n);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:i});const a=i.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:a});const o=r.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:o});const s=await this.client.core.crypto.generateSharedKey(a,o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:s});const c=await this.client.core.relayer.subscribe(s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:c}),await this.client.core.pairing.activate({topic:e})}else UYe(t)&&(await this.client.proposal.delete(n,uKe("USER_DISCONNECTED")),this.events.emit(Hqe("session_connect"),{error:t.error}))},this.onSessionSettleRequest=async(e,t)=>{const{id:n,params:r}=t;try{this.isValidSessionSettleRequest(r);const{relay:n,controller:i,expiry:a,namespaces:o,sessionProperties:s,pairingTopic:c}=t.params,u=h$e({topic:e,relay:n,expiry:a,namespaces:o,acknowledged:!0,pairingTopic:c,requiredNamespaces:{},optionalNamespaces:{},controller:i.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:i.publicKey,metadata:i.metadata}},s&&{sessionProperties:s});await this.sendResult({id:t.id,topic:e,result:!0}),this.events.emit(Hqe("session_connect"),{session:u}),this.cleanupDuplicatePairings(u)}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionSettleResponse=async(e,t)=>{const{id:n}=t;jYe(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(Hqe("session_approve",n),{})):UYe(t)&&(await this.client.session.delete(e,uKe("USER_DISCONNECTED")),this.events.emit(Hqe("session_approve",n),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{const{params:n,id:r}=t;try{const t=`${e}_session_update`,i=kKe.get(t);if(i&&this.isRequestOutOfSync(i,r))return void this.client.logger.info(`Discarding out of sync request - ${r}`);this.isValidUpdate(h$e({topic:e},n)),await this.client.session.update(e,{namespaces:n.namespaces}),await this.sendResult({id:r,topic:e,result:!0}),this.client.events.emit("session_update",{id:r,topic:e,params:n}),kKe.set(t,r)}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.isRequestOutOfSync=(e,t)=>parseInt(t.toString().slice(0,-3))<=parseInt(e.toString().slice(0,-3)),this.onSessionUpdateResponse=(e,t)=>{const{id:n}=t;jYe(t)?this.events.emit(Hqe("session_update",n),{}):UYe(t)&&this.events.emit(Hqe("session_update",n),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{const{id:n}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,Uqe(t$e)),await this.sendResult({id:n,topic:e,result:!0}),this.client.events.emit("session_extend",{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionExtendResponse=(e,t)=>{const{id:n}=t;jYe(t)?this.events.emit(Hqe("session_extend",n),{}):UYe(t)&&this.events.emit(Hqe("session_extend",n),{error:t.error})},this.onSessionPingRequest=async(e,t)=>{const{id:n}=t;try{this.isValidPing({topic:e}),await this.sendResult({id:n,topic:e,result:!0}),this.client.events.emit("session_ping",{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionPingResponse=(e,t)=>{const{id:n}=t;setTimeout((()=>{jYe(t)?this.events.emit(Hqe("session_ping",n),{}):UYe(t)&&this.events.emit(Hqe("session_ping",n),{error:t.error})}),500)},this.onSessionDeleteRequest=async(e,t)=>{const{id:n}=t;try{this.isValidDisconnect({topic:e,reason:t.params}),await Promise.all([new Promise((t=>{this.client.core.relayer.once(BZe,(async()=>{t(await this.deleteSession({topic:e,id:n}))}))})),this.sendResult({id:n,topic:e,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:e,error:uKe("USER_DISCONNECTED")})])}catch(e){this.client.logger.error(e)}},this.onSessionRequest=async(e,t)=>{const{id:n,params:r}=t;try{this.isValidRequest(h$e({topic:e},r));const t=fqe(JSON.stringify(OYe("wc_sessionRequest",r,n))),i=this.client.session.get(e),a={id:n,topic:e,params:r,verifyContext:await this.getVerifyContext(t,i.peer.metadata)};await this.setPendingSessionRequest(a),this.addSessionRequestToSessionRequestQueue(a),this.processSessionRequestQueue()}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionRequestResponse=(e,t)=>{const{id:n}=t;jYe(t)?this.events.emit(Hqe("session_request",n),{result:t.result}):UYe(t)&&this.events.emit(Hqe("session_request",n),{error:t.error})},this.onSessionEventRequest=async(e,t)=>{const{id:n,params:r}=t;try{const t=`${e}_session_event_${r.event.name}`,i=kKe.get(t);if(i&&this.isRequestOutOfSync(i,n))return void this.client.logger.info(`Discarding out of sync request - ${n}`);this.isValidEmit(h$e({topic:e},r)),this.client.events.emit("session_event",{id:n,topic:e,params:r}),kKe.set(t,n)}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.addSessionRequestToSessionRequestQueue=e=>{this.sessionRequestQueue.queue.push(e)},this.cleanupAfterResponse=e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout((()=>{this.sessionRequestQueue.state=i$e,this.processSessionRequestQueue()}),fGe.toMiliseconds(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:e,error:t})=>{const n=this.client.core.history.pending;n.length>0&&n.filter((t=>t.topic===e&&"wc_sessionRequest"===t.request.method)).forEach((e=>{this.events.emit(Hqe("session_request",e.request.id),{error:t})}))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===a$e)return void this.client.logger.info("session request queue is already active.");const e=this.sessionRequestQueue.queue[0];if(e)try{this.sessionRequestQueue.state=a$e,this.client.events.emit("session_request",e)}catch(e){this.client.logger.error(e)}else this.client.logger.info("session request queue is empty.")},this.onPairingCreated=e=>{if(e.active)return;const t=this.client.proposal.getAll().find((t=>t.pairingTopic===e.topic));t&&this.onSessionProposeRequest(e.topic,OYe("wc_sessionPropose",{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties},t.id))},this.isValidConnect=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw new Error(t)}const{pairingTopic:t,requiredNamespaces:n,optionalNamespaces:r,sessionProperties:i,relays:a}=e;if(fKe(t)||await this.isValidPairingTopic(t),!function(e,t){let n=!1;return t&&!e?n=!0:e&&lKe(e)&&e.length&&e.forEach((e=>{n=TKe(e)})),n}(a,!0)){const{message:e}=cKe("MISSING_OR_INVALID",`connect() relays: ${a}`);throw new Error(e)}!fKe(n)&&0!==dKe(n)&&this.validateNamespaces(n,"requiredNamespaces"),!fKe(r)&&0!==dKe(r)&&this.validateNamespaces(r,"optionalNamespaces"),fKe(i)||this.validateSessionProps(i,"sessionProperties")},this.validateNamespaces=(e,t)=>{const n=function(e,t,n){let r=null;if(e&&dKe(e)){const i=vKe(e,t);i&&(r=i);const a=bKe(e,t,n);a&&(r=a)}else r=cKe("MISSING_OR_INVALID",`${t}, ${n} should be an object with data`);return r}(e,"connect()",t);if(n)throw new Error(n.message)},this.isValidApprove=async e=>{if(!EKe(e))throw new Error(cKe("MISSING_OR_INVALID",`approve() params: ${e}`).message);const{id:t,namespaces:n,relayProtocol:r,sessionProperties:i}=e;await this.isValidProposalId(t);const a=this.client.proposal.get(t),o=wKe(n,"approve()");if(o)throw new Error(o.message);const s=CKe(a.requiredNamespaces,n,"approve()");if(s)throw new Error(s.message);if(!pKe(r,!0)){const{message:e}=cKe("MISSING_OR_INVALID",`approve() relayProtocol: ${r}`);throw new Error(e)}fKe(i)||this.validateSessionProps(i,"sessionProperties")},this.isValidReject=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`reject() params: ${e}`);throw new Error(t)}const{id:t,reason:n}=e;if(await this.isValidProposalId(t),!function(e){return!!(e&&"object"==typeof e&&e.code&&hKe(e.code,!1)&&e.message&&pKe(e.message,!1))}(n)){const{message:e}=cKe("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidSessionSettleRequest=e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw new Error(t)}const{relay:t,controller:n,namespaces:r,expiry:i}=e;if(!TKe(t)){const{message:e}=cKe("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(e)}const a=function(e,t){let n=null;return pKe(e?.publicKey,!1)||(n=cKe("MISSING_OR_INVALID",`${t} controller public key should be a string`)),n}(n,"onSessionSettleRequest()");if(a)throw new Error(a.message);const o=wKe(r,"onSessionSettleRequest()");if(o)throw new Error(o.message);if(zqe(i)){const{message:e}=cKe("EXPIRED","onSessionSettleRequest()");throw new Error(e)}},this.isValidUpdate=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`update() params: ${e}`);throw new Error(t)}const{topic:t,namespaces:n}=e;await this.isValidSessionTopic(t);const r=this.client.session.get(t),i=wKe(n,"update()");if(i)throw new Error(i.message);const a=CKe(r.requiredNamespaces,n,"update()");if(a)throw new Error(a.message)},this.isValidExtend=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`extend() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`request() params: ${e}`);throw new Error(t)}const{topic:t,request:n,chainId:r,expiry:i}=e;await this.isValidSessionTopic(t);const{namespaces:a}=this.client.session.get(t);if(!AKe(a,r)){const{message:e}=cKe("MISSING_OR_INVALID",`request() chainId: ${r}`);throw new Error(e)}if(!function(e){return!(fKe(e)||!pKe(e.method,!1))}(n)){const{message:e}=cKe("MISSING_OR_INVALID",`request() ${JSON.stringify(n)}`);throw new Error(e)}if(!xKe(a,r,n.method)){const{message:e}=cKe("MISSING_OR_INVALID",`request() method: ${n.method}`);throw new Error(e)}if(i&&!function(e,t){return hKe(e,!1)&&e<=t.max&&e>=t.min}(i,r$e)){const{message:e}=cKe("MISSING_OR_INVALID",`request() expiry: ${i}. Expiry must be a number (in seconds) between ${r$e.min} and ${r$e.max}`);throw new Error(e)}},this.isValidRespond=async e=>{var t;if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`respond() params: ${e}`);throw new Error(t)}const{topic:n,response:r}=e;try{await this.isValidSessionTopic(n)}catch(n){throw null!=(t=e?.response)&&t.id&&this.cleanupAfterResponse(e),n}if(!function(e){return!(fKe(e)||fKe(e.result)&&fKe(e.error)||!hKe(e.id,!1)||!pKe(e.jsonrpc,!1))}(r)){const{message:e}=cKe("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidPing=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`emit() params: ${e}`);throw new Error(t)}const{topic:t,event:n,chainId:r}=e;await this.isValidSessionTopic(t);const{namespaces:i}=this.client.session.get(t);if(!AKe(i,r)){const{message:e}=cKe("MISSING_OR_INVALID",`emit() chainId: ${r}`);throw new Error(e)}if(!function(e){return!(fKe(e)||!pKe(e.name,!1))}(n)){const{message:e}=cKe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}if(!OKe(i,r,n.name)){const{message:e}=cKe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidDisconnect=async e=>{if(!EKe(e)){const{message:t}=cKe("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.getVerifyContext=async(e,t)=>{const n={verified:{verifyUrl:t.verifyUrl||uQe,validation:"UNKNOWN",origin:t.url||""}};try{const r=await this.client.core.verify.resolve({attestationId:e,verifyUrl:t.verifyUrl});r&&(n.verified.origin=r.origin,n.verified.isScam=r.isScam,n.verified.validation=r.origin===new URL(t.url).origin?"VALID":"INVALID")}catch(e){this.client.logger.info(e)}return this.client.logger.info(`Verify context: ${JSON.stringify(n)}`),n},this.validateSessionProps=(e,t)=>{Object.values(e).forEach((e=>{if(!pKe(e,!1)){const{message:n}=cKe("MISSING_OR_INVALID",`${t} must be in Record<string, string> format. Received: ${JSON.stringify(e)}`);throw new Error(n)}}))}}async isInitialized(){if(!this.initialized){const{message:e}=cKe("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(RZe,(async e=>{const{topic:t,message:n}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const r=await this.client.core.crypto.decode(t,n);try{FYe(r)?(this.client.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):BYe(r)?(await this.client.core.history.resolve(r),await this.onRelayEventResponse({topic:t,payload:r}),this.client.core.history.delete(t,r.id)):this.onRelayEventUnknownPayload({topic:t,payload:r})}catch(e){this.client.logger.error(e)}}))}registerExpirerEvents(){this.client.core.expirer.on(oQe,(async e=>{const{topic:t,id:n}=jqe(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,cKe("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:t})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))}))}registerPairingEvents(){this.client.core.pairing.events.on(JZe,(e=>this.onPairingCreated(e)))}isValidPairingTopic(e){if(!pKe(e,!1)){const{message:t}=cKe("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=cKe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(zqe(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=cKe("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!pKe(e,!1)){const{message:t}=cKe("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(!this.client.session.keys.includes(e)){const{message:t}=cKe("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if(zqe(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:t}=cKe("EXPIRED",`session topic: ${e}`);throw new Error(t)}if(!this.client.core.crypto.keychain.has(e)){const{message:t}=cKe("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else{if(!this.client.core.pairing.pairings.keys.includes(e)){if(pKe(e,!1)){const{message:t}=cKe("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}{const{message:t}=cKe("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}this.isValidPairingTopic(e)}}async isValidProposalId(e){if(!function(e){return"number"==typeof e}(e)){const{message:t}=cKe("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=cKe("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if(zqe(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:t}=cKe("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}}class b$e extends FQe{constructor(e,t){super(e,t,"proposal",JQe),this.core=e,this.logger=t}}let g$e=class extends FQe{constructor(e,t){super(e,t,"session",JQe),this.core=e,this.logger=t}};class v$e extends FQe{constructor(e,t){super(e,t,"request",JQe,(e=>e.id)),this.core=e,this.logger=t}}let w$e=class e extends qXe{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=ZQe,this.events=new QHe,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.removeAllListeners=e=>this.events.removeAllListeners(e),this.connect=async e=>{try{return await this.engine.connect(e)}catch(e){throw this.logger.error(e.message),e}},this.pair=async e=>{try{return await this.engine.pair(e)}catch(e){throw this.logger.error(e.message),e}},this.approve=async e=>{try{return await this.engine.approve(e)}catch(e){throw this.logger.error(e.message),e}},this.reject=async e=>{try{return await this.engine.reject(e)}catch(e){throw this.logger.error(e.message),e}},this.update=async e=>{try{return await this.engine.update(e)}catch(e){throw this.logger.error(e.message),e}},this.extend=async e=>{try{return await this.engine.extend(e)}catch(e){throw this.logger.error(e.message),e}},this.request=async e=>{try{return await this.engine.request(e)}catch(e){throw this.logger.error(e.message),e}},this.respond=async e=>{try{return await this.engine.respond(e)}catch(e){throw this.logger.error(e.message),e}},this.ping=async e=>{try{return await this.engine.ping(e)}catch(e){throw this.logger.error(e.message),e}},this.emit=async e=>{try{return await this.engine.emit(e)}catch(e){throw this.logger.error(e.message),e}},this.disconnect=async e=>{try{return await this.engine.disconnect(e)}catch(e){throw this.logger.error(e.message),e}},this.find=e=>{try{return this.engine.find(e)}catch(e){throw this.logger.error(e.message),e}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}},this.name=e?.name||ZQe,this.metadata=e?.metadata||UGe()||{name:"",description:"",url:"",icons:[""]};const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:_Xe.pino(_Xe.getDefaultLoggerOptions({level:e?.logger||QQe}));this.core=e?.core||new XQe(e),this.logger=_Xe.generateChildLogger(t,this.name),this.session=new g$e(this.core,this.logger),this.proposal=new b$e(this.core,this.logger),this.pendingRequest=new v$e(this.core,this.logger),this.engine=new y$e(this)}static async init(t){const n=new e(t);return await n.initialize(),n}get context(){return _Xe.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}};var T$e={exports:{}};!function(e,t){var n="undefined"!=typeof self?self:ut,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in e,o="ArrayBuffer"in e;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?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 h(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function m(e){var t=new FileReader,n=h(t);return t.readAsArrayBuffer(e),n}function y(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._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=y(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):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(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)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e,t,n,r=p(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=h(t),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(w)}),this.json=function(){return this.text().then(JSON.parse)},this}f.prototype.append=function(e,t){e=u(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},f.prototype.delete=function(e){delete this.map[u(e)]},f.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},f.prototype.set=function(e,t){this.map[u(e)]=l(t)},f.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},f.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),d(e)},f.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),d(e)},f.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),d(e)},r&&(f.prototype[Symbol.iterator]=f.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function v(e,t){var n,r,i=(t=t||{}).body;if(e instanceof v){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new f(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=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 f(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),g.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function w(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 T(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},b.call(v.prototype),b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},T.error=function(){var e=new T(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];T.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new T(null,{status:t,headers:{location:e}})},t.DOMException=e.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 A(e,n){return new Promise((function(r,a){var o=new v(e,n);if(o.signal&&o.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).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 s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new T(i,n))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}A.polyfill=!0,e.fetch||(e.fetch=A,e.Headers=f,e.Request=v,e.Response=T),t.Headers=f,t.Request=v,t.Response=T,t.fetch=A,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(T$e,T$e.exports);var E$e=lt(T$e.exports);const A$e={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class x$e{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new QHe,this.isAvailable=!1,this.registering=!1,!NYe(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{const t=rXe(e),n=await E$e(this.url,Object.assign(Object.assign({},A$e),{body:t})),r=await n.json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!NYe(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),void 0===this.isAvailable)return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=rXe({id:1,jsonrpc:"2.0",method:"test",params:[]});await E$e(e,Object.assign(Object.assign({},A$e),{body:t}))}this.onOpen()}catch(e){const t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(void 0===e.data)return;const t="string"==typeof e.data?nXe(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=IYe(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return bYe(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}const O$e="error",C$e="wc@2:universal_provider:",I$e="default_chain_changed";var S$e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_$e={exports:{}};
|
|
93
93
|
/**
|
|
94
94
|
* @license
|
|
95
95
|
* Lodash <https://lodash.com/>
|