@imtbl/sdk 1.18.1-alpha.1 → 1.18.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-38d5b0d2.js → BridgeWidget-f1c97e75.js} +1 -1
- package/dist/browser/checkout/{HorizontalMenu-actual-00646283.js → HorizontalMenu-actual-66027ec4.js} +1 -1
- package/dist/browser/checkout/{OnRampWidget-9ebb6b54.js → OnRampWidget-ce8a6b36.js} +1 -1
- package/dist/browser/checkout/{SaleWidget-d648c9a7.js → SaleWidget-a4a5f366.js} +1 -1
- package/dist/browser/checkout/{SpendingCapHero-4a7b810b.js → SpendingCapHero-685a6ce5.js} +1 -1
- package/dist/browser/checkout/{SwapWidget-4636dabe.js → SwapWidget-f7e7bd44.js} +1 -1
- package/dist/browser/checkout/{TopUpView-4b4b0d34.js → TopUpView-7387b028.js} +1 -1
- package/dist/browser/checkout/{WalletWidget-7ccd67b4.js → WalletWidget-0864fa3d.js} +1 -1
- package/dist/browser/checkout/{auto-track-8d114101.js → auto-track-2880fdbe.js} +1 -1
- package/dist/browser/checkout/{balance-b6f28f3c.js → balance-9048711a.js} +1 -1
- package/dist/browser/checkout/{index-bc1f5c77.js → index-0a876a1b.js} +1 -1
- package/dist/browser/checkout/{index-f65543a9.js → index-151bd987.js} +1 -1
- package/dist/browser/checkout/index-42176d2f.js +1 -0
- package/dist/browser/checkout/{index-2f3224aa.js → index-679363ec.js} +1 -1
- package/dist/browser/checkout/{index-d9197641.js → index-8a5ac3ae.js} +2 -2
- package/dist/browser/checkout/{index-8781c10a.js → index-93a49bdb.js} +1 -1
- package/dist/browser/checkout/{index-e3e194e4.js → index-a442ca54.js} +1 -1
- package/dist/browser/checkout/{index-123ee7b4.js → index-d68b071a.js} +1 -1
- package/dist/browser/checkout/{index.umd-a6a75a6d.js → index.umd-5b285e28.js} +1 -1
- package/dist/browser/checkout/{retry-eb16dd87.js → retry-3680b998.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-f6d41019.js +0 -1
|
@@ -73,7 +73,7 @@ function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,a=t.algo,s=i.create([0,1,2,
|
|
|
73
73
|
* LICENSE file in the root directory of this source tree.
|
|
74
74
|
*/function b3(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 w3=new Set,E3={};function x3(e,t){T3(e,t),T3(e+"Capture",t)}function T3(e,t){for(E3[e]=t,e=0;e<t.length;e++)w3.add(t[e])}var A3=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),_3=Object.prototype.hasOwnProperty,C3=/^[: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]*$/,I3={},S3={};function k3(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var O3={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){O3[e]=new k3(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];O3[t]=new k3(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){O3[e]=new k3(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){O3[e]=new k3(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){O3[e]=new k3(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){O3[e]=new k3(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){O3[e]=new k3(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){O3[e]=new k3(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){O3[e]=new k3(e,5,!1,e.toLowerCase(),null,!1,!1)}));var P3=/[\-:]([a-z])/g;function R3(e){return e[1].toUpperCase()}function N3(e,t,n,r){var i=O3.hasOwnProperty(t)?O3[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!!_3.call(S3,e)||!_3.call(I3,e)&&(C3.test(e)?S3[e]=!0:(I3[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(P3,R3);O3[t]=new k3(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(P3,R3);O3[t]=new k3(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(P3,R3);O3[t]=new k3(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){O3[e]=new k3(e,1,!1,e.toLowerCase(),null,!1,!1)})),O3.xlinkHref=new k3("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){O3[e]=new k3(e,1,!1,e.toLowerCase(),null,!0,!0)}));var M3=g3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,D3=Symbol.for("react.element"),L3=Symbol.for("react.portal"),F3=Symbol.for("react.fragment"),B3=Symbol.for("react.strict_mode"),U3=Symbol.for("react.profiler"),z3=Symbol.for("react.provider"),j3=Symbol.for("react.context"),H3=Symbol.for("react.forward_ref"),W3=Symbol.for("react.suspense"),V3=Symbol.for("react.suspense_list"),G3=Symbol.for("react.memo"),q3=Symbol.for("react.lazy"),K3=Symbol.for("react.offscreen"),X3=Symbol.iterator;function Y3(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=X3&&e[X3]||e["@@iterator"])?e:null}var Z3,J3=Object.assign;function Q3(e){if(void 0===Z3)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Z3=t&&t[1]||""}return"\n"+Z3+e}var $3=!1;function e8(e,t){if(!e||$3)return"";$3=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var c="\n"+i[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=a&&0<=s);break}}}finally{$3=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Q3(e):""}function t8(e){switch(e.tag){case 5:return Q3(e.type);case 16:return Q3("Lazy");case 13:return Q3("Suspense");case 19:return Q3("SuspenseList");case 0:case 2:case 15:return e=e8(e.type,!1);case 11:return e=e8(e.type.render,!1);case 1:return e=e8(e.type,!0);default:return""}}function n8(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 F3:return"Fragment";case L3:return"Portal";case U3:return"Profiler";case B3:return"StrictMode";case W3:return"Suspense";case V3:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case j3:return(e.displayName||"Context")+".Consumer";case z3:return(e._context.displayName||"Context")+".Provider";case H3:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case G3:return null!==(t=e.displayName||null)?t:n8(e.type)||"Memo";case q3:t=e._payload,e=e._init;try{return n8(e(t))}catch(e){}}return null}function r8(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 n8(t);case 8:return t===B3?"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 i8(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function o8(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function a8(e){e._valueTracker||(e._valueTracker=function(e){var t=o8(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function s8(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=o8(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function c8(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 l8(e,t){var n=t.checked;return J3({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function u8(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=i8(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 d8(e,t){null!=(t=t.checked)&&N3(e,"checked",t,!1)}function f8(e,t){d8(e,t);var n=i8(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")?p8(e,t.type,n):t.hasOwnProperty("defaultValue")&&p8(e,t.type,i8(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function h8(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 p8(e,t,n){"number"===t&&c8(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var m8=Array.isArray;function y8(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=""+i8(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 g8(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(b3(91));return J3({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function v8(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(b3(92));if(m8(n)){if(1<n.length)throw Error(b3(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:i8(n)}}function b8(e,t){var n=i8(t.value),r=i8(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 w8(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function E8(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 x8(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?E8(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var T8,A8=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((T8=T8||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=T8.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function _8(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 C8={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},I8=["Webkit","ms","Moz","O"];function S8(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||C8.hasOwnProperty(e)&&C8[e]?(""+t).trim():t+"px"}function k8(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=S8(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(C8).forEach((function(e){I8.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),C8[t]=C8[e]}))}));var O8=J3({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 P8(e,t){if(t){if(O8[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(b3(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(b3(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(b3(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(b3(62))}}function R8(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 N8=null;function M8(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var D8=null,L8=null,F8=null;function B8(e){if(e=Pee(e)){if("function"!=typeof D8)throw Error(b3(280));var t=e.stateNode;t&&(t=Nee(t),D8(e.stateNode,e.type,t))}}function U8(e){L8?F8?F8.push(e):F8=[e]:L8=e}function z8(){if(L8){var e=L8,t=F8;if(F8=L8=null,B8(e),t)for(e=0;e<t.length;e++)B8(t[e])}}function j8(e,t){return e(t)}function H8(){}var W8=!1;function V8(e,t,n){if(W8)return e(t,n);W8=!0;try{return j8(e,t,n)}finally{W8=!1,(null!==L8||null!==F8)&&(H8(),z8())}}function G8(e,t){var n=e.stateNode;if(null===n)return null;var r=Nee(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(b3(231,t,typeof n));return n}var q8=!1;if(A3)try{var K8={};Object.defineProperty(K8,"passive",{get:function(){q8=!0}}),window.addEventListener("test",K8,K8),window.removeEventListener("test",K8,K8)}catch(PFe){q8=!1}function X8(e,t,n,r,i,o,a,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var Y8=!1,Z8=null,J8=!1,Q8=null,$8={onError:function(e){Y8=!0,Z8=e}};function e4(e,t,n,r,i,o,a,s,c){Y8=!1,Z8=null,X8.apply($8,arguments)}function t4(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 n4(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 r4(e){if(t4(e)!==e)throw Error(b3(188))}function i4(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=t4(e)))throw Error(b3(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return r4(i),e;if(o===r)return r4(i),t;o=o.sibling}throw Error(b3(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(b3(189))}}if(n.alternate!==r)throw Error(b3(190))}if(3!==n.tag)throw Error(b3(188));return n.stateNode.current===n?e:t}(e),null!==e?o4(e):null}function o4(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=o4(e);if(null!==t)return t;e=e.sibling}return null}var a4=v3.unstable_scheduleCallback,s4=v3.unstable_cancelCallback,c4=v3.unstable_shouldYield,l4=v3.unstable_requestPaint,u4=v3.unstable_now,d4=v3.unstable_getCurrentPriorityLevel,f4=v3.unstable_ImmediatePriority,h4=v3.unstable_UserBlockingPriority,p4=v3.unstable_NormalPriority,m4=v3.unstable_LowPriority,y4=v3.unstable_IdlePriority,g4=null,v4=null;var b4=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(w4(e)/E4|0)|0},w4=Math.log,E4=Math.LN2;var x4=64,T4=4194304;function A4(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 _4(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=A4(s):0!==(o&=a)&&(r=A4(o))}else 0!==(a=n&~i)?r=A4(a):0!==o&&(r=A4(o));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!=(4194240&o)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-b4(t)),r|=e[n],t&=~i;return r}function C4(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 I4(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function S4(){var e=x4;return 0==(4194240&(x4<<=1))&&(x4=64),e}function k4(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function O4(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-b4(t)]=n}function P4(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-b4(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var R4=0;function N4(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var M4,D4,L4,F4,B4,U4=!1,z4=[],j4=null,H4=null,W4=null,V4=new Map,G4=new Map,q4=[],K4="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 X4(e,t){switch(e){case"focusin":case"focusout":j4=null;break;case"dragenter":case"dragleave":H4=null;break;case"mouseover":case"mouseout":W4=null;break;case"pointerover":case"pointerout":V4.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":G4.delete(t.pointerId)}}function Y4(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=Pee(t))&&D4(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Z4(e){var t=Oee(e.target);if(null!==t){var n=t4(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=n4(n)))return e.blockedOn=t,void B4(e.priority,(function(){L4(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 J4(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=c9(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Pee(n))&&D4(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);N8=r,n.target.dispatchEvent(r),N8=null,t.shift()}return!0}function Q4(e,t,n){J4(e)&&n.delete(t)}function $4(){U4=!1,null!==j4&&J4(j4)&&(j4=null),null!==H4&&J4(H4)&&(H4=null),null!==W4&&J4(W4)&&(W4=null),V4.forEach(Q4),G4.forEach(Q4)}function e9(e,t){e.blockedOn===t&&(e.blockedOn=null,U4||(U4=!0,v3.unstable_scheduleCallback(v3.unstable_NormalPriority,$4)))}function t9(e){function t(t){return e9(t,e)}if(0<z4.length){e9(z4[0],e);for(var n=1;n<z4.length;n++){var r=z4[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==j4&&e9(j4,e),null!==H4&&e9(H4,e),null!==W4&&e9(W4,e),V4.forEach(t),G4.forEach(t),n=0;n<q4.length;n++)(r=q4[n]).blockedOn===e&&(r.blockedOn=null);for(;0<q4.length&&null===(n=q4[0]).blockedOn;)Z4(n),null===n.blockedOn&&q4.shift()}var n9=M3.ReactCurrentBatchConfig,r9=!0;function i9(e,t,n,r){var i=R4,o=n9.transition;n9.transition=null;try{R4=1,a9(e,t,n,r)}finally{R4=i,n9.transition=o}}function o9(e,t,n,r){var i=R4,o=n9.transition;n9.transition=null;try{R4=4,a9(e,t,n,r)}finally{R4=i,n9.transition=o}}function a9(e,t,n,r){if(r9){var i=c9(e,t,n,r);if(null===i)nee(e,t,r,s9,n),X4(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return j4=Y4(j4,e,t,n,r,i),!0;case"dragenter":return H4=Y4(H4,e,t,n,r,i),!0;case"mouseover":return W4=Y4(W4,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return V4.set(o,Y4(V4.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,G4.set(o,Y4(G4.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(X4(e,r),4&t&&-1<K4.indexOf(e)){for(;null!==i;){var o=Pee(i);if(null!==o&&M4(o),null===(o=c9(e,t,n,r))&&nee(e,t,r,s9,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else nee(e,t,r,null,n)}}var s9=null;function c9(e,t,n,r){if(s9=null,null!==(e=Oee(e=M8(r))))if(null===(t=t4(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=n4(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 s9=e,null}function l9(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(d4()){case f4:return 1;case h4:return 4;case p4:case m4:return 16;case y4:return 536870912;default:return 16}default:return 16}}var u9=null,d9=null,f9=null;function h9(){if(f9)return f9;var e,t,n=d9,r=n.length,i="value"in u9?u9.value:u9.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return f9=i.slice(e,1<t?1-t:void 0)}function p9(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 m9(){return!0}function y9(){return!1}function g9(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?m9:y9,this.isPropagationStopped=y9,this}return J3(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=m9)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=m9)},persist:function(){},isPersistent:m9}),t}var v9,b9,w9,E9={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},x9=g9(E9),T9=J3({},E9,{view:0,detail:0}),A9=g9(T9),_9=J3({},T9,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:F9,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!==w9&&(w9&&"mousemove"===e.type?(v9=e.screenX-w9.screenX,b9=e.screenY-w9.screenY):b9=v9=0,w9=e),v9)},movementY:function(e){return"movementY"in e?e.movementY:b9}}),C9=g9(_9),I9=g9(J3({},_9,{dataTransfer:0})),S9=g9(J3({},T9,{relatedTarget:0})),k9=g9(J3({},E9,{animationName:0,elapsedTime:0,pseudoElement:0})),O9=J3({},E9,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),P9=g9(O9),R9=g9(J3({},E9,{data:0})),N9={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},M9={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"},D9={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function L9(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=D9[e])&&!!t[e]}function F9(){return L9}var B9=J3({},T9,{key:function(e){if(e.key){var t=N9[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=p9(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?M9[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:F9,charCode:function(e){return"keypress"===e.type?p9(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?p9(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),U9=g9(B9),z9=g9(J3({},_9,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),j9=g9(J3({},T9,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:F9})),H9=g9(J3({},E9,{propertyName:0,elapsedTime:0,pseudoElement:0})),W9=J3({},_9,{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}),V9=g9(W9),G9=[9,13,27,32],q9=A3&&"CompositionEvent"in window,K9=null;A3&&"documentMode"in document&&(K9=document.documentMode);var X9=A3&&"TextEvent"in window&&!K9,Y9=A3&&(!q9||K9&&8<K9&&11>=K9),Z9=String.fromCharCode(32),J9=!1;function Q9(e,t){switch(e){case"keyup":return-1!==G9.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $9(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var e7=!1;var t7={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 n7(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!t7[e.type]:"textarea"===t}function r7(e,t,n,r){U8(r),0<(t=iee(t,"onChange")).length&&(n=new x9("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var i7=null,o7=null;function a7(e){Z7(e,0)}function s7(e){if(s8(Ree(e)))return e}function c7(e,t){if("change"===e)return t}var l7=!1;if(A3){var u7;if(A3){var d7="oninput"in document;if(!d7){var f7=document.createElement("div");f7.setAttribute("oninput","return;"),d7="function"==typeof f7.oninput}u7=d7}else u7=!1;l7=u7&&(!document.documentMode||9<document.documentMode)}function h7(){i7&&(i7.detachEvent("onpropertychange",p7),o7=i7=null)}function p7(e){if("value"===e.propertyName&&s7(o7)){var t=[];r7(t,o7,e,M8(e)),V8(a7,t)}}function m7(e,t,n){"focusin"===e?(h7(),o7=n,(i7=t).attachEvent("onpropertychange",p7)):"focusout"===e&&h7()}function y7(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return s7(o7)}function g7(e,t){if("click"===e)return s7(t)}function v7(e,t){if("input"===e||"change"===e)return s7(t)}var b7="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function w7(e,t){if(b7(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(!_3.call(t,i)||!b7(e[i],t[i]))return!1}return!0}function E7(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function x7(e,t){var n,r=E7(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=E7(r)}}function T7(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?T7(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function A7(){for(var e=window,t=c8();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=c8((e=t.contentWindow).document)}return t}function _7(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 C7(e){var t=A7(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&T7(n.ownerDocument.documentElement,n)){if(null!==r&&_7(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=x7(n,o);var a=x7(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var I7=A3&&"documentMode"in document&&11>=document.documentMode,S7=null,k7=null,O7=null,P7=!1;function R7(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;P7||null==S7||S7!==c8(r)||("selectionStart"in(r=S7)&&_7(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},O7&&w7(O7,r)||(O7=r,0<(r=iee(k7,"onSelect")).length&&(t=new x9("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=S7)))}function N7(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var M7={animationend:N7("Animation","AnimationEnd"),animationiteration:N7("Animation","AnimationIteration"),animationstart:N7("Animation","AnimationStart"),transitionend:N7("Transition","TransitionEnd")},D7={},L7={};function F7(e){if(D7[e])return D7[e];if(!M7[e])return e;var t,n=M7[e];for(t in n)if(n.hasOwnProperty(t)&&t in L7)return D7[e]=n[t];return e}A3&&(L7=document.createElement("div").style,"AnimationEvent"in window||(delete M7.animationend.animation,delete M7.animationiteration.animation,delete M7.animationstart.animation),"TransitionEvent"in window||delete M7.transitionend.transition);var B7=F7("animationend"),U7=F7("animationiteration"),z7=F7("animationstart"),j7=F7("transitionend"),H7=new Map,W7="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 V7(e,t){H7.set(e,t),x3(t,[e])}for(var G7=0;G7<W7.length;G7++){var q7=W7[G7];V7(q7.toLowerCase(),"on"+(q7[0].toUpperCase()+q7.slice(1)))}V7(B7,"onAnimationEnd"),V7(U7,"onAnimationIteration"),V7(z7,"onAnimationStart"),V7("dblclick","onDoubleClick"),V7("focusin","onFocus"),V7("focusout","onBlur"),V7(j7,"onTransitionEnd"),T3("onMouseEnter",["mouseout","mouseover"]),T3("onMouseLeave",["mouseout","mouseover"]),T3("onPointerEnter",["pointerout","pointerover"]),T3("onPointerLeave",["pointerout","pointerover"]),x3("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),x3("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),x3("onBeforeInput",["compositionend","keypress","textInput","paste"]),x3("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),x3("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),x3("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var K7="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(" "),X7=new Set("cancel close invalid load scroll toggle".split(" ").concat(K7));function Y7(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,a,s,c){if(e4.apply(this,arguments),Y8){if(!Y8)throw Error(b3(198));var l=Z8;Y8=!1,Z8=null,J8||(J8=!0,Q8=l)}}(r,t,void 0,e),e.currentTarget=null}function Z7(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==o&&i.isPropagationStopped())break e;Y7(i,s,l),o=c}else for(a=0;a<r.length;a++){if(c=(s=r[a]).instance,l=s.currentTarget,s=s.listener,c!==o&&i.isPropagationStopped())break e;Y7(i,s,l),o=c}}}if(J8)throw e=Q8,J8=!1,Q8=null,e}function J7(e,t){var n=t[Iee];void 0===n&&(n=t[Iee]=new Set);var r=e+"__bubble";n.has(r)||(tee(t,e,2,!1),n.add(r))}function Q7(e,t,n){var r=0;t&&(r|=4),tee(n,e,r,t)}var $7="_reactListening"+Math.random().toString(36).slice(2);function eee(e){if(!e[$7]){e[$7]=!0,w3.forEach((function(t){"selectionchange"!==t&&(X7.has(t)||Q7(t,!1,e),Q7(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[$7]||(t[$7]=!0,Q7("selectionchange",!1,t))}}function tee(e,t,n,r){switch(l9(t)){case 1:var i=i9;break;case 4:i=o9;break;default:i=a9}n=i.bind(null,t,n,e),i=void 0,!q8||"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 nee(e,t,n,r,i){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var c=a.tag;if((3===c||4===c)&&((c=a.stateNode.containerInfo)===i||8===c.nodeType&&c.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=Oee(s)))return;if(5===(c=a.tag)||6===c){r=o=a;continue e}s=s.parentNode}}r=r.return}V8((function(){var r=o,i=M8(n),a=[];e:{var s=H7.get(e);if(void 0!==s){var c=x9,l=e;switch(e){case"keypress":if(0===p9(n))break e;case"keydown":case"keyup":c=U9;break;case"focusin":l="focus",c=S9;break;case"focusout":l="blur",c=S9;break;case"beforeblur":case"afterblur":c=S9;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=C9;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=I9;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=j9;break;case B7:case U7:case z7:c=k9;break;case j7:c=H9;break;case"scroll":c=A9;break;case"wheel":c=V9;break;case"copy":case"cut":case"paste":c=P9;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=z9}var u=0!=(4&t),d=!u&&"scroll"===e,f=u?null!==s?s+"Capture":null:s;u=[];for(var h,p=r;null!==p;){var m=(h=p).stateNode;if(5===h.tag&&null!==m&&(h=m,null!==f&&(null!=(m=G8(p,f))&&u.push(ree(p,m,h)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),a.push({event:s,listeners:u}))}}if(0==(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===N8||!(l=n.relatedTarget||n.fromElement)||!Oee(l)&&!l[Cee])&&(c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(c=r,null!==(l=(l=n.relatedTarget||n.toElement)?Oee(l):null)&&(l!==(d=t4(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(c=null,l=r),c!==l)){if(u=C9,m="onMouseLeave",f="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=z9,m="onPointerLeave",f="onPointerEnter",p="pointer"),d=null==c?s:Ree(c),h=null==l?s:Ree(l),(s=new u(m,p+"leave",c,n,i)).target=d,s.relatedTarget=h,m=null,Oee(i)===r&&((u=new u(f,p+"enter",l,n,i)).target=h,u.relatedTarget=d,m=u),d=m,c&&l)e:{for(f=l,p=0,h=u=c;h;h=oee(h))p++;for(h=0,m=f;m;m=oee(m))h++;for(;0<p-h;)u=oee(u),p--;for(;0<h-p;)f=oee(f),h--;for(;p--;){if(u===f||null!==f&&u===f.alternate)break e;u=oee(u),f=oee(f)}u=null}else u=null;null!==c&&aee(a,s,c,u,!1),null!==l&&null!==d&&aee(a,d,l,u,!0)}if("select"===(c=(s=r?Ree(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===c&&"file"===s.type)var y=c7;else if(n7(s))if(l7)y=v7;else{y=y7;var g=m7}else(c=s.nodeName)&&"input"===c.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(y=g7);switch(y&&(y=y(e,r))?r7(a,y,n,i):(g&&g(e,s,r),"focusout"===e&&(g=s._wrapperState)&&g.controlled&&"number"===s.type&&p8(s,"number",s.value)),g=r?Ree(r):window,e){case"focusin":(n7(g)||"true"===g.contentEditable)&&(S7=g,k7=r,O7=null);break;case"focusout":O7=k7=S7=null;break;case"mousedown":P7=!0;break;case"contextmenu":case"mouseup":case"dragend":P7=!1,R7(a,n,i);break;case"selectionchange":if(I7)break;case"keydown":case"keyup":R7(a,n,i)}var v;if(q9)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else e7?Q9(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Y9&&"ko"!==n.locale&&(e7||"onCompositionStart"!==b?"onCompositionEnd"===b&&e7&&(v=h9()):(d9="value"in(u9=i)?u9.value:u9.textContent,e7=!0)),0<(g=iee(r,b)).length&&(b=new R9(b,e,null,n,i),a.push({event:b,listeners:g}),v?b.data=v:null!==(v=$9(n))&&(b.data=v))),(v=X9?function(e,t){switch(e){case"compositionend":return $9(t);case"keypress":return 32!==t.which?null:(J9=!0,Z9);case"textInput":return(e=t.data)===Z9&&J9?null:e;default:return null}}(e,n):function(e,t){if(e7)return"compositionend"===e||!q9&&Q9(e,t)?(e=h9(),f9=d9=u9=null,e7=!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 Y9&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=iee(r,"onBeforeInput")).length&&(i=new R9("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=v))}Z7(a,t)}))}function ree(e,t,n){return{instance:e,listener:t,currentTarget:n}}function iee(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=G8(e,n))&&r.unshift(ree(e,o,i)),null!=(o=G8(e,t))&&r.push(ree(e,o,i))),e=e.return}return r}function oee(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function aee(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(null!==c&&c===r)break;5===s.tag&&null!==l&&(s=l,i?null!=(c=G8(n,o))&&a.unshift(ree(n,c,s)):i||null!=(c=G8(n,o))&&a.push(ree(n,c,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var see=/\r\n?/g,cee=/\u0000|\uFFFD/g;function lee(e){return("string"==typeof e?e:""+e).replace(see,"\n").replace(cee,"")}function uee(e,t,n){if(t=lee(t),lee(e)!==t&&n)throw Error(b3(425))}function dee(){}var fee=null,hee=null;function pee(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 mee="function"==typeof setTimeout?setTimeout:void 0,yee="function"==typeof clearTimeout?clearTimeout:void 0,gee="function"==typeof Promise?Promise:void 0,vee="function"==typeof queueMicrotask?queueMicrotask:void 0!==gee?function(e){return gee.resolve(null).then(e).catch(bee)}:mee;function bee(e){setTimeout((function(){throw e}))}function wee(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 t9(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);t9(t)}function Eee(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 xee(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 Tee=Math.random().toString(36).slice(2),Aee="__reactFiber$"+Tee,_ee="__reactProps$"+Tee,Cee="__reactContainer$"+Tee,Iee="__reactEvents$"+Tee,See="__reactListeners$"+Tee,kee="__reactHandles$"+Tee;function Oee(e){var t=e[Aee];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Cee]||n[Aee]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=xee(e);null!==e;){if(n=e[Aee])return n;e=xee(e)}return t}n=(e=n).parentNode}return null}function Pee(e){return!(e=e[Aee]||e[Cee])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Ree(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(b3(33))}function Nee(e){return e[_ee]||null}var Mee=[],Dee=-1;function Lee(e){return{current:e}}function Fee(e){0>Dee||(e.current=Mee[Dee],Mee[Dee]=null,Dee--)}function Bee(e,t){Dee++,Mee[Dee]=e.current,e.current=t}var Uee={},zee=Lee(Uee),jee=Lee(!1),Hee=Uee;function Wee(e,t){var n=e.type.contextTypes;if(!n)return Uee;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Vee(e){return null!=(e=e.childContextTypes)}function Gee(){Fee(jee),Fee(zee)}function qee(e,t,n){if(zee.current!==Uee)throw Error(b3(168));Bee(zee,t),Bee(jee,n)}function Kee(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(b3(108,r8(e)||"Unknown",i));return J3({},n,r)}function Xee(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Uee,Hee=zee.current,Bee(zee,e),Bee(jee,jee.current),!0}function Yee(e,t,n){var r=e.stateNode;if(!r)throw Error(b3(169));n?(e=Kee(e,t,Hee),r.__reactInternalMemoizedMergedChildContext=e,Fee(jee),Fee(zee),Bee(zee,e)):Fee(jee),Bee(jee,n)}var Zee=null,Jee=!1,Qee=!1;function $ee(e){null===Zee?Zee=[e]:Zee.push(e)}function ete(){if(!Qee&&null!==Zee){Qee=!0;var e=0,t=R4;try{var n=Zee;for(R4=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Zee=null,Jee=!1}catch(t){throw null!==Zee&&(Zee=Zee.slice(e+1)),a4(f4,ete),t}finally{R4=t,Qee=!1}}return null}var tte=[],nte=0,rte=null,ite=0,ote=[],ate=0,ste=null,cte=1,lte="";function ute(e,t){tte[nte++]=ite,tte[nte++]=rte,rte=e,ite=t}function dte(e,t,n){ote[ate++]=cte,ote[ate++]=lte,ote[ate++]=ste,ste=e;var r=cte;e=lte;var i=32-b4(r)-1;r&=~(1<<i),n+=1;var o=32-b4(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,cte=1<<32-b4(t)+i|n<<i|r,lte=o+e}else cte=1<<o|n<<i|r,lte=e}function fte(e){null!==e.return&&(ute(e,1),dte(e,1,0))}function hte(e){for(;e===rte;)rte=tte[--nte],tte[nte]=null,ite=tte[--nte],tte[nte]=null;for(;e===ste;)ste=ote[--ate],ote[ate]=null,lte=ote[--ate],ote[ate]=null,cte=ote[--ate],ote[ate]=null}var pte=null,mte=null,yte=!1,gte=null;function vte(e,t){var n=Woe(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 bte(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,pte=e,mte=Eee(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,pte=e,mte=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==ste?{id:cte,overflow:lte}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Woe(18,null,null,0)).stateNode=t,n.return=e,e.child=n,pte=e,mte=null,!0);default:return!1}}function wte(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function Ete(e){if(yte){var t=mte;if(t){var n=t;if(!bte(e,t)){if(wte(e))throw Error(b3(418));t=Eee(n.nextSibling);var r=pte;t&&bte(e,t)?vte(r,n):(e.flags=-4097&e.flags|2,yte=!1,pte=e)}}else{if(wte(e))throw Error(b3(418));e.flags=-4097&e.flags|2,yte=!1,pte=e}}}function xte(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;pte=e}function Tte(e){if(e!==pte)return!1;if(!yte)return xte(e),yte=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!pee(e.type,e.memoizedProps)),t&&(t=mte)){if(wte(e))throw Ate(),Error(b3(418));for(;t;)vte(e,t),t=Eee(t.nextSibling)}if(xte(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(b3(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){mte=Eee(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}mte=null}}else mte=pte?Eee(e.stateNode.nextSibling):null;return!0}function Ate(){for(var e=mte;e;)e=Eee(e.nextSibling)}function _te(){mte=pte=null,yte=!1}function Cte(e){null===gte?gte=[e]:gte.push(e)}var Ite=M3.ReactCurrentBatchConfig;function Ste(e,t){if(e&&e.defaultProps){for(var n in t=J3({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var kte=Lee(null),Ote=null,Pte=null,Rte=null;function Nte(){Rte=Pte=Ote=null}function Mte(e){var t=kte.current;Fee(kte),e._currentValue=t}function Dte(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 Lte(e,t){Ote=e,Rte=Pte=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Pre=!0),e.firstContext=null)}function Fte(e){var t=e._currentValue;if(Rte!==e)if(e={context:e,memoizedValue:t,next:null},null===Pte){if(null===Ote)throw Error(b3(308));Pte=e,Ote.dependencies={lanes:0,firstContext:e}}else Pte=Pte.next=e;return t}var Bte=null;function Ute(e){null===Bte?Bte=[e]:Bte.push(e)}function zte(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ute(t)):(n.next=i.next,i.next=n),t.interleaved=n,jte(e,r)}function jte(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 Hte=!1;function Wte(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Vte(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 Gte(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function qte(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&zie)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,jte(e,n)}return null===(i=r.interleaved)?(t.next=t,Ute(r)):(t.next=i.next,i.next=t),r.interleaved=t,jte(e,n)}function Kte(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,P4(e,n)}}function Xte(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Yte(e,t,n,r){var i=e.updateQueue;Hte=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var c=s,l=c.next;c.next=null,null===a?o=l:a.next=l,a=c;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(null!==o){var d=i.baseState;for(a=0,u=l=c=null,s=o;;){var f=s.lane,h=s.eventTime;if((r&f)===f){null!==u&&(u=u.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,m=s;switch(f=t,h=n,m.tag){case 1:if("function"==typeof(p=m.payload)){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(f="function"==typeof(p=m.payload)?p.call(h,d,f):p))break e;d=J3({},d,f);break e;case 2:Hte=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(l=u=h,c=d):u=u.next=h,a|=f;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(f=s).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===u&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Xie|=a,e.lanes=a,e.memoizedState=d}}function Zte(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(b3(191,i));i.call(r)}}}var Jte=(new g3.Component).refs;function Qte(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:J3({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var $te={isMounted:function(e){return!!(e=e._reactInternals)&&t4(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=foe(),i=hoe(e),o=Gte(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=qte(e,o,i))&&(poe(t,e,i,r),Kte(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=foe(),i=hoe(e),o=Gte(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=qte(e,o,i))&&(poe(t,e,i,r),Kte(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=foe(),r=hoe(e),i=Gte(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=qte(e,i,r))&&(poe(t,e,r,n),Kte(t,e,r))}};function ene(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!w7(n,r)||!w7(i,o))}function tne(e,t,n){var r=!1,i=Uee,o=t.contextType;return"object"==typeof o&&null!==o?o=Fte(o):(i=Vee(t)?Hee:zee.current,o=(r=null!=(r=t.contextTypes))?Wee(e,i):Uee),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=$te,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function nne(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&&$te.enqueueReplaceState(t,t.state,null)}function rne(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Jte,Wte(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Fte(o):(o=Vee(t)?Hee:zee.current,i.context=Wee(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(Qte(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&$te.enqueueReplaceState(i,i.state,null),Yte(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function ine(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(b3(309));var r=n.stateNode}if(!r)throw Error(b3(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs;t===Jte&&(t=i.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(b3(284));if(!n._owner)throw Error(b3(290,e))}return e}function one(e,t){throw e=Object.prototype.toString.call(t),Error(b3(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ane(e){return(0,e._init)(e._payload)}function sne(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=Goe(e,t)).index=0,e.sibling=null,e}function o(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 a(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Yoe(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var o=n.type;return o===F3?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===q3&&ane(o)===t.type)?((r=i(t,n.props)).ref=ine(e,t,n),r.return=e,r):((r=qoe(n.type,n.key,n.props,null,e.mode,r)).ref=ine(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Zoe(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function u(e,t,n,r,o){return null===t||7!==t.tag?((t=Koe(n,e.mode,r,o)).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=Yoe(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case D3:return(n=qoe(t.type,t.key,t.props,null,e.mode,n)).ref=ine(e,null,t),n.return=e,n;case L3:return(t=Zoe(t,e.mode,n)).return=e,t;case q3:return d(e,(0,t._init)(t._payload),n)}if(m8(t)||Y3(t))return(t=Koe(t,e.mode,n,null)).return=e,t;one(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 D3:return n.key===i?c(e,t,n,r):null;case L3:return n.key===i?l(e,t,n,r):null;case q3:return f(e,t,(i=n._init)(n._payload),r)}if(m8(n)||Y3(n))return null!==i?null:u(e,t,n,r,null);one(e,n)}return null}function h(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 D3:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case L3:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case q3:return h(e,t,n,(0,r._init)(r._payload),i)}if(m8(r)||Y3(r))return u(t,e=e.get(n)||null,r,i,null);one(t,r)}return null}function p(i,a,s,c){for(var l=null,u=null,p=a,m=a=0,y=null;null!==p&&m<s.length;m++){p.index>m?(y=p,p=null):y=p.sibling;var g=f(i,p,s[m],c);if(null===g){null===p&&(p=y);break}e&&p&&null===g.alternate&&t(i,p),a=o(g,a,m),null===u?l=g:u.sibling=g,u=g,p=y}if(m===s.length)return n(i,p),yte&&ute(i,m),l;if(null===p){for(;m<s.length;m++)null!==(p=d(i,s[m],c))&&(a=o(p,a,m),null===u?l=p:u.sibling=p,u=p);return yte&&ute(i,m),l}for(p=r(i,p);m<s.length;m++)null!==(y=h(p,i,m,s[m],c))&&(e&&null!==y.alternate&&p.delete(null===y.key?m:y.key),a=o(y,a,m),null===u?l=y:u.sibling=y,u=y);return e&&p.forEach((function(e){return t(i,e)})),yte&&ute(i,m),l}function m(i,a,s,c){var l=Y3(s);if("function"!=typeof l)throw Error(b3(150));if(null==(s=l.call(s)))throw Error(b3(151));for(var u=l=null,p=a,m=a=0,y=null,g=s.next();null!==p&&!g.done;m++,g=s.next()){p.index>m?(y=p,p=null):y=p.sibling;var v=f(i,p,g.value,c);if(null===v){null===p&&(p=y);break}e&&p&&null===v.alternate&&t(i,p),a=o(v,a,m),null===u?l=v:u.sibling=v,u=v,p=y}if(g.done)return n(i,p),yte&&ute(i,m),l;if(null===p){for(;!g.done;m++,g=s.next())null!==(g=d(i,g.value,c))&&(a=o(g,a,m),null===u?l=g:u.sibling=g,u=g);return yte&&ute(i,m),l}for(p=r(i,p);!g.done;m++,g=s.next())null!==(g=h(p,i,m,g.value,c))&&(e&&null!==g.alternate&&p.delete(null===g.key?m:g.key),a=o(g,a,m),null===u?l=g:u.sibling=g,u=g);return e&&p.forEach((function(e){return t(i,e)})),yte&&ute(i,m),l}return function e(r,o,s,c){if("object"==typeof s&&null!==s&&s.type===F3&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case D3:e:{for(var l=s.key,u=o;null!==u;){if(u.key===l){if((l=s.type)===F3){if(7===u.tag){n(r,u.sibling),(o=i(u,s.props.children)).return=r,r=o;break e}}else if(u.elementType===l||"object"==typeof l&&null!==l&&l.$$typeof===q3&&ane(l)===u.type){n(r,u.sibling),(o=i(u,s.props)).ref=ine(r,u,s),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===F3?((o=Koe(s.props.children,r.mode,c,s.key)).return=r,r=o):((c=qoe(s.type,s.key,s.props,null,r.mode,c)).ref=ine(r,o,s),c.return=r,r=c)}return a(r);case L3:e:{for(u=s.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){n(r,o.sibling),(o=i(o,s.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Zoe(s,r.mode,c)).return=r,r=o}return a(r);case q3:return e(r,o,(u=s._init)(s._payload),c)}if(m8(s))return p(r,o,s,c);if(Y3(s))return m(r,o,s,c);one(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,s)).return=r,r=o):(n(r,o),(o=Yoe(s,r.mode,c)).return=r,r=o),a(r)):n(r,o)}}var cne=sne(!0),lne=sne(!1),une={},dne=Lee(une),fne=Lee(une),hne=Lee(une);function pne(e){if(e===une)throw Error(b3(174));return e}function mne(e,t){switch(Bee(hne,t),Bee(fne,e),Bee(dne,une),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:x8(null,"");break;default:t=x8(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Fee(dne),Bee(dne,t)}function yne(){Fee(dne),Fee(fne),Fee(hne)}function gne(e){pne(hne.current);var t=pne(dne.current),n=x8(t,e.type);t!==n&&(Bee(fne,e),Bee(dne,n))}function vne(e){fne.current===e&&(Fee(dne),Fee(fne))}var bne=Lee(0);function wne(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 Ene=[];function xne(){for(var e=0;e<Ene.length;e++)Ene[e]._workInProgressVersionPrimary=null;Ene.length=0}var Tne=M3.ReactCurrentDispatcher,Ane=M3.ReactCurrentBatchConfig,_ne=0,Cne=null,Ine=null,Sne=null,kne=!1,One=!1,Pne=0,Rne=0;function Nne(){throw Error(b3(321))}function Mne(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!b7(e[n],t[n]))return!1;return!0}function Dne(e,t,n,r,i,o){if(_ne=o,Cne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Tne.current=null===e||null===e.memoizedState?vre:bre,e=n(r,i),One){o=0;do{if(One=!1,Pne=0,25<=o)throw Error(b3(301));o+=1,Sne=Ine=null,t.updateQueue=null,Tne.current=wre,e=n(r,i)}while(One)}if(Tne.current=gre,t=null!==Ine&&null!==Ine.next,_ne=0,Sne=Ine=Cne=null,kne=!1,t)throw Error(b3(300));return e}function Lne(){var e=0!==Pne;return Pne=0,e}function Fne(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Sne?Cne.memoizedState=Sne=e:Sne=Sne.next=e,Sne}function Bne(){if(null===Ine){var e=Cne.alternate;e=null!==e?e.memoizedState:null}else e=Ine.next;var t=null===Sne?Cne.memoizedState:Sne.next;if(null!==t)Sne=t,Ine=e;else{if(null===e)throw Error(b3(310));e={memoizedState:(Ine=e).memoizedState,baseState:Ine.baseState,baseQueue:Ine.baseQueue,queue:Ine.queue,next:null},null===Sne?Cne.memoizedState=Sne=e:Sne=Sne.next=e}return Sne}function Une(e,t){return"function"==typeof t?t(e):t}function zne(e){var t=Bne(),n=t.queue;if(null===n)throw Error(b3(311));n.lastRenderedReducer=e;var r=Ine,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var s=a=null,c=null,l=o;do{var u=l.lane;if((_ne&u)===u)null!==c&&(c=c.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),r=l.hasEagerState?l.eagerState:e(r,l.action);else{var d={lane:u,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};null===c?(s=c=d,a=r):c=c.next=d,Cne.lanes|=u,Xie|=u}l=l.next}while(null!==l&&l!==o);null===c?a=r:c.next=s,b7(r,t.memoizedState)||(Pre=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,Cne.lanes|=o,Xie|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function jne(e){var t=Bne(),n=t.queue;if(null===n)throw Error(b3(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);b7(o,t.memoizedState)||(Pre=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Hne(){}function Wne(e,t){var n=Cne,r=Bne(),i=t(),o=!b7(r.memoizedState,i);if(o&&(r.memoizedState=i,Pre=!0),r=r.queue,tre(qne.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==Sne&&1&Sne.memoizedState.tag){if(n.flags|=2048,Zne(9,Gne.bind(null,n,r,i,t),void 0,null),null===jie)throw Error(b3(349));0!=(30&_ne)||Vne(n,t,i)}return i}function Vne(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Cne.updateQueue)?(t={lastEffect:null,stores:null},Cne.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Gne(e,t,n,r){t.value=n,t.getSnapshot=r,Kne(t)&&Xne(e)}function qne(e,t,n){return n((function(){Kne(t)&&Xne(e)}))}function Kne(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!b7(e,n)}catch(e){return!0}}function Xne(e){var t=jte(e,1);null!==t&&poe(t,e,1,-1)}function Yne(e){var t=Fne();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Une,lastRenderedState:e},t.queue=e,e=e.dispatch=hre.bind(null,Cne,e),[t.memoizedState,e]}function Zne(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Cne.updateQueue)?(t={lastEffect:null,stores:null},Cne.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 Jne(){return Bne().memoizedState}function Qne(e,t,n,r){var i=Fne();Cne.flags|=e,i.memoizedState=Zne(1|t,n,void 0,void 0===r?null:r)}function $ne(e,t,n,r){var i=Bne();r=void 0===r?null:r;var o=void 0;if(null!==Ine){var a=Ine.memoizedState;if(o=a.destroy,null!==r&&Mne(r,a.deps))return void(i.memoizedState=Zne(t,n,o,r))}Cne.flags|=e,i.memoizedState=Zne(1|t,n,o,r)}function ere(e,t){return Qne(8390656,8,e,t)}function tre(e,t){return $ne(2048,8,e,t)}function nre(e,t){return $ne(4,2,e,t)}function rre(e,t){return $ne(4,4,e,t)}function ire(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 ore(e,t,n){return n=null!=n?n.concat([e]):null,$ne(4,4,ire.bind(null,t,e),n)}function are(){}function sre(e,t){var n=Bne();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Mne(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function cre(e,t){var n=Bne();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Mne(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function lre(e,t,n){return 0==(21&_ne)?(e.baseState&&(e.baseState=!1,Pre=!0),e.memoizedState=n):(b7(n,t)||(n=S4(),Cne.lanes|=n,Xie|=n,e.baseState=!0),t)}function ure(e,t){var n=R4;R4=0!==n&&4>n?n:4,e(!0);var r=Ane.transition;Ane.transition={};try{e(!1),t()}finally{R4=n,Ane.transition=r}}function dre(){return Bne().memoizedState}function fre(e,t,n){var r=hoe(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},pre(e))mre(t,n);else if(null!==(n=zte(e,t,n,r))){poe(n,e,r,foe()),yre(n,t,r)}}function hre(e,t,n){var r=hoe(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(pre(e))mre(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,b7(s,a)){var c=t.interleaved;return null===c?(i.next=i,Ute(t)):(i.next=c.next,c.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=zte(e,t,i,r))&&(poe(n,e,r,i=foe()),yre(n,t,r))}}function pre(e){var t=e.alternate;return e===Cne||null!==t&&t===Cne}function mre(e,t){One=kne=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yre(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,P4(e,n)}}var gre={readContext:Fte,useCallback:Nne,useContext:Nne,useEffect:Nne,useImperativeHandle:Nne,useInsertionEffect:Nne,useLayoutEffect:Nne,useMemo:Nne,useReducer:Nne,useRef:Nne,useState:Nne,useDebugValue:Nne,useDeferredValue:Nne,useTransition:Nne,useMutableSource:Nne,useSyncExternalStore:Nne,useId:Nne,unstable_isNewReconciler:!1},vre={readContext:Fte,useCallback:function(e,t){return Fne().memoizedState=[e,void 0===t?null:t],e},useContext:Fte,useEffect:ere,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Qne(4194308,4,ire.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qne(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qne(4,2,e,t)},useMemo:function(e,t){var n=Fne();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Fne();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=fre.bind(null,Cne,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Fne().memoizedState=e},useState:Yne,useDebugValue:are,useDeferredValue:function(e){return Fne().memoizedState=e},useTransition:function(){var e=Yne(!1),t=e[0];return e=ure.bind(null,e[1]),Fne().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Cne,i=Fne();if(yte){if(void 0===n)throw Error(b3(407));n=n()}else{if(n=t(),null===jie)throw Error(b3(349));0!=(30&_ne)||Vne(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,ere(qne.bind(null,r,o,e),[e]),r.flags|=2048,Zne(9,Gne.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Fne(),t=jie.identifierPrefix;if(yte){var n=lte;t=":"+t+"R"+(n=(cte&~(1<<32-b4(cte)-1)).toString(32)+n),0<(n=Pne++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Rne++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},bre={readContext:Fte,useCallback:sre,useContext:Fte,useEffect:tre,useImperativeHandle:ore,useInsertionEffect:nre,useLayoutEffect:rre,useMemo:cre,useReducer:zne,useRef:Jne,useState:function(){return zne(Une)},useDebugValue:are,useDeferredValue:function(e){return lre(Bne(),Ine.memoizedState,e)},useTransition:function(){return[zne(Une)[0],Bne().memoizedState]},useMutableSource:Hne,useSyncExternalStore:Wne,useId:dre,unstable_isNewReconciler:!1},wre={readContext:Fte,useCallback:sre,useContext:Fte,useEffect:tre,useImperativeHandle:ore,useInsertionEffect:nre,useLayoutEffect:rre,useMemo:cre,useReducer:jne,useRef:Jne,useState:function(){return jne(Une)},useDebugValue:are,useDeferredValue:function(e){var t=Bne();return null===Ine?t.memoizedState=e:lre(t,Ine.memoizedState,e)},useTransition:function(){return[jne(Une)[0],Bne().memoizedState]},useMutableSource:Hne,useSyncExternalStore:Wne,useId:dre,unstable_isNewReconciler:!1};function Ere(e,t){try{var n="",r=t;do{n+=t8(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 xre(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function Tre(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var Are="function"==typeof WeakMap?WeakMap:Map;function _re(e,t,n){(n=Gte(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){noe||(noe=!0,roe=r),Tre(0,t)},n}function Cre(e,t,n){(n=Gte(-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(){Tre(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){Tre(0,t),"function"!=typeof r&&(null===ioe?ioe=new Set([this]):ioe.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function Ire(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Are;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=Foe.bind(null,e,t,n),t.then(e,e))}function Sre(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 kre(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=Gte(-1,1)).tag=2,qte(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var Ore=M3.ReactCurrentOwner,Pre=!1;function Rre(e,t,n,r){t.child=null===e?lne(t,null,n,r):cne(t,e.child,n,r)}function Nre(e,t,n,r,i){n=n.render;var o=t.ref;return Lte(t,i),r=Dne(e,t,n,r,o,i),n=Lne(),null===e||Pre?(yte&&n&&fte(t),t.flags|=1,Rre(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,nie(e,t,i))}function Mre(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Voe(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=qoe(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Dre(e,t,o,r,i))}if(o=e.child,0==(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:w7)(a,r)&&e.ref===t.ref)return nie(e,t,i)}return t.flags|=1,(e=Goe(o,r)).ref=t.ref,e.return=t,t.child=e}function Dre(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(w7(o,r)&&e.ref===t.ref){if(Pre=!1,t.pendingProps=r=o,0==(e.lanes&i))return t.lanes=e.lanes,nie(e,t,i);0!=(131072&e.flags)&&(Pre=!0)}}return Bre(e,t,n,r,i)}function Lre(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Bee(Gie,Vie),Vie|=n;else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Bee(Gie,Vie),Vie|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Bee(Gie,Vie),Vie|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Bee(Gie,Vie),Vie|=r;return Rre(e,t,i,n),t.child}function Fre(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Bre(e,t,n,r,i){var o=Vee(n)?Hee:zee.current;return o=Wee(t,o),Lte(t,i),n=Dne(e,t,n,r,o,i),r=Lne(),null===e||Pre?(yte&&r&&fte(t),t.flags|=1,Rre(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,nie(e,t,i))}function Ure(e,t,n,r,i){if(Vee(n)){var o=!0;Xee(t)}else o=!1;if(Lte(t,i),null===t.stateNode)tie(e,t),tne(t,n,r),rne(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var c=a.context,l=n.contextType;"object"==typeof l&&null!==l?l=Fte(l):l=Wee(t,l=Vee(n)?Hee:zee.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||c!==l)&&nne(t,a,r,l),Hte=!1;var f=t.memoizedState;a.state=f,Yte(t,r,a,i),c=t.memoizedState,s!==r||f!==c||jee.current||Hte?("function"==typeof u&&(Qte(t,n,u,r),c=t.memoizedState),(s=Hte||ene(t,n,s,r,f,c,l))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=l,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Vte(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Ste(t.type,s),a.props=l,d=t.pendingProps,f=a.context,"object"==typeof(c=n.contextType)&&null!==c?c=Fte(c):c=Wee(t,c=Vee(n)?Hee:zee.current);var h=n.getDerivedStateFromProps;(u="function"==typeof h||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||f!==c)&&nne(t,a,r,c),Hte=!1,f=t.memoizedState,a.state=f,Yte(t,r,a,i);var p=t.memoizedState;s!==d||f!==p||jee.current||Hte?("function"==typeof h&&(Qte(t,n,h,r),p=t.memoizedState),(l=Hte||ene(t,n,l,r,f,p,c)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,c),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,c)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=l):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return zre(e,t,n,r,o,i)}function zre(e,t,n,r,i,o){Fre(e,t);var a=0!=(128&t.flags);if(!r&&!a)return i&&Yee(t,n,!1),nie(e,t,o);r=t.stateNode,Ore.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=cne(t,e.child,null,o),t.child=cne(t,null,s,o)):Rre(e,t,s,o),t.memoizedState=r.state,i&&Yee(t,n,!0),t.child}function jre(e){var t=e.stateNode;t.pendingContext?qee(0,t.pendingContext,t.pendingContext!==t.context):t.context&&qee(0,t.context,!1),mne(e,t.containerInfo)}function Hre(e,t,n,r,i){return _te(),Cte(i),t.flags|=256,Rre(e,t,n,r),t.child}var Wre,Vre,Gre,qre,Kre={dehydrated:null,treeContext:null,retryLane:0};function Xre(e){return{baseLanes:e,cachePool:null,transitions:null}}function Yre(e,t,n){var r,i=t.pendingProps,o=bne.current,a=!1,s=0!=(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Bee(bne,1&o),null===e)return Ete(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,a?(i=t.mode,a=t.child,s={mode:"hidden",children:s},0==(1&i)&&null!==a?(a.childLanes=0,a.pendingProps=s):a=Xoe(s,i,0,null),e=Koe(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Xre(n),t.memoizedState=Kre,e):Zre(t,s));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,a){if(n)return 256&t.flags?(t.flags&=-257,Jre(e,t,a,r=xre(Error(b3(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Xoe({mode:"visible",children:r.children},i,0,null),(o=Koe(o,i,a,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,0!=(1&t.mode)&&cne(t,e.child,null,a),t.child.memoizedState=Xre(a),t.memoizedState=Kre,o);if(0==(1&t.mode))return Jre(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var s=r.dgst;return r=s,Jre(e,t,a,r=xre(o=Error(b3(419)),r,void 0))}if(s=0!=(a&e.childLanes),Pre||s){if(null!==(r=jie)){switch(a&-a){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|a))?0:i)&&i!==o.retryLane&&(o.retryLane=i,jte(e,i),poe(r,e,i,-1))}return Ioe(),Jre(e,t,a,r=xre(Error(b3(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Uoe.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,mte=Eee(i.nextSibling),pte=t,yte=!0,gte=null,null!==e&&(ote[ate++]=cte,ote[ate++]=lte,ote[ate++]=ste,cte=e.id,lte=e.overflow,ste=t),t=Zre(t,r.children),t.flags|=4096,t)}(e,t,s,i,r,o,n);if(a){a=i.fallback,s=t.mode,r=(o=e.child).sibling;var c={mode:"hidden",children:i.children};return 0==(1&s)&&t.child!==o?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Goe(o,c)).subtreeFlags=14680064&o.subtreeFlags,null!==r?a=Goe(r,a):(a=Koe(a,s,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,s=null===(s=e.child.memoizedState)?Xre(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=Kre,i}return e=(a=e.child).sibling,i=Goe(a,{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 Zre(e,t){return(t=Xoe({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Jre(e,t,n,r){return null!==r&&Cte(r),cne(t,e.child,null,n),(e=Zre(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Qre(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Dte(e.return,t,n)}function $re(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function eie(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Rre(e,t,r.children,n),0!=(2&(r=bne.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&&Qre(e,n,t);else if(19===e.tag)Qre(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(Bee(bne,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===wne(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),$re(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===wne(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}$re(t,!0,n,null,o);break;case"together":$re(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function tie(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function nie(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Xie|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(b3(153));if(null!==t.child){for(n=Goe(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Goe(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function rie(e,t){if(!yte)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 iie(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 oie(e,t,n){var r=t.pendingProps;switch(hte(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return iie(t),null;case 1:case 17:return Vee(t.type)&&Gee(),iie(t),null;case 3:return r=t.stateNode,yne(),Fee(jee),Fee(zee),xne(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Tte(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==gte&&(voe(gte),gte=null))),Vre(e,t),iie(t),null;case 5:vne(t);var i=pne(hne.current);if(n=t.type,null!==e&&null!=t.stateNode)Gre(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(b3(166));return iie(t),null}if(e=pne(dne.current),Tte(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Aee]=t,r[_ee]=o,e=0!=(1&t.mode),n){case"dialog":J7("cancel",r),J7("close",r);break;case"iframe":case"object":case"embed":J7("load",r);break;case"video":case"audio":for(i=0;i<K7.length;i++)J7(K7[i],r);break;case"source":J7("error",r);break;case"img":case"image":case"link":J7("error",r),J7("load",r);break;case"details":J7("toggle",r);break;case"input":u8(r,o),J7("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},J7("invalid",r);break;case"textarea":v8(r,o),J7("invalid",r)}for(var a in P8(n,o),i=null,o)if(o.hasOwnProperty(a)){var s=o[a];"children"===a?"string"==typeof s?r.textContent!==s&&(!0!==o.suppressHydrationWarning&&uee(r.textContent,s,e),i=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==o.suppressHydrationWarning&&uee(r.textContent,s,e),i=["children",""+s]):E3.hasOwnProperty(a)&&null!=s&&"onScroll"===a&&J7("scroll",r)}switch(n){case"input":a8(r),h8(r,o,!0);break;case"textarea":a8(r),w8(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=dee)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{a=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=E8(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=a.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),"select"===n&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Aee]=t,e[_ee]=r,Wre(e,t,!1,!1),t.stateNode=e;e:{switch(a=R8(n,r),n){case"dialog":J7("cancel",e),J7("close",e),i=r;break;case"iframe":case"object":case"embed":J7("load",e),i=r;break;case"video":case"audio":for(i=0;i<K7.length;i++)J7(K7[i],e);i=r;break;case"source":J7("error",e),i=r;break;case"img":case"image":case"link":J7("error",e),J7("load",e),i=r;break;case"details":J7("toggle",e),i=r;break;case"input":u8(e,r),i=l8(e,r),J7("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=J3({},r,{value:void 0}),J7("invalid",e);break;case"textarea":v8(e,r),i=g8(e,r),J7("invalid",e)}for(o in P8(n,i),s=i)if(s.hasOwnProperty(o)){var c=s[o];"style"===o?k8(e,c):"dangerouslySetInnerHTML"===o?null!=(c=c?c.__html:void 0)&&A8(e,c):"children"===o?"string"==typeof c?("textarea"!==n||""!==c)&&_8(e,c):"number"==typeof c&&_8(e,""+c):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(E3.hasOwnProperty(o)?null!=c&&"onScroll"===o&&J7("scroll",e):null!=c&&N3(e,o,c,a))}switch(n){case"input":a8(e),h8(e,r,!1);break;case"textarea":a8(e),w8(e);break;case"option":null!=r.value&&e.setAttribute("value",""+i8(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?y8(e,!!r.multiple,o,!1):null!=r.defaultValue&&y8(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=dee)}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 iie(t),null;case 6:if(e&&null!=t.stateNode)qre(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(b3(166));if(n=pne(hne.current),pne(dne.current),Tte(t)){if(r=t.stateNode,n=t.memoizedProps,r[Aee]=t,(o=r.nodeValue!==n)&&null!==(e=pte))switch(e.tag){case 3:uee(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&uee(r.nodeValue,n,0!=(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Aee]=t,t.stateNode=r}return iie(t),null;case 13:if(Fee(bne),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(yte&&null!==mte&&0!=(1&t.mode)&&0==(128&t.flags))Ate(),_te(),t.flags|=98560,o=!1;else if(o=Tte(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(b3(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(b3(317));o[Aee]=t}else _te(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;iie(t),o=!1}else null!==gte&&(voe(gte),gte=null),o=!0;if(!o)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&bne.current)?0===qie&&(qie=3):Ioe())),null!==t.updateQueue&&(t.flags|=4),iie(t),null);case 4:return yne(),Vre(e,t),null===e&&eee(t.stateNode.containerInfo),iie(t),null;case 10:return Mte(t.type._context),iie(t),null;case 19:if(Fee(bne),null===(o=t.memoizedState))return iie(t),null;if(r=0!=(128&t.flags),null===(a=o.rendering))if(r)rie(o,!1);else{if(0!==qie||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=wne(e))){for(t.flags|=128,rie(o,!1),null!==(r=a.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(a=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Bee(bne,1&bne.current|2),t.child}e=e.sibling}null!==o.tail&&u4()>eoe&&(t.flags|=128,r=!0,rie(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=wne(a))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),rie(o,!0),null===o.tail&&"hidden"===o.tailMode&&!a.alternate&&!yte)return iie(t),null}else 2*u4()-o.renderingStartTime>eoe&&1073741824!==n&&(t.flags|=128,r=!0,rie(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(null!==(n=o.last)?n.sibling=a:t.child=a,o.last=a)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=u4(),t.sibling=null,n=bne.current,Bee(bne,r?1&n|2:1&n),t):(iie(t),null);case 22:case 23:return Toe(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Vie)&&(iie(t),6&t.subtreeFlags&&(t.flags|=8192)):iie(t),null;case 24:case 25:return null}throw Error(b3(156,t.tag))}function aie(e,t){switch(hte(t),t.tag){case 1:return Vee(t.type)&&Gee(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return yne(),Fee(jee),Fee(zee),xne(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return vne(t),null;case 13:if(Fee(bne),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(b3(340));_te()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Fee(bne),null;case 4:return yne(),null;case 10:return Mte(t.type._context),null;case 22:case 23:return Toe(),null;default:return null}}Wre=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}},Vre=function(){},Gre=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,pne(dne.current);var o,a=null;switch(n){case"input":i=l8(e,i),r=l8(e,r),a=[];break;case"select":i=J3({},i,{value:void 0}),r=J3({},r,{value:void 0}),a=[];break;case"textarea":i=g8(e,i),r=g8(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=dee)}for(l in P8(n,r),n=null,i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&null!=i[l])if("style"===l){var s=i[l];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(E3.hasOwnProperty(l)?a||(a=[]):(a=a||[]).push(l,null));for(l in r){var c=r[l];if(s=null!=i?i[l]:void 0,r.hasOwnProperty(l)&&c!==s&&(null!=c||null!=s))if("style"===l)if(s){for(o in s)!s.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&s[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(a||(a=[]),a.push(l,n)),n=c;else"dangerouslySetInnerHTML"===l?(c=c?c.__html:void 0,s=s?s.__html:void 0,null!=c&&s!==c&&(a=a||[]).push(l,c)):"children"===l?"string"!=typeof c&&"number"!=typeof c||(a=a||[]).push(l,""+c):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(E3.hasOwnProperty(l)?(null!=c&&"onScroll"===l&&J7("scroll",e),a||s===c||(a=[])):(a=a||[]).push(l,c))}n&&(a=a||[]).push("style",n);var l=a;(t.updateQueue=l)&&(t.flags|=4)}},qre=function(e,t,n,r){n!==r&&(t.flags|=4)};var sie=!1,cie=!1,lie="function"==typeof WeakSet?WeakSet:Set,uie=null;function die(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Loe(e,t,n)}else n.current=null}function fie(e,t,n){try{n()}catch(n){Loe(e,t,n)}}var hie=!1;function pie(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&fie(t,n,o)}i=i.next}while(i!==r)}}function mie(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 yie(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 gie(e){var t=e.alternate;null!==t&&(e.alternate=null,gie(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[Aee],delete t[_ee],delete t[Iee],delete t[See],delete t[kee])),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 vie(e){return 5===e.tag||3===e.tag||4===e.tag}function bie(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||vie(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 wie(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=dee));else if(4!==r&&null!==(e=e.child))for(wie(e,t,n),e=e.sibling;null!==e;)wie(e,t,n),e=e.sibling}function Eie(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(Eie(e,t,n),e=e.sibling;null!==e;)Eie(e,t,n),e=e.sibling}var xie=null,Tie=!1;function Aie(e,t,n){for(n=n.child;null!==n;)_ie(e,t,n),n=n.sibling}function _ie(e,t,n){if(v4&&"function"==typeof v4.onCommitFiberUnmount)try{v4.onCommitFiberUnmount(g4,n)}catch(e){}switch(n.tag){case 5:cie||die(n,t);case 6:var r=xie,i=Tie;xie=null,Aie(e,t,n),Tie=i,null!==(xie=r)&&(Tie?(e=xie,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):xie.removeChild(n.stateNode));break;case 18:null!==xie&&(Tie?(e=xie,n=n.stateNode,8===e.nodeType?wee(e.parentNode,n):1===e.nodeType&&wee(e,n),t9(e)):wee(xie,n.stateNode));break;case 4:r=xie,i=Tie,xie=n.stateNode.containerInfo,Tie=!0,Aie(e,t,n),xie=r,Tie=i;break;case 0:case 11:case 14:case 15:if(!cie&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!=(2&o)||0!=(4&o))&&fie(n,t,a),i=i.next}while(i!==r)}Aie(e,t,n);break;case 1:if(!cie&&(die(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Loe(n,t,e)}Aie(e,t,n);break;case 21:Aie(e,t,n);break;case 22:1&n.mode?(cie=(r=cie)||null!==n.memoizedState,Aie(e,t,n),cie=r):Aie(e,t,n);break;default:Aie(e,t,n)}}function Cie(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new lie),t.forEach((function(t){var r=zoe.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Iie(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;null!==s;){switch(s.tag){case 5:xie=s.stateNode,Tie=!1;break e;case 3:case 4:xie=s.stateNode.containerInfo,Tie=!0;break e}s=s.return}if(null===xie)throw Error(b3(160));_ie(o,a,i),xie=null,Tie=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(e){Loe(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)Sie(t,e),t=t.sibling}function Sie(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Iie(t,e),kie(e),4&r){try{pie(3,e,e.return),mie(3,e)}catch(t){Loe(e,e.return,t)}try{pie(5,e,e.return)}catch(t){Loe(e,e.return,t)}}break;case 1:Iie(t,e),kie(e),512&r&&null!==n&&die(n,n.return);break;case 5:if(Iie(t,e),kie(e),512&r&&null!==n&&die(n,n.return),32&e.flags){var i=e.stateNode;try{_8(i,"")}catch(t){Loe(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,a=null!==n?n.memoizedProps:o,s=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===s&&"radio"===o.type&&null!=o.name&&d8(i,o),R8(s,a);var l=R8(s,o);for(a=0;a<c.length;a+=2){var u=c[a],d=c[a+1];"style"===u?k8(i,d):"dangerouslySetInnerHTML"===u?A8(i,d):"children"===u?_8(i,d):N3(i,u,d,l)}switch(s){case"input":f8(i,o);break;case"textarea":b8(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;null!=h?y8(i,!!o.multiple,h,!1):f!==!!o.multiple&&(null!=o.defaultValue?y8(i,!!o.multiple,o.defaultValue,!0):y8(i,!!o.multiple,o.multiple?[]:"",!1))}i[_ee]=o}catch(t){Loe(e,e.return,t)}}break;case 6:if(Iie(t,e),kie(e),4&r){if(null===e.stateNode)throw Error(b3(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(t){Loe(e,e.return,t)}}break;case 3:if(Iie(t,e),kie(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{t9(t.containerInfo)}catch(t){Loe(e,e.return,t)}break;case 4:default:Iie(t,e),kie(e);break;case 13:Iie(t,e),kie(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||($ie=u4())),4&r&&Cie(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(cie=(l=cie)||u,Iie(t,e),cie=l):Iie(t,e),kie(e),8192&r){if(l=null!==e.memoizedState,(e.stateNode.isHidden=l)&&!u&&0!=(1&e.mode))for(uie=e,u=e.child;null!==u;){for(d=uie=u;null!==uie;){switch(h=(f=uie).child,f.tag){case 0:case 11:case 14:case 15:pie(4,f,f.return);break;case 1:die(f,f.return);var p=f.stateNode;if("function"==typeof p.componentWillUnmount){r=f,n=f.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(e){Loe(r,n,e)}}break;case 5:die(f,f.return);break;case 22:if(null!==f.memoizedState){Nie(d);continue}}null!==h?(h.return=f,uie=h):Nie(d)}u=u.sibling}e:for(u=null,d=e;;){if(5===d.tag){if(null===u){u=d;try{i=d.stateNode,l?"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(s=d.stateNode,a=null!=(c=d.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,s.style.display=S8("display",a))}catch(t){Loe(e,e.return,t)}}}else if(6===d.tag){if(null===u)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(t){Loe(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;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Iie(t,e),kie(e),4&r&&Cie(e);case 21:}}function kie(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(vie(n)){var r=n;break e}n=n.return}throw Error(b3(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(_8(i,""),r.flags&=-33),Eie(e,bie(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;wie(e,bie(e),o);break;default:throw Error(b3(161))}}catch(t){Loe(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Oie(e,t,n){uie=e,Pie(e)}function Pie(e,t,n){for(var r=0!=(1&e.mode);null!==uie;){var i=uie,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||sie;if(!a){var s=i.alternate,c=null!==s&&null!==s.memoizedState||cie;s=sie;var l=cie;if(sie=a,(cie=c)&&!l)for(uie=i;null!==uie;)c=(a=uie).child,22===a.tag&&null!==a.memoizedState?Mie(i):null!==c?(c.return=a,uie=c):Mie(i);for(;null!==o;)uie=o,Pie(o),o=o.sibling;uie=i,sie=s,cie=l}Rie(e)}else 0!=(8772&i.subtreeFlags)&&null!==o?(o.return=i,uie=o):Rie(e)}}function Rie(e){for(;null!==uie;){var t=uie;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:cie||mie(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!cie)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Ste(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&Zte(t,o,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Zte(t,a,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 l=t.alternate;if(null!==l){var u=l.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&t9(d)}}}break;default:throw Error(b3(163))}cie||512&t.flags&&yie(t)}catch(e){Loe(t,t.return,e)}}if(t===e){uie=null;break}if(null!==(n=t.sibling)){n.return=t.return,uie=n;break}uie=t.return}}function Nie(e){for(;null!==uie;){var t=uie;if(t===e){uie=null;break}var n=t.sibling;if(null!==n){n.return=t.return,uie=n;break}uie=t.return}}function Mie(e){for(;null!==uie;){var t=uie;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{mie(4,t)}catch(e){Loe(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Loe(t,i,e)}}var o=t.return;try{yie(t)}catch(e){Loe(t,o,e)}break;case 5:var a=t.return;try{yie(t)}catch(e){Loe(t,a,e)}}}catch(e){Loe(t,t.return,e)}if(t===e){uie=null;break}var s=t.sibling;if(null!==s){s.return=t.return,uie=s;break}uie=t.return}}var Die,Lie=Math.ceil,Fie=M3.ReactCurrentDispatcher,Bie=M3.ReactCurrentOwner,Uie=M3.ReactCurrentBatchConfig,zie=0,jie=null,Hie=null,Wie=0,Vie=0,Gie=Lee(0),qie=0,Kie=null,Xie=0,Yie=0,Zie=0,Jie=null,Qie=null,$ie=0,eoe=1/0,toe=null,noe=!1,roe=null,ioe=null,ooe=!1,aoe=null,soe=0,coe=0,loe=null,uoe=-1,doe=0;function foe(){return 0!=(6&zie)?u4():-1!==uoe?uoe:uoe=u4()}function hoe(e){return 0==(1&e.mode)?1:0!=(2&zie)&&0!==Wie?Wie&-Wie:null!==Ite.transition?(0===doe&&(doe=S4()),doe):0!==(e=R4)?e:e=void 0===(e=window.event)?16:l9(e.type)}function poe(e,t,n,r){if(50<coe)throw coe=0,loe=null,Error(b3(185));O4(e,n,r),0!=(2&zie)&&e===jie||(e===jie&&(0==(2&zie)&&(Yie|=n),4===qie&&boe(e,Wie)),moe(e,r),1===n&&0===zie&&0==(1&t.mode)&&(eoe=u4()+500,Jee&&ete()))}function moe(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-b4(o),s=1<<a,c=i[a];-1===c?0!=(s&n)&&0==(s&r)||(i[a]=C4(s,t)):c<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=_4(e,e===jie?Wie:0);if(0===r)null!==n&&s4(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&s4(n),1===t)0===e.tag?function(e){Jee=!0,$ee(e)}(woe.bind(null,e)):$ee(woe.bind(null,e)),vee((function(){0==(6&zie)&&ete()})),n=null;else{switch(N4(r)){case 1:n=f4;break;case 4:n=h4;break;case 16:default:n=p4;break;case 536870912:n=y4}n=joe(n,yoe.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function yoe(e,t){if(uoe=-1,doe=0,0!=(6&zie))throw Error(b3(327));var n=e.callbackNode;if(Moe()&&e.callbackNode!==n)return null;var r=_4(e,e===jie?Wie:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=Soe(e,r);else{t=r;var i=zie;zie|=2;var o=Coe();for(jie===e&&Wie===t||(toe=null,eoe=u4()+500,Aoe(e,t));;)try{Ooe();break}catch(t){_oe(e,t)}Nte(),Fie.current=o,zie=i,null!==Hie?t=0:(jie=null,Wie=0,t=qie)}if(0!==t){if(2===t&&(0!==(i=I4(e))&&(r=i,t=goe(e,i))),1===t)throw n=Kie,Aoe(e,0),boe(e,r),moe(e,u4()),n;if(6===t)boe(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],o=i.getSnapshot;i=i.value;try{if(!b7(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=Soe(e,r))&&(0!==(o=I4(e))&&(r=o,t=goe(e,o))),1===t))throw n=Kie,Aoe(e,0),boe(e,r),moe(e,u4()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(b3(345));case 2:case 5:Noe(e,Qie,toe);break;case 3:if(boe(e,r),(130023424&r)===r&&10<(t=$ie+500-u4())){if(0!==_4(e,0))break;if(((i=e.suspendedLanes)&r)!==r){foe(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=mee(Noe.bind(null,e,Qie,toe),t);break}Noe(e,Qie,toe);break;case 4:if(boe(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-b4(r);o=1<<a,(a=t[a])>i&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=u4()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Lie(r/1960))-r)){e.timeoutHandle=mee(Noe.bind(null,e,Qie,toe),r);break}Noe(e,Qie,toe);break;default:throw Error(b3(329))}}}return moe(e,u4()),e.callbackNode===n?yoe.bind(null,e):null}function goe(e,t){var n=Jie;return e.current.memoizedState.isDehydrated&&(Aoe(e,t).flags|=256),2!==(e=Soe(e,t))&&(t=Qie,Qie=n,null!==t&&voe(t)),e}function voe(e){null===Qie?Qie=e:Qie.push.apply(Qie,e)}function boe(e,t){for(t&=~Zie,t&=~Yie,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-b4(t),r=1<<n;e[n]=-1,t&=~r}}function woe(e){if(0!=(6&zie))throw Error(b3(327));Moe();var t=_4(e,0);if(0==(1&t))return moe(e,u4()),null;var n=Soe(e,t);if(0!==e.tag&&2===n){var r=I4(e);0!==r&&(t=r,n=goe(e,r))}if(1===n)throw n=Kie,Aoe(e,0),boe(e,t),moe(e,u4()),n;if(6===n)throw Error(b3(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Noe(e,Qie,toe),moe(e,u4()),null}function Eoe(e,t){var n=zie;zie|=1;try{return e(t)}finally{0===(zie=n)&&(eoe=u4()+500,Jee&&ete())}}function xoe(e){null!==aoe&&0===aoe.tag&&0==(6&zie)&&Moe();var t=zie;zie|=1;var n=Uie.transition,r=R4;try{if(Uie.transition=null,R4=1,e)return e()}finally{R4=r,Uie.transition=n,0==(6&(zie=t))&&ete()}}function Toe(){Vie=Gie.current,Fee(Gie)}function Aoe(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,yee(n)),null!==Hie)for(n=Hie.return;null!==n;){var r=n;switch(hte(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Gee();break;case 3:yne(),Fee(jee),Fee(zee),xne();break;case 5:vne(r);break;case 4:yne();break;case 13:case 19:Fee(bne);break;case 10:Mte(r.type._context);break;case 22:case 23:Toe()}n=n.return}if(jie=e,Hie=e=Goe(e.current,null),Wie=Vie=t,qie=0,Kie=null,Zie=Yie=Xie=0,Qie=Jie=null,null!==Bte){for(t=0;t<Bte.length;t++)if(null!==(r=(n=Bte[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Bte=null}return e}function _oe(e,t){for(;;){var n=Hie;try{if(Nte(),Tne.current=gre,kne){for(var r=Cne.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}kne=!1}if(_ne=0,Sne=Ine=Cne=null,One=!1,Pne=0,Bie.current=null,null===n||null===n.return){qie=1,Kie=t,Hie=null;break}e:{var o=e,a=n.return,s=n,c=t;if(t=Wie,s.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var l=c,u=s,d=u.tag;if(0==(1&u.mode)&&(0===d||11===d||15===d)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=Sre(a);if(null!==h){h.flags&=-257,kre(h,a,s,0,t),1&h.mode&&Ire(o,l,t),c=l;var p=(t=h).updateQueue;if(null===p){var m=new Set;m.add(c),t.updateQueue=m}else p.add(c);break e}if(0==(1&t)){Ire(o,l,t),Ioe();break e}c=Error(b3(426))}else if(yte&&1&s.mode){var y=Sre(a);if(null!==y){0==(65536&y.flags)&&(y.flags|=256),kre(y,a,s,0,t),Cte(Ere(c,s));break e}}o=c=Ere(c,s),4!==qie&&(qie=2),null===Jie?Jie=[o]:Jie.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,Xte(o,_re(0,c,t));break e;case 1:s=c;var g=o.type,v=o.stateNode;if(0==(128&o.flags)&&("function"==typeof g.getDerivedStateFromError||null!==v&&"function"==typeof v.componentDidCatch&&(null===ioe||!ioe.has(v)))){o.flags|=65536,t&=-t,o.lanes|=t,Xte(o,Cre(o,s,t));break e}}o=o.return}while(null!==o)}Roe(n)}catch(e){t=e,Hie===n&&null!==n&&(Hie=n=n.return);continue}break}}function Coe(){var e=Fie.current;return Fie.current=gre,null===e?gre:e}function Ioe(){0!==qie&&3!==qie&&2!==qie||(qie=4),null===jie||0==(268435455&Xie)&&0==(268435455&Yie)||boe(jie,Wie)}function Soe(e,t){var n=zie;zie|=2;var r=Coe();for(jie===e&&Wie===t||(toe=null,Aoe(e,t));;)try{koe();break}catch(t){_oe(e,t)}if(Nte(),zie=n,Fie.current=r,null!==Hie)throw Error(b3(261));return jie=null,Wie=0,qie}function koe(){for(;null!==Hie;)Poe(Hie)}function Ooe(){for(;null!==Hie&&!c4();)Poe(Hie)}function Poe(e){var t=Die(e.alternate,e,Vie);e.memoizedProps=e.pendingProps,null===t?Roe(e):Hie=t,Bie.current=null}function Roe(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=oie(n,t,Vie)))return void(Hie=n)}else{if(null!==(n=aie(n,t)))return n.flags&=32767,void(Hie=n);if(null===e)return qie=6,void(Hie=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Hie=t);Hie=t=e}while(null!==t);0===qie&&(qie=5)}function Noe(e,t,n){var r=R4,i=Uie.transition;try{Uie.transition=null,R4=1,function(e,t,n,r){do{Moe()}while(null!==aoe);if(0!=(6&zie))throw Error(b3(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(b3(177));e.callbackNode=null,e.callbackPriority=0;var o=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-b4(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,o),e===jie&&(Hie=jie=null,Wie=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||ooe||(ooe=!0,joe(p4,(function(){return Moe(),null}))),o=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||o){o=Uie.transition,Uie.transition=null;var a=R4;R4=1;var s=zie;zie|=4,Bie.current=null,function(e,t){if(fee=r9,_7(e=A7())){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,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(e){n=null;break e}var a=0,s=-1,c=-1,l=0,u=0,d=e,f=null;t:for(;;){for(var h;d!==n||0!==i&&3!==d.nodeType||(s=a+i),d!==o||0!==r&&3!==d.nodeType||(c=a+r),3===d.nodeType&&(a+=d.nodeValue.length),null!==(h=d.firstChild);)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++l===i&&(s=a),f===o&&++u===r&&(c=a),null!==(h=d.nextSibling))break;f=(d=f).parentNode}d=h}n=-1===s||-1===c?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(hee={focusedElem:e,selectionRange:n},r9=!1,uie=t;null!==uie;)if(e=(t=uie).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,uie=e;else for(;null!==uie;){t=uie;try{var p=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!==p){var m=p.memoizedProps,y=p.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:Ste(t.type,m),y);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(b3(163))}}catch(e){Loe(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,uie=e;break}uie=t.return}p=hie,hie=!1}(e,n),Sie(n,e),C7(hee),r9=!!fee,hee=fee=null,e.current=n,Oie(n),l4(),zie=s,R4=a,Uie.transition=o}else e.current=n;if(ooe&&(ooe=!1,aoe=e,soe=i),o=e.pendingLanes,0===o&&(ioe=null),function(e){if(v4&&"function"==typeof v4.onCommitFiberRoot)try{v4.onCommitFiberRoot(g4,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),moe(e,u4()),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(noe)throw noe=!1,e=roe,roe=null,e;0!=(1&soe)&&0!==e.tag&&Moe(),o=e.pendingLanes,0!=(1&o)?e===loe?coe++:(coe=0,loe=e):coe=0,ete()}(e,t,n,r)}finally{Uie.transition=i,R4=r}return null}function Moe(){if(null!==aoe){var e=N4(soe),t=Uie.transition,n=R4;try{if(Uie.transition=null,R4=16>e?16:e,null===aoe)var r=!1;else{if(e=aoe,aoe=null,soe=0,0!=(6&zie))throw Error(b3(331));var i=zie;for(zie|=4,uie=e.current;null!==uie;){var o=uie,a=o.child;if(0!=(16&uie.flags)){var s=o.deletions;if(null!==s){for(var c=0;c<s.length;c++){var l=s[c];for(uie=l;null!==uie;){var u=uie;switch(u.tag){case 0:case 11:case 15:pie(8,u,o)}var d=u.child;if(null!==d)d.return=u,uie=d;else for(;null!==uie;){var f=(u=uie).sibling,h=u.return;if(gie(u),u===l){uie=null;break}if(null!==f){f.return=h,uie=f;break}uie=h}}}var p=o.alternate;if(null!==p){var m=p.child;if(null!==m){p.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(null!==m)}}uie=o}}if(0!=(2064&o.subtreeFlags)&&null!==a)a.return=o,uie=a;else e:for(;null!==uie;){if(0!=(2048&(o=uie).flags))switch(o.tag){case 0:case 11:case 15:pie(9,o,o.return)}var g=o.sibling;if(null!==g){g.return=o.return,uie=g;break e}uie=o.return}}var v=e.current;for(uie=v;null!==uie;){var b=(a=uie).child;if(0!=(2064&a.subtreeFlags)&&null!==b)b.return=a,uie=b;else e:for(a=v;null!==uie;){if(0!=(2048&(s=uie).flags))try{switch(s.tag){case 0:case 11:case 15:mie(9,s)}}catch(e){Loe(s,s.return,e)}if(s===a){uie=null;break e}var w=s.sibling;if(null!==w){w.return=s.return,uie=w;break e}uie=s.return}}if(zie=i,ete(),v4&&"function"==typeof v4.onPostCommitFiberRoot)try{v4.onPostCommitFiberRoot(g4,e)}catch(e){}r=!0}return r}finally{R4=n,Uie.transition=t}}return!1}function Doe(e,t,n){e=qte(e,t=_re(0,t=Ere(n,t),1),1),t=foe(),null!==e&&(O4(e,1,t),moe(e,t))}function Loe(e,t,n){if(3===e.tag)Doe(e,e,n);else for(;null!==t;){if(3===t.tag){Doe(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===ioe||!ioe.has(r))){t=qte(t,e=Cre(t,e=Ere(n,e),1),1),e=foe(),null!==t&&(O4(t,1,e),moe(t,e));break}}t=t.return}}function Foe(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=foe(),e.pingedLanes|=e.suspendedLanes&n,jie===e&&(Wie&n)===n&&(4===qie||3===qie&&(130023424&Wie)===Wie&&500>u4()-$ie?Aoe(e,0):Zie|=n),moe(e,t)}function Boe(e,t){0===t&&(0==(1&e.mode)?t=1:(t=T4,0==(130023424&(T4<<=1))&&(T4=4194304)));var n=foe();null!==(e=jte(e,t))&&(O4(e,t,n),moe(e,n))}function Uoe(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Boe(e,n)}function zoe(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(b3(314))}null!==r&&r.delete(t),Boe(e,n)}function joe(e,t){return a4(e,t)}function Hoe(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 Woe(e,t,n,r){return new Hoe(e,t,n,r)}function Voe(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Goe(e,t){var n=e.alternate;return null===n?((n=Woe(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 qoe(e,t,n,r,i,o){var a=2;if(r=e,"function"==typeof e)Voe(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case F3:return Koe(n.children,i,o,t);case B3:a=8,i|=8;break;case U3:return(e=Woe(12,n,t,2|i)).elementType=U3,e.lanes=o,e;case W3:return(e=Woe(13,n,t,i)).elementType=W3,e.lanes=o,e;case V3:return(e=Woe(19,n,t,i)).elementType=V3,e.lanes=o,e;case K3:return Xoe(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case z3:a=10;break e;case j3:a=9;break e;case H3:a=11;break e;case G3:a=14;break e;case q3:a=16,r=null;break e}throw Error(b3(130,null==e?e:typeof e,""))}return(t=Woe(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Koe(e,t,n,r){return(e=Woe(7,e,r,t)).lanes=n,e}function Xoe(e,t,n,r){return(e=Woe(22,e,r,t)).elementType=K3,e.lanes=n,e.stateNode={isHidden:!1},e}function Yoe(e,t,n){return(e=Woe(6,e,null,t)).lanes=n,e}function Zoe(e,t,n){return(t=Woe(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Joe(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=k4(0),this.expirationTimes=k4(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=k4(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Qoe(e,t,n,r,i,o,a,s,c){return e=new Joe(e,t,n,s,c),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Woe(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Wte(o),e}function $oe(e){if(!e)return Uee;e:{if(t4(e=e._reactInternals)!==e||1!==e.tag)throw Error(b3(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Vee(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(b3(171))}if(1===e.tag){var n=e.type;if(Vee(n))return Kee(e,n,t)}return t}function eae(e,t,n,r,i,o,a,s,c){return(e=Qoe(n,r,!0,e,0,o,0,s,c)).context=$oe(null),n=e.current,(o=Gte(r=foe(),i=hoe(n))).callback=null!=t?t:null,qte(n,o,i),e.current.lanes=i,O4(e,i,r),moe(e,r),e}function tae(e,t,n,r){var i=t.current,o=foe(),a=hoe(i);return n=$oe(n),null===t.context?t.context=n:t.pendingContext=n,(t=Gte(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=qte(i,t,a))&&(poe(e,i,a,o),Kte(e,i,a)),a}function nae(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function rae(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function iae(e,t){rae(e,t),(e=e.alternate)&&rae(e,t)}Die=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||jee.current)Pre=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return Pre=!1,function(e,t,n){switch(t.tag){case 3:jre(t),_te();break;case 5:gne(t);break;case 1:Vee(t.type)&&Xee(t);break;case 4:mne(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Bee(kte,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Bee(bne,1&bne.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Yre(e,t,n):(Bee(bne,1&bne.current),null!==(e=nie(e,t,n))?e.sibling:null);Bee(bne,1&bne.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return eie(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Bee(bne,bne.current),r)break;return null;case 22:case 23:return t.lanes=0,Lre(e,t,n)}return nie(e,t,n)}(e,t,n);Pre=0!=(131072&e.flags)}else Pre=!1,yte&&0!=(1048576&t.flags)&&dte(t,ite,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;tie(e,t),e=t.pendingProps;var i=Wee(t,zee.current);Lte(t,n),i=Dne(null,t,r,e,i,n);var o=Lne();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,Vee(r)?(o=!0,Xee(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Wte(t),i.updater=$te,t.stateNode=i,i._reactInternals=t,rne(t,r,e,n),t=zre(null,t,r,!0,o,n)):(t.tag=0,yte&&o&&fte(t),Rre(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(tie(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Voe(e)?1:0;if(null!=e){if((e=e.$$typeof)===H3)return 11;if(e===G3)return 14}return 2}(r),e=Ste(r,e),i){case 0:t=Bre(null,t,r,e,n);break e;case 1:t=Ure(null,t,r,e,n);break e;case 11:t=Nre(null,t,r,e,n);break e;case 14:t=Mre(null,t,r,Ste(r.type,e),n);break e}throw Error(b3(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Bre(e,t,r,i=t.elementType===r?i:Ste(r,i),n);case 1:return r=t.type,i=t.pendingProps,Ure(e,t,r,i=t.elementType===r?i:Ste(r,i),n);case 3:e:{if(jre(t),null===e)throw Error(b3(387));r=t.pendingProps,i=(o=t.memoizedState).element,Vte(e,t),Yte(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Hre(e,t,r,n,i=Ere(Error(b3(423)),t));break e}if(r!==i){t=Hre(e,t,r,n,i=Ere(Error(b3(424)),t));break e}for(mte=Eee(t.stateNode.containerInfo.firstChild),pte=t,yte=!0,gte=null,n=lne(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(_te(),r===i){t=nie(e,t,n);break e}Rre(e,t,r,n)}t=t.child}return t;case 5:return gne(t),null===e&&Ete(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,pee(r,i)?a=null:null!==o&&pee(r,o)&&(t.flags|=32),Fre(e,t),Rre(e,t,a,n),t.child;case 6:return null===e&&Ete(t),null;case 13:return Yre(e,t,n);case 4:return mne(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=cne(t,null,r,n):Rre(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Nre(e,t,r,i=t.elementType===r?i:Ste(r,i),n);case 7:return Rre(e,t,t.pendingProps,n),t.child;case 8:case 12:return Rre(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Bee(kte,r._currentValue),r._currentValue=a,null!==o)if(b7(o.value,a)){if(o.children===i.children&&!jee.current){t=nie(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var s=o.dependencies;if(null!==s){a=o.child;for(var c=s.firstContext;null!==c;){if(c.context===r){if(1===o.tag){(c=Gte(-1,n&-n)).tag=2;var l=o.updateQueue;if(null!==l){var u=(l=l.shared).pending;null===u?c.next=c:(c.next=u.next,u.next=c),l.pending=c}}o.lanes|=n,null!==(c=o.alternate)&&(c.lanes|=n),Dte(o.return,n,t),s.lanes|=n;break}c=c.next}}else if(10===o.tag)a=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(a=o.return))throw Error(b3(341));a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),Dte(a,n,t),a=o.sibling}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===t){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}Rre(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Lte(t,n),r=r(i=Fte(i)),t.flags|=1,Rre(e,t,r,n),t.child;case 14:return i=Ste(r=t.type,t.pendingProps),Mre(e,t,r,i=Ste(r.type,i),n);case 15:return Dre(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ste(r,i),tie(e,t),t.tag=1,Vee(r)?(e=!0,Xee(t)):e=!1,Lte(t,n),tne(t,r,i),rne(t,r,i,n),zre(null,t,r,!0,e,n);case 19:return eie(e,t,n);case 22:return Lre(e,t,n)}throw Error(b3(156,t.tag))};var oae="function"==typeof reportError?reportError:function(e){console.error(e)};function aae(e){this._internalRoot=e}function sae(e){this._internalRoot=e}function cae(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function lae(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function uae(){}function dae(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=nae(a);s.call(e)}}tae(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=nae(a);o.call(e)}}var a=eae(t,r,e,0,null,!1,0,"",uae);return e._reactRootContainer=a,e[Cee]=a.current,eee(8===e.nodeType?e.parentNode:e),xoe(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=nae(c);s.call(e)}}var c=Qoe(e,0,!1,null,0,!1,0,"",uae);return e._reactRootContainer=c,e[Cee]=c.current,eee(8===e.nodeType?e.parentNode:e),xoe((function(){tae(t,c,n,r)})),c}(n,t,e,i,r);return nae(a)}sae.prototype.render=aae.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(b3(409));tae(e,t,null,null)},sae.prototype.unmount=aae.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;xoe((function(){tae(null,e,null,null)})),t[Cee]=null}},sae.prototype.unstable_scheduleHydration=function(e){if(e){var t=F4();e={blockedOn:null,target:e,priority:t};for(var n=0;n<q4.length&&0!==t&&t<q4[n].priority;n++);q4.splice(n,0,e),0===n&&Z4(e)}},M4=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=A4(t.pendingLanes);0!==n&&(P4(t,1|n),moe(t,u4()),0==(6&zie)&&(eoe=u4()+500,ete()))}break;case 13:xoe((function(){var t=jte(e,1);if(null!==t){var n=foe();poe(t,e,1,n)}})),iae(e,1)}},D4=function(e){if(13===e.tag){var t=jte(e,134217728);if(null!==t)poe(t,e,134217728,foe());iae(e,134217728)}},L4=function(e){if(13===e.tag){var t=hoe(e),n=jte(e,t);if(null!==n)poe(n,e,t,foe());iae(e,t)}},F4=function(){return R4},B4=function(e,t){var n=R4;try{return R4=e,t()}finally{R4=n}},D8=function(e,t,n){switch(t){case"input":if(f8(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=Nee(r);if(!i)throw Error(b3(90));s8(r),f8(r,i)}}}break;case"textarea":b8(e,n);break;case"select":null!=(t=n.value)&&y8(e,!!n.multiple,t,!1)}},j8=Eoe,H8=xoe;var fae={usingClientEntryPoint:!1,Events:[Pee,Ree,Nee,U8,z8,Eoe]},hae={findFiberByHostInstance:Oee,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},pae={bundleType:hae.bundleType,version:hae.version,rendererPackageName:hae.rendererPackageName,rendererConfig:hae.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M3.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=i4(e))?null:e.stateNode},findFiberByHostInstance:hae.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 mae=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mae.isDisabled&&mae.supportsFiber)try{g4=mae.inject(pae),v4=mae}catch(PFe){}}h3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fae,h3.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!cae(t))throw Error(b3(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:L3,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},h3.createRoot=function(e,t){if(!cae(e))throw Error(b3(299));var n=!1,r="",i=oae;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Qoe(e,1,!1,null,0,n,0,r,i),e[Cee]=t.current,eee(8===e.nodeType?e.parentNode:e),new aae(t)},h3.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(b3(188));throw e=Object.keys(e).join(","),Error(b3(268,e))}return e=null===(e=i4(t))?null:e.stateNode},h3.flushSync=function(e){return xoe(e)},h3.hydrate=function(e,t,n){if(!lae(t))throw Error(b3(200));return dae(null,e,t,!0,n)},h3.hydrateRoot=function(e,t,n){if(!cae(e))throw Error(b3(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",a=oae;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=eae(t,null,e,1,null!=n?n:null,i,0,o,a),e[Cee]=t.current,eee(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 sae(t)},h3.render=function(e,t,n){if(!lae(t))throw Error(b3(200));return dae(null,e,t,!1,n)},h3.unmountComponentAtNode=function(e){if(!lae(e))throw Error(b3(40));return!!e._reactRootContainer&&(xoe((function(){dae(null,null,e,!1,(function(){e._reactRootContainer=null,e[Cee]=null}))})),!0)},h3.unstable_batchedUpdates=Eoe,h3.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!lae(n))throw Error(b3(200));if(null==e||void 0===e._reactInternals)throw Error(b3(38));return dae(e,t,n,!1,r)},h3.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)}}(),f3.exports=h3;var yae=f3.exports;function gae(e){var t=e.children,n=e.selector,r=nL.useContext(G2),i=nL.useRef(null),o=$B(nL.useState(!1),2),a=o[0],s=o[1];return p0((function(){return i.current=r?r.querySelector(n):document.querySelector(n),i.current&&s(!0),function(){return s(!1)}}),[n]),a&&i.current?yae.createPortal(t,i.current):null}function vae(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 bae="12px",wae="-12px",Eae="-12px",xae="12px",Tae="0px";function Aae(){var e=l0((function(e){return e.toastList})).state,t=nL.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 vB(Mq,{children:Object.keys(t).map((function(e){var n=e,r=t[n];return 0===r.length?null:vB(tJ,{"data-toast-group":n,testId:"toastsContainer--".concat(n),sx:WB(WB(WB({},$Z),vae(n)),{},{gap:"base.spacing.x2",position:"fixed",zIndex:"base.zLevel.toast",alignItems:"center"}),rc:vB(Iq.div,{initial:WB(WB(WB(WB(WB(WB({opacity:0},"topRight"===n&&{x:bae}),"topLeft"===n&&{x:wae}),"topCenter"===n&&{y:Eae}),"bottomRight"===n&&{x:bae}),"bottomLeft"===n&&{x:wae}),"bottomCenter"===n&&{y:xae}),exit:WB(WB(WB(WB(WB(WB({opacity:0},"topRight"===n&&{x:bae}),"topLeft"===n&&{x:wae}),"topCenter"===n&&{y:Eae}),"bottomRight"===n&&{x:bae}),"bottomLeft"===n&&{x:wae}),"bottomCenter"===n&&{y:xae}),animate:WB(WB(WB(WB(WB(WB({opacity:1},"topRight"===n&&{x:Tae}),"topLeft"===n&&{x:Tae}),"topCenter"===n&&{y:Tae}),"bottomRight"===n&&{x:Tae}),"bottomLeft"===n&&{x:Tae}),"bottomCenter"===n&&{y:Tae}),transition:{duration:sQ.base.motion.normal.fast.jsDuration,ease:sQ.base.motion.normal.fast.jsEase}}),children:vB(Mq,{children:r.map((function(e){var t=e.id,r=e.content,i=e.hideDismissButton,o=e.variant,a=e.onCloseToast,s=e.buttonsPosition,c=e.testId,l=e.sx,u=void 0===l?{}:l,d=function(e,t){Array.isArray(t)||(t=[t]);var n=[],r=[],i=rK(e);return nL.Children.forEach(i,(function(e){DJ(e,t)?n.push(e):r.push(e)})),{subcomponents:n,otherChildren:0===r.length?null:1===r.length?r[0]:r}}(r,[L5,R5,M5]),f=d.otherChildren;return bB(tJ,{"data-id":t,testId:null!=c?c:"toastsContainer__toast",sx:Lq(WB(WB({},"right"===s?WB(WB({},QZ),{},{alignItems:"center",justifyContent:"space-between"}):WB({},$Z)),{},{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"}),u),rc:vB(Iq.div,{initial:WB(WB(WB(WB(WB(WB({opacity:0},"topRight"===n&&{x:bae}),"topLeft"===n&&{x:wae}),"topCenter"===n&&{y:Eae}),"bottomRight"===n&&{x:bae}),"bottomLeft"===n&&{x:wae}),"bottomCenter"===n&&{y:xae}),exit:WB(WB(WB(WB(WB(WB({opacity:0},"topRight"===n&&{x:bae}),"topLeft"===n&&{x:bae}),"topCenter"===n&&{y:Eae}),"bottomRight"===n&&{x:bae}),"bottomLeft"===n&&{x:wae}),"bottomCenter"===n&&{y:xae}),animate:WB(WB(WB(WB(WB(WB({opacity:1},"topRight"===n&&{x:Tae}),"topLeft"===n&&{x:Tae}),"topCenter"===n&&{y:Tae}),"bottomRight"===n&&{x:Tae}),"bottomLeft"===n&&{x:Tae}),"bottomCenter"===n&&{y:Tae}),transition:{duration:sQ.base.motion.normal.fast.jsDuration,ease:sQ.base.motion.normal.fast.jsEase}}),children:[vB(tJ,{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(o,".bright")}}),nL.Children.map(r,(function(e){return EK(e,L5)?e:null})),bB(tJ,{sx:WB(WB(WB({},QZ),"bottomRight"===s?{justifyContent:"flex-end"}:{}),{},{gap:"base.spacing.x1"}),children:[nL.Children.map(r,(function(e){return EK(e,R5)||EK(e,M5)?e:null})),i?null:vB(M5,{testId:"dismissToastButton",onClick:function(){null==a||a()},children:"Dismiss"})]}),f]},t)}))})},n)}))})}var _ae="modal-container",Cae="drawer-container",Iae="popover-container",Sae="toast-container";function kae(e){var t=e.children,n=e.modalContainerId,r=e.drawerContainerId,i=e.popoverContainerId,o=e.toastContainerId,a=nL.useContext(l3),s=_X().base.zLevel;return bB(c0,{children:[t,vB(gae,{selector:n?"#".concat(n):"#".concat(_ae).concat(a),children:vB(q5,{hasExternalContainer:Boolean(n)})}),!n&&vB("div",{id:"".concat(_ae).concat(a)}),vB(gae,{selector:r?"#".concat(r):"#".concat(Cae).concat(a),children:vB(G5,{hasExternalContainer:Boolean(r)})}),!r&&vB("div",{id:"".concat(Cae).concat(a)}),vB(gae,{selector:i?"".concat(i):"#".concat(Iae).concat(a),children:vB(t3,{})}),!i&&vB("div",{id:"".concat(Iae).concat(a),css:Lq(d3,{zIndex:s.popover})}),vB(gae,{selector:o?"#".concat(o):"#".concat(Sae).concat(a),children:vB(Aae,{})}),!o&&vB("div",{id:"".concat(Sae).concat(a)})]})}var Oae=40;function Pae(e){var t=e.resizeDebounceDuration,n=void 0===t?Oae:t,r=yZ((function(e){return e})).setState;return U$("resize",k$((function(){r({width:window.innerWidth,height:window.innerHeight})}),n),{current:"undefined"!=typeof window?window:null}),DQ((function(){return r({width:window.innerWidth,height:window.innerHeight})}),[]),null}var Rae="tooltip-container";function Nae(e){var t=e.children,n=nL.useContext(l3),r=_X().base.zLevel;return bB(M6,{children:[t,vB(gae,{selector:"#".concat(Rae).concat(n),children:vB(c3,{})}),vB("div",{id:"".concat(Rae).concat(n),css:Lq(d3,{zIndex:r.tooltip})})]})}var Mae=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(e){}}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}(),Dae="-ms-",Lae="-moz-",Fae="-webkit-",Bae="comm",Uae="rule",zae="decl",jae="@keyframes",Hae=Math.abs,Wae=String.fromCharCode,Vae=Object.assign;function Gae(e){return e.trim()}function qae(e,t,n){return e.replace(t,n)}function Kae(e,t){return e.indexOf(t)}function Xae(e,t){return 0|e.charCodeAt(t)}function Yae(e,t,n){return e.slice(t,n)}function Zae(e){return e.length}function Jae(e){return e.length}function Qae(e,t){return t.push(e),e}var $ae=1,ese=1,tse=0,nse=0,rse=0,ise="";function ose(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:$ae,column:ese,length:a,return:""}}function ase(e,t){return Vae(ose("",null,null,"",null,null,0),e,{length:-e.length},t)}function sse(){return rse=nse>0?Xae(ise,--nse):0,ese--,10===rse&&(ese=1,$ae--),rse}function cse(){return rse=nse<tse?Xae(ise,nse++):0,ese++,10===rse&&(ese=1,$ae++),rse}function lse(){return Xae(ise,nse)}function use(){return nse}function dse(e,t){return Yae(ise,e,t)}function fse(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 hse(e){return $ae=ese=1,tse=Zae(ise=e),nse=0,[]}function pse(e){return ise="",e}function mse(e){return Gae(dse(nse-1,vse(91===e?e+2:40===e?e+1:e)))}function yse(e){for(;(rse=lse())&&rse<33;)cse();return fse(e)>2||fse(rse)>3?"":" "}function gse(e,t){for(;--t&&cse()&&!(rse<48||rse>102||rse>57&&rse<65||rse>70&&rse<97););return dse(e,use()+(t<6&&32==lse()&&32==cse()))}function vse(e){for(;cse();)switch(rse){case e:return nse;case 34:case 39:34!==e&&39!==e&&vse(rse);break;case 40:41===e&&vse(e);break;case 92:cse()}return nse}function bse(e,t){for(;cse()&&e+rse!==57&&(e+rse!==84||47!==lse()););return"/*"+dse(t,nse-1)+"*"+Wae(47===e?e:cse())}function wse(e){for(;!fse(lse());)cse();return dse(e,nse)}function Ese(e){return pse(xse("",null,null,null,[""],e=hse(e),0,[0],e))}function xse(e,t,n,r,i,o,a,s,c){for(var l=0,u=0,d=a,f=0,h=0,p=0,m=1,y=1,g=1,v=0,b="",w=i,E=o,x=r,T=b;y;)switch(p=v,v=cse()){case 40:if(108!=p&&58==Xae(T,d-1)){-1!=Kae(T+=qae(mse(v),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:T+=mse(v);break;case 9:case 10:case 13:case 32:T+=yse(p);break;case 92:T+=gse(use()-1,7);continue;case 47:switch(lse()){case 42:case 47:Qae(Ase(bse(cse(),use()),t,n),c);break;default:T+="/"}break;case 123*m:s[l++]=Zae(T)*g;case 125*m:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+u:-1==g&&(T=qae(T,/\f/g,"")),h>0&&Zae(T)-d&&Qae(h>32?_se(T+";",r,n,d-1):_se(qae(T," ","")+";",r,n,d-2),c);break;case 59:T+=";";default:if(Qae(x=Tse(T,t,n,l,u,i,s,b,w=[],E=[],d),o),123===v)if(0===u)xse(T,t,x,x,w,o,d,s,E);else switch(99===f&&110===Xae(T,3)?100:f){case 100:case 108:case 109:case 115:xse(e,x,x,r&&Qae(Tse(e,x,x,0,0,i,s,b,i,w=[],d),E),i,E,d,s,r?w:E);break;default:xse(T,x,x,x,[""],E,0,s,E)}}l=u=h=0,m=g=1,b=T="",d=a;break;case 58:d=1+Zae(T),h=p;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==sse())continue;switch(T+=Wae(v),v*m){case 38:g=u>0?1:(T+="\f",-1);break;case 44:s[l++]=(Zae(T)-1)*g,g=1;break;case 64:45===lse()&&(T+=mse(cse())),f=lse(),u=d=Zae(b=T+=wse(use())),v++;break;case 45:45===p&&2==Zae(T)&&(m=0)}}return o}function Tse(e,t,n,r,i,o,a,s,c,l,u){for(var d=i-1,f=0===i?o:[""],h=Jae(f),p=0,m=0,y=0;p<r;++p)for(var g=0,v=Yae(e,d+1,d=Hae(m=a[p])),b=e;g<h;++g)(b=Gae(m>0?f[g]+" "+v:qae(v,/&\f/g,f[g])))&&(c[y++]=b);return ose(e,t,n,0===i?Uae:s,c,l,u)}function Ase(e,t,n){return ose(e,t,n,Bae,Wae(rse),Yae(e,2,-2),0)}function _se(e,t,n,r){return ose(e,t,n,zae,Yae(e,0,r),Yae(e,r+1,-1),r)}function Cse(e,t){for(var n="",r=Jae(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function Ise(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case zae:return e.return=e.return||e.value;case Bae:return"";case jae:return e.return=e.value+"{"+Cse(e.children,r)+"}";case Uae:e.value=e.props.join(",")}return Zae(n=Cse(e.children,r))?e.return=e.value+"{"+n+"}":""}function Sse(e){var t=Jae(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function kse(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Ose=function(e,t,n){for(var r=0,i=0;r=i,i=lse(),38===r&&12===i&&(t[n]=1),!fse(i);)cse();return dse(e,nse)},Pse=function(e,t){return pse(function(e,t){var n=-1,r=44;do{switch(fse(r)){case 0:38===r&&12===lse()&&(t[n]=1),e[n]+=Ose(nse-1,t,n);break;case 2:e[n]+=mse(r);break;case 4:if(44===r){e[++n]=58===lse()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Wae(r)}}while(r=cse());return e}(hse(e),t))},Rse=new WeakMap,Nse=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)||Rse.get(n))&&!r){Rse.set(e,!0);for(var i=[],o=Pse(t,i),a=n.props,s=0,c=0;s<o.length;s++)for(var l=0;l<a.length;l++,c++)e.props[c]=i[s]?o[s].replace(/&\f/g,a[l]):a[l]+" "+o[s]}}},Mse=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Dse(e,t){switch(function(e,t){return 45^Xae(e,0)?(((t<<2^Xae(e,0))<<2^Xae(e,1))<<2^Xae(e,2))<<2^Xae(e,3):0}(e,t)){case 5103:return Fae+"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 Fae+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Fae+e+Lae+e+Dae+e+e;case 6828:case 4268:return Fae+e+Dae+e+e;case 6165:return Fae+e+Dae+"flex-"+e+e;case 5187:return Fae+e+qae(e,/(\w+).+(:[^]+)/,Fae+"box-$1$2"+Dae+"flex-$1$2")+e;case 5443:return Fae+e+Dae+"flex-item-"+qae(e,/flex-|-self/,"")+e;case 4675:return Fae+e+Dae+"flex-line-pack"+qae(e,/align-content|flex-|-self/,"")+e;case 5548:return Fae+e+Dae+qae(e,"shrink","negative")+e;case 5292:return Fae+e+Dae+qae(e,"basis","preferred-size")+e;case 6060:return Fae+"box-"+qae(e,"-grow","")+Fae+e+Dae+qae(e,"grow","positive")+e;case 4554:return Fae+qae(e,/([^-])(transform)/g,"$1"+Fae+"$2")+e;case 6187:return qae(qae(qae(e,/(zoom-|grab)/,Fae+"$1"),/(image-set)/,Fae+"$1"),e,"")+e;case 5495:case 3959:return qae(e,/(image-set\([^]*)/,Fae+"$1$`$1");case 4968:return qae(qae(e,/(.+:)(flex-)?(.*)/,Fae+"box-pack:$3"+Dae+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Fae+e+e;case 4095:case 3583:case 4068:case 2532:return qae(e,/(.+)-inline(.+)/,Fae+"$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(Zae(e)-1-t>6)switch(Xae(e,t+1)){case 109:if(45!==Xae(e,t+4))break;case 102:return qae(e,/(.+:)(.+)-([^]+)/,"$1"+Fae+"$2-$3$1"+Lae+(108==Xae(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Kae(e,"stretch")?Dse(qae(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Xae(e,t+1))break;case 6444:switch(Xae(e,Zae(e)-3-(~Kae(e,"!important")&&10))){case 107:return qae(e,":",":"+Fae)+e;case 101:return qae(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Fae+(45===Xae(e,14)?"inline-":"")+"box$3$1"+Fae+"$2$3$1"+Dae+"$2box$3")+e}break;case 5936:switch(Xae(e,t+11)){case 114:return Fae+e+Dae+qae(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Fae+e+Dae+qae(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Fae+e+Dae+qae(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Fae+e+Dae+e+e}return e}var Lse="undefined"!=typeof document,Fse=Lse?void 0:function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}}((function(){return kse((function(){var e={};return function(t){return e[t]}}))})),Bse=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case zae:e.return=Dse(e.value,e.length);break;case jae:return Cse([ase(e,{value:qae(e.value,"@","@"+Fae)})],r);case Uae:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Cse([ase(e,{props:[qae(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Cse([ase(e,{props:[qae(t,/:(plac\w+)/,":"+Fae+"input-$1")]}),ase(e,{props:[qae(t,/:(plac\w+)/,":-moz-$1")]}),ase(e,{props:[qae(t,/:(plac\w+)/,Dae+"input-$1")]})],r)}return""}))}}],Use=function(e){var t=e.key;if(Lse&&"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,o=e.stylisPlugins||Bse,a={},s=[];Lse&&(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++)a[t[n]]=!0;s.push(e)})));var c,l=[Nse,Mse];if(Lse){var u,d=[Ise,(c=function(e){u.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],f=Sse(l.concat(o,d));i=function(e,t,n,r){u=n,Cse(Ese(e?e+"{"+t.styles+"}":t.styles),f),r&&(g.inserted[t.name]=!0)}}else{var h=[Ise],p=Sse(l.concat(o,h)),m=Fse(o)(t),y=function(e,t){var n=t.name;return void 0===m[n]&&(m[n]=Cse(Ese(e?e+"{"+t.styles+"}":t.styles),p)),m[n]};i=function(e,t,n,r){var i=t.name,o=y(e,t);return void 0===g.compat?(r&&(g.inserted[i]=!0),o):r?void(g.inserted[i]=o):o}}var g={key:t,sheet:new Mae({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return g.sheet.hydrate(s),g};var zse={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},jse=/[A-Z]|^ms/g,Hse=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Wse=function(e){return 45===e.charCodeAt(1)},Vse=function(e){return null!=e&&"boolean"!=typeof e},Gse=kse((function(e){return Wse(e)?e:e.replace(jse,"-$&").toLowerCase()})),qse=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Hse,(function(e,t,n){return Xse={name:t,styles:n,next:Xse},t}))}return 1===zse[e]||Wse(e)||"number"!=typeof t||0===t?t:t+"px"};function Kse(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 Xse={name:n.name,styles:n.styles,next:Xse},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Xse={name:r.name,styles:r.styles,next:Xse},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+=Kse(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":Vse(a)&&(r+=Gse(o)+":"+qse(o,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=Kse(e,t,a);switch(o){case"animation":case"animationName":r+=Gse(o)+":"+s+";";break;default:r+=o+"{"+s+"}"}}else for(var c=0;c<a.length;c++)Vse(a[c])&&(r+=Gse(o)+":"+qse(o,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=Xse,o=n(e);return Xse=i,Kse(e,t,o)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var Xse,Yse=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Zse=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="";Xse=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=Kse(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++)i+=Kse(n,t,e[a]),r&&(i+=o[a]);Yse.lastIndex=0;for(var s,c="";null!==(s=Yse.exec(i));)c+="-"+s[1];var l=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:l,styles:i,next:Xse}},Jse="undefined"!=typeof document;function Qse(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var $se=function(e,t,n){!function(e,t,n){var r=e.key+"-"+t.name;(!1===n||!1===Jse&&void 0!==e.compat)&&void 0===e.registered[r]&&(e.registered[r]=t.styles)}(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i="",o=t;do{var a=e.insert(t===o?"."+r:"",o,e.sheet,!0);Jse||void 0===a||(i+=a),o=o.next}while(void 0!==o);if(!Jse&&0!==i.length)return i}};function ece(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function tce(e,t,n){var r=[],i=Qse(e,r,n);return r.length<2?n:i+t(r)}var nce=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(null!=i){var o=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))o=e(i);else for(var a in o="",i)i[a]&&a&&(o&&(o+=" "),o+=a);break;default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},rce=function(e){var t=Use(e);t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=Zse(n,t.registered,void 0);return $se(t,i,!1),t.key+"-"+i.name};return{css:n,cx:function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return tce(t.registered,n,nce(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=Zse(n,t.registered);ece(t,i)},keyframes:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=Zse(n,t.registered),o="animation-"+i.name;return ece(t,{name:i.name,styles:"@keyframes "+o+"{"+i.styles+"}"}),o},hydrate:function(e){e.forEach((function(e){t.inserted[e]=!0}))},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:Qse.bind(null,t.registered),merge:tce.bind(null,t.registered,n)}}({key:"css"}),ice=rce.injectGlobal,oce=["base"];function ace(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"===GB(r)?e[n]=ace(e[n],t):"string"==typeof r&&r.includes("base.")&&(e[n]=vX(t,r))}return e}ice({name:"1ikjipj",styles:'@import url("https://biome.immutable.com/hosted-assets/css/im-fonts-v4.css");{}/* ^ @NOTE: never put anyting (even a comment), before the fontFaceStylesImport */'});var sce=sQ;function cce(e){var t=e.children,n=e.theme,r=void 0===n?sce:n,i=e.globalSx,o=void 0===i?{}:i,a=function(e){var t=e.base,n=JB(e,oce),r=t.color;return WB({base:WB(WB({},t),{},{color:ace(r,e),breakpointAsArray:Object.values(t.breakpoint)})},n)}(r),s=CX(Lq({"*, *::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"}},o),a);return bB(dB,{theme:a,children:[vB(sU,{styles:s}),t]})}var lce=nL.createContext({toggleTheme:function(){},currentTheme:{base:oQ}});function uce(e){var t=e.children,n=e.lightTheme,r=void 0===n?{base:oQ}:n,i=e.darkTheme,o=void 0===i?{base:aQ}:i,a=e.autoPickTheme,s=void 0!==a&&a,c=e.globalSx,l=$B(nL.useState({base:oQ}),2),u=l[0],d=l[1],f=nL.useCallback((function(){d(u.base===oQ?o:r)}),[u.base,o,r]);DQ((function(){s&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&d(o),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(function(e){d(e.matches?o:r)})))}),[]);var h=nL.useMemo((function(){return{toggleTheme:f,currentTheme:u}}),[u,f]);return vB(lce.Provider,{value:h,children:vB(cce,{theme:u,globalSx:c,children:t})})}var dce="0.20.11";function fce(e){var t=e.children,n=e.withThemeToggle,r=e.resizeDebounceDuration,i=void 0===r?Oae:r,o=e.modalContainerId,a=e.drawerContainerId,s=e.popoverContainerId,c=e.toastContainerId,l=e.shadowRoot,u=e.globalSx,d=WB(WB({},e),{},n?{theme:void 0}:{autoPickTheme:void 0,lightTheme:void 0,darkTheme:void 0}),f=d.autoPickTheme,h=d.lightTheme,p=d.darkTheme,m=d.theme,y=bB(mZ,{children:[vB(Pae,{resizeDebounceDuration:i}),vB(Nae,{children:vB(kae,{modalContainerId:o,drawerContainerId:a,popoverContainerId:s,toastContainerId:c,children:t})})]});return vB(u3,{children:vB(G2.Provider,{value:l,children:n?vB(uce,{lightTheme:h,darkTheme:p,globalSx:u,autoPickTheme:f,children:y}):vB(cce,{theme:m,globalSx:u,children:y})})})}console.log("\n @biom3/react\n \n version: ".concat(dce,"\n\n"));var hce="__lodash_hash_undefined__",pce=1/0,mce="[object Function]",yce="[object GeneratorFunction]",gce="[object Symbol]",vce=/^\./,bce=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wce=/\\(\\)?/g,Ece=/^\[object .+?Constructor\]$/,xce="object"==typeof lt&<&<.Object===Object&<,Tce="object"==typeof self&&self&&self.Object===Object&&self,Ace=xce||Tce||Function("return this")();var _ce=Array.prototype,Cce=Function.prototype,Ice=Object.prototype,Sce=Ace["__core-js_shared__"],kce=function(){var e=/[^.]+$/.exec(Sce&&Sce.keys&&Sce.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Oce=Cce.toString,Pce=Ice.hasOwnProperty,Rce=Ice.toString,Nce=RegExp("^"+Oce.call(Pce).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mce=Ace.Symbol,Dce=_ce.splice,Lce=Kce(Ace,"Map"),Fce=Kce(Object,"create"),Bce=Mce?Mce.prototype:void 0,Uce=Bce?Bce.toString:void 0;function zce(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 jce(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 Hce(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 Wce(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 Vce(e){if(!Yce(e)||(t=e,kce&&kce in t))return!1;var t,n=function(e){var t=Yce(e)?Rce.call(e):"";return t==mce||t==yce}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?Nce:Ece;return n.test(function(e){if(null!=e){try{return Oce.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function Gce(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&Rce.call(e)==gce}(e))return Uce?Uce.call(e):"";var t=e+"";return"0"==t&&1/e==-pce?"-0":t}function qce(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 Kce(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Vce(n)?n:void 0}function Xce(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],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(Xce.Cache||Hce),n}function Yce(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}zce.prototype.clear=function(){this.__data__=Fce?Fce(null):{}},zce.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},zce.prototype.get=function(e){var t=this.__data__;if(Fce){var n=t[e];return n===hce?void 0:n}return Pce.call(t,e)?t[e]:void 0},zce.prototype.has=function(e){var t=this.__data__;return Fce?void 0!==t[e]:Pce.call(t,e)},zce.prototype.set=function(e,t){return this.__data__[e]=Fce&&void 0===t?hce:t,this},jce.prototype.clear=function(){this.__data__=[]},jce.prototype.delete=function(e){var t=this.__data__,n=Wce(t,e);return!(n<0)&&(n==t.length-1?t.pop():Dce.call(t,n,1),!0)},jce.prototype.get=function(e){var t=this.__data__,n=Wce(t,e);return n<0?void 0:t[n][1]},jce.prototype.has=function(e){return Wce(this.__data__,e)>-1},jce.prototype.set=function(e,t){var n=this.__data__,r=Wce(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Hce.prototype.clear=function(){this.__data__={hash:new zce,map:new(Lce||jce),string:new zce}},Hce.prototype.delete=function(e){return qce(this,e).delete(e)},Hce.prototype.get=function(e){return qce(this,e).get(e)},Hce.prototype.has=function(e){return qce(this,e).has(e)},Hce.prototype.set=function(e,t){return qce(this,e).set(e,t),this},Xce((function(e){var t;e=null==(t=e)?"":Gce(t);var n=[];return vce.test(e)&&n.push(""),e.replace(bce,(function(e,t,r,i){n.push(r?i.replace(wce,"$1"):t||e)})),n})),Xce.Cache=Hce;var Zce={size:{600:"6px",500:"5px",400:"4px",300:"3px",200:"2px",100:"1px"}},Jce={size:{600:"64px",500:"48px",400:"32px",300:"24px",250:"20px",200:"16px",100:"12px"}},Qce={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"}},$ce={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}}}},ele={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"},tle={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"},nle={small:450,medium:768,large:1024,xLarge:1280,xxLarge:1536,xxxLarge:1920},rle={tooltip:12,toast:11,popover:10,modal:9,drawer:8},ile={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]}}},ole={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:"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:"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:ele,borderRadius:tle,font:Qce,text:$ce,breakpoint:nle,icon:Jce,border:Zce,zLevel:rle,motion:ile},ale={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.inverse.600"},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:ele,borderRadius:tle,font:Qce,text:$ce,breakpoint:nle,icon:Jce,border:Zce,zLevel:rle,motion:ile},{version:sle}={name:"@biom3/design-tokens",version:"0.3.1",main:"./src/index.ts",module:"./src/index.ts",types:"./src/index.ts",directories:{css:"css"},license:"Apache-2.0",sideEffects:!1,scripts:{lint:"npm run typecheck && npm run lint:eslint","lint:eslint":'TIMING=1 eslint "**/*.ts*"',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:{"@types/node":"^18.15.11","can-npm-publish":"^1.3.6",eslint:"^8.56.0","eslint-config-custom":"*",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: ${sle}\n\n`);const cle=e=>e.toLowerCase()===HM.LIGHT.toLowerCase()?ole:ale;const lle={width:"clamp(320px, 100vw, 430px)",minHeight:"500px",height:"100vh",maxHeight:"650px",position:"relative",overflow:"hidden",borderRadius:"base.borderRadius.x4"},ule={position:"relative",display:"flex",flexDirection:"column",backgroundColor:"base.color.neutral.1000",height:"100%",width:"100%"},dle=e=>({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",position:e?"absolute":"relative",zIndex:1}),fle=e=>({display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",backgroundColor:e??""}),hle={flex:1,display:"flex",flexDirection:"column",justifyContent:"flex-start"},ple={flex:"1 0 0",width:"100%"},mle={display:"flex",flexDirection:"column",flex:"1 0 0",width:"100%"},yle={...lle};function gle({id:e,config:t,children:n,globalSx:r}){const i=cle(t.theme),o=nL.useId().replaceAll(":","-");return vB(fce,{globalSx:r,theme:{base:i},drawerContainerId:`${e}${o}`,modalContainerId:`${e}${o}`,children:vB(tJ,{sx:yle,id:`${e}${o}`,children:n})})}var vle=function(e,t){return vle=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},vle(e,t)};function ble(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}vle(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var wle=function(){return wle=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},wle.apply(this,arguments)};function Ele(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function xle(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function Tle(e,t){return function(n,r){t(n,r,e)}}function Ale(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function _le(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}function Cle(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}var Ile=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function Sle(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||Ile(t,e,n)}function kle(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ole(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function Ple(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ole(arguments[t]));return e}function Rle(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function Nle(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;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))}function Mle(e){return this instanceof Mle?(this.v=e,this):new Mle(e)}function Dle(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof Mle?Promise.resolve(e.value.v).then(c,l):u(o[0][2],e)}(i[e](t))}catch(e){u(o[0][3],e)}}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function Lle(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:Mle(e[r](t)),done:!1}:i?i(t):t}:i}}function Fle(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=kle(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function Ble(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var Ule=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function zle(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Ile(t,e,n);return Ule(t,e),t}function jle(e){return e&&e.__esModule?e:{default:e}}function Hle(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function Wle(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function Vle(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function Gle(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if("function"!=typeof r)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var qle="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function Kle(e){function t(t){e.error=e.hasError?new qle(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var r=e.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,(function(e){return t(e),n()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}var Xle={__extends:ble,__assign:wle,__rest:Ele,__decorate:xle,__param:Tle,__metadata:Ale,__awaiter:_le,__generator:Cle,__createBinding:Ile,__exportStar:Sle,__values:kle,__read:Ole,__spread:Ple,__spreadArrays:Rle,__spreadArray:Nle,__await:Mle,__asyncGenerator:Dle,__asyncDelegator:Lle,__asyncValues:Fle,__makeTemplateObject:Ble,__importStar:zle,__importDefault:jle,__classPrivateFieldGet:Hle,__classPrivateFieldSet:Wle,__classPrivateFieldIn:Vle,__addDisposableResource:Gle,__disposeResources:Kle},Yle=Object.freeze({__proto__:null,__addDisposableResource:Gle,get __assign(){return wle},__asyncDelegator:Lle,__asyncGenerator:Dle,__asyncValues:Fle,__await:Mle,__awaiter:_le,__classPrivateFieldGet:Hle,__classPrivateFieldIn:Vle,__classPrivateFieldSet:Wle,__createBinding:Ile,__decorate:xle,__disposeResources:Kle,__esDecorate:function(e,t,n,r,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=r.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?r.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),f=!1,h=n.length-1;h>=0;h--){var p={};for(var m in r)p[m]="access"===m?{}:r[m];for(var m in r.access)p.access[m]=r.access[m];p.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var y=(0,n[h])("accessor"===c?{get:d.get,set:d.set}:d[l],p);if("accessor"===c){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=a(y.get))&&(d.get=s),(s=a(y.set))&&(d.set=s),(s=a(y.init))&&i.unshift(s)}else(s=a(y))&&("field"===c?i.unshift(s):d[l]=s)}u&&Object.defineProperty(u,r.name,d),f=!0},__exportStar:Sle,__extends:ble,__generator:Cle,__importDefault:jle,__importStar:zle,__makeTemplateObject:Ble,__metadata:Ale,__param:Tle,__propKey:function(e){return"symbol"==typeof e?e:"".concat(e)},__read:Ole,__rest:Ele,__runInitializers:function(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0},__setFunctionName:function(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})},__spread:Ple,__spreadArray:Nle,__spreadArrays:Rle,__values:kle,default:Xle}),Zle=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=[],o=0;o<arguments.length;o++)i[o]=arguments[o];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 Jle(e,t,n){t.split&&(t=t.split("."));for(var r,i,o=0,a=t.length,s=e;o<a&&"__proto__"!==(i=t[o++])&&"constructor"!==i&&"prototype"!==i;)s=s[i]=o===a?n:typeof(r=s[i])==typeof t?r:0*t[o]!=0||~(""+t[o]).indexOf(".")?{}:[]}var Qle=function(e){function t(t,n){var r=e.call(this,"".concat(t," ").concat(n))||this;return r.field=t,r}return ble(t,e),t}(Error);function $le(e){return"string"==typeof e}function eue(e){return"number"==typeof e}function tue(e){return"function"==typeof e}function nue(e){return null!=e}function rue(e){return"object"===Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var iue="is not a string",oue="is not an object",aue="is nil";function sue(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 cue(e,t,n){var r;return(r=n,new Promise((function(e){return setTimeout(e,r)}))).then((function(){return sue(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 lue,uue="onRemoveFromFuture",due=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 ble(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,o=void 0===i?2:i,a=e.attempt,s=e.maxTimeout,c=void 0===s?1/0:s;return Math.min(t*r*Math.pow(o,a),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(uue)}),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}(Zle),fue=256,hue=[];fue--;)hue[fue]=(fue+256).toString(16).substring(1);function pue(){var e,t=0,n="";if(!lue||fue+16>256){for(lue=Array(t=256);t--;)lue[t]=256*Math.random()|0;t=fue=0}for(;t<16;t++)e=lue[fue+t],n+=6==t?hue[15&e|64]:8==t?hue[63&e|128]:hue[e],1&t&&t>1&&t<11&&(n+="-");return fue++,n}var mue=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,o=wle(wle({},t),{json:JSON.stringify(t.extras,null," "),extras:t.extras});delete o.time;var a=null!==(i=null===(r=t.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return e[a]&&(a="".concat(a,"-").concat(Math.random())),wle(wle({},e),((n={})[a]=o,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}(),yue=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 wle(wle({},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}(),gue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ble(t,e),t.prototype.gauge=function(){},t.prototype.increment=function(){},t.prototype.flush=function(){},t.prototype.serialize=function(){return[]},t}(yue),vue=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:""},bue=function(){function e(e,t,n,r){void 0===t&&(t=pue()),void 0===n&&(n=new gue),void 0===r&&(r=new mue),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 vue({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 Jle(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 wue(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 _le(this,void 0,void 0,(function(){var t;return Cle(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 vue&&"middleware_cancellation"===n.type)throw n;return n instanceof vue?(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 Eue(e,t){return wue(e,t).then((function(t){if(t instanceof bue)return t;e.log("debug","Context canceled"),e.stats.increment("context_canceled"),e.cancel(t)}))}var xue=function(e){function t(t){var n,r,i,o=e.call(this)||this;return o.criticalTasks=(i=0,{done:function(){return n},run:function(e){var t,o=e();return"object"==typeof(t=o)&&null!==t&&"then"in t&&"function"==typeof t.then&&(1==++i&&(n=new Promise((function(e){return r=e}))),o.finally((function(){return 0==--i&&r()}))),o}}),o.plugins=[],o.failedInitializations=[],o.flushing=!1,o.queue=t,o.queue.on(uue,(function(){o.scheduleFlush(0)})),o}return ble(t,e),t.prototype.register=function(e,t,n){return _le(this,void 0,void 0,(function(){var r=this;return Cle(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 _le(this,void 0,void 0,(function(){var r;return Cle(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 _le(this,void 0,void 0,(function(){var t;return Cle(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 _le(this,void 0,void 0,(function(){var t=this;return Cle(this,(function(n){return[2,new Promise((function(n){var r=function(i,o){i.isSame(e)&&(t.off("flush",r),n(i))};t.on("flush",r)}))]}))}))},t.prototype.dispatchSingle=function(e){return _le(this,void 0,void 0,(function(){var t=this;return Cle(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 _le(this,void 0,void 0,(function(){var t,n,r,i;return Cle(this,(function(o){switch(o.label){case 0:return[4,this.criticalTasks.done()];case 1:o.sent(),t=Date.now(),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.flushOne(e)];case 3:return e=o.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=o.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 vue&&!e.retry)&&this.queue.pushWithBackoff(t)},t.prototype.flush=function(){return _le(this,void 0,void 0,(function(){var e,t;return Cle(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 o=void 0;return null===(n=t.alternativeNames)||void 0===n||n.forEach((function(t){void 0!==e[t]&&(o=e[t])})),null!==(i=null!==(r=e[t.name])&&void 0!==r?r:o)&&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 o=e[t];i="string"!=typeof o?JSON.stringify(o):o}else t instanceof Function&&(i=t(e));void 0!==i&&(n[i]=Nle(Nle([],null!==(r=n[i])&&void 0!==r?r:[],!0),[e],!1))})),n}(t,"type"),r=n.before,i=void 0===r?[]:r,o=n.enrichment,a=void 0===o?[]:o,s=n.destination,c=void 0===s?[]:s,l=n.after;return{before:i,enrichment:a,destinations:c,after:void 0===l?[]:l}},t.prototype.flushOne=function(e){var t,n;return _le(this,void 0,void 0,(function(){var r,i,o,a,s,c,l,u,d,f,h,p,m,y;return Cle(this,(function(g){switch(g.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,o=r.enrichment,a=0,s=i,g.label=1;case 1:return a<s.length?(c=s[a],[4,Eue(e,c)]):[3,4];case 2:(f=g.sent())instanceof bue&&(e=f),this.emit("message_enriched",e,c),g.label=3;case 3:return a++,[3,1];case 4:l=0,u=o,g.label=5;case 5:return l<u.length?(d=u[l],[4,wue(e,d)]):[3,8];case 6:(f=g.sent())instanceof bue&&(e=f),this.emit("message_enriched",e,d),g.label=7;case 7:return l++,[3,5];case 8:return h=this.availableExtensions(null!==(n=e.event.integrations)&&void 0!==n?n:{}),p=h.destinations,m=h.after,[4,new Promise((function(t,n){setTimeout((function(){var r=p.map((function(t){return wue(e,t)}));Promise.all(r).then(t).catch(n)}),0)}))];case 9:return g.sent(),e.stats.increment("message_delivered"),this.emit("message_delivered",e),y=m.map((function(t){return wue(e,t)})),[4,Promise.all(y)];case 10:return g.sent(),[2,e]}}))}))},t}(Zle);function Tue(e,t,n,r){return _le(this,void 0,void 0,(function(){var i,o;return Cle(this,(function(a){switch(a.label){case 0:return n.emit("dispatch_start",e),i=Date.now(),t.isEmpty()?[4,t.dispatchSingle(e)]:[3,2];case 1:return o=a.sent(),[3,4];case 2:return[4,t.dispatch(e)];case 3:o=a.sent(),a.label=4;case 4:return(null==r?void 0:r.callback)?[4,cue(o,r.callback,(s=i,c=r.timeout,l=Date.now()-s,Math.max((null!=c?c:300)-l,0)))]:[3,6];case 5:o=a.sent(),a.label=6;case 6:return(null==r?void 0:r.debug)&&o.flush(),[2,o]}var s,c,l}))}))}function Aue(e,t,n,r){var i,o=[e,t,n,r],a=rue(e)?e.event:e;if(!a||!$le(a))throw new Error("Event missing");var s=rue(e)?null!==(i=e.properties)&&void 0!==i?i:{}:rue(t)?t:{},c={};return tue(n)||(c=null!=n?n:{}),rue(e)&&!tue(t)&&(c=null!=t?t:{}),[a,s,c,o.find(tue)]}function _ue(e,t,n,r,i){var o,a,s=null,c=null,l=[e,t,n,r,i],u=l.filter($le);void 0!==u[0]&&void 0!==u[1]&&(s=u[0],c=u[1]),1===u.length&&(s=null,c=u[0]);var d=l.find(tue),f=l.filter((function(e){return null===c?rue(e):rue(e)||null===e})),h=null!==(o=f[0])&&void 0!==o?o:{},p=null!==(a=f[1])&&void 0!==a?a:{};return[s,c,h,p,d]}var Cue=function(e){return function(){for(var t,n,r,i,o,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var c;c=null!==(r=null!==(t=a.find($le))&&void 0!==t?t:null===(n=a.find(eue))||void 0===n?void 0:n.toString())&&void 0!==r?r:e.id();var l=a.filter((function(e){return null===c?rue(e):rue(e)||null===e})),u=null!==(i=l[0])&&void 0!==i?i:{},d=null!==(o=l[1])&&void 0!==o?o:{},f=a.find(tue);return[c,u,d,f]}};function Iue(e,t,n,r){eue(e)&&(e=e.toString()),eue(t)&&(t=t.toString());var i=[e,t,n,r],o=i.filter($le),a=o[0],s=void 0===a?e:a,c=o[1],l=void 0===c?null:c,u=i.filter(rue)[0];return[s,l,void 0===u?{}:u,i.find(tue)]}function Sue(){return"undefined"!=typeof window}function kue(){return!Sue()}function Oue(){return!Sue()||window.navigator.onLine}function Pue(){return!Oue()}function Rue(e,t){return t=t||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],a=[],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 o},entries:function(){return a},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var l in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){o.push(t=t.toLowerCase()),a.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(l,t.headers[l]);i.send(t.body||null)}))}var Nue=Object.freeze({__proto__:null,default:Rue}),Mue=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null},Due=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Mue();return(n&&n.fetch||Rue).apply(void 0,e)},Lue="1.54.0";
|
|
75
75
|
/*! js-cookie v3.0.1 | MIT */
|
|
76
|
-
function Fue(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 Bue=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=Fue({},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 o="";for(var a in i)i[a]&&(o+="; "+a,!0!==i[a]&&(o+="="+i[a].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+o}}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 o=n[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=t.read(a,s),e===s)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",Fue({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,Fue({},this.attributes,t))},withConverter:function(t){return e(Fue({},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 Uue(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function zue(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__",o=n[r],a={domain:"."+o};try{if(Bue.set(i,"1",a),Bue.get(i))return Bue.remove(i,a),o}catch(e){return}}}var jue=function(){function e(t){void 0===t&&(t=e.defaults),this.options=wle(wle({},e.defaults),t)}return Object.defineProperty(e,"defaults",{get:function(){return{maxage:365,domain:zue(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=Bue.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?Bue.set(e,t,this.opts()):null===t?Bue.remove(e,this.opts()):Bue.set(e,JSON.stringify(t),this.opts())},e.prototype.remove=function(e){return Bue.remove(e,this.opts())},e}(),Hue=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}(),Wue=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}(),Vue={Cookie:"cookie",LocalStorage:"localStorage",Memory:"memory"};function Gue(e){return e&&e.stores&&Array.isArray(e.stores)&&e.stores.every((function(e){return Object.values(Vue).includes(e)}))}var que,Kue=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 Xue(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 Vue.Cookie:return new jue(n);case Vue.LocalStorage:return new Hue;case Vue.Memory:return new Wue;default:throw new Error("Unknown Store Type: ".concat(e))}}));return t}function Yue(e,t){return e.map((function(e){return t&&e===Vue.Cookie?{name:e,settings:t}:e}))}function Zue(){if(que)return que;var e=zue(window.location.href);return que={expires:31536e6,secure:!1,path:"/"},e&&(que.domain=e),que}var Jue="npm";function Que(){return Jue}function $ue(e,t,n,r){var i,o,a,s,c,l,u=e.user();t.context=null!==(o=null!==(i=t.context)&&void 0!==i?i:t.options)&&void 0!==o?o:{};var d=t.context,f="string"==typeof(null===(a=d.page)||void 0===a?void 0:a.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 h=navigator.userLanguage||navigator.language;if(void 0===d.locale&&void 0!==h&&(d.locale=h),!d.library){var p=Que();d.library="web"===p?{name:"analytics.js",version:"next-".concat(Lue)}:{name:"analytics.js",version:"npm:next-".concat(Lue)}}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],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var a=r.substr(4);"campaign"===a&&(a="name"),e[a]=Uue(o)}return e}),{})}(f)),function(e,t,n){var r=new Kue(n?[]:[new jue(Zue())]),i=r.get("s:context.referrer"),o=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("="),o=i[0],a=i[1];if(t[o])return{id:a,type:t[o]}}}(e);(o=null!=o?o:i)&&(t&&(t.referrer=wle(wle({},t.referrer),o)),r.set("s:context.referrer",o))}(f,d,null!==(c=e.options.disableClientPersistence)&&void 0!==c&&c),t.userId=t.userId||u.id(),t.anonymousId=t.anonymousId||u.anonymousId(),t.sentAt=new Date;var m=e.queue.failedInitializations||[];m.length>0&&(t._metadata={failedInitializations:m});var y=[],g=[];for(var v in r){var b=r[v];"Segment.io"===v&&y.push(v),"bundled"===b.bundlingStatus&&y.push(v),"unbundled"===b.bundlingStatus&&g.push(v)}for(var w=0,E=(null==n?void 0:n.unbundledIntegrations)||[];w<E.length;w++){var x=E[w];g.includes(x)||g.push(x)}var T=null!==(l=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==l?l:{},A=[];y.sort().forEach((function(e){var t;(null!==(t=T[e])&&void 0!==t?t:[]).forEach((function(e){A.push(e)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(t._metadata=wle(wle({},t._metadata),{bundled:y.sort(),unbundled:g.sort(),bundledIds:A}));var _=function(){var e=Bue.get("_ga");if(e&&e.startsWith("amp"))return e}();return _&&(d.amp={id:_}),t}var ede="api.segment.io/v1";function tde(e){console.error("Error sending segment performance metrics",e)}var nde,rde=function(){function e(e){var t,n,r,i,o=this;if(this.host=null!==(t=null==e?void 0:e.host)&&void 0!==t?t:ede,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 a=!1,s=function(){a||(a=!0,o.flush().catch(tde),a=!1,setTimeout(s,o.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:wle(wle({},r),{library:"analytics.js",library_version:"web"===n?"next-".concat(Lue):"npm:next-".concat(Lue)})}}(e,t,Que());this.queue.push(n),e.includes("error")&&this.flush().catch(tde)}},e.prototype.flush=function(){return _le(this,void 0,void 0,(function(){var e=this;return Cle(this,(function(t){switch(t.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(t){tde(t),e.sampleRate=0}))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(){return _le(this,void 0,void 0,(function(){var e,t,n;return Cle(this,(function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":"text/plain"},n="https://".concat(this.host,"/m"),[2,Due(n,{headers:t,body:JSON.stringify(e),method:"POST"})]}))}))},e}(),ide=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ble(t,e),t.initRemoteMetrics=function(e){nde=new rde(e)},t.prototype.increment=function(t,n,r){e.prototype.increment.call(this,t,n,r),null==nde||nde.increment(t,null!=r?r:[])},t}(yue),ode=function(e){function t(t,n){return e.call(this,t,n,new ide)||this}return ble(t,e),t.system=function(){return new this({type:"track",event:"system"})},t}(bue),ade={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],o=e[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[2]+718787259|0)<<15|i>>>17)+o|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]=o+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 o(e){var t,i,o,a,s,c,l=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(u,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(u,o),t=0;t<16;t+=1)o[t]=0;return a=(a=8*l).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),c=parseInt(a[1],16)||0,o[14]=s,o[15]=c,n(u,o),u}function a(e){var t,r,o,a,s,c,l=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(u,i(e.subarray(t-64,t)));for(r=(e=t-64<l?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(u,o),t=0;t<16;t+=1)o[t]=0;return a=(a=8*l).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),c=parseInt(a[1],16)||0,o[14]=s,o[15]=c,n(u,o),u}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 l(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function u(e,t){var n,r=e.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=e.charCodeAt(n);return t?o: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 h(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 p(){this.reset()}return c(o("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,o,a,s,c=this.byteLength,l=t(n,c),u=c;return r!==e&&(u=t(r,c)),l>u?new ArrayBuffer(0):(i=u-l,o=new ArrayBuffer(i),a=new Uint8Array(o),s=new Uint8Array(this,l,i),a.set(s),o)}}(),p.prototype.append=function(e){return this.appendBinary(l(e)),this},p.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},p.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=c(this._hash),e&&(n=h(n)),this.reset(),n},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},p.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(e,t){var r,i,o,a=t;if(e[a>>2]|=128<<(a%4<<3),a>55)for(n(this._hash,e),a=0;a<16;a+=1)e[a]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,e[14]=i,e[15]=o,n(this._hash,e)},p.hash=function(e,t){return p.hashBinary(l(e),t)},p.hashBinary=function(e,t){var n=c(o(e));return t?h(n):n},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(e){var t,r=f(this._buff.buffer,e,!0),o=r.length;for(this._length+=e.byteLength,t=64;t<=o;t+=64)n(this._hash,i(r.subarray(t-64,t)));return this._buff=t-64<o?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},p.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=c(this._hash),e&&(n=h(n)),this.reset(),n},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var e=p.prototype.getState.call(this);return e.buff=d(e.buff),e},p.ArrayBuffer.prototype.setState=function(e){return e.buff=u(e.buff,!0),p.prototype.setState.call(this,e)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(e,t){var n=c(a(new Uint8Array(e)));return t?h(n):n},p}()}(ade);var sde=ut(ade.exports),cde=function(){function e(e){this.user=e}return e.prototype.track=function(e,t,n,r){return this.normalize(wle(wle({},this.baseEvent()),{event:e,type:"track",properties:t,options:wle({},n),integrations:wle({},r)}))},e.prototype.page=function(e,t,n,r,i){var o,a={type:"page",properties:wle({},n),options:wle({},r),integrations:wle({},i)};return null!==e&&(a.category=e,a.properties=null!==(o=a.properties)&&void 0!==o?o:{},a.properties.category=e),null!==t&&(a.name=t),this.normalize(wle(wle({},this.baseEvent()),a))},e.prototype.screen=function(e,t,n,r,i){var o={type:"screen",properties:wle({},n),options:wle({},r),integrations:wle({},i)};return null!==e&&(o.category=e),null!==t&&(o.name=t),this.normalize(wle(wle({},this.baseEvent()),o))},e.prototype.identify=function(e,t,n,r){return this.normalize(wle(wle({},this.baseEvent()),{type:"identify",userId:e,traits:t,options:wle({},n),integrations:wle({},r)}))},e.prototype.group=function(e,t,n,r){return this.normalize(wle(wle({},this.baseEvent()),{type:"group",traits:t,options:wle({},n),integrations:wle({},r),groupId:e}))},e.prototype.alias=function(e,t,n,r){var i={userId:e,type:"alias",options:wle({},n),integrations:wle({},r)};return null!==t&&(i.previousId=t),void 0===e?this.normalize(wle(wle({},i),this.baseEvent())):this.normalize(wle(wle({},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"],o=null!==(t=e.options)&&void 0!==t?t:{};delete o.integrations;var a=Object.keys(o),s=null!==(r=null===(n=e.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},c={};return a.forEach((function(e){"context"!==e&&(i.includes(e)?Jle(c,e,o[e]):Jle(s,e,o[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 wle(wle({},t),((r={})[n]=Boolean(null===(i=e.integrations)||void 0===i?void 0:i[n]),r))}),{}),o=wle(wle({},i),null===(r=e.options)||void 0===r?void 0:r.integrations),a=this.context(e),s=a[0],c=a[1];e.options;var l=Ele(e,["options"]),u=wle(wle(wle({timestamp:new Date},l),{context:s,integrations:o}),c),d="ajs-next-"+sde.hash(JSON.stringify(u)+pue());return wle(wle({},u),{messageId:d})},e}(),lde={getItem:function(){},setItem:function(){},removeItem:function(){}};try{lde=Sue()&&window.localStorage?window.localStorage:lde}catch(bJe){console.warn("Unable to access localStorage",bJe)}function ude(e){var t=lde.getItem(e);return(t?JSON.parse(t):[]).map((function(e){return new ode(e.event,e.id)}))}function dde(e){var t=lde.getItem(e);return t?JSON.parse(t):{}}function fde(e){lde.removeItem(e)}function hde(e,t,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(e,":lock"),i=lde.getItem(r),o=i?JSON.parse(i):null,a=null===o||function(e){return(new Date).getTime()>e}(o);if(a)return lde.setItem(r,JSON.stringify((new Date).getTime()+50)),t(),void lde.removeItem(r);!a&&n<3?setTimeout((function(){hde(e,t,n+1)}),50):console.error("Unable to retrieve lock")}var pde=function(e){function t(t,n){var r=e.call(this,t,[])||this,i="persisted-queue:v1:".concat(n,":items"),o="persisted-queue:v1:".concat(n,":seen"),a=[],s={};return hde(n,(function(){try{a=ude(i),s=dde(o),fde(i),fde(o),r.queue=Nle(Nle([],a,!0),r.queue,!0),r.seen=wle(wle({},s),r.seen)}catch(e){console.error(e)}})),window.addEventListener("pagehide",(function(){if(r.todo>0){var e=Nle(Nle([],r.queue,!0),r.future,!0);try{hde(n,(function(){!function(e,t){var n=ude(e),r=Nle(Nle([],t,!0),n,!0).reduce((function(e,t){var n;return wle(wle({},e),((n={})[t.id]=t,n))}),{});lde.setItem(e,JSON.stringify(Object.values(r)))}(i,e),function(e,t){var n=dde(e);lde.setItem(e,JSON.stringify(wle(wle({},n),t)))}(o,r.seen)}))}catch(e){console.error(e)}}})),r}return ble(t,e),t}(due),mde=function(e){function t(t){return e.call(this,"string"==typeof t?new pde(4,t):t)||this}return ble(t,e),t.prototype.flush=function(){return _le(this,void 0,void 0,(function(){return Cle(this,(function(t){return Pue()?[2,[]]:[2,e.prototype.flush.call(this)]}))}))},t}(xue);function yde(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 o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);o&&"function"==typeof o.value&&(e[i]=e[i].bind(e))}}return e}var gde={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},vde=function(){function e(e,t){void 0===e&&(e=gde);var n,r,i,o,a=this;this.options={},this.id=function(e){if(a.options.disable)return null;var t=a.identityStore.getAndSync(a.idKey);void 0!==e&&(a.identityStore.set(a.idKey,e),e!==t&&null!==t&&null!==e&&a.anonymousId(null));var n=a.identityStore.getAndSync(a.idKey);if(n)return n;var r=a.legacyUserStore.get(gde.cookie.oldKey);return r?"object"==typeof r?r.id:r:null},this.anonymousId=function(e){var t,n;if(a.options.disable)return null;if(void 0===e){var r=null!==(t=a.identityStore.getAndSync(a.anonKey))&&void 0!==t?t:null===(n=a.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===e?(a.identityStore.set(a.anonKey,null),a.identityStore.getAndSync(a.anonKey)):(a.identityStore.set(a.anonKey,null!=e?e:pue()),a.identityStore.getAndSync(a.anonKey))},this.traits=function(e){var t;if(!a.options.disable)return null===e&&(e={}),e&&a.traitsStore.set(a.traitsKey,null!=e?e:{}),null!==(t=a.traitsStore.get(a.traitsKey))&&void 0!==t?t:{}},this.options=wle(wle({},gde),e),this.cookieOptions=t,this.idKey=null!==(r=null===(n=e.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:gde.cookie.key,this.traitsKey=null!==(o=null===(i=e.localStorage)||void 0===i?void 0:i.key)&&void 0!==o?o:gde.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===Vue.Cookie})),this.traitsStore=this.createStorage(this.options,t,(function(e){return e!==Vue.Cookie}));var s=this.legacyUserStore.get(gde.cookie.oldKey);s&&"object"==typeof s&&(s.id&&this.id(s.id),s.traits&&this.traits(s.traits)),yde(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=wle(wle({},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=[Vue.LocalStorage,Vue.Cookie,Vue.Memory];return e.disable?new Kue([]):e.persist?(void 0!==e.storage&&null!==e.storage&&Gue(e.storage)&&(r=e.storage.stores),e.localStorageFallbackDisabled&&(r=r.filter((function(e){return e!==Vue.LocalStorage}))),n&&(r=r.filter(n)),new Kue(Xue(Yue(r,t)))):new Kue([new Wue])},e.defaults=gde,e}(),bde={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},wde=function(e){function t(t,n){void 0===t&&(t=bde);var r=e.call(this,wle(wle({},bde),t),n)||this;return r.anonymousId=function(e){},yde(r),r}return ble(t,e),t}(vde),Ede="This is being deprecated and will be not be available in future releases of Analytics JS",xde=Mue(),Tde=null==xde?void 0:xde.analytics;function Ade(){console.warn(Ede)}var _de=function(e){function t(t,n,r,i,o){var a,s,c,l=this;(l=e.call(this)||this)._debug=!1,l.initialized=!1,l.user=function(){return l._user},l.init=l.initialize.bind(l),l.log=Ade,l.addIntegrationMiddleware=Ade,l.listeners=Ade,l.addEventListener=Ade,l.removeAllListeners=Ade,l.removeListener=Ade,l.removeEventListener=Ade,l.hasListeners=Ade,l.add=Ade,l.addIntegration=Ade;var u=null==n?void 0:n.cookie,d=null!==(a=null==n?void 0:n.disableClientPersistence)&&void 0!==a&&a;l.settings=t,l.settings.timeout=null!==(s=l.settings.timeout)&&void 0!==s?s:300,l.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 due(r,[]):new pde(r,e);return new mde(i)}("".concat(t.writeKey,":event-queue"),null==n?void 0:n.retryQueue,d);var f=null==n?void 0:n.storage;return l._universalStorage=l.createStore(d,f,u),l._user=null!=i?i:new vde(wle({persist:!d,storage:null==n?void 0:n.storage},null==n?void 0:n.user),u).load(),l._group=null!=o?o:new wde(wle({persist:!d,storage:null==n?void 0:n.storage},null==n?void 0:n.group),u).load(),l.eventFactory=new cde(l._user),l.integrations=null!==(c=null==n?void 0:n.integrations)&&void 0!==c?c:{},l.options=null!=n?n:{},yde(l),l}return ble(t,e),t.prototype.createStore=function(e,t,n){return e?new Kue([new Wue]):t&&Gue(t)?new Kue(Xue(Yue(t.stores,n))):new Kue(Xue([Vue.LocalStorage,{name:Vue.Cookie,settings:n},Vue.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 _le(this,void 0,void 0,(function(){var t,n,r,i,o,a,s=this;return Cle(this,(function(c){return t=Aue.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],a=this.eventFactory.track(n,r,i,this.integrations),[2,this._dispatch(a,o).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 _le(this,void 0,void 0,(function(){var t,n,r,i,o,a,s,c=this;return Cle(this,(function(l){return t=_ue.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=this.eventFactory.page(n,r,i,o,this.integrations),[2,this._dispatch(s,a).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 _le(this,void 0,void 0,(function(){var t,n,r,i,o,a,s=this;return Cle(this,(function(c){return t=Cue(this._user).apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],this._user.identify(n,r),a=this.eventFactory.identify(this._user.id(),this._user.traits(),i,this.integrations),[2,this._dispatch(a,o).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=Cue(this._group).apply(void 0,t),i=r[0],o=r[1],a=r[2],s=r[3];this._group.identify(i,o);var c=this._group.id(),l=this._group.traits(),u=this.eventFactory.group(c,l,a,this.integrations);return this._dispatch(u,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 _le(this,void 0,void 0,(function(){var t,n,r,i,o,a,s=this;return Cle(this,(function(c){return t=Iue.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],a=this.eventFactory.alias(n,r,i,this.integrations),[2,this._dispatch(a,o).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 _le(this,void 0,void 0,(function(){var t,n,r,i,o,a,s,c=this;return Cle(this,(function(l){return t=_ue.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=this.eventFactory.screen(n,r,i,o,this.integrations),[2,this._dispatch(s,a).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 _le(this,void 0,void 0,(function(){var t,n;return Cle(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return LNe}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,Nle([this],e,!1))]}}))}))},t.prototype.trackLink=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _le(this,void 0,void 0,(function(){var t,n;return Cle(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return LNe}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,Nle([this],e,!1))]}}))}))},t.prototype.trackSubmit=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _le(this,void 0,void 0,(function(){var t,n;return Cle(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return LNe}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,Nle([this],e,!1))]}}))}))},t.prototype.trackForm=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _le(this,void 0,void 0,(function(){var t,n;return Cle(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return LNe}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,Nle([this],e,!1))]}}))}))},t.prototype.register=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _le(this,void 0,void 0,(function(){var t,n,r=this;return Cle(this,(function(i){switch(i.label){case 0:return t=ode.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 _le(this,void 0,void 0,(function(){var t,n,r=this;return Cle(this,(function(i){switch(i.label){case 0:return t=ode.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 _le(this,void 0,void 0,(function(){var n;return Cle(this,(function(r){return n=new ode(e),Pue()&&!this.options.retryQueue?[2,n]:[2,Tue(n,this.queue,this,{callback:t,debug:this._debug,timeout:this.settings.timeout})]}))}))},t.prototype.addSourceMiddleware=function(e){return _le(this,void 0,void 0,(function(){var t=this;return Cle(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return _le(t,void 0,void 0,(function(){var t,n,r;return Cle(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve().then((function(){return xhe}))];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 _le(this,void 0,void 0,(function(){return Cle(this,(function(t){switch(t.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,Promise.resolve().then((function(){return BNe}))];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}),_le(this,void 0,void 0,(function(){return Cle(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(Ede),window.analytics=null!=Tde?Tde:this,this},t.prototype.normalize=function(e){return console.warn(Ede),this.eventFactory.normalize(e)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(Ede),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return Lue},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e,t){return _le(this,void 0,void 0,(function(){return Cle(this,(function(e){return console.warn(Ede),[2,Promise.resolve(this)]}))}))},t.prototype.pageview=function(e){return _le(this,void 0,void 0,(function(){return Cle(this,(function(t){switch(t.label){case 0:return console.warn(Ede),[4,this.page({path:e})];case 1:return t.sent(),[2,this]}}))}))},Object.defineProperty(t.prototype,"plugins",{get:function(){var e;return console.warn(Ede),null!==(e=this._plugins)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(Ede);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}(Zle);function Cde(){return"undefined"!=typeof process&&process.env?process.env:{}}var Ide,Sde=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,kde=function(){var e=function(){var e;return null!=Ide?Ide: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=Sde.exec(r);i&&i[1]&&(t=i[1])})),t);return n||"https://cdn.segment.com"},Ode=function(){var e=kde();return"".concat(e,"/next-integrations")};function Pde(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],o=t[1];return wle(wle({},e),"object"==typeof o?((n={})[i]=o,n):((r={})[i]={},r))}),{});return Object.entries(e.integrations).reduce((function(e,t){var n,i=t[0],o=t[1];return wle(wle({},e),((n={})[i]=wle(wle({},o),r[i]),n))}),{})}function Rde(){var e=document.querySelector("link[rel='canonical']");if(e)return e.getAttribute("href")||void 0}function Nde(){var e=Rde();if(!e)return window.location.pathname;var t=document.createElement("a");return t.href=e,t.pathname.startsWith("/")?t.pathname:"/"+t.pathname}function Mde(e){void 0===e&&(e="");var t=Rde();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 Dde(e){var t=e.event;t.context=t.context||{};var n={path:Nde(),referrer:document.referrer,search:location.search,title:document.title,url:Mde(location.search)},r=void 0;return"page"===t.type&&(r=t.properties&&function(e,t){return Object.assign.apply(Object,Nle([{}],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=wle(wle(wle({},n),t.properties),t.name?{name:t.name}:{})),t.context.page=wle(wle(wle({},n),r),t.context.page),e}var Lde={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:Dde,alias:Dde,track:Dde,identify:Dde,group:Dde};function Fde(e){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(t){return t.src===e}))}function Bde(e,t){var n=Fde(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,o=window.document.createElement("script");o.type="text/javascript",o.src=e,o.async=!0,o.setAttribute("status","loading");for(var a=0,s=Object.entries(null!=t?t:{});a<s.length;a++){var c=s[a],l=c[0],u=c[1];o.setAttribute(l,u)}o.onload=function(){o.onerror=o.onload=null,o.setAttribute("status","loaded"),n(o)},o.onerror=function(){o.onerror=o.onload=null,o.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(o,d)}))}function Ude(e){var t=Fde(e);return void 0!==t&&t.remove(),Promise.resolve()}var zde={},jde={},Hde={},Wde={exports:{}};!function(e){function t(e){return function(t,n,r,o){var a,s=o&&function(e){return"function"==typeof e}(o.normalizer)?o.normalizer:i;n=s(n);for(var c=!1;!c;)l();function l(){for(a in t){var e=s(a);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[a];return null==i?void(c=!0):n.length?void(t=i):void(c=!0)}}}a=void 0,c=!0}if(a)return null==t?t:e(t,a,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,o){return t(r).call(this,e,n,i,o),e},e.exports.del=function(e,r,i){return t(n).call(this,e,r,null,i),e}}(Wde);var Vde=Wde.exports,Gde=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hde,"__esModule",{value:!0});var qde=Gde(Vde);function Kde(e,t){return function(){var n=this.traits(),r=this.properties?this.properties():{};return qde.default(n,"address."+e)||qde.default(n,e)||(t?qde.default(n,"address."+t):null)||(t?qde.default(n,t):null)||qde.default(r,"address."+e)||qde.default(r,e)||(t?qde.default(r,"address."+t):null)||(t?qde.default(r,t):null)}}Hde.default=function(e){e.zip=Kde("postalCode","zip"),e.country=Kde("country"),e.street=Kde("street"),e.state=Kde("state"),e.city=Kde("city"),e.region=Kde("region")};var Xde={};Object.defineProperty(Xde,"__esModule",{value:!0}),Xde.clone=void 0,Xde.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 Yde={};Object.defineProperty(Yde,"__esModule",{value:!0});var Zde={Salesforce:!0};Yde.default=function(e){return!Zde[e]};var Jde={},Qde=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;Jde.parse=function(e){var t=[1,5,6,7,11,12],n=Qde.exec(e),r=0;if(!n)return new Date(e);for(var i,o=0;i=t[o];o++)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 a=Date.UTC(n[1],n[2],n[3],n[5],n[6]+r,n[7],n[8]);return new Date(a)},Jde.is=function(e,t){return"string"==typeof e&&((!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&Qde.test(e))};var $de={},efe=/\d{13}/;$de.is=function(e){return efe.test(e)},$de.parse=function(e){return e=parseInt(e,10),new Date(e)};var tfe={},nfe=/\d{10}/;tfe.is=function(e){return nfe.test(e)},tfe.parse=function(e){var t=1e3*parseInt(e,10);return new Date(t)};var rfe=Jde,ife=$de,ofe=tfe,afe=Object.prototype.toString;var sfe=function(e){return t=e,"[object Date]"===afe.call(t)?e:function(e){return"[object Number]"===afe.call(e)}(e)?new Date((n=e)<315576e5?1e3*n:n):rfe.is(e)?rfe.parse(e):ife.is(e)?ife.parse(e):ofe.is(e)?ofe.parse(e):new Date(e);var t,n};var cfe=Jde,lfe=ufe;function ufe(e,t){return void 0===t&&(t=!0),e&&"object"==typeof e?function(e,t){return Object.keys(e).forEach((function(n){e[n]=ufe(e[n],t)})),e}(e,t):Array.isArray(e)?function(e,t){return e.forEach((function(n,r){e[r]=ufe(n,t)})),e}(e,t):cfe.is(e,t)?cfe.parse(e):e}var dfe=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jde,"__esModule",{value:!0}),jde.Facade=void 0;var ffe=dfe(Hde),hfe=Xde,pfe=dfe(Yde),mfe=dfe(sfe),yfe=dfe(Vde),gfe=dfe(lfe);function vfe(e,t){t=t||{},this.raw=hfe.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=hfe.clone(e)),"traverse"in t||(t.traverse=!0),e.timestamp="timestamp"in e?mfe.default(e.timestamp):new Date,t.traverse&&gfe.default(e),this.opts=t,this.obj=e}jde.Facade=vfe;var bfe=vfe.prototype;function wfe(e){return hfe.clone(e)}bfe.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=yfe.default(n,t.join("."))),this.opts.clone?wfe(n):n):n},bfe.field=function(e){var t=this.obj[e];return this.opts.clone?wfe(t):t},vfe.proxy=function(e){return function(){return this.proxy(e)}},vfe.field=function(e){return function(){return this.field(e)}},vfe.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?hfe.clone(n):n]),n||[]}},vfe.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}},bfe.json=function(){var e=this.opts.clone?hfe.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},bfe.rawEvent=function(){return this.raw},bfe.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?hfe.clone(t):t;if(!e)return n;if(this.enabled(e)){var r=this.integrations(),i=r[e]||yfe.default(r,e);return"object"!=typeof i&&(i=yfe.default(this.options(),e)),"object"==typeof i?i:{}}},bfe.context=bfe.options,bfe.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&&pfe.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},bfe.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},bfe.active=function(){var e=this.proxy("options.active");return null==e&&(e=!0),e},bfe.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},bfe.sessionId=bfe.anonymousId,bfe.groupId=vfe.proxy("options.groupId"),bfe.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},bfe.library=function(){var e=this.proxy("options.library");return e?"string"==typeof e?{name:e,version:null}:e:{name:"unknown",version:null}},bfe.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},bfe.userAgent=vfe.proxy("context.userAgent"),bfe.timezone=vfe.proxy("context.timezone"),bfe.timestamp=vfe.field("timestamp"),bfe.channel=vfe.field("channel"),bfe.ip=vfe.proxy("context.ip"),bfe.userId=vfe.field("userId"),ffe.default(bfe);var Efe={},xfe=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Efe,"__esModule",{value:!0}),Efe.Alias=void 0;var Tfe=xfe(zs),Afe=jde;function _fe(e,t){Afe.Facade.call(this,e,t)}Efe.Alias=_fe,Tfe.default(_fe,Afe.Facade),_fe.prototype.action=function(){return"alias"},_fe.prototype.type=_fe.prototype.action,_fe.prototype.previousId=function(){return this.field("previousId")||this.field("from")},_fe.prototype.from=_fe.prototype.previousId,_fe.prototype.userId=function(){return this.field("userId")||this.field("to")},_fe.prototype.to=_fe.prototype.userId;var Cfe={},Ife={};Object.defineProperty(Ife,"__esModule",{value:!0});var Sfe=/.+\@.+\..+/;Ife.default=function(e){return Sfe.test(e)};var kfe=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cfe,"__esModule",{value:!0}),Cfe.Group=void 0;var Ofe=kfe(zs),Pfe=kfe(Ife),Rfe=kfe(sfe),Nfe=jde;function Mfe(e,t){Nfe.Facade.call(this,e,t)}Cfe.Group=Mfe,Ofe.default(Mfe,Nfe.Facade);var Dfe=Mfe.prototype;Dfe.action=function(){return"group"},Dfe.type=Dfe.action,Dfe.groupId=Nfe.Facade.field("groupId"),Dfe.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return Rfe.default(e)},Dfe.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();return Pfe.default(t)?t:void 0},Dfe.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},Dfe.name=Nfe.Facade.proxy("traits.name"),Dfe.industry=Nfe.Facade.proxy("traits.industry"),Dfe.employees=Nfe.Facade.proxy("traits.employees"),Dfe.properties=function(){return this.field("traits")||this.field("properties")||{}};var Lfe={},Ffe=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lfe,"__esModule",{value:!0}),Lfe.Identify=void 0;var Bfe=jde,Ufe=Ffe(Vde),zfe=Ffe(zs),jfe=Ffe(Ife),Hfe=Ffe(sfe),Wfe=function(e){return e.trim()};function Vfe(e,t){Bfe.Facade.call(this,e,t)}Lfe.Identify=Vfe,zfe.default(Vfe,Bfe.Facade);var Gfe=Vfe.prototype;Gfe.action=function(){return"identify"},Gfe.type=Gfe.action,Gfe.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},Gfe.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();return jfe.default(t)?t:void 0},Gfe.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return Hfe.default(e)},Gfe.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return Hfe.default(e)},Gfe.companyName=function(){return this.proxy("traits.company.name")},Gfe.name=function(){var e=this.proxy("traits.name");if("string"==typeof e)return Wfe(e);var t=this.firstName(),n=this.lastName();return t&&n?Wfe(t+" "+n):void 0},Gfe.firstName=function(){var e=this.proxy("traits.firstName");if("string"==typeof e)return Wfe(e);var t=this.proxy("traits.name");return"string"==typeof t?Wfe(t).split(" ")[0]:void 0},Gfe.lastName=function(){var e=this.proxy("traits.lastName");if("string"==typeof e)return Wfe(e);var t=this.proxy("traits.name");if("string"==typeof t){var n=Wfe(t).indexOf(" ");if(-1!==n)return Wfe(t.substr(n+1))}},Gfe.uid=function(){return this.userId()||this.username()||this.email()},Gfe.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},Gfe.age=function(){var e=this.birthday(),t=Ufe.default(this.traits(),"age");return null!=t?t:e instanceof Date?(new Date).getFullYear()-e.getFullYear():void 0},Gfe.avatar=function(){var e=this.traits();return Ufe.default(e,"avatar")||Ufe.default(e,"photoUrl")||Ufe.default(e,"avatarUrl")},Gfe.position=function(){var e=this.traits();return Ufe.default(e,"position")||Ufe.default(e,"jobTitle")},Gfe.username=Bfe.Facade.proxy("traits.username"),Gfe.website=Bfe.Facade.one("traits.website"),Gfe.websites=Bfe.Facade.multi("traits.website"),Gfe.phone=Bfe.Facade.one("traits.phone"),Gfe.phones=Bfe.Facade.multi("traits.phone"),Gfe.address=Bfe.Facade.proxy("traits.address"),Gfe.gender=Bfe.Facade.proxy("traits.gender"),Gfe.birthday=Bfe.Facade.proxy("traits.birthday");var qfe={},Kfe=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qfe,"__esModule",{value:!0}),qfe.Track=void 0;var Xfe=Kfe(zs),Yfe=jde,Zfe=Lfe,Jfe=Kfe(Ife),Qfe=Kfe(Vde);function $fe(e,t){Yfe.Facade.call(this,e,t)}qfe.Track=$fe,Xfe.default($fe,Yfe.Facade);var ehe=$fe.prototype;ehe.action=function(){return"track"},ehe.type=ehe.action,ehe.event=Yfe.Facade.field("event"),ehe.value=Yfe.Facade.proxy("properties.value"),ehe.category=Yfe.Facade.proxy("properties.category"),ehe.id=Yfe.Facade.proxy("properties.id"),ehe.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},ehe.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},ehe.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},ehe.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},ehe.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},ehe.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},ehe.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},ehe.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},ehe.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},ehe.sku=Yfe.Facade.proxy("properties.sku"),ehe.tax=Yfe.Facade.proxy("properties.tax"),ehe.name=Yfe.Facade.proxy("properties.name"),ehe.price=Yfe.Facade.proxy("properties.price"),ehe.total=Yfe.Facade.proxy("properties.total"),ehe.repeat=Yfe.Facade.proxy("properties.repeat"),ehe.coupon=Yfe.Facade.proxy("properties.coupon"),ehe.shipping=Yfe.Facade.proxy("properties.shipping"),ehe.discount=Yfe.Facade.proxy("properties.discount"),ehe.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},ehe.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},ehe.description=Yfe.Facade.proxy("properties.description"),ehe.plan=Yfe.Facade.proxy("properties.plan"),ehe.subtotal=function(){var e=Qfe.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},ehe.products=function(){var e=this.properties(),t=Qfe.default(e,"products");return Array.isArray(t)?t.filter((function(e){return null!==e})):[]},ehe.quantity=function(){return(this.obj.properties||{}).quantity||1},ehe.currency=function(){return(this.obj.properties||{}).currency||"USD"},ehe.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},ehe.query=Yfe.Facade.proxy("options.query"),ehe.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},ehe.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},ehe.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 Jfe.default(t)?t:void 0},ehe.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)},ehe.cents=function(){var e=this.revenue();return"number"!=typeof e?this.value()||0:100*e},ehe.identify=function(){var e=this.json();return e.traits=this.traits(),new Zfe.Identify(e,this.opts)};var the={},nhe=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(the,"__esModule",{value:!0}),the.Page=void 0;var rhe=nhe(zs),ihe=jde,ohe=qfe,ahe=nhe(Ife);function she(e,t){ihe.Facade.call(this,e,t)}the.Page=she,rhe.default(she,ihe.Facade);var che=she.prototype;che.action=function(){return"page"},che.type=che.action,che.category=ihe.Facade.field("category"),che.name=ihe.Facade.field("name"),che.title=ihe.Facade.proxy("properties.title"),che.path=ihe.Facade.proxy("properties.path"),che.url=ihe.Facade.proxy("properties.url"),che.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},che.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 o=null==this[i]?this.proxy("properties."+i):this[i]();if(null==o)continue;t[e[i]]=o,i!==e[i]&&delete t[i]}return t},che.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();return ahe.default(t)?t:void 0},che.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t},che.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"},che.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new ohe.Track(t,this.opts)};var lhe={},uhe=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lhe,"__esModule",{value:!0}),lhe.Screen=void 0;var dhe=uhe(zs),fhe=the,hhe=qfe;function phe(e,t){fhe.Page.call(this,e,t)}lhe.Screen=phe,dhe.default(phe,fhe.Page),phe.prototype.action=function(){return"screen"},phe.prototype.type=phe.prototype.action,phe.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"},phe.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new hhe.Track(t,this.opts)};var mhe={},yhe=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mhe,"__esModule",{value:!0}),mhe.Delete=void 0;var ghe=yhe(zs),vhe=jde;function bhe(e,t){vhe.Facade.call(this,e,t)}function whe(e,t){var n=new zde.Facade(e,t);return"track"===e.type&&(n=new zde.Track(e,t)),"identify"===e.type&&(n=new zde.Identify(e,t)),"page"===e.type&&(n=new zde.Page(e,t)),"alias"===e.type&&(n=new zde.Alias(e,t)),"group"===e.type&&(n=new zde.Group(e,t)),"screen"===e.type&&(n=new zde.Screen(e,t)),Object.defineProperty(n,"obj",{value:e,writable:!0}),n}function Ehe(e,t,n){return _le(this,void 0,void 0,(function(){function r(t,n){return _le(this,void 0,void 0,(function(){var r,i,o;return Cle(this,(function(a){switch(a.label){case 0:return r=!1,i=null,[4,n({payload:whe(t,{clone:!0,traverse:!1}),integration:e,next:function(e){r=!0,null===e&&(i=null),e&&(i=e.obj)}})];case 1:return a.sent(),r||null===i||(i.integrations=wle(wle({},t.integrations),((o={})[e]=!1,o))),[2,i]}}))}))}var i,o,a,s,c;return Cle(this,(function(e){switch(e.label){case 0:i=whe(t,{clone:!0,traverse:!1}).rawEvent(),o=0,a=n,e.label=1;case 1:return o<a.length?(s=a[o],[4,r(i,s)]):[3,4];case 2:if(null===(c=e.sent()))return[2,null];i=c,e.label=3;case 3:return o++,[3,1];case 4:return[2,i]}}))}))}mhe.Delete=bhe,ghe.default(bhe,vhe.Facade),bhe.prototype.type=function(){return"delete"},function(e){var t=lt&<.__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=jde;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=Efe;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=Cfe;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var o=Lfe;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}});var a=qfe;Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return a.Track}});var s=the;Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return s.Page}});var c=lhe;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return c.Screen}});var l=mhe;Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return l.Delete}}),e.default=t(t({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:o.Identify,Track:a.Track,Page:s.Page,Screen:c.Screen,Delete:l.Delete})}(zde);var xhe=Object.freeze({__proto__:null,applyDestinationMiddleware:Ehe,sourceMiddlewarePlugin:function(e,t){function n(n){return _le(this,void 0,void 0,(function(){var r;return Cle(this,(function(i){switch(i.label){case 0:return r=!1,[4,e({payload:whe(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 vue({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}}}),The=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 _le(this,void 0,void 0,(function(){var t;return Cle(this,(function(n){switch(n.label){case 0:return[4,Ehe(this.name,e.event,this.middleware)];case 1:return null===(t=n.sent())&&e.cancel(new vue({retry:!1,reason:"dropped by destination middleware"})),[2,new ode(t)]}}))}))},e.prototype._createMethod=function(e){var t=this;return function(n){return _le(t,void 0,void 0,(function(){var t;return Cle(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 Ahe(e,t,n,r,i){var o,a,s;return _le(this,void 0,void 0,(function(){var c,l,u,d,f=this;return Cle(this,(function(h){switch(h.label){case 0:return c=[],l=kde(),u=null!==(a=null===(o=e.middlewareSettings)||void 0===o?void 0:o.routingRules)&&void 0!==a?a:[],d=(null!==(s=e.remotePlugins)&&void 0!==s?s:[]).map((function(e){return _le(f,void 0,void 0,(function(){var o,a,s,d,f,h,p,m,y;return Cle(this,(function(g){switch(g.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];g.label=1;case 1:if(g.trys.push([1,12,,13]),o=new RegExp("https://cdn.segment.(com|build)"),!r)return[3,7];a=e.url.split("/"),s=a[a.length-2],d=e.url.replace(s,btoa(s).replace(/=/g,"")),g.label=2;case 2:return g.trys.push([2,4,,6]),[4,Bde(d.replace(o,l))];case 3:return g.sent(),[3,6];case 4:return g.sent(),[4,Bde(e.url.replace(o,l))];case 5:return g.sent(),[3,6];case 6:return[3,9];case 7:return[4,Bde(e.url.replace(o,l))];case 8:g.sent(),g.label=9;case 9:return f=e.libraryName,"function"!=typeof window[f]?[3,11]:[4,(0,window[f])(wle(wle({},e.settings),n[e.name]))];case 10:h=g.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))}))}))}(p=Array.isArray(h)?h:[h]),m=u.filter((function(t){return t.destinationName===e.creationName})),p.forEach((function(t){var n=new The(e.creationName,t);m.length&&i&&"destination"===t.type&&n.addMiddleware(i),c.push(n)})),g.label=11;case 11:return[3,13];case 12:return y=g.sent(),console.warn("Failed to load Remote Plugin",y),[3,13];case 13:return[2]}}))}))})),[4,Promise.all(d)];case 1:return h.sent(),[2,c.filter(Boolean)]}}))}))}var _he=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)}))},Che=500;function Ihe(e){return(encodeURI(JSON.stringify(e)).split(/%..|./).length-1)/1024}function She(e,t){var n,r,i,o=[],a=!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 l(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,Ele(t,["sentAt"])}));return Due("https://".concat(e,"/b"),{keepalive:a,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({writeKey:r,batch:i,sentAt:(new Date).toISOString()})})}}function u(){return _le(this,void 0,void 0,(function(){var e;return Cle(this,(function(t){return o.length?(e=o,o=[],[2,l(e)]):[2]}))}))}return _he((function(e){if((a=e)&&o.length){var t=function(e){var t=[],n=0;return e.forEach((function(e){Ihe(t[n])>=64&&n++,t[n]?t[n].push(e):t[n]=[e]})),t}(o).map(l);Promise.all(t).catch(console.error)}})),{dispatch:function(e,t){return _le(this,void 0,void 0,(function(){var e;return Cle(this,(function(n){return o.push(t),e=o.length>=s||function(e){return Ihe(e)>=Che-50}(o),[2,e||a?u():void(i||(i=setTimeout((function(){i=void 0,u().catch(console.error)}),c)))]}))}))}}}var khe=function(e,t){return _le(void 0,void 0,void 0,(function(){var n;return Cle(this,(function(r){return n=function(r){return _le(void 0,void 0,void 0,(function(){var i;return Cle(this,(function(o){switch(o.label){case 0:return e(r)?(i=n,[4,t()]):[3,2];case 1:return[2,i.apply(void 0,[o.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))};function Ohe(e,t){return _le(this,void 0,void 0,(function(){var n,r=this;return Cle(this,(function(i){switch(i.label){case 0:return n=[],Pue()?[2,t]:[4,khe((function(){return t.length>0&&!Pue()}),(function(){return _le(r,void 0,void 0,(function(){var r,i;return Cle(this,(function(o){switch(o.label){case 0:return(r=t.pop())?[4,wue(r,e)]:[2];case 1:return i=o.sent(),i instanceof ode||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}function Phe(e,t,n,r){var i=this;e||setTimeout((function(){return _le(i,void 0,void 0,(function(){var e,i;return Cle(this,(function(o){switch(o.label){case 0:return e=!0,[4,Ohe(n,t)];case 1:return i=o.sent(),e=!1,t.todo>0&&r(e,i,n,r),[2]}}))}))}),5e3*Math.random())}function Rhe(e){return _le(this,void 0,void 0,(function(){var t;return Cle(this,(function(n){return(t=navigator.userAgentData)?e?[2,t.getHighEntropyValues(e).catch((function(){return t.toJSON()}))]:[2,t.toJSON()]:[2,void 0]}))}))}function Nhe(e,t,n){var r,i,o;return _le(this,void 0,void 0,(function(){function a(r){return _le(this,void 0,void 0,(function(){var i,o;return Cle(this,(function(a){return Pue()?(c.push(r),Phe(u,c,g,Phe),[2,r]):(l.add(r),i=r.event.type.charAt(0),y&&r.event.context&&(r.event.context.userAgentData=y),o=whe(r.event).json(),"track"===r.event.type&&delete o.traits,"alias"===r.event.type&&(o=function(e,t){var n,r,i,o,a=e.user();return t.previousId=null!==(i=null!==(r=null!==(n=t.previousId)&&void 0!==n?n:t.from)&&void 0!==r?r:a.id())&&void 0!==i?i:a.anonymousId(),t.userId=null!==(o=t.userId)&&void 0!==o?o:t.to,delete t.from,delete t.to,t}(e,o)),[2,m.dispatch("".concat(h,"/").concat(i),$ue(e,o,t,n)).then((function(){return r})).catch((function(){return c.pushWithBackoff(r),Phe(u,c,g,Phe),r})).finally((function(){l.delete(r)}))])}))}))}var s,c,l,u,d,f,h,p,m,y,g;return Cle(this,(function(n){switch(n.label){case 0:window.addEventListener("pagehide",(function(){c.push.apply(c,Array.from(l)),l.clear()})),s=null!==(r=null==t?void 0:t.apiKey)&&void 0!==r?r:"",c=e.options.disableClientPersistence?new due(e.queue.queue.maxAttempts,[]):new pde(e.queue.queue.maxAttempts,"".concat(s,":dest-Segment.io")),l=new Set,u=!1,d=null!==(i=null==t?void 0:t.apiHost)&&void 0!==i?i:ede,f=null!==(o=null==t?void 0:t.protocol)&&void 0!==o?o:"https",h="".concat(f,"://").concat(d),p=null==t?void 0:t.deliveryStrategy,m="batching"===(null==p?void 0:p.strategy)?She(d,p.config):(v=null==p?void 0:p.config,{dispatch:function(e,t){return Due(e,{keepalive:null==v?void 0:v.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,Rhe(e.options.highEntropyValuesClientHints)];case 2:return y=n.sent(),[3,4];case 3:return n.sent(),y=void 0,[3,4];case 4:return g={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:a,identify:a,page:a,alias:a,group:a,screen:a},c.todo&&Phe(u,c,g,Phe),[2,g]}var v}))}))}function Mhe(e){var t,n=e.event;!function(e){if(!nue(e))throw new Qle("Event",aue);if("object"!=typeof e)throw new Qle("Event",oue)}(n),function(e){if(!$le(e.type))throw new Qle(".type",iue)}(n),"track"===n.type&&function(e){if(!$le(e.event))throw new Qle(".event",iue)}(n);var r=null!==(t=n.properties)&&void 0!==t?t:n.traits;if("alias"!==n.type&&!rue(r))throw new Qle(".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(!nue(n))throw new Qle(t,aue);if(!$le(n))throw new Qle(t,iue)}(n),e}var Dhe={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:Mhe,identify:Mhe,page:Mhe,alias:Mhe,group:Mhe,screen:Mhe},Lhe=function(e,t,n){n.getCalls(e).forEach((function(e){Hhe(t,e).catch(console.error)}))},Fhe=function(e,t){return _le(void 0,void 0,void 0,(function(){var n,r,i;return Cle(this,(function(o){switch(o.label){case 0:n=0,r=t.getCalls("addSourceMiddleware"),o.label=1;case 1:return n<r.length?(i=r[n],[4,Hhe(e,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},Bhe=Lhe.bind(window,"on"),Uhe=Lhe.bind(window,"setAnonymousId"),zhe=function(e,t){t.toArray().forEach((function(t){setTimeout((function(){Hhe(e,t).catch(console.error)}),0)}))},jhe=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 Hhe(e,t){return _le(this,void 0,void 0,(function(){var n,r;return Cle(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(o=n)&&null!==o&&"then"in o&&"function"==typeof o.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 o}))}))}var Whe=function(){function e(e){var t=this;this._preInitBuffer=new jhe,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=Lue,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 o=(n=t.instance)[e].apply(n,r);return Promise.resolve(o)}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 Vhe(e){var t=e[0],n=e.slice(1);return{method:t,resolve:function(){},reject:console.error,args:n,called:!1}}var Ghe,qhe,Khe=function(){var e=window.analytics;if(!Array.isArray(e))return[];var t=e.splice(0,e.length);return t.map(Vhe)},Xhe=null!==(Ghe=(qhe=Mue()).__SEGMENT_INSPECTOR__)&&void 0!==Ghe?Ghe:qhe.__SEGMENT_INSPECTOR__={};function Yhe(e,t){return _le(this,void 0,void 0,(function(){return Cle(this,(function(n){switch(n.label){case 0:return t.push.apply(t,Khe()),[4,Fhe(e,t)];case 1:return n.sent(),t.push.apply(t,Khe()),zhe(e,t),t.clear(),[2]}}))}))}function Zhe(e,t,n,r,i,o,a){var s,c,l;return _le(this,void 0,void 0,(function(){var u,d,f,h,p,m,y,g,v,b,w,E,x=this;return Cle(this,(function(T){switch(T.label){case 0:return function(e){var t,n,r;return"test"!==Cde().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 GLe})).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return d=T.sent(),[3,3];case 2:d=void 0,T.label=3;case 3:return u=d,A=t,"test"!==Cde().NODE_ENV&&Object.keys(A.integrations).length>1||a.length>0?[4,Promise.resolve().then((function(){return QLe})).then((function(i){return i.ajsDestinations(e,t,n.integrations,r,u,a)}))]:[3,5];case 4:return h=T.sent(),[3,6];case 5:h=[],T.label=6;case 6:return f=h,t.legacyVideoPluginsEnabled?[4,Promise.resolve().then((function(){return $Le})).then((function(e){return e.loadLegacyVideoPlugins(n)}))]:[3,8];case 7:T.sent(),T.label=8;case 8:return(null===(s=r.plan)||void 0===s?void 0:s.track)?[4,Promise.resolve().then((function(){return eFe})).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=T.sent(),[3,11];case 10:m=void 0,T.label=11;case 11:return p=m,y=Pde(t,i),[4,Ahe(t,n.integrations,y,i.obfuscate,u).catch((function(){return[]}))];case 12:return g=T.sent(),v=Nle(Nle(Nle([Dhe,Lde],o,!0),f,!0),g,!0),p&&v.push(p),!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=(b=v).push,[4,Nhe(n,y["Segment.io"],t.integrations)]);case 13:w.apply(b,[T.sent()]),T.label=14;case 14:return[4,n.register.apply(n,v)];case 15:return E=T.sent(),Object.entries(null!==(l=t.enabledMiddleware)&&void 0!==l?l:{}).some((function(e){return e[1]}))?[4,Promise.resolve().then((function(){return tFe})).then((function(e){var r=e.remoteMiddlewares;return _le(x,void 0,void 0,(function(){var e,o;return Cle(this,(function(a){switch(a.label){case 0:return[4,r(E,t,i.obfuscate)];case 1:return e=a.sent(),o=e.map((function(e){return n.addSourceMiddleware(e)})),[2,Promise.all(o)]}}))}))}))]:[3,17];case 16:T.sent(),T.label=17;case 17:return[2,E]}var A}))}))}function Jhe(e,t,n){var r,i,o,a,s,c,l;return void 0===t&&(t={}),_le(this,void 0,void 0,(function(){var u,d,f,h,p,m,y,g,v,b,w;return Cle(this,(function(E){switch(E.label){case 0:return e.cdnURL&&(_=e.cdnURL,window.analytics&&(window.analytics._cdn=_),Ide=_),null===(r=e.cdnSettings)||void 0===r?[3,1]:(d=r,[3,3]);case 1:return[4,(x=e.writeKey,T=e.cdnURL,A=null!=T?T:kde(),Due("".concat(A,"/v1/projects/").concat(x,"/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=E.sent(),E.label=3;case 3:return u=d,t.updateCDNSettings&&(u=t.updateCDNSettings(u)),f=null===(o=null===(i=u.integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===o||o,h=wle({retryQueue:f},t),function(e){var t;null===(t=Xhe.attach)||void 0===t||t.call(Xhe,e)}(p=new _de(e,h)),m=null!==(a=e.plugins)&&void 0!==a?a:[],y=null!==(s=e.classicIntegrations)&&void 0!==s?s:[],ide.initRemoteMetrics(u.metrics),function(e,t){t.push.apply(t,Khe()),Uhe(e,t),Bhe(e,t)}(p,n),[4,Zhe(e.writeKey,u,p,h,t,m,y)];case 4:return g=E.sent(),v=null!==(c=window.location.search)&&void 0!==c?c:"",b=null!==(l=window.location.hash)&&void 0!==l?l:"",(w=v.length?v:b.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,p.queryString(w).catch(console.error)]:[3,6];case 5:E.sent(),E.label=6;case 6:return p.initialized=!0,p.emit("initialize",e,t),t.initialPageview&&p.page().catch(console.error),[4,Yhe(p,n)];case 7:return E.sent(),[2,[p,g]]}var x,T,A,_}))}))}var Qhe=function(e){function t(){var t,n,r,i=this,o=(r=new Promise((function(e,r){t=e,n=r})),{resolve:t,reject:n,promise:r}),a=o.promise,s=o.resolve;return i=e.call(this,(function(e){return a.then((function(t){return Jhe(t[0],t[1],e)}))}))||this,i._resolveLoadStart=function(e,t){return s([e,t])},i}return ble(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}(Whe),$he=Object.create,epe=Object.defineProperty,tpe=Object.getOwnPropertyDescriptor,npe=Object.getOwnPropertyNames,rpe=Object.getOwnPropertySymbols,ipe=Object.getPrototypeOf,ope=Object.prototype.hasOwnProperty,ape=Object.prototype.propertyIsEnumerable,spe=(e,t,n)=>t in e?epe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cpe=(e,t)=>{for(var n in t||(t={}))ope.call(t,n)&&spe(e,n,t[n]);if(rpe)for(var n of rpe(t))ape.call(t,n)&&spe(e,n,t[n]);return e},lpe=(e,t)=>function(){return t||(0,e[npe(e)[0]])((t={exports:{}}).exports,t),t.exports},upe=(e,t,n)=>(n=null!=e?$he(ipe(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of npe(t))ope.call(e,n)||undefined===n||epe(e,n,{get:()=>t[n],enumerable:!(r=tpe(t,n))||r.enumerable});return e})(!t&&e&&e.__esModule?n:epe(n,"default",{value:e,enumerable:!0}),e)),dpe=lpe({"../../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,o=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,c=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,p=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,b=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 l:case u:case i:case a:case o:case f:return e;default:switch(e=e&&e.$$typeof){case c:case d:case m:case p:case s:return e;default:return t}}case r:return t}}}function E(e){return w(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=m,e.Memo=p,e.Portal=r,e.Profiler=a,e.StrictMode=o,e.Suspense=f,e.isAsyncMode=function(e){return E(e)||w(e)===l},e.isConcurrentMode=E,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)===p},e.isPortal=function(e){return w(e)===r},e.isProfiler=function(e){return w(e)===a},e.isStrictMode=function(e){return w(e)===o},e.isSuspense=function(e){return w(e)===f},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===u||e===a||e===o||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===y)},e.typeOf=w}}),fpe=lpe({"../../node_modules/react-is/index.js"(e,t){t.exports=dpe()}}),hpe=lpe({"../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"(e,t){var n=fpe(),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},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function s(e){return n.isMemo(e)?o:a[e.$$typeof]||r}a[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[n.Memo]=o;var c=Object.defineProperty,l=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;t.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=f(n);o&&o!==h&&e(t,o,r)}var a=l(n);u&&(a=a.concat(u(n)));for(var p=s(t),m=s(n),y=0;y<a.length;++y){var g=a[y];if(!(i[g]||r&&r[g]||m&&m[g]||p&&p[g])){var v=d(n,g);try{c(t,g,v)}catch(e){}}}}return t}}}),ppe=lpe({"../../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 mpe(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}var ype=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}(),gpe="-ms-",vpe="-moz-",bpe="-webkit-",wpe="comm",Epe="rule",xpe="decl",Tpe="@keyframes",Ape=Math.abs,_pe=String.fromCharCode,Cpe=Object.assign;function Ipe(e){return e.trim()}function Spe(e,t,n){return e.replace(t,n)}function kpe(e,t){return e.indexOf(t)}function Ope(e,t){return 0|e.charCodeAt(t)}function Ppe(e,t,n){return e.slice(t,n)}function Rpe(e){return e.length}function Npe(e){return e.length}function Mpe(e,t){return t.push(e),e}var Dpe=1,Lpe=1,Fpe=0,Bpe=0,Upe=0,zpe="";function jpe(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:Dpe,column:Lpe,length:a,return:""}}function Hpe(e,t){return Cpe(jpe("",null,null,"",null,null,0),e,{length:-e.length},t)}function Wpe(){return Upe=Bpe<Fpe?Ope(zpe,Bpe++):0,Lpe++,10===Upe&&(Lpe=1,Dpe++),Upe}function Vpe(){return Ope(zpe,Bpe)}function Gpe(){return Bpe}function qpe(e,t){return Ppe(zpe,e,t)}function Kpe(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 Xpe(e){return Dpe=Lpe=1,Fpe=Rpe(zpe=e),Bpe=0,[]}function Ype(e){return zpe="",e}function Zpe(e){return Ipe(qpe(Bpe-1,$pe(91===e?e+2:40===e?e+1:e)))}function Jpe(e){for(;(Upe=Vpe())&&Upe<33;)Wpe();return Kpe(e)>2||Kpe(Upe)>3?"":" "}function Qpe(e,t){for(;--t&&Wpe()&&!(Upe<48||Upe>102||Upe>57&&Upe<65||Upe>70&&Upe<97););return qpe(e,Gpe()+(t<6&&32==Vpe()&&32==Wpe()))}function $pe(e){for(;Wpe();)switch(Upe){case e:return Bpe;case 34:case 39:34!==e&&39!==e&&$pe(Upe);break;case 40:41===e&&$pe(e);break;case 92:Wpe()}return Bpe}function eme(e,t){for(;Wpe()&&e+Upe!==57&&(e+Upe!==84||47!==Vpe()););return"/*"+qpe(t,Bpe-1)+"*"+_pe(47===e?e:Wpe())}function tme(e){for(;!Kpe(Vpe());)Wpe();return qpe(e,Bpe)}function nme(e){return Ype(rme("",null,null,null,[""],e=Xpe(e),0,[0],e))}function rme(e,t,n,r,i,o,a,s,c){for(var l=0,u=0,d=a,f=0,h=0,p=0,m=1,y=1,g=1,v=0,b="",w=i,E=o,x=r,T=b;y;)switch(p=v,v=Wpe()){case 40:if(108!=p&&58==Ope(T,d-1)){-1!=kpe(T+=Spe(Zpe(v),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:T+=Zpe(v);break;case 9:case 10:case 13:case 32:T+=Jpe(p);break;case 92:T+=Qpe(Gpe()-1,7);continue;case 47:switch(Vpe()){case 42:case 47:Mpe(ome(eme(Wpe(),Gpe()),t,n),c);break;default:T+="/"}break;case 123*m:s[l++]=Rpe(T)*g;case 125*m:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+u:-1==g&&(T=Spe(T,/\f/g,"")),h>0&&Rpe(T)-d&&Mpe(h>32?ame(T+";",r,n,d-1):ame(Spe(T," ","")+";",r,n,d-2),c);break;case 59:T+=";";default:if(Mpe(x=ime(T,t,n,l,u,i,s,b,w=[],E=[],d),o),123===v)if(0===u)rme(T,t,x,x,w,o,d,s,E);else switch(99===f&&110===Ope(T,3)?100:f){case 100:case 108:case 109:case 115:rme(e,x,x,r&&Mpe(ime(e,x,x,0,0,i,s,b,i,w=[],d),E),i,E,d,s,r?w:E);break;default:rme(T,x,x,x,[""],E,0,s,E)}}l=u=h=0,m=g=1,b=T="",d=a;break;case 58:d=1+Rpe(T),h=p;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==(Upe=Bpe>0?Ope(zpe,--Bpe):0,Lpe--,10===Upe&&(Lpe=1,Dpe--),Upe))continue;switch(T+=_pe(v),v*m){case 38:g=u>0?1:(T+="\f",-1);break;case 44:s[l++]=(Rpe(T)-1)*g,g=1;break;case 64:45===Vpe()&&(T+=Zpe(Wpe())),f=Vpe(),u=d=Rpe(b=T+=tme(Gpe())),v++;break;case 45:45===p&&2==Rpe(T)&&(m=0)}}return o}function ime(e,t,n,r,i,o,a,s,c,l,u){for(var d=i-1,f=0===i?o:[""],h=Npe(f),p=0,m=0,y=0;p<r;++p)for(var g=0,v=Ppe(e,d+1,d=Ape(m=a[p])),b=e;g<h;++g)(b=Ipe(m>0?f[g]+" "+v:Spe(v,/&\f/g,f[g])))&&(c[y++]=b);return jpe(e,t,n,0===i?Epe:s,c,l,u)}function ome(e,t,n){return jpe(e,t,n,wpe,_pe(Upe),Ppe(e,2,-2),0)}function ame(e,t,n,r){return jpe(e,t,n,xpe,Ppe(e,0,r),Ppe(e,r+1,-1),r)}function sme(e,t){for(var n="",r=Npe(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function cme(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case xpe:return e.return=e.return||e.value;case wpe:return"";case Tpe:return e.return=e.value+"{"+sme(e.children,r)+"}";case Epe:e.value=e.props.join(",")}return Rpe(n=sme(e.children,r))?e.return=e.value+"{"+n+"}":""}function lme(e){var t=Npe(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function ume(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var dme=function(e,t,n){for(var r=0,i=0;r=i,i=Vpe(),38===r&&12===i&&(t[n]=1),!Kpe(i);)Wpe();return qpe(e,Bpe)},fme=new WeakMap,hme=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)||fme.get(n))&&!r){fme.set(e,!0);for(var i=[],o=function(e,t){return Ype(function(e,t){var n=-1,r=44;do{switch(Kpe(r)){case 0:38===r&&12===Vpe()&&(t[n]=1),e[n]+=dme(Bpe-1,t,n);break;case 2:e[n]+=Zpe(r);break;case 4:if(44===r){e[++n]=58===Vpe()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=_pe(r)}}while(r=Wpe());return e}(Xpe(e),t))}(t,i),a=n.props,s=0,c=0;s<o.length;s++)for(var l=0;l<a.length;l++,c++)e.props[c]=i[s]?o[s].replace(/&\f/g,a[l]):a[l]+" "+o[s]}}},pme=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function mme(e,t){switch(function(e,t){return 45^Ope(e,0)?(((t<<2^Ope(e,0))<<2^Ope(e,1))<<2^Ope(e,2))<<2^Ope(e,3):0}(e,t)){case 5103:return bpe+"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 bpe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return bpe+e+vpe+e+gpe+e+e;case 6828:case 4268:return bpe+e+gpe+e+e;case 6165:return bpe+e+gpe+"flex-"+e+e;case 5187:return bpe+e+Spe(e,/(\w+).+(:[^]+)/,bpe+"box-$1$2"+gpe+"flex-$1$2")+e;case 5443:return bpe+e+gpe+"flex-item-"+Spe(e,/flex-|-self/,"")+e;case 4675:return bpe+e+gpe+"flex-line-pack"+Spe(e,/align-content|flex-|-self/,"")+e;case 5548:return bpe+e+gpe+Spe(e,"shrink","negative")+e;case 5292:return bpe+e+gpe+Spe(e,"basis","preferred-size")+e;case 6060:return bpe+"box-"+Spe(e,"-grow","")+bpe+e+gpe+Spe(e,"grow","positive")+e;case 4554:return bpe+Spe(e,/([^-])(transform)/g,"$1"+bpe+"$2")+e;case 6187:return Spe(Spe(Spe(e,/(zoom-|grab)/,bpe+"$1"),/(image-set)/,bpe+"$1"),e,"")+e;case 5495:case 3959:return Spe(e,/(image-set\([^]*)/,bpe+"$1$`$1");case 4968:return Spe(Spe(e,/(.+:)(flex-)?(.*)/,bpe+"box-pack:$3"+gpe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+bpe+e+e;case 4095:case 3583:case 4068:case 2532:return Spe(e,/(.+)-inline(.+)/,bpe+"$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(Rpe(e)-1-t>6)switch(Ope(e,t+1)){case 109:if(45!==Ope(e,t+4))break;case 102:return Spe(e,/(.+:)(.+)-([^]+)/,"$1"+bpe+"$2-$3$1"+vpe+(108==Ope(e,t+3)?"$3":"$2-$3"))+e;case 115:return~kpe(e,"stretch")?mme(Spe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Ope(e,t+1))break;case 6444:switch(Ope(e,Rpe(e)-3-(~kpe(e,"!important")&&10))){case 107:return Spe(e,":",":"+bpe)+e;case 101:return Spe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+bpe+(45===Ope(e,14)?"inline-":"")+"box$3$1"+bpe+"$2$3$1"+gpe+"$2box$3")+e}break;case 5936:switch(Ope(e,t+11)){case 114:return bpe+e+gpe+Spe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return bpe+e+gpe+Spe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return bpe+e+gpe+Spe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return bpe+e+gpe+e+e}return e}var yme,gme,vme="undefined"!=typeof document,bme=vme?void 0:(yme=function(){return ume((function(){var e={};return function(t){return e[t]}}))},gme=new WeakMap,function(e){if(gme.has(e))return gme.get(e);var t=yme();return gme.set(e,t),t}),wme=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case xpe:e.return=mme(e.value,e.length);break;case Tpe:return sme([Hpe(e,{value:Spe(e.value,"@","@"+bpe)})],r);case Epe: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 sme([Hpe(e,{props:[Spe(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return sme([Hpe(e,{props:[Spe(t,/:(plac\w+)/,":"+bpe+"input-$1")]}),Hpe(e,{props:[Spe(t,/:(plac\w+)/,":-moz-$1")]}),Hpe(e,{props:[Spe(t,/:(plac\w+)/,gpe+"input-$1")]})],r)}return""}))}}],Eme=function(e){var t=e.key;if(vme&&"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,o=e.stylisPlugins||wme,a={},s=[];vme&&(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++)a[t[n]]=!0;s.push(e)})));var c,l=[hme,pme];if(vme){var u,d=[cme,(c=function(e){u.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],f=lme(l.concat(o,d));i=function(e,t,n,r){u=n,sme(nme(e?e+"{"+t.styles+"}":t.styles),f),r&&(y.inserted[t.name]=!0)}}else{var h=[cme],p=lme(l.concat(o,h)),m=bme(o)(t);i=function(e,t,n,r){var i=t.name,o=function(e,t){var n=t.name;return void 0===m[n]&&(m[n]=sme(nme(e?e+"{"+t.styles+"}":t.styles),p)),m[n]}(e,t);return void 0===y.compat?(r&&(y.inserted[i]=!0),o):r?void(y.inserted[i]=o):o}}var y={key:t,sheet:new ype({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return y.sheet.hydrate(s),y},xme="undefined"!=typeof document,Tme=function(e,t,n){var r=e.key+"-"+t.name;(!1===n||!1===xme&&void 0!==e.compat)&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Ame={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},_me=/[A-Z]|^ms/g,Cme=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ime=function(e){return 45===e.charCodeAt(1)},Sme=function(e){return null!=e&&"boolean"!=typeof e},kme=ume((function(e){return Ime(e)?e:e.replace(_me,"-$&").toLowerCase()})),Ome=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Cme,(function(e,t,n){return Rme={name:t,styles:n,next:Rme},t}))}return 1===Ame[e]||Ime(e)||"number"!=typeof t||0===t?t:t+"px"};function Pme(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 Rme={name:n.name,styles:n.styles,next:Rme},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Rme={name:r.name,styles:r.styles,next:Rme},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+=Pme(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":Sme(a)&&(r+=kme(o)+":"+Ome(o,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=Pme(e,t,a);switch(o){case"animation":case"animationName":r+=kme(o)+":"+s+";";break;default:r+=o+"{"+s+"}"}}else for(var c=0;c<a.length;c++)Sme(a[c])&&(r+=kme(o)+":"+Ome(o,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=Rme,o=n(e);return Rme=i,Pme(e,t,o)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var Rme,Nme=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Mme="undefined"!=typeof document,Dme=!!nL.useInsertionEffect&&nL.useInsertionEffect,Lme=Mme&&Dme||function(e){return e()},Fme="undefined"!=typeof document,Bme={}.hasOwnProperty,Ume=nL.createContext("undefined"!=typeof HTMLElement?Eme({key:"css"}):null);Ume.Provider;var zme=function(e){return nL.forwardRef((function(t,n){var r=nL.useContext(Ume);return e(t,r,n)}))};Fme||(zme=function(e){return function(t){var n=nL.useContext(Ume);return null===n?(n=Eme({key:"css"}),nL.createElement(Ume.Provider,{value:n},e(t,n))):e(t,n)}});var jme,Hme=nL.createContext({}),Wme="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Vme=function(e,t){var n={};for(var r in t)Bme.call(t,r)&&(n[r]=t[r]);return n[Wme]=e,n},Gme=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;Tme(t,n,r);var i=Lme((function(){return function(e,t,n){Tme(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i="",o=t;do{var a=e.insert(t===o?"."+r:"",o,e.sheet,!0);xme||void 0===a||(i+=a),o=o.next}while(void 0!==o);if(!xme&&0!==i.length)return i}}(t,n,r)}));if(!Fme&&void 0!==i){for(var o,a=n.name,s=n.next;void 0!==s;)a+=" "+s.name,s=s.next;return nL.createElement("style",((o={})["data-emotion"]=t.key+" "+a,o.dangerouslySetInnerHTML={__html:i},o.nonce=t.sheet.nonce,o))}return null},qme=zme((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[Wme],o=[r],a="";"string"==typeof e.className?a=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,o,e.className):null!=e.className&&(a=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="";Rme=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=Pme(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++)i+=Pme(n,t,e[a]),r&&(i+=o[a]);Nme.lastIndex=0;for(var s,c="";null!==(s=Nme.exec(i));)c+="-"+s[1];var l=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:l,styles:i,next:Rme}}(o,void 0,nL.useContext(Hme));a+=t.key+"-"+s.name;var c={};for(var l in e)!Bme.call(e,l)||"css"===l||l===Wme||(c[l]=e[l]);return c.ref=n,c.className=a,nL.createElement(nL.Fragment,null,nL.createElement(Gme,{cache:t,serialized:s,isStringTag:"string"==typeof i}),nL.createElement(i,c))})),Kme=qme;upe(ppe()),upe(hpe()),function(e){e.CONNECT="Connect",e.WALLET="Wallet",e.ON_RAMP="OnRamp",e.SWAP="Swap",e.BRIDGE="Bridge",e.SALE="PrimarySale"}(jme||(jme={}));const{AnalyticsProvider:Xme,useAnalytics:Yme}=function({appName:e,writeKey:t}){const n=nL.createContext(void 0);return{AnalyticsProvider:function({children:r,loaderOverride:i=Qhe,log:o=console.log}){const[a,s]=nL.useState(t),c=nL.useMemo((()=>a?i.load({writeKey:a}):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(cpe({method:e},n))))})),n}(i,o)),[i,a,o]),l=nL.useCallback((({userJourney:t,screen:n,action:r,extras:i={}})=>{const o=[e+mpe(t)+mpe(n)+mpe(r)].join("");return c.page(o,i)}),[c]),u=nL.useCallback((t=>{var n=t,{userJourney:r,screen:i,action:o,extras:a={}}=n,s=((e,t)=>{var n={};for(var r in e)ope.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&rpe)for(var r of rpe(e))t.indexOf(r)<0&&ape.call(e,r)&&(n[r]=e[r]);return n})(n,["userJourney","screen","action","extras"]);let l="";"control"in s&&"controlType"in s&&(l=mpe(s.control)+mpe(s.controlType));const u=[e+mpe(r)+mpe(i),l+mpe(o)].join("_");return c.track(u,cpe({},a))}),[c]),d=nL.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{a(t.next(e))}catch(e){r(e)}},o=e=>{try{a(t.throw(e))}catch(e){r(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,o);a((t=t.apply(e,null)).next())}));var e,t}),[c]),f=nL.useMemo((()=>({page:l,track:u,identifyFromCookie:d,identify:c.identify,group:c.group,alias:c.alias,updateWriteKey:s})),[c,l,u,d]);return function(e,t,n){return Bme.call(t,"css")?fL.jsx(Kme,Vme(e,t),n):fL.jsx(e,t,n)}(n.Provider,{value:f,children:r})},useAnalytics:function(){const e=nL.useContext(n);if(!e)throw new Error("useAnalytics: Store not found");return e}}}({writeKey:"",appName:"checkout"});function Zme({children:e,checkout:t}){const{updateWriteKey:n}=Yme(),r=nL.useCallback((async()=>{try{return await(t?.config?.remote.getConfig("telemetry"))}catch(e){console.error("unable to fetch telemetry config: ",e)}}),[t]);return nL.useEffect((()=>{(async()=>{const e=await r();e&&n(e.segmentPublishableKey)})()}),[r]),vB(gB,{children:e})}function Jme({children:e,checkout:t}){return vB(Xme,{children:vB(Zme,{checkout:t,children:e})})}function Qme({header:e,footer:t,children:n,heroContent:r,testId:i,floatHeader:o=!1,footerBackgroundColor:a}){return vB(tJ,{sx:lle,children:bB(tJ,{testId:i,sx:ule,children:[e&&vB(tJ,{sx:dle(o),children:e}),bB(tJ,{sx:hle,children:[r&&vB(tJ,{sx:ple,children:r}),n&&vB(tJ,{sx:mle,children:n})]}),t&&vB(tJ,{sx:fle(a),children:t})]})})}function $me({loadingText:e,textDuration:t}){const n=Array.isArray(e)?e:[e],r=t||2500;return vB(Qme,{children:vB(I5,{visible:!0,children:vB(I5.Content,{children:vB(I5.Content.LoopingText,{text:[...n],textDuration:r})})})})}function eye(e){switch(e){case WM.ETHEREUM:return VM.ETHEREUM;case WM.IMTBL_ZKEVM_TESTNET:return VM.IMTBL_ZKEVM_TESTNET;case WM.IMTBL_ZKEVM_MAINNET:return VM.IMTBL_ZKEVM_MAINNET;case WM.IMTBL_ZKEVM_DEVNET:return VM.IMTBL_ZKEVM_DEVNET;case WM.SEPOLIA:return VM.SEPOLIA;default:return""}}function tye(e){switch(e){case WM.ETHEREUM:return GM.ETHEREUM;case WM.IMTBL_ZKEVM_TESTNET:return GM.IMTBL_ZKEVM_TESTNET;case WM.IMTBL_ZKEVM_MAINNET:return GM.IMTBL_ZKEVM_MAINNET;case WM.IMTBL_ZKEVM_DEVNET:return GM.IMTBL_ZKEVM_DEVNET;case WM.SEPOLIA:return GM.SEPOLIA;default:return""}}function nye(e){switch(e){case GM.ETHEREUM:return WM.ETHEREUM;case GM.IMTBL_ZKEVM_TESTNET:return WM.IMTBL_ZKEVM_TESTNET;case GM.IMTBL_ZKEVM_MAINNET:return WM.IMTBL_ZKEVM_MAINNET;case GM.IMTBL_ZKEVM_DEVNET:return WM.IMTBL_ZKEVM_DEVNET;case GM.SEPOLIA:return WM.SEPOLIA;default:return 0}}const rye={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 iye{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||rye,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 iye(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new iye(this.logger,e)}}var oye=new iye;let aye=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 sye(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}function cye(e){return null==e?"":""+e}function lye(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}const o="string"!=typeof t?[].concat(t):t.split(".");for(;o.length>1;){if(i())return{};const t=r(o.shift());!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function uye(e,t,n){const{obj:r,k:i}=lye(e,t,Object);r[i]=n}function dye(e,t){const{obj:n,k:r}=lye(e,t);if(n)return n[r]}function fye(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]):fye(e[r],t[r],n):e[r]=t[r]);return e}function hye(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var pye={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function mye(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>pye[e])):e}const yye=[" ",",","?","!",";"];function gye(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 o=2,a=r.slice(e,e+o).join(n),s=i[a];for(;void 0===s&&r.length>e+o;)o++,a=r.slice(e,e+o).join(n),s=i[a];if(void 0===s)return;if(null===s)return null;if(t.endsWith(a)){if("string"==typeof s)return s;if(a&&"string"==typeof s[a])return s[a]}const c=r.slice(e+o).join(n);return c?gye(s,c,n):void 0}i=i[r[e]]}return i}function vye(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class bye extends aye{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."));const s=dye(this.data,a);return s||!o||"string"!=typeof n?s:gye(this.data&&this.data[e]&&this.data[e][t],n,i)}addResource(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),uye(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)"string"!=typeof n[r]&&"[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 o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=dye(this.data,a)||{};r?fye(s,n,i):s={...s,...n},uye(this.data,a,s),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var wye={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 Eye={};class xye extends aye{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=oye.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";const r=yye.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 o=!i.test(e);if(!o){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o}(e,n,r));if(o&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:i};const o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],c=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(l){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${o}`}return r?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:o}const u=this.resolve(e,t);let d=u&&u.res;const f=u&&u.usedKey||o,h=u&&u.exactUsedKey||o,p=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(p)<0&&("string"!=typeof m||"[object Array]"!==p)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...t,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return r?(u.res=e,u.usedParams=this.getUsedParamsDetails(t),u):e}if(i){const e="[object Array]"===p,n=e?[]:{},r=e?h:f;for(const e in d)if(Object.prototype.hasOwnProperty.call(d,e)){const o=`${r}${i}${e}`;n[e]=this.translate(o,{...t,joinArrays:!1,ns:a}),n[e]===o&&(n[e]=d[e])}d=n}}else if(y&&"string"==typeof m&&"[object Array]"===p)d=d.join(m),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,a=!1;const l=void 0!==t.count&&"string"!=typeof t.count,f=xye.hasDefaultValue(t),h=l?this.pluralResolver.getSuffix(c,t.count,t):"",p=t.ordinal&&l?this.pluralResolver.getSuffix(c,t.count,{ordinal:!1}):"",m=t[`defaultValue${h}`]||t[`defaultValue${p}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(r=!0,d=m),this.isValidLookup(d)||(a=!0,d=o);const y=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,g=f&&m!==d&&this.options.updateMissing;if(a||r||g){if(this.logger.log(g?"updateKey":"missingKey",c,s,o,g?m:d),i){const e=this.resolve(o,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const i=f&&r!==d?r:y;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,i,g,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,i,g,t),this.emit("missingKey",e,s,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?e.forEach((e=>{this.pluralResolver.getSuffixes(e,t).forEach((n=>{r([e],o+n,t[`defaultValue${n}`]||m)}))})):r(e,o,m))}d=this.extendTranslation(d,e,t,u,n),a&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${o}`),(a||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${o}`:o,r?d:void 0):this.options.parseMissingKeyHandler(d))}return r?(u.res=d,u.usedParams=this.getUsedParamsDetails(t),u):d}extendTranslation(e,t,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let 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),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return i&&i[0]===r[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):o.translate(...r,t)}),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=wye.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,i,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),c=s.key;n=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const u=void 0!==a.count&&"string"!=typeof a.count,d=u&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,h=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach((e=>{this.isValidLookup(t)||(o=e,!Eye[`${h[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(Eye[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${h.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach((n=>{if(this.isValidLookup(t))return;i=n;const o=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,n,e,a);else{let e;u&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(o.push(c+e),a.ordinal&&0===e.indexOf(r)&&o.push(c+e.replace(r,this.options.pluralSeparator)),d&&o.push(c+t)),f){const n=`${c}${this.options.contextSeparator}${a.context}`;o.push(n),u&&(o.push(n+e),a.ordinal&&0===e.indexOf(r)&&o.push(n+e.replace(r,this.options.pluralSeparator)),d&&o.push(n+t))}}let s;for(;s=o.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&"string"!=typeof e.replace;let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}function Tye(e){return e.charAt(0).toUpperCase()+e.slice(1)}class Aye{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=oye.create("languageUtils")}getScriptPartFromCode(e){if(!(e=vye(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=vye(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]=Tye(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]=Tye(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=Tye(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 _ye=[{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}],Cye={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 Iye=["v1","v2","v3"],Sye=["v4"],kye={zero:0,one:1,two:2,few:3,many:4,other:5};class Oye{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=oye.create("pluralResolver"),this.options.compatibilityJSON&&!Sye.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 _ye.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:Cye[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(vye(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)=>kye[e]-kye[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!Iye.includes(this.options.compatibilityJSON)}}function Pye(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=function(e,t,n){const r=dye(e,n);return void 0!==r?r:dye(t,n)}(e,t,n);return!o&&i&&"string"==typeof n&&(o=gye(e,n,r),void 0===o&&(o=gye(t,n,r))),o}class Rye{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=oye.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:mye,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?hye(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?hye(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?hye(t.nestingPrefix):t.nestingPrefixEscaped||hye("$t("),this.nestingSuffix=t.nestingSuffix?hye(t.nestingSuffix):t.nestingSuffixEscaped||hye(")"),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,o,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}const l=e=>{if(e.indexOf(this.formatSeparator)<0){const i=Pye(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),o=i.shift().trim(),a=i.join(this.formatSeparator).trim();return this.format(Pye(t,s,o,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:o})};this.resetRegExp();const u=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(a=0;i=t.regex.exec(e);){const n=i[1].trim();if(o=l(n),void 0===o)if("function"==typeof u){const t=u(e,i,r);o="string"==typeof t?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else{if(d){o=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else"string"==typeof o||this.useRawValueToEscape||(o=cye(o));const s=t.safeValue(o);if(e=e.replace(i[0],s),d?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,r,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function a(e,t){const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let o=`{${r[1]}`;e=r[0],o=this.interpolate(o,i);const a=o.match(/'/g),s=o.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${o}`}return delete i.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){let s=[];i={...o},i=i.replace&&"string"!=typeof i.replace?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let 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(a.call(this,n[1].trim(),i),i),r&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=cye(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),c&&(r=s.reduce(((e,t)=>this.format(e,t,o.lng,{...o,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}function Nye(e){const t={};return function(n,r,i){const o=r+JSON.stringify(i);let a=t[o];return a||(a=e(vye(r),i),t[o]=a),a(n)}}class Mye{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=oye.create("formatter"),this.options=e,this.formats={number:Nye(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:Nye(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:Nye(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:Nye(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:Nye(((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()]=Nye(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=t.split(this.formatSeparator).reduce(((e,t)=>{const{formatName:i,formatOptions:o}=function(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach((e=>{if(!e)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 a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...o,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e}),e);return i}}class Dye extends aye{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=oye.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const i={},o={},a={},s={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===o[a]&&(o[a]=!0):(this.state[a]=1,r=!1,void 0===o[a]&&(o[a]=!0),void 0===i[a]&&(i[a]=!0),void 0===s[t]&&(s[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),n&&this.store.addResourceBundle(i,o,n),this.state[e]=t?-1:2;const a={};this.queue.forEach((n=>{!function(e,t,n,r){const{obj:i,k:o}=lye(e,t,Object);i[o]=i[o]||[],r&&(i[o]=i[o].concat(n)),r||i[o].push(n)}(n.loaded,[i],o),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:o});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*i,o)}),i):o(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,((n,o)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,o),this.loaded(e,n,o)}))}saveMissing(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...o,isUpdate:i},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=>a(null,e))).catch(a):a(null,i)}catch(e){a(e)}else c(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}function Lye(){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 Fye(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 Bye(){}class Uye extends aye{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=Fye(e),this.services={},this.logger=oye,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=Lye();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options={...r,...this.options,...Fye(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?oye.init(i(this.modules.logger),this.options):oye.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=Mye);const n=new Aye(this.options);this.store=new bye(this.options.resources,this.options);const o=this.services;o.logger=oye,o.resourceStore=this.store,o.languageUtils=n,o.pluralResolver=new Oye(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(o.formatter=i(t),o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new Rye(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new Dye(i(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)})),this.modules.languageDetector&&(o.languageDetector=i(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=i(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new xye(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=Bye),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const o=sye(),a=()=>{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),o.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),o}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Bye;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=sye();return e||(e=this.languages),t||(t=this.options.ns),n||(n=Bye),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&&wye.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=sye();this.emit("languageChanging",e);const i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(e,o)=>{o?(i(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||i(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(e=>{o(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const i=function(e,t){let o;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),c=2;c<a;c++)s[c-2]=arguments[c];o=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else o={...t};o.lng=o.lng||i.lng,o.lngs=o.lngs||i.lngs,o.ns=o.ns||i.ns,o.keyPrefix=o.keyPrefix||n||i.keyPrefix;const l=r.options.keySeparator||".";let u;return u=o.keyPrefix&&Array.isArray(e)?e.map((e=>`${o.keyPrefix}${l}${e}`)):o.keyPrefix?`${o.keyPrefix}${l}${e}`:e,r.t(u,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(n,e)||r&&!o(i,e)))}loadNamespaces(e,t){const n=sye();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=sye();"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 Aye(Lye());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 Uye(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]:Bye;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new Uye(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 bye(this.store.data,r),i.services.resourceStore=i.store),i.translator=new xye(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 zye=Uye.createInstance();function jye(e){return jye="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},jye(e)}function Hye(e){var t=function(e,t){if("object"!=jye(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=jye(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==jye(t)?t:String(t)}function Wye(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,Hye(r.key),r)}}zye.createInstance=Uye.createInstance,zye.createInstance,zye.dir,zye.init,zye.loadResources,zye.reloadResources,zye.use,zye.changeLanguage,zye.getFixedT,zye.t,zye.exists,zye.setDefaultNamespace,zye.hasLoadedNamespace,zye.loadNamespaces,zye.loadLanguages;var Vye=[],Gye=Vye.forEach,qye=Vye.slice;var Kye=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Xye=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+60*n*1e3)),r&&(i.domain=r),document.cookie=function(e,t,n){var r=n||{};r.path=r.path||"/";var i=encodeURIComponent(t),o="".concat(e,"=").concat(i);if(r.maxAge>0){var a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(a))}if(r.domain){if(!Kye.test(r.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(r.domain)}if(r.path){if(!Kye.test(r.path))throw new TypeError("option path is invalid");o+="; Path=".concat(r.path)}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");o+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o}(e,encodeURIComponent(t),i)},Yye=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},Zye={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!=typeof document){var n=Yye(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!=typeof document&&Xye(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},Jye={name:"querystring",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=n.substring(1).split("&"),i=0;i<r.length;i++){var o=r[i].indexOf("=");if(o>0)r[i].substring(0,o)===e.lookupQuerystring&&(t=r[i].substring(o+1))}}return t}},Qye=null,$ye=function(){if(null!==Qye)return Qye;try{Qye="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){Qye=!1}return Qye},ege={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&$ye()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&$ye()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},tge=null,nge=function(){if(null!==tge)return tge;try{tge="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){tge=!1}return tge},rge={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&nge()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&nge()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},ige={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}},oge={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}},age={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}},sge={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 cge=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 Gye.call(qye.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(Zye),this.addDetector(Jye),this.addDetector(ege),this.addDetector(rge),this.addDetector(ige),this.addDetector(oge),this.addDetector(age),this.addDetector(sge)}},{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&&Wye(t.prototype,n),r&&Wye(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function lge(){return lge=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},lge.apply(this,arguments)}cge.type="languageDetector";var uge=ut({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}),dge=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function fge(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(uge[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(dge),o=null;null!==(o=i.exec(e));)if(o[0].trim())if(o[1]){var a=o[1].trim(),s=[a,""];a.indexOf("=")>-1&&(s=a.split("=")),t.attrs[s[0]]=s[1],i.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var hge=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,pge=/^\s*$/,mge=Object.create(null);function yge(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(yge,"")+"</"+t.name+">";case"comment":return e+"\x3c!--"+t.comment+"--\x3e"}}var gge={parse:function(e,t){t||(t={}),t.components||(t.components=mge);var n,r=[],i=[],o=-1,a=!1;if(0!==e.indexOf("<")){var s=e.indexOf("<");r.push({type:"text",content:-1===s?e:e.substring(0,s)})}return e.replace(hge,(function(s,c){if(a){if(s!=="</"+n.name+">")return;a=!1}var l,u="/"!==s.charAt(1),d=s.startsWith("\x3c!--"),f=c+s.length,h=e.charAt(f);if(d){var p=fge(s);return o<0?(r.push(p),r):((l=i[o]).children.push(p),r)}if(u&&(o++,"tag"===(n=fge(s)).type&&t.components[n.name]&&(n.type="component",a=!0),n.voidElement||a||!h||"<"===h||n.children.push({type:"text",content:e.slice(f,e.indexOf("<",f))}),0===o&&r.push(n),(l=i[o-1])&&l.children.push(n),i[o]=n),(!u||n.voidElement)&&(o>-1&&(n.voidElement||n.name===s.slice(2,-1))&&(o--,n=-1===o?r:i[o]),!a&&"<"!==h&&h)){l=-1===o?r:i[o].children;var m=e.indexOf("<",f),y=e.slice(f,-1===m?void 0:m);pge.test(y)&&(y=" "),(m>-1&&o+l.length>=0||" "!==y)&&l.push({type:"text",content:y})}})),r},stringify:function(e){return e.reduce((function(e,t){return e+yge("",t)}),"")}};function vge(){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 bge={};function wge(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&bge[t[0]]||("string"==typeof t[0]&&(bge[t[0]]=new Date),vge(...t))}const Ege=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout((()=>{e.off("initialized",n)}),0),t()};e.on("initialized",n)}};function xge(e,t,n){e.loadNamespaces(t,Ege(e,n))}function Tge(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,Ege(e,r))}const Age=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,_ge={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Cge=e=>_ge[e];let Ige,Sge={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(Age,Cge)};function kge(){return Sge}function Oge(){return Ige}function Pge(e,t){if(!e)return!1;const n=e.props?e.props.children:e.children;return t?n.length>0:!!n}function Rge(e){if(!e)return[];const t=e.props?e.props.children:e.children;return e.props&&e.props.i18nIsDynamicList?Nge(t):t}function Nge(e){return Array.isArray(e)?e:[e]}function Mge(e,t){if(!e)return"";let n="";const r=Nge(e),i=t.transSupportBasicHtmlNodes&&t.transKeepBasicHtmlNodesFor?t.transKeepBasicHtmlNodesFor:[];return r.forEach(((e,r)=>{if("string"==typeof e)n+=`${e}`;else if(nL.isValidElement(e)){const o=Object.keys(e.props).length,a=i.indexOf(e.type)>-1,s=e.props.children;if(!s&&a&&0===o)n+=`<${e.type}/>`;else if(s||a&&0===o)if(e.props.i18nIsDynamicList)n+=`<${r}></${r}>`;else if(a&&1===o&&"string"==typeof s)n+=`<${e.type}>${s}</${e.type}>`;else{const e=Mge(s,t);n+=`<${r}>${e}</${r}>`}else n+=`<${r}></${r}>`}else if(null===e)vge("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 vge("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",e)}else vge("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 Dge(e,t,n,r,i,o){if(""===t)return[];const a=r.transKeepBasicHtmlNodesFor||[],s=t&&new RegExp(a.map((e=>`<${e}`)).join("|")).test(t);if(!e&&!s&&!o)return[t];const c={};!function e(t){Nge(t).forEach((t=>{"string"!=typeof t&&(Pge(t)?e(Rge(t)):"object"!=typeof t||nL.isValidElement(t)||Object.assign(c,t))}))}(e);const l=gge.parse(`<0>${t}</0>`),u={...c,...i};function d(e,t,n){const r=Rge(e),i=h(r,t.children,n);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((e=>nL.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(nL.cloneElement(e,{key:r},i?void 0:t))):n.push(...nL.Children.map([e],(e=>{const n={...e.props};return delete n.i18nIsDynamicList,rL.createElement(e.type,lge({},n,{key:r,ref:e.ref},i?{}:{children:t}))})))}function h(t,i,c){const l=Nge(t);return Nge(i).reduce(((t,i,p)=>{const m=i.children&&i.children[0]&&i.children[0].content&&n.services.interpolator.interpolate(i.children[0].content,u,n.language);if("tag"===i.type){let o=l[parseInt(i.name,10)];1!==c.length||o||(o=c[0][i.name]),o||(o={});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},o):o,g=nL.isValidElement(y),v=g&&Pge(i,!0)&&!i.voidElement,b=s&&"object"==typeof y&&y.dummy&&!g,w="object"==typeof e&&null!==e&&Object.hasOwnProperty.call(e,i.name);if("string"==typeof y){const e=n.services.interpolator.interpolate(y,u,n.language);t.push(e)}else if(Pge(y)||v){f(y,d(y,i,c),t,p)}else if(b){f(y,h(l,i.children,c),t,p)}else if(Number.isNaN(parseFloat(i.name)))if(w){f(y,d(y,i,c),t,p,i.voidElement)}else if(r.transSupportBasicHtmlNodes&&a.indexOf(i.name)>-1)if(i.voidElement)t.push(nL.createElement(i.name,{key:`${i.name}-${p}`}));else{const e=h(l,i.children,c);t.push(nL.createElement(i.name,{key:`${i.name}-${p}`},e))}else if(i.voidElement)t.push(`<${i.name} />`);else{const e=h(l,i.children,c);t.push(`<${i.name}>${e}</${i.name}>`)}else if("object"!=typeof y||g)f(y,m,t,p,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,a=o?r.unescape(n.services.interpolator.interpolate(i.content,u,n.language)):n.services.interpolator.interpolate(i.content,u,n.language);e?t.push(nL.createElement(e,{key:`${i.name}-${p}`},a)):t.push(a)}return t}),[])}return Rge(h([{dummy:!0,children:e||[]}],l,Nge(e||[]))[0])}function Lge(e){let{children:t,count:n,parent:r,i18nKey:i,context:o,tOptions:a={},values:s,defaults:c,components:l,ns:u,i18n:d,t:f,shouldUnescape:h,...p}=e;const m=d||Oge();if(!m)return wge("You will need to pass in an i18next instance by using i18nextReactModule"),t;const y=f||m.t.bind(m)||(e=>e);o&&(a.context=o);const g={...kge(),...m.options&&m.options.react};let v=u||y.ns||m.options&&m.options.defaultNS;v="string"==typeof v?[v]:v||["translation"];const b=Mge(t,g),w=c||b||g.transEmptyNodeValue||i,{hashTransKey:E}=g,x=i||(E?E(b||w):b||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 T=s?a.interpolation:{interpolation:{...a.interpolation,prefix:"#$?",suffix:"?$#"}},A={...a,count:n,...s,...T,defaultValue:w,ns:v},_=x?y(x,A):w;l&&Object.keys(l).forEach((e=>{const t=l[e];"function"==typeof t.type||!t.props||!t.props.children||_.indexOf(`${e}/>`)<0&&_.indexOf(`${e} />`)<0||(l[e]=rL.createElement((function(){return rL.createElement(rL.Fragment,null,t)}),null))}));const C=Dge(l||t,_,m,g,A,h),I=void 0!==r?r:g.defaultTransParent;return I?nL.createElement(I,p,C):C}const Fge={type:"3rdParty",init(e){!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Sge={...Sge,...e}}(e.options.react),function(e){Ige=e}(e)}},Bge=nL.createContext();class Uge{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach((e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)}))}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function zge(e){let{children:t,count:n,parent:r,i18nKey:i,context:o,tOptions:a={},values:s,defaults:c,components:l,ns:u,i18n:d,t:f,shouldUnescape:h,...p}=e;const{i18n:m,defaultNS:y}=nL.useContext(Bge)||{},g=d||m||Oge(),v=f||g&&g.t.bind(g);return Lge({children:t,count:n,parent:r,i18nKey:i,context:o,tOptions:a,values:s,defaults:c,components:l,ns:u||v&&v.ns||y||g&&g.options&&g.options.defaultNS,i18n:g,t:f,shouldUnescape:h,...p})}const jge=(e,t)=>{const n=nL.useRef();return nL.useEffect((()=>{n.current=t?n.current:e}),[e,t]),n.current};function Hge(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=nL.useContext(Bge)||{},o=n||r||Oge();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new Uge),!o){wge("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}o.options.react&&void 0!==o.options.react.wait&&wge("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...kge(),...o.options.react,...t},{useSuspense:s,keyPrefix:c}=a;let l=e||i||o.options&&o.options.defaultNS;l="string"==typeof l?[l]:l||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(l);const u=(o.isInitialized||o.initializedStoreOnce)&&l.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,o=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;const a=(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&&!a(t.isLanguageChangingTo,e)||!t.hasResourceBundle(r,e)&&t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages)&&(!a(r,e)||i&&!a(o,e)))}(e,t,n):(wge("i18n.languages were undefined or empty",t.languages),!0)}(e,o,a)));function d(){return o.getFixedT(t.lng||null,"fallback"===a.nsMode?l:l[0],c)}const[f,h]=nL.useState(d);let p=l.join();t.lng&&(p=`${t.lng}${p}`);const m=jge(p),y=nL.useRef(!0);nL.useEffect((()=>{const{bindI18n:e,bindI18nStore:n}=a;function r(){y.current&&h(d)}return y.current=!0,u||s||(t.lng?Tge(o,t.lng,l,(()=>{y.current&&h(d)})):xge(o,l,(()=>{y.current&&h(d)}))),u&&m&&m!==p&&y.current&&h(d),e&&o&&o.on(e,r),n&&o&&o.store.on(n,r),()=>{y.current=!1,e&&o&&e.split(" ").forEach((e=>o.off(e,r))),n&&o&&n.split(" ").forEach((e=>o.store.off(e,r)))}}),[o,p]);const g=nL.useRef(!0);nL.useEffect((()=>{y.current&&!g.current&&h(d),g.current=!1}),[o,c]);const v=[f,o,u];if(v.t=f,v.i18n=o,v.ready=u,u)return v;if(!u&&!s)return v;throw new Promise((e=>{t.lng?Tge(o,t.lng,l,(()=>e())):xge(o,l,(()=>e()))}))}const Wge={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:""}}},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:"The fastest way to pay, if you have coins in your balance.",disabledCaption:"We can't see enough coins in your balance"},debit:{heading:"Debit Card",caption:"The recommended way to pay with card.",disabledCaption:null},credit:{heading:"Credit Card",caption:"Not recommended since transactions may be blocked by your bank.",disabledCaption:null}},insufficientCoinsBanner:{caption:"Insufficient coin balance. Pay with card to proceed, or",captionEnd:"and try again.",captionCTA:"add coins"},loading:{ready1:"Collecting your order",ready2:"Talking to wallet",ready3:"Readying assets",processing1:"Initialising payment",processing2:"Securing your assets",processing3:"Finalising payment"}},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"},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",accentText:"Recommended",description:"digital wallet and identity"},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"}},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:{eth:{heading:"Balance too low",body:"You're ETH balance is too low to cover the gas fee on this move. You could transfer more ETH into your wallet using MetaMask directly."},imx:{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",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}}"}}}},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:""}}},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:null},credit:{heading:"クレジットカード",caption:"銀行によって取引がブロックされる可能性があるため、推奨されません。",disabledCaption:null}},insufficientCoinsBanner:{caption:"コインの残高が不足しています。カードで支払うか、",captionEnd:"して再試行してください。",captionCTA:"コインを追加"},loading:{ready1:"注文を受け取り中",ready2:"ウォレットと通信中",ready3:"資産を準備中",processing1:"支払いを初期化中",processing2:"資産を確保中",processing3:"支払いを完了中"}},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:"キャンセル"},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",accentText:"おすすめ",description:"デジタルウォレットおよびアイデンティティ"},metamask:{heading:"MetaMask",description:"ブロックチェーンアプリケーションとWeb3へのアクセス用のデジタルウォレット"},walletconnect:{heading:"その他のウォレット",description:"MetaMaskを含む任意のブロックチェーンウォレットに接続できます"},browserwallet:{heading:"ブラウザウォレット",description:"ブロックチェーンアプリケーションおよびweb3にアクセスするためのデジタルウォレット"}},drawers:{feesBreakdown:{heading:"手数料の内訳",total:"総手数料",fees:{gas:{label:"ガス手数料"}}},transactionFailed:{content:{heading1:"続行する前に、",heading2:"ウォレットで確認が必要です",body1:"MetaMaskのポップアップが表示されたら、",body2:"トランザクションに署名してください"},buttons:{retry:"了解",cancel:"閉じる"}},coinSelector:{option:{fiatPricePrefix:"約USD $"},noCoins:"ウォレットで選択できるコインがありません。"},notEnoughGas:{content:{eth:{heading:"残高が低すぎます",body:"この移動のガス手数料をカバーするには、ETH残高が不足しています。MetaMaskを使用して直接ウォレットにETHを送金することができます。"},imx:{heading:"もっとIMXコインが必要になるでしょう",body:"指定された金額の手数料をカバーするために、もっとIMXコインを追加する必要があります"}},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}}に切り替える"}}}},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:""}}},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:null},credit:{heading:"신용카드",caption:"은행에서 거래를 차단할 수 있으므로 권장하지 않습니다.",disabledCaption:null}},insufficientCoinsBanner:{caption:"코인 잔액이 부족합니다. 카드로 결제하거나",captionEnd:"하고 다시 시도해 보세요.",captionCTA:"코인 추가"},loading:{ready1:"주문 수집 중",ready2:"지갑과 대화 중",ready3:"자산 준비 중",processing1:"결제 초기화 중",processing2:"자산 보호 중",processing3:"결제 완료 중"}},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:"취소"},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",accentText:"추천",description:"디지털 지갑 및 신원"},metamask:{heading:"MetaMask",description:"블록체인 애플리케이션 및 웹3에 액세스하기 위한 디지털 지갑"},walletconnect:{heading:"기타 지갑",description:"MetaMask를 포함한 모든 블록체인 지갑에 연결할 수 있습니다"},browserwallet:{heading:"브라우저 지갑",description:"블록체인 애플리케이션 및 web3에 접근하기 위한 디지털 지갑"}},drawers:{feesBreakdown:{heading:"수수료 내역",total:"수수료 총액",fees:{gas:{label:"가스 수수료"}}},transactionFailed:{content:{heading1:"계속하기 전에 지갑에서 확인이 필요합니다",heading2:"지갑 확인 필요",body1:"MetaMask 팝업이 나타날 때 거래에",body2:"서명을 꼭 하십시오"},buttons:{retry:"알겠습니다",cancel:"취소"}},coinSelector:{option:{fiatPricePrefix:"대략 USD $"},noCoins:"지갑에 선택 가능한 코인이 없습니다."},notEnoughGas:{content:{eth:{heading:"잔액이 너무 낮습니다",body:"이 이동에 필요한 가스 수수료를 충당하기에 ETH 잔액이 너무 낮습니다. MetaMask를 직접 사용하여 지갑에 ETH를 더 이전할 수 있습니다."},imx:{heading:"더 많은 IMX 코인이 필요할 것입니다",body:"지정된 금액의 수수료를 커버하기 위해 더 많은 IMX 코인을 추가해야 합니다"}},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}}로 전환하기"}}}},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:""}}},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:null},credit:{heading:"信用卡",caption:"不推荐使用,因为您的银行可能会阻止交易。",disabledCaption:null}},insufficientCoinsBanner:{caption:"硬币余额不足。请使用卡支付,或",captionEnd:"再试一次。",captionCTA:"添加硬币"},loading:{ready1:"正在收集您的订单",ready2:"正在与钱包交流",ready3:"正在准备资产",processing1:"正在初始化支付",processing2:"正在保护您的资产",processing3:"正在完成支付"}},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:"取消"},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",accentText:"推荐",description:"数字钱包和身份"},metamask:{heading:"MetaMask",description:"用于访问区块链应用程序和web3的数字钱包"},walletconnect:{heading:"其他钱包",description:"允许您连接到包括MetaMask在内的任何区块链钱包"},browserwallet:{heading:"浏览器钱包",description:"用于访问区块链应用和web3的数字钱包"}},drawers:{feesBreakdown:{heading:"费用分解",total:"费用总计",fees:{gas:{label:"燃气费"}}},transactionFailed:{content:{heading1:"在继续前我们需要您在钱包中确认",heading2:"钱包确认",body1:"当MetaMask弹出时,请确保",body2:"签署交易"},buttons:{retry:"明白了",cancel:"关闭"}},coinSelector:{option:{fiatPricePrefix:"约美元 $"},noCoins:"您的钱包中没有可用的硬币。"},notEnoughGas:{content:{eth:{heading:"余额过低",body:"您的ETH余额不足以支付此操作的燃气费。您可以直接使用MetaMask向您的钱包转入更多ETH。"},imx:{heading:"您需要更多IMX币",body:"为了支付指定金额的费用,您需要添加更多IMX币。"}},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}}"}}}}};var Vge;zye.use(Fge).use(cge).init({fallbackLng:"en",resources:Wge,interpolation:{escapeValue:!1}});var Gge=yae;Vge=Gge.createRoot,Gge.hydrateRoot;const qge="development",Kge="native",Xge=18,Yge=6,Zge=700,Jge="IMX",Qge="ETH",$ge="https://support.immutable.com/en/",eve={retryIntervalMs:1e4,retries:60,nonRetryable:e=>e?.data?.code>=500||e.type===cD.GET_ERC20_BALANCE_ERROR,nonRetryableSilently:e=>e.type===cD.WEB3_PROVIDER_ERROR},tve={retryIntervalMs:1e4,retries:60,nonRetryableSilently:e=>!!e},nve=qt.SANDBOX,rve=HM.DARK;QM.METAMASK;const ive=3e4,ove={[qge]:"https://checkout-cdn.dev.immutable.com",[qt.SANDBOX]:"https://checkout-cdn.sandbox.immutable.com",[qt.PRODUCTION]:"https://checkout-cdn.immutable.com"},ave={[qge]:"https://testnet.axelarscan.io/gmp/",[qt.SANDBOX]:"https://testnet.axelarscan.io/gmp/",[qt.PRODUCTION]:"https://axelarscan.io/gmp/"},sve={[qge]:"https://passport.sandbox.immutable.com/",[qt.SANDBOX]:"https://passport.sandbox.immutable.com/",[qt.PRODUCTION]:"https://passport.immutable.com/"},cve=91e3;function lve(e){return e&&Object.values(qt).includes(e)?e:nve}function uve(e,t){return t?"true"===t||"false"!==t&&e:e}const dve=e=>e.isProduction?WM.ETHEREUM:WM.SEPOLIA,fve=e=>e.isDevelopment?WM.IMTBL_ZKEVM_DEVNET:e.isProduction?WM.IMTBL_ZKEVM_MAINNET:WM.IMTBL_ZKEVM_TESTNET,hve={[WM.IMTBL_ZKEVM_DEVNET]:"base.color.text.link.primary",[WM.IMTBL_ZKEVM_TESTNET]:"base.color.text.link.primary",[WM.IMTBL_ZKEVM_MAINNET]:"base.color.text.link.primary",[WM.ETHEREUM]:"base.color.accent.5",[WM.SEPOLIA]:"base.color.accent.5"},pve={[WM.IMTBL_ZKEVM_DEVNET]:"Immutable",[WM.IMTBL_ZKEVM_MAINNET]:"Immutable",[WM.IMTBL_ZKEVM_TESTNET]:"Immutable",[WM.ETHEREUM]:"EthToken",[WM.SEPOLIA]:"EthToken"},mve={[WM.IMTBL_ZKEVM_DEVNET]:VM.IMTBL_ZKEVM_DEVNET,[WM.IMTBL_ZKEVM_MAINNET]:VM.IMTBL_ZKEVM_MAINNET,[WM.IMTBL_ZKEVM_TESTNET]:VM.IMTBL_ZKEVM_TESTNET,[WM.ETHEREUM]:VM.ETHEREUM,[WM.SEPOLIA]:VM.SEPOLIA},yve="IMTBL_WIDGET_PROVIDER_EVENT";var gve;function vve(e,t){e.provider.on(gve.CHAIN_CHANGED,t)}function bve(e,t){e.provider.removeListener(gve.CHAIN_CHANGED,t)}function wve(){window.dispatchEvent(new CustomEvent(yve))}function Eve(e){var t;t=wve,e.provider.removeListener(gve.ACCOUNTS_CHANGED,t),bve(e,wve),function(e,t){e.provider.on(gve.ACCOUNTS_CHANGED,t)}(e,wve),vve(e,wve)}function xve(e){const t=new CustomEvent(OM.IMTBL_WIDGETS_PROVIDER,{detail:{type:PM.PROVIDER_UPDATED,data:e}});console.log("provider updated event:",t),void 0!==window&&window.dispatchEvent(t)}function Tve(e){return!0===e?.provider?.isPassport}function Ave(e){return!0===e?.provider?.isMetaMask}function _ve(e){return!0===e?.provider?.isWalletConnect}function Cve(e,t){if(Ave(e))return QM.METAMASK.toString();if(Tve(e))return QM.PASSPORT.toString();if(_ve(e))return"walletconnect";if(t&&e){const n=t.find((t=>t.provider===e.provider));if(n)return n.info.name}return"Other"}function Ive(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 Sve(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:o}=await e.connect({provider:t,requestWalletPermissions:n});i=o,r=!0}catch(e){throw e.type===cD.USER_REJECTED_REQUEST_ERROR&&console.log("User rejected request"),console.error(e),e}return i}!function(e){e.CHAIN_CHANGED="chainChanged",e.ACCOUNTS_CHANGED="accountsChanged"}(gve||(gve={}));const kve={icon:'data:image/svg+xml,<svg viewBox="0 0 48 48" class="SvgIcon undefined Logo Logo--PassportSymbolOutlined css-1dn9atd" xmlns="http://www.w3.org/2000/svg"><g data-testid="undefined__g"><circle cx="24" cy="24" r="22.5" fill="url(%23paint0_radial_6324_83922)"></circle><circle cx="24" cy="24" r="22.5" fill="url(%23paint1_radial_6324_83922)"></circle><path d="M24 0C10.7452 0 0 10.7452 0 24C0 37.2548 10.7452 48 24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 0 24 0ZM23.0718 9.16608C23.7383 8.83951 24.4406 8.86188 25.087 9.2287C27.3282 10.5059 29.5627 11.7942 31.786 13.096C32.5018 13.5165 32.8686 14.1897 32.8708 15.0173C32.8843 17.9184 32.8798 20.8171 32.8708 23.7182C32.8708 23.8255 32.8015 23.9821 32.7143 24.0335C31.8531 24.548 30.9808 25.0423 30.0347 25.5881V25.1318C30.0347 22.148 30.0257 19.1664 30.0414 16.1827C30.0436 15.6101 29.8468 15.241 29.339 14.9525C26.7377 13.474 24.1499 11.9687 21.5575 10.4723C21.4457 10.4075 21.3361 10.3381 21.1661 10.2352C21.8326 9.85722 22.4321 9.47698 23.0673 9.16608H23.0718ZM22.5953 38.8451C22.45 38.7713 22.3426 38.7198 22.2375 38.6595C18.8041 36.68 15.3752 34.687 11.9307 32.7232C10.9644 32.173 10.5238 31.3879 10.5349 30.2852C10.5551 27.9411 10.5484 25.597 10.5372 23.2507C10.5327 22.1927 10.9622 21.4255 11.8926 20.8977C14.3105 19.5221 16.715 18.1264 19.1195 16.7284C19.3275 16.6076 19.4796 16.5875 19.6965 16.7172C20.5264 17.216 21.3719 17.6924 22.2554 18.2024C22.0876 18.3031 21.9601 18.3791 21.8304 18.4552C19.2268 19.9582 16.6278 21.4658 14.0175 22.9599C13.5903 23.2037 13.3912 23.5213 13.3957 24.0179C13.4091 25.8654 13.4114 27.713 13.3957 29.5605C13.3912 30.0705 13.5948 30.3948 14.0332 30.6453C16.7866 32.2199 19.5288 33.8125 22.28 35.3916C22.5126 35.5258 22.611 35.6645 22.6065 35.9418C22.5864 36.888 22.5998 37.8363 22.5998 38.8473L22.5953 38.8451ZM22.5953 33.553C22.356 33.4166 22.1838 33.3204 22.0116 33.2198C19.8285 31.9605 17.6477 30.6967 15.4602 29.4464C15.2231 29.3122 15.1359 29.1668 15.1381 28.8917C15.1538 27.4714 15.1471 26.0511 15.1426 24.6308C15.1426 24.4384 15.1717 24.3064 15.3618 24.1991C16.167 23.7495 16.9633 23.2798 17.7618 22.8212C17.8199 22.7877 17.8826 22.7631 17.9877 22.7116V24.3064C17.9877 25.1698 18.0011 26.0354 17.9832 26.8988C17.972 27.3909 18.1622 27.7241 18.5916 27.9657C19.8285 28.6636 21.0498 29.3883 22.2867 30.0839C22.5305 30.2203 22.6043 30.3724 22.5998 30.6408C22.5842 31.5847 22.5931 32.5308 22.5931 33.5508L22.5953 33.553ZM20.0746 14.91C19.6116 14.6371 19.2157 14.6393 18.7527 14.91C16.1581 16.4265 13.5523 17.9228 10.9487 19.4259C10.8391 19.4908 10.7251 19.5489 10.5305 19.6541C10.5998 18.6654 10.3873 17.7327 10.7251 16.8291C10.9085 16.3348 11.2529 15.9635 11.7092 15.6995C13.8811 14.4447 16.0507 13.1877 18.227 11.9396C19.0211 11.4833 19.8308 11.4945 20.6248 11.953C23.0964 13.3756 25.5657 14.8026 28.0306 16.2341C28.1357 16.2945 28.2677 16.4309 28.2677 16.5338C28.2856 17.5493 28.2788 18.567 28.2788 19.6563C27.3819 19.1396 26.5543 18.6609 25.7267 18.1823C23.8412 17.093 21.9512 16.0149 20.0746 14.91ZM37.4427 30.8779C37.3778 31.6764 36.9103 32.2423 36.2192 32.6404C33.5732 34.1614 30.9294 35.6913 28.2856 37.2168C27.4557 37.6954 26.6259 38.1741 25.7938 38.6527C25.6932 38.7109 25.5903 38.7601 25.4539 38.8317C25.4449 38.693 25.4337 38.5924 25.4337 38.4917C25.4337 37.6149 25.4382 36.7404 25.4293 35.8636C25.4293 35.6645 25.4762 35.5437 25.6596 35.4386C29.5157 33.2198 33.3696 30.9942 37.2212 28.7709C37.2794 28.7374 37.3443 28.7105 37.4539 28.6591C37.4539 29.4375 37.4986 30.1622 37.4427 30.8779ZM37.4628 25.3577C37.4561 26.2658 36.9663 26.9033 36.1901 27.3506C33.175 29.0841 30.1622 30.8265 27.1493 32.5666C26.5991 32.8842 26.0466 33.1996 25.4561 33.5396C25.4472 33.3897 25.436 33.2913 25.436 33.1907C25.436 32.3273 25.4449 31.4617 25.4293 30.5983C25.4248 30.3523 25.5075 30.2226 25.72 30.0995C28.46 28.5271 31.1911 26.9368 33.9355 25.3733C34.4231 25.096 34.6378 24.7538 34.6334 24.1812C34.6132 21.1974 34.6244 18.2136 34.6244 15.2298V14.7087C35.3402 15.1404 36.0112 15.496 36.624 15.9299C37.1832 16.3258 37.465 16.9253 37.4673 17.6164C37.4762 20.1976 37.4829 22.7788 37.465 25.3599L37.4628 25.3577Z" fill="%230D0D0D"></path><path fill-rule="evenodd" d="M24 0C10.7452 0 0 10.7452 0 24C0 37.2548 10.7452 48 24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 0 24 0ZM24 2C11.8497 2 2 11.8497 2 24C2 36.1503 11.8497 46 24 46C36.1503 46 46 36.1503 46 24C46 11.8497 36.1503 2 24 2Z" fill="url(%23paint2_radial_6324_83922)"></path><path fill-rule="evenodd" d="M24 0C10.7452 0 0 10.7452 0 24C0 37.2548 10.7452 48 24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 0 24 0ZM24 2C11.8497 2 2 11.8497 2 24C2 36.1503 11.8497 46 24 46C36.1503 46 46 36.1503 46 24C46 11.8497 36.1503 2 24 2Z" fill="url(%23paint3_radial_6324_83922)"></path><defs><radialGradient id="paint0_radial_6324_83922" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(13.4442 13.3899) rotate(44.9817) scale(46.7487 99.1435)"><stop stop-color="%23A3EEF8"></stop><stop offset="0.177083" stop-color="%23A4DCF5"></stop><stop offset="0.380208" stop-color="%23A6AEEC"></stop><stop offset="1" stop-color="%23ECBEE1"></stop></radialGradient><radialGradient id="paint1_radial_6324_83922" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(25.9515 43.7068) rotate(84.265) scale(24.2138 46.3215)"><stop stop-color="%23FCF5EE"></stop><stop offset="0.715135" stop-color="%23ECBEE1" stop-opacity="0"></stop></radialGradient><radialGradient id="paint2_radial_6324_83922" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(12.7405 12.6825) rotate(44.9817) scale(49.8653 105.753)"><stop stop-color="%23A3EEF8"></stop><stop offset="0.177083" stop-color="%23A4DCF5"></stop><stop offset="0.380208" stop-color="%23A6AEEC"></stop><stop offset="1" stop-color="%23ECBEE1"></stop></radialGradient><radialGradient id="paint3_radial_6324_83922" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(26.0816 45.0206) rotate(84.265) scale(25.828 49.4096)"><stop stop-color="%23FCF5EE"></stop><stop offset="0.715135" stop-color="%23ECBEE1" stop-opacity="0"></stop></radialGradient></defs></g></svg>',name:"Immutable Passport",rdns:"com.immutable.passport",uuid:"00000000-0000-0000-0000-000000000000"};function Ove(){const e=new Set;let t=[];const n=()=>function(e){if("undefined"==typeof window)return;const t=t=>e(t.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)}((n=>{t.some((({info:e})=>e.uuid===n.info.uuid))||(t=[...t,n],e.forEach((e=>e(t,{added:[n]}))))}));let r=n();return{_listeners:()=>e,clear(){e.forEach((e=>e([],{removed:[...t]}))),t=[]},destroy(){this.clear(),e.clear(),r?.()},findProvider:({rdns:e})=>t.find((t=>t.info.rdns===e)),getProviders:()=>t,reset(){this.clear(),r?.(),r=n()},subscribe:(n,{emitImmediately:r}={})=>(e.add(n),r&&n(t,{added:t}),()=>e.delete(n))}}class Pve{static instance;store;resetTimeout;isInit=!1;constructor(){this.store=Ove(),this.store.reset()}static getInstance(){return Pve.instance||(Pve.instance=new Pve),Pve.instance}getProviders(){return this.store.getProviders()}subscribe(e){return this.store.subscribe(e)}clear(){this.store.clear()}reset(){clearTimeout(this.resetTimeout),this.resetTimeout=setTimeout((()=>{this.store.reset()}),200)}initialise(){this.isInit||(this.isInit=!0,this.reset())}requestProviders(){window.dispatchEvent(new CustomEvent("eip6963:requestProvider"))}destroy(){this.store.destroy()}}const Rve={name:"Other",rdns:"walletconnect",icon:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDggNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGc+PHBhdGggZD0iTTEwLjQyMzYgMTQuODY4NkMxNy45NTA3IDcuNTIzNzcgMzAuMTY5NCA3LjUyMzc3IDM3LjY5NjQgMTQuODY4NkwzOC42MDI2IDE1Ljc1OTNDMzguOTgyNiAxNi4xMjQ0IDM4Ljk4MjYgMTYuNzIzMSAzOC42MDI2IDE3LjA4ODFMMzUuNTA0MSAyMC4xMTA4QzM1LjMxNDEgMjAuMzAwNiAzNS4wMDcxIDIwLjMwMDYgMzQuODE3MSAyMC4xMTA4TDMzLjU3NDggMTguODk4OEMyOC4zMTMyIDEzLjc3MzUgMTkuODA2OSAxMy43NzM1IDE0LjU0NTIgMTguODk4OEwxMy4yMTUyIDIwLjE5ODRDMTMuMDI1MiAyMC4zODgyIDEyLjcxODMgMjAuMzg4MiAxMi41MjgzIDIwLjE5ODRMOS40Mjk3OCAxNy4xNzU3QzkuMDQ5NzcgMTYuODEwNyA5LjA0OTc3IDE2LjIxMiA5LjQyOTc4IDE1Ljg0N0wxMC40MjM2IDE0Ljg2ODZaTTQ0LjExMjcgMjEuMTE4M0w0Ni44NzUgMjMuODA1MUM0Ny4yNTUgMjQuMTcwMSA0Ny4yNTUgMjQuNzY4OCA0Ni44NzUgMjUuMTMzOUwzNC40MzcxIDM3LjI2ODJDMzQuMDU3MSAzNy42MzMyIDMzLjQ0MzMgMzcuNjMzMiAzMy4wNzc5IDM3LjI2ODJMMjQuMjUgMjguNjUzQzI0LjE2MjMgMjguNTY1NCAyNC4wMDE2IDI4LjU2NTQgMjMuOTEzOSAyOC42NTNMMTUuMDg2IDM3LjI2ODJDMTQuNzA2IDM3LjYzMzIgMTQuMDkyMiAzNy42MzMyIDEzLjcyNjggMzcuMjY4MkwxLjI0NTAzIDI1LjEzMzlDMC44NjUwMiAyNC43Njg4IDAuODY1MDIgMjQuMTcwMSAxLjI0NTAzIDIzLjgwNTFMNC4wMDczOCAyMS4xMTgzQzQuMzg3MzkgMjAuNzUzMyA1LjAwMTI1IDIwLjc1MzMgNS4zNjY2NCAyMS4xMTgzTDE0LjE5NDUgMjkuNzMzNUMxNC4yODIyIDI5LjgyMTEgMTQuNDQyOSAyOS44MjExIDE0LjUzMDYgMjkuNzMzNUwyMy4zNTg1IDIxLjExODNDMjMuNzM4NSAyMC43NTMzIDI0LjM1MjMgMjAuNzUzMyAyNC43MTc3IDIxLjExODNMMzMuNTQ1NiAyOS43MzM1QzMzLjYzMzMgMjkuODIxMSAzMy43OTQgMjkuODIxMSAzMy44ODE3IDI5LjczMzVMNDIuNzA5NiAyMS4xMTgzQzQzLjExODggMjAuNzUzMyA0My43MzI3IDIwLjc1MzMgNDQuMTEyNyAyMS4xMTgzWiIgZmlsbD0iIzM2OEFGQSI+PC9wYXRoPjwvZz48L3N2Zz4=",uuid:"wallet-connect"};class Nve{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&&Eve(this.web3Provider),this.setupProviderUpdatedListener(),this.setupDisconnectProviderListener(),Pve.getInstance().initialise()}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=Vge(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&&zye.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(OM.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(OM.IMTBL_WIDGETS_PROVIDER,this.eventHandlersFunction)}removeListener(e){this.eventHandlers.delete(e),this.eventHandlersFunction&&(window.removeEventListener(this.eventTopic,this.eventHandlersFunction),window.removeEventListener(OM.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(OM.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(HM).includes(t)?t:rve),environment:lve(e?.environment),isOnRampEnabled:uve(!0,e?.isOnRampEnabled?.toString()),isSwapEnabled:uve(!0,e?.isSwapEnabled?.toString()),isBridgeEnabled:uve(!0,e?.isBridgeEnabled?.toString())};var e,t}setupProviderUpdatedListener(){window.addEventListener(OM.IMTBL_WIDGETS_PROVIDER,this.handleProviderUpdatedEvent);const e=this;window.addEventListener(yve,(()=>e.handleEIP1193ProviderEvents(e)))}setupDisconnectProviderListener(){window.addEventListener(OM.IMTBL_WALLET_WIDGET_EVENT,this.handleDisconnectEvent)}handleEIP1193ProviderEvents(e){e.web3Provider&&(e.web3Provider=new Jp(e.web3Provider.provider)),e.render()}handleProviderUpdatedEvent=e=>{const t=this;switch(e.detail.type){case PM.PROVIDER_UPDATED:{const n=e.detail.data;t.web3Provider=n.provider,this.render();break}}};handleDisconnectEvent=e=>{const t=this;if(e.detail.type===NM.DISCONNECT_WALLET)t.web3Provider=void 0,this.render()}}const Mve=rL.lazy((()=>Promise.resolve().then((function(){return sNe}))));class Dve extends Nve{eventTopic=OM.IMTBL_CONNECT_WIDGET_EVENT;getValidatedProperties({config:e}){return{config:e}}getValidatedParameters(e){const t=e;return!e.targetChainId&&this.checkout.config.isProduction?t.targetChainId=WM.IMTBL_ZKEVM_MAINNET:e.targetChainId&&this.checkout.config.isProduction&&e.targetChainId!==WM.ETHEREUM&&e.targetChainId!==WM.IMTBL_ZKEVM_MAINNET&&(console.warn(`Cannot set targetChainId to ${e.targetChainId} in ${qt.PRODUCTION} environment, defaulting to ${eye(WM.IMTBL_ZKEVM_MAINNET)}, chainId ${WM.IMTBL_ZKEVM_MAINNET}`),t.targetChainId=WM.IMTBL_ZKEVM_MAINNET),e.targetChainId||this.checkout.config.environment!==qt.SANDBOX?e.targetChainId&&this.checkout.config.environment===qt.SANDBOX&&e.targetChainId!==WM.SEPOLIA&&e.targetChainId!==WM.IMTBL_ZKEVM_TESTNET&&(console.warn(`Cannot set targetChainId to ${e.targetChainId} in ${qt.SANDBOX} environment, defaulting to ${eye(WM.IMTBL_ZKEVM_TESTNET)}, chainId ${WM.IMTBL_ZKEVM_TESTNET}`),t.targetChainId=WM.IMTBL_ZKEVM_TESTNET):t.targetChainId=WM.IMTBL_ZKEVM_TESTNET,e}render(){if(!this.reactRoot)return;const{t:e}=zye;this.reactRoot.render(vB(rL.StrictMode,{children:vB(Jme,{checkout:this.checkout,children:vB(gle,{id:"connect-container",config:this.strongConfig(),children:vB(nL.Suspense,{fallback:vB($me,{loadingText:e("views.LOADING_VIEW.text")}),children:vB(Mve,{config:this.strongConfig(),checkout:this.checkout,targetChainId:this.parameters.targetChainId})})})})}))}}const Lve={width:"100%",display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",padding:"base.spacing.x4",paddingBottom:"base.spacing.x10"},Fve={maxHeight:"base.spacing.x20",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",paddingTop:"base.spacing.x4",paddingBottom:"base.spacing.x5"},Bve={width:"base.icon.size.400"},Uve={display:"flex",flexDirection:"column",paddingX:"base.spacing.x4",paddingBottom:"base.spacing.x4"},zve={display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"base.spacing.x2",color:"base.color.text.body.primary"},jve={display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",color:"base.color.text.body.secondary"};function Hve({actionText:e,onActionClick:t,hideActionButton:n=!1,loading:r=!1,variant:i="secondary"}){return vB(tJ,{testId:"footer-button-container",sx:Lve,children:!n&&vB(ZZ,{testId:"footer-button",size:"large",sx:{width:"100%"},variant:i,disabled:r,onClick:t,children:r?vB(ZZ.Icon,{icon:"Loading",sx:Bve}):e})})}const Wve=e=>({backgroundColor:e?"transparent":""}),Vve=(e=!1)=>({backgroundColor:e?"base.color.translucent.standard.200":""});var Gve;!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"}(Gve||(Gve={}));const qve={view:{type:Gve.LOADING_VIEW},history:[]};var Kve;!function(e){e.UPDATE_VIEW="UPDATE_VIEW",e.GO_BACK="GO_BACK",e.GO_BACK_TO="GO_BACK_TO"}(Kve||(Kve={}));const Xve=nL.createContext({viewState:qve,viewDispatch:()=>{}});Xve.displayName="ViewContext";const Yve=(e,t)=>{switch(t.payload.type){case Kve.UPDATE_VIEW:{const{view:n,currentViewData:r}=t.payload;n.type===Gve.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 Kve.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 Kve.GO_BACK_TO:{if(e.history.length<=1)return{...e};const{history:n}=e,r=[...n];let i=!1;for(let o=n.length-1;o>=0;o--){if(e.history[o].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 Zve({title:e,showBack:t=!1,transparent:n=!1,onBackButtonClick:r,onCloseButtonClick:i,rightActions:o}){const{viewDispatch:a}=nL.useContext(Xve);return bB(O2,{testId:"header-navigation-container",sx:Wve(n),contentAlign:t?"center":"left",size:"small",children:[t&&vB(O2.LeftButtCon,{sx:Vve(n),icon:"ArrowBackward",iconVariant:"bold",onClick:()=>{r?r():(async()=>{a({payload:{type:Kve.GO_BACK}})})()},testId:"back-button"}),vB(O2.Title,{testId:"header-title",size:"small",children:e}),bB(O2.RightSlot,{children:[o,i&&vB(vJ,{iconVariant:"bold",sx:Vve(n),icon:"Close",onClick:i,testId:"close-button"})]})]})}const Jve={position:"absolute",top:"0",left:"0",height:"100%",width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},Qve={justifyContent:"flex-end"},$ve={position:"relative",height:"305px",width:"100%"};function ebe(){return bB(tJ,{sx:$ve,children:[bB("svg",{width:"430",height:"306",viewBox:"0 0 430 306",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[vB("rect",{x:"-1",y:"0.978516",width:"446",height:"305",fill:"url(#paint0_linear_3034_48563)"}),vB("defs",{children:bB("linearGradient",{id:"paint0_linear_3034_48563",x1:"222",y1:"0.978516",x2:"222",y2:"305.979",gradientUnits:"userSpaceOnUse",children:[vB("stop",{stopColor:"#01003F",stopOpacity:"0"}),vB("stop",{offset:"1",stopColor:"#6B4292",stopOpacity:"0.432292"})]})})]}),vB(tJ,{sx:Jve,children:bB("svg",{width:"174",height:"180",viewBox:"0 0 174 180",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[vB("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"}),vB("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"}),vB("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)"}),vB("g",{filter:"url(#filter0_d_2795_41752)",children:vB("circle",{cx:"118.481",cy:"67.6248",r:"2.23855",transform:"rotate(54.7665 118.481 67.6248)",fill:"#D0D2E2"})}),vB("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"}),vB("line",{x1:"63.724",y1:"50.8925",x2:"41.1729",y2:"66.8203",stroke:"#1E182A",strokeWidth:"0.525916"}),vB("line",{x1:"67.0235",y1:"79.3011",x2:"38.1813",y2:"38.4654",stroke:"#1E182A",strokeWidth:"0.525916"}),vB("line",{x1:"55.9759",y1:"39.9228",x2:"33.4249",y2:"55.8506",stroke:"#1E182A",strokeWidth:"0.525916"}),vB("line",{x1:"71.0423",y1:"61.2538",x2:"48.4913",y2:"77.1816",stroke:"#1E182A",strokeWidth:"0.525916"}),vB("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)"}),vB("line",{x1:"115.384",y1:"124.032",x2:"92.8331",y2:"139.96",stroke:"#1E182A",strokeWidth:"0.525916"}),vB("line",{x1:"118.684",y1:"152.44",x2:"89.8414",y2:"111.604",stroke:"#1E182A",strokeWidth:"0.525916"}),vB("line",{x1:"107.632",y1:"113.06",x2:"85.0811",y2:"128.988",stroke:"#1E182A",strokeWidth:"0.525916"}),vB("line",{x1:"122.702",y1:"134.393",x2:"100.151",y2:"150.321",stroke:"#1E182A",strokeWidth:"0.525916"}),vB("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)"}),vB("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)"}),bB("defs",{children:[bB("filter",{id:"filter0_d_2795_41752",x:"114.664",y:"63.808",width:"7.63206",height:"7.63303",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[vB("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),vB("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"}),vB("feMorphology",{radius:"0.525916",operator:"dilate",in:"SourceAlpha",result:"effect1_dropShadow_2795_41752"}),vB("feOffset",{}),vB("feGaussianBlur",{stdDeviation:"0.525916"}),vB("feComposite",{in2:"hardAlpha",operator:"out"}),vB("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"}),vB("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2795_41752"}),vB("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2795_41752",result:"shape"})]}),bB("linearGradient",{id:"paint0_linear_2795_41752",x1:"53.8443",y1:"29.4462",x2:"98.6153",y2:"58.1742",gradientUnits:"userSpaceOnUse",children:[vB("stop",{stopColor:"#8395E5",stopOpacity:"0.44"}),vB("stop",{offset:"0.526042",stopColor:"#989AD1",stopOpacity:"0.734583"}),vB("stop",{offset:"1",stopColor:"#2D203D"})]}),bB("linearGradient",{id:"paint1_linear_2795_41752",x1:"105.502",y1:"102.585",x2:"150.273",y2:"131.313",gradientUnits:"userSpaceOnUse",children:[vB("stop",{stopColor:"#8395E5",stopOpacity:"0.44"}),vB("stop",{offset:"0.526042",stopColor:"#989AD1",stopOpacity:"0.734583"}),vB("stop",{offset:"1",stopColor:"#2D203D"})]}),bB("linearGradient",{id:"paint2_linear_2795_41752",x1:"88.8945",y1:"89.2396",x2:"42.7826",y2:"120.454",gradientUnits:"userSpaceOnUse",children:[vB("stop",{stopColor:"#7676A3"}),vB("stop",{offset:"1",stopColor:"#EDEFF5"})]}),bB("linearGradient",{id:"paint3_linear_2795_41752",x1:"112.599",y1:"72.2342",x2:"91.9662",y2:"86.3506",gradientUnits:"userSpaceOnUse",children:[vB("stop",{stopColor:"#DEDFEB"}),vB("stop",{offset:"0.916667",stopColor:"#656997"})]})]})]})})]})}const tbe={paddingX:"base.spacing.x4",paddingTop:"base.spacing.x10"},nbe={marginTop:"base.spacing.x3"},rbe={color:"base.color.text.body.secondary"};function ibe(e){const{heading:t,children:n}=e;return bB(tJ,{sx:tbe,children:[vB(s$,{testId:"simple-text-body__heading",size:"small",children:t}),vB(tJ,{sx:nbe,children:vB(_Q,{testId:"simple-text-body__body",size:"small",sx:rbe,children:n})})]})}function obe({actionText:e,onActionClick:t,errorEventAction:n,errorEventActionLoading:r=!1,onCloseClick:i}){const{t:o}=Hge();"function"==typeof n&&n();return vB(Qme,{header:vB(Zve,{transparent:!0,onCloseButtonClick:i}),footer:vB(Hve,{loading:r,actionText:e,onActionClick:()=>"function"==typeof t&&t()}),heroContent:vB(ebe,{}),floatHeader:!0,testId:"error-view",children:bB(ibe,{heading:o("views.ERROR_VIEW.heading"),children:[o("views.ERROR_VIEW.body",{returnObjects:!0})[0]," ",vB(r2,{size:"small",rc:vB("a",{href:"https://support.immutable.com/en/"}),children:o("views.ERROR_VIEW.body",{returnObjects:!0})[1]})," ",o("views.ERROR_VIEW.body",{returnObjects:!0})[2]]})})}var abe;!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"}(abe||(abe={}));const sbe={connectionStatus:abe.LOADING,checkout:void 0,provider:void 0};var cbe;!function(e){e.UPDATE_CONNECTION_STATUS="UPDATE_CONNECTION_STATUS",e.SET_CHECKOUT="SET_CHECKOUT",e.SET_PROVIDER="SET_PROVIDER"}(cbe||(cbe={}));const lbe=nL.createContext({connectLoaderState:sbe,connectLoaderDispatch:()=>{}}),ube=(e,t)=>{switch(t.payload.type){case cbe.UPDATE_CONNECTION_STATUS:return{...e,connectionStatus:t.payload.connectionStatus,deepLink:t.payload.deepLink};case cbe.SET_CHECKOUT:return{...e,checkout:t.payload.checkout};case cbe.SET_PROVIDER:return{...e,provider:t.payload.provider};default:return e}},dbe=(e,t,n)=>e.chainId===fve(n)?-1:e.chainId===dve(n)?0:1,fbe=e=>(Math.round(100*e)/100).toFixed(2),hbe=(e,t,n)=>{const r="0.00";if(!e)return r;const i=n.get(t.toLowerCase());if(!i)return r;const o=parseFloat(e);return 0===parseFloat(e)||Number.isNaN(o)?r:fbe(o*i)},pbe=(e,t=!1)=>{const n="-.--";return e&&("0.00"!==e||t)?e:n},mbe=(e,t)=>{const n=e.indexOf(".");return parseFloat(e.substring(0,n+t+1)).toFixed(t)},ybe=(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=mbe(n,e);if(0===parseFloat(r))for(;"0"===(r[r.length-1]||"")&&e<t&&(e+=1,r=mbe(n,e),"0"===(r[r.length-1]||"")););return r}let r=mbe(n,2);return r.endsWith(".00")&&(r=mbe(r,0)),r},gbe=e=>e===WM.IMTBL_ZKEVM_DEVNET||e===WM.IMTBL_ZKEVM_TESTNET||e===WM.IMTBL_ZKEVM_MAINNET,vbe=e=>e===WM.SEPOLIA||e===WM.ETHEREUM,bbe=e=>!e||e.toLocaleLowerCase()===Kge;function wbe(e,t){return`${ove[e??qt.PRODUCTION]}/v1/blob/img${t}`}function Ebe(e){return wbe(e,"/tokens/eth.svg")}function xbe(e){return wbe(e,"/tokens/imx.svg")}function Tbe(e,t){return wbe(e,`/tokens/${t.toLowerCase()}.svg`)}function Abe(e,t){return t===HM.LIGHT?wbe(e,"/tokens/defaultonlight.svg"):wbe(e,"/tokens/defaultondark.svg")}const _be={checkout:null,provider:null,passport:void 0,walletProviderName:null,sendCloseEvent:()=>{}};var Cbe;!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"}(Cbe||(Cbe={}));const Ibe=nL.createContext({connectState:_be,connectDispatch:()=>{}});Ibe.displayName="ConnectContext";const Sbe=(e,t)=>{switch(t.payload.type){case Cbe.SET_CHECKOUT:return{...e,checkout:t.payload.checkout};case Cbe.SET_PROVIDER:return{...e,provider:t.payload.provider};case Cbe.SET_PASSPORT:return{...e,passport:t.payload.passport};case Cbe.SET_WALLET_PROVIDER_NAME:return{...e,walletProviderName:t.payload.walletProviderName};case Cbe.SET_SEND_CLOSE_EVENT:return{...e,sendCloseEvent:t.payload.sendCloseEvent};default:return e}};var kbe;function Obe({hideLogo:e}){return vB(tJ,{testId:"footer-logo-container",sx:Fve,children:!e&&vB(fZ,{testId:"footer-logo-image",logo:"ImmutableHorizontalLockup",sx:{width:"base.spacing.x25"}})})}!function(e){e.CONNECT_WALLET="CONNECT_WALLET",e.READY_TO_CONNECT="READY_TO_CONNECT",e.PASSPORT="PASSPORT",e.SWITCH_NETWORK="SWITCH_NETWORK",e.SUCCESS="SUCCESS"}(kbe||(kbe={}));const Pbe={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"},Rbe={width:"auto",height:"100%",objectFit:"contain",objectPosition:"50% 50%"};function Nbe({src:e,alt:t,sx:n={},...r}){return vB(tJ,{className:"FramedImage AspectRatioImage",sx:{...Pbe,...n},rc:vB("span",{}),...r,children:vB("img",{src:e,alt:t,className:"CloudImage",style:CX(Rbe),loading:"lazy"})})}function Mbe({rc:e=vB("span",{}),...t}){const{t:n}=Hge(),{providerDetail:r,onWalletClick:i}=t,o=Ive(r.info.rdns),a=o===QM.PASSPORT,s=a||o===QM.METAMASK,c={marginLeft:"65px"};return bB(U1,{rc:e,testId:`wallet-list-${r.info.rdns}`,size:"medium",emphasized:!0,onClick:()=>i(r),sx:{marginBottom:"base.spacing.x1",position:"relative"},children:[vB(Nbe,{src:r.info.icon,alt:r.info.name,sx:{position:"absolute",left:"base.spacing.x3"}}),vB(U1.Label,{size:"medium",sx:c,children:r.info.name}),vB(U1.IntentIcon,{sx:c}),bB(U1.Caption,{sx:c,children:[a?vB(tJ,{rc:vB("span",{}),sx:{c:"base.gradient.1"},children:s?n(`wallets.${o}.accentText`):r.info.name}):null," ",s&&n(`wallets.${o}.description`)]})]})}const Dbe=Symbol(),Lbe=Object.getPrototypeOf,Fbe=new WeakMap,Bbe=e=>(e=>e&&(Fbe.has(e)?Fbe.get(e):Lbe(e)===Object.prototype||Lbe(e)===Array.prototype))(e)&&e[Dbe]||null,Ube=(e,t=!0)=>{Fbe.set(e,t)},zbe=e=>"object"==typeof e&&null!==e,jbe=new WeakMap,Hbe=new WeakSet,[Wbe]=((e=Object.is,t=((e,t)=>new Proxy(e,t)),n=(e=>zbe(e)&&!Hbe.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,o=((e,t,n=r)=>{const a=i.get(e);if((null==a?void 0:a[0])===t)return a[1];const s=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return Ube(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(Hbe.has(r))Ube(r,!1);else if(r instanceof Promise)delete i.value,i.get=()=>n(r);else if(jbe.has(r)){const[e,t]=jbe.get(r);i.value=o(e,t(),n)}Object.defineProperty(s,t,i)})),Object.preventExtensions(s)}),a=new WeakMap,s=[1,1],c=(r=>{if(!zbe(r))throw new Error("object required");const i=a.get(r);if(i)return i;let l=s[0];const u=new Set,d=(e,t=++s[0])=>{l!==t&&(l=t,u.forEach((n=>n(e,t))))};let f=s[1];const h=e=>(t,n)=>{const r=[...t];r[1]=[e,...r[1]],d(r,n)},p=new Map,m=e=>{var t;const n=p.get(e);n&&(p.delete(e),null==(t=n[1])||t.call(n))},y=Array.isArray(r)?[]:Object.create(Object.getPrototypeOf(r)),g={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,o){const s=Reflect.has(t,r),l=Reflect.get(t,r,o);if(s&&(e(l,i)||a.has(i)&&e(l,a.get(i))))return!0;m(r),zbe(i)&&(i=Bbe(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{!jbe.has(i)&&n(i)&&(f=c(i));const e=!Hbe.has(f)&&jbe.get(f);e&&((e,t)=>{if(p.has(e))throw new Error("prop listener already exists");if(u.size){const n=t[3](h(e));p.set(e,[t,n])}else p.set(e,[t])})(r,e)}return Reflect.set(t,r,f,o),d(["set",[r],i,l]),!0}},v=t(y,g);a.set(r,v);const b=[y,(e=++s[1])=>(f===e||u.size||(f=e,p.forEach((([t])=>{const n=t[1](e);n>l&&(l=n)}))),l),o,e=>{u.add(e),1===u.size&&p.forEach((([e,t],n)=>{if(t)throw new Error("remove already exists");const r=e[3](h(n));p.set(n,[e,r])}));return()=>{u.delete(e),0===u.size&&p.forEach((([e,t],n)=>{t&&(t(),p.set(n,[e]))}))}}];return jbe.set(v,b),Reflect.ownKeys(r).forEach((e=>{const t=Object.getOwnPropertyDescriptor(r,e);"value"in t&&(v[e]=r[e],delete t.value,delete t.writable),Object.defineProperty(y,e,t)})),v}))=>[c,jbe,Hbe,e,t,n,r,i,o,a,s])();function Vbe(e={}){return Wbe(e)}function Gbe(e,t,n){const r=jbe.get(e);let i;r||console.warn("Please use proxy object");const o=[],a=r[3];let s=!1;const c=a((e=>{o.push(e),n?t(o.splice(0)):i||(i=Promise.resolve().then((()=>{i=void 0,s&&t(o.splice(0))})))}));return s=!0,()=>{s=!1,c()}}const qbe=Vbe({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),Kbe={state:qbe,subscribe:e=>Gbe(qbe,(()=>e(qbe))),push(e,t){e!==qbe.view&&(qbe.view=e,t&&(qbe.data=t),qbe.history.push(e))},reset(e){qbe.view=e,qbe.history=[e]},replace(e){qbe.history.length>1&&(qbe.history[qbe.history.length-1]=e,qbe.view=e)},goBack(){if(qbe.history.length>1){qbe.history.pop();const[e]=qbe.history.slice(-1);qbe.view=e}},setData(e){qbe.data=e}},Xbe={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:()=>Xbe.isMobile()&&navigator.userAgent.toLowerCase().includes("android"),isIos(){const e=navigator.userAgent.toLowerCase();return Xbe.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(Xbe.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(!Xbe.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(Xbe.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(Xbe.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(Xbe.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(Xbe.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=null==(e=Kbe.state.data)?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},Ybe=Vbe({enabled:typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),userSessionId:"",events:[],connectedWalletId:void 0}),Zbe={state:Ybe,subscribe:e=>Gbe(Ybe.events,(()=>e(function(e,t){const n=jbe.get(e);n||console.warn("Please use proxy object");const[r,i,o]=n;return o(r,i(),t)}(Ybe.events[Ybe.events.length-1])))),initialize(){Ybe.enabled&&typeof(null==crypto?void 0:crypto.randomUUID)<"u"&&(Ybe.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){Ybe.connectedWalletId=e},click(e){if(Ybe.enabled){const t={type:"CLICK",name:e.name,userSessionId:Ybe.userSessionId,timestamp:Date.now(),data:e};Ybe.events.push(t)}},track(e){if(Ybe.enabled){const t={type:"TRACK",name:e.name,userSessionId:Ybe.userSessionId,timestamp:Date.now(),data:e};Ybe.events.push(t)}},view(e){if(Ybe.enabled){const t={type:"VIEW",name:e.name,userSessionId:Ybe.userSessionId,timestamp:Date.now(),data:e};Ybe.events.push(t)}}},Jbe=Vbe({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),Qbe={state:Jbe,subscribe:e=>Gbe(Jbe,(()=>e(Jbe))),setChains(e){Jbe.chains=e},setWalletConnectUri(e){Jbe.walletConnectUri=e},setIsCustomDesktop(e){Jbe.isCustomDesktop=e},setIsCustomMobile(e){Jbe.isCustomMobile=e},setIsDataLoaded(e){Jbe.isDataLoaded=e},setIsUiLoaded(e){Jbe.isUiLoaded=e},setIsAuth(e){Jbe.isAuth=e}},$be=Vbe({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}),ewe={state:$be,subscribe:e=>Gbe($be,(()=>e($be))),setConfig(e){var t,n;Zbe.initialize(),Qbe.setChains(e.chains),Qbe.setIsAuth(Boolean(e.enableAuthMode)),Qbe.setIsCustomMobile(Boolean(null==(t=e.mobileWallets)?void 0:t.length)),Qbe.setIsCustomDesktop(Boolean(null==(n=e.desktopWallets)?void 0:n.length)),Xbe.setModalVersionInStorage(),Object.assign($be,e)}};var twe=Object.defineProperty,nwe=Object.getOwnPropertySymbols,rwe=Object.prototype.hasOwnProperty,iwe=Object.prototype.propertyIsEnumerable,owe=(e,t,n)=>t in e?twe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const awe="https://explorer-api.walletconnect.com",swe="wcm",cwe="js-2.6.2";async function lwe(e,t){const n=((e,t)=>{for(var n in t||(t={}))rwe.call(t,n)&&owe(e,n,t[n]);if(nwe)for(var n of nwe(t))iwe.call(t,n)&&owe(e,n,t[n]);return e})({sdkType:swe,sdkVersion:cwe},t),r=new URL(e,awe);return r.searchParams.append("projectId",ewe.state.projectId),Object.entries(n).forEach((([e,t])=>{t&&r.searchParams.append(e,String(t))})),(await fetch(r)).json()}const uwe={getDesktopListings:async e=>lwe("/w3m/v1/getDesktopListings",e),getMobileListings:async e=>lwe("/w3m/v1/getMobileListings",e),getInjectedListings:async e=>lwe("/w3m/v1/getInjectedListings",e),getAllListings:async e=>lwe("/w3m/v1/getAllListings",e),getWalletImageUrl:e=>`${awe}/w3m/v1/getWalletImage/${e}?projectId=${ewe.state.projectId}&sdkType=${swe}&sdkVersion=${cwe}`,getAssetImageUrl:e=>`${awe}/w3m/v1/getAssetImage/${e}?projectId=${ewe.state.projectId}&sdkType=${swe}&sdkVersion=${cwe}`};var dwe=Object.defineProperty,fwe=Object.getOwnPropertySymbols,hwe=Object.prototype.hasOwnProperty,pwe=Object.prototype.propertyIsEnumerable,mwe=(e,t,n)=>t in e?dwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const ywe=Xbe.isMobile(),gwe=Vbe({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),vwe={state:gwe,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=ewe.state;if("NONE"===e||"ALL"===t&&!e)return gwe.recomendedWallets;if(Xbe.isArray(e)){const t={recommendedIds:e.join(",")},{listings:n}=await uwe.getAllListings(t),r=Object.values(n);r.sort(((t,n)=>e.indexOf(t.id)-e.indexOf(n.id))),gwe.recomendedWallets=r}else{const{chains:e,isAuth:n}=Qbe.state,r=e?.join(","),i=Xbe.isArray(t),o={page:1,sdks:n?"auth_v1":void 0,entries:Xbe.RECOMMENDED_WALLET_AMOUNT,chains:r,version:2,excludedIds:i?t.join(","):void 0},{listings:a}=ywe?await uwe.getMobileListings(o):await uwe.getDesktopListings(o);gwe.recomendedWallets=Object.values(a)}return gwe.recomendedWallets},async getWallets(e){const t=((e,t)=>{for(var n in t||(t={}))hwe.call(t,n)&&mwe(e,n,t[n]);if(fwe)for(var n of fwe(t))pwe.call(t,n)&&mwe(e,n,t[n]);return e})({},e),{explorerRecommendedWalletIds:n,explorerExcludedWalletIds:r}=ewe.state,{recomendedWallets:i}=gwe;if("ALL"===r)return gwe.wallets;i.length?t.excludedIds=i.map((e=>e.id)).join(","):Xbe.isArray(n)&&(t.excludedIds=n.join(",")),Xbe.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),Qbe.state.isAuth&&(t.sdks="auth_v1");const{page:o,search:a}=e,{listings:s,total:c}=ywe?await uwe.getMobileListings(t):await uwe.getDesktopListings(t),l=Object.values(s),u=a?"search":"wallets";return gwe[u]={listings:[...gwe[u].listings,...l],total:c,page:o??1},{listings:l,total:c}},getWalletImageUrl:e=>uwe.getWalletImageUrl(e),getAssetImageUrl:e=>uwe.getAssetImageUrl(e),resetSearch(){gwe.search={listings:[],total:0,page:1}}},bwe=Vbe({open:!1}),wwe={state:bwe,subscribe:e=>Gbe(bwe,(()=>e(bwe))),open:async e=>new Promise((t=>{const{isUiLoaded:n,isDataLoaded:r}=Qbe.state;if(Xbe.removeWalletConnectDeepLink(),Qbe.setWalletConnectUri(e?.uri),Qbe.setChains(e?.chains),Kbe.reset("ConnectWallet"),n&&r)bwe.open=!0,t();else{const e=setInterval((()=>{const n=Qbe.state;n.isUiLoaded&&n.isDataLoaded&&(clearInterval(e),bwe.open=!0,t())}),200)}})),close(){bwe.open=!1}};var Ewe=Object.defineProperty,xwe=Object.getOwnPropertySymbols,Twe=Object.prototype.hasOwnProperty,Awe=Object.prototype.propertyIsEnumerable,_we=(e,t,n)=>t in e?Ewe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const Cwe=Vbe({themeMode:typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}),Iwe={state:Cwe,subscribe:e=>Gbe(Cwe,(()=>e(Cwe))),setThemeConfig(e){const{themeMode:t,themeVariables:n}=e;t&&(Cwe.themeMode=t),n&&(Cwe.themeVariables=((e,t)=>{for(var n in t||(t={}))Twe.call(t,n)&&_we(e,n,t[n]);if(xwe)for(var n of xwe(t))Awe.call(t,n)&&_we(e,n,t[n]);return e})({},n))}},Swe=Vbe({open:!1,message:"",variant:"success"}),kwe={state:Swe,subscribe:e=>Gbe(Swe,(()=>e(Swe))),openToast(e,t){Swe.open=!0,Swe.message=e,Swe.variant=t},closeToast(){Swe.open=!1}};let Owe=class{constructor(e){this.openModal=wwe.open,this.closeModal=wwe.close,this.subscribeModal=wwe.subscribe,this.setTheme=Iwe.setThemeConfig,Iwe.setThemeConfig(e),ewe.setConfig(e),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then((function(){return oVe}));const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),Qbe.setIsUiLoaded(!0)}}};var Pwe=Object.freeze({__proto__:null,WalletConnectModal:Owe});function Rwe(){}function Nwe(){Nwe.init.call(this)}function Mwe(e){return void 0===e._maxListeners?Nwe.defaultMaxListeners:e._maxListeners}function Dwe(e,t,n,r){var i,o,a;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((o=e._events)?(o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]):(o=e._events=new Rwe,e._eventsCount=0),a){if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),!a.warned&&(i=Mwe(e))&&i>0&&a.length>i){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(s)}}else a=o[t]=n,++e._eventsCount;return e}function Lwe(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 Fwe(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 Bwe(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}Rwe.prototype=Object.create(null),Nwe.EventEmitter=Nwe,Nwe.usingDomains=!1,Nwe.prototype.domain=void 0,Nwe.prototype._events=void 0,Nwe.prototype._maxListeners=void 0,Nwe.defaultMaxListeners=10,Nwe.init=function(){this.domain=null,Nwe.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Rwe,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Nwe.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},Nwe.prototype.getMaxListeners=function(){return Mwe(this)},Nwe.prototype.emit=function(e){var t,n,r,i,o,a,s,c="error"===e;if(a=this._events)c=c&&null==a.error;else if(!c)return!1;if(s=this.domain,c){if(t=arguments[1],!s){if(t instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(n=a[e]))return!1;var u="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=Bwe(e,r),o=0;o<r;++o)i[o].call(n)}(n,u,this);break;case 2:!function(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,o=Bwe(e,i),a=0;a<i;++a)o[a].call(n,r)}(n,u,this,arguments[1]);break;case 3:!function(e,t,n,r,i){if(t)e.call(n,r,i);else for(var o=e.length,a=Bwe(e,o),s=0;s<o;++s)a[s].call(n,r,i)}(n,u,this,arguments[1],arguments[2]);break;case 4:!function(e,t,n,r,i,o){if(t)e.call(n,r,i,o);else for(var a=e.length,s=Bwe(e,a),c=0;c<a;++c)s[c].call(n,r,i,o)}(n,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];!function(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,o=Bwe(e,i),a=0;a<i;++a)o[a].apply(n,r)}(n,u,this,i)}return!0},Nwe.prototype.addListener=function(e,t){return Dwe(this,e,t,!1)},Nwe.prototype.on=Nwe.prototype.addListener,Nwe.prototype.prependListener=function(e,t){return Dwe(this,e,t,!0)},Nwe.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,Lwe(this,e,t)),this},Nwe.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,Lwe(this,e,t)),this},Nwe.prototype.removeListener=function(e,t){var n,r,i,o,a;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[e]))return this;if(n===t||n.listener&&n.listener===t)0==--this._eventsCount?this._events=new Rwe:(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new Rwe,this;delete r[e]}else!function(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}(n,i);r.removeListener&&this.emit("removeListener",e,a||t)}return this},Nwe.prototype.off=function(e,t){return this.removeListener(e,t)},Nwe.prototype.removeAllListeners=function(e){var t,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new Rwe,this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=new Rwe:delete n[e]),this;if(0===arguments.length){for(var r,i=Object.keys(n),o=0;o<i.length;++o)"removeListener"!==(r=i[o])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new Rwe,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},Nwe.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},Nwe.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Fwe.call(e,t)},Nwe.prototype.listenerCount=Fwe,Nwe.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var Uwe=Object.freeze({__proto__:null,EventEmitter:Nwe,default:Nwe}),zwe={},jwe={},Hwe={},Wwe={};!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}}(Wwe),Object.defineProperty(Hwe,"__esModule",{value:!0});var Vwe=Wwe;function Gwe(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 qwe(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 Kwe(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function Xwe(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function Ywe(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function Zwe(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function Jwe(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 Qwe(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 $we(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),Jwe(e/4294967296>>>0,t,n),Jwe(e>>>0,t,n+4),t}function eEe(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),Qwe(e>>>0,t,n),Qwe(e/4294967296>>>0,t,n+4),t}Hwe.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},Hwe.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},Hwe.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},Hwe.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},Hwe.writeUint16BE=Gwe,Hwe.writeInt16BE=Gwe,Hwe.writeUint16LE=qwe,Hwe.writeInt16LE=qwe,Hwe.readInt32BE=Kwe,Hwe.readUint32BE=Xwe,Hwe.readInt32LE=Ywe,Hwe.readUint32LE=Zwe,Hwe.writeUint32BE=Jwe,Hwe.writeInt32BE=Jwe,Hwe.writeUint32LE=Qwe,Hwe.writeInt32LE=Qwe,Hwe.readInt64BE=function(e,t){void 0===t&&(t=0);var n=Kwe(e,t),r=Kwe(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},Hwe.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*Xwe(e,t)+Xwe(e,t+4)},Hwe.readInt64LE=function(e,t){void 0===t&&(t=0);var n=Ywe(e,t);return 4294967296*Ywe(e,t+4)+n-4294967296*(n>>31)},Hwe.readUint64LE=function(e,t){void 0===t&&(t=0);var n=Zwe(e,t);return 4294967296*Zwe(e,t+4)+n},Hwe.writeUint64BE=$we,Hwe.writeInt64BE=$we,Hwe.writeUint64LE=eEe,Hwe.writeInt64LE=eEe,Hwe.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,o=e/8+n-1;o>=n;o--)r+=t[o]*i,i*=256;return r},Hwe.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,o=n;o<n+e/8;o++)r+=t[o]*i,i*=256;return r},Hwe.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(!Vwe.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var i=1,o=e/8+r-1;o>=r;o--)n[o]=t/i&255,i*=256;return n},Hwe.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(!Vwe.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,o=r;o<r+e/8;o++)n[o]=t/i&255,i*=256;return n},Hwe.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},Hwe.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},Hwe.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},Hwe.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},Hwe.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},Hwe.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},Hwe.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},Hwe.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 tEe={};Object.defineProperty(tEe,"__esModule",{value:!0}),tEe.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e},Object.defineProperty(jwe,"__esModule",{value:!0});var nEe=Hwe,rEe=tEe,iEe=20;function oEe(e,t,n){for(var r=1634760805,i=857760878,o=2036477234,a=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],l=n[11]<<24|n[10]<<16|n[9]<<8|n[8],u=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],h=n[27]<<24|n[26]<<16|n[25]<<8|n[24],p=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],g=t[11]<<24|t[10]<<16|t[9]<<8|t[8],v=t[15]<<24|t[14]<<16|t[13]<<8|t[12],b=r,w=i,E=o,x=a,T=s,A=c,_=l,C=u,I=d,S=f,k=h,O=p,P=m,R=y,N=g,M=v,D=0;D<iEe;D+=2)T=(T^=I=I+(P=(P^=b=b+T|0)>>>16|P<<16)|0)>>>20|T<<12,A=(A^=S=S+(R=(R^=w=w+A|0)>>>16|R<<16)|0)>>>20|A<<12,_=(_^=k=k+(N=(N^=E=E+_|0)>>>16|N<<16)|0)>>>20|_<<12,C=(C^=O=O+(M=(M^=x=x+C|0)>>>16|M<<16)|0)>>>20|C<<12,_=(_^=k=k+(N=(N^=E=E+_|0)>>>24|N<<8)|0)>>>25|_<<7,C=(C^=O=O+(M=(M^=x=x+C|0)>>>24|M<<8)|0)>>>25|C<<7,A=(A^=S=S+(R=(R^=w=w+A|0)>>>24|R<<8)|0)>>>25|A<<7,T=(T^=I=I+(P=(P^=b=b+T|0)>>>24|P<<8)|0)>>>25|T<<7,A=(A^=k=k+(M=(M^=b=b+A|0)>>>16|M<<16)|0)>>>20|A<<12,_=(_^=O=O+(P=(P^=w=w+_|0)>>>16|P<<16)|0)>>>20|_<<12,C=(C^=I=I+(R=(R^=E=E+C|0)>>>16|R<<16)|0)>>>20|C<<12,T=(T^=S=S+(N=(N^=x=x+T|0)>>>16|N<<16)|0)>>>20|T<<12,C=(C^=I=I+(R=(R^=E=E+C|0)>>>24|R<<8)|0)>>>25|C<<7,T=(T^=S=S+(N=(N^=x=x+T|0)>>>24|N<<8)|0)>>>25|T<<7,_=(_^=O=O+(P=(P^=w=w+_|0)>>>24|P<<8)|0)>>>25|_<<7,A=(A^=k=k+(M=(M^=b=b+A|0)>>>24|M<<8)|0)>>>25|A<<7;nEe.writeUint32LE(b+r|0,e,0),nEe.writeUint32LE(w+i|0,e,4),nEe.writeUint32LE(E+o|0,e,8),nEe.writeUint32LE(x+a|0,e,12),nEe.writeUint32LE(T+s|0,e,16),nEe.writeUint32LE(A+c|0,e,20),nEe.writeUint32LE(_+l|0,e,24),nEe.writeUint32LE(C+u|0,e,28),nEe.writeUint32LE(I+d|0,e,32),nEe.writeUint32LE(S+f|0,e,36),nEe.writeUint32LE(k+h|0,e,40),nEe.writeUint32LE(O+p|0,e,44),nEe.writeUint32LE(P+m|0,e,48),nEe.writeUint32LE(R+y|0,e,52),nEe.writeUint32LE(N+g|0,e,56),nEe.writeUint32LE(M+v|0,e,60)}function aEe(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 o,a;if(0===i){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");a=(o=new Uint8Array(16)).length-t.length,o.set(t,a)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");o=t,a=i}for(var s=new Uint8Array(64),c=0;c<n.length;c+=64){oEe(s,o,e);for(var l=c;l<c+64&&l<n.length;l++)r[l]=n[l]^s[l-c];sEe(o,0,a)}return rEe.wipe(s),0===i&&rEe.wipe(o),r}function sEe(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")}jwe.streamXOR=aEe,jwe.stream=function(e,t,n,r){return void 0===r&&(r=0),rEe.wipe(n),aEe(e,t,n,n,r)};var cEe={},lEe={};function uEe(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(lEe,"__esModule",{value:!0}),lEe.select=function(e,t,n){return~(e-1)&t|e-1&n},lEe.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},lEe.compare=uEe,lEe.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==uEe(e,t)},function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=lEe,n=tEe;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 o=t[6]|t[7]<<8;this._r[3]=8191&(i>>>7|o<<9);var a=t[8]|t[9]<<8;this._r[4]=255&(o>>>4|a<<12),this._r[5]=a>>>1&8190;var s=t[10]|t[11]<<8;this._r[6]=8191&(a>>>14|s<<2);var c=t[12]|t[13]<<8;this._r[7]=8065&(s>>>11|c<<5);var l=t[14]|t[15]<<8;this._r[8]=8191&(c>>>8|l<<8),this._r[9]=l>>>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],o=this._h[1],a=this._h[2],s=this._h[3],c=this._h[4],l=this._h[5],u=this._h[6],d=this._h[7],f=this._h[8],h=this._h[9],p=this._r[0],m=this._r[1],y=this._r[2],g=this._r[3],v=this._r[4],b=this._r[5],w=this._r[6],E=this._r[7],x=this._r[8],T=this._r[9];n>=16;){var A=e[t+0]|e[t+1]<<8;i+=8191&A;var _=e[t+2]|e[t+3]<<8;o+=8191&(A>>>13|_<<3);var C=e[t+4]|e[t+5]<<8;a+=8191&(_>>>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),l+=S>>>1&8191;var k=e[t+10]|e[t+11]<<8;u+=8191&(S>>>14|k<<2);var O=e[t+12]|e[t+13]<<8;d+=8191&(k>>>11|O<<5);var P=e[t+14]|e[t+15]<<8,R=0,N=R;N+=i*p,N+=o*(5*T),N+=a*(5*x),N+=s*(5*E),R=(N+=c*(5*w))>>>13,N&=8191,N+=l*(5*b),N+=u*(5*v),N+=d*(5*g),N+=(f+=8191&(O>>>8|P<<8))*(5*y);var M=R+=(N+=(h+=P>>>5|r)*(5*m))>>>13;M+=i*m,M+=o*p,M+=a*(5*T),M+=s*(5*x),R=(M+=c*(5*E))>>>13,M&=8191,M+=l*(5*w),M+=u*(5*b),M+=d*(5*v),M+=f*(5*g),R+=(M+=h*(5*y))>>>13,M&=8191;var D=R;D+=i*y,D+=o*m,D+=a*p,D+=s*(5*T),R=(D+=c*(5*x))>>>13,D&=8191,D+=l*(5*E),D+=u*(5*w),D+=d*(5*b),D+=f*(5*v);var L=R+=(D+=h*(5*g))>>>13;L+=i*g,L+=o*y,L+=a*m,L+=s*p,R=(L+=c*(5*T))>>>13,L&=8191,L+=l*(5*x),L+=u*(5*E),L+=d*(5*w),L+=f*(5*b);var F=R+=(L+=h*(5*v))>>>13;F+=i*v,F+=o*g,F+=a*y,F+=s*m,R=(F+=c*p)>>>13,F&=8191,F+=l*(5*T),F+=u*(5*x),F+=d*(5*E),F+=f*(5*w);var B=R+=(F+=h*(5*b))>>>13;B+=i*b,B+=o*v,B+=a*g,B+=s*y,R=(B+=c*m)>>>13,B&=8191,B+=l*p,B+=u*(5*T),B+=d*(5*x),B+=f*(5*E);var U=R+=(B+=h*(5*w))>>>13;U+=i*w,U+=o*b,U+=a*v,U+=s*g,R=(U+=c*y)>>>13,U&=8191,U+=l*m,U+=u*p,U+=d*(5*T),U+=f*(5*x);var z=R+=(U+=h*(5*E))>>>13;z+=i*E,z+=o*w,z+=a*b,z+=s*v,R=(z+=c*g)>>>13,z&=8191,z+=l*y,z+=u*m,z+=d*p,z+=f*(5*T);var j=R+=(z+=h*(5*x))>>>13;j+=i*x,j+=o*E,j+=a*w,j+=s*b,R=(j+=c*v)>>>13,j&=8191,j+=l*g,j+=u*y,j+=d*m,j+=f*p;var H=R+=(j+=h*(5*T))>>>13;H+=i*T,H+=o*x,H+=a*E,H+=s*w,R=(H+=c*b)>>>13,H&=8191,H+=l*v,H+=u*g,H+=d*y,H+=f*m,i=N=8191&(R=(R=((R+=(H+=h*p)>>>13)<<2)+R|0)+(N&=8191)|0),o=M+=R>>>=13,a=D&=8191,s=L&=8191,c=F&=8191,l=B&=8191,u=U&=8191,d=z&=8191,f=j&=8191,h=H&=8191,t+=16,n-=16}this._h[0]=i,this._h[1]=o,this._h[2]=a,this._h[3]=s,this._h[4]=c,this._h[5]=l,this._h[6]=u,this._h[7]=d,this._h[8]=f,this._h[9]=h},t.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,i,o,a=new Uint16Array(10);if(this._leftover){for(o=this._leftover,this._buffer[o++]=1;o<16;o++)this._buffer[o]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,o=2;o<10;o++)this._h[o]+=n,n=this._h[o]>>>13,this._h[o]&=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,a[0]=this._h[0]+5,n=a[0]>>>13,a[0]&=8191,o=1;o<10;o++)a[o]=this._h[o]+n,n=a[o]>>>13,a[o]&=8191;for(a[9]-=8192,r=(1^n)-1,o=0;o<10;o++)a[o]&=r;for(r=~r,o=0;o<10;o++)this._h[o]=this._h[o]&r|a[o];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,o=1;o<8;o++)i=(this._h[o]+this._pad[o]|0)+(i>>>16)|0,this._h[o]=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)}}(cEe),function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=jwe,n=cEe,r=tEe,i=Hwe,o=lEe;e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var a=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,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var a=new Uint8Array(16);a.set(e,a.length-e.length);var s=new Uint8Array(32);t.stream(this._key,a,s,4);var c,l=n.length+this.tagLength;if(o){if(o.length!==l)throw new Error("ChaCha20Poly1305: incorrect destination length");c=o}else c=new Uint8Array(l);return t.streamXOR(this._key,a,n,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),s,c.subarray(0,c.length-this.tagLength),i),r.wipe(a),c},s.prototype.open=function(e,n,i,a){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 l=new Uint8Array(this.tagLength);if(this._authenticate(l,c,n.subarray(0,n.length-this.tagLength),i),!o.equal(l,n.subarray(n.length-this.tagLength,n.length)))return null;var u,d=n.length-this.tagLength;if(a){if(a.length!==d)throw new Error("ChaCha20Poly1305: incorrect destination length");u=a}else u=new Uint8Array(d);return t.streamXOR(this._key,s,n.subarray(0,n.length-this.tagLength),u,4),r.wipe(s),u},s.prototype.clean=function(){return r.wipe(this._key),this},s.prototype._authenticate=function(e,t,o,s){var c=new n.Poly1305(t);s&&(c.update(s),s.length%16>0&&c.update(a.subarray(s.length%16))),c.update(o),o.length%16>0&&c.update(a.subarray(o.length%16));var l=new Uint8Array(8);s&&i.writeUint64LE(s.length,l),c.update(l),i.writeUint64LE(o.length,l),c.update(l);for(var u=c.digest(),d=0;d<u.length;d++)e[d]=u[d];c.clean(),r.wipe(u),r.wipe(l)},s}();e.ChaCha20Poly1305=s}(zwe);var dEe={},fEe={},hEe={};Object.defineProperty(hEe,"__esModule",{value:!0}),hEe.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState},Object.defineProperty(fEe,"__esModule",{value:!0});var pEe=hEe,mEe=lEe,yEe=tEe,gEe=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),pEe.isSerializableHash(this._inner)&&pEe.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),yEe.wipe(n)}return e.prototype.reset=function(){if(!pEe.isSerializableHash(this._inner)||!pEe.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(){pEe.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),pEe.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(!pEe.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(!pEe.isSerializableHash(this._inner)||!pEe.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(!pEe.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();fEe.HMAC=gEe,fEe.hmac=function(e,t,n){var r=new gEe(e,t);r.update(n);var i=r.digest();return r.clean(),i},fEe.equal=mEe.equal,Object.defineProperty(dEe,"__esModule",{value:!0});var vEe=fEe,bEe=tEe,wEe=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=vEe.hmac(this._hash,n,t);this._hmac=new vEe.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(),bEe.wipe(this._buffer),bEe.wipe(this._counter),this._bufpos=0},e}(),EEe=dEe.HKDF=wEe,xEe={},TEe={},AEe={};Object.defineProperty(AEe,"__esModule",{value:!0}),AEe.BrowserRandomSource=void 0;AEe.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 _Ee={};Object.defineProperty(_Ee,"__esModule",{value:!0}),_Ee.NodeRandomSource=void 0;const CEe=tEe;_Ee.NodeRandomSource=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,void 0!==VO){const e=KO;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,CEe.wipe)(t),n}},Object.defineProperty(TEe,"__esModule",{value:!0}),TEe.SystemRandomSource=void 0;const IEe=AEe,SEe=_Ee;TEe.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new IEe.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new SEe.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=TEe,n=Hwe,r=tEe;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 o=i(4,t),a=(0,n.readUint32LE)(o);return(0,r.wipe)(o),a};const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function a(t,n=o,a=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,l=256-256%c;for(;t>0;){const e=i(Math.ceil(256*t/l),a);for(let r=0;r<e.length&&t>0;r++){const i=e[r];i<l&&(s+=n.charAt(i%c),t--)}(0,r.wipe)(e)}return s}e.randomString=a,e.randomStringForEntropy=function(t,n=o,r=e.defaultRandomSource){return a(Math.ceil(t/(Math.log(n.length)/Math.LN2)),n,r)}}(xEe);var kEe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Hwe,n=tEe;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&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=o(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,a=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(a,this._buffer,s-4),o(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 o(e,n,r,o,a){for(;a>=64;){for(var s=n[0],c=n[1],l=n[2],u=n[3],d=n[4],f=n[5],h=n[6],p=n[7],m=0;m<16;m++){var y=o+4*m;e[m]=t.readUint32BE(r,y)}for(m=16;m<64;m++){var g=e[m-2],v=(g>>>17|g<<15)^(g>>>19|g<<13)^g>>>10,b=((g=e[m-15])>>>7|g<<25)^(g>>>18|g<<14)^g>>>3;e[m]=(v+e[m-7]|0)+(b+e[m-16]|0)}for(m=0;m<64;m++){v=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&f^~d&h)|0)+(p+(i[m]+e[m]|0)|0)|0,b=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&c^s&l^c&l)|0;p=h,h=f,f=d,d=u+v|0,u=l,l=c,c=s,s=v+b|0}n[0]+=s,n[1]+=c,n[2]+=l,n[3]+=u,n[4]+=d,n[5]+=f,n[6]+=h,n[7]+=p,o+=64,a-=64}return o}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}}(kEe);var OEe={};function PEe(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function REe(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?PEe(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function NEe(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const n=REe(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return PEe(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=xEe,n=tEe;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 o=r([56129,1]);function a(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 l(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function u(e,t,n){let r,i,o=0,a=0,s=0,c=0,l=0,u=0,d=0,f=0,h=0,p=0,m=0,y=0,g=0,v=0,b=0,w=0,E=0,x=0,T=0,A=0,_=0,C=0,I=0,S=0,k=0,O=0,P=0,R=0,N=0,M=0,D=0,L=n[0],F=n[1],B=n[2],U=n[3],z=n[4],j=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],Z=n[14],J=n[15];r=t[0],o+=r*L,a+=r*F,s+=r*B,c+=r*U,l+=r*z,u+=r*j,d+=r*H,f+=r*W,h+=r*V,p+=r*G,m+=r*q,y+=r*K,g+=r*X,v+=r*Y,b+=r*Z,w+=r*J,r=t[1],a+=r*L,s+=r*F,c+=r*B,l+=r*U,u+=r*z,d+=r*j,f+=r*H,h+=r*W,p+=r*V,m+=r*G,y+=r*q,g+=r*K,v+=r*X,b+=r*Y,w+=r*Z,E+=r*J,r=t[2],s+=r*L,c+=r*F,l+=r*B,u+=r*U,d+=r*z,f+=r*j,h+=r*H,p+=r*W,m+=r*V,y+=r*G,g+=r*q,v+=r*K,b+=r*X,w+=r*Y,E+=r*Z,x+=r*J,r=t[3],c+=r*L,l+=r*F,u+=r*B,d+=r*U,f+=r*z,h+=r*j,p+=r*H,m+=r*W,y+=r*V,g+=r*G,v+=r*q,b+=r*K,w+=r*X,E+=r*Y,x+=r*Z,T+=r*J,r=t[4],l+=r*L,u+=r*F,d+=r*B,f+=r*U,h+=r*z,p+=r*j,m+=r*H,y+=r*W,g+=r*V,v+=r*G,b+=r*q,w+=r*K,E+=r*X,x+=r*Y,T+=r*Z,A+=r*J,r=t[5],u+=r*L,d+=r*F,f+=r*B,h+=r*U,p+=r*z,m+=r*j,y+=r*H,g+=r*W,v+=r*V,b+=r*G,w+=r*q,E+=r*K,x+=r*X,T+=r*Y,A+=r*Z,_+=r*J,r=t[6],d+=r*L,f+=r*F,h+=r*B,p+=r*U,m+=r*z,y+=r*j,g+=r*H,v+=r*W,b+=r*V,w+=r*G,E+=r*q,x+=r*K,T+=r*X,A+=r*Y,_+=r*Z,C+=r*J,r=t[7],f+=r*L,h+=r*F,p+=r*B,m+=r*U,y+=r*z,g+=r*j,v+=r*H,b+=r*W,w+=r*V,E+=r*G,x+=r*q,T+=r*K,A+=r*X,_+=r*Y,C+=r*Z,I+=r*J,r=t[8],h+=r*L,p+=r*F,m+=r*B,y+=r*U,g+=r*z,v+=r*j,b+=r*H,w+=r*W,E+=r*V,x+=r*G,T+=r*q,A+=r*K,_+=r*X,C+=r*Y,I+=r*Z,S+=r*J,r=t[9],p+=r*L,m+=r*F,y+=r*B,g+=r*U,v+=r*z,b+=r*j,w+=r*H,E+=r*W,x+=r*V,T+=r*G,A+=r*q,_+=r*K,C+=r*X,I+=r*Y,S+=r*Z,k+=r*J,r=t[10],m+=r*L,y+=r*F,g+=r*B,v+=r*U,b+=r*z,w+=r*j,E+=r*H,x+=r*W,T+=r*V,A+=r*G,_+=r*q,C+=r*K,I+=r*X,S+=r*Y,k+=r*Z,O+=r*J,r=t[11],y+=r*L,g+=r*F,v+=r*B,b+=r*U,w+=r*z,E+=r*j,x+=r*H,T+=r*W,A+=r*V,_+=r*G,C+=r*q,I+=r*K,S+=r*X,k+=r*Y,O+=r*Z,P+=r*J,r=t[12],g+=r*L,v+=r*F,b+=r*B,w+=r*U,E+=r*z,x+=r*j,T+=r*H,A+=r*W,_+=r*V,C+=r*G,I+=r*q,S+=r*K,k+=r*X,O+=r*Y,P+=r*Z,R+=r*J,r=t[13],v+=r*L,b+=r*F,w+=r*B,E+=r*U,x+=r*z,T+=r*j,A+=r*H,_+=r*W,C+=r*V,I+=r*G,S+=r*q,k+=r*K,O+=r*X,P+=r*Y,R+=r*Z,N+=r*J,r=t[14],b+=r*L,w+=r*F,E+=r*B,x+=r*U,T+=r*z,A+=r*j,_+=r*H,C+=r*W,I+=r*V,S+=r*G,k+=r*q,O+=r*K,P+=r*X,R+=r*Y,N+=r*Z,M+=r*J,r=t[15],w+=r*L,E+=r*F,x+=r*B,T+=r*U,A+=r*z,_+=r*j,C+=r*H,I+=r*W,S+=r*V,k+=r*G,O+=r*q,P+=r*K,R+=r*X,N+=r*Y,M+=r*Z,D+=r*J,o+=38*E,a+=38*x,s+=38*T,c+=38*A,l+=38*_,u+=38*C,d+=38*I,f+=38*S,h+=38*k,p+=38*O,m+=38*P,y+=38*R,g+=38*N,v+=38*M,b+=38*D,i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=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=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=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=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=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=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=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,o+=i-1+37*(i-1),i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=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=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=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=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=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=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=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=s,e[3]=c,e[4]=l,e[5]=u,e[6]=d,e[7]=f,e[8]=h,e[9]=p,e[10]=m,e[11]=y,e[12]=g,e[13]=v,e[14]=b,e[15]=w}function d(e,t){u(e,t,t)}function f(e,t){const n=new Uint8Array(32),i=new Float64Array(80),f=r(),h=r(),p=r(),m=r(),y=r(),g=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++)h[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,h,t),s(p,m,t),c(y,f,p),l(f,f,p),c(p,h,m),l(h,h,m),d(m,y),d(g,f),u(f,p,f),u(p,h,y),c(y,f,p),l(f,f,p),d(h,f),l(p,m,g),u(f,p,o),c(f,f,m),u(p,p,f),u(f,m,g),u(m,h,i),d(h,y),s(f,h,t),s(p,m,t)}for(let e=0;e<16;e++)i[e+16]=f[e],i[e+32]=p[e],i[e+48]=h[e],i[e+64]=m[e];const v=i.subarray(32),b=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&&u(n,n,t);for(let t=0;t<16;t++)e[t]=n[t]}(v,v),u(b,b,v);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];a(i),a(i),a(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,b),w}function h(e){return f(e,i)}function p(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:h(n),secretKey:n}}e.scalarMult=f,e.scalarMultBase=h,e.generateKeyPairFromSeed=p,e.generateKeyPair=function(e){const r=(0,t.randomBytes)(32,e),i=p(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}}(OEe);var MEe=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 o=e.charAt(i),a=o.charCodeAt(0);if(255!==n[a])throw new TypeError(o+" is ambiguous");n[a]=i}var s=e.length,c=e.charAt(0),l=Math.log(s)/Math.log(256),u=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 o=(e.length-t)*l+1>>>0,a=new Uint8Array(o);e[t];){var u=n[e.charCodeAt(t)];if(255===u)return;for(var d=0,f=o-1;(0!==u||d<i)&&-1!==f;f--,d++)u+=s*a[f]>>>0,a[f]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var h=o-i;h!==o&&0===a[h];)h++;for(var p=new Uint8Array(r+(o-h)),m=r;h!==o;)p[m++]=a[h++];return p}}}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,o=t.length;i!==o&&0===t[i];)i++,n++;for(var a=(o-i)*u+1>>>0,l=new Uint8Array(a);i!==o;){for(var d=t[i],f=0,h=a-1;(0!==d||f<r)&&-1!==h;h--,f++)d+=256*l[h]>>>0,l[h]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");r=f,i++}for(var p=a-r;p!==a&&0===l[p];)p++;for(var m=c.repeat(n);p<a;++p)m+=e.charAt(l[p]);return m},decodeUnsafe:d,decode:function(e){var n=d(e);if(n)return n;throw new Error(`Non-${t} character`)}}},DEe=MEe;class LEe{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 FEe{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 UEe(this,e)}}class BEe{constructor(e){this.decoders=e}or(e){return UEe(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 UEe=(e,t)=>new BEe({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class zEe{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new LEe(e,t,n),this.decoder=new FEe(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const jEe=({name:e,prefix:t,encode:n,decode:r})=>new zEe(e,t,n,r),HEe=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=DEe(n,t);return jEe({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))})},WEe=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>jEe({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let o="",a=0,s=0;for(let r=0;r<e.length;++r)for(s=s<<8|e[r],a+=8;a>n;)a-=n,o+=t[i&s>>a];if(a&&(o+=t[i&s<<n-a]),r)for(;o.length*n&7;)o+="=";return o})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const a=new Uint8Array(o*n/8|0);let s=0,c=0,l=0;for(let t=0;t<o;++t){const o=i[e[t]];if(void 0===o)throw new SyntaxError(`Non-${r} character`);c=c<<n|o,s+=n,s>=8&&(s-=8,a[l++]=255&c>>s)}if(s>=n||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return a})(t,r,n,e)}),VEe=jEe({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var GEe=Object.freeze({__proto__:null,identity:VEe});const qEe=WEe({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var KEe=Object.freeze({__proto__:null,base2:qEe});const XEe=WEe({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var YEe=Object.freeze({__proto__:null,base8:XEe});const ZEe=HEe({prefix:"9",name:"base10",alphabet:"0123456789"});var JEe=Object.freeze({__proto__:null,base10:ZEe});const QEe=WEe({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),$Ee=WEe({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var exe=Object.freeze({__proto__:null,base16:QEe,base16upper:$Ee});const txe=WEe({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),nxe=WEe({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),rxe=WEe({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),ixe=WEe({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),oxe=WEe({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),axe=WEe({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),sxe=WEe({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),cxe=WEe({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),lxe=WEe({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var uxe=Object.freeze({__proto__:null,base32:txe,base32hex:oxe,base32hexpad:sxe,base32hexpadupper:cxe,base32hexupper:axe,base32pad:rxe,base32padupper:ixe,base32upper:nxe,base32z:lxe});const dxe=HEe({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),fxe=HEe({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var hxe=Object.freeze({__proto__:null,base36:dxe,base36upper:fxe});const pxe=HEe({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),mxe=HEe({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var yxe=Object.freeze({__proto__:null,base58btc:pxe,base58flickr:mxe});const gxe=WEe({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),vxe=WEe({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),bxe=WEe({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),wxe=WEe({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Exe=Object.freeze({__proto__:null,base64:gxe,base64pad:vxe,base64url:bxe,base64urlpad:wxe});const xxe=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Txe=xxe.reduce(((e,t,n)=>(e[n]=t,e)),[]),Axe=xxe.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const _xe=jEe({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=Txe[t]),"")},decode:function(e){const t=[];for(const n of e){const e=Axe[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var Cxe=Object.freeze({__proto__:null,base256emoji:_xe});new TextEncoder,new TextDecoder;const Ixe={...GEe,...KEe,...YEe,...JEe,...exe,...uxe,...hxe,...yxe,...Exe,...Cxe};function Sxe(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const kxe=Sxe("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),Oxe=Sxe("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{const t=REe((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),Pxe={utf8:kxe,"utf-8":kxe,hex:Ixe.base16,latin1:Oxe,ascii:Oxe,binary:Oxe,...Ixe};function Rxe(e,t="utf8"){const n=Pxe[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}`):PEe(globalThis.Buffer.from(e,"utf-8"))}function Nxe(e,t="utf8"){const n=Pxe[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 Mxe=window&&window.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;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))},Dxe=function(e,t,n){this.name=e,this.version=t,this.os=n,this.type="browser"},Lxe=function(e){this.version=e,this.type="node",this.name="node",this.os=process.platform},Fxe=function(e,t,n,r){this.name=e,this.version=t,this.os=n,this.bot=r,this.type="bot-device"},Bxe=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},Uxe=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},zxe=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,jxe=3,Hxe=[["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/]],Wxe=[["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 Vxe(e){return e?Gxe(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new Uxe:"undefined"!=typeof navigator?Gxe(navigator.userAgent):function(){var e="undefined"!=typeof process&&process.version;return e?new Lxe(process.version.slice(1)):null}()}function Gxe(e){var t=function(e){return""!==e&&Hxe.reduce((function(t,n){var r=n[0],i=n[1];if(t)return t;var o=i.exec(e);return!!o&&[r,o]}),!1)}(e);if(!t)return null;var n=t[0],r=t[1];if("searchbot"===n)return new Bxe;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length<jxe&&(i=Mxe(Mxe([],i,!0),function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(jxe-i.length),!0)):i=[];var o=i.join("."),a=function(e){for(var t=0,n=Wxe.length;t<n;t++){var r=Wxe[t],i=r[0];if(r[1].exec(e))return i}return null}(e),s=zxe.exec(e);return s&&s[1]?new Fxe(n,o,a,s[1]):new Dxe(n,o,a)}var qxe,Kxe={},Xxe=dt(Yle),Yxe={},Zxe={};var Jxe,Qxe={},$xe={},eTe={};var tTe,nTe,rTe,iTe,oTe={};function aTe(){return nTe||(nTe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Xxe;t.__exportStar((Jxe||(Jxe=1,Object.defineProperty(eTe,"__esModule",{value:!0}),eTe.ONE_THOUSAND=eTe.ONE_HUNDRED=void 0,eTe.ONE_HUNDRED=100,eTe.ONE_THOUSAND=1e3),eTe),e),t.__exportStar((tTe||(tTe=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}(oTe)),oTe),e)}($xe)),$xe}function sTe(){return iTe||(iTe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Xxe;t.__exportStar((qxe||(qxe=1,Object.defineProperty(Zxe,"__esModule",{value:!0}),Zxe.delay=void 0,Zxe.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}),Zxe),e),t.__exportStar(function(){if(rTe)return Qxe;rTe=1,Object.defineProperty(Qxe,"__esModule",{value:!0}),Qxe.fromMiliseconds=Qxe.toMiliseconds=void 0;const e=aTe();return Qxe.toMiliseconds=function(t){return t*e.ONE_THOUSAND},Qxe.fromMiliseconds=function(t){return Math.floor(t/e.ONE_THOUSAND)},Qxe}(),e)}(Yxe)),Yxe}var cTe,lTe={};var uTe,dTe,fTe={},hTe={};function pTe(){return dTe||(dTe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});Xxe.__exportStar((uTe||(uTe=1,Object.defineProperty(hTe,"__esModule",{value:!0}),hTe.IWatch=void 0,hTe.IWatch=class{}),hTe),e)}(fTe)),fTe}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Xxe;t.__exportStar(sTe(),e),t.__exportStar(function(){if(cTe)return lTe;cTe=1,Object.defineProperty(lTe,"__esModule",{value:!0}),lTe.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 lTe.Watch=e,lTe.default=e,lTe}(),e),t.__exportStar(pTe(),e),t.__exportStar(aTe(),e)}(Kxe);var mTe={};function yTe(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function gTe(e){const t=yTe(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(mTe,"__esModule",{value:!0}),mTe.getLocalStorage=mTe.getLocalStorageOrThrow=mTe.getCrypto=mTe.getCryptoOrThrow=wTe=mTe.getLocation=mTe.getLocationOrThrow=bTe=mTe.getNavigator=mTe.getNavigatorOrThrow=vTe=mTe.getDocument=mTe.getDocumentOrThrow=mTe.getFromWindowOrThrow=mTe.getFromWindow=void 0,mTe.getFromWindow=yTe,mTe.getFromWindowOrThrow=gTe,mTe.getDocumentOrThrow=function(){return gTe("document")};var vTe=mTe.getDocument=function(){return yTe("document")};mTe.getNavigatorOrThrow=function(){return gTe("navigator")};var bTe=mTe.getNavigator=function(){return yTe("navigator")};mTe.getLocationOrThrow=function(){return gTe("location")};var wTe=mTe.getLocation=function(){return yTe("location")};mTe.getCryptoOrThrow=function(){return gTe("crypto")},mTe.getCrypto=function(){return yTe("crypto")},mTe.getLocalStorageOrThrow=function(){return gTe("localStorage")},mTe.getLocalStorage=function(){return yTe("localStorage")};var ETe={};Object.defineProperty(ETe,"__esModule",{value:!0});var xTe=ETe.getWindowMetadata=void 0;const TTe=mTe;xTe=ETe.getWindowMetadata=function(){let e,t;try{e=TTe.getDocumentOrThrow(),t=TTe.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"),o=t.origin,a=function(){const n=e.getElementsByTagName("link"),r=[];for(let e=0;e<n.length;e++){const i=n[e],o=i.getAttribute("rel");if(o&&o.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:o,icons:a,name:r}};var ATe={},_Te=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),CTe="%[a-f0-9]{2}",ITe=new RegExp("("+CTe+")|([^%]+?)","gi"),STe=new RegExp("("+CTe+")+","gi");function kTe(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([],kTe(n),kTe(r))}function OTe(e){try{return decodeURIComponent(e)}catch(r){for(var t=e.match(ITe)||[],n=1;n<t.length;n++)t=(e=kTe(t,n).join("")).match(ITe)||[];return e}}var PTe=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=STe.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=OTe(n[0]);r!==n[0]&&(t[n[0]]=r)}n=STe.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),o=0;o<i.length;o++){var a=i[o];e=e.replace(new RegExp(a,"g"),t[a])}return e}(e)}},RTe=(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)]},NTe=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var a=r[o],s=e[a];(i?-1!==t.indexOf(a):t(a,s,e))&&(n[a]=s)}return n};!function(e){const t=_Te,n=PTe,r=RTe,i=NTe,o=Symbol("encodeFragmentIdentifier");function a(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 l(e){return Array.isArray(e)?e.sort():"object"==typeof e?l(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function u(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function d(e){const t=(e=u(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 h(e,t){a((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),o="string"==typeof n&&!i&&c(n,e).includes(e.arrayFormatSeparator);n=o?c(n,e):n;const a=i||o?n.split(e.arrayFormatSeparator).map((t=>c(t,e))):null===n?n:c(n,e);r[t]=a};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 o=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>c(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],o):r[t]=o};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 o of e.split("&")){if(""===o)continue;let[e,a]=r(t.decode?o.replace(/\+/g," "):o,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:c(a,t),n(c(e,t),a,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]=l(n):e[t]=n,e}),Object.create(null))}e.extract=d,e.parse=h,e.stringify=(e,t)=>{if(!e)return"";a((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 o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.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:h(d(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:c(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[o]:!0},n);const r=u(t.url).split("?")[0]||"",i=e.extract(t.url),a=e.parse(i,{sort:!1}),c=Object.assign(a,t.query);let l=e.stringify(c,n);l&&(l=`?${l}`);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[o]?s(t.fragmentIdentifier,n):t.fragmentIdentifier}`),`${r}${l}${d}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[o]:!1},r);const{url:a,query:s,fragmentIdentifier:c}=e.parseUrl(t,r);return e.stringifyUrl({url:a,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)}}(ATe);const MTe={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"}},DTe=":";function LTe(e,t){return e.includes(":")?[e]:t.chains||[]}const FTe="base10",BTe="base16",UTe="base64pad",zTe="utf8",jTe=0,HTe=1,WTe=0,VTe=1,GTe=12,qTe=32;function KTe(){return Nxe(xEe.randomBytes(qTe),BTe)}function XTe(e){return Nxe(kEe.hash(Rxe(e,zTe)),BTe)}function YTe(e){return Number(Nxe(e,FTe))}function ZTe(e){const t=function(e){return Rxe(`${e}`,FTe)}(typeof e.type<"u"?e.type:jTe);if(YTe(t)===HTe&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof e.senderPublicKey<"u"?Rxe(e.senderPublicKey,BTe):void 0,r=typeof e.iv<"u"?Rxe(e.iv,BTe):xEe.randomBytes(GTe);return function(e){if(YTe(e.type)===HTe){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Nxe(NEe([e.type,e.senderPublicKey,e.iv,e.sealed]),UTe)}return Nxe(NEe([e.type,e.iv,e.sealed]),UTe)}({type:t,sealed:new zwe.ChaCha20Poly1305(Rxe(e.symKey,BTe)).seal(r,Rxe(e.message,zTe)),iv:r,senderPublicKey:n})}function JTe(e){const t=Rxe(e,UTe),n=t.slice(WTe,VTe),r=VTe;if(YTe(n)===HTe){const e=r+qTe,i=e+GTe,o=t.slice(r,e),a=t.slice(e,i);return{type:n,sealed:t.slice(i),iv:a,senderPublicKey:o}}const i=r+GTe,o=t.slice(r,i);return{type:n,sealed:t.slice(i),iv:o}}function QTe(e){const t=e?.type||jTe;if(t===HTe){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 $Te(e){return e.type===HTe&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var eAe=Object.defineProperty,tAe=Object.getOwnPropertySymbols,nAe=Object.prototype.hasOwnProperty,rAe=Object.prototype.propertyIsEnumerable,iAe=(e,t,n)=>t in e?eAe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oAe=(e,t)=>{for(var n in t||(t={}))nAe.call(t,n)&&iAe(e,n,t[n]);if(tAe)for(var n of tAe(t))rAe.call(t,n)&&iAe(e,n,t[n]);return e};const aAe="ReactNative",sAe={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},cAe="js";function lAe(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function uAe(){return!vTe()&&!!bTe()&&navigator.product===aAe}function dAe(){return!lAe()&&!!bTe()&&!!vTe()}function fAe(){return uAe()?sAe.reactNative:lAe()?sAe.node:dAe()?sAe.browser:sAe.unknown}function hAe(e,t,n){const r=function(){if(fAe()===sAe.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=Vxe();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=fAe();return t===sAe.browser?[t,(null==(e=wTe())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),[cAe,n].join("-"),r,i].join("/")}function pAe({protocol:e,version:t,relayUrl:n,sdkVersion:r,auth:i,projectId:o,useOnCloseEvent:a,bundleId:s}){const c=n.split("?"),l={auth:i,ua:hAe(e,t,r),projectId:o,useOnCloseEvent:a||void 0,origin:s||void 0},u=function(e,t){let n=ATe.parse(e);return n=oAe(oAe({},n),t),ATe.stringify(n)}(c[1]||"",l);return c[0]+"?"+u}function mAe(e,t){return e.filter((e=>t.includes(e))).length===e.length}function yAe(e){return Object.fromEntries(e.entries())}function gAe(e){return new Map(Object.entries(e))}function vAe(e=Kxe.FIVE_MINUTES,t){const n=Kxe.toMiliseconds(e||Kxe.FIVE_MINUTES);let r,i,o;return{resolve:e=>{o&&r&&(clearTimeout(o),r(e))},reject:e=>{o&&i&&(clearTimeout(o),i(e))},done:()=>new Promise(((e,a)=>{o=setTimeout((()=>{a(new Error(t))}),n),r=e,i=a}))}}function bAe(e,t,n){return new Promise((async(r,i)=>{const o=setTimeout((()=>i(new Error(n))),t);try{r(await e)}catch(e){i(e)}clearTimeout(o)}))}function wAe(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 EAe(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 xAe(e,t){return Kxe.fromMiliseconds((t||Date.now())+Kxe.toMiliseconds(e))}function TAe(e){return Date.now()>=Kxe.toMiliseconds(e)}function AAe(e,t){return`${e}${t?`:${t}`:""}`}function _Ae(e=[],t=[]){return[...new Set([...e,...t])]}function CAe(e){return e?.relay||{protocol:"irn"}}function IAe(e){const t=MTe[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var SAe=Object.defineProperty,kAe=Object.defineProperties,OAe=Object.getOwnPropertyDescriptors,PAe=Object.getOwnPropertySymbols,RAe=Object.prototype.hasOwnProperty,NAe=Object.prototype.propertyIsEnumerable,MAe=(e,t,n)=>t in e?SAe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function DAe(e,t="-"){const n={},r="relay"+t;return Object.keys(e).forEach((t=>{if(t.startsWith(r)){const i=t.replace(r,""),o=e[t];n[i]=o}})),n}function LAe(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("@"),o=typeof n<"u"?e.substring(n):"",a=ATe.parse(o);return{protocol:r,topic:FAe(i[0]),version:parseInt(i[1],10),symKey:a.symKey,relay:DAe(a),expiryTimestamp:a.expiryTimestamp?parseInt(a.expiryTimestamp,10):void 0}}function FAe(e){return e.startsWith("//")?e.substring(2):e}function BAe(e){return`${e.protocol}:${e.topic}@${e.version}?`+ATe.stringify(((e,t)=>kAe(e,OAe(t)))(((e,t)=>{for(var n in t||(t={}))RAe.call(t,n)&&MAe(e,n,t[n]);if(PAe)for(var n of PAe(t))NAe.call(t,n)&&MAe(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 UAe(e){const t=[];return e.forEach((e=>{const[n,r]=e.split(":");t.push(`${n}:${r}`)})),t}function zAe(e){return e.includes(":")}function jAe(e){return zAe(e)?e.split(":")[0]:e}const HAe={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}},WAe={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 VAe(e,t){const{message:n,code:r}=WAe[e];return{message:t?`${n} ${t}`:n,code:r}}function GAe(e,t){const{message:n,code:r}=HAe[e];return{message:t?`${n} ${t}`:n,code:r}}function qAe(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function KAe(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function XAe(e){return typeof e>"u"}function YAe(e,t){return!(!t||!XAe(e))||"string"==typeof e&&!!e.trim().length}function ZAe(e,t){return!(!t||!XAe(e))||"number"==typeof e&&!isNaN(e)}function JAe(e){return!(!YAe(e,!1)||!e.includes(":"))&&2===e.split(":").length}function QAe(e){let t=!0;return qAe(e)?e.length&&(t=e.every((e=>YAe(e,!1)))):t=!1,t}function $Ae(e,t,n){let r=null;return Object.entries(e).forEach((([e,i])=>{if(r)return;const o=function(e,t,n){let r=null;return qAe(t)&&t.length?t.forEach((e=>{r||JAe(e)||(r=GAe("UNSUPPORTED_CHAINS",`${n}, chain ${e} should be a string and conform to "namespace:chainId" format`))})):JAe(e)||(r=GAe("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,LTe(e,i),`${t} ${n}`);o&&(r=o)})),r}function e_e(e,t){let n=null;return qAe(e)?e.forEach((e=>{n||function(e){if(YAe(e,!1)&&e.includes(":")){const t=e.split(":");if(3===t.length){const e=t[0]+":"+t[1];return!!t[2]&&JAe(e)}}return!1}(e)||(n=GAe("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):n=GAe("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function t_e(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=function(e,t){let n=null;return QAe(e?.methods)?QAe(e?.events)||(n=GAe("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):n=GAe("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 n_e(e,t){let n=null;if(e&&KAe(e)){const r=t_e(e,t);r&&(n=r);const i=function(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=e_e(e?.accounts,`${t} namespace`);r&&(n=r)})),n}(e,t);i&&(n=i)}else n=VAe("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return n}function r_e(e){return YAe(e.protocol,!0)}function i_e(e){return typeof e<"u"&&null!==typeof e}function o_e(e,t){return!(!JAe(t)||!function(e){const t=[];return Object.values(e).forEach((e=>{t.push(...UAe(e.accounts))})),t}(e).includes(t))}function a_e(e,t,n){return!!YAe(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{UAe(e.accounts).includes(t)&&n.push(...e.methods)})),n}(e,t).includes(n)}function s_e(e,t,n){return!!YAe(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{UAe(e.accounts).includes(t)&&n.push(...e.events)})),n}(e,t).includes(n)}function c_e(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),o=function(e){const t={};return Object.keys(e).forEach((n=>{if(n.includes(":"))t[n]=e[n];else{const r=UAe(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),a=Object.keys(i),s=Object.keys(o),c=l_e(Object.keys(e)),l=l_e(Object.keys(t)),u=c.filter((e=>!l.includes(e)));return u.length&&(r=VAe("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.\n Required: ${u.toString()}\n Received: ${Object.keys(t).toString()}`)),mAe(a,s)||(r=VAe("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.\n Required: ${a.toString()}\n Approved: ${s.toString()}`)),Object.keys(t).forEach((e=>{if(!e.includes(":")||r)return;const i=UAe(t[e].accounts);i.includes(e)||(r=VAe("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${e}\n Required: ${e}\n Approved: ${i.toString()}`))})),a.forEach((e=>{r||(mAe(i[e].methods,o[e].methods)?mAe(i[e].events,o[e].events)||(r=VAe("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${e}`)):r=VAe("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${e}`))})),r}function l_e(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}function u_e(){const e=fAe();return new Promise((t=>{switch(e){case sAe.browser:t(dAe()&&navigator?.onLine);break;case sAe.reactNative:t(async function(){if(uAe()&&typeof global<"u"&&null!=global&&global.NetInfo){const e=await(null==global?void 0:global.NetInfo.fetch());return e?.isConnected}return!0}());break;case sAe.node:default:t(!0)}}))}function d_e(e){switch(fAe()){case sAe.browser:!function(e){!uAe()&&dAe()&&(window.addEventListener("online",(()=>e(!0))),window.addEventListener("offline",(()=>e(!1))))}(e);break;case sAe.reactNative:!function(e){uAe()&&typeof global<"u"&&null!=global&&global.NetInfo&&global?.NetInfo.addEventListener((t=>e(t?.isConnected)))}(e)}}const f_e={};let h_e=class{static get(e){return f_e[e]}static set(e,t){f_e[e]=t}static delete(e){delete f_e[e]}};const p_e=/"(?:_|\\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*:/,m_e=/"(?: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*:/,y_e=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function g_e(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 v_e(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(!y_e.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(p_e.test(e)||m_e.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,g_e)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}function b_e(e,...t){try{return(n=e(...t))&&"function"==typeof n.then?n:Promise.resolve(n)}catch(e){return Promise.reject(e)}var n}function w_e(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 w_e(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function E_e(){if(void 0===typeof Buffer)throw new TypeError("[unstorage] Buffer is not supported!")}const x_e="base64:";function T_e(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function A_e(...e){return T_e(e.join(":"))}function __e(e){return(e=T_e(e))?e+":":""}const C_e=()=>{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 I_e(e={}){const t={mounts:{"":e.driver||C_e()},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=T_e(n);for(const r of t.watchListeners)r(e,n)}},o=async()=>{if(t.watching){for(const e in t.unwatch)await t.unwatch[e]();t.unwatch={},t.watching=!1}},a=(e,t,r)=>{const i=new Map,o=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=T_e(e?r:r.key),a=e?void 0:r.value,s=e||!r.options?t:{...t,...r.options},c=n(i);o(c).items.push({key:i,value:a,relativeKey:c.relativeKey,options:s})}return Promise.all([...i.values()].map((e=>r(e)))).then((e=>e.flat()))},s={hasItem(e,t={}){e=T_e(e);const{relativeKey:r,driver:i}=n(e);return b_e(i.hasItem,r,t)},getItem(e,t={}){e=T_e(e);const{relativeKey:r,driver:i}=n(e);return b_e(i.getItem,r,t).then((e=>v_e(e)))},getItems:(e,t)=>a(e,t,(e=>e.driver.getItems?b_e(e.driver.getItems,e.items.map((e=>({key:e.relativeKey,options:e.options}))),t).then((t=>t.map((t=>({key:A_e(e.base,t.key),value:v_e(t.value)}))))):Promise.all(e.items.map((t=>b_e(e.driver.getItem,t.relativeKey,t.options).then((e=>({key:t.key,value:v_e(e)})))))))),getItemRaw(e,t={}){e=T_e(e);const{relativeKey:r,driver:i}=n(e);return i.getItemRaw?b_e(i.getItemRaw,r,t):b_e(i.getItem,r,t).then((e=>function(e){return"string"!=typeof e?e:e.startsWith(x_e)?(E_e(),Buffer.from(e.slice(x_e.length),"base64")):e}(e)))},async setItem(e,t,r={}){if(void 0===t)return s.removeItem(e);e=T_e(e);const{relativeKey:o,driver:a}=n(e);a.setItem&&(await b_e(a.setItem,o,w_e(t),r),a.watch||i("update",e))},async setItems(e,t){await a(e,t,(async e=>{e.driver.setItems&&await b_e(e.driver.setItems,e.items.map((e=>({key:e.relativeKey,value:w_e(e.value),options:e.options}))),t),e.driver.setItem&&await Promise.all(e.items.map((t=>b_e(e.driver.setItem,t.relativeKey,w_e(t.value),t.options))))}))},async setItemRaw(e,t,r={}){if(void 0===t)return s.removeItem(e,r);e=T_e(e);const{relativeKey:o,driver:a}=n(e);if(a.setItemRaw)await b_e(a.setItemRaw,o,t,r);else{if(!a.setItem)return;await b_e(a.setItem,o,function(e){if("string"==typeof e)return e;E_e();const t=Buffer.from(e).toString("base64");return x_e+t}(t),r)}a.watch||i("update",e)},async removeItem(e,t={}){"boolean"==typeof t&&(t={removeMeta:t}),e=T_e(e);const{relativeKey:r,driver:o}=n(e);o.removeItem&&(await b_e(o.removeItem,r,t),(t.removeMeta||t.removeMata)&&await b_e(o.removeItem,r+"$",t),o.watch||i("remove",e))},async getMeta(e,t={}){"boolean"==typeof t&&(t={nativeOnly:t}),e=T_e(e);const{relativeKey:r,driver:i}=n(e),o=Object.create(null);if(i.getMeta&&Object.assign(o,await b_e(i.getMeta,r,t)),!t.nativeOnly){const e=await b_e(i.getItem,r+"$",t).then((e=>v_e(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(o,e))}return o},setMeta(e,t,n={}){return this.setItem(e+"$",t,n)},removeMeta(e,t={}){return this.removeItem(e+"$",t)},async getKeys(e,t={}){e=__e(e);const n=r(e,!0);let i=[];const o=[];for(const e of n){const n=(await b_e(e.driver.getKeys,e.relativeBase,t)).map((t=>e.mountpoint+T_e(t))).filter((e=>!i.some((t=>e.startsWith(t)))));o.push(...n),i=[e.mountpoint,...i.filter((t=>!t.startsWith(e.mountpoint)))]}return e?o.filter((t=>t.startsWith(e)&&!t.endsWith("$"))):o.filter((e=>!e.endsWith("$")))},async clear(e,t={}){e=__e(e),await Promise.all(r(e,!1).map((async e=>{if(e.driver.clear)return b_e(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=>k_e(e))))},watch:async e=>(await(async()=>{if(!t.watching){t.watching=!0;for(const e in t.mounts)t.unwatch[e]=await S_e(t.mounts[e],i,e)}})(),t.watchListeners.push(e),async()=>{t.watchListeners=t.watchListeners.filter((t=>t!==e)),0===t.watchListeners.length&&await o()}),async unwatch(){t.watchListeners=[],await o()},mount(e,n){if((e=__e(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(S_e(n,i,e)).then((n=>{t.unwatch[e]=n})).catch(console.error),s},async unmount(e,n=!0){(e=__e(e))&&t.mounts[e]&&(t.watching&&e in t.unwatch&&(t.unwatch[e](),delete t.unwatch[e]),n&&await k_e(t.mounts[e]),t.mountpoints=t.mountpoints.filter((t=>t!==e)),delete t.mounts[e])},getMount(e=""){e=T_e(e)+":";const t=n(e);return{driver:t.driver,base:t.base}},getMounts(e="",t={}){e=T_e(e);return r(e,t.parents).map((e=>({driver:e.driver,base:e.mountpoint})))}};return s}function S_e(e,t,n){return e.watch?e.watch(((e,r)=>t(e,n+r))):()=>{}}async function k_e(e){"function"==typeof e.dispose&&await b_e(e.dispose)}function O_e(e){return new Promise(((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)}))}function P_e(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=O_e(n);return(e,n)=>r.then((r=>n(r.transaction(t,e).objectStore(t))))}let R_e;function N_e(){return R_e||(R_e=P_e("keyval-store","keyval")),R_e}function M_e(e,t=N_e()){return t("readonly",(t=>O_e(t.get(e))))}function D_e(e=N_e()){return e("readonly",(e=>{if(e.getAllKeys)return O_e(e.getAllKeys());const t=[];return function(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},O_e(e.transaction)}(e,(e=>t.push(e.key))).then((()=>t))}))}const L_e=e=>JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString()+"n":t)),F_e=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 B_e(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return F_e(e)}catch(t){return e}}function U_e(e){return"string"==typeof e?e:L_e(e)||""}var z_e=(e={})=>{const t=e.base&&e.base.length>0?`${e.base}:`:"",n=e=>t+e;let r;return e.dbName&&e.storeName&&(r=P_e(e.dbName,e.storeName)),{name:"idb-keyval",options:e,hasItem:async e=>!(typeof await M_e(n(e),r)>"u"),getItem:async e=>await M_e(n(e),r)??null,setItem:(e,t)=>function(e,t,n=N_e()){return n("readwrite",(n=>(n.put(t,e),O_e(n.transaction))))}(n(e),t,r),removeItem:e=>function(e,t=N_e()){return t("readwrite",(t=>(t.delete(e),O_e(t.transaction))))}(n(e),r),getKeys:()=>D_e(r),clear:()=>function(e=N_e()){return e("readwrite",(e=>(e.clear(),O_e(e.transaction))))}(r)}};var j_e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},H_e={exports:{}};function W_e(e){var t;return[e[0],B_e(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 j_e<"u"&&j_e.localStorage?H_e.exports=j_e.localStorage:typeof window<"u"&&window.localStorage?H_e.exports=window.localStorage:H_e.exports=new t}();const V_e=async(e,t)=>{t.length&&t.forEach((async t=>{await e.removeItem(t)}))};var G_e={},q_e={},K_e=dt(Uwe),X_e={},Y_e={};let Z_e=class{};var J_e,Q_e,$_e=dt(Object.freeze({__proto__:null,IEvents:Z_e}));function eCe(){return Q_e||(Q_e=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});Xxe.__exportStar(function(){if(J_e)return Y_e;J_e=1,Object.defineProperty(Y_e,"__esModule",{value:!0}),Y_e.IHeartBeat=void 0;const e=$_e;class t extends e.IEvents{constructor(e){super()}}return Y_e.IHeartBeat=t,Y_e}(),e)}(X_e)),X_e}var tCe,nCe,rCe,iCe={},oCe={};function aCe(){return nCe||(nCe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});Xxe.__exportStar(function(){if(tCe)return oCe;tCe=1,Object.defineProperty(oCe,"__esModule",{value:!0}),oCe.HEARTBEAT_EVENTS=oCe.HEARTBEAT_INTERVAL=void 0;const e=Kxe;return oCe.HEARTBEAT_INTERVAL=e.FIVE_SECONDS,oCe.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},oCe}(),e)}(iCe)),iCe}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Xxe;t.__exportStar(function(){if(rCe)return q_e;rCe=1,Object.defineProperty(q_e,"__esModule",{value:!0}),q_e.HeartBeat=void 0;const e=Xxe,t=K_e,n=Kxe,r=eCe(),i=aCe();class o 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 o(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 q_e.HeartBeat=o,q_e}(),e),t.__exportStar(eCe(),e),t.__exportStar(aCe(),e)}(G_e);var sCe,cCe,lCe,uCe,dCe={};function fCe(){if(uCe)return lCe;uCe=1;const e=function(){if(cCe)return sCe;function e(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}return cCe=1,sCe=function(t,n,r){var i=r&&r.stringify||e;if("object"==typeof t&&null!==t){var o=n.length+1;if(1===o)return t;var a=new Array(o);a[0]=i(t);for(var s=1;s<o;s++)a[s]=i(n[s]);return a.join(" ")}if("string"!=typeof t)return t;var c=n.length;if(0===c)return t;for(var l="",u=0,d=-1,f=t&&t.length||0,h=0;h<f;){if(37===t.charCodeAt(h)&&h+1<f){switch(d=d>-1?d:0,t.charCodeAt(h+1)){case 100:case 102:if(u>=c)break;if(null==n[u])break;d<h&&(l+=t.slice(d,h)),l+=Number(n[u]),d=h+2,h++;break;case 105:if(u>=c)break;if(null==n[u])break;d<h&&(l+=t.slice(d,h)),l+=Math.floor(Number(n[u])),d=h+2,h++;break;case 79:case 111:case 106:if(u>=c)break;if(void 0===n[u])break;d<h&&(l+=t.slice(d,h));var p=typeof n[u];if("string"===p){l+="'"+n[u]+"'",d=h+2,h++;break}if("function"===p){l+=n[u].name||"<anonymous>",d=h+2,h++;break}l+=i(n[u]),d=h+2,h++;break;case 115:if(u>=c)break;d<h&&(l+=t.slice(d,h)),l+=String(n[u]),d=h+2,h++;break;case 37:d<h&&(l+=t.slice(d,h)),l+="%",d=h+2,h++,u--}++u}++h}return-1===d?t:(d<f&&(l+=t.slice(d)),l)},sCe}();lCe=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:l,mapHttpResponse:l,wrapRequestSerializer:u,wrapResponseSerializer:u,wrapErrorSerializer:u,req:l,res:l,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 l=e.browser.write||t;e.browser.write&&(e.browser.asObject=!0);const u=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,u);let h=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(h=!1);"function"==typeof l&&(l.error=l.fatal=l.warn=l.info=l.debug=l.trace=l),!1===e.enabled&&(e.level="silent");const p=e.level||"info",m=Object.create(l);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=p,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=u,m._serialize=f,m._stdErrSerialize=h,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({},u,i),l=!0===e.browser.serialize?Object.keys(c):f;delete t.serializers,o([t],l,c,this._stdErrSerialize)}function d(e){this._childLevel=1+(0|e._childLevel),this.error=a(e,t,"error"),this.fatal=a(e,t,"fatal"),this.warn=a(e,t,"warn"),this.info=a(e,t,"info"),this.debug=a(e,t,"debug"),this.trace=a(e,t,"trace"),c&&(this.serializers=c,this._serialize=l),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,a,c){const l=Object.getPrototypeOf(i);i[a]=i.levelVal>i.levels.values[a]?d:l[a]?l[a]:t[a]||t[c]||d,function(n,i,a){if(!n.transmit&&i[a]===d)return;i[a]=function(c){return function(){const l=n.timestamp(),u=new Array(arguments.length),d=Object.getPrototypeOf&&Object.getPrototypeOf(this)===t?t:this;for(var f=0;f<u.length;f++)u[f]=arguments[f];if(n.serialize&&!n.asObject&&o(u,this._serialize,this.serializers,this._stdErrSerialize),n.asObject?c.call(d,function(t,n,i,a){t._serialize&&o(i,t._serialize,t.serializers,t._stdErrSerialize);const s=i.slice();let c=s[0];const l={};a&&(l.time=a);l.level=r.levels.values[n];let u=1+(0|t._childLevel);u<1&&(u=1);if(null!==c&&"object"==typeof c){for(;u--&&"object"==typeof s[0];)Object.assign(l,s.shift());c=s.length?e(s.shift(),s):void 0}else"string"==typeof c&&(c=e(s.shift(),s));void 0!==c&&(l.msg=c);return l}(this,a,u,l)):c.apply(d,u),n.transmit){const e=n.transmit.level||i.level,t=r.levels.values[e],c=r.levels.values[a];if(c<t)return;!function(e,t,n){const r=t.send,i=t.ts,a=t.methodLevel,c=t.methodValue,l=t.val,u=e._logEvent.bindings;o(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===u.indexOf(e)})),e._logEvent.level.label=a,e._logEvent.level.value=c,r(a,e._logEvent,l),e._logEvent=s(u)}(this,{ts:l,methodLevel:a,methodValue:c,transmitLevel:e,transmitValue:r.levels.values[n.transmit.level||i.level],send:n.transmit.send,val:i.levelVal},u)}}}(i[a])}(n,i,a)}function o(e,t,n,i){for(const o in e)if(i&&e[o]instanceof Error)e[o]=r.stdSerializers.err(e[o]);else if("object"==typeof e[o]&&!Array.isArray(e[o]))for(const r in e[o])t&&t.indexOf(r)>-1&&r in n&&(e[o][r]=n[r](e[o][r]))}function a(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:h}function l(){return{}}function u(e){return e}function d(){}function f(){return!1}function h(){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:h,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),lCe}var hCe,pCe={};function mCe(){return hCe||(hCe=1,Object.defineProperty(pCe,"__esModule",{value:!0}),pCe.PINO_CUSTOM_CONTEXT_KEY=pCe.PINO_LOGGER_DEFAULTS=void 0,pCe.PINO_LOGGER_DEFAULTS={level:"info"},pCe.PINO_CUSTOM_CONTEXT_KEY="custom_context"),pCe}var yCe,gCe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pino=void 0;const t=Xxe,n=t.__importDefault(fCe());Object.defineProperty(e,"pino",{enumerable:!0,get:function(){return n.default}}),t.__exportStar(mCe(),e),t.__exportStar(function(){if(yCe)return gCe;yCe=1,Object.defineProperty(gCe,"__esModule",{value:!0}),gCe.generateChildLogger=gCe.formatChildLoggerContext=gCe.getLoggerContext=gCe.setBrowserLoggerContext=gCe.getBrowserLoggerContext=gCe.getDefaultLoggerOptions=void 0;const e=mCe();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 o=r(t,i);return o.trim()?`${o}/${n}`:n}return gCe.getDefaultLoggerOptions=function(t){return Object.assign(Object.assign({},t),{level:(null==t?void 0:t.level)||e.PINO_LOGGER_DEFAULTS.level})},gCe.getBrowserLoggerContext=t,gCe.setBrowserLoggerContext=n,gCe.getLoggerContext=r,gCe.formatChildLoggerContext=i,gCe.generateChildLogger=function(t,r,o=e.PINO_CUSTOM_CONTEXT_KEY){const a=i(t,r,o);return n(t.child({context:a}),a,o)},gCe}(),e)}(dCe);let vCe=class extends Z_e{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}},bCe=class extends Z_e{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}},wCe=class{constructor(e,t){this.logger=e,this.core=t}},ECe=class extends Z_e{constructor(e,t){super(),this.relayer=e,this.logger=t}},xCe=class extends Z_e{constructor(e){super()}},TCe=class{constructor(e,t,n,r){this.core=e,this.logger=t,this.name=n}},ACe=class extends Z_e{constructor(e,t){super(),this.relayer=e,this.logger=t}},_Ce=class extends Z_e{constructor(e,t){super(),this.core=e,this.logger=t}},CCe=class{constructor(e,t){this.projectId=e,this.logger=t}},ICe=class{constructor(e,t){this.projectId=e,this.logger=t}},SCe=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}},kCe=class{constructor(e){this.client=e}};var OCe={},PCe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Hwe,n=tEe;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&&(o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(n>=this.blockSize&&(r=o(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,a=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(a,this._buffer,s-4),o(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 o(e,n,r,o,a,s,c){for(var l,u,d,f,h,p,m,y,g=r[0],v=r[1],b=r[2],w=r[3],E=r[4],x=r[5],T=r[6],A=r[7],_=o[0],C=o[1],I=o[2],S=o[3],k=o[4],O=o[5],P=o[6],R=o[7];c>=128;){for(var N=0;N<16;N++){var M=8*N+s;e[N]=t.readUint32BE(a,M),n[N]=t.readUint32BE(a,M+4)}for(N=0;N<80;N++){var D,L,F=g,B=v,U=b,z=w,j=E,H=x,W=T,V=_,G=C,q=I,K=S,X=k,Y=O,Z=P;if(h=65535&(u=R),p=u>>>16,m=65535&(l=A),y=l>>>16,h+=65535&(u=(k>>>14|E<<18)^(k>>>18|E<<14)^(E>>>9|k<<23)),p+=u>>>16,m+=65535&(l=(E>>>14|k<<18)^(E>>>18|k<<14)^(k>>>9|E<<23)),y+=l>>>16,h+=65535&(u=k&O^~k&P),p+=u>>>16,m+=65535&(l=E&x^~E&T),y+=l>>>16,l=i[2*N],h+=65535&(u=i[2*N+1]),p+=u>>>16,m+=65535&l,y+=l>>>16,l=e[N%16],p+=(u=n[N%16])>>>16,m+=65535&l,y+=l>>>16,m+=(p+=(h+=65535&u)>>>16)>>>16,h=65535&(u=f=65535&h|p<<16),p=u>>>16,m=65535&(l=d=65535&m|(y+=m>>>16)<<16),y=l>>>16,h+=65535&(u=(_>>>28|g<<4)^(g>>>2|_<<30)^(g>>>7|_<<25)),p+=u>>>16,m+=65535&(l=(g>>>28|_<<4)^(_>>>2|g<<30)^(_>>>7|g<<25)),y+=l>>>16,p+=(u=_&C^_&I^C&I)>>>16,m+=65535&(l=g&v^g&b^v&b),y+=l>>>16,D=65535&(m+=(p+=(h+=65535&u)>>>16)>>>16)|(y+=m>>>16)<<16,L=65535&h|p<<16,h=65535&(u=K),p=u>>>16,m=65535&(l=z),y=l>>>16,p+=(u=f)>>>16,m+=65535&(l=d),y+=l>>>16,v=F,b=B,w=U,E=z=65535&(m+=(p+=(h+=65535&u)>>>16)>>>16)|(y+=m>>>16)<<16,x=j,T=H,A=W,g=D,C=V,I=G,S=q,k=K=65535&h|p<<16,O=X,P=Y,R=Z,_=L,N%16==15)for(M=0;M<16;M++)l=e[M],h=65535&(u=n[M]),p=u>>>16,m=65535&l,y=l>>>16,l=e[(M+9)%16],h+=65535&(u=n[(M+9)%16]),p+=u>>>16,m+=65535&l,y+=l>>>16,d=e[(M+1)%16],h+=65535&(u=((f=n[(M+1)%16])>>>1|d<<31)^(f>>>8|d<<24)^(f>>>7|d<<25)),p+=u>>>16,m+=65535&(l=(d>>>1|f<<31)^(d>>>8|f<<24)^d>>>7),y+=l>>>16,d=e[(M+14)%16],p+=(u=((f=n[(M+14)%16])>>>19|d<<13)^(d>>>29|f<<3)^(f>>>6|d<<26))>>>16,m+=65535&(l=(d>>>19|f<<13)^(f>>>29|d<<3)^d>>>6),y+=l>>>16,y+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,e[M]=65535&m|y<<16,n[M]=65535&h|p<<16}h=65535&(u=_),p=u>>>16,m=65535&(l=g),y=l>>>16,l=r[0],p+=(u=o[0])>>>16,m+=65535&l,y+=l>>>16,y+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[0]=g=65535&m|y<<16,o[0]=_=65535&h|p<<16,h=65535&(u=C),p=u>>>16,m=65535&(l=v),y=l>>>16,l=r[1],p+=(u=o[1])>>>16,m+=65535&l,y+=l>>>16,y+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[1]=v=65535&m|y<<16,o[1]=C=65535&h|p<<16,h=65535&(u=I),p=u>>>16,m=65535&(l=b),y=l>>>16,l=r[2],p+=(u=o[2])>>>16,m+=65535&l,y+=l>>>16,y+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[2]=b=65535&m|y<<16,o[2]=I=65535&h|p<<16,h=65535&(u=S),p=u>>>16,m=65535&(l=w),y=l>>>16,l=r[3],p+=(u=o[3])>>>16,m+=65535&l,y+=l>>>16,y+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[3]=w=65535&m|y<<16,o[3]=S=65535&h|p<<16,h=65535&(u=k),p=u>>>16,m=65535&(l=E),y=l>>>16,l=r[4],p+=(u=o[4])>>>16,m+=65535&l,y+=l>>>16,y+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[4]=E=65535&m|y<<16,o[4]=k=65535&h|p<<16,h=65535&(u=O),p=u>>>16,m=65535&(l=x),y=l>>>16,l=r[5],p+=(u=o[5])>>>16,m+=65535&l,y+=l>>>16,y+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[5]=x=65535&m|y<<16,o[5]=O=65535&h|p<<16,h=65535&(u=P),p=u>>>16,m=65535&(l=T),y=l>>>16,l=r[6],p+=(u=o[6])>>>16,m+=65535&l,y+=l>>>16,y+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[6]=T=65535&m|y<<16,o[6]=P=65535&h|p<<16,h=65535&(u=R),p=u>>>16,m=65535&(l=A),y=l>>>16,l=r[7],p+=(u=o[7])>>>16,m+=65535&l,y+=l>>>16,y+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[7]=A=65535&m|y<<16,o[7]=R=65535&h|p<<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}}(PCe),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=xEe,n=PCe,r=tEe;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 o=i(),a=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]),l=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),u=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 h(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 p(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];h(r),h(r),h(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,p(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 g(e,t){const n=new Uint8Array(32),r=new Uint8Array(32);return m(n,e),m(r,t),y(n,r)}function v(e){const t=new Uint8Array(32);return m(t,e),1&t[0]}function b(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 E(e,t,n){let r,i,o=0,a=0,s=0,c=0,l=0,u=0,d=0,f=0,h=0,p=0,m=0,y=0,g=0,v=0,b=0,w=0,E=0,x=0,T=0,A=0,_=0,C=0,I=0,S=0,k=0,O=0,P=0,R=0,N=0,M=0,D=0,L=n[0],F=n[1],B=n[2],U=n[3],z=n[4],j=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],Z=n[14],J=n[15];r=t[0],o+=r*L,a+=r*F,s+=r*B,c+=r*U,l+=r*z,u+=r*j,d+=r*H,f+=r*W,h+=r*V,p+=r*G,m+=r*q,y+=r*K,g+=r*X,v+=r*Y,b+=r*Z,w+=r*J,r=t[1],a+=r*L,s+=r*F,c+=r*B,l+=r*U,u+=r*z,d+=r*j,f+=r*H,h+=r*W,p+=r*V,m+=r*G,y+=r*q,g+=r*K,v+=r*X,b+=r*Y,w+=r*Z,E+=r*J,r=t[2],s+=r*L,c+=r*F,l+=r*B,u+=r*U,d+=r*z,f+=r*j,h+=r*H,p+=r*W,m+=r*V,y+=r*G,g+=r*q,v+=r*K,b+=r*X,w+=r*Y,E+=r*Z,x+=r*J,r=t[3],c+=r*L,l+=r*F,u+=r*B,d+=r*U,f+=r*z,h+=r*j,p+=r*H,m+=r*W,y+=r*V,g+=r*G,v+=r*q,b+=r*K,w+=r*X,E+=r*Y,x+=r*Z,T+=r*J,r=t[4],l+=r*L,u+=r*F,d+=r*B,f+=r*U,h+=r*z,p+=r*j,m+=r*H,y+=r*W,g+=r*V,v+=r*G,b+=r*q,w+=r*K,E+=r*X,x+=r*Y,T+=r*Z,A+=r*J,r=t[5],u+=r*L,d+=r*F,f+=r*B,h+=r*U,p+=r*z,m+=r*j,y+=r*H,g+=r*W,v+=r*V,b+=r*G,w+=r*q,E+=r*K,x+=r*X,T+=r*Y,A+=r*Z,_+=r*J,r=t[6],d+=r*L,f+=r*F,h+=r*B,p+=r*U,m+=r*z,y+=r*j,g+=r*H,v+=r*W,b+=r*V,w+=r*G,E+=r*q,x+=r*K,T+=r*X,A+=r*Y,_+=r*Z,C+=r*J,r=t[7],f+=r*L,h+=r*F,p+=r*B,m+=r*U,y+=r*z,g+=r*j,v+=r*H,b+=r*W,w+=r*V,E+=r*G,x+=r*q,T+=r*K,A+=r*X,_+=r*Y,C+=r*Z,I+=r*J,r=t[8],h+=r*L,p+=r*F,m+=r*B,y+=r*U,g+=r*z,v+=r*j,b+=r*H,w+=r*W,E+=r*V,x+=r*G,T+=r*q,A+=r*K,_+=r*X,C+=r*Y,I+=r*Z,S+=r*J,r=t[9],p+=r*L,m+=r*F,y+=r*B,g+=r*U,v+=r*z,b+=r*j,w+=r*H,E+=r*W,x+=r*V,T+=r*G,A+=r*q,_+=r*K,C+=r*X,I+=r*Y,S+=r*Z,k+=r*J,r=t[10],m+=r*L,y+=r*F,g+=r*B,v+=r*U,b+=r*z,w+=r*j,E+=r*H,x+=r*W,T+=r*V,A+=r*G,_+=r*q,C+=r*K,I+=r*X,S+=r*Y,k+=r*Z,O+=r*J,r=t[11],y+=r*L,g+=r*F,v+=r*B,b+=r*U,w+=r*z,E+=r*j,x+=r*H,T+=r*W,A+=r*V,_+=r*G,C+=r*q,I+=r*K,S+=r*X,k+=r*Y,O+=r*Z,P+=r*J,r=t[12],g+=r*L,v+=r*F,b+=r*B,w+=r*U,E+=r*z,x+=r*j,T+=r*H,A+=r*W,_+=r*V,C+=r*G,I+=r*q,S+=r*K,k+=r*X,O+=r*Y,P+=r*Z,R+=r*J,r=t[13],v+=r*L,b+=r*F,w+=r*B,E+=r*U,x+=r*z,T+=r*j,A+=r*H,_+=r*W,C+=r*V,I+=r*G,S+=r*q,k+=r*K,O+=r*X,P+=r*Y,R+=r*Z,N+=r*J,r=t[14],b+=r*L,w+=r*F,E+=r*B,x+=r*U,T+=r*z,A+=r*j,_+=r*H,C+=r*W,I+=r*V,S+=r*G,k+=r*q,O+=r*K,P+=r*X,R+=r*Y,N+=r*Z,M+=r*J,r=t[15],w+=r*L,E+=r*F,x+=r*B,T+=r*U,A+=r*z,_+=r*j,C+=r*H,I+=r*W,S+=r*V,k+=r*G,O+=r*q,P+=r*K,R+=r*X,N+=r*Y,M+=r*Z,D+=r*J,o+=38*E,a+=38*x,s+=38*T,c+=38*A,l+=38*_,u+=38*C,d+=38*I,f+=38*S,h+=38*k,p+=38*O,m+=38*P,y+=38*R,g+=38*N,v+=38*M,b+=38*D,i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=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=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=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=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=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=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=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,o+=i-1+37*(i-1),i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=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=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=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=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=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=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=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=s,e[3]=c,e[4]=l,e[5]=u,e[6]=d,e[7]=f,e[8]=h,e[9]=p,e[10]=m,e[11]=y,e[12]=g,e[13]=v,e[14]=b,e[15]=w}function x(e,t){E(e,t,t)}function T(e,t){const n=i();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)x(n,n),2!==r&&4!==r&&E(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function A(e,t){const n=i(),r=i(),o=i(),a=i(),s=i(),l=i(),u=i(),d=i(),f=i();w(n,e[1],e[0]),w(f,t[1],t[0]),E(n,n,f),b(r,e[0],e[1]),b(f,t[0],t[1]),E(r,r,f),E(o,e[3],t[3]),E(o,o,c),E(a,e[2],t[2]),b(a,a,a),w(s,r,n),w(l,a,o),b(u,a,o),b(d,r,n),E(e[0],s,l),E(e[1],d,u),E(e[2],u,l),E(e[3],s,d)}function _(e,t,n){for(let r=0;r<4;r++)p(e[r],t[r],n)}function C(e,t){const n=i(),r=i(),o=i();T(o,t[2]),E(n,t[0],o),E(r,t[1],o),m(e,r),e[31]^=v(n)<<7}function I(e,t,n){f(e[0],o),f(e[1],a),f(e[2],a),f(e[3],o);for(let r=255;r>=0;--r){const i=n[r/8|0]>>(7&r)&1;_(e,t,i),A(t,e),A(e,e),_(e,t,i)}}function S(e,t){const n=[i(),i(),i(),i()];f(n[0],l),f(n[1],u),f(n[2],a),E(n[3],l,u),I(e,n,t)}function k(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 o=new Uint8Array(32),a=[i(),i(),i(),i()];S(a,r),C(o,a);const s=new Uint8Array(64);return s.set(t),s.set(o,32),{publicKey:o,secretKey:s}}e.generateKeyPairFromSeed=k,e.generateKeyPair=function(e){const n=(0,t.randomBytes)(32,e),i=k(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 O=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 P(e,t){let n,r,i,o;for(r=63;r>=32;--r){for(n=0,i=r-32,o=r-12;i<o;++i)t[i]+=n-16*t[r]*O[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)*O[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*O[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;P(e,t)}function N(e,t){const n=i(),r=i(),c=i(),l=i(),u=i(),h=i(),p=i();return f(e[2],a),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),x(c,e[1]),E(l,c,s),w(c,c,e[2]),b(l,e[2],l),x(u,l),x(h,u),E(p,h,u),E(n,p,c),E(n,n,l),function(e,t){const n=i();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=250;r>=0;r--)x(n,n),1!==r&&E(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}(n,n),E(n,n,c),E(n,n,l),E(n,n,l),E(e[0],n,l),x(r,e[0]),E(r,r,l),g(r,c)&&E(e[0],e[0],d),x(r,e[0]),E(r,r,l),g(r,c)?-1:(v(e[0])===t[31]>>7&&w(e[0],o,e[0]),E(e[3],e[0],e[1]),0)}e.sign=function(e,t){const r=new Float64Array(64),o=[i(),i(),i(),i()],a=(0,n.hash)(e.subarray(0,32));a[0]&=248,a[31]&=127,a[31]|=64;const s=new Uint8Array(64);s.set(a.subarray(32),32);const c=new n.SHA512;c.update(s.subarray(32)),c.update(t);const l=c.digest();c.clean(),R(l),S(o,l),C(s,o),c.reset(),c.update(s.subarray(0,32)),c.update(e.subarray(32)),c.update(t);const u=c.digest();R(u);for(let e=0;e<32;e++)r[e]=l[e];for(let e=0;e<32;e++)for(let t=0;t<32;t++)r[e+t]+=u[e]*a[t];return P(s.subarray(32),r),s},e.verify=function(t,r,o){const a=new Uint8Array(32),s=[i(),i(),i(),i()],c=[i(),i(),i(),i()];if(o.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if(N(c,t))return!1;const l=new n.SHA512;l.update(o.subarray(0,32)),l.update(t),l.update(r);const u=l.digest();return R(u),I(s,c,u),S(c,o.subarray(32)),A(s,c),C(a,s),!y(o,a)},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(),o=t[1];b(n,a,o),w(r,a,o),T(r,r),E(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}}(OCe);const RCe=".",NCe="base64url",MCe="utf8",DCe="utf8",LCe=":",FCe="did",BCe="key",UCe="base58btc",zCe="z",jCe="K36";function HCe(e){return Nxe(Rxe(U_e(e),MCe),NCe)}function WCe(e){const t=Rxe(jCe,UCe),n=zCe+Nxe(NEe([t,e]),UCe);return[FCe,BCe,n].join(LCe)}function VCe(e=xEe.randomBytes(32)){return OCe.generateKeyPairFromSeed(e)}async function GCe(e,t,n,r,i=Kxe.fromMiliseconds(Date.now())){const o={alg:"EdDSA",typ:"JWT"},a={iss:WCe(r.publicKey),sub:e,aud:t,iat:i,exp:i+n},s=Rxe([HCe((c={header:o,payload:a}).header),HCe(c.payload)].join(RCe),DCe);var c;return function(e){return[HCe(e.header),HCe(e.payload),(t=e.signature,Nxe(t,NCe))].join(RCe);var t}({header:o,payload:a,signature:OCe.sign(r.secretKey,s)})}const qCe="INTERNAL_ERROR",KCe="SERVER_ERROR",XCe=[-32700,-32600,-32601,-32602,-32603],YCe={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"},[qCe]:{code:-32603,message:"Internal error"},[KCe]:{code:-32e3,message:"Server error"}},ZCe=KCe;function JCe(e){return Object.keys(YCe).includes(e)?YCe[e]:YCe[ZCe]}function QCe(e,t,n){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${t}`):e}var $Ce,eIe={},tIe={};var nIe,rIe={};function iIe(e=3){return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function oIe(e=6){return BigInt(iIe(e))}function aIe(e,t,n){return{id:n||iIe(),jsonrpc:"2.0",method:e,params:t}}function sIe(e,t){return{id:e,jsonrpc:"2.0",result:t}}function cIe(e,t,n){return{id:e,jsonrpc:"2.0",error:lIe(t,n)}}function lIe(e,t){return void 0===e?JCe(qCe):("string"==typeof e&&(e=Object.assign(Object.assign({},JCe(KCe)),{message:e})),void 0!==t&&(e.data=t),n=e.code,XCe.includes(n)&&(e=function(e){const t=Object.values(YCe).find((t=>t.code===e));return t||YCe[ZCe]}(e.code)),e);var n}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Xxe;t.__exportStar(function(){if($Ce)return tIe;function e(){return(null==lt?void 0:lt.crypto)||(null==lt?void 0:lt.msCrypto)||{}}function t(){const t=e();return t.subtle||t.webkitSubtle}return $Ce=1,Object.defineProperty(tIe,"__esModule",{value:!0}),tIe.isBrowserCryptoAvailable=tIe.getSubtleCrypto=tIe.getBrowerCrypto=void 0,tIe.getBrowerCrypto=e,tIe.getSubtleCrypto=t,tIe.isBrowserCryptoAvailable=function(){return!!e()&&!!t()},tIe}(),e),t.__exportStar(function(){if(nIe)return rIe;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 nIe=1,Object.defineProperty(rIe,"__esModule",{value:!0}),rIe.isBrowser=rIe.isNode=rIe.isReactNative=void 0,rIe.isReactNative=e,rIe.isNode=t,rIe.isBrowser=function(){return!e()&&!t()},rIe}(),e)}(eIe);class uIe{}class dIe extends uIe{constructor(){super()}}class fIe extends dIe{constructor(e){super()}}function hIe(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 pIe(e){return hIe(e,"^https?:")}function mIe(e){return hIe(e,"^wss?:")}function yIe(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function gIe(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function vIe(e){return gIe(e)&&"method"in e}function bIe(e){return gIe(e)&&(wIe(e)||EIe(e))}function wIe(e){return"result"in e}function EIe(e){return"error"in e}class xIe extends fIe{constructor(e){super(e),this.events=new Nwe,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(aIe(e.method,e.params||[],e.id||oIe().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=>{EIe(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),bIe(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 TIe=e=>e.split("?")[0],AIe=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 _Ie={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=1,i=2,o=9007199254740991,a="[object Arguments]",s="[object Array]",c="[object AsyncFunction]",l="[object Boolean]",u="[object Date]",d="[object Error]",f="[object Function]",h="[object GeneratorFunction]",p="[object Map]",m="[object Number]",y="[object Null]",g="[object Object]",v="[object Promise]",b="[object Proxy]",w="[object RegExp]",E="[object Set]",x="[object String]",T="[object Symbol]",A="[object Undefined]",_="[object WeakMap]",C="[object ArrayBuffer]",I="[object DataView]",S=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,O={};O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O[a]=O[s]=O[C]=O[l]=O[I]=O[u]=O[d]=O[f]=O[p]=O[m]=O[g]=O[w]=O[E]=O[x]=O[_]=!1;var P="object"==typeof lt&<&<.Object===Object&<,R="object"==typeof self&&self&&self.Object===Object&&self,N=P||R||Function("return this")(),M=t&&!t.nodeType&&t,D=M&&e&&!e.nodeType&&e,L=D&&D.exports===M,F=L&&P.process,B=function(){try{return F&&F.binding&&F.binding("util")}catch(e){}}(),U=B&&B.isTypedArray;function z(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 j(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,Z=function(){var e=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),J=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,oe=Object.getOwnPropertySymbols,ae=$?$.isBuffer:void 0,se=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),ce=Le(N,"DataView"),le=Le(N,"Map"),ue=Le(N,"Promise"),de=Le(N,"Set"),fe=Le(N,"WeakMap"),he=Le(Object,"create"),pe=ze(ce),me=ze(le),ye=ze(ue),ge=ze(de),ve=ze(fe),be=ee?ee.prototype:void 0,we=be?be.valueOf:void 0;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 xe(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 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 Ae(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Te;++t<n;)this.add(e[t])}function _e(e){var t=this.__data__=new xe(e);this.size=t.size}function Ce(e,t){var n=We(e),r=!n&&He(e),i=!n&&!r&&Ve(e),o=!n&&!r&&!i&&Ze(e),a=n||r||i||o,s=a?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 l in e)!t&&!Y.call(e,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ue(l,c))||s.push(l);return s}function Ie(e,t){for(var n=e.length;n--;)if(je(e[n][0],t))return n;return-1}function Se(e){return null==e?void 0===e?A: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=J.call(e);r&&(t?e[ie]=n:delete e[ie]);return i}(e):function(e){return J.call(e)}(e)}function ke(e){return Xe(e)&&Se(e)==a}function Oe(e,t,n,o,c){return e===t||(null==e||null==t||!Xe(e)&&!Xe(t)?e!=e&&t!=t:function(e,t,n,o,c,f){var h=We(e),y=We(t),v=h?s:Be(e),b=y?s:Be(t),A=(v=v==a?g:v)==g,_=(b=b==a?g:b)==g,S=v==b;if(S&&Ve(e)){if(!Ve(t))return!1;h=!0,A=!1}if(S&&!A)return f||(f=new _e),h||Ze(e)?Ne(e,t,n,o,c,f):function(e,t,n,o,a,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 l:case u:case m:return je(+e,+t);case d:return e.name==t.name&&e.message==t.message;case w:case x:return e==t+"";case p:var f=H;case E:var h=o&r;if(f||(f=W),e.size!=t.size&&!h)return!1;var y=c.get(e);if(y)return y==t;o|=i,c.set(e,t);var g=Ne(f(e),f(t),o,a,s,c);return c.delete(e),g;case T:if(we)return we.call(e)==we.call(t)}return!1}(e,t,v,n,o,c,f);if(!(n&r)){var k=A&&Y.call(e,"__wrapped__"),O=_&&Y.call(t,"__wrapped__");if(k||O){var P=k?e.value():e,R=O?t.value():t;return f||(f=new _e),c(P,R,n,o,f)}}if(!S)return!1;return f||(f=new _e),function(e,t,n,i,o,a){var s=n&r,c=Me(e),l=c.length,u=Me(t),d=u.length;if(l!=d&&!s)return!1;var f=l;for(;f--;){var h=c[f];if(!(s?h in t:Y.call(t,h)))return!1}var p=a.get(e);if(p&&a.get(t))return p==t;var m=!0;a.set(e,t),a.set(t,e);var y=s;for(;++f<l;){var g=e[h=c[f]],v=t[h];if(i)var b=s?i(v,g,h,t,e,a):i(g,v,h,e,t,a);if(!(void 0===b?g===v||o(g,v,n,i,a):b)){m=!1;break}y||(y="constructor"==h)}if(m&&!y){var w=e.constructor,E=t.constructor;w==E||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof E&&E instanceof E||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,n,o,c,f)}(e,t,n,o,Oe,c))}function Pe(e){return!(!Ke(e)||(t=e,Z&&Z in t))&&(Ge(e)?Q:S).test(ze(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 o in Object(e))Y.call(e,o)&&"constructor"!=o&&i.push(o);return i}function Ne(e,t,n,o,a,s){var c=n&r,l=e.length,u=t.length;if(l!=u&&!(c&&u>l))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var f=-1,h=!0,p=n&i?new Ae:void 0;for(s.set(e,t),s.set(t,e);++f<l;){var m=e[f],y=t[f];if(o)var g=c?o(y,m,f,t,e,s):o(m,y,f,e,t,s);if(void 0!==g){if(g)continue;h=!1;break}if(p){if(!z(t,(function(e,t){if(!j(p,t)&&(m===e||a(m,e,n,o,s)))return p.push(t)}))){h=!1;break}}else if(m!==y&&!a(m,y,n,o,s)){h=!1;break}}return s.delete(e),s.delete(t),h}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,Je,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 Pe(n)?n:void 0}Ee.prototype.clear=function(){this.__data__=he?he(null):{},this.size=0},Ee.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ee.prototype.get=function(e){var t=this.__data__;if(he){var r=t[e];return r===n?void 0:r}return Y.call(t,e)?t[e]:void 0},Ee.prototype.has=function(e){var t=this.__data__;return he?void 0!==t[e]:Y.call(t,e)},Ee.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=he&&void 0===t?n:t,this},xe.prototype.clear=function(){this.__data__=[],this.size=0},xe.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)},xe.prototype.get=function(e){var t=this.__data__,n=Ie(t,e);return n<0?void 0:t[n][1]},xe.prototype.has=function(e){return Ie(this.__data__,e)>-1},xe.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},Te.prototype.clear=function(){this.size=0,this.__data__={hash:new Ee,map:new(le||xe),string:new Ee}},Te.prototype.delete=function(e){var t=De(this,e).delete(e);return this.size-=t?1:0,t},Te.prototype.get=function(e){return De(this,e).get(e)},Te.prototype.has=function(e){return De(this,e).has(e)},Te.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},Ae.prototype.add=Ae.prototype.push=function(e){return this.__data__.set(e,n),this},Ae.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.clear=function(){this.__data__=new xe,this.size=0},_e.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!le||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Te(r)}return n.set(e,t),this.size=n.size,this};var Fe=oe?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(oe(e),(function(t){return ne.call(e,t)})))}:function(){return[]},Be=Se;function Ue(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||k.test(e))&&e>-1&&e%1==0&&e<t}function ze(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function je(e,t){return e===t||e!=e&&t!=t}(ce&&Be(new ce(new ArrayBuffer(1)))!=I||le&&Be(new le)!=p||ue&&Be(ue.resolve())!=v||de&&Be(new de)!=E||fe&&Be(new fe)!=_)&&(Be=function(e){var t=Se(e),n=t==g?e.constructor:void 0,r=n?ze(n):"";if(r)switch(r){case pe:return I;case me:return p;case ye:return v;case ge:return E;case ve:return _}return t});var He=ke(function(){return arguments}())?ke:function(e){return Xe(e)&&Y.call(e,"callee")&&!ne.call(e,"callee")},We=Array.isArray;var Ve=ae||function(){return!1};function Ge(e){if(!Ke(e))return!1;var t=Se(e);return t==f||t==h||t==c||t==b}function qe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}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,Ze=U?(Ye=U,function(e){return Ye(e)}):function(e){return Xe(e)&&qe(e.length)&&!!O[Se(e)]};function Je(e){return null!=(t=e)&&qe(t.length)&&!Ge(t)?Ce(e):Re(e);var t}e.exports=function(e,t){return Oe(e,t)}}(_Ie,_Ie.exports);var CIe=ut(_Ie.exports),IIe=dt(Nue),SIe=ut(self.fetch||(self.fetch=IIe.default||IIe));var kIe=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 o=e.charAt(i),a=o.charCodeAt(0);if(255!==n[a])throw new TypeError(o+" is ambiguous");n[a]=i}var s=e.length,c=e.charAt(0),l=Math.log(s)/Math.log(256),u=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 o=(e.length-t)*l+1>>>0,a=new Uint8Array(o);e[t];){var u=n[e.charCodeAt(t)];if(255===u)return;for(var d=0,f=o-1;(0!==u||d<i)&&-1!==f;f--,d++)u+=s*a[f]>>>0,a[f]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var h=o-i;h!==o&&0===a[h];)h++;for(var p=new Uint8Array(r+(o-h)),m=r;h!==o;)p[m++]=a[h++];return p}}}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,o=t.length;i!==o&&0===t[i];)i++,n++;for(var a=(o-i)*u+1>>>0,l=new Uint8Array(a);i!==o;){for(var d=t[i],f=0,h=a-1;(0!==d||f<r)&&-1!==h;h--,f++)d+=256*l[h]>>>0,l[h]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");r=f,i++}for(var p=a-r;p!==a&&0===l[p];)p++;for(var m=c.repeat(n);p<a;++p)m+=e.charAt(l[p]);return m},decodeUnsafe:d,decode:function(e){var n=d(e);if(n)return n;throw new Error(`Non-${t} character`)}}},OIe=kIe;const PIe=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 RIe{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 NIe{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 DIe(this,e)}}class MIe{constructor(e){this.decoders=e}or(e){return DIe(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 DIe=(e,t)=>new MIe({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class LIe{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new RIe(e,t,n),this.decoder=new NIe(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const FIe=({name:e,prefix:t,encode:n,decode:r})=>new LIe(e,t,n,r),BIe=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=OIe(n,t);return FIe({prefix:e,name:t,encode:r,decode:e=>PIe(i(e))})},UIe=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>FIe({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let o="",a=0,s=0;for(let r=0;r<e.length;++r)for(s=s<<8|e[r],a+=8;a>n;)a-=n,o+=t[i&s>>a];if(a&&(o+=t[i&s<<n-a]),r)for(;o.length*n&7;)o+="=";return o})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const a=new Uint8Array(o*n/8|0);let s=0,c=0,l=0;for(let t=0;t<o;++t){const o=i[e[t]];if(void 0===o)throw new SyntaxError(`Non-${r} character`);c=c<<n|o,s+=n,s>=8&&(s-=8,a[l++]=255&c>>s)}if(s>=n||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return a})(t,r,n,e)}),zIe=FIe({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var jIe=Object.freeze({__proto__:null,identity:zIe});const HIe=UIe({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var WIe=Object.freeze({__proto__:null,base2:HIe});const VIe=UIe({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var GIe=Object.freeze({__proto__:null,base8:VIe});const qIe=BIe({prefix:"9",name:"base10",alphabet:"0123456789"});var KIe=Object.freeze({__proto__:null,base10:qIe});const XIe=UIe({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),YIe=UIe({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var ZIe=Object.freeze({__proto__:null,base16:XIe,base16upper:YIe});const JIe=UIe({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),QIe=UIe({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),$Ie=UIe({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),eSe=UIe({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),tSe=UIe({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),nSe=UIe({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),rSe=UIe({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),iSe=UIe({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),oSe=UIe({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var aSe=Object.freeze({__proto__:null,base32:JIe,base32upper:QIe,base32pad:$Ie,base32padupper:eSe,base32hex:tSe,base32hexupper:nSe,base32hexpad:rSe,base32hexpadupper:iSe,base32z:oSe});const sSe=BIe({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),cSe=BIe({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var lSe=Object.freeze({__proto__:null,base36:sSe,base36upper:cSe});const uSe=BIe({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),dSe=BIe({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var fSe=Object.freeze({__proto__:null,base58btc:uSe,base58flickr:dSe});const hSe=UIe({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),pSe=UIe({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),mSe=UIe({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),ySe=UIe({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var gSe=Object.freeze({__proto__:null,base64:hSe,base64pad:pSe,base64url:mSe,base64urlpad:ySe});const vSe=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),bSe=vSe.reduce(((e,t,n)=>(e[n]=t,e)),[]),wSe=vSe.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const ESe=FIe({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=bSe[t]),"")},decode:function(e){const t=[];for(const n of e){const e=wSe[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var xSe=Object.freeze({__proto__:null,base256emoji:ESe}),TSe=function e(t,n,r){n=n||[];for(var i=r=r||0;t>=CSe;)n[r++]=255&t|ASe,t/=128;for(;t&_Se;)n[r++]=255&t|ASe,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},ASe=128,_Se=-128,CSe=Math.pow(2,31);var ISe=function e(t,n){var r,i=0,o=(n=n||0,0),a=n,s=t.length;do{if(a>=s)throw e.bytes=0,new RangeError("Could not decode varint");r=t[a++],i+=o<28?(r&kSe)<<o:(r&kSe)*Math.pow(2,o),o+=7}while(r>=SSe);return e.bytes=a-n,i},SSe=128,kSe=127;var OSe=Math.pow(2,7),PSe=Math.pow(2,14),RSe=Math.pow(2,21),NSe=Math.pow(2,28),MSe=Math.pow(2,35),DSe=Math.pow(2,42),LSe=Math.pow(2,49),FSe=Math.pow(2,56),BSe=Math.pow(2,63),USe={encode:TSe,decode:ISe,encodingLength:function(e){return e<OSe?1:e<PSe?2:e<RSe?3:e<NSe?4:e<MSe?5:e<DSe?6:e<LSe?7:e<FSe?8:e<BSe?9:10}},zSe=USe;const jSe=(e,t,n=0)=>(zSe.encode(e,t,n),t),HSe=e=>zSe.encodingLength(e),WSe=(e,t)=>{const n=t.byteLength,r=HSe(e),i=r+HSe(n),o=new Uint8Array(i+n);return jSe(e,o,0),jSe(n,o,r),o.set(t,i),new VSe(e,n,t,o)};let VSe=class{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}};const GSe=({name:e,code:t,encode:n})=>new qSe(e,t,n);let qSe=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?WSe(this.code,t):t.then((e=>WSe(this.code,e)))}throw Error("Unknown type, must be binary type")}};const KSe=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),XSe=GSe({name:"sha2-256",code:18,encode:KSe("SHA-256")}),YSe=GSe({name:"sha2-512",code:19,encode:KSe("SHA-512")});Object.freeze({__proto__:null,sha256:XSe,sha512:YSe});const ZSe=PIe,JSe={code:0,name:"identity",encode:ZSe,digest:e=>WSe(0,ZSe(e))};Object.freeze({__proto__:null,identity:JSe});new TextEncoder,new TextDecoder;const QSe={...jIe,...WIe,...GIe,...KIe,...ZIe,...aSe,...lSe,...fSe,...gSe,...xSe};function $Se(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function eke(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const tke=eke("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),nke=eke("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?$Se(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})),rke={utf8:tke,"utf-8":tke,hex:QSe.base16,latin1:nke,ascii:nke,binary:nke,...QSe};const ike="core",oke=`wc@2:${ike}:`,ake="error",ske={database:":memory:"},cke="client_ed25519_seed",lke=Kxe.ONE_DAY,uke=Kxe.SIX_HOURS,dke="wss://relay.walletconnect.com",fke="wss://relay.walletconnect.org",hke="relayer_message",pke="relayer_message_ack",mke="relayer_connect",yke="relayer_disconnect",gke="relayer_error",vke="relayer_connection_stalled",bke="relayer_publish",wke="payload",Eke="connect",xke="disconnect",Tke="error",Ake=Kxe.ONE_SECOND,_ke="subscription_created",Cke="subscription_deleted",Ike="subscription_sync",Ske="subscription_resubscribed",kke=1e3*Kxe.FIVE_SECONDS,Oke={wc_pairingDelete:{req:{ttl:Kxe.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:Kxe.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:Kxe.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:Kxe.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:Kxe.ONE_DAY,prompt:!1,tag:0},res:{ttl:Kxe.ONE_DAY,prompt:!1,tag:0}}},Pke="pairing_create",Rke="pairing_expire",Nke="pairing_delete",Mke="pairing_ping",Dke="history_created",Lke="history_updated",Fke="history_deleted",Bke="history_sync",Uke="expirer_created",zke="expirer_deleted",jke="expirer_expired",Hke="expirer_sync",Wke="verify-api",Vke="https://verify.walletconnect.com",Gke="https://verify.walletconnect.org",qke=[Vke,Gke];let Kke=class extends wCe{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=oke,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=XTe(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)[XTe(t)]<"u"},this.del=async e=>{this.isInitialized(),this.messages.delete(e),await this.persist()},this.logger=dCe.generateChildLogger(e,this.name),this.core=t}get context(){return dCe.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,yAe(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?gAe(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=VAe("NOT_INITIALIZED",this.name);throw new Error(e)}}};class Xke extends ECe{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new Nwe,this.name="publisher",this.queue=new Map,this.publishTimeout=Kxe.toMiliseconds(2*Kxe.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||uke,o=CAe(n),a=n?.prompt||!1,s=n?.tag||0,c=n?.id||oIe().toString(),l={topic:e,message:t,opts:{ttl:i,relay:o,prompt:a,tag:s,id:c}},u=setTimeout((()=>this.queue.set(c,l)),this.publishTimeout);try{await await bAe(this.rpcPublish(e,t,i,o,a,s,c),this.publishTimeout,`Failed to publish payload, please try again. id:${c} tag:${s}`),this.removeRequestFromQueue(c),this.relayer.events.emit(bke,l)}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(u)}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=dCe.generateChildLogger(t,this.name),this.registerEventListeners()}get context(){return dCe.getLoggerContext(this.logger)}rpcPublish(e,t,n,r,i,o,a){var s,c,l,u;const d={method:IAe(r.protocol).publish,params:{topic:e,message:t,ttl:n,prompt:i,tag:o},id:a};return XAe(null==(s=d.params)?void 0:s.prompt)&&(null==(c=d.params)||delete c.prompt),XAe(null==(l=d.params)?void 0:l.tag)&&(null==(u=d.params)||delete u.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(G_e.HEARTBEAT_EVENTS.pulse,(()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(vke);this.checkQueue()})),this.relayer.on(pke,(e=>{this.removeRequestFromQueue(e.id.toString())}))}}class Yke{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 Zke=Object.defineProperty,Jke=Object.defineProperties,Qke=Object.getOwnPropertyDescriptors,$ke=Object.getOwnPropertySymbols,eOe=Object.prototype.hasOwnProperty,tOe=Object.prototype.propertyIsEnumerable,nOe=(e,t,n)=>t in e?Zke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rOe=(e,t)=>{for(var n in t||(t={}))eOe.call(t,n)&&nOe(e,n,t[n]);if($ke)for(var n of $ke(t))tOe.call(t,n)&&nOe(e,n,t[n]);return e},iOe=(e,t)=>Jke(e,Qke(t));let oOe=class extends ACe{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new Yke,this.events=new Nwe,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=oke,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=CAe(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 Kxe.Watch;i.start(t);const o=setInterval((()=>{!this.pending.has(e)&&this.topics.includes(e)&&(clearInterval(o),i.stop(t),n(!0)),i.elapsed(t)>=kke&&(clearInterval(o),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=dCe.generateChildLogger(t,this.name),this.clientId=""}get context(){return dCe.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=CAe(n);await this.rpcUnsubscribe(e,t,r);const i=GAe("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:IAe(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await bAe(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(vke)}return XTe(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const t={method:IAe(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 bAe(this.relayer.request(t),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(vke)}}rpcUnsubscribe(e,t,n){const r={method:IAe(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,iOe(rOe({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach((e=>{this.setSubscription(e.id,rOe({},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,rOe({},t)),this.topicMap.set(t.topic,e),this.events.emit(_ke,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}=VAe("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(Cke,iOe(rOe({},n),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Ike)}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(Ske)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:e}=VAe("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);qAe(t)&&this.onBatchSubscribe(t.map(((t,n)=>iOe(rOe({},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(G_e.HEARTBEAT_EVENTS.pulse,(async()=>{await this.checkPending()})),this.relayer.on(mke,(async()=>{await this.onConnect()})),this.relayer.on(yke,(()=>{this.onDisconnect()})),this.events.on(_ke,(async e=>{const t=_ke;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})),this.events.on(Cke,(async e=>{const t=Cke;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=VAe("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 aOe=Object.defineProperty,sOe=Object.getOwnPropertySymbols,cOe=Object.prototype.hasOwnProperty,lOe=Object.prototype.propertyIsEnumerable,uOe=(e,t,n)=>t in e?aOe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let dOe=class extends xCe{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new Nwe,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(mke)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=e=>{this.logger.error(e),this.events.emit(gke,e),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(wke,this.onPayloadHandler),this.provider.on(Eke,this.onConnectHandler),this.provider.on(xke,this.onDisconnectHandler),this.provider.on(Tke,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?dCe.generateChildLogger(e.logger,this.name):dCe.pino(dCe.getDefaultLoggerOptions({level:e.logger||"error"})),this.messages=new Kke(this.logger,e.core),this.subscriber=new oOe(this,this.logger),this.publisher=new Xke(this,this.logger),this.relayUrl=e?.relayUrl||dke,this.projectId=e.projectId,this.bundleId=function(){var e;try{return uAe()&&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 ${fke}...`),await this.restartTransport(fke)}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 dCe.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 o=t=>{t.topic===e&&(this.subscriber.off(_ke,o),r())};return await Promise.all([new Promise((e=>{r=e,this.subscriber.on(_ke,o)})),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 bAe(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(Ske,(()=>{e()}))})),new Promise((async(e,t)=>{try{await bAe(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(xke)}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 u_e())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 xIe(new class{constructor(e){if(this.url=e,this.events=new Nwe,this.registering=!1,!mIe(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(U_e(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!mIe(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=eIe.isReactNative()?{headers:{origin:r}}:{rejectUnauthorized:!yIe(e)},o=new AIe(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"?o.onerror=e=>{const t=e;n(this.emitError(t.error))}:o.on("error",(e=>{n(this.emitError(e))})),o.onopen=()=>{this.onOpen(o),t(o)}}))}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?B_e(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=cIe(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return QCe(e,TIe(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: ${TIe(this.url)}`));return this.events.emit("register_error",t),t}}(pAe({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}),vIe(e)){if(!e.method.endsWith("_subscription"))return;const t=e.params,{topic:n,message:r,publishedAt:i}=t.data,o={topic:n,message:r,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(((e,t)=>{for(var n in t||(t={}))cOe.call(t,n)&&uOe(e,n,t[n]);if(sOe)for(var n of sOe(t))lOe.call(t,n)&&uOe(e,n,t[n]);return e})({type:"event",event:t.id},o)),this.events.emit(t.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else bIe(e)&&this.events.emit(pke,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(hke,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=sIe(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(wke,this.onPayloadHandler),this.provider.off(Eke,this.onConnectHandler),this.provider.off(xke,this.onDisconnectHandler),this.provider.off(Tke,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(vke,(()=>{this.restartTransport().catch((e=>this.logger.error(e)))}));let e=await u_e();d_e((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(yke),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout((async()=>{await this.restartTransport().catch((e=>this.logger.error(e)))}),Kxe.toMiliseconds(Ake)))}isInitialized(){if(!this.initialized){const{message:e}=VAe("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 fOe=Object.defineProperty,hOe=Object.getOwnPropertySymbols,pOe=Object.prototype.hasOwnProperty,mOe=Object.prototype.propertyIsEnumerable,yOe=(e,t,n)=>t in e?fOe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gOe=(e,t)=>{for(var n in t||(t={}))pOe.call(t,n)&&yOe(e,n,t[n]);if(hOe)for(var n of hOe(t))mOe.call(t,n)&&yOe(e,n,t[n]);return e};let vOe=class extends TCe{constructor(e,t,n,r=oke,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=oke,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>{this.getKey&&null!==e&&!XAe(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=>CIe(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=gOe(gOe({},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=dCe.generateChildLogger(t,this.name),this.storagePrefix=r,this.getKey=i}get context(){return dCe.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}=VAe("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}=VAe("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}=VAe("NOT_INITIALIZED",this.name);throw new Error(e)}}},bOe=class extends bCe{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new Nwe,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=oke,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:xAe(Kxe.THIRTY_DAYS)};this.records.set(r.id,r),this.events.emit(Dke,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=EIe(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.events.emit(Lke,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(Fke,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=dCe.generateChildLogger(t,this.name)}get context(){return dCe.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:aIe(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}=VAe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Bke)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:e}=VAe("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(Dke,(e=>{const t=Dke;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(Lke,(e=>{const t=Lke;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(Fke,(e=>{const t=Fke;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.core.heartbeat.on(G_e.HEARTBEAT_EVENTS.pulse,(()=>{this.cleanup()}))}cleanup(){try{this.records.forEach((e=>{Kxe.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}=VAe("NOT_INITIALIZED",this.name);throw new Error(e)}}},wOe=class extends _Ce{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new Nwe,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=oke,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(Uke,{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(zke,{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=dCe.generateChildLogger(t,this.name)}get context(){return dCe.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 wAe("topic",e)}(e);if("number"==typeof e)return function(e){return wAe("id",e)}(e);const{message:t}=VAe("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(Hke)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:e}=VAe("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}=VAe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}checkExpiry(e,t){const{expiry:n}=t;Kxe.toMiliseconds(n)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(jke,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach(((e,t)=>this.checkExpiry(t,e)))}registerEventListeners(){this.core.heartbeat.on(G_e.HEARTBEAT_EVENTS.pulse,(()=>this.checkExpirations())),this.events.on(Uke,(e=>{const t=Uke;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(jke,(e=>{const t=jke;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(zke,(e=>{const t=zke;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=VAe("NOT_INITIALIZED",this.name);throw new Error(e)}}},EOe=class extends CCe{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=Wke,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async e=>{if(this.verifyDisabled||uAe()||!dAe())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=Gke;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,Gke)}return n},this.fetchAttestation=async(e,t)=>{this.logger.info(`resolving attestation: ${e} from url: ${t}`);const n=this.startAbortTimer(2*Kxe.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(Wke))return n();window.addEventListener("message",t);const r=document.createElement("iframe");r.id=Wke,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")}),Kxe.toMiliseconds(Kxe.FIVE_SECONDS))))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=e=>{let t=e||Vke;return qke.includes(t)||(this.logger.info(`verify url: ${t}, not included in trusted list, assigning default: ${Vke}`),t=Vke),t},this.logger=dCe.generateChildLogger(t,this.name),this.verifyUrl=Vke,this.abortController=new AbortController,this.isDevEnv=lAe()&&process.env.IS_VITEST}get context(){return dCe.getLoggerContext(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout((()=>this.abortController.abort()),Kxe.toMiliseconds(e))}},xOe=class extends ICe{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,o=`https://echo.walletconnect.com/${this.projectId}/clients`;await SIe(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:t,type:r,token:n,always_raw:i})})},this.logger=dCe.generateChildLogger(t,this.context)}};var TOe=Object.defineProperty,AOe=Object.getOwnPropertySymbols,_Oe=Object.prototype.hasOwnProperty,COe=Object.prototype.propertyIsEnumerable,IOe=(e,t,n)=>t in e?TOe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SOe=(e,t)=>{for(var n in t||(t={}))_Oe.call(t,n)&&IOe(e,n,t[n]);if(AOe)for(var n of AOe(t))COe.call(t,n)&&IOe(e,n,t[n]);return e};const kOe=class e extends vCe{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=ike,this.events=new Nwe,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||dke,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:dCe.pino(dCe.getDefaultLoggerOptions({level:e?.logger||ake}));this.logger=dCe.generateChildLogger(t,this.name),this.heartbeat=new G_e.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(),WCe(VCe(await this.getClientSeed()).publicKey)),this.generateKeyPair=()=>{this.isInitialized();const e=function(){const e=OEe.generateKeyPair();return{privateKey:Nxe(e.secretKey,BTe),publicKey:Nxe(e.publicKey,BTe)}}();return this.setPrivateKey(e.publicKey,e.privateKey)},this.signJWT=async e=>{this.isInitialized();const t=VCe(await this.getClientSeed()),n=KTe(),r=lke;return await GCe(n,e,r,t)},this.generateSharedKey=(e,t,n)=>{this.isInitialized();const r=function(e,t){const n=OEe.sharedKey(Rxe(e,BTe),Rxe(t,BTe),!0);return Nxe(new EEe(kEe.SHA256,n).expand(qTe),BTe)}(this.getPrivateKey(e),t);return this.setSymKey(r,n)},this.setSymKey=async(e,t)=>{this.isInitialized();const n=t||function(e){return Nxe(kEe.hash(Rxe(e,BTe)),BTe)}(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=QTe(n),i=U_e(t);if($Te(r)){const t=r.senderPublicKey,n=r.receiverPublicKey;e=await this.generateSharedKey(t,n)}const o=this.getSymKey(e),{type:a,senderPublicKey:s}=r;return ZTe({type:a,symKey:o,message:i,senderPublicKey:s})},this.decode=async(e,t,n)=>{this.isInitialized();const r=function(e,t){const n=JTe(e);return QTe({type:YTe(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?Nxe(n.senderPublicKey,BTe):void 0,receiverPublicKey:t?.receiverPublicKey})}(t,n);if($Te(r)){const t=r.receiverPublicKey,n=r.senderPublicKey;e=await this.generateSharedKey(t,n)}try{const n=function(e){const t=new zwe.ChaCha20Poly1305(Rxe(e.symKey,BTe)),{sealed:n,iv:r}=JTe(e.encoded),i=t.open(r,n);if(null===i)throw new Error("Failed to decrypt");return Nxe(i,zTe)}({symKey:this.getSymKey(e),encoded:t});return B_e(n)}catch(t){this.logger.error(`Failed to decode message from topic: '${e}', clientId: '${await this.getClientId()}'`),this.logger.error(t)}},this.getPayloadType=e=>YTe(JTe(e).type),this.getPayloadSenderPublicKey=e=>{const t=JTe(e);return t.senderPublicKey?Nxe(t.senderPublicKey,BTe):void 0},this.core=e,this.logger=dCe.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=oke,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}=VAe("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=dCe.generateChildLogger(t,this.name)}get context(){return dCe.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,yAe(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?gAe(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=VAe("NOT_INITIALIZED",this.name);throw new Error(e)}}}(this.core,this.logger)}get context(){return dCe.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(cke)}catch{e=KTe(),await this.keychain.set(cke,e)}return function(e,t="utf8"){const n=rke[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}`):$Se(globalThis.Buffer.from(e,"utf-8"))}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=VAe("NOT_INITIALIZED",this.name);throw new Error(e)}}}(this,this.logger,e?.keychain),this.history=new bOe(this,this.logger),this.expirer=new wOe(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=H_e.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(W_e)}async getItem(e){const t=this.localStorage.getItem(e);if(null!==t)return B_e(t)}async setItem(e,t){this.localStorage.setItem(e,U_e(t))}async removeItem(e){this.localStorage.removeItem(e)}};this.storage=e;try{const t=new class{constructor(){this.indexedDb=I_e({driver:z_e({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,U_e(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 o=await e.getKeys();if(!o.length)return void n(t);const a=[];for(;o.length;){const n=o.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),a.push(n)}}await t.setItem(r,1),n(t),V_e(e,a)})(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)}))}}(SOe(SOe({},ske),e?.storageOptions)),this.relayer=new dOe({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 Nwe,this.initialized=!1,this.storagePrefix=oke,this.ignoredPayloadTypes=[HTe],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=KTe(),t=await this.core.crypto.setSymKey(e),n=xAe(Kxe.FIVE_MINUTES),r={protocol:"irn"},i={topic:t,expiry:n,relay:r,active:!1},o=BAe({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:o}},this.pair=async e=>{this.isInitialized(),this.isValidPair(e);const{topic:t,symKey:n,relay:r,expiryTimestamp:i}=LAe(e.uri);let o;if(this.pairings.keys.includes(t)&&(o=this.pairings.get(t),o.active))throw new Error(`Pairing already exists: ${t}. Please try again with a new connection URI.`);const a=i||xAe(Kxe.FIVE_MINUTES),s={topic:t,relay:r,expiry:a,active:!1};return await this.pairings.set(t,s),this.core.expirer.set(t,a),e.activatePairing&&await this.activate({topic:t}),this.events.emit(Pke,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=xAe(Kxe.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}=vAe();this.events.once(AAe("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",GAe("USER_DISCONNECTED")),await this.deletePairing(t))},this.sendRequest=async(e,t,n)=>{const r=aIe(t,n),i=await this.core.crypto.encode(e,r),o=Oke[t].req;return this.core.history.set(e,r),this.core.relayer.publish(e,i,o),r.id},this.sendResult=async(e,t,n)=>{const r=sIe(e,n),i=await this.core.crypto.encode(t,r),o=await this.core.history.get(t,e),a=Oke[o.request.method].res;await this.core.relayer.publish(t,i,a),await this.core.history.resolve(r)},this.sendError=async(e,t,n)=>{const r=cIe(e,n),i=await this.core.crypto.encode(t,r),o=await this.core.history.get(t,e),a=Oke[o.request.method]?Oke[o.request.method].res:Oke.unregistered_method.res;await this.core.relayer.publish(t,i,a),await this.core.history.resolve(r)},this.deletePairing=async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,GAe("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=>TAe(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(Mke,{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((()=>{wIe(t)?this.events.emit(AAe("pairing_ping",n),{}):EIe(t)&&this.events.emit(AAe("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(Nke,{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=GAe("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(GAe("WC_METHOD_UNSUPPORTED",e))},this.isValidPair=e=>{var t;if(!i_e(e)){const{message:t}=VAe("MISSING_OR_INVALID",`pair() params: ${e}`);throw new Error(t)}if(!function(e){if(YAe(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}(e.uri)){const{message:t}=VAe("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw new Error(t)}const n=LAe(e.uri);if(null==(t=n?.relay)||!t.protocol){const{message:e}=VAe("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(e)}if(null==n||!n.symKey){const{message:e}=VAe("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(e)}if(null!=n&&n.expiryTimestamp&&Kxe.toMiliseconds(n?.expiryTimestamp)<Date.now()){const{message:e}=VAe("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw new Error(e)}},this.isValidPing=async e=>{if(!i_e(e)){const{message:t}=VAe("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidDisconnect=async e=>{if(!i_e(e)){const{message:t}=VAe("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidPairingTopic=async e=>{if(!YAe(e,!1)){const{message:t}=VAe("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.pairings.keys.includes(e)){const{message:t}=VAe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(TAe(this.pairings.get(e).expiry)){await this.deletePairing(e);const{message:t}=VAe("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}},this.core=e,this.logger=dCe.generateChildLogger(t,this.name),this.pairings=new vOe(this.core,this.logger,this.name,this.storagePrefix)}get context(){return dCe.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=VAe("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(hke,(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{vIe(r)?(this.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):bIe(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(jke,(async e=>{const{topic:t}=EAe(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(Rke,{topic:t}))}))}}(this,this.logger),this.verify=new EOe(this.projectId||"",this.logger),this.echoClient=new xOe(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 dCe.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}}},OOe="client",POe=`wc@2:${OOe}:`,ROe=OOe,NOe="error",MOe="WALLETCONNECT_DEEPLINK_CHOICE",DOe="Proposal expired",LOe=Kxe.SEVEN_DAYS,FOe={wc_sessionPropose:{req:{ttl:Kxe.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Kxe.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:Kxe.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Kxe.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Kxe.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Kxe.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Kxe.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Kxe.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Kxe.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Kxe.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Kxe.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Kxe.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Kxe.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Kxe.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Kxe.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:Kxe.THIRTY_SECONDS,prompt:!1,tag:1115}}},BOe={min:Kxe.FIVE_MINUTES,max:Kxe.SEVEN_DAYS},UOe="IDLE",zOe="ACTIVE",jOe=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var HOe=Object.defineProperty,WOe=Object.defineProperties,VOe=Object.getOwnPropertyDescriptors,GOe=Object.getOwnPropertySymbols,qOe=Object.prototype.hasOwnProperty,KOe=Object.prototype.propertyIsEnumerable,XOe=(e,t,n)=>t in e?HOe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,YOe=(e,t)=>{for(var n in t||(t={}))qOe.call(t,n)&&XOe(e,n,t[n]);if(GOe)for(var n of GOe(t))KOe.call(t,n)&&XOe(e,n,t[n]);return e},ZOe=(e,t)=>WOe(e,VOe(t));class JOe extends kCe{constructor(e){super(e),this.name="engine",this.events=new Nwe,this.initialized=!1,this.ignoredPayloadTypes=[HTe],this.requestQueue={state:UOe,queue:[]},this.sessionRequestQueue={state:UOe,queue:[]},this.requestQueueDelay=Kxe.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(FOe)}),this.initialized=!0,setTimeout((()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()}),Kxe.toMiliseconds(this.requestQueueDelay)))},this.connect=async e=>{await this.isInitialized();const t=ZOe(YOe({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t);const{pairingTopic:n,requiredNamespaces:r,optionalNamespaces:i,sessionProperties:o,relays:a}=t;let s,c=n,l=!1;if(c&&(l=this.client.core.pairing.pairings.get(c).active),!c||!l){const{topic:e,uri:t}=await this.client.core.pairing.create();c=e,s=t}const u=await this.client.core.crypto.generateKeyPair(),d=FOe.wc_sessionPropose.req.ttl||Kxe.FIVE_MINUTES,f=xAe(d),h=YOe({requiredNamespaces:r,optionalNamespaces:i,relays:a??[{protocol:"irn"}],proposer:{publicKey:u,metadata:this.client.metadata},expiryTimestamp:f},o&&{sessionProperties:o}),{reject:p,resolve:m,done:y}=vAe(d,DOe);if(this.events.once(AAe("session_connect"),(async({error:e,session:t})=>{if(e)p(e);else if(t){t.self.publicKey=u;const e=ZOe(YOe({},t),{requiredNamespaces:h.requiredNamespaces,optionalNamespaces:h.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}=VAe("NO_MATCHING_KEY",`connect() pairing topic: ${c}`);throw new Error(e)}const g=await this.sendRequest({topic:c,method:"wc_sessionPropose",params:h,throwOnFailedPublish:!0});return await this.setProposal(g,YOe({id:g},h)),{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,o=this.client.proposal.get(t);let{pairingTopic:a,proposer:s,requiredNamespaces:c,optionalNamespaces:l}=o;a=a||"";const u=await this.client.core.crypto.generateKeyPair(),d=s.publicKey,f=await this.client.core.crypto.generateSharedKey(u,d);a&&t&&(await this.client.core.pairing.updateMetadata({topic:a,metadata:s.metadata}),await this.sendResult({id:t,topic:a,result:{relay:{protocol:n??"irn"},responderPublicKey:u}}),await this.client.proposal.delete(t,GAe("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:a}));const h=YOe({relay:{protocol:n??"irn"},namespaces:r,pairingTopic:a,controller:{publicKey:u,metadata:this.client.metadata},expiry:xAe(LOe)},i&&{sessionProperties:i});await this.client.core.relayer.subscribe(f);const p=ZOe(YOe({},h),{topic:f,requiredNamespaces:c,optionalNamespaces:l,pairingTopic:a,acknowledged:!1,self:h.controller,peer:{publicKey:s.publicKey,metadata:s.metadata},controller:u});await this.client.session.set(f,p);try{await this.sendRequest({topic:f,method:"wc_sessionSettle",params:h,throwOnFailedPublish:!0})}catch(e){throw this.client.logger.error(e),this.client.session.delete(f,GAe("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(f),e}return await this.setExpiry(f,xAe(LOe)),{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,GAe("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:o,reject:a}=vAe();return this.events.once(AAe("session_update",r),(({error:e})=>{e?a(e):o()})),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:o}=vAe();return this.events.once(AAe("session_extend",n),(({error:e})=>{e?o(e):i()})),await this.setExpiry(t,xAe(LOe)),{acknowledged:r}},this.request=async e=>{await this.isInitialized(),await this.isValidRequest(e);const{chainId:t,request:n,topic:r,expiry:i=FOe.wc_sessionRequest.req.ttl}=e,o=iIe(),{done:a,resolve:s,reject:c}=vAe(i,"Request expired. Please try again.");return this.events.once(AAe("session_request",o),(({error:e,result:t})=>{e?c(e):s(t)})),await Promise.all([new Promise((async e=>{await this.sendRequest({clientRpcId:o,topic:r,method:"wc_sessionRequest",params:{request:ZOe(YOe({},n),{expiryTimestamp:xAe(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:o}),e()})),new Promise((async e=>{const t=await async function(e,t){try{return await e.getItem(t)||(dAe()?localStorage.getItem(t):void 0)}catch(e){console.error(e)}}(this.client.core.storage,MOe);(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 o=`${i}/wc?requestId=${e}&sessionTopic=${t}`,a=fAe();a===sAe.browser?o.startsWith("https://")?window.open(o,"_blank","noreferrer noopener"):window.open(o,"_self","noreferrer noopener"):a===sAe.reactNative&&typeof(null==global?void 0:global.Linking)<"u"&&await global.Linking.openURL(o)}catch(e){console.error(e)}})({id:o,topic:r,wcDeepLink:t}),e()})),a()]).then((e=>e[2]))},this.respond=async e=>{await this.isInitialized(),await this.isValidRespond(e);const{topic:t,response:n}=e,{id:r}=n;wIe(n)?await this.sendResult({id:r,topic:t,result:n.result,throwOnFailedPublish:!0}):EIe(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}=vAe();this.events.once(AAe("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:GAe("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:t,emitEvent:!1});else{if(!this.client.core.pairing.pairings.keys.includes(t)){const{message:e}=VAe("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 o=!0;return!!mAe(i,r)&&(r.forEach((t=>{const{accounts:r,methods:i,events:a}=e.namespaces[t],s=UAe(r),c=n[t];mAe(LTe(t,c),s)&&mAe(c.methods,i)&&mAe(c.events,a)||(o=!1)})),o)}(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:o}=this.client.session.get(t);await this.client.core.relayer.unsubscribe(t),await this.client.session.delete(t,GAe("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(o.publicKey)&&await this.client.core.crypto.deleteKeyPair(o.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(MOe).catch((e=>this.client.logger.warn(e))),this.getPendingSessionRequests().forEach((e=>{e.topic===t&&this.deletePendingSessionRequest(e.id,GAe("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,GAe("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=UOe,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,xAe(FOe.wc_sessionPropose.req.ttl))},this.setPendingSessionRequest=async e=>{const{id:t,topic:n,params:r,verifyContext:i}=e,o=r.request.expiryTimestamp||xAe(FOe.wc_sessionRequest.req.ttl);await this.client.pendingRequest.set(t,{id:t,topic:n,params:r,verifyContext:i}),o&&this.client.core.expirer.set(t,o)},this.sendRequest=async e=>{const{topic:t,method:n,params:r,expiry:i,relayRpcId:o,clientRpcId:a,throwOnFailedPublish:s}=e,c=aIe(n,r,a);if(dAe()&&jOe.includes(n)){const e=XTe(JSON.stringify(c));this.client.core.verify.register({attestationId:e})}const l=await this.client.core.crypto.encode(t,c),u=FOe[n].req;return i&&(u.ttl=i),o&&(u.id=o),this.client.core.history.set(t,c),s?(u.internal=ZOe(YOe({},u.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(t,l,u)):this.client.core.relayer.publish(t,l,u).catch((e=>this.client.logger.error(e))),c.id},this.sendResult=async e=>{const{id:t,topic:n,result:r,throwOnFailedPublish:i}=e,o=sIe(t,r),a=await this.client.core.crypto.encode(n,o),s=await this.client.core.history.get(n,t),c=FOe[s.request.method].res;i?(c.internal=ZOe(YOe({},c.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,a,c)):this.client.core.relayer.publish(n,a,c).catch((e=>this.client.logger.error(e))),await this.client.core.history.resolve(o)},this.sendError=async(e,t,n)=>{const r=cIe(e,n),i=await this.client.core.crypto.encode(t,r),o=await this.client.core.history.get(t,e),a=FOe[o.request.method].res;this.client.core.relayer.publish(t,i,a),await this.client.core.history.resolve(r)},this.cleanup=async()=>{const e=[],t=[];this.client.session.getAll().forEach((t=>{let n=!1;TAe(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=>{TAe(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!==zOe){for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=zOe;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=UOe}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}=VAe("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(YOe({},t.params));const i=n.expiryTimestamp||xAe(FOe.wc_sessionPropose.req.ttl),o=YOe({id:r,pairingTopic:e,expiryTimestamp:i},n);await this.setProposal(r,o);const a=XTe(JSON.stringify(t)),s=await this.getVerifyContext(a,o.proposer.metadata);this.client.events.emit("session_proposal",{id:r,params:o,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(wIe(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 o=i.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:o});const a=r.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:a});const s=await this.client.core.crypto.generateSharedKey(o,a);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 EIe(t)&&(await this.client.proposal.delete(n,GAe("USER_DISCONNECTED")),this.events.emit(AAe("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:o,namespaces:a,sessionProperties:s,pairingTopic:c}=t.params,l=YOe({topic:e,relay:n,expiry:o,namespaces:a,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(AAe("session_connect"),{session:l}),this.cleanupDuplicatePairings(l)}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionSettleResponse=async(e,t)=>{const{id:n}=t;wIe(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(AAe("session_approve",n),{})):EIe(t)&&(await this.client.session.delete(e,GAe("USER_DISCONNECTED")),this.events.emit(AAe("session_approve",n),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{const{params:n,id:r}=t;try{const t=`${e}_session_update`,i=h_e.get(t);if(i&&this.isRequestOutOfSync(i,r))return void this.client.logger.info(`Discarding out of sync request - ${r}`);this.isValidUpdate(YOe({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}),h_e.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;wIe(t)?this.events.emit(AAe("session_update",n),{}):EIe(t)&&this.events.emit(AAe("session_update",n),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{const{id:n}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,xAe(LOe)),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;wIe(t)?this.events.emit(AAe("session_extend",n),{}):EIe(t)&&this.events.emit(AAe("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((()=>{wIe(t)?this.events.emit(AAe("session_ping",n),{}):EIe(t)&&this.events.emit(AAe("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(bke,(async()=>{t(await this.deleteSession({topic:e,id:n}))}))})),this.sendResult({id:n,topic:e,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:e,error:GAe("USER_DISCONNECTED")})])}catch(e){this.client.logger.error(e)}},this.onSessionRequest=async(e,t)=>{const{id:n,params:r}=t;try{this.isValidRequest(YOe({topic:e},r));const t=XTe(JSON.stringify(aIe("wc_sessionRequest",r,n))),i=this.client.session.get(e),o={id:n,topic:e,params:r,verifyContext:await this.getVerifyContext(t,i.peer.metadata)};await this.setPendingSessionRequest(o),this.addSessionRequestToSessionRequestQueue(o),this.processSessionRequestQueue()}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionRequestResponse=(e,t)=>{const{id:n}=t;wIe(t)?this.events.emit(AAe("session_request",n),{result:t.result}):EIe(t)&&this.events.emit(AAe("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=h_e.get(t);if(i&&this.isRequestOutOfSync(i,n))return void this.client.logger.info(`Discarding out of sync request - ${n}`);this.isValidEmit(YOe({topic:e},r)),this.client.events.emit("session_event",{id:n,topic:e,params:r}),h_e.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=UOe,this.processSessionRequestQueue()}),Kxe.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(AAe("session_request",e.request.id),{error:t})}))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===zOe)return void this.client.logger.info("session request queue is already active.");const e=this.sessionRequestQueue.queue[0];if(e)try{this.sessionRequestQueue.state=zOe,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,aIe("wc_sessionPropose",{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties},t.id))},this.isValidConnect=async e=>{if(!i_e(e)){const{message:t}=VAe("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw new Error(t)}const{pairingTopic:t,requiredNamespaces:n,optionalNamespaces:r,sessionProperties:i,relays:o}=e;if(XAe(t)||await this.isValidPairingTopic(t),!function(e,t){let n=!1;return t&&!e?n=!0:e&&qAe(e)&&e.length&&e.forEach((e=>{n=r_e(e)})),n}(o,!0)){const{message:e}=VAe("MISSING_OR_INVALID",`connect() relays: ${o}`);throw new Error(e)}!XAe(n)&&0!==KAe(n)&&this.validateNamespaces(n,"requiredNamespaces"),!XAe(r)&&0!==KAe(r)&&this.validateNamespaces(r,"optionalNamespaces"),XAe(i)||this.validateSessionProps(i,"sessionProperties")},this.validateNamespaces=(e,t)=>{const n=function(e,t,n){let r=null;if(e&&KAe(e)){const i=t_e(e,t);i&&(r=i);const o=$Ae(e,t,n);o&&(r=o)}else r=VAe("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(!i_e(e))throw new Error(VAe("MISSING_OR_INVALID",`approve() params: ${e}`).message);const{id:t,namespaces:n,relayProtocol:r,sessionProperties:i}=e;await this.isValidProposalId(t);const o=this.client.proposal.get(t),a=n_e(n,"approve()");if(a)throw new Error(a.message);const s=c_e(o.requiredNamespaces,n,"approve()");if(s)throw new Error(s.message);if(!YAe(r,!0)){const{message:e}=VAe("MISSING_OR_INVALID",`approve() relayProtocol: ${r}`);throw new Error(e)}XAe(i)||this.validateSessionProps(i,"sessionProperties")},this.isValidReject=async e=>{if(!i_e(e)){const{message:t}=VAe("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&&ZAe(e.code,!1)&&e.message&&YAe(e.message,!1))}(n)){const{message:e}=VAe("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidSessionSettleRequest=e=>{if(!i_e(e)){const{message:t}=VAe("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw new Error(t)}const{relay:t,controller:n,namespaces:r,expiry:i}=e;if(!r_e(t)){const{message:e}=VAe("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(e)}const o=function(e,t){let n=null;return YAe(e?.publicKey,!1)||(n=VAe("MISSING_OR_INVALID",`${t} controller public key should be a string`)),n}(n,"onSessionSettleRequest()");if(o)throw new Error(o.message);const a=n_e(r,"onSessionSettleRequest()");if(a)throw new Error(a.message);if(TAe(i)){const{message:e}=VAe("EXPIRED","onSessionSettleRequest()");throw new Error(e)}},this.isValidUpdate=async e=>{if(!i_e(e)){const{message:t}=VAe("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=n_e(n,"update()");if(i)throw new Error(i.message);const o=c_e(r.requiredNamespaces,n,"update()");if(o)throw new Error(o.message)},this.isValidExtend=async e=>{if(!i_e(e)){const{message:t}=VAe("MISSING_OR_INVALID",`extend() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!i_e(e)){const{message:t}=VAe("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:o}=this.client.session.get(t);if(!o_e(o,r)){const{message:e}=VAe("MISSING_OR_INVALID",`request() chainId: ${r}`);throw new Error(e)}if(!function(e){return!(XAe(e)||!YAe(e.method,!1))}(n)){const{message:e}=VAe("MISSING_OR_INVALID",`request() ${JSON.stringify(n)}`);throw new Error(e)}if(!a_e(o,r,n.method)){const{message:e}=VAe("MISSING_OR_INVALID",`request() method: ${n.method}`);throw new Error(e)}if(i&&!function(e,t){return ZAe(e,!1)&&e<=t.max&&e>=t.min}(i,BOe)){const{message:e}=VAe("MISSING_OR_INVALID",`request() expiry: ${i}. Expiry must be a number (in seconds) between ${BOe.min} and ${BOe.max}`);throw new Error(e)}},this.isValidRespond=async e=>{var t;if(!i_e(e)){const{message:t}=VAe("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!(XAe(e)||XAe(e.result)&&XAe(e.error)||!ZAe(e.id,!1)||!YAe(e.jsonrpc,!1))}(r)){const{message:e}=VAe("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidPing=async e=>{if(!i_e(e)){const{message:t}=VAe("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!i_e(e)){const{message:t}=VAe("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(!o_e(i,r)){const{message:e}=VAe("MISSING_OR_INVALID",`emit() chainId: ${r}`);throw new Error(e)}if(!function(e){return!(XAe(e)||!YAe(e.name,!1))}(n)){const{message:e}=VAe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}if(!s_e(i,r,n.name)){const{message:e}=VAe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidDisconnect=async e=>{if(!i_e(e)){const{message:t}=VAe("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||Vke,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(!YAe(e,!1)){const{message:n}=VAe("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}=VAe("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(hke,(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{vIe(r)?(this.client.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):bIe(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(jke,(async e=>{const{topic:t,id:n}=EAe(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,VAe("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(Pke,(e=>this.onPairingCreated(e)))}isValidPairingTopic(e){if(!YAe(e,!1)){const{message:t}=VAe("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}=VAe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(TAe(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=VAe("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!YAe(e,!1)){const{message:t}=VAe("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(!this.client.session.keys.includes(e)){const{message:t}=VAe("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if(TAe(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:t}=VAe("EXPIRED",`session topic: ${e}`);throw new Error(t)}if(!this.client.core.crypto.keychain.has(e)){const{message:t}=VAe("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(YAe(e,!1)){const{message:t}=VAe("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}{const{message:t}=VAe("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}=VAe("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=VAe("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if(TAe(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:t}=VAe("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}}class QOe extends vOe{constructor(e,t){super(e,t,"proposal",POe),this.core=e,this.logger=t}}let $Oe=class extends vOe{constructor(e,t){super(e,t,"session",POe),this.core=e,this.logger=t}};class ePe extends vOe{constructor(e,t){super(e,t,"request",POe,(e=>e.id)),this.core=e,this.logger=t}}let tPe=class e extends SCe{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=ROe,this.events=new Nwe,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||ROe,this.metadata=e?.metadata||xTe()||{name:"",description:"",url:"",icons:[""]};const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:dCe.pino(dCe.getDefaultLoggerOptions({level:e?.logger||NOe}));this.core=e?.core||new kOe(e),this.logger=dCe.generateChildLogger(t,this.name),this.session=new $Oe(this.core,this.logger),this.proposal=new QOe(this.core,this.logger),this.pendingRequest=new ePe(this.core,this.logger),this.engine=new JOe(this)}static async init(t){const n=new e(t);return await n.initialize(),n}get context(){return dCe.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 nPe={exports:{}};!function(e,t){var n="undefined"!=typeof self?self:lt,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}}(),o="FormData"in e,a="ArrayBuffer"in e;if(a)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 l(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 u(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 h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(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=p(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 g(){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:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(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=h(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?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e,t,n,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=p(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)},o&&(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=l(e),t=u(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},f.prototype.delete=function(e){delete this.map[l(e)]},f.prototype.get=function(e){return e=l(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(l(e))},f.prototype.set=function(e,t){this.map[l(e)]=u(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 v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(e,t){var n,r,i=(t=t||{}).body;if(e instanceof b){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(),v.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 E(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)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},g.call(b.prototype),g.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var x=[301,302,303,307,308];E.redirect=function(e,t){if(-1===x.indexOf(t))throw new RangeError("Invalid status code");return new E(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 T(e,n){return new Promise((function(r,o){var a=new b(e,n);if(a.signal&&a.signal.aborted)return o(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 E(i,n))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}T.polyfill=!0,e.fetch||(e.fetch=T,e.Headers=f,e.Request=b,e.Response=E),t.Headers=f,t.Request=b,t.Response=E,t.fetch=T,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}(nPe,nPe.exports);var rPe=ut(nPe.exports);const iPe={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class oPe{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new Nwe,this.isAvailable=!1,this.registering=!1,!pIe(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=U_e(e),n=await rPe(this.url,Object.assign(Object.assign({},iPe),{body:t})),r=await n.json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!pIe(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=U_e({id:1,jsonrpc:"2.0",method:"test",params:[]});await rPe(e,Object.assign(Object.assign({},iPe),{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?B_e(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=cIe(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return QCe(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}const aPe="error",sPe="wc@2:universal_provider:",cPe="default_chain_changed";var lPe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},uPe={exports:{}};
|
|
76
|
+
function Fue(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 Bue=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=Fue({},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 o="";for(var a in i)i[a]&&(o+="; "+a,!0!==i[a]&&(o+="="+i[a].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+o}}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 o=n[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=t.read(a,s),e===s)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",Fue({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,Fue({},this.attributes,t))},withConverter:function(t){return e(Fue({},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 Uue(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function zue(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__",o=n[r],a={domain:"."+o};try{if(Bue.set(i,"1",a),Bue.get(i))return Bue.remove(i,a),o}catch(e){return}}}var jue=function(){function e(t){void 0===t&&(t=e.defaults),this.options=wle(wle({},e.defaults),t)}return Object.defineProperty(e,"defaults",{get:function(){return{maxage:365,domain:zue(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=Bue.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?Bue.set(e,t,this.opts()):null===t?Bue.remove(e,this.opts()):Bue.set(e,JSON.stringify(t),this.opts())},e.prototype.remove=function(e){return Bue.remove(e,this.opts())},e}(),Hue=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}(),Wue=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}(),Vue={Cookie:"cookie",LocalStorage:"localStorage",Memory:"memory"};function Gue(e){return e&&e.stores&&Array.isArray(e.stores)&&e.stores.every((function(e){return Object.values(Vue).includes(e)}))}var que,Kue=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 Xue(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 Vue.Cookie:return new jue(n);case Vue.LocalStorage:return new Hue;case Vue.Memory:return new Wue;default:throw new Error("Unknown Store Type: ".concat(e))}}));return t}function Yue(e,t){return e.map((function(e){return t&&e===Vue.Cookie?{name:e,settings:t}:e}))}function Zue(){if(que)return que;var e=zue(window.location.href);return que={expires:31536e6,secure:!1,path:"/"},e&&(que.domain=e),que}var Jue="npm";function Que(){return Jue}function $ue(e,t,n,r){var i,o,a,s,c,l,u=e.user();t.context=null!==(o=null!==(i=t.context)&&void 0!==i?i:t.options)&&void 0!==o?o:{};var d=t.context,f="string"==typeof(null===(a=d.page)||void 0===a?void 0:a.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 h=navigator.userLanguage||navigator.language;if(void 0===d.locale&&void 0!==h&&(d.locale=h),!d.library){var p=Que();d.library="web"===p?{name:"analytics.js",version:"next-".concat(Lue)}:{name:"analytics.js",version:"npm:next-".concat(Lue)}}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],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var a=r.substr(4);"campaign"===a&&(a="name"),e[a]=Uue(o)}return e}),{})}(f)),function(e,t,n){var r=new Kue(n?[]:[new jue(Zue())]),i=r.get("s:context.referrer"),o=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("="),o=i[0],a=i[1];if(t[o])return{id:a,type:t[o]}}}(e);(o=null!=o?o:i)&&(t&&(t.referrer=wle(wle({},t.referrer),o)),r.set("s:context.referrer",o))}(f,d,null!==(c=e.options.disableClientPersistence)&&void 0!==c&&c),t.userId=t.userId||u.id(),t.anonymousId=t.anonymousId||u.anonymousId(),t.sentAt=new Date;var m=e.queue.failedInitializations||[];m.length>0&&(t._metadata={failedInitializations:m});var y=[],g=[];for(var v in r){var b=r[v];"Segment.io"===v&&y.push(v),"bundled"===b.bundlingStatus&&y.push(v),"unbundled"===b.bundlingStatus&&g.push(v)}for(var w=0,E=(null==n?void 0:n.unbundledIntegrations)||[];w<E.length;w++){var x=E[w];g.includes(x)||g.push(x)}var T=null!==(l=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==l?l:{},A=[];y.sort().forEach((function(e){var t;(null!==(t=T[e])&&void 0!==t?t:[]).forEach((function(e){A.push(e)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(t._metadata=wle(wle({},t._metadata),{bundled:y.sort(),unbundled:g.sort(),bundledIds:A}));var _=function(){var e=Bue.get("_ga");if(e&&e.startsWith("amp"))return e}();return _&&(d.amp={id:_}),t}var ede="api.segment.io/v1";function tde(e){console.error("Error sending segment performance metrics",e)}var nde,rde=function(){function e(e){var t,n,r,i,o=this;if(this.host=null!==(t=null==e?void 0:e.host)&&void 0!==t?t:ede,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 a=!1,s=function(){a||(a=!0,o.flush().catch(tde),a=!1,setTimeout(s,o.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:wle(wle({},r),{library:"analytics.js",library_version:"web"===n?"next-".concat(Lue):"npm:next-".concat(Lue)})}}(e,t,Que());this.queue.push(n),e.includes("error")&&this.flush().catch(tde)}},e.prototype.flush=function(){return _le(this,void 0,void 0,(function(){var e=this;return Cle(this,(function(t){switch(t.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(t){tde(t),e.sampleRate=0}))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(){return _le(this,void 0,void 0,(function(){var e,t,n;return Cle(this,(function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":"text/plain"},n="https://".concat(this.host,"/m"),[2,Due(n,{headers:t,body:JSON.stringify(e),method:"POST"})]}))}))},e}(),ide=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ble(t,e),t.initRemoteMetrics=function(e){nde=new rde(e)},t.prototype.increment=function(t,n,r){e.prototype.increment.call(this,t,n,r),null==nde||nde.increment(t,null!=r?r:[])},t}(yue),ode=function(e){function t(t,n){return e.call(this,t,n,new ide)||this}return ble(t,e),t.system=function(){return new this({type:"track",event:"system"})},t}(bue),ade={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],o=e[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[2]+718787259|0)<<15|i>>>17)+o|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]=o+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 o(e){var t,i,o,a,s,c,l=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(u,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(u,o),t=0;t<16;t+=1)o[t]=0;return a=(a=8*l).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),c=parseInt(a[1],16)||0,o[14]=s,o[15]=c,n(u,o),u}function a(e){var t,r,o,a,s,c,l=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(u,i(e.subarray(t-64,t)));for(r=(e=t-64<l?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(u,o),t=0;t<16;t+=1)o[t]=0;return a=(a=8*l).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),c=parseInt(a[1],16)||0,o[14]=s,o[15]=c,n(u,o),u}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 l(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function u(e,t){var n,r=e.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=e.charCodeAt(n);return t?o: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 h(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 p(){this.reset()}return c(o("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,o,a,s,c=this.byteLength,l=t(n,c),u=c;return r!==e&&(u=t(r,c)),l>u?new ArrayBuffer(0):(i=u-l,o=new ArrayBuffer(i),a=new Uint8Array(o),s=new Uint8Array(this,l,i),a.set(s),o)}}(),p.prototype.append=function(e){return this.appendBinary(l(e)),this},p.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},p.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=c(this._hash),e&&(n=h(n)),this.reset(),n},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},p.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(e,t){var r,i,o,a=t;if(e[a>>2]|=128<<(a%4<<3),a>55)for(n(this._hash,e),a=0;a<16;a+=1)e[a]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,e[14]=i,e[15]=o,n(this._hash,e)},p.hash=function(e,t){return p.hashBinary(l(e),t)},p.hashBinary=function(e,t){var n=c(o(e));return t?h(n):n},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(e){var t,r=f(this._buff.buffer,e,!0),o=r.length;for(this._length+=e.byteLength,t=64;t<=o;t+=64)n(this._hash,i(r.subarray(t-64,t)));return this._buff=t-64<o?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},p.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=c(this._hash),e&&(n=h(n)),this.reset(),n},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var e=p.prototype.getState.call(this);return e.buff=d(e.buff),e},p.ArrayBuffer.prototype.setState=function(e){return e.buff=u(e.buff,!0),p.prototype.setState.call(this,e)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(e,t){var n=c(a(new Uint8Array(e)));return t?h(n):n},p}()}(ade);var sde=ut(ade.exports),cde=function(){function e(e){this.user=e}return e.prototype.track=function(e,t,n,r){return this.normalize(wle(wle({},this.baseEvent()),{event:e,type:"track",properties:t,options:wle({},n),integrations:wle({},r)}))},e.prototype.page=function(e,t,n,r,i){var o,a={type:"page",properties:wle({},n),options:wle({},r),integrations:wle({},i)};return null!==e&&(a.category=e,a.properties=null!==(o=a.properties)&&void 0!==o?o:{},a.properties.category=e),null!==t&&(a.name=t),this.normalize(wle(wle({},this.baseEvent()),a))},e.prototype.screen=function(e,t,n,r,i){var o={type:"screen",properties:wle({},n),options:wle({},r),integrations:wle({},i)};return null!==e&&(o.category=e),null!==t&&(o.name=t),this.normalize(wle(wle({},this.baseEvent()),o))},e.prototype.identify=function(e,t,n,r){return this.normalize(wle(wle({},this.baseEvent()),{type:"identify",userId:e,traits:t,options:wle({},n),integrations:wle({},r)}))},e.prototype.group=function(e,t,n,r){return this.normalize(wle(wle({},this.baseEvent()),{type:"group",traits:t,options:wle({},n),integrations:wle({},r),groupId:e}))},e.prototype.alias=function(e,t,n,r){var i={userId:e,type:"alias",options:wle({},n),integrations:wle({},r)};return null!==t&&(i.previousId=t),void 0===e?this.normalize(wle(wle({},i),this.baseEvent())):this.normalize(wle(wle({},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"],o=null!==(t=e.options)&&void 0!==t?t:{};delete o.integrations;var a=Object.keys(o),s=null!==(r=null===(n=e.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},c={};return a.forEach((function(e){"context"!==e&&(i.includes(e)?Jle(c,e,o[e]):Jle(s,e,o[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 wle(wle({},t),((r={})[n]=Boolean(null===(i=e.integrations)||void 0===i?void 0:i[n]),r))}),{}),o=wle(wle({},i),null===(r=e.options)||void 0===r?void 0:r.integrations),a=this.context(e),s=a[0],c=a[1];e.options;var l=Ele(e,["options"]),u=wle(wle(wle({timestamp:new Date},l),{context:s,integrations:o}),c),d="ajs-next-"+sde.hash(JSON.stringify(u)+pue());return wle(wle({},u),{messageId:d})},e}(),lde={getItem:function(){},setItem:function(){},removeItem:function(){}};try{lde=Sue()&&window.localStorage?window.localStorage:lde}catch(bJe){console.warn("Unable to access localStorage",bJe)}function ude(e){var t=lde.getItem(e);return(t?JSON.parse(t):[]).map((function(e){return new ode(e.event,e.id)}))}function dde(e){var t=lde.getItem(e);return t?JSON.parse(t):{}}function fde(e){lde.removeItem(e)}function hde(e,t,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(e,":lock"),i=lde.getItem(r),o=i?JSON.parse(i):null,a=null===o||function(e){return(new Date).getTime()>e}(o);if(a)return lde.setItem(r,JSON.stringify((new Date).getTime()+50)),t(),void lde.removeItem(r);!a&&n<3?setTimeout((function(){hde(e,t,n+1)}),50):console.error("Unable to retrieve lock")}var pde=function(e){function t(t,n){var r=e.call(this,t,[])||this,i="persisted-queue:v1:".concat(n,":items"),o="persisted-queue:v1:".concat(n,":seen"),a=[],s={};return hde(n,(function(){try{a=ude(i),s=dde(o),fde(i),fde(o),r.queue=Nle(Nle([],a,!0),r.queue,!0),r.seen=wle(wle({},s),r.seen)}catch(e){console.error(e)}})),window.addEventListener("pagehide",(function(){if(r.todo>0){var e=Nle(Nle([],r.queue,!0),r.future,!0);try{hde(n,(function(){!function(e,t){var n=ude(e),r=Nle(Nle([],t,!0),n,!0).reduce((function(e,t){var n;return wle(wle({},e),((n={})[t.id]=t,n))}),{});lde.setItem(e,JSON.stringify(Object.values(r)))}(i,e),function(e,t){var n=dde(e);lde.setItem(e,JSON.stringify(wle(wle({},n),t)))}(o,r.seen)}))}catch(e){console.error(e)}}})),r}return ble(t,e),t}(due),mde=function(e){function t(t){return e.call(this,"string"==typeof t?new pde(4,t):t)||this}return ble(t,e),t.prototype.flush=function(){return _le(this,void 0,void 0,(function(){return Cle(this,(function(t){return Pue()?[2,[]]:[2,e.prototype.flush.call(this)]}))}))},t}(xue);function yde(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 o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);o&&"function"==typeof o.value&&(e[i]=e[i].bind(e))}}return e}var gde={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},vde=function(){function e(e,t){void 0===e&&(e=gde);var n,r,i,o,a=this;this.options={},this.id=function(e){if(a.options.disable)return null;var t=a.identityStore.getAndSync(a.idKey);void 0!==e&&(a.identityStore.set(a.idKey,e),e!==t&&null!==t&&null!==e&&a.anonymousId(null));var n=a.identityStore.getAndSync(a.idKey);if(n)return n;var r=a.legacyUserStore.get(gde.cookie.oldKey);return r?"object"==typeof r?r.id:r:null},this.anonymousId=function(e){var t,n;if(a.options.disable)return null;if(void 0===e){var r=null!==(t=a.identityStore.getAndSync(a.anonKey))&&void 0!==t?t:null===(n=a.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===e?(a.identityStore.set(a.anonKey,null),a.identityStore.getAndSync(a.anonKey)):(a.identityStore.set(a.anonKey,null!=e?e:pue()),a.identityStore.getAndSync(a.anonKey))},this.traits=function(e){var t;if(!a.options.disable)return null===e&&(e={}),e&&a.traitsStore.set(a.traitsKey,null!=e?e:{}),null!==(t=a.traitsStore.get(a.traitsKey))&&void 0!==t?t:{}},this.options=wle(wle({},gde),e),this.cookieOptions=t,this.idKey=null!==(r=null===(n=e.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:gde.cookie.key,this.traitsKey=null!==(o=null===(i=e.localStorage)||void 0===i?void 0:i.key)&&void 0!==o?o:gde.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===Vue.Cookie})),this.traitsStore=this.createStorage(this.options,t,(function(e){return e!==Vue.Cookie}));var s=this.legacyUserStore.get(gde.cookie.oldKey);s&&"object"==typeof s&&(s.id&&this.id(s.id),s.traits&&this.traits(s.traits)),yde(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=wle(wle({},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=[Vue.LocalStorage,Vue.Cookie,Vue.Memory];return e.disable?new Kue([]):e.persist?(void 0!==e.storage&&null!==e.storage&&Gue(e.storage)&&(r=e.storage.stores),e.localStorageFallbackDisabled&&(r=r.filter((function(e){return e!==Vue.LocalStorage}))),n&&(r=r.filter(n)),new Kue(Xue(Yue(r,t)))):new Kue([new Wue])},e.defaults=gde,e}(),bde={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},wde=function(e){function t(t,n){void 0===t&&(t=bde);var r=e.call(this,wle(wle({},bde),t),n)||this;return r.anonymousId=function(e){},yde(r),r}return ble(t,e),t}(vde),Ede="This is being deprecated and will be not be available in future releases of Analytics JS",xde=Mue(),Tde=null==xde?void 0:xde.analytics;function Ade(){console.warn(Ede)}var _de=function(e){function t(t,n,r,i,o){var a,s,c,l=this;(l=e.call(this)||this)._debug=!1,l.initialized=!1,l.user=function(){return l._user},l.init=l.initialize.bind(l),l.log=Ade,l.addIntegrationMiddleware=Ade,l.listeners=Ade,l.addEventListener=Ade,l.removeAllListeners=Ade,l.removeListener=Ade,l.removeEventListener=Ade,l.hasListeners=Ade,l.add=Ade,l.addIntegration=Ade;var u=null==n?void 0:n.cookie,d=null!==(a=null==n?void 0:n.disableClientPersistence)&&void 0!==a&&a;l.settings=t,l.settings.timeout=null!==(s=l.settings.timeout)&&void 0!==s?s:300,l.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 due(r,[]):new pde(r,e);return new mde(i)}("".concat(t.writeKey,":event-queue"),null==n?void 0:n.retryQueue,d);var f=null==n?void 0:n.storage;return l._universalStorage=l.createStore(d,f,u),l._user=null!=i?i:new vde(wle({persist:!d,storage:null==n?void 0:n.storage},null==n?void 0:n.user),u).load(),l._group=null!=o?o:new wde(wle({persist:!d,storage:null==n?void 0:n.storage},null==n?void 0:n.group),u).load(),l.eventFactory=new cde(l._user),l.integrations=null!==(c=null==n?void 0:n.integrations)&&void 0!==c?c:{},l.options=null!=n?n:{},yde(l),l}return ble(t,e),t.prototype.createStore=function(e,t,n){return e?new Kue([new Wue]):t&&Gue(t)?new Kue(Xue(Yue(t.stores,n))):new Kue(Xue([Vue.LocalStorage,{name:Vue.Cookie,settings:n},Vue.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 _le(this,void 0,void 0,(function(){var t,n,r,i,o,a,s=this;return Cle(this,(function(c){return t=Aue.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],a=this.eventFactory.track(n,r,i,this.integrations),[2,this._dispatch(a,o).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 _le(this,void 0,void 0,(function(){var t,n,r,i,o,a,s,c=this;return Cle(this,(function(l){return t=_ue.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=this.eventFactory.page(n,r,i,o,this.integrations),[2,this._dispatch(s,a).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 _le(this,void 0,void 0,(function(){var t,n,r,i,o,a,s=this;return Cle(this,(function(c){return t=Cue(this._user).apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],this._user.identify(n,r),a=this.eventFactory.identify(this._user.id(),this._user.traits(),i,this.integrations),[2,this._dispatch(a,o).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=Cue(this._group).apply(void 0,t),i=r[0],o=r[1],a=r[2],s=r[3];this._group.identify(i,o);var c=this._group.id(),l=this._group.traits(),u=this.eventFactory.group(c,l,a,this.integrations);return this._dispatch(u,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 _le(this,void 0,void 0,(function(){var t,n,r,i,o,a,s=this;return Cle(this,(function(c){return t=Iue.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],a=this.eventFactory.alias(n,r,i,this.integrations),[2,this._dispatch(a,o).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 _le(this,void 0,void 0,(function(){var t,n,r,i,o,a,s,c=this;return Cle(this,(function(l){return t=_ue.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=this.eventFactory.screen(n,r,i,o,this.integrations),[2,this._dispatch(s,a).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 _le(this,void 0,void 0,(function(){var t,n;return Cle(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return LNe}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,Nle([this],e,!1))]}}))}))},t.prototype.trackLink=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _le(this,void 0,void 0,(function(){var t,n;return Cle(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return LNe}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,Nle([this],e,!1))]}}))}))},t.prototype.trackSubmit=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _le(this,void 0,void 0,(function(){var t,n;return Cle(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return LNe}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,Nle([this],e,!1))]}}))}))},t.prototype.trackForm=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _le(this,void 0,void 0,(function(){var t,n;return Cle(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return LNe}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,Nle([this],e,!1))]}}))}))},t.prototype.register=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _le(this,void 0,void 0,(function(){var t,n,r=this;return Cle(this,(function(i){switch(i.label){case 0:return t=ode.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 _le(this,void 0,void 0,(function(){var t,n,r=this;return Cle(this,(function(i){switch(i.label){case 0:return t=ode.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 _le(this,void 0,void 0,(function(){var n;return Cle(this,(function(r){return n=new ode(e),Pue()&&!this.options.retryQueue?[2,n]:[2,Tue(n,this.queue,this,{callback:t,debug:this._debug,timeout:this.settings.timeout})]}))}))},t.prototype.addSourceMiddleware=function(e){return _le(this,void 0,void 0,(function(){var t=this;return Cle(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return _le(t,void 0,void 0,(function(){var t,n,r;return Cle(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve().then((function(){return xhe}))];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 _le(this,void 0,void 0,(function(){return Cle(this,(function(t){switch(t.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,Promise.resolve().then((function(){return BNe}))];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}),_le(this,void 0,void 0,(function(){return Cle(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(Ede),window.analytics=null!=Tde?Tde:this,this},t.prototype.normalize=function(e){return console.warn(Ede),this.eventFactory.normalize(e)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(Ede),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return Lue},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e,t){return _le(this,void 0,void 0,(function(){return Cle(this,(function(e){return console.warn(Ede),[2,Promise.resolve(this)]}))}))},t.prototype.pageview=function(e){return _le(this,void 0,void 0,(function(){return Cle(this,(function(t){switch(t.label){case 0:return console.warn(Ede),[4,this.page({path:e})];case 1:return t.sent(),[2,this]}}))}))},Object.defineProperty(t.prototype,"plugins",{get:function(){var e;return console.warn(Ede),null!==(e=this._plugins)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(Ede);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}(Zle);function Cde(){return"undefined"!=typeof process&&process.env?process.env:{}}var Ide,Sde=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,kde=function(){var e=function(){var e;return null!=Ide?Ide: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=Sde.exec(r);i&&i[1]&&(t=i[1])})),t);return n||"https://cdn.segment.com"},Ode=function(){var e=kde();return"".concat(e,"/next-integrations")};function Pde(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],o=t[1];return wle(wle({},e),"object"==typeof o?((n={})[i]=o,n):((r={})[i]={},r))}),{});return Object.entries(e.integrations).reduce((function(e,t){var n,i=t[0],o=t[1];return wle(wle({},e),((n={})[i]=wle(wle({},o),r[i]),n))}),{})}function Rde(){var e=document.querySelector("link[rel='canonical']");if(e)return e.getAttribute("href")||void 0}function Nde(){var e=Rde();if(!e)return window.location.pathname;var t=document.createElement("a");return t.href=e,t.pathname.startsWith("/")?t.pathname:"/"+t.pathname}function Mde(e){void 0===e&&(e="");var t=Rde();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 Dde(e){var t=e.event;t.context=t.context||{};var n={path:Nde(),referrer:document.referrer,search:location.search,title:document.title,url:Mde(location.search)},r=void 0;return"page"===t.type&&(r=t.properties&&function(e,t){return Object.assign.apply(Object,Nle([{}],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=wle(wle(wle({},n),t.properties),t.name?{name:t.name}:{})),t.context.page=wle(wle(wle({},n),r),t.context.page),e}var Lde={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:Dde,alias:Dde,track:Dde,identify:Dde,group:Dde};function Fde(e){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(t){return t.src===e}))}function Bde(e,t){var n=Fde(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,o=window.document.createElement("script");o.type="text/javascript",o.src=e,o.async=!0,o.setAttribute("status","loading");for(var a=0,s=Object.entries(null!=t?t:{});a<s.length;a++){var c=s[a],l=c[0],u=c[1];o.setAttribute(l,u)}o.onload=function(){o.onerror=o.onload=null,o.setAttribute("status","loaded"),n(o)},o.onerror=function(){o.onerror=o.onload=null,o.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(o,d)}))}function Ude(e){var t=Fde(e);return void 0!==t&&t.remove(),Promise.resolve()}var zde={},jde={},Hde={},Wde={exports:{}};!function(e){function t(e){return function(t,n,r,o){var a,s=o&&function(e){return"function"==typeof e}(o.normalizer)?o.normalizer:i;n=s(n);for(var c=!1;!c;)l();function l(){for(a in t){var e=s(a);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[a];return null==i?void(c=!0):n.length?void(t=i):void(c=!0)}}}a=void 0,c=!0}if(a)return null==t?t:e(t,a,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,o){return t(r).call(this,e,n,i,o),e},e.exports.del=function(e,r,i){return t(n).call(this,e,r,null,i),e}}(Wde);var Vde=Wde.exports,Gde=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hde,"__esModule",{value:!0});var qde=Gde(Vde);function Kde(e,t){return function(){var n=this.traits(),r=this.properties?this.properties():{};return qde.default(n,"address."+e)||qde.default(n,e)||(t?qde.default(n,"address."+t):null)||(t?qde.default(n,t):null)||qde.default(r,"address."+e)||qde.default(r,e)||(t?qde.default(r,"address."+t):null)||(t?qde.default(r,t):null)}}Hde.default=function(e){e.zip=Kde("postalCode","zip"),e.country=Kde("country"),e.street=Kde("street"),e.state=Kde("state"),e.city=Kde("city"),e.region=Kde("region")};var Xde={};Object.defineProperty(Xde,"__esModule",{value:!0}),Xde.clone=void 0,Xde.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 Yde={};Object.defineProperty(Yde,"__esModule",{value:!0});var Zde={Salesforce:!0};Yde.default=function(e){return!Zde[e]};var Jde={},Qde=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;Jde.parse=function(e){var t=[1,5,6,7,11,12],n=Qde.exec(e),r=0;if(!n)return new Date(e);for(var i,o=0;i=t[o];o++)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 a=Date.UTC(n[1],n[2],n[3],n[5],n[6]+r,n[7],n[8]);return new Date(a)},Jde.is=function(e,t){return"string"==typeof e&&((!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&Qde.test(e))};var $de={},efe=/\d{13}/;$de.is=function(e){return efe.test(e)},$de.parse=function(e){return e=parseInt(e,10),new Date(e)};var tfe={},nfe=/\d{10}/;tfe.is=function(e){return nfe.test(e)},tfe.parse=function(e){var t=1e3*parseInt(e,10);return new Date(t)};var rfe=Jde,ife=$de,ofe=tfe,afe=Object.prototype.toString;var sfe=function(e){return t=e,"[object Date]"===afe.call(t)?e:function(e){return"[object Number]"===afe.call(e)}(e)?new Date((n=e)<315576e5?1e3*n:n):rfe.is(e)?rfe.parse(e):ife.is(e)?ife.parse(e):ofe.is(e)?ofe.parse(e):new Date(e);var t,n};var cfe=Jde,lfe=ufe;function ufe(e,t){return void 0===t&&(t=!0),e&&"object"==typeof e?function(e,t){return Object.keys(e).forEach((function(n){e[n]=ufe(e[n],t)})),e}(e,t):Array.isArray(e)?function(e,t){return e.forEach((function(n,r){e[r]=ufe(n,t)})),e}(e,t):cfe.is(e,t)?cfe.parse(e):e}var dfe=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jde,"__esModule",{value:!0}),jde.Facade=void 0;var ffe=dfe(Hde),hfe=Xde,pfe=dfe(Yde),mfe=dfe(sfe),yfe=dfe(Vde),gfe=dfe(lfe);function vfe(e,t){t=t||{},this.raw=hfe.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=hfe.clone(e)),"traverse"in t||(t.traverse=!0),e.timestamp="timestamp"in e?mfe.default(e.timestamp):new Date,t.traverse&&gfe.default(e),this.opts=t,this.obj=e}jde.Facade=vfe;var bfe=vfe.prototype;function wfe(e){return hfe.clone(e)}bfe.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=yfe.default(n,t.join("."))),this.opts.clone?wfe(n):n):n},bfe.field=function(e){var t=this.obj[e];return this.opts.clone?wfe(t):t},vfe.proxy=function(e){return function(){return this.proxy(e)}},vfe.field=function(e){return function(){return this.field(e)}},vfe.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?hfe.clone(n):n]),n||[]}},vfe.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}},bfe.json=function(){var e=this.opts.clone?hfe.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},bfe.rawEvent=function(){return this.raw},bfe.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?hfe.clone(t):t;if(!e)return n;if(this.enabled(e)){var r=this.integrations(),i=r[e]||yfe.default(r,e);return"object"!=typeof i&&(i=yfe.default(this.options(),e)),"object"==typeof i?i:{}}},bfe.context=bfe.options,bfe.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&&pfe.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},bfe.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},bfe.active=function(){var e=this.proxy("options.active");return null==e&&(e=!0),e},bfe.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},bfe.sessionId=bfe.anonymousId,bfe.groupId=vfe.proxy("options.groupId"),bfe.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},bfe.library=function(){var e=this.proxy("options.library");return e?"string"==typeof e?{name:e,version:null}:e:{name:"unknown",version:null}},bfe.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},bfe.userAgent=vfe.proxy("context.userAgent"),bfe.timezone=vfe.proxy("context.timezone"),bfe.timestamp=vfe.field("timestamp"),bfe.channel=vfe.field("channel"),bfe.ip=vfe.proxy("context.ip"),bfe.userId=vfe.field("userId"),ffe.default(bfe);var Efe={},xfe=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Efe,"__esModule",{value:!0}),Efe.Alias=void 0;var Tfe=xfe(zs),Afe=jde;function _fe(e,t){Afe.Facade.call(this,e,t)}Efe.Alias=_fe,Tfe.default(_fe,Afe.Facade),_fe.prototype.action=function(){return"alias"},_fe.prototype.type=_fe.prototype.action,_fe.prototype.previousId=function(){return this.field("previousId")||this.field("from")},_fe.prototype.from=_fe.prototype.previousId,_fe.prototype.userId=function(){return this.field("userId")||this.field("to")},_fe.prototype.to=_fe.prototype.userId;var Cfe={},Ife={};Object.defineProperty(Ife,"__esModule",{value:!0});var Sfe=/.+\@.+\..+/;Ife.default=function(e){return Sfe.test(e)};var kfe=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cfe,"__esModule",{value:!0}),Cfe.Group=void 0;var Ofe=kfe(zs),Pfe=kfe(Ife),Rfe=kfe(sfe),Nfe=jde;function Mfe(e,t){Nfe.Facade.call(this,e,t)}Cfe.Group=Mfe,Ofe.default(Mfe,Nfe.Facade);var Dfe=Mfe.prototype;Dfe.action=function(){return"group"},Dfe.type=Dfe.action,Dfe.groupId=Nfe.Facade.field("groupId"),Dfe.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return Rfe.default(e)},Dfe.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();return Pfe.default(t)?t:void 0},Dfe.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},Dfe.name=Nfe.Facade.proxy("traits.name"),Dfe.industry=Nfe.Facade.proxy("traits.industry"),Dfe.employees=Nfe.Facade.proxy("traits.employees"),Dfe.properties=function(){return this.field("traits")||this.field("properties")||{}};var Lfe={},Ffe=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lfe,"__esModule",{value:!0}),Lfe.Identify=void 0;var Bfe=jde,Ufe=Ffe(Vde),zfe=Ffe(zs),jfe=Ffe(Ife),Hfe=Ffe(sfe),Wfe=function(e){return e.trim()};function Vfe(e,t){Bfe.Facade.call(this,e,t)}Lfe.Identify=Vfe,zfe.default(Vfe,Bfe.Facade);var Gfe=Vfe.prototype;Gfe.action=function(){return"identify"},Gfe.type=Gfe.action,Gfe.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},Gfe.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();return jfe.default(t)?t:void 0},Gfe.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return Hfe.default(e)},Gfe.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return Hfe.default(e)},Gfe.companyName=function(){return this.proxy("traits.company.name")},Gfe.name=function(){var e=this.proxy("traits.name");if("string"==typeof e)return Wfe(e);var t=this.firstName(),n=this.lastName();return t&&n?Wfe(t+" "+n):void 0},Gfe.firstName=function(){var e=this.proxy("traits.firstName");if("string"==typeof e)return Wfe(e);var t=this.proxy("traits.name");return"string"==typeof t?Wfe(t).split(" ")[0]:void 0},Gfe.lastName=function(){var e=this.proxy("traits.lastName");if("string"==typeof e)return Wfe(e);var t=this.proxy("traits.name");if("string"==typeof t){var n=Wfe(t).indexOf(" ");if(-1!==n)return Wfe(t.substr(n+1))}},Gfe.uid=function(){return this.userId()||this.username()||this.email()},Gfe.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},Gfe.age=function(){var e=this.birthday(),t=Ufe.default(this.traits(),"age");return null!=t?t:e instanceof Date?(new Date).getFullYear()-e.getFullYear():void 0},Gfe.avatar=function(){var e=this.traits();return Ufe.default(e,"avatar")||Ufe.default(e,"photoUrl")||Ufe.default(e,"avatarUrl")},Gfe.position=function(){var e=this.traits();return Ufe.default(e,"position")||Ufe.default(e,"jobTitle")},Gfe.username=Bfe.Facade.proxy("traits.username"),Gfe.website=Bfe.Facade.one("traits.website"),Gfe.websites=Bfe.Facade.multi("traits.website"),Gfe.phone=Bfe.Facade.one("traits.phone"),Gfe.phones=Bfe.Facade.multi("traits.phone"),Gfe.address=Bfe.Facade.proxy("traits.address"),Gfe.gender=Bfe.Facade.proxy("traits.gender"),Gfe.birthday=Bfe.Facade.proxy("traits.birthday");var qfe={},Kfe=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qfe,"__esModule",{value:!0}),qfe.Track=void 0;var Xfe=Kfe(zs),Yfe=jde,Zfe=Lfe,Jfe=Kfe(Ife),Qfe=Kfe(Vde);function $fe(e,t){Yfe.Facade.call(this,e,t)}qfe.Track=$fe,Xfe.default($fe,Yfe.Facade);var ehe=$fe.prototype;ehe.action=function(){return"track"},ehe.type=ehe.action,ehe.event=Yfe.Facade.field("event"),ehe.value=Yfe.Facade.proxy("properties.value"),ehe.category=Yfe.Facade.proxy("properties.category"),ehe.id=Yfe.Facade.proxy("properties.id"),ehe.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},ehe.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},ehe.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},ehe.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},ehe.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},ehe.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},ehe.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},ehe.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},ehe.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},ehe.sku=Yfe.Facade.proxy("properties.sku"),ehe.tax=Yfe.Facade.proxy("properties.tax"),ehe.name=Yfe.Facade.proxy("properties.name"),ehe.price=Yfe.Facade.proxy("properties.price"),ehe.total=Yfe.Facade.proxy("properties.total"),ehe.repeat=Yfe.Facade.proxy("properties.repeat"),ehe.coupon=Yfe.Facade.proxy("properties.coupon"),ehe.shipping=Yfe.Facade.proxy("properties.shipping"),ehe.discount=Yfe.Facade.proxy("properties.discount"),ehe.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},ehe.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},ehe.description=Yfe.Facade.proxy("properties.description"),ehe.plan=Yfe.Facade.proxy("properties.plan"),ehe.subtotal=function(){var e=Qfe.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},ehe.products=function(){var e=this.properties(),t=Qfe.default(e,"products");return Array.isArray(t)?t.filter((function(e){return null!==e})):[]},ehe.quantity=function(){return(this.obj.properties||{}).quantity||1},ehe.currency=function(){return(this.obj.properties||{}).currency||"USD"},ehe.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},ehe.query=Yfe.Facade.proxy("options.query"),ehe.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},ehe.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},ehe.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 Jfe.default(t)?t:void 0},ehe.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)},ehe.cents=function(){var e=this.revenue();return"number"!=typeof e?this.value()||0:100*e},ehe.identify=function(){var e=this.json();return e.traits=this.traits(),new Zfe.Identify(e,this.opts)};var the={},nhe=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(the,"__esModule",{value:!0}),the.Page=void 0;var rhe=nhe(zs),ihe=jde,ohe=qfe,ahe=nhe(Ife);function she(e,t){ihe.Facade.call(this,e,t)}the.Page=she,rhe.default(she,ihe.Facade);var che=she.prototype;che.action=function(){return"page"},che.type=che.action,che.category=ihe.Facade.field("category"),che.name=ihe.Facade.field("name"),che.title=ihe.Facade.proxy("properties.title"),che.path=ihe.Facade.proxy("properties.path"),che.url=ihe.Facade.proxy("properties.url"),che.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},che.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 o=null==this[i]?this.proxy("properties."+i):this[i]();if(null==o)continue;t[e[i]]=o,i!==e[i]&&delete t[i]}return t},che.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();return ahe.default(t)?t:void 0},che.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t},che.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"},che.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new ohe.Track(t,this.opts)};var lhe={},uhe=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lhe,"__esModule",{value:!0}),lhe.Screen=void 0;var dhe=uhe(zs),fhe=the,hhe=qfe;function phe(e,t){fhe.Page.call(this,e,t)}lhe.Screen=phe,dhe.default(phe,fhe.Page),phe.prototype.action=function(){return"screen"},phe.prototype.type=phe.prototype.action,phe.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"},phe.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new hhe.Track(t,this.opts)};var mhe={},yhe=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mhe,"__esModule",{value:!0}),mhe.Delete=void 0;var ghe=yhe(zs),vhe=jde;function bhe(e,t){vhe.Facade.call(this,e,t)}function whe(e,t){var n=new zde.Facade(e,t);return"track"===e.type&&(n=new zde.Track(e,t)),"identify"===e.type&&(n=new zde.Identify(e,t)),"page"===e.type&&(n=new zde.Page(e,t)),"alias"===e.type&&(n=new zde.Alias(e,t)),"group"===e.type&&(n=new zde.Group(e,t)),"screen"===e.type&&(n=new zde.Screen(e,t)),Object.defineProperty(n,"obj",{value:e,writable:!0}),n}function Ehe(e,t,n){return _le(this,void 0,void 0,(function(){function r(t,n){return _le(this,void 0,void 0,(function(){var r,i,o;return Cle(this,(function(a){switch(a.label){case 0:return r=!1,i=null,[4,n({payload:whe(t,{clone:!0,traverse:!1}),integration:e,next:function(e){r=!0,null===e&&(i=null),e&&(i=e.obj)}})];case 1:return a.sent(),r||null===i||(i.integrations=wle(wle({},t.integrations),((o={})[e]=!1,o))),[2,i]}}))}))}var i,o,a,s,c;return Cle(this,(function(e){switch(e.label){case 0:i=whe(t,{clone:!0,traverse:!1}).rawEvent(),o=0,a=n,e.label=1;case 1:return o<a.length?(s=a[o],[4,r(i,s)]):[3,4];case 2:if(null===(c=e.sent()))return[2,null];i=c,e.label=3;case 3:return o++,[3,1];case 4:return[2,i]}}))}))}mhe.Delete=bhe,ghe.default(bhe,vhe.Facade),bhe.prototype.type=function(){return"delete"},function(e){var t=lt&<.__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=jde;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=Efe;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=Cfe;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var o=Lfe;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}});var a=qfe;Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return a.Track}});var s=the;Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return s.Page}});var c=lhe;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return c.Screen}});var l=mhe;Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return l.Delete}}),e.default=t(t({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:o.Identify,Track:a.Track,Page:s.Page,Screen:c.Screen,Delete:l.Delete})}(zde);var xhe=Object.freeze({__proto__:null,applyDestinationMiddleware:Ehe,sourceMiddlewarePlugin:function(e,t){function n(n){return _le(this,void 0,void 0,(function(){var r;return Cle(this,(function(i){switch(i.label){case 0:return r=!1,[4,e({payload:whe(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 vue({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}}}),The=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 _le(this,void 0,void 0,(function(){var t;return Cle(this,(function(n){switch(n.label){case 0:return[4,Ehe(this.name,e.event,this.middleware)];case 1:return null===(t=n.sent())&&e.cancel(new vue({retry:!1,reason:"dropped by destination middleware"})),[2,new ode(t)]}}))}))},e.prototype._createMethod=function(e){var t=this;return function(n){return _le(t,void 0,void 0,(function(){var t;return Cle(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 Ahe(e,t,n,r,i){var o,a,s;return _le(this,void 0,void 0,(function(){var c,l,u,d,f=this;return Cle(this,(function(h){switch(h.label){case 0:return c=[],l=kde(),u=null!==(a=null===(o=e.middlewareSettings)||void 0===o?void 0:o.routingRules)&&void 0!==a?a:[],d=(null!==(s=e.remotePlugins)&&void 0!==s?s:[]).map((function(e){return _le(f,void 0,void 0,(function(){var o,a,s,d,f,h,p,m,y;return Cle(this,(function(g){switch(g.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];g.label=1;case 1:if(g.trys.push([1,12,,13]),o=new RegExp("https://cdn.segment.(com|build)"),!r)return[3,7];a=e.url.split("/"),s=a[a.length-2],d=e.url.replace(s,btoa(s).replace(/=/g,"")),g.label=2;case 2:return g.trys.push([2,4,,6]),[4,Bde(d.replace(o,l))];case 3:return g.sent(),[3,6];case 4:return g.sent(),[4,Bde(e.url.replace(o,l))];case 5:return g.sent(),[3,6];case 6:return[3,9];case 7:return[4,Bde(e.url.replace(o,l))];case 8:g.sent(),g.label=9;case 9:return f=e.libraryName,"function"!=typeof window[f]?[3,11]:[4,(0,window[f])(wle(wle({},e.settings),n[e.name]))];case 10:h=g.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))}))}))}(p=Array.isArray(h)?h:[h]),m=u.filter((function(t){return t.destinationName===e.creationName})),p.forEach((function(t){var n=new The(e.creationName,t);m.length&&i&&"destination"===t.type&&n.addMiddleware(i),c.push(n)})),g.label=11;case 11:return[3,13];case 12:return y=g.sent(),console.warn("Failed to load Remote Plugin",y),[3,13];case 13:return[2]}}))}))})),[4,Promise.all(d)];case 1:return h.sent(),[2,c.filter(Boolean)]}}))}))}var _he=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)}))},Che=500;function Ihe(e){return(encodeURI(JSON.stringify(e)).split(/%..|./).length-1)/1024}function She(e,t){var n,r,i,o=[],a=!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 l(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,Ele(t,["sentAt"])}));return Due("https://".concat(e,"/b"),{keepalive:a,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({writeKey:r,batch:i,sentAt:(new Date).toISOString()})})}}function u(){return _le(this,void 0,void 0,(function(){var e;return Cle(this,(function(t){return o.length?(e=o,o=[],[2,l(e)]):[2]}))}))}return _he((function(e){if((a=e)&&o.length){var t=function(e){var t=[],n=0;return e.forEach((function(e){Ihe(t[n])>=64&&n++,t[n]?t[n].push(e):t[n]=[e]})),t}(o).map(l);Promise.all(t).catch(console.error)}})),{dispatch:function(e,t){return _le(this,void 0,void 0,(function(){var e;return Cle(this,(function(n){return o.push(t),e=o.length>=s||function(e){return Ihe(e)>=Che-50}(o),[2,e||a?u():void(i||(i=setTimeout((function(){i=void 0,u().catch(console.error)}),c)))]}))}))}}}var khe=function(e,t){return _le(void 0,void 0,void 0,(function(){var n;return Cle(this,(function(r){return n=function(r){return _le(void 0,void 0,void 0,(function(){var i;return Cle(this,(function(o){switch(o.label){case 0:return e(r)?(i=n,[4,t()]):[3,2];case 1:return[2,i.apply(void 0,[o.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))};function Ohe(e,t){return _le(this,void 0,void 0,(function(){var n,r=this;return Cle(this,(function(i){switch(i.label){case 0:return n=[],Pue()?[2,t]:[4,khe((function(){return t.length>0&&!Pue()}),(function(){return _le(r,void 0,void 0,(function(){var r,i;return Cle(this,(function(o){switch(o.label){case 0:return(r=t.pop())?[4,wue(r,e)]:[2];case 1:return i=o.sent(),i instanceof ode||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}function Phe(e,t,n,r){var i=this;e||setTimeout((function(){return _le(i,void 0,void 0,(function(){var e,i;return Cle(this,(function(o){switch(o.label){case 0:return e=!0,[4,Ohe(n,t)];case 1:return i=o.sent(),e=!1,t.todo>0&&r(e,i,n,r),[2]}}))}))}),5e3*Math.random())}function Rhe(e){return _le(this,void 0,void 0,(function(){var t;return Cle(this,(function(n){return(t=navigator.userAgentData)?e?[2,t.getHighEntropyValues(e).catch((function(){return t.toJSON()}))]:[2,t.toJSON()]:[2,void 0]}))}))}function Nhe(e,t,n){var r,i,o;return _le(this,void 0,void 0,(function(){function a(r){return _le(this,void 0,void 0,(function(){var i,o;return Cle(this,(function(a){return Pue()?(c.push(r),Phe(u,c,g,Phe),[2,r]):(l.add(r),i=r.event.type.charAt(0),y&&r.event.context&&(r.event.context.userAgentData=y),o=whe(r.event).json(),"track"===r.event.type&&delete o.traits,"alias"===r.event.type&&(o=function(e,t){var n,r,i,o,a=e.user();return t.previousId=null!==(i=null!==(r=null!==(n=t.previousId)&&void 0!==n?n:t.from)&&void 0!==r?r:a.id())&&void 0!==i?i:a.anonymousId(),t.userId=null!==(o=t.userId)&&void 0!==o?o:t.to,delete t.from,delete t.to,t}(e,o)),[2,m.dispatch("".concat(h,"/").concat(i),$ue(e,o,t,n)).then((function(){return r})).catch((function(){return c.pushWithBackoff(r),Phe(u,c,g,Phe),r})).finally((function(){l.delete(r)}))])}))}))}var s,c,l,u,d,f,h,p,m,y,g;return Cle(this,(function(n){switch(n.label){case 0:window.addEventListener("pagehide",(function(){c.push.apply(c,Array.from(l)),l.clear()})),s=null!==(r=null==t?void 0:t.apiKey)&&void 0!==r?r:"",c=e.options.disableClientPersistence?new due(e.queue.queue.maxAttempts,[]):new pde(e.queue.queue.maxAttempts,"".concat(s,":dest-Segment.io")),l=new Set,u=!1,d=null!==(i=null==t?void 0:t.apiHost)&&void 0!==i?i:ede,f=null!==(o=null==t?void 0:t.protocol)&&void 0!==o?o:"https",h="".concat(f,"://").concat(d),p=null==t?void 0:t.deliveryStrategy,m="batching"===(null==p?void 0:p.strategy)?She(d,p.config):(v=null==p?void 0:p.config,{dispatch:function(e,t){return Due(e,{keepalive:null==v?void 0:v.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,Rhe(e.options.highEntropyValuesClientHints)];case 2:return y=n.sent(),[3,4];case 3:return n.sent(),y=void 0,[3,4];case 4:return g={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:a,identify:a,page:a,alias:a,group:a,screen:a},c.todo&&Phe(u,c,g,Phe),[2,g]}var v}))}))}function Mhe(e){var t,n=e.event;!function(e){if(!nue(e))throw new Qle("Event",aue);if("object"!=typeof e)throw new Qle("Event",oue)}(n),function(e){if(!$le(e.type))throw new Qle(".type",iue)}(n),"track"===n.type&&function(e){if(!$le(e.event))throw new Qle(".event",iue)}(n);var r=null!==(t=n.properties)&&void 0!==t?t:n.traits;if("alias"!==n.type&&!rue(r))throw new Qle(".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(!nue(n))throw new Qle(t,aue);if(!$le(n))throw new Qle(t,iue)}(n),e}var Dhe={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:Mhe,identify:Mhe,page:Mhe,alias:Mhe,group:Mhe,screen:Mhe},Lhe=function(e,t,n){n.getCalls(e).forEach((function(e){Hhe(t,e).catch(console.error)}))},Fhe=function(e,t){return _le(void 0,void 0,void 0,(function(){var n,r,i;return Cle(this,(function(o){switch(o.label){case 0:n=0,r=t.getCalls("addSourceMiddleware"),o.label=1;case 1:return n<r.length?(i=r[n],[4,Hhe(e,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},Bhe=Lhe.bind(window,"on"),Uhe=Lhe.bind(window,"setAnonymousId"),zhe=function(e,t){t.toArray().forEach((function(t){setTimeout((function(){Hhe(e,t).catch(console.error)}),0)}))},jhe=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 Hhe(e,t){return _le(this,void 0,void 0,(function(){var n,r;return Cle(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(o=n)&&null!==o&&"then"in o&&"function"==typeof o.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 o}))}))}var Whe=function(){function e(e){var t=this;this._preInitBuffer=new jhe,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=Lue,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 o=(n=t.instance)[e].apply(n,r);return Promise.resolve(o)}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 Vhe(e){var t=e[0],n=e.slice(1);return{method:t,resolve:function(){},reject:console.error,args:n,called:!1}}var Ghe,qhe,Khe=function(){var e=window.analytics;if(!Array.isArray(e))return[];var t=e.splice(0,e.length);return t.map(Vhe)},Xhe=null!==(Ghe=(qhe=Mue()).__SEGMENT_INSPECTOR__)&&void 0!==Ghe?Ghe:qhe.__SEGMENT_INSPECTOR__={};function Yhe(e,t){return _le(this,void 0,void 0,(function(){return Cle(this,(function(n){switch(n.label){case 0:return t.push.apply(t,Khe()),[4,Fhe(e,t)];case 1:return n.sent(),t.push.apply(t,Khe()),zhe(e,t),t.clear(),[2]}}))}))}function Zhe(e,t,n,r,i,o,a){var s,c,l;return _le(this,void 0,void 0,(function(){var u,d,f,h,p,m,y,g,v,b,w,E,x=this;return Cle(this,(function(T){switch(T.label){case 0:return function(e){var t,n,r;return"test"!==Cde().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 GLe})).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return d=T.sent(),[3,3];case 2:d=void 0,T.label=3;case 3:return u=d,A=t,"test"!==Cde().NODE_ENV&&Object.keys(A.integrations).length>1||a.length>0?[4,Promise.resolve().then((function(){return QLe})).then((function(i){return i.ajsDestinations(e,t,n.integrations,r,u,a)}))]:[3,5];case 4:return h=T.sent(),[3,6];case 5:h=[],T.label=6;case 6:return f=h,t.legacyVideoPluginsEnabled?[4,Promise.resolve().then((function(){return $Le})).then((function(e){return e.loadLegacyVideoPlugins(n)}))]:[3,8];case 7:T.sent(),T.label=8;case 8:return(null===(s=r.plan)||void 0===s?void 0:s.track)?[4,Promise.resolve().then((function(){return eFe})).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=T.sent(),[3,11];case 10:m=void 0,T.label=11;case 11:return p=m,y=Pde(t,i),[4,Ahe(t,n.integrations,y,i.obfuscate,u).catch((function(){return[]}))];case 12:return g=T.sent(),v=Nle(Nle(Nle([Dhe,Lde],o,!0),f,!0),g,!0),p&&v.push(p),!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=(b=v).push,[4,Nhe(n,y["Segment.io"],t.integrations)]);case 13:w.apply(b,[T.sent()]),T.label=14;case 14:return[4,n.register.apply(n,v)];case 15:return E=T.sent(),Object.entries(null!==(l=t.enabledMiddleware)&&void 0!==l?l:{}).some((function(e){return e[1]}))?[4,Promise.resolve().then((function(){return tFe})).then((function(e){var r=e.remoteMiddlewares;return _le(x,void 0,void 0,(function(){var e,o;return Cle(this,(function(a){switch(a.label){case 0:return[4,r(E,t,i.obfuscate)];case 1:return e=a.sent(),o=e.map((function(e){return n.addSourceMiddleware(e)})),[2,Promise.all(o)]}}))}))}))]:[3,17];case 16:T.sent(),T.label=17;case 17:return[2,E]}var A}))}))}function Jhe(e,t,n){var r,i,o,a,s,c,l;return void 0===t&&(t={}),_le(this,void 0,void 0,(function(){var u,d,f,h,p,m,y,g,v,b,w;return Cle(this,(function(E){switch(E.label){case 0:return e.cdnURL&&(_=e.cdnURL,window.analytics&&(window.analytics._cdn=_),Ide=_),null===(r=e.cdnSettings)||void 0===r?[3,1]:(d=r,[3,3]);case 1:return[4,(x=e.writeKey,T=e.cdnURL,A=null!=T?T:kde(),Due("".concat(A,"/v1/projects/").concat(x,"/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=E.sent(),E.label=3;case 3:return u=d,t.updateCDNSettings&&(u=t.updateCDNSettings(u)),f=null===(o=null===(i=u.integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===o||o,h=wle({retryQueue:f},t),function(e){var t;null===(t=Xhe.attach)||void 0===t||t.call(Xhe,e)}(p=new _de(e,h)),m=null!==(a=e.plugins)&&void 0!==a?a:[],y=null!==(s=e.classicIntegrations)&&void 0!==s?s:[],ide.initRemoteMetrics(u.metrics),function(e,t){t.push.apply(t,Khe()),Uhe(e,t),Bhe(e,t)}(p,n),[4,Zhe(e.writeKey,u,p,h,t,m,y)];case 4:return g=E.sent(),v=null!==(c=window.location.search)&&void 0!==c?c:"",b=null!==(l=window.location.hash)&&void 0!==l?l:"",(w=v.length?v:b.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,p.queryString(w).catch(console.error)]:[3,6];case 5:E.sent(),E.label=6;case 6:return p.initialized=!0,p.emit("initialize",e,t),t.initialPageview&&p.page().catch(console.error),[4,Yhe(p,n)];case 7:return E.sent(),[2,[p,g]]}var x,T,A,_}))}))}var Qhe=function(e){function t(){var t,n,r,i=this,o=(r=new Promise((function(e,r){t=e,n=r})),{resolve:t,reject:n,promise:r}),a=o.promise,s=o.resolve;return i=e.call(this,(function(e){return a.then((function(t){return Jhe(t[0],t[1],e)}))}))||this,i._resolveLoadStart=function(e,t){return s([e,t])},i}return ble(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}(Whe),$he=Object.create,epe=Object.defineProperty,tpe=Object.getOwnPropertyDescriptor,npe=Object.getOwnPropertyNames,rpe=Object.getOwnPropertySymbols,ipe=Object.getPrototypeOf,ope=Object.prototype.hasOwnProperty,ape=Object.prototype.propertyIsEnumerable,spe=(e,t,n)=>t in e?epe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cpe=(e,t)=>{for(var n in t||(t={}))ope.call(t,n)&&spe(e,n,t[n]);if(rpe)for(var n of rpe(t))ape.call(t,n)&&spe(e,n,t[n]);return e},lpe=(e,t)=>function(){return t||(0,e[npe(e)[0]])((t={exports:{}}).exports,t),t.exports},upe=(e,t,n)=>(n=null!=e?$he(ipe(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of npe(t))ope.call(e,n)||undefined===n||epe(e,n,{get:()=>t[n],enumerable:!(r=tpe(t,n))||r.enumerable});return e})(!t&&e&&e.__esModule?n:epe(n,"default",{value:e,enumerable:!0}),e)),dpe=lpe({"../../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,o=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,c=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,p=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,b=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 l:case u:case i:case a:case o:case f:return e;default:switch(e=e&&e.$$typeof){case c:case d:case m:case p:case s:return e;default:return t}}case r:return t}}}function E(e){return w(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=m,e.Memo=p,e.Portal=r,e.Profiler=a,e.StrictMode=o,e.Suspense=f,e.isAsyncMode=function(e){return E(e)||w(e)===l},e.isConcurrentMode=E,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)===p},e.isPortal=function(e){return w(e)===r},e.isProfiler=function(e){return w(e)===a},e.isStrictMode=function(e){return w(e)===o},e.isSuspense=function(e){return w(e)===f},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===u||e===a||e===o||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===y)},e.typeOf=w}}),fpe=lpe({"../../node_modules/react-is/index.js"(e,t){t.exports=dpe()}}),hpe=lpe({"../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"(e,t){var n=fpe(),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},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function s(e){return n.isMemo(e)?o:a[e.$$typeof]||r}a[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[n.Memo]=o;var c=Object.defineProperty,l=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;t.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=f(n);o&&o!==h&&e(t,o,r)}var a=l(n);u&&(a=a.concat(u(n)));for(var p=s(t),m=s(n),y=0;y<a.length;++y){var g=a[y];if(!(i[g]||r&&r[g]||m&&m[g]||p&&p[g])){var v=d(n,g);try{c(t,g,v)}catch(e){}}}}return t}}}),ppe=lpe({"../../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 mpe(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}var ype=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}(),gpe="-ms-",vpe="-moz-",bpe="-webkit-",wpe="comm",Epe="rule",xpe="decl",Tpe="@keyframes",Ape=Math.abs,_pe=String.fromCharCode,Cpe=Object.assign;function Ipe(e){return e.trim()}function Spe(e,t,n){return e.replace(t,n)}function kpe(e,t){return e.indexOf(t)}function Ope(e,t){return 0|e.charCodeAt(t)}function Ppe(e,t,n){return e.slice(t,n)}function Rpe(e){return e.length}function Npe(e){return e.length}function Mpe(e,t){return t.push(e),e}var Dpe=1,Lpe=1,Fpe=0,Bpe=0,Upe=0,zpe="";function jpe(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:Dpe,column:Lpe,length:a,return:""}}function Hpe(e,t){return Cpe(jpe("",null,null,"",null,null,0),e,{length:-e.length},t)}function Wpe(){return Upe=Bpe<Fpe?Ope(zpe,Bpe++):0,Lpe++,10===Upe&&(Lpe=1,Dpe++),Upe}function Vpe(){return Ope(zpe,Bpe)}function Gpe(){return Bpe}function qpe(e,t){return Ppe(zpe,e,t)}function Kpe(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 Xpe(e){return Dpe=Lpe=1,Fpe=Rpe(zpe=e),Bpe=0,[]}function Ype(e){return zpe="",e}function Zpe(e){return Ipe(qpe(Bpe-1,$pe(91===e?e+2:40===e?e+1:e)))}function Jpe(e){for(;(Upe=Vpe())&&Upe<33;)Wpe();return Kpe(e)>2||Kpe(Upe)>3?"":" "}function Qpe(e,t){for(;--t&&Wpe()&&!(Upe<48||Upe>102||Upe>57&&Upe<65||Upe>70&&Upe<97););return qpe(e,Gpe()+(t<6&&32==Vpe()&&32==Wpe()))}function $pe(e){for(;Wpe();)switch(Upe){case e:return Bpe;case 34:case 39:34!==e&&39!==e&&$pe(Upe);break;case 40:41===e&&$pe(e);break;case 92:Wpe()}return Bpe}function eme(e,t){for(;Wpe()&&e+Upe!==57&&(e+Upe!==84||47!==Vpe()););return"/*"+qpe(t,Bpe-1)+"*"+_pe(47===e?e:Wpe())}function tme(e){for(;!Kpe(Vpe());)Wpe();return qpe(e,Bpe)}function nme(e){return Ype(rme("",null,null,null,[""],e=Xpe(e),0,[0],e))}function rme(e,t,n,r,i,o,a,s,c){for(var l=0,u=0,d=a,f=0,h=0,p=0,m=1,y=1,g=1,v=0,b="",w=i,E=o,x=r,T=b;y;)switch(p=v,v=Wpe()){case 40:if(108!=p&&58==Ope(T,d-1)){-1!=kpe(T+=Spe(Zpe(v),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:T+=Zpe(v);break;case 9:case 10:case 13:case 32:T+=Jpe(p);break;case 92:T+=Qpe(Gpe()-1,7);continue;case 47:switch(Vpe()){case 42:case 47:Mpe(ome(eme(Wpe(),Gpe()),t,n),c);break;default:T+="/"}break;case 123*m:s[l++]=Rpe(T)*g;case 125*m:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+u:-1==g&&(T=Spe(T,/\f/g,"")),h>0&&Rpe(T)-d&&Mpe(h>32?ame(T+";",r,n,d-1):ame(Spe(T," ","")+";",r,n,d-2),c);break;case 59:T+=";";default:if(Mpe(x=ime(T,t,n,l,u,i,s,b,w=[],E=[],d),o),123===v)if(0===u)rme(T,t,x,x,w,o,d,s,E);else switch(99===f&&110===Ope(T,3)?100:f){case 100:case 108:case 109:case 115:rme(e,x,x,r&&Mpe(ime(e,x,x,0,0,i,s,b,i,w=[],d),E),i,E,d,s,r?w:E);break;default:rme(T,x,x,x,[""],E,0,s,E)}}l=u=h=0,m=g=1,b=T="",d=a;break;case 58:d=1+Rpe(T),h=p;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==(Upe=Bpe>0?Ope(zpe,--Bpe):0,Lpe--,10===Upe&&(Lpe=1,Dpe--),Upe))continue;switch(T+=_pe(v),v*m){case 38:g=u>0?1:(T+="\f",-1);break;case 44:s[l++]=(Rpe(T)-1)*g,g=1;break;case 64:45===Vpe()&&(T+=Zpe(Wpe())),f=Vpe(),u=d=Rpe(b=T+=tme(Gpe())),v++;break;case 45:45===p&&2==Rpe(T)&&(m=0)}}return o}function ime(e,t,n,r,i,o,a,s,c,l,u){for(var d=i-1,f=0===i?o:[""],h=Npe(f),p=0,m=0,y=0;p<r;++p)for(var g=0,v=Ppe(e,d+1,d=Ape(m=a[p])),b=e;g<h;++g)(b=Ipe(m>0?f[g]+" "+v:Spe(v,/&\f/g,f[g])))&&(c[y++]=b);return jpe(e,t,n,0===i?Epe:s,c,l,u)}function ome(e,t,n){return jpe(e,t,n,wpe,_pe(Upe),Ppe(e,2,-2),0)}function ame(e,t,n,r){return jpe(e,t,n,xpe,Ppe(e,0,r),Ppe(e,r+1,-1),r)}function sme(e,t){for(var n="",r=Npe(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function cme(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case xpe:return e.return=e.return||e.value;case wpe:return"";case Tpe:return e.return=e.value+"{"+sme(e.children,r)+"}";case Epe:e.value=e.props.join(",")}return Rpe(n=sme(e.children,r))?e.return=e.value+"{"+n+"}":""}function lme(e){var t=Npe(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function ume(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var dme=function(e,t,n){for(var r=0,i=0;r=i,i=Vpe(),38===r&&12===i&&(t[n]=1),!Kpe(i);)Wpe();return qpe(e,Bpe)},fme=new WeakMap,hme=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)||fme.get(n))&&!r){fme.set(e,!0);for(var i=[],o=function(e,t){return Ype(function(e,t){var n=-1,r=44;do{switch(Kpe(r)){case 0:38===r&&12===Vpe()&&(t[n]=1),e[n]+=dme(Bpe-1,t,n);break;case 2:e[n]+=Zpe(r);break;case 4:if(44===r){e[++n]=58===Vpe()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=_pe(r)}}while(r=Wpe());return e}(Xpe(e),t))}(t,i),a=n.props,s=0,c=0;s<o.length;s++)for(var l=0;l<a.length;l++,c++)e.props[c]=i[s]?o[s].replace(/&\f/g,a[l]):a[l]+" "+o[s]}}},pme=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function mme(e,t){switch(function(e,t){return 45^Ope(e,0)?(((t<<2^Ope(e,0))<<2^Ope(e,1))<<2^Ope(e,2))<<2^Ope(e,3):0}(e,t)){case 5103:return bpe+"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 bpe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return bpe+e+vpe+e+gpe+e+e;case 6828:case 4268:return bpe+e+gpe+e+e;case 6165:return bpe+e+gpe+"flex-"+e+e;case 5187:return bpe+e+Spe(e,/(\w+).+(:[^]+)/,bpe+"box-$1$2"+gpe+"flex-$1$2")+e;case 5443:return bpe+e+gpe+"flex-item-"+Spe(e,/flex-|-self/,"")+e;case 4675:return bpe+e+gpe+"flex-line-pack"+Spe(e,/align-content|flex-|-self/,"")+e;case 5548:return bpe+e+gpe+Spe(e,"shrink","negative")+e;case 5292:return bpe+e+gpe+Spe(e,"basis","preferred-size")+e;case 6060:return bpe+"box-"+Spe(e,"-grow","")+bpe+e+gpe+Spe(e,"grow","positive")+e;case 4554:return bpe+Spe(e,/([^-])(transform)/g,"$1"+bpe+"$2")+e;case 6187:return Spe(Spe(Spe(e,/(zoom-|grab)/,bpe+"$1"),/(image-set)/,bpe+"$1"),e,"")+e;case 5495:case 3959:return Spe(e,/(image-set\([^]*)/,bpe+"$1$`$1");case 4968:return Spe(Spe(e,/(.+:)(flex-)?(.*)/,bpe+"box-pack:$3"+gpe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+bpe+e+e;case 4095:case 3583:case 4068:case 2532:return Spe(e,/(.+)-inline(.+)/,bpe+"$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(Rpe(e)-1-t>6)switch(Ope(e,t+1)){case 109:if(45!==Ope(e,t+4))break;case 102:return Spe(e,/(.+:)(.+)-([^]+)/,"$1"+bpe+"$2-$3$1"+vpe+(108==Ope(e,t+3)?"$3":"$2-$3"))+e;case 115:return~kpe(e,"stretch")?mme(Spe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Ope(e,t+1))break;case 6444:switch(Ope(e,Rpe(e)-3-(~kpe(e,"!important")&&10))){case 107:return Spe(e,":",":"+bpe)+e;case 101:return Spe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+bpe+(45===Ope(e,14)?"inline-":"")+"box$3$1"+bpe+"$2$3$1"+gpe+"$2box$3")+e}break;case 5936:switch(Ope(e,t+11)){case 114:return bpe+e+gpe+Spe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return bpe+e+gpe+Spe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return bpe+e+gpe+Spe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return bpe+e+gpe+e+e}return e}var yme,gme,vme="undefined"!=typeof document,bme=vme?void 0:(yme=function(){return ume((function(){var e={};return function(t){return e[t]}}))},gme=new WeakMap,function(e){if(gme.has(e))return gme.get(e);var t=yme();return gme.set(e,t),t}),wme=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case xpe:e.return=mme(e.value,e.length);break;case Tpe:return sme([Hpe(e,{value:Spe(e.value,"@","@"+bpe)})],r);case Epe: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 sme([Hpe(e,{props:[Spe(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return sme([Hpe(e,{props:[Spe(t,/:(plac\w+)/,":"+bpe+"input-$1")]}),Hpe(e,{props:[Spe(t,/:(plac\w+)/,":-moz-$1")]}),Hpe(e,{props:[Spe(t,/:(plac\w+)/,gpe+"input-$1")]})],r)}return""}))}}],Eme=function(e){var t=e.key;if(vme&&"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,o=e.stylisPlugins||wme,a={},s=[];vme&&(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++)a[t[n]]=!0;s.push(e)})));var c,l=[hme,pme];if(vme){var u,d=[cme,(c=function(e){u.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],f=lme(l.concat(o,d));i=function(e,t,n,r){u=n,sme(nme(e?e+"{"+t.styles+"}":t.styles),f),r&&(y.inserted[t.name]=!0)}}else{var h=[cme],p=lme(l.concat(o,h)),m=bme(o)(t);i=function(e,t,n,r){var i=t.name,o=function(e,t){var n=t.name;return void 0===m[n]&&(m[n]=sme(nme(e?e+"{"+t.styles+"}":t.styles),p)),m[n]}(e,t);return void 0===y.compat?(r&&(y.inserted[i]=!0),o):r?void(y.inserted[i]=o):o}}var y={key:t,sheet:new ype({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return y.sheet.hydrate(s),y},xme="undefined"!=typeof document,Tme=function(e,t,n){var r=e.key+"-"+t.name;(!1===n||!1===xme&&void 0!==e.compat)&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Ame={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},_me=/[A-Z]|^ms/g,Cme=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ime=function(e){return 45===e.charCodeAt(1)},Sme=function(e){return null!=e&&"boolean"!=typeof e},kme=ume((function(e){return Ime(e)?e:e.replace(_me,"-$&").toLowerCase()})),Ome=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Cme,(function(e,t,n){return Rme={name:t,styles:n,next:Rme},t}))}return 1===Ame[e]||Ime(e)||"number"!=typeof t||0===t?t:t+"px"};function Pme(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 Rme={name:n.name,styles:n.styles,next:Rme},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Rme={name:r.name,styles:r.styles,next:Rme},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+=Pme(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":Sme(a)&&(r+=kme(o)+":"+Ome(o,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=Pme(e,t,a);switch(o){case"animation":case"animationName":r+=kme(o)+":"+s+";";break;default:r+=o+"{"+s+"}"}}else for(var c=0;c<a.length;c++)Sme(a[c])&&(r+=kme(o)+":"+Ome(o,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=Rme,o=n(e);return Rme=i,Pme(e,t,o)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var Rme,Nme=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Mme="undefined"!=typeof document,Dme=!!nL.useInsertionEffect&&nL.useInsertionEffect,Lme=Mme&&Dme||function(e){return e()},Fme="undefined"!=typeof document,Bme={}.hasOwnProperty,Ume=nL.createContext("undefined"!=typeof HTMLElement?Eme({key:"css"}):null);Ume.Provider;var zme=function(e){return nL.forwardRef((function(t,n){var r=nL.useContext(Ume);return e(t,r,n)}))};Fme||(zme=function(e){return function(t){var n=nL.useContext(Ume);return null===n?(n=Eme({key:"css"}),nL.createElement(Ume.Provider,{value:n},e(t,n))):e(t,n)}});var jme,Hme=nL.createContext({}),Wme="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Vme=function(e,t){var n={};for(var r in t)Bme.call(t,r)&&(n[r]=t[r]);return n[Wme]=e,n},Gme=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;Tme(t,n,r);var i=Lme((function(){return function(e,t,n){Tme(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i="",o=t;do{var a=e.insert(t===o?"."+r:"",o,e.sheet,!0);xme||void 0===a||(i+=a),o=o.next}while(void 0!==o);if(!xme&&0!==i.length)return i}}(t,n,r)}));if(!Fme&&void 0!==i){for(var o,a=n.name,s=n.next;void 0!==s;)a+=" "+s.name,s=s.next;return nL.createElement("style",((o={})["data-emotion"]=t.key+" "+a,o.dangerouslySetInnerHTML={__html:i},o.nonce=t.sheet.nonce,o))}return null},qme=zme((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[Wme],o=[r],a="";"string"==typeof e.className?a=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,o,e.className):null!=e.className&&(a=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="";Rme=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=Pme(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++)i+=Pme(n,t,e[a]),r&&(i+=o[a]);Nme.lastIndex=0;for(var s,c="";null!==(s=Nme.exec(i));)c+="-"+s[1];var l=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:l,styles:i,next:Rme}}(o,void 0,nL.useContext(Hme));a+=t.key+"-"+s.name;var c={};for(var l in e)!Bme.call(e,l)||"css"===l||l===Wme||(c[l]=e[l]);return c.ref=n,c.className=a,nL.createElement(nL.Fragment,null,nL.createElement(Gme,{cache:t,serialized:s,isStringTag:"string"==typeof i}),nL.createElement(i,c))})),Kme=qme;upe(ppe()),upe(hpe()),function(e){e.CONNECT="Connect",e.WALLET="Wallet",e.ON_RAMP="OnRamp",e.SWAP="Swap",e.BRIDGE="Bridge",e.SALE="PrimarySale"}(jme||(jme={}));const{AnalyticsProvider:Xme,useAnalytics:Yme}=function({appName:e,writeKey:t}){const n=nL.createContext(void 0);return{AnalyticsProvider:function({children:r,loaderOverride:i=Qhe,log:o=console.log}){const[a,s]=nL.useState(t),c=nL.useMemo((()=>a?i.load({writeKey:a}):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(cpe({method:e},n))))})),n}(i,o)),[i,a,o]),l=nL.useCallback((({userJourney:t,screen:n,action:r,extras:i={}})=>{const o=[e+mpe(t)+mpe(n)+mpe(r)].join("");return c.page(o,i)}),[c]),u=nL.useCallback((t=>{var n=t,{userJourney:r,screen:i,action:o,extras:a={}}=n,s=((e,t)=>{var n={};for(var r in e)ope.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&rpe)for(var r of rpe(e))t.indexOf(r)<0&&ape.call(e,r)&&(n[r]=e[r]);return n})(n,["userJourney","screen","action","extras"]);let l="";"control"in s&&"controlType"in s&&(l=mpe(s.control)+mpe(s.controlType));const u=[e+mpe(r)+mpe(i),l+mpe(o)].join("_");return c.track(u,cpe({},a))}),[c]),d=nL.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{a(t.next(e))}catch(e){r(e)}},o=e=>{try{a(t.throw(e))}catch(e){r(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,o);a((t=t.apply(e,null)).next())}));var e,t}),[c]),f=nL.useMemo((()=>({page:l,track:u,identifyFromCookie:d,identify:c.identify,group:c.group,alias:c.alias,updateWriteKey:s})),[c,l,u,d]);return function(e,t,n){return Bme.call(t,"css")?fL.jsx(Kme,Vme(e,t),n):fL.jsx(e,t,n)}(n.Provider,{value:f,children:r})},useAnalytics:function(){const e=nL.useContext(n);if(!e)throw new Error("useAnalytics: Store not found");return e}}}({writeKey:"",appName:"checkout"});function Zme({children:e,checkout:t}){const{updateWriteKey:n}=Yme(),r=nL.useCallback((async()=>{try{return await(t?.config?.remote.getConfig("telemetry"))}catch(e){console.error("unable to fetch telemetry config: ",e)}}),[t]);return nL.useEffect((()=>{(async()=>{const e=await r();e&&n(e.segmentPublishableKey)})()}),[r]),vB(gB,{children:e})}function Jme({children:e,checkout:t}){return vB(Xme,{children:vB(Zme,{checkout:t,children:e})})}function Qme({header:e,footer:t,children:n,heroContent:r,testId:i,floatHeader:o=!1,footerBackgroundColor:a}){return vB(tJ,{sx:lle,children:bB(tJ,{testId:i,sx:ule,children:[e&&vB(tJ,{sx:dle(o),children:e}),bB(tJ,{sx:hle,children:[r&&vB(tJ,{sx:ple,children:r}),n&&vB(tJ,{sx:mle,children:n})]}),t&&vB(tJ,{sx:fle(a),children:t})]})})}function $me({loadingText:e,textDuration:t}){const n=Array.isArray(e)?e:[e],r=t||2500;return vB(Qme,{children:vB(I5,{visible:!0,children:vB(I5.Content,{children:vB(I5.Content.LoopingText,{text:[...n],textDuration:r})})})})}function eye(e){switch(e){case WM.ETHEREUM:return VM.ETHEREUM;case WM.IMTBL_ZKEVM_TESTNET:return VM.IMTBL_ZKEVM_TESTNET;case WM.IMTBL_ZKEVM_MAINNET:return VM.IMTBL_ZKEVM_MAINNET;case WM.IMTBL_ZKEVM_DEVNET:return VM.IMTBL_ZKEVM_DEVNET;case WM.SEPOLIA:return VM.SEPOLIA;default:return""}}function tye(e){switch(e){case WM.ETHEREUM:return GM.ETHEREUM;case WM.IMTBL_ZKEVM_TESTNET:return GM.IMTBL_ZKEVM_TESTNET;case WM.IMTBL_ZKEVM_MAINNET:return GM.IMTBL_ZKEVM_MAINNET;case WM.IMTBL_ZKEVM_DEVNET:return GM.IMTBL_ZKEVM_DEVNET;case WM.SEPOLIA:return GM.SEPOLIA;default:return""}}function nye(e){switch(e){case GM.ETHEREUM:return WM.ETHEREUM;case GM.IMTBL_ZKEVM_TESTNET:return WM.IMTBL_ZKEVM_TESTNET;case GM.IMTBL_ZKEVM_MAINNET:return WM.IMTBL_ZKEVM_MAINNET;case GM.IMTBL_ZKEVM_DEVNET:return WM.IMTBL_ZKEVM_DEVNET;case GM.SEPOLIA:return WM.SEPOLIA;default:return 0}}const rye={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 iye{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||rye,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 iye(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new iye(this.logger,e)}}var oye=new iye;let aye=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 sye(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}function cye(e){return null==e?"":""+e}function lye(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}const o="string"!=typeof t?[].concat(t):t.split(".");for(;o.length>1;){if(i())return{};const t=r(o.shift());!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function uye(e,t,n){const{obj:r,k:i}=lye(e,t,Object);r[i]=n}function dye(e,t){const{obj:n,k:r}=lye(e,t);if(n)return n[r]}function fye(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]):fye(e[r],t[r],n):e[r]=t[r]);return e}function hye(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var pye={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function mye(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>pye[e])):e}const yye=[" ",",","?","!",";"];function gye(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 o=2,a=r.slice(e,e+o).join(n),s=i[a];for(;void 0===s&&r.length>e+o;)o++,a=r.slice(e,e+o).join(n),s=i[a];if(void 0===s)return;if(null===s)return null;if(t.endsWith(a)){if("string"==typeof s)return s;if(a&&"string"==typeof s[a])return s[a]}const c=r.slice(e+o).join(n);return c?gye(s,c,n):void 0}i=i[r[e]]}return i}function vye(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class bye extends aye{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."));const s=dye(this.data,a);return s||!o||"string"!=typeof n?s:gye(this.data&&this.data[e]&&this.data[e][t],n,i)}addResource(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),uye(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)"string"!=typeof n[r]&&"[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 o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=dye(this.data,a)||{};r?fye(s,n,i):s={...s,...n},uye(this.data,a,s),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var wye={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 Eye={};class xye extends aye{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=oye.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";const r=yye.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 o=!i.test(e);if(!o){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o}(e,n,r));if(o&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:i};const o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],c=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(l){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${o}`}return r?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:o}const u=this.resolve(e,t);let d=u&&u.res;const f=u&&u.usedKey||o,h=u&&u.exactUsedKey||o,p=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(p)<0&&("string"!=typeof m||"[object Array]"!==p)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...t,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return r?(u.res=e,u.usedParams=this.getUsedParamsDetails(t),u):e}if(i){const e="[object Array]"===p,n=e?[]:{},r=e?h:f;for(const e in d)if(Object.prototype.hasOwnProperty.call(d,e)){const o=`${r}${i}${e}`;n[e]=this.translate(o,{...t,joinArrays:!1,ns:a}),n[e]===o&&(n[e]=d[e])}d=n}}else if(y&&"string"==typeof m&&"[object Array]"===p)d=d.join(m),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,a=!1;const l=void 0!==t.count&&"string"!=typeof t.count,f=xye.hasDefaultValue(t),h=l?this.pluralResolver.getSuffix(c,t.count,t):"",p=t.ordinal&&l?this.pluralResolver.getSuffix(c,t.count,{ordinal:!1}):"",m=t[`defaultValue${h}`]||t[`defaultValue${p}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(r=!0,d=m),this.isValidLookup(d)||(a=!0,d=o);const y=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,g=f&&m!==d&&this.options.updateMissing;if(a||r||g){if(this.logger.log(g?"updateKey":"missingKey",c,s,o,g?m:d),i){const e=this.resolve(o,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const i=f&&r!==d?r:y;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,i,g,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,i,g,t),this.emit("missingKey",e,s,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?e.forEach((e=>{this.pluralResolver.getSuffixes(e,t).forEach((n=>{r([e],o+n,t[`defaultValue${n}`]||m)}))})):r(e,o,m))}d=this.extendTranslation(d,e,t,u,n),a&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${o}`),(a||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${o}`:o,r?d:void 0):this.options.parseMissingKeyHandler(d))}return r?(u.res=d,u.usedParams=this.getUsedParamsDetails(t),u):d}extendTranslation(e,t,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let 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),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return i&&i[0]===r[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):o.translate(...r,t)}),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=wye.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,i,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),c=s.key;n=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const u=void 0!==a.count&&"string"!=typeof a.count,d=u&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,h=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach((e=>{this.isValidLookup(t)||(o=e,!Eye[`${h[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(Eye[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${h.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach((n=>{if(this.isValidLookup(t))return;i=n;const o=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,n,e,a);else{let e;u&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(o.push(c+e),a.ordinal&&0===e.indexOf(r)&&o.push(c+e.replace(r,this.options.pluralSeparator)),d&&o.push(c+t)),f){const n=`${c}${this.options.contextSeparator}${a.context}`;o.push(n),u&&(o.push(n+e),a.ordinal&&0===e.indexOf(r)&&o.push(n+e.replace(r,this.options.pluralSeparator)),d&&o.push(n+t))}}let s;for(;s=o.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&"string"!=typeof e.replace;let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}function Tye(e){return e.charAt(0).toUpperCase()+e.slice(1)}class Aye{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=oye.create("languageUtils")}getScriptPartFromCode(e){if(!(e=vye(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=vye(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]=Tye(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]=Tye(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=Tye(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 _ye=[{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}],Cye={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 Iye=["v1","v2","v3"],Sye=["v4"],kye={zero:0,one:1,two:2,few:3,many:4,other:5};class Oye{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=oye.create("pluralResolver"),this.options.compatibilityJSON&&!Sye.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 _ye.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:Cye[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(vye(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)=>kye[e]-kye[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!Iye.includes(this.options.compatibilityJSON)}}function Pye(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=function(e,t,n){const r=dye(e,n);return void 0!==r?r:dye(t,n)}(e,t,n);return!o&&i&&"string"==typeof n&&(o=gye(e,n,r),void 0===o&&(o=gye(t,n,r))),o}class Rye{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=oye.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:mye,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?hye(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?hye(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?hye(t.nestingPrefix):t.nestingPrefixEscaped||hye("$t("),this.nestingSuffix=t.nestingSuffix?hye(t.nestingSuffix):t.nestingSuffixEscaped||hye(")"),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,o,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}const l=e=>{if(e.indexOf(this.formatSeparator)<0){const i=Pye(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),o=i.shift().trim(),a=i.join(this.formatSeparator).trim();return this.format(Pye(t,s,o,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:o})};this.resetRegExp();const u=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(a=0;i=t.regex.exec(e);){const n=i[1].trim();if(o=l(n),void 0===o)if("function"==typeof u){const t=u(e,i,r);o="string"==typeof t?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else{if(d){o=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else"string"==typeof o||this.useRawValueToEscape||(o=cye(o));const s=t.safeValue(o);if(e=e.replace(i[0],s),d?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,r,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function a(e,t){const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let o=`{${r[1]}`;e=r[0],o=this.interpolate(o,i);const a=o.match(/'/g),s=o.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${o}`}return delete i.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){let s=[];i={...o},i=i.replace&&"string"!=typeof i.replace?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let 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(a.call(this,n[1].trim(),i),i),r&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=cye(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),c&&(r=s.reduce(((e,t)=>this.format(e,t,o.lng,{...o,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}function Nye(e){const t={};return function(n,r,i){const o=r+JSON.stringify(i);let a=t[o];return a||(a=e(vye(r),i),t[o]=a),a(n)}}class Mye{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=oye.create("formatter"),this.options=e,this.formats={number:Nye(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:Nye(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:Nye(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:Nye(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:Nye(((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()]=Nye(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=t.split(this.formatSeparator).reduce(((e,t)=>{const{formatName:i,formatOptions:o}=function(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach((e=>{if(!e)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 a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...o,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e}),e);return i}}class Dye extends aye{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=oye.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const i={},o={},a={},s={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===o[a]&&(o[a]=!0):(this.state[a]=1,r=!1,void 0===o[a]&&(o[a]=!0),void 0===i[a]&&(i[a]=!0),void 0===s[t]&&(s[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),n&&this.store.addResourceBundle(i,o,n),this.state[e]=t?-1:2;const a={};this.queue.forEach((n=>{!function(e,t,n,r){const{obj:i,k:o}=lye(e,t,Object);i[o]=i[o]||[],r&&(i[o]=i[o].concat(n)),r||i[o].push(n)}(n.loaded,[i],o),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:o});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*i,o)}),i):o(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,((n,o)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,o),this.loaded(e,n,o)}))}saveMissing(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...o,isUpdate:i},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=>a(null,e))).catch(a):a(null,i)}catch(e){a(e)}else c(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}function Lye(){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 Fye(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 Bye(){}class Uye extends aye{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=Fye(e),this.services={},this.logger=oye,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=Lye();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options={...r,...this.options,...Fye(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?oye.init(i(this.modules.logger),this.options):oye.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=Mye);const n=new Aye(this.options);this.store=new bye(this.options.resources,this.options);const o=this.services;o.logger=oye,o.resourceStore=this.store,o.languageUtils=n,o.pluralResolver=new Oye(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(o.formatter=i(t),o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new Rye(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new Dye(i(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)})),this.modules.languageDetector&&(o.languageDetector=i(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=i(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new xye(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=Bye),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const o=sye(),a=()=>{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),o.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),o}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Bye;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=sye();return e||(e=this.languages),t||(t=this.options.ns),n||(n=Bye),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&&wye.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=sye();this.emit("languageChanging",e);const i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(e,o)=>{o?(i(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||i(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(e=>{o(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const i=function(e,t){let o;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),c=2;c<a;c++)s[c-2]=arguments[c];o=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else o={...t};o.lng=o.lng||i.lng,o.lngs=o.lngs||i.lngs,o.ns=o.ns||i.ns,o.keyPrefix=o.keyPrefix||n||i.keyPrefix;const l=r.options.keySeparator||".";let u;return u=o.keyPrefix&&Array.isArray(e)?e.map((e=>`${o.keyPrefix}${l}${e}`)):o.keyPrefix?`${o.keyPrefix}${l}${e}`:e,r.t(u,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(n,e)||r&&!o(i,e)))}loadNamespaces(e,t){const n=sye();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=sye();"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 Aye(Lye());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 Uye(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]:Bye;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new Uye(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 bye(this.store.data,r),i.services.resourceStore=i.store),i.translator=new xye(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 zye=Uye.createInstance();function jye(e){return jye="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},jye(e)}function Hye(e){var t=function(e,t){if("object"!=jye(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=jye(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==jye(t)?t:String(t)}function Wye(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,Hye(r.key),r)}}zye.createInstance=Uye.createInstance,zye.createInstance,zye.dir,zye.init,zye.loadResources,zye.reloadResources,zye.use,zye.changeLanguage,zye.getFixedT,zye.t,zye.exists,zye.setDefaultNamespace,zye.hasLoadedNamespace,zye.loadNamespaces,zye.loadLanguages;var Vye=[],Gye=Vye.forEach,qye=Vye.slice;var Kye=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Xye=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+60*n*1e3)),r&&(i.domain=r),document.cookie=function(e,t,n){var r=n||{};r.path=r.path||"/";var i=encodeURIComponent(t),o="".concat(e,"=").concat(i);if(r.maxAge>0){var a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(a))}if(r.domain){if(!Kye.test(r.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(r.domain)}if(r.path){if(!Kye.test(r.path))throw new TypeError("option path is invalid");o+="; Path=".concat(r.path)}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");o+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o}(e,encodeURIComponent(t),i)},Yye=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},Zye={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!=typeof document){var n=Yye(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!=typeof document&&Xye(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},Jye={name:"querystring",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=n.substring(1).split("&"),i=0;i<r.length;i++){var o=r[i].indexOf("=");if(o>0)r[i].substring(0,o)===e.lookupQuerystring&&(t=r[i].substring(o+1))}}return t}},Qye=null,$ye=function(){if(null!==Qye)return Qye;try{Qye="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){Qye=!1}return Qye},ege={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&$ye()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&$ye()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},tge=null,nge=function(){if(null!==tge)return tge;try{tge="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){tge=!1}return tge},rge={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&nge()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&nge()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},ige={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}},oge={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}},age={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}},sge={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 cge=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 Gye.call(qye.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(Zye),this.addDetector(Jye),this.addDetector(ege),this.addDetector(rge),this.addDetector(ige),this.addDetector(oge),this.addDetector(age),this.addDetector(sge)}},{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&&Wye(t.prototype,n),r&&Wye(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function lge(){return lge=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},lge.apply(this,arguments)}cge.type="languageDetector";var uge=ut({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}),dge=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function fge(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(uge[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(dge),o=null;null!==(o=i.exec(e));)if(o[0].trim())if(o[1]){var a=o[1].trim(),s=[a,""];a.indexOf("=")>-1&&(s=a.split("=")),t.attrs[s[0]]=s[1],i.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var hge=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,pge=/^\s*$/,mge=Object.create(null);function yge(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(yge,"")+"</"+t.name+">";case"comment":return e+"\x3c!--"+t.comment+"--\x3e"}}var gge={parse:function(e,t){t||(t={}),t.components||(t.components=mge);var n,r=[],i=[],o=-1,a=!1;if(0!==e.indexOf("<")){var s=e.indexOf("<");r.push({type:"text",content:-1===s?e:e.substring(0,s)})}return e.replace(hge,(function(s,c){if(a){if(s!=="</"+n.name+">")return;a=!1}var l,u="/"!==s.charAt(1),d=s.startsWith("\x3c!--"),f=c+s.length,h=e.charAt(f);if(d){var p=fge(s);return o<0?(r.push(p),r):((l=i[o]).children.push(p),r)}if(u&&(o++,"tag"===(n=fge(s)).type&&t.components[n.name]&&(n.type="component",a=!0),n.voidElement||a||!h||"<"===h||n.children.push({type:"text",content:e.slice(f,e.indexOf("<",f))}),0===o&&r.push(n),(l=i[o-1])&&l.children.push(n),i[o]=n),(!u||n.voidElement)&&(o>-1&&(n.voidElement||n.name===s.slice(2,-1))&&(o--,n=-1===o?r:i[o]),!a&&"<"!==h&&h)){l=-1===o?r:i[o].children;var m=e.indexOf("<",f),y=e.slice(f,-1===m?void 0:m);pge.test(y)&&(y=" "),(m>-1&&o+l.length>=0||" "!==y)&&l.push({type:"text",content:y})}})),r},stringify:function(e){return e.reduce((function(e,t){return e+yge("",t)}),"")}};function vge(){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 bge={};function wge(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&bge[t[0]]||("string"==typeof t[0]&&(bge[t[0]]=new Date),vge(...t))}const Ege=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout((()=>{e.off("initialized",n)}),0),t()};e.on("initialized",n)}};function xge(e,t,n){e.loadNamespaces(t,Ege(e,n))}function Tge(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,Ege(e,r))}const Age=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,_ge={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Cge=e=>_ge[e];let Ige,Sge={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(Age,Cge)};function kge(){return Sge}function Oge(){return Ige}function Pge(e,t){if(!e)return!1;const n=e.props?e.props.children:e.children;return t?n.length>0:!!n}function Rge(e){if(!e)return[];const t=e.props?e.props.children:e.children;return e.props&&e.props.i18nIsDynamicList?Nge(t):t}function Nge(e){return Array.isArray(e)?e:[e]}function Mge(e,t){if(!e)return"";let n="";const r=Nge(e),i=t.transSupportBasicHtmlNodes&&t.transKeepBasicHtmlNodesFor?t.transKeepBasicHtmlNodesFor:[];return r.forEach(((e,r)=>{if("string"==typeof e)n+=`${e}`;else if(nL.isValidElement(e)){const o=Object.keys(e.props).length,a=i.indexOf(e.type)>-1,s=e.props.children;if(!s&&a&&0===o)n+=`<${e.type}/>`;else if(s||a&&0===o)if(e.props.i18nIsDynamicList)n+=`<${r}></${r}>`;else if(a&&1===o&&"string"==typeof s)n+=`<${e.type}>${s}</${e.type}>`;else{const e=Mge(s,t);n+=`<${r}>${e}</${r}>`}else n+=`<${r}></${r}>`}else if(null===e)vge("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 vge("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",e)}else vge("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 Dge(e,t,n,r,i,o){if(""===t)return[];const a=r.transKeepBasicHtmlNodesFor||[],s=t&&new RegExp(a.map((e=>`<${e}`)).join("|")).test(t);if(!e&&!s&&!o)return[t];const c={};!function e(t){Nge(t).forEach((t=>{"string"!=typeof t&&(Pge(t)?e(Rge(t)):"object"!=typeof t||nL.isValidElement(t)||Object.assign(c,t))}))}(e);const l=gge.parse(`<0>${t}</0>`),u={...c,...i};function d(e,t,n){const r=Rge(e),i=h(r,t.children,n);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((e=>nL.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(nL.cloneElement(e,{key:r},i?void 0:t))):n.push(...nL.Children.map([e],(e=>{const n={...e.props};return delete n.i18nIsDynamicList,rL.createElement(e.type,lge({},n,{key:r,ref:e.ref},i?{}:{children:t}))})))}function h(t,i,c){const l=Nge(t);return Nge(i).reduce(((t,i,p)=>{const m=i.children&&i.children[0]&&i.children[0].content&&n.services.interpolator.interpolate(i.children[0].content,u,n.language);if("tag"===i.type){let o=l[parseInt(i.name,10)];1!==c.length||o||(o=c[0][i.name]),o||(o={});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},o):o,g=nL.isValidElement(y),v=g&&Pge(i,!0)&&!i.voidElement,b=s&&"object"==typeof y&&y.dummy&&!g,w="object"==typeof e&&null!==e&&Object.hasOwnProperty.call(e,i.name);if("string"==typeof y){const e=n.services.interpolator.interpolate(y,u,n.language);t.push(e)}else if(Pge(y)||v){f(y,d(y,i,c),t,p)}else if(b){f(y,h(l,i.children,c),t,p)}else if(Number.isNaN(parseFloat(i.name)))if(w){f(y,d(y,i,c),t,p,i.voidElement)}else if(r.transSupportBasicHtmlNodes&&a.indexOf(i.name)>-1)if(i.voidElement)t.push(nL.createElement(i.name,{key:`${i.name}-${p}`}));else{const e=h(l,i.children,c);t.push(nL.createElement(i.name,{key:`${i.name}-${p}`},e))}else if(i.voidElement)t.push(`<${i.name} />`);else{const e=h(l,i.children,c);t.push(`<${i.name}>${e}</${i.name}>`)}else if("object"!=typeof y||g)f(y,m,t,p,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,a=o?r.unescape(n.services.interpolator.interpolate(i.content,u,n.language)):n.services.interpolator.interpolate(i.content,u,n.language);e?t.push(nL.createElement(e,{key:`${i.name}-${p}`},a)):t.push(a)}return t}),[])}return Rge(h([{dummy:!0,children:e||[]}],l,Nge(e||[]))[0])}function Lge(e){let{children:t,count:n,parent:r,i18nKey:i,context:o,tOptions:a={},values:s,defaults:c,components:l,ns:u,i18n:d,t:f,shouldUnescape:h,...p}=e;const m=d||Oge();if(!m)return wge("You will need to pass in an i18next instance by using i18nextReactModule"),t;const y=f||m.t.bind(m)||(e=>e);o&&(a.context=o);const g={...kge(),...m.options&&m.options.react};let v=u||y.ns||m.options&&m.options.defaultNS;v="string"==typeof v?[v]:v||["translation"];const b=Mge(t,g),w=c||b||g.transEmptyNodeValue||i,{hashTransKey:E}=g,x=i||(E?E(b||w):b||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 T=s?a.interpolation:{interpolation:{...a.interpolation,prefix:"#$?",suffix:"?$#"}},A={...a,count:n,...s,...T,defaultValue:w,ns:v},_=x?y(x,A):w;l&&Object.keys(l).forEach((e=>{const t=l[e];"function"==typeof t.type||!t.props||!t.props.children||_.indexOf(`${e}/>`)<0&&_.indexOf(`${e} />`)<0||(l[e]=rL.createElement((function(){return rL.createElement(rL.Fragment,null,t)}),null))}));const C=Dge(l||t,_,m,g,A,h),I=void 0!==r?r:g.defaultTransParent;return I?nL.createElement(I,p,C):C}const Fge={type:"3rdParty",init(e){!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Sge={...Sge,...e}}(e.options.react),function(e){Ige=e}(e)}},Bge=nL.createContext();class Uge{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach((e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)}))}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function zge(e){let{children:t,count:n,parent:r,i18nKey:i,context:o,tOptions:a={},values:s,defaults:c,components:l,ns:u,i18n:d,t:f,shouldUnescape:h,...p}=e;const{i18n:m,defaultNS:y}=nL.useContext(Bge)||{},g=d||m||Oge(),v=f||g&&g.t.bind(g);return Lge({children:t,count:n,parent:r,i18nKey:i,context:o,tOptions:a,values:s,defaults:c,components:l,ns:u||v&&v.ns||y||g&&g.options&&g.options.defaultNS,i18n:g,t:f,shouldUnescape:h,...p})}const jge=(e,t)=>{const n=nL.useRef();return nL.useEffect((()=>{n.current=t?n.current:e}),[e,t]),n.current};function Hge(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=nL.useContext(Bge)||{},o=n||r||Oge();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new Uge),!o){wge("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}o.options.react&&void 0!==o.options.react.wait&&wge("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...kge(),...o.options.react,...t},{useSuspense:s,keyPrefix:c}=a;let l=e||i||o.options&&o.options.defaultNS;l="string"==typeof l?[l]:l||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(l);const u=(o.isInitialized||o.initializedStoreOnce)&&l.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,o=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;const a=(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&&!a(t.isLanguageChangingTo,e)||!t.hasResourceBundle(r,e)&&t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages)&&(!a(r,e)||i&&!a(o,e)))}(e,t,n):(wge("i18n.languages were undefined or empty",t.languages),!0)}(e,o,a)));function d(){return o.getFixedT(t.lng||null,"fallback"===a.nsMode?l:l[0],c)}const[f,h]=nL.useState(d);let p=l.join();t.lng&&(p=`${t.lng}${p}`);const m=jge(p),y=nL.useRef(!0);nL.useEffect((()=>{const{bindI18n:e,bindI18nStore:n}=a;function r(){y.current&&h(d)}return y.current=!0,u||s||(t.lng?Tge(o,t.lng,l,(()=>{y.current&&h(d)})):xge(o,l,(()=>{y.current&&h(d)}))),u&&m&&m!==p&&y.current&&h(d),e&&o&&o.on(e,r),n&&o&&o.store.on(n,r),()=>{y.current=!1,e&&o&&e.split(" ").forEach((e=>o.off(e,r))),n&&o&&n.split(" ").forEach((e=>o.store.off(e,r)))}}),[o,p]);const g=nL.useRef(!0);nL.useEffect((()=>{y.current&&!g.current&&h(d),g.current=!1}),[o,c]);const v=[f,o,u];if(v.t=f,v.i18n=o,v.ready=u,u)return v;if(!u&&!s)return v;throw new Promise((e=>{t.lng?Tge(o,t.lng,l,(()=>e())):xge(o,l,(()=>e()))}))}const Wge={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:""}}},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:"The fastest way to pay, if you have coins in your balance.",disabledCaption:"We can't see enough coins in your balance"},debit:{heading:"Debit Card",caption:"The recommended way to pay with card.",disabledCaption:null},credit:{heading:"Credit Card",caption:"Not recommended since transactions may be blocked by your bank.",disabledCaption:null}},insufficientCoinsBanner:{caption:"Insufficient coin balance. Pay with card to proceed, or",captionEnd:"and try again.",captionCTA:"add coins"},loading:{ready1:"Collecting your order",ready2:"Talking to wallet",ready3:"Readying assets",processing1:"Initialising payment",processing2:"Securing your assets",processing3:"Finalising payment"}},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"},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",accentText:"Recommended",description:"digital wallet and identity"},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"}},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:{eth:{heading:"Balance too low",body:"You're ETH balance is too low to cover the gas fee on this move. You could transfer more ETH into your wallet using MetaMask directly."},imx:{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",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:""}}},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:null},credit:{heading:"クレジットカード",caption:"銀行によって取引がブロックされる可能性があるため、推奨されません。",disabledCaption:null}},insufficientCoinsBanner:{caption:"コインの残高が不足しています。カードで支払うか、",captionEnd:"して再試行してください。",captionCTA:"コインを追加"},loading:{ready1:"注文を受け取り中",ready2:"ウォレットと通信中",ready3:"資産を準備中",processing1:"支払いを初期化中",processing2:"資産を確保中",processing3:"支払いを完了中"}},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:"キャンセル"},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",accentText:"おすすめ",description:"デジタルウォレットおよびアイデンティティ"},metamask:{heading:"MetaMask",description:"ブロックチェーンアプリケーションとWeb3へのアクセス用のデジタルウォレット"},walletconnect:{heading:"その他のウォレット",description:"MetaMaskを含む任意のブロックチェーンウォレットに接続できます"},browserwallet:{heading:"ブラウザウォレット",description:"ブロックチェーンアプリケーションおよびweb3にアクセスするためのデジタルウォレット"}},drawers:{feesBreakdown:{heading:"手数料の内訳",total:"総手数料",fees:{gas:{label:"ガス手数料"}}},transactionFailed:{content:{heading1:"続行する前に、",heading2:"ウォレットで確認が必要です",body1:"MetaMaskのポップアップが表示されたら、",body2:"トランザクションに署名してください"},buttons:{retry:"了解",cancel:"閉じる"}},coinSelector:{option:{fiatPricePrefix:"約USD $"},noCoins:"ウォレットで選択できるコインがありません。"},notEnoughGas:{content:{eth:{heading:"残高が低すぎます",body:"この移動のガス手数料をカバーするには、ETH残高が不足しています。MetaMaskを使用して直接ウォレットにETHを送金することができます。"},imx:{heading:"もっとIMXコインが必要になるでしょう",body:"指定された金額の手数料をカバーするために、もっとIMXコインを追加する必要があります"}},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:""}}},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:null},credit:{heading:"신용카드",caption:"은행에서 거래를 차단할 수 있으므로 권장하지 않습니다.",disabledCaption:null}},insufficientCoinsBanner:{caption:"코인 잔액이 부족합니다. 카드로 결제하거나",captionEnd:"하고 다시 시도해 보세요.",captionCTA:"코인 추가"},loading:{ready1:"주문 수집 중",ready2:"지갑과 대화 중",ready3:"자산 준비 중",processing1:"결제 초기화 중",processing2:"자산 보호 중",processing3:"결제 완료 중"}},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:"취소"},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",accentText:"추천",description:"디지털 지갑 및 신원"},metamask:{heading:"MetaMask",description:"블록체인 애플리케이션 및 웹3에 액세스하기 위한 디지털 지갑"},walletconnect:{heading:"기타 지갑",description:"MetaMask를 포함한 모든 블록체인 지갑에 연결할 수 있습니다"},browserwallet:{heading:"브라우저 지갑",description:"블록체인 애플리케이션 및 web3에 접근하기 위한 디지털 지갑"}},drawers:{feesBreakdown:{heading:"수수료 내역",total:"수수료 총액",fees:{gas:{label:"가스 수수료"}}},transactionFailed:{content:{heading1:"계속하기 전에 지갑에서 확인이 필요합니다",heading2:"지갑 확인 필요",body1:"MetaMask 팝업이 나타날 때 거래에",body2:"서명을 꼭 하십시오"},buttons:{retry:"알겠습니다",cancel:"취소"}},coinSelector:{option:{fiatPricePrefix:"대략 USD $"},noCoins:"지갑에 선택 가능한 코인이 없습니다."},notEnoughGas:{content:{eth:{heading:"잔액이 너무 낮습니다",body:"이 이동에 필요한 가스 수수료를 충당하기에 ETH 잔액이 너무 낮습니다. MetaMask를 직접 사용하여 지갑에 ETH를 더 이전할 수 있습니다."},imx:{heading:"더 많은 IMX 코인이 필요할 것입니다",body:"지정된 금액의 수수료를 커버하기 위해 더 많은 IMX 코인을 추가해야 합니다"}},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:""}}},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:null},credit:{heading:"信用卡",caption:"不推荐使用,因为您的银行可能会阻止交易。",disabledCaption:null}},insufficientCoinsBanner:{caption:"硬币余额不足。请使用卡支付,或",captionEnd:"再试一次。",captionCTA:"添加硬币"},loading:{ready1:"正在收集您的订单",ready2:"正在与钱包交流",ready3:"正在准备资产",processing1:"正在初始化支付",processing2:"正在保护您的资产",processing3:"正在完成支付"}},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:"取消"},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",accentText:"推荐",description:"数字钱包和身份"},metamask:{heading:"MetaMask",description:"用于访问区块链应用程序和web3的数字钱包"},walletconnect:{heading:"其他钱包",description:"允许您连接到包括MetaMask在内的任何区块链钱包"},browserwallet:{heading:"浏览器钱包",description:"用于访问区块链应用和web3的数字钱包"}},drawers:{feesBreakdown:{heading:"费用分解",total:"费用总计",fees:{gas:{label:"燃气费"}}},transactionFailed:{content:{heading1:"在继续前我们需要您在钱包中确认",heading2:"钱包确认",body1:"当MetaMask弹出时,请确保",body2:"签署交易"},buttons:{retry:"明白了",cancel:"关闭"}},coinSelector:{option:{fiatPricePrefix:"约美元 $"},noCoins:"您的钱包中没有可用的硬币。"},notEnoughGas:{content:{eth:{heading:"余额过低",body:"您的ETH余额不足以支付此操作的燃气费。您可以直接使用MetaMask向您的钱包转入更多ETH。"},imx:{heading:"您需要更多IMX币",body:"为了支付指定金额的费用,您需要添加更多IMX币。"}},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 Vge;zye.use(Fge).use(cge).init({fallbackLng:"en",resources:Wge,interpolation:{escapeValue:!1}});var Gge=yae;Vge=Gge.createRoot,Gge.hydrateRoot;const qge="development",Kge="native",Xge=18,Yge=6,Zge=700,Jge="IMX",Qge="ETH",$ge="https://support.immutable.com/en/",eve={retryIntervalMs:1e4,retries:60,nonRetryable:e=>e?.data?.code>=500||e.type===cD.GET_ERC20_BALANCE_ERROR,nonRetryableSilently:e=>e.type===cD.WEB3_PROVIDER_ERROR},tve={retryIntervalMs:1e4,retries:60,nonRetryableSilently:e=>!!e},nve=qt.SANDBOX,rve=HM.DARK;QM.METAMASK;const ive=3e4,ove={[qge]:"https://checkout-cdn.dev.immutable.com",[qt.SANDBOX]:"https://checkout-cdn.sandbox.immutable.com",[qt.PRODUCTION]:"https://checkout-cdn.immutable.com"},ave={[qge]:"https://testnet.axelarscan.io/gmp/",[qt.SANDBOX]:"https://testnet.axelarscan.io/gmp/",[qt.PRODUCTION]:"https://axelarscan.io/gmp/"},sve={[qge]:"https://passport.sandbox.immutable.com/",[qt.SANDBOX]:"https://passport.sandbox.immutable.com/",[qt.PRODUCTION]:"https://passport.immutable.com/"},cve=91e3;function lve(e){return e&&Object.values(qt).includes(e)?e:nve}function uve(e,t){return t?"true"===t||"false"!==t&&e:e}const dve=e=>e.isProduction?WM.ETHEREUM:WM.SEPOLIA,fve=e=>e.isDevelopment?WM.IMTBL_ZKEVM_DEVNET:e.isProduction?WM.IMTBL_ZKEVM_MAINNET:WM.IMTBL_ZKEVM_TESTNET,hve={[WM.IMTBL_ZKEVM_DEVNET]:"base.color.text.link.primary",[WM.IMTBL_ZKEVM_TESTNET]:"base.color.text.link.primary",[WM.IMTBL_ZKEVM_MAINNET]:"base.color.text.link.primary",[WM.ETHEREUM]:"base.color.accent.5",[WM.SEPOLIA]:"base.color.accent.5"},pve={[WM.IMTBL_ZKEVM_DEVNET]:"Immutable",[WM.IMTBL_ZKEVM_MAINNET]:"Immutable",[WM.IMTBL_ZKEVM_TESTNET]:"Immutable",[WM.ETHEREUM]:"EthToken",[WM.SEPOLIA]:"EthToken"},mve={[WM.IMTBL_ZKEVM_DEVNET]:VM.IMTBL_ZKEVM_DEVNET,[WM.IMTBL_ZKEVM_MAINNET]:VM.IMTBL_ZKEVM_MAINNET,[WM.IMTBL_ZKEVM_TESTNET]:VM.IMTBL_ZKEVM_TESTNET,[WM.ETHEREUM]:VM.ETHEREUM,[WM.SEPOLIA]:VM.SEPOLIA},yve="IMTBL_WIDGET_PROVIDER_EVENT";var gve;function vve(e,t){e.provider.on(gve.CHAIN_CHANGED,t)}function bve(e,t){e.provider.removeListener(gve.CHAIN_CHANGED,t)}function wve(){window.dispatchEvent(new CustomEvent(yve))}function Eve(e){var t;t=wve,e.provider.removeListener(gve.ACCOUNTS_CHANGED,t),bve(e,wve),function(e,t){e.provider.on(gve.ACCOUNTS_CHANGED,t)}(e,wve),vve(e,wve)}function xve(e){const t=new CustomEvent(OM.IMTBL_WIDGETS_PROVIDER,{detail:{type:PM.PROVIDER_UPDATED,data:e}});console.log("provider updated event:",t),void 0!==window&&window.dispatchEvent(t)}function Tve(e){return!0===e?.provider?.isPassport}function Ave(e){return!0===e?.provider?.isMetaMask}function _ve(e){return!0===e?.provider?.isWalletConnect}function Cve(e,t){if(Ave(e))return QM.METAMASK.toString();if(Tve(e))return QM.PASSPORT.toString();if(_ve(e))return"walletconnect";if(t&&e){const n=t.find((t=>t.provider===e.provider));if(n)return n.info.name}return"Other"}function Ive(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 Sve(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:o}=await e.connect({provider:t,requestWalletPermissions:n});i=o,r=!0}catch(e){throw e.type===cD.USER_REJECTED_REQUEST_ERROR&&console.log("User rejected request"),console.error(e),e}return i}!function(e){e.CHAIN_CHANGED="chainChanged",e.ACCOUNTS_CHANGED="accountsChanged"}(gve||(gve={}));const kve={icon:'data:image/svg+xml,<svg viewBox="0 0 48 48" class="SvgIcon undefined Logo Logo--PassportSymbolOutlined css-1dn9atd" xmlns="http://www.w3.org/2000/svg"><g data-testid="undefined__g"><circle cx="24" cy="24" r="22.5" fill="url(%23paint0_radial_6324_83922)"></circle><circle cx="24" cy="24" r="22.5" fill="url(%23paint1_radial_6324_83922)"></circle><path d="M24 0C10.7452 0 0 10.7452 0 24C0 37.2548 10.7452 48 24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 0 24 0ZM23.0718 9.16608C23.7383 8.83951 24.4406 8.86188 25.087 9.2287C27.3282 10.5059 29.5627 11.7942 31.786 13.096C32.5018 13.5165 32.8686 14.1897 32.8708 15.0173C32.8843 17.9184 32.8798 20.8171 32.8708 23.7182C32.8708 23.8255 32.8015 23.9821 32.7143 24.0335C31.8531 24.548 30.9808 25.0423 30.0347 25.5881V25.1318C30.0347 22.148 30.0257 19.1664 30.0414 16.1827C30.0436 15.6101 29.8468 15.241 29.339 14.9525C26.7377 13.474 24.1499 11.9687 21.5575 10.4723C21.4457 10.4075 21.3361 10.3381 21.1661 10.2352C21.8326 9.85722 22.4321 9.47698 23.0673 9.16608H23.0718ZM22.5953 38.8451C22.45 38.7713 22.3426 38.7198 22.2375 38.6595C18.8041 36.68 15.3752 34.687 11.9307 32.7232C10.9644 32.173 10.5238 31.3879 10.5349 30.2852C10.5551 27.9411 10.5484 25.597 10.5372 23.2507C10.5327 22.1927 10.9622 21.4255 11.8926 20.8977C14.3105 19.5221 16.715 18.1264 19.1195 16.7284C19.3275 16.6076 19.4796 16.5875 19.6965 16.7172C20.5264 17.216 21.3719 17.6924 22.2554 18.2024C22.0876 18.3031 21.9601 18.3791 21.8304 18.4552C19.2268 19.9582 16.6278 21.4658 14.0175 22.9599C13.5903 23.2037 13.3912 23.5213 13.3957 24.0179C13.4091 25.8654 13.4114 27.713 13.3957 29.5605C13.3912 30.0705 13.5948 30.3948 14.0332 30.6453C16.7866 32.2199 19.5288 33.8125 22.28 35.3916C22.5126 35.5258 22.611 35.6645 22.6065 35.9418C22.5864 36.888 22.5998 37.8363 22.5998 38.8473L22.5953 38.8451ZM22.5953 33.553C22.356 33.4166 22.1838 33.3204 22.0116 33.2198C19.8285 31.9605 17.6477 30.6967 15.4602 29.4464C15.2231 29.3122 15.1359 29.1668 15.1381 28.8917C15.1538 27.4714 15.1471 26.0511 15.1426 24.6308C15.1426 24.4384 15.1717 24.3064 15.3618 24.1991C16.167 23.7495 16.9633 23.2798 17.7618 22.8212C17.8199 22.7877 17.8826 22.7631 17.9877 22.7116V24.3064C17.9877 25.1698 18.0011 26.0354 17.9832 26.8988C17.972 27.3909 18.1622 27.7241 18.5916 27.9657C19.8285 28.6636 21.0498 29.3883 22.2867 30.0839C22.5305 30.2203 22.6043 30.3724 22.5998 30.6408C22.5842 31.5847 22.5931 32.5308 22.5931 33.5508L22.5953 33.553ZM20.0746 14.91C19.6116 14.6371 19.2157 14.6393 18.7527 14.91C16.1581 16.4265 13.5523 17.9228 10.9487 19.4259C10.8391 19.4908 10.7251 19.5489 10.5305 19.6541C10.5998 18.6654 10.3873 17.7327 10.7251 16.8291C10.9085 16.3348 11.2529 15.9635 11.7092 15.6995C13.8811 14.4447 16.0507 13.1877 18.227 11.9396C19.0211 11.4833 19.8308 11.4945 20.6248 11.953C23.0964 13.3756 25.5657 14.8026 28.0306 16.2341C28.1357 16.2945 28.2677 16.4309 28.2677 16.5338C28.2856 17.5493 28.2788 18.567 28.2788 19.6563C27.3819 19.1396 26.5543 18.6609 25.7267 18.1823C23.8412 17.093 21.9512 16.0149 20.0746 14.91ZM37.4427 30.8779C37.3778 31.6764 36.9103 32.2423 36.2192 32.6404C33.5732 34.1614 30.9294 35.6913 28.2856 37.2168C27.4557 37.6954 26.6259 38.1741 25.7938 38.6527C25.6932 38.7109 25.5903 38.7601 25.4539 38.8317C25.4449 38.693 25.4337 38.5924 25.4337 38.4917C25.4337 37.6149 25.4382 36.7404 25.4293 35.8636C25.4293 35.6645 25.4762 35.5437 25.6596 35.4386C29.5157 33.2198 33.3696 30.9942 37.2212 28.7709C37.2794 28.7374 37.3443 28.7105 37.4539 28.6591C37.4539 29.4375 37.4986 30.1622 37.4427 30.8779ZM37.4628 25.3577C37.4561 26.2658 36.9663 26.9033 36.1901 27.3506C33.175 29.0841 30.1622 30.8265 27.1493 32.5666C26.5991 32.8842 26.0466 33.1996 25.4561 33.5396C25.4472 33.3897 25.436 33.2913 25.436 33.1907C25.436 32.3273 25.4449 31.4617 25.4293 30.5983C25.4248 30.3523 25.5075 30.2226 25.72 30.0995C28.46 28.5271 31.1911 26.9368 33.9355 25.3733C34.4231 25.096 34.6378 24.7538 34.6334 24.1812C34.6132 21.1974 34.6244 18.2136 34.6244 15.2298V14.7087C35.3402 15.1404 36.0112 15.496 36.624 15.9299C37.1832 16.3258 37.465 16.9253 37.4673 17.6164C37.4762 20.1976 37.4829 22.7788 37.465 25.3599L37.4628 25.3577Z" fill="%230D0D0D"></path><path fill-rule="evenodd" d="M24 0C10.7452 0 0 10.7452 0 24C0 37.2548 10.7452 48 24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 0 24 0ZM24 2C11.8497 2 2 11.8497 2 24C2 36.1503 11.8497 46 24 46C36.1503 46 46 36.1503 46 24C46 11.8497 36.1503 2 24 2Z" fill="url(%23paint2_radial_6324_83922)"></path><path fill-rule="evenodd" d="M24 0C10.7452 0 0 10.7452 0 24C0 37.2548 10.7452 48 24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 0 24 0ZM24 2C11.8497 2 2 11.8497 2 24C2 36.1503 11.8497 46 24 46C36.1503 46 46 36.1503 46 24C46 11.8497 36.1503 2 24 2Z" fill="url(%23paint3_radial_6324_83922)"></path><defs><radialGradient id="paint0_radial_6324_83922" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(13.4442 13.3899) rotate(44.9817) scale(46.7487 99.1435)"><stop stop-color="%23A3EEF8"></stop><stop offset="0.177083" stop-color="%23A4DCF5"></stop><stop offset="0.380208" stop-color="%23A6AEEC"></stop><stop offset="1" stop-color="%23ECBEE1"></stop></radialGradient><radialGradient id="paint1_radial_6324_83922" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(25.9515 43.7068) rotate(84.265) scale(24.2138 46.3215)"><stop stop-color="%23FCF5EE"></stop><stop offset="0.715135" stop-color="%23ECBEE1" stop-opacity="0"></stop></radialGradient><radialGradient id="paint2_radial_6324_83922" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(12.7405 12.6825) rotate(44.9817) scale(49.8653 105.753)"><stop stop-color="%23A3EEF8"></stop><stop offset="0.177083" stop-color="%23A4DCF5"></stop><stop offset="0.380208" stop-color="%23A6AEEC"></stop><stop offset="1" stop-color="%23ECBEE1"></stop></radialGradient><radialGradient id="paint3_radial_6324_83922" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(26.0816 45.0206) rotate(84.265) scale(25.828 49.4096)"><stop stop-color="%23FCF5EE"></stop><stop offset="0.715135" stop-color="%23ECBEE1" stop-opacity="0"></stop></radialGradient></defs></g></svg>',name:"Immutable Passport",rdns:"com.immutable.passport",uuid:"00000000-0000-0000-0000-000000000000"};function Ove(){const e=new Set;let t=[];const n=()=>function(e){if("undefined"==typeof window)return;const t=t=>e(t.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)}((n=>{t.some((({info:e})=>e.uuid===n.info.uuid))||(t=[...t,n],e.forEach((e=>e(t,{added:[n]}))))}));let r=n();return{_listeners:()=>e,clear(){e.forEach((e=>e([],{removed:[...t]}))),t=[]},destroy(){this.clear(),e.clear(),r?.()},findProvider:({rdns:e})=>t.find((t=>t.info.rdns===e)),getProviders:()=>t,reset(){this.clear(),r?.(),r=n()},subscribe:(n,{emitImmediately:r}={})=>(e.add(n),r&&n(t,{added:t}),()=>e.delete(n))}}class Pve{static instance;store;resetTimeout;isInit=!1;constructor(){this.store=Ove(),this.store.reset()}static getInstance(){return Pve.instance||(Pve.instance=new Pve),Pve.instance}getProviders(){return this.store.getProviders()}subscribe(e){return this.store.subscribe(e)}clear(){this.store.clear()}reset(){clearTimeout(this.resetTimeout),this.resetTimeout=setTimeout((()=>{this.store.reset()}),200)}initialise(){this.isInit||(this.isInit=!0,this.reset())}requestProviders(){window.dispatchEvent(new CustomEvent("eip6963:requestProvider"))}destroy(){this.store.destroy()}}const Rve={name:"Other",rdns:"walletconnect",icon:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDggNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGc+PHBhdGggZD0iTTEwLjQyMzYgMTQuODY4NkMxNy45NTA3IDcuNTIzNzcgMzAuMTY5NCA3LjUyMzc3IDM3LjY5NjQgMTQuODY4NkwzOC42MDI2IDE1Ljc1OTNDMzguOTgyNiAxNi4xMjQ0IDM4Ljk4MjYgMTYuNzIzMSAzOC42MDI2IDE3LjA4ODFMMzUuNTA0MSAyMC4xMTA4QzM1LjMxNDEgMjAuMzAwNiAzNS4wMDcxIDIwLjMwMDYgMzQuODE3MSAyMC4xMTA4TDMzLjU3NDggMTguODk4OEMyOC4zMTMyIDEzLjc3MzUgMTkuODA2OSAxMy43NzM1IDE0LjU0NTIgMTguODk4OEwxMy4yMTUyIDIwLjE5ODRDMTMuMDI1MiAyMC4zODgyIDEyLjcxODMgMjAuMzg4MiAxMi41MjgzIDIwLjE5ODRMOS40Mjk3OCAxNy4xNzU3QzkuMDQ5NzcgMTYuODEwNyA5LjA0OTc3IDE2LjIxMiA5LjQyOTc4IDE1Ljg0N0wxMC40MjM2IDE0Ljg2ODZaTTQ0LjExMjcgMjEuMTE4M0w0Ni44NzUgMjMuODA1MUM0Ny4yNTUgMjQuMTcwMSA0Ny4yNTUgMjQuNzY4OCA0Ni44NzUgMjUuMTMzOUwzNC40MzcxIDM3LjI2ODJDMzQuMDU3MSAzNy42MzMyIDMzLjQ0MzMgMzcuNjMzMiAzMy4wNzc5IDM3LjI2ODJMMjQuMjUgMjguNjUzQzI0LjE2MjMgMjguNTY1NCAyNC4wMDE2IDI4LjU2NTQgMjMuOTEzOSAyOC42NTNMMTUuMDg2IDM3LjI2ODJDMTQuNzA2IDM3LjYzMzIgMTQuMDkyMiAzNy42MzMyIDEzLjcyNjggMzcuMjY4MkwxLjI0NTAzIDI1LjEzMzlDMC44NjUwMiAyNC43Njg4IDAuODY1MDIgMjQuMTcwMSAxLjI0NTAzIDIzLjgwNTFMNC4wMDczOCAyMS4xMTgzQzQuMzg3MzkgMjAuNzUzMyA1LjAwMTI1IDIwLjc1MzMgNS4zNjY2NCAyMS4xMTgzTDE0LjE5NDUgMjkuNzMzNUMxNC4yODIyIDI5LjgyMTEgMTQuNDQyOSAyOS44MjExIDE0LjUzMDYgMjkuNzMzNUwyMy4zNTg1IDIxLjExODNDMjMuNzM4NSAyMC43NTMzIDI0LjM1MjMgMjAuNzUzMyAyNC43MTc3IDIxLjExODNMMzMuNTQ1NiAyOS43MzM1QzMzLjYzMzMgMjkuODIxMSAzMy43OTQgMjkuODIxMSAzMy44ODE3IDI5LjczMzVMNDIuNzA5NiAyMS4xMTgzQzQzLjExODggMjAuNzUzMyA0My43MzI3IDIwLjc1MzMgNDQuMTEyNyAyMS4xMTgzWiIgZmlsbD0iIzM2OEFGQSI+PC9wYXRoPjwvZz48L3N2Zz4=",uuid:"wallet-connect"};class Nve{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&&Eve(this.web3Provider),this.setupProviderUpdatedListener(),this.setupDisconnectProviderListener(),Pve.getInstance().initialise()}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=Vge(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&&zye.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(OM.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(OM.IMTBL_WIDGETS_PROVIDER,this.eventHandlersFunction)}removeListener(e){this.eventHandlers.delete(e),this.eventHandlersFunction&&(window.removeEventListener(this.eventTopic,this.eventHandlersFunction),window.removeEventListener(OM.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(OM.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(HM).includes(t)?t:rve),environment:lve(e?.environment),isOnRampEnabled:uve(!0,e?.isOnRampEnabled?.toString()),isSwapEnabled:uve(!0,e?.isSwapEnabled?.toString()),isBridgeEnabled:uve(!0,e?.isBridgeEnabled?.toString())};var e,t}setupProviderUpdatedListener(){window.addEventListener(OM.IMTBL_WIDGETS_PROVIDER,this.handleProviderUpdatedEvent);const e=this;window.addEventListener(yve,(()=>e.handleEIP1193ProviderEvents(e)))}setupDisconnectProviderListener(){window.addEventListener(OM.IMTBL_WALLET_WIDGET_EVENT,this.handleDisconnectEvent)}handleEIP1193ProviderEvents(e){e.web3Provider&&(e.web3Provider=new Jp(e.web3Provider.provider)),e.render()}handleProviderUpdatedEvent=e=>{const t=this;switch(e.detail.type){case PM.PROVIDER_UPDATED:{const n=e.detail.data;t.web3Provider=n.provider,this.render();break}}};handleDisconnectEvent=e=>{const t=this;if(e.detail.type===NM.DISCONNECT_WALLET)t.web3Provider=void 0,this.render()}}const Mve=rL.lazy((()=>Promise.resolve().then((function(){return sNe}))));class Dve extends Nve{eventTopic=OM.IMTBL_CONNECT_WIDGET_EVENT;getValidatedProperties({config:e}){return{config:e}}getValidatedParameters(e){const t=e;return!e.targetChainId&&this.checkout.config.isProduction?t.targetChainId=WM.IMTBL_ZKEVM_MAINNET:e.targetChainId&&this.checkout.config.isProduction&&e.targetChainId!==WM.ETHEREUM&&e.targetChainId!==WM.IMTBL_ZKEVM_MAINNET&&(console.warn(`Cannot set targetChainId to ${e.targetChainId} in ${qt.PRODUCTION} environment, defaulting to ${eye(WM.IMTBL_ZKEVM_MAINNET)}, chainId ${WM.IMTBL_ZKEVM_MAINNET}`),t.targetChainId=WM.IMTBL_ZKEVM_MAINNET),e.targetChainId||this.checkout.config.environment!==qt.SANDBOX?e.targetChainId&&this.checkout.config.environment===qt.SANDBOX&&e.targetChainId!==WM.SEPOLIA&&e.targetChainId!==WM.IMTBL_ZKEVM_TESTNET&&(console.warn(`Cannot set targetChainId to ${e.targetChainId} in ${qt.SANDBOX} environment, defaulting to ${eye(WM.IMTBL_ZKEVM_TESTNET)}, chainId ${WM.IMTBL_ZKEVM_TESTNET}`),t.targetChainId=WM.IMTBL_ZKEVM_TESTNET):t.targetChainId=WM.IMTBL_ZKEVM_TESTNET,e}render(){if(!this.reactRoot)return;const{t:e}=zye;this.reactRoot.render(vB(rL.StrictMode,{children:vB(Jme,{checkout:this.checkout,children:vB(gle,{id:"connect-container",config:this.strongConfig(),children:vB(nL.Suspense,{fallback:vB($me,{loadingText:e("views.LOADING_VIEW.text")}),children:vB(Mve,{config:this.strongConfig(),checkout:this.checkout,targetChainId:this.parameters.targetChainId})})})})}))}}const Lve={width:"100%",display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",padding:"base.spacing.x4",paddingBottom:"base.spacing.x10"},Fve={maxHeight:"base.spacing.x20",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",paddingTop:"base.spacing.x4",paddingBottom:"base.spacing.x5"},Bve={width:"base.icon.size.400"},Uve={display:"flex",flexDirection:"column",paddingX:"base.spacing.x4",paddingBottom:"base.spacing.x4"},zve={display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"base.spacing.x2",color:"base.color.text.body.primary"},jve={display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",color:"base.color.text.body.secondary"};function Hve({actionText:e,onActionClick:t,hideActionButton:n=!1,loading:r=!1,variant:i="secondary"}){return vB(tJ,{testId:"footer-button-container",sx:Lve,children:!n&&vB(ZZ,{testId:"footer-button",size:"large",sx:{width:"100%"},variant:i,disabled:r,onClick:t,children:r?vB(ZZ.Icon,{icon:"Loading",sx:Bve}):e})})}const Wve=e=>({backgroundColor:e?"transparent":""}),Vve=(e=!1)=>({backgroundColor:e?"base.color.translucent.standard.200":""});var Gve;!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"}(Gve||(Gve={}));const qve={view:{type:Gve.LOADING_VIEW},history:[]};var Kve;!function(e){e.UPDATE_VIEW="UPDATE_VIEW",e.GO_BACK="GO_BACK",e.GO_BACK_TO="GO_BACK_TO"}(Kve||(Kve={}));const Xve=nL.createContext({viewState:qve,viewDispatch:()=>{}});Xve.displayName="ViewContext";const Yve=(e,t)=>{switch(t.payload.type){case Kve.UPDATE_VIEW:{const{view:n,currentViewData:r}=t.payload;n.type===Gve.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 Kve.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 Kve.GO_BACK_TO:{if(e.history.length<=1)return{...e};const{history:n}=e,r=[...n];let i=!1;for(let o=n.length-1;o>=0;o--){if(e.history[o].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 Zve({title:e,showBack:t=!1,transparent:n=!1,onBackButtonClick:r,onCloseButtonClick:i,rightActions:o}){const{viewDispatch:a}=nL.useContext(Xve);return bB(O2,{testId:"header-navigation-container",sx:Wve(n),contentAlign:t?"center":"left",size:"small",children:[t&&vB(O2.LeftButtCon,{sx:Vve(n),icon:"ArrowBackward",iconVariant:"bold",onClick:()=>{r?r():(async()=>{a({payload:{type:Kve.GO_BACK}})})()},testId:"back-button"}),vB(O2.Title,{testId:"header-title",size:"small",children:e}),bB(O2.RightSlot,{children:[o,i&&vB(vJ,{iconVariant:"bold",sx:Vve(n),icon:"Close",onClick:i,testId:"close-button"})]})]})}const Jve={position:"absolute",top:"0",left:"0",height:"100%",width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},Qve={justifyContent:"flex-end"},$ve={position:"relative",height:"305px",width:"100%"};function ebe(){return bB(tJ,{sx:$ve,children:[bB("svg",{width:"430",height:"306",viewBox:"0 0 430 306",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[vB("rect",{x:"-1",y:"0.978516",width:"446",height:"305",fill:"url(#paint0_linear_3034_48563)"}),vB("defs",{children:bB("linearGradient",{id:"paint0_linear_3034_48563",x1:"222",y1:"0.978516",x2:"222",y2:"305.979",gradientUnits:"userSpaceOnUse",children:[vB("stop",{stopColor:"#01003F",stopOpacity:"0"}),vB("stop",{offset:"1",stopColor:"#6B4292",stopOpacity:"0.432292"})]})})]}),vB(tJ,{sx:Jve,children:bB("svg",{width:"174",height:"180",viewBox:"0 0 174 180",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[vB("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"}),vB("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"}),vB("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)"}),vB("g",{filter:"url(#filter0_d_2795_41752)",children:vB("circle",{cx:"118.481",cy:"67.6248",r:"2.23855",transform:"rotate(54.7665 118.481 67.6248)",fill:"#D0D2E2"})}),vB("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"}),vB("line",{x1:"63.724",y1:"50.8925",x2:"41.1729",y2:"66.8203",stroke:"#1E182A",strokeWidth:"0.525916"}),vB("line",{x1:"67.0235",y1:"79.3011",x2:"38.1813",y2:"38.4654",stroke:"#1E182A",strokeWidth:"0.525916"}),vB("line",{x1:"55.9759",y1:"39.9228",x2:"33.4249",y2:"55.8506",stroke:"#1E182A",strokeWidth:"0.525916"}),vB("line",{x1:"71.0423",y1:"61.2538",x2:"48.4913",y2:"77.1816",stroke:"#1E182A",strokeWidth:"0.525916"}),vB("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)"}),vB("line",{x1:"115.384",y1:"124.032",x2:"92.8331",y2:"139.96",stroke:"#1E182A",strokeWidth:"0.525916"}),vB("line",{x1:"118.684",y1:"152.44",x2:"89.8414",y2:"111.604",stroke:"#1E182A",strokeWidth:"0.525916"}),vB("line",{x1:"107.632",y1:"113.06",x2:"85.0811",y2:"128.988",stroke:"#1E182A",strokeWidth:"0.525916"}),vB("line",{x1:"122.702",y1:"134.393",x2:"100.151",y2:"150.321",stroke:"#1E182A",strokeWidth:"0.525916"}),vB("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)"}),vB("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)"}),bB("defs",{children:[bB("filter",{id:"filter0_d_2795_41752",x:"114.664",y:"63.808",width:"7.63206",height:"7.63303",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[vB("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),vB("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"}),vB("feMorphology",{radius:"0.525916",operator:"dilate",in:"SourceAlpha",result:"effect1_dropShadow_2795_41752"}),vB("feOffset",{}),vB("feGaussianBlur",{stdDeviation:"0.525916"}),vB("feComposite",{in2:"hardAlpha",operator:"out"}),vB("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"}),vB("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2795_41752"}),vB("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2795_41752",result:"shape"})]}),bB("linearGradient",{id:"paint0_linear_2795_41752",x1:"53.8443",y1:"29.4462",x2:"98.6153",y2:"58.1742",gradientUnits:"userSpaceOnUse",children:[vB("stop",{stopColor:"#8395E5",stopOpacity:"0.44"}),vB("stop",{offset:"0.526042",stopColor:"#989AD1",stopOpacity:"0.734583"}),vB("stop",{offset:"1",stopColor:"#2D203D"})]}),bB("linearGradient",{id:"paint1_linear_2795_41752",x1:"105.502",y1:"102.585",x2:"150.273",y2:"131.313",gradientUnits:"userSpaceOnUse",children:[vB("stop",{stopColor:"#8395E5",stopOpacity:"0.44"}),vB("stop",{offset:"0.526042",stopColor:"#989AD1",stopOpacity:"0.734583"}),vB("stop",{offset:"1",stopColor:"#2D203D"})]}),bB("linearGradient",{id:"paint2_linear_2795_41752",x1:"88.8945",y1:"89.2396",x2:"42.7826",y2:"120.454",gradientUnits:"userSpaceOnUse",children:[vB("stop",{stopColor:"#7676A3"}),vB("stop",{offset:"1",stopColor:"#EDEFF5"})]}),bB("linearGradient",{id:"paint3_linear_2795_41752",x1:"112.599",y1:"72.2342",x2:"91.9662",y2:"86.3506",gradientUnits:"userSpaceOnUse",children:[vB("stop",{stopColor:"#DEDFEB"}),vB("stop",{offset:"0.916667",stopColor:"#656997"})]})]})]})})]})}const tbe={paddingX:"base.spacing.x4",paddingTop:"base.spacing.x10"},nbe={marginTop:"base.spacing.x3"},rbe={color:"base.color.text.body.secondary"};function ibe(e){const{heading:t,children:n}=e;return bB(tJ,{sx:tbe,children:[vB(s$,{testId:"simple-text-body__heading",size:"small",children:t}),vB(tJ,{sx:nbe,children:vB(_Q,{testId:"simple-text-body__body",size:"small",sx:rbe,children:n})})]})}function obe({actionText:e,onActionClick:t,errorEventAction:n,errorEventActionLoading:r=!1,onCloseClick:i}){const{t:o}=Hge();"function"==typeof n&&n();return vB(Qme,{header:vB(Zve,{transparent:!0,onCloseButtonClick:i}),footer:vB(Hve,{loading:r,actionText:e,onActionClick:()=>"function"==typeof t&&t()}),heroContent:vB(ebe,{}),floatHeader:!0,testId:"error-view",children:bB(ibe,{heading:o("views.ERROR_VIEW.heading"),children:[o("views.ERROR_VIEW.body",{returnObjects:!0})[0]," ",vB(r2,{size:"small",rc:vB("a",{href:"https://support.immutable.com/en/"}),children:o("views.ERROR_VIEW.body",{returnObjects:!0})[1]})," ",o("views.ERROR_VIEW.body",{returnObjects:!0})[2]]})})}var abe;!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"}(abe||(abe={}));const sbe={connectionStatus:abe.LOADING,checkout:void 0,provider:void 0};var cbe;!function(e){e.UPDATE_CONNECTION_STATUS="UPDATE_CONNECTION_STATUS",e.SET_CHECKOUT="SET_CHECKOUT",e.SET_PROVIDER="SET_PROVIDER"}(cbe||(cbe={}));const lbe=nL.createContext({connectLoaderState:sbe,connectLoaderDispatch:()=>{}}),ube=(e,t)=>{switch(t.payload.type){case cbe.UPDATE_CONNECTION_STATUS:return{...e,connectionStatus:t.payload.connectionStatus,deepLink:t.payload.deepLink};case cbe.SET_CHECKOUT:return{...e,checkout:t.payload.checkout};case cbe.SET_PROVIDER:return{...e,provider:t.payload.provider};default:return e}},dbe=(e,t,n)=>e.chainId===fve(n)?-1:e.chainId===dve(n)?0:1,fbe=e=>(Math.round(100*e)/100).toFixed(2),hbe=(e,t,n)=>{const r="0.00";if(!e)return r;const i=n.get(t.toLowerCase());if(!i)return r;const o=parseFloat(e);return 0===parseFloat(e)||Number.isNaN(o)?r:fbe(o*i)},pbe=(e,t=!1)=>{const n="-.--";return e&&("0.00"!==e||t)?e:n},mbe=(e,t)=>{const n=e.indexOf(".");return parseFloat(e.substring(0,n+t+1)).toFixed(t)},ybe=(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=mbe(n,e);if(0===parseFloat(r))for(;"0"===(r[r.length-1]||"")&&e<t&&(e+=1,r=mbe(n,e),"0"===(r[r.length-1]||"")););return r}let r=mbe(n,2);return r.endsWith(".00")&&(r=mbe(r,0)),r},gbe=e=>e===WM.IMTBL_ZKEVM_DEVNET||e===WM.IMTBL_ZKEVM_TESTNET||e===WM.IMTBL_ZKEVM_MAINNET,vbe=e=>e===WM.SEPOLIA||e===WM.ETHEREUM,bbe=e=>!e||e.toLocaleLowerCase()===Kge;function wbe(e,t){return`${ove[e??qt.PRODUCTION]}/v1/blob/img${t}`}function Ebe(e){return wbe(e,"/tokens/eth.svg")}function xbe(e){return wbe(e,"/tokens/imx.svg")}function Tbe(e,t){return wbe(e,`/tokens/${t.toLowerCase()}.svg`)}function Abe(e,t){return t===HM.LIGHT?wbe(e,"/tokens/defaultonlight.svg"):wbe(e,"/tokens/defaultondark.svg")}const _be={checkout:null,provider:null,passport:void 0,walletProviderName:null,sendCloseEvent:()=>{}};var Cbe;!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"}(Cbe||(Cbe={}));const Ibe=nL.createContext({connectState:_be,connectDispatch:()=>{}});Ibe.displayName="ConnectContext";const Sbe=(e,t)=>{switch(t.payload.type){case Cbe.SET_CHECKOUT:return{...e,checkout:t.payload.checkout};case Cbe.SET_PROVIDER:return{...e,provider:t.payload.provider};case Cbe.SET_PASSPORT:return{...e,passport:t.payload.passport};case Cbe.SET_WALLET_PROVIDER_NAME:return{...e,walletProviderName:t.payload.walletProviderName};case Cbe.SET_SEND_CLOSE_EVENT:return{...e,sendCloseEvent:t.payload.sendCloseEvent};default:return e}};var kbe;function Obe({hideLogo:e}){return vB(tJ,{testId:"footer-logo-container",sx:Fve,children:!e&&vB(fZ,{testId:"footer-logo-image",logo:"ImmutableHorizontalLockup",sx:{width:"base.spacing.x25"}})})}!function(e){e.CONNECT_WALLET="CONNECT_WALLET",e.READY_TO_CONNECT="READY_TO_CONNECT",e.PASSPORT="PASSPORT",e.SWITCH_NETWORK="SWITCH_NETWORK",e.SUCCESS="SUCCESS"}(kbe||(kbe={}));const Pbe={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"},Rbe={width:"auto",height:"100%",objectFit:"contain",objectPosition:"50% 50%"};function Nbe({src:e,alt:t,sx:n={},...r}){return vB(tJ,{className:"FramedImage AspectRatioImage",sx:{...Pbe,...n},rc:vB("span",{}),...r,children:vB("img",{src:e,alt:t,className:"CloudImage",style:CX(Rbe),loading:"lazy"})})}function Mbe({rc:e=vB("span",{}),...t}){const{t:n}=Hge(),{providerDetail:r,onWalletClick:i}=t,o=Ive(r.info.rdns),a=o===QM.PASSPORT,s=a||o===QM.METAMASK,c={marginLeft:"65px"};return bB(U1,{rc:e,testId:`wallet-list-${r.info.rdns}`,size:"medium",emphasized:!0,onClick:()=>i(r),sx:{marginBottom:"base.spacing.x1",position:"relative"},children:[vB(Nbe,{src:r.info.icon,alt:r.info.name,sx:{position:"absolute",left:"base.spacing.x3"}}),vB(U1.Label,{size:"medium",sx:c,children:r.info.name}),vB(U1.IntentIcon,{sx:c}),bB(U1.Caption,{sx:c,children:[a?vB(tJ,{rc:vB("span",{}),sx:{c:"base.gradient.1"},children:s?n(`wallets.${o}.accentText`):r.info.name}):null," ",s&&n(`wallets.${o}.description`)]})]})}const Dbe=Symbol(),Lbe=Object.getPrototypeOf,Fbe=new WeakMap,Bbe=e=>(e=>e&&(Fbe.has(e)?Fbe.get(e):Lbe(e)===Object.prototype||Lbe(e)===Array.prototype))(e)&&e[Dbe]||null,Ube=(e,t=!0)=>{Fbe.set(e,t)},zbe=e=>"object"==typeof e&&null!==e,jbe=new WeakMap,Hbe=new WeakSet,[Wbe]=((e=Object.is,t=((e,t)=>new Proxy(e,t)),n=(e=>zbe(e)&&!Hbe.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,o=((e,t,n=r)=>{const a=i.get(e);if((null==a?void 0:a[0])===t)return a[1];const s=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return Ube(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(Hbe.has(r))Ube(r,!1);else if(r instanceof Promise)delete i.value,i.get=()=>n(r);else if(jbe.has(r)){const[e,t]=jbe.get(r);i.value=o(e,t(),n)}Object.defineProperty(s,t,i)})),Object.preventExtensions(s)}),a=new WeakMap,s=[1,1],c=(r=>{if(!zbe(r))throw new Error("object required");const i=a.get(r);if(i)return i;let l=s[0];const u=new Set,d=(e,t=++s[0])=>{l!==t&&(l=t,u.forEach((n=>n(e,t))))};let f=s[1];const h=e=>(t,n)=>{const r=[...t];r[1]=[e,...r[1]],d(r,n)},p=new Map,m=e=>{var t;const n=p.get(e);n&&(p.delete(e),null==(t=n[1])||t.call(n))},y=Array.isArray(r)?[]:Object.create(Object.getPrototypeOf(r)),g={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,o){const s=Reflect.has(t,r),l=Reflect.get(t,r,o);if(s&&(e(l,i)||a.has(i)&&e(l,a.get(i))))return!0;m(r),zbe(i)&&(i=Bbe(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{!jbe.has(i)&&n(i)&&(f=c(i));const e=!Hbe.has(f)&&jbe.get(f);e&&((e,t)=>{if(p.has(e))throw new Error("prop listener already exists");if(u.size){const n=t[3](h(e));p.set(e,[t,n])}else p.set(e,[t])})(r,e)}return Reflect.set(t,r,f,o),d(["set",[r],i,l]),!0}},v=t(y,g);a.set(r,v);const b=[y,(e=++s[1])=>(f===e||u.size||(f=e,p.forEach((([t])=>{const n=t[1](e);n>l&&(l=n)}))),l),o,e=>{u.add(e),1===u.size&&p.forEach((([e,t],n)=>{if(t)throw new Error("remove already exists");const r=e[3](h(n));p.set(n,[e,r])}));return()=>{u.delete(e),0===u.size&&p.forEach((([e,t],n)=>{t&&(t(),p.set(n,[e]))}))}}];return jbe.set(v,b),Reflect.ownKeys(r).forEach((e=>{const t=Object.getOwnPropertyDescriptor(r,e);"value"in t&&(v[e]=r[e],delete t.value,delete t.writable),Object.defineProperty(y,e,t)})),v}))=>[c,jbe,Hbe,e,t,n,r,i,o,a,s])();function Vbe(e={}){return Wbe(e)}function Gbe(e,t,n){const r=jbe.get(e);let i;r||console.warn("Please use proxy object");const o=[],a=r[3];let s=!1;const c=a((e=>{o.push(e),n?t(o.splice(0)):i||(i=Promise.resolve().then((()=>{i=void 0,s&&t(o.splice(0))})))}));return s=!0,()=>{s=!1,c()}}const qbe=Vbe({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),Kbe={state:qbe,subscribe:e=>Gbe(qbe,(()=>e(qbe))),push(e,t){e!==qbe.view&&(qbe.view=e,t&&(qbe.data=t),qbe.history.push(e))},reset(e){qbe.view=e,qbe.history=[e]},replace(e){qbe.history.length>1&&(qbe.history[qbe.history.length-1]=e,qbe.view=e)},goBack(){if(qbe.history.length>1){qbe.history.pop();const[e]=qbe.history.slice(-1);qbe.view=e}},setData(e){qbe.data=e}},Xbe={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:()=>Xbe.isMobile()&&navigator.userAgent.toLowerCase().includes("android"),isIos(){const e=navigator.userAgent.toLowerCase();return Xbe.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(Xbe.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(!Xbe.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(Xbe.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(Xbe.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(Xbe.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(Xbe.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=null==(e=Kbe.state.data)?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},Ybe=Vbe({enabled:typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),userSessionId:"",events:[],connectedWalletId:void 0}),Zbe={state:Ybe,subscribe:e=>Gbe(Ybe.events,(()=>e(function(e,t){const n=jbe.get(e);n||console.warn("Please use proxy object");const[r,i,o]=n;return o(r,i(),t)}(Ybe.events[Ybe.events.length-1])))),initialize(){Ybe.enabled&&typeof(null==crypto?void 0:crypto.randomUUID)<"u"&&(Ybe.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){Ybe.connectedWalletId=e},click(e){if(Ybe.enabled){const t={type:"CLICK",name:e.name,userSessionId:Ybe.userSessionId,timestamp:Date.now(),data:e};Ybe.events.push(t)}},track(e){if(Ybe.enabled){const t={type:"TRACK",name:e.name,userSessionId:Ybe.userSessionId,timestamp:Date.now(),data:e};Ybe.events.push(t)}},view(e){if(Ybe.enabled){const t={type:"VIEW",name:e.name,userSessionId:Ybe.userSessionId,timestamp:Date.now(),data:e};Ybe.events.push(t)}}},Jbe=Vbe({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),Qbe={state:Jbe,subscribe:e=>Gbe(Jbe,(()=>e(Jbe))),setChains(e){Jbe.chains=e},setWalletConnectUri(e){Jbe.walletConnectUri=e},setIsCustomDesktop(e){Jbe.isCustomDesktop=e},setIsCustomMobile(e){Jbe.isCustomMobile=e},setIsDataLoaded(e){Jbe.isDataLoaded=e},setIsUiLoaded(e){Jbe.isUiLoaded=e},setIsAuth(e){Jbe.isAuth=e}},$be=Vbe({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}),ewe={state:$be,subscribe:e=>Gbe($be,(()=>e($be))),setConfig(e){var t,n;Zbe.initialize(),Qbe.setChains(e.chains),Qbe.setIsAuth(Boolean(e.enableAuthMode)),Qbe.setIsCustomMobile(Boolean(null==(t=e.mobileWallets)?void 0:t.length)),Qbe.setIsCustomDesktop(Boolean(null==(n=e.desktopWallets)?void 0:n.length)),Xbe.setModalVersionInStorage(),Object.assign($be,e)}};var twe=Object.defineProperty,nwe=Object.getOwnPropertySymbols,rwe=Object.prototype.hasOwnProperty,iwe=Object.prototype.propertyIsEnumerable,owe=(e,t,n)=>t in e?twe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const awe="https://explorer-api.walletconnect.com",swe="wcm",cwe="js-2.6.2";async function lwe(e,t){const n=((e,t)=>{for(var n in t||(t={}))rwe.call(t,n)&&owe(e,n,t[n]);if(nwe)for(var n of nwe(t))iwe.call(t,n)&&owe(e,n,t[n]);return e})({sdkType:swe,sdkVersion:cwe},t),r=new URL(e,awe);return r.searchParams.append("projectId",ewe.state.projectId),Object.entries(n).forEach((([e,t])=>{t&&r.searchParams.append(e,String(t))})),(await fetch(r)).json()}const uwe={getDesktopListings:async e=>lwe("/w3m/v1/getDesktopListings",e),getMobileListings:async e=>lwe("/w3m/v1/getMobileListings",e),getInjectedListings:async e=>lwe("/w3m/v1/getInjectedListings",e),getAllListings:async e=>lwe("/w3m/v1/getAllListings",e),getWalletImageUrl:e=>`${awe}/w3m/v1/getWalletImage/${e}?projectId=${ewe.state.projectId}&sdkType=${swe}&sdkVersion=${cwe}`,getAssetImageUrl:e=>`${awe}/w3m/v1/getAssetImage/${e}?projectId=${ewe.state.projectId}&sdkType=${swe}&sdkVersion=${cwe}`};var dwe=Object.defineProperty,fwe=Object.getOwnPropertySymbols,hwe=Object.prototype.hasOwnProperty,pwe=Object.prototype.propertyIsEnumerable,mwe=(e,t,n)=>t in e?dwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const ywe=Xbe.isMobile(),gwe=Vbe({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),vwe={state:gwe,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=ewe.state;if("NONE"===e||"ALL"===t&&!e)return gwe.recomendedWallets;if(Xbe.isArray(e)){const t={recommendedIds:e.join(",")},{listings:n}=await uwe.getAllListings(t),r=Object.values(n);r.sort(((t,n)=>e.indexOf(t.id)-e.indexOf(n.id))),gwe.recomendedWallets=r}else{const{chains:e,isAuth:n}=Qbe.state,r=e?.join(","),i=Xbe.isArray(t),o={page:1,sdks:n?"auth_v1":void 0,entries:Xbe.RECOMMENDED_WALLET_AMOUNT,chains:r,version:2,excludedIds:i?t.join(","):void 0},{listings:a}=ywe?await uwe.getMobileListings(o):await uwe.getDesktopListings(o);gwe.recomendedWallets=Object.values(a)}return gwe.recomendedWallets},async getWallets(e){const t=((e,t)=>{for(var n in t||(t={}))hwe.call(t,n)&&mwe(e,n,t[n]);if(fwe)for(var n of fwe(t))pwe.call(t,n)&&mwe(e,n,t[n]);return e})({},e),{explorerRecommendedWalletIds:n,explorerExcludedWalletIds:r}=ewe.state,{recomendedWallets:i}=gwe;if("ALL"===r)return gwe.wallets;i.length?t.excludedIds=i.map((e=>e.id)).join(","):Xbe.isArray(n)&&(t.excludedIds=n.join(",")),Xbe.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),Qbe.state.isAuth&&(t.sdks="auth_v1");const{page:o,search:a}=e,{listings:s,total:c}=ywe?await uwe.getMobileListings(t):await uwe.getDesktopListings(t),l=Object.values(s),u=a?"search":"wallets";return gwe[u]={listings:[...gwe[u].listings,...l],total:c,page:o??1},{listings:l,total:c}},getWalletImageUrl:e=>uwe.getWalletImageUrl(e),getAssetImageUrl:e=>uwe.getAssetImageUrl(e),resetSearch(){gwe.search={listings:[],total:0,page:1}}},bwe=Vbe({open:!1}),wwe={state:bwe,subscribe:e=>Gbe(bwe,(()=>e(bwe))),open:async e=>new Promise((t=>{const{isUiLoaded:n,isDataLoaded:r}=Qbe.state;if(Xbe.removeWalletConnectDeepLink(),Qbe.setWalletConnectUri(e?.uri),Qbe.setChains(e?.chains),Kbe.reset("ConnectWallet"),n&&r)bwe.open=!0,t();else{const e=setInterval((()=>{const n=Qbe.state;n.isUiLoaded&&n.isDataLoaded&&(clearInterval(e),bwe.open=!0,t())}),200)}})),close(){bwe.open=!1}};var Ewe=Object.defineProperty,xwe=Object.getOwnPropertySymbols,Twe=Object.prototype.hasOwnProperty,Awe=Object.prototype.propertyIsEnumerable,_we=(e,t,n)=>t in e?Ewe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const Cwe=Vbe({themeMode:typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}),Iwe={state:Cwe,subscribe:e=>Gbe(Cwe,(()=>e(Cwe))),setThemeConfig(e){const{themeMode:t,themeVariables:n}=e;t&&(Cwe.themeMode=t),n&&(Cwe.themeVariables=((e,t)=>{for(var n in t||(t={}))Twe.call(t,n)&&_we(e,n,t[n]);if(xwe)for(var n of xwe(t))Awe.call(t,n)&&_we(e,n,t[n]);return e})({},n))}},Swe=Vbe({open:!1,message:"",variant:"success"}),kwe={state:Swe,subscribe:e=>Gbe(Swe,(()=>e(Swe))),openToast(e,t){Swe.open=!0,Swe.message=e,Swe.variant=t},closeToast(){Swe.open=!1}};let Owe=class{constructor(e){this.openModal=wwe.open,this.closeModal=wwe.close,this.subscribeModal=wwe.subscribe,this.setTheme=Iwe.setThemeConfig,Iwe.setThemeConfig(e),ewe.setConfig(e),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then((function(){return oVe}));const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),Qbe.setIsUiLoaded(!0)}}};var Pwe=Object.freeze({__proto__:null,WalletConnectModal:Owe});function Rwe(){}function Nwe(){Nwe.init.call(this)}function Mwe(e){return void 0===e._maxListeners?Nwe.defaultMaxListeners:e._maxListeners}function Dwe(e,t,n,r){var i,o,a;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((o=e._events)?(o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]):(o=e._events=new Rwe,e._eventsCount=0),a){if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),!a.warned&&(i=Mwe(e))&&i>0&&a.length>i){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(s)}}else a=o[t]=n,++e._eventsCount;return e}function Lwe(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 Fwe(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 Bwe(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}Rwe.prototype=Object.create(null),Nwe.EventEmitter=Nwe,Nwe.usingDomains=!1,Nwe.prototype.domain=void 0,Nwe.prototype._events=void 0,Nwe.prototype._maxListeners=void 0,Nwe.defaultMaxListeners=10,Nwe.init=function(){this.domain=null,Nwe.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Rwe,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Nwe.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},Nwe.prototype.getMaxListeners=function(){return Mwe(this)},Nwe.prototype.emit=function(e){var t,n,r,i,o,a,s,c="error"===e;if(a=this._events)c=c&&null==a.error;else if(!c)return!1;if(s=this.domain,c){if(t=arguments[1],!s){if(t instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(n=a[e]))return!1;var u="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=Bwe(e,r),o=0;o<r;++o)i[o].call(n)}(n,u,this);break;case 2:!function(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,o=Bwe(e,i),a=0;a<i;++a)o[a].call(n,r)}(n,u,this,arguments[1]);break;case 3:!function(e,t,n,r,i){if(t)e.call(n,r,i);else for(var o=e.length,a=Bwe(e,o),s=0;s<o;++s)a[s].call(n,r,i)}(n,u,this,arguments[1],arguments[2]);break;case 4:!function(e,t,n,r,i,o){if(t)e.call(n,r,i,o);else for(var a=e.length,s=Bwe(e,a),c=0;c<a;++c)s[c].call(n,r,i,o)}(n,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];!function(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,o=Bwe(e,i),a=0;a<i;++a)o[a].apply(n,r)}(n,u,this,i)}return!0},Nwe.prototype.addListener=function(e,t){return Dwe(this,e,t,!1)},Nwe.prototype.on=Nwe.prototype.addListener,Nwe.prototype.prependListener=function(e,t){return Dwe(this,e,t,!0)},Nwe.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,Lwe(this,e,t)),this},Nwe.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,Lwe(this,e,t)),this},Nwe.prototype.removeListener=function(e,t){var n,r,i,o,a;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[e]))return this;if(n===t||n.listener&&n.listener===t)0==--this._eventsCount?this._events=new Rwe:(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new Rwe,this;delete r[e]}else!function(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}(n,i);r.removeListener&&this.emit("removeListener",e,a||t)}return this},Nwe.prototype.off=function(e,t){return this.removeListener(e,t)},Nwe.prototype.removeAllListeners=function(e){var t,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new Rwe,this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=new Rwe:delete n[e]),this;if(0===arguments.length){for(var r,i=Object.keys(n),o=0;o<i.length;++o)"removeListener"!==(r=i[o])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new Rwe,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},Nwe.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},Nwe.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Fwe.call(e,t)},Nwe.prototype.listenerCount=Fwe,Nwe.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var Uwe=Object.freeze({__proto__:null,EventEmitter:Nwe,default:Nwe}),zwe={},jwe={},Hwe={},Wwe={};!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}}(Wwe),Object.defineProperty(Hwe,"__esModule",{value:!0});var Vwe=Wwe;function Gwe(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 qwe(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 Kwe(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function Xwe(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function Ywe(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function Zwe(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function Jwe(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 Qwe(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 $we(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),Jwe(e/4294967296>>>0,t,n),Jwe(e>>>0,t,n+4),t}function eEe(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),Qwe(e>>>0,t,n),Qwe(e/4294967296>>>0,t,n+4),t}Hwe.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},Hwe.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},Hwe.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},Hwe.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},Hwe.writeUint16BE=Gwe,Hwe.writeInt16BE=Gwe,Hwe.writeUint16LE=qwe,Hwe.writeInt16LE=qwe,Hwe.readInt32BE=Kwe,Hwe.readUint32BE=Xwe,Hwe.readInt32LE=Ywe,Hwe.readUint32LE=Zwe,Hwe.writeUint32BE=Jwe,Hwe.writeInt32BE=Jwe,Hwe.writeUint32LE=Qwe,Hwe.writeInt32LE=Qwe,Hwe.readInt64BE=function(e,t){void 0===t&&(t=0);var n=Kwe(e,t),r=Kwe(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},Hwe.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*Xwe(e,t)+Xwe(e,t+4)},Hwe.readInt64LE=function(e,t){void 0===t&&(t=0);var n=Ywe(e,t);return 4294967296*Ywe(e,t+4)+n-4294967296*(n>>31)},Hwe.readUint64LE=function(e,t){void 0===t&&(t=0);var n=Zwe(e,t);return 4294967296*Zwe(e,t+4)+n},Hwe.writeUint64BE=$we,Hwe.writeInt64BE=$we,Hwe.writeUint64LE=eEe,Hwe.writeInt64LE=eEe,Hwe.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,o=e/8+n-1;o>=n;o--)r+=t[o]*i,i*=256;return r},Hwe.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,o=n;o<n+e/8;o++)r+=t[o]*i,i*=256;return r},Hwe.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(!Vwe.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var i=1,o=e/8+r-1;o>=r;o--)n[o]=t/i&255,i*=256;return n},Hwe.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(!Vwe.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,o=r;o<r+e/8;o++)n[o]=t/i&255,i*=256;return n},Hwe.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},Hwe.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},Hwe.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},Hwe.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},Hwe.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},Hwe.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},Hwe.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},Hwe.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 tEe={};Object.defineProperty(tEe,"__esModule",{value:!0}),tEe.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e},Object.defineProperty(jwe,"__esModule",{value:!0});var nEe=Hwe,rEe=tEe,iEe=20;function oEe(e,t,n){for(var r=1634760805,i=857760878,o=2036477234,a=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],l=n[11]<<24|n[10]<<16|n[9]<<8|n[8],u=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],h=n[27]<<24|n[26]<<16|n[25]<<8|n[24],p=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],g=t[11]<<24|t[10]<<16|t[9]<<8|t[8],v=t[15]<<24|t[14]<<16|t[13]<<8|t[12],b=r,w=i,E=o,x=a,T=s,A=c,_=l,C=u,I=d,S=f,k=h,O=p,P=m,R=y,N=g,M=v,D=0;D<iEe;D+=2)T=(T^=I=I+(P=(P^=b=b+T|0)>>>16|P<<16)|0)>>>20|T<<12,A=(A^=S=S+(R=(R^=w=w+A|0)>>>16|R<<16)|0)>>>20|A<<12,_=(_^=k=k+(N=(N^=E=E+_|0)>>>16|N<<16)|0)>>>20|_<<12,C=(C^=O=O+(M=(M^=x=x+C|0)>>>16|M<<16)|0)>>>20|C<<12,_=(_^=k=k+(N=(N^=E=E+_|0)>>>24|N<<8)|0)>>>25|_<<7,C=(C^=O=O+(M=(M^=x=x+C|0)>>>24|M<<8)|0)>>>25|C<<7,A=(A^=S=S+(R=(R^=w=w+A|0)>>>24|R<<8)|0)>>>25|A<<7,T=(T^=I=I+(P=(P^=b=b+T|0)>>>24|P<<8)|0)>>>25|T<<7,A=(A^=k=k+(M=(M^=b=b+A|0)>>>16|M<<16)|0)>>>20|A<<12,_=(_^=O=O+(P=(P^=w=w+_|0)>>>16|P<<16)|0)>>>20|_<<12,C=(C^=I=I+(R=(R^=E=E+C|0)>>>16|R<<16)|0)>>>20|C<<12,T=(T^=S=S+(N=(N^=x=x+T|0)>>>16|N<<16)|0)>>>20|T<<12,C=(C^=I=I+(R=(R^=E=E+C|0)>>>24|R<<8)|0)>>>25|C<<7,T=(T^=S=S+(N=(N^=x=x+T|0)>>>24|N<<8)|0)>>>25|T<<7,_=(_^=O=O+(P=(P^=w=w+_|0)>>>24|P<<8)|0)>>>25|_<<7,A=(A^=k=k+(M=(M^=b=b+A|0)>>>24|M<<8)|0)>>>25|A<<7;nEe.writeUint32LE(b+r|0,e,0),nEe.writeUint32LE(w+i|0,e,4),nEe.writeUint32LE(E+o|0,e,8),nEe.writeUint32LE(x+a|0,e,12),nEe.writeUint32LE(T+s|0,e,16),nEe.writeUint32LE(A+c|0,e,20),nEe.writeUint32LE(_+l|0,e,24),nEe.writeUint32LE(C+u|0,e,28),nEe.writeUint32LE(I+d|0,e,32),nEe.writeUint32LE(S+f|0,e,36),nEe.writeUint32LE(k+h|0,e,40),nEe.writeUint32LE(O+p|0,e,44),nEe.writeUint32LE(P+m|0,e,48),nEe.writeUint32LE(R+y|0,e,52),nEe.writeUint32LE(N+g|0,e,56),nEe.writeUint32LE(M+v|0,e,60)}function aEe(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 o,a;if(0===i){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");a=(o=new Uint8Array(16)).length-t.length,o.set(t,a)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");o=t,a=i}for(var s=new Uint8Array(64),c=0;c<n.length;c+=64){oEe(s,o,e);for(var l=c;l<c+64&&l<n.length;l++)r[l]=n[l]^s[l-c];sEe(o,0,a)}return rEe.wipe(s),0===i&&rEe.wipe(o),r}function sEe(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")}jwe.streamXOR=aEe,jwe.stream=function(e,t,n,r){return void 0===r&&(r=0),rEe.wipe(n),aEe(e,t,n,n,r)};var cEe={},lEe={};function uEe(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(lEe,"__esModule",{value:!0}),lEe.select=function(e,t,n){return~(e-1)&t|e-1&n},lEe.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},lEe.compare=uEe,lEe.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==uEe(e,t)},function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=lEe,n=tEe;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 o=t[6]|t[7]<<8;this._r[3]=8191&(i>>>7|o<<9);var a=t[8]|t[9]<<8;this._r[4]=255&(o>>>4|a<<12),this._r[5]=a>>>1&8190;var s=t[10]|t[11]<<8;this._r[6]=8191&(a>>>14|s<<2);var c=t[12]|t[13]<<8;this._r[7]=8065&(s>>>11|c<<5);var l=t[14]|t[15]<<8;this._r[8]=8191&(c>>>8|l<<8),this._r[9]=l>>>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],o=this._h[1],a=this._h[2],s=this._h[3],c=this._h[4],l=this._h[5],u=this._h[6],d=this._h[7],f=this._h[8],h=this._h[9],p=this._r[0],m=this._r[1],y=this._r[2],g=this._r[3],v=this._r[4],b=this._r[5],w=this._r[6],E=this._r[7],x=this._r[8],T=this._r[9];n>=16;){var A=e[t+0]|e[t+1]<<8;i+=8191&A;var _=e[t+2]|e[t+3]<<8;o+=8191&(A>>>13|_<<3);var C=e[t+4]|e[t+5]<<8;a+=8191&(_>>>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),l+=S>>>1&8191;var k=e[t+10]|e[t+11]<<8;u+=8191&(S>>>14|k<<2);var O=e[t+12]|e[t+13]<<8;d+=8191&(k>>>11|O<<5);var P=e[t+14]|e[t+15]<<8,R=0,N=R;N+=i*p,N+=o*(5*T),N+=a*(5*x),N+=s*(5*E),R=(N+=c*(5*w))>>>13,N&=8191,N+=l*(5*b),N+=u*(5*v),N+=d*(5*g),N+=(f+=8191&(O>>>8|P<<8))*(5*y);var M=R+=(N+=(h+=P>>>5|r)*(5*m))>>>13;M+=i*m,M+=o*p,M+=a*(5*T),M+=s*(5*x),R=(M+=c*(5*E))>>>13,M&=8191,M+=l*(5*w),M+=u*(5*b),M+=d*(5*v),M+=f*(5*g),R+=(M+=h*(5*y))>>>13,M&=8191;var D=R;D+=i*y,D+=o*m,D+=a*p,D+=s*(5*T),R=(D+=c*(5*x))>>>13,D&=8191,D+=l*(5*E),D+=u*(5*w),D+=d*(5*b),D+=f*(5*v);var L=R+=(D+=h*(5*g))>>>13;L+=i*g,L+=o*y,L+=a*m,L+=s*p,R=(L+=c*(5*T))>>>13,L&=8191,L+=l*(5*x),L+=u*(5*E),L+=d*(5*w),L+=f*(5*b);var F=R+=(L+=h*(5*v))>>>13;F+=i*v,F+=o*g,F+=a*y,F+=s*m,R=(F+=c*p)>>>13,F&=8191,F+=l*(5*T),F+=u*(5*x),F+=d*(5*E),F+=f*(5*w);var B=R+=(F+=h*(5*b))>>>13;B+=i*b,B+=o*v,B+=a*g,B+=s*y,R=(B+=c*m)>>>13,B&=8191,B+=l*p,B+=u*(5*T),B+=d*(5*x),B+=f*(5*E);var U=R+=(B+=h*(5*w))>>>13;U+=i*w,U+=o*b,U+=a*v,U+=s*g,R=(U+=c*y)>>>13,U&=8191,U+=l*m,U+=u*p,U+=d*(5*T),U+=f*(5*x);var z=R+=(U+=h*(5*E))>>>13;z+=i*E,z+=o*w,z+=a*b,z+=s*v,R=(z+=c*g)>>>13,z&=8191,z+=l*y,z+=u*m,z+=d*p,z+=f*(5*T);var j=R+=(z+=h*(5*x))>>>13;j+=i*x,j+=o*E,j+=a*w,j+=s*b,R=(j+=c*v)>>>13,j&=8191,j+=l*g,j+=u*y,j+=d*m,j+=f*p;var H=R+=(j+=h*(5*T))>>>13;H+=i*T,H+=o*x,H+=a*E,H+=s*w,R=(H+=c*b)>>>13,H&=8191,H+=l*v,H+=u*g,H+=d*y,H+=f*m,i=N=8191&(R=(R=((R+=(H+=h*p)>>>13)<<2)+R|0)+(N&=8191)|0),o=M+=R>>>=13,a=D&=8191,s=L&=8191,c=F&=8191,l=B&=8191,u=U&=8191,d=z&=8191,f=j&=8191,h=H&=8191,t+=16,n-=16}this._h[0]=i,this._h[1]=o,this._h[2]=a,this._h[3]=s,this._h[4]=c,this._h[5]=l,this._h[6]=u,this._h[7]=d,this._h[8]=f,this._h[9]=h},t.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,i,o,a=new Uint16Array(10);if(this._leftover){for(o=this._leftover,this._buffer[o++]=1;o<16;o++)this._buffer[o]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,o=2;o<10;o++)this._h[o]+=n,n=this._h[o]>>>13,this._h[o]&=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,a[0]=this._h[0]+5,n=a[0]>>>13,a[0]&=8191,o=1;o<10;o++)a[o]=this._h[o]+n,n=a[o]>>>13,a[o]&=8191;for(a[9]-=8192,r=(1^n)-1,o=0;o<10;o++)a[o]&=r;for(r=~r,o=0;o<10;o++)this._h[o]=this._h[o]&r|a[o];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,o=1;o<8;o++)i=(this._h[o]+this._pad[o]|0)+(i>>>16)|0,this._h[o]=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)}}(cEe),function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=jwe,n=cEe,r=tEe,i=Hwe,o=lEe;e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var a=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,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var a=new Uint8Array(16);a.set(e,a.length-e.length);var s=new Uint8Array(32);t.stream(this._key,a,s,4);var c,l=n.length+this.tagLength;if(o){if(o.length!==l)throw new Error("ChaCha20Poly1305: incorrect destination length");c=o}else c=new Uint8Array(l);return t.streamXOR(this._key,a,n,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),s,c.subarray(0,c.length-this.tagLength),i),r.wipe(a),c},s.prototype.open=function(e,n,i,a){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 l=new Uint8Array(this.tagLength);if(this._authenticate(l,c,n.subarray(0,n.length-this.tagLength),i),!o.equal(l,n.subarray(n.length-this.tagLength,n.length)))return null;var u,d=n.length-this.tagLength;if(a){if(a.length!==d)throw new Error("ChaCha20Poly1305: incorrect destination length");u=a}else u=new Uint8Array(d);return t.streamXOR(this._key,s,n.subarray(0,n.length-this.tagLength),u,4),r.wipe(s),u},s.prototype.clean=function(){return r.wipe(this._key),this},s.prototype._authenticate=function(e,t,o,s){var c=new n.Poly1305(t);s&&(c.update(s),s.length%16>0&&c.update(a.subarray(s.length%16))),c.update(o),o.length%16>0&&c.update(a.subarray(o.length%16));var l=new Uint8Array(8);s&&i.writeUint64LE(s.length,l),c.update(l),i.writeUint64LE(o.length,l),c.update(l);for(var u=c.digest(),d=0;d<u.length;d++)e[d]=u[d];c.clean(),r.wipe(u),r.wipe(l)},s}();e.ChaCha20Poly1305=s}(zwe);var dEe={},fEe={},hEe={};Object.defineProperty(hEe,"__esModule",{value:!0}),hEe.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState},Object.defineProperty(fEe,"__esModule",{value:!0});var pEe=hEe,mEe=lEe,yEe=tEe,gEe=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),pEe.isSerializableHash(this._inner)&&pEe.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),yEe.wipe(n)}return e.prototype.reset=function(){if(!pEe.isSerializableHash(this._inner)||!pEe.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(){pEe.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),pEe.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(!pEe.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(!pEe.isSerializableHash(this._inner)||!pEe.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(!pEe.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();fEe.HMAC=gEe,fEe.hmac=function(e,t,n){var r=new gEe(e,t);r.update(n);var i=r.digest();return r.clean(),i},fEe.equal=mEe.equal,Object.defineProperty(dEe,"__esModule",{value:!0});var vEe=fEe,bEe=tEe,wEe=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=vEe.hmac(this._hash,n,t);this._hmac=new vEe.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(),bEe.wipe(this._buffer),bEe.wipe(this._counter),this._bufpos=0},e}(),EEe=dEe.HKDF=wEe,xEe={},TEe={},AEe={};Object.defineProperty(AEe,"__esModule",{value:!0}),AEe.BrowserRandomSource=void 0;AEe.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 _Ee={};Object.defineProperty(_Ee,"__esModule",{value:!0}),_Ee.NodeRandomSource=void 0;const CEe=tEe;_Ee.NodeRandomSource=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,void 0!==VO){const e=KO;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,CEe.wipe)(t),n}},Object.defineProperty(TEe,"__esModule",{value:!0}),TEe.SystemRandomSource=void 0;const IEe=AEe,SEe=_Ee;TEe.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new IEe.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new SEe.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=TEe,n=Hwe,r=tEe;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 o=i(4,t),a=(0,n.readUint32LE)(o);return(0,r.wipe)(o),a};const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function a(t,n=o,a=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,l=256-256%c;for(;t>0;){const e=i(Math.ceil(256*t/l),a);for(let r=0;r<e.length&&t>0;r++){const i=e[r];i<l&&(s+=n.charAt(i%c),t--)}(0,r.wipe)(e)}return s}e.randomString=a,e.randomStringForEntropy=function(t,n=o,r=e.defaultRandomSource){return a(Math.ceil(t/(Math.log(n.length)/Math.LN2)),n,r)}}(xEe);var kEe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Hwe,n=tEe;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&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=o(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,a=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(a,this._buffer,s-4),o(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 o(e,n,r,o,a){for(;a>=64;){for(var s=n[0],c=n[1],l=n[2],u=n[3],d=n[4],f=n[5],h=n[6],p=n[7],m=0;m<16;m++){var y=o+4*m;e[m]=t.readUint32BE(r,y)}for(m=16;m<64;m++){var g=e[m-2],v=(g>>>17|g<<15)^(g>>>19|g<<13)^g>>>10,b=((g=e[m-15])>>>7|g<<25)^(g>>>18|g<<14)^g>>>3;e[m]=(v+e[m-7]|0)+(b+e[m-16]|0)}for(m=0;m<64;m++){v=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&f^~d&h)|0)+(p+(i[m]+e[m]|0)|0)|0,b=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&c^s&l^c&l)|0;p=h,h=f,f=d,d=u+v|0,u=l,l=c,c=s,s=v+b|0}n[0]+=s,n[1]+=c,n[2]+=l,n[3]+=u,n[4]+=d,n[5]+=f,n[6]+=h,n[7]+=p,o+=64,a-=64}return o}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}}(kEe);var OEe={};function PEe(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function REe(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?PEe(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function NEe(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const n=REe(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return PEe(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=xEe,n=tEe;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 o=r([56129,1]);function a(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 l(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function u(e,t,n){let r,i,o=0,a=0,s=0,c=0,l=0,u=0,d=0,f=0,h=0,p=0,m=0,y=0,g=0,v=0,b=0,w=0,E=0,x=0,T=0,A=0,_=0,C=0,I=0,S=0,k=0,O=0,P=0,R=0,N=0,M=0,D=0,L=n[0],F=n[1],B=n[2],U=n[3],z=n[4],j=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],Z=n[14],J=n[15];r=t[0],o+=r*L,a+=r*F,s+=r*B,c+=r*U,l+=r*z,u+=r*j,d+=r*H,f+=r*W,h+=r*V,p+=r*G,m+=r*q,y+=r*K,g+=r*X,v+=r*Y,b+=r*Z,w+=r*J,r=t[1],a+=r*L,s+=r*F,c+=r*B,l+=r*U,u+=r*z,d+=r*j,f+=r*H,h+=r*W,p+=r*V,m+=r*G,y+=r*q,g+=r*K,v+=r*X,b+=r*Y,w+=r*Z,E+=r*J,r=t[2],s+=r*L,c+=r*F,l+=r*B,u+=r*U,d+=r*z,f+=r*j,h+=r*H,p+=r*W,m+=r*V,y+=r*G,g+=r*q,v+=r*K,b+=r*X,w+=r*Y,E+=r*Z,x+=r*J,r=t[3],c+=r*L,l+=r*F,u+=r*B,d+=r*U,f+=r*z,h+=r*j,p+=r*H,m+=r*W,y+=r*V,g+=r*G,v+=r*q,b+=r*K,w+=r*X,E+=r*Y,x+=r*Z,T+=r*J,r=t[4],l+=r*L,u+=r*F,d+=r*B,f+=r*U,h+=r*z,p+=r*j,m+=r*H,y+=r*W,g+=r*V,v+=r*G,b+=r*q,w+=r*K,E+=r*X,x+=r*Y,T+=r*Z,A+=r*J,r=t[5],u+=r*L,d+=r*F,f+=r*B,h+=r*U,p+=r*z,m+=r*j,y+=r*H,g+=r*W,v+=r*V,b+=r*G,w+=r*q,E+=r*K,x+=r*X,T+=r*Y,A+=r*Z,_+=r*J,r=t[6],d+=r*L,f+=r*F,h+=r*B,p+=r*U,m+=r*z,y+=r*j,g+=r*H,v+=r*W,b+=r*V,w+=r*G,E+=r*q,x+=r*K,T+=r*X,A+=r*Y,_+=r*Z,C+=r*J,r=t[7],f+=r*L,h+=r*F,p+=r*B,m+=r*U,y+=r*z,g+=r*j,v+=r*H,b+=r*W,w+=r*V,E+=r*G,x+=r*q,T+=r*K,A+=r*X,_+=r*Y,C+=r*Z,I+=r*J,r=t[8],h+=r*L,p+=r*F,m+=r*B,y+=r*U,g+=r*z,v+=r*j,b+=r*H,w+=r*W,E+=r*V,x+=r*G,T+=r*q,A+=r*K,_+=r*X,C+=r*Y,I+=r*Z,S+=r*J,r=t[9],p+=r*L,m+=r*F,y+=r*B,g+=r*U,v+=r*z,b+=r*j,w+=r*H,E+=r*W,x+=r*V,T+=r*G,A+=r*q,_+=r*K,C+=r*X,I+=r*Y,S+=r*Z,k+=r*J,r=t[10],m+=r*L,y+=r*F,g+=r*B,v+=r*U,b+=r*z,w+=r*j,E+=r*H,x+=r*W,T+=r*V,A+=r*G,_+=r*q,C+=r*K,I+=r*X,S+=r*Y,k+=r*Z,O+=r*J,r=t[11],y+=r*L,g+=r*F,v+=r*B,b+=r*U,w+=r*z,E+=r*j,x+=r*H,T+=r*W,A+=r*V,_+=r*G,C+=r*q,I+=r*K,S+=r*X,k+=r*Y,O+=r*Z,P+=r*J,r=t[12],g+=r*L,v+=r*F,b+=r*B,w+=r*U,E+=r*z,x+=r*j,T+=r*H,A+=r*W,_+=r*V,C+=r*G,I+=r*q,S+=r*K,k+=r*X,O+=r*Y,P+=r*Z,R+=r*J,r=t[13],v+=r*L,b+=r*F,w+=r*B,E+=r*U,x+=r*z,T+=r*j,A+=r*H,_+=r*W,C+=r*V,I+=r*G,S+=r*q,k+=r*K,O+=r*X,P+=r*Y,R+=r*Z,N+=r*J,r=t[14],b+=r*L,w+=r*F,E+=r*B,x+=r*U,T+=r*z,A+=r*j,_+=r*H,C+=r*W,I+=r*V,S+=r*G,k+=r*q,O+=r*K,P+=r*X,R+=r*Y,N+=r*Z,M+=r*J,r=t[15],w+=r*L,E+=r*F,x+=r*B,T+=r*U,A+=r*z,_+=r*j,C+=r*H,I+=r*W,S+=r*V,k+=r*G,O+=r*q,P+=r*K,R+=r*X,N+=r*Y,M+=r*Z,D+=r*J,o+=38*E,a+=38*x,s+=38*T,c+=38*A,l+=38*_,u+=38*C,d+=38*I,f+=38*S,h+=38*k,p+=38*O,m+=38*P,y+=38*R,g+=38*N,v+=38*M,b+=38*D,i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=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=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=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=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=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=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=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,o+=i-1+37*(i-1),i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=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=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=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=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=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=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=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=s,e[3]=c,e[4]=l,e[5]=u,e[6]=d,e[7]=f,e[8]=h,e[9]=p,e[10]=m,e[11]=y,e[12]=g,e[13]=v,e[14]=b,e[15]=w}function d(e,t){u(e,t,t)}function f(e,t){const n=new Uint8Array(32),i=new Float64Array(80),f=r(),h=r(),p=r(),m=r(),y=r(),g=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++)h[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,h,t),s(p,m,t),c(y,f,p),l(f,f,p),c(p,h,m),l(h,h,m),d(m,y),d(g,f),u(f,p,f),u(p,h,y),c(y,f,p),l(f,f,p),d(h,f),l(p,m,g),u(f,p,o),c(f,f,m),u(p,p,f),u(f,m,g),u(m,h,i),d(h,y),s(f,h,t),s(p,m,t)}for(let e=0;e<16;e++)i[e+16]=f[e],i[e+32]=p[e],i[e+48]=h[e],i[e+64]=m[e];const v=i.subarray(32),b=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&&u(n,n,t);for(let t=0;t<16;t++)e[t]=n[t]}(v,v),u(b,b,v);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];a(i),a(i),a(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,b),w}function h(e){return f(e,i)}function p(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:h(n),secretKey:n}}e.scalarMult=f,e.scalarMultBase=h,e.generateKeyPairFromSeed=p,e.generateKeyPair=function(e){const r=(0,t.randomBytes)(32,e),i=p(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}}(OEe);var MEe=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 o=e.charAt(i),a=o.charCodeAt(0);if(255!==n[a])throw new TypeError(o+" is ambiguous");n[a]=i}var s=e.length,c=e.charAt(0),l=Math.log(s)/Math.log(256),u=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 o=(e.length-t)*l+1>>>0,a=new Uint8Array(o);e[t];){var u=n[e.charCodeAt(t)];if(255===u)return;for(var d=0,f=o-1;(0!==u||d<i)&&-1!==f;f--,d++)u+=s*a[f]>>>0,a[f]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var h=o-i;h!==o&&0===a[h];)h++;for(var p=new Uint8Array(r+(o-h)),m=r;h!==o;)p[m++]=a[h++];return p}}}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,o=t.length;i!==o&&0===t[i];)i++,n++;for(var a=(o-i)*u+1>>>0,l=new Uint8Array(a);i!==o;){for(var d=t[i],f=0,h=a-1;(0!==d||f<r)&&-1!==h;h--,f++)d+=256*l[h]>>>0,l[h]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");r=f,i++}for(var p=a-r;p!==a&&0===l[p];)p++;for(var m=c.repeat(n);p<a;++p)m+=e.charAt(l[p]);return m},decodeUnsafe:d,decode:function(e){var n=d(e);if(n)return n;throw new Error(`Non-${t} character`)}}},DEe=MEe;class LEe{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 FEe{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 UEe(this,e)}}class BEe{constructor(e){this.decoders=e}or(e){return UEe(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 UEe=(e,t)=>new BEe({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class zEe{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new LEe(e,t,n),this.decoder=new FEe(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const jEe=({name:e,prefix:t,encode:n,decode:r})=>new zEe(e,t,n,r),HEe=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=DEe(n,t);return jEe({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))})},WEe=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>jEe({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let o="",a=0,s=0;for(let r=0;r<e.length;++r)for(s=s<<8|e[r],a+=8;a>n;)a-=n,o+=t[i&s>>a];if(a&&(o+=t[i&s<<n-a]),r)for(;o.length*n&7;)o+="=";return o})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const a=new Uint8Array(o*n/8|0);let s=0,c=0,l=0;for(let t=0;t<o;++t){const o=i[e[t]];if(void 0===o)throw new SyntaxError(`Non-${r} character`);c=c<<n|o,s+=n,s>=8&&(s-=8,a[l++]=255&c>>s)}if(s>=n||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return a})(t,r,n,e)}),VEe=jEe({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var GEe=Object.freeze({__proto__:null,identity:VEe});const qEe=WEe({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var KEe=Object.freeze({__proto__:null,base2:qEe});const XEe=WEe({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var YEe=Object.freeze({__proto__:null,base8:XEe});const ZEe=HEe({prefix:"9",name:"base10",alphabet:"0123456789"});var JEe=Object.freeze({__proto__:null,base10:ZEe});const QEe=WEe({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),$Ee=WEe({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var exe=Object.freeze({__proto__:null,base16:QEe,base16upper:$Ee});const txe=WEe({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),nxe=WEe({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),rxe=WEe({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),ixe=WEe({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),oxe=WEe({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),axe=WEe({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),sxe=WEe({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),cxe=WEe({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),lxe=WEe({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var uxe=Object.freeze({__proto__:null,base32:txe,base32hex:oxe,base32hexpad:sxe,base32hexpadupper:cxe,base32hexupper:axe,base32pad:rxe,base32padupper:ixe,base32upper:nxe,base32z:lxe});const dxe=HEe({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),fxe=HEe({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var hxe=Object.freeze({__proto__:null,base36:dxe,base36upper:fxe});const pxe=HEe({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),mxe=HEe({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var yxe=Object.freeze({__proto__:null,base58btc:pxe,base58flickr:mxe});const gxe=WEe({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),vxe=WEe({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),bxe=WEe({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),wxe=WEe({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Exe=Object.freeze({__proto__:null,base64:gxe,base64pad:vxe,base64url:bxe,base64urlpad:wxe});const xxe=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Txe=xxe.reduce(((e,t,n)=>(e[n]=t,e)),[]),Axe=xxe.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const _xe=jEe({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=Txe[t]),"")},decode:function(e){const t=[];for(const n of e){const e=Axe[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var Cxe=Object.freeze({__proto__:null,base256emoji:_xe});new TextEncoder,new TextDecoder;const Ixe={...GEe,...KEe,...YEe,...JEe,...exe,...uxe,...hxe,...yxe,...Exe,...Cxe};function Sxe(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const kxe=Sxe("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),Oxe=Sxe("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{const t=REe((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),Pxe={utf8:kxe,"utf-8":kxe,hex:Ixe.base16,latin1:Oxe,ascii:Oxe,binary:Oxe,...Ixe};function Rxe(e,t="utf8"){const n=Pxe[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}`):PEe(globalThis.Buffer.from(e,"utf-8"))}function Nxe(e,t="utf8"){const n=Pxe[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 Mxe=window&&window.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;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))},Dxe=function(e,t,n){this.name=e,this.version=t,this.os=n,this.type="browser"},Lxe=function(e){this.version=e,this.type="node",this.name="node",this.os=process.platform},Fxe=function(e,t,n,r){this.name=e,this.version=t,this.os=n,this.bot=r,this.type="bot-device"},Bxe=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},Uxe=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},zxe=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,jxe=3,Hxe=[["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/]],Wxe=[["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 Vxe(e){return e?Gxe(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new Uxe:"undefined"!=typeof navigator?Gxe(navigator.userAgent):function(){var e="undefined"!=typeof process&&process.version;return e?new Lxe(process.version.slice(1)):null}()}function Gxe(e){var t=function(e){return""!==e&&Hxe.reduce((function(t,n){var r=n[0],i=n[1];if(t)return t;var o=i.exec(e);return!!o&&[r,o]}),!1)}(e);if(!t)return null;var n=t[0],r=t[1];if("searchbot"===n)return new Bxe;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length<jxe&&(i=Mxe(Mxe([],i,!0),function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(jxe-i.length),!0)):i=[];var o=i.join("."),a=function(e){for(var t=0,n=Wxe.length;t<n;t++){var r=Wxe[t],i=r[0];if(r[1].exec(e))return i}return null}(e),s=zxe.exec(e);return s&&s[1]?new Fxe(n,o,a,s[1]):new Dxe(n,o,a)}var qxe,Kxe={},Xxe=dt(Yle),Yxe={},Zxe={};var Jxe,Qxe={},$xe={},eTe={};var tTe,nTe,rTe,iTe,oTe={};function aTe(){return nTe||(nTe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Xxe;t.__exportStar((Jxe||(Jxe=1,Object.defineProperty(eTe,"__esModule",{value:!0}),eTe.ONE_THOUSAND=eTe.ONE_HUNDRED=void 0,eTe.ONE_HUNDRED=100,eTe.ONE_THOUSAND=1e3),eTe),e),t.__exportStar((tTe||(tTe=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}(oTe)),oTe),e)}($xe)),$xe}function sTe(){return iTe||(iTe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Xxe;t.__exportStar((qxe||(qxe=1,Object.defineProperty(Zxe,"__esModule",{value:!0}),Zxe.delay=void 0,Zxe.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}),Zxe),e),t.__exportStar(function(){if(rTe)return Qxe;rTe=1,Object.defineProperty(Qxe,"__esModule",{value:!0}),Qxe.fromMiliseconds=Qxe.toMiliseconds=void 0;const e=aTe();return Qxe.toMiliseconds=function(t){return t*e.ONE_THOUSAND},Qxe.fromMiliseconds=function(t){return Math.floor(t/e.ONE_THOUSAND)},Qxe}(),e)}(Yxe)),Yxe}var cTe,lTe={};var uTe,dTe,fTe={},hTe={};function pTe(){return dTe||(dTe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});Xxe.__exportStar((uTe||(uTe=1,Object.defineProperty(hTe,"__esModule",{value:!0}),hTe.IWatch=void 0,hTe.IWatch=class{}),hTe),e)}(fTe)),fTe}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Xxe;t.__exportStar(sTe(),e),t.__exportStar(function(){if(cTe)return lTe;cTe=1,Object.defineProperty(lTe,"__esModule",{value:!0}),lTe.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 lTe.Watch=e,lTe.default=e,lTe}(),e),t.__exportStar(pTe(),e),t.__exportStar(aTe(),e)}(Kxe);var mTe={};function yTe(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function gTe(e){const t=yTe(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(mTe,"__esModule",{value:!0}),mTe.getLocalStorage=mTe.getLocalStorageOrThrow=mTe.getCrypto=mTe.getCryptoOrThrow=wTe=mTe.getLocation=mTe.getLocationOrThrow=bTe=mTe.getNavigator=mTe.getNavigatorOrThrow=vTe=mTe.getDocument=mTe.getDocumentOrThrow=mTe.getFromWindowOrThrow=mTe.getFromWindow=void 0,mTe.getFromWindow=yTe,mTe.getFromWindowOrThrow=gTe,mTe.getDocumentOrThrow=function(){return gTe("document")};var vTe=mTe.getDocument=function(){return yTe("document")};mTe.getNavigatorOrThrow=function(){return gTe("navigator")};var bTe=mTe.getNavigator=function(){return yTe("navigator")};mTe.getLocationOrThrow=function(){return gTe("location")};var wTe=mTe.getLocation=function(){return yTe("location")};mTe.getCryptoOrThrow=function(){return gTe("crypto")},mTe.getCrypto=function(){return yTe("crypto")},mTe.getLocalStorageOrThrow=function(){return gTe("localStorage")},mTe.getLocalStorage=function(){return yTe("localStorage")};var ETe={};Object.defineProperty(ETe,"__esModule",{value:!0});var xTe=ETe.getWindowMetadata=void 0;const TTe=mTe;xTe=ETe.getWindowMetadata=function(){let e,t;try{e=TTe.getDocumentOrThrow(),t=TTe.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"),o=t.origin,a=function(){const n=e.getElementsByTagName("link"),r=[];for(let e=0;e<n.length;e++){const i=n[e],o=i.getAttribute("rel");if(o&&o.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:o,icons:a,name:r}};var ATe={},_Te=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),CTe="%[a-f0-9]{2}",ITe=new RegExp("("+CTe+")|([^%]+?)","gi"),STe=new RegExp("("+CTe+")+","gi");function kTe(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([],kTe(n),kTe(r))}function OTe(e){try{return decodeURIComponent(e)}catch(r){for(var t=e.match(ITe)||[],n=1;n<t.length;n++)t=(e=kTe(t,n).join("")).match(ITe)||[];return e}}var PTe=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=STe.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=OTe(n[0]);r!==n[0]&&(t[n[0]]=r)}n=STe.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),o=0;o<i.length;o++){var a=i[o];e=e.replace(new RegExp(a,"g"),t[a])}return e}(e)}},RTe=(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)]},NTe=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var a=r[o],s=e[a];(i?-1!==t.indexOf(a):t(a,s,e))&&(n[a]=s)}return n};!function(e){const t=_Te,n=PTe,r=RTe,i=NTe,o=Symbol("encodeFragmentIdentifier");function a(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 l(e){return Array.isArray(e)?e.sort():"object"==typeof e?l(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function u(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function d(e){const t=(e=u(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 h(e,t){a((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),o="string"==typeof n&&!i&&c(n,e).includes(e.arrayFormatSeparator);n=o?c(n,e):n;const a=i||o?n.split(e.arrayFormatSeparator).map((t=>c(t,e))):null===n?n:c(n,e);r[t]=a};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 o=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>c(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],o):r[t]=o};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 o of e.split("&")){if(""===o)continue;let[e,a]=r(t.decode?o.replace(/\+/g," "):o,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:c(a,t),n(c(e,t),a,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]=l(n):e[t]=n,e}),Object.create(null))}e.extract=d,e.parse=h,e.stringify=(e,t)=>{if(!e)return"";a((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 o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.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:h(d(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:c(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[o]:!0},n);const r=u(t.url).split("?")[0]||"",i=e.extract(t.url),a=e.parse(i,{sort:!1}),c=Object.assign(a,t.query);let l=e.stringify(c,n);l&&(l=`?${l}`);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[o]?s(t.fragmentIdentifier,n):t.fragmentIdentifier}`),`${r}${l}${d}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[o]:!1},r);const{url:a,query:s,fragmentIdentifier:c}=e.parseUrl(t,r);return e.stringifyUrl({url:a,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)}}(ATe);const MTe={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"}},DTe=":";function LTe(e,t){return e.includes(":")?[e]:t.chains||[]}const FTe="base10",BTe="base16",UTe="base64pad",zTe="utf8",jTe=0,HTe=1,WTe=0,VTe=1,GTe=12,qTe=32;function KTe(){return Nxe(xEe.randomBytes(qTe),BTe)}function XTe(e){return Nxe(kEe.hash(Rxe(e,zTe)),BTe)}function YTe(e){return Number(Nxe(e,FTe))}function ZTe(e){const t=function(e){return Rxe(`${e}`,FTe)}(typeof e.type<"u"?e.type:jTe);if(YTe(t)===HTe&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof e.senderPublicKey<"u"?Rxe(e.senderPublicKey,BTe):void 0,r=typeof e.iv<"u"?Rxe(e.iv,BTe):xEe.randomBytes(GTe);return function(e){if(YTe(e.type)===HTe){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Nxe(NEe([e.type,e.senderPublicKey,e.iv,e.sealed]),UTe)}return Nxe(NEe([e.type,e.iv,e.sealed]),UTe)}({type:t,sealed:new zwe.ChaCha20Poly1305(Rxe(e.symKey,BTe)).seal(r,Rxe(e.message,zTe)),iv:r,senderPublicKey:n})}function JTe(e){const t=Rxe(e,UTe),n=t.slice(WTe,VTe),r=VTe;if(YTe(n)===HTe){const e=r+qTe,i=e+GTe,o=t.slice(r,e),a=t.slice(e,i);return{type:n,sealed:t.slice(i),iv:a,senderPublicKey:o}}const i=r+GTe,o=t.slice(r,i);return{type:n,sealed:t.slice(i),iv:o}}function QTe(e){const t=e?.type||jTe;if(t===HTe){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 $Te(e){return e.type===HTe&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var eAe=Object.defineProperty,tAe=Object.getOwnPropertySymbols,nAe=Object.prototype.hasOwnProperty,rAe=Object.prototype.propertyIsEnumerable,iAe=(e,t,n)=>t in e?eAe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oAe=(e,t)=>{for(var n in t||(t={}))nAe.call(t,n)&&iAe(e,n,t[n]);if(tAe)for(var n of tAe(t))rAe.call(t,n)&&iAe(e,n,t[n]);return e};const aAe="ReactNative",sAe={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},cAe="js";function lAe(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function uAe(){return!vTe()&&!!bTe()&&navigator.product===aAe}function dAe(){return!lAe()&&!!bTe()&&!!vTe()}function fAe(){return uAe()?sAe.reactNative:lAe()?sAe.node:dAe()?sAe.browser:sAe.unknown}function hAe(e,t,n){const r=function(){if(fAe()===sAe.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=Vxe();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=fAe();return t===sAe.browser?[t,(null==(e=wTe())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),[cAe,n].join("-"),r,i].join("/")}function pAe({protocol:e,version:t,relayUrl:n,sdkVersion:r,auth:i,projectId:o,useOnCloseEvent:a,bundleId:s}){const c=n.split("?"),l={auth:i,ua:hAe(e,t,r),projectId:o,useOnCloseEvent:a||void 0,origin:s||void 0},u=function(e,t){let n=ATe.parse(e);return n=oAe(oAe({},n),t),ATe.stringify(n)}(c[1]||"",l);return c[0]+"?"+u}function mAe(e,t){return e.filter((e=>t.includes(e))).length===e.length}function yAe(e){return Object.fromEntries(e.entries())}function gAe(e){return new Map(Object.entries(e))}function vAe(e=Kxe.FIVE_MINUTES,t){const n=Kxe.toMiliseconds(e||Kxe.FIVE_MINUTES);let r,i,o;return{resolve:e=>{o&&r&&(clearTimeout(o),r(e))},reject:e=>{o&&i&&(clearTimeout(o),i(e))},done:()=>new Promise(((e,a)=>{o=setTimeout((()=>{a(new Error(t))}),n),r=e,i=a}))}}function bAe(e,t,n){return new Promise((async(r,i)=>{const o=setTimeout((()=>i(new Error(n))),t);try{r(await e)}catch(e){i(e)}clearTimeout(o)}))}function wAe(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 EAe(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 xAe(e,t){return Kxe.fromMiliseconds((t||Date.now())+Kxe.toMiliseconds(e))}function TAe(e){return Date.now()>=Kxe.toMiliseconds(e)}function AAe(e,t){return`${e}${t?`:${t}`:""}`}function _Ae(e=[],t=[]){return[...new Set([...e,...t])]}function CAe(e){return e?.relay||{protocol:"irn"}}function IAe(e){const t=MTe[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var SAe=Object.defineProperty,kAe=Object.defineProperties,OAe=Object.getOwnPropertyDescriptors,PAe=Object.getOwnPropertySymbols,RAe=Object.prototype.hasOwnProperty,NAe=Object.prototype.propertyIsEnumerable,MAe=(e,t,n)=>t in e?SAe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function DAe(e,t="-"){const n={},r="relay"+t;return Object.keys(e).forEach((t=>{if(t.startsWith(r)){const i=t.replace(r,""),o=e[t];n[i]=o}})),n}function LAe(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("@"),o=typeof n<"u"?e.substring(n):"",a=ATe.parse(o);return{protocol:r,topic:FAe(i[0]),version:parseInt(i[1],10),symKey:a.symKey,relay:DAe(a),expiryTimestamp:a.expiryTimestamp?parseInt(a.expiryTimestamp,10):void 0}}function FAe(e){return e.startsWith("//")?e.substring(2):e}function BAe(e){return`${e.protocol}:${e.topic}@${e.version}?`+ATe.stringify(((e,t)=>kAe(e,OAe(t)))(((e,t)=>{for(var n in t||(t={}))RAe.call(t,n)&&MAe(e,n,t[n]);if(PAe)for(var n of PAe(t))NAe.call(t,n)&&MAe(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 UAe(e){const t=[];return e.forEach((e=>{const[n,r]=e.split(":");t.push(`${n}:${r}`)})),t}function zAe(e){return e.includes(":")}function jAe(e){return zAe(e)?e.split(":")[0]:e}const HAe={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}},WAe={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 VAe(e,t){const{message:n,code:r}=WAe[e];return{message:t?`${n} ${t}`:n,code:r}}function GAe(e,t){const{message:n,code:r}=HAe[e];return{message:t?`${n} ${t}`:n,code:r}}function qAe(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function KAe(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function XAe(e){return typeof e>"u"}function YAe(e,t){return!(!t||!XAe(e))||"string"==typeof e&&!!e.trim().length}function ZAe(e,t){return!(!t||!XAe(e))||"number"==typeof e&&!isNaN(e)}function JAe(e){return!(!YAe(e,!1)||!e.includes(":"))&&2===e.split(":").length}function QAe(e){let t=!0;return qAe(e)?e.length&&(t=e.every((e=>YAe(e,!1)))):t=!1,t}function $Ae(e,t,n){let r=null;return Object.entries(e).forEach((([e,i])=>{if(r)return;const o=function(e,t,n){let r=null;return qAe(t)&&t.length?t.forEach((e=>{r||JAe(e)||(r=GAe("UNSUPPORTED_CHAINS",`${n}, chain ${e} should be a string and conform to "namespace:chainId" format`))})):JAe(e)||(r=GAe("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,LTe(e,i),`${t} ${n}`);o&&(r=o)})),r}function e_e(e,t){let n=null;return qAe(e)?e.forEach((e=>{n||function(e){if(YAe(e,!1)&&e.includes(":")){const t=e.split(":");if(3===t.length){const e=t[0]+":"+t[1];return!!t[2]&&JAe(e)}}return!1}(e)||(n=GAe("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):n=GAe("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function t_e(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=function(e,t){let n=null;return QAe(e?.methods)?QAe(e?.events)||(n=GAe("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):n=GAe("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 n_e(e,t){let n=null;if(e&&KAe(e)){const r=t_e(e,t);r&&(n=r);const i=function(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=e_e(e?.accounts,`${t} namespace`);r&&(n=r)})),n}(e,t);i&&(n=i)}else n=VAe("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return n}function r_e(e){return YAe(e.protocol,!0)}function i_e(e){return typeof e<"u"&&null!==typeof e}function o_e(e,t){return!(!JAe(t)||!function(e){const t=[];return Object.values(e).forEach((e=>{t.push(...UAe(e.accounts))})),t}(e).includes(t))}function a_e(e,t,n){return!!YAe(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{UAe(e.accounts).includes(t)&&n.push(...e.methods)})),n}(e,t).includes(n)}function s_e(e,t,n){return!!YAe(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{UAe(e.accounts).includes(t)&&n.push(...e.events)})),n}(e,t).includes(n)}function c_e(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),o=function(e){const t={};return Object.keys(e).forEach((n=>{if(n.includes(":"))t[n]=e[n];else{const r=UAe(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),a=Object.keys(i),s=Object.keys(o),c=l_e(Object.keys(e)),l=l_e(Object.keys(t)),u=c.filter((e=>!l.includes(e)));return u.length&&(r=VAe("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.\n Required: ${u.toString()}\n Received: ${Object.keys(t).toString()}`)),mAe(a,s)||(r=VAe("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.\n Required: ${a.toString()}\n Approved: ${s.toString()}`)),Object.keys(t).forEach((e=>{if(!e.includes(":")||r)return;const i=UAe(t[e].accounts);i.includes(e)||(r=VAe("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${e}\n Required: ${e}\n Approved: ${i.toString()}`))})),a.forEach((e=>{r||(mAe(i[e].methods,o[e].methods)?mAe(i[e].events,o[e].events)||(r=VAe("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${e}`)):r=VAe("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${e}`))})),r}function l_e(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}function u_e(){const e=fAe();return new Promise((t=>{switch(e){case sAe.browser:t(dAe()&&navigator?.onLine);break;case sAe.reactNative:t(async function(){if(uAe()&&typeof global<"u"&&null!=global&&global.NetInfo){const e=await(null==global?void 0:global.NetInfo.fetch());return e?.isConnected}return!0}());break;case sAe.node:default:t(!0)}}))}function d_e(e){switch(fAe()){case sAe.browser:!function(e){!uAe()&&dAe()&&(window.addEventListener("online",(()=>e(!0))),window.addEventListener("offline",(()=>e(!1))))}(e);break;case sAe.reactNative:!function(e){uAe()&&typeof global<"u"&&null!=global&&global.NetInfo&&global?.NetInfo.addEventListener((t=>e(t?.isConnected)))}(e)}}const f_e={};let h_e=class{static get(e){return f_e[e]}static set(e,t){f_e[e]=t}static delete(e){delete f_e[e]}};const p_e=/"(?:_|\\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*:/,m_e=/"(?: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*:/,y_e=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function g_e(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 v_e(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(!y_e.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(p_e.test(e)||m_e.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,g_e)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}function b_e(e,...t){try{return(n=e(...t))&&"function"==typeof n.then?n:Promise.resolve(n)}catch(e){return Promise.reject(e)}var n}function w_e(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 w_e(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function E_e(){if(void 0===typeof Buffer)throw new TypeError("[unstorage] Buffer is not supported!")}const x_e="base64:";function T_e(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function A_e(...e){return T_e(e.join(":"))}function __e(e){return(e=T_e(e))?e+":":""}const C_e=()=>{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 I_e(e={}){const t={mounts:{"":e.driver||C_e()},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=T_e(n);for(const r of t.watchListeners)r(e,n)}},o=async()=>{if(t.watching){for(const e in t.unwatch)await t.unwatch[e]();t.unwatch={},t.watching=!1}},a=(e,t,r)=>{const i=new Map,o=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=T_e(e?r:r.key),a=e?void 0:r.value,s=e||!r.options?t:{...t,...r.options},c=n(i);o(c).items.push({key:i,value:a,relativeKey:c.relativeKey,options:s})}return Promise.all([...i.values()].map((e=>r(e)))).then((e=>e.flat()))},s={hasItem(e,t={}){e=T_e(e);const{relativeKey:r,driver:i}=n(e);return b_e(i.hasItem,r,t)},getItem(e,t={}){e=T_e(e);const{relativeKey:r,driver:i}=n(e);return b_e(i.getItem,r,t).then((e=>v_e(e)))},getItems:(e,t)=>a(e,t,(e=>e.driver.getItems?b_e(e.driver.getItems,e.items.map((e=>({key:e.relativeKey,options:e.options}))),t).then((t=>t.map((t=>({key:A_e(e.base,t.key),value:v_e(t.value)}))))):Promise.all(e.items.map((t=>b_e(e.driver.getItem,t.relativeKey,t.options).then((e=>({key:t.key,value:v_e(e)})))))))),getItemRaw(e,t={}){e=T_e(e);const{relativeKey:r,driver:i}=n(e);return i.getItemRaw?b_e(i.getItemRaw,r,t):b_e(i.getItem,r,t).then((e=>function(e){return"string"!=typeof e?e:e.startsWith(x_e)?(E_e(),Buffer.from(e.slice(x_e.length),"base64")):e}(e)))},async setItem(e,t,r={}){if(void 0===t)return s.removeItem(e);e=T_e(e);const{relativeKey:o,driver:a}=n(e);a.setItem&&(await b_e(a.setItem,o,w_e(t),r),a.watch||i("update",e))},async setItems(e,t){await a(e,t,(async e=>{e.driver.setItems&&await b_e(e.driver.setItems,e.items.map((e=>({key:e.relativeKey,value:w_e(e.value),options:e.options}))),t),e.driver.setItem&&await Promise.all(e.items.map((t=>b_e(e.driver.setItem,t.relativeKey,w_e(t.value),t.options))))}))},async setItemRaw(e,t,r={}){if(void 0===t)return s.removeItem(e,r);e=T_e(e);const{relativeKey:o,driver:a}=n(e);if(a.setItemRaw)await b_e(a.setItemRaw,o,t,r);else{if(!a.setItem)return;await b_e(a.setItem,o,function(e){if("string"==typeof e)return e;E_e();const t=Buffer.from(e).toString("base64");return x_e+t}(t),r)}a.watch||i("update",e)},async removeItem(e,t={}){"boolean"==typeof t&&(t={removeMeta:t}),e=T_e(e);const{relativeKey:r,driver:o}=n(e);o.removeItem&&(await b_e(o.removeItem,r,t),(t.removeMeta||t.removeMata)&&await b_e(o.removeItem,r+"$",t),o.watch||i("remove",e))},async getMeta(e,t={}){"boolean"==typeof t&&(t={nativeOnly:t}),e=T_e(e);const{relativeKey:r,driver:i}=n(e),o=Object.create(null);if(i.getMeta&&Object.assign(o,await b_e(i.getMeta,r,t)),!t.nativeOnly){const e=await b_e(i.getItem,r+"$",t).then((e=>v_e(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(o,e))}return o},setMeta(e,t,n={}){return this.setItem(e+"$",t,n)},removeMeta(e,t={}){return this.removeItem(e+"$",t)},async getKeys(e,t={}){e=__e(e);const n=r(e,!0);let i=[];const o=[];for(const e of n){const n=(await b_e(e.driver.getKeys,e.relativeBase,t)).map((t=>e.mountpoint+T_e(t))).filter((e=>!i.some((t=>e.startsWith(t)))));o.push(...n),i=[e.mountpoint,...i.filter((t=>!t.startsWith(e.mountpoint)))]}return e?o.filter((t=>t.startsWith(e)&&!t.endsWith("$"))):o.filter((e=>!e.endsWith("$")))},async clear(e,t={}){e=__e(e),await Promise.all(r(e,!1).map((async e=>{if(e.driver.clear)return b_e(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=>k_e(e))))},watch:async e=>(await(async()=>{if(!t.watching){t.watching=!0;for(const e in t.mounts)t.unwatch[e]=await S_e(t.mounts[e],i,e)}})(),t.watchListeners.push(e),async()=>{t.watchListeners=t.watchListeners.filter((t=>t!==e)),0===t.watchListeners.length&&await o()}),async unwatch(){t.watchListeners=[],await o()},mount(e,n){if((e=__e(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(S_e(n,i,e)).then((n=>{t.unwatch[e]=n})).catch(console.error),s},async unmount(e,n=!0){(e=__e(e))&&t.mounts[e]&&(t.watching&&e in t.unwatch&&(t.unwatch[e](),delete t.unwatch[e]),n&&await k_e(t.mounts[e]),t.mountpoints=t.mountpoints.filter((t=>t!==e)),delete t.mounts[e])},getMount(e=""){e=T_e(e)+":";const t=n(e);return{driver:t.driver,base:t.base}},getMounts(e="",t={}){e=T_e(e);return r(e,t.parents).map((e=>({driver:e.driver,base:e.mountpoint})))}};return s}function S_e(e,t,n){return e.watch?e.watch(((e,r)=>t(e,n+r))):()=>{}}async function k_e(e){"function"==typeof e.dispose&&await b_e(e.dispose)}function O_e(e){return new Promise(((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)}))}function P_e(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=O_e(n);return(e,n)=>r.then((r=>n(r.transaction(t,e).objectStore(t))))}let R_e;function N_e(){return R_e||(R_e=P_e("keyval-store","keyval")),R_e}function M_e(e,t=N_e()){return t("readonly",(t=>O_e(t.get(e))))}function D_e(e=N_e()){return e("readonly",(e=>{if(e.getAllKeys)return O_e(e.getAllKeys());const t=[];return function(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},O_e(e.transaction)}(e,(e=>t.push(e.key))).then((()=>t))}))}const L_e=e=>JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString()+"n":t)),F_e=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 B_e(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return F_e(e)}catch(t){return e}}function U_e(e){return"string"==typeof e?e:L_e(e)||""}var z_e=(e={})=>{const t=e.base&&e.base.length>0?`${e.base}:`:"",n=e=>t+e;let r;return e.dbName&&e.storeName&&(r=P_e(e.dbName,e.storeName)),{name:"idb-keyval",options:e,hasItem:async e=>!(typeof await M_e(n(e),r)>"u"),getItem:async e=>await M_e(n(e),r)??null,setItem:(e,t)=>function(e,t,n=N_e()){return n("readwrite",(n=>(n.put(t,e),O_e(n.transaction))))}(n(e),t,r),removeItem:e=>function(e,t=N_e()){return t("readwrite",(t=>(t.delete(e),O_e(t.transaction))))}(n(e),r),getKeys:()=>D_e(r),clear:()=>function(e=N_e()){return e("readwrite",(e=>(e.clear(),O_e(e.transaction))))}(r)}};var j_e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},H_e={exports:{}};function W_e(e){var t;return[e[0],B_e(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 j_e<"u"&&j_e.localStorage?H_e.exports=j_e.localStorage:typeof window<"u"&&window.localStorage?H_e.exports=window.localStorage:H_e.exports=new t}();const V_e=async(e,t)=>{t.length&&t.forEach((async t=>{await e.removeItem(t)}))};var G_e={},q_e={},K_e=dt(Uwe),X_e={},Y_e={};let Z_e=class{};var J_e,Q_e,$_e=dt(Object.freeze({__proto__:null,IEvents:Z_e}));function eCe(){return Q_e||(Q_e=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});Xxe.__exportStar(function(){if(J_e)return Y_e;J_e=1,Object.defineProperty(Y_e,"__esModule",{value:!0}),Y_e.IHeartBeat=void 0;const e=$_e;class t extends e.IEvents{constructor(e){super()}}return Y_e.IHeartBeat=t,Y_e}(),e)}(X_e)),X_e}var tCe,nCe,rCe,iCe={},oCe={};function aCe(){return nCe||(nCe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});Xxe.__exportStar(function(){if(tCe)return oCe;tCe=1,Object.defineProperty(oCe,"__esModule",{value:!0}),oCe.HEARTBEAT_EVENTS=oCe.HEARTBEAT_INTERVAL=void 0;const e=Kxe;return oCe.HEARTBEAT_INTERVAL=e.FIVE_SECONDS,oCe.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},oCe}(),e)}(iCe)),iCe}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Xxe;t.__exportStar(function(){if(rCe)return q_e;rCe=1,Object.defineProperty(q_e,"__esModule",{value:!0}),q_e.HeartBeat=void 0;const e=Xxe,t=K_e,n=Kxe,r=eCe(),i=aCe();class o 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 o(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 q_e.HeartBeat=o,q_e}(),e),t.__exportStar(eCe(),e),t.__exportStar(aCe(),e)}(G_e);var sCe,cCe,lCe,uCe,dCe={};function fCe(){if(uCe)return lCe;uCe=1;const e=function(){if(cCe)return sCe;function e(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}return cCe=1,sCe=function(t,n,r){var i=r&&r.stringify||e;if("object"==typeof t&&null!==t){var o=n.length+1;if(1===o)return t;var a=new Array(o);a[0]=i(t);for(var s=1;s<o;s++)a[s]=i(n[s]);return a.join(" ")}if("string"!=typeof t)return t;var c=n.length;if(0===c)return t;for(var l="",u=0,d=-1,f=t&&t.length||0,h=0;h<f;){if(37===t.charCodeAt(h)&&h+1<f){switch(d=d>-1?d:0,t.charCodeAt(h+1)){case 100:case 102:if(u>=c)break;if(null==n[u])break;d<h&&(l+=t.slice(d,h)),l+=Number(n[u]),d=h+2,h++;break;case 105:if(u>=c)break;if(null==n[u])break;d<h&&(l+=t.slice(d,h)),l+=Math.floor(Number(n[u])),d=h+2,h++;break;case 79:case 111:case 106:if(u>=c)break;if(void 0===n[u])break;d<h&&(l+=t.slice(d,h));var p=typeof n[u];if("string"===p){l+="'"+n[u]+"'",d=h+2,h++;break}if("function"===p){l+=n[u].name||"<anonymous>",d=h+2,h++;break}l+=i(n[u]),d=h+2,h++;break;case 115:if(u>=c)break;d<h&&(l+=t.slice(d,h)),l+=String(n[u]),d=h+2,h++;break;case 37:d<h&&(l+=t.slice(d,h)),l+="%",d=h+2,h++,u--}++u}++h}return-1===d?t:(d<f&&(l+=t.slice(d)),l)},sCe}();lCe=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:l,mapHttpResponse:l,wrapRequestSerializer:u,wrapResponseSerializer:u,wrapErrorSerializer:u,req:l,res:l,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 l=e.browser.write||t;e.browser.write&&(e.browser.asObject=!0);const u=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,u);let h=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(h=!1);"function"==typeof l&&(l.error=l.fatal=l.warn=l.info=l.debug=l.trace=l),!1===e.enabled&&(e.level="silent");const p=e.level||"info",m=Object.create(l);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=p,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=u,m._serialize=f,m._stdErrSerialize=h,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({},u,i),l=!0===e.browser.serialize?Object.keys(c):f;delete t.serializers,o([t],l,c,this._stdErrSerialize)}function d(e){this._childLevel=1+(0|e._childLevel),this.error=a(e,t,"error"),this.fatal=a(e,t,"fatal"),this.warn=a(e,t,"warn"),this.info=a(e,t,"info"),this.debug=a(e,t,"debug"),this.trace=a(e,t,"trace"),c&&(this.serializers=c,this._serialize=l),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,a,c){const l=Object.getPrototypeOf(i);i[a]=i.levelVal>i.levels.values[a]?d:l[a]?l[a]:t[a]||t[c]||d,function(n,i,a){if(!n.transmit&&i[a]===d)return;i[a]=function(c){return function(){const l=n.timestamp(),u=new Array(arguments.length),d=Object.getPrototypeOf&&Object.getPrototypeOf(this)===t?t:this;for(var f=0;f<u.length;f++)u[f]=arguments[f];if(n.serialize&&!n.asObject&&o(u,this._serialize,this.serializers,this._stdErrSerialize),n.asObject?c.call(d,function(t,n,i,a){t._serialize&&o(i,t._serialize,t.serializers,t._stdErrSerialize);const s=i.slice();let c=s[0];const l={};a&&(l.time=a);l.level=r.levels.values[n];let u=1+(0|t._childLevel);u<1&&(u=1);if(null!==c&&"object"==typeof c){for(;u--&&"object"==typeof s[0];)Object.assign(l,s.shift());c=s.length?e(s.shift(),s):void 0}else"string"==typeof c&&(c=e(s.shift(),s));void 0!==c&&(l.msg=c);return l}(this,a,u,l)):c.apply(d,u),n.transmit){const e=n.transmit.level||i.level,t=r.levels.values[e],c=r.levels.values[a];if(c<t)return;!function(e,t,n){const r=t.send,i=t.ts,a=t.methodLevel,c=t.methodValue,l=t.val,u=e._logEvent.bindings;o(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===u.indexOf(e)})),e._logEvent.level.label=a,e._logEvent.level.value=c,r(a,e._logEvent,l),e._logEvent=s(u)}(this,{ts:l,methodLevel:a,methodValue:c,transmitLevel:e,transmitValue:r.levels.values[n.transmit.level||i.level],send:n.transmit.send,val:i.levelVal},u)}}}(i[a])}(n,i,a)}function o(e,t,n,i){for(const o in e)if(i&&e[o]instanceof Error)e[o]=r.stdSerializers.err(e[o]);else if("object"==typeof e[o]&&!Array.isArray(e[o]))for(const r in e[o])t&&t.indexOf(r)>-1&&r in n&&(e[o][r]=n[r](e[o][r]))}function a(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:h}function l(){return{}}function u(e){return e}function d(){}function f(){return!1}function h(){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:h,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),lCe}var hCe,pCe={};function mCe(){return hCe||(hCe=1,Object.defineProperty(pCe,"__esModule",{value:!0}),pCe.PINO_CUSTOM_CONTEXT_KEY=pCe.PINO_LOGGER_DEFAULTS=void 0,pCe.PINO_LOGGER_DEFAULTS={level:"info"},pCe.PINO_CUSTOM_CONTEXT_KEY="custom_context"),pCe}var yCe,gCe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pino=void 0;const t=Xxe,n=t.__importDefault(fCe());Object.defineProperty(e,"pino",{enumerable:!0,get:function(){return n.default}}),t.__exportStar(mCe(),e),t.__exportStar(function(){if(yCe)return gCe;yCe=1,Object.defineProperty(gCe,"__esModule",{value:!0}),gCe.generateChildLogger=gCe.formatChildLoggerContext=gCe.getLoggerContext=gCe.setBrowserLoggerContext=gCe.getBrowserLoggerContext=gCe.getDefaultLoggerOptions=void 0;const e=mCe();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 o=r(t,i);return o.trim()?`${o}/${n}`:n}return gCe.getDefaultLoggerOptions=function(t){return Object.assign(Object.assign({},t),{level:(null==t?void 0:t.level)||e.PINO_LOGGER_DEFAULTS.level})},gCe.getBrowserLoggerContext=t,gCe.setBrowserLoggerContext=n,gCe.getLoggerContext=r,gCe.formatChildLoggerContext=i,gCe.generateChildLogger=function(t,r,o=e.PINO_CUSTOM_CONTEXT_KEY){const a=i(t,r,o);return n(t.child({context:a}),a,o)},gCe}(),e)}(dCe);let vCe=class extends Z_e{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}},bCe=class extends Z_e{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}},wCe=class{constructor(e,t){this.logger=e,this.core=t}},ECe=class extends Z_e{constructor(e,t){super(),this.relayer=e,this.logger=t}},xCe=class extends Z_e{constructor(e){super()}},TCe=class{constructor(e,t,n,r){this.core=e,this.logger=t,this.name=n}},ACe=class extends Z_e{constructor(e,t){super(),this.relayer=e,this.logger=t}},_Ce=class extends Z_e{constructor(e,t){super(),this.core=e,this.logger=t}},CCe=class{constructor(e,t){this.projectId=e,this.logger=t}},ICe=class{constructor(e,t){this.projectId=e,this.logger=t}},SCe=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}},kCe=class{constructor(e){this.client=e}};var OCe={},PCe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Hwe,n=tEe;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&&(o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(n>=this.blockSize&&(r=o(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,a=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(a,this._buffer,s-4),o(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 o(e,n,r,o,a,s,c){for(var l,u,d,f,h,p,m,y,g=r[0],v=r[1],b=r[2],w=r[3],E=r[4],x=r[5],T=r[6],A=r[7],_=o[0],C=o[1],I=o[2],S=o[3],k=o[4],O=o[5],P=o[6],R=o[7];c>=128;){for(var N=0;N<16;N++){var M=8*N+s;e[N]=t.readUint32BE(a,M),n[N]=t.readUint32BE(a,M+4)}for(N=0;N<80;N++){var D,L,F=g,B=v,U=b,z=w,j=E,H=x,W=T,V=_,G=C,q=I,K=S,X=k,Y=O,Z=P;if(h=65535&(u=R),p=u>>>16,m=65535&(l=A),y=l>>>16,h+=65535&(u=(k>>>14|E<<18)^(k>>>18|E<<14)^(E>>>9|k<<23)),p+=u>>>16,m+=65535&(l=(E>>>14|k<<18)^(E>>>18|k<<14)^(k>>>9|E<<23)),y+=l>>>16,h+=65535&(u=k&O^~k&P),p+=u>>>16,m+=65535&(l=E&x^~E&T),y+=l>>>16,l=i[2*N],h+=65535&(u=i[2*N+1]),p+=u>>>16,m+=65535&l,y+=l>>>16,l=e[N%16],p+=(u=n[N%16])>>>16,m+=65535&l,y+=l>>>16,m+=(p+=(h+=65535&u)>>>16)>>>16,h=65535&(u=f=65535&h|p<<16),p=u>>>16,m=65535&(l=d=65535&m|(y+=m>>>16)<<16),y=l>>>16,h+=65535&(u=(_>>>28|g<<4)^(g>>>2|_<<30)^(g>>>7|_<<25)),p+=u>>>16,m+=65535&(l=(g>>>28|_<<4)^(_>>>2|g<<30)^(_>>>7|g<<25)),y+=l>>>16,p+=(u=_&C^_&I^C&I)>>>16,m+=65535&(l=g&v^g&b^v&b),y+=l>>>16,D=65535&(m+=(p+=(h+=65535&u)>>>16)>>>16)|(y+=m>>>16)<<16,L=65535&h|p<<16,h=65535&(u=K),p=u>>>16,m=65535&(l=z),y=l>>>16,p+=(u=f)>>>16,m+=65535&(l=d),y+=l>>>16,v=F,b=B,w=U,E=z=65535&(m+=(p+=(h+=65535&u)>>>16)>>>16)|(y+=m>>>16)<<16,x=j,T=H,A=W,g=D,C=V,I=G,S=q,k=K=65535&h|p<<16,O=X,P=Y,R=Z,_=L,N%16==15)for(M=0;M<16;M++)l=e[M],h=65535&(u=n[M]),p=u>>>16,m=65535&l,y=l>>>16,l=e[(M+9)%16],h+=65535&(u=n[(M+9)%16]),p+=u>>>16,m+=65535&l,y+=l>>>16,d=e[(M+1)%16],h+=65535&(u=((f=n[(M+1)%16])>>>1|d<<31)^(f>>>8|d<<24)^(f>>>7|d<<25)),p+=u>>>16,m+=65535&(l=(d>>>1|f<<31)^(d>>>8|f<<24)^d>>>7),y+=l>>>16,d=e[(M+14)%16],p+=(u=((f=n[(M+14)%16])>>>19|d<<13)^(d>>>29|f<<3)^(f>>>6|d<<26))>>>16,m+=65535&(l=(d>>>19|f<<13)^(f>>>29|d<<3)^d>>>6),y+=l>>>16,y+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,e[M]=65535&m|y<<16,n[M]=65535&h|p<<16}h=65535&(u=_),p=u>>>16,m=65535&(l=g),y=l>>>16,l=r[0],p+=(u=o[0])>>>16,m+=65535&l,y+=l>>>16,y+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[0]=g=65535&m|y<<16,o[0]=_=65535&h|p<<16,h=65535&(u=C),p=u>>>16,m=65535&(l=v),y=l>>>16,l=r[1],p+=(u=o[1])>>>16,m+=65535&l,y+=l>>>16,y+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[1]=v=65535&m|y<<16,o[1]=C=65535&h|p<<16,h=65535&(u=I),p=u>>>16,m=65535&(l=b),y=l>>>16,l=r[2],p+=(u=o[2])>>>16,m+=65535&l,y+=l>>>16,y+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[2]=b=65535&m|y<<16,o[2]=I=65535&h|p<<16,h=65535&(u=S),p=u>>>16,m=65535&(l=w),y=l>>>16,l=r[3],p+=(u=o[3])>>>16,m+=65535&l,y+=l>>>16,y+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[3]=w=65535&m|y<<16,o[3]=S=65535&h|p<<16,h=65535&(u=k),p=u>>>16,m=65535&(l=E),y=l>>>16,l=r[4],p+=(u=o[4])>>>16,m+=65535&l,y+=l>>>16,y+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[4]=E=65535&m|y<<16,o[4]=k=65535&h|p<<16,h=65535&(u=O),p=u>>>16,m=65535&(l=x),y=l>>>16,l=r[5],p+=(u=o[5])>>>16,m+=65535&l,y+=l>>>16,y+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[5]=x=65535&m|y<<16,o[5]=O=65535&h|p<<16,h=65535&(u=P),p=u>>>16,m=65535&(l=T),y=l>>>16,l=r[6],p+=(u=o[6])>>>16,m+=65535&l,y+=l>>>16,y+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[6]=T=65535&m|y<<16,o[6]=P=65535&h|p<<16,h=65535&(u=R),p=u>>>16,m=65535&(l=A),y=l>>>16,l=r[7],p+=(u=o[7])>>>16,m+=65535&l,y+=l>>>16,y+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[7]=A=65535&m|y<<16,o[7]=R=65535&h|p<<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}}(PCe),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=xEe,n=PCe,r=tEe;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 o=i(),a=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]),l=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),u=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 h(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 p(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];h(r),h(r),h(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,p(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 g(e,t){const n=new Uint8Array(32),r=new Uint8Array(32);return m(n,e),m(r,t),y(n,r)}function v(e){const t=new Uint8Array(32);return m(t,e),1&t[0]}function b(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 E(e,t,n){let r,i,o=0,a=0,s=0,c=0,l=0,u=0,d=0,f=0,h=0,p=0,m=0,y=0,g=0,v=0,b=0,w=0,E=0,x=0,T=0,A=0,_=0,C=0,I=0,S=0,k=0,O=0,P=0,R=0,N=0,M=0,D=0,L=n[0],F=n[1],B=n[2],U=n[3],z=n[4],j=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],Z=n[14],J=n[15];r=t[0],o+=r*L,a+=r*F,s+=r*B,c+=r*U,l+=r*z,u+=r*j,d+=r*H,f+=r*W,h+=r*V,p+=r*G,m+=r*q,y+=r*K,g+=r*X,v+=r*Y,b+=r*Z,w+=r*J,r=t[1],a+=r*L,s+=r*F,c+=r*B,l+=r*U,u+=r*z,d+=r*j,f+=r*H,h+=r*W,p+=r*V,m+=r*G,y+=r*q,g+=r*K,v+=r*X,b+=r*Y,w+=r*Z,E+=r*J,r=t[2],s+=r*L,c+=r*F,l+=r*B,u+=r*U,d+=r*z,f+=r*j,h+=r*H,p+=r*W,m+=r*V,y+=r*G,g+=r*q,v+=r*K,b+=r*X,w+=r*Y,E+=r*Z,x+=r*J,r=t[3],c+=r*L,l+=r*F,u+=r*B,d+=r*U,f+=r*z,h+=r*j,p+=r*H,m+=r*W,y+=r*V,g+=r*G,v+=r*q,b+=r*K,w+=r*X,E+=r*Y,x+=r*Z,T+=r*J,r=t[4],l+=r*L,u+=r*F,d+=r*B,f+=r*U,h+=r*z,p+=r*j,m+=r*H,y+=r*W,g+=r*V,v+=r*G,b+=r*q,w+=r*K,E+=r*X,x+=r*Y,T+=r*Z,A+=r*J,r=t[5],u+=r*L,d+=r*F,f+=r*B,h+=r*U,p+=r*z,m+=r*j,y+=r*H,g+=r*W,v+=r*V,b+=r*G,w+=r*q,E+=r*K,x+=r*X,T+=r*Y,A+=r*Z,_+=r*J,r=t[6],d+=r*L,f+=r*F,h+=r*B,p+=r*U,m+=r*z,y+=r*j,g+=r*H,v+=r*W,b+=r*V,w+=r*G,E+=r*q,x+=r*K,T+=r*X,A+=r*Y,_+=r*Z,C+=r*J,r=t[7],f+=r*L,h+=r*F,p+=r*B,m+=r*U,y+=r*z,g+=r*j,v+=r*H,b+=r*W,w+=r*V,E+=r*G,x+=r*q,T+=r*K,A+=r*X,_+=r*Y,C+=r*Z,I+=r*J,r=t[8],h+=r*L,p+=r*F,m+=r*B,y+=r*U,g+=r*z,v+=r*j,b+=r*H,w+=r*W,E+=r*V,x+=r*G,T+=r*q,A+=r*K,_+=r*X,C+=r*Y,I+=r*Z,S+=r*J,r=t[9],p+=r*L,m+=r*F,y+=r*B,g+=r*U,v+=r*z,b+=r*j,w+=r*H,E+=r*W,x+=r*V,T+=r*G,A+=r*q,_+=r*K,C+=r*X,I+=r*Y,S+=r*Z,k+=r*J,r=t[10],m+=r*L,y+=r*F,g+=r*B,v+=r*U,b+=r*z,w+=r*j,E+=r*H,x+=r*W,T+=r*V,A+=r*G,_+=r*q,C+=r*K,I+=r*X,S+=r*Y,k+=r*Z,O+=r*J,r=t[11],y+=r*L,g+=r*F,v+=r*B,b+=r*U,w+=r*z,E+=r*j,x+=r*H,T+=r*W,A+=r*V,_+=r*G,C+=r*q,I+=r*K,S+=r*X,k+=r*Y,O+=r*Z,P+=r*J,r=t[12],g+=r*L,v+=r*F,b+=r*B,w+=r*U,E+=r*z,x+=r*j,T+=r*H,A+=r*W,_+=r*V,C+=r*G,I+=r*q,S+=r*K,k+=r*X,O+=r*Y,P+=r*Z,R+=r*J,r=t[13],v+=r*L,b+=r*F,w+=r*B,E+=r*U,x+=r*z,T+=r*j,A+=r*H,_+=r*W,C+=r*V,I+=r*G,S+=r*q,k+=r*K,O+=r*X,P+=r*Y,R+=r*Z,N+=r*J,r=t[14],b+=r*L,w+=r*F,E+=r*B,x+=r*U,T+=r*z,A+=r*j,_+=r*H,C+=r*W,I+=r*V,S+=r*G,k+=r*q,O+=r*K,P+=r*X,R+=r*Y,N+=r*Z,M+=r*J,r=t[15],w+=r*L,E+=r*F,x+=r*B,T+=r*U,A+=r*z,_+=r*j,C+=r*H,I+=r*W,S+=r*V,k+=r*G,O+=r*q,P+=r*K,R+=r*X,N+=r*Y,M+=r*Z,D+=r*J,o+=38*E,a+=38*x,s+=38*T,c+=38*A,l+=38*_,u+=38*C,d+=38*I,f+=38*S,h+=38*k,p+=38*O,m+=38*P,y+=38*R,g+=38*N,v+=38*M,b+=38*D,i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=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=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=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=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=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=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=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,o+=i-1+37*(i-1),i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=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=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=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=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=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=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=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=s,e[3]=c,e[4]=l,e[5]=u,e[6]=d,e[7]=f,e[8]=h,e[9]=p,e[10]=m,e[11]=y,e[12]=g,e[13]=v,e[14]=b,e[15]=w}function x(e,t){E(e,t,t)}function T(e,t){const n=i();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)x(n,n),2!==r&&4!==r&&E(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function A(e,t){const n=i(),r=i(),o=i(),a=i(),s=i(),l=i(),u=i(),d=i(),f=i();w(n,e[1],e[0]),w(f,t[1],t[0]),E(n,n,f),b(r,e[0],e[1]),b(f,t[0],t[1]),E(r,r,f),E(o,e[3],t[3]),E(o,o,c),E(a,e[2],t[2]),b(a,a,a),w(s,r,n),w(l,a,o),b(u,a,o),b(d,r,n),E(e[0],s,l),E(e[1],d,u),E(e[2],u,l),E(e[3],s,d)}function _(e,t,n){for(let r=0;r<4;r++)p(e[r],t[r],n)}function C(e,t){const n=i(),r=i(),o=i();T(o,t[2]),E(n,t[0],o),E(r,t[1],o),m(e,r),e[31]^=v(n)<<7}function I(e,t,n){f(e[0],o),f(e[1],a),f(e[2],a),f(e[3],o);for(let r=255;r>=0;--r){const i=n[r/8|0]>>(7&r)&1;_(e,t,i),A(t,e),A(e,e),_(e,t,i)}}function S(e,t){const n=[i(),i(),i(),i()];f(n[0],l),f(n[1],u),f(n[2],a),E(n[3],l,u),I(e,n,t)}function k(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 o=new Uint8Array(32),a=[i(),i(),i(),i()];S(a,r),C(o,a);const s=new Uint8Array(64);return s.set(t),s.set(o,32),{publicKey:o,secretKey:s}}e.generateKeyPairFromSeed=k,e.generateKeyPair=function(e){const n=(0,t.randomBytes)(32,e),i=k(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 O=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 P(e,t){let n,r,i,o;for(r=63;r>=32;--r){for(n=0,i=r-32,o=r-12;i<o;++i)t[i]+=n-16*t[r]*O[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)*O[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*O[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;P(e,t)}function N(e,t){const n=i(),r=i(),c=i(),l=i(),u=i(),h=i(),p=i();return f(e[2],a),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),x(c,e[1]),E(l,c,s),w(c,c,e[2]),b(l,e[2],l),x(u,l),x(h,u),E(p,h,u),E(n,p,c),E(n,n,l),function(e,t){const n=i();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=250;r>=0;r--)x(n,n),1!==r&&E(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}(n,n),E(n,n,c),E(n,n,l),E(n,n,l),E(e[0],n,l),x(r,e[0]),E(r,r,l),g(r,c)&&E(e[0],e[0],d),x(r,e[0]),E(r,r,l),g(r,c)?-1:(v(e[0])===t[31]>>7&&w(e[0],o,e[0]),E(e[3],e[0],e[1]),0)}e.sign=function(e,t){const r=new Float64Array(64),o=[i(),i(),i(),i()],a=(0,n.hash)(e.subarray(0,32));a[0]&=248,a[31]&=127,a[31]|=64;const s=new Uint8Array(64);s.set(a.subarray(32),32);const c=new n.SHA512;c.update(s.subarray(32)),c.update(t);const l=c.digest();c.clean(),R(l),S(o,l),C(s,o),c.reset(),c.update(s.subarray(0,32)),c.update(e.subarray(32)),c.update(t);const u=c.digest();R(u);for(let e=0;e<32;e++)r[e]=l[e];for(let e=0;e<32;e++)for(let t=0;t<32;t++)r[e+t]+=u[e]*a[t];return P(s.subarray(32),r),s},e.verify=function(t,r,o){const a=new Uint8Array(32),s=[i(),i(),i(),i()],c=[i(),i(),i(),i()];if(o.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if(N(c,t))return!1;const l=new n.SHA512;l.update(o.subarray(0,32)),l.update(t),l.update(r);const u=l.digest();return R(u),I(s,c,u),S(c,o.subarray(32)),A(s,c),C(a,s),!y(o,a)},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(),o=t[1];b(n,a,o),w(r,a,o),T(r,r),E(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}}(OCe);const RCe=".",NCe="base64url",MCe="utf8",DCe="utf8",LCe=":",FCe="did",BCe="key",UCe="base58btc",zCe="z",jCe="K36";function HCe(e){return Nxe(Rxe(U_e(e),MCe),NCe)}function WCe(e){const t=Rxe(jCe,UCe),n=zCe+Nxe(NEe([t,e]),UCe);return[FCe,BCe,n].join(LCe)}function VCe(e=xEe.randomBytes(32)){return OCe.generateKeyPairFromSeed(e)}async function GCe(e,t,n,r,i=Kxe.fromMiliseconds(Date.now())){const o={alg:"EdDSA",typ:"JWT"},a={iss:WCe(r.publicKey),sub:e,aud:t,iat:i,exp:i+n},s=Rxe([HCe((c={header:o,payload:a}).header),HCe(c.payload)].join(RCe),DCe);var c;return function(e){return[HCe(e.header),HCe(e.payload),(t=e.signature,Nxe(t,NCe))].join(RCe);var t}({header:o,payload:a,signature:OCe.sign(r.secretKey,s)})}const qCe="INTERNAL_ERROR",KCe="SERVER_ERROR",XCe=[-32700,-32600,-32601,-32602,-32603],YCe={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"},[qCe]:{code:-32603,message:"Internal error"},[KCe]:{code:-32e3,message:"Server error"}},ZCe=KCe;function JCe(e){return Object.keys(YCe).includes(e)?YCe[e]:YCe[ZCe]}function QCe(e,t,n){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${t}`):e}var $Ce,eIe={},tIe={};var nIe,rIe={};function iIe(e=3){return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function oIe(e=6){return BigInt(iIe(e))}function aIe(e,t,n){return{id:n||iIe(),jsonrpc:"2.0",method:e,params:t}}function sIe(e,t){return{id:e,jsonrpc:"2.0",result:t}}function cIe(e,t,n){return{id:e,jsonrpc:"2.0",error:lIe(t,n)}}function lIe(e,t){return void 0===e?JCe(qCe):("string"==typeof e&&(e=Object.assign(Object.assign({},JCe(KCe)),{message:e})),void 0!==t&&(e.data=t),n=e.code,XCe.includes(n)&&(e=function(e){const t=Object.values(YCe).find((t=>t.code===e));return t||YCe[ZCe]}(e.code)),e);var n}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Xxe;t.__exportStar(function(){if($Ce)return tIe;function e(){return(null==lt?void 0:lt.crypto)||(null==lt?void 0:lt.msCrypto)||{}}function t(){const t=e();return t.subtle||t.webkitSubtle}return $Ce=1,Object.defineProperty(tIe,"__esModule",{value:!0}),tIe.isBrowserCryptoAvailable=tIe.getSubtleCrypto=tIe.getBrowerCrypto=void 0,tIe.getBrowerCrypto=e,tIe.getSubtleCrypto=t,tIe.isBrowserCryptoAvailable=function(){return!!e()&&!!t()},tIe}(),e),t.__exportStar(function(){if(nIe)return rIe;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 nIe=1,Object.defineProperty(rIe,"__esModule",{value:!0}),rIe.isBrowser=rIe.isNode=rIe.isReactNative=void 0,rIe.isReactNative=e,rIe.isNode=t,rIe.isBrowser=function(){return!e()&&!t()},rIe}(),e)}(eIe);class uIe{}class dIe extends uIe{constructor(){super()}}class fIe extends dIe{constructor(e){super()}}function hIe(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 pIe(e){return hIe(e,"^https?:")}function mIe(e){return hIe(e,"^wss?:")}function yIe(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function gIe(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function vIe(e){return gIe(e)&&"method"in e}function bIe(e){return gIe(e)&&(wIe(e)||EIe(e))}function wIe(e){return"result"in e}function EIe(e){return"error"in e}class xIe extends fIe{constructor(e){super(e),this.events=new Nwe,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(aIe(e.method,e.params||[],e.id||oIe().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=>{EIe(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),bIe(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 TIe=e=>e.split("?")[0],AIe=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 _Ie={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=1,i=2,o=9007199254740991,a="[object Arguments]",s="[object Array]",c="[object AsyncFunction]",l="[object Boolean]",u="[object Date]",d="[object Error]",f="[object Function]",h="[object GeneratorFunction]",p="[object Map]",m="[object Number]",y="[object Null]",g="[object Object]",v="[object Promise]",b="[object Proxy]",w="[object RegExp]",E="[object Set]",x="[object String]",T="[object Symbol]",A="[object Undefined]",_="[object WeakMap]",C="[object ArrayBuffer]",I="[object DataView]",S=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,O={};O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O[a]=O[s]=O[C]=O[l]=O[I]=O[u]=O[d]=O[f]=O[p]=O[m]=O[g]=O[w]=O[E]=O[x]=O[_]=!1;var P="object"==typeof lt&<&<.Object===Object&<,R="object"==typeof self&&self&&self.Object===Object&&self,N=P||R||Function("return this")(),M=t&&!t.nodeType&&t,D=M&&e&&!e.nodeType&&e,L=D&&D.exports===M,F=L&&P.process,B=function(){try{return F&&F.binding&&F.binding("util")}catch(e){}}(),U=B&&B.isTypedArray;function z(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 j(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,Z=function(){var e=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),J=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,oe=Object.getOwnPropertySymbols,ae=$?$.isBuffer:void 0,se=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),ce=Le(N,"DataView"),le=Le(N,"Map"),ue=Le(N,"Promise"),de=Le(N,"Set"),fe=Le(N,"WeakMap"),he=Le(Object,"create"),pe=ze(ce),me=ze(le),ye=ze(ue),ge=ze(de),ve=ze(fe),be=ee?ee.prototype:void 0,we=be?be.valueOf:void 0;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 xe(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 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 Ae(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Te;++t<n;)this.add(e[t])}function _e(e){var t=this.__data__=new xe(e);this.size=t.size}function Ce(e,t){var n=We(e),r=!n&&He(e),i=!n&&!r&&Ve(e),o=!n&&!r&&!i&&Ze(e),a=n||r||i||o,s=a?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 l in e)!t&&!Y.call(e,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ue(l,c))||s.push(l);return s}function Ie(e,t){for(var n=e.length;n--;)if(je(e[n][0],t))return n;return-1}function Se(e){return null==e?void 0===e?A: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=J.call(e);r&&(t?e[ie]=n:delete e[ie]);return i}(e):function(e){return J.call(e)}(e)}function ke(e){return Xe(e)&&Se(e)==a}function Oe(e,t,n,o,c){return e===t||(null==e||null==t||!Xe(e)&&!Xe(t)?e!=e&&t!=t:function(e,t,n,o,c,f){var h=We(e),y=We(t),v=h?s:Be(e),b=y?s:Be(t),A=(v=v==a?g:v)==g,_=(b=b==a?g:b)==g,S=v==b;if(S&&Ve(e)){if(!Ve(t))return!1;h=!0,A=!1}if(S&&!A)return f||(f=new _e),h||Ze(e)?Ne(e,t,n,o,c,f):function(e,t,n,o,a,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 l:case u:case m:return je(+e,+t);case d:return e.name==t.name&&e.message==t.message;case w:case x:return e==t+"";case p:var f=H;case E:var h=o&r;if(f||(f=W),e.size!=t.size&&!h)return!1;var y=c.get(e);if(y)return y==t;o|=i,c.set(e,t);var g=Ne(f(e),f(t),o,a,s,c);return c.delete(e),g;case T:if(we)return we.call(e)==we.call(t)}return!1}(e,t,v,n,o,c,f);if(!(n&r)){var k=A&&Y.call(e,"__wrapped__"),O=_&&Y.call(t,"__wrapped__");if(k||O){var P=k?e.value():e,R=O?t.value():t;return f||(f=new _e),c(P,R,n,o,f)}}if(!S)return!1;return f||(f=new _e),function(e,t,n,i,o,a){var s=n&r,c=Me(e),l=c.length,u=Me(t),d=u.length;if(l!=d&&!s)return!1;var f=l;for(;f--;){var h=c[f];if(!(s?h in t:Y.call(t,h)))return!1}var p=a.get(e);if(p&&a.get(t))return p==t;var m=!0;a.set(e,t),a.set(t,e);var y=s;for(;++f<l;){var g=e[h=c[f]],v=t[h];if(i)var b=s?i(v,g,h,t,e,a):i(g,v,h,e,t,a);if(!(void 0===b?g===v||o(g,v,n,i,a):b)){m=!1;break}y||(y="constructor"==h)}if(m&&!y){var w=e.constructor,E=t.constructor;w==E||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof E&&E instanceof E||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,n,o,c,f)}(e,t,n,o,Oe,c))}function Pe(e){return!(!Ke(e)||(t=e,Z&&Z in t))&&(Ge(e)?Q:S).test(ze(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 o in Object(e))Y.call(e,o)&&"constructor"!=o&&i.push(o);return i}function Ne(e,t,n,o,a,s){var c=n&r,l=e.length,u=t.length;if(l!=u&&!(c&&u>l))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var f=-1,h=!0,p=n&i?new Ae:void 0;for(s.set(e,t),s.set(t,e);++f<l;){var m=e[f],y=t[f];if(o)var g=c?o(y,m,f,t,e,s):o(m,y,f,e,t,s);if(void 0!==g){if(g)continue;h=!1;break}if(p){if(!z(t,(function(e,t){if(!j(p,t)&&(m===e||a(m,e,n,o,s)))return p.push(t)}))){h=!1;break}}else if(m!==y&&!a(m,y,n,o,s)){h=!1;break}}return s.delete(e),s.delete(t),h}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,Je,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 Pe(n)?n:void 0}Ee.prototype.clear=function(){this.__data__=he?he(null):{},this.size=0},Ee.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ee.prototype.get=function(e){var t=this.__data__;if(he){var r=t[e];return r===n?void 0:r}return Y.call(t,e)?t[e]:void 0},Ee.prototype.has=function(e){var t=this.__data__;return he?void 0!==t[e]:Y.call(t,e)},Ee.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=he&&void 0===t?n:t,this},xe.prototype.clear=function(){this.__data__=[],this.size=0},xe.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)},xe.prototype.get=function(e){var t=this.__data__,n=Ie(t,e);return n<0?void 0:t[n][1]},xe.prototype.has=function(e){return Ie(this.__data__,e)>-1},xe.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},Te.prototype.clear=function(){this.size=0,this.__data__={hash:new Ee,map:new(le||xe),string:new Ee}},Te.prototype.delete=function(e){var t=De(this,e).delete(e);return this.size-=t?1:0,t},Te.prototype.get=function(e){return De(this,e).get(e)},Te.prototype.has=function(e){return De(this,e).has(e)},Te.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},Ae.prototype.add=Ae.prototype.push=function(e){return this.__data__.set(e,n),this},Ae.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.clear=function(){this.__data__=new xe,this.size=0},_e.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!le||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Te(r)}return n.set(e,t),this.size=n.size,this};var Fe=oe?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(oe(e),(function(t){return ne.call(e,t)})))}:function(){return[]},Be=Se;function Ue(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||k.test(e))&&e>-1&&e%1==0&&e<t}function ze(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function je(e,t){return e===t||e!=e&&t!=t}(ce&&Be(new ce(new ArrayBuffer(1)))!=I||le&&Be(new le)!=p||ue&&Be(ue.resolve())!=v||de&&Be(new de)!=E||fe&&Be(new fe)!=_)&&(Be=function(e){var t=Se(e),n=t==g?e.constructor:void 0,r=n?ze(n):"";if(r)switch(r){case pe:return I;case me:return p;case ye:return v;case ge:return E;case ve:return _}return t});var He=ke(function(){return arguments}())?ke:function(e){return Xe(e)&&Y.call(e,"callee")&&!ne.call(e,"callee")},We=Array.isArray;var Ve=ae||function(){return!1};function Ge(e){if(!Ke(e))return!1;var t=Se(e);return t==f||t==h||t==c||t==b}function qe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}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,Ze=U?(Ye=U,function(e){return Ye(e)}):function(e){return Xe(e)&&qe(e.length)&&!!O[Se(e)]};function Je(e){return null!=(t=e)&&qe(t.length)&&!Ge(t)?Ce(e):Re(e);var t}e.exports=function(e,t){return Oe(e,t)}}(_Ie,_Ie.exports);var CIe=ut(_Ie.exports),IIe=dt(Nue),SIe=ut(self.fetch||(self.fetch=IIe.default||IIe));var kIe=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 o=e.charAt(i),a=o.charCodeAt(0);if(255!==n[a])throw new TypeError(o+" is ambiguous");n[a]=i}var s=e.length,c=e.charAt(0),l=Math.log(s)/Math.log(256),u=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 o=(e.length-t)*l+1>>>0,a=new Uint8Array(o);e[t];){var u=n[e.charCodeAt(t)];if(255===u)return;for(var d=0,f=o-1;(0!==u||d<i)&&-1!==f;f--,d++)u+=s*a[f]>>>0,a[f]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var h=o-i;h!==o&&0===a[h];)h++;for(var p=new Uint8Array(r+(o-h)),m=r;h!==o;)p[m++]=a[h++];return p}}}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,o=t.length;i!==o&&0===t[i];)i++,n++;for(var a=(o-i)*u+1>>>0,l=new Uint8Array(a);i!==o;){for(var d=t[i],f=0,h=a-1;(0!==d||f<r)&&-1!==h;h--,f++)d+=256*l[h]>>>0,l[h]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");r=f,i++}for(var p=a-r;p!==a&&0===l[p];)p++;for(var m=c.repeat(n);p<a;++p)m+=e.charAt(l[p]);return m},decodeUnsafe:d,decode:function(e){var n=d(e);if(n)return n;throw new Error(`Non-${t} character`)}}},OIe=kIe;const PIe=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 RIe{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 NIe{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 DIe(this,e)}}class MIe{constructor(e){this.decoders=e}or(e){return DIe(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 DIe=(e,t)=>new MIe({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class LIe{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new RIe(e,t,n),this.decoder=new NIe(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const FIe=({name:e,prefix:t,encode:n,decode:r})=>new LIe(e,t,n,r),BIe=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=OIe(n,t);return FIe({prefix:e,name:t,encode:r,decode:e=>PIe(i(e))})},UIe=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>FIe({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let o="",a=0,s=0;for(let r=0;r<e.length;++r)for(s=s<<8|e[r],a+=8;a>n;)a-=n,o+=t[i&s>>a];if(a&&(o+=t[i&s<<n-a]),r)for(;o.length*n&7;)o+="=";return o})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const a=new Uint8Array(o*n/8|0);let s=0,c=0,l=0;for(let t=0;t<o;++t){const o=i[e[t]];if(void 0===o)throw new SyntaxError(`Non-${r} character`);c=c<<n|o,s+=n,s>=8&&(s-=8,a[l++]=255&c>>s)}if(s>=n||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return a})(t,r,n,e)}),zIe=FIe({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var jIe=Object.freeze({__proto__:null,identity:zIe});const HIe=UIe({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var WIe=Object.freeze({__proto__:null,base2:HIe});const VIe=UIe({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var GIe=Object.freeze({__proto__:null,base8:VIe});const qIe=BIe({prefix:"9",name:"base10",alphabet:"0123456789"});var KIe=Object.freeze({__proto__:null,base10:qIe});const XIe=UIe({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),YIe=UIe({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var ZIe=Object.freeze({__proto__:null,base16:XIe,base16upper:YIe});const JIe=UIe({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),QIe=UIe({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),$Ie=UIe({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),eSe=UIe({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),tSe=UIe({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),nSe=UIe({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),rSe=UIe({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),iSe=UIe({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),oSe=UIe({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var aSe=Object.freeze({__proto__:null,base32:JIe,base32upper:QIe,base32pad:$Ie,base32padupper:eSe,base32hex:tSe,base32hexupper:nSe,base32hexpad:rSe,base32hexpadupper:iSe,base32z:oSe});const sSe=BIe({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),cSe=BIe({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var lSe=Object.freeze({__proto__:null,base36:sSe,base36upper:cSe});const uSe=BIe({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),dSe=BIe({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var fSe=Object.freeze({__proto__:null,base58btc:uSe,base58flickr:dSe});const hSe=UIe({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),pSe=UIe({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),mSe=UIe({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),ySe=UIe({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var gSe=Object.freeze({__proto__:null,base64:hSe,base64pad:pSe,base64url:mSe,base64urlpad:ySe});const vSe=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),bSe=vSe.reduce(((e,t,n)=>(e[n]=t,e)),[]),wSe=vSe.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const ESe=FIe({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=bSe[t]),"")},decode:function(e){const t=[];for(const n of e){const e=wSe[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var xSe=Object.freeze({__proto__:null,base256emoji:ESe}),TSe=function e(t,n,r){n=n||[];for(var i=r=r||0;t>=CSe;)n[r++]=255&t|ASe,t/=128;for(;t&_Se;)n[r++]=255&t|ASe,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},ASe=128,_Se=-128,CSe=Math.pow(2,31);var ISe=function e(t,n){var r,i=0,o=(n=n||0,0),a=n,s=t.length;do{if(a>=s)throw e.bytes=0,new RangeError("Could not decode varint");r=t[a++],i+=o<28?(r&kSe)<<o:(r&kSe)*Math.pow(2,o),o+=7}while(r>=SSe);return e.bytes=a-n,i},SSe=128,kSe=127;var OSe=Math.pow(2,7),PSe=Math.pow(2,14),RSe=Math.pow(2,21),NSe=Math.pow(2,28),MSe=Math.pow(2,35),DSe=Math.pow(2,42),LSe=Math.pow(2,49),FSe=Math.pow(2,56),BSe=Math.pow(2,63),USe={encode:TSe,decode:ISe,encodingLength:function(e){return e<OSe?1:e<PSe?2:e<RSe?3:e<NSe?4:e<MSe?5:e<DSe?6:e<LSe?7:e<FSe?8:e<BSe?9:10}},zSe=USe;const jSe=(e,t,n=0)=>(zSe.encode(e,t,n),t),HSe=e=>zSe.encodingLength(e),WSe=(e,t)=>{const n=t.byteLength,r=HSe(e),i=r+HSe(n),o=new Uint8Array(i+n);return jSe(e,o,0),jSe(n,o,r),o.set(t,i),new VSe(e,n,t,o)};let VSe=class{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}};const GSe=({name:e,code:t,encode:n})=>new qSe(e,t,n);let qSe=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?WSe(this.code,t):t.then((e=>WSe(this.code,e)))}throw Error("Unknown type, must be binary type")}};const KSe=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),XSe=GSe({name:"sha2-256",code:18,encode:KSe("SHA-256")}),YSe=GSe({name:"sha2-512",code:19,encode:KSe("SHA-512")});Object.freeze({__proto__:null,sha256:XSe,sha512:YSe});const ZSe=PIe,JSe={code:0,name:"identity",encode:ZSe,digest:e=>WSe(0,ZSe(e))};Object.freeze({__proto__:null,identity:JSe});new TextEncoder,new TextDecoder;const QSe={...jIe,...WIe,...GIe,...KIe,...ZIe,...aSe,...lSe,...fSe,...gSe,...xSe};function $Se(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function eke(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const tke=eke("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),nke=eke("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?$Se(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})),rke={utf8:tke,"utf-8":tke,hex:QSe.base16,latin1:nke,ascii:nke,binary:nke,...QSe};const ike="core",oke=`wc@2:${ike}:`,ake="error",ske={database:":memory:"},cke="client_ed25519_seed",lke=Kxe.ONE_DAY,uke=Kxe.SIX_HOURS,dke="wss://relay.walletconnect.com",fke="wss://relay.walletconnect.org",hke="relayer_message",pke="relayer_message_ack",mke="relayer_connect",yke="relayer_disconnect",gke="relayer_error",vke="relayer_connection_stalled",bke="relayer_publish",wke="payload",Eke="connect",xke="disconnect",Tke="error",Ake=Kxe.ONE_SECOND,_ke="subscription_created",Cke="subscription_deleted",Ike="subscription_sync",Ske="subscription_resubscribed",kke=1e3*Kxe.FIVE_SECONDS,Oke={wc_pairingDelete:{req:{ttl:Kxe.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:Kxe.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:Kxe.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:Kxe.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:Kxe.ONE_DAY,prompt:!1,tag:0},res:{ttl:Kxe.ONE_DAY,prompt:!1,tag:0}}},Pke="pairing_create",Rke="pairing_expire",Nke="pairing_delete",Mke="pairing_ping",Dke="history_created",Lke="history_updated",Fke="history_deleted",Bke="history_sync",Uke="expirer_created",zke="expirer_deleted",jke="expirer_expired",Hke="expirer_sync",Wke="verify-api",Vke="https://verify.walletconnect.com",Gke="https://verify.walletconnect.org",qke=[Vke,Gke];let Kke=class extends wCe{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=oke,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=XTe(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)[XTe(t)]<"u"},this.del=async e=>{this.isInitialized(),this.messages.delete(e),await this.persist()},this.logger=dCe.generateChildLogger(e,this.name),this.core=t}get context(){return dCe.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,yAe(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?gAe(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=VAe("NOT_INITIALIZED",this.name);throw new Error(e)}}};class Xke extends ECe{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new Nwe,this.name="publisher",this.queue=new Map,this.publishTimeout=Kxe.toMiliseconds(2*Kxe.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||uke,o=CAe(n),a=n?.prompt||!1,s=n?.tag||0,c=n?.id||oIe().toString(),l={topic:e,message:t,opts:{ttl:i,relay:o,prompt:a,tag:s,id:c}},u=setTimeout((()=>this.queue.set(c,l)),this.publishTimeout);try{await await bAe(this.rpcPublish(e,t,i,o,a,s,c),this.publishTimeout,`Failed to publish payload, please try again. id:${c} tag:${s}`),this.removeRequestFromQueue(c),this.relayer.events.emit(bke,l)}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(u)}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=dCe.generateChildLogger(t,this.name),this.registerEventListeners()}get context(){return dCe.getLoggerContext(this.logger)}rpcPublish(e,t,n,r,i,o,a){var s,c,l,u;const d={method:IAe(r.protocol).publish,params:{topic:e,message:t,ttl:n,prompt:i,tag:o},id:a};return XAe(null==(s=d.params)?void 0:s.prompt)&&(null==(c=d.params)||delete c.prompt),XAe(null==(l=d.params)?void 0:l.tag)&&(null==(u=d.params)||delete u.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(G_e.HEARTBEAT_EVENTS.pulse,(()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(vke);this.checkQueue()})),this.relayer.on(pke,(e=>{this.removeRequestFromQueue(e.id.toString())}))}}class Yke{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 Zke=Object.defineProperty,Jke=Object.defineProperties,Qke=Object.getOwnPropertyDescriptors,$ke=Object.getOwnPropertySymbols,eOe=Object.prototype.hasOwnProperty,tOe=Object.prototype.propertyIsEnumerable,nOe=(e,t,n)=>t in e?Zke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rOe=(e,t)=>{for(var n in t||(t={}))eOe.call(t,n)&&nOe(e,n,t[n]);if($ke)for(var n of $ke(t))tOe.call(t,n)&&nOe(e,n,t[n]);return e},iOe=(e,t)=>Jke(e,Qke(t));let oOe=class extends ACe{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new Yke,this.events=new Nwe,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=oke,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=CAe(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 Kxe.Watch;i.start(t);const o=setInterval((()=>{!this.pending.has(e)&&this.topics.includes(e)&&(clearInterval(o),i.stop(t),n(!0)),i.elapsed(t)>=kke&&(clearInterval(o),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=dCe.generateChildLogger(t,this.name),this.clientId=""}get context(){return dCe.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=CAe(n);await this.rpcUnsubscribe(e,t,r);const i=GAe("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:IAe(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await bAe(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(vke)}return XTe(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const t={method:IAe(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 bAe(this.relayer.request(t),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(vke)}}rpcUnsubscribe(e,t,n){const r={method:IAe(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,iOe(rOe({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach((e=>{this.setSubscription(e.id,rOe({},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,rOe({},t)),this.topicMap.set(t.topic,e),this.events.emit(_ke,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}=VAe("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(Cke,iOe(rOe({},n),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Ike)}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(Ske)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:e}=VAe("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);qAe(t)&&this.onBatchSubscribe(t.map(((t,n)=>iOe(rOe({},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(G_e.HEARTBEAT_EVENTS.pulse,(async()=>{await this.checkPending()})),this.relayer.on(mke,(async()=>{await this.onConnect()})),this.relayer.on(yke,(()=>{this.onDisconnect()})),this.events.on(_ke,(async e=>{const t=_ke;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})),this.events.on(Cke,(async e=>{const t=Cke;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=VAe("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 aOe=Object.defineProperty,sOe=Object.getOwnPropertySymbols,cOe=Object.prototype.hasOwnProperty,lOe=Object.prototype.propertyIsEnumerable,uOe=(e,t,n)=>t in e?aOe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let dOe=class extends xCe{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new Nwe,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(mke)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=e=>{this.logger.error(e),this.events.emit(gke,e),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(wke,this.onPayloadHandler),this.provider.on(Eke,this.onConnectHandler),this.provider.on(xke,this.onDisconnectHandler),this.provider.on(Tke,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?dCe.generateChildLogger(e.logger,this.name):dCe.pino(dCe.getDefaultLoggerOptions({level:e.logger||"error"})),this.messages=new Kke(this.logger,e.core),this.subscriber=new oOe(this,this.logger),this.publisher=new Xke(this,this.logger),this.relayUrl=e?.relayUrl||dke,this.projectId=e.projectId,this.bundleId=function(){var e;try{return uAe()&&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 ${fke}...`),await this.restartTransport(fke)}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 dCe.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 o=t=>{t.topic===e&&(this.subscriber.off(_ke,o),r())};return await Promise.all([new Promise((e=>{r=e,this.subscriber.on(_ke,o)})),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 bAe(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(Ske,(()=>{e()}))})),new Promise((async(e,t)=>{try{await bAe(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(xke)}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 u_e())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 xIe(new class{constructor(e){if(this.url=e,this.events=new Nwe,this.registering=!1,!mIe(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(U_e(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!mIe(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=eIe.isReactNative()?{headers:{origin:r}}:{rejectUnauthorized:!yIe(e)},o=new AIe(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"?o.onerror=e=>{const t=e;n(this.emitError(t.error))}:o.on("error",(e=>{n(this.emitError(e))})),o.onopen=()=>{this.onOpen(o),t(o)}}))}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?B_e(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=cIe(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return QCe(e,TIe(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: ${TIe(this.url)}`));return this.events.emit("register_error",t),t}}(pAe({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}),vIe(e)){if(!e.method.endsWith("_subscription"))return;const t=e.params,{topic:n,message:r,publishedAt:i}=t.data,o={topic:n,message:r,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(((e,t)=>{for(var n in t||(t={}))cOe.call(t,n)&&uOe(e,n,t[n]);if(sOe)for(var n of sOe(t))lOe.call(t,n)&&uOe(e,n,t[n]);return e})({type:"event",event:t.id},o)),this.events.emit(t.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else bIe(e)&&this.events.emit(pke,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(hke,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=sIe(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(wke,this.onPayloadHandler),this.provider.off(Eke,this.onConnectHandler),this.provider.off(xke,this.onDisconnectHandler),this.provider.off(Tke,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(vke,(()=>{this.restartTransport().catch((e=>this.logger.error(e)))}));let e=await u_e();d_e((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(yke),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout((async()=>{await this.restartTransport().catch((e=>this.logger.error(e)))}),Kxe.toMiliseconds(Ake)))}isInitialized(){if(!this.initialized){const{message:e}=VAe("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 fOe=Object.defineProperty,hOe=Object.getOwnPropertySymbols,pOe=Object.prototype.hasOwnProperty,mOe=Object.prototype.propertyIsEnumerable,yOe=(e,t,n)=>t in e?fOe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gOe=(e,t)=>{for(var n in t||(t={}))pOe.call(t,n)&&yOe(e,n,t[n]);if(hOe)for(var n of hOe(t))mOe.call(t,n)&&yOe(e,n,t[n]);return e};let vOe=class extends TCe{constructor(e,t,n,r=oke,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=oke,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>{this.getKey&&null!==e&&!XAe(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=>CIe(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=gOe(gOe({},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=dCe.generateChildLogger(t,this.name),this.storagePrefix=r,this.getKey=i}get context(){return dCe.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}=VAe("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}=VAe("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}=VAe("NOT_INITIALIZED",this.name);throw new Error(e)}}},bOe=class extends bCe{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new Nwe,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=oke,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:xAe(Kxe.THIRTY_DAYS)};this.records.set(r.id,r),this.events.emit(Dke,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=EIe(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.events.emit(Lke,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(Fke,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=dCe.generateChildLogger(t,this.name)}get context(){return dCe.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:aIe(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}=VAe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Bke)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:e}=VAe("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(Dke,(e=>{const t=Dke;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(Lke,(e=>{const t=Lke;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(Fke,(e=>{const t=Fke;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.core.heartbeat.on(G_e.HEARTBEAT_EVENTS.pulse,(()=>{this.cleanup()}))}cleanup(){try{this.records.forEach((e=>{Kxe.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}=VAe("NOT_INITIALIZED",this.name);throw new Error(e)}}},wOe=class extends _Ce{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new Nwe,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=oke,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(Uke,{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(zke,{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=dCe.generateChildLogger(t,this.name)}get context(){return dCe.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 wAe("topic",e)}(e);if("number"==typeof e)return function(e){return wAe("id",e)}(e);const{message:t}=VAe("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(Hke)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:e}=VAe("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}=VAe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}checkExpiry(e,t){const{expiry:n}=t;Kxe.toMiliseconds(n)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(jke,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach(((e,t)=>this.checkExpiry(t,e)))}registerEventListeners(){this.core.heartbeat.on(G_e.HEARTBEAT_EVENTS.pulse,(()=>this.checkExpirations())),this.events.on(Uke,(e=>{const t=Uke;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(jke,(e=>{const t=jke;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(zke,(e=>{const t=zke;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=VAe("NOT_INITIALIZED",this.name);throw new Error(e)}}},EOe=class extends CCe{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=Wke,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async e=>{if(this.verifyDisabled||uAe()||!dAe())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=Gke;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,Gke)}return n},this.fetchAttestation=async(e,t)=>{this.logger.info(`resolving attestation: ${e} from url: ${t}`);const n=this.startAbortTimer(2*Kxe.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(Wke))return n();window.addEventListener("message",t);const r=document.createElement("iframe");r.id=Wke,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")}),Kxe.toMiliseconds(Kxe.FIVE_SECONDS))))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=e=>{let t=e||Vke;return qke.includes(t)||(this.logger.info(`verify url: ${t}, not included in trusted list, assigning default: ${Vke}`),t=Vke),t},this.logger=dCe.generateChildLogger(t,this.name),this.verifyUrl=Vke,this.abortController=new AbortController,this.isDevEnv=lAe()&&process.env.IS_VITEST}get context(){return dCe.getLoggerContext(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout((()=>this.abortController.abort()),Kxe.toMiliseconds(e))}},xOe=class extends ICe{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,o=`https://echo.walletconnect.com/${this.projectId}/clients`;await SIe(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:t,type:r,token:n,always_raw:i})})},this.logger=dCe.generateChildLogger(t,this.context)}};var TOe=Object.defineProperty,AOe=Object.getOwnPropertySymbols,_Oe=Object.prototype.hasOwnProperty,COe=Object.prototype.propertyIsEnumerable,IOe=(e,t,n)=>t in e?TOe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SOe=(e,t)=>{for(var n in t||(t={}))_Oe.call(t,n)&&IOe(e,n,t[n]);if(AOe)for(var n of AOe(t))COe.call(t,n)&&IOe(e,n,t[n]);return e};const kOe=class e extends vCe{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=ike,this.events=new Nwe,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||dke,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:dCe.pino(dCe.getDefaultLoggerOptions({level:e?.logger||ake}));this.logger=dCe.generateChildLogger(t,this.name),this.heartbeat=new G_e.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(),WCe(VCe(await this.getClientSeed()).publicKey)),this.generateKeyPair=()=>{this.isInitialized();const e=function(){const e=OEe.generateKeyPair();return{privateKey:Nxe(e.secretKey,BTe),publicKey:Nxe(e.publicKey,BTe)}}();return this.setPrivateKey(e.publicKey,e.privateKey)},this.signJWT=async e=>{this.isInitialized();const t=VCe(await this.getClientSeed()),n=KTe(),r=lke;return await GCe(n,e,r,t)},this.generateSharedKey=(e,t,n)=>{this.isInitialized();const r=function(e,t){const n=OEe.sharedKey(Rxe(e,BTe),Rxe(t,BTe),!0);return Nxe(new EEe(kEe.SHA256,n).expand(qTe),BTe)}(this.getPrivateKey(e),t);return this.setSymKey(r,n)},this.setSymKey=async(e,t)=>{this.isInitialized();const n=t||function(e){return Nxe(kEe.hash(Rxe(e,BTe)),BTe)}(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=QTe(n),i=U_e(t);if($Te(r)){const t=r.senderPublicKey,n=r.receiverPublicKey;e=await this.generateSharedKey(t,n)}const o=this.getSymKey(e),{type:a,senderPublicKey:s}=r;return ZTe({type:a,symKey:o,message:i,senderPublicKey:s})},this.decode=async(e,t,n)=>{this.isInitialized();const r=function(e,t){const n=JTe(e);return QTe({type:YTe(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?Nxe(n.senderPublicKey,BTe):void 0,receiverPublicKey:t?.receiverPublicKey})}(t,n);if($Te(r)){const t=r.receiverPublicKey,n=r.senderPublicKey;e=await this.generateSharedKey(t,n)}try{const n=function(e){const t=new zwe.ChaCha20Poly1305(Rxe(e.symKey,BTe)),{sealed:n,iv:r}=JTe(e.encoded),i=t.open(r,n);if(null===i)throw new Error("Failed to decrypt");return Nxe(i,zTe)}({symKey:this.getSymKey(e),encoded:t});return B_e(n)}catch(t){this.logger.error(`Failed to decode message from topic: '${e}', clientId: '${await this.getClientId()}'`),this.logger.error(t)}},this.getPayloadType=e=>YTe(JTe(e).type),this.getPayloadSenderPublicKey=e=>{const t=JTe(e);return t.senderPublicKey?Nxe(t.senderPublicKey,BTe):void 0},this.core=e,this.logger=dCe.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=oke,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}=VAe("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=dCe.generateChildLogger(t,this.name)}get context(){return dCe.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,yAe(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?gAe(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=VAe("NOT_INITIALIZED",this.name);throw new Error(e)}}}(this.core,this.logger)}get context(){return dCe.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(cke)}catch{e=KTe(),await this.keychain.set(cke,e)}return function(e,t="utf8"){const n=rke[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}`):$Se(globalThis.Buffer.from(e,"utf-8"))}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=VAe("NOT_INITIALIZED",this.name);throw new Error(e)}}}(this,this.logger,e?.keychain),this.history=new bOe(this,this.logger),this.expirer=new wOe(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=H_e.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(W_e)}async getItem(e){const t=this.localStorage.getItem(e);if(null!==t)return B_e(t)}async setItem(e,t){this.localStorage.setItem(e,U_e(t))}async removeItem(e){this.localStorage.removeItem(e)}};this.storage=e;try{const t=new class{constructor(){this.indexedDb=I_e({driver:z_e({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,U_e(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 o=await e.getKeys();if(!o.length)return void n(t);const a=[];for(;o.length;){const n=o.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),a.push(n)}}await t.setItem(r,1),n(t),V_e(e,a)})(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)}))}}(SOe(SOe({},ske),e?.storageOptions)),this.relayer=new dOe({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 Nwe,this.initialized=!1,this.storagePrefix=oke,this.ignoredPayloadTypes=[HTe],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=KTe(),t=await this.core.crypto.setSymKey(e),n=xAe(Kxe.FIVE_MINUTES),r={protocol:"irn"},i={topic:t,expiry:n,relay:r,active:!1},o=BAe({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:o}},this.pair=async e=>{this.isInitialized(),this.isValidPair(e);const{topic:t,symKey:n,relay:r,expiryTimestamp:i}=LAe(e.uri);let o;if(this.pairings.keys.includes(t)&&(o=this.pairings.get(t),o.active))throw new Error(`Pairing already exists: ${t}. Please try again with a new connection URI.`);const a=i||xAe(Kxe.FIVE_MINUTES),s={topic:t,relay:r,expiry:a,active:!1};return await this.pairings.set(t,s),this.core.expirer.set(t,a),e.activatePairing&&await this.activate({topic:t}),this.events.emit(Pke,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=xAe(Kxe.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}=vAe();this.events.once(AAe("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",GAe("USER_DISCONNECTED")),await this.deletePairing(t))},this.sendRequest=async(e,t,n)=>{const r=aIe(t,n),i=await this.core.crypto.encode(e,r),o=Oke[t].req;return this.core.history.set(e,r),this.core.relayer.publish(e,i,o),r.id},this.sendResult=async(e,t,n)=>{const r=sIe(e,n),i=await this.core.crypto.encode(t,r),o=await this.core.history.get(t,e),a=Oke[o.request.method].res;await this.core.relayer.publish(t,i,a),await this.core.history.resolve(r)},this.sendError=async(e,t,n)=>{const r=cIe(e,n),i=await this.core.crypto.encode(t,r),o=await this.core.history.get(t,e),a=Oke[o.request.method]?Oke[o.request.method].res:Oke.unregistered_method.res;await this.core.relayer.publish(t,i,a),await this.core.history.resolve(r)},this.deletePairing=async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,GAe("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=>TAe(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(Mke,{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((()=>{wIe(t)?this.events.emit(AAe("pairing_ping",n),{}):EIe(t)&&this.events.emit(AAe("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(Nke,{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=GAe("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(GAe("WC_METHOD_UNSUPPORTED",e))},this.isValidPair=e=>{var t;if(!i_e(e)){const{message:t}=VAe("MISSING_OR_INVALID",`pair() params: ${e}`);throw new Error(t)}if(!function(e){if(YAe(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}(e.uri)){const{message:t}=VAe("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw new Error(t)}const n=LAe(e.uri);if(null==(t=n?.relay)||!t.protocol){const{message:e}=VAe("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(e)}if(null==n||!n.symKey){const{message:e}=VAe("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(e)}if(null!=n&&n.expiryTimestamp&&Kxe.toMiliseconds(n?.expiryTimestamp)<Date.now()){const{message:e}=VAe("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw new Error(e)}},this.isValidPing=async e=>{if(!i_e(e)){const{message:t}=VAe("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidDisconnect=async e=>{if(!i_e(e)){const{message:t}=VAe("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidPairingTopic=async e=>{if(!YAe(e,!1)){const{message:t}=VAe("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.pairings.keys.includes(e)){const{message:t}=VAe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(TAe(this.pairings.get(e).expiry)){await this.deletePairing(e);const{message:t}=VAe("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}},this.core=e,this.logger=dCe.generateChildLogger(t,this.name),this.pairings=new vOe(this.core,this.logger,this.name,this.storagePrefix)}get context(){return dCe.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=VAe("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(hke,(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{vIe(r)?(this.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):bIe(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(jke,(async e=>{const{topic:t}=EAe(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(Rke,{topic:t}))}))}}(this,this.logger),this.verify=new EOe(this.projectId||"",this.logger),this.echoClient=new xOe(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 dCe.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}}},OOe="client",POe=`wc@2:${OOe}:`,ROe=OOe,NOe="error",MOe="WALLETCONNECT_DEEPLINK_CHOICE",DOe="Proposal expired",LOe=Kxe.SEVEN_DAYS,FOe={wc_sessionPropose:{req:{ttl:Kxe.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Kxe.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:Kxe.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Kxe.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Kxe.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Kxe.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Kxe.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Kxe.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Kxe.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Kxe.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Kxe.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Kxe.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Kxe.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Kxe.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Kxe.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:Kxe.THIRTY_SECONDS,prompt:!1,tag:1115}}},BOe={min:Kxe.FIVE_MINUTES,max:Kxe.SEVEN_DAYS},UOe="IDLE",zOe="ACTIVE",jOe=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var HOe=Object.defineProperty,WOe=Object.defineProperties,VOe=Object.getOwnPropertyDescriptors,GOe=Object.getOwnPropertySymbols,qOe=Object.prototype.hasOwnProperty,KOe=Object.prototype.propertyIsEnumerable,XOe=(e,t,n)=>t in e?HOe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,YOe=(e,t)=>{for(var n in t||(t={}))qOe.call(t,n)&&XOe(e,n,t[n]);if(GOe)for(var n of GOe(t))KOe.call(t,n)&&XOe(e,n,t[n]);return e},ZOe=(e,t)=>WOe(e,VOe(t));class JOe extends kCe{constructor(e){super(e),this.name="engine",this.events=new Nwe,this.initialized=!1,this.ignoredPayloadTypes=[HTe],this.requestQueue={state:UOe,queue:[]},this.sessionRequestQueue={state:UOe,queue:[]},this.requestQueueDelay=Kxe.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(FOe)}),this.initialized=!0,setTimeout((()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()}),Kxe.toMiliseconds(this.requestQueueDelay)))},this.connect=async e=>{await this.isInitialized();const t=ZOe(YOe({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t);const{pairingTopic:n,requiredNamespaces:r,optionalNamespaces:i,sessionProperties:o,relays:a}=t;let s,c=n,l=!1;if(c&&(l=this.client.core.pairing.pairings.get(c).active),!c||!l){const{topic:e,uri:t}=await this.client.core.pairing.create();c=e,s=t}const u=await this.client.core.crypto.generateKeyPair(),d=FOe.wc_sessionPropose.req.ttl||Kxe.FIVE_MINUTES,f=xAe(d),h=YOe({requiredNamespaces:r,optionalNamespaces:i,relays:a??[{protocol:"irn"}],proposer:{publicKey:u,metadata:this.client.metadata},expiryTimestamp:f},o&&{sessionProperties:o}),{reject:p,resolve:m,done:y}=vAe(d,DOe);if(this.events.once(AAe("session_connect"),(async({error:e,session:t})=>{if(e)p(e);else if(t){t.self.publicKey=u;const e=ZOe(YOe({},t),{requiredNamespaces:h.requiredNamespaces,optionalNamespaces:h.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}=VAe("NO_MATCHING_KEY",`connect() pairing topic: ${c}`);throw new Error(e)}const g=await this.sendRequest({topic:c,method:"wc_sessionPropose",params:h,throwOnFailedPublish:!0});return await this.setProposal(g,YOe({id:g},h)),{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,o=this.client.proposal.get(t);let{pairingTopic:a,proposer:s,requiredNamespaces:c,optionalNamespaces:l}=o;a=a||"";const u=await this.client.core.crypto.generateKeyPair(),d=s.publicKey,f=await this.client.core.crypto.generateSharedKey(u,d);a&&t&&(await this.client.core.pairing.updateMetadata({topic:a,metadata:s.metadata}),await this.sendResult({id:t,topic:a,result:{relay:{protocol:n??"irn"},responderPublicKey:u}}),await this.client.proposal.delete(t,GAe("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:a}));const h=YOe({relay:{protocol:n??"irn"},namespaces:r,pairingTopic:a,controller:{publicKey:u,metadata:this.client.metadata},expiry:xAe(LOe)},i&&{sessionProperties:i});await this.client.core.relayer.subscribe(f);const p=ZOe(YOe({},h),{topic:f,requiredNamespaces:c,optionalNamespaces:l,pairingTopic:a,acknowledged:!1,self:h.controller,peer:{publicKey:s.publicKey,metadata:s.metadata},controller:u});await this.client.session.set(f,p);try{await this.sendRequest({topic:f,method:"wc_sessionSettle",params:h,throwOnFailedPublish:!0})}catch(e){throw this.client.logger.error(e),this.client.session.delete(f,GAe("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(f),e}return await this.setExpiry(f,xAe(LOe)),{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,GAe("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:o,reject:a}=vAe();return this.events.once(AAe("session_update",r),(({error:e})=>{e?a(e):o()})),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:o}=vAe();return this.events.once(AAe("session_extend",n),(({error:e})=>{e?o(e):i()})),await this.setExpiry(t,xAe(LOe)),{acknowledged:r}},this.request=async e=>{await this.isInitialized(),await this.isValidRequest(e);const{chainId:t,request:n,topic:r,expiry:i=FOe.wc_sessionRequest.req.ttl}=e,o=iIe(),{done:a,resolve:s,reject:c}=vAe(i,"Request expired. Please try again.");return this.events.once(AAe("session_request",o),(({error:e,result:t})=>{e?c(e):s(t)})),await Promise.all([new Promise((async e=>{await this.sendRequest({clientRpcId:o,topic:r,method:"wc_sessionRequest",params:{request:ZOe(YOe({},n),{expiryTimestamp:xAe(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:o}),e()})),new Promise((async e=>{const t=await async function(e,t){try{return await e.getItem(t)||(dAe()?localStorage.getItem(t):void 0)}catch(e){console.error(e)}}(this.client.core.storage,MOe);(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 o=`${i}/wc?requestId=${e}&sessionTopic=${t}`,a=fAe();a===sAe.browser?o.startsWith("https://")?window.open(o,"_blank","noreferrer noopener"):window.open(o,"_self","noreferrer noopener"):a===sAe.reactNative&&typeof(null==global?void 0:global.Linking)<"u"&&await global.Linking.openURL(o)}catch(e){console.error(e)}})({id:o,topic:r,wcDeepLink:t}),e()})),a()]).then((e=>e[2]))},this.respond=async e=>{await this.isInitialized(),await this.isValidRespond(e);const{topic:t,response:n}=e,{id:r}=n;wIe(n)?await this.sendResult({id:r,topic:t,result:n.result,throwOnFailedPublish:!0}):EIe(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}=vAe();this.events.once(AAe("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:GAe("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:t,emitEvent:!1});else{if(!this.client.core.pairing.pairings.keys.includes(t)){const{message:e}=VAe("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 o=!0;return!!mAe(i,r)&&(r.forEach((t=>{const{accounts:r,methods:i,events:a}=e.namespaces[t],s=UAe(r),c=n[t];mAe(LTe(t,c),s)&&mAe(c.methods,i)&&mAe(c.events,a)||(o=!1)})),o)}(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:o}=this.client.session.get(t);await this.client.core.relayer.unsubscribe(t),await this.client.session.delete(t,GAe("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(o.publicKey)&&await this.client.core.crypto.deleteKeyPair(o.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(MOe).catch((e=>this.client.logger.warn(e))),this.getPendingSessionRequests().forEach((e=>{e.topic===t&&this.deletePendingSessionRequest(e.id,GAe("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,GAe("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=UOe,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,xAe(FOe.wc_sessionPropose.req.ttl))},this.setPendingSessionRequest=async e=>{const{id:t,topic:n,params:r,verifyContext:i}=e,o=r.request.expiryTimestamp||xAe(FOe.wc_sessionRequest.req.ttl);await this.client.pendingRequest.set(t,{id:t,topic:n,params:r,verifyContext:i}),o&&this.client.core.expirer.set(t,o)},this.sendRequest=async e=>{const{topic:t,method:n,params:r,expiry:i,relayRpcId:o,clientRpcId:a,throwOnFailedPublish:s}=e,c=aIe(n,r,a);if(dAe()&&jOe.includes(n)){const e=XTe(JSON.stringify(c));this.client.core.verify.register({attestationId:e})}const l=await this.client.core.crypto.encode(t,c),u=FOe[n].req;return i&&(u.ttl=i),o&&(u.id=o),this.client.core.history.set(t,c),s?(u.internal=ZOe(YOe({},u.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(t,l,u)):this.client.core.relayer.publish(t,l,u).catch((e=>this.client.logger.error(e))),c.id},this.sendResult=async e=>{const{id:t,topic:n,result:r,throwOnFailedPublish:i}=e,o=sIe(t,r),a=await this.client.core.crypto.encode(n,o),s=await this.client.core.history.get(n,t),c=FOe[s.request.method].res;i?(c.internal=ZOe(YOe({},c.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,a,c)):this.client.core.relayer.publish(n,a,c).catch((e=>this.client.logger.error(e))),await this.client.core.history.resolve(o)},this.sendError=async(e,t,n)=>{const r=cIe(e,n),i=await this.client.core.crypto.encode(t,r),o=await this.client.core.history.get(t,e),a=FOe[o.request.method].res;this.client.core.relayer.publish(t,i,a),await this.client.core.history.resolve(r)},this.cleanup=async()=>{const e=[],t=[];this.client.session.getAll().forEach((t=>{let n=!1;TAe(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=>{TAe(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!==zOe){for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=zOe;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=UOe}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}=VAe("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(YOe({},t.params));const i=n.expiryTimestamp||xAe(FOe.wc_sessionPropose.req.ttl),o=YOe({id:r,pairingTopic:e,expiryTimestamp:i},n);await this.setProposal(r,o);const a=XTe(JSON.stringify(t)),s=await this.getVerifyContext(a,o.proposer.metadata);this.client.events.emit("session_proposal",{id:r,params:o,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(wIe(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 o=i.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:o});const a=r.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:a});const s=await this.client.core.crypto.generateSharedKey(o,a);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 EIe(t)&&(await this.client.proposal.delete(n,GAe("USER_DISCONNECTED")),this.events.emit(AAe("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:o,namespaces:a,sessionProperties:s,pairingTopic:c}=t.params,l=YOe({topic:e,relay:n,expiry:o,namespaces:a,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(AAe("session_connect"),{session:l}),this.cleanupDuplicatePairings(l)}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionSettleResponse=async(e,t)=>{const{id:n}=t;wIe(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(AAe("session_approve",n),{})):EIe(t)&&(await this.client.session.delete(e,GAe("USER_DISCONNECTED")),this.events.emit(AAe("session_approve",n),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{const{params:n,id:r}=t;try{const t=`${e}_session_update`,i=h_e.get(t);if(i&&this.isRequestOutOfSync(i,r))return void this.client.logger.info(`Discarding out of sync request - ${r}`);this.isValidUpdate(YOe({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}),h_e.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;wIe(t)?this.events.emit(AAe("session_update",n),{}):EIe(t)&&this.events.emit(AAe("session_update",n),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{const{id:n}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,xAe(LOe)),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;wIe(t)?this.events.emit(AAe("session_extend",n),{}):EIe(t)&&this.events.emit(AAe("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((()=>{wIe(t)?this.events.emit(AAe("session_ping",n),{}):EIe(t)&&this.events.emit(AAe("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(bke,(async()=>{t(await this.deleteSession({topic:e,id:n}))}))})),this.sendResult({id:n,topic:e,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:e,error:GAe("USER_DISCONNECTED")})])}catch(e){this.client.logger.error(e)}},this.onSessionRequest=async(e,t)=>{const{id:n,params:r}=t;try{this.isValidRequest(YOe({topic:e},r));const t=XTe(JSON.stringify(aIe("wc_sessionRequest",r,n))),i=this.client.session.get(e),o={id:n,topic:e,params:r,verifyContext:await this.getVerifyContext(t,i.peer.metadata)};await this.setPendingSessionRequest(o),this.addSessionRequestToSessionRequestQueue(o),this.processSessionRequestQueue()}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionRequestResponse=(e,t)=>{const{id:n}=t;wIe(t)?this.events.emit(AAe("session_request",n),{result:t.result}):EIe(t)&&this.events.emit(AAe("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=h_e.get(t);if(i&&this.isRequestOutOfSync(i,n))return void this.client.logger.info(`Discarding out of sync request - ${n}`);this.isValidEmit(YOe({topic:e},r)),this.client.events.emit("session_event",{id:n,topic:e,params:r}),h_e.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=UOe,this.processSessionRequestQueue()}),Kxe.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(AAe("session_request",e.request.id),{error:t})}))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===zOe)return void this.client.logger.info("session request queue is already active.");const e=this.sessionRequestQueue.queue[0];if(e)try{this.sessionRequestQueue.state=zOe,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,aIe("wc_sessionPropose",{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties},t.id))},this.isValidConnect=async e=>{if(!i_e(e)){const{message:t}=VAe("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw new Error(t)}const{pairingTopic:t,requiredNamespaces:n,optionalNamespaces:r,sessionProperties:i,relays:o}=e;if(XAe(t)||await this.isValidPairingTopic(t),!function(e,t){let n=!1;return t&&!e?n=!0:e&&qAe(e)&&e.length&&e.forEach((e=>{n=r_e(e)})),n}(o,!0)){const{message:e}=VAe("MISSING_OR_INVALID",`connect() relays: ${o}`);throw new Error(e)}!XAe(n)&&0!==KAe(n)&&this.validateNamespaces(n,"requiredNamespaces"),!XAe(r)&&0!==KAe(r)&&this.validateNamespaces(r,"optionalNamespaces"),XAe(i)||this.validateSessionProps(i,"sessionProperties")},this.validateNamespaces=(e,t)=>{const n=function(e,t,n){let r=null;if(e&&KAe(e)){const i=t_e(e,t);i&&(r=i);const o=$Ae(e,t,n);o&&(r=o)}else r=VAe("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(!i_e(e))throw new Error(VAe("MISSING_OR_INVALID",`approve() params: ${e}`).message);const{id:t,namespaces:n,relayProtocol:r,sessionProperties:i}=e;await this.isValidProposalId(t);const o=this.client.proposal.get(t),a=n_e(n,"approve()");if(a)throw new Error(a.message);const s=c_e(o.requiredNamespaces,n,"approve()");if(s)throw new Error(s.message);if(!YAe(r,!0)){const{message:e}=VAe("MISSING_OR_INVALID",`approve() relayProtocol: ${r}`);throw new Error(e)}XAe(i)||this.validateSessionProps(i,"sessionProperties")},this.isValidReject=async e=>{if(!i_e(e)){const{message:t}=VAe("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&&ZAe(e.code,!1)&&e.message&&YAe(e.message,!1))}(n)){const{message:e}=VAe("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidSessionSettleRequest=e=>{if(!i_e(e)){const{message:t}=VAe("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw new Error(t)}const{relay:t,controller:n,namespaces:r,expiry:i}=e;if(!r_e(t)){const{message:e}=VAe("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(e)}const o=function(e,t){let n=null;return YAe(e?.publicKey,!1)||(n=VAe("MISSING_OR_INVALID",`${t} controller public key should be a string`)),n}(n,"onSessionSettleRequest()");if(o)throw new Error(o.message);const a=n_e(r,"onSessionSettleRequest()");if(a)throw new Error(a.message);if(TAe(i)){const{message:e}=VAe("EXPIRED","onSessionSettleRequest()");throw new Error(e)}},this.isValidUpdate=async e=>{if(!i_e(e)){const{message:t}=VAe("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=n_e(n,"update()");if(i)throw new Error(i.message);const o=c_e(r.requiredNamespaces,n,"update()");if(o)throw new Error(o.message)},this.isValidExtend=async e=>{if(!i_e(e)){const{message:t}=VAe("MISSING_OR_INVALID",`extend() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!i_e(e)){const{message:t}=VAe("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:o}=this.client.session.get(t);if(!o_e(o,r)){const{message:e}=VAe("MISSING_OR_INVALID",`request() chainId: ${r}`);throw new Error(e)}if(!function(e){return!(XAe(e)||!YAe(e.method,!1))}(n)){const{message:e}=VAe("MISSING_OR_INVALID",`request() ${JSON.stringify(n)}`);throw new Error(e)}if(!a_e(o,r,n.method)){const{message:e}=VAe("MISSING_OR_INVALID",`request() method: ${n.method}`);throw new Error(e)}if(i&&!function(e,t){return ZAe(e,!1)&&e<=t.max&&e>=t.min}(i,BOe)){const{message:e}=VAe("MISSING_OR_INVALID",`request() expiry: ${i}. Expiry must be a number (in seconds) between ${BOe.min} and ${BOe.max}`);throw new Error(e)}},this.isValidRespond=async e=>{var t;if(!i_e(e)){const{message:t}=VAe("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!(XAe(e)||XAe(e.result)&&XAe(e.error)||!ZAe(e.id,!1)||!YAe(e.jsonrpc,!1))}(r)){const{message:e}=VAe("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidPing=async e=>{if(!i_e(e)){const{message:t}=VAe("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!i_e(e)){const{message:t}=VAe("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(!o_e(i,r)){const{message:e}=VAe("MISSING_OR_INVALID",`emit() chainId: ${r}`);throw new Error(e)}if(!function(e){return!(XAe(e)||!YAe(e.name,!1))}(n)){const{message:e}=VAe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}if(!s_e(i,r,n.name)){const{message:e}=VAe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidDisconnect=async e=>{if(!i_e(e)){const{message:t}=VAe("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||Vke,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(!YAe(e,!1)){const{message:n}=VAe("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}=VAe("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(hke,(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{vIe(r)?(this.client.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):bIe(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(jke,(async e=>{const{topic:t,id:n}=EAe(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,VAe("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(Pke,(e=>this.onPairingCreated(e)))}isValidPairingTopic(e){if(!YAe(e,!1)){const{message:t}=VAe("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}=VAe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(TAe(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=VAe("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!YAe(e,!1)){const{message:t}=VAe("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(!this.client.session.keys.includes(e)){const{message:t}=VAe("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if(TAe(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:t}=VAe("EXPIRED",`session topic: ${e}`);throw new Error(t)}if(!this.client.core.crypto.keychain.has(e)){const{message:t}=VAe("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(YAe(e,!1)){const{message:t}=VAe("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}{const{message:t}=VAe("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}=VAe("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=VAe("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if(TAe(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:t}=VAe("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}}class QOe extends vOe{constructor(e,t){super(e,t,"proposal",POe),this.core=e,this.logger=t}}let $Oe=class extends vOe{constructor(e,t){super(e,t,"session",POe),this.core=e,this.logger=t}};class ePe extends vOe{constructor(e,t){super(e,t,"request",POe,(e=>e.id)),this.core=e,this.logger=t}}let tPe=class e extends SCe{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=ROe,this.events=new Nwe,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||ROe,this.metadata=e?.metadata||xTe()||{name:"",description:"",url:"",icons:[""]};const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:dCe.pino(dCe.getDefaultLoggerOptions({level:e?.logger||NOe}));this.core=e?.core||new kOe(e),this.logger=dCe.generateChildLogger(t,this.name),this.session=new $Oe(this.core,this.logger),this.proposal=new QOe(this.core,this.logger),this.pendingRequest=new ePe(this.core,this.logger),this.engine=new JOe(this)}static async init(t){const n=new e(t);return await n.initialize(),n}get context(){return dCe.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 nPe={exports:{}};!function(e,t){var n="undefined"!=typeof self?self:lt,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}}(),o="FormData"in e,a="ArrayBuffer"in e;if(a)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 l(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 u(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 h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(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=p(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 g(){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:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(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=h(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?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e,t,n,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=p(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)},o&&(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=l(e),t=u(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},f.prototype.delete=function(e){delete this.map[l(e)]},f.prototype.get=function(e){return e=l(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(l(e))},f.prototype.set=function(e,t){this.map[l(e)]=u(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 v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(e,t){var n,r,i=(t=t||{}).body;if(e instanceof b){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(),v.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 E(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)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},g.call(b.prototype),g.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var x=[301,302,303,307,308];E.redirect=function(e,t){if(-1===x.indexOf(t))throw new RangeError("Invalid status code");return new E(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 T(e,n){return new Promise((function(r,o){var a=new b(e,n);if(a.signal&&a.signal.aborted)return o(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 E(i,n))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}T.polyfill=!0,e.fetch||(e.fetch=T,e.Headers=f,e.Request=b,e.Response=E),t.Headers=f,t.Request=b,t.Response=E,t.fetch=T,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}(nPe,nPe.exports);var rPe=ut(nPe.exports);const iPe={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class oPe{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new Nwe,this.isAvailable=!1,this.registering=!1,!pIe(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=U_e(e),n=await rPe(this.url,Object.assign(Object.assign({},iPe),{body:t})),r=await n.json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!pIe(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=U_e({id:1,jsonrpc:"2.0",method:"test",params:[]});await rPe(e,Object.assign(Object.assign({},iPe),{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?B_e(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=cIe(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return QCe(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}const aPe="error",sPe="wc@2:universal_provider:",cPe="default_chain_changed";var lPe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},uPe={exports:{}};
|
|
77
77
|
/**
|
|
78
78
|
* @license
|
|
79
79
|
* Lodash <https://lodash.com/>
|