vendor: 5,036 bytes, lines 1-9
1function _mergeNamespaces(yt,_e){for(var $t=0;$t<_e.length;$t++){const Ft=_e[$t];if(typeof Ft!="string"&&!Array.isArray(Ft)){for(const Vt in Ft)if(Vt!=="default"&&!(Vt in yt)){const qt=Object.getOwnPropertyDescriptor(Ft,Vt);qt&&Object.defineProperty(yt,Vt,qt.get?qt:{enumerable:!0,get:()=>Ft[Vt]})}}}return Object.freeze(Object.defineProperty(yt,Symbol.toStringTag,{value:"Module"}))}(function(){const _e=document.createElement("link").relList;if(_e&&_e.supports&&_e.supports("modulepreload"))return;for(const Vt of document.querySelectorAll('link[rel="modulepreload"]'))Ft(Vt);new MutationObserver(Vt=>{for(const qt of Vt)if(qt.type==="childList")for(const zt of qt.addedNodes)zt.tagName==="LINK"&&zt.rel==="modulepreload"&&Ft(zt)}).observe(document,{childList:!0,subtree:!0});function $t(Vt){const qt={};return Vt.integrity&&(qt.integrity=Vt.integrity),Vt.referrerPolicy&&(qt.referrerPolicy=Vt.referrerPolicy),Vt.crossOrigin==="use-credentials"?qt.credentials="include":Vt.crossOrigin==="anonymous"?qt.credentials="omit":qt.credentials="same-origin",qt}function Ft(Vt){if(Vt.ep)return;Vt.ep=!0;const qt=$t(Vt);fetch(Vt.href,qt)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};function getDefaultExportFromCjs$1(yt){return yt&&yt.__esModule&&Object.prototype.hasOwnProperty.call(yt,"default")?yt.default:yt}function getAugmentedNamespace(yt){if(yt.__esModule)return yt;var _e=yt.default;if(typeof _e=="function"){var $t=function Ft(){return this instanceof Ft?Reflect.construct(_e,arguments,this.constructor):_e.apply(this,arguments)};$t.prototype=_e.prototype}else $t={};return Object.defineProperty($t,"__esModule",{value:!0}),Object.keys(yt).forEach(function(Ft){var Vt=Object.getOwnPropertyDescriptor(yt,Ft);Object.defineProperty($t,Ft,Vt.get?Vt:{enumerable:!0,get:function(){return yt[Ft]}})}),$t}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var l$6=Symbol.for("react.element"),n$3=Symbol.for("react.portal"),p$7=Symbol.for("react.fragment"),q$3=Symbol.for("react.strict_mode"),r$5=Symbol.for("react.profiler"),t$3=Symbol.for("react.provider"),u$3=Symbol.for("react.context"),v$5=Symbol.for("react.forward_ref"),w$5=Symbol.for("react.suspense"),x$5=Symbol.for("react.memo"),y$5=Symbol.for("react.lazy"),z$5=Symbol.iterator;function A$4(yt){return yt===null||typeof yt!="object"?null:(yt=z$5&&yt[z$5]||yt["@@iterator"],typeof yt=="function"?yt:null)}var B$4={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C$4=Object.assign,D$3={};function E$5(yt,_e,$t){this.props=yt,this.context=_e,this.refs=D$3,this.updater=$t||B$4}E$5.prototype.isReactComponent={};E$5.prototype.setState=function(yt,_e){if(typeof yt!="object"&&typeof yt!="function"&&yt!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,yt,_e,"setState")};E$5.prototype.forceUpdate=function(yt){this.updater.enqueueForceUpdate(this,yt,"forceUpdate")};function F$2(){}F$2.prototype=E$5.prototype;function G$3(yt,_e,$t){this.props=yt,this.context=_e,this.refs=D$3,this.updater=$t||B$4}var H$4=G$3.prototype=new F$2;H$4.constructor=G$3;C$4(H$4,E$5.prototype);H$4.isPureReactComponent=!0;var I$4=Array.isArray,J$3=Object.prototype.hasOwnProperty,K$4={current:null},L$4={key:!0,ref:!0,__self:!0,__source:!0};function M$4(yt,_e,$t){var Ft,Vt={},qt=null,zt=null;if(_e!=null)for(Ft in _e.ref!==void 0&&(zt=_e.ref),_e.key!==void 0&&(qt=""+_e.key),_e)J$3.call(_e,Ft)&&!L$4.hasOwnProperty(Ft)&&(Vt[Ft]=_e[Ft]);var Ht=arguments.length-2;if(Ht===1)Vt.children=$t;else if(1<Ht){for(var Kt=Array(Ht),Gt=0;Gt<Ht;Gt++)Kt[Gt]=arguments[Gt+2];Vt.children=Kt}if(yt&&yt.defaultProps)for(Ft in Ht=yt.defaultProps,Ht)Vt[Ft]===void 0&&(Vt[Ft]=Ht[Ft]);return{$$typeof:l$6,type:yt,key:qt,ref:zt,props:Vt,_owner:K$4.current}}function N$4(yt,_e){return{$$typeof:l$6,type:yt.type,key:_e,ref:yt.ref,props:yt.props,_owner:yt._owner}}function O$5(yt){return typeof yt=="object"&&yt!==null&&yt.$$typeof===l$6}function escape(yt){var _e={"=":"=0",":":"=2"};return"$"+yt.replace(/[=:]/g,function($t){return _e[$t]})}var P$5=/\/+/g;function Q$4(yt,_e){return typeof yt=="object"&&yt!==null&&yt.key!=null?escape(""+yt.key):_e.toString(36)}function R$4(yt,_e,$t,Ft,Vt){var qt=typeof yt;(qt==="undefined"||qt==="boolean")&&(yt=null);var zt=!1;if(yt===null)zt=!0;else switch(qt){case"string":case"number":zt=!0;break;case"object":switch(yt.$$typeof){case l$6:case n$3:zt=!0}}if(zt)return zt=yt,Vt=Vt(zt),yt=Ft===""?"."+Q$4(zt,0):Ft,I$4(Vt)?($t="",yt!=null&&($t=yt.replace(P$5,"$&/")+"/"),R$4(Vt,_e,$t,"",function(Gt){return Gt}
vendor: 5,540 bytes, lines 9-17
9)):Vt!=null&&(O$5(Vt)&&(Vt=N$4(Vt,$t+(!Vt.key||zt&&zt.key===Vt.key?"":(""+Vt.key).replace(P$5,"$&/")+"/")+yt)),_e.push(Vt)),1;if(zt=0,Ft=Ft===""?".":Ft+":",I$4(yt))for(var Ht=0;Ht<yt.length;Ht++){qt=yt[Ht];var Kt=Ft+Q$4(qt,Ht);zt+=R$4(qt,_e,$t,Kt,Vt)}else if(Kt=A$4(yt),typeof Kt=="function")for(yt=Kt.call(yt),Ht=0;!(qt=yt.next()).done;)qt=qt.value,Kt=Ft+Q$4(qt,Ht++),zt+=R$4(qt,_e,$t,Kt,Vt);else if(qt==="object")throw _e=String(yt),Error("Objects are not valid as a React child (found: "+(_e==="[object Object]"?"object with keys {"+Object.keys(yt).join(", ")+"}":_e)+"). If you meant to render a collection of children, use an array instead.");return zt}function S$5(yt,_e,$t){if(yt==null)return yt;var Ft=[],Vt=0;return R$4(yt,Ft,"","",function(qt){return _e.call($t,qt,Vt++)}),Ft}function T$5(yt){if(yt._status===-1){var _e=yt._result;_e=_e(),_e.then(function($t){(yt._status===0||yt._status===-1)&&(yt._status=1,yt._result=$t)},function($t){(yt._status===0||yt._status===-1)&&(yt._status=2,yt._result=$t)}),yt._status===-1&&(yt._status=0,yt._result=_e)}if(yt._status===1)return yt._result.default;throw yt._result}var U$4={current:null},V$4={transition:null},W$4={ReactCurrentDispatcher:U$4,ReactCurrentBatchConfig:V$4,ReactCurrentOwner:K$4};function X$4(){throw Error("act(...) is not supported in production builds of React.")}react_production_min.Children={map:S$5,forEach:function(yt,_e,$t){S$5(yt,function(){_e.apply(this,arguments)},$t)},count:function(yt){var _e=0;return S$5(yt,function(){_e++}),_e},toArray:function(yt){return S$5(yt,function(_e){return _e})||[]},only:function(yt){if(!O$5(yt))throw Error("React.Children.only expected to receive a single React element child.");return yt}};react_production_min.Component=E$5;react_production_min.Fragment=p$7;react_production_min.Profiler=r$5;react_production_min.PureComponent=G$3;react_production_min.StrictMode=q$3;react_production_min.Suspense=w$5;react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W$4;react_production_min.act=X$4;react_production_min.cloneElement=function(yt,_e,$t){if(yt==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+yt+".");var Ft=C$4({},yt.props),Vt=yt.key,qt=yt.ref,zt=yt._owner;if(_e!=null){if(_e.ref!==void 0&&(qt=_e.ref,zt=K$4.current),_e.key!==void 0&&(Vt=""+_e.key),yt.type&&yt.type.defaultProps)var Ht=yt.type.defaultProps;for(Kt in _e)J$3.call(_e,Kt)&&!L$4.hasOwnProperty(Kt)&&(Ft[Kt]=_e[Kt]===void 0&&Ht!==void 0?Ht[Kt]:_e[Kt])}var Kt=arguments.length-2;if(Kt===1)Ft.children=$t;else if(1<Kt){Ht=Array(Kt);for(var Gt=0;Gt<Kt;Gt++)Ht[Gt]=arguments[Gt+2];Ft.children=Ht}return{$$typeof:l$6,type:yt.type,key:Vt,ref:qt,props:Ft,_owner:zt}};react_production_min.createContext=function(yt){return yt={$$typeof:u$3,_currentValue:yt,_currentValue2:yt,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},yt.Provider={$$typeof:t$3,_context:yt},yt.Consumer=yt};react_production_min.createElement=M$4;react_production_min.createFactory=function(yt){var _e=M$4.bind(null,yt);return _e.type=yt,_e};react_production_min.createRef=function(){return{current:null}};react_production_min.forwardRef=function(yt){return{$$typeof:v$5,render:yt}};react_production_min.isValidElement=O$5;react_production_min.lazy=function(yt){return{$$typeof:y$5,_payload:{_status:-1,_result:yt},_init:T$5}};react_production_min.memo=function(yt,_e){return{$$typeof:x$5,type:yt,compare:_e===void 0?null:_e}};react_production_min.startTransition=function(yt){var _e=V$4.transition;V$4.transition={};try{yt()}finally{V$4.transition=_e}};react_production_min.unstable_act=X$4;react_production_min.useCallback=function(yt,_e){return U$4.current.useCallback(yt,_e)};react_production_min.useContext=function(yt){return U$4.current.useContext(yt)};react_production_min.useDebugValue=function(){};react_production_min.useDeferredValue=function(yt){return U$4.current.useDeferredValue(yt)};react_production_min.useEffect=function(yt,_e){return U$4.current.useEffect(yt,_e)};react_production_min.useId=function(){return U$4.current.useId()};react_production_min.useImperativeHandle=function(yt,_e,$t){return U$4.current.useImperativeHandle(yt,_e,$t)};react_production_min.useInsertionEffect=function(yt,_e){return U$4.current.useInsertionEffect(yt,_e)};react_production_min.useLayoutEffect=function(yt,_e){return U$4.current.useLayoutEffect(yt,_e)};react_production_min.useMemo=function(yt,_e){return U$4.current.useMemo(yt,_e)};react_production_min.useReducer=function(yt,_e,$t){return U$4.current.useReducer(yt,_e,$t)};react_production_min.useRef=function(yt){return U$4.current.useRef(yt)};react_production_min.useState=function(yt){return U$4.current.useState(yt)};react_production_min.useSyncExternalStore=function(yt,_e,$t){return U$4.current.useSyncExternalStore(yt,_e,$t)};react_production_min.useTransition=function(){return U$4.current.useTransition()};react_production_min.version="18.3.1";react.exports=react_production_min;var reactExports=react.exports;const React$2=getDefaultExportFromCjs$1(reactExports),React$3=_mergeNamespaces({__proto__:null,default:React$2},[reactExports]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var f$3=reactExports,k$3=Symbol.for("react.element"),l$5=Symbol.for("react.fragment"),m$4=Object.prototype.hasOwnProperty,n$2=f$3.__SECRET_INT
vendor: 6,094 bytes, lines 17-33
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p$6={key:!0,ref:!0,__self:!0,__source:!0};function q$2(yt,_e,$t){var Ft,Vt={},qt=null,zt=null;$t!==void 0&&(qt=""+$t),_e.key!==void 0&&(qt=""+_e.key),_e.ref!==void 0&&(zt=_e.ref);for(Ft in _e)m$4.call(_e,Ft)&&!p$6.hasOwnProperty(Ft)&&(Vt[Ft]=_e[Ft]);if(yt&&yt.defaultProps)for(Ft in _e=yt.defaultProps,_e)Vt[Ft]===void 0&&(Vt[Ft]=_e[Ft]);return{$$typeof:k$3,type:yt,key:qt,ref:zt,props:Vt,_owner:n$2.current}}reactJsxRuntime_production_min.Fragment=l$5;reactJsxRuntime_production_min.jsx=q$2;reactJsxRuntime_production_min.jsxs=q$2;jsxRuntime.exports=reactJsxRuntime_production_min;var jsxRuntimeExports=jsxRuntime.exports,client={},reactDom={exports:{}},reactDom_production_min={},scheduler={exports:{}},scheduler_production_min={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(yt){function _e(dr,lr){var hr=dr.length;dr.push(lr);e:for(;0<hr;){var wr=hr-1>>>1,pr=dr[wr];if(0<Vt(pr,lr))dr[wr]=lr,dr[hr]=pr,hr=wr;else break e}}function $t(dr){return dr.length===0?null:dr[0]}function Ft(dr){if(dr.length===0)return null;var lr=dr[0],hr=dr.pop();if(hr!==lr){dr[0]=hr;e:for(var wr=0,pr=dr.length,br=pr>>>1;wr<br;){var Dr=2*(wr+1)-1,_r=dr[Dr],Nr=Dr+1,kr=dr[Nr];if(0>Vt(_r,hr))Nr<pr&&0>Vt(kr,_r)?(dr[wr]=kr,dr[Nr]=hr,wr=Nr):(dr[wr]=_r,dr[Dr]=hr,wr=Dr);else if(Nr<pr&&0>Vt(kr,hr))dr[wr]=kr,dr[Nr]=hr,wr=Nr;else break e}}return lr}function Vt(dr,lr){var hr=dr.sortIndex-lr.sortIndex;return hr!==0?hr:dr.id-lr.id}if(typeof performance=="object"&&typeof performance.now=="function"){var qt=performance;yt.unstable_now=function(){return qt.now()}}else{var zt=Date,Ht=zt.now();yt.unstable_now=function(){return zt.now()-Ht}}var Kt=[],Gt=[],Jt=1,Xt=null,Zt=3,er=!1,tr=!1,rr=!1,ar=typeof setTimeout=="function"?setTimeout:null,nr=typeof clearTimeout=="function"?clearTimeout:null,cr=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function fr(dr){for(var lr=$t(Gt);lr!==null;){if(lr.callback===null)Ft(Gt);else if(lr.startTime<=dr)Ft(Gt),lr.sortIndex=lr.expirationTime,_e(Kt,lr);else break;lr=$t(Gt)}}function vr(dr){if(rr=!1,fr(dr),!tr)if($t(Kt)!==null)tr=!0,ur(xr);else{var lr=$t(Gt);lr!==null&&gr(vr,lr.startTime-dr)}}function xr(dr,lr){tr=!1,rr&&(rr=!1,nr(Br),Br=-1),er=!0;var hr=Zt;try{for(fr(lr),Xt=$t(Kt);Xt!==null&&(!(Xt.expirationTime>lr)||dr&&!yr());){var wr=Xt.callback;if(typeof wr=="function"){Xt.callback=null,Zt=Xt.priorityLevel;var pr=wr(Xt.expirationTime<=lr);lr=yt.unstable_now(),typeof pr=="function"?Xt.callback=pr:Xt===$t(Kt)&&Ft(Kt),fr(lr)}else Ft(Kt);Xt=$t(Kt)}if(Xt!==null)var br=!0;else{var Dr=$t(Gt);Dr!==null&&gr(vr,Dr.startTime-lr),br=!1}return br}finally{Xt=null,Zt=hr,er=!1}}var Sr=!1,Tr=null,Br=-1,jr=5,Rr=-1;function yr(){return!(yt.unstable_now()-Rr<jr)}function sr(){if(Tr!==null){var dr=yt.unstable_now();Rr=dr;var lr=!0;try{lr=Tr(!0,dr)}finally{lr?or():(Sr=!1,Tr=null)}}else Sr=!1}var or;if(typeof cr=="function")or=function(){cr(sr)};else if(typeof MessageChannel<"u"){var Qt=new MessageChannel,ir=Qt.port2;Qt.port1.onmessage=sr,or=function(){ir.postMessage(null)}}else or=function(){ar(sr,0)};function ur(dr){Tr=dr,Sr||(Sr=!0,or())}function gr(dr,lr){Br=ar(function(){dr(yt.unstable_now())},lr)}yt.unstable_IdlePriority=5,yt.unstable_ImmediatePriority=1,yt.unstable_LowPriority=4,yt.unstable_NormalPriority=3,yt.unstable_Profiling=null,yt.unstable_UserBlockingPriority=2,yt.unstable_cancelCallback=function(dr){dr.callback=null},yt.unstable_continueExecution=function(){tr||er||(tr=!0,ur(xr))},yt.unstable_forceFrameRate=function(dr){0>dr||125<dr?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):jr=0<dr?Math.floor(1e3/dr):5},yt.unstable_getCurrentPriorityLevel=function(){return Zt},yt.unstable_getFirstCallbackNode=function(){return $t(Kt)},yt.unstable_next=function(dr){switch(Zt){case 1:case 2:case 3:var lr=3;break;default:lr=Zt}var hr=Zt;Zt=lr;try{return dr()}finally{Zt=hr}},yt.unstable_pauseExecution=function(){},yt.unstable_requestPaint=function(){},yt.unstable_runWithPriority=function(dr,lr){switch(dr){case 1:case 2:case 3:case 4:case 5:break;default:dr=3}var hr=Zt;Zt=dr;try{return lr()}finally{Zt=hr}},yt.unstable_scheduleCallback=function(dr,lr,hr){var wr=yt.unstable_now();switch(typeof hr=="object"&&hr!==null?(hr=hr.delay,hr=typeof hr=="number"&&0<hr?wr+hr:wr):hr=wr,dr){case 1:var pr=-1;break;case 2:pr=250;break;case 5:pr=1073741823;break;case 4:pr=1e4;break;default:pr=5e3}return pr=hr+pr,dr={id:Jt++,callback:lr,priorityLevel:dr,startTime:hr,expirationTime:pr,sortIndex:-1},hr>wr?(dr.sortIndex=hr,_e(Gt,dr),$t(Kt)===null&&dr===$t(Gt)&&(rr?(nr(Br),Br=-1):rr=!0,gr(vr,hr-wr))):(dr.sortIndex=pr,_e(Kt,dr),tr||er||(tr=!0,ur(xr))),dr},yt.unstable_shouldYield=yr,yt.unstable_wrapCallback=function(dr){var lr=Zt;return function(){var hr=Zt;Zt=lr;try{return dr.apply(this,arguments)}finally{Zt=hr}}}})(scheduler_production_min);scheduler.exports=scheduler_production_min;var schedulerExports=scheduler.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var aa$2=reactExports,ca$1=schedulerExports;function p$5(yt){for(var _e="https://reactjs.org/docs/error-decoder.html?invariant="+yt,$t=1;$t<arguments.length;$t++)_e+="&args[]="+encodeURIComponent(arguments[$t]);return"Minified React error #"+yt+"; visit "+_e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var da$1=new Set,ea$1={};function fa$2(yt,_e){ha$2(yt,_e),ha$2(yt+"Capture",_e)}function ha$2(yt,_e){for(ea$1[yt]=_e,yt=0;yt<_e.length;
vendor: 5,180 bytes, line 33
33yt++)da$1.add(_e[yt])}var ia$2=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ja$2=Object.prototype.hasOwnProperty,ka$2=/^[: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]*$/,la$2={},ma$1={};function oa$2(yt){return ja$2.call(ma$1,yt)?!0:ja$2.call(la$2,yt)?!1:ka$2.test(yt)?ma$1[yt]=!0:(la$2[yt]=!0,!1)}function pa$2(yt,_e,$t,Ft){if($t!==null&&$t.type===0)return!1;switch(typeof _e){case"function":case"symbol":return!0;case"boolean":return Ft?!1:$t!==null?!$t.acceptsBooleans:(yt=yt.toLowerCase().slice(0,5),yt!=="data-"&&yt!=="aria-");default:return!1}}function qa$2(yt,_e,$t,Ft){if(_e===null||typeof _e>"u"||pa$2(yt,_e,$t,Ft))return!0;if(Ft)return!1;if($t!==null)switch($t.type){case 3:return!_e;case 4:return _e===!1;case 5:return isNaN(_e);case 6:return isNaN(_e)||1>_e}return!1}function v$4(yt,_e,$t,Ft,Vt,qt,zt){this.acceptsBooleans=_e===2||_e===3||_e===4,this.attributeName=Ft,this.attributeNamespace=Vt,this.mustUseProperty=$t,this.propertyName=yt,this.type=_e,this.sanitizeURL=qt,this.removeEmptyString=zt}var z$4={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(yt){z$4[yt]=new v$4(yt,0,!1,yt,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(yt){var _e=yt[0];z$4[_e]=new v$4(_e,1,!1,yt[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(yt){z$4[yt]=new v$4(yt,2,!1,yt.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(yt){z$4[yt]=new v$4(yt,2,!1,yt,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(yt){z$4[yt]=new v$4(yt,3,!1,yt.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(yt){z$4[yt]=new v$4(yt,3,!0,yt,null,!1,!1)});["capture","download"].forEach(function(yt){z$4[yt]=new v$4(yt,4,!1,yt,null,!1,!1)});["cols","rows","size","span"].forEach(function(yt){z$4[yt]=new v$4(yt,6,!1,yt,null,!1,!1)});["rowSpan","start"].forEach(function(yt){z$4[yt]=new v$4(yt,5,!1,yt.toLowerCase(),null,!1,!1)});var ra$2=/[\-:]([a-z])/g;function sa$2(yt){return yt[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(yt){var _e=yt.replace(ra$2,sa$2);z$4[_e]=new v$4(_e,1,!1,yt,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(yt){var _e=yt.replace(ra$2,sa$2);z$4[_e]=new v$4(_e,1,!1,yt,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(yt){var _e=yt.replace(ra$2,sa$2);z$4[_e]=new v$4(_e,1,!1,yt,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(yt){z$4[yt]=new v$4(yt,1,!1,yt.toLowerCase(),null,!1,!1)});z$4.xlinkHref=new v$4("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(yt){z$4[yt]=new v$4(yt,1,!1,yt.toLowerCase(),null,!0,!0)});function ta$2(yt,_e,$t,Ft){var Vt=z$4.hasOwnProperty(_e)?z$4[_e]:null;(Vt!==null?Vt.type!==0:Ft||!(2<_e.length)||_e[0]!=="o"&&_e[0]!=="O"||_e[1]!=="n"&&_e[1]!=="N")&&(qa$2(_e,$t,Vt,Ft)&&($t=null),Ft||Vt===null?oa$2(_e)&&($t===null?yt.removeAttribute(_e):yt.setAttribute(_e,""+$t)):Vt.mustUseProperty?yt[Vt.propertyName]=$t===null?Vt.type===3?!1:"":$t:(_e=Vt.attributeName,Ft=Vt.attributeNamespace,$t===null?yt.removeAttribute(_e):(Vt=Vt.type,$t=Vt===3||Vt===4&&$t===!0?"":""+$t,Ft?yt.setAttributeNS(Ft,_e,$t):yt.setAttribute(_e,$t))))}
vendor: 7,749 bytes, lines 33-37
33var ua$2=aa$2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,va$2=Symbol.for("react.element"),wa$2=Symbol.for("react.portal"),ya$2=Symbol.for("react.fragment"),za$2=Symbol.for("react.strict_mode"),Aa$2=Symbol.for("react.profiler"),Ba$2=Symbol.for("react.provider"),Ca$2=Symbol.for("react.context"),Da$2=Symbol.for("react.forward_ref"),Ea$2=Symbol.for("react.suspense"),Fa$2=Symbol.for("react.suspense_list"),Ga$2=Symbol.for("react.memo"),Ha$2=Symbol.for("react.lazy"),Ia$2=Symbol.for("react.offscreen"),Ja$2=Symbol.iterator;function Ka$2(yt){return yt===null||typeof yt!="object"?null:(yt=Ja$2&&yt[Ja$2]||yt["@@iterator"],typeof yt=="function"?yt:null)}var A$3=Object.assign,La$2;function Ma$2(yt){if(La$2===void 0)try{throw Error()}catch($t){var _e=$t.stack.trim().match(/\n( *(at )?)/);La$2=_e&&_e[1]||""}return` 34`+La$2+yt}var Na$2=!1;function Oa$2(yt,_e){if(!yt||Na$2)return"";Na$2=!0;var $t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(_e)if(_e=function(){throw Error()},Object.defineProperty(_e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_e,[])}catch(Gt){var Ft=Gt}Reflect.construct(yt,[],_e)}else{try{_e.call()}catch(Gt){Ft=Gt}yt.call(_e.prototype)}else{try{throw Error()}catch(Gt){Ft=Gt}yt()}}catch(Gt){if(Gt&&Ft&&typeof Gt.stack=="string"){for(var Vt=Gt.stack.split(` 35`),qt=Ft.stack.split(` 36`),zt=Vt.length-1,Ht=qt.length-1;1<=zt&&0<=Ht&&Vt[zt]!==qt[Ht];)Ht--;for(;1<=zt&&0<=Ht;zt--,Ht--)if(Vt[zt]!==qt[Ht]){if(zt!==1||Ht!==1)do if(zt--,Ht--,0>Ht||Vt[zt]!==qt[Ht]){var Kt=` 37`+Vt[zt].replace(" at new "," at ");return yt.displayName&&Kt.includes("<anonymous>")&&(Kt=Kt.replace("<anonymous>",yt.displayName)),Kt}while(1<=zt&&0<=Ht);break}}}finally{Na$2=!1,Error.prepareStackTrace=$t}return(yt=yt?yt.displayName||yt.name:"")?Ma$2(yt):""}function Pa$2(yt){switch(yt.tag){case 5:return Ma$2(yt.type);case 16:return Ma$2("Lazy");case 13:return Ma$2("Suspense");case 19:return Ma$2("SuspenseList");case 0:case 2:case 15:return yt=Oa$2(yt.type,!1),yt;case 11:return yt=Oa$2(yt.type.render,!1),yt;case 1:return yt=Oa$2(yt.type,!0),yt;default:return""}}function Qa$2(yt){if(yt==null)return null;if(typeof yt=="function")return yt.displayName||yt.name||null;if(typeof yt=="string")return yt;switch(yt){case ya$2:return"Fragment";case wa$2:return"Portal";case Aa$2:return"Profiler";case za$2:return"StrictMode";case Ea$2:return"Suspense";case Fa$2:return"SuspenseList"}if(typeof yt=="object")switch(yt.$$typeof){case Ca$2:return(yt.displayName||"Context")+".Consumer";case Ba$2:return(yt._context.displayName||"Context")+".Provider";case Da$2:var _e=yt.render;return yt=yt.displayName,yt||(yt=_e.displayName||_e.name||"",yt=yt!==""?"ForwardRef("+yt+")":"ForwardRef"),yt;case Ga$2:return _e=yt.displayName||null,_e!==null?_e:Qa$2(yt.type)||"Memo";case Ha$2:_e=yt._payload,yt=yt._init;try{return Qa$2(yt(_e))}catch{}}return null}function Ra$2(yt){var _e=yt.type;switch(yt.tag){case 24:return"Cache";case 9:return(_e.displayName||"Context")+".Consumer";case 10:return(_e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return yt=_e.render,yt=yt.displayName||yt.name||"",_e.displayName||(yt!==""?"ForwardRef("+yt+")":"ForwardRef");case 7:return"Fragment";case 5:return _e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qa$2(_e);case 8:return _e===za$2?"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(typeof _e=="function")return _e.displayName||_e.name||null;if(typeof _e=="string")return _e}return null}function Sa$2(yt){switch(typeof yt){case"boolean":case"number":case"string":case"undefined":return yt;case"object":return yt;default:return""}}function Ta$2(yt){var _e=yt.type;return(yt=yt.nodeName)&&yt.toLowerCase()==="input"&&(_e==="checkbox"||_e==="radio")}function Ua$2(yt){var _e=Ta$2(yt)?"checked":"value",$t=Object.getOwnPropertyDescriptor(yt.constructor.prototype,_e),Ft=""+yt[_e];if(!yt.hasOwnProperty(_e)&&typeof $t<"u"&&typeof $t.get=="function"&&typeof $t.set=="function"){var Vt=$t.get,qt=$t.set;return Object.defineProperty(yt,_e,{configurable:!0,get:function(){return Vt.call(this)},set:function(zt){Ft=""+zt,qt.call(this,zt)}}),Object.defineProperty(yt,_e,{enumerable:$t.enumerable}),{getValue:function(){return Ft},setValue:function(zt){Ft=""+zt},stopTracking:function(){yt._valueTracker=null,delete yt[_e]}}}}function Va$2(yt){yt._valueTracker||(yt._valueTracker=Ua$2(yt))}function Wa$2(yt){if(!yt)return!1;var _e=yt._valueTracker;if(!_e)return!0;var $t=_e.getValue(),Ft="";return yt&&(Ft=Ta$2(yt)?yt.checked?"true":"false":yt.value),yt=Ft,yt!==$t?(_e.setValue(yt),!0):!1}function Xa$2(yt){if(yt=yt||(typeof document<"u"?document:void 0),typeof yt>"u")return null;try{return yt.activeElement||yt.body}catch{return yt.body}}function Ya$2(yt,_e){var $t=_e.checked;return A$3({},_e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:$t??yt._wrapperState.initialChecked})}function Za$2(yt,_e){var $t=_e.defaultValue==null?"":_e.defaultValue,Ft=_e.checked!=null?_e.checked:_e.defaultChecked;$t=Sa$2(_e.value!=null?_e.value:$t),yt._wrapperState={initialChecked:Ft,initialValue:$t,controlled:_e.type==="checkbox"||_e.type==="radio"?_e.checked!=null:_e.value!=null}}function ab$2(yt,_e){_e=_e.checked,_e!=null&&ta$2(yt,"checked",_e,!1)}function bb$2(yt,_e){ab$2(yt,_e);var $t=Sa$2(_e.value),Ft=_e.type;if($t!=null)Ft==="number"?($t===0&&yt.value===""||yt.value!=$t)&&(yt.value=""+$t):yt.value!==""+$t&&(yt.value=""+$t);else if(Ft==="submit"||Ft==="reset"){yt.removeAttribute("value");return}_e.hasOwnProperty("value")?cb$2(yt,_e.type,$t):_e.hasOwnProperty("defaultValue")&&cb$2(yt,_e.type,Sa$2(_e.defaultValue)),_e.checked==null&&_e.defaultChecked!=null&&(yt.defaultChecked=!!_e.defaultChecked)}function db$2(yt,_e,$t){if(_e.hasOwnProperty("value")||_e.hasOwnProperty("defaultValue")){var Ft=_e.type;if(!(Ft!=="submit"&&Ft!=="reset"||_e.value!==void 0&&_e.value!==null))return;_e=""+yt._wrapperState.initialValue,$t||_e===yt.value||(yt.value=_e),yt.defaultValue=_e}$t=yt.name,$t!==""&&(yt.name=""),yt.defaultChecked=!!yt._wrapperState.initialChecked,$t!==""&&(yt.name=$t)}function cb$2(yt,_e,$t){(_e!=="number"||Xa$2(yt.ownerDocument)!==yt)&&($t==null?yt.defaultValue=""+yt._wrapperState.initialValue:yt.defaultValue!==""+$t&&(yt.defaultValue=""+$t))}var eb$2=Array.isArray;function fb$2(yt,_e,$t,Ft){if(yt=yt.options,_e){_e={};for(var Vt=0;Vt<$t.length;Vt++)_e["$"+$t[Vt]]=!0;for($t=0;$t<yt.length;$t++)Vt=_e.hasOwnProperty("$"+yt[$t].value),yt[$t].selected!==Vt&&(yt[$t].selected=Vt),Vt&&Ft&&(yt[$t].defaultSelected=!0)}else{for($t=""+Sa$2($t),_e=null,Vt=0;Vt<yt.length;Vt++){if(yt[Vt].value===$t){yt[Vt].selected=!0,Ft&&(yt[Vt].defaultSelected=!0);return}_e!==null||yt[Vt].disabled||(_e=yt[Vt])}_e!==null&&(_e.selected=!0)}}function gb$2(yt,_e){if(_e.dangerouslySetInnerHTML!=null)throw Error(p$5(91));return A$3({},_e,{value:void 0,defaultValue:void 0,children:""+yt._wrapperState.initialValue})}function hb$2(yt,_e){var $t=_e.value;if($t==null){if($t=_e.children,_e=_e.defaultValue,$t!=null){if(_e!=null)throw Error(p$5(92));if(eb$2($t)){if(1<$t.length)throw Error(p$5(93));$t=$t[0]}_e=$t}_e==null&&(_e=""),$t=_e}yt._wrapperState={initialValue:Sa$2($t)}}function ib$2(yt,_e){var $t=Sa$2(_e.value),Ft=Sa$2(_e.defaultValue);$t!=null&&($t=""+$t,$t!==yt.value&&(yt.value=$t),_e.defaultValue==null&&yt.defaultValue!==$t&&(yt.defaultValue=$t)),Ft!=null&&(yt.defaultValue=""+Ft)}function jb$2(yt){var _e=yt.textContent;_e===yt._wrapperState.initialValue&&_e!==""&&_e!==null&&(yt.value=_e)}
vendor: 12,066 bytes, line 37
37function kb$2(yt){switch(yt){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 lb$2(yt,_e){return yt==null||yt==="http://www.w3.org/1999/xhtml"?kb$2(_e):yt==="http://www.w3.org/2000/svg"&&_e==="foreignObject"?"http://www.w3.org/1999/xhtml":yt}var mb$1,nb$1=function(yt){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(_e,$t,Ft,Vt){MSApp.execUnsafeLocalFunction(function(){return yt(_e,$t,Ft,Vt)})}:yt}(function(yt,_e){if(yt.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in yt)yt.innerHTML=_e;else{for(mb$1=mb$1||document.createElement("div"),mb$1.innerHTML="<svg>"+_e.valueOf().toString()+"</svg>",_e=mb$1.firstChild;yt.firstChild;)yt.removeChild(yt.firstChild);for(;_e.firstChild;)yt.appendChild(_e.firstChild)}});function ob$2(yt,_e){if(_e){var $t=yt.firstChild;if($t&&$t===yt.lastChild&&$t.nodeType===3){$t.nodeValue=_e;return}}yt.textContent=_e}var pb$2={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},qb$2=["Webkit","ms","Moz","O"];Object.keys(pb$2).forEach(function(yt){qb$2.forEach(function(_e){_e=_e+yt.charAt(0).toUpperCase()+yt.substring(1),pb$2[_e]=pb$2[yt]})});function rb$2(yt,_e,$t){return _e==null||typeof _e=="boolean"||_e===""?"":$t||typeof _e!="number"||_e===0||pb$2.hasOwnProperty(yt)&&pb$2[yt]?(""+_e).trim():_e+"px"}function sb$2(yt,_e){yt=yt.style;for(var $t in _e)if(_e.hasOwnProperty($t)){var Ft=$t.indexOf("--")===0,Vt=rb$2($t,_e[$t],Ft);$t==="float"&&($t="cssFloat"),Ft?yt.setProperty($t,Vt):yt[$t]=Vt}}var tb$2=A$3({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 ub$2(yt,_e){if(_e){if(tb$2[yt]&&(_e.children!=null||_e.dangerouslySetInnerHTML!=null))throw Error(p$5(137,yt));if(_e.dangerouslySetInnerHTML!=null){if(_e.children!=null)throw Error(p$5(60));if(typeof _e.dangerouslySetInnerHTML!="object"||!("__html"in _e.dangerouslySetInnerHTML))throw Error(p$5(61))}if(_e.style!=null&&typeof _e.style!="object")throw Error(p$5(62))}}function vb$2(yt,_e){if(yt.indexOf("-")===-1)return typeof _e.is=="string";switch(yt){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 wb$2=null;function xb$2(yt){return yt=yt.target||yt.srcElement||window,yt.correspondingUseElement&&(yt=yt.correspondingUseElement),yt.nodeType===3?yt.parentNode:yt}var yb$2=null,zb$2=null,Ab$2=null;function Bb$2(yt){if(yt=Cb$2(yt)){if(typeof yb$2!="function")throw Error(p$5(280));var _e=yt.stateNode;_e&&(_e=Db$2(_e),yb$2(yt.stateNode,yt.type,_e))}}function Eb$2(yt){zb$2?Ab$2?Ab$2.push(yt):Ab$2=[yt]:zb$2=yt}function Fb$1(){if(zb$2){var yt=zb$2,_e=Ab$2;if(Ab$2=zb$2=null,Bb$2(yt),_e)for(yt=0;yt<_e.length;yt++)Bb$2(_e[yt])}}function Gb$2(yt,_e){return yt(_e)}function Hb$2(){}var Ib$2=!1;function Jb$2(yt,_e,$t){if(Ib$2)return yt(_e,$t);Ib$2=!0;try{return Gb$2(yt,_e,$t)}finally{Ib$2=!1,(zb$2!==null||Ab$2!==null)&&(Hb$2(),Fb$1())}}function Kb$2(yt,_e){var $t=yt.stateNode;if($t===null)return null;var Ft=Db$2($t);if(Ft===null)return null;$t=Ft[_e];e:switch(_e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(Ft=!Ft.disabled)||(yt=yt.type,Ft=!(yt==="button"||yt==="input"||yt==="select"||yt==="textarea")),yt=!Ft;break e;default:yt=!1}if(yt)return null;if($t&&typeof $t!="function")throw Error(p$5(231,_e,typeof $t));return $t}var Lb$2=!1;if(ia$2)try{var Mb$2={};Object.defineProperty(Mb$2,"passive",{get:function(){Lb$2=!0}}),window.addEventListener("test",Mb$2,Mb$2),window.removeEventListener("test",Mb$2,Mb$2)}catch{Lb$2=!1}function Nb$2(yt,_e,$t,Ft,Vt,qt,zt,Ht,Kt){var Gt=Array.prototype.slice.call(arguments,3);try{_e.apply($t,Gt)}catch(Jt){this.onError(Jt)}}var Ob$2=!1,Pb$2=null,Qb$2=!1,Rb$2=null,Sb$2={onError:function(yt){Ob$2=!0,Pb$2=yt}};function Tb$2(yt,_e,$t,Ft,Vt,qt,zt,Ht,Kt){Ob$2=!1,Pb$2=null,Nb$2.apply(Sb$2,arguments)}function Ub$1(yt,_e,$t,Ft,Vt,qt,zt,Ht,Kt){if(Tb$2.apply(this,arguments),Ob$2){if(Ob$2){var Gt=Pb$2;Ob$2=!1,Pb$2=null}else throw Error(p$5(198));Qb$2||(Qb$2=!0,Rb$2=Gt)}}function Vb$1(yt){var _e=yt,$t=yt;if(yt.alternate)for(;_e.return;)_e=_e.return;else{yt=_e;do _e=yt,_e.flags&4098&&($t=_e.return),yt=_e.return;while(yt)}return _e.tag===3?$t:null}function Wb$1(yt){if(yt.tag===13){var _e=yt.memoizedState;if(_e===null&&(yt=yt.alternate,yt!==null&&(_e=yt.memoizedState)),_e!==null)return _e.dehydrated}return null}function Xb$1(yt){if(Vb$1(yt)!==yt)throw Error(p$5(188))}function Yb$1(yt){var _e=yt.alternate;if(!_e){if(_e=Vb$1(yt),_e===null)throw Error(p$5(188));return _e!==yt?null:yt}for(var $t=yt,Ft=_e;;){var Vt=$t.return;if(Vt===null)break;var qt=Vt.alternate;if(qt===null){if(Ft=Vt.return,Ft!==null){$t=Ft;continue}break}if(Vt.child===qt.child){for(qt=Vt.child;qt;){if(qt===$t)return Xb$1(Vt),yt;if(qt===Ft)return Xb$1(Vt),_e;qt=qt.sibling}throw Error(p$5(188))}if($t.return!==Ft.return)$t=Vt,Ft=qt;else{for(var zt=!1,Ht=Vt.child;Ht;){if(Ht===$t){zt=!0,$t=Vt,Ft=qt;break}if(Ht===Ft){zt=!0,Ft=Vt,$t=qt;break}Ht=Ht.sibling}if(!zt){for(Ht=qt.child;Ht;){if(Ht===$t){zt=!0,$t=qt,Ft=Vt;break}if(Ht===Ft){zt=!0,Ft=qt,$t=Vt;break}Ht=Ht.sibling}if(!zt)throw Error(p$5(189))}}if($t.alternate!==Ft)throw Error(p$5(190))}if($t.tag!==3)throw Error(p$5(188));return $t.stateNode.current===$t?yt:_e}function Zb$1(yt){return yt=Yb$1(yt),yt!==null?$b$1(yt):null}function $b$1(yt){if(yt.tag===5||yt.tag===6)return yt;for(yt=yt.child;yt!==null;){var _e=$b$1(yt);if(_e!==null)return _e;yt=yt.sibling}return null}var ac$1=ca$1.unstable_scheduleCallback,bc$1=ca$1.unstable_cancelCallback,cc$1=ca$1.unstable_shouldYield,dc$1=ca$1.unstable_requestPaint,B$3=ca$1.unstable_now,ec$2=ca$1.unstable_getCurrentPriorityLevel,fc$1=ca$1.unstable_ImmediatePriority,gc$1=ca$1.unstable_UserBlockingPriority,hc$1=ca$1.unstable_NormalPriority,ic$1=ca$1.unstable_LowPriority,jc$1=ca$1.unstable_IdlePriority,kc$1=null,lc$1=null;function mc$1(yt){if(lc$1&&typeof lc$1.onCommitFiberRoot=="function")try{lc$1.onCommitFiberRoot(kc$1,yt,void 0,(yt.current.flags&128)===128)}catch{}}var oc$1=Math.clz32?Math.clz32:nc$1,pc$1=Math.log,qc$1=Math.LN2;function nc$1(yt){return yt>>>=0,yt===0?32:31-(pc$1(yt)/qc$1|0)|0}var rc$1=64,sc$1=4194304;function tc$1(yt){switch(yt&-yt){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 yt&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return yt&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return yt}}function uc$1(yt,_e){var $t=yt.pendingLanes;if($t===0)return 0;var Ft=0,Vt=yt.suspendedLanes,qt=yt.pingedLanes,zt=$t&268435455;if(zt!==0){var Ht=zt&~Vt;Ht!==0?Ft=tc$1(Ht):(qt&=zt,qt!==0&&(Ft=tc$1(qt)))}else zt=$t&~Vt,zt!==0?Ft=tc$1(zt):qt!==0&&(Ft=tc$1(qt));if(Ft===0)return 0;if(_e!==0&&_e!==Ft&&!(_e&Vt)&&(Vt=Ft&-Ft,qt=_e&-_e,Vt>=qt||Vt===16&&(qt&4194240)!==0))return _e;if(Ft&4&&(Ft|=$t&16),_e=yt.entangledLanes,_e!==0)for(yt=yt.entanglements,_e&=Ft;0<_e;)$t=31-oc$1(_e),Vt=1<<$t,Ft|=yt[$t],_e&=~Vt;return Ft}function vc$1(yt,_e){switch(yt){case 1:case 2:case 4:return _e+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 _e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function wc$1(yt,_e){for(var $t=yt.suspendedLanes,Ft=yt.pingedLanes,Vt=yt.expirationTimes,qt=yt.pendingLanes;0<qt;){var zt=31-oc$1(qt),Ht=1<<zt,Kt=Vt[zt];Kt===-1?(!(Ht&$t)||Ht&Ft)&&(Vt[zt]=vc$1(Ht,_e)):Kt<=_e&&(yt.expiredLanes|=Ht),qt&=~Ht}}function xc$1(yt){return yt=yt.pendingLanes&-1073741825,yt!==0?yt:yt&1073741824?1073741824:0}function yc$1(){var yt=rc$1;return rc$1<<=1,!(rc$1&4194240)&&(rc$1=64),yt}function zc$1(yt){for(var _e=[],$t=0;31>$t;$t++)_e.push(yt);return _e}function Ac$1(yt,_e,$t){yt.pendingLanes|=_e,_e!==536870912&&(yt.suspendedLanes=0,yt.pingedLanes=0),yt=yt.eventTimes,_e=31-oc$1(_e),yt[_e]=$t}function Bc$1(yt,_e){var $t=yt.pendingLanes&~_e;yt.pendingLanes=_e,yt.suspendedLanes=0,yt.pingedLanes=0,yt.expiredLanes&=_e,yt.mutableReadLanes&=_e,yt.entangledLanes&=_e,_e=yt.entanglements;var Ft=yt.eventTimes;for(yt=yt.expirationTimes;0<$t;){var Vt=31-oc$1($t),qt=1<<Vt;_e[Vt]=0,Ft[Vt]=-1,yt[Vt]=-1,$t&=~qt}}function Cc$1(yt,_e){var $t=yt.entangledLanes|=_e;for(yt=yt.entanglements;$t;){var Ft=31-oc$1($t),Vt=1<<Ft;Vt&_e|yt[Ft]&_e&&(yt[Ft]|=_e),$t&=~Vt}}var C$3=0;function Dc$1(yt){return yt&=-yt,1<yt?4<yt?yt&268435455?16:536870912:4:1}var Ec$1,Fc$1,Gc$1,Hc$1,Ic$1,Jc$1=!1,Kc$1=[],Lc$1=null,Mc$1=null,Nc$1=null,Oc$1=new Map,Pc$1=new Map,Qc$1=[],Rc$1="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 Sc$1(yt,_e){switch(yt){case"focusin":case"focusout":Lc$1=null;break;case"dragenter":case"dragleave":Mc$1=null;break;case"mouseover":case"mouseout":Nc$1=null;break;case"pointerover":case"pointerout":Oc$1.delete(_e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pc$1.delete(_e.pointerId)}}function Tc$1(yt,_e,$t,Ft,Vt,qt){return yt===null||yt.nativeEvent!==qt?(yt={blockedOn:_e,domEventName:$t,eventSystemFlags:Ft,nativeEvent:qt,targetContainers:[Vt]},_e!==null&&(_e=Cb$2(_e),_e!==null&&Fc$1(_e)),yt):(yt.eventSystemFlags|=Ft,_e=yt.targetContainers,Vt!==null&&_e.indexOf(Vt)===-1&&_e.push(Vt),yt)}function Uc$1(yt,_e,$t,Ft,Vt){switch(_e){case"focusin":return Lc$1=Tc$1(Lc$1,yt,_e,$t,Ft,Vt),!0;case"dragenter":return Mc$1=Tc$1(Mc$1,yt,_e,$t,Ft,Vt),!0;case"mouseover":return Nc$1=Tc$1(Nc$1,yt,_e,$t,Ft,Vt),!0;case"pointerover":var qt=Vt.pointerId;return Oc$1.set(qt,Tc$1(Oc$1.get(qt)||null,yt,_e,$t,Ft,Vt)),!0;case"gotpointercapture":return qt=Vt.pointerId,Pc$1.set(qt,Tc$1(Pc$1.get(qt)||null,yt,_e,$t,Ft,Vt)),!0}return!1}function Vc$1(yt){var _e=Wc$1(yt.target);if(_e!==null){var $t=Vb$1(_e);if($t!==null){if(_e=$t.tag,_e===13){if(_e=Wb$1($t),_e!==null){yt.blockedOn=_e,Ic$1(yt.priority,function(){Gc$1($t)});return}}else if(_e===3&&$t.stateNode.current.memoizedState.isDehydrated){yt.blockedOn=$t.tag===3?$t.stateNode.containerInfo:null;return}}}yt.blockedOn=null}function Xc$1(yt){if(yt.blockedOn!==null)return!1;for(var _e=yt.targetContainers;0<_e.length;){var $t=Yc$1(yt.domEventName,yt.eventSystemFlags,_e[0],yt.nativeEvent);if($t===null){$t=yt.nativeEvent;var Ft=new $t.constructor($t.type,$t);wb$2=Ft,$t.target.dispatchEvent(Ft),wb$2=null}else return _e=Cb$2($t),_e!==null&&Fc$1(_e),yt.blockedOn=$t,!1;_e.shift()}return!0}function Zc$1(yt,_e,$t){Xc$1(yt)&&$t.delete(_e)}function $c$1(){Jc$1=!1,Lc$1!==null&&Xc$1(Lc$1)&&(Lc$1=null),Mc$1!==null&&Xc$1(Mc$1)&&(Mc$1=null),Nc$1!==null&&Xc$1(Nc$1)&&(Nc$1=null),Oc$1.forEac
vendor: 3,042 bytes, line 37
37h(Zc$1),Pc$1.forEach(Zc$1)}function ad$1(yt,_e){yt.blockedOn===_e&&(yt.blockedOn=null,Jc$1||(Jc$1=!0,ca$1.unstable_scheduleCallback(ca$1.unstable_NormalPriority,$c$1)))}function bd$1(yt){function _e(Vt){return ad$1(Vt,yt)}if(0<Kc$1.length){ad$1(Kc$1[0],yt);for(var $t=1;$t<Kc$1.length;$t++){var Ft=Kc$1[$t];Ft.blockedOn===yt&&(Ft.blockedOn=null)}}for(Lc$1!==null&&ad$1(Lc$1,yt),Mc$1!==null&&ad$1(Mc$1,yt),Nc$1!==null&&ad$1(Nc$1,yt),Oc$1.forEach(_e),Pc$1.forEach(_e),$t=0;$t<Qc$1.length;$t++)Ft=Qc$1[$t],Ft.blockedOn===yt&&(Ft.blockedOn=null);for(;0<Qc$1.length&&($t=Qc$1[0],$t.blockedOn===null);)Vc$1($t),$t.blockedOn===null&&Qc$1.shift()}var cd$1=ua$2.ReactCurrentBatchConfig,dd$1=!0;function ed$1(yt,_e,$t,Ft){var Vt=C$3,qt=cd$1.transition;cd$1.transition=null;try{C$3=1,fd$1(yt,_e,$t,Ft)}finally{C$3=Vt,cd$1.transition=qt}}function gd$1(yt,_e,$t,Ft){var Vt=C$3,qt=cd$1.transition;cd$1.transition=null;try{C$3=4,fd$1(yt,_e,$t,Ft)}finally{C$3=Vt,cd$1.transition=qt}}function fd$1(yt,_e,$t,Ft){if(dd$1){var Vt=Yc$1(yt,_e,$t,Ft);if(Vt===null)hd$1(yt,_e,Ft,id$3,$t),Sc$1(yt,Ft);else if(Uc$1(Vt,yt,_e,$t,Ft))Ft.stopPropagation();else if(Sc$1(yt,Ft),_e&4&&-1<Rc$1.indexOf(yt)){for(;Vt!==null;){var qt=Cb$2(Vt);if(qt!==null&&Ec$1(qt),qt=Yc$1(yt,_e,$t,Ft),qt===null&&hd$1(yt,_e,Ft,id$3,$t),qt===Vt)break;Vt=qt}Vt!==null&&Ft.stopPropagation()}else hd$1(yt,_e,Ft,null,$t)}}var id$3=null;function Yc$1(yt,_e,$t,Ft){if(id$3=null,yt=xb$2(Ft),yt=Wc$1(yt),yt!==null)if(_e=Vb$1(yt),_e===null)yt=null;else if($t=_e.tag,$t===13){if(yt=Wb$1(_e),yt!==null)return yt;yt=null}else if($t===3){if(_e.stateNode.current.memoizedState.isDehydrated)return _e.tag===3?_e.stateNode.containerInfo:null;yt=null}else _e!==yt&&(yt=null);return id$3=yt,null}function jd$1(yt){switch(yt){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(ec$2()){case fc$1:return 1;case gc$1:return 4;case hc$1:case ic$1:return 16;case jc$1:return 536870912;default:return 16}default:return 16}}var kd$1=null,ld$1=null,md=null;
vendor: 9,674 bytes, line 37
37function nd(){if(md)return md;var yt,_e=ld$1,$t=_e.length,Ft,Vt="value"in kd$1?kd$1.value:kd$1.textContent,qt=Vt.length;for(yt=0;yt<$t&&_e[yt]===Vt[yt];yt++);var zt=$t-yt;for(Ft=1;Ft<=zt&&_e[$t-Ft]===Vt[qt-Ft];Ft++);return md=Vt.slice(yt,1<Ft?1-Ft:void 0)}function od(yt){var _e=yt.keyCode;return"charCode"in yt?(yt=yt.charCode,yt===0&&_e===13&&(yt=13)):yt=_e,yt===10&&(yt=13),32<=yt||yt===13?yt:0}function pd(){return!0}function qd(){return!1}function rd(yt){function _e($t,Ft,Vt,qt,zt){this._reactName=$t,this._targetInst=Vt,this.type=Ft,this.nativeEvent=qt,this.target=zt,this.currentTarget=null;for(var Ht in yt)yt.hasOwnProperty(Ht)&&($t=yt[Ht],this[Ht]=$t?$t(qt):qt[Ht]);return this.isDefaultPrevented=(qt.defaultPrevented!=null?qt.defaultPrevented:qt.returnValue===!1)?pd:qd,this.isPropagationStopped=qd,this}return A$3(_e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var $t=this.nativeEvent;$t&&($t.preventDefault?$t.preventDefault():typeof $t.returnValue!="unknown"&&($t.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var $t=this.nativeEvent;$t&&($t.stopPropagation?$t.stopPropagation():typeof $t.cancelBubble!="unknown"&&($t.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd}),_e}var sd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(yt){return yt.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},td=rd(sd),ud=A$3({},sd,{view:0,detail:0}),vd=rd(ud),wd,xd,yd,Ad=A$3({},ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(yt){return yt.relatedTarget===void 0?yt.fromElement===yt.srcElement?yt.toElement:yt.fromElement:yt.relatedTarget},movementX:function(yt){return"movementX"in yt?yt.movementX:(yt!==yd&&(yd&&yt.type==="mousemove"?(wd=yt.screenX-yd.screenX,xd=yt.screenY-yd.screenY):xd=wd=0,yd=yt),wd)},movementY:function(yt){return"movementY"in yt?yt.movementY:xd}}),Bd=rd(Ad),Cd=A$3({},Ad,{dataTransfer:0}),Dd=rd(Cd),Ed=A$3({},ud,{relatedTarget:0}),Fd=rd(Ed),Gd=A$3({},sd,{animationName:0,elapsedTime:0,pseudoElement:0}),Hd=rd(Gd),Id=A$3({},sd,{clipboardData:function(yt){return"clipboardData"in yt?yt.clipboardData:window.clipboardData}}),Jd=rd(Id),Kd=A$3({},sd,{data:0}),Ld=rd(Kd),Md={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nd={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"},Od={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pd(yt){var _e=this.nativeEvent;return _e.getModifierState?_e.getModifierState(yt):(yt=Od[yt])?!!_e[yt]:!1}function zd(){return Pd}var Qd=A$3({},ud,{key:function(yt){if(yt.key){var _e=Md[yt.key]||yt.key;if(_e!=="Unidentified")return _e}return yt.type==="keypress"?(yt=od(yt),yt===13?"Enter":String.fromCharCode(yt)):yt.type==="keydown"||yt.type==="keyup"?Nd[yt.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(yt){return yt.type==="keypress"?od(yt):0},keyCode:function(yt){return yt.type==="keydown"||yt.type==="keyup"?yt.keyCode:0},which:function(yt){return yt.type==="keypress"?od(yt):yt.type==="keydown"||yt.type==="keyup"?yt.keyCode:0}}),Rd=rd(Qd),Sd=A$3({},Ad,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=rd(Sd),Ud=A$3({},ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd}),Vd=rd(Ud),Wd=A$3({},sd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xd=rd(Wd),Yd=A$3({},Ad,{deltaX:function(yt){return"deltaX"in yt?yt.deltaX:"wheelDeltaX"in yt?-yt.wheelDeltaX:0},deltaY:function(yt){return"deltaY"in yt?yt.deltaY:"wheelDeltaY"in yt?-yt.wheelDeltaY:"wheelDelta"in yt?-yt.wheelDelta:0},deltaZ:0,deltaMode:0}),Zd=rd(Yd),$d=[9,13,27,32],ae=ia$2&&"CompositionEvent"in window,be=null;ia$2&&"documentMode"in document&&(be=document.documentMode);var ce=ia$2&&"TextEvent"in window&&!be,de=ia$2&&(!ae||be&&8<be&&11>=be),ee=" ",fe=!1;function ge(yt,_e){switch(yt){case"keyup":return $d.indexOf(_e.keyCode)!==-1;case"keydown":return _e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function he(yt){return yt=yt.detail,typeof yt=="object"&&"data"in yt?yt.data:null}var ie=!1;function je(yt,_e){switch(yt){case"compositionend":return he(_e);case"keypress":return _e.which!==32?null:(fe=!0,ee);case"textInput":return yt=_e.data,yt===ee&&fe?null:yt;default:return null}}function ke(yt,_e){if(ie)return yt==="compositionend"||!ae&&ge(yt,_e)?(yt=nd(),md=ld$1=kd$1=null,ie=!1,yt):null;switch(yt){case"paste":return null;case"keypress":if(!(_e.ctrlKey||_e.altKey||_e.metaKey)||_e.ctrlKey&&_e.altKey){if(_e.char&&1<_e.char.length)return _e.char;if(_e.which)return String.fromCharCode(_e.which)}return null;case"compositionend":return de&&_e.locale!=="ko"?null:_e.data;default:return null}}var le={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 me(yt){var _e=yt&&yt.nodeName&&yt.nodeName.toLowerCase();return _e==="input"?!!le[yt.type]:_e==="textarea"}function ne(yt,_e,$t,Ft){Eb$2(Ft),_e=oe(_e,"onChange"),0<_e.length&&($t=new td("onChange","change",null,$t,Ft),yt.push({event:$t,listeners:_e}))}var pe=null,qe=null;function re(yt){se(yt,0)}function te(yt){var _e=ue(yt);if(Wa$2(_e))return yt}function ve(yt,_e){if(yt==="change")return _e}var we=!1;if(ia$2){var xe;if(ia$2){var ye="oninput"in document;if(!ye){var ze=document.createElement("div");ze.setAttribute("oninput","return;"),ye=typeof ze.oninput=="function"}xe=ye}else xe=!1;we=xe&&(!document.documentMode||9<document.documentMode)}function Ae(){pe&&(pe.detachEvent("onpropertychange",Be),qe=pe=null)}function Be(yt){if(yt.propertyName==="value"&&te(qe)){var _e=[];ne(_e,qe,yt,xb$2(yt)),Jb$2(re,_e)}}function Ce(yt,_e,$t){yt==="focusin"?(Ae(),pe=_e,qe=$t,pe.attachEvent("onpropertychange",Be)):yt==="focusout"&&Ae()}function De(yt){if(yt==="selectionchange"||yt==="keyup"||yt==="keydown")return te(qe)}function Ee(yt,_e){if(yt==="click")return te(_e)}function Fe(yt,_e){if(yt==="input"||yt==="change")return te(_e)}function Ge(yt,_e){return yt===_e&&(yt!==0||1/yt===1/_e)||yt!==yt&&_e!==_e}var He=typeof Object.is=="function"?Object.is:Ge;function Ie(yt,_e){if(He(yt,_e))return!0;if(typeof yt!="object"||yt===null||typeof _e!="object"||_e===null)return!1;var $t=Object.keys(yt),Ft=Object.keys(_e);if($t.length!==Ft.length)return!1;for(Ft=0;Ft<$t.length;Ft++){var Vt=$t[Ft];if(!ja$2.call(_e,Vt)||!He(yt[Vt],_e[Vt]))return!1}return!0}function Je(yt){for(;yt&&yt.firstChild;)yt=yt.firstChild;return yt}function Ke(yt,_e){var $t=Je(yt);yt=0;for(var Ft;$t;){if($t.nodeType===3){if(Ft=yt+$t.textContent.length,yt<=_e&&Ft>=_e)return{node:$t,offset:_e-yt};yt=Ft}e:{for(;$t;){if($t.nextSibling){$t=$t.nextSibling;break e}$t=$t.parentNode}$t=void 0}$t=Je($t)}}function Le(yt,_e){return yt&&_e?yt===_e?!0:yt&&yt.nodeType===3?!1:_e&&_e.nodeType===3?Le(yt,_e.parentNode):"contains"in yt?yt.contains(_e):yt.compareDocumentPosition?!!(yt.compareDocumentPosition(_e)&16):!1:!1}function Me(){for(var yt=window,_e=Xa$2();_e instanceof yt.HTMLIFrameElement;){try{var $t=typeof _e.contentWindow.location.href=="string"}catch{$t=!1}if($t)yt=_e.contentWindow;else break;_e=Xa$2(yt.document)}return _e}function Ne(yt){var _e=yt&&yt.nodeName&&yt.nodeName.toLowerCase();return _e&&(_e==="input"&&(yt.type==="text"||yt.type==="search"||yt.type==="tel"||yt.type==="url"||yt.type==="password")||_e==="textarea"||yt.contentEditable==="true")}function Oe(yt){var _e=Me(),$t=yt.focusedElem,Ft=yt.selectionRange;if(_e!==$t&&$t&&$t.ownerDocument&&Le($t.ownerDocument.documentElement,$t)){if(Ft!==null&&Ne($t)){if(_e=Ft.start,yt=Ft.end,yt===void 0&&(yt=_e),"selectionStart"in $t)$t.selectionStart=_e,$t.selectionEnd=Math.min(yt,$t.value.length);else if(yt=(_e=$t.ownerDocument||document)&&_e.defaultView||window,yt.getSelection){yt=yt.getSelection();var Vt=$t.textContent.length,qt=Math.min(Ft.start,Vt);Ft=Ft.end===void 0?qt:Math.min(Ft.end,Vt),!yt.extend&&qt>Ft&&(Vt=Ft,Ft=qt,qt=Vt),Vt=Ke($t,qt);var zt=Ke($t,Ft);Vt&&zt&&(yt.rangeCount!==1||yt.anchorNode!==Vt.node||yt.anchorOffset!==Vt.offset||yt.focusNode!==zt.node||yt.focusOffset!==zt.offset)&&(_e=_e.createRange(),_e.setStart(Vt.node,Vt.offset),yt.removeAllRanges(),qt>Ft?(yt.addRange(_e),yt.extend(zt.node,zt.offset)):(_e.setEnd(zt.node,zt.offset),yt.addRange(_e)))}}for(_e=[],yt=$t;yt=yt.parentNode;)yt.nodeType===1&&_e.push({element:yt,left:yt.scrollLeft,top:yt.scrollTop});for(typeof $t.focus=="function"&&$t.focus(),$t=0;$t<_e.length;$t++)yt=_e[$t],yt.element.scrollLeft=yt.left,yt.element.scrollTop=yt.top}}var Pe=ia$2&&"documentMode"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;function Ue(yt,_e,$t){var Ft=$t.window===$t?$t.document:$t.nodeType===9?$t:$t.ownerDocument;Te||Qe==null||Qe!==Xa$2(Ft)||(Ft=Qe,"selectionStart"in Ft&&Ne(Ft)?Ft={start:Ft.selectionStart,end:Ft.selectionEnd}:(Ft=(Ft.ownerDocument&&Ft.ownerDocument.defaultView||window).getSelection(),Ft={anchorNode:Ft.anchorNode,anchorOffset:Ft.anchorOffset,focu
vendor: 4,713 bytes, line 37
37sNode:Ft.focusNode,focusOffset:Ft.focusOffset}),Se&&Ie(Se,Ft)||(Se=Ft,Ft=oe(Re,"onSelect"),0<Ft.length&&(_e=new td("onSelect","select",null,_e,$t),yt.push({event:_e,listeners:Ft}),_e.target=Qe)))}function Ve(yt,_e){var $t={};return $t[yt.toLowerCase()]=_e.toLowerCase(),$t["Webkit"+yt]="webkit"+_e,$t["Moz"+yt]="moz"+_e,$t}var We={animationend:Ve("Animation","AnimationEnd"),animationiteration:Ve("Animation","AnimationIteration"),animationstart:Ve("Animation","AnimationStart"),transitionend:Ve("Transition","TransitionEnd")},Xe={},Ye={};ia$2&&(Ye=document.createElement("div").style,"AnimationEvent"in window||(delete We.animationend.animation,delete We.animationiteration.animation,delete We.animationstart.animation),"TransitionEvent"in window||delete We.transitionend.transition);function Ze(yt){if(Xe[yt])return Xe[yt];if(!We[yt])return yt;var _e=We[yt],$t;for($t in _e)if(_e.hasOwnProperty($t)&&$t in Ye)return Xe[yt]=_e[$t];return yt}var $e=Ze("animationend"),af=Ze("animationiteration"),bf=Ze("animationstart"),cf=Ze("transitionend"),df=new Map,ef="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 ff(yt,_e){df.set(yt,_e),fa$2(_e,[yt])}for(var gf=0;gf<ef.length;gf++){var hf=ef[gf],jf=hf.toLowerCase(),kf=hf[0].toUpperCase()+hf.slice(1);ff(jf,"on"+kf)}ff($e,"onAnimationEnd");ff(af,"onAnimationIteration");ff(bf,"onAnimationStart");ff("dblclick","onDoubleClick");ff("focusin","onFocus");ff("focusout","onBlur");ff(cf,"onTransitionEnd");ha$2("onMouseEnter",["mouseout","mouseover"]);ha$2("onMouseLeave",["mouseout","mouseover"]);ha$2("onPointerEnter",["pointerout","pointerover"]);ha$2("onPointerLeave",["pointerout","pointerover"]);fa$2("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));fa$2("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));fa$2("onBeforeInput",["compositionend","keypress","textInput","paste"]);fa$2("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));fa$2("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));fa$2("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lf="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(" "),mf=new Set("cancel close invalid load scroll toggle".split(" ").concat(lf));function nf(yt,_e,$t){var Ft=yt.type||"unknown-event";yt.currentTarget=$t,Ub$1(Ft,_e,void 0,yt),yt.currentTarget=null}function se(yt,_e){_e=(_e&4)!==0;for(var $t=0;$t<yt.length;$t++){var Ft=yt[$t],Vt=Ft.event;Ft=Ft.listeners;e:{var qt=void 0;if(_e)for(var zt=Ft.length-1;0<=zt;zt--){var Ht=Ft[zt],Kt=Ht.instance,Gt=Ht.currentTarget;if(Ht=Ht.listener,Kt!==qt&&Vt.isPropagationStopped())break e;nf(Vt,Ht,Gt),qt=Kt}else for(zt=0;zt<Ft.length;zt++){if(Ht=Ft[zt],Kt=Ht.instance,Gt=Ht.currentTarget,Ht=Ht.listener,Kt!==qt&&Vt.isPropagationStopped())break e;nf(Vt,Ht,Gt),qt=Kt}}}if(Qb$2)throw yt=Rb$2,Qb$2=!1,Rb$2=null,yt}function D$2(yt,_e){var $t=_e[of];$t===void 0&&($t=_e[of]=new Set);var Ft=yt+"__bubble";$t.has(Ft)||(pf(_e,yt,2,!1),$t.add(Ft))}function qf(yt,_e,$t){var Ft=0;_e&&(Ft|=4),pf($t,yt,Ft,_e)}var rf="_reactListening"+Math.random().toString(36).slice(2);function sf(yt){if(!yt[rf]){yt[rf]=!0,da$1.forEach(function($t){$t!=="selectionchange"&&(mf.has($t)||qf($t,!1,yt),qf($t,!0,yt))});var _e=yt.nodeType===9?yt:yt.ownerDocument;_e===null||_e[rf]||(_e[rf]=!0,qf("selectionchange",!1,_e))}}function pf(yt,_e,$t,Ft){switch(jd$1(_e)){case 1:var Vt=ed$1;break;case 4:Vt=gd$1;break;default:Vt=fd$1}$t=Vt.bind(null,_e,$t,yt),Vt=void 0,!Lb$2||_e!=="touchstart"&&_e!=="touchmove"&&_e!=="wheel"||(Vt=!0),Ft?Vt!==void 0?yt.addEventListener(_e,$t,{capture:!0,passive:Vt}):yt.addEventListener(_e,$t,!0):Vt!==void 0?yt.addEventListener(_e,$t,{passive:Vt}):yt.addEventListener(_e,$t,!1)}function hd$1(yt,_e,$t,Ft,Vt){var qt=Ft;if(!(_e&1)&&!(_e&2)&&Ft!==null)e:for(;;){if(Ft===null)return;var zt=Ft.tag;
vendor: 2,855 bytes, line 37
37if(zt===3||zt===4){var Ht=Ft.stateNode.containerInfo;if(Ht===Vt||Ht.nodeType===8&&Ht.parentNode===Vt)break;if(zt===4)for(zt=Ft.return;zt!==null;){var Kt=zt.tag;if((Kt===3||Kt===4)&&(Kt=zt.stateNode.containerInfo,Kt===Vt||Kt.nodeType===8&&Kt.parentNode===Vt))return;zt=zt.return}for(;Ht!==null;){if(zt=Wc$1(Ht),zt===null)return;if(Kt=zt.tag,Kt===5||Kt===6){Ft=qt=zt;continue e}Ht=Ht.parentNode}}Ft=Ft.return}Jb$2(function(){var Gt=qt,Jt=xb$2($t),Xt=[];e:{var Zt=df.get(yt);if(Zt!==void 0){var er=td,tr=yt;switch(yt){case"keypress":if(od($t)===0)break e;case"keydown":case"keyup":er=Rd;break;case"focusin":tr="focus",er=Fd;break;case"focusout":tr="blur",er=Fd;break;case"beforeblur":case"afterblur":er=Fd;break;case"click":if($t.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":er=Bd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":er=Dd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":er=Vd;break;case $e:case af:case bf:er=Hd;break;case cf:er=Xd;break;case"scroll":er=vd;break;case"wheel":er=Zd;break;case"copy":case"cut":case"paste":er=Jd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":er=Td}var rr=(_e&4)!==0,ar=!rr&&yt==="scroll",nr=rr?Zt!==null?Zt+"Capture":null:Zt;rr=[];for(var cr=Gt,fr;cr!==null;){fr=cr;var vr=fr.stateNode;if(fr.tag===5&&vr!==null&&(fr=vr,nr!==null&&(vr=Kb$2(cr,nr),vr!=null&&rr.push(tf(cr,vr,fr)))),ar)break;cr=cr.return}0<rr.length&&(Zt=new er(Zt,tr,null,$t,Jt),Xt.push({event:Zt,listeners:rr}))}}if(!(_e&7)){e:{if(Zt=yt==="mouseover"||yt==="pointerover",er=yt==="mouseout"||yt==="pointerout",Zt&&$t!==wb$2&&(tr=$t.relatedTarget||$t.fromElement)&&(Wc$1(tr)||tr[uf]))break e;if((er||Zt)&&(Zt=Jt.window===Jt?Jt:(Zt=Jt.ownerDocument)?Zt.defaultView||Zt.parentWindow:window,er?(tr=$t.relatedTarget||$t.toElement,er=Gt,tr=tr?Wc$1(tr):null,tr!==null&&(ar=Vb$1(tr),tr!==ar||tr.tag!==5&&tr.tag!==6)&&(tr=null)):(er=null,tr=Gt),er!==tr)){if(rr=Bd,vr="onMouseLeave",nr="onMouseEnter",cr="mouse",(yt==="pointerout"||yt==="pointerover")&&(rr=Td,vr="onPointerLeave",nr="onPointerEnter",cr="pointer"),ar=er==null?Zt:ue(er),fr=tr==null?Zt:ue(tr),Zt=new rr(vr,cr+"leave",er,$t,Jt),Zt.target=ar,Zt.relatedTarget=fr,vr=null,Wc$1(Jt)===Gt&&(rr=new rr(nr,cr+"enter",tr,$t,Jt),rr.target=fr,rr.relatedTarget=ar,vr=rr),ar=vr,er&&tr)t:{for(rr=er,nr=tr,cr=0,fr=rr;fr;fr=vf(fr))cr++;for(fr=0,vr=nr;vr;vr=vf(vr))fr++;for(;0<cr-fr;)rr=vf(rr),cr--;for(;0<fr-cr;)nr=vf(nr),fr--;for(;cr--;){if(rr===nr||nr!==null&&rr===nr.alternate)break t;rr=vf(rr),nr=vf(nr)}rr=null}else rr=null;er!==null&&wf(Xt,Zt,er,rr,!1),tr!==null&&ar!==null&&wf(Xt,ar,tr,rr,!0)}}
vendor: 6,277 bytes, lines 37-38
37e:{if(Zt=Gt?ue(Gt):window,er=Zt.nodeName&&Zt.nodeName.toLowerCase(),er==="select"||er==="input"&&Zt.type==="file")var xr=ve;else if(me(Zt))if(we)xr=Fe;else{xr=De;var Sr=Ce}else(er=Zt.nodeName)&&er.toLowerCase()==="input"&&(Zt.type==="checkbox"||Zt.type==="radio")&&(xr=Ee);if(xr&&(xr=xr(yt,Gt))){ne(Xt,xr,$t,Jt);break e}Sr&&Sr(yt,Zt,Gt),yt==="focusout"&&(Sr=Zt._wrapperState)&&Sr.controlled&&Zt.type==="number"&&cb$2(Zt,"number",Zt.value)}switch(Sr=Gt?ue(Gt):window,yt){case"focusin":(me(Sr)||Sr.contentEditable==="true")&&(Qe=Sr,Re=Gt,Se=null);break;case"focusout":Se=Re=Qe=null;break;case"mousedown":Te=!0;break;case"contextmenu":case"mouseup":case"dragend":Te=!1,Ue(Xt,$t,Jt);break;case"selectionchange":if(Pe)break;case"keydown":case"keyup":Ue(Xt,$t,Jt)}var Tr;if(ae)e:{switch(yt){case"compositionstart":var Br="onCompositionStart";break e;case"compositionend":Br="onCompositionEnd";break e;case"compositionupdate":Br="onCompositionUpdate";break e}Br=void 0}else ie?ge(yt,$t)&&(Br="onCompositionEnd"):yt==="keydown"&&$t.keyCode===229&&(Br="onCompositionStart");Br&&(de&&$t.locale!=="ko"&&(ie||Br!=="onCompositionStart"?Br==="onCompositionEnd"&&ie&&(Tr=nd()):(kd$1=Jt,ld$1="value"in kd$1?kd$1.value:kd$1.textContent,ie=!0)),Sr=oe(Gt,Br),0<Sr.length&&(Br=new Ld(Br,yt,null,$t,Jt),Xt.push({event:Br,listeners:Sr}),Tr?Br.data=Tr:(Tr=he($t),Tr!==null&&(Br.data=Tr)))),(Tr=ce?je(yt,$t):ke(yt,$t))&&(Gt=oe(Gt,"onBeforeInput"),0<Gt.length&&(Jt=new Ld("onBeforeInput","beforeinput",null,$t,Jt),Xt.push({event:Jt,listeners:Gt}),Jt.data=Tr))}se(Xt,_e)})}function tf(yt,_e,$t){return{instance:yt,listener:_e,currentTarget:$t}}function oe(yt,_e){for(var $t=_e+"Capture",Ft=[];yt!==null;){var Vt=yt,qt=Vt.stateNode;Vt.tag===5&&qt!==null&&(Vt=qt,qt=Kb$2(yt,$t),qt!=null&&Ft.unshift(tf(yt,qt,Vt)),qt=Kb$2(yt,_e),qt!=null&&Ft.push(tf(yt,qt,Vt))),yt=yt.return}return Ft}function vf(yt){if(yt===null)return null;do yt=yt.return;while(yt&&yt.tag!==5);return yt||null}function wf(yt,_e,$t,Ft,Vt){for(var qt=_e._reactName,zt=[];$t!==null&&$t!==Ft;){var Ht=$t,Kt=Ht.alternate,Gt=Ht.stateNode;if(Kt!==null&&Kt===Ft)break;Ht.tag===5&&Gt!==null&&(Ht=Gt,Vt?(Kt=Kb$2($t,qt),Kt!=null&&zt.unshift(tf($t,Kt,Ht))):Vt||(Kt=Kb$2($t,qt),Kt!=null&&zt.push(tf($t,Kt,Ht)))),$t=$t.return}zt.length!==0&&yt.push({event:_e,listeners:zt})}var xf=/\r\n?/g,yf=/\u0000|\uFFFD/g;function zf(yt){return(typeof yt=="string"?yt:""+yt).replace(xf,` 38`).replace(yf,"")}function Af(yt,_e,$t){if(_e=zf(_e),zf(yt)!==_e&&$t)throw Error(p$5(425))}function Bf(){}var Cf=null,Df=null;function Ef(yt,_e){return yt==="textarea"||yt==="noscript"||typeof _e.children=="string"||typeof _e.children=="number"||typeof _e.dangerouslySetInnerHTML=="object"&&_e.dangerouslySetInnerHTML!==null&&_e.dangerouslySetInnerHTML.__html!=null}var Ff=typeof setTimeout=="function"?setTimeout:void 0,Gf=typeof clearTimeout=="function"?clearTimeout:void 0,Hf=typeof Promise=="function"?Promise:void 0,Jf=typeof queueMicrotask=="function"?queueMicrotask:typeof Hf<"u"?function(yt){return Hf.resolve(null).then(yt).catch(If)}:Ff;function If(yt){setTimeout(function(){throw yt})}function Kf(yt,_e){var $t=_e,Ft=0;do{var Vt=$t.nextSibling;if(yt.removeChild($t),Vt&&Vt.nodeType===8)if($t=Vt.data,$t==="/$"){if(Ft===0){yt.removeChild(Vt),bd$1(_e);return}Ft--}else $t!=="$"&&$t!=="$?"&&$t!=="$!"||Ft++;$t=Vt}while($t);bd$1(_e)}function Lf(yt){for(;yt!=null;yt=yt.nextSibling){var _e=yt.nodeType;if(_e===1||_e===3)break;if(_e===8){if(_e=yt.data,_e==="$"||_e==="$!"||_e==="$?")break;if(_e==="/$")return null}}return yt}function Mf(yt){yt=yt.previousSibling;for(var _e=0;yt;){if(yt.nodeType===8){var $t=yt.data;if($t==="$"||$t==="$!"||$t==="$?"){if(_e===0)return yt;_e--}else $t==="/$"&&_e++}yt=yt.previousSibling}return null}var Nf=Math.random().toString(36).slice(2),Of="__reactFiber$"+Nf,Pf="__reactProps$"+Nf,uf="__reactContainer$"+Nf,of="__reactEvents$"+Nf,Qf="__reactListeners$"+Nf,Rf="__reactHandles$"+Nf;function Wc$1(yt){var _e=yt[Of];if(_e)return _e;for(var $t=yt.parentNode;$t;){if(_e=$t[uf]||$t[Of]){if($t=_e.alternate,_e.child!==null||$t!==null&&$t.child!==null)for(yt=Mf(yt);yt!==null;){if($t=yt[Of])return $t;yt=Mf(yt)}return _e}yt=$t,$t=yt.parentNode}return null}function Cb$2(yt){return yt=yt[Of]||yt[uf],!yt||yt.tag!==5&&yt.tag!==6&&yt.tag!==13&&yt.tag!==3?null:yt}function ue(yt){if(yt.tag===5||yt.tag===6)return yt.stateNode;throw Error(p$5(33))}function Db$2(yt){return yt[Pf]||null}var Sf=[],Tf=-1;function Uf(yt){return{current:yt}}function E$4(yt){0>Tf||(yt.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G$2(yt,_e){Tf++,Sf[Tf]=yt.current,yt.current=_e}var Vf={},H$3=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(yt,_e){var $t=yt.type.contextTypes;if(!$t)return Vf;var Ft=yt.stateNode;if(Ft&&Ft.__reactInternalMemoizedUnmaskedChildContext===_e)return Ft.__reactInternalMemoizedMaskedChildContext;var Vt={},qt;for(qt in $t)Vt[qt]=_e[qt];return Ft&&(yt=yt.stateNode,yt.__reactInternalMemoizedUnmaskedChildContext=_e,yt.__reactInternalMemoizedMaskedChildContext=Vt),Vt}function Zf(yt){return yt=yt.childContextTypes,yt!=null}function $f(){E$4(Wf),E$4(H$3)}function ag(yt,_e,$t){if(H$3.current!==Vf)throw Error(p$5(168));G$2(H$3,_e),G$2(Wf,$t)}function bg(yt,_e,$t){var Ft=yt.stateNode;if(_e=_e.childContextTypes,typeof Ft.getChildContext!="function")return $t;Ft=Ft.getChildContext();for(var Vt in Ft)if(!(Vt in _e))throw Error(p$5(108,Ra$2(yt)||"Unknown",Vt));return A$3({},$t,Ft)}function cg(yt){return yt=(yt=yt.stateNode)&&yt.__reactInternalMemoizedMergedChildContext||Vf,Xf=H$3.current,G$2(H$3,yt),G$2(Wf,Wf.current),!0}function dg(yt,_e,$t){var Ft=yt.stateNode;if(!Ft)throw Error(p$5(169));$t?(yt=bg(yt,_e,Xf),Ft.__reactInternalMemoizedMergedChildContext=yt,E$4(Wf),E$4(H$3),G$2(H$3,yt)):E$4(Wf),G$2(Wf,$t)}var eg=null,fg=!1,gg=!1;function hg(yt){eg===null?eg=[yt]:eg.push(yt)}function ig(yt){fg=!0,hg(yt)}function jg(){if(!gg&&eg!==null){gg=!0;var yt=0,_e=C$3;try{var $t=eg;for(C$3=1;yt<$t.length;yt++){var Ft=$t[yt];do Ft=Ft(!0);while(Ft!==null)}eg=null,fg=!1}catch(Vt){throw eg!==null&&(eg=eg.slice(yt+1)),ac$1(fc$1,jg),Vt}finally{C$3=_e,gg=!1}}return null}var kg=[],lg=0,mg=null,ng=0,og=[],pg=0,qg=null,rg=1,sg="";function tg(yt,_e){kg[lg++]=ng,kg[lg++]=mg,mg=yt,ng=_e}function ug(yt,_e,$t){og[pg++]=rg,og[pg++]=sg,og[pg++]=qg,qg=yt;var Ft=rg;yt=sg;
vendor: 4,174 bytes, line 38
38var Vt=32-oc$1(Ft)-1;Ft&=~(1<<Vt),$t+=1;var qt=32-oc$1(_e)+Vt;if(30<qt){var zt=Vt-Vt%5;qt=(Ft&(1<<zt)-1).toString(32),Ft>>=zt,Vt-=zt,rg=1<<32-oc$1(_e)+Vt|$t<<Vt|Ft,sg=qt+yt}else rg=1<<qt|$t<<Vt|Ft,sg=yt}function vg(yt){yt.return!==null&&(tg(yt,1),ug(yt,1,0))}function wg(yt){for(;yt===mg;)mg=kg[--lg],kg[lg]=null,ng=kg[--lg],kg[lg]=null;for(;yt===qg;)qg=og[--pg],og[pg]=null,sg=og[--pg],og[pg]=null,rg=og[--pg],og[pg]=null}var xg=null,yg=null,I$3=!1,zg=null;function Ag(yt,_e){var $t=Bg(5,null,null,0);$t.elementType="DELETED",$t.stateNode=_e,$t.return=yt,_e=yt.deletions,_e===null?(yt.deletions=[$t],yt.flags|=16):_e.push($t)}function Cg(yt,_e){switch(yt.tag){case 5:var $t=yt.type;return _e=_e.nodeType!==1||$t.toLowerCase()!==_e.nodeName.toLowerCase()?null:_e,_e!==null?(yt.stateNode=_e,xg=yt,yg=Lf(_e.firstChild),!0):!1;case 6:return _e=yt.pendingProps===""||_e.nodeType!==3?null:_e,_e!==null?(yt.stateNode=_e,xg=yt,yg=null,!0):!1;case 13:return _e=_e.nodeType!==8?null:_e,_e!==null?($t=qg!==null?{id:rg,overflow:sg}:null,yt.memoizedState={dehydrated:_e,treeContext:$t,retryLane:1073741824},$t=Bg(18,null,null,0),$t.stateNode=_e,$t.return=yt,yt.child=$t,xg=yt,yg=null,!0):!1;default:return!1}}function Dg(yt){return(yt.mode&1)!==0&&(yt.flags&128)===0}function Eg(yt){if(I$3){var _e=yg;if(_e){var $t=_e;if(!Cg(yt,_e)){if(Dg(yt))throw Error(p$5(418));_e=Lf($t.nextSibling);var Ft=xg;_e&&Cg(yt,_e)?Ag(Ft,$t):(yt.flags=yt.flags&-4097|2,I$3=!1,xg=yt)}}else{if(Dg(yt))throw Error(p$5(418));yt.flags=yt.flags&-4097|2,I$3=!1,xg=yt}}}function Fg(yt){for(yt=yt.return;yt!==null&&yt.tag!==5&&yt.tag!==3&&yt.tag!==13;)yt=yt.return;xg=yt}function Gg(yt){if(yt!==xg)return!1;if(!I$3)return Fg(yt),I$3=!0,!1;var _e;if((_e=yt.tag!==3)&&!(_e=yt.tag!==5)&&(_e=yt.type,_e=_e!=="head"&&_e!=="body"&&!Ef(yt.type,yt.memoizedProps)),_e&&(_e=yg)){if(Dg(yt))throw Hg(),Error(p$5(418));for(;_e;)Ag(yt,_e),_e=Lf(_e.nextSibling)}if(Fg(yt),yt.tag===13){if(yt=yt.memoizedState,yt=yt!==null?yt.dehydrated:null,!yt)throw Error(p$5(317));e:{for(yt=yt.nextSibling,_e=0;yt;){if(yt.nodeType===8){var $t=yt.data;if($t==="/$"){if(_e===0){yg=Lf(yt.nextSibling);break e}_e--}else $t!=="$"&&$t!=="$!"&&$t!=="$?"||_e++}yt=yt.nextSibling}yg=null}}else yg=xg?Lf(yt.stateNode.nextSibling):null;return!0}function Hg(){for(var yt=yg;yt;)yt=Lf(yt.nextSibling)}function Ig(){yg=xg=null,I$3=!1}function Jg(yt){zg===null?zg=[yt]:zg.push(yt)}var Kg=ua$2.ReactCurrentBatchConfig;function Lg(yt,_e,$t){if(yt=$t.ref,yt!==null&&typeof yt!="function"&&typeof yt!="object"){if($t._owner){if($t=$t._owner,$t){if($t.tag!==1)throw Error(p$5(309));var Ft=$t.stateNode}if(!Ft)throw Error(p$5(147,yt));var Vt=Ft,qt=""+yt;return _e!==null&&_e.ref!==null&&typeof _e.ref=="function"&&_e.ref._stringRef===qt?_e.ref:(_e=function(zt){var Ht=Vt.refs;zt===null?delete Ht[qt]:Ht[qt]=zt},_e._stringRef=qt,_e)}if(typeof yt!="string")throw Error(p$5(284));if(!$t._owner)throw Error(p$5(290,yt))}return yt}function Mg(yt,_e){throw yt=Object.prototype.toString.call(_e),Error(p$5(31,yt==="[object Object]"?"object with keys {"+Object.keys(_e).join(", ")+"}":yt))}function Ng(yt){var _e=yt._init;return _e(yt._payload)}function Og(yt){function _e(nr,cr){if(yt){var fr=nr.deletions;fr===null?(nr.deletions=[cr],nr.flags|=16):fr.push(cr)}}function $t(nr,cr){if(!yt)return null;for(;cr!==null;)_e(nr,cr),cr=cr.sibling;return null}function Ft(nr,cr){for(nr=new Map;cr!==null;)cr.key!==null?nr.set(cr.key,cr):nr.set(cr.index,cr),cr=cr.sibling;return nr}function Vt(nr,cr){return nr=Pg(nr,cr),nr.index=0,nr.sibling=null,nr}function qt(nr,cr,fr){return nr.index=fr,yt?(fr=nr.alternate,fr!==null?(fr=fr.index,fr<cr?(nr.flags|=2,cr):fr):(nr.flags|=2,cr)):(nr.flags|=1048576,cr)}function zt(nr){return yt&&nr.alternate===null&&(nr.flags|=2),nr}function Ht(nr,cr,fr,vr){return cr===null||cr.tag!==6?(cr=Qg(fr,nr.mode,vr),cr.return=nr,cr):(cr=Vt(cr,fr),cr.return=nr,cr)}function Kt(nr,cr,fr,vr){var xr=fr.type;return xr===ya$2?Jt(nr,cr,fr.props.children,vr,fr.key):cr!==null&&(cr.elementType===xr||typeof xr=="object"&&xr!==null&&xr.$$typeof===Ha$2&&Ng(xr)===cr.type)?(vr=Vt(cr,fr.props),vr.ref=Lg(nr,cr,fr),vr.return=nr,vr):(vr=Rg(fr.type,fr.key,fr.props,null,
vendor: 4,194 bytes, line 38
38nr.mode,vr),vr.ref=Lg(nr,cr,fr),vr.return=nr,vr)}function Gt(nr,cr,fr,vr){return cr===null||cr.tag!==4||cr.stateNode.containerInfo!==fr.containerInfo||cr.stateNode.implementation!==fr.implementation?(cr=Sg(fr,nr.mode,vr),cr.return=nr,cr):(cr=Vt(cr,fr.children||[]),cr.return=nr,cr)}function Jt(nr,cr,fr,vr,xr){return cr===null||cr.tag!==7?(cr=Tg(fr,nr.mode,vr,xr),cr.return=nr,cr):(cr=Vt(cr,fr),cr.return=nr,cr)}function Xt(nr,cr,fr){if(typeof cr=="string"&&cr!==""||typeof cr=="number")return cr=Qg(""+cr,nr.mode,fr),cr.return=nr,cr;if(typeof cr=="object"&&cr!==null){switch(cr.$$typeof){case va$2:return fr=Rg(cr.type,cr.key,cr.props,null,nr.mode,fr),fr.ref=Lg(nr,null,cr),fr.return=nr,fr;case wa$2:return cr=Sg(cr,nr.mode,fr),cr.return=nr,cr;case Ha$2:var vr=cr._init;return Xt(nr,vr(cr._payload),fr)}if(eb$2(cr)||Ka$2(cr))return cr=Tg(cr,nr.mode,fr,null),cr.return=nr,cr;Mg(nr,cr)}return null}function Zt(nr,cr,fr,vr){var xr=cr!==null?cr.key:null;if(typeof fr=="string"&&fr!==""||typeof fr=="number")return xr!==null?null:Ht(nr,cr,""+fr,vr);if(typeof fr=="object"&&fr!==null){switch(fr.$$typeof){case va$2:return fr.key===xr?Kt(nr,cr,fr,vr):null;case wa$2:return fr.key===xr?Gt(nr,cr,fr,vr):null;case Ha$2:return xr=fr._init,Zt(nr,cr,xr(fr._payload),vr)}if(eb$2(fr)||Ka$2(fr))return xr!==null?null:Jt(nr,cr,fr,vr,null);Mg(nr,fr)}return null}function er(nr,cr,fr,vr,xr){if(typeof vr=="string"&&vr!==""||typeof vr=="number")return nr=nr.get(fr)||null,Ht(cr,nr,""+vr,xr);if(typeof vr=="object"&&vr!==null){switch(vr.$$typeof){case va$2:return nr=nr.get(vr.key===null?fr:vr.key)||null,Kt(cr,nr,vr,xr);case wa$2:return nr=nr.get(vr.key===null?fr:vr.key)||null,Gt(cr,nr,vr,xr);case Ha$2:var Sr=vr._init;return er(nr,cr,fr,Sr(vr._payload),xr)}if(eb$2(vr)||Ka$2(vr))return nr=nr.get(fr)||null,Jt(cr,nr,vr,xr,null);Mg(cr,vr)}return null}function tr(nr,cr,fr,vr){for(var xr=null,Sr=null,Tr=cr,Br=cr=0,jr=null;Tr!==null&&Br<fr.length;Br++){Tr.index>Br?(jr=Tr,Tr=null):jr=Tr.sibling;var Rr=Zt(nr,Tr,fr[Br],vr);if(Rr===null){Tr===null&&(Tr=jr);break}yt&&Tr&&Rr.alternate===null&&_e(nr,Tr),cr=qt(Rr,cr,Br),Sr===null?xr=Rr:Sr.sibling=Rr,Sr=Rr,Tr=jr}if(Br===fr.length)return $t(nr,Tr),I$3&&tg(nr,Br),xr;if(Tr===null){for(;Br<fr.length;Br++)Tr=Xt(nr,fr[Br],vr),Tr!==null&&(cr=qt(Tr,cr,Br),Sr===null?xr=Tr:Sr.sibling=Tr,Sr=Tr);return I$3&&tg(nr,Br),xr}for(Tr=Ft(nr,Tr);Br<fr.length;Br++)jr=er(Tr,nr,Br,fr[Br],vr),jr!==null&&(yt&&jr.alternate!==null&&Tr.delete(jr.key===null?Br:jr.key),cr=qt(jr,cr,Br),Sr===null?xr=jr:Sr.sibling=jr,Sr=jr);return yt&&Tr.forEach(function(yr){return _e(nr,yr)}),I$3&&tg(nr,Br),xr}function rr(nr,cr,fr,vr){var xr=Ka$2(fr);if(typeof xr!="function")throw Error(p$5(150));if(fr=xr.call(fr),fr==null)throw Error(p$5(151));for(var Sr=xr=null,Tr=cr,Br=cr=0,jr=null,Rr=fr.next();Tr!==null&&!Rr.done;Br++,Rr=fr.next()){Tr.index>Br?(jr=Tr,Tr=null):jr=Tr.sibling;var yr=Zt(nr,Tr,Rr.value,vr);if(yr===null){Tr===null&&(Tr=jr);break}yt&&Tr&&yr.alternate===null&&_e(nr,Tr),cr=qt(yr,cr,Br),Sr===null?xr=yr:Sr.sibling=yr,Sr=yr,Tr=jr}if(Rr.done)return $t(nr,Tr),I$3&&tg(nr,Br),xr;if(Tr===null){for(;!Rr.done;Br++,Rr=fr.next())Rr=Xt(nr,Rr.value,vr),Rr!==null&&(cr=qt(Rr,cr,Br),Sr===null?xr=Rr:Sr.sibling=Rr,Sr=Rr);return I$3&&tg(nr,Br),xr}for(Tr=Ft(nr,Tr);!Rr.done;Br++,Rr=fr.next())Rr=er(Tr,nr,Br,Rr.value,vr),Rr!==null&&(yt&&Rr.alternate!==null&&Tr.delete(Rr.key===null?Br:Rr.key),cr=qt(Rr,cr,Br),Sr===null?xr=Rr:Sr.sibling=Rr,Sr=Rr);return yt&&Tr.forEach(function(sr){return _e(nr,sr)}),I$3&&tg(nr,Br),xr}function ar(nr,cr,fr,vr){if(typeof fr=="object"&&fr!==null&&fr.type===ya$2&&fr.key===null&&(fr=fr.props.children),typeof fr=="object"&&fr!==null){switch(fr.$$typeof){case va$2:e:{for(var xr=fr.key,Sr=cr;Sr!==null;){if(Sr.key===xr){if(xr=fr.type,xr===ya$2){if(Sr.tag===7){$t(nr,Sr.sibling),cr=Vt(Sr,fr.props.children),cr.return=nr,nr=cr;break e}}else if(Sr.elementType===xr||typeof xr=="object"&&xr!==null&&xr.$$typeof===Ha$2&&Ng(xr)===Sr.type){$t(nr,Sr.sibling),cr=Vt(Sr,fr.props),cr.ref=Lg(nr,Sr,fr),cr.return=nr,nr=cr;break e}$t(nr,Sr);break}else _e(nr,Sr);Sr=Sr.sibling}fr.type===ya$2?(cr=Tg(fr.props.children,nr.mode,vr,fr.key),cr.return=nr,nr=cr):(vr=Rg(fr.type,fr.key,fr.props,null,
vendor: 8,404 bytes, line 38
38nr.mode,vr),vr.ref=Lg(nr,cr,fr),vr.return=nr,nr=vr)}return zt(nr);case wa$2:e:{for(Sr=fr.key;cr!==null;){if(cr.key===Sr)if(cr.tag===4&&cr.stateNode.containerInfo===fr.containerInfo&&cr.stateNode.implementation===fr.implementation){$t(nr,cr.sibling),cr=Vt(cr,fr.children||[]),cr.return=nr,nr=cr;break e}else{$t(nr,cr);break}else _e(nr,cr);cr=cr.sibling}cr=Sg(fr,nr.mode,vr),cr.return=nr,nr=cr}return zt(nr);case Ha$2:return Sr=fr._init,ar(nr,cr,Sr(fr._payload),vr)}if(eb$2(fr))return tr(nr,cr,fr,vr);if(Ka$2(fr))return rr(nr,cr,fr,vr);Mg(nr,fr)}return typeof fr=="string"&&fr!==""||typeof fr=="number"?(fr=""+fr,cr!==null&&cr.tag===6?($t(nr,cr.sibling),cr=Vt(cr,fr),cr.return=nr,nr=cr):($t(nr,cr),cr=Qg(fr,nr.mode,vr),cr.return=nr,nr=cr),zt(nr)):$t(nr,cr)}return ar}var Ug=Og(!0),Vg=Og(!1),Wg=Uf(null),Xg=null,Yg=null,Zg=null;function $g(){Zg=Yg=Xg=null}function ah(yt){var _e=Wg.current;E$4(Wg),yt._currentValue=_e}function bh(yt,_e,$t){for(;yt!==null;){var Ft=yt.alternate;if((yt.childLanes&_e)!==_e?(yt.childLanes|=_e,Ft!==null&&(Ft.childLanes|=_e)):Ft!==null&&(Ft.childLanes&_e)!==_e&&(Ft.childLanes|=_e),yt===$t)break;yt=yt.return}}function ch(yt,_e){Xg=yt,Zg=Yg=null,yt=yt.dependencies,yt!==null&&yt.firstContext!==null&&(yt.lanes&_e&&(dh$1=!0),yt.firstContext=null)}function eh(yt){var _e=yt._currentValue;if(Zg!==yt)if(yt={context:yt,memoizedValue:_e,next:null},Yg===null){if(Xg===null)throw Error(p$5(308));Yg=yt,Xg.dependencies={lanes:0,firstContext:yt}}else Yg=Yg.next=yt;return _e}var fh=null;function gh(yt){fh===null?fh=[yt]:fh.push(yt)}function hh(yt,_e,$t,Ft){var Vt=_e.interleaved;return Vt===null?($t.next=$t,gh(_e)):($t.next=Vt.next,Vt.next=$t),_e.interleaved=$t,ih(yt,Ft)}function ih(yt,_e){yt.lanes|=_e;var $t=yt.alternate;for($t!==null&&($t.lanes|=_e),$t=yt,yt=yt.return;yt!==null;)yt.childLanes|=_e,$t=yt.alternate,$t!==null&&($t.childLanes|=_e),$t=yt,yt=yt.return;return $t.tag===3?$t.stateNode:null}var jh=!1;function kh(yt){yt.updateQueue={baseState:yt.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lh(yt,_e){yt=yt.updateQueue,_e.updateQueue===yt&&(_e.updateQueue={baseState:yt.baseState,firstBaseUpdate:yt.firstBaseUpdate,lastBaseUpdate:yt.lastBaseUpdate,shared:yt.shared,effects:yt.effects})}function mh(yt,_e){return{eventTime:yt,lane:_e,tag:0,payload:null,callback:null,next:null}}function nh(yt,_e,$t){var Ft=yt.updateQueue;if(Ft===null)return null;if(Ft=Ft.shared,K$3&2){var Vt=Ft.pending;return Vt===null?_e.next=_e:(_e.next=Vt.next,Vt.next=_e),Ft.pending=_e,ih(yt,$t)}return Vt=Ft.interleaved,Vt===null?(_e.next=_e,gh(Ft)):(_e.next=Vt.next,Vt.next=_e),Ft.interleaved=_e,ih(yt,$t)}function oh(yt,_e,$t){if(_e=_e.updateQueue,_e!==null&&(_e=_e.shared,($t&4194240)!==0)){var Ft=_e.lanes;Ft&=yt.pendingLanes,$t|=Ft,_e.lanes=$t,Cc$1(yt,$t)}}function ph(yt,_e){var $t=yt.updateQueue,Ft=yt.alternate;if(Ft!==null&&(Ft=Ft.updateQueue,$t===Ft)){var Vt=null,qt=null;if($t=$t.firstBaseUpdate,$t!==null){do{var zt={eventTime:$t.eventTime,lane:$t.lane,tag:$t.tag,payload:$t.payload,callback:$t.callback,next:null};qt===null?Vt=qt=zt:qt=qt.next=zt,$t=$t.next}while($t!==null);qt===null?Vt=qt=_e:qt=qt.next=_e}else Vt=qt=_e;$t={baseState:Ft.baseState,firstBaseUpdate:Vt,lastBaseUpdate:qt,shared:Ft.shared,effects:Ft.effects},yt.updateQueue=$t;return}yt=$t.lastBaseUpdate,yt===null?$t.firstBaseUpdate=_e:yt.next=_e,$t.lastBaseUpdate=_e}function qh(yt,_e,$t,Ft){var Vt=yt.updateQueue;jh=!1;var qt=Vt.firstBaseUpdate,zt=Vt.lastBaseUpdate,Ht=Vt.shared.pending;if(Ht!==null){Vt.shared.pending=null;var Kt=Ht,Gt=Kt.next;Kt.next=null,zt===null?qt=Gt:zt.next=Gt,zt=Kt;var Jt=yt.alternate;Jt!==null&&(Jt=Jt.updateQueue,Ht=Jt.lastBaseUpdate,Ht!==zt&&(Ht===null?Jt.firstBaseUpdate=Gt:Ht.next=Gt,Jt.lastBaseUpdate=Kt))}if(qt!==null){var Xt=Vt.baseState;zt=0,Jt=Gt=Kt=null,Ht=qt;do{var Zt=Ht.lane,er=Ht.eventTime;if((Ft&Zt)===Zt){Jt!==null&&(Jt=Jt.next={eventTime:er,lane:0,tag:Ht.tag,payload:Ht.payload,callback:Ht.callback,next:null});e:{var tr=yt,rr=Ht;switch(Zt=_e,er=$t,rr.tag){case 1:if(tr=rr.payload,typeof tr=="function"){Xt=tr.call(er,Xt,Zt);break e}Xt=tr;break e;case 3:tr.flags=tr.flags&-65537|128;case 0:if(tr=rr.payload,Zt=typeof tr=="function"?tr.call(er,Xt,Zt):tr,Zt==null)break e;Xt=A$3({},Xt,Zt);break e;case 2:jh=!0}}Ht.callback!==null&&Ht.lane!==0&&(yt.flags|=64,Zt=Vt.effects,Zt===null?Vt.effects=[Ht]:Zt.push(Ht))}else er={eventTime:er,lane:Zt,tag:Ht.tag,payload:Ht.payload,callback:Ht.callback,next:null},Jt===null?(Gt=Jt=er,Kt=Xt):Jt=Jt.next=er,zt|=Zt;if(Ht=Ht.next,Ht===null){if(Ht=Vt.shared.pending,Ht===null)break;Zt=Ht,Ht=Zt.next,Zt.next=null,Vt.lastBaseUpdate=Zt,Vt.shared.pending=null}}while(!0);if(Jt===null&&(Kt=Xt),Vt.baseState=Kt,Vt.firstBaseUpdate=Gt,Vt.lastBaseUpdate=Jt,_e=Vt.shared.interleaved,_e!==null){Vt=_e;do zt|=Vt.lane,Vt=Vt.next;while(Vt!==_e)}else qt===null&&(Vt.shared.lanes=0);rh|=zt,yt.lanes=zt,yt.memoizedState=Xt}}function sh(yt,_e,$t){if(yt=_e.effects,_e.effects=null,yt!==null)for(_e=0;_e<yt.length;_e++){var Ft=yt[_e],Vt=Ft.callback;if(Vt!==null){if(Ft.callback=null,Ft=$t,typeof Vt!="function")throw Error(p$5(191,Vt));Vt.call(Ft)}}}var th={},uh=Uf(th),vh$1=Uf(th),wh=Uf(th);function xh(yt){if(yt===th)throw Error(p$5(174));return yt}function yh(yt,_e){switch(G$2(wh,_e),G$2(vh$1,yt),G$2(uh,th),yt=_e.nodeType,yt){case 9:case 11:_e=(_e=_e.documentElement)?_e.namespaceURI:lb$2(null,"");break;default:yt=yt===8?_e.parentNode:_e,_e=yt.namespaceURI||null,yt=yt.tagName,_e=lb$2(_e,yt)}E$4(uh),G$2(uh,_e)}function zh(){E$4(uh),E$4(vh$1),E$4(wh)}function Ah(yt){xh(wh.current);var _e=xh(uh.current),$t=lb$2(_e,yt.type);_e!==$t&&(G$2(vh$1,yt),G$2(uh,$t))}function Bh(yt){vh$1.current===yt&&(E$4(uh),E$4(vh$1))}var L$3=Uf(0);function Ch(yt){for(var _e=yt;_e!==null;){if(_e.tag===13){var $t=_e.memoizedState;if($t!==null&&($t=$t.dehydrated,$t===null||$t.data==="$?"||$t.data==="$!"))return _e}else if(_e.tag===19&&_e.memoizedProps.revealOrder!==void 0){if(_e.flags&128)return _e}else if(_e.child!==null){_e.child.return=_e,_e=_e.child;continue}if(_e===yt)break;for(;_e.sibling===null;){if(_e.return===null||_e.return===yt)return null;_e=_e.return}_e.sibling.return=_e.return,_e=_e.sibling}return null}var Dh=[];function Eh(){for(var yt=0;yt<Dh.length;yt++)Dh[yt]._workInProgressVersionPrimary=null;Dh.length=0}var Fh=ua$2.ReactCurrentDispatcher,Gh=ua$2.ReactCurrentBatchConfig,Hh=0,M$3=null,N$3=null,O$4=null,Ih=!1,Jh=!1,Kh=0,Lh=0;function P$4(){throw Error(p$5(321))}function Mh(yt,_e){if(_e===null)return!1;for(var $t=0;$t<_e.length&&$t<yt.length;$t++)if(!He(yt[$t],_e[$t]))return!1;return!0}function Nh(yt,_e,$t,Ft,Vt,qt){if(Hh=qt,M$3=_e,_e.memoizedState=null,_e.updateQueue=null,_e.lanes=0,Fh.current=yt===null||yt.memoizedState===null?Oh:Ph,yt=$t(Ft,Vt),Jh){qt=0;do{if(Jh=!1,Kh=0,25<=qt)throw Error(p$5(301));qt+=1,O$4=N$3=null,_e.updateQueue=null,Fh.current=Qh,yt=$t(Ft,Vt)}while(Jh)}if(Fh.current=Rh,_e=N$3!==null&&N$3.next!==null,Hh=0,O$4=N$3=M$3=null,Ih=!1,_e)throw Error(p$5(300));return yt}function Sh(){var yt=Kh!==0;return Kh=0,yt}function Th(){var yt={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return O$4===null?M$3.memoizedState=O$4=yt:O$4=O$4.next=yt,O$4}function Uh(){if(N$3===null){var yt=M$3.alternate;yt=yt!==null?yt.memoizedState:null}else yt=N$3.next;var _e=O$4===null?M$3.memoizedState:O$4.next;if(_e!==null)O$4=_e,N$3=yt;else{if(yt===null)throw Error(p$5(310));N$3=yt,yt={memoizedState:N$3.memoizedState,baseState:N$3.baseState,baseQueue:N$3.baseQueue,queue:N$3.queue,next:null},O$4===null?M$3.memoizedState=O$4=yt:O$4=O$4.next=yt}return O$4}function Vh(yt,_e){return typeof _e=="function"?_e(yt):_e}function Wh(yt){var _e=Uh(),$t=_e.queue;if($t===null)throw Error(p$5(311));$t.lastRenderedReducer=yt;var Ft=N$3,Vt=Ft.baseQueue,qt=$t.pending;if(qt!==null){if(Vt!==null){var zt=Vt.next;Vt.next=qt.next,qt.next=zt}Ft.baseQueue=Vt=qt,$t.pending=null}if(Vt!==null){qt=Vt.next,Ft=Ft.baseState;var Ht=zt=null,Kt=null,Gt=qt;do{var Jt=Gt.lane;if((Hh&Jt)===Jt)Kt!==null&&(Kt=Kt.next={lane:0,action:Gt.action,hasEagerState:Gt.hasEagerState,eagerState:Gt.eagerState,next:null}),Ft=Gt.hasEagerState?Gt.eagerState:yt(Ft,Gt.action);else{var Xt={lane:Jt,action:Gt.action,hasEagerState:Gt.hasEagerState,eagerState:Gt.eagerState,next:null};Kt===null?(Ht=Kt=Xt,zt=Ft):Kt=Kt.next=Xt,M$3.lanes|=Jt,rh|=Jt}Gt=Gt.next}while(Gt!==null&&Gt!==qt);
vendor: 4,456 bytes, line 38
38Kt===null?zt=Ft:Kt.next=Ht,He(Ft,_e.memoizedState)||(dh$1=!0),_e.memoizedState=Ft,_e.baseState=zt,_e.baseQueue=Kt,$t.lastRenderedState=Ft}if(yt=$t.interleaved,yt!==null){Vt=yt;do qt=Vt.lane,M$3.lanes|=qt,rh|=qt,Vt=Vt.next;while(Vt!==yt)}else Vt===null&&($t.lanes=0);return[_e.memoizedState,$t.dispatch]}function Xh(yt){var _e=Uh(),$t=_e.queue;if($t===null)throw Error(p$5(311));$t.lastRenderedReducer=yt;var Ft=$t.dispatch,Vt=$t.pending,qt=_e.memoizedState;if(Vt!==null){$t.pending=null;var zt=Vt=Vt.next;do qt=yt(qt,zt.action),zt=zt.next;while(zt!==Vt);He(qt,_e.memoizedState)||(dh$1=!0),_e.memoizedState=qt,_e.baseQueue===null&&(_e.baseState=qt),$t.lastRenderedState=qt}return[qt,Ft]}function Yh(){}function Zh(yt,_e){var $t=M$3,Ft=Uh(),Vt=_e(),qt=!He(Ft.memoizedState,Vt);if(qt&&(Ft.memoizedState=Vt,dh$1=!0),Ft=Ft.queue,$h(ai.bind(null,$t,Ft,yt),[yt]),Ft.getSnapshot!==_e||qt||O$4!==null&&O$4.memoizedState.tag&1){if($t.flags|=2048,bi(9,ci.bind(null,$t,Ft,Vt,_e),void 0,null),Q$3===null)throw Error(p$5(349));Hh&30||di($t,_e,Vt)}return Vt}function di(yt,_e,$t){yt.flags|=16384,yt={getSnapshot:_e,value:$t},_e=M$3.updateQueue,_e===null?(_e={lastEffect:null,stores:null},M$3.updateQueue=_e,_e.stores=[yt]):($t=_e.stores,$t===null?_e.stores=[yt]:$t.push(yt))}function ci(yt,_e,$t,Ft){_e.value=$t,_e.getSnapshot=Ft,ei(_e)&&fi(yt)}function ai(yt,_e,$t){return $t(function(){ei(_e)&&fi(yt)})}function ei(yt){var _e=yt.getSnapshot;yt=yt.value;try{var $t=_e();return!He(yt,$t)}catch{return!0}}function fi(yt){var _e=ih(yt,1);_e!==null&&gi(_e,yt,1,-1)}function hi(yt){var _e=Th();return typeof yt=="function"&&(yt=yt()),_e.memoizedState=_e.baseState=yt,yt={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Vh,lastRenderedState:yt},_e.queue=yt,yt=yt.dispatch=ii.bind(null,M$3,yt),[_e.memoizedState,yt]}function bi(yt,_e,$t,Ft){return yt={tag:yt,create:_e,destroy:$t,deps:Ft,next:null},_e=M$3.updateQueue,_e===null?(_e={lastEffect:null,stores:null},M$3.updateQueue=_e,_e.lastEffect=yt.next=yt):($t=_e.lastEffect,$t===null?_e.lastEffect=yt.next=yt:(Ft=$t.next,$t.next=yt,yt.next=Ft,_e.lastEffect=yt)),yt}function ji(){return Uh().memoizedState}function ki(yt,_e,$t,Ft){var Vt=Th();M$3.flags|=yt,Vt.memoizedState=bi(1|_e,$t,void 0,Ft===void 0?null:Ft)}function li(yt,_e,$t,Ft){var Vt=Uh();Ft=Ft===void 0?null:Ft;var qt=void 0;if(N$3!==null){var zt=N$3.memoizedState;if(qt=zt.destroy,Ft!==null&&Mh(Ft,zt.deps)){Vt.memoizedState=bi(_e,$t,qt,Ft);return}}M$3.flags|=yt,Vt.memoizedState=bi(1|_e,$t,qt,Ft)}function mi(yt,_e){return ki(8390656,8,yt,_e)}function $h(yt,_e){return li(2048,8,yt,_e)}function ni(yt,_e){return li(4,2,yt,_e)}function oi(yt,_e){return li(4,4,yt,_e)}function pi(yt,_e){if(typeof _e=="function")return yt=yt(),_e(yt),function(){_e(null)};if(_e!=null)return yt=yt(),_e.current=yt,function(){_e.current=null}}function qi(yt,_e,$t){return $t=$t!=null?$t.concat([yt]):null,li(4,4,pi.bind(null,_e,yt),$t)}function ri(){}function si(yt,_e){var $t=Uh();_e=_e===void 0?null:_e;var Ft=$t.memoizedState;return Ft!==null&&_e!==null&&Mh(_e,Ft[1])?Ft[0]:($t.memoizedState=[yt,_e],yt)}function ti(yt,_e){var $t=Uh();_e=_e===void 0?null:_e;var Ft=$t.memoizedState;return Ft!==null&&_e!==null&&Mh(_e,Ft[1])?Ft[0]:(yt=yt(),$t.memoizedState=[yt,_e],yt)}function ui(yt,_e,$t){return Hh&21?(He($t,_e)||($t=yc$1(),M$3.lanes|=$t,rh|=$t,yt.baseState=!0),_e):(yt.baseState&&(yt.baseState=!1,dh$1=!0),yt.memoizedState=$t)}function vi(yt,_e){var $t=C$3;C$3=$t!==0&&4>$t?$t:4,yt(!0);var Ft=Gh.transition;Gh.transition={};try{yt(!1),_e()}finally{C$3=$t,Gh.transition=Ft}}function wi(){return Uh().memoizedState}function xi(yt,_e,$t){var Ft=yi(yt);if($t={lane:Ft,action:$t,hasEagerState:!1,eagerState:null,next:null},zi(yt))Ai(_e,$t);else if($t=hh(yt,_e,$t,Ft),$t!==null){var Vt=R$3();gi($t,yt,Ft,Vt),Bi($t,_e,Ft)}}function ii(yt,_e,$t){var Ft=yi(yt),Vt={lane:Ft,action:$t,hasEagerState:!1,eagerState:null,next:null};if(zi(yt))Ai(_e,Vt);else{var qt=yt.alternate;if(yt.lanes===0&&(qt===null||qt.lanes===0)&&(qt=_e.lastRenderedReducer,qt!==null))try{var zt=_e.lastRenderedState,Ht=qt(zt,$t);if(Vt.hasEagerState=!0,Vt.eagerState=Ht,He(Ht,zt)){var Kt=_e.interleaved;Kt===null?(Vt.next=Vt,gh(_e)):(Vt.next=Kt.next,Kt.next=Vt),_e.interleaved=Vt;return}}catch{}finally{}$t=hh(yt,_e,Vt,Ft),$t!==null&&(Vt=R$3(),gi($t,yt,Ft,Vt),Bi($t,_e,Ft))}}function zi(yt){var _e=yt.alternate;return yt===M$3||_e!==null&&_e===M$3}function Ai(yt,_e){Jh=Ih=!0;var $t=yt.pending;
vendor: 8,641 bytes, lines 38-40
38$t===null?_e.next=_e:(_e.next=$t.next,$t.next=_e),yt.pending=_e}function Bi(yt,_e,$t){if($t&4194240){var Ft=_e.lanes;Ft&=yt.pendingLanes,$t|=Ft,_e.lanes=$t,Cc$1(yt,$t)}}var Rh={readContext:eh,useCallback:P$4,useContext:P$4,useEffect:P$4,useImperativeHandle:P$4,useInsertionEffect:P$4,useLayoutEffect:P$4,useMemo:P$4,useReducer:P$4,useRef:P$4,useState:P$4,useDebugValue:P$4,useDeferredValue:P$4,useTransition:P$4,useMutableSource:P$4,useSyncExternalStore:P$4,useId:P$4,unstable_isNewReconciler:!1},Oh={readContext:eh,useCallback:function(yt,_e){return Th().memoizedState=[yt,_e===void 0?null:_e],yt},useContext:eh,useEffect:mi,useImperativeHandle:function(yt,_e,$t){return $t=$t!=null?$t.concat([yt]):null,ki(4194308,4,pi.bind(null,_e,yt),$t)},useLayoutEffect:function(yt,_e){return ki(4194308,4,yt,_e)},useInsertionEffect:function(yt,_e){return ki(4,2,yt,_e)},useMemo:function(yt,_e){var $t=Th();return _e=_e===void 0?null:_e,yt=yt(),$t.memoizedState=[yt,_e],yt},useReducer:function(yt,_e,$t){var Ft=Th();return _e=$t!==void 0?$t(_e):_e,Ft.memoizedState=Ft.baseState=_e,yt={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:yt,lastRenderedState:_e},Ft.queue=yt,yt=yt.dispatch=xi.bind(null,M$3,yt),[Ft.memoizedState,yt]},useRef:function(yt){var _e=Th();return yt={current:yt},_e.memoizedState=yt},useState:hi,useDebugValue:ri,useDeferredValue:function(yt){return Th().memoizedState=yt},useTransition:function(){var yt=hi(!1),_e=yt[0];return yt=vi.bind(null,yt[1]),Th().memoizedState=yt,[_e,yt]},useMutableSource:function(){},useSyncExternalStore:function(yt,_e,$t){var Ft=M$3,Vt=Th();if(I$3){if($t===void 0)throw Error(p$5(407));$t=$t()}else{if($t=_e(),Q$3===null)throw Error(p$5(349));Hh&30||di(Ft,_e,$t)}Vt.memoizedState=$t;var qt={value:$t,getSnapshot:_e};return Vt.queue=qt,mi(ai.bind(null,Ft,qt,yt),[yt]),Ft.flags|=2048,bi(9,ci.bind(null,Ft,qt,$t,_e),void 0,null),$t},useId:function(){var yt=Th(),_e=Q$3.identifierPrefix;if(I$3){var $t=sg,Ft=rg;$t=(Ft&~(1<<32-oc$1(Ft)-1)).toString(32)+$t,_e=":"+_e+"R"+$t,$t=Kh++,0<$t&&(_e+="H"+$t.toString(32)),_e+=":"}else $t=Lh++,_e=":"+_e+"r"+$t.toString(32)+":";return yt.memoizedState=_e},unstable_isNewReconciler:!1},Ph={readContext:eh,useCallback:si,useContext:eh,useEffect:$h,useImperativeHandle:qi,useInsertionEffect:ni,useLayoutEffect:oi,useMemo:ti,useReducer:Wh,useRef:ji,useState:function(){return Wh(Vh)},useDebugValue:ri,useDeferredValue:function(yt){var _e=Uh();return ui(_e,N$3.memoizedState,yt)},useTransition:function(){var yt=Wh(Vh)[0],_e=Uh().memoizedState;return[yt,_e]},useMutableSource:Yh,useSyncExternalStore:Zh,useId:wi,unstable_isNewReconciler:!1},Qh={readContext:eh,useCallback:si,useContext:eh,useEffect:$h,useImperativeHandle:qi,useInsertionEffect:ni,useLayoutEffect:oi,useMemo:ti,useReducer:Xh,useRef:ji,useState:function(){return Xh(Vh)},useDebugValue:ri,useDeferredValue:function(yt){var _e=Uh();return N$3===null?_e.memoizedState=yt:ui(_e,N$3.memoizedState,yt)},useTransition:function(){var yt=Xh(Vh)[0],_e=Uh().memoizedState;return[yt,_e]},useMutableSource:Yh,useSyncExternalStore:Zh,useId:wi,unstable_isNewReconciler:!1};function Ci(yt,_e){if(yt&&yt.defaultProps){_e=A$3({},_e),yt=yt.defaultProps;for(var $t in yt)_e[$t]===void 0&&(_e[$t]=yt[$t]);return _e}return _e}function Di(yt,_e,$t,Ft){_e=yt.memoizedState,$t=$t(Ft,_e),$t=$t==null?_e:A$3({},_e,$t),yt.memoizedState=$t,yt.lanes===0&&(yt.updateQueue.baseState=$t)}var Ei={isMounted:function(yt){return(yt=yt._reactInternals)?Vb$1(yt)===yt:!1},enqueueSetState:function(yt,_e,$t){yt=yt._reactInternals;var Ft=R$3(),Vt=yi(yt),qt=mh(Ft,Vt);qt.payload=_e,$t!=null&&(qt.callback=$t),_e=nh(yt,qt,Vt),_e!==null&&(gi(_e,yt,Vt,Ft),oh(_e,yt,Vt))},enqueueReplaceState:function(yt,_e,$t){yt=yt._reactInternals;var Ft=R$3(),Vt=yi(yt),qt=mh(Ft,Vt);qt.tag=1,qt.payload=_e,$t!=null&&(qt.callback=$t),_e=nh(yt,qt,Vt),_e!==null&&(gi(_e,yt,Vt,Ft),oh(_e,yt,Vt))},enqueueForceUpdate:function(yt,_e){yt=yt._reactInternals;var $t=R$3(),Ft=yi(yt),Vt=mh($t,Ft);Vt.tag=2,_e!=null&&(Vt.callback=_e),_e=nh(yt,Vt,Ft),_e!==null&&(gi(_e,yt,Ft,$t),oh(_e,yt,Ft))}};function Fi(yt,_e,$t,Ft,Vt,qt,zt){return yt=yt.stateNode,typeof yt.shouldComponentUpdate=="function"?yt.shouldComponentUpdate(Ft,qt,zt):_e.prototype&&_e.prototype.isPureReactComponent?!Ie($t,Ft)||!Ie(Vt,qt):!0}function Gi(yt,_e,$t){var Ft=!1,Vt=Vf,qt=_e.contextType;return typeof qt=="object"&&qt!==null?qt=eh(qt):(Vt=Zf(_e)?Xf:H$3.current,Ft=_e.contextTypes,qt=(Ft=Ft!=null)?Yf(yt,Vt):Vf),_e=new _e($t,qt),yt.memoizedState=_e.state!==null&&_e.state!==void 0?_e.state:null,_e.updater=Ei,yt.stateNode=_e,_e._reactInternals=yt,Ft&&(yt=yt.stateNode,yt.__reactInternalMemoizedUnmaskedChildContext=Vt,yt.__reactInternalMemoizedMaskedChildContext=qt),_e}function Hi(yt,_e,$t,Ft){yt=_e.state,typeof _e.componentWillReceiveProps=="function"&&_e.componentWillReceiveProps($t,Ft),typeof _e.UNSAFE_componentWillReceiveProps=="function"&&_e.UNSAFE_componentWillReceiveProps($t,Ft),_e.state!==yt&&Ei.enqueueReplaceState(_e,_e.state,null)}function Ii(yt,_e,$t,Ft){var Vt=yt.stateNode;Vt.props=$t,Vt.state=yt.memoizedState,Vt.refs={},kh(yt);var qt=_e.contextType;typeof qt=="object"&&qt!==null?Vt.context=eh(qt):(qt=Zf(_e)?Xf:H$3.current,Vt.context=Yf(yt,qt)),Vt.state=yt.memoizedState,qt=_e.getDerivedStateFromProps,typeof qt=="function"&&(Di(yt,_e,qt,$t),Vt.state=yt.memoizedState),typeof _e.getDerivedStateFromProps=="function"||typeof Vt.getSnapshotBeforeUpdate=="function"||typeof Vt.UNSAFE_componentWillMount!="function"&&typeof Vt.componentWillMount!="function"||(_e=Vt.state,typeof Vt.componentWillMount=="function"&&Vt.componentWillMount(),typeof Vt.UNSAFE_componentWillMount=="function"&&Vt.UNSAFE_componentWillMount(),_e!==Vt.state&&Ei.enqueueReplaceState(Vt,Vt.state,null),qh(yt,$t,Vt,Ft),Vt.state=yt.memoizedState),typeof Vt.componentDidMount=="function"&&(yt.flags|=4194308)}function Ji(yt,_e){try{var $t="",Ft=_e;do $t+=Pa$2(Ft),Ft=Ft.return;while(Ft);var Vt=$t}catch(qt){Vt=` 39Error generating stack: `+qt.message+` 40`+qt.stack}return{value:yt,source:_e,stack:Vt,digest:null}}function Ki(yt,_e,$t){return{value:yt,source:null,stack:$t??null,digest:_e??null}}function Li(yt,_e){try{console.error(_e.value)}catch($t){setTimeout(function(){throw $t})}}var Mi=typeof WeakMap=="function"?WeakMap:Map;function Ni(yt,_e,$t){$t=mh(-1,$t),$t.tag=3,$t.payload={element:null};var Ft=_e.value;return $t.callback=function(){Oi||(Oi=!0,Pi=Ft),Li(yt,_e)},$t}function Qi(yt,_e,$t){$t=mh(-1,$t),$t.tag=3;var Ft=yt.type.getDerivedStateFromError;if(typeof Ft=="function"){var Vt=_e.value;$t.payload=function(){return Ft(Vt)},$t.callback=function(){Li(yt,_e)}}var qt=yt.stateNode;return qt!==null&&typeof qt.componentDidCatch=="function"&&($t.callback=function(){Li(yt,_e),typeof Ft!="function"&&(Ri===null?Ri=new Set([this]):Ri.add(this));var zt=_e.stack;this.componentDidCatch(_e.value,{componentStack:zt!==null?zt:""})}),$t}function Si(yt,_e,$t){var Ft=yt.pingCache;if(Ft===null){Ft=yt.pingCache=new Mi;var Vt=new Set;Ft.set(_e,Vt)}else Vt=Ft.get(_e),Vt===void 0&&(Vt=new Set,Ft.set(_e,Vt));Vt.has($t)||(Vt.add($t),yt=Ti.bind(null,yt,_e,$t),_e.then(yt,yt))}function Ui(yt){do{var _e;if((_e=yt.tag===13)&&(_e=yt.memoizedState,_e=_e!==null?_e.dehydrated!==null:!0),_e)return yt;yt=yt.return}while(yt!==null);return null}function Vi(yt,_e,$t,Ft,Vt){return yt.mode&1?(yt.flags|=65536,yt.lanes=Vt,yt):(yt===_e?yt.flags|=65536:(yt.flags|=128,$t.flags|=131072,$t.flags&=-52805,$t.tag===1&&($t.alternate===null?$t.tag=17:(_e=mh(-1,1),_e.tag=2,nh($t,_e,1))),$t.lanes|=1),yt)}var Wi=ua$2.ReactCurrentOwner,dh$1=!1;function Xi(yt,_e,$t,Ft){_e.child=yt===null?Vg(_e,null,$t,Ft):Ug(_e,yt.child,$t,Ft)}function Yi(yt,_e,$t,Ft,Vt){$t=$t.render;var qt=_e.ref;return ch(_e,Vt),Ft=Nh(yt,_e,$t,Ft,qt,Vt),$t=Sh(),yt!==null&&!dh$1?(_e.updateQueue=yt.updateQueue,_e.flags&=-2053,yt.lanes&=~Vt,Zi(yt,_e,Vt)):(I$3&&$t&&vg(_e),_e.flags|=1,Xi(yt,_e,Ft,Vt),_e.child)}function $i(yt,_e,$t,Ft,Vt){if(yt===null){var qt=$t.type;return typeof qt=="function"&&!aj(qt)&&qt.defaultProps===void 0&&$t.compare===null&&$t.defaultProps===void 0?(_e.tag=15,_e.type=qt,bj(yt,_e,qt,Ft,Vt)):(yt=Rg($t.type,null,Ft,_e,_e.mode,Vt),yt.ref=_e.ref,yt.return=_e,_e.child=yt)}if(qt=yt.child,!(yt.lanes&Vt)){var zt=qt.memoizedProps;if($t=$t.compare,$t=$t!==null?$t:Ie,$t(zt,Ft)&&yt.ref===_e.ref)return Zi(yt,_e,Vt)}return _e.flags|=1,yt=Pg(qt,Ft),yt.ref=_e.ref,yt.return=_e,_e.child=yt}function bj(yt,_e,$t,Ft,Vt){if(yt!==null){var qt=yt.memoizedProps;if(Ie(qt,Ft)&&yt.ref===_e.ref)if(dh$1=!1,_e.pendingProps=Ft=qt,(yt.lanes&Vt)!==0)yt.flags&131072&&(dh$1=!0);else return _e.lanes=yt.lanes,Zi(yt,_e,Vt)}return cj(yt,_e,$t,Ft,Vt)}
vendor: 9,794 bytes, line 40
40function dj(yt,_e,$t){var Ft=_e.pendingProps,Vt=Ft.children,qt=yt!==null?yt.memoizedState:null;if(Ft.mode==="hidden")if(!(_e.mode&1))_e.memoizedState={baseLanes:0,cachePool:null,transitions:null},G$2(ej,fj),fj|=$t;else{if(!($t&1073741824))return yt=qt!==null?qt.baseLanes|$t:$t,_e.lanes=_e.childLanes=1073741824,_e.memoizedState={baseLanes:yt,cachePool:null,transitions:null},_e.updateQueue=null,G$2(ej,fj),fj|=yt,null;_e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ft=qt!==null?qt.baseLanes:$t,G$2(ej,fj),fj|=Ft}else qt!==null?(Ft=qt.baseLanes|$t,_e.memoizedState=null):Ft=$t,G$2(ej,fj),fj|=Ft;return Xi(yt,_e,Vt,$t),_e.child}function gj(yt,_e){var $t=_e.ref;(yt===null&&$t!==null||yt!==null&&yt.ref!==$t)&&(_e.flags|=512,_e.flags|=2097152)}function cj(yt,_e,$t,Ft,Vt){var qt=Zf($t)?Xf:H$3.current;return qt=Yf(_e,qt),ch(_e,Vt),$t=Nh(yt,_e,$t,Ft,qt,Vt),Ft=Sh(),yt!==null&&!dh$1?(_e.updateQueue=yt.updateQueue,_e.flags&=-2053,yt.lanes&=~Vt,Zi(yt,_e,Vt)):(I$3&&Ft&&vg(_e),_e.flags|=1,Xi(yt,_e,$t,Vt),_e.child)}function hj(yt,_e,$t,Ft,Vt){if(Zf($t)){var qt=!0;cg(_e)}else qt=!1;if(ch(_e,Vt),_e.stateNode===null)ij(yt,_e),Gi(_e,$t,Ft),Ii(_e,$t,Ft,Vt),Ft=!0;else if(yt===null){var zt=_e.stateNode,Ht=_e.memoizedProps;zt.props=Ht;var Kt=zt.context,Gt=$t.contextType;typeof Gt=="object"&&Gt!==null?Gt=eh(Gt):(Gt=Zf($t)?Xf:H$3.current,Gt=Yf(_e,Gt));var Jt=$t.getDerivedStateFromProps,Xt=typeof Jt=="function"||typeof zt.getSnapshotBeforeUpdate=="function";Xt||typeof zt.UNSAFE_componentWillReceiveProps!="function"&&typeof zt.componentWillReceiveProps!="function"||(Ht!==Ft||Kt!==Gt)&&Hi(_e,zt,Ft,Gt),jh=!1;var Zt=_e.memoizedState;zt.state=Zt,qh(_e,Ft,zt,Vt),Kt=_e.memoizedState,Ht!==Ft||Zt!==Kt||Wf.current||jh?(typeof Jt=="function"&&(Di(_e,$t,Jt,Ft),Kt=_e.memoizedState),(Ht=jh||Fi(_e,$t,Ht,Ft,Zt,Kt,Gt))?(Xt||typeof zt.UNSAFE_componentWillMount!="function"&&typeof zt.componentWillMount!="function"||(typeof zt.componentWillMount=="function"&&zt.componentWillMount(),typeof zt.UNSAFE_componentWillMount=="function"&&zt.UNSAFE_componentWillMount()),typeof zt.componentDidMount=="function"&&(_e.flags|=4194308)):(typeof zt.componentDidMount=="function"&&(_e.flags|=4194308),_e.memoizedProps=Ft,_e.memoizedState=Kt),zt.props=Ft,zt.state=Kt,zt.context=Gt,Ft=Ht):(typeof zt.componentDidMount=="function"&&(_e.flags|=4194308),Ft=!1)}else{zt=_e.stateNode,lh(yt,_e),Ht=_e.memoizedProps,Gt=_e.type===_e.elementType?Ht:Ci(_e.type,Ht),zt.props=Gt,Xt=_e.pendingProps,Zt=zt.context,Kt=$t.contextType,typeof Kt=="object"&&Kt!==null?Kt=eh(Kt):(Kt=Zf($t)?Xf:H$3.current,Kt=Yf(_e,Kt));var er=$t.getDerivedStateFromProps;(Jt=typeof er=="function"||typeof zt.getSnapshotBeforeUpdate=="function")||typeof zt.UNSAFE_componentWillReceiveProps!="function"&&typeof zt.componentWillReceiveProps!="function"||(Ht!==Xt||Zt!==Kt)&&Hi(_e,zt,Ft,Kt),jh=!1,Zt=_e.memoizedState,zt.state=Zt,qh(_e,Ft,zt,Vt);var tr=_e.memoizedState;Ht!==Xt||Zt!==tr||Wf.current||jh?(typeof er=="function"&&(Di(_e,$t,er,Ft),tr=_e.memoizedState),(Gt=jh||Fi(_e,$t,Gt,Ft,Zt,tr,Kt)||!1)?(Jt||typeof zt.UNSAFE_componentWillUpdate!="function"&&typeof zt.componentWillUpdate!="function"||(typeof zt.componentWillUpdate=="function"&&zt.componentWillUpdate(Ft,tr,Kt),typeof zt.UNSAFE_componentWillUpdate=="function"&&zt.UNSAFE_componentWillUpdate(Ft,tr,Kt)),typeof zt.componentDidUpdate=="function"&&(_e.flags|=4),typeof zt.getSnapshotBeforeUpdate=="function"&&(_e.flags|=1024)):(typeof zt.componentDidUpdate!="function"||Ht===yt.memoizedProps&&Zt===yt.memoizedState||(_e.flags|=4),typeof zt.getSnapshotBeforeUpdate!="function"||Ht===yt.memoizedProps&&Zt===yt.memoizedState||(_e.flags|=1024),_e.memoizedProps=Ft,_e.memoizedState=tr),zt.props=Ft,zt.state=tr,zt.context=Kt,Ft=Gt):(typeof zt.componentDidUpdate!="function"||Ht===yt.memoizedProps&&Zt===yt.memoizedState||(_e.flags|=4),typeof zt.getSnapshotBeforeUpdate!="function"||Ht===yt.memoizedProps&&Zt===yt.memoizedState||(_e.flags|=1024),Ft=!1)}return jj(yt,_e,$t,Ft,qt,Vt)}function jj(yt,_e,$t,Ft,Vt,qt){gj(yt,_e);var zt=(_e.flags&128)!==0;if(!Ft&&!zt)return Vt&&dg(_e,$t,!1),Zi(yt,_e,qt);Ft=_e.stateNode,Wi.current=_e;var Ht=zt&&typeof $t.getDerivedStateFromError!="function"?null:Ft.render();return _e.flags|=1,yt!==null&&zt?(_e.child=Ug(_e,yt.child,null,qt),_e.child=Ug(_e,null,Ht,qt)):Xi(yt,_e,Ht,qt),_e.memoizedState=Ft.state,Vt&&dg(_e,$t,!0),_e.child}function kj(yt){var _e=yt.stateNode;_e.pendingContext?ag(yt,_e.pendingContext,_e.pendingContext!==_e.context):_e.context&&ag(yt,_e.context,!1),yh(yt,_e.containerInfo)}function lj(yt,_e,$t,Ft,Vt){return Ig(),Jg(Vt),_e.flags|=256,Xi(yt,_e,$t,Ft),_e.child}var mj={dehydrated:null,treeContext:null,retryLane:0};function nj(yt){return{baseLanes:yt,cachePool:null,transitions:null}}function oj(yt,_e,$t){var Ft=_e.pendingProps,Vt=L$3.current,qt=!1,zt=(_e.flags&128)!==0,Ht;if((Ht=zt)||(Ht=yt!==null&&yt.memoizedState===null?!1:(Vt&2)!==0),Ht?(qt=!0,_e.flags&=-129):(yt===null||yt.memoizedState!==null)&&(Vt|=1),G$2(L$3,Vt&1),yt===null)return Eg(_e),yt=_e.memoizedState,yt!==null&&(yt=yt.dehydrated,yt!==null)?(_e.mode&1?yt.data==="$!"?_e.lanes=8:_e.lanes=1073741824:_e.lanes=1,null):(zt=Ft.children,yt=Ft.fallback,qt?(Ft=_e.mode,qt=_e.child,zt={mode:"hidden",children:zt},!(Ft&1)&&qt!==null?(qt.childLanes=0,qt.pendingProps=zt):qt=pj(zt,Ft,0,null),yt=Tg(yt,Ft,$t,null),qt.return=_e,yt.return=_e,qt.sibling=yt,_e.child=qt,_e.child.memoizedState=nj($t),_e.memoizedState=mj,yt):qj(_e,zt));if(Vt=yt.memoizedState,Vt!==null&&(Ht=Vt.dehydrated,Ht!==null))return rj(yt,_e,zt,Ft,Ht,Vt,$t);if(qt){qt=Ft.fallback,zt=_e.mode,Vt=yt.child,Ht=Vt.sibling;var Kt={mode:"hidden",children:Ft.children};return!(zt&1)&&_e.child!==Vt?(Ft=_e.child,Ft.childLanes=0,Ft.pendingProps=Kt,_e.deletions=null):(Ft=Pg(Vt,Kt),Ft.subtreeFlags=Vt.subtreeFlags&14680064),Ht!==null?qt=Pg(Ht,qt):(qt=Tg(qt,zt,$t,null),qt.flags|=2),qt.return=_e,Ft.return=_e,Ft.sibling=qt,_e.child=Ft,Ft=qt,qt=_e.child,zt=yt.child.memoizedState,zt=zt===null?nj($t):{baseLanes:zt.baseLanes|$t,cachePool:null,transitions:zt.transitions},qt.memoizedState=zt,qt.childLanes=yt.childLanes&~$t,_e.memoizedState=mj,Ft}return qt=yt.child,yt=qt.sibling,Ft=Pg(qt,{mode:"visible",children:Ft.children}),!(_e.mode&1)&&(Ft.lanes=$t),Ft.return=_e,Ft.sibling=null,yt!==null&&($t=_e.deletions,$t===null?(_e.deletions=[yt],_e.flags|=16):$t.push(yt)),_e.child=Ft,_e.memoizedState=null,Ft}function qj(yt,_e){return _e=pj({mode:"visible",children:_e},yt.mode,0,null),_e.return=yt,yt.child=_e}function sj(yt,_e,$t,Ft){return Ft!==null&&Jg(Ft),Ug(_e,yt.child,null,$t),yt=qj(_e,_e.pendingProps.children),yt.flags|=2,_e.memoizedState=null,yt}function rj(yt,_e,$t,Ft,Vt,qt,zt){if($t)return _e.flags&256?(_e.flags&=-257,Ft=Ki(Error(p$5(422))),sj(yt,_e,zt,Ft)):_e.memoizedState!==null?(_e.child=yt.child,_e.flags|=128,null):(qt=Ft.fallback,Vt=_e.mode,Ft=pj({mode:"visible",children:Ft.children},Vt,0,null),qt=Tg(qt,Vt,zt,null),qt.flags|=2,Ft.return=_e,qt.return=_e,Ft.sibling=qt,_e.child=Ft,_e.mode&1&&Ug(_e,yt.child,null,zt),_e.child.memoizedState=nj(zt),_e.memoizedState=mj,qt);if(!(_e.mode&1))return sj(yt,_e,zt,null);if(Vt.data==="$!"){if(Ft=Vt.nextSibling&&Vt.nextSibling.dataset,Ft)var Ht=Ft.dgst;return Ft=Ht,qt=Error(p$5(419)),Ft=Ki(qt,Ft,void 0),sj(yt,_e,zt,Ft)}if(Ht=(zt&yt.childLanes)!==0,dh$1||Ht){if(Ft=Q$3,Ft!==null){switch(zt&-zt){case 4:Vt=2;break;case 16:Vt=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:Vt=32;break;case 536870912:Vt=268435456;break;default:Vt=0}Vt=Vt&(Ft.suspendedLanes|zt)?0:Vt,Vt!==0&&Vt!==qt.retryLane&&(qt.retryLane=Vt,ih(yt,Vt),gi(Ft,yt,Vt,-1))}return tj(),Ft=Ki(Error(p$5(421))),sj(yt,_e,zt,Ft)}return Vt.data==="$?"?(_e.flags|=128,_e.child=yt.child,_e=uj.bind(null,yt),Vt._reactRetry=_e,null):(yt=qt.treeContext,yg=Lf(Vt.nextSibling),xg=_e,I$3=!0,zg=null,yt!==null&&(og[pg++]=rg,og[pg++]=sg,og[pg++]=qg,rg=yt.id,sg=yt.overflow,qg=_e),_e=qj(_e,Ft.children),_e.flags|=4096,_e)}function vj(yt,_e,$t){yt.lanes|=_e;var Ft=yt.alternate;Ft!==null&&(Ft.lanes|=_e),bh(yt.return,_e,$t)}function wj(yt,_e,$t,Ft,Vt){var qt=yt.memoizedState;qt===null?yt.memoizedState={isBackwards:_e,rendering:null,renderingStartTime:0,last:Ft,tail:$t,tailMode:Vt}:(qt.isBackwards=_e,qt.rendering=null,qt.renderingStartTime=0,qt.last=Ft,qt.tail=$t,qt.tailMode=Vt)}function xj(yt,_e,$t){var Ft=_e.pendingProps,Vt=Ft.revealOrder,qt=Ft.tail;if(Xi(yt,_e,Ft.children,$t),Ft=L$3.current,Ft&2)Ft=Ft&1|2,_e.flags|=128;else{if(yt!==null&&yt.flags&128)e:for(yt=_e.child;yt!==null;){if(yt.tag===13)yt.memoizedState!==null&&vj(yt,$t,_e);else if(yt.tag===19)vj(yt,$t,_e);else if(yt.child!==null){yt.child.return=yt,yt=yt.child;continue}if(yt===_e)break e;for(;yt.sibling===null;){if(yt.return===null||yt.return===_e)break e;yt=yt.return}yt.sibling.return=yt.return,yt=yt.sibling}Ft&=1}if(G$2(L$3,Ft),!(_e.mode&1))_e.memoizedState=null;else switch(Vt){case"forwards":for($t=_e.child,Vt=null;$t!==null;)yt=$t.alternate,yt!==null&&Ch(yt)===null&&(Vt=$t),$t=$t.sibling;$t=Vt,$t===null?(Vt=_e.child,_e.child=null):(Vt=$t.sibling,$t.sibling=null),wj(_e,!1,Vt,$t,qt);break;case"backwards":for($t=null,Vt=_e.child,_e.child=null;Vt!==null;){if(yt=Vt.alternate,yt!==null&&Ch(yt)===null){_e.child=Vt;break}yt=Vt.sibling,Vt.sibling=$t,$t=Vt,Vt=yt}wj(_e,!0,$t,null,qt);break;case"together":wj(_e,!1,null,null,void 0);break;default:_e.memoizedState=null}return _e.child}function ij(yt,_e){!(_e.mode&1)&&yt!==null&&(yt.alternate=null,_e.alternate=null,_e.flags|=2)}function Zi(yt,_e,$t){if(yt!==null&&(_e.dependencies=yt.dependencies),rh|=_e.lanes,!($t&_e.childLanes))return null;if(yt!==null&&_e.child!==yt.child)throw Error(p$5(153));
vendor: 5,163 bytes, line 40
40if(_e.child!==null){for(yt=_e.child,$t=Pg(yt,yt.pendingProps),_e.child=$t,$t.return=_e;yt.sibling!==null;)yt=yt.sibling,$t=$t.sibling=Pg(yt,yt.pendingProps),$t.return=_e;$t.sibling=null}return _e.child}function yj(yt,_e,$t){switch(_e.tag){case 3:kj(_e),Ig();break;case 5:Ah(_e);break;case 1:Zf(_e.type)&&cg(_e);break;case 4:yh(_e,_e.stateNode.containerInfo);break;case 10:var Ft=_e.type._context,Vt=_e.memoizedProps.value;G$2(Wg,Ft._currentValue),Ft._currentValue=Vt;break;case 13:if(Ft=_e.memoizedState,Ft!==null)return Ft.dehydrated!==null?(G$2(L$3,L$3.current&1),_e.flags|=128,null):$t&_e.child.childLanes?oj(yt,_e,$t):(G$2(L$3,L$3.current&1),yt=Zi(yt,_e,$t),yt!==null?yt.sibling:null);G$2(L$3,L$3.current&1);break;case 19:if(Ft=($t&_e.childLanes)!==0,yt.flags&128){if(Ft)return xj(yt,_e,$t);_e.flags|=128}if(Vt=_e.memoizedState,Vt!==null&&(Vt.rendering=null,Vt.tail=null,Vt.lastEffect=null),G$2(L$3,L$3.current),Ft)break;return null;case 22:case 23:return _e.lanes=0,dj(yt,_e,$t)}return Zi(yt,_e,$t)}var zj,Aj,Bj,Cj;zj=function(yt,_e){for(var $t=_e.child;$t!==null;){if($t.tag===5||$t.tag===6)yt.appendChild($t.stateNode);else if($t.tag!==4&&$t.child!==null){$t.child.return=$t,$t=$t.child;continue}if($t===_e)break;for(;$t.sibling===null;){if($t.return===null||$t.return===_e)return;$t=$t.return}$t.sibling.return=$t.return,$t=$t.sibling}};Aj=function(){};Bj=function(yt,_e,$t,Ft){var Vt=yt.memoizedProps;if(Vt!==Ft){yt=_e.stateNode,xh(uh.current);var qt=null;switch($t){case"input":Vt=Ya$2(yt,Vt),Ft=Ya$2(yt,Ft),qt=[];break;case"select":Vt=A$3({},Vt,{value:void 0}),Ft=A$3({},Ft,{value:void 0}),qt=[];break;case"textarea":Vt=gb$2(yt,Vt),Ft=gb$2(yt,Ft),qt=[];break;default:typeof Vt.onClick!="function"&&typeof Ft.onClick=="function"&&(yt.onclick=Bf)}ub$2($t,Ft);var zt;$t=null;for(Gt in Vt)if(!Ft.hasOwnProperty(Gt)&&Vt.hasOwnProperty(Gt)&&Vt[Gt]!=null)if(Gt==="style"){var Ht=Vt[Gt];for(zt in Ht)Ht.hasOwnProperty(zt)&&($t||($t={}),$t[zt]="")}else Gt!=="dangerouslySetInnerHTML"&&Gt!=="children"&&Gt!=="suppressContentEditableWarning"&&Gt!=="suppressHydrationWarning"&&Gt!=="autoFocus"&&(ea$1.hasOwnProperty(Gt)?qt||(qt=[]):(qt=qt||[]).push(Gt,null));for(Gt in Ft){var Kt=Ft[Gt];if(Ht=Vt!=null?Vt[Gt]:void 0,Ft.hasOwnProperty(Gt)&&Kt!==Ht&&(Kt!=null||Ht!=null))if(Gt==="style")if(Ht){for(zt in Ht)!Ht.hasOwnProperty(zt)||Kt&&Kt.hasOwnProperty(zt)||($t||($t={}),$t[zt]="");for(zt in Kt)Kt.hasOwnProperty(zt)&&Ht[zt]!==Kt[zt]&&($t||($t={}),$t[zt]=Kt[zt])}else $t||(qt||(qt=[]),qt.push(Gt,$t)),$t=Kt;else Gt==="dangerouslySetInnerHTML"?(Kt=Kt?Kt.__html:void 0,Ht=Ht?Ht.__html:void 0,Kt!=null&&Ht!==Kt&&(qt=qt||[]).push(Gt,Kt)):Gt==="children"?typeof Kt!="string"&&typeof Kt!="number"||(qt=qt||[]).push(Gt,""+Kt):Gt!=="suppressContentEditableWarning"&&Gt!=="suppressHydrationWarning"&&(ea$1.hasOwnProperty(Gt)?(Kt!=null&&Gt==="onScroll"&&D$2("scroll",yt),qt||Ht===Kt||(qt=[])):(qt=qt||[]).push(Gt,Kt))}$t&&(qt=qt||[]).push("style",$t);var Gt=qt;(_e.updateQueue=Gt)&&(_e.flags|=4)}};Cj=function(yt,_e,$t,Ft){$t!==Ft&&(_e.flags|=4)};function Dj(yt,_e){if(!I$3)switch(yt.tailMode){case"hidden":_e=yt.tail;for(var $t=null;_e!==null;)_e.alternate!==null&&($t=_e),_e=_e.sibling;$t===null?yt.tail=null:$t.sibling=null;break;case"collapsed":$t=yt.tail;for(var Ft=null;$t!==null;)$t.alternate!==null&&(Ft=$t),$t=$t.sibling;Ft===null?_e||yt.tail===null?yt.tail=null:yt.tail.sibling=null:Ft.sibling=null}}function S$4(yt){var _e=yt.alternate!==null&&yt.alternate.child===yt.child,$t=0,Ft=0;if(_e)for(var Vt=yt.child;Vt!==null;)$t|=Vt.lanes|Vt.childLanes,Ft|=Vt.subtreeFlags&14680064,Ft|=Vt.flags&14680064,Vt.return=yt,Vt=Vt.sibling;else for(Vt=yt.child;Vt!==null;)$t|=Vt.lanes|Vt.childLanes,Ft|=Vt.subtreeFlags,Ft|=Vt.flags,Vt.return=yt,Vt=Vt.sibling;return yt.subtreeFlags|=Ft,yt.childLanes=$t,_e}function Ej(yt,_e,$t){var Ft=_e.pendingProps;switch(wg(_e),_e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return S$4(_e),null;case 1:return Zf(_e.type)&&$f(),S$4(_e),null;case 3:return Ft=_e.stateNode,zh(),E$4(Wf),E$4(H$3),Eh(),Ft.pendingContext&&(Ft.context=Ft.pendingContext,Ft.pendingContext=null),(yt===null||yt.child===null)&&(Gg(_e)?_e.flags|=4:yt===null||yt.memoizedState.isDehydrated&&!(_e.flags&256)||(_e.flags|=1024,zg!==null&&(Fj(zg),zg=null))),Aj(yt,_e),S$4(_e),null;case 5:Bh(_e);var Vt=xh(wh.current);if($t=_e.type,yt!==null&&_e.stateNode!=null)Bj(yt,_e,$t,Ft,Vt),yt.ref!==_e.ref&&(_e.flags|=512,_e.flags|=2097152);else{if(!Ft){if(_e.stateNode===null)throw Error(p$5(166));return S$4(_e),null}if(yt=xh(uh.current),Gg(_e)){Ft=_e.stateNode,$t=_e.type;var qt=_e.memoizedProps;switch(Ft[Of]=_e,Ft[Pf]=qt,yt=(_e.mode&1)!==0,$t){case"dialog":D$2("cancel",Ft),D$2("close",Ft);break;case"iframe":case"object":case"embed":D$2("load",Ft);break;case"video":case"audio":for(Vt=0;Vt<lf.length;Vt++)D$2(lf[Vt],Ft);break;case"source":D$2("error",Ft);break;case"img":case"image":case"link":D$2("error",Ft),D$2("load",Ft);break;case"details":D$2("toggle",Ft);break;case"input":Za$2(Ft,qt),D$2("invalid",Ft);break;case"select":Ft._wrapperState={wasMultiple:!!qt.multiple},D$2("invalid",Ft);break;case"textarea":hb$2(Ft,qt),D$2("invalid",Ft)}
vendor: 9,014 bytes, line 40
40ub$2($t,qt),Vt=null;for(var zt in qt)if(qt.hasOwnProperty(zt)){var Ht=qt[zt];zt==="children"?typeof Ht=="string"?Ft.textContent!==Ht&&(qt.suppressHydrationWarning!==!0&&Af(Ft.textContent,Ht,yt),Vt=["children",Ht]):typeof Ht=="number"&&Ft.textContent!==""+Ht&&(qt.suppressHydrationWarning!==!0&&Af(Ft.textContent,Ht,yt),Vt=["children",""+Ht]):ea$1.hasOwnProperty(zt)&&Ht!=null&&zt==="onScroll"&&D$2("scroll",Ft)}switch($t){case"input":Va$2(Ft),db$2(Ft,qt,!0);break;case"textarea":Va$2(Ft),jb$2(Ft);break;case"select":case"option":break;default:typeof qt.onClick=="function"&&(Ft.onclick=Bf)}Ft=Vt,_e.updateQueue=Ft,Ft!==null&&(_e.flags|=4)}else{zt=Vt.nodeType===9?Vt:Vt.ownerDocument,yt==="http://www.w3.org/1999/xhtml"&&(yt=kb$2($t)),yt==="http://www.w3.org/1999/xhtml"?$t==="script"?(yt=zt.createElement("div"),yt.innerHTML="<script><\/script>",yt=yt.removeChild(yt.firstChild)):typeof Ft.is=="string"?yt=zt.createElement($t,{is:Ft.is}):(yt=zt.createElement($t),$t==="select"&&(zt=yt,Ft.multiple?zt.multiple=!0:Ft.size&&(zt.size=Ft.size))):yt=zt.createElementNS(yt,$t),yt[Of]=_e,yt[Pf]=Ft,zj(yt,_e,!1,!1),_e.stateNode=yt;e:{switch(zt=vb$2($t,Ft),$t){case"dialog":D$2("cancel",yt),D$2("close",yt),Vt=Ft;break;case"iframe":case"object":case"embed":D$2("load",yt),Vt=Ft;break;case"video":case"audio":for(Vt=0;Vt<lf.length;Vt++)D$2(lf[Vt],yt);Vt=Ft;break;case"source":D$2("error",yt),Vt=Ft;break;case"img":case"image":case"link":D$2("error",yt),D$2("load",yt),Vt=Ft;break;case"details":D$2("toggle",yt),Vt=Ft;break;case"input":Za$2(yt,Ft),Vt=Ya$2(yt,Ft),D$2("invalid",yt);break;case"option":Vt=Ft;break;case"select":yt._wrapperState={wasMultiple:!!Ft.multiple},Vt=A$3({},Ft,{value:void 0}),D$2("invalid",yt);break;case"textarea":hb$2(yt,Ft),Vt=gb$2(yt,Ft),D$2("invalid",yt);break;default:Vt=Ft}ub$2($t,Vt),Ht=Vt;for(qt in Ht)if(Ht.hasOwnProperty(qt)){var Kt=Ht[qt];qt==="style"?sb$2(yt,Kt):qt==="dangerouslySetInnerHTML"?(Kt=Kt?Kt.__html:void 0,Kt!=null&&nb$1(yt,Kt)):qt==="children"?typeof Kt=="string"?($t!=="textarea"||Kt!=="")&&ob$2(yt,Kt):typeof Kt=="number"&&ob$2(yt,""+Kt):qt!=="suppressContentEditableWarning"&&qt!=="suppressHydrationWarning"&&qt!=="autoFocus"&&(ea$1.hasOwnProperty(qt)?Kt!=null&&qt==="onScroll"&&D$2("scroll",yt):Kt!=null&&ta$2(yt,qt,Kt,zt))}switch($t){case"input":Va$2(yt),db$2(yt,Ft,!1);break;case"textarea":Va$2(yt),jb$2(yt);break;case"option":Ft.value!=null&&yt.setAttribute("value",""+Sa$2(Ft.value));break;case"select":yt.multiple=!!Ft.multiple,qt=Ft.value,qt!=null?fb$2(yt,!!Ft.multiple,qt,!1):Ft.defaultValue!=null&&fb$2(yt,!!Ft.multiple,Ft.defaultValue,!0);break;default:typeof Vt.onClick=="function"&&(yt.onclick=Bf)}switch($t){case"button":case"input":case"select":case"textarea":Ft=!!Ft.autoFocus;break e;case"img":Ft=!0;break e;default:Ft=!1}}Ft&&(_e.flags|=4)}_e.ref!==null&&(_e.flags|=512,_e.flags|=2097152)}return S$4(_e),null;case 6:if(yt&&_e.stateNode!=null)Cj(yt,_e,yt.memoizedProps,Ft);else{if(typeof Ft!="string"&&_e.stateNode===null)throw Error(p$5(166));if($t=xh(wh.current),xh(uh.current),Gg(_e)){if(Ft=_e.stateNode,$t=_e.memoizedProps,Ft[Of]=_e,(qt=Ft.nodeValue!==$t)&&(yt=xg,yt!==null))switch(yt.tag){case 3:Af(Ft.nodeValue,$t,(yt.mode&1)!==0);break;case 5:yt.memoizedProps.suppressHydrationWarning!==!0&&Af(Ft.nodeValue,$t,(yt.mode&1)!==0)}qt&&(_e.flags|=4)}else Ft=($t.nodeType===9?$t:$t.ownerDocument).createTextNode(Ft),Ft[Of]=_e,_e.stateNode=Ft}return S$4(_e),null;case 13:if(E$4(L$3),Ft=_e.memoizedState,yt===null||yt.memoizedState!==null&&yt.memoizedState.dehydrated!==null){if(I$3&&yg!==null&&_e.mode&1&&!(_e.flags&128))Hg(),Ig(),_e.flags|=98560,qt=!1;else if(qt=Gg(_e),Ft!==null&&Ft.dehydrated!==null){if(yt===null){if(!qt)throw Error(p$5(318));if(qt=_e.memoizedState,qt=qt!==null?qt.dehydrated:null,!qt)throw Error(p$5(317));qt[Of]=_e}else Ig(),!(_e.flags&128)&&(_e.memoizedState=null),_e.flags|=4;S$4(_e),qt=!1}else zg!==null&&(Fj(zg),zg=null),qt=!0;if(!qt)return _e.flags&65536?_e:null}return _e.flags&128?(_e.lanes=$t,_e):(Ft=Ft!==null,Ft!==(yt!==null&&yt.memoizedState!==null)&&Ft&&(_e.child.flags|=8192,_e.mode&1&&(yt===null||L$3.current&1?T$4===0&&(T$4=3):tj())),_e.updateQueue!==null&&(_e.flags|=4),S$4(_e),null);case 4:return zh(),Aj(yt,_e),yt===null&&sf(_e.stateNode.containerInfo),S$4(_e),null;case 10:return ah(_e.type._context),S$4(_e),null;case 17:return Zf(_e.type)&&$f(),S$4(_e),null;case 19:if(E$4(L$3),qt=_e.memoizedState,qt===null)return S$4(_e),null;if(Ft=(_e.flags&128)!==0,zt=qt.rendering,zt===null)if(Ft)Dj(qt,!1);else{if(T$4!==0||yt!==null&&yt.flags&128)for(yt=_e.child;yt!==null;){if(zt=Ch(yt),zt!==null){for(_e.flags|=128,Dj(qt,!1),Ft=zt.updateQueue,Ft!==null&&(_e.updateQueue=Ft,_e.flags|=4),_e.subtreeFlags=0,Ft=$t,$t=_e.child;$t!==null;)qt=$t,yt=Ft,qt.flags&=14680066,zt=qt.alternate,zt===null?(qt.childLanes=0,qt.lanes=yt,qt.child=null,qt.subtreeFlags=0,qt.memoizedProps=null,qt.memoizedState=null,qt.updateQueue=null,qt.dependencies=null,qt.stateNode=null):(qt.childLanes=zt.childLanes,qt.lanes=zt.lanes,qt.child=zt.child,qt.subtreeFlags=0,qt.deletions=null,qt.memoizedProps=zt.memoizedProps,qt.memoizedState=zt.memoizedState,qt.updateQueue=zt.updateQueue,qt.type=zt.type,yt=zt.dependencies,qt.dependencies=yt===null?null:{lanes:yt.lanes,firstContext:yt.firstContext}),$t=$t.sibling;return G$2(L$3,L$3.current&1|2),_e.child}yt=yt.sibling}qt.tail!==null&&B$3()>Gj&&(_e.flags|=128,Ft=!0,Dj(qt,!1),_e.lanes=4194304)}else{if(!Ft)if(yt=Ch(zt),yt!==null){if(_e.flags|=128,Ft=!0,$t=yt.updateQueue,$t!==null&&(_e.updateQueue=$t,_e.flags|=4),Dj(qt,!0),qt.tail===null&&qt.tailMode==="hidden"&&!zt.alternate&&!I$3)return S$4(_e),null}else 2*B$3()-qt.renderingStartTime>Gj&&$t!==1073741824&&(_e.flags|=128,Ft=!0,Dj(qt,!1),_e.lanes=4194304);qt.isBackwards?(zt.sibling=_e.child,_e.child=zt):($t=qt.last,$t!==null?$t.sibling=zt:_e.child=zt,qt.last=zt)}return qt.tail!==null?(_e=qt.tail,qt.rendering=_e,qt.tail=_e.sibling,qt.renderingStartTime=B$3(),_e.sibling=null,$t=L$3.current,G$2(L$3,Ft?$t&1|2:$t&1),_e):(S$4(_e),null);case 22:case 23:return Hj(),Ft=_e.memoizedState!==null,yt!==null&&yt.memoizedState!==null!==Ft&&(_e.flags|=8192),Ft&&_e.mode&1?fj&1073741824&&(S$4(_e),_e.subtreeFlags&6&&(_e.flags|=8192)):S$4(_e),null;case 24:return null;case 25:return null}throw Error(p$5(156,_e.tag))}function Ij(yt,_e){switch(wg(_e),_e.tag){case 1:return Zf(_e.type)&&$f(),yt=_e.flags,yt&65536?(_e.flags=yt&-65537|128,_e):null;case 3:return zh(),E$4(Wf),E$4(H$3),Eh(),yt=_e.flags,yt&65536&&!(yt&128)?(_e.flags=yt&-65537|128,_e):null;case 5:return Bh(_e),null;case 13:if(E$4(L$3),yt=_e.memoizedState,yt!==null&&yt.dehydrated!==null){if(_e.alternate===null)throw Error(p$5(340));Ig()}return yt=_e.flags,yt&65536?(_e.flags=yt&-65537|128,_e):null;case 19:return E$4(L$3),null;case 4:return zh(),null;case 10:return ah(_e.type._context),null;case 22:case 23:return Hj(),null;case 24:return null;default:return null}}var Jj=!1,U$3=!1,Kj=typeof WeakSet=="function"?WeakSet:Set,V$3=null;function Lj(yt,_e){var $t=yt.ref;if($t!==null)if(typeof $t=="function")try{$t(null)}catch(Ft){W$3(yt,_e,Ft)}else $t.current=null}function Mj(yt,_e,$t){try{$t()}catch(Ft){W$3(yt,_e,Ft)}}var Nj=!1;function Oj(yt,_e){if(Cf=dd$1,yt=Me(),Ne(yt)){if("selectionStart"in yt)var $t={start:yt.selectionStart,end:yt.selectionEnd};else e:{$t=($t=yt.ownerDocument)&&$t.defaultView||window;var Ft=$t.getSelection&&$t.getSelection();if(Ft&&Ft.rangeCount!==0){$t=Ft.anchorNode;var Vt=Ft.anchorOffset,qt=Ft.focusNode;Ft=Ft.focusOffset;try{$t.nodeType,qt.nodeType}catch{$t=null;break e}var zt=0,Ht=-1,Kt=-1,Gt=0,Jt=0,Xt=yt,Zt=null;t:for(;;){for(var er;Xt!==$t||Vt!==0&&Xt.nodeType!==3||(Ht=zt+Vt),Xt!==qt||Ft!==0&&Xt.nodeType!==3||(Kt=zt+Ft),Xt.nodeType===3&&(zt+=Xt.nodeValue.length),(er=Xt.firstChild)!==null;)Zt=Xt,Xt=er;for(;;){if(Xt===yt)break t;if(Zt===$t&&++Gt===Vt&&(Ht=zt),Zt===qt&&++Jt===Ft&&(Kt=zt),(er=Xt.nextSibling)!==null)break;Xt=Zt,Zt=Xt.parentNode}Xt=er}$t=Ht===-1||Kt===-1?null:{start:Ht,end:Kt}}else $t=null}$t=$t||{start:0,end:0}}else $t=null;for(Df={focusedElem:yt,selectionRange:$t},dd$1=!1,V$3=_e;V$3!==null;)if(_e=V$3,yt=_e.child,(_e.subtreeFlags&1028)!==0&&yt!==null)yt.return=_e,V$3=yt;else for(;V$3!==null;){_e=V$3;try{var tr=_e.alternate;if(_e.flags&1024)switch(_e.tag){case 0:case 11:case 15:break;case 1:if(tr!==null){var rr=tr.memoizedProps,ar=tr.memoizedState,nr=_e.stateNode,cr=nr.getSnapshotBeforeUpdate(_e.elementType===_e.type?rr:Ci(_e.type,rr),ar);nr.__reactInternalSnapshotBeforeUpdate=cr}break;case 3:var fr=_e.stateNode.containerInfo;fr.nodeType===1?fr.textContent="":fr.nodeType===9&&fr.documentElement&&fr.removeChild(fr.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p$5(163))}}catch(vr){W$3(_e,_e.return,vr)}if(yt=_e.sibling,yt!==null){yt.return=_e.return,V$3=yt;break}V$3=_e.return}return tr=Nj,Nj=!1,tr}function Pj(yt,_e,$t){var Ft=_e.updateQueue;if(Ft=Ft!==null?Ft.lastEffect:null,Ft!==null){var Vt=Ft=Ft.next;do{if((Vt.tag&yt)===yt){var qt=Vt.destroy;Vt.destroy=void 0,qt!==void 0&&Mj(_e,$t,qt)}Vt=Vt.next}
vendor: 6,338 bytes, line 40
40while(Vt!==Ft)}}function Qj(yt,_e){if(_e=_e.updateQueue,_e=_e!==null?_e.lastEffect:null,_e!==null){var $t=_e=_e.next;do{if(($t.tag&yt)===yt){var Ft=$t.create;$t.destroy=Ft()}$t=$t.next}while($t!==_e)}}function Rj(yt){var _e=yt.ref;if(_e!==null){var $t=yt.stateNode;switch(yt.tag){case 5:yt=$t;break;default:yt=$t}typeof _e=="function"?_e(yt):_e.current=yt}}function Sj(yt){var _e=yt.alternate;_e!==null&&(yt.alternate=null,Sj(_e)),yt.child=null,yt.deletions=null,yt.sibling=null,yt.tag===5&&(_e=yt.stateNode,_e!==null&&(delete _e[Of],delete _e[Pf],delete _e[of],delete _e[Qf],delete _e[Rf])),yt.stateNode=null,yt.return=null,yt.dependencies=null,yt.memoizedProps=null,yt.memoizedState=null,yt.pendingProps=null,yt.stateNode=null,yt.updateQueue=null}function Tj(yt){return yt.tag===5||yt.tag===3||yt.tag===4}function Uj(yt){e:for(;;){for(;yt.sibling===null;){if(yt.return===null||Tj(yt.return))return null;yt=yt.return}for(yt.sibling.return=yt.return,yt=yt.sibling;yt.tag!==5&&yt.tag!==6&&yt.tag!==18;){if(yt.flags&2||yt.child===null||yt.tag===4)continue e;yt.child.return=yt,yt=yt.child}if(!(yt.flags&2))return yt.stateNode}}function Vj(yt,_e,$t){var Ft=yt.tag;if(Ft===5||Ft===6)yt=yt.stateNode,_e?$t.nodeType===8?$t.parentNode.insertBefore(yt,_e):$t.insertBefore(yt,_e):($t.nodeType===8?(_e=$t.parentNode,_e.insertBefore(yt,$t)):(_e=$t,_e.appendChild(yt)),$t=$t._reactRootContainer,$t!=null||_e.onclick!==null||(_e.onclick=Bf));else if(Ft!==4&&(yt=yt.child,yt!==null))for(Vj(yt,_e,$t),yt=yt.sibling;yt!==null;)Vj(yt,_e,$t),yt=yt.sibling}function Wj(yt,_e,$t){var Ft=yt.tag;if(Ft===5||Ft===6)yt=yt.stateNode,_e?$t.insertBefore(yt,_e):$t.appendChild(yt);else if(Ft!==4&&(yt=yt.child,yt!==null))for(Wj(yt,_e,$t),yt=yt.sibling;yt!==null;)Wj(yt,_e,$t),yt=yt.sibling}var X$3=null,Xj=!1;function Yj(yt,_e,$t){for($t=$t.child;$t!==null;)Zj(yt,_e,$t),$t=$t.sibling}function Zj(yt,_e,$t){if(lc$1&&typeof lc$1.onCommitFiberUnmount=="function")try{lc$1.onCommitFiberUnmount(kc$1,$t)}catch{}switch($t.tag){case 5:U$3||Lj($t,_e);case 6:var Ft=X$3,Vt=Xj;X$3=null,Yj(yt,_e,$t),X$3=Ft,Xj=Vt,X$3!==null&&(Xj?(yt=X$3,$t=$t.stateNode,yt.nodeType===8?yt.parentNode.removeChild($t):yt.removeChild($t)):X$3.removeChild($t.stateNode));break;case 18:X$3!==null&&(Xj?(yt=X$3,$t=$t.stateNode,yt.nodeType===8?Kf(yt.parentNode,$t):yt.nodeType===1&&Kf(yt,$t),bd$1(yt)):Kf(X$3,$t.stateNode));break;case 4:Ft=X$3,Vt=Xj,X$3=$t.stateNode.containerInfo,Xj=!0,Yj(yt,_e,$t),X$3=Ft,Xj=Vt;break;case 0:case 11:case 14:case 15:if(!U$3&&(Ft=$t.updateQueue,Ft!==null&&(Ft=Ft.lastEffect,Ft!==null))){Vt=Ft=Ft.next;do{var qt=Vt,zt=qt.destroy;qt=qt.tag,zt!==void 0&&(qt&2||qt&4)&&Mj($t,_e,zt),Vt=Vt.next}while(Vt!==Ft)}Yj(yt,_e,$t);break;case 1:if(!U$3&&(Lj($t,_e),Ft=$t.stateNode,typeof Ft.componentWillUnmount=="function"))try{Ft.props=$t.memoizedProps,Ft.state=$t.memoizedState,Ft.componentWillUnmount()}catch(Ht){W$3($t,_e,Ht)}Yj(yt,_e,$t);break;case 21:Yj(yt,_e,$t);break;case 22:$t.mode&1?(U$3=(Ft=U$3)||$t.memoizedState!==null,Yj(yt,_e,$t),U$3=Ft):Yj(yt,_e,$t);break;default:Yj(yt,_e,$t)}}function ak(yt){var _e=yt.updateQueue;if(_e!==null){yt.updateQueue=null;var $t=yt.stateNode;$t===null&&($t=yt.stateNode=new Kj),_e.forEach(function(Ft){var Vt=bk.bind(null,yt,Ft);$t.has(Ft)||($t.add(Ft),Ft.then(Vt,Vt))})}}function ck(yt,_e){var $t=_e.deletions;if($t!==null)for(var Ft=0;Ft<$t.length;Ft++){var Vt=$t[Ft];try{var qt=yt,zt=_e,Ht=zt;e:for(;Ht!==null;){switch(Ht.tag){case 5:X$3=Ht.stateNode,Xj=!1;break e;case 3:X$3=Ht.stateNode.containerInfo,Xj=!0;break e;case 4:X$3=Ht.stateNode.containerInfo,Xj=!0;break e}Ht=Ht.return}if(X$3===null)throw Error(p$5(160));Zj(qt,zt,Vt),X$3=null,Xj=!1;var Kt=Vt.alternate;Kt!==null&&(Kt.return=null),Vt.return=null}catch(Gt){W$3(Vt,_e,Gt)}}if(_e.subtreeFlags&12854)for(_e=_e.child;_e!==null;)dk(_e,yt),_e=_e.sibling}function dk(yt,_e){var $t=yt.alternate,Ft=yt.flags;switch(yt.tag){case 0:case 11:case 14:case 15:if(ck(_e,yt),ek(yt),Ft&4){try{Pj(3,yt,yt.return),Qj(3,yt)}catch(rr){W$3(yt,yt.return,rr)}try{Pj(5,yt,yt.return)}catch(rr){W$3(yt,yt.return,rr)}}break;case 1:ck(_e,yt),ek(yt),Ft&512&&$t!==null&&Lj($t,$t.return);break;case 5:if(ck(_e,yt),ek(yt),Ft&512&&$t!==null&&Lj($t,$t.return),yt.flags&32){var Vt=yt.stateNode;try{ob$2(Vt,"")}catch(rr){W$3(yt,yt.return,rr)}}if(Ft&4&&(Vt=yt.stateNode,Vt!=null)){var qt=yt.memoizedProps,zt=$t!==null?$t.memoizedProps:qt,Ht=yt.type,Kt=yt.updateQueue;if(yt.updateQueue=null,Kt!==null)try{Ht==="input"&&qt.type==="radio"&&qt.name!=null&&ab$2(Vt,qt),vb$2(Ht,zt);var Gt=vb$2(Ht,qt);for(zt=0;zt<Kt.length;zt+=2){var Jt=Kt[zt],Xt=Kt[zt+1];Jt==="style"?sb$2(Vt,Xt):Jt==="dangerouslySetInnerHTML"?nb$1(Vt,Xt):Jt==="children"?ob$2(Vt,Xt):ta$2(Vt,Jt,Xt,Gt)}switch(Ht){case"input":bb$2(Vt,qt);break;case"textarea":ib$2(Vt,qt);break;case"select":var Zt=Vt._wrapperState.wasMultiple;Vt._wrapperState.wasMultiple=!!qt.multiple;var er=qt.value;er!=null?fb$2(Vt,!!qt.multiple,er,!1):Zt!==!!qt.multiple&&(qt.defaultValue!=null?fb$2(Vt,!!qt.multiple,qt.defaultValue,!0):fb$2(Vt,!!qt.multiple,qt.multiple?[]:"",!1))}Vt[Pf]=qt}catch(rr){W$3(yt,yt.return,rr)}}break;case 6:if(ck(_e,yt),ek(yt),Ft&4){if(yt.stateNode===null)throw Error(p$5(162));Vt=yt.stateNode,qt=yt.memoizedProps;try{Vt.nodeValue=qt}catch(rr){W$3(yt,yt.return,rr)}}break;case 3:if(ck(_e,yt),ek(yt),Ft&4&&$t!==null&&$t.memoizedState.isDehydrated)try{bd$1(_e.containerInfo)}catch(rr){W$3(yt,yt.return,rr)}break;case 4:ck(_e,yt),ek(yt);break;case 13:ck(_e,yt),ek(yt),Vt=yt.child,Vt.flags&8192&&(qt=Vt.memoizedState!==null,Vt.stateNode.isHidden=qt,!qt||Vt.alternate!==null&&Vt.alternate.memoizedState!==null||(fk=B$3())),Ft&4&&ak(yt);break;case 22:if(Jt=$t!==null&&$t.memoizedState!==null,yt.mode&1?(U$3=(Gt=U$3)||Jt,ck(_e,yt),U$3=Gt):ck(_e,yt),ek(yt),Ft&8192){if(Gt=yt.memoizedState!==null,(yt.stateNode.isHidden=Gt)&&!Jt&&yt.mode&1)for(V$3=yt,Jt=yt.child;Jt!==null;){for(Xt=V$3=Jt;V$3!==null;){switch(Zt=V$3,er=Zt.child,Zt.tag){case 0:case 11:case 14:case 15:Pj(4,Zt,Zt.return);break;case 1:Lj(Zt,Zt.return);var tr=Zt.stateNode;if(typeof tr.componentWillUnmount=="function"){Ft=Zt,$t=Zt.return;try{_e=Ft,tr.props=_e.memoizedProps,tr.state=_e.memoizedState,tr.componentWillUnmount()}catch(rr){W$3(Ft,$t,rr)}}break;case 5:Lj(Zt,Zt.return);break;case 22:if(Zt.memoizedState!==null){gk(Xt);continue}}er!==null?(er.return=Zt,V$3=er):gk(Xt)}Jt=Jt.sibling}
vendor: 19,338 bytes, line 40
40e:for(Jt=null,Xt=yt;;){if(Xt.tag===5){if(Jt===null){Jt=Xt;try{Vt=Xt.stateNode,Gt?(qt=Vt.style,typeof qt.setProperty=="function"?qt.setProperty("display","none","important"):qt.display="none"):(Ht=Xt.stateNode,Kt=Xt.memoizedProps.style,zt=Kt!=null&&Kt.hasOwnProperty("display")?Kt.display:null,Ht.style.display=rb$2("display",zt))}catch(rr){W$3(yt,yt.return,rr)}}}else if(Xt.tag===6){if(Jt===null)try{Xt.stateNode.nodeValue=Gt?"":Xt.memoizedProps}catch(rr){W$3(yt,yt.return,rr)}}else if((Xt.tag!==22&&Xt.tag!==23||Xt.memoizedState===null||Xt===yt)&&Xt.child!==null){Xt.child.return=Xt,Xt=Xt.child;continue}if(Xt===yt)break e;for(;Xt.sibling===null;){if(Xt.return===null||Xt.return===yt)break e;Jt===Xt&&(Jt=null),Xt=Xt.return}Jt===Xt&&(Jt=null),Xt.sibling.return=Xt.return,Xt=Xt.sibling}}break;case 19:ck(_e,yt),ek(yt),Ft&4&&ak(yt);break;case 21:break;default:ck(_e,yt),ek(yt)}}function ek(yt){var _e=yt.flags;if(_e&2){try{e:{for(var $t=yt.return;$t!==null;){if(Tj($t)){var Ft=$t;break e}$t=$t.return}throw Error(p$5(160))}switch(Ft.tag){case 5:var Vt=Ft.stateNode;Ft.flags&32&&(ob$2(Vt,""),Ft.flags&=-33);var qt=Uj(yt);Wj(yt,qt,Vt);break;case 3:case 4:var zt=Ft.stateNode.containerInfo,Ht=Uj(yt);Vj(yt,Ht,zt);break;default:throw Error(p$5(161))}}catch(Kt){W$3(yt,yt.return,Kt)}yt.flags&=-3}_e&4096&&(yt.flags&=-4097)}function hk(yt,_e,$t){V$3=yt,ik(yt)}function ik(yt,_e,$t){for(var Ft=(yt.mode&1)!==0;V$3!==null;){var Vt=V$3,qt=Vt.child;if(Vt.tag===22&&Ft){var zt=Vt.memoizedState!==null||Jj;if(!zt){var Ht=Vt.alternate,Kt=Ht!==null&&Ht.memoizedState!==null||U$3;Ht=Jj;var Gt=U$3;if(Jj=zt,(U$3=Kt)&&!Gt)for(V$3=Vt;V$3!==null;)zt=V$3,Kt=zt.child,zt.tag===22&&zt.memoizedState!==null?jk(Vt):Kt!==null?(Kt.return=zt,V$3=Kt):jk(Vt);for(;qt!==null;)V$3=qt,ik(qt),qt=qt.sibling;V$3=Vt,Jj=Ht,U$3=Gt}kk(yt)}else Vt.subtreeFlags&8772&&qt!==null?(qt.return=Vt,V$3=qt):kk(yt)}}function kk(yt){for(;V$3!==null;){var _e=V$3;if(_e.flags&8772){var $t=_e.alternate;try{if(_e.flags&8772)switch(_e.tag){case 0:case 11:case 15:U$3||Qj(5,_e);break;case 1:var Ft=_e.stateNode;if(_e.flags&4&&!U$3)if($t===null)Ft.componentDidMount();else{var Vt=_e.elementType===_e.type?$t.memoizedProps:Ci(_e.type,$t.memoizedProps);Ft.componentDidUpdate(Vt,$t.memoizedState,Ft.__reactInternalSnapshotBeforeUpdate)}var qt=_e.updateQueue;qt!==null&&sh(_e,qt,Ft);break;case 3:var zt=_e.updateQueue;if(zt!==null){if($t=null,_e.child!==null)switch(_e.child.tag){case 5:$t=_e.child.stateNode;break;case 1:$t=_e.child.stateNode}sh(_e,zt,$t)}break;case 5:var Ht=_e.stateNode;if($t===null&&_e.flags&4){$t=Ht;var Kt=_e.memoizedProps;switch(_e.type){case"button":case"input":case"select":case"textarea":Kt.autoFocus&&$t.focus();break;case"img":Kt.src&&($t.src=Kt.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(_e.memoizedState===null){var Gt=_e.alternate;if(Gt!==null){var Jt=Gt.memoizedState;if(Jt!==null){var Xt=Jt.dehydrated;Xt!==null&&bd$1(Xt)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(p$5(163))}U$3||_e.flags&512&&Rj(_e)}catch(Zt){W$3(_e,_e.return,Zt)}}if(_e===yt){V$3=null;break}if($t=_e.sibling,$t!==null){$t.return=_e.return,V$3=$t;break}V$3=_e.return}}function gk(yt){for(;V$3!==null;){var _e=V$3;if(_e===yt){V$3=null;break}var $t=_e.sibling;if($t!==null){$t.return=_e.return,V$3=$t;break}V$3=_e.return}}function jk(yt){for(;V$3!==null;){var _e=V$3;try{switch(_e.tag){case 0:case 11:case 15:var $t=_e.return;try{Qj(4,_e)}catch(Kt){W$3(_e,$t,Kt)}break;case 1:var Ft=_e.stateNode;if(typeof Ft.componentDidMount=="function"){var Vt=_e.return;try{Ft.componentDidMount()}catch(Kt){W$3(_e,Vt,Kt)}}var qt=_e.return;try{Rj(_e)}catch(Kt){W$3(_e,qt,Kt)}break;case 5:var zt=_e.return;try{Rj(_e)}catch(Kt){W$3(_e,zt,Kt)}}}catch(Kt){W$3(_e,_e.return,Kt)}if(_e===yt){V$3=null;break}var Ht=_e.sibling;if(Ht!==null){Ht.return=_e.return,V$3=Ht;break}V$3=_e.return}}var lk=Math.ceil,mk=ua$2.ReactCurrentDispatcher,nk=ua$2.ReactCurrentOwner,ok=ua$2.ReactCurrentBatchConfig,K$3=0,Q$3=null,Y$3=null,Z$3=0,fj=0,ej=Uf(0),T$4=0,pk=null,rh=0,qk=0,rk=0,sk=null,tk=null,fk=0,Gj=1/0,uk=null,Oi=!1,Pi=null,Ri=null,vk=!1,wk=null,xk=0,yk=0,zk=null,Ak=-1,Bk=0;function R$3(){return K$3&6?B$3():Ak!==-1?Ak:Ak=B$3()}function yi(yt){return yt.mode&1?K$3&2&&Z$3!==0?Z$3&-Z$3:Kg.transition!==null?(Bk===0&&(Bk=yc$1()),Bk):(yt=C$3,yt!==0||(yt=window.event,yt=yt===void 0?16:jd$1(yt.type)),yt):1}function gi(yt,_e,$t,Ft){if(50<yk)throw yk=0,zk=null,Error(p$5(185));Ac$1(yt,$t,Ft),(!(K$3&2)||yt!==Q$3)&&(yt===Q$3&&(!(K$3&2)&&(qk|=$t),T$4===4&&Ck(yt,Z$3)),Dk(yt,Ft),$t===1&&K$3===0&&!(_e.mode&1)&&(Gj=B$3()+500,fg&&jg()))}function Dk(yt,_e){var $t=yt.callbackNode;wc$1(yt,_e);var Ft=uc$1(yt,yt===Q$3?Z$3:0);if(Ft===0)$t!==null&&bc$1($t),yt.callbackNode=null,yt.callbackPriority=0;else if(_e=Ft&-Ft,yt.callbackPriority!==_e){if($t!=null&&bc$1($t),_e===1)yt.tag===0?ig(Ek.bind(null,yt)):hg(Ek.bind(null,yt)),Jf(function(){!(K$3&6)&&jg()}),$t=null;else{switch(Dc$1(Ft)){case 1:$t=fc$1;break;case 4:$t=gc$1;break;case 16:$t=hc$1;break;case 536870912:$t=jc$1;break;default:$t=hc$1}$t=Fk($t,Gk.bind(null,yt))}yt.callbackPriority=_e,yt.callbackNode=$t}}function Gk(yt,_e){if(Ak=-1,Bk=0,K$3&6)throw Error(p$5(327));var $t=yt.callbackNode;if(Hk()&&yt.callbackNode!==$t)return null;var Ft=uc$1(yt,yt===Q$3?Z$3:0);if(Ft===0)return null;if(Ft&30||Ft&yt.expiredLanes||_e)_e=Ik(yt,Ft);else{_e=Ft;var Vt=K$3;K$3|=2;var qt=Jk();(Q$3!==yt||Z$3!==_e)&&(uk=null,Gj=B$3()+500,Kk(yt,_e));do try{Lk();break}catch(Ht){Mk(yt,Ht)}while(!0);$g(),mk.current=qt,K$3=Vt,Y$3!==null?_e=0:(Q$3=null,Z$3=0,_e=T$4)}if(_e!==0){if(_e===2&&(Vt=xc$1(yt),Vt!==0&&(Ft=Vt,_e=Nk(yt,Vt))),_e===1)throw $t=pk,Kk(yt,0),Ck(yt,Ft),Dk(yt,B$3()),$t;if(_e===6)Ck(yt,Ft);else{if(Vt=yt.current.alternate,!(Ft&30)&&!Ok(Vt)&&(_e=Ik(yt,Ft),_e===2&&(qt=xc$1(yt),qt!==0&&(Ft=qt,_e=Nk(yt,qt))),_e===1))throw $t=pk,Kk(yt,0),Ck(yt,Ft),Dk(yt,B$3()),$t;switch(yt.finishedWork=Vt,yt.finishedLanes=Ft,_e){case 0:case 1:throw Error(p$5(345));case 2:Pk(yt,tk,uk);break;case 3:if(Ck(yt,Ft),(Ft&130023424)===Ft&&(_e=fk+500-B$3(),10<_e)){if(uc$1(yt,0)!==0)break;if(Vt=yt.suspendedLanes,(Vt&Ft)!==Ft){R$3(),yt.pingedLanes|=yt.suspendedLanes&Vt;break}yt.timeoutHandle=Ff(Pk.bind(null,yt,tk,uk),_e);break}Pk(yt,tk,uk);break;case 4:if(Ck(yt,Ft),(Ft&4194240)===Ft)break;for(_e=yt.eventTimes,Vt=-1;0<Ft;){var zt=31-oc$1(Ft);qt=1<<zt,zt=_e[zt],zt>Vt&&(Vt=zt),Ft&=~qt}if(Ft=Vt,Ft=B$3()-Ft,Ft=(120>Ft?120:480>Ft?480:1080>Ft?1080:1920>Ft?1920:3e3>Ft?3e3:4320>Ft?4320:1960*lk(Ft/1960))-Ft,10<Ft){yt.timeoutHandle=Ff(Pk.bind(null,yt,tk,uk),Ft);break}Pk(yt,tk,uk);break;case 5:Pk(yt,tk,uk);break;default:throw Error(p$5(329))}}}return Dk(yt,B$3()),yt.callbackNode===$t?Gk.bind(null,yt):null}function Nk(yt,_e){var $t=sk;return yt.current.memoizedState.isDehydrated&&(Kk(yt,_e).flags|=256),yt=Ik(yt,_e),yt!==2&&(_e=tk,tk=$t,_e!==null&&Fj(_e)),yt}function Fj(yt){tk===null?tk=yt:tk.push.apply(tk,yt)}function Ok(yt){for(var _e=yt;;){if(_e.flags&16384){var $t=_e.updateQueue;if($t!==null&&($t=$t.stores,$t!==null))for(var Ft=0;Ft<$t.length;Ft++){var Vt=$t[Ft],qt=Vt.getSnapshot;Vt=Vt.value;try{if(!He(qt(),Vt))return!1}catch{return!1}}}if($t=_e.child,_e.subtreeFlags&16384&&$t!==null)$t.return=_e,_e=$t;else{if(_e===yt)break;for(;_e.sibling===null;){if(_e.return===null||_e.return===yt)return!0;_e=_e.return}_e.sibling.return=_e.return,_e=_e.sibling}}return!0}function Ck(yt,_e){for(_e&=~rk,_e&=~qk,yt.suspendedLanes|=_e,yt.pingedLanes&=~_e,yt=yt.expirationTimes;0<_e;){var $t=31-oc$1(_e),Ft=1<<$t;yt[$t]=-1,_e&=~Ft}}function Ek(yt){if(K$3&6)throw Error(p$5(327));Hk();var _e=uc$1(yt,0);if(!(_e&1))return Dk(yt,B$3()),null;var $t=Ik(yt,_e);if(yt.tag!==0&&$t===2){var Ft=xc$1(yt);Ft!==0&&(_e=Ft,$t=Nk(yt,Ft))}if($t===1)throw $t=pk,Kk(yt,0),Ck(yt,_e),Dk(yt,B$3()),$t;if($t===6)throw Error(p$5(345));return yt.finishedWork=yt.current.alternate,yt.finishedLanes=_e,Pk(yt,tk,uk),Dk(yt,B$3()),null}function Qk(yt,_e){var $t=K$3;K$3|=1;try{return yt(_e)}finally{K$3=$t,K$3===0&&(Gj=B$3()+500,fg&&jg())}}function Rk(yt){wk!==null&&wk.tag===0&&!(K$3&6)&&Hk();var _e=K$3;K$3|=1;var $t=ok.transition,Ft=C$3;try{if(ok.transition=null,C$3=1,yt)return yt()}finally{C$3=Ft,ok.transition=$t,K$3=_e,!(K$3&6)&&jg()}}function Hj(){fj=ej.current,E$4(ej)}function Kk(yt,_e){yt.finishedWork=null,yt.finishedLanes=0;var $t=yt.timeoutHandle;if($t!==-1&&(yt.timeoutHandle=-1,Gf($t)),Y$3!==null)for($t=Y$3.return;$t!==null;){var Ft=$t;switch(wg(Ft),Ft.tag){case 1:Ft=Ft.type.childContextTypes,Ft!=null&&$f();break;case 3:zh(),E$4(Wf),E$4(H$3),Eh();break;case 5:Bh(Ft);break;case 4:zh();break;case 13:E$4(L$3);break;case 19:E$4(L$3);break;case 10:ah(Ft.type._context);break;case 22:case 23:Hj()}$t=$t.return}if(Q$3=yt,Y$3=yt=Pg(yt.current,null),Z$3=fj=_e,T$4=0,pk=null,rk=qk=rh=0,tk=sk=null,fh!==null){for(_e=0;_e<fh.length;_e++)if($t=fh[_e],Ft=$t.interleaved,Ft!==null){$t.interleaved=null;var Vt=Ft.next,qt=$t.pending;if(qt!==null){var zt=qt.next;qt.next=Vt,Ft.next=zt}$t.pending=Ft}fh=null}return yt}function Mk(yt,_e){do{var $t=Y$3;try{if($g(),Fh.current=Rh,Ih){for(var Ft=M$3.memoizedState;Ft!==null;){var Vt=Ft.queue;Vt!==null&&(Vt.pending=null),Ft=Ft.next}Ih=!1}if(Hh=0,O$4=N$3=M$3=null,Jh=!1,Kh=0,nk.current=null,$t===null||$t.return===null){T$4=1,pk=_e,Y$3=null;break}e:{var qt=yt,zt=$t.return,Ht=$t,Kt=_e;if(_e=Z$3,Ht.flags|=32768,Kt!==null&&typeof Kt=="object"&&typeof Kt.then=="function"){var Gt=Kt,Jt=Ht,Xt=Jt.tag;if(!(Jt.mode&1)&&(Xt===0||Xt===11||Xt===15)){var Zt=Jt.alternate;Zt?(Jt.updateQueue=Zt.updateQueue,Jt.memoizedState=Zt.memoizedState,Jt.lanes=Zt.lanes):(Jt.updateQueue=null,Jt.memoizedState=null)}var er=Ui(zt);if(er!==null){er.flags&=-257,Vi(er,zt,Ht,qt,_e),er.mode&1&&Si(qt,Gt,_e),_e=er,Kt=Gt;var tr=_e.updateQueue;if(tr===null){var rr=new Set;rr.add(Kt),_e.updateQueue=rr}else tr.add(Kt);break e}else{if(!(_e&1)){Si(qt,Gt,_e),tj();break e}Kt=Error(p$5(426))}}else if(I$3&&Ht.mode&1){var ar=Ui(zt);if(ar!==null){!(ar.flags&65536)&&(ar.flags|=256),Vi(ar,zt,Ht,qt,_e),Jg(Ji(Kt,Ht));break e}}qt=Kt=Ji(Kt,Ht),T$4!==4&&(T$4=2),sk===null?sk=[qt]:sk.push(qt),qt=zt;do{switch(qt.tag){case 3:qt.flags|=65536,_e&=-_e,qt.lanes|=_e;var nr=Ni(qt,Kt,_e);ph(qt,nr);break e;case 1:Ht=Kt;var cr=qt.type,fr=qt.stateNode;if(!(qt.flags&128)&&(typeof cr.getDerivedStateFromError=="function"||fr!==null&&typeof fr.componentDidCatch=="function"&&(Ri===null||!Ri.has(fr)))){qt.flags|=65536,_e&=-_e,qt.lanes|=_e;var vr=Qi(qt,Ht,_e);ph(qt,vr);break e}}qt=qt.return}while(qt!==null)}Sk($t)}catch(xr){_e=xr,Y$3===$t&&$t!==null&&(Y$3=$t=$t.return);continue}break}while(!0)}function Jk(){var yt=mk.current;return mk.current=Rh,yt===null?Rh:yt}function tj(){(T$4===0||T$4===3||T$4===2)&&(T$4=4),Q$3===null||!(rh&268435455)&&!(qk&268435455)||Ck(Q$3,Z$3)}function Ik(yt,_e){var $t=K$3;K$3|=2;var Ft=Jk();(Q$3!==yt||Z$3!==_e)&&(uk=null,Kk(yt,_e));do try{Tk();break}catch(Vt){Mk(yt,Vt)}while(!0);if($g(),K$3=$t,mk.current=Ft,Y$3!==null)throw Error(p$5(261));return Q$3=null,Z$3=0,T$4}function Tk(){for(;Y$3!==null;)Uk(Y$3)}function Lk(){for(;Y$3!==null&&!cc$1();)Uk(Y$3)}function Uk(yt){var _e=Vk(yt.alternate,yt,fj);yt.memoizedProps=yt.pendingProps,_e===null?Sk(yt):Y$3=_e,nk.current=null}function Sk(yt){var _e=yt;do{var $t=_e.alternate;if(yt=_e.return,_e.flags&32768){if($t=Ij($t,_e),$t!==null){$t.flags&=32767,Y$3=$t;return}if(yt!==null)yt.flags|=32768,yt.subtreeFlags=0,yt.deletions=null;else{T$4=6,Y$3=null;return}}else if($t=Ej($t,_e,fj),$t!==null){Y$3=$t;return}if(_e=_e.sibling,_e!==null){Y$3=_e;return}Y$3=_e=yt}while(_e!==null);T$4===0&&(T$4=5)}function Pk(yt,_e,$t){var Ft=C$3,Vt=ok.transition;try{ok.transition=null,C$3=1,Wk(yt,_e,$t,Ft)}finally{ok.transition=Vt,C$3=Ft}return null}function Wk(yt,_e,$t,Ft){do Hk();while(wk!==null);if(K$3&6)throw Error(p$5(327));$t=yt.finishedWork;var Vt=yt.finishedLanes;if($t===null)return null;if(yt.finishedWork=null,yt.finishedLanes=0,$t===yt.current)throw Error(p$5(177));yt.callbackNode=null,yt.callbackPriority=0;var qt=$t.lanes|$t.childLanes;if(Bc$1(yt,qt),yt===Q$3&&(Y$3=Q$3=null,Z$3=0),!($t.subtreeFlags&2064)&&!($t.flags&2064)||vk||(vk=!0,Fk(hc$1,function(){return Hk(),null})),qt=($t.flags&15990)!==0,$t.subtreeFlags&15990||qt){qt=ok.transition,ok.transition=null;var zt=C$3;C$3=1;var Ht=K$3;K$3|=4,nk.current=null,Oj(yt,$t),dk($t,yt),Oe(Df),dd$1=!!Cf,Df=Cf=null,yt.current=$t,hk($t),dc$1(),K$3=Ht,C$3=zt,ok.transition=qt}else yt.current=$t;if(vk&&(vk=!1,wk=yt,xk=Vt),qt=yt.pendingLanes,qt===0&&(Ri=null),mc$1($t.stateNode),Dk(yt,B$3()),_e!==null)for(Ft=yt.onRecoverableError,$t=0;$t<_e.length;$t++)Vt=_e[$t],Ft(Vt.value,{componentStack:Vt.stack,digest:Vt.digest});if(Oi)throw Oi=!1,yt=Pi,Pi=null,yt;return xk&1&&yt.tag!==0&&Hk(),qt=yt.pendingLanes,qt&1?yt===zk?yk++:(yk=0,zk=yt):yk=0,jg(),null}function Hk(){if(wk!==null){var yt=Dc$1(xk),_e=ok.transition,$t=C$3;try{if(ok.transition=null,C$3=16>yt?16:yt,wk===null)var Ft=!1;else{if(yt=wk,wk=null,xk=0,K$3&6)throw Error(p$5(331));var Vt=K$3;for(K$3|=4,V$3=yt.current;V$3!==null;){var qt=V$3,zt=qt.child;if(V$3.flags&16){var Ht=qt.deletions;if(Ht!==null){for(var Kt=0;Kt<Ht.length;Kt++){var Gt=Ht[Kt];for(V$3=Gt;V$3!==null;){var Jt=V$3;switch(Jt.tag){case 0:case 11:case 15:Pj(8,Jt,qt)}var Xt=Jt.child;if(Xt!==null)Xt.return=Jt,V$3=Xt;else for(;V$3!==null;){Jt=V$3;var Zt=Jt.sibling,er=Jt.return;if(Sj(Jt),Jt===Gt){V$3=null;break}if(Zt!==null){Zt.return=er,V$3=Zt;break}V$3=er}}}var tr=qt.alternate;if(tr!==null){var rr=tr.child;if(rr!==null){tr.child=null;do{var ar=rr.sibling;rr.sibling=null,rr=ar}while(rr!==null)}}V$3=qt}}if(qt.subtreeFlags&2064&&zt!==null)zt.return=qt,V$3=zt;else e:for(;V$3!==null;){if(qt=V$3,qt.flags&2048)switch(qt.tag){case 0:case 11:case 15:Pj(9,qt,qt.return)}var nr=qt.sibling;if(nr!==null){nr.return=qt.return,V$3=nr;break e}V$3=qt.return}}var cr=yt.current;for(V$3=cr;V$3!==null;){zt=V$3;var fr=zt.child;if(zt.subtreeFlags&2064&&fr!==null)fr.return=zt,V$3=fr;else e:for(zt=cr;V$3!==null;){if(Ht=V$3,Ht.flags&2048)try{switch(Ht.tag){case 0:case 11:case 15:Qj(9,Ht)}}catch(xr){W$3(Ht,Ht.return,xr)}if(Ht===zt){V$3=null;break e}var vr=Ht.sibling;if(vr!==null){vr.return=Ht.return,V$3=vr;break e}V$3=Ht.return}}if(K$3=Vt,jg(),lc$1&&typeof lc$1.onPostCommitFiberRoot=="function")try{lc$1.onPostCommitFiberRoot(kc$1,yt)}catch{}Ft=!0}return Ft}finally{C$3=$t,ok.transition=_e}}return!1}function Xk(yt,_e,$t){_e=Ji($t,_e),_e=Ni(yt,_e,1),yt=nh(yt,_e,1),_e=R$3(),yt!==null&&(Ac$1(yt,1,_e),Dk(yt,_e))}function W$3(yt,_e,$t){if(yt.tag===3)Xk(yt,yt,$t);else for(;_e!==null;){if(_e.tag===3){Xk(_e,yt,$t);break}else if(_e.tag===1){var Ft=_e.stateNode;if(typeof _e.type.getDerivedStateFromError=="function"||typeof Ft.componentDidCatch=="function"&&(Ri===null||!Ri.has(Ft))){yt=Ji($t,yt),yt=Qi(_e,yt,1),_e=nh(_e,yt,1),yt=R$3(),_e!==null&&(Ac$1(_e,1,yt),Dk(_e,yt));break}}_e=_e.return}}function Ti(yt,_e,$t){var Ft=yt.pingCache;Ft!==null&&Ft.delete(_e),_e=R$3(),yt.pingedLanes|=yt.suspendedLanes&$t,Q$3===yt&&(Z$3&$t)===$t&&(T$4===4||T$4===3&&(Z$3&130023424)===Z$3&&500>B$3()-fk?Kk(yt,0):rk|=$t),Dk(yt,_e)}function Yk(yt,_e){_e===0&&(yt.mode&1?(_e=sc$1,sc$1<<=1,!(sc$1&130023424)&&(sc$1=4194304)):_e=1);var $t=R$3();yt=ih(yt,_e),yt!==null&&(Ac$1(yt,_e,$t),Dk(yt,$t))}function uj(yt){var _e=yt.memoizedState,$t=0;_e!==null&&($t=_e.retryLane),Yk(yt,$t)}function bk(yt,_e){var $t=0;switch(yt.tag){case 13:var Ft=yt.stateNode,Vt=yt.memoizedState;Vt!==null&&($t=Vt.retryLane);break;case 19:Ft=yt.stateNode;break;default:throw Error(p$5(314))}Ft!==null&&Ft.delete(_e),Yk(yt,$t)}var Vk;Vk=function(yt,_e,$t){if(yt!==null)if(yt.memoizedProps!==_e.pendingProps||Wf.current)dh$1=!0;else{if(!(yt.lanes&$t)&&!(_e.flags&128))return dh$1=!1,yj(yt,_e,$t);dh$1=!!(yt.flags&131072)}else dh$1=!1,I$3&&_e.flags&1048576&&ug(_e,ng,_e.index);switch(_e.lanes=0,_e.tag){case 2:var Ft=_e.type;ij(yt,_e),yt=_e.pendingProps;var Vt=Yf(_e,H$3.current);ch(_e,$t),Vt=Nh(null,_e,Ft,yt,Vt,$t);var qt=Sh();return _e.flags|=1,typeof Vt=="object"&&Vt!==null&&typeof Vt.render=="function"&&Vt.$$typeof===void 0?(_e.tag=1,_e.memoizedState=null,_e.updateQueue=null,Zf(Ft)?(qt=!0,cg(_e)):qt=!1,_e.memoizedState=Vt.state!==null&&Vt.state!==void 0?Vt.state:null,kh(_e),Vt.updater=Ei,_e.stateNode=Vt,Vt._reactInternals=_e,Ii(_e,Ft,yt,$t),_e=jj(null,_e,Ft,!0,qt,$t)):(_e.tag=0,I$3&&qt&&vg(_e),Xi(null,_e,Vt,$t),_e=_e.child),_e;case 16:Ft=_e.elementType;e:{switch(ij(yt,_e),yt=_e.pendingProps,Vt=Ft._init,Ft=Vt(Ft._payload),_e.type=Ft,Vt=_e.tag=Zk(Ft),yt=Ci(Ft,yt),Vt){case 0:_e=cj(null,_e,Ft,yt,$t);break e;case 1:_e=hj(null,_e,Ft,yt,$t);break e;case 11:_e=Yi(null,_e,Ft,yt,$t);break e;case 14:_e=$i(null,_e,Ft,Ci(Ft.type,yt),$t);break e}throw Error(p$5(306,Ft,""))}return _e;case 0:return Ft=_e.type,Vt=_e.pendingProps,Vt=_e.elementType===Ft?Vt:Ci(Ft,Vt),cj(yt,_e,Ft,Vt,$t);case 1:return Ft=_e.type,Vt=_e.pendingProps,Vt=_e.elementType===Ft?Vt:Ci(Ft,Vt),hj(yt,_e,Ft,Vt,$t);case 3:e:{if(kj(_e),yt===null)throw Error(p$5(387));Ft=_e.pendingProps,qt=_e.memoizedState,Vt=qt.element,lh(yt,_e),qh(_e,Ft,null,$t);var zt=_e.memoizedState;if(Ft=zt.element,qt.isDehydrated)if(qt={element:Ft,isDehydrated:!1,cache:zt.cache,pendingSuspenseBoundaries:zt.pendingSuspenseBoundaries,transitions:zt.transitions},_e.updateQueue.baseState=qt,_e.memoizedState=qt,_e.flags&256){Vt=Ji(Error(p$5(423)),_e),_e=lj(yt,_e,Ft,$t,Vt);break e}else if(Ft!==Vt){Vt=Ji(Error(p$5(424)),_e),_e=lj(yt,_e,Ft,$t,Vt);break e}else for(yg=Lf(_e.stateNode.containerInfo.firstChild),xg=_e,I$3=!0,zg=null,$t=Vg(_e,null,Ft,$t),_e.child=$t;$t;)$t.flags=$t.flags&-3|4096,$t=$t.sibling;else{if(Ig(),Ft===Vt){_e=Zi(yt,_e,$t);break e}Xi(yt,_e,Ft,$t)}_e=_e.child}return _e;case 5:return Ah(_e),yt===null&&Eg(_e),Ft=_e.type,Vt=_e.pendingProps,qt=yt!==null?yt.memoizedProps:null,zt=Vt.children,Ef(Ft,Vt)?zt=null:qt!==null&&Ef(Ft,qt)&&(_e.flags|=32),gj(yt,_e),Xi(yt,_e,zt,$t),_e.child;case 6:return yt===null&&Eg(_e),null;case 13:return oj(yt,_e,$t);case 4:return yh(_e,_e.stateNode.containerInfo),Ft=_e.pendingProps,yt===null?_e.child=Ug(_e,null,Ft,$t):Xi(yt,_e,Ft,$t),_e.child;case 11:return Ft=_e.type,Vt=_e.pendingProps,Vt=_e.elementType===Ft?Vt:Ci(Ft,Vt),Yi(yt,_e,Ft,Vt,$t);case 7:return Xi(yt,_e,_e.pendingProps,$t),_e.child;case 8:return Xi(yt,_e,_e.pendingProps.children,$t),_e.child;case 12:return Xi(yt,_e,_e.pendingProps.children,$t),_e.child;case 10:e:{if(Ft=_e.type._context,Vt=_e.pendingProps,qt=_e.memoizedProps,zt=Vt.value,G$2(Wg,Ft._currentValue),Ft._currentValue=zt,qt!==null)if(He(qt.value,zt)){if(qt.children===Vt.children&&!Wf.current){_e=Zi(yt,_e,$t);break e}}else for(qt=_e.child,qt!==null&&(qt.return=_e);qt!==null;){var Ht=qt.dependencies;if(Ht!==null){zt=qt.child;for(var Kt=Ht.firstContext;Kt!==null;){if(Kt.context===Ft){if(qt.tag===1){Kt=mh(-1,$t&-$t),Kt.tag=2;var Gt=qt.updateQueue;if(Gt!==null){Gt=Gt.shared;var Jt=Gt.pending;Jt===null?Kt.next=Kt:(Kt.next=Jt.next,Jt.next=Kt),Gt.pending=Kt}}qt.lanes|=$t,Kt=qt.alternate,Kt!==null&&(Kt.lanes|=$t),bh(qt.return,$t,_e),Ht.lanes|=$t;break}Kt=Kt.next}}else if(qt.tag===10)zt=qt.type===_e.type?null:qt.child;else if(qt.tag===18){if(zt=qt.return,zt===null)throw Error(p$5(341));zt.lanes|=$t,Ht=zt.alternate,Ht!==null&&(Ht.lanes|=$t),bh(zt,$t,_e),zt=qt.sibling}else zt=qt.child;if(zt!==null)zt.return=qt;else for(zt=qt;zt!==null;){if(zt===_e){zt=null;break}if(qt=zt.sibling,qt!==null){qt.return=zt.return,zt=qt;break}zt=zt.return}qt=zt}Xi(yt,_e,Vt.children,$t),_e=_e.child}return _e;
vendor: 10,621 bytes, line 40
40case 9:return Vt=_e.type,Ft=_e.pendingProps.children,ch(_e,$t),Vt=eh(Vt),Ft=Ft(Vt),_e.flags|=1,Xi(yt,_e,Ft,$t),_e.child;case 14:return Ft=_e.type,Vt=Ci(Ft,_e.pendingProps),Vt=Ci(Ft.type,Vt),$i(yt,_e,Ft,Vt,$t);case 15:return bj(yt,_e,_e.type,_e.pendingProps,$t);case 17:return Ft=_e.type,Vt=_e.pendingProps,Vt=_e.elementType===Ft?Vt:Ci(Ft,Vt),ij(yt,_e),_e.tag=1,Zf(Ft)?(yt=!0,cg(_e)):yt=!1,ch(_e,$t),Gi(_e,Ft,Vt),Ii(_e,Ft,Vt,$t),jj(null,_e,Ft,!0,yt,$t);case 19:return xj(yt,_e,$t);case 22:return dj(yt,_e,$t)}throw Error(p$5(156,_e.tag))};function Fk(yt,_e){return ac$1(yt,_e)}function $k(yt,_e,$t,Ft){this.tag=yt,this.key=$t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=_e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=Ft,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bg(yt,_e,$t,Ft){return new $k(yt,_e,$t,Ft)}function aj(yt){return yt=yt.prototype,!(!yt||!yt.isReactComponent)}function Zk(yt){if(typeof yt=="function")return aj(yt)?1:0;if(yt!=null){if(yt=yt.$$typeof,yt===Da$2)return 11;if(yt===Ga$2)return 14}return 2}function Pg(yt,_e){var $t=yt.alternate;return $t===null?($t=Bg(yt.tag,_e,yt.key,yt.mode),$t.elementType=yt.elementType,$t.type=yt.type,$t.stateNode=yt.stateNode,$t.alternate=yt,yt.alternate=$t):($t.pendingProps=_e,$t.type=yt.type,$t.flags=0,$t.subtreeFlags=0,$t.deletions=null),$t.flags=yt.flags&14680064,$t.childLanes=yt.childLanes,$t.lanes=yt.lanes,$t.child=yt.child,$t.memoizedProps=yt.memoizedProps,$t.memoizedState=yt.memoizedState,$t.updateQueue=yt.updateQueue,_e=yt.dependencies,$t.dependencies=_e===null?null:{lanes:_e.lanes,firstContext:_e.firstContext},$t.sibling=yt.sibling,$t.index=yt.index,$t.ref=yt.ref,$t}function Rg(yt,_e,$t,Ft,Vt,qt){var zt=2;if(Ft=yt,typeof yt=="function")aj(yt)&&(zt=1);else if(typeof yt=="string")zt=5;else e:switch(yt){case ya$2:return Tg($t.children,Vt,qt,_e);case za$2:zt=8,Vt|=8;break;case Aa$2:return yt=Bg(12,$t,_e,Vt|2),yt.elementType=Aa$2,yt.lanes=qt,yt;case Ea$2:return yt=Bg(13,$t,_e,Vt),yt.elementType=Ea$2,yt.lanes=qt,yt;case Fa$2:return yt=Bg(19,$t,_e,Vt),yt.elementType=Fa$2,yt.lanes=qt,yt;case Ia$2:return pj($t,Vt,qt,_e);default:if(typeof yt=="object"&&yt!==null)switch(yt.$$typeof){case Ba$2:zt=10;break e;case Ca$2:zt=9;break e;case Da$2:zt=11;break e;case Ga$2:zt=14;break e;case Ha$2:zt=16,Ft=null;break e}throw Error(p$5(130,yt==null?yt:typeof yt,""))}return _e=Bg(zt,$t,_e,Vt),_e.elementType=yt,_e.type=Ft,_e.lanes=qt,_e}function Tg(yt,_e,$t,Ft){return yt=Bg(7,yt,Ft,_e),yt.lanes=$t,yt}function pj(yt,_e,$t,Ft){return yt=Bg(22,yt,Ft,_e),yt.elementType=Ia$2,yt.lanes=$t,yt.stateNode={isHidden:!1},yt}function Qg(yt,_e,$t){return yt=Bg(6,yt,null,_e),yt.lanes=$t,yt}function Sg(yt,_e,$t){return _e=Bg(4,yt.children!==null?yt.children:[],yt.key,_e),_e.lanes=$t,_e.stateNode={containerInfo:yt.containerInfo,pendingChildren:null,implementation:yt.implementation},_e}function al(yt,_e,$t,Ft,Vt){this.tag=_e,this.containerInfo=yt,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc$1(0),this.expirationTimes=zc$1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc$1(0),this.identifierPrefix=Ft,this.onRecoverableError=Vt,this.mutableSourceEagerHydrationData=null}function bl(yt,_e,$t,Ft,Vt,qt,zt,Ht,Kt){return yt=new al(yt,_e,$t,Ht,Kt),_e===1?(_e=1,qt===!0&&(_e|=8)):_e=0,qt=Bg(3,null,null,_e),yt.current=qt,qt.stateNode=yt,qt.memoizedState={element:Ft,isDehydrated:$t,cache:null,transitions:null,pendingSuspenseBoundaries:null},kh(qt),yt}function cl(yt,_e,$t){var Ft=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:wa$2,key:Ft==null?null:""+Ft,children:yt,containerInfo:_e,implementation:$t}}function dl(yt){if(!yt)return Vf;yt=yt._reactInternals;e:{if(Vb$1(yt)!==yt||yt.tag!==1)throw Error(p$5(170));var _e=yt;do{switch(_e.tag){case 3:_e=_e.stateNode.context;break e;case 1:if(Zf(_e.type)){_e=_e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}_e=_e.return}while(_e!==null);throw Error(p$5(171))}if(yt.tag===1){var $t=yt.type;if(Zf($t))return bg(yt,$t,_e)}return _e}function el(yt,_e,$t,Ft,Vt,qt,zt,Ht,Kt){return yt=bl($t,Ft,!0,yt,Vt,qt,zt,Ht,Kt),yt.context=dl(null),$t=yt.current,Ft=R$3(),Vt=yi($t),qt=mh(Ft,Vt),qt.callback=_e??null,nh($t,qt,Vt),yt.current.lanes=Vt,Ac$1(yt,Vt,Ft),Dk(yt,Ft),yt}function fl(yt,_e,$t,Ft){var Vt=_e.current,qt=R$3(),zt=yi(Vt);return $t=dl($t),_e.context===null?_e.context=$t:_e.pendingContext=$t,_e=mh(qt,zt),_e.payload={element:yt},Ft=Ft===void 0?null:Ft,Ft!==null&&(_e.callback=Ft),yt=nh(Vt,_e,zt),yt!==null&&(gi(yt,Vt,zt,qt),oh(yt,Vt,zt)),zt}function gl(yt){if(yt=yt.current,!yt.child)return null;switch(yt.child.tag){case 5:return yt.child.stateNode;default:return yt.child.stateNode}}function hl(yt,_e){if(yt=yt.memoizedState,yt!==null&&yt.dehydrated!==null){var $t=yt.retryLane;yt.retryLane=$t!==0&&$t<_e?$t:_e}}function il(yt,_e){hl(yt,_e),(yt=yt.alternate)&&hl(yt,_e)}function jl(){return null}var kl=typeof reportError=="function"?reportError:function(yt){console.error(yt)};function ll(yt){this._internalRoot=yt}ml.prototype.render=ll.prototype.render=function(yt){var _e=this._internalRoot;if(_e===null)throw Error(p$5(409));fl(yt,_e,null,null)};ml.prototype.unmount=ll.prototype.unmount=function(){var yt=this._internalRoot;if(yt!==null){this._internalRoot=null;var _e=yt.containerInfo;Rk(function(){fl(null,yt,null,null)}),_e[uf]=null}};function ml(yt){this._internalRoot=yt}ml.prototype.unstable_scheduleHydration=function(yt){if(yt){var _e=Hc$1();yt={blockedOn:null,target:yt,priority:_e};for(var $t=0;$t<Qc$1.length&&_e!==0&&_e<Qc$1[$t].priority;$t++);Qc$1.splice($t,0,yt),$t===0&&Vc$1(yt)}};function nl(yt){return!(!yt||yt.nodeType!==1&&yt.nodeType!==9&&yt.nodeType!==11)}function ol(yt){return!(!yt||yt.nodeType!==1&&yt.nodeType!==9&&yt.nodeType!==11&&(yt.nodeType!==8||yt.nodeValue!==" react-mount-point-unstable "))}function pl(){}function ql(yt,_e,$t,Ft,Vt){if(Vt){if(typeof Ft=="function"){var qt=Ft;Ft=function(){var Gt=gl(zt);qt.call(Gt)}}var zt=el(_e,Ft,yt,0,null,!1,!1,"",pl);return yt._reactRootContainer=zt,yt[uf]=zt.current,sf(yt.nodeType===8?yt.parentNode:yt),Rk(),zt}for(;Vt=yt.lastChild;)yt.removeChild(Vt);if(typeof Ft=="function"){var Ht=Ft;Ft=function(){var Gt=gl(Kt);Ht.call(Gt)}}var Kt=bl(yt,0,!1,null,null,!1,!1,"",pl);return yt._reactRootContainer=Kt,yt[uf]=Kt.current,sf(yt.nodeType===8?yt.parentNode:yt),Rk(function(){fl(_e,Kt,$t,Ft)}),Kt}function rl(yt,_e,$t,Ft,Vt){var qt=$t._reactRootContainer;if(qt){var zt=qt;if(typeof Vt=="function"){var Ht=Vt;Vt=function(){var Kt=gl(zt);Ht.call(Kt)}}fl(_e,zt,yt,Vt)}else zt=ql($t,_e,yt,Vt,Ft);return gl(zt)}Ec$1=function(yt){switch(yt.tag){case 3:var _e=yt.stateNode;if(_e.current.memoizedState.isDehydrated){var $t=tc$1(_e.pendingLanes);$t!==0&&(Cc$1(_e,$t|1),Dk(_e,B$3()),!(K$3&6)&&(Gj=B$3()+500,jg()))}break;case 13:Rk(function(){var Ft=ih(yt,1);if(Ft!==null){var Vt=R$3();gi(Ft,yt,1,Vt)}}),il(yt,1)}};Fc$1=function(yt){if(yt.tag===13){var _e=ih(yt,134217728);if(_e!==null){var $t=R$3();gi(_e,yt,134217728,$t)}il(yt,134217728)}};Gc$1=function(yt){if(yt.tag===13){var _e=yi(yt),$t=ih(yt,_e);if($t!==null){var Ft=R$3();gi($t,yt,_e,Ft)}il(yt,_e)}};Hc$1=function(){return C$3};Ic$1=function(yt,_e){var $t=C$3;try{return C$3=yt,_e()}finally{C$3=$t}};yb$2=function(yt,_e,$t){switch(_e){case"input":if(bb$2(yt,$t),_e=$t.name,$t.type==="radio"&&_e!=null){for($t=yt;$t.parentNode;)$t=$t.parentNode;for($t=$t.querySelectorAll("input[name="+JSON.stringify(""+_e)+'][type="radio"]'),_e=0;_e<$t.length;_e++){var Ft=$t[_e];if(Ft!==yt&&Ft.form===yt.form){var Vt=Db$2(Ft);if(!Vt)throw Error(p$5(90));Wa$2(Ft),bb$2(Ft,Vt)}}}break;case"textarea":ib$2(yt,$t);break;case"select":_e=$t.value,_e!=null&&fb$2(yt,!!$t.multiple,_e,!1)}};Gb$2=Qk;Hb$2=Rk;var sl={usingClientEntryPoint:!1,Events:[Cb$2,ue,Db$2,Eb$2,Fb$1,Qk]},tl={findFiberByHostInstance:Wc$1,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ul={bundleType:tl.bundleType,version:tl.version,rendererPackageName:tl.rendererPackageName,rendererConfig:tl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ua$2.ReactCurrentDispatcher,findHostInstanceByFiber:function(yt){return yt=Zb$1(yt),yt===null?null:yt.stateNode},findFiberByHostInstance:tl.findFiberByHostInstance||jl,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vl.isDisabled&&vl.supportsFiber)try{kc$1=vl.inject(ul),lc$1=vl}catch{}}reactDom_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sl;reactDom_production_min.createPortal=function(yt,_e){var $t=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nl(_e))throw Error(p$5(200));return cl(yt,_e,null,$t)};reactDom_production_min.createRoot=function(yt,_e){if(!nl(yt))throw Error(p$5(299));var $t=!1,Ft="",Vt=kl;return _e!=null&&(_e.unstable_strictMode===!0&&($t=!0),_e.identifierPrefix!==void 0&&(Ft=_e.identifierPrefix),_e.onRecoverableError!==void 0&&(Vt=_e.onRecoverableError)),_e=bl(yt,1,!1,null,null,$t,!1,Ft,Vt),yt[uf]=_e.current,sf(yt.nodeType===8?yt.parentNode:yt),new ll(_e)};reactDom_production_min.findDOMNode=function(yt){if(yt==null)return null;if(yt.nodeType===1)return yt;var _e=yt._reactInternals;if(_e===void 0)throw typeof yt.render=="function"?Error(p$5(188)):(yt=Object.keys(yt).join(","),Error(p$5(268,yt)));return yt=Zb$1(_e),yt=yt===null?null:yt.stateNode,yt};reactDom_production_min.flushSync=function(yt){return Rk(yt)};reactDom_production_min.hydrate=function(yt,_e,$t){if(!ol(_e))throw Error(p$5(200));return rl(null,yt,_e,!0,$t)};reactDom_production_min.hydrateRoot=function(yt,_e,$t){if(!nl(yt))throw Error(p$5(405));var Ft=$t!=null&&$t.hydratedSources||null,Vt=!1,qt="",zt=kl;if($t!=null&&($t.unstable_strictMode===!0&&(Vt=!0),$t.identifierPrefix!==void 0&&(qt=$t.identifierPrefix),$t.onRecoverableError!==void 0&&(zt=$t.onRecoverableError)),_e=el(_e,null,yt,1,$t??null,Vt,!1,qt,zt),yt[uf]=_e.current,sf
40(yt),Ft)for(yt=0;yt<Ft.length;yt++)$t=Ft[yt],Vt=$t._getVersion,Vt=Vt($t._source),_e.mutableSourceEagerHydrationData==null?_e.mutableSourceEagerHydrationData=[$t,Vt]:_e.mutableSourceEagerHydrationData.push($t,Vt);return new ml(_e)};reactDom_production_min.render=function(yt,_e,$t){if(!ol(_e))throw Error(p$5(200));return rl(null,yt,_e,!1,$t)};reactDom_production_min.unmountComponentAtNode=function(yt){if(!ol(yt))throw Error(p$5(40));return yt._reactRootContainer?(Rk(function(){rl(null,null,yt,!1,function(){yt._reactRootContainer=null,yt[uf]=null})}),!0):!1};reactDom_production_min.unstable_batchedUpdates=Qk;reactDom_production_min.unstable_renderSubtreeIntoContainer=function(yt,_e,$t,Ft){if(!ol($t))throw Error(p$5(200));if(yt==null||yt._reactInternals===void 0)throw Error(p$5(38));return rl(yt,_e,$t,!1,Ft)};reactDom_production_min.version="18.3.1-next-f1338f8080-20240426";function checkDCE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(yt){console.error(yt)}}checkDCE(),reactDom.exports=reactDom_production_min;var reactDomExports=reactDom.exports;const ReactDOM=getDefaultExportFromCjs$1(reactDomExports);var m$3=reactDomExports;client.createRoot=m$3.createRoot,client.hydrateRoot=m$3.hydrateRoot;const common$2={black:"#000",white:"#fff"},red={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},purple={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},blue={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},lightBlue={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},green={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},orange={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},grey={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function formatMuiErrorMessage$1(yt){let _e="https://mui.com/production-error/?code="+yt;for(let $t=1;$t<arguments.length;$t+=1)_e+="&args[]="+encodeURIComponent(arguments[$t]);return"Minified MUI error #"+yt+"; visit "+_e+" for the full message."}const formatMuiErrorMessage=Object.freeze(Object.defineProperty({__proto__:null,default:formatMuiErrorMessage$1},Symbol.toStringTag,{value:"Module"})),THEME_ID="$$material";function _extends$3(){return _extends$3=Object.assign?Object.assign.bind():function(yt){for(var _e=1;_e<arguments.length;_e++){var $t=arguments[_e];for(var Ft in $t)({}).hasOwnProperty.call($t,Ft)&&(yt[Ft]=$t[Ft])}return yt},_extends$3.apply(null,arguments)}function _objectWithoutPropertiesLoose(yt,_e){if(yt==null)return{};var $t={};for(var Ft in yt)if({}.hasOwnProperty.call(yt,Ft)){if(_e.indexOf(Ft)!==-1)continue;$t[Ft]=yt[Ft]}return $t}var isDevelopment$3=!1;function sheetForTag(yt){if(yt.sheet)return yt.sheet;for(var _e=0;_e<document.styleSheets.length;_e++)if(document.styleSheets[_e].ownerNode===yt)return document.styleSheets[_e]}function createStyleElement(yt){var _e=document.createElement("style");return _e.setAttribute("data-emotion",yt.key),yt.nonce!==void 0&&_e.setAttribute("nonce",yt.nonce),_e.appendChild(document.createTextNode("")),_e.setAttribute("data-s",""),_e}var StyleSheet=function(){function yt($t){var Ft=this;this._insertTag=function(Vt){var qt;Ft.tags.length===0?Ft.insertionPoint?qt=Ft.insertionPoint.nextSibling:Ft.prepe
vendor: 17,361 bytes, lines 40-47
40nd?qt=Ft.container.firstChild:qt=Ft.before:qt=Ft.tags[Ft.tags.length-1].nextSibling,Ft.container.insertBefore(Vt,qt),Ft.tags.push(Vt)},this.isSpeedy=$t.speedy===void 0?!isDevelopment$3:$t.speedy,this.tags=[],this.ctr=0,this.nonce=$t.nonce,this.key=$t.key,this.container=$t.container,this.prepend=$t.prepend,this.insertionPoint=$t.insertionPoint,this.before=null}var _e=yt.prototype;return _e.hydrate=function(Ft){Ft.forEach(this._insertTag)},_e.insert=function(Ft){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(createStyleElement(this));var Vt=this.tags[this.tags.length-1];if(this.isSpeedy){var qt=sheetForTag(Vt);try{qt.insertRule(Ft,qt.cssRules.length)}catch{}}else Vt.appendChild(document.createTextNode(Ft));this.ctr++},_e.flush=function(){this.tags.forEach(function(Ft){var Vt;return(Vt=Ft.parentNode)==null?void 0:Vt.removeChild(Ft)}),this.tags=[],this.ctr=0},yt}(),MS="-ms-",MOZ="-moz-",WEBKIT="-webkit-",COMMENT="comm",RULESET="rule",DECLARATION="decl",IMPORT="@import",KEYFRAMES="@keyframes",LAYER="@layer",abs$1=Math.abs,from$1=String.fromCharCode,assign=Object.assign;function hash$2(yt,_e){return charat(yt,0)^45?(((_e<<2^charat(yt,0))<<2^charat(yt,1))<<2^charat(yt,2))<<2^charat(yt,3):0}function trim(yt){return yt.trim()}function match(yt,_e){return(yt=_e.exec(yt))?yt[0]:yt}function replace(yt,_e,$t){return yt.replace(_e,$t)}function indexof(yt,_e){return yt.indexOf(_e)}function charat(yt,_e){return yt.charCodeAt(_e)|0}function substr(yt,_e,$t){return yt.slice(_e,$t)}function strlen(yt){return yt.length}function sizeof(yt){return yt.length}function append(yt,_e){return _e.push(yt),yt}function combine(yt,_e){return yt.map(_e).join("")}var line=1,column=1,length=0,position=0,character=0,characters="";function node$1(yt,_e,$t,Ft,Vt,qt,zt){return{value:yt,root:_e,parent:$t,type:Ft,props:Vt,children:qt,line,column,length:zt,return:""}}function copy$2(yt,_e){return assign(node$1("",null,null,"",null,null,0),yt,{length:-yt.length},_e)}function char(){return character}function prev(){return character=position>0?charat(characters,--position):0,column--,character===10&&(column=1,line--),character}function next(){return character=position<length?charat(characters,position++):0,column++,character===10&&(column=1,line++),character}function peek(){return charat(characters,position)}function caret(){return position}function slice(yt,_e){return substr(characters,yt,_e)}function token$1(yt){switch(yt){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 alloc(yt){return line=column=1,length=strlen(characters=yt),position=0,[]}function dealloc(yt){return characters="",yt}function delimit(yt){return trim(slice(position-1,delimiter(yt===91?yt+2:yt===40?yt+1:yt)))}function whitespace(yt){for(;(character=peek())&&character<33;)next();return token$1(yt)>2||token$1(character)>3?"":" "}function escaping(yt,_e){for(;--_e&&next()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice(yt,caret()+(_e<6&&peek()==32&&next()==32))}function delimiter(yt){for(;next();)switch(character){case yt:return position;case 34:case 39:yt!==34&&yt!==39&&delimiter(character);break;case 40:yt===41&&delimiter(yt);break;case 92:next();break}return position}function commenter(yt,_e){for(;next()&&yt+character!==57;)if(yt+character===84&&peek()===47)break;return"/*"+slice(_e,position-1)+"*"+from$1(yt===47?yt:next())}function identifier(yt){for(;!token$1(peek());)next();return slice(yt,position)}function compile(yt){return dealloc(parse$2("",null,null,null,[""],yt=alloc(yt),0,[0],yt))}function parse$2(yt,_e,$t,Ft,Vt,qt,zt,Ht,Kt){for(var Gt=0,Jt=0,Xt=zt,Zt=0,er=0,tr=0,rr=1,ar=1,nr=1,cr=0,fr="",vr=Vt,xr=qt,Sr=Ft,Tr=fr;ar;)switch(tr=cr,cr=next()){case 40:if(tr!=108&&charat(Tr,Xt-1)==58){indexof(Tr+=replace(delimit(cr),"&","&\f"),"&\f")!=-1&&(nr=-1);break}case 34:case 39:case 91:Tr+=delimit(cr);break;case 9:case 10:case 13:case 32:Tr+=whitespace(tr);break;case 92:Tr+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment(commenter(next(),caret()),_e,$t),Kt);break;default:Tr+="/"}break;case 123*rr:Ht[Gt++]=strlen(Tr)*nr;case 125*rr:case 59:case 0:switch(cr){case 0:case 125:ar=0;case 59+Jt:nr==-1&&(Tr=replace(Tr,/\f/g,"")),er>0&&strlen(Tr)-Xt&&append(er>32?declaration(Tr+";",Ft,$t,Xt-1):declaration(replace(Tr," ","")+";",Ft,$t,Xt-2),Kt);break;case 59:Tr+=";";default:if(append(Sr=ruleset(Tr,_e,$t,Gt,Jt,Vt,Ht,fr,vr=[],xr=[],Xt),qt),cr===123)if(Jt===0)parse$2(Tr,_e,Sr,Sr,vr,qt,Xt,Ht,xr);else switch(Zt===99&&charat(Tr,3)===110?100:Zt){case 100:case 108:case 109:case 115:parse$2(yt,Sr,Sr,Ft&&append(ruleset(yt,Sr,Sr,0,0,Vt,Ht,fr,Vt,vr=[],Xt),xr),Vt,xr,Xt,Ht,Ft?vr:xr);break;default:parse$2(Tr,Sr,Sr,Sr,[""],xr,0,Ht,xr)}}Gt=Jt=er=0,rr=nr=1,fr=Tr="",Xt=zt;break;case 58:Xt=1+strlen(Tr),er=tr;default:if(rr<1){if(cr==123)--rr;else if(cr==125&&rr++==0&&prev()==125)continue}switch(Tr+=from$1(cr),cr*rr){case 38:nr=Jt>0?1:(Tr+="\f",-1);break;case 44:Ht[Gt++]=(strlen(Tr)-1)*nr,nr=1;break;case 64:peek()===45&&(Tr+=delimit(next())),Zt=peek(),Jt=Xt=strlen(fr=Tr+=identifier(caret())),cr++;break;case 45:tr===45&&strlen(Tr)==2&&(rr=0)}}return qt}function ruleset(yt,_e,$t,Ft,Vt,qt,zt,Ht,Kt,Gt,Jt){for(var Xt=Vt-1,Zt=Vt===0?qt:[""],er=sizeof(Zt),tr=0,rr=0,ar=0;tr<Ft;++tr)for(var nr=0,cr=substr(yt,Xt+1,Xt=abs$1(rr=zt[tr])),fr=yt;nr<er;++nr)(fr=trim(rr>0?Zt[nr]+" "+cr:replace(cr,/&\f/g,Zt[nr])))&&(Kt[ar++]=fr);return node$1(yt,_e,$t,Vt===0?RULESET:Ht,Kt,Gt,Jt)}function comment(yt,_e,$t){return node$1(yt,_e,$t,COMMENT,from$1(char()),substr(yt,2,-2),0)}function declaration(yt,_e,$t,Ft){return node$1(yt,_e,$t,DECLARATION,substr(yt,0,Ft),substr(yt,Ft+1,-1),Ft)}function serialize(yt,_e){for(var $t="",Ft=sizeof(yt),Vt=0;Vt<Ft;Vt++)$t+=_e(yt[Vt],Vt,yt,_e)||"";return $t}function stringify$2(yt,_e,$t,Ft){switch(yt.type){case LAYER:if(yt.children.length)break;case IMPORT:case DECLARATION:return yt.return=yt.return||yt.value;case COMMENT:return"";case KEYFRAMES:return yt.return=yt.value+"{"+serialize(yt.children,Ft)+"}";case RULESET:yt.value=yt.props.join(",")}return strlen($t=serialize(yt.children,Ft))?yt.return=yt.value+"{"+$t+"}":""}function middleware(yt){var _e=sizeof(yt);return function($t,Ft,Vt,qt){for(var zt="",Ht=0;Ht<_e;Ht++)zt+=yt[Ht]($t,Ft,Vt,qt)||"";return zt}}function rulesheet(yt){return function(_e){_e.root||(_e=_e.return)&&yt(_e)}}function memoize$1(yt){var _e=Object.create(null);return function($t){return _e[$t]===void 0&&(_e[$t]=yt($t)),_e[$t]}}var identifierWithPointTracking=function(_e,$t,Ft){for(var Vt=0,qt=0;Vt=qt,qt=peek(),Vt===38&&qt===12&&($t[Ft]=1),!token$1(qt);)next();return slice(_e,position)},toRules=function(_e,$t){var Ft=-1,Vt=44;do switch(token$1(Vt)){case 0:Vt===38&&peek()===12&&($t[Ft]=1),_e[Ft]+=identifierWithPointTracking(position-1,$t,Ft);break;case 2:_e[Ft]+=delimit(Vt);break;case 4:if(Vt===44){_e[++Ft]=peek()===58?"&\f":"",$t[Ft]=_e[Ft].length;break}default:_e[Ft]+=from$1(Vt)}while(Vt=next());return _e},getRules=function(_e,$t){return dealloc(toRules(alloc(_e),$t))},fixedElements=new WeakMap,compat=function(_e){if(!(_e.type!=="rule"||!_e.parent||_e.length<1)){for(var $t=_e.value,Ft=_e.parent,Vt=_e.column===Ft.column&&_e.line===Ft.line;Ft.type!=="rule";)if(Ft=Ft.parent,!Ft)return;if(!(_e.props.length===1&&$t.charCodeAt(0)!==58&&!fixedElements.get(Ft))&&!Vt){fixedElements.set(_e,!0);for(var qt=[],zt=getRules($t,qt),Ht=Ft.props,Kt=0,Gt=0;Kt<zt.length;Kt++)for(var Jt=0;Jt<Ht.length;Jt++,Gt++)_e.props[Gt]=qt[Kt]?zt[Kt].replace(/&\f/g,Ht[Jt]):Ht[Jt]+" "+zt[Kt]}}},removeLabel=function(_e){if(_e.type==="decl"){var $t=_e.value;$t.charCodeAt(0)===108&&$t.charCodeAt(2)===98&&(_e.return="",_e.value="")}};function prefix(yt,_e){switch(hash$2(yt,_e)){case 5103:return WEBKIT+"print-"+yt+yt;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 WEBKIT+yt+yt;case 5349:case 4246:case 4810:case 6968:case 2756:return WEBKIT+yt+MOZ+yt+MS+yt+yt;case 6828:case 4268:return WEBKIT+yt+MS+yt+yt;case 6165:return WEBKIT+yt+MS+"flex-"+yt+yt;case 5187:return WEBKIT+yt+replace(yt,/(\w+).+(:[^]+)/,WEBKIT+"box-$1$2"+MS+"flex-$1$2")+yt;case 5443:return WEBKIT+yt+MS+"flex-item-"+replace(yt,/flex-|-self/,"")+yt;case 4675:return WEBKIT+yt+MS+"flex-line-pack"+replace(yt,/align-content|flex-|-self/,"")+yt;case 5548:return WEBKIT+yt+MS+replace(yt,"shrink","negative")+yt;case 5292:return WEBKIT+yt+MS+replace(yt,"basis","preferred-size")+yt;case 6060:return WEBKIT+"box-"+replace(yt,"-grow","")+WEBKIT+yt+MS+replace(yt,"grow","positive")+yt;case 4554:return WEBKIT+replace(yt,/([^-])(transform)/g,"$1"+WEBKIT+"$2")+yt;case 6187:return replace(replace(replace(yt,/(zoom-|grab)/,WEBKIT+"$1"),/(image-set)/,WEBKIT+"$1"),yt,"")+yt;case 5495:case 3959:return replace(yt,/(image-set\([^]*)/,WEBKIT+"$1$`$1");case 4968:return replace(replace(yt,/(.+:)(flex-)?(.*)/,WEBKIT+"box-pack:$3"+MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+WEBKIT+yt+yt;case 4095:case 3583:case 4068:case 2532:return replace(yt,/(.+)-inline(.+)/,WEBKIT+"$1$2")+yt;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(strlen(yt)-1-_e>6)switch(charat(yt,_e+1)){case 109:if(charat(yt,_e+4)!==45)break;case 102:return replace(yt,/(.+:)(.+)-([^]+)/,"$1"+WEBKIT+"$2-$3$1"+MOZ+(charat(yt,_e+3)==108?"$3":"$2-$3"))+yt;case 115:return~indexof(yt,"stretch")?prefix(replace(yt,"stretch","fill-available"),_e)+yt:yt}break;case 4949:if(charat(yt,_e+1)!==115)break;case 6444:switch(charat(yt,strlen(yt)-3-(~indexof(yt,"!important")&&10))){case 107:return replace(yt,":",":"+WEBKIT)+yt;case 101:return replace(yt,/(.+:)([^;!]+)(;|!.+)?/,"$1"+WEBKIT+(charat(yt,14)===45?"inline-":"")+"box$3$1"+WEBKIT+"$2$3$1"+MS+"$2box$3")+yt}break;case 5936:switch(charat(yt,_e+11)){case 114:return WEBKIT+yt+MS+replace(yt,/[svh]\w+-[tblr]{2}/,"tb")+yt;case 108:return WEBKIT+yt+MS+replace(yt,/[svh]\w+-[tblr]{2}/,"tb-rl")+yt;case 45:return WEBKIT+yt+MS+replace(yt,/[svh]\w+-[tblr]{2}/,"lr")+yt}return WEBKIT+yt+MS+yt+yt}return yt}var prefixer=function(_e,$t,Ft,Vt){if(_e.length>-1&&!_e.return)switch(_e.type){case DECLARATION:_e.return=prefix(_e.value,_e.length);break;case KEYFRAMES:return serialize([copy$2(_e,{value:replace(_e.value,"@","@"+WEBKIT)})],Vt);case RULESET:if(_e.length)return combine(_e.props,function(qt){switch(match(qt,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize([copy$2(_e,{props:[replace(qt,/:(read-\w+)/,":"+MOZ+"$1")]})],Vt);case"::placeholder":return serialize([copy$2(_e,{props:[replace(qt,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy$2(_e,{props:[replace(qt,/:(plac\w+)/,":"+MOZ+"$1")]}),copy$2(_e,{props:[replace(qt,/:(plac\w+)/,MS+"input-$1")]})],Vt)}return""})}},defaultStylisPlugins=[prefixer],createCache=function(_e){var $t=_e.key;if($t==="css"){var Ft=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(Ft,function(rr){var ar=rr.getAttribute("data-emotion");ar.indexOf(" ")!==-1&&(document.head.appendChild(rr),rr.setAttribute("data-s",""))})}var Vt=_e.stylisPlugins||defaultStylisPlugins,qt={},zt,Ht=[];zt=_e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+$t+' "]'),function(rr){for(var ar=rr.getAttribute("data-emotion").split(" "),nr=1;nr<ar.length;nr++)qt[ar[nr]]=!0;Ht.push(rr)});var Kt,Gt=[compat,removeLabel];{var Jt,Xt=[stringify$2,rulesheet(function(rr){Jt.insert(rr)})],Zt=middleware(Gt.concat(Vt,Xt)),er=function(ar){return serialize(compile(ar),Zt)};Kt=function(ar,nr,cr,fr){Jt=cr,er(ar?ar+"{"+nr.styles+"}":nr.styles),fr&&(tr.inserted[nr.name]=!0)}}var tr={key:$t,sheet:new StyleSheet({key:$t,container:zt,nonce:_e.nonce,speedy:_e.speedy,prepend:_e.prepend,insertionPoint:_e.insertionPoint}),nonce:_e.nonce,inserted:qt,registered:{},insert:Kt};return tr.sheet.hydrate(Ht),tr},reactIs$2={exports:{}},reactIs_production_min={};/** @license React v16.13.1 41 * react-is.production.min.js 42 * 43 * Copyright (c) Facebook, Inc. and its affiliates. 44 * 45 * This source code is licensed under the MIT license found in the 46 * LICENSE file in the root directory of this source tree. 47 */var b$2=typeof Symbol=="function"&&Symbol.for,c$1=b$2?Symbol.for("react.element"):60103,d$2=b$2?Symbol.for("react.portal"):60106,e=b$2?Symbol.for("react.fragment"):60107,f$2=b$2?Symbol.for("react.strict_mode"):60108,g$2=b$2?Symbol.for("react.profiler"):60114,h$2=b$2?Symbol.for("react.provider"):60109,k$2=b$2?Symbol.for("react.context"):60110,l$4=b$2?Symbol.for("react.async_mode"):60111,m$2=b$2?Symbol.for("react.concurrent_mode"):60111,n$1=b$2?Symbol.for("react.forward_ref"):60112,p$4=b$2?Symbol.for("react.suspense"):60113,q$1=b$2?Symbol.for("react.suspense_list"):60120,r$4=b$2?Symbol.for("react.memo"):60115,t$2=b$2?Symbol.for("react.lazy"):60116,v$3=b$2?Symbol.for("react.block"):60121,w$4=b$2?Symbol.for("react.fundamental"):60117,x$4=b$2?Symbol.for("react.responder"):60118,y$4=b$2?Symbol.for("react.scope"):60119;function z$3(yt){if(typeof yt=="object"&&yt!==null){var _e=yt.$$typeof;switch(_e){case c$1:switch(yt=yt.type,yt){case l$4:case m$2:case e:case g$2:case f$2:case p$4:return yt;default:switch(yt=yt&&yt.$$typeof,yt){case k$2:case n$1:case t$2:case r$4:case h$2:return yt;default:return _e}}case d$2:return _e}}}function A$2(yt){return z$3(yt)===m$2}reactIs_production_min.AsyncMode=l$4;reactIs_production_min.ConcurrentMode=m$2;reactIs_production_min.ContextConsumer=k$2;reactIs_production_min.ContextProvider=h$2;reactIs_production_min.Element=c$1;reactIs_production_min.ForwardRef=n$1;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t$2;reactIs_production_min.Memo=r$4;reactIs_production_min.Portal=d$2;reactIs_production_min.Profiler=g$2;reactIs_production_min.StrictMode=f$2;reactIs_production_min.Suspense=p$4;reactIs_production_min.isAsyncMode=function(yt){return A$2(yt)||z$3(yt)===l$4};reactIs_production_min.isConcurrentMode=A$2;reactIs_production_min.isContextConsumer=function(yt){return z$3(yt)===k$2};reactIs_production_min.isContextProvider=function(yt){return z$3(yt)===h$2};reactIs_production_min.isElement=function(yt){return typeof yt=="object"&&yt!==null&&yt.$$typeof===c$1};reactIs_production_min.isForwardRef=function(yt){return z$3(yt)===n$1};reactIs_production_min.isFragment=function(yt){return z$3(yt)===e};reactIs_production_min.isLazy=function(yt){return z$3(yt)===t$2};reactIs_production_min.isMemo=function(yt){return z$3(yt)===r$4};reactIs_production_min.isPortal=function(yt){return z$3(yt)===d$2};reactIs_production_min.isProfiler=function(yt){return z$3(yt)===g$2};reactIs_production_min.isStrictMode=function(yt){return z$3(yt)===f$2};reactIs_production_min.isSuspense=function(yt){return z$3(yt)===p$4};reactIs_production_min.isValidElementType=function(yt){return typeof yt=="string"||typeof yt=="function"||yt===e||yt===m$2||yt===g$2||yt===f$2||yt===p$4||yt===q$1||typeof yt=="object"&&yt!==null&&(yt.$$typeof===t$2||yt.$$typeof===r$4||yt.$$typeof===h$2||yt.$$typeof===k$2||yt.$$typeof===n$1||yt.$$typeof===w$4||yt.$$typeof===x$4||yt.$$typeof===y$4||yt.$$typeof===v$3)};reactIs_production_min.typeOf=z$3;reactIs$2.exports=reactIs_production_min;var reactIsExports$1=reactIs$2.exports,reactIs$1=reactIsExports$1,FORWARD_REF_STATICS={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},MEMO_STATICS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},TYPE_STATICS={};TYPE_STATICS[reactIs$1.ForwardRef]=FORWARD_REF_STATICS;TYPE_STATICS[reactIs$1.Memo]=MEMO_STATICS;var isBrowser$4=!0;function getRegisteredStyles(yt,_e,$t){var Ft="";return $t.split(" ").forEach(function(Vt){yt[Vt]!==void 0?_e.push(yt[Vt]+";"):Vt&&(Ft+=Vt+" ")}),Ft}var registerStyles=function(_e,$t,Ft){var Vt=_e.key+"-"+$t.name;(Ft===!1||isBrowser$4===!1)&&_e.registered[Vt]===void 0&&(_e.registered[Vt]=$t.styles)},insertStyles=function(_e,$t,Ft){registerStyles(_e,$t,Ft);var Vt=_e.key+"-"+$t.name;if(_e.inserted[$t.name]===void 0){var qt=$t;do _e.insert($t===qt?"."+Vt:"",qt,_e.sheet,!0),qt=qt.next;while(qt!==void 0)}};function murmur2(yt){for(var _e=0,$t,Ft=0,Vt=yt.length;Vt>=4;++Ft,Vt-=4)$t=yt.charCodeAt(Ft)&255|(yt.charCodeAt(++Ft)&255)<<8|(yt.charCodeAt(++Ft)&255)<<16|(yt.charCodeAt(++Ft)&255)<<24,$t=($t&65535)*1540483477+(($t>>>16)*59797<<16),$t^=$t>>>24,_e=($t&65535)*1540483477+(($t>>>16)*59797<<16)^(_e&65535)*1540483477+((_e>>>16)*59797<<16);switch(Vt){case 3:_e^=(yt.charCodeAt(Ft+2)&255)<<16;case 2:_e^=(yt.charCodeAt(Ft+1)&255)<<8;case 1:_e^=yt.charCodeAt(Ft)&255,_e=(_e&65535)*1540483477+((_e>>>16)*59797<<16)}return _e^=_e>>>13,_e=(_e&65535)*1540483477+((_e>>>16)*59797<<16),((_e^_e>>>15)>>>0).toString(36)}var unitlessKeys={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,msGr
vendor: 5,207 bytes, line 47
47idRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale: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},isDevelopment$2=!1,hyphenateRegex=/[A-Z]|^ms/g,animationRegex=/_EMO_([^_]+?)_([^]*?)_EMO_/g,isCustomProperty=function(_e){return _e.charCodeAt(1)===45},isProcessableValue=function(_e){return _e!=null&&typeof _e!="boolean"},processStyleName=memoize$1(function(yt){return isCustomProperty(yt)?yt:yt.replace(hyphenateRegex,"-$&").toLowerCase()}),processStyleValue=function(_e,$t){switch(_e){case"animation":case"animationName":if(typeof $t=="string")return $t.replace(animationRegex,function(Ft,Vt,qt){return cursor={name:Vt,styles:qt,next:cursor},Vt})}return unitlessKeys[_e]!==1&&!isCustomProperty(_e)&&typeof $t=="number"&&$t!==0?$t+"px":$t},noComponentSelectorMessage="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function handleInterpolation(yt,_e,$t){if($t==null)return"";var Ft=$t;if(Ft.__emotion_styles!==void 0)return Ft;switch(typeof $t){case"boolean":return"";case"object":{var Vt=$t;if(Vt.anim===1)return cursor={name:Vt.name,styles:Vt.styles,next:cursor},Vt.name;var qt=$t;if(qt.styles!==void 0){var zt=qt.next;if(zt!==void 0)for(;zt!==void 0;)cursor={name:zt.name,styles:zt.styles,next:cursor},zt=zt.next;var Ht=qt.styles+";";return Ht}return createStringFromObject(yt,_e,$t)}case"function":{if(yt!==void 0){var Kt=cursor,Gt=$t(yt);return cursor=Kt,handleInterpolation(yt,_e,Gt)}break}}var Jt=$t;if(_e==null)return Jt;var Xt=_e[Jt];return Xt!==void 0?Xt:Jt}function createStringFromObject(yt,_e,$t){var Ft="";if(Array.isArray($t))for(var Vt=0;Vt<$t.length;Vt++)Ft+=handleInterpolation(yt,_e,$t[Vt])+";";else for(var qt in $t){var zt=$t[qt];if(typeof zt!="object"){var Ht=zt;_e!=null&&_e[Ht]!==void 0?Ft+=qt+"{"+_e[Ht]+"}":isProcessableValue(Ht)&&(Ft+=processStyleName(qt)+":"+processStyleValue(qt,Ht)+";")}else{if(qt==="NO_COMPONENT_SELECTOR"&&isDevelopment$2)throw new Error(noComponentSelectorMessage);if(Array.isArray(zt)&&typeof zt[0]=="string"&&(_e==null||_e[zt[0]]===void 0))for(var Kt=0;Kt<zt.length;Kt++)isProcessableValue(zt[Kt])&&(Ft+=processStyleName(qt)+":"+processStyleValue(qt,zt[Kt])+";");else{var Gt=handleInterpolation(yt,_e,zt);switch(qt){case"animation":case"animationName":{Ft+=processStyleName(qt)+":"+Gt+";";break}default:Ft+=qt+"{"+Gt+"}"}}}}return Ft}var labelPattern=/label:\s*([^\s;{]+)\s*(;|$)/g,cursor;function serializeStyles(yt,_e,$t){if(yt.length===1&&typeof yt[0]=="object"&&yt[0]!==null&&yt[0].styles!==void 0)return yt[0];var Ft=!0,Vt="";cursor=void 0;var qt=yt[0];if(qt==null||qt.raw===void 0)Ft=!1,Vt+=handleInterpolation($t,_e,qt);else{var zt=qt;Vt+=zt[0]}for(var Ht=1;Ht<yt.length;Ht++)if(Vt+=handleInterpolation($t,_e,yt[Ht]),Ft){var Kt=qt;Vt+=Kt[Ht]}labelPattern.lastIndex=0;for(var Gt="",Jt;(Jt=labelPattern.exec(Vt))!==null;)Gt+="-"+Jt[1];var Xt=murmur2(Vt)+Gt;return{name:Xt,styles:Vt,next:cursor}}var syncFallback=function(_e){return _e()},useInsertionEffect$1=React$3.useInsertionEffect?React$3.useInsertionEffect:!1,useInsertionEffectAlwaysWithSyncFallback=useInsertionEffect$1||syncFallback,useInsertionEffectWithLayoutFallback=useInsertionEffect$1||reactExports.useLayoutEffect,isDevelopment$1=!1,EmotionCacheContext=reactExports.createContext(typeof HTMLElement<"u"?createCache({key:"css"}):null),CacheProvider=EmotionCacheContext.Provider,withEmotionCache=function(_e){return reactExports.forwardRef(function($t,Ft){var Vt=reactExports.useContext(EmotionCacheContext);return _e($t,Vt,Ft)})},ThemeContext$1=reactExports.createContext({}),hasOwn={}.hasOwnProperty,typePropName="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",createEmotionProps=function(_e,$t){var Ft={};for(var Vt in $t)hasOwn.call($t,Vt)&&(Ft[Vt]=$t[Vt]);return Ft[typePropName]=_e,Ft},Insertion$1=function(_e){var $t=_e.cache,Ft=_e.serialized,Vt=_e.isStringTag;return registerStyles($t,Ft,Vt),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles($t,Ft,Vt)}),null},Emotion=withEmotionCache(function(yt,_e,$t){var Ft=yt.css;typeof Ft=="string"&&_e.registered[Ft]!==void 0&&(Ft=_e.registered[Ft]);var Vt=yt[typePropName],qt=[Ft],zt="";typeof yt.className=="string"?zt=getRegisteredStyles(_e.registered,qt,yt.className):yt.className!=null&&(zt=yt.className+" ");var Ht=serializeStyles(qt,void 0,reactExports.useContext(ThemeContext$1));zt+=_e.key+"-"+Ht.name;var Kt={};for(var Gt in yt)hasOwn.call(yt,Gt)&&Gt!=="css"&&Gt!==typePropName&&!isDevelopment$1&&(Kt[Gt]=yt[Gt]);return Kt.className=zt,$t&&(Kt.ref=$t),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion$1,{cache:_e,serialized:Ht,isStringTag:typeof Vt=="string"}),reactExports.createElement(Vt,Kt))}),Emotion$1=Emotion,_extends$2={exports:{}},hasRequired_extends;function require_extends(){return hasRequired_extends||(hasRequired_extends=1,function(yt){function _e(){return yt.exports=_e=Object.assign?Object.assign.bind():function($t){for(var Ft=1;Ft<arguments.length;
vendor: 8,665 bytes, line 47
47Ft++){var Vt=arguments[Ft];for(var qt in Vt)({}).hasOwnProperty.call(Vt,qt)&&($t[qt]=Vt[qt])}return $t},yt.exports.__esModule=!0,yt.exports.default=yt.exports,_e.apply(null,arguments)}yt.exports=_e,yt.exports.__esModule=!0,yt.exports.default=yt.exports}(_extends$2)),_extends$2.exports}require_extends();var jsx=function(_e,$t){var Ft=arguments;if($t==null||!hasOwn.call($t,"css"))return reactExports.createElement.apply(void 0,Ft);var Vt=Ft.length,qt=new Array(Vt);qt[0]=Emotion$1,qt[1]=createEmotionProps(_e,$t);for(var zt=2;zt<Vt;zt++)qt[zt]=Ft[zt];return reactExports.createElement.apply(null,qt)};(function(yt){var _e;_e||(_e=yt.JSX||(yt.JSX={}))})(jsx||(jsx={}));var Global=withEmotionCache(function(yt,_e){var $t=yt.styles,Ft=serializeStyles([$t],void 0,reactExports.useContext(ThemeContext$1)),Vt=reactExports.useRef();return useInsertionEffectWithLayoutFallback(function(){var qt=_e.key+"-global",zt=new _e.sheet.constructor({key:qt,nonce:_e.sheet.nonce,container:_e.sheet.container,speedy:_e.sheet.isSpeedy}),Ht=!1,Kt=document.querySelector('style[data-emotion="'+qt+" "+Ft.name+'"]');return _e.sheet.tags.length&&(zt.before=_e.sheet.tags[0]),Kt!==null&&(Ht=!0,Kt.setAttribute("data-emotion",qt),zt.hydrate([Kt])),Vt.current=[zt,Ht],function(){zt.flush()}},[_e]),useInsertionEffectWithLayoutFallback(function(){var qt=Vt.current,zt=qt[0],Ht=qt[1];if(Ht){qt[1]=!1;return}if(Ft.next!==void 0&&insertStyles(_e,Ft.next,!0),zt.tags.length){var Kt=zt.tags[zt.tags.length-1].nextElementSibling;zt.before=Kt,zt.flush()}_e.insert("",Ft,zt,!1)},[_e,Ft.name]),null});function css(){for(var yt=arguments.length,_e=new Array(yt),$t=0;$t<yt;$t++)_e[$t]=arguments[$t];return serializeStyles(_e)}function keyframes$1(){var yt=css.apply(void 0,arguments),_e="animation-"+yt.name;return{name:_e,styles:"@keyframes "+_e+"{"+yt.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var reactPropsRegex=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,isPropValid=memoize$1(function(yt){return reactPropsRegex.test(yt)||yt.charCodeAt(0)===111&&yt.charCodeAt(1)===110&&yt.charCodeAt(2)<91}),isDevelopment=!1,testOmitPropsOnStringTag=isPropValid,testOmitPropsOnComponent=function(_e){return _e!=="theme"},getDefaultShouldForwardProp=function(_e){return typeof _e=="string"&&_e.charCodeAt(0)>96?testOmitPropsOnStringTag:testOmitPropsOnComponent},composeShouldForwardProps=function(_e,$t,Ft){var Vt;if($t){var qt=$t.shouldForwardProp;Vt=_e.__emotion_forwardProp&&qt?function(zt){return _e.__emotion_forwardProp(zt)&&qt(zt)}:qt}return typeof Vt!="function"&&Ft&&(Vt=_e.__emotion_forwardProp),Vt},Insertion=function(_e){var $t=_e.cache,Ft=_e.serialized,Vt=_e.isStringTag;return registerStyles($t,Ft,Vt),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles($t,Ft,Vt)}),null},createStyled$3=function yt(_e,$t){var Ft=_e.__emotion_real===_e,Vt=Ft&&_e.__emotion_base||_e,qt,zt;$t!==void 0&&(qt=$t.label,zt=$t.target);var Ht=composeShouldForwardProps(_e,$t,Ft),Kt=Ht||getDefaultShouldForwardProp(Vt),Gt=!Kt("as");return function(){var Jt=arguments,Xt=Ft&&_e.__emotion_styles!==void 0?_e.__emotion_styles.slice(0):[];if(qt!==void 0&&Xt.push("label:"+qt+";"),Jt[0]==null||Jt[0].raw===void 0)Xt.push.apply(Xt,Jt);else{var Zt=Jt[0];Xt.push(Zt[0]);for(var er=Jt.length,tr=1;tr<er;tr++)Xt.push(Jt[tr],Zt[tr])}var rr=withEmotionCache(function(ar,nr,cr){var fr=Gt&&ar.as||Vt,vr="",xr=[],Sr=ar;if(ar.theme==null){Sr={};for(var Tr in ar)Sr[Tr]=ar[Tr];Sr.theme=reactExports.useContext(ThemeContext$1)}typeof ar.className=="string"?vr=getRegisteredStyles(nr.registered,xr,ar.className):ar.className!=null&&(vr=ar.className+" ");var Br=serializeStyles(Xt.concat(xr),nr.registered,Sr);vr+=nr.key+"-"+Br.name,zt!==void 0&&(vr+=" "+zt);var jr=Gt&&Ht===void 0?getDefaultShouldForwardProp(fr):Kt,Rr={};for(var yr in ar)Gt&&yr==="as"||jr(yr)&&(Rr[yr]=ar[yr]);return Rr.className=vr,cr&&(Rr.ref=cr),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion,{cache:nr,serialized:Br,isStringTag:typeof fr=="string"}),reactExports.createElement(fr,Rr))});return rr.displayName=qt!==void 0?qt:"Styled("+(typeof Vt=="string"?Vt:Vt.displayName||Vt.name||"Component")+")",rr.defaultProps=_e.defaultProps,rr.__emotion_real=rr,rr.__emotion_base=Vt,rr.__emotion_styles=Xt,rr.__emotion_forwardProp=Ht,Object.defineProperty(rr,"toString",{value:function(){return zt===void 0&&isDevelopment?"NO_COMPONENT_SELECTOR":"."+zt}}),rr.withComponent=function(ar,nr){var cr=yt(ar,_extends$3({},$t,nr,{shouldForwardProp:composeShouldForwardProps(rr,nr,!0)}));return cr.apply(void 0,Xt)},rr}}
47,tags=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],styled$3=createStyled$3.bind(null);tags.forEach(function(yt){styled$3[yt]=styled$3(yt)});var propTypes={exports:{}},ReactPropTypesSecret$1="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ReactPropTypesSecret_1=ReactPropTypesSecret$1,ReactPropTypesSecret=ReactPropTypesSecret_1;function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction;var factoryWithThrowingShims=function(){function yt(Ft,Vt,qt,zt,Ht,Kt){if(Kt!==ReactPropTypesSecret){var Gt=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw Gt.name="Invariant Violation",Gt}}yt.isRequired=yt;function _e(){return yt}var $t={array:yt,bigint:yt,bool:yt,func:yt,number:yt,object:yt,string:yt,symbol:yt,any:yt,arrayOf:_e,element:yt,elementType:yt,instanceOf:_e,node:yt,objectOf:_e,oneOf:_e,oneOfType:_e,shape:_e,exact:_e,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return $t.PropTypes=$t,$t};propTypes.exports=factoryWithThrowingShims();var propTypesExports=propTypes.exports;const s$2=getDefaultExportFromCjs$1(propTypesExports);let cache;typeof document=="object"&&(cache=createCache({key:"css",prepend:!0}));function StyledEngineProvider(yt){const{injectFirst:_e,children:$t}=yt;return _e&&cache?jsxRuntimeExports.jsx(CacheProvider,{value:cache,children:$t}):$t}function isEmpty$4(yt){return yt==null||Object.keys(yt).length===0}function GlobalStyles$2(yt){const{styles:_e,defaultTheme:$t={}}=yt,Ft=typeof _e=="function"?Vt=>_e(isEmpty$4(Vt)?$t:Vt):_e;return jsxRuntimeExports.jsx(Global,{styles:Ft})}function styled$2(yt,_e){return styled$3(yt,_e)}const internal_processStyles=(yt,_e)=>{Array.isArray(yt.__emotion_styles)&&(yt.__emotion_styles=_e(yt.__emotion_styles))},styledEngine=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:GlobalStyles$2,StyledEngineProvider,ThemeContext:ThemeContext$1,css,default:styled$2,internal_processStyles,keyframes:keyframes$1},Symbol.toStringTag,{value:"Module"}));function isPlainObject(yt){if(typeof yt!="object"||yt===null)return!1;const _e=Object.getPrototypeOf(yt);return(_e===null||_e===Object.prototype||Object.getPrototypeOf(_e)===null)&&!(Symbol.toStringTag in yt)&&!(Symbol.iterator in yt)}function deepClone(yt){if(reactExports.isValidElement(yt)||!isPlainObject(yt))return yt;const _e={};return Object.keys(yt).forEach($t=>{_e[$t]=deepClone(yt[$t])}),_e}function deepmerge$1(yt,_e,$t={clone:!0}){const Ft=$t.clone?_extends$3({},yt):yt;return isPlainObject(yt)&&isPlainObject(_e)&&Object.keys(_e).forEach(Vt=>{reactExports.isValidElement(_e[Vt])?Ft[Vt]=_e[Vt]:isPlainObject(_e[Vt])&&Object.prototype.hasOwnProperty.call(yt,Vt)&&isPlainObject(yt[Vt])?Ft[Vt]=deepmerge$1(yt[Vt],_e[Vt],$t):$t.clone?Ft[Vt]=isPlainObject(_e[Vt])?deepClone(_e[Vt]):_e[Vt]:Ft[Vt]=_e[Vt]}),Ft}const deepmerge=Object.freeze(Object.defineProperty({__proto__:null,default:deepmerge$1,isPlainObject},Symbol.toStringTag,{value:"Module"}
47)),_excluded$Y=["values","unit","step"],sortBreakpointsValues=yt=>{const _e=Object.keys(yt).map($t=>({key:$t,val:yt[$t]}))||[];return _e.sort(($t,Ft)=>$t.val-Ft.val),_e.reduce(($t,Ft)=>_extends$3({},$t,{[Ft.key]:Ft.val}),{})};function createBreakpoints(yt){const{values:_e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:$t="px",step:Ft=5}=yt,Vt=_objectWithoutPropertiesLoose(yt,_excluded$Y),qt=sortBreakpointsValues(_e),zt=Object.keys(qt);function Ht(Zt){return`@media (min-width:${typeof _e[Zt]=="number"?_e[Zt]:Zt}${$t})`}function Kt(Zt){return`@media (max-width:${(typeof _e[Zt]=="number"?_e[Zt]:Zt)-Ft/100}${$t})`}function Gt(Zt,er){const tr=zt.indexOf(er);return`@media (min-width:${typeof _e[Zt]=="number"?_e[Zt]:Zt}${$t}) and (max-width:${(tr!==-1&&typeof _e[zt[tr]]=="number"?_e[zt[tr]]:er)-Ft/100}${$t})`}function Jt(Zt){return zt.indexOf(Zt)+1<zt.length?Gt(Zt,zt[zt.indexOf(Zt)+1]):Ht(Zt)}function Xt(Zt){const er=zt.indexOf(Zt);return er===0?Ht(zt[1]):er===zt.length-1?Kt(zt[er]):Gt(Zt,zt[zt.indexOf(Zt)+1]).replace("@media","@media not all and")}return _extends$3({keys:zt,values:qt,up:Ht,down:Kt,between:Gt,only:Jt,not:Xt,unit:$t},Vt)}const shape={borderRadius:4};function merge(yt,_e){return _e?deepmerge$1(yt,_e,{clone:!1}):yt}const values$1={xs:0,sm:600,md:900,lg:1200,xl:1536},defaultBreakpoints={keys:["xs","sm","md","lg","xl"],up:yt=>`@media (min-width:${values$1[yt]}px)`};function handleBreakpoints(yt,_e,$t){const Ft=yt.theme||{};if(Array.isArray(_e)){const qt=Ft.breakpoints||defaultBreakpoints;return _e.reduce((zt,Ht,Kt)=>(zt[qt.up(qt.keys[Kt])]=$t(_e[Kt]),zt),{})}if(typeof _e=="object"){const qt=Ft.breakpoints||defaultBreakpoints;return Object.keys(_e).reduce((zt,Ht)=>{if(Object.keys(qt.values||values$1).indexOf(Ht)!==-1){const Kt=qt.up(Ht);zt[Kt]=$t(_e[Ht],Ht)}else{const Kt=Ht;zt[Kt]=_e[Kt]}return zt},{})}return $t(_e)}function createEmptyBreakpointObject(yt={}){var _e;return((_e=yt.keys)==null?void 0:_e.reduce((Ft,Vt)=>{const qt=yt.up(Vt);return Ft[qt]={},Ft},{}))||{}}function removeUnusedBreakpoints(yt,_e){return yt.reduce(($t,Ft)=>{const Vt=$t[Ft];return(!Vt||Object.keys(Vt).length===0)&&delete $t[Ft],$t},_e)}function computeBreakpointsBase(yt,_e){if(typeof yt!="object")return{};const $t={},Ft=Object.keys(_e);return Array.isArray(yt)?Ft.forEach((Vt,qt)=>{qt<yt.length&&($t[Vt]=!0)}):Ft.forEach(Vt=>{yt[Vt]!=null&&($t[Vt]=!0)}),$t}function resolveBreakpointValues({values:yt,breakpoints:_e,base:$t}){const Ft=$t||computeBreakpointsBase(yt,_e),Vt=Object.keys(Ft);if(Vt.length===0)return yt;let qt;return Vt.reduce((zt,Ht,Kt)=>(Array.isArray(yt)?(zt[Ht]=yt[Kt]!=null?yt[Kt]:yt[qt],qt=Kt):typeof yt=="object"?(zt[Ht]=yt[Ht]!=null?yt[Ht]:yt[qt],qt=Ht):zt[Ht]=yt,zt),{})}function capitalize$1(yt){if(typeof yt!="string")throw new Error(formatMuiErrorMessage$1(7));return yt.charAt(0).toUpperCase()+yt.slice(1)}const capitalize=Object.freeze(Object.defineProperty({__proto__:null,default:capitalize$1},Symbol.toStringTag,{value:"Module"}));function getPath(yt,_e,$t=!0){if(!_e||typeof _e!="string")return null;if(yt&&yt.vars&&$t){const Ft=`vars.${_e}`.split(".").reduce((Vt,qt)=>Vt&&Vt[qt]?Vt[qt]:null,yt);if(Ft!=null)return Ft}return _e.split(".").reduce((Ft,Vt)=>Ft&&Ft[Vt]!=null?Ft[Vt]:null,yt)}function getStyleValue$1(yt,_e,$t,Ft=$t){let Vt;return typeof yt=="function"?Vt=yt($t):Array.isArray(yt)?Vt=yt[$t]||Ft:Vt=getPath(yt,$t)||Ft,_e&&(Vt=_e(Vt,Ft,yt)),Vt}function style$1(yt){const{prop:_e,cssProperty:$t=yt.prop,themeKey:Ft,transform:Vt}=yt,qt=zt=>{if(zt[_e]==null)return null;const Ht=zt[_e],Kt=zt.theme,Gt=getPath(Kt,Ft)||{};return handleBreakpoints(zt,Ht,Xt=>{let Zt=getStyleValue$1(Gt,Vt,Xt);return Xt===Zt&&typeof Xt=="string"&&(Zt=getStyleValue$1(Gt,Vt,`${_e}${Xt==="default"?"":capitalize$1(Xt)}`,Xt)),$t===!1?Zt:{[$t]:Zt}})};return qt.propTypes={},qt.filterProps=[_e],qt}function memoize(yt){const _e={};return $t=>(_e[$t]===void 0&&(_e[$t]=yt($t)),_e[$t])}const properties={m:"margin",p:"padding"},directions={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},aliases={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},getCssProperties=memoize(yt=>{if(yt.length>2)if(aliases[yt])yt=aliases[yt];else return[yt];const[_e,$t]=yt.split(""),Ft=properties[_e],Vt=directions[$t]||"";return Array.isArray(Vt)?Vt.map(qt=>Ft+qt):[Ft+Vt]}),marginKeys=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],paddingKeys=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...marginKeys,...paddingKeys];function createUnaryUnit(yt,_e,$t,Ft){var Vt;const qt=(Vt=getPath(yt,_e,!1))!=null?Vt:$t;return typeof qt=="number"?zt=>typeof zt=="string"?zt:qt*zt:Array.isArray(qt)?zt=>typeof zt=="string"?zt:qt[zt]:typeof qt=="function"?qt:()=>{}}function createUnarySpacing(yt){return createUnaryUnit(yt,"spacing",8)}function getValue(yt,_e){if(typeof _e=="string"||_e==null)return _e;const $t=Math.abs(_e),Ft=yt($t);return _e>=0?Ft:typeof Ft=="number"?-Ft:`-${Ft}`}function getStyleFromPropValue(yt,_e){return $t=>yt.reduce((Ft,Vt)=>(Ft[Vt]=getValue(_e,$t),Ft),{})}
47function resolveCssProperty(yt,_e,$t,Ft){if(_e.indexOf($t)===-1)return null;const Vt=getCssProperties($t),qt=getStyleFromPropValue(Vt,Ft),zt=yt[$t];return handleBreakpoints(yt,zt,qt)}function style(yt,_e){const $t=createUnarySpacing(yt.theme);return Object.keys(yt).map(Ft=>resolveCssProperty(yt,_e,Ft,$t)).reduce(merge,{})}function margin(yt){return style(yt,marginKeys)}margin.propTypes={};margin.filterProps=marginKeys;function padding(yt){return style(yt,paddingKeys)}padding.propTypes={};padding.filterProps=paddingKeys;function createSpacing(yt=8){if(yt.mui)return yt;const _e=createUnarySpacing({spacing:yt}),$t=(...Ft)=>(Ft.length===0?[1]:Ft).map(qt=>{const zt=_e(qt);return typeof zt=="number"?`${zt}px`:zt}).join(" ");return $t.mui=!0,$t}function compose(...yt){const _e=yt.reduce((Ft,Vt)=>(Vt.filterProps.forEach(qt=>{Ft[qt]=Vt}),Ft),{}),$t=Ft=>Object.keys(Ft).reduce((Vt,qt)=>_e[qt]?merge(Vt,_e[qt](Ft)):Vt,{});return $t.propTypes={},$t.filterProps=yt.reduce((Ft,Vt)=>Ft.concat(Vt.filterProps),[]),$t}function borderTransform(yt){return typeof yt!="number"?yt:`${yt}px solid`}function createBorderStyle(yt,_e){return style$1({prop:yt,themeKey:"borders",transform:_e})}const border=createBorderStyle("border",borderTransform),borderTop=createBorderStyle("borderTop",borderTransform),borderRight=createBorderStyle("borderRight",borderTransform),borderBottom=createBorderStyle("borderBottom",borderTransform),borderLeft=createBorderStyle("borderLeft",borderTransform),borderColor=createBorderStyle("borderColor"),borderTopColor=createBorderStyle("borderTopColor"),borderRightColor=createBorderStyle("borderRightColor"),borderBottomColor=createBorderStyle("borderBottomColor"),borderLeftColor=createBorderStyle("borderLeftColor"),outline=createBorderStyle("outline",borderTransform),outlineColor=createBorderStyle("outlineColor"),borderRadius=yt=>{if(yt.borderRadius!==void 0&&yt.borderRadius!==null){const _e=createUnaryUnit(yt.theme,"shape.borderRadius",4),$t=Ft=>({borderRadius:getValue(_e,Ft)});return handleBreakpoints(yt,yt.borderRadius,$t)}return null};borderRadius.propTypes={};borderRadius.filterProps=["borderRadius"];compose(border,borderTop,borderRight,borderBottom,borderLeft,borderColor,borderTopColor,borderRightColor,borderBottomColor,borderLeftColor,borderRadius,outline,outlineColor);const gap=yt=>{if(yt.gap!==void 0&&yt.gap!==null){const _e=createUnaryUnit(yt.theme,"spacing",8),$t=Ft=>({gap:getValue(_e,Ft)});return handleBreakpoints(yt,yt.gap,$t)}return null};gap.propTypes={};gap.filterProps=["gap"];const columnGap=yt=>{if(yt.columnGap!==void 0&&yt.columnGap!==null){const _e=createUnaryUnit(yt.theme,"spacing",8),$t=Ft=>({columnGap:getValue(_e,Ft)});return handleBreakpoints(yt,yt.columnGap,$t)}return null};columnGap.propTypes={};columnGap.filterProps=["columnGap"];const rowGap=yt=>{if(yt.rowGap!==void 0&&yt.rowGap!==null){const _e=createUnaryUnit(yt.theme,"spacing",8),$t=Ft=>({rowGap:getValue(_e,Ft)});return handleBreakpoints(yt,yt.rowGap,$t)}return null};rowGap.propTypes={};rowGap.filterProps=["rowGap"];const gridColumn=style$1({prop:"gridColumn"}),gridRow=style$1({prop:"gridRow"}),gridAutoFlow=style$1({prop:"gridAutoFlow"}),gridAutoColumns=style$1({prop:"gridAutoColumns"}),gridAutoRows=style$1({prop:"gridAutoRows"}),gridTemplateColumns=style$1({prop:"gridTemplateColumns"}),gridTemplateRows=style$1({prop:"gridTemplateRows"}),gridTemplateAreas=style$1({prop:"gridTemplateAreas"}),gridArea=style$1({prop:"gridArea"});compose(gap,columnGap,rowGap,gridColumn,gridRow,gridAutoFlow,gridAutoColumns,gridAutoRows,gridTemplateColumns,gridTemplateRows,gridTemplateAreas,gridArea);function paletteTransform(yt,_e){return _e==="grey"?_e:yt}const color$1=style$1({prop:"color",themeKey:"palette",transform:paletteTransform}),bgcolor=style$1({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:paletteTransform}),backgroundColor=style$1({prop:"backgroundColor",themeKey:"palette",transform:paletteTransform});compose(color$1,bgcolor,backgroundColor);function sizingTransform(yt){return yt<=1&&yt!==0?`${yt*100}%`:yt}const width=style$1({prop:"width",transform:sizingTransform}),maxWidth=yt=>{if(yt.maxWidth!==void 0&&yt.maxWidth!==null){const _e=$t=>{var Ft,Vt;const qt=((Ft=yt.theme)==null||(Ft=Ft.breakpoints)==null||(Ft=Ft.values)==null?void 0:Ft[$t])||values$1[$t];return qt?((Vt=yt.theme)==null||(Vt=Vt.breakpoints)==null?void 0:Vt.unit)!=="px"?{maxWidth:`${qt}${yt.theme.breakpoints.unit}`}:{maxWidth:qt}:{maxWidth:sizingTransform($t)}};return handleBreakpoints(yt,yt.maxWidth,_e)}return null};maxWidth.filterProps=["maxWidth"];const minWidth=style$1({prop:"minWidth",transform:sizingTransform}),height=style$1({prop:"height",transform:sizingTransform}),maxHeight=style$1({prop:"maxHeight",transform:sizingTransform}),minHeight=style$1({prop:"minHeight",transform:sizingTransform});style$1({prop:"size",cssProperty:"width",transform:sizingTransform});style$1({prop:"size",cssProperty:"height",transform:sizingTransform});const boxSizing=style$1({prop:"boxSizing"});compose(width,maxWidth,minWidth,height,maxHeight,minHeight,boxSizing);const defaultSxConfig={border:{themeKey:"borders",transform:borderTransform},borderTop:{themeKey:"borders",transform:borderTransform},borderRight:{themeKey:"borders",transform:borderTransform},borderBottom:{themeKey:"borders",transform:borderTransform},borderLeft:{themeKey:"borders",transform:borderTransform},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:borderTransform},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:borderRadius},color:{themeKey:"palette",transform:paletteTransform},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:paletteTransform},backgroundColor:{themeKey:"palette",transform:paletteTransform},p:{style:padding},pt:{style:padding},pr:{style:padding},pb:{style:padding},pl:{style:padding},px:{style:padding},py:{style:padding},padding:{style:padding},paddingTop:{style:padding},paddingRight:{style:padding}
47,paddingBottom:{style:padding},paddingLeft:{style:padding},paddingX:{style:padding},paddingY:{style:padding},paddingInline:{style:padding},paddingInlineStart:{style:padding},paddingInlineEnd:{style:padding},paddingBlock:{style:padding},paddingBlockStart:{style:padding},paddingBlockEnd:{style:padding},m:{style:margin},mt:{style:margin},mr:{style:margin},mb:{style:margin},ml:{style:margin},mx:{style:margin},my:{style:margin},margin:{style:margin},marginTop:{style:margin},marginRight:{style:margin},marginBottom:{style:margin},marginLeft:{style:margin},marginX:{style:margin},marginY:{style:margin},marginInline:{style:margin},marginInlineStart:{style:margin},marginInlineEnd:{style:margin},marginBlock:{style:margin},marginBlockStart:{style:margin},marginBlockEnd:{style:margin},displayPrint:{cssProperty:!1,transform:yt=>({"@media print":{display:yt}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:gap},rowGap:{style:rowGap},columnGap:{style:columnGap},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:sizingTransform},maxWidth:{style:maxWidth},minWidth:{transform:sizingTransform},height:{transform:sizingTransform},maxHeight:{transform:sizingTransform},minHeight:{transform:sizingTransform},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function objectsHaveSameKeys(...yt){const _e=yt.reduce((Ft,Vt)=>Ft.concat(Object.keys(Vt)),[]),$t=new Set(_e);return yt.every(Ft=>$t.size===Object.keys(Ft).length)}function callIfFn(yt,_e){return typeof yt=="function"?yt(_e):yt}function unstable_createStyleFunctionSx(){function yt($t,Ft,Vt,qt){const zt={[$t]:Ft,theme:Vt},Ht=qt[$t];if(!Ht)return{[$t]:Ft};const{cssProperty:Kt=$t,themeKey:Gt,transform:Jt,style:Xt}=Ht;if(Ft==null)return null;if(Gt==="typography"&&Ft==="inherit")return{[$t]:Ft};const Zt=getPath(Vt,Gt)||{};return Xt?Xt(zt):handleBreakpoints(zt,Ft,tr=>{let rr=getStyleValue$1(Zt,Jt,tr);return tr===rr&&typeof tr=="string"&&(rr=getStyleValue$1(Zt,Jt,`${$t}${tr==="default"?"":capitalize$1(tr)}`,tr)),Kt===!1?rr:{[Kt]:rr}})}function _e($t){var Ft;const{sx:Vt,theme:qt={}}=$t||{};if(!Vt)return null;const zt=(Ft=qt.unstable_sxConfig)!=null?Ft:defaultSxConfig;function Ht(Kt){let Gt=Kt;if(typeof Kt=="function")Gt=Kt(qt);else if(typeof Kt!="object")return Kt;if(!Gt)return null;const Jt=createEmptyBreakpointObject(qt.breakpoints),Xt=Object.keys(Jt);let Zt=Jt;return Object.keys(Gt).forEach(er=>{const tr=callIfFn(Gt[er],qt);if(tr!=null)if(typeof tr=="object")if(zt[er])Zt=merge(Zt,yt(er,tr,qt,zt));else{const rr=handleBreakpoints({theme:qt},tr,ar=>({[er]:ar}));objectsHaveSameKeys(rr,tr)?Zt[er]=_e({sx:tr,theme:qt}):Zt=merge(Zt,rr)}else Zt=merge(Zt,yt(er,tr,qt,zt))}),removeUnusedBreakpoints(Xt,Zt)}return Array.isArray(Vt)?Vt.map(Ht):Ht(Vt)}return _e}const styleFunctionSx$1=unstable_createStyleFunctionSx();styleFunctionSx$1.filterProps=["sx"];function applyStyles(yt,_e){const $t=this;return $t.vars&&typeof $t.getColorSchemeSelector=="function"?{[$t.getColorSchemeSelector(yt).replace(/(\[[^\]]+\])/,"*:where($1)")]:_e}:$t.palette.mode===yt?_e:{}}const _excluded$X=["breakpoints","palette","spacing","shape"];function createTheme$2(yt={},..._e){const{breakpoints:$t={},palette:Ft={},spacing:Vt,shape:qt={}}=yt,zt=_objectWithoutPropertiesLoose(yt,_excluded$X),Ht=createBreakpoints($t),Kt=createSpacing(Vt);let Gt=deepmerge$1({breakpoints:Ht,direction:"ltr",components:{},palette:_extends$3({mode:"light"},Ft),spacing:Kt,shape:_extends$3({},shape,qt)},zt);return Gt.applyStyles=applyStyles,Gt=_e.reduce((Jt,Xt)=>deepmerge$1(Jt,Xt),Gt),Gt.unstable_sxConfig=_extends$3({},defaultSxConfig,zt==null?void 0:zt.unstable_sxConfig),Gt.unstable_sx=function(Xt){return styleFunctionSx$1({sx:Xt,theme:this})},Gt}const createTheme$1=Object.freeze(Object.defineProperty({__proto__:null,default:createTheme$2,private_createBreakpoints:createBreakpoints,unstable_applyStyles:applyStyles},Symbol.toStringTag,{value:"Module"}));function isObjectEmpty$1(yt){return Object.keys(yt).length===0}function useTheme$3(yt=null){const _e=reactExports.useContext(ThemeContext$1);return!_e||isObjectEmpty$1(_e)?yt:_e}const systemDefaultTheme$2=createTheme$2();function useTheme$2(yt=systemDefaultTheme$2){return useTheme$3(yt)}function GlobalStyles$1({styles:yt,themeId:_e,defaultTheme:$t={}}){const Ft=useTheme$2($t),Vt=typeof yt=="function"?yt(_e&&Ft[_e]||Ft):yt;return jsxRuntimeExports.jsx(GlobalStyles$2,{styles:Vt})}const _excluded$W=["sx"],splitProps=yt=>{var _e,$t;const Ft={systemProps:{},otherProps:{}},Vt=(_e=yt==null||($t=yt.theme)==null?void 0:$t.unstable_sxConfig)!=null?_e:defaultSxConfig;return Object.keys(yt).forEach(qt=>{Vt[qt]?Ft.systemProps[qt]=yt[qt]:Ft.otherProps[qt]=yt[qt]}),Ft};function extendSxProp(yt){const{sx:_e}=yt,$t=_objectWithoutPropertiesLoose(yt,_excluded$W),{systemProps:Ft,otherProps:Vt}=splitProps($t);let qt;return Array.isArray(_e)?qt=[Ft,..._e]:typeof _e=="function"?qt=(...zt)=>{const Ht=_e(...zt);return isPlainObject(Ht)?_extends$3({},Ft,Ht):Ft}:qt=_extends$3({},Ft,_e),_extends$3({},Vt,{sx:qt})}const styleFunctionSx=Object.freeze(Object.defineProperty({__proto__:null,default:styleFunctionSx$1,extendSxProp,unstable_createStyleFunctionSx,unstable_defaultSxConfig:defaultSxConfig},Symbol.toStringTag,{value:"Module"})),defaultGenerator=yt=>yt,createClassNameGenerator=()=>{let yt=defaultGenerator;return{configure(_e){yt=_e},generate(_e){return yt(_e)},reset(){yt=defaultGenerator}}},ClassNameGenerator=createClassNameGenerator();function r$3(yt){var _e,$t,Ft="";if(typeof yt=="string"||typeof yt=="number")Ft+=yt;else if(typeof yt=="object")if(Array.isArray(yt)){var Vt=yt.length;for(_e=0;_e<Vt;_e++)yt[_e]&&($t=r$3(yt[_e]))&&(Ft&&(Ft+=" "),Ft+=$t)}else for($t in yt)yt[$t]&&(Ft&&(Ft+=" "),Ft+=$t);return Ft}function clsx$1(){for(var yt,_e,$t=0,Ft="",Vt=arguments.length;$t<Vt;$t++)(yt=arguments[$t])&&(_e=r$3(yt))&&(Ft&&(Ft+=" "),Ft+=_e);return Ft}const _excluded$V=["className","component"];function createBox$1(yt={}){const{themeId:_e,defaultTheme:$t,defaultClassName:Ft="MuiBox-root",generateClassName:Vt}=yt,qt=styled$2("div",{shouldForwardProp:Ht=>Ht!=="theme"&&Ht!=="sx"&&Ht!=="as"})(styleFunctionSx$1);return reactExports.forwardRef(function(Kt,Gt){const Jt=useTheme$2($t),Xt=extendSxProp(Kt),{className:Zt,component:er="div"}=Xt,tr=_objectWithoutPropertiesLoose(Xt,_excluded$V);return jsxRuntimeExports.jsx(qt,_extends$3({as:er,ref:Gt,className:clsx$1(Zt,Vt?Vt(Ft):Ft),theme:_e&&Jt[_e]||Jt},tr))})}const globalStateClasses={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function generateUtilityClass(yt,_e,$t="Mui"){const Ft=globalStateClasses[_e];return Ft?`${$t}-${Ft}`:`${ClassNameGenerator.generate(yt)}-${_e}`}function generateUtilityClasses(yt,_e,$t="Mui"){const Ft={};return _e.forEach(Vt=>{Ft[Vt]=generateUtilityClass(yt,Vt,$t)}),Ft}var reactIs={exports:{}},reactIs_production={};/** 48 * @license React 49 * react-is.production.js 50 * 51 * Copyright (c) Meta Platforms, Inc. and affiliates. 52 * 53 * This source code is licensed under the MIT license found in the 54 * LICENSE file in the root directory of this source tree. 55 */var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_CONSUMER_TYPE=Symbol.for("react.consumer"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_SUSPENSE_LIST_TYPE=Symbol.for("react.suspense_list"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),REACT_VIEW_TRANSITION_TYPE=Symbol.for("react.view_transition"),REACT_CLIENT_REFERENCE=Symbol.for("react.client.reference");function typeOf(yt){if(typeof yt=="object"&&yt!==null){var _e=yt.$$typeof;switch(_e){case REACT_ELEMENT_TYPE:switch(yt=yt.type,yt){case REACT_FRAGMENT_TYPE:case REACT_PROFILER_TYPE:case REACT_STRICT_MODE_TYPE:case REACT_SUSPENSE_TYPE:case REACT_SUSPENSE_LIST_TYPE:case REACT_VIEW_TRANSITION_TYPE:return yt;default:switch(yt=yt&&yt.$$typeof,yt){case REACT_CONTEXT_TYPE:case REACT_FORWARD_REF_TYPE:case REACT_LAZY_TYPE:case REACT_MEMO_TYPE:return yt;case REACT_CONSUMER_TYPE:return yt;default:return _e}}case REACT_PORTAL_TYPE:return _e}}}reactIs_production.ContextConsumer=REACT_CONSUMER_TYPE;reactIs_production.ContextProvider=REACT_CONTEXT_TYPE;reactIs_production.Element=REACT_ELEMENT_TYPE;reactIs_production.ForwardRef=REACT_FORWARD_REF_TYPE;reactIs_production.Fragment=REACT_FRAGMENT_TYPE;reactIs_production.Lazy=REACT_LAZY_TYPE;reactIs_production.Memo=REACT_MEMO_TYPE;reactIs_production.Portal=REACT_PORTAL_TYPE;reactIs_production.Profiler=REACT_PROFILER_TYPE;reactIs_production.StrictMode=REACT_STRICT_MODE_TYPE;reactIs_production.Suspense=REACT_SUSPENSE_TYPE;reactIs_production.SuspenseList=REACT_SUSPENSE_LIST_TYPE;reactIs_production.isContextConsumer=function(yt){return typeOf(yt)===REACT_CONSUMER_TYPE};reactIs_production.isContextProvider=function(yt){return typeOf(yt)===REACT_CONTEXT_TYPE};reactIs_production.isElement=function(yt){return typeof yt=="object"&&yt!==null&&yt.$$typeof===REACT_ELEMENT_TYPE};reactIs_production.isForwardRef=function(yt){return typeOf(yt)===REACT_FORWARD_REF_TYPE};reactIs_production.isFragment=function(yt){return typeOf(yt)===REACT_FRAGMENT_TYPE};reactIs_production.isLazy=function(yt){return typeOf(yt)===REACT_LAZY_TYPE};reactIs_production.isMemo=function(yt){return typeOf(yt)===REACT_MEMO_TYPE};reactIs_production.isPortal=function(yt){return typeOf(yt)===REACT_PORTAL_TYPE};reactIs_production.isProfiler=function(yt){return typeOf(yt)===REACT_PROFILER_TYPE};reactIs_production.isStrictMode=function(yt){return typeOf(yt)===REACT_STRICT_MODE_TYPE};reactIs_production.isSuspense=function(yt){return typeOf(yt)===REACT_SUSPENSE_TYPE};reactIs_production.isSuspenseList=function(yt){return typeOf(yt)===REACT_SUSPENSE_LIST_TYPE};reactIs_production.isValidElementType=function(yt){return typeof yt=="string"||typeof yt=="function"||yt===REACT_FRAGMENT_TYPE||yt===REACT_PROFILER_TYPE||yt===REACT_STRICT_MODE_TYPE||yt===REACT_SUSPENSE_TYPE||yt===REACT_SUSPENSE_LIST_TYPE||typeof yt=="object"&&yt!==null&&(yt.$$typeof===REACT_LAZY_TYPE||yt.$$typeof===REACT_MEMO_TYPE||yt.$$typeof===REACT_CONTEXT_TYPE||yt.$$typeof===REACT_CONSUMER_TYPE||yt.$$typeof===REACT_FORWARD_REF_TYPE||yt.$$typeof===REACT_CLIENT_REFERENCE||yt.getModuleId!==void 0)};reactIs_production.typeOf=typeOf;reactIs.exports=reactIs_production;var reactIsExports=reactIs.exports;const fnNameMatchRegex=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function getFunctionName(yt){const _e=`${yt}`.match(fnNameMatchRegex);return _e&&_e[1]||""}function getFunctionComponentName(yt,_e=""){return yt.displayName||yt.name||getFunctionName(yt)||_e}function getWrappedName(yt,_e,$t){const Ft=getFunctionComponentName(_e);return yt.displayName||(Ft!==""?`${$t}(${Ft})`:$t)}function getDisplayName$1(yt){if(yt!=null){if(typeof yt=="string")return yt;if(typeof yt=="function")return getFunctionComponentName(yt,"Component");if(typeof yt=="object")switch(yt.$$typeof){case reactIsExports.ForwardRef:return getWrappedName(yt,yt.render,"ForwardRef");case reactIsExports.Memo:return getWrappedName(yt,yt.type,"memo");default:return}}}const getDisplayName=Object.freeze(Object.defineProperty({__proto__:null,default:getDisplayName$1,getFunctionName},Symbol.toStringTag,{value:"Module"})),_excluded$U=["ownerState"],_excluded2$6=["variants"],_excluded3$3=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function isEmpty$3(yt){return Object.keys(yt).length===0}function isStringTag$1(yt){return typeof yt=="string"&&yt.charCodeAt(0)>96}function shouldForwardProp$1(yt){return yt!=="ownerState"&&yt!=="theme"&&yt!=="sx"&&yt!=="as"}const systemDefaultTheme$1=createTheme$2(),lowercaseFirstLetter$1=yt=>yt&&yt.charAt(0).toLowerCase()+yt.slice(1);function resolveTheme$1({defaultTheme:yt,theme:_e,themeId:$t}){return isEmpty$3(_e)?yt:_e[$t]||_e}function defaultOverridesResolver$1(yt){return yt?(_e,$t)=>$t[yt]:null}function processStyleArg$1(yt,_e){let{ownerState:$t}=_e,Ft=_objectWithoutPropertiesLoose(_e,_excluded$U);const Vt=typeof yt=="function"?yt(_extends$3({ownerState:$t},Ft)):yt;if(Array.isArray(Vt))return Vt.flatMap(qt=>processStyleArg$1(qt,_extends$3({ownerState:$t},Ft)));
55if(Vt&&typeof Vt=="object"&&Array.isArray(Vt.variants)){const{variants:qt=[]}=Vt;let Ht=_objectWithoutPropertiesLoose(Vt,_excluded2$6);return qt.forEach(Kt=>{let Gt=!0;typeof Kt.props=="function"?Gt=Kt.props(_extends$3({ownerState:$t},Ft,$t)):Object.keys(Kt.props).forEach(Jt=>{($t==null?void 0:$t[Jt])!==Kt.props[Jt]&&Ft[Jt]!==Kt.props[Jt]&&(Gt=!1)}),Gt&&(Array.isArray(Ht)||(Ht=[Ht]),Ht.push(typeof Kt.style=="function"?Kt.style(_extends$3({ownerState:$t},Ft,$t)):Kt.style))}),Ht}return Vt}function createStyled$2(yt={}){const{themeId:_e,defaultTheme:$t=systemDefaultTheme$1,rootShouldForwardProp:Ft=shouldForwardProp$1,slotShouldForwardProp:Vt=shouldForwardProp$1}=yt,qt=zt=>styleFunctionSx$1(_extends$3({},zt,{theme:resolveTheme$1(_extends$3({},zt,{defaultTheme:$t,themeId:_e}))}));return qt.__mui_systemSx=!0,(zt,Ht={})=>{internal_processStyles(zt,xr=>xr.filter(Sr=>!(Sr!=null&&Sr.__mui_systemSx)));const{name:Kt,slot:Gt,skipVariantsResolver:Jt,skipSx:Xt,overridesResolver:Zt=defaultOverridesResolver$1(lowercaseFirstLetter$1(Gt))}=Ht,er=_objectWithoutPropertiesLoose(Ht,_excluded3$3),tr=Jt!==void 0?Jt:Gt&&Gt!=="Root"&&Gt!=="root"||!1,rr=Xt||!1;let ar,nr=shouldForwardProp$1;Gt==="Root"||Gt==="root"?nr=Ft:Gt?nr=Vt:isStringTag$1(zt)&&(nr=void 0);const cr=styled$2(zt,_extends$3({shouldForwardProp:nr,label:ar},er)),fr=xr=>typeof xr=="function"&&xr.__emotion_real!==xr||isPlainObject(xr)?Sr=>processStyleArg$1(xr,_extends$3({},Sr,{theme:resolveTheme$1({theme:Sr.theme,defaultTheme:$t,themeId:_e})})):xr,vr=(xr,...Sr)=>{let Tr=fr(xr);const Br=Sr?Sr.map(fr):[];Kt&&Zt&&Br.push(yr=>{const sr=resolveTheme$1(_extends$3({},yr,{defaultTheme:$t,themeId:_e}));if(!sr.components||!sr.components[Kt]||!sr.components[Kt].styleOverrides)return null;const or=sr.components[Kt].styleOverrides,Qt={};return Object.entries(or).forEach(([ir,ur])=>{Qt[ir]=processStyleArg$1(ur,_extends$3({},yr,{theme:sr}))}),Zt(yr,Qt)}),Kt&&!tr&&Br.push(yr=>{var sr;const or=resolveTheme$1(_extends$3({},yr,{defaultTheme:$t,themeId:_e})),Qt=or==null||(sr=or.components)==null||(sr=sr[Kt])==null?void 0:sr.variants;return processStyleArg$1({variants:Qt},_extends$3({},yr,{theme:or}))}),rr||Br.push(qt);const jr=Br.length-Sr.length;if(Array.isArray(xr)&&jr>0){const yr=new Array(jr).fill("");Tr=[...xr,...yr],Tr.raw=[...xr.raw,...yr]}const Rr=cr(Tr,...Br);return zt.muiName&&(Rr.muiName=zt.muiName),Rr};return cr.withConfig&&(vr.withConfig=cr.withConfig),vr}}const styled$1=createStyled$2();function resolveProps(yt,_e){const $t=_extends$3({},_e);return Object.keys(yt).forEach(Ft=>{if(Ft.toString().match(/^(components|slots)$/))$t[Ft]=_extends$3({},yt[Ft],$t[Ft]);else if(Ft.toString().match(/^(componentsProps|slotProps)$/)){const Vt=yt[Ft]||{},qt=_e[Ft];$t[Ft]={},!qt||!Object.keys(qt)?$t[Ft]=Vt:!Vt||!Object.keys(Vt)?$t[Ft]=qt:($t[Ft]=_extends$3({},qt),Object.keys(Vt).forEach(zt=>{$t[Ft][zt]=resolveProps(Vt[zt],qt[zt])}))}else $t[Ft]===void 0&&($t[Ft]=yt[Ft])}),$t}function getThemeProps$1(yt){const{theme:_e,name:$t,props:Ft}=yt;return!_e||!_e.components||!_e.components[$t]||!_e.components[$t].defaultProps?Ft:resolveProps(_e.components[$t].defaultProps,Ft)}function useThemeProps({props:yt,name:_e,defaultTheme:$t,themeId:Ft}){let Vt=useTheme$2($t);return Ft&&(Vt=Vt[Ft]||Vt),getThemeProps$1({theme:Vt,name:_e,props:yt})}const useEnhancedEffect=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function clamp$2(yt,_e=Number.MIN_SAFE_INTEGER,$t=Number.MAX_SAFE_INTEGER){return Math.max(_e,Math.min(yt,$t))}const clamp$1=Object.freeze(Object.defineProperty({__proto__:null,default:clamp$2},Symbol.toStringTag,{value:"Module"}));function createChainedFunction(...yt){return yt.reduce((_e,$t)=>$t==null?_e:function(...Vt){_e.apply(this,Vt),$t.apply(this,Vt)},()=>{})}function debounce(yt,_e=166){let $t;function Ft(...Vt){const qt=()=>{yt.apply(this,Vt)};clearTimeout($t),$t=setTimeout(qt,_e)}return Ft.clear=()=>{clearTimeout($t)},Ft}function isMuiElement(yt,_e){var $t,Ft;return reactExports.isValidElement(yt)&&_e.indexOf(($t=yt.type.muiName)!=null?$t:(Ft=yt.type)==null||(Ft=Ft._payload)==null||(Ft=Ft.value)==null?void 0:Ft.muiName)!==-1}function ownerDocument(yt){return yt&&yt.ownerDocument||document}function ownerWindow(yt){return ownerDocument(yt).defaultView||window}function setRef$1(yt,_e){typeof yt=="function"?yt(_e):yt&&(yt.current=_e)}let globalId=0;function useGlobalId(yt){const[_e,$t]=reactExports.useState(yt),Ft=yt||_e;return reactExports.useEffect(()=>{_e==null&&(globalId+=1,$t(`mui-${globalId}`))},[_e]),Ft}const maybeReactUseId=React$3.useId;function useId$1(yt){if(maybeReactUseId!==void 0){const _e=maybeReactUseId();return yt??_e}return useGlobalId(yt)}function useControlled({controlled:yt,default:_e,name:$t,state:Ft="value"}){const{current:Vt}=reactExports.useRef(yt!==void 0),[qt,zt]=reactExports.useState(_e),Ht=Vt?yt:qt,Kt=reactExports.useCallback(Gt=>{Vt||zt(Gt)},[]);return[Ht,Kt]}function useEventCallback(yt){const _e=reactExports.useRef(yt);return useEnhancedEffect(()=>{_e.current=yt}),reactExports.useRef((...$t)=>(0,_e.current)(...$t)).current}function useForkRef(...yt){return reactExports.useMemo(()=>yt.every(_e=>_e==null)?null:_e=>{yt.forEach($t=>{setRef$1($t,_e)})},yt)}const UNINITIALIZED={};function useLazyRef(yt,_e){const $t=reactExports.useRef(UNINITIALIZED);return $t.current===UNINITIALIZED&&($t.current=yt(_e)),$t}const EMPTY=[];function useOnMount(yt){reactExports.useEffect(yt,EMPTY)}class Timeout{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Timeout}start(_e,$t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,$t()},_e)}}function useTimeout(){const yt=useLazyRef(Timeout.create).current;return useOnMount(yt.disposeEffect),yt}let hadKeyboardEvent=!0,hadFocusVisibleRecently=!1;const hadFocusVisibleRecentlyTimeout=new Timeout,inputTypesWhitelist={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function focusTriggersKeyboardModality(yt){const{type:_e,tagName:$t}=yt;return!!($t==="INPUT"&&inputTypesWhitelist[_e]&&!yt.readOnly||$t==="TEXTAREA"&&!yt.readOnly||yt.isContentEditable)}function handleKeyDown(yt){yt.metaKey||yt.altKey||yt.ctrlKey||(hadKeyboardEvent=!0)}function handlePointerDown(){hadKeyboardEvent=!1}function handleVisibilityChange(){this.visibilityState==="hidden"&&hadFocusVisibleRecently&&(hadKeyboardEvent=!0)}function prepare(yt){yt.addEventListener("keydown",handleKeyDown,!0),yt.addEventListener("mousedown",handlePointerDown,!0),yt.addEventListener("pointerdown",handlePointerDown,!0),yt.addEventListener("touchstart",handlePointerDown,!0),yt.addEventListener("visibilitychange",handleVisibilityChange,!0)}function isFocusVisible(yt){const{target:_e}=yt;try{return _e.matches(":focus-visible")}catch{}return hadKeyboardEvent||focusTriggersKeyboardModality(_e)}function useIsFocusVisible(){const yt=reactExports.useCallback(Vt=>{Vt!=null&&prepare(Vt.ownerDocument)},[]),_e=reactExports.useRef(!1);function $t(){return _e.current?(hadFocusVisibleRecently=!0,hadFocusVisibleRecentlyTimeout.start(100,()=>{hadFocusVisibleRecently=!1}),_e.current=!1,!0):!1}function Ft(Vt){return isFocusVisible(Vt)?(_e.current=!0,!0):!1}
55return{isFocusVisibleRef:_e,onFocus:Ft,onBlur:$t,ref:yt}}function getScrollbarSize(yt){const _e=yt.documentElement.clientWidth;return Math.abs(window.innerWidth-_e)}function composeClasses(yt,_e,$t=void 0){const Ft={};return Object.keys(yt).forEach(Vt=>{Ft[Vt]=yt[Vt].reduce((qt,zt)=>{if(zt){const Ht=_e(zt);Ht!==""&&qt.push(Ht),$t&&$t[zt]&&qt.push($t[zt])}return qt},[]).join(" ")}),Ft}function isHostComponent(yt){return typeof yt=="string"}function appendOwnerState(yt,_e,$t){return yt===void 0||isHostComponent(yt)?_e:_extends$3({},_e,{ownerState:_extends$3({},_e.ownerState,$t)})}function extractEventHandlers(yt,_e=[]){if(yt===void 0)return{};const $t={};return Object.keys(yt).filter(Ft=>Ft.match(/^on[A-Z]/)&&typeof yt[Ft]=="function"&&!_e.includes(Ft)).forEach(Ft=>{$t[Ft]=yt[Ft]}),$t}function omitEventHandlers(yt){if(yt===void 0)return{};const _e={};return Object.keys(yt).filter($t=>!($t.match(/^on[A-Z]/)&&typeof yt[$t]=="function")).forEach($t=>{_e[$t]=yt[$t]}),_e}function mergeSlotProps(yt){const{getSlotProps:_e,additionalProps:$t,externalSlotProps:Ft,externalForwardedProps:Vt,className:qt}=yt;if(!_e){const er=clsx$1($t==null?void 0:$t.className,qt,Vt==null?void 0:Vt.className,Ft==null?void 0:Ft.className),tr=_extends$3({},$t==null?void 0:$t.style,Vt==null?void 0:Vt.style,Ft==null?void 0:Ft.style),rr=_extends$3({},$t,Vt,Ft);return er.length>0&&(rr.className=er),Object.keys(tr).length>0&&(rr.style=tr),{props:rr,internalRef:void 0}}const zt=extractEventHandlers(_extends$3({},Vt,Ft)),Ht=omitEventHandlers(Ft),Kt=omitEventHandlers(Vt),Gt=_e(zt),Jt=clsx$1(Gt==null?void 0:Gt.className,$t==null?void 0:$t.className,qt,Vt==null?void 0:Vt.className,Ft==null?void 0:Ft.className),Xt=_extends$3({},Gt==null?void 0:Gt.style,$t==null?void 0:$t.style,Vt==null?void 0:Vt.style,Ft==null?void 0:Ft.style),Zt=_extends$3({},Gt,$t,Kt,Ht);return Jt.length>0&&(Zt.className=Jt),Object.keys(Xt).length>0&&(Zt.style=Xt),{props:Zt,internalRef:Gt.ref}}function resolveComponentProps(yt,_e,$t){return typeof yt=="function"?yt(_e,$t):yt}const _excluded$T=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function useSlotProps(yt){var _e;const{elementType:$t,externalSlotProps:Ft,ownerState:Vt,skipResolvingSlotProps:qt=!1}=yt,zt=_objectWithoutPropertiesLoose(yt,_excluded$T),Ht=qt?{}:resolveComponentProps(Ft,Vt),{props:Kt,internalRef:Gt}=mergeSlotProps(_extends$3({},zt,{externalSlotProps:Ht})),Jt=useForkRef(Gt,Ht==null?void 0:Ht.ref,(_e=yt.additionalProps)==null?void 0:_e.ref);return appendOwnerState($t,_extends$3({},Kt,{ref:Jt}),Vt)}function getReactElementRef(yt){if(parseInt(reactExports.version,10)>=19){var _e;return(yt==null||(_e=yt.props)==null?void 0:_e.ref)||null}return(yt==null?void 0:yt.ref)||null}const ThemeContext=reactExports.createContext(null);function useTheme$1(){return reactExports.useContext(ThemeContext)}const hasSymbol=typeof Symbol=="function"&&Symbol.for,nested=hasSymbol?Symbol.for("mui.nested"):"__THEME_NESTED__";function mergeOuterLocalTheme(yt,_e){return typeof _e=="function"?_e(yt):_extends$3({},yt,_e)}function ThemeProvider$2(yt){const{children:_e,theme:$t}=yt,Ft=useTheme$1(),Vt=reactExports.useMemo(()=>{const qt=Ft===null?$t:mergeOuterLocalTheme(Ft,$t);return qt!=null&&(qt[nested]=Ft!==null),qt},[$t,Ft]);return jsxRuntimeExports.jsx(ThemeContext.Provider,{value:Vt,children:_e})}const _excluded$S=["value"],RtlContext=reactExports.createContext();function RtlProvider(yt){let{value:_e}=yt,$t=_objectWithoutPropertiesLoose(yt,_excluded$S);return jsxRuntimeExports.jsx(RtlContext.Provider,_extends$3({value:_e??!0},$t))}const useRtl=()=>{const yt=reactExports.useContext(RtlContext);return yt??!1},PropsContext=reactExports.createContext(void 0);function DefaultPropsProvider({value:yt,children:_e}){return jsxRuntimeExports.jsx(PropsContext.Provider,{value:yt,children:_e})}function getThemeProps(yt){const{theme:_e,name:$t,props:Ft}=yt;if(!_e||!_e.components||!_e.components[$t])return Ft;const Vt=_e.components[$t];return Vt.defaultProps?resolveProps(Vt.defaultProps,Ft):!Vt.styleOverrides&&!Vt.variants?resolveProps(Vt,Ft):Ft}
55function useDefaultProps$1({props:yt,name:_e}){const $t=reactExports.useContext(PropsContext);return getThemeProps({props:yt,name:_e,theme:{components:$t}})}const EMPTY_THEME={};function useThemeScoping(yt,_e,$t,Ft=!1){return reactExports.useMemo(()=>{const Vt=yt&&_e[yt]||_e;if(typeof $t=="function"){const qt=$t(Vt),zt=yt?_extends$3({},_e,{[yt]:qt}):qt;return Ft?()=>zt:zt}return yt?_extends$3({},_e,{[yt]:$t}):_extends$3({},_e,$t)},[yt,_e,$t,Ft])}function ThemeProvider$1(yt){const{children:_e,theme:$t,themeId:Ft}=yt,Vt=useTheme$3(EMPTY_THEME),qt=useTheme$1()||EMPTY_THEME,zt=useThemeScoping(Ft,Vt,$t),Ht=useThemeScoping(Ft,qt,$t,!0),Kt=zt.direction==="rtl";return jsxRuntimeExports.jsx(ThemeProvider$2,{theme:Ht,children:jsxRuntimeExports.jsx(ThemeContext$1.Provider,{value:zt,children:jsxRuntimeExports.jsx(RtlProvider,{value:Kt,children:jsxRuntimeExports.jsx(DefaultPropsProvider,{value:zt==null?void 0:zt.components,children:_e})})})})}const _excluded$R=["className","component","disableGutters","fixed","maxWidth","classes"],defaultTheme$2=createTheme$2(),defaultCreateStyledComponent=styled$1("div",{name:"MuiContainer",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,_e[`maxWidth${capitalize$1(String($t.maxWidth))}`],$t.fixed&&_e.fixed,$t.disableGutters&&_e.disableGutters]}}),useThemePropsDefault=yt=>useThemeProps({props:yt,name:"MuiContainer",defaultTheme:defaultTheme$2}),useUtilityClasses$E=(yt,_e)=>{const $t=Kt=>generateUtilityClass(_e,Kt),{classes:Ft,fixed:Vt,disableGutters:qt,maxWidth:zt}=yt,Ht={root:["root",zt&&`maxWidth${capitalize$1(String(zt))}`,Vt&&"fixed",qt&&"disableGutters"]};return composeClasses(Ht,$t,Ft)};function createContainer(yt={}){const{createStyledComponent:_e=defaultCreateStyledComponent,useThemeProps:$t=useThemePropsDefault,componentName:Ft="MuiContainer"}=yt,Vt=_e(({theme:zt,ownerState:Ht})=>_extends$3({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!Ht.disableGutters&&{paddingLeft:zt.spacing(2),paddingRight:zt.spacing(2),[zt.breakpoints.up("sm")]:{paddingLeft:zt.spacing(3),paddingRight:zt.spacing(3)}}),({theme:zt,ownerState:Ht})=>Ht.fixed&&Object.keys(zt.breakpoints.values).reduce((Kt,Gt)=>{const Jt=Gt,Xt=zt.breakpoints.values[Jt];return Xt!==0&&(Kt[zt.breakpoints.up(Jt)]={maxWidth:`${Xt}${zt.breakpoints.unit}`}),Kt},{}),({theme:zt,ownerState:Ht})=>_extends$3({},Ht.maxWidth==="xs"&&{[zt.breakpoints.up("xs")]:{maxWidth:Math.max(zt.breakpoints.values.xs,444)}},Ht.maxWidth&&Ht.maxWidth!=="xs"&&{[zt.breakpoints.up(Ht.maxWidth)]:{maxWidth:`${zt.breakpoints.values[Ht.maxWidth]}${zt.breakpoints.unit}`}}));return reactExports.forwardRef(function(Ht,Kt){const Gt=$t(Ht),{className:Jt,component:Xt="div",disableGutters:Zt=!1,fixed:er=!1,maxWidth:tr="lg"}=Gt,rr=_objectWithoutPropertiesLoose(Gt,_excluded$R),ar=_extends$3({},Gt,{component:Xt,disableGutters:Zt,fixed:er,maxWidth:tr}),nr=useUtilityClasses$E(ar,Ft);return jsxRuntimeExports.jsx(Vt,_extends$3({as:Xt,ownerState:ar,className:clsx$1(nr.root,Jt),ref:Kt},rr))})}function createMixins(yt,_e){return _extends$3({toolbar:{minHeight:56,[yt.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[yt.up("sm")]:{minHeight:64}}},_e)}var colorManipulator={},interopRequireDefault={exports:{}};(function(yt){function _e($t){return $t&&$t.__esModule?$t:{default:$t}}yt.exports=_e,yt.exports.__esModule=!0,yt.exports.default=yt.exports})(interopRequireDefault);var interopRequireDefaultExports=interopRequireDefault.exports;const require$$1$4=getAugmentedNamespace(formatMuiErrorMessage),require$$2$1=getAugmentedNamespace(clamp$1);var _interopRequireDefault$1=interopRequireDefaultExports;Object.defineProperty(colorManipulator,"__esModule",{value:!0});var alpha_1=colorManipulator.alpha=alpha$1;colorManipulator.blend=blend;colorManipulator.colorChannel=void 0;var darken_1=colorManipulator.darken=darken;colorManipulator.decomposeColor=decomposeColor;var emphasize_1=colorManipulator.emphasize=emphasize,getContrastRatio_1=colorManipulator.getContrastRatio=getContrastRatio;colorManipulator.getLuminance=getLuminance;colorManipulator.hexToRgb=hexToRgb;colorManipulator.hslToRgb=hslToRgb;var lighten_1=colorManipulator.lighten=lighten;colorManipulator.private_safeAlpha=private_safeAlpha;colorManipulator.private_safeColorChannel=void 0;colorManipulator.private_safeDarken=private_safeDarken;colorManipulator.private_safeEmphasize=private_safeEmphasize;colorManipulator.private_safeLighten=private_safeLighten;colorManipulator.recomposeColor=recomposeColor;colorManipulator.rgbToHex=rgbToHex;var _formatMuiErrorMessage2=_interopRequireDefault$1(require$$1$4),_clamp=_interopRequireDefault$1(require$$2$1);function clampWrapper(yt,_e=0,$t=1){return(0,_clamp.default)(yt,_e,$t)}function hexToRgb(yt){yt=yt.slice(1);const _e=new RegExp(`.{1,${yt.length>=6?2:1}}`,"g");let $t=yt.match(_e);return $t&&$t[0].length===1&&($t=$t.map(Ft=>Ft+Ft)),$t?`rgb${$t.length===4?"a":""}(${$t.map((Ft,Vt)=>Vt<3?parseInt(Ft,16):Math.round(parseInt(Ft,16)/255*1e3)/1e3).join(", ")})`:""}function intToHex(yt){const _e=yt.toString(16);return _e.length===1?`0${_e}`:_e}function decomposeColor(yt){if(yt.type)return yt;if(yt.charAt(0)==="#")return decomposeColor(hexToRgb(yt));const _e=yt.indexOf("("),$t=yt.substring(0,_e);
vendor: 4,565 bytes, line 55
55if(["rgb","rgba","hsl","hsla","color"].indexOf($t)===-1)throw new Error((0,_formatMuiErrorMessage2.default)(9,yt));let Ft=yt.substring(_e+1,yt.length-1),Vt;if($t==="color"){if(Ft=Ft.split(" "),Vt=Ft.shift(),Ft.length===4&&Ft[3].charAt(0)==="/"&&(Ft[3]=Ft[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(Vt)===-1)throw new Error((0,_formatMuiErrorMessage2.default)(10,Vt))}else Ft=Ft.split(",");return Ft=Ft.map(qt=>parseFloat(qt)),{type:$t,values:Ft,colorSpace:Vt}}const colorChannel=yt=>{const _e=decomposeColor(yt);return _e.values.slice(0,3).map(($t,Ft)=>_e.type.indexOf("hsl")!==-1&&Ft!==0?`${$t}%`:$t).join(" ")};colorManipulator.colorChannel=colorChannel;const private_safeColorChannel=(yt,_e)=>{try{return colorChannel(yt)}catch{return yt}};colorManipulator.private_safeColorChannel=private_safeColorChannel;function recomposeColor(yt){const{type:_e,colorSpace:$t}=yt;let{values:Ft}=yt;return _e.indexOf("rgb")!==-1?Ft=Ft.map((Vt,qt)=>qt<3?parseInt(Vt,10):Vt):_e.indexOf("hsl")!==-1&&(Ft[1]=`${Ft[1]}%`,Ft[2]=`${Ft[2]}%`),_e.indexOf("color")!==-1?Ft=`${$t} ${Ft.join(" ")}`:Ft=`${Ft.join(", ")}`,`${_e}(${Ft})`}function rgbToHex(yt){if(yt.indexOf("#")===0)return yt;const{values:_e}=decomposeColor(yt);return`#${_e.map(($t,Ft)=>intToHex(Ft===3?Math.round(255*$t):$t)).join("")}`}function hslToRgb(yt){yt=decomposeColor(yt);const{values:_e}=yt,$t=_e[0],Ft=_e[1]/100,Vt=_e[2]/100,qt=Ft*Math.min(Vt,1-Vt),zt=(Gt,Jt=(Gt+$t/30)%12)=>Vt-qt*Math.max(Math.min(Jt-3,9-Jt,1),-1);let Ht="rgb";const Kt=[Math.round(zt(0)*255),Math.round(zt(8)*255),Math.round(zt(4)*255)];return yt.type==="hsla"&&(Ht+="a",Kt.push(_e[3])),recomposeColor({type:Ht,values:Kt})}function getLuminance(yt){yt=decomposeColor(yt);let _e=yt.type==="hsl"||yt.type==="hsla"?decomposeColor(hslToRgb(yt)).values:yt.values;return _e=_e.map($t=>(yt.type!=="color"&&($t/=255),$t<=.03928?$t/12.92:(($t+.055)/1.055)**2.4)),Number((.2126*_e[0]+.7152*_e[1]+.0722*_e[2]).toFixed(3))}function getContrastRatio(yt,_e){const $t=getLuminance(yt),Ft=getLuminance(_e);return(Math.max($t,Ft)+.05)/(Math.min($t,Ft)+.05)}function alpha$1(yt,_e){return yt=decomposeColor(yt),_e=clampWrapper(_e),(yt.type==="rgb"||yt.type==="hsl")&&(yt.type+="a"),yt.type==="color"?yt.values[3]=`/${_e}`:yt.values[3]=_e,recomposeColor(yt)}function private_safeAlpha(yt,_e,$t){try{return alpha$1(yt,_e)}catch{return yt}}function darken(yt,_e){if(yt=decomposeColor(yt),_e=clampWrapper(_e),yt.type.indexOf("hsl")!==-1)yt.values[2]*=1-_e;else if(yt.type.indexOf("rgb")!==-1||yt.type.indexOf("color")!==-1)for(let $t=0;$t<3;$t+=1)yt.values[$t]*=1-_e;return recomposeColor(yt)}function private_safeDarken(yt,_e,$t){try{return darken(yt,_e)}catch{return yt}}function lighten(yt,_e){if(yt=decomposeColor(yt),_e=clampWrapper(_e),yt.type.indexOf("hsl")!==-1)yt.values[2]+=(100-yt.values[2])*_e;else if(yt.type.indexOf("rgb")!==-1)for(let $t=0;$t<3;$t+=1)yt.values[$t]+=(255-yt.values[$t])*_e;else if(yt.type.indexOf("color")!==-1)for(let $t=0;$t<3;$t+=1)yt.values[$t]+=(1-yt.values[$t])*_e;return recomposeColor(yt)}function private_safeLighten(yt,_e,$t){try{return lighten(yt,_e)}catch{return yt}}function emphasize(yt,_e=.15){return getLuminance(yt)>.5?darken(yt,_e):lighten(yt,_e)}function private_safeEmphasize(yt,_e,$t){try{return emphasize(yt,_e)}catch{return yt}}function blend(yt,_e,$t,Ft=1){const Vt=(Kt,Gt)=>Math.round((Kt**(1/Ft)*(1-$t)+Gt**(1/Ft)*$t)**Ft),qt=decomposeColor(yt),zt=decomposeColor(_e),Ht=[Vt(qt.values[0],zt.values[0]),Vt(qt.values[1],zt.values[1]),Vt(qt.values[2],zt.values[2])];return recomposeColor({type:"rgb",values:Ht})}const _excluded$Q=["mode","contrastThreshold","tonalOffset"],light={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:common$2.white,default:common$2.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},dark={text:{primary:common$2.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:common$2.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackgroun
55d:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function addLightOrDark(yt,_e,$t,Ft){const Vt=Ft.light||Ft,qt=Ft.dark||Ft*1.5;yt[_e]||(yt.hasOwnProperty($t)?yt[_e]=yt[$t]:_e==="light"?yt.light=lighten_1(yt.main,Vt):_e==="dark"&&(yt.dark=darken_1(yt.main,qt)))}function getDefaultPrimary(yt="light"){return yt==="dark"?{main:blue[200],light:blue[50],dark:blue[400]}:{main:blue[700],light:blue[400],dark:blue[800]}}function getDefaultSecondary(yt="light"){return yt==="dark"?{main:purple[200],light:purple[50],dark:purple[400]}:{main:purple[500],light:purple[300],dark:purple[700]}}function getDefaultError(yt="light"){return yt==="dark"?{main:red[500],light:red[300],dark:red[700]}:{main:red[700],light:red[400],dark:red[800]}}function getDefaultInfo(yt="light"){return yt==="dark"?{main:lightBlue[400],light:lightBlue[300],dark:lightBlue[700]}:{main:lightBlue[700],light:lightBlue[500],dark:lightBlue[900]}}function getDefaultSuccess(yt="light"){return yt==="dark"?{main:green[400],light:green[300],dark:green[700]}:{main:green[800],light:green[500],dark:green[900]}}function getDefaultWarning(yt="light"){return yt==="dark"?{main:orange[400],light:orange[300],dark:orange[700]}:{main:"#ed6c02",light:orange[500],dark:orange[900]}}function createPalette(yt){const{mode:_e="light",contrastThreshold:$t=3,tonalOffset:Ft=.2}=yt,Vt=_objectWithoutPropertiesLoose(yt,_excluded$Q),qt=yt.primary||getDefaultPrimary(_e),zt=yt.secondary||getDefaultSecondary(_e),Ht=yt.error||getDefaultError(_e),Kt=yt.info||getDefaultInfo(_e),Gt=yt.success||getDefaultSuccess(_e),Jt=yt.warning||getDefaultWarning(_e);function Xt(rr){return getContrastRatio_1(rr,dark.text.primary)>=$t?dark.text.primary:light.text.primary}
55const Zt=({color:rr,name:ar,mainShade:nr=500,lightShade:cr=300,darkShade:fr=700})=>{if(rr=_extends$3({},rr),!rr.main&&rr[nr]&&(rr.main=rr[nr]),!rr.hasOwnProperty("main"))throw new Error(formatMuiErrorMessage$1(11,ar?` (${ar})`:"",nr));if(typeof rr.main!="string")throw new Error(formatMuiErrorMessage$1(12,ar?` (${ar})`:"",JSON.stringify(rr.main)));return addLightOrDark(rr,"light",cr,Ft),addLightOrDark(rr,"dark",fr,Ft),rr.contrastText||(rr.contrastText=Xt(rr.main)),rr},er={dark,light};return deepmerge$1(_extends$3({common:_extends$3({},common$2),mode:_e,primary:Zt({color:qt,name:"primary"}),secondary:Zt({color:zt,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:Zt({color:Ht,name:"error"}),warning:Zt({color:Jt,name:"warning"}),info:Zt({color:Kt,name:"info"}),success:Zt({color:Gt,name:"success"}),grey,contrastThreshold:$t,getContrastText:Xt,augmentColor:Zt,tonalOffset:Ft},er[_e]),Vt)}const _excluded$P=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function round$1(yt){return Math.round(yt*1e5)/1e5}const caseAllCaps={textTransform:"uppercase"},defaultFontFamily='"Roboto", "Helvetica", "Arial", sans-serif';function createTypography(yt,_e){const $t=typeof _e=="function"?_e(yt):_e,{fontFamily:Ft=defaultFontFamily,fontSize:Vt=14,fontWeightLight:qt=300,fontWeightRegular:zt=400,fontWeightMedium:Ht=500,fontWeightBold:Kt=700,htmlFontSize:Gt=16,allVariants:Jt,pxToRem:Xt}=$t,Zt=_objectWithoutPropertiesLoose($t,_excluded$P),er=Vt/14,tr=Xt||(nr=>`${nr/Gt*er}rem`),rr=(nr,cr,fr,vr,xr)=>_extends$3({fontFamily:Ft,fontWeight:nr,fontSize:tr(cr),lineHeight:fr},Ft===defaultFontFamily?{letterSpacing:`${round$1(vr/cr)}em`}:{},xr,Jt),ar={h1:rr(qt,96,1.167,-1.5),h2:rr(qt,60,1.2,-.5),h3:rr(zt,48,1.167,0),h4:rr(zt,34,1.235,.25),h5:rr(zt,24,1.334,0),h6:rr(Ht,20,1.6,.15),subtitle1:rr(zt,16,1.75,.15),subtitle2:rr(Ht,14,1.57,.1),body1:rr(zt,16,1.5,.15),body2:rr(zt,14,1.43,.15),button:rr(Ht,14,1.75,.4,caseAllCaps),caption:rr(zt,12,1.66,.4),overline:rr(zt,12,2.66,1,caseAllCaps),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return deepmerge$1(_extends$3({htmlFontSize:Gt,pxToRem:tr,fontFamily:Ft,fontSize:Vt,fontWeightLight:qt,fontWeightRegular:zt,fontWeightMedium:Ht,fontWeightBold:Kt},ar),Zt,{clone:!1})}const shadowKeyUmbraOpacity=.2,shadowKeyPenumbraOpacity=.14,shadowAmbientShadowOpacity=.12;function createShadow(...yt){return[`${yt[0]}px ${yt[1]}px ${yt[2]}px ${yt[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`,`${yt[4]}px ${yt[5]}px ${yt[6]}px ${yt[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`,`${yt[8]}px ${yt[9]}px ${yt[10]}px ${yt[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(",")}const shadows=["none",createShadow(0,2,1,-1,0,1,1,0,0,1,3,0),createShadow(0,3,1,-2,0,2,2,0,0,1,5,0),createShadow(0,3,3,-2,0,3,4,0,0,1,8,0),createShadow(0,2,4,-1,0,4,5,0,0,1,10,0),createShadow(0,3,5,-1,0,5,8,0,0,1,14,0),createShadow(0,3,5,-1,0,6,10,0,0,1,18,0),createShadow(0,4,5,-2,0,7,10,1,0,2,16,1),createShadow(0,5,5,-3,0,8,10,1,0,3,14,2),createShadow(0,5,6,-3,0,9,12,1,0,3,16,2),createShadow(0,6,6,-3,0,10,14,1,0,4,18,3),createShadow(0,6,7,-4,0,11,15,1,0,4,20,3),createShadow(0,7,8,-4,0,12,17,2,0,5,22,4),createShadow(0,7,8,-4,0,13,19,2,0,5,24,4),createShadow(0,7,9,-4,0,14,21,2,0,5,26,4),createShadow(0,8,9,-5,0,15,22,2,0,6,28,5),createShadow(0,8,10,-5,0,16,24,2,0,6,30,5),createShadow(0,8,11,-5,0,17,26,2,0,6,32,5),createShadow(0,9,11,-5,0,18,28,2,0,7,34,6),createShadow(0,9,12,-6,0,19,29,2,0,7,36,6),createShadow(0,10,13,-6,0,20,31,3,0,8,38,7),createShadow(0,10,13,-6,0,21,33,3,0,8,40,7),createShadow(0,10,14,-6,0,22,35,3,0,8,42,7),createShadow(0,11,14,-7,0,23,36,3,0,9,44,8),createShadow(0,11,15,-7,0,24,38,3,0,9,46,8)],_excluded$O=["duration","easing","delay"],easing={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function formatMs(yt){return`${Math.round(yt)}ms`}function getAutoHeightDuration(yt){if(!yt)return 0;const _e=yt/36;return Math.round((4+15*_e**.25+_e/5)*10)}function createTransitions(yt){const _e=_extends$3({},easing,yt.easing),$t=_extends$3({},duration,yt.duration);return _extends$3({getAutoHeightDuration,create:(Vt=["all"],qt={})=>{const{duration:zt=$t.standard,easing:Ht=_e.easeInOut,delay:Kt=0}=qt;return _objectWithoutPropertiesLoose(qt,_excluded$O),(Array.isArray(Vt)?Vt:[Vt]).map(Gt=>`${Gt} ${typeof zt=="string"?zt:formatMs(zt)} ${Ht} ${typeof Kt=="string"?Kt:formatMs(Kt)}`).join(",")}},yt,{easing:_e,duration:$t})}const zIndex={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},_excluded$N=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function createTheme(yt={},..._e){const{mixins:$t={},palette:Ft={},transitions:Vt={},typography:qt={}}=yt,zt=_objectWithoutPropertiesLoose(yt,_excluded$N);if(yt.vars&&yt.generateCssVars===void 0)throw new Error(formatMuiErrorMessage$1(18));
55const Ht=createPalette(Ft),Kt=createTheme$2(yt);let Gt=deepmerge$1(Kt,{mixins:createMixins(Kt.breakpoints,$t),palette:Ht,shadows:shadows.slice(),typography:createTypography(Ht,qt),transitions:createTransitions(Vt),zIndex:_extends$3({},zIndex)});return Gt=deepmerge$1(Gt,zt),Gt=_e.reduce((Jt,Xt)=>deepmerge$1(Jt,Xt),Gt),Gt.unstable_sxConfig=_extends$3({},defaultSxConfig,zt==null?void 0:zt.unstable_sxConfig),Gt.unstable_sx=function(Xt){return styleFunctionSx$1({sx:Xt,theme:this})},Gt}const defaultTheme$1=createTheme();function useTheme(){const yt=useTheme$2(defaultTheme$1);return yt[THEME_ID]||yt}var createStyled$1={},objectWithoutPropertiesLoose={exports:{}},hasRequiredObjectWithoutPropertiesLoose;function requireObjectWithoutPropertiesLoose(){return hasRequiredObjectWithoutPropertiesLoose||(hasRequiredObjectWithoutPropertiesLoose=1,function(yt){function _e($t,Ft){if($t==null)return{};var Vt={};for(var qt in $t)if({}.hasOwnProperty.call($t,qt)){if(Ft.indexOf(qt)!==-1)continue;Vt[qt]=$t[qt]}return Vt}yt.exports=_e,yt.exports.__esModule=!0,yt.exports.default=yt.exports}(objectWithoutPropertiesLoose)),objectWithoutPropertiesLoose.exports}const require$$1$3=getAugmentedNamespace(styledEngine),require$$4$1=getAugmentedNamespace(deepmerge),require$$5=getAugmentedNamespace(capitalize),require$$6$1=getAugmentedNamespace(getDisplayName),require$$7=getAugmentedNamespace(createTheme$1),require$$8=getAugmentedNamespace(styleFunctionSx);var _interopRequireDefault=interopRequireDefaultExports;Object.defineProperty(createStyled$1,"__esModule",{value:!0});var _default$1=createStyled$1.default=createStyled;createStyled$1.shouldForwardProp=shouldForwardProp;createStyled$1.systemDefaultTheme=void 0;var _extends2=_interopRequireDefault(require_extends()),_objectWithoutPropertiesLoose2=_interopRequireDefault(requireObjectWithoutPropertiesLoose()),_styledEngine=_interopRequireWildcard(require$$1$3),_deepmerge=require$$4$1;_interopRequireDefault(require$$5);_interopRequireDefault(require$$6$1);var _createTheme=_interopRequireDefault(require$$7),_styleFunctionSx=_interopRequireDefault(require$$8);const _excluded$M=["ownerState"],_excluded2$5=["variants"],_excluded3$2=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function _getRequireWildcardCache(yt){if(typeof WeakMap!="function")return null;var _e=new WeakMap,$t=new WeakMap;return(_getRequireWildcardCache=function(Ft){return Ft?$t:_e})(yt)}function _interopRequireWildcard(yt,_e){if(yt&&yt.__esModule)return yt;if(yt===null||typeof yt!="object"&&typeof yt!="function")return{default:yt};var $t=_getRequireWildcardCache(_e);if($t&&$t.has(yt))return $t.get(yt);var Ft={__proto__:null},Vt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var qt in yt)if(qt!=="default"&&Object.prototype.hasOwnProperty.call(yt,qt)){var zt=Vt?Object.getOwnPropertyDescriptor(yt,qt):null;zt&&(zt.get||zt.set)?Object.defineProperty(Ft,qt,zt):Ft[qt]=yt[qt]}return Ft.default=yt,$t&&$t.set(yt,Ft),Ft}function isEmpty$2(yt){return Object.keys(yt).length===0}function isStringTag(yt){return typeof yt=="string"&&yt.charCodeAt(0)>96}function shouldForwardProp(yt){return yt!=="ownerState"&&yt!=="theme"&&yt!=="sx"&&yt!=="as"}const systemDefaultTheme=createStyled$1.systemDefaultTheme=(0,_createTheme.default)(),lowercaseFirstLetter=yt=>yt&&yt.charAt(0).toLowerCase()+yt.slice(1);function resolveTheme({defaultTheme:yt,theme:_e,themeId:$t}){return isEmpty$2(_e)?yt:_e[$t]||_e}function defaultOverridesResolver(yt){return yt?(_e,$t)=>$t[yt]:null}function processStyleArg(yt,_e){let{ownerState:$t}=_e,Ft=(0,_objectWithoutPropertiesLoose2.default)(_e,_excluded$M);const Vt=typeof yt=="function"?yt((0,_extends2.default)({ownerState:$t},Ft)):yt;if(Array.isArray(Vt))return Vt.flatMap(qt=>processStyleArg(qt,(0,_extends2.default)({ownerState:$t},Ft)));if(Vt&&typeof Vt=="object"&&Array.isArray(Vt.variants)){const{variants:qt=[]}=Vt;let Ht=(0,_objectWithoutPropertiesLoose2.default)(Vt,_excluded2$5);return qt.forEach(Kt=>{let Gt=!0;typeof Kt.props=="function"?Gt=Kt.props((0,_extends2.default)({ownerState:$t}
55,Ft,$t)):Object.keys(Kt.props).forEach(Jt=>{($t==null?void 0:$t[Jt])!==Kt.props[Jt]&&Ft[Jt]!==Kt.props[Jt]&&(Gt=!1)}),Gt&&(Array.isArray(Ht)||(Ht=[Ht]),Ht.push(typeof Kt.style=="function"?Kt.style((0,_extends2.default)({ownerState:$t},Ft,$t)):Kt.style))}),Ht}return Vt}function createStyled(yt={}){const{themeId:_e,defaultTheme:$t=systemDefaultTheme,rootShouldForwardProp:Ft=shouldForwardProp,slotShouldForwardProp:Vt=shouldForwardProp}=yt,qt=zt=>(0,_styleFunctionSx.default)((0,_extends2.default)({},zt,{theme:resolveTheme((0,_extends2.default)({},zt,{defaultTheme:$t,themeId:_e}))}));return qt.__mui_systemSx=!0,(zt,Ht={})=>{(0,_styledEngine.internal_processStyles)(zt,xr=>xr.filter(Sr=>!(Sr!=null&&Sr.__mui_systemSx)));const{name:Kt,slot:Gt,skipVariantsResolver:Jt,skipSx:Xt,overridesResolver:Zt=defaultOverridesResolver(lowercaseFirstLetter(Gt))}=Ht,er=(0,_objectWithoutPropertiesLoose2.default)(Ht,_excluded3$2),tr=Jt!==void 0?Jt:Gt&&Gt!=="Root"&&Gt!=="root"||!1,rr=Xt||!1;let ar,nr=shouldForwardProp;Gt==="Root"||Gt==="root"?nr=Ft:Gt?nr=Vt:isStringTag(zt)&&(nr=void 0);const cr=(0,_styledEngine.default)(zt,(0,_extends2.default)({shouldForwardProp:nr,label:ar},er)),fr=xr=>typeof xr=="function"&&xr.__emotion_real!==xr||(0,_deepmerge.isPlainObject)(xr)?Sr=>processStyleArg(xr,(0,_extends2.default)({},Sr,{theme:resolveTheme({theme:Sr.theme,defaultTheme:$t,themeId:_e})})):xr,vr=(xr,...Sr)=>{let Tr=fr(xr);const Br=Sr?Sr.map(fr):[];Kt&&Zt&&Br.push(yr=>{const sr=resolveTheme((0,_extends2.default)({},yr,{defaultTheme:$t,themeId:_e}));if(!sr.components||!sr.components[Kt]||!sr.components[Kt].styleOverrides)return null;const or=sr.components[Kt].styleOverrides,Qt={};return Object.entries(or).forEach(([ir,ur])=>{Qt[ir]=processStyleArg(ur,(0,_extends2.default)({},yr,{theme:sr}))}),Zt(yr,Qt)}),Kt&&!tr&&Br.push(yr=>{var sr;const or=resolveTheme((0,_extends2.default)({},yr,{defaultTheme:$t,themeId:_e})),Qt=or==null||(sr=or.components)==null||(sr=sr[Kt])==null?void 0:sr.variants;return processStyleArg({variants:Qt},(0,_extends2.default)({},yr,{theme:or}))}),rr||Br.push(qt);const jr=Br.length-Sr.length;if(Array.isArray(xr)&&jr>0){const yr=new Array(jr).fill("");Tr=[...xr,...yr],Tr.raw=[...xr.raw,...yr]}const Rr=cr(Tr,...Br);return zt.muiName&&(Rr.muiName=zt.muiName),Rr};return cr.withConfig&&(vr.withConfig=cr.withConfig),vr}}function slotShouldForwardProp(yt){return yt!=="ownerState"&&yt!=="theme"&&yt!=="sx"&&yt!=="as"}const rootShouldForwardProp=yt=>slotShouldForwardProp(yt)&&yt!=="classes",styled=_default$1({themeId:THEME_ID,defaultTheme:defaultTheme$1,rootShouldForwardProp}),_excluded$L=["theme"];function ThemeProvider(yt){let{theme:_e}=yt,$t=_objectWithoutPropertiesLoose(yt,_excluded$L);const Ft=_e[THEME_ID];let Vt=Ft||_e;return typeof _e!="function"&&(Ft&&!Ft.vars?Vt=_extends$3({},Ft,{vars:null}):_e&&!_e.vars&&(Vt=_extends$3({},_e,{vars:null}))),jsxRuntimeExports.jsx(ThemeProvider$1,_extends$3({},$t,{themeId:Ft?THEME_ID:void 0,theme:Vt}))}const getOverlayAlpha=yt=>{let _e;return yt<1?_e=5.11916*yt**2:_e=4.5*Math.log(yt+1)+2,(_e/100).toFixed(2)};function useDefaultProps(yt){return useDefaultProps$1(yt)}function getSvgIconUtilityClass(yt){return generateUtilityClass("MuiSvgIcon",yt)}generateUtilityClasses("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const _excluded$K=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],useUtilityClasses$D=yt=>{const{color:_e,fontSize:$t,classes:Ft}=yt,Vt={root:["root",_e!=="inherit"&&`color${capitalize$1(_e)}`,`fontSize${capitalize$1($t)}`]};return composeClasses(Vt,getSvgIconUtilityClass,Ft)},SvgIconRoot=styled("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,$t.color!=="inherit"&&_e[`color${capitalize$1($t.color)}`],_e[`fontSize${capitalize$1($t.fontSize)}`]]}})(({theme:yt,ownerState:_e})=>{var $t,Ft,Vt,qt,zt,Ht,Kt,Gt,Jt,Xt,Zt,er,tr;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:_e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:($t=yt.transitions)==null||(Ft=$t.create)==null?void 0:Ft.call($t,"fill",{duration:(Vt=yt.transitions)==null||(Vt=Vt.duration)==null?void 0:Vt.shorter}),fontSize:{inherit:"inherit",small:((qt=yt.typography)==null||(zt=qt.pxToRem)==null?void 0:zt.call(qt,20))||"1.25rem",medium:((Ht=yt.typography)==null||(Kt=Ht.pxToRem)==null?void 0:Kt.call(Ht,24))||"1.5rem",large:((Gt=yt.typography)==null||(Jt=Gt.pxToRem)==null?void 0:Jt.call(Gt,35))||"2.1875rem"}[_e.fontSize],color:(Xt=(Zt=(yt.vars||yt).palette)==null||(Zt=Zt[_e.color])==null?void 0:Zt.main)!=null?Xt:{action:(er=(yt.vars||yt).palette)==null||(er=er.action)==null?void 0:er.active,disabled:(tr=(yt.vars||yt).palette)==null||(tr=tr.action)==null?void 0:tr.disabled,inherit:void 0}[_e.color]}}),SvgIcon=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiSvgIcon"}),{children:Vt,className:qt,color:zt="inherit",component:Ht="svg",fontSize:Kt="medium",htmlColor:Gt,inheritViewBox:Jt=!1,titleAccess:Xt,viewBox:Zt="0 0 24 24"}=Ft,er=_objectWithoutPropertiesLoose(Ft,_excluded$K),tr=reactExports.isValidElement(Vt)&&Vt.type==="svg",rr=_extends$3({},Ft,{color:zt,component:Ht,fontSize:Kt,instanceFontSize:_e.fontSize,inheritViewBox:Jt,viewBox:Zt,hasSvgAsChild:tr}),ar={};Jt||(ar.viewBox=Zt);const nr=useUtilityClasses$D(rr);return jsxRuntimeExports.jsxs(SvgIconRoot,_extends$3({as:Ht,className:clsx$1(nr.root,qt),focusable:"false",color:Gt,"aria-hidden":Xt?void 0:!0,role:Xt?"img":void 0,ref:$t},ar,er,tr&&Vt.props,{ownerState:rr,children:[tr?Vt.props.children:Vt,Xt?jsxRuntimeExports.jsx("title",{children:Xt}):null]}))});SvgIcon.muiName="SvgIcon";function createSvgIcon(yt,_e){function $t(Ft,Vt){return jsxRuntimeExports.jsx(SvgIcon,_extends$3({"data-testid":`${_e}Icon`,ref:Vt},Ft,{children:yt}))}return $t.muiName=SvgIcon.muiName,reactExports.memo(reactExports.forwardRef($t))}function _setPrototypeOf(yt,_e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function($t,Ft){return $t.__proto__=Ft,$t},_setPrototypeOf(yt,_e)}function _inheritsLoose(yt,_e){yt.prototype=Object.create(_e.prototype),yt.prototype.constructor=yt,_setPrototypeOf(yt,_e)}const config={disabled:!1},TransitionGroupContext=React$2.createContext(null);var forceReflow=function(_e){return _e.scrollTop},UNMOUNTED="unmounted",EXITED="exited",ENTERING="entering",ENTERED="entered",EXITING="exiting",Transition=function(yt){_inheritsLoose(_e,yt);function _e(Ft,Vt){var qt;qt=yt.call(this,Ft,Vt)||this;var zt=Vt,Ht=zt&&!zt.isMounting?Ft.enter:Ft.appear,Kt;return qt.appearStatus=null,Ft.in?Ht?(Kt=EXITED,qt.appearStatus=ENTERING):Kt=ENTERED:Ft.unmountOnExit||Ft.mountOnEnter?Kt=UNMOUNTED:Kt=EXITED,qt.state={status:Kt},qt.nextCallback=null,qt}_e.getDerivedStateFromProps=function(Vt,qt){var zt=Vt.in;return zt&&qt.status===UNMOUNTED?{status:EXITED}:null};var $t=_e.prototype;return $t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},$t.componentDidUpdate=function(Vt){var qt=null;if(Vt!==this.props){var zt=this.state.status;this.props.in?zt!==ENTERING&&zt!==ENTERED&&(qt=ENTERING):(zt===ENTERING||zt===ENTERED)&&(qt=EXITING)}this.updateStatus(!1,qt)},$t.componentWillUnmount=function(){this.cancelNextCallback()},$t.getTimeouts=function(){var Vt=this.props.timeout,qt,zt,Ht;return qt=zt=Ht=Vt,Vt!=null&&typeof Vt!="number"&&(qt=Vt.exit,zt=Vt.enter,Ht=Vt.a
vendor: 4,392 bytes, line 55
55ppear!==void 0?Vt.appear:zt),{exit:qt,enter:zt,appear:Ht}},$t.updateStatus=function(Vt,qt){if(Vt===void 0&&(Vt=!1),qt!==null)if(this.cancelNextCallback(),qt===ENTERING){if(this.props.unmountOnExit||this.props.mountOnEnter){var zt=this.props.nodeRef?this.props.nodeRef.current:ReactDOM.findDOMNode(this);zt&&forceReflow(zt)}this.performEnter(Vt)}else this.performExit();else this.props.unmountOnExit&&this.state.status===EXITED&&this.setState({status:UNMOUNTED})},$t.performEnter=function(Vt){var qt=this,zt=this.props.enter,Ht=this.context?this.context.isMounting:Vt,Kt=this.props.nodeRef?[Ht]:[ReactDOM.findDOMNode(this),Ht],Gt=Kt[0],Jt=Kt[1],Xt=this.getTimeouts(),Zt=Ht?Xt.appear:Xt.enter;if(!Vt&&!zt||config.disabled){this.safeSetState({status:ENTERED},function(){qt.props.onEntered(Gt)});return}this.props.onEnter(Gt,Jt),this.safeSetState({status:ENTERING},function(){qt.props.onEntering(Gt,Jt),qt.onTransitionEnd(Zt,function(){qt.safeSetState({status:ENTERED},function(){qt.props.onEntered(Gt,Jt)})})})},$t.performExit=function(){var Vt=this,qt=this.props.exit,zt=this.getTimeouts(),Ht=this.props.nodeRef?void 0:ReactDOM.findDOMNode(this);if(!qt||config.disabled){this.safeSetState({status:EXITED},function(){Vt.props.onExited(Ht)});return}this.props.onExit(Ht),this.safeSetState({status:EXITING},function(){Vt.props.onExiting(Ht),Vt.onTransitionEnd(zt.exit,function(){Vt.safeSetState({status:EXITED},function(){Vt.props.onExited(Ht)})})})},$t.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},$t.safeSetState=function(Vt,qt){qt=this.setNextCallback(qt),this.setState(Vt,qt)},$t.setNextCallback=function(Vt){var qt=this,zt=!0;return this.nextCallback=function(Ht){zt&&(zt=!1,qt.nextCallback=null,Vt(Ht))},this.nextCallback.cancel=function(){zt=!1},this.nextCallback},$t.onTransitionEnd=function(Vt,qt){this.setNextCallback(qt);var zt=this.props.nodeRef?this.props.nodeRef.current:ReactDOM.findDOMNode(this),Ht=Vt==null&&!this.props.addEndListener;if(!zt||Ht){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var Kt=this.props.nodeRef?[this.nextCallback]:[zt,this.nextCallback],Gt=Kt[0],Jt=Kt[1];this.props.addEndListener(Gt,Jt)}Vt!=null&&setTimeout(this.nextCallback,Vt)},$t.render=function(){var Vt=this.state.status;if(Vt===UNMOUNTED)return null;var qt=this.props,zt=qt.children;qt.in,qt.mountOnEnter,qt.unmountOnExit,qt.appear,qt.enter,qt.exit,qt.timeout,qt.addEndListener,qt.onEnter,qt.onEntering,qt.onEntered,qt.onExit,qt.onExiting,qt.onExited,qt.nodeRef;var Ht=_objectWithoutPropertiesLoose(qt,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return React$2.createElement(TransitionGroupContext.Provider,{value:null},typeof zt=="function"?zt(Vt,Ht):React$2.cloneElement(React$2.Children.only(zt),Ht))},_e}(React$2.Component);Transition.contextType=TransitionGroupContext;Transition.propTypes={};function noop$4(){}Transition.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:noop$4,onEntering:noop$4,onEntered:noop$4,onExit:noop$4,onExiting:noop$4,onExited:noop$4};Transition.UNMOUNTED=UNMOUNTED;Transition.EXITED=EXITED;Transition.ENTERING=ENTERING;Transition.ENTERED=ENTERED;Transition.EXITING=EXITING;function _assertThisInitialized(yt){if(yt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return yt}function getChildMapping(yt,_e){var $t=function(qt){return _e&&reactExports.isValidElement(qt)?_e(qt):qt},Ft=Object.create(null);return yt&&reactExports.Children.map(yt,function(Vt){return Vt}).forEach(function(Vt){Ft[Vt.key]=$t(Vt)}),Ft}function mergeChildMappings(yt,_e){yt=yt||{},_e=_e||{};function $t(Jt){return Jt in _e?_e[Jt]:yt[Jt]}var Ft=Object.create(null),Vt=[];for(var qt in yt)qt in _e?Vt.length&&(Ft[qt]=Vt,Vt=[]):Vt.push(qt);var zt,Ht={};for(var Kt in _e){if(Ft[Kt])for(zt=0;zt<Ft[Kt].length;zt++){var Gt=Ft[Kt][zt];Ht[Ft[Kt][zt]]=$t(Gt)}Ht[Kt]=$t(Kt)}for(zt=0;zt<Vt.length;zt++)Ht[Vt[zt]]=$t(Vt[zt]);return Ht}function getProp(yt,_e,$t){return $t[_e]!=null?$t[_e]:yt.props[_e]}function getInitialChildMapping(yt,_e){return getChildMapping(yt.children,function($t){return reactExports.cloneElement($t,{onExited:_e.bind(null,$t),in:!0,appear:getProp($t,"appear",yt),enter
vendor: 15,396 bytes, lines 55-128
55:getProp($t,"enter",yt),exit:getProp($t,"exit",yt)})})}function getNextChildMapping(yt,_e,$t){var Ft=getChildMapping(yt.children),Vt=mergeChildMappings(_e,Ft);return Object.keys(Vt).forEach(function(qt){var zt=Vt[qt];if(reactExports.isValidElement(zt)){var Ht=qt in _e,Kt=qt in Ft,Gt=_e[qt],Jt=reactExports.isValidElement(Gt)&&!Gt.props.in;Kt&&(!Ht||Jt)?Vt[qt]=reactExports.cloneElement(zt,{onExited:$t.bind(null,zt),in:!0,exit:getProp(zt,"exit",yt),enter:getProp(zt,"enter",yt)}):!Kt&&Ht&&!Jt?Vt[qt]=reactExports.cloneElement(zt,{in:!1}):Kt&&Ht&&reactExports.isValidElement(Gt)&&(Vt[qt]=reactExports.cloneElement(zt,{onExited:$t.bind(null,zt),in:Gt.props.in,exit:getProp(zt,"exit",yt),enter:getProp(zt,"enter",yt)}))}}),Vt}var values=Object.values||function(yt){return Object.keys(yt).map(function(_e){return yt[_e]})},defaultProps={component:"div",childFactory:function(_e){return _e}},TransitionGroup=function(yt){_inheritsLoose(_e,yt);function _e(Ft,Vt){var qt;qt=yt.call(this,Ft,Vt)||this;var zt=qt.handleExited.bind(_assertThisInitialized(qt));return qt.state={contextValue:{isMounting:!0},handleExited:zt,firstRender:!0},qt}var $t=_e.prototype;return $t.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},$t.componentWillUnmount=function(){this.mounted=!1},_e.getDerivedStateFromProps=function(Vt,qt){var zt=qt.children,Ht=qt.handleExited,Kt=qt.firstRender;return{children:Kt?getInitialChildMapping(Vt,Ht):getNextChildMapping(Vt,zt,Ht),firstRender:!1}},$t.handleExited=function(Vt,qt){var zt=getChildMapping(this.props.children);Vt.key in zt||(Vt.props.onExited&&Vt.props.onExited(qt),this.mounted&&this.setState(function(Ht){var Kt=_extends$3({},Ht.children);return delete Kt[Vt.key],{children:Kt}}))},$t.render=function(){var Vt=this.props,qt=Vt.component,zt=Vt.childFactory,Ht=_objectWithoutPropertiesLoose(Vt,["component","childFactory"]),Kt=this.state.contextValue,Gt=values(this.state.children).map(zt);return delete Ht.appear,delete Ht.enter,delete Ht.exit,qt===null?React$2.createElement(TransitionGroupContext.Provider,{value:Kt},Gt):React$2.createElement(TransitionGroupContext.Provider,{value:Kt},React$2.createElement(qt,Ht,Gt))},_e}(React$2.Component);TransitionGroup.propTypes={};TransitionGroup.defaultProps=defaultProps;const reflow=yt=>yt.scrollTop;function getTransitionProps(yt,_e){var $t,Ft;const{timeout:Vt,easing:qt,style:zt={}}=yt;return{duration:($t=zt.transitionDuration)!=null?$t:typeof Vt=="number"?Vt:Vt[_e.mode]||0,easing:(Ft=zt.transitionTimingFunction)!=null?Ft:typeof qt=="object"?qt[_e.mode]:qt,delay:zt.transitionDelay}}function getPaperUtilityClass(yt){return generateUtilityClass("MuiPaper",yt)}generateUtilityClasses("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const _excluded$J=["className","component","elevation","square","variant"],useUtilityClasses$C=yt=>{const{square:_e,elevation:$t,variant:Ft,classes:Vt}=yt,qt={root:["root",Ft,!_e&&"rounded",Ft==="elevation"&&`elevation${$t}`]};return composeClasses(qt,getPaperUtilityClass,Vt)},PaperRoot=styled("div",{name:"MuiPaper",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,_e[$t.variant],!$t.square&&_e.rounded,$t.variant==="elevation"&&_e[`elevation${$t.elevation}`]]}})(({theme:yt,ownerState:_e})=>{var $t;return _extends$3({backgroundColor:(yt.vars||yt).palette.background.paper,color:(yt.vars||yt).palette.text.primary,transition:yt.transitions.create("box-shadow")},!_e.square&&{borderRadius:yt.shape.borderRadius},_e.variant==="outlined"&&{border:`1px solid ${(yt.vars||yt).palette.divider}`},_e.variant==="elevation"&&_extends$3({boxShadow:(yt.vars||yt).shadows[_e.elevation]},!yt.vars&&yt.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${alpha_1("#fff",getOverlayAlpha(_e.elevation))}, ${alpha_1("#fff",getOverlayAlpha(_e.elevation))})`},yt.vars&&{backgroundImage:($t=yt.vars.overlays)==null?void 0:$t[_e.elevation]}))}),Paper=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiPaper"}),{className:Vt,component:qt="div",elevation:zt=1,square:Ht=!1,variant:Kt="elevation"}=Ft,Gt=_objectWithoutPropertiesLoose(Ft,_excluded$J),Jt=_extends$3({},Ft,{component:qt,elevation:zt,square:Ht,variant:Kt}),Xt=useUtilityClasses$C(Jt);return jsxRuntimeExports.jsx(PaperRoot,_extends$3({as:qt,ownerState:Jt,className:clsx$1(Xt.root,Vt),ref:$t},Gt))}),_excluded$I=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],_excluded2$4=["component","slots","slotProps"],_excluded3$1=["component"];function useSlot(yt,_e){const{className:$t,elementType:Ft,ownerState:Vt,externalForwardedProps:qt,getSlotOwnerState:zt,internalForwardedProps:Ht}=_e,Kt=_objectWithoutPropertiesLoose(_e,_excluded$I),{component:Gt,slots:Jt={[yt]:void 0},slotProps:Xt={[yt]:void 0}}=qt,Zt=_objectWithoutPropertiesLoose(qt,_excluded2$4),er=Jt[yt]||Ft,tr=resolveComponentProps(Xt[yt],Vt),rr=mergeSlotProps(_extends$3({className:$t},Kt,{externalForwardedProps:yt==="root"?Zt:void 0,externalSlotProps:tr})),{props:{component:ar},internalRef:nr}=rr,cr=_objectWithoutPropertiesLoose(rr.props,_excluded3$1),fr=useForkRef(nr,tr==null?void 0:tr.ref,_e.ref),vr=zt?zt(cr):{},xr=_extends$3({},Vt,vr),Sr=yt==="root"?ar||Gt:ar,Tr=appendOwnerState(er,_extends$3({},yt==="root"&&!Gt&&!Jt[yt]&&Ht,yt!=="root"&&!Jt[yt]&&Ht,cr,Sr&&{as:Sr},{ref:fr}),xr);return Object.keys(vr).forEach(Br=>{delete Tr[Br]}),[er,Tr]}function Ripple(yt){const{className:_e,classes:$t,pulsate:Ft=!1,rippleX:Vt,rippleY:qt,rippleSize:zt,in:Ht,onExited:Kt,timeout:Gt}=yt,[Jt,Xt]=reactExports.useState(!1),Zt=clsx$1(_e,$t.ripple,$t.rippleVisible,Ft&&$t.ripplePulsate),er={width:zt,height:zt,top:-(zt/2)+qt,left:-(zt/2)+Vt},tr=clsx$1($t.child,Jt&&$t.childLeaving,Ft&&$t.childPulsate);return!Ht&&!Jt&&Xt(!0),reactExports.useEffect(()=>{if(!Ht&&Kt!=null){const rr=setTimeout(Kt,Gt);return()=>{clearTimeout(rr)}}},[Kt,Ht,Gt]),jsxRuntimeExports.jsx("span",{className:Zt,style:er,children:jsxRuntimeExports.jsx("span",{className:tr})})}const touchRippleClasses=generateUtilityClasses("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),_excluded$H=["center","classes","className"];let _$3=yt=>yt,_t$3,_t2$2,_t3$2,_t4$2;const DURATION=550,DELAY_RIPPLE=80,enterKeyframe=keyframes$1(_t$3||(_t$3=_$3` 56 0% { 57 transform: scale(0); 58 opacity: 0.1; 59 } 60 61 100% { 62 transform: scale(1); 63 opacity: 0.3; 64 } 65`)),exitKeyframe=keyframes$1(_t2$2||(_t2$2=_$3` 66 0% { 67 opacity: 1; 68 } 69 70 100% { 71 opacity: 0; 72 } 73`)),pulsateKeyframe=keyframes$1(_t3$2||(_t3$2=_$3` 74 0% { 75 transform: scale(1); 76 } 77 78 50% { 79 transform: scale(0.92); 80 } 81 82 100% { 83 transform: scale(1); 84 } 85`)),TouchRippleRoot=styled("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),TouchRippleRipple=styled(Ripple,{name:"MuiTouchRipple",slot:"Ripple"})(_t4$2||(_t4$2=_$3` 86 opacity: 0; 87 position: absolute; 88 89 &.${0} { 90 opacity: 0.3; 91 transform: scale(1); 92 animation-name: ${0}; 93 animation-duration: ${0}ms; 94 animation-timing-function: ${0}; 95 } 96 97 &.${0} { 98 animation-duration: ${0}ms; 99 } 100 101 & .${0} { 102 opacity: 1; 103 display: block; 104 width: 100%; 105 height: 100%; 106 border-radius: 50%; 107 background-color: currentColor; 108 } 109 110 & .${0} { 111 opacity: 0; 112 animation-name: ${0}; 113 animation-duration: ${0}ms; 114 animation-timing-function: ${0}; 115 } 116 117 & .${0} { 118 position: absolute; 119 /* @noflip */ 120 left: 0px; 121 top: 0; 122 animation-name: ${0}; 123 animation-duration: 2500ms; 124 animation-timing-function: ${0}; 125 animation-iteration-count: infinite; 126 animation-delay: 200ms; 127 } 128`),touchRippleClasses.rippleVisible,enterKeyframe,DURATION,({theme:yt})=>yt.transitions.easing.easeInOut,touchRippleClasses.ripplePulsate,({theme:yt})=>yt.transitions.duration.shorter,touchRippleClasses.child,touchRippleClasses.childLeaving,exitKeyframe,DURATION,({theme:yt})=>yt.transitions.easing.easeInOut,touchRippleClasses.childPulsate,pulsateKeyframe,({theme:yt})=>yt.transitions.easing.easeInOut),TouchRipple=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiTouchRipple"}),{center:Vt=!1,classes:qt={},className:zt}=Ft,Ht=_objectWithoutPropertiesLoose(Ft,_excluded$H),[Kt,Gt]=reactExports.useState([]),Jt=reactExports.useRef(0),Xt=reactExports.useRef(null);reactExports.useEffect(()=>{Xt.current&&(Xt.current(),Xt.current=null)},[Kt]);const Zt=reactExports.useRef(!1),er=useTimeout(),tr=reactExports.useRef(null),rr=reactExports.useRef(null),ar=reactExports.useCallback(vr=>{const{pulsate:xr,rippleX:Sr,rippleY:Tr,rippleSize:Br,cb:jr}=vr;Gt(Rr=>[...Rr,jsxRuntimeExports.jsx(TouchRippleRipple,{classes:{ripple:clsx$1(qt.ripple,touchRippleClasses.ripple),rippleVisible:clsx$1(qt.rippleVisible,touchRippleClasses.rippleVisible),ripplePulsate:clsx$1(qt.ripplePulsate,touchRippleClasses.ripplePulsate),child:clsx$1(qt.child,touchRippleClasses.child),childLeaving:clsx$1(qt.childLeaving,touchRippleClasses.childLeaving),childPulsate:clsx$1(qt.childPulsate,touchRippleClasses.childPulsate)},timeout:DURATION,pulsate:xr,rippleX:Sr,rippleY:Tr,rippleSize:Br},Jt.current)]),Jt.current+=1,Xt.current=jr},[qt]),nr=reactExports.useCallback((vr={},xr={},Sr=()=>{})=>{const{pulsate:Tr=!1,center:Br=Vt||xr.pulsate,fakeElement:jr=!1}=xr;if((vr==null?void 0:vr.type)==="mousedown"&&Zt.current){Zt.current=!1;return}(vr==null?void 0:vr.type)==="touchstart"&&(Zt.current=!0);const Rr=jr?null:rr.current,yr=Rr?Rr.getBoundingClientRect():{width:0,height:0,left:0,top:0};let sr,or,Qt;if(Br||vr===void 0||vr.clientX===0&&vr.clientY===0||!vr.clientX&&!vr.touches)sr=Math.round(yr.width/2),or=Math.round(yr.height/2);else{const{clientX:ir,clientY:ur}=vr.touches&&vr.touches.length>0?vr.touches[0]:vr;sr=Math.round(ir-yr.left),or=Math.round(ur-yr.top)}if(Br)Qt=Math.sqrt((2*yr.width**2+yr.height**2)/3),Qt%2===0&&(Qt+=1);else{const ir=Math.max(Math.abs((Rr?Rr.clientWidth:0)-sr),sr)*2+2,ur=Math.max(Math.abs((Rr?Rr.clientHeight:0)-or),or)*2+2;Qt=Math.sqrt(ir**2+ur**2)}vr!=null&&vr.touches?tr.current===null&&(tr.current=()=>{ar({pulsate:Tr,rippleX:sr,rippleY:or,rippleSize:Qt,cb:Sr})},er.start(DELAY_RIPPLE,()=>{tr.current&&(tr.current(),tr.current=null)})):ar({pulsate:Tr,rippleX:sr,rippleY:or,rippleSize:Qt,cb:Sr})},[Vt,ar,er]),cr=reactExports.useCallback(()=>{nr({},{pulsate:!0})},[nr]),fr=reactExports.useCallback((vr,xr)=>{if(er.clear(),(vr==null?void 0:vr.type)==="touchend"&&tr.current){tr.current(),tr.current=null,er.start(0,()=>{fr(vr,xr)});return}tr.current=null,Gt(Sr=>Sr.length>0?Sr.slice(1):Sr),Xt.current=xr},[er]);return reactExports.useImperativeHandle($t,()=>({pulsate:cr,start:nr,stop:fr}),[cr,nr,fr]),jsxRuntimeExports.jsx(TouchRippleRoot,_extends$3({className:clsx$1(touchRippleClasses.root,qt.root,zt),ref:rr},Ht,{children:jsxRuntimeExports.jsx(TransitionGroup,{component:null,exit:!0,children:Kt})}))});function getButtonBaseUtilityClass(yt){return generateUtilityClass("MuiButtonBase",yt)}const buttonBaseClasses=generateUtilityClasses("MuiButtonBase",["root","disabled","focusVisible"]),_excluded$G=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],useUtilityClasses$B=yt=>{const{disabled:_e,focusVisible:$t,focusVisibleClassName:Ft,classes:Vt}=yt,zt=composeClasses({root:["root",_e&&"disabled",$t&&"focusVisible"]},getButtonBaseUtilityClass,Vt);return $t&&Ft&&(zt.root+=` ${Ft}`),zt},ButtonBaseRoot=styled("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(yt,_e)=>_e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${buttonBaseClasses.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ButtonBase=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiButtonBase"}),{action:Vt,centerRipple:qt=!1,children:zt,className:Ht,component:Kt="button",disabled:Gt=!1,disableRipple:Jt=!1,disableTouchRipple:Xt=!1,focusRipple:Zt=!1,LinkComponent:er="a",onBlur:tr,onClick:rr,onContextMenu:ar,onDragLeave:nr,onFocus:cr,onFocusVisible:fr,onKeyDown:vr,onKeyUp:xr,onMouseDown:Sr,onMouseLeave:Tr,onMouseUp:Br,onTouchEnd:jr,onTouchMove:Rr,onTouchStart:yr,tabIndex:sr=0,TouchRippleProps:or,touchRippleRef:Qt,type:ir}=Ft,ur=_objectWithoutPropertiesLoose(Ft,_excluded$G),gr=reactExports.useRef(null),dr=reactExports.useRef(null),lr=useForkRef(dr,Qt),{isFocusVisibleRef:hr,onFocus:wr,onBlur:pr,ref:br}=useIsFocusVisible(),[Dr,_r]=reactExports.useState(!1);Gt&&Dr&&_r(!1),reactExports.useImperativeHandle(Vt,()=>({focusVisible:()=>{_r(!0),gr.current.focus()}}),[]);const[Nr,kr]=reactExports.useState(!1);reactExports.useEffect(()=>{kr(!0)},[]);const Mr=Nr&&!Jt&&!Gt;reactExports.useEffect(()=>{Dr&&Zt&&!Jt&&Nr&&dr.current.pulsate()},[Jt,Zt,Dr,Nr]);function Lr(dn,Ur,Ir=Xt){return useEventCallback(Pr=>(Ur&&Ur(Pr),!Ir&&dr.current&&dr.current[dn](Pr),!0))}const Cr=Lr("start",Sr),Er=Lr("stop",ar),Ar=Lr("stop",nr),zr=Lr("stop",Br),Vr=Lr("stop",dn=>{Dr&&dn.preventDefault(),Tr&&Tr(dn)}),Gr=Lr("start",yr),tn=Lr("stop",jr),Yr=Lr("stop",Rr),Jr=Lr("stop",dn=>{pr(dn),hr.current===!1&&_r(!1),tr&&tr(dn)},!1),Kr=useEventCallback(dn=>{gr.current||(gr.current=dn.currentTarget),wr(dn),hr.current===!0&&(_r(!0),fr&&fr(dn)),cr&&cr(dn)}),Xr=()=>{const dn=gr.current;return Kt&&Kt!=="button"&&!(dn.tagName==="A"&&dn.href)},Qr=reactExports.useRef(!1),un=useEventCallback(dn=>{Zt&&!Qr.current&&Dr&&dr.current&&dn.key===" "&&(Qr.current=!0,dr.current.stop(dn,()=>{dr.current.start(dn)})),dn.target===dn.currentTarget&&Xr()&&dn.key===" "&&dn.preventDefault(),vr&&vr(dn),dn.target===dn.currentTarget&&Xr()&&dn.key==="Enter"&&!Gt&&(dn.preventDefault(),rr&&rr(dn))}),an=useEventCallback(dn=>{Zt&&dn.key===" "&&dr.current&&Dr&&!dn.defaultPrevented&&(Qr.current=!1,dr.current.stop(dn,()=>{dr.current.pulsate(dn)})),xr&&xr(dn),rr&&dn.target===dn.currentTarget&&Xr()&&dn.key===" "&&!dn.defaultPrevented&&rr(dn)});let sn=Kt;sn==="button"&&(ur.href||ur.to)&&(sn=er);const vn={};sn==="button"?(vn.type=ir===void 0?"button":ir,vn.disabled=Gt):(!ur.href&&!ur.to&&(vn.role="button"),Gt&&(vn["aria-disabled"]=Gt));const gn=useForkRef($t,br,gr),fn=_extends$3({},Ft,{centerRipple:qt,component:Kt,disabled:Gt,disableRipple:Jt,disableTouchRipple:Xt,focusRipple:Zt,tabIndex:sr,focusVisible:Dr}
128),wn=useUtilityClasses$B(fn);return jsxRuntimeExports.jsxs(ButtonBaseRoot,_extends$3({as:sn,className:clsx$1(wn.root,Ht),ownerState:fn,onBlur:Jr,onClick:rr,onContextMenu:Er,onFocus:Kr,onKeyDown:un,onKeyUp:an,onMouseDown:Cr,onMouseLeave:Vr,onMouseUp:zr,onDragLeave:Ar,onTouchEnd:tn,onTouchMove:Yr,onTouchStart:Gr,ref:gn,tabIndex:Gt?-1:sr,type:ir},vn,ur,{children:[zt,Mr?jsxRuntimeExports.jsx(TouchRipple,_extends$3({ref:lr,center:qt},or)):null]}))});function getAlertUtilityClass(yt){return generateUtilityClass("MuiAlert",yt)}const alertClasses=generateUtilityClasses("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function getIconButtonUtilityClass(yt){return generateUtilityClass("MuiIconButton",yt)}const iconButtonClasses=generateUtilityClasses("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),_excluded$F=["edge","children","className","color","disabled","disableFocusRipple","size"],useUtilityClasses$A=yt=>{const{classes:_e,disabled:$t,color:Ft,edge:Vt,size:qt}=yt,zt={root:["root",$t&&"disabled",Ft!=="default"&&`color${capitalize$1(Ft)}`,Vt&&`edge${capitalize$1(Vt)}`,`size${capitalize$1(qt)}`]};return composeClasses(zt,getIconButtonUtilityClass,_e)},IconButtonRoot=styled(ButtonBase,{name:"MuiIconButton",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,$t.color!=="default"&&_e[`color${capitalize$1($t.color)}`],$t.edge&&_e[`edge${capitalize$1($t.edge)}`],_e[`size${capitalize$1($t.size)}`]]}})(({theme:yt,ownerState:_e})=>_extends$3({textAlign:"center",flex:"0 0 auto",fontSize:yt.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(yt.vars||yt).palette.action.active,transition:yt.transitions.create("background-color",{duration:yt.transitions.duration.shortest})},!_e.disableRipple&&{"&:hover":{backgroundColor:yt.vars?`rgba(${yt.vars.palette.action.activeChannel} / ${yt.vars.palette.action.hoverOpacity})`:alpha_1(yt.palette.action.active,yt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},_e.edge==="start"&&{marginLeft:_e.size==="small"?-3:-12},_e.edge==="end"&&{marginRight:_e.size==="small"?-3:-12}),({theme:yt,ownerState:_e})=>{var $t;const Ft=($t=(yt.vars||yt).palette)==null?void 0:$t[_e.color];return _extends$3({},_e.color==="inherit"&&{color:"inherit"},_e.color!=="inherit"&&_e.color!=="default"&&_extends$3({color:Ft==null?void 0:Ft.main},!_e.disableRipple&&{"&:hover":_extends$3({},Ft&&{backgroundColor:yt.vars?`rgba(${Ft.mainChannel} / ${yt.vars.palette.action.hoverOpacity})`:alpha_1(Ft.main,yt.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),_e.size==="small"&&{padding:5,fontSize:yt.typography.pxToRem(18)},_e.size==="large"&&{padding:12,fontSize:yt.typography.pxToRem(28)},{[`&.${iconButtonClasses.disabled}`]:{backgroundColor:"transparent",color:(yt.vars||yt).palette.action.disabled}})}),IconButton=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiIconButton"}),{edge:Vt=!1,children:qt,className:zt,color:Ht="default",disabled:Kt=!1,disableFocusRipple:Gt=!1,size:Jt="medium"}=Ft,Xt=_objectWithoutPropertiesLoose(Ft,_excluded$F),Zt=_extends$3({},Ft,{edge:Vt,color:Ht,disabled:Kt,disableFocusRipple:Gt,size:Jt}),er=useUtilityClasses$A(Zt);return jsxRuntimeExports.jsx(IconButtonRoot,_extends$3({className:clsx$1(er.root,zt),centerRipple:!0,focusRipple:!Gt,disabled:Kt,ref:$t},Xt,{ownerState:Zt,children:qt}))}),SuccessOutlinedIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}
128),"SuccessOutlined"),ReportProblemOutlinedIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),ErrorOutlineIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),InfoOutlinedIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),ClearIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),_excluded$E=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],useUtilityClasses$z=yt=>{const{variant:_e,color:$t,severity:Ft,classes:Vt}=yt,qt={root:["root",`color${capitalize$1($t||Ft)}`,`${_e}${capitalize$1($t||Ft)}`,`${_e}`],icon:["icon"],message:["message"],action:["action"]};return composeClasses(qt,getAlertUtilityClass,Vt)},AlertRoot=styled(Paper,{name:"MuiAlert",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,_e[$t.variant],_e[`${$t.variant}${capitalize$1($t.color||$t.severity)}`]]}})(({theme:yt})=>{const _e=yt.palette.mode==="light"?darken_1:lighten_1,$t=yt.palette.mode==="light"?lighten_1:darken_1;return _extends$3({},yt.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(yt.palette).filter(([,Ft])=>Ft.main&&Ft.light).map(([Ft])=>({props:{colorSeverity:Ft,variant:"standard"},style:{color:yt.vars?yt.vars.palette.Alert[`${Ft}Color`]:_e(yt.palette[Ft].light,.6),backgroundColor:yt.vars?yt.vars.palette.Alert[`${Ft}StandardBg`]:$t(yt.palette[Ft].light,.9),[`& .${alertClasses.icon}`]:yt.vars?{color:yt.vars.palette.Alert[`${Ft}IconColor`]}:{color:yt.palette[Ft].main}}})),...Object.entries(yt.palette).filter(([,Ft])=>Ft.main&&Ft.light).map(([Ft])=>({props:{colorSeverity:Ft,variant:"outlined"},style:{color:yt.vars?yt.vars.palette.Alert[`${Ft}Color`]:_e(yt.palette[Ft].light,.6),border:`1px solid ${(yt.vars||yt).palette[Ft].light}`,[`& .${alertClasses.icon}`]:yt.vars?{color:yt.vars.palette.Alert[`${Ft}IconColor`]}:{color:yt.palette[Ft].main}}})),...Object.entries(yt.palette).filter(([,Ft])=>Ft.main&&Ft.dark).map(([Ft])=>({props:{colorSeverity:Ft,variant:"filled"},style:_extends$3({fontWeight:yt.typography.fontWeightMedium},yt.vars?{color:yt.vars.palette.Alert[`${Ft}FilledColor`],backgroundColor:yt.vars.palette.Alert[`${Ft}FilledBg`]}:{backgroundColor:yt.palette.mode==="dark"?yt.palette[Ft].dark:yt.palette[Ft].main,color:yt.palette.getContrastText(yt.palette[Ft].main)})}))]})}),AlertIcon=styled("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(yt,_e)=>_e.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),AlertMessage=styled("div",{name:"MuiAlert",slot:"Message",overridesResolver:(yt,_e)=>_e.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),AlertAction=styled("div",{name:"MuiAlert",slot:"Action",overridesResolver:(yt,_e)=>_e.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),defaultIconMapping={success:jsxRuntimeExports.jsx(SuccessOutlinedIcon,{fontSize:"inherit"}),warning:jsxRuntimeExports.jsx(ReportProblemOutlinedIcon,{fontSize:"inherit"}),error:jsxRuntimeExports.jsx(ErrorOutlineIcon,{fontSize:"inherit"}),info:jsxRuntimeExports.jsx(InfoOutlinedIcon,{fontSize:"inherit"})},Alert=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiAlert"}),{action:Vt,children:qt,className:zt,closeText:Ht="Close",color:Kt,components:Gt={},componentsProps:Jt={},icon:Xt,iconMapping:Zt=defaultIconMapping,onClose:er,role:tr="alert",severity:rr="success",slotProps:ar={},slots:nr={},variant:cr="standard"}=Ft,fr=_objectWithoutPropertiesLoose(Ft,_excluded$E),vr=_extends$3({},Ft,{color:Kt,severity:rr,variant:cr,colorSeverity:Kt||rr}),xr=useUtilityClasses$z(vr),Sr={slots:_extends$3({closeButton:Gt.CloseButton,closeIcon:Gt.CloseIcon},nr),slotProps:_extends$3({},Jt,ar)},[Tr,Br]=useSlot("closeButton",{elementType:IconButton,externalForwardedProps:Sr,ownerState:vr}),[jr,Rr]=useSlot("closeIcon",{elementType:ClearIcon,externalForwardedProps:Sr,ownerState:vr});return jsxRuntimeExports.jsxs(AlertRoot,_extends$3({role:tr,elevation:0,ownerState:vr,className:clsx$1(xr.root,zt),ref:$t},fr,{children:[Xt!==!1?jsxRuntimeExports.jsx(AlertIcon,{ownerState:vr,className:xr.icon,children:Xt||Zt[rr]||defaultIconMapping[rr]}):null,jsxRuntimeExports.jsx(AlertMessage,{ownerState:vr,className:xr.message,children:qt}),Vt!=null?jsxRuntimeExports.jsx(AlertAction,{ownerState:vr,className:xr.action,children:Vt}):null,Vt==null&&er?jsxRuntimeExports.jsx(AlertAction,{ownerState:vr,className:xr.action,children:jsxRuntimeExports.jsx(Tr,_extends$3({size:"small","aria-label":Ht,title:Ht,color:"inherit",onClick:er},Br,{children:jsxRuntimeExports.jsx(jr,_extends$3({fontSize:"small"},Rr))}))}):null]}))});function getTypographyUtilityClass(yt){return generateUtilityClass("MuiTypography",yt)}generateUtilityClasses("MuiTypography",["root","h1","h2","h3","h4","h5","h6","
128subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const _excluded$D=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],useUtilityClasses$y=yt=>{const{align:_e,gutterBottom:$t,noWrap:Ft,paragraph:Vt,variant:qt,classes:zt}=yt,Ht={root:["root",qt,yt.align!=="inherit"&&`align${capitalize$1(_e)}`,$t&&"gutterBottom",Ft&&"noWrap",Vt&&"paragraph"]};return composeClasses(Ht,getTypographyUtilityClass,zt)},TypographyRoot=styled("span",{name:"MuiTypography",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,$t.variant&&_e[$t.variant],$t.align!=="inherit"&&_e[`align${capitalize$1($t.align)}`],$t.noWrap&&_e.noWrap,$t.gutterBottom&&_e.gutterBottom,$t.paragraph&&_e.paragraph]}})(({theme:yt,ownerState:_e})=>_extends$3({margin:0},_e.variant==="inherit"&&{font:"inherit"},_e.variant!=="inherit"&&yt.typography[_e.variant],_e.align!=="inherit"&&{textAlign:_e.align},_e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},_e.gutterBottom&&{marginBottom:"0.35em"},_e.paragraph&&{marginBottom:16})),defaultVariantMapping={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},colorTransformations={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},transformDeprecatedColors=yt=>colorTransformations[yt]||yt,Typography=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiTypography"}),Vt=transformDeprecatedColors(Ft.color),qt=extendSxProp(_extends$3({},Ft,{color:Vt})),{align:zt="inherit",className:Ht,component:Kt,gutterBottom:Gt=!1,noWrap:Jt=!1,paragraph:Xt=!1,variant:Zt="body1",variantMapping:er=defaultVariantMapping}=qt,tr=_objectWithoutPropertiesLoose(qt,_excluded$D),rr=_extends$3({},qt,{align:zt,color:Vt,className:Ht,component:Kt,gutterBottom:Gt,noWrap:Jt,paragraph:Xt,variant:Zt,variantMapping:er}),ar=Kt||(Xt?"p":er[Zt]||defaultVariantMapping[Zt])||"span",nr=useUtilityClasses$y(rr);return jsxRuntimeExports.jsx(TypographyRoot,_extends$3({as:ar,ref:$t,ownerState:rr,className:clsx$1(nr.root,Ht)},tr))});function getContainer$1(yt){return typeof yt=="function"?yt():yt}const Portal$2=reactExports.forwardRef(function(_e,$t){const{children:Ft,container:Vt,disablePortal:qt=!1}=_e,[zt,Ht]=reactExports.useState(null),Kt=useForkRef(reactExports.isValidElement(Ft)?getReactElementRef(Ft):null,$t);if(useEnhancedEffect(()=>{qt||Ht(getContainer$1(Vt)||document.body)},[Vt,qt]),useEnhancedEffect(()=>{if(zt&&!qt)return setRef$1($t,zt),()=>{setRef$1($t,null)}},[$t,zt,qt]),qt){if(reactExports.isValidElement(Ft)){const Gt={ref:Kt};return reactExports.cloneElement(Ft,Gt)}return jsxRuntimeExports.jsx(reactExports.Fragment,{children:Ft})}return jsxRuntimeExports.jsx(reactExports.Fragment,{children:zt&&reactDomExports.createPortal(Ft,zt)})}),CancelIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function getChipUtilityClass(yt){return generateUtilityClass("MuiChip",yt)}const chipClasses=generateUtilityClasses("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),_excluded$C=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],useUtilityClasses$x=yt=>{const{classes:_e,disabled:$t,size:Ft,color:Vt,iconColor:qt,onDelete:zt,clickable:Ht,variant:Kt}=yt,Gt={root:["root",Kt,$t&&"disabled",`size${capitalize$1(Ft)}`,`color${capitalize$1(Vt)}`,Ht&&"clickable",Ht&&`clickableColor${capitalize$1(Vt)}`,zt&&"deletable",zt&&`deletableColor${capitalize$1(Vt)}`,`${Kt}${capitalize$1(Vt)}`],label:["label",`label${capitalize$1(Ft)}`],avatar:["avatar",`avatar${capitalize$1(Ft)}`,`avatarColor${capitalize$1(Vt)}`],icon:["icon",`icon${capitalize$1(Ft)}`,`iconColor${capitalize$1(qt)}`],deleteIcon:["deleteIcon",`deleteIcon${capitalize$1(Ft)}`,`deleteIconColor${capitalize$1(Vt)}`,`deleteIcon${capitalize$1(Kt)}Color${capitalize$1(Vt)}`]};return composeClasses(Gt,getChipUtilityClass,_e)},ChipRoot=styled("div",{name:"MuiChip",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt,{color:Ft,iconColor:Vt,clickable:qt,onDelete:zt,size:Ht,variant:Kt}=$t;return[{[`& .${chipClasses.avatar}`]:_e.avatar},{[`& .${chipClasses.avatar}`]:_e[`avatar${capitalize$1(Ht)}`]},{[`& .${chipClasses.avatar}`]:_e[`avatarColor${capitalize$1(Ft)}`]},{[`& .${chipClasses.icon}`]:_e.icon},{[`& .${chipClasses.icon}`]:_e[`icon${capitalize$1(Ht)}`]},{[`& .${chipClasses.icon}`]:_e[`iconColor${capitalize$1(Vt)}`]},{[`& .${chipClasses.deleteIcon}`]:_e.deleteIcon},{[`& .${chipClasses.deleteIcon}`]:_e[`deleteIcon${capitalize$1(Ht)}`]},{[`& .${chipClasses.deleteIcon}`]:_e[`deleteIconColor${capitalize$1(Ft)}`]},{[`& .${chipClasses.deleteIcon}`]:_e[`deleteIcon${capitalize$1(Kt)}Color${capitalize$1(Ft)}`]},_e.root,_e[`size${capitalize$1(Ht)}`],_e[`color${capitalize$1(Ft)}`],qt&&_e.clickable,qt&&Ft!=="default"&&_e[`clickableColor${capitalize$1(Ft)})`],zt&&_e.deletable,zt&&Ft!=="default"&&_e[`deletableColor${capitalize$1(Ft)}`],_e[Kt],_e[`${Kt}${capitalize$1(Ft)}`]]}})(({theme:yt,ownerState:_e})=>{const $t=yt.palette.mode==="light"?yt.palette.grey[700]:yt.palette.grey[300];return _extends$3({maxWidth:"100%",fontFamily:yt.typography.fontFamily,fontSize:yt.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(yt.vars||yt).palette.text.primary,backgroundColor:(yt.vars||yt).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:yt.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${chipClasses.disabled}`]:{opacity:(yt.vars||yt).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${chipClasses.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:yt.vars?yt.vars.palette.Chip.defaultAvatarColor:$t,fontSize:yt.typography.pxToRem(12)},[`& .${chipClasses.avatarColorPrimary}`]:{color:(yt.vars||yt).palette.primary.contrastText,backgroundColor:(yt.vars||yt).palette.primary.dark},[`& .${chipClasses.avatarColorSecondary}
128`]:{color:(yt.vars||yt).palette.secondary.contrastText,backgroundColor:(yt.vars||yt).palette.secondary.dark},[`& .${chipClasses.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:yt.typography.pxToRem(10)},[`& .${chipClasses.icon}`]:_extends$3({marginLeft:5,marginRight:-6},_e.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},_e.iconColor===_e.color&&_extends$3({color:yt.vars?yt.vars.palette.Chip.defaultIconColor:$t},_e.color!=="default"&&{color:"inherit"})),[`& .${chipClasses.deleteIcon}`]:_extends$3({WebkitTapHighlightColor:"transparent",color:yt.vars?`rgba(${yt.vars.palette.text.primaryChannel} / 0.26)`:alpha_1(yt.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:yt.vars?`rgba(${yt.vars.palette.text.primaryChannel} / 0.4)`:alpha_1(yt.palette.text.primary,.4)}},_e.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},_e.color!=="default"&&{color:yt.vars?`rgba(${yt.vars.palette[_e.color].contrastTextChannel} / 0.7)`:alpha_1(yt.palette[_e.color].contrastText,.7),"&:hover, &:active":{color:(yt.vars||yt).palette[_e.color].contrastText}})},_e.size==="small"&&{height:24},_e.color!=="default"&&{backgroundColor:(yt.vars||yt).palette[_e.color].main,color:(yt.vars||yt).palette[_e.color].contrastText},_e.onDelete&&{[`&.${chipClasses.focusVisible}`]:{backgroundColor:yt.vars?`rgba(${yt.vars.palette.action.selectedChannel} / calc(${yt.vars.palette.action.selectedOpacity} + ${yt.vars.palette.action.focusOpacity}))`:alpha_1(yt.palette.action.selected,yt.palette.action.selectedOpacity+yt.palette.action.focusOpacity)}},_e.onDelete&&_e.color!=="default"&&{[`&.${chipClasses.focusVisible}`]:{backgroundColor:(yt.vars||yt).palette[_e.color].dark}})},({theme:yt,ownerState:_e})=>_extends$3({},_e.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:yt.vars?`rgba(${yt.vars.palette.action.selectedChannel} / calc(${yt.vars.palette.action.selectedOpacity} + ${yt.vars.palette.action.hoverOpacity}))`:alpha_1(yt.palette.action.selected,yt.palette.action.selectedOpacity+yt.palette.action.hoverOpacity)},[`&.${chipClasses.focusVisible}`]:{backgroundColor:yt.vars?`rgba(${yt.vars.palette.action.selectedChannel} / calc(${yt.vars.palette.action.selectedOpacity} + ${yt.vars.palette.action.focusOpacity}))`:alpha_1(yt.palette.action.selected,yt.palette.action.selectedOpacity+yt.palette.action.focusOpacity)},"&:active":{boxShadow:(yt.vars||yt).shadows[1]}},_e.clickable&&_e.color!=="default"&&{[`&:hover, &.${chipClasses.focusVisible}`]:{backgroundColor:(yt.vars||yt).palette[_e.color].dark}}),({theme:yt,ownerState:_e})=>_extends$3({},_e.variant==="outlined"&&{backgroundColor:"transparent",border:yt.vars?`1px solid ${yt.vars.palette.Chip.defaultBorder}`:`1px solid ${yt.palette.mode==="light"?yt.palette.grey[400]:yt.palette.grey[700]}`,[`&.${chipClasses.clickable}:hover`]:{backgroundColor:(yt.vars||yt).palette.action.hover},[`&.${chipClasses.focusVisible}`]:{backgroundColor:(yt.vars||yt).palette.action.focus},[`& .${chipClasses.avatar}`]:{marginLeft:4},[`& .${chipClasses.avatarSmall}`]:{marginLeft:2},[`& .${chipClasses.icon}`]:{marginLeft:4},[`& .${chipClasses.iconSmall}`]:{marginLeft:2},[`& .${chipClasses.deleteIcon}`]:{marginRight:5},[`& .${chipClasses.deleteIconSmall}`]:{marginRight:3}},_e.variant==="outlined"&&_e.color!=="default"&&{color:(yt.vars||yt).palette[_e.color].main,border:`1px solid ${yt.vars?`rgba(${yt.vars.palette[_e.color].mainChannel} / 0.7)`:alpha_1(yt.palette[_e.color].main,.7)}`,[`&.${chipClasses.clickable}:hover`]:{backgroundColor:yt.vars?`rgba(${yt.vars.palette[_e.color].mainChannel} / ${yt.vars.palette.action.hoverOpacity})`:alpha_1(yt.palette[_e.color].main,yt.palette.action.hoverOpacity)},[`&.${chipClasses.focusVisible}`]:{backgroundColor:yt.vars?`rgba(${yt.vars.palette[_e.color].mainChannel} / ${yt.vars.palette.action.focusOpacity})`:alpha_1(yt.palette[_e.color].main,yt.palette.action.focusOpacity)},[`& .${chipClasses.deleteIcon}`]:{color:yt.vars?`rgba(${yt.vars.palette[_e.color].mainChannel} / 0.7)`:alpha_1(yt.palette[_e.color].main,.7),"&:hover, &:active":{color:(yt.vars||yt).palette[_e.color].main}}})),ChipLabel=styled("span",{name:"MuiChip",slot:"Label",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt,{size:Ft}=$t;return[_e.label,_e[`label${capitalize$1(Ft)}`]]}})(({ownerState:yt})=>_extends$3({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},yt.variant==="outlined"&&{paddingLeft:11,paddingRight:11},yt.size==="small"&&{paddingLeft:8,paddingRight:8},yt.size==="small"&&yt.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function isDeleteKeyboardEvent(yt){return yt.key==="Backspace"||yt.key==="Delete"}const Chip=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiChip"}),{avatar:Vt,className:qt,clickable:zt,color:Ht="default",component:Kt,deleteIcon:Gt,disabled:Jt=!1,icon:Xt,label:Zt,onClick:er,onDelete:tr,onKeyDown:rr,onKeyUp:ar,size:nr="medium",variant:cr="filled",tabIndex:fr,skipFocusWhenDisabled:vr=!1}=Ft,xr=_objectWithoutPropertiesLoose(Ft,_excluded$C),Sr=reactExports.useRef(null),Tr=useForkRef(Sr,$t),Br=lr=>{lr.stopPropagation(),tr&&tr(lr)},jr=lr=>{lr.currentTarget===lr.target&&isDeleteKeyboardEvent(lr)&&lr.preventDefault(),rr&&rr(lr)},Rr=lr=>{lr.currentTarget===lr.target&&(tr&&isDeleteKeyboardEvent(lr)?tr(lr):lr.key==="Escape"&&Sr.current&&Sr.current.blur()),ar&&ar(lr)},yr=zt!==!1&&er?!0:zt,sr=yr||tr?ButtonBase:Kt||"div",or=_extends$3({},Ft,{component:sr,disabled:Jt,size:nr,color:Ht,iconColor:reactExports.isValidElement(Xt)&&Xt.props.color||Ht,onDelete:!!tr,clickable:yr,variant:cr}),Qt=useUtilityClasses$x(or),ir=sr===ButtonBase?_extends$3({component:Kt||"div",focu
128sVisibleClassName:Qt.focusVisible},tr&&{disableRipple:!0}):{};let ur=null;tr&&(ur=Gt&&reactExports.isValidElement(Gt)?reactExports.cloneElement(Gt,{className:clsx$1(Gt.props.className,Qt.deleteIcon),onClick:Br}):jsxRuntimeExports.jsx(CancelIcon,{className:clsx$1(Qt.deleteIcon),onClick:Br}));let gr=null;Vt&&reactExports.isValidElement(Vt)&&(gr=reactExports.cloneElement(Vt,{className:clsx$1(Qt.avatar,Vt.props.className)}));let dr=null;return Xt&&reactExports.isValidElement(Xt)&&(dr=reactExports.cloneElement(Xt,{className:clsx$1(Qt.icon,Xt.props.className)})),jsxRuntimeExports.jsxs(ChipRoot,_extends$3({as:sr,className:clsx$1(Qt.root,qt),disabled:yr&&Jt?!0:void 0,onClick:er,onKeyDown:jr,onKeyUp:Rr,ref:Tr,tabIndex:vr&&Jt?-1:fr,ownerState:or},ir,xr,{children:[gr||dr,jsxRuntimeExports.jsx(ChipLabel,{className:clsx$1(Qt.label),ownerState:or,children:Zt}),ur]}))}),_excluded$B=["onChange","maxRows","minRows","style","value"];function getStyleValue(yt){return parseInt(yt,10)||0}const styles$3={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function isObjectEmpty(yt){for(const _e in yt)return!1;return!0}function isEmpty$1(yt){return isObjectEmpty(yt)||yt.outerHeightStyle===0&&!yt.overflowing}const TextareaAutosize=reactExports.forwardRef(function(_e,$t){const{onChange:Ft,maxRows:Vt,minRows:qt=1,style:zt,value:Ht}=_e,Kt=_objectWithoutPropertiesLoose(_e,_excluded$B),{current:Gt}=reactExports.useRef(Ht!=null),Jt=reactExports.useRef(null),Xt=useForkRef($t,Jt),Zt=reactExports.useRef(null),er=reactExports.useRef(null),tr=reactExports.useCallback(()=>{const fr=Jt.current,vr=er.current;if(!fr||!vr)return;const Sr=ownerWindow(fr).getComputedStyle(fr);if(Sr.width==="0px")return{outerHeightStyle:0,overflowing:!1};vr.style.width=Sr.width,vr.value=fr.value||_e.placeholder||"x",vr.value.slice(-1)===` 129`&&(vr.value+=" ");const Tr=Sr.boxSizing,Br=getStyleValue(Sr.paddingBottom)+getStyleValue(Sr.paddingTop),jr=getStyleValue(Sr.borderBottomWidth)+getStyleValue(Sr.borderTopWidth),Rr=vr.scrollHeight;vr.value="x";const yr=vr.scrollHeight;let sr=Rr;qt&&(sr=Math.max(Number(qt)*yr,sr)),Vt&&(sr=Math.min(Number(Vt)*yr,sr)),sr=Math.max(sr,yr);const or=sr+(Tr==="border-box"?Br+jr:0),Qt=Math.abs(sr-Rr)<=1;return{outerHeightStyle:or,overflowing:Qt}},[Vt,qt,_e.placeholder]),rr=useEventCallback(()=>{const fr=Jt.current,vr=tr();if(!fr||!vr||isEmpty$1(vr))return!1;const xr=vr.outerHeightStyle;return Zt.current!=null&&Zt.current!==xr}),ar=reactExports.useCallback(()=>{const fr=Jt.current,vr=tr();if(!fr||!vr||isEmpty$1(vr))return;const xr=vr.outerHeightStyle;Zt.current!==xr&&(Zt.current=xr,fr.style.height=`${xr}px`),fr.style.overflow=vr.overflowing?"hidden":""},[tr]),nr=reactExports.useRef(-1);useEnhancedEffect(()=>{const fr=debounce(ar),vr=Jt==null?void 0:Jt.current;if(!vr)return;const xr=ownerWindow(vr);xr.addEventListener("resize",fr);let Sr;return typeof ResizeObserver<"u"&&(Sr=new ResizeObserver(()=>{rr()&&(Sr.unobserve(vr),cancelAnimationFrame(nr.current),ar(),nr.current=requestAnimationFrame(()=>{Sr.observe(vr)}))}),Sr.observe(vr)),()=>{fr.clear(),cancelAnimationFrame(nr.current),xr.removeEventListener("resize",fr),Sr&&Sr.disconnect()}},[tr,ar,rr]),useEnhancedEffect(()=>{ar()});const cr=fr=>{Gt||ar(),Ft&&Ft(fr)};return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("textarea",_extends$3({value:Ht,onChange:cr,ref:Xt,rows:qt,style:zt},Kt)),jsxRuntimeExports.jsx("textarea",{"aria-hidden":!0,className:_e.className,readOnly:!0,ref:er,tabIndex:-1,style:_extends$3({},styles$3.shadow,zt,{paddingTop:0,paddingBottom:0})})]})});function formControlState({props:yt,states:_e,muiFormControl:$t}){return _e.reduce((Ft,Vt)=>(Ft[Vt]=yt[Vt],$t&&typeof yt[Vt]>"u"&&(Ft[Vt]=$t[Vt]),Ft),{})}const FormControlContext=reactExports.createContext(void 0);function useFormControl(){return reactExports.useContext(FormControlContext)}function GlobalStyles(yt){return jsxRuntimeExports.jsx(GlobalStyles$1,_extends$3({},yt,{defaultTheme:defaultTheme$1,themeId:THEME_ID}))}function hasValue(yt){return yt!=null&&!(Array.isArray(yt)&&yt.length===0)}function isFilled(yt,_e=!1){return yt&&(hasValue(yt.value)&&yt.value!==""||_e&&hasValue(yt.defaultValue)&&yt.defaultValue!=="")}function isAdornedStart(yt){return yt.startAdornment}function getInputBaseUtilityClass(yt){return generateUtilityClass("MuiInputBase",yt)}const inputBaseClasses=generateUtilityClasses("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),_excluded$A=["aria-describedby","autoComplete","autoF
129ocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],rootOverridesResolver=(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,$t.formControl&&_e.formControl,$t.startAdornment&&_e.adornedStart,$t.endAdornment&&_e.adornedEnd,$t.error&&_e.error,$t.size==="small"&&_e.sizeSmall,$t.multiline&&_e.multiline,$t.color&&_e[`color${capitalize$1($t.color)}`],$t.fullWidth&&_e.fullWidth,$t.hiddenLabel&&_e.hiddenLabel]},inputOverridesResolver=(yt,_e)=>{const{ownerState:$t}=yt;return[_e.input,$t.size==="small"&&_e.inputSizeSmall,$t.multiline&&_e.inputMultiline,$t.type==="search"&&_e.inputTypeSearch,$t.startAdornment&&_e.inputAdornedStart,$t.endAdornment&&_e.inputAdornedEnd,$t.hiddenLabel&&_e.inputHiddenLabel]},useUtilityClasses$w=yt=>{const{classes:_e,color:$t,disabled:Ft,error:Vt,endAdornment:qt,focused:zt,formControl:Ht,fullWidth:Kt,hiddenLabel:Gt,multiline:Jt,readOnly:Xt,size:Zt,startAdornment:er,type:tr}=yt,rr={root:["root",`color${capitalize$1($t)}`,Ft&&"disabled",Vt&&"error",Kt&&"fullWidth",zt&&"focused",Ht&&"formControl",Zt&&Zt!=="medium"&&`size${capitalize$1(Zt)}`,Jt&&"multiline",er&&"adornedStart",qt&&"adornedEnd",Gt&&"hiddenLabel",Xt&&"readOnly"],input:["input",Ft&&"disabled",tr==="search"&&"inputTypeSearch",Jt&&"inputMultiline",Zt==="small"&&"inputSizeSmall",Gt&&"inputHiddenLabel",er&&"inputAdornedStart",qt&&"inputAdornedEnd",Xt&&"readOnly"]};return composeClasses(rr,getInputBaseUtilityClass,_e)},InputBaseRoot=styled("div",{name:"MuiInputBase",slot:"Root",overridesResolver:rootOverridesResolver})(({theme:yt,ownerState:_e})=>_extends$3({},yt.typography.body1,{color:(yt.vars||yt).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${inputBaseClasses.disabled}`]:{color:(yt.vars||yt).palette.text.disabled,cursor:"default"}},_e.multiline&&_extends$3({padding:"4px 0 5px"},_e.size==="small"&&{paddingTop:1}),_e.fullWidth&&{width:"100%"})),InputBaseComponent=styled("input",{name:"MuiInputBase",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:yt,ownerState:_e})=>{const $t=yt.palette.mode==="light",Ft=_extends$3({color:"currentColor"},yt.vars?{opacity:yt.vars.opacity.inputPlaceholder}:{opacity:$t?.42:.5},{transition:yt.transitions.create("opacity",{duration:yt.transitions.duration.shorter})}),Vt={opacity:"0 !important"},qt=yt.vars?{opacity:yt.vars.opacity.inputPlaceholder}:{opacity:$t?.42:.5};return _extends$3({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":Ft,"&::-moz-placeholder":Ft,"&:-ms-input-placeholder":Ft,"&::-ms-input-placeholder":Ft,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${inputBaseClasses.formControl} &`]:{"&::-webkit-input-placeholder":Vt,"&::-moz-placeholder":Vt,"&:-ms-input-placeholder":Vt,"&::-ms-input-placeholder":Vt,"&:focus::-webkit-input-placeholder":qt,"&:focus::-moz-placeholder":qt,"&:focus:-ms-input-placeholder":qt,"&:focus::-ms-input-placeholder":qt},[`&.${inputBaseClasses.disabled}`]:{opacity:1,WebkitTextFillColor:(yt.vars||yt).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},_e.size==="small"&&{paddingTop:1},_e.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},_e.type==="search"&&{MozAppearance:"textfield"})}),inputGlobalStyles=jsxRuntimeExports.jsx(GlobalStyles,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),InputBase=reactExports.forwardRef(function(_e,$t){var Ft;const Vt=useDefaultProps({props:_e,name:"MuiInputBase"}),{"aria-describedby":qt,autoComplete:zt,autoFocus:Ht,className:Kt,components:Gt={}
129,componentsProps:Jt={},defaultValue:Xt,disabled:Zt,disableInjectingGlobalStyles:er,endAdornment:tr,fullWidth:rr=!1,id:ar,inputComponent:nr="input",inputProps:cr={},inputRef:fr,maxRows:vr,minRows:xr,multiline:Sr=!1,name:Tr,onBlur:Br,onChange:jr,onClick:Rr,onFocus:yr,onKeyDown:sr,onKeyUp:or,placeholder:Qt,readOnly:ir,renderSuffix:ur,rows:gr,slotProps:dr={},slots:lr={},startAdornment:hr,type:wr="text",value:pr}=Vt,br=_objectWithoutPropertiesLoose(Vt,_excluded$A),Dr=cr.value!=null?cr.value:pr,{current:_r}=reactExports.useRef(Dr!=null),Nr=reactExports.useRef(),kr=reactExports.useCallback(wn=>{},[]),Mr=useForkRef(Nr,fr,cr.ref,kr),[Lr,Cr]=reactExports.useState(!1),Er=useFormControl(),Ar=formControlState({props:Vt,muiFormControl:Er,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Ar.focused=Er?Er.focused:Lr,reactExports.useEffect(()=>{!Er&&Zt&&Lr&&(Cr(!1),Br&&Br())},[Er,Zt,Lr,Br]);const zr=Er&&Er.onFilled,Vr=Er&&Er.onEmpty,Gr=reactExports.useCallback(wn=>{isFilled(wn)?zr&&zr():Vr&&Vr()},[zr,Vr]);useEnhancedEffect(()=>{_r&&Gr({value:Dr})},[Dr,Gr,_r]);const tn=wn=>{if(Ar.disabled){wn.stopPropagation();return}yr&&yr(wn),cr.onFocus&&cr.onFocus(wn),Er&&Er.onFocus?Er.onFocus(wn):Cr(!0)},Yr=wn=>{Br&&Br(wn),cr.onBlur&&cr.onBlur(wn),Er&&Er.onBlur?Er.onBlur(wn):Cr(!1)},Jr=(wn,...dn)=>{if(!_r){const Ur=wn.target||Nr.current;if(Ur==null)throw new Error(formatMuiErrorMessage$1(1));Gr({value:Ur.value})}cr.onChange&&cr.onChange(wn,...dn),jr&&jr(wn,...dn)};reactExports.useEffect(()=>{Gr(Nr.current)},[]);const Kr=wn=>{Nr.current&&wn.currentTarget===wn.target&&Nr.current.focus(),Rr&&Rr(wn)};let Xr=nr,Qr=cr;Sr&&Xr==="input"&&(gr?Qr=_extends$3({type:void 0,minRows:gr,maxRows:gr},Qr):Qr=_extends$3({type:void 0,maxRows:vr,minRows:xr},Qr),Xr=TextareaAutosize);const un=wn=>{Gr(wn.animationName==="mui-auto-fill-cancel"?Nr.current:{value:"x"})};reactExports.useEffect(()=>{Er&&Er.setAdornedStart(!!hr)},[Er,hr]);const an=_extends$3({},Vt,{color:Ar.color||"primary",disabled:Ar.disabled,endAdornment:tr,error:Ar.error,focused:Ar.focused,formControl:Er,fullWidth:rr,hiddenLabel:Ar.hiddenLabel,multiline:Sr,size:Ar.size,startAdornment:hr,type:wr}),sn=useUtilityClasses$w(an),vn=lr.root||Gt.Root||InputBaseRoot,gn=dr.root||Jt.root||{},fn=lr.input||Gt.Input||InputBaseComponent;return Qr=_extends$3({},Qr,(Ft=dr.input)!=null?Ft:Jt.input),jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[!er&&inputGlobalStyles,jsxRuntimeExports.jsxs(vn,_extends$3({},gn,!isHostComponent(vn)&&{ownerState:_extends$3({},an,gn.ownerState)},{ref:$t,onClick:Kr},br,{className:clsx$1(sn.root,gn.className,Kt,ir&&"MuiInputBase-readOnly"),children:[hr,jsxRuntimeExports.jsx(FormControlContext.Provider,{value:null,children:jsxRuntimeExports.jsx(fn,_extends$3({ownerState:an,"aria-invalid":Ar.error,"aria-describedby":qt,autoComplete:zt,autoFocus:Ht,defaultValue:Xt,disabled:Ar.disabled,id:ar,onAnimationStart:un,name:Tr,placeholder:Qt,readOnly:ir,required:Ar.required,rows:gr,value:Dr,onKeyDown:sr,onKeyUp:or,type:wr},Qr,!isHostComponent(fn)&&{as:Xr,ownerState:_extends$3({},an,Qr.ownerState)},{ref:Mr,className:clsx$1(sn.input,Qr.className,ir&&"MuiInputBase-readOnly"),onBlur:Yr,onChange:Jr,onFocus:tn}))}),tr,ur?ur(_extends$3({},Ar,{startAdornment:hr})):null]}))]})});function getInputUtilityClass(yt){return generateUtilityClass("MuiInput",yt)}const inputClasses=_extends$3({},inputBaseClasses,generateUtilityClasses("MuiInput",["root","underline","input"]));function getOutlinedInputUtilityClass(yt){return generateUtilityClass("MuiOutlinedInput",yt)}const outlinedInputClasses=_extends$3({},inputBaseClasses,generateUtilityClasses("MuiOutlinedInput",["root","notchedOutline","input"]));function getFilledInputUtilityClass(yt){return generateUtilityClass("MuiFilledInput",yt)}const filledInputClasses=_extends$3({},inputBaseClasses,generateUtilityClasses("MuiFilledInput",["root","underline","input"])),ArrowDropDownIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Person$1=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function getAvatarUtilityClass(yt){return generateUtilityClass("MuiAvatar",yt)}generateUtilityClasses("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const _excluded$z=["alt","children","className","component","slots","slotProps","imgProps","
129sizes","src","srcSet","variant"],useUtilityClasses$v=yt=>{const{classes:_e,variant:$t,colorDefault:Ft}=yt;return composeClasses({root:["root",$t,Ft&&"colorDefault"],img:["img"],fallback:["fallback"]},getAvatarUtilityClass,_e)},AvatarRoot=styled("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,_e[$t.variant],$t.colorDefault&&_e.colorDefault]}})(({theme:yt})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:yt.typography.fontFamily,fontSize:yt.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(yt.vars||yt).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:_extends$3({color:(yt.vars||yt).palette.background.default},yt.vars?{backgroundColor:yt.vars.palette.Avatar.defaultBg}:_extends$3({backgroundColor:yt.palette.grey[400]},yt.applyStyles("dark",{backgroundColor:yt.palette.grey[600]})))}]})),AvatarImg=styled("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(yt,_e)=>_e.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),AvatarFallback=styled(Person$1,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(yt,_e)=>_e.fallback})({width:"75%",height:"75%"});function useLoaded({crossOrigin:yt,referrerPolicy:_e,src:$t,srcSet:Ft}){const[Vt,qt]=reactExports.useState(!1);return reactExports.useEffect(()=>{if(!$t&&!Ft)return;qt(!1);let zt=!0;const Ht=new Image;return Ht.onload=()=>{zt&&qt("loaded")},Ht.onerror=()=>{zt&&qt("error")},Ht.crossOrigin=yt,Ht.referrerPolicy=_e,Ht.src=$t,Ft&&(Ht.srcset=Ft),()=>{zt=!1}},[yt,_e,$t,Ft]),Vt}const Avatar=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiAvatar"}),{alt:Vt,children:qt,className:zt,component:Ht="div",slots:Kt={},slotProps:Gt={},imgProps:Jt,sizes:Xt,src:Zt,srcSet:er,variant:tr="circular"}=Ft,rr=_objectWithoutPropertiesLoose(Ft,_excluded$z);let ar=null;const nr=useLoaded(_extends$3({},Jt,{src:Zt,srcSet:er})),cr=Zt||er,fr=cr&&nr!=="error",vr=_extends$3({},Ft,{colorDefault:!fr,component:Ht,variant:tr}),xr=useUtilityClasses$v(vr),[Sr,Tr]=useSlot("img",{className:xr.img,elementType:AvatarImg,externalForwardedProps:{slots:Kt,slotProps:{img:_extends$3({},Jt,Gt.img)}},additionalProps:{alt:Vt,src:Zt,srcSet:er,sizes:Xt},ownerState:vr});return fr?ar=jsxRuntimeExports.jsx(Sr,_extends$3({},Tr)):qt||qt===0?ar=qt:cr&&Vt?ar=Vt[0]:ar=jsxRuntimeExports.jsx(AvatarFallback,{ownerState:vr,className:xr.fallback}),jsxRuntimeExports.jsx(AvatarRoot,_extends$3({as:Ht,ownerState:vr,className:clsx$1(xr.root,zt),ref:$t},rr,{children:ar}))}),_excluded$y=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],styles$2={entering:{opacity:1},entered:{opacity:1}},Fade=reactExports.forwardRef(function(_e,$t){const Ft=useTheme(),Vt={enter:Ft.transitions.duration.enteringScreen,exit:Ft.transitions.duration.leavingScreen},{addEndListener:qt,appear:zt=!0,children:Ht,easing:Kt,in:Gt,onEnter:Jt,onEntered:Xt,onEntering:Zt,onExit:er,onExited:tr,onExiting:rr,style:ar,timeout:nr=Vt,TransitionComponent:cr=Transition}=_e,fr=_objectWithoutPropertiesLoose(_e,_excluded$y),vr=reactExports.useRef(null),xr=useForkRef(vr,getReactElementRef(Ht),$t),Sr=Qt=>ir=>{if(Qt){const ur=vr.current;ir===void 0?Qt(ur):Qt(ur,ir)}},Tr=Sr(Zt),Br=Sr((Qt,ir)=>{reflow(Qt);const ur=getTransitionProps({style:ar,timeout:nr,easing:Kt},{mode:"enter"});Qt.style.webkitTransition=Ft.transitions.create("opacity",ur),Qt.style.transition=Ft.transitions.create("opacity",ur),Jt&&Jt(Qt,ir)}),jr=Sr(Xt),Rr=Sr(rr),yr=Sr(Qt=>{const ir=getTransitionProps({style:ar,timeout:nr,easing:Kt},{mode:"exit"});Qt.style.webkitTransition=Ft.transitions.create("opacity",ir),Qt.style.transition=Ft.transitions.create("opacity",ir),er&&er(Qt)}),sr=Sr(tr),or=Qt=>{qt&&qt(vr.current,Qt)};return jsxRuntimeExports.jsx(cr,_extends$3({appear:zt,in:Gt,nodeRef:vr,onEnter:Br,onEntered:jr,onEntering:Tr,onExit:yr,onExited:sr,onExiting:Rr,addEndListener:or,timeout:nr},fr,{children:(Qt,ir)=>reactExports.cloneElement(Ht,_extends$3({style:_extends$3({opacity:0,visibility:Qt==="exited"&&!Gt?"hidden":void 0},styles$2[Qt],ar,Ht.props.style),ref:xr},ir))}))});function getBackdropUtilityClass(yt){return generateUtilityClass("MuiBackdrop",yt)}generateUtilityClasses("MuiBackdrop",["root","invisible"]);const _excluded$x=["children","className","component","components","componentsProps","invisible","open","slotProps","
129slots","TransitionComponent","transitionDuration"],useUtilityClasses$u=yt=>{const{classes:_e,invisible:$t}=yt;return composeClasses({root:["root",$t&&"invisible"]},getBackdropUtilityClass,_e)},BackdropRoot=styled("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,$t.invisible&&_e.invisible]}})(({ownerState:yt})=>_extends$3({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},yt.invisible&&{backgroundColor:"transparent"})),Backdrop=reactExports.forwardRef(function(_e,$t){var Ft,Vt,qt;const zt=useDefaultProps({props:_e,name:"MuiBackdrop"}),{children:Ht,className:Kt,component:Gt="div",components:Jt={},componentsProps:Xt={},invisible:Zt=!1,open:er,slotProps:tr={},slots:rr={},TransitionComponent:ar=Fade,transitionDuration:nr}=zt,cr=_objectWithoutPropertiesLoose(zt,_excluded$x),fr=_extends$3({},zt,{component:Gt,invisible:Zt}),vr=useUtilityClasses$u(fr),xr=(Ft=tr.root)!=null?Ft:Xt.root;return jsxRuntimeExports.jsx(ar,_extends$3({in:er,timeout:nr},cr,{children:jsxRuntimeExports.jsx(BackdropRoot,_extends$3({"aria-hidden":!0},xr,{as:(Vt=(qt=rr.root)!=null?qt:Jt.Root)!=null?Vt:Gt,className:clsx$1(vr.root,Kt,xr==null?void 0:xr.className),ownerState:_extends$3({},fr,xr==null?void 0:xr.ownerState),classes:vr,ref:$t,children:Ht}))}))}),boxClasses=generateUtilityClasses("MuiBox",["root"]),defaultTheme=createTheme(),Box$2=createBox$1({themeId:THEME_ID,defaultTheme,defaultClassName:boxClasses.root,generateClassName:ClassNameGenerator.generate});function getButtonUtilityClass(yt){return generateUtilityClass("MuiButton",yt)}const buttonClasses=generateUtilityClasses("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),ButtonGroupContext=reactExports.createContext({}),ButtonGroupButtonContext=reactExports.createContext(void 0),_excluded$w=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],useUtilityClasses$t=yt=>{const{color:_e,disableElevation:$t,fullWidth:Ft,size:Vt,variant:qt,classes:zt}=yt,Ht={root:["root",qt,`${qt}${capitalize$1(_e)}`,`size${capitalize$1(Vt)}`,`${qt}Size${capitalize$1(Vt)}`,`color${capitalize$1(_e)}`,$t&&"disableElevation",Ft&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${capitalize$1(Vt)}`],endIcon:["icon","endIcon",`iconSize${capitalize$1(Vt)}`]},Kt=composeClasses(Ht,getButtonUtilityClass,zt);return _extends$3({},zt,Kt)},commonIconStyles=yt=>_extends$3({},yt.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},yt.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},yt.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),ButtonRoot=styled(ButtonBase,{shouldForwardProp:yt=>rootShouldForwardProp(yt)||yt==="classes",name:"MuiButton",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,_e[$t.variant],_e[`${$t.variant}${capitalize$1($t.color)}`],_e[`size${capitalize$1($t.size)}`],_e[`${$t.variant}Size${capitalize$1($t.size)}`],$t.color==="inherit"&&_e.colorInherit,$t.disableElevation&&_e.disableElevation,$t.fullWidth&&_e.fullWidth]}})(({theme:yt,ownerState:_e})=>{var $t,Ft;const Vt=yt.palette.mode==="light"?yt.palette.grey[300]:yt.palette.grey[800],qt=yt.palette.mode==="light"?yt.palette.grey.A100:yt.palette.grey[700];return _extends$3({},yt.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(yt.vars||yt).shape.borderRadius,transition:yt.transitions.create(["background-color","box-shadow","border-color","color"],{duration:yt.transitions.duration.short}),"&:hover":_extends$3({textDecoration:"none",backgroundColor:yt.vars?`rgba(${yt.vars.palette.text.primaryChannel} / ${yt.vars.palette.action.hoverOpacity})`:alpha_1(yt.palette.text.primary,yt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},_e.variant==="text"&&_e.color!=="inherit"&&{backgroundColor:yt.vars?`rgba(${yt.vars.palette[_e.color].mainCh
129annel} / ${yt.vars.palette.action.hoverOpacity})`:alpha_1(yt.palette[_e.color].main,yt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},_e.variant==="outlined"&&_e.color!=="inherit"&&{border:`1px solid ${(yt.vars||yt).palette[_e.color].main}`,backgroundColor:yt.vars?`rgba(${yt.vars.palette[_e.color].mainChannel} / ${yt.vars.palette.action.hoverOpacity})`:alpha_1(yt.palette[_e.color].main,yt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},_e.variant==="contained"&&{backgroundColor:yt.vars?yt.vars.palette.Button.inheritContainedHoverBg:qt,boxShadow:(yt.vars||yt).shadows[4],"@media (hover: none)":{boxShadow:(yt.vars||yt).shadows[2],backgroundColor:(yt.vars||yt).palette.grey[300]}},_e.variant==="contained"&&_e.color!=="inherit"&&{backgroundColor:(yt.vars||yt).palette[_e.color].dark,"@media (hover: none)":{backgroundColor:(yt.vars||yt).palette[_e.color].main}}),"&:active":_extends$3({},_e.variant==="contained"&&{boxShadow:(yt.vars||yt).shadows[8]}),[`&.${buttonClasses.focusVisible}`]:_extends$3({},_e.variant==="contained"&&{boxShadow:(yt.vars||yt).shadows[6]}),[`&.${buttonClasses.disabled}`]:_extends$3({color:(yt.vars||yt).palette.action.disabled},_e.variant==="outlined"&&{border:`1px solid ${(yt.vars||yt).palette.action.disabledBackground}`},_e.variant==="contained"&&{color:(yt.vars||yt).palette.action.disabled,boxShadow:(yt.vars||yt).shadows[0],backgroundColor:(yt.vars||yt).palette.action.disabledBackground})},_e.variant==="text"&&{padding:"6px 8px"},_e.variant==="text"&&_e.color!=="inherit"&&{color:(yt.vars||yt).palette[_e.color].main},_e.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},_e.variant==="outlined"&&_e.color!=="inherit"&&{color:(yt.vars||yt).palette[_e.color].main,border:yt.vars?`1px solid rgba(${yt.vars.palette[_e.color].mainChannel} / 0.5)`:`1px solid ${alpha_1(yt.palette[_e.color].main,.5)}`},_e.variant==="contained"&&{color:yt.vars?yt.vars.palette.text.primary:($t=(Ft=yt.palette).getContrastText)==null?void 0:$t.call(Ft,yt.palette.grey[300]),backgroundColor:yt.vars?yt.vars.palette.Button.inheritContainedBg:Vt,boxShadow:(yt.vars||yt).shadows[2]},_e.variant==="contained"&&_e.color!=="inherit"&&{color:(yt.vars||yt).palette[_e.color].contrastText,backgroundColor:(yt.vars||yt).palette[_e.color].main},_e.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},_e.size==="small"&&_e.variant==="text"&&{padding:"4px 5px",fontSize:yt.typography.pxToRem(13)},_e.size==="large"&&_e.variant==="text"&&{padding:"8px 11px",fontSize:yt.typography.pxToRem(15)},_e.size==="small"&&_e.variant==="outlined"&&{padding:"3px 9px",fontSize:yt.typography.pxToRem(13)},_e.size==="large"&&_e.variant==="outlined"&&{padding:"7px 21px",fontSize:yt.typography.pxToRem(15)},_e.size==="small"&&_e.variant==="contained"&&{padding:"4px 10px",fontSize:yt.typography.pxToRem(13)},_e.size==="large"&&_e.variant==="contained"&&{padding:"8px 22px",fontSize:yt.typography.pxToRem(15)},_e.fullWidth&&{width:"100%"})},({ownerState:yt})=>yt.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${buttonClasses.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${buttonClasses.disabled}`]:{boxShadow:"none"}}),ButtonStartIcon=styled("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.startIcon,_e[`iconSize${capitalize$1($t.size)}`]]}})(({ownerState:yt})=>_extends$3({display:"inherit",marginRight:8,marginLeft:-4},yt.size==="small"&&{marginLeft:-2},commonIconStyles(yt))),ButtonEndIcon=styled("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.endIcon,_e[`iconSize${capitalize$1($t.size)}`]]}})(({ownerState:yt})=>_extends$3({display:"inherit",marginRight:-4,marginLeft:8},yt.size==="small"&&{marginRight:-2},commonIconStyles(yt))),Button=reactExports.forwardRef(function(_e,$t){const Ft=reactExports.useContext(ButtonGroupContext),Vt=reactExports.useContext(ButtonGroupButtonContext),qt=resolveProps(Ft,_e),zt=useDefaultProps({props:qt,name:"MuiButton"}),{children:Ht,color:Kt="primary",component:Gt="button",className:Jt,disabled:Xt=!1,disableElevation:Zt=!1,disableFocusRipple:er=!1,endIcon:tr,focu
129sVisibleClassName:rr,fullWidth:ar=!1,size:nr="medium",startIcon:cr,type:fr,variant:vr="text"}=zt,xr=_objectWithoutPropertiesLoose(zt,_excluded$w),Sr=_extends$3({},zt,{color:Kt,component:Gt,disabled:Xt,disableElevation:Zt,disableFocusRipple:er,fullWidth:ar,size:nr,type:fr,variant:vr}),Tr=useUtilityClasses$t(Sr),Br=cr&&jsxRuntimeExports.jsx(ButtonStartIcon,{className:Tr.startIcon,ownerState:Sr,children:cr}),jr=tr&&jsxRuntimeExports.jsx(ButtonEndIcon,{className:Tr.endIcon,ownerState:Sr,children:tr}),Rr=Vt||"";return jsxRuntimeExports.jsxs(ButtonRoot,_extends$3({ownerState:Sr,className:clsx$1(Ft.className,Tr.root,Jt,Rr),component:Gt,disabled:Xt,focusRipple:!er,focusVisibleClassName:clsx$1(Tr.focusVisible,rr),ref:$t,type:fr},xr,{classes:Tr,children:[Br,Ht,jr]}))});function getCardUtilityClass(yt){return generateUtilityClass("MuiCard",yt)}generateUtilityClasses("MuiCard",["root"]);const _excluded$v=["className","raised"],useUtilityClasses$s=yt=>{const{classes:_e}=yt;return composeClasses({root:["root"]},getCardUtilityClass,_e)},CardRoot=styled(Paper,{name:"MuiCard",slot:"Root",overridesResolver:(yt,_e)=>_e.root})(()=>({overflow:"hidden"})),Card=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiCard"}
129),{className:Vt,raised:qt=!1}=Ft,zt=_objectWithoutPropertiesLoose(Ft,_excluded$v),Ht=_extends$3({},Ft,{raised:qt}),Kt=useUtilityClasses$s(Ht);return jsxRuntimeExports.jsx(CardRoot,_extends$3({className:clsx$1(Kt.root,Vt),elevation:qt?8:void 0,ref:$t,ownerState:Ht},zt))});function getCardActionsUtilityClass(yt){return generateUtilityClass("MuiCardActions",yt)}generateUtilityClasses("MuiCardActions",["root","spacing"]);const _excluded$u=["disableSpacing","className"],useUtilityClasses$r=yt=>{const{classes:_e,disableSpacing:$t}=yt;return composeClasses({root:["root",!$t&&"spacing"]},getCardActionsUtilityClass,_e)},CardActionsRoot=styled("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,!$t.disableSpacing&&_e.spacing]}})(({ownerState:yt})=>_extends$3({display:"flex",alignItems:"center",padding:8},!yt.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),CardActions=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiCardActions"}),{disableSpacing:Vt=!1,className:qt}=Ft,zt=_objectWithoutPropertiesLoose(Ft,_excluded$u),Ht=_extends$3({},Ft,{disableSpacing:Vt}),Kt=useUtilityClasses$r(Ht);return jsxRuntimeExports.jsx(CardActionsRoot,_extends$3({className:clsx$1(Kt.root,qt),ownerState:Ht,ref:$t},zt))});function getCardContentUtilityClass(yt){return generateUtilityClass("MuiCardContent",yt)}generateUtilityClasses("MuiCardContent",["root"]);const _excluded$t=["className","component"],useUtilityClasses$q=yt=>{const{classes:_e}=yt;return composeClasses({root:["root"]},getCardContentUtilityClass,_e)},CardContentRoot=styled("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(yt,_e)=>_e.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),CardContent=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiCardContent"}),{className:Vt,component:qt="div"}=Ft,zt=_objectWithoutPropertiesLoose(Ft,_excluded$t),Ht=_extends$3({},Ft,{component:qt}),Kt=useUtilityClasses$q(Ht);return jsxRuntimeExports.jsx(CardContentRoot,_extends$3({as:qt,className:clsx$1(Kt.root,Vt),ownerState:Ht,ref:$t},zt))});function getCircularProgressUtilityClass(yt){return generateUtilityClass("MuiCircularProgress",yt)}generateUtilityClasses("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const _excluded$s=["className","color","disableShrink","size","style","thickness","value","variant"];let _$2=yt=>yt,_t$2,_t2$1,_t3$1,_t4$1;const SIZE=44,circularRotateKeyframe=keyframes$1(_t$2||(_t$2=_$2` 130 0% { 131 transform: rotate(0deg); 132 } 133 134 100% { 135 transform: rotate(360deg); 136 } 137`)),circularDashKeyframe=keyframes$1(_t2$1||(_t2$1=_$2` 138 0% { 139 stroke-dasharray: 1px, 200px; 140 stroke-dashoffset: 0; 141 } 142 143 50% { 144 stroke-dasharray: 100px, 200px; 145 stroke-dashoffset: -15px; 146 } 147 148 100% { 149 stroke-dasharray: 100px, 200px; 150 stroke-dashoffset: -125px; 151 } 152`)),useUtilityClasses$p=yt=>{const{classes:_e,variant:$t,color:Ft,disableShrink:Vt}=yt,qt={root:["root",$t,`color${capitalize$1(Ft)}`],svg:["svg"],circle:["circle",`circle${capitalize$1($t)}`,Vt&&"circleDisableShrink"]};return composeClasses(qt,getCircularProgressUtilityClass,_e)},CircularProgressRoot=styled("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,_e[$t.variant],_e[`color${capitalize$1($t.color)}`]]}})(({ownerState:yt,theme:_e})=>_extends$3({display:"inline-block"},yt.variant==="determinate"&&{transition:_e.transitions.create("transform")},yt.color!=="inherit"&&{color:(_e.vars||_e).palette[yt.color].main}),({ownerState:yt})=>yt.variant==="indeterminate"&&css(_t3$1||(_t3$1=_$2` 153 animation: ${0} 1.4s linear infinite; 154 `),circularRotateKeyframe)),CircularProgressSVG=styled("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(yt,_e)=>_e.svg})({display:"block"}),CircularProgressCircle=styled("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.circle,_e[`circle${capitalize$1($t.variant)}`],$t.disableShrink&&_e.circleDisableShrink]}})(({ownerState:yt,theme:_e})=>_extends$3({stroke:"currentColor"},yt.variant==="determinate"&&{transition:_e.transitions.create("stroke-dashoffset")},yt.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:yt})=>yt.variant==="indeterminate"&&!yt.disableShrink&&css(_t4$1||(_t4$1=_$2` 155 animation: ${0} 1.4s ease-in-out infinite; 156 `),circularDashKeyframe)),CircularProgress=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiCircularProgress"}),{className:Vt,color:qt="primary",disableShrink:zt=!1,size:Ht=40,style:Kt,thickness:Gt=3.6,value:Jt=0,variant:Xt="indeterminate"}=Ft,Zt=_objectWithoutPropertiesLoose(Ft,_excluded$s),er=_extends$3({},Ft,{color:qt,disableShrink:zt,size:Ht,thickness:Gt,value:Jt,variant:Xt}),tr=useUtilityClasses$p(er),rr={},ar={},nr={};if(Xt==="determinate"){const cr=2*Math.PI*((SIZE-Gt)/2);rr.strokeDasharray=cr.toFixed(3),nr["aria-valuenow"]=Math.round(Jt),rr.strokeDashoffset=`${((100-Jt)/100*cr).toFixed(3)}px`,ar.transform="rotate(-90deg)"}return jsxRuntimeExports.jsx(CircularProgressRoot,_extends$3({className:clsx$1(tr.root,Vt),style:_extends$3({width:Ht,height:Ht},ar,Kt),ownerState:er,ref:$t,role:"progressbar"},nr,Zt,{children:jsxRuntimeExports.jsx(CircularProgressSVG,{className:tr.svg,ownerState:er,viewBox:`${SIZE/2} ${SIZE/2} ${SIZE} ${SIZE}`,children:jsxRuntimeExports.jsx(CircularProgressCircle,{className:tr.circle,style:rr,ownerState:er,cx:SIZE,cy:SIZE,r:(SIZE-Gt)/2,fill:"none",strokeWidth:Gt})})}))});function mapEventPropToEvent(yt){return yt.substring(2).toLowerCase()}function clickedRootScrollbar(yt,_e){return _e.documentElement.clientWidth<yt.clientX||_e.documentElement.clientHeight<yt.clientY}function ClickAwayListener(yt){const{children:_e,disableReactTree:$t=!1,mou
156seEvent:Ft="onClick",onClickAway:Vt,touchEvent:qt="onTouchEnd"}=yt,zt=reactExports.useRef(!1),Ht=reactExports.useRef(null),Kt=reactExports.useRef(!1),Gt=reactExports.useRef(!1);reactExports.useEffect(()=>(setTimeout(()=>{Kt.current=!0},0),()=>{Kt.current=!1}),[]);const Jt=useForkRef(getReactElementRef(_e),Ht),Xt=useEventCallback(tr=>{const rr=Gt.current;Gt.current=!1;const ar=ownerDocument(Ht.current);if(!Kt.current||!Ht.current||"clientX"in tr&&clickedRootScrollbar(tr,ar))return;if(zt.current){zt.current=!1;return}let nr;tr.composedPath?nr=tr.composedPath().indexOf(Ht.current)>-1:nr=!ar.documentElement.contains(tr.target)||Ht.current.contains(tr.target),!nr&&($t||!rr)&&Vt(tr)}),Zt=tr=>rr=>{Gt.current=!0;const ar=_e.props[tr];ar&&ar(rr)},er={ref:Jt};return qt!==!1&&(er[qt]=Zt(qt)),reactExports.useEffect(()=>{if(qt!==!1){const tr=mapEventPropToEvent(qt),rr=ownerDocument(Ht.current),ar=()=>{zt.current=!0};return rr.addEventListener(tr,Xt),rr.addEventListener("touchmove",ar),()=>{rr.removeEventListener(tr,Xt),rr.removeEventListener("touchmove",ar)}}},[Xt,qt]),Ft!==!1&&(er[Ft]=Zt(Ft)),reactExports.useEffect(()=>{if(Ft!==!1){const tr=mapEventPropToEvent(Ft),rr=ownerDocument(Ht.current);return rr.addEventListener(tr,Xt),()=>{rr.removeEventListener(tr,Xt)}}},[Xt,Ft]),jsxRuntimeExports.jsx(reactExports.Fragment,{children:reactExports.cloneElement(_e,er)})}const Container=createContainer({createStyledComponent:styled("div",{name:"MuiContainer",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,_e[`maxWidth${capitalize$1(String($t.maxWidth))}`],$t.fixed&&_e.fixed,$t.disableGutters&&_e.disableGutters]}}),useThemeProps:yt=>useDefaultProps({props:yt,name:"MuiContainer"})}),html=(yt,_e)=>_extends$3({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},_e&&!yt.vars&&{colorScheme:yt.palette.mode}),body=yt=>_extends$3({color:(yt.vars||yt).palette.text.primary},yt.typography.body1,{backgroundColor:(yt.vars||yt).palette.background.default,"@media print":{backgroundColor:(yt.vars||yt).palette.common.white}}),styles$1=(yt,_e=!1)=>{var $t;const Ft={};_e&&yt.colorSchemes&&Object.entries(yt.colorSchemes).forEach(([zt,Ht])=>{var Kt;Ft[yt.getColorSchemeSelector(zt).replace(/\s*&/,"")]={colorScheme:(Kt=Ht.palette)==null?void 0:Kt.mode}});let Vt=_extends$3({html:html(yt,_e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:yt.typography.fontWeightBold},body:_extends$3({margin:0},body(yt),{"&::backdrop":{backgroundColor:(yt.vars||yt).palette.background.default}})},Ft);const qt=($t=yt.components)==null||($t=$t.MuiCssBaseline)==null?void 0:$t.styleOverrides;return qt&&(Vt=[Vt,qt]),Vt};function CssBaseline(yt){const _e=useDefaultProps({props:yt,name:"MuiCssBaseline"}),{children:$t,enableColorScheme:Ft=!1}=_e;return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(GlobalStyles,{styles:Vt=>styles$1(Vt,Ft)}),$t]})}function isOverflowing(yt){const _e=ownerDocument(yt);return _e.body===yt?ownerWindow(yt).innerWidth>_e.documentElement.clientWidth:yt.scrollHeight>yt.clientHeight}function ariaHidden(yt,_e){_e?yt.setAttribute("aria-hidden","true"):yt.removeAttribute("aria-hidden")}function getPaddingRight(yt){return parseInt(ownerWindow(yt).getComputedStyle(yt).paddingRight,10)||0}function isAriaHiddenForbiddenOnElement(yt){const $t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(yt.tagName)!==-1,Ft=yt.tagName==="INPUT"&&yt.getAttribute("type")==="hidden";return $t||Ft}function ariaHiddenSiblings(yt,_e,$t,Ft,Vt){const qt=[_e,$t,...Ft];[].forEach.call(yt.children,zt=>{const Ht=qt.indexOf(zt)===-1,Kt=!isAriaHiddenForbiddenOnElement(zt);Ht&&Kt&&ariaHidden(zt,Vt)})}function findIndexOf(yt,_e){let $t=-1;return yt.some((Ft,Vt)=>_e(Ft)?($t=Vt,!0):!1),$t}function handleContainer(yt,_e){const $t=[],Ft=yt.container;if(!_e.disableScrollLock){if(isOverflowing(Ft)){const zt=getScrollbarSize(ownerDocument(Ft));$t.push({value:Ft.style.paddingRight,property:"padding-right",el:Ft}),Ft.style.paddingRight=`${getPaddingRight(Ft)+zt}px`;const Ht=ownerDocument(Ft).querySelectorAll(".mui-fixed");[].forEach.call(Ht,Kt=>{$t.push({value:Kt.style.paddingRight,property:"padding-right",el:Kt}),Kt.style.paddingRight=`${getPaddingRight(Kt)+zt}px`})}let qt;if(Ft.parentNode instanceof DocumentFragment)qt=ownerDocument(Ft).body;
156else{const zt=Ft.parentElement,Ht=ownerWindow(Ft);qt=(zt==null?void 0:zt.nodeName)==="HTML"&&Ht.getComputedStyle(zt).overflowY==="scroll"?zt:Ft}$t.push({value:qt.style.overflow,property:"overflow",el:qt},{value:qt.style.overflowX,property:"overflow-x",el:qt},{value:qt.style.overflowY,property:"overflow-y",el:qt}),qt.style.overflow="hidden"}return()=>{$t.forEach(({value:qt,el:zt,property:Ht})=>{qt?zt.style.setProperty(Ht,qt):zt.style.removeProperty(Ht)})}}function getHiddenSiblings(yt){const _e=[];return[].forEach.call(yt.children,$t=>{$t.getAttribute("aria-hidden")==="true"&&_e.push($t)}),_e}class ModalManager{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(_e,$t){let Ft=this.modals.indexOf(_e);if(Ft!==-1)return Ft;Ft=this.modals.length,this.modals.push(_e),_e.modalRef&&ariaHidden(_e.modalRef,!1);const Vt=getHiddenSiblings($t);ariaHiddenSiblings($t,_e.mount,_e.modalRef,Vt,!0);const qt=findIndexOf(this.containers,zt=>zt.container===$t);return qt!==-1?(this.containers[qt].modals.push(_e),Ft):(this.containers.push({modals:[_e],container:$t,restore:null,hiddenSiblings:Vt}),Ft)}mount(_e,$t){const Ft=findIndexOf(this.containers,qt=>qt.modals.indexOf(_e)!==-1),Vt=this.containers[Ft];Vt.restore||(Vt.restore=handleContainer(Vt,$t))}remove(_e,$t=!0){const Ft=this.modals.indexOf(_e);if(Ft===-1)return Ft;const Vt=findIndexOf(this.containers,zt=>zt.modals.indexOf(_e)!==-1),qt=this.containers[Vt];if(qt.modals.splice(qt.modals.indexOf(_e),1),this.modals.splice(Ft,1),qt.modals.length===0)qt.restore&&qt.restore(),_e.modalRef&&ariaHidden(_e.modalRef,$t),ariaHiddenSiblings(qt.container,_e.mount,_e.modalRef,qt.hiddenSiblings,!1),this.containers.splice(Vt,1);else{const zt=qt.modals[qt.modals.length-1];zt.modalRef&&ariaHidden(zt.modalRef,!1)}return Ft}isTopModal(_e){return this.modals.length>0&&this.modals[this.modals.length-1]===_e}}const candidatesSelector=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function getTabIndex(yt){const _e=parseInt(yt.getAttribute("tabindex")||"",10);return Number.isNaN(_e)?yt.contentEditable==="true"||(yt.nodeName==="AUDIO"||yt.nodeName==="VIDEO"||yt.nodeName==="DETAILS")&&yt.getAttribute("tabindex")===null?0:yt.tabIndex:_e}function isNonTabbableRadio(yt){if(yt.tagName!=="INPUT"||yt.type!=="radio"||!yt.name)return!1;const _e=Ft=>yt.ownerDocument.querySelector(`input[type="radio"]${Ft}`);let $t=_e(`[name="${yt.name}"]:checked`);return $t||($t=_e(`[name="${yt.name}"]`)),$t!==yt}function isNodeMatchingSelectorFocusable(yt){return!(yt.disabled||yt.tagName==="INPUT"&&yt.type==="hidden"||isNonTabbableRadio(yt))}function defaultGetTabbable(yt){const _e=[],$t=[];return Array.from(yt.querySelectorAll(candidatesSelector)).forEach((Ft,Vt)=>{const qt=getTabIndex(Ft);qt===-1||!isNodeMatchingSelectorFocusable(Ft)||(qt===0?_e.push(Ft):$t.push({documentOrder:Vt,tabIndex:qt,node:Ft}))}),$t.sort((Ft,Vt)=>Ft.tabIndex===Vt.tabIndex?Ft.documentOrder-Vt.documentOrder:Ft.tabIndex-Vt.tabIndex).map(Ft=>Ft.node).concat(_e)}function defaultIsEnabled(){return!0}function FocusTrap(yt){const{children:_e,disableAutoFocus:$t=!1,disableEnforceFocus:Ft=!1,disableRestoreFocus:Vt=!1,getTabbable:qt=defaultGetTabbable,isEnabled:zt=defaultIsEnabled,open:Ht}=yt,Kt=reactExports.useRef(!1),Gt=reactExports.useRef(null),Jt=reactExports.useRef(null),Xt=reactExports.useRef(null),Zt=reactExports.useRef(null),er=reactExports.useRef(!1),tr=reactExports.useRef(null),rr=useForkRef(getReactElementRef(_e),tr),ar=reactExports.useRef(null);reactExports.useEffect(()=>{!Ht||!tr.current||(er.current=!$t)},[$t,Ht]),reactExports.useEffect(()=>{if(!Ht||!tr.current)return;const fr=ownerDocument(tr.current);return tr.current.contains(fr.activeElement)||(tr.current.hasAttribute("tabIndex")||tr.current.setAttribute("tabIndex","-1"),er.current&&tr.current.focus()),()=>{Vt||(Xt.current&&Xt.current.focus&&(Kt.current=!0,Xt.current.focus()),Xt.current=null)}},[Ht]),reactExports.useEffect(()=>{if(!Ht||!tr.current)return;const fr=ownerDocument(tr.current),vr=Tr=>{ar.current=Tr,!(Ft||!zt()||Tr.key!=="Tab")&&fr.activeElement===tr.current&&Tr.shiftKey&&(Kt.current=!0,Jt.current&&Jt.current.focus())},xr=()=>{const Tr=tr.current;if(Tr===null)return;if(!fr.hasFocus()||!zt()||Kt.current){Kt.current=!1;return}if(Tr.contains(fr.activeElement)||Ft&&fr.activeElement!==Gt.current&&fr.activeElement!==Jt.current)return;if(fr.activeElement!==Zt.current)Zt.current=null;else if(Zt.current!==null)return;if(!er.current)return;let Br=[];if((fr.activeElement===Gt.current||fr.activeElement===Jt.current)&&(Br=qt(tr.current)),Br.length>0){var jr,Rr;const yr=!!((jr=ar.current)!=null&&jr.shiftKey&&((Rr=ar.current)==null?void 0:Rr.key)==="Tab"),sr=Br[0],or=Br[Br.length-1];typeof sr!="string"&&typeof or!="string"&&(yr?or.focus():sr.focus())}else Tr.focus()};fr.addEventListener("focusin",xr),fr.addEventListener("keydown",vr,!0);const Sr=setInterval(()=>{fr.activeElement&&fr.activeElement.tagName==="BODY"&&xr()},50);return()=>{clearInterval(Sr),fr.removeEventListener("focusin",xr),fr.removeEventListener("keydown",vr,!0)}},[$t,Ft,Vt,zt,Ht,qt]);const nr=fr=>{Xt.current===null&&(Xt.current=fr.relatedTarget),er.current=!0,Zt.current=fr.target;const vr=_e.props.onFocus;vr&&vr(fr)},cr=fr=>{Xt.current===null&&(Xt.current=fr.relatedTarget),er.current=!0};return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{tabIndex:Ht?0:-1,onFocus:cr,ref:Gt,"data-testid":"sentinelStart"}),reactExports.cloneElement(_e,{ref:rr,onFocus:nr}),jsxRuntimeExports.jsx("div",{tabIndex:Ht?0:-1,onFocus:cr,ref:Jt,"data-testid":"sentinelEnd"})]})}function getContainer(yt){return typeof yt=="function"?yt():yt}function getHasTransition(yt){return yt?yt.props.hasOwnProperty("in"):!1}const defaultManager=new ModalManager;function useModal(yt){const{container:_e,disableEscapeKeyDown:$t=!1,disableScrollLock:Ft=!1,manager:Vt=defaultManager,closeAfterTransition:qt=!1,onTransitionEnter:zt,onTransitionExited:Ht,children:Kt,onClose:Gt,open:Jt,rootRef:Xt}=yt,Zt=reactExports.useRef({}),er=reactExports.useRef(null),tr=reactExports.useRef(null),rr=useForkRef(tr,Xt),[ar,nr]=reactExports.useState(!Jt),cr=getHasTransition(Kt);let fr=!0;(yt["aria-hidden"]==="false"||yt["aria-hidden"]===!1)&&(fr=!1);const vr=()=>ownerDocument(er.current),xr=()=>(Zt.current.modalRef=tr.current,Zt.current.mount=er.current,Zt.current),Sr=()=>{Vt.mount(xr(),{disableScrollLock:Ft}),tr.current&&(tr.current.scrollTop=0)}
156,Tr=useEventCallback(()=>{const ur=getContainer(_e)||vr().body;Vt.add(xr(),ur),tr.current&&Sr()}),Br=reactExports.useCallback(()=>Vt.isTopModal(xr()),[Vt]),jr=useEventCallback(ur=>{er.current=ur,ur&&(Jt&&Br()?Sr():tr.current&&ariaHidden(tr.current,fr))}),Rr=reactExports.useCallback(()=>{Vt.remove(xr(),fr)},[fr,Vt]);reactExports.useEffect(()=>()=>{Rr()},[Rr]),reactExports.useEffect(()=>{Jt?Tr():(!cr||!qt)&&Rr()},[Jt,Rr,cr,qt,Tr]);const yr=ur=>gr=>{var dr;(dr=ur.onKeyDown)==null||dr.call(ur,gr),!(gr.key!=="Escape"||gr.which===229||!Br())&&($t||(gr.stopPropagation(),Gt&&Gt(gr,"escapeKeyDown")))},sr=ur=>gr=>{var dr;(dr=ur.onClick)==null||dr.call(ur,gr),gr.target===gr.currentTarget&&Gt&&Gt(gr,"backdropClick")};return{getRootProps:(ur={})=>{const gr=extractEventHandlers(yt);delete gr.onTransitionEnter,delete gr.onTransitionExited;const dr=_extends$3({},gr,ur);return _extends$3({role:"presentation"},dr,{onKeyDown:yr(dr),ref:rr})},getBackdropProps:(ur={})=>{const gr=ur;return _extends$3({"aria-hidden":!0},gr,{onClick:sr(gr),open:Jt})},getTransitionProps:()=>{const ur=()=>{nr(!1),zt&&zt()},gr=()=>{nr(!0),Ht&&Ht(),qt&&Rr()};return{onEnter:createChainedFunction(ur,Kt==null?void 0:Kt.props.onEnter),onExited:createChainedFunction(gr,Kt==null?void 0:Kt.props.onExited)}},rootRef:rr,portalRef:jr,isTopModal:Br,exited:ar,hasTransition:cr}}function getModalUtilityClass(yt){return generateUtilityClass("MuiModal",yt)}generateUtilityClasses("MuiModal",["root","hidden","backdrop"]);const _excluded$r=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],useUtilityClasses$o=yt=>{const{open:_e,exited:$t,classes:Ft}=yt;return composeClasses({root:["root",!_e&&$t&&"hidden"],backdrop:["backdrop"]},getModalUtilityClass,Ft)},ModalRoot=styled("div",{name:"MuiModal",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,!$t.open&&$t.exited&&_e.hidden]}})(({theme:yt,ownerState:_e})=>_extends$3({position:"fixed",zIndex:(yt.vars||yt).zIndex.modal,right:0,bottom:0,top:0,left:0},!_e.open&&_e.exited&&{visibility:"hidden"})),ModalBackdrop=styled(Backdrop,{name:"MuiModal",slot:"Backdrop",overridesResolver:(yt,_e)=>_e.backdrop})({zIndex:-1}),Modal=reactExports.forwardRef(function(_e,$t){var Ft,Vt,qt,zt,Ht,Kt;const Gt=useDefaultProps({name:"MuiModal",props:_e}),{BackdropComponent:Jt=ModalBackdrop,BackdropProps:Xt,className:Zt,closeAfterTransition:er=!1,children:tr,container:rr,component:ar,components:nr={},componentsProps:cr={},disableAutoFocus:fr=!1,disableEnforceFocus:vr=!1,disableEscapeKeyDown:xr=!1,disablePortal:Sr=!1,disableRestoreFocus:Tr=!1,disableScrollLock:Br=!1,hideBackdrop:jr=!1,keepMounted:Rr=!1,onBackdropClick:yr,open:sr,slotProps:or,slots:Qt}=Gt,ir=_objectWithoutPropertiesLoose(Gt,_excluded$r),ur=_extends$3({},Gt,{closeAfterTransition:er,disableAutoFocus:fr,disableEnforceFocus:vr,disableEscapeKeyDown:xr,disablePortal:Sr,disableRestoreFocus:Tr,disableScrollLock:Br,hideBackdrop:jr,keepMounted:Rr}),{getRootProps:gr,getBackdropProps:dr,getTransitionProps:lr,portalRef:hr,isTopModal:wr,exited:pr,hasTransition:br}=useModal(_extends$3({},ur,{rootRef:$t})),Dr=_extends$3({},ur,{exited:pr}),_r=useUtilityClasses$o(Dr),Nr={};if(tr.props.tabIndex===void 0&&(Nr.tabIndex="-1"),br){const{onEnter:zr,onExited:Vr}=lr();Nr.onEnter=zr,Nr.onExited=Vr}const kr=(Ft=(Vt=Qt==null?void 0:Qt.root)!=null?Vt:nr.Root)!=null?Ft:ModalRoot,Mr=(qt=(zt=Qt==null?void 0:Qt.backdrop)!=null?zt:nr.Backdrop)!=null?qt:Jt,Lr=(Ht=or==null?void 0:or.root)!=null?Ht:cr.root,Cr=(Kt=or==null?void 0:or.backdrop)!=null?Kt:cr.backdrop,Er=useSlotProps({elementType:kr,externalSlotProps:Lr,externalForwardedProps:ir,getSlotProps:gr,additionalProps:{ref:$t,as:ar},ownerState:Dr,className:clsx$1(Zt,Lr==null?void 0:Lr.className,_r==null?void 0:_r.root,!Dr.open&&Dr.exited&&(_r==null?void 0:_r.hidden))}),Ar=useSlotProps({elementType:Mr,externalSlotProps:Cr,additionalProps:Xt,getSlotProps:zr=>dr(_extends$3({},zr,{onClick:Vr=>{yr&&yr(Vr),zr!=null&&zr.onClick&&zr.onClick(Vr)}
156})),className:clsx$1(Cr==null?void 0:Cr.className,Xt==null?void 0:Xt.className,_r==null?void 0:_r.backdrop),ownerState:Dr});return!Rr&&!sr&&(!br||pr)?null:jsxRuntimeExports.jsx(Portal$2,{ref:hr,container:rr,disablePortal:Sr,children:jsxRuntimeExports.jsxs(kr,_extends$3({},Er,{children:[!jr&&Jt?jsxRuntimeExports.jsx(Mr,_extends$3({},Ar)):null,jsxRuntimeExports.jsx(FocusTrap,{disableEnforceFocus:vr,disableAutoFocus:fr,disableRestoreFocus:Tr,isEnabled:wr,open:sr,children:reactExports.cloneElement(tr,Nr)})]}))})});function getDialogUtilityClass(yt){return generateUtilityClass("MuiDialog",yt)}const dialogClasses=generateUtilityClasses("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),DialogContext=reactExports.createContext({}),_excluded$q=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],DialogBackdrop=styled(Backdrop,{name:"MuiDialog",slot:"Backdrop",overrides:(yt,_e)=>_e.backdrop})({zIndex:-1}),useUtilityClasses$n=yt=>{const{classes:_e,scroll:$t,maxWidth:Ft,fullWidth:Vt,fullScreen:qt}=yt,zt={root:["root"],container:["container",`scroll${capitalize$1($t)}`],paper:["paper",`paperScroll${capitalize$1($t)}`,`paperWidth${capitalize$1(String(Ft))}`,Vt&&"paperFullWidth",qt&&"paperFullScreen"]};return composeClasses(zt,getDialogUtilityClass,_e)},DialogRoot=styled(Modal,{name:"MuiDialog",slot:"Root",overridesResolver:(yt,_e)=>_e.root})({"@media print":{position:"absolute !important"}}),DialogContainer=styled("div",{name:"MuiDialog",slot:"Container",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.container,_e[`scroll${capitalize$1($t.scroll)}`]]}})(({ownerState:yt})=>_extends$3({height:"100%","@media print":{height:"auto"},outline:0},yt.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},yt.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),DialogPaper=styled(Paper,{name:"MuiDialog",slot:"Paper",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.paper,_e[`scrollPaper${capitalize$1($t.scroll)}`],_e[`paperWidth${capitalize$1(String($t.maxWidth))}`],$t.fullWidth&&_e.paperFullWidth,$t.fullScreen&&_e.paperFullScreen]}})(({theme:yt,ownerState:_e})=>_extends$3({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},_e.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},_e.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!_e.maxWidth&&{maxWidth:"calc(100% - 64px)"},_e.maxWidth==="xs"&&{maxWidth:yt.breakpoints.unit==="px"?Math.max(yt.breakpoints.values.xs,444):`max(${yt.breakpoints.values.xs}${yt.breakpoints.unit}, 444px)`,[`&.${dialogClasses.paperScrollBody}`]:{[yt.breakpoints.down(Math.max(yt.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},_e.maxWidth&&_e.maxWidth!=="xs"&&{maxWidth:`${yt.breakpoints.values[_e.maxWidth]}${yt.breakpoints.unit}`,[`&.${dialogClasses.paperScrollBody}`]:{[yt.breakpoints.down(yt.breakpoints.values[_e.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},_e.fullWidth&&{width:"calc(100% - 64px)"},_e.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${dialogClasses.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),Dialog$1=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiDialog"}),Vt=useTheme(),qt={enter:Vt.transitions.duration.enteringScreen,exit:Vt.transitions.duration.leavingScreen},{"aria-describedby":zt,"aria-labelledby":Ht,BackdropComponent:Kt,BackdropProps:Gt,children:Jt,className:Xt,disableEscapeKeyDown:Zt=!1,fullScreen:er=!1,fullWidth:tr=!1,maxWidth:rr="sm",onBackdropClick:ar,onClick:nr,onClose:cr,o
156pen:fr,PaperComponent:vr=Paper,PaperProps:xr={},scroll:Sr="paper",TransitionComponent:Tr=Fade,transitionDuration:Br=qt,TransitionProps:jr}=Ft,Rr=_objectWithoutPropertiesLoose(Ft,_excluded$q),yr=_extends$3({},Ft,{disableEscapeKeyDown:Zt,fullScreen:er,fullWidth:tr,maxWidth:rr,scroll:Sr}),sr=useUtilityClasses$n(yr),or=reactExports.useRef(),Qt=dr=>{or.current=dr.target===dr.currentTarget},ir=dr=>{nr&&nr(dr),or.current&&(or.current=null,ar&&ar(dr),cr&&cr(dr,"backdropClick"))},ur=useId$1(Ht),gr=reactExports.useMemo(()=>({titleId:ur}),[ur]);return jsxRuntimeExports.jsx(DialogRoot,_extends$3({className:clsx$1(sr.root,Xt),closeAfterTransition:!0,components:{Backdrop:DialogBackdrop},componentsProps:{backdrop:_extends$3({transitionDuration:Br,as:Kt},Gt)},disableEscapeKeyDown:Zt,onClose:cr,open:fr,ref:$t,onClick:ir,ownerState:yr},Rr,{children:jsxRuntimeExports.jsx(Tr,_extends$3({appear:!0,in:fr,timeout:Br,role:"presentation"},jr,{children:jsxRuntimeExports.jsx(DialogContainer,{className:clsx$1(sr.container),onMouseDown:Qt,ownerState:yr,children:jsxRuntimeExports.jsx(DialogPaper,_extends$3({as:vr,elevation:24,role:"dialog","aria-describedby":zt,"aria-labelledby":ur},xr,{className:clsx$1(sr.paper,xr.className),ownerState:yr,children:jsxRuntimeExports.jsx(DialogContext.Provider,{value:gr,children:Jt})}))})}))}))});function getDialogActionsUtilityClass(yt){return generateUtilityClass("MuiDialogActions",yt)}generateUtilityClasses("MuiDialogActions",["root","spacing"]);const _excluded$p=["className","disableSpacing"],useUtilityClasses$m=yt=>{const{classes:_e,disableSpacing:$t}=yt;return composeClasses({root:["root",!$t&&"spacing"]},getDialogActionsUtilityClass,_e)},DialogActionsRoot=styled("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,!$t.disableSpacing&&_e.spacing]}})(({ownerState:yt})=>_extends$3({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!yt.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),DialogActions=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiDialogActions"}),{className:Vt,disableSpacing:qt=!1}=Ft,zt=_objectWithoutPropertiesLoose(Ft,_excluded$p),Ht=_extends$3({},Ft,{disableSpacing:qt}),Kt=useUtilityClasses$m(Ht);return jsxRuntimeExports.jsx(DialogActionsRoot,_extends$3({className:clsx$1(Kt.root,Vt),ownerState:Ht,ref:$t},zt))});function getDialogContentUtilityClass(yt){return generateUtilityClass("MuiDialogContent",yt)}generateUtilityClasses("MuiDialogContent",["root","dividers"]);function getDialogTitleUtilityClass(yt){return generateUtilityClass("MuiDialogTitle",yt)}const dialogTitleClasses=generateUtilityClasses("MuiDialogTitle",["root"]),_excluded$o=["className","dividers"],useUtilityClasses$l=yt=>{const{classes:_e,dividers:$t}=yt;return composeClasses({root:["root",$t&&"dividers"]},getDialogContentUtilityClass,_e)},DialogContentRoot=styled("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,$t.dividers&&_e.dividers]}})(({theme:yt,ownerState:_e})=>_extends$3({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},_e.dividers?{padding:"16px 24px",borderTop:`1px solid ${(yt.vars||yt).palette.divider}`,borderBottom:`1px solid ${(yt.vars||yt).palette.divider}`}:{[`.${dialogTitleClasses.root} + &`]:{paddingTop:0}})),DialogContent$1=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiDialogContent"}),{className:Vt,dividers:qt=!1}=Ft,zt=_objectWithoutPropertiesLoose(Ft,_excluded$o),Ht=_extends$3({},Ft,{dividers:qt}),Kt=useUtilityClasses$l(Ht);return jsxRuntimeExports.jsx(DialogContentRoot,_extends$3({className:clsx$1(Kt.root,Vt),ownerState:Ht,ref:$t},zt))}),_excluded$n=["className","id"],useUtilityClasses$k=yt=>{const{classes:_e}=yt;return composeClasses({root:["root"]},getDialogTitleUtilityClass,_e)},DialogTitleRoot=styled(Typography,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(yt,_e)=>_e.root})({padding:"16px 24px",flex:"0 0 auto"}),DialogTitle$1=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiDialogTitle"}
vendor: 12,460 bytes, line 156
156),{className:Vt,id:qt}=Ft,zt=_objectWithoutPropertiesLoose(Ft,_excluded$n),Ht=Ft,Kt=useUtilityClasses$k(Ht),{titleId:Gt=qt}=reactExports.useContext(DialogContext);return jsxRuntimeExports.jsx(DialogTitleRoot,_extends$3({component:"h2",className:clsx$1(Kt.root,Vt),ownerState:Ht,ref:$t,variant:"h6",id:qt??Gt},zt))}),dividerClasses=generateUtilityClasses("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),_excluded$m=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],useUtilityClasses$j=yt=>{const{classes:_e,disableUnderline:$t}=yt,Vt=composeClasses({root:["root",!$t&&"underline"],input:["input"]},getFilledInputUtilityClass,_e);return _extends$3({},_e,Vt)},FilledInputRoot=styled(InputBaseRoot,{shouldForwardProp:yt=>rootShouldForwardProp(yt)||yt==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[...rootOverridesResolver(yt,_e),!$t.disableUnderline&&_e.underline]}})(({theme:yt,ownerState:_e})=>{var $t;const Ft=yt.palette.mode==="light",Vt=Ft?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",qt=Ft?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",zt=Ft?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",Ht=Ft?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return _extends$3({position:"relative",backgroundColor:yt.vars?yt.vars.palette.FilledInput.bg:qt,borderTopLeftRadius:(yt.vars||yt).shape.borderRadius,borderTopRightRadius:(yt.vars||yt).shape.borderRadius,transition:yt.transitions.create("background-color",{duration:yt.transitions.duration.shorter,easing:yt.transitions.easing.easeOut}),"&:hover":{backgroundColor:yt.vars?yt.vars.palette.FilledInput.hoverBg:zt,"@media (hover: none)":{backgroundColor:yt.vars?yt.vars.palette.FilledInput.bg:qt}},[`&.${filledInputClasses.focused}`]:{backgroundColor:yt.vars?yt.vars.palette.FilledInput.bg:qt},[`&.${filledInputClasses.disabled}`]:{backgroundColor:yt.vars?yt.vars.palette.FilledInput.disabledBg:Ht}},!_e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${($t=(yt.vars||yt).palette[_e.color||"primary"])==null?void 0:$t.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:yt.transitions.create("transform",{duration:yt.transitions.duration.shorter,easing:yt.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${filledInputClasses.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${filledInputClasses.error}`]:{"&::before, &::after":{borderBottomColor:(yt.vars||yt).palette.error.main}},"&::before":{borderBottom:`1px solid ${yt.vars?`rgba(${yt.vars.palette.common.onBackgroundChannel} / ${yt.vars.opacity.inputUnderline})`:Vt}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:yt.transitions.create("border-bottom-color",{duration:yt.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${filledInputClasses.disabled}, .${filledInputClasses.error}):before`]:{borderBottom:`1px solid ${(yt.vars||yt).palette.text.primary}`},[`&.${filledInputClasses.disabled}:before`]:{borderBottomStyle:"dotted"}},_e.startAdornment&&{paddingLeft:12},_e.endAdornment&&{paddingRight:12},_e.multiline&&_extends$3({padding:"25px 12px 8px"},_e.size==="small"&&{paddingTop:21,paddingBottom:4},_e.hiddenLabel&&{paddingTop:16,paddingBottom:17},_e.hiddenLabel&&_e.size==="small"&&{paddingTop:8,paddingBottom:9}))}),FilledInputInput=styled(InputBaseComponent,{name:"MuiFilledInput",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:yt,ownerState:_e})=>_extends$3({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!yt.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:yt.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:yt.palette.mode==="light"?null:"#fff",caretColor:yt.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},yt.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[yt.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},_e.size==="small"&&{paddingTop:21,paddingBottom:4},_e.hiddenLabel&&{paddingTop:16,paddingBottom:17},_e.startAdornment&&{paddingLeft:0},_e.endAdornment&&{paddingRight:0},_e.hiddenLabel&&_e.size==="small"&&{paddingTop:8,paddingBottom:9},_e.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),FilledInput=reactExports.forwardRef(function(_e,$t){var Ft,Vt,qt,zt;const Ht=useDefaultProps({props:_e,name:"MuiFilledInput"}),{components:Kt={},componentsProps:Gt,fullWidth:Jt=!1,inputComponent:Xt="input",multiline:Zt=!1,slotProps:er,slots:tr={},type:rr="text"}=Ht,ar=_objectWithoutPropertiesLoose(Ht,_excluded$m),nr=_extends$3({},Ht,{fullWidth:Jt,inputComponent:Xt,multiline:Zt,type:rr}),cr=useUtilityClasses$j(Ht),fr={root:{ownerState:nr},input:{ownerState:nr}},vr=er??Gt?deepmerge$1(fr,er??Gt):fr,xr=(Ft=(Vt=tr.root)!=null?Vt:Kt.Root)!=null?Ft:FilledInputRoot,Sr=(qt=(zt=tr.input)!=null?zt:Kt.Input)!=null?qt:FilledInputInput;return jsxRuntimeExports.jsx(InputBase,_extends$3({slots:{root:xr,input:Sr},componentsProps:vr,fullWidth:Jt,inputComponent:Xt,multiline:Zt,ref:$t,type:rr},ar,{classes:cr}))});FilledInput.muiName="Input";function getFormControlUtilityClasses(yt){return generateUtilityClass("MuiFormControl",yt)}generateUtilityClasses("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const _excluded$l=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],useUtilityClasses$i=yt=>{const{classes:_e,margin:$t,fullWidth:Ft}=yt,Vt={root:["root",$t!=="none"&&`margin${capitalize$1($t)}`,Ft&&"fullWidth"]};return composeClasses(Vt,getFormControlUtilityClasses,_e)},FormControlRoot=styled("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:yt},_e)=>_extends$3({},_e.root,_e[`margin${capitalize$1(yt.margin)}`],yt.fullWidth&&_e.fullWidth)})(({ownerState:yt})=>_extends$3({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},yt.margin==="normal"&&{marginTop:16,marginBottom:8},yt.margin==="dense"&&{marginTop:8,marginBottom:4},yt.fullWidth&&{width:"100%"})),FormControl=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiFormControl"}),{children:Vt,className:qt,color:zt="primary",component:Ht="div",disabled:Kt=!1,error:Gt=!1,focused:Jt,fullWidth:Xt=!1,hiddenLabel:Zt=!1,margin:er="none",required:tr=!1,size:rr="medium",variant:ar="outlined"}=Ft,nr=_objectWithoutPropertiesLoose(Ft,_excluded$l),cr=_extends$3({},Ft,{color:zt,component:Ht,disabled:Kt,error:Gt,fullWidth:Xt,hiddenLabel:Zt,margin:er,required:tr,size:rr,variant:ar}),fr=useUtilityClasses$i(cr),[vr,xr]=reactExports.useState(()=>{let or=!1;return Vt&&reactExports.Children.forEach(Vt,Qt=>{if(!isMuiElement(Qt,["Input","Select"]))return;const ir=isMuiElement(Qt,["Select"])?Qt.props.input:Qt;ir&&isAdornedStart(ir.props)&&(or=!0)}),or}),[Sr,Tr]=reactExports.useState(()=>{let or=!1;return Vt&&reactExports.Children.forEach(Vt,Qt=>{isMuiElement(Qt,["Input","Select"])&&(isFilled(Qt.props,!0)||isFilled(Qt.props.inputProps,!0))&&(or=!0)}),or}),[Br,jr]=reactExports.useState(!1);Kt&&Br&&jr(!1);const Rr=Jt!==void 0&&!Kt?Jt:Br;let yr;const sr=reactExports.useMemo(()=>({adornedStart:vr,setAdornedStart:xr,color:zt,disabled:Kt,error:Gt,filled:Sr,focused:Rr,fullWidth:Xt,hiddenLabel:Zt,size:rr,onBlur:()=>{jr(!1)},onEmpty:()=>{Tr(!1)},onFilled:()=>{Tr(!0)},onFocus:()=>{jr(!0)},registerEffect:yr,required:tr,variant:ar}),[vr,zt,Kt,Gt,Sr,Rr,Xt,Zt,yr,tr,rr,ar]);return jsxRuntimeExports.jsx(FormControlContext.Provider,{value:sr,children:jsxRuntimeExports.jsx(FormControlRoot,_extends$3({as:Ht,ownerState:cr,className:clsx$1(fr.root,qt),ref:$t},nr,{children:Vt}))})});function getFormHelperTextUtilityClasses(yt){return generateUtilityClass("MuiFormHelperText",yt)}const formHelperTextClasses=generateUtilityClasses("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var _span$3;const _excluded$k=["children","className","component","disabled","error","filled","focused","margin","required","variant"],useUtilityClasses$h=yt=>{const{classes:_e,contained:$t,size:Ft,disabled:Vt,error:qt,filled:zt,focused:Ht,required:Kt}=yt,Gt={root:["root",Vt&&"disabled",qt&&"error",Ft&&`size${capitalize$1(Ft)}`,$t&&"contained",Ht&&"focused",zt&&"filled",Kt&&"required"]};return composeClasses(Gt,getFormHelperTextUtilityClasses,_e)},FormHelperTextRoot=styled("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,$t.size&&_e[`size${capitalize$1($t.size)}`],$t.contained&&_e.contained,$t.filled&&_e.filled]}})(({theme:yt,ownerState:_e})=>_extends$3({color:(yt.vars||yt).palette.text.secondary},yt.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${formHelperTextClasses.disabled}`]:{color:(yt.vars||yt).palette.text.disabled},[`&.${formHelperTextClasses.error}`]:{color:(yt.vars||yt).palette.error.main}},_e.size==="small"&&{marginTop:4},_e.contained&&{marginLeft:14,marginRight:14})),FormHelperText=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiFormHelperText"}),{children:Vt,className:qt,component:zt="p"}=Ft,Ht=_objectWithoutPropertiesLoose(Ft,_excluded$k),Kt=useFormControl(),Gt=formControlState({props:Ft,muiFormControl:Kt,states:["variant","size","disabled","error","filled","focused","required"]}),Jt=_extends$3({},Ft,{component:zt,contained:Gt.variant==="filled"||Gt.variant==="outlined",variant:Gt.variant,size:Gt.size,disabled:Gt.disabled,error:Gt.error,filled:Gt.filled,focused:Gt.focused,required:Gt.required}),Xt=useUtilityClasses$h(Jt);return jsxRuntimeExports.jsx(FormHelperTextRoot,_extends$3({as:zt,ownerState:Jt,className:clsx$1(Xt.root,qt),ref:$t},Ht,{children:Vt===" "?_span$3||(_span$3=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"â"})):Vt}))});function getFormLabelUtilityClasses(yt){return generateUtilityClass("MuiFormLabel",yt)}const formLabelClasses=generateUtilityClasses("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),_excluded$j=["children","className","color","component","disabled","error","filled","focused","required"],useUtilityClasses$g=yt=>{const{classes:_e,color:$t,focused:Ft,disabled:Vt,error:qt,filled:zt,required:Ht}=yt,Kt={root:["root",`color${capitalize$1($t)}`,Vt&&"disabled",qt&&"error",zt&&"filled",Ft&&"focused",Ht&&"required"],asterisk:["asterisk",qt&&"error"]};return composeClasses(Kt,getFormLabelUtilityClasses,_e)},FormLabelRoot=styled("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:yt},_e)=>_extends$3({},_e.root,yt.color==="secondary"&&_e.colorSecondary,yt.filled&&_e.filled)})(({theme:yt,ownerState:_e})=>_extends$3({color:(yt.vars||yt).palette.text.secondary},yt.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${formLabelClasses.focused}`]:{color:(yt.vars||yt).palette[_e.color].main},[`&.${formLabelClasses.disabled}`]:{color:(yt.vars||yt).palette.text.disabled},[`&.${formLabelClasses.error}`]:{color:(yt.vars||yt).palette.error.main}})),AsteriskComponent=styled("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(yt,_e)=>_e.asterisk})(({theme:yt})=>({[`&.${formLabelClasses.error}`]:{color:(yt.vars||yt).palette.error.main}})),FormLabel=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiFormLabel"}),{children:Vt,className:qt,component:zt="label"}=Ft,Ht=_objectWithoutPropertiesLoose(Ft,_excluded$j),Kt=useFormControl(),Gt=formControlState({props:Ft,muiFormControl:Kt,states:["color","required","focused","disabled","error","filled"]}),Jt=_extends$3({},Ft,{color:Gt.color||"primary",component:zt,disabled:Gt.disabled,error:Gt.error,filled:Gt.filled,focused:Gt.focused,required:Gt.required}),Xt=useUtilityClasses$g(Jt);return jsxRuntimeExports.jsxs(FormLabelRoot,_extends$3({as:zt,ownerState:Jt,className:clsx$1(Xt.root,qt),ref:$t},Ht,{children:[Vt,Gt.required&&jsxRuntimeExports.jsxs(AsteriskComponent,{ownerState:Jt,"aria-hidden":!0,
156className:Xt.asterisk,children:["â","*"]})]}))}),GridContext=reactExports.createContext();function getGridUtilityClass(yt){return generateUtilityClass("MuiGrid",yt)}const SPACINGS=[0,1,2,3,4,5,6,7,8,9,10],DIRECTIONS=["column-reverse","column","row-reverse","row"],WRAPS=["nowrap","wrap-reverse","wrap"],GRID_SIZES=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],gridClasses=generateUtilityClasses("MuiGrid",["root","container","item","zeroMinWidth",...SPACINGS.map(yt=>`spacing-xs-${yt}`),...DIRECTIONS.map(yt=>`direction-xs-${yt}`),...WRAPS.map(yt=>`wrap-xs-${yt}`),...GRID_SIZES.map(yt=>`grid-xs-${yt}`),...GRID_SIZES.map(yt=>`grid-sm-${yt}`),...GRID_SIZES.map(yt=>`grid-md-${yt}`),...GRID_SIZES.map(yt=>`grid-lg-${yt}`),...GRID_SIZES.map(yt=>`grid-xl-${yt}`)]),_excluded$i=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function getOffset$1(yt){const _e=parseFloat(yt);return`${_e}${String(yt).replace(String(_e),"")||"px"}`}function generateGrid({theme:yt,ownerState:_e}){let $t;return yt.breakpoints.keys.reduce((Ft,Vt)=>{let qt={};if(_e[Vt]&&($t=_e[Vt]),!$t)return Ft;if($t===!0)qt={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if($t==="auto")qt={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const zt=resolveBreakpointValues({values:_e.columns,breakpoints:yt.breakpoints.values}),Ht=typeof zt=="object"?zt[Vt]:zt;if(Ht==null)return Ft;const Kt=`${Math.round($t/Ht*1e8)/1e6}%`;let Gt={};if(_e.container&&_e.item&&_e.columnSpacing!==0){const Jt=yt.spacing(_e.columnSpacing);if(Jt!=="0px"){const Xt=`calc(${Kt} + ${getOffset$1(Jt)})`;Gt={flexBasis:Xt,maxWidth:Xt}}}qt=_extends$3({flexBasis:Kt,flexGrow:0,maxWidth:Kt},Gt)}return yt.breakpoints.values[Vt]===0?Object.assign(Ft,qt):Ft[yt.breakpoints.up(Vt)]=qt,Ft},{})}function generateDirection({theme:yt,ownerState:_e}){const $t=resolveBreakpointValues({values:_e.direction,breakpoints:yt.breakpoints.values});return handleBreakpoints({theme:yt},$t,Ft=>{const Vt={flexDirection:Ft};return Ft.indexOf("column")===0&&(Vt[`& > .${gridClasses.item}`]={maxWidth:"none"}),Vt})}function extractZeroValueBreakpointKeys({breakpoints:yt,values:_e}){let $t="";Object.keys(_e).forEach(Vt=>{$t===""&&_e[Vt]!==0&&($t=Vt)});const Ft=Object.keys(yt).sort((Vt,qt)=>yt[Vt]-yt[qt]);return Ft.slice(0,Ft.indexOf($t))}function generateRowGap({theme:yt,ownerState:_e}){const{container:$t,rowSpacing:Ft}=_e;let Vt={};if($t&&Ft!==0){const qt=resolveBreakpointValues({values:Ft,breakpoints:yt.breakpoints.values});let zt;typeof qt=="object"&&(zt=extractZeroValueBreakpointKeys({breakpoints:yt.breakpoints.values,values:qt})),Vt=handleBreakpoints({theme:yt},qt,(Ht,Kt)=>{var Gt;const Jt=yt.spacing(Ht);return Jt!=="0px"?{marginTop:`-${getOffset$1(Jt)}`,[`& > .${gridClasses.item}`]:{paddingTop:getOffset$1(Jt)}}:(Gt=zt)!=null&&Gt.includes(Kt)?{}:{marginTop:0,[`& > .${gridClasses.item}`]:{paddingTop:0}}})}return Vt}function generateColumnGap({theme:yt,ownerState:_e}){const{container:$t,columnSpacing:Ft}=_e;let Vt={};if($t&&Ft!==0){const qt=resolveBreakpointValues({values:Ft,breakpoints:yt.breakpoints.values});let zt;typeof qt=="object"&&(zt=extractZeroValueBreakpointKeys({breakpoints:yt.breakpoints.values,values:qt})),Vt=handleBreakpoints({theme:yt},qt,(Ht,Kt)=>{var Gt;const Jt=yt.spacing(Ht);return Jt!=="0px"?{width:`calc(100% + ${getOffset$1(Jt)})`,marginLeft:`-${getOffset$1(Jt)}`,[`& > .${gridClasses.item}`]:{paddingLeft:getOffset$1(Jt)}}:(Gt=zt)!=null&&Gt.includes(Kt)?{}:{width:"100%",marginLeft:0,[`& > .${gridClasses.item}`]:{paddingLeft:0}}})}return Vt}function resolveSpacingStyles(yt,_e,$t={}){if(!yt||yt<=0)return[];if(typeof yt=="string"&&!Number.isNaN(Number(yt))||typeof yt=="number")return[$t[`spacing-xs-${String(yt)}`]];const Ft=[];return _e.forEach(Vt=>{const qt=yt[Vt];Number(qt)>0&&Ft.push($t[`spacing-${Vt}-${String(qt)}`])}),Ft}const GridRoot=styled("div",{name:"MuiGrid",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt,{container:Ft,direction:Vt,item:qt,spacing:zt,wrap:Ht,zeroMinWidth:Kt,breakpoints:Gt}=$t;let Jt=[];Ft&&(Jt=resolveSpacingStyles(zt,Gt,_e));const Xt=[];return Gt.forEach(Zt=>{const er=$t[Zt];er&&Xt.push(_e[`grid-${Zt}-${String(er)}`])}),[_e.root,Ft&&_e.container,qt&&_e.item,Kt&&_e.zeroMinWidth,...Jt,Vt!=="row"&&_e[`direction-xs-${String(Vt)}`],Ht!=="wrap"&&_e[`wrap-xs-${String(Ht)}`],...Xt]}})(({ownerState:yt})=>_extends$3({boxSizing:"border-box"},yt.container&&{display:"flex",flexWrap:"wrap",width:"100%"},yt.item&&{margin:0},yt.zeroMinWidth&&{minWidth:0},yt.wrap!=="wrap"&&{flexWrap:yt.wrap}),generateDirection,generateRowGap,generateColumnGap,generateGrid);function resolveSpacingClasses(yt,_e){if(!yt||yt<=0)return[];if(typeof yt=="string"&&!Number.isNaN(Number(yt))||typeof yt=="number")return[`spacing-xs-${String(yt)}`];const $t=[];return _e.forEach(Ft=>{const Vt=yt[Ft];if(Number(Vt)>0){const qt=`spacing-${Ft}-${String(Vt)}`;$t.push(qt)}}),$t}const useUtilityClasses$f=yt=>{const{classes:_e,container:$t,direction:Ft,item:Vt,spacing:qt,wrap:zt,zeroMinWidth:Ht,breakpoints:Kt}=yt;let Gt=[];$t&&(Gt=resolveSpacingClasses(qt,Kt));const Jt=[];Kt.forEach(Zt=>{const er=yt[Zt];er&&Jt.push(`grid-${Zt}-${String(er)}`)});const Xt={root:["root",$t&&"container",Vt&&"item",Ht&&"zeroMinWidth",...Gt,Ft!=="row"&&`direction-xs-${String(Ft)}`,zt!=="wrap"&&`wrap-xs-${String(zt)}`,...Jt]};return composeClasses(Xt,getGridUtilityClass,_e)},Grid=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiGrid"}),{breakpoints:Vt}=useTheme(),qt=extendSxProp(Ft),{className:zt,columns:Ht,columnSpacing:Kt,component:Gt="div",container:Jt=!1,direction:Xt="row",item:Zt=!1,rowSpacing:er,spacing:tr=0,wrap:rr="wrap",zeroMinWidth:ar=!1}=qt,nr=_objectWithoutPropertiesLoose(qt,_excluded$i),cr=er||tr,fr=Kt||tr,vr=reactExports.useContext(GridContext),xr=Jt?Ht||12:vr,Sr={},Tr=_extends$3({},nr);Vt.keys.forEach(Rr=>{nr[Rr]!=null&&(Sr[Rr]=nr[Rr],delete Tr[Rr])});const Br=_extends$3({},qt,{columns:xr,container:Jt,direction:Xt,item:Zt,rowSpacing:cr,columnSpacing:fr,wrap:rr,zeroMinWidth:ar,spacing:tr},Sr,{breakpoints:Vt.keys}),jr=useUtilityClasses$f(Br);return jsxRuntimeExports.jsx(GridContext.Provider,{value:xr,children:jsxRuntimeExports.jsx(GridRoot,_extends$3({ownerState:Br,className:clsx$1(jr.root,zt),as:Gt,ref:$t},Tr))})}),_excluded$h=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function getScale(yt){return`scale(${yt}, ${yt**2})`}const styles={entering:{opacity:1,transform:getScale(1)},entered:{opacity:1,transform:"none"}},isWebKit154=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Grow=reactExports.forwardRef(function(_e,$t){const{addEndListener:Ft,appear:Vt=!0,children:qt,easing:zt,in:Ht,onEnter:Kt,onEntered:Gt,onEntering:Jt,onExit:Xt,onExited:Zt,onExiting:er,style:tr,timeout:rr="auto",TransitionComponent:ar=Transition}=_e,nr=_objectWithoutPropertiesLoose(_e,_excluded$h),cr=useTimeout(),fr=reactExports.useRef(),vr=useTheme(),xr=reactExports.useRef(null),Sr=useForkRef(xr,getReactElementRef(qt),$t),Tr=ir=>ur=>{if(ir){const gr=xr.current;ur===void 0?ir(gr):ir(gr,ur)}},Br=Tr(Jt),jr=Tr((ir,ur)=>{reflow(ir);const{duration:gr,delay:dr,easing:lr}=getTransitionProps({style:tr,timeout:rr,easing:zt},{mode:"enter"});let hr;rr==="auto"?(hr=vr.transitions.getAutoHeightDuration(ir.clientHeight),fr.current=hr):hr=gr,ir.style.transition=[vr.transitions.create("opacity",{duration:hr,delay:dr}),vr.transitions.create("transform",{duration:isWebKit154?hr:hr*.666,delay:dr,easing:lr})].join(","),Kt&&Kt(ir,ur)}),Rr=Tr(Gt),yr=Tr(er),sr=Tr(ir=>{const{duration:ur,delay:gr,easing:dr}=getTransitionProps({style:tr,timeout:rr,easing:zt},{mode:"exit"});let lr;rr==="auto"?(lr=vr.transitions.getAutoHeightDuration(ir.clientHeight),fr.current=lr):lr=ur,ir.style.transition=[vr.transitions.create("opacity",{duration:lr,delay:gr}),vr.transitions.create("transform",{duration:isWebKit154?lr:lr*.666,delay:isWebKit154?gr:gr||lr*.333,easing:dr})].join(","),ir.style.opacity=0,ir.style.transform=getScale(.75),Xt&&Xt(ir)}),or=Tr(Zt),Qt=ir=>{rr==="auto"&&cr.start(fr.current||0,ir),Ft&&Ft(xr.current,ir)};return jsxRuntimeExports.jsx(ar,_extends$3({appear:Vt,in:Ht,nodeRef:xr,onEnter:jr,onEntered:Rr,onEntering:Br,onExit:sr,onExited:or,onExiting:yr,addEndListener:Qt,timeout:rr==="auto"?null:rr},nr,{children:(ir,ur)=>reactExports.cloneElement(qt,_extends$3({style:_extends$3({opacity:0,transform:getScale(.75),visibility:ir==="exited"&&!Ht?"hidden":void 0},styles[ir],tr,qt.props.style),ref:Sr},ur))}))});Grow.muiSupportAuto=!0;const _excluded$g=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","
156slots","type"],useUtilityClasses$e=yt=>{const{classes:_e,disableUnderline:$t}=yt,Vt=composeClasses({root:["root",!$t&&"underline"],input:["input"]},getInputUtilityClass,_e);return _extends$3({},_e,Vt)},InputRoot=styled(InputBaseRoot,{shouldForwardProp:yt=>rootShouldForwardProp(yt)||yt==="classes",name:"MuiInput",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[...rootOverridesResolver(yt,_e),!$t.disableUnderline&&_e.underline]}})(({theme:yt,ownerState:_e})=>{let Ft=yt.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return yt.vars&&(Ft=`rgba(${yt.vars.palette.common.onBackgroundChannel} / ${yt.vars.opacity.inputUnderline})`),_extends$3({position:"relative"},_e.formControl&&{"label + &":{marginTop:16}},!_e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(yt.vars||yt).palette[_e.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:yt.transitions.create("transform",{duration:yt.transitions.duration.shorter,easing:yt.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${inputClasses.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${inputClasses.error}`]:{"&::before, &::after":{borderBottomColor:(yt.vars||yt).palette.error.main}},"&::before":{borderBottom:`1px solid ${Ft}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:yt.transitions.create("border-bottom-color",{duration:yt.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${inputClasses.disabled}, .${inputClasses.error}):before`]:{borderBottom:`2px solid ${(yt.vars||yt).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${Ft}`}},[`&.${inputClasses.disabled}:before`]:{borderBottomStyle:"dotted"}})}),InputInput=styled(InputBaseComponent,{name:"MuiInput",slot:"Input",overridesResolver:inputOverridesResolver})({}),Input=reactExports.forwardRef(function(_e,$t){var Ft,Vt,qt,zt;const Ht=useDefaultProps({props:_e,name:"MuiInput"}),{disableUnderline:Kt,components:Gt={},componentsProps:Jt,fullWidth:Xt=!1,inputComponent:Zt="input",multiline:er=!1,slotProps:tr,slots:rr={},type:ar="text"}=Ht,nr=_objectWithoutPropertiesLoose(Ht,_excluded$g),cr=useUtilityClasses$e(Ht),vr={root:{ownerState:{disableUnderline:Kt}}},xr=tr??Jt?deepmerge$1(tr??Jt,vr):vr,Sr=(Ft=(Vt=rr.root)!=null?Vt:Gt.Root)!=null?Ft:InputRoot,Tr=(qt=(zt=rr.input)!=null?zt:Gt.Input)!=null?qt:InputInput;return jsxRuntimeExports.jsx(InputBase,_extends$3({slots:{root:Sr,input:Tr},slotProps:xr,fullWidth:Xt,inputComponent:Zt,multiline:er,ref:$t,type:ar},nr,{classes:cr}))});Input.muiName="Input";function getInputAdornmentUtilityClass(yt){return generateUtilityClass("MuiInputAdornment",yt)}const inputAdornmentClasses=generateUtilityClasses("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var _span$2;const _excluded$f=["children","className","component","disablePointerEvents","disableTypography","position","variant"],overridesResolver$1=(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,_e[`position${capitalize$1($t.position)}`],$t.disablePointerEvents===!0&&_e.disablePointerEvents,_e[$t.variant]]},useUtilityClasses$d=yt=>{const{classes:_e,disablePointerEvents:$t,hiddenLabel:Ft,position:Vt,size:qt,variant:zt}=yt,Ht={root:["root",$t&&"disablePointerEvents",Vt&&`position${capitalize$1(Vt)}`,zt,Ft&&"hiddenLabel",qt&&`size${capitalize$1(qt)}`]};return composeClasses(Ht,getInputAdornmentUtilityClass,_e)},InputAdornmentRoot=styled("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:overridesResolver$1})(({theme:yt,ownerState:_e})=>_extends$3({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(yt.vars||yt).palette.action.active},_e.variant==="filled"&&{[`&.${inputAdornmentClasses.positionStart}&:not(.${inputAdornmentClasses.hiddenLabel})`]:{marginTop:16}},_e.position==="start"&&{marginRight:8},_e.position==="end"&&{marginLeft:8},_e.disablePointerEvents===!0&&{pointerEvents:"none"})),InputAdornment=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiInputAdornment"}),{children:Vt,className:qt,component:zt="div",disablePointerEvents:Ht=!1,disableTypography:Kt=!1,position:Gt,variant:Jt}=Ft,Xt=_objectWithoutPropertiesLoose(Ft,_excluded$f),Zt=useFormControl()||{};let er=Jt;Jt&&Zt.variant,Zt&&!er&&(er=Zt.variant);const tr=_extends$3({},Ft,{hiddenLabel:Zt.hiddenLabel,size:Zt.size,disablePointerEvents:Ht,position:Gt,variant:er}),rr=useUtilityClasses$d(tr);return jsxRuntimeExports.jsx(FormControlContext.Provider,{value:null,children:jsxRuntimeExports.jsx(InputAdornmentRoot,_extends$3({as:zt,ownerState:tr,className:clsx$1(rr.root,qt),ref:$t},Xt,{children:typeof Vt=="string"&&!Kt?jsxRuntimeExports.jsx(Typography,{color:"text.secondary",children:Vt}):jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[Gt==="start"?_span$2||(_span$2=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"â"})):null,Vt]}
vendor: 16,720 bytes, lines 156-209
156)}))})});function getInputLabelUtilityClasses(yt){return generateUtilityClass("MuiInputLabel",yt)}generateUtilityClasses("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const _excluded$e=["disableAnimation","margin","shrink","variant","className"],useUtilityClasses$c=yt=>{const{classes:_e,formControl:$t,size:Ft,shrink:Vt,disableAnimation:qt,variant:zt,required:Ht}=yt,Kt={root:["root",$t&&"formControl",!qt&&"animated",Vt&&"shrink",Ft&&Ft!=="normal"&&`size${capitalize$1(Ft)}`,zt],asterisk:[Ht&&"asterisk"]},Gt=composeClasses(Kt,getInputLabelUtilityClasses,_e);return _extends$3({},_e,Gt)},InputLabelRoot=styled(FormLabel,{shouldForwardProp:yt=>rootShouldForwardProp(yt)||yt==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[{[`& .${formLabelClasses.asterisk}`]:_e.asterisk},_e.root,$t.formControl&&_e.formControl,$t.size==="small"&&_e.sizeSmall,$t.shrink&&_e.shrink,!$t.disableAnimation&&_e.animated,$t.focused&&_e.focused,_e[$t.variant]]}})(({theme:yt,ownerState:_e})=>_extends$3({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},_e.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},_e.size==="small"&&{transform:"translate(0, 17px) scale(1)"},_e.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!_e.disableAnimation&&{transition:yt.transitions.create(["color","transform","max-width"],{duration:yt.transitions.duration.shorter,easing:yt.transitions.easing.easeOut})},_e.variant==="filled"&&_extends$3({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},_e.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},_e.shrink&&_extends$3({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},_e.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),_e.variant==="outlined"&&_extends$3({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},_e.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},_e.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),InputLabel=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({name:"MuiInputLabel",props:_e}),{disableAnimation:Vt=!1,shrink:qt,className:zt}=Ft,Ht=_objectWithoutPropertiesLoose(Ft,_excluded$e),Kt=useFormControl();let Gt=qt;typeof Gt>"u"&&Kt&&(Gt=Kt.filled||Kt.focused||Kt.adornedStart);const Jt=formControlState({props:Ft,muiFormControl:Kt,states:["size","variant","required","focused"]}),Xt=_extends$3({},Ft,{disableAnimation:Vt,formControl:Kt,shrink:Gt,size:Jt.size,variant:Jt.variant,required:Jt.required,focused:Jt.focused}),Zt=useUtilityClasses$c(Xt);return jsxRuntimeExports.jsx(InputLabelRoot,_extends$3({"data-shrink":Gt,ownerState:Xt,ref:$t,className:clsx$1(Zt.root,zt)},Ht,{classes:Zt}))});function getLinearProgressUtilityClass(yt){return generateUtilityClass("MuiLinearProgress",yt)}generateUtilityClasses("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const _excluded$d=["className","color","value","valueBuffer","variant"];let _$1=yt=>yt,_t$1,_t2,_t3,_t4,_t5,_t6;const TRANSITION_DURATION=4,indeterminate1Keyframe=keyframes$1(_t$1||(_t$1=_$1` 157 0% { 158 left: -35%; 159 right: 100%; 160 } 161 162 60% { 163 left: 100%; 164 right: -90%; 165 } 166 167 100% { 168 left: 100%; 169 right: -90%; 170 } 171`)),indeterminate2Keyframe=keyframes$1(_t2||(_t2=_$1` 172 0% { 173 left: -200%; 174 right: 100%; 175 } 176 177 60% { 178 left: 107%; 179 right: -8%; 180 } 181 182 100% { 183 left: 107%; 184 right: -8%; 185 } 186`)),bufferKeyframe=keyframes$1(_t3||(_t3=_$1` 187 0% { 188 opacity: 1; 189 background-position: 0 -23px; 190 } 191 192 60% { 193 opacity: 0; 194 background-position: 0 -23px; 195 } 196 197 100% { 198 opacity: 1; 199 background-position: -200px -23px; 200 } 201`)),useUtilityClasses$b=yt=>{const{classes:_e,variant:$t,color:Ft}=yt,Vt={root:["root",`color${capitalize$1(Ft)}`,$t],dashed:["dashed",`dashedColor${capitalize$1(Ft)}`],bar1:["bar",`barColor${capitalize$1(Ft)}`,($t==="indeterminate"||$t==="query")&&"bar1Indeterminate",$t==="determinate"&&"bar1Determinate",$t==="buffer"&&"bar1Buffer"],bar2:["bar",$t!=="buffer"&&`barColor${capitalize$1(Ft)}`,$t==="buffer"&&`color${capitalize$1(Ft)}`,($t==="indeterminate"||$t==="query")&&"bar2Indeterminate",$t==="buffer"&&"bar2Buffer"]};return composeClasses(Vt,getLinearProgressUtilityClass,_e)},getColorShade=(yt,_e)=>_e==="inherit"?"currentColor":yt.vars?yt.vars.palette.LinearProgress[`${_e}Bg`]:yt.palette.mode==="light"?lighten_1(yt.palette[_e].main,.62):darken_1(yt.palette[_e].main,.5),LinearProgressRoot=styled("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,_e[`color${capitalize$1($t.color)}`],_e[$t.variant]]}})(({ownerState:yt,theme:_e})=>_extends$3({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:getColorShade(_e,yt.color)},yt.color==="inherit"&&yt.variant!=="buffer"&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},yt.variant==="buffer"&&{backgroundColor:"transparent"},yt.variant==="query"&&{transform:"rotate(180deg)"})),LinearProgressDashed=styled("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.dashed,_e[`dashedColor${capitalize$1($t.color)}`]]}})(({ownerState:yt,theme:_e})=>{const $t=getColorShade(_e,yt.color);return _extends$3({position:"absolute",marginTop:0,height:"100%",width:"100%"},yt.color==="inherit"&&{opacity:.3},{backgroundImage:`radial-gradient(${$t} 0%, ${$t} 16%, transparent 42%)`,backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})},css(_t4||(_t4=_$1` 202 animation: ${0} 3s infinite linear; 203 `),bufferKeyframe)),LinearProgressBar1=styled("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.bar,_e[`barColor${capitalize$1($t.color)}`],($t.variant==="indeterminate"||$t.variant==="query")&&_e.bar1Indeterminate,$t.variant==="determinate"&&_e.bar1Determinate,$t.variant==="buffer"&&_e.bar1Buffer]}})(({ownerState:yt,theme:_e})=>_extends$3({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:yt.color==="inherit"?"currentColor":(_e.vars||_e).palette[yt.color].main},yt.variant==="determinate"&&{transition:`transform .${TRANSITION_DURATION}s linear`},yt.variant==="buffer"&&{zIndex:1,transition:`transform .${TRANSITION_DURATION}s linear`}),({ownerState:yt})=>(yt.variant==="indeterminate"||yt.variant==="query")&&css(_t5||(_t5=_$1` 204 width: auto; 205 animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; 206 `),indeterminate1Keyframe)),LinearProgressBar2=styled("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.bar,_e[`barColor${capitalize$1($t.color)}`],($t.variant==="indeterminate"||$t.variant==="query")&&_e.bar2Indeterminate,$t.variant==="buffer"&&_e.bar2Buffer]}})(({ownerState:yt,theme:_e})=>_extends$3({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},yt.variant!=="buffer"&&{backgroundColor:yt.color==="inherit"?"currentColor":(_e.vars||_e).palette[yt.color].main},yt.color==="inherit"&&{opacity:.3},yt.variant==="buffer"&&{backgroundColor:getColorShade(_e,yt.color),transition:`transform .${TRANSITION_DURATION}s linear`}),({ownerState:yt})=>(yt.variant==="indeterminate"||yt.variant==="query")&&css(_t6||(_t6=_$1` 207 width: auto; 208 animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; 209 `),indeterminate2Keyframe)),LinearProgress=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiLinearProgress"}),{className:Vt,color:qt="primary",value:zt,valueBuffer:Ht,variant:Kt="indeterminate"}=Ft,Gt=_objectWithoutPropertiesLoose(Ft,_excluded$d),Jt=_extends$3({},Ft,{color:qt,variant:Kt}),Xt=useUtilityClasses$b(Jt),Zt=useRtl(),er={},tr={bar1:{},bar2:{}};if((Kt==="determinate"||Kt==="buffer")&&zt!==void 0){er["aria-valuenow"]=Math.round(zt),er["aria-valuemin"]=0,er["aria-valuemax"]=100;let rr=zt-100;Zt&&(rr=-rr),tr.bar1.transform=`translateX(${rr}%)`}if(Kt==="buffer"&&Ht!==void 0){let rr=(Ht||0)-100;Zt&&(rr=-rr),tr.bar2.transform=`translateX(${rr}%)`}return jsxRuntimeExports.jsxs(LinearProgressRoot,_extends$3({className:clsx$1(Xt.root,Vt),ownerState:Jt,role:"progressbar"},er,{ref:$t},Gt,{children:[Kt==="buffer"?jsxRuntimeExports.jsx(LinearProgressDashed,{className:Xt.dashed,ownerState:Jt}):null,jsxRuntimeExports.jsx(LinearProgressBar1,{className:Xt.bar1,ownerState:Jt,style:tr.bar1}),Kt==="determinate"?null:jsxRuntimeExports.jsx(LinearProgressBar2,{className:Xt.bar2,ownerState:Jt,style:tr.bar2})]}))}),ListContext=reactExports.createContext({});function getListUtilityClass(yt){return generateUtilityClass("MuiList",yt)}generateUtilityClasses("MuiList",["root","padding","dense","subheader"]);const _excluded$c=["children","className","component","dense","disablePadding","subheader"],useUtilityClasses$a=yt=>{const{classes:_e,disablePadding:$t,dense:Ft,subheader:Vt}=yt;return composeClasses({root:["root",!$t&&"padding",Ft&&"dense",Vt&&"subheader"]},getListUtilityClass,_e)},ListRoot=styled("ul",{name:"MuiList",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,!$t.disablePadding&&_e.padding,$t.dense&&_e.dense,$t.subheader&&_e.subheader]}})(({ownerState:yt})=>_extends$3({listStyle:"none",margin:0,padding:0,position:"relative"},!yt.disablePadding&&{paddingTop:8,paddingBottom:8},yt.subheader&&{paddingTop:0})),List=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiList"}),{children:Vt,className:qt,component:zt="ul",dense:Ht=!1,disablePadding:Kt=!1,subheader:Gt}=Ft,Jt=_objectWithoutPropertiesLoose(Ft,_excluded$c),Xt=reactExports.useMemo(()=>({dense:Ht}),[Ht]),Zt=_extends$3({},Ft,{component:zt,dense:Ht,disablePadding:Kt}),er=useUtilityClasses$a(Zt);return jsxRuntimeExports.jsx(ListContext.Provider,{value:Xt,children:jsxRuntimeExports.jsxs(ListRoot,_extends$3({as:zt,className:clsx$1(er.root,qt),ref:$t,ownerState:Zt},Jt,{children:[Gt,Vt]}))})}),listItemIconClasses=generateUtilityClasses("MuiListItemIcon",["root","alignItemsFlexStart"]),listItemTextClasses=generateUtilityClasses("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),_excluded$b=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function nextItem(yt,_e,$t){return yt===_e?yt.firstChild:_e&&_e.nextElementSibling?_e.nextElementSibling:$t?null:yt.firstChild}function previousItem(yt,_e,$t){return yt===_e?$t?yt.firstChild:yt.lastChild:_e&&_e.previousElementSibling?_e.previousElementSibling:$t?null:yt.lastChild}function textCriteriaMatches(yt,_e){if(_e===void 0)return!0;let $t=yt.innerText;return $t===void 0&&($t=yt.textContent),$t=$t.trim().toLowerCase(),$t.length===0?!1:_e.repeating?$t[0]===_e.keys[0]:$t.indexOf(_e.keys.join(""))===0}function moveFocus(yt,_e,$t,Ft,Vt,qt){let zt=!1,Ht=Vt(yt,_e,_e?$t:!1);for(;Ht;){if(Ht===yt.firstChild){if(zt)return!1;zt=!0}const Kt=Ft?!1:Ht.disabled||Ht.getAttribute("aria-disabled")==="true";if(!Ht.hasAttribute("tabindex")||!textCriteriaMatches(Ht,qt)||Kt)Ht=Vt(yt,Ht,$t);else return Ht.focus(),!0}return!1}const MenuList=reactExports.forwardRef(function(_e,$t){const{actions:Ft,autoFocus:Vt=!1,autoFocusItem:qt=!1,children:zt,className:Ht,disabledItemsFocusable:Kt=!1,disableListWrap:Gt=!1,onKeyDown:Jt,variant:Xt="selectedMenu"}=_e,Zt=_objectWithoutPropertiesLoose(_e,_excluded$b),er=reactExports.useRef(null),tr=reactExports.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});useEnhancedEffect(()=>{Vt&&er.current.focus()},[Vt]),reactExports.useImperativeHandle(Ft,()=>({adjustStyleForScrollbar:(fr,{direction:vr})=>{const xr=!er.current.style.width;if(fr.clientHeight<er.current.clientHeight&&xr){const Sr=`${getScrollbarSize(ownerDocument(fr))}px`;er.current.style[vr==="rtl"?"paddingLeft":"paddingRight"]=Sr,er.current.style.width=`calc(100% + ${Sr})`}return er.current}}),[]);const rr=fr=>{const vr=er.current,xr=fr.key,Sr=ownerDocument(vr).activeElement;if(xr==="ArrowDown")fr.preventDefault(),moveFocus(vr,Sr,Gt,Kt,nextItem);else if(xr==="ArrowUp")fr.preventDefault(),moveFocus(vr,Sr,Gt,Kt,previousItem);else if(xr==="Home")fr.preventDefault(),moveFocus(vr,null,Gt,Kt,nextItem);else if(xr==="End")fr.preventDefault(),moveFocus(vr,null,Gt,Kt,previousItem);else if(xr.length===1){const Tr=tr.current,Br=xr.toLowerCase(),jr=performance.now();Tr.keys.length>0&&(jr-Tr.lastTime>500?(Tr.keys=[],Tr.repeating=!0,Tr.previousKeyMatched=!0):Tr.repeating&&Br!==Tr.keys[0]&&(Tr.repeating=!1)),Tr.lastTime=jr,Tr.keys.push(Br);const Rr=Sr&&!Tr.repeating&&textCriteriaMatches(Sr,Tr);Tr.previousKeyMatched&&(Rr||moveFocus(vr,Sr,!1,Kt,nextItem,Tr))?fr.preventDefault():Tr.previousKeyMatched=!1}Jt&&Jt(fr)},ar=useForkRef(er,$t);let nr=-1;reactExports.Children.forEach(zt,(fr,vr)=>{if(!reactExports.isValidElement(fr)){nr===vr&&(nr+=1,nr>=zt.length&&(nr=-1));return}fr.props.disabled||(Xt==="selectedMenu"&&fr.props.selected||nr===-1)&&(nr=vr),nr===vr&&(fr.props.disabled||fr.props.muiSkipListHighlight||fr.type.muiSkipListHighlight)&&(nr+=1,nr>=zt.length&&(nr=-1))});const cr=reactExports.Children.map(zt,(fr,vr)=>{if(vr===nr){const xr={};return qt&&(xr.autoFocus=!0),fr.props.tabIndex===void 0&&Xt==="selectedMenu"&&(xr.tabIndex=0),reactExports.cloneElement(fr,xr)}return fr});return jsxRuntimeExports.jsx(List,_extends$3({role:"menu",ref:ar,className:Ht,onKeyDown:rr,tabIndex:Vt?0:-1},Zt,{children:cr}))});function getPopoverUtilityClass(yt){return generateUtilityClass("MuiPopover",yt)}generateUtilityClasses("MuiPopover",["root","paper"]);const _excluded$a=["onEntering"],_excluded2$3=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],_excluded3=["slotProps"];function getOffsetTop(yt,_e){let $t=0;return typeof _e=="number"?$t=_e:_e==="center"?$t=yt.height/2:_e==="bottom"&&($t=yt.height),$t}function getOffsetLeft(yt,_e){let $t=0;return typeof _e=="number"?$t=_e:_e==="center"?$t=yt.width/2:_e==="right"&&($t=yt.width),$t}function getTransformOriginValue(yt){return[yt.horizontal,yt.vertical].map(_e=>typeof _e=="number"?`${_e}px`:_e).join(" ")}function resolveAnchorEl(yt){return typeof yt=="function"?yt():yt}const useUtilityClasses$9=yt=>{const{classes:_e}=yt;return composeClasses({root:["root"],paper:["paper"]},getPopoverUtilityClass,_e)},PopoverRoot=styled(Modal,{name:"MuiPopover",slot:"Root",overridesResolver:(yt,_e)=>_e.root})({}),PopoverPaper=styled(Paper,{name:"MuiPopover",slot:"Paper",overridesResolver:(yt,_e)=>_e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Popover=reactExports.forwardRef(function(_e,$t){var Ft,Vt,qt;const zt=useDefaultProps({props:_e,name:"MuiPopover"}),{action:Ht,anchorEl:Kt,anchorOrigin:Gt={vertical:"top",horizontal:"left"},anchorPosition:Jt,anchorReference:Xt="anchorEl",children:Zt,className:er,container:tr,elevation:rr=8,marginThreshold:ar=16,open:nr,PaperProps:cr={},slots:fr,slotProps:vr,transformOrigin:xr={vertical:"top",horizontal:"left"},TransitionComponent:Sr=Grow,transitionDuration:Tr="auto",TransitionProps:{onEntering:Br}={},disableScrollLock:jr=!1}=zt,Rr=_objectWithoutPropertiesLoose(zt.TransitionProps,_excluded$a),yr=_objectWithoutPropertiesLoose(zt,_excluded2$3),sr=(Ft=vr==null?void 0:vr.paper)!=null?Ft:cr,or=reactExports.useRef(),Qt=useForkRef(or,sr.ref),ir=_extends$3({},zt,{anchorOrigin:Gt,anchorReference:Xt,elevation:rr,marginThreshold:ar,externalPaperSlotProps:sr,transformOrigin:xr,TransitionComponent:Sr,transitionDuration:Tr,TransitionProps:Rr}),ur=useUtilityClasses$9(ir),gr=reactExports.useCallback(()=>
209{if(Xt==="anchorPosition")return Jt;const zr=resolveAnchorEl(Kt),Gr=(zr&&zr.nodeType===1?zr:ownerDocument(or.current).body).getBoundingClientRect();return{top:Gr.top+getOffsetTop(Gr,Gt.vertical),left:Gr.left+getOffsetLeft(Gr,Gt.horizontal)}},[Kt,Gt.horizontal,Gt.vertical,Jt,Xt]),dr=reactExports.useCallback(zr=>({vertical:getOffsetTop(zr,xr.vertical),horizontal:getOffsetLeft(zr,xr.horizontal)}),[xr.horizontal,xr.vertical]),lr=reactExports.useCallback(zr=>{const Vr={width:zr.offsetWidth,height:zr.offsetHeight},Gr=dr(Vr);if(Xt==="none")return{top:null,left:null,transformOrigin:getTransformOriginValue(Gr)};const tn=gr();let Yr=tn.top-Gr.vertical,Jr=tn.left-Gr.horizontal;const Kr=Yr+Vr.height,Xr=Jr+Vr.width,Qr=ownerWindow(resolveAnchorEl(Kt)),un=Qr.innerHeight-ar,an=Qr.innerWidth-ar;if(ar!==null&&Yr<ar){const sn=Yr-ar;Yr-=sn,Gr.vertical+=sn}else if(ar!==null&&Kr>un){const sn=Kr-un;Yr-=sn,Gr.vertical+=sn}if(ar!==null&&Jr<ar){const sn=Jr-ar;Jr-=sn,Gr.horizontal+=sn}else if(Xr>an){const sn=Xr-an;Jr-=sn,Gr.horizontal+=sn}return{top:`${Math.round(Yr)}px`,left:`${Math.round(Jr)}px`,transformOrigin:getTransformOriginValue(Gr)}},[Kt,Xt,gr,dr,ar]),[hr,wr]=reactExports.useState(nr),pr=reactExports.useCallback(()=>{const zr=or.current;if(!zr)return;const Vr=lr(zr);Vr.top!==null&&(zr.style.top=Vr.top),Vr.left!==null&&(zr.style.left=Vr.left),zr.style.transformOrigin=Vr.transformOrigin,wr(!0)},[lr]);reactExports.useEffect(()=>(jr&&window.addEventListener("scroll",pr),()=>window.removeEventListener("scroll",pr)),[Kt,jr,pr]);const br=(zr,Vr)=>{Br&&Br(zr,Vr),pr()},Dr=()=>{wr(!1)};reactExports.useEffect(()=>{nr&&pr()}),reactExports.useImperativeHandle(Ht,()=>nr?{updatePosition:()=>{pr()}}:null,[nr,pr]),reactExports.useEffect(()=>{if(!nr)return;const zr=debounce(()=>{pr()}),Vr=ownerWindow(Kt);return Vr.addEventListener("resize",zr),()=>{zr.clear(),Vr.removeEventListener("resize",zr)}},[Kt,nr,pr]);let _r=Tr;Tr==="auto"&&!Sr.muiSupportAuto&&(_r=void 0);const Nr=tr||(Kt?ownerDocument(resolveAnchorEl(Kt)).body:void 0),kr=(Vt=fr==null?void 0:fr.root)!=null?Vt:PopoverRoot,Mr=(qt=fr==null?void 0:fr.paper)!=null?qt:PopoverPaper,Lr=useSlotProps({elementType:Mr,externalSlotProps:_extends$3({},sr,{style:hr?sr.style:_extends$3({},sr.style,{opacity:0})}),additionalProps:{elevation:rr,ref:Qt},ownerState:ir,className:clsx$1(ur.paper,sr==null?void 0:sr.className)}),Cr=useSlotProps({elementType:kr,externalSlotProps:(vr==null?void 0:vr.root)||{},externalForwardedProps:yr,additionalProps:{ref:$t,slotProps:{backdrop:{invisible:!0}},container:Nr,open:nr},ownerState:ir,className:clsx$1(ur.root,er)}),{slotProps:Er}=Cr,Ar=_objectWithoutPropertiesLoose(Cr,_excluded3);return jsxRuntimeExports.jsx(kr,_extends$3({},Ar,!isHostComponent(kr)&&{slotProps:Er,disableScrollLock:jr},{children:jsxRuntimeExports.jsx(Sr,_extends$3({appear:!0,in:nr,onEntering:br,onExited:Dr,timeout:_r},Rr,{children:jsxRuntimeExports.jsx(Mr,_extends$3({},Lr,{children:Zt}))}))}))});function getMenuUtilityClass(yt){return generateUtilityClass("MuiMenu",yt)}generateUtilityClasses("MuiMenu",["root","paper","list"]);const _excluded$9=["onEntering"],_excluded2$2=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],RTL_ORIGIN={vertical:"top",horizontal:"right"},LTR_ORIGIN={vertical:"top",horizontal:"left"},useUtilityClasses$8=yt=>{const{classes:_e}=yt;return composeClasses({root:["root"],paper:["paper"],list:["list"]},getMenuUtilityClass,_e)},MenuRoot=styled(Popover,{shouldForwardProp:yt=>rootShouldForwardProp(yt)||yt==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(yt,_e)=>_e.root})({}),MenuPaper=styled(PopoverPaper,{name:"MuiMenu",slot:"Paper",overridesResolver:(yt,_e)=>_e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),MenuMenuList=styled(MenuList,{name:"MuiMenu",slot:"List",overridesResolver:(yt,_e)=>_e.list})({outline:0}),Menu=reactExports.forwardRef(function(_e,$t){var Ft,Vt;const qt=useDefaultProps({props:_e,name:"MuiMenu"}),{autoFocus:zt=!0,children:Ht,className:Kt,disableAutoFocusItem:Gt=!1,MenuListProps:Jt={},onClose:Xt,open:Zt,PaperProps:er={},PopoverClasses:tr,transitionDuration:rr="auto",TransitionProps:{onEntering:ar}={},variant:nr="selectedMenu",slots:cr={},slotProps:fr={}}=qt,vr=_objectWithoutPropertiesLoose(qt.TransitionProps,_excluded$9),xr=_objectWithoutPropertiesLoose(qt,_excluded2$2),Sr=useRtl(),Tr=_extends$3({},qt,{autoFocus:zt,disableAutoFocusItem:Gt,MenuListProps:Jt,onEntering:ar,PaperProps:er,transitionDuration:rr,TransitionProps:vr,variant:nr}),Br=useUtilityClasses$8(Tr),jr=zt&&!Gt&&Zt,Rr=reactExports.useRef(null),yr=(dr,lr)=>{Rr.current&&Rr.current.adjustStyleForScrollbar(dr,{direction:Sr?"rtl":"ltr"}
vendor: 6,131 bytes, line 209
209),ar&&ar(dr,lr)},sr=dr=>{dr.key==="Tab"&&(dr.preventDefault(),Xt&&Xt(dr,"tabKeyDown"))};let or=-1;reactExports.Children.map(Ht,(dr,lr)=>{reactExports.isValidElement(dr)&&(dr.props.disabled||(nr==="selectedMenu"&&dr.props.selected||or===-1)&&(or=lr))});const Qt=(Ft=cr.paper)!=null?Ft:MenuPaper,ir=(Vt=fr.paper)!=null?Vt:er,ur=useSlotProps({elementType:cr.root,externalSlotProps:fr.root,ownerState:Tr,className:[Br.root,Kt]}),gr=useSlotProps({elementType:Qt,externalSlotProps:ir,ownerState:Tr,className:Br.paper});return jsxRuntimeExports.jsx(MenuRoot,_extends$3({onClose:Xt,anchorOrigin:{vertical:"bottom",horizontal:Sr?"right":"left"},transformOrigin:Sr?RTL_ORIGIN:LTR_ORIGIN,slots:{paper:Qt,root:cr.root},slotProps:{root:ur,paper:gr},open:Zt,ref:$t,transitionDuration:rr,TransitionProps:_extends$3({onEntering:yr},vr),ownerState:Tr},xr,{classes:tr,children:jsxRuntimeExports.jsx(MenuMenuList,_extends$3({onKeyDown:sr,actions:Rr,autoFocus:zt&&(or===-1||Gt),autoFocusItem:jr,variant:nr},Jt,{className:clsx$1(Br.list,Jt.className),children:Ht}))}))});function getMenuItemUtilityClass(yt){return generateUtilityClass("MuiMenuItem",yt)}const menuItemClasses=generateUtilityClasses("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),_excluded$8=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],overridesResolver=(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,$t.dense&&_e.dense,$t.divider&&_e.divider,!$t.disableGutters&&_e.gutters]},useUtilityClasses$7=yt=>{const{disabled:_e,dense:$t,divider:Ft,disableGutters:Vt,selected:qt,classes:zt}=yt,Kt=composeClasses({root:["root",$t&&"dense",_e&&"disabled",!Vt&&"gutters",Ft&&"divider",qt&&"selected"]},getMenuItemUtilityClass,zt);return _extends$3({},zt,Kt)},MenuItemRoot=styled(ButtonBase,{shouldForwardProp:yt=>rootShouldForwardProp(yt)||yt==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver})(({theme:yt,ownerState:_e})=>_extends$3({},yt.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!_e.disableGutters&&{paddingLeft:16,paddingRight:16},_e.divider&&{borderBottom:`1px solid ${(yt.vars||yt).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(yt.vars||yt).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${menuItemClasses.selected}`]:{backgroundColor:yt.vars?`rgba(${yt.vars.palette.primary.mainChannel} / ${yt.vars.palette.action.selectedOpacity})`:alpha_1(yt.palette.primary.main,yt.palette.action.selectedOpacity),[`&.${menuItemClasses.focusVisible}`]:{backgroundColor:yt.vars?`rgba(${yt.vars.palette.primary.mainChannel} / calc(${yt.vars.palette.action.selectedOpacity} + ${yt.vars.palette.action.focusOpacity}))`:alpha_1(yt.palette.primary.main,yt.palette.action.selectedOpacity+yt.palette.action.focusOpacity)}},[`&.${menuItemClasses.selected}:hover`]:{backgroundColor:yt.vars?`rgba(${yt.vars.palette.primary.mainChannel} / calc(${yt.vars.palette.action.selectedOpacity} + ${yt.vars.palette.action.hoverOpacity}))`:alpha_1(yt.palette.primary.main,yt.palette.action.selectedOpacity+yt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:yt.vars?`rgba(${yt.vars.palette.primary.mainChannel} / ${yt.vars.palette.action.selectedOpacity})`:alpha_1(yt.palette.primary.main,yt.palette.action.selectedOpacity)}},[`&.${menuItemClasses.focusVisible}`]:{backgroundColor:(yt.vars||yt).palette.action.focus},[`&.${menuItemClasses.disabled}`]:{opacity:(yt.vars||yt).palette.action.disabledOpacity},[`& + .${dividerClasses.root}`]:{marginTop:yt.spacing(1),marginBottom:yt.spacing(1)},[`& + .${dividerClasses.inset}`]:{marginLeft:52},[`& .${listItemTextClasses.root}`]:{marginTop:0,marginBottom:0},[`& .${listItemTextClasses.inset}`]:{paddingLeft:36},[`& .${listItemIconClasses.root}`]:{minWidth:36}},!_e.dense&&{[yt.breakpoints.up("sm")]:{minHeight:"auto"}},_e.dense&&_extends$3({minHeight:32,paddingTop:4,paddingBottom:4},yt.typography.body2,{[`& .${listItemIconClasses.root} svg`]:{fontSize:"1.25rem"}}))),MenuItem=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiMenuItem"}),{autoFocus:Vt=!1,component:qt="li",dense:zt=!1,divider:Ht=!1,disableGutters:Kt=!1,focusVisibleClassName:Gt,role:Jt="menuitem",tabIndex:Xt,className:Zt}=Ft,er=_objectWithoutPropertiesLoose(Ft,_excluded$8),tr=reactExports.useContext(ListContext),rr=reactExports.useMemo(()=>({dense:zt||tr.dense||!1,disableGutters:Kt}),[tr.dense,zt,Kt]),ar=reactExports.useRef(null);useEnhancedEffect(()=>{Vt&&ar.current&&ar.current.focus()},[Vt]);const nr=_extends$3({},Ft,{dense:rr.dense,divider:Ht,disableGutters:Kt}),cr=useUtilityClasses$7(Ft),fr=useForkRef(ar,$t);let vr;return Ft.disabled||(vr=Xt!==void 0?Xt:-1),jsxRuntimeExports.jsx(ListContext.Provider,{value:rr,children:jsxRuntimeExports.jsx(MenuItemRoot,_extends$3({ref:fr,role:Jt,tabIndex:vr,component:qt,focusVisibleClassName:clsx$1(cr.focusVisible,Gt),className:clsx$1(cr.root,Zt)},er,{ownerState:nr,classes:cr}))})});function getNativeSelectUtilityClasses(yt){return generateUtilityClass("MuiNativeSelect",yt)}const nativeSelectClasses=generateUtilityClasses("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),_excluded$7=["className","disabled","error","IconComponent","inputRef","variant"],useUtilityClasses$6=yt=>{const{classes:_e,variant:$t,disabled:Ft,multiple:Vt,open:qt,error:zt}=yt,Ht={select:["select",$t,Ft&&"disabled",Vt&&"multiple",zt&&"error"],icon:["icon",`icon${capitalize$1($t)}`,qt&&"iconOpen",Ft&&"disabled"]};return composeClasses(Ht,getNativeSelectUtilityClasses,_e)},nativeSelectSelectStyles=({ownerState:yt,theme:_e})=>_extends$3({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":_extends$3({},_e.vars?{backgroundColor:`rgba(${_e.vars.palette.common.onBackgroun
209dChannel} / 0.05)`}:{backgroundColor:_e.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${nativeSelectClasses.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(_e.vars||_e).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},yt.variant==="filled"&&{"&&&":{paddingRight:32}},yt.variant==="outlined"&&{borderRadius:(_e.vars||_e).shape.borderRadius,"&:focus":{borderRadius:(_e.vars||_e).shape.borderRadius},"&&&":{paddingRight:32}}),NativeSelectSelect=styled("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:rootShouldForwardProp,overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.select,_e[$t.variant],$t.error&&_e.error,{[`&.${nativeSelectClasses.multiple}`]:_e.multiple}]}})(nativeSelectSelectStyles),nativeSelectIconStyles=({ownerState:yt,theme:_e})=>_extends$3({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(_e.vars||_e).palette.action.active,[`&.${nativeSelectClasses.disabled}`]:{color:(_e.vars||_e).palette.action.disabled}},yt.open&&{transform:"rotate(180deg)"},yt.variant==="filled"&&{right:7},yt.variant==="outlined"&&{right:7}),NativeSelectIcon=styled("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.icon,$t.variant&&_e[`icon${capitalize$1($t.variant)}`],$t.open&&_e.iconOpen]}})(nativeSelectIconStyles),NativeSelectInput=reactExports.forwardRef(function(_e,$t){const{className:Ft,disabled:Vt,error:qt,IconComponent:zt,inputRef:Ht,variant:Kt="standard"}=_e,Gt=_objectWithoutPropertiesLoose(_e,_excluded$7),Jt=_extends$3({},_e,{disabled:Vt,variant:Kt,error:qt}),Xt=useUtilityClasses$6(Jt);return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(NativeSelectSelect,_extends$3({ownerState:Jt,className:clsx$1(Xt.select,Ft),disabled:Vt,ref:Ht||$t},Gt)),_e.multiple?null:jsxRuntimeExports.jsx(NativeSelectIcon,{as:zt,ownerState:Jt,className:Xt.icon})]})});var _span$1;const _excluded$6=["children","classes","className","label","notched"],NotchedOutlineRoot$1=styled("fieldset",{shouldForwardProp:rootShouldForwardProp})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),NotchedOutlineLegend=styled("legend",{shouldForwardProp:rootShouldForwardProp})(({ownerState:yt,theme:_e})=>_extends$3({float:"unset",width:"auto",overflow:"hidden"},!yt.withLabel&&{padding:0,lineHeight:"11px",transition:_e.transitions.create("width",{duration:150,easing:_e.transitions.easing.easeOut})},yt.withLabel&&_extends$3({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:_e.transitions.create("max-width",{duration:50,easing:_e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},yt.notched&&{maxWidth:"100%",transition:_e.transitions.create("max-width",{duration:100,easing:_e.transitions.easing.easeOut,delay:50})})));function NotchedOutline(yt){const{className:_e,label:$t,notched:Ft}=yt,Vt=_objectWithoutPropertiesLoose(yt,_excluded$6),qt=$t!=null&&$t!=="",zt=_extends$3({},yt,{notched:Ft,withLabel:qt});return jsxRuntimeExports.jsx(NotchedOutlineRoot$1,_extends$3({"aria-hidden":!0,className:_e,ownerState:zt},Vt,{children:jsxRuntimeExports.jsx(NotchedOutlineLegend,{ownerState:zt,children:qt?jsxRuntimeExports.jsx("span",{children:$t}):_span$1||(_span$1=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"â"}))})}))}const _excluded$5=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],useUtilityClasses$5=yt=>{const{classes:_e}=yt,Ft=composeClasses({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},getOutlinedInputUtilityClass,_e);return _extends$3({},_e,Ft)},OutlinedInputRoot=styled(InputBaseRoot,{shouldForwardProp:yt=>rootShouldForwardProp(yt)||yt==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:rootOverridesResolver})(({theme:yt,ownerState:_e})=>{const $t=yt.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return _extends$3({position:"relative",borderRadius:(yt.vars||yt).shape.borderRadius,[`&:hover .${outlinedInputClasses.notchedOutline}`]:{borderColor:(yt.vars||yt).palette.text.primary},"@media (hover: none)":{[`&:hover .${outlinedInputClasses.notchedOutline}`]:{borderColor:yt.vars?`rgba(${yt.vars.palette.common.onBackgroun
209dChannel} / 0.23)`:$t}},[`&.${outlinedInputClasses.focused} .${outlinedInputClasses.notchedOutline}`]:{borderColor:(yt.vars||yt).palette[_e.color].main,borderWidth:2},[`&.${outlinedInputClasses.error} .${outlinedInputClasses.notchedOutline}`]:{borderColor:(yt.vars||yt).palette.error.main},[`&.${outlinedInputClasses.disabled} .${outlinedInputClasses.notchedOutline}`]:{borderColor:(yt.vars||yt).palette.action.disabled}},_e.startAdornment&&{paddingLeft:14},_e.endAdornment&&{paddingRight:14},_e.multiline&&_extends$3({padding:"16.5px 14px"},_e.size==="small"&&{padding:"8.5px 14px"}))}),NotchedOutlineRoot=styled(NotchedOutline,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(yt,_e)=>_e.notchedOutline})(({theme:yt})=>{const _e=yt.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:yt.vars?`rgba(${yt.vars.palette.common.onBackgroundChannel} / 0.23)`:_e}}),OutlinedInputInput=styled(InputBaseComponent,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:yt,ownerState:_e})=>_extends$3({padding:"16.5px 14px"},!yt.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:yt.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:yt.palette.mode==="light"?null:"#fff",caretColor:yt.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},yt.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[yt.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},_e.size==="small"&&{padding:"8.5px 14px"},_e.multiline&&{padding:0},_e.startAdornment&&{paddingLeft:0},_e.endAdornment&&{paddingRight:0})),OutlinedInput=reactExports.forwardRef(function(_e,$t){var Ft,Vt,qt,zt,Ht;const Kt=useDefaultProps({props:_e,name:"MuiOutlinedInput"}),{components:Gt={},fullWidth:Jt=!1,inputComponent:Xt="input",label:Zt,multiline:er=!1,notched:tr,slots:rr={},type:ar="text"}=Kt,nr=_objectWithoutPropertiesLoose(Kt,_excluded$5),cr=useUtilityClasses$5(Kt),fr=useFormControl(),vr=formControlState({props:Kt,muiFormControl:fr,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),xr=_extends$3({},Kt,{color:vr.color||"primary",disabled:vr.disabled,error:vr.error,focused:vr.focused,formControl:fr,fullWidth:Jt,hiddenLabel:vr.hiddenLabel,multiline:er,size:vr.size,type:ar}),Sr=(Ft=(Vt=rr.root)!=null?Vt:Gt.Root)!=null?Ft:OutlinedInputRoot,Tr=(qt=(zt=rr.input)!=null?zt:Gt.Input)!=null?qt:OutlinedInputInput;return jsxRuntimeExports.jsx(InputBase,_extends$3({slots:{root:Sr,input:Tr},renderSuffix:Br=>jsxRuntimeExports.jsx(NotchedOutlineRoot,{ownerState:xr,className:cr.notchedOutline,label:Zt!=null&&Zt!==""&&vr.required?Ht||(Ht=jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[Zt,"â","*"]})):Zt,notched:typeof tr<"u"?tr:!!(Br.startAdornment||Br.filled||Br.focused)}),fullWidth:Jt,inputComponent:Xt,multiline:er,ref:$t,type:ar},nr,{classes:_extends$3({},cr,{notchedOutline:null})}))});OutlinedInput.muiName="Input";function getSelectUtilityClasses(yt){return generateUtilityClass("MuiSelect",yt)}const selectClasses=generateUtilityClasses("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var _span;const _excluded$4=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],SelectSelect=styled("div",{name:"MuiSelect",slot:"Select",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[{[`&.${selectClasses.select}`]:_e.select},{[`&.${selectClasses.select}`]:_e[$t.variant]},{[`&.${selectClasses.error}`]:_e.error},{[`&.${selectClasses.multiple}`]:_e.multiple}]}})(nativeSelectSelectStyles,{[`&.${selectClasses.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),SelectIcon=styled("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.icon,$t.variant&&_e[`icon${capitalize$1($t.variant)}`],$t.open&&_e.iconOpen]}})(nativeSelectIconStyles),SelectNativeInput=styled("input",{shouldForwardProp:yt=>slotShouldForwardProp(yt)&&yt!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(yt,_e)=>_e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function areEqualValues(yt,_e){return typeof _e=="object"&&_e!==null?yt===_e:String(yt)===String(_e)}function isEmpty(yt){return yt==null||typeof yt=="string"&&!yt.trim()}const useUtilityClasses$4=yt=>{const{classes:_e,variant:$t,disabled:Ft,multiple:Vt,open:qt,error:zt}=yt,Ht={select:["select",$t,Ft&&"disabled",Vt&&"multiple",zt&&"error"],icon:["icon",`icon${capitalize$1($t)}`,qt&&"iconOpen",Ft&&"disabled"],nativeInput:["nativeInput"]};return composeClasses(Ht,getSelectUtilityClasses,_e)},SelectInput=reactExports.forwardRef(function(_e,$t){var Ft;const{"aria-describedby":Vt,"aria-label":qt,autoFocus:zt,autoWidth:Ht,children:Kt,className:Gt,defaultOpen:Jt,defaultValue:Xt,disabled:Zt,displayEmpty:er,error:tr=!1,IconComponent:rr,inputRef:ar,labelId:nr,MenuProps:cr={},multiple:fr,name:vr,onBlur:xr,onChange:Sr,onClose:Tr,onFocus:Br,onOpen:jr,open:Rr,readOnly:yr,renderValue:sr,SelectDisplayProps:or={},tabIndex:Qt,value:ir,variant:ur="standard"}=_e,gr=_objectWithoutPropertiesLoose(_e,_excluded$4),[dr,lr]=useControlled({controlled:ir,default:Xt,name:"Select"}),[hr,wr]=useControlled({controlled:Rr,default:Jt,name:"Select"}),pr=reactExports.useRef(null),br=reactExports.useRef(null),[Dr,_r]=reactExports.useState(null),{current:Nr}=reactExports.useRef(Rr!=null),[kr,Mr]=reactExports.useState(),Lr=useForkRef($t,ar),Cr=reactExports.useCallback(Fr=>{br.current=Fr,Fr&&_r(Fr)},[]),Er=Dr==null?void 0:Dr.parentNode;reactExports.useImperativeHandle(Lr,()=>({focus:()=>{br.current.focus()},node:pr.current,value:dr}),[dr]),reactExports.useEffect(()=>{Jt&&hr&&Dr&&!Nr&&(Mr(Ht?null:Er.clientWidth),br.current.focus())},[Dr,Ht]),reactExports.useEffect(()=>{zt&&br.current.focus()},[zt]),reactExports.useEffect(()=>{if(!nr)return;const Fr=ownerDocument(br.current).getElementById(nr);if(Fr){const Zr=()=>{getSelection().isCollapsed&&br.current.focus()};return Fr.addEventListener("click",Zr),()=>{Fr.removeEventListener("click",Zr)}
vendor: 4,222 bytes, line 209
209}},[nr]);const Ar=(Fr,Zr)=>{Fr?jr&&jr(Zr):Tr&&Tr(Zr),Nr||(Mr(Ht?null:Er.clientWidth),wr(Fr))},zr=Fr=>{Fr.button===0&&(Fr.preventDefault(),br.current.focus(),Ar(!0,Fr))},Vr=Fr=>{Ar(!1,Fr)},Gr=reactExports.Children.toArray(Kt),tn=Fr=>{const Zr=Gr.find(en=>en.props.value===Fr.target.value);Zr!==void 0&&(lr(Zr.props.value),Sr&&Sr(Fr,Zr))},Yr=Fr=>Zr=>{let en;if(Zr.currentTarget.hasAttribute("tabindex")){if(fr){en=Array.isArray(dr)?dr.slice():[];const rn=dr.indexOf(Fr.props.value);rn===-1?en.push(Fr.props.value):en.splice(rn,1)}else en=Fr.props.value;if(Fr.props.onClick&&Fr.props.onClick(Zr),dr!==en&&(lr(en),Sr)){const rn=Zr.nativeEvent||Zr,En=new rn.constructor(rn.type,rn);Object.defineProperty(En,"target",{writable:!0,value:{value:en,name:vr}}),Sr(En,Fr)}fr||Ar(!1,Zr)}},Jr=Fr=>{yr||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Fr.key)!==-1&&(Fr.preventDefault(),Ar(!0,Fr))},Kr=Dr!==null&&hr,Xr=Fr=>{!Kr&&xr&&(Object.defineProperty(Fr,"target",{writable:!0,value:{value:dr,name:vr}}),xr(Fr))};delete gr["aria-invalid"];let Qr,un;const an=[];let sn=!1;(isFilled({value:dr})||er)&&(sr?Qr=sr(dr):sn=!0);const vn=Gr.map(Fr=>{if(!reactExports.isValidElement(Fr))return null;let Zr;if(fr){if(!Array.isArray(dr))throw new Error(formatMuiErrorMessage$1(2));Zr=dr.some(en=>areEqualValues(en,Fr.props.value)),Zr&&sn&&an.push(Fr.props.children)}else Zr=areEqualValues(dr,Fr.props.value),Zr&&sn&&(un=Fr.props.children);return reactExports.cloneElement(Fr,{"aria-selected":Zr?"true":"false",onClick:Yr(Fr),onKeyUp:en=>{en.key===" "&&en.preventDefault(),Fr.props.onKeyUp&&Fr.props.onKeyUp(en)},role:"option",selected:Zr,value:void 0,"data-value":Fr.props.value})});sn&&(fr?an.length===0?Qr=null:Qr=an.reduce((Fr,Zr,en)=>(Fr.push(Zr),en<an.length-1&&Fr.push(", "),Fr),[]):Qr=un);let gn=kr;!Ht&&Nr&&Dr&&(gn=Er.clientWidth);let fn;typeof Qt<"u"?fn=Qt:fn=Zt?null:0;const wn=or.id||(vr?`mui-component-select-${vr}`:void 0),dn=_extends$3({},_e,{variant:ur,value:dr,open:Kr,error:tr}),Ur=useUtilityClasses$4(dn),Ir=_extends$3({},cr.PaperProps,(Ft=cr.slotProps)==null?void 0:Ft.paper),Pr=useId$1();return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(SelectSelect,_extends$3({ref:Cr,tabIndex:fn,role:"combobox","aria-controls":Pr,"aria-disabled":Zt?"true":void 0,"aria-expanded":Kr?"true":"false","aria-haspopup":"listbox","aria-label":qt,"aria-labelledby":[nr,wn].filter(Boolean).join(" ")||void 0,"aria-describedby":Vt,onKeyDown:Jr,onMouseDown:Zt||yr?null:zr,onBlur:Xr,onFocus:Br},or,{ownerState:dn,className:clsx$1(or.className,Ur.select,Gt),id:wn,children:isEmpty(Qr)?_span||(_span=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"â"})):Qr})),jsxRuntimeExports.jsx(SelectNativeInput,_extends$3({"aria-invalid":tr,value:Array.isArray(dr)?dr.join(","):dr,name:vr,ref:pr,"aria-hidden":!0,onChange:tn,tabIndex:-1,disabled:Zt,className:Ur.nativeInput,autoFocus:zt,ownerState:dn},gr)),jsxRuntimeExports.jsx(SelectIcon,{as:rr,className:Ur.icon,ownerState:dn}),jsxRuntimeExports.jsx(Menu,_extends$3({id:`menu-${vr||""}`,anchorEl:Er,open:Kr,onClose:Vr,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},cr,{MenuListProps:_extends$3({"aria-labelledby":nr,role:"listbox","aria-multiselectable":fr?"true":void 0,disableListWrap:!0,id:Pr},cr.MenuListProps),slotProps:_extends$3({},cr.slotProps,{paper:_extends$3({},Ir,{style:_extends$3({minWidth:gn},Ir!=null?Ir.style:null)})}),children:vn}))]})}),_excluded$3=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],_excluded2$1=["root"],useUtilityClasses$3=yt=>{const{classes:_e}=yt;return _e},styledRootConfig={name:"MuiSelect",overridesResolver:(yt,_e)=>_e.root,shouldForwardProp:yt=>rootShouldForwardProp(yt)&&yt!=="variant",slot:"Root"},StyledInput=styled(Input,styledRootConfig)(""),StyledOutlinedInput=styled(OutlinedInput,styledRootConfig)(""),StyledFilledInput=styled(FilledInput,styledRootConfig)(""),Select=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({name:"MuiSelect",props:_e}
209),{autoWidth:Vt=!1,children:qt,classes:zt={},className:Ht,defaultOpen:Kt=!1,displayEmpty:Gt=!1,IconComponent:Jt=ArrowDropDownIcon,id:Xt,input:Zt,inputProps:er,label:tr,labelId:rr,MenuProps:ar,multiple:nr=!1,native:cr=!1,onClose:fr,onOpen:vr,open:xr,renderValue:Sr,SelectDisplayProps:Tr,variant:Br="outlined"}=Ft,jr=_objectWithoutPropertiesLoose(Ft,_excluded$3),Rr=cr?NativeSelectInput:SelectInput,yr=useFormControl(),sr=formControlState({props:Ft,muiFormControl:yr,states:["variant","error"]}),or=sr.variant||Br,Qt=_extends$3({},Ft,{variant:or,classes:zt}),ir=useUtilityClasses$3(Qt),ur=_objectWithoutPropertiesLoose(ir,_excluded2$1),gr=Zt||{standard:jsxRuntimeExports.jsx(StyledInput,{ownerState:Qt}),outlined:jsxRuntimeExports.jsx(StyledOutlinedInput,{label:tr,ownerState:Qt}),filled:jsxRuntimeExports.jsx(StyledFilledInput,{ownerState:Qt})}[or],dr=useForkRef($t,getReactElementRef(gr));return jsxRuntimeExports.jsx(reactExports.Fragment,{children:reactExports.cloneElement(gr,_extends$3({inputComponent:Rr,inputProps:_extends$3({children:qt,error:sr.error,IconComponent:Jt,variant:or,type:void 0,multiple:nr},cr?{id:Xt}:{autoWidth:Vt,defaultOpen:Kt,displayEmpty:Gt,labelId:rr,MenuProps:ar,onClose:fr,onOpen:vr,open:xr,renderValue:Sr,SelectDisplayProps:_extends$3({id:Xt},Tr)},er,{classes:er?deepmerge$1(ur,er.classes):ur},Zt?Zt.props.inputProps:{})},(nr&&cr||Gt)&&or==="outlined"?{notched:!0}:{},{ref:dr,className:clsx$1(gr.props.className,Ht,ir.root)},!Zt&&{variant:or},jr))})});Select.muiName="Select";function useSnackbar(yt={}){const{autoHideDuration:_e=null,disableWindowBlurListener:$t=!1,onClose:Ft,open:Vt,resumeHideDuration:qt}=yt,zt=useTimeout();reactExports.useEffect(()=>{if(!Vt)return;function nr(cr){cr.defaultPrevented||(cr.key==="Escape"||cr.key==="Esc")&&(Ft==null||Ft(cr,"escapeKeyDown"))}return document.addEventListener("keydown",nr),()=>{document.removeEventListener("keydown",nr)}},[Vt,Ft]);const Ht=useEventCallback((nr,cr)=>{Ft==null||Ft(nr,cr)}),Kt=useEventCallback(nr=>{!Ft||nr==null||zt.start(nr,()=>{Ht(null,"timeout")})});reactExports.useEffect(()=>(Vt&&Kt(_e),zt.clear),[Vt,_e,Kt,zt]);const Gt=nr=>{Ft==null||Ft(nr,"clickaway")},Jt=zt.clear,Xt=reactExports.useCallback(()=>{_e!=null&&Kt(qt??_e*.5)},[_e,qt,Kt]),Zt=nr=>cr=>{const fr=nr.onBlur;fr==null||fr(cr),Xt()},er=nr=>cr=>{const fr=nr.onFocus;fr==null||fr(cr),Jt()},tr=nr=>cr=>{const fr=nr.onMouseEnter;fr==null||fr(cr),Jt()},rr=nr=>cr=>{const fr=nr.onMouseLeave;fr==null||fr(cr),Xt()};return reactExports.useEffect(()=>{if(!$t&&Vt)return window.addEventListener("focus",Xt),window.addEventListener("blur",Jt),()=>{window.removeEventListener("focus",Xt),window.removeEventListener("blur",Jt)}},[$t,Vt,Xt,Jt]),{getRootProps:(nr={})=>{const cr=_extends$3({},extractEventHandlers(yt),extractEventHandlers(nr));return _extends$3({role:"presentation"},nr,cr,{onBlur:Zt(cr),onFocus:er(cr),onMouseEnter:tr(cr),onMouseLeave:rr(cr)})},onClickAway:Gt}}function getSnackbarContentUtilityClass(yt){return generateUtilityClass("MuiSnackbarContent",yt)}generateUtilityClasses("MuiSnackbarContent",["root","message","action"]);const _excluded$2=["action","className","message","role"],useUtilityClasses$2=yt=>{const{classes:_e}=yt;return composeClasses({root:["root"],action:["action"],message:["message"]},getSnackbarContentUtilityClass,_e)},SnackbarContentRoot=styled(Paper,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(yt,_e)=>_e.root})(({theme:yt})=>{const _e=yt.palette.mode==="light"?.8:.98,$t=emphasize_1(yt.palette.background.default,_e);return _extends$3({},yt.typography.body2,{color:yt.vars?yt.vars.palette.SnackbarContent.color:yt.palette.getContrastText($t),backgroundColor:yt.vars?yt.vars.palette.SnackbarContent.bg:$t,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(yt.vars||yt).shape.borderRadius,flexGrow:1,[yt.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),SnackbarContentMessage=styled("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(yt,_e)=>_e.message})({padding:"8px 0"}),SnackbarContentAction=styled("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(yt,_e)=>_e.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),SnackbarContent=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiSnackbarContent"}),{action:Vt,className:qt,message:zt,role:Ht="alert"}=Ft,Kt=_objectWithoutPropertiesLoose(Ft,_excluded$2),Gt=Ft,Jt=useUtilityClasses$2(Gt);return jsxRuntimeExports.jsxs(SnackbarContentRoot,_extends$3({role:Ht,square:!0,elevation:6,className:clsx$1(Jt.root,qt),ownerState:Gt,ref:$t},Kt,{children:[jsxRuntimeExports.jsx(SnackbarContentMessage,{className:Jt.message,ownerState:Gt,children:zt}),Vt?jsxRuntimeExports.jsx(SnackbarContentAction,{className:Jt.action,ownerState:Gt,children:Vt}):null]}))});function getSnackbarUtilityClass(yt){return generateUtilityClass("MuiSnackbar",yt)}generateUtilityClasses("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const _excluded$1=["onEnter","onExited"],_excluded2=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],useUtilityClasses$1=yt=>{const{classes:_e,anchorOrigin:$t}=yt,Ft={root:["root",`anchorOrigin${capitalize$1($t.vertical)}${capitalize$1($t.horizontal)}`]};return composeClasses(Ft,getSnackbarUtilityClass,_e)},SnackbarRoot=styled("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(yt,_e)=>{const{ownerState:$t}=yt;return[_e.root,_e[`anchorOrigin${capitalize$1($t.anchorOrigin.vertical)}${capitalize$1($t.anchorOrigin.horizontal)}`]]}})(({theme:yt,ownerState:_e})=>{const $t={left:"50%",right:"auto",transform:"translateX(-50%)"};return _extends$3({zIndex:(yt.vars||yt).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},_e.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},_e.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},_e.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[yt.breakpoints.up("sm")]:_extends$3({},_e.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},_e.anchorOrigin.horizontal==="center"&&$t,_e.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},_e.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),Snackbar=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiSnackbar"}),Vt=useTheme(),qt={enter:Vt.transitions.duration.enteringScreen,exit:Vt.transitions.duration.leavingScreen},{action:zt,anchorOrigin:{vertical:Ht,horizontal:Kt}={vertical:"bottom",horizontal:"left"},autoHideDuration:Gt=null,children:Jt,className:Xt,ClickAwayListenerProps:Zt,ContentProps:er,disableWindowBlurListener:tr=!1,message:rr,open:ar,TransitionComponent:nr=Grow,transitionDuration:cr=qt,TransitionProps:{onEnter:fr,onExited:vr}={}}=Ft,xr=_objectWithoutPropertiesLoose(Ft.TransitionProps,_excluded$1),Sr=_objectWithoutPropertiesLoose(Ft,_excluded2),Tr=_extends$3({},Ft,{anchorOrigin:{vertical:Ht,horizontal:Kt},autoHideDuration:Gt,disableWindowBlurListener:tr,TransitionComponent:nr,transitionDuration:cr}),Br=useUtilityClasses$1(Tr),{getRootProps:jr,onClickAway:Rr}=useSnackbar(_extends$3({},Tr)),[yr,sr]=reactExports.useState(!0),or=useSlotProps({elementType:SnackbarRoot,getSlotProps:jr,externalForwardedProps:Sr,ownerState:Tr,additionalProps:{ref:$t},className:[Br.root,Xt]}
209),Qt=ur=>{sr(!0),vr&&vr(ur)},ir=(ur,gr)=>{sr(!1),fr&&fr(ur,gr)};return!ar&&yr?null:jsxRuntimeExports.jsx(ClickAwayListener,_extends$3({onClickAway:Rr},Zt,{children:jsxRuntimeExports.jsx(SnackbarRoot,_extends$3({},or,{children:jsxRuntimeExports.jsx(nr,_extends$3({appear:!0,in:ar,timeout:cr,direction:Ht==="top"?"down":"up",onEnter:ir,onExited:Qt},xr,{children:Jt||jsxRuntimeExports.jsx(SnackbarContent,_extends$3({message:rr,action:zt},er))}))}))}))});function getTextFieldUtilityClass(yt){return generateUtilityClass("MuiTextField",yt)}generateUtilityClasses("MuiTextField",["root"]);const _excluded=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],variantComponent={standard:Input,filled:FilledInput,outlined:OutlinedInput},useUtilityClasses=yt=>{const{classes:_e}=yt;return composeClasses({root:["root"]},getTextFieldUtilityClass,_e)},TextFieldRoot=styled(FormControl,{name:"MuiTextField",slot:"Root",overridesResolver:(yt,_e)=>_e.root})({}),TextField=reactExports.forwardRef(function(_e,$t){const Ft=useDefaultProps({props:_e,name:"MuiTextField"}),{autoComplete:Vt,autoFocus:qt=!1,children:zt,className:Ht,color:Kt="primary",defaultValue:Gt,disabled:Jt=!1,error:Xt=!1,FormHelperTextProps:Zt,fullWidth:er=!1,helperText:tr,id:rr,InputLabelProps:ar,inputProps:nr,InputProps:cr,inputRef:fr,label:vr,maxRows:xr,minRows:Sr,multiline:Tr=!1,name:Br,onBlur:jr,onChange:Rr,onFocus:yr,placeholder:sr,required:or=!1,rows:Qt,select:ir=!1,SelectProps:ur,type:gr,value:dr,variant:lr="outlined"}=Ft,hr=_objectWithoutPropertiesLoose(Ft,_excluded),wr=_extends$3({},Ft,{autoFocus:qt,color:Kt,disabled:Jt,error:Xt,fullWidth:er,multiline:Tr,required:or,select:ir,variant:lr}),pr=useUtilityClasses(wr),br={};lr==="outlined"&&(ar&&typeof ar.shrink<"u"&&(br.notched=ar.shrink),br.label=vr),ir&&((!ur||!ur.native)&&(br.id=void 0),br["aria-describedby"]=void 0);const Dr=useId$1(rr),_r=tr&&Dr?`${Dr}-helper-text`:void 0,Nr=vr&&Dr?`${Dr}-label`:void 0,kr=variantComponent[lr],Mr=jsxRuntimeExports.jsx(kr,_extends$3({"aria-describedby":_r,autoComplete:Vt,autoFocus:qt,defaultValue:Gt,fullWidth:er,multiline:Tr,name:Br,rows:Qt,maxRows:xr,minRows:Sr,type:gr,value:dr,id:Dr,inputRef:fr,onBlur:jr,onChange:Rr,onFocus:yr,placeholder:sr,inputProps:nr},br,cr));return jsxRuntimeExports.jsxs(TextFieldRoot,_extends$3({className:clsx$1(pr.root,Ht),disabled:Jt,error:Xt,fullWidth:er,ref:$t,required:or,color:Kt,variant:lr,ownerState:wr},hr,{children:[vr!=null&&vr!==""&&jsxRuntimeExports.jsx(InputLabel,_extends$3({htmlFor:Dr,id:Nr},ar,{children:vr})),ir?jsxRuntimeExports.jsx(Select,_extends$3({"aria-describedby":_r,id:Dr,labelId:Nr,value:dr,input:Mr},ur,{children:zt})):Mr,tr&&jsxRuntimeExports.jsx(FormHelperText,_extends$3({id:_r},Zt,{children:tr}))]}))});/** 210 * @remix-run/router v1.23.0 211 * 212 * Copyright (c) Remix Software Inc. 213 * 214 * This source code is licensed under the MIT license found in the 215 * LICENSE.md file in the root directory of this source tree. 216 * 217 * @license MIT 218 */function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(yt){for(var _e=1;_e<arguments.length;_e++){var $t=arguments[_e];for(var Ft in $t)Object.prototype.hasOwnProperty.call($t,Ft)&&(yt[Ft]=$t[Ft])}return yt},_extends$1.apply(this,arguments)}var Action;(function(yt){yt.Pop="POP",yt.Push="PUSH",yt.Replace="REPLACE"})(Action||(Action={}));const PopStateEventType="popstate";function createBrowserHistory(yt){yt===void 0&&(yt={});function _e(Ft,Vt){let{pathname:qt,search:zt,hash:Ht}=Ft.location;return createLocation("",{pathname:qt,search:zt,hash:Ht},Vt.state&&Vt.state.usr||null,Vt.state&&Vt.state.key||"default")}function $t(Ft,Vt){return typeof Vt=="string"?Vt:createPath(Vt)}return getUrlBasedHistory(_e,$t,null,yt)}function invariant$1(yt,_e){if(yt===!1||yt===null||typeof yt>"u")throw new Error(_e)}function warning(yt,_e){if(!yt){typeof console<"u"&&console.warn(_e);try{throw new Error(_e)}catch{}}}function createKey(){return Math.random().toString(36).substr(2,8)}function getHistoryState(yt,_e){return{usr:yt.state,key:yt.key,idx:_e}}function createLocation(yt,_e,$t,Ft){return $t===void 0&&($t=null),_extends$1({pathname:typeof yt=="string"?yt:yt.pathname,search:"",hash:""},typeof _e=="string"?parsePath(_e):_e,{state:$t,key:_e&&_e.key||Ft||createKey()})}function createPath(yt){let{pathname:_e="/",search:$t="",hash:Ft=""}=yt;return $t&&$t!=="?"&&(_e+=$t.charAt(0)==="?"?$t:"?"+$t),Ft&&Ft!=="#"&&(_e+=Ft.charAt(0)==="#"?Ft:"#"+Ft),_e}function parsePath(yt){let _e={};if(yt){let $t=yt.indexOf("#");$t>=0&&(_e.hash=yt.substr($t),yt=yt.substr(0,$t));let Ft=yt.indexOf("?");Ft>=0&&(_e.search=yt.substr(Ft),yt=yt.substr(0,Ft)),yt&&(_e.pathname=yt)}return _e}function getUrlBasedHistory(yt,_e,$t,Ft){Ft===void 0&&(Ft={});let{window:Vt=document.defaultView,v5Compat:qt=!1}=Ft,zt=Vt.history,Ht=Action.Pop,Kt=null,Gt=Jt();Gt==null&&(Gt=0,zt.replaceState(_extends$1({},zt.state,{idx:Gt}),""));function Jt(){return(zt.state||{idx:null}).idx}function Xt(){Ht=Action.Pop;let ar=Jt(),nr=ar==null?null:ar-Gt;
vendor: 4,423 bytes, line 218
218Gt=ar,Kt&&Kt({action:Ht,location:rr.location,delta:nr})}function Zt(ar,nr){Ht=Action.Push;let cr=createLocation(rr.location,ar,nr);Gt=Jt()+1;let fr=getHistoryState(cr,Gt),vr=rr.createHref(cr);try{zt.pushState(fr,"",vr)}catch(xr){if(xr instanceof DOMException&&xr.name==="DataCloneError")throw xr;Vt.location.assign(vr)}qt&&Kt&&Kt({action:Ht,location:rr.location,delta:1})}function er(ar,nr){Ht=Action.Replace;let cr=createLocation(rr.location,ar,nr);Gt=Jt();let fr=getHistoryState(cr,Gt),vr=rr.createHref(cr);zt.replaceState(fr,"",vr),qt&&Kt&&Kt({action:Ht,location:rr.location,delta:0})}function tr(ar){let nr=Vt.location.origin!=="null"?Vt.location.origin:Vt.location.href,cr=typeof ar=="string"?ar:createPath(ar);return cr=cr.replace(/ $/,"%20"),invariant$1(nr,"No window.location.(origin|href) available to create URL for href: "+cr),new URL(cr,nr)}let rr={get action(){return Ht},get location(){return yt(Vt,zt)},listen(ar){if(Kt)throw new Error("A history only accepts one active listener");return Vt.addEventListener(PopStateEventType,Xt),Kt=ar,()=>{Vt.removeEventListener(PopStateEventType,Xt),Kt=null}},createHref(ar){return _e(Vt,ar)},createURL:tr,encodeLocation(ar){let nr=tr(ar);return{pathname:nr.pathname,search:nr.search,hash:nr.hash}},push:Zt,replace:er,go(ar){return zt.go(ar)}};return rr}var ResultType;(function(yt){yt.data="data",yt.deferred="deferred",yt.redirect="redirect",yt.error="error"})(ResultType||(ResultType={}));function matchRoutes(yt,_e,$t){return $t===void 0&&($t="/"),matchRoutesImpl(yt,_e,$t,!1)}function matchRoutesImpl(yt,_e,$t,Ft){let Vt=typeof _e=="string"?parsePath(_e):_e,qt=stripBasename(Vt.pathname||"/",$t);if(qt==null)return null;let zt=flattenRoutes(yt);rankRouteBranches(zt);let Ht=null;for(let Kt=0;Ht==null&&Kt<zt.length;++Kt){let Gt=decodePath(qt);Ht=matchRouteBranch(zt[Kt],Gt,Ft)}return Ht}function flattenRoutes(yt,_e,$t,Ft){_e===void 0&&(_e=[]),$t===void 0&&($t=[]),Ft===void 0&&(Ft="");let Vt=(qt,zt,Ht)=>{let Kt={relativePath:Ht===void 0?qt.path||"":Ht,caseSensitive:qt.caseSensitive===!0,childrenIndex:zt,route:qt};Kt.relativePath.startsWith("/")&&(invariant$1(Kt.relativePath.startsWith(Ft),'Absolute route path "'+Kt.relativePath+'" nested under path '+('"'+Ft+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),Kt.relativePath=Kt.relativePath.slice(Ft.length));let Gt=joinPaths([Ft,Kt.relativePath]),Jt=$t.concat(Kt);qt.children&&qt.children.length>0&&(invariant$1(qt.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+Gt+'".')),flattenRoutes(qt.children,_e,Jt,Gt)),!(qt.path==null&&!qt.index)&&_e.push({path:Gt,score:computeScore(Gt,qt.index),routesMeta:Jt})};return yt.forEach((qt,zt)=>{var Ht;if(qt.path===""||!((Ht=qt.path)!=null&&Ht.includes("?")))Vt(qt,zt);else for(let Kt of explodeOptionalSegments(qt.path))Vt(qt,zt,Kt)}),_e}function explodeOptionalSegments(yt){let _e=yt.split("/");if(_e.length===0)return[];let[$t,...Ft]=_e,Vt=$t.endsWith("?"),qt=$t.replace(/\?$/,"");if(Ft.length===0)return Vt?[qt,""]:[qt];let zt=explodeOptionalSegments(Ft.join("/")),Ht=[];return Ht.push(...zt.map(Kt=>Kt===""?qt:[qt,Kt].join("/"))),Vt&&Ht.push(...zt),Ht.map(Kt=>yt.startsWith("/")&&Kt===""?"/":Kt)}function rankRouteBranches(yt){yt.sort((_e,$t)=>_e.score!==$t.score?$t.score-_e.score:compareIndexes(_e.routesMeta.map(Ft=>Ft.childrenIndex),$t.routesMeta.map(Ft=>Ft.childrenIndex)))}const paramRe=/^:[\w-]+$/,dynamicSegmentValue=3,indexRouteValue=2,emptySegmentValue=1,staticSegmentValue=10,splatPenalty=-2,isSplat=yt=>yt==="*";function computeScore(yt,_e){let $t=yt.split("/"),Ft=$t.length;return $t.some(isSplat)&&(Ft+=splatPenalty),_e&&(Ft+=indexRouteValue),$t.filter(Vt=>!isSplat(Vt)).reduce((Vt,qt)=>Vt+(paramRe.test(qt)?dynamicSegmentValue:qt===""?emptySegmentValue:staticSegmentValue),Ft)}function compareIndexes(yt,_e){return yt.length===_e.length&&yt.slice(0,-1).every((Ft,Vt)=>Ft===_e[Vt])?yt[yt.length-1]-_e[_e.length-1]:0}function matchRouteBranch(yt,_e,$t){let{routesMeta:Ft}=yt,Vt={},qt="/",zt=[];for(let Ht=0;Ht<Ft.length;++Ht){let Kt=Ft[Ht],Gt=Ht===Ft.length-1,Jt=qt==="/"?_e:_e.slice(qt.length)||"/",Xt=matchPath({path:Kt.relativePath,caseSensitive:Kt.caseSensitive,end:Gt},Jt),Zt=Kt.route;if(!Xt&&Gt&&$t&&!Ft[Ft.length-1].route.index&&(Xt=matchPath({path:Kt.relativePath,caseSensitive:Kt.caseSensitive,end:!1},Jt)),!Xt)return null;
vendor: 17,170 bytes, lines 218-236
218Object.assign(Vt,Xt.params),zt.push({params:Vt,pathname:joinPaths([qt,Xt.pathname]),pathnameBase:normalizePathname(joinPaths([qt,Xt.pathnameBase])),route:Zt}),Xt.pathnameBase!=="/"&&(qt=joinPaths([qt,Xt.pathnameBase]))}return zt}function matchPath(yt,_e){typeof yt=="string"&&(yt={path:yt,caseSensitive:!1,end:!0});let[$t,Ft]=compilePath(yt.path,yt.caseSensitive,yt.end),Vt=_e.match($t);if(!Vt)return null;let qt=Vt[0],zt=qt.replace(/(.)\/+$/,"$1"),Ht=Vt.slice(1);return{params:Ft.reduce((Gt,Jt,Xt)=>{let{paramName:Zt,isOptional:er}=Jt;if(Zt==="*"){let rr=Ht[Xt]||"";zt=qt.slice(0,qt.length-rr.length).replace(/(.)\/+$/,"$1")}const tr=Ht[Xt];return er&&!tr?Gt[Zt]=void 0:Gt[Zt]=(tr||"").replace(/%2F/g,"/"),Gt},{}),pathname:qt,pathnameBase:zt,pattern:yt}}function compilePath(yt,_e,$t){_e===void 0&&(_e=!1),$t===void 0&&($t=!0),warning(yt==="*"||!yt.endsWith("*")||yt.endsWith("/*"),'Route path "'+yt+'" will be treated as if it were '+('"'+yt.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+yt.replace(/\*$/,"/*")+'".'));let Ft=[],Vt="^"+yt.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(zt,Ht,Kt)=>(Ft.push({paramName:Ht,isOptional:Kt!=null}),Kt?"/?([^\\/]+)?":"/([^\\/]+)"));return yt.endsWith("*")?(Ft.push({paramName:"*"}),Vt+=yt==="*"||yt==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):$t?Vt+="\\/*$":yt!==""&&yt!=="/"&&(Vt+="(?:(?=\\/|$))"),[new RegExp(Vt,_e?void 0:"i"),Ft]}function decodePath(yt){try{return yt.split("/").map(_e=>decodeURIComponent(_e).replace(/\//g,"%2F")).join("/")}catch(_e){return warning(!1,'The URL path "'+yt+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+_e+").")),yt}}function stripBasename(yt,_e){if(_e==="/")return yt;if(!yt.toLowerCase().startsWith(_e.toLowerCase()))return null;let $t=_e.endsWith("/")?_e.length-1:_e.length,Ft=yt.charAt($t);return Ft&&Ft!=="/"?null:yt.slice($t)||"/"}function resolvePath(yt,_e){_e===void 0&&(_e="/");let{pathname:$t,search:Ft="",hash:Vt=""}=typeof yt=="string"?parsePath(yt):yt;return{pathname:$t?$t.startsWith("/")?$t:resolvePathname($t,_e):_e,search:normalizeSearch(Ft),hash:normalizeHash(Vt)}}function resolvePathname(yt,_e){let $t=_e.replace(/\/+$/,"").split("/");return yt.split("/").forEach(Vt=>{Vt===".."?$t.length>1&&$t.pop():Vt!=="."&&$t.push(Vt)}),$t.length>1?$t.join("/"):"/"}function getInvalidPathError(yt,_e,$t,Ft){return"Cannot include a '"+yt+"' character in a manually specified "+("`to."+_e+"` field ["+JSON.stringify(Ft)+"]. Please separate it out to the ")+("`to."+$t+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function getPathContributingMatches(yt){return yt.filter((_e,$t)=>$t===0||_e.route.path&&_e.route.path.length>0)}function getResolveToMatches(yt,_e){let $t=getPathContributingMatches(yt);return _e?$t.map((Ft,Vt)=>Vt===$t.length-1?Ft.pathname:Ft.pathnameBase):$t.map(Ft=>Ft.pathnameBase)}function resolveTo(yt,_e,$t,Ft){Ft===void 0&&(Ft=!1);let Vt;typeof yt=="string"?Vt=parsePath(yt):(Vt=_extends$1({},yt),invariant$1(!Vt.pathname||!Vt.pathname.includes("?"),getInvalidPathError("?","pathname","search",Vt)),invariant$1(!Vt.pathname||!Vt.pathname.includes("#"),getInvalidPathError("#","pathname","hash",Vt)),invariant$1(!Vt.search||!Vt.search.includes("#"),getInvalidPathError("#","search","hash",Vt)));let qt=yt===""||Vt.pathname==="",zt=qt?"/":Vt.pathname,Ht;if(zt==null)Ht=$t;else{let Xt=_e.length-1;if(!Ft&&zt.startsWith("..")){let Zt=zt.split("/");for(;Zt[0]==="..";)Zt.shift(),Xt-=1;Vt.pathname=Zt.join("/")}Ht=Xt>=0?_e[Xt]:"/"}let Kt=resolvePath(Vt,Ht),Gt=zt&&zt!=="/"&&zt.endsWith("/"),Jt=(qt||zt===".")&&$t.endsWith("/");return!Kt.pathname.endsWith("/")&&(Gt||Jt)&&(Kt.pathname+="/"),Kt}const joinPaths=yt=>yt.join("/").replace(/\/\/+/g,"/"),normalizePathname=yt=>yt.replace(/\/+$/,"").replace(/^\/*/,"/"),normalizeSearch=yt=>!yt||yt==="?"?"":yt.startsWith("?")?yt:"?"+yt,normalizeHash=yt=>!yt||yt==="#"?"":yt.startsWith("#")?yt:"#"+yt;function isRouteErrorResponse(yt){return yt!=null&&typeof yt.status=="number"&&typeof yt.statusText=="string"&&typeof yt.internal=="boolean"&&"data"in yt}const validMutationMethodsArr=["post","put","patch","delete"];new Set(validMutationMethodsArr);const validRequestMethodsArr=["get",...validMutationMethodsArr];new Set(validRequestMethodsArr);/** 219 * React Router v6.30.1 220 * 221 * Copyright (c) Remix Software Inc. 222 * 223 * This source code is licensed under the MIT license found in the 224 * LICENSE.md file in the root directory of this source tree. 225 * 226 * @license MIT 227 */function _extends(){return _extends=Object.assign?Object.assign.bind():function(yt){for(var _e=1;_e<arguments.length;_e++){var $t=arguments[_e];for(var Ft in $t)Object.prototype.hasOwnProperty.call($t,Ft)&&(yt[Ft]=$t[Ft])}return yt},_extends.apply(this,arguments)}const DataRouterContext=reactExports.createContext(null),DataRouterStateContext=reactExports.createContext(null),NavigationContext=reactExports.createContext(null),LocationContext=reactExports.createContext(null),RouteContext=reactExports.createContext({outlet:null,matches:[],isDataRoute:!1}),RouteErrorContext=reactExports.createContext(null);function useInRouterContext(){return reactExports.useContext(LocationContext)!=null}function useLocation(){return useInRouterContext()||invariant$1(!1),reactExports.useContext(LocationContext).location}function useIsomorphicLayoutEffect$2(yt){reactExports.useContext(NavigationContext).static||reactExports.useLayoutEffect(yt)}function useNavigate(){let{isDataRoute:yt}=reactExports.useContext(RouteContext);return yt?useNavigateStable():useNavigateUnstable()}function useNavigateUnstable(){useInRouterContext()||invariant$1(!1);let yt=reactExports.useContext(DataRouterContext),{basename:_e,future:$t,navigator:Ft}=reactExports.useContext(NavigationContext),{matches:Vt}=reactExports.useContext(RouteContext),{pathname:qt}=useLocation(),zt=JSON.stringify(getResolveToMatches(Vt,$t.v7_relativeSplatPath)),Ht=reactExports.useRef(!1);return useIsomorphicLayoutEffect$2(()=>{Ht.current=!0}),reactExports.useCallback(function(Gt,Jt){if(Jt===void 0&&(Jt={}),!Ht.current)return;if(typeof Gt=="number"){Ft.go(Gt);return}let Xt=resolveTo(Gt,JSON.parse(zt),qt,Jt.relative==="path");yt==null&&_e!=="/"&&(Xt.pathname=Xt.pathname==="/"?_e:joinPaths([_e,Xt.pathname])),(Jt.replace?Ft.replace:Ft.push)(Xt,Jt.state,Jt)},[_e,Ft,zt,qt,yt])}function useRoutes(yt,_e){return useRoutesImpl(yt,_e)}function useRoutesImpl(yt,_e,$t,Ft){useInRouterContext()||invariant$1(!1);let{navigator:Vt}=reactExports.useContext(NavigationContext),{matches:qt}=reactExports.useContext(RouteContext),zt=qt[qt.length-1],Ht=zt?zt.params:{};zt&&zt.pathname;let Kt=zt?zt.pathnameBase:"/";zt&&zt.route;let Gt=useLocation(),Jt;if(_e){var Xt;let ar=typeof _e=="string"?parsePath(_e):_e;Kt==="/"||(Xt=ar.pathname)!=null&&Xt.startsWith(Kt)||invariant$1(!1),Jt=ar}else Jt=Gt;let Zt=Jt.pathname||"/",er=Zt;if(Kt!=="/"){let ar=Kt.replace(/^\//,"").split("/");er="/"+Zt.replace(/^\//,"").split("/").slice(ar.length).join("/")}let tr=matchRoutes(yt,{pathname:er}),rr=_renderMatches(tr&&tr.map(ar=>Object.assign({},ar,{params:Object.assign({},Ht,ar.params),pathname:joinPaths([Kt,Vt.encodeLocation?Vt.encodeLocation(ar.pathname).pathname:ar.pathname]),pathnameBase:ar.pathnameBase==="/"?Kt:joinPaths([Kt,Vt.encodeLocation?Vt.encodeLocation(ar.pathnameBase).pathname:ar.pathnameBase])})),qt,$t,Ft);return _e&&rr?reactExports.createElement(LocationContext.Provider,{value:{location:_extends({pathname:"/",search:"",hash:"",state:null,key:"default"},Jt),navigationType:Action.Pop}},rr):rr}function DefaultErrorComponent(){let yt=useRouteError(),_e=isRouteErrorResponse(yt)?yt.status+" "+yt.statusText:yt instanceof Error?yt.message:JSON.stringify(yt),$t=yt instanceof Error?yt.stack:null,Vt={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("h2",null,"Unexpected Application Error!"),reactExports.createElement("h3",{style:{fontStyle:"italic"}},_e),$t?reactExports.createElement("pre",{style:Vt},$t):null,null)}const defaultErrorElement=reactExports.createElement(DefaultErrorComponent,null);class RenderErrorBoundary extends reactExports.Component{constructor(_e){super(_e),this.state={location:_e.location,revalidation:_e.revalidation,error:_e.error}}static getDerivedStateFromError(_e){return{error:_e}}static getDerivedStateFromProps(_e,$t){return $t.location!==_e.location||$t.revalidation!=="idle"&&_e.revalidation==="idle"?{error:_e.error,location:_e.location,revalidation:_e.revalidation}:{error:_e.error!==void 0?_e.error:$t.error,location:$t.location,revalidation:_e.revalidation||$t.revalidation}}componentDidCatch(_e,$t){console.error("React Router caught the following error during render",_e,$t)}render(){return this.state.error!==void 0?reactExports.createElement(RouteContext.Provider,{value:this.props.routeContext},reactExports.createElement(RouteErrorContext.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function RenderedRoute(yt){let{routeContext:_e,match:$t,children:Ft}=yt,Vt=reactExports.useContext(DataRouterContext);return Vt&&Vt.static&&Vt.staticContext&&($t.route.errorElement||$t.route.ErrorBoundary)&&(Vt.staticContext._deepestRenderedBoundaryId=$t.route.id),reactExports.createElement(RouteContext.Provider,{value:_e},Ft)}function _renderMatches(yt,_e,$t,Ft){var Vt;if(_e===void 0&&(_e=[]),$t===void 0&&($t=null),Ft===void 0&&(Ft=null),yt==null){var qt;if(!$t)return null;if($t.errors)yt=$t.matches;else if((qt=Ft)!=null&&qt.v7_partialHydration&&_e.length===0&&!$t.initialized&&$t.matches.length>0)yt=$t.matches;else return null}let zt=yt,Ht=(Vt=$t)==null?void 0:Vt.errors;if(Ht!=null){let Jt=zt.findIndex(Xt=>Xt.route.id&&(Ht==null?void 0:Ht[Xt.route.id])!==void 0);Jt>=0||invariant$1(!1),zt=zt.slice(0,Math.min(zt.length,Jt+1))}let Kt=!1,Gt=-1;if($t&&Ft&&Ft.v7_partialHydration)for(let Jt=0;Jt<zt.length;Jt++){let Xt=zt[Jt];if((Xt.route.HydrateFallback||Xt.route.hydrateFallbackElement)&&(Gt=Jt),Xt.route.id){let{loaderData:Zt,errors:er}=$t,tr=Xt.route.loader&&Zt[Xt.route.id]===void 0&&(!er||er[Xt.route.id]===void 0);if(Xt.route.lazy||tr){Kt=!0,Gt>=0?zt=zt.slice(0,Gt+1):zt=[zt[0]];break}}}return zt.reduceRight((Jt,Xt,Zt)=>{let er,tr=!1,rr=null,ar=null;$t&&(er=Ht&&Xt.route.id?Ht[Xt.route.id]:void 0,rr=Xt.route.errorElement||defaultErrorElement,Kt&&(Gt<0&&Zt===0?(tr=!0,ar=null):Gt===Zt&&(tr=!0,ar=Xt.route.hydrateFallbackElement||null)));let nr=_e.concat(zt.slice(0,Zt+1)),cr=()=>{let fr;return er?fr=rr:tr?fr=ar:Xt.route.Component?fr=reactExports.createElement(Xt.route.Component,null):Xt.route.element?fr=Xt.route.element:fr=Jt,reactExports.createElement(RenderedRoute,{match:Xt,routeContext:{outlet:Jt,matches:nr,isDataRoute:$t!=null},children:fr})};return $t&&(Xt.route.ErrorBoundary||Xt.route.errorElement||Zt===0)?reactExports.createElement(RenderErrorBoundary,{location:$t.location,revalidation:$t.revalidation,component:rr,error:er,children:cr(),routeContext:{outlet:null,matches:nr,isDataRoute:!0}}):cr()},null)}var DataRouterHook$1=function(yt){return yt.UseBlocker="useBlocker",yt.UseRevalidator="useRevalidator",yt.UseNavigateStable="useNavigate",yt}(DataRouterHook$1||{}),DataRouterStateHook$1=function(yt){return yt.UseBlocker="useBlocker",yt.UseLoaderData="useLoaderData",yt.UseActionData="useActionData",yt.UseRouteError="useRouteError",yt.UseNavigation="useNavigation",yt.UseRouteLoaderData="useRouteLoaderData",yt.UseMatches="useMatches",yt.UseRevalidator="useRevalidator",yt.UseNavigateStable="useNavigate",yt.UseRouteId="useRouteId",yt}(DataRouterStateHook$1||{});function useDataRouterContext(yt){let _e=reactExports.useContext(DataRouterContext);return _e||invariant$1(!1),_e}function useDataRouterState(yt){let _e=reactExports.useContext(DataRouterStateContext);return _e||invariant$1(!1),_e}function useRouteContext(yt){let _e=reactExports.useContext(RouteContext);return _e||invariant$1(!1),_e}function useCurrentRouteId(yt){let _e=useRouteContext(),$t=_e.matches[_e.matches.length-1];return $t.route.id||invariant$1(!1),$t.route.id}function useRouteError(){var yt;let _e=reactExports.useContext(RouteErrorContext),$t=useDataRouterState(DataRouterStateHook$1.UseRouteError),Ft=useCurrentRouteId(DataRouterStateHook$1.UseRouteError);return _e!==void 0?_e:(yt=$t.errors)==null?void 0:yt[Ft]}function useNavigateStable(){let{router:yt}=useDataRouterContext(DataRouterHook$1.UseNavigateStable),_e=useCurrentRouteId(DataRouterStateHook$1.UseNavigateStable),$t=reactExports.useRef(!1);return useIsomorphicLayoutEffect$2(()=>{$t.current=!0}),reactExports.useCallback(function(Vt,qt){qt===void 0&&(qt={}),$t.current&&(typeof Vt=="number"?yt.navigate(Vt):yt.navigate(Vt,_extends({fromRouteId:_e},qt)))},[yt,_e])}function logV6DeprecationWarnings(yt,_e){yt==null||yt.v7_startTransition,yt==null||yt.v7_relativeSplatPath}function Navigate(yt){let{to:_e,replace:$t,state:Ft,relative:Vt}=yt;useInRouterContext()||invariant$1(!1);let{future:qt,static:zt}=reactExports.useContext(NavigationContext),{matches:Ht}=reactExports.useContext(RouteContext),{pathname:Kt}=useLocation(),Gt=useNavigate(),Jt=resolveTo(_e,getResolveToMatches(Ht,qt.v7_relativeSplatPath),Kt,Vt==="path"),Xt=JSON.stringify(Jt);return reactExports.useEffect(()=>Gt(JSON.parse(Xt),{replace:$t,state:Ft,relative:Vt}),[Gt,Xt,Vt,$t,Ft]),null}function Route(yt){invariant$1(!1)}function Router(yt){let{basename:_e="/",children:$t=null,location:Ft,navigationType:Vt=Action.Pop,navigator:qt,static:zt=!1,future:Ht}=yt;useInRouterContext()&&invariant$1(!1);let Kt=_e.replace(/^\/*/,"/"),Gt=reactExports.useMemo(()=>({basename:Kt,navigator:qt,static:zt,future:_extends({v7_relativeSplatPath:!1},Ht)}),[Kt,Ht,qt,zt]);typeof Ft=="string"&&(Ft=parsePath(Ft));let{pathname:Jt="/",search:Xt="",hash:Zt="",state:er=null,key:tr="default"}=Ft,rr=reactExports.useMemo(()=>{let ar=stripBasename(Jt,Kt);return ar==null?null:{location:{pathname:ar,search:Xt,hash:Zt,state:er,key:tr},navigationType:Vt}},[Kt,Jt,Xt,Zt,er,tr,Vt]);return rr==null?null:reactExports.createElement(NavigationContext.Provider,{value:Gt},reactExports.createElement(LocationContext.Provider,{children:$t,value:rr}))}function Routes(yt){let{children:_e,location:$t}=yt;return useRoutes(createRoutesFromChildren(_e),$t)}new Promise(()=>{});function createRoutesFromChildren(yt,_e){_e===void 0&&(_e=[]);let $t=[];return reactExports.Children.forEach(yt,(Ft,Vt)=>{if(!reactExports.isValidElement(Ft))return;let qt=[..._e,Vt];if(Ft.type===reactExports.Fragment){$t.push.apply($t,createRoutesFromChildren(Ft.props.children,qt));return}Ft.type!==Route&&invariant$1(!1),!Ft.props.index||!Ft.props.children||invariant$1(!1);let zt={id:Ft.props.id||qt.join("-"),caseSensitive:Ft.props.caseSensitive,element:Ft.props.element,Component:Ft.props.Component,index:Ft.props.index,path:Ft.props.path,loader:Ft.props.loader,action:Ft.props.action,errorElement:Ft.props.errorElement,ErrorBoundary:Ft.props.ErrorBoundary,hasErrorBoundary:Ft.props.ErrorBoundary!=null||Ft.props.errorElement!=null,shouldRevalidate:Ft.props.shouldRevalidate,handle:Ft.props.handle,lazy:Ft.props.lazy};Ft.props.children&&(zt.children=createRoutesFromChildren(Ft.props.children,qt)),$t.push(zt)}),$t}/** 228 * React Router DOM v6.30.1 229 * 230 * Copyright (c) Remix Software Inc. 231 * 232 * This source code is licensed under the MIT license found in the 233 * LICENSE.md file in the root directory of this source tree. 234 * 235 * @license MIT 236 */const REACT_ROUTER_VERSION="6";try{window.__reactRouterVersion=REACT_ROUTER_VERSION}catch{}const START_TRANSITION="startTransition",startTransitionImpl=React$3[START_TRANSITION];function BrowserRouter(yt){let{basename:_e,children:$t,future:Ft,window:Vt}=yt,qt=reactExports.useRef();qt.current==null&&(qt.current=createBrowserHistory({window:Vt,v5Compat:!0}));let zt=qt.current,[Ht,Kt]=reactExports.useState({action:zt.action,location:zt.location}),{v7_startTransition:Gt}=Ft||{},Jt=reactExports.useCallback(Xt=>{Gt&&startTransitionImpl?startTransitionImpl(()=>Kt(Xt)):Kt(Xt)},[Kt,Gt]);return reactExports.useLayoutEffect(()=>zt.listen(Jt),[zt,Jt]),reactExports.useEffect(()=>logV6DeprecationWarnings(Ft),[Ft]),reactExports.createElement(Router,{basename:_e,children:$t,location:Ht.location,navigationType:Ht.action,navigator:zt,future:Ft})}var DataRouterHook;(function(yt){yt.UseScrollRestoration="useScrollRestoration",yt.UseSubmit="useSubmit",yt.UseSubmitFetcher="useSubmitFetcher",yt.UseFetcher="useFetcher",yt.useViewTransitionState="useViewTransitionState"})(DataRouterHook||(DataRouterHook={}));var DataRouterStateHook;(function(yt){yt.UseFetcher="useFetcher",yt.UseFetchers="useFetchers",yt.UseScrollRestoration="useScrollRestoration"})(DataRouterStateHook||(DataRouterStateHook={}));const scriptRel="modulepreload",assetsURL=function(yt){return"/"+yt},seen={},__vitePreload=function(_e,$t,Ft){let Vt=Promise.resolve();if($t&&$t.length>0){document.getElementsByTagName("link");
236const zt=document.querySelector("meta[property=csp-nonce]"),Ht=(zt==null?void 0:zt.nonce)||(zt==null?void 0:zt.getAttribute("nonce"));Vt=Promise.allSettled($t.map(Kt=>{if(Kt=assetsURL(Kt),Kt in seen)return;seen[Kt]=!0;const Gt=Kt.endsWith(".css"),Jt=Gt?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${Kt}"]${Jt}`))return;const Xt=document.createElement("link");if(Xt.rel=Gt?"stylesheet":scriptRel,Gt||(Xt.as="script"),Xt.crossOrigin="",Xt.href=Kt,Ht&&Xt.setAttribute("nonce",Ht),document.head.appendChild(Xt),Gt)return new Promise((Zt,er)=>{Xt.addEventListener("load",Zt),Xt.addEventListener("error",()=>er(new Error(`Unable to preload CSS for ${Kt}`)))})}))}function qt(zt){const Ht=new Event("vite:preloadError",{cancelable:!0});if(Ht.payload=zt,window.dispatchEvent(Ht),!Ht.defaultPrevented)throw zt}return Vt.then(zt=>{for(const Ht of zt||[])Ht.status==="rejected"&&qt(Ht.reason);return _e().catch(qt)})},resolveFetch$3=yt=>{let _e;return yt?_e=yt:typeof fetch>"u"?_e=(...$t)=>__vitePreload(async()=>{const{default:Ft}=await Promise.resolve().then(()=>browser$d);return{default:Ft}},void 0).then(({default:Ft})=>Ft(...$t)):_e=fetch,(...$t)=>_e(...$t)};class FunctionsError extends Error{constructor(_e,$t="FunctionsError",Ft){super(_e),this.name=$t,this.context=Ft}}class FunctionsFetchError extends FunctionsError{constructor(_e){super("Failed to send a request to the Edge Function","FunctionsFetchError",_e)}}class FunctionsRelayError extends FunctionsError{constructor(_e){super("Relay Error invoking the Edge Function","FunctionsRelayError",_e)}}class FunctionsHttpError extends FunctionsError{constructor(_e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",_e)}}var FunctionRegion;(function(yt){yt.Any="any",yt.ApNortheast1="ap-northeast-1",yt.ApNortheast2="ap-northeast-2",yt.ApSouth1="ap-south-1",yt.ApSoutheast1="ap-southeast-1",yt.ApSoutheast2="ap-southeast-2",yt.CaCentral1="ca-central-1",yt.EuCentral1="eu-central-1",yt.EuWest1="eu-west-1",yt.EuWest2="eu-west-2",yt.EuWest3="eu-west-3",yt.SaEast1="sa-east-1",yt.UsEast1="us-east-1",yt.UsWest1="us-west-1",yt.UsWest2="us-west-2"})(FunctionRegion||(FunctionRegion={}));var __awaiter$9=function(yt,_e,$t,Ft){function Vt(qt){return qt instanceof $t?qt:new $t(function(zt){zt(qt)})}return new($t||($t=Promise))(function(qt,zt){function Ht(Jt){try{Gt(Ft.next(Jt))}catch(Xt){zt(Xt)}}function Kt(Jt){try{Gt(Ft.throw(Jt))}catch(Xt){zt(Xt)}}function Gt(Jt){Jt.done?qt(Jt.value):Vt(Jt.value).then(Ht,Kt)}Gt((Ft=Ft.apply(yt,_e||[])).next())})};class FunctionsClient{constructor(_e,{headers:$t={},customFetch:Ft,region:Vt=FunctionRegion.Any}={}){this.url=_e,this.headers=$t,this.region=Vt,this.fetch=resolveFetch$3(Ft)}setAuth(_e){this.headers.Authorization=`Bearer ${_e}`}invoke(_e,$t={}){var Ft;return __awaiter$9(this,void 0,void 0,function*(){try{const{headers:Vt,method:qt,body:zt}=$t;let Ht={},{region:Kt}=$t;Kt||(Kt=this.region),Kt&&Kt!=="any"&&(Ht["x-region"]=Kt);let Gt;zt&&(Vt&&!Object.prototype.hasOwnProperty.call(Vt,"Content-Type")||!Vt)&&(typeof Blob<"u"&&zt instanceof Blob||zt instanceof ArrayBuffer?(Ht["Content-Type"]="application/octet-stream",Gt=zt):typeof zt=="string"?(Ht["Content-Type"]="text/plain",Gt=zt):typeof FormData<"u"&&zt instanceof FormData?Gt=zt:(Ht["Content-Type"]="application/json",Gt=JSON.stringify(zt)));const Jt=yield this.fetch(`${this.url}/${_e}`,{method:qt||"POST",headers:Object.assign(Object.assign(Object.assign({},Ht),this.headers),Vt),body:Gt}).catch(tr=>{throw new FunctionsFetchError(tr)}),Xt=Jt.headers.get("x-relay-error");if(Xt&&Xt==="true")throw new FunctionsRelayError(Jt);if(!Jt.ok)throw new FunctionsHttpError(Jt);let Zt=((Ft=Jt.headers.get("Content-Type"))!==null&&Ft!==void 0?Ft:"text/plain").split(";")[0].trim(),er;return Zt==="application/json"?er=yield Jt.json():Zt==="application/octet-stream"?er=yield Jt.blob():Zt==="text/event-stream"?er=Jt:Zt==="multipart/form-data"?er=yield Jt.formData():er=yield Jt.text(),{data:er,error:null}}catch(Vt){return{data:null,error:Vt}}})}}var cjs$3={},PostgrestClient$2={},PostgrestQueryBuilder$2={},PostgrestFilterBuilder$2={},PostgrestTransformBuilder$2={},PostgrestBuilder$2={},getGlobal=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof globalThis<"u")return globalThis;throw new Error("unable to locate global object")},globalObject=getGlobal();const fetch$1=globalObject.fetch,nodeFetch=globalObject.fetch.bind(globalObject),Headers$1=globalObject.Headers,Request=globalObject.Request,Response$1=globalObject.Response,browser$d=Object.freeze(Object.defineProperty({__proto__:null,Headers:Headers$1,Request,Response:Response$1,default:nodeFetch,fetch:fetch$1},Symbol.toStringTag,{value:"Module"})),require$$0$2=getAugmentedNamespace(browser$d);var PostgrestError$2={};
236Object.defineProperty(PostgrestError$2,"__esModule",{value:!0});let PostgrestError$1=class extends Error{constructor(_e){super(_e.message),this.name="PostgrestError",this.details=_e.details,this.hint=_e.hint,this.code=_e.code}};PostgrestError$2.default=PostgrestError$1;var __importDefault$6=commonjsGlobal&&commonjsGlobal.__importDefault||function(yt){return yt&&yt.__esModule?yt:{default:yt}};Object.defineProperty(PostgrestBuilder$2,"__esModule",{value:!0});const node_fetch_1=__importDefault$6(require$$0$2),PostgrestError_1$1=__importDefault$6(PostgrestError$2);let PostgrestBuilder$1=class{constructor(_e){this.shouldThrowOnError=!1,this.method=_e.method,this.url=_e.url,this.headers=_e.headers,this.schema=_e.schema,this.body=_e.body,this.shouldThrowOnError=_e.shouldThrowOnError,this.signal=_e.signal,this.isMaybeSingle=_e.isMaybeSingle,_e.fetch?this.fetch=_e.fetch:typeof fetch>"u"?this.fetch=node_fetch_1.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(_e,$t){return this.headers=Object.assign({},this.headers),this.headers[_e]=$t,this}then(_e,$t){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const Ft=this.fetch;let Vt=Ft(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async qt=>{var zt,Ht,Kt;let Gt=null,Jt=null,Xt=null,Zt=qt.status,er=qt.statusText;if(qt.ok){if(this.method!=="HEAD"){const nr=await qt.text();nr===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?Jt=nr:Jt=JSON.parse(nr))}const rr=(zt=this.headers.Prefer)===null||zt===void 0?void 0:zt.match(/count=(exact|planned|estimated)/),ar=(Ht=qt.headers.get("content-range"))===null||Ht===void 0?void 0:Ht.split("/");rr&&ar&&ar.length>1&&(Xt=parseInt(ar[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(Jt)&&(Jt.length>1?(Gt={code:"PGRST116",details:`Results contain ${Jt.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},Jt=null,Xt=null,Zt=406,er="Not Acceptable"):Jt.length===1?Jt=Jt[0]:Jt=null)}else{const rr=await qt.text();try{Gt=JSON.parse(rr),Array.isArray(Gt)&&qt.status===404&&(Jt=[],Gt=null,Zt=200,er="OK")}catch{qt.status===404&&rr===""?(Zt=204,er="No Content"):Gt={message:rr}}if(Gt&&this.isMaybeSingle&&(!((Kt=Gt==null?void 0:Gt.details)===null||Kt===void 0)&&Kt.includes("0 rows"))&&(Gt=null,Zt=200,er="OK"),Gt&&this.shouldThrowOnError)throw new PostgrestError_1$1.default(Gt)}return{error:Gt,data:Jt,count:Xt,status:Zt,statusText:er}});return this.shouldThrowOnError||(Vt=Vt.catch(qt=>{var zt,Ht,Kt;return{error:{message:`${(zt=qt==null?void 0:qt.name)!==null&&zt!==void 0?zt:"FetchError"}: ${qt==null?void 0:qt.message}`,details:`${(Ht=qt==null?void 0:qt.stack)!==null&&Ht!==void 0?Ht:""}`,hint:"",code:`${(Kt=qt==null?void 0:qt.code)!==null&&Kt!==void 0?Kt:""}`},data:null,count:null,status:0,statusText:""}})),Vt.then(_e,$t)}returns(){return this}overrideTypes(){return this}};PostgrestBuilder$2.default=PostgrestBuilder$1;var __importDefault$5=commonjsGlobal&&commonjsGlobal.__importDefault||function(yt){return yt&&yt.__esModule?yt:{default:yt}};Object.defineProperty(PostgrestTransformBuilder$2,"__esModule",{value:!0});const PostgrestBuilder_1$1=__importDefault$5(PostgrestBuilder$2);let PostgrestTransformBuilder$1=class extends PostgrestBuilder_1$1.default{select(_e){let $t=!1;const Ft=(_e??"*").split("").map(Vt=>/\s/.test(Vt)&&!$t?"":(Vt==='"'&&($t=!$t),Vt)).join("");return this.url.searchParams.set("select",Ft),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(_e,{ascending:$t=!0,nullsFirst:Ft,foreignTable:Vt,referencedTable:qt=Vt}={}){const zt=qt?`${qt}.order`:"order",Ht=this.url.searchParams.get(zt);return this.url.searchParams.set(zt,`${Ht?`${Ht},`:""}${_e}.${$t?"asc":"desc"}${Ft===void 0?"":Ft?".nullsfirst":".nullslast"}`),this}limit(_e,{foreignTable:$t,referencedTable:Ft=$t}={}){const Vt=typeof Ft>"u"?"limit":`${Ft}.limit`;return this.url.searchParams.set(Vt,`${_e}`),this}range(_e,$t,{foreignTable:Ft,referencedTable:Vt=Ft}={}){const qt=typeof Vt>"u"?"offset":`${Vt}.offset`,zt=typeof Vt>"u"?"limit":`${Vt}.limit`;return this.url.searchParams.set(qt,`${_e}`),this.url.searchParams.set(zt,`${$t-_e+1}`),this}abortSignal(_e){return this.signal=_e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}
236explain({analyze:_e=!1,verbose:$t=!1,settings:Ft=!1,buffers:Vt=!1,wal:qt=!1,format:zt="text"}={}){var Ht;const Kt=[_e?"analyze":null,$t?"verbose":null,Ft?"settings":null,Vt?"buffers":null,qt?"wal":null].filter(Boolean).join("|"),Gt=(Ht=this.headers.Accept)!==null&&Ht!==void 0?Ht:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${zt}; for="${Gt}"; options=${Kt};`,zt==="json"?this:this}rollback(){var _e;return((_e=this.headers.Prefer)!==null&&_e!==void 0?_e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}};PostgrestTransformBuilder$2.default=PostgrestTransformBuilder$1;var __importDefault$4=commonjsGlobal&&commonjsGlobal.__importDefault||function(yt){return yt&&yt.__esModule?yt:{default:yt}};Object.defineProperty(PostgrestFilterBuilder$2,"__esModule",{value:!0});const PostgrestTransformBuilder_1$1=__importDefault$4(PostgrestTransformBuilder$2);let PostgrestFilterBuilder$1=class extends PostgrestTransformBuilder_1$1.default{eq(_e,$t){return this.url.searchParams.append(_e,`eq.${$t}`),this}neq(_e,$t){return this.url.searchParams.append(_e,`neq.${$t}`),this}gt(_e,$t){return this.url.searchParams.append(_e,`gt.${$t}`),this}gte(_e,$t){return this.url.searchParams.append(_e,`gte.${$t}`),this}lt(_e,$t){return this.url.searchParams.append(_e,`lt.${$t}`),this}lte(_e,$t){return this.url.searchParams.append(_e,`lte.${$t}`),this}like(_e,$t){return this.url.searchParams.append(_e,`like.${$t}`),this}likeAllOf(_e,$t){return this.url.searchParams.append(_e,`like(all).{${$t.join(",")}}`),this}likeAnyOf(_e,$t){return this.url.searchParams.append(_e,`like(any).{${$t.join(",")}}`),this}ilike(_e,$t){return this.url.searchParams.append(_e,`ilike.${$t}`),this}ilikeAllOf(_e,$t){return this.url.searchParams.append(_e,`ilike(all).{${$t.join(",")}}`),this}ilikeAnyOf(_e,$t){return this.url.searchParams.append(_e,`ilike(any).{${$t.join(",")}}`),this}is(_e,$t){return this.url.searchParams.append(_e,`is.${$t}`),this}in(_e,$t){const Ft=Array.from(new Set($t)).map(Vt=>typeof Vt=="string"&&new RegExp("[,()]").test(Vt)?`"${Vt}"`:`${Vt}`).join(",");return this.url.searchParams.append(_e,`in.(${Ft})`),this}contains(_e,$t){return typeof $t=="string"?this.url.searchParams.append(_e,`cs.${$t}`):Array.isArray($t)?this.url.searchParams.append(_e,`cs.{${$t.join(",")}}`):this.url.searchParams.append(_e,`cs.${JSON.stringify($t)}`),this}containedBy(_e,$t){return typeof $t=="string"?this.url.searchParams.append(_e,`cd.${$t}`):Array.isArray($t)?this.url.searchParams.append(_e,`cd.{${$t.join(",")}}`):this.url.searchParams.append(_e,`cd.${JSON.stringify($t)}`),this}rangeGt(_e,$t){return this.url.searchParams.append(_e,`sr.${$t}`),this}rangeGte(_e,$t){return this.url.searchParams.append(_e,`nxl.${$t}`),this}rangeLt(_e,$t){return this.url.searchParams.append(_e,`sl.${$t}`),this}rangeLte(_e,$t){return this.url.searchParams.append(_e,`nxr.${$t}`),this}rangeAdjacent(_e,$t){return this.url.searchParams.append(_e,`adj.${$t}`),this}overlaps(_e,$t){return typeof $t=="string"?this.url.searchParams.append(_e,`ov.${$t}`):this.url.searchParams.append(_e,`ov.{${$t.join(",")}}`),this}textSearch(_e,$t,{config:Ft,type:Vt}={}){let qt="";Vt==="plain"?qt="pl":Vt==="phrase"?qt="ph":Vt==="websearch"&&(qt="w");const zt=Ft===void 0?"":`(${Ft})`;return this.url.searchParams.append(_e,`${qt}fts${zt}.${$t}`),this}match(_e){return Object.entries(_e).forEach(([$t,Ft])=>{this.url.searchParams.append($t,`eq.${Ft}`)}),this}not(_e,$t,Ft){return this.url.searchParams.append(_e,`not.${$t}.${Ft}`),this}or(_e,{foreignTable:$t,referencedTable:Ft=$t}={}){const Vt=Ft?`${Ft}.or`:"or";return this.url.searchParams.append(Vt,`(${_e})`),this}filter(_e,$t,Ft){return this.url.searchParams.append(_e,`${$t}.${Ft}`),this}};PostgrestFilterBuilder$2.default=PostgrestFilterBuilder$1;var __importDefault$3=commonjsGlobal&&commonjsGlobal.__importDefault||function(yt){return yt&&yt.__esModule?yt:{default:yt}};Object.defineProperty(PostgrestQueryBuilder$2,"__esModule",{value:!0});const PostgrestFilterBuilder_1$2=__importDefault$3(PostgrestFilterBuilder$2);let PostgrestQueryBuilder$1=class{constructor(_e,{headers:$t={},schema:Ft,fetch:Vt}){this.url=_e,this.headers=$t,this.schema=Ft,this.fetch=Vt}select(_e,{head:$t=!1,count:Ft}={}){const Vt=$t?"HEAD":"GET";let qt=!1;
236const zt=(_e??"*").split("").map(Ht=>/\s/.test(Ht)&&!qt?"":(Ht==='"'&&(qt=!qt),Ht)).join("");return this.url.searchParams.set("select",zt),Ft&&(this.headers.Prefer=`count=${Ft}`),new PostgrestFilterBuilder_1$2.default({method:Vt,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(_e,{count:$t,defaultToNull:Ft=!0}={}){const Vt="POST",qt=[];if(this.headers.Prefer&&qt.push(this.headers.Prefer),$t&&qt.push(`count=${$t}`),Ft||qt.push("missing=default"),this.headers.Prefer=qt.join(","),Array.isArray(_e)){const zt=_e.reduce((Ht,Kt)=>Ht.concat(Object.keys(Kt)),[]);if(zt.length>0){const Ht=[...new Set(zt)].map(Kt=>`"${Kt}"`);this.url.searchParams.set("columns",Ht.join(","))}}return new PostgrestFilterBuilder_1$2.default({method:Vt,url:this.url,headers:this.headers,schema:this.schema,body:_e,fetch:this.fetch,allowEmpty:!1})}upsert(_e,{onConflict:$t,ignoreDuplicates:Ft=!1,count:Vt,defaultToNull:qt=!0}={}){const zt="POST",Ht=[`resolution=${Ft?"ignore":"merge"}-duplicates`];if($t!==void 0&&this.url.searchParams.set("on_conflict",$t),this.headers.Prefer&&Ht.push(this.headers.Prefer),Vt&&Ht.push(`count=${Vt}`),qt||Ht.push("missing=default"),this.headers.Prefer=Ht.join(","),Array.isArray(_e)){const Kt=_e.reduce((Gt,Jt)=>Gt.concat(Object.keys(Jt)),[]);if(Kt.length>0){const Gt=[...new Set(Kt)].map(Jt=>`"${Jt}"`);this.url.searchParams.set("columns",Gt.join(","))}}return new PostgrestFilterBuilder_1$2.default({method:zt,url:this.url,headers:this.headers,schema:this.schema,body:_e,fetch:this.fetch,allowEmpty:!1})}update(_e,{count:$t}={}){const Ft="PATCH",Vt=[];return this.headers.Prefer&&Vt.push(this.headers.Prefer),$t&&Vt.push(`count=${$t}`),this.headers.Prefer=Vt.join(","),new PostgrestFilterBuilder_1$2.default({method:Ft,url:this.url,headers:this.headers,schema:this.schema,body:_e,fetch:this.fetch,allowEmpty:!1})}delete({count:_e}={}){const $t="DELETE",Ft=[];return _e&&Ft.push(`count=${_e}`),this.headers.Prefer&&Ft.unshift(this.headers.Prefer),this.headers.Prefer=Ft.join(","),new PostgrestFilterBuilder_1$2.default({method:$t,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};PostgrestQueryBuilder$2.default=PostgrestQueryBuilder$1;var constants$2={},version$7={};Object.defineProperty(version$7,"__esModule",{value:!0});version$7.version=void 0;version$7.version="0.0.0-automated";Object.defineProperty(constants$2,"__esModule",{value:!0});constants$2.DEFAULT_HEADERS=void 0;const version_1=version$7;constants$2.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${version_1.version}`};var __importDefault$2=commonjsGlobal&&commonjsGlobal.__importDefault||function(yt){return yt&&yt.__esModule?yt:{default:yt}};Object.defineProperty(PostgrestClient$2,"__esModule",{value:!0});const PostgrestQueryBuilder_1$1=__importDefault$2(PostgrestQueryBuilder$2),PostgrestFilterBuilder_1$1=__importDefault$2(PostgrestFilterBuilder$2),constants_1=constants$2;let PostgrestClient$1=class _a{constructor(_e,{headers:$t={},schema:Ft,fetch:Vt}={}){this.url=_e,this.headers=Object.assign(Object.assign({},constants_1.DEFAULT_HEADERS),$t),this.schemaName=Ft,this.fetch=Vt}from(_e){const $t=new URL(`${this.url}/${_e}`);return new PostgrestQueryBuilder_1$1.default($t,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(_e){return new _a(this.url,{headers:this.headers,schema:_e,fetch:this.fetch})}rpc(_e,$t={},{head:Ft=!1,get:Vt=!1,count:qt}={}){let zt;const Ht=new URL(`${this.url}/rpc/${_e}`);let Kt;Ft||Vt?(zt=Ft?"HEAD":"GET",Object.entries($t).filter(([Jt,Xt])=>Xt!==void 0).map(([Jt,Xt])=>[Jt,Array.isArray(Xt)?`{${Xt.join(",")}}`:`${Xt}`]).forEach(([Jt,Xt])=>{Ht.searchParams.append(Jt,Xt)})):(zt="POST",Kt=$t);const Gt=Object.assign({},this.headers);return qt&&(Gt.Prefer=`count=${qt}`),new PostgrestFilterBuilder_1$1.default({method:zt,url:Ht,headers:Gt,schema:this.schemaName,body:Kt,fetch:this.fetch,allowEmpty:!1})}};PostgrestClient$2.default=PostgrestClient$1;var __importDefault$1=commonjsGlobal&&commonjsGlobal.__importDefault||function(yt){return yt&&yt.__esModule?yt:{default:yt}};
236Object.defineProperty(cjs$3,"__esModule",{value:!0});cjs$3.PostgrestError=cjs$3.PostgrestBuilder=cjs$3.PostgrestTransformBuilder=cjs$3.PostgrestFilterBuilder=cjs$3.PostgrestQueryBuilder=cjs$3.PostgrestClient=void 0;const PostgrestClient_1=__importDefault$1(PostgrestClient$2);cjs$3.PostgrestClient=PostgrestClient_1.default;const PostgrestQueryBuilder_1=__importDefault$1(PostgrestQueryBuilder$2);cjs$3.PostgrestQueryBuilder=PostgrestQueryBuilder_1.default;const PostgrestFilterBuilder_1=__importDefault$1(PostgrestFilterBuilder$2);cjs$3.PostgrestFilterBuilder=PostgrestFilterBuilder_1.default;const PostgrestTransformBuilder_1=__importDefault$1(PostgrestTransformBuilder$2);cjs$3.PostgrestTransformBuilder=PostgrestTransformBuilder_1.default;const PostgrestBuilder_1=__importDefault$1(PostgrestBuilder$2);cjs$3.PostgrestBuilder=PostgrestBuilder_1.default;const PostgrestError_1=__importDefault$1(PostgrestError$2);cjs$3.PostgrestError=PostgrestError_1.default;var _default=cjs$3.default={PostgrestClient:PostgrestClient_1.default,PostgrestQueryBuilder:PostgrestQueryBuilder_1.default,PostgrestFilterBuilder:PostgrestFilterBuilder_1.default,PostgrestTransformBuilder:PostgrestTransformBuilder_1.default,PostgrestBuilder:PostgrestBuilder_1.default,PostgrestError:PostgrestError_1.default};const{PostgrestClient,PostgrestQueryBuilder,PostgrestFilterBuilder,PostgrestTransformBuilder,PostgrestBuilder,PostgrestError}=_default;let WebSocketImpl;typeof window>"u"?WebSocketImpl=require("ws"):WebSocketImpl=window.WebSocket;const WebSocket=WebSocketImpl,version$6="2.11.10",DEFAULT_HEADERS$3={"X-Client-Info":`realtime-js/${version$6}`},VSN="1.0.0",DEFAULT_TIMEOUT=1e4,WS_CLOSE_NORMAL=1e3;var SOCKET_STATES;(function(yt){yt[yt.connecting=0]="connecting",yt[yt.open=1]="open",yt[yt.closing=2]="closing",yt[yt.closed=3]="closed"})(SOCKET_STATES||(SOCKET_STATES={}));var CHANNEL_STATES;(function(yt){yt.closed="closed",yt.errored="errored",yt.joined="joined",yt.joining="joining",yt.leaving="leaving"})(CHANNEL_STATES||(CHANNEL_STATES={}));var CHANNEL_EVENTS;(function(yt){yt.close="phx_close",yt.error="phx_error",yt.join="phx_join",yt.reply="phx_reply",yt.leave="phx_leave",yt.access_token="access_token"})(CHANNEL_EVENTS||(CHANNEL_EVENTS={}));var TRANSPORTS;(function(yt){yt.websocket="websocket"}
236)(TRANSPORTS||(TRANSPORTS={}));var CONNECTION_STATE;(function(yt){yt.Connecting="connecting",yt.Open="open",yt.Closing="closing",yt.Closed="closed"})(CONNECTION_STATE||(CONNECTION_STATE={}));class Serializer{constructor(){this.HEADER_LENGTH=1}decode(_e,$t){return _e.constructor===ArrayBuffer?$t(this._binaryDecode(_e)):$t(typeof _e=="string"?JSON.parse(_e):{})}_binaryDecode(_e){const $t=new DataView(_e),Ft=new TextDecoder;return this._decodeBroadcast(_e,$t,Ft)}_decodeBroadcast(_e,$t,Ft){const Vt=$t.getUint8(1),qt=$t.getUint8(2);let zt=this.HEADER_LENGTH+2;const Ht=Ft.decode(_e.slice(zt,zt+Vt));zt=zt+Vt;const Kt=Ft.decode(_e.slice(zt,zt+qt));zt=zt+qt;const Gt=JSON.parse(Ft.decode(_e.slice(zt,_e.byteLength)));return{ref:null,topic:Ht,event:Kt,payload:Gt}}}class Timer{constructor(_e,$t){this.callback=_e,this.timerCalc=$t,this.timer=void 0,this.tries=0,this.callback=_e,this.timerCalc=$t}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var PostgresTypes;(function(yt){yt.abstime="abstime",yt.bool="bool",yt.date="date",yt.daterange="daterange",yt.float4="float4",yt.float8="float8",yt.int2="int2",yt.int4="int4",yt.int4range="int4range",yt.int8="int8",yt.int8range="int8range",yt.json="json",yt.jsonb="jsonb",yt.money="money",yt.numeric="numeric",yt.oid="oid",yt.reltime="reltime",yt.text="text",yt.time="time",yt.timestamp="timestamp",yt.timestamptz="timestamptz",yt.timetz="timetz",yt.tsrange="tsrange",yt.tstzrange="tstzrange"})(PostgresTypes||(PostgresTypes={}));const convertChangeData=(yt,_e,$t={})=>{var Ft;const Vt=(Ft=$t.skipTypes)!==null&&Ft!==void 0?Ft:[];return Object.keys(_e).reduce((qt,zt)=>(qt[zt]=convertColumn(zt,yt,_e,Vt),qt),{})},convertColumn=(yt,_e,$t,Ft)=>{const Vt=_e.find(Ht=>Ht.name===yt),qt=Vt==null?void 0:Vt.type,zt=$t[yt];return qt&&!Ft.includes(qt)?convertCell(qt,zt):noop$3(zt)},convertCell=(yt,_e)=>{if(yt.charAt(0)==="_"){const $t=yt.slice(1,yt.length);return toArray(_e,$t)}switch(yt){case PostgresTypes.bool:return toBoolean(_e);case PostgresTypes.float4:case PostgresTypes.float8:case PostgresTypes.int2:case PostgresTypes.int4:case PostgresTypes.int8:case PostgresTypes.numeric:case PostgresTypes.oid:return toNumber(_e);case PostgresTypes.json:case PostgresTypes.jsonb:return toJson(_e);case PostgresTypes.timestamp:return toTimestampString(_e);case PostgresTypes.abstime:case PostgresTypes.date:case PostgresTypes.daterange:case PostgresTypes.int4range:case PostgresTypes.int8range:case PostgresTypes.money:case PostgresTypes.reltime:case PostgresTypes.text:case PostgresTypes.time:case PostgresTypes.timestamptz:case PostgresTypes.timetz:case PostgresTypes.tsrange:case PostgresTypes.tstzrange:return noop$3(_e);default:return noop$3(_e)}},noop$3=yt=>yt,toBoolean=yt=>{switch(yt){case"t":return!0;case"f":return!1;default:return yt}},toNumber=yt=>{if(typeof yt=="string"){const _e=parseFloat(yt);if(!Number.isNaN(_e))return _e}return yt},toJson=yt=>{if(typeof yt=="string")try{return JSON.parse(yt)}catch(_e){return console.log(`JSON parse error: ${_e}`),yt}return yt},toArray=(yt,_e)=>{if(typeof yt!="string")return yt;const $t=yt.length-1,Ft=yt[$t];if(yt[0]==="{"&&Ft==="}"){let qt;const zt=yt.slice(1,$t);try{qt=JSON.parse("["+zt+"]")}catch{qt=zt?zt.split(","):[]}return qt.map(Ht=>convertCell(_e,Ht))}return yt},toTimestampString=yt=>typeof yt=="string"?yt.replace(" ","T"):yt,httpEndpointURL=yt=>{let _e=yt;return _e=_e.replace(/^ws/i,"http"),_e=_e.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),_e.replace(/\/+$/,"")};class Push{constructor(_e,$t,Ft={},Vt=DEFAULT_TIMEOUT){this.channel=_e,this.event=$t,this.payload=Ft,this.timeout=Vt,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(_e){this.timeout=_e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,j
vendor: 7,267 bytes, line 236
236oin_ref:this.channel._joinRef()}))}updatePayload(_e){this.payload=Object.assign(Object.assign({},this.payload),_e)}receive(_e,$t){var Ft;return this._hasReceived(_e)&&$t((Ft=this.receivedResp)===null||Ft===void 0?void 0:Ft.response),this.recHooks.push({status:_e,callback:$t}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const _e=$t=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=$t,this._matchReceive($t)};this.channel._on(this.refEvent,{},_e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(_e,$t){this.refEvent&&this.channel._trigger(this.refEvent,{status:_e,response:$t})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:_e,response:$t}){this.recHooks.filter(Ft=>Ft.status===_e).forEach(Ft=>Ft.callback($t))}_hasReceived(_e){return this.receivedResp&&this.receivedResp.status===_e}}var REALTIME_PRESENCE_LISTEN_EVENTS;(function(yt){yt.SYNC="sync",yt.JOIN="join",yt.LEAVE="leave"})(REALTIME_PRESENCE_LISTEN_EVENTS||(REALTIME_PRESENCE_LISTEN_EVENTS={}));class RealtimePresence{constructor(_e,$t){this.channel=_e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const Ft=($t==null?void 0:$t.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(Ft.state,{},Vt=>{const{onJoin:qt,onLeave:zt,onSync:Ht}=this.caller;this.joinRef=this.channel._joinRef(),this.state=RealtimePresence.syncState(this.state,Vt,qt,zt),this.pendingDiffs.forEach(Kt=>{this.state=RealtimePresence.syncDiff(this.state,Kt,qt,zt)}),this.pendingDiffs=[],Ht()}),this.channel._on(Ft.diff,{},Vt=>{const{onJoin:qt,onLeave:zt,onSync:Ht}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(Vt):(this.state=RealtimePresence.syncDiff(this.state,Vt,qt,zt),Ht())}),this.onJoin((Vt,qt,zt)=>{this.channel._trigger("presence",{event:"join",key:Vt,currentPresences:qt,newPresences:zt})}),this.onLeave((Vt,qt,zt)=>{this.channel._trigger("presence",{event:"leave",key:Vt,currentPresences:qt,leftPresences:zt})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(_e,$t,Ft,Vt){const qt=this.cloneDeep(_e),zt=this.transformState($t),Ht={},Kt={};return this.map(qt,(Gt,Jt)=>{zt[Gt]||(Kt[Gt]=Jt)}),this.map(zt,(Gt,Jt)=>{const Xt=qt[Gt];if(Xt){const Zt=Jt.map(ar=>ar.presence_ref),er=Xt.map(ar=>ar.presence_ref),tr=Jt.filter(ar=>er.indexOf(ar.presence_ref)<0),rr=Xt.filter(ar=>Zt.indexOf(ar.presence_ref)<0);tr.length>0&&(Ht[Gt]=tr),rr.length>0&&(Kt[Gt]=rr)}else Ht[Gt]=Jt}),this.syncDiff(qt,{joins:Ht,leaves:Kt},Ft,Vt)}static syncDiff(_e,$t,Ft,Vt){const{joins:qt,leaves:zt}={joins:this.transformState($t.joins),leaves:this.transformState($t.leaves)};return Ft||(Ft=()=>{}),Vt||(Vt=()=>{}),this.map(qt,(Ht,Kt)=>{var Gt;const Jt=(Gt=_e[Ht])!==null&&Gt!==void 0?Gt:[];if(_e[Ht]=this.cloneDeep(Kt),Jt.length>0){const Xt=_e[Ht].map(er=>er.presence_ref),Zt=Jt.filter(er=>Xt.indexOf(er.presence_ref)<0);_e[Ht].unshift(...Zt)}Ft(Ht,Jt,Kt)}),this.map(zt,(Ht,Kt)=>{let Gt=_e[Ht];if(!Gt)return;const Jt=Kt.map(Xt=>Xt.presence_ref);Gt=Gt.filter(Xt=>Jt.indexOf(Xt.presence_ref)<0),_e[Ht]=Gt,Vt(Ht,Gt,Kt),Gt.length===0&&delete _e[Ht]}),_e}static map(_e,$t){return Object.getOwnPropertyNames(_e).map(Ft=>$t(Ft,_e[Ft]))}static transformState(_e){return _e=this.cloneDeep(_e),Object.getOwnPropertyNames(_e).reduce(($t,Ft)=>{const Vt=_e[Ft];return"metas"in Vt?$t[Ft]=Vt.metas.map(qt=>(qt.presence_ref=qt.phx_ref,delete qt.phx_ref,delete qt.phx_ref_prev,qt)):$t[Ft]=Vt,$t},{})}static cloneDeep(_e){return JSON.parse(JSON.stringify(_e))}onJoin(_e){this.caller.onJoin=_e}onLeave(_e){this.caller.onLeave=_e}onSync(_e){this.caller.onSync=_e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var REALTIME_POSTGRES_CHANGES_LISTEN_EVENT;(function(yt){yt.ALL="*",yt.INSERT="INSERT",yt.UPDATE="UPDATE",yt.DELETE="DELETE"})(REALTIME_POSTGRES_CHANGES_LISTEN_EVENT||(REALTIME_POSTGRES_CHANGES_LISTEN_EVENT={}));var REALTIME_LISTEN_TYPES;(function(yt){yt.BROADCAST="broadcast",yt.PRESENCE="presence",yt.POSTGRES_CHANGES="postgres_changes",yt.SYSTEM="system"})(REALTIME_LISTEN_TYPES||(REALTIME_LISTEN_TYPES={}));var REALTIME_SUBSCRIBE_STATES;(function(yt){yt.SUBSCRIBED="SUBSCRIBED",yt.TIMED_OUT="TIMED_OUT",yt.CLOSED="CLOSED",yt.CHANNEL_ERROR="CHANNEL_ERROR"})(REALTIME_SUBSCRIBE_STATES||(REALTIME_SUBSCRIBE_STATES={}));class RealtimeChannel{constructor(_e,$t={config:{}},Ft){this.topic=_e,this.params=$t,this.socket=Ft,this.bindings={},this.state=CHANNEL_STATES.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=_e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},$t.config),this.timeout=this.socket.timeout,this.joinPush=new Push(this,CHANNEL_EVENTS.join,this.params,this.timeout),this.rejoinTimer=new Timer(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=CHANNEL_STATES.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(Vt=>Vt.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=CHANNEL_STATES.closed,this.socket._remove(this)}),this._onError(Vt=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,Vt),this.state=CHANNEL_STATES.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=CHANNEL_STATES.errored,this.rejoinTimer.scheduleTimeout())}),this._on(CHANNEL_EVENTS.reply,{},(Vt,qt)=>{this._trigger(this._replyEventName(qt),Vt)}),this.presence=new RealtimePresence(this),this.broadcastEndpointURL=httpEndpointURL(this.socket.endPoint)+"/api/broadcast",this.private=this.params.config.private||!1}subscribe(_e,$t=this.timeout){var Ft,Vt;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:qt,presence:zt,private:Ht}}=this.params;this._onError(Jt=>_e==null?void 0:_e(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR,Jt)),this._onClose(()=>_e==null?void 0:_e(REALTIME_SUBSCRIBE_STATES.CLOSED));const Kt={},Gt={broadcast:qt,presence:zt,postgres_changes:(Vt=(Ft=this.bindings.postgres_changes)===null||Ft===void 0?void 0:Ft.map(Jt=>Jt.filter))!==null&&Vt!==void 0?Vt:[],private:Ht};this.socket.accessTokenValue&&(Kt.access_token=this.socket.accessTokenValue),this.updateJoinPayload(Object.assign({config:Gt},Kt)),this.joinedOnce=!0,this._rejoin($t),this.joinPush.receive("ok",async({postgres_changes:Jt})=>{var Xt;if(this.socket.setAuth(),Jt===void 0){_e==null||_e(REALTIME_SUBSCRIBE_STATES.SUBSCRIBED);return}else{const Zt=this.bindings.postgres_changes,er=(Xt=Zt==null?void 0:Zt.length)!==null&&Xt!==void 0?Xt:0,tr=[];for(let rr=0;rr<er;rr++){const ar=Zt[rr],{filter:{event:nr,schema:cr,table:fr,filter:vr}}=ar,xr=Jt&&Jt[rr];
236if(xr&&xr.event===nr&&xr.schema===cr&&xr.table===fr&&xr.filter===vr)tr.push(Object.assign(Object.assign({},ar),{id:xr.id}));else{this.unsubscribe(),this.state=CHANNEL_STATES.errored,_e==null||_e(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=tr,_e&&_e(REALTIME_SUBSCRIBE_STATES.SUBSCRIBED);return}}).receive("error",Jt=>{this.state=CHANNEL_STATES.errored,_e==null||_e(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(Jt).join(", ")||"error")))}).receive("timeout",()=>{_e==null||_e(REALTIME_SUBSCRIBE_STATES.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(_e,$t={}){return await this.send({type:"presence",event:"track",payload:_e},$t.timeout||this.timeout)}async untrack(_e={}){return await this.send({type:"presence",event:"untrack"},_e)}on(_e,$t,Ft){return this._on(_e,$t,Ft)}async send(_e,$t={}){var Ft,Vt;if(!this._canPush()&&_e.type==="broadcast"){const{event:qt,payload:zt}=_e,Kt={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:qt,payload:zt,private:this.private}]})};try{const Gt=await this._fetchWithTimeout(this.broadcastEndpointURL,Kt,(Ft=$t.timeout)!==null&&Ft!==void 0?Ft:this.timeout);return await((Vt=Gt.body)===null||Vt===void 0?void 0:Vt.cancel()),Gt.ok?"ok":"error"}catch(Gt){return Gt.name==="AbortError"?"timed out":"error"}}else return new Promise(qt=>{var zt,Ht,Kt;const Gt=this._push(_e.type,_e,$t.timeout||this.timeout);_e.type==="broadcast"&&!(!((Kt=(Ht=(zt=this.params)===null||zt===void 0?void 0:zt.config)===null||Ht===void 0?void 0:Ht.broadcast)===null||Kt===void 0)&&Kt.ack)&&qt("ok"),Gt.receive("ok",()=>qt("ok")),Gt.receive("error",()=>qt("error")),Gt.receive("timeout",()=>qt("timed out"))})}updateJoinPayload(_e){this.joinPush.updatePayload(_e)}unsubscribe(_e=this.timeout){this.state=CHANNEL_STATES.leaving;const $t=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(CHANNEL_EVENTS.close,"leave",this._joinRef())};return this.joinPush.destroy(),new Promise(Ft=>{const Vt=new Push(this,CHANNEL_EVENTS.leave,{},_e);Vt.receive("ok",()=>{$t(),Ft("ok")}).receive("timeout",()=>{$t(),Ft("timed out")}).receive("error",()=>{Ft("error")}),Vt.send(),this._canPush()||Vt.trigger("ok",{})})}teardown(){this.pushBuffer.forEach(_e=>_e.destroy()),this.rejoinTimer&&clearTimeout(this.rejoinTimer.timer),this.joinPush.destroy()}async _fetchWithTimeout(_e,$t,Ft){const Vt=new AbortController,qt=setTimeout(()=>Vt.abort(),Ft),zt=await this.socket.fetch(_e,Object.assign(Object.assign({},$t),{signal:Vt.signal}));return clearTimeout(qt),zt}_push(_e,$t,Ft=this.timeout){if(!this.joinedOnce)throw`tried to push '${_e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let Vt=new Push(this,_e,$t,Ft);return this._canPush()?Vt.send():(Vt.startTimeout(),this.pushBuffer.push(Vt)),Vt}_onMessage(_e,$t,Ft){return $t}_isMember(_e){return this.topic===_e}_joinRef(){return this.joinPush.ref}_trigger(_e,$t,Ft){var Vt,qt;const zt=_e.toLocaleLowerCase(),{close:Ht,error:Kt,leave:Gt,join:Jt}=CHANNEL_EVENTS;if(Ft&&[Ht,Kt,Gt,Jt].indexOf(zt)>=0&&Ft!==this._joinRef())return;let Zt=this._onMessage(zt,$t,Ft);if($t&&!Zt)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(zt)?(Vt=this.bindings.postgres_changes)===null||Vt===void 0||Vt.filter(er=>{var tr,rr,ar;return((tr=er.filter)===null||tr===void 0?void 0:tr.event)==="*"||((ar=(rr=er.filter)===null||rr===void 0?void 0:rr.event)===null||ar===void 0?void 0:ar.toLocaleLowerCase())===zt}).map(er=>er.callback(Zt,Ft)):(qt=this.bindings[zt])===null||qt===void 0||qt.filter(er=>{var tr,rr,ar,nr,cr,fr;if(["broadcast","presence","postgres_changes"].includes(zt))if("id"in er){const vr=er.id,xr=(tr=er.filter)===null||tr===void 0?void 0:tr.event;return vr&&((rr=$t.ids)===null||rr===void 0?void 0:rr.includes(vr))&&(xr==="*"||(xr==null?void 0:xr.toLocaleLowerCase())===((ar=$t.data)===null||ar===void 0?void 0:ar.type.toLocaleLowerCase()))}else{const vr=(cr=(nr=er==null?void 0:er.filter)===null||nr===void 0?void 0:nr.event)===null||cr===void 0?void 0:cr.toLocaleLowerCase();return vr==="*"||vr===((fr=$t==null?void 0:$t.event)===null||fr===void 0?void 0:fr.toLocaleLowerCase())}else return er.type.toLocaleLowerCase()===zt}).map(er=>{if(typeof Zt=="object"&&"ids"in Zt){const tr=Zt.data,{schema:rr,table:ar,commit_timestamp:nr,type:cr,errors:fr}=tr;Zt=Object.assign(Object.assign({},{schema:rr,table:ar,commit_timestamp:nr,eventType:cr,new:{},old:{},errors:fr}),this._getPayloadRecords(tr))}er.callback(Zt,Ft)})}_isClosed(){return this.state===CHANNEL_STATES.closed}_isJoined(){return this.state===CHANNEL_STATES.joined}_isJoining(){return this.state===CHANNEL_STATES.joining}_isLeaving(){return this.state===CHANNEL_STATES.leaving}_replyEventName(_e){return`chan_reply_${_e}`}_on(_e,$t,Ft){const Vt=_e.toLocaleLowerCase(),qt={type:Vt,filter:$t,callback:Ft};return this.bindings[Vt]?this.bindings[Vt].push(qt):this.bindings[Vt]=[qt],this}_off(_e,$t){const Ft=_e.toLocaleLowerCase();return this.bindings[Ft]=this.bindings[Ft].filter(Vt=>{var qt;return!(((qt=Vt.type)===null||qt===void 0?void 0:qt.toLocaleLowerCase())===Ft&&RealtimeChannel.isEqual(Vt.filter,$t))}),this}static isEqual(_e,$t){if(Object.keys(_e).length!==Object.keys($t).length)return!1;for(const Ft in _e)if(_e[Ft]!==$t[Ft])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(_e){this._on(CHANNEL_EVENTS.close,{},_e)}_onError(_e){this._on(CHANNEL_EVENTS.error,{},$t=>_e($t))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(_e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=CHANNEL_STATES.joining,this.joinPush.resend(_e))}_getPayloadRecords(_e){const $t={new:{},old:{}};return(_e.type==="INSERT"||_e.type==="UPDATE")&&($t.new=convertChangeData(_e.columns,_e.record)),(_e.type==="UPDATE"||_e.type==="DELETE")&&($t.old=convertChangeData(_e.columns,_e.old_record)),$t}}const noop$2=()=>{},WORKER_SCRIPT=` 237 addEventListener("message", (e) => { 238 if (e.data.event === "start") { 239 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 240 } 241 });`;class RealtimeClient{constructor(_e,$t){var Ft;this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers=DEFAULT_HEADERS$3,this.params={},this.timeout=DEFAULT_TIMEOUT,this.heartbeatIntervalMs=25e3,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=noop$2,this.ref=0,this.logger=noop$2,this.conn=null,this.sendBuffer=[],this.serializer
241=new Serializer,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._resolveFetch=qt=>{let zt;return qt?zt=qt:typeof fetch>"u"?zt=(...Ht)=>__vitePreload(async()=>{const{default:Kt}=await Promise.resolve().then(()=>browser$d);return{default:Kt}},void 0).then(({default:Kt})=>Kt(...Ht)):zt=fetch,(...Ht)=>zt(...Ht)},this.endPoint=`${_e}/${TRANSPORTS.websocket}`,this.httpEndpoint=httpEndpointURL(_e),$t!=null&&$t.transport?this.transport=$t.transport:this.transport=null,$t!=null&&$t.params&&(this.params=$t.params),$t!=null&&$t.headers&&(this.headers=Object.assign(Object.assign({},this.headers),$t.headers)),$t!=null&&$t.timeout&&(this.timeout=$t.timeout),$t!=null&&$t.logger&&(this.logger=$t.logger),($t!=null&&$t.logLevel||$t!=null&&$t.log_level)&&(this.logLevel=$t.logLevel||$t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),$t!=null&&$t.heartbeatIntervalMs&&(this.heartbeatIntervalMs=$t.heartbeatIntervalMs);const Vt=(Ft=$t==null?void 0:$t.params)===null||Ft===void 0?void 0:Ft.apikey;if(Vt&&(this.accessTokenValue=Vt,this.apiKey=Vt),this.reconnectAfterMs=$t!=null&&$t.reconnectAfterMs?$t.reconnectAfterMs:qt=>[1e3,2e3,5e3,1e4][qt-1]||1e4,this.encode=$t!=null&&$t.encode?$t.encode:(qt,zt)=>zt(JSON.stringify(qt)),this.decode=$t!=null&&$t.decode?$t.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new Timer(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch($t==null?void 0:$t.fetch),$t!=null&&$t.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.worker=($t==null?void 0:$t.worker)||!1,this.workerUrl=$t==null?void 0:$t.workerUrl}this.accessToken=($t==null?void 0:$t.accessToken)||null}connect(){if(!this.conn){if(this.transport||(this.transport=WebSocket),this.transport){typeof window<"u"&&this.transport===window.WebSocket?this.conn=new this.transport(this.endpointURL()):this.conn=new this.transport(this.endpointURL(),void 0,{headers:this.headers}),this.setupConnection();return}this.conn=new WSWebSocketDummy(this.endpointURL(),void 0,{close:()=>{this.conn=null}})}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:VSN}))}disconnect(_e,$t){this.conn&&(this.conn.onclose=function(){},_e?this.conn.close(_e,$t??""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset(),this.channels.forEach(Ft=>Ft.teardown()))}getChannels(){return this.channels}async removeChannel(_e){const $t=await _e.unsubscribe();return this.channels=this.channels.filter(Ft=>Ft._joinRef!==_e._joinRef),this.channels.length===0&&this.disconnect(),$t}async removeAllChannels(){const _e=await Promise.all(this.channels.map($t=>$t.unsubscribe()));return this.channels=[],this.disconnect(),_e}log(_e,$t,Ft){this.logger(_e,$t,Ft)}connectionState(){switch(this.conn&&this.conn.readyState){case SOCKET_STATES.connecting:return CONNECTION_STATE.Connecting;case SOCKET_STATES.open:return CONNECTION_STATE.Open;case SOCKET_STATES.closing:return CONNECTION_STATE.Closing;default:return CONNECTION_STATE.Closed}}isConnected(){return this.connectionState()===CONNECTION_STATE.Open}channel(_e,$t={config:{}}){const Ft=`realtime:${_e}`,Vt=this.getChannels().find(qt=>qt.topic===Ft);if(Vt)return Vt;{const qt=new RealtimeChannel(`realtime:${_e}`,$t,this);return this.channels.push(qt),qt}}push(_e){const{topic:$t,event:Ft,payload:Vt,ref:qt}=_e,zt=()=>{this.encode(_e,Ht=>{var Kt;(Kt=this.conn)===null||Kt===void 0||Kt.send(Ht)})};this.log("push",`${$t} ${Ft} (${qt})`,Vt),this.isConnected()?zt():this.sendBuffer.push(zt)}async setAuth(_e=null){let $t=_e||this.accessToken&&await this.accessToken()||this.accessTokenValue;this.accessTokenValue!=$t&&(this.accessTokenValue=$t,this.channels.forEach(Ft=>{$t&&Ft.updateJoinPayload({access_token:$t,version:this.headers&&this.headers["X-Client-Info"]}),Ft.joinedOnce&&Ft._isJoined()&&Ft._push(CHANNEL_EVENTS.access_token,{access_token:$t})}))}async sendHeartbeat(){var _e;if(!this.isConnected()){this.heartbeatCallback("disconnected");return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.heartbeatCallback("timeout"),(_e=this.conn)===null||_e===void 0||_e.close(WS_CLOSE_NORMAL,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatCallback("sent"),await this.setAuth()}onHeartbeat(_e){this.heartbeatCallback=_e}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(_e=>_e()),this.sendBuffer=[])}_makeRef(){let _e=this.ref+1;return _e===this.ref?this.ref=0:this.ref=_e,this.ref.toString()}_leaveOpenTopic(_e){let $t=this.channels.find(Ft=>Ft.topic===_e&&(Ft._isJoined()||Ft._isJoining()));$t&&(this.log("transport",`leaving duplicate topic "${_e}"`),$t.unsubscribe())}_remove(_e){this.channels=this.channels.filter($t=>$t.topic!==_e.topic)}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=_e=>this._onConnError(_e),this.conn.onmessage=_e=>
241this._onConnMessage(_e),this.conn.onclose=_e=>this._onConnClose(_e))}_onConnMessage(_e){this.decode(_e.data,$t=>{let{topic:Ft,event:Vt,payload:qt,ref:zt}=$t;Ft==="phoenix"&&Vt==="phx_reply"&&this.heartbeatCallback($t.payload.status=="ok"?"ok":"error"),zt&&zt===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null),this.log("receive",`${qt.status||""} ${Ft} ${Vt} ${zt&&"("+zt+")"||""}`,qt),Array.from(this.channels).filter(Ht=>Ht._isMember(Ft)).forEach(Ht=>Ht._trigger(Vt,qt,zt)),this.stateChangeCallbacks.message.forEach(Ht=>Ht($t))})}_onConnOpen(){if(this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this.reconnectTimer.reset(),!this.worker)this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs);else{this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const _e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(_e),this.workerRef.onerror=$t=>{this.log("worker","worker error",$t.message),this.workerRef.terminate()},this.workerRef.onmessage=$t=>{$t.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}this.stateChangeCallbacks.open.forEach(_e=>_e())}_onConnClose(_e){this.log("transport","close",_e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach($t=>$t(_e))}_onConnError(_e){this.log("transport",_e.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach($t=>$t(_e))}_triggerChanError(){this.channels.forEach(_e=>_e._trigger(CHANNEL_EVENTS.error))}_appendParams(_e,$t){if(Object.keys($t).length===0)return _e;const Ft=_e.match(/\?/)?"&":"?",Vt=new URLSearchParams($t);return`${_e}${Ft}${Vt}`}_workerObjectUrl(_e){let $t;if(_e)$t=_e;else{const Ft=new Blob([WORKER_SCRIPT],{type:"application/javascript"});$t=URL.createObjectURL(Ft)}return $t}}class WSWebSocketDummy{constructor(_e,$t,Ft){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=SOCKET_STATES.connecting,this.send=()=>{},this.url=null,this.url=_e,this.close=Ft.close}}var buffer$1={},base64Js={};base64Js.byteLength=byteLength;base64Js.toByteArray=toByteArray;base64Js.fromByteArray=fromByteArray;var lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i$1=0,len=code.length;i$1<len;++i$1)lookup[i$1]=code[i$1],revLookup[code.charCodeAt(i$1)]=i$1;revLookup[45]=62;revLookup[95]=63;function getLens(yt){var _e=yt.length;if(_e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var $t=yt.indexOf("=");$t===-1&&($t=_e);var Ft=$t===_e?0:4-$t%4;return[$t,Ft]}function byteLength(yt){var _e=getLens(yt),$t=_e[0],Ft=_e[1];return($t+Ft)*3/4-Ft}function _byteLength(yt,_e,$t){return(_e+$t)*3/4-$t}function toByteArray(yt){var _e,$t=getLens(yt),Ft=$t[0],Vt=$t[1],qt=new Arr(_byteLength(yt,Ft,Vt)),zt=0,Ht=Vt>0?Ft-4:Ft,Kt;for(Kt=0;Kt<Ht;Kt+=4)_e=revLookup[yt.charCodeAt(Kt)]<<18|revLookup[yt.charCodeAt(Kt+1)]<<12|revLookup[yt.charCodeAt(Kt+2)]<<6|revLookup[yt.charCodeAt(Kt+3)],qt[zt++]=_e>>16&255,qt[zt++]=_e>>8&255,qt[zt++]=_e&255;return Vt===2&&(_e=revLookup[yt.charCodeAt(Kt)]<<2|revLookup[yt.charCodeAt(Kt+1)]>>4,qt[zt++]=_e&255),Vt===1&&(_e=revLookup[yt.charCodeAt(Kt)]<<10|revLookup[yt.charCodeAt(Kt+1)]<<4|revLookup[yt.charCodeAt(Kt+2)]>>2,qt[zt++]=_e>>8&255,qt[zt++]=_e&255),qt}function tripletToBase64(yt){return lookup[yt>>18&63]+lookup[yt>>12&63]+lookup[yt>>6&63]+lookup[yt&63]}function encodeChunk(yt,_e,$t){for(var Ft,Vt=[],qt=_e;qt<$t;qt+=3)Ft=(yt[qt]<<16&16711680)+(yt[qt+1]<<8&65280)+(yt[qt+2]&255),Vt.push(tripletToBase64(Ft));return Vt.join("")}function fromByteArray(yt){for(var _e,$t=yt.length,Ft=$t%3,Vt=[],qt=16383,zt=0,Ht=$t-Ft;zt<Ht;zt+=qt)Vt.push(encodeChunk(yt,zt,zt+qt>Ht?Ht:zt+qt));return Ft===1?(_e=yt[$t-1],Vt.push(lookup[_e>>2]+lookup[_e<<4&63]+"==")):Ft===2&&(_e=(yt[$t-2]<<8)+yt[$t-1],Vt.push(lookup[_e>>10]+lookup[_e>>4&63]+lookup[_e<<2&63]+"=")),Vt.join("")}var ieee754={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ieee754.read=function(yt,_e,$t,Ft,Vt){var qt,zt,Ht=Vt*8-Ft-1,Kt=(1<<Ht)-1,Gt=Kt>>1,Jt=-7,Xt=$t?Vt-1:0,Zt=$t?-1:1,er=yt[_e+Xt];for(Xt+=Zt,qt=er&(1<<-Jt)-1,er>>=-Jt,Jt+=Ht;Jt>0;qt=qt*256+yt[_e+Xt],Xt+=Zt,Jt-=8);for(zt=qt&(1<<-Jt)-1,qt>>=-Jt,Jt+=Ft;Jt>0;zt=zt*256+yt[_e+Xt],Xt+=Zt,Jt-=8);if(qt===0)qt=1-Gt;else{if(qt===Kt)return zt?NaN:(er?-1:1)*(1/0);zt=zt+Math.pow(2,Ft),qt=qt-Gt}return(er?-1:1)*zt*Math.pow(2,qt-Ft)};ieee754.write=function(yt,_e,$t,Ft,Vt,qt){var zt,Ht,Kt,Gt=qt*8-Vt-1,Jt=(1<<Gt)-1,Xt=Jt>>1,Zt=Vt===23?Math.pow(2,-24)-Math.pow(2,-77):0,er=Ft?0:qt-1,tr=Ft?1:-1,rr=_e<0||_e===0&&1/_e<0?1:0;for(_e=Math.abs(_e),isNaN(_e)||_e===1/0?(Ht=isNaN(_e)?1:0,zt=Jt):(zt=Math.floor(Math.log(_e)/Math.LN2),_e*(Kt=Math.pow(2,-zt))<1&&(zt--,Kt*=2),zt+Xt>=1?_e+=Zt/Kt:_e+=Zt*Math.pow(2,1-Xt),_e*Kt>=2&&(zt++,Kt/=2),zt+Xt>=Jt?(Ht=0,zt=Jt):zt+Xt>=1?(Ht=(_e*Kt-1)*Math.pow(2,Vt),zt=zt+Xt):(Ht=_e*Math.pow(2,Xt-1)*Math.pow(2,Vt),zt=0));Vt>=8;yt[$t+er]=Ht&255,er+=tr,Ht/=256,Vt-=8);for(zt=zt<<Vt|Ht,Gt+=Vt;Gt>0;yt[$t+er]=zt&255,er+=tr,zt/=256,Gt-=8);yt[$t+er-tr]|=rr*128};/*! 242 * The buffer module from node.js, for the browser. 243 * 244 * @author Feross Aboukhadijeh <https://feross.org> 245 * @license MIT 246 */(function(yt){const _e=base64Js,$t=ieee754,Ft=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;yt.Buffer=Jt,yt.SlowBuffer=xr,yt.INSPECT_MAX_BYTES=50;const Vt=2147483647;yt.kMaxLength=Vt;const{Uint8Array:qt,ArrayBuffer:zt,SharedArrayBuffer:Ht}=globalThis;Jt.TYPED_ARRAY_SUPPORT=Kt(),!Jt.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Kt(){try{const Ur=new qt(1),Ir={foo:function(){return 42}};return Object.setPrototypeOf(Ir,qt.prototype),Object.setPrototypeOf(Ur,Ir),Ur.foo()===42}catch{return!1}}Object.defineProperty(Jt.prototype,"parent",{enumerable:!0,get:function(){if(Jt.isBuffer(this))return this.buffer}}),Object.defineProperty(Jt.prototype,"offset",{enumerable:!0,get:function(){if(Jt.isBuffer(this))return this.byteOffset}});function Gt(Ur){if(Ur>
vendor: 22,410 bytes, line 246
246Vt)throw new RangeError('The value "'+Ur+'" is invalid for option "size"');const Ir=new qt(Ur);return Object.setPrototypeOf(Ir,Jt.prototype),Ir}function Jt(Ur,Ir,Pr){if(typeof Ur=="number"){if(typeof Ir=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return tr(Ur)}return Xt(Ur,Ir,Pr)}Jt.poolSize=8192;function Xt(Ur,Ir,Pr){if(typeof Ur=="string")return rr(Ur,Ir);if(zt.isView(Ur))return nr(Ur);if(Ur==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ur);if(vn(Ur,zt)||Ur&&vn(Ur.buffer,zt)||typeof Ht<"u"&&(vn(Ur,Ht)||Ur&&vn(Ur.buffer,Ht)))return cr(Ur,Ir,Pr);if(typeof Ur=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Fr=Ur.valueOf&&Ur.valueOf();if(Fr!=null&&Fr!==Ur)return Jt.from(Fr,Ir,Pr);const Zr=fr(Ur);if(Zr)return Zr;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Ur[Symbol.toPrimitive]=="function")return Jt.from(Ur[Symbol.toPrimitive]("string"),Ir,Pr);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ur)}Jt.from=function(Ur,Ir,Pr){return Xt(Ur,Ir,Pr)},Object.setPrototypeOf(Jt.prototype,qt.prototype),Object.setPrototypeOf(Jt,qt);function Zt(Ur){if(typeof Ur!="number")throw new TypeError('"size" argument must be of type number');if(Ur<0)throw new RangeError('The value "'+Ur+'" is invalid for option "size"')}function er(Ur,Ir,Pr){return Zt(Ur),Ur<=0?Gt(Ur):Ir!==void 0?typeof Pr=="string"?Gt(Ur).fill(Ir,Pr):Gt(Ur).fill(Ir):Gt(Ur)}Jt.alloc=function(Ur,Ir,Pr){return er(Ur,Ir,Pr)};function tr(Ur){return Zt(Ur),Gt(Ur<0?0:vr(Ur)|0)}Jt.allocUnsafe=function(Ur){return tr(Ur)},Jt.allocUnsafeSlow=function(Ur){return tr(Ur)};function rr(Ur,Ir){if((typeof Ir!="string"||Ir==="")&&(Ir="utf8"),!Jt.isEncoding(Ir))throw new TypeError("Unknown encoding: "+Ir);const Pr=Sr(Ur,Ir)|0;let Fr=Gt(Pr);const Zr=Fr.write(Ur,Ir);return Zr!==Pr&&(Fr=Fr.slice(0,Zr)),Fr}function ar(Ur){const Ir=Ur.length<0?0:vr(Ur.length)|0,Pr=Gt(Ir);for(let Fr=0;Fr<Ir;Fr+=1)Pr[Fr]=Ur[Fr]&255;return Pr}function nr(Ur){if(vn(Ur,qt)){const Ir=new qt(Ur);return cr(Ir.buffer,Ir.byteOffset,Ir.byteLength)}return ar(Ur)}function cr(Ur,Ir,Pr){if(Ir<0||Ur.byteLength<Ir)throw new RangeError('"offset" is outside of buffer bounds');if(Ur.byteLength<Ir+(Pr||0))throw new RangeError('"length" is outside of buffer bounds');let Fr;return Ir===void 0&&Pr===void 0?Fr=new qt(Ur):Pr===void 0?Fr=new qt(Ur,Ir):Fr=new qt(Ur,Ir,Pr),Object.setPrototypeOf(Fr,Jt.prototype),Fr}function fr(Ur){if(Jt.isBuffer(Ur)){const Ir=vr(Ur.length)|0,Pr=Gt(Ir);return Pr.length===0||Ur.copy(Pr,0,0,Ir),Pr}if(Ur.length!==void 0)return typeof Ur.length!="number"||gn(Ur.length)?Gt(0):ar(Ur);if(Ur.type==="Buffer"&&Array.isArray(Ur.data))return ar(Ur.data)}function vr(Ur){if(Ur>=Vt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Vt.toString(16)+" bytes");return Ur|0}function xr(Ur){return+Ur!=Ur&&(Ur=0),Jt.alloc(+Ur)}Jt.isBuffer=function(Ir){return Ir!=null&&Ir._isBuffer===!0&&Ir!==Jt.prototype},Jt.compare=function(Ir,Pr){if(vn(Ir,qt)&&(Ir=Jt.from(Ir,Ir.offset,Ir.byteLength)),vn(Pr,qt)&&(Pr=Jt.from(Pr,Pr.offset,Pr.byteLength)),!Jt.isBuffer(Ir)||!Jt.isBuffer(Pr))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ir===Pr)return 0;let Fr=Ir.length,Zr=Pr.length;for(let en=0,rn=Math.min(Fr,Zr);en<rn;++en)if(Ir[en]!==Pr[en]){Fr=Ir[en],Zr=Pr[en];break}return Fr<Zr?-1:Zr<Fr?1:0},Jt.isEncoding=function(Ir){switch(String(Ir).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Jt.concat=function(Ir,Pr){if(!Array.isArray(Ir))throw new TypeError('"list" argument must be an Array of Buffers');if(Ir.length===0)return Jt.alloc(0);let Fr;if(Pr===void 0)for(Pr=0,Fr=0;Fr<Ir.length;++Fr)Pr+=Ir[Fr].length;const Zr=Jt.allocUnsafe(Pr);let en=0;for(Fr=0;Fr<Ir.length;++Fr){let rn=Ir[Fr];if(vn(rn,qt))en+rn.length>Zr.length?(Jt.isBuffer(rn)||(rn=Jt.from(rn)),rn.copy(Zr,en)):qt.prototype.set.call(Zr,rn,en);else if(Jt.isBuffer(rn))rn.copy(Zr,en);else throw new TypeError('"list" argument must be an Array of Buffers');en+=rn.length}return Zr};function Sr(Ur,Ir){if(Jt.isBuffer(Ur))return Ur.length;if(zt.isView(Ur)||vn(Ur,zt))return Ur.byteLength;if(typeof Ur!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Ur);const Pr=Ur.length,Fr=arguments.length>2&&arguments[2]===!0;if(!Fr&&Pr===0)return 0;let Zr=!1;for(;;)switch(Ir){case"ascii":case"latin1":case"binary":return Pr;case"utf8":case"utf-8":return Xr(Ur).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pr*2;case"hex":return Pr>>>1;case"base64":return an(Ur).length;default:if(Zr)return Fr?-1:Xr(Ur).length;Ir=(""+Ir).toLowerCase(),Zr=!0}}Jt.byteLength=Sr;function Tr(Ur,Ir,Pr){let Fr=!1;if((Ir===void 0||Ir<0)&&(Ir=0),Ir>this.length||((Pr===void 0||Pr>this.length)&&(Pr=this.length),Pr<=0)||(Pr>>>=0,Ir>>>=0,Pr<=Ir))return"";for(Ur||(Ur="utf8");;)switch(Ur){case"hex":return pr(this,Ir,Pr);case"utf8":case"utf-8":return gr(this,Ir,Pr);case"ascii":return hr(this,Ir,Pr);case"latin1":case"binary":return wr(this,Ir,Pr);case"base64":return ur(this,Ir,Pr);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return br(this,Ir,Pr);default:if(Fr)throw new TypeError("Unknown encoding: "+Ur);Ur=(Ur+"").toLowerCase(),Fr=!0}}Jt.prototype._isBuffer=!0;function Br(Ur,Ir,Pr){const Fr=Ur[Ir];Ur[Ir]=Ur[Pr],Ur[Pr]=Fr}Jt.prototype.swap16=function(){const Ir=this.length;if(Ir%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Pr=0;Pr<Ir;Pr+=2)Br(this,Pr,Pr+1);return this},Jt.prototype.swap32=function(){const Ir=this.length;if(Ir%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let Pr=0;Pr<Ir;Pr+=4)Br(this,Pr,Pr+3),Br(this,Pr+1,Pr+2);return this},Jt.prototype.swap64=function(){const Ir=this.length;if(Ir%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let Pr=0;Pr<Ir;Pr+=8)Br(this,Pr,Pr+7),Br(this,Pr+1,Pr+6),Br(this,Pr+2,Pr+5),Br(this,Pr+3,Pr+4);return this},Jt.prototype.toString=function(){const Ir=this.length;return Ir===0?"":arguments.length===0?gr(this,0,Ir):Tr.apply(this,arguments)},Jt.prototype.toLocaleString=Jt.prototype.toString,Jt.prototype.equals=function(Ir){if(!Jt.isBuffer(Ir))throw new TypeError("Argument must be a Buffer");return this===Ir?!0:Jt.compare(this,Ir)===0},Jt.prototype.inspect=function(){let Ir="";const Pr=yt.INSPECT_MAX_BYTES;return Ir=this.toString("hex",0,Pr).replace(/(.{2})/g,"$1 ").trim(),this.length>Pr&&(Ir+=" ... "),"<Buffer "+Ir+">"},Ft&&(Jt.prototype[Ft]=Jt.prototype.inspect),Jt.prototype.compare=function(Ir,Pr,Fr,Zr,en){if(vn(Ir,qt)&&(Ir=Jt.from(Ir,Ir.offset,Ir.byteLength)),!Jt.isBuffer(Ir))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Ir);if(Pr===void 0&&(Pr=0),Fr===void 0&&(Fr=Ir?Ir.length:0),Zr===void 0&&(Zr=0),en===void 0&&(en=this.length),Pr<0||Fr>Ir.length||Zr<0||en>this.length)throw new RangeError("out of range index");if(Zr>=en&&Pr>=Fr)return 0;if(Zr>=en)return-1;if(Pr>=Fr)return 1;if(Pr>>>=0,Fr>>>=0,Zr>>>=0,en>>>=0,this===Ir)return 0;let rn=en-Zr,En=Fr-Pr;const $n=Math.min(rn,En),mn=this.slice(Zr,en),Fn=Ir.slice(Pr,Fr);for(let _n=0;_n<$n;++_n)if(mn[_n]!==Fn[_n]){rn=mn[_n],En=Fn[_n];break}return rn<En?-1:En<rn?1:0};function jr(Ur,Ir,Pr,Fr,Zr){if(Ur.length===0)return-1;if(typeof Pr=="string"?(Fr=Pr,Pr=0):Pr>2147483647?Pr=2147483647:Pr<-2147483648&&(Pr=-2147483648),Pr=+Pr,gn(Pr)&&(Pr=Zr?0:Ur.length-1),Pr<0&&(Pr=Ur.length+Pr),Pr>=Ur.length){if(Zr)return-1;Pr=Ur.length-1}else if(Pr<0)if(Zr)Pr=0;else return-1;if(typeof Ir=="string"&&(Ir=Jt.from(Ir,Fr)),Jt.isBuffer(Ir))return Ir.length===0?-1:Rr(Ur,Ir,Pr,Fr,Zr);if(typeof Ir=="number")return Ir=Ir&255,typeof qt.prototype.indexOf=="function"?Zr?qt.prototype.indexOf.call(Ur,Ir,Pr):qt.prototype.lastIndexOf.call(Ur,Ir,Pr):Rr(Ur,[Ir],Pr,Fr,Zr);throw new TypeError("val must be string, number or Buffer")}function Rr(Ur,Ir,Pr,Fr,Zr){let en=1,rn=Ur.length,En=Ir.length;if(Fr!==void 0&&(Fr=String(Fr).toLowerCase(),Fr==="ucs2"||Fr==="ucs-2"||Fr==="utf16le"||Fr==="utf-16le")){if(Ur.length<2||Ir.length<2)return-1;en=2,rn/=2,En/=2,Pr/=2}function $n(Fn,_n){return en===1?Fn[_n]:Fn.readUInt16BE(_n*en)}let mn;if(Zr){let Fn=-1;for(mn=Pr;mn<rn;mn++)if($n(Ur,mn)===$n(Ir,Fn===-1?0:mn-Fn)){if(Fn===-1&&(Fn=mn),mn-Fn+1===En)return Fn*en}else Fn!==-1&&(mn-=mn-Fn),Fn=-1}else for(Pr+En>rn&&(Pr=rn-En),mn=Pr;mn>=0;mn--){let Fn=!0;for(let _n=0;_n<En;_n++)if($n(Ur,mn+_n)!==$n(Ir,_n)){Fn=!1;break}if(Fn)return mn}return-1}Jt.prototype.includes=function(Ir,Pr,Fr){return this.indexOf(Ir,Pr,Fr)!==-1},Jt.prototype.indexOf=function(Ir,Pr,Fr){return jr(this,Ir,Pr,Fr,!0)},Jt.prototype.lastIndexOf=function(Ir,Pr,Fr){return jr(this,Ir,Pr,Fr,!1)};function yr(Ur,Ir,Pr,Fr){Pr=Number(Pr)||0;const Zr=Ur.length-Pr;Fr?(Fr=Number(Fr),Fr>Zr&&(Fr=Zr)):Fr=Zr;const en=Ir.length;Fr>en/2&&(Fr=en/2);let rn;for(rn=0;rn<Fr;++rn){const En=parseInt(Ir.substr(rn*2,2),16);if(gn(En))return rn;Ur[Pr+rn]=En}return rn}function sr(Ur,Ir,Pr,Fr){return sn(Xr(Ir,Ur.length-Pr),Ur,Pr,Fr)}function or(Ur,Ir,Pr,Fr){return sn(Qr(Ir),Ur,Pr,Fr)}function Qt(Ur,Ir,Pr,Fr){return sn(an(Ir),Ur,Pr,Fr)}function ir(Ur,Ir,Pr,Fr){return sn(un(Ir,Ur.length-Pr),Ur,Pr,Fr)}Jt.prototype.write=function(Ir,Pr,Fr,Zr){if(Pr===void 0)Zr="utf8",Fr=this.length,Pr=0;else if(Fr===void 0&&typeof Pr=="string")Zr=Pr,Fr=this.length,Pr=0;else if(isFinite(Pr))Pr=Pr>>>0,isFinite(Fr)?(Fr=Fr>>>0,Zr===void 0&&(Zr="utf8")):(Zr=Fr,Fr=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const en=this.length-Pr;if((Fr===void 0||Fr>en)&&(Fr=en),Ir.length>0&&(Fr<0||Pr<0)||Pr>this.length)throw new RangeError("Attempt to write outside buffer bounds");Zr||(Zr="utf8");let rn=!1;for(;;)switch(Zr){case"hex":return yr(this,Ir,Pr,Fr);case"utf8":case"utf-8":return sr(this,Ir,Pr,Fr);case"ascii":case"latin1":case"binary":return or(this,Ir,Pr,Fr);case"base64":return Qt(this,Ir,Pr,Fr);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ir(this,Ir,Pr,Fr);default:if(rn)throw new TypeError("Unknown encoding: "+Zr);Zr=(""+Zr).toLowerCase(),rn=!0}},Jt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ur(Ur,Ir,Pr){return Ir===0&&Pr===Ur.length?_e.fromByteArray(Ur):_e.fromByteArray(Ur.slice(Ir,Pr))}function gr(Ur,Ir,Pr){Pr=Math.min(Ur.length,Pr);const Fr=[];let Zr=Ir;for(;Zr<Pr;){const en=Ur[Zr];let rn=null,En=en>239?4:en>223?3:en>191?2:1;if(Zr+En<=Pr){let $n,mn,Fn,_n;switch(En){case 1:en<128&&(rn=en);break;case 2:$n=Ur[Zr+1],($n&192)===128&&(_n=(en&31)<<6|$n&63,_n>127&&(rn=_n));break;case 3:$n=Ur[Zr+1],mn=Ur[Zr+2],($n&192)===128&&(mn&192)===128&&(_n=(en&15)<<12|($n&63)<<6|mn&63,_n>2047&&(_n<55296||_n>57343)&&(rn=_n));break;case 4:$n=Ur[Zr+1],mn=Ur[Zr+2],Fn=Ur[Zr+3],($n&192)===128&&(mn&192)===128&&(Fn&192)===128&&(_n=(en&15)<<18|($n&63)<<12|(mn&63)<<6|Fn&63,_n>65535&&_n<1114112&&(rn=_n))}}rn===null?(rn=65533,En=1):rn>65535&&(rn-=65536,Fr.push(rn>>>10&1023|55296),rn=56320|rn&1023),Fr.push(rn),Zr+=En}return lr(Fr)}const dr=4096;function lr(Ur){const Ir=Ur.length;if(Ir<=dr)return String.fromCharCode.apply(String,Ur);let Pr="",Fr=0;for(;Fr<Ir;)Pr+=String.fromCharCode.apply(String,Ur.slice(Fr,Fr+=dr));return Pr}function hr(Ur,Ir,Pr){let Fr="";Pr=Math.min(Ur.length,Pr);for(let Zr=Ir;Zr<Pr;++Zr)Fr+=String.fromCharCode(Ur[Zr]&127);return Fr}function wr(Ur,Ir,Pr){let Fr="";Pr=Math.min(Ur.length,Pr);for(let Zr=Ir;Zr<Pr;++Zr)Fr+=String.fromCharCode(Ur[Zr]);return Fr}function pr(Ur,Ir,Pr){const Fr=Ur.length;(!Ir||Ir<0)&&(Ir=0),(!Pr||Pr<0||Pr>Fr)&&(Pr=Fr);let Zr="";for(let en=Ir;en<Pr;++en)Zr+=fn[Ur[en]];return Zr}function br(Ur,Ir,Pr){const Fr=Ur.slice(Ir,Pr);let Zr="";for(let en=0;en<Fr.length-1;en+=2)Zr+=String.fromCharCode(Fr[en]+Fr[en+1]*256);return Zr}Jt.prototype.slice=function(Ir,Pr){const Fr=this.length;Ir=~~Ir,Pr=Pr===void 0?Fr:~~Pr,Ir<0?(Ir+=Fr,Ir<0&&(Ir=0)):Ir>Fr&&(Ir=Fr),Pr<0?(Pr+=Fr,Pr<0&&(Pr=0)):Pr>Fr&&(Pr=Fr),Pr<Ir&&(Pr=Ir);const Zr=this.subarray(Ir,Pr);return Object.setPrototypeOf(Zr,Jt.prototype),Zr};function Dr(Ur,Ir,Pr){if(Ur%1!==0||Ur<0)throw new RangeError("offset is not uint");if(Ur+Ir>Pr)throw new RangeError("Trying to access beyond buffer length")}Jt.prototype.readUintLE=Jt.prototype.readUIntLE=function(Ir,Pr,Fr){Ir=Ir>>>0,Pr=Pr>>>0,Fr||Dr(Ir,Pr,this.length);let Zr=this[Ir],en=1,rn=0;for(;++rn<Pr&&(en*=256);)Zr+=this[Ir+rn]*en;return Zr},Jt.prototype.readUintBE=Jt.prototype.readUIntBE=function(Ir,Pr,Fr){Ir=Ir>>>0,Pr=Pr>>>0,Fr||Dr(Ir,Pr,this.length);let Zr=this[Ir+--Pr],en=1;for(;Pr>0&&(en*=256);)Zr+=this[Ir+--Pr]*en;return Zr},Jt.prototype.readUint8=Jt.prototype.readUInt8=function(Ir,Pr){return Ir=Ir>>>0,Pr||Dr(Ir,1,this.length),this[Ir]},Jt.prototype.readUint16LE=Jt.prototype.readUInt16LE=function(Ir,Pr){return Ir=Ir>>>0,Pr||Dr(Ir,2,this.length),this[Ir]|this[Ir+1]<<8},Jt.prototype.readUint16BE=Jt.prototype.readUInt16BE=function(Ir,Pr){return Ir=Ir>>>0,Pr||Dr(Ir,2,this.length),this[Ir]<<8|this[Ir+1]},Jt.prototype.readUint32LE=Jt.prototype.readUInt32LE=function(Ir,Pr){return Ir=Ir>>>0,Pr||Dr(Ir,4,this.length),(this[Ir]|this[Ir+1]<<8|this[Ir+2]<<16)+this[Ir+3]*16777216},Jt.prototype.readUint32BE=Jt.prototype.readUInt32BE=function(Ir,Pr){return Ir=Ir>>>0,Pr||Dr(Ir,4,this.length),this[Ir]*16777216+(this[Ir+1]<<16|this[Ir+2]<<8|this[Ir+3])},Jt.prototype.readBigUInt64LE=wn(function(Ir){Ir=Ir>>>0,tn(Ir,"offset");const Pr=this[Ir],Fr=this[Ir+7];(Pr===void 0||Fr===void 0)&&Yr(Ir,this.length-8);const Zr=Pr+this[++Ir]*2**8+this[++Ir]*2**16+this[++Ir]*2**24,en=this[++Ir]+this[++Ir]*2**8+this[++Ir]*2**16+Fr*2**24;return BigInt(Zr)+(BigInt(en)<<BigInt(32))}),Jt.prototype.readBigUInt64BE=wn(function(Ir){Ir=Ir>>>0,tn(Ir,"offset");const Pr=this[Ir],Fr=this[Ir+7];(Pr===void 0||Fr===void 0)&&Yr(Ir,this.length-8);const Zr=Pr*2**24+this[++Ir]*2**16+this[++Ir]*2**8+this[++Ir],en=this[++Ir]*2**24+this[++Ir]*2**16+this[++Ir]*2**8+Fr;return(BigInt(Zr)<<BigInt(32))+BigInt(en)}),Jt.prototype.readIntLE=function(Ir,Pr,Fr){Ir=Ir>>>0,Pr=Pr>>>0,Fr||Dr(Ir,Pr,this.length);let Zr=this[Ir],en=1,rn=0;for(;++rn<Pr&&(en*=256);)Zr+=this[Ir+rn]*en;return en*=128,Zr>=en&&(Zr-=Math.pow(2,8*Pr)),Zr},Jt.prototype.readIntBE=function(Ir,Pr,Fr){Ir=Ir>>>0,Pr=Pr>>>0,Fr||Dr(Ir,Pr,this.length);let Zr=Pr,en=1,rn=this[Ir+--Zr];for(;Zr>0&&(en*=256);)rn+=this[Ir+--Zr]*en;return en*=128,rn>=en&&(rn-=Math.pow(2,8*Pr)),rn},Jt.prototype.readInt8=function(Ir,Pr){return Ir=Ir>>>0,Pr||Dr(Ir,1,this.length),this[Ir]&128?(255-this[Ir]+1)*-1:this[Ir]},Jt.prototype.readInt16LE=function(Ir,Pr){Ir=Ir>>>0,Pr||Dr(Ir,2,this.length);const Fr=this[Ir]|this[Ir+1]<<8;return Fr&32768?Fr|4294901760:Fr},Jt.prototype.readInt16BE=function(Ir,Pr){Ir=Ir>>>0,Pr||Dr(Ir,2,this.length);const Fr=this[Ir+1]|this[Ir]<<8;return Fr&32768?Fr|4294901760:Fr},Jt.prototype.readInt32LE=function(Ir,Pr){return Ir=Ir>>>0,Pr||Dr(Ir,4,this.length),this[Ir]|this[Ir+1]<<8|this[Ir+2]<<16|this[Ir+3]<<24},Jt.prototype.readInt32BE=function(Ir,Pr){return Ir=Ir>>>0,Pr||Dr(Ir,4,this.length),this[Ir]<<24|this[Ir+1]<<16|this[Ir+2]<<8|this[Ir+3]},Jt.prototype.readBigInt64LE=wn(function(Ir){Ir=Ir>>>0,tn(Ir,"offset");const Pr=this[Ir],Fr=this[Ir+7];(Pr===void 0||Fr===void 0)&&Yr(Ir,this.length-8);const Zr=this[Ir+4]+this[Ir+5]*2**8+this[Ir+6]*2**16+(Fr<<24);return(BigInt(Zr)<<BigInt(32))+BigInt(Pr+this[++Ir]*2**8+this[++Ir]*2**16+this[++Ir]*2**24)}),Jt.prototype.readBigInt64BE=wn(function(Ir){Ir=Ir>>>0,tn(Ir,"offset");const Pr=this[Ir],Fr=this[Ir+7];(Pr===void 0||Fr===void 0)&&Yr(Ir,this.length-8);const Zr=(Pr<<24)+this[++Ir]*2**16+this[++Ir]*2**8+this[++Ir];return(BigInt(Zr)<<BigInt(32))+BigInt(this[++Ir]*2**24+this[++Ir]*2**16+this[++Ir]*2**8+Fr)}),Jt.prototype.readFloatLE=function(Ir,Pr){return Ir=Ir>>>0,Pr||Dr(Ir,4,this.length),$t.read(this,Ir,!0,23,4)},Jt.prototype.readFloatBE=function(Ir,Pr){return Ir=Ir>>>0,Pr||Dr(Ir,4,this.length),$t.read(this,Ir,!1,23,4)},Jt.prototype.readDoubleLE=function(Ir,Pr){return Ir=Ir>>>0,Pr||Dr(Ir,8,this.length),$t.read(this,Ir,!0,52,8)},Jt.prototype.readDoubleBE=function(Ir,Pr){return Ir=Ir>>>0,Pr||Dr(Ir,8,this.length),$t.read(this,Ir,!1,52,8)};function _r(Ur,Ir,Pr,Fr,Zr,en){if(!Jt.isBuffer(Ur))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ir>Zr||Ir<en)throw new RangeError('"value" argument is out of bounds');if(Pr+Fr>Ur.length)throw new RangeError("Index out of range")}Jt.prototype.writeUintLE=Jt.prototype.writeUIntLE=function(Ir,Pr,Fr,Zr){if(Ir=+Ir,Pr=Pr>>>0,Fr=Fr>>>0,!Zr){const En=Math.pow(2,8*Fr)-1;_r(this,Ir,Pr,Fr,En,0)}let en=1,rn=0;for(this[Pr]=Ir&255;++rn<Fr&&(en*=256);)this[Pr+rn]=Ir/en&255;return Pr+Fr},Jt.prototype.writeUintBE=Jt.prototype.writeUIntBE=function(Ir,Pr,Fr,Zr){if(Ir=+Ir,Pr=Pr>>>0,Fr=Fr>>>0,!Zr){const En=Math.pow(2,8*Fr)-1;_r(this,Ir,Pr,Fr,En,0)}let en=Fr-1,rn=1;for(this[Pr+en]=Ir&255;--en>=0&&(rn*=256);)this[Pr+en]=Ir/rn&255;return Pr+Fr},Jt.prototype.writeUint8=Jt.prototype.writeUInt8=function(Ir,Pr,Fr){return Ir=+Ir,Pr=Pr>>>0,Fr||_r(this,Ir,Pr,1,255,0),this[Pr]=Ir&255,Pr+1},Jt.prototype.writeUint16LE=Jt.prototype.writeUInt16LE=function(Ir,Pr,Fr){return Ir=+Ir,Pr=Pr>>>0,Fr||_r(this,Ir,Pr,2,65535,0),this[Pr]=Ir&255,this[Pr+1]=Ir>>>8,Pr+2},Jt.prototype.writeUint16BE=Jt.prototype.writeUInt16BE=function(Ir,Pr,Fr){return Ir=+Ir,Pr=Pr>>>0,Fr||_r(this,Ir,Pr,2,65535,0),this[Pr]=Ir>>>8,this[Pr+1]=Ir&255,Pr+2},Jt.prototype.writeUint32LE=Jt.prototype.writeUInt32LE=function(Ir,Pr,Fr){return Ir=+Ir,Pr=Pr>>>0,Fr||_r(this,Ir,Pr,4,4294967295,0),this[Pr+3]=Ir>>>24,this[Pr+2]=Ir>>>16,this[Pr+1]=Ir>>>8,this[Pr]=Ir&255,Pr+4},Jt.prototype.writeUint32BE=Jt.prototype.writeUInt32BE=function(Ir,Pr,Fr){return Ir=+Ir,Pr=Pr>>>0,Fr||_r(this,Ir,Pr,4,4294967295,0),this[Pr]=Ir>>>24,this[Pr+1]=Ir>>>16,this[Pr+2]=Ir>>>8,this[Pr+3]=Ir&255,Pr+4};function Nr(Ur,Ir,Pr,Fr,Zr){Gr(Ir,Fr,Zr,Ur,Pr,7);let en=Number(Ir&BigInt(4294967295));Ur[Pr++]=en,en=en>>8,Ur[Pr++]=en,en=en>>8,Ur[Pr++]=en,en=en>>8,Ur[Pr++]=en;let rn=Number(Ir>>BigInt(32)&BigInt(4294967295));return Ur[Pr++]=rn,rn=rn>>8,Ur[Pr++]=rn,rn=rn>>8,Ur[Pr++]=rn,rn=rn>>8,Ur[Pr++]=rn,Pr}function kr(Ur,Ir,Pr,Fr,Zr){Gr(Ir,Fr,Zr,Ur,Pr,7);let en=Number(Ir&BigInt(4294967295));Ur[Pr+7]=en,en=en>>8,Ur[Pr+6]=en,en=en>>8,Ur[Pr+5]=en,en=en>>8,Ur[Pr+4]=en;let rn=Number(Ir>>BigInt(32)&BigInt(4294967295));return Ur[Pr+3]=rn,rn=rn>>8,Ur[Pr+2]=rn,rn=rn>>8,Ur[Pr+1]=rn,rn=rn>>8,Ur[Pr]=rn,Pr+8}Jt.prototype.writeBigUInt64LE=wn(function(Ir,Pr=0){return Nr(this,Ir,Pr,BigInt(0),BigInt("0xffffffffffffffff"))}),Jt.prototype.writeBigUInt64BE=wn(function(Ir,Pr=0){return kr(this,Ir,Pr,BigInt(0),BigInt("0xffffffffffffffff"))}),Jt.prototype.writeIntLE=function(Ir,Pr,Fr,Zr){if(Ir=+Ir,Pr=Pr>>>0,!Zr){const $n=Math.pow(2,8*Fr-1);_r(this,Ir,Pr,Fr,$n-1,-$n)}let en=0,rn=1,En=0;for(this[Pr]=Ir&255;++en<Fr&&(rn*=256);)Ir<0&&En===0&&this[Pr+en-1]!==0&&(En=1),this[Pr+en]=(Ir/rn>>0)-En&255;return Pr+Fr},Jt.prototype.writeIntBE=function(Ir,Pr,Fr,Zr){if(Ir=+Ir,Pr=Pr>>>0,!Zr){const $n=Math.pow(2,8*Fr-1);_r(this,Ir,Pr,Fr,$n-1,-$n)}let en=Fr-1,rn=1,En=0;for(this[Pr+en]=Ir&255;--en>=0&&(rn*=256);)Ir<0&&En===0&&this[Pr+en+1]!==0&&(En=1),this[Pr+en]=(Ir/rn>>0)-En&255;return Pr+Fr},Jt.prototype.writeInt8=function(Ir,Pr,Fr){return Ir=+Ir,Pr=Pr>>>0,Fr||_r(this,Ir,Pr,1,127,-128),Ir<0&&(Ir=255+Ir+1),this[Pr]=Ir&255,Pr+1},Jt.prototype.writeInt16LE=function(Ir,Pr,Fr){return Ir=+Ir,Pr=Pr>>>0,Fr||_r(this,Ir,Pr,2,32767,-32768),this[Pr]=Ir&255,this[Pr+1]=Ir>>>8,Pr+2},Jt.prototype.writeInt16BE=function(Ir,Pr,Fr){return Ir=+Ir,Pr=Pr>>>0,Fr||_r(this,Ir,Pr,2,32767,-32768),this[Pr]=Ir>>>8,this[Pr+1]=Ir&255,Pr+2},Jt.prototype.writeInt32LE=function(Ir,Pr,Fr){return Ir=+Ir,Pr=Pr>>>0,Fr||_r(this,Ir,Pr,4,2147483647,-2147483648),this[Pr]=Ir&255,this[Pr+1]=Ir>>>8,this[Pr+2]=Ir>>>16,this[Pr+3]=Ir>>>24,Pr+4},Jt.prototype.writeInt32BE=function(Ir,Pr,Fr){return Ir=+Ir,Pr=Pr>>>0,Fr||_r(this,Ir,Pr,4,2147483647,-2147483648),Ir<0&&(Ir=4294967295+Ir+1),this[Pr]=Ir>>>24,this[Pr+1]=Ir>>>16,this[Pr+2]=Ir>>>8,this[Pr+3]=Ir&255,Pr+4},Jt.prototype.writeBigInt64LE=wn(function(Ir,Pr=0){return Nr(this,Ir,Pr,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),Jt.prototype.writeBigInt64BE=wn(function(Ir,Pr=0){return kr(this,Ir,Pr,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Mr(Ur,Ir,Pr,Fr,Zr,en){if(Pr+Fr>Ur.length)throw new RangeError("Index out of range");if(Pr<0)throw new RangeError("Index out of range")}function Lr(Ur,Ir,Pr,Fr,Zr){return Ir=+Ir,Pr=Pr>>>0,Zr||Mr(Ur,Ir,Pr,4),$t.write(Ur,Ir,Pr,Fr,23,4),Pr+4}Jt.prototype.writeFloatLE=function(Ir,Pr,Fr){return Lr(this,Ir,Pr,!0,Fr)},Jt.prototype.writeFloatBE=function(Ir,Pr,Fr){return Lr(this,Ir,Pr,!1,Fr)};function Cr(Ur,Ir,Pr,Fr,Zr){return Ir=+Ir,Pr=Pr>>>0,Zr||Mr(Ur,Ir,Pr,8),$t.write(Ur,Ir,Pr,Fr,52,8),Pr+8}Jt.prototype.writeDoubleLE=function(Ir,Pr,Fr){return Cr(this,Ir,Pr,!0,Fr)},Jt.prototype.writeDoubleBE=function(Ir,Pr,Fr){return Cr(this,Ir,Pr,!1,Fr)},Jt.prototype.copy=function(Ir,Pr,Fr,Zr){if(!Jt.isBuffer(Ir))throw new TypeError("argument should be a Buffer");if(Fr||(Fr=0),!Zr&&Zr!==0&&(Zr=this.length),Pr>=Ir.length&&(Pr=Ir.length),Pr||(Pr=0),Zr>0&&Zr<Fr&&(Zr=Fr),Zr===Fr||Ir.length===0||this.length===0)return 0;if(Pr<0)throw new RangeError("targetStart out of bounds");if(Fr<0||Fr>=this.length)throw new RangeError("Index out of range");if(Zr<0)throw new RangeError("sourceEnd out of bounds");Zr>this.length&&(Zr=this.length),Ir.length-Pr<Zr-Fr&&(Zr=Ir.length-Pr+Fr);const en=Zr-Fr;return this===Ir&&typeof qt.prototype.copyWithin=="function"?this.copyWithin(Pr,Fr,Zr):qt.prototype.set.call(Ir,this.subarray(Fr,Zr),Pr),en},Jt.prototype.fill=function(Ir,Pr,Fr,Zr){if(typeof Ir=="string"){if(typeof Pr=="string"?(Zr=Pr,Pr=0,Fr=this.length):typeof Fr=="string"&&(Zr=Fr,Fr=this.length),Zr!==void 0&&typeof Zr!="string")throw new TypeError("encoding must be a string");if(typeof Zr=="string"&&!Jt.isEncoding(Zr))throw new TypeError("Unknown encoding: "+Zr);if(Ir.length===1){const rn=Ir.charCodeAt(0);(Zr==="utf8"&&rn<128||Zr==="latin1")&&(Ir=rn)}}else typeof Ir=="number"?Ir=Ir&255:typeof Ir=="boolean"&&(Ir=Number(Ir));
vendor: 4,971 bytes, line 246
246if(Pr<0||this.length<Pr||this.length<Fr)throw new RangeError("Out of range index");if(Fr<=Pr)return this;Pr=Pr>>>0,Fr=Fr===void 0?this.length:Fr>>>0,Ir||(Ir=0);let en;if(typeof Ir=="number")for(en=Pr;en<Fr;++en)this[en]=Ir;else{const rn=Jt.isBuffer(Ir)?Ir:Jt.from(Ir,Zr),En=rn.length;if(En===0)throw new TypeError('The value "'+Ir+'" is invalid for argument "value"');for(en=0;en<Fr-Pr;++en)this[en+Pr]=rn[en%En]}return this};const Er={};function Ar(Ur,Ir,Pr){Er[Ur]=class extends Pr{constructor(){super(),Object.defineProperty(this,"message",{value:Ir.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Ur}]`,this.stack,delete this.name}get code(){return Ur}set code(Zr){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Zr,writable:!0})}toString(){return`${this.name} [${Ur}]: ${this.message}`}}}Ar("ERR_BUFFER_OUT_OF_BOUNDS",function(Ur){return Ur?`${Ur} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ar("ERR_INVALID_ARG_TYPE",function(Ur,Ir){return`The "${Ur}" argument must be of type number. Received type ${typeof Ir}`},TypeError),Ar("ERR_OUT_OF_RANGE",function(Ur,Ir,Pr){let Fr=`The value of "${Ur}" is out of range.`,Zr=Pr;return Number.isInteger(Pr)&&Math.abs(Pr)>2**32?Zr=zr(String(Pr)):typeof Pr=="bigint"&&(Zr=String(Pr),(Pr>BigInt(2)**BigInt(32)||Pr<-(BigInt(2)**BigInt(32)))&&(Zr=zr(Zr)),Zr+="n"),Fr+=` It must be ${Ir}. Received ${Zr}`,Fr},RangeError);function zr(Ur){let Ir="",Pr=Ur.length;const Fr=Ur[0]==="-"?1:0;for(;Pr>=Fr+4;Pr-=3)Ir=`_${Ur.slice(Pr-3,Pr)}${Ir}`;return`${Ur.slice(0,Pr)}${Ir}`}function Vr(Ur,Ir,Pr){tn(Ir,"offset"),(Ur[Ir]===void 0||Ur[Ir+Pr]===void 0)&&Yr(Ir,Ur.length-(Pr+1))}function Gr(Ur,Ir,Pr,Fr,Zr,en){if(Ur>Pr||Ur<Ir){const rn=typeof Ir=="bigint"?"n":"";let En;throw Ir===0||Ir===BigInt(0)?En=`>= 0${rn} and < 2${rn} ** ${(en+1)*8}${rn}`:En=`>= -(2${rn} ** ${(en+1)*8-1}${rn}) and < 2 ** ${(en+1)*8-1}${rn}`,new Er.ERR_OUT_OF_RANGE("value",En,Ur)}Vr(Fr,Zr,en)}function tn(Ur,Ir){if(typeof Ur!="number")throw new Er.ERR_INVALID_ARG_TYPE(Ir,"number",Ur)}function Yr(Ur,Ir,Pr){throw Math.floor(Ur)!==Ur?(tn(Ur,Pr),new Er.ERR_OUT_OF_RANGE("offset","an integer",Ur)):Ir<0?new Er.ERR_BUFFER_OUT_OF_BOUNDS:new Er.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Ir}`,Ur)}const Jr=/[^+/0-9A-Za-z-_]/g;function Kr(Ur){if(Ur=Ur.split("=")[0],Ur=Ur.trim().replace(Jr,""),Ur.length<2)return"";for(;Ur.length%4!==0;)Ur=Ur+"=";return Ur}function Xr(Ur,Ir){Ir=Ir||1/0;let Pr;const Fr=Ur.length;let Zr=null;const en=[];for(let rn=0;rn<Fr;++rn){if(Pr=Ur.charCodeAt(rn),Pr>55295&&Pr<57344){if(!Zr){if(Pr>56319){(Ir-=3)>-1&&en.push(239,191,189);continue}else if(rn+1===Fr){(Ir-=3)>-1&&en.push(239,191,189);continue}Zr=Pr;continue}if(Pr<56320){(Ir-=3)>-1&&en.push(239,191,189),Zr=Pr;continue}Pr=(Zr-55296<<10|Pr-56320)+65536}else Zr&&(Ir-=3)>-1&&en.push(239,191,189);if(Zr=null,Pr<128){if((Ir-=1)<0)break;en.push(Pr)}else if(Pr<2048){if((Ir-=2)<0)break;en.push(Pr>>6|192,Pr&63|128)}else if(Pr<65536){if((Ir-=3)<0)break;en.push(Pr>>12|224,Pr>>6&63|128,Pr&63|128)}else if(Pr<1114112){if((Ir-=4)<0)break;en.push(Pr>>18|240,Pr>>12&63|128,Pr>>6&63|128,Pr&63|128)}else throw new Error("Invalid code point")}return en}function Qr(Ur){const Ir=[];for(let Pr=0;Pr<Ur.length;++Pr)Ir.push(Ur.charCodeAt(Pr)&255);return Ir}function un(Ur,Ir){let Pr,Fr,Zr;const en=[];for(let rn=0;rn<Ur.length&&!((Ir-=2)<0);++rn)Pr=Ur.charCodeAt(rn),Fr=Pr>>8,Zr=Pr%256,en.push(Zr),en.push(Fr);return en}function an(Ur){return _e.toByteArray(Kr(Ur))}function sn(Ur,Ir,Pr,Fr){let Zr;for(Zr=0;Zr<Fr&&!(Zr+Pr>=Ir.length||Zr>=Ur.length);++Zr)Ir[Zr+Pr]=Ur[Zr];return Zr}function vn(Ur,Ir){return Ur instanceof Ir||Ur!=null&&Ur.constructor!=null&&Ur.constructor.name!=null&&Ur.constructor.name===Ir.name}function gn(Ur){return Ur!==Ur}const fn=function(){const Ur="0123456789abcdef",Ir=new Array(256);for(let Pr=0;Pr<16;++Pr){const Fr=Pr*16;for(let Zr=0;Zr<16;++Zr)Ir[Fr+Zr]=Ur[Pr]+Ur[Zr]}return Ir}();function wn(Ur){return typeof BigInt>"u"?dn:Ur}function dn(){throw new Error("BigInt not supported")}})(buffer$1);const Buffer=buffer$1.Buffer,Blob$1=buffer$1.Blob,BlobOptions=buffer$1.BlobOptions,Buffer$1=buffer$1.Buffer,File=buffer$1.File,FileOptions=buffer$1.FileOptions,INSPECT_MAX_BYTES=buffer$1.INSPECT_MAX_BYTES,SlowBuffer=buffer$1.SlowBuffer,TranscodeEncoding=buffer$1.TranscodeEncoding,atob$1=buffer$1.atob,btoa$1=buffer$1.btoa,constants$1=buffer$1.constants,isAscii=buffer$1.isAscii,isUtf8=buffer$1.isUtf8,kMaxLength=buffer$1.kMaxLength,kStringMaxLength=buffer$1.kStringMaxLength,resolveObjectURL=buffer$1.resolveObjectURL,transcode=buffer$1.transcode,dist=Object.freeze(Object.defineProperty({__proto__:null,Blob:Blob$1,BlobOptions,Buffer:Buffer$1,File,FileOptions,INSPECT_MAX_BYTES,SlowBuffer,TranscodeEncoding,atob:atob$1,btoa:btoa$1,constants:constants$1,default:Buffer,isAscii,isUtf8,kMaxLength,kStringMaxLength,resolveObjectURL,transcode},Symbol.toStringTag,{value:"Module"}));
246class StorageError extends Error{constructor(_e){super(_e),this.__isStorageError=!0,this.name="StorageError"}}function isStorageError(yt){return typeof yt=="object"&&yt!==null&&"__isStorageError"in yt}class StorageApiError extends StorageError{constructor(_e,$t){super(_e),this.name="StorageApiError",this.status=$t}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class StorageUnknownError extends StorageError{constructor(_e,$t){super(_e),this.name="StorageUnknownError",this.originalError=$t}}var __awaiter$8=function(yt,_e,$t,Ft){function Vt(qt){return qt instanceof $t?qt:new $t(function(zt){zt(qt)})}return new($t||($t=Promise))(function(qt,zt){function Ht(Jt){try{Gt(Ft.next(Jt))}catch(Xt){zt(Xt)}}function Kt(Jt){try{Gt(Ft.throw(Jt))}catch(Xt){zt(Xt)}}function Gt(Jt){Jt.done?qt(Jt.value):Vt(Jt.value).then(Ht,Kt)}Gt((Ft=Ft.apply(yt,_e||[])).next())})};const resolveFetch$2=yt=>{let _e;return yt?_e=yt:typeof fetch>"u"?_e=(...$t)=>__vitePreload(async()=>{const{default:Ft}=await Promise.resolve().then(()=>browser$d);return{default:Ft}},void 0).then(({default:Ft})=>Ft(...$t)):_e=fetch,(...$t)=>_e(...$t)},resolveResponse=()=>__awaiter$8(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield __vitePreload(()=>Promise.resolve().then(()=>browser$d),void 0)).Response:Response}),recursiveToCamel=yt=>{if(Array.isArray(yt))return yt.map($t=>recursiveToCamel($t));if(typeof yt=="function"||yt!==Object(yt))return yt;const _e={};return Object.entries(yt).forEach(([$t,Ft])=>{const Vt=$t.replace(/([-_][a-z])/gi,qt=>qt.toUpperCase().replace(/[-_]/g,""));_e[Vt]=recursiveToCamel(Ft)}),_e};var __awaiter$7=function(yt,_e,$t,Ft){function Vt(qt){return qt instanceof $t?qt:new $t(function(zt){zt(qt)})}return new($t||($t=Promise))(function(qt,zt){function Ht(Jt){try{Gt(Ft.next(Jt))}catch(Xt){zt(Xt)}}function Kt(Jt){try{Gt(Ft.throw(Jt))}catch(Xt){zt(Xt)}}function Gt(Jt){Jt.done?qt(Jt.value):Vt(Jt.value).then(Ht,Kt)}Gt((Ft=Ft.apply(yt,_e||[])).next())})};const _getErrorMessage$1=yt=>yt.msg||yt.message||yt.error_description||yt.error||JSON.stringify(yt),handleError$1=(yt,_e,$t)=>__awaiter$7(void 0,void 0,void 0,function*(){const Ft=yield resolveResponse();
246yt instanceof Ft&&!($t!=null&&$t.noResolveJson)?yt.json().then(Vt=>{_e(new StorageApiError(_getErrorMessage$1(Vt),yt.status||500))}).catch(Vt=>{_e(new StorageUnknownError(_getErrorMessage$1(Vt),Vt))}):_e(new StorageUnknownError(_getErrorMessage$1(yt),yt))}),_getRequestParams$1=(yt,_e,$t,Ft)=>{const Vt={method:yt,headers:(_e==null?void 0:_e.headers)||{}};return yt==="GET"?Vt:(Vt.headers=Object.assign({"Content-Type":"application/json"},_e==null?void 0:_e.headers),Ft&&(Vt.body=JSON.stringify(Ft)),Object.assign(Object.assign({},Vt),$t))};function _handleRequest$1(yt,_e,$t,Ft,Vt,qt){return __awaiter$7(this,void 0,void 0,function*(){return new Promise((zt,Ht)=>{yt($t,_getRequestParams$1(_e,Ft,Vt,qt)).then(Kt=>{if(!Kt.ok)throw Kt;return Ft!=null&&Ft.noResolveJson?Kt:Kt.json()}).then(Kt=>zt(Kt)).catch(Kt=>handleError$1(Kt,Ht,Ft))})})}function get$1(yt,_e,$t,Ft){return __awaiter$7(this,void 0,void 0,function*(){return _handleRequest$1(yt,"GET",_e,$t,Ft)})}function post(yt,_e,$t,Ft,Vt){return __awaiter$7(this,void 0,void 0,function*(){return _handleRequest$1(yt,"POST",_e,Ft,Vt,$t)})}function put(yt,_e,$t,Ft,Vt){return __awaiter$7(this,void 0,void 0,function*(){return _handleRequest$1(yt,"PUT",_e,Ft,Vt,$t)})}function head(yt,_e,$t,Ft){return __awaiter$7(this,void 0,void 0,function*(){return _handleRequest$1(yt,"HEAD",_e,Object.assign(Object.assign({},$t),{noResolveJson:!0}),Ft)})}function remove(yt,_e,$t,Ft,Vt){return __awaiter$7(this,void 0,void 0,function*(){return _handleRequest$1(yt,"DELETE",_e,Ft,Vt,$t)})}var __awaiter$6=function(yt,_e,$t,Ft){function Vt(qt){return qt instanceof $t?qt:new $t(function(zt){zt(qt)})}return new($t||($t=Promise))(function(qt,zt){function Ht(Jt){try{Gt(Ft.next(Jt))}catch(Xt){zt(Xt)}}function Kt(Jt){try{Gt(Ft.throw(Jt))}catch(Xt){zt(Xt)}}function Gt(Jt){Jt.done?qt(Jt.value):Vt(Jt.value).then(Ht,Kt)}Gt((Ft=Ft.apply(yt,_e||[])).next())})};const DEFAULT_SEARCH_OPTIONS={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},DEFAULT_FILE_OPTIONS={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class StorageFileApi{constructor(_e,$t={},Ft,Vt){this.url=_e,this.headers=$t,this.bucketId=Ft,this.fetch=resolveFetch$2(Vt)}uploadOrUpdate(_e,$t,Ft,Vt){return __awaiter$6(this,void 0,void 0,function*(){try{let qt;const zt=Object.assign(Object.assign({},DEFAULT_FILE_OPTIONS),Vt);let Ht=Object.assign(Object.assign({},this.headers),_e==="POST"&&{"x-upsert":String(zt.upsert)});const Kt=zt.metadata;typeof Blob<"u"&&Ft instanceof Blob?(qt=new FormData,qt.append("cacheControl",zt.cacheControl),Kt&&qt.append("metadata",this.encodeMetadata(Kt)),qt.append("",Ft)):typeof FormData<"u"&&Ft instanceof FormData?(qt=Ft,qt.append("cacheControl",zt.cacheControl),Kt&&qt.append("metadata",this.encodeMetadata(Kt))):(qt=Ft,Ht["cache-control"]=`max-age=${zt.cacheControl}`,Ht["content-type"]=zt.contentType,Kt&&(Ht["x-metadata"]=this.toBase64(this.encodeMetadata(Kt)))),Vt!=null&&Vt.headers&&(Ht=Object.assign(Object.assign({},Ht),Vt.headers));const Gt=this._removeEmptyFolders($t),Jt=this._getFinalPath(Gt),Xt=yield this.fetch(`${this.url}/object/${Jt}`,Object.assign({method:_e,body:qt,headers:Ht},zt!=null&&zt.duplex?{duplex:zt.duplex}:{})),Zt=yield Xt.json();return Xt.ok?{data:{path:Gt,id:Zt.Id,fullPath:Zt.Key},error:null}:{data:null,error:Zt}}catch(qt){if(isStorageError(qt))return{data:null,error:qt};throw qt}})}upload(_e,$t,Ft){return __awaiter$6(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",_e,$t,Ft)})}uploadToSignedUrl(_e,$t,Ft,Vt){return __awaiter$6(this,void 0,void 0,function*(){const qt=this._removeEmptyFolders(_e),zt=this._getFinalPath(qt),Ht=new URL(this.url+`/object/upload/sign/${zt}`);Ht.searchParams.set("token",$t);try{let Kt;const Gt=Object.assign({upsert:DEFAULT_FILE_OPTIONS.upsert},Vt),Jt=Object.assign(Object.assign({},this.headers),{"x-upsert":String(Gt.upsert)});typeof Blob<"u"&&Ft instanceof Blob?(Kt=new FormData,Kt.append("cacheControl",Gt.cacheControl),Kt.append("",Ft)):typeof FormData<"u"&&Ft instanceof FormData?(Kt=Ft,Kt.append("cacheControl",Gt.cacheControl)):(Kt=Ft,Jt["cache-control"]=`max-age=${Gt.cacheControl}`,Jt["content-type"]=Gt.contentType);const Xt=yield this.fetch(Ht.toString(),{method:"PUT",body:Kt,headers:Jt}),Zt=yield Xt.json();return Xt.ok?{data:{path:qt,fullPath:Zt.Key},error:null}:{data:null,error:Zt}}catch(Kt){if(isStorageError(Kt))return{data:null,error:Kt};throw Kt}})}createSignedUploadUrl(_e,$t){return __awaiter$6(this,void 0,void 0,function*(){try{let Ft=this._getFinalPath(_e);const Vt=Object.assign({},this.headers);$t!=null&&$t.upsert&&(Vt["x-upsert"]="true");const qt=yield post(this.fetch,`${this.url}/object/upload/sign/${Ft}`,{},{headers:Vt}
246),zt=new URL(this.url+qt.url),Ht=zt.searchParams.get("token");if(!Ht)throw new StorageError("No token returned by API");return{data:{signedUrl:zt.toString(),path:_e,token:Ht},error:null}}catch(Ft){if(isStorageError(Ft))return{data:null,error:Ft};throw Ft}})}update(_e,$t,Ft){return __awaiter$6(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",_e,$t,Ft)})}move(_e,$t,Ft){return __awaiter$6(this,void 0,void 0,function*(){try{return{data:yield post(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:_e,destinationKey:$t,destinationBucket:Ft==null?void 0:Ft.destinationBucket},{headers:this.headers}),error:null}}catch(Vt){if(isStorageError(Vt))return{data:null,error:Vt};throw Vt}})}copy(_e,$t,Ft){return __awaiter$6(this,void 0,void 0,function*(){try{return{data:{path:(yield post(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:_e,destinationKey:$t,destinationBucket:Ft==null?void 0:Ft.destinationBucket},{headers:this.headers})).Key},error:null}}catch(Vt){if(isStorageError(Vt))return{data:null,error:Vt};throw Vt}})}createSignedUrl(_e,$t,Ft){return __awaiter$6(this,void 0,void 0,function*(){try{let Vt=this._getFinalPath(_e),qt=yield post(this.fetch,`${this.url}/object/sign/${Vt}`,Object.assign({expiresIn:$t},Ft!=null&&Ft.transform?{transform:Ft.transform}:{}),{headers:this.headers});const zt=Ft!=null&&Ft.download?`&download=${Ft.download===!0?"":Ft.download}`:"";return qt={signedUrl:encodeURI(`${this.url}${qt.signedURL}${zt}`)},{data:qt,error:null}}catch(Vt){if(isStorageError(Vt))return{data:null,error:Vt};throw Vt}})}createSignedUrls(_e,$t,Ft){return __awaiter$6(this,void 0,void 0,function*(){try{const Vt=yield post(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:$t,paths:_e},{headers:this.headers}),qt=Ft!=null&&Ft.download?`&download=${Ft.download===!0?"":Ft.download}`:"";return{data:Vt.map(zt=>Object.assign(Object.assign({},zt),{signedUrl:zt.signedURL?encodeURI(`${this.url}${zt.signedURL}${qt}`):null})),error:null}}catch(Vt){if(isStorageError(Vt))return{data:null,error:Vt};throw Vt}})}download(_e,$t){return __awaiter$6(this,void 0,void 0,function*(){const Vt=typeof($t==null?void 0:$t.transform)<"u"?"render/image/authenticated":"object",qt=this.transformOptsToQueryString(($t==null?void 0:$t.transform)||{}),zt=qt?`?${qt}`:"";try{const Ht=this._getFinalPath(_e);return{data:yield(yield get$1(this.fetch,`${this.url}/${Vt}/${Ht}${zt}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(Ht){if(isStorageError(Ht))return{data:null,error:Ht};throw Ht}})}info(_e){return __awaiter$6(this,void 0,void 0,function*(){const $t=this._getFinalPath(_e);try{const Ft=yield get$1(this.fetch,`${this.url}/object/info/${$t}`,{headers:this.headers});return{data:recursiveToCamel(Ft),error:null}}catch(Ft){if(isStorageError(Ft))return{data:null,error:Ft};throw Ft}})}exists(_e){return __awaiter$6(this,void 0,void 0,function*(){const $t=this._getFinalPath(_e);try{return yield head(this.fetch,`${this.url}/object/${$t}`,{headers:this.headers}),{data:!0,error:null}}catch(Ft){if(isStorageError(Ft)&&Ft instanceof StorageUnknownError){const Vt=Ft.originalError;if([400,404].includes(Vt==null?void 0:Vt.status))return{data:!1,error:Ft}}throw Ft}})}getPublicUrl(_e,$t){const Ft=this._getFinalPath(_e),Vt=[],qt=$t!=null&&$t.download?`download=${$t.download===!0?"":$t.download}`:"";qt!==""&&Vt.push(qt);const Ht=typeof($t==null?void 0:$t.transform)<"u"?"render/image":"object",Kt=this.transformOptsToQueryString(($t==null?void 0:$t.transform)||{});Kt!==""&&Vt.push(Kt);let Gt=Vt.join("&");return Gt!==""&&(Gt=`?${Gt}`),{data:{publicUrl:encodeURI(`${this.url}/${Ht}/public/${Ft}${Gt}`)}}}remove(_e){return __awaiter$6(this,void 0,void 0,function*(){try{return{data:yield remove(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:_e},{headers:this.headers}),error:null}}catch($t){if(isStorageError($t))return{data:null,error:$t};throw $t}})}list(_e,$t,Ft){return __awaiter$6(this,void 0,void 0,function*(){try{const Vt=Object.assign(Object.assign(Object.assign({},DEFAULT_SEARCH_OPTIONS),$t),{prefix:_e||""});return{data:yield post(this.fetch,`${this.url}/object/list/${this.bucketId}`,Vt,{headers:this.headers},Ft),error:null}}catch(Vt){if(isStorageError(Vt))return{data:null,error:Vt};throw Vt}})}encodeMetadata(_e){return JSON.stringify(_e)}toBase64(_e){return typeof Buffer<"u"?Buffer.from(_e).toString("base64"):btoa(_e)}_getFinalPath(_e){return`${this.bucketId}/${_e}`}_removeEmptyFolders(_e){return _e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(_e){const $t=[];return _e.width&&$t.push(`width=${_e.width}`),_e.height&&$t.push(`height=${_e.height}`),_e.resize&&$t.push(`resize=${_e.resize}`),_e.format&&$t.push(`format=${_e.format}`),_e.quality&&$t.push(`quality=${_e.quality}`),$t.join("&")}}const version$5="2.7.1",DEFAULT_HEADERS$2={"X-Client-Info":`storage-js/${version$5}`};var __awaiter$5=function(yt,_e,$t,Ft){function Vt(qt){return qt instanceof $t?qt:new $t(function(zt){zt(qt)})}return new($t||($t=Promise))(function(qt,zt){function Ht(Jt){try{Gt(Ft.next(Jt))}catch(Xt){zt(Xt)}}function Kt(Jt){try{Gt(Ft.throw(Jt))}catch(Xt){zt(Xt)}}function Gt(Jt){Jt.done?qt(Jt.value):Vt(Jt.value).then(Ht,Kt)}Gt((Ft=Ft.apply(yt,[])).next())})};class StorageBucketApi{constructor(_e,$t={},Ft){this.url=_e,this.headers=Object.assign(Object.assign({},DEFAULT_HEADERS$2),$t),this.fetch=resolveFetch$2(Ft)}listBuckets(){return __awaiter$5(this,void 0,void 0,function*(){try{return{data:yield get$1(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(_e){if(isStorageError(_e))return{data:null,error:_e};throw _e}})}getBucket(_e){return __awaiter$5(this,void 0,void 0,function*(){try{return{data:yield get$1(this.fetch,`${this.url}/bucket/${_e}`,{headers:this.headers}),error:null}}catch($t){if(isStorageError($t))return{data:null,error:$t};throw $t}})}createBucket(_e,$t={public:!1}){return __awaiter$5(this,void 0,void 0,function*(){try{return{data:yield post(this.fetch,`${this.url}/bucket`,{id:_e,name:_e,public:$t.public,file_size_limit:$t.fileSizeLimit,allowed_mime_types:$t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(Ft){if(isStorageError(Ft))return{data:null,error:Ft};throw Ft}})}updateBucket(_e,$t){return __awaiter$5(this,void 0,void 0,function*(){try{return{data:yield put(this.fetch,`${this.url}/bucket/${_e}`,{id:_e,name:_e,public:$t.public,file_size_limit:$t.fileSizeLimit,allowed_mime_types:$t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(Ft){if(isStorageError(Ft))return{data:null,error:Ft};throw Ft}})}emptyBucket(_e){return __awaiter$5(this,void 0,void 0,function*(){try{return{data:yield post(this.fetch,`${this.url}/bucket/${_e}/empty`,{},{headers:this.headers}),error:null}}catch($t){if(isStorageError($t))return{data:null,error:$t};throw $t}})}deleteBucket(_e){return __awaiter$5(this,void 0,void 0,function*(){try{return{data:yield remove(this.fetch,`${this.url}/bucket/${_e}`,{},{headers:this.headers}),error:null}}catch($t){if(isStorageError($t))return{data:null,error:$t};throw $t}})}}class StorageClient extends StorageBucketApi{constructor(_e,$t={},Ft){super(_e,$t,Ft)}from(_e){return new StorageFileApi(this.url,this.headers,_e,this.fetch)}}const version$4="2.50.0";let JS_ENV="";typeof Deno<"u"?JS_ENV="deno":typeof document<"u"?JS_ENV="web":typeof navigator<"u"&&navigator.product==="ReactNative"?JS_ENV="react-native":JS_ENV="node";const DEFAULT_HEADERS$1={"X-Client-Info":`supabase-js-${JS_ENV}/${version$4}`},DEFAULT_GLOBAL_OPTIONS={headers:DEFAULT_HEADERS$1},DEFAULT_DB_OPTIONS={schema:"public"},DEFAULT_AUTH_OPTIONS={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},DEFAULT_REALTIME_OPTIONS={};var __awaiter$4=function(yt,_e,$t,Ft){function Vt(qt){return qt instanceof $t?qt:new $t(function(zt){zt(qt)})}return new($t||($t=Promise))(function(qt,zt){function Ht(Jt){try{Gt(Ft.next(Jt))}catch(Xt){zt(Xt)}}function Kt(Jt){try{Gt(Ft.throw(Jt))}catch(Xt){zt(Xt)}}function Gt(Jt){Jt.done?qt(Jt.value):Vt(Jt.value).then(Ht,Kt)}Gt((Ft=Ft.apply(yt,_e||[])).next())})};const resolveFetch$1=yt=>{let _e;return yt?_e=yt:typeof fetch>"u"?_e=nodeFetch:_e=fetch,(...$t)=>_e(...$t)},resolveHeadersConstructor=()=>typeof Headers>"u"?Headers$1:Headers,fetchWithAuth=(yt,_e,$t)=>{const Ft=resolveFetch$1($t),Vt=resolveHeadersConstructor();return(qt,zt)=>__awaiter$4(void 0,void 0,void 0,function*(){var Ht;const Kt=(Ht=yield _e())!==null&&Ht!==void 0?Ht:yt;let Gt=new Vt(zt==null?void 0:zt.headers);return Gt.has("apikey")||Gt.set("apikey",yt),Gt.has("Authorization")||Gt.set("Authorization",`Bearer ${Kt}`),Ft(qt,Object.assign(Object.assign({},zt),{headers:Gt}))})};var __awaiter$3=function(yt,_e,$t,Ft){function Vt(qt){return qt instanceof $t?qt:new $t(function(zt){zt(qt)})}return new($t||($t=Promise))(function(qt,zt){function Ht(Jt){try{Gt(Ft.next(Jt))}catch(Xt){zt(Xt)}}function Kt(Jt){try{Gt(Ft.throw(Jt))}catch(Xt){zt(Xt)}}function Gt(Jt){Jt.done?qt(Jt.value):Vt(Jt.value).then(Ht,Kt)}Gt((Ft=Ft.apply(yt,[])).next())})};function ensureTrailingSlash(yt){return yt.endsWith("/")?yt:yt+"/"}function applySettingDefaults(yt,_e){var $t,Ft;const{db:Vt,auth:qt,realtime:zt,global:Ht}=yt,{db:Kt,auth:Gt,realtime:Jt,global:Xt}=_e,Zt={db:Object.assign(Object.assign({},Kt),Vt),auth:Object.assign(Object.assign({},Gt),qt),realtime:Object.assign(Object.assign({},Jt),zt),global:Object.assign(Object.assign(Object.assign({}
246,Xt),Ht),{headers:Object.assign(Object.assign({},($t=Xt==null?void 0:Xt.headers)!==null&&$t!==void 0?$t:{}),(Ft=Ht==null?void 0:Ht.headers)!==null&&Ft!==void 0?Ft:{})}),accessToken:()=>__awaiter$3(this,void 0,void 0,function*(){return""})};return yt.accessToken?Zt.accessToken=yt.accessToken:delete Zt.accessToken,Zt}const version$3="2.70.0",AUTO_REFRESH_TICK_DURATION_MS=30*1e3,AUTO_REFRESH_TICK_THRESHOLD=3,EXPIRY_MARGIN_MS=AUTO_REFRESH_TICK_THRESHOLD*AUTO_REFRESH_TICK_DURATION_MS,GOTRUE_URL="http://localhost:9999",STORAGE_KEY="supabase.auth.token",DEFAULT_HEADERS={"X-Client-Info":`gotrue-js/${version$3}`},API_VERSION_HEADER_NAME="X-Supabase-Api-Version",API_VERSIONS={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},BASE64URL_REGEX=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,JWKS_TTL=6e5;class AuthError extends Error{constructor(_e,$t,Ft){super(_e),this.__isAuthError=!0,this.name="AuthError",this.status=$t,this.code=Ft}}function isAuthError(yt){return typeof yt=="object"&&yt!==null&&"__isAuthError"in yt}class AuthApiError extends AuthError{constructor(_e,$t,Ft){super(_e,$t,Ft),this.name="AuthApiError",this.status=$t,this.code=Ft}}function isAuthApiError(yt){return isAuthError(yt)&&yt.name==="AuthApiError"}class AuthUnknownError extends AuthError{constructor(_e,$t){super(_e),this.name="AuthUnknownError",this.originalError=$t}}class CustomAuthError extends AuthError{constructor(_e,$t,Ft,Vt){super(_e,Ft,Vt),this.name=$t,this.status=Ft}}class AuthSessionMissingError extends CustomAuthError{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function isAuthSessionMissingError(yt){return isAuthError(yt)&&yt.name==="AuthSessionMissingError"}
246class AuthInvalidTokenResponseError extends CustomAuthError{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class AuthInvalidCredentialsError extends CustomAuthError{constructor(_e){super(_e,"AuthInvalidCredentialsError",400,void 0)}}class AuthImplicitGrantRedirectError extends CustomAuthError{constructor(_e,$t=null){super(_e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=$t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function isAuthImplicitGrantRedirectError(yt){return isAuthError(yt)&&yt.name==="AuthImplicitGrantRedirectError"}class AuthPKCEGrantCodeExchangeError extends CustomAuthError{constructor(_e,$t=null){super(_e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=$t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class AuthRetryableFetchError extends CustomAuthError{constructor(_e,$t){super(_e,"AuthRetryableFetchError",$t,void 0)}}function isAuthRetryableFetchError(yt){return isAuthError(yt)&&yt.name==="AuthRetryableFetchError"}class AuthWeakPasswordError extends CustomAuthError{constructor(_e,$t,Ft){super(_e,"AuthWeakPasswordError",$t,"weak_password"),this.reasons=Ft}}class AuthInvalidJwtError extends CustomAuthError{constructor(_e){super(_e,"AuthInvalidJwtError",400,"invalid_jwt")}}const TO_BASE64URL="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),IGNORE_BASE64URL=` 247\r=`.split(""),FROM_BASE64URL=(()=>{const yt=new Array(128);for(let _e=0;_e<yt.length;_e+=1)yt[_e]=-1;for(let _e=0;_e<IGNORE_BASE64URL.length;_e+=1)yt[IGNORE_BASE64URL[_e].charCodeAt(0)]=-2;for(let _e=0;_e<TO_BASE64URL.length;_e+=1)yt[TO_BASE64URL[_e].charCodeAt(0)]=_e;return yt})();function byteToBase64URL(yt,_e,$t){if(yt!==null)for(_e.queue=_e.queue<<8|yt,_e.queuedBits+=8;_e.queuedBits>=6;){const Ft=_e.queue>>_e.queuedBits-6&63;$t(TO_BASE64URL[Ft]),_e.queuedBits-=6}else if(_e.queuedBits>0)for(_e.queue=_e.queue<<6-_e.queuedBits,_e.queuedBits=6;_e.queuedBits>=6;){const Ft=_e.queue>>_e.queuedBits-6&63;$t(TO_BASE64URL[Ft]),_e.queuedBits-=6}}function byteFromBase64URL(yt,_e,$t){const Ft=FROM_BASE64URL[yt];if(Ft>-1)for(_e.queue=_e.queue<<6|Ft,_e.queuedBits+=6;_e.queuedBits>=8;)$t(_e.queue>>_e.queuedBits-8&255),_e.queuedBits-=8;else{if(Ft===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(yt)}"`)}}function stringFromBase64URL(yt){const _e=[],$t=zt=>{_e.push(String.fromCodePoint(zt))},Ft={utf8seq:0,codepoint:0},Vt={queue:0,queuedBits:0},qt=zt=>{stringFromUTF8(zt,Ft,$t)};for(let zt=0;zt<yt.length;zt+=1)byteFromBase64URL(yt.charCodeAt(zt),Vt,qt);return _e.join("")}function codepointToUTF8(yt,_e){if(yt<=127){_e(yt);return}else if(yt<=2047){_e(192|yt>>6),_e(128|yt&63);return}else if(yt<=65535){_e(224|yt>>12),_e(128|yt>>6&63),_e(128|yt&63);return}else if(yt<=1114111){_e(240|yt>>18),_e(128|yt>>12&63),_e(128|yt>>6&63),_e(128|yt&63);return}throw new Error(`Unrecognized Unicode codepoint: ${yt.toString(16)}`)}function stringToUTF8(yt,_e){for(let $t=0;$t<yt.length;$t+=1){let Ft=yt.charCodeAt($t);if(Ft>55295&&Ft<=56319){const Vt=(Ft-55296)*1024&65535;Ft=(yt.charCodeAt($t+1)-56320&65535|Vt)+65536,$t+=1}codepointToUTF8(Ft,_e)}}function stringFromUTF8(yt,_e,$t){if(_e.utf8seq===0){if(yt<=127){$t(yt);return}for(let Ft=1;Ft<6;Ft+=1)if(!(yt>>7-Ft&1)){_e.utf8seq=Ft;break}if(_e.utf8seq===2)_e.codepoint=yt&31;else if(_e.utf8seq===3)_e.codepoint=yt&15;else if(_e.utf8seq===4)_e.codepoint=yt&7;else throw new Error("Invalid UTF-8 sequence");_e.utf8seq-=1}else if(_e.utf8seq>0){if(yt<=127)throw new Error("Invalid UTF-8 sequence");_e.codepoint=_e.codepoint<<6|yt&63,_e.utf8seq-=1,_e.utf8seq===0&&$t(_e.codepoint)}}function base64UrlToUint8Array(yt){const _e=[],$t={queue:0,queuedBits:0},Ft=Vt=>{_e.push(Vt)};for(let Vt=0;Vt<yt.length;Vt+=1)byteFromBase64URL(yt.charCodeAt(Vt),$t,Ft);return new Uint8Array(_e)}function stringToUint8Array(yt){const _e=[];return stringToUTF8(yt,$t=>_e.push($t)),new Uint8Array(_e)}function bytesToBase64URL(yt){const _e=[],$t={queue:0,queuedBits:0},Ft=Vt=>{_e.push(Vt)};return yt.forEach(Vt=>byteToBase64URL(Vt,$t,Ft)),byteToBase64URL(null,$t,Ft),_e.join("")}function expiresAt(yt){return Math.round(Date.now()/1e3)+yt}function uuid$1(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(yt){const _e=Math.random()*16|0;return(yt=="x"?_e:_e&3|8).toString(16)})}const isBrowser$3=()=>typeof window<"u"&&typeof document<"u",localStorageWriteTests={tested:!1,writable:!1},supportsLocalStorage=()=>{if(!isBrowser$3())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(localStorageWriteTests.tested)return localStorageWriteTests.writable;const yt=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(yt,yt),globalThis.localStorage.removeItem(yt),localStorageWriteTests.tested=!0,localStorageWriteTests.writable=!0}catch{localStorageWriteTests.tested=!0,localStorageWriteTests.writable=!1}return localStorageWriteTests.writable};function parseParametersFromURL(yt){const _e={}
247,$t=new URL(yt);if($t.hash&&$t.hash[0]==="#")try{new URLSearchParams($t.hash.substring(1)).forEach((Vt,qt)=>{_e[qt]=Vt})}catch{}return $t.searchParams.forEach((Ft,Vt)=>{_e[Vt]=Ft}),_e}const resolveFetch=yt=>{let _e;return yt?_e=yt:typeof fetch>"u"?_e=(...$t)=>__vitePreload(async()=>{const{default:Ft}=await Promise.resolve().then(()=>browser$d);return{default:Ft}},void 0).then(({default:Ft})=>Ft(...$t)):_e=fetch,(...$t)=>_e(...$t)},looksLikeFetchResponse=yt=>typeof yt=="object"&&yt!==null&&"status"in yt&&"ok"in yt&&"json"in yt&&typeof yt.json=="function",setItemAsync=async(yt,_e,$t)=>{await yt.setItem(_e,JSON.stringify($t))},getItemAsync=async(yt,_e)=>{const $t=await yt.getItem(_e);if(!$t)return null;try{return JSON.parse($t)}catch{return $t}},removeItemAsync=async(yt,_e)=>{await yt.removeItem(_e)};class Deferred{constructor(){this.promise=new Deferred.promiseConstructor((_e,$t)=>{this.resolve=_e,this.reject=$t})}}Deferred.promiseConstructor=Promise;function decodeJWT(yt){const _e=yt.split(".");if(_e.length!==3)throw new AuthInvalidJwtError("Invalid JWT structure");for(let Ft=0;Ft<_e.length;Ft++)if(!BASE64URL_REGEX.test(_e[Ft]))throw new AuthInvalidJwtError("JWT not in base64url format");return{header:JSON.parse(stringFromBase64URL(_e[0])),payload:JSON.parse(stringFromBase64URL(_e[1])),signature:base64UrlToUint8Array(_e[2]),raw:{header:_e[0],payload:_e[1]}}}async function sleep(yt){return await new Promise(_e=>{setTimeout(()=>_e(null),yt)})}function retryable(yt,_e){return new Promise((Ft,Vt)=>{(async()=>{for(let qt=0;qt<1/0;qt++)try{const zt=await yt(qt);if(!_e(qt,null,zt)){Ft(zt);return}}catch(zt){if(!_e(qt,zt)){Vt(zt);return}}})()})}function dec2hex(yt){return("0"+yt.toString(16)).substr(-2)}function generatePKCEVerifier(){const _e=new Uint32Array(56);if(typeof crypto>"u"){const $t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",Ft=$t.length;let Vt="";for(let qt=0;qt<56;qt++)Vt+=$t.charAt(Math.floor(Math.random()*Ft));return Vt}return crypto.getRandomValues(_e),Array.from(_e,dec2hex).join("")}async function sha256$2(yt){const $t=new TextEncoder().encode(yt),Ft=await crypto.subtle.digest("SHA-256",$t),Vt=new Uint8Array(Ft);return Array.from(Vt).map(qt=>String.fromCharCode(qt)).join("")}async function generatePKCEChallenge(yt){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),yt;const $t=await sha256$2(yt);return btoa($t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function getCodeChallengeAndMethod(yt,_e,$t=!1){const Ft=generatePKCEVerifier();let Vt=Ft;$t&&(Vt+="/PASSWORD_RECOVERY"),await setItemAsync(yt,`${_e}-code-verifier`,Vt);const qt=await generatePKCEChallenge(Ft);return[qt,Ft===qt?"plain":"s256"]}const API_VERSION_REGEX=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function parseResponseAPIVersion(yt){const _e=yt.headers.get(API_VERSION_HEADER_NAME);if(!_e||!_e.match(API_VERSION_REGEX))return null;try{return new Date(`${_e}T00:00:00.0Z`)}catch{return null}}function validateExp(yt){if(!yt)throw new Error("Missing exp claim");const _e=Math.floor(Date.now()/1e3);if(yt<=_e)throw new Error("JWT has expired")}function getAlgorithm(yt){switch(yt){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const UUID_REGEX=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function validateUUID(yt){if(!UUID_REGEX.test(yt))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}var __rest$3=function(yt,_e){var $t={};for(var Ft in yt)Object.prototype.hasOwnProperty.call(yt,Ft)&&_e.indexOf(Ft)<0&&($t[Ft]=yt[Ft]);if(yt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Vt=0,Ft=Object.getOwnPropertySymbols(yt);Vt<Ft.length;Vt++)_e.indexOf(Ft[Vt])<0&&Object.prototype.propertyIsEnumerable.call(yt,Ft[Vt])&&($t[Ft[Vt]]=yt[Ft[Vt]]);return $t};const _getErrorMessage=yt=>yt.msg||yt.message||yt.error_description||yt.error||JSON.stringify(yt),NETWORK_E
247RROR_CODES=[502,503,504];async function handleError(yt){var _e;if(!looksLikeFetchResponse(yt))throw new AuthRetryableFetchError(_getErrorMessage(yt),0);if(NETWORK_ERROR_CODES.includes(yt.status))throw new AuthRetryableFetchError(_getErrorMessage(yt),yt.status);let $t;try{$t=await yt.json()}catch(qt){throw new AuthUnknownError(_getErrorMessage(qt),qt)}let Ft;const Vt=parseResponseAPIVersion(yt);if(Vt&&Vt.getTime()>=API_VERSIONS["2024-01-01"].timestamp&&typeof $t=="object"&&$t&&typeof $t.code=="string"?Ft=$t.code:typeof $t=="object"&&$t&&typeof $t.error_code=="string"&&(Ft=$t.error_code),Ft){if(Ft==="weak_password")throw new AuthWeakPasswordError(_getErrorMessage($t),yt.status,((_e=$t.weak_password)===null||_e===void 0?void 0:_e.reasons)||[]);if(Ft==="session_not_found")throw new AuthSessionMissingError}else if(typeof $t=="object"&&$t&&typeof $t.weak_password=="object"&&$t.weak_password&&Array.isArray($t.weak_password.reasons)&&$t.weak_password.reasons.length&&$t.weak_password.reasons.reduce((qt,zt)=>qt&&typeof zt=="string",!0))throw new AuthWeakPasswordError(_getErrorMessage($t),yt.status,$t.weak_password.reasons);throw new AuthApiError(_getErrorMessage($t),yt.status||500,Ft)}
247const _getRequestParams=(yt,_e,$t,Ft)=>{const Vt={method:yt,headers:(_e==null?void 0:_e.headers)||{}};return yt==="GET"?Vt:(Vt.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},_e==null?void 0:_e.headers),Vt.body=JSON.stringify(Ft),Object.assign(Object.assign({},Vt),$t))};async function _request(yt,_e,$t,Ft){var Vt;const qt=Object.assign({},Ft==null?void 0:Ft.headers);qt[API_VERSION_HEADER_NAME]||(qt[API_VERSION_HEADER_NAME]=API_VERSIONS["2024-01-01"].name),Ft!=null&&Ft.jwt&&(qt.Authorization=`Bearer ${Ft.jwt}`);const zt=(Vt=Ft==null?void 0:Ft.query)!==null&&Vt!==void 0?Vt:{};Ft!=null&&Ft.redirectTo&&(zt.redirect_to=Ft.redirectTo);const Ht=Object.keys(zt).length?"?"+new URLSearchParams(zt).toString():"",Kt=await _handleRequest(yt,_e,$t+Ht,{headers:qt,noResolveJson:Ft==null?void 0:Ft.noResolveJson},{},Ft==null?void 0:Ft.body);return Ft!=null&&Ft.xform?Ft==null?void 0:Ft.xform(Kt):{data:Object.assign({},Kt),error:null}}async function _handleRequest(yt,_e,$t,Ft,Vt,qt){const zt=_getRequestParams(_e,Ft,Vt,qt);let Ht;try{Ht=await yt($t,Object.assign({},zt))}catch(Kt){throw console.error(Kt),new AuthRetryableFetchError(_getErrorMessage(Kt),0)}if(Ht.ok||await handleError(Ht),Ft!=null&&Ft.noResolveJson)return Ht;try{return await Ht.json()}catch(Kt){await handleError(Kt)}}function _sessionResponse(yt){var _e;let $t=null;hasSession(yt)&&($t=Object.assign({},yt),yt.expires_at||($t.expires_at=expiresAt(yt.expires_in)));const Ft=(_e=yt.user)!==null&&_e!==void 0?_e:yt;return{data:{session:$t,user:Ft},error:null}}function _sessionResponsePassword(yt){const _e=_sessionResponse(yt);return!_e.error&&yt.weak_password&&typeof yt.weak_password=="object"&&Array.isArray(yt.weak_password.reasons)&&yt.weak_password.reasons.length&&yt.weak_password.message&&typeof yt.weak_password.message=="string"&&yt.weak_password.reasons.reduce(($t,Ft)=>$t&&typeof Ft=="string",!0)&&(_e.data.weak_password=yt.weak_password),_e}function _userResponse(yt){var _e;return{data:{user:(_e=yt.user)!==null&&_e!==void 0?_e:yt},error:null}}function _ssoResponse(yt){return{data:yt,error:null}}function _generateLinkResponse(yt){const{action_link:_e,email_otp:$t,hashed_token:Ft,redirect_to:Vt,verification_type:qt}=yt,zt=__rest$3(yt,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),Ht={action_link:_e,email_otp:$t,hashed_token:Ft,redirect_to:Vt,verification_type:qt},Kt=Object.assign({},zt);return{data:{properties:Ht,user:Kt},error:null}}function _noResolveJsonResponse(yt){return yt}function hasSession(yt){return yt.access_token&&yt.refresh_token&&yt.expires_in}const SIGN_OUT_SCOPES=["global","local","others"];var __rest$2=function(yt,_e){var $t={};for(var Ft in yt)Object.prototype.hasOwnProperty.call(yt,Ft)&&_e.indexOf(Ft)<0&&($t[Ft]=yt[Ft]);if(yt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Vt=0,Ft=Object.getOwnPropertySymbols(yt);Vt<Ft.length;Vt++)_e.indexOf(Ft[Vt])<0&&Object.prototype.propertyIsEnumerable.call(yt,Ft[Vt])&&($t[Ft[Vt]]=yt[Ft[Vt]]);return $t};class GoTrueAdminApi{constructor({url:_e="",headers:$t={},fetch:Ft}){this.url=_e,this.headers=$t,this.fetch=resolveFetch(Ft),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(_e,$t=SIGN_OUT_SCOPES[0]){if(SIGN_OUT_SCOPES.indexOf($t)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${SIGN_OUT_SCOPES.join(", ")}`);try{return await _request(this.fetch,"POST",`${this.url}/logout?scope=${$t}`,{headers:this.headers,jwt:_e,noResolveJson:!0}),{data:null,error:null}}catch(Ft){if(isAuthError(Ft))return{data:null,error:Ft};throw Ft}}async inviteUserByEmail(_e,$t={}){try{return await _request(this.fetch,"POST",`${this.url}/invite`,{body:{email:_e,data:$t.data},headers:this.headers,redirectTo:$t.redirectTo,xform:_userResponse})}catch(Ft){if(isAuthError(Ft))return{data:{user:null},error:Ft};throw Ft}}async generateLink(_e){try{const{options:$t}=_e,Ft=__rest$2(_e,["options"]),Vt=Object.assign(Object.assign({},Ft),$t);return"newEmail"in Ft&&(Vt.new_email=Ft==null?void 0:Ft.newEmail,delete Vt.newEmail),await _request(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:Vt,headers:this.headers,xform:_generateLinkResponse,redirectTo:$t==null?void 0:$t.redirectTo})}catch($t){if(isAuthError($t))return{data:{properties:null,user:null},error:$t};throw $t}}async createUser(_e){try{return await _request(this.fetch,"POST",`${this.url}/admin/users`,{body:_e,headers:this.headers,xform:_userResponse})}catch($t){if(isAuthError($t))return{data:{user:null},error:$t};throw $t}}async listUsers(_e){var $t,Ft,Vt,qt,zt,Ht,Kt;try{const Gt={nextPage:null,lastPage:0,total:0},Jt=await _request(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(Ft=($t=_e==null?void 0:_e.page)===null||$t===void 0?void 0:$t.toString())!==null&&Ft!==void 0?Ft:"",per_page:(qt=(Vt=_e==null?void 0:_e.perPage)===null||Vt===void 0?void 0:Vt.toString())!==null&&qt!==void 0?qt:""}
247,xform:_noResolveJsonResponse});if(Jt.error)throw Jt.error;const Xt=await Jt.json(),Zt=(zt=Jt.headers.get("x-total-count"))!==null&&zt!==void 0?zt:0,er=(Kt=(Ht=Jt.headers.get("link"))===null||Ht===void 0?void 0:Ht.split(","))!==null&&Kt!==void 0?Kt:[];return er.length>0&&(er.forEach(tr=>{const rr=parseInt(tr.split(";")[0].split("=")[1].substring(0,1)),ar=JSON.parse(tr.split(";")[1].split("=")[1]);Gt[`${ar}Page`]=rr}),Gt.total=parseInt(Zt)),{data:Object.assign(Object.assign({},Xt),Gt),error:null}}catch(Gt){if(isAuthError(Gt))return{data:{users:[]},error:Gt};throw Gt}}async getUserById(_e){validateUUID(_e);try{return await _request(this.fetch,"GET",`${this.url}/admin/users/${_e}`,{headers:this.headers,xform:_userResponse})}catch($t){if(isAuthError($t))return{data:{user:null},error:$t};throw $t}}async updateUserById(_e,$t){validateUUID(_e);try{return await _request(this.fetch,"PUT",`${this.url}/admin/users/${_e}`,{body:$t,headers:this.headers,xform:_userResponse})}catch(Ft){if(isAuthError(Ft))return{data:{user:null},error:Ft};throw Ft}}async deleteUser(_e,$t=!1){validateUUID(_e);try{return await _request(this.fetch,"DELETE",`${this.url}/admin/users/${_e}`,{headers:this.headers,body:{should_soft_delete:$t},xform:_userResponse})}catch(Ft){if(isAuthError(Ft))return{data:{user:null},error:Ft};throw Ft}}async _listFactors(_e){validateUUID(_e.userId);try{const{data:$t,error:Ft}=await _request(this.fetch,"GET",`${this.url}/admin/users/${_e.userId}/factors`,{headers:this.headers,xform:Vt=>({data:{factors:Vt},error:null})});return{data:$t,error:Ft}}catch($t){if(isAuthError($t))return{data:null,error:$t};throw $t}}async _deleteFactor(_e){validateUUID(_e.userId),validateUUID(_e.id);try{return{data:await _request(this.fetch,"DELETE",`${this.url}/admin/users/${_e.userId}/factors/${_e.id}`,{headers:this.headers}),error:null}}catch($t){if(isAuthError($t))return{data:null,error:$t};throw $t}}}const localStorageAdapter={getItem:yt=>supportsLocalStorage()?globalThis.localStorage.getItem(yt):null,setItem:(yt,_e)=>{supportsLocalStorage()&&globalThis.localStorage.setItem(yt,_e)},removeItem:yt=>{supportsLocalStorage()&&globalThis.localStorage.removeItem(yt)}};function memoryLocalStorageAdapter(yt={}){return{getItem:_e=>yt[_e]||null,setItem:(_e,$t)=>{yt[_e]=$t},removeItem:_e=>{delete yt[_e]}}}function polyfillGlobalThis(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const internals={debug:!!(globalThis&&supportsLocalStorage()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class LockAcquireTimeoutError extends Error{constructor(_e){super(_e),this.isAcquireTimeout=!0}}class NavigatorLockAcquireTimeoutError extends LockAcquireTimeoutError{}async function navigatorLock(yt,_e,$t){internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",yt,_e);const Ft=new globalThis.AbortController;return _e>0&&setTimeout(()=>{Ft.abort(),internals.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",yt)},_e),await Promise.resolve().then(()=>globalThis.navigator.locks.request(yt,_e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:Ft.signal},async Vt=>{if(Vt){internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",yt,Vt.name);try{return await $t()}finally{internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",yt,Vt.name)}}else{if(_e===0)throw internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",yt),new NavigatorLockAcquireTimeoutError(`Acquiring an exclusive Navigator LockManager lock "${yt}" immediately failed`);if(internals.debug)try{const qt=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(qt,null," "))}catch(qt){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",qt)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await $t()}}))}polyfillGlobalThis();const DEFAULT_OPTIONS={url:GOTRUE_URL,storageKey:STORAGE_KEY,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:DEFAULT_HEADERS,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function lockNoOp(yt,_e,$t){return await $t()}class GoTrueClient{constructor(_e){var $t,Ft;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=GoTrueClient.nextInstanceID,GoTrueClient.nextInstanceID+=1,this.instanceID>0&&isBrowser$3()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const Vt=Object.assign(Object.assign({},DEFAULT_OPTIONS),_e);if(this.logDebugMessages=!!Vt.debug,typeof Vt.debug=="function"&&(this.logger=Vt.debug),this.persistSession=Vt.persistSession,this.storageKey=Vt.storageKey,this.autoRefreshToken=Vt.autoRefreshToken,this.admin=new GoTrueAdminApi({url:Vt.url,headers:Vt.headers,fetch:Vt.fetch}),this.url=Vt.url,this.headers=Vt.headers,this.fetch=resolveFetch(Vt.fetch),this.lock=Vt.lock||lockNoOp,this.detectSessionInUrl=Vt.detectSessionInUrl,this.flowType=Vt.flowType,this.hasCustomAuthorizationHeader=Vt.hasCustomAuthorizationHeader,Vt.lock?this.lock=Vt.lock:isBrowser$3()&&
247(!(($t=globalThis==null?void 0:globalThis.navigator)===null||$t===void 0)&&$t.locks)?this.lock=navigatorLock:this.lock=lockNoOp,this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?Vt.storage?this.storage=Vt.storage:supportsLocalStorage()?this.storage=localStorageAdapter:(this.memoryStorage={},this.storage=memoryLocalStorageAdapter(this.memoryStorage)):(this.memoryStorage={},this.storage=memoryLocalStorageAdapter(this.memoryStorage)),isBrowser$3()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(qt){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",qt)}(Ft=this.broadcastChannel)===null||Ft===void 0||Ft.addEventListener("message",async qt=>{this._debug("received broadcast notification from other tab or client",qt),await this._notifyAllSubscribers(qt.data.event,qt.data.session,!1)})}this.initialize()}_debug(..._e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${version$3}) ${new Date().toISOString()}`,..._e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var _e;try{const $t=parseParametersFromURL(window.location.href);let Ft="none";if(this._isImplicitGrantCallback($t)?Ft="implicit":await this._isPKCECallback($t)&&(Ft="pkce"),isBrowser$3()&&this.detectSessionInUrl&&Ft!=="none"){const{data:Vt,error:qt}=await this._getSessionFromURL($t,Ft);if(qt){if(this._debug("#_initialize()","error detecting session from URL",qt),isAuthImplicitGrantRedirectError(qt)){const Kt=(_e=qt.details)===null||_e===void 0?void 0:_e.code;if(Kt==="identity_already_exists"||Kt==="identity_not_found"||Kt==="single_identity_not_deletable")return{error:qt}}return await this._removeSession(),{error:qt}}const{session:zt,redirectType:Ht}=Vt;return this._debug("#_initialize()","detected session in URL",zt,"redirect type",Ht),await this._saveSession(zt),setTimeout(async()=>{Ht==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",zt):await this._notifyAllSubscribers("SIGNED_IN",zt)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch($t){return isAuthError($t)?{error:$t}:{error:new AuthUnknownError("Unexpected error during initialization",$t)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(_e){var $t,Ft,Vt;try{const qt=await _request(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(Ft=($t=_e==null?void 0:_e.options)===null||$t===void 0?void 0:$t.data)!==null&&Ft!==void 0?Ft:{},gotrue_meta_security:{captcha_token:(Vt=_e==null?void 0:_e.options)===null||Vt===void 0?void 0:Vt.captchaToken}},xform:_sessionResponse}),{data:zt,error:Ht}=qt;if(Ht||!zt)return{data:{user:null,session:null},error:Ht};const Kt=zt.session,Gt=zt.user;return zt.session&&(await this._saveSession(zt.session),await this._notifyAllSubscribers("SIGNED_IN",Kt)),{data:{user:Gt,session:Kt},error:null}}catch(qt){if(isAuthError(qt))return{data:{user:null,session:null},error:qt};throw qt}}async signUp(_e){var $t,Ft,Vt;try{let qt;if("email"in _e){const{email:Jt,password:Xt,options:Zt}=_e;let er=null,tr=null;this.flowType==="pkce"&&([er,tr]=await getCodeChallengeAndMethod(this.storage,this.storageKey)),qt=await _request(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:Zt==null?void 0:Zt.emailRedirectTo,body:{email:Jt,password:Xt,data:($t=Zt==null?void 0:Zt.data)!==null&&$t!==void 0?$t:{},gotrue_meta_security:{captcha_token:Zt==null?void 0:Zt.captchaToken},code_challenge:er,code_challenge_method:tr},xform:_sessionResponse})}else if("phone"in _e){const{phone:Jt,password:Xt,options:Zt}=_e;qt=await _request(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:Jt,password:Xt,data:(Ft=Zt==null?void 0:Zt.data)!==null&&Ft!==void 0?Ft:{},channel:(Vt=Zt==null?void 0:Zt.channel)!==null&&Vt!==void 0?Vt:"sms",gotrue_meta_security:{captcha_token:Zt==null?void 0:Zt.captchaToken}},xform:_sessionResponse})}else throw new AuthInvalidCredentialsError("You must provide either an email or phone number and a password");const{data:zt,error:Ht}=qt;if(Ht||!zt)return{data:{user:null,session:null},error:Ht};const Kt=zt.session,Gt=zt.user;return zt.session&&(await this._saveSession(zt.session),await this._notifyAllSubscribers("SIGNED_IN",Kt)),{data:{user:Gt,session:Kt},error:null}}catch(qt){if(isAuthError(qt))return{data:{user:null,session:null},error:qt};throw qt}}async signInWithPassword(_e){try{let $t;if("email"in _e){const{email:qt,password:zt,options:Ht}=_e;$t=await _request(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:qt,password:zt,gotrue_meta_security:{captcha_token:Ht==null?void 0:Ht.captchaToken}},xform:_sessionResponsePassword})}else if("phone"in _e){const{phone:qt,password:zt,options:Ht}=_e;$t=await _request(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:qt,password:zt,gotrue_meta_security:{captcha_token:Ht==null?void 0:Ht.captchaToken}},xform:_sessionResponsePassword})}else throw new AuthInvalidCredentialsError("You must provide either an email or phone number and a password");const{data:Ft,error:Vt}=$t;return Vt?{data:{user:null,session:null},error:Vt}:!Ft||!Ft.session||!Ft.user?{data:{user:null,session:null}
247,error:new AuthInvalidTokenResponseError}:(Ft.session&&(await this._saveSession(Ft.session),await this._notifyAllSubscribers("SIGNED_IN",Ft.session)),{data:Object.assign({user:Ft.user,session:Ft.session},Ft.weak_password?{weakPassword:Ft.weak_password}:null),error:Vt})}catch($t){if(isAuthError($t))return{data:{user:null,session:null},error:$t};throw $t}}async signInWithOAuth(_e){var $t,Ft,Vt,qt;return await this._handleProviderSignIn(_e.provider,{redirectTo:($t=_e.options)===null||$t===void 0?void 0:$t.redirectTo,scopes:(Ft=_e.options)===null||Ft===void 0?void 0:Ft.scopes,queryParams:(Vt=_e.options)===null||Vt===void 0?void 0:Vt.queryParams,skipBrowserRedirect:(qt=_e.options)===null||qt===void 0?void 0:qt.skipBrowserRedirect})}async exchangeCodeForSession(_e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(_e))}async signInWithWeb3(_e){const{chain:$t}=_e;if($t==="solana")return await this.signInWithSolana(_e);throw new Error(`@supabase/auth-js: Unsupported chain "${$t}"`)}async signInWithSolana(_e){var $t,Ft,Vt,qt,zt,Ht,Kt,Gt,Jt,Xt,Zt,er;let tr,rr;if("message"in _e)tr=_e.message,rr=_e.signature;else{const{chain:ar,wallet:nr,statement:cr,options:fr}=_e;let vr;if(isBrowser$3())if(typeof nr=="object")vr=nr;else{const Sr=window;if("solana"in Sr&&typeof Sr.solana=="object"&&("signIn"in Sr.solana&&typeof Sr.solana.signIn=="function"||"signMessage"in Sr.solana&&typeof Sr.solana.signMessage=="function"))vr=Sr.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof nr!="object"||!(fr!=null&&fr.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");vr=nr}const xr=new URL(($t=fr==null?void 0:fr.url)!==null&&$t!==void 0?$t:window.location.href);if("signIn"in vr&&vr.signIn){const Sr=await vr.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},fr==null?void 0:fr.signInWithSolana),{version:"1",domain:xr.host,uri:xr.href}),cr?{statement:cr}:null));let Tr;if(Array.isArray(Sr)&&Sr[0]&&typeof Sr[0]=="object")Tr=Sr[0];else if(Sr&&typeof Sr=="object"&&"signedMessage"in Sr&&"signature"in Sr)Tr=Sr;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in Tr&&"signature"in Tr&&(typeof Tr.signedMessage=="string"||Tr.signedMessage instanceof Uint8Array)&&Tr.signature instanceof Uint8Array)tr=typeof Tr.signedMessage=="string"?Tr.signedMessage:new TextDecoder().decode(Tr.signedMessage),rr=Tr.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in vr)||typeof vr.signMessage!="function"||!("publicKey"in vr)||typeof vr!="object"||!vr.publicKey||!("toBase58"in vr.publicKey)||typeof vr.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");tr=[`${xr.host} wants you to sign in with your Solana account:`,vr.publicKey.toBase58(),...cr?["",cr,""]:[""],"Version: 1",`URI: ${xr.href}`,`Issued At: ${(Vt=(Ft=fr==null?void 0:fr.signInWithSolana)===null||Ft===void 0?void 0:Ft.issuedAt)!==null&&Vt!==void 0?Vt:new Date().toISOString()}`,...!((qt=fr==null?void 0:fr.signInWithSolana)===null||qt===void 0)&&qt.notBefore?[`Not Before: ${fr.signInWithSolana.notBefore}`]:[],...!((zt=fr==null?void 0:fr.signInWithSolana)===null||zt===void 0)&&zt.expirationTime?[`Expiration Time: ${fr.signInWithSolana.expirationTime}`]:[],...!((Ht=fr==null?void 0:fr.signInWithSolana)===null||Ht===void 0)&&Ht.chainId?[`Chain ID: ${fr.signInWithSolana.chainId}`]:[],...!((Kt=fr==null?void 0:fr.signInWithSolana)===null||Kt===void 0)&&Kt.nonce?[`Nonce: ${fr.signInWithSolana.nonce}`]:[],...!((Gt=fr==null?void 0:fr.signInWithSolana)===null||Gt===void 0)&&Gt.requestId?[`Request ID: ${fr.signInWithSolana.requestId}`]:[],...!((Xt=(Jt=fr==null?void 0:fr.signInWithSolana)===null||Jt===void 0?void 0:Jt.resources)===null||Xt===void 0)&&Xt.length?["Resources",...fr.signInWithSolana.resources.map(Tr=>`- ${Tr}`)]:[]].join(` 248`);const Sr=await vr.signMessage(new TextEncoder().encode(tr),"utf8");if(!Sr||!(Sr instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");rr=Sr}}try{const{data:ar,error:nr}=await _request(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:tr,signature:bytesToBase64URL(rr)},!((Zt=_e.options)===null||Zt===void 0)&&Zt.captchaToken?{gotrue_meta_security:{captcha_token:(er=_e.options)===null||er===void 0?void 0:er.captchaToken}}:null),xform:_sessionResponse});if(nr)throw nr;return!ar||!ar.session||!ar.user?{data:{user:null,session:null}
248,error:new AuthInvalidTokenResponseError}:(ar.session&&(await this._saveSession(ar.session),await this._notifyAllSubscribers("SIGNED_IN",ar.session)),{data:Object.assign({},ar),error:nr})}catch(ar){if(isAuthError(ar))return{data:{user:null,session:null},error:ar};throw ar}}async _exchangeCodeForSession(_e){const $t=await getItemAsync(this.storage,`${this.storageKey}-code-verifier`),[Ft,Vt]=($t??"").split("/");try{const{data:qt,error:zt}=await _request(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:_e,code_verifier:Ft},xform:_sessionResponse});if(await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),zt)throw zt;return!qt||!qt.session||!qt.user?{data:{user:null,session:null,redirectType:null},error:new AuthInvalidTokenResponseError}:(qt.session&&(await this._saveSession(qt.session),await this._notifyAllSubscribers("SIGNED_IN",qt.session)),{data:Object.assign(Object.assign({},qt),{redirectType:Vt??null}),error:zt})}catch(qt){if(isAuthError(qt))return{data:{user:null,session:null,redirectType:null},error:qt};throw qt}}async signInWithIdToken(_e){try{const{options:$t,provider:Ft,token:Vt,access_token:qt,nonce:zt}=_e,Ht=await _request(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:Ft,id_token:Vt,access_token:qt,nonce:zt,gotrue_meta_security:{captcha_token:$t==null?void 0:$t.captchaToken}},xform:_sessionResponse}),{data:Kt,error:Gt}=Ht;return Gt?{data:{user:null,session:null},error:Gt}:!Kt||!Kt.session||!Kt.user?{data:{user:null,session:null}
248,error:new AuthInvalidTokenResponseError}:(Kt.session&&(await this._saveSession(Kt.session),await this._notifyAllSubscribers("SIGNED_IN",Kt.session)),{data:Kt,error:Gt})}catch($t){if(isAuthError($t))return{data:{user:null,session:null},error:$t};throw $t}}async signInWithOtp(_e){var $t,Ft,Vt,qt,zt;try{if("email"in _e){const{email:Ht,options:Kt}=_e;let Gt=null,Jt=null;this.flowType==="pkce"&&([Gt,Jt]=await getCodeChallengeAndMethod(this.storage,this.storageKey));const{error:Xt}=await _request(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:Ht,data:($t=Kt==null?void 0:Kt.data)!==null&&$t!==void 0?$t:{},create_user:(Ft=Kt==null?void 0:Kt.shouldCreateUser)!==null&&Ft!==void 0?Ft:!0,gotrue_meta_security:{captcha_token:Kt==null?void 0:Kt.captchaToken},code_challenge:Gt,code_challenge_method:Jt},redirectTo:Kt==null?void 0:Kt.emailRedirectTo});return{data:{user:null,session:null},error:Xt}}if("phone"in _e){const{phone:Ht,options:Kt}=_e,{data:Gt,error:Jt}=await _request(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:Ht,data:(Vt=Kt==null?void 0:Kt.data)!==null&&Vt!==void 0?Vt:{},create_user:(qt=Kt==null?void 0:Kt.shouldCreateUser)!==null&&qt!==void 0?qt:!0,gotrue_meta_security:{captcha_token:Kt==null?void 0:Kt.captchaToken},channel:(zt=Kt==null?void 0:Kt.channel)!==null&&zt!==void 0?zt:"sms"}});return{data:{user:null,session:null,messageId:Gt==null?void 0:Gt.message_id},error:Jt}}throw new AuthInvalidCredentialsError("You must provide either an email or phone number.")}catch(Ht){if(isAuthError(Ht))return{data:{user:null,session:null},error:Ht};throw Ht}}async verifyOtp(_e){var $t,Ft;try{let Vt,qt;"options"in _e&&(Vt=($t=_e.options)===null||$t===void 0?void 0:$t.redirectTo,qt=(Ft=_e.options)===null||Ft===void 0?void 0:Ft.captchaToken);const{data:zt,error:Ht}=await _request(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},_e),{gotrue_meta_security:{captcha_token:qt}}),redirectTo:Vt,xform:_sessionResponse});if(Ht)throw Ht;if(!zt)throw new Error("An error occurred on token verification.");const Kt=zt.session,Gt=zt.user;return Kt!=null&&Kt.access_token&&(await this._saveSession(Kt),await this._notifyAllSubscribers(_e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",Kt)),{data:{user:Gt,session:Kt},error:null}}catch(Vt){if(isAuthError(Vt))return{data:{user:null,session:null},error:Vt};throw Vt}}async signInWithSSO(_e){var $t,Ft,Vt;try{let qt=null,zt=null;return this.flowType==="pkce"&&([qt,zt]=await getCodeChallengeAndMethod(this.storage,this.storageKey)),await _request(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in _e?{provider_id:_e.providerId}:null),"domain"in _e?{domain:_e.domain}:null),{redirect_to:(Ft=($t=_e.options)===null||$t===void 0?void 0:$t.redirectTo)!==null&&Ft!==void 0?Ft:void 0}),!((Vt=_e==null?void 0:_e.options)===null||Vt===void 0)&&Vt.captchaToken?{gotrue_meta_security:{captcha_token:_e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:qt,code_challenge_method:zt}),headers:this.headers,xform:_ssoResponse})}catch(qt){if(isAuthError(qt))return{data:null,error:qt};throw qt}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async _e=>{const{data:{session:$t},error:Ft}=_e;if(Ft)throw Ft;if(!$t)throw new AuthSessionMissingError;const{error:Vt}=await _request(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:$t.access_token});return{data:{user:null,session:null},error:Vt}})}catch(_e){if(isAuthError(_e))return{data:{user:null,session:null},error:_e};throw _e}}async resend(_e){try{const $t=`${this.url}/resend`;if("email"in _e){const{email:Ft,type:Vt,options:qt}=_e,{error:zt}=await _request(this.fetch,"POST",$t,{headers:this.headers,body:{email:Ft,type:Vt,gotrue_meta_security:{captcha_token:qt==null?void 0:qt.captchaToken}},redirectTo:qt==null?void 0:qt.emailRedirectTo});return{data:{user:null,session:null},error:zt}}else if("phone"in _e){const{phone:Ft,type:Vt,options:qt}=_e,{data:zt,error:Ht}=await _request(this.fetch,"POST",$t,{headers:this.headers,body:{phone:Ft,type:Vt,gotrue_meta_security:{captcha_token:qt==null?void 0:qt.captchaToken}}});return{data:{user:null,session:null,messageId:zt==null?void 0:zt.message_id},error:Ht}}throw new AuthInvalidCredentialsError("You must provide either an email or phone number and a type")}catch($t){if(isAuthError($t))return{data:{user:null,session:null},error:$t};throw $t}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async $t=>$t))}async _acquireLock(_e,$t){this._debug("#_acquireLock","begin",_e);try{if(this.lockAcquired){const Ft=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),Vt=(async()=>(await Ft,await $t()))();return this.pendingInLock.push((async()=>{try{await Vt}catch{}})()),Vt}return await this.lock(`lock:${this.storageKey}`,_e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const Ft=$t();for(this.pendingInLock.push((async()=>{try{await Ft}catch{}})()),await Ft;this.pendingInLock.length;){const Vt=[...this.pendingInLock];await Promise.all(Vt),this.pendingInLock.splice(0,Vt.length)}return await Ft}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(_e){this._debug("#_useSession","begin");try{const $t=await this.__loadSession();return await _e($t)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let _e=null;const $t=await getItemAsync(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",$t),$t!==null&&(this._isValidSession($t)?_e=$t:(this._debug("#getSession()","session from storage is not val
248id"),await this._removeSession())),!_e)return{data:{session:null},error:null};const Ft=_e.expires_at?_e.expires_at*1e3-Date.now()<EXPIRY_MARGIN_MS:!1;if(this._debug("#__loadSession()",`session has${Ft?"":" not"} expired`,"expires_at",_e.expires_at),!Ft){if(this.storage.isServer){let zt=this.suppressGetSessionWarning;_e=new Proxy(_e,{get:(Kt,Gt,Jt)=>(!zt&&Gt==="user"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),zt=!0,this.suppressGetSessionWarning=!0),Reflect.get(Kt,Gt,Jt))})}return{data:{session:_e},error:null}}const{session:Vt,error:qt}=await this._callRefreshToken(_e.refresh_token);return qt?{data:{session:null},error:qt}:{data:{session:Vt},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(_e){return _e?await this._getUser(_e):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(_e){try{return _e?await _request(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:_e,xform:_userResponse}):await this._useSession(async $t=>{var Ft,Vt,qt;const{data:zt,error:Ht}=$t;if(Ht)throw Ht;return!(!((Ft=zt.session)===null||Ft===void 0)&&Ft.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new AuthSessionMissingError}:await _request(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(qt=(Vt=zt.session)===null||Vt===void 0?void 0:Vt.access_token)!==null&&qt!==void 0?qt:void 0,xform:_userResponse})})}catch($t){if(isAuthError($t))return isAuthSessionMissingError($t)&&(await this._removeSession(),await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:$t};throw $t}}async updateUser(_e,$t={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(_e,$t))}async _updateUser(_e,$t={}){try{return await this._useSession(async Ft=>{const{data:Vt,error:qt}=Ft;if(qt)throw qt;if(!Vt.session)throw new AuthSessionMissingError;const zt=Vt.session;let Ht=null,Kt=null;this.flowType==="pkce"&&_e.email!=null&&([Ht,Kt]=await getCodeChallengeAndMethod(this.storage,this.storageKey));const{data:Gt,error:Jt}=await _request(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:$t==null?void 0:$t.emailRedirectTo,body:Object.assign(Object.assign({},_e),{code_challenge:Ht,code_challenge_method:Kt}),jwt:zt.access_token,xform:_userResponse});if(Jt)throw Jt;return zt.user=Gt.user,await this._saveSession(zt),await this._notifyAllSubscribers("USER_UPDATED",zt),{data:{user:zt.user},error:null}})}catch(Ft){if(isAuthError(Ft))return{data:{user:null},error:Ft};throw Ft}}async setSession(_e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(_e))}async _setSession(_e){try{if(!_e.access_token||!_e.refresh_token)throw new AuthSessionMissingError;const $t=Date.now()/1e3;let Ft=$t,Vt=!0,qt=null;const{payload:zt}=decodeJWT(_e.access_token);if(zt.exp&&(Ft=zt.exp,Vt=Ft<=$t),Vt){const{session:Ht,error:Kt}=await this._callRefreshToken(_e.refresh_token);if(Kt)return{data:{user:null,session:null},error:Kt};if(!Ht)return{data:{user:null,session:null},error:null};qt=Ht}else{const{data:Ht,error:Kt}=await this._getUser(_e.access_token);if(Kt)throw Kt;qt={access_token:_e.access_token,refresh_token:_e.refresh_token,user:Ht.user,token_type:"bearer",expires_in:Ft-$t,expires_at:Ft},await this._saveSession(qt),await this._notifyAllSubscribers("SIGNED_IN",qt)}return{data:{user:qt.user,session:qt},error:null}}catch($t){if(isAuthError($t))return{data:{session:null,user:null},error:$t};throw $t}}async refreshSession(_e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(_e))}async _refreshSession(_e){try{return await this._useSession(async $t=>{var Ft;if(!_e){const{data:zt,error:Ht}=$t;if(Ht)throw Ht;_e=(Ft=zt.session)!==null&&Ft!==void 0?Ft:void 0}if(!(_e!=null&&_e.refresh_token))throw new AuthSessionMissingError;
248const{session:Vt,error:qt}=await this._callRefreshToken(_e.refresh_token);return qt?{data:{user:null,session:null},error:qt}:Vt?{data:{user:Vt.user,session:Vt},error:null}:{data:{user:null,session:null},error:null}})}catch($t){if(isAuthError($t))return{data:{user:null,session:null},error:$t};throw $t}}async _getSessionFromURL(_e,$t){try{if(!isBrowser$3())throw new AuthImplicitGrantRedirectError("No browser detected.");if(_e.error||_e.error_description||_e.error_code)throw new AuthImplicitGrantRedirectError(_e.error_description||"Error in URL with unspecified error_description",{error:_e.error||"unspecified_error",code:_e.error_code||"unspecified_code"});switch($t){case"implicit":if(this.flowType==="pkce")throw new AuthPKCEGrantCodeExchangeError("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");break;default:}if($t==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!_e.code)throw new AuthPKCEGrantCodeExchangeError("No code detected.");const{data:cr,error:fr}=await this._exchangeCodeForSession(_e.code);if(fr)throw fr;
248const vr=new URL(window.location.href);return vr.searchParams.delete("code"),window.history.replaceState(window.history.state,"",vr.toString()),{data:{session:cr.session,redirectType:null},error:null}}const{provider_token:Ft,provider_refresh_token:Vt,access_token:qt,refresh_token:zt,expires_in:Ht,expires_at:Kt,token_type:Gt}=_e;if(!qt||!Ht||!zt||!Gt)throw new AuthImplicitGrantRedirectError("No session defined in URL");const Jt=Math.round(Date.now()/1e3),Xt=parseInt(Ht);let Zt=Jt+Xt;Kt&&(Zt=parseInt(Kt));const er=Zt-Jt;er*1e3<=AUTO_REFRESH_TICK_DURATION_MS&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${er}s, should have been closer to ${Xt}s`);const tr=Zt-Xt;Jt-tr>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",tr,Zt,Jt):Jt-tr<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",tr,Zt,Jt);const{data:rr,error:ar}=await this._getUser(qt);if(ar)throw ar;const nr={provider_token:Ft,provider_refresh_token:Vt,access_token:qt,expires_in:Xt,expires_at:Zt,refresh_token:zt,token_type:Gt,user:rr.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:nr,redirectType:_e.type},error:null}}catch(Ft){if(isAuthError(Ft))return{data:{session:null,redirectType:null},error:Ft};throw Ft}}_isImplicitGrantCallback(_e){return!!(_e.access_token||_e.error_description)}async _isPKCECallback(_e){const $t=await getItemAsync(this.storage,`${this.storageKey}-code-verifier`);return!!(_e.code&&$t)}async signOut(_e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(_e))}async _signOut({scope:_e}={scope:"global"}){return await this._useSession(async $t=>{var Ft;const{data:Vt,error:qt}=$t;if(qt)return{error:qt};
248const zt=(Ft=Vt.session)===null||Ft===void 0?void 0:Ft.access_token;if(zt){const{error:Ht}=await this.admin.signOut(zt,_e);if(Ht&&!(isAuthApiError(Ht)&&(Ht.status===404||Ht.status===401||Ht.status===403)))return{error:Ht}}return _e!=="others"&&(await this._removeSession(),await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(_e){const $t=uuid$1(),Ft={id:$t,callback:_e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",$t),this.stateChangeEmitters.delete($t)}};return this._debug("#onAuthStateChange()","registered callback with id",$t),this.stateChangeEmitters.set($t,Ft),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession($t)})))(),{data:{subscription:Ft}}}async _emitInitialSession(_e){return await this._useSession(async $t=>{var Ft,Vt;try{const{data:{session:qt},error:zt}=$t;if(zt)throw zt;await((Ft=this.stateChangeEmitters.get(_e))===null||Ft===void 0?void 0:Ft.callback("INITIAL_SESSION",qt)),this._debug("INITIAL_SESSION","callback id",_e,"session",qt)}catch(qt){await((Vt=this.stateChangeEmitters.get(_e))===null||Vt===void 0?void 0:Vt.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",_e,"error",qt),console.error(qt)}})}async resetPasswordForEmail(_e,$t={}){let Ft=null,Vt=null;this.flowType==="pkce"&&([Ft,Vt]=await getCodeChallengeAndMethod(this.storage,this.storageKey,!0));try{return await _request(this.fetch,"POST",`${this.url}/recover`,{body:{email:_e,code_challenge:Ft,code_challenge_method:Vt,gotrue_meta_security:{captcha_token:$t.captchaToken}},headers:this.headers,redirectTo:$t.redirectTo})}catch(qt){if(isAuthError(qt))return{data:null,error:qt};throw qt}}async getUserIdentities(){var _e;try{const{data:$t,error:Ft}=await this.getUser();if(Ft)throw Ft;return{data:{identities:(_e=$t.user.identities)!==null&&_e!==void 0?_e:[]},error:null}}catch($t){if(isAuthError($t))return{data:null,error:$t};throw $t}}async linkIdentity(_e){var $t;try{const{data:Ft,error:Vt}=await this._useSession(async qt=>{var zt,Ht,Kt,Gt,Jt;const{data:Xt,error:Zt}=qt;if(Zt)throw Zt;const er=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,_e.provider,{redirectTo:(zt=_e.options)===null||zt===void 0?void 0:zt.redirectTo,scopes:(Ht=_e.options)===null||Ht===void 0?void 0:Ht.scopes,queryParams:(Kt=_e.options)===null||Kt===void 0?void 0:Kt.queryParams,skipBrowserRedirect:!0});return await _request(this.fetch,"GET",er,{headers:this.headers,jwt:(Jt=(Gt=Xt.session)===null||Gt===void 0?void 0:Gt.access_token)!==null&&Jt!==void 0?Jt:void 0})});if(Vt)throw Vt;return isBrowser$3()&&!(!(($t=_e.options)===null||$t===void 0)&&$t.skipBrowserRedirect)&&window.location.assign(Ft==null?void 0:Ft.url),{data:{provider:_e.provider,url:Ft==null?void 0:Ft.url},error:null}}catch(Ft){if(isAuthError(Ft))return{data:{provider:_e.provider,url:null},error:Ft};throw Ft}}async unlinkIdentity(_e){try{return await this._useSession(async $t=>{var Ft,Vt;const{data:qt,error:zt}=$t;if(zt)throw zt;return await _request(this.fetch,"DELETE",`${this.url}/user/identities/${_e.identity_id}`,{headers:this.headers,jwt:(Vt=(Ft=qt.session)===null||Ft===void 0?void 0:Ft.access_token)!==null&&Vt!==void 0?Vt:void 0})})}catch($t){if(isAuthError($t))return{data:null,error:$t};throw $t}}async _refreshAccessToken(_e){const $t=`#_refreshAccessToken(${_e.substring(0,5)}...)`;this._debug($t,"begin");try{const Ft=Date.now();return await retryable(async Vt=>(Vt>0&&await sleep(200*Math.pow(2,Vt-1)),this._debug($t,"refreshing attempt",Vt),await _request(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:_e},headers:this.headers,xform:_sessionResponse})),(Vt,qt)=>{const zt=200*Math.pow(2,Vt);return qt&&isAuthRetryableFetchError(qt)&&Date.now()+zt-Ft<AUTO_REFRESH_TICK_DURATION_MS})}catch(Ft){if(this._debug($t,"error",Ft),isAuthError(Ft))return{data:{session:null,user:null},error:Ft};throw Ft}finally{this._debug($t,"end")}}_isValidSession(_e){return typeof _e=="object"&&_e!==null&&"access_token"in _e&&"refresh_token"in _e&&"expires_at"in _e}async _handleProviderSignIn(_e,$t){const Ft=await this._getUrlForProvider(`${this.url}/authorize`,_e,{redirectTo:$t.redirectTo,scopes:$t.scopes,queryParams:$t.queryParams});return this._debug("#_handleProviderSignIn()","provider",_e,"options",$t,"url",Ft),isBrowser$3()&&!$t.skipBrowserRedirect&&window.location.assign(Ft),{data:{provider:_e,url:Ft},error:null}}async _recoverAndRefresh(){var _e;const $t="#_recoverAndRefresh()";this._debug($t,"begin");try{const Ft=await getItemAsync(this.storage,this.storageKey);if(this._debug($t,"session from storage",Ft),!this._isValidSession(Ft)){this._debug($t,"session is not val
248id"),Ft!==null&&await this._removeSession();return}const Vt=((_e=Ft.expires_at)!==null&&_e!==void 0?_e:1/0)*1e3-Date.now()<EXPIRY_MARGIN_MS;if(this._debug($t,`session has${Vt?"":" not"} expired with margin of ${EXPIRY_MARGIN_MS}s`),Vt){if(this.autoRefreshToken&&Ft.refresh_token){const{error:qt}=await this._callRefreshToken(Ft.refresh_token);qt&&(console.error(qt),isAuthRetryableFetchError(qt)||(this._debug($t,"refresh failed with a non-retryable error, removing the session",qt),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",Ft)}catch(Ft){this._debug($t,"error",Ft),console.error(Ft);return}finally{this._debug($t,"end")}}async _callRefreshToken(_e){var $t,Ft;if(!_e)throw new AuthSessionMissingError;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const Vt=`#_callRefreshToken(${_e.substring(0,5)}...)`;this._debug(Vt,"begin");try{this.refreshingDeferred=new Deferred;const{data:qt,error:zt}=await this._refreshAccessToken(_e);if(zt)throw zt;if(!qt.session)throw new AuthSessionMissingError;await this._saveSession(qt.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",qt.session);const Ht={session:qt.session,error:null};return this.refreshingDeferred.resolve(Ht),Ht}catch(qt){if(this._debug(Vt,"error",qt),isAuthError(qt)){const zt
248={session:null,error:qt};return isAuthRetryableFetchError(qt)||await this._removeSession(),($t=this.refreshingDeferred)===null||$t===void 0||$t.resolve(zt),zt}throw(Ft=this.refreshingDeferred)===null||Ft===void 0||Ft.reject(qt),qt}finally{this.refreshingDeferred=null,this._debug(Vt,"end")}}async _notifyAllSubscribers(_e,$t,Ft=!0){const Vt=`#_notifyAllSubscribers(${_e})`;this._debug(Vt,"begin",$t,`broadcast = ${Ft}`);try{this.broadcastChannel&&Ft&&this.broadcastChannel.postMessage({event:_e,session:$t});const qt=[],zt=Array.from(this.stateChangeEmitters.values()).map(async Ht=>{try{await Ht.callback(_e,$t)}catch(Kt){qt.push(Kt)}});if(await Promise.all(zt),qt.length>0){for(let Ht=0;Ht<qt.length;Ht+=1)console.error(qt[Ht]);throw qt[0]}}finally{this._debug(Vt,"end")}}async _saveSession(_e){this._debug("#_saveSession()",_e),this.suppressGetSessionWarning=!0,await setItemAsync(this.storage,this.storageKey,_e)}async _removeSession(){this._debug("#_removeSession()"),await removeItemAsync(this.storage,this.storageKey),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const _e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{_e&&isBrowser$3()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",_e)}catch($t){console.error("removing visibilitychange callback failed",$t)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const _e=setInterval(()=>this._autoRefreshTokenTick(),AUTO_REFRESH_TICK_DURATION_MS);this.autoRefreshTicker=_e,_e&&typeof _e=="object"&&typeof _e.unref=="function"?_e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(_e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const _e=this.autoRefreshTicker;this.autoRefreshTicker=null,_e&&clearInterval(_e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const _e=Date.now();try{return await this._useSession(async $t=>{const{data:{session:Ft}}=$t;if(!Ft||!Ft.refresh_token||!Ft.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const Vt=Math.floor((Ft.expires_at*1e3-_e)/AUTO_REFRESH_TICK_DURATION_MS);this._debug("#_autoRefreshTokenTick()",`access token expires in ${Vt} ticks, a tick lasts ${AUTO_REFRESH_TICK_DURATION_MS}ms, refresh threshold is ${AUTO_REFRESH_TICK_THRESHOLD} ticks`),Vt<=AUTO_REFRESH_TICK_THRESHOLD&&await this._callRefreshToken(Ft.refresh_token)})}catch($t){console.error("Auto refresh tick failed with error. This is likely a transient error.",$t)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(_e){if(_e.isAcquireTimeout||_e instanceof LockAcquireTimeoutError)this._debug("auto refresh token tick lock not available");else throw _e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!isBrowser$3()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(_e){console.error("_handleVisibilityChange",_e)}}async _onVisibilityChanged(_e){const $t=`#_onVisibilityChanged(${_e})`;this._debug($t,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),_e||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug($t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(_e,$t,Ft){const Vt=[`provider=${encodeURIComponent($t)}`];if(Ft!=null&&Ft.redirectTo&&Vt.push(`redirect_to=${encodeURIComponent(Ft.redirectTo)}
248`),Ft!=null&&Ft.scopes&&Vt.push(`scopes=${encodeURIComponent(Ft.scopes)}`),this.flowType==="pkce"){const[qt,zt]=await getCodeChallengeAndMethod(this.storage,this.storageKey),Ht=new URLSearchParams({code_challenge:`${encodeURIComponent(qt)}`,code_challenge_method:`${encodeURIComponent(zt)}`});Vt.push(Ht.toString())}if(Ft!=null&&Ft.queryParams){const qt=new URLSearchParams(Ft.queryParams);Vt.push(qt.toString())}return Ft!=null&&Ft.skipBrowserRedirect&&Vt.push(`skip_http_redirect=${Ft.skipBrowserRedirect}`),`${_e}?${Vt.join("&")}`}async _unenroll(_e){try{return await this._useSession(async $t=>{var Ft;const{data:Vt,error:qt}=$t;return qt?{data:null,error:qt}:await _request(this.fetch,"DELETE",`${this.url}/factors/${_e.factorId}`,{headers:this.headers,jwt:(Ft=Vt==null?void 0:Vt.session)===null||Ft===void 0?void 0:Ft.access_token})})}catch($t){if(isAuthError($t))return{data:null,error:$t};throw $t}}async _enroll(_e){try{return await this._useSession(async $t=>{var Ft,Vt;const{data:qt,error:zt}=$t;if(zt)return{data:null,error:zt};const Ht=Object.assign({friendly_name:_e.friendlyName,factor_type:_e.factorType},_e.factorType==="phone"?{phone:_e.phone}:{issuer:_e.issuer}),{data:Kt,error:Gt}=await _request(this.fetch,"POST",`${this.url}/factors`,{body:Ht,headers:this.headers,jwt:(Ft=qt==null?void 0:qt.session)===null||Ft===void 0?void 0:Ft.access_token});return Gt?{data:null,error:Gt}:(_e.factorType==="totp"&&(!((Vt=Kt==null?void 0:Kt.totp)===null||Vt===void 0)&&Vt.qr_code)&&(Kt.totp.qr_code=`data:image/svg+xml;utf-8,${Kt.totp.qr_code}`),{data:Kt,error:null})})}catch($t){if(isAuthError($t))return{data:null,error:$t};throw $t}}async _verify(_e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async $t=>{var Ft;const{data:Vt,error:qt}=$t;if(qt)return{data:null,error:qt};const{data:zt,error:Ht}=await _request(this.fetch,"POST",`${this.url}/factors/${_e.factorId}/verify`,{body:{code:_e.code,challenge_id:_e.challengeId},headers:this.headers,jwt:(Ft=Vt==null?void 0:Vt.session)===null||Ft===void 0?void 0:Ft.access_token});return Ht?{data:null,error:Ht}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+zt.expires_in},zt)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",zt),{data:zt,error:Ht})})}catch($t){if(isAuthError($t))return{data:null,error:$t};throw $t}})}async _challenge(_e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async $t=>{var Ft;const{data:Vt,error:qt}=$t;return qt?{data:null,error:qt}:await _request(this.fetch,"POST",`${this.url}/factors/${_e.factorId}/challenge`,{body:{channel:_e.channel},headers:this.headers,jwt:(Ft=Vt==null?void 0:Vt.session)===null||Ft===void 0?void 0:Ft.access_token})})}catch($t){if(isAuthError($t))return{data:null,error:$t};throw $t}})}async _challengeAndVerify(_e){const{data:$t,error:Ft}=await this._challenge({factorId:_e.factorId});return Ft?{data:null,error:Ft}:await this._verify({factorId:_e.factorId,challengeId:$t.id,code:_e.code})}async _listFactors(){const{data:{user:_e},error:$t}=await this.getUser();if($t)return{data:null,error:$t};const Ft=(_e==null?void 0:_e.factors)||[],Vt=Ft.filter(zt=>zt.factor_type==="totp"&&zt.status==="verified"),qt=Ft.filter(zt=>zt.factor_type==="phone"&&zt.status==="verified");return{data:{all:Ft,totp:Vt,phone:qt},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async _e=>{var $t,Ft;const{data:{session:Vt},error:qt}=_e;if(qt)return{data:null,error:qt};if(!Vt)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:zt}=decodeJWT(Vt.access_token);let Ht=null;zt.aal&&(Ht=zt.aal);let Kt=Ht;((Ft=($t=Vt.user.factors)===null||$t===void 0?void 0:$t.filter(Xt=>Xt.status==="verified"))!==null&&Ft!==void 0?Ft:[]).length>0&&(Kt="aal2");const Jt=zt.amr||[];return{data:{currentLevel:Ht,nextLevel:Kt,currentAuthenticationMethods:Jt},error:null}}))}async fetchJwk(_e,$t={keys:[]}){let Ft=$t.keys.find(zt=>zt.kid===_e);if(Ft||(Ft=this.jwks.keys.find(zt=>zt.kid===_e),Ft&&this.jwks_cached_at+JWKS_TTL>Date.now()))return Ft;const{data:Vt,error:qt}=await _request(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(qt)throw qt;if(!Vt.keys||Vt.keys.length===0)throw new AuthInvalidJwtError("JWKS is empty");if(this.jwks=Vt,this.jwks_cached_at=Date.now(),Ft=Vt.keys.find(zt=>zt.kid===_e),!Ft)throw new AuthInvalidJwtError("No matching signing key found in JWKS");return Ft}async getClaims(_e,$t={keys:[]}){try{let Ft=_e;if(!Ft){const{data:er,error:tr}
248=await this.getSession();if(tr||!er.session)return{data:null,error:tr};Ft=er.session.access_token}const{header:Vt,payload:qt,signature:zt,raw:{header:Ht,payload:Kt}}=decodeJWT(Ft);if(validateExp(qt.exp),!Vt.kid||Vt.alg==="HS256"||!("crypto"in globalThis&&"subtle"in globalThis.crypto)){const{error:er}=await this.getUser(Ft);if(er)throw er;return{data:{claims:qt,header:Vt,signature:zt},error:null}}const Gt=getAlgorithm(Vt.alg),Jt=await this.fetchJwk(Vt.kid,$t),Xt=await crypto.subtle.importKey("jwk",Jt,Gt,!0,["verify"]);if(!await crypto.subtle.verify(Gt,Xt,zt,stringToUint8Array(`${Ht}.${Kt}`)))throw new AuthInvalidJwtError("Invalid JWT signature");return{data:{claims:qt,header:Vt,signature:zt},error:null}}catch(Ft){if(isAuthError(Ft))return{data:null,error:Ft};throw Ft}}}GoTrueClient.nextInstanceID=0;const AuthClient=GoTrueClient;class SupabaseAuthClient extends AuthClient{constructor(_e){super(_e)}}var __awaiter$2=function(yt,_e,$t,Ft){function Vt(qt){return qt instanceof $t?qt:new $t(function(zt){zt(qt)})}return new($t||($t=Promise))(function(qt,zt){function Ht(Jt){try{Gt(Ft.next(Jt))}catch(Xt){zt(Xt)}}function Kt(Jt){try{Gt(Ft.throw(Jt))}catch(Xt){zt(Xt)}}function Gt(Jt){Jt.done?qt(Jt.value):Vt(Jt.value).then(Ht,Kt)}Gt((Ft=Ft.apply(yt,[])).next())})};class SupabaseClient{constructor(_e,$t,Ft){var Vt,qt,zt;if(this.supabaseUrl=_e,this.supabaseKey=$t,!_e)throw new Error("supabaseUrl is required.");if(!$t)throw new Error("supabaseKey is required.");const Ht=ensureTrailingSlash(_e),Kt=new URL(Ht);this.realtimeUrl=new URL("realtime/v1",Kt),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",Kt),this.storageUrl=new URL("storage/v1",Kt),this.functionsUrl=new URL("functions/v1",Kt);const Gt=`sb-${Kt.hostname.split(".")[0]}-auth-token`,Jt={db:DEFAULT_DB_OPTIONS,realtime:DEFAULT_REALTIME_OPTIONS,auth:Object.assign(Object.assign({},DEFAULT_AUTH_OPTIONS),{storageKey:Gt}),global:DEFAULT_GLOBAL_OPTIONS},Xt=applySettingDefaults(Ft??{},Jt);this.storageKey=(Vt=Xt.auth.storageKey)!==null&&Vt!==void 0?Vt:"",this.headers=(qt=Xt.global.headers)!==null&&qt!==void 0?qt:{},Xt.accessToken?(this.accessToken=Xt.accessToken,this.auth=new Proxy({},{get:(Zt,er)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(er)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((zt=Xt.auth)!==null&&zt!==void 0?zt:{},this.headers,Xt.global.fetch),this.fetch=fetchWithAuth($t,this._getAccessToken.bind(this),Xt.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},Xt.realtime)),this.rest=new PostgrestClient(new URL("rest/v1",Kt).href,{headers:this.headers,schema:Xt.db.schema,fetch:this.fetch}),Xt.accessToken||this._listenForAuthEvents()}get functions(){return new FunctionsClient(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}get storage(){return new StorageClient(this.storageUrl.href,this.headers,this.fetch)}from(_e){return this.rest.from(_e)}schema(_e){return this.rest.schema(_e)}rpc(_e,$t={},Ft={}){return this.rest.rpc(_e,$t,Ft)}channel(_e,$t={config:{}}){return this.realtime.channel(_e,$t)}getChannels(){return this.realtime.getChannels()}removeChannel(_e){return this.realtime.removeChannel(_e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var _e,$t;return __awaiter$2(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:Ft}=yield this.auth.getSession();return($t=(_e=Ft.session)===null||_e===void 0?void 0:_e.access_token)!==null&&$t!==void 0?$t:null})}_initSupabaseAuthClient({autoRefreshToken:_e,persistSession:$t,detectSessionInUrl:Ft,storage:Vt,storageKey:qt,flowType:zt,lock:Ht,debug:Kt},Gt,Jt){const Xt={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new SupabaseAuthClient({url:this.authUrl.href,headers:Object.assign(Object.assign({},Xt),Gt),storageKey:qt,autoRefreshToken:_e,persistSession:$t,detectSessionInUrl:Ft,storage:Vt,flowType:zt,lock:Ht,debug:Kt,fetch:Jt,hasCu
248stomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(_e){return new RealtimeClient(this.realtimeUrl.href,Object.assign(Object.assign({},_e),{params:Object.assign({apikey:this.supabaseKey},_e==null?void 0:_e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange(($t,Ft)=>{this._handleTokenChanged($t,"CLIENT",Ft==null?void 0:Ft.access_token)})}_handleTokenChanged(_e,$t,Ft){(_e==="TOKEN_REFRESHED"||_e==="SIGNED_IN")&&this.changedAccessToken!==Ft?this.changedAccessToken=Ft:_e==="SIGNED_OUT"&&(this.realtime.setAuth(),$t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const createClient=(yt,_e,$t)=>new SupabaseClient(yt,_e,$t),supabaseUrl="https://gnctnepoaovipmupvbcu.supabase.co",supabaseAnonKey="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImduY3RuZXBvYW92aXBtdXB2YmN1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTA1OTQxMzYsImV4cCI6MjA2NjE3MDEzNn0.OWKPnbe_6zwLq7ezk5SS56iyGtnuH4bsE1mcaLj8qBg",supabase=createClient(supabaseUrl,supabaseAnonKey);function shallow$1(yt,_e){if(Object.is(yt,_e))return!0;if(typeof yt!="object"||yt===null||typeof _e!="object"||_e===null)return!1;if(yt instanceof Map&&_e instanceof Map){if(yt.size!==_e.size)return!1;for(const[Ft,Vt]of yt)if(!Object.is(Vt,_e.get(Ft)))return!1;return!0}if(yt instanceof Set&&_e instanceof Set){if(yt.size!==_e.size)return!1;for(const Ft of yt)if(!_e.has(Ft))return!1;return!0}const $t=Object.keys(yt);if($t.length!==Object.keys(_e).length)return!1;for(const Ft of $t)if(!Object.prototype.hasOwnProperty.call(_e,Ft)||!Object.is(yt[Ft],_e[Ft]))return!1;return!0}var withSelector={exports:{}},withSelector_production={},shim$2={exports:{}},useSyncExternalStoreShim_production={};/** 249 * @license React 250 * use-sync-external-store-shim.production.js 251 * 252 * Copyright (c) Meta Platforms, Inc. and affiliates. 253 * 254 * This source code is licensed under the MIT license found in the 255 * LICENSE file in the root directory of this source tree. 256 */var React$1=reactExports;function is$1(yt,_e){return yt===_e&&(yt!==0||1/yt===1/_e)||yt!==yt&&_e!==_e}var objectIs$1=typeof Object.is=="function"?Object.is:is$1,useState=React$1.useState,useEffect$1=React$1.useEffect,useLayoutEffect=React$1.useLayoutEffect,useDebugValue$3=React$1.useDebugValue;function useSyncExternalStore$2(yt,_e){var $t=_e(),Ft=useState({inst:{value:$t,getSnapshot:_e}}),Vt=Ft[0].inst,qt=Ft[1];return useLayoutEffect(function(){Vt.value=$t,Vt.getSnapshot=_e,checkIfSnapshotChanged(Vt)&&qt({inst:Vt})},[yt,$t,_e]),useEffect$1(function(){return checkIfSnapshotChanged(Vt)&&qt({inst:Vt}),yt(function(){checkIfSnapshotChanged(Vt)&&qt({inst:Vt})})},[yt]),useDebugValue$3($t),$t}function checkIfSnapshotChanged(yt){var _e=yt.getSnapshot;yt=yt.value;try{var $t=_e();return!objectIs$1(yt,$t)}catch{return!0}}function useSyncExternalStore$1(yt,_e){return _e()}var shim$1=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?useSyncExternalStore$1:useSyncExternalStore$2;useSyncExternalStoreShim_production.useSyncExternalStore=React$1.useSyncExternalStore!==void 0?React$1.useSyncExternalStore:shim$1;shim$2.exports=useSyncExternalStoreShim_production;var shimExports=shim$2.exports;/** 257 * @license React 258 * use-sync-external-store-shim/with-selector.production.js 259 * 260 * Copyright (c) Meta Platforms, Inc. and affiliates. 261 * 262 * This source code is licensed under the MIT license found in the 263 * LICENSE file in the root directory of this source tree. 264 */var React=reactExports,shim=shimExports;function is(yt,_e){return yt===_e&&(yt!==0||1/yt===1/_e)||yt!==yt&&_e!==_e}var objectIs=typeof Object.is=="function"?Object.is:is,useSyncExternalStore=shim.useSyncExternalStore,useRef=React.useRef,useEffect=React.useEffect,useMemo=React.useMemo,useDebugValue$2=React.useDebugValue;withSelector_production.useSyncExternalStoreWithSelector=function(yt,_e,$t,Ft,Vt){var qt=useRef(null);if(qt.current===null){var zt={hasValue:!1,value:null};qt.current=zt}else zt=qt.current;qt=useMemo(function(){function Kt(er){if(!Gt){if(Gt=!0,Jt=er,er=Ft(er),Vt!==void 0&&zt.hasValue){var tr=zt.value;if(Vt(tr,er))return Xt=tr}return Xt=er}if(tr=Xt,objectIs(Jt,er))return tr;var rr=Ft(er);return Vt!==void 0&&Vt(tr,rr)?(Jt=er,tr):(Jt=er,Xt=rr)}var Gt=!1,Jt,Xt,Zt=$t===void 0?null:$t;return[function(){return Kt(_e())},Zt===null?void 0:function(){return Kt(Zt())}]},[_e,$t,Ft,Vt]);var Ht=useSyncExternalStore(yt,qt[0],qt[1]);return useEffect(function(){zt.hasValue=!0,zt.value=Ht},[Ht]),useDebugValue$2(Ht),Ht};withSelector.exports=withSelector_production;var withSelectorExports=withSelector.exports;const useSyncExternalStoreExports=getDefaultExportFromCjs$1(withSelectorExports),__vite_import_meta_env__$1={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_SUPABASE_ANON_KEY:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImduY3RuZXBvYW92aXBtdXB2YmN1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTA1OTQxMzYsImV4cCI6MjA2NjE3MDEzNn0.OWKPnbe_6zwLq7ezk5SS56iyGtnuH4bsE1mcaLj8qBg",VITE_SUPABASE_URL:"https://gnctnepoaovipmupvbcu.supabase.co",VITE_WORLD_ID_APP_ID:"app_staging_3342b5fc5b58555ca867ff0b669213f3"},createStoreImpl=yt=>{let _e;const $t=new Set,Ft=(Jt,Xt)=>{const Zt=typeof Jt=="function"?Jt(_e):Jt;if(!Object.is(Zt,_e)){const er=_e;_e=Xt??(typeof Zt!="object"||Zt===null)?Zt:Object.assign({},_e,Zt),$t.forEach(tr=>tr(_e,er))}},Vt=()=>_e,Kt={setState:Ft,getState:Vt,getInitialState:()=>Gt,subscribe:Jt=>($t.add(Jt),()=>$t.delete(Jt)),destroy:()=>{(__vite_import_meta_env__$1?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),$t.clear()}},Gt=_e=yt(Ft,Vt,Kt);return Kt},createStore=yt=>yt?createStoreImpl(yt):createStoreImpl,{useDebugValue:useDebugValue$1}
264=React$2,{useSyncExternalStoreWithSelector:useSyncExternalStoreWithSelector$1}=useSyncExternalStoreExports,identity$1=yt=>yt;function useStoreWithEqualityFn(yt,_e=identity$1,$t){const Ft=useSyncExternalStoreWithSelector$1(yt.subscribe,yt.getState,yt.getServerState||yt.getInitialState,_e,$t);return useDebugValue$1(Ft),Ft}const createWithEqualityFnImpl=(yt,_e)=>{const $t=createStore(yt),Ft=(Vt,qt=_e)=>useStoreWithEqualityFn($t,Vt,qt);return Object.assign(Ft,$t),Ft},createWithEqualityFn=(yt,_e)=>createWithEqualityFnImpl,version$2="0.1.1";function getVersion(){return version$2}class BaseError extends Error{constructor(_e,$t={}){const Ft=(()=>{var Kt;if($t.cause instanceof BaseError){if($t.cause.details)return $t.cause.details;if($t.cause.shortMessage)return $t.cause.shortMessage}return(Kt=$t.cause)!=null&&Kt.message?$t.cause.message:$t.details})(),Vt=$t.cause instanceof BaseError&&$t.cause.docsPath||$t.docsPath,zt=`https://oxlib.sh${Vt??""}`,Ht=[_e||"An error occurred.",...$t.metaMessages?["",...$t.metaMessages]:[],...Ft||Vt?["",Ft?`Details: ${Ft}`:void 0,Vt?`See: ${zt}`:void 0]:[]].filter(Kt=>typeof Kt=="string").join(` 265`);super(Ht,$t.cause?{cause:$t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${getVersion()}`}),this.cause=$t.cause,this.details=Ft,this.docs=zt,this.docsPath=Vt,this.shortMessage=_e}walk(_e){return walk(this,_e)}}function walk(yt,_e){return _e!=null&&_e(yt)?yt:yt&&typeof yt=="object"&&"cause"in yt&&yt.cause?walk(yt.cause,_e):_e?null:yt}/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function isBytes(yt){return yt instanceof Uint8Array||ArrayBuffer.isView(yt)&&yt.constructor.name==="Uint8Array"}function anumber(yt){if(!Number.isSafeInteger(yt)||yt<0)throw new Error("positive integer expected, got "+yt)}function abytes(yt,..._e){if(!isBytes(yt))throw new Error("Uint8Array expected");if(_e.length>0&&!_e.includes(yt.length))throw new Error("Uint8Array expected of length "+_e+", got length="+yt.length)}function aexists(yt,_e=!0){if(yt.destroyed)throw new Error("Hash instance has been destroyed");if(_e&&yt.finished)throw new Error("Hash#digest() has already been called")}function aoutput(yt,_e){abytes(yt);const $t=_e.outputLen;if(yt.length<$t)throw new Error("digestInto() expects output buffer of length at least "+$t)}function u32(yt){return new Uint32Array(yt.buffer,yt.byteOffset,Math.floor(yt.byteLength/4))}function clean(...yt){for(let _e=0;_e<yt.length;_e++)yt[_e].fill(0)}const isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function byteSwap(yt){return yt<<24&4278190080|yt<<8&16711680|yt>>>8&65280|yt>>>24&255}function byteSwap32(yt){for(let _e=0;_e<yt.length;_e++)yt[_e]=byteSwap(yt[_e]);return yt}const swap32IfBE=isLE?yt=>yt:byteSwap32;function utf8ToBytes(yt){if(typeof yt!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(yt))}function toBytes(yt){return typeof yt=="string"&&(yt=utf8ToBytes(yt)),abytes(yt),yt}class Hash{}function createHasher(yt){const _e=Ft=>yt().update(toBytes(Ft)).digest(),$t=yt();return _e.outputLen=$t.outputLen,_e.blockLen=$t.blockLen,_e.create=()=>yt(),_e}const U32_MASK64=BigInt(2**32-1),_32n=BigInt(32);function fromBig(yt,_e=!1){return _e?{h:Number(yt&U32_MASK64),l:Number(yt>>_32n&U32_MASK64)}:{h:Number(yt>>_32n&U32_MASK64)|0,l:Number(yt&U32_MASK64)|0}}function split(yt,_e=!1){const $t=yt.length;let Ft=new Uint32Array($t),Vt=new Uint32Array($t);for(let qt=0;qt<$t;qt++){const{h:zt,l:Ht}=fromBig(yt[qt],_e);[Ft[qt],Vt[qt]]=[zt,Ht]}return[Ft,Vt]}const rotlSH=(yt,_e,$t)=>yt<<$t|_e>>>32-$t,rotlSL=(yt,_e,$t)=>_e<<$t|yt>>>32-$t,rotlBH=(yt,_e,$t)=>_e<<$t-32|yt>>>64-$t,rotlBL=(yt,_e,$t)=>yt<<$t-32|_e>>
vendor: 4,179 bytes, line 265
265>64-$t,_0n=BigInt(0),_1n=BigInt(1),_2n=BigInt(2),_7n=BigInt(7),_256n=BigInt(256),_0x71n=BigInt(113),SHA3_PI=[],SHA3_ROTL=[],_SHA3_IOTA=[];for(let yt=0,_e=_1n,$t=1,Ft=0;yt<24;yt++){[$t,Ft]=[Ft,(2*$t+3*Ft)%5],SHA3_PI.push(2*(5*Ft+$t)),SHA3_ROTL.push((yt+1)*(yt+2)/2%64);let Vt=_0n;for(let qt=0;qt<7;qt++)_e=(_e<<_1n^(_e>>_7n)*_0x71n)%_256n,_e&_2n&&(Vt^=_1n<<(_1n<<BigInt(qt))-_1n);_SHA3_IOTA.push(Vt)}const IOTAS=split(_SHA3_IOTA,!0),SHA3_IOTA_H=IOTAS[0],SHA3_IOTA_L=IOTAS[1],rotlH=(yt,_e,$t)=>$t>32?rotlBH(yt,_e,$t):rotlSH(yt,_e,$t),rotlL=(yt,_e,$t)=>$t>32?rotlBL(yt,_e,$t):rotlSL(yt,_e,$t);function keccakP(yt,_e=24){const $t=new Uint32Array(10);for(let Ft=24-_e;Ft<24;Ft++){for(let zt=0;zt<10;zt++)$t[zt]=yt[zt]^yt[zt+10]^yt[zt+20]^yt[zt+30]^yt[zt+40];for(let zt=0;zt<10;zt+=2){const Ht=(zt+8)%10,Kt=(zt+2)%10,Gt=$t[Kt],Jt=$t[Kt+1],Xt=rotlH(Gt,Jt,1)^$t[Ht],Zt=rotlL(Gt,Jt,1)^$t[Ht+1];for(let er=0;er<50;er+=10)yt[zt+er]^=Xt,yt[zt+er+1]^=Zt}let Vt=yt[2],qt=yt[3];for(let zt=0;zt<24;zt++){const Ht=SHA3_ROTL[zt],Kt=rotlH(Vt,qt,Ht),Gt=rotlL(Vt,qt,Ht),Jt=SHA3_PI[zt];Vt=yt[Jt],qt=yt[Jt+1],yt[Jt]=Kt,yt[Jt+1]=Gt}for(let zt=0;zt<50;zt+=10){for(let Ht=0;Ht<10;Ht++)$t[Ht]=yt[zt+Ht];for(let Ht=0;Ht<10;Ht++)yt[zt+Ht]^=~$t[(Ht+2)%10]&$t[(Ht+4)%10]}yt[0]^=SHA3_IOTA_H[Ft],yt[1]^=SHA3_IOTA_L[Ft]}clean($t)}class Keccak extends Hash{constructor(_e,$t,Ft,Vt=!1,qt=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=_e,this.suffix=$t,this.outputLen=Ft,this.enableXOF=Vt,this.rounds=qt,anumber(Ft),!(0<_e&&_e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=u32(this.state)}clone(){return this._cloneInto()}keccak(){swap32IfBE(this.state32),keccakP(this.state32,this.rounds),swap32IfBE(this.state32),this.posOut=0,this.pos=0}update(_e){aexists(this),_e=toBytes(_e),abytes(_e);const{blockLen:$t,state:Ft}=this,Vt=_e.length;for(let qt=0;qt<Vt;){const zt=Math.min($t-this.pos,Vt-qt);for(let Ht=0;Ht<zt;Ht++)Ft[this.pos++]^=_e[qt++];this.pos===$t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:_e,suffix:$t,pos:Ft,blockLen:Vt}=this;_e[Ft]^=$t,$t&128&&Ft===Vt-1&&this.keccak(),_e[Vt-1]^=128,this.keccak()}writeInto(_e){aexists(this,!1),abytes(_e),this.finish();const $t=this.state,{blockLen:Ft}=this;for(let Vt=0,qt=_e.length;Vt<qt;){this.posOut>=Ft&&this.keccak();const zt=Math.min(Ft-this.posOut,qt-Vt);_e.set($t.subarray(this.posOut,this.posOut+zt),Vt),this.posOut+=zt,Vt+=zt}return _e}xofInto(_e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(_e)}xof(_e){return anumber(_e),this.xofInto(new Uint8Array(_e))}digestInto(_e){if(aoutput(_e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(_e),this.destroy(),_e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,clean(this.state)}_cloneInto(_e){const{blockLen:$t,suffix:Ft,outputLen:Vt,rounds:qt,enableXOF:zt}=this;return _e||(_e=new Keccak($t,Ft,Vt,zt,qt)),_e.state32.set(this.state32),_e.pos=this.pos,_e.posOut=this.posOut,_e.finished=this.finished,_e.rounds=qt,_e.suffix=Ft,_e.outputLen=Vt,_e.enableXOF=zt,_e.destroyed=this.destroyed,_e}}const gen=(yt,_e,$t)=>createHasher(()=>new Keccak(_e,yt,$t)),keccak_256=gen(1,136,256/8),bigIntSuffix="#__bigint";function stringify$1(yt,_e,$t){return JSON.stringify(yt,(Ft,Vt)=>typeof _e=="function"?_e(Ft,Vt):typeof Vt=="bigint"?Vt.toString()+bigIntSuffix:Vt,$t)}stringify$1.parseError=yt=>yt;function assertSize$1(yt,_e){if(size(yt)>_e)throw new SizeOverflowError({givenSize:size(yt),maxSize:_e})}const charCodeMap={zero:48,nine:57,A:65,F:70,a:97,f:102};function charCodeToBase16(yt){if(yt>=charCodeMap.zero&&yt<=charCodeMap.nine)return yt-charCodeMap.zero;if(yt>=charCodeMap.A&&yt<=charCodeMap.F)return yt-(charCodeMap.A-10);if(yt>=charCodeMap.a&&yt<=charCodeMap.f)return yt-(charCodeMap.a-10)}function pad$1(yt,_e={}){const{dir:$t,size:Ft=32}=_e;if(Ft===0)return yt;if(yt.length>Ft)throw new SizeExceedsPaddingSizeError({size:yt.length,targetSize:Ft,type:"Bytes"});const Vt=new Uint8Array(Ft);for(let qt=0;qt<Ft;
265qt++){const zt=$t==="right";Vt[zt?qt:Ft-qt-1]=yt[zt?qt:yt.length-qt-1]}return Vt}function assertSize(yt,_e){if(size$1(yt)>_e)throw new SizeOverflowError$1({givenSize:size$1(yt),maxSize:_e})}function pad(yt,_e={}){const{dir:$t,size:Ft=32}=_e;if(Ft===0)return yt;const Vt=yt.replace("0x","");if(Vt.length>Ft*2)throw new SizeExceedsPaddingSizeError$1({size:Math.ceil(Vt.length/2),targetSize:Ft,type:"Hex"});return`0x${Vt[$t==="right"?"padEnd":"padStart"](Ft*2,"0")}`}const encoder$1=new TextEncoder,hexes=Array.from({length:256},(yt,_e)=>_e.toString(16).padStart(2,"0"));function assert$2(yt,_e={}){const{strict:$t=!1}=_e;if(!yt)throw new InvalidHexTypeError(yt);if(typeof yt!="string")throw new InvalidHexTypeError(yt);if($t&&!/^0x[0-9a-fA-F]*$/.test(yt))throw new InvalidHexValueError(yt);if(!yt.startsWith("0x"))throw new InvalidHexValueError(yt)}assert$2.parseError=yt=>yt;function concat(...yt){return`0x${yt.reduce((_e,$t)=>_e+$t.replace("0x",""),"")}`}concat.parseError=yt=>yt;function fromBoolean(yt,_e={}){const $t=`0x${Number(yt)}`;return typeof _e.size=="number"?(assertSize($t,_e.size),padLeft$1($t,_e.size)):$t}fromBoolean.parseError=yt=>yt;function fromBytes(yt,_e={}){let $t="";for(let Vt=0;Vt<yt.length;Vt++)$t+=hexes[yt[Vt]];const Ft=`0x${$t}`;return typeof _e.size=="number"?(assertSize(Ft,_e.size),padRight$1(Ft,_e.size)):Ft}fromBytes.parseError=yt=>yt;function fromNumber(yt,_e={}){const{signed:$t,size:Ft}=_e,Vt=BigInt(yt);let qt;Ft?$t?qt=(1n<<BigInt(Ft)*8n-1n)-1n:qt=2n**(BigInt(Ft)*8n)-1n:typeof yt=="number"&&(qt=BigInt(Number.MAX_SAFE_INTEGER));const zt=typeof qt=="bigint"&&$t?-qt-1n:0;if(qt&&Vt>qt||Vt<zt){const Gt=typeof yt=="bigint"?"n":"";throw new IntegerOutOfRangeError({max:qt?`${qt}${Gt}`:void 0,min:`${zt}${Gt}`,signed:$t,size:Ft,value:`${yt}${Gt}`})}const Kt=`0x${($t&&Vt<0?(1n<<BigInt(Ft*8))+BigInt(Vt):Vt).toString(16)}`;return Ft?padLeft$1(Kt,Ft):Kt}fromNumber.parseError=yt=>yt;function fromString$1(yt,_e={}){return fromBytes(encoder$1.encode(yt),_e)}fromString$1.parseError=yt=>yt;function padLeft$1(yt,_e){return pad(yt,{dir:"left",size:_e})}padLeft$1.parseError=yt=>yt;function padRight$1(yt,_e){return pad(yt,{dir:"right",size:_e})}padRight$1.parseError=yt=>yt;function size$1(yt){return Math.ceil((yt.length-2)/2)}size$1.parseError=yt=>yt;function validate$1(yt,_e={}){const{strict:$t=!1}=_e;try{return assert$2(yt,{strict:$t}),!0}catch{return!1}}validate$1.parseError=yt=>yt;class IntegerOutOfRangeError extends BaseError{constructor({max:_e,min:$t,signed:Ft,size:Vt,value:qt}){super(`Number \`${qt}\` is not in safe${Vt?` ${Vt*8}-bit`:""}${Ft?" signed":" unsigned"} integer range ${_e?`(\`${$t}\` to \`${_e}\`)`:`(above \`${$t}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class InvalidHexTypeError extends BaseError{constructor(_e){super(`Value \`${typeof _e=="object"?stringify$1(_e):_e}\` of type \`${typeof _e}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class InvalidHexValueError extends BaseError{constructor(_e){super(`Value \`${_e}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}let SizeOverflowError$1=class extends BaseError{constructor({givenSize:_e,maxSize:$t}){super(`Size cannot exceed \`${$t}\` bytes. Given size: \`${_e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}},SizeExceedsPaddingSizeError$1=class extends BaseError{constructor({size:_e,targetSize:$t,type:Ft}){super(`${Ft.charAt(0).toUpperCase()}${Ft.slice(1).toLowerCase()} size (\`${_e}\`) exceeds padding size (\`${$t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}};const encoder=new TextEncoder;function assert$1(yt){if(!(yt instanceof Uint8Array)){if(!yt)throw new InvalidBytesTypeError(yt);if(typeof yt!="object")throw new InvalidBytesTypeError(yt);if(!("BYTES_PER_ELEMENT"in yt))throw new InvalidBytesTypeError(yt);if(yt.BYTES_PER_ELEMENT!==1||yt.constructor.name!=="Uint8Array")throw new InvalidBytesTypeError(yt)}}assert$1.parseError=yt=>yt;function from(yt){return yt instanceof Uint8Array?yt:typeof yt=="string"?fromHex(yt):fromArray(yt)}from.parseError=yt=>yt;function fromArray(yt){return yt instanceof Uint8Array?yt:new Uint8Array(yt)}fromArray.parseError=yt=>yt;function fromHex(yt,_e={}){const{size:$t}=_e;let Ft=yt;$t&&(assertSize(yt,$t),Ft=padRight$1(yt,$t));let Vt=Ft.slice(2);Vt.length%2&&(Vt=`0${Vt}`);const qt=Vt.length/2,zt=new Uint8Array(qt);for(let Ht=0,Kt=0;Ht<qt;Ht++){const Gt=charCodeToBase16(Vt.charCodeAt(Kt++)),Jt=charCodeToBase16(Vt.charCodeAt(Kt++));if(Gt===void 0||Jt===void 0)throw new BaseError(`Invalid byte sequence ("${Vt[Kt-2]}${Vt[Kt-1]}" in "${Vt}").`);zt[Ht]=Gt*16+Jt}return zt}fromHex.parseError=yt=>yt;function fromString(yt,_e={}){const{size:$t}=_e,Ft=encoder.encode(yt);return typeof $t=="number"?(assertSize$1(Ft,$t),padRight(Ft,$t)):Ft}fromString.parseError=yt=>yt;function padRight(yt,_e){return pad$1(yt,{dir:"right",size:_e})}padRight.parseError=yt=>yt;function size(yt){return yt.length}size.parseError=yt=>yt;function validate(yt){try{return assert$1(yt),!0}catch{return!1}}validate.parseError=yt=>yt;class InvalidBytesTypeError extends BaseError{constructor(_e){super(`Value \`${typeof _e=="object"?stringify$1(_e):_e}\` of type \`${typeof _e}
265\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}class SizeOverflowError extends BaseError{constructor({givenSize:_e,maxSize:$t}){super(`Size cannot exceed \`${$t}\` bytes. Given size: \`${_e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}class SizeExceedsPaddingSizeError extends BaseError{constructor({size:_e,targetSize:$t,type:Ft}){super(`${Ft.charAt(0).toUpperCase()}${Ft.slice(1).toLowerCase()} size (\`${_e}\`) exceeds padding size (\`${$t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}}function keccak256(yt,_e={}){const{as:$t=typeof yt=="string"?"Hex":"Bytes"}=_e,Ft=keccak_256(from(yt));return $t==="Bytes"?Ft:fromBytes(Ft)}keccak256.parseError=yt=>yt;class LruMap extends Map{constructor(_e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=_e}get(_e){const $t=super.get(_e);return super.has(_e)&&$t!==void 0&&(this.delete(_e),super.set(_e,$t)),$t}set(_e,$t){if(super.set(_e,$t),this.maxSize&&this.size>this.maxSize){const Ft=this.keys().next().value;Ft&&this.delete(Ft)}return this}}const caches={checksum:new LruMap(8192)},checksum$1=caches.checksum,addressRegex=/^0x[a-fA-F0-9]{40}$/;function assert(yt,_e={}){const{strict:$t=!0}=_e;if(!addressRegex.test(yt))throw new InvalidAddressError({address:yt,cause:new InvalidInputError});if($t){if(yt.toLowerCase()===yt)return;if(checksum(yt)!==yt)throw new InvalidAddressError({address:yt,cause:new InvalidChecksumError})}}assert.parseError=yt=>yt;function checksum(yt){if(checksum$1.has(yt))return checksum$1.get(yt);assert(yt,{strict:!1});const _e=yt.substring(2).toLowerCase(),$t=keccak256(fromString(_e),{as:"Bytes"}),Ft=_e.split("");for(let qt=0;qt<40;qt+=2)$t[qt>>1]>>4>=8&&Ft[qt]&&(Ft[qt]=Ft[qt].toUpperCase()),($t[qt>>1]&15)>=8&&Ft[qt+1]&&(Ft[qt+1]=Ft[qt+1].toUpperCase());const Vt=`0x${Ft.join("")}`;return checksum$1.set(yt,Vt),Vt}checksum.parseError=yt=>yt;class InvalidAddressError extends BaseError{constructor({address:_e,cause:$t}){super(`Address "${_e}" is invalid.`,{cause:$t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class InvalidInputError extends BaseError{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class InvalidChecksumError extends BaseError{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const arrayRegex=/^(.*)\[([0-9]*)\]$/,bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,integerRegex=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function encodePacked(yt,_e){if(yt.length!==_e.length)throw new LengthMismatchError({expectedLength:yt.length,givenLength:_e.length});const $t=[];for(let Ft=0;Ft<yt.length;Ft++){const Vt=yt[Ft],qt=_e[Ft];$t.push(encodePacked.encode(Vt,qt))}return concat(...$t)}(function(yt){function _e($t,Ft,Vt=!1){if($t==="address"){const Kt=Ft;return assert(Kt),padLeft$1(Kt.toLowerCase(),Vt?32:0)}if($t==="string")return fromString$1(Ft);if($t==="bytes")return Ft;if($t==="bool")return padLeft$1(fromBoolean(Ft),Vt?32:1);const qt=$t.match(integerRegex);if(qt){const[Kt,Gt,Jt="256"]=qt,Xt=Number.parseInt(Jt)/8;return fromNumber(Ft,{size:Vt?32:Xt,signed:Gt==="int"})}const zt=$t.match(bytesRegex);if(zt){const[Kt,Gt]=zt;if(Number.parseInt(Gt)!==(Ft.length-2)/2)throw new BytesSizeMismatchError({expectedSize:Number.parseInt(Gt),value:Ft});return padRight$1(Ft,Vt?32:0)}const Ht=$t.match(arrayRegex);if(Ht&&Array.isArray(Ft)){const[Kt,Gt]=Ht,Jt=[];for(let Xt=0;Xt<Ft.length;Xt++)Jt.push(_e(Gt,Ft[Xt],!0));return Jt.length===0?"0x":concat(...Jt)}throw new InvalidTypeError($t)}yt.encode=_e})(encodePacked||(encodePacked={}));encodePacked.parseError=yt=>yt;class BytesSizeMismatchError extends BaseError{constructor({expectedSize:_e,value:$t}
265){super(`Size of bytes "${$t}" (bytes${size$1($t)}) does not match expected size (bytes${_e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class LengthMismatchError extends BaseError{constructor({expectedLength:_e,givenLength:$t}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${_e}`,`Given length (values): ${$t}`].join(` 266`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class InvalidTypeError extends BaseError{constructor(_e){super(`Type \`${_e}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function hashToField(yt){return validate(yt)||validate$1(yt)?hashEncodedBytes(yt):hashString(yt)}function packAndEncode(yt){const[_e,$t]=yt.reduce(([Ft,Vt],[qt,zt])=>(Ft.push(qt),Vt.push(zt),[Ft,Vt]),[[],[]]);return hashEncodedBytes(encodePacked(_e,$t))}function hashString(yt){const _e=Buffer$1.from(yt);return hashEncodedBytes(_e)}function hashEncodedBytes(yt){const _e=BigInt(keccak256(yt,{as:"Hex"}))>>8n,$t=_e.toString(16);return{hash:_e,digest:`0x${$t.padStart(64,"0")}`}}var generateSignal=yt=>!yt||typeof yt=="string"?hashToField(yt??""):packAndEncode(yt.types.map((_e,$t)=>[_e,yt.values[$t]])),encodeAction=yt=>yt?typeof yt=="string"?yt:yt.types.map((_e,$t)=>`${_e}(${yt.values[$t]})`).join(","):"";const __vite_import_meta_env__={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_SUPABASE_ANON_KEY:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImduY3RuZXBvYW92aXBtdXB2YmN1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTA1OTQxMzYsImV4cCI6MjA2NjE3MDEzNn0.OWKPnbe_6zwLq7ezk5SS56iyGtnuH4bsE1mcaLj8qBg",VITE_SUPABASE_URL:"https://gnctnepoaovipmupvbcu.supabase.co",VITE_WORLD_ID_APP_ID:"app_staging_3342b5fc5b58555ca867ff0b669213f3"},{useDebugValue}=React$2,{useSyncExternalStoreWithSelector}=useSyncExternalStoreExports;let didWarnAboutEqualityFn=!1;const identity=yt=>yt;function useStore(yt,_e=identity,$t){(__vite_import_meta_env__?"production":void 0)!=="production"&&$t&&!didWarnAboutEqualityFn&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),didWarnAboutEqualityFn=!0);const Ft=useSyncExternalStoreWithSelector(yt.subscribe,yt.getState,yt.getServerState||yt.getInitialState,_e,$t);return useDebugValue(Ft),Ft}const createImpl=yt=>{(__vite_import_meta_env__?"production":void 0)!=="production"&&typeof yt!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const _e=typeof yt=="function"?createStore(yt):yt,$t=(Ft,Vt)=>useStore(_e,Ft,Vt);return Object.assign($t,_e),$t},create=yt=>yt?createImpl(yt):createImpl;function getDefaultExportFromCjs(yt){return yt&&yt.__esModule&&Object.prototype.hasOwnProperty.call(yt,"default")?yt.default:yt}var browser$c={exports:{}},process=browser$c.exports={},cachedSetTimeout,cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?cachedSetTimeout=setTimeout:cachedSetTimeout=defaultSetTimout}catch{cachedSetTimeout=defaultSetTimout}try{typeof clearTimeout=="function"?cachedClearTimeout=clearTimeout:cachedClearTimeout=defaultClearTimeout}catch{cachedClearTimeout=defaultClearTimeout}})();function runTimeout(yt){if(cachedSetTimeout===setTimeout)return setTimeout(yt,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(yt,0);try{return cachedSetTimeout(yt,0)}catch{try{return cachedSetTimeout.call(null,yt,0)}catch{return cachedSetTimeout.call(this,yt,0)}}}function runClearTimeout(yt){if(cachedClearTimeout===clearTimeout)return clearTimeout(yt);
266if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(yt);try{return cachedClearTimeout(yt)}catch{try{return cachedClearTimeout.call(null,yt)}catch{return cachedClearTimeout.call(this,yt)}}}var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){!draining||!currentQueue||(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var yt=runTimeout(cleanUpNextTick);draining=!0;for(var _e=queue.length;_e;){for(currentQueue=queue,queue=[];++queueIndex<_e;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,_e=queue.length}currentQueue=null,draining=!1,runClearTimeout(yt)}}process.nextTick=function(yt){var _e=new Array(arguments.length-1);if(arguments.length>1)for(var $t=1;$t<arguments.length;$t++)_e[$t-1]=arguments[$t];queue.push(new Item(yt,_e)),queue.length===1&&!draining&&runTimeout(drainQueue)};function Item(yt,_e){this.fun=yt,this.array=_e}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=!0;process.env={};process.argv=[];process.version="";process.versions={};function noop$1(){}process.on=noop$1;process.addListener=noop$1;process.once=noop$1;process.off=noop$1;process.removeListener=noop$1;process.removeAllListeners=noop$1;process.emit=noop$1;process.prependListener=noop$1;process.prependOnceListener=noop$1;process.listeners=function(yt){return[]};process.binding=function(yt){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(yt){throw new Error("process.chdir is not supported")};process.umask=function(){return 0};var browserExports=browser$c.exports;const process$1=getDefaultExportFromCjs(browserExports);var isBrowser$2=typeof window<"u"&&typeof window.document<"u";typeof process$1<"u"&&process$1.versions!=null&&process$1.versions.node!=null;typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&"userAgent"in navigator&&typeof navigator.userAgent=="string"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u";var AppErrorCodes=(yt=>(yt.ConnectionFailed="connection_failed",yt.VerificationRejected="verification_rejected",yt.MaxVerificationsReached="max_verifications_reached",yt.CredentialUnavailable="credential_unavailable",yt.MalformedRequest="malformed_request",yt.InvalidNetwork="invalid_network",yt.InclusionProofFailed="inclusion_proof_failed",yt.InclusionProofPending="inclusion_proof_pending",yt.UnexpectedResponse="unexpected_response",yt.FailedByHostApp="failed_by_host_app",yt.GenericError="generic_error",yt))(AppErrorCodes||{}),VerificationState=(yt=>(yt.PreparingClient="loading_widget",yt.WaitingForConnection="awaiting_connection",yt.WaitingForApp="awaiting_app",yt.Confirmed="confirmed",yt.Failed="failed",yt))(VerificationState||{}),VerificationLevel=(yt=>(yt.Orb="orb",yt.SecureDocument="secure_document",yt.Document="document",yt.Device="device",yt))(VerificationLevel||{});function validate_bridge_url(yt,_e){try{new URL(yt)}catch{return{valid:!1,errors:["Failed to parse Bridge URL."]}}const $t=new URL(yt),Ft=[];return _e&&["localhost","127.0.0.1"].includes($t.hostname)?(console.log("Using staging app_id with localhost bridge_url. Skipping validation."),{valid:!0}):($t.protocol!=="https:"&&Ft.push("Bridge URL must use HTTPS."),$t.port&&Ft.push("Bridge URL must use the default port (443)."),$t.pathname!=="/"&&Ft.push("Bridge URL must not have a path."),$t.search&&Ft.push("Bridge URL must not have query parameters."),$t.hash&&Ft.push("Bridge URL must not have a fragment."),!$t.hostname.endsWith(".worldcoin.org")&&!$t.hostname.endsWith(".toolsforhumanity.com")&&console.warn("Bridge URL should be a subdomain of worldcoin.org or toolsforhumanity.com. The user's identity wallet may refuse to connect. This is a temporary measure and may be removed in the future."),Ft.length?{valid:!1,errors:Ft}:{valid:!0})}var isReactNative$1=()=>typeof navigator<"u"&&navigator.product==="ReactNative",isWeb=()=>isBrowser$2,getGlobalObject=()=>{if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;throw new Error("Unable to locate global object")},getCrypto$1=()=>{const yt=getGlobalObject();if(typeof yt.crypto<"u")return yt.crypto;throw new Error("Crypto API not available. For React Native, ensure polyfills are set up properly.")},DEFAULT_VERIFICATION_LEVEL="orb",buffer_encode=yt=>Buffer$1.from(yt).toString("base64"),buffer_decode=yt=>Buffer$1.from(yt,"base64"),verification_level_to_credential_types=yt=>{switch(yt){case"device":return["orb","device"];case"document":return["document","orb"];case"secure_document":return["secure_document","orb"];case"orb":return["orb"];default:throw new Error(`Unknown verification level: ${yt}`)}},credential_type_to_verification_level=yt=>{switch(yt){case"orb":return"orb";case"secure_document":return"secure_document";case"document":return"document";case"device":return"device";default:throw new Error(`Unknown credential_type: ${yt}`)}},WebCryptoAdapter=class{constructor(){this.encoder=new TextEncoder,this.decoder=new TextDecoder}async generateKey(){return{iv:window.crypto.getRandomValues(new Uint8Array(12)),key:await window.crypto.subtle.generateKey({name:"AES-GCM",length:256},!0,["encrypt","decrypt"])}}async exportKey(yt){return buffer_encode(await window.crypto.subtle.exportKey("raw",yt))}async encryptRequest(yt,_e,$t){return{iv:buffer_encode(_e),payload:buffer_encode(await window.crypto.subtle.encrypt({name:"AES-GCM",iv:_e},yt,this.encoder.encode($t)))}}async decryptResponse(yt,_e,$t){return this.decoder.decode(await window.crypto.subtle.decrypt({
266name:"AES-GCM",iv:_e},yt,buffer_decode($t)))}},ReactNativeCryptoAdapter=class{constructor(){this.encoder=new TextEncoder,this.decoder=new TextDecoder}async generateKey(){const yt=getCrypto$1();return{iv:yt.getRandomValues(new Uint8Array(12)),key:await yt.subtle.generateKey({name:"AES-GCM",length:256},!0,["encrypt","decrypt"])}}async exportKey(yt){const _e=getCrypto$1();return buffer_encode(await _e.subtle.exportKey("raw",yt))}async encryptRequest(yt,_e,$t){const Ft=getCrypto$1();return{iv:buffer_encode(_e),payload:buffer_encode(await Ft.subtle.encrypt({name:"AES-GCM",iv:_e},yt,this.encoder.encode($t)))}}async decryptResponse(yt,_e,$t){const Ft=getCrypto$1();return this.decoder.decode(await Ft.subtle.decrypt({name:"AES-GCM",iv:_e},yt,buffer_decode($t)))}},cryptoAdapterInstance=null,getCryptoAdapter=()=>{if(cryptoAdapterInstance)return cryptoAdapterInstance;if(isWeb())return cryptoAdapterInstance=new WebCryptoAdapter,cryptoAdapterInstance;if(isReactNative$1())return cryptoAdapterInstance=new ReactNativeCryptoAdapter,cryptoAdapterInstance;throw new Error("Unsupported platform")},generateKey$1=async()=>getCryptoAdapter().generateKey(),exportKey=async yt=>getCryptoAdapter().exportKey(yt),encryptRequest=async(yt,_e,$t)=>getCryptoAdapter().encryptRequest(yt,_e,$t),decryptResponse=async(yt,_e,$t)=>getCryptoAdapter().decryptResponse(yt,_e,$t),DEFAULT_BRIDGE_URL="https://bridge.worldcoin.org",createStoreImplementation=(yt,_e)=>({iv:null,key:null,result:null,errorCode:null,requestId:null,connectorURI:null,bridge_url:DEFAULT_BRIDGE_URL,verificationState:"loading_widget",createClient:async({bridge_url:$t,app_id:Ft,verification_level:Vt,action_description:qt,action:zt,signal:Ht,partner:Kt})=>{const{key:Gt,iv:Jt}=await generateKey$1();if($t){const er=validate_bridge_url($t,Ft.includes("staging"));if(!er.valid)throw console.error(er.errors.join(` 267`)),yt({verificationState:"failed"}),new Error("Invalid bridge_url. Please check the console for more details.")}const Xt=await fetch(new URL("/request",$t??DEFAULT_BRIDGE_URL),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(await encryptRequest(Gt,Jt,JSON.stringify({app_id:Ft,action_description:qt,action:encodeAction(zt),signal:generateSignal(Ht).digest,credential_types:verification_level_to_credential_types(Vt??DEFAULT_VERIFICATION_LEVEL),verification_level:Vt??DEFAULT_VERIFICATION_LEVEL})))});if(!Xt.ok)throw yt({verificationState:"failed"}),new Error("Failed to create client");const{request_id:Zt}=await Xt.json();yt({iv:Jt,key:Gt,requestId:Zt,bridge_url:$t??DEFAULT_BRIDGE_URL,verificationState:"awaiting_connection",connectorURI:`https://world.org/verify?t=wld&i=${Zt}&k=${encodeURIComponent(await exportKey(Gt))}${$t&&$t!==DEFAULT_BRIDGE_URL?`&b=${encodeURIComponent($t)}`:""}${Kt?`&partner=${encodeURIComponent(!0)}`:""}`})},pollForUpdates:async()=>{const $t=_e().key;if(!$t)throw new Error("No keypair found. Please call `createClient` first.");const Ft=await fetch(new URL(`/response/${_e().requestId}`,_e().bridge_url));if(!Ft.ok)return yt({errorCode:"connection_failed",verificationState:"failed"});const{response:Vt,status:qt}=await Ft.json();if(qt!="completed")return yt({verificationState:qt=="retrieved"?"awaiting_app":"awaiting_connection"});let zt=JSON.parse(await decryptResponse($t,buffer_decode(Vt.iv),Vt.payload));if("error_code"in zt)return yt({errorCode:zt.error_code,verificationState:"failed"});"credential_type"in zt&&(zt={verification_level:credential_type_to_verification_level(zt.credential_type),...zt}),yt({result:zt,key:null,requestId:null,connectorURI:null,verificationState:"confirmed"})},reset:()=>{yt({iv:null,key:null,result:null,errorCode:null,requestId:null,connectorURI:null,verificationState:"loading_widget"})}}),useWorldBridgeStore=create(createStoreImplementation),qrcode={},utils$4={};let toSJISFunction;const CODEWORDS_COUNT=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];utils$4.getSymbolSize=function(_e){if(!_e)throw new Error('"version" cannot be null or undefined');if(_e<1||_e>40)throw new Error('"version" should be in range from 1 to 40');return _e*4+17};utils$4.getSymbolTotalCodewords=function(_e){return CODEWORDS_COUNT[_e]};utils$4.getBCHDigit=function(yt){let _e=0;for(;yt!==0;)_e++,yt>>>=1;return _e};utils$4.setToSJISFunction=function(_e){if(typeof _e!="function")throw new Error('"toSJISFunc" is not a valid function.');toSJISFunction=_e};utils$4.isKanjiModeEnabled=function(){return typeof toSJISFunction<"u"};utils$4.toSJIS=function(_e){return toSJISFunction(_e)};var errorCorrectionLevel={};(function(yt){yt.L={bit:1},yt.M={bit:0}
vendor: 19,603 bytes, lines 267-270
267,yt.Q={bit:3},yt.H={bit:2};function _e($t){if(typeof $t!="string")throw new Error("Param is not a string");switch($t.toLowerCase()){case"l":case"low":return yt.L;case"m":case"medium":return yt.M;case"q":case"quartile":return yt.Q;case"h":case"high":return yt.H;default:throw new Error("Unknown EC Level: "+$t)}}yt.isValid=function(Ft){return Ft&&typeof Ft.bit<"u"&&Ft.bit>=0&&Ft.bit<4},yt.from=function(Ft,Vt){if(yt.isValid(Ft))return Ft;try{return _e(Ft)}catch{return Vt}}})(errorCorrectionLevel);function BitBuffer$1(){this.buffer=[],this.length=0}BitBuffer$1.prototype={get:function(yt){const _e=Math.floor(yt/8);return(this.buffer[_e]>>>7-yt%8&1)===1},put:function(yt,_e){for(let $t=0;$t<_e;$t++)this.putBit((yt>>>_e-$t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(yt){const _e=Math.floor(this.length/8);this.buffer.length<=_e&&this.buffer.push(0),yt&&(this.buffer[_e]|=128>>>this.length%8),this.length++}};var bitBuffer=BitBuffer$1;function BitMatrix$1(yt){if(!yt||yt<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=yt,this.data=new Uint8Array(yt*yt),this.reservedBit=new Uint8Array(yt*yt)}BitMatrix$1.prototype.set=function(yt,_e,$t,Ft){const Vt=yt*this.size+_e;this.data[Vt]=$t,Ft&&(this.reservedBit[Vt]=!0)};BitMatrix$1.prototype.get=function(yt,_e){return this.data[yt*this.size+_e]};BitMatrix$1.prototype.xor=function(yt,_e,$t){this.data[yt*this.size+_e]^=$t};BitMatrix$1.prototype.isReserved=function(yt,_e){return this.reservedBit[yt*this.size+_e]};var bitMatrix=BitMatrix$1,alignmentPattern={};(function(yt){const _e=utils$4.getSymbolSize;yt.getRowColCoords=function(Ft){if(Ft===1)return[];const Vt=Math.floor(Ft/7)+2,qt=_e(Ft),zt=qt===145?26:Math.ceil((qt-13)/(2*Vt-2))*2,Ht=[qt-7];for(let Kt=1;Kt<Vt-1;Kt++)Ht[Kt]=Ht[Kt-1]-zt;return Ht.push(6),Ht.reverse()},yt.getPositions=function(Ft){const Vt=[],qt=yt.getRowColCoords(Ft),zt=qt.length;for(let Ht=0;Ht<zt;Ht++)for(let Kt=0;Kt<zt;Kt++)Ht===0&&Kt===0||Ht===0&&Kt===zt-1||Ht===zt-1&&Kt===0||Vt.push([qt[Ht],qt[Kt]]);return Vt}})(alignmentPattern);var finderPattern={};const getSymbolSize=utils$4.getSymbolSize,FINDER_PATTERN_SIZE=7;finderPattern.getPositions=function(_e){const $t=getSymbolSize(_e);return[[0,0],[$t-FINDER_PATTERN_SIZE,0],[0,$t-FINDER_PATTERN_SIZE]]};var maskPattern={};(function(yt){yt.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const _e={N1:3,N2:3,N3:40,N4:10};yt.isValid=function(Vt){return Vt!=null&&Vt!==""&&!isNaN(Vt)&&Vt>=0&&Vt<=7},yt.from=function(Vt){return yt.isValid(Vt)?parseInt(Vt,10):void 0},yt.getPenaltyN1=function(Vt){const qt=Vt.size;let zt=0,Ht=0,Kt=0,Gt=null,Jt=null;for(let Xt=0;Xt<qt;Xt++){Ht=Kt=0,Gt=Jt=null;for(let Zt=0;Zt<qt;Zt++){let er=Vt.get(Xt,Zt);er===Gt?Ht++:(Ht>=5&&(zt+=_e.N1+(Ht-5)),Gt=er,Ht=1),er=Vt.get(Zt,Xt),er===Jt?Kt++:(Kt>=5&&(zt+=_e.N1+(Kt-5)),Jt=er,Kt=1)}Ht>=5&&(zt+=_e.N1+(Ht-5)),Kt>=5&&(zt+=_e.N1+(Kt-5))}return zt},yt.getPenaltyN2=function(Vt){const qt=Vt.size;let zt=0;for(let Ht=0;Ht<qt-1;Ht++)for(let Kt=0;Kt<qt-1;Kt++){const Gt=Vt.get(Ht,Kt)+Vt.get(Ht,Kt+1)+Vt.get(Ht+1,Kt)+Vt.get(Ht+1,Kt+1);(Gt===4||Gt===0)&&zt++}return zt*_e.N2},yt.getPenaltyN3=function(Vt){const qt=Vt.size;let zt=0,Ht=0,Kt=0;for(let Gt=0;Gt<qt;Gt++){Ht=Kt=0;for(let Jt=0;Jt<qt;Jt++)Ht=Ht<<1&2047|Vt.get(Gt,Jt),Jt>=10&&(Ht===1488||Ht===93)&&zt++,Kt=Kt<<1&2047|Vt.get(Jt,Gt),Jt>=10&&(Kt===1488||Kt===93)&&zt++}return zt*_e.N3},yt.getPenaltyN4=function(Vt){let qt=0;const zt=Vt.data.length;for(let Kt=0;Kt<zt;Kt++)qt+=Vt.data[Kt];return Math.abs(Math.ceil(qt*100/zt/5)-10)*_e.N4};function $t(Ft,Vt,qt){switch(Ft){case yt.Patterns.PATTERN000:return(Vt+qt)%2===0;case yt.Patterns.PATTERN001:return Vt%2===0;case yt.Patterns.PATTERN010:return qt%3===0;case yt.Patterns.PATTERN011:return(Vt+qt)%3===0;case yt.Patterns.PATTERN100:return(Math.floor(Vt/2)+Math.floor(qt/3))%2===0;case yt.Patterns.PATTERN101:return Vt*qt%2+Vt*qt%3===0;case yt.Patterns.PATTERN110:return(Vt*qt%2+Vt*qt%3)%2===0;case yt.Patterns.PATTERN111:return(Vt*qt%3+(Vt+qt)%2)%2===0;default:throw new Error("bad maskPattern:"+Ft)}}yt.applyMask=function(Vt,qt){const zt=qt.size;for(let Ht=0;Ht<zt;Ht++)for(let Kt=0;Kt<zt;Kt++)qt.isReserved(Kt,Ht)||qt.xor(Kt,Ht,$t(Vt,Kt,Ht))},yt.getBestMask=function(Vt,qt){const zt=Object.keys(yt.Patterns).length;let Ht=0,Kt=1/0;for(let Gt=0;Gt<zt;Gt++){qt(Gt),yt.applyMask(Gt,Vt);const Jt=yt.getPenaltyN1(Vt)+yt.getPenaltyN2(Vt)+yt.getPenaltyN3(Vt)+yt.getPenaltyN4(Vt);yt.applyMask(Gt,Vt),Jt<Kt&&(Kt=Jt,Ht=Gt)}return Ht}})(maskPattern);var errorCorrectionCode={};const ECLevel$1=errorCorrectionLevel,EC_BLOCKS_TABLE=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],EC_CODEWORDS_TABLE=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];errorCorrectionCode.getBlocksCount=function(_e,$t){switch($t){case ECLevel$1.L:return EC_BLOCKS_TABLE[(_e-1)*4+0];case ECLevel$1.M:return EC_BLOCKS_TABLE[(_e-1)*4+1];case ECLevel$1.Q:return EC_BLOCKS_TABLE[(_e-1)*4+2];case ECLevel$1.H:return EC_BLOCKS_TABLE[(_e-1)*4+3];default:return}};errorCorrectionCode.getTotalCodewordsCount=function(_e,$t){switch($t){case ECLevel$1.L:return EC_CODEWORDS_TABLE[(_e-1)*4+0];case ECLevel$1.M:return EC_CODEWORDS_TABLE[(_e-1)*4+1];case ECLevel$1.Q:return EC_CODEWORDS_TABLE[(_e-1)*4+2];case ECLevel$1.H:return EC_CODEWORDS_TABLE[(_e-1)*4+3];default:return}};var polynomial={},galoisField={};const EXP_TABLE=new Uint8Array(512),LOG_TABLE=new Uint8Array(256);(function(){let _e=1;for(let $t=0;$t<255;$t++)EXP_TABLE[$t]=_e,LOG_TABLE[_e]=$t,_e<<=1,_e&256&&(_e^=285);for(let $t=255;$t<512;$t++)EXP_TABLE[$t]=EXP_TABLE[$t-255]})();galoisField.log=function(_e){if(_e<1)throw new Error("log("+_e+")");return LOG_TABLE[_e]};galoisField.exp=function(_e){return EXP_TABLE[_e]};galoisField.mul=function(_e,$t){return _e===0||$t===0?0:EXP_TABLE[LOG_TABLE[_e]+LOG_TABLE[$t]]};(function(yt){const _e=galoisField;yt.mul=function(Ft,Vt){const qt=new Uint8Array(Ft.length+Vt.length-1);for(let zt=0;zt<Ft.length;zt++)for(let Ht=0;Ht<Vt.length;Ht++)qt[zt+Ht]^=_e.mul(Ft[zt],Vt[Ht]);return qt},yt.mod=function(Ft,Vt){let qt=new Uint8Array(Ft);for(;qt.length-Vt.length>=0;){const zt=qt[0];for(let Kt=0;Kt<Vt.length;Kt++)qt[Kt]^=_e.mul(Vt[Kt],zt);let Ht=0;for(;Ht<qt.length&&qt[Ht]===0;)Ht++;qt=qt.slice(Ht)}return qt},yt.generateECPolynomial=function(Ft){let Vt=new Uint8Array([1]);for(let qt=0;qt<Ft;qt++)Vt=yt.mul(Vt,new Uint8Array([1,_e.exp(qt)]));return Vt}})(polynomial);const Polynomial=polynomial;function ReedSolomonEncoder$1(yt){this.genPoly=void 0,this.degree=yt,this.degree&&this.initialize(this.degree)}ReedSolomonEncoder$1.prototype.initialize=function(_e){this.degree=_e,this.genPoly=Polynomial.generateECPolynomial(this.degree)};ReedSolomonEncoder$1.prototype.encode=function(_e){if(!this.genPoly)throw new Error("Encoder not initialized");const $t=new Uint8Array(_e.length+this.degree);$t.set(_e);const Ft=Polynomial.mod($t,this.genPoly),Vt=this.degree-Ft.length;if(Vt>0){const qt=new Uint8Array(this.degree);return qt.set(Ft,Vt),qt}return Ft};var reedSolomonEncoder=ReedSolomonEncoder$1,version$1={},mode={},versionCheck={};versionCheck.isValid=function(_e){return!isNaN(_e)&&_e>=1&&_e<=40};var regex={};const numeric="[0-9]+",alphanumeric="[A-Z $%*+\\-./:]+";let kanji="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";kanji=kanji.replace(/u/g,"\\u");const byte="(?:(?![A-Z0-9 $%*+\\-./:]|"+kanji+`)(?:.|[\r 268]))+`;regex.KANJI=new RegExp(kanji,"g");regex.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");regex.BYTE=new RegExp(byte,"g");regex.NUMERIC=new RegExp(numeric,"g");regex.ALPHANUMERIC=new RegExp(alphanumeric,"g");const TEST_KANJI=new RegExp("^"+kanji+"$"),TEST_NUMERIC=new RegExp("^"+numeric+"$"),TEST_ALPHANUMERIC=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");regex.testKanji=function(_e){return TEST_KANJI.test(_e)};regex.testNumeric=function(_e){return TEST_NUMERIC.test(_e)};regex.testAlphanumeric=function(_e){return TEST_ALPHANUMERIC.test(_e)};(function(yt){const _e=versionCheck,$t=regex;yt.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},yt.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},yt.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},yt.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},yt.MIXED={bit:-1},yt.getCharCountIndicator=function(qt,zt){if(!qt.ccBits)throw new Error("Invalid mode: "+qt);if(!_e.isValid(zt))throw new Error("Invalid version: "+zt);return zt>=1&&zt<10?qt.ccBits[0]:zt<27?qt.ccBits[1]:qt.ccBits[2]},yt.getBestModeForData=function(qt){return $t.testNumeric(qt)?yt.NUMERIC:$t.testAlphanumeric(qt)?yt.ALPHANUMERIC:$t.testKanji(qt)?yt.KANJI:yt.BYTE},yt.toString=function(qt){if(qt&&qt.id)return qt.id;throw new Error("Invalid mode")},yt.isValid=function(qt){return qt&&qt.bit&&qt.ccBits};function Ft(Vt){if(typeof Vt!="string")throw new Error("Param is not a string");switch(Vt.toLowerCase()){case"numeric":return yt.NUMERIC;case"alphanumeric":return yt.ALPHANUMERIC;case"kanji":return yt.KANJI;case"byte":return yt.BYTE;default:throw new Error("Unknown mode: "+Vt)}}yt.from=function(qt,zt){if(yt.isValid(qt))return qt;try{return Ft(qt)}catch{return zt}}})(mode);(function(yt){const _e=utils$4,$t=errorCorrectionCode,Ft=errorCorrectionLevel,Vt=mode,qt=versionCheck,zt=7973,Ht=_e.getBCHDigit(zt);function Kt(Zt,er,tr){for(let rr=1;rr<=40;rr++)if(er<=yt.getCapacity(rr,tr,Zt))return rr}function Gt(Zt,er){return Vt.getCharCountIndicator(Zt,er)+4}function Jt(Zt,er){let tr=0;return Zt.forEach(function(rr){const ar=Gt(rr.mode,er);tr+=ar+rr.getBitsLength()}),tr}function Xt(Zt,er){for(let tr=1;tr<=40;tr++)if(Jt(Zt,tr)<=yt.getCapacity(tr,er,Vt.MIXED))return tr}yt.from=function(er,tr){return qt.isValid(er)?parseInt(er,10):tr},yt.getCapacity=function(er,tr,rr){if(!qt.isValid(er))throw new Error("Invalid QR Code version");typeof rr>"u"&&(rr=Vt.BYTE);const ar=_e.getSymbolTotalCodewords(er),nr=$t.getTotalCodewordsCount(er,tr),cr=(ar-nr)*8;if(rr===Vt.MIXED)return cr;const fr=cr-Gt(rr,er);switch(rr){case Vt.NUMERIC:return Math.floor(fr/10*3);case Vt.ALPHANUMERIC:return Math.floor(fr/11*2);case Vt.KANJI:return Math.floor(fr/13);case Vt.BYTE:default:return Math.floor(fr/8)}},yt.getBestVersionForData=function(er,tr){let rr;const ar=Ft.from(tr,Ft.M);if(Array.isArray(er)){if(er.length>1)return Xt(er,ar);if(er.length===0)return 1;rr=er[0]}else rr=er;return Kt(rr.mode,rr.getLength(),ar)},yt.getEncodedBits=function(er){if(!qt.isValid(er)||er<7)throw new Error("Invalid QR Code version");let tr=er<<12;for(;_e.getBCHDigit(tr)-Ht>=0;)tr^=zt<<_e.getBCHDigit(tr)-Ht;return er<<12|tr}})(version$1);var formatInfo={};const Utils$3=utils$4,G15=1335,G15_MASK=21522,G15_BCH=Utils$3.getBCHDigit(G15);formatInfo.getEncodedBits=function(_e,$t){const Ft=_e.bit<<3|$t;let Vt=Ft<<10;for(;Utils$3.getBCHDigit(Vt)-G15_BCH>=0;)Vt^=G15<<Utils$3.getBCHDigit(Vt)-G15_BCH;return(Ft<<10|Vt)^G15_MASK};var segments={};const Mode$4=mode;function NumericData(yt){this.mode=Mode$4.NUMERIC,this.data=yt.toString()}NumericData.getBitsLength=function(_e){return 10*Math.floor(_e/3)+(_e%3?_e%3*3+1:0)};NumericData.prototype.getLength=function(){return this.data.length};NumericData.prototype.getBitsLength=function(){return NumericData.getBitsLength(this.data.length)};NumericData.prototype.write=function(_e){let $t,Ft,Vt;for($t=0;$t+3<=this.data.length;$t+=3)Ft=this.data.substr($t,3),Vt=parseInt(Ft,10),_e.put(Vt,10);const qt=this.data.length-$t;qt>0&&(Ft=this.data.substr($t),Vt=parseInt(Ft,10),_e.put(Vt,qt*3+1))};var numericData=NumericData;const Mode$3=mode,ALPHA_NUM_CHARS=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function AlphanumericData(yt){this.mode=Mode$3.ALPHANUMERIC,this.data=yt}AlphanumericData.getBitsLength=function(_e){return 11*Math.floor(_e/2)+6*(_e%2)};AlphanumericData.prototype.getLength=function(){return this.data.length};AlphanumericData.prototype.getBitsLength=function(){return AlphanumericData.getBitsLength(this.data.length)};AlphanumericData.prototype.write=function(_e){let $t;for($t=0;$t+2<=this.data.length;$t+=2){let Ft=ALPHA_NUM_CHARS.indexOf(this.data[$t])*45;Ft+=ALPHA_NUM_CHARS.indexOf(this.data[$t+1]),_e.put(Ft,11)}this.data.length%2&&_e.put(ALPHA_NUM_CHARS.indexOf(this.data[$t]),6)};var alphanumericData=AlphanumericData;const Mode$2=mode;function ByteData(yt){this.mode=Mode$2.BYTE,typeof yt=="string"?this.data=new TextEncoder().encode(yt):this.data=new Uint8Array(yt)}ByteData.getBitsLength=function(_e){return _e*8};ByteData.prototype.getLength=function(){return this.data.length};ByteData.prototype.getBitsLength=function(){return ByteData.getBitsLength(this.data.length)};ByteData.prototype.write=function(yt){for(let _e=0,$t=this.data.length;_e<$t;_e++)yt.put(this.data[_e],8)};var byteData=ByteData;const Mode$1=mode,Utils$2=utils$4;function KanjiData(yt){this.mode=Mode$1.KANJI,this.data=yt}KanjiData.getBitsLength=function(_e){return _e*13};KanjiData.prototype.getLength=function(){return this.data.length};KanjiData.prototype.getBitsLength=function(){return KanjiData.getBitsLength(this.data.length)};KanjiData.prototype.write=function(yt){let _e;for(_e=0;_e<this.data.length;_e++){let $t=Utils$2.toSJIS(this.data[_e]);if($t>=33088&&$t<=40956)$t-=33088;else if($t>=57408&&$t<=60351)$t-=49472;else throw new Error("Invalid SJIS character: "+this.data[_e]+` 269Make sure your charset is UTF-8`);$t=($t>>>8&255)*192+($t&255),yt.put($t,13)}};var kanjiData=KanjiData,dijkstra={exports:{}};(function(yt){var _e={single_source_shortest_paths:function($t,Ft,Vt){var qt={},zt={};zt[Ft]=0;var Ht=_e.PriorityQueue.make();Ht.push(Ft,0);for(var Kt,Gt,Jt,Xt,Zt,er,tr,rr,ar;!Ht.empty();){Kt=Ht.pop(),Gt=Kt.value,Xt=Kt.cost,Zt=$t[Gt]||{};for(Jt in Zt)Zt.hasOwnProperty(Jt)&&(er=Zt[Jt],tr=Xt+er,rr=zt[Jt],ar=typeof zt[Jt]>"u",(ar||rr>tr)&&(zt[Jt]=tr,Ht.push(Jt,tr),qt[Jt]=Gt))}if(typeof Vt<"u"&&typeof zt[Vt]>"u"){var nr=["Could not find a path from ",Ft," to ",Vt,"."].join("");throw new Error(nr)}return qt},extract_shortest_path_from_predecessor_list:function($t,Ft){for(var Vt=[],qt=Ft;qt;)Vt.push(qt),$t[qt],qt=$t[qt];return Vt.reverse(),Vt},find_path:function($t,Ft,Vt){var qt=_e.single_source_shortest_paths($t,Ft,Vt);return _e.extract_shortest_path_from_predecessor_list(qt,Vt)},PriorityQueue:{make:function($t){var Ft=_e.PriorityQueue,Vt={},qt;$t=$t||{};for(qt in Ft)Ft.hasOwnProperty(qt)&&(Vt[qt]=Ft[qt]);return Vt.queue=[],Vt.sorter=$t.sorter||Ft.default_sorter,Vt},default_sorter:function($t,Ft){return $t.cost-Ft.cost},push:function($t,Ft){var Vt={value:$t,cost:Ft};this.queue.push(Vt),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};yt.exports=_e})(dijkstra);var dijkstraExports=dijkstra.exports;(function(yt){const _e=mode,$t=numericData,Ft=alphanumericData,Vt=byteData,qt=kanjiData,zt=regex,Ht=utils$4,Kt=dijkstraExports;function Gt(nr){return unescape(encodeURIComponent(nr)).length}function Jt(nr,cr,fr){const vr=[];let xr;for(;(xr=nr.exec(fr))!==null;)vr.push({data:xr[0],index:xr.index,mode:cr,length:xr[0].length});return vr}function Xt(nr){const cr=Jt(zt.NUMERIC,_e.NUMERIC,nr),fr=Jt(zt.ALPHANUMERIC,_e.ALPHANUMERIC,nr);let vr,xr;return Ht.isKanjiModeEnabled()?(vr=Jt(zt.BYTE,_e.BYTE,nr),xr=Jt(zt.KANJI,_e.KANJI,nr)):(vr=Jt(zt.BYTE_KANJI,_e.BYTE,nr),xr=[]),cr.concat(fr,vr,xr).sort(function(Tr,Br){return Tr.index-Br.index}).map(function(Tr){return{data:Tr.data,mode:Tr.mode,length:Tr.length}})}function Zt(nr,cr){switch(cr){case _e.NUMERIC:return $t.getBitsLength(nr);case _e.ALPHANUMERIC:return Ft.getBitsLength(nr);case _e.KANJI:return qt.getBitsLength(nr);case _e.BYTE:return Vt.getBitsLength(nr)}}function er(nr){return nr.reduce(function(cr,fr){const vr=cr.length-1>=0?cr[cr.length-1]:null;return vr&&vr.mode===fr.mode?(cr[cr.length-1].data+=fr.data,cr):(cr.push(fr),cr)},[])}function tr(nr){const cr=[];for(let fr=0;fr<nr.length;fr++){const vr=nr[fr];switch(vr.mode){case _e.NUMERIC:cr.push([vr,{data:vr.data,mode:_e.ALPHANUMERIC,length:vr.length},{data:vr.data,mode:_e.BYTE,length:vr.length}]);break;case _e.ALPHANUMERIC:cr.push([vr,{data:vr.data,mode:_e.BYTE,length:vr.length}]);break;case _e.KANJI:cr.push([vr,{data:vr.data,mode:_e.BYTE,length:Gt(vr.data)}]);break;case _e.BYTE:cr.push([{data:vr.data,mode:_e.BYTE,length:Gt(vr.data)}])}}return cr}function rr(nr,cr){const fr={},vr={start:{}};let xr=["start"];for(let Sr=0;Sr<nr.length;Sr++){const Tr=nr[Sr],Br=[];for(let jr=0;jr<Tr.length;jr++){const Rr=Tr[jr],yr=""+Sr+jr;Br.push(yr),fr[yr]={node:Rr,lastCount:0},vr[yr]={};for(let sr=0;sr<xr.length;sr++){const or=xr[sr];fr[or]&&fr[or].node.mode===Rr.mode?(vr[or][yr]=Zt(fr[or].lastCount+Rr.length,Rr.mode)-Zt(fr[or].lastCount,Rr.mode),fr[or].lastCount+=Rr.length):(fr[or]&&(fr[or].lastCount=Rr.length),vr[or][yr]=Zt(Rr.length,Rr.mode)+4+_e.getCharCountIndicator(Rr.mode,cr))}}xr=Br}for(let Sr=0;Sr<xr.length;Sr++)vr[xr[Sr]].end=0;return{map:vr,table:fr}}function ar(nr,cr){let fr;const vr=_e.getBestModeForData(nr);if(fr=_e.from(cr,vr),fr!==_e.BYTE&&fr.bit<vr.bit)throw new Error('"'+nr+'" cannot be encoded with mode '+_e.toString(fr)+`. 270 Suggested mode is: `+_e.toString(vr));switch(fr===_e.KANJI&&!Ht.isKanjiModeEnabled()&&(fr=_e.BYTE),fr){case _e.NUMERIC:return new $t(nr);case _e.ALPHANUMERIC:return new Ft(nr);case _e.KANJI:return new qt(nr);case _e.BYTE:return new Vt(nr)}}yt.fromArray=function(cr){return cr.reduce(function(fr,vr){return typeof vr=="string"?fr.push(ar(vr,null)):vr.data&&fr.push(ar(vr.data,vr.mode)),fr},[])},yt.fromString=function(cr,fr){const vr=Xt(cr,Ht.isKanjiModeEnabled()),xr=tr(vr),Sr=rr(xr,fr),Tr=Kt.find_path(Sr.map,"start","end"),Br=[];for(let jr=1;jr<Tr.length-1;jr++)Br.push(Sr.table[Tr[jr]].node);return yt.fromArray(er(Br))},yt.rawSplit=function(cr){return yt.fromArray(Xt(cr,Ht.isKanjiModeEnabled()))}})(segments);const Utils$1=utils$4,ECLevel=errorCorrectionLevel,BitBuffer=bitBuffer,BitMatrix=bitMatrix,AlignmentPattern=alignmentPattern,FinderPattern=finderPattern,MaskPattern=maskPattern,ECCode=errorCorrectionCode,ReedSolomonEncoder=reedSolomonEncoder,Version$1=version$1,FormatInfo=formatInfo,Mode=mode,Segments=segments;function setupFinderPattern(yt,_e){const $t=yt.size,Ft=FinderPattern.getPositions(_e);for(let Vt=0;Vt<Ft.length;Vt++){const qt=Ft[Vt][0],zt=Ft[Vt][1];for(let Ht=-1;Ht<=7;Ht++)if(!(qt+Ht<=-1||$t<=qt+Ht))for(let Kt=-1;Kt<=7;Kt++)zt+Kt<=-1||$t<=zt+Kt||(Ht>=0&&Ht<=6&&(Kt===0||Kt===6)||Kt>=0&&Kt<=6&&(Ht===0||Ht===6)||Ht>=2&&Ht<=4&&Kt>
vendor: 4,427 bytes, lines 270-273
270=2&&Kt<=4?yt.set(qt+Ht,zt+Kt,!0,!0):yt.set(qt+Ht,zt+Kt,!1,!0))}}function setupTimingPattern(yt){const _e=yt.size;for(let $t=8;$t<_e-8;$t++){const Ft=$t%2===0;yt.set($t,6,Ft,!0),yt.set(6,$t,Ft,!0)}}function setupAlignmentPattern(yt,_e){const $t=AlignmentPattern.getPositions(_e);for(let Ft=0;Ft<$t.length;Ft++){const Vt=$t[Ft][0],qt=$t[Ft][1];for(let zt=-2;zt<=2;zt++)for(let Ht=-2;Ht<=2;Ht++)zt===-2||zt===2||Ht===-2||Ht===2||zt===0&&Ht===0?yt.set(Vt+zt,qt+Ht,!0,!0):yt.set(Vt+zt,qt+Ht,!1,!0)}}function setupVersionInfo(yt,_e){const $t=yt.size,Ft=Version$1.getEncodedBits(_e);let Vt,qt,zt;for(let Ht=0;Ht<18;Ht++)Vt=Math.floor(Ht/3),qt=Ht%3+$t-8-3,zt=(Ft>>Ht&1)===1,yt.set(Vt,qt,zt,!0),yt.set(qt,Vt,zt,!0)}function setupFormatInfo(yt,_e,$t){const Ft=yt.size,Vt=FormatInfo.getEncodedBits(_e,$t);let qt,zt;for(qt=0;qt<15;qt++)zt=(Vt>>qt&1)===1,qt<6?yt.set(qt,8,zt,!0):qt<8?yt.set(qt+1,8,zt,!0):yt.set(Ft-15+qt,8,zt,!0),qt<8?yt.set(8,Ft-qt-1,zt,!0):qt<9?yt.set(8,15-qt-1+1,zt,!0):yt.set(8,15-qt-1,zt,!0);yt.set(Ft-8,8,1,!0)}function setupData(yt,_e){const $t=yt.size;let Ft=-1,Vt=$t-1,qt=7,zt=0;for(let Ht=$t-1;Ht>0;Ht-=2)for(Ht===6&&Ht--;;){for(let Kt=0;Kt<2;Kt++)if(!yt.isReserved(Vt,Ht-Kt)){let Gt=!1;zt<_e.length&&(Gt=(_e[zt]>>>qt&1)===1),yt.set(Vt,Ht-Kt,Gt),qt--,qt===-1&&(zt++,qt=7)}if(Vt+=Ft,Vt<0||$t<=Vt){Vt-=Ft,Ft=-Ft;break}}}function createData(yt,_e,$t){const Ft=new BitBuffer;$t.forEach(function(Kt){Ft.put(Kt.mode.bit,4),Ft.put(Kt.getLength(),Mode.getCharCountIndicator(Kt.mode,yt)),Kt.write(Ft)});const Vt=Utils$1.getSymbolTotalCodewords(yt),qt=ECCode.getTotalCodewordsCount(yt,_e),zt=(Vt-qt)*8;for(Ft.getLengthInBits()+4<=zt&&Ft.put(0,4);Ft.getLengthInBits()%8!==0;)Ft.putBit(0);const Ht=(zt-Ft.getLengthInBits())/8;for(let Kt=0;Kt<Ht;Kt++)Ft.put(Kt%2?17:236,8);return createCodewords(Ft,yt,_e)}function createCodewords(yt,_e,$t){const Ft=Utils$1.getSymbolTotalCodewords(_e),Vt=ECCode.getTotalCodewordsCount(_e,$t),qt=Ft-Vt,zt=ECCode.getBlocksCount(_e,$t),Ht=Ft%zt,Kt=zt-Ht,Gt=Math.floor(Ft/zt),Jt=Math.floor(qt/zt),Xt=Jt+1,Zt=Gt-Jt,er=new ReedSolomonEncoder(Zt);let tr=0;const rr=new Array(zt),ar=new Array(zt);let nr=0;const cr=new Uint8Array(yt.buffer);for(let Tr=0;Tr<zt;Tr++){const Br=Tr<Kt?Jt:Xt;rr[Tr]=cr.slice(tr,tr+Br),ar[Tr]=er.encode(rr[Tr]),tr+=Br,nr=Math.max(nr,Br)}const fr=new Uint8Array(Ft);let vr=0,xr,Sr;for(xr=0;xr<nr;xr++)for(Sr=0;Sr<zt;Sr++)xr<rr[Sr].length&&(fr[vr++]=rr[Sr][xr]);for(xr=0;xr<Zt;xr++)for(Sr=0;Sr<zt;Sr++)fr[vr++]=ar[Sr][xr];return fr}function createSymbol(yt,_e,$t,Ft){let Vt;if(Array.isArray(yt))Vt=Segments.fromArray(yt);else if(typeof yt=="string"){let Gt=_e;if(!Gt){const Jt=Segments.rawSplit(yt);Gt=Version$1.getBestVersionForData(Jt,$t)}Vt=Segments.fromString(yt,Gt||40)}else throw new Error("Invalid data");const qt=Version$1.getBestVersionForData(Vt,$t);if(!qt)throw new Error("The amount of data is too big to be stored in a QR Code");if(!_e)_e=qt;else if(_e<qt)throw new Error(` 271The chosen QR Code version cannot contain this amount of data. 272Minimum version required to store current data is: `+qt+`. 273`);const zt=createData(_e,$t,Vt),Ht=Utils$1.getSymbolSize(_e),Kt=new BitMatrix(Ht);return setupFinderPattern(Kt,_e),setupTimingPattern(Kt),setupAlignmentPattern(Kt,_e),setupFormatInfo(Kt,$t,0),_e>=7&&setupVersionInfo(Kt,_e),setupData(Kt,zt),isNaN(Ft)&&(Ft=MaskPattern.getBestMask(Kt,setupFormatInfo.bind(null,Kt,$t))),MaskPattern.applyMask(Ft,Kt),setupFormatInfo(Kt,$t,Ft),{modules:Kt,version:_e,errorCorrectionLevel:$t,maskPattern:Ft,segments:Vt}}qrcode.create=function(_e,$t){if(typeof _e>"u"||_e==="")throw new Error("No input text");let Ft=ECLevel.M,Vt,qt;return typeof $t<"u"&&(Ft=ECLevel.from($t.errorCorrectionLevel,ECLevel.M),Vt=Version$1.from($t.version),qt=MaskPattern.from($t.maskPattern),$t.toSJISFunc&&Utils$1.setToSJISFunction($t.toSJISFunc)),createSymbol(_e,Vt,Ft,qt)};var translations={},getLang=()=>{if(!(navigator!=null&&navigator.languages))return;const yt=navigator.languages.find(_e=>translations[_e]!=null)??"";return translations[yt]},replaceParams=(yt,_e)=>{let $t=yt;for(const[Ft,Vt]of Object.entries(_e??{}))$t=yt.replace(`:${Ft}`,Vt);return $t};function __(yt,_e){var $t;return typeof navigator>"u"?yt:replaceParams((($t=getLang())==null?void 0:$t[yt])??yt,_e)}var SELF_HOSTED_APP_ID="self_hosted",useIDKitStore=createWithEqualityFn()((yt,_e)=>({app_id:"",signal:"",action:"",action_description:"",bridge_url:"",verification_level:DEFAULT_
273VERIFICATION_LEVEL,partner:!1,open:!1,result:null,errorTitle:"",errorDetail:"",autoClose:!0,errorState:null,processing:!1,errorCallbacks:{},verifyCallbacks:{},successCallbacks:{},stage:"WORLD_ID",setStage:$t=>yt({stage:$t}),setErrorState:$t=>yt({errorState:$t}),setProcessing:$t=>yt({processing:$t}),retryFlow:()=>{yt({stage:"WORLD_ID",errorState:null})},addErrorCallback:($t,Ft)=>{yt(Vt=>(Vt.errorCallbacks[Ft]=$t,Vt))},addSuccessCallback:($t,Ft)=>{yt(Vt=>(Vt.successCallbacks[Ft]=$t,Vt))},addVerificationCallback:($t,Ft)=>{yt(Vt=>(Vt.verifyCallbacks[Ft]=$t,Vt))},setOptions:({handleVerify:$t,onSuccess:Ft,signal:Vt,action:qt,app_id:zt,partner:Ht,onError:Kt,verification_level:Gt,action_description:Jt,bridge_url:Xt,autoClose:Zt,advanced:er},tr)=>{yt({signal:Vt,action:qt,bridge_url:Xt,action_description:Jt,autoClose:Zt??!0,app_id:er!=null&&er.self_hosted?SELF_HOSTED_APP_ID:zt,verification_level:Gt??DEFAULT_VERIFICATION_LEVEL,partner:Ht}),_e().addSuccessCallback(Ft,tr),Kt&&_e().addErrorCallback(Kt,tr),$t&&_e().addVerificationCallback($t,tr)},handleVerify:$t=>{yt({stage:"HOST_APP_VERIFICATION",processing:!1}),Promise.all(Object.values(_e().verifyCallbacks).map(async Ft=>Ft==null?void 0:Ft($t))).then(()=>{yt({stage:"SUCCESS",result:$t}),_e().autoClose&&setTimeout(()=>_e().onOpenChange(!1),2500)},Ft=>{let Vt;Ft&&typeof Ft=="object"&&Ft.message&&(Vt=Ft.message),yt({stage:"ERROR",errorState:{code:AppErrorCodes.FailedByHostApp,message:Vt?__(Vt):void 0}})})},onOpenChange:$t=>{if($t)return yt({open:$t});const Ft=_e().errorState;if(_e().stage==="ERROR"&&Ft){const qt=_e().errorCallbacks;requestAnimationFrame(()=>Object.values(qt).forEach(zt=>void(zt==null?void 0:zt(Ft))))}const Vt=_e().result;if(_e().stage=="SUCCESS"&&Vt){const qt=_e().successCallbacks;requestAnimationFrame(()=>Object.values(qt).forEach(zt=>void(zt==null?void 0:zt(Vt))))}yt({open:$t,result:null,errorState:null,processing:!1,stage:"WORLD_ID"})}}),shallow$1),idkit_default=useIDKitStore,generateMatrix=yt=>{const _e=qrcode.create(yt,{errorCorrectionLevel:"M"}).modules.data,$t=Math.sqrt(_e.length);return _e.reduce((Ft,Vt,qt)=>(qt%$t===0?Ft.push([Vt]):Ft[Ft.length-1].push(Vt),Ft),[])},Qrcode=({data:yt,size:_e=300})=>{const $t=reactExports.useMemo(()=>{const Ft=[],Vt=generateMatrix(yt),qt=_e/Vt.length;return[{x:0,y:0},{x:1,y:0},{x:0,y:1}].forEach(({x:Ht,y:Kt})=>{const Gt=(Vt.length-7)*qt*Ht,Jt=(Vt.length-7)*qt*Kt;for(let Xt=0;Xt<3;Xt++)Ft.push(jsxRuntimeExports.jsx("rect",{fill:"currentColor",x:Gt+qt*Xt,y:Jt+qt*Xt,width:qt*(7-Xt*2),height:qt*(7-Xt*2),rx:(Xt-2)*-5,ry:(Xt-2)*-5,className:Xt%3===0?"text-black":Xt%3===1?"text-white":"text-black"},`${Xt}-${Ht}-${Kt}`))}),Vt.forEach((Ht,Kt)=>{Ht.forEach((Gt,Jt)=>{Vt[Kt][Jt]&&(Kt<7&&Jt<7||Kt>Vt.length-8&&Jt<7||Kt<7&&Jt>Vt.length-8||Ft.push(jsxRuntimeExports.jsx("circle",{fill:"currentColor",r:qt/3,cx:Kt*qt+qt/2,cy:Jt*qt+qt/2,className:"text-black dark:text-white"},`circle-${Kt}-${Jt}`)))})}),Ft},[_e,yt]);return jsxRuntimeExports.jsx("svg",{height:_e,width:_e,"data-test-id":"qr-code",children:$t})},QRCode_default=reactExports.memo(Qrcode),reactDomServerLegacy_browser_production_min={};/** 274 * @license React 275 * react-dom-server-legacy.browser.production.min.js 276 * 277 * Copyright (c) Facebook, Inc. and its affiliates. 278 * 279 * This source code is licensed under the MIT license found in the 280 * LICENSE file in the root directory of this source tree. 281 */var aa$1=reactExports;function l$3(yt){for(var _e="https://reactjs.org/docs/error-decoder.html?invariant="+yt,$t=1;$t<arguments.length;$t++)_e+="&args[]="+encodeURIComponent(arguments[$t]);return"Minified React error #"+yt+"; visit "+_e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p$3=Object.prototype.hasOwnProperty,fa$1=/^[: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]*$/,ha$1={},ia$1={};function ja$1(yt){return p$3.call(ia$1,yt)?!0:p$3.call(ha$1,yt)?!1:fa$1.test(yt)?ia$1[yt]=!0:(ha$1[yt]=!0,!1)}function r$2(yt,_e,$t,Ft,Vt,qt,zt){this.acceptsBooleans=_e===2||_e===3||_e===4,this.attributeName=Ft,this.attributeNamespace=Vt,this.mustUseProperty=$t,this.propertyName=yt,this.type=_e,this.sanitizeURL=qt,this.removeEmptyString=zt}var t$1={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(yt){t$1[yt]=new r$2(yt,0,!1,yt,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEac
vendor: 51,517 bytes, lines 281-299
281h(function(yt){var _e=yt[0];t$1[_e]=new r$2(_e,1,!1,yt[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(yt){t$1[yt]=new r$2(yt,2,!1,yt.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(yt){t$1[yt]=new r$2(yt,2,!1,yt,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(yt){t$1[yt]=new r$2(yt,3,!1,yt.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(yt){t$1[yt]=new r$2(yt,3,!0,yt,null,!1,!1)});["capture","download"].forEach(function(yt){t$1[yt]=new r$2(yt,4,!1,yt,null,!1,!1)});["cols","rows","size","span"].forEach(function(yt){t$1[yt]=new r$2(yt,6,!1,yt,null,!1,!1)});["rowSpan","start"].forEach(function(yt){t$1[yt]=new r$2(yt,5,!1,yt.toLowerCase(),null,!1,!1)});var ka$1=/[\-:]([a-z])/g;function la$1(yt){return yt[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(yt){var _e=yt.replace(ka$1,la$1);t$1[_e]=new r$2(_e,1,!1,yt,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(yt){var _e=yt.replace(ka$1,la$1);t$1[_e]=new r$2(_e,1,!1,yt,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(yt){var _e=yt.replace(ka$1,la$1);t$1[_e]=new r$2(_e,1,!1,yt,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(yt){t$1[yt]=new r$2(yt,1,!1,yt.toLowerCase(),null,!1,!1)});t$1.xlinkHref=new r$2("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(yt){t$1[yt]=new r$2(yt,1,!1,yt.toLowerCase(),null,!0,!0)});var u$2={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},ma=["Webkit","ms","Moz","O"];Object.keys(u$2).forEach(function(yt){ma.forEach(function(_e){_e=_e+yt.charAt(0).toUpperCase()+yt.substring(1),u$2[_e]=u$2[yt]})});var na=/["'&<>]/;function v$2(yt){if(typeof yt=="boolean"||typeof yt=="number")return""+yt;yt=""+yt;var _e=na.exec(yt);if(_e){var $t="",Ft,Vt=0;for(Ft=_e.index;Ft<yt.length;Ft++){switch(yt.charCodeAt(Ft)){case 34:_e=""";break;case 38:_e="&";break;case 39:_e="'";break;case 60:_e="<";break;case 62:_e=">";break;default:continue}Vt!==Ft&&($t+=yt.substring(Vt,Ft)),Vt=Ft+1,$t+=_e}yt=Vt!==Ft?$t+yt.substring(Vt,Ft):$t}return yt}var oa$1=/([A-Z])/g,pa$1=/^ms-/,qa$1=Array.isArray;function w$3(yt,_e){return{insertionMode:yt,selectedValue:_e}}function ra$1(yt,_e,$t){switch(_e){case"select":return w$3(1,$t.value!=null?$t.value:$t.defaultValue);case"svg":return w$3(2,null);case"math":return w$3(3,null);case"foreignObject":return w$3(1,null);case"table":return w$3(4,null);case"thead":case"tbody":case"tfoot":return w$3(5,null);case"colgroup":return w$3(7,null);case"tr":return w$3(6,null)}return 4<=yt.insertionMode||yt.insertionMode===0?w$3(1,null):yt}var sa$1=new Map;function ta$1(yt,_e,$t){if(typeof $t!="object")throw Error(l$3(62));_e=!0;for(var Ft in $t)if(p$3.call($t,Ft)){var Vt=$t[Ft];if(Vt!=null&&typeof Vt!="boolean"&&Vt!==""){if(Ft.indexOf("--")===0){var qt=v$2(Ft);Vt=v$2((""+Vt).trim())}else{qt=Ft;var zt=sa$1.get(qt);zt!==void 0||(zt=v$2(qt.replace(oa$1,"-$1").toLowerCase().replace(pa$1,"-ms-")),sa$1.set(qt,zt)),qt=zt,Vt=typeof Vt=="number"?Vt===0||p$3.call(u$2,Ft)?""+Vt:Vt+"px":v$2((""+Vt).trim())}_e?(_e=!1,yt.push(' style="',qt,":",Vt)):yt.push(";",qt,":",Vt)}}_e||yt.push('"')}function x$3(yt,_e,$t,Ft){switch($t){case"style":ta$1(yt,_e,Ft);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<$t.length)||$t[0]!=="o"&&$t[0]!=="O"||$t[1]!=="n"&&$t[1]!=="N"){if(_e=t$1.hasOwnProperty($t)?t$1[$t]:null,_e!==null){switch(typeof Ft){case"function":case"symbol":return;case"boolean":if(!_e.acceptsBooleans)return}switch($t=_e.attributeName,_e.type){case 3:Ft&&yt.push(" ",$t,'=""');break;case 4:Ft===!0?yt.push(" ",$t,'=""'):Ft!==!1&&yt.push(" ",$t,'="',v$2(Ft),'"');break;case 5:isNaN(Ft)||yt.push(" ",$t,'="',v$2(Ft),'"');break;case 6:!isNaN(Ft)&&1<=Ft&&yt.push(" ",$t,'="',v$2(Ft),'"');break;default:_e.sanitizeURL&&(Ft=""+Ft),yt.push(" ",$t,'="',v$2(Ft),'"')}}else if(ja$1($t)){switch(typeof Ft){case"function":case"symbol":return;case"boolean":if(_e=$t.toLowerCase().slice(0,5),_e!=="data-"&&_e!=="aria-")return}yt.push(" ",$t,'="',v$2(Ft),'"')}}}function y$3(yt,_e,$t){if(_e!=null){if($t!=null)throw Error(l$3(60));if(typeof _e!="object"||!("__html"in _e))throw Error(l$3(61));_e=_e.__html,_e!=null&&yt.push(""+_e)}}function ua$1(yt){var _e="";return aa$1.Children.forEach(yt,function($t){$t!=null&&(_e+=$t)}),_e}function va$1(yt,_e,$t,Ft){yt.push(A$1($t));var Vt=$t=null,qt;for(qt in _e)if(p$3.call(_e,qt)){var zt=_e[qt];if(zt!=null)switch(qt){case"children":$t=zt;break;case"dangerouslySetInnerHTML":Vt=zt;break;default:x$3(yt,Ft,qt,zt)}}return yt.push(">"),y$3(yt,Vt,$t),typeof $t=="string"?(yt.push(v$2($t)),null):$t}var wa$1=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,xa$1=new Map;function A$1(yt){var _e=xa$1.get(yt);if(_e===void 0){if(!wa$1.test(yt))throw Error(l$3(65,yt));_e="<"+yt,xa$1.set(yt,_e)}return _e}function ya$1(yt,_e,$t,Ft,Vt){switch(_e){case"select":yt.push(A$1("select"));var qt=null,zt=null;for(Jt in $t)if(p$3.call($t,Jt)){var Ht=$t[Jt];if(Ht!=null)switch(Jt){case"children":qt=Ht;break;case"dangerouslySetInnerHTML":zt=Ht;break;case"defaultValue":case"value":break;default:x$3(yt,Ft,Jt,Ht)}}return yt.push(">"),y$3(yt,zt,qt),qt;case"option":zt=Vt.selectedValue,yt.push(A$1("option"));var Kt=Ht=null,Gt=null,Jt=null;for(qt in $t)if(p$3.call($t,qt)){var Xt=$t[qt];if(Xt!=null)switch(qt){case"children":Ht=Xt;break;case"selected":Gt=Xt;break;case"dangerouslySetInnerHTML":Jt=Xt;break;case"value":Kt=Xt;default:x$3(yt,Ft,qt,Xt)}}if(zt!=null)if($t=Kt!==null?""+Kt:ua$1(Ht),qa$1(zt)){for(Ft=0;Ft<zt.length;Ft++)if(""+zt[Ft]===$t){yt.push(' selected=""');break}}else""+zt===$t&&yt.push(' selected=""');else Gt&&yt.push(' selected=""');return yt.push(">"),y$3(yt,Jt,Ht),Ht;case"textarea":yt.push(A$1("textarea")),Jt=zt=qt=null;for(Ht in $t)if(p$3.call($t,Ht)&&(Kt=$t[Ht],Kt!=null))switch(Ht){case"children":Jt=Kt;break;case"value":qt=Kt;break;case"defaultValue":zt=Kt;break;case"dangerouslySetInnerHTML":throw Error(l$3(91));default:x$3(yt,Ft,Ht,Kt)}if(qt===null&&zt!==null&&(qt=zt),yt.push(">"),Jt!=null){if(qt!=null)throw Error(l$3(92));if(qa$1(Jt)&&1<Jt.length)throw Error(l$3(93));qt=""+Jt}return typeof qt=="string"&&qt[0]===` 282`&&yt.push(` 283`),qt!==null&&yt.push(v$2(""+qt)),null;case"input":yt.push(A$1("input")),Kt=Jt=Ht=qt=null;for(zt in $t)if(p$3.call($t,zt)&&(Gt=$t[zt],Gt!=null))switch(zt){case"children":case"dangerouslySetInnerHTML":throw Error(l$3(399,"input"));case"defaultChecked":Kt=Gt;break;case"defaultValue":Ht=Gt;break;case"checked":Jt=Gt;break;case"value":qt=Gt;break;default:x$3(yt,Ft,zt,Gt)}return Jt!==null?x$3(yt,Ft,"checked",Jt):Kt!==null&&x$3(yt,Ft,"checked",Kt),qt!==null?x$3(yt,Ft,"value",qt):Ht!==null&&x$3(yt,Ft,"value",Ht),yt.push("/>"),null;case"menuitem":yt.push(A$1("menuitem"));for(var Zt in $t)if(p$3.call($t,Zt)&&(qt=$t[Zt],qt!=null))switch(Zt){case"children":case"dangerouslySetInnerHTML":throw Error(l$3(400));default:x$3(yt,Ft,Zt,qt)}return yt.push(">"),null;case"title":yt.push(A$1("title")),qt=null;for(Xt in $t)if(p$3.call($t,Xt)&&(zt=$t[Xt],zt!=null))switch(Xt){case"children":qt=zt;break;case"dangerouslySetInnerHTML":throw Error(l$3(434));default:x$3(yt,Ft,Xt,zt)}return yt.push(">"),qt;case"listing":case"pre":yt.push(A$1(_e)),zt=qt=null;for(Kt in $t)if(p$3.call($t,Kt)&&(Ht=$t[Kt],Ht!=null))switch(Kt){case"children":qt=Ht;break;case"dangerouslySetInnerHTML":zt=Ht;break;default:x$3(yt,Ft,Kt,Ht)}if(yt.push(">"),zt!=null){if(qt!=null)throw Error(l$3(60));if(typeof zt!="object"||!("__html"in zt))throw Error(l$3(61));$t=zt.__html,$t!=null&&(typeof $t=="string"&&0<$t.length&&$t[0]===` 284`?yt.push(` 285`,$t):yt.push(""+$t))}return typeof qt=="string"&&qt[0]===` 286`&&yt.push(` 287`),qt;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":yt.push(A$1(_e));for(var er in $t)if(p$3.call($t,er)&&(qt=$t[er],qt!=null))switch(er){case"children":case"dangerouslySetInnerHTML":throw Error(l$3(399,_e));default:x$3(yt,Ft,er,qt)}return yt.push("/>"),null;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 va$1(yt,$t,_e,Ft);case"html":return Vt.insertionMode===0&&yt.push("<!DOCTYPE html>"),va$1(yt,$t,_e,Ft);default:if(_e.indexOf("-")===-1&&typeof $t.is!="string")return va$1(yt,$t,_e,Ft);yt.push(A$1(_e)),zt=qt=null;for(Gt in $t)if(p$3.call($t,Gt)&&(Ht=$t[Gt],Ht!=null))switch(Gt){case"children":qt=Ht;break;case"dangerouslySetInnerHTML":zt=Ht;break;case"style":ta$1(yt,Ft,Ht);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:ja$1(Gt)&&typeof Ht!="function"&&typeof Ht!="symbol"&&yt.push(" ",Gt,'="',v$2(Ht),'"')}return yt.push(">"),y$3(yt,zt,qt),qt}}function za$1(yt,_e,$t){if(yt.push('<!--$?--><template id="'),$t===null)throw Error(l$3(395));return yt.push($t),yt.push('"></template>')}function Aa$1(yt,_e,$t,Ft){switch($t.insertionMode){case 0:case 1:return yt.push('<div hidden id="'),yt.push(_e.segmentPrefix),_e=Ft.toString(16),yt.push(_e),yt.push('">');case 2:return yt.push('<svg aria-hidden="true" style="display:none" id="'),yt.push(_e.segmentPrefix),_e=Ft.toString(16),yt.push(_e),yt.push('">');case 3:return yt.push('<math aria-hidden="true" style="display:none" id="'),yt.push(_e.segmentPrefix),_e=Ft.toString(16),yt.push(_e),yt.push('">');case 4:return yt.push('<table hidden id="'),yt.push(_e.segmentPrefix),_e=Ft.toString(16),yt.push(_e),yt.push('">');case 5:return yt.push('<table hidden><tbody id="'),yt.push(_e.segmentPrefix),_e=Ft.toString(16),yt.push(_e),yt.push('">');case 6:return yt.push('<table hidden><tr id="'),yt.push(_e.segmentPrefix),_e=Ft.toString(16),yt.push(_e),yt.push('">');case 7:return yt.push('<table hidden><colgroup id="'),yt.push(_e.segmentPrefix),_e=Ft.toString(16),yt.push(_e),yt.push('">');default:throw Error(l$3(397))}}function Ba$1(yt,_e){switch(_e.insertionMode){case 0:case 1:return yt.push("</div>");case 2:return yt.push("</svg>");case 3:return yt.push("</math>");case 4:return yt.push("</table>");case 5:return yt.push("</tbody></table>");case 6:return yt.push("</tr></table>");case 7:return yt.push("</colgroup></table>");default:throw Error(l$3(397))}}var Ca$1=/[<\u2028\u2029]/g;function Da$1(yt){return JSON.stringify(yt).replace(Ca$1,function(_e){switch(_e){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}function Ea$1(yt,_e){return _e=_e===void 0?"":_e,{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:_e+"P:",segmentPrefix:_e+"S:",boundaryPrefix:_e+"B:",idPrefix:_e,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:yt}}function Fa$1(yt,_e,$t,Ft){return $t.generateStaticMarkup?(yt.push(v$2(_e)),!1):(_e===""?yt=Ft:(Ft&&yt.push("<!-- -->"),yt.push(v$2(_e)),yt=!0),yt)}var B$2=Object.assign,Ga$1=Symbol.for("react.element"),Ha$1=Symbol.for("react.portal"),Ia$1=Symbol.for("react.fragment"),Ja$1=Symbol.for("react.strict_mode"),Ka$1=Symbol.for("react.profiler"),La$1=Symbol.for("react.provider"),Ma$1=Symbol.for("react.context"),Na$1=Symbol.for("react.forward_ref"),Oa$1=Symbol.for("react.suspense"),Pa$1=Symbol.for("react.suspense_list"),Qa$1=Symbol.for("react.memo"),Ra$1=Symbol.for("react.lazy"),Sa$1=Symbol.for("react.scope"),Ta$1=Symbol.for("react.debug_trace_mode"),Ua$1=Symbol.for("react.legacy_hidden"),Va$1=Symbol.for("react.default_value"),Wa$1=Symbol.iterator;function Xa$1(yt){if(yt==null)return null;if(typeof yt=="function")return yt.displayName||yt.name||null;if(typeof yt=="string")return yt;switch(yt){case Ia$1:return"Fragment";case Ha$1:return"Portal";case Ka$1:return"Profiler";case Ja$1:return"StrictMode";case Oa$1:return"Suspense";case Pa$1:return"SuspenseList"}if(typeof yt=="object")switch(yt.$$typeof){case Ma$1:return(yt.displayName||"Context")+".Consumer";case La$1:return(yt._context.displayName||"Context")+".Provider";case Na$1:var _e=yt.render;return yt=yt.displayName,yt||(yt=_e.displayName||_e.name||"",yt=yt!==""?"ForwardRef("+yt+")":"ForwardRef"),yt;case Qa$1:return _e=yt.displayName||null,_e!==null?_e:Xa$1(yt.type)||"Memo";case Ra$1:_e=yt._payload,yt=yt._init;try{return Xa$1(yt(_e))}catch{}}return null}var Ya$1={};function Za$1(yt,_e){if(yt=yt.contextTypes,!yt)return Ya$1;var $t={},Ft;for(Ft in yt)$t[Ft]=_e[Ft];return $t}var E$3=null;function F$1(yt,_e){if(yt!==_e){yt.context._currentValue2=yt.parentValue,yt=yt.parent;var $t=_e.parent;if(yt===null){if($t!==null)throw Error(l$3(401))}else{if($t===null)throw Error(l$3(401));F$1(yt,$t)}_e.context._currentValue2=_e.value}}function $a$1(yt){yt.context._currentValue2=yt.parentValue,yt=yt.parent,yt!==null&&$a$1(yt)}function ab$1(yt){var _e=yt.parent;_e!==null&&ab$1(_e),yt.context._currentValue2=yt.value}function bb$1(yt,_e){if(yt.context._currentValue2=yt.parentValue,yt=yt.parent,yt===null)throw Error(l$3(402));yt.depth===_e.depth?F$1(yt,_e):bb$1(yt,_e)}function cb$1(yt,_e){var $t=_e.parent;if($t===null)throw Error(l$3(402));yt.depth===$t.depth?F$1(yt,$t):cb$1(yt,$t),_e.context._currentValue2=_e.value}function G$1(yt){var _e=E$3;_e!==yt&&(_e===null?ab$1(yt):yt===null?$a$1(_e):_e.depth===yt.depth?F$1(_e,yt):_e.depth>yt.depth?bb$1(_e,yt):cb$1(_e,yt),E$3=yt)}var db$1={isMounted:function(){return!1},enqueueSetState:function(yt,_e){yt=yt._reactInternals,yt.queue!==null&&yt.queue.push(_e)},enqueueReplaceState:function(yt,_e){yt=yt._reactInternals,yt.replace=!0,yt.queue=[_e]},enqueueForceUpdate:function(){}};function eb$1(yt,_e,$t,Ft){var Vt=yt.state!==void 0?yt.state:null;yt.updater=db$1,yt.props=$t,yt.state=Vt;var qt={queue:[],replace:!1};yt._reactInternals=qt;var zt=_e.contextType;if(yt.context=typeof zt=="object"&&zt!==null?zt._currentValue2:Ft,zt=_e.getDerivedStateFromProps,typeof zt=="function"&&(zt=zt($t,Vt),Vt=zt==null?Vt:B$2({},Vt,zt),yt.state=Vt),typeof _e.getDerivedStateFromProps!="function"&&typeof yt.getSnapshotBeforeUpdate!="function"&&(typeof yt.UNSAFE_componentWillMount=="function"||typeof yt.componentWillMount=="function"))if(_e=yt.state,typeof yt.componentWillMount=="function"&&yt.componentWillMount(),typeof yt.UNSAFE_componentWillMount=="function"&&yt.UNSAFE_componentWillMount(),_e!==yt.state&&db$1.enqueueReplaceState(yt,yt.state,null),qt.queue!==null&&0<qt.queue.length)if(_e=qt.queue,zt=qt.replace,qt.queue=null,qt.replace=!1,zt&&_e.length===1)yt.state=_e[0];else{for(qt=zt?_e[0]:yt.state,Vt=!0,zt=zt?1:0;zt<_e.length;zt++){var Ht=_e[zt];Ht=typeof Ht=="function"?Ht.call(yt,qt,$t,Ft):Ht,Ht!=null&&(Vt?(Vt=!1,qt=B$2({},qt,Ht)):B$2(qt,Ht))}yt.state=qt}else qt.queue=null}var fb$1={id:1,overflow:""};function gb$1(yt,_e,$t){var Ft=yt.id;yt=yt.overflow;var Vt=32-H$2(Ft)-1;Ft&=~(1<<Vt),$t+=1;var qt=32-H$2(_e)+Vt;if(30<qt){var zt=Vt-Vt%5;return qt=(Ft&(1<<zt)-1).toString(32),Ft>>=zt,Vt-=zt,{id:1<<32-H$2(_e)+Vt|$t<<Vt|Ft,overflow:qt+yt}}return{id:1<<qt|$t<<Vt|Ft,overflow:yt}}var H$2=Math.clz32?Math.clz32:hb$1,ib$1=Math.log,jb$1=Math.LN2;function hb$1(yt){return yt>>>=0,yt===0?32:31-(ib$1(yt)/jb$1|0)|0}function kb$1(yt,_e){return yt===_e&&(yt!==0||1/yt===1/_e)||yt!==yt&&_e!==_e}var lb$1=typeof Object.is=="function"?Object.is:kb$1,I$2=null,ob$1=null,J$2=null,K$2=null,L$2=!1,M$2=!1,N$2=0,O$3=null,P$3=0;function Q$2(){if(I$2===null)throw Error(l$3(321));return I$2}function pb$1(){if(0<P$3)throw Error(l$3(312));return{memoizedState:null,queue:null,next:null}}function qb$1(){return K$2===null?J$2===null?(L$2=!1,J$2=K$2=pb$1()):(L$2=!0,K$2=J$2):K$2.next===null?(L$2=!1,K$2=K$2.next=pb$1()):(L$2=!0,K$2=K$2.next),K$2}function rb$1(){ob$1=I$2=null,M$2=!1,J$2=null,P$3=0,K$2=O$3=null}function sb$1(yt,_e){return typeof _e=="function"?_e(yt):_e}function tb$1(yt,_e,$t){if(I$2=Q$2(),K$2=qb$1(),L$2){var Ft=K$2.queue;if(_e=Ft.dispatch,O$3!==null&&($t=O$3.get(Ft),$t!==void 0)){O$3.delete(Ft),Ft=K$2.memoizedState;do Ft=yt(Ft,$t.action),$t=$t.next;while($t!==null);return K$2.memoizedState=Ft,[Ft,_e]}return[K$2.memoizedState,_e]}return yt=yt===sb$1?typeof _e=="function"?_e():_e:$t!==void 0?$t(_e):_e,K$2.memoizedState=yt,yt=K$2.queue={last:null,dispatch:null},yt=yt.dispatch=ub$1.bind(null,I$2,yt),[K$2.memoizedState,yt]}function vb$1(yt,_e){if(I$2=Q$2(),K$2=qb$1(),_e=_e===void 0?null:_e,K$2!==null){var $t=K$2.memoizedState;if($t!==null&&_e!==null){var Ft=$t[1];e:if(Ft===null)Ft=!1;else{for(var Vt=0;Vt<Ft.length&&Vt<_e.length;Vt++)if(!lb$1(_e[Vt],Ft[Vt])){Ft=!1;break e}Ft=!0}if(Ft)return $t[0]}}return yt=yt(),K$2.memoizedState=[yt,_e],yt}function ub$1(yt,_e,$t){if(25<=P$3)throw Error(l$3(301));if(yt===I$2)if(M$2=!0,yt={action:$t,next:null},O$3===null&&(O$3=new Map),$t=O$3.get(_e),$t===void 0)O$3.set(_e,yt);else{for(_e=$t;_e.next!==null;)_e=_e.next;_e.next=yt}}function wb$1(){throw Error(l$3(394))}function R$2(){}var xb$1={readContext:function(yt){return yt._currentValue2},useContext:function(yt){return Q$2(),yt._currentValue2},useMemo:vb$1,useReducer:tb$1,useRef:function(yt){I$2=Q$2(),K$2=qb$1();var _e=K$2.memoizedState;return _e===null?(yt={current:yt},K$2.memoizedState=yt):_e},useState:function(yt){return tb$1(sb$1,yt)},useInsertionEffect:R$2,useLayoutEffect:function(){},useCallback:function(yt,_e){return vb$1(function(){return yt},_e)},useImperativeHandle:R$2,useEffect:R$2,useDebugValue:R$2,useDeferredValue:function(yt){return Q$2(),yt},useTransition:function(){return Q$2(),[!1,wb$1]},useId:function(){var yt=ob$1.treeContext,_e=yt.overflow;yt=yt.id,yt=(yt&~(1<<32-H$2(yt)-1)).toString(32)+_e;var $t=S$3;if($t===null)throw Error(l$3(404));return _e=N$2++,yt=":"+$t.idPrefix+"R"+yt,0<_e&&(yt+="H"+_e.toString(32)),yt+":"},useMutableSource:function(yt,_e){return Q$2(),_e(yt._source)},useSyncExternalStore:function(yt,_e,$t){if($t===void 0)throw Error(l$3(407));return $t()}},S$3=null,yb$1=aa$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function zb$1(yt){return console.error(yt),null}function T$3(){}function Ab$1(yt,_e,$t,Ft,Vt,qt,zt,Ht,Kt){var Gt=[],Jt=new Set;return _e={destination:null,responseState:_e,progressiveChunkSize:Ft===void 0?12800:Ft,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:Jt,pingedTasks:Gt,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:Vt===void 0?zb$1:Vt,onAllReady:T$3,onShellReady:zt===void 0?T$3:zt,onShellError:T$3,onFatalError:T$3},$t=U$2(_e,0,null,$t,!1,!1),$t.parentFlushed=!0,yt=Bb$1(_e,yt,null,$t,Jt,Ya$1,null,fb$1),Gt.push(yt),_e}function Bb$1(yt,_e,$t,Ft,Vt,qt,zt,Ht){yt.allPendingTasks++,$t===null?yt.pendingRootTasks++:$t.pendingTasks++;var Kt={node:_e,ping:function(){var Gt=yt.pingedTasks;Gt.push(Kt),Gt.length===1&&Cb$1(yt)},blockedBoundary:$t,blockedSegment:Ft,abortSet:Vt,legacyContext:qt,context:zt,treeContext:Ht};return Vt.add(Kt),Kt}function U$2(yt,_e,$t,Ft,Vt,qt){return{status:0,id:-1,index:_e,parentFlushed:!1,chunks:[],children:[],formatContext:Ft,boundary:$t,lastPushedText:Vt,textEmbedded:qt}}function V$2(yt,_e){if(yt=yt.onError(_e),yt!=null&&typeof yt!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof yt+'" instead');return yt}function W$2(yt,_e){var $t=yt.onShellError;$t(_e),$t=yt.onFatalError,$t(_e),yt.destination!==null?(yt.status=2,yt.destination.destroy(_e)):(yt.status=1,yt.fatalError=_e)}function Db$1(yt,_e,$t,Ft,Vt){for(I$2={},ob$1=_e,N$2=0,yt=$t(Ft,Vt);M$2;)M$2=!1,N$2=0,P$3+=1,K$2=null,yt=$t(Ft,Vt);return rb$1(),yt}function Eb$1(yt,_e,$t,Ft){var Vt=$t.render(),qt=Ft.childContextTypes;if(qt!=null){var zt=_e.legacyContext;if(typeof $t.getChildContext!="function")Ft=zt;else{$t=$t.getChildContext();for(var Ht in $t)if(!(Ht in qt))throw Error(l$3(108,Xa$1(Ft)||"Unknown",Ht));Ft=B$2({},zt,$t)}_e.legacyContext=Ft,X$2(yt,_e,Vt),_e.legacyContext=zt}else X$2(yt,_e,Vt)}function Fb(yt,_e){if(yt&&yt.defaultProps){_e=B$2({},_e),yt=yt.defaultProps;for(var $t in yt)_e[$t]===void 0&&(_e[$t]=yt[$t]);return _e}return _e}function Gb$1(yt,_e,$t,Ft,Vt){if(typeof $t=="function")if($t.prototype&&$t.prototype.isReactComponent){Vt=Za$1($t,_e.legacyContext);var qt=$t.contextType;qt=new $t(Ft,typeof qt=="object"&&qt!==null?qt._currentValue2:Vt),eb$1(qt,$t,Ft,Vt),Eb$1(yt,_e,qt,$t)}else{qt=Za$1($t,_e.legacyContext),Vt=Db$1(yt,_e,$t,Ft,qt);var zt=N$2!==0;if(typeof Vt=="object"&&Vt!==null&&typeof Vt.render=="function"&&Vt.$$typeof===void 0)eb$1(Vt,$t,Ft,qt),Eb$1(yt,_e,Vt,$t);else if(zt){Ft=_e.treeContext,_e.treeContext=gb$1(Ft,1,0);try{X$2(yt,_e,Vt)}finally{_e.treeContext=Ft}}else X$2(yt,_e,Vt)}else if(typeof $t=="string"){switch(Vt=_e.blockedSegment,qt=ya$1(Vt.chunks,$t,Ft,yt.responseState,Vt.formatContext),Vt.lastPushedText=!1,zt=Vt.formatContext,Vt.formatContext=ra$1(zt,$t,Ft),Hb$1(yt,_e,qt),Vt.formatContext=zt,$t){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:Vt.chunks.push("</",$t,">")}Vt.lastPushedText=!1}else{switch($t){case Ua$1:case Ta$1:case Ja$1:case Ka$1:case Ia$1:X$2(yt,_e,Ft.children);return;case Pa$1:X$2(yt,_e,Ft.children);return;case Sa$1:throw Error(l$3(343));case Oa$1:e:{$t=_e.blockedBoundary,Vt=_e.blockedSegment,qt=Ft.fallback,Ft=Ft.children,zt=new Set;var Ht={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:zt,errorDigest:null},Kt=U$2(yt,Vt.chunks.length,Ht,Vt.formatContext,!1,!1);Vt.children.push(Kt),Vt.lastPushedText=!1;var Gt=U$2(yt,0,null,Vt.formatContext,!1,!1);Gt.parentFlushed=!0,_e.blockedBoundary=Ht,_e.blockedSegment=Gt;try{if(Hb$1(yt,_e,Ft),yt.responseState.generateStaticMarkup||Gt.lastPushedText&&Gt.textEmbedded&&Gt.chunks.push("<!-- -->"),Gt.status=1,Y$2(Ht,Gt),Ht.pendingTasks===0)break e}catch(Jt){Gt.status=4,Ht.forceClientRender=!0,Ht.errorDigest=V$2(yt,Jt)}finally{_e.blockedBoundary=$t,_e.blockedSegment=Vt}_e=Bb$1(yt,qt,$t,Kt,zt,_e.legacyContext,_e.context,_e.treeContext),yt.pingedTasks.push(_e)}return}if(typeof $t=="object"&&$t!==null)switch($t.$$typeof){case Na$1:if(Ft=Db$1(yt,_e,$t.render,Ft,Vt),N$2!==0){$t=_e.treeContext,_e.treeContext=gb$1($t,1,0);try{X$2(yt,_e,Ft)}finally{_e.treeContext=$t}}else X$2(yt,_e,Ft);return;case Qa$1:$t=$t.type,Ft=Fb($t,Ft),Gb$1(yt,_e,$t,Ft,Vt);return;case La$1:if(Vt=Ft.children,$t=$t._context,Ft=Ft.value,qt=$t._currentValue2,$t._currentValue2=Ft,zt=E$3,E$3=Ft={parent:zt,depth:zt===null?0:zt.depth+1,context:$t,parentValue:qt,value:Ft},_e.context=Ft,X$2(yt,_e,Vt),yt=E$3,yt===null)throw Error(l$3(403));Ft=yt.parentValue,yt.context._currentValue2=Ft===Va$1?yt.context._defaultValue:Ft,yt=E$3=yt.parent,_e.context=yt;return;case Ma$1:Ft=Ft.children,Ft=Ft($t._currentValue2),X$2(yt,_e,Ft);return;case Ra$1:Vt=$t._init,$t=Vt($t._payload),Ft=Fb($t,Ft),Gb$1(yt,_e,$t,Ft,void 0);return}throw Error(l$3(130,$t==null?$t:typeof $t,""))}}function X$2(yt,_e,$t){if(_e.node=$t,typeof $t=="object"&&$t!==null){switch($t.$$typeof){case Ga$1:Gb$1(yt,_e,$t.type,$t.props,$t.ref);return;case Ha$1:throw Error(l$3(257));case Ra$1:var Ft=$t._init;$t=Ft($t._payload),X$2(yt,_e,$t);return}if(qa$1($t)){Ib$1(yt,_e,$t);return}if($t===null||typeof $t!="object"?Ft=null:(Ft=Wa$1&&$t[Wa$1]||$t["@@iterator"],Ft=typeof Ft=="function"?Ft:null),Ft&&(Ft=Ft.call($t))){if($t=Ft.next(),!$t.done){var Vt=[];do Vt.push($t.value),$t=Ft.next();while(!$t.done);Ib$1(yt,_e,Vt)}return}throw yt=Object.prototype.toString.call($t),Error(l$3(31,yt==="[object Object]"?"object with keys {"+Object.keys($t).join(", ")+"}":yt))}typeof $t=="string"?(Ft=_e.blockedSegment,Ft.lastPushedText=Fa$1(_e.blockedSegment.chunks,$t,yt.responseState,Ft.lastPushedText)):typeof $t=="number"&&(Ft=_e.blockedSegment,Ft.lastPushedText=Fa$1(_e.blockedSegment.chunks,""+$t,yt.responseState,Ft.lastPushedText))}function Ib$1(yt,_e,$t){for(var Ft=$t.length,Vt=0;Vt<Ft;Vt++){var qt=_e.treeContext;_e.treeContext=gb$1(qt,Ft,Vt);try{Hb$1(yt,_e,$t[Vt])}finally{_e.treeContext=qt}}}function Hb$1(yt,_e,$t){var Ft=_e.blockedSegment.formatContext,Vt=_e.legacyContext,qt=_e.context;try{return X$2(yt,_e,$t)}catch(Kt){if(rb$1(),typeof Kt=="object"&&Kt!==null&&typeof Kt.then=="function"){$t=Kt;var zt=_e.blockedSegment,Ht=U$2(yt,zt.chunks.length,null,zt.formatContext,zt.lastPushedText,!0);zt.children.push(Ht),zt.lastPushedText=!1,yt=Bb$1(yt,_e.node,_e.blockedBoundary,Ht,_e.abortSet,_e.legacyContext,_e.context,_e.treeContext).ping,$t.then(yt,yt),_e.blockedSegment.formatContext=Ft,_e.legacyContext=Vt,_e.context=qt,G$1(qt)}else throw _e.blockedSegment.formatContext=Ft,_e.legacyContext=Vt,_e.context=qt,G$1(qt),Kt}}function Jb$1(yt){var _e=yt.blockedBoundary;yt=yt.blockedSegment,yt.status=3,Kb$1(this,_e,yt)}function Lb$1(yt,_e,$t){var Ft=yt.blockedBoundary;yt.blockedSegment.status=3,Ft===null?(_e.allPendingTasks--,_e.status!==2&&(_e.status=2,_e.destination!==null&&_e.destination.push(null))):(Ft.pendingTasks--,Ft.forceClientRender||(Ft.forceClientRender=!0,yt=$t===void 0?Error(l$3(432)):$t,Ft.errorDigest=_e.onError(yt),Ft.parentFlushed&&_e.clientRenderedBoundaries.push(Ft)),Ft.fallbackAbortableTasks.forEach(function(Vt){return Lb$1(Vt,_e,$t)}),Ft.fallbackAbortableTasks.clear(),_e.allPendingTasks--,_e.allPendingTasks===0&&(Ft=_e.onAllReady,Ft()))}function Y$2(yt,_e){if(_e.chunks.length===0&&_e.children.length===1&&_e.children[0].boundary===null){var $t=_e.children[0];$t.id=_e.id,$t.parentFlushed=!0,$t.status===1&&Y$2(yt,$t)}else yt.completedSegments.push(_e)}function Kb$1(yt,_e,$t){if(_e===null){if($t.parentFlushed){if(yt.completedRootSegment!==null)throw Error(l$3(389));yt.completedRootSegment=$t}yt.pendingRootTasks--,yt.pendingRootTasks===0&&(yt.onShellError=T$3,_e=yt.onShellReady,_e())}else _e.pendingTasks--,_e.forceClientRender||(_e.pendingTasks===0?($t.parentFlushed&&$t.status===1&&Y$2(_e,$t),_e.parentFlushed&&yt.completedBoundaries.push(_e),_e.fallbackAbortableTasks.forEach(Jb$1,yt),_e.fallbackAbortableTasks.clear()):$t.parentFlushed&&$t.status===1&&(Y$2(_e,$t),_e.completedSegments.length===1&&_e.parentFlushed&&yt.partialBoundaries.push(_e)));yt.allPendingTasks--,yt.allPendingTasks===0&&(yt=yt.onAllReady,yt())}function Cb$1(yt){if(yt.status!==2){var _e=E$3,$t=yb$1.current;yb$1.current=xb$1;var Ft=S$3;S$3=yt.responseState;try{var Vt=yt.pingedTasks,qt;for(qt=0;qt<Vt.length;qt++){var zt=Vt[qt],Ht=yt,Kt=zt.blockedSegment;if(Kt.status===0){G$1(zt.context);try{X$2(Ht,zt,zt.node),Ht.responseState.generateStaticMarkup||Kt.lastPushedText&&Kt.textEmbedded&&Kt.chunks.push("<!-- -->"),zt.abortSet.delete(zt),Kt.status=1,Kb$1(Ht,zt.blockedBoundary,Kt)}catch(tr){if(rb$1(),typeof tr=="object"&&tr!==null&&typeof tr.then=="function"){var Gt=zt.ping;tr.then(Gt,Gt)}else{zt.abortSet.delete(zt),Kt.status=4;var Jt=zt.blockedBoundary,Xt=tr,Zt=V$2(Ht,Xt);if(Jt===null?W$2(Ht,Xt):(Jt.pendingTasks--,Jt.forceClientRender||(Jt.forceClientRender=!0,Jt.errorDigest=Zt,Jt.parentFlushed&&Ht.clientRenderedBoundaries.push(Jt))),Ht.allPendingTasks--,Ht.allPendingTasks===0){var er=Ht.onAllReady;er()}}}finally{}}}Vt.splice(0,qt),yt.destination!==null&&Mb$1(yt,yt.destination)}catch(tr){V$2(yt,tr),W$2(yt,tr)}finally{S$3=Ft,yb$1.current=$t,$t===xb$1&&G$1(_e)}}}function Z$2(yt,_e,$t){switch($t.parentFlushed=!0,$t.status){case 0:var Ft=$t.id=yt.nextSegmentId++;return $t.lastPushedText=!1,$t.textEmbedded=!1,yt=yt.responseState,_e.push('<template id="'),_e.push(yt.placeholderPrefix),yt=Ft.toString(16),_e.push(yt),_e.push('"></template>');case 1:$t.status=2;var Vt=!0;Ft=$t.chunks;var qt=0;$t=$t.children;for(var zt=0;zt<$t.length;zt++){for(Vt=$t[zt];qt<Vt.index;qt++)_e.push(Ft[qt]);Vt=Nb$1(yt,_e,Vt)}for(;qt<Ft.length-1;qt++)_e.push(Ft[qt]);return qt<Ft.length&&(Vt=_e.push(Ft[qt])),Vt;default:throw Error(l$3(390))}}function Nb$1(yt,_e,$t){var Ft=$t.boundary;if(Ft===null)return Z$2(yt,_e,$t);if(Ft.parentFlushed=!0,Ft.forceClientRender)return yt.responseState.generateStaticMarkup||(Ft=Ft.errorDigest,_e.push("<!--$!-->"),_e.push("<template"),Ft&&(_e.push(' data-dgst="'),Ft=v$2(Ft),_e.push(Ft),_e.push('"')),_e.push("></template>")),Z$2(yt,_e,$t),yt=yt.responseState.generateStaticMarkup?!0:_e.push("<!--/$-->"),yt;if(0<Ft.pendingTasks){Ft.rootSegmentID=yt.nextSegmentId++,0<Ft.completedSegments.length&&yt.partialBoundaries.push(Ft);var Vt=yt.responseState,qt=Vt.nextSuspenseID++;return Vt=Vt.boundaryPrefix+qt.toString(16),Ft=Ft.id=Vt,za$1(_e,yt.responseState,Ft),Z$2(yt,_e,$t),_e.push("<!--/$-->")}if(Ft.byteSize>yt.progressiveChunkSize)return Ft.rootSegmentID=yt.nextSegmentId++,yt.completedBoundaries.push(Ft),za$1(_e,yt.responseState,Ft.id),Z$2(yt,_e,$t),_e.push("<!--/$-->");if(yt.responseState.generateStaticMarkup||_e.push("<!--$-->"),$t=Ft.completedSegments,$t.length!==1)throw Error(l$3(391));return Nb$1(yt,_e,$t[0]),yt=yt.responseState.generateStaticMarkup?!0:_e.push("<!--/$-->"),yt}function Ob$1(yt,_e,$t){return Aa$1(_e,yt.responseState,$t.formatContext,$t.id),Nb$1(yt,_e,$t),Ba$1(_e,$t.formatContext)}function Pb$1(yt,_e,$t){for(var Ft=$t.completedSegments,Vt=0;Vt<Ft.length;Vt++)Qb$1(yt,_e,$t,Ft[Vt]);if(Ft.length=0,yt=yt.responseState,Ft=$t.id,$t=$t.rootSegmentID,_e.push(yt.startInlineScript),yt.sentCompleteBoundaryFunction?_e.push('$RC("'):(yt.sentCompleteBoundaryFunction=!0,_e.push('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')),Ft===null)throw Error(l$3(395));return $t=$t.toString(16),_e.push(Ft),_e.push('","'),_e.push(yt.segmentPrefix),_e.push($t),_e.push('")<\/script>')}function Qb$1(yt,_e,$t,Ft){if(Ft.status===2)return!0;var Vt=Ft.id;if(Vt===-1){if((Ft.id=$t.rootSegmentID)===-1)throw Error(l$3(392));return Ob$1(yt,_e,Ft)}return Ob$1(yt,_e,Ft),yt=yt.responseState,_e.push(yt.startInlineScript),yt.sentCompleteSegmentFunction?_e.push('$RS("'):(yt.sentCompleteSegmentFunction=!0,_e.push('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')),_e.push(yt.segmentPrefix),Vt=Vt.toString(16),_e.push(Vt),_e.push('","'),_e.push(yt.placeholderPrefix),_e.push(Vt),_e.push('")<\/script>')}function Mb$1(yt,_e){try{var $t=yt.completedRootSegment;if($t!==null&&yt.pendingRootTasks===0){Nb$1(yt,_e,$t),yt.completedRootSegment=null;var Ft=yt.responseState.bootstrapChunks;for($t=0;$t<Ft.length-1;$t++)_e.push(Ft[$t]);$t<Ft.length&&_e.push(Ft[$t])}var Vt=yt.clientRenderedBoundaries,qt;for(qt=0;qt<Vt.length;qt++){var zt=Vt[qt];Ft=_e;var Ht=yt.responseState,Kt=zt.id,Gt=zt.errorDigest,Jt=zt.errorMessage,Xt=zt.errorComponentStack;if(Ft.push(Ht.startInlineScript),Ht.sentClientRenderFunction?Ft.push('$RX("'):(Ht.sentClientRenderFunction=!0,Ft.push('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("')),Kt===null)throw Error(l$3(395));if(Ft.push(Kt),Ft.push('"'),Gt||Jt||Xt){Ft.push(",");var Zt=Da$1(Gt||"");Ft.push(Zt)}if(Jt||Xt){Ft.push(",");var er=Da$1(Jt||"");Ft.push(er)}if(Xt){Ft.push(",");var tr=Da$1(Xt);Ft.push(tr)}if(!Ft.push(")<\/script>")){yt.destination=null,qt++,Vt.splice(0,qt);return}}Vt.splice(0,qt);var rr=yt.completedBoundaries;for(qt=0;qt<rr.length;qt++)if(!Pb$1(yt,_e,rr[qt])){yt.destination=null,qt++,rr.splice(0,qt);return}rr.splice(0,qt);var ar=yt.partialBoundaries;for(qt=0;qt<ar.length;qt++){var nr=ar[qt];e:{Vt=yt,zt=_e;var cr=nr.completedSegments;for(Ht=0;Ht<cr.length;Ht++)if(!Qb$1(Vt,zt,nr,cr[Ht])){Ht++,cr.splice(0,Ht);var fr=!1;break e}cr.splice(0,Ht),fr=!0}if(!fr){yt.destination=null,qt++,ar.splice(0,qt);return}}ar.splice(0,qt);var vr=yt.completedBoundaries;for(qt=0;qt<vr.length;qt++)if(!Pb$1(yt,_e,vr[qt])){yt.destination=null,qt++,vr.splice(0,qt);return}vr.splice(0,qt)}finally{yt.allPendingTasks===0&&yt.pingedTasks.length===0&&yt.clientRenderedBoundaries.length===0&&yt.completedBoundaries.length===0&&_e.push(null)}}function Rb$1(yt,_e){try{var $t=yt.abortableTasks;$t.forEach(function(Ft){return Lb$1(Ft,yt,_e)}),$t.clear(),yt.destination!==null&&Mb$1(yt,yt.destination)}catch(Ft){V$2(yt,Ft),W$2(yt,Ft)}}function Sb$1(){}function Tb$1(yt,_e,$t,Ft){var Vt=!1,qt=null,zt="",Ht={push:function(Gt){return Gt!==null&&(zt+=Gt),!0},destroy:function(Gt){Vt=!0,qt=Gt}},Kt=!1;if(yt=Ab$1(yt,Ea$1($t,_e?_e.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,Sb$1,void 0,function(){Kt=!0}),Cb$1(yt),Rb$1(yt,Ft),yt.status===1)yt.status=2,Ht.destroy(yt.fatalError);else if(yt.status!==2&&yt.destination===null){yt.destination=Ht;try{Mb$1(yt,Ht)}catch(Gt){V$2(yt,Gt),W$2(yt,Gt)}}if(Vt)throw qt;if(!Kt)throw Error(l$3(426));return zt}reactDomServerLegacy_browser_production_min.renderToNodeStream=function(){throw Error(l$3(207))};reactDomServerLegacy_browser_production_min.renderToStaticMarkup=function(yt,_e){return Tb$1(yt,_e,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')};reactDomServerLegacy_browser_production_min.renderToStaticNodeStream=function(){throw Error(l$3(208))};reactDomServerLegacy_browser_production_min.renderToString=function(yt,_e){return Tb$1(yt,_e,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')};reactDomServerLegacy_browser_production_min.version="18.3.1";var reactDomServer_browser_production_min={};/** 288 * @license React 289 * react-dom-server.browser.production.min.js 290 * 291 * Copyright (c) Facebook, Inc. and its affiliates. 292 * 293 * This source code is licensed under the MIT license found in the 294 * LICENSE file in the root directory of this source tree. 295 */var aa=reactExports;function k$1(yt){for(var _e="https://reactjs.org/docs/error-decoder.html?invariant="+yt,$t=1;$t<arguments.length;$t++)_e+="&args[]="+encodeURIComponent(arguments[$t]);return"Minified React error #"+yt+"; visit "+_e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l$2=null,n=0;function p$2(yt,_e){if(_e.length!==0)if(512<_e.length)0<n&&(yt.enqueue(new Uint8Array(l$2.buffer,0,n)),l$2=new Uint8Array(512),n=0),yt.enqueue(_e);else{var $t=l$2.length-n;$t<_e.length&&($t===0?yt.enqueue(l$2):(l$2.set(_e.subarray(0,$t),n),yt.enqueue(l$2),_e=_e.subarray($t)),l$2=new Uint8Array(512),n=0),l$2.set(_e,n),n+=_e.length}}function t(yt,_e){return p$2(yt,_e),!0}function ba(yt){l$2&&0<n&&(yt.enqueue(new Uint8Array(l$2.buffer,0,n)),l$2=null,n=0)}var ca=new TextEncoder;function u$1(yt){return ca.encode(yt)}function w$2(yt){return ca.encode(yt)}function da(yt,_e){typeof yt.error=="function"?yt.error(_e):yt.close()}var x$2=Object.prototype.hasOwnProperty,ea=/^[: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]*$/,fa={},ha={};function ia(yt){return x$2.call(ha,yt)?!0:x$2.call(fa,yt)?!1:ea.test(yt)?ha[yt]=!0:(fa[yt]=!0,!1)}function y$2(yt,_e,$t,Ft,Vt,qt,zt){this.acceptsBooleans=_e===2||_e===3||_e===4,this.attributeName=Ft,this.attributeNamespace=Vt,this.mustUseProperty=$t,this.propertyName=yt,this.type=_e,this.sanitizeURL=qt,this.removeEmptyString=zt}var z$2={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(yt){z$2[yt]=new y$2(yt,0,!1,yt,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(yt){var _e=yt[0];z$2[_e]=new y$2(_e,1,!1,yt[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(yt){z$2[yt]=new y$2(yt,2,!1,yt.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(yt){z$2[yt]=new y$2(yt,2,!1,yt,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(yt){z$2[yt]=new y$2(yt,3,!1,yt.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(yt){z$2[yt]=new y$2(yt,3,!0,yt,null,!1,!1)});["capture","download"].forEach(function(yt){z$2[yt]=new y$2(yt,4,!1,yt,null,!1,!1)});["cols","rows","size","span"].forEach(function(yt){z$2[yt]=new y$2(yt,6,!1,yt,null,!1,!1)});["rowSpan","start"].forEach(function(yt){z$2[yt]=new y$2(yt,5,!1,yt.toLowerCase(),null,!1,!1)});var ja=/[\-:]([a-z])/g;function ka(yt){return yt[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(yt){var _e=yt.replace(ja,ka);z$2[_e]=new y$2(_e,1,!1,yt,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(yt){var _e=yt.replace(ja,ka);z$2[_e]=new y$2(_e,1,!1,yt,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(yt){var _e=yt.replace(ja,ka);z$2[_e]=new y$2(_e,1,!1,yt,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(yt){z$2[yt]=new y$2(yt,1,!1,yt.toLowerCase(),null,!1,!1)});z$2.xlinkHref=new y$2("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(yt){z$2[yt]=new y$2(yt,1,!1,yt.toLowerCase(),null,!0,!0)});var B$1={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},la=["Webkit","ms","Moz","O"];Object.keys(B$1).forEach(function(yt){la.forEach(function(_e){_e=_e+yt.charAt(0).toUpperCase()+yt.substring(1),B$1[_e]=B$1[yt]})});var oa=/["'&<>]/;function C$2(yt){if(typeof yt=="boolean"||typeof yt=="number")return""+yt;yt=""+yt;var _e=oa.exec(yt);if(_e){var $t="",Ft,Vt=0;for(Ft=_e.index;Ft<yt.length;Ft++){switch(yt.charCodeAt(Ft)){case 34:_e=""";break;case 38:_e="&";break;case 39:_e="'";break;case 60:_e="<";break;case 62:_e=">";break;default:continue}Vt!==Ft&&($t+=yt.substring(Vt,Ft)),Vt=Ft+1,$t+=_e}yt=Vt!==Ft?$t+yt.substring(Vt,Ft):$t}return yt}var pa=/([A-Z])/g,qa=/^ms-/,ra=Array.isArray,sa=w$2("<script>"),ta=w$2("<\/script>"),ua=w$2('<script src="'),va=w$2('<script type="module" src="'),wa=w$2('" async=""><\/script>'),xa=/(<\/|<)(s)(cript)/gi;function ya(yt,_e,$t,Ft){return""+_e+($t==="s"?"\\u0073":"\\u0053")+Ft}function za(yt,_e,$t,Ft,Vt){yt=yt===void 0?"":yt,_e=_e===void 0?sa:w$2('<script nonce="'+C$2(_e)+'">');var qt=[];if($t!==void 0&&qt.push(_e,u$1((""+$t).replace(xa,ya)),ta),Ft!==void 0)for($t=0;$t<Ft.length;$t++)qt.push(ua,u$1(C$2(Ft[$t])),wa);if(Vt!==void 0)for(Ft=0;Ft<Vt.length;Ft++)qt.push(va,u$1(C$2(Vt[Ft])),wa);return{bootstrapChunks:qt,startInlineScript:_e,placeholderPrefix:w$2(yt+"P:"),segmentPrefix:w$2(yt+"S:"),boundaryPrefix:yt+"B:",idPrefix:yt,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}function D$1(yt,_e){return{insertionMode:yt,selectedValue:_e}}function Aa(yt){return D$1(yt==="http://www.w3.org/2000/svg"?2:yt==="http://www.w3.org/1998/Math/MathML"?3:0,null)}function Ba(yt,_e,$t){switch(_e){case"select":return D$1(1,$t.value!=null?$t.value:$t.defaultValue);case"svg":return D$1(2,null);case"math":return D$1(3,null);case"foreignObject":return D$1(1,null);case"table":return D$1(4,null);case"thead":case"tbody":case"tfoot":return D$1(5,null);case"colgroup":return D$1(7,null);case"tr":return D$1(6,null)}return 4<=yt.insertionMode||yt.insertionMode===0?D$1(1,null):yt}var Ca=w$2("<!-- -->");function Da(yt,_e,$t,Ft){return _e===""?Ft:(Ft&&yt.push(Ca),yt.push(u$1(C$2(_e))),!0)}var Ea=new Map,Fa=w$2(' style="'),Ga=w$2(":"),Ha=w$2(";");function Ia(yt,_e,$t){if(typeof $t!="object")throw Error(k$1(62));_e=!0;for(var Ft in $t)if(x$2.call($t,Ft)){var Vt=$t[Ft];if(Vt!=null&&typeof Vt!="boolean"&&Vt!==""){if(Ft.indexOf("--")===0){var qt=u$1(C$2(Ft));Vt=u$1(C$2((""+Vt).trim()))}else{qt=Ft;var zt=Ea.get(qt);zt!==void 0||(zt=w$2(C$2(qt.replace(pa,"-$1").toLowerCase().replace(qa,"-ms-"))),Ea.set(qt,zt)),qt=zt,Vt=typeof Vt=="number"?Vt===0||x$2.call(B$1,Ft)?u$1(""+Vt):u$1(Vt+"px"):u$1(C$2((""+Vt).trim()))}_e?(_e=!1,yt.push(Fa,qt,Ga,Vt)):yt.push(Ha,qt,Ga,Vt)}}_e||yt.push(E$2)}var H$1=w$2(" "),I$1=w$2('="'),E$2=w$2('"'),Ja=w$2('=""');function J$1(yt,_e,$t,Ft){switch($t){case"style":Ia(yt,_e,Ft);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<$t.length)||$t[0]!=="o"&&$t[0]!=="O"||$t[1]!=="n"&&$t[1]!=="N"){if(_e=z$2.hasOwnProperty($t)?z$2[$t]:null,_e!==null){switch(typeof Ft){case"function":case"symbol":return;case"boolean":if(!_e.acceptsBooleans)return}switch($t=u$1(_e.attributeName),_e.type){case 3:Ft&&yt.push(H$1,$t,Ja);break;case 4:Ft===!0?yt.push(H$1,$t,Ja):Ft!==!1&&yt.push(H$1,$t,I$1,u$1(C$2(Ft)),E$2);break;case 5:isNaN(Ft)||yt.push(H$1,$t,I$1,u$1(C$2(Ft)),E$2);break;case 6:!isNaN(Ft)&&1<=Ft&&yt.push(H$1,$t,I$1,u$1(C$2(Ft)),E$2);break;default:_e.sanitizeURL&&(Ft=""+Ft),yt.push(H$1,$t,I$1,u$1(C$2(Ft)),E$2)}}else if(ia($t)){switch(typeof Ft){case"function":case"symbol":return;case"boolean":if(_e=$t.toLowerCase().slice(0,5),_e!=="data-"&&_e!=="aria-")return}yt.push(H$1,u$1($t),I$1,u$1(C$2(Ft)),E$2)}}}var K$1=w$2(">"),Ka=w$2("/>");function L$1(yt,_e,$t){if(_e!=null){if($t!=null)throw Error(k$1(60));if(typeof _e!="object"||!("__html"in _e))throw Error(k$1(61));_e=_e.__html,_e!=null&&yt.push(u$1(""+_e))}}function La(yt){var _e="";return aa.Children.forEach(yt,function($t){$t!=null&&(_e+=$t)}),_e}var Ma=w$2(' selected=""');function Na(yt,_e,$t,Ft){yt.push(M$1($t));var Vt=$t=null,qt;for(qt in _e)if(x$2.call(_e,qt)){var zt=_e[qt];if(zt!=null)switch(qt){case"children":$t=zt;break;case"dangerouslySetInnerHTML":Vt=zt;break;default:J$1(yt,Ft,qt,zt)}}return yt.push(K$1),L$1(yt,Vt,$t),typeof $t=="string"?(yt.push(u$1(C$2($t))),null):$t}var Oa=w$2(` 296`),Pa=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Qa=new Map;function M$1(yt){var _e=Qa.get(yt);if(_e===void 0){if(!Pa.test(yt))throw Error(k$1(65,yt));_e=w$2("<"+yt),Qa.set(yt,_e)}return _e}var Ra=w$2("<!DOCTYPE html>");function Sa(yt,_e,$t,Ft,Vt){switch(_e){case"select":yt.push(M$1("select"));var qt=null,zt=null;for(Jt in $t)if(x$2.call($t,Jt)){var Ht=$t[Jt];if(Ht!=null)switch(Jt){case"children":qt=Ht;break;case"dangerouslySetInnerHTML":zt=Ht;break;case"defaultValue":case"value":break;default:J$1(yt,Ft,Jt,Ht)}}return yt.push(K$1),L$1(yt,zt,qt),qt;case"option":zt=Vt.selectedValue,yt.push(M$1("option"));var Kt=Ht=null,Gt=null,Jt=null;for(qt in $t)if(x$2.call($t,qt)){var Xt=$t[qt];if(Xt!=null)switch(qt){case"children":Ht=Xt;break;case"selected":Gt=Xt;break;case"dangerouslySetInnerHTML":Jt=Xt;break;case"value":Kt=Xt;default:J$1(yt,Ft,qt,Xt)}}if(zt!=null)if($t=Kt!==null?""+Kt:La(Ht),ra(zt)){for(Ft=0;Ft<zt.length;Ft++)if(""+zt[Ft]===$t){yt.push(Ma);break}}else""+zt===$t&&yt.push(Ma);else Gt&&yt.push(Ma);return yt.push(K$1),L$1(yt,Jt,Ht),Ht;case"textarea":yt.push(M$1("textarea")),Jt=zt=qt=null;for(Ht in $t)if(x$2.call($t,Ht)&&(Kt=$t[Ht],Kt!=null))switch(Ht){case"children":Jt=Kt;break;case"value":qt=Kt;break;case"defaultValue":zt=Kt;break;case"dangerouslySetInnerHTML":throw Error(k$1(91));default:J$1(yt,Ft,Ht,Kt)}if(qt===null&&zt!==null&&(qt=zt),yt.push(K$1),Jt!=null){if(qt!=null)throw Error(k$1(92));if(ra(Jt)&&1<Jt.length)throw Error(k$1(93));qt=""+Jt}return typeof qt=="string"&&qt[0]===` 297`&&yt.push(Oa),qt!==null&&yt.push(u$1(C$2(""+qt))),null;case"input":yt.push(M$1("input")),Kt=Jt=Ht=qt=null;for(zt in $t)if(x$2.call($t,zt)&&(Gt=$t[zt],Gt!=null))switch(zt){case"children":case"dangerouslySetInnerHTML":throw Error(k$1(399,"input"));case"defaultChecked":Kt=Gt;break;case"defaultValue":Ht=Gt;break;case"checked":Jt=Gt;break;case"value":qt=Gt;break;default:J$1(yt,Ft,zt,Gt)}return Jt!==null?J$1(yt,Ft,"checked",Jt):Kt!==null&&J$1(yt,Ft,"checked",Kt),qt!==null?J$1(yt,Ft,"value",qt):Ht!==null&&J$1(yt,Ft,"value",Ht),yt.push(Ka),null;case"menuitem":yt.push(M$1("menuitem"));for(var Zt in $t)if(x$2.call($t,Zt)&&(qt=$t[Zt],qt!=null))switch(Zt){case"children":case"dangerouslySetInnerHTML":throw Error(k$1(400));default:J$1(yt,Ft,Zt,qt)}return yt.push(K$1),null;case"title":yt.push(M$1("title")),qt=null;for(Xt in $t)if(x$2.call($t,Xt)&&(zt=$t[Xt],zt!=null))switch(Xt){case"children":qt=zt;break;case"dangerouslySetInnerHTML":throw Error(k$1(434));default:J$1(yt,Ft,Xt,zt)}return yt.push(K$1),qt;case"listing":case"pre":yt.push(M$1(_e)),zt=qt=null;for(Kt in $t)if(x$2.call($t,Kt)&&(Ht=$t[Kt],Ht!=null))switch(Kt){case"children":qt=Ht;break;case"dangerouslySetInnerHTML":zt=Ht;break;default:J$1(yt,Ft,Kt,Ht)}if(yt.push(K$1),zt!=null){if(qt!=null)throw Error(k$1(60));if(typeof zt!="object"||!("__html"in zt))throw Error(k$1(61));$t=zt.__html,$t!=null&&(typeof $t=="string"&&0<$t.length&&$t[0]===` 298`?yt.push(Oa,u$1($t)):yt.push(u$1(""+$t)))}return typeof qt=="string"&&qt[0]===` 299`&&yt.push(Oa),qt;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":yt.push(M$1(_e));for(var er in $t)if(x$2.call($t,er)&&(qt=$t[er],qt!=null))switch(er){case"children":case"dangerouslySetInnerHTML":throw Error(k$1(399,_e));default:J$1(yt,Ft,er,qt)}return yt.push(Ka),null;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 Na(yt,$t,_e,Ft);case"html":return Vt.insertionMode===0&&yt.push(Ra),Na(yt,$t,_e,Ft);default:if(_e.indexOf("-")===-1&&typeof $t.is!="string")return Na(yt,$t,_e,Ft);yt.push(M$1(_e)),zt=qt=null;for(Gt in $t)if(x$2.call($t,Gt)&&(Ht=$t[Gt],Ht!=null))switch(Gt){case"children":qt=Ht;break;case"dangerouslySetInnerHTML":zt=Ht;break;case"style":Ia(yt,Ft,Ht);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:ia(Gt)&&typeof Ht!="function"&&typeof Ht!="symbol"&&yt.push(H$1,u$1(Gt),I$1,u$1(C$2(Ht)),E$2)}return yt.push(K$1),L$1(yt,zt,qt),qt}}var Ta=w$2("</"),Ua=w$2(">"),Va=w$2('<template id="'),Wa=w$2('"></template>'),Xa=w$2("<!--$-->"),Ya=w$2('<!--$?--><template id="'),Za=w$2('"></template>'),$a=w$2("<!--$!-->"),ab=w$2("<!--/$-->"),bb=w$2("<template"),cb=w$2('"'),db=w$2(' data-dgst="');w$2(' data-msg="');w$2(' data-stck="');var eb=w$2("></template>");function fb(yt,_e,$t){if(p$2(yt,Ya),$t===null)throw Error(k$1(395));return p$2(yt,$t),t(yt,Za)}var gb=w$2('<div hidden id="'),hb=w$2('">'),ib=w$2("</div>"),jb=w$2('<svg aria-hidden="true" style="display:none" id="'),kb=w$2('">
299'),lb=w$2("</svg>"),mb=w$2('<math aria-hidden="true" style="display:none" id="'),nb=w$2('">'),ob=w$2("</math>"),pb=w$2('<table hidden id="'),qb=w$2('">'),rb=w$2("</table>"),sb=w$2('<table hidden><tbody id="'),tb=w$2('">'),ub=w$2("</tbody></table>"),vb=w$2('<table hidden><tr id="'),wb=w$2('">'),xb=w$2("</tr></table>"),yb=w$2('<table hidden><colgroup id="'),zb=w$2('">'),Ab=w$2("</colgroup></table>");function Bb(yt,_e,$t,Ft){switch($t.insertionMode){case 0:case 1:return p$2(yt,gb),p$2(yt,_e.segmentPrefix),p$2(yt,u$1(Ft.toString(16))),t(yt,hb);case 2:return p$2(yt,jb),p$2(yt,_e.segmentPrefix),p$2(yt,u$1(Ft.toString(16))),t(yt,kb);case 3:return p$2(yt,mb),p$2(yt,_e.segmentPrefix),p$2(yt,u$1(Ft.toString(16))),t(yt,nb);case 4:return p$2(yt,pb),p$2(yt,_e.segmentPrefix),p$2(yt,u$1(Ft.toString(16))),t(yt,qb);case 5:return p$2(yt,sb),p$2(yt,_e.segmentPrefix),p$2(yt,u$1(Ft.toString(16))),t(yt,tb);case 6:return p$2(yt,vb),p$2(yt,_e.segmentPrefix),p$2(yt,u$1(Ft.toString(16))),t(yt,wb);case 7:return p$2(yt,yb),p$2(yt,_e.segmentPrefix),p$2(yt,u$1(Ft.toString(16))),t(yt,zb);default:throw Error(k$1(397))}}function Cb(yt,_e){switch(_e.insertionMode){case 0:case 1:return t(yt,ib);case 2:return t(yt,lb);case 3:return t(yt,ob);case 4:return t(yt,rb);case 5:return t(yt,ub);case 6:return t(yt,xb);case 7:return t(yt,Ab);default:throw Error(k$1(397))}}var Db=w$2('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),Eb=w$2('$RS("'),Gb=w$2('","'),Hb=w$2('")<\/script>'),Ib=w$2('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),Jb=w$2('$RC("'),Kb=w$2('","'),Lb=w$2('")<\/script>'),Mb=w$2('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),Nb=w$2('$RX("'),Ob=w$2('"'),Pb=w$2(")<\/script>"),Qb=w$2(","),Rb=/[<\u2028\u2029]/g;function Sb(yt){return JSON.stringify(yt).replace(Rb,function(_e){switch(_e){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var N$1=Object.assign,Tb=Symbol.for("react.element"),Ub=Symbol.for("react.portal"),Vb=Symbol.for("react.fragment"),Wb=Symbol.for("react.strict_mode"),Xb=Symbol.for("react.profiler"),Yb=Symbol.for("react.provider"),Zb=Symbol.for("react.context"),$b=Symbol.for("react.forward_ref"),ac=Symbol.for("react.suspense"),bc=Symbol.for("react.suspense_list"),cc=Symbol.for("react.memo"),dc=Symbol.for("react.lazy"),ec$1=Symbol.for("react.scope"),fc=Symbol.for("react.debug_trace_mode"),gc=Symbol.for("react.legacy_hidden"),hc=Symbol.for("react.default_value"),ic=Symbol.iterator;function jc(yt){if(yt==null)return null;if(typeof yt=="function")return yt.displayName||yt.name||null;if(typeof yt=="string")return yt;switch(yt){case Vb:return"Fragment";case Ub:return"Portal";case Xb:return"Profiler";case Wb:return"StrictMode";case ac:return"Suspense";case bc:return"SuspenseList"}if(typeof yt=="object")switch(yt.$$typeof){case Zb:return(yt.displayName||"Context")+".Consumer";case Yb:return(yt._context.displayName||"Context")+".Provider";case $b:var _e=yt.render;return yt=yt.displayName,yt||(yt=_e.displayName||_e.name||"",yt=yt!==""?"ForwardRef("+yt+")":"ForwardRef"),yt;case cc:return _e=yt.displayName||null,_e!==null?_e:jc(yt.type)||"Memo";case dc:_e=yt._payload,yt=yt._init;try{return jc(yt(_e))}catch{}}return null}var kc={};function lc(yt,_e){if(yt=yt.contextTypes,!yt)return kc;var $t={},Ft;for(Ft in yt)$t[Ft]=_e[Ft];return $t}var O$2=null;function P$2(yt,_e){if(yt!==_e){yt.context._currentValue=yt.parentValue,yt=yt.parent;var $t=_e.parent;if(yt===null){if($t!==null)throw Error(k$1(401))}else{if($t===null)throw Error(k$1(401));P$2(yt,$t)}_e.context._currentValue=_e.value}}function mc(yt){yt.context._currentValue=yt.parentValue,yt=yt.parent,yt!==null&&mc(yt)}function nc(yt){var _e=yt.parent;_e!==null&&nc(_e),yt.context._currentValue=yt.value}function oc(yt,_e){if(yt.context._currentValue=yt.parentValue,yt=yt.parent,yt===null)throw Error(k$1(402));yt.depth===_e.depth?P$2(yt,_e):oc(yt,_e)}function pc(yt,_e){var $t=_e.parent;if($t===null)throw Error(k$1(402));yt.depth===$t.depth?P$2(yt,$t):pc(yt,$t),_e.context._currentValue=_e.value}function Q$1(yt){var _e=O$2;_e!==yt&&(_e===null?nc(yt):yt===null?mc(_e):_e.depth===yt.depth?P$2(_e,yt):_e.depth>yt.depth?oc(_e,yt):pc(_e,yt),O$2=yt)}var qc={isMounted:function(){return!1},enqueueSetState:function(yt,_e){yt=yt._reactInternals,yt.queue!==null&&yt.queue.push(_e)},enqueueReplaceState:function(yt,_e){yt=yt._reactInternals,yt.replace=!0,yt.queue=[_e]},enqueueForceUpdate:function(){}};function rc(yt,_e,$t,Ft){var Vt=yt.state!==void 0?yt.state:null;yt.updater=qc,yt.props=$t,yt.state=Vt;var qt={queue:[],replace:!1};yt._reactInternals=qt;var zt=_e.contextType;if(yt.context=typeof zt=="object"&&zt!==null?zt._currentValue:Ft,zt=_e.getDerivedStateFromProps,typeof zt=="function"&&(zt=zt($t,Vt),Vt=zt==null?Vt:N$1({},Vt,zt),yt.state=Vt),typeof _e.getDerivedStateFromProps!="function"&&typeof yt.getSnapshotBeforeUpdate!="function"&&(typeof yt.UNSAFE_componentWillMount=="function"||typeof yt.componentWillMount=="function"))if(_e=yt.state,typeof yt.componentWillMount=="function"&&yt.componentWillMount(),typeof yt.UNSAFE_componentWillMount=="function"&&yt.UNSAFE_componentWillMount(),_e!==yt.state&&qc.enqueueReplaceState(yt,yt.state,null),qt.queue!==null&&0<qt.queue.length)if(_e=qt.queue,zt=qt.replace,qt.queue=null,qt.replace=!1,zt&&_e.length===1)yt.state=_e[0];else{for(qt=zt?_e[0]:yt.state,Vt=!0,zt=zt?1:0;zt<_e.length;zt++){var Ht=_e[zt];Ht=typeof Ht=="function"?Ht.call(yt,qt,$t,Ft):Ht,Ht!=null&&(Vt?(Vt=!1,qt=N$1({},qt,Ht)):N$1(qt,Ht))}yt.state=qt}else qt.queue=null}var sc={id:1,overflow:""};function tc(yt,_e,$t){var Ft=yt.id;yt=yt.overflow;var Vt=32-uc(Ft)-1;Ft&=~(1<<Vt),$t+=1;var qt=32-uc(_e)+Vt;if(30<qt){var zt=Vt-Vt%5;return qt=(Ft&(1<<zt)-1).toString(32),Ft>>=zt,Vt-=zt,{id:1<<32-uc(_e)+Vt|$t<<Vt|Ft,overflow:qt+yt}}return{id:1<<qt|$t<<Vt|Ft,overflow:yt}}var uc=Math.clz32?Math.clz32:vc,wc=Math.log,xc=Math.LN2;function vc(yt){return yt>>>=0,yt===0?32:31-(wc(yt)/xc|0)|0}function yc(yt,_e){return yt===_e&&(yt!==0||1/yt===1/_e)||yt!==yt&&_e!==_e}
vendor: 19,836 bytes, lines 299-300
299var zc=typeof Object.is=="function"?Object.is:yc,R$1=null,Ac=null,Bc=null,S$2=null,T$2=!1,Cc=!1,U$1=0,V$1=null,Dc=0;function W$1(){if(R$1===null)throw Error(k$1(321));return R$1}function Ec(){if(0<Dc)throw Error(k$1(312));return{memoizedState:null,queue:null,next:null}}function Fc(){return S$2===null?Bc===null?(T$2=!1,Bc=S$2=Ec()):(T$2=!0,S$2=Bc):S$2.next===null?(T$2=!1,S$2=S$2.next=Ec()):(T$2=!0,S$2=S$2.next),S$2}function Gc(){Ac=R$1=null,Cc=!1,Bc=null,Dc=0,S$2=V$1=null}function Hc(yt,_e){return typeof _e=="function"?_e(yt):_e}function Ic(yt,_e,$t){if(R$1=W$1(),S$2=Fc(),T$2){var Ft=S$2.queue;if(_e=Ft.dispatch,V$1!==null&&($t=V$1.get(Ft),$t!==void 0)){V$1.delete(Ft),Ft=S$2.memoizedState;do Ft=yt(Ft,$t.action),$t=$t.next;while($t!==null);return S$2.memoizedState=Ft,[Ft,_e]}return[S$2.memoizedState,_e]}return yt=yt===Hc?typeof _e=="function"?_e():_e:$t!==void 0?$t(_e):_e,S$2.memoizedState=yt,yt=S$2.queue={last:null,dispatch:null},yt=yt.dispatch=Jc.bind(null,R$1,yt),[S$2.memoizedState,yt]}function Kc(yt,_e){if(R$1=W$1(),S$2=Fc(),_e=_e===void 0?null:_e,S$2!==null){var $t=S$2.memoizedState;if($t!==null&&_e!==null){var Ft=$t[1];e:if(Ft===null)Ft=!1;else{for(var Vt=0;Vt<Ft.length&&Vt<_e.length;Vt++)if(!zc(_e[Vt],Ft[Vt])){Ft=!1;break e}Ft=!0}if(Ft)return $t[0]}}return yt=yt(),S$2.memoizedState=[yt,_e],yt}function Jc(yt,_e,$t){if(25<=Dc)throw Error(k$1(301));if(yt===R$1)if(Cc=!0,yt={action:$t,next:null},V$1===null&&(V$1=new Map),$t=V$1.get(_e),$t===void 0)V$1.set(_e,yt);else{for(_e=$t;_e.next!==null;)_e=_e.next;_e.next=yt}}function Lc(){throw Error(k$1(394))}function Mc(){}var Oc={readContext:function(yt){return yt._currentValue},useContext:function(yt){return W$1(),yt._currentValue},useMemo:Kc,useReducer:Ic,useRef:function(yt){R$1=W$1(),S$2=Fc();var _e=S$2.memoizedState;return _e===null?(yt={current:yt},S$2.memoizedState=yt):_e},useState:function(yt){return Ic(Hc,yt)},useInsertionEffect:Mc,useLayoutEffect:function(){},useCallback:function(yt,_e){return Kc(function(){return yt},_e)},useImperativeHandle:Mc,useEffect:Mc,useDebugValue:Mc,useDeferredValue:function(yt){return W$1(),yt},useTransition:function(){return W$1(),[!1,Lc]},useId:function(){var yt=Ac.treeContext,_e=yt.overflow;yt=yt.id,yt=(yt&~(1<<32-uc(yt)-1)).toString(32)+_e;var $t=Nc;if($t===null)throw Error(k$1(404));return _e=U$1++,yt=":"+$t.idPrefix+"R"+yt,0<_e&&(yt+="H"+_e.toString(32)),yt+":"},useMutableSource:function(yt,_e){return W$1(),_e(yt._source)},useSyncExternalStore:function(yt,_e,$t){if($t===void 0)throw Error(k$1(407));return $t()}},Nc=null,Pc=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function Qc(yt){return console.error(yt),null}function X$1(){}function Rc(yt,_e,$t,Ft,Vt,qt,zt,Ht,Kt){var Gt=[],Jt=new Set;return _e={destination:null,responseState:_e,progressiveChunkSize:Ft===void 0?12800:Ft,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:Jt,pingedTasks:Gt,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:Vt===void 0?Qc:Vt,onAllReady:qt===void 0?X$1:qt,onShellReady:zt===void 0?X$1:zt,onShellError:Ht===void 0?X$1:Ht,onFatalError:Kt===void 0?X$1:Kt},$t=Sc(_e,0,null,$t,!1,!1),$t.parentFlushed=!0,yt=Tc(_e,yt,null,$t,Jt,kc,null,sc),Gt.push(yt),_e}function Tc(yt,_e,$t,Ft,Vt,qt,zt,Ht){yt.allPendingTasks++,$t===null?yt.pendingRootTasks++:$t.pendingTasks++;var Kt={node:_e,ping:function(){var Gt=yt.pingedTasks;Gt.push(Kt),Gt.length===1&&Uc(yt)},blockedBoundary:$t,blockedSegment:Ft,abortSet:Vt,legacyContext:qt,context:zt,treeContext:Ht};return Vt.add(Kt),Kt}function Sc(yt,_e,$t,Ft,Vt,qt){return{status:0,id:-1,index:_e,parentFlushed:!1,chunks:[],children:[],formatContext:Ft,boundary:$t,lastPushedText:Vt,textEmbedded:qt}}function Y$1(yt,_e){if(yt=yt.onError(_e),yt!=null&&typeof yt!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof yt+'" instead');return yt}function Vc(yt,_e){var $t=yt.onShellError;$t(_e),$t=yt.onFatalError,$t(_e),yt.destination!==null?(yt.status=2,da(yt.destination,_e)):(yt.status=1,yt.fatalError=_e)}function Wc(yt,_e,$t,Ft,Vt){for(R$1={},Ac=_e,U$1=0,yt=$t(Ft,Vt);Cc;)Cc=!1,U$1=0,Dc+=1,S$2=null,yt=$t(Ft,Vt);return Gc(),yt}function Xc(yt,_e,$t,Ft){var Vt=$t.render(),qt=Ft.childContextTypes;if(qt!=null){var zt=_e.legacyContext;if(typeof $t.getChildContext!="function")Ft=zt;else{$t=$t.getChildContext();for(var Ht in $t)if(!(Ht in qt))throw Error(k$1(108,jc(Ft)||"Unknown",Ht));Ft=N$1({},zt,$t)}_e.legacyContext=Ft,Z$1(yt,_e,Vt),_e.legacyContext=zt}else Z$1(yt,_e,Vt)}function Yc(yt,_e){if(yt&&yt.defaultProps){_e=N$1({},_e),yt=yt.defaultProps;for(var $t in yt)_e[$t]===void 0&&(_e[$t]=yt[$t]);return _e}return _e}function Zc(yt,_e,$t,Ft,Vt){if(typeof $t=="function")if($t.prototype&&$t.prototype.isReactComponent){Vt=lc($t,_e.legacyContext);var qt=$t.contextType;qt=new $t(Ft,typeof qt=="object"&&qt!==null?qt._currentValue:Vt),rc(qt,$t,Ft,Vt),Xc(yt,_e,qt,$t)}else{qt=lc($t,_e.legacyContext),Vt=Wc(yt,_e,$t,Ft,qt);var zt=U$1!==0;if(typeof Vt=="object"&&Vt!==null&&typeof Vt.render=="function"&&Vt.$$typeof===void 0)rc(Vt,$t,Ft,qt),Xc(yt,_e,Vt,$t);else if(zt){Ft=_e.treeContext,_e.treeContext=tc(Ft,1,0);try{Z$1(yt,_e,Vt)}finally{_e.treeContext=Ft}}else Z$1(yt,_e,Vt)}else if(typeof $t=="string"){switch(Vt=_e.blockedSegment,qt=Sa(Vt.chunks,$t,Ft,yt.responseState,Vt.formatContext),Vt.lastPushedText=!1,zt=Vt.formatContext,Vt.formatContext=Ba(zt,$t,Ft),$c(yt,_e,qt),Vt.formatContext=zt,$t){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:Vt.chunks.push(Ta,u$1($t),Ua)}Vt.lastPushedText=!1}else{switch($t){case gc:case fc:case Wb:case Xb:case Vb:Z$1(yt,_e,Ft.children);return;case bc:Z$1(yt,_e,Ft.children);return;case ec$1:throw Error(k$1(343));case ac:e:{$t=_e.blockedBoundary,Vt=_e.blockedSegment,qt=Ft.fallback,Ft=Ft.children,zt=new Set;var Ht={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:zt,errorDigest:null},Kt=Sc(yt,Vt.chunks.length,Ht,Vt.formatContext,!1,!1);Vt.children.push(Kt),Vt.lastPushedText=!1;var Gt=Sc(yt,0,null,Vt.formatContext,!1,!1);Gt.parentFlushed=!0,_e.blockedBoundary=Ht,_e.blockedSegment=Gt;try{if($c(yt,_e,Ft),Gt.lastPushedText&&Gt.textEmbedded&&Gt.chunks.push(Ca),Gt.status=1,ad(Ht,Gt),Ht.pendingTasks===0)break e}catch(Jt){Gt.status=4,Ht.forceClientRender=!0,Ht.errorDigest=Y$1(yt,Jt)}finally{_e.blockedBoundary=$t,_e.blockedSegment=Vt}_e=Tc(yt,qt,$t,Kt,zt,_e.legacyContext,_e.context,_e.treeContext),yt.pingedTasks.push(_e)}return}if(typeof $t=="object"&&$t!==null)switch($t.$$typeof){case $b:if(Ft=Wc(yt,_e,$t.render,Ft,Vt),U$1!==0){$t=_e.treeContext,_e.treeContext=tc($t,1,0);try{Z$1(yt,_e,Ft)}finally{_e.treeContext=$t}}else Z$1(yt,_e,Ft);return;case cc:$t=$t.type,Ft=Yc($t,Ft),Zc(yt,_e,$t,Ft,Vt);return;case Yb:if(Vt=Ft.children,$t=$t._context,Ft=Ft.value,qt=$t._currentValue,$t._currentValue=Ft,zt=O$2,O$2=Ft={parent:zt,depth:zt===null?0:zt.depth+1,context:$t,parentValue:qt,value:Ft},_e.context=Ft,Z$1(yt,_e,Vt),yt=O$2,yt===null)throw Error(k$1(403));Ft=yt.parentValue,yt.context._currentValue=Ft===hc?yt.context._defaultValue:Ft,yt=O$2=yt.parent,_e.context=yt;return;case Zb:Ft=Ft.children,Ft=Ft($t._currentValue),Z$1(yt,_e,Ft);return;case dc:Vt=$t._init,$t=Vt($t._payload),Ft=Yc($t,Ft),Zc(yt,_e,$t,Ft,void 0);return}throw Error(k$1(130,$t==null?$t:typeof $t,""))}}function Z$1(yt,_e,$t){if(_e.node=$t,typeof $t=="object"&&$t!==null){switch($t.$$typeof){case Tb:Zc(yt,_e,$t.type,$t.props,$t.ref);return;case Ub:throw Error(k$1(257));case dc:var Ft=$t._init;$t=Ft($t._payload),Z$1(yt,_e,$t);return}if(ra($t)){bd(yt,_e,$t);return}if($t===null||typeof $t!="object"?Ft=null:(Ft=ic&&$t[ic]||$t["@@iterator"],Ft=typeof Ft=="function"?Ft:null),Ft&&(Ft=Ft.call($t))){if($t=Ft.next(),!$t.done){var Vt=[];do Vt.push($t.value),$t=Ft.next();while(!$t.done);bd(yt,_e,Vt)}return}throw yt=Object.prototype.toString.call($t),Error(k$1(31,yt==="[object Object]"?"object with keys {"+Object.keys($t).join(", ")+"}":yt))}typeof $t=="string"?(Ft=_e.blockedSegment,Ft.lastPushedText=Da(_e.blockedSegment.chunks,$t,yt.responseState,Ft.lastPushedText)):typeof $t=="number"&&(Ft=_e.blockedSegment,Ft.lastPushedText=Da(_e.blockedSegment.chunks,""+$t,yt.responseState,Ft.lastPushedText))}function bd(yt,_e,$t){for(var Ft=$t.length,Vt=0;Vt<Ft;Vt++){var qt=_e.treeContext;_e.treeContext=tc(qt,Ft,Vt);try{$c(yt,_e,$t[Vt])}finally{_e.treeContext=qt}}}function $c(yt,_e,$t){var Ft=_e.blockedSegment.formatContext,Vt=_e.legacyContext,qt=_e.context;try{return Z$1(yt,_e,$t)}catch(Kt){if(Gc(),typeof Kt=="object"&&Kt!==null&&typeof Kt.then=="function"){$t=Kt;var zt=_e.blockedSegment,Ht=Sc(yt,zt.chunks.length,null,zt.formatContext,zt.lastPushedText,!0);zt.children.push(Ht),zt.lastPushedText=!1,yt=Tc(yt,_e.node,_e.blockedBoundary,Ht,_e.abortSet,_e.legacyContext,_e.context,_e.treeContext).ping,$t.then(yt,yt),_e.blockedSegment.formatContext=Ft,_e.legacyContext=Vt,_e.context=qt,Q$1(qt)}else throw _e.blockedSegment.formatContext=Ft,_e.legacyContext=Vt,_e.context=qt,Q$1(qt),Kt}}function cd(yt){var _e=yt.blockedBoundary;yt=yt.blockedSegment,yt.status=3,dd(this,_e,yt)}function ed(yt,_e,$t){var Ft=yt.blockedBoundary;yt.blockedSegment.status=3,Ft===null?(_e.allPendingTasks--,_e.status!==2&&(_e.status=2,_e.destination!==null&&_e.destination.close())):(Ft.pendingTasks--,Ft.forceClientRender||(Ft.forceClientRender=!0,yt=$t===void 0?Error(k$1(432)):$t,Ft.errorDigest=_e.onError(yt),Ft.parentFlushed&&_e.clientRenderedBoundaries.push(Ft)),Ft.fallbackAbortableTasks.forEach(function(Vt){return ed(Vt,_e,$t)}),Ft.fallbackAbortableTasks.clear(),_e.allPendingTasks--,_e.allPendingTasks===0&&(Ft=_e.onAllReady,Ft()))}function ad(yt,_e){if(_e.chunks.length===0&&_e.children.length===1&&_e.children[0].boundary===null){var $t=_e.children[0];$t.id=_e.id,$t.parentFlushed=!0,$t.status===1&&ad(yt,$t)}else yt.completedSegments.push(_e)}function dd(yt,_e,$t){if(_e===null){if($t.parentFlushed){if(yt.completedRootSegment!==null)throw Error(k$1(389));yt.completedRootSegment=$t}yt.pendingRootTasks--,yt.pendingRootTasks===0&&(yt.onShellError=X$1,_e=yt.onShellReady,_e())}else _e.pendingTasks--,_e.forceClientRender||(_e.pendingTasks===0?($t.parentFlushed&&$t.status===1&&ad(_e,$t),_e.parentFlushed&&yt.completedBoundaries.push(_e),_e.fallbackAbortableTasks.forEach(cd,yt),_e.fallbackAbortableTasks.clear()):$t.parentFlushed&&$t.status===1&&(ad(_e,$t),_e.completedSegments.length===1&&_e.parentFlushed&&yt.partialBoundaries.push(_e)));yt.allPendingTasks--,yt.allPendingTasks===0&&(yt=yt.onAllReady,yt())}function Uc(yt){if(yt.status!==2){var _e=O$2,$t=Pc.current;Pc.current=Oc;var Ft=Nc;Nc=yt.responseState;try{var Vt=yt.pingedTasks,qt;for(qt=0;qt<Vt.length;qt++){var zt=Vt[qt],Ht=yt,Kt=zt.blockedSegment;if(Kt.status===0){Q$1(zt.context);try{Z$1(Ht,zt,zt.node),Kt.lastPushedText&&Kt.textEmbedded&&Kt.chunks.push(Ca),zt.abortSet.delete(zt),Kt.status=1,dd(Ht,zt.blockedBoundary,Kt)}catch(tr){if(Gc(),typeof tr=="object"&&tr!==null&&typeof tr.then=="function"){var Gt=zt.ping;tr.then(Gt,Gt)}else{zt.abortSet.delete(zt),Kt.status=4;var Jt=zt.blockedBoundary,Xt=tr,Zt=Y$1(Ht,Xt);if(Jt===null?Vc(Ht,Xt):(Jt.pendingTasks--,Jt.forceClientRender||(Jt.forceClientRender=!0,Jt.errorDigest=Zt,Jt.parentFlushed&&Ht.clientRenderedBoundaries.push(Jt))),Ht.allPendingTasks--,Ht.allPendingTasks===0){var er=Ht.onAllReady;er()}}}finally{}}}Vt.splice(0,qt),yt.destination!==null&&fd(yt,yt.destination)}catch(tr){Y$1(yt,tr),Vc(yt,tr)}finally{Nc=Ft,Pc.current=$t,$t===Oc&&Q$1(_e)}}}function gd(yt,_e,$t){switch($t.parentFlushed=!0,$t.status){case 0:var Ft=$t.id=yt.nextSegmentId++;return $t.lastPushedText=!1,$t.textEmbedded=!1,yt=yt.responseState,p$2(_e,Va),p$2(_e,yt.placeholderPrefix),yt=u$1(Ft.toString(16)),p$2(_e,yt),t(_e,Wa);case 1:$t.status=2;var Vt=!0;Ft=$t.chunks;var qt=0;$t=$t.children;for(var zt=0;zt<$t.length;zt++){for(Vt=$t[zt];qt<Vt.index;qt++)p$2(_e,Ft[qt]);Vt=hd(yt,_e,Vt)}for(;qt<Ft.length-1;qt++)p$2(_e,Ft[qt]);return qt<Ft.length&&(Vt=t(_e,Ft[qt])),Vt;default:throw Error(k$1(390))}}function hd(yt,_e,$t){var Ft=$t.boundary;if(Ft===null)return gd(yt,_e,$t);if(Ft.parentFlushed=!0,Ft.forceClientRender)Ft=Ft.errorDigest,t(_e,$a),p$2(_e,bb),Ft&&(p$2(_e,db),p$2(_e,u$1(C$2(Ft))),p$2(_e,cb)),t(_e,eb),gd(yt,_e,$t);else if(0<Ft.pendingTasks){Ft.rootSegmentID=yt.nextSegmentId++,0<Ft.completedSegments.length&&yt.partialBoundaries.push(Ft);var Vt=yt.responseState,qt=Vt.nextSuspenseID++;Vt=w$2(Vt.boundaryPrefix+qt.toString(16)),Ft=Ft.id=Vt,fb(_e,yt.responseState,Ft),gd(yt,_e,$t)}else if(Ft.byteSize>yt.progressiveChunkSize)Ft.rootSegmentID=yt.nextSegmentId++,yt.completedBoundaries.push(Ft),fb(_e,yt.responseState,Ft.id),gd(yt,_e,$t);else{if(t(_e,Xa),$t=Ft.completedSegments,$t.length!==1)throw Error(k$1(391));hd(yt,_e,$t[0])}return t(_e,ab)}function id$2(yt,_e,$t){return Bb(_e,yt.responseState,$t.formatContext,$t.id),hd(yt,_e,$t),Cb(_e,$t.formatContext)}function jd(yt,_e,$t){for(var Ft=$t.completedSegments,Vt=0;Vt<Ft.length;Vt++)kd(yt,_e,$t,Ft[Vt]);if(Ft.length=0,yt=yt.responseState,Ft=$t.id,$t=$t.rootSegmentID,p$2(_e,yt.startInlineScript),yt.sentCompleteBoundaryFunction?p$2(_e,Jb):(yt.sentCompleteBoundaryFunction=!0,p$2(_e,Ib)),Ft===null)throw Error(k$1(395));return $t=u$1($t.toString(16)),p$2(_e,Ft),p$2(_e,Kb),p$2(_e,yt.segmentPrefix),p$2(_e,$t),t(_e,Lb)}function kd(yt,_e,$t,Ft){if(Ft.status===2)return!0;var Vt=Ft.id;if(Vt===-1){if((Ft.id=$t.rootSegmentID)===-1)throw Error(k$1(392));return id$2(yt,_e,Ft)}return id$2(yt,_e,Ft),yt=yt.responseState,p$2(_e,yt.startInlineScript),yt.sentCompleteSegmentFunction?p$2(_e,Eb):(yt.sentCompleteSegmentFunction=!0,p$2(_e,Db)),p$2(_e,yt.segmentPrefix),Vt=u$1(Vt.toString(16)),p$2(_e,Vt),p$2(_e,Gb),p$2(_e,yt.placeholderPrefix),p$2(_e,Vt),t(_e,Hb)}function fd(yt,_e){l$2=new Uint8Array(512),n=0;try{var $t=yt.completedRootSegment;if($t!==null&&yt.pendingRootTasks===0){hd(yt,_e,$t),yt.completedRootSegment=null;var Ft=yt.responseState.bootstrapChunks;for($t=0;$t<Ft.length-1;$t++)p$2(_e,Ft[$t]);$t<Ft.length&&t(_e,Ft[$t])}var Vt=yt.clientRenderedBoundaries,qt;for(qt=0;qt<Vt.length;qt++){var zt=Vt[qt];Ft=_e;var Ht=yt.responseState,Kt=zt.id,Gt=zt.errorDigest,Jt=zt.errorMessage,Xt=zt.errorComponentStack;if(p$2(Ft,Ht.startInlineScript),Ht.sentClientRenderFunction?p$2(Ft,Nb):(Ht.sentClientRenderFunction=!0,p$2(Ft,Mb)),Kt===null)throw Error(k$1(395));p$2(Ft,Kt),p$2(Ft,Ob),(Gt||Jt||Xt)&&(p$2(Ft,Qb),p$2(Ft,u$1(Sb(Gt||"")))),(Jt||Xt)&&(p$2(Ft,Qb),p$2(Ft,u$1(Sb(Jt||"")))),Xt&&(p$2(Ft,Qb),p$2(Ft,u$1(Sb(Xt)))),t(Ft,Pb)}Vt.splice(0,qt);var Zt=yt.completedBoundaries;for(qt=0;qt<Zt.length;qt++)jd(yt,_e,Zt[qt]);Zt.splice(0,qt),ba(_e),l$2=new Uint8Array(512),n=0;var er=yt.partialBoundaries;for(qt=0;qt<er.length;qt++){var tr=er[qt];e:{Vt=yt,zt=_e;var rr=tr.completedSegments;for(Ht=0;Ht<rr.length;Ht++)if(!kd(Vt,zt,tr,rr[Ht])){Ht++,rr.splice(0,Ht);var ar=!1;break e}rr.splice(0,Ht),ar=!0}if(!ar){yt.destination=null,qt++,er.splice(0,qt);return}}er.splice(0,qt);var nr=yt.completedBoundaries;for(qt=0;qt<nr.length;qt++)jd(yt,_e,nr[qt]);nr.splice(0,qt)}finally{ba(_e),yt.allPendingTasks===0&&yt.pingedTasks.length===0&&yt.clientRenderedBoundaries.length===0&&yt.completedBoundaries.length===0&&_e.close()}}function ld(yt,_e){try{var $t=yt.abortableTasks;$t.forEach(function(Ft){return ed(Ft,yt,_e)}),$t.clear(),yt.destination!==null&&fd(yt,yt.destination)}catch(Ft){Y$1(yt,Ft),Vc(yt,Ft)}}reactDomServer_browser_production_min.renderToReadableStream=function(yt,_e){return new Promise(function($t,Ft){var Vt,qt,zt=new Promise(function(Jt,Xt){qt=Jt,Vt=Xt}),Ht=Rc(yt,za(_e?_e.identifierPrefix:void 0,_e?_e.nonce:void 0,_e?_e.bootstrapScriptContent:void 0,_e?_e.bootstrapScripts:void 0,_e?_e.bootstrapModules:void 0),Aa(_e?_e.namespaceURI:void 0),_e?_e.progressiveChunkSize:void 0,_e?_e.onError:void 0,qt,function(){var Jt=new ReadableStream({type:"bytes",pull:function(Xt){if(Ht.status===1)Ht.status=2,da(Xt,Ht.fatalError);else if(Ht.status!==2&&Ht.destination===null){Ht.destination=Xt;try{fd(Ht,Xt)}catch(Zt){Y$1(Ht,Zt),Vc(Ht,Zt)}}},cancel:function(){ld(Ht)}},{highWaterMark:0});Jt.allReady=zt,$t(Jt)},function(Jt){zt.catch(function(){}),Ft(Jt)},Vt);if(_e&&_e.signal){var Kt=_e.signal,Gt=function(){ld(Ht,Kt.reason),Kt.removeEventListener("abort",Gt)};Kt.addEventListener("abort",Gt)}Uc(Ht)})};reactDomServer_browser_production_min.version="18.3.1";var l$1,s$1;l$1=reactDomServerLegacy_browser_production_min,s$1=reactDomServer_browser_production_min;l$1.version;var renderToString=l$1.renderToString;l$1.renderToStaticMarkup;l$1.renderToNodeStream;l$1.renderToStaticNodeStream;s$1.renderToReadableStream;var f$1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};function p$1(yt,_e){return yt(_e={exports:{}},_e.exports),_e.exports}var d$1=p$1(function(yt){(function(_e){var $t=function(ar,nr,cr){if(!Kt(nr)||Jt(nr)||Xt(nr)||Zt(nr)||Ht(nr))return nr;var fr,vr=0,xr=0;if(Gt(nr))for(fr=[],xr=nr.length;vr<xr;vr++)fr.push($t(ar,nr[vr],cr));else for(var Sr in fr={},nr)Object.prototype.hasOwnProperty.call(nr,Sr)&&(fr[ar(Sr,cr)]=$t(ar,nr[Sr],cr));return fr},Ft=function(ar){return er(ar)?ar:(ar=ar.replace(/[\-_\s]+(.)?/g,function(nr,cr){return cr?cr.toUpperCase():""})).substr(0,1).toLowerCase()+ar.substr(1)},Vt=function(ar){var nr=Ft(ar);return nr.substr(0,1).toUpperCase()+nr.substr(1)},qt=function(ar,nr){return function(cr,fr){var vr=(fr=fr||{}).separator||"_",xr=fr.split||/(?=[A-Z])/;return cr.split(xr).join(vr)}(ar,nr).toLowerCase()},zt=Object.prototype.toString,Ht=function(ar){return typeof ar=="function"},Kt=function(ar){return ar===Object(ar)},Gt=function(ar){return zt.call(ar)=="[object Array]"},Jt=function(ar){return zt.call(ar)=="[object Date]"},Xt=function(ar){return zt.call(ar)=="[object RegExp]"},Zt=function(ar){return zt.call(ar)=="[object Boolean]"},er=function(ar){return(ar-=0)==ar},tr=function(ar,nr){var cr=nr&&"process"in nr?nr.process:nr;return typeof cr!="function"?ar:function(fr,vr){return cr(fr,ar,vr)}},rr={camelize:Ft,decamelize:qt,pascalize:Vt,depascalize:qt,camelizeKeys:function(ar,nr){return $t(tr(Ft,nr),ar)},decamelizeKeys:function(ar,nr){return $t(tr(qt,nr),ar,nr)},pascalizeKeys:function(ar,nr){return $t(tr(Vt,nr),ar)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};yt.exports?yt.exports=rr:_e.humps=rr})(f$1)}).decamelize,y$1=function(yt){if(Array.isArray(yt))return yt},h$1=function(yt,_e){if(typeof Symbol<"u"&&Symbol.iterator in Object(yt)){var $t=[],Ft=!0,Vt=!1,qt=void 0;try{for(var zt,Ht=yt[Symbol.iterator]();!(Ft=(zt=Ht.next()).done)&&($t.push(zt.value),!_e||$t.length!==_e);Ft=!0);}catch(Kt){Vt=!0,qt=Kt}finally{try{Ft||Ht.return==null||Ht.return()}finally{if(Vt)throw qt}}return $t}},v$1=function(yt,_e){(_e==null||_e>yt.length)&&(_e=yt.length);for(var $t=0,Ft=new Array(_e);$t<_e;$t++)Ft[$t]=yt[$t];return Ft},m$1=function(yt,_e){if(yt){if(typeof yt=="string")return v$1(yt,_e);var $t=Object.prototype.toString.call(yt).slice(8,-1);return $t==="Object"&&yt.constructor&&($t=yt.constructor.name),$t==="Map"||$t==="Set"?Array.from(yt):$t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($t)?v$1(yt,_e):void 0}},b$1=function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 300In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)},g$1=function(yt,_e){return y$1(yt)||h$1(yt,_e)||m$1(yt,_e)||b$1()},S$1=p$1(function(yt){function _e(){return yt.exports=_e=Object.assign||function($t){for(var Ft=1;Ft<arguments.length;
vendor: 20,659 bytes, line 300
300Ft++){var Vt=arguments[Ft];for(var qt in Vt)Object.prototype.hasOwnProperty.call(Vt,qt)&&($t[qt]=Vt[qt])}return $t},_e.apply(this,arguments)}yt.exports=_e}),w$1=function(yt,_e){if(yt==null)return{};var $t,Ft,Vt={},qt=Object.keys(yt);for(Ft=0;Ft<qt.length;Ft++)$t=qt[Ft],_e.indexOf($t)>=0||(Vt[$t]=yt[$t]);return Vt},O$1=function(yt,_e){if(yt==null)return{};var $t,Ft,Vt=w$1(yt,_e);if(Object.getOwnPropertySymbols){var qt=Object.getOwnPropertySymbols(yt);for(Ft=0;Ft<qt.length;Ft++)$t=qt[Ft],_e.indexOf($t)>=0||Object.prototype.propertyIsEnumerable.call(yt,$t)&&(Vt[$t]=yt[$t])}return Vt},j$1=reactExports.createContext(null);function x$1(yt){var _e=yt.children,$t=_e===void 0?"":_e,Ft=O$1(yt,["children"]);return typeof $t!="string"&&($t=renderToString($t)),React$2.createElement("template",S$1({},Ft,{dangerouslySetInnerHTML:{__html:$t}}))}function z$1(yt){var _e=yt.root,$t=yt.children;return reactDomExports.createPortal($t===void 0?null:$t,_e)}function E$1(yt){var _e=reactExports.forwardRef(function($t,Ft){var Vt,qt,zt=$t.mode,Ht=zt===void 0?"open":zt,Kt=$t.delegatesFocus,Gt=Kt!==void 0&&Kt,Jt=$t.styleSheets,Xt=Jt===void 0?[]:Jt,Zt=$t.ssr,er=Zt!==void 0&&Zt,tr=$t.children,rr=O$1($t,["mode","delegatesFocus","styleSheets","ssr","children"]),ar=(qt=reactExports.useRef((Vt=Ft)&&Vt.current),reactExports.useEffect(function(){Vt&&(Vt.current=qt.current)},[Vt]),qt),nr=reactExports.useState(null),cr=g$1(nr,2),fr=cr[0],vr=cr[1],xr="node_".concat(Ht).concat(Gt);return reactExports.useLayoutEffect(function(){if(ar.current)try{if(typeof Ft=="function"&&Ft(ar.current),er){var Sr=ar.current.shadowRoot;return void vr(Sr)}var Tr=ar.current.attachShadow({mode:Ht,delegatesFocus:Gt});Xt.length>0&&(Tr.adoptedStyleSheets=Xt),vr(Tr)}catch(Br){(function(jr){var Rr=jr.error,yr=jr.styleSheets,sr=jr.root;switch(Rr.name){case"NotSupportedError":yr.length>0&&(sr.adoptedStyleSheets=yr);break;default:throw Rr}})({error:Br,styleSheets:Xt,root:fr})}},[Ft,ar,Xt]),React$2.createElement(React$2.Fragment,null,React$2.createElement(yt.tag,S$1({key:xr,ref:ar},rr),(fr||er)&&React$2.createElement(j$1.Provider,{value:fr},er?React$2.createElement(x$1,{shadowroot:Ht,shadowrootmode:Ht},yt.render({root:fr,ssr:er,children:tr})):React$2.createElement(z$1,{root:fr},yt.render({root:fr,ssr:er,children:tr})))))});return _e.propTypes={mode:s$2.oneOf(["open","closed"]),delegatesFocus:s$2.bool,styleSheets:s$2.arrayOf(s$2.instanceOf(globalThis.CSSStyleSheet)),ssr:s$2.bool,children:s$2.node},_e}x$1.propTypes={children:s$2.oneOfType([s$2.string,s$2.node])},z$1.propTypes={root:s$2.object.isRequired,children:s$2.node};var T$1=new Map;function C$1(){var yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"core",$t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(Ft){return Ft.children};return new Proxy(yt,{get:function(Ft,Vt){var qt=d$1(Vt,{separator:"-"}),zt="".concat(_e,"-").concat(qt);return T$1.has(zt)||T$1.set(zt,E$1({tag:qt,render:$t})),T$1.get(zt)}})}var P$1=C$1();function composeEventHandlers(yt,_e,{checkForDefaultPrevented:$t=!0}={}){return function(Vt){if(yt==null||yt(Vt),$t===!1||!Vt.defaultPrevented)return _e==null?void 0:_e(Vt)}}function setRef(yt,_e){if(typeof yt=="function")return yt(_e);yt!=null&&(yt.current=_e)}function composeRefs(...yt){return _e=>{let $t=!1;const Ft=yt.map(Vt=>{const qt=setRef(Vt,_e);return!$t&&typeof qt=="function"&&($t=!0),qt});if($t)return()=>{for(let Vt=0;Vt<Ft.length;Vt++){const qt=Ft[Vt];typeof qt=="function"?qt():setRef(yt[Vt],null)}}}}function useComposedRefs(...yt){return reactExports.useCallback(composeRefs(...yt),yt)}function createContext2(yt,_e){const $t=reactExports.createContext(_e),Ft=qt=>{const{children:zt,...Ht}=qt,Kt=reactExports.useMemo(()=>Ht,Object.values(Ht));return jsxRuntimeExports.jsx($t.Provider,{value:Kt,children:zt})};Ft.displayName=yt+"Provider";function Vt(qt){const zt=reactExports.useContext($t);if(zt)return zt;if(_e!==void 0)return _e;throw new Error(`\`${qt}\` must be used within \`${yt}\``)}return[Ft,Vt]}function createContextScope(yt,_e=[]){let $t=[];function Ft(qt,zt){const Ht=reactExports.createContext(zt),Kt=$t.length;$t=[...$t,zt];const Gt=Xt=>{var nr;const{scope:Zt,children:er,...tr}=Xt,rr=((nr=Zt==null?void 0:Zt[yt])==null?void 0:nr[Kt])||Ht,ar=reactExports.useMemo(()=>tr,Object.values(tr));return jsxRuntimeExports.jsx(rr.Provider,{value:ar,children:er})};Gt.displayName=qt+"Provider";function Jt(Xt,Zt){var rr;const er=((rr=Zt==null?void 0:Zt[yt])==null?void 0:rr[Kt])||Ht,tr=reactExports.useContext(er);if(tr)return tr;if(zt!==void 0)return zt;throw new Error(`\`${Xt}\` must be used within \`${qt}\``)}return[Gt,Jt]}const Vt=()=>{const qt=$t.map(zt=>reactExports.createContext(zt));return function(Ht){const Kt=(Ht==null?void 0:Ht[yt])||qt;return reactExports.useMemo(()=>({[`__scope${yt}`]:{...Ht,[yt]:Kt}}),[Ht,Kt])}};return Vt.scopeName=yt,[Ft,composeContextScopes(Vt,..._e)]}function composeContextScopes(...yt){const _e=yt[0];if(yt.length===1)return _e;const $t=()=>{const Ft=yt.map(Vt=>({useScope:Vt(),scopeName:Vt.scopeName}));return function(qt){const zt=Ft.reduce((Ht,{useScope:Kt,scopeName:Gt})=>{const Xt=Kt(qt)[`__scope${Gt}`];return{...Ht,...Xt}},{});return reactExports.useMemo(()=>({[`__scope${_e.scopeName}`]:zt}),[zt])}};return $t.scopeName=_e.scopeName,$t}function createSlot(yt){const _e=createSlotClone(yt),$t=reactExports.forwardRef((Ft,Vt)=>{const{children:qt,...zt}=Ft,Ht=reactExports.Children.toArray(qt),Kt=Ht.find(isSlottable);if(Kt){const Gt=Kt.props.children,Jt=Ht.map(Xt=>Xt===Kt?reactExports.Children.count(Gt)>1?reactExports.Children.only(null):reactExports.isValidElement(Gt)?Gt.props.children:null:Xt);return jsxRuntimeExports.jsx(_e,{...zt,ref:Vt,children:reactExports.isValidElement(Gt)?reactExports.cloneElement(Gt,void 0,Jt):null})}return jsxRuntimeExports.jsx(_e,{...zt,ref:Vt,children:qt})});return $t.displayName=`${yt}.Slot`,$t}function createSlotClone(yt){const _e=reactExports.forwardRef(($t,Ft)=>{const{children:Vt,...qt}=$t;if(reactExports.isValidElement(Vt)){const zt=getElementRef$1(Vt),Ht=mergeProps(qt,Vt.props);return Vt.type!==reactExports.Fragment&&(Ht.ref=Ft?composeRefs(Ft,zt):zt),reactExports.cloneElement(Vt,Ht)}return reactExports.Children.count(Vt)>1?reactExports.Children.only(null):null});return _e.displayName=`${yt}.SlotClone`,_e}var SLOTTABLE_IDENTIFIER=Symbol("radix.slottable");function isSlottable(yt){return reactExports.isValidElement(yt)&&typeof yt.type=="function"&&"__radixId"in yt.type&&yt.type.__radixId===SLOTTABLE_IDENTIFIER}function mergeProps(yt,_e){const $t={..._e};for(const Ft in _e){const Vt=yt[Ft],qt=_e[Ft];/^on[A-Z]/.test(Ft)?Vt&&qt?$t[Ft]=(...Ht)=>{const Kt=qt(...Ht);return Vt(...Ht),Kt}:Vt&&($t[Ft]=Vt):Ft==="style"?$t[Ft]={...Vt,...qt}:Ft==="className"&&($t[Ft]=[Vt,qt].filter(Boolean).join(" "))}return{...yt,...$t}}function getElementRef$1(yt){var Ft,Vt;let _e=(Ft=Object.getOwnPropertyDescriptor(yt.props,"ref"))==null?void 0:Ft.get,$t=_e&&"isReactWarning"in _e&&_e.isReactWarning;return $t?yt.ref:(_e=(Vt=Object.getOwnPropertyDescriptor(yt,"ref"))==null?void 0:Vt.get,$t=_e&&"isReactWarning"in _e&&_e.isReactWarning,$t?yt.props.ref:yt.props.ref||yt.ref)}function createCollection(yt){const _e=yt+"CollectionProvider",[$t,Ft]=createContextScope(_e),[Vt,qt]=$t(_e,{collectionRef:{current:null},itemMap:new Map}),zt=rr=>{const{scope:ar,children:nr}=rr,cr=React$2.useRef(null),fr=React$2.useRef(new Map).current;return jsxRuntimeExports.jsx(Vt,{scope:ar,itemMap:fr,collectionRef:cr,children:nr})};zt.displayName=_e;const Ht=yt+"CollectionSlot",Kt=createSlot(Ht),Gt=React$2.forwardRef((rr,ar)=>{const{scope:nr,children:cr}=rr,fr=qt(Ht,nr),vr=useComposedRefs(ar,fr.collectionRef);return jsxRuntimeExports.jsx(Kt,{ref:vr,children:cr})});Gt.displayName=Ht;const Jt=yt+"CollectionItemSlot",Xt="data-radix-collection-item",Zt=createSlot(Jt),er=React$2.forwardRef((rr,ar)=>{const{scope:nr,children:cr,...fr}=rr,vr=React$2.useRef(null),xr=useComposedRefs(ar,vr),Sr=qt(Jt,nr);return React$2.useEffect(()=>(Sr.itemMap.set(vr,{ref:vr,...fr}),()=>void Sr.itemMap.delete(vr))),jsxRuntimeExports.jsx(Zt,{[Xt]:"",ref:xr,children:cr})});er.displayName=Jt;function tr(rr){const ar=qt(yt+"CollectionConsumer",rr);return React$2.useCallback(()=>{const cr=ar.collectionRef.current;if(!cr)return[];const fr=Array.from(cr.querySelectorAll(`[${Xt}]`));return Array.from(ar.itemMap.values()).sort((Sr,Tr)=>fr.indexOf(Sr.ref.current)-fr.indexOf(Tr.ref.current))},[ar.collectionRef,ar.itemMap])}return[{Provider:zt,Slot:Gt,ItemSlot:er},tr,Ft]}var NODES=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Primitive=NODES.reduce((yt,_e)=>{const $t=createSlot(`Primitive.${_e}`),Ft=reactExports.forwardRef((Vt,qt)=>{const{asChild:zt,...Ht}=Vt,Kt=zt?$t:_e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),jsxRuntimeExports.jsx(Kt,{...Ht,ref:qt})});return Ft.displayName=`Primitive.${_e}`,{...yt,[_e]:Ft}},{});function dispatchDiscreteCustomEvent(yt,_e){yt&&reactDomExports.flushSync(()=>yt.dispatchEvent(_e))}function useCallbackRef$1(yt){const _e=reactExports.useRef(yt);return reactExports.useEffect(()=>{_e.current=yt}),reactExports.useMemo(()=>(...$t)=>{var Ft;return(Ft=_e.current)==null?void 0:Ft.call(_e,...$t)},[])}function useEscapeKeydown(yt,_e=globalThis==null?void 0:globalThis.document){const $t=useCallbackRef$1(yt);reactExports.useEffect(()=>{const Ft=Vt=>{Vt.key==="Escape"&&$t(Vt)};return _e.addEventListener("keydown",Ft,{capture:!0}),()=>_e.removeEventListener("keydown",Ft,{capture:!0})},[$t,_e])}var DISMISSABLE_LAYER_NAME="DismissableLayer",CONTEXT_UPDATE="dismissableLayer.update",POINTER_DOWN_OUTSIDE="dismissableLayer.pointerDownOutside",FOCUS_OUTSIDE="dismissableLayer.focusOutside",originalBodyPointerEvents,DismissableLayerContext=reactExports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),DismissableLayer=reactExports.forwardRef((yt,_e)=>{const{disableOutsidePointerEvents:$t=!1,onEscapeKeyDown:Ft,onPointerDownOutside:Vt,onFocusOutside:qt,onInteractOutside:zt,onDismiss:Ht,...Kt}=yt,Gt=reactExports.useContext(DismissableLayerContext),[Jt,Xt]=reactExports.useState(null),Zt=(Jt==null?void 0:Jt.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,er]=reactExports.useState({}),tr=useComposedRefs(_e,Tr=>Xt(Tr)),rr=Array.from(Gt.layers),[ar]=[...Gt.layersWithOutsidePointerEventsDisabled].slice(-1),nr=rr.indexOf(ar),cr=Jt?rr.indexOf(Jt):-1,fr=Gt.layersWithOutsidePointerEventsDisabled.size>0,vr=cr>=nr,xr=usePointerDownOutside(Tr=>{const Br=Tr.target,jr=[...Gt.branches].some(Rr=>Rr.contains(Br));!vr||jr||(Vt==null||Vt(Tr),zt==null||zt(Tr),Tr.defaultPrevented||Ht==null||Ht())},Zt),Sr=useFocusOutside(Tr=>{const Br=Tr.target;[...Gt.branches].some(Rr=>Rr.contains(Br))||(qt==null||qt(Tr),zt==null||zt(Tr),Tr.defaultPrevented||Ht==null||Ht())},Zt);return useEscapeKeydown(Tr=>{cr===Gt.layers.size-1&&(Ft==null||Ft(Tr),!Tr.defaultPrevented&&Ht&&(Tr.preventDefault(),Ht()))},Zt),reactExports.useEffect(()=>{if(Jt)return $t&&(Gt.layersWithOutsidePointerEventsDisabled.size===0&&(originalBodyPointerEvents=Zt.body.style.pointerEvents,Zt.body.style.pointerEvents="none"),Gt.layersWithOutsidePointerEventsDisabled.add(Jt)),Gt.layers.add(Jt),dispatchUpdate(),()=>{$t&&Gt.layersWithOutsidePointerEventsDisabled.size===1&&(Zt.body.style.pointerEvents=originalBodyPointerEvents)}},[Jt,Zt,$t,Gt]),reactExports.useEffect(()=>()=>{Jt&&(Gt.layers.delete(Jt),Gt.layersWithOutsidePointerEventsDisabled.delete(Jt),dispatchUpdate())},[Jt,Gt]),reactExports.useEffect(()=>{const Tr=()=>er({});return document.addEventListener(CONTEXT_UPDATE,Tr),()=>document.removeEventListener(CONTEXT_UPDATE,Tr)},[]),jsxRuntimeExports.jsx(Primitive.div,{...Kt,ref:tr,style:{pointerEvents:fr?vr?"auto":"none":void 0,...yt.style},onFocusCapture:composeEventHandlers(yt.onFocusCapture,Sr.onFocusCapture),onBlurCapture:composeEventHandlers(yt.onBlurCapture,Sr.onBlurCapture),onPointerDownCapture:composeEventHandlers(yt.onPointerDownCapture,xr.onPointerDownCapture)})});DismissableLayer.displayName=DISMISSABLE_LAYER_NAME;var BRANCH_NAME="DismissableLayerBranch",DismissableLayerBranch=reactExports.forwardRef((yt,_e)=>{const $t=reactExports.useContext(DismissableLayerContext),Ft=reactExports.useRef(null),Vt=useComposedRefs(_e,Ft);return reactExports.useEffect(()=>{const qt=Ft.current;if(qt)return $t.branches.add(qt),()=>{$t.branches.delete(qt)}},[$t.branches]),jsxRuntimeExports.jsx(Primitive.div,{...yt,ref:Vt})});DismissableLayerBranch.displayName=BRANCH_NAME;function usePointerDownOutside(yt,_e=globalThis==null?void 0:globalThis.document){const $t=useCallbackRef$1(yt),Ft=reactExports.useRef(!1),Vt=reactExports.useRef(()=>{});return reactExports.useEffect(()=>{const qt=Ht=>{if(Ht.target&&!Ft.current){let Kt=function(){handleAndDispatchCustomEvent$1(POINTER_DOWN_OUTSIDE,$t,Gt,{discrete:!0})};const Gt={originalEvent:Ht};Ht.pointerType==="touch"?(_e.removeEventListener("click",Vt.current),Vt.current=Kt,_e.addEventListener("click",Vt.current,{once:!0})):Kt()}else _e.removeEventListener("click",Vt.current);Ft.current=!1},zt=window.setTimeout(()=>{_e.addEventListener("pointerdown",qt)},0);return()=>{window.clearTimeout(zt),_e.removeEventListener("pointerdown",qt),_e.removeEventListener("click",Vt.current)}},[_e,$t]),{onPointerDownCapture:()=>Ft.current=!0}}function useFocusOutside(yt,_e=globalThis==null?void 0:globalThis.document){const $t=useCallbackRef$1(yt),Ft=reactExports.useRef(!1);return reactExports.useEffect(()=>{const Vt=qt=>{qt.target&&!Ft.current&&handleAndDispatchCustomEvent$1(FOCUS_OUTSIDE,$t,{originalEvent:qt},{discrete:!1})};return _e.addEventListener("focusin",Vt),()=>_e.removeEventListener("focusin",Vt)},[_e,$t]),{onFocusCapture:()=>Ft.current=!0,onBlurCapture:()=>Ft.current=!1}}function dispatchUpdate(){const yt=new CustomEvent(CONTEXT_UPDATE);document.dispatchEvent(yt)}function handleAndDispatchCustomEvent$1(yt,_e,$t,{discrete:Ft}){const Vt=$t.originalEvent.target,qt=new CustomEvent(yt,{bubbles:!1,cancelable:!0,detail:$t});_e&&Vt.addEventListener(yt,_e,{once:!0}),Ft?dispatchDiscreteCustomEvent(Vt,qt):Vt.dispatchEvent(qt)}var Root$1=DismissableLayer,Branch=DismissableLayerBranch,useLayoutEffect2=globalThis!=null&&globalThis.document?reactExports.useLayoutEffect:()=>{},PORTAL_NAME$1="Portal",Portal$1=reactExports.forwardRef((yt,_e)=>{var Ht;const{container:$t,...Ft}=yt,[Vt,qt]=reactExports.useState(!1);useLayoutEffect2(()=>qt(!0),[]);const zt=$t||Vt&&((Ht=globalThis==null?void 0:globalThis.document)==null?void 0:Ht.body);return zt?ReactDOM.createPortal(jsxRuntimeExports.jsx(Primitive.div,{...Ft,ref:_e}),zt):null});Portal$1.displayName=PORTAL_NAME$1;function useStateMachine(yt,_e){return reactExports.useReducer(($t,Ft)=>_e[$t][Ft]??$t,yt)}var Presence=yt=>{const{present:_e,children:$t}=yt,Ft=usePresence$1(_e),Vt=typeof $t=="function"?$t({present:Ft.isPresent}):reactExports.Children.only($t),qt=useComposedRefs(Ft.ref,getElementRef(Vt));return typeof $t=="function"||Ft.isPresent?reactExports.cloneElement(Vt,{ref:qt}):null};Presence.displayName="Presence";function usePresence$1(yt){const[_e,$t]=reactExports.useState(),Ft=reactExports.useRef(null),Vt=reactExports.useRef(yt),qt=reactExports.useRef("none"),zt=yt?"mounted":"unmounted",[Ht,Kt]=useStateMachine(zt,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return reactExports.useEffect(()=>{const Gt=getAnimationName(Ft.current);qt.current=Ht==="mounted"?Gt:"none"},[Ht]),useLayoutEffect2(()=>{const Gt=Ft.current,Jt=Vt.current;if(Jt!==yt){const Zt=qt.current,er=getAnimationName(Gt);yt?Kt("MOUNT"):er==="none"||(Gt==null?void 0:Gt.display)==="none"?Kt("UNMOUNT"):Kt(Jt&&Zt!==er?"ANIMATION_OUT":"UNMOUNT"),Vt.current=yt}},[yt,Kt]),useLayoutEffect2(()=>{if(_e){let Gt;const Jt=_e.ownerDocument.defaultView??window,Xt=er=>{const rr=getAnimationName(Ft.current).includes(er.animationName);if(er.target===_e&&rr&&(Kt("ANIMATION_END"),!Vt.current)){const ar=_e.style.animationFillMode;_e.style.animationFillMode="forwards",Gt=Jt.setTimeout(()=>{_e.style.animationFillMode==="forwards"&&(_e.style.animationFillMode=ar)})}},Zt=er=>{er.target===_e&&(qt.current=getAnimationName(Ft.current))};return _e.addEventListener("animationstart",Zt),_e.addEventListener("animationcancel",Xt),_e.addEventListener("animationend",Xt),()=>{Jt.clearTimeout(Gt),_e.removeEventListener("animationstart",Zt),_e.removeEventListener("animationcancel",Xt),_e.removeEventListener("animationend",Xt)}}else Kt("ANIMATION_END")},[_e,Kt]),{isPresent:["mounted","unmountSuspended"].includes(Ht),ref:reactExports.useCallback(Gt=>{Ft.current=Gt?getComputedStyle(Gt):null,$t(Gt)},[])}}function getAnimationName(yt){return(yt==null?void 0:yt.animationName)||"none"}function getElementRef(yt){var Ft,Vt;let _e=(Ft=Object.getOwnPropertyDescriptor(yt.props,"ref"))==null?void 0:Ft.get,$t=_e&&"isReactWarning"in _e&&_e.isReactWarning;return $t?yt.ref:(_e=(Vt=Object.getOwnPropertyDescriptor(yt,"ref"))==null?void 0:Vt.get,$t=_e&&"isReactWarning"in _e&&_e.isReactWarning,$t?yt.props.ref:yt.props.ref||yt.ref)}var useInsertionEffect=React$3[" useInsertionEffect ".trim().toString()]||useLayoutEffect2;function useControllableState({prop:yt,defaultProp:_e,onChange:$t=()=>{},caller:Ft}){const[Vt,qt,zt]=useUncontrolledState({defaultProp:_e,onChange:$t}),Ht=yt!==void 0,Kt=Ht?yt:Vt;{const Jt=reactExports.useRef(yt!==void 0);reactExports.useEffect(()=>{const Xt=Jt.current;Xt!==Ht&&console.warn(`${Ft} is changing from ${Xt?"controlled":"uncontrolled"} to ${Ht?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),Jt.current=Ht},[Ht,Ft])}const Gt=reactExports.useCallback(Jt=>{var Xt;if(Ht){const Zt=isFunction(Jt)?Jt(yt):Jt;Zt!==yt&&((Xt=zt.current)==null||Xt.call(zt,Zt))}else qt(Jt)},[Ht,yt,qt,zt]);return[Kt,Gt]}function useUncontrolledState({defaultProp:yt,onChange:_e}){const[$t,Ft]=reactExports.useState(yt),Vt=reactExports.useRef($t),qt=reactExports.useRef(_e);return useInsertionEffect(()=>{qt.current=_e},[_e]),reactExports.useEffect(()=>{var zt;Vt.current!==$t&&((zt=qt.current)==null||zt.call(qt,$t),Vt.current=$t)},[$t,Vt]),[$t,Ft,qt]}function isFunction(yt){return typeof yt=="function"}var VISUALLY_HIDDEN_STYLES=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),NAME="VisuallyHidden",VisuallyHidden=reactExports.forwardRef((yt,_e)=>jsxRuntimeExports.jsx(Primitive.span,{...yt,ref:_e,style:{...VISUALLY_HIDDEN_STYLES,...yt.style}}));VisuallyHidden.displayName=NAME;var PROVIDER_NAME="ToastProvider",[Collection,useCollection,createCollectionScope]=createCollection("Toast"),[createToastContext,createToastScope]=createContextScope("Toast",[createCollectionScope]),[ToastProviderProvider,useToastProviderContext]=createToastContext(PROVIDER_NAME),ToastProvider=yt=>{const{__scopeToast:_e,label:$t="Notification",duration:Ft=5e3,swipeDirection:Vt="right",swipeThreshold:qt=50,children:zt}=yt,[Ht,Kt]=reactExports.useState(null),[Gt,Jt]=reactExports.useState(0),Xt=reactExports.useRef(!1),Zt=reactExports.useRef(!1);return $t.trim()||console.error(`Invalid prop \`label\` supplied to \`${PROVIDER_NAME}\`. Expected non-empty \`string\`.`),jsxRuntimeExports.jsx(Collection.Provider,{scope:_e,children:jsxRuntimeExports.jsx(ToastProviderProvider,{scope:_e,label:$t,duration:Ft,swipeDirection:Vt,swipeThreshold:qt,toastCount:Gt,viewport:Ht,onViewportChange:Kt,onToastAdd:reactExports.useCallback(()=>Jt(er=>er+1),[]),onToastRemove:reactExports.useCallback(()=>Jt(er=>er-1),[]),isFocusedToastEscapeKeyDownRef:Xt,isClosePausedRef:Zt,children:zt})})};ToastProvider.displayName=PROVIDER_NAME;var VIEWPORT_NAME="ToastViewport",VIEWPORT_DEFAULT_HOTKEY=["F8"],VIEWPORT_PAUSE="toast.viewportPause",VIEWPORT_RESUME="toast.viewportResume",ToastViewport=reactExports.forwardRef((yt,_e)=>{const{__scopeToast:$t,hotkey:Ft=VIEWPORT_DEFAULT_HOTKEY,label:Vt="Notifications ({hotkey})",...qt}=yt,zt=useToastProviderContext(VIEWPORT_NAME,$t),Ht=useCollection($t),Kt=reactExports.useRef(null),Gt=reactExports.useRef(null),Jt=reactExports.useRef(null),Xt=reactExports.useRef(null),Zt=useComposedRefs(_e,Xt,zt.onViewportChange),er=Ft.join("+").replace(/Key/g,"").replace(/Digit/g,""),tr=zt.toastCount>0;reactExports.useEffect(()=>{const ar=nr=>{var fr;Ft.length!==0&&Ft.every(vr=>
300nr[vr]||nr.code===vr)&&((fr=Xt.current)==null||fr.focus())};return document.addEventListener("keydown",ar),()=>document.removeEventListener("keydown",ar)},[Ft]),reactExports.useEffect(()=>{const ar=Kt.current,nr=Xt.current;if(tr&&ar&&nr){const cr=()=>{if(!zt.isClosePausedRef.current){const Sr=new CustomEvent(VIEWPORT_PAUSE);nr.dispatchEvent(Sr),zt.isClosePausedRef.current=!0}},fr=()=>{if(zt.isClosePausedRef.current){const Sr=new CustomEvent(VIEWPORT_RESUME);nr.dispatchEvent(Sr),zt.isClosePausedRef.current=!1}},vr=Sr=>{!ar.contains(Sr.relatedTarget)&&fr()},xr=()=>{ar.contains(document.activeElement)||fr()};return ar.addEventListener("focusin",cr),ar.addEventListener("focusout",vr),ar.addEventListener("pointermove",cr),ar.addEventListener("pointerleave",xr),window.addEventListener("blur",cr),window.addEventListener("focus",fr),()=>{ar.removeEventListener("focusin",cr),ar.removeEventListener("focusout",vr),ar.removeEventListener("pointermove",cr),ar.removeEventListener("pointerleave",xr),window.removeEventListener("blur",cr),window.removeEventListener("focus",fr)}}},[tr,zt.isClosePausedRef]);const rr=reactExports.useCallback(({tabbingDirection:ar})=>{const cr=Ht().map(fr=>{const vr=fr.ref.current,xr=[vr,...getTabbableCandidates$1(vr)];return ar==="forwards"?xr:xr.reverse()});return(ar==="forwards"?cr.reverse():cr).flat()},[Ht]);return reactExports.useEffect(()=>{const ar=Xt.current;if(ar){const nr=cr=>{var xr,Sr,Tr;const fr=cr.altKey||cr.ctrlKey||cr.metaKey;if(cr.key==="Tab"&&!fr){const Br=document.activeElement,jr=cr.shiftKey;if(cr.target===ar&&jr){(xr=Gt.current)==null||xr.focus();return}const sr=rr({tabbingDirection:jr?"backwards":"forwards"}),or=sr.findIndex(Qt=>Qt===Br);focusFirst$1(sr.slice(or+1))?cr.preventDefault():jr?(Sr=Gt.current)==null||Sr.focus():(Tr=Jt.current)==null||Tr.focus()}};return ar.addEventListener("keydown",nr),()=>ar.removeEventListener("keydown",nr)}},[Ht,rr]),jsxRuntimeExports.jsxs(Branch,{ref:Kt,role:"region","aria-label":Vt.replace("{hotkey}",er),tabIndex:-1,style:{pointerEvents:tr?void 0:"none"},children:[tr&&jsxRuntimeExports.jsx(FocusProxy,{ref:Gt,onFocusFromOutsideViewport:()=>{const ar=rr({tabbingDirection:"forwards"});focusFirst$1(ar)}}),jsxRuntimeExports.jsx(Collection.Slot,{scope:$t,children:jsxRuntimeExports.jsx(Primitive.ol,{tabIndex:-1,...qt,ref:Zt})}),tr&&jsxRuntimeExports.jsx(FocusProxy,{ref:Jt,onFocusFromOutsideViewport:()=>{const ar=rr({tabbingDirection:"backwards"});focusFirst$1(ar)}})]})});ToastViewport.displayName=VIEWPORT_NAME;var FOCUS_PROXY_NAME="ToastFocusProxy",FocusProxy=reactExports.forwardRef((yt,_e)=>{const{__scopeToast:$t,onFocusFromOutsideViewport:Ft,...Vt}=yt,qt=useToastProviderContext(FOCUS_PROXY_NAME,$t);return jsxRuntimeExports.jsx(VisuallyHidden,{"aria-hidden":!0,tabIndex:0,...Vt,ref:_e,style:{position:"fixed"},onFocus:zt=>{var Gt;const Ht=zt.relatedTarget;!((Gt=qt.viewport)!=null&&Gt.contains(Ht))&&Ft()}})});FocusProxy.displayName=FOCUS_PROXY_NAME;var TOAST_NAME="Toast",TOAST_SWIPE_START="toast.swipeStart",TOAST_SWIPE_MOVE="toast.swipeMove",TOAST_SWIPE_CANCEL="toast.swipeCancel",TOAST_SWIPE_END="toast.swipeEnd",Toast=reactExports.forwardRef((yt,_e)=>{const{forceMount:$t,open:Ft,defaultOpen:Vt,onOpenChange:qt,...zt}=yt,[Ht,Kt]=useControllableState({prop:Ft,defaultProp:Vt??!0,onChange:qt,caller:TOAST_NAME});return jsxRuntimeExports.jsx(Presence,{present:$t||Ht,children:jsxRuntimeExports.jsx(ToastImpl,{open:Ht,...zt,ref:_e,onClose:()=>Kt(!1),onPause:useCallbackRef$1(yt.onPause),onResume:useCallbackRef$1(yt.onResume),onSwipeStart:composeEventHandlers(yt.onSwipeStart,Gt=>{Gt.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:composeEventHandlers(yt.onSwipeMove,Gt=>{const{x:Jt,y:Xt}=Gt.detail.delta;Gt.currentTarget.setAttribute("data-swipe","move"),Gt.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${Jt}px`),Gt.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${Xt}px`)}),onSwipeCancel:composeEventHandlers(yt.onSwipeCancel,Gt=>{Gt.currentTarget.setAttribute("data-swipe","cancel"),Gt.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),Gt.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),Gt.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),Gt.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:composeEventHandlers(yt.onSwipeEnd,Gt=>{const{x:Jt,y:Xt}=Gt.detail.delta;Gt.currentTarget.setAttribute("data-swipe","end"),Gt.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),Gt.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),Gt.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${Jt}px`),Gt.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${Xt}px`),Kt(!1)})})})});Toast.displayName=TOAST_NAME;var[ToastInteractiveProvider,useToastInteractiveContext]=createToastContext(TOAST_NAME,{onClose(){}}),ToastImpl=reactExports.forwardRef((yt,_e)=>{const{__scopeToast:$t,type:Ft="foreground",duration:Vt,open:qt,onClose:zt,onEscapeKeyDown:Ht,onPause:Kt,onResume:Gt,onSwipeStart:Jt,onSwipeMove:Xt,onSwipeCancel:Zt,onSwipeEnd:er,...tr}=yt,rr=useToastProviderContext(TOAST_NAME,$t),[ar,nr]=reactExports.useState(null),cr=useComposedRefs(_e,Qt=>nr(Qt)),fr=reactExports.useRef(null),vr=reactExports.useRef(null),xr=Vt||rr.duration,Sr=reactExports.useRef(0),Tr=reactExports.useRef(xr),Br=reactExports.useRef(0),{onToastAdd:jr,onToastRemove:Rr}=rr,yr=useCallbackRef$1(()=>{var ir;(ar==null?void 0:ar.contains(document.activeElement))&&((ir=rr.viewport)==null||ir.focus()),zt()}),sr=reactExports.useCallback(Qt=>
vendor: 5,178 bytes, line 300
300{!Qt||Qt===1/0||(window.clearTimeout(Br.current),Sr.current=new Date().getTime(),Br.current=window.setTimeout(yr,Qt))},[yr]);reactExports.useEffect(()=>{const Qt=rr.viewport;if(Qt){const ir=()=>{sr(Tr.current),Gt==null||Gt()},ur=()=>{const gr=new Date().getTime()-Sr.current;Tr.current=Tr.current-gr,window.clearTimeout(Br.current),Kt==null||Kt()};return Qt.addEventListener(VIEWPORT_PAUSE,ur),Qt.addEventListener(VIEWPORT_RESUME,ir),()=>{Qt.removeEventListener(VIEWPORT_PAUSE,ur),Qt.removeEventListener(VIEWPORT_RESUME,ir)}}},[rr.viewport,xr,Kt,Gt,sr]),reactExports.useEffect(()=>{qt&&!rr.isClosePausedRef.current&&sr(xr)},[qt,xr,rr.isClosePausedRef,sr]),reactExports.useEffect(()=>(jr(),()=>Rr()),[jr,Rr]);const or=reactExports.useMemo(()=>ar?getAnnounceTextContent(ar):null,[ar]);return rr.viewport?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[or&&jsxRuntimeExports.jsx(ToastAnnounce,{__scopeToast:$t,role:"status","aria-live":Ft==="foreground"?"assertive":"polite","aria-atomic":!0,children:or}),jsxRuntimeExports.jsx(ToastInteractiveProvider,{scope:$t,onClose:yr,children:reactDomExports.createPortal(jsxRuntimeExports.jsx(Collection.ItemSlot,{scope:$t,children:jsxRuntimeExports.jsx(Root$1,{asChild:!0,onEscapeKeyDown:composeEventHandlers(Ht,()=>{rr.isFocusedToastEscapeKeyDownRef.current||yr(),rr.isFocusedToastEscapeKeyDownRef.current=!1}),children:jsxRuntimeExports.jsx(Primitive.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":qt?"open":"closed","data-swipe-direction":rr.swipeDirection,...tr,ref:cr,style:{userSelect:"none",touchAction:"none",...yt.style},onKeyDown:composeEventHandlers(yt.onKeyDown,Qt=>{Qt.key==="Escape"&&(Ht==null||Ht(Qt.nativeEvent),Qt.nativeEvent.defaultPrevented||(rr.isFocusedToastEscapeKeyDownRef.current=!0,yr()))}),onPointerDown:composeEventHandlers(yt.onPointerDown,Qt=>{Qt.button===0&&(fr.current={x:Qt.clientX,y:Qt.clientY})}),onPointerMove:composeEventHandlers(yt.onPointerMove,Qt=>{if(!fr.current)return;const ir=Qt.clientX-fr.current.x,ur=Qt.clientY-fr.current.y,gr=!!vr.current,dr=["left","right"].includes(rr.swipeDirection),lr=["left","up"].includes(rr.swipeDirection)?Math.min:Math.max,hr=dr?lr(0,ir):0,wr=dr?0:lr(0,ur),pr=Qt.pointerType==="touch"?10:2,br={x:hr,y:wr},Dr={originalEvent:Qt,delta:br};gr?(vr.current=br,handleAndDispatchCustomEvent(TOAST_SWIPE_MOVE,Xt,Dr,{discrete:!1})):isDeltaInDirection(br,rr.swipeDirection,pr)?(vr.current=br,handleAndDispatchCustomEvent(TOAST_SWIPE_START,Jt,Dr,{discrete:!1}),Qt.target.setPointerCapture(Qt.pointerId)):(Math.abs(ir)>pr||Math.abs(ur)>pr)&&(fr.current=null)}),onPointerUp:composeEventHandlers(yt.onPointerUp,Qt=>{const ir=vr.current,ur=Qt.target;if(ur.hasPointerCapture(Qt.pointerId)&&ur.releasePointerCapture(Qt.pointerId),vr.current=null,fr.current=null,ir){const gr=Qt.currentTarget,dr={originalEvent:Qt,delta:ir};isDeltaInDirection(ir,rr.swipeDirection,rr.swipeThreshold)?handleAndDispatchCustomEvent(TOAST_SWIPE_END,er,dr,{discrete:!0}):handleAndDispatchCustomEvent(TOAST_SWIPE_CANCEL,Zt,dr,{discrete:!0}),gr.addEventListener("click",lr=>lr.preventDefault(),{once:!0})}})})})}),rr.viewport)})]}):null}),ToastAnnounce=yt=>{const{__scopeToast:_e,children:$t,...Ft}=yt,Vt=useToastProviderContext(TOAST_NAME,_e),[qt,zt]=reactExports.useState(!1),[Ht,Kt]=reactExports.useState(!1);return useNextFrame(()=>zt(!0)),reactExports.useEffect(()=>{const Gt=window.setTimeout(()=>Kt(!0),1e3);return()=>window.clearTimeout(Gt)},[]),Ht?null:jsxRuntimeExports.jsx(Portal$1,{asChild:!0,children:jsxRuntimeExports.jsx(VisuallyHidden,{...Ft,children:qt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Vt.label," ",$t]})})})},TITLE_NAME$1="ToastTitle",ToastTitle=reactExports.forwardRef((yt,_e)=>{const{__scopeToast:$t,...Ft}=yt;return jsxRuntimeExports.jsx(Primitive.div,{...Ft,ref:_e})});ToastTitle.displayName=TITLE_NAME$1;var DESCRIPTION_NAME$1="ToastDescription",ToastDescription=reactExports.forwardRef((yt,_e)=>{const{__scopeToast:$t,...Ft}=yt;return jsxRuntimeExports.jsx(Primitive.div,{...Ft,ref:_e})});ToastDescription.displayName=DESCRIPTION_NAME$1;var ACTION_NAME="ToastAction",ToastAction=reactExports.forwardRef((yt,_e)=>{const{altText:$t,...Ft}=yt;return $t.trim()?jsxRuntimeExports.jsx(ToastAnnounceExclude,{altText:$t,asChild:!0,children:jsxRuntimeExports.jsx(ToastClose,{...Ft,ref:_e})}):(console.error(`Invalid prop \`altText\` supplied to \`${ACTION_NAME}\`. Expected non-empty \`string\`.`),null)});ToastAction.displayName=ACTION_NAME;var CLOSE_NAME$1="ToastClose",ToastClose=reactExports.forwardRef((yt,_e)=>{const{__scopeToast:$t,...Ft}=yt,Vt=useToastInteractiveContext(CLOSE_NAME$1,$t);return jsxRuntimeExports.jsx(ToastAnnounceExclude,{asChild:!0,children:jsxRuntimeExports.jsx(Primitive.button,{type:"button",...Ft,ref:_e,onClick:composeEventHandlers(yt.onClick,Vt.onClose)})})});ToastClose.displayName=CLOSE_NAME$1;var ToastAnnounceExclude=reactExports.forwardRef((yt,_e)=>{const{__scopeToast:$t,altText:Ft,...Vt}=yt;return jsxRuntimeExports.jsx(Primitive.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":Ft||void 0,...Vt,ref:_e})});function getAnnounceTextContent(yt){const _e=[];
300return Array.from(yt.childNodes).forEach(Ft=>{if(Ft.nodeType===Ft.TEXT_NODE&&Ft.textContent&&_e.push(Ft.textContent),isHTMLElement(Ft)){const Vt=Ft.ariaHidden||Ft.hidden||Ft.style.display==="none",qt=Ft.dataset.radixToastAnnounceExclude==="";if(!Vt)if(qt){const zt=Ft.dataset.radixToastAnnounceAlt;zt&&_e.push(zt)}else _e.push(...getAnnounceTextContent(Ft))}}),_e}function handleAndDispatchCustomEvent(yt,_e,$t,{discrete:Ft}){const Vt=$t.originalEvent.currentTarget,qt=new CustomEvent(yt,{bubbles:!0,cancelable:!0,detail:$t});_e&&Vt.addEventListener(yt,_e,{once:!0}),Ft?dispatchDiscreteCustomEvent(Vt,qt):Vt.dispatchEvent(qt)}var isDeltaInDirection=(yt,_e,$t=0)=>{const Ft=Math.abs(yt.x),Vt=Math.abs(yt.y),qt=Ft>Vt;return _e==="left"||_e==="right"?qt&&Ft>$t:!qt&&Vt>$t};function useNextFrame(yt=()=>{}){const _e=useCallbackRef$1(yt);useLayoutEffect2(()=>{let $t=0,Ft=0;return $t=window.requestAnimationFrame(()=>Ft=window.requestAnimationFrame(_e)),()=>{window.cancelAnimationFrame($t),window.cancelAnimationFrame(Ft)}},[_e])}function isHTMLElement(yt){return yt.nodeType===yt.ELEMENT_NODE}function getTabbableCandidates$1(yt){const _e=[],$t=document.createTreeWalker(yt,NodeFilter.SHOW_ELEMENT,{acceptNode:Ft=>{const Vt=Ft.tagName==="INPUT"&&Ft.type==="hidden";return Ft.disabled||Ft.hidden||Vt?NodeFilter.FILTER_SKIP:Ft.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;$t.nextNode();)_e.push($t.currentNode);return _e}function focusFirst$1(yt){const _e=document.activeElement;return yt.some($t=>$t===_e?!0:($t.focus(),document.activeElement!==_e))}var Provider=ToastProvider,Viewport=ToastViewport,toggleSelection=function(){var yt=document.getSelection();if(!yt.rangeCount)return function(){};for(var _e=document.activeElement,$t=[],Ft=0;Ft<yt.rangeCount;Ft++)$t.push(yt.getRangeAt(Ft));switch(_e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":_e.blur();break;default:_e=null;break}return yt.removeAllRanges(),function(){yt.type==="Caret"&&yt.removeAllRanges(),yt.rangeCount||$t.forEach(function(Vt){yt.addRange(Vt)}),_e&&_e.focus()}},deselectCurrent=toggleSelection,clipboardToIE11Formatting={"text/plain":"Text","text/html":"Url",default:"Text"},defaultMessage="Copy to clipboard: #{key}, Enter";function format(yt){var _e=(/mac os x/i.test(navigator.userAgent)?"â":"Ctrl")+"+C";return yt.replace(/#{\s*key\s*}/g,_e)}function copy(yt,_e){var $t,Ft,Vt,qt,zt,Ht,Kt=!1;_e||(_e={}),$t=_e.debug||!1;try{Vt=deselectCurrent(),qt=document.createRange(),zt=document.getSelection(),Ht=document.createElement("span"),Ht.textContent=yt,Ht.ariaHidden="true",Ht.style.all="unset",Ht.style.position="fixed",Ht.style.top=0,Ht.style.clip="rect(0, 0, 0, 0)",Ht.style.whiteSpace="pre",Ht.style.webkitUserSelect="text",Ht.style.MozUserSelect="text",Ht.style.msUserSelect="text",Ht.style.userSelect="text",Ht.addEventListener("copy",function(Jt){if(Jt.stopPropagation(),_e.format)if(Jt.preventDefault(),typeof Jt.clipboardData>"u"){$t&&console.warn("unable to use e.clipboardData"),$t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var Xt=clipboardToIE11Formatting[_e.format]||clipboardToIE11Formatting.default;window.clipboardData.setData(Xt,yt)}else Jt.clipboardData.clearData(),Jt.clipboardData.setData(_e.format,yt);_e.onCopy&&(Jt.preventDefault(),_e.onCopy(Jt.clipboardData))}),document.body.appendChild(Ht),qt.selectNodeContents(Ht),zt.addRange(qt);var Gt=document.execCommand("copy");if(!Gt)throw new Error("copy command was unsuccessful");Kt=!0}catch(Jt){$t&&console.error("unable to copy using execCommand: ",Jt),$t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(_e.format||"text",yt),_e.onCopy&&_e.onCopy(window.clipboardData),Kt=!0}catch(Xt){$t&&console.error("unable to copy using clipboardData: ",Xt),$t&&console.error("falling back to prompt"),Ft=format("message"in _e?_e.message:defaultMessage),window.prompt(Ft,yt)}}finally{zt&&(typeof zt.removeRange=="function"?zt.removeRange(qt):zt.removeAllRanges()),Ht&&document.body.removeChild(Ht),Vt()}return Kt}var copyToClipboard=copy;const copy$1=getDefaultExportFromCjs$1(copyToClipboard),LayoutGroupContext=reactExports.createContext({});function useConstant(yt){const _e=reactExports.useRef(null);return _e.current===null&&(_e.current=yt()),_e.current}const PresenceContext=reactExports.createContext(null),MotionConfigContext=reactExports.createContext({transformPagePoint:yt=>yt,isStatic:!1,reducedMotion:"never"});class PopChildMeasure extends reactExports.Component{getSnapshotBeforeUpdate(_e){const $t=this.props.childRef.current;if($t&&_e.isPresent&&!this.props.isPresent){const Ft=this.props.sizeRef.current;
vendor: 43,042 bytes, lines 300-308
300Ft.height=$t.offsetHeight||0,Ft.width=$t.offsetWidth||0,Ft.top=$t.offsetTop,Ft.left=$t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function PopChild({children:yt,isPresent:_e}){const $t=reactExports.useId(),Ft=reactExports.useRef(null),Vt=reactExports.useRef({width:0,height:0,top:0,left:0}),{nonce:qt}=reactExports.useContext(MotionConfigContext);return reactExports.useInsertionEffect(()=>{const{width:zt,height:Ht,top:Kt,left:Gt}=Vt.current;if(_e||!Ft.current||!zt||!Ht)return;Ft.current.dataset.motionPopId=$t;const Jt=document.createElement("style");return qt&&(Jt.nonce=qt),document.head.appendChild(Jt),Jt.sheet&&Jt.sheet.insertRule(` 301 [data-motion-pop-id="${$t}"] { 302 position: absolute !important; 303 width: ${zt}px !important; 304 height: ${Ht}px !important; 305 top: ${Kt}px !important; 306 left: ${Gt}px !important; 307 } 308 `),()=>{document.head.removeChild(Jt)}},[_e]),jsxRuntimeExports.jsx(PopChildMeasure,{isPresent:_e,childRef:Ft,sizeRef:Vt,children:reactExports.cloneElement(yt,{ref:Ft})})}const PresenceChild=({children:yt,initial:_e,isPresent:$t,onExitComplete:Ft,custom:Vt,presenceAffectsLayout:qt,mode:zt})=>{const Ht=useConstant(newChildrenMap),Kt=reactExports.useId(),Gt=reactExports.useCallback(Xt=>{Ht.set(Xt,!0);for(const Zt of Ht.values())if(!Zt)return;Ft&&Ft()},[Ht,Ft]),Jt=reactExports.useMemo(()=>({id:Kt,initial:_e,isPresent:$t,custom:Vt,onExitComplete:Gt,register:Xt=>(Ht.set(Xt,!1),()=>Ht.delete(Xt))}),qt?[Math.random(),Gt]:[$t,Gt]);return reactExports.useMemo(()=>{Ht.forEach((Xt,Zt)=>Ht.set(Zt,!1))},[$t]),reactExports.useEffect(()=>{!$t&&!Ht.size&&Ft&&Ft()},[$t]),zt==="popLayout"&&(yt=jsxRuntimeExports.jsx(PopChild,{isPresent:$t,children:yt})),jsxRuntimeExports.jsx(PresenceContext.Provider,{value:Jt,children:yt})};function newChildrenMap(){return new Map}function usePresence(yt=!0){const _e=reactExports.useContext(PresenceContext);if(_e===null)return[!0,null];const{isPresent:$t,onExitComplete:Ft,register:Vt}=_e,qt=reactExports.useId();reactExports.useEffect(()=>{yt&&Vt(qt)},[yt]);const zt=reactExports.useCallback(()=>yt&&Ft&&Ft(qt),[qt,Ft,yt]);return!$t&&Ft?[!1,zt]:[!0]}const getChildKey=yt=>yt.key||"";function onlyElements(yt){const _e=[];return reactExports.Children.forEach(yt,$t=>{reactExports.isValidElement($t)&&_e.push($t)}),_e}const isBrowser$1=typeof window<"u",useIsomorphicLayoutEffect$1=isBrowser$1?reactExports.useLayoutEffect:reactExports.useEffect,AnimatePresence=({children:yt,custom:_e,initial:$t=!0,onExitComplete:Ft,presenceAffectsLayout:Vt=!0,mode:qt="sync",propagate:zt=!1})=>{const[Ht,Kt]=usePresence(zt),Gt=reactExports.useMemo(()=>onlyElements(yt),[yt]),Jt=zt&&!Ht?[]:Gt.map(getChildKey),Xt=reactExports.useRef(!0),Zt=reactExports.useRef(Gt),er=useConstant(()=>new Map),[tr,rr]=reactExports.useState(Gt),[ar,nr]=reactExports.useState(Gt);useIsomorphicLayoutEffect$1(()=>{Xt.current=!1,Zt.current=Gt;for(let vr=0;vr<ar.length;vr++){const xr=getChildKey(ar[vr]);Jt.includes(xr)?er.delete(xr):er.get(xr)!==!0&&er.set(xr,!1)}},[ar,Jt.length,Jt.join("-")]);const cr=[];if(Gt!==tr){let vr=[...Gt];for(let xr=0;xr<ar.length;xr++){const Sr=ar[xr],Tr=getChildKey(Sr);Jt.includes(Tr)||(vr.splice(xr,0,Sr),cr.push(Sr))}qt==="wait"&&cr.length&&(vr=cr),nr(onlyElements(vr)),rr(Gt);return}const{forceRender:fr}=reactExports.useContext(LayoutGroupContext);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ar.map(vr=>{const xr=getChildKey(vr),Sr=zt&&!Ht?!1:Gt===ar||Jt.includes(xr),Tr=()=>{if(er.has(xr))er.set(xr,!0);else return;let Br=!0;er.forEach(jr=>{jr||(Br=!1)}),Br&&(fr==null||fr(),nr(Zt.current),zt&&(Kt==null||Kt()),Ft&&Ft())};return jsxRuntimeExports.jsx(PresenceChild,{isPresent:Sr,initial:!Xt.current||$t?void 0:!1,custom:Sr?void 0:_e,presenceAffectsLayout:Vt,mode:qt,onExitComplete:Sr?void 0:Tr,children:vr},xr)})})},noop=yt=>yt;let invariant=noop;function memo(yt){let _e;return()=>(_e===void 0&&(_e=yt()),_e)}const progress=(yt,_e,$t)=>{const Ft=_e-yt;return Ft===0?1:($t-yt)/Ft},secondsToMilliseconds=yt=>yt*1e3,millisecondsToSeconds=yt=>yt/1e3,MotionGlobalConfig={skipAnimations:!1,useManualTiming:!1};function createRenderStep(yt){let _e=new Set,$t=new Set,Ft=!1,Vt=!1;const qt=new WeakSet;let zt={delta:0,timestamp:0,isProcessing:!1};function Ht(Gt){qt.has(Gt)&&(Kt.schedule(Gt),yt()),Gt(zt)}const Kt={schedule:(Gt,Jt=!1,Xt=!1)=>{const er=Xt&&Ft?_e:$t;return Jt&&qt.add(Gt),er.has(Gt)||er.add(Gt),Gt},cancel:Gt=>{$t.delete(Gt),qt.delete(Gt)},process:Gt=>{if(zt=Gt,Ft){Vt=!0;return}Ft=!0,[_e,$t]=[$t,_e],_e.forEach(Ht),_e.clear(),Ft=!1,Vt&&(Vt=!1,Kt.process(Gt))}};return Kt}const stepsOrder=["read","resolveKeyframes","update","preRender","render","postRender"],maxElapsed=40;function createRenderBatcher(yt,_e){let $t=!1,Ft=!0;const Vt={delta:0,timestamp:0,isProcessing:!1},qt=()=>$t=!0,zt=stepsOrder.reduce((nr,cr)=>(nr[cr]=createRenderStep(qt),nr),{}),{read:Ht,resolveKeyframes:Kt,update:Gt,preRender:Jt,render:Xt,postRender:Zt}=zt,er=()=>{const nr=performance.now();$t=!1,Vt.delta=Ft?1e3/60:Math.max(Math.min(nr-Vt.timestamp,maxElapsed),1),Vt.timestamp=nr,Vt.isProcessing=!0,Ht.process(Vt),Kt.process(Vt),Gt.process(Vt),Jt.process(Vt),Xt.process(Vt),Zt.process(Vt),Vt.isProcessing=!1,$t&&_e&&(Ft=!1,yt(er))},tr=()=>{$t=!0,Ft=!0,Vt.isProcessing||yt(er)};return{schedule:stepsOrder.reduce((nr,cr)=>{const fr=zt[cr];return nr[cr]=(vr,xr=!1,Sr=!1)=>($t||tr(),fr.schedule(vr,xr,Sr)),nr},{}),cancel:nr=>{for(let cr=0;cr<stepsOrder.length;cr++)zt[stepsOrder[cr]].cancel(nr)},state:Vt,steps:zt}}const{schedule:frame,cancel:cancelFrame,state:frameData,steps:frameSteps}=createRenderBatcher(typeof requestAnimationFrame<"u"?requestAnimationFrame:noop,!0),LazyContext=reactExports.createContext({strict:!1}),featureProps={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},featureDefinitions={};for(const yt in featureProps)featureDefinitions[yt]={isEnabled:_e=>featureProps[yt].some($t=>!!_e[$t])};function loadFeatures(yt){for(const _e in yt)featureDefinitions[_e]={...featureDefinitions[_e],...yt[_e]}}const validMotionProps=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function isValidMotionProp(yt){return yt.startsWith("while")||yt.startsWith("drag")&&yt!=="draggable"||yt.startsWith("layout")||yt.startsWith("onTap")||yt.startsWith("onPan")||yt.startsWith("onLayout")||validMotionProps.has(yt)}let shouldForward=yt=>!isValidMotionProp(yt);function loadExternalIsValidProp(yt){yt&&(shouldForward=_e=>_e.startsWith("on")?!isValidMotionProp(_e):yt(_e))}try{loadExternalIsValidProp(require("@emotion/is-prop-valid").default)}catch{}function filterProps(yt,_e,$t){const Ft={};for(const Vt in yt)Vt==="values"&&typeof yt.values=="object"||(shouldForward(Vt)||$t===!0&&isValidMotionProp(Vt)||!_e&&!isValidMotionProp(Vt)||yt.draggable&&Vt.startsWith("onDrag"))&&(Ft[Vt]=yt[Vt]);return Ft}function createDOMMotionComponentProxy(yt){if(typeof Proxy>"u")return yt;const _e=new Map,$t=(...Ft)=>yt(...Ft);return new Proxy($t,{get:(Ft,Vt)=>Vt==="create"?yt:(_e.has(Vt)||_e.set(Vt,yt(Vt)),_e.get(Vt))})}const MotionContext=reactExports.createContext({});function isVariantLabel(yt){return typeof yt=="string"||Array.isArray(yt)}function isAnimationControls(yt){return yt!==null&&typeof yt=="object"&&typeof yt.start=="function"}const variantPriorityOrder=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],variantProps=["initial",...variantPriorityOrder];function isControllingVariants(yt){return isAnimationControls(yt.animate)||variantProps.some(_e=>isVariantLabel(yt[_e]))}function isVariantNode(yt){return!!(isControllingVariants(yt)||yt.variants)}function getCurrentTreeVariants(yt,_e){if(isControllingVariants(yt)){const{initial:$t,animate:Ft}=yt;return{initial:$t===!1||isVariantLabel($t)?$t:void 0,animate:isVariantLabel(Ft)?Ft:void 0}}return yt.inherit!==!1?_e:{}}function useCreateMotionContext(yt){const{initial:_e,animate:$t}=getCurrentTreeVariants(yt,reactExports.useContext(MotionContext));return reactExports.useMemo(()=>({initial:_e,animate:$t}),[variantLabelsAsDependency(_e),variantLabelsAsDependency($t)])}function variantLabelsAsDependency(yt){return Array.isArray(yt)?yt.join(" "):yt}const motionComponentSymbol=Symbol.for("motionComponentSymbol");function isRefObject(yt){return yt&&typeof yt=="object"&&Object.prototype.hasOwnProperty.call(yt,"current")}function useMotionRef(yt,_e,$t){return reactExports.useCallback(Ft=>{Ft&&yt.onMount&&yt.onMount(Ft),_e&&(Ft?_e.mount(Ft):_e.unmount()),$t&&(typeof $t=="function"?$t(Ft):isRefObject($t)&&($t.current=Ft))},[_e])}const camelToDash=yt=>yt.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),optimizedAppearDataId="framerAppearId",optimizedAppearDataAttribute="data-"+camelToDash(optimizedAppearDataId),{schedule:microtask,cancel:cancelMicrotask}=createRenderBatcher(queueMicrotask,!1),SwitchLayoutGroupContext=reactExports.createContext({});function useVisualElement(yt,_e,$t,Ft,Vt){var qt,zt;const{visualElement:Ht}=reactExports.useContext(MotionContext),Kt=reactExports.useContext(LazyContext),Gt=reactExports.useContext(PresenceContext),Jt=reactExports.useContext(MotionConfigContext).reducedMotion,Xt=reactExports.useRef(null);Ft=Ft||Kt.renderer,!Xt.current&&Ft&&(Xt.current=Ft(yt,{visualState:_e,parent:Ht,props:$t,presenceContext:Gt,blockInitialAnimation:Gt?Gt.initial===!1:!1,reducedMotionConfig:Jt}));const Zt=Xt.current,er=reactExports.useContext(SwitchLayoutGroupContext);Zt&&!Zt.projection&&Vt&&(Zt.type==="html"||Zt.type==="svg")&&createProjectionNode$1(Xt.current,$t,Vt,er);const tr=reactExports.useRef(!1);reactExports.useInsertionEffect(()=>{Zt&&tr.current&&Zt.update($t,Gt)});const rr=$t[optimizedAppearDataAttribute],ar=reactExports.useRef(!!rr&&!(!((qt=window.MotionHandoffIsComplete)===null||qt===void 0)&&qt.call(window,rr))&&((zt=window.MotionHasOptimisedAnimation)===null||zt===void 0?void 0:zt.call(window,rr)));return useIsomorphicLayoutEffect$1(()=>{Zt&&(tr.current=!0,window.MotionIsMounted=!0,Zt.updateFeatures(),microtask.render(Zt.render),ar.current&&Zt.animationState&&Zt.animationState.animateChanges())}),reactExports.useEffect(()=>{Zt&&(!ar.current&&Zt.animationState&&Zt.animationState.animateChanges(),ar.current&&(queueMicrotask(()=>{var nr;(nr=window.MotionHandoffMarkAsComplete)===null||nr===void 0||nr.call(window,rr)}),ar.current=!1))}),Zt}function createProjectionNode$1(yt,_e,$t,Ft){const{layoutId:Vt,layout:qt,drag:zt,dragConstraints:Ht,layoutScroll:Kt,layoutRoot:Gt}=_e;yt.projection=new $t(yt.latestValues,_e["data-framer-portal-id"]?void 0:getClosestProjectingNode(yt.parent)),yt.projection.setOptions({layoutId:Vt,layout:qt,alwaysMeasureLayout:!!zt||Ht&&isRefObject(Ht),visualElement:yt,animationType:typeof qt=="string"?qt:"both",initialPromotionConfig:Ft,layoutScroll:Kt,layoutRoot:Gt})}function getClosestProjectingNode(yt){if(yt)return yt.options.allowProjection!==!1?yt.projection:getClosestProjectingNode(yt.parent)}function createRendererMotionComponent({preloadedFeatures:yt,createVisualElement:_e,useRender:$t,useVisualState:Ft,Component:Vt}){var qt,zt;yt&&loadFeatures(yt);function Ht(Gt,Jt){let Xt;const Zt={...reactExports.useContext(MotionConfigContext),...Gt,layoutId:useLayoutId(Gt)},{isStatic:er}=Zt,tr=useCreateMotionContext(Gt),rr=Ft(Gt,er);if(!er&&isBrowser$1){useStrictMode();const ar=getProjectionFunctionality(Zt);Xt=ar.MeasureLayout,tr.visualElement=useVisualElement(Vt,rr,Zt,_e,ar.ProjectionNode)}return jsxRuntimeExports.jsxs(MotionContext.Provider,{value:tr,children:[Xt&&tr.visualElement?jsxRuntimeExports.jsx(Xt,{visualElement:tr.visualElement,...Zt}):null,$t(Vt,Gt,useMotionRef(rr,tr.visualElement,Jt),rr,er,tr.visualElement)]})}Ht.displayName=`motion.${typeof Vt=="string"?Vt:`create(${(zt=(qt=Vt.displayName)!==null&&qt!==void 0?qt:Vt.name)!==null&&zt!==void 0?zt:""})`}`;const Kt=reactExports.forwardRef(Ht);return Kt[motionComponentSymbol]=Vt,Kt}function useLayoutId({layoutId:yt}){const _e=reactExports.useContext(LayoutGroupContext).id;return _e&&yt!==void 0?_e+"-"+yt:yt}function useStrictMode(yt,_e){reactExports.useContext(LazyContext).strict}function getProjectionFunctionality(yt){const{drag:_e,layout:$t}=featureDefinitions;if(!_e&&!$t)return{};const Ft={..._e,...$t};return{MeasureLayout:_e!=null&&_e.isEnabled(yt)||$t!=null&&$t.isEnabled(yt)?Ft.MeasureLayout:void 0,ProjectionNode:Ft.ProjectionNode}}const lowercaseSVGElements=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function isSVGComponent(yt){return typeof yt!="string"||yt.includes("-")?!1:!!(lowercaseSVGElements.indexOf(yt)>-1||/[A-Z]/u.test(yt))}function getValueState(yt){const _e=[{},{}];return yt==null||yt.values.forEach(($t,Ft)=>{_e[0][Ft]=$t.get(),_e[1][Ft]=$t.getVelocity()}),_e}function resolveVariantFromProps(yt,_e,$t,Ft){if(typeof _e=="function"){const[Vt,qt]=getValueState(Ft);_e=_e($t!==void 0?$t:yt.custom,Vt,qt)}if(typeof _e=="string"&&(_e=yt.variants&&yt.variants[_e]),typeof _e=="function"){const[Vt,qt]=getValueState(Ft);_e=_e($t!==void 0?$t:yt.custom,Vt,qt)}return _e}const isKeyframesTarget=yt=>Array.isArray(yt),isCustomValue=yt=>!!(yt&&typeof yt=="object"&&yt.mix&&yt.toValue),resolveFinalValueInKeyframes=yt=>isKeyframesTarget(yt)?yt[yt.length-1]||0:yt,isMotionValue=yt=>!!(yt&&yt.getVelocity);function resolveMotionValue(yt){const _e=isMotionValue(yt)?yt.get():yt;return isCustomValue(_e)?_e.toValue():_e}function makeState({scrapeMotionValuesFromProps:yt,createRenderState:_e,onUpdate:$t},Ft,Vt,qt){const zt={latestValues:makeLatestValues(Ft,Vt,qt,yt),renderState:_e()};return $t&&(zt.onMount=Ht=>$t({props:Ft,current:Ht,...zt}),zt.onUpdate=Ht=>$t(Ht)),zt}const makeUseVisualState=yt=>(_e,$t)=>{const Ft=reactExports.useContext(MotionContext),Vt=reactExports.useContext(PresenceContext),qt=()=>makeState(yt,_e,Ft,Vt);return $t?qt():useConstant(qt)};function makeLatestValues(yt,_e,$t,Ft){const Vt={},qt=Ft(yt,{});for(const Zt in qt)Vt[Zt]=resolveMotionValue(qt[Zt]);let{initial:zt,animate:Ht}=yt;const Kt=isControllingVariants(yt),Gt=isVariantNode(yt);_e&&Gt&&!Kt&&yt.inherit!==!1&&(zt===void 0&&(zt=_e.initial),Ht===void 0&&(Ht=_e.animate));let Jt=$t?$t.initial===!1:!1;Jt=Jt||zt===!1;const Xt=Jt?Ht:zt;if(Xt&&typeof Xt!="boolean"&&!isAnimationControls(Xt)){const Zt=Array.isArray(Xt)?Xt:[Xt];for(let er=0;er<Zt.length;er++){const tr=resolveVariantFromProps(yt,Zt[er]);if(tr){const{transitionEnd:rr,transition:ar,...nr}=tr;for(const cr in nr){let fr=nr[cr];if(Array.isArray(fr)){const vr=Jt?fr.length-1:0;fr=fr[vr]}fr!==null&&(Vt[cr]=fr)}for(const cr in rr)Vt[cr]=rr[cr]}}}return Vt}const transformPropOrder=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],transformProps=new Set(transformPropOrder),checkStringStartsWith=yt=>_e=>typeof _e=="string"&&_e.startsWith(yt),isCSSVariableName=checkStringStartsWith("--"),startsAsVariableToken=checkStringStartsWith("var(--"),isCSSVariableToken=yt=>startsAsVariableToken(yt)?singleCssVariableRegex.test(yt.split("/*")[0].trim()):!1,singleCssVariableRegex=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,getValueAsType=(yt,_e)=>_e&&typeof yt=="number"?_e.transform(yt):yt,clamp=(yt,_e,$t)=>$t>_e?_e:$t<yt?yt:$t,number={test:yt=>typeof yt=="number",parse:parseFloat,transform:yt=>yt},alpha={...number,transform:yt=>clamp(0,1,yt)},scale={...number,default:1},createUnitType=yt=>({test:_e=>typeof _e=="string"&&_e.endsWith(yt)&&_e.split(" ").length===1,parse:parseFloat,transform:_e=>`${_e}${yt}`}),degrees=createUnitType("deg"),percent=createUnitType("%"),px=createUnitType("px"),vh=createUnitType("vh"),vw=createUnitType("vw"),progressPercentage={...percent,parse:yt=>percent.parse(yt)/100,transform:yt=>percent.transform(yt*100)},browserNumberValueTypes={borderWidth:px,borderTopWidth:px,borderRightWidth:px,borderBottomWidth:px,borderLeftWidth:px,borderRadius:px,radius:px,borderTopLeftRadius:px,borderTopRightRadius:px,borderBottomRightRadius:px,borderBottomLeftRadius:px,width:px,maxWidth:px,height:px,maxHeight:px,top:px,right:px,bottom:px,left:px,padding:px,paddingTop:px,paddingRight:px,paddingBottom:px,paddingLeft:px,margin:px,marginTop:px,marginRight:px,marginBottom:px,marginLeft:px,backgroundPositionX:px,backgroundPositionY:px},transformValueTypes={rotate:degrees,rotateX:degrees,rotateY:degrees,rotateZ:degrees,scale,scaleX:scale,scaleY:scale,scaleZ:scale,skew:degrees,skewX:degrees,skewY:degrees,distance:px,translateX:px,translateY:px,translateZ:px,x:px,y:px,z:px,perspective:px,transformPerspective:px,opacity:alpha,originX:progressPercentage,originY:progressPercentage,originZ:px},int={...number,transform:Math.round},numberValueTypes={...browserNumberValueTypes,...transformValueTypes,zIndex:int,size:px,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int},translateAlias={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},numTransforms=transformPropOrder.length;function buildTransform(yt,_e,$t){let Ft="",Vt=!0;for(let qt=0;qt<numTransforms;qt++){const zt=transformPropOrder[qt],Ht=yt[zt];if(Ht===void 0)continue;let Kt=!0;if(typeof Ht=="number"?Kt=Ht===(zt.startsWith("scale")?1:0):Kt=parseFloat(Ht)===0,!Kt||$t){const Gt=getValueAsType(Ht,numberValueTypes[zt]);if(!Kt){Vt=!1;const Jt=translateAlias[zt]||zt;Ft+=`${Jt}(${Gt}) `}$t&&(_e[zt]=Gt)}}return Ft=Ft.trim(),$t?Ft=$t(_e,Vt?"":Ft):Vt&&(Ft="none"),Ft}function buildHTMLStyles(yt,_e,$t){const{style:Ft,vars:Vt,transformOrigin:qt}=yt;let zt=!1,Ht=!1;for(const Kt in _e){const Gt=_e[Kt];if(transformProps.has(Kt)){zt=!0;continue}else if(isCSSVariableName(Kt)){Vt[Kt]=Gt;continue}else{const Jt=getValueAsType(Gt,numberValueTypes[Kt]);Kt.startsWith("origin")?(Ht=!0,qt[Kt]=Jt):Ft[Kt]=Jt}}if(_e.transform||(zt||$t?Ft.transform=buildTransform(_e,yt.transform,$t):Ft.transform&&(Ft.transform="none")),Ht){const{originX:Kt="50%",originY:Gt="50%",originZ:Jt=0}=qt;Ft.transformOrigin=`${Kt} ${Gt} ${Jt}`}}const dashKeys={offset:"stroke-dashoffset",array:"stroke-dasharray"},camelKeys={offset:"strokeDashoffset",array:"strokeDasharray"};function buildSVGPath(yt,_e,$t=1,Ft=0,Vt=!0){yt.pathLength=1;const qt=Vt?dashKeys:camelKeys;yt[qt.offset]=px.transform(-Ft);const zt=px.transform(_e),Ht=px.transform($t);yt[qt.array]=`${zt} ${Ht}`}function calcOrigin$1(yt,_e,$t){return typeof yt=="string"?yt:px.transform(_e+$t*yt)}function calcSVGTransformOrigin(yt,_e,$t){const Ft=calcOrigin$1(_e,yt.x,yt.width),Vt=calcOrigin$1($t,yt.y,yt.height);return`${Ft} ${Vt}`}function buildSVGAttrs(yt,{attrX:_e,attrY:$t,attrScale:Ft,originX:Vt,originY:qt,pathLength:zt,pathSpacing:Ht=1,pathOffset:Kt=0,...Gt},Jt,Xt){if(buildHTMLStyles(yt,Gt,Xt),Jt){yt.style.viewBox&&(yt.attrs.viewBox=yt.style.viewBox);return}yt.attrs=yt.style,yt.style={};const{attrs:Zt,style:er,dimensions:tr}=yt;Zt.transform&&(tr&&(er.transform=Zt.transform),delete Zt.transform),tr&&(Vt!==void 0||qt!==void 0||er.transform)&&(er.transformOrigin=calcSVGTransformOrigin(tr,Vt!==void 0?Vt:.5,qt!==void 0?qt:.5)),_e!==void 0&&(Zt.x=_e),$t!==void 0&&(Zt.y=$t),Ft!==void 0&&(Zt.scale=Ft),zt!==void 0&&buildSVGPath(Zt,zt,Ht,Kt,!1)}const createHtmlRenderState=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),createSvgRenderState=()=>({...createHtmlRenderState(),attrs:{}}),isSVGTag=yt=>typeof yt=="string"&&yt.toLowerCase()==="svg";function renderHTML(yt,{style:_e,vars:$t},Ft,Vt){Object.assign(yt.style,_e,Vt&&Vt.getProjectionStyles(Ft));for(const qt in $t)yt.style.setProperty(qt,$t[qt])}const camelCaseAttributes=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function renderSVG(yt,_e,$t,Ft){renderHTML(yt,_e,void 0,Ft);for(const Vt in _e.attrs)yt.setAttribute(camelCaseAttributes.has(Vt)?Vt:camelToDash(Vt),_e.attrs[Vt])}const scaleCorrectors={};function addScaleCorrector(yt){Object.assign(scaleCorrectors,yt)}function isForcedMotionValue(yt,{layout:_e,layoutId:$t}){return transformProps.has(yt)||yt.startsWith("origin")||(_e||$t!==void 0)&&(!!scaleCorrectors[yt]||yt==="opacity")}function scrapeMotionValuesFromProps$1(yt,_e,$t){var Ft;const{style:Vt}=yt,qt={};for(const zt in Vt)(isMotionValue(Vt[zt])||_e.style&&isMotionValue(_e.style[zt])||isForcedMotionValue(zt,yt)||((Ft=$t==null?void 0:$t.getValue(zt))===null||Ft===void 0?void 0:Ft.liveStyle)!==void 0)&&(qt[zt]=Vt[zt]);return qt}function scrapeMotionValuesFromProps(yt,_e,$t){const Ft=scrapeMotionValuesFromProps$1(yt,_e,$t);for(const Vt in yt)if(isMotionValue(yt[Vt])||isMotionValue(_e[Vt])){const qt=transformPropOrder.indexOf(Vt)!==-1?"attr"+Vt.charAt(0).toUpperCase()+Vt.substring(1):Vt;Ft[qt]=yt[Vt]}return Ft}function updateSVGDimensions(yt,_e){try{_e.dimensions=typeof yt.getBBox=="function"?yt.getBBox():yt.getBoundingClientRect()}catch{_e.dimensions={x:0,y:0,width:0,height:0}}}const layoutProps=["x","y","width","height","cx","cy","r"],svgMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps,createRenderState:createSvgRenderState,onUpdate:({props:yt,prevProps:_e,current:$t,renderState:Ft,latestValues:Vt})=>{if(!$t)return;let qt=!!yt.drag;if(!qt){for(const Ht in Vt)if(transformProps.has(Ht)){qt=!0;break}}if(!qt)return;let zt=!_e;if(_e)for(let Ht=0;Ht<layoutProps.length;Ht++){const Kt=layoutProps[Ht];yt[Kt]!==_e[Kt]&&(zt=!0)}zt&&frame.read(()=>{updateSVGDimensions($t,Ft),frame.render(()=>{buildSVGAttrs(Ft,Vt,isSVGTag($t.tagName),yt.transformTemplate),renderSVG($t,Ft)})})}})},htmlMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps:scrapeMotionValuesFromProps$1,createRenderState:createHtmlRenderState})};function copyRawValuesOnly(yt,_e,$t){for(const Ft in _e)!isMotionValue(_e[Ft])&&!isForcedMotionValue(Ft,$t)&&(yt[Ft]=_e[Ft])}function useInitialMotionValues({transformTemplate:yt},_e){return reactExports.useMemo(()=>{const $t=createHtmlRenderState();return buildHTMLStyles($t,_e,yt),Object.assign({},$t.vars,$t.style)},[_e])}function useStyle(yt,_e){const $t=yt.style||{},Ft={};return copyRawValuesOnly(Ft,$t,yt),Object.assign(Ft,useInitialMotionValues(yt,_e)),Ft}function useHTMLProps(yt,_e){const $t={},Ft=useStyle(yt,_e);return yt.drag&&yt.dragListener!==!1&&($t.draggable=!1,Ft.userSelect=Ft.WebkitUserSelect=Ft.WebkitTouchCallout="none",Ft.touchAction=yt.drag===!0?"none":`pan-${yt.drag==="x"?"y":"x"}`),yt.tabIndex===void 0&&(yt.onTap||yt.onTapStart||yt.whileTap)&&($t.tabIndex=0),$t.style=Ft,$t}function useSVGProps(yt,_e,$t,Ft){const Vt=reactExports.useMemo(()=>{const qt=createSvgRenderState();return buildSVGAttrs(qt,_e,isSVGTag(Ft),yt.transformTemplate),{...qt.attrs,style:{...qt.style}}},[_e]);if(yt.style){const qt={};copyRawValuesOnly(qt,yt.style,yt),Vt.style={...qt,...Vt.style}}return Vt}function createUseRender(yt=!1){return($t,Ft,Vt,{latestValues:qt},zt)=>{const Kt=(isSVGComponent($t)?useSVGProps:useHTMLProps)(Ft,qt,zt,$t),Gt=filterProps(Ft,typeof $t=="string",yt),Jt=$t!==reactExports.Fragment?{...Gt,...Kt,ref:Vt}:{},{children:Xt}=Ft,Zt=reactExports.useMemo(()=>isMotionValue(Xt)?Xt.get():Xt,[Xt]);return reactExports.createElement($t,{...Jt,children:Zt})}}function createMotionComponentFactory(yt,_e){return function(Ft,{forwardMotionProps:Vt}={forwardMotionProps:!1}){const zt={...isSVGComponent(Ft)?svgMotionConfig:htmlMotionConfig,preloadedFeatures:yt,useRender:createUseRender(Vt),createVisualElement:_e,Component:Ft};return createRendererMotionComponent(zt)}}function shallowCompare(yt,_e){if(!Array.isArray(_e))return!1;const $t=_e.length;if($t!==yt.length)return!1;for(let Ft=0;Ft<$t;Ft++)if(_e[Ft]!==yt[Ft])return!1;return!0}function resolveVariant(yt,_e,$t){const Ft=yt.getProps();return resolveVariantFromProps(Ft,_e,$t!==void 0?$t:Ft.custom,yt)}const supportsScrollTimeline=memo(()=>window.ScrollTimeline!==void 0);class BaseGroupPlaybackControls{constructor(_e){this.stop=()=>this.runAll("stop"),this.animations=_e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(_e=>"finished"in _e?_e.finished:_e))}getAll(_e){return this.animations[0][_e]}setAll(_e,$t){for(let Ft=0;Ft<this.animations.length;Ft++)this.animations[Ft][_e]=$t}attachTimeline(_e,$t){const Ft=this.animations.map(Vt=>{if(supportsScrollTimeline()&&Vt.attachTimeline)return Vt.attachTimeline(_e);if(typeof $t=="function")return $t(Vt)});return()=>{Ft.forEach((Vt,qt)=>{Vt&&Vt(),this.animations[qt].stop()})}}get time(){return this.getAll("time")}set time(_e){this.setAll("time",_e)}get speed(){return this.getAll("speed")}set speed(_e){this.setAll("speed",_e)}get startTime(){return this.getAll("startTime")}get duration(){let _e=0;for(let $t=0;$t<this.animations.length;$t++)_e=Math.max(_e,this.animations[$t].duration);return _e}runAll(_e){this.animations.forEach($t=>$t[_e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class GroupPlaybackControls extends BaseGroupPlaybackControls{then(_e,$t){return Promise.all(this.animations).then(_e).catch($t)}}function getValueTransition(yt,_e){return yt?yt[_e]||yt.default||yt:void 0}const maxGeneratorDuration=2e4;function calcGeneratorDuration(yt){let _e=0;const $t=50;let Ft=yt.next(_e);for(;!Ft.done&&_e<maxGeneratorDuration;)_e+=$t,Ft=yt.next(_e);return _e>=maxGeneratorDuration?1/0:_e}function isGenerator(yt){return typeof yt=="function"}function attachTimeline(yt,_e){yt.timeline=_e,yt.onfinish=null}const isBezierDefinition=yt=>Array.isArray(yt)&&typeof yt[0]=="number",supportsFlags={linearEasing:void 0};function memoSupports(yt,_e){const $t=memo(yt);return()=>{var Ft;return(Ft=supportsFlags[_e])!==null&&Ft!==void 0?Ft:$t()}}const supportsLinearEasing=memoSupports(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),generateLinearEasing=(yt,_e,$t=10)=>{let Ft="";const Vt=Math.max(Math.round(_e/$t),2);for(let qt=0;qt<Vt;qt++)Ft+=yt(progress(0,Vt-1,qt))+", ";return`linear(${Ft.substring(0,Ft.length-2)})`};function isWaapiSupportedEasing(yt){return!!(typeof yt=="function"&&supportsLinearEasing()||!yt||typeof yt=="string"&&(yt in supportedWaapiEasing||supportsLinearEasing())||isBezierDefinition(yt)||Array.isArray(yt)&&yt.every(isWaapiSupportedEasing))}const cubicBezierAsString=([yt,_e,$t,Ft])=>`cubic-bezier(${yt}, ${_e}, ${$t}, ${Ft})`,supportedWaapiEasing={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cubicBezierAsString([0,.65,.55,1]),circOut:cubicBezierAsString([.55,0,1,.45]),backIn:cubicBezierAsString([.31,.01,.66,-.59]),backOut:cubicBezierAsString([.33,1.53,.69,.99])};function mapEasingToNativeEasing(yt,_e){if(yt)return typeof yt=="function"&&supportsLinearEasing()?generateLinearEasing(yt,_e):isBezierDefinition(yt)?cubicBezierAsString(yt):Array.isArray(yt)?yt.map($t=>mapEasingToNativeEasing($t,_e)||supportedWaapiEasing.easeOut):supportedWaapiEasing[yt]}const isDragging={x:!1,y:!1};function isDragActive(){return isDragging.x||isDragging.y}function resolveElements(yt,_e,$t){var Ft;if(yt instanceof Element)return[yt];if(typeof yt=="string"){let Vt=document;const qt=(Ft=void 0)!==null&&Ft!==void 0?Ft:Vt.querySelectorAll(yt);return qt?Array.from(qt):[]}return Array.from(yt)}function setupGesture(yt,_e){const $t=resolveElements(yt),Ft=new AbortController,Vt={passive:!0,..._e,signal:Ft.signal};return[$t,Vt,()=>Ft.abort()]}function filterEvents$1(yt){return _e=>{_e.pointerType==="touch"||isDragActive()||yt(_e)}}function hover(yt,_e,$t={}){const[Ft,Vt,qt]=setupGesture(yt,$t),zt=filterEvents$1(Ht=>{const{target:Kt}=Ht,Gt=_e(Ht);if(typeof Gt!="function"||!Kt)return;const Jt=filterEvents$1(Xt=>{Gt(Xt),Kt.removeEventListener("pointerleave",Jt)});Kt.addEventListener("pointerleave",Jt,Vt)});return Ft.forEach(Ht=>{Ht.addEventListener("pointerenter",zt,Vt)}),qt}const isNodeOrChild=(yt,_e)=>_e?yt===_e?!0:isNodeOrChild(yt,_e.parentElement):!1,isPrimaryPointer=yt=>yt.pointerType==="mouse"?typeof yt.button!="number"||yt.button<=0:yt.isPrimary!==!1,focusableElements=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function isElementKeyboardAccessible(yt){return focusableElements.has(yt.tagName)||yt.tabIndex!==-1}const isPressing=new WeakSet;function filterEvents(yt){return _e=>{_e.key==="Enter"&&yt(_e)}}function firePointerEvent(yt,_e){yt.dispatchEvent(new PointerEvent("pointer"+_e,{isPrimary:!0,bubbles:!0}))}const enableKeyboardPress=(yt,_e)=>{const $t=yt.currentTarget;if(!$t)return;const Ft=filterEvents(()=>{if(isPressing.has($t))return;firePointerEvent($t,"down");const Vt=filterEvents(()=>{firePointerEvent($t,"up")}),qt=()=>firePointerEvent($t,"cancel");$t.addEventListener("keyup",Vt,_e),$t.addEventListener("blur",qt,_e)});$t.addEventListener("keydown",Ft,_e),$t.addEventListener("blur",()=>$t.removeEventListener("keydown",Ft),_e)};function isValidPressEvent(yt){return isPrimaryPointer(yt)&&!isDragActive()}function press(yt,_e,$t={}){const[Ft,Vt,qt]=setupGesture(yt,$t),zt=Ht=>{const Kt=Ht.currentTarget;if(!isValidPressEvent(Ht)||isPressing.has(Kt))return;isPressing.add(Kt);const Gt=_e(Ht),Jt=(er,tr)=>{window.removeEventListener("pointerup",Xt),window.removeEventListener("pointercancel",Zt),!(!isValidPressEvent(er)||!isPressing.has(Kt))&&(isPressing.delete(Kt),typeof Gt=="function"&&Gt(er,{success:tr}))},Xt=er=>{Jt(er,$t.useGlobalTarget||isNodeOrChild(Kt,er.target))},Zt=er=>{Jt(er,!1)};window.addEventListener("pointerup",Xt,Vt),window.addEventListener("pointercancel",Zt,Vt)};return Ft.forEach(Ht=>{!isElementKeyboardAccessible(Ht)&&Ht.getAttribute("tabindex")===null&&(Ht.tabIndex=0),($t.useGlobalTarget?window:Ht).addEventListener("pointerdown",zt,Vt),Ht.addEventListener("focus",Gt=>enableKeyboardPress(Gt,Vt),Vt)}),qt}function setDragLock(yt){return yt==="x"||yt==="y"?isDragging[yt]?null:(isDragging[yt]=!0,()=>{isDragging[yt]=!1}):isDragging.x||isDragging.y?null:(isDragging.x=isDragging.y=!0,()=>{isDragging.x=isDragging.y=!1})}const positionalKeys=new Set(["width","height","top","left","right","bottom",...transformPropOrder]);let now;function clearTime(){now=void 0}const time={now:()=>(now===void 0&&time.set(frameData.isProcessing||MotionGlobalConfig.useManualTiming?frameData.timestamp:performance.now()),now),set:yt=>{now=yt,queueMicrotask(clearTime)}};function addUniqueItem(yt,_e){yt.indexOf(_e)===-1&&yt.push(_e)}function removeItem(yt,_e){const $t=yt.indexOf(_e);$t>-1&&yt.splice($t,1)}class SubscriptionManager{constructor(){this.subscriptions=[]}add(_e){return addUniqueItem(this.subscriptions,_e),()=>removeItem(this.subscriptions,_e)}notify(_e,$t,Ft){const Vt=this.subscriptions.length;if(Vt)if(Vt===1)this.subscriptions[0](_e,$t,Ft);else for(let qt=0;qt<Vt;qt++){const zt=this.subscriptions[qt];zt&&zt(_e,$t,Ft)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function velocityPerSecond(yt,_e){return _e?yt*(1e3/_e):0}const MAX_VELOCITY_DELTA=30,isFloat=yt=>!isNaN(parseFloat(yt));class MotionValue{constructor(_e,$t={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(Ft,Vt=!0)=>{const qt=time.now();this.updatedAt!==qt&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(Ft),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),Vt&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(_e),this.owner=$t.owner}setCurrent(_e){this.current=_e,this.updatedAt=time.now(),this.canTrackVelocity===null&&_e!==void 0&&(this.canTrackVelocity=isFloat(this.current))}setPrevFrameValue(_e=this.current){this.prevFrameValue=_e,this.prevUpdatedAt=this.updatedAt}onChange(_e){return this.on("change",_e)}on(_e,$t){this.events[_e]||(this.events[_e]=new SubscriptionManager);const Ft=this.events[_e].add($t);return _e==="change"?()=>{Ft(),frame.read(()=>{this.events.change.getSize()||this.stop()})}:Ft}clearListeners(){for(const _e in this.events)this.events[_e].clear()}attach(_e,$t){this.passiveEffect=_e,this.stopPassiveEffect=$t}set(_e,$t=!0){!$t||!this.passiveEffect?this.updateAndNotify(_e,$t):this.passiveEffect(_e,this.updateAndNotify)}setWithVelocity(_e,$t,Ft){this.set($t),this.prev=void 0,this.prevFrameValue=_e,this.prevUpdatedAt=this.updatedAt-Ft}jump(_e,$t=!0){this.updateAndNotify(_e),this.prev=_e,this.prevUpdatedAt=this.prevFrameValue=void 0,$t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const _e=time.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||_e-this.updatedAt>MAX_VELOCITY_DELTA)return 0;const $t=Math.min(this.updatedAt-this.prevUpdatedAt,MAX_VELOCITY_DELTA);return velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),$t)}start(_e){return this.stop(),new Promise($t=>{this.hasAnimated=!0,this.animation=_e($t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function motionValue(yt,_e){return new MotionValue(yt,_e)}function setMotionValue(yt,_e,$t){yt.hasValue(_e)?yt.getValue(_e).set($t):yt.addValue(_e,motionValue($t))}function setTarget(yt,_e){const $t=resolveVariant(yt,_e);let{transitionEnd:Ft={},transition:Vt={},...qt}=$t||{};qt={...qt,...Ft};for(const zt in qt){const Ht=resolveFinalValueInKeyframes(qt[zt]);setMotionValue(yt,zt,Ht)}}function isWillChangeMotionValue(yt){return!!(isMotionValue(yt)&&yt.add)}function addValueToWillChange(yt,_e){const $t=yt.getValue("willChange");if(isWillChangeMotionValue($t))return $t.add(_e)}function getOptimisedAppearId(yt){return yt.props[optimizedAppearDataAttribute]}const calcBezier=(yt,_e,$t)=>(((1-3*$t+3*_e)*yt+(3*$t-6*_e))*yt+3*_e)*yt,subdivisionPrecision=1e-7,subdivisionMaxIterations=12;function binarySubdivide(yt,_e,$t,Ft,Vt){let qt,zt,Ht=0;do zt=_e+($t-_e)/2,qt=calcBezier(zt,Ft,Vt)-yt,qt>0?$t=zt:_e=zt;while(Math.abs(qt)>subdivisionPrecision&&++Ht<subdivisionMaxIterations);return zt}function cubicBezier(yt,_e,$t,Ft){if(yt===_e&&$t===Ft)return noop;const Vt=qt=>binarySubdivide(qt,0,1,yt,$t);return qt=>qt===0||qt===1?qt:calcBezier(Vt(qt),_e,Ft)}const mirrorEasing=yt=>_e=>_e<=.5?yt(2*_e)/2:(2-yt(2*(1-_e)))/2,reverseEasing=yt=>_e=>1-yt(1-_e),backOut=cubicBezier(.33,1.53,.69,.99),backIn=reverseEasing(backOut),backInOut=mirrorEasing(backIn),anticipate=yt=>(yt*=2)<1?.5*backIn(yt):.5*(2-Math.pow(2,-10*(yt-1))),circIn=yt=>1-Math.sin(Math.acos(yt)),circOut=reverseEasing(circIn),circInOut=mirrorEasing(circIn),isZeroValueString=yt=>/^0[^.\s]+$/u.test(yt);function isNone(yt){return typeof yt=="number"?yt===0:yt!==null?yt==="none"||yt==="0"||isZeroValueString(yt):!0}const sanitize=yt=>Math.round(yt*1e5)/1e5,floatRegex=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function isNullish(yt){return yt==null}const singleColorRegex=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,isColorString=(yt,_e)=>$t=>!!(typeof $t=="string"&&singleColorRegex.test($t)&&$t.startsWith(yt)||_e&&!isNullish($t)&&Object.prototype.hasOwnProperty.call($t,_e)),splitColor=(yt,_e,$t)=>Ft=>{if(typeof Ft!="string")return Ft;const[Vt,qt,zt,Ht]=Ft.match(floatRegex);return{[yt]:parseFloat(Vt),[_e]:parseFloat(qt),[$t]:parseFloat(zt),alpha:Ht!==void 0?parseFloat(Ht):1}},clampRgbUnit=yt=>clamp(0,255,yt),rgbUnit={...number,transform:yt=>Math.round(clampRgbUnit(yt))},rgba={test:isColorString("rgb","red"),parse:splitColor("red","green","blue"),transform:({red:yt,green:_e,blue:$t,alpha:Ft=1})=>"rgba("+rgbUnit.transform(yt)+", "+rgbUnit.transform(_e)+", "+rgbUnit.transform($t)+", "+sanitize(alpha.transform(Ft))+")"};function parseHex(yt){let _e="",$t="",Ft="",Vt="";return yt.length>5?(_e=yt.substring(1,3),$t=yt.substring(3,5),Ft=yt.substring(5,7),Vt=yt.substring(7,9)):(_e=yt.substring(1,2),$t=yt.substring(2,3),Ft=yt.substring(3,4),Vt=yt.substring(4,5),_e+=_e,$t+=$t,Ft+=Ft,Vt+=Vt),{red:parseInt(_e,16),green:parseInt($t,16),blue:parseInt(Ft,16),alpha:Vt?parseInt(Vt,16)/255:1}}const hex={test:isColorString("#"),parse:parseHex,transform:rgba.transform},hsla={test:isColorString("hsl","hue"),parse:splitColor("hue","saturation","lightness"),transform:({hue:yt,saturation:_e,lightness:$t,alpha:Ft=1})=>"hsla("+Math.round(yt)+", "+percent.transform(sanitize(_e))+", "+percent.transform(sanitize($t))+", "+sanitize(alpha.transform(Ft))+")"},color={test:yt=>rgba.test(yt)||hex.test(yt)||hsla.test(yt),parse:yt=>rgba.test(yt)?rgba.parse(yt):hsla.test(yt)?hsla.parse(yt):hex.parse(yt),transform:yt=>typeof yt=="string"?yt:yt.hasOwnProperty("red")?rgba.transform(yt):hsla.transform(yt)},colorRegex=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function test(yt){var _e,$t;return isNaN(yt)&&typeof yt=="string"&&(((_e=yt.match(floatRegex))===null||_e===void 0?void 0:_e.length)||0)+((($t=yt.match(colorRegex))===null||$t===void 0?void 0:$t.length)||0)>0}const NUMBER_TOKEN="number",COLOR_TOKEN="color",VAR_TOKEN="var",VAR_FUNCTION_TOKEN="var(",SPLIT_TOKEN="${}",complexRegex=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function analyseComplexValue(yt){const _e=yt.toString(),$t=[],Ft={color:[],number:[],var:[]},Vt=[];let qt=0;const Ht=_e.replace(complexRegex,Kt=>(color.test(Kt)?(Ft.color.push(qt),Vt.push(COLOR_TOKEN),$t.push(color.parse(Kt))):Kt.startsWith(VAR_FUNCTION_TOKEN)?(Ft.var.push(qt),Vt.push(VAR_TOKEN),$t.push(Kt)):(Ft.number.push(qt),Vt.push(NUMBER_TOKEN),$t.push(parseFloat(Kt))),++qt,SPLIT_TOKEN)).split(SPLIT_TOKEN);return{values:$t,split:Ht,indexes:Ft,types:Vt}}function parseComplexValue(yt){return analyseComplexValue(yt).values}function createTransformer(yt){const{split:_e,types:$t}=analyseComplexValue(yt),Ft=_e.length;return Vt=>{let qt="";for(let zt=0;zt<Ft;zt++)if(qt+=_e[zt],Vt[zt]!==void 0){const Ht=$t[zt];Ht===NUMBER_TOKEN?qt+=sanitize(Vt[zt]):Ht===COLOR_TOKEN?qt+=color.transform(Vt[zt]):qt+=Vt[zt]}return qt}}const convertNumbersToZero=yt=>typeof yt=="number"?0:yt;function getAnimatableNone$1(yt){const _e=parseComplexValue(yt);return createTransformer(yt)(_e.map(convertNumbersToZero))}const complex={test,parse:parseComplexValue,createTransformer,getAnimatableNone:getAnimatableNone$1},maxDefaults=new Set(["brightness","contrast","saturate","opacity"]);function applyDefaultFilter(yt){const[_e,$t]=yt.slice(0,-1).split("(");if(_e==="drop-shadow")return yt;const[Ft]=$t.match(floatRegex)||[];if(!Ft)return yt;const Vt=$t.replace(Ft,"");let qt=maxDefaults.has(_e)?1:0;return Ft!==$t&&(qt*=100),_e+"("+qt+Vt+")"}const functionRegex=/\b([a-z-]*)\(.*?\)/gu,filter={...complex,getAnimatableNone:yt=>{const _e=yt.match(functionRegex);return _e?_e.map(applyDefaultFilter).join(" "):yt}},defaultValueTypes={...numberValueTypes,color,backgroundColor:color,outlineColor:color,fill:color,stroke:color,borderColor:color,borderTopColor:color,borderRightColor:color,borderBottomColor:color,borderLeftColor:color,filter,WebkitFilter:filter},getDefaultValueType=yt=>defaultValueTypes[yt];function getAnimatableNone(yt,_e){let $t=getDefaultValueType(yt);return $t!==filter&&($t=complex),$t.getAnimatableNone?$t.getAnimatableNone(_e):void 0}const invalidTemplates=new Set(["auto","none","0"]);function makeNoneKeyframesAnimatable(yt,_e,$t){let Ft=0,Vt;for(;Ft<yt.length&&!Vt;){const qt=yt[Ft];typeof qt=="string"&&!invalidTemplates.has(qt)&&analyseComplexValue(qt).values.length&&(Vt=yt[Ft]),Ft++}if(Vt&&$t)for(const qt of _e)yt[qt]=getAnimatableNone($t,Vt)}const isNumOrPxType=yt=>yt===number||yt===px,getPosFromMatrix=(yt,_e)=>parseFloat(yt.split(", ")[_e]),getTranslateFromMatrix=(yt,_e)=>($t,{transform:Ft})=>{if(Ft==="none"||!Ft)return 0;const Vt=Ft.match(/^matrix3d\((.+)\)$/u);if(Vt)return getPosFromMatrix(Vt[1],_e);{const qt=Ft.match(/^matrix\((.+)\)$/u);return qt?getPosFromMatrix(qt[1],yt):0}},transformKeys=new Set(["x","y","z"]),nonTranslationalTransformKeys=transformPropOrder.filter(yt=>!transformKeys.has(yt));function removeNonTranslationalTransform(yt){const _e=[];return nonTranslationalTransformKeys.forEach($t=>{const Ft=yt.getValue($t);Ft!==void 0&&(_e.push([$t,Ft.get()]),Ft.set($t.startsWith("scale")?1:0))}),_e}const positionalValues={width:({x:yt},{paddingLeft:_e="0",paddingRight:$t="0"})=>yt.max-yt.min-parseFloat(_e)-parseFloat($t),height:({y:yt},{paddingTop:_e="0",paddingBottom:$t="0"})=>yt.max-yt.min-parseFloat(_e)-parseFloat($t),top:(yt,{top:_e})=>parseFloat(_e),left:(yt,{left:_e})=>parseFloat(_e),bottom:({y:yt},{top:_e})=>parseFloat(_e)+(yt.max-yt.min),right:({x:yt},{left:_e})=>parseFloat(_e)+(yt.max-yt.min),x:getTranslateFromMatrix(4,13),y:getTranslateFromMatrix(5,14)};positionalValues.translateX=positionalValues.x;positionalValues.translateY=positionalValues.y;const toResolve=new Set;let isScheduled=!1,anyNeedsMeasurement=!1;function measureAllKeyframes(){if(anyNeedsMeasurement){const yt=Array.from(toResolve).filter(Ft=>Ft.needsMeasurement),_e=new Set(yt.map(Ft=>Ft.element)),$t=new Map;_e.forEach(Ft=>{const Vt=removeNonTranslationalTransform(Ft);Vt.length&&($t.set(Ft,Vt),Ft.render())}),yt.forEach(Ft=>Ft.measureInitialState()),_e.forEach(Ft=>{Ft.render();const Vt=$t.get(Ft);Vt&&Vt.forEach(([qt,zt])=>{var Ht;(Ht=Ft.getValue(qt))===null||Ht===void 0||Ht.set(zt)})}),yt.forEach(Ft=>Ft.measureEndState()),yt.forEach(Ft=>{Ft.suspendedScrollY!==void 0&&window.scrollTo(0,Ft.suspendedScrollY)})}anyNeedsMeasurement=!1,isScheduled=!1,toResolve.forEach(yt=>
vendor: 8,214 bytes, line 308
308yt.complete()),toResolve.clear()}function readAllKeyframes(){toResolve.forEach(yt=>{yt.readKeyframes(),yt.needsMeasurement&&(anyNeedsMeasurement=!0)})}function flushKeyframeResolvers(){readAllKeyframes(),measureAllKeyframes()}class KeyframeResolver{constructor(_e,$t,Ft,Vt,qt,zt=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[..._e],this.onComplete=$t,this.name=Ft,this.motionValue=Vt,this.element=qt,this.isAsync=zt}scheduleResolve(){this.isScheduled=!0,this.isAsync?(toResolve.add(this),isScheduled||(isScheduled=!0,frame.read(readAllKeyframes),frame.resolveKeyframes(measureAllKeyframes))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:_e,name:$t,element:Ft,motionValue:Vt}=this;for(let qt=0;qt<_e.length;qt++)if(_e[qt]===null)if(qt===0){const zt=Vt==null?void 0:Vt.get(),Ht=_e[_e.length-1];if(zt!==void 0)_e[0]=zt;else if(Ft&&$t){const Kt=Ft.readValue($t,Ht);Kt!=null&&(_e[0]=Kt)}_e[0]===void 0&&(_e[0]=Ht),Vt&&zt===void 0&&Vt.set(_e[0])}else _e[qt]=_e[qt-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),toResolve.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,toResolve.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const isNumericalString=yt=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(yt),splitCSSVariableRegex=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function parseCSSVariable(yt){const _e=splitCSSVariableRegex.exec(yt);if(!_e)return[,];const[,$t,Ft,Vt]=_e;return[`--${$t??Ft}`,Vt]}function getVariableValue(yt,_e,$t=1){const[Ft,Vt]=parseCSSVariable(yt);if(!Ft)return;const qt=window.getComputedStyle(_e).getPropertyValue(Ft);if(qt){const zt=qt.trim();return isNumericalString(zt)?parseFloat(zt):zt}return isCSSVariableToken(Vt)?getVariableValue(Vt,_e,$t+1):Vt}const testValueType=yt=>_e=>_e.test(yt),auto={test:yt=>yt==="auto",parse:yt=>yt},dimensionValueTypes=[number,px,percent,degrees,vw,vh,auto],findDimensionValueType=yt=>dimensionValueTypes.find(testValueType(yt));class DOMKeyframesResolver extends KeyframeResolver{constructor(_e,$t,Ft,Vt,qt){super(_e,$t,Ft,Vt,qt,!0)}readKeyframes(){const{unresolvedKeyframes:_e,element:$t,name:Ft}=this;if(!$t||!$t.current)return;super.readKeyframes();for(let Kt=0;Kt<_e.length;Kt++){let Gt=_e[Kt];if(typeof Gt=="string"&&(Gt=Gt.trim(),isCSSVariableToken(Gt))){const Jt=getVariableValue(Gt,$t.current);Jt!==void 0&&(_e[Kt]=Jt),Kt===_e.length-1&&(this.finalKeyframe=Gt)}}if(this.resolveNoneKeyframes(),!positionalKeys.has(Ft)||_e.length!==2)return;const[Vt,qt]=_e,zt=findDimensionValueType(Vt),Ht=findDimensionValueType(qt);if(zt!==Ht)if(isNumOrPxType(zt)&&isNumOrPxType(Ht))for(let Kt=0;Kt<_e.length;Kt++){const Gt=_e[Kt];typeof Gt=="string"&&(_e[Kt]=parseFloat(Gt))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:_e,name:$t}=this,Ft=[];for(let Vt=0;Vt<_e.length;Vt++)isNone(_e[Vt])&&Ft.push(Vt);Ft.length&&makeNoneKeyframesAnimatable(_e,Ft,$t)}measureInitialState(){const{element:_e,unresolvedKeyframes:$t,name:Ft}=this;if(!_e||!_e.current)return;Ft==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=positionalValues[Ft](_e.measureViewportBox(),window.getComputedStyle(_e.current)),$t[0]=this.measuredOrigin;const Vt=$t[$t.length-1];Vt!==void 0&&_e.getValue(Ft,Vt).jump(Vt,!1)}measureEndState(){var _e;const{element:$t,name:Ft,unresolvedKeyframes:Vt}=this;if(!$t||!$t.current)return;const qt=$t.getValue(Ft);qt&&qt.jump(this.measuredOrigin,!1);const zt=Vt.length-1,Ht=Vt[zt];Vt[zt]=positionalValues[Ft]($t.measureViewportBox(),window.getComputedStyle($t.current)),Ht!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=Ht),!((_e=this.removedTransforms)===null||_e===void 0)&&_e.length&&this.removedTransforms.forEach(([Kt,Gt])=>{$t.getValue(Kt).set(Gt)}),this.resolveNoneKeyframes()}}const isAnimatable=(yt,_e)=>_e==="zIndex"?!1:!!(typeof yt=="number"||Array.isArray(yt)||typeof yt=="string"&&(complex.test(yt)||yt==="0")&&!yt.startsWith("url("));function hasKeyframesChanged(yt){const _e=yt[0];if(yt.length===1)return!0;for(let $t=0;$t<yt.length;$t++)if(yt[$t]!==_e)return!0}function canAnimate(yt,_e,$t,Ft){const Vt=yt[0];if(Vt===null)return!1;if(_e==="display"||_e==="visibility")return!0;const qt=yt[yt.length-1],zt=isAnimatable(Vt,_e),Ht=isAnimatable(qt,_e);return!zt||!Ht?!1:hasKeyframesChanged(yt)||($t==="spring"||isGenerator($t))&&Ft}const isNotNull=yt=>yt!==null;function getFinalKeyframe(yt,{repeat:_e,repeatType:$t="loop"},Ft){const Vt=yt.filter(isNotNull),qt=_e&&$t!=="loop"&&_e%2===1?0:Vt.length-1;return!qt||Ft===void 0?Vt[qt]:Ft}const MAX_RESOLVE_DELAY=40;class BaseAnimation{constructor({autoplay:_e=!0,delay:$t=0,type:Ft="keyframes",repeat:Vt=0,repeatDelay:qt=0,repeatType:zt="loop",...Ht}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=time.now(),this.options={autoplay:_e,delay:$t,type:Ft,repeat:Vt,repeatDelay:qt,repeatType:zt,...Ht},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>MAX_RESOLVE_DELAY?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&flushKeyframeResolvers(),this._resolved}onKeyframesResolved(_e,$t){this.resolvedAt=time.now(),this.hasAttemptedResolve=!0;const{name:Ft,type:Vt,velocity:qt,delay:zt,onComplete:Ht,onUpdate:Kt,isGenerator:Gt}=this.options;if(!Gt&&!canAnimate(_e,Ft,Vt,qt))if(zt)this.options.duration=0;else{Kt&&Kt(getFinalKeyframe(_e,this.options,$t)),Ht&&Ht(),this.resolveFinishedPromise();return}const Jt=this.initPlayback(_e,$t);Jt!==!1&&(this._resolved={keyframes:_e,finalKeyframe:$t,...Jt},this.onPostResolved())}onPostResolved(){}then(_e,$t){return this.currentFinishedPromise.then(_e,$t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(_e=>{this.resolveFinishedPromise=_e})}}const mixNumber$1=(yt,_e,$t)=>yt+(_e-yt)*$t;function hueToRgb(yt,_e,$t){return $t<0&&($t+=1),$t>1&&($t-=1),$t<1/6?yt+(_e-yt)*6*$t:$t<1/2?_e:$t<2/3?yt+(_e-yt)*(2/3-$t)*6:yt}function hslaToRgba({hue:yt,saturation:_e,lightness:$t,alpha:Ft}){yt/=360,_e/=100,$t/=100;let Vt=0,qt=0,zt=0;if(!_e)Vt=qt=zt=$t;else{const Ht=$t<.5?$t*(1+_e):$t+_e-$t*_e,Kt=2*$t-Ht;Vt=hueToRgb(Kt,Ht,yt+1/3),qt=hueToRgb(Kt,Ht,yt),zt=hueToRgb(Kt,Ht,yt-1/3)}return{red:Math.round(Vt*255),green:Math.round(qt*255),blue:Math.round(zt*255),alpha:Ft}}function mixImmediate(yt,_e){return $t=>$t>0?_e:yt}const mixLinearColor=(yt,_e,$t)=>{const Ft=yt*yt,Vt=$t*(_e*_e-Ft)+Ft;return Vt<0?0:Math.sqrt(Vt)},colorTypes=[hex,rgba,hsla],getColorType=yt=>colorTypes.find(_e=>_e.test(yt));function asRGBA(yt){const _e=getColorType(yt);if(!_e)return!1;let $t=_e.parse(yt);return _e===hsla&&($t=hslaToRgba($t)),$t}const mixColor=(yt,_e)=>{const $t=asRGBA(yt),Ft=asRGBA(_e);if(!$t||!Ft)return mixImmediate(yt,_e);const Vt={...$t};return qt=>(Vt.red=mixLinearColor($t.red,Ft.red,qt),Vt.green=mixLinearColor($t.green,Ft.green,qt),Vt.blue=mixLinearColor($t.blue,Ft.blue,qt),Vt.alpha=mixNumber$1($t.alpha,Ft.alpha,qt),rgba.transform(Vt))},combineFunctions=(yt,_e)=>$t=>_e(yt($t)),pipe=(...yt)=>yt.reduce(combineFunctions),invisibleValues=new Set(["none","hidden"]);function mixVisibility(yt,_e){return invisibleValues.has(yt)?$t=>$t<=0?yt:_e:$t=>$t>=1?_e:yt}function mixNumber(yt,_e){return $t=>mixNumber$1(yt,_e,$t)}function getMixer(yt){return typeof yt=="number"?mixNumber:typeof yt=="string"?isCSSVariableToken(yt)?mixImmediate:color.test(yt)?mixColor:mixComplex:Array.isArray(yt)?mixArray:typeof yt=="object"?color.test(yt)?mixColor:mixObject:mixImmediate}function mixArray(yt,_e){const $t=[...yt],Ft=$t.length,Vt=yt.map((qt,zt)=>getMixer(qt)(qt,_e[zt]));return qt=>{for(let zt=0;zt<Ft;zt++)$t[zt]=Vt[zt](qt);return $t}}function mixObject(yt,_e){const $t={...yt,..._e},Ft={};for(const Vt in $t)yt[Vt]!==void 0&&_e[Vt]!==void 0&&(Ft[Vt]=getMixer(yt[Vt])(yt[Vt],_e[Vt]));return Vt=>{for(const qt in Ft)$t[qt]=Ft[qt](Vt);return $t}}function matchOrder(yt,_e){var $t;const Ft=[],Vt={color:0,var:0,number:0};for(let qt=0;qt<_e.values.length;
vendor: 4,572 bytes, line 308
308qt++){const zt=_e.types[qt],Ht=yt.indexes[zt][Vt[zt]],Kt=($t=yt.values[Ht])!==null&&$t!==void 0?$t:0;Ft[qt]=Kt,Vt[zt]++}return Ft}const mixComplex=(yt,_e)=>{const $t=complex.createTransformer(_e),Ft=analyseComplexValue(yt),Vt=analyseComplexValue(_e);return Ft.indexes.var.length===Vt.indexes.var.length&&Ft.indexes.color.length===Vt.indexes.color.length&&Ft.indexes.number.length>=Vt.indexes.number.length?invisibleValues.has(yt)&&!Vt.values.length||invisibleValues.has(_e)&&!Ft.values.length?mixVisibility(yt,_e):pipe(mixArray(matchOrder(Ft,Vt),Vt.values),$t):mixImmediate(yt,_e)};function mix(yt,_e,$t){return typeof yt=="number"&&typeof _e=="number"&&typeof $t=="number"?mixNumber$1(yt,_e,$t):getMixer(yt)(yt,_e)}const velocitySampleDuration=5;function calcGeneratorVelocity(yt,_e,$t){const Ft=Math.max(_e-velocitySampleDuration,0);return velocityPerSecond($t-yt(Ft),_e-Ft)}const springDefaults={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},safeMin=.001;function findSpring({duration:yt=springDefaults.duration,bounce:_e=springDefaults.bounce,velocity:$t=springDefaults.velocity,mass:Ft=springDefaults.mass}){let Vt,qt,zt=1-_e;zt=clamp(springDefaults.minDamping,springDefaults.maxDamping,zt),yt=clamp(springDefaults.minDuration,springDefaults.maxDuration,millisecondsToSeconds(yt)),zt<1?(Vt=Gt=>{const Jt=Gt*zt,Xt=Jt*yt,Zt=Jt-$t,er=calcAngularFreq(Gt,zt),tr=Math.exp(-Xt);return safeMin-Zt/er*tr},qt=Gt=>{const Xt=Gt*zt*yt,Zt=Xt*$t+$t,er=Math.pow(zt,2)*Math.pow(Gt,2)*yt,tr=Math.exp(-Xt),rr=calcAngularFreq(Math.pow(Gt,2),zt);return(-Vt(Gt)+safeMin>0?-1:1)*((Zt-er)*tr)/rr}):(Vt=Gt=>{const Jt=Math.exp(-Gt*yt),Xt=(Gt-$t)*yt+1;return-safeMin+Jt*Xt},qt=Gt=>{const Jt=Math.exp(-Gt*yt),Xt=($t-Gt)*(yt*yt);return Jt*Xt});const Ht=5/yt,Kt=approximateRoot(Vt,qt,Ht);if(yt=secondsToMilliseconds(yt),isNaN(Kt))return{stiffness:springDefaults.stiffness,damping:springDefaults.damping,duration:yt};{const Gt=Math.pow(Kt,2)*Ft;return{stiffness:Gt,damping:zt*2*Math.sqrt(Ft*Gt),duration:yt}}}const rootIterations=12;function approximateRoot(yt,_e,$t){let Ft=$t;for(let Vt=1;Vt<rootIterations;Vt++)Ft=Ft-yt(Ft)/_e(Ft);return Ft}function calcAngularFreq(yt,_e){return yt*Math.sqrt(1-_e*_e)}const durationKeys=["duration","bounce"],physicsKeys=["stiffness","damping","mass"];function isSpringType(yt,_e){return _e.some($t=>yt[$t]!==void 0)}function getSpringOptions(yt){let _e={velocity:springDefaults.velocity,stiffness:springDefaults.stiffness,damping:springDefaults.damping,mass:springDefaults.mass,isResolvedFromDuration:!1,...yt};if(!isSpringType(yt,physicsKeys)&&isSpringType(yt,durationKeys))if(yt.visualDuration){const $t=yt.visualDuration,Ft=2*Math.PI/($t*1.2),Vt=Ft*Ft,qt=2*clamp(.05,1,1-(yt.bounce||0))*Math.sqrt(Vt);_e={..._e,mass:springDefaults.mass,stiffness:Vt,damping:qt}}else{const $t=findSpring(yt);_e={..._e,...$t,mass:springDefaults.mass},_e.isResolvedFromDuration=!0}return _e}function spring(yt=springDefaults.visualDuration,_e=springDefaults.bounce){const $t=typeof yt!="object"?{visualDuration:yt,keyframes:[0,1],bounce:_e}:yt;let{restSpeed:Ft,restDelta:Vt}=$t;const qt=$t.keyframes[0],zt=$t.keyframes[$t.keyframes.length-1],Ht={done:!1,value:qt},{stiffness:Kt,damping:Gt,mass:Jt,duration:Xt,velocity:Zt,isResolvedFromDuration:er}=getSpringOptions({...$t,velocity:-millisecondsToSeconds($t.velocity||0)}),tr=Zt||0,rr=Gt/(2*Math.sqrt(Kt*Jt)),ar=zt-qt,nr=millisecondsToSeconds(Math.sqrt(Kt/Jt)),cr=Math.abs(ar)<5;Ft||(Ft=cr?springDefaults.restSpeed.granular:springDefaults.restSpeed.default),Vt||(Vt=cr?springDefaults.restDelta.granular:springDefaults.restDelta.default);let fr;if(rr<1){const xr=calcAngularFreq(nr,rr);fr=Sr=>{const Tr=Math.exp(-rr*nr*Sr);return zt-Tr*((tr+rr*nr*ar)/xr*Math.sin(xr*Sr)+ar*Math.cos(xr*Sr))}}else if(rr===1)fr=xr=>zt-Math.exp(-nr*xr)*(ar+(tr+nr*ar)*xr);else{const xr=nr*Math.sqrt(rr*rr-1);fr=Sr=>{const Tr=Math.exp(-rr*nr*Sr),Br=Math.min(xr*Sr,300);return zt-Tr*((tr+rr*nr*ar)*Math.sinh(Br)+xr*ar*Math.cosh(Br))/xr}}const vr={calculatedDuration:er&&Xt||null,next:xr=>{const Sr=fr(xr);if(er)Ht.done=xr>=Xt;else{let Tr=0;rr<1&&(Tr=xr===0?secondsToMilliseconds(tr):calcGeneratorVelocity(fr,xr,Sr));const Br=Math.abs(Tr)<=Ft,jr=Math.abs(zt-Sr)<=Vt;Ht.done=Br&&jr}return Ht.value=Ht.done?zt:Sr,Ht},toString:()=>{const xr=Math.min(calcGeneratorDuration(vr),maxGeneratorDuration),Sr=generateLinearEasing(Tr=>vr.next(xr*Tr).value,xr,30);return xr+"ms "+Sr}};return vr}
vendor: 6,262 bytes, line 308
308function inertia({keyframes:yt,velocity:_e=0,power:$t=.8,timeConstant:Ft=325,bounceDamping:Vt=10,bounceStiffness:qt=500,modifyTarget:zt,min:Ht,max:Kt,restDelta:Gt=.5,restSpeed:Jt}){const Xt=yt[0],Zt={done:!1,value:Xt},er=Br=>Ht!==void 0&&Br<Ht||Kt!==void 0&&Br>Kt,tr=Br=>Ht===void 0?Kt:Kt===void 0||Math.abs(Ht-Br)<Math.abs(Kt-Br)?Ht:Kt;let rr=$t*_e;const ar=Xt+rr,nr=zt===void 0?ar:zt(ar);nr!==ar&&(rr=nr-Xt);const cr=Br=>-rr*Math.exp(-Br/Ft),fr=Br=>nr+cr(Br),vr=Br=>{const jr=cr(Br),Rr=fr(Br);Zt.done=Math.abs(jr)<=Gt,Zt.value=Zt.done?nr:Rr};let xr,Sr;const Tr=Br=>{er(Zt.value)&&(xr=Br,Sr=spring({keyframes:[Zt.value,tr(Zt.value)],velocity:calcGeneratorVelocity(fr,Br,Zt.value),damping:Vt,stiffness:qt,restDelta:Gt,restSpeed:Jt}))};return Tr(0),{calculatedDuration:null,next:Br=>{let jr=!1;return!Sr&&xr===void 0&&(jr=!0,vr(Br),Tr(Br)),xr!==void 0&&Br>=xr?Sr.next(Br-xr):(!jr&&vr(Br),Zt)}}}const easeIn=cubicBezier(.42,0,1,1),easeOut=cubicBezier(0,0,.58,1),easeInOut=cubicBezier(.42,0,.58,1),isEasingArray=yt=>Array.isArray(yt)&&typeof yt[0]!="number",easingLookup={linear:noop,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate},easingDefinitionToFunction=yt=>{if(isBezierDefinition(yt)){invariant(yt.length===4);const[_e,$t,Ft,Vt]=yt;return cubicBezier(_e,$t,Ft,Vt)}else if(typeof yt=="string")return invariant(easingLookup[yt]!==void 0),easingLookup[yt];return yt};function createMixers(yt,_e,$t){const Ft=[],Vt=$t||mix,qt=yt.length-1;for(let zt=0;zt<qt;zt++){let Ht=Vt(yt[zt],yt[zt+1]);if(_e){const Kt=Array.isArray(_e)?_e[zt]||noop:_e;Ht=pipe(Kt,Ht)}Ft.push(Ht)}return Ft}function interpolate(yt,_e,{clamp:$t=!0,ease:Ft,mixer:Vt}={}){const qt=yt.length;if(invariant(qt===_e.length),qt===1)return()=>_e[0];if(qt===2&&_e[0]===_e[1])return()=>_e[1];const zt=yt[0]===yt[1];yt[0]>yt[qt-1]&&(yt=[...yt].reverse(),_e=[..._e].reverse());const Ht=createMixers(_e,Ft,Vt),Kt=Ht.length,Gt=Jt=>{if(zt&&Jt<yt[0])return _e[0];let Xt=0;if(Kt>1)for(;Xt<yt.length-2&&!(Jt<yt[Xt+1]);Xt++);const Zt=progress(yt[Xt],yt[Xt+1],Jt);return Ht[Xt](Zt)};return $t?Jt=>Gt(clamp(yt[0],yt[qt-1],Jt)):Gt}function fillOffset(yt,_e){const $t=yt[yt.length-1];for(let Ft=1;Ft<=_e;Ft++){const Vt=progress(0,_e,Ft);yt.push(mixNumber$1($t,1,Vt))}}function defaultOffset(yt){const _e=[0];return fillOffset(_e,yt.length-1),_e}function convertOffsetToTimes(yt,_e){return yt.map($t=>$t*_e)}function defaultEasing(yt,_e){return yt.map(()=>_e||easeInOut).splice(0,yt.length-1)}function keyframes({duration:yt=300,keyframes:_e,times:$t,ease:Ft="easeInOut"}){const Vt=isEasingArray(Ft)?Ft.map(easingDefinitionToFunction):easingDefinitionToFunction(Ft),qt={done:!1,value:_e[0]},zt=convertOffsetToTimes($t&&$t.length===_e.length?$t:defaultOffset(_e),yt),Ht=interpolate(zt,_e,{ease:Array.isArray(Vt)?Vt:defaultEasing(_e,Vt)});return{calculatedDuration:yt,next:Kt=>(qt.value=Ht(Kt),qt.done=Kt>=yt,qt)}}const frameloopDriver=yt=>{const _e=({timestamp:$t})=>yt($t);return{start:()=>frame.update(_e,!0),stop:()=>cancelFrame(_e),now:()=>frameData.isProcessing?frameData.timestamp:time.now()}},generators={decay:inertia,inertia,tween:keyframes,keyframes,spring},percentToProgress=yt=>yt/100;class MainThreadAnimation extends BaseAnimation{constructor(_e){super(_e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:Kt}=this.options;Kt&&Kt()};const{name:$t,motionValue:Ft,element:Vt,keyframes:qt}=this.options,zt=(Vt==null?void 0:Vt.KeyframeResolver)||KeyframeResolver,Ht=(Kt,Gt)=>this.onKeyframesResolved(Kt,Gt);this.resolver=new zt(qt,Ht,$t,Ft,Vt),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(_e){const{type:$t="keyframes",repeat:Ft=0,repeatDelay:Vt=0,repeatType:qt,velocity:zt=0}=this.options,Ht=isGenerator($t)?$t:generators[$t]||keyframes;let Kt,Gt;Ht!==keyframes&&typeof _e[0]!="number"&&(Kt=pipe(percentToProgress,mix(_e[0],_e[1])),_e=[0,100]);const Jt=Ht({...this.options,keyframes:_e});qt==="mirror"&&(Gt=Ht({...this.options,keyframes:[..._e].reverse(),velocity:-zt})),Jt.calculatedDuration===null&&(Jt.calculatedDuration=calcGeneratorDuration(Jt));const{calculatedDuration:Xt}=Jt,Zt=Xt+Vt,er=Zt*(Ft+1)-Vt;return{generator:Jt,mirroredGenerator:Gt,mapPercentToKeyframes:Kt,calculatedDuration:Xt,resolvedDuration:Zt,totalDuration:er}}onPostResolved(){const{autoplay:_e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!_e?this.pause():this.state=this.pendingPlayState}tick(_e,$t=!1){const{resolved:Ft}=this;if(!Ft){const{keyframes:Br}=this.options;return{done:!0,value:Br[Br.length-1]}}const{finalKeyframe:Vt,generator:qt,mirroredGenerator:zt,mapPercentToKeyframes:Ht,keyframes:Kt,calculatedDuration:Gt,totalDuration:Jt,resolvedDuration:Xt}=Ft;if(this.startTime===null)return qt.next(0);const{delay:Zt,repeat:er,repeatType:tr,repeatDelay:rr,onUpdate:ar}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,_e):this.speed<0&&(this.startTime=Math.min(_e-Jt/this.speed,this.startTime)),$t?this.currentTime=_e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(_e-this.startTime)*this.speed;const nr=this.currentTime-Zt*(this.speed>=0?1:-1),cr=this.speed>=0?nr<0:nr>Jt;this.currentTime=Math.max(nr,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=Jt);let fr=this.currentTime,vr=qt;if(er){const Br=Math.min(this.currentTime,Jt)/Xt;let jr=Math.floor(Br),Rr=Br%1;!Rr&&Br>=1&&(Rr=1),Rr===1&&jr--,jr=Math.min(jr,er+1),!!(jr%2)&&(tr==="reverse"?(Rr=1-Rr,rr&&(Rr-=rr/Xt)):tr==="mirror"&&(vr=zt)),fr=clamp(0,1,Rr)*Xt}const xr=cr?{done:!1,value:Kt[0]}:vr.next(fr);Ht&&(xr.value=Ht(xr.value));let{done:Sr}=xr;!cr&&Gt!==null&&(Sr=this.speed>=0?this.currentTime>=Jt:this.currentTime<=0);const Tr=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&Sr);return Tr&&Vt!==void 0&&(xr.value=getFinalKeyframe(Kt,this.options,Vt)),ar&&ar(xr.value),Tr&&this.finish(),xr}get duration(){const{resolved:_e}=this;return _e?millisecondsToSeconds(_e.calculatedDuration):0}
vendor: 71,036 bytes, line 308
308get time(){return millisecondsToSeconds(this.currentTime)}set time(_e){_e=secondsToMilliseconds(_e),this.currentTime=_e,this.holdTime!==null||this.speed===0?this.holdTime=_e:this.driver&&(this.startTime=this.driver.now()-_e/this.speed)}get speed(){return this.playbackSpeed}set speed(_e){const $t=this.playbackSpeed!==_e;this.playbackSpeed=_e,$t&&(this.time=millisecondsToSeconds(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:_e=frameloopDriver,onPlay:$t,startTime:Ft}=this.options;this.driver||(this.driver=_e(qt=>this.tick(qt))),$t&&$t();const Vt=this.driver.now();this.holdTime!==null?this.startTime=Vt-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=Vt):this.startTime=Ft??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var _e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(_e=this.currentTime)!==null&&_e!==void 0?_e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:_e}=this.options;_e&&_e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(_e){return this.startTime=0,this.tick(_e,!0)}}const acceleratedValues=new Set(["opacity","clipPath","filter","transform"]);function startWaapiAnimation(yt,_e,$t,{delay:Ft=0,duration:Vt=300,repeat:qt=0,repeatType:zt="loop",ease:Ht="easeInOut",times:Kt}={}){const Gt={[_e]:$t};Kt&&(Gt.offset=Kt);const Jt=mapEasingToNativeEasing(Ht,Vt);return Array.isArray(Jt)&&(Gt.easing=Jt),yt.animate(Gt,{delay:Ft,duration:Vt,easing:Array.isArray(Jt)?"linear":Jt,fill:"both",iterations:qt+1,direction:zt==="reverse"?"alternate":"normal"})}const supportsWaapi=memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sampleDelta=10,maxDuration=2e4;function requiresPregeneratedKeyframes(yt){return isGenerator(yt.type)||yt.type==="spring"||!isWaapiSupportedEasing(yt.ease)}function pregenerateKeyframes(yt,_e){const $t=new MainThreadAnimation({..._e,keyframes:yt,repeat:0,delay:0,isGenerator:!0});let Ft={done:!1,value:yt[0]};const Vt=[];let qt=0;for(;!Ft.done&&qt<maxDuration;)Ft=$t.sample(qt),Vt.push(Ft.value),qt+=sampleDelta;return{times:void 0,keyframes:Vt,duration:qt-sampleDelta,ease:"linear"}}const unsupportedEasingFunctions={anticipate,backInOut,circInOut};function isUnsupportedEase(yt){return yt in unsupportedEasingFunctions}class AcceleratedAnimation extends BaseAnimation{constructor(_e){super(_e);const{name:$t,motionValue:Ft,element:Vt,keyframes:qt}=this.options;this.resolver=new DOMKeyframesResolver(qt,(zt,Ht)=>this.onKeyframesResolved(zt,Ht),$t,Ft,Vt),this.resolver.scheduleResolve()}initPlayback(_e,$t){let{duration:Ft=300,times:Vt,ease:qt,type:zt,motionValue:Ht,name:Kt,startTime:Gt}=this.options;if(!Ht.owner||!Ht.owner.current)return!1;if(typeof qt=="string"&&supportsLinearEasing()&&isUnsupportedEase(qt)&&(qt=unsupportedEasingFunctions[qt]),requiresPregeneratedKeyframes(this.options)){const{onComplete:Xt,onUpdate:Zt,motionValue:er,element:tr,...rr}=this.options,ar=pregenerateKeyframes(_e,rr);_e=ar.keyframes,_e.length===1&&(_e[1]=_e[0]),Ft=ar.duration,Vt=ar.times,qt=ar.ease,zt="keyframes"}const Jt=startWaapiAnimation(Ht.owner.current,Kt,_e,{...this.options,duration:Ft,times:Vt,ease:qt});return Jt.startTime=Gt??this.calcStartTime(),this.pendingTimeline?(attachTimeline(Jt,this.pendingTimeline),this.pendingTimeline=void 0):Jt.onfinish=()=>{const{onComplete:Xt}=this.options;Ht.set(getFinalKeyframe(_e,this.options,$t)),Xt&&Xt(),this.cancel(),this.resolveFinishedPromise()},{animation:Jt,duration:Ft,times:Vt,type:zt,ease:qt,keyframes:_e}}get duration(){const{resolved:_e}=this;if(!_e)return 0;const{duration:$t}=_e;return millisecondsToSeconds($t)}get time(){const{resolved:_e}=this;if(!_e)return 0;const{animation:$t}=_e;return millisecondsToSeconds($t.currentTime||0)}set time(_e){const{resolved:$t}=this;if(!$t)return;const{animation:Ft}=$t;Ft.currentTime=secondsToMilliseconds(_e)}get speed(){const{resolved:_e}=this;if(!_e)return 1;const{animation:$t}=_e;return $t.playbackRate}set speed(_e){const{resolved:$t}=this;if(!$t)return;const{animation:Ft}=$t;Ft.playbackRate=_e}get state(){const{resolved:_e}=this;if(!_e)return"idle";const{animation:$t}=_e;return $t.playState}get startTime(){const{resolved:_e}=this;if(!_e)return null;const{animation:$t}=_e;return $t.startTime}attachTimeline(_e){if(!this._resolved)this.pendingTimeline=_e;else{const{resolved:$t}=this;if(!$t)return noop;const{animation:Ft}=$t;attachTimeline(Ft,_e)}return noop}play(){if(this.isStopped)return;const{resolved:_e}=this;if(!_e)return;const{animation:$t}=_e;$t.playState==="finished"&&this.updateFinishedPromise(),$t.play()}pause(){const{resolved:_e}=this;if(!_e)return;const{animation:$t}=_e;$t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:_e}=this;if(!_e)return;const{animation:$t,keyframes:Ft,duration:Vt,type:qt,ease:zt,times:Ht}=_e;if($t.playState==="idle"||$t.playState==="finished")return;if(this.time){const{motionValue:Gt,onUpdate:Jt,onComplete:Xt,element:Zt,...er}=this.options,tr=new MainThreadAnimation({...er,keyframes:Ft,duration:Vt,type:qt,ease:zt,times:Ht,isGenerator:!0}),rr=secondsToMilliseconds(this.time);Gt.setWithVelocity(tr.sample(rr-sampleDelta).value,tr.sample(rr).value,sampleDelta)}const{onStop:Kt}=this.options;Kt&&Kt(),this.cancel()}complete(){const{resolved:_e}=this;_e&&_e.animation.finish()}cancel(){const{resolved:_e}=this;_e&&_e.animation.cancel()}static supports(_e){const{motionValue:$t,name:Ft,repeatDelay:Vt,repeatType:qt,damping:zt,type:Ht}=_e;if(!$t||!$t.owner||!($t.owner.current instanceof HTMLElement))return!1;const{onUpdate:Kt,transformTemplate:Gt}=$t.owner.getProps();return supportsWaapi()&&Ft&&acceleratedValues.has(Ft)&&!Kt&&!Gt&&!Vt&&qt!=="mirror"&&zt!==0&&Ht!=="inertia"}}const underDampedSpring={type:"spring",stiffness:500,damping:25,restSpeed:10},criticallyDampedSpring=yt=>({type:"spring",stiffness:550,damping:yt===0?2*Math.sqrt(550):30,restSpeed:10}),keyframesTransition={type:"keyframes",duration:.8},ease={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},getDefaultTransition=(yt,{keyframes:_e})=>_e.length>2?keyframesTransition:transformProps.has(yt)?yt.startsWith("scale")?criticallyDampedSpring(_e[1]):underDampedSpring:ease;function isTransitionDefined({when:yt,delay:_e,delayChildren:$t,staggerChildren:Ft,staggerDirection:Vt,repeat:qt,repeatType:zt,repeatDelay:Ht,from:Kt,elapsed:Gt,...Jt}){return!!Object.keys(Jt).length}const animateMotionValue=(yt,_e,$t,Ft={},Vt,qt)=>zt=>{const Ht=getValueTransition(Ft,yt)||{},Kt=Ht.delay||Ft.delay||0;let{elapsed:Gt=0}=Ft;Gt=Gt-secondsToMilliseconds(Kt);let Jt={keyframes:Array.isArray($t)?$t:[null,$t],ease:"easeOut",velocity:_e.getVelocity(),...Ht,delay:-Gt,onUpdate:Zt=>{_e.set(Zt),Ht.onUpdate&&Ht.onUpdate(Zt)},onComplete:()=>{zt(),Ht.onComplete&&Ht.onComplete()},name:yt,motionValue:_e,element:qt?void 0:Vt};isTransitionDefined(Ht)||(Jt={...Jt,...getDefaultTransition(yt,Jt)}),Jt.duration&&(Jt.duration=secondsToMilliseconds(Jt.duration)),Jt.repeatDelay&&(Jt.repeatDelay=secondsToMilliseconds(Jt.repeatDelay)),Jt.from!==void 0&&(Jt.keyframes[0]=Jt.from);let Xt=!1;if((Jt.type===!1||Jt.duration===0&&!Jt.repeatDelay)&&(Jt.duration=0,Jt.delay===0&&(Xt=!0)),Xt&&!qt&&_e.get()!==void 0){const Zt=getFinalKeyframe(Jt.keyframes,Ht);if(Zt!==void 0)return frame.update(()=>{Jt.onUpdate(Zt),Jt.onComplete()}),new GroupPlaybackControls([])}return!qt&&AcceleratedAnimation.supports(Jt)?new AcceleratedAnimation(Jt):new MainThreadAnimation(Jt)};function shouldBlockAnimation({protectedKeys:yt,needsAnimating:_e},$t){const Ft=yt.hasOwnProperty($t)&&_e[$t]!==!0;return _e[$t]=!1,Ft}function animateTarget(yt,_e,{delay:$t=0,transitionOverride:Ft,type:Vt}={}){var qt;let{transition:zt=yt.getDefaultTransition(),transitionEnd:Ht,...Kt}=_e;Ft&&(zt=Ft);const Gt=[],Jt=Vt&&yt.animationState&&yt.animationState.getState()[Vt];for(const Xt in Kt){const Zt=yt.getValue(Xt,(qt=yt.latestValues[Xt])!==null&&qt!==void 0?qt:null),er=Kt[Xt];if(er===void 0||Jt&&shouldBlockAnimation(Jt,Xt))continue;const tr={delay:$t,...getValueTransition(zt||{},Xt)};let rr=!1;if(window.MotionHandoffAnimation){const nr=getOptimisedAppearId(yt);if(nr){const cr=window.MotionHandoffAnimation(nr,Xt,frame);cr!==null&&(tr.startTime=cr,rr=!0)}}addValueToWillChange(yt,Xt),Zt.start(animateMotionValue(Xt,Zt,er,yt.shouldReduceMotion&&positionalKeys.has(Xt)?{type:!1}:tr,yt,rr));const ar=Zt.animation;ar&&Gt.push(ar)}return Ht&&Promise.all(Gt).then(()=>{frame.update(()=>{Ht&&setTarget(yt,Ht)})}),Gt}function animateVariant(yt,_e,$t={}){var Ft;const Vt=resolveVariant(yt,_e,$t.type==="exit"?(Ft=yt.presenceContext)===null||Ft===void 0?void 0:Ft.custom:void 0);let{transition:qt=yt.getDefaultTransition()||{}}=Vt||{};$t.transitionOverride&&(qt=$t.transitionOverride);const zt=Vt?()=>Promise.all(animateTarget(yt,Vt,$t)):()=>Promise.resolve(),Ht=yt.variantChildren&&yt.variantChildren.size?(Gt=0)=>{const{delayChildren:Jt=0,staggerChildren:Xt,staggerDirection:Zt}=qt;return animateChildren(yt,_e,Jt+Gt,Xt,Zt,$t)}:()=>Promise.resolve(),{when:Kt}=qt;if(Kt){const[Gt,Jt]=Kt==="beforeChildren"?[zt,Ht]:[Ht,zt];return Gt().then(()=>Jt())}else return Promise.all([zt(),Ht($t.delay)])}function animateChildren(yt,_e,$t=0,Ft=0,Vt=1,qt){const zt=[],Ht=(yt.variantChildren.size-1)*Ft,Kt=Vt===1?(Gt=0)=>Gt*Ft:(Gt=0)=>Ht-Gt*Ft;return Array.from(yt.variantChildren).sort(sortByTreeOrder).forEach((Gt,Jt)=>{Gt.notify("AnimationStart",_e),zt.push(animateVariant(Gt,_e,{...qt,delay:$t+Kt(Jt)}).then(()=>Gt.notify("AnimationComplete",_e)))}),Promise.all(zt)}function sortByTreeOrder(yt,_e){return yt.sortNodePosition(_e)}function animateVisualElement(yt,_e,$t={}){yt.notify("AnimationStart",_e);let Ft;if(Array.isArray(_e)){const Vt=_e.map(qt=>animateVariant(yt,qt,$t));Ft=Promise.all(Vt)}else if(typeof _e=="string")Ft=animateVariant(yt,_e,$t);else{const Vt=typeof _e=="function"?resolveVariant(yt,_e,$t.custom):_e;Ft=Promise.all(animateTarget(yt,Vt,$t))}return Ft.then(()=>{yt.notify("AnimationComplete",_e)})}const numVariantProps=variantProps.length;function getVariantContext(yt){if(!yt)return;if(!yt.isControllingVariants){const $t=yt.parent?getVariantContext(yt.parent)||{}:{};return yt.props.initial!==void 0&&($t.initial=yt.props.initial),$t}const _e={};for(let $t=0;$t<numVariantProps;$t++){const Ft=variantProps[$t],Vt=yt.props[Ft];(isVariantLabel(Vt)||Vt===!1)&&(_e[Ft]=Vt)}return _e}const reversePriorityOrder=[...variantPriorityOrder].reverse(),numAnimationTypes=variantPriorityOrder.length;function animateList(yt){return _e=>Promise.all(_e.map(({animation:$t,options:Ft})=>animateVisualElement(yt,$t,Ft)))}function createAnimationState(yt){let _e=animateList(yt),$t=createState(),Ft=!0;const Vt=Kt=>(Gt,Jt)=>{var Xt;const Zt=resolveVariant(yt,Jt,Kt==="exit"?(Xt=yt.presenceContext)===null||Xt===void 0?void 0:Xt.custom:void 0);if(Zt){const{transition:er,transitionEnd:tr,...rr}=Zt;Gt={...Gt,...rr,...tr}}return Gt};function qt(Kt){_e=Kt(yt)}function zt(Kt){const{props:Gt}=yt,Jt=getVariantContext(yt.parent)||{},Xt=[],Zt=new Set;let er={},tr=1/0;for(let ar=0;ar<numAnimationTypes;ar++){const nr=reversePriorityOrder[ar],cr=$t[nr],fr=Gt[nr]!==void 0?Gt[nr]:Jt[nr],vr=isVariantLabel(fr),xr=nr===Kt?cr.isActive:null;xr===!1&&(tr=ar);let Sr=fr===Jt[nr]&&fr!==Gt[nr]&&vr;if(Sr&&Ft&&yt.manuallyAnimateOnMount&&(Sr=!1),cr.protectedKeys={...er},!cr.isActive&&xr===null||!fr&&!cr.prevProp||isAnimationControls(fr)||typeof fr=="boolean")continue;const Tr=checkVariantsDidChange(cr.prevProp,fr);let Br=Tr||nr===Kt&&cr.isActive&&!Sr&&vr||ar>tr&&vr,jr=!1;const Rr=Array.isArray(fr)?fr:[fr];let yr=Rr.reduce(Vt(nr),{});xr===!1&&(yr={});const{prevResolvedValues:sr={}}=cr,or={...sr,...yr},Qt=gr=>{Br=!0,Zt.has(gr)&&(jr=!0,Zt.delete(gr)),cr.needsAnimating[gr]=!0;const dr=yt.getValue(gr);dr&&(dr.liveStyle=!1)};for(const gr in or){const dr=yr[gr],lr=sr[gr];if(er.hasOwnProperty(gr))continue;let hr=!1;isKeyframesTarget(dr)&&isKeyframesTarget(lr)?hr=!shallowCompare(dr,lr):hr=dr!==lr,hr?dr!=null?Qt(gr):Zt.add(gr):dr!==void 0&&Zt.has(gr)?Qt(gr):cr.protectedKeys[gr]=!0}cr.prevProp=fr,cr.prevResolvedValues=yr,cr.isActive&&(er={...er,...yr}),Ft&&yt.blockInitialAnimation&&(Br=!1),Br&&(!(Sr&&Tr)||jr)&&Xt.push(...Rr.map(gr=>({animation:gr,options:{type:nr}})))}if(Zt.size){const ar={};Zt.forEach(nr=>{const cr=yt.getBaseTarget(nr),fr=yt.getValue(nr);fr&&(fr.liveStyle=!0),ar[nr]=cr??null}),Xt.push({animation:ar})}let rr=!!Xt.length;return Ft&&(Gt.initial===!1||Gt.initial===Gt.animate)&&!yt.manuallyAnimateOnMount&&(rr=!1),Ft=!1,rr?_e(Xt):Promise.resolve()}function Ht(Kt,Gt){var Jt;if($t[Kt].isActive===Gt)return Promise.resolve();(Jt=yt.variantChildren)===null||Jt===void 0||Jt.forEach(Zt=>{var er;return(er=Zt.animationState)===null||er===void 0?void 0:er.setActive(Kt,Gt)}),$t[Kt].isActive=Gt;const Xt=zt(Kt);for(const Zt in $t)$t[Zt].protectedKeys={};return Xt}return{animateChanges:zt,setActive:Ht,setAnimateFunction:qt,getState:()=>$t,reset:()=>{$t=createState(),Ft=!0}}}function checkVariantsDidChange(yt,_e){return typeof _e=="string"?_e!==yt:Array.isArray(_e)?!shallowCompare(_e,yt):!1}function createTypeState(yt=!1){return{isActive:yt,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function createState(){return{animate:createTypeState(!0),whileInView:createTypeState(),whileHover:createTypeState(),whileTap:createTypeState(),whileDrag:createTypeState(),whileFocus:createTypeState(),exit:createTypeState()}}class Feature{constructor(_e){this.isMounted=!1,this.node=_e}update(){}}class AnimationFeature extends Feature{constructor(_e){super(_e),_e.animationState||(_e.animationState=createAnimationState(_e))}updateAnimationControlsSubscription(){const{animate:_e}=this.node.getProps();isAnimationControls(_e)&&(this.unmountControls=_e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:_e}=this.node.getProps(),{animate:$t}=this.node.prevProps||{};_e!==$t&&this.updateAnimationControlsSubscription()}unmount(){var _e;this.node.animationState.reset(),(_e=this.unmountControls)===null||_e===void 0||_e.call(this)}}let id$1=0;class ExitAnimationFeature extends Feature{constructor(){super(...arguments),this.id=id$1++}update(){if(!this.node.presenceContext)return;const{isPresent:_e,onExitComplete:$t}=this.node.presenceContext,{isPresent:Ft}=this.node.prevPresenceContext||{};if(!this.node.animationState||_e===Ft)return;const Vt=this.node.animationState.setActive("exit",!_e);$t&&!_e&&Vt.then(()=>$t(this.id))}mount(){const{register:_e}=this.node.presenceContext||{};_e&&(this.unmount=_e(this.id))}unmount(){}}const animations={animation:{Feature:AnimationFeature},exit:{Feature:ExitAnimationFeature}};function addDomEvent(yt,_e,$t,Ft={passive:!0}){return yt.addEventListener(_e,$t,Ft),()=>yt.removeEventListener(_e,$t)}function extractEventInfo(yt){return{point:{x:yt.pageX,y:yt.pageY}}}const addPointerInfo=yt=>_e=>isPrimaryPointer(_e)&&yt(_e,extractEventInfo(_e));function addPointerEvent(yt,_e,$t,Ft){return addDomEvent(yt,_e,addPointerInfo($t),Ft)}const distance=(yt,_e)=>Math.abs(yt-_e);function distance2D(yt,_e){const $t=distance(yt.x,_e.x),Ft=distance(yt.y,_e.y);return Math.sqrt($t**2+Ft**2)}class PanSession{constructor(_e,$t,{transformPagePoint:Ft,contextWindow:Vt,dragSnapToOrigin:qt=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const Xt=getPanInfo(this.lastMoveEventInfo,this.history),Zt=this.startEvent!==null,er=distance2D(Xt.offset,{x:0,y:0})>=3;if(!Zt&&!er)return;const{point:tr}=Xt,{timestamp:rr}=frameData;this.history.push({...tr,timestamp:rr});const{onStart:ar,onMove:nr}=this.handlers;Zt||(ar&&ar(this.lastMoveEvent,Xt),this.startEvent=this.lastMoveEvent),nr&&nr(this.lastMoveEvent,Xt)},this.handlePointerMove=(Xt,Zt)=>{this.lastMoveEvent=Xt,this.lastMoveEventInfo=transformPoint(Zt,this.transformPagePoint),frame.update(this.updatePoint,!0)},this.handlePointerUp=(Xt,Zt)=>{this.end();const{onEnd:er,onSessionEnd:tr,resumeAnimation:rr}=this.handlers;if(this.dragSnapToOrigin&&rr&&rr(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const ar=getPanInfo(Xt.type==="pointercancel"?this.lastMoveEventInfo:transformPoint(Zt,this.transformPagePoint),this.history);this.startEvent&&er&&er(Xt,ar),tr&&tr(Xt,ar)},!isPrimaryPointer(_e))return;this.dragSnapToOrigin=qt,this.handlers=$t,this.transformPagePoint=Ft,this.contextWindow=Vt||window;const zt=extractEventInfo(_e),Ht=transformPoint(zt,this.transformPagePoint),{point:Kt}=Ht,{timestamp:Gt}=frameData;this.history=[{...Kt,timestamp:Gt}];const{onSessionStart:Jt}=$t;Jt&&Jt(_e,getPanInfo(Ht,this.history)),this.removeListeners=pipe(addPointerEvent(this.contextWindow,"pointermove",this.handlePointerMove),addPointerEvent(this.contextWindow,"pointerup",this.handlePointerUp),addPointerEvent(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(_e){this.handlers=_e}end(){this.removeListeners&&this.removeListeners(),cancelFrame(this.updatePoint)}}function transformPoint(yt,_e){return _e?{point:_e(yt.point)}:yt}function subtractPoint(yt,_e){return{x:yt.x-_e.x,y:yt.y-_e.y}}function getPanInfo({point:yt},_e){return{point:yt,delta:subtractPoint(yt,lastDevicePoint(_e)),offset:subtractPoint(yt,startDevicePoint(_e)),velocity:getVelocity(_e,.1)}}function startDevicePoint(yt){return yt[0]}function lastDevicePoint(yt){return yt[yt.length-1]}function getVelocity(yt,_e){if(yt.length<2)return{x:0,y:0};let $t=yt.length-1,Ft=null;const Vt=lastDevicePoint(yt);for(;$t>=0&&(Ft=yt[$t],!(Vt.timestamp-Ft.timestamp>secondsToMilliseconds(_e)));)$t--;if(!Ft)return{x:0,y:0};const qt=millisecondsToSeconds(Vt.timestamp-Ft.timestamp);if(qt===0)return{x:0,y:0};const zt={x:(Vt.x-Ft.x)/qt,y:(Vt.y-Ft.y)/qt};return zt.x===1/0&&(zt.x=0),zt.y===1/0&&(zt.y=0),zt}const SCALE_PRECISION=1e-4,SCALE_MIN=1-SCALE_PRECISION,SCALE_MAX=1+SCALE_PRECISION,TRANSLATE_PRECISION=.01,TRANSLATE_MIN=0-TRANSLATE_PRECISION,TRANSLATE_MAX=0+TRANSLATE_PRECISION;function calcLength(yt){return yt.max-yt.min}function isNear(yt,_e,$t){return Math.abs(yt-_e)<=$t}function calcAxisDelta(yt,_e,$t,Ft=.5){yt.origin=Ft,yt.originPoint=mixNumber$1(_e.min,_e.max,yt.origin),yt.scale=calcLength($t)/calcLength(_e),yt.translate=mixNumber$1($t.min,$t.max,yt.origin)-yt.originPoint,(yt.scale>=SCALE_MIN&&yt.scale<=SCALE_MAX||isNaN(yt.scale))&&(yt.scale=1),(yt.translate>=TRANSLATE_MIN&&yt.translate<=TRANSLATE_MAX||isNaN(yt.translate))&&(yt.translate=0)}function calcBoxDelta(yt,_e,$t,Ft){calcAxisDelta(yt.x,_e.x,$t.x,Ft?Ft.originX:void 0),calcAxisDelta(yt.y,_e.y,$t.y,Ft?Ft.originY:void 0)}function calcRelativeAxis(yt,_e,$t){yt.min=$t.min+_e.min,yt.max=yt.min+calcLength(_e)}function calcRelativeBox(yt,_e,$t){calcRelativeAxis(yt.x,_e.x,$t.x),calcRelativeAxis(yt.y,_e.y,$t.y)}function calcRelativeAxisPosition(yt,_e,$t){yt.min=_e.min-$t.min,yt.max=yt.min+calcLength(_e)}function calcRelativePosition(yt,_e,$t){calcRelativeAxisPosition(yt.x,_e.x,$t.x),calcRelativeAxisPosition(yt.y,_e.y,$t.y)}function applyConstraints(yt,{min:_e,max:$t},Ft){return _e!==void 0&&yt<_e?yt=Ft?mixNumber$1(_e,yt,Ft.min):Math.max(yt,_e):$t!==void 0&&yt>$t&&(yt=Ft?mixNumber$1($t,yt,Ft.max):Math.min(yt,$t)),yt}function calcRelativeAxisConstraints(yt,_e,$t){return{min:_e!==void 0?yt.min+_e:void 0,max:$t!==void 0?yt.max+$t-(yt.max-yt.min):void 0}}function calcRelativeConstraints(yt,{top:_e,left:$t,bottom:Ft,right:Vt}){return{x:calcRelativeAxisConstraints(yt.x,$t,Vt),y:calcRelativeAxisConstraints(yt.y,_e,Ft)}}function calcViewportAxisConstraints(yt,_e){let $t=_e.min-yt.min,Ft=_e.max-yt.max;return _e.max-_e.min<yt.max-yt.min&&([$t,Ft]=[Ft,$t]),{min:$t,max:Ft}}function calcViewportConstraints(yt,_e){return{x:calcViewportAxisConstraints(yt.x,_e.x),y:calcViewportAxisConstraints(yt.y,_e.y)}}function calcOrigin(yt,_e){let $t=.5;const Ft=calcLength(yt),Vt=calcLength(_e);return Vt>Ft?$t=progress(_e.min,_e.max-Ft,yt.min):Ft>Vt&&($t=progress(yt.min,yt.max-Vt,_e.min)),clamp(0,1,$t)}function rebaseAxisConstraints(yt,_e){const $t={};return _e.min!==void 0&&($t.min=_e.min-yt.min),_e.max!==void 0&&($t.max=_e.max-yt.min),$t}const defaultElastic=.35;function resolveDragElastic(yt=defaultElastic){return yt===!1?yt=0:yt===!0&&(yt=defaultElastic),{x:resolveAxisElastic(yt,"left","right"),y:resolveAxisElastic(yt,"top","bottom")}}function resolveAxisElastic(yt,_e,$t){return{min:resolvePointElastic(yt,_e),max:resolvePointElastic(yt,$t)}}function resolvePointElastic(yt,_e){return typeof yt=="number"?yt:yt[_e]||0}const createAxisDelta=()=>({translate:0,scale:1,origin:0,originPoint:0}),createDelta=()=>({x:createAxisDelta(),y:createAxisDelta()}),createAxis=()=>({min:0,max:0}),createBox=()=>({x:createAxis(),y:createAxis()});function eachAxis(yt){return[yt("x"),yt("y")]}function convertBoundingBoxToBox({top:yt,left:_e,right:$t,bottom:Ft}){return{x:{min:_e,max:$t},y:{min:yt,max:Ft}}}function convertBoxToBoundingBox({x:yt,y:_e}){return{top:_e.min,right:yt.max,bottom:_e.max,left:yt.min}}function transformBoxPoints(yt,_e){if(!_e)return yt;const $t=_e({x:yt.left,y:yt.top}),Ft=_e({x:yt.right,y:yt.bottom});return{top:$t.y,left:$t.x,bottom:Ft.y,right:Ft.x}}function isIdentityScale(yt){return yt===void 0||yt===1}function hasScale({scale:yt,scaleX:_e,scaleY:$t}){return!isIdentityScale(yt)||!isIdentityScale(_e)||!isIdentityScale($t)}function hasTransform(yt){return hasScale(yt)||has2DTranslate(yt)||yt.z||yt.rotate||yt.rotateX||yt.rotateY||yt.skewX||yt.skewY}function has2DTranslate(yt){return is2DTranslate(yt.x)||is2DTranslate(yt.y)}function is2DTranslate(yt){return yt&&yt!=="0%"}function scalePoint(yt,_e,$t){const Ft=yt-$t,Vt=_e*Ft;return $t+Vt}function applyPointDelta(yt,_e,$t,Ft,Vt){return Vt!==void 0&&(yt=scalePoint(yt,Vt,Ft)),scalePoint(yt,$t,Ft)+_e}function applyAxisDelta(yt,_e=0,$t=1,Ft,Vt){yt.min=applyPointDelta(yt.min,_e,$t,Ft,Vt),yt.max=applyPointDelta(yt.max,_e,$t,Ft,Vt)}function applyBoxDelta(yt,{x:_e,y:$t}){applyAxisDelta(yt.x,_e.translate,_e.scale,_e.originPoint),applyAxisDelta(yt.y,$t.translate,$t.scale,$t.originPoint)}const TREE_SCALE_SNAP_MIN=.999999999999,TREE_SCALE_SNAP_MAX=1.0000000000001;function applyTreeDeltas(yt,_e,$t,Ft=!1){const Vt=$t.length;if(!Vt)return;_e.x=_e.y=1;let qt,zt;for(let Ht=0;Ht<Vt;Ht++){qt=$t[Ht],zt=qt.projectionDelta;const{visualElement:Kt}=qt.options;Kt&&Kt.props.style&&Kt.props.style.display==="contents"||(Ft&&qt.options.layoutScroll&&qt.scroll&&qt!==qt.root&&transformBox(yt,{x:-qt.scroll.offset.x,y:-qt.scroll.offset.y}),zt&&(_e.x*=zt.x.scale,_e.y*=zt.y.scale,applyBoxDelta(yt,zt)),Ft&&hasTransform(qt.latestValues)&&transformBox(yt,qt.latestValues))}_e.x<TREE_SCALE_SNAP_MAX&&_e.x>TREE_SCALE_SNAP_MIN&&(_e.x=1),_e.y<TREE_SCALE_SNAP_MAX&&_e.y>TREE_SCALE_SNAP_MIN&&(_e.y=1)}function translateAxis(yt,_e){yt.min=yt.min+_e,yt.max=yt.max+_e}function transformAxis(yt,_e,$t,Ft,Vt=.5){const qt=mixNumber$1(yt.min,yt.max,Vt);applyAxisDelta(yt,_e,$t,qt,Ft)}function transformBox(yt,_e){transformAxis(yt.x,_e.x,_e.scaleX,_e.scale,_e.originX),transformAxis(yt.y,_e.y,_e.scaleY,_e.scale,_e.originY)}function measureViewportBox(yt,_e){return convertBoundingBoxToBox(transformBoxPoints(yt.getBoundingClientRect(),_e))}function measurePageBox(yt,_e,$t){const Ft=measureViewportBox(yt,$t),{scroll:Vt}=_e;return Vt&&(translateAxis(Ft.x,Vt.offset.x),translateAxis(Ft.y,Vt.offset.y)),Ft}const getContextWindow=({current:yt})=>yt?yt.ownerDocument.defaultView:null,elementDragControls=new WeakMap;class VisualElementDragControls{constructor(_e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=createBox(),this.visualElement=_e}start(_e,{snapToCursor:$t=!1}={}){const{presenceContext:Ft}=this.visualElement;if(Ft&&Ft.isPresent===!1)return;const Vt=Jt=>{const{dragSnapToOrigin:Xt}=this.getProps();Xt?this.pauseAnimation():this.stopAnimation(),$t&&this.snapToCursor(extractEventInfo(Jt).point)},qt=(Jt,Xt)=>{const{drag:Zt,dragPropagation:er,onDragStart:tr}=this.getProps();if(Zt&&!er&&(this.openDragLock&&this.openDragLock(),this.openDragLock=setDragLock(Zt),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),eachAxis(ar=>{let nr=this.getAxisMotionValue(ar).get()||0;if(percent.test(nr)){const{projection:cr}=this.visualElement;if(cr&&cr.layout){const fr=cr.layout.layoutBox[ar];fr&&(nr=calcLength(fr)*(parseFloat(nr)/100))}}this.originPoint[ar]=nr}),tr&&frame.postRender(()=>tr(Jt,Xt)),addValueToWillChange(this.visualElement,"transform");const{animationState:rr}=this.visualElement;rr&&rr.setActive("whileDrag",!0)},zt=(Jt,Xt)=>{const{dragPropagation:Zt,dragDirectionLock:er,onDirectionLock:tr,onDrag:rr}=this.getProps();if(!Zt&&!this.openDragLock)return;const{offset:ar}=Xt;if(er&&this.currentDirection===null){this.currentDirection=getCurrentDirection(ar),this.currentDirection!==null&&tr&&tr(this.currentDirection);return}this.updateAxis("x",Xt.point,ar),this.updateAxis("y",Xt.point,ar),this.visualElement.render(),rr&&rr(Jt,Xt)},Ht=(Jt,Xt)=>this.stop(Jt,Xt),Kt=()=>eachAxis(Jt=>{var Xt;return this.getAnimationState(Jt)==="paused"&&((Xt=this.getAxisMotionValue(Jt).animation)===null||Xt===void 0?void 0:Xt.play())}),{dragSnapToOrigin:Gt}=this.getProps();this.panSession=new PanSession(_e,{onSessionStart:Vt,onStart:qt,onMove:zt,onSessionEnd:Ht,resumeAnimation:Kt},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:Gt,contextWindow:getContextWindow(this.visualElement)})}stop(_e,$t){const Ft=this.isDragging;if(this.cancel(),!Ft)return;const{velocity:Vt}=$t;this.startAnimation(Vt);const{onDragEnd:qt}=this.getProps();qt&&frame.postRender(()=>qt(_e,$t))}cancel(){this.isDragging=!1;const{projection:_e,animationState:$t}=this.visualElement;_e&&(_e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:Ft}=this.getProps();!Ft&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),$t&&$t.setActive("whileDrag",!1)}updateAxis(_e,$t,Ft){const{drag:Vt}=this.getProps();if(!Ft||!shouldDrag(_e,Vt,this.currentDirection))return;const qt=this.getAxisMotionValue(_e);let zt=this.originPoint[_e]+Ft[_e];this.constraints&&this.constraints[_e]&&(zt=applyConstraints(zt,this.constraints[_e],this.elastic[_e])),qt.set(zt)}resolveConstraints(){var _e;const{dragConstraints:$t,dragElastic:Ft}=this.getProps(),Vt=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(_e=this.visualElement.projection)===null||_e===void 0?void 0:_e.layout,qt=this.constraints;$t&&isRefObject($t)?this.constraints||(this.constraints=this.resolveRefConstraints()):$t&&Vt?this.constraints=calcRelativeConstraints(Vt.layoutBox,$t):this.constraints=!1,this.elastic=resolveDragElastic(Ft),qt!==this.constraints&&Vt&&this.constraints&&!this.hasMutatedConstraints&&eachAxis(zt=>{this.constraints!==!1&&this.getAxisMotionValue(zt)&&(this.constraints[zt]=rebaseAxisConstraints(Vt.layoutBox[zt],this.constraints[zt]))})}resolveRefConstraints(){const{dragConstraints:_e,onMeasureDragConstraints:$t}=this.getProps();if(!_e||!isRefObject(_e))return!1;const Ft=_e.current,{projection:Vt}=this.visualElement;if(!Vt||!Vt.layout)return!1;const qt=measurePageBox(Ft,Vt.root,this.visualElement.getTransformPagePoint());let zt=calcViewportConstraints(Vt.layout.layoutBox,qt);if($t){const Ht=$t(convertBoxToBoundingBox(zt));this.hasMutatedConstraints=!!Ht,Ht&&(zt=convertBoundingBoxToBox(Ht))}return zt}startAnimation(_e){const{drag:$t,dragMomentum:Ft,dragElastic:Vt,dragTransition:qt,dragSnapToOrigin:zt,onDragTransitionEnd:Ht}=this.getProps(),Kt=this.constraints||{},Gt=eachAxis(Jt=>{if(!shouldDrag(Jt,$t,this.currentDirection))return;let Xt=Kt&&Kt[Jt]||{};zt&&(Xt={min:0,max:0});const Zt=Vt?200:1e6,er=Vt?40:1e7,tr={type:"inertia",velocity:Ft?_e[Jt]:0,bounceStiffness:Zt,bounceDamping:er,timeConstant:750,restDelta:1,restSpeed:10,...qt,...Xt};return this.startAxisValueAnimation(Jt,tr)});return Promise.all(Gt).then(Ht)}startAxisValueAnimation(_e,$t){const Ft=this.getAxisMotionValue(_e);return addValueToWillChange(this.visualElement,_e),Ft.start(animateMotionValue(_e,Ft,0,$t,this.visualElement,!1))}stopAnimation(){eachAxis(_e=>this.getAxisMotionValue(_e).stop())}pauseAnimation(){eachAxis(_e=>{var $t;return($t=this.getAxisMotionValue(_e).animation)===null||$t===void 0?void 0:$t.pause()})}getAnimationState(_e){var $t;return($t=this.getAxisMotionValue(_e).animation)===null||$t===void 0?void 0:$t.state}getAxisMotionValue(_e){const $t=`_drag${_e.toUpperCase()}`,Ft=this.visualElement.getProps(),Vt=Ft[$t];return Vt||this.visualElement.getValue(_e,(Ft.initial?Ft.initial[_e]:void 0)||0)}snapToCursor(_e){eachAxis($t=>{const{drag:Ft}=this.getProps();if(!shouldDrag($t,Ft,this.currentDirection))return;const{projection:Vt}=this.visualElement,qt=this.getAxisMotionValue($t);if(Vt&&Vt.layout){const{min:zt,max:Ht}=Vt.layout.layoutBox[$t];qt.set(_e[$t]-mixNumber$1(zt,Ht,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:_e,dragConstraints:$t}=this.getProps(),{projection:Ft}=this.visualElement;if(!isRefObject($t)||!Ft||!this.constraints)return;this.stopAnimation();const Vt={x:0,y:0};eachAxis(zt=>{const Ht=this.getAxisMotionValue(zt);if(Ht&&this.constraints!==!1){const Kt=Ht.get();Vt[zt]=calcOrigin({min:Kt,max:Kt},this.constraints[zt])}});const{transformTemplate:qt}=this.visualElement.getProps();this.visualElement.current.style.transform=qt?qt({},""):"none",Ft.root&&Ft.root.updateScroll(),Ft.updateLayout(),this.resolveConstraints(),eachAxis(zt=>{if(!shouldDrag(zt,_e,null))return;const Ht=this.getAxisMotionValue(zt),{min:Kt,max:Gt}=this.constraints[zt];Ht.set(mixNumber$1(Kt,Gt,Vt[zt]))})}addListeners(){if(!this.visualElement.current)return;elementDragControls.set(this.visualElement,this);const _e=this.visualElement.current,$t=addPointerEvent(_e,"pointerdown",Kt=>{const{drag:Gt,dragListener:Jt=!0}=this.getProps();Gt&&Jt&&this.start(Kt)}),Ft=()=>{const{dragConstraints:Kt}=this.getProps();isRefObject(Kt)&&Kt.current&&(this.constraints=this.resolveRefConstraints())},{projection:Vt}=this.visualElement,qt=Vt.addEventListener("measure",Ft);Vt&&!Vt.layout&&(Vt.root&&Vt.root.updateScroll(),Vt.updateLayout()),frame.read(Ft);const zt=addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),Ht=Vt.addEventListener("didUpdate",({delta:Kt,hasLayoutChanged:Gt})=>{this.isDragging&&Gt&&(eachAxis(Jt=>{const Xt=this.getAxisMotionValue(Jt);Xt&&(this.originPoint[Jt]+=Kt[Jt].translate,Xt.set(Xt.get()+Kt[Jt].translate))}),this.visualElement.render())});return()=>{zt(),$t(),qt(),Ht&&Ht()}}getProps(){const _e=this.visualElement.getProps(),{drag:$t=!1,dragDirectionLock:Ft=!1,dragPropagation:Vt=!1,dragConstraints:qt=!1,dragElastic:zt=defaultElastic,dragMomentum:Ht=!0}=_e;return{..._e,drag:$t,dragDirectionLock:Ft,dragPropagation:Vt,dragConstraints:qt,dragElastic:zt,dragMomentum:Ht}}}function shouldDrag(yt,_e,$t){return(_e===!0||_e===yt)&&($t===null||$t===yt)}function getCurrentDirection(yt,_e=10){let $t=null;return Math.abs(yt.y)>_e?$t="y":Math.abs(yt.x)>_e&&($t="x"),$t}class DragGesture extends Feature{constructor(_e){super(_e),this.removeGroupControls=noop,this.removeListeners=noop,this.controls=new VisualElementDragControls(_e)}mount(){const{dragControls:_e}=this.node.getProps();_e&&(this.removeGroupControls=_e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||noop}unmount(){this.removeGroupControls(),this.removeListeners()}}const asyncHandler=yt=>(_e,$t)=>{yt&&frame.postRender(()=>yt(_e,$t))};class PanGesture extends Feature{constructor(){super(...arguments),this.removePointerDownListener=noop}onPointerDown(_e){this.session=new PanSession(_e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:getContextWindow(this.node)})}createPanHandlers(){const{onPanSessionStart:_e,onPanStart:$t,onPan:Ft,onPanEnd:Vt}=this.node.getProps();return{onSessionStart:asyncHandler(_e),onStart:asyncHandler($t),onMove:Ft,onEnd:(qt,zt)=>{delete this.session,Vt&&frame.postRender(()=>Vt(qt,zt))}}}mount(){this.removePointerDownListener=addPointerEvent(this.node.current,"pointerdown",_e=>this.onPointerDown(_e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const globalProjectionState={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pixelsToPercent(yt,_e){return _e.max===_e.min?0:yt/(_e.max-_e.min)*100}const correctBorderRadius={correct:(yt,_e)=>{if(!_e.target)return yt;if(typeof yt=="string")if(px.test(yt))yt=parseFloat(yt);else return yt;const $t=pixelsToPercent(yt,_e.target.x),Ft=pixelsToPercent(yt,_e.target.y);return`${$t}% ${Ft}%`}},correctBoxShadow={correct:(yt,{treeScale:_e,projectionDelta:$t})=>{const Ft=yt,Vt=complex.parse(yt);if(Vt.length>5)return Ft;const qt=complex.createTransformer(yt),zt=typeof Vt[0]!="number"?1:0,Ht=$t.x.scale*_e.x,Kt=$t.y.scale*_e.y;Vt[0+zt]/=Ht,Vt[1+zt]/=Kt;const Gt=mixNumber$1(Ht,Kt,.5);return typeof Vt[2+zt]=="number"&&(Vt[2+zt]/=Gt),typeof Vt[3+zt]=="number"&&(Vt[3+zt]/=Gt),qt(Vt)}};class MeasureLayoutWithContext extends reactExports.Component{componentDidMount(){const{visualElement:_e,layoutGroup:$t,switchLayoutGroup:Ft,layoutId:Vt}=this.props,{projection:qt}=_e;addScaleCorrector(defaultScaleCorrectors),qt&&($t.group&&$t.group.add(qt),Ft&&Ft.register&&Vt&&Ft.register(qt),qt.root.didUpdate(),qt.addEventListener("animationComplete",()=>{this.safeToRemove()}),qt.setOptions({...qt.options,onExitComplete:()=>this.safeToRemove()})),globalProjectionState.hasEverUpdated=!0}getSnapshotBeforeUpdate(_e){const{layoutDependency:$t,visualElement:Ft,drag:Vt,isPresent:qt}=this.props,zt=Ft.projection;return zt&&(zt.isPresent=qt,Vt||_e.layoutDependency!==$t||$t===void 0?zt.willUpdate():this.safeToRemove(),_e.isPresent!==qt&&(qt?zt.promote():zt.relegate()||frame.postRender(()=>{const Ht=zt.getStack();(!Ht||!Ht.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:_e}=this.props.visualElement;_e&&(_e.root.didUpdate(),microtask.postRender(()=>{!_e.currentAnimation&&_e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:_e,layoutGroup:$t,switchLayoutGroup:Ft}=this.props,{projection:Vt}=_e;Vt&&(Vt.scheduleCheckAfterUnmount(),$t&&$t.group&&$t.group.remove(Vt),Ft&&Ft.deregister&&Ft.deregister(Vt))}safeToRemove(){const{safeToRemove:_e}=this.props;_e&&_e()}render(){return null}}function MeasureLayout(yt){const[_e,$t]=usePresence(),Ft=reactExports.useContext(LayoutGroupContext);return jsxRuntimeExports.jsx(MeasureLayoutWithContext,{...yt,layoutGroup:Ft,switchLayoutGroup:reactExports.useContext(SwitchLayoutGroupContext),isPresent:_e,safeToRemove:$t})}const defaultScaleCorrectors={borderRadius:{...correctBorderRadius,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:correctBorderRadius,borderTopRightRadius:correctBorderRadius,borderBottomLeftRadius:correctBorderRadius,borderBottomRightRadius:correctBorderRadius,boxShadow:correctBoxShadow};function animateSingleValue(yt,_e,$t){const Ft=isMotionValue(yt)?yt:motionValue(yt);return Ft.start(animateMotionValue("",Ft,_e,$t)),Ft.animation}function isSVGElement(yt){return yt instanceof SVGElement&&yt.tagName!=="svg"}const compareByDepth=(yt,_e)=>yt.depth-_e.depth;class FlatTree{constructor(){this.children=[],this.isDirty=!1}add(_e){addUniqueItem(this.children,_e),this.isDirty=!0}remove(_e){removeItem(this.children,_e),this.isDirty=!0}forEach(_e){this.isDirty&&this.children.sort(compareByDepth),this.isDirty=!1,this.children.forEach(_e)}}function delay(yt,_e){const $t=time.now(),Ft=({timestamp:Vt})=>{const qt=Vt-$t;qt>=_e&&(cancelFrame(Ft),yt(qt-_e))};return frame.read(Ft,!0),()=>cancelFrame(Ft)}const borders=["TopLeft","TopRight","BottomLeft","BottomRight"],numBorders=borders.length,asNumber=yt=>typeof yt=="string"?parseFloat(yt):yt,isPx=yt=>typeof yt=="number"||px.test(yt);function mixValues(yt,_e,$t,Ft,Vt,qt){Vt?(yt.opacity=mixNumber$1(0,$t.opacity!==void 0?$t.opacity:1,easeCrossfadeIn(Ft)),yt.opacityExit=mixNumber$1(_e.opacity!==void 0?_e.opacity:1,0,easeCrossfadeOut(Ft))):qt&&(yt.opacity=mixNumber$1(_e.opacity!==void 0?_e.opacity:1,$t.opacity!==void 0?$t.opacity:1,Ft));for(let zt=0;zt<numBorders;zt++){const Ht=`border${borders[zt]}Radius`;let Kt=getRadius(_e,Ht),Gt=getRadius($t,Ht);if(Kt===void 0&&Gt===void 0)continue;Kt||(Kt=0),Gt||(Gt=0),Kt===0||Gt===0||isPx(Kt)===isPx(Gt)?(yt[Ht]=Math.max(mixNumber$1(asNumber(Kt),asNumber(Gt),Ft),0),(percent.test(Gt)||percent.test(Kt))&&(yt[Ht]+="%")):yt[Ht]=Gt}(_e.rotate||$t.rotate)&&(yt.rotate=mixNumber$1(_e.rotate||0,$t.rotate||0,Ft))}function getRadius(yt,_e){return yt[_e]!==void 0?yt[_e]:yt.borderRadius}const easeCrossfadeIn=compress(0,.5,circOut),easeCrossfadeOut=compress(.5,.95,noop);function compress(yt,_e,$t){return Ft=>Ft<yt?0:Ft>_e?1:$t(progress(yt,_e,Ft))}function copyAxisInto(yt,_e){yt.min=_e.min,yt.max=_e.max}function copyBoxInto(yt,_e){copyAxisInto(yt.x,_e.x),copyAxisInto(yt.y,_e.y)}function copyAxisDeltaInto(yt,_e){yt.translate=_e.translate,yt.scale=_e.scale,yt.originPoint=_e.originPoint,yt.origin=_e.origin}function removePointDelta(yt,_e,$t,Ft,Vt){return yt-=_e,yt=scalePoint(yt,1/$t,Ft),Vt!==void 0&&(yt=scalePoint(yt,1/Vt,Ft)),yt}function removeAxisDelta(yt,_e=0,$t=1,Ft=.5,Vt,qt=yt,zt=yt){if(percent.test(_e)&&(_e=parseFloat(_e),_e=mixNumber$1(zt.min,zt.max,_e/100)-zt.min),typeof _e!="number")return;let Ht=mixNumber$1(qt.min,qt.max,Ft);yt===qt&&(Ht-=_e),yt.min=removePointDelta(yt.min,_e,$t,Ht,Vt),yt.max=removePointDelta(yt.max,_e,$t,Ht,Vt)}function removeAxisTransforms(yt,_e,[$t,Ft,Vt],qt,zt){removeAxisDelta(yt,_e[$t],_e[Ft],_e[Vt],_e.scale,qt,zt)}const xKeys=["x","scaleX","originX"],yKeys=["y","scaleY","originY"];function removeBoxTransforms(yt,_e,$t,Ft){removeAxisTransforms(yt.x,_e,xKeys,$t?$t.x:void 0,Ft?Ft.x:void 0),removeAxisTransforms(yt.y,_e,yKeys,$t?$t.y:void 0,Ft?Ft.y:void 0)}function isAxisDeltaZero(yt){return yt.translate===0&&yt.scale===1}function isDeltaZero(yt){return isAxisDeltaZero(yt.x)&&isAxisDeltaZero(yt.y)}function axisEquals(yt,_e){return yt.min===_e.min&&yt.max===_e.max}function boxEquals(yt,_e){return axisEquals(yt.x,_e.x)&&axisEquals(yt.y,_e.y)}function axisEqualsRounded(yt,_e){return Math.round(yt.min)===Math.round(_e.min)&&Math.round(yt.max)===Math.round(_e.max)}function boxEqualsRounded(yt,_e){return axisEqualsRounded(yt.x,_e.x)&&axisEqualsRounded(yt.y,_e.y)}function aspectRatio(yt){return calcLength(yt.x)/calcLength(yt.y)}function axisDeltaEquals(yt,_e){return yt.translate===_e.translate&&yt.scale===_e.scale&&yt.originPoint===_e.originPoint}class NodeStack{constructor(){this.members=[]}add(_e){addUniqueItem(this.members,_e),_e.scheduleRender()}remove(_e){if(removeItem(this.members,_e),_e===this.prevLead&&(this.prevLead=void 0),_e===this.lead){const $t=this.members[this.members.length-1];$t&&this.promote($t)}}relegate(_e){const $t=this.members.findIndex(Vt=>_e===Vt);if($t===0)return!1;let Ft;for(let Vt=$t;Vt>=0;Vt--){const qt=this.members[Vt];if(qt.isPresent!==!1){Ft=qt;break}}return Ft?(this.promote(Ft),!0):!1}promote(_e,$t){const Ft=this.lead;if(_e!==Ft&&(this.prevLead=Ft,this.lead=_e,_e.show(),Ft)){Ft.instance&&Ft.scheduleRender(),_e.scheduleRender(),_e.resumeFrom=Ft,$t&&(_e.resumeFrom.preserveOpacity=!0),Ft.snapshot&&(_e.snapshot=Ft.snapshot,_e.snapshot.latestValues=Ft.animationValues||Ft.latestValues),_e.root&&_e.root.isUpdating&&(_e.isLayoutDirty=!0);const{crossfade:Vt}=_e.options;Vt===!1&&Ft.hide()}}exitAnimationComplete(){this.members.forEach(_e=>{const{options:$t,resumingFrom:Ft}=_e;$t.onExitComplete&&$t.onExitComplete(),Ft&&Ft.options.onExitComplete&&Ft.options.onExitComplete()})}scheduleRender(){this.members.forEach(_e=>{_e.instance&&_e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function buildProjectionTransform(yt,_e,$t){let Ft="";const Vt=yt.x.translate/_e.x,qt=yt.y.translate/_e.y,zt=($t==null?void 0:$t.z)||0;if((Vt||qt||zt)&&(Ft=`translate3d(${Vt}px, ${qt}px, ${zt}px) `),(_e.x!==1||_e.y!==1)&&(Ft+=`scale(${1/_e.x}, ${1/_e.y}) `),$t){const{transformPerspective:Gt,rotate:Jt,rotateX:Xt,rotateY:Zt,skewX:er,skewY:tr}=$t;Gt&&(Ft=`perspective(${Gt}px) ${Ft}`),Jt&&(Ft+=`rotate(${Jt}deg) `),Xt&&(Ft+=`rotateX(${Xt}deg) `),Zt&&(Ft+=`rotateY(${Zt}deg) `),er&&(Ft+=`skewX(${er}deg) `),tr&&(Ft+=`skewY(${tr}deg) `)}const Ht=yt.x.scale*_e.x,Kt=yt.y.scale*_e.y;return(Ht!==1||Kt!==1)&&(Ft+=`scale(${Ht}, ${Kt})`),Ft||"none"}const metrics={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},isDebug=typeof window<"u"&&window.MotionDebug!==void 0,transformAxes=["","X","Y","Z"],hiddenVisibility={visibility:"hidden"},animationTarget=1e3;let id=0;function resetDistortingTransform(yt,_e,$t,Ft){const{latestValues:Vt}=_e;Vt[yt]&&($t[yt]=Vt[yt],_e.setStaticValue(yt,0),Ft&&(Ft[yt]=0))}function cancelTreeOptimisedTransformAnimations(yt){if(yt.hasCheckedOptimisedAppear=!0,yt.root===yt)return;const{visualElement:_e}=yt.options;if(!_e)return;const $t=getOptimisedAppearId(_e);if(window.MotionHasOptimisedAnimation($t,"transform")){const{layout:Vt,layoutId:qt}=yt.options;window.MotionCancelOptimisedAnimation($t,"transform",frame,!(Vt||qt))}const{parent:Ft}=yt;Ft&&!Ft.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(Ft)}function createProjectionNode({attachResizeListener:yt,defaultParent:_e,measureScroll:$t,checkIsScrollRoot:Ft,resetTransform:Vt}){return class{constructor(zt={},Ht=_e==null?void 0:_e()){this.id=id++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,isDebug&&(metrics.totalNodes=metrics.resolvedTargetDeltas=metrics.recalculatedProjection=0),this.nodes.forEach(propagateDirtyNodes),this.nodes.forEach(resolveTargetDelta),this.nodes.forEach(calcProjection),this.nodes.forEach(cleanDirtyNodes),isDebug&&window.MotionDebug.record(metrics)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=zt,this.root=Ht?Ht.root||Ht:this,this.path=Ht?[...Ht.path,Ht]:[],this.parent=Ht,this.depth=Ht?Ht.depth+1:0;for(let Kt=0;Kt<this.path.length;Kt++)this.path[Kt].shouldResetTransform=!0;this.root===this&&(this.nodes=new FlatTree)}addEventListener(zt,Ht){return this.eventHandlers.has(zt)||this.eventHandlers.set(zt,new SubscriptionManager),this.eventHandlers.get(zt).add(Ht)}notifyListeners(zt,...Ht){const Kt=this.eventHandlers.get(zt);Kt&&Kt.notify(...Ht)}hasListeners(zt){return this.eventHandlers.has(zt)}mount(zt,Ht=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=isSVGElement(zt),this.instance=zt;const{layoutId:Kt,layout:Gt,visualElement:Jt}=this.options;if(Jt&&!Jt.current&&Jt.mount(zt),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),Ht&&(Gt||Kt)&&(this.isLayoutDirty=!0),yt){let Xt;const Zt=()=>this.root.updateBlockedByResize=!1;yt(zt,()=>{this.root.updateBlockedByResize=!0,Xt&&Xt(),Xt=delay(Zt,250),globalProjectionState.hasAnimatedSinceResize&&(globalProjectionState.hasAnimatedSinceResize=!1,this.nodes.forEach(finishAnimation))})}Kt&&this.root.registerSharedNode(Kt,this),this.options.animate!==!1&&Jt&&(Kt||Gt)&&this.addEventListener("didUpdate",({delta:Xt,hasLayoutChanged:Zt,hasRelativeTargetChanged:er,layout:tr})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const rr=this.options.transition||Jt.getDefaultTransition()||defaultLayoutTransition,{onLayoutAnimationStart:ar,onLayoutAnimationComplete:nr}=Jt.getProps(),cr=!this.targetLayout||!boxEqualsRounded(this.targetLayout,tr)||er,fr=!Zt&&er;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||fr||Zt&&(cr||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(Xt,fr);const vr={...getValueTransition(rr,"layout"),onPlay:ar,onComplete:nr};(Jt.shouldReduceMotion||this.options.layoutRoot)&&(vr.delay=0,vr.type=!1),this.startAnimation(vr)}else Zt||finishAnimation(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=tr})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const zt=this.getStack();zt&&zt.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(resetSkewAndRotation),this.animationId++)}getTransformTemplate(){const{visualElement:zt}=this.options;return zt&&zt.getProps().transformTemplate}willUpdate(zt=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let Jt=0;Jt<this.path.length;Jt++){const Xt=this.path[Jt];Xt.shouldResetTransform=!0,Xt.updateScroll("snapshot"),Xt.options.layoutRoot&&Xt.willUpdate(!1)}const{layoutId:Ht,layout:Kt}=this.options;if(Ht===void 0&&!Kt)return;const Gt=this.getTransformTemplate();this.prevTransformTemplateValue=Gt?Gt(this.latestValues,""):void 0,this.updateSnapshot(),zt&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(clearMeasurements);return}this.isUpdating||this.nodes.forEach(clearIsLayoutDirty),this.isUpdating=!1,this.nodes.forEach(resetTransformStyle),this.nodes.forEach(updateLayout),this.nodes.forEach(notifyLayoutUpdate),this.clearAllSnapshots();const Ht=time.now();frameData.delta=clamp(0,1e3/60,Ht-frameData.timestamp),frameData.timestamp=Ht,frameData.isProcessing=!0,frameSteps.update.process(frameData),frameSteps.preRender.process(frameData),frameSteps.render.process(frameData),frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,microtask.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(clearSnapshot),this.sharedNodes.forEach(removeLeadSnapshots)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,frame.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){frame.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let Kt=0;Kt<this.path.length;Kt++)this.path[Kt].updateScroll();const zt=this.layout;this.layout=this.measure(!1),this.layoutCorrected=createBox(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:Ht}=this.options;Ht&&Ht.notify("LayoutMeasure",this.layout.layoutBox,zt?zt.layoutBox:void 0)}updateScroll(zt="measure"){let Ht=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===zt&&(Ht=!1),Ht){const Kt=Ft(this.instance);this.scroll={animationId:this.root.animationId,phase:zt,isRoot:Kt,offset:$t(this.instance),wasRoot:this.scroll?this.scroll.isRoot:Kt}}}resetTransform(){if(!Vt)return;const zt=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,Ht=this.projectionDelta&&!isDeltaZero(this.projectionDelta),Kt=this.getTransformTemplate(),Gt=Kt?Kt(this.latestValues,""):void 0,Jt=Gt!==this.prevTransformTemplateValue;zt&&(Ht||hasTransform(this.latestValues)||Jt)&&(Vt(this.instance,Gt),this.shouldResetTransform=!1,this.scheduleRender())}measure(zt=!0){const Ht=this.measurePageBox();let Kt=this.removeElementScroll(Ht);return zt&&(Kt=this.removeTransform(Kt)),roundBox(Kt),{animationId:this.root.animationId,measuredBox:Ht,layoutBox:Kt,latestValues:{},source:this.id}}measurePageBox(){var zt;const{visualElement:Ht}=this.options;if(!Ht)return createBox();const Kt=Ht.measureViewportBox();if(!(((zt=this.scroll)===null||zt===void 0?void 0:zt.wasRoot)||this.path.some(checkNodeWasScrollRoot))){const{scroll:Jt}=this.root;Jt&&(translateAxis(Kt.x,Jt.offset.x),translateAxis(Kt.y,Jt.offset.y))}return Kt}removeElementScroll(zt){var Ht;const Kt=createBox();if(copyBoxInto(Kt,zt),!((Ht=this.scroll)===null||Ht===void 0)&&Ht.wasRoot)return Kt;for(let Gt=0;Gt<this.path.length;Gt++){const Jt=this.path[Gt],{scroll:Xt,options:Zt}=Jt;Jt!==this.root&&Xt&&Zt.layoutScroll&&(Xt.wasRoot&©BoxInto(Kt,zt),translateAxis(Kt.x,Xt.offset.x),translateAxis(Kt.y,Xt.offset.y))}return Kt}applyTransform(zt,Ht=!1){const Kt=createBox();copyBoxInto(Kt,zt);for(let Gt=0;Gt<this.path.length;Gt++){const Jt=this.path[Gt];!Ht&&Jt.options.layoutScroll&&Jt.scroll&&Jt!==Jt.root&&transformBox(Kt,{x:-Jt.scroll.offset.x,y:-Jt.scroll.offset.y}),hasTransform(Jt.latestValues)&&transformBox(Kt,Jt.latestValues)}return hasTransform(this.latestValues)&&transformBox(Kt,this.latestValues),Kt}removeTransform(zt){const Ht=createBox();copyBoxInto(Ht,zt);for(let Kt=0;Kt<this.path.length;Kt++){const Gt=this.path[Kt];if(!Gt.instance||!hasTransform(Gt.latestValues))continue;hasScale(Gt.latestValues)&&Gt.updateSnapshot();const Jt=createBox(),Xt=Gt.measurePageBox();copyBoxInto(Jt,Xt),removeBoxTransforms(Ht,Gt.latestValues,Gt.snapshot?Gt.snapshot.layoutBox:void 0,Jt)}return hasTransform(this.latestValues)&&removeBoxTransforms(Ht,this.latestValues),Ht}setTargetDelta(zt){this.targetDelta=zt,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(zt){this.options={...this.options,...zt,crossfade:zt.crossfade!==void 0?zt.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==frameData.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(zt=!1){var Ht;const Kt=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=Kt.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=Kt.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=Kt.isSharedProjectionDirty);const Gt=!!this.resumingFrom||this!==Kt;if(!(zt||Gt&&this.isSharedProjectionDirty||this.isProjectionDirty||!((Ht=this.parent)===null||Ht===void 0)&&Ht.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:Xt,layoutId:Zt}=this.options;if(!(!this.layout||!(Xt||Zt))){if(this.resolvedRelativeTargetAt=frameData.timestamp,!this.targetDelta&&!this.relativeTarget){const er=this.getClosestProjectingParent();er&&er.layout&&this.animationProgress!==1?(this.relativeParent=er,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.layout.layoutBox,er.layout.layoutBox),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=createBox(),this.targetWithTransforms=createBox()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),calcRelativeBox(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):copyBoxInto(this.target,this.layout.layoutBox),applyBoxDelta(this.target,this.targetDelta)):copyBoxInto(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const er=this.getClosestProjectingParent();er&&!!er.resumingFrom==!!this.resumingFrom&&!er.options.layoutScroll&&er.target&&this.animationProgress!==1?(this.relativeParent=er,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.target,er.target),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}isDebug&&metrics.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||hasScale(this.parent.latestValues)||has2DTranslate(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var zt;const Ht=this.getLead(),Kt=!!this.resumingFrom||this!==Ht;let Gt=!0;if((this.isProjectionDirty||!((zt=this.parent)===null||zt===void 0)&&zt.isProjectionDirty)&&(Gt=!1),Kt&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(Gt=!1),this.resolvedRelativeTargetAt===frameData.timestamp&&(Gt=!1),Gt)return;const{layout:Jt,layoutId:Xt}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(Jt||Xt))return;copyBoxInto(this.layoutCorrected,this.layout.layoutBox);const Zt=this.treeScale.x,er=this.treeScale.y;applyTreeDeltas(this.layoutCorrected,this.treeScale,this.path,Kt),Ht.layout&&!Ht.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(Ht.target=Ht.layout.layoutBox,Ht.targetWithTransforms=createBox());const{target:tr}=Ht;if(!tr){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(copyAxisDeltaInto(this.prevProjectionDelta.x,this.projectionDelta.x),copyAxisDeltaInto(this.prevProjectionDelta.y,this.projectionDelta.y)),calcBoxDelta(this.projectionDelta,this.layoutCorrected,tr,this.latestValues),(this.treeScale.x!==Zt||this.treeScale.y!==er||!axisDeltaEquals(this.projectionDelta.x,this.prevProjectionDelta.x)||!axisDeltaEquals(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",tr)),isDebug&&metrics.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(zt=!0){var Ht;if((Ht=this.options.visualElement)===null||Ht===void 0||Ht.scheduleRender(),zt){const Kt=this.getStack();Kt&&Kt.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=createDelta(),this.projectionDelta=createDelta(),this.projectionDeltaWithTransform=createDelta()}setAnimationOrigin(zt,Ht=!1){const Kt=this.snapshot,Gt=Kt?Kt.latestValues:{},Jt={...this.latestValues},Xt=createDelta();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!Ht;const Zt=createBox(),er=Kt?Kt.source:void 0,tr=this.layout?this.layout.source:void 0,rr=er!==tr,ar=this.getStack(),nr=!ar||ar.members.length<=1,cr=!!(rr&&!nr&&this.options.crossfade===!0&&!this.path.some(hasOpacityCrossfade));this.animationProgress=0;let fr;this.mixTargetDelta=vr=>{const xr=vr/1e3;mixAxisDelta(Xt.x,zt.x,xr),mixAxisDelta(Xt.y,zt.y,xr),this.setTargetDelta(Xt),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(calcRelativePosition(Zt,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mixBox(this.relativeTarget,this.relativeTargetOrigin,Zt,xr),fr&&boxEquals(this.relativeTarget,fr)&&(this.isProjectionDirty=!1),fr||(fr=createBox()),copyBoxInto(fr,this.relativeTarget)),rr&&(this.animationValues=Jt,mixValues(Jt,Gt,this.latestValues,xr,cr,nr)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=xr},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(zt){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=frame.update(()=>{globalProjectionState.hasAnimatedSinceResize=!0,this.currentAnimation=animateSingleValue(0,animationTarget,{...zt,onUpdate:Ht=>{this.mixTargetDelta(Ht),zt.onUpdate&&zt.onUpdate(Ht)},onComplete:()=>{zt.onComplete&&zt.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const zt=this.getStack();zt&&zt.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(animationTarget),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const zt=this.getLead();let{targetWithTransforms:Ht,target:Kt,layout:Gt,latestValues:Jt}=zt;if(!(!Ht||!Kt||!Gt)){if(this!==zt&&this.layout&&Gt&&shouldAnimatePositionOnly(this.options.animationType,this.layout.layoutBox,Gt.layoutBox)){Kt=this.target||createBox();const Xt=calcLength(this.layout.layoutBox.x);Kt.x.min=zt.target.x.min,Kt.x.max=Kt.x.min+Xt;const Zt=calcLength(this.layout.layoutBox.y);Kt.y.min=zt.target.y.min,Kt.y.max=Kt.y.min+Zt}copyBoxInto(Ht,Kt),transformBox(Ht,Jt),calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,Ht,Jt)}}registerSharedNode(zt,Ht){this.sharedNodes.has(zt)||this.sharedNodes.set(zt,new NodeStack),this.sharedNodes.get(zt).add(Ht);const Gt=Ht.options.initialPromotionConfig;Ht.promote({transition:Gt?Gt.transition:void 0,preserveFollowOpacity:Gt&&Gt.shouldPreserveFollowOpacity?Gt.shouldPreserveFollowOpacity(Ht):void 0})}isLead(){const zt=this.getStack();return zt?zt.lead===this:!0}getLead(){var zt;const{layoutId:Ht}=this.options;return Ht?((zt=this.getStack())===null||zt===void 0?void 0:zt.lead)||this:this}getPrevLead(){var zt;const{layoutId:Ht}=this.options;return Ht?(zt=this.getStack())===null||zt===void 0?void 0:zt.prevLead:void 0}getStack(){const{layoutId:zt}=this.options;if(zt)return this.root.sharedNodes.get(zt)}promote({needsReset:zt,transition:Ht,preserveFollowOpacity:Kt}={}){const Gt=this.getStack();Gt&&Gt.promote(this,Kt),zt&&(this.projectionDelta=void 0,this.needsReset=!0),Ht&&this.setOptions({transition:Ht})}relegate(){const zt=this.getStack();return zt?zt.relegate(this):!1}resetSkewAndRotation(){const{visualElement:zt}=this.options;if(!zt)return;let Ht=!1;const{latestValues:Kt}=zt;if((Kt.z||Kt.rotate||Kt.rotateX||Kt.rotateY||Kt.rotateZ||Kt.skewX||Kt.skewY)&&(Ht=!0),!Ht)return;const Gt={};Kt.z&&resetDistortingTransform("z",zt,Gt,this.animationValues);for(let Jt=0;Jt<transformAxes.length;Jt++)resetDistortingTransform(`rotate${transformAxes[Jt]}`,zt,Gt,this.animationValues),resetDistortingTransform(`skew${transformAxes[Jt]}`,zt,Gt,this.animationValues);zt.render();for(const Jt in Gt)zt.setStaticValue(Jt,Gt[Jt]),this.animationValues&&(this.animationValues[Jt]=Gt[Jt]);zt.scheduleRender()}getProjectionStyles(zt){var Ht,Kt;if(!this.instance||this.isSVG)return;if(!this.isVisible)return hiddenVisibility;const Gt={visibility:""},Jt=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,Gt.opacity="",Gt.pointerEvents=resolveMotionValue(zt==null?void 0:zt.pointerEvents)||"",Gt.transform=Jt?Jt(this.latestValues,""):"none",Gt;const Xt=this.getLead();if(!this.projectionDelta||!this.layout||!Xt.target){const rr={};return this.options.layoutId&&(rr.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,rr.pointerEvents=resolveMotionValue(zt==null?void 0:zt.pointerEvents)||""),this.hasProjected&&!hasTransform(this.latestValues)&&(rr.transform=Jt?Jt({},""):"none",this.hasProjected=!1),rr}const Zt=Xt.animationValues||Xt.latestValues;this.applyTransformsToTarget(),Gt.transform=buildProjectionTransform(this.projectionDeltaWithTransform,this.treeScale,Zt),Jt&&(Gt.transform=Jt(Zt,Gt.transform));const{x:er,y:tr}=this.projectionDelta;Gt.transformOrigin=`${er.origin*100}% ${tr.origin*100}% 0`,Xt.animationValues?Gt.opacity=Xt===this?(Kt=(Ht=Zt.opacity)!==null&&Ht!==void 0?Ht:this.latestValues.opacity)!==null&&Kt!==void 0?Kt:1:this.preserveOpacity?this.latestValues.opacity:Zt.opacityExit:Gt.opacity=Xt===this?Zt.opacity!==void 0?Zt.opacity:"":Zt.opacityExit!==void 0?Zt.opacityExit:0;for(const rr in scaleCorrectors){if(Zt[rr]===void 0)continue;const{correct:ar,applyTo:nr}=scaleCorrectors[rr],cr=Gt.transform==="none"?Zt[rr]:ar(Zt[rr],Xt);if(nr){const fr=nr.length;for(let vr=0;vr<fr;vr++)Gt[nr[vr]]=cr}else Gt[rr]=cr}return this.options.layoutId&&(Gt.pointerEvents=Xt===this?resolveMotionValue(zt==null?void 0:zt.pointerEvents)||"":"none"),Gt}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(zt=>{var Ht;return(Ht=zt.currentAnimation)===null||Ht===void 0?void 0:Ht.stop()}),this.root.nodes.forEach(clearMeasurements),this.root.sharedNodes.clear()}}}function updateLayout(yt){yt.updateLayout()}function notifyLayoutUpdate(yt){var _e;const $t=((_e=yt.resumeFrom)===null||_e===void 0?void 0:_e.snapshot)||yt.snapshot;if(yt.isLead()&&yt.layout&&$t&&yt.hasListeners("didUpdate")){const{layoutBox:Ft,measuredBox:Vt}=yt.layout,{animationType:qt}=yt.options,zt=$t.source!==yt.layout.source;qt==="size"?eachAxis(Xt=>{const Zt=zt?$t.measuredBox[Xt]:$t.layoutBox[Xt],er=calcLength(Zt);Zt.min=Ft[Xt].min,Zt.max=Zt.min+er}):shouldAnimatePositionOnly(qt,$t.layoutBox,Ft)&&eachAxis(Xt=>{const Zt=zt?$t.measuredBox[Xt]:$t.layoutBox[Xt],er=calcLength(Ft[Xt]);Zt.max=Zt.min+er,yt.relativeTarget&&!yt.currentAnimation&&(yt.isProjectionDirty=!0,yt.relativeTarget[Xt].max=yt.relativeTarget[Xt].min+er)});const Ht=createDelta();calcBoxDelta(Ht,Ft,$t.layoutBox);const Kt=createDelta();zt?calcBoxDelta(Kt,yt.applyTransform(Vt,!0),$t.measuredBox):calcBoxDelta(Kt,Ft,$t.layoutBox);const Gt=!isDeltaZero(Ht);let Jt=!1;if(!yt.resumeFrom){const Xt=yt.getClosestProjectingParent();if(Xt&&!Xt.resumeFrom){const{snapshot:Zt,layout:er}=Xt;if(Zt&&er){const tr=createBox();calcRelativePosition(tr,$t.layoutBox,Zt.layoutBox);const rr=createBox();calcRelativePosition(rr,Ft,er.layoutBox),boxEqualsRounded(tr,rr)||(Jt=!0),Xt.options.layoutRoot&&(yt.relativeTarget=rr,yt.relativeTargetOrigin=tr,yt.relativeParent=Xt)}}}yt.notifyListeners("didUpdate",{layout:Ft,snapshot:$t,delta:Kt,layoutDelta:Ht,hasLayoutChanged:Gt,hasRelativeTargetChanged:Jt})}else if(yt.isLead()){const{onExitComplete:Ft}=yt.options;Ft&&Ft()}yt.options.transition=void 0}function propagateDirtyNodes(yt){isDebug&&metrics.totalNodes++,yt.parent&&(yt.isProjecting()||(yt.isProjectionDirty=yt.parent.isProjectionDirty),yt.isSharedProjectionDirty||(yt.isSharedProjectionDirty=!!(yt.isProjectionDirty||yt.parent.isProjectionDirty||yt.parent.isSharedProjectionDirty)),yt.isTransformDirty||(yt.isTransformDirty=yt.parent.isTransformDirty))}function cleanDirtyNodes(yt){yt.isProjectionDirty=yt.isSharedProjectionDirty=yt.isTransformDirty=!1}function clearSnapshot(yt){yt.clearSnapshot()}function clearMeasurements(yt){yt.clearMeasurements()}function clearIsLayoutDirty(yt){yt.isLayoutDirty=!1}function resetTransformStyle(yt){const{visualElement:_e}=yt.options;_e&&_e.getProps().onBeforeLayoutMeasure&&_e.notify("BeforeLayoutMeasure"),yt.resetTransform()}function finishAnimation(yt){yt.finishAnimation(),yt.targetDelta=yt.relativeTarget=yt.target=void 0,yt.isProjectionDirty=!0}function resolveTargetDelta(yt){yt.resolveTargetDelta()}function calcProjection(yt){yt.calcProjection()}function resetSkewAndRotation(yt){yt.resetSkewAndRotation()}function removeLeadSnapshots(yt){yt.removeLeadSnapshot()}function mixAxisDelta(yt,_e,$t){yt.translate=mixNumber$1(_e.translate,0,$t),yt.scale=mixNumber$1(_e.scale,1,$t),yt.origin=_e.origin,yt.originPoint=_e.originPoint}function mixAxis(yt,_e,$t,Ft){yt.min=mixNumber$1(_e.min,$t.min,Ft),yt.max=mixNumber$1(_e.max,$t.max,Ft)}function mixBox(yt,_e,$t,Ft){mixAxis(yt.x,_e.x,$t.x,Ft),mixAxis(yt.y,_e.y,$t.y,Ft)}function hasOpacityCrossfade(yt){return yt.animationValues&&yt.animationValues.opacityExit!==void 0}const defaultLayoutTransition={duration:.45,ease:[.4,0,.1,1]},userAgentContains=yt=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(yt),roundPoint=userAgentContains("applewebkit/")&&!userAgentContains("chrome/")?Math.round:noop;function roundAxis(yt){yt.min=roundPoint(yt.min),yt.max=roundPoint(yt.max)}function roundBox(yt){roundAxis(yt.x),roundAxis(yt.y)}function shouldAnimatePositionOnly(yt,_e,$t){return yt==="position"||yt==="preserve-aspect"&&!isNear(aspectRatio(_e),aspectRatio($t),.2)}function checkNodeWasScrollRoot(yt){var _e;return yt!==yt.root&&((_e=yt.scroll)===null||_e===void 0?void 0:_e.wasRoot)}const DocumentProjectionNode=createProjectionNode({attachResizeListener:(yt,_e)=>addDomEvent(yt,"resize",_e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rootProjectionNode={current:void 0},HTMLProjectionNode=createProjectionNode({measureScroll:yt=>({x:yt.scrollLeft,y:yt.scrollTop}),defaultParent:()=>{if(!rootProjectionNode.current){const yt=new DocumentProjectionNode({});yt.mount(window),yt.setOptions({layoutScroll:!0}),rootProjectionNode.current=yt}return rootProjectionNode.current},resetTransform:(yt,_e)=>{yt.style.transform=_e!==void 0?_e:"none"},checkIsScrollRoot:yt=>window.getComputedStyle(yt).position==="fixed"}),drag={pan:{Feature:PanGesture},drag:{Feature:DragGesture,ProjectionNode:HTMLProjectionNode,MeasureLayout}};function handleHoverEvent(yt,_e,$t){const{props:Ft}=yt;yt.animationState&&Ft.whileHover&&yt.animationState.setActive("whileHover",$t==="Start");const Vt="onHover"+$t,qt=Ft[Vt];qt&&frame.postRender(()=>qt(_e,extractEventInfo(_e)))}class HoverGesture extends Feature{mount(){const{current:_e}=this.node;_e&&(this.unmount=hover(_e,$t=>(handleHoverEvent(this.node,$t,"Start"),Ft=>handleHoverEvent(this.node,Ft,"End"))))}unmount(){}}class FocusGesture extends Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let _e=!1;try{_e=this.node.current.matches(":focus-visible")}catch{_e=!0}!_e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=pipe(addDomEvent(this.node.current,"focus",()=>this.onFocus()),addDomEvent(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function handlePressEvent(yt,_e,$t){const{props:Ft}=yt;yt.animationState&&Ft.whileTap&&yt.animationState.setActive("whileTap",$t==="Start");const Vt="onTap"+($t==="End"?"":$t),qt=Ft[Vt];qt&&frame.postRender(()=>qt(_e,extractEventInfo(_e)))}class PressGesture extends Feature{mount(){const{current:_e}=this.node;_e&&(this.unmount=press(_e,$t=>(handlePressEvent(this.node,$t,"Start"),(Ft,{success:Vt})=>handlePressEvent(this.node,Ft,Vt?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const observerCallbacks=new WeakMap,observers=new WeakMap,fireObserverCallback=yt=>{const _e=observerCallbacks.get(yt.target);_e&&_e(yt)},fireAllObserverCallbacks=yt=>{yt.forEach(fireObserverCallback)};function initIntersectionObserver({root:yt,..._e}){const $t=yt||document;observers.has($t)||observers.set($t,{});const Ft=observers.get($t),Vt=JSON.stringify(_e);return Ft[Vt]||(Ft[Vt]=new IntersectionObserver(fireAllObserverCallbacks,{root:yt,..._e})),Ft[Vt]}function observeIntersection(yt,_e,$t){const Ft=initIntersectionObserver(_e);return observerCallbacks.set(yt,$t),Ft.observe(yt),()=>{observerCallbacks.delete(yt),Ft.unobserve(yt)}}const thresholdNames={some:0,all:1};class InViewFeature extends Feature{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:_e={}}=this.node.getProps(),{root:$t,margin:Ft,amount:Vt="some",once:qt}=_e,zt={root:$t?$t.current:void 0,rootMargin:Ft,threshold:typeof Vt=="number"?Vt:thresholdNames[Vt]},Ht=Kt=>{const{isIntersecting:Gt}=Kt;if(this.isInView===Gt||(this.isInView=Gt,qt&&!Gt&&this.hasEnteredView))return;Gt&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",Gt);const{onViewportEnter:Jt,onViewportLeave:Xt}=this.node.getProps(),Zt=Gt?Jt:Xt;Zt&&Zt(Kt)};return observeIntersection(this.node.current,zt,Ht)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:_e,prevProps:$t}=this.node;["amount","margin","root"].some(hasViewportOptionChanged(_e,$t))&&this.startObserver()}unmount(){}}function hasViewportOptionChanged({viewport:yt={}},{viewport:_e={}}={}){return $t=>yt[$t]!==_e[$t]}
vendor: 4,864 bytes, line 308
308const gestureAnimations={inView:{Feature:InViewFeature},tap:{Feature:PressGesture},focus:{Feature:FocusGesture},hover:{Feature:HoverGesture}},layout={layout:{ProjectionNode:HTMLProjectionNode,MeasureLayout}},prefersReducedMotion={current:null},hasReducedMotionListener={current:!1};function initPrefersReducedMotion(){if(hasReducedMotionListener.current=!0,!!isBrowser$1)if(window.matchMedia){const yt=window.matchMedia("(prefers-reduced-motion)"),_e=()=>prefersReducedMotion.current=yt.matches;yt.addListener(_e),_e()}else prefersReducedMotion.current=!1}const valueTypes=[...dimensionValueTypes,color,complex],findValueType=yt=>valueTypes.find(testValueType(yt)),visualElementStore=new WeakMap;function updateMotionValuesFromProps(yt,_e,$t){for(const Ft in _e){const Vt=_e[Ft],qt=$t[Ft];if(isMotionValue(Vt))yt.addValue(Ft,Vt);else if(isMotionValue(qt))yt.addValue(Ft,motionValue(Vt,{owner:yt}));else if(qt!==Vt)if(yt.hasValue(Ft)){const zt=yt.getValue(Ft);zt.liveStyle===!0?zt.jump(Vt):zt.hasAnimated||zt.set(Vt)}else{const zt=yt.getStaticValue(Ft);yt.addValue(Ft,motionValue(zt!==void 0?zt:Vt,{owner:yt}))}}for(const Ft in $t)_e[Ft]===void 0&&yt.removeValue(Ft);return _e}const propEventHandlers=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class VisualElement{scrapeMotionValuesFromProps(_e,$t,Ft){return{}}constructor({parent:_e,props:$t,presenceContext:Ft,reducedMotionConfig:Vt,blockInitialAnimation:qt,visualState:zt},Ht={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=KeyframeResolver,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const er=time.now();this.renderScheduledAt<er&&(this.renderScheduledAt=er,frame.render(this.render,!1,!0))};const{latestValues:Kt,renderState:Gt,onUpdate:Jt}=zt;this.onUpdate=Jt,this.latestValues=Kt,this.baseTarget={...Kt},this.initialValues=$t.initial?{...Kt}:{},this.renderState=Gt,this.parent=_e,this.props=$t,this.presenceContext=Ft,this.depth=_e?_e.depth+1:0,this.reducedMotionConfig=Vt,this.options=Ht,this.blockInitialAnimation=!!qt,this.isControllingVariants=isControllingVariants($t),this.isVariantNode=isVariantNode($t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(_e&&_e.current);const{willChange:Xt,...Zt}=this.scrapeMotionValuesFromProps($t,{},this);for(const er in Zt){const tr=Zt[er];Kt[er]!==void 0&&isMotionValue(tr)&&tr.set(Kt[er],!1)}}mount(_e){this.current=_e,visualElementStore.set(_e,this),this.projection&&!this.projection.instance&&this.projection.mount(_e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(($t,Ft)=>this.bindToMotionValue(Ft,$t)),hasReducedMotionListener.current||initPrefersReducedMotion(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:prefersReducedMotion.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){visualElementStore.delete(this.current),this.projection&&this.projection.unmount(),cancelFrame(this.notifyUpdate),cancelFrame(this.render),this.valueSubscriptions.forEach(_e=>_e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const _e in this.events)this.events[_e].clear();for(const _e in this.features){const $t=this.features[_e];$t&&($t.unmount(),$t.isMounted=!1)}this.current=null}bindToMotionValue(_e,$t){this.valueSubscriptions.has(_e)&&this.valueSubscriptions.get(_e)();const Ft=transformProps.has(_e),Vt=$t.on("change",Ht=>{this.latestValues[_e]=Ht,this.props.onUpdate&&frame.preRender(this.notifyUpdate),Ft&&this.projection&&(this.projection.isTransformDirty=!0)}),qt=$t.on("renderRequest",this.scheduleRender);let zt;window.MotionCheckAppearSync&&(zt=window.MotionCheckAppearSync(this,_e,$t)),this.valueSubscriptions.set(_e,()=>{Vt(),qt(),zt&&zt(),$t.owner&&$t.stop()})}sortNodePosition(_e){return!this.current||!this.sortInstanceNodePosition||this.type!==_e.type?0:this.sortInstanceNodePosition(this.current,_e.current)}updateFeatures(){let _e="animation";for(_e in featureDefinitions){const $t=featureDefinitions[_e];if(!$t)continue;const{isEnabled:Ft,Feature:Vt}=$t;if(!this.features[_e]&&Vt&&Ft(this.props)&&(this.features[_e]=new Vt(this)),this.features[_e]){const qt=this.features[_e];
308qt.isMounted?qt.update():(qt.mount(),qt.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):createBox()}getStaticValue(_e){return this.latestValues[_e]}setStaticValue(_e,$t){this.latestValues[_e]=$t}update(_e,$t){(_e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=_e,this.prevPresenceContext=this.presenceContext,this.presenceContext=$t;for(let Ft=0;Ft<propEventHandlers.length;Ft++){const Vt=propEventHandlers[Ft];this.propEventSubscriptions[Vt]&&(this.propEventSubscriptions[Vt](),delete this.propEventSubscriptions[Vt]);const qt="on"+Vt,zt=_e[qt];zt&&(this.propEventSubscriptions[Vt]=this.on(Vt,zt))}this.prevMotionValues=updateMotionValuesFromProps(this,this.scrapeMotionValuesFromProps(_e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(_e){return this.props.variants?this.props.variants[_e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(_e){const $t=this.getClosestVariantNode();if($t)return $t.variantChildren&&$t.variantChildren.add(_e),()=>$t.variantChildren.delete(_e)}addValue(_e,$t){const Ft=this.values.get(_e);$t!==Ft&&(Ft&&this.removeValue(_e),this.bindToMotionValue(_e,$t),this.values.set(_e,$t),this.latestValues[_e]=$t.get())}removeValue(_e){this.values.delete(_e);const $t=this.valueSubscriptions.get(_e);$t&&($t(),this.valueSubscriptions.delete(_e)),delete this.latestValues[_e],this.removeValueFromRenderState(_e,this.renderState)}hasValue(_e){return this.values.has(_e)}getValue(_e,$t){if(this.props.values&&this.props.values[_e])return this.props.values[_e];let Ft=this.values.get(_e);return Ft===void 0&&$t!==void 0&&(Ft=motionValue($t===null?void 0:$t,{owner:this}),this.addValue(_e,Ft)),Ft}readValue(_e,$t){var Ft;let Vt=this.latestValues[_e]!==void 0||!this.current?this.latestValues[_e]:(Ft=this.getBaseTargetFromProps(this.props,_e))!==null&&Ft!==void 0?Ft:this.readValueFromInstance(this.current,_e,this.options);return Vt!=null&&(typeof Vt=="string"&&(isNumericalString(Vt)||isZeroValueString(Vt))?Vt=parseFloat(Vt):!findValueType(Vt)&&complex.test($t)&&(Vt=getAnimatableNone(_e,$t)),this.setBaseTarget(_e,isMotionValue(Vt)?Vt.get():Vt)),isMotionValue(Vt)?Vt.get():Vt}setBaseTarget(_e,$t){this.baseTarget[_e]=$t}getBaseTarget(_e){var $t;const{initial:Ft}=this.props;let Vt;if(typeof Ft=="string"||typeof Ft=="object"){const zt=resolveVariantFromProps(this.props,Ft,($t=this.presenceContext)===null||$t===void 0?void 0:$t.custom);zt&&(Vt=zt[_e])}if(Ft&&Vt!==void 0)return Vt;const qt=this.getBaseTargetFromProps(this.props,_e);return qt!==void 0&&!isMotionValue(qt)?qt:this.initialValues[_e]!==void 0&&Vt===void 0?void 0:this.baseTarget[_e]}on(_e,$t){return this.events[_e]||(this.events[_e]=new SubscriptionManager),this.events[_e].add($t)}notify(_e,...$t){this.events[_e]&&this.events[_e].notify(...$t)}}class DOMVisualElement extends VisualElement{constructor(){super(...arguments),this.KeyframeResolver=DOMKeyframesResolver}sortInstanceNodePosition(_e,$t){return _e.compareDocumentPosition($t)&2?1:-1}getBaseTargetFromProps(_e,$t){return _e.style?_e.style[$t]:void 0}removeValueFromRenderState(_e,{vars:$t,style:Ft}){delete $t[_e],delete Ft[_e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:_e}=this.props;isMotionValue(_e)&&(this.childSubscription=_e.on("change",$t=>{this.current&&(this.current.textContent=`${$t}`)}))}}function getComputedStyle$1(yt){return window.getComputedStyle(yt)}class HTMLVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="html",this.renderInstance=renderHTML}readValueFromInstance(_e,$t){if(transformProps.has($t)){const Ft=getDefaultValueType($t);return Ft&&Ft.default||0}else{const Ft=getComputedStyle$1(_e),Vt=(isCSSVariableName($t)?Ft.getPropertyValue($t):Ft[$t])||0;return typeof Vt=="string"?Vt.trim():Vt}}measureInstanceViewportBox(_e,{transformPagePoint:$t}){return measureViewportBox(_e,$t)}build(_e,$t,Ft){buildHTMLStyles(_e,$t,Ft.transformTemplate)}scrapeMotionValuesFromProps(_e,$t,Ft){return scrapeMotionValuesFromProps$1(_e,$t,Ft)}}class SVGVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=createBox}getBaseTargetFromProps(_e,$t){return _e[$t]}readValueFromInstance(_e,$t){if(transformProps.has($t)){const Ft=getDefaultValueType($t);return Ft&&Ft.default||0}return $t=camelCaseAttributes.has($t)?$t:camelToDash($t),_e.getAttribute($t)}scrapeMotionValuesFromProps(_e,$t,Ft){return scrapeMotionValuesFromProps(_e,$t,Ft)}build(_e,$t,Ft){buildSVGAttrs(_e,$t,this.isSVGTag,Ft.transformTemplate)}renderInstance(_e,$t,Ft,Vt){renderSVG(_e,$t,Ft,Vt)}mount(_e){this.isSVGTag=isSVGTag(_e.tagName),super.mount(_e)}}const createDomVisualElement=(yt,_e)=>isSVGComponent(yt)?new SVGVisualElement(_e):new HTMLVisualElement(_e,{allowProjection:yt!==reactExports.Fragment}),createMotionComponent=createMotionComponentFactory({...animations,...gestureAnimations,...drag,...layout},createDomVisualElement),motion=createDOMMotionComponentProxy(createMotionComponent);var useReactId=React$3[" useId ".trim().toString()]||(()=>{}),count$1=0;function useId(yt){const[_e,$t]=reactExports.useState(useReactId());return useLayoutEffect2(()=>{yt||$t(Ft=>Ft??String(count$1++))},[yt]),yt||(_e?`radix-${_e}`:"")}var AUTOFOCUS_ON_MOUNT="focusScope.autoFocusOnMount",AUTOFOCUS_ON_UNMOUNT="focusScope.autoFocusOnUnmount",EVENT_OPTIONS={bubbles:!1,cancelable:!0},FOCUS_SCOPE_NAME="FocusScope",FocusScope=reactExports.forwardRef((yt,_e)=>{const{loop:$t=!1,trapped:Ft=!1,onMountAutoFocus:Vt,onUnmountAutoFocus:qt,...zt}=yt,[Ht,Kt]=reactExports.useState(null),Gt=useCallbackRef$1(Vt),Jt=useCallbackRef$1(qt),Xt=reactExports.useRef(null),Zt=useComposedRefs(_e,rr=>Kt(rr)),er=reactExports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;reactExports.useEffect(()=>{if(Ft){let rr=function(fr){if(er.paused||!Ht)return;const vr=fr.target;Ht.contains(vr)?Xt.current=vr:focus(Xt.current,{select:!0})},ar=function(fr){if(er.paused||!Ht)return;const vr=fr.relatedTarget;vr!==null&&(Ht.contains(vr)||focus(Xt.current,{select:!0}))},nr=function(fr){if(document.activeElement===document.body)for(const xr of fr)xr.removedNodes.length>0&&focus(Ht)};document.addEventListener("focusin",rr),document.addEventListener("focusout",ar);const cr=new MutationObserver(nr);return Ht&&cr.observe(Ht,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",rr),document.removeEventListener("focusout",ar),cr.disconnect()}}},[Ft,Ht,er.paused]),reactExports.useEffect(()=>{if(Ht){focusScopesStack.add(er);const rr=document.activeElement;if(!Ht.contains(rr)){const nr=new CustomEvent(AUTOFOCUS_ON_MOUNT,EVENT_OPTIONS);Ht.addEventListener(AUTOFOCUS_ON_MOUNT,Gt),Ht.dispatchEvent(nr),nr.defaultPrevented||(focusFirst(removeLinks(getTabbableCandidates(Ht)),{select:!0}),document.activeElement===rr&&focus(Ht))}return()=>{Ht.removeEventListener(AUTOFOCUS_ON_MOUNT,Gt),setTimeout(()=>{const nr=new CustomEvent(AUTOFOCUS_ON_UNMOUNT,EVENT_OPTIONS);Ht.addEventListener(AUTOFOCUS_ON_UNMOUNT,Jt),Ht.dispatchEvent(nr),nr.defaultPrevented||focus(rr??document.body,{select:!0}),Ht.removeEventListener(AUTOFOCUS_ON_UNMOUNT,Jt),focusScopesStack.remove(er)},0)}}},[Ht,Gt,Jt,er]);const tr=reactExports.useCallback(rr=>{if(!$t&&!Ft||er.paused)return;const ar=rr.key==="Tab"&&!rr.altKey&&!rr.ctrlKey&&!rr.metaKey,nr=document.activeElement;if(ar&&nr){const cr=rr.currentTarget,[fr,vr]=getTabbableEdges(cr);fr&&vr?!rr.shiftKey&&nr===vr?(rr.preventDefault(),$t&&focus(fr,{select:!0})):rr.shiftKey&&nr===fr&&(rr.preventDefault(),$t&&focus(vr,{select:!0})):nr===cr&&rr.preventDefault()}},[$t,Ft,er.paused]);return jsxRuntimeExports.jsx(Primitive.div,{tabIndex:-1,...zt,ref:Zt,onKeyDown:tr})});FocusScope.displayName=FOCUS_SCOPE_NAME;function focusFirst(yt,{select:_e=!1}={}){const $t=document.activeElement;for(const Ft of yt)if(focus(Ft,{select:_e}),document.activeElement!==$t)return}function getTabbableEdges(yt){const _e=getTabbableCandidates(yt),$t=findVisible(_e,yt),Ft=findVisible(_e.reverse(),yt);return[$t,Ft]}function getTabbableCandidates(yt){const _e=[],$t=document.createTreeWalker(yt,NodeFilter.SHOW_ELEMENT,{acceptNode:Ft=>{const Vt=Ft.tagName==="INPUT"&&Ft.type==="hidden";return Ft.disabled||Ft.hidden||Vt?NodeFilter.FILTER_SKIP:Ft.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;$t.nextNode();)_e.push($t.currentNode);return _e}function findVisible(yt,_e){for(const $t of yt)if(!isHidden($t,{upTo:_e}))return $t}function isHidden(yt,{upTo:_e}){if(getComputedStyle(yt).visibility==="hidden")return!0;for(;yt;){if(_e!==void 0&&yt===_e)return!1;if(getComputedStyle(yt).display==="none")return!0;yt=yt.parentElement}return!1}function isSelectableInput(yt){return yt instanceof HTMLInputElement&&"select"in yt}function focus(yt,{select:_e=!1}={}){if(yt&&yt.focus){const $t=document.activeElement;yt.focus({preventScroll:!0}),yt!==$t&&isSelectableInput(yt)&&_e&&yt.select()}}var focusScopesStack=createFocusScopesStack();function createFocusScopesStack(){let yt=[];return{add(_e){const $t=yt[0];_e!==$t&&($t==null||$t.pause()),yt=arrayRemove(yt,_e),yt.unshift(_e)},remove(_e){var $t;yt=arrayRemove(yt,_e),($t=yt[0])==null||$t.resume()}}}function arrayRemove(yt,_e){const $t=[...yt],Ft=$t.indexOf(_e);return Ft!==-1&&$t.splice(Ft,1),$t}function removeLinks(yt){return yt.filter(_e=>_e.tagName!=="A")}var count=0;function useFocusGuards(){reactExports.useEffect(()=>{const yt=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",yt[0]??createFocusGuard()),document.body.insertAdjacentElement("beforeend",yt[1]??createFocusGuard()),count++,()=>{count===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(_e=>_e.remove()),count--}},[])}function createFocusGuard(){const yt=document.createElement("span");return yt.setAttribute("data-radix-focus-guard",""),yt.tabIndex=0,yt.style.outline="none",yt.style.opacity="0",yt.style.position="fixed",yt.style.pointerEvents="none",yt}var __assign$1=function(){return __assign$1=Object.assign||function(_e){for(var $t,Ft=1,Vt=arguments.length;Ft<Vt;Ft++){$t=arguments[Ft];for(var qt in $t)Object.prototype.hasOwnProperty.call($t,qt)&&(_e[qt]=$t[qt])}return _e},__assign$1.apply(this,arguments)};function __rest$1(yt,_e){var $t={};for(var Ft in yt)Object.prototype.hasOwnProperty.call(yt,Ft)&&_e.indexOf(Ft)<0&&($t[Ft]=yt[Ft]);if(yt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Vt=0,Ft=Object.getOwnPropertySymbols(yt);Vt<Ft.length;Vt++)_e.indexOf(Ft[Vt])<0&&Object.prototype.propertyIsEnumerable.call(yt,Ft[Vt])&&($t[Ft[Vt]]=yt[Ft[Vt]]);return $t}function __spreadArray(yt,_e,$t){if($t||arguments.length===2)for(var Ft=0,Vt=_e.length,qt;Ft<Vt;Ft++)(qt||!(Ft in _e))&&(qt||(qt=Array.prototype.slice.call(_e,0,Ft)),qt[Ft]=_e[Ft]);return yt.concat(qt||Array.prototype.slice.call(_e))}typeof SuppressedError=="function"&&SuppressedError;var zeroRightClassName="right-scroll-bar-position",fullWidthClassName="width-before-scroll-bar",noScrollbarsClassName="with-scroll-bars-hidden",removedBarSizeVariable="--removed-body-scroll-bar-size";function assignRef(yt,_e){return typeof yt=="function"?yt(_e):yt&&(yt.current=_e),yt}function useCallbackRef(yt,_e){var $t=reactExports.useState(function(){return{value:yt,callback:_e,facade:{get current(){return $t.value},set current(Ft){var Vt=$t.value;Vt!==Ft&&($t.value=Ft,$t.callback(Ft,Vt))}}}})[0];return $t.callback=_e,$t.facade}var useIsomorphicLayoutEffect=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,currentValues=new WeakMap;function useMergeRefs(yt,_e){var $t=useCallbackRef(null,function(Ft){return yt.forEach(function(Vt){return assignRef(Vt,Ft)})});return useIsomorphicLayoutEffect(function(){var Ft=currentValues.get($t);if(Ft){var Vt=new Set(Ft),qt=new Set(yt),zt=$t.current;Vt.forEach(function(Ht){qt.has(Ht)||assignRef(Ht,null)}),qt.forEach(function(Ht){Vt.has(Ht)||assignRef(Ht,zt)})}currentValues.set($t,yt)},[yt]),$t}function ItoI(yt){return yt}function innerCreateMedium(yt,_e){_e===void 0&&(_e=ItoI);var $t=[],Ft=!1,Vt={read:function(){if(Ft)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return $t.length?$t[$t.length-1]:yt},useMedium:function(qt){var zt=_e(qt,Ft);return $t.push(zt),function(){$t=$t.filter(function(Ht){return Ht!==zt})}},assignSyncMedium:function(qt){for(Ft=!0;$t.length;){var zt=$t;$t=[],zt.forEach(qt)}$t={push:function(Ht){return qt(Ht)},filter:function(){return $t}}},assignMedium:function(qt){Ft=!0;var zt=[];if($t.length){var Ht=$t;$t=[],Ht.forEach(qt),zt=$t}var Kt=function(){var Jt=zt;zt=[],Jt.forEach(qt)},Gt=function(){return Promise.resolve().then(Kt)};Gt(),$t={push:function(Jt){zt.push(Jt),Gt()},filter:function(Jt){return zt=zt.filter(Jt),$t}}}};return Vt}function createSidecarMedium(yt){yt===void 0&&(yt={});var _e=innerCreateMedium(null);return _e.options=__assign$1({async:!0,ssr:!1},yt),_e}var SideCar$1=function(yt){var _e=yt.sideCar,$t=__rest$1(yt,["sideCar"]);if(!_e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var Ft=_e.read();if(!Ft)throw new Error("Sidecar medium not found");return reactExports.createElement(Ft,__assign$1({},$t))};
vendor: 8,069 bytes, lines 308-348
308SideCar$1.isSideCarExport=!0;function exportSidecar(yt,_e){return yt.useMedium(_e),SideCar$1}var effectCar=createSidecarMedium(),nothing=function(){},RemoveScroll=reactExports.forwardRef(function(yt,_e){var $t=reactExports.useRef(null),Ft=reactExports.useState({onScrollCapture:nothing,onWheelCapture:nothing,onTouchMoveCapture:nothing}),Vt=Ft[0],qt=Ft[1],zt=yt.forwardProps,Ht=yt.children,Kt=yt.className,Gt=yt.removeScrollBar,Jt=yt.enabled,Xt=yt.shards,Zt=yt.sideCar,er=yt.noRelative,tr=yt.noIsolation,rr=yt.inert,ar=yt.allowPinchZoom,nr=yt.as,cr=nr===void 0?"div":nr,fr=yt.gapMode,vr=__rest$1(yt,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),xr=Zt,Sr=useMergeRefs([$t,_e]),Tr=__assign$1(__assign$1({},vr),Vt);return reactExports.createElement(reactExports.Fragment,null,Jt&&reactExports.createElement(xr,{sideCar:effectCar,removeScrollBar:Gt,shards:Xt,noRelative:er,noIsolation:tr,inert:rr,setCallbacks:qt,allowPinchZoom:!!ar,lockRef:$t,gapMode:fr}),zt?reactExports.cloneElement(reactExports.Children.only(Ht),__assign$1(__assign$1({},Tr),{ref:Sr})):reactExports.createElement(cr,__assign$1({},Tr,{className:Kt,ref:Sr}),Ht))});RemoveScroll.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};RemoveScroll.classNames={fullWidth:fullWidthClassName,zeroRight:zeroRightClassName};var getNonce=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function makeStyleTag(){if(!document)return null;var yt=document.createElement("style");yt.type="text/css";var _e=getNonce();return _e&&yt.setAttribute("nonce",_e),yt}function injectStyles(yt,_e){yt.styleSheet?yt.styleSheet.cssText=_e:yt.appendChild(document.createTextNode(_e))}function insertStyleTag(yt){var _e=document.head||document.getElementsByTagName("head")[0];_e.appendChild(yt)}var stylesheetSingleton=function(){var yt=0,_e=null;return{add:function($t){yt==0&&(_e=makeStyleTag())&&(injectStyles(_e,$t),insertStyleTag(_e)),yt++},remove:function(){yt--,!yt&&_e&&(_e.parentNode&&_e.parentNode.removeChild(_e),_e=null)}}},styleHookSingleton=function(){var yt=stylesheetSingleton();return function(_e,$t){reactExports.useEffect(function(){return yt.add(_e),function(){yt.remove()}},[_e&&$t])}},styleSingleton=function(){var yt=styleHookSingleton(),_e=function($t){var Ft=$t.styles,Vt=$t.dynamic;return yt(Ft,Vt),null};return _e},zeroGap={left:0,top:0,right:0,gap:0},parse$1=function(yt){return parseInt(yt||"",10)||0},getOffset=function(yt){var _e=window.getComputedStyle(document.body),$t=_e[yt==="padding"?"paddingLeft":"marginLeft"],Ft=_e[yt==="padding"?"paddingTop":"marginTop"],Vt=_e[yt==="padding"?"paddingRight":"marginRight"];return[parse$1($t),parse$1(Ft),parse$1(Vt)]},getGapWidth=function(yt){if(yt===void 0&&(yt="margin"),typeof window>"u")return zeroGap;var _e=getOffset(yt),$t=document.documentElement.clientWidth,Ft=window.innerWidth;return{left:_e[0],top:_e[1],right:_e[2],gap:Math.max(0,Ft-$t+_e[2]-_e[0])}},Style=styleSingleton(),lockAttribute="data-scroll-locked",getStyles=function(yt,_e,$t,Ft){var Vt=yt.left,qt=yt.top,zt=yt.right,Ht=yt.gap;return $t===void 0&&($t="margin"),` 309 .`.concat(noScrollbarsClassName,` { 310 overflow: hidden `).concat(Ft,`; 311 padding-right: `).concat(Ht,"px ").concat(Ft,`; 312 } 313 body[`).concat(lockAttribute,`] { 314 overflow: hidden `).concat(Ft,`; 315 overscroll-behavior: contain; 316 `).concat([_e&&"position: relative ".concat(Ft,";"),$t==="margin"&&` 317 padding-left: `.concat(Vt,`px; 318 padding-top: `).concat(qt,`px; 319 padding-right: `).concat(zt,`px; 320 margin-left:0; 321 margin-top:0; 322 margin-right: `).concat(Ht,"px ").concat(Ft,`; 323 `),$t==="padding"&&"padding-right: ".concat(Ht,"px ").concat(Ft,";")].filter(Boolean).join(""),` 324 } 325 326 .`).concat(zeroRightClassName,` { 327 right: `).concat(Ht,"px ").concat(Ft,`; 328 } 329 330 .`).concat(fullWidthClassName,` { 331 margin-right: `).concat(Ht,"px ").concat(Ft,`; 332 } 333 334 .`).concat(zeroRightClassName," .").concat(zeroRightClassName,` { 335 right: 0 `).concat(Ft,`; 336 } 337 338 .`).concat(fullWidthClassName," .").concat(fullWidthClassName,` { 339 margin-right: 0 `).concat(Ft,`; 340 } 341 342 body[`).concat(lockAttribute,`] { 343 `).concat(removedBarSizeVariable,": ").concat(Ht,`px; 344 } 345`)},getCurrentUseCounter=function(){var yt=parseInt(document.body.getAttribute(lockAttribute)||"0",10);return isFinite(yt)?yt:0},useLockAttribute=function(){reactExports.useEffect(function(){return document.body.setAttribute(lockAttribute,(getCurrentUseCounter()+1).toString()),function(){var yt=getCurrentUseCounter()-1;yt<=0?document.body.removeAttribute(lockAttribute):document.body.setAttribute(lockAttribute,yt.toString())}},[])},RemoveScrollBar=function(yt){var _e=yt.noRelative,$t=yt.noImportant,Ft=yt.gapMode,Vt=Ft===void 0?"margin":Ft;useLockAttribute();var qt=reactExports.useMemo(function(){return getGapWidth(Vt)},[Vt]);return reactExports.createElement(Style,{styles:getStyles(qt,!_e,Vt,$t?"":"!important")})},passiveSupported=!1;if(typeof window<"u")try{var options=Object.defineProperty({},"passive",{get:function(){return passiveSupported=!0,!0}});window.addEventListener("test",options,options),window.removeEventListener("test",options,options)}catch{passiveSupported=!1}var nonPassive=passiveSupported?{passive:!1}:!1,alwaysContainsScroll=function(yt){return yt.tagName==="TEXTAREA"},elementCanBeScrolled=function(yt,_e){if(!(yt instanceof Element))return!1;var $t=window.getComputedStyle(yt);return $t[_e]!=="hidden"&&!($t.overflowY===$t.overflowX&&!alwaysContainsScroll(yt)&&$t[_e]==="visible")},elementCouldBeVScrolled=function(yt){return elementCanBeScrolled(yt,"overflowY")},elementCouldBeHScrolled=function(yt){return elementCanBeScrolled(yt,"overflowX")},locationCouldBeScrolled=function(yt,_e){var $t=_e.ownerDocument,Ft=_e;do{typeof ShadowRoot<"u"&&Ft instanceof ShadowRoot&&(Ft=Ft.host);var Vt=elementCouldBeScrolled(yt,Ft);if(Vt){var qt=getScrollVariables(yt,Ft),zt=qt[1],Ht=qt[2];if(zt>Ht)return!0}Ft=Ft.parentNode}while(Ft&&Ft!==$t.body);return!1},getVScrollVariables=function(yt){var _e=yt.scrollTop,$t=yt.scrollHeight,Ft=yt.clientHeight;return[_e,$t,Ft]},getHScrollVariables=function(yt){var _e=yt.scrollLeft,$t=yt.scrollWidth,Ft=yt.clientWidth;return[_e,$t,Ft]},elementCouldBeScrolled=function(yt,_e){return yt==="v"?elementCouldBeVScrolled(_e):elementCouldBeHScrolled(_e)},getScrollVariables=function(yt,_e){return yt==="v"?getVScrollVariables(_e):getHScrollVariables(_e)},getDirectionFactor=function(yt,_e){return yt==="h"&&_e==="rtl"?-1:1},handleScroll=function(yt,_e,$t,Ft,Vt){var qt=getDirectionFactor(yt,window.getComputedStyle(_e).direction),zt=qt*Ft,Ht=$t.target,Kt=_e.contains(Ht),Gt=!1,Jt=zt>0,Xt=0,Zt=0;do{if(!Ht)break;var er=getScrollVariables(yt,Ht),tr=er[0],rr=er[1],ar=er[2],nr=rr-ar-qt*tr;(tr||nr)&&elementCouldBeScrolled(yt,Ht)&&(Xt+=nr,Zt+=tr);var cr=Ht.parentNode;Ht=cr&&cr.nodeType===Node.DOCUMENT_FRAGMENT_NODE?cr.host:cr}while(!Kt&&Ht!==document.body||Kt&&(_e.contains(Ht)||_e===Ht));return(Jt&&(Math.abs(Xt)<1||!Vt)||!Jt&&(Math.abs(Zt)<1||!Vt))&&(Gt=!0),Gt},getTouchXY=function(yt){return"changedTouches"in yt?[yt.changedTouches[0].clientX,yt.changedTouches[0].clientY]:[0,0]},getDeltaXY=function(yt){return[yt.deltaX,yt.deltaY]},extractRef=function(yt){return yt&&"current"in yt?yt.current:yt},deltaCompare=function(yt,_e){return yt[0]===_e[0]&&yt[1]===_e[1]},generateStyle=function(yt){return` 346 .block-interactivity-`.concat(yt,` {pointer-events: none;} 347 .allow-interactivity-`).concat(yt,` {pointer-events: all;} 348`)},idCounter=0,lockStack=[];function RemoveScrollSideCar(yt){var _e=reactExports.useRef([]),$t=reactExports.useRef([0,0]),Ft=reactExports.useRef(),Vt=reactExports.useState(idCounter++)[0],qt=reactExports.useState(styleSingleton)[0],zt=reactExports.useRef(yt);reactExports.useEffect(function(){zt.current=yt},[yt]),reactExports.useEffect(function(){if(yt.inert){document.body.classList.add("block-interactivity-".concat(Vt));var rr=__spreadArray([yt.lockRef.current],(yt.shards||[]).map(extractRef),!0).filter(
vendor: 5,770 bytes, line 348
348Boolean);return rr.forEach(function(ar){return ar.classList.add("allow-interactivity-".concat(Vt))}),function(){document.body.classList.remove("block-interactivity-".concat(Vt)),rr.forEach(function(ar){return ar.classList.remove("allow-interactivity-".concat(Vt))})}}},[yt.inert,yt.lockRef.current,yt.shards]);var Ht=reactExports.useCallback(function(rr,ar){if("touches"in rr&&rr.touches.length===2||rr.type==="wheel"&&rr.ctrlKey)return!zt.current.allowPinchZoom;var nr=getTouchXY(rr),cr=$t.current,fr="deltaX"in rr?rr.deltaX:cr[0]-nr[0],vr="deltaY"in rr?rr.deltaY:cr[1]-nr[1],xr,Sr=rr.target,Tr=Math.abs(fr)>Math.abs(vr)?"h":"v";if("touches"in rr&&Tr==="h"&&Sr.type==="range")return!1;var Br=locationCouldBeScrolled(Tr,Sr);if(!Br)return!0;if(Br?xr=Tr:(xr=Tr==="v"?"h":"v",Br=locationCouldBeScrolled(Tr,Sr)),!Br)return!1;if(!Ft.current&&"changedTouches"in rr&&(fr||vr)&&(Ft.current=xr),!xr)return!0;var jr=Ft.current||xr;return handleScroll(jr,ar,rr,jr==="h"?fr:vr,!0)},[]),Kt=reactExports.useCallback(function(rr){var ar=rr;if(!(!lockStack.length||lockStack[lockStack.length-1]!==qt)){var nr="deltaY"in ar?getDeltaXY(ar):getTouchXY(ar),cr=_e.current.filter(function(xr){return xr.name===ar.type&&(xr.target===ar.target||ar.target===xr.shadowParent)&&deltaCompare(xr.delta,nr)})[0];if(cr&&cr.should){ar.cancelable&&ar.preventDefault();return}if(!cr){var fr=(zt.current.shards||[]).map(extractRef).filter(Boolean).filter(function(xr){return xr.contains(ar.target)}),vr=fr.length>0?Ht(ar,fr[0]):!zt.current.noIsolation;vr&&ar.cancelable&&ar.preventDefault()}}},[]),Gt=reactExports.useCallback(function(rr,ar,nr,cr){var fr={name:rr,delta:ar,target:nr,should:cr,shadowParent:getOutermostShadowParent(nr)};_e.current.push(fr),setTimeout(function(){_e.current=_e.current.filter(function(vr){return vr!==fr})},1)},[]),Jt=reactExports.useCallback(function(rr){$t.current=getTouchXY(rr),Ft.current=void 0},[]),Xt=reactExports.useCallback(function(rr){Gt(rr.type,getDeltaXY(rr),rr.target,Ht(rr,yt.lockRef.current))},[]),Zt=reactExports.useCallback(function(rr){Gt(rr.type,getTouchXY(rr),rr.target,Ht(rr,yt.lockRef.current))},[]);reactExports.useEffect(function(){return lockStack.push(qt),yt.setCallbacks({onScrollCapture:Xt,onWheelCapture:Xt,onTouchMoveCapture:Zt}),document.addEventListener("wheel",Kt,nonPassive),document.addEventListener("touchmove",Kt,nonPassive),document.addEventListener("touchstart",Jt,nonPassive),function(){lockStack=lockStack.filter(function(rr){return rr!==qt}),document.removeEventListener("wheel",Kt,nonPassive),document.removeEventListener("touchmove",Kt,nonPassive),document.removeEventListener("touchstart",Jt,nonPassive)}},[]);var er=yt.removeScrollBar,tr=yt.inert;return reactExports.createElement(reactExports.Fragment,null,tr?reactExports.createElement(qt,{styles:generateStyle(Vt)}):null,er?reactExports.createElement(RemoveScrollBar,{noRelative:yt.noRelative,gapMode:yt.gapMode}):null)}function getOutermostShadowParent(yt){for(var _e=null;yt!==null;)yt instanceof ShadowRoot&&(_e=yt.host,yt=yt.host),yt=yt.parentNode;return _e}const SideCar=exportSidecar(effectCar,RemoveScrollSideCar);var ReactRemoveScroll=reactExports.forwardRef(function(yt,_e){return reactExports.createElement(RemoveScroll,__assign$1({},yt,{ref:_e,sideCar:SideCar}))});ReactRemoveScroll.classNames=RemoveScroll.classNames;var getDefaultParent=function(yt){if(typeof document>"u")return null;var _e=Array.isArray(yt)?yt[0]:yt;return _e.ownerDocument.body},counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={},lockCount=0,unwrapHost=function(yt){return yt&&(yt.host||unwrapHost(yt.parentNode))},correctTargets=function(yt,_e){return _e.map(function($t){if(yt.contains($t))return $t;var Ft=unwrapHost($t);return Ft&&yt.contains(Ft)?Ft:(console.error("aria-hidden",$t,"in not contained inside",yt,". Doing nothing"),null)}).filter(function($t){return!!$t})},applyAttributeToOthers=function(yt,_e,$t,Ft){var Vt=correctTargets(_e,Array.isArray(yt)?yt:[yt]);markerMap[$t]||(markerMap[$t]=new WeakMap);var qt=markerMap[$t],zt=[],Ht=new Set,Kt=new Set(Vt),Gt=function(Xt){!Xt||Ht.has(Xt)||(Ht.add(Xt),Gt(Xt.parentNode))};Vt.forEach(Gt);var Jt=function(Xt){!Xt||Kt.has(Xt)||Array.prototype.forEach.call(Xt.children,function(Zt){if(Ht.has(Zt))Jt(Zt);else try{var er=Zt.getAttribute(Ft),tr=er!==null&&er!=="false",rr=(counterMap.get(Zt)||0)+1,ar=(qt.get(Zt)||0)+1;counterMap.set(Zt,rr),qt.set(Zt,ar),zt.push(Zt),rr===1&&tr&&uncontrolledNodes.set(Zt,!0),ar===1&&Zt.setAttribute($t,"true"),tr||Zt.setAttribute(Ft,"true")}catch(nr){console.error("aria-hidden: cannot operate on ",Zt,nr)}})};return Jt(_e),Ht.clear(),lockCount++,function(){zt.forEach(function(Xt){var Zt=counterMap.get(Xt)-1,er=qt.get(Xt)-1;counterMap.set(Xt,Zt),qt.set(Xt,er),Zt||(uncontrolledNodes.has(Xt)||Xt.removeAttribute(Ft),uncontrolledNodes.delete(Xt)),er||Xt.removeAttribute($t)}),lockCount--,lockCount||(counterMap=new WeakMap,counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={})}},hideOthers=function(yt,_e,$t){$t===void 0&&($t="data-aria-hidden");var Ft=Array.from(Array.isArray(yt)?yt:[yt]),Vt=getDefaultParent(yt);return Vt?(Ft.push.apply(Ft,Array.from(Vt.querySelectorAll("[aria-live], script"))),applyAttributeToOthers(Ft,Vt,$t,"aria-hidden")):function(){return null}},DIALOG_NAME="Dialog",[createDialogContext,createDialogScope]=createContextScope(DIALOG_NAME),[DialogProvider,useDialogContext]=createDialogContext(DIALOG_NAME),Dialog=yt=>{const{__scopeDialog:_e,children:$t,open:Ft,defaultOpen:Vt,onOpenChange:qt,modal:zt=!0}=yt,Ht=reactExports.useRef(null),Kt=reactExports.useRef(null),[Gt,Jt]=useControllableState({prop:Ft,defaultProp:Vt??!1,onChange:qt,caller:DIALOG_NAME});return jsxRuntimeExports.jsx(DialogProvider,{scope:_e,triggerRef:Ht,contentRef:Kt,contentId:u
vendor: 8,149 bytes, lines 348-372
348seId(),titleId:useId(),descriptionId:useId(),open:Gt,onOpenChange:Jt,onOpenToggle:reactExports.useCallback(()=>Jt(Xt=>!Xt),[Jt]),modal:zt,children:$t})};Dialog.displayName=DIALOG_NAME;var TRIGGER_NAME="DialogTrigger",DialogTrigger=reactExports.forwardRef((yt,_e)=>{const{__scopeDialog:$t,...Ft}=yt,Vt=useDialogContext(TRIGGER_NAME,$t),qt=useComposedRefs(_e,Vt.triggerRef);return jsxRuntimeExports.jsx(Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":Vt.open,"aria-controls":Vt.contentId,"data-state":getState(Vt.open),...Ft,ref:qt,onClick:composeEventHandlers(yt.onClick,Vt.onOpenToggle)})});DialogTrigger.displayName=TRIGGER_NAME;var PORTAL_NAME="DialogPortal",[PortalProvider,usePortalContext]=createDialogContext(PORTAL_NAME,{forceMount:void 0}),DialogPortal=yt=>{const{__scopeDialog:_e,forceMount:$t,children:Ft,container:Vt}=yt,qt=useDialogContext(PORTAL_NAME,_e);return jsxRuntimeExports.jsx(PortalProvider,{scope:_e,forceMount:$t,children:reactExports.Children.map(Ft,zt=>jsxRuntimeExports.jsx(Presence,{present:$t||qt.open,children:jsxRuntimeExports.jsx(Portal$1,{asChild:!0,container:Vt,children:zt})}))})};DialogPortal.displayName=PORTAL_NAME;var OVERLAY_NAME="DialogOverlay",DialogOverlay=reactExports.forwardRef((yt,_e)=>{const $t=usePortalContext(OVERLAY_NAME,yt.__scopeDialog),{forceMount:Ft=$t.forceMount,...Vt}=yt,qt=useDialogContext(OVERLAY_NAME,yt.__scopeDialog);return qt.modal?jsxRuntimeExports.jsx(Presence,{present:Ft||qt.open,children:jsxRuntimeExports.jsx(DialogOverlayImpl,{...Vt,ref:_e})}):null});DialogOverlay.displayName=OVERLAY_NAME;var Slot=createSlot("DialogOverlay.RemoveScroll"),DialogOverlayImpl=reactExports.forwardRef((yt,_e)=>{const{__scopeDialog:$t,...Ft}=yt,Vt=useDialogContext(OVERLAY_NAME,$t);return jsxRuntimeExports.jsx(ReactRemoveScroll,{as:Slot,allowPinchZoom:!0,shards:[Vt.contentRef],children:jsxRuntimeExports.jsx(Primitive.div,{"data-state":getState(Vt.open),...Ft,ref:_e,style:{pointerEvents:"auto",...Ft.style}})})}),CONTENT_NAME="DialogContent",DialogContent=reactExports.forwardRef((yt,_e)=>{const $t=usePortalContext(CONTENT_NAME,yt.__scopeDialog),{forceMount:Ft=$t.forceMount,...Vt}=yt,qt=useDialogContext(CONTENT_NAME,yt.__scopeDialog);return jsxRuntimeExports.jsx(Presence,{present:Ft||qt.open,children:qt.modal?jsxRuntimeExports.jsx(DialogContentModal,{...Vt,ref:_e}):jsxRuntimeExports.jsx(DialogContentNonModal,{...Vt,ref:_e})})});DialogContent.displayName=CONTENT_NAME;var DialogContentModal=reactExports.forwardRef((yt,_e)=>{const $t=useDialogContext(CONTENT_NAME,yt.__scopeDialog),Ft=reactExports.useRef(null),Vt=useComposedRefs(_e,$t.contentRef,Ft);return reactExports.useEffect(()=>{const qt=Ft.current;if(qt)return hideOthers(qt)},[]),jsxRuntimeExports.jsx(DialogContentImpl,{...yt,ref:Vt,trapFocus:$t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:composeEventHandlers(yt.onCloseAutoFocus,qt=>{var zt;qt.preventDefault(),(zt=$t.triggerRef.current)==null||zt.focus()}),onPointerDownOutside:composeEventHandlers(yt.onPointerDownOutside,qt=>{const zt=qt.detail.originalEvent,Ht=zt.button===0&&zt.ctrlKey===!0;(zt.button===2||Ht)&&qt.preventDefault()}),onFocusOutside:composeEventHandlers(yt.onFocusOutside,qt=>qt.preventDefault())})}),DialogContentNonModal=reactExports.forwardRef((yt,_e)=>{const $t=useDialogContext(CONTENT_NAME,yt.__scopeDialog),Ft=reactExports.useRef(!1),Vt=reactExports.useRef(!1);return jsxRuntimeExports.jsx(DialogContentImpl,{...yt,ref:_e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:qt=>{var zt,Ht;(zt=yt.onCloseAutoFocus)==null||zt.call(yt,qt),qt.defaultPrevented||(Ft.current||(Ht=$t.triggerRef.current)==null||Ht.focus(),qt.preventDefault()),Ft.current=!1,Vt.current=!1},onInteractOutside:qt=>{var Kt,Gt;(Kt=yt.onInteractOutside)==null||Kt.call(yt,qt),qt.defaultPrevented||(Ft.current=!0,qt.detail.originalEvent.type==="pointerdown"&&(Vt.current=!0));const zt=qt.target;((Gt=$t.triggerRef.current)==null?void 0:Gt.contains(zt))&&qt.preventDefault(),qt.detail.originalEvent.type==="focusin"&&Vt.current&&qt.preventDefault()}})}),DialogContentImpl=reactExports.forwardRef((yt,_e)=>{const{__scopeDialog:$t,trapFocus:Ft,onOpenAutoFocus:Vt,onCloseAutoFocus:qt,...zt}=yt,Ht=useDialogContext(CONTENT_NAME,$t),Kt=reactExports.useRef(null),Gt=useComposedRefs(_e,Kt);return useFocusGuards(),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FocusScope,{asChild:!0,loop:!0,trapped:Ft,onMountAutoFocus:Vt,onUnmountAutoFocus:qt,children:jsxRuntimeExports.jsx(DismissableLayer,{role:"dialog",id:Ht.contentId,"aria-describedby":Ht.descriptionId,"aria-labelledby":Ht.titleId,"data-state":getState(Ht.open),...zt,ref:Gt,onDismiss:()=>Ht.onOpenChange(!1)})}),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TitleWarning,{titleId:Ht.titleId}),jsxRuntimeExports.jsx(DescriptionWarning,{contentRef:Kt,descriptionId:Ht.descriptionId})]})]})}),TITLE_NAME="DialogTitle",DialogTitle=reactExports.forwardRef((yt,_e)=>{const{__scopeDialog:$t,...Ft}=yt,Vt=useDialogContext(TITLE_NAME,$t);return jsxRuntimeExports.jsx(Primitive.h2,{id:Vt.titleId,...Ft,ref:_e})});DialogTitle.displayName=TITLE_NAME;var DESCRIPTION_NAME="DialogDescription",DialogDescription=reactExports.forwardRef((yt,_e)=>{const{__scopeDialog:$t,...Ft}=yt,Vt=useDialogContext(DESCRIPTION_NAME,$t);return jsxRuntimeExports.jsx(Primitive.p,{id:Vt.descriptionId,...Ft,ref:_e})});DialogDescription.displayName=DESCRIPTION_NAME;var CLOSE_NAME="DialogClose",DialogClose=reactExports.forwardRef((yt,_e)=>{const{__scopeDialog:$t,...Ft}=yt,Vt=useDialogContext(CLOSE_NAME,$t);return jsxRuntimeExports.jsx(Primitive.button,{type:"button",...Ft,ref:_e,onClick:composeEventHandlers(yt.onClick,()=>Vt.onOpenChange(!1))})});DialogClose.displayName=CLOSE_NAME;function getState(yt){return yt?"open":"closed"}var TITLE_WARNING_NAME="DialogTitleWarning",[WarningProvider,useWarningContext]=createContext2(TITLE_WARNING_NAME,{contentName:CONTENT_NAME,titleName:TITLE_NAME,docsSlug:"dialog"}),TitleWarning=({titleId:yt})=>{const _e=useWarningContext(TITLE_WARNING_NAME),$t=`\`${_e.contentName}\` requires a \`${_e.titleName}\` for the component to be accessible for screen reader users. 349 350If you want to hide the \`${_e.titleName}\`, you can wrap it with our VisuallyHidden component. 351 352For more information, see https://radix-ui.com/primitives/docs/components/${_e.docsSlug}`;return reactExports.useEffect(()=>{yt&&(document.getElementById(yt)||console.error($t))},[$t,yt]),null},DESCRIPTION_WARNING_NAME="DialogDescriptionWarning",DescriptionWarning=({contentRef:yt,descriptionId:_e})=>{const Ft=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;return reactExports.useEffect(()=>{var qt;const Vt=(qt=yt.current)==null?void 0:qt.getAttribute("aria-describedby");_e&&Vt&&(document.getElementById(_e)||console.warn(Ft))},[Ft,yt,_e]),null},Root=Dialog,Portal=DialogPortal,Overlay=DialogOverlay,Content=DialogContent,Close=DialogClose,useMedia=()=>{const[yt,_e]=reactExports.useState("desktop");return reactExports.useEffect(()=>{const $t=window.matchMedia("(max-width: 768px)"),Ft=Vt=>_e(Vt.matches?"mobile":"desktop");return Ft($t),$t.addEventListener("change",Ft),()=>{$t.removeEventListener("change",Ft)}},[]),yt},useMedia_default=useMedia,styles_default=`/* TODO: Use an alternative to avoid the extra request to Google (e.g. hosting ourselves, or local file) */ 353@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;600;700&family=Sora:wght@600&display=swap'); 354/* ! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com */ 355/* 3561. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) 3572. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) 358*/ 359*, 360::before, 361::after { 362 box-sizing: border-box; /* 1 */ 363 border-width: 0; /* 2 */ 364 border-style: solid; /* 2 */ 365 border-color: #e5e7eb; /* 2 */ 366} 367::before, 368::after { 369 --tw-content: ''; 370} 371/* 3721. Use a consistent sensible line-height in all browsers.
3732. Prevent adjustments of font size after orientation changes in iOS. 3743. Use a more readable tab size. 3754. Use the user's configured \`sans\` font-family by default. 3765. Use the user's configured \`sans\` font-feature-settings by default. 3776. Use the user's configured \`sans\` font-variation-settings by default. 3787. Disable tap highlights on iOS 379*/ 380html, 381:host { 382 line-height: 1.5; /* 1 */ 383 -webkit-text-size-adjust: 100%; /* 2 */ 384 -moz-tab-size: 4; /* 3 */ 385 -o-tab-size: 4; 386 tab-size: 4; /* 3 */ 387 font-family: Rubik, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */ 388 font-feature-settings: normal; /* 5 */ 389 font-variation-settings: normal; /* 6 */ 390 -webkit-tap-highlight-color: transparent; /* 7 */ 391} 392/* 3931. Remove the margin in all browsers. 3942. Inherit line-height from \`html\` so users can set them as a class directly on the \`html\` element. 395*/ 396body { 397 margin: 0; /* 1 */ 398 line-height: inherit; /* 2 */ 399} 400/* 4011. Add the correct height in Firefox. 4022. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) 4033. Ensure horizontal rules are visible by default. 404*/ 405hr { 406 height: 0; /* 1 */ 407 color: inherit; /* 2 */ 408 border-top-width: 1px; /* 3 */ 409} 410/* 411Add the correct text decoration in Chrome, Edge, and Safari. 412*/ 413abbr:where([title]) { 414 -webkit-text-decoration: underline dotted; 415 text-decoration: underline dotted; 416} 417/* 418Remove the default font size and weight for headings. 419*/ 420h1, 421h2, 422h3, 423h4, 424h5, 425h6 { 426 font-size: inherit; 427 font-weight: inherit; 428} 429/* 430Reset links to optimize for opt-in styling instead of opt-out. 431*/ 432a { 433 color: inherit; 434 text-decoration: inherit; 435} 436/* 437Add the correct font weight in Edge and Safari. 438*/ 439b, 440strong { 441 font-weight: bolder; 442} 443/* 4441. Use the user's configured \`mono\` font-family by default. 4452. Use the user's configured \`mono\` font-feature-settings by default. 4463. Use the user's configured \`mono\` font-variation-settings by default. 4474. Correct the odd \`em\` font sizing in all browsers. 448*/ 449code, 450kbd, 451samp, 452pre { 453 font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */ 454 font-feature-settings: normal; /* 2 */ 455 font-variation-settings: normal; /* 3 */ 456 font-size: 1em; /* 4 */ 457} 458/* 459Add the correct font size in all browsers. 460*/ 461small { 462 font-size: 80%; 463} 464/* 465Prevent \`sub\` and \`sup\` elements from affecting the line height in all browsers. 466*/ 467sub, 468sup { 469 font-size: 75%; 470 line-height: 0; 471 position: relative; 472 vertical-align: baseline; 473} 474sub { 475 bottom: -0.25em; 476} 477sup { 478 top: -0.5em; 479} 480/* 4811. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) 4822. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) 4833. Remove gaps between table borders by default. 484*/ 485table { 486 text-indent: 0; /* 1 */ 487 border-color: inherit; /* 2 */ 488 border-collapse: collapse; /* 3 */ 489} 490/* 4911. Change the font styles in all browsers. 4922. Remove the margin in Firefox and Safari. 4933. Remove default padding in all browsers. 494*/ 495button, 496input, 497optgroup, 498select, 499textarea { 500 font-family: inherit; /* 1 */ 501 font-feature-settings: inherit; /* 1 */ 502 font-variation-settings: inherit; /* 1 */ 503 font-size: 100%; /* 1 */ 504 font-weight: inherit; /* 1 */ 505 line-height: inherit; /* 1 */ 506 letter-spacing: inherit; /* 1 */ 507 color: inherit; /* 1 */ 508 margin: 0; /* 2 */ 509 padding: 0; /* 3 */ 510} 511/* 512Remove the inheritance of text transform in Edge and Firefox. 513*/ 514button, 515select { 516 text-transform: none; 517} 518/* 5191. Correct the inability to style clickable types in iOS and Safari. 5202. Remove default button styles. 521*/ 522button, 523input:where([type='button']), 524input:where([type='reset']), 525input:where([type='submit']) { 526 -webkit-appearance: button; /* 1 */ 527 background-color: transparent; /* 2 */ 528 background-image: none; /* 2 */ 529} 530/* 531Use the modern Firefox focus style for all focusable elements. 532*/ 533:-moz-focusring { 534 outline: auto; 535} 536/* 537Remove the additional \`:invalid\` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) 538*/ 539:-moz-ui-invalid { 540 box-shadow: none; 541} 542/* 543Add the correct vertical alignment in Chrome and Firefox. 544*/ 545progress { 546 vertical-align: baseline; 547} 548/* 549Correct the cursor style of increment and decrement buttons in Safari. 550*/ 551::-webkit-inner-spin-button, 552::-webkit-outer-spin-button { 553 height: auto; 554} 555/* 5561. Correct the odd appearance in Chrome and Safari. 5572. Correct the outline style in Safari. 558*/ 559[type='search'] { 560 -webkit-appearance: textfield; /* 1 */ 561 outline-offset: -2px; /* 2 */ 562} 563/* 564Remove the inner padding in Chrome and Safari on macOS. 565*/ 566::-webkit-search-decoration { 567 -webkit-appearance: none; 568} 569/* 5701. Correct the inability to style clickable types in iOS and Safari. 5712. Change font properties to \`inherit\` in Safari. 572*/ 573::-webkit-file-upload-button { 574 -webkit-appearance: button; /* 1 */ 575 font: inherit; /* 2 */ 576} 577/* 578Add the correct display in Chrome and Safari. 579*/ 580summary { 581 display: list-item; 582} 583/* 584Removes the default spacing and border for appropriate elements. 585*/ 586blockquote, 587dl, 588dd, 589h1, 590h2, 591h3, 592h4, 593h5, 594h6, 595hr, 596figure, 597p, 598pre { 599 margin: 0; 600} 601fieldset { 602 margin: 0; 603 padding: 0; 604} 605legend { 606 padding: 0; 607} 608ol, 609ul, 610menu { 611 list-style: none; 612 margin: 0; 613 padding: 0; 614} 615/* 616Reset default styling for dialogs. 617*/ 618dialog { 619 padding: 0; 620} 621/* 622Prevent resizing textareas horizontally by default. 623*/ 624textarea { 625 resize: vertical; 626} 627/* 6281. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) 6292. Set the default placeholder color to the user's configured gray 400 color. 630*/ 631input::-moz-placeholder, textarea::-moz-placeholder { 632 opacity: 1; /* 1 */ 633 color: #9ca3af; /* 2 */ 634} 635input::placeholder, 636textarea::placeholder { 637 opacity: 1; /* 1 */ 638 color: #9ca3af; /* 2 */ 639} 640/* 641Set the default cursor for buttons. 642*/ 643button, 644[role="button"] { 645 cursor: pointer; 646} 647/* 648Make sure disabled buttons don't get the pointer cursor. 649*/ 650:disabled { 651 cursor: default; 652} 653/* 6541. Make replaced elements \`display: block\` by default. (https://github.com/mozdevs/cssremedy/issues/14) 6552. Add \`vertical-align: middle\` to align replaced elements more sensibly by default. (https://github.com/je
655nsimmons/cssremedy/issues/14#issuecomment-634934210) 656 This can trigger a poorly considered lint error in some tools but is included by design. 657*/ 658img, 659svg, 660video, 661canvas, 662audio, 663iframe, 664embed, 665object { 666 display: block; /* 1 */ 667 vertical-align: middle; /* 2 */ 668} 669/* 670Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) 671*/ 672img, 673video { 674 max-width: 100%; 675 height: auto; 676} 677/* Make elements with the HTML hidden attribute stay hidden by default */ 678[hidden] { 679 display: none; 680} 681[type='text'],input:where(:not([type])),[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select{ 682 -webkit-appearance: none; 683 -moz-appearance: none; 684 appearance: none; 685 background-color: #fff; 686 border-color: #6b7280; 687 border-width: 1px; 688 border-radius: 0px; 689 padding-top: 0.5rem; 690 padding-right: 0.75rem; 691 padding-bottom: 0.5rem; 692 padding-left: 0.75rem; 693 font-size: 1rem; 694 line-height: 1.5rem; 695 --tw-shadow: 0 0 #0000; 696} 697[type='text']:focus, input:where(:not([type])):focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus{ 698 outline: 2px solid transparent; 699 outline-offset: 2px; 700 --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); 701 --tw-ring-offset-width: 0px; 702 --tw-ring-offset-color: #fff; 703 --tw-ring-color: #2563eb; 704 --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); 705 --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); 706 box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
706dow); 707 border-color: #2563eb; 708} 709input::-moz-placeholder, textarea::-moz-placeholder{ 710 color: #6b7280; 711 opacity: 1; 712} 713input::placeholder,textarea::placeholder{ 714 color: #6b7280; 715 opacity: 1; 716} 717::-webkit-datetime-edit-fields-wrapper{ 718 padding: 0; 719} 720::-webkit-date-and-time-value{ 721 min-height: 1.5em; 722 text-align: inherit; 723} 724::-webkit-datetime-edit{ 725 display: inline-flex; 726} 727::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{ 728 padding-top: 0; 729 padding-bottom: 0; 730} 731select{ 732 background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); 733 background-position: right 0.5rem center; 734 background-repeat: no-repeat; 735 background-size: 1.5em 1.5em; 736 padding-right: 2.5rem; 737 -webkit-print-color-adjust: exact; 738 print-color-adjust: exact; 739} 740[multiple],[size]:where(select:not([size="1"])){ 741 background-image: initial; 742 background-position: initial; 743 background-repeat: unset; 744 background-size: initial; 745 padding-right: 0.75rem; 746 -webkit-print-color-adjust: unset; 747 print-color-adjust: unset; 748} 749[type='checkbox'],[type='radio']{ 750 -webkit-appearance: none; 751 -moz-appearance: none; 752 appearance: none; 753 padding: 0; 754 -webkit-print-color-adjust: exact; 755 print-color-adjust: exact; 756 display: inline-block; 757 vertical-align: middle; 758 background-origin: border-box; 759 -webkit-user-select: none; 760 -moz-user-select: none; 761 user-select: none; 762 flex-shrink: 0; 763 height: 1rem; 764 width: 1rem; 765 color: #2563eb; 766 background-color: #fff; 767 border-color: #6b7280; 768 border-width: 1px; 769 --tw-shadow: 0 0 #0000; 770} 771[type='checkbox']{ 772 border-radius: 0px; 773} 774[type='radio']{ 775 border-radius: 100%; 776} 777[type='checkbox']:focus,[type='radio']:focus{ 778 outline: 2px solid transparent; 779 outline-offset: 2px; 780 --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); 781 --tw-ring-offset-width: 2px; 782 --tw-ring-offset-color: #fff; 783 --tw-ring-color: #2563eb; 784 --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); 785 --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); 786 box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
786dow); 787} 788[type='checkbox']:checked,[type='radio']:checked{ 789 border-color: transparent; 790 background-color: currentColor; 791 background-size: 100% 100%; 792 background-position: center; 793 background-repeat: no-repeat; 794} 795[type='checkbox']:checked{ 796 background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); 797} 798@media (forced-colors: active) { 799 [type='checkbox']:checked{ 800 -webkit-appearance: auto; 801 -moz-appearance: auto; 802 appearance: auto; 803 } 804} 805[type='radio']:checked{ 806 background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); 807} 808@media (forced-colors: active) { 809 [type='radio']:checked{ 810 -webkit-appearance: auto; 811 -moz-appearance: auto; 812 appearance: auto; 813 } 814} 815[type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus{ 816 border-color: transparent; 817 background-color: currentColor; 818} 819[type='checkbox']:indeterminate{ 820 background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e"); 821 border-color: transparent; 822 background-color: currentColor; 823 background-size: 100% 100%; 824 background-position: center; 825 background-repeat: no-repeat; 826} 827@media (forced-colors: active) { 828 [type='checkbox']:indeterminate{ 829 -webkit-appearance: auto; 830 -moz-appearance: auto; 831 appearance: auto; 832 } 833} 834[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus{ 835 border-color: transparent; 836 background-color: currentColor; 837} 838[type='file']{ 839 background: unset; 840 border-color: inherit; 841 border-width: 0; 842 border-radius: 0; 843 padding: 0; 844 font-size: unset; 845 line-height: inherit; 846} 847[type='file']:focus{ 848 outline: 1px solid ButtonText; 849 outline: 1px auto -webkit-focus-ring-color; 850} 851*, ::before, ::after{ 852 --tw-border-spacing-x: 0; 853 --tw-border-spacing-y: 0; 854 --tw-translate-x: 0; 855 --tw-translate-y: 0; 856 --tw-rotate: 0; 857 --tw-skew-x: 0; 858 --tw-skew-y: 0; 859 --tw-scale-x: 1; 860 --tw-scale-y: 1; 861 --tw-pan-x: ; 862 --tw-pan-y: ; 863 --tw-pinch-zoom: ; 864 --tw-scroll-snap-strictness: proximity; 865 --tw-gradient-from-position: ; 866 --tw-gradient-via-position: ; 867 --tw-gradient-to-position: ; 868 --tw-ordinal: ; 869 --tw-slashed-zero: ; 870 --tw-numeric-figure: ; 871 --tw-numeric-spacing: ; 872 --tw-numeric-fraction: ; 873 --tw-ring-inset: ; 874 --tw-ring-offset-width: 0px; 875 --tw-ring-offset-color: #fff; 876 --tw-ring-color: rgb(59 130 246 / 0.5); 877 --tw-ring-offset-shadow: 0 0 #0000; 878 --tw-ring-shadow: 0 0 #0000; 879 --tw-shadow: 0 0 #0000; 880 --tw-shadow-colored: 0 0 #0000; 881 --tw-blur: ; 882 --tw-brightness: ; 883 --tw-contrast: ; 884 --tw-grayscale: ; 885 --tw-hue-rotate: ; 886 --tw-invert: ; 887 --tw-saturate: ; 888 --tw-sepia: ; 889 --tw-drop-shadow: ; 890 --tw-backdrop-blur: ; 891 --tw-backdrop-brightness: ; 892 --tw-backdrop-contrast: ; 893 --tw-backdrop-grayscale: ; 894 --tw-backdrop-hue-rotate: ; 895 --tw-backdrop-invert: ; 896 --tw-backdrop-opacity: ; 897 --tw-backdrop-saturate: ; 898 --tw-backdrop-sepia: ; 899 --tw-contain-size: ; 900 --tw-contain-layout: ; 901 --tw-contain-paint: ; 902 --tw-contain-style: ; 903} 904::backdrop{ 905 --tw-border-spacing-x: 0; 906 --tw-border-spacing-y: 0; 907 --tw-translate-x: 0; 908 --tw-translate-y: 0; 909 --tw-rotate: 0; 910 --tw-skew-x: 0; 911 --tw-skew-y: 0; 912 --tw-scale-x: 1; 913 --tw-scale-y: 1; 914 --tw-pan-x: ; 915 --tw-pan-y: ; 916 --tw-pinch-zoom: ; 917 --tw-scroll-snap-strictness: proximity; 918 --tw-gradient-from-position: ; 919 --tw-gradient-via-position: ; 920 --tw-gradient-to-position: ; 921 --tw-ordinal: ; 922 --tw-slashed-zero: ; 923 --tw-numeric-figure: ; 924 --tw-numeric-spacing: ; 925 --tw-numeric-fraction: ; 926 --tw-ring-inset: ; 927 --tw-ring-offset-width: 0px; 928 --tw-ring-offset-color: #fff; 929 --tw-ring-color: rgb(59 130 246 / 0.5); 930 --tw-ring-offset-shadow: 0 0 #0000; 931 --tw-ring-shadow: 0 0 #0000; 932 --tw-shadow: 0 0 #0000; 933 --tw-shadow-colored: 0 0 #0000; 934 --tw-blur: ; 935 --tw-brightness: ; 936 --tw-contrast: ; 937 --tw-grayscale: ; 938 --tw-hue-rotate: ; 939 --tw-invert: ; 940 --tw-saturate: ; 941 --tw-sepia: ; 942 --tw-drop-shadow: ; 943 --tw-backdrop-blur: ; 944 --tw-backdrop-brightness: ; 945 --tw-backdrop-contrast: ; 946 --tw-backdrop-grayscale: ; 947 --tw-backdrop-hue-rotate: ; 948 --tw-backdrop-invert: ; 949 --tw-backdrop-opacity: ; 950 --tw-backdrop-saturate: ; 951 --tw-backdrop-sepia: ; 952 --tw-contain-size: ; 953 --tw-contain-layout: ; 954 --tw-contain-paint: ; 955 --tw-contain-style: ; 956} 957.visible{ 958 visibility: visible; 959} 960.fixed{ 961 position: fixed; 962} 963.absolute{ 964 position: absolute; 965} 966.relative{ 967 position: relative; 968} 969.inset-0{ 970 inset: 0; 971} 972.z-10{ 973 z-index: 10; 974} 975.z-50{ 976 z-index: 50; 977} 978.mx-6{ 979 margin-left: 24px; 980 margin-right: 24px; 981} 982.mx-auto{ 983 margin-left: auto; 984 margin-right: auto; 985} 986.-mt-5{ 987 margin-top: -20px; 988} 989.-mt-6{ 990 margin-top: -24px; 991} 992.mb-10{ 993 margin-bottom: 40px; 994} 995.mb-12{ 996 margin-bottom: 48px; 997} 998.mb-3{ 999 margin-bottom: 12px; 1000} 1001.mb-4{ 1002 margin-bottom: 16px; 1003} 1004.mb-6{ 1005 margin-bottom: 24px; 1006} 1007.mr-1{ 1008 margin-right: 4px; 1009} 1010.mr-1\\.5{ 1011 margin-right: 6px; 1012} 1013.mt-2{ 1014 margin-top: 8px; 1015} 1016.mt-3{ 1017 margin-top: 12px; 1018} 1019.mt-4{ 1020 margin-top: 16px; 1021} 1022.flex{ 1023 display: flex; 1024} 1025.inline-flex{ 1026 display: inline-flex; 1027} 1028.hidden{ 1029 display: none; 1030} 1031.size-5{
1032 width: 20px; 1033 height: 20px; 1034} 1035.size-6{ 1036 width: 24px; 1037 height: 24px; 1038} 1039.size-\\[244px\\]{ 1040 width: 244px; 1041 height: 244px; 1042} 1043.h-10{ 1044 height: 40px; 1045} 1046.h-24{ 1047 height: 96px; 1048} 1049.min-h-full{ 1050 min-height: 100%; 1051} 1052.min-h-screen{ 1053 min-height: 100vh; 1054} 1055.w-24{ 1056 width: 96px; 1057} 1058.w-4{ 1059 width: 16px; 1060} 1061.w-full{ 1062 width: 100%; 1063} 1064.max-w-\\[224px\\]{ 1065 max-width: 224px; 1066} 1067.flex-1{ 1068 flex: 1 1 0%; 1069} 1070@keyframes pulse{ 1071 50%{ 1072 opacity: .5; 1073 } 1074} 1075.animate-pulse{ 1076 animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; 1077} 1078@keyframes spin{ 1079 to{ 1080 transform: rotate(360deg); 1081 } 1082} 1083.animate-spin{ 1084 animation: spin 1s linear infinite; 1085} 1086.cursor-pointer{ 1087 cursor: pointer; 1088} 1089.flex-col{ 1090 flex-direction: column; 1091} 1092.items-end{ 1093 align-items: flex-end; 1094} 1095.items-center{ 1096 align-items: center; 1097} 1098.justify-center{ 1099 justify-content: center; 1100} 1101.justify-between{ 1102 justify-content: space-between; 1103} 1104.gap-1{ 1105 gap: 4px; 1106} 1107.space-x-2 > :not([hidden]) ~ :not([hidden]){ 1108 --tw-space-x-reverse: 0; 1109 margin-right: calc(8px * var(--tw-space-x-reverse)); 1110 margin-left: calc(8px * calc(1 - var(--tw-space-x-reverse))); 1111} 1112.space-x-4 > :not([hidden]) ~ :not([hidden]){ 1113 --tw-space-x-reverse: 0; 1114 margin-right: calc(16px * var(--tw-space-x-reverse)); 1115 margin-left: calc(16px * calc(1 - var(--tw-space-x-reverse))); 1116} 1117.space-y-10 > :not([hidden]) ~ :not([hidden]){ 1118 --tw-space-y-reverse: 0; 1119 margin-top: calc(40px * calc(1 - var(--tw-space-y-reverse))); 1120 margin-bottom: calc(40px * var(--tw-space-y-reverse)); 1121} 1122.space-y-4 > :not([hidden]) ~ :not([hidden]){ 1123 --tw-space-y-reverse: 0; 1124 margin-top: calc(16px * calc(1 - var(--tw-space-y-reverse))); 1125 margin-bottom: calc(16px * var(--tw-space-y-reverse)); 1126} 1127.space-y-5 > :not([hidden]) ~ :not([hidden]){ 1128 --tw-space-y-reverse: 0; 1129 margin-top: calc(20px * calc(1 - var(--tw-space-y-reverse))); 1130 margin-bottom: calc(20px * var(--tw-space-y-reverse)); 1131} 1132.space-y-6 > :not([hidden]) ~ :not([hidden]){ 1133 --tw-space-y-reverse: 0; 1134 margin-top: calc(24px * calc(1 - var(--tw-space-y-reverse))); 1135 margin-bottom: calc(24px * var(--tw-space-y-reverse)); 1136} 1137.space-y-8 > :not([hidden]) ~ :not([hidden]){ 1138 --tw-space-y-reverse: 0; 1139 margin-top: calc(32px * calc(1 - var(--tw-space-y-reverse))); 1140 margin-bottom: calc(32px * var(--tw-space-y-reverse)); 1141} 1142.overflow-y-hidden{ 1143 overflow-y: hidden; 1144} 1145.rounded-2xl{ 1146 border-radius: 1rem; 1147} 1148.rounded-full{ 1149 border-radius: 9999px; 1150} 1151.rounded-lg{ 1152 border-radius: 0.5rem; 1153} 1154.border{ 1155 border-width: 1px; 1156} 1157.border-t{ 1158 border-top-width: 1px; 1159} 1160.border-ebecef{ 1161 --tw-border-opacity: 1; 1162 border-color: rgb(235 236 239 / var(--tw-border-opacity)); 1163} 1164.border-f1f5f8{ 1165 --tw-border-opacity: 1; 1166 border-color: rgb(241 245 248 / var(--tw-border-opacity)); 1167} 1168.border-f5f5f7{ 1169 --tw-border-opacity: 1; 1170 border-color: rgb(245 245 247 / var(--tw-border-opacity)); 1171} 1172.border-transparent{ 1173 border-color: transparent; 1174} 1175.bg-0d151d{ 1176 --tw-bg-opacity: 1; 1177 background-color: rgb(13 21 29 / var(--tw-bg-opacity)); 1178} 1179.bg-black\\/50{ 1180 background-color: rgb(0 0 0 / 0.5); 1181} 1182.bg-transparent{ 1183 background-color: transparent; 1184} 1185.bg-white{ 1186 --tw-bg-opacity: 1; 1187 background-color: rgb(255 255 255 / var(--tw-bg-opacity)); 1188} 1189.p-2{ 1190 padding: 8px; 1191} 1192.p-4{ 1193 padding: 16px; 1194} 1195.p-7{ 1196 padding: 28px; 1197} 1198.px-2{ 1199 padding-left: 8px; 1200 padding-right: 8px; 1201} 1202.px-8{ 1203 padding-left: 32px; 1204 padding-right: 32px; 1205} 1206.py-1{ 1207 padding-top: 4px; 1208 padding-bottom: 4px; 1209} 1210.py-3{ 1211 padding-top: 12px; 1212 padding-bottom: 12px; 1213} 1214.pt-6{ 1215 padding-top: 24px; 1216} 1217.text-center{ 1218 text-align: center; 1219} 1220.font-sans{ 1221 font-family: Rubik, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; 1222} 1223.font-sora{ 1224 font-family: Sora, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; 1225} 1226.text-2xl{ 1227 font-size: 24px; 1228 line-height: 32px; 1229} 1230.text-lg{ 1231 font-size: 18px; 1232 line-height: 28px; 1233} 1234.text-sm{ 1235 font-size: 14px; 1236 line-height: 20px; 1237} 1238.text-xs{ 1239 font-size: 12px; 1240 line-height: 16px; 1241} 1242.font-bold{ 1243 font-weight: 700; 1244} 1245.font-medium{ 1246 font-weight: 500; 1247} 1248.font-semibold{ 1249 font-weight: 600; 1250} 1251.text-0d151d{ 1252 --tw-text-opacity: 1; 1253 color: rgb(13 21 29 / var(--tw-text-opacity)); 1254} 1255.text-29343f{ 1256 --tw-text-opacity: 1; 1257 color: rgb(41 52 63 / var(--tw-text-opacity)); 1258} 1259.text-3c424b{ 1260 --tw-text-opacity: 1; 1261 color: rgb(60 66 75 / var(--tw-text-opacity)); 1262} 1263.text-657080{ 1264 --tw-text-opacity: 1; 1265 color: rgb(101 112 128 / var(--tw-text-opacity)); 1266} 1267.text-70868f{ 1268 --tw-text-opacity: 1; 1269 color: rgb(112 134 143 / var(--tw-text-opacity)); 1270} 1271.text-9ba3ae{ 1272 --tw-text-opacity: 1; 1273 color: rgb(155 163 174 / var(--tw-text-opacity)); 1274} 1275.text-9eafc0{ 1276 --tw-text-opacity: 1; 1277 color: rgb(158 175 192 / var(--tw-text-opacity)); 1278} 1279.text-black{ 1280 --tw-text-opacity: 1; 1281 color: rgb(0 0 0 / var(--tw-text-opacity)); 1282} 1283.text-gray-900{ 1284 --tw-text-opacity: 1; 1285 color: rgb(17 24 39 / var(--tw-text-opacity)); 1286} 1287.text-white{ 1288 --tw-text-opacity: 1; 1289 color: rgb(255 255 255 / var(--tw-text-opacity)); 1290} 1291.opacity-40{ 1292 opacity: 0.4; 1293} 1294.shadow{ 1295 --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
1296 --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); 1297 box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); 1298} 1299.shadow-sm{ 1300 --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); 1301 --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); 1302 box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); 1303} 1304.blur-lg{ 1305 --tw-blur: blur(16px); 1306 filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); 1307} 1308.filter{ 1309 filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); 1310} 1311.backdrop-blur-lg{ 1312 --tw-backdrop-blur: blur(16px); 1313 -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); 1314 backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); 1315} 1316.transition{ 1317 transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; 1318 transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; 1319 transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; 1320 transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); 1321 transition-duration: 150ms; 1322} 1323.duration-300{ 1324 transition-duration: 300ms; 1325} 1326.duration-500{ 1327 transition-duration: 500ms; 1328} 1329.ease-in-out{ 1330 transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); 1331} 1332input[type='number']::-webkit-inner-spin-button, 1333 input[type='number']::-webkit-outer-spin-button{ 1334 -webkit-appearance: none; 1335 appearance: none; 1336} 1337.hover\\:underline:hover{ 1338 text-decoration-line: underline; 1339} 1340.hover\\:shadow:hover{ 1341 --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
1342 --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); 1343 box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); 1344} 1345.focus\\:outline-none:focus{ 1346 outline: 2px solid transparent; 1347 outline-offset: 2px; 1348} 1349.focus\\:ring-2:focus{ 1350 --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); 1351 --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); 1352 box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); 1353} 1354.focus\\:ring-indigo-500:focus{ 1355 --tw-ring-opacity: 1; 1356 --tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity)); 1357} 1358.focus\\:ring-offset-2:focus{ 1359 --tw-ring-offset-width: 2px; 1360} 1361.focus-visible\\:ring:focus-visible{ 1362 --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); 1363 --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color); 1364 box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
1364dow, 0 0 #0000); 1365} 1366.focus-visible\\:ring-purple-500\\/75:focus-visible{ 1367 --tw-ring-color: rgb(168 85 247 / 0.75); 1368} 1369.disabled\\:cursor-not-allowed:disabled{ 1370 cursor: not-allowed; 1371} 1372.disabled\\:opacity-40:disabled{ 1373 opacity: 0.4; 1374} 1375@media (prefers-reduced-motion: reduce){ 1376 @keyframes spin{ 1377 to{ 1378 transform: rotate(360deg); 1379 } 1380 } 1381 .motion-reduce\\:animate-\\[spin_1\\.5s_linear_infinite\\]{ 1382 animation: spin 1.5s linear infinite; 1383 } 1384} 1385.dark\\:border-f1f5f8\\/10:is(.dark *){ 1386 border-color: rgb(241 245 248 / 0.1); 1387} 1388.dark\\:bg-0d151d:is(.dark *){ 1389 --tw-bg-opacity: 1; 1390 background-color: rgb(13 21 29 / var(--tw-bg-opacity)); 1391} 1392.dark\\:bg-white:is(.dark *){ 1393 --tw-bg-opacity: 1; 1394 background-color: rgb(255 255 255 / var(--tw-bg-opacity)); 1395} 1396.dark\\:text-0d151d:is(.dark *){ 1397 --tw-text-opacity: 1; 1398 color: rgb(13 21 29 / var(--tw-text-opacity)); 1399} 1400.dark\\:text-9eafc0:is(.dark *){ 1401 --tw-text-opacity: 1; 1402 color: rgb(158 175 192 / var(--tw-text-opacity)); 1403} 1404.dark\\:text-white:is(.dark *){ 1405 --tw-text-opacity: 1; 1406 color: rgb(255 255 255 / var(--tw-text-opacity)); 1407} 1408@media (min-width: 768px){ 1409 .md\\:mt-2{ 1410 margin-top: 8px; 1411 } 1412 .md\\:hidden{ 1413 display: none; 1414 } 1415 .md\\:min-h-\\[35rem\\]{ 1416 min-height: 35rem; 1417 } 1418 .md\\:max-w-md{ 1419 max-width: 448px; 1420 } 1421 .md\\:items-center{ 1422 align-items: center; 1423 } 1424 .md\\:overflow-y-auto{ 1425 overflow-y: auto; 1426 } 1427 .md\\:rounded-2xl{ 1428 border-radius: 1rem; 1429 } 1430 .md\\:rounded-b-2xl{ 1431 border-bottom-right-radius: 1rem; 1432 border-bottom-left-radius: 1rem; 1433 } 1434 .md\\:p-4{ 1435 padding: 16px; 1436 } 1437} 1438`,Styles=()=>jsxRuntimeExports.jsx("style",{children:styles_default}),Styles_default=Styles,XMarkIcon=yt=>jsxRuntimeExports.jsx("svg",{...yt,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m16.243 7.758-8.485 8.485m8.485 0L7.758 7.758"})}),XMarkIcon_default=XMarkIcon,ErrorIcon=yt=>jsxRuntimeExports.jsxs("svg",{...yt,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 100 100",children:[jsxRuntimeExports.jsx("circle",{cx:"50",cy:"50",r:"49.375",fill:"url(#a)",fillOpacity:".65",stroke:"url(#b)",strokeWidth:"1.25"}),jsxRuntimeExports.jsxs("g",{filter:"url(#c)",children:[jsxRuntimeExports.jsx("circle",{cx:"50",cy:"50",r:"35",fill:"#fff"}),jsxRuntimeExports.jsx("circle",{cx:"50",cy:"50",r:"34.432",stroke:"#FFC9AD",strokeWidth:"1.136"})]}),jsxRuntimeExports.jsx("path",{stroke:"#FF4732",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3.75",d:"m57.5 42.5-15 14.999m15 .001-15-14.999"}),jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("linearGradient",{id:"a",x1:"50",x2:"50",y1:"0",y2:"100",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#FFA483"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#FFA483",stopOpacity:"0"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"b",x1:"50",x2:"50",y1:"0",y2:"100",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#FFA483"}),jsxRuntimeExports.jsx("stop",{offset:".713",stopColor:"#FFA483",stopOpacity:"0"})]}),jsxRuntimeExports.jsxs("filter",{id:"c",width:"77.5",height:"77.5",x:"11.25",y:"13.125",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),jsxRuntimeExports.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),jsxRuntimeExports.jsx("feOffset",{dy:"1.875"}),jsxRuntimeExports.jsx("feGaussianBlur",{stdDeviation:"1.875"}),jsxRuntimeExports.jsx("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 0.788235 0 0 0 0 0.678431 0 0 0 0.45 0"}),jsxRuntimeExports.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_39_740"}),jsxRuntimeExports.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_39_740",result:"shape"})]})]})]}),ErrorIcon_default=ErrorIcon,ReloadIcon=yt=>jsxRuntimeExports.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...yt,children:jsxRuntimeExports.jsx("path",{d:"M12.3809 1.6665L13.3626 4.24214C12.3754 3.66434 11.2263 3.33317 9.99992 3.33317C6.31802 3.33317 3.33325 6.31794 3.33325 9.99984C3.33325 11.2141 3.6579 12.3526 4.22513 13.3332M7.61897 18.3332L6.63719 15.7575C7.62438 16.3353 8.77348 16.6665 9.99992 16.6665C13.6818 16.6665 16.6666 13.6817 16.6666 9.99984C16.6666 8.78555 16.3419 7.64708 15.7747 6.6665",stroke:"#3C424B",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),ReloadIcon_default=ReloadIcon,WarningIcon=yt=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 100 100",...yt,children:[jsxRuntimeExports.jsx("circle",{cx:"50",cy:"50",r:"49.375",fill:"url(#warning-a)",fillOpacity:".65",stroke:"url
1438(#warning-b)",strokeWidth:"1.25"}),jsxRuntimeExports.jsxs("g",{filter:"url(#warning-c)",children:[jsxRuntimeExports.jsx("circle",{cx:"50",cy:"50",r:"35",fill:"#fff"}),jsxRuntimeExports.jsx("circle",{cx:"50",cy:"50",r:"34.432",stroke:"#FFE999",strokeWidth:"1.136"})]}),jsxRuntimeExports.jsx("path",{fill:"#FFB200",fillRule:"evenodd",d:"M47.46 40.207c1.107-1.943 3.973-1.943 5.08 0l9.59 16.834c1.076 1.888-.324 4.209-2.54 4.209H40.41c-2.216 0-3.616-2.32-2.54-4.21l9.59-16.833Zm3.79 16.043a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Zm-.313-10a.937.937 0 1 0-1.875 0v6.25a.938.938 0 0 0 1.875 0v-6.25Z",clipRule:"evenodd"}),jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("linearGradient",{id:"warning-a",x1:"50",x2:"50",y1:"0",y2:"100",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#FFDA66"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#FFDA66",stopOpacity:"0"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"warning-b",x1:"50",x2:"50",y1:"0",y2:"100",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#FFDA66"}),jsxRuntimeExports.jsx("stop",{offset:".713",stopColor:"#FFDA66",stopOpacity:"0"})]}),jsxRuntimeExports.jsxs("filter",{id:"warning-c",width:"77.5",height:"77.5",x:"11.25",y:"13.125",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),jsxRuntimeExports.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),jsxRuntimeExports.jsx("feOffset",{dy:"1.875"}),jsxRuntimeExports.jsx("feGaussianBlur",{stdDeviation:"1.875"}),jsxRuntimeExports.jsx("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 0.913725 0 0 0 0 0.6 0 0 0 0.45 0"}),jsxRuntimeExports.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_39_758"}),jsxRuntimeExports.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_39_758",result:"shape"})]})]})]}),WarningIcon_default=WarningIcon,getParams=({retryFlow:yt,errorState:_e})=>({retryFlow:yt,errorState:_e}),ERROR_TITLES={[AppErrorCodes.GenericError]:__("Something went wrong"),[AppErrorCodes.FailedByHostApp]:__("Verification Declined"),[AppErrorCodes.VerificationRejected]:__("Request cancelled")},ERROR_MESSAGES={[AppErrorCodes.ConnectionFailed]:__("Connection to your wallet failed. Please try again."),[AppErrorCodes.VerificationRejected]:__("Youâve cancelled the request in World App."),[AppErrorCodes.MaxVerificationsReached]:__("You have already verified the maximum number of times for this action."),[AppErrorCodes.CredentialUnavailable]:__("It seems you do not have the verification level required by this app."),[AppErrorCodes.MalformedRequest]:__("There was a problem with this request. Please try again or contact the app owner."),[AppErrorCodes.InvalidNetwork]:__("Invalid network. If you are the app owner, visit docs.world.org/test for details."),[AppErrorCodes.InclusionProofFailed]:__("There was an issue fetching your credential. Please try again."),[AppErrorCodes.InclusionProofPending]:__("Your identity is still being registered. Please wait a few minutes and try again."),[AppErrorCodes.GenericError]:__("Something unexpected went wrong. Please try again."),[AppErrorCodes.UnexpectedResponse]:__("Unexpected response from your wallet. Please try again."),[AppErrorCodes.FailedByHostApp]:__("Verification failed by the app. Please contact the app owner for details.")},ErrorState=()=>{const{retryFlow:yt,errorState:_e}=idkit_default(getParams);return jsxRuntimeExports.jsxs("div",{className:"space-y-8",children:[jsxRuntimeExports.jsx("div",{className:"-mt-5 flex items-center justify-center",children:(_e==null?void 0:_e.code)==AppErrorCodes.VerificationRejected?jsxRuntimeExports.jsx(WarningIcon_default,{className:"w-24"}):jsxRuntimeExports.jsx(ErrorIcon_default,{className:"w-24"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"text-center text-2xl font-semibold text-gray-900 dark:text-white",children:((_e==null?void 0:_e.code)&&ERROR_TITLES[_e.code])??ERROR_TITLES[AppErrorCodes.GenericError]}),jsxRuntimeExports.jsx("p",{className:"mx-auto mt-2 max-w-[224px] text-center text-657080",children:(_e==null?void 0:_e.message)??ERROR_MESSAGES[(_e==null?void 0:_e.code)??AppErrorCodes.GenericError]})]}),jsxRuntimeExports.jsx("div",{className:"flex justify-center",children:jsxRuntimeExports.jsxs("button",{type:"button",onClick:yt,className:"inline-flex items-center rounded-lg border border-ebecef bg-transparent px-8 py-3 font-medium text-3c424b shadow-sm transition duration-300 hover:shadow focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-40",children:[jsxRuntimeExports.jsx(ReloadIcon_default,{className:"mr-1.5 size-5"}),__("Try Again")]})})]})},ErrorState_default=ErrorState,CheckIcon=yt=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 100 100",...yt,children:[jsxRuntimeExports.jsx("circle",{cx:"50",cy:"50",r:"49.375",fill:"url(#success-a)",fillOpacity:".65",stroke:"url
1438(#success-b)",strokeWidth:"1.25"}),jsxRuntimeExports.jsxs("g",{filter:"url(#success-c)",children:[jsxRuntimeExports.jsx("circle",{cx:"50",cy:"50",r:"35",fill:"#fff"}),jsxRuntimeExports.jsx("circle",{cx:"50",cy:"50",r:"34.432",stroke:"#CCEBCC",strokeWidth:"1.136"})]}),jsxRuntimeExports.jsx("path",{stroke:"#090",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3.75",d:"m41.25 52.5 4.375 4.375 13.125-13.75"}),jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("linearGradient",{id:"success-a",x1:"50",x2:"50",y1:"0",y2:"100",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#99D699"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#99D699",stopOpacity:"0"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"success-b",x1:"50",x2:"50",y1:"0",y2:"100",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#99D699"}),jsxRuntimeExports.jsx("stop",{offset:".713",stopColor:"#99D699",stopOpacity:"0"})]}),jsxRuntimeExports.jsxs("filter",{id:"success-c",width:"77.5",height:"77.5",x:"11.25",y:"13.125",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),jsxRuntimeExports.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),jsxRuntimeExports.jsx("feOffset",{dy:"1.875"}),jsxRuntimeExports.jsx("feGaussianBlur",{stdDeviation:"1.875"}),jsxRuntimeExports.jsx("feColorMatrix",{values:"0 0 0 0 0.8 0 0 0 0 0.921569 0 0 0 0 0.8 0 0 0 0.45 0"}),jsxRuntimeExports.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_39_712"}),jsxRuntimeExports.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_39_712",result:"shape"})]})]})]}),CheckIcon_default=CheckIcon,SuccessState=()=>jsxRuntimeExports.jsxs("div",{className:"space-y-6",children:[jsxRuntimeExports.jsx("div",{className:"-mt-5 flex items-center justify-center",children:jsxRuntimeExports.jsx(CheckIcon_default,{className:"w-24 text-white"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"text-center text-2xl font-semibold text-gray-900 dark:text-white",children:__("Successfully verified")}),jsxRuntimeExports.jsx("p",{className:"mx-auto mt-2 max-w-[224px] text-center text-lg text-657080",children:__("Your World ID verification was successful")})]})]}),SuccessState_default=SuccessState;function r$1(yt){var _e,$t,Ft="";if(typeof yt=="string"||typeof yt=="number")Ft+=yt;else if(typeof yt=="object")if(Array.isArray(yt)){var Vt=yt.length;for(_e=0;_e<Vt;_e++)yt[_e]&&($t=r$1(yt[_e]))&&(Ft&&(Ft+=" "),Ft+=$t)}else for($t in yt)yt[$t]&&(Ft&&(Ft+=" "),Ft+=$t);return Ft}function clsx(){for(var yt,_e,$t=0,Ft="",Vt=arguments.length;$t<Vt;$t++)(yt=arguments[$t])&&(_e=r$1(yt))&&(Ft&&(Ft+=" "),Ft+=_e);return Ft}var clsx_default=clsx,WorldcoinIcon=yt=>jsxRuntimeExports.jsx("svg",{...yt,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 33 32",children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M30.7195 9.77312C29.9097 7.87434 28.7647 6.17103 27.2845 4.6911C25.8044 3.21117 24.1288 2.06632 22.2298 1.25654C20.247 0.418848 18.1525 0 16.0021 0C13.8238 0 11.7293 0.418848 9.7744 1.25654C7.87537 2.06632 6.17184 3.21117 4.69171 4.6911C3.21159 6.17103 2.06659 7.87434 1.25671 9.77312C0.418903 11.7277 0 13.822 0 16C0 18.1501 0.418903 20.2443 1.25671 22.2269C2.06659 24.1257 3.21159 25.829 4.69171 27.3089C6.17184 28.7888 7.87537 29.9337 9.7744 30.7155C11.7572 31.5532 13.8517 31.9721 16.0021 31.9721C18.1525 31.9721 20.247 31.5532 22.2298 30.7155C24.1288 29.9058 25.8323 28.7609 27.3125 27.281C28.7926 25.801 29.9376 24.0977 30.7475 22.1989C31.5853 20.2164 32.0042 18.1222 32.0042 15.9721C32.0042 13.822 31.5574 11.7277 30.7195 9.77312ZM10.696 14.4921C11.3383 11.9232 13.6842 10.0524 16.4489 10.0524H27.5638C28.2899 11.4206 28.7367 12.9284 28.9043 14.4921H10.696ZM28.9043 17.5079C28.7367 19.0716 28.262 20.5794 27.5638 21.9476H16.4489C13.6842 21.9476 11.3662 20.0489 10.696 17.5079H28.9043ZM6.81415 6.81326C9.27172 4.35602 12.5392 3.01571 16.0021 3.01571C19.465 3.01571 22.7325 4.35602 25.19 6.81326C25.2738 6.89703 25.3297 6.95288 25.4134 7.03665H16.4489C14.0472 7.03665 11.8131 7.95811 10.1095 9.66143C8.76903 11.0017 7.9033 12.6771 7.62403 14.4921H3.09988C3.435 11.5881 4.71964 8.9075 6.81415 6.81326ZM16.0021 28.9843C12.5392 28.9843 9.27172 27.644 6.81415 25.1867C4.71964 23.0925 3.435 20.3839 3.09988 17.5079H7.62403C7.93123 19.3229 8.79696 20.9983 10.1095 22.3386C11.8131 24.0419 14.0472 24.9633 16.4489 24.9633H25.4134C25.3297 25.0471 25.2738 25.103 25.19 25.1867C22.7325 27.644 19.465 28.9843 16.0021 28.9843Z"})}),WorldcoinIcon_default=WorldcoinIcon,QRPlaceholderIcon=yt=>jsxRuntimeExports.jsxs("svg",{...yt,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 200 200",children:[jsxRuntimeExports.jsx("path",{fill:"#EBECEF",fillRule:"evenodd",d:"M12.1 0C5.417 0 0 5.417 0 12.1v18.505c0 6.682 5.417 12.1 12.1 12.1h18.505c6.682 0 12.1-5.418
143812.1-12.1V12.1c0-6.683-5.418-12.1-12.1-12.1H12.1Zm18.505 11.388H12.1a.712.712 0 0 0-.712.712v18.505c0 .393.319.712.712.712h18.505a.712.712 0 0 0 .712-.712V12.1a.712.712 0 0 0-.712-.712Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#EBECEF",d:"M197.026 200c.789 0 1.545-.309 2.103-.86.558-.55.871-1.297.871-2.076v-17.616c0-.778-.313-1.525-.871-2.076a2.996 2.996 0 0 0-2.103-.86h-5.948c-.789 0-1.545.31-2.103.86a2.918 2.918 0 0 0-.871 2.076v8.808h-11.897v-11.744h-11.896v-23.487h11.896v8.808c0 .778.314 1.525.872 2.076.557.55 1.314.86 2.102.86h5.949c.788 0 1.545-.31 2.103-.86a2.922 2.922 0 0 0 .871-2.076v-8.808h8.922c.789 0 1.545-.309 2.103-.86a2.916 2.916 0 0 0 .871-2.076v-5.872c0-.779-.313-1.525-.871-2.076a2.992 2.992 0 0 0-2.103-.86h-29.741c-.789 0-1.545.309-2.103.86a2.916 2.916 0 0 0-.871 2.076v8.808h-23.792v-11.744h8.922c.789 0 1.545-.309 2.103-.86.558-.55.871-1.297.871-2.076v-5.872c0-.778-.313-1.525-.871-2.076a2.996 2.996 0 0 0-2.103-.86h-5.948c-.789 0-1.546.31-2.103.86a2.918 2.918 0 0 0-.871 2.076v8.808H119.7c-.789 0-1.545.309-2.103.86a2.916 2.916 0 0 0-.871 2.076v5.872c0 .779.313 1.525.871 2.076.558.551 1.314.86 2.103.86h20.819v8.808c0 .778.313 1.525.871 2.076.557.55 1.314.86 2.103.86h8.922v8.808c0 .778.313 1.525.871 2.076.558.55 1.314.859 2.103.859h8.922v11.744h-20.818c-.789 0-1.546.31-2.103.86a2.916 2.916 0 0 0-.871 2.076v5.872c0 .779.313 1.526.871 2.076a2.99 2.99 0 0 0 2.103.86h17.844c.789 0 1.545-.309 2.103-.86.558-.55.871-1.297.871-2.076v-8.808h11.896v8.808c0 .779.314 1.526.872 2.076a2.99 2.99 0 0 0 2.102.86h17.845Z"}),jsxRuntimeExports.jsx("path",{fill:"#EBECEF",fillRule:"evenodd",d:"M157.295 12.1c0-6.683 5.418-12.1 12.1-12.1H187.9c6.683 0 12.1 5.417 12.1 12.1v18.505c0 6.682-5.417 12.1-12.1 12.1h-18.505c-6.682 0-12.1-5.418-12.1-12.1V12.1Zm12.1-.712H187.9c.393 0 .712.319.712.712v18.505a.712.712 0 0 1-.712.712h-18.505a.712.712 0 0 1-.712-.712V12.1c0-.393.319-.712.712-.712ZM12.1 157.295c-6.683 0-12.1 5.418-12.1 12.1V187.9c0 6.683 5.417 12.1 12.1 12.1h18.505c6.682 0 12.1-5.417 12.1-12.1v-18.505c0-6.682-5.418-12.1-12.1-12.1H12.1Zm19.217 12.1a.712.712 0 0 0-.712-.712H12.1a.712.712 0 0 0-.712.712V187.9c0 .393.319.712.712.712h18.505a.712.712 0 0 0 .712-.712v-18.505Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#EBECEF",d:"M6.05 89.68A6.05 6.05 0 0 0 0 95.73v9.252a6.05 6.05 0 0 0 6.05 6.05h9.253a6.05 6.05 0 0 0 6.05-6.05V95.73c0-.678-.112-1.33-.318-1.94.445.105.908.16 1.385.16h27.758a6.05 6.05 0 0 0 6.05-6.05v-9.252a6.05 6.05 0 0 0-6.05-6.05H22.42a6.05 6.05 0 0 0-6.05 6.05V87.9c0 .678.112 1.33.317 1.939a6.065 6.065 0 0 0-1.385-.16H6.05Zm102.135-40.926a6.05 6.05 0 0 1 6.05-6.05h9.253a6.05 6.05 0 0 1 6.049 6.05v9.253a6.05 6.05 0 0 1-6.049 6.05h-9.253a6.05 6.05 0 0 1-6.05-6.05v-9.253ZM67.616 184.698a6.05 6.05 0 0 1 6.05-6.05h9.252c.678 0 1.33.111 1.939.317a6.064 6.064 0 0 1-.16-1.385v-9.253a6.05 6.05 0 0 1 6.05-6.049H100a6.05 6.05 0 0 1 6.05 6.049v9.253a6.05 6.05 0 0 1-6.05 6.05h-9.253c-.678 0-1.33-.112-1.938-.317.104.444.159.908.159 1.385v9.252a6.05 6.05 0 0 1-6.05 6.05h-9.253a6.05 6.05 0 0 1-6.05-6.05v-9.252Zm78.291-120.285a6.05 6.05 0 0 1 6.05-6.05h41.993a6.05 6.05 0 0 1 6.05 6.05v9.252a6.05 6.05 0 0 1-6.05 6.05h-41.993a6.05 6.05 0 0 1-6.05-6.05v-9.252ZM95.018 0a6.05 6.05 0 0 0-6.05 6.05v17.082a6.05 6.05 0 0 0 6.05 6.05h9.252a6.05 6.05 0 0 0 6.05-6.05V6.05A6.05 6.05 0 0 0 104.27 0h-9.252Z"}),jsxRuntimeExports.jsx("path",{fill:"url(#a)",fillRule:"evenodd",d:"M12.1 0C5.417 0 0 5.417 0 12.1v18.505c0 6.682 5.417 12.1 12.1 12.1h18.505c6.682 0 12.1-5.418 12.1-12.1V12.1c0-6.683-5.418-12.1-12.1-12.1H12.1Zm18.505 11.388H12.1a.712.712 0 0 0-.712.712v18.505c0 .393.319.712.712.712h18.505a.712.712 0 0 0 .712-.712V12.1a.712.712 0 0 0-.712-.712Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"url(#a)",d:"M197.026 200c.789 0 1.545-.309 2.103-.86.558-.55.871-1.297.871-2.076v-17.616c0-.778-.313-1.525-.871-2.076a2.996 2.996 0 0 0-2.103-.86h-5.948c-.789 0-1.545.31-2.103.86a2.918 2.918 0 0 0-.871 2.076v8.808h-11.897v-11.744h-11.896v-23.487h11.896v8.808c0 .778.314 1.525.872 2.076.557.55 1.314.86 2.102.86h5.949c.788 0 1.545-.31 2.103-.86a2.922 2.922 0 0 0 .871-2.076v-8.808h8.922c.789 0 1.545-.309 2.103-.86a2.916 2.916 0 0 0 .871-2.076v-5.872c0-.779-.313-1.525-.871-2.076a2.992 2.992
14380 0 0-2.103-.86h-29.741c-.789 0-1.545.309-2.103.86a2.916 2.916 0 0 0-.871 2.076v8.808h-23.792v-11.744h8.922c.789 0 1.545-.309 2.103-.86.558-.55.871-1.297.871-2.076v-5.872c0-.778-.313-1.525-.871-2.076a2.996 2.996 0 0 0-2.103-.86h-5.948c-.789 0-1.546.31-2.103.86a2.918 2.918 0 0 0-.871 2.076v8.808H119.7c-.789 0-1.545.309-2.103.86a2.916 2.916 0 0 0-.871 2.076v5.872c0 .779.313 1.525.871 2.076.558.551 1.314.86 2.103.86h20.819v8.808c0 .778.313 1.525.871 2.076.557.55 1.314.86 2.103.86h8.922v8.808c0 .778.313 1.525.871 2.076.558.55 1.314.859 2.103.859h8.922v11.744h-20.818c-.789 0-1.546.31-2.103.86a2.916 2.916 0 0 0-.871 2.076v5.872c0 .779.313 1.526.871 2.076a2.99 2.99 0 0 0 2.103.86h17.844c.789 0 1.545-.309 2.103-.86.558-.55.871-1.297.871-2.076v-8.808h11.896v8.808c0 .779.314 1.526.872 2.076a2.99 2.99 0 0 0 2.102.86h17.845Z"}),jsxRuntimeExports.jsx("path",{fill:"url(#a)",fillRule:"evenodd",d:"M157.295 12.1c0-6.683 5.418-12.1 12.1-12.1H187.9c6.683 0 12.1 5.417 12.1 12.1v18.505c0 6.682-5.417 12.1-12.1 12.1h-18.505c-6.682 0-12.1-5.418-12.1-12.1V12.1Zm12.1-.712H187.9c.393 0 .712.319.712.712v18.505a.712.712 0 0 1-.712.712h-18.505a.712.712 0 0 1-.712-.712V12.1c0-.393.319-.712.712-.712Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"url(#a)",fillRule:"evenodd",d:"M12.1 157.295c-6.683 0-12.1 5.418-12.1 12.1V187.9c0 6.683 5.417 12.1 12.1 12.1h18.505c6.682 0 12.1-5.417 12.1-12.1v-18.505c0-6.682-5.418-12.1-12.1-12.1H12.1Zm19.217 12.1a.712.712 0 0 0-.712-.712H12.1a.712.712 0 0 0-.712.712V187.9c0 .393.319.712.712.712h18.505a.712.712 0 0 0 .712-.712v-18.505Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"url(#a)",d:"M6.05 89.68A6.05 6.05 0 0 0 0 95.73v9.252a6.05 6.05 0 0 0 6.05 6.05h9.253a6.05 6.05 0 0 0 6.05-6.05V95.73c0-.678-.112-1.33-.318-1.94.445.105.908.16 1.385.16h27.758a6.05 6.05 0 0 0 6.05-6.05v-9.252a6.05 6.05 0 0 0-6.05-6.05H22.42a6.05 6.05 0 0 0-6.05 6.05V87.9c0 .678.112 1.33.317 1.939a6.065 6.065 0 0 0-1.385-.16H6.05Z"}),jsxRuntimeExports.jsx("path",{fill:"url(#a)",d:"M108.185 48.754a6.05 6.05 0 0 1 6.05-6.05h9.253a6.05 6.05 0 0 1 6.049 6.05v9.253a6.05 6.05 0 0 1-6.049 6.05h-9.253a6.05 6.05 0 0 1-6.05-6.05v-9.253Z"}),jsxRuntimeExports.jsx("path",{fill:"url(#a)",d:"M67.616 184.698a6.05 6.05 0 0 1 6.05-6.05h9.252c.678 0 1.33.111 1.939.317a6.064 6.064 0 0 1-.16-1.385v-9.253a6.05 6.05 0 0 1 6.05-6.049H100a6.05 6.05 0 0 1 6.05 6.049v9.253a6.05 6.05 0 0 1-6.05 6.05h-9.253c-.678 0-1.33-.112-1.938-.317.104.444.159.908.159 1.385v9.252a6.05 6.05 0 0 1-6.05 6.05h-9.253a6.05 6.05 0 0 1-6.05-6.05v-9.252Z"}),jsxRuntimeExports.jsx("path",{fill:"url(#a)",d:"M145.907 64.413a6.05 6.05 0 0 1 6.05-6.05h41.993a6.05 6.05 0 0 1 6.05 6.05v9.252a6.05 6.05 0 0 1-6.05 6.05h-41.993a6.05 6.05 0 0 1-6.05-6.05v-9.252Z"}),jsxRuntimeExports.jsx("path",{fill:"url(#a)",d:"M95.018 0a6.05 6.05 0 0 0-6.05 6.05v17.082a6.05 6.05 0 0 0 6.05 6.05h9.252a6.05 6.05 0 0 0 6.05-6.05V6.05A6.05 6.05 0 0 0 104.27 0h-9.252Z"}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsxs("linearGradient",{id:"a",x1:"0",x2:"200",y1:"0",y2:"200",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{offset:".37",stopColor:"#fff",stopOpacity:"0"}),jsxRuntimeExports.jsx("stop",{offset:".5",stopColor:"#fff",stopOpacity:".85"}),jsxRuntimeExports.jsx("stop",{offset:".63",stopColor:"#fff",stopOpacity:"0"})]})})]}),QRPlaceholderIcon_default=QRPlaceholderIcon,QRState=({qrData:yt,showQR:_e,setShowQR:$t})=>{const Ft=useMedia_default(),[Vt,qt]=reactExports.useState(!1),zt=reactExports.useCallback(()=>{copy$1(yt??""),qt(!0),setTimeout(()=>qt(!1),2e3)},[yt]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:clsx_default("md:hidden",{"mb-10 space-y-4":!_e}),children:[jsxRuntimeExports.jsxs(motion.a,{href:yt??"",whileTap:{scale:.95},whileHover:{scale:1.05},transition:{layout:{duration:.15}},layoutId:Ft=="desktop"?void 0:"worldid-button",className:clsx_default("flex w-full items-center space-x-2 rounded-2xl border border-transparent p-4 font-medium shadow-sm","bg-0d151d text-white dark:bg-white dark:text-0d151d",{hidden:_e}),children:[jsxRuntimeExports.jsx(WorldcoinIcon_default,{className:"size-5"}),jsxRuntimeExports.jsx(motion.span,{className:"flex-1 text-center",transition:{layout:{duration:.15}},layoutId:Ft=="desktop"?void 0:"worldid-text",children:__("Open Worldcoin App")})]}),jsxRuntimeExports.jsxs("div",{className:clsx_default("mb-3",{"space-y-4":!_e}),children:[jsxRuntimeExports.jsxs("div",{className:clsx_default("flex items-center space-x-4 ",{hidden:_e}),children:[jsxRuntimeExports.jsx("hr",{className:"flex-1"}),jsxRuntimeExports.jsx("span",{className:"text-xs font-medium text-9ba3ae",children:"or"}),jsxRuntimeExports.jsx("hr",{className:"flex-1"})]}),jsxRuntimeExports.jsx(motion.button,{className:"w-full rounded-2xl border border-ebecef p-4 text-lg font-medium text-3c424b",onClick:()=>$t(Ht=>!Ht),children:__(_e?"Hide QR Code":"Display QR Code")})]})]}),(Ft=="desktop"||_e)&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(AnimatePresence,{children:Vt&&jsxRuntimeExports.jsx(motion.div,{className:"text-sm text-9eafc0",initial:"hidden",animate:"visible",exit:"exit",variants:{hidden:{opacity:0,height:0,marginTop:0,y:0},visible:{opacity:1,height:"auto",marginTop:8,y:-20,transition:{duration:.25,opacity:{delay:.05,duration:.2},ease:"easeInOut"}},exit:{opacity:0,height:0,marginTop:0,y:0,transition:{duration:.4,delay:.1,opacity:{duration:.25,delay:0},ease:"easeInOut"}}},children:jsxRuntimeExports.jsx("span",{className:"rounded-lg border border-f1f5f8 px-2 py-1 text-sm",children:__("QR Code copied")})},"copied")}),jsxRuntimeExports.jsx("div",{className:"relative inline-flex items-center justify-center rounded-2xl border border-f1f5f8 p-2 dark:border-f1f5f8/10",children:jsxRuntimeExports.jsx("div",{className:"text-29343f dark:text-white",children:yt?jsxRuntimeExports.jsx("div",{onClick:zt,className:"cursor-pointer",children:jsxRuntimeExports.jsx(QRCode_default,{data:yt,size:244})}):jsxRuntimeExports.jsx("div",{className:"flex size-[244px] items-center justify-center",children:jsxRuntimeExports.jsx(QRPlaceholderIcon_default,{className:"size-[244px] animate-pulse"})})})})]})]})},QRState_default=QRState,useWorldBridge=(yt,_e,$t,Ft,Vt,qt,zt)=>{const Ht=reactExports.useRef(Vt),{reset:Kt,result:Gt,connectorURI:Jt,createClient:Xt,pollForUpdates:Zt,verificationState:er,errorCode:tr}
1438=useWorldBridgeStore();return reactExports.useEffect(()=>{Jt||Xt({app_id:yt,action:_e,signal:$t,bridge_url:Ft,action_description:qt,verification_level:Ht.current,partner:zt})},[yt,_e,$t,qt,Xt,Ht,Ft,Jt,zt]),reactExports.useEffect(()=>{if(!Jt||Gt||tr)return;const rr=setInterval(()=>void Zt(),3e3);return()=>clearInterval(rr)},[Jt,Zt,tr,Gt]),{connectorURI:Jt,reset:Kt,result:Gt,verificationState:er,errorCode:tr}},LoadingIcon=({className:yt,..._e})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:`animate-spin motion-reduce:animate-[spin_1.5s_linear_infinite] ${yt}`,..._e,children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10.75",stroke:"#191C20",strokeOpacity:".16",strokeWidth:"2.5"}),jsxRuntimeExports.jsx("path",{fill:"#191C20",d:"M17.28 2.633c.338-.6.127-1.368-.505-1.642A12 12 0 0 0 7.459.892c-.638.261-.864 1.024-.539 1.632.326.607 1.08.827 1.725.584a9.504 9.504 0 0 1 6.897.073c.64.257 1.399.053 1.737-.548Z"})]}),LoadingIcon_default=LoadingIcon,getOptions=yt=>({signal:yt.signal,app_id:yt.app_id,action:yt.action,setStage:yt.setStage,bridge_url:yt.bridge_url,handleVerify:yt.handleVerify,setErrorState:yt.setErrorState,verification_level:yt.verification_level,action_description:yt.action_description,partner:yt.partner}),WorldIDState=()=>{const[yt,_e]=reactExports.useState(!1),{app_id:$t,action:Ft,signal:Vt,setStage:qt,handleVerify:zt,bridge_url:Ht,action_description:Kt,verification_level:Gt,setErrorState:Jt,partner:Xt}=idkit_default(getOptions,shallow$1),{connectorURI:Zt,reset:er,errorCode:tr,result:rr,verificationState:ar}=useWorldBridge($t,Ft,Vt,Ht,Gt,Kt,Xt);return reactExports.useEffect(()=>er,[er]),reactExports.useEffect(()=>{if(ar===VerificationState.Failed&&(qt("ERROR"),Jt({code:tr??AppErrorCodes.GenericError})),rr){if(Gt==VerificationLevel.Orb&&rr.verification_level==VerificationLevel.Device){console.error("Credential type received from wallet does not match configured credential_types. This should only happen when manually selecting disallowed credentials in the Worldcoin Simulator."),qt("ERROR"),Jt({code:AppErrorCodes.CredentialUnavailable});return}return zt(rr)}},[rr,zt,ar,qt,tr,Jt,Gt]),jsxRuntimeExports.jsxs("div",{className:clsx_default("-mt-6 space-y-5",{"space-y-10":!yt}),children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:"mb-4 flex items-center justify-center",children:jsxRuntimeExports.jsx(WorldcoinIcon_default,{className:"h-10 text-0d151d dark:text-white"})}),jsxRuntimeExports.jsx("p",{className:"text-center font-sora text-2xl font-semibold text-gray-900 dark:text-white",children:__("Verify with World ID")}),jsxRuntimeExports.jsx("p",{className:"mt-3 text-center text-657080 dark:text-9eafc0 md:mt-2",children:"Please use your World App to scan the QR code"})]}),jsxRuntimeExports.jsxs("div",{className:"relative",children:[ar==VerificationState.WaitingForApp&&jsxRuntimeExports.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center space-y-6",children:[jsxRuntimeExports.jsx(LoadingIcon_default,{className:"size-6"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"font-bold text-657080",children:"Verifying"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-657080",children:"Please continue in app"})]})]}),jsxRuntimeExports.jsx("div",{className:ar===VerificationState.WaitingForApp?"opacity-40 blur-lg transition duration-500 ease-in-out":"transition duration-500 ease-in-out",children:jsxRuntimeExports.jsx(QRState_default,{showQR:yt,setShowQR:_e,qrData:Zt})})]})]})},WorldIDState_default=WorldIDState,HostAppVerificationState=()=>jsxRuntimeExports.jsxs("div",{className:"space-y-6",children:[jsxRuntimeExports.jsx("div",{className:"flex justify-center",children:jsxRuntimeExports.jsx(LoadingIcon_default,{className:"h-24 w-24"})}),jsxRuntimeExports.jsx("div",{className:"mt-4 text-70868f",children:__("Transmitting verification to host app. Please wait...")})]}),HostAppVerificationState_default=reactExports.memo(HostAppVerificationState),getParams2=({open:yt,processing:_e,onOpenChange:$t,stage:Ft,setStage:Vt,setOptions:qt})=>({stage:Ft,setStage:Vt,processing:_e,setOptions:qt,isOpen:yt,onOpenChange:$t}),IDKitWidget=({children:yt,..._e})=>{const $t=useMedia_default(),{isOpen:Ft,onOpenChange:Vt,stage:qt,setOptions:zt}=idkit_default(getParams2,shallow$1);reactExports.useEffect(()=>{if(_e.action==="")throw new Error(__("Action cannot be an empty string."));zt(_e,"props")},[_e,zt]);const Ht=reactExports.useMemo(()=>{switch(qt){case"WORLD_ID":return WorldIDState_default;case"SUCCESS":return SuccessState_default;
1438case"ERROR":return ErrorState_default;case"HOST_APP_VERIFICATION":return HostAppVerificationState_default;default:throw new Error(__("Invalid IDKitStage :stage.",{stage:qt}))}},[qt]);return jsxRuntimeExports.jsxs(Root,{open:Ft,onOpenChange:Vt,children:[yt==null?void 0:yt({open:()=>Vt(!0)}),jsxRuntimeExports.jsx(Portal,{forceMount:!0,children:jsxRuntimeExports.jsx(reactExports.Fragment,{children:jsxRuntimeExports.jsx(AnimatePresence,{children:Ft&&jsxRuntimeExports.jsxs(P$1.div,{mode:"open",id:"idkit-widget",children:[jsxRuntimeExports.jsx(Styles_default,{}),jsxRuntimeExports.jsxs("div",{id:"modal",className:"fixed z-10 font-sans",children:[jsxRuntimeExports.jsx(Overlay,{asChild:!0,children:jsxRuntimeExports.jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 backdrop-blur-lg"})}),jsxRuntimeExports.jsx("div",{className:"fixed inset-0 z-10 overflow-y-hidden md:overflow-y-auto",children:jsxRuntimeExports.jsx("div",{className:"flex min-h-full items-end justify-center text-center md:items-center md:p-4",children:jsxRuntimeExports.jsx(Content,{asChild:!0,children:jsxRuntimeExports.jsx(motion.div,{layout:$t=="mobile"?"position":!0,exit:$t=="mobile"?"initMob":"init",initial:$t=="mobile"?"initMob":"init",animate:$t=="mobile"?"animateMob":"animate",variants:{init:{opacity:0,scale:.9},initMob:{translateY:"100%"},animate:{opacity:1,scale:1},animateMob:{translateY:0}},transition:{layout:{duration:.15}},className:"relative z-50 flex min-h-screen w-full flex-col bg-white pt-6 shadow focus:outline-none focus-visible:ring focus-visible:ring-purple-500/75 dark:bg-0d151d md:min-h-[35rem] md:max-w-md md:rounded-2xl",children:jsxRuntimeExports.jsxs(Provider,{children:[jsxRuntimeExports.jsx(Viewport,{className:"flex justify-center"}),jsxRuntimeExports.jsx("div",{className:"mx-6 mb-12 flex items-center justify-between",children:jsxRuntimeExports.jsx(Close,{className:"flex items-center justify-center rounded-full text-black dark:text-white",children:jsxRuntimeExports.jsx(XMarkIcon_default,{className:"size-5"})})}),jsxRuntimeExports.jsx("div",{className:"relative mx-6 mb-6 flex flex-1 flex-col items-center justify-center",children:jsxRuntimeExports.jsx(Ht,{})}),jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between border-t border-f5f5f7 p-7 md:rounded-b-2xl",children:[jsxRuntimeExports.jsxs("a",{href:"https://world.org/world-id",target:"_blank",rel:"noreferrer",className:"flex items-center gap-1 text-sm text-9eafc0",children:[jsxRuntimeExports.jsx(WorldcoinIcon_default,{className:"w-4 text-9eafc0 dark:text-white"}),jsxRuntimeExports.jsx("span",{children:__("Powered by Worldcoin")})]}),jsxRuntimeExports.jsx("a",{href:"https://developer.worldcoin.org/privacy-statement",target:"_blank",rel:"noreferrer",className:"text-sm text-9eafc0 hover:underline",children:__("Terms & Privacy")})]})]})})})})})]})]})})})})]})},BaseWidget_default=IDKitWidget,IDKitWidget_default=reactExports.memo(BaseWidget_default);/** 1439 * @license lucide-react v0.344.0 - ISC 1440 * 1441 * This source code is licensed under the ISC license. 1442 * See the LICENSE file in the root directory of this source tree. 1443 */var defaultAttributes={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 1444 * @license lucide-react v0.344.0 - ISC 1445 * 1446 * This source code is licensed under the ISC license. 1447 * See the LICENSE file in the root directory of this source tree. 1448 */const toKebabCase=yt=>yt.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),createLucideIcon=(yt,_e)=>{const $t=reactExports.forwardRef(({color:Ft="currentColor",size:Vt=24,strokeWidth:qt=2,absoluteStrokeWidth:zt,className:Ht="",children:Kt,...Gt},Jt)=>reactExports.createElement("svg",{ref:Jt,...defaultAttributes,width:Vt,height:Vt,stroke:Ft,strokeWidth:zt?Number(qt)*24/Number(Vt):qt,className:["lucide",`lucide-${toKebabCase(yt)}`,Ht].join(" "),...Gt},[..._e.map(([Xt,Zt])=>reactExports.createElement(Xt,Zt)),...Array.isArray(Kt)?Kt:[Kt]]));return $t.displayName=`${yt}`,$t};
1448/** 1449 * @license lucide-react v0.344.0 - ISC 1450 * 1451 * This source code is licensed under the ISC license. 1452 * See the LICENSE file in the root directory of this source tree. 1453 */const Cookie$1=createLucideIcon("Cookie",[["path",{d:"M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5",key:"laymnq"}],["path",{d:"M8.5 8.5v.01",key:"ue8clq"}],["path",{d:"M16 15.5v.01",key:"14dtrp"}],["path",{d:"M12 12v.01",key:"u5ubse"}],["path",{d:"M11 17v.01",key:"1hyl5a"}],["path",{d:"M7 14v.01",key:"uct60s"}]]);/** 1454 * @license lucide-react v0.344.0 - ISC 1455 * 1456 * This source code is licensed under the ISC license. 1457 * See the LICENSE file in the root directory of this source tree. 1458 */const NavigationOff=createLucideIcon("NavigationOff",[["path",{d:"M8.43 8.43 3 11l8 2 2 8 2.57-5.43",key:"1vdtb7"}],["path",{d:"M17.39 11.73 22 2l-9.73 4.61",key:"tya3r6"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/** 1459 * @license lucide-react v0.344.0 - ISC 1460 * 1461 * This source code is licensed under the ISC license. 1462 * See the LICENSE file in the root directory of this source tree. 1463 */const Package=createLucideIcon("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** 1464 * @license lucide-react v0.344.0 - ISC 1465 * 1466 * This source code is licensed under the ISC license. 1467 * See the LICENSE file in the root directory of this source tree. 1468 */const Wallet=createLucideIcon("Wallet",[["path",{d:"M21 12V7H5a2 2 0 0 1 0-4h14v4",key:"195gfw"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h16v-5",key:"195n9w"}],["path",{d:"M18 12a2 2 0 0 0 0 4h4v-4Z",key:"vllfpd"}]]),LoginPage=()=>{const[yt,_e]=reactExports.useState({open:!1,message:"",severity:"success"}),$t=async Vt=>{console.log("Proof received. Sending to backend for verification...",Vt);try{const qt=await fetch("https://gnctnepoaovipmupvbcu.supabase.co/functions/v1/verify-and-login",{method:"POST",headers:{"Content-Type":"application/json",apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImduY3RuZXBvYW92aXBtdXB2YmN1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTA1OTQxMzYsImV4cCI6MjA2NjE3MDEzNn0.OWKPnbe_6zwLq7ezk5SS56iyGtnuH4bsE1mcaLj8qBg"},body:JSON.stringify({nullifier_hash:Vt.nullifier_hash})}),zt=await qt.json();if(console.log("Backend response:",zt),!qt.ok)throw new Error(zt.error||"Verification with backend failed.");const Ht={user:zt.user||{id:zt.user_id,email:zt.email},nullifier_hash:Vt.nullifier_hash,verified_at:new Date().toISOString()};localStorage.setItem("worldid_session",JSON.stringify(Ht)),console.log("â World ID verification successful!"),_e({open:!0,message:"Login successful! Redirecting to dashboard...",severity:"success"}),setTimeout(()=>{window.location.href="/dashboard"},1e3)}catch(qt){throw console.error("Verification failed:",qt),_e({open:!0,message:`Error: ${qt.message}`,severity:"error"}),qt}},Ft=()=>{console.log("World ID widget closed after successful verification")};return jsxRuntimeExports.jsxs(Box$2,{sx:{minHeight:"100vh",background:"linear-gradient(135deg, #1A0E0E 0%, #3E2723 50%, #5D4037 100%)",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",width:"200%",height:"200%",background:"radial-gradient(circle, rgba(255,179,0,0.03) 1px, transparent 1px)",backgroundSize:"50px 50px",animation:"float 20s infinite linear"}},children:[jsxRuntimeExports.jsx("a",{href:"https://bolt.new/",target:"_blank",rel:"noopener noreferrer",style:{position:"fixed",top:"20px",right:"20px",zIndex:1e3,display:"block",width:"60px",height:"60px",transition:"transform 0.3s ease"},onMouseEnter:Vt=>{Vt.currentTarget.style.transform="scale(1.1)"},onMouseLeave:Vt=>{Vt.currentTarget.style.transform="scale(1)"},children:jsxRuntimeExports.jsx("img",{src:"/badges/white_circle_360x360.png",alt:"Built with Bolt.new",style:{width:"100%",height:"100%",filter:"drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3))"}})}),jsxRuntimeExports.jsx("style",{children:` 1469 @keyframes float { 1470 0% { transform: translate(-50px, -50px); } 1471 100% { transform: translate(0, 0); } 1472 } 1473 @keyframes bounce { 1474 0%, 100% { transform: translateY(0) rotate(-5deg); } 1475 50% { transform: translateY(-10px) rotate(5deg); } 1476 } 1477 @keyframes pulse { 1478 0%, 100% { opacity: 0.8; } 1479 50% { opacity: 1; } 1480 } 1481 `}),jsxRuntimeExports.jsx(Container,{maxWidth:"sm",children:jsxRuntimeExports.jsxs(Paper,{elevation:24,sx:{p:6,borderRadius:4,background:"rgba(255, 255, 255, 0.05)",backdropFilter:"blur(20px)",border:"1px solid rgba(255, 179, 0, 0.2)",textAlign:"center",position:"relative",overflow:"hidden","&::after":{content:'""',position:"absolute",top:-2,left:-2,right:-2,bottom:-2,background:"linear-gradient(45deg, transparent, rgba(255,179,0,0.3), transparent)",borderRadius:4,opacity:0,transition:"opacity 0.3s",zIndex:-1},"&:hover::after":{opacity:1}},children:[jsxRuntimeExports.jsx(Box$2,{sx:{position:"absolute",top:20,left:2
14810,animation:"bounce 3s infinite"},children:jsxRuntimeExports.jsx(Cookie$1,{size:30,color:"#FFB300"})}),jsxRuntimeExports.jsx(Box$2,{sx:{position:"absolute",top:40,right:30,animation:"bounce 3s infinite 0.5s"},children:jsxRuntimeExports.jsx(Cookie$1,{size:20,color:"#FFA000"})}),jsxRuntimeExports.jsx(Box$2,{sx:{position:"absolute",bottom:30,left:40,animation:"bounce 3s infinite 1s"},children:jsxRuntimeExports.jsx(Cookie$1,{size:25,color:"#FF8F00"})}),jsxRuntimeExports.jsxs(Box$2,{sx:{mb:4,position:"relative"},children:[jsxRuntimeExports.jsx(Cookie$1,{size:80,color:"#FFB300",style:{filter:"drop-shadow(0 0 20px rgba(255,179,0,0.5))",animation:"pulse 2s infinite"}}),jsxRuntimeExports.jsx(Typography,{variant:"h3",sx:{mt:2,fontWeight:700,background:"linear-gradient(45deg, #FFB300, #FFA000)",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",textShadow:"0 0 30px rgba(255,179,0,0.3)"},children:"Cookie Market"}),jsxRuntimeExports.jsx(Typography,{variant:"h6",sx:{mt:1,color:"rgba(255,255,255,0.8)",fontWeight:300},children:"Your Data, Your Dough ðª"})]}),jsxRuntimeExports.jsxs(Box$2,{sx:{mb:4},children:[jsxRuntimeExports.jsx(Typography,{variant:"body1",sx:{color:"rgba(255,255,255,0.7)",mb:3},children:"Turn your browsing data into sweet, sweet ALGO"}),jsxRuntimeExports.jsxs(Box$2,{sx:{display:"flex",flexDirection:"column",gap:2,mb:4},children:[jsxRuntimeExports.jsxs(Box$2,{sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:2,p:2,borderRadius:2,background:"rgba(255,179,0,0.1)",border:"1px solid rgba(255,179,0,0.2)"},children:[jsxRuntimeExports.jsx(Typography,{variant:"h4",children:"ðª"}),jsxRuntimeExports.jsx(Typography,{variant:"body2",sx:{color:"rgba(255,255,255,0.9)"},children:"Collect browsing data privately"})]}),jsxRuntimeExports.jsxs(Box$2,{sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:2,p:2,borderRadius:2,background:"rgba(255,179,0,0.1)",border:"1px solid rgba(255,179,0,0.2)"},children:[jsxRuntimeExports.jsx(Typography,{variant:"h4",children:"ð¦"}),jsxRuntimeExports.jsx(Typography,{variant:"body2",sx:{color:"rgba(255,255,255,0.9)"},children:"Package & sell anonymously"})]}),jsxRuntimeExports.jsxs(Box$2,{sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:2,p:2,borderRadius:2,background:"rgba(255,179,0,0.1)",border:"1px solid rgba(255,179,0,0.2)"},children:[jsxRuntimeExports.jsx(Typography,{variant:"h4",children:"ð°"}),jsxRuntimeExports.jsx(Typography,{variant:"body2",sx:{color:"rgba(255,255,255,0.9)"},children:"Earn ALGO instantly"})]})]})]}),jsxRuntimeExports.jsx(IDKitWidget_default,{app_id:"app_staging_3342b5fc5b58555ca867ff0b669213f3",action:"ollie-ai-login",verification_level:VerificationLevel.Orb,handleVerify:$t,onSuccess:Ft,children:({open:Vt})=>jsxRuntimeExports.jsx("button",{onClick:Vt,style:{background:"linear-gradient(45deg, #FFB300, #FFA000)",border:"none",borderRadius:12,padding:"16px 48px",fontSize:"18px",fontWeight:600,color:"#1A0E0E",cursor:"pointer",transition:"all 0.3s",boxShadow:"0 4px 20px rgba(255,179,0,0.3)",position:"relative",overflow:"hidden"},onMouseEnter:qt=>{qt.currentTarget.style.transform="translateY(-2px)",qt.currentTarget.style.boxShadow="0 6px 30px rgba(255,179,0,0.5)"},onMouseLeave:qt=>{qt.currentTarget.style.transform="translateY(0)",qt.currentTarget.style.boxShadow="0 4px 20px rgba(255,179,0,0.3)"},children:"ðª Start Earning with World ID"})}),jsxRuntimeExports.jsx(Typography,{variant:"caption",sx:{display:"block",mt:3,color:"rgba(255,255,255,0.5)"},children:"Powered by Algorand ⢠Privacy by World ID"})]})}),jsxRuntimeExports.jsx(Snackbar,{open:yt.open,autoHideDuration:3e3,onClose:()=>_e({...yt,open:!1}),anchorOrigin:{vertical:"top",horizontal:"center"},children:jsxRuntimeExports.jsx(Alert,{onClose:()=>_e({...yt,open:!1}),severity:yt.severity,sx:{width:"100%"},children:yt.message})})]})},DOMAIN_CATEGORIES={"github.com":"tech","stackoverflow.com":"tech","dev.to":"tech",hackernews:"tech","amazon.com":"shopping","ebay.com":"shopping","alibaba.com":"shopping","cnn.com":"news","bbc.com":"news","reuters.com":"news","youtube.com":"entertainment","netflix.com":"entertainment","twitch.tv":"entertainment"};function categorizeEvents(yt){const _e={tech:[],shopping:[],news:[],entertainment:[],other:[]};return yt.forEach($t=>{let Ft="other";for(const[Vt,qt]of Object.entries(DOMAIN_CATEGORIES))if($t.domain.includes(Vt)){Ft=qt;break}_e[Ft].push($t)}
1481),_e}function calculatePackagePrice(yt,_e){const $t=yt/100*.1;return Math.max(1,$t*(_e==="mixed"?1:1.5))}async function createDataPackages(yt,_e){try{if(!(_e!=null&&_e.algorand_address))return{success:!1,packages:[],error:"Please connect your Pera Wallet first to sell data packages."};const $t=_e.algorand_address,Ft=new Date;Ft.setDate(Ft.getDate()-7);const{data:Vt,error:qt}=await supabase.from("data_events").select("*").eq("user_id",yt).gte("event_timestamp",Ft.toISOString()).order("event_timestamp",{ascending:!1});if(qt)throw qt;if(!Vt||Vt.length<10)return{success:!1,packages:[],error:"Need at least 10 browsing events from the last 7 days."};const zt=categorizeEvents(Vt),Ht=[];for(const[Gt,Jt]of Object.entries(zt))if(Gt!=="other"&&Jt.length>=5){const Xt=[...new Set(Jt.map(ar=>ar.domain))],Zt={start:Jt[Jt.length-1].event_timestamp,end:Jt[0].event_timestamp},er={user_id:yt,seller_algorand_address:$t,package_type:Gt,data_count:Jt.length,price_algo:calculatePackagePrice(Jt.length,Gt),status:"available",is_active:!0,metadata:{domains:Xt.slice(0,10),date_range:Zt,category_breakdown:{[Gt]:Jt.length}}},{data:tr,error:rr}=await supabase.from("data_packages").insert(er).select().single();if(rr)throw rr;Ht.push(tr)}const Kt=Object.entries(zt).filter(([Gt,Jt])=>Gt!=="other"&&Jt.length>0);if(Kt.length>=2){const Gt=Kt.flatMap(([,rr])=>rr),Jt=[...new Set(Gt.map(rr=>rr.domain))],Xt={};Kt.forEach(([rr,ar])=>{Xt[rr]=ar.length});const Zt={user_id:yt,seller_algorand_address:$t,package_type:"mixed",data_count:Gt.length,price_algo:calculatePackagePrice(Gt.length,"mixed"),status:"available",is_active:!0,metadata:{domains:Jt.slice(0,15),date_range:{start:Gt[Gt.length-1].event_timestamp,end:Gt[0].event_timestamp},category_breakdown:Xt}},{data:er,error:tr}=await supabase.from("data_packages").insert(Zt).select().single();if(tr)throw tr;Ht.push(er)}return Ht.length===0?{success:!1,packages:[],error:"Not enough data in any category. Browse more varied websites."}:{success:!0,packages:Ht}}catch($t){return console.error("Error creating packages:",$t),{success:!1,packages:[],error:`Failed to create packages: ${$t.message}`}}}async function getUserPackages(yt){const{data:_e,error:$t}=await supabase.from("data_packages").select("*").eq("user_id",yt).order("created_at",{ascending:!1});return $t?(console.error("Error fetching packages:",$t),[]):_e||[]}function commonjsRequire(yt){throw new Error('Could not dynamically require "'+yt+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var naclFast={exports:{}},cryptoBrowserify={},browser$b={exports:{}},safeBuffer$2={exports:{}};const require$$1$2=getAugmentedNamespace(dist);/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var hasRequiredSafeBuffer$2;function requireSafeBuffer$2(){return hasRequiredSafeBuffer$2||(hasRequiredSafeBuffer$2=1,function(yt,_e){var $t=require$$1$2,Ft=$t.Buffer;function Vt(zt,Ht){for(var Kt in zt)Ht[Kt]=zt[Kt]}Ft.from&&Ft.alloc&&Ft.allocUnsafe&&Ft.allocUnsafeSlow?yt.exports=$t:(Vt($t,_e),_e.Buffer=qt);function qt(zt,Ht,Kt){return Ft(zt,Ht,Kt)}qt.prototype=Object.create(Ft.prototype),Vt(Ft,qt),qt.from=function(zt,Ht,Kt){if(typeof zt=="number")throw new TypeError("Argument must not be a number");return Ft(zt,Ht,Kt)},qt.alloc=function(zt,Ht,Kt){if(typeof zt!="number")throw new TypeError("Argument must be a number");var Gt=Ft(zt);return Ht!==void 0?typeof Kt=="string"?Gt.fill(Ht,Kt):Gt.fill(Ht):Gt.fill(0),Gt},qt.allocUnsafe=function(zt){if(typeof zt!="number")throw new TypeError("Argument must be a number");return Ft(zt)},qt.allocUnsafeSlow=function(zt){if(typeof zt!="number")throw new TypeError("Argument must be a number");return $t.SlowBuffer(zt)}}(safeBuffer$2,safeBuffer$2.exports)),safeBuffer$2.exports}var hasRequiredBrowser$b;function requireBrowser$b(){if(hasRequiredBrowser$b)return browser$b.exports;hasRequiredBrowser$b=1;var yt=65536,_e=4294967295;function $t(){throw new Error(`Secure random number generation is not supported by this browser. 1482Use Chrome, Firefox or Internet Explorer 11`)}var Ft=requireSafeBuffer$2().Buffer,Vt=globalThis.crypto||globalThis.msCrypto;Vt&&Vt.getRandomValues?browser$b.exports=qt:browser$b.exports=$t;function qt(zt,Ht){if(zt>_e)throw new RangeError("requested too many random bytes");var Kt=Ft.allocUnsafe(zt);if(zt>0)if(zt>yt)for(var Gt=0;Gt<zt;Gt+=yt)Vt.getRandomValues(Kt.slice(Gt,Gt+yt));else Vt.getRandomValues(Kt);return typeof Ht=="function"?process$1.nextTick(function(){Ht(null,Kt)}
vendor: 4,553 bytes, line 1482
1482):Kt}return browser$b.exports}var inherits_browser={exports:{}},hasRequiredInherits_browser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,typeof Object.create=="function"?inherits_browser.exports=function(_e,$t){$t&&(_e.super_=$t,_e.prototype=Object.create($t.prototype,{constructor:{value:_e,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(_e,$t){if($t){_e.super_=$t;var Ft=function(){};Ft.prototype=$t.prototype,_e.prototype=new Ft,_e.prototype.constructor=_e}}),inherits_browser.exports}var events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var yt=typeof Reflect=="object"?Reflect:null,_e=yt&&typeof yt.apply=="function"?yt.apply:function(xr,Sr,Tr){return Function.prototype.apply.call(xr,Sr,Tr)},$t;yt&&typeof yt.ownKeys=="function"?$t=yt.ownKeys:Object.getOwnPropertySymbols?$t=function(xr){return Object.getOwnPropertyNames(xr).concat(Object.getOwnPropertySymbols(xr))}:$t=function(xr){return Object.getOwnPropertyNames(xr)};function Ft(vr){console&&console.warn&&console.warn(vr)}var Vt=Number.isNaN||function(xr){return xr!==xr};function qt(){qt.init.call(this)}events.exports=qt,events.exports.once=nr,qt.EventEmitter=qt,qt.prototype._events=void 0,qt.prototype._eventsCount=0,qt.prototype._maxListeners=void 0;var zt=10;function Ht(vr){if(typeof vr!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof vr)}Object.defineProperty(qt,"defaultMaxListeners",{enumerable:!0,get:function(){return zt},set:function(vr){if(typeof vr!="number"||vr<0||Vt(vr))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+vr+".");zt=vr}}),qt.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},qt.prototype.setMaxListeners=function(xr){if(typeof xr!="number"||xr<0||Vt(xr))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+xr+".");return this._maxListeners=xr,this};function Kt(vr){return vr._maxListeners===void 0?qt.defaultMaxListeners:vr._maxListeners}qt.prototype.getMaxListeners=function(){return Kt(this)},qt.prototype.emit=function(xr){for(var Sr=[],Tr=1;Tr<arguments.length;Tr++)Sr.push(arguments[Tr]);var Br=xr==="error",jr=this._events;if(jr!==void 0)Br=Br&&jr.error===void 0;else if(!Br)return!1;if(Br){var Rr;if(Sr.length>0&&(Rr=Sr[0]),Rr instanceof Error)throw Rr;var yr=new Error("Unhandled error."+(Rr?" ("+Rr.message+")":""));throw yr.context=Rr,yr}var sr=jr[xr];if(sr===void 0)return!1;if(typeof sr=="function")_e(sr,this,Sr);else for(var or=sr.length,Qt=tr(sr,or),Tr=0;Tr<or;++Tr)_e(Qt[Tr],this,Sr);return!0};function Gt(vr,xr,Sr,Tr){var Br,jr,Rr;if(Ht(Sr),jr=vr._events,jr===void 0?(jr=vr._events=Object.create(null),vr._eventsCount=0):(jr.newListener!==void 0&&(vr.emit("newListener",xr,Sr.listener?Sr.listener:Sr),jr=vr._events),Rr=jr[xr]),Rr===void 0)Rr=jr[xr]=Sr,++vr._eventsCount;else if(typeof Rr=="function"?Rr=jr[xr]=Tr?[Sr,Rr]:[Rr,Sr]:Tr?Rr.unshift(Sr):Rr.push(Sr),Br=Kt(vr),Br>0&&Rr.length>Br&&!Rr.warned){Rr.warned=!0;var yr=new Error("Possible EventEmitter memory leak detected. "+Rr.length+" "+String(xr)+" listeners added. Use emitter.setMaxListeners() to increase limit");yr.name="MaxListenersExceededWarning",yr.emitter=vr,yr.type=xr,yr.count=Rr.length,Ft(yr)}return vr}qt.prototype.addListener=function(xr,Sr){return Gt(this,xr,Sr,!1)},qt.prototype.on=qt.prototype.addListener,qt.prototype.prependListener=function(xr,Sr){return Gt(this,xr,Sr,!0)};function Jt(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Xt(vr,xr,Sr){var Tr={fired:!1,wrapFn:void 0,target:vr,type:xr,listener:Sr},Br=Jt.bind(Tr);return Br.listener=Sr,Tr.wrapFn=Br,Br}qt.prototype.once=function(xr,Sr){return Ht(Sr),this.on(xr,Xt(this,xr,Sr)),this},qt.prototype.prependOnceListener=function(xr,Sr){return Ht(Sr),this.prependListener(xr,Xt(this,xr,Sr)),this},qt.prototype.removeListener=function(xr,Sr){var Tr,Br,jr,Rr,yr;if(Ht(Sr),Br=this._events,Br===void 0)return this;if(Tr=Br[xr],Tr===void 0)return this;if(Tr===Sr||Tr.listener===Sr)--this._eventsCount===0?this._events=Object.create(null):(delete Br[xr],Br.removeListener&&this.emit
vendor: 5,612 bytes, line 1482
1482("removeListener",xr,Tr.listener||Sr));else if(typeof Tr!="function"){for(jr=-1,Rr=Tr.length-1;Rr>=0;Rr--)if(Tr[Rr]===Sr||Tr[Rr].listener===Sr){yr=Tr[Rr].listener,jr=Rr;break}if(jr<0)return this;jr===0?Tr.shift():rr(Tr,jr),Tr.length===1&&(Br[xr]=Tr[0]),Br.removeListener!==void 0&&this.emit("removeListener",xr,yr||Sr)}return this},qt.prototype.off=qt.prototype.removeListener,qt.prototype.removeAllListeners=function(xr){var Sr,Tr,Br;if(Tr=this._events,Tr===void 0)return this;if(Tr.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Tr[xr]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete Tr[xr]),this;if(arguments.length===0){var jr=Object.keys(Tr),Rr;for(Br=0;Br<jr.length;++Br)Rr=jr[Br],Rr!=="removeListener"&&this.removeAllListeners(Rr);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Sr=Tr[xr],typeof Sr=="function")this.removeListener(xr,Sr);else if(Sr!==void 0)for(Br=Sr.length-1;Br>=0;Br--)this.removeListener(xr,Sr[Br]);return this};function Zt(vr,xr,Sr){var Tr=vr._events;if(Tr===void 0)return[];var Br=Tr[xr];return Br===void 0?[]:typeof Br=="function"?Sr?[Br.listener||Br]:[Br]:Sr?ar(Br):tr(Br,Br.length)}qt.prototype.listeners=function(xr){return Zt(this,xr,!0)},qt.prototype.rawListeners=function(xr){return Zt(this,xr,!1)},qt.listenerCount=function(vr,xr){return typeof vr.listenerCount=="function"?vr.listenerCount(xr):er.call(vr,xr)},qt.prototype.listenerCount=er;function er(vr){var xr=this._events;if(xr!==void 0){var Sr=xr[vr];if(typeof Sr=="function")return 1;if(Sr!==void 0)return Sr.length}return 0}qt.prototype.eventNames=function(){return this._eventsCount>0?$t(this._events):[]};function tr(vr,xr){for(var Sr=new Array(xr),Tr=0;Tr<xr;++Tr)Sr[Tr]=vr[Tr];return Sr}function rr(vr,xr){for(;xr+1<vr.length;xr++)vr[xr]=vr[xr+1];vr.pop()}function ar(vr){for(var xr=new Array(vr.length),Sr=0;Sr<xr.length;++Sr)xr[Sr]=vr[Sr].listener||vr[Sr];return xr}function nr(vr,xr){return new Promise(function(Sr,Tr){function Br(Rr){vr.removeListener(xr,jr),Tr(Rr)}function jr(){typeof vr.removeListener=="function"&&vr.removeListener("error",Br),Sr([].slice.call(arguments))}fr(vr,xr,jr,{once:!0}),xr!=="error"&&cr(vr,Br,{once:!0})})}function cr(vr,xr,Sr){typeof vr.on=="function"&&fr(vr,"error",xr,Sr)}function fr(vr,xr,Sr,Tr){if(typeof vr.on=="function")Tr.once?vr.once(xr,Sr):vr.on(xr,Sr);else if(typeof vr.addEventListener=="function")vr.addEventListener(xr,function Br(jr){Tr.once&&vr.removeEventListener(xr,Br),Sr(jr)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof vr)}return events.exports}var streamBrowser$1,hasRequiredStreamBrowser$1;function requireStreamBrowser$1(){return hasRequiredStreamBrowser$1||(hasRequiredStreamBrowser$1=1,streamBrowser$1=requireEvents().EventEmitter),streamBrowser$1}var util$1={},types$2={},shams$1,hasRequiredShams$1;function requireShams$1(){return hasRequiredShams$1||(hasRequiredShams$1=1,shams$1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var _e={},$t=Symbol("test"),Ft=Object($t);if(typeof $t=="string"||Object.prototype.toString.call($t)!=="[object Symbol]"||Object.prototype.toString.call(Ft)!=="[object Symbol]")return!1;var Vt=42;_e[$t]=Vt;for(var qt in _e)return!1;if(typeof Object.keys=="function"&&Object.keys(_e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(_e).length!==0)return!1;var zt=Object.getOwnPropertySymbols(_e);if(zt.length!==1||zt[0]!==$t||!Object.prototype.propertyIsEnumerable.call(_e,$t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var Ht=Object.getOwnPropertyDescriptor(_e,$t);if(Ht.value!==Vt||Ht.enumerable!==!0)return!1}return!0}),shams$1}var shams,hasRequiredShams;function requireShams(){if(hasRequiredShams)return shams;hasRequiredShams=1;var yt=requireShams$1();return shams=function(){return yt()&&!!Symbol.toStringTag},shams}var esObjectAtoms,hasRequiredEsObjectAtoms;function requireEsObjectAtoms(){return hasRequiredEsObjectAtoms||(hasRequiredEsObjectAtoms=1,esObjectAtoms=Object),esObjectAtoms}var esErrors,hasRequiredEsErrors;function requireEsErrors(){return hasRequiredEsErrors||(hasRequiredEsErrors=1,esErrors=Error),esErrors}var _eval,hasRequired_eval;function require_eval(){return hasRequired_eval||(hasRequired_eval=1,_eval=EvalError),_eval}var range,hasRequiredRange;function requireRange(){return hasRequiredRange||(hasRequiredRange=1,range=RangeError),range}var ref,hasRequiredRef;function requireRef(){return hasRequiredRef||(hasRequiredRef=1,ref=ReferenceError),ref}var syntax,hasRequiredSyntax;function requireSyntax(){return hasRequiredSyntax||(hasRequiredSyntax=1,syntax=SyntaxError),syntax}var type,hasRequiredType;function requireType(){return hasRequiredType||(hasRequiredType=1,type=TypeError),type}var uri,hasRequiredUri;function requireUri(){return hasRequiredUri||(hasRequiredUri=1,uri=URIError),uri}var abs,hasRequiredAbs;function requireAbs(){return hasRequiredAbs||(hasRequiredAbs=1,abs=Math.abs),abs}var floor,hasRequiredFloor;function requireFloor(){return hasRequiredFloor||(hasRequiredFloor=1,floor=Math.floor),floor}var max,hasRequiredMax;function requireMax(){return hasRequiredMax||(hasRequiredMax=1,max=Math.max),max}var min,hasRequiredMin;function requireMin(){return hasRequiredMin||(hasRequiredMin=1,min=Math.min),min}var pow,hasRequiredPow;function requirePow(){return hasRequiredPow||(hasRequiredPow=1,pow=Math.pow),pow}
vendor: 13,429 bytes, line 1482
1482var round,hasRequiredRound;function requireRound(){return hasRequiredRound||(hasRequiredRound=1,round=Math.round),round}var _isNaN,hasRequired_isNaN;function require_isNaN(){return hasRequired_isNaN||(hasRequired_isNaN=1,_isNaN=Number.isNaN||function(_e){return _e!==_e}),_isNaN}var sign$2,hasRequiredSign$1;function requireSign$1(){if(hasRequiredSign$1)return sign$2;hasRequiredSign$1=1;var yt=require_isNaN();return sign$2=function($t){return yt($t)||$t===0?$t:$t<0?-1:1},sign$2}var gOPD,hasRequiredGOPD;function requireGOPD(){return hasRequiredGOPD||(hasRequiredGOPD=1,gOPD=Object.getOwnPropertyDescriptor),gOPD}var gopd,hasRequiredGopd;function requireGopd(){if(hasRequiredGopd)return gopd;hasRequiredGopd=1;var yt=requireGOPD();if(yt)try{yt([],"length")}catch{yt=null}return gopd=yt,gopd}var esDefineProperty,hasRequiredEsDefineProperty;function requireEsDefineProperty(){if(hasRequiredEsDefineProperty)return esDefineProperty;hasRequiredEsDefineProperty=1;var yt=Object.defineProperty||!1;if(yt)try{yt({},"a",{value:1})}catch{yt=!1}return esDefineProperty=yt,esDefineProperty}var hasSymbols,hasRequiredHasSymbols;function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols;hasRequiredHasSymbols=1;var yt=typeof Symbol<"u"&&Symbol,_e=requireShams$1();return hasSymbols=function(){return typeof yt!="function"||typeof Symbol!="function"||typeof yt("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:_e()},hasSymbols}var Reflect_getPrototypeOf,hasRequiredReflect_getPrototypeOf;function requireReflect_getPrototypeOf(){return hasRequiredReflect_getPrototypeOf||(hasRequiredReflect_getPrototypeOf=1,Reflect_getPrototypeOf=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Reflect_getPrototypeOf}var Object_getPrototypeOf,hasRequiredObject_getPrototypeOf;function requireObject_getPrototypeOf(){if(hasRequiredObject_getPrototypeOf)return Object_getPrototypeOf;hasRequiredObject_getPrototypeOf=1;var yt=requireEsObjectAtoms();return Object_getPrototypeOf=yt.getPrototypeOf||null,Object_getPrototypeOf}var implementation,hasRequiredImplementation;function requireImplementation(){if(hasRequiredImplementation)return implementation;hasRequiredImplementation=1;var yt="Function.prototype.bind called on incompatible ",_e=Object.prototype.toString,$t=Math.max,Ft="[object Function]",Vt=function(Kt,Gt){for(var Jt=[],Xt=0;Xt<Kt.length;Xt+=1)Jt[Xt]=Kt[Xt];for(var Zt=0;Zt<Gt.length;Zt+=1)Jt[Zt+Kt.length]=Gt[Zt];return Jt},qt=function(Kt,Gt){for(var Jt=[],Xt=Gt,Zt=0;Xt<Kt.length;Xt+=1,Zt+=1)Jt[Zt]=Kt[Xt];return Jt},zt=function(Ht,Kt){for(var Gt="",Jt=0;Jt<Ht.length;Jt+=1)Gt+=Ht[Jt],Jt+1<Ht.length&&(Gt+=Kt);return Gt};return implementation=function(Kt){var Gt=this;if(typeof Gt!="function"||_e.apply(Gt)!==Ft)throw new TypeError(yt+Gt);for(var Jt=qt(arguments,1),Xt,Zt=function(){if(this instanceof Xt){var nr=Gt.apply(this,Vt(Jt,arguments));return Object(nr)===nr?nr:this}return Gt.apply(Kt,Vt(Jt,arguments))},er=$t(0,Gt.length-Jt.length),tr=[],rr=0;rr<er;rr++)tr[rr]="$"+rr;if(Xt=Function("binder","return function ("+zt(tr,",")+"){ return binder.apply(this,arguments); }")(Zt),Gt.prototype){var ar=function(){};ar.prototype=Gt.prototype,Xt.prototype=new ar,ar.prototype=null}return Xt},implementation}var functionBind,hasRequiredFunctionBind;function requireFunctionBind(){if(hasRequiredFunctionBind)return functionBind;hasRequiredFunctionBind=1;var yt=requireImplementation();return functionBind=Function.prototype.bind||yt,functionBind}var functionCall,hasRequiredFunctionCall;function requireFunctionCall(){return hasRequiredFunctionCall||(hasRequiredFunctionCall=1,functionCall=Function.prototype.call),functionCall}var functionApply,hasRequiredFunctionApply;function requireFunctionApply(){return hasRequiredFunctionApply||(hasRequiredFunctionApply=1,functionApply=Function.prototype.apply),functionApply}var reflectApply,hasRequiredReflectApply;function requireReflectApply(){return hasRequiredReflectApply||(hasRequiredReflectApply=1,reflectApply=typeof Reflect<"u"&&Reflect&&Reflect.apply),reflectApply}var actualApply,hasRequiredActualApply;function requireActualApply(){if(hasRequiredActualApply)return actualApply;hasRequiredActualApply=1;var yt=requireFunctionBind(),_e=requireFunctionApply(),$t=requireFunctionCall(),Ft=requireReflectApply();return actualApply=Ft||yt.call($t,_e),actualApply}var callBindApplyHelpers,hasRequiredCallBindApplyHelpers;function requireCallBindApplyHelpers(){if(hasRequiredCallBindApplyHelpers)return callBindApplyHelpers;hasRequiredCallBindApplyHelpers=1;var yt=requireFunctionBind(),_e=requireType(),$t=requireFunctionCall(),Ft=requireActualApply();return callBindApplyHelpers=function(qt){if(qt.length<1||typeof qt[0]!="function")throw new _e("a function is required");return Ft(yt,$t,qt)},callBindApplyHelpers}var get,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get;hasRequiredGet=1;var yt=requireCallBindApplyHelpers(),_e=requireGopd(),$t;try{$t=[].__proto__===Array.prototype}catch(zt){if(!zt||typeof zt!="object"||!("code"in zt)||zt.code!=="ERR_PROTO_ACCESS")throw zt}var Ft=!!$t&&_e&&_e(Object.prototype,"__proto__"),Vt=Object,qt=Vt.getPrototypeOf;return get=Ft&&typeof Ft.get=="function"?yt([Ft.get]):typeof qt=="function"?function(Ht){return qt(Ht==null?Ht:Vt(Ht))}:!1,get}var getProto,hasRequiredGetProto;function requireGetProto(){if(hasRequiredGetProto)return getProto;hasRequiredGetProto=1;var yt=requireReflect_getPrototypeOf(),_e=requireObject_getPrototypeOf(),$t=requireGet();return getProto=yt?function(Vt){return yt(Vt)}:_e?function(Vt){if(!Vt||typeof Vt!="object"&&typeof Vt!="function")throw new TypeError("getProto: not an object");return _e(Vt)}:$t?function(Vt){return $t(Vt)}:null,getProto}var hasown,hasRequiredHasown;function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var yt=Function.prototype.call,_e=Object.prototype.hasOwnProperty,$t=requireFunctionBind();return hasown=$t.call(yt,_e),hasown}var getIntrinsic,hasRequiredGetIntrinsic;function requireGetIntrinsic(){if(hasRequiredGetIntrinsic)return getIntrinsic;hasRequiredGetIntrinsic=1;var yt,_e=requireEsObjectAtoms(),$t=requireEsErrors(),Ft=require_eval(),Vt=requireRange(),qt=requireRef(),zt=requireSyntax(),Ht=requireType(),Kt=requireUri(),Gt=requireAbs(),Jt=requireFloor(),Xt=requireMax(),Zt=requireMin(),er=requirePow(),tr=requireRound(),rr=requireSign$1(),ar=Function,nr=function(Lr){try{return ar('"use strict"; return ('+Lr+").constructor;")()}catch{}},cr=requireGopd(),fr=requireEsDefineProperty(),vr=function(){throw new Ht},xr=cr?function(){try{return arguments.callee,vr}catch{try{return cr(arguments,"callee").get}catch{return vr}}}():vr,Sr=requireHasSymbols()(),Tr=requireGetProto(),Br=requireObject_getPrototypeOf(),jr=requireReflect_getPrototypeOf(),Rr=requireFunctionApply(),yr=requireFunctionCall(),sr={},or=typeof Uint8Array>"u"||!Tr?yt:Tr(Uint8Array),Qt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?yt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?yt:ArrayBuffer,"%ArrayIteratorPrototype%":Sr&&Tr?Tr([][Symbol.iterator]()):yt,"%AsyncFromSyncIteratorPrototype%":yt,"%AsyncFunction%":sr,"%AsyncGenerator%":sr,"%AsyncGeneratorFunction%":sr,"%AsyncIteratorPrototype%":sr,"%Atomics%":typeof Atomics>"u"?yt:Atomics,"%BigInt%":typeof BigInt>"u"?yt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?yt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?yt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?yt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$t,"%eval%":eval,"%EvalError%":Ft,"%Float16Array%":typeof Float16Array>"u"?yt:Float16Array,"%Float32Array%":typeof Float32Array>"u"?yt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?yt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?yt:FinalizationRegistry,"%Function%":ar,"%GeneratorFunction%":sr,"%Int8Array%":typeof Int8Array>"u"?yt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?yt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?yt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Sr&&Tr?Tr(Tr([][Symbol.iterator]())):yt,"%JSON%":typeof JSON=="object"?JSON:yt,"%Map%":typeof Map>"u"?yt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Sr||!Tr?yt:Tr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":_e,"%Object.getOwnPropertyDescriptor%":cr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?yt:Promise,"%Proxy%":typeof Proxy>"u"?yt:Proxy,"%RangeError%":Vt,"%ReferenceError%":qt,"%Reflect%":typeof Reflect>"u"?yt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?yt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Sr||!Tr?yt:Tr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?yt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Sr&&Tr?Tr(""[Symbol.iterator]()):yt,"%Symbol%":Sr?Symbol:yt,"%SyntaxError%":zt,"%ThrowTypeError%":xr,"%TypedArray%":or,"%TypeError%":Ht,"%Uint8Array%":typeof Uint8Array>"u"?yt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?yt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?yt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?yt:Uint32Array,"%URIError%":Kt,"%WeakMap%":typeof WeakMap>"u"?yt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?yt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?yt:WeakSet,"%Function.prototype.call%":yr,"%Function.prototype.apply%":Rr,"%Object.defineProperty%":fr,"%Object.getPrototypeOf%":Br,"%Math.abs%":Gt,"%Math.floor%":Jt,"%Math.max%":Xt,"%Math.min%":Zt,"%Math.pow%":er,"%Math.round%":tr,"%Math.sign%":rr,"%Reflect.getPrototypeOf%":jr};if(Tr)try{null.error}catch(Lr){var ir=Tr(Tr(Lr));Qt["%Error.prototype%"]=ir}var ur=function Lr(Cr){var Er;if(Cr==="%AsyncFunction%")Er=nr("async function () {}");else if(Cr==="%GeneratorFunction%")Er=nr("function* () {}");else if(Cr==="%AsyncGeneratorFunction%")Er=nr("async function* () {}");else if(Cr==="%AsyncGenerator%"){var Ar=Lr("%AsyncGeneratorFunction%");Ar&&(Er=Ar.prototype)}else if(Cr==="%AsyncIteratorPrototype%"){var zr=Lr("%AsyncGenerator%");zr&&Tr&&(Er=Tr(zr.prototype))}return Qt[Cr]=Er,Er},gr={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},dr=requireFunctionBind(),lr=requireHasown(),hr=dr.call(yr,Array.prototype.concat),wr=dr.call(Rr,Array.prototype.splice),pr=dr.call(yr,String.prototype.replace),br=dr.call(yr,String.prototype.slice),Dr=dr.call(yr,RegExp.prototype.exec),_r=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Nr=/\\(\\)?/g,kr=function(Cr){var Er=br(Cr,0,1),Ar=br(Cr,-1);if(Er==="%"&&Ar!=="%")throw new zt("invalid intrinsic syntax, expected closing `%`");if(Ar==="%"&&Er!=="%")throw new zt("invalid intrinsic syntax, expected opening `%`");var zr=[];return pr(Cr,_r,function(Vr,Gr,tn,Yr){zr[zr.length]=tn?pr(Yr,Nr,"$1"):Gr||Vr}),zr},Mr=function(Cr,Er){var Ar=Cr,zr;
vendor: 2,334 bytes, line 1482
1482if(lr(gr,Ar)&&(zr=gr[Ar],Ar="%"+zr[0]+"%"),lr(Qt,Ar)){var Vr=Qt[Ar];if(Vr===sr&&(Vr=ur(Ar)),typeof Vr>"u"&&!Er)throw new Ht("intrinsic "+Cr+" exists, but is not available. Please file an issue!");return{alias:zr,name:Ar,value:Vr}}throw new zt("intrinsic "+Cr+" does not exist!")};return getIntrinsic=function(Cr,Er){if(typeof Cr!="string"||Cr.length===0)throw new Ht("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Er!="boolean")throw new Ht('"allowMissing" argument must be a boolean');if(Dr(/^%?[^%]*%?$/,Cr)===null)throw new zt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Ar=kr(Cr),zr=Ar.length>0?Ar[0]:"",Vr=Mr("%"+zr+"%",Er),Gr=Vr.name,tn=Vr.value,Yr=!1,Jr=Vr.alias;Jr&&(zr=Jr[0],wr(Ar,hr([0,1],Jr)));for(var Kr=1,Xr=!0;Kr<Ar.length;Kr+=1){var Qr=Ar[Kr],un=br(Qr,0,1),an=br(Qr,-1);if((un==='"'||un==="'"||un==="`"||an==='"'||an==="'"||an==="`")&&un!==an)throw new zt("property names with quotes must have matching quotes");if((Qr==="constructor"||!Xr)&&(Yr=!0),zr+="."+Qr,Gr="%"+zr+"%",lr(Qt,Gr))tn=Qt[Gr];else if(tn!=null){if(!(Qr in tn)){if(!Er)throw new Ht("base intrinsic for "+Cr+" exists, but the property is not available.");return}if(cr&&Kr+1>=Ar.length){var sn=cr(tn,Qr);Xr=!!sn,Xr&&"get"in sn&&!("originalValue"in sn.get)?tn=sn.get:tn=tn[Qr]}else Xr=lr(tn,Qr),tn=tn[Qr];Xr&&!Yr&&(Qt[Gr]=tn)}}return tn},getIntrinsic}var callBound,hasRequiredCallBound;function requireCallBound(){if(hasRequiredCallBound)return callBound;hasRequiredCallBound=1;var yt=requireGetIntrinsic(),_e=requireCallBindApplyHelpers(),$t=_e([yt("%String.prototype.indexOf%")]);return callBound=function(Vt,qt){var zt=yt(Vt,!!qt);return typeof zt=="function"&&$t(Vt,".prototype.")>-1?_e([zt]):zt},callBound}var isArguments,hasRequiredIsArguments;function requireIsArguments(){if(hasRequiredIsArguments)return isArguments;hasRequiredIsArguments=1;var yt=requireShams()(),_e=requireCallBound(),$t=_e("Object.prototype.toString"),Ft=function(Ht){return yt&&Ht&&typeof Ht=="object"&&Symbol.toStringTag in Ht?!1:$t(Ht)==="[object Arguments]"},Vt=function(Ht){return Ft(Ht)?!0:Ht!==null&&typeof Ht=="object"&&"length"in Ht&&typeof Ht.length=="number"&&Ht.length>=0&&$t(Ht)!=="[object Array]"&&"callee"in Ht&&$t(Ht.callee)==="[object Function]"},qt=function(){return Ft(arguments)}();
1482return Ft.isLegacyArguments=Vt,isArguments=qt?Ft:Vt,isArguments}var isRegex,hasRequiredIsRegex;function requireIsRegex(){if(hasRequiredIsRegex)return isRegex;hasRequiredIsRegex=1;var yt=requireCallBound(),_e=requireShams()(),$t=requireHasown(),Ft=requireGopd(),Vt;if(_e){var qt=yt("RegExp.prototype.exec"),zt={},Ht=function(){throw zt},Kt={toString:Ht,valueOf:Ht};typeof Symbol.toPrimitive=="symbol"&&(Kt[Symbol.toPrimitive]=Ht),Vt=function(Zt){if(!Zt||typeof Zt!="object")return!1;var er=Ft(Zt,"lastIndex"),tr=er&&$t(er,"value");if(!tr)return!1;try{qt(Zt,Kt)}catch(rr){return rr===zt}}}else{var Gt=yt("Object.prototype.toString"),Jt="[object RegExp]";Vt=function(Zt){return!Zt||typeof Zt!="object"&&typeof Zt!="function"?!1:Gt(Zt)===Jt}}return isRegex=Vt,isRegex}var safeRegexTest,hasRequiredSafeRegexTest;function requireSafeRegexTest(){if(hasRequiredSafeRegexTest)return safeRegexTest;hasRequiredSafeRegexTest=1;var yt=requireCallBound(),_e=requireIsRegex(),$t=yt("RegExp.prototype.exec"),Ft=requireType();return safeRegexTest=function(qt){if(!_e(qt))throw new Ft("`regex` must be a RegExp");return function(Ht){return $t(qt,Ht)!==null}},safeRegexTest}var isGeneratorFunction,hasRequiredIsGeneratorFunction;function requireIsGeneratorFunction(){if(hasRequiredIsGeneratorFunction)return isGeneratorFunction;hasRequiredIsGeneratorFunction=1;var yt=requireCallBound(),_e=requireSafeRegexTest(),$t=_e(/^\s*(?:function)?\*/),Ft=requireShams()(),Vt=requireGetProto(),qt=yt("Object.prototype.toString"),zt=yt("Function.prototype.toString"),Ht=function(){if(!Ft)return!1;try{return Function("return function*() {}")()}catch{}},Kt;return isGeneratorFunction=function(Jt){if(typeof Jt!="function")return!1;if($t(zt(Jt)))return!0;if(!Ft){var Xt=qt(Jt);return Xt==="[object GeneratorFunction]"}if(!Vt)return!1;if(typeof Kt>"u"){var Zt=Ht();Kt=Zt?Vt(Zt):!1}return Vt(Jt)===Kt},isGeneratorFunction}var isCallable,hasRequiredIsCallable;function requireIsCallable(){if(hasRequiredIsCallable)return isCallable;hasRequiredIsCallable=1;var yt=Function.prototype.toString,_e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,$t,Ft;if(typeof _e=="function"&&typeof Object.defineProperty=="function")try{$t=Object.defineProperty({},"length",{get:function(){throw Ft}}),Ft={},_e(function(){throw 42},null,$t)}catch(cr){cr!==Ft&&(_e=null)}else _e=null;var Vt=/^\s*class\b/,qt=function(fr){try{var vr=yt.call(fr);return Vt.test(vr)}catch{return!1}},zt=function(fr){try{return qt(fr)?!1:(yt.call(fr),!0)}catch{return!1}},Ht=Object.prototype.toString,Kt="[object Object]",Gt="[object Function]",Jt="[object GeneratorFunction]",Xt="[object HTMLAllCollection]",Zt="[object HTML document.all class]",er="[object HTMLCollection]",tr=typeof Symbol=="function"&&!!Symbol.toStringTag,rr=!(0 in[,]),ar=function(){return!1};if(typeof document=="object"){var nr=document.all;Ht.call(nr)===Ht.call(document.all)&&(ar=function(fr){if((rr||!fr)&&(typeof fr>"u"||typeof fr=="object"))try{var vr=Ht.call(fr);return(vr===Xt||vr===Zt||vr===er||vr===Kt)&&fr("")==null}catch{}return!1})}return isCallable=_e?function(fr){if(ar(fr))return!0;if(!fr||typeof fr!="function"&&typeof fr!="object")return!1;try{_e(fr,null,$t)}catch(vr){if(vr!==Ft)return!1}return!qt(fr)&&zt(fr)}:function(fr){if(ar(fr))return!0;if(!fr||typeof fr!="function"&&typeof fr!="object")return!1;if(tr)return zt(fr);if(qt(fr))return!1;var vr=Ht.call(fr);return vr!==Gt&&vr!==Jt&&!/^\[object HTML/.test(vr)?!1:zt(fr)},isCallable}var forEach,hasRequiredForEach;function requireForEach(){if(hasRequiredForEach)return forEach;hasRequiredForEach=1;var yt=requireIsCallable(),_e=Object.prototype.toString,$t=Object.prototype.hasOwnProperty,Ft=function(Kt,Gt,Jt){for(var Xt=0,Zt=Kt.length;Xt<Zt;Xt++)$t.call(Kt,Xt)&&(Jt==null?Gt(Kt[Xt],Xt,Kt):Gt.call(Jt,Kt[Xt],Xt,Kt))},Vt=function(Kt,Gt,Jt){for(var Xt=0,Zt=Kt.length;Xt<Zt;Xt++)Jt==null?Gt(Kt.charAt(Xt),Xt,Kt):Gt.call(Jt,Kt.charAt(Xt),Xt,Kt)},qt=function(Kt,Gt,Jt){for(var Xt in Kt)$t.call(Kt,Xt)&&(Jt==null?Gt(Kt[Xt],Xt,Kt):Gt.call(Jt,Kt[Xt],Xt,Kt))};function zt(Ht){return _e.call(Ht)==="[object Array]"}return forEach=function(Kt,Gt,Jt){if(!yt(Gt))throw new TypeError("iterator must be a function");var Xt;arguments.length>=3&&(Xt=Jt),zt(Kt)?Ft(Kt,Gt,Xt):typeof Kt=="string"?Vt(Kt,Gt,Xt):qt(Kt,Gt,Xt)}
1482,forEach}var possibleTypedArrayNames,hasRequiredPossibleTypedArrayNames;function requirePossibleTypedArrayNames(){return hasRequiredPossibleTypedArrayNames||(hasRequiredPossibleTypedArrayNames=1,possibleTypedArrayNames=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),possibleTypedArrayNames}var availableTypedArrays,hasRequiredAvailableTypedArrays;function requireAvailableTypedArrays(){if(hasRequiredAvailableTypedArrays)return availableTypedArrays;hasRequiredAvailableTypedArrays=1;var yt=requirePossibleTypedArrayNames(),_e=globalThis;return availableTypedArrays=function(){for(var Ft=[],Vt=0;Vt<yt.length;Vt++)typeof _e[yt[Vt]]=="function"&&(Ft[Ft.length]=yt[Vt]);return Ft},availableTypedArrays}var callBind={exports:{}},defineDataProperty,hasRequiredDefineDataProperty;function requireDefineDataProperty(){if(hasRequiredDefineDataProperty)return defineDataProperty;hasRequiredDefineDataProperty=1;var yt=requireEsDefineProperty(),_e=requireSyntax(),$t=requireType(),Ft=requireGopd();return defineDataProperty=function(qt,zt,Ht){if(!qt||typeof qt!="object"&&typeof qt!="function")throw new $t("`obj` must be an object or a function`");if(typeof zt!="string"&&typeof zt!="symbol")throw new $t("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new $t("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new $t("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new $t("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new $t("`loose`, if provided, must be a boolean");var Kt=arguments.length>3?arguments[3]:null,Gt=arguments.length>4?arguments[4]:null,Jt=arguments.length>5?arguments[5]:null,Xt=arguments.length>6?arguments[6]:!1,Zt=!!Ft&&Ft(qt,zt);if(yt)yt(qt,zt,{configurable:Jt===null&&Zt?Zt.configurable:!Jt,enumerable:Kt===null&&Zt?Zt.enumerable:!Kt,value:Ht,writable:Gt===null&&Zt?Zt.writable:!Gt});else if(Xt||!Kt&&!Gt&&!Jt)qt[zt]=Ht;else throw new _e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},defineDataProperty}var hasPropertyDescriptors_1,hasRequiredHasPropertyDescriptors;function requireHasPropertyDescriptors(){if(hasRequiredHasPropertyDescriptors)return hasPropertyDescriptors_1;hasRequiredHasPropertyDescriptors=1;var yt=requireEsDefineProperty(),_e=function(){return!!yt};return _e.hasArrayLengthDefineBug=function(){if(!yt)return null;try{return yt([],"length",{value:1}).length!==1}catch{return!0}},hasPropertyDescriptors_1=_e,hasPropertyDescriptors_1}var setFunctionLength,hasRequiredSetFunctionLength;function requireSetFunctionLength(){if(hasRequiredSetFunctionLength)return setFunctionLength;hasRequiredSetFunctionLength=1;var yt=requireGetIntrinsic(),_e=requireDefineDataProperty(),$t=requireHasPropertyDescriptors()(),Ft=requireGopd(),Vt=requireType(),qt=yt("%Math.floor%");return setFunctionLength=function(Ht,Kt){if(typeof Ht!="function")throw new Vt("`fn` is not a function");if(typeof Kt!="number"||Kt<0||Kt>4294967295||qt(Kt)!==Kt)throw new Vt("`length` must be a positive 32-bit integer");var Gt=arguments.length>2&&!!arguments[2],Jt=!0,Xt=!0;if("length"in Ht&&Ft){var Zt=Ft(Ht,"length");Zt&&!Zt.configurable&&(Jt=!1),Zt&&!Zt.writable&&(Xt=!1)}return(Jt||Xt||!Gt)&&($t?_e(Ht,"length",Kt,!0,!0):_e(Ht,"length",Kt)),Ht},setFunctionLength}var applyBind,hasRequiredApplyBind;function requireApplyBind(){if(hasRequiredApplyBind)return applyBind;hasRequiredApplyBind=1;var yt=requireFunctionBind(),_e=requireFunctionApply(),$t=requireActualApply();return applyBind=function(){return $t(yt,_e,arguments)},applyBind}var hasRequiredCallBind;function requireCallBind(){return hasRequiredCallBind||(hasRequiredCallBind=1,function(yt){var _e=requireSetFunctionLength(),$t=requireEsDefineProperty(),Ft=requireCallBindApplyHelpers(),Vt=requireApplyBind();yt.exports=function(zt){var Ht=Ft(arguments),Kt=zt.length-(arguments.length-1);return _e(Ht,1+(Kt>0?Kt:0),!0)},$t?$t(yt.exports,"apply",{value:Vt}):yt.exports.apply=Vt}(callBind)),callBind.exports}
1482var whichTypedArray,hasRequiredWhichTypedArray;function requireWhichTypedArray(){if(hasRequiredWhichTypedArray)return whichTypedArray;hasRequiredWhichTypedArray=1;var yt=requireForEach(),_e=requireAvailableTypedArrays(),$t=requireCallBind(),Ft=requireCallBound(),Vt=requireGopd(),qt=requireGetProto(),zt=Ft("Object.prototype.toString"),Ht=requireShams()(),Kt=globalThis,Gt=_e(),Jt=Ft("String.prototype.slice"),Xt=Ft("Array.prototype.indexOf",!0)||function(ar,nr){for(var cr=0;cr<ar.length;cr+=1)if(ar[cr]===nr)return cr;return-1},Zt={__proto__:null};Ht&&Vt&&qt?yt(Gt,function(rr){var ar=new Kt[rr];if(Symbol.toStringTag in ar&&qt){var nr=qt(ar),cr=Vt(nr,Symbol.toStringTag);if(!cr&&nr){var fr=qt(nr);cr=Vt(fr,Symbol.toStringTag)}Zt["$"+rr]=$t(cr.get)}}):yt(Gt,function(rr){var ar=new Kt[rr],nr=ar.slice||ar.set;nr&&(Zt["$"+rr]=$t(nr))});var er=function(ar){var nr=!1;return yt(Zt,function(cr,fr){if(!nr)try{"$"+cr(ar)===fr&&(nr=Jt(fr,1))}catch{}}),nr},tr=function(ar){var nr=!1;return yt(Zt,function(cr,fr){if(!nr)try{cr(ar),nr=Jt(fr,1)}catch{}}),nr};return whichTypedArray=function(ar){if(!ar||typeof ar!="object")return!1;if(!Ht){var nr=Jt(zt(ar),8,-1);return Xt(Gt,nr)>-1?nr:nr!=="Object"?!1:tr(ar)}return Vt?er(ar):null},whichTypedArray}var isTypedArray$2,hasRequiredIsTypedArray;function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray$2;hasRequiredIsTypedArray=1;var yt=requireWhichTypedArray();return isTypedArray$2=function($t){return!!yt($t)},isTypedArray$2}var hasRequiredTypes;function requireTypes(){return hasRequiredTypes||(hasRequiredTypes=1,function(yt){var _e=requireIsArguments(),$t=requireIsGeneratorFunction(),Ft=requireWhichTypedArray(),Vt=requireIsTypedArray();function qt(Kr){return Kr.call.bind(Kr)}var zt=typeof BigInt<"u",Ht=typeof Symbol<"u",Kt=qt(Object.prototype.toString),Gt=qt(Number.prototype.valueOf),Jt=qt(String.prototype.valueOf),Xt=qt(Boolean.prototype.valueOf);if(zt)var Zt=qt(BigInt.prototype.valueOf);if(Ht)var er=qt(Symbol.prototype.valueOf);function tr(Kr,Xr){if(typeof Kr!="object")return!1;try{return Xr(Kr),!0}catch{return!1}}yt.isArgumentsObject=_e,yt.isGeneratorFunction=$t,yt.isTypedArray=Vt;function rr(Kr){return typeof Promise<"u"&&Kr instanceof Promise||Kr!==null&&typeof Kr=="object"&&typeof Kr.then=="function"&&typeof Kr.catch=="function"}yt.isPromise=rr;function ar(Kr){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Kr):Vt(Kr)||br(Kr)}yt.isArrayBufferView=ar;function nr(Kr){return Ft(Kr)==="Uint8Array"}yt.isUint8Array=nr;function cr(Kr){return Ft(Kr)==="Uint8ClampedArray"}yt.isUint8ClampedArray=cr;function fr(Kr){return Ft(Kr)==="Uint16Array"}yt.isUint16Array=fr;function vr(Kr){return Ft(Kr)==="Uint32Array"}yt.isUint32Array=vr;function xr(Kr){return Ft(Kr)==="Int8Array"}yt.isInt8Array=xr;function Sr(Kr){return Ft(Kr)==="Int16Array"}yt.isInt16Array=Sr;function Tr(Kr){return Ft(Kr)==="Int32Array"}yt.isInt32Array=Tr;function Br(Kr){return Ft(Kr)==="Float32Array"}yt.isFloat32Array=Br;function jr(Kr){return Ft(Kr)==="Float64Array"}yt.isFloat64Array=jr;function Rr(Kr){return Ft(Kr)==="BigInt64Array"}yt.isBigInt64Array=Rr;function yr(Kr){return Ft(Kr)==="BigUint64Array"}yt.isBigUint64Array=yr;function sr(Kr){return Kt(Kr)==="[object Map]"}sr.working=typeof Map<"u"&&sr(new Map);function or(Kr){return typeof Map>"u"?!1:sr.working?sr(Kr):Kr instanceof Map}yt.isMap=or;function Qt(Kr){return Kt(Kr)==="[object Set]"}Qt.working=typeof Set<"u"&&Qt(new Set);function ir(Kr){return typeof Set>"u"?!1:Qt.working?Qt(Kr):Kr instanceof Set}yt.isSet=ir;function ur(Kr){return Kt(Kr)==="[object WeakMap]"}ur.working=typeof WeakMap<"u"&&ur(new WeakMap);function gr(Kr){return typeof WeakMap>"u"?!1:ur.working?ur(Kr):Kr instanceof WeakMap}yt.isWeakMap=gr;function dr(Kr){return Kt(Kr)==="[object WeakSet]"}dr.working=typeof WeakSet<"u"&&dr(new WeakSet);function lr(Kr){return dr(Kr)}yt.isWeakSet=lr;function hr(Kr){return Kt(Kr)==="[object ArrayBuffer]"}hr.working=typeof ArrayBuffer<"u"&&hr(new ArrayBuffer);function wr(Kr){return typeof ArrayBuffer>"u"?!1:hr.working?hr(Kr):Kr instanceof ArrayBuffer}yt.isArrayBuffer=wr;function pr(Kr){return Kt(Kr)==="[object DataView]"}pr.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&pr(new DataView(new ArrayBuffer(1),0,1));function br(Kr){return typeof DataView>"u"?!1:pr.working?pr(Kr):Kr instanceof DataView}
1482yt.isDataView=br;var Dr=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function _r(Kr){return Kt(Kr)==="[object SharedArrayBuffer]"}function Nr(Kr){return typeof Dr>"u"?!1:(typeof _r.working>"u"&&(_r.working=_r(new Dr)),_r.working?_r(Kr):Kr instanceof Dr)}yt.isSharedArrayBuffer=Nr;function kr(Kr){return Kt(Kr)==="[object AsyncFunction]"}yt.isAsyncFunction=kr;function Mr(Kr){return Kt(Kr)==="[object Map Iterator]"}yt.isMapIterator=Mr;function Lr(Kr){return Kt(Kr)==="[object Set Iterator]"}yt.isSetIterator=Lr;function Cr(Kr){return Kt(Kr)==="[object Generator]"}yt.isGeneratorObject=Cr;function Er(Kr){return Kt(Kr)==="[object WebAssembly.Module]"}yt.isWebAssemblyCompiledModule=Er;function Ar(Kr){return tr(Kr,Gt)}yt.isNumberObject=Ar;function zr(Kr){return tr(Kr,Jt)}yt.isStringObject=zr;function Vr(Kr){return tr(Kr,Xt)}yt.isBooleanObject=Vr;function Gr(Kr){return zt&&tr(Kr,Zt)}yt.isBigIntObject=Gr;function tn(Kr){return Ht&&tr(Kr,er)}yt.isSymbolObject=tn;function Yr(Kr){return Ar(Kr)||zr(Kr)||Vr(Kr)||Gr(Kr)||tn(Kr)}yt.isBoxedPrimitive=Yr;function Jr(Kr){return typeof Uint8Array<"u"&&(wr(Kr)||Nr(Kr))}yt.isAnyArrayBuffer=Jr,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Kr){Object.defineProperty(yt,Kr,{enumerable:!1,value:function(){throw new Error(Kr+" is not supported in userland")}})})}(types$2)),types$2}var isBufferBrowser,hasRequiredIsBufferBrowser;function requireIsBufferBrowser(){return hasRequiredIsBufferBrowser||(hasRequiredIsBufferBrowser=1,isBufferBrowser=function(_e){return _e&&typeof _e=="object"&&typeof _e.copy=="function"&&typeof _e.fill=="function"&&typeof _e.readUInt8=="function"}),isBufferBrowser}var hasRequiredUtil$1;function requireUtil$1(){return hasRequiredUtil$1||(hasRequiredUtil$1=1,function(yt){var _e={},$t=Object.getOwnPropertyDescriptors||function(Dr){for(var _r=Object.keys(Dr),Nr={},kr=0;kr<_r.length;
vendor: 4,387 bytes, line 1482
1482kr++)Nr[_r[kr]]=Object.getOwnPropertyDescriptor(Dr,_r[kr]);return Nr},Ft=/%[sdj%]/g;yt.format=function(br){if(!Sr(br)){for(var Dr=[],_r=0;_r<arguments.length;_r++)Dr.push(Ht(arguments[_r]));return Dr.join(" ")}for(var _r=1,Nr=arguments,kr=Nr.length,Mr=String(br).replace(Ft,function(Cr){if(Cr==="%%")return"%";if(_r>=kr)return Cr;switch(Cr){case"%s":return String(Nr[_r++]);case"%d":return Number(Nr[_r++]);case"%j":try{return JSON.stringify(Nr[_r++])}catch{return"[Circular]"}default:return Cr}}),Lr=Nr[_r];_r<kr;Lr=Nr[++_r])fr(Lr)||!Rr(Lr)?Mr+=" "+Lr:Mr+=" "+Ht(Lr);return Mr},yt.deprecate=function(br,Dr){if(typeof process$1<"u"&&process$1.noDeprecation===!0)return br;if(typeof process$1>"u")return function(){return yt.deprecate(br,Dr).apply(this,arguments)};var _r=!1;function Nr(){if(!_r){if(process$1.throwDeprecation)throw new Error(Dr);process$1.traceDeprecation?console.trace(Dr):console.error(Dr),_r=!0}return br.apply(this,arguments)}return Nr};var Vt={},qt=/^$/;if(_e.NODE_DEBUG){var zt=_e.NODE_DEBUG;zt=zt.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),qt=new RegExp("^"+zt+"$","i")}yt.debuglog=function(br){if(br=br.toUpperCase(),!Vt[br])if(qt.test(br)){var Dr=process$1.pid;Vt[br]=function(){var _r=yt.format.apply(yt,arguments);console.error("%s %d: %s",br,Dr,_r)}}else Vt[br]=function(){};return Vt[br]};function Ht(br,Dr){var _r={seen:[],stylize:Gt};return arguments.length>=3&&(_r.depth=arguments[2]),arguments.length>=4&&(_r.colors=arguments[3]),cr(Dr)?_r.showHidden=Dr:Dr&&yt._extend(_r,Dr),Br(_r.showHidden)&&(_r.showHidden=!1),Br(_r.depth)&&(_r.depth=2),Br(_r.colors)&&(_r.colors=!1),Br(_r.customInspect)&&(_r.customInspect=!0),_r.colors&&(_r.stylize=Kt),Xt(_r,br,_r.depth)}yt.inspect=Ht,Ht.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Ht.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Kt(br,Dr){var _r=Ht.styles[Dr];return _r?"\x1B["+Ht.colors[_r][0]+"m"+br+"\x1B["+Ht.colors[_r][1]+"m":br}function Gt(br,Dr){return br}function Jt(br){var Dr={};return br.forEach(function(_r,Nr){Dr[_r]=!0}),Dr}function Xt(br,Dr,_r){if(br.customInspect&&Dr&&or(Dr.inspect)&&Dr.inspect!==yt.inspect&&!(Dr.constructor&&Dr.constructor.prototype===Dr)){var Nr=Dr.inspect(_r,br);return Sr(Nr)||(Nr=Xt(br,Nr,_r)),Nr}var kr=Zt(br,Dr);if(kr)return kr;var Mr=Object.keys(Dr),Lr=Jt(Mr);if(br.showHidden&&(Mr=Object.getOwnPropertyNames(Dr)),sr(Dr)&&(Mr.indexOf("message")>=0||Mr.indexOf("description")>=0))return er(Dr);if(Mr.length===0){if(or(Dr)){var Cr=Dr.name?": "+Dr.name:"";return br.stylize("[Function"+Cr+"]","special")}if(jr(Dr))return br.stylize(RegExp.prototype.toString.call(Dr),"regexp");if(yr(Dr))return br.stylize(Date.prototype.toString.call(Dr),"date");if(sr(Dr))return er(Dr)}var Er="",Ar=!1,zr=["{","}"];if(nr(Dr)&&(Ar=!0,zr=["[","]"]),or(Dr)){var Vr=Dr.name?": "+Dr.name:"";Er=" [Function"+Vr+"]"}if(jr(Dr)&&(Er=" "+RegExp.prototype.toString.call(Dr)),yr(Dr)&&(Er=" "+Date.prototype.toUTCString.call(Dr)),sr(Dr)&&(Er=" "+er(Dr)),Mr.length===0&&(!Ar||Dr.length==0))return zr[0]+Er+zr[1];if(_r<0)return jr(Dr)?br.stylize(RegExp.prototype.toString.call(Dr),"regexp"):br.stylize("[Object]","special");br.seen.push(Dr);var Gr;return Ar?Gr=tr(br,Dr,_r,Lr,Mr):Gr=Mr.map(function(tn){return rr(br,Dr,_r,Lr,tn,Ar)}),br.seen.pop(),ar(Gr,Er,zr)}function Zt(br,Dr){if(Br(Dr))return br.stylize("undefined","undefined");if(Sr(Dr)){var _r="'"+JSON.stringify(Dr).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return br.stylize(_r,"string")}if(xr(Dr))return br.stylize(""+Dr,"number");if(cr(Dr))return br.stylize(""+Dr,"boolean");if(fr(Dr))return br.stylize("null","null")}function er(br){return"["+Error.prototype.toString.call(br)+"]"}function tr(br,Dr,_r,Nr,kr){for(var Mr=[],Lr=0,Cr=Dr.length;Lr<Cr;++Lr)lr(Dr,String(Lr))?Mr.push(rr(br,Dr,_r,Nr,String(Lr),!0)):Mr.push("");return kr.forEach(function(Er){Er.match(/^\d+$/)||Mr.push(rr(br,Dr,_r,Nr,Er,!0))}),Mr}function rr(br,Dr,_r,Nr,kr,Mr){var Lr,Cr,Er;if(Er=Object.getOwnPropertyDescriptor(Dr,kr)||{value:Dr[kr]},Er.get?Er.set?Cr=br.stylize("[Getter/Setter]","special"):Cr=br.stylize("[Getter]","special"):Er.set&&(Cr=br.stylize("[
1482Setter]","special")),lr(Nr,kr)||(Lr="["+kr+"]"),Cr||(br.seen.indexOf(Er.value)<0?(fr(_r)?Cr=Xt(br,Er.value,null):Cr=Xt(br,Er.value,_r-1),Cr.indexOf(` 1483`)>-1&&(Mr?Cr=Cr.split(` 1484`).map(function(Ar){return" "+Ar}).join(` 1485`).slice(2):Cr=` 1486`+Cr.split(` 1487`).map(function(Ar){return" "+Ar}).join(` 1488`))):Cr=br.stylize("[Circular]","special")),Br(Lr)){if(Mr&&kr.match(/^\d+$/))return Cr;Lr=JSON.stringify(""+kr),Lr.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Lr=Lr.slice(1,-1),Lr=br.stylize(Lr,"name")):(Lr=Lr.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Lr=br.stylize(Lr,"string"))}return Lr+": "+Cr}function ar(br,Dr,_r){var Nr=br.reduce(function(kr,Mr){return Mr.indexOf(` 1489`)>=0,kr+Mr.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Nr>60?_r[0]+(Dr===""?"":Dr+` 1490 `)+" "+br.join(`, 1491 `)+" "+_r[1]:_r[0]+Dr+" "+br.join(", ")+" "+_r[1]}yt.types=requireTypes();function nr(br){return Array.isArray(br)}yt.isArray=nr;function cr(br){return typeof br=="boolean"}yt.isBoolean=cr;function fr(br){return br===null}yt.isNull=fr;function vr(br){return br==null}yt.isNullOrUndefined=vr;function xr(br){return typeof br=="number"}yt.isNumber=xr;function Sr(br){return typeof br=="string"}yt.isString=Sr;function Tr(br){return typeof br=="symbol"}yt.isSymbol=Tr;function Br(br){return br===void 0}yt.isUndefined=Br;function jr(br){return Rr(br)&&ir(br)==="[object RegExp]"}yt.isRegExp=jr,yt.types.isRegExp=jr;function Rr(br){return typeof br=="object"&&br!==null}yt.isObject=Rr;function yr(br){return Rr(br)&&ir(br)==="[object Date]"}yt.isDate=yr,yt.types.isDate=yr;function sr(br){return Rr(br)&&(ir(br)==="[object Error]"||br instanceof Error)}yt.isError=sr,yt.types.isNativeError=sr;function or(br){return typeof br=="function"}yt.isFunction=or;function Qt(br){return br===null||typeof br=="boolean"||typeof br=="number"||typeof br=="string"||typeof br=="symbol"||typeof br>"u"}yt.isPrimitive=Qt,yt.isBuffer=requireIsBufferBrowser();function ir(br){return Object.prototype.toString.call(br)}function ur(br){return br<10?"0"+br.toString(10):br.toString(10)}var gr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function dr(){var br=new Date,Dr=[ur(br.getHours()),ur(br.getMinutes()),ur(br.getSeconds())].join(":");return[br.getDate(),gr[br.getMonth()],Dr].join(" ")}yt.log=function(){console.log("%s - %s",dr(),yt.format.apply(yt,arguments))},yt.inherits=requireInherits_browser(),yt._extend=function(br,Dr){if(!Dr||!Rr(Dr))return br;for(var _r=Object.keys(Dr),Nr=_r.length;Nr--;)br[_r[Nr]]=Dr[_r[Nr]];return br};function lr(br,Dr){return Object.prototype.hasOwnProperty.call(br,Dr)}var hr=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;yt.promisify=function(Dr){if(typeof Dr!="function")throw new TypeError('The "original" argument must be of type Function');if(hr&&Dr[hr]){var _r=Dr[hr];if(typeof _r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(_r,hr,{value:_r,enumerable:!1,writable:!1,configurable:!0}),_r}function _r(){for(var Nr,kr,Mr=new Promise(function(Er,Ar){Nr=Er,kr=Ar}),Lr=[],Cr=0;Cr<arguments.length;Cr++)Lr.push(arguments[Cr]);Lr.push(function(Er,Ar){Er?kr(Er):Nr(Ar)});try{Dr.apply(this,Lr)}catch(Er){kr(Er)}return Mr}return Object.setPrototypeOf(_r,Object.getPrototypeOf(Dr)),hr&&Object.defineProperty(_r,hr,{value:_r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(_r,$t(Dr))},yt.promisify.custom=hr;function wr(br,Dr){if(!br){var _r=new Error("Promise was rejected with a falsy value");_r.reason=br,br=_r}return Dr(br)}function pr(br){if(typeof br!="function")throw new TypeError('The "original" argument must be of type Function');function Dr(){for(var _r=[],Nr=0;Nr<arguments.length;Nr++)_r.push(arguments[Nr]);var kr=_r.pop();if(typeof kr!="function")throw new TypeError("The last argument must be of type Function");var Mr=this,Lr=function(){return kr.apply(Mr,arguments)};br.apply(this,_r).then(function(Cr){process$1.nextTick(Lr.bind(null,null,Cr))},function(Cr){process$1.nextTick(wr.bind(null,Cr,Lr))})}
vendor: 6,926 bytes, line 1491
1491return Object.setPrototypeOf(Dr,Object.getPrototypeOf(br)),Object.defineProperties(Dr,$t(br)),Dr}yt.callbackify=pr}(util$1)),util$1}var buffer_list,hasRequiredBuffer_list;function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;hasRequiredBuffer_list=1;function yt(tr,rr){var ar=Object.keys(tr);if(Object.getOwnPropertySymbols){var nr=Object.getOwnPropertySymbols(tr);rr&&(nr=nr.filter(function(cr){return Object.getOwnPropertyDescriptor(tr,cr).enumerable})),ar.push.apply(ar,nr)}return ar}function _e(tr){for(var rr=1;rr<arguments.length;rr++){var ar=arguments[rr]!=null?arguments[rr]:{};rr%2?yt(Object(ar),!0).forEach(function(nr){$t(tr,nr,ar[nr])}):Object.getOwnPropertyDescriptors?Object.defineProperties(tr,Object.getOwnPropertyDescriptors(ar)):yt(Object(ar)).forEach(function(nr){Object.defineProperty(tr,nr,Object.getOwnPropertyDescriptor(ar,nr))})}return tr}function $t(tr,rr,ar){return rr=zt(rr),rr in tr?Object.defineProperty(tr,rr,{value:ar,enumerable:!0,configurable:!0,writable:!0}):tr[rr]=ar,tr}function Ft(tr,rr){if(!(tr instanceof rr))throw new TypeError("Cannot call a class as a function")}function Vt(tr,rr){for(var ar=0;ar<rr.length;ar++){var nr=rr[ar];nr.enumerable=nr.enumerable||!1,nr.configurable=!0,"value"in nr&&(nr.writable=!0),Object.defineProperty(tr,zt(nr.key),nr)}}function qt(tr,rr,ar){return rr&&Vt(tr.prototype,rr),Object.defineProperty(tr,"prototype",{writable:!1}),tr}function zt(tr){var rr=Ht(tr,"string");return typeof rr=="symbol"?rr:String(rr)}function Ht(tr,rr){if(typeof tr!="object"||tr===null)return tr;var ar=tr[Symbol.toPrimitive];if(ar!==void 0){var nr=ar.call(tr,rr||"default");if(typeof nr!="object")return nr;throw new TypeError("@@toPrimitive must return a primitive value.")}return(rr==="string"?String:Number)(tr)}var Kt=require$$1$2,Gt=Kt.Buffer,Jt=requireUtil$1(),Xt=Jt.inspect,Zt=Xt&&Xt.custom||"inspect";function er(tr,rr,ar){Gt.prototype.copy.call(tr,rr,ar)}return buffer_list=function(){function tr(){Ft(this,tr),this.head=null,this.tail=null,this.length=0}return qt(tr,[{key:"push",value:function(ar){var nr={data:ar,next:null};this.length>0?this.tail.next=nr:this.head=nr,this.tail=nr,++this.length}},{key:"unshift",value:function(ar){var nr={data:ar,next:this.head};this.length===0&&(this.tail=nr),this.head=nr,++this.length}},{key:"shift",value:function(){if(this.length!==0){var ar=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,ar}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(ar){if(this.length===0)return"";for(var nr=this.head,cr=""+nr.data;nr=nr.next;)cr+=ar+nr.data;return cr}},{key:"concat",value:function(ar){if(this.length===0)return Gt.alloc(0);for(var nr=Gt.allocUnsafe(ar>>>0),cr=this.head,fr=0;cr;)er(cr.data,nr,fr),fr+=cr.data.length,cr=cr.next;return nr}},{key:"consume",value:function(ar,nr){var cr;return ar<this.head.data.length?(cr=this.head.data.slice(0,ar),this.head.data=this.head.data.slice(ar)):ar===this.head.data.length?cr=this.shift():cr=nr?this._getString(ar):this._getBuffer(ar),cr}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(ar){var nr=this.head,cr=1,fr=nr.data;for(ar-=fr.length;nr=nr.next;){var vr=nr.data,xr=ar>vr.length?vr.length:ar;if(xr===vr.length?fr+=vr:fr+=vr.slice(0,ar),ar-=xr,ar===0){xr===vr.length?(++cr,nr.next?this.head=nr.next:this.head=this.tail=null):(this.head=nr,nr.data=vr.slice(xr));break}++cr}return this.length-=cr,fr}},{key:"_getBuffer",value:function(ar){var nr=Gt.allocUnsafe(ar),cr=this.head,fr=1;for(cr.data.copy(nr),ar-=cr.data.length;cr=cr.next;){var vr=cr.data,xr=ar>vr.length?vr.length:ar;if(vr.copy(nr,nr.length-ar,0,xr),ar-=xr,ar===0){xr===vr.length?(++fr,cr.next?this.head=cr.next:this.head=this.tail=null):(this.head=cr,cr.data=vr.slice(xr));break}++fr}return this.length-=fr,nr}},{key:Zt,value:function(ar,nr){return Xt(this,_e(_e({},nr),{},{depth:0,customInspect:!1}))}}]),tr}(),buffer_list}var destroy_1$1,hasRequiredDestroy$1;function requireDestroy$1(){if(hasRequiredDestroy$1)return destroy_1$1;hasRequiredDestroy$1=1;function yt(zt,Ht){var Kt=this,Gt=this._readableState&&this._readableState.destroyed,Jt=this._writableState&&this._writableState.destroyed;return Gt||Jt?(Ht?Ht(zt):zt&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process$1.nextTick(Vt,this,zt)):process$1.nextTick(Vt,this,zt)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(zt||null,function(Xt){!Ht&&Xt?Kt._writableState?Kt._writableState.errorEmitted?process$1.nextTick($t,Kt):(Kt._writableState.errorEmitted=!0,process$1.nextTick(_e,Kt,Xt)):process$1.nextTick(_e,Kt,Xt):Ht?(process$1.nextTick($t,Kt),Ht(Xt)):process$1.nextTick($t,Kt)}),this)}function _e(zt,Ht){Vt(zt,Ht),$t(zt)}function $t(zt){zt._writableState&&!zt._writableState.emitClose||zt._readableState&&!zt._readableState.emitClose||zt.emit("close")}function Ft(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Vt(zt,Ht){zt.emit("error",Ht)}function qt(zt,Ht){var Kt=zt._readableState,Gt=zt._writableState;Kt&&Kt.autoDestroy||Gt&&Gt.autoDestroy?zt.destroy(Ht):zt.emit("error",Ht)}return destroy_1$1={destroy:yt,undestroy:Ft,errorOrDestroy:qt},destroy_1$1}var errorsBrowser={},hasRequiredErrorsBrowser;function requireErrorsBrowser(){if(hasRequiredErrorsBrowser)return errorsBrowser;hasRequiredErrorsBrowser=1;function yt(Ht,Kt){Ht.prototype=Object.create(Kt.prototype),Ht.prototype.constructor=Ht,Ht.__proto__=Kt}var _e={};function $t(Ht,Kt,Gt){Gt||(Gt=Error);function Jt(Zt,er,tr){return typeof Kt=="string"?Kt:Kt(Zt,er,tr)}var Xt=function(Zt){yt(er,Zt);function er(tr,rr,ar){return Zt.call(this,Jt(tr,rr,ar))||this}return er}(Gt);Xt.prototype.name=Gt.name,Xt.prototype.code=Ht,_e[Ht]=Xt}function Ft(Ht,Kt){if(Array.isArray(Ht)){var Gt=Ht.length;return Ht=Ht.map(function(Jt){return String(Jt)}),Gt>2?"one of ".concat(Kt," ").concat(Ht.slice(0,Gt-1).join(", "),", or ")+Ht[Gt-1]:Gt===2?"one of ".concat(Kt," ").concat(Ht[0]," or ").concat(Ht[1]):"of ".concat(Kt," ").concat(Ht[0])}else return"of ".concat(Kt," ").concat(String(Ht))}function Vt(Ht,Kt,Gt){return Ht.substr(0,Kt.length)===Kt}function qt(Ht,Kt,Gt){return(Gt===void 0||Gt>Ht.length)&&(Gt=Ht.length),Ht.substring(Gt-Kt.length,Gt)===Kt}function zt(Ht,Kt,Gt){return typeof Gt!="number"&&(Gt=0),Gt+Kt.length>Ht.length?!1:Ht.indexOf(Kt,Gt)!==-1}return $t("ERR_INVALID_OPT_VALUE",function(Ht,Kt){return'The value "'+Kt+'" is invali
1491d for option "'+Ht+'"'},TypeError),$t("ERR_INVALID_ARG_TYPE",function(Ht,Kt,Gt){var Jt;typeof Kt=="string"&&Vt(Kt,"not ")?(Jt="must not be",Kt=Kt.replace(/^not /,"")):Jt="must be";var Xt;if(qt(Ht," argument"))Xt="The ".concat(Ht," ").concat(Jt," ").concat(Ft(Kt,"type"));else{var Zt=zt(Ht,".")?"property":"argument";Xt='The "'.concat(Ht,'" ').concat(Zt," ").concat(Jt," ").concat(Ft(Kt,"type"))}return Xt+=". Received type ".concat(typeof Gt),Xt},TypeError),$t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),$t("ERR_METHOD_NOT_IMPLEMENTED",function(Ht){return"The "+Ht+" method is not implemented"}),$t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),$t("ERR_STREAM_DESTROYED",function(Ht){return"Cannot call "+Ht+" after a stream was destroyed"}),$t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),$t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),$t("ERR_STREAM_WRITE_AFTER_END","write after end"),$t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),$t("ERR_UNKNOWN_ENCODING",function(Ht){return"Unknown encoding: "+Ht},TypeError),$t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),errorsBrowser.codes=_e,errorsBrowser}var state,hasRequiredState;function requireState(){if(hasRequiredState)return state;hasRequiredState=1;var yt=requireErrorsBrowser().codes.ERR_INVALID_OPT_VALUE;function _e(Ft,Vt,qt){return Ft.highWaterMark!=null?Ft.highWaterMark:Vt?Ft[qt]:null}function $t(Ft,Vt,qt,zt){var Ht=_e(Vt,zt,qt);if(Ht!=null){if(!(isFinite(Ht)&&Math.floor(Ht)===Ht)||Ht<0){var Kt=zt?qt:"highWaterMark";throw new yt(Kt,Ht)}return Math.floor(Ht)}return Ft.objectMode?16:16*1024}return state={getHighWaterMark:$t},state}var browser$a,hasRequiredBrowser$a;function requireBrowser$a(){if(hasRequiredBrowser$a)return browser$a;hasRequiredBrowser$a=1,browser$a=yt;function yt($t,Ft){if(_e("noDeprecation"))return $t;var Vt=!1;function qt(){if(!Vt){if(_e("throwDeprecation"))throw new Error(Ft);_e("traceDeprecation")?console.trace(Ft):console.warn(Ft),Vt=!0}return $t.apply(this,arguments)}return qt}function _e($t){try{if(!globalThis.localStorage)return!1}catch{return!1}var Ft=globalThis.localStorage[$t];return Ft==null?!1:String(Ft).toLowerCase()==="true"}return browser$a}var _stream_writable$1,hasRequired_stream_writable$1;function require_stream_writable$1(){if(hasRequired_stream_writable$1)return _stream_writable$1;hasRequired_stream_writable$1=1,_stream_writable$1=Br;function yt(Nr){var kr=this;this.next=null,this.entry=null,this.finish=function(){_r(kr,Nr)}}var _e;Br.WritableState=Sr;var $t={deprecate:requireBrowser$a()},Ft=requireStreamBrowser$1(),Vt=require$$1$2.Buffer,qt=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function zt(Nr){return Vt.from(Nr)}function Ht(Nr){return Vt.isBuffer(Nr)||Nr instanceof qt}var Kt=requireDestroy$1(),Gt=requireState(),Jt=Gt.getHighWaterMark,Xt=requireErrorsBrowser().codes,Zt=Xt.ERR_INVALID_ARG_TYPE,er=Xt.ERR_METHOD_NOT_IMPLEMENTED,tr=Xt.ERR_MULTIPLE_CALLBACK,rr=Xt.ERR_STREAM_CANNOT_PIPE,ar=Xt.ERR_STREAM_DESTROYED,nr=Xt.ERR_STREAM_NULL_VALUES,cr=Xt.ERR_STREAM_WRITE_AFTER_END,fr=Xt.ERR_UNKNOWN_ENCODING,vr=Kt.errorOrDestroy;requireInherits_browser()(Br,Ft);function xr(){}function Sr(Nr,kr,Mr){_e=_e||require_stream_duplex$1(),Nr=Nr||{},typeof Mr!="boolean"&&(Mr=kr instanceof _e),this.objectMode=!!Nr.objectMode,Mr&&(this.objectMode=this.objectMode||!!Nr.writableObjectMode),this.highWaterMark=Jt(this,Nr,"writableHighWaterMark",Mr),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Lr=Nr.decodeStrings===!1;this.decodeStrings=!Lr,this.defaultEncoding=Nr.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Cr){ur(kr,Cr)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Nr.emitClose!==!1,this.autoDestroy=!!Nr.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new yt(this)}Sr.prototype.getBuffer=function(){for(var kr=this.bufferedRequest,Mr=[];kr;)Mr.push(kr),kr=kr.next;return Mr},function(){try{Object.defineProperty(Sr.prototype,"buffer",{get:$t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var Tr;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Tr=Function.prototype[Symbol.hasInstance],Object.defineProperty(Br,Symbol.hasInstance,{value:function(kr){return Tr.call(this,kr)?!0:this!==Br?!1:kr&&kr._writableState instanceof Sr}})):Tr=function(kr){return kr instanceof this};function Br(Nr){_e=_e||require_stream_duplex$1();var kr=this instanceof _e;if(!kr&&!Tr.call(Br,this))return new Br(Nr);this._writableState=new Sr(Nr,this,kr),this.writable=!0,Nr&&(typeof Nr.write=="function"&&(this._write=Nr.write),typeof Nr.writev=="function"&&(this._writev=Nr.writev),typeof Nr.destroy=="function"&&(this._destroy=Nr.destroy),typeof Nr.final=="function"&&(this._final=Nr.final)),Ft.call(this)}Br.prototype.pipe=function(){vr(this,new rr)};function jr(Nr,kr){var Mr=new cr;vr(Nr,Mr),process$1.nextTick(kr,Mr)}function Rr(Nr,kr,Mr,Lr){var Cr;return Mr===null?Cr=new nr:typeof Mr!="string"&&!kr.objectMode&&(Cr=new Zt("chunk",["string","Buffer"],Mr)),Cr?(vr(Nr,Cr),process$1.nextTick(Lr,Cr),!1):!0}Br.prototype.write=function(Nr,kr,Mr){var Lr=this._writableState,Cr=!1,Er=!Lr.objectMode&&Ht(Nr);return Er&&!Vt.isBuffer(Nr)&&(Nr=zt(Nr)),typeof kr=="function"&&(Mr=kr,kr=null),Er?kr="buffer":kr||(kr=Lr.defaultEncoding),typeof Mr!="function"&&(Mr=xr),Lr.ending?jr(this,Mr):(Er||Rr(this,Lr,Nr,Mr))&&(Lr.pen
vendor: 6,452 bytes, line 1491
1491dingcb++,Cr=sr(this,Lr,Er,Nr,kr,Mr)),Cr},Br.prototype.cork=function(){this._writableState.corked++},Br.prototype.uncork=function(){var Nr=this._writableState;Nr.corked&&(Nr.corked--,!Nr.writing&&!Nr.corked&&!Nr.bufferProcessing&&Nr.bufferedRequest&&lr(this,Nr))},Br.prototype.setDefaultEncoding=function(kr){if(typeof kr=="string"&&(kr=kr.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((kr+"").toLowerCase())>-1))throw new fr(kr);return this._writableState.defaultEncoding=kr,this},Object.defineProperty(Br.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function yr(Nr,kr,Mr){return!Nr.objectMode&&Nr.decodeStrings!==!1&&typeof kr=="string"&&(kr=Vt.from(kr,Mr)),kr}Object.defineProperty(Br.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function sr(Nr,kr,Mr,Lr,Cr,Er){if(!Mr){var Ar=yr(kr,Lr,Cr);Lr!==Ar&&(Mr=!0,Cr="buffer",Lr=Ar)}var zr=kr.objectMode?1:Lr.length;kr.length+=zr;var Vr=kr.length<kr.highWaterMark;if(Vr||(kr.needDrain=!0),kr.writing||kr.corked){var Gr=kr.lastBufferedRequest;kr.lastBufferedRequest={chunk:Lr,encoding:Cr,isBuf:Mr,callback:Er,next:null},Gr?Gr.next=kr.lastBufferedRequest:kr.bufferedRequest=kr.lastBufferedRequest,kr.bufferedRequestCount+=1}else or(Nr,kr,!1,zr,Lr,Cr,Er);return Vr}function or(Nr,kr,Mr,Lr,Cr,Er,Ar){kr.writelen=Lr,kr.writecb=Ar,kr.writing=!0,kr.sync=!0,kr.destroyed?kr.onwrite(new ar("write")):Mr?Nr._writev(Cr,kr.onwrite):Nr._write(Cr,Er,kr.onwrite),kr.sync=!1}function Qt(Nr,kr,Mr,Lr,Cr){--kr.pendingcb,Mr?(process$1.nextTick(Cr,Lr),process$1.nextTick(br,Nr,kr),Nr._writableState.errorEmitted=!0,vr(Nr,Lr)):(Cr(Lr),Nr._writableState.errorEmitted=!0,vr(Nr,Lr),br(Nr,kr))}function ir(Nr){Nr.writing=!1,Nr.writecb=null,Nr.length-=Nr.writelen,Nr.writelen=0}function ur(Nr,kr){var Mr=Nr._writableState,Lr=Mr.sync,Cr=Mr.writecb;if(typeof Cr!="function")throw new tr;if(ir(Mr),kr)Qt(Nr,Mr,Lr,kr,Cr);else{var Er=hr(Mr)||Nr.destroyed;!Er&&!Mr.corked&&!Mr.bufferProcessing&&Mr.bufferedRequest&&lr(Nr,Mr),Lr?process$1.nextTick(gr,Nr,Mr,Er,Cr):gr(Nr,Mr,Er,Cr)}}function gr(Nr,kr,Mr,Lr){Mr||dr(Nr,kr),kr.pendingcb--,Lr(),br(Nr,kr)}function dr(Nr,kr){kr.length===0&&kr.needDrain&&(kr.needDrain=!1,Nr.emit("drain"))}function lr(Nr,kr){kr.bufferProcessing=!0;var Mr=kr.bufferedRequest;if(Nr._writev&&Mr&&Mr.next){var Lr=kr.bufferedRequestCount,Cr=new Array(Lr),Er=kr.corkedRequestsFree;Er.entry=Mr;for(var Ar=0,zr=!0;Mr;)Cr[Ar]=Mr,Mr.isBuf||(zr=!1),Mr=Mr.next,Ar+=1;Cr.allBuffers=zr,or(Nr,kr,!0,kr.length,Cr,"",Er.finish),kr.pendingcb++,kr.lastBufferedRequest=null,Er.next?(kr.corkedRequestsFree=Er.next,Er.next=null):kr.corkedRequestsFree=new yt(kr),kr.bufferedRequestCount=0}else{for(;Mr;){var Vr=Mr.chunk,Gr=Mr.encoding,tn=Mr.callback,Yr=kr.objectMode?1:Vr.length;if(or(Nr,kr,!1,Yr,Vr,Gr,tn),Mr=Mr.next,kr.bufferedRequestCount--,kr.writing)break}Mr===null&&(kr.lastBufferedRequest=null)}kr.bufferedRequest=Mr,kr.bufferProcessing=!1}Br.prototype._write=function(Nr,kr,Mr){Mr(new er("_write()"))},Br.prototype._writev=null,Br.prototype.end=function(Nr,kr,Mr){var Lr=this._writableState;return typeof Nr=="function"?(Mr=Nr,Nr=null,kr=null):typeof kr=="function"&&(Mr=kr,kr=null),Nr!=null&&this.write(Nr,kr),Lr.corked&&(Lr.corked=1,this.uncork()),Lr.ending||Dr(this,Lr,Mr),this},Object.defineProperty(Br.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function hr(Nr){return Nr.ending&&Nr.length===0&&Nr.bufferedRequest===null&&!Nr.finished&&!Nr.writing}function wr(Nr,kr){Nr._final(function(Mr){kr.pendingcb--,Mr&&vr(Nr,Mr),kr.prefinished=!0,Nr.emit("prefinish"),br(Nr,kr)})}function pr(Nr,kr){!kr.prefinished&&!kr.finalCalled&&(typeof Nr._final=="function"&&!kr.destroyed?(kr.pendingcb++,kr.finalCalled=!0,process$1.nextTick(wr,Nr,kr)):(kr.prefinished=!0,Nr.emit("prefinish")))}function br(Nr,kr){var Mr=hr(kr);if(Mr&&(pr(Nr,kr),kr.pendingcb===0&&(kr.finished=!0,Nr.emit("finish"),kr.autoDestroy))){var Lr=Nr._readableState;(!Lr||Lr.autoDestroy&&Lr.endEmitted)&&Nr.destroy()}return Mr}function Dr(Nr,kr,Mr){kr.ending=!0,br(Nr,kr),Mr&&(kr.finished?process$1.nextTick(Mr):Nr.once("finish",Mr)),kr.ended=!0,Nr.writable=!1}function _r(Nr,kr,Mr){var Lr=Nr.entry;for(Nr.entry=null;Lr;){var Cr=Lr.callback;kr.pendingcb--,Cr(Mr),Lr=Lr.next}kr.corkedRequestsFree.next=Nr}return Object.defineProperty(Br.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(kr){this._writableState&&(this._writableState.destroyed=kr)}}),Br.prototype.destroy=Kt.destroy,Br.prototype._undestroy=Kt.undestroy,Br.prototype._destroy=function(Nr,kr){kr(Nr)},_stream_writable$1}var _stream_duplex$1,hasRequired_stream_duplex$1;function require_stream_duplex$1(){if(hasRequired_stream_duplex$1)return _stream_duplex$1;hasRequired_stream_duplex$1=1;var yt=Object.keys||function(Gt){var Jt=[];for(var Xt in Gt)Jt.push(Xt);return Jt};_stream_duplex$1=zt;var _e=require_stream_readable$1(),$t=require_stream_writable$1();requireInherits_browser()(zt,_e);for(var Ft=yt($t.prototype),Vt=0;Vt<Ft.length;Vt++){var qt=Ft[Vt];zt.prototype[qt]||(zt.prototype[qt]=$t.prototype[qt])}function zt(Gt){if(!(this instanceof zt))return new zt(Gt);_e.call(this,Gt),$t.call(this,Gt),this.allowHalfOpen=!0,Gt&&(Gt.readable===!1&&(this.readable=!1),Gt.writable===!1&&(this.writable=!1),Gt.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",Ht)))}Object.defineProperty(zt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(zt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(zt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Ht(){this._writableState.ended||process$1.nextTick(Kt,this)}function Kt(Gt){Gt.end()}return Object.defineProperty(zt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(Jt){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=Jt,this._writableState.destroyed=Jt)}}),_stream_duplex$1}var string_decoder={}
vendor: 3,683 bytes, line 1491
1491,safeBuffer$1={exports:{}},hasRequiredSafeBuffer$1;function requireSafeBuffer$1(){return hasRequiredSafeBuffer$1||(hasRequiredSafeBuffer$1=1,function(yt,_e){var $t=require$$1$2,Ft=$t.Buffer;function Vt(zt,Ht){for(var Kt in zt)Ht[Kt]=zt[Kt]}Ft.from&&Ft.alloc&&Ft.allocUnsafe&&Ft.allocUnsafeSlow?yt.exports=$t:(Vt($t,_e),_e.Buffer=qt);function qt(zt,Ht,Kt){return Ft(zt,Ht,Kt)}Vt(Ft,qt),qt.from=function(zt,Ht,Kt){if(typeof zt=="number")throw new TypeError("Argument must not be a number");return Ft(zt,Ht,Kt)},qt.alloc=function(zt,Ht,Kt){if(typeof zt!="number")throw new TypeError("Argument must be a number");var Gt=Ft(zt);return Ht!==void 0?typeof Kt=="string"?Gt.fill(Ht,Kt):Gt.fill(Ht):Gt.fill(0),Gt},qt.allocUnsafe=function(zt){if(typeof zt!="number")throw new TypeError("Argument must be a number");return Ft(zt)},qt.allocUnsafeSlow=function(zt){if(typeof zt!="number")throw new TypeError("Argument must be a number");return $t.SlowBuffer(zt)}}(safeBuffer$1,safeBuffer$1.exports)),safeBuffer$1.exports}var hasRequiredString_decoder;function requireString_decoder(){if(hasRequiredString_decoder)return string_decoder;hasRequiredString_decoder=1;var yt=requireSafeBuffer$1().Buffer,_e=yt.isEncoding||function(nr){switch(nr=""+nr,nr&&nr.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function $t(nr){if(!nr)return"utf8";for(var cr;;)switch(nr){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return nr;default:if(cr)return;nr=(""+nr).toLowerCase(),cr=!0}}function Ft(nr){var cr=$t(nr);if(typeof cr!="string"&&(yt.isEncoding===_e||!_e(nr)))throw new Error("Unknown encoding: "+nr);return cr||nr}string_decoder.StringDecoder=Vt;function Vt(nr){this.encoding=Ft(nr);var cr;switch(this.encoding){case"utf16le":this.text=Xt,this.end=Zt,cr=4;break;case"utf8":this.fillLast=Kt,cr=4;break;case"base64":this.text=er,this.end=tr,cr=3;break;default:this.write=rr,this.end=ar;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=yt.allocUnsafe(cr)}Vt.prototype.write=function(nr){if(nr.length===0)return"";var cr,fr;if(this.lastNeed){if(cr=this.fillLast(nr),cr===void 0)return"";fr=this.lastNeed,this.lastNeed=0}else fr=0;return fr<nr.length?cr?cr+this.text(nr,fr):this.text(nr,fr):cr||""},Vt.prototype.end=Jt,Vt.prototype.text=Gt,Vt.prototype.fillLast=function(nr){if(this.lastNeed<=nr.length)return nr.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);nr.copy(this.lastChar,this.lastTotal-this.lastNeed,0,nr.length),this.lastNeed-=nr.length};function qt(nr){return nr<=127?0:nr>>5===6?2:nr>>4===14?3:nr>>3===30?4:nr>>6===2?-1:-2}function zt(nr,cr,fr){var vr=cr.length-1;if(vr<fr)return 0;var xr=qt(cr[vr]);return xr>=0?(xr>0&&(nr.lastNeed=xr-1),xr):--vr<fr||xr===-2?0:(xr=qt(cr[vr]),xr>=0?(xr>0&&(nr.lastNeed=xr-2),xr):--vr<fr||xr===-2?0:(xr=qt(cr[vr]),xr>=0?(xr>0&&(xr===2?xr=0:nr.lastNeed=xr-3),xr):0))}function Ht(nr,cr,fr){if((cr[0]&192)!==128)return nr.lastNeed=0,"�";if(nr.lastNeed>1&&cr.length>1){if((cr[1]&192)!==128)return nr.lastNeed=1,"�";if(nr.lastNeed>2&&cr.length>2&&(cr[2]&192)!==128)return nr.lastNeed=2,"�"}}function Kt(nr){var cr=this.lastTotal-this.lastNeed,fr=Ht(this,nr);if(fr!==void 0)return fr;if(this.lastNeed<=nr.length)return nr.copy(this.lastChar,cr,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);nr.copy(this.lastChar,cr,0,nr.length),this.lastNeed-=nr.length}function Gt(nr,cr){var fr=zt(this,nr,cr);
vendor: 10,240 bytes, line 1491
1491if(!this.lastNeed)return nr.toString("utf8",cr);this.lastTotal=fr;var vr=nr.length-(fr-this.lastNeed);return nr.copy(this.lastChar,0,vr),nr.toString("utf8",cr,vr)}function Jt(nr){var cr=nr&&nr.length?this.write(nr):"";return this.lastNeed?cr+"�":cr}function Xt(nr,cr){if((nr.length-cr)%2===0){var fr=nr.toString("utf16le",cr);if(fr){var vr=fr.charCodeAt(fr.length-1);if(vr>=55296&&vr<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=nr[nr.length-2],this.lastChar[1]=nr[nr.length-1],fr.slice(0,-1)}return fr}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=nr[nr.length-1],nr.toString("utf16le",cr,nr.length-1)}function Zt(nr){var cr=nr&&nr.length?this.write(nr):"";if(this.lastNeed){var fr=this.lastTotal-this.lastNeed;return cr+this.lastChar.toString("utf16le",0,fr)}return cr}function er(nr,cr){var fr=(nr.length-cr)%3;return fr===0?nr.toString("base64",cr):(this.lastNeed=3-fr,this.lastTotal=3,fr===1?this.lastChar[0]=nr[nr.length-1]:(this.lastChar[0]=nr[nr.length-2],this.lastChar[1]=nr[nr.length-1]),nr.toString("base64",cr,nr.length-fr))}function tr(nr){var cr=nr&&nr.length?this.write(nr):"";return this.lastNeed?cr+this.lastChar.toString("base64",0,3-this.lastNeed):cr}function rr(nr){return nr.toString(this.encoding)}function ar(nr){return nr&&nr.length?this.write(nr):""}return string_decoder}var endOfStream,hasRequiredEndOfStream;function requireEndOfStream(){if(hasRequiredEndOfStream)return endOfStream;hasRequiredEndOfStream=1;var yt=requireErrorsBrowser().codes.ERR_STREAM_PREMATURE_CLOSE;function _e(qt){var zt=!1;return function(){if(!zt){zt=!0;for(var Ht=arguments.length,Kt=new Array(Ht),Gt=0;Gt<Ht;Gt++)Kt[Gt]=arguments[Gt];qt.apply(this,Kt)}}}function $t(){}function Ft(qt){return qt.setHeader&&typeof qt.abort=="function"}function Vt(qt,zt,Ht){if(typeof zt=="function")return Vt(qt,null,zt);zt||(zt={}),Ht=_e(Ht||$t);var Kt=zt.readable||zt.readable!==!1&&qt.readable,Gt=zt.writable||zt.writable!==!1&&qt.writable,Jt=function(){qt.writable||Zt()},Xt=qt._writableState&&qt._writableState.finished,Zt=function(){Gt=!1,Xt=!0,Kt||Ht.call(qt)},er=qt._readableState&&qt._readableState.endEmitted,tr=function(){Kt=!1,er=!0,Gt||Ht.call(qt)},rr=function(fr){Ht.call(qt,fr)},ar=function(){var fr;if(Kt&&!er)return(!qt._readableState||!qt._readableState.ended)&&(fr=new yt),Ht.call(qt,fr);if(Gt&&!Xt)return(!qt._writableState||!qt._writableState.ended)&&(fr=new yt),Ht.call(qt,fr)},nr=function(){qt.req.on("finish",Zt)};return Ft(qt)?(qt.on("complete",Zt),qt.on("abort",ar),qt.req?nr():qt.on("request",nr)):Gt&&!qt._writableState&&(qt.on("end",Jt),qt.on("close",Jt)),qt.on("end",tr),qt.on("finish",Zt),zt.error!==!1&&qt.on("error",rr),qt.on("close",ar),function(){qt.removeListener("complete",Zt),qt.removeListener("abort",ar),qt.removeListener("request",nr),qt.req&&qt.req.removeListener("finish",Zt),qt.removeListener("end",Jt),qt.removeListener("close",Jt),qt.removeListener("finish",Zt),qt.removeListener("end",tr),qt.removeListener("error",rr),qt.removeListener("close",ar)}}return endOfStream=Vt,endOfStream}var async_iterator,hasRequiredAsync_iterator;function requireAsync_iterator(){if(hasRequiredAsync_iterator)return async_iterator;hasRequiredAsync_iterator=1;var yt;function _e(fr,vr,xr){return vr=$t(vr),vr in fr?Object.defineProperty(fr,vr,{value:xr,enumerable:!0,configurable:!0,writable:!0}):fr[vr]=xr,fr}function $t(fr){var vr=Ft(fr,"string");return typeof vr=="symbol"?vr:String(vr)}function Ft(fr,vr){if(typeof fr!="object"||fr===null)return fr;var xr=fr[Symbol.toPrimitive];if(xr!==void 0){var Sr=xr.call(fr,vr||"default");if(typeof Sr!="object")return Sr;throw new TypeError("@@toPrimitive must return a primitive value.")}return(vr==="string"?String:Number)(fr)}var Vt=requireEndOfStream(),qt=Symbol("lastResolve"),zt=Symbol("lastReject"),Ht=Symbol("error"),Kt=Symbol("ended"),Gt=Symbol("lastPromise"),Jt=Symbol("handlePromise"),Xt=Symbol("stream");function Zt(fr,vr){return{value:fr,done:vr}}function er(fr){var vr=fr[qt];if(vr!==null){var xr=fr[Xt].read();xr!==null&&(fr[Gt]=null,fr[qt]=null,fr[zt]=null,vr(Zt(xr,!1)))}}function tr(fr){process$1.nextTick(er,fr)}function rr(fr,vr){return function(xr,Sr){fr.then(function(){if(vr[Kt]){xr(Zt(void 0,!0));return}vr[Jt](xr,Sr)},Sr)}}var ar=Object.getPrototypeOf(function(){}),nr=Object.setPrototypeOf((yt={get stream(){return this[Xt]},next:function(){var vr=this,xr=this[Ht];if(xr!==null)return Promise.reject(xr);if(this[Kt])return Promise.resolve(Zt(void 0,!0));if(this[Xt].destroyed)return new Promise(function(jr,Rr){process$1.nextTick(function(){vr[Ht]?Rr(vr[Ht]):jr(Zt(void 0,!0))})});var Sr=this[Gt],Tr;if(Sr)Tr=new Promise(rr(Sr,this));else{var Br=this[Xt].read();if(Br!==null)return Promise.resolve(Zt(Br,!1));Tr=new Promise(this[Jt])}return this[Gt]=Tr,Tr}},_e(yt,Symbol.asyncIterator,function(){return this}),_e(yt,"return",function(){var vr=this;return new Promise(function(xr,Sr){vr[Xt].destroy(null,function(Tr){if(Tr){Sr(Tr);return}xr(Zt(void 0,!0))})})}),yt),ar),cr=function(vr){var xr,Sr=Object.create(nr,(xr={},_e(xr,Xt,{value:vr,writable:!0}),_e(xr,qt,{value:null,writable:!0}),_e(xr,zt,{value:null,writable:!0}),_e(xr,Ht,{value:null,writable:!0}),_e(xr,Kt,{value:vr._readableState.endEmitted,writable:!0}),_e(xr,Jt,{value:function(Br,jr){var Rr=Sr[Xt].read();Rr?(Sr[Gt]=null,Sr[qt]=null,Sr[zt]=null,Br(Zt(Rr,!1))):(Sr[qt]=Br,Sr[zt]=jr)},writable:!0}),xr));return Sr[Gt]=null,Vt(vr,function(Tr){if(Tr&&Tr.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Br=Sr[zt];Br!==null&&(Sr[Gt]=null,Sr[qt]=null,Sr[zt]=null,Br(Tr)),Sr[Ht]=Tr;return}var jr=Sr[qt];jr!==null&&(Sr[Gt]=null,Sr[qt]=null,Sr[zt]=null,jr(Zt(void 0,!0))),Sr[Kt]=!0}),vr.on("readable",tr.bind(null,Sr)),Sr};return async_iterator=cr,async_iterator}var fromBrowser,hasRequiredFromBrowser;function requireFromBrowser(){return hasRequiredFromBrowser||(hasRequiredFromBrowser=1,fromBrowser=function(){throw new Error("Readable.from is not available in the browser")}),fromBrowser}var _stream_readable$1,hasRequired_stream_readable$1;function require_stream_readable$1(){if(hasRequired_stream_readable$1)return _stream_readable$1;hasRequired_stream_readable$1=1,_stream_readable$1=jr;var yt;jr.ReadableState=Br,requireEvents().EventEmitter;var _e=function(Ar,zr){return Ar.listeners(zr).length},$t=requireStreamBrowser$1(),Ft=require$$1$2.Buffer,Vt=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function qt(Er){return Ft.from(Er)}function zt(Er){return Ft.isBuffer(Er)||Er instanceof Vt}var Ht=requireUtil$1(),Kt;Ht&&Ht.debuglog?Kt=Ht.debuglog("stream"):Kt=function(){};var Gt=requireBuffer_list(),Jt=requireDestroy$1(),Xt=requireState(),Zt=Xt.getHighWaterMark,er=requireErrorsBrowser().codes,tr=er.ERR_INVALID_ARG_TYPE,rr=er.ERR_STREAM_PUSH_AFTER_EOF,ar=er.ERR_METHOD_NOT_IMPLEMENTED,nr=er.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,cr,fr,vr;requireInherits_browser()(jr,$t);var xr=Jt.errorOrDestroy,Sr=["error","close","destroy","pause","resume"];function Tr(Er,Ar,zr){if(typeof Er.prependListener=="function")return Er.prependListener(Ar,zr);!Er._events||!Er._events[Ar]?Er.on(Ar,zr):Array.isArray(Er._events[Ar])?Er._events[Ar].unshift(zr):Er._events[Ar]=[zr,Er._events[Ar]]}function Br(Er,Ar,zr){yt=yt||require_stream_duplex$1(),Er=Er||{},typeof zr!="boolean"&&(zr=Ar instanceof yt),this.objectMode=!!Er.objectMode,zr&&(this.objectMode=this.objectMode||!!Er.readableObjectMode),this.highWaterMark=Zt(this,Er,"readableHighWaterMark",zr),this.buffer=new Gt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=Er.emitClose!==!1,this.autoDestroy=!!Er.autoDestroy,this.destroyed=!1,this.defaultEncoding=Er.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Er.encoding&&(cr||(cr=requireString_decoder().StringDecoder),this.decoder=new cr(Er.encoding),this.encoding=Er.encoding)}function jr(Er){if(yt=yt||require_stream_duplex$1(),!(this instanceof jr))return new jr(Er);var Ar=this instanceof yt;this._readableState=new Br(Er,this,Ar),this.readable=!0,Er&&(typeof Er.read=="function"&&(this._read=Er.read),typeof Er.destroy=="function"&&(this._destroy=Er.destroy)),$t.call(this)}Object.defineProperty(jr.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Ar){this._readableState&&(this._readableState.destroyed=Ar)}}),jr.prototype.destroy=Jt.destroy,jr.prototype._undestroy=Jt.undestroy,jr.prototype._destroy=function(Er,Ar){Ar(Er)},jr.prototype.push=function(Er,Ar){var zr=this._readableState,Vr;return zr.objectMode?Vr=!0:typeof Er=="string"&&(Ar=Ar||zr.defaultEncoding,Ar!==zr.encoding&&(Er=Ft.from(Er,Ar),Ar=""),Vr=!0),Rr(this,Er,Ar,!1,Vr)},jr.prototype.unshift=function(Er){return Rr(this,Er,null,!0,!1)};function Rr(Er,Ar,zr,Vr,Gr){Kt("readableAddChunk",Ar);var tn=Er._readableState;if(Ar===null)tn.reading=!1,ur(Er,tn);else{var Yr;if(Gr||(Yr=sr(tn,Ar)),Yr)xr(Er,Yr);else if(tn.objectMode||Ar&&Ar.length>0)if(typeof Ar!="string"&&!tn.objectMode&&Object.getPrototypeOf(Ar)!==Ft.prototype&&(Ar=qt(Ar)),Vr)tn.endEmitted?xr(Er,new nr):yr(Er,tn,Ar,!0);else if(tn.ended)xr(Er,new rr);else{if(tn.destroyed)return!1;tn.reading=!1,tn.decoder&&!zr?(Ar=tn.decoder.write(Ar),tn.objectMode||Ar.length!==0?yr(Er,tn,Ar,!1):lr(Er,tn)):yr(Er,tn,Ar,!1)}else Vr||(tn.reading=!1,lr(Er,tn))}return!tn.ended&&(tn.length<tn.highWaterMark||tn.length===0)}function yr(Er,Ar,zr,Vr){Ar.flowing&&Ar.length===0&&!Ar.sync?(Ar.awaitDrain=0,Er.emit("data",zr)):(Ar.length+=Ar.objectMode?1:zr.length,Vr?Ar.buffer.unshift(zr):Ar.buffer.push(zr),Ar.needReadable&&gr(Er)),lr(Er,Ar)}function sr(Er,Ar){var zr;return!zt(Ar)&&typeof Ar!="string"&&Ar!==void 0&&!Er.objectMode&&(zr=new tr("chunk",["string","Buffer","Uint8Array"],Ar)),zr}jr.prototype.isPaused=function(){return this._readableState.flowing===!1},jr.prototype.setEncoding=function(Er){cr||(cr=requireString_decoder().StringDecoder);var Ar=new cr(Er);this._readableState.decoder=Ar,this._readableState.encoding=this._readableState.decoder.encoding;
vendor: 6,593 bytes, line 1491
1491for(var zr=this._readableState.buffer.head,Vr="";zr!==null;)Vr+=Ar.write(zr.data),zr=zr.next;return this._readableState.buffer.clear(),Vr!==""&&this._readableState.buffer.push(Vr),this._readableState.length=Vr.length,this};var or=1073741824;function Qt(Er){return Er>=or?Er=or:(Er--,Er|=Er>>>1,Er|=Er>>>2,Er|=Er>>>4,Er|=Er>>>8,Er|=Er>>>16,Er++),Er}function ir(Er,Ar){return Er<=0||Ar.length===0&&Ar.ended?0:Ar.objectMode?1:Er!==Er?Ar.flowing&&Ar.length?Ar.buffer.head.data.length:Ar.length:(Er>Ar.highWaterMark&&(Ar.highWaterMark=Qt(Er)),Er<=Ar.length?Er:Ar.ended?Ar.length:(Ar.needReadable=!0,0))}jr.prototype.read=function(Er){Kt("read",Er),Er=parseInt(Er,10);var Ar=this._readableState,zr=Er;if(Er!==0&&(Ar.emittedReadable=!1),Er===0&&Ar.needReadable&&((Ar.highWaterMark!==0?Ar.length>=Ar.highWaterMark:Ar.length>0)||Ar.ended))return Kt("read: emitReadable",Ar.length,Ar.ended),Ar.length===0&&Ar.ended?Mr(this):gr(this),null;if(Er=ir(Er,Ar),Er===0&&Ar.ended)return Ar.length===0&&Mr(this),null;var Vr=Ar.needReadable;Kt("need readable",Vr),(Ar.length===0||Ar.length-Er<Ar.highWaterMark)&&(Vr=!0,Kt("length less than watermark",Vr)),Ar.ended||Ar.reading?(Vr=!1,Kt("reading or ended",Vr)):Vr&&(Kt("do read"),Ar.reading=!0,Ar.sync=!0,Ar.length===0&&(Ar.needReadable=!0),this._read(Ar.highWaterMark),Ar.sync=!1,Ar.reading||(Er=ir(zr,Ar)));var Gr;return Er>0?Gr=kr(Er,Ar):Gr=null,Gr===null?(Ar.needReadable=Ar.length<=Ar.highWaterMark,Er=0):(Ar.length-=Er,Ar.awaitDrain=0),Ar.length===0&&(Ar.ended||(Ar.needReadable=!0),zr!==Er&&Ar.ended&&Mr(this)),Gr!==null&&this.emit("data",Gr),Gr};function ur(Er,Ar){if(Kt("onEofChunk"),!Ar.ended){if(Ar.decoder){var zr=Ar.decoder.end();zr&&zr.length&&(Ar.buffer.push(zr),Ar.length+=Ar.objectMode?1:zr.length)}Ar.ended=!0,Ar.sync?gr(Er):(Ar.needReadable=!1,Ar.emittedReadable||(Ar.emittedReadable=!0,dr(Er)))}}function gr(Er){var Ar=Er._readableState;Kt("emitReadable",Ar.needReadable,Ar.emittedReadable),Ar.needReadable=!1,Ar.emittedReadable||(Kt("emitReadable",Ar.flowing),Ar.emittedReadable=!0,process$1.nextTick(dr,Er))}function dr(Er){var Ar=Er._readableState;Kt("emitReadable_",Ar.destroyed,Ar.length,Ar.ended),!Ar.destroyed&&(Ar.length||Ar.ended)&&(Er.emit("readable"),Ar.emittedReadable=!1),Ar.needReadable=!Ar.flowing&&!Ar.ended&&Ar.length<=Ar.highWaterMark,Nr(Er)}function lr(Er,Ar){Ar.readingMore||(Ar.readingMore=!0,process$1.nextTick(hr,Er,Ar))}function hr(Er,Ar){for(;!Ar.reading&&!Ar.ended&&(Ar.length<Ar.highWaterMark||Ar.flowing&&Ar.length===0);){var zr=Ar.length;if(Kt("maybeReadMore read 0"),Er.read(0),zr===Ar.length)break}Ar.readingMore=!1}jr.prototype._read=function(Er){xr(this,new ar("_read()"))},jr.prototype.pipe=function(Er,Ar){var zr=this,Vr=this._readableState;switch(Vr.pipesCount){case 0:Vr.pipes=Er;break;case 1:Vr.pipes=[Vr.pipes,Er];break;default:Vr.pipes.push(Er);break}Vr.pipesCount+=1,Kt("pipe count=%d opts=%j",Vr.pipesCount,Ar);var Gr=(!Ar||Ar.end!==!1)&&Er!==process$1.stdout&&Er!==process$1.stderr,tn=Gr?Jr:gn;Vr.endEmitted?process$1.nextTick(tn):zr.once("end",tn),Er.on("unpipe",Yr);function Yr(fn,wn){Kt("onunpipe"),fn===zr&&wn&&wn.hasUnpiped===!1&&(wn.hasUnpiped=!0,Qr())}function Jr(){Kt("onend"),Er.end()}var Kr=wr(zr);Er.on("drain",Kr);var Xr=!1;function Qr(){Kt("cleanup"),Er.removeListener("close",sn),Er.removeListener("finish",vn),Er.removeListener("drain",Kr),Er.removeListener("error",an),Er.removeListener("unpipe",Yr),zr.removeListener("end",Jr),zr.removeListener("end",gn),zr.removeListener("data",un),Xr=!0,Vr.awaitDrain&&(!Er._writableState||Er._writableState.needDrain)&&Kr()}zr.on("data",un);function un(fn){Kt("ondata");var wn=Er.write(fn);Kt("dest.write",wn),wn===!1&&((Vr.pipesCount===1&&Vr.pipes===Er||Vr.pipesCount>1&&Cr(Vr.pipes,Er)!==-1)&&!Xr&&(Kt("false write response, pause",Vr.awaitDrain),Vr.awaitDrain++),zr.pause())}function an(fn){Kt("onerror",fn),gn(),Er.removeListener("error",an),_e(Er,"error")===0&&xr(Er,fn)}Tr(Er,"error",an);function sn(){Er.removeListener("finish",vn),gn()}Er.once("close",sn);function vn(){Kt("onfinish"),Er.removeListener("close",sn),gn()}Er.once("finish",vn);function gn(){Kt("unpipe"),zr.unpipe(Er)}return Er.emit("pipe",zr),Vr.flowing||(Kt("pipe resume"),zr.resume()),Er};function wr(Er){return function(){var zr=Er._readableState;Kt("pipeOnDrain",zr.awaitDrain),zr.awaitDrain&&zr.awaitDrain--,zr.awaitDrain===0&&_e(Er,"data")&&(zr.flowing=!0,Nr(Er))}}jr.prototype.unpipe=function(Er){var Ar=this._readableState,zr={hasUnpiped:!1};if(Ar.pipesCount===0)return this;if(Ar.pipesCount===1)return Er&&Er!==Ar.pipes?this:(Er||(Er=Ar.pipes),Ar.pipes=null,Ar.pipesCount=0,Ar.flowing=!1,Er&&Er.emit("unpipe",this,zr),this);if(!Er){var Vr=Ar.pipes,Gr=Ar.pipesCount;Ar.pipes=null,Ar.pipesCount=0,Ar.flowing=!1;for(var tn=0;tn<Gr;tn++)Vr[tn].emit("unpipe",this,{hasUnpiped:!1});return this}var Yr=Cr(Ar.pipes,Er);return Yr===-1?this:(Ar.pipes.splice(Yr,1),Ar.pipesCount-=1,Ar.pipesCount===1&&(Ar.pipes=Ar.pipes[0]),Er.emit("unpipe",this,zr),this)},jr.prototype.on=function(Er,Ar){var zr=$t.prototype.on.call(this,Er,Ar),Vr=this._readableState;return Er==="data"?(Vr.readableListening=this.listenerCount("readable")>0,Vr.flowing!==!1&&this.resume()):Er==="readable"&&!Vr.endEmitted&&!Vr.readableListening&&(Vr.readableListening=Vr.needReadable=!0,Vr.flowing=!1,Vr.emittedReadable=!1,Kt("on readable",Vr.length,Vr.reading),Vr.length?gr(this):Vr.reading||process$1.nextTick(br,this)),zr},jr.prototype.addListener=jr.prototype.on,jr.prototype.removeListener=function(Er,Ar){var zr=$t.prototype.removeListener.call(this,Er,Ar);return Er==="readable"&&process$1.nextTick(pr,this),zr},jr.prototype.removeAllListeners=function(Er){var Ar=$t.prototype.removeAllListeners.apply(this,arguments);return(Er==="readable"||Er===void 0)&&process$1.nextTick(pr,this),Ar};function pr(Er){var Ar=Er._readableState;Ar.readableListening=Er.listenerCount("readable")>0,Ar.resumeScheduled&&!Ar.paused?Ar.flowing=!0:Er.listenerCount("data")>0&&Er.resume()}function br(Er){Kt("readable nexttick read 0"),Er.read(0)}jr.prototype.resume=function(){var Er=this._readableState;return Er.flowing||(Kt("resume"),Er.flowing=!Er.readableListening,Dr(this,Er)),Er.paused=!1,this};function Dr(Er,Ar){Ar.resumeScheduled||(Ar.resumeScheduled=!0,process$1.nextTick(_r,Er,Ar))}function _r(Er,Ar){Kt("resume",Ar.reading),Ar.reading||Er.read(0),Ar.resumeScheduled=!1,Er.emit("resume"),Nr(Er),Ar.flowing&&!Ar.reading&&Er.read(0)}jr.prototype.pause=function(){return Kt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Kt("pause"),this._readableState.flowing=!1,this.emit
vendor: 4,709 bytes, line 1491
1491("pause")),this._readableState.paused=!0,this};function Nr(Er){var Ar=Er._readableState;for(Kt("flow",Ar.flowing);Ar.flowing&&Er.read()!==null;);}jr.prototype.wrap=function(Er){var Ar=this,zr=this._readableState,Vr=!1;Er.on("end",function(){if(Kt("wrapped end"),zr.decoder&&!zr.ended){var Yr=zr.decoder.end();Yr&&Yr.length&&Ar.push(Yr)}Ar.push(null)}),Er.on("data",function(Yr){if(Kt("wrapped data"),zr.decoder&&(Yr=zr.decoder.write(Yr)),!(zr.objectMode&&Yr==null)&&!(!zr.objectMode&&(!Yr||!Yr.length))){var Jr=Ar.push(Yr);Jr||(Vr=!0,Er.pause())}});for(var Gr in Er)this[Gr]===void 0&&typeof Er[Gr]=="function"&&(this[Gr]=function(Jr){return function(){return Er[Jr].apply(Er,arguments)}}(Gr));for(var tn=0;tn<Sr.length;tn++)Er.on(Sr[tn],this.emit.bind(this,Sr[tn]));return this._read=function(Yr){Kt("wrapped _read",Yr),Vr&&(Vr=!1,Er.resume())},this},typeof Symbol=="function"&&(jr.prototype[Symbol.asyncIterator]=function(){return fr===void 0&&(fr=requireAsync_iterator()),fr(this)}),Object.defineProperty(jr.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(jr.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(jr.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Ar){this._readableState&&(this._readableState.flowing=Ar)}}),jr._fromList=kr,Object.defineProperty(jr.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function kr(Er,Ar){if(Ar.length===0)return null;var zr;return Ar.objectMode?zr=Ar.buffer.shift():!Er||Er>=Ar.length?(Ar.decoder?zr=Ar.buffer.join(""):Ar.buffer.length===1?zr=Ar.buffer.first():zr=Ar.buffer.concat(Ar.length),Ar.buffer.clear()):zr=Ar.buffer.consume(Er,Ar.decoder),zr}function Mr(Er){var Ar=Er._readableState;Kt("endReadable",Ar.endEmitted),Ar.endEmitted||(Ar.ended=!0,process$1.nextTick(Lr,Ar,Er))}function Lr(Er,Ar){if(Kt("endReadableNT",Er.endEmitted,Er.length),!Er.endEmitted&&Er.length===0&&(Er.endEmitted=!0,Ar.readable=!1,Ar.emit("end"),Er.autoDestroy)){var zr=Ar._writableState;(!zr||zr.autoDestroy&&zr.finished)&&Ar.destroy()}}typeof Symbol=="function"&&(jr.from=function(Er,Ar){return vr===void 0&&(vr=requireFromBrowser()),vr(jr,Er,Ar)});function Cr(Er,Ar){for(var zr=0,Vr=Er.length;zr<Vr;zr++)if(Er[zr]===Ar)return zr;return-1}return _stream_readable$1}var _stream_transform$1,hasRequired_stream_transform$1;function require_stream_transform$1(){if(hasRequired_stream_transform$1)return _stream_transform$1;hasRequired_stream_transform$1=1,_stream_transform$1=Ht;var yt=requireErrorsBrowser().codes,_e=yt.ERR_METHOD_NOT_IMPLEMENTED,$t=yt.ERR_MULTIPLE_CALLBACK,Ft=yt.ERR_TRANSFORM_ALREADY_TRANSFORMING,Vt=yt.ERR_TRANSFORM_WITH_LENGTH_0,qt=require_stream_duplex$1();requireInherits_browser()(Ht,qt);function zt(Jt,Xt){var Zt=this._transformState;Zt.transforming=!1;var er=Zt.writecb;if(er===null)return this.emit("error",new $t);Zt.writechunk=null,Zt.writecb=null,Xt!=null&&this.push(Xt),er(Jt);var tr=this._readableState;tr.reading=!1,(tr.needReadable||tr.length<tr.highWaterMark)&&this._read(tr.highWaterMark)}function Ht(Jt){if(!(this instanceof Ht))return new Ht(Jt);qt.call(this,Jt),this._transformState={afterTransform:zt.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,Jt&&(typeof Jt.transform=="function"&&(this._transform=Jt.transform),typeof Jt.flush=="function"&&(this._flush=Jt.flush)),this.on("prefinish",Kt)}function Kt(){var Jt=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(Xt,Zt){Gt(Jt,Xt,Zt)}):Gt(this,null,null)}Ht.prototype.push=function(Jt,Xt){return this._transformState.needTransform=!1,qt.prototype.push.call(this,Jt,Xt)},Ht.prototype._transform=function(Jt,Xt,Zt){Zt(new _e("_transform()"))},Ht.prototype._write=function(Jt,Xt,Zt){var er=this._transformState;if(er.writecb=Zt,er.writechunk=Jt,er.writeencoding=Xt,!er.transforming){var tr=this._readableState;(er.needTransform||tr.needReadable||tr.length<tr.highWaterMark)&&this._read(tr.highWaterMark)}},Ht.prototype._read=function(Jt){var Xt=this._transformState;Xt.writechunk!==null&&!Xt.transforming?(Xt.transforming=!0,this._transform(Xt.writechunk,Xt.writeencoding,Xt.afterTransform)):Xt.needTransform=!0},Ht.prototype._destroy=function(Jt,Xt){qt.prototype._destroy.call(this,Jt,function(Zt){Xt(Zt)})};function Gt(Jt,Xt,Zt){if(Xt)return Jt.emit("error",Xt);if(Zt!=null&&Jt.push(Zt),Jt._writableState.length)throw new Vt;if(Jt._transformState.transforming)throw new Ft;
1491return Jt.push(null)}return _stream_transform$1}var _stream_passthrough$1,hasRequired_stream_passthrough$1;function require_stream_passthrough$1(){if(hasRequired_stream_passthrough$1)return _stream_passthrough$1;hasRequired_stream_passthrough$1=1,_stream_passthrough$1=_e;var yt=require_stream_transform$1();requireInherits_browser()(_e,yt);function _e($t){if(!(this instanceof _e))return new _e($t);yt.call(this,$t)}return _e.prototype._transform=function($t,Ft,Vt){Vt(null,$t)},_stream_passthrough$1}var pipeline_1,hasRequiredPipeline;function requirePipeline(){if(hasRequiredPipeline)return pipeline_1;hasRequiredPipeline=1;var yt;function _e(Zt){var er=!1;return function(){er||(er=!0,Zt.apply(void 0,arguments))}}var $t=requireErrorsBrowser().codes,Ft=$t.ERR_MISSING_ARGS,Vt=$t.ERR_STREAM_DESTROYED;function qt(Zt){if(Zt)throw Zt}function zt(Zt){return Zt.setHeader&&typeof Zt.abort=="function"}function Ht(Zt,er,tr,rr){rr=_e(rr);var ar=!1;Zt.on("close",function(){ar=!0}),yt===void 0&&(yt=requireEndOfStream()),yt(Zt,{readable:er,writable:tr},function(cr){if(cr)return rr(cr);ar=!0,rr()});var nr=!1;return function(cr){if(!ar&&!nr){if(nr=!0,zt(Zt))return Zt.abort();if(typeof Zt.destroy=="function")return Zt.destroy();rr(cr||new Vt("pipe"))}}}function Kt(Zt){Zt()}function Gt(Zt,er){return Zt.pipe(er)}function Jt(Zt){return!Zt.length||typeof Zt[Zt.length-1]!="function"?qt:Zt.pop()}function Xt(){for(var Zt=arguments.length,er=new Array(Zt),tr=0;tr<Zt;tr++)er[tr]=arguments[tr];var rr=Jt(er);if(Array.isArray(er[0])&&(er=er[0]),er.length<2)throw new Ft("streams");var ar,nr=er.map(function(cr,fr){var vr=fr<er.length-1,xr=fr>0;return Ht(cr,vr,xr,function(Sr){ar||(ar=Sr),Sr&&nr.forEach(Kt),!vr&&(nr.forEach(Kt),rr(ar))})});return er.reduce(Gt)}return pipeline_1=Xt,pipeline_1}var streamBrowserify,hasRequiredStreamBrowserify;function requireStreamBrowserify(){if(hasRequiredStreamBrowserify)return streamBrowserify;hasRequiredStreamBrowserify=1,streamBrowserify=$t;var yt=requireEvents().EventEmitter,_e=requireInherits_browser();_e($t,yt),$t.Readable=require_stream_readable$1(),$t.Writable=require_stream_writable$1(),$t.Duplex=require_stream_duplex$1(),$t.Transform=require_stream_transform$1(),$t.PassThrough=require_stream_passthrough$1(),$t.finished=requireEndOfStream(),$t.pipeline=requirePipeline(),$t.Stream=$t;function $t(){yt.call(this)}return $t.prototype.pipe=function(Ft,Vt){var qt=this;function zt(er){Ft.writable&&Ft.write(er)===!1&&qt.pause&&qt.pause()}qt.on("data",zt);function Ht(){qt.readable&&qt.resume&&qt.resume()}Ft.on("drain",Ht),!Ft._isStdio&&(!Vt||Vt.end!==!1)&&(qt.on("end",Gt),qt.on("close",Jt));var Kt=!1;function Gt(){Kt||(Kt=!0,Ft.end())}function Jt(){Kt||(Kt=!0,typeof Ft.destroy=="function"&&Ft.destroy())}function Xt(er){if(Zt(),yt.listenerCount(this,"error")===0)throw er}qt.on("error",Xt),Ft.on("error",Xt);function Zt(){qt.removeListener("data",zt),Ft.removeListener("drain",Ht),qt.removeListener("end",Gt),qt.removeListener("close",Jt),qt.removeListener("error",Xt),Ft.removeListener("error",Xt),qt.removeListener("end",Zt),qt.removeListener("close",Zt),Ft.removeListener("close",Zt)}return qt.on("end",Zt),qt.on("close",Zt),Ft.on("close",Zt),Ft.emit("pipe",qt),Ft},streamBrowserify}var hashBase$1,hasRequiredHashBase$1;function requireHashBase$1(){if(hasRequiredHashBase$1)return hashBase$1;hasRequiredHashBase$1=1;var yt=requireSafeBuffer$2().Buffer,_e=requireStreamBrowserify().Transform,$t=requireInherits_browser();function Ft(Ht){_e.call(this),this._block=yt.allocUnsafe(Ht),this._blockSize=Ht,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}$t(Ft,_e),Ft.prototype._transform=function(Ht,Kt,Gt){var Jt=null;try{this.update(Ht,Kt)}catch(Xt){Jt=Xt}Gt(Jt)},Ft.prototype._flush=function(Ht){var Kt=null;try{this.push(this.digest())}catch(Gt){Kt=Gt}Ht(Kt)};var Vt=typeof Uint8Array<"u",qt=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(yt.prototype instanceof Uint8Array||yt.TYPED_ARRAY_SUPPORT);function zt(Ht,Kt){if(Ht instanceof yt)return Ht;if(typeof Ht=="string")return yt.from(Ht,Kt);if(qt&&ArrayBuffer.isView(Ht)){if(Ht.byteLength===0)return yt.alloc(0);var Gt=yt.from(Ht.buffer,Ht.byteOffset,Ht.byteLength);if(Gt.byteLength===Ht.byteLength)return Gt}if(Vt&&Ht instanceof Uint8Array||yt.isBuffer(Ht)&&Ht.constructor&&typeof Ht.constructor.isBuffer=="function"&&Ht.constructor.isBuffer(Ht))return yt.from(Ht);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}return Ft.prototype.update=function(Ht,Kt){if(this._finalized)throw new Error("Digest already called");Ht=zt(Ht,Kt);for(var Gt=this._block,Jt=0;this._blockOffset+Ht.length-Jt>=this._blockSize;){for(var Xt=this._blockOffset;Xt<this._blockSize;)Gt[Xt++]=Ht[Jt++];this._update(),this._blockOffset=0}for(;Jt<Ht.length;)Gt[this._blockOffset++]=Ht[Jt++];for(var Zt=0,er=Ht.length*8;er>0;++Zt)this._length[Zt]+=er,er=this._length[Zt]/4294967296|0,er>0&&(this._length[Zt]-=4294967296*er);return this},Ft.prototype._update=function(){throw new Error("_update is not implemented")},Ft.prototype.digest=function(Ht){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var Kt=this._digest();Ht!==void 0&&(Kt=Kt.toString(Ht)),this._block.fill(0),this._blockOffset=0;for(var Gt=0;Gt<4;++Gt)this._length[Gt]=0;return Kt},Ft.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase$1=Ft,hashBase$1}var md5_js,hasRequiredMd5_js;function requireMd5_js(){if(hasRequiredMd5_js)return md5_js;hasRequiredMd5_js=1;var yt=requireInherits_browser(),_e=requireHashBase$1(),$t=requireSafeBuffer$2().Buffer,Ft=new Array(16);function Vt(){_e.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}yt(Vt,_e),Vt.prototype._update=function(){for(var Jt=Ft,Xt=0;Xt<16;++Xt)Jt[Xt]=this._block.readInt32LE(Xt*4);var Zt=this._a,er=this._b,tr=this._c,rr=this._d;Zt=zt(Zt,er,tr,rr,Jt[0],3614090360,7),rr=zt(rr,Zt,er,tr,Jt[1],3905402710,12),tr=zt(tr,rr,Zt,er,Jt[2],606105819,17),er=zt(er,tr,rr,Zt,Jt[3],3250441966,22),Zt=zt(Zt,er,tr,rr,Jt[4],4118548399,7),rr=zt(rr,Zt,er,tr,Jt[5],1200080426,12),tr=zt(tr,rr,Zt,er,Jt[6],2821735955,17),er=zt(er,tr,rr,Zt,Jt[7],4249261313,22),Zt=zt(Zt,er,tr,rr,Jt[8],1770035416,7),rr=zt(rr,Zt,er,tr,Jt[9],2336552879,12),tr=zt(tr,rr,Zt,er,Jt[10],4294925233,17),er=zt(er,tr,rr,Zt,Jt[11],2304563134,22),Zt=zt(Zt,er,tr,rr,Jt[12],1804603682,7),rr=zt(rr,Zt,er,tr,Jt[13],4254626195,12),tr=zt(tr,rr,Zt,er,Jt[14],2792965006,17),er=zt(er,tr,rr,Zt,Jt[15],1236535329,22),Zt=Ht(Zt,er,tr,rr,Jt[1],4129170786,5),rr=Ht(rr,Zt,er,tr,Jt[6],3225465664,9),tr=Ht(tr,rr,Zt,er,Jt[11],643717713,14),er=Ht(er,tr,rr,Zt,Jt[0],3921069994,20),Zt=Ht(Zt,er,tr,rr,Jt[5],3593408605,5),rr=Ht(rr,Zt,er,tr,Jt[10],38016083,9),tr=Ht(tr,rr,Zt,er,Jt[15],3634488961,14),er=Ht(er,tr,rr,Zt,Jt[4],3889429448,20),Zt=Ht(Zt,er,tr,rr,Jt[9],568446438,5),rr=Ht(rr,Zt,er,tr,Jt[14],3275163606,9),tr=Ht(tr,rr,Zt,er,Jt[3],4107603335,14),er=Ht(er,tr,rr,Zt,Jt[8],1163531501,20),Zt=Ht(Zt,er,tr,rr,Jt[13],2850285829,5),rr=Ht(rr,Zt,er,tr,Jt[2],4243563512,9),tr=Ht(tr,rr,Zt,er,Jt[7],1735328473,14),er=Ht(er,tr,rr,Zt,Jt[12],2368359562,20),Zt=Kt(Zt,er,tr,rr,Jt[5],4294588738,4),rr=Kt(rr,Zt,er,tr,Jt[8],2272392833,11),tr=Kt(tr,rr,Zt,er,Jt[11],1839030562,16),er=Kt(er,tr,rr,Zt,Jt[14],4259657740,23),Zt=Kt(Zt,er,tr,rr,Jt[1],2763975236,4),rr=Kt(rr,Zt,er,tr,Jt[4],1272893353,11),tr=Kt(tr,rr,Zt,er,Jt[7],4139469664,16),er=Kt(er,tr,rr,Zt,Jt[10],3200236656,23),Zt=Kt(Zt,er,tr,rr,Jt[13],681279174,4),rr=Kt(rr,Zt,er,tr,Jt[0],3936430074,11),tr=Kt(tr,rr,Zt,er,Jt[3],3572445317,16),er=Kt(er,tr,rr,Zt,Jt[6],76029189,23),Zt=Kt(Zt,er,tr,rr,Jt[9],3654602809,4),rr=Kt(rr,Zt,er,tr,Jt[12],3873151461,11),tr=Kt(tr,rr,Zt,er,Jt[15],530742520,16),er=Kt(er,tr,rr,Zt,Jt[2],3299628645,23),Zt=Gt(Zt,er,tr,rr,Jt[0],4096336452,6),rr=Gt(rr,Zt,er,tr,Jt[7],1126891415,10),tr=Gt(tr,rr,Zt,er,Jt[14],2878612391,15),er=Gt(er,tr,rr,Zt,Jt[5],4237533241,21),Zt=Gt(Zt,er,tr,rr,Jt[12],1700485571,6),rr=Gt(rr,Zt,er,tr,Jt[3],2399980690,10),tr=Gt(tr,rr,Zt,er,Jt[10],4293915773,15),er=Gt(er,tr,rr,Zt,Jt[1],2240044497,21),Zt=Gt(Zt,er,tr,rr,Jt[8],1873313359,6),rr=Gt(rr,Zt,er,tr,Jt[15],4264355552,10),tr=Gt(tr,rr,Zt,er,Jt[6],2734768916,15),er=Gt(er,tr,rr,Zt,Jt[13],1309151649,21),Zt=Gt(Zt,er,tr,rr,Jt[4],4149444226,6),rr=Gt(rr,Zt,er,tr,Jt[11],3174756917,10),tr=Gt(tr,rr,Zt,er,Jt[2],718787259,15),er=Gt(er,tr,rr,Zt,Jt[9],3951481745,21),this._a=this._a+Zt|0,this._b=this._b+er|0,this._c=this._c+tr|0,this._d=this._d+rr|0},Vt.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var Jt=$t.allocUnsafe(16);return Jt.writeInt32LE(this._a,0),Jt.writeInt32LE(this._b,4),Jt.writeInt32LE(this._c,8),Jt.writeInt32LE(this._d,12),Jt};function qt(Jt,Xt){return Jt<<Xt|Jt>>>32-Xt}function zt(Jt,Xt,Zt,er,tr,rr,ar){return qt(Jt+(Xt&Zt|~Xt&er)+tr+rr|0,ar)+Xt|0}function Ht(Jt,Xt,Zt,er,tr,rr,ar){return qt(Jt+(Xt&er|Zt&~er)+tr+rr|0,ar)+Xt|0}function Kt(Jt,Xt,Zt,er,tr,rr,ar){return qt(Jt+(Xt^Zt^er)+tr+rr|0,ar)+Xt|0}function Gt(Jt,Xt,Zt,er,tr,rr,ar){return qt(Jt+(Zt^(Xt|~er))+tr+rr|0,ar)+Xt|0}return md5_js=Vt,md5_js}var ripemd160$1,hasRequiredRipemd160$1;function requireRipemd160$1(){if(hasRequiredRipemd160$1)return ripemd160$1;hasRequiredRipemd160$1=1;var yt=require$$1$2.Buffer,_e=requireInherits_browser(),$t=requireHashBase$1(),Ft=new Array(16),Vt=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],qt=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],zt=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Ht=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],Kt=[0,1518500249,1859775393,2400959708,2840853838],Gt=[1352829926,1548603684,1836072691,2053994217,0];function Jt(){$t.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}_e(Jt,$t),Jt.prototype._update=function(){for(var nr=Ft,cr=0;cr<16;++cr)nr[cr]=this._block.readInt32LE(cr*4);for(var fr=this._a|0,vr=this._b|0,xr=this._c|0,Sr=this._d|0,Tr=this._e|0,Br=this._a|0,jr=this._b|0,Rr=this._c|0,yr=this._d|0,sr=this._e|0,or=0;or<80;or+=1){var Qt,ir;or<16?(Qt=Zt(fr,vr,xr,Sr,Tr,nr[Vt[or]],Kt[0],zt[or]),ir=ar(Br,jr,Rr,yr,sr,
1491nr[qt[or]],Gt[0],Ht[or])):or<32?(Qt=er(fr,vr,xr,Sr,Tr,nr[Vt[or]],Kt[1],zt[or]),ir=rr(Br,jr,Rr,yr,sr,nr[qt[or]],Gt[1],Ht[or])):or<48?(Qt=tr(fr,vr,xr,Sr,Tr,nr[Vt[or]],Kt[2],zt[or]),ir=tr(Br,jr,Rr,yr,sr,nr[qt[or]],Gt[2],Ht[or])):or<64?(Qt=rr(fr,vr,xr,Sr,Tr,nr[Vt[or]],Kt[3],zt[or]),ir=er(Br,jr,Rr,yr,sr,nr[qt[or]],Gt[3],Ht[or])):(Qt=ar(fr,vr,xr,Sr,Tr,nr[Vt[or]],Kt[4],zt[or]),ir=Zt(Br,jr,Rr,yr,sr,nr[qt[or]],Gt[4],Ht[or])),fr=Tr,Tr=Sr,Sr=Xt(xr,10),xr=vr,vr=Qt,Br=sr,sr=yr,yr=Xt(Rr,10),Rr=jr,jr=ir}var ur=this._b+xr+yr|0;this._b=this._c+Sr+sr|0,this._c=this._d+Tr+Br|0,this._d=this._e+fr+jr|0,this._e=this._a+vr+Rr|0,this._a=ur},Jt.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var nr=yt.alloc?yt.alloc(20):new yt(20);return nr.writeInt32LE(this._a,0),nr.writeInt32LE(this._b,4),nr.writeInt32LE(this._c,8),nr.writeInt32LE(this._d,12),nr.writeInt32LE(this._e,16),nr};function Xt(nr,cr){return nr<<cr|nr>>>32-cr}function Zt(nr,cr,fr,vr,xr,Sr,Tr,Br){return Xt(nr+(cr^fr^vr)+Sr+Tr|0,Br)+xr|0}function er(nr,cr,fr,vr,xr,Sr,Tr,Br){return Xt(nr+(cr&fr|~cr&vr)+Sr+Tr|0,Br)+xr|0}function tr(nr,cr,fr,vr,xr,Sr,Tr,Br){return Xt(nr+((cr|~fr)^vr)+Sr+Tr|0,Br)+xr|0}function rr(nr,cr,fr,vr,xr,Sr,Tr,Br){return Xt(nr+(cr&vr|fr&~vr)+Sr+Tr|0,Br)+xr|0}function ar(nr,cr,fr,vr,xr,Sr,Tr,Br){return Xt(nr+(cr^(fr|~vr))+Sr+Tr|0,Br)+xr|0}return ripemd160$1=Jt,ripemd160$1}var sha_js={exports:{}},hash$1,hasRequiredHash$1;function requireHash$1(){if(hasRequiredHash$1)return hash$1;hasRequiredHash$1=1;var yt=requireSafeBuffer$2().Buffer;function _e($t,Ft){this._block=yt.alloc($t),this._finalSize=Ft,this._blockSize=$t,this._len=0}return _e.prototype.update=function($t,Ft){typeof $t=="string"&&(Ft=Ft||"utf8",$t=yt.from($t,Ft));for(var Vt=this._block,qt=this._blockSize,zt=$t.length,Ht=this._len,Kt=0;Kt<zt;){for(var Gt=Ht%qt,Jt=Math.min(zt-Kt,qt-Gt),Xt=0;Xt<Jt;Xt++)Vt[Gt+Xt]=$t[Kt+Xt];Ht+=Jt,Kt+=Jt,Ht%qt===0&&this._update(Vt)}return this._len+=zt,this},_e.prototype.digest=function($t){var Ft=this._len%this._blockSize;this._block[Ft]=128,this._block.fill(0,Ft+1),Ft>=this._finalSize&&(this._update(this._block),this._block.fill(0));var Vt=this._len*8;if(Vt<=4294967295)this._block.writeUInt32BE(Vt,this._blockSize-4);else{var qt=(Vt&4294967295)>>>0,zt=(Vt-qt)/4294967296;this._block.writeUInt32BE(zt,this._blockSize-8),this._block.writeUInt32BE(qt,this._blockSize-4)}this._update(this._block);var Ht=this._hash();return $t?Ht.toString($t):Ht},_e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},hash$1=_e,hash$1}var sha$1,hasRequiredSha$1;function requireSha$1(){if(hasRequiredSha$1)return sha$1;hasRequiredSha$1=1;var yt=requireInherits_browser(),_e=requireHash$1(),$t=requireSafeBuffer$2().Buffer,Ft=[1518500249,1859775393,-1894007588,-899497514],Vt=new Array(80);function qt(){this.init(),this._w=Vt,_e.call(this,64,56)}yt(qt,_e),qt.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function zt(Gt){return Gt<<5|Gt>>>27}function Ht(Gt){return Gt<<30|Gt>>>2}function Kt(Gt,Jt,Xt,Zt){return Gt===0?Jt&Xt|~Jt&Zt:Gt===2?Jt&Xt|Jt&Zt|Xt&Zt:Jt^Xt^Zt}return qt.prototype._update=function(Gt){for(var Jt=this._w,Xt=this._a|0,Zt=this._b|0,er=this._c|0,tr=this._d|0,rr=this._e|0,ar=0;ar<16;++ar)Jt[ar]=Gt.readInt32BE(ar*4);for(;ar<80;++ar)Jt[ar]=Jt[ar-3]^Jt[ar-8]^Jt[ar-14]^Jt[ar-16];for(var nr=0;nr<80;++nr){var cr=~~(nr/20),fr=zt(Xt)+Kt(cr,Zt,er,tr)+rr+Jt[nr]+Ft[cr]|0;rr=tr,tr=er,er=Ht(Zt),Zt=Xt,Xt=fr}this._a=Xt+this._a|0,this._b=Zt+this._b|0,this._c=er+this._c|0,this._d=tr+this._d|0,this._e=rr+this._e|0},qt.prototype._hash=function(){var Gt=$t.allocUnsafe(20);return Gt.writeInt32BE(this._a|0,0),Gt.writeInt32BE(this._b|0,4),Gt.writeInt32BE(this._c|0,8),Gt.writeInt32BE(this._d|0,12),Gt.writeInt32BE(this._e|0,16),Gt},sha$1=qt,sha$1}var sha1,hasRequiredSha1;function requireSha1(){if(hasRequiredSha1)return sha1;hasRequiredSha1=1;var yt=requireInherits_browser(),_e=requireHash$1(),$t=requireSafeBuffer$2().Buffer,Ft=[1518500249,1859775393,-1894007588,-899497514],Vt=new Array(80);function qt(){this.init(),this._w=Vt,_e.call(this,64,56)}yt(qt,_e),qt.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function zt(Jt){return Jt<<1|Jt>>>31}function Ht(Jt){return Jt<<5|Jt>>>27}function Kt(Jt){return Jt<<30|Jt>>>2}function Gt(Jt,Xt,Zt,er){return Jt===0?Xt&Zt|~Xt&er:Jt===2?Xt&Zt|Xt&er|Zt&er:Xt^Zt^er}return qt.prototype._update=function(Jt){for(var Xt=this._w,Zt=this._a|0,er=this._b|0,tr=this._c|0,rr=this._d|0,ar=this._e|0,nr=0;nr<16;++nr)Xt[nr]=Jt.readInt32BE(nr*4);for(;nr<80;++nr)Xt[nr]=zt(Xt[nr-3]^Xt[nr-8]^Xt[nr-14]^Xt[nr-16]);for(var cr=0;cr<80;++cr){var fr=~~(cr/20),vr=Ht(Zt)+Gt(fr,er,tr,rr)+ar+Xt[cr]+Ft[fr]|0;ar=rr,rr=tr,tr=Kt(er),er=Zt,Zt=vr}this._a=Zt+this._a|0,this._b=er+this._b|0,this._c=tr+this._c|0,this._d=rr+this._d|0,this._e=ar+this._e|0},qt.prototype._hash=function(){var Jt=$t.allocUnsafe(20);return Jt.writeInt32BE(this._a|0,0),Jt.writeInt32BE(this._b|0,4),Jt.writeInt32BE(this._c|0,8),Jt.writeInt32BE(this._d|0,12),Jt.writeInt32BE(this._e|0,16),Jt},sha1=qt,sha1}var sha256$1,hasRequiredSha256;function requireSha256(){if(hasRequiredSha256)return sha256$1;hasRequiredSha256=1;var yt=requireInherits_browser(),_e=requireHash$1(),$t=requireSafeBuffer$2().Buffer,Ft=[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,2756
1491734187,3204031479,3329325298],Vt=new Array(64);function qt(){this.init(),this._w=Vt,_e.call(this,64,56)}yt(qt,_e),qt.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function zt(Zt,er,tr){return tr^Zt&(er^tr)}function Ht(Zt,er,tr){return Zt&er|tr&(Zt|er)}function Kt(Zt){return(Zt>>>2|Zt<<30)^(Zt>>>13|Zt<<19)^(Zt>>>22|Zt<<10)}function Gt(Zt){return(Zt>>>6|Zt<<26)^(Zt>>>11|Zt<<21)^(Zt>>>25|Zt<<7)}function Jt(Zt){return(Zt>>>7|Zt<<25)^(Zt>>>18|Zt<<14)^Zt>>>3}function Xt(Zt){return(Zt>>>17|Zt<<15)^(Zt>>>19|Zt<<13)^Zt>>>10}return qt.prototype._update=function(Zt){for(var er=this._w,tr=this._a|0,rr=this._b|0,ar=this._c|0,nr=this._d|0,cr=this._e|0,fr=this._f|0,vr=this._g|0,xr=this._h|0,Sr=0;Sr<16;++Sr)er[Sr]=Zt.readInt32BE(Sr*4);for(;Sr<64;++Sr)er[Sr]=Xt(er[Sr-2])+er[Sr-7]+Jt(er[Sr-15])+er[Sr-16]|0;for(var Tr=0;Tr<64;++Tr){var Br=xr+Gt(cr)+zt(cr,fr,vr)+Ft[Tr]+er[Tr]|0,jr=Kt(tr)+Ht(tr,rr,ar)|0;xr=vr,vr=fr,fr=cr,cr=nr+Br|0,nr=ar,ar=rr,rr=tr,tr=Br+jr|0}this._a=tr+this._a|0,this._b=rr+this._b|0,this._c=ar+this._c|0,this._d=nr+this._d|0,this._e=cr+this._e|0,this._f=fr+this._f|0,this._g=vr+this._g|0,this._h=xr+this._h|0},qt.prototype._hash=function(){var Zt=$t.allocUnsafe(32);return Zt.writeInt32BE(this._a,0),Zt.writeInt32BE(this._b,4),Zt.writeInt32BE(this._c,8),Zt.writeInt32BE(this._d,12),Zt.writeInt32BE(this._e,16),Zt.writeInt32BE(this._f,20),Zt.writeInt32BE(this._g,24),Zt.writeInt32BE(this._h,28),Zt},sha256$1=qt,sha256$1}var sha224$1,hasRequiredSha224;function requireSha224(){if(hasRequiredSha224)return sha224$1;hasRequiredSha224=1;var yt=requireInherits_browser(),_e=requireSha256(),$t=requireHash$1(),Ft=requireSafeBuffer$2().Buffer,Vt=new Array(64);function qt(){this.init(),this._w=Vt,$t.call(this,64,56)}return yt(qt,_e),qt.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},qt.prototype._hash=function(){var zt=Ft.allocUnsafe(28);return zt.writeInt32BE(this._a,0),zt.writeInt32BE(this._b,4),zt.writeInt32BE(this._c,8),zt.writeInt32BE(this._d,12),zt.writeInt32BE(this._e,16),zt.writeInt32BE(this._f,20),zt.writeInt32BE(this._g,24),zt},sha224$1=qt,sha224$1}var sha512$3,hasRequiredSha512;function requireSha512(){if(hasRequiredSha512)return sha512$3;hasRequiredSha512=1;var yt=requireInherits_browser(),_e=requireHash$1(),$t=requireSafeBuffer$2().Buffer,Ft=[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,
14911126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],Vt=new Array(160);function qt(){this.init(),this._w=Vt,_e.call(this,128,112)}yt(qt,_e),qt.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function zt(rr,ar,nr){return nr^rr&(ar^nr)}function Ht(rr,ar,nr){return rr&ar|nr&(rr|ar)}function Kt(rr,ar){return(rr>>>28|ar<<4)^(ar>>>2|rr<<30)^(ar>>>7|rr<<25)}function Gt(rr,ar){return(rr>>>14|ar<<18)^(rr>>>18|ar<<14)^(ar>>>9|rr<<23)}function Jt(rr,ar){return(rr>>>1|ar<<31)^(rr>>>8|ar<<24)^rr>>>7}function Xt(rr,ar){return(rr>>>1|ar<<31)^(rr>>>8|ar<<24)^(rr>>>7|ar<<25)}function Zt(rr,ar){return(rr>>>19|ar<<13)^(ar>>>29|rr<<3)^rr>>>6}function er(rr,ar){return(rr>>>19|ar<<13)^(ar>>>29|rr<<3)^(rr>>>6|ar<<26)}function tr(rr,ar){return rr>>>0<ar>>>0?1:0}return qt.prototype._update=function(rr){for(var ar=this._w,nr=this._ah|0,cr=this._bh|0,fr=this._ch|0,vr=this._dh|0,xr=this._eh|0,Sr=this._fh|0,Tr=this._gh|0,Br=this._hh|0,jr=this._al|0,Rr=this._bl|0,yr=this._cl|0,sr=this._dl|0,or=this._el|0,Qt=this._fl|0,ir=this._gl|0,ur=this._hl|0,gr=0;gr<32;gr+=2)ar[gr]=rr.readInt32BE(gr*4),ar[gr+1]=rr.readInt32BE(gr*4+4);for(;gr<160;gr+=2){var dr=ar[gr-30],lr=ar[gr-15*2+1],hr=Jt(dr,lr),wr=Xt(lr,dr);dr=ar[gr-2*2],lr=ar[gr-2*2+1];var pr=Zt(dr,lr),br=er(lr,dr),Dr=ar[gr-7*2],_r=ar[gr-7*2+1],Nr=ar[gr-16*2],kr=ar[gr-16*2+1],Mr=wr+_r|0,Lr=hr+Dr+tr(Mr,wr)|0;Mr=Mr+br|0,Lr=Lr+pr+tr(Mr,br)|0,Mr=Mr+kr|0,Lr=Lr+Nr+tr(Mr,kr)|0,ar[gr]=Lr,ar[gr+1]=Mr}for(var Cr=0;Cr<160;Cr+=2){Lr=ar[Cr],Mr=ar[Cr+1];var Er=Ht(nr,cr,fr),Ar=Ht(jr,Rr,yr),zr=Kt(nr,jr),Vr=Kt(jr,nr),Gr=Gt(xr,or),tn=Gt(or,xr),Yr=Ft[Cr],Jr=Ft[Cr+1],Kr=zt(xr,Sr,Tr),Xr=zt(or,Qt,ir),Qr=ur+tn|0,un=Br+Gr+tr(Qr,ur)|0;Qr=Qr+Xr|0,un=un+Kr+tr(Qr,Xr)|0,Qr=Qr+Jr|0,un=un+Yr+tr(Qr,Jr)|0,Qr=Qr+Mr|0,un=un+Lr+tr(Qr,Mr)|0;var an=Vr+Ar|0,sn=zr+Er+tr(an,Vr)|0;Br=Tr,ur=ir,Tr=Sr,ir=Qt,Sr=xr,Qt=or,or=sr+Qr|0,xr=vr+un+tr(or,sr)|0,vr=fr,sr=yr,fr=cr,yr=Rr,cr=nr,Rr=jr,jr=Qr+an|0,nr=un+sn+tr(jr,Qr)|0}this._al=this._al+jr|0,this._bl=this._bl+Rr|0,this._cl=this._cl+yr|0,this._dl=this._dl+sr|0,this._el=this._el+or|0,this._fl=this._fl+Qt|0,this._gl=this._gl+ir|0,this._hl=this._hl+ur|0,this._ah=this._ah+nr+tr(this._al,jr)|0,this._bh=this._bh+cr+tr(this._bl,Rr)|0,this._ch=this._ch+fr+tr(this._cl,yr)|0,this._dh=this._dh+vr+tr(this._dl,sr)|0,this._eh=this._eh+xr+tr(this._el,or)|0,this._fh=this._fh+Sr+tr(this._fl,Qt)|0,this._gh=this._gh+Tr+tr(this._gl,ir)|0,this._hh=this._hh+Br+tr(this._hl,ur)|0},qt.prototype._hash=function(){var rr=$t.allocUnsafe(64);function ar(nr,cr,fr){rr.writeInt32BE(nr,fr),rr.writeInt32BE(cr,fr+4)}return ar(this._ah,this._al,0),ar(this._bh,this._bl,8),ar(this._ch,this._cl,16),ar(this._dh,this._dl,24),ar(this._eh,this._el,32),ar(this._fh,this._fl,40),ar(this._gh,this._gl,48),ar(this._hh,this._hl,56),rr},sha512$3=qt,sha512$3}var sha384$1,hasRequiredSha384;function requireSha384(){if(hasRequiredSha384)return sha384$1;hasRequiredSha384=1;var yt=requireInherits_browser(),_e=requireSha512(),$t=requireHash$1(),Ft=requireSafeBuffer$2().Buffer,Vt=new Array(160);function qt(){this.init(),this._w=Vt,$t.call(this,128,112)}return yt(qt,_e),qt.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},qt.prototype._hash=function(){var zt=Ft.allocUnsafe(48);function Ht(Kt,Gt,Jt){zt.writeInt32BE(Kt,Jt),zt.writeInt32BE(Gt,Jt+4)}return Ht(this._ah,this._al,0),Ht(this._bh,this._bl,8),Ht(this._ch,this._cl,16),Ht(this._dh,this._dl,24),Ht(this._eh,this._el,32),Ht(this._fh,this._fl,40),zt},sha384$1=qt,sha384$1}var hasRequiredSha_js;function requireSha_js(){if(hasRequiredSha_js)return sha_js.exports;hasRequiredSha_js=1;var yt=sha_js.exports=function($t){$t=$t.toLowerCase();var Ft=yt[$t];if(!Ft)throw new Error($t+" is not supported (we accept pull requests)");return new Ft};return yt.sha=requireSha$1(),yt.sha1=requireSha1(),yt.sha224=requireSha224(),yt.
1491sha256=requireSha256(),yt.sha384=requireSha384(),yt.sha512=requireSha512(),sha_js.exports}var cipherBase,hasRequiredCipherBase;function requireCipherBase(){if(hasRequiredCipherBase)return cipherBase;hasRequiredCipherBase=1;var yt=requireSafeBuffer$2().Buffer,_e=requireStreamBrowserify().Transform,$t=requireString_decoder().StringDecoder,Ft=requireInherits_browser();function Vt(Kt){_e.call(this),this.hashMode=typeof Kt=="string",this.hashMode?this[Kt]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}Ft(Vt,_e);var qt=typeof Uint8Array<"u",zt=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(yt.prototype instanceof Uint8Array||yt.TYPED_ARRAY_SUPPORT);function Ht(Kt,Gt){if(Kt instanceof yt)return Kt;if(typeof Kt=="string")return yt.from(Kt,Gt);if(zt&&ArrayBuffer.isView(Kt)){if(Kt.byteLength===0)return yt.alloc(0);var Jt=yt.from(Kt.buffer,Kt.byteOffset,Kt.byteLength);if(Jt.byteLength===Kt.byteLength)return Jt}if(qt&&Kt instanceof Uint8Array||yt.isBuffer(Kt)&&Kt.constructor&&typeof Kt.constructor.isBuffer=="function"&&Kt.constructor.isBuffer(Kt))return yt.from(Kt);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}return Vt.prototype.update=function(Kt,Gt,Jt){var Xt=Ht(Kt,Gt),Zt=this._update(Xt);return this.hashMode?this:(Jt&&(Zt=this._toString(Zt,Jt)),Zt)},Vt.prototype.setAutoPadding=function(){},Vt.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},Vt.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},Vt.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},Vt.prototype._transform=function(Kt,Gt,Jt){var Xt;try{this.hashMode?this._update(Kt):this.push(this._update(Kt))}catch(Zt){Xt=Zt}finally{Jt(Xt)}},Vt.prototype._flush=function(Kt){var Gt;try{this.push(this.__final())}catch(Jt){Gt=Jt}Kt(Gt)},Vt.prototype._finalOrDigest=function(Kt){var Gt=this.__final()||yt.alloc(0);return Kt&&(Gt=this._toString(Gt,Kt,!0)),Gt},Vt.prototype._toString=function(Kt,Gt,Jt){if(this._decoder||(this._decoder=new $t(Gt),this._encoding=Gt),this._encoding!==Gt)throw new Error("canât switch encodings");var Xt=this._decoder.write(Kt);return Jt&&(Xt+=this._decoder.end()),Xt},cipherBase=Vt,cipherBase}var browser$9,hasRequiredBrowser$9;function requireBrowser$9(){if(hasRequiredBrowser$9)return browser$9;hasRequiredBrowser$9=1;var yt=requireInherits_browser(),_e=requireMd5_js(),$t=requireRipemd160$1(),Ft=requireSha_js(),Vt=requireCipherBase();function qt(zt){Vt.call(this,"digest"),this._hash=zt}return yt(qt,Vt),qt.prototype._update=function(zt){this._hash.update(zt)},qt.prototype._final=function(){return this._hash.digest()},browser$9=function(Ht){return Ht=Ht.toLowerCase(),Ht==="md5"?new _e:Ht==="rmd160"||Ht==="ripemd160"?new $t:new qt(Ft(Ht))},browser$9}var legacy,hasRequiredLegacy;function requireLegacy(){if(hasRequiredLegacy)return legacy;hasRequiredLegacy=1;var yt=requireInherits_browser(),_e=requireSafeBuffer$2().Buffer,$t=requireCipherBase(),Ft=_e.alloc(128),Vt=64;function qt(zt,Ht){$t.call(this,"digest"),typeof Ht=="string"&&(Ht=_e.from(Ht)),this._alg=zt,this._key=Ht,Ht.length>Vt?Ht=zt(Ht):Ht.length<Vt&&(Ht=_e.concat([Ht,Ft],Vt));for(var Kt=this._ipad=_e.allocUnsafe(Vt),Gt=this._opad=_e.allocUnsafe(Vt),Jt=0;Jt<Vt;Jt++)Kt[Jt]=Ht[Jt]^54,Gt[Jt]=Ht[Jt]^92;this._hash=[Kt]}return yt(qt,$t),qt.prototype._update=function(zt){this._hash.push(zt)},qt.prototype._final=function(){var zt=this._alg(_e.concat(this._hash));return this._alg(_e.concat([this._opad,zt]))},legacy=qt,legacy}var md5$1,hasRequiredMd5$1;function requireMd5$1(){if(hasRequiredMd5$1)return md5$1;hasRequiredMd5$1=1;var yt=requireMd5_js();return md5$1=function(_e){return new yt().update(_e).digest()},md5$1}var browser$8,hasRequiredBrowser$8;function requireBrowser$8(){if(hasRequiredBrowser$8)return browser$8;hasRequiredBrowser$8=1;var yt=requireInherits_browser(),_e=requireLegacy(),$t=requireCipherBase(),Ft=requireSafeBuffer$2().Buffer,Vt=requireMd5$1(),qt=requireRipemd160$1(),zt=requireSha_js(),Ht=Ft.alloc(128);function Kt(Gt,Jt){$t.call(this,"digest"),typeof Jt=="string"&&(Jt=Ft.from(Jt));var Xt=Gt==="sha512"||Gt==="sha384"?128:64;if(this._alg=Gt,this._key=Jt,Jt.length>Xt){var Zt=Gt==="rmd160"?new qt:zt(Gt);Jt=Zt.update(Jt).digest()}else Jt.length<Xt&&(Jt=Ft.concat([Jt,Ht],Xt));for(var er=this._ipad=Ft.allocUnsafe(Xt),tr=this._opad=Ft.allocUnsafe(Xt),rr=0;rr<Xt;rr++)er[rr]=Jt[rr]^54,tr[rr]=Jt[rr]^92;this._hash=Gt==="rmd160"?new qt:zt(Gt),this._hash.update(er)}return yt(Kt,$t),Kt.prototype._update=function(Gt){this._hash.update(Gt)},Kt.prototype._final=function(){var Gt=this._hash.digest(),Jt=this._alg==="rmd160"?new qt:zt(this._alg);return Jt.update(this._opad).update(Gt).digest()},browser$8=function(Jt,Xt){return Jt=Jt.toLowerCase(),Jt==="rmd160"||Jt==="ripemd160"?new Kt("rmd160",Xt):Jt==="md5"?new _e(Vt,Xt):new Kt(Jt,Xt)},browser$8}const sha224WithRSAEncryption={sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption={sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption={sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption={sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},sha256={sign:"ecdsa",hash:"sha256",id:""},sha224={sign:"ecdsa",hash:"sha224",id:""},sha384={sign:"ecdsa",hash:"sha384",id:""},sha512$2={sign:"ecdsa",hash:"sha512",id:""},DSA={sign:"dsa",hash:"sha1",id:""},ripemd160WithRSA={sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption={sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},require$$6={sha224WithRSAEncryption,"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption,"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption,"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption,"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256,sha224,sha384,sha512:sha512$2,"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA,"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA,"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption,"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}};var algos,hasRequiredAlgos;function requireAlgos(){return hasRequiredAlgos||(hasRequiredAlgos=1,algos=require$$6),algos}var browser$7={}
1491,precondition,hasRequiredPrecondition;function requirePrecondition(){if(hasRequiredPrecondition)return precondition;hasRequiredPrecondition=1;var yt=Math.pow(2,30)-1;return precondition=function(_e,$t){if(typeof _e!="number")throw new TypeError("Iterations not a number");if(_e<0)throw new TypeError("Bad iterations");if(typeof $t!="number")throw new TypeError("Key length not a number");if($t<0||$t>yt||$t!==$t)throw new TypeError("Bad key length")},precondition}var defaultEncoding_1,hasRequiredDefaultEncoding;function requireDefaultEncoding(){if(hasRequiredDefaultEncoding)return defaultEncoding_1;hasRequiredDefaultEncoding=1;var yt;if(globalThis.process&&globalThis.process.browser)yt="utf-8";else if(globalThis.process&&globalThis.process.version){var _e=parseInt(process$1.version.split(".")[0].slice(1),10);yt=_e>=6?"utf-8":"binary"}else yt="utf-8";return defaultEncoding_1=yt,defaultEncoding_1}var makeHash,hasRequiredMakeHash;function requireMakeHash(){if(hasRequiredMakeHash)return makeHash;hasRequiredMakeHash=1;var yt=4,_e=new Buffer(yt);_e.fill(0);var $t=8,Ft=16;function Vt(qt){if(qt.length%yt!==0){var zt=qt.length+(yt-qt.length%yt);qt=Buffer.concat([qt,_e],zt)}for(var Ht=new Array(qt.length>>>2),Kt=0,Gt=0;Kt<qt.length;Kt+=yt,Gt++)Ht[Gt]=qt.readInt32LE(Kt);return Ht}return makeHash=function(zt,Ht){var Kt=Ht(Vt(zt),zt.length*$t);zt=new Buffer(Ft);for(var Gt=0;Gt<Kt.length;Gt++)zt.writeInt32LE(Kt[Gt],Gt<<2,!0);return zt},makeHash}var md5,hasRequiredMd5;function requireMd5(){if(hasRequiredMd5)return md5;hasRequiredMd5=1;var yt=requireMakeHash();function _e(Gt,Jt){Gt[Jt>>5]|=128<<Jt%32,Gt[(Jt+64>>>9<<4)+14]=Jt;for(var Xt=1732584193,Zt=-271733879,er=-1732584194,tr=271733878,rr=0;rr<Gt.length;rr+=16){var ar=Xt,nr=Zt,cr=er,fr=tr;Xt=Ft(Xt,Zt,er,tr,Gt[rr+0],7,-680876936),tr=Ft(tr,Xt,Zt,er,Gt[rr+1],12,-389564586),er=Ft(er,tr,Xt,Zt,Gt[rr+2],17,606105819),Zt=Ft(Zt,er,tr,Xt,Gt[rr+3],22,-1044525330),Xt=Ft(Xt,Zt,er,tr,Gt[rr+4],7,-176418897),tr=Ft(tr,Xt,Zt,er,Gt[rr+5],12,1200080426),er=Ft(er,tr,Xt,Zt,Gt[rr+6],17,-1473231341),Zt=Ft(Zt,er,tr,Xt,Gt[rr+7],22,-45705983),Xt=Ft(Xt,Zt,er,tr,Gt[rr+8],7,1770035416),tr=Ft(tr,Xt,Zt,er,Gt[rr+9],12,-1958414417),er=Ft(er,tr,Xt,Zt,Gt[rr+10],17,-42063),Zt=Ft(Zt,er,tr,Xt,Gt[rr+11],22,-1990404162),Xt=Ft(Xt,Zt,er,tr,Gt[rr+12],7,1804603682),tr=Ft(tr,Xt,Zt,er,Gt[rr+13],12,-40341101),er=Ft(er,tr,Xt,Zt,Gt[rr+14],17,-1502002290),Zt=Ft(Zt,er,tr,Xt,Gt[rr+15],22,1236535329),Xt=Vt(Xt,Zt,er,tr,Gt[rr+1],5,-165796510),tr=Vt(tr,Xt,Zt,er,Gt[rr+6],9,-1069501632),er=Vt(er,tr,Xt,Zt,Gt[rr+11],14,643717713),Zt=Vt(Zt,er,tr,Xt,Gt[rr+0],20,-373897302),Xt=Vt(Xt,Zt,er,tr,Gt[rr+5],5,-701558691),tr=Vt(tr,Xt,Zt,er,Gt[rr+10],9,38016083),er=Vt(er,tr,Xt,Zt,Gt[rr+15],14,-660478335),Zt=Vt(Zt,er,tr,Xt,Gt[rr+4],20,-405537848),Xt=Vt(Xt,Zt,er,tr,Gt[rr+9],5,568446438),tr=Vt(tr,Xt,Zt,er,Gt[rr+14],9,-1019803690),er=Vt(er,tr,Xt,Zt,Gt[rr+3],14,-187363961),Zt=Vt(Zt,er,tr,Xt,Gt[rr+8],20,1163531501),Xt=Vt(Xt,Zt,er,tr,Gt[rr+13],5,-1444681467),tr=Vt(tr,Xt,Zt,er,Gt[rr+2],9,-51403784),er=Vt(er,tr,Xt,Zt,Gt[rr+7],14,1735328473),Zt=Vt(Zt,er,tr,Xt,Gt[rr+12],20,-1926607734),Xt=qt(Xt,Zt,er,tr,Gt[rr+5],4,-378558),tr=qt(tr,Xt,Zt,er,Gt[rr+8],11,-2022574463),er=qt(er,tr,Xt,Zt,Gt[rr+11],16,1839030562),Zt=qt(Zt,er,tr,Xt,Gt[rr+14],23,-35309556),Xt=qt(Xt,Zt,er,tr,Gt[rr+1],4,-1530992060),tr=qt(tr,Xt,Zt,er,Gt[rr+4],11,1272893353),er
1491=qt(er,tr,Xt,Zt,Gt[rr+7],16,-155497632),Zt=qt(Zt,er,tr,Xt,Gt[rr+10],23,-1094730640),Xt=qt(Xt,Zt,er,tr,Gt[rr+13],4,681279174),tr=qt(tr,Xt,Zt,er,Gt[rr+0],11,-358537222),er=qt(er,tr,Xt,Zt,Gt[rr+3],16,-722521979),Zt=qt(Zt,er,tr,Xt,Gt[rr+6],23,76029189),Xt=qt(Xt,Zt,er,tr,Gt[rr+9],4,-640364487),tr=qt(tr,Xt,Zt,er,Gt[rr+12],11,-421815835),er=qt(er,tr,Xt,Zt,Gt[rr+15],16,530742520),Zt=qt(Zt,er,tr,Xt,Gt[rr+2],23,-995338651),Xt=zt(Xt,Zt,er,tr,Gt[rr+0],6,-198630844),tr=zt(tr,Xt,Zt,er,Gt[rr+7],10,1126891415),er=zt(er,tr,Xt,Zt,Gt[rr+14],15,-1416354905),Zt=zt(Zt,er,tr,Xt,Gt[rr+5],21,-57434055),Xt=zt(Xt,Zt,er,tr,Gt[rr+12],6,1700485571),tr=zt(tr,Xt,Zt,er,Gt[rr+3],10,-1894986606),er=zt(er,tr,Xt,Zt,Gt[rr+10],15,-1051523),Zt=zt(Zt,er,tr,Xt,Gt[rr+1],21,-2054922799),Xt=zt(Xt,Zt,er,tr,Gt[rr+8],6,1873313359),tr=zt(tr,Xt,Zt,er,Gt[rr+15],10,-30611744),er=zt(er,tr,Xt,Zt,Gt[rr+6],15,-1560198380),Zt=zt(Zt,er,tr,Xt,Gt[rr+13],21,1309151649),Xt=zt(Xt,Zt,er,tr,Gt[rr+4],6,-145523070),tr=zt(tr,Xt,Zt,er,Gt[rr+11],10,-1120210379),er=zt(er,tr,Xt,Zt,Gt[rr+2],15,718787259),Zt=zt(Zt,er,tr,Xt,Gt[rr+9],21,-343485551),Xt=Ht
1491(Xt,ar),Zt=Ht(Zt,nr),er=Ht(er,cr),tr=Ht(tr,fr)}return[Xt,Zt,er,tr]}function $t(Gt,Jt,Xt,Zt,er,tr){return Ht(Kt(Ht(Ht(Jt,Gt),Ht(Zt,tr)),er),Xt)}function Ft(Gt,Jt,Xt,Zt,er,tr,rr){return $t(Jt&Xt|~Jt&Zt,Gt,Jt,er,tr,rr)}function Vt(Gt,Jt,Xt,Zt,er,tr,rr){return $t(Jt&Zt|Xt&~Zt,Gt,Jt,er,tr,rr)}function qt(Gt,Jt,Xt,Zt,er,tr,rr){return $t(Jt^Xt^Zt,Gt,Jt,er,tr,rr)}function zt(Gt,Jt,Xt,Zt,er,tr,rr){return $t(Xt^(Jt|~Zt),Gt,Jt,er,tr,rr)}function Ht(Gt,Jt){var Xt=(Gt&65535)+(Jt&65535),Zt=(Gt>>16)+(Jt>>16)+(Xt>>16);return Zt<<16|Xt&65535}function Kt(Gt,Jt){return Gt<<Jt|Gt>>>32-Jt}return md5=function(Jt){return yt(Jt,_e)},md5}var hashBase,hasRequiredHashBase;function requireHashBase(){if(hasRequiredHashBase)return hashBase;hasRequiredHashBase=1;var yt=requireStreamBrowserify().Transform,_e=requireInherits_browser();function $t(Ft){yt.call(this),this._block=new Buffer(Ft),this._blockSize=Ft,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}return _e($t,yt),$t.prototype._transform=function(Ft,Vt,qt){var zt=null;try{Vt!=="buffer"&&(Ft=new Buffer(Ft,Vt)),this.update(Ft)}catch(Ht){zt=Ht}qt(zt)},$t.prototype._flush=function(Ft){var Vt=null;try{this.push(this._digest())}catch(qt){Vt=qt}Ft(Vt)},$t.prototype.update=function(Ft,Vt){if(!Buffer.isBuffer(Ft)&&typeof Ft!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");Buffer.isBuffer(Ft)||(Ft=new Buffer(Ft,Vt||"binary"));for(var qt=this._block,zt=0;this._blockOffset+Ft.length-zt>=this._blockSize;){for(var Ht=this._blockOffset;Ht<this._blockSize;)qt[Ht++]=Ft[zt++];this._update(),this._blockOffset=0}for(;zt<Ft.length;)qt[this._blockOffset++]=Ft[zt++];for(var Kt=0,Gt=Ft.length*8;Gt>0;++Kt)this._length[Kt]+=Gt,Gt=this._length[Kt]/4294967296|0,Gt>0&&(this._length[Kt]-=4294967296*Gt);return this},$t.prototype._update=function(Ft){throw new Error("_update is not implemented")},$t.prototype.digest=function(Ft){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var Vt=this._digest();return Ft!==void 0&&(Vt=Vt.toString(Ft)),Vt},$t.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase=$t,hashBase}var ripemd160,hasRequiredRipemd160;function requireRipemd160(){if(hasRequiredRipemd160)return ripemd160;hasRequiredRipemd160=1;var yt=requireInherits_browser(),_e=requireHashBase();function $t(){_e.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}yt($t,_e),$t.prototype._update=function(){for(var Gt=new Array(16),Jt=0;Jt<16;++Jt)Gt[Jt]=this._block.readInt32LE(Jt*4);var Xt=this._a,Zt=this._b,er=this._c,tr=this._d,rr=this._e;Xt=Vt(Xt,Zt,er,tr,rr,Gt[0],0,11),er=Ft(er,10),rr=Vt(rr,Xt,Zt,er,tr,Gt[1],0,14),Zt=Ft(Zt,10),tr=Vt(tr,rr,Xt,Zt,er,Gt[2],0,15),Xt=Ft(Xt,10),er=Vt(er,tr,rr,Xt,Zt,Gt[3],0,12),rr=Ft(rr,10),Zt=Vt(Zt,er,tr,rr,Xt,Gt[4],0,5),tr=Ft(tr,10),Xt=Vt(Xt,Zt,er,tr,rr,Gt[5],0,8),er=Ft(er,10),rr=Vt(rr,Xt,Zt,er,tr,Gt[6],0,7),Zt=Ft(Zt,10),tr=Vt(tr,rr,Xt,Zt,er,Gt[7],0,9),Xt=Ft(Xt,10),er=Vt(er,tr,rr,Xt,Zt,Gt[8],0,11),rr=Ft(rr,10),Zt=Vt(Zt,er,tr,rr,Xt,Gt[9],0,13),tr=Ft(tr,10),Xt=Vt(Xt,Zt,er,tr,rr,Gt[10],0,14),er=Ft(er,10),rr=Vt(rr,Xt,Zt,er,tr,Gt[11],0,15),Zt=Ft(Zt,10),tr=Vt(tr,rr,Xt,Zt,er,Gt[12],0,6),Xt=Ft(Xt,10),er=Vt(er,tr,rr,Xt,Zt,Gt[13],0,7),rr=Ft(rr,10),Zt=Vt(Zt,er,tr,rr,Xt,Gt[14],0,9),tr=Ft(tr,10),Xt=Vt(Xt,Zt,er,tr,rr,Gt[15],0,8),er=Ft(er,10),rr=qt(rr,Xt,Zt,er,tr,Gt[7],1518500249,7),Zt=Ft(Zt,10),tr=qt(tr,rr,Xt,Zt,er,Gt[4],1518500249,6),Xt=Ft(Xt,10),er=qt(er,tr,rr,Xt,Zt,Gt[13],1518500249,8),rr=Ft(rr,10),Zt=qt(Zt,er,tr,rr,Xt,Gt[1],1518500249,13),tr=Ft(tr,10),Xt=qt(Xt,Zt,er,tr,rr,Gt[10],1518500249,11),er=Ft(er,10),rr=qt(rr,Xt,Zt,er,tr,Gt[6],1518500249,9),Zt=Ft(Zt,10),tr=qt(tr,rr,Xt,Zt,er,Gt[15],1518500249,7),Xt=Ft(Xt,10),er=qt(er,tr,rr,Xt,Zt,Gt[3],1518500249,15),rr=Ft(rr,10),Zt=qt(Zt,er,tr,rr,Xt,Gt[12],1518500249,7),tr=Ft(tr,10),Xt=qt(Xt,Zt,er,tr,rr,Gt[0],1518500249,12),er=Ft(er,10),rr=qt(rr,Xt,Zt,er,tr,Gt[9],1518500249,15),Zt=Ft(Zt,10),tr=qt(tr,rr,Xt,Zt,er,Gt[5],1518500249,9),Xt=Ft(Xt,10),er=qt(er,tr,rr,Xt,Zt,Gt[2],1518500249,11),rr=Ft(rr,10),Zt=qt(Zt,er,tr,rr,Xt,Gt[14],1518500249,7),tr=Ft(tr,10),Xt=qt(Xt,Zt,er,tr,rr,Gt[11],1518500249,13),er=Ft(er,10),rr=qt(rr,Xt,Zt,er,tr,Gt[8],1518500249,12),Zt=Ft(Zt,10),tr=zt(tr,rr,Xt,Zt,er,Gt[3],1859775393,11),Xt=Ft(Xt,10),er=zt(er,tr,rr,Xt,Zt,Gt[10],1859775393,13),rr=Ft(rr,10),Zt=zt(Zt,er,tr,rr,Xt,Gt[14],1859775393,6),tr=Ft(tr,10),Xt=zt(Xt,Zt,er,tr,rr,Gt[4],
14911859775393,7),er=Ft(er,10),rr=zt(rr,Xt,Zt,er,tr,Gt[9],1859775393,14),Zt=Ft(Zt,10),tr=zt(tr,rr,Xt,Zt,er,Gt[15],1859775393,9),Xt=Ft(Xt,10),er=zt(er,tr,rr,Xt,Zt,Gt[8],1859775393,13),rr=Ft(rr,10),Zt=zt(Zt,er,tr,rr,Xt,Gt[1],1859775393,15),tr=Ft(tr,10),Xt=zt(Xt,Zt,er,tr,rr,Gt[2],1859775393,14),er=Ft(er,10),rr=zt(rr,Xt,Zt,er,tr,Gt[7],1859775393,8),Zt=Ft(Zt,10),tr=zt(tr,rr,Xt,Zt,er,Gt[0],1859775393,13),Xt=Ft(Xt,10),er=zt(er,tr,rr,Xt,Zt,Gt[6],1859775393,6),rr=Ft(rr,10),Zt=zt(Zt,er,tr,rr,Xt,Gt[13],1859775393,5),tr=Ft(tr,10),Xt=zt(Xt,Zt,er,tr,rr,Gt[11],1859775393,12),er=Ft(er,10),rr=zt(rr,Xt,Zt,er,tr,Gt[5],1859775393,7),Zt=Ft(Zt,10),tr=zt(tr,rr,Xt,Zt,er,Gt[12],1859775393,5),Xt=Ft(Xt,10),er=Ht(er,tr,rr,Xt,Zt,Gt[1],2400959708,11),rr=Ft(rr,10),Zt=Ht(Zt,er,tr,rr,Xt,Gt[9],2400959708,12),tr=Ft(tr,10),Xt=Ht(Xt,Zt,er,tr,rr,Gt[11],2400959708,14),er=Ft(er,10),rr=Ht(rr,Xt,Zt,er,tr,Gt[10],2400959708,15),Zt=Ft(Zt,10),tr=Ht(tr,rr,Xt,Zt,er,Gt[0],2400959708,14),Xt=Ft(Xt,10),er=Ht(er,tr,rr,Xt,Zt,Gt[8],2400959708,15),rr=Ft(rr,10),Zt=Ht(Zt,er,tr,rr,Xt,Gt[12],2400959708,9),tr=Ft(tr,10),Xt=Ht(Xt,Zt,er,tr,rr,Gt[4],2400959708,8),er=Ft(er,10),rr=Ht(rr,Xt,Zt,er,tr,Gt[13],2400959708,9),Zt=Ft(Zt,10),tr=Ht(tr,rr,Xt,Zt,er,Gt[3],2400959708,14),Xt=Ft(Xt,10),er=Ht(er,tr,rr,Xt,Zt,Gt[7],2400959708,5),rr=Ft(rr,10),Zt=Ht(Zt,er,tr,rr,Xt,Gt[15],2400959708,6),tr=Ft(tr,10),Xt=Ht(Xt,Zt,er,tr,rr,Gt[14],2400959708,8),er=Ft(er,10),rr=Ht(rr,Xt,Zt,er,tr,Gt[5],2400959708,6),Zt=Ft(Zt,10),tr=Ht(tr,rr,Xt,Zt,er,Gt[6],2400959708,5),Xt=Ft(Xt,10),er=Ht(er,tr,rr,Xt,Zt,Gt[2],2400959708,12),rr=Ft(rr,10),Zt=Kt(Zt,er,tr,rr,Xt,Gt[4],2840853838,9),tr=Ft(tr,10),Xt=Kt(Xt,Zt,er,tr,rr,Gt[0],2840853838,15),er=Ft(er,10),rr=Kt(rr,Xt,Zt,er,tr,Gt[5],2840853838,5),Zt=Ft(Zt,10),tr=Kt(tr,rr,Xt,Zt,er,Gt[9],2840853838,11),Xt=Ft(Xt,10),er=Kt(er,tr,rr,Xt,Zt,Gt[7],2840853838,6),rr=Ft(rr,10),Zt=Kt(Zt,er,tr,rr,Xt,Gt[12],2840853838,8),tr=Ft(tr,10),Xt=Kt(Xt,Zt,er,tr,rr,Gt[2],2840853838,13),er=Ft(er,10),rr=Kt(rr,Xt,Zt,er,tr,Gt[10],2840853838,12),Zt=Ft(Zt,10),tr=Kt(tr,rr,Xt,Zt,er,Gt[14],2840853838,5),Xt=Ft(Xt,10),er=Kt(er,tr,rr,Xt,Zt,Gt[1],2840853838,12),rr=Ft(rr,10),Zt=Kt(Zt,er,tr,rr,Xt,Gt[3],2840853838,13),tr=Ft(tr,10),Xt=Kt(Xt,Zt,er,tr,rr,Gt[8],2840853838,14),er=Ft(er,10),rr=Kt(rr,Xt,Zt,er,tr,Gt[11],2840853838,11),Zt=Ft(Zt,10),tr=Kt(tr,rr,Xt,Zt,er,Gt[6],2840853838,8),Xt=Ft(Xt,10),er=Kt(er,tr,rr,Xt,Zt,Gt[15],2840853838,5),rr=Ft(rr,10),Zt=Kt(Zt,er,tr,rr,Xt,Gt[13],2840853838,6),tr=Ft(tr,10);var ar=this._a,nr=this._b,cr=this._c,fr=this._d,vr=this._e;
1491ar=Kt(ar,nr,cr,fr,vr,Gt[5],1352829926,8),cr=Ft(cr,10),vr=Kt(vr,ar,nr,cr,fr,Gt[14],1352829926,9),nr=Ft(nr,10),fr=Kt(fr,vr,ar,nr,cr,Gt[7],1352829926,9),ar=Ft(ar,10),cr=Kt(cr,fr,vr,ar,nr,Gt[0],1352829926,11),vr=Ft(vr,10),nr=Kt(nr,cr,fr,vr,ar,Gt[9],1352829926,13),fr=Ft(fr,10),ar=Kt(ar,nr,cr,fr,vr,Gt[2],1352829926,15),cr=Ft(cr,10),vr=Kt(vr,ar,nr,cr,fr,Gt[11],1352829926,15),nr=Ft(nr,10),fr=Kt(fr,vr,ar,nr,cr,Gt[4],1352829926,5),ar=Ft(ar,10),cr=Kt(cr,fr,vr,ar,nr,Gt[13],1352829926,7),vr=Ft(vr,10),nr=Kt(nr,cr,fr,vr,ar,Gt[6],1352829926,7),fr=Ft(fr,10),ar=Kt(ar,nr,cr,fr,vr,Gt[15],1352829926,8),cr=Ft(cr,10),vr=Kt(vr,ar,nr,cr,fr,Gt[8],1352829926,11),nr=Ft(nr,10),fr=Kt(fr,vr,ar,nr,cr,Gt[1],1352829926,14),ar=Ft(ar,10),cr=Kt(cr,fr,vr,ar,nr,Gt[10],1352829926,14),vr=Ft(vr,10),nr=Kt(nr,cr,fr,vr,ar,Gt[3],1352829926,12),fr=Ft(fr,10),ar=Kt(ar,nr,cr,fr,vr,Gt[12],1352829926,6),cr=Ft(cr,10),vr=Ht(vr,ar,nr,cr,fr,Gt[6],1548603684,9),nr=Ft(nr,10),fr=Ht(fr,vr,ar,nr,cr,Gt[11],1548603684,13),ar=Ft(ar,10),cr=Ht(cr,fr,vr,ar,nr,Gt[3],1548603684,15),vr=Ft(vr,10),nr=Ht(nr,cr,fr,vr,ar,Gt[7],1548603684,7),fr=Ft(fr,10),ar=Ht(ar,nr,cr,fr,vr,Gt[0],1548603684,12),cr=Ft(cr,10),vr=Ht(vr,ar,nr,cr,fr,Gt[13],1548603684,8),nr=Ft(nr,10),fr=Ht(fr,vr,ar,nr,cr,Gt[5],1548603684,9),ar=Ft(ar,10),cr=Ht(cr,fr,vr,ar,nr,Gt[10],1548603684,11),vr=Ft(vr,10),nr=Ht(nr,cr,fr,vr,ar,Gt[14],1548603684,7),fr=Ft(fr,10),ar=Ht(ar,nr,cr,fr,vr,Gt[15],1548603684,7),cr=Ft(cr,10),vr=Ht(vr,ar,nr,cr,fr,Gt[8],1548603684,12),nr=Ft(nr,10),fr=Ht(fr,vr,ar,nr,cr,Gt[12],1548603684,7),ar=Ft(ar,10),cr=Ht(cr,fr,vr,ar,nr,Gt[4],1548603684,6),vr=Ft(vr,10),nr=Ht(nr,cr,fr,vr,ar,Gt[9],1548603684,15),fr=Ft(fr,10),ar=Ht(ar,nr,cr,fr,vr,Gt[1],1548603684,13),cr=Ft(cr,10),vr=Ht(vr,ar,nr,cr,fr,Gt[2],1548603684,11),nr=Ft(nr,10),fr=zt(fr,vr,ar,nr,cr,Gt[15],1836072691,9),ar=Ft(ar,10),cr=zt(cr,fr,vr,ar,nr,Gt[5],1836072691,7),vr=Ft(vr,10),nr=zt(nr,cr,fr,vr,ar,Gt[1],1836072691,15),fr=Ft(fr,10),ar=zt(ar,nr,cr,fr,vr,Gt[3],1836072691,11),cr=Ft(cr,10),vr=zt(vr,ar,nr,cr,fr,Gt[7],1836072691,8),nr=Ft(nr,10),fr=zt(fr,vr,ar,nr,cr,Gt[14],1836072691,6),ar=Ft(ar,10),cr=zt(cr,fr,vr,ar,nr,Gt[6],1836072691,6),vr=Ft(vr,10),nr=zt(nr,cr,fr,vr,ar,Gt[9],1836072691,14),fr=Ft(fr,10),ar=zt(ar,nr,cr,fr,vr,Gt[11],1836072691,12),cr=Ft(cr,10),vr=zt(vr,ar,nr,cr,fr,Gt[8],1836072691,13),nr=Ft(nr,10),fr=zt(fr,vr,ar,nr,cr,Gt[12],1836072691,5),ar=Ft(ar,10),cr=zt(cr,fr,vr,ar,nr,Gt[2],1836072691,14),vr=Ft(vr,10),nr=zt(nr,cr,fr,vr,ar,Gt[10],1836072691,13),fr=Ft(fr,10),ar=zt(ar,nr,cr,fr,vr,Gt[0],1836072691,13),cr=Ft(cr,10),vr=zt(vr,ar,nr,cr,fr,Gt[4],1836072691,7),nr=Ft(nr,10),fr=zt(fr,vr,ar,nr,cr,Gt[13],1836072691,5),ar=Ft(ar,10),cr=qt(cr,fr,vr,ar,nr,Gt[8],2053994217,15),vr=Ft(vr,10),nr=qt(nr,cr,fr,vr,ar,Gt[6],2053994217,5),fr=Ft(fr,10),ar=qt(ar,nr,cr,fr,vr,Gt[4],2053994217,8),cr=Ft(cr,10),vr=qt(vr,ar,nr,cr,fr,Gt[1],2053994217,11),nr=Ft(nr,10),fr=qt(fr,vr,ar,nr,cr,Gt[3],2053994217,14),ar=Ft(ar,10),cr=qt(cr,fr,vr,ar,nr,Gt[11],2053994217,14),vr=Ft(vr,10),nr=qt(nr,cr,fr,vr,ar,Gt[15],2053994217,6),fr=Ft(fr,10),ar=qt(ar,nr,cr,fr,vr,Gt[0],2053994217,14),cr=Ft(cr,10),vr=qt(vr,ar,nr,cr,fr,Gt[5],2053994217,6),nr=Ft(nr,10),fr=qt(fr,vr,ar,nr,cr,Gt[12],2053994217,9),ar=Ft(ar,10),cr=qt(cr,fr,vr,ar,nr,Gt[2],2053994217,12),vr=Ft(vr,10),nr=qt(nr,cr,fr,vr,ar,Gt[13],2053994217,9),fr=Ft(fr,10),ar=qt(ar,nr,cr,fr,vr,Gt[9],2053994217,12),cr=Ft(cr,10),vr=qt(vr,ar,nr,cr,fr,Gt[7],2053994217,5),nr=Ft(nr,10),fr=qt(fr,vr,ar,nr,cr,Gt[10],2053994217,15),ar=Ft(ar,10),cr=qt(cr,fr,vr,ar,nr,Gt[14],2053994217,8),vr=Ft(vr,10),nr=Vt(nr,cr,fr,vr,ar,Gt[12],0,8),fr=Ft(fr,10),ar=Vt(ar,nr,cr,fr,vr,Gt[15],0,5),cr=Ft(cr,10),vr=Vt(vr,ar,nr,cr,fr,Gt[10],0,12),nr=Ft(nr,10),fr=Vt(fr,vr,ar,nr,cr,Gt[4],0,9),ar=Ft(ar,10),cr=Vt(cr,fr,vr,ar,nr,Gt[1],0,12),vr=Ft(vr,10),nr=Vt(nr,cr,fr,vr,ar,Gt[5],0,5),fr=Ft(fr,10),ar=Vt(ar,nr,cr,fr,vr,Gt[8],0,14),cr=Ft(cr,10),vr=Vt(vr,ar,nr,cr,fr,Gt[7],0,6),nr=Ft(nr,10),fr=Vt(fr,vr,ar,nr,cr,Gt[6],0,8),ar=Ft(ar,10),cr=Vt(cr,fr,vr,ar,nr,Gt[2],0,13),vr=Ft(vr,10),nr=Vt(nr,cr,fr,vr,ar,Gt[13],0,6),fr=Ft(fr,10),ar=Vt(ar,nr,cr,fr,vr,Gt[14],0,5),cr=Ft(cr,10),vr=Vt(vr,ar,nr,cr,fr,Gt[0],0,15),nr=Ft(nr,10),fr=Vt(fr,vr,ar,nr,cr,Gt[3],0,13),ar=Ft(ar,10),cr=Vt(cr,fr,vr,ar,nr,Gt[9],0,11),vr=Ft(vr,10),nr=Vt(nr,cr,fr,vr,ar,Gt[11],0,11),fr=Ft(fr,10);var xr=this._b+er+fr|0;this._b=this._c+tr+vr|0,this._c=this._d+rr+ar|0,this._d=this._e+Xt+nr|0,this._e=this._a+Zt+cr|0,this._a=xr},$t.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var Gt=new Buffer(20);return Gt.writeInt32LE(this._a,0),Gt.writeInt32LE(this._b,4),Gt.writeInt32LE(this._c,8),Gt.writeInt32LE(this._d,12),Gt.writeInt32LE(this._e,16),Gt};function Ft(Gt,Jt){return Gt<<Jt|Gt>>>32-Jt}function Vt(Gt,Jt,Xt,Zt,er,tr,rr,ar){return Ft(Gt+(Jt^Xt^Zt)+tr+rr|0,ar)+er|0}function qt(Gt,Jt,Xt,Zt,er,tr,rr,ar){return Ft(Gt+(Jt&Xt|~Jt&Zt)+tr+rr|0,ar)+er|0}function zt(Gt,Jt,Xt,Zt,er,tr,rr,ar){return Ft(Gt+((Jt|~Xt)^Zt)+tr+rr|0,ar)+er|0}function Ht(Gt,Jt,Xt,Zt,er,tr,rr,ar){return Ft(Gt+(Jt&Zt|Xt&~Zt)+tr+rr|0,ar)+er|0}function Kt(Gt,Jt,Xt,Zt,er,tr,rr,ar){return Ft(Gt+(Jt^(Xt|~Zt))+tr+rr|0,ar)+er|0}return ripemd160=$t,ripemd160}var isarray$1,hasRequiredIsarray$1;function requireIsarray$1(){if(hasRequiredIsarray$1)return isarray$1;hasRequiredIsarray$1=1;var yt={}.toString;return isarray$1=Array.isArray||function(_e){return yt.call(_e)=="[object Array]"},isarray$1}var typedArrayBuffer,hasRequiredTypedArrayBuffer;function requireTypedArrayBuffer(){if(hasRequiredTypedArrayBuffer)return typedArrayBuffer;hasRequiredTypedArrayBuffer=1;var yt=requireType(),_e=requireCallBound(),$t=_e("TypedArray.prototype.buffer",!0),Ft=requireIsTypedArray();return typedArrayBuffer=$t||function(qt){if(!Ft(qt))throw new yt("Not a Typed Array");return qt.buffer},typedArrayBuffer}var toBuffer,hasRequiredToBuffer$1;function requireToBuffer$1(){if(hasRequiredToBuffer$1)return toBuffer;hasRequiredToBuffer$1=1;var yt=requireSafeBuffer$2().Buffer,_e=requireIsarray$1(),$t=requireTypedArrayBuffer(),Ft=ArrayBuffer.isView||function(Kt){try{return $t(Kt),!0}catch{return!1}},Vt=typeof Uint8Array<"u",qt=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",zt=qt&&(yt.prototype instanceof Uint8Array||yt.TYPED_ARRAY_SUPPORT);return toBuffer=function(Kt,Gt){if(Kt instanceof yt)return Kt;if(typeof Kt=="string")return yt.from(Kt,Gt);if(qt&&Ft(Kt)){if(Kt.byteLength===0)return yt.alloc(0);if(zt){var Jt=yt.from(Kt.buffer,Kt.byteOffset,Kt.byteLength);if(Jt.byteLength===Kt.byteLength)return Jt}var Xt=Kt instanceof Uint8Array?Kt:new Uint8Array(Kt.buffer,Kt.byteOffset,Kt.byteLength),Zt=yt.from(Xt);if(Zt.length===Kt.byteLength)return Zt}if(Vt&&Kt instanceof Uint8Array)return yt.from(Kt);var er=_e(Kt);if(er)for(var tr=0;tr<Kt.length;tr+=1){var rr=Kt[tr];if(typeof rr!="number"||rr<0||rr>255||~~rr!==rr)throw new RangeError("Array items must be numbers in the range 0-255.")}if(er||yt.isBuffer(Kt)&&Kt.constructor&&typeof Kt.constructor.isBuffer=="function"&&Kt.constructor.isBuffer(Kt))return yt.from(Kt);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},toBuffer}var toBuffer_1,hasRequiredToBuffer;function requireToBuffer(){if(hasRequiredToBuffer)return toBuffer_1;hasRequiredToBuffer=1;var yt=requireSafeBuffer$2().Buffer,_e=requireToBuffer$1(),$t=typeof Uint8Array<"u",Ft=$t&&typeof ArrayBuffer<"u",Vt=Ft&&ArrayBuffer.isView;return toBuffer_1=function(qt,zt,Ht){if(typeof qt=="string"||yt.isBuffer(qt)||$t&&qt instanceof Uint8Array||Vt&&Vt(qt))return _e(qt,zt);throw new TypeError(Ht+" must be a string, a Buffer, a Uint8Array, or a DataView")},toBuffer_1}var syncBrowser,hasRequiredSyncBrowser;function requireSyncBrowser(){if(hasRequiredSyncBrowser)return syncBrowser;hasRequiredSyncBrowser=1;var yt=requireMd5(),_e=requireRipemd160(),$t=requireSha_js(),Ft=requireSafeBuffer$2().Buffer,Vt=requirePrecondition(),qt=requireDefaultEncoding(),zt=requireToBuffer(),Ht=Ft.alloc(128),Kt={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},Gt={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function Jt(tr){return new _e().update(tr).digest()}function Xt(tr){function rr(ar){return $t(tr).update(ar).digest()}return tr==="rmd160"||tr==="ripemd160"?Jt:tr==="md5"?yt:rr}function Zt(tr,rr,ar){var nr=Xt(tr),cr=tr==="sha512"||tr==="sha384"?128:64;rr.length>cr?rr=nr(rr):rr.length<cr&&(rr=Ft.concat([rr,Ht],cr));for(var fr=Ft.allocUnsafe(cr+Kt[tr]),vr=Ft.allocUnsafe(cr+Kt[tr]),xr=0;xr<cr;xr++)fr[xr]=rr[xr]^54,vr[xr]=rr[xr]^92;var Sr=Ft.allocUnsafe(cr+ar+4);fr.copy(Sr,0,0,cr),this.ipad1=Sr,this.ipad2=fr,this.opad=vr,this.alg=tr,this.blocksize=cr,this.hash=nr,this.size=Kt[tr]}Zt.prototype.run=function(tr,rr){tr.copy(rr,this.blocksize);var ar=this.hash(rr);return ar.copy(this.opad,this.blocksize),this.hash(this.opad)};function er(tr,rr,ar,nr,cr){Vt(ar,nr),tr=zt(tr,qt,"Password"),rr=zt(rr,qt,"Salt");var fr=(cr||"sha1").toLowerCase(),vr=Gt[fr]||fr,xr=Kt[vr];if(typeof xr!="number"||!xr)throw new TypeError("Digest algorithm not supported: "+cr);
1491var Sr=new Zt(vr,tr,rr.length),Tr=Ft.allocUnsafe(nr),Br=Ft.allocUnsafe(rr.length+4);rr.copy(Br,0,0,rr.length);for(var jr=0,Rr=xr,yr=Math.ceil(nr/Rr),sr=1;sr<=yr;sr++){Br.writeUInt32BE(sr,rr.length);for(var or=Sr.run(Br,Sr.ipad1),Qt=or,ir=1;ir<ar;ir++){Qt=Sr.run(Qt,Sr.ipad2);for(var ur=0;ur<Rr;ur++)or[ur]^=Qt[ur]}or.copy(Tr,jr),jr+=Rr}return Tr}return syncBrowser=er,syncBrowser}var async,hasRequiredAsync;function requireAsync(){if(hasRequiredAsync)return async;hasRequiredAsync=1;var yt=requireSafeBuffer$2().Buffer,_e=requirePrecondition(),$t=requireDefaultEncoding(),Ft=requireSyncBrowser(),Vt=requireToBuffer(),qt,zt=globalThis.crypto&&globalThis.crypto.subtle,Ht={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},Kt=[],Gt;function Jt(){return Gt||(globalThis.process&&globalThis.process.nextTick?Gt=globalThis.process.nextTick:globalThis.queueMicrotask?Gt=globalThis.queueMicrotask:globalThis.setImmediate?Gt=globalThis.setImmediate:Gt=globalThis.setTimeout,Gt)}function Xt(tr,rr,ar,nr,cr){return zt.importKey("raw",tr,{name:"PBKDF2"},!1,["deriveBits"]).then(function(fr){return zt.deriveBits({name:"PBKDF2",salt:rr,iterations:ar,hash:{name:cr}},fr,nr<<3)}).then(function(fr){return yt.from(fr)})}function Zt(tr){if(globalThis.process&&!globalThis.process.browser||!zt||!zt.importKey||!zt.deriveBits)return Promise.resolve(!1);if(Kt[tr]!==void 0)return Kt[tr];qt=qt||yt.alloc(8);var rr=Xt(qt,qt,10,128,tr).then(function(){return!0},function(){return!1});return Kt[tr]=rr,rr}function er(tr,rr){tr.then(function(ar){Jt()(function(){rr(null,ar)})},function(ar){Jt()(function(){rr(ar)})})}return async=function(tr,rr,ar,nr,cr,fr){typeof cr=="function"&&(fr=cr,cr=void 0),cr=cr||"sha1";var vr=Ht[cr.toLowerCase()];if(!vr||typeof globalThis.Promise!="function"){Jt()(function(){var xr;try{xr=Ft(tr,rr,ar,nr,cr)}catch(Sr){fr(Sr);return}fr(null,xr)});return}if(_e(ar,nr),tr=Vt(tr,$t,"Password"),rr=Vt(rr,$t,"Salt"),typeof fr!="function")throw new Error("No callback provided to pbkdf2");er(Zt(vr).then(function(xr){return xr?Xt(tr,rr,ar,nr,vr):Ft(tr,rr,ar,nr,cr)}),fr)},async}var hasRequiredBrowser$7;function requireBrowser$7(){return hasRequiredBrowser$7||(hasRequiredBrowser$7=1,browser$7.pbkdf2=requireAsync(),browser$7.pbkdf2Sync=requireSyncBrowser()),browser$7}var browser$6={},des$1={},utils$3={},hasRequiredUtils$3;function requireUtils$3(){if(hasRequiredUtils$3)return utils$3;hasRequiredUtils$3=1,utils$3.readUInt32BE=function(Vt,qt){var zt=Vt[0+qt]<<24|Vt[1+qt]<<16|Vt[2+qt]<<8|Vt[3+qt];return zt>>>0},utils$3.writeUInt32BE=function(Vt,qt,zt){Vt[0+zt]=qt>>>24,Vt[1+zt]=qt>>>16&255,Vt[2+zt]=qt>>>8&255,Vt[3+zt]=qt&255},utils$3.ip=function(Vt,qt,zt,Ht){for(var Kt=0,Gt=0,Jt=6;Jt>=0;Jt-=2){for(var Xt=0;Xt<=24;Xt+=8)Kt<<=1,Kt|=qt>>>Xt+Jt&1;for(var Xt=0;Xt<=24;Xt+=8)Kt<<=1,Kt|=Vt>>>Xt+Jt&1}for(var Jt=6;Jt>=0;Jt-=2){for(var Xt=1;Xt<=25;Xt+=8)Gt<<=1,Gt|=qt>>>Xt+Jt&1;for(var Xt=1;Xt<=25;Xt+=8)Gt<<=1,Gt|=Vt>>>Xt+Jt&1}zt[Ht+0]=Kt>>>0,zt[Ht+1]=Gt>>>0},utils$3.rip=function(Vt,qt,zt,Ht){for(var Kt=0,Gt=0,Jt=0;Jt<4;Jt++)for(var Xt=24;Xt>=0;Xt-=8)Kt<<=1,Kt|=qt>>>Xt+Jt&1,Kt<<=1,Kt|=Vt>>>Xt+Jt&1;for(var Jt=4;Jt<8;Jt++)for(var Xt=24;Xt>=0;Xt-=8)Gt<<=1,Gt|=qt>>>Xt+Jt&1,Gt<<=1,Gt|=Vt>>>Xt+Jt&1;zt[Ht+0]=Kt>>>0,zt[Ht+1]=Gt>>>0},utils$3.pc1=function(Vt,qt,zt,Ht){for(var Kt=0,Gt=0,Jt=7;Jt>=5;Jt--){for(var Xt=0;Xt<=24;Xt+=8)Kt<<=1,Kt|=qt>>Xt+Jt&1;for(var Xt=0;Xt<=24;Xt+=8)Kt<<=1,Kt|=Vt>>Xt+Jt&1}for(var Xt=0;Xt<=24;Xt+=8)Kt<<=1,Kt|=qt>>Xt+Jt&1;for(var Jt=1;Jt<=3;Jt++){for(var Xt=0;Xt<=24;Xt+=8)Gt<<=1,Gt|=qt>>Xt+Jt&1;for(var Xt=0;Xt<=24;Xt+=8)Gt<<=1,Gt|=Vt>>Xt+Jt&1}for(var Xt=0;Xt<=24;Xt+=8)Gt<<=1,Gt|=Vt>>Xt+Jt&1;zt[Ht+0]=Kt>>>0,zt[Ht+1]=Gt>>>0},utils$3.r28shl=function(Vt,qt){return Vt<<qt&268435455|Vt>>>28-qt};var yt=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];utils$3.pc2=function(Vt,qt,zt,Ht){for(var Kt=0,Gt=0,Jt=yt.length>>>1,Xt=0;Xt<Jt;Xt++)Kt<<=1,Kt|=Vt>>>yt[Xt]&1;for(var Xt=Jt;Xt<yt.length;Xt++)Gt<<=1,Gt|=qt>>>yt[Xt]&1;zt[Ht+0]=Kt>>>0,zt[Ht+1]=Gt>>>0},utils$3.expand=function(Vt,qt,zt){var Ht=0,Kt=0;Ht=(Vt&1)<<5|Vt>>>27;for(var Gt=23;Gt>=15;Gt-=4)Ht<<=6,Ht|=Vt>>>Gt&63;for(var Gt=11;Gt>=3;Gt-=4)Kt|=Vt>>>Gt&63,Kt<<=6;Kt|=(Vt&31)<<1|Vt>>>31,qt[zt+0]=Ht>>>0,qt[zt+1]=Kt>>>0};var _e=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];utils$3.substitute=function(Vt,qt){for(var zt=0,Ht=0;Ht<4;Ht++){var Kt=Vt>>>18-Ht*6&63,Gt=_e[Ht*64+Kt];zt<<=4,zt|=Gt}for(var Ht=0;Ht<4;Ht++){var Kt=qt>>>18-Ht*6&63,Gt=_e[4*64+Ht*64+Kt];zt<<=4,zt|=Gt}return zt>>>0};var $t=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];return utils$3.permute=function(Vt){for(var qt=0,zt=0;zt<$t.length;zt++)qt<<=1,qt|=Vt>>>$t[zt]&1;return qt>>>0},utils$3.padSplit=function(Vt,qt,zt){for(var Ht=Vt.toString(2);Ht.length<qt;)Ht="0"+Ht;for(var Kt=[],Gt=0;Gt<qt;Gt+=zt)Kt.push(Ht.slice(Gt,Gt+zt));return Kt.join(" ")},utils$3}var minimalisticAssert,hasRequiredMinimalisticAssert;function requireMinimalisticAssert(){if(hasRequiredMinimalisticAssert)return minimalisticAssert;hasRequiredMinimalisticAssert=1,minimalisticAssert=yt;function yt(_e,$t){if(!_e)throw new Error($t||"Assertion failed")}return yt.equal=function($t,Ft,Vt){if($t!=Ft)throw new Error(Vt||"Assertion failed: "+$t+" != "+Ft)},minimalisticAssert}var cipher,hasRequiredCipher;
1491function requireCipher(){if(hasRequiredCipher)return cipher;hasRequiredCipher=1;var yt=requireMinimalisticAssert();function _e($t){this.options=$t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=$t.padding!==!1}return cipher=_e,_e.prototype._init=function(){},_e.prototype.update=function(Ft){return Ft.length===0?[]:this.type==="decrypt"?this._updateDecrypt(Ft):this._updateEncrypt(Ft)},_e.prototype._buffer=function(Ft,Vt){for(var qt=Math.min(this.buffer.length-this.bufferOff,Ft.length-Vt),zt=0;zt<qt;zt++)this.buffer[this.bufferOff+zt]=Ft[Vt+zt];return this.bufferOff+=qt,qt},_e.prototype._flushBuffer=function(Ft,Vt){return this._update(this.buffer,0,Ft,Vt),this.bufferOff=0,this.blockSize},_e.prototype._updateEncrypt=function(Ft){var Vt=0,qt=0,zt=(this.bufferOff+Ft.length)/this.blockSize|0,Ht=new Array(zt*this.blockSize);this.bufferOff!==0&&(Vt+=this._buffer(Ft,Vt),this.bufferOff===this.buffer.length&&(qt+=this._flushBuffer(Ht,qt)));for(var Kt=Ft.length-(Ft.length-Vt)%this.blockSize;Vt<Kt;Vt+=this.blockSize)this._update(Ft,Vt,Ht,qt),qt+=this.blockSize;for(;Vt<Ft.length;Vt++,this.bufferOff++)this.buffer[this.bufferOff]=Ft[Vt];return Ht},_e.prototype._updateDecrypt=function(Ft){for(var Vt=0,qt=0,zt=Math.ceil((this.bufferOff+Ft.length)/this.blockSize)-1,Ht=new Array(zt*this.blockSize);zt>0;zt--)Vt+=this._buffer(Ft,Vt),qt+=this._flushBuffer(Ht,qt);return Vt+=this._buffer(Ft,Vt),Ht},_e.prototype.final=function(Ft){var Vt;Ft&&(Vt=this.update(Ft));var qt;return this.type==="encrypt"?qt=this._finalEncrypt():qt=this._finalDecrypt(),Vt?Vt.concat(qt):qt},_e.prototype._pad=function(Ft,Vt){if(Vt===0)return!1;for(;Vt<Ft.length;)Ft[Vt++]=0;return!0},_e.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var Ft=new Array(this.blockSize);return this._update(this.buffer,0,Ft,0),Ft},_e.prototype._unpad=function(Ft){return Ft},_e.prototype._finalDecrypt=function(){yt.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var Ft=new Array(this.blockSize);return this._flushBuffer(Ft,0),this._unpad(Ft)},cipher}var des,hasRequiredDes$1;function requireDes$1(){if(hasRequiredDes$1)return des;hasRequiredDes$1=1;var yt=requireMinimalisticAssert(),_e=requireInherits_browser(),$t=requireUtils$3(),Ft=requireCipher();function Vt(){this.tmp=new Array(2),this.keys=null}function qt(Ht){Ft.call(this,Ht);var Kt=new Vt;this._desState=Kt,this.deriveKeys(Kt,Ht.key)}_e(qt,Ft),des=qt,qt.create=function(Kt){return new qt(Kt)};var zt=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];return qt.prototype.deriveKeys=function(Kt,Gt){Kt.keys=new Array(16*2),yt.equal(Gt.length,this.blockSize,"Invalid key length");var Jt=$t.readUInt32BE(Gt,0),Xt=$t.readUInt32BE(Gt,4);$t.pc1(Jt,Xt,Kt.tmp,0),Jt=Kt.tmp[0],Xt=Kt.tmp[1];for(var Zt=0;Zt<Kt.keys.length;Zt+=2){var er=zt[Zt>>>1];Jt=$t.r28shl(Jt,er),Xt=$t.r28shl(Xt,er),$t.pc2(Jt,Xt,Kt.keys,Zt)}},qt.prototype._update=function(Kt,Gt,Jt,Xt){var Zt=this._desState,er=$t.readUInt32BE(Kt,Gt),tr=$t.readUInt32BE(Kt,Gt+4);$t.ip(er,tr,Zt.tmp,0),er=Zt.tmp[0],tr=Zt.tmp[1],this.type==="encrypt"?this._encrypt(Zt,er,tr,Zt.tmp,0):this._decrypt(Zt,er,tr,Zt.tmp,0),er=Zt.tmp[0],tr=Zt.tmp[1],$t.writeUInt32BE(Jt,er,Xt),$t.writeUInt32BE(Jt,tr,Xt+4)},qt.prototype._pad=function(Kt,Gt){if(this.padding===!1)return!1;for(var Jt=Kt.length-Gt,Xt=Gt;Xt<Kt.length;Xt++)Kt[Xt]=Jt;return!0},qt.prototype._unpad=function(Kt){if(this.padding===!1)return Kt;for(var Gt=Kt[Kt.length-1],Jt=Kt.length-Gt;Jt<Kt.length;Jt++)yt.equal(Kt[Jt],Gt);return Kt.slice(0,Kt.length-Gt)},qt.prototype._encrypt=function(Kt,Gt,Jt,Xt,Zt){for(var er=Gt,tr=Jt,rr=0;rr<Kt.keys.length;rr+=2){var ar=Kt.keys[rr],nr=Kt.keys[rr+1];$t.expand(tr,Kt.tmp,0),ar^=Kt.tmp[0],nr^=Kt.tmp[1];var cr=$t.substitute(ar,nr),fr=$t.permute(cr),vr=tr;tr=(er^fr)>>>0,er=vr}$t.rip(tr,er,Xt,Zt)},qt.prototype._decrypt=function(Kt,Gt,Jt,Xt,Zt){for(var er=Jt,tr=Gt,rr=Kt.keys.length-2;rr>=0;rr-=2){var ar=Kt.keys[rr],nr=Kt.keys[rr+1];$t.expand(er,Kt.tmp,0),ar^=Kt.tmp[0],nr^=Kt.tmp[1];var cr=$t.substitute(ar,nr),fr=$t.permute(cr),vr=er;er=(tr^fr)>>>0,tr=vr}$t.rip(er,tr,Xt,Zt)},des}var cbc$1={},hasRequiredCbc$1;
1491function requireCbc$1(){if(hasRequiredCbc$1)return cbc$1;hasRequiredCbc$1=1;var yt=requireMinimalisticAssert(),_e=requireInherits_browser(),$t={};function Ft(qt){yt.equal(qt.length,8,"Invalid IV length"),this.iv=new Array(8);for(var zt=0;zt<this.iv.length;zt++)this.iv[zt]=qt[zt]}function Vt(qt){function zt(Jt){qt.call(this,Jt),this._cbcInit()}_e(zt,qt);for(var Ht=Object.keys($t),Kt=0;Kt<Ht.length;Kt++){var Gt=Ht[Kt];zt.prototype[Gt]=$t[Gt]}return zt.create=function(Xt){return new zt(Xt)},zt}return cbc$1.instantiate=Vt,$t._cbcInit=function(){var zt=new Ft(this.options.iv);this._cbcState=zt},$t._update=function(zt,Ht,Kt,Gt){var Jt=this._cbcState,Xt=this.constructor.super_.prototype,Zt=Jt.iv;if(this.type==="encrypt"){for(var er=0;er<this.blockSize;er++)Zt[er]^=zt[Ht+er];Xt._update.call(this,Zt,0,Kt,Gt);for(var er=0;er<this.blockSize;er++)Zt[er]=Kt[Gt+er]}else{Xt._update.call(this,zt,Ht,Kt,Gt);for(var er=0;er<this.blockSize;er++)Kt[Gt+er]^=Zt[er];for(var er=0;er<this.blockSize;er++)Zt[er]=zt[Ht+er]}},cbc$1}var ede,hasRequiredEde;function requireEde(){if(hasRequiredEde)return ede;hasRequiredEde=1;var yt=requireMinimalisticAssert(),_e=requireInherits_browser(),$t=requireCipher(),Ft=requireDes$1();function Vt(zt,Ht){yt.equal(Ht.length,24,"Invalid key length");var Kt=Ht.slice(0,8),Gt=Ht.slice(8,16),Jt=Ht.slice(16,24);zt==="encrypt"?this.ciphers=[Ft.create({type:"encrypt",key:Kt}),Ft.create({type:"decrypt",key:Gt}),Ft.create({type:"encrypt",key:Jt})]:this.ciphers=[Ft.create({type:"decrypt",key:Jt}),Ft.create({type:"encrypt",key:Gt}),Ft.create({type:"decrypt",key:Kt})]}function qt(zt){$t.call(this,zt);var Ht=new Vt(this.type,this.options.key);this._edeState=Ht}return _e(qt,$t),ede=qt,qt.create=function(Ht){return new qt(Ht)},qt.prototype._update=function(Ht,Kt,Gt,Jt){var Xt=this._edeState;Xt.ciphers[0]._update(Ht,Kt,Gt,Jt),Xt.ciphers[1]._update(Gt,Jt,Gt,Jt),Xt.ciphers[2]._update(Gt,Jt,Gt,Jt)},qt.prototype._pad=Ft.prototype._pad,qt.prototype._unpad=Ft.prototype._unpad,ede}var hasRequiredDes;function requireDes(){return hasRequiredDes||(hasRequiredDes=1,des$1.utils=requireUtils$3(),des$1.Cipher=requireCipher(),des$1.DES=requireDes$1(),des$1.CBC=requireCbc$1(),des$1.EDE=requireEde()),des$1}var browserifyDes,hasRequiredBrowserifyDes;function requireBrowserifyDes(){if(hasRequiredBrowserifyDes)return browserifyDes;hasRequiredBrowserifyDes=1;var yt=requireCipherBase(),_e=requireDes(),$t=requireInherits_browser(),Ft=requireSafeBuffer$2().Buffer,Vt={"des-ede3-cbc":_e.CBC.instantiate(_e.EDE),"des-ede3":_e.EDE,"des-ede-cbc":_e.CBC.instantiate(_e.EDE),"des-ede":_e.EDE,"des-cbc":_e.CBC.instantiate(_e.DES),"des-ecb":_e.DES};Vt.des=Vt["des-cbc"],Vt.des3=Vt["des-ede3-cbc"],browserifyDes=qt,$t(qt,yt);function qt(zt){yt.call(this);var Ht=zt.mode.toLowerCase(),Kt=Vt[Ht],Gt;zt.decrypt?Gt="decrypt":Gt="encrypt";var Jt=zt.key;Ft.isBuffer(Jt)||(Jt=Ft.from(Jt)),(Ht==="des-ede"||Ht==="des-ede-cbc")&&(Jt=Ft.concat([Jt,Jt.slice(0,8)]));var Xt=zt.iv;Ft.isBuffer(Xt)||(Xt=Ft.from(Xt)),this._des=Kt.create({key:Jt,iv:Xt,type:Gt})}return qt.prototype._update=function(zt){return Ft.from(this._des.update(zt))},qt.prototype._final=function(){return Ft.from(this._des.final())},browserifyDes}var browser$5={},encrypter={},ecb={},hasRequiredEcb;function requireEcb(){return hasRequiredEcb||(hasRequiredEcb=1,ecb.encrypt=function(yt,_e){return yt._cipher.encryptBlock(_e)},ecb.decrypt=function(yt,_e){return yt._cipher.decryptBlock(_e)}),ecb}var cbc={},bufferXor,hasRequiredBufferXor;function requireBufferXor(){return hasRequiredBufferXor||(hasRequiredBufferXor=1,bufferXor=function(_e,$t){for(var Ft=Math.min(_e.length,$t.length),Vt=new Buffer(Ft),qt=0;qt<Ft;++qt)Vt[qt]=_e[qt]^$t[qt];return Vt}),bufferXor}var hasRequiredCbc;function requireCbc(){if(hasRequiredCbc)return cbc;hasRequiredCbc=1;var yt=requireBufferXor();return cbc.encrypt=function(_e,$t){var Ft=yt($t,_e._prev);return _e._prev=_e._cipher.encryptBlock(Ft),_e._prev},cbc.decrypt=function(_e,$t){var Ft=_e._prev;_e._prev=$t;var Vt=_e._cipher.decryptBlock($t);return yt(Vt,Ft)},cbc}var cfb={},hasRequiredCfb;function requireCfb(){if(hasRequiredCfb)return cfb;hasRequiredCfb=1;var yt=requireSafeBuffer$2().Buffer,_e=requireBufferXor();function $t(Ft,Vt,qt){var zt=Vt.length,Ht=_e(Vt,Ft._cache);return Ft._cache=Ft._cache.slice(zt),Ft._prev=yt.concat([Ft._prev,qt?Vt:Ht]),Ht}return cfb.encrypt=function(Ft,Vt,qt){for(var zt=yt.allocUnsafe(0),Ht;Vt.length;)if(Ft._cache.length===0&&(Ft._cache=Ft._cipher.encryptBlock(Ft._prev),Ft._prev=yt.allocUnsafe(0)),Ft._cache.length<=Vt.length)Ht=Ft._cache.length,zt=yt.concat([zt,$t(Ft,Vt.slice(0,Ht),qt)]),Vt=Vt.slice(Ht);else{zt=yt.concat([zt,$t(Ft,Vt,qt)]);break}return zt},cfb}var cfb8={},hasRequiredCfb8;
1491function requireCfb8(){if(hasRequiredCfb8)return cfb8;hasRequiredCfb8=1;var yt=requireSafeBuffer$2().Buffer;function _e($t,Ft,Vt){var qt=$t._cipher.encryptBlock($t._prev),zt=qt[0]^Ft;return $t._prev=yt.concat([$t._prev.slice(1),yt.from([Vt?Ft:zt])]),zt}return cfb8.encrypt=function($t,Ft,Vt){for(var qt=Ft.length,zt=yt.allocUnsafe(qt),Ht=-1;++Ht<qt;)zt[Ht]=_e($t,Ft[Ht],Vt);return zt},cfb8}var cfb1={},hasRequiredCfb1;function requireCfb1(){if(hasRequiredCfb1)return cfb1;hasRequiredCfb1=1;var yt=requireSafeBuffer$2().Buffer;function _e(Ft,Vt,qt){for(var zt,Ht=-1,Kt=8,Gt=0,Jt,Xt;++Ht<Kt;)zt=Ft._cipher.encryptBlock(Ft._prev),Jt=Vt&1<<7-Ht?128:0,Xt=zt[0]^Jt,Gt+=(Xt&128)>>Ht%8,Ft._prev=$t(Ft._prev,qt?Jt:Xt);return Gt}function $t(Ft,Vt){var qt=Ft.length,zt=-1,Ht=yt.allocUnsafe(Ft.length);for(Ft=yt.concat([Ft,yt.from([Vt])]);++zt<qt;)Ht[zt]=Ft[zt]<<1|Ft[zt+1]>>7;return Ht}return cfb1.encrypt=function(Ft,Vt,qt){for(var zt=Vt.length,Ht=yt.allocUnsafe(zt),Kt=-1;++Kt<zt;)Ht[Kt]=_e(Ft,Vt[Kt],qt);return Ht},cfb1}var ofb={},hasRequiredOfb;function requireOfb(){if(hasRequiredOfb)return ofb;hasRequiredOfb=1;var yt=requireBufferXor();function _e($t){return $t._prev=$t._cipher.encryptBlock($t._prev),$t._prev}return ofb.encrypt=function($t,Ft){for(;$t._cache.length<Ft.length;)$t._cache=Buffer.concat([$t._cache,_e($t)]);var Vt=$t._cache.slice(0,Ft.length);return $t._cache=$t._cache.slice(Ft.length),yt(Ft,Vt)},ofb}var ctr={},incr32_1,hasRequiredIncr32;function requireIncr32(){if(hasRequiredIncr32)return incr32_1;hasRequiredIncr32=1;function yt(_e){for(var $t=_e.length,Ft;$t--;)if(Ft=_e.readUInt8($t),Ft===255)_e.writeUInt8(0,$t);else{Ft++,_e.writeUInt8(Ft,$t);break}}return incr32_1=yt,incr32_1}var hasRequiredCtr;function requireCtr(){if(hasRequiredCtr)return ctr;hasRequiredCtr=1;var yt=requireBufferXor(),_e=requireSafeBuffer$2().Buffer,$t=requireIncr32();function Ft(qt){var zt=qt._cipher.encryptBlockRaw(qt._prev);return $t(qt._prev),zt}var Vt=16;return ctr.encrypt=function(qt,zt){var Ht=Math.ceil(zt.length/Vt),Kt=qt._cache.length;qt._cache=_e.concat([qt._cache,_e.allocUnsafe(Ht*Vt)]);for(var Gt=0;Gt<Ht;Gt++){var Jt=Ft(qt),Xt=Kt+Gt*Vt;qt._cache.writeUInt32BE(Jt[0],Xt+0),qt._cache.writeUInt32BE(Jt[1],Xt+4),qt._cache.writeUInt32BE(Jt[2],Xt+8),qt._cache.writeUInt32BE(Jt[3],Xt+12)}var Zt=qt._cache.slice(0,zt.length);return qt._cache=qt._cache.slice(zt.length),yt(zt,Zt)},ctr}const aes128={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},require$$2={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128,aes192,aes256,"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}};var modes_1,hasRequiredModes$1;function requireModes$1(){if(hasRequiredModes$1)return modes_1;hasRequiredModes$1=1;var yt={ECB:requireEcb(),CBC:requireCbc(),CFB:requireCfb(),CFB8:requireCfb8
1491(),CFB1:requireCfb1(),OFB:requireOfb(),CTR:requireCtr(),GCM:requireCtr()},_e=require$$2;for(var $t in _e)_e[$t].module=yt[_e[$t].mode];return modes_1=_e,modes_1}var aes={},hasRequiredAes;function requireAes(){if(hasRequiredAes)return aes;hasRequiredAes=1;var yt=requireSafeBuffer$2().Buffer;function _e(Ht){yt.isBuffer(Ht)||(Ht=yt.from(Ht));for(var Kt=Ht.length/4|0,Gt=new Array(Kt),Jt=0;Jt<Kt;Jt++)Gt[Jt]=Ht.readUInt32BE(Jt*4);return Gt}function $t(Ht){for(var Kt=0;Kt<Ht.length;Ht++)Ht[Kt]=0}function Ft(Ht,Kt,Gt,Jt,Xt){for(var Zt=Gt[0],er=Gt[1],tr=Gt[2],rr=Gt[3],ar=Ht[0]^Kt[0],nr=Ht[1]^Kt[1],cr=Ht[2]^Kt[2],fr=Ht[3]^Kt[3],vr,xr,Sr,Tr,Br=4,jr=1;jr<Xt;jr++)vr=Zt[ar>>>24]^er[nr>>>16&255]^tr[cr>>>8&255]^rr[fr&255]^Kt[Br++],xr=Zt[nr>>>24]^er[cr>>>16&255]^tr[fr>>>8&255]^rr[ar&255]^Kt[Br++],Sr=Zt[cr>>>24]^er[fr>>>16&255]^tr[ar>>>8&255]^rr[nr&255]^Kt[Br++],Tr=Zt[fr>>>24]^er[ar>>>16&255]^tr[nr>>>8&255]^rr[cr&255]^Kt[Br++],ar=vr,nr=xr,cr=Sr,fr=Tr;return vr=(Jt[ar>>>24]<<24|Jt[nr>>>16&255]<<16|Jt[cr>>>8&255]<<8|Jt[fr&255])^Kt[Br++],xr=(Jt[nr>>>24]<<24|Jt[cr>>>16&255]<<16|Jt[fr>>>8&255]<<8|Jt[ar&255])^Kt[Br++],Sr=(Jt[cr>>>24]<<24|Jt[fr>>>16&255]<<16|Jt[ar>>>8&255]<<8|Jt[nr&255])^Kt[Br++],Tr=(Jt[fr>>>24]<<24|Jt[ar>>>16&255]<<16|Jt[nr>>>8&255]<<8|Jt[cr&255])^Kt[Br++],vr=vr>>>0,xr=xr>>>0,Sr=Sr>>>0,Tr=Tr>>>0,[vr,xr,Sr,Tr]}var Vt=[0,1,2,4,8,16,32,64,128,27,54],qt=function(){for(var Ht=new Array(256),Kt=0;Kt<256;Kt++)Kt<128?Ht[Kt]=Kt<<1:Ht[Kt]=Kt<<1^283;for(var Gt=[],Jt=[],Xt=[[],[],[],[]],Zt=[[],[],[],[]],er=0,tr=0,rr=0;rr<256;++rr){var ar=tr^tr<<1^tr<<2^tr<<3^tr<<4;ar=ar>>>8^ar&255^99,Gt[er]=ar,Jt[ar]=er;var nr=Ht[er],cr=Ht[nr],fr=Ht[cr],vr=Ht[ar]*257^ar*16843008;Xt[0][er]=vr<<24|vr>>>8,Xt[1][er]=vr<<16|vr>>>16,Xt[2][er]=vr<<8|vr>>>24,Xt[3][er]=vr,vr=fr*16843009^cr*65537^nr*257^er*16843008,Zt[0][ar]=vr<<24|vr>>>8,Zt[1][ar]=vr<<16|vr>>>16,Zt[2][ar]=vr<<8|vr>>>24,Zt[3][ar]=vr,er===0?er=tr=1:(er=nr^Ht[Ht[Ht[fr^nr]]],tr^=Ht[Ht[tr]])}return{SBOX:Gt,INV_SBOX:Jt,SUB_MIX:Xt,INV_SUB_MIX:Zt}}();function zt(Ht){this._key=_e(Ht),this._reset()}return zt.blockSize=4*4,zt.keySize=256/8,zt.prototype.blockSize=zt.blockSize,zt.prototype.keySize=zt.keySize,zt.prototype._reset=function(){for(var Ht=this._key,Kt=Ht.length,Gt=Kt+6,Jt=(Gt+1)*4,Xt=[],Zt=0;Zt<Kt;Zt++)Xt[Zt]=Ht[Zt];for(Zt=Kt;Zt<Jt;Zt++){var er=Xt[Zt-1];Zt%Kt===0?(er=er<<8|er>>>24,er=qt.SBOX[er>>>24]<<24|qt.SBOX[er>>>16&255]<<16|qt.SBOX[er>>>8&255]<<8|qt.SBOX[er&255],er^=Vt[Zt/Kt|0]<<24):Kt>6&&Zt%Kt===4&&(er=qt.SBOX[er>>>24]<<24|qt.SBOX[er>>>16&255]<<16|qt.SBOX[er>>>8&255]<<8|qt.SBOX[er&255]),Xt[Zt]=Xt[Zt-Kt]^er}for(var tr=[],rr=0;rr<Jt;rr++){var ar=Jt-rr,nr=Xt[ar-(rr%4?0:4)];rr<4||ar<=4?tr[rr]=nr:tr[rr]=qt.INV_SUB_MIX[0][qt.SBOX[nr>>>24]]^qt.INV_SUB_MIX[1][qt.SBOX[nr>>>16&255]]^qt.INV_SUB_MIX[2][qt.SBOX[nr>>>8&255]]^qt.INV_SUB_MIX[3][qt.SBOX[nr&255]]}this._nRounds=Gt,this._keySchedule=Xt,this._invKeySchedule=tr},zt.prototype.encryptBlockRaw=function(Ht){return Ht=_e(Ht),Ft(Ht,this._keySchedule,qt.SUB_MIX,qt.SBOX,this._nRounds)},zt.prototype.encryptBlock=function(Ht){var Kt=this.encryptBlockRaw(Ht),Gt=yt.allocUnsafe(16);return Gt.writeUInt32BE(Kt[0],0),Gt.writeUInt32BE(Kt[1],4),Gt.writeUInt32BE(Kt[2],8),Gt.writeUInt32BE(Kt[3],12),Gt},zt.prototype.decryptBlock=function(Ht){Ht=_e(Ht);var Kt=Ht[1];Ht[1]=Ht[3],Ht[3]=Kt;var Gt=Ft(Ht,this._invKeySchedule,qt.INV_SUB_MIX,qt.INV_SBOX,this._nRounds),Jt=yt.allocUnsafe(16);return Jt.writeUInt32BE(Gt[0],0),Jt.writeUInt32BE(Gt[3],4),Jt.writeUInt32BE(Gt[2],8),Jt.writeUInt32BE(Gt[1],12),Jt},zt.prototype.scrub=function(){$t(this._keySchedule),$t(this._invKeySchedule),$t(this._key)},aes.AES=zt,aes}var ghash,hasRequiredGhash;function requireGhash(){if(hasRequiredGhash)return ghash;hasRequiredGhash=1;var yt=requireSafeBuffer$2().Buffer,_e=yt.alloc(16,0);function $t(qt){return[qt.readUInt32BE(0),qt.readUInt32BE(4),qt.readUInt32BE(8),qt.readUInt32BE(12)]}function Ft(qt){var zt=yt.allocUnsafe(16);return zt.writeUInt32BE(qt[0]>>>0,0),zt.writeUInt32BE(qt[1]>>>0,4),zt.writeUInt32BE(qt[2]>>>0,8),zt.writeUInt32BE(qt[3]>>>0,12),zt}function Vt(qt){this.h=qt,this.state=yt.alloc(16,0),this.cache=yt.allocUnsafe(0)}return Vt.prototype.ghash=function(qt){for(var zt=-1;++zt<qt.length;)this.state[zt]^=qt[zt];this._multiply()},Vt.prototype._multiply=function(){for(var qt=$t(this.h),zt=[0,0,0,0],Ht,Kt,Gt,Jt=-1;++Jt<128;){for(Kt=(this.state[~~(Jt/8)]&1<<7-Jt%8)!==0,Kt&&(zt[0]^=qt[0],zt[1]^=qt[1],zt[2]^=qt[2],zt[3]^=qt[3]),Gt=(qt[3]&1)!==0,Ht=3;Ht>0;Ht--)qt[Ht]=qt[Ht]>>>1|(qt[Ht-1]&1)<<31;qt[0]=qt[0]>>>1,Gt&&(qt[0]=qt[0]^225<<24)}this.state=Ft(zt)},Vt.prototype.update=function(qt){this.cache=yt.concat([this.cache,qt]);for(var zt;this.cache.length>=16;)zt=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(zt)},Vt.prototype.final=function(qt,zt){return this.cache.length&&this.ghash(yt.concat([this.cache,_e],16)),this.ghash(Ft([0,qt,0,zt])),this.state},ghash=Vt,ghash}var authCipher,hasRequiredAuthCipher;
1491function requireAuthCipher(){if(hasRequiredAuthCipher)return authCipher;hasRequiredAuthCipher=1;var yt=requireAes(),_e=requireSafeBuffer$2().Buffer,$t=requireCipherBase(),Ft=requireInherits_browser(),Vt=requireGhash(),qt=requireBufferXor(),zt=requireIncr32();function Ht(Jt,Xt){var Zt=0;Jt.length!==Xt.length&&Zt++;for(var er=Math.min(Jt.length,Xt.length),tr=0;tr<er;++tr)Zt+=Jt[tr]^Xt[tr];return Zt}function Kt(Jt,Xt,Zt){if(Xt.length===12)return Jt._finID=_e.concat([Xt,_e.from([0,0,0,1])]),_e.concat([Xt,_e.from([0,0,0,2])]);var er=new Vt(Zt),tr=Xt.length,rr=tr%16;er.update(Xt),rr&&(rr=16-rr,er.update(_e.alloc(rr,0))),er.update(_e.alloc(8,0));var ar=tr*8,nr=_e.alloc(8);nr.writeUIntBE(ar,0,8),er.update(nr),Jt._finID=er.state;var cr=_e.from(Jt._finID);return zt(cr),cr}function Gt(Jt,Xt,Zt,er){$t.call(this);var tr=_e.alloc(4,0);this._cipher=new yt.AES(Xt);var rr=this._cipher.encryptBlock(tr);this._ghash=new Vt(rr),Zt=Kt(this,Zt,rr),this._prev=_e.from(Zt),this._cache=_e.allocUnsafe(0),this._secCache=_e.allocUnsafe(0),this._decrypt=er,this._alen=0,this._len=0,this._mode=Jt,this._authTag=null,this._called=!1}return Ft(Gt,$t),Gt.prototype._update=function(Jt){if(!this._called&&this._alen){var Xt=16-this._alen%16;Xt<16&&(Xt=_e.alloc(Xt,0),this._ghash.update(Xt))}this._called=!0;var Zt=this._mode.encrypt(this,Jt);return this._decrypt?this._ghash.update(Jt):this._ghash.update(Zt),this._len+=Jt.length,Zt},Gt.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var Jt=qt(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&Ht(Jt,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=Jt,this._cipher.scrub()},Gt.prototype.getAuthTag=function(){if(this._decrypt||!_e.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},Gt.prototype.setAuthTag=function(Xt){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=Xt},Gt.prototype.setAAD=function(Xt){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(Xt),this._alen+=Xt.length},authCipher=Gt,authCipher}var streamCipher,hasRequiredStreamCipher;function requireStreamCipher(){if(hasRequiredStreamCipher)return streamCipher;hasRequiredStreamCipher=1;var yt=requireAes(),_e=requireSafeBuffer$2().Buffer,$t=requireCipherBase(),Ft=requireInherits_browser();function Vt(qt,zt,Ht,Kt){$t.call(this),this._cipher=new yt.AES(zt),this._prev=_e.from(Ht),this._cache=_e.allocUnsafe(0),this._secCache=_e.allocUnsafe(0),this._decrypt=Kt,this._mode=qt}return Ft(Vt,$t),Vt.prototype._update=function(qt){return this._mode.encrypt(this,qt,this._decrypt)},Vt.prototype._final=function(){this._cipher.scrub()},streamCipher=Vt,streamCipher}var evp_bytestokey,hasRequiredEvp_bytestokey;function requireEvp_bytestokey(){if(hasRequiredEvp_bytestokey)return evp_bytestokey;hasRequiredEvp_bytestokey=1;var yt=requireSafeBuffer$2().Buffer,_e=requireMd5_js();function $t(Ft,Vt,qt,zt){if(yt.isBuffer(Ft)||(Ft=yt.from(Ft,"binary")),Vt&&(yt.isBuffer(Vt)||(Vt=yt.from(Vt,"binary")),Vt.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var Ht=qt/8,Kt=yt.alloc(Ht),Gt=yt.alloc(zt||0),Jt=yt.alloc(0);Ht>0||zt>0;){var Xt=new _e;Xt.update(Jt),Xt.update(Ft),Vt&&Xt.update(Vt),Jt=Xt.digest();var Zt=0;if(Ht>0){var er=Kt.length-Ht;Zt=Math.min(Ht,Jt.length),Jt.copy(Kt,er,0,Zt),Ht-=Zt}if(Zt<Jt.length&&zt>0){var tr=Gt.length-zt,rr=Math.min(zt,Jt.length-Zt);Jt.copy(Gt,tr,Zt,Zt+rr),zt-=rr}}return Jt.fill(0),{key:Kt,iv:Gt}}return evp_bytestokey=$t,evp_bytestokey}var hasRequiredEncrypter;function requireEncrypter(){if(hasRequiredEncrypter)return encrypter;hasRequiredEncrypter=1;var yt=requireModes$1(),_e=requireAuthCipher(),$t=requireSafeBuffer$2().Buffer,Ft=requireStreamCipher(),Vt=requireCipherBase(),qt=requireAes(),zt=requireEvp_bytestokey(),Ht=requireInherits_browser();function Kt(er,tr,rr){Vt.call(this),this._cache=new Jt,this._cipher=new qt.AES(tr),this._prev=$t.from(rr),this._mode=er,this._autopadding=!0}Ht(Kt,Vt),Kt.prototype._update=function(er){this._cache.add(er);for(var tr,rr,ar=[];tr=this._cache.get();)rr=this._mode.encrypt(this,tr),ar.push(rr);return $t.concat(ar)};var Gt=$t.alloc(16,16);Kt.prototype._final=function(){var er=this._cache.flush();if(this._autopadding)return er=this._mode.encrypt(this,er),this._cipher.scrub(),er;if(!er.equals(Gt))throw this._cipher.scrub(),new Error("data not multiple of block length")},Kt.prototype.setAutoPadding=function(er){return this._autopadding=!!er,this};function Jt(){this.cache=$t.allocUnsafe(0)}Jt.prototype.add=function(er){this.cache=$t.concat([this.cache,er])},Jt.prototype.get=function(){if(this.cache.length>15){var er=this.cache.slice(0,16);return this.cache=this.cache.slice(16),er}return null},Jt.prototype.flush=function(){for(var er=16-this.cache.length,tr=$t.allocUnsafe(er),rr=-1;++rr<er;)tr.writeUInt8(er,rr);return $t.concat([this.cache,tr])};function Xt(er,tr,rr){var ar=yt[er.toLowerCase()];if(!ar)throw new TypeError("invalid suite type");if(typeof tr=="string"&&(tr=$t.from(tr)),tr.length!==ar.key/8)throw new TypeError("invalid key length "+tr.length);if(typeof rr=="string"&&(rr=$t.from(rr)),ar.mode!=="GCM"&&rr.length!==ar.iv)throw new TypeError("invalid iv length "+rr.length);return ar.type==="stream"?new Ft(ar.module,tr,rr):ar.type==="auth"?new _e(
1491ar.module,tr,rr):new Kt(ar.module,tr,rr)}function Zt(er,tr){var rr=yt[er.toLowerCase()];if(!rr)throw new TypeError("invalid suite type");var ar=zt(tr,!1,rr.key,rr.iv);return Xt(er,ar.key,ar.iv)}return encrypter.createCipheriv=Xt,encrypter.createCipher=Zt,encrypter}var decrypter={},hasRequiredDecrypter;function requireDecrypter(){if(hasRequiredDecrypter)return decrypter;hasRequiredDecrypter=1;var yt=requireAuthCipher(),_e=requireSafeBuffer$2().Buffer,$t=requireModes$1(),Ft=requireStreamCipher(),Vt=requireCipherBase(),qt=requireAes(),zt=requireEvp_bytestokey(),Ht=requireInherits_browser();function Kt(er,tr,rr){Vt.call(this),this._cache=new Gt,this._last=void 0,this._cipher=new qt.AES(tr),this._prev=_e.from(rr),this._mode=er,this._autopadding=!0}Ht(Kt,Vt),Kt.prototype._update=function(er){this._cache.add(er);for(var tr,rr,ar=[];tr=this._cache.get(this._autopadding);)rr=this._mode.decrypt(this,tr),ar.push(rr);return _e.concat(ar)},Kt.prototype._final=function(){var er=this._cache.flush();if(this._autopadding)return Jt(this._mode.decrypt(this,er));if(er)throw new Error("data not multiple of block length")},Kt.prototype.setAutoPadding=function(er){return this._autopadding=!!er,this};function Gt(){this.cache=_e.allocUnsafe(0)}Gt.prototype.add=function(er){this.cache=_e.concat([this.cache,er])},Gt.prototype.get=function(er){var tr;if(er){if(this.cache.length>16)return tr=this.cache.slice(0,16),this.cache=this.cache.slice(16),tr}else if(this.cache.length>=16)return tr=this.cache.slice(0,16),this.cache=this.cache.slice(16),tr;return null},Gt.prototype.flush=function(){if(this.cache.length)return this.cache};function Jt(er){var tr=er[15];if(tr<1||tr>16)throw new Error("unable to decrypt data");for(var rr=-1;++rr<tr;)if(er[rr+(16-tr)]!==tr)throw new Error("unable to decrypt data");if(tr!==16)return er.slice(0,16-tr)}function Xt(er,tr,rr){var ar=$t[er.toLowerCase()];if(!ar)throw new TypeError("invalid suite type");if(typeof rr=="string"&&(rr=_e.from(rr)),ar.mode!=="GCM"&&rr.length!==ar.iv)throw new TypeError("invalid iv length "+rr.length);if(typeof tr=="string"&&(tr=_e.from(tr)),tr.length!==ar.key/8)throw new TypeError("invalid key length "+tr.length);return ar.type==="stream"?new Ft(ar.module,tr,rr,!0):ar.type==="auth"?new yt(ar.module,tr,rr,!0):new Kt(ar.module,tr,rr)}function Zt(er,tr){var rr=$t[er.toLowerCase()];if(!rr)throw new TypeError("invalid suite type");var ar=zt(tr,!1,rr.key,rr.iv);return Xt(er,ar.key,ar.iv)}return decrypter.createDecipher=Zt,decrypter.createDecipheriv=Xt,decrypter}var hasRequiredBrowser$6;function requireBrowser$6(){if(hasRequiredBrowser$6)return browser$5;hasRequiredBrowser$6=1;var yt=requireEncrypter(),_e=requireDecrypter(),$t=require$$2;function Ft(){return Object.keys($t)}return browser$5.createCipher=browser$5.Cipher=yt.createCipher,browser$5.createCipheriv=browser$5.Cipheriv=yt.createCipheriv,browser$5.createDecipher=browser$5.Decipher=_e.createDecipher,browser$5.createDecipheriv=browser$5.Decipheriv=_e.createDecipheriv,browser$5.listCiphers=browser$5.getCiphers=Ft,browser$5}var modes={},hasRequiredModes;function requireModes(){return hasRequiredModes||(hasRequiredModes=1,function(yt){yt["des-ecb"]={key:8,iv:0},yt["des-cbc"]=yt.des={key:8,iv:8},yt["des-ede3-cbc"]=yt.des3={key:24,iv:8},yt["des-ede3"]={key:24,iv:0},yt["des-ede-cbc"]={key:16,iv:8},yt["des-ede"]={key:16,iv:0}}(modes)),modes}var hasRequiredBrowser$5;function requireBrowser$5(){if(hasRequiredBrowser$5)return browser$6;hasRequiredBrowser$5=1;var yt=requireBrowserifyDes(),_e=requireBrowser$6(),$t=requireModes$1(),Ft=requireModes(),Vt=requireEvp_bytestokey();function qt(Jt,Xt){Jt=Jt.toLowerCase();var Zt,er;if($t[Jt])Zt=$t[Jt].key,er=$t[Jt].iv;else if(Ft[Jt])Zt=Ft[Jt].key*8,er=Ft[Jt].iv;else throw new TypeError("invalid suite type");var tr=Vt(Xt,!1,Zt,er);return Ht(Jt,tr.key,tr.iv)}function zt(Jt,Xt){Jt=Jt.toLowerCase();var Zt,er;if($t[Jt])Zt=$t[Jt].key,er=$t[Jt].iv;else if(Ft[Jt])Zt=Ft[Jt].key*8,er=Ft[Jt].iv;else throw new TypeError("invalid suite type");var tr=Vt(Xt,!1,Zt,er);return Kt(Jt,tr.key,tr.iv)}function Ht(Jt,Xt,Zt){if(Jt=Jt.toLowerCase(),$t[Jt])return _e.createCipheriv(Jt,Xt,Zt);if(Ft[Jt])return new yt({key:Xt,iv:Zt,mode:Jt});throw new TypeError("invalid suite type")}function Kt(Jt,Xt,Zt){if(Jt=Jt.toLowerCase(),$t[Jt])return _e.createDecipheriv(Jt,Xt,Zt);if(Ft[Jt])return new yt({key:Xt,iv:Zt,mode:Jt,decrypt:!0});throw new TypeError("invalid suite type")}function Gt(){return Object.keys(Ft).concat(_e.getCiphers())}return browser$6.createCipher=browser$6.Cipher=qt,browser$6.createCipheriv=browser$6.Cipheriv=Ht,browser$6.createDecipher=browser$6.Decipher=zt,browser$6.createDecipheriv=browser$6.Decipheriv=Kt,browser$6.listCiphers=browser$6.getCiphers=Gt,browser$6}var browser$4={},bn$3={exports:{}};bn$3.exports;(function(yt){(function(_e,$t){function Ft(Rr,yr){if(!Rr)throw new Error(yr||"Assertion failed")}function Vt(Rr,yr){Rr.super_=yr;var sr=function(){};sr.prototype=yr.prototype,Rr.prototype=new sr,Rr.prototype.constructor=Rr}function qt(Rr,yr,sr){if(qt.isBN(Rr))return Rr;this.negative=0,this.words=null,this.length=0,this.red=null,Rr!==null&&((yr==="le"||yr==="be")&&(sr=yr,yr=10),this._init(Rr||0,yr||10,sr||"be"))}typeof _e=="object"?_e.exports=qt:$t.BN=qt,qt.BN=qt,qt.wordSize=2
vendor: 10,396 bytes, line 1491
14916;var zt;try{zt=require$$1$2.Buffer}catch{}qt.isBN=function(yr){return yr instanceof qt?!0:yr!==null&&typeof yr=="object"&&yr.constructor.wordSize===qt.wordSize&&Array.isArray(yr.words)},qt.max=function(yr,sr){return yr.cmp(sr)>0?yr:sr},qt.min=function(yr,sr){return yr.cmp(sr)<0?yr:sr},qt.prototype._init=function(yr,sr,or){if(typeof yr=="number")return this._initNumber(yr,sr,or);if(typeof yr=="object")return this._initArray(yr,sr,or);sr==="hex"&&(sr=16),Ft(sr===(sr|0)&&sr>=2&&sr<=36),yr=yr.toString().replace(/\s+/g,"");var Qt=0;yr[0]==="-"&&Qt++,sr===16?this._parseHex(yr,Qt):this._parseBase(yr,sr,Qt),yr[0]==="-"&&(this.negative=1),this.strip(),or==="le"&&this._initArray(this.toArray(),sr,or)},qt.prototype._initNumber=function(yr,sr,or){yr<0&&(this.negative=1,yr=-yr),yr<67108864?(this.words=[yr&67108863],this.length=1):yr<4503599627370496?(this.words=[yr&67108863,yr/67108864&67108863],this.length=2):(Ft(yr<9007199254740992),this.words=[yr&67108863,yr/67108864&67108863,1],this.length=3),or==="le"&&this._initArray(this.toArray(),sr,or)},qt.prototype._initArray=function(yr,sr,or){if(Ft(typeof yr.length=="number"),yr.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(yr.length/3),this.words=new Array(this.length);for(var Qt=0;Qt<this.length;Qt++)this.words[Qt]=0;var ir,ur,gr=0;if(or==="be")for(Qt=yr.length-1,ir=0;Qt>=0;Qt-=3)ur=yr[Qt]|yr[Qt-1]<<8|yr[Qt-2]<<16,this.words[ir]|=ur<<gr&67108863,this.words[ir+1]=ur>>>26-gr&67108863,gr+=24,gr>=26&&(gr-=26,ir++);else if(or==="le")for(Qt=0,ir=0;Qt<yr.length;Qt+=3)ur=yr[Qt]|yr[Qt+1]<<8|yr[Qt+2]<<16,this.words[ir]|=ur<<gr&67108863,this.words[ir+1]=ur>>>26-gr&67108863,gr+=24,gr>=26&&(gr-=26,ir++);return this.strip()};function Ht(Rr,yr,sr){for(var or=0,Qt=Math.min(Rr.length,sr),ir=yr;ir<Qt;ir++){var ur=Rr.charCodeAt(ir)-48;or<<=4,ur>=49&&ur<=54?or|=ur-49+10:ur>=17&&ur<=22?or|=ur-17+10:or|=ur&15}return or}qt.prototype._parseHex=function(yr,sr){this.length=Math.ceil((yr.length-sr)/6),this.words=new Array(this.length);for(var or=0;or<this.length;or++)this.words[or]=0;var Qt,ir,ur=0;for(or=yr.length-6,Qt=0;or>=sr;or-=6)ir=Ht(yr,or,or+6),this.words[Qt]|=ir<<ur&67108863,this.words[Qt+1]|=ir>>>26-ur&4194303,ur+=24,ur>=26&&(ur-=26,Qt++);or+6!==sr&&(ir=Ht(yr,sr,or+6),this.words[Qt]|=ir<<ur&67108863,this.words[Qt+1]|=ir>>>26-ur&4194303),this.strip()};function Kt(Rr,yr,sr,or){for(var Qt=0,ir=Math.min(Rr.length,sr),ur=yr;ur<ir;ur++){var gr=Rr.charCodeAt(ur)-48;Qt*=or,gr>=49?Qt+=gr-49+10:gr>=17?Qt+=gr-17+10:Qt+=gr}return Qt}qt.prototype._parseBase=function(yr,sr,or){this.words=[0],this.length=1;for(var Qt=0,ir=1;ir<=67108863;ir*=sr)Qt++;Qt--,ir=ir/sr|0;for(var ur=yr.length-or,gr=ur%Qt,dr=Math.min(ur,ur-gr)+or,lr=0,hr=or;hr<dr;hr+=Qt)lr=Kt(yr,hr,hr+Qt,sr),this.imuln(ir),this.words[0]+lr<67108864?this.words[0]+=lr:this._iaddn(lr);if(gr!==0){var wr=1;for(lr=Kt(yr,hr,yr.length,sr),hr=0;hr<gr;hr++)wr*=sr;this.imuln(wr),this.words[0]+lr<67108864?this.words[0]+=lr:this._iaddn(lr)}},qt.prototype.copy=function(yr){yr.words=new Array(this.length);for(var sr=0;sr<this.length;sr++)yr.words[sr]=this.words[sr];yr.length=this.length,yr.negative=this.negative,yr.red=this.red},qt.prototype.clone=function(){var yr=new qt(null);return this.copy(yr),yr},qt.prototype._expand=function(yr){for(;this.length<yr;)this.words[this.length++]=0;return this},qt.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},qt.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},qt.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var Gt=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],Jt=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],Xt=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];qt.prototype.toString=function(yr,sr){yr=yr||10,sr=sr|0||1;var or;if(yr===16||yr==="hex"){or="";for(var Qt=0,ir=0,ur=0;ur<this.length;ur++){var gr=this.words[ur],dr=((gr<<Qt|ir)&16777215).toString(16);ir=gr>>>24-Qt&16777215,ir!==0||ur!==this.length-1?or=Gt[6-dr.length]+dr+or:or=dr+or,Qt+=2,Qt>=26&&(Qt-=26,ur--)}for(ir!==0&&(or=ir.toString(16)+or);or.length%sr!==0;)or="0"+or;return this.negative!==0&&(or="-"+or),or}if(yr===(yr|0)&&yr>=2&&yr<=36){var lr=Jt[yr],hr=Xt[yr];or="";var wr=this.clone();for(wr.negative=0;!wr.isZero();){var pr=wr.modn(hr).toString(yr);wr=wr.idivn(hr),wr.isZero()?or=pr+or:or=Gt[lr-pr.length]+pr+or}for(this.isZero()&&(or="0"+or);or.length%sr!==0;)or="0"+or;return this.negative!==0&&(or="-"+or),or}Ft(!1,"Base should be between 2 and 36")},qt.prototype.toNumber=function(){var yr=this.words[0];return this.length===2?yr+=this.words[1]*67108864:this.length===3&&this.words[2]===1?yr+=4503599627370496+this.words[1]*67108864:this.length>2&&Ft(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-yr:yr},qt.prototype.toJSON=function(){return this.toString(16)},qt.prototype.toBuffer=function(yr,sr){return Ft(typeof zt<"u"),this.toArrayLike(zt,yr,sr)},qt.prototype.toArray=function(yr,sr){return this.toArrayLike(Array,yr,sr)},qt.prototype.toArrayLike=function(yr,sr,or){var Qt=this.byteLength(),ir=or||Math.max(1,Qt);Ft(Qt<=ir,"byte array longer than desired length"),Ft(ir>0,"Requested array length <= 0"),this.strip();var ur=sr==="le",gr=new yr(ir),dr,lr,hr=this.clone();if(ur){for(lr=0;!hr.isZero();lr++)dr=hr.andln(255),hr.iushrn(8),gr[lr]=dr;for(;lr<ir;lr++)gr[lr]=0}else{for(lr=0;lr<ir-Qt;lr++)gr[lr]=0;for(lr=0;!hr.isZero();lr++)dr=hr.andln(255),hr.iushrn(8),gr[ir-lr-1]=dr}return gr},Math.clz32?qt.prototype._countBits=function(yr){return 32-Math.clz32(yr)}:qt.prototype._countBits=function(yr){var sr=yr,or=0;return sr>=4096&&(or+=13,sr>>>=13),sr>=64&&(or+=7,sr>>>=7),sr>=8&&(or+=4,sr>>>=4),sr>=2&&(or+=2,sr>>>=2),or+sr},qt.prototype._zeroBits=function(yr){if(yr===0)return 26;var sr=yr,or=0;return sr&8191||(or+=13,sr>>>=13),sr&127||(or+=7,sr>>>=7),sr&15||(or+=4,sr>>>=4),sr&3||(or+=2,sr>>>=2),sr&1||or++,or},qt.prototype.bitLength=function(){var yr=this.words[this.length-1],sr=this._countBits(yr);return(this.length-1)*26+sr};function Zt(Rr){for(var yr=new Array(Rr.bitLength()),sr=0;sr<yr.length;sr++){var or=sr/26|0,Qt=sr%26;yr[sr]=(Rr.words[or]&1<<Qt)>>>Qt}return yr}qt.prototype.zeroBits=function(){if(this.isZero())return 0;for(var yr=0,sr=0;sr<this.length;sr++){var or=this._zeroBits(this.words[sr]);if(yr+=or,or!==26)break}return yr},qt.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},qt.prototype.toTwos=function(yr){return this.negative!==0?this.abs().inotn(yr).iaddn(1):this.clone()},qt.prototype.fromTwos=function(yr){return this.testn(yr-1)?this.notn(yr).iaddn(1).ineg():this.clone()},qt.prototype.isNeg=function(){return this.negative!==0},qt.prototype.neg=function(){return this.clone().ineg()},qt.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},qt.prototype.iuor=function(yr){for(;this.length<yr.length;)this.words[this.length++]=0;for(var sr=0;sr<yr.length;sr++)this.words[sr]=this.words[sr]|yr.words[sr];return this.strip()},qt.prototype.ior=function(yr){return Ft((this.negative|yr.negative)===0),this.iuor(yr)},qt.prototype.or=function(yr){return this.length>yr.length?this.clone().ior(yr):yr.clone().ior(this)},qt.prototype.uor=function(yr){return this.length>yr.length?this.clone().iuor(yr):yr.clone().iuor(this)},qt.prototype.iuand=function(yr){var sr;this.length>yr.length?sr=yr:sr=this;for(var or=0;or<sr.length;or++)this.words[or]=this.words[or]&yr.words[or];return this.length=sr.length,this.strip()},qt.prototype.iand=function(yr){return Ft((this.negative|yr.negative)===0),this.iuand(yr)},qt.prototype.and=function(yr){return this.length>yr.length?this.clone().iand(yr):yr.clone().iand(this)},qt.prototype.uand=function(yr){return this.length>yr.length?this.clone().iuand(yr):yr.clone().iuand(this)},qt.prototype.iuxor=function(yr){var sr,or;this.length>yr.length?(sr=this,or=yr):(sr=yr,or=this);for(var Qt=0;Qt<or.length;Qt++)this.words[Qt]=sr.words[Qt]^or.words[Qt];if(this!==sr)for(;Qt<sr.length;Qt++)this.words[Qt]=sr.words[Qt];return this.length=sr.length,this.strip()},qt.prototype.ixor=function(yr){return Ft((this.negative|yr.negative)===0),this.iuxor(yr)},qt.prototype.xor=function(yr){return this.length>yr.length?this.clone().ixor(yr):yr.clone().ixor(this)},qt.prototype.uxor=function(yr){return this.length>yr.length?this.clone().iuxor(yr):yr.clone().iuxor(this)},qt.prototype.inotn=function(yr){Ft(typeof yr=="number"&&yr>=0);var sr=Math.ceil(yr/26)|0,or=yr%26;this._expand(sr),or>0&&sr--;for(var Qt=0;Qt<sr;Qt++)this.words[Qt]=~this.words[Qt]&67108863;return or>0&&(this.words[Qt]=~this.words[Qt]&67108863>>26-or),this.strip()},qt.prototype.notn=function(yr){return this.clone().inotn(yr)},qt.prototype.setn=function(yr,sr){Ft(typeof yr=="number"&&yr>=0);var or=yr/26|0,Qt=yr%26;return this._expand(or+1),sr?this.words[or]=this.words[or]|1<<Qt:this.words[or]=this.words[or]&~(1<<Qt),this.strip()},qt.prototype.iadd=function(yr){var sr;if(this.negative!==0&&yr.negative===0)return this.negative=0,sr=this.isub(yr),this.negative^=1,this._normSign();if(this.negative===0&&yr.negative!==0)return yr.negative=0,sr=this.isub(yr),yr.negative=1,sr._normSign();var or,Qt;this.length>yr.length?(or=this,Qt=yr):(or=yr,Qt=this);for(var ir=0,ur=0;ur<Qt.length;ur++)sr=(or.words[ur]|0)+(Qt.words[ur]|0)+ir,this.words[ur]=sr&67108863,ir=sr>>>26;for(;ir!==0&&ur<or.length;ur++)sr=(or.words[ur]|0)+ir,this.words[ur]=sr&67108863,ir=sr>>>26;if(this.length=or.length,ir!==0)this.words[this.length]=ir,this.length++;else if(or!==this)for(;ur<or.length;ur++)this.words[ur]=or.words[ur];return this},qt.prototype.add=function(yr){var sr;return yr.negative!==0&&this.negative===0?(yr.negative=0,sr=this.sub(yr),yr.negative^=1,sr):yr.
vendor: 4,048 bytes, line 1491
1491negative===0&&this.negative!==0?(this.negative=0,sr=yr.sub(this),this.negative=1,sr):this.length>yr.length?this.clone().iadd(yr):yr.clone().iadd(this)},qt.prototype.isub=function(yr){if(yr.negative!==0){yr.negative=0;var sr=this.iadd(yr);return yr.negative=1,sr._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(yr),this.negative=1,this._normSign();var or=this.cmp(yr);if(or===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Qt,ir;or>0?(Qt=this,ir=yr):(Qt=yr,ir=this);for(var ur=0,gr=0;gr<ir.length;gr++)sr=(Qt.words[gr]|0)-(ir.words[gr]|0)+ur,ur=sr>>26,this.words[gr]=sr&67108863;for(;ur!==0&&gr<Qt.length;gr++)sr=(Qt.words[gr]|0)+ur,ur=sr>>26,this.words[gr]=sr&67108863;if(ur===0&&gr<Qt.length&&Qt!==this)for(;gr<Qt.length;gr++)this.words[gr]=Qt.words[gr];return this.length=Math.max(this.length,gr),Qt!==this&&(this.negative=1),this.strip()},qt.prototype.sub=function(yr){return this.clone().isub(yr)};function er(Rr,yr,sr){sr.negative=yr.negative^Rr.negative;var or=Rr.length+yr.length|0;sr.length=or,or=or-1|0;var Qt=Rr.words[0]|0,ir=yr.words[0]|0,ur=Qt*ir,gr=ur&67108863,dr=ur/67108864|0;sr.words[0]=gr;for(var lr=1;lr<or;lr++){for(var hr=dr>>>26,wr=dr&67108863,pr=Math.min(lr,yr.length-1),br=Math.max(0,lr-Rr.length+1);br<=pr;br++){var Dr=lr-br|0;Qt=Rr.words[Dr]|0,ir=yr.words[br]|0,ur=Qt*ir+wr,hr+=ur/67108864|0,wr=ur&67108863}sr.words[lr]=wr|0,dr=hr|0}return dr!==0?sr.words[lr]=dr|0:sr.length--,sr.strip()}var tr=function(yr,sr,or){var Qt=yr.words,ir=sr.words,ur=or.words,gr=0,dr,lr,hr,wr=Qt[0]|0,pr=wr&8191,br=wr>>>13,Dr=Qt[1]|0,_r=Dr&8191,Nr=Dr>>>13,kr=Qt[2]|0,Mr=kr&8191,Lr=kr>>>13,Cr=Qt[3]|0,Er=Cr&8191,Ar=Cr>>>13,zr=Qt[4]|0,Vr=zr&8191,Gr=zr>>>13,tn=Qt[5]|0,Yr=tn&8191,Jr=tn>>>13,Kr=Qt[6]|0,Xr=Kr&8191,Qr=Kr>>>13,un=Qt[7]|0,an=un&8191,sn=un>>>13,vn=Qt[8]|0,gn=vn&8191,fn=vn>>>13,wn=Qt[9]|0,dn=wn&8191,Ur=wn>>>13,Ir=ir[0]|0,Pr=Ir&8191,Fr=Ir>>>13,Zr=ir[1]|0,en=Zr&8191,rn=Zr>>>13,En=ir[2]|0,$n=En&8191,mn=En>>>13,Fn=ir[3]|0,_n=Fn&8191,kn=Fn>>>13,Qn=ir[4]|0,Ln=Qn&8191,Cn=Qn>>>13,ro=ir[5]|0,qn=ro&8191,Pn=ro>>>13,ao=ir[6]|0,zn=ao&8191,Mn=ao>>>13,so=ir[7]|0,Or=so&8191,qr=so>>>13,Hr=ir[8]|0,$r=Hr&8191,Wr=Hr>>>13,cn=ir[9]|0,on=cn&8191,ln=cn>>>13;or.negative=yr.negative^sr.negative,or.length=19,dr=Math.imul(pr,Pr),lr=Math.imul(pr,Fr),lr=lr+Math.imul(br,Pr)|0,hr=Math.imul(br,Fr);var Sn=(gr+dr|0)+((lr&8191)<<13)|0;gr=(hr+(lr>>>13)|0)+(Sn>>>26)|0,Sn&=67108863,dr=Math.imul(_r,Pr),lr=Math.imul(_r,Fr),lr=lr+Math.imul(Nr,Pr)|0,hr=Math.imul(Nr,Fr),dr=dr+Math.imul(pr,en)|0,lr=lr+Math.imul(pr,rn)|0,lr=lr+Math.imul(br,en)|0,hr=hr+Math.imul(br,rn)|0;var An=(gr+dr|0)+((lr&8191)<<13)|0;gr=(hr+(lr>>>13)|0)+(An>>>26)|0,An&=67108863,dr=Math.imul(Mr,Pr),lr=Math.imul(Mr,Fr),lr=lr+Math.imul(Lr,Pr)|0,hr=Math.imul(Lr,Fr),dr=dr+Math.imul(_r,en)|0,lr=lr+Math.imul(_r,rn)|0,lr=lr+Math.imul(Nr,en)|0,hr=hr+Math.imul(Nr,rn)|0,dr=dr+Math.imul(pr,$n)|0,lr=lr+Math.imul(pr,mn)|0,lr=lr+Math.imul(br,$n)|0,hr=hr+Math.imul(br,mn)|0;var yn=(gr+dr|0)+((lr&8191)<<13)|0;gr=(hr+(lr>>>13)|0)+(yn>>>26)|0,yn&=67108863,dr=Math.imul(Er,Pr),lr=Math.imul(Er,Fr),lr=lr+Math.imul(Ar,Pr)|0,hr=Math.imul(Ar,Fr),dr=dr+Math.imul(Mr,en)|0,lr=lr+Math.imul(Mr,rn)|0,lr=lr+Math.imul(Lr,en)|0,hr=hr+Math.imul(Lr,rn)|0,dr=dr+Math.imul(_r,$n)|0,lr=lr+Math.imul(_r,mn)|0,lr=lr+Math.imul(Nr,$n)|0,hr=hr+Math.imul(Nr,mn)|0,dr=dr+Math.imul(pr,_n)|0,lr=lr+Math.imul(pr,kn)|0,lr=lr+Math.imul(br,_n)|0,hr=hr+Math.imul(br,kn)|0;var Zn=(gr+dr|0)+((lr&8191)<<13)|0;gr=(hr+(lr>>>13)|0)+(Zn>>>26)|0,Zn&=67108863,dr=Math.imul(Vr,Pr),lr=Math.imul(Vr,Fr),lr=lr+Math.imul(Gr,Pr)|0,hr=Math.imul(Gr,Fr),dr=dr+Math.imul(Er,en)|0,lr=lr+Math.imul(Er,rn)|0,lr=lr+Math.imul(Ar,en)|0,hr=hr+Math.imul(Ar,rn)|0,dr=dr+Math.imul(Mr,$n)|0,lr=lr+Math.imul(Mr,mn)|0,lr=lr+Math.imul(Lr,$n)|0,hr=hr+Math.imul(Lr,mn)|0,dr=dr+Math.imul(_r,_n)|0,lr=lr+Math.imul(_r,kn)|0,lr=lr+Math.imul(Nr,_n)|0,hr=hr+Math.imul(Nr,kn)|0,dr=dr+Math.imul(pr,Ln)|0,lr=lr+Math.imul(pr,Cn)|0,lr=lr+Math.imul(br,Ln)|0,hr=hr+Math.imul(br,Cn)|0;var On=(gr+dr|0)+((lr&8191)<<13)|0;gr=(hr+(lr>>>13)|0)+(On>>>
149126)|0,On&=67108863,dr=Math.imul(Yr,Pr),lr=Math.imul(Yr,Fr),lr=lr+Math.imul(Jr,Pr)|0,hr=Math.imul(Jr,Fr),dr=dr+Math.imul(Vr,en)|0,lr=lr+Math.imul(Vr,rn)|0,lr=lr+Math.imul(Gr,en)|0,hr=hr+Math.imul(Gr,rn)|0,dr=dr+Math.imul(Er,$n)|0,lr=lr+Math.imul(Er,mn)|0,lr=lr+Math.imul(Ar,$n)|0,hr=hr+Math.imul(Ar,mn)|0,dr=dr+Math.imul(Mr,_n)|0,lr=lr+Math.imul(Mr,kn)|0,lr=lr+Math.imul(Lr,_n)|0,hr=hr+Math.imul(Lr,kn)|0,dr=dr+Math.imul(_r,Ln)|0,lr=lr+Math.imul(_r,Cn)|0,lr=lr+Math.imul(Nr,Ln)|0,hr=hr+Math.imul(Nr,Cn)|0,dr=dr+Math.imul(pr,qn)|0,lr=lr+Math.imul(pr,Pn)|0,lr=lr+Math.imul(br,qn)|0,hr=hr+Math.imul(br,Pn)|0;var Wn=(gr+dr|0)+((lr&8191)<<13)|0;gr=(hr+(lr>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,dr=Math.imul(Xr,Pr),lr=Math.imul(Xr,Fr),lr=lr+Math.imul(Qr,Pr)|0,hr=Math.imul(Qr,Fr),dr=dr+Math.imul(Yr,en)|0,lr=lr+Math.imul(Yr,rn)|0,lr=lr+Math.imul(Jr,en)|0,hr=hr+Math.imul(Jr,rn)|0,dr=dr+Math.imul(Vr,$n)|0,lr=lr+Math.imul(Vr,mn)|0,lr=lr+Math.imul(Gr,$n)|0,hr=hr+Math.imul(Gr,mn)|0,dr=dr+Math.imul(Er,_n)|0,lr=lr+Math.imul(Er,kn)|0,lr=lr+Math.imul(Ar,_n)|0,hr=hr+Math.imul(Ar,kn)|0,dr=dr+Math.imul(Mr,Ln)|0,lr=lr+Math.imul(Mr,Cn)|0,lr=lr+Math.imul(Lr,Ln)|0,hr=hr+Math.imul(Lr,Cn)|0,dr=dr+Math.imul(_r,qn)|0,lr=lr+Math.imul(_r,Pn)|0,lr=lr+Math.imul(Nr,qn)|0,hr=hr+Math.imul(Nr,Pn)|0,dr=dr+Math.imul(pr,zn)|0,lr=lr+Math.imul(pr,Mn)|0,lr=lr+Math.imul(br,zn)|0,hr=hr+Math.imul(br,Mn)|0;var Hn=(gr+dr|0)+((lr&8191)<<13)|0;gr=(hr+(lr>>>13)|0)+(Hn>>>26)|0,Hn&=67108863,dr=Math.imul(an,Pr),lr=Math.imul(an,Fr),lr=lr+Math.imul(sn,Pr)|0,hr=Math.imul(sn,Fr),dr=dr+Math.imul(Xr,en)|0,lr=lr+Math.imul(Xr,rn)|0,lr=lr+Math.imul(Qr,en)|0,hr=hr+Math.imul(Qr,rn
1491)|0,dr=dr+Math.imul(Yr,$n)|0,lr=lr+Math.imul(Yr,mn)|0,lr=lr+Math.imul(Jr,$n)|0,hr=hr+Math.imul(Jr,mn)|0,dr=dr+Math.imul(Vr,_n)|0,lr=lr+Math.imul(Vr,kn)|0,lr=lr+Math.imul(Gr,_n)|0,hr=hr+Math.imul(Gr,kn)|0,dr=dr+Math.imul(Er,Ln)|0,lr=lr+Math.imul(Er,Cn)|0,lr=lr+Math.imul(Ar,Ln)|0,hr=hr+Math.imul(Ar,Cn)|0,dr=dr+Math.imul(Mr,qn)|0,lr=lr+Math.imul(Mr,Pn)|0,lr=lr+Math.imul(Lr,qn)|0,hr=hr+Math.imul(Lr,Pn)|0,dr=dr+Math.imul(_r,zn)|0,lr=lr+Math.imul(_r,Mn)|0,lr=lr+Math.imul(Nr,zn)|0,hr=hr+Math.imul(Nr,Mn)|0,dr=dr+Math.imul(pr,Or)|0,lr=lr+Math.imul(pr,qr)|0,lr=lr+Math.imul(br,Or)|0,hr=hr+Math.imul(br,qr)|0;var Gn=(gr+dr|0)+((lr&8191)<<13)|0;gr=(hr+(lr>>>13)|0)+(Gn>>>26)|0,Gn&=67108863,dr=Math.imul(gn,Pr),lr=Math.imul(gn,Fr),lr=lr+Math.imul(fn,Pr)|0,hr=Math.imul(fn,Fr),dr=dr+Math.imul(an,en)|0,lr=lr+Math.imul(an,rn)|0,lr=lr+Math.imul(sn,en)|0,hr=hr+Math.imul(sn,rn)|0,dr=dr+Math.imul(Xr,$n)|0,lr=lr+Math.imul(Xr,mn)|0,lr=lr+Math.imul(Qr,$n)|0,hr=hr+Math.imul(Qr,mn)|0,dr=dr+Math.imul(Yr,_n)|0,lr=lr+Math.imul(Yr,kn)|0,lr=lr+Math.imul(Jr,_n)|0,hr=hr+Math.imul(Jr,kn)|0,dr=dr+Math.imul(Vr,Ln)|0,lr=lr+Math.imul(Vr,Cn)|0,lr=lr+Math.imul(Gr,Ln)|0,hr=hr+Math.imul(Gr,Cn)|0,dr=dr+Math.imul(Er,qn)|0,lr=lr+Math.imul(Er,Pn)|0,lr=lr+Math.imul(Ar,qn)|0,hr=hr+Math.imul(Ar,Pn)|0,dr=dr+Math.imul(Mr,zn)|0,lr=lr+Math.imul(Mr,Mn)|0,lr=lr+Math.imul(Lr,zn)|0,hr=hr+Math.imul(Lr,Mn)|0,dr=dr+Math.imul(_r,Or)|0,lr=lr+Math.imul(_r,qr)|0,lr=lr+Math.imul(Nr,Or)|0,hr=hr+Math.imul(Nr,qr)|0,dr=dr+Math.imul(pr,$r)|0,lr=lr+Math.imul(pr,Wr)|0,lr=lr+Math.imul(br,$r)|0,hr=hr+Math.imul(br,Wr)|0;var Xn=(gr+dr|0)+((lr&8191)<<13)|0;gr=(hr+(lr>>>13)|0)+(Xn>>>
149126)|0,Xn&=67108863,dr=Math.imul(dn,Pr),lr=Math.imul(dn,Fr),lr=lr+Math.imul(Ur,Pr)|0,hr=Math.imul(Ur,Fr),dr=dr+Math.imul(gn,en)|0,lr=lr+Math.imul(gn,rn)|0,lr=lr+Math.imul(fn,en)|0,hr=hr+Math.imul(fn,rn)|0,dr=dr+Math.imul(an,$n)|0,lr=lr+Math.imul(an,mn)|0,lr=lr+Math.imul(sn,$n)|0,hr=hr+Math.imul(sn,mn)|0,dr=dr+Math.imul(Xr,_n)|0,lr=lr+Math.imul(Xr,kn)|0,lr=lr+Math.imul(Qr,_n)|0,hr=hr+Math.imul(Qr,kn)|0,dr=dr+Math.imul(Yr,Ln)|0,lr=lr+Math.imul(Yr,Cn)|0,lr=lr+Math.imul(Jr,Ln)|0,hr=hr+Math.imul(Jr,Cn)|0,dr=dr+Math.imul(Vr,qn)|0,lr=lr+Math.imul(Vr,Pn)|0,lr=lr+Math.imul(Gr,qn)|0,hr=hr+Math.imul(Gr,Pn)|0,dr=dr+Math.imul(Er,zn)|0,lr=lr+Math.imul(Er,Mn)|0,lr=lr+Math.imul(Ar,zn)|0,hr=hr+Math.imul(Ar,Mn)|0,dr=dr+Math.imul(Mr,Or)|0,lr=lr+Math.imul(Mr,qr)|0,lr=lr+Math.imul(Lr,Or)|0,hr=hr+Math.imul(Lr,qr)|0,dr=dr+Math.imul(_r,$r)|0,lr=lr+Math.imul(_r,Wr)|0,lr=lr+Math.imul(Nr,$r)|0,hr=hr+Math.imul(Nr,Wr)|0,dr=dr+Math.imul(pr,on)|0,lr=lr+Math.imul(pr,ln)|0,lr=lr+Math.imul(br,on)|0,hr=hr+Math.imul(br,ln)|0;var Kn=(gr+dr|0)+((lr&8191)<<13)|0;gr=(hr+(lr>>>13)|0)+(Kn>>>26)|0,Kn&=67108863,dr=Math.imul(dn,en),lr=Math.imul(dn,rn),lr=lr+Math.imul(Ur,en)|0,hr=Math.imul(Ur,rn),dr=dr+Math.imul(gn,$n)|0,lr=lr+Math.imul(gn,mn)|0,lr=lr+Math.imul(fn,$n)|0,hr=hr+Math.imul(fn,mn)|0,dr=dr+Math.imul(an,_n)|0,lr=lr+Math.imul(an,kn)|0,lr=lr+Math.imul(sn,_n)|0,hr=hr+Math.imul(sn,kn)|0,dr=dr+Math.imul(Xr,Ln)|0,lr=lr+Math.imul(Xr,Cn)|0,lr=lr+Math.imul(Qr,Ln)|0,hr=hr+Math.imul(Qr,Cn)|0,dr=dr+Math.imul(Yr,qn)|0,lr=lr+Math.imul(Yr,Pn)|0,lr=lr+Math.imul(Jr,qn)|0,hr=hr+Math.imul(Jr,Pn)|0,dr=dr+Math.imul(Vr,zn)|0,lr=lr+Math.imul(Vr,Mn)|0,lr=lr+Math.imul(Gr,zn)|0,hr=hr+Math.imul(Gr,Mn)|0,dr=dr+Math.imul(Er,Or)|0,lr=lr+Math.imul(Er,qr)|0,lr=lr+Math.imul(Ar,Or)|0,hr=hr+Math.imul(Ar,qr)|0,dr=dr+Math.imul(Mr,$r)|0,lr=lr+Math.imul(Mr,Wr)|0,lr=lr+Math.imul(Lr,$r)|0,hr=hr+Math.imul(Lr,Wr)|0,dr=dr+Math.imul(_r,on)|0,lr=lr+Math.imul(_r,ln)|0,lr=lr+Math.imul(Nr,on)|0,hr=hr+Math.imul(Nr,ln)|0;var Jn=(gr+dr|0)+((lr&8191)<<13)|0;gr=(hr+(lr>>>13)|0)+(Jn>>>26)|0,Jn&=67108863,dr=Math.imul(dn,$n),lr=Math.imul(dn,mn),lr=lr+Math.imul(Ur,$n)|0,hr=Math.imul(Ur,mn),dr=dr+Math.imul(gn,_n)|0,lr=lr+Math.imul(gn,kn)|0,lr=lr+Math.imul(fn,_n)|0,hr=hr+Math.imul(fn,kn)|0,dr=dr+Math.imul(an,Ln)|0,lr=lr+Math.imul(an,Cn)|0,lr=lr+Math.imul(sn,Ln)|0,hr=hr+Math.imul(sn,Cn)|0,dr=dr+Math.imul(Xr,qn)|0,lr=lr+Math.imul(Xr,Pn)|0,lr=lr+Math.imul(Qr,qn)|0,hr=hr+Math.imul(Qr,Pn)|0,dr=dr+Math.imul(Yr,zn)|0,lr=lr+Math.imul(Yr,Mn)|0,lr=lr+Math.imul(Jr,zn)|0,hr=hr+Math.imul(Jr,Mn)|0,dr=dr+Math.imul(Vr,Or)|0,lr=lr+Math.imul(Vr,qr)|0,lr=lr+Math.imul(Gr,Or)|0,hr=hr+Math.imul(Gr,qr)|0,dr=dr+Math.imul(Er,$r)|0,lr=lr+Math.imul(Er,Wr)|0,lr=lr+Math.imul(Ar,$r)|0,hr=hr+Math.imul(Ar,Wr)|0,dr=dr+Math.imul(Mr,on)|0,lr=lr+Math.imul(Mr,ln)|0,lr=lr+Math.imul(Lr,on)|0,hr=hr+Math.imul(Lr,ln)|0;var Yn=(gr+dr|0)+((lr&8191)<<13)|0;gr=(hr+(lr>>>13)|0)+(Yn>>>26)|0,Yn&=67108863,dr=Math.imul(dn,_n),lr=Math.imul(dn,kn),lr=lr+Math.imul(Ur,_n)|0,hr=Math.imul(Ur,kn),dr=dr+Math.imul(gn,Ln)|0,lr=lr+Math.imul(gn,Cn)|0,lr=lr+Math.imul(fn,Ln)|0,hr=hr+Math.imul(fn,Cn)|0,dr=dr+Math.imul(an,qn)|0,lr=lr+Math.imul(an,Pn)|0,lr=lr+Math.imul(sn,qn)|0,hr=hr+Math.imul(sn,Pn)|0,dr=dr+Math.imul(Xr,zn)|0,lr=lr+Math.imul(Xr,Mn)|0,lr=lr+Math.imul(Qr,zn)|0,hr=hr+Math.imul(Qr,Mn)|0,dr=dr+Math.imul(Yr,Or)|0,lr=lr+Math.imul(Yr,qr)|0,lr=lr+Math.imul(Jr,Or)|0,hr=hr+Math.imul(Jr,qr)|0,dr=dr+Math.imul(Vr,$r)|0,lr=lr+Math.imul(Vr,Wr)|0,lr=lr+Math.imul(Gr,$r)|0,hr=hr+Math.imul(Gr,Wr)|0,dr=dr+Math.imul(Er,on)|0,lr=lr+Math.imul(Er,ln)|0,lr=lr+Math.imul(Ar,on)|0,hr=hr+Math.imul(Ar,ln)|0;var Nn=(gr+dr|0)+((lr&8191)<<13)|0;gr=(hr+(lr>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,dr=Math.imul(dn,Ln),lr=Math.imul(dn,Cn),lr=lr+Math.imul(Ur,Ln)|0,hr=Math.imul(Ur,Cn),dr=dr+Math.imul(gn,qn)|0,lr=lr+Math.imul(gn,Pn)|0,lr=lr+Math.imul(fn,qn)|0,hr=hr+Math.imul(fn,Pn)|0,dr=dr+Math.imul(an,zn
vendor: 6,578 bytes, line 1491
1491)|0,lr=lr+Math.imul(an,Mn)|0,lr=lr+Math.imul(sn,zn)|0,hr=hr+Math.imul(sn,Mn)|0,dr=dr+Math.imul(Xr,Or)|0,lr=lr+Math.imul(Xr,qr)|0,lr=lr+Math.imul(Qr,Or)|0,hr=hr+Math.imul(Qr,qr)|0,dr=dr+Math.imul(Yr,$r)|0,lr=lr+Math.imul(Yr,Wr)|0,lr=lr+Math.imul(Jr,$r)|0,hr=hr+Math.imul(Jr,Wr)|0,dr=dr+Math.imul(Vr,on)|0,lr=lr+Math.imul(Vr,ln)|0,lr=lr+Math.imul(Gr,on)|0,hr=hr+Math.imul(Gr,ln)|0;var Vn=(gr+dr|0)+((lr&8191)<<13)|0;gr=(hr+(lr>>>13)|0)+(Vn>>>26)|0,Vn&=67108863,dr=Math.imul(dn,qn),lr=Math.imul(dn,Pn),lr=lr+Math.imul(Ur,qn)|0,hr=Math.imul(Ur,Pn),dr=dr+Math.imul(gn,zn)|0,lr=lr+Math.imul(gn,Mn)|0,lr=lr+Math.imul(fn,zn)|0,hr=hr+Math.imul(fn,Mn)|0,dr=dr+Math.imul(an,Or)|0,lr=lr+Math.imul(an,qr)|0,lr=lr+Math.imul(sn,Or)|0,hr=hr+Math.imul(sn,qr)|0,dr=dr+Math.imul(Xr,$r)|0,lr=lr+Math.imul(Xr,Wr)|0,lr=lr+Math.imul(Qr,$r)|0,hr=hr+Math.imul(Qr,Wr)|0,dr=dr+Math.imul(Yr,on)|0,lr=lr+Math.imul(Yr,ln)|0,lr=lr+Math.imul(Jr,on)|0,hr=hr+Math.imul(Jr,ln)|0;var Dn=(gr+dr|0)+((lr&8191)<<13)|0;gr=(hr+(lr>>>13)|0)+(Dn>>>26)|0,Dn&=67108863,dr=Math.imul(dn,zn),lr=Math.imul(dn,Mn),lr=lr+Math.imul(Ur,zn)|0,hr=Math.imul(Ur,Mn),dr=dr+Math.imul(gn,Or)|0,lr=lr+Math.imul(gn,qr)|0,lr=lr+Math.imul(fn,Or)|0,hr=hr+Math.imul(fn,qr)|0,dr=dr+Math.imul(an,$r)|0,lr=lr+Math.imul(an,Wr)|0,lr=lr+Math.imul(sn,$r)|0,hr=hr+Math.imul(sn,Wr)|0,dr=dr+Math.imul(Xr,on)|0,lr=lr+Math.imul(Xr,ln)|0,lr=lr+Math.imul(Qr,on)|0,hr=hr+Math.imul(Qr,ln)|0;var jn=(gr+dr|0)+((lr&8191)<<13)|0;gr=(hr+(lr>>>13)|0)+(jn>>>26)|0,jn&=67108863,dr=Math.imul(dn,Or),lr=Math.imul(dn,qr),lr=lr+Math.imul(Ur,Or)|0,hr=Math.imul(Ur,qr),dr=dr+Math.imul(gn,$r)|0,lr=lr+Math.imul(gn,Wr)|0,lr=lr+Math.imul(fn,$r)|0,hr=hr+Math.imul(fn,Wr)|0,dr=dr+Math.imul(an,on)|0,lr=lr+Math.imul(an,ln)|0,lr=lr+Math.imul(sn,on)|0,hr=hr+Math.imul(sn,ln)|0;var Un=(gr+dr|0)+((lr&8191)<<13)|0;gr=(hr+(lr>>>13)|0)+(Un>>>26)|0,Un&=67108863,dr=Math.imul(dn,$r),lr=Math.imul(dn,Wr),lr=lr+Math.imul(Ur,$r)|0,hr=Math.imul(Ur,Wr),dr=dr+Math.imul(gn,on)|0,lr=lr+Math.imul(gn,ln)|0,lr=lr+Math.imul(fn,on)|0,hr=hr+Math.imul(fn,ln)|0;var Bn=(gr+dr|0)+((lr&8191)<<13)|0;gr=(hr+(lr>>>13)|0)+(Bn>>>26)|0,Bn&=67108863,dr=Math.imul(dn,on),lr=Math.imul(dn,ln),lr=lr+Math.imul(Ur,on)|0,hr=Math.imul(Ur,ln);var hn=(gr+dr|0)+((lr&8191)<<13)|0;return gr=(hr+(lr>>>13)|0)+(hn>>>26)|0,hn&=67108863,ur[0]=Sn,ur[1]=An,ur[2]=yn,ur[3]=Zn,ur[4]=On,ur[5]=Wn,ur[6]=Hn,ur[7]=Gn,ur[8]=Xn,ur[9]=Kn,ur[10]=Jn,ur[11]=Yn,ur[12]=Nn,ur[13]=Vn,ur[14]=Dn,ur[15]=jn,ur[16]=Un,ur[17]=Bn,ur[18]=hn,gr!==0&&(ur[19]=gr,or.length++),or};Math.imul||(tr=er);function rr(Rr,yr,sr){sr.negative=yr.negative^Rr.negative,sr.length=Rr.length+yr.length;for(var or=0,Qt=0,ir=0;ir<sr.length-1;ir++){var ur=Qt;Qt=0;for(var gr=or&67108863,dr=Math.min(ir,yr.length-1),lr=Math.max(0,ir-Rr.length+1);lr<=dr;lr++){var hr=ir-lr,wr=Rr.words[hr]|0,pr=yr.words[lr]|0,br=wr*pr,Dr=br&67108863;ur=ur+(br/67108864|0)|0,Dr=Dr+gr|0,gr=Dr&67108863,ur=ur+(Dr>>>26)|0,Qt+=ur>>>26,ur&=67108863}sr.words[ir]=gr,or=ur,ur=Qt}return or!==0?sr.words[ir]=or:sr.length--,sr.strip()}function ar(Rr,yr,sr){var or=new nr;return or.mulp(Rr,yr,sr)}qt.prototype.mulTo=function(yr,sr){var or,Qt=this.length+yr.length;return this.length===10&&yr.length===10?or=tr(this,yr,sr):Qt<63?or=er(this,yr,sr):Qt<1024?or=rr(this,yr,sr):or=ar(this,yr,sr),or};function nr(Rr,yr){this.x=Rr,this.y=yr}nr.prototype.makeRBT=function(yr){for(var sr=new Array(yr),or=qt.prototype._countBits(yr)-1,Qt=0;Qt<yr;Qt++)sr[Qt]=this.revBin(Qt,or,yr);return sr},nr.prototype.revBin=function(yr,sr,or){if(yr===0||yr===or-1)return yr;for(var Qt=0,ir=0;ir<sr;ir++)Qt|=(yr&1)<<sr-ir-1,yr>>=1;return Qt},nr.prototype.permute=function(yr,sr,or,Qt,ir,ur){for(var gr=0;gr<ur;gr++)Qt[gr]=sr[yr[gr]],ir[gr]=or[yr[gr]]},nr.prototype.transform=function(yr,sr,or,Qt,ir,ur){this.permute(ur,yr,sr,or,Qt,ir);for(var gr=1;gr<ir;gr<<=1)for(var dr=gr<<1,lr=Math.cos(2*Math.PI/dr),hr=Math.sin(2*Math.PI/dr),wr=0;wr<ir;wr+=dr)for(var pr=lr,br=hr,Dr=0;Dr<gr;Dr++){var _r=or[wr+Dr],Nr=Qt[wr+Dr],kr=or[wr+Dr+gr],Mr=Qt[wr+Dr+gr],Lr=pr*kr-br*Mr;Mr=pr*Mr+br*kr,kr=Lr,or[wr+Dr]=_r+kr,Qt[wr+Dr]=Nr+Mr,or[wr+Dr+gr]=_r-kr,Qt[wr+Dr+gr]=Nr-Mr,Dr!==dr&&(Lr=lr*pr-hr*br,br=lr*br+hr*pr,pr=Lr)}},nr.prototype.guessLen13b=function(yr,sr){var or=Math.max(sr,yr)|1,Qt=or&1,ir=0;for(or=or/2|0;or;or=or>>>1)ir++;return 1<<ir+1+Qt},nr.prototype.conjugate=function(yr,sr,or){if(!(or<=1))for(var Qt=0;Qt<or/2;Qt++){var ir=yr[Qt];yr[Qt]=yr[or-Qt-1],yr[or-Qt-1]=ir,ir=sr[Qt],sr[Qt]=-sr[or-Qt-1],sr[or-Qt-1]=-ir}},nr.prototype.normalize13b=function(yr,sr){for(var or=0,Qt=0;Qt<sr/2;Qt++){var ir=Math.round(yr[2*Qt+1]/sr)*8192+Math.round(yr[2*Qt]/sr)+or;yr[Qt]=ir&67108863,ir<67108864?or=0:or=ir/67108864|0}return yr},nr.prototype.convert13b=function(yr,sr,or,Qt){for(var ir=0,ur=0;ur<sr;ur++)ir=ir+(yr[ur]|0),or[2*ur]=ir&8191,ir=ir>>>13,or[2*ur+1]=ir&8191,ir=ir>>>13;for(ur=2*sr;ur<Qt;++ur)or[ur]=0;Ft(ir===0),Ft((ir&-8192)===0)},nr.prototype.stub=function(yr){for(var sr=new Array(yr),or=0;or<yr;or++)sr[or]=0;return sr},nr.prototype.mulp=function(yr,sr,or){var Qt=2*this.guessLen13b(yr.length,sr.length),ir=this.makeRBT(Qt),ur=this.stub(Qt),gr=new Array(Qt),dr=new Array(Qt),lr=new Array(Qt),hr=new Array(Qt),wr=new Array(Qt),pr=new Array(Qt),br=or.words;br.length=Qt,this.convert13b(yr.words,yr.length,gr,Qt),this.convert13b(sr.words,sr.length,hr,Qt),this.transform(gr,ur,dr,lr,Qt,ir),this.transform(hr,ur,wr,pr,Qt,ir);for(var Dr=0;Dr<Qt;Dr++){var _r=dr[Dr]*wr[Dr]-lr[Dr]*pr[Dr];lr[Dr]=dr[Dr]*pr[Dr]+lr[Dr]*wr[Dr],dr[Dr]=_r}return this.conjugate(dr,lr,Qt),this.transform(dr,lr,br,ur,Qt,ir),this.conjugate(br,ur,Qt),this.normalize13b(br,Qt),or.negative=yr.negative^sr.negative,or.length=yr.length+sr.length,or.strip()},qt.prototype.mul=function(yr){var sr=new qt(null);return sr.words=new Array(this.length+yr.length),this.mulTo(yr,sr)},qt.prototype.mulf=function(yr){var sr=new qt(null);return sr.words=new Array(this.length+yr.length),ar(this,yr,sr)},qt.prototype.imul=function(yr){return this.clone().mulTo(yr,this)},qt.prototype.imuln=function(yr){Ft(typeof yr=="number"),Ft(yr<67108864);for(var sr=0,or=0;or<this.length;or++){var Qt=(this.words[or]|0)*yr,ir=(Qt&67108863)+(sr&67108863);sr>>=26,sr+=Qt/67108864|0,sr+=ir>>>26,this.words[or]=ir&67108863}return sr!==0&&(this.words[or]=sr,this.length++),this},qt.prototype.muln=function(yr){return this.clone().imuln(yr)},qt.prototype.sqr=function(){return this.mul(this)},qt.prototype.isqr=function(){return this.imul(this.clone())},qt.prototype.pow=function(yr){var sr=Zt(yr);if(sr.length===0)return new qt(1);for(var or=this,Qt=0;Qt<sr.length&&sr[Qt]===0;Qt++,or=or.sqr());
vendor: 14,407 bytes, line 1491
1491if(++Qt<sr.length)for(var ir=or.sqr();Qt<sr.length;Qt++,ir=ir.sqr())sr[Qt]!==0&&(or=or.mul(ir));return or},qt.prototype.iushln=function(yr){Ft(typeof yr=="number"&&yr>=0);var sr=yr%26,or=(yr-sr)/26,Qt=67108863>>>26-sr<<26-sr,ir;if(sr!==0){var ur=0;for(ir=0;ir<this.length;ir++){var gr=this.words[ir]&Qt,dr=(this.words[ir]|0)-gr<<sr;this.words[ir]=dr|ur,ur=gr>>>26-sr}ur&&(this.words[ir]=ur,this.length++)}if(or!==0){for(ir=this.length-1;ir>=0;ir--)this.words[ir+or]=this.words[ir];for(ir=0;ir<or;ir++)this.words[ir]=0;this.length+=or}return this.strip()},qt.prototype.ishln=function(yr){return Ft(this.negative===0),this.iushln(yr)},qt.prototype.iushrn=function(yr,sr,or){Ft(typeof yr=="number"&&yr>=0);var Qt;sr?Qt=(sr-sr%26)/26:Qt=0;var ir=yr%26,ur=Math.min((yr-ir)/26,this.length),gr=67108863^67108863>>>ir<<ir,dr=or;if(Qt-=ur,Qt=Math.max(0,Qt),dr){for(var lr=0;lr<ur;lr++)dr.words[lr]=this.words[lr];dr.length=ur}if(ur!==0)if(this.length>ur)for(this.length-=ur,lr=0;lr<this.length;lr++)this.words[lr]=this.words[lr+ur];else this.words[0]=0,this.length=1;var hr=0;for(lr=this.length-1;lr>=0&&(hr!==0||lr>=Qt);lr--){var wr=this.words[lr]|0;this.words[lr]=hr<<26-ir|wr>>>ir,hr=wr&gr}return dr&&hr!==0&&(dr.words[dr.length++]=hr),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},qt.prototype.ishrn=function(yr,sr,or){return Ft(this.negative===0),this.iushrn(yr,sr,or)},qt.prototype.shln=function(yr){return this.clone().ishln(yr)},qt.prototype.ushln=function(yr){return this.clone().iushln(yr)},qt.prototype.shrn=function(yr){return this.clone().ishrn(yr)},qt.prototype.ushrn=function(yr){return this.clone().iushrn(yr)},qt.prototype.testn=function(yr){Ft(typeof yr=="number"&&yr>=0);var sr=yr%26,or=(yr-sr)/26,Qt=1<<sr;if(this.length<=or)return!1;var ir=this.words[or];return!!(ir&Qt)},qt.prototype.imaskn=function(yr){Ft(typeof yr=="number"&&yr>=0);var sr=yr%26,or=(yr-sr)/26;if(Ft(this.negative===0,"imaskn works only with positive numbers"),this.length<=or)return this;if(sr!==0&&or++,this.length=Math.min(or,this.length),sr!==0){var Qt=67108863^67108863>>>sr<<sr;this.words[this.length-1]&=Qt}return this.strip()},qt.prototype.maskn=function(yr){return this.clone().imaskn(yr)},qt.prototype.iaddn=function(yr){return Ft(typeof yr=="number"),Ft(yr<67108864),yr<0?this.isubn(-yr):this.negative!==0?this.length===1&&(this.words[0]|0)<yr?(this.words[0]=yr-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(yr),this.negative=1,this):this._iaddn(yr)},qt.prototype._iaddn=function(yr){this.words[0]+=yr;for(var sr=0;sr<this.length&&this.words[sr]>=67108864;sr++)this.words[sr]-=67108864,sr===this.length-1?this.words[sr+1]=1:this.words[sr+1]++;return this.length=Math.max(this.length,sr+1),this},qt.prototype.isubn=function(yr){if(Ft(typeof yr=="number"),Ft(yr<67108864),yr<0)return this.iaddn(-yr);if(this.negative!==0)return this.negative=0,this.iaddn(yr),this.negative=1,this;if(this.words[0]-=yr,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var sr=0;sr<this.length&&this.words[sr]<0;sr++)this.words[sr]+=67108864,this.words[sr+1]-=1;return this.strip()},qt.prototype.addn=function(yr){return this.clone().iaddn(yr)},qt.prototype.subn=function(yr){return this.clone().isubn(yr)},qt.prototype.iabs=function(){return this.negative=0,this},qt.prototype.abs=function(){return this.clone().iabs()},qt.prototype._ishlnsubmul=function(yr,sr,or){var Qt=yr.length+or,ir;this._expand(Qt);var ur,gr=0;for(ir=0;ir<yr.length;ir++){ur=(this.words[ir+or]|0)+gr;var dr=(yr.words[ir]|0)*sr;ur-=dr&67108863,gr=(ur>>26)-(dr/67108864|0),this.words[ir+or]=ur&67108863}for(;ir<this.length-or;ir++)ur=(this.words[ir+or]|0)+gr,gr=ur>>26,this.words[ir+or]=ur&67108863;if(gr===0)return this.strip();for(Ft(gr===-1),gr=0,ir=0;ir<this.length;ir++)ur=-(this.words[ir]|0)+gr,gr=ur>>26,this.words[ir]=ur&67108863;return this.negative=1,this.strip()},qt.prototype._wordDiv=function(yr,sr){var or=this.length-yr.length,Qt=this.clone(),ir=yr,ur=ir.words[ir.length-1]|0,gr=this._countBits(ur);or=26-gr,or!==0&&(ir=ir.ushln(or),Qt.iushln(or),ur=ir.words[ir.length-1]|0);var dr=Qt.length-ir.length,lr;if(sr!=="mod"){lr=new qt(null),lr.length=dr+1,lr.words=new Array(lr.length);for(var hr=0;hr<lr.length;hr++)lr.words[hr]=0}var wr=Qt.clone()._ishlnsubmul(ir,1,dr);wr.negative===0&&(Qt=wr,lr&&(lr.words[dr]=1));for(var pr=dr-1;pr>=0;pr--){var br=(Qt.words[ir.length+pr]|0)*67108864+(Qt.words[ir.length+pr-1]|0);for(br=Math.min(br/ur|0,67108863),Qt._ishlnsubmul(ir,br,pr);Qt.negative!==0;)br--,Qt.negative=0,Qt._ishlnsubmul(ir,1,pr),Qt.isZero()||(Qt.negative^=1);lr&&(lr.words[pr]=br)}return lr&&lr.strip(),Qt.strip(),sr!=="div"&&or!==0&&Qt.iushrn(or),{div:lr||null,mod:Qt}},qt.prototype.divmod=function(yr,sr,or){if(Ft(!yr.isZero()),this.isZero())return{div:new qt(0),mod:new qt(0)};var Qt,ir,ur;return this.negative!==0&&yr.negative===0?(ur=this.neg().divmod(yr,sr),sr!=="mod"&&(Qt=ur.div.neg()),sr!=="div"&&(ir=ur.mod.neg(),or&&ir.negative!==0&&ir.iadd(yr)),{div:Qt,mod:ir}):this.negative===0&&yr.negative!==0?(ur=this.divmod(yr.neg(),sr),sr!=="mod"&&(Qt=ur.div.neg()),{div:Qt,mod:ur.mod}):this.negative&yr.negative?(ur=this.neg().divmod(yr.neg(),sr),sr!=="div"&&(ir=ur.mod.neg(),or&&ir.negative!==0&&ir.isub(yr)),{div:ur.div,mod:ir}):yr.length>this.length||this.cmp(yr)<0?{div:new qt(0),mod:this}:yr.length===1?sr==="div"?{div:this.divn(yr.words[0]),mod:null}:sr==="mod"?{div:null,mod:new qt(this.modn(yr.words[0]))}:{div:this.divn(yr.words[0]),mod:new qt(this.modn(yr.words[0]))}:this._wordDiv(yr,sr)},qt.prototype.div=function(yr){return this.divmod(yr,"div",!1).div},qt.prototype.mod=function(yr){return this.divmod(yr,"mod",!1).mod},qt.prototype.umod=function(yr){return this.divmod(yr,"mod",!0).mod},qt.prototype.divRound=function(yr){var sr=this.divmod(yr);if(sr.mod.isZero())return sr.div;var or=sr.div.negative!==0?sr.mod.isub(yr):sr.mod,Qt=yr.ushrn(1),ir=yr.andln(1),ur=or.cmp(Qt);return ur<0||ir===1&&ur===0?sr.div:sr.div.negative!==0?sr.div.isubn(1):sr.div.iaddn(1)},qt.prototype.modn=function(yr){Ft(yr<=67108863);for(var sr=(1<<26)%yr,or=0,Qt=this.length-1;Qt>=0;Qt--)or=(sr*or+(this.words[Qt]|0))%yr;return or},qt.prototype.idivn=function(yr){Ft(yr<=67108863);for(var sr=0,or=this.length-1;or>=0;or--){var Qt=(this.words[or]|0)+sr*67108864;this.words[or]=Qt/yr|0,sr=Qt%yr}return this.strip()},qt.prototype.divn=function(yr){return this.clone().idivn(yr)},qt.prototype.egcd=function(yr){Ft(yr.negative===0),Ft(!yr.isZero());var sr=this,or=yr.clone();sr.negative!==0?sr=sr.umod(yr):sr=sr.clone();for(var Qt=new qt(1),ir=new qt(0),ur=new qt(0),gr=new qt(1),dr=0;sr.isEven()&&or.isEven();)sr.iushrn(1),or.iushrn(1),++dr;for(var lr=or.clone(),hr=sr.clone();!sr.isZero();){for(var wr=0,pr=1;!(sr.words[0]&pr)&&wr<26;++wr,pr<<=1);if(wr>0)for(sr.iushrn(wr);wr-- >0;)(Qt.isOdd()||ir.isOdd())&&(Qt.iadd(lr),ir.isub(hr)),Qt.iushrn(1),ir.iushrn(1);for(var br=0,Dr=1;!(or.words[0]&Dr)&&br<26;++br,Dr<<=1);if(br>0)for(or.iushrn(br);br-- >0;)(ur.isOdd()||gr.isOdd())&&(ur.iadd(lr),gr.isub(hr)),ur.iushrn(1),gr.iushrn(1);sr.cmp(or)>=0?(sr.isub(or),Qt.isub(ur),ir.isub(gr)):(or.isub(sr),ur.isub(Qt),gr.isub(ir))}return{a:ur,b:gr,gcd:or.iushln(dr)}},qt.prototype._invmp=function(yr){Ft(yr.negative===0),Ft(!yr.isZero());var sr=this,or=yr.clone();sr.negative!==0?sr=sr.umod(yr):sr=sr.clone();for(var Qt=new qt(1),ir=new qt(0),ur=or.clone();sr.cmpn(1)>0&&or.cmpn(1)>0;){for(var gr=0,dr=1;!(sr.words[0]&dr)&&gr<26;++gr,dr<<=1);if(gr>0)for(sr.iushrn(gr);gr-- >0;)Qt.isOdd()&&Qt.iadd(ur),Qt.iushrn(1);for(var lr=0,hr=1;!(or.words[0]&hr)&&lr<26;++lr,hr<<=1);if(lr>0)for(or.iushrn(lr);lr-- >0;)ir.isOdd()&&ir.iadd(ur),ir.iushrn(1);sr.cmp(or)>=0?(sr.isub(or),Qt.isub(ir)):(or.isub(sr),ir.isub(Qt))}var wr;return sr.cmpn(1)===0?wr=Qt:wr=ir,wr.cmpn(0)<0&&wr.iadd(yr),wr},qt.prototype.gcd=function(yr){if(this.isZero())return yr.abs();if(yr.isZero())return this.abs();var sr=this.clone(),or=yr.clone();sr.negative=0,or.negative=0;for(var Qt=0;sr.isEven()&&or.isEven();Qt++)sr.iushrn(1),or.iushrn(1);do{for(;sr.isEven();)sr.iushrn(1);for(;or.isEven();)or.iushrn(1);var ir=sr.cmp(or);if(ir<0){var ur=sr;sr=or,or=ur}else if(ir===0||or.cmpn(1)===0)break;sr.isub(or)}while(!0);return or.iushln(Qt)},qt.prototype.invm=function(yr){return this.egcd(yr).a.umod(yr)},qt.prototype.isEven=function(){return(this.words[0]&1)===0},qt.prototype.isOdd=function(){return(this.words[0]&1)===1},qt.prototype.andln=function(yr){return this.words[0]&yr},qt.prototype.bincn=function(yr){Ft(typeof yr=="number");var sr=yr%26,or=(yr-sr)/26,Qt=1<<sr;if(this.length<=or)return this._expand(or+1),this.words[or]|=Qt,this;for(var ir=Qt,ur=or;ir!==0&&ur<this.length;ur++){var gr=this.words[ur]|0;gr+=ir,ir=gr>>>26,gr&=67108863,this.words[ur]=gr}return ir!==0&&(this.words[ur]=ir,this.length++),this},qt.prototype.isZero=function(){return this.length===1&&this.words[0]===0},qt.prototype.cmpn=function(yr){var sr=yr<0;if(this.negative!==0&&!sr)return-1;if(this.negative===0&&sr)return 1;this.strip();var or;if(this.length>1)or=1;else{sr&&(yr=-yr),Ft(yr<=67108863,"Number is too big");var Qt=this.words[0]|0;or=Qt===yr?0:Qt<yr?-1:1}return this.negative!==0?-or|0:or},qt.prototype.cmp=function(yr){if(this.negative!==0&&yr.negative===0)return-1;if(this.negative===0&&yr.negative!==0)return 1;var sr=this.ucmp(yr);return this.negative!==0?-sr|0:sr},qt.prototype.ucmp=function(yr){if(this.length>yr.length)return 1;if(this.length<yr.length)return-1;for(var sr=0,or=this.length-1;or>=0;or--){var Qt=this.words[or]|0,ir=yr.words[or]|0;if(Qt!==ir){Qt<ir?sr=-1:Qt>ir&&(sr=1);break}}return sr},qt.prototype.gtn=function(yr){return this.cmpn(yr)===1},qt.prototype.gt=function(yr){return this.cmp(yr)===1},qt.prototype.gten=function(yr){return this.cmpn(yr)>=0},qt.prototype.gte=function(yr){return this.cmp(yr)>=0},qt.prototype.ltn=function(yr){return this.cmpn(yr)===-1},qt.prototype.lt=function(yr){return this.cmp(yr)===-1},qt.prototype.lten=function(yr){return this.cmpn(yr)<=0},qt.prototype.lte=function(yr){return this.cmp(yr)<=0},qt.prototype.eqn=function(yr){return this.cmpn(yr)===0},qt.prototype.eq=function(yr){return this.cmp(yr)===0},qt.red=function(yr){return new Br(yr)},qt.prototype.toRed=function(yr){return Ft(!this.red,"Already a number in reduction context"),Ft(this.negative===0,"red works only with positives"),yr.convertTo(this)._forceRed(yr)},qt.prototype.fromRed=function(){return Ft(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},qt.prototype._forceRed=function(yr){return this.red=yr,this},qt.prototype.forceRed=function(yr){return Ft(!this.red,"Already a number in reduction context"),this._forceRed(yr)},qt.prototype.redAdd=function(yr){return Ft(this.red,"redAdd works only with red numbers"),this.red.add(this,yr)},qt.prototype.redIAdd=function(yr){return Ft(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,yr)},qt.prototype.redSub=function(yr){return Ft(this.red,"redSub works only with red numbers"),this.red.sub(this,yr)},qt.prototype.redISub=function(yr){return Ft(this.red,"redISub works only with red numbers"),this.red.isub(this,yr)},qt.prototype.redShl=function(yr){return Ft(this.red,"redShl works only with red numbers"),this.red.shl(this,yr)},qt.prototype.redMul=function(yr){return Ft(this.red,"redMul works only with red numbers"),this.red._verify2(this,yr),this.red.mul(this,yr)},qt.prototype.redIMul=function(yr){return Ft(this.red,"redMul works only with red numbers"),this.red._verify2(this,yr),this.red.imul(this,yr)},qt.prototype.redSqr=function(){return Ft(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},qt.prototype.redISqr=function(){return Ft(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},qt.prototype.redSqrt=function(){return Ft(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},qt.prototype.redInvm=function(){return Ft(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},qt.prototype.redNeg=function(){return Ft(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},qt.prototype.redPow=function(yr){return Ft(this.red&&!yr.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,yr)};var cr={k256:null,p224:null,p192:null,p25519:null};function fr(Rr,yr){this.name=Rr,this.p=new qt(yr,16),this.n=this.p.bitLength(),this.k=new qt(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}fr.prototype._tmp=function(){var yr=new qt(null);return yr.words=new Array(Math.ceil(this.n/13)),yr},fr.prototype.ireduce=function(yr){var sr=yr,or;do this.split(sr,this.tmp),sr=this.imulK(sr),sr=sr.iadd(this.tmp),or=sr.bitLength();while(or>this.n);var Qt=or<this.n?-1:sr.ucmp(this.p);return Qt===0?(sr.words[0]=0,sr.length=1):Qt>0?sr.isub(this.p):sr.strip(),sr},fr.prototype.split=function(yr,sr){yr.iushrn(this.n,0,sr)},fr.prototype.imulK=function(yr){return yr.imul(this.k)};function vr(){fr.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}Vt(vr,fr),vr.prototype.split=function(yr,sr){for(var or=4194303,Qt=Math.min(yr.length,9),ir=0;ir<Qt;ir++)sr.words[ir]=yr.words[ir];if(sr.length=Qt,yr.length<=9){yr.words[0]=0,yr.length=1;return}var ur=yr.words[9];for(sr.words[sr.length++]=ur&or,ir=10;ir<yr.length;ir++){var gr=yr.words[ir]|0;yr.words[ir-10]=(gr&or)<<4|ur>>>22,ur=gr}ur>>>=22,yr.words[ir-10]=ur,ur===0&&yr.length>10?yr.length-=10:yr.length-=9},vr.prototype.imulK=function(yr){yr.words[yr.length]=0,yr.words[yr.length+1]=0,yr.length+=2;for(var sr=0,or=0;or<yr.length;or++){var Qt=yr.words[or]|0;sr+=Qt*977,yr.words[or]=sr&67108863,sr=Qt*64+(sr/67108864|0)}return yr.words[yr.length-1]===0&&(yr.length--,yr.words[yr.length-1]===0&&yr.length--),yr};function xr(){fr.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}Vt(xr,fr);function Sr(){fr.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}Vt(Sr,fr);function Tr(){fr.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}Vt(Tr,fr),Tr.prototype.imulK=function(yr){for(var sr=0,or=0;or<yr.length;or++){var Qt=(yr.words[or]|0)*19+sr,ir=Qt&67108863;Qt>>>=26,yr.words[or]=ir,sr=Qt}return sr!==0&&(yr.words[yr.length++]=sr),yr},qt._prime=function(yr){if(cr[yr])return cr[yr];var sr;if(yr==="k256")sr=new vr;
vendor: 4,692 bytes, line 1491
1491else if(yr==="p224")sr=new xr;else if(yr==="p192")sr=new Sr;else if(yr==="p25519")sr=new Tr;else throw new Error("Unknown prime "+yr);return cr[yr]=sr,sr};function Br(Rr){if(typeof Rr=="string"){var yr=qt._prime(Rr);this.m=yr.p,this.prime=yr}else Ft(Rr.gtn(1),"modulus must be greater than 1"),this.m=Rr,this.prime=null}Br.prototype._verify1=function(yr){Ft(yr.negative===0,"red works only with positives"),Ft(yr.red,"red works only with red numbers")},Br.prototype._verify2=function(yr,sr){Ft((yr.negative|sr.negative)===0,"red works only with positives"),Ft(yr.red&&yr.red===sr.red,"red works only with red numbers")},Br.prototype.imod=function(yr){return this.prime?this.prime.ireduce(yr)._forceRed(this):yr.umod(this.m)._forceRed(this)},Br.prototype.neg=function(yr){return yr.isZero()?yr.clone():this.m.sub(yr)._forceRed(this)},Br.prototype.add=function(yr,sr){this._verify2(yr,sr);var or=yr.add(sr);return or.cmp(this.m)>=0&&or.isub(this.m),or._forceRed(this)},Br.prototype.iadd=function(yr,sr){this._verify2(yr,sr);var or=yr.iadd(sr);return or.cmp(this.m)>=0&&or.isub(this.m),or},Br.prototype.sub=function(yr,sr){this._verify2(yr,sr);var or=yr.sub(sr);return or.cmpn(0)<0&&or.iadd(this.m),or._forceRed(this)},Br.prototype.isub=function(yr,sr){this._verify2(yr,sr);var or=yr.isub(sr);return or.cmpn(0)<0&&or.iadd(this.m),or},Br.prototype.shl=function(yr,sr){return this._verify1(yr),this.imod(yr.ushln(sr))},Br.prototype.imul=function(yr,sr){return this._verify2(yr,sr),this.imod(yr.imul(sr))},Br.prototype.mul=function(yr,sr){return this._verify2(yr,sr),this.imod(yr.mul(sr))},Br.prototype.isqr=function(yr){return this.imul(yr,yr.clone())},Br.prototype.sqr=function(yr){return this.mul(yr,yr)},Br.prototype.sqrt=function(yr){if(yr.isZero())return yr.clone();var sr=this.m.andln(3);if(Ft(sr%2===1),sr===3){var or=this.m.add(new qt(1)).iushrn(2);return this.pow(yr,or)}for(var Qt=this.m.subn(1),ir=0;!Qt.isZero()&&Qt.andln(1)===0;)ir++,Qt.iushrn(1);Ft(!Qt.isZero());var ur=new qt(1).toRed(this),gr=ur.redNeg(),dr=this.m.subn(1).iushrn(1),lr=this.m.bitLength();for(lr=new qt(2*lr*lr).toRed(this);this.pow(lr,dr).cmp(gr)!==0;)lr.redIAdd(gr);for(var hr=this.pow(lr,Qt),wr=this.pow(yr,Qt.addn(1).iushrn(1)),pr=this.pow(yr,Qt),br=ir;pr.cmp(ur)!==0;){for(var Dr=pr,_r=0;Dr.cmp(ur)!==0;_r++)Dr=Dr.redSqr();Ft(_r<br);var Nr=this.pow(hr,new qt(1).iushln(br-_r-1));wr=wr.redMul(Nr),hr=Nr.redSqr(),pr=pr.redMul(hr),br=_r}return wr},Br.prototype.invm=function(yr){var sr=yr._invmp(this.m);return sr.negative!==0?(sr.negative=0,this.imod(sr).redNeg()):this.imod(sr)},Br.prototype.pow=function(yr,sr){if(sr.isZero())return new qt(1).toRed(this);if(sr.cmpn(1)===0)return yr.clone();var or=4,Qt=new Array(1<<or);Qt[0]=new qt(1).toRed(this),Qt[1]=yr;for(var ir=2;ir<Qt.length;ir++)Qt[ir]=this.mul(Qt[ir-1],yr);var ur=Qt[0],gr=0,dr=0,lr=sr.bitLength()%26;for(lr===0&&(lr=26),ir=sr.length-1;ir>=0;ir--){for(var hr=sr.words[ir],wr=lr-1;wr>=0;wr--){var pr=hr>>wr&1;if(ur!==Qt[0]&&(ur=this.sqr(ur)),pr===0&&gr===0){dr=0;continue}gr<<=1,gr|=pr,dr++,!(dr!==or&&(ir!==0||wr!==0))&&(ur=this.mul(ur,Qt[gr]),dr=0,gr=0)}lr=26}return ur},Br.prototype.convertTo=function(yr){var sr=yr.umod(this.m);return sr===yr?sr.clone():sr},Br.prototype.convertFrom=function(yr){var sr=yr.clone();return sr.red=null,sr},qt.mont=function(yr){return new jr(yr)};function jr(Rr){Br.call(this,Rr),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new qt(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}Vt(jr,Br),jr.prototype.convertTo=function(yr){return this.imod(yr.ushln(this.shift))},jr.prototype.convertFrom=function(yr){var sr=this.imod(yr.mul(this.rinv));return sr.red=null,sr},jr.prototype.imul=function(yr,sr){if(yr.isZero()||sr.isZero())return yr.words[0]=0,yr.length=1,yr;var or=yr.imul(sr),Qt=or.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ir=or.isub(Qt).iushrn(this.shift),ur=ir;return ir.cmp(this.m)>=0?ur=ir.isub(this.m):ir.cmpn(0)<0&&(ur=ir.iadd(this.m)),ur._forceRed(this)},jr.prototype.mul=function(yr,sr){if(yr.isZero()||sr.isZero())return new qt(0)._forceRed(this);var or=yr.mul(sr),Qt=or.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ir=or.isub(Qt).iushrn(this.shift),ur=ir;return ir.cmp(this.m)>=0?ur=ir.isub(this.m):ir.cmpn(0)<0&&(ur=ir.iadd(this.m)),ur._forceRed(this)},jr.prototype.invm=function(yr){var sr=this.imod(yr._invmp(this.m).mul(this.r2));return sr._forceRed(this)}})(yt,commonjsGlobal)})(bn$3);var bnExports=bn$3.exports;const BN=getDefaultExportFromCjs$1(bnExports);
1491var brorand={exports:{}},hasRequiredBrorand;function requireBrorand(){if(hasRequiredBrorand)return brorand.exports;hasRequiredBrorand=1;var yt;brorand.exports=function(Vt){return yt||(yt=new _e(null)),yt.generate(Vt)};function _e(Ft){this.rand=Ft}if(brorand.exports.Rand=_e,_e.prototype.generate=function(Vt){return this._rand(Vt)},_e.prototype._rand=function(Vt){if(this.rand.getBytes)return this.rand.getBytes(Vt);for(var qt=new Uint8Array(Vt),zt=0;zt<qt.length;zt++)qt[zt]=this.rand.getByte();return qt},typeof self=="object")self.crypto&&self.crypto.getRandomValues?_e.prototype._rand=function(Vt){var qt=new Uint8Array(Vt);return self.crypto.getRandomValues(qt),qt}:self.msCrypto&&self.msCrypto.getRandomValues?_e.prototype._rand=function(Vt){var qt=new Uint8Array(Vt);return self.msCrypto.getRandomValues(qt),qt}:typeof window=="object"&&(_e.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var $t=requireCryptoBrowserify();if(typeof $t.randomBytes!="function")throw new Error("Not supported");_e.prototype._rand=function(Vt){return $t.randomBytes(Vt)}}catch{}return brorand.exports}var mr,hasRequiredMr;function requireMr(){if(hasRequiredMr)return mr;hasRequiredMr=1;var yt=bnExports,_e=requireBrorand();function $t(Ft){this.rand=Ft||new _e.Rand}return mr=$t,$t.create=function(Vt){return new $t(Vt)},$t.prototype._randbelow=function(Vt){var qt=Vt.bitLength(),zt=Math.ceil(qt/8);do var Ht=new yt(this.rand.generate(zt));while(Ht.cmp(Vt)>=0);return Ht},$t.prototype._randrange=function(Vt,qt){var zt=qt.sub(Vt);return Vt.add(this._randbelow(zt))},$t.prototype.test=function(Vt,qt,zt){var Ht=Vt.bitLength(),Kt=yt.mont(Vt),Gt=new yt(1).toRed(Kt);qt||(qt=Math.max(1,Ht/48|0));for(var Jt=Vt.subn(1),Xt=0;!Jt.testn(Xt);Xt++);for(var Zt=Vt.shrn(Xt),er=Jt.toRed(Kt),tr=!0;qt>0;qt--){var rr=this._randrange(new yt(2),Jt);zt&&zt(rr);var ar=rr.toRed(Kt).redPow(Zt);if(!(ar.cmp(Gt)===0||ar.cmp(er)===0)){for(var nr=1;nr<Xt;nr++){if(ar=ar.redSqr(),ar.cmp(Gt)===0)return!1;if(ar.cmp(er)===0)break}if(nr===Xt)return!1}}return tr},$t.prototype.getDivisor=function(Vt,qt){var zt=Vt.bitLength(),Ht=yt.mont(Vt),Kt=new yt(1).toRed(Ht);qt||(qt=Math.max(1,zt/48|0));for(var Gt=Vt.subn(1),Jt=0;!Gt.testn(Jt);Jt++);for(var Xt=Vt.shrn(Jt),Zt=Gt.toRed(Ht);qt>0;qt--){var er=this._randrange(new yt(2),Gt),tr=Vt.gcd(er);if(tr.cmpn(1)!==0)return tr;var rr=er.toRed(Ht).redPow(Xt);if(!(rr.cmp(Kt)===0||rr.cmp(Zt)===0)){for(var ar=1;ar<Jt;ar++){if(rr=rr.redSqr(),rr.cmp(Kt)===0)return rr.fromRed().subn(1).gcd(Vt);if(rr.cmp(Zt)===0)break}if(ar===Jt)return rr=rr.redSqr(),rr.fromRed().subn(1).gcd(Vt)}}return!1},mr}var generatePrime,hasRequiredGeneratePrime;function requireGeneratePrime(){if(hasRequiredGeneratePrime)return generatePrime;hasRequiredGeneratePrime=1;var yt=requireBrowser$b();generatePrime=ar,ar.simpleSieve=tr,ar.fermatTest=rr;var _e=bnExports,$t=new _e(24),Ft=requireMr(),Vt=new Ft,qt=new _e(1),zt=new _e(2),Ht=new _e(5);new _e(16),new _e(8);var Kt=new _e(10),Gt=new _e(3);new _e(7);var Jt=new _e(11),Xt=new _e(4);new _e(12);var Zt=null;function er(){if(Zt!==null)return Zt;var nr=1048576,cr=[];cr[0]=2;for(var fr=1,vr=3;vr<nr;vr+=2){for(var xr=Math.ceil(Math.sqrt(vr)),Sr=0;Sr<fr&&cr[Sr]<=xr&&vr%cr[Sr]!==0;Sr++);fr!==Sr&&cr[Sr]<=xr||(cr[fr++]=vr)}return Zt=cr,cr}function tr(nr){for(var cr=er(),fr=0;fr<cr.length;fr++)if(nr.modn(cr[fr])===0)return nr.cmpn(cr[fr])===0;return!0}function rr(nr){var cr=_e.mont(nr);return zt.toRed(cr).redPow(nr.subn(1)).fromRed().cmpn(1)===0}function ar(nr,cr){if(nr<16)return cr===2||cr===5?new _e([140,123]):new _e([140,39]);cr=new _e(cr);for(var fr,vr;;){for(fr=new _e(yt(Math.ceil(nr/8)));fr.bitLength()>nr;)fr.ishrn(1);if(fr.isEven()&&fr.iadd(qt),fr.testn(1)||fr.iadd(zt),cr.cmp(zt)){if(!cr.cmp(Ht))for(;fr.mod(Kt).cmp(Gt);)fr.iadd(Xt)}else for(;fr.mod($t).cmp(Jt);)fr.iadd(Xt);if(vr=fr.shrn(1),tr(vr)&&tr(fr)&&rr(vr)&&rr(fr)&&Vt.test(vr)&&Vt.test(fr))return fr}}return generatePrime}const modp1={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd4
149107b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"},require$$1$1={modp1,modp2,modp5,modp14,modp15,modp16,modp17,modp18};var dh,hasRequiredDh;function requireDh(){if(hasRequiredDh)return dh;hasRequiredDh=1;var yt=bnExports,_e=requireMr(),$t=new _e,Ft=new yt(24),Vt=new yt(11),qt=new yt(10),zt=new yt(3),Ht=new yt(7),Kt=requireGeneratePrime(),Gt=requireBrowser$b();dh=tr;function Jt(ar,nr){return nr=nr||"utf8",Buffer.isBuffer(ar)||(ar=new Buffer(ar,nr)),this._pub=new yt(ar),this}function Xt(ar,nr){return nr=nr||"utf8",Buffer.isBuffer(ar)||(ar=new Buffer(ar,nr)),this._priv=new yt(ar),this}var Zt={};function er(ar,nr){var cr=nr.toString("hex"),fr=[cr,ar.toString(16)].join("_");if(fr in Zt)return Zt[fr];var vr=0;if(ar.isEven()||!Kt.simpleSieve||!Kt.fermatTest(ar)||!$t.test(ar))return vr+=1,cr==="02"||cr==="05"?vr+=8:vr+=4,Zt[fr]=vr,vr;$t.test(ar.shrn(1))||(vr+=2);var xr;switch(cr){case"02":ar.mod(Ft).cmp(Vt)&&(vr+=8);break;case"05":xr=ar.mod(qt),xr.cmp(zt)&&xr.cmp(Ht)&&(vr+=8);break;default:vr+=4}return Zt[fr]=vr,vr}function tr(ar,nr,cr){this.setGenerator(nr),this.__prime=new yt(ar),this._prime=yt.mont(this.__prime),this._primeLen=ar.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,cr?(this.setPublicKey=Jt,this.setPrivateKey=Xt):this._primeCode=8}Object.defineProperty(tr.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=er(this.__prime,this.__gen)),this._primeCode}}),tr.prototype.generateKeys=function(){return this._priv||(this._priv=new yt(Gt(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},tr.prototype.computeSecret=function(ar){ar=new yt(ar),ar=ar.toRed(this._prime);var nr=ar.redPow(this._priv).fromRed(),cr=new Buffer(nr.toArray()),fr=this.getPrime();if(cr.length<fr.length){var vr=new Buffer(fr.length-cr.length);
1491vr.fill(0),cr=Buffer.concat([vr,cr])}return cr},tr.prototype.getPublicKey=function(nr){return rr(this._pub,nr)},tr.prototype.getPrivateKey=function(nr){return rr(this._priv,nr)},tr.prototype.getPrime=function(ar){return rr(this.__prime,ar)},tr.prototype.getGenerator=function(ar){return rr(this._gen,ar)},tr.prototype.setGenerator=function(ar,nr){return nr=nr||"utf8",Buffer.isBuffer(ar)||(ar=new Buffer(ar,nr)),this.__gen=ar,this._gen=new yt(ar),this};function rr(ar,nr){var cr=new Buffer(ar.toArray());return nr?cr.toString(nr):cr}return dh}var hasRequiredBrowser$4;function requireBrowser$4(){if(hasRequiredBrowser$4)return browser$4;hasRequiredBrowser$4=1;var yt=requireGeneratePrime(),_e=require$$1$1,$t=requireDh();function Ft(zt){var Ht=new Buffer(_e[zt].prime,"hex"),Kt=new Buffer(_e[zt].gen,"hex");return new $t(Ht,Kt)}var Vt={binary:!0,hex:!0,base64:!0};function qt(zt,Ht,Kt,Gt){return Buffer.isBuffer(Ht)||Vt[Ht]===void 0?qt(zt,"binary",Ht,Kt):(Ht=Ht||"binary",Gt=Gt||"binary",Kt=Kt||new Buffer([2]),Buffer.isBuffer(Kt)||(Kt=new Buffer(Kt,Gt)),typeof zt=="number"?new $t(yt(zt,Kt),Kt,!0):(Buffer.isBuffer(zt)||(zt=new Buffer(zt,Ht)),new $t(zt,Kt,!0)))}return browser$4.DiffieHellmanGroup=browser$4.createDiffieHellmanGroup=browser$4.getDiffieHellman=Ft,browser$4.createDiffieHellman=browser$4.DiffieHellman=qt,browser$4}var readableBrowser={exports:{}},processNextickArgs={exports:{}},hasRequiredProcessNextickArgs;function requireProcessNextickArgs(){if(hasRequiredProcessNextickArgs)return processNextickArgs.exports;hasRequiredProcessNextickArgs=1,typeof process$1>"u"||!process$1.version||process$1.version.indexOf("v0.")===0||process$1.version.indexOf("v1.")===0&&process$1.version.indexOf("v1.8.")!==0?processNextickArgs.exports={nextTick:yt}:processNextickArgs.exports=process$1;function yt(_e,$t,Ft,Vt){if(typeof _e!="function")throw new TypeError('"callback" argument must be a function');var qt=arguments.length,zt,Ht;switch(qt){case 0:case 1:return process$1.nextTick(_e);case 2:return process$1.nextTick(function(){_e.call(null,$t)});case 3:return process$1.nextTick(function(){_e.call(null,$t,Ft)});case 4:return process$1.nextTick(function(){_e.call(null,$t,Ft,Vt)});default:for(zt=new Array(qt-1),Ht=0;Ht<zt.length;)zt[Ht++]=arguments[Ht];return process$1.nextTick(function(){_e.apply(null,zt)})}}return processNextickArgs.exports}var isarray,hasRequiredIsarray;function requireIsarray(){if(hasRequiredIsarray)return isarray;hasRequiredIsarray=1;var yt={}.toString;return isarray=Array.isArray||function(_e){return yt.call(_e)=="[object Array]"},isarray}var streamBrowser,hasRequiredStreamBrowser;function requireStreamBrowser(){return hasRequiredStreamBrowser||(hasRequiredStreamBrowser=1,streamBrowser=requireEvents().EventEmitter),streamBrowser}var safeBuffer={exports:{}},hasRequiredSafeBuffer;function requireSafeBuffer(){return hasRequiredSafeBuffer||(hasRequiredSafeBuffer=1,function(yt,_e){var $t=require$$1$2,Ft=$t.Buffer;function Vt(zt,Ht){for(var Kt in zt)Ht[Kt]=zt[Kt]}Ft.from&&Ft.alloc&&Ft.allocUnsafe&&Ft.allocUnsafeSlow?yt.exports=$t:(Vt($t,_e),_e.Buffer=qt);function qt(zt,Ht,Kt){return Ft(zt,Ht,Kt)}Vt(Ft,qt),qt.from=function(zt,Ht,Kt){if(typeof zt=="number")throw new TypeError("Argument must not be a number");return Ft(zt,Ht,Kt)},qt.alloc=function(zt,Ht,Kt){if(typeof zt!="number")throw new TypeError("Argument must be a number");var Gt=Ft(zt);return Ht!==void 0?typeof Kt=="string"?Gt.fill(Ht,Kt):Gt.fill(Ht):Gt.fill(0),Gt},qt.allocUnsafe=function(zt){if(typeof zt!="number")throw new TypeError("Argument must be a number");return Ft(zt)},qt.allocUnsafeSlow=function(zt){if(typeof zt!="number")throw new TypeError("Argument must be a number");return $t.SlowBuffer(zt)}}(safeBuffer,safeBuffer.exports)),safeBuffer.exports}var util={},hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util;hasRequiredUtil=1;function yt(rr){return Array.isArray?Array.isArray(rr):tr(rr)==="[object Array]"}util.isArray=yt;function _e(rr){return typeof rr=="boolean"}util.isBoolean=_e;function $t(rr){return rr===null}util.isNull=$t;function Ft(rr){return rr==null}util.isNullOrUndefined=Ft;function Vt(rr){return typeof rr=="number"}util.isNumber=Vt;function qt(rr){return typeof rr=="string"}util.isString=qt;function zt(rr){return typeof rr=="symbol"}
1491util.isSymbol=zt;function Ht(rr){return rr===void 0}util.isUndefined=Ht;function Kt(rr){return tr(rr)==="[object RegExp]"}util.isRegExp=Kt;function Gt(rr){return typeof rr=="object"&&rr!==null}util.isObject=Gt;function Jt(rr){return tr(rr)==="[object Date]"}util.isDate=Jt;function Xt(rr){return tr(rr)==="[object Error]"||rr instanceof Error}util.isError=Xt;function Zt(rr){return typeof rr=="function"}util.isFunction=Zt;function er(rr){return rr===null||typeof rr=="boolean"||typeof rr=="number"||typeof rr=="string"||typeof rr=="symbol"||typeof rr>"u"}util.isPrimitive=er,util.isBuffer=require$$1$2.Buffer.isBuffer;function tr(rr){return Object.prototype.toString.call(rr)}return util}var BufferList={exports:{}},hasRequiredBufferList;function requireBufferList(){return hasRequiredBufferList||(hasRequiredBufferList=1,function(yt){function _e(qt,zt){if(!(qt instanceof zt))throw new TypeError("Cannot call a class as a function")}var $t=requireSafeBuffer().Buffer,Ft=requireUtil$1();function Vt(qt,zt,Ht){qt.copy(zt,Ht)}yt.exports=function(){function qt(){_e(this,qt),this.head=null,this.tail=null,this.length=0}return qt.prototype.push=function(Ht){var Kt={data:Ht,next:null};this.length>0?this.tail.next=Kt:this.head=Kt,this.tail=Kt,++this.length},qt.prototype.unshift=function(Ht){var Kt={data:Ht,next:this.head};this.length===0&&(this.tail=Kt),this.head=Kt,++this.length},qt.prototype.shift=function(){if(this.length!==0){var Ht=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,Ht}},qt.prototype.clear=function(){this.head=this.tail=null,this.length=0},qt.prototype.join=function(Ht){if(this.length===0)return"";for(var Kt=this.head,Gt=""+Kt.data;Kt=Kt.next;)Gt+=Ht+Kt.data;return Gt},qt.prototype.concat=function(Ht){if(this.length===0)return $t.alloc(0);for(var Kt=$t.allocUnsafe(Ht>>>0),Gt=this.head,Jt=0;Gt;)Vt(Gt.data,Kt,Jt),Jt+=Gt.data.length,Gt=Gt.next;return Kt},qt}(),Ft&&Ft.inspect&&Ft.inspect.custom&&(yt.exports.prototype[Ft.inspect.custom]=function(){var qt=Ft.inspect({length:this.length});return this.constructor.name+" "+qt})}(BufferList)),BufferList.exports}var destroy_1,hasRequiredDestroy;function requireDestroy(){if(hasRequiredDestroy)return destroy_1;hasRequiredDestroy=1;var yt=requireProcessNextickArgs();function _e(Vt,qt){var zt=this,Ht=this._readableState&&this._readableState.destroyed,Kt=this._writableState&&this._writableState.destroyed;return Ht||Kt?(qt?qt(Vt):Vt&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,yt.nextTick(Ft,this,Vt)):yt.nextTick(Ft,this,Vt)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(Vt||null,function(Gt){!qt&&Gt?zt._writableState?zt._writableState.errorEmitted||(zt._writableState.errorEmitted=!0,yt.nextTick(Ft,zt,Gt)):yt.nextTick(Ft,zt,Gt):qt&&qt(Gt)}),this)}function $t(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Ft(Vt,qt){Vt.emit("error",qt)}return destroy_1={destroy:_e,undestroy:$t},destroy_1}var _stream_writable,hasRequired_stream_writable;function require_stream_writable(){if(hasRequired_stream_writable)return _stream_writable;hasRequired_stream_writable=1;var yt=requireProcessNextickArgs();_stream_writable=rr;function _e(gr){var dr=this;this.next=null,this.entry=null,this.finish=function(){ur(dr,gr)}}var $t=!process$1.browser&&["v0.10","v0.9."].indexOf(process$1.version.slice(0,5))>-1?setImmediate:yt.nextTick,Ft;rr.WritableState=er;var Vt=Object.create(requireUtil());Vt.inherits=requireInherits_browser();var qt={deprecate:requireBrowser$a()},zt=requireStreamBrowser(),Ht=requireSafeBuffer().Buffer,Kt=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Gt(gr){return Ht.from(gr)}function Jt(gr){return Ht.isBuffer(gr)||gr instanceof Kt}var Xt=requireDestroy();Vt.inherits(rr,zt);function Zt(){}function er(gr,dr){Ft=Ft||require_stream_duplex(),gr=gr||{};var lr=dr instanceof Ft;this.objectMode=!!gr.objectMode,lr&&(this.objectMode=this.objectMode||!!gr.writableObjectMode);var hr=gr.highWaterMark,wr=gr.writableHighWaterMark,pr=this.objectMode?16:16*1024;hr||hr===0?this.highWaterMark=hr:lr&&(wr||wr===0)?this.highWaterMark=wr:this.highWaterMark=pr,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var br=gr.decodeStrings===!1;this.decodeStrings=!br,this.defaultEncoding=gr.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Dr){Tr(dr,Dr)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new _e(this)}er.prototype.getBuffer=function(){for(var dr=this.bufferedRequest,lr=[];dr;)lr.push(dr),dr=dr.next;return lr},function(){try{Object.defineProperty(er.prototype,"buffer",{get:qt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var tr;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(tr=Function.prototype[Symbol.hasInstance],Object.defineProperty(rr,Symbol.hasInstance,{value:function(gr){return tr.call(this,gr)?!0:this!==rr?!1:gr&&gr._writableState instanceof er}})):tr=function(gr){return gr instanceof this};function rr(gr){if(Ft=Ft||require_stream_duplex(),!tr.call(rr,this)&&!(this instanceof Ft))return new rr(gr);this._writableState=new er(gr,this),this.writable=!0,gr&&(typeof gr.write=="function"&&(this._write=gr.write),typeof gr.writev=="function"&&(this._writev=gr.writev),typeof gr.destroy=="function"&&(this._destroy=gr.destroy),typeof gr.final=="function"&&(this._final=gr.final)),zt.call(this)}
1491rr.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function ar(gr,dr){var lr=new Error("write after end");gr.emit("error",lr),yt.nextTick(dr,lr)}function nr(gr,dr,lr,hr){var wr=!0,pr=!1;return lr===null?pr=new TypeError("May not write null values to stream"):typeof lr!="string"&&lr!==void 0&&!dr.objectMode&&(pr=new TypeError("Invalid non-string/buffer chunk")),pr&&(gr.emit("error",pr),yt.nextTick(hr,pr),wr=!1),wr}rr.prototype.write=function(gr,dr,lr){var hr=this._writableState,wr=!1,pr=!hr.objectMode&&Jt(gr);return pr&&!Ht.isBuffer(gr)&&(gr=Gt(gr)),typeof dr=="function"&&(lr=dr,dr=null),pr?dr="buffer":dr||(dr=hr.defaultEncoding),typeof lr!="function"&&(lr=Zt),hr.ended?ar(this,lr):(pr||nr(this,hr,gr,lr))&&(hr.pendingcb++,wr=fr(this,hr,pr,gr,dr,lr)),wr},rr.prototype.cork=function(){var gr=this._writableState;gr.corked++},rr.prototype.uncork=function(){var gr=this._writableState;gr.corked&&(gr.corked--,!gr.writing&&!gr.corked&&!gr.bufferProcessing&&gr.bufferedRequest&&Rr(this,gr))},rr.prototype.setDefaultEncoding=function(dr){if(typeof dr=="string"&&(dr=dr.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((dr+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+dr);return this._writableState.defaultEncoding=dr,this};function cr(gr,dr,lr){return!gr.objectMode&&gr.decodeStrings!==!1&&typeof dr=="string"&&(dr=Ht.from(dr,lr)),dr}Object.defineProperty(rr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function fr(gr,dr,lr,hr,wr,pr){if(!lr){var br=cr(dr,hr,wr);hr!==br&&(lr=!0,wr="buffer",hr=br)}var Dr=dr.objectMode?1:hr.length;dr.length+=Dr;var _r=dr.length<dr.highWaterMark;if(_r||(dr.needDrain=!0),dr.writing||dr.corked){var Nr=dr.lastBufferedRequest;dr.lastBufferedRequest={chunk:hr,encoding:wr,isBuf:lr,callback:pr,next:null},Nr?Nr.next=dr.lastBufferedRequest:dr.bufferedRequest=dr.lastBufferedRequest,dr.bufferedRequestCount+=1}else vr(gr,dr,!1,Dr,hr,wr,pr);return _r}function vr(gr,dr,lr,hr,wr,pr,br){dr.writelen=hr,dr.writecb=br,dr.writing=!0,dr.sync=!0,lr?gr._writev(wr,dr.onwrite):gr._write(wr,pr,dr.onwrite),dr.sync=!1}function xr(gr,dr,lr,hr,wr){--dr.pendingcb,lr?(yt.nextTick(wr,hr),yt.nextTick(Qt,gr,dr),gr._writableState.errorEmitted=!0,gr.emit("error",hr)):(wr(hr),gr._writableState.errorEmitted=!0,gr.emit("error",hr),Qt(gr,dr))}function Sr(gr){gr.writing=!1,gr.writecb=null,gr.length-=gr.writelen,gr.writelen=0}function Tr(gr,dr){var lr=gr._writableState,hr=lr.sync,wr=lr.writecb;if(Sr(lr),dr)xr(gr,lr,hr,dr,wr);else{var pr=yr(lr);!pr&&!lr.corked&&!lr.bufferProcessing&&lr.bufferedRequest&&Rr(gr,lr),hr?$t(Br,gr,lr,pr,wr):Br(gr,lr,pr,wr)}}function Br(gr,dr,lr,hr){lr||jr(gr,dr),dr.pendingcb--,hr(),Qt(gr,dr)}function jr(gr,dr){dr.length===0&&dr.needDrain&&(dr.needDrain=!1,gr.emit("drain"))}function Rr(gr,dr){dr.bufferProcessing=!0;var lr=dr.bufferedRequest;if(gr._writev&&lr&&lr.next){var hr=dr.bufferedRequestCount,wr=new Array(hr),pr=dr.corkedRequestsFree;pr.entry=lr;for(var br=0,Dr=!0;lr;)wr[br]=lr,lr.isBuf||(Dr=!1),lr=lr.next,br+=1;wr.allBuffers=Dr,vr(gr,dr,!0,dr.length,wr,"",pr.finish),dr.pendingcb++,dr.lastBufferedRequest=null,pr.next?(dr.corkedRequestsFree=pr.next,pr.next=null):dr.corkedRequestsFree=new _e(dr),dr.bufferedRequestCount=0}else{for(;lr;){var _r=lr.chunk,Nr=lr.encoding,kr=lr.callback,Mr=dr.objectMode?1:_r.length;if(vr(gr,dr,!1,Mr,_r,Nr,kr),lr=lr.next,dr.bufferedRequestCount--,dr.writing)break}lr===null&&(dr.lastBufferedRequest=null)}dr.bufferedRequest=lr,dr.bufferProcessing=!1}rr.prototype._write=function(gr,dr,lr){lr(new Error("_write() is not implemented"))},rr.prototype._writev=null,rr.prototype.end=function(gr,dr,lr){var hr=this._writableState;typeof gr=="function"?(lr=gr,gr=null,dr=null):typeof dr=="function"&&(lr=dr,dr=null),gr!=null&&this.write(gr,dr),hr.corked&&(hr.corked=1,this.uncork()),hr.ending||ir(this,hr,lr)};function yr(gr){return gr.ending&&gr.length===0&&gr.bufferedRequest===null&&!gr.finished&&!gr.writing}function sr(gr,dr){gr._final(function(lr){dr.pendingcb--,lr&&gr.emit("error",lr),dr.prefinished=!0,gr.emit("prefinish"),Qt(gr,dr)})}function or(gr,dr){!dr.prefinished&&!dr.finalCalled&&(typeof gr._final=="function"?(dr.pendingcb++,dr.finalCalled=!0,yt.nextTick(sr,gr,dr)):(dr.prefinished=!0,gr.emit("prefinish")))}function Qt(gr,dr){var lr=yr(dr);
1491return lr&&(or(gr,dr),dr.pendingcb===0&&(dr.finished=!0,gr.emit("finish"))),lr}function ir(gr,dr,lr){dr.ending=!0,Qt(gr,dr),lr&&(dr.finished?yt.nextTick(lr):gr.once("finish",lr)),dr.ended=!0,gr.writable=!1}function ur(gr,dr,lr){var hr=gr.entry;for(gr.entry=null;hr;){var wr=hr.callback;dr.pendingcb--,wr(lr),hr=hr.next}dr.corkedRequestsFree.next=gr}return Object.defineProperty(rr.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(gr){this._writableState&&(this._writableState.destroyed=gr)}}),rr.prototype.destroy=Xt.destroy,rr.prototype._undestroy=Xt.undestroy,rr.prototype._destroy=function(gr,dr){this.end(),dr(gr)},_stream_writable}var _stream_duplex,hasRequired_stream_duplex;function require_stream_duplex(){if(hasRequired_stream_duplex)return _stream_duplex;hasRequired_stream_duplex=1;var yt=requireProcessNextickArgs(),_e=Object.keys||function(Xt){var Zt=[];for(var er in Xt)Zt.push(er);return Zt};_stream_duplex=Kt;var $t=Object.create(requireUtil());$t.inherits=requireInherits_browser();var Ft=require_stream_readable(),Vt=require_stream_writable();$t.inherits(Kt,Ft);for(var qt=_e(Vt.prototype),zt=0;zt<qt.length;zt++){var Ht=qt[zt];Kt.prototype[Ht]||(Kt.prototype[Ht]=Vt.prototype[Ht])}function Kt(Xt){if(!(this instanceof Kt))return new Kt(Xt);Ft.call(this,Xt),Vt.call(this,Xt),Xt&&Xt.readable===!1&&(this.readable=!1),Xt&&Xt.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,Xt&&Xt.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",Gt)}Object.defineProperty(Kt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Gt(){this.allowHalfOpen||this._writableState.ended||yt.nextTick(Jt,this)}function Jt(Xt){Xt.end()}return Object.defineProperty(Kt.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(Xt){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=Xt,this._writableState.destroyed=Xt)}}),Kt.prototype._destroy=function(Xt,Zt){this.push(null),this.end(),yt.nextTick(Zt,Xt)},_stream_duplex}var _stream_readable,hasRequired_stream_readable;function require_stream_readable(){if(hasRequired_stream_readable)return _stream_readable;hasRequired_stream_readable=1;var yt=requireProcessNextickArgs();_stream_readable=cr;var _e=requireIsarray(),$t;cr.ReadableState=nr,requireEvents().EventEmitter;var Ft=function(kr,Mr){return kr.listeners(Mr).length},Vt=requireStreamBrowser(),qt=requireSafeBuffer().Buffer,zt=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Ht(kr){return qt.from(kr)}function Kt(kr){return qt.isBuffer(kr)||kr instanceof zt}var Gt=Object.create(requireUtil());Gt.inherits=requireInherits_browser();var Jt=requireUtil$1(),Xt=void 0;Jt&&Jt.debuglog?Xt=Jt.debuglog("stream"):Xt=function(){};var Zt=requireBufferList(),er=requireDestroy(),tr;Gt.inherits(cr,Vt);var rr=["error","close","destroy","pause","resume"];function ar(kr,Mr,Lr){if(typeof kr.prependListener=="function")return kr.prependListener(Mr,Lr);!kr._events||!kr._events[Mr]?kr.on(Mr,Lr):_e(kr._events[Mr])?kr._events[Mr].unshift(Lr):kr._events[Mr]=[Lr,kr._events[Mr]]}function nr(kr,Mr){$t=$t||require_stream_duplex(),kr=kr||{};var Lr=Mr instanceof $t;this.objectMode=!!kr.objectMode,Lr&&(this.objectMode=this.objectMode||!!kr.readableObjectMode);var Cr=kr.highWaterMark,Er=kr.readableHighWaterMark,Ar=this.objectMode?16:16*1024;Cr||Cr===0?this.highWaterMark=Cr:Lr&&(Er||Er===0)?this.highWaterMark=Er:this.highWaterMark=Ar,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Zt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=kr.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,kr.encoding&&(tr||(tr=requireString_decoder().StringDecoder),this.decoder=new tr(kr.encoding),this.encoding=kr.encoding)}function cr(kr){if($t=$t||require_stream_duplex(),!(this instanceof cr))return new cr(kr);this._readableState=new nr(kr,this),this.readable=!0,kr&&(typeof kr.read=="function"&&(this._read=kr.read),typeof kr.destroy=="function"&&(this._destroy=kr.destroy)),Vt.call(this)}Object.defineProperty(cr.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(kr){this._readableState&&(this._readableState.destroyed=kr)}}),cr.prototype.destroy=er.destroy,cr.prototype._undestroy=er.undestroy,cr.prototype._destroy=function(kr,Mr){this.push(null),Mr(kr)},cr.prototype.push=function(kr,Mr){var Lr=this._readableState,Cr;return Lr.objectMode?Cr=!0:typeof kr=="string"&&(Mr=Mr||Lr.defaultEncoding,Mr!==Lr.encoding&&(kr=qt.from(kr,Mr),Mr=""),Cr=!0),fr(this,kr,Mr,!1,Cr)},cr.prototype.unshift=function(kr){return fr(this,kr,null,!0,!1)};function fr(kr,Mr,Lr,Cr,Er){var Ar=kr._readableState;if(Mr===null)Ar.reading=!1,Rr(kr,Ar);else{var zr;Er||(zr=xr(Ar,Mr)),zr?kr.emit("error",zr):Ar.objectMode||Mr&&Mr.length>
14910?(typeof Mr!="string"&&!Ar.objectMode&&Object.getPrototypeOf(Mr)!==qt.prototype&&(Mr=Ht(Mr)),Cr?Ar.endEmitted?kr.emit("error",new Error("stream.unshift() after end event")):vr(kr,Ar,Mr,!0):Ar.ended?kr.emit("error",new Error("stream.push() after EOF")):(Ar.reading=!1,Ar.decoder&&!Lr?(Mr=Ar.decoder.write(Mr),Ar.objectMode||Mr.length!==0?vr(kr,Ar,Mr,!1):or(kr,Ar)):vr(kr,Ar,Mr,!1))):Cr||(Ar.reading=!1)}return Sr(Ar)}function vr(kr,Mr,Lr,Cr){Mr.flowing&&Mr.length===0&&!Mr.sync?(kr.emit("data",Lr),kr.read(0)):(Mr.length+=Mr.objectMode?1:Lr.length,Cr?Mr.buffer.unshift(Lr):Mr.buffer.push(Lr),Mr.needReadable&&yr(kr)),or(kr,Mr)}function xr(kr,Mr){var Lr;return!Kt(Mr)&&typeof Mr!="string"&&Mr!==void 0&&!kr.objectMode&&(Lr=new TypeError("Invalid non-string/buffer chunk")),Lr}function Sr(kr){return!kr.ended&&(kr.needReadable||kr.length<kr.highWaterMark||kr.length===0)}cr.prototype.isPaused=function(){return this._readableState.flowing===!1},cr.prototype.setEncoding=function(kr){return tr||(tr=requireString_decoder().StringDecoder),this._readableState.decoder=new tr(kr),this._readableState.encoding=kr,this};var Tr=8388608;function Br(kr){return kr>=Tr?kr=Tr:(kr--,kr|=kr>>>1,kr|=kr>>>2,kr|=kr>>>4,kr|=kr>>>8,kr|=kr>>>16,kr++),kr}function jr(kr,Mr){return kr<=0||Mr.length===0&&Mr.ended?0:Mr.objectMode?1:kr!==kr?Mr.flowing&&Mr.length?Mr.buffer.head.data.length:Mr.length:(kr>Mr.highWaterMark&&(Mr.highWaterMark=Br(kr)),kr<=Mr.length?kr:Mr.ended?Mr.length:(Mr.needReadable=!0,0))}cr.prototype.read=function(kr){Xt("read",kr),kr=parseInt(kr,10);var Mr=this._readableState,Lr=kr;if(kr!==0&&(Mr.emittedReadable=!1),kr===0&&Mr.needReadable&&(Mr.length>=Mr.highWaterMark||Mr.ended))return Xt("read: emitReadable",Mr.length,Mr.ended),Mr.length===0&&Mr.ended?Dr(this):yr(this),null;if(kr=jr(kr,Mr),kr===0&&Mr.ended)return Mr.length===0&&Dr(this),null;var Cr=Mr.needReadable;Xt("need readable",Cr),(Mr.length===0||Mr.length-kr<Mr.highWaterMark)&&(Cr=!0,Xt("length less than watermark",Cr)),Mr.ended||Mr.reading?(Cr=!1,Xt("reading or ended",Cr)):Cr&&(Xt("do read"),Mr.reading=!0,Mr.sync=!0,Mr.length===0&&(Mr.needReadable=!0),this._read(Mr.highWaterMark),Mr.sync=!1,Mr.reading||(kr=jr(Lr,Mr)));var Er;return kr>0?Er=hr(kr,Mr):Er=null,Er===null?(Mr.needReadable=!0,kr=0):Mr.length-=kr,Mr.length===0&&(Mr.ended||(Mr.needReadable=!0),Lr!==kr&&Mr.ended&&Dr(this)),Er!==null&&this.emit("data",Er),Er};function Rr(kr,Mr){if(!Mr.ended){if(Mr.decoder){var Lr=Mr.decoder.end();Lr&&Lr.length&&(Mr.buffer.push(Lr),Mr.length+=Mr.objectMode?1:Lr.length)}Mr.ended=!0,yr(kr)}}function yr(kr){var Mr=kr._readableState;Mr.needReadable=!1,Mr.emittedReadable||(Xt("emitReadable",Mr.flowing),Mr.emittedReadable=!0,Mr.sync?yt.nextTick(sr,kr):sr(kr))}function sr(kr){Xt("emit readable"),kr.emit("readable"),lr(kr)}function or(kr,Mr){Mr.readingMore||(Mr.readingMore=!0,yt.nextTick(Qt,kr,Mr))}function Qt(kr,Mr){for(var Lr=Mr.length;!Mr.reading&&!Mr.flowing&&!Mr.ended&&Mr.length<Mr.highWaterMark&&(Xt("maybeReadMore read 0"),kr.read(0),Lr!==Mr.length);)Lr=Mr.length;Mr.readingMore=!1}cr.prototype._read=function(kr){this.emit("error",new Error("_read() is not implemented"))},cr.prototype.pipe=function(kr,Mr){var Lr=this,Cr=this._readableState;switch(Cr.pipesCount){case 0:Cr.pipes=kr;break;case 1:Cr.pipes=[Cr.pipes,kr];break;default:Cr.pipes.push(kr);break}Cr.pipesCount+=1,Xt("pipe count=%d opts=%j",Cr.pipesCount,Mr);var Er=(!Mr||Mr.end!==!1)&&kr!==process$1.stdout&&kr!==process$1.stderr,Ar=Er?Vr:an;Cr.endEmitted?yt.nextTick(Ar):Lr.once("end",Ar),kr.on("unpipe",zr);function zr(sn,vn){Xt("onunpipe"),sn===Lr&&vn&&vn.hasUnpiped===!1&&(vn.hasUnpiped=!0,Yr())}function Vr(){Xt("onend"),kr.end()}var Gr=ir(Lr);kr.on("drain",Gr);var tn=!1;function Yr(){Xt("cleanup"),kr.removeListener("close",Qr),kr.removeListener("finish",un),kr.removeListener("drain",Gr),kr.removeListener("error",Xr),kr.removeListener("unpipe",zr),Lr.removeListener("end",Vr),Lr.removeListener("end",an),Lr.removeListener("data",Kr),tn=!0,Cr.awaitDrain&&(!kr._writableState||kr._writableState.needDrain)&&Gr()}var Jr=!1;Lr.on("data",Kr);function Kr(sn){Xt("ondata"),Jr=!1;var vn=kr.write(sn);vn===!1&&!Jr&&((Cr.pipesCount===1&&Cr.pipes===kr||Cr.pipesCount>1&&Nr(Cr.pipes,kr)!==-1)&&!tn&&(Xt("false write response, pause",Cr.awaitDrain),Cr.awaitDrain++,Jr=!0),Lr.pause())}function Xr(sn){Xt("onerror",sn),an(),kr.removeListener("error",Xr),Ft(kr,"error")===0&&kr.emit("error",sn)}ar(kr,"error",Xr);function Qr(){kr.removeListener("finish",un),an()}kr.once("close",Qr);function un(){Xt("onfinish"),kr.removeListener("close",Qr),an()}kr.once("finish",un);function an(){Xt("unpipe"),Lr.unpipe(kr)}return kr.emit("pipe",Lr),Cr.flowing||(Xt("pipe resume"),Lr.resume()),kr};function ir(kr){return function(){var Mr=kr._readableState;Xt("pipeOnDrain",Mr.awaitDrain),Mr.awaitDrain&&Mr.awaitDrain--,Mr.awaitDrain===0&&Ft(kr,"data")&&(Mr.flowing=!0,lr(kr))}}cr.prototype.unpipe=function(kr){var Mr=this._readableState,Lr={hasUnpiped:!1};if(Mr.pipesCount===0)return this;if(Mr.pipesCount===1)return kr&&kr!==Mr.pipes?this:(kr||(kr=Mr.pipes),Mr.pipes=null,Mr.pipesCount=0,Mr.flowing=!1,kr&&kr.emit("unpipe",this,Lr),this);if(!kr){var Cr=Mr.pipes,Er=Mr.pipesCount;Mr.pipes=null,Mr.pipesCount=0,Mr.flowing=!1;for(var Ar=0;Ar<Er;Ar++)Cr[Ar].emit("unpipe",this,{hasUnpiped:!1});return this}var zr=Nr(Mr.pipes,kr);return zr===-1?this:(Mr.pipes.splice(zr,1),Mr.pipesCount-=1,Mr.pipesCount===1&&(Mr.pipes=Mr.pipes[0]),kr.emit("unpipe",this,Lr),this)},cr.prototype.on=function(kr,Mr){var Lr=Vt.prototype.on.call(this,kr,Mr);if(kr==="data")this._readableState.flowing!==!1&&this.resume();else if(kr==="readable"){var Cr=this._readableState;!Cr.endEmitted&&!Cr.readableListening&&(Cr.readableListening=Cr.needReadable=!0,Cr.emittedReadable=!1,Cr.reading?Cr.length&&yr(this):yt.nextTick(ur,this))}return Lr},cr.prototype.addListener=cr.prototype.on;function ur(kr){Xt("readable nexttick read 0"),kr.read(0)}cr.prototype.resume=function(){var kr=this._readableState;return kr.flowing||(Xt("resume"),kr.flowing=!0,gr(this,kr)),this};function gr(kr,Mr){Mr.resumeScheduled||(Mr.resumeScheduled=!0,yt.nextTick(dr,kr,Mr))}function dr(kr,Mr){Mr.reading||(Xt("resume read 0"),kr.read(0)),Mr.resumeScheduled=!1,Mr.awaitDrain=0,kr.emit("resume"),lr(kr),Mr.flowing&&!Mr.reading&&kr.read(0)}cr.prototype.pause=function(){return Xt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Xt("pause"),this._readableState.flowing=!1,this.emit
1491("pause")),this};function lr(kr){var Mr=kr._readableState;for(Xt("flow",Mr.flowing);Mr.flowing&&kr.read()!==null;);}cr.prototype.wrap=function(kr){var Mr=this,Lr=this._readableState,Cr=!1;kr.on("end",function(){if(Xt("wrapped end"),Lr.decoder&&!Lr.ended){var zr=Lr.decoder.end();zr&&zr.length&&Mr.push(zr)}Mr.push(null)}),kr.on("data",function(zr){if(Xt("wrapped data"),Lr.decoder&&(zr=Lr.decoder.write(zr)),!(Lr.objectMode&&zr==null)&&!(!Lr.objectMode&&(!zr||!zr.length))){var Vr=Mr.push(zr);Vr||(Cr=!0,kr.pause())}});for(var Er in kr)this[Er]===void 0&&typeof kr[Er]=="function"&&(this[Er]=function(zr){return function(){return kr[zr].apply(kr,arguments)}}(Er));for(var Ar=0;Ar<rr.length;Ar++)kr.on(rr[Ar],this.emit.bind(this,rr[Ar]));return this._read=function(zr){Xt("wrapped _read",zr),Cr&&(Cr=!1,kr.resume())},this},Object.defineProperty(cr.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),cr._fromList=hr;function hr(kr,Mr){if(Mr.length===0)return null;var Lr;return Mr.objectMode?Lr=Mr.buffer.shift():!kr||kr>=Mr.length?(Mr.decoder?Lr=Mr.buffer.join(""):Mr.buffer.length===1?Lr=Mr.buffer.head.data:Lr=Mr.buffer.concat(Mr.length),Mr.buffer.clear()):Lr=wr(kr,Mr.buffer,Mr.decoder),Lr}function wr(kr,Mr,Lr){var Cr;return kr<Mr.head.data.length?(Cr=Mr.head.data.slice(0,kr),Mr.head.data=Mr.head.data.slice(kr)):kr===Mr.head.data.length?Cr=Mr.shift():Cr=Lr?pr(kr,Mr):br(kr,Mr),Cr}function pr(kr,Mr){var Lr=Mr.head,Cr=1,Er=Lr.data;for(kr-=Er.length;Lr=Lr.next;){var Ar=Lr.data,zr=kr>Ar.length?Ar.length:kr;if(zr===Ar.length?Er+=Ar:Er+=Ar.slice(0,kr),kr-=zr,kr===0){zr===Ar.length?(++Cr,Lr.next?Mr.head=Lr.next:Mr.head=Mr.tail=null):(Mr.head=Lr,Lr.data=Ar.slice(zr));break}++Cr}return Mr.length-=Cr,Er}function br(kr,Mr){var Lr=qt.allocUnsafe(kr),Cr=Mr.head,Er=1;for(Cr.data.copy(Lr),kr-=Cr.data.length;Cr=Cr.next;){var Ar=Cr.data,zr=kr>Ar.length?Ar.length:kr;if(Ar.copy(Lr,Lr.length-kr,0,zr),kr-=zr,kr===0){zr===Ar.length?(++Er,Cr.next?Mr.head=Cr.next:Mr.head=Mr.tail=null):(Mr.head=Cr,Cr.data=Ar.slice(zr));break}++Er}return Mr.length-=Er,Lr}function Dr(kr){var Mr=kr._readableState;if(Mr.length>0)throw new Error('"endReadable()" called on non-empty stream');Mr.endEmitted||(Mr.ended=!0,yt.nextTick(_r,Mr,kr))}function _r(kr,Mr){!kr.endEmitted&&kr.length===0&&(kr.endEmitted=!0,Mr.readable=!1,Mr.emit("end"))}function Nr(kr,Mr){for(var Lr=0,Cr=kr.length;Lr<Cr;Lr++)if(kr[Lr]===Mr)return Lr;return-1}return _stream_readable}var _stream_transform,hasRequired_stream_transform;function require_stream_transform(){if(hasRequired_stream_transform)return _stream_transform;hasRequired_stream_transform=1,_stream_transform=Ft;var yt=require_stream_duplex(),_e=Object.create(requireUtil());_e.inherits=requireInherits_browser(),_e.inherits(Ft,yt);function $t(zt,Ht){var Kt=this._transformState;Kt.transforming=!1;var Gt=Kt.writecb;if(!Gt)return this.emit("error",new Error("write callback called multiple times"));Kt.writechunk=null,Kt.writecb=null,Ht!=null&&this.push(Ht),Gt(zt);var Jt=this._readableState;Jt.reading=!1,(Jt.needReadable||Jt.length<Jt.highWaterMark)&&this._read(Jt.highWaterMark)}function Ft(zt){if(!(this instanceof Ft))return new Ft(zt);yt.call(this,zt),this._transformState={afterTransform:$t.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,zt&&(typeof zt.transform=="function"&&(this._transform=zt.transform),typeof zt.flush=="function"&&(this._flush=zt.flush)),this.on("prefinish",Vt)}function Vt(){var zt=this;typeof this._flush=="function"?this._flush(function(Ht,Kt){qt(zt,Ht,Kt)}):qt(this,null,null)}Ft.prototype.push=function(zt,Ht){return this._transformState.needTransform=!1,yt.prototype.push.call(this,zt,Ht)},Ft.prototype._transform=function(zt,Ht,Kt){throw new Error("_transform() is not implemented")},Ft.prototype._write=function(zt,Ht,Kt){var Gt=this._transformState;if(Gt.writecb=Kt,Gt.writechunk=zt,Gt.writeencoding=Ht,!Gt.transforming){var Jt=this._readableState;(Gt.needTransform||Jt.needReadable||Jt.length<Jt.highWaterMark)&&this._read(Jt.highWaterMark)}},Ft.prototype._read=function(zt){var Ht=this._transformState;Ht.writechunk!==null&&Ht.writecb&&!Ht.transforming?(Ht.transforming=!0,this._transform(Ht.writechunk,Ht.writeencoding,Ht.afterTransform)):Ht.needTransform=!0},Ft.prototype._destroy=function(zt,Ht){var Kt=this;yt.prototype._destroy.call(this,zt,function(Gt){Ht(Gt),Kt.emit("close")})};function qt(zt,Ht,Kt){if(Ht)return zt.emit("error",Ht);if(Kt!=null&&zt.push(Kt),zt._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(zt._transformState.transforming)throw new Error("Calling transform done when still transforming");return zt.push(null)}return _stream_transform}var _stream_passthrough,hasRequired_stream_passthrough;function require_stream_passthrough(){if(hasRequired_stream_passthrough)return _stream_passthrough;hasRequired_stream_passthrough=1,_stream_passthrough=$t;var yt=require_stream_transform(),_e=Object.create(requireUtil());_e.inherits=requireInherits_browser(),_e.inherits($t,yt);function $t(Ft){if(!(this instanceof $t))return new $t(Ft);yt.call(this,Ft)}return $t.prototype._transform=function(Ft,Vt,qt){qt(null,Ft)},_stream_passthrough}var hasRequiredReadableBrowser;function requireReadableBrowser(){return hasRequiredReadableBrowser||(hasRequiredReadableBrowser=1,function(yt,_e){_e=yt.exports=require_stream_readable(),_e.Stream=_e,_e.Readable=_e,_e.Writable=require_stream_writable(),_e.Duplex=require_stream_duplex(),_e.Transform=require_stream_transform(),_e.PassThrough=require_stream_passthrough()}(readableBrowser,readableBrowser.exports)),readableBrowser.exports}var sign$1={exports:{}},bn$2={exports:{}};bn$2.exports;var hasRequiredBn$2;function requireBn$2(){return hasRequiredBn$2||(hasRequiredBn$2=1,function(yt){(function(_e,$t){function Ft(or,Qt){if(!or)throw new Error(Qt||"Assertion failed")}function Vt(or,Qt){or.super_=Qt;var ir=function(){};ir.prototype=Qt.prototype,or.prototype=new ir,or.prototype.constructor=or}function qt(or,Qt,ir){if(qt.isBN(or))return or;this.negative=0,this.words=null,this.length=0,this.red=null,or!==null&&((Qt==="le"||Qt==="be")&&(ir=Qt,Qt=10),this._init(or||0,Qt||10,ir||"be"))}typeof _e=="object"?_e.exports=qt:$t.BN=qt,qt.BN=qt,qt.wordSize=2
vendor: 14,124 bytes, line 1491
14916;var zt;try{typeof window<"u"&&typeof window.Buffer<"u"?zt=window.Buffer:zt=require$$1$2.Buffer}catch{}qt.isBN=function(Qt){return Qt instanceof qt?!0:Qt!==null&&typeof Qt=="object"&&Qt.constructor.wordSize===qt.wordSize&&Array.isArray(Qt.words)},qt.max=function(Qt,ir){return Qt.cmp(ir)>0?Qt:ir},qt.min=function(Qt,ir){return Qt.cmp(ir)<0?Qt:ir},qt.prototype._init=function(Qt,ir,ur){if(typeof Qt=="number")return this._initNumber(Qt,ir,ur);if(typeof Qt=="object")return this._initArray(Qt,ir,ur);ir==="hex"&&(ir=16),Ft(ir===(ir|0)&&ir>=2&&ir<=36),Qt=Qt.toString().replace(/\s+/g,"");var gr=0;Qt[0]==="-"&&(gr++,this.negative=1),gr<Qt.length&&(ir===16?this._parseHex(Qt,gr,ur):(this._parseBase(Qt,ir,gr),ur==="le"&&this._initArray(this.toArray(),ir,ur)))},qt.prototype._initNumber=function(Qt,ir,ur){Qt<0&&(this.negative=1,Qt=-Qt),Qt<67108864?(this.words=[Qt&67108863],this.length=1):Qt<4503599627370496?(this.words=[Qt&67108863,Qt/67108864&67108863],this.length=2):(Ft(Qt<9007199254740992),this.words=[Qt&67108863,Qt/67108864&67108863,1],this.length=3),ur==="le"&&this._initArray(this.toArray(),ir,ur)},qt.prototype._initArray=function(Qt,ir,ur){if(Ft(typeof Qt.length=="number"),Qt.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Qt.length/3),this.words=new Array(this.length);for(var gr=0;gr<this.length;gr++)this.words[gr]=0;var dr,lr,hr=0;if(ur==="be")for(gr=Qt.length-1,dr=0;gr>=0;gr-=3)lr=Qt[gr]|Qt[gr-1]<<8|Qt[gr-2]<<16,this.words[dr]|=lr<<hr&67108863,this.words[dr+1]=lr>>>26-hr&67108863,hr+=24,hr>=26&&(hr-=26,dr++);else if(ur==="le")for(gr=0,dr=0;gr<Qt.length;gr+=3)lr=Qt[gr]|Qt[gr+1]<<8|Qt[gr+2]<<16,this.words[dr]|=lr<<hr&67108863,this.words[dr+1]=lr>>>26-hr&67108863,hr+=24,hr>=26&&(hr-=26,dr++);return this._strip()};function Ht(or,Qt){var ir=or.charCodeAt(Qt);if(ir>=48&&ir<=57)return ir-48;if(ir>=65&&ir<=70)return ir-55;if(ir>=97&&ir<=102)return ir-87;Ft(!1,"Invalid character in "+or)}function Kt(or,Qt,ir){var ur=Ht(or,ir);return ir-1>=Qt&&(ur|=Ht(or,ir-1)<<4),ur}qt.prototype._parseHex=function(Qt,ir,ur){this.length=Math.ceil((Qt.length-ir)/6),this.words=new Array(this.length);for(var gr=0;gr<this.length;gr++)this.words[gr]=0;var dr=0,lr=0,hr;if(ur==="be")for(gr=Qt.length-1;gr>=ir;gr-=2)hr=Kt(Qt,ir,gr)<<dr,this.words[lr]|=hr&67108863,dr>=18?(dr-=18,lr+=1,this.words[lr]|=hr>>>26):dr+=8;else{var wr=Qt.length-ir;for(gr=wr%2===0?ir+1:ir;gr<Qt.length;gr+=2)hr=Kt(Qt,ir,gr)<<dr,this.words[lr]|=hr&67108863,dr>=18?(dr-=18,lr+=1,this.words[lr]|=hr>>>26):dr+=8}this._strip()};function Gt(or,Qt,ir,ur){for(var gr=0,dr=0,lr=Math.min(or.length,ir),hr=Qt;hr<lr;hr++){var wr=or.charCodeAt(hr)-48;gr*=ur,wr>=49?dr=wr-49+10:wr>=17?dr=wr-17+10:dr=wr,Ft(wr>=0&&dr<ur,"Invalid character"),gr+=dr}return gr}qt.prototype._parseBase=function(Qt,ir,ur){this.words=[0],this.length=1;for(var gr=0,dr=1;dr<=67108863;dr*=ir)gr++;gr--,dr=dr/ir|0;for(var lr=Qt.length-ur,hr=lr%gr,wr=Math.min(lr,lr-hr)+ur,pr=0,br=ur;br<wr;br+=gr)pr=Gt(Qt,br,br+gr,ir),this.imuln(dr),this.words[0]+pr<67108864?this.words[0]+=pr:this._iaddn(pr);if(hr!==0){var Dr=1;for(pr=Gt(Qt,br,Qt.length,ir),br=0;br<hr;br++)Dr*=ir;this.imuln(Dr),this.words[0]+pr<67108864?this.words[0]+=pr:this._iaddn(pr)}this._strip()},qt.prototype.copy=function(Qt){Qt.words=new Array(this.length);for(var ir=0;ir<this.length;ir++)Qt.words[ir]=this.words[ir];Qt.length=this.length,Qt.negative=this.negative,Qt.red=this.red};function Jt(or,Qt){or.words=Qt.words,or.length=Qt.length,or.negative=Qt.negative,or.red=Qt.red}if(qt.prototype._move=function(Qt){Jt(Qt,this)},qt.prototype.clone=function(){var Qt=new qt(null);return this.copy(Qt),Qt},qt.prototype._expand=function(Qt){for(;this.length<Qt;)this.words[this.length++]=0;return this},qt.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},qt.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{qt.prototype[Symbol.for("nodejs.util.inspect.custom")]=Xt}catch{qt.prototype.inspect=Xt}else qt.prototype.inspect=Xt;function Xt(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var Zt=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],er=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],tr=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];qt.prototype.toString=function(Qt,ir){Qt=Qt||10,ir=ir|0||1;var ur;if(Qt===16||Qt==="hex"){ur="";for(var gr=0,dr=0,lr=0;lr<this.length;lr++){var hr=this.words[lr],wr=((hr<<gr|dr)&16777215).toString(16);dr=hr>>>24-gr&16777215,gr+=2,gr>=26&&(gr-=26,lr--),dr!==0||lr!==this.length-1?ur=Zt[6-wr.length]+wr+ur:ur=wr+ur}for(dr!==0&&(ur=dr.toString(16)+ur);ur.length%ir!==0;)ur="0"+ur;return this.negative!==0&&(ur="-"+ur),ur}if(Qt===(Qt|0)&&Qt>=2&&Qt<=36){var pr=er[Qt],br=tr[Qt];ur="";var Dr=this.clone();for(Dr.negative=0;!Dr.isZero();){var _r=Dr.modrn(br).toString(Qt);Dr=Dr.idivn(br),Dr.isZero()?ur=_r+ur:ur=Zt[pr-_r.length]+_r+ur}for(this.isZero()&&(ur="0"+ur);ur.length%ir!==0;)ur="0"+ur;return this.negative!==0&&(ur="-"+ur),ur}Ft(!1,"Base should be between 2 and 36")},qt.prototype.toNumber=function(){var Qt=this.words[0];return this.length===2?Qt+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Qt+=4503599627370496+this.words[1]*67108864:this.length>2&&Ft(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Qt:Qt},qt.prototype.toJSON=function(){return this.toString(16,2)},zt&&(qt.prototype.toBuffer=function(Qt,ir){return this.toArrayLike(zt,Qt,ir)}),qt.prototype.toArray=function(Qt,ir){return this.toArrayLike(Array,Qt,ir)};var rr=function(Qt,ir){return Qt.allocUnsafe?Qt.allocUnsafe(ir):new Qt(ir)};qt.prototype.toArrayLike=function(Qt,ir,ur){this._strip();var gr=this.byteLength(),dr=ur||Math.max(1,gr);Ft(gr<=dr,"byte array longer than desired length"),Ft(dr>0,"Requested array length <= 0");var lr=rr(Qt,dr),hr=ir==="le"?"LE":"BE";return this["_toArrayLike"+hr](lr,gr),lr},qt.prototype._toArrayLikeLE=function(Qt,ir){for(var ur=0,gr=0,dr=0,lr=0;dr<this.length;dr++){var hr=this.words[dr]<<lr|gr;Qt[ur++]=hr&255,ur<Qt.length&&(Qt[ur++]=hr>>8&255),ur<Qt.length&&(Qt[ur++]=hr>>16&255),lr===6?(ur<Qt.length&&(Qt[ur++]=hr>>24&255),gr=0,lr=0):(gr=hr>>>24,lr+=2)}if(ur<Qt.length)for(Qt[ur++]=gr;ur<Qt.length;)Qt[ur++]=0},qt.prototype._toArrayLikeBE=function(Qt,ir){for(var ur=Qt.length-1,gr=0,dr=0,lr=0;dr<this.length;dr++){var hr=this.words[dr]<<lr|gr;Qt[ur--]=hr&255,ur>=0&&(Qt[ur--]=hr>>8&255),ur>=0&&(Qt[ur--]=hr>>16&255),lr===6?(ur>=0&&(Qt[ur--]=hr>>24&255),gr=0,lr=0):(gr=hr>>>24,lr+=2)}if(ur>=0)for(Qt[ur--]=gr;ur>=0;)Qt[ur--]=0},Math.clz32?qt.prototype._countBits=function(Qt){return 32-Math.clz32(Qt)}:qt.prototype._countBits=function(Qt){var ir=Qt,ur=0;return ir>=4096&&(ur+=13,ir>>>=13),ir>=64&&(ur+=7,ir>>>=7),ir>=8&&(ur+=4,ir>>>=4),ir>=2&&(ur+=2,ir>>>=2),ur+ir},qt.prototype._zeroBits=function(Qt){if(Qt===0)return 26;var ir=Qt,ur=0;return ir&8191||(ur+=13,ir>>>=13),ir&127||(ur+=7,ir>>>=7),ir&15||(ur+=4,ir>>>=4),ir&3||(ur+=2,ir>>>=2),ir&1||ur++,ur},qt.prototype.bitLength=function(){var Qt=this.words[this.length-1],ir=this._countBits(Qt);return(this.length-1)*26+ir};function ar(or){for(var Qt=new Array(or.bitLength()),ir=0;ir<Qt.length;ir++){var ur=ir/26|0,gr=ir%26;Qt[ir]=or.words[ur]>>>gr&1}return Qt}qt.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Qt=0,ir=0;ir<this.length;ir++){var ur=this._zeroBits(this.words[ir]);if(Qt+=ur,ur!==26)break}return Qt},qt.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},qt.prototype.toTwos=function(Qt){return this.negative!==0?this.abs().inotn(Qt).iaddn(1):this.clone()},qt.prototype.fromTwos=function(Qt){return this.testn(Qt-1)?this.notn(Qt).iaddn(1).ineg():this.clone()},qt.prototype.isNeg=function(){return this.negative!==0},qt.prototype.neg=function(){return this.clone().ineg()},qt.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},qt.prototype.iuor=function(Qt){for(;this.length<Qt.length;)this.words[this.length++]=0;for(var ir=0;ir<Qt.length;ir++)this.words[ir]=this.words[ir]|Qt.words[ir];return this._strip()},qt.prototype.ior=function(Qt){return Ft((this.negative|Qt.negative)===0),this.iuor(Qt)},qt.prototype.or=function(Qt){return this.length>Qt.length?this.clone().ior(Qt):Qt.clone().ior(this)},qt.prototype.uor=function(Qt){return this.length>Qt.length?this.clone().iuor(Qt):Qt.clone().iuor(this)},qt.prototype.iuand=function(Qt){var ir;this.length>Qt.length?ir=Qt:ir=this;for(var ur=0;ur<ir.length;ur++)this.words[ur]=this.words[ur]&Qt.words[ur];return this.length=ir.length,this._strip()},qt.prototype.iand=function(Qt){return Ft((this.negative|Qt.negative)===0),this.iuand(Qt)},qt.prototype.and=function(Qt){return this.length>Qt.length?this.clone().iand(Qt):Qt.clone().iand(this)},qt.prototype.uand=function(Qt){return this.length>Qt.length?this.clone().iuand(Qt):Qt.clone().iuand(this)},qt.prototype.iuxor=function(Qt){var ir,ur;this.length>Qt.length?(ir=this,ur=Qt):(ir=Qt,ur=this);for(var gr=0;gr<ur.length;gr++)this.words[gr]=ir.words[gr]^ur.words[gr];if(this!==ir)for(;gr<ir.length;gr++)this.words[gr]=ir.words[gr];return this.length=ir.length,this._strip()},qt.prototype.ixor=function(Qt){return Ft((this.negative|Qt.negative)===0),this.iuxor(Qt)},qt.prototype.xor=function(Qt){return this.length>Qt.length?this.clone().ixor(Qt):Qt.clone().ixor(this)},qt.prototype.uxor=function(Qt){return this.length>Qt.length?this.clone().iuxor(Qt):Qt.clone().iuxor(this)},qt.prototype.inotn=function(Qt){Ft(typeof Qt=="number"&&Qt>=0);var ir=Math.ceil(Qt/26)|0,ur=Qt%26;this._expand(ir),ur>0&&ir--;for(var gr=0;gr<ir;gr++)this.words[gr]=~this.words[gr]&67108863;return ur>0&&(this.words[gr]=~this.words[gr]&67108863>>26-ur),this._strip()},qt.prototype.notn=function(Qt){return this.clone().inotn(Qt)},qt.prototype.setn=function(Qt,ir){Ft(typeof Qt=="number"&&Qt>=0);var ur=Qt/26|0,gr=Qt%26;return this._expand(ur+1),ir?this.words[ur]=this.words[ur]|1<<gr:this.words[ur]=this.words[ur]&~(1<<gr),this._strip()},qt.prototype.iadd=function(Qt){var ir;if(this.negative!==0&&Qt.negative===0)return this.negative=0,ir=this.isub(Qt),this.negative^=1,this._normSign();if(this.negative===0&&Qt.negative!==0)return Qt.negative=0,ir=this.isub(Qt),Qt.negative=1,ir._normSign();var ur,gr;this.length>Qt.length?(ur=this,gr=Qt):(ur=Qt,gr=this);for(var dr=0,lr=0;lr<gr.length;lr++)ir=(ur.words[lr]|0)+(gr.words[lr]|0)+dr,this.words[lr]=ir&67108863,dr=ir>>>26;for(;dr!==0&&lr<ur.length;lr++)ir=(ur.words[lr]|0)+dr,this.words[lr]=ir&67108863,dr=ir>>>26;if(this.length=ur.length,dr!==0)this.words[this.length]=dr,this.length++;else if(ur!==this)for(;lr<ur.length;lr++)this.words[lr]=ur.words[lr];return this},qt.prototype.add=function(Qt){var ir;return Qt.negative!==0&&this.negative===0?(Qt.negative=0,ir=this.sub(Qt),Qt.negative^=1,ir):Qt.negative===0&&this.negative!==0?(this.negative=0,ir=Qt.sub(this),this.negative=1,ir):this.length>Qt.length?this.clone().iadd(Qt):Qt.clone().iadd(this)},qt.prototype.isub=function(Qt){if(Qt.negative!==0){Qt.negative=0;var ir=this.iadd(Qt);return Qt.negative=1,ir._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Qt),this.negative=1,this._normSign();var ur=this.cmp(Qt);if(ur===0)return this.negative=0,this.length=1,this.words[0]=0,this;var gr,dr;ur>0?(gr=this,dr=Qt):(gr=Qt,dr=this);for(var lr=0,hr=0;hr<dr.length;hr++)ir=(gr.words[hr]|0)-(dr.words[hr]|0)+lr,lr=ir>>26,this.words[hr]=ir&67108863;for(;lr!==0&&hr<gr.length;hr++)ir=(gr.words[hr]|0)+lr,lr=ir>>26,this.words[hr]=ir&67108863;if(lr===0&&hr<gr.length&&gr!==this)for(;hr<gr.length;hr++)this.words[hr]=gr.words[hr];return this.length=Math.max(this.length,hr),gr!==this&&(this.negative=1),this._strip()},qt.prototype.sub=function(Qt){return this.clone().isub(Qt)};function nr(or,Qt,ir){ir.negative=Qt.negative^or.negative;var ur=or.length+Qt.length|0;ir.length=ur,ur=ur-1|0;var gr=or.words[0]|0,dr=Qt.words[0]|0,lr=gr*dr,hr=lr&67108863,wr=lr/67108864|0;ir.words[0]=hr;for(var pr=1;pr<ur;pr++){for(var br=wr>>>26,Dr=wr&67108863,_r=Math.min(pr,Qt.length-1),Nr=Math.max(0,pr-or.length+1);Nr<=_r;Nr++){var kr=pr-Nr|0;gr=or.words[kr]|0,dr=Qt.words[Nr]|0,lr=gr*dr+Dr,br+=lr/67108864|0,Dr=lr&67108863}ir.words[pr]=Dr|0,wr=br|0}return wr!==0?ir.words[pr]=wr|0:ir.length--,ir._strip()}var cr=function(Qt,ir,ur){var gr=Qt.words,dr=ir.words,lr=ur.words,hr=0,wr,pr,br,Dr=gr[0]|0,_r=Dr&8191,Nr=Dr>>>13,kr=gr[1]|0,Mr=kr&8191,Lr=kr>>>13,Cr=gr[2]|0,Er=Cr&8191,Ar=Cr>>>13,zr=gr[3]|0,Vr=zr&8191,Gr=zr>>>13,tn=gr[4]|0,Yr=tn&8191,Jr=tn>>>13,Kr=gr[5]|0,Xr=Kr&8191,Qr=Kr>>>13,un=gr[6]|0,an=un&8191,sn=un>>>13,vn=gr[7]|0,gn=vn&8191,fn=vn>>>13,wn=gr[8]|0,dn=wn&8191,Ur=wn>>>13,Ir=gr[9]|0,Pr=Ir&8191,Fr=Ir>>>13,Zr=dr[0]|0,en=Zr&8191,rn=Zr>>>13,En=dr[1]|0,$n=En&8191,mn=En>>>13,Fn=dr[2]|0,_n=Fn&8191,kn=Fn>>>13,Qn=dr[3]|0,Ln=Qn&8191,Cn=Qn>>>13,ro=dr[4]|0,qn=ro&8191,Pn=ro>>>13,ao=dr[5]|0,zn=ao&8191,Mn=ao>>>13,so=dr[6]|0,Or=so&8191,qr=so>>>13,Hr=dr[7]|0,$r=Hr&8191,Wr=Hr>>>13,cn=dr[8]|0,on=cn&8191,ln=cn>>>13,Sn=dr[9]|0,An=Sn&8191,yn=Sn>>>13;ur.negative=Qt.negative^ir.negative,ur.length=19,wr=Math.imul(_r,en),pr=Math.imul(_r,rn),pr=pr+Math.imul(Nr,en)|0,br=Math.imul(Nr,rn);var Zn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Zn>>>26)|0,Zn&=67108863,wr=Math.imul(Mr,en),pr=Math.imul(Mr,rn),pr=pr+Math.imul(Lr,en)|0,br=Math.imul(Lr,rn),wr=wr+Math.imul(_r,$n)|0,pr=pr+Math.imul(_r,mn)|0,pr=pr+Math.imul(Nr,$n)|0,br=br+Math.imul(Nr,mn)|0;var On=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(On>>>
149126)|0,On&=67108863,wr=Math.imul(Er,en),pr=Math.imul(Er,rn),pr=pr+Math.imul(Ar,en)|0,br=Math.imul(Ar,rn),wr=wr+Math.imul(Mr,$n)|0,pr=pr+Math.imul(Mr,mn)|0,pr=pr+Math.imul(Lr,$n)|0,br=br+Math.imul(Lr,mn)|0,wr=wr+Math.imul(_r,_n)|0,pr=pr+Math.imul(_r,kn)|0,pr=pr+Math.imul(Nr,_n)|0,br=br+Math.imul(Nr,kn)|0;var Wn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,wr=Math.imul(Vr,en),pr=Math.imul(Vr,rn),pr=pr+Math.imul(Gr,en)|0,br=Math.imul(Gr,rn),wr=wr+Math.imul(Er,$n)|0,pr=pr+Math.imul(Er,mn)|0,pr=pr+Math.imul(Ar,$n)|0,br=br+Math.imul(Ar,mn)|0,wr=wr+Math.imul(Mr,_n)|0,pr=pr+Math.imul(Mr,kn)|0,pr=pr+Math.imul(Lr,_n)|0,br=br+Math.imul(Lr,kn)|0,wr=wr+Math.imul(_r,Ln)|0,pr=pr+Math.imul(_r,Cn)|0,pr=pr+Math.imul(Nr,Ln)|0,br=br+Math.imul(Nr,Cn)|0;var Hn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Hn>>>26)|0,Hn&=67108863,wr=Math.imul(Yr,en),pr=Math.imul(Yr,rn),pr=pr+Math.imul(Jr,en)|0,br=Math.imul(Jr,rn),wr=wr+Math.imul(Vr,$n)|0,pr=pr+Math.imul(Vr,mn)|0,pr=pr+Math.imul(Gr,$n)|0,br=br+Math.imul(Gr,mn)|0,wr=wr+Math.imul(Er,_n)|0,pr=pr+Math.imul(Er,kn)|0,pr=pr+Math.imul(Ar,_n)|0,br=br+Math.imul(Ar,kn)|0,wr=wr+Math.imul(Mr,Ln)|0,pr=pr+Math.imul(Mr,Cn)|0,pr=pr+Math.imul(Lr,Ln)|0,br=br+Math.imul(Lr,Cn)|0,wr=wr+Math.imul(_r,qn)|0,pr=pr+Math.imul(_r,Pn)|0,pr=pr+Math.imul(Nr,qn)|0,br=br+Math.imul(Nr,Pn)|0;var Gn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Gn>>>26)|0,Gn&=67108863,wr=Math.imul(Xr,en),pr=Math.imul(Xr,rn),pr=pr+Math.imul(Qr,en)|0,br=Math.imul(Qr,rn
1491),wr=wr+Math.imul(Yr,$n)|0,pr=pr+Math.imul(Yr,mn)|0,pr=pr+Math.imul(Jr,$n)|0,br=br+Math.imul(Jr,mn)|0,wr=wr+Math.imul(Vr,_n)|0,pr=pr+Math.imul(Vr,kn)|0,pr=pr+Math.imul(Gr,_n)|0,br=br+Math.imul(Gr,kn)|0,wr=wr+Math.imul(Er,Ln)|0,pr=pr+Math.imul(Er,Cn)|0,pr=pr+Math.imul(Ar,Ln)|0,br=br+Math.imul(Ar,Cn)|0,wr=wr+Math.imul(Mr,qn)|0,pr=pr+Math.imul(Mr,Pn)|0,pr=pr+Math.imul(Lr,qn)|0,br=br+Math.imul(Lr,Pn)|0,wr=wr+Math.imul(_r,zn)|0,pr=pr+Math.imul(_r,Mn)|0,pr=pr+Math.imul(Nr,zn)|0,br=br+Math.imul(Nr,Mn)|0;var Xn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Xn>>>26)|0,Xn&=67108863,wr=Math.imul(an,en),pr=Math.imul(an,rn),pr=pr+Math.imul(sn,en)|0,br=Math.imul(sn,rn),wr=wr+Math.imul(Xr,$n)|0,pr=pr+Math.imul(Xr,mn)|0,pr=pr+Math.imul(Qr,$n)|0,br=br+Math.imul(Qr,mn)|0,wr=wr+Math.imul(Yr,_n)|0,pr=pr+Math.imul(Yr,kn)|0,pr=pr+Math.imul(Jr,_n)|0,br=br+Math.imul(Jr,kn)|0,wr=wr+Math.imul(Vr,Ln)|0,pr=pr+Math.imul(Vr,Cn)|0,pr=pr+Math.imul(Gr,Ln)|0,br=br+Math.imul(Gr,Cn)|0,wr=wr+Math.imul(Er,qn)|0,pr=pr+Math.imul(Er,Pn)|0,pr=pr+Math.imul(Ar,qn)|0,br=br+Math.imul(Ar,Pn)|0,wr=wr+Math.imul(Mr,zn)|0,pr=pr+Math.imul(Mr,Mn)|0,pr=pr+Math.imul(Lr,zn)|0,br=br+Math.imul(Lr,Mn)|0,wr=wr+Math.imul(_r,Or)|0,pr=pr+Math.imul(_r,qr)|0,pr=pr+Math.imul(Nr,Or)|0,br=br+Math.imul(Nr,qr)|0;var Kn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Kn>>>26)|0,Kn&=67108863,wr=Math.imul(gn,en),pr=Math.imul(gn,rn),pr=pr+Math.imul(fn,en)|0,br=Math.imul(fn,rn),wr=wr+Math.imul(an,$n)|0,pr=pr+Math.imul(an,mn)|0,pr=pr+Math.imul(sn,$n)|0,br=br+Math.imul(sn,mn)|0,wr=wr+Math.imul(Xr,_n)|0,pr=pr+Math.imul(Xr,kn)|0,pr=pr+Math.imul(Qr,_n)|0,br=br+Math.imul(Qr,kn)|0,wr=wr+Math.imul(Yr,Ln)|0,pr=pr+Math.imul(Yr,Cn)|0,pr=pr+Math.imul(Jr,Ln)|0,br=br+Math.imul(Jr,Cn)|0,wr=wr+Math.imul(Vr,qn)|0,pr=pr+Math.imul(Vr,Pn)|0,pr=pr+Math.imul(Gr,qn)|0,br=br+Math.imul(Gr,Pn)|0,wr=wr+Math.imul(Er,zn)|0,pr=pr+Math.imul(Er,Mn)|0,pr=pr+Math.imul(Ar,zn)|0,br=br+Math.imul(Ar,Mn)|0,wr=wr+Math.imul(Mr,Or)|0,pr=pr+Math.imul(Mr,qr)|0,pr=pr+Math.imul(Lr,Or)|0,br=br+Math.imul(Lr,qr)|0,wr=wr+Math.imul(_r,$r)|0,pr=pr+Math.imul(_r,Wr)|0,pr=pr+Math.imul(Nr,$r)|0,br=br+Math.imul(Nr,Wr)|0;var Jn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Jn>>>26)|0,Jn&=67108863,wr=Math.imul(dn,en),pr=Math.imul(dn,rn),pr=pr+Math.imul(Ur,en)|0,br=Math.imul(Ur,rn),wr=wr+Math.imul(gn,$n)|0,pr=pr+Math.imul(gn,mn)|0,pr=pr+Math.imul(fn,$n)|0,br=br+Math.imul(fn,mn)|0,wr=wr+Math.imul(an,_n)|0,pr=pr+Math.imul(an,kn)|0,pr=pr+Math.imul(sn,_n)|0,br=br+Math.imul(sn,kn)|0,wr=wr+Math.imul(Xr,Ln)|0,pr=pr+Math.imul(Xr,Cn)|0,pr=pr+Math.imul(Qr,Ln)|0,br=br+Math.imul(Qr,Cn)|0,wr=wr+Math.imul(Yr,qn)|0,pr=pr+Math.imul(Yr,Pn)|0,pr=pr+Math.imul(Jr,qn)|0,br=br+Math.imul(Jr,Pn)|0,wr=wr+Math.imul(Vr,zn)|0,pr=pr+Math.imul(Vr,Mn)|0,pr=pr+Math.imul(Gr,zn)|0,br=br+Math.imul(Gr,Mn)|0,wr=wr+Math.imul(Er,Or)|0,pr=pr+Math.imul(Er,qr)|0,pr=pr+Math.imul(Ar,Or)|0,br=br+Math.imul(Ar,qr)|0,wr=wr+Math.imul(Mr,$r)|0,pr=pr+Math.imul(Mr,Wr)|0,pr=pr+Math.imul(Lr,$r)|0,br=br+Math.imul(Lr,Wr)|0,wr=wr+Math.imul(_r,on)|0,pr=pr+Math.imul(_r,ln)|0,pr=pr+Math.imul(Nr,on)|0,br=br+Math.imul(Nr,ln)|0;var Yn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Yn>>>26)|0,Yn&=67108863,wr=Math.imul(Pr,en),pr=Math.imul(Pr,rn),pr=pr+Math.imul(Fr,en)|0,br=Math.imul(Fr,rn),wr=wr+Math.imul(dn,$n)|0,pr=pr+Math.imul(dn,mn)|0,pr=pr+Math.imul(Ur,$n)|0,br=br+Math.imul(Ur,mn)|0,wr=wr+Math.imul(gn,_n)|0,pr=pr+Math.imul(gn,kn)|0,pr=pr+Math.imul(fn,_n)|0,br=br+Math.imul(fn,kn)|0,wr=wr+Math.imul(an,Ln)|0,pr=pr+Math.imul(an,Cn)|0,pr=pr+Math.imul(sn,Ln)|0,br=br+Math.imul(sn,Cn)|0,wr=wr+Math.imul(Xr,qn)|0,pr=pr+Math.imul(Xr,Pn)|0,pr=pr+Math.imul(Qr,qn)|0,br=br+Math.imul(Qr,Pn)|0,wr=wr+Math.imul(Yr,zn)|0,pr=pr+Math.imul(Yr,Mn)|0,pr=pr+Math.imul(Jr,zn)|0,br=br+Math.imul(Jr,Mn)|0,wr=wr+Math.imul(Vr,Or)|0,pr=pr+Math.imul(Vr,qr)|0,pr=pr+Math.imul(Gr,Or)|0,br=br+Math.imul(Gr,qr)|0,wr=wr+Math.imul(Er,$r)|0,pr=pr+Math.imul(Er,Wr)|0,pr=pr+Math.imul(Ar,$r)|0,br=br+Math.imul(Ar,Wr)|0,wr=wr+Math.imul(Mr,on)|0,pr=pr+Math.imul(Mr,ln)|0,pr=pr+Math.imul(Lr,on)|0,br=br+Math.imul(Lr,ln)|0,wr=wr+Math.imul(_r,An)|0,pr=pr+Math.imul(_r,yn)|0,pr=pr+Math.imul(Nr,An)|0,br=br+Math.imul(Nr,yn)|0;var Nn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,wr=Math.imul(Pr,$n),pr=Math.imul(Pr,mn),pr=pr+Math.imul(Fr,$n)|0,br=Math.imul(Fr,mn),wr=wr+Math.imul(dn,_n)|0,pr=pr+Math.imul(dn,kn)|0,pr=pr+Math.imul(Ur,_n)|0,br=br+Math.imul(Ur,kn)|0,wr=wr+Math.imul(gn,Ln)|0,pr=pr+Math.imul(gn,Cn)|0,pr=pr+Math.imul(fn,Ln)|0,br=br+Math.imul(fn,Cn)|0,wr=wr+Math.imul(an,qn)|0,pr=pr+Math.imul(an,Pn)|0,pr=pr+Math.imul(sn,qn)|0,br=br+Math.imul(sn,Pn)|0,wr=wr+Math.imul(Xr,zn)|0,pr=pr+Math.imul(Xr,Mn)|0,pr=pr+Math.imul(Qr,zn)|0,br=br+Math.imul(Qr,Mn)|0,wr=wr+Math.imul(Yr,Or)|0,pr=pr+Math.imul(Yr,qr)|0,pr=pr+Math.imul(Jr,Or)|0,br=br+Math.imul(Jr,qr)|0,wr=wr+Math.imul(Vr,$r)|0,pr=pr+Math.imul(Vr,Wr)|0,pr=pr+Math.imul(Gr,$r)|0,br=br+Math.imul(Gr,Wr)|0,wr=wr+Math.imul(Er,on)|0,pr=pr+Math.imul(Er,ln)|0,pr=pr+Math.imul(Ar,on)|0,br=br+Math.imul(Ar,ln)|0,wr=wr+Math.imul(Mr,An)|0,pr=pr+Math.imul(Mr,yn)|0,pr=pr+Math.imul(Lr,An)|0,br=br+Math.imul(Lr,yn)|0;var Vn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Vn>>>26)|0,Vn&=67108863,wr=Math.imul(Pr,_n),pr=Math.imul(Pr,kn),pr=pr+Math.imul(Fr,_n)|0,br=Math.imul(Fr,kn),wr=wr+Math.imul(dn,Ln)|0,pr=pr+Math.imul(dn,Cn)|0,pr=pr+Math.imul(Ur,Ln)|0,br=br+Math.imul(Ur,Cn)|0,wr=wr+Math.imul(gn,qn)|0,pr=pr+Math.imul(gn,Pn)|0,pr=pr+Math.imul(fn,qn)|0,br=br+Math.imul(fn,Pn)|0,wr=wr+Math.imul(an,zn
vendor: 23,202 bytes, line 1491
1491)|0,pr=pr+Math.imul(an,Mn)|0,pr=pr+Math.imul(sn,zn)|0,br=br+Math.imul(sn,Mn)|0,wr=wr+Math.imul(Xr,Or)|0,pr=pr+Math.imul(Xr,qr)|0,pr=pr+Math.imul(Qr,Or)|0,br=br+Math.imul(Qr,qr)|0,wr=wr+Math.imul(Yr,$r)|0,pr=pr+Math.imul(Yr,Wr)|0,pr=pr+Math.imul(Jr,$r)|0,br=br+Math.imul(Jr,Wr)|0,wr=wr+Math.imul(Vr,on)|0,pr=pr+Math.imul(Vr,ln)|0,pr=pr+Math.imul(Gr,on)|0,br=br+Math.imul(Gr,ln)|0,wr=wr+Math.imul(Er,An)|0,pr=pr+Math.imul(Er,yn)|0,pr=pr+Math.imul(Ar,An)|0,br=br+Math.imul(Ar,yn)|0;var Dn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Dn>>>26)|0,Dn&=67108863,wr=Math.imul(Pr,Ln),pr=Math.imul(Pr,Cn),pr=pr+Math.imul(Fr,Ln)|0,br=Math.imul(Fr,Cn),wr=wr+Math.imul(dn,qn)|0,pr=pr+Math.imul(dn,Pn)|0,pr=pr+Math.imul(Ur,qn)|0,br=br+Math.imul(Ur,Pn)|0,wr=wr+Math.imul(gn,zn)|0,pr=pr+Math.imul(gn,Mn)|0,pr=pr+Math.imul(fn,zn)|0,br=br+Math.imul(fn,Mn)|0,wr=wr+Math.imul(an,Or)|0,pr=pr+Math.imul(an,qr)|0,pr=pr+Math.imul(sn,Or)|0,br=br+Math.imul(sn,qr)|0,wr=wr+Math.imul(Xr,$r)|0,pr=pr+Math.imul(Xr,Wr)|0,pr=pr+Math.imul(Qr,$r)|0,br=br+Math.imul(Qr,Wr)|0,wr=wr+Math.imul(Yr,on)|0,pr=pr+Math.imul(Yr,ln)|0,pr=pr+Math.imul(Jr,on)|0,br=br+Math.imul(Jr,ln)|0,wr=wr+Math.imul(Vr,An)|0,pr=pr+Math.imul(Vr,yn)|0,pr=pr+Math.imul(Gr,An)|0,br=br+Math.imul(Gr,yn)|0;var jn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(jn>>>26)|0,jn&=67108863,wr=Math.imul(Pr,qn),pr=Math.imul(Pr,Pn),pr=pr+Math.imul(Fr,qn)|0,br=Math.imul(Fr,Pn),wr=wr+Math.imul(dn,zn)|0,pr=pr+Math.imul(dn,Mn)|0,pr=pr+Math.imul(Ur,zn)|0,br=br+Math.imul(Ur,Mn)|0,wr=wr+Math.imul(gn,Or)|0,pr=pr+Math.imul(gn,qr)|0,pr=pr+Math.imul(fn,Or)|0,br=br+Math.imul(fn,qr)|0,wr=wr+Math.imul(an,$r)|0,pr=pr+Math.imul(an,Wr)|0,pr=pr+Math.imul(sn,$r)|0,br=br+Math.imul(sn,Wr)|0,wr=wr+Math.imul(Xr,on)|0,pr=pr+Math.imul(Xr,ln)|0,pr=pr+Math.imul(Qr,on)|0,br=br+Math.imul(Qr,ln)|0,wr=wr+Math.imul(Yr,An)|0,pr=pr+Math.imul(Yr,yn)|0,pr=pr+Math.imul(Jr,An)|0,br=br+Math.imul(Jr,yn)|0;var Un=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Un>>>26)|0,Un&=67108863,wr=Math.imul(Pr,zn),pr=Math.imul(Pr,Mn),pr=pr+Math.imul(Fr,zn)|0,br=Math.imul(Fr,Mn),wr=wr+Math.imul(dn,Or)|0,pr=pr+Math.imul(dn,qr)|0,pr=pr+Math.imul(Ur,Or)|0,br=br+Math.imul(Ur,qr)|0,wr=wr+Math.imul(gn,$r)|0,pr=pr+Math.imul(gn,Wr)|0,pr=pr+Math.imul(fn,$r)|0,br=br+Math.imul(fn,Wr)|0,wr=wr+Math.imul(an,on)|0,pr=pr+Math.imul(an,ln)|0,pr=pr+Math.imul(sn,on)|0,br=br+Math.imul(sn,ln)|0,wr=wr+Math.imul(Xr,An)|0,pr=pr+Math.imul(Xr,yn)|0,pr=pr+Math.imul(Qr,An)|0,br=br+Math.imul(Qr,yn)|0;var Bn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Bn>>>26)|0,Bn&=67108863,wr=Math.imul(Pr,Or),pr=Math.imul(Pr,qr),pr=pr+Math.imul(Fr,Or)|0,br=Math.imul(Fr,qr),wr=wr+Math.imul(dn,$r)|0,pr=pr+Math.imul(dn,Wr)|0,pr=pr+Math.imul(Ur,$r)|0,br=br+Math.imul(Ur,Wr)|0,wr=wr+Math.imul(gn,on)|0,pr=pr+Math.imul(gn,ln)|0,pr=pr+Math.imul(fn,on)|0,br=br+Math.imul(fn,ln)|0,wr=wr+Math.imul(an,An)|0,pr=pr+Math.imul(an,yn)|0,pr=pr+Math.imul(sn,An)|0,br=br+Math.imul(sn,yn)|0;var hn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(hn>>>26)|0,hn&=67108863,wr=Math.imul(Pr,$r),pr=Math.imul(Pr,Wr),pr=pr+Math.imul(Fr,$r)|0,br=Math.imul(Fr,Wr),wr=wr+Math.imul(dn,on)|0,pr=pr+Math.imul(dn,ln)|0,pr=pr+Math.imul(Ur,on)|0,br=br+Math.imul(Ur,ln)|0,wr=wr+Math.imul(gn,An)|0,pr=pr+Math.imul(gn,yn)|0,pr=pr+Math.imul(fn,An)|0,br=br+Math.imul(fn,yn)|0;var pn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(pn>>>26)|0,pn&=67108863,wr=Math.imul(Pr,on),pr=Math.imul(Pr,ln),pr=pr+Math.imul(Fr,on)|0,br=Math.imul(Fr,ln),wr=wr+Math.imul(dn,An)|0,pr=pr+Math.imul(dn,yn)|0,pr=pr+Math.imul(Ur,An)|0,br=br+Math.imul(Ur,yn)|0;var Tn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Tn>>>26)|0,Tn&=67108863,wr=Math.imul(Pr,An),pr=Math.imul(Pr,yn),pr=pr+Math.imul(Fr,An)|0,br=Math.imul(Fr,yn);var xn=(hr+wr|0)+((pr&8191)<<13)|0;return hr=(br+(pr>>>13)|0)+(xn>>>26)|0,xn&=67108863,lr[0]=Zn,lr[1]=On,lr[2]=Wn,lr[3]=Hn,lr[4]=Gn,lr[5]=Xn,lr[6]=Kn,lr[7]=Jn,lr[8]=Yn,lr[9]=Nn,lr[10]=Vn,lr[11]=Dn,lr[12]=jn,lr[13]=Un,lr[14]=Bn,lr[15]=hn,lr[16]=pn,lr[17]=Tn,lr[18]=xn,hr!==0&&(lr[19]=hr,ur.length++),ur};Math.imul||(cr=nr);function fr(or,Qt,ir){ir.negative=Qt.negative^or.negative,ir.length=or.length+Qt.length;for(var ur=0,gr=0,dr=0;dr<ir.length-1;dr++){var lr=gr;gr=0;for(var hr=ur&67108863,wr=Math.min(dr,Qt.length-1),pr=Math.max(0,dr-or.length+1);pr<=wr;pr++){var br=dr-pr,Dr=or.words[br]|0,_r=Qt.words[pr]|0,Nr=Dr*_r,kr=Nr&67108863;lr=lr+(Nr/67108864|0)|0,kr=kr+hr|0,hr=kr&67108863,lr=lr+(kr>>>26)|0,gr+=lr>>>26,lr&=67108863}ir.words[dr]=hr,ur=lr,lr=gr}return ur!==0?ir.words[dr]=ur:ir.length--,ir._strip()}function vr(or,Qt,ir){return fr(or,Qt,ir)}qt.prototype.mulTo=function(Qt,ir){var ur,gr=this.length+Qt.length;return this.length===10&&Qt.length===10?ur=cr(this,Qt,ir):gr<63?ur=nr(this,Qt,ir):gr<1024?ur=fr(this,Qt,ir):ur=vr(this,Qt,ir),ur},qt.prototype.mul=function(Qt){var ir=new qt(null);return ir.words=new Array(this.length+Qt.length),this.mulTo(Qt,ir)},qt.prototype.mulf=function(Qt){var ir=new qt(null);return ir.words=new Array(this.length+Qt.length),vr(this,Qt,ir)},qt.prototype.imul=function(Qt){return this.clone().mulTo(Qt,this)},qt.prototype.imuln=function(Qt){var ir=Qt<0;ir&&(Qt=-Qt),Ft(typeof Qt=="number"),Ft(Qt<67108864);for(var ur=0,gr=0;gr<this.length;gr++){var dr=(this.words[gr]|0)*Qt,lr=(dr&67108863)+(ur&67108863);ur>>=26,ur+=dr/67108864|0,ur+=lr>>>26,this.words[gr]=lr&67108863}return ur!==0&&(this.words[gr]=ur,this.length++),this.length=Qt===0?1:this.length,ir?this.ineg():this},qt.prototype.muln=function(Qt){return this.clone().imuln(Qt)},qt.prototype.sqr=function(){return this.mul(this)},qt.prototype.isqr=function(){return this.imul(this.clone())},qt.prototype.pow=function(Qt){var ir=ar(Qt);if(ir.length===0)return new qt(1);for(var ur=this,gr=0;gr<ir.length&&ir[gr]===0;gr++,ur=ur.sqr());if(++gr<ir.length)for(var dr=ur.sqr();gr<ir.length;gr++,dr=dr.sqr())ir[gr]!==0&&(ur=ur.mul(dr));return ur},qt.prototype.iushln=function(Qt){Ft(typeof Qt=="number"&&Qt>=0);var ir=Qt%26,ur=(Qt-ir)/26,gr=67108863>>>26-ir<<26-ir,dr;if(ir!==0){var lr=0;for(dr=0;dr<this.length;dr++){var hr=this.words[dr]&gr,wr=(this.words[dr]|0)-hr<<ir;this.words[dr]=wr|lr,lr=hr>>>26-ir}lr&&(this.words[dr]=lr,this.length++)}if(ur!==0){for(dr=this.length-1;dr>=0;dr--)this.words[dr+ur]=this.words[dr];for(dr=0;dr<ur;dr++)this.words[dr]=0;this.length+=ur}return this._strip()},qt.prototype.ishln=function(Qt){return Ft(this.negative===0),this.iushln(Qt)},qt.prototype.iushrn=function(Qt,ir,ur){Ft(typeof Qt=="number"&&Qt>=0);var gr;ir?gr=(ir-ir%26)/26:gr=0;var dr=Qt%26,lr=Math.min((Qt-dr)/26,this.length),hr=67108863^67108863>>>dr<<dr,wr=ur;if(gr-=lr,gr=Math.max(0,gr),wr){for(var pr=0;pr<lr;pr++)wr.words[pr]=this.words[pr];wr.length=lr}if(lr!==0)if(this.length>lr)for(this.length-=lr,pr=0;pr<this.length;pr++)this.words[pr]=this.words[pr+lr];else this.words[0]=0,this.length=1;var br=0;for(pr=this.length-1;pr>=0&&(br!==0||pr>=gr);pr--){var Dr=this.words[pr]|0;this.words[pr]=br<<26-dr|Dr>>>dr,br=Dr&hr}return wr&&br!==0&&(wr.words[wr.length++]=br),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},qt.prototype.ishrn=function(Qt,ir,ur){return Ft(this.negative===0),this.iushrn(Qt,ir,ur)},qt.prototype.shln=function(Qt){return this.clone().ishln(Qt)},qt.prototype.ushln=function(Qt){return this.clone().iushln(Qt)},qt.prototype.shrn=function(Qt){return this.clone().ishrn(Qt)},qt.prototype.ushrn=function(Qt){return this.clone().iushrn(Qt)},qt.prototype.testn=function(Qt){Ft(typeof Qt=="number"&&Qt>=0);var ir=Qt%26,ur=(Qt-ir)/26,gr=1<<ir;if(this.length<=ur)return!1;var dr=this.words[ur];return!!(dr&gr)},qt.prototype.imaskn=function(Qt){Ft(typeof Qt=="number"&&Qt>=0);var ir=Qt%26,ur=(Qt-ir)/26;if(Ft(this.negative===0,"imaskn works only with positive numbers"),this.length<=ur)return this;if(ir!==0&&ur++,this.length=Math.min(ur,this.length),ir!==0){var gr=67108863^67108863>>>ir<<ir;this.words[this.length-1]&=gr}return this._strip()},qt.prototype.maskn=function(Qt){return this.clone().imaskn(Qt)},qt.prototype.iaddn=function(Qt){return Ft(typeof Qt=="number"),Ft(Qt<67108864),Qt<0?this.isubn(-Qt):this.negative!==0?this.length===1&&(this.words[0]|0)<=Qt?(this.words[0]=Qt-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(Qt),this.negative=1,this):this._iaddn(Qt)},qt.prototype._iaddn=function(Qt){this.words[0]+=Qt;for(var ir=0;ir<this.length&&this.words[ir]>=67108864;ir++)this.words[ir]-=67108864,ir===this.length-1?this.words[ir+1]=1:this.words[ir+1]++;return this.length=Math.max(this.length,ir+1),this},qt.prototype.isubn=function(Qt){if(Ft(typeof Qt=="number"),Ft(Qt<67108864),Qt<0)return this.iaddn(-Qt);if(this.negative!==0)return this.negative=0,this.iaddn(Qt),this.negative=1,this;if(this.words[0]-=Qt,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var ir=0;ir<this.length&&this.words[ir]<0;ir++)this.words[ir]+=67108864,this.words[ir+1]-=1;return this._strip()},qt.prototype.addn=function(Qt){return this.clone().iaddn(Qt)},qt.prototype.subn=function(Qt){return this.clone().isubn(Qt)},qt.prototype.iabs=function(){return this.negative=0,this},qt.prototype.abs=function(){return this.clone().iabs()},qt.prototype._ishlnsubmul=function(Qt,ir,ur){var gr=Qt.length+ur,dr;this._expand(gr);var lr,hr=0;for(dr=0;dr<Qt.length;dr++){lr=(this.words[dr+ur]|0)+hr;var wr=(Qt.words[dr]|0)*ir;lr-=wr&67108863,hr=(lr>>26)-(wr/67108864|0),this.words[dr+ur]=lr&67108863}for(;dr<this.length-ur;dr++)lr=(this.words[dr+ur]|0)+hr,hr=lr>>26,this.words[dr+ur]=lr&67108863;if(hr===0)return this._strip();for(Ft(hr===-1),hr=0,dr=0;dr<this.length;dr++)lr=-(this.words[dr]|0)+hr,hr=lr>>26,this.words[dr]=lr&67108863;return this.negative=1,this._strip()},qt.prototype._wordDiv=function(Qt,ir){var ur=this.length-Qt.length,gr=this.clone(),dr=Qt,lr=dr.words[dr.length-1]|0,hr=this._countBits(lr);ur=26-hr,ur!==0&&(dr=dr.ushln(ur),gr.iushln(ur),lr=dr.words[dr.length-1]|0);var wr=gr.length-dr.length,pr;if(ir!=="mod"){pr=new qt(null),pr.length=wr+1,pr.words=new Array(pr.length);for(var br=0;br<pr.length;br++)pr.words[br]=0}var Dr=gr.clone()._ishlnsubmul(dr,1,wr);Dr.negative===0&&(gr=Dr,pr&&(pr.words[wr]=1));for(var _r=wr-1;_r>=0;_r--){var Nr=(gr.words[dr.length+_r]|0)*67108864+(gr.words[dr.length+_r-1]|0);for(Nr=Math.min(Nr/lr|0,67108863),gr._ishlnsubmul(dr,Nr,_r);gr.negative!==0;)Nr--,gr.negative=0,gr._ishlnsubmul(dr,1,_r),gr.isZero()||(gr.negative^=1);pr&&(pr.words[_r]=Nr)}return pr&&pr._strip(),gr._strip(),ir!=="div"&&ur!==0&&gr.iushrn(ur),{div:pr||null,mod:gr}},qt.prototype.divmod=function(Qt,ir,ur){if(Ft(!Qt.isZero()),this.isZero())return{div:new qt(0),mod:new qt(0)};var gr,dr,lr;return this.negative!==0&&Qt.negative===0?(lr=this.neg().divmod(Qt,ir),ir!=="mod"&&(gr=lr.div.neg()),ir!=="div"&&(dr=lr.mod.neg(),ur&&dr.negative!==0&&dr.iadd(Qt)),{div:gr,mod:dr}):this.negative===0&&Qt.negative!==0?(lr=this.divmod(Qt.neg(),ir),ir!=="mod"&&(gr=lr.div.neg()),{div:gr,mod:lr.mod}):this.negative&Qt.negative?(lr=this.neg().divmod(Qt.neg(),ir),ir!=="div"&&(dr=lr.mod.neg(),ur&&dr.negative!==0&&dr.isub(Qt)),{div:lr.div,mod:dr}):Qt.length>this.length||this.cmp(Qt)<0?{div:new qt(0),mod:this}:Qt.length===1?ir==="div"?{div:this.divn(Qt.words[0]),mod:null}:ir==="mod"?{div:null,mod:new qt(this.modrn(Qt.words[0]))}:{div:this.divn(Qt.words[0]),mod:new qt(this.modrn(Qt.words[0]))}:this._wordDiv(Qt,ir)},qt.prototype.div=function(Qt){return this.divmod(Qt,"div",!1).div},qt.prototype.mod=function(Qt){return this.divmod(Qt,"mod",!1).mod},qt.prototype.umod=function(Qt){return this.divmod(Qt,"mod",!0).mod},qt.prototype.divRound=function(Qt){var ir=this.divmod(Qt);if(ir.mod.isZero())return ir.div;var ur=ir.div.negative!==0?ir.mod.isub(Qt):ir.mod,gr=Qt.ushrn(1),dr=Qt.andln(1),lr=ur.cmp(gr);return lr<0||dr===1&&lr===0?ir.div:ir.div.negative!==0?ir.div.isubn(1):ir.div.iaddn(1)},qt.prototype.modrn=function(Qt){var ir=Qt<0;ir&&(Qt=-Qt),Ft(Qt<=67108863);for(var ur=(1<<26)%Qt,gr=0,dr=this.length-1;dr>=0;dr--)gr=(ur*gr+(this.words[dr]|0))%Qt;return ir?-gr:gr},qt.prototype.modn=function(Qt){return this.modrn(Qt)},qt.prototype.idivn=function(Qt){var ir=Qt<0;ir&&(Qt=-Qt),Ft(Qt<=67108863);for(var ur=0,gr=this.length-1;gr>=0;gr--){var dr=(this.words[gr]|0)+ur*67108864;this.words[gr]=dr/Qt|0,ur=dr%Qt}return this._strip(),ir?this.ineg():this},qt.prototype.divn=function(Qt){return this.clone().idivn(Qt)},qt.prototype.egcd=function(Qt){Ft(Qt.negative===0),Ft(!Qt.isZero());var ir=this,ur=Qt.clone();ir.negative!==0?ir=ir.umod(Qt):ir=ir.clone();for(var gr=new qt(1),dr=new qt(0),lr=new qt(0),hr=new qt(1),wr=0;ir.isEven()&&ur.isEven();)ir.iushrn(1),ur.iushrn(1),++wr;for(var pr=ur.clone(),br=ir.clone();!ir.isZero();){for(var Dr=0,_r=1;!(ir.words[0]&_r)&&Dr<26;++Dr,_r<<=1);if(Dr>0)for(ir.iushrn(Dr);Dr-- >0;)(gr.isOdd()||dr.isOdd())&&(gr.iadd(pr),dr.isub(br)),gr.iushrn(1),dr.iushrn(1);for(var Nr=0,kr=1;!(ur.words[0]&kr)&&Nr<26;++Nr,kr<<=1);if(Nr>0)for(ur.iushrn(Nr);Nr-- >0;)(lr.isOdd()||hr.isOdd())&&(lr.iadd(pr),hr.isub(br)),lr.iushrn(1),hr.iushrn(1);ir.cmp(ur)>=0?(ir.isub(ur),gr.isub(lr),dr.isub(hr)):(ur.isub(ir),lr.isub(gr),hr.isub(dr))}return{a:lr,b:hr,gcd:ur.iushln(wr)}},qt.prototype._invmp=function(Qt){Ft(Qt.negative===0),Ft(!Qt.isZero());var ir=this,ur=Qt.clone();ir.negative!==0?ir=ir.umod(Qt):ir=ir.clone();for(var gr=new qt(1),dr=new qt(0),lr=ur.clone();ir.cmpn(1)>0&&ur.cmpn(1)>0;){for(var hr=0,wr=1;!(ir.words[0]&wr)&&hr<26;++hr,wr<<=1);if(hr>0)for(ir.iushrn(hr);hr-- >0;)gr.isOdd()&&gr.iadd(lr),gr.iushrn(1);for(var pr=0,br=1;!(ur.words[0]&br)&&pr<26;++pr,br<<=1);if(pr>0)for(ur.iushrn(pr);pr-- >0;)dr.isOdd()&&dr.iadd(lr),dr.iushrn(1);ir.cmp(ur)>=0?(ir.isub(ur),gr.isub(dr)):(ur.isub(ir),dr.isub(gr))}var Dr;return ir.cmpn(1)===0?Dr=gr:Dr=dr,Dr.cmpn(0)<0&&Dr.iadd(Qt),Dr},qt.prototype.gcd=function(Qt){if(this.isZero())return Qt.abs();if(Qt.isZero())return this.abs();var ir=this.clone(),ur=Qt.clone();ir.negative=0,ur.negative=0;for(var gr=0;ir.isEven()&&ur.isEven();gr++)ir.iushrn(1),ur.iushrn(1);do{for(;ir.isEven();)ir.iushrn(1);for(;ur.isEven();)ur.iushrn(1);var dr=ir.cmp(ur);if(dr<0){var lr=ir;ir=ur,ur=lr}else if(dr===0||ur.cmpn(1)===0)break;ir.isub(ur)}while(!0);return ur.iushln(gr)},qt.prototype.invm=function(Qt){return this.egcd(Qt).a.umod(Qt)},qt.prototype.isEven=function(){return(this.words[0]&1)===0},qt.prototype.isOdd=function(){return(this.words[0]&1)===1},qt.prototype.andln=function(Qt){return this.words[0]&Qt},qt.prototype.bincn=function(Qt){Ft(typeof Qt=="number");var ir=Qt%26,ur=(Qt-ir)/26,gr=1<<ir;if(this.length<=ur)return this._expand(ur+1),this.words[ur]|=gr,this;for(var dr=gr,lr=ur;dr!==0&&lr<this.length;lr++){var hr=this.words[lr]|0;hr+=dr,dr=hr>>>26,hr&=67108863,this.words[lr]=hr}return dr!==0&&(this.words[lr]=dr,this.length++),this},qt.prototype.isZero=function(){return this.length===1&&this.words[0]===0},qt.prototype.cmpn=function(Qt){var ir=Qt<0;if(this.negative!==0&&!ir)return-1;if(this.negative===0&&ir)return 1;this._strip();var ur;if(this.length>1)ur=1;else{ir&&(Qt=-Qt),Ft(Qt<=67108863,"Number is too big");var gr=this.words[0]|0;ur=gr===Qt?0:gr<Qt?-1:1}return this.negative!==0?-ur|0:ur},qt.prototype.cmp=function(Qt){if(this.negative!==0&&Qt.negative===0)return-1;if(this.negative===0&&Qt.negative!==0)return 1;var ir=this.ucmp(Qt);return this.negative!==0?-ir|0:ir},qt.prototype.ucmp=function(Qt){if(this.length>Qt.length)return 1;if(this.length<Qt.length)return-1;for(var ir=0,ur=this.length-1;ur>=0;ur--){var gr=this.words[ur]|0,dr=Qt.words[ur]|0;if(gr!==dr){gr<dr?ir=-1:gr>dr&&(ir=1);break}}return ir},qt.prototype.gtn=function(Qt){return this.cmpn(Qt)===1},qt.prototype.gt=function(Qt){return this.cmp(Qt)===1},qt.prototype.gten=function(Qt){return this.cmpn(Qt)>=0},qt.prototype.gte=function(Qt){return this.cmp(Qt)>=0},qt.prototype.ltn=function(Qt){return this.cmpn(Qt)===-1},qt.prototype.lt=function(Qt){return this.cmp(Qt)===-1},qt.prototype.lten=function(Qt){return this.cmpn(Qt)<=0},qt.prototype.lte=function(Qt){return this.cmp(Qt)<=0},qt.prototype.eqn=function(Qt){return this.cmpn(Qt)===0},qt.prototype.eq=function(Qt){return this.cmp(Qt)===0},qt.red=function(Qt){return new yr(Qt)},qt.prototype.toRed=function(Qt){return Ft(!this.red,"Already a number in reduction context"),Ft(this.negative===0,"red works only with positives"),Qt.convertTo(this)._forceRed(Qt)},qt.prototype.fromRed=function(){return Ft(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},qt.prototype._forceRed=function(Qt){return this.red=Qt,this},qt.prototype.forceRed=function(Qt){return Ft(!this.red,"Already a number in reduction context"),this._forceRed(Qt)},qt.prototype.redAdd=function(Qt){return Ft(this.red,"redAdd works only with red numbers"),this.red.add(this,Qt)},qt.prototype.redIAdd=function(Qt){return Ft(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Qt)},qt.prototype.redSub=function(Qt){return Ft(this.red,"redSub works only with red numbers"),this.red.sub(this,Qt)},qt.prototype.redISub=function(Qt){return Ft(this.red,"redISub works only with red numbers"),this.red.isub(this,Qt)},qt.prototype.redShl=function(Qt){return Ft(this.red,"redShl works only with red numbers"),this.red.shl(this,Qt)},qt.prototype.redMul=function(Qt){return Ft(this.red,"redMul works only with red numbers"),this.red._verify2(this,Qt),this.red.mul(this,Qt)},qt.prototype.redIMul=function(Qt){return Ft(this.red,"redMul works only with red numbers"),this.red._verify2(this,Qt),this.red.imul(this,Qt)},qt.prototype.redSqr=function(){return Ft(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},qt.prototype.redISqr=function(){return Ft(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},qt.prototype.redSqrt=function(){return Ft(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},qt.prototype.redInvm=function(){return Ft(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},qt.prototype.redNeg=function(){return Ft(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},qt.prototype.redPow=function(Qt){return Ft(this.red&&!Qt.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Qt)};var xr={k256:null,p224:null,p192:null,p25519:null};function Sr(or,Qt){this.name=or,this.p=new qt(Qt,16),this.n=this.p.bitLength(),this.k=new qt(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Sr.prototype._tmp=function(){var Qt=new qt(null);return Qt.words=new Array(Math.ceil(this.n/13)),Qt},Sr.prototype.ireduce=function(Qt){var ir=Qt,ur;do this.split(ir,this.tmp),ir=this.imulK(ir),ir=ir.iadd(this.tmp),ur=ir.bitLength();while(ur>this.n);var gr=ur<this.n?-1:ir.ucmp(this.p);return gr===0?(ir.words[0]=0,ir.length=1):gr>0?ir.isub(this.p):ir.strip!==void 0?ir.strip():ir._strip(),ir},Sr.prototype.split=function(Qt,ir){Qt.iushrn(this.n,0,ir)},Sr.prototype.imulK=function(Qt){return Qt.imul(this.k)};function Tr(){Sr.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}Vt(Tr,Sr),Tr.prototype.split=function(Qt,ir){for(var ur=4194303,gr=Math.min(Qt.length,9),dr=0;dr<gr;dr++)ir.words[dr]=Qt.words[dr];if(ir.length=gr,Qt.length<=9){Qt.words[0]=0,Qt.length=1;return}var lr=Qt.words[9];for(ir.words[ir.length++]=lr&ur,dr=10;dr<Qt.length;dr++){var hr=Qt.words[dr]|0;Qt.words[dr-10]=(hr&ur)<<4|lr>>>22,lr=hr}lr>>>=22,Qt.words[dr-10]=lr,lr===0&&Qt.length>10?Qt.length-=10:Qt.length-=9},Tr.prototype.imulK=function(Qt){Qt.words[Qt.length]=0,Qt.words[Qt.length+1]=0,Qt.length+=2;for(var ir=0,ur=0;ur<Qt.length;ur++){var gr=Qt.words[ur]|0;ir+=gr*977,Qt.words[ur]=ir&67108863,ir=gr*64+(ir/67108864|0)}return Qt.words[Qt.length-1]===0&&(Qt.length--,Qt.words[Qt.length-1]===0&&Qt.length--),Qt};function Br(){Sr.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}Vt(Br,Sr);function jr(){Sr.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}Vt(jr,Sr);function Rr(){Sr.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}Vt(Rr,Sr),Rr.prototype.imulK=function(Qt){for(var ir=0,ur=0;ur<Qt.length;ur++){var gr=(Qt.words[ur]|0)*19+ir,dr=gr&67108863;gr>>>=26,Qt.words[ur]=dr,ir=gr}return ir!==0&&(Qt.words[Qt.length++]=ir),Qt},qt._prime=function(Qt){if(xr[Qt])return xr[Qt];var ir;if(Qt==="k256")ir=new Tr;else if(Qt==="p224")ir=new Br;else if(Qt==="p192")ir=new jr;else if(Qt==="p25519")ir=new Rr;else throw new Error("Unknown prime "+Qt);return xr[Qt]=ir,ir};function yr(or){if(typeof or=="string"){var Qt=qt._prime(or);this.m=Qt.p,this.prime=Qt}else Ft(or.gtn(1),"modulus must be greater than 1"),this.m=or,this.prime=null}yr.prototype._verify1=function(Qt){Ft(Qt.negative===0,"red works only with positives"),Ft(Qt.red,"red works only with red numbers")},yr.prototype._verify2=function(Qt,ir){Ft((Qt.negative|ir.negative)===0,"red works only with positives"),Ft(Qt.red&&Qt.red===ir.red,"red works only with red numbers")},yr.prototype.imod=function(Qt){return this.prime?this.prime.ireduce(Qt)._forceRed(this):(Jt(Qt,Qt.umod(this.m)._forceRed(this)),Qt)},yr.prototype.neg=function(Qt){return Qt.isZero()?Qt.clone():this.m.sub(Qt)._forceRed(this)},yr.prototype.add=function(Qt,ir){this._verify2(Qt,ir);var ur=Qt.add(ir);return ur.cmp(this.m)>=0&&ur.isub(this.m),ur._forceRed(this)},yr.prototype.iadd=function(Qt,ir){this._verify2(Qt,ir);var ur=Qt.iadd(ir);return ur.cmp(this.m)>=0&&ur.isub(this.m),ur},yr.prototype.sub=function(Qt,ir){this._verify2(Qt,ir);var ur=Qt.sub(ir);return ur.cmpn(0)<0&&ur.iadd(this.m),ur._forceRed(this)},yr.prototype.isub=function(Qt,ir){this._verify2(Qt,ir);var ur=Qt.isub(ir);return ur.cmpn(0)<0&&ur.iadd(this.m),ur},yr.prototype.shl=function(Qt,ir){return this._verify1(Qt),this.imod(Qt.ushln(ir))},yr.prototype.imul=function(Qt,ir){return this._verify2(Qt,ir),this.imod(Qt.imul(ir))},yr.prototype.mul=function(Qt,ir){return this._verify2(Qt,ir),this.imod(Qt.mul(ir))},yr.prototype.isqr=function(Qt){return this.imul(Qt,Qt.clone())},yr.prototype.sqr=function(Qt){return this.mul(Qt,Qt)},yr.prototype.sqrt=function(Qt){if(Qt.isZero())return Qt.clone();var ir=this.m.andln(3);if(Ft(ir%2===1),ir===3){var ur=this.m.add(new qt(1)).iushrn(2);return this.pow(Qt,ur)}for(var gr=this.m.subn(1),dr=0;!gr.isZero()&&gr.andln(1)===0;)dr++,gr.iushrn(1);Ft(!gr.isZero());var lr=new qt(1).toRed(this),hr=lr.redNeg(),wr=this.m.subn(1).iushrn(1),pr=this.m.bitLength();for(pr=new qt(2*pr*pr).toRed(this);this.pow(pr,wr).cmp(hr)!==0;)pr.redIAdd(hr);for(var br=this.pow(pr,gr),Dr=this.pow(Qt,gr.addn(1).iushrn(1)),_r=this.pow(Qt,gr),Nr=dr;_r.cmp(lr)!==0;){for(var kr=_r,Mr=0;kr.cmp(lr)!==0;Mr++)kr=kr.redSqr();Ft(Mr<Nr);var Lr=this.pow(br,new qt(1).iushln(Nr-Mr-1));Dr=Dr.redMul(Lr),br=Lr.redSqr(),_r=_r.redMul(br),Nr=Mr}return Dr},yr.prototype.invm=function(Qt){var ir=Qt._invmp(this.m);return ir.negative!==0?(ir.negative=0,this.imod(ir).redNeg()):this.imod(ir)},yr.prototype.pow=function(Qt,ir){if(ir.isZero())return new qt(1).toRed(this);if(ir.cmpn(1)===0)return Qt.clone();var ur=4,gr=new Array(1<<ur);gr[0]=new qt(1).toRed(this),gr[1]=Qt;for(var dr=2;dr<gr.length;dr++)gr[dr]=this.mul(gr[dr-1],Qt);var lr=gr[0],hr=0,wr=0,pr=ir.bitLength()%26;
1491for(pr===0&&(pr=26),dr=ir.length-1;dr>=0;dr--){for(var br=ir.words[dr],Dr=pr-1;Dr>=0;Dr--){var _r=br>>Dr&1;if(lr!==gr[0]&&(lr=this.sqr(lr)),_r===0&&hr===0){wr=0;continue}hr<<=1,hr|=_r,wr++,!(wr!==ur&&(dr!==0||Dr!==0))&&(lr=this.mul(lr,gr[hr]),wr=0,hr=0)}pr=26}return lr},yr.prototype.convertTo=function(Qt){var ir=Qt.umod(this.m);return ir===Qt?ir.clone():ir},yr.prototype.convertFrom=function(Qt){var ir=Qt.clone();return ir.red=null,ir},qt.mont=function(Qt){return new sr(Qt)};function sr(or){yr.call(this,or),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new qt(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}Vt(sr,yr),sr.prototype.convertTo=function(Qt){return this.imod(Qt.ushln(this.shift))},sr.prototype.convertFrom=function(Qt){var ir=this.imod(Qt.mul(this.rinv));return ir.red=null,ir},sr.prototype.imul=function(Qt,ir){if(Qt.isZero()||ir.isZero())return Qt.words[0]=0,Qt.length=1,Qt;var ur=Qt.imul(ir),gr=ur.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),dr=ur.isub(gr).iushrn(this.shift),lr=dr;return dr.cmp(this.m)>=0?lr=dr.isub(this.m):dr.cmpn(0)<0&&(lr=dr.iadd(this.m)),lr._forceRed(this)},sr.prototype.mul=function(Qt,ir){if(Qt.isZero()||ir.isZero())return new qt(0)._forceRed(this);var ur=Qt.mul(ir),gr=ur.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),dr=ur.isub(gr).iushrn(this.shift),lr=dr;return dr.cmp(this.m)>=0?lr=dr.isub(this.m):dr.cmpn(0)<0&&(lr=dr.iadd(this.m)),lr._forceRed(this)},sr.prototype.invm=function(Qt){var ir=this.imod(Qt._invmp(this.m).mul(this.r2));return ir._forceRed(this)}})(yt,commonjsGlobal)}(bn$2)),bn$2.exports}var browserifyRsa,hasRequiredBrowserifyRsa;function requireBrowserifyRsa(){if(hasRequiredBrowserifyRsa)return browserifyRsa;hasRequiredBrowserifyRsa=1;var yt=requireBn$2(),_e=requireBrowser$b(),$t=requireSafeBuffer$2().Buffer;function Ft(zt){var Ht=zt.modulus.byteLength(),Kt;do Kt=new yt(_e(Ht));while(Kt.cmp(zt.modulus)>=0||!Kt.umod(zt.prime1)||!Kt.umod(zt.prime2));return Kt}function Vt(zt){var Ht=Ft(zt),Kt=Ht.toRed(yt.mont(zt.modulus)).redPow(new yt(zt.publicExponent)).fromRed();return{blinder:Kt,unblinder:Ht.invm(zt.modulus)}}function qt(zt,Ht){var Kt=Vt(Ht),Gt=Ht.modulus.byteLength(),Jt=new yt(zt).mul(Kt.blinder).umod(Ht.modulus),Xt=Jt.toRed(yt.mont(Ht.prime1)),Zt=Jt.toRed(yt.mont(Ht.prime2)),er=Ht.coefficient,tr=Ht.prime1,rr=Ht.prime2,ar=Xt.redPow(Ht.exponent1).fromRed(),nr=Zt.redPow(Ht.exponent2).fromRed(),cr=ar.isub(nr).imul(er).umod(tr).imul(rr);return nr.iadd(cr).imul(Kt.unblinder).umod(Ht.modulus).toArrayLike($t,"be",Gt)}return qt.getr=Ft,browserifyRsa=qt,browserifyRsa}var elliptic={};const name="elliptic",version="6.6.1",description="EC cryptography",main="lib/elliptic.js",files=["lib"],scripts={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository={type:"git",url:"[email protected]:indutny/elliptic"},keywords=["EC","Elliptic","curve","Cryptography"],author="Fedor Indutny <[email protected]>",license="MIT",bugs={url:"https://github.com/indutny/elliptic/issues"},homepage="https://github.com/indutny/elliptic",devDependencies={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},require$$0$1={name,version,description,main,files,scripts,repository,keywords,author,license,bugs,homepage,devDependencies,dependencies};var utils$2={},bn$1={exports:{}};bn$1.exports;var hasRequiredBn$1;function requireBn$1(){return hasRequiredBn$1||(hasRequiredBn$1=1,function(yt){(function(_e,$t){function Ft(yr,sr){if(!yr)throw new Error(sr||"Assertion failed")}function Vt(yr,sr){yr.super_=sr;var or=function(){};or.prototype=sr.prototype,yr.prototype=new or,yr.prototype.constructor=yr}function qt(yr,sr,or){if(qt.isBN(yr))return yr;this.negative=0,this.words=null,this.length=0,this.red=null,yr!==null&&((sr==="le"||sr==="be")&&(or=sr,sr=10),this._init(yr||0,sr||10,or||"be"))}typeof _e=="object"?_e.exports=qt:$t.BN=qt,qt.BN=qt,qt.wordSize=2
vendor: 10,739 bytes, line 1491
14916;var zt;try{typeof window<"u"&&typeof window.Buffer<"u"?zt=window.Buffer:zt=require$$1$2.Buffer}catch{}qt.isBN=function(sr){return sr instanceof qt?!0:sr!==null&&typeof sr=="object"&&sr.constructor.wordSize===qt.wordSize&&Array.isArray(sr.words)},qt.max=function(sr,or){return sr.cmp(or)>0?sr:or},qt.min=function(sr,or){return sr.cmp(or)<0?sr:or},qt.prototype._init=function(sr,or,Qt){if(typeof sr=="number")return this._initNumber(sr,or,Qt);if(typeof sr=="object")return this._initArray(sr,or,Qt);or==="hex"&&(or=16),Ft(or===(or|0)&&or>=2&&or<=36),sr=sr.toString().replace(/\s+/g,"");var ir=0;sr[0]==="-"&&(ir++,this.negative=1),ir<sr.length&&(or===16?this._parseHex(sr,ir,Qt):(this._parseBase(sr,or,ir),Qt==="le"&&this._initArray(this.toArray(),or,Qt)))},qt.prototype._initNumber=function(sr,or,Qt){sr<0&&(this.negative=1,sr=-sr),sr<67108864?(this.words=[sr&67108863],this.length=1):sr<4503599627370496?(this.words=[sr&67108863,sr/67108864&67108863],this.length=2):(Ft(sr<9007199254740992),this.words=[sr&67108863,sr/67108864&67108863,1],this.length=3),Qt==="le"&&this._initArray(this.toArray(),or,Qt)},qt.prototype._initArray=function(sr,or,Qt){if(Ft(typeof sr.length=="number"),sr.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(sr.length/3),this.words=new Array(this.length);for(var ir=0;ir<this.length;ir++)this.words[ir]=0;var ur,gr,dr=0;if(Qt==="be")for(ir=sr.length-1,ur=0;ir>=0;ir-=3)gr=sr[ir]|sr[ir-1]<<8|sr[ir-2]<<16,this.words[ur]|=gr<<dr&67108863,this.words[ur+1]=gr>>>26-dr&67108863,dr+=24,dr>=26&&(dr-=26,ur++);else if(Qt==="le")for(ir=0,ur=0;ir<sr.length;ir+=3)gr=sr[ir]|sr[ir+1]<<8|sr[ir+2]<<16,this.words[ur]|=gr<<dr&67108863,this.words[ur+1]=gr>>>26-dr&67108863,dr+=24,dr>=26&&(dr-=26,ur++);return this.strip()};function Ht(yr,sr){var or=yr.charCodeAt(sr);return or>=65&&or<=70?or-55:or>=97&&or<=102?or-87:or-48&15}function Kt(yr,sr,or){var Qt=Ht(yr,or);return or-1>=sr&&(Qt|=Ht(yr,or-1)<<4),Qt}qt.prototype._parseHex=function(sr,or,Qt){this.length=Math.ceil((sr.length-or)/6),this.words=new Array(this.length);for(var ir=0;ir<this.length;ir++)this.words[ir]=0;var ur=0,gr=0,dr;if(Qt==="be")for(ir=sr.length-1;ir>=or;ir-=2)dr=Kt(sr,or,ir)<<ur,this.words[gr]|=dr&67108863,ur>=18?(ur-=18,gr+=1,this.words[gr]|=dr>>>26):ur+=8;else{var lr=sr.length-or;for(ir=lr%2===0?or+1:or;ir<sr.length;ir+=2)dr=Kt(sr,or,ir)<<ur,this.words[gr]|=dr&67108863,ur>=18?(ur-=18,gr+=1,this.words[gr]|=dr>>>26):ur+=8}this.strip()};function Gt(yr,sr,or,Qt){for(var ir=0,ur=Math.min(yr.length,or),gr=sr;gr<ur;gr++){var dr=yr.charCodeAt(gr)-48;ir*=Qt,dr>=49?ir+=dr-49+10:dr>=17?ir+=dr-17+10:ir+=dr}return ir}qt.prototype._parseBase=function(sr,or,Qt){this.words=[0],this.length=1;for(var ir=0,ur=1;ur<=67108863;ur*=or)ir++;ir--,ur=ur/or|0;for(var gr=sr.length-Qt,dr=gr%ir,lr=Math.min(gr,gr-dr)+Qt,hr=0,wr=Qt;wr<lr;wr+=ir)hr=Gt(sr,wr,wr+ir,or),this.imuln(ur),this.words[0]+hr<67108864?this.words[0]+=hr:this._iaddn(hr);if(dr!==0){var pr=1;for(hr=Gt(sr,wr,sr.length,or),wr=0;wr<dr;wr++)pr*=or;this.imuln(pr),this.words[0]+hr<67108864?this.words[0]+=hr:this._iaddn(hr)}this.strip()},qt.prototype.copy=function(sr){sr.words=new Array(this.length);for(var or=0;or<this.length;or++)sr.words[or]=this.words[or];sr.length=this.length,sr.negative=this.negative,sr.red=this.red},qt.prototype.clone=function(){var sr=new qt(null);return this.copy(sr),sr},qt.prototype._expand=function(sr){for(;this.length<sr;)this.words[this.length++]=0;return this},qt.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},qt.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},qt.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var Jt=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],Xt=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],Zt=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];qt.prototype.toString=function(sr,or){sr=sr||10,or=or|0||1;var Qt;if(sr===16||sr==="hex"){Qt="";for(var ir=0,ur=0,gr=0;gr<this.length;gr++){var dr=this.words[gr],lr=((dr<<ir|ur)&16777215).toString(16);ur=dr>>>24-ir&16777215,ir+=2,ir>=26&&(ir-=26,gr--),ur!==0||gr!==this.length-1?Qt=Jt[6-lr.length]+lr+Qt:Qt=lr+Qt}for(ur!==0&&(Qt=ur.toString(16)+Qt);Qt.length%or!==0;)Qt="0"+Qt;return this.negative!==0&&(Qt="-"+Qt),Qt}if(sr===(sr|0)&&sr>=2&&sr<=36){var hr=Xt[sr],wr=Zt[sr];Qt="";var pr=this.clone();for(pr.negative=0;!pr.isZero();){var br=pr.modn(wr).toString(sr);pr=pr.idivn(wr),pr.isZero()?Qt=br+Qt:Qt=Jt[hr-br.length]+br+Qt}for(this.isZero()&&(Qt="0"+Qt);Qt.length%or!==0;)Qt="0"+Qt;return this.negative!==0&&(Qt="-"+Qt),Qt}Ft(!1,"Base should be between 2 and 36")},qt.prototype.toNumber=function(){var sr=this.words[0];return this.length===2?sr+=this.words[1]*67108864:this.length===3&&this.words[2]===1?sr+=4503599627370496+this.words[1]*67108864:this.length>2&&Ft(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-sr:sr},qt.prototype.toJSON=function(){return this.toString(16)},qt.prototype.toBuffer=function(sr,or){return Ft(typeof zt<"u"),this.toArrayLike(zt,sr,or)},qt.prototype.toArray=function(sr,or){return this.toArrayLike(Array,sr,or)},qt.prototype.toArrayLike=function(sr,or,Qt){var ir=this.byteLength(),ur=Qt||Math.max(1,ir);Ft(ir<=ur,"byte array longer than desired length"),Ft(ur>0,"Requested array length <= 0"),this.strip();var gr=or==="le",dr=new sr(ur),lr,hr,wr=this.clone();if(gr){for(hr=0;!wr.isZero();hr++)lr=wr.andln(255),wr.iushrn(8),dr[hr]=lr;for(;hr<ur;hr++)dr[hr]=0}else{for(hr=0;hr<ur-ir;hr++)dr[hr]=0;for(hr=0;!wr.isZero();hr++)lr=wr.andln(255),wr.iushrn(8),dr[ur-hr-1]=lr}return dr},Math.clz32?qt.prototype._countBits=function(sr){return 32-Math.clz32(sr)}:qt.prototype._countBits=function(sr){var or=sr,Qt=0;return or>=4096&&(Qt+=13,or>>>=13),or>=64&&(Qt+=7,or>>>=7),or>=8&&(Qt+=4,or>>>=4),or>=2&&(Qt+=2,or>>>=2),Qt+or},qt.prototype._zeroBits=function(sr){if(sr===0)return 26;var or=sr,Qt=0;return or&8191||(Qt+=13,or>>>=13),or&127||(Qt+=7,or>>>=7),or&15||(Qt+=4,or>>>=4),or&3||(Qt+=2,or>>>=2),or&1||Qt++,Qt},qt.prototype.bitLength=function(){var sr=this.words[this.length-1],or=this._countBits(sr);return(this.length-1)*26+or};function er(yr){for(var sr=new Array(yr.bitLength()),or=0;or<sr.length;or++){var Qt=or/26|0,ir=or%26;sr[or]=(yr.words[Qt]&1<<ir)>>>ir}return sr}qt.prototype.zeroBits=function(){if(this.isZero())return 0;for(var sr=0,or=0;or<this.length;or++){var Qt=this._zeroBits(this.words[or]);if(sr+=Qt,Qt!==26)break}return sr},qt.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},qt.prototype.toTwos=function(sr){return this.negative!==0?this.abs().inotn(sr).iaddn(1):this.clone()},qt.prototype.fromTwos=function(sr){return this.testn(sr-1)?this.notn(sr).iaddn(1).ineg():this.clone()},qt.prototype.isNeg=function(){return this.negative!==0},qt.prototype.neg=function(){return this.clone().ineg()},qt.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},qt.prototype.iuor=function(sr){for(;this.length<sr.length;)this.words[this.length++]=0;for(var or=0;or<sr.length;or++)this.words[or]=this.words[or]|sr.words[or];return this.strip()},qt.prototype.ior=function(sr){return Ft((this.negative|sr.negative)===0),this.iuor(sr)},qt.prototype.or=function(sr){return this.length>sr.length?this.clone().ior(sr):sr.clone().ior(this)},qt.prototype.uor=function(sr){return this.length>sr.length?this.clone().iuor(sr):sr.clone().iuor(this)},qt.prototype.iuand=function(sr){var or;this.length>sr.length?or=sr:or=this;for(var Qt=0;Qt<or.length;Qt++)this.words[Qt]=this.words[Qt]&sr.words[Qt];return this.length=or.length,this.strip()},qt.prototype.iand=function(sr){return Ft((this.negative|sr.negative)===0),this.iuand(sr)},qt.prototype.and=function(sr){return this.length>sr.length?this.clone().iand(sr):sr.clone().iand(this)},qt.prototype.uand=function(sr){return this.length>sr.length?this.clone().iuand(sr):sr.clone().iuand(this)},qt.prototype.iuxor=function(sr){var or,Qt;this.length>sr.length?(or=this,Qt=sr):(or=sr,Qt=this);for(var ir=0;ir<Qt.length;ir++)this.words[ir]=or.words[ir]^Qt.words[ir];if(this!==or)for(;ir<or.length;ir++)this.words[ir]=or.words[ir];return this.length=or.length,this.strip()},qt.prototype.ixor=function(sr){return Ft((this.negative|sr.negative)===0),this.iuxor(sr)},qt.prototype.xor=function(sr){return this.length>sr.length?this.clone().ixor(sr):sr.clone().ixor(this)},qt.prototype.uxor=function(sr){return this.length>sr.length?this.clone().iuxor(sr):sr.clone().iuxor(this)},qt.prototype.inotn=function(sr){Ft(typeof sr=="number"&&sr>=0);var or=Math.ceil(sr/26)|0,Qt=sr%26;this._expand(or),Qt>0&&or--;for(var ir=0;ir<or;ir++)this.words[ir]=~this.words[ir]&67108863;return Qt>0&&(this.words[ir]=~this.words[ir]&67108863>>26-Qt),this.strip()},qt.prototype.notn=function(sr){return this.clone().inotn(sr)},qt.prototype.setn=function(sr,or){Ft(typeof sr=="number"&&sr>=0);var Qt=sr/26|0,ir=sr%26;return this._expand(Qt+1),or?this.words[Qt]=this.words[Qt]|1<<ir:this.words[Qt]=this.words[Qt]&~(1<<ir),this.strip()},qt.prototype.iadd=function(sr){var or;if(this.negative!==0&&sr.negative===0)return this.negative=0,or=this.isub(sr),this.negative^=1,this._normSign();if(this.negative===0&&sr.negative!==0)return sr.negative=0,or=this.isub(sr),sr.negative=1,or._normSign();var Qt,ir;this.length>sr.length?(Qt=this,ir=sr):(Qt=sr,ir=this);for(var ur=0,gr=0;gr<ir.length;gr++)or=(Qt.words[gr]|0)+(ir.words[gr]|0)+ur,this.words[gr]=or&67108863,ur=or>>>26;for(;ur!==0&&gr<Qt.length;gr++)or=(Qt.words[gr]|0)+ur,this.words[gr]=or&67108863,ur=or>>>26;if(this.length=Qt.length,ur!==0)this.words[this.length]=ur,this.length++;else if(Qt!==this)for(;gr<Qt.length;gr++)this.words[gr]=Qt.words[gr];return this},qt.prototype.add=function(sr){var or;return sr.negative!==0&&this.negative===0?(sr.negative=0,or=this.sub(sr),sr.negative^=1,or):sr.negative===0&&this.negative!==0?(this.negative=0,or=sr.sub(this),this.negative=1,or):this.length>sr.length?this.clone().iadd(sr):sr.clone().iadd(this)},qt.prototype.isub=function(sr){if(sr.negative!==0){sr.negative=0;
vendor: 3,266 bytes, line 1491
1491var or=this.iadd(sr);return sr.negative=1,or._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(sr),this.negative=1,this._normSign();var Qt=this.cmp(sr);if(Qt===0)return this.negative=0,this.length=1,this.words[0]=0,this;var ir,ur;Qt>0?(ir=this,ur=sr):(ir=sr,ur=this);for(var gr=0,dr=0;dr<ur.length;dr++)or=(ir.words[dr]|0)-(ur.words[dr]|0)+gr,gr=or>>26,this.words[dr]=or&67108863;for(;gr!==0&&dr<ir.length;dr++)or=(ir.words[dr]|0)+gr,gr=or>>26,this.words[dr]=or&67108863;if(gr===0&&dr<ir.length&&ir!==this)for(;dr<ir.length;dr++)this.words[dr]=ir.words[dr];return this.length=Math.max(this.length,dr),ir!==this&&(this.negative=1),this.strip()},qt.prototype.sub=function(sr){return this.clone().isub(sr)};function tr(yr,sr,or){or.negative=sr.negative^yr.negative;var Qt=yr.length+sr.length|0;or.length=Qt,Qt=Qt-1|0;var ir=yr.words[0]|0,ur=sr.words[0]|0,gr=ir*ur,dr=gr&67108863,lr=gr/67108864|0;or.words[0]=dr;for(var hr=1;hr<Qt;hr++){for(var wr=lr>>>26,pr=lr&67108863,br=Math.min(hr,sr.length-1),Dr=Math.max(0,hr-yr.length+1);Dr<=br;Dr++){var _r=hr-Dr|0;ir=yr.words[_r]|0,ur=sr.words[Dr]|0,gr=ir*ur+pr,wr+=gr/67108864|0,pr=gr&67108863}or.words[hr]=pr|0,lr=wr|0}return lr!==0?or.words[hr]=lr|0:or.length--,or.strip()}var rr=function(sr,or,Qt){var ir=sr.words,ur=or.words,gr=Qt.words,dr=0,lr,hr,wr,pr=ir[0]|0,br=pr&8191,Dr=pr>>>13,_r=ir[1]|0,Nr=_r&8191,kr=_r>>>13,Mr=ir[2]|0,Lr=Mr&8191,Cr=Mr>>>13,Er=ir[3]|0,Ar=Er&8191,zr=Er>>>13,Vr=ir[4]|0,Gr=Vr&8191,tn=Vr>>>13,Yr=ir[5]|0,Jr=Yr&8191,Kr=Yr>>>13,Xr=ir[6]|0,Qr=Xr&8191,un=Xr>>>13,an=ir[7]|0,sn=an&8191,vn=an>>>13,gn=ir[8]|0,fn=gn&8191,wn=gn>>>13,dn=ir[9]|0,Ur=dn&8191,Ir=dn>>>13,Pr=ur[0]|0,Fr=Pr&8191,Zr=Pr>>>13,en=ur[1]|0,rn=en&8191,En=en>>>13,$n=ur[2]|0,mn=$n&8191,Fn=$n>>>13,_n=ur[3]|0,kn=_n&8191,Qn=_n>>>13,Ln=ur[4]|0,Cn=Ln&8191,ro=Ln>>>13,qn=ur[5]|0,Pn=qn&8191,ao=qn>>>13,zn=ur[6]|0,Mn=zn&8191,so=zn>>>13,Or=ur[7]|0,qr=Or&8191,Hr=Or>>>13,$r=ur[8]|0,Wr=$r&8191,cn=$r>>>13,on=ur[9]|0,ln=on&8191,Sn=on>>>13;Qt.negative=sr.negative^or.negative,Qt.length=19,lr=Math.imul(br,Fr),hr=Math.imul(br,Zr),hr=hr+Math.imul(Dr,Fr)|0,wr=Math.imul(Dr,Zr);var An=(dr+lr|0)+((hr&8191)<<13)|0;dr=(wr+(hr>>>13)|0)+(An>>>26)|0,An&=67108863,lr=Math.imul(Nr,Fr),hr=Math.imul(Nr,Zr),hr=hr+Math.imul(kr,Fr)|0,wr=Math.imul(kr,Zr),lr=lr+Math.imul(br,rn)|0,hr=hr+Math.imul(br,En)|0,hr=hr+Math.imul(Dr,rn)|0,wr=wr+Math.imul(Dr,En)|0;var yn=(dr+lr|0)+((hr&8191)<<13)|0;dr=(wr+(hr>>>13)|0)+(yn>>>26)|0,yn&=67108863,lr=Math.imul(Lr,Fr),hr=Math.imul(Lr,Zr),hr=hr+Math.imul(Cr,Fr)|0,wr=Math.imul(Cr,Zr),lr=lr+Math.imul(Nr,rn)|0,hr=hr+Math.imul(Nr,En)|0,hr=hr+Math.imul(kr,rn)|0,wr=wr+Math.imul(kr,En)|0,lr=lr+Math.imul(br,mn)|0,hr=hr+Math.imul(br,Fn)|0,hr=hr+Math.imul(Dr,mn)|0,wr=wr+Math.imul(Dr,Fn)|0;var Zn=(dr+lr|0)+((hr&8191)<<13)|0;dr=(wr+(hr>>>13)|0)+(Zn>>>26)|0,Zn&=67108863,lr=Math.imul(Ar,Fr),hr=Math.imul(Ar,Zr),hr=hr+Math.imul(zr,Fr)|0,wr=Math.imul(zr,Zr),lr=lr+Math.imul(Lr,rn)|0,hr=hr+Math.imul(Lr,En)|0,hr=hr+Math.imul(Cr,rn)|0,wr=wr+Math.imul(Cr,En)|0,lr=lr+Math.imul(Nr,mn)|0,hr=hr+Math.imul(Nr,Fn)|0,hr=hr+Math.imul(kr,mn)|0,wr=wr+Math.imul(kr,Fn)|0,lr=lr+Math.imul(br,kn)|0,hr=hr+Math.imul(br,Qn)|0,hr=hr+Math.imul(Dr,kn)|0,wr=wr+Math.imul(Dr,Qn)|0;var On=(dr+lr|0)+((hr&8191)<<13)|0;dr=(wr+(hr>>>13)|0)+(On>>>
149126)|0,On&=67108863,lr=Math.imul(Gr,Fr),hr=Math.imul(Gr,Zr),hr=hr+Math.imul(tn,Fr)|0,wr=Math.imul(tn,Zr),lr=lr+Math.imul(Ar,rn)|0,hr=hr+Math.imul(Ar,En)|0,hr=hr+Math.imul(zr,rn)|0,wr=wr+Math.imul(zr,En)|0,lr=lr+Math.imul(Lr,mn)|0,hr=hr+Math.imul(Lr,Fn)|0,hr=hr+Math.imul(Cr,mn)|0,wr=wr+Math.imul(Cr,Fn)|0,lr=lr+Math.imul(Nr,kn)|0,hr=hr+Math.imul(Nr,Qn)|0,hr=hr+Math.imul(kr,kn)|0,wr=wr+Math.imul(kr,Qn)|0,lr=lr+Math.imul(br,Cn)|0,hr=hr+Math.imul(br,ro)|0,hr=hr+Math.imul(Dr,Cn)|0,wr=wr+Math.imul(Dr,ro)|0;var Wn=(dr+lr|0)+((hr&8191)<<13)|0;dr=(wr+(hr>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,lr=Math.imul(Jr,Fr),hr=Math.imul(Jr,Zr),hr=hr+Math.imul(Kr,Fr)|0,wr=Math.imul(Kr,Zr),lr=lr+Math.imul(Gr,rn)|0,hr=hr+Math.imul(Gr,En)|0,hr=hr+Math.imul(tn,rn)|0,wr=wr+Math.imul(tn,En)|0,lr=lr+Math.imul(Ar,mn)|0,hr=hr+Math.imul(Ar,Fn)|0,hr=hr+Math.imul(zr,mn)|0,wr=wr+Math.imul(zr,Fn)|0,lr=lr+Math.imul(Lr,kn)|0,hr=hr+Math.imul(Lr,Qn)|0,hr=hr+Math.imul(Cr,kn)|0,wr=wr+Math.imul(Cr,Qn)|0,lr=lr+Math.imul(Nr,Cn)|0,hr=hr+Math.imul(Nr,ro)|0,hr=hr+Math.imul(kr,Cn)|0,wr=wr+Math.imul(kr,ro)|0,lr=lr+Math.imul(br,Pn)|0,hr=hr+Math.imul(br,ao)|0,hr=hr+Math.imul(Dr,Pn)|0,wr=wr+Math.imul(Dr,ao)|0;var Hn=(dr+lr|0)+((hr&8191)<<13)|0;dr=(wr+(hr>>>13)|0)+(Hn>>>26)|0,Hn&=67108863,lr=Math.imul(Qr,Fr),hr=Math.imul(Qr,Zr),hr=hr+Math.imul(un,Fr)|0,wr=Math.imul(un,Zr),lr=lr+Math.imul(Jr,rn)|0,hr=hr+Math.imul(Jr,En)|0,hr=hr+Math.imul(Kr,rn)|0,wr=wr+Math.imul(Kr,En)|0,lr=lr+Math.imul(Gr,mn)|0,hr=hr+Math.imul(Gr,Fn)|0,hr=hr+Math.imul(tn,mn)|0,wr=wr+Math.imul(tn,Fn)|0,lr=lr+Math.imul(Ar,kn)|0,hr=hr+Math.imul(Ar,Qn)|0,hr=hr+Math.imul(zr,kn)|0,wr=wr+Math.imul(zr,Qn)|0,lr=lr+Math.imul(Lr,Cn)|0,hr=hr+Math.imul(Lr,ro)|0,hr=hr+Math.imul(Cr,Cn)|0,wr=wr+Math.imul(Cr,ro)|0,lr=lr+Math.imul(Nr,Pn)|0,hr=hr+Math.imul(Nr,ao)|0,hr=hr+Math.imul(kr,Pn)|0,wr=wr+Math.imul(kr,ao)|0,lr=lr+Math.imul(br,Mn)|0,hr=hr+Math.imul(br,so)|0,hr=hr+Math.imul(Dr,Mn)|0,wr=wr+Math.imul(Dr,so)|0;var Gn=(dr+lr|0)+((hr&8191)<<13)|0;dr=(wr+(hr>>>13)|0)+(Gn>>>26)|0,Gn&=67108863,lr=Math.imul(sn,Fr),hr=Math.imul(sn,Zr),hr=hr+Math.imul(vn,Fr)|0,wr=Math.imul(vn,Zr),lr=lr+Math.imul(Qr,rn
1491)|0,hr=hr+Math.imul(Qr,En)|0,hr=hr+Math.imul(un,rn)|0,wr=wr+Math.imul(un,En)|0,lr=lr+Math.imul(Jr,mn)|0,hr=hr+Math.imul(Jr,Fn)|0,hr=hr+Math.imul(Kr,mn)|0,wr=wr+Math.imul(Kr,Fn)|0,lr=lr+Math.imul(Gr,kn)|0,hr=hr+Math.imul(Gr,Qn)|0,hr=hr+Math.imul(tn,kn)|0,wr=wr+Math.imul(tn,Qn)|0,lr=lr+Math.imul(Ar,Cn)|0,hr=hr+Math.imul(Ar,ro)|0,hr=hr+Math.imul(zr,Cn)|0,wr=wr+Math.imul(zr,ro)|0,lr=lr+Math.imul(Lr,Pn)|0,hr=hr+Math.imul(Lr,ao)|0,hr=hr+Math.imul(Cr,Pn)|0,wr=wr+Math.imul(Cr,ao)|0,lr=lr+Math.imul(Nr,Mn)|0,hr=hr+Math.imul(Nr,so)|0,hr=hr+Math.imul(kr,Mn)|0,wr=wr+Math.imul(kr,so)|0,lr=lr+Math.imul(br,qr)|0,hr=hr+Math.imul(br,Hr)|0,hr=hr+Math.imul(Dr,qr)|0,wr=wr+Math.imul(Dr,Hr)|0;var Xn=(dr+lr|0)+((hr&8191)<<13)|0;dr=(wr+(hr>>>13)|0)+(Xn>>>26)|0,Xn&=67108863,lr=Math.imul(fn,Fr),hr=Math.imul(fn,Zr),hr=hr+Math.imul(wn,Fr)|0,wr=Math.imul(wn,Zr),lr=lr+Math.imul(sn,rn)|0,hr=hr+Math.imul(sn,En)|0,hr=hr+Math.imul(vn,rn)|0,wr=wr+Math.imul(vn,En)|0,lr=lr+Math.imul(Qr,mn)|0,hr=hr+Math.imul(Qr,Fn)|0,hr=hr+Math.imul(un,mn)|0,wr=wr+Math.imul(un,Fn)|0,lr=lr+Math.imul(Jr,kn)|0,hr=hr+Math.imul(Jr,Qn)|0,hr=hr+Math.imul(Kr,kn)|0,wr=wr+Math.imul(Kr,Qn)|0,lr=lr+Math.imul(Gr,Cn)|0,hr=hr+Math.imul(Gr,ro)|0,hr=hr+Math.imul(tn,Cn)|0,wr=wr+Math.imul(tn,ro)|0,lr=lr+Math.imul(Ar,Pn)|0,hr=hr+Math.imul(Ar,ao)|0,hr=hr+Math.imul(zr,Pn)|0,wr=wr+Math.imul(zr,ao)|0,lr=lr+Math.imul(Lr,Mn)|0,hr=hr+Math.imul(Lr,so)|0,hr=hr+Math.imul(Cr,Mn)|0,wr=wr+Math.imul(Cr,so)|0,lr=lr+Math.imul(Nr,qr)|0,hr=hr+Math.imul(Nr,Hr)|0,hr=hr+Math.imul(kr,qr)|0,wr=wr+Math.imul(kr,Hr)|0,lr=lr+Math.imul(br,Wr)|0,hr=hr+Math.imul(br,cn)|0,hr=hr+Math.imul(Dr,Wr)|0,wr=wr+Math.imul(Dr,cn)|0;var Kn=(dr+lr|0)+((hr&8191)<<13)|0;dr=(wr+(hr>>>13)|0)+(Kn>>>26)|0,Kn&=67108863,lr=Math.imul(Ur,Fr),hr=Math.imul(Ur,Zr),hr=hr+Math.imul(Ir,Fr)|0,wr=Math.imul(Ir,Zr),lr=lr+Math.imul(fn,rn)|0,hr=hr+Math.imul(fn,En)|0,hr=hr+Math.imul(wn,rn)|0,wr=wr+Math.imul(wn,En)|0,lr=lr+Math.imul(sn,mn)|0,hr=hr+Math.imul(sn,Fn)|0,hr=hr+Math.imul(vn,mn)|0,wr=wr+Math.imul(vn,Fn)|0,lr=lr+Math.imul(Qr,kn)|0,hr=hr+Math.imul(Qr,Qn)|0,hr=hr+Math.imul(un,kn)|0,wr=wr+Math.imul(un,Qn)|0,lr=lr+Math.imul(Jr,Cn)|0,hr=hr+Math.imul(Jr,ro)|0,hr=hr+Math.imul(Kr,Cn)|0,wr=wr+Math.imul(Kr,ro)|0,lr=lr+Math.imul(Gr,Pn)|0,hr=hr+Math.imul(Gr,ao)|0,hr=hr+Math.imul(tn,Pn)|0,wr=wr+Math.imul(tn,ao)|0,lr=lr+Math.imul(Ar,Mn)|0,hr=hr+Math.imul(Ar,so)|0,hr=hr+Math.imul(zr,Mn)|0,wr=wr+Math.imul(zr,so)|0,lr=lr+Math.imul(Lr,qr)|0,hr=hr+Math.imul(Lr,Hr)|0,hr=hr+Math.imul(Cr,qr)|0,wr=wr+Math.imul(Cr,Hr)|0,lr=lr+Math.imul(Nr,Wr)|0,hr=hr+Math.imul(Nr,cn)|0,hr=hr+Math.imul(kr,Wr)|0,wr=wr+Math.imul(kr,cn)|0,lr=lr+Math.imul(br,ln)|0,hr=hr+Math.imul(br,Sn)|0,hr=hr+Math.imul(Dr,ln)|0,wr=wr+Math.imul(Dr,Sn)|0;var Jn=(dr+lr|0)+((hr&8191)<<13)|0;dr=(wr+(hr>>>13)|0)+(Jn>>>26)|0,Jn&=67108863,lr=Math.imul(Ur,rn),hr=Math.imul(Ur,En),hr=hr+Math.imul(Ir,rn)|0,wr=Math.imul(Ir,En),lr=lr+Math.imul(fn,mn)|0,hr=hr+Math.imul(fn,Fn)|0,hr=hr+Math.imul(wn,mn)|0,wr=wr+Math.imul(wn,Fn)|0,lr=lr+Math.imul(sn,kn)|0,hr=hr+Math.imul(sn,Qn)|0,hr=hr+Math.imul(vn,kn)|0,wr=wr+Math.imul(vn,Qn)|0,lr=lr+Math.imul(Qr,Cn)|0,hr=hr+Math.imul(Qr,ro)|0,hr=hr+Math.imul(un,Cn)|0,wr=wr+Math.imul(un,ro)|0,lr=lr+Math.imul(Jr,Pn)|0,hr=hr+Math.imul(Jr,ao)|0,hr=hr+Math.imul(Kr,Pn)|0,wr=wr+Math.imul(Kr,ao)|0,lr=lr+Math.imul(Gr,Mn)|0,hr=hr+Math.imul(Gr,so)|0,hr=hr+Math.imul(tn,Mn)|0,wr=wr+Math.imul(tn,so)|0,lr=lr+Math.imul(Ar,qr)|0,hr=hr+Math.imul(Ar,Hr)|0,hr=hr+Math.imul(zr,qr)|0,wr=wr+Math.imul(zr,Hr)|0,lr=lr+Math.imul(Lr,Wr)|0,hr=hr+Math.imul(Lr,cn)|0,hr=hr+Math.imul(Cr,Wr)|0,wr=wr+Math.imul(Cr,cn)|0,lr=lr+Math.imul(Nr,ln)|0,hr=hr+Math.imul(Nr,Sn)|0,hr=hr+Math.imul(kr,ln)|0,wr=wr+Math.imul(kr,Sn)|0;var Yn=(dr+lr|0)+((hr&8191)<<13)|0;dr=(wr+(hr>>>13)|0)+(Yn>>>26)|0,Yn&=67108863,lr=Math.imul(Ur,mn),hr=Math.imul(Ur,Fn),hr=hr+Math.imul(Ir,mn)|0,wr=Math.imul(Ir,Fn),lr=lr+Math.imul(fn,kn)|0,hr=hr+Math.imul(fn,Qn)|0,hr=hr+Math.imul(wn,kn)|0,wr=wr+Math.imul(wn,Qn)|0,lr=lr+Math.imul(sn,Cn)|0,hr=hr+Math.imul(sn,ro)|0,hr=hr+Math.imul(vn,Cn)|0,wr=wr+Math.imul(vn,ro)|0,lr=lr+Math.imul(Qr,Pn)|0,hr=hr+Math.imul(Qr,ao)|0,hr=hr+Math.imul(un,Pn)|0,wr=wr+Math.imul(un,ao)|0,lr=lr+Math.imul(Jr,Mn)|0,hr=hr+Math.imul(Jr,so)|0,hr=hr+Math.imul(Kr,Mn)|0,wr=wr+Math.imul(Kr,so)|0,lr=lr+Math.imul(Gr,qr)|0,hr=hr+Math.imul(Gr,Hr)|0,hr=hr+Math.imul(tn,qr)|0,wr=wr+Math.imul(tn,Hr)|0,lr=lr+Math.imul(Ar,Wr)|0,hr=hr+Math.imul(Ar,cn)|0,hr=hr+Math.imul(zr,Wr)|0,wr=wr+Math.imul(zr,cn)|0,lr=lr+Math.imul(Lr,ln)|0,hr=hr+Math.imul(Lr,Sn)|0,hr=hr+Math.imul(Cr,ln)|0,wr=wr+Math.imul(Cr,Sn)|0;var Nn=(dr+lr|0)+((hr&8191)<<13)|0;dr=(wr+(hr>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,lr=Math.imul(Ur,kn),hr=Math.imul(Ur,Qn),hr=hr+Math.imul(Ir,kn)|0,wr=Math.imul(Ir,Qn),lr=lr+Math.imul(fn,Cn)|0,hr=hr+Math.imul(fn,ro)|0,hr=hr+Math.imul(wn,Cn)|0,wr=wr+Math.imul(wn,ro)|0,lr=lr+Math.imul(sn,Pn)|0,hr=hr+Math.imul(sn,ao)|0,hr=hr+Math.imul(vn,Pn)|0,wr=wr+Math.imul(vn,ao)|0,lr=lr+Math.imul(Qr,Mn)|0,hr=hr+Math.imul(Qr,so)|0,hr=hr+Math.imul(un,Mn)|0,wr=wr+Math.imul(un,so)|0,lr=lr+Math.imul(Jr,qr)|0,hr=hr+Math.imul(Jr,Hr)|0,hr=hr+Math.imul(Kr,qr)|0,wr=wr+Math.imul(Kr,Hr)|0,lr=lr+Math.imul(Gr,Wr)|0,hr=hr+Math.imul(Gr,cn)|0,hr=hr+Math.imul(tn,Wr)|0,wr=wr+Math.imul(tn,cn)|0,lr=lr+Math.imul(Ar,ln)|0,hr=hr+Math.imul(Ar,Sn)|0,hr=hr+Math.imul(zr,ln)|0,wr=wr+Math.imul(zr,Sn)|0;var Vn=(dr+lr|0)+((hr&8191)<<13)|0;dr=(wr+(hr>>>13)|0)+(Vn>>>26)|0,Vn&=67108863,lr=Math.imul(Ur,Cn),hr=Math.imul(Ur,ro),hr=hr+Math.imul(Ir,Cn)|0,wr=Math.imul(Ir,ro),lr=lr+Math.imul(fn,Pn)|0,hr=hr+Math.imul(fn,ao)|0,hr=hr+Math.imul(wn,Pn)|0,wr=wr+Math.imul(wn,ao)|0,lr=lr+Math.imul(sn,Mn)|0,hr=hr+Math.imul(sn,so)|0,hr=hr+Math.imul(vn,Mn)|0,wr=wr+Math.imul(vn,so)|0,lr=lr+Math.imul(Qr,qr)|0,hr=hr+Math.imul(Qr,Hr)|0,hr=hr+Math.imul(un,qr)|0,wr=wr+Math.imul(un,Hr)|0,lr=lr+Math.imul(Jr,Wr)|0,hr=hr+Math.imul(Jr,cn)|0,hr=hr+Math.imul(Kr,Wr)|0,wr=wr+Math.imul(Kr,cn)|0,lr=lr+Math.imul(Gr,ln)|0,hr=hr+Math.imul(Gr,Sn)|0,hr=hr+Math.imul(tn,ln)|0,wr=wr+Math.imul(tn,Sn)|0;
vendor: 9,950 bytes, line 1491
1491var Dn=(dr+lr|0)+((hr&8191)<<13)|0;dr=(wr+(hr>>>13)|0)+(Dn>>>26)|0,Dn&=67108863,lr=Math.imul(Ur,Pn),hr=Math.imul(Ur,ao),hr=hr+Math.imul(Ir,Pn)|0,wr=Math.imul(Ir,ao),lr=lr+Math.imul(fn,Mn)|0,hr=hr+Math.imul(fn,so)|0,hr=hr+Math.imul(wn,Mn)|0,wr=wr+Math.imul(wn,so)|0,lr=lr+Math.imul(sn,qr)|0,hr=hr+Math.imul(sn,Hr)|0,hr=hr+Math.imul(vn,qr)|0,wr=wr+Math.imul(vn,Hr)|0,lr=lr+Math.imul(Qr,Wr)|0,hr=hr+Math.imul(Qr,cn)|0,hr=hr+Math.imul(un,Wr)|0,wr=wr+Math.imul(un,cn)|0,lr=lr+Math.imul(Jr,ln)|0,hr=hr+Math.imul(Jr,Sn)|0,hr=hr+Math.imul(Kr,ln)|0,wr=wr+Math.imul(Kr,Sn)|0;var jn=(dr+lr|0)+((hr&8191)<<13)|0;dr=(wr+(hr>>>13)|0)+(jn>>>26)|0,jn&=67108863,lr=Math.imul(Ur,Mn),hr=Math.imul(Ur,so),hr=hr+Math.imul(Ir,Mn)|0,wr=Math.imul(Ir,so),lr=lr+Math.imul(fn,qr)|0,hr=hr+Math.imul(fn,Hr)|0,hr=hr+Math.imul(wn,qr)|0,wr=wr+Math.imul(wn,Hr)|0,lr=lr+Math.imul(sn,Wr)|0,hr=hr+Math.imul(sn,cn)|0,hr=hr+Math.imul(vn,Wr)|0,wr=wr+Math.imul(vn,cn)|0,lr=lr+Math.imul(Qr,ln)|0,hr=hr+Math.imul(Qr,Sn)|0,hr=hr+Math.imul(un,ln)|0,wr=wr+Math.imul(un,Sn)|0;var Un=(dr+lr|0)+((hr&8191)<<13)|0;dr=(wr+(hr>>>13)|0)+(Un>>>26)|0,Un&=67108863,lr=Math.imul(Ur,qr),hr=Math.imul(Ur,Hr),hr=hr+Math.imul(Ir,qr)|0,wr=Math.imul(Ir,Hr),lr=lr+Math.imul(fn,Wr)|0,hr=hr+Math.imul(fn,cn)|0,hr=hr+Math.imul(wn,Wr)|0,wr=wr+Math.imul(wn,cn)|0,lr=lr+Math.imul(sn,ln)|0,hr=hr+Math.imul(sn,Sn)|0,hr=hr+Math.imul(vn,ln)|0,wr=wr+Math.imul(vn,Sn)|0;var Bn=(dr+lr|0)+((hr&8191)<<13)|0;dr=(wr+(hr>>>13)|0)+(Bn>>>26)|0,Bn&=67108863,lr=Math.imul(Ur,Wr),hr=Math.imul(Ur,cn),hr=hr+Math.imul(Ir,Wr)|0,wr=Math.imul(Ir,cn),lr=lr+Math.imul(fn,ln)|0,hr=hr+Math.imul(fn,Sn)|0,hr=hr+Math.imul(wn,ln)|0,wr=wr+Math.imul(wn,Sn)|0;var hn=(dr+lr|0)+((hr&8191)<<13)|0;dr=(wr+(hr>>>13)|0)+(hn>>>26)|0,hn&=67108863,lr=Math.imul(Ur,ln),hr=Math.imul(Ur,Sn),hr=hr+Math.imul(Ir,ln)|0,wr=Math.imul(Ir,Sn);var pn=(dr+lr|0)+((hr&8191)<<13)|0;return dr=(wr+(hr>>>13)|0)+(pn>>>26)|0,pn&=67108863,gr[0]=An,gr[1]=yn,gr[2]=Zn,gr[3]=On,gr[4]=Wn,gr[5]=Hn,gr[6]=Gn,gr[7]=Xn,gr[8]=Kn,gr[9]=Jn,gr[10]=Yn,gr[11]=Nn,gr[12]=Vn,gr[13]=Dn,gr[14]=jn,gr[15]=Un,gr[16]=Bn,gr[17]=hn,gr[18]=pn,dr!==0&&(gr[19]=dr,Qt.length++),Qt};Math.imul||(rr=tr);function ar(yr,sr,or){or.negative=sr.negative^yr.negative,or.length=yr.length+sr.length;for(var Qt=0,ir=0,ur=0;ur<or.length-1;ur++){var gr=ir;ir=0;for(var dr=Qt&67108863,lr=Math.min(ur,sr.length-1),hr=Math.max(0,ur-yr.length+1);hr<=lr;hr++){var wr=ur-hr,pr=yr.words[wr]|0,br=sr.words[hr]|0,Dr=pr*br,_r=Dr&67108863;gr=gr+(Dr/67108864|0)|0,_r=_r+dr|0,dr=_r&67108863,gr=gr+(_r>>>26)|0,ir+=gr>>>26,gr&=67108863}or.words[ur]=dr,Qt=gr,gr=ir}return Qt!==0?or.words[ur]=Qt:or.length--,or.strip()}function nr(yr,sr,or){var Qt=new cr;return Qt.mulp(yr,sr,or)}qt.prototype.mulTo=function(sr,or){var Qt,ir=this.length+sr.length;return this.length===10&&sr.length===10?Qt=rr(this,sr,or):ir<63?Qt=tr(this,sr,or):ir<1024?Qt=ar(this,sr,or):Qt=nr(this,sr,or),Qt};function cr(yr,sr){this.x=yr,this.y=sr}cr.prototype.makeRBT=function(sr){for(var or=new Array(sr),Qt=qt.prototype._countBits(sr)-1,ir=0;ir<sr;ir++)or[ir]=this.revBin(ir,Qt,sr);return or},cr.prototype.revBin=function(sr,or,Qt){if(sr===0||sr===Qt-1)return sr;for(var ir=0,ur=0;ur<or;ur++)ir|=(sr&1)<<or-ur-1,sr>>=1;return ir},cr.prototype.permute=function(sr,or,Qt,ir,ur,gr){for(var dr=0;dr<gr;dr++)ir[dr]=or[sr[dr]],ur[dr]=Qt[sr[dr]]},cr.prototype.transform=function(sr,or,Qt,ir,ur,gr){this.permute(gr,sr,or,Qt,ir,ur);for(var dr=1;dr<ur;dr<<=1)for(var lr=dr<<1,hr=Math.cos(2*Math.PI/lr),wr=Math.sin(2*Math.PI/lr),pr=0;pr<ur;pr+=lr)for(var br=hr,Dr=wr,_r=0;_r<dr;_r++){var Nr=Qt[pr+_r],kr=ir[pr+_r],Mr=Qt[pr+_r+dr],Lr=ir[pr+_r+dr],Cr=br*Mr-Dr*Lr;Lr=br*Lr+Dr*Mr,Mr=Cr,Qt[pr+_r]=Nr+Mr,ir[pr+_r]=kr+Lr,Qt[pr+_r+dr]=Nr-Mr,ir[pr+_r+dr]=kr-Lr,_r!==lr&&(Cr=hr*br-wr*Dr,Dr=hr*Dr+wr*br,br=Cr)}},cr.prototype.guessLen13b=function(sr,or){var Qt=Math.max(or,sr)|1,ir=Qt&1,ur=0;for(Qt=Qt/2|0;Qt;Qt=Qt>>>1)ur++;return 1<<ur+1+ir},cr.prototype.conjugate=function(sr,or,Qt){if(!(Qt<=1))for(var ir=0;ir<Qt/2;ir++){var ur=sr[ir];sr[ir]=sr[Qt-ir-1],sr[Qt-ir-1]=ur,ur=or[ir],or[ir]=-or[Qt-ir-1],or[Qt-ir-1]=-ur}},cr.prototype.normalize13b=function(sr,or){for(var Qt=0,ir=0;ir<or/2;ir++){var ur=Math.round(sr[2*ir+1]/or)*8192+Math.round(sr[2*ir]/or)+Qt;sr[ir]=ur&67108863,ur<67108864?Qt=0:Qt=ur/67108864|0}return sr},cr.prototype.convert13b=function(sr,or,Qt,ir){for(var ur=0,gr=0;gr<or;gr++)ur=ur+(sr[gr]|0),Qt[2*gr]=ur&8191,ur=ur>>>13,Qt[2*gr+1]=ur&8191,ur=ur>>>13;for(gr=2*or;gr<ir;++gr)Qt[gr]=0;Ft(ur===0),Ft((ur&-8192)===0)},cr.prototype.stub=function(sr){for(var or=new Array(sr),Qt=0;Qt<sr;Qt++)or[Qt]=0;return or},cr.prototype.mulp=function(sr,or,Qt){var ir=2*this.guessLen13b(sr.length,or.length),ur=this.makeRBT(ir),gr=this.stub(ir),dr=new Array(ir),lr=new Array(ir),hr=new Array(ir),wr=new Array(ir),pr=new Array(ir),br=new Array(ir),Dr=Qt.words;Dr.length=ir,this.convert13b(sr.words,sr.length,dr,ir),this.convert13b(or.words,or.length,wr,ir),this.transform(dr,gr,lr,hr,ir,ur),this.transform(wr,gr,pr,br,ir,ur);for(var _r=0;_r<ir;_r++){var Nr=lr[_r]*pr[_r]-hr[_r]*br[_r];hr[_r]=lr[_r]*br[_r]+hr[_r]*pr[_r],lr[_r]=Nr}return this.conjugate(lr,hr,ir),this.transform(lr,hr,Dr,gr,ir,ur),this.conjugate(Dr,gr,ir),this.normalize13b(Dr,ir),Qt.negative=sr.negative^or.negative,Qt.length=sr.length+or.length,Qt.strip()},qt.prototype.mul=function(sr){var or=new qt(null);return or.words=new Array(this.length+sr.length),this.mulTo(sr,or)},qt.prototype.mulf=function(sr){var or=new qt(null);return or.words=new Array(this.length+sr.length),nr(this,sr,or)},qt.prototype.imul=function(sr){return this.clone().mulTo(sr,this)},qt.prototype.imuln=function(sr){Ft(typeof sr=="number"),Ft(sr<67108864);for(var or=0,Qt=0;Qt<this.length;Qt++){var ir=(this.words[Qt]|0)*sr,ur=(ir&67108863)+(or&67108863);or>>=26,or+=ir/67108864|0,or+=ur>>>26,this.words[Qt]=ur&67108863}return or!==0&&(this.words[Qt]=or,this.length++),this.length=sr===0?1:this.length,this},qt.prototype.muln=function(sr){return this.clone().imuln(sr)},qt.prototype.sqr=function(){return this.mul(this)},qt.prototype.isqr=function(){return this.imul(this.clone())},qt.prototype.pow=function(sr){var or=er(sr);if(or.length===0)return new qt(1);for(var Qt=this,ir=0;ir<or.length&&or[ir]===0;ir++,Qt=Qt.sqr());if(++ir<or.length)for(var ur=Qt.sqr();ir<or.length;ir++,ur=ur.sqr())or[ir]!==0&&(Qt=Qt.mul(ur));return Qt},qt.prototype.iushln=function(sr){Ft(typeof sr=="number"&&sr>=0);var or=sr%26,Qt=(sr-or)/26,ir=67108863>>>26-or<<26-or,ur;if(or!==0){var gr=0;for(ur=0;ur<this.length;ur++){var dr=this.words[ur]&ir,lr=(this.words[ur]|0)-dr<<or;this.words[ur]=lr|gr,gr=dr>>>26-or}gr&&(this.words[ur]=gr,this.length++)}if(Qt!==0){for(ur=this.length-1;ur>=0;ur--)this.words[ur+Qt]=this.words[ur];for(ur=0;ur<Qt;ur++)this.words[ur]=0;this.length+=Qt}return this.strip()},qt.prototype.ishln=function(sr){return Ft(this.negative===0),this.iushln(sr)},qt.prototype.iushrn=function(sr,or,Qt){Ft(typeof sr=="number"&&sr>=0);var ir;or?ir=(or-or%26)/26:ir=0;var ur=sr%26,gr=Math.min((sr-ur)/26,this.length),dr=67108863^67108863>>>ur<<ur,lr=Qt;if(ir-=gr,ir=Math.max(0,ir),lr){for(var hr=0;hr<gr;hr++)lr.words[hr]=this.words[hr];lr.length=gr}if(gr!==0)if(this.length>gr)for(this.length-=gr,hr=0;hr<this.length;hr++)this.words[hr]=this.words[hr+gr];else this.words[0]=0,this.length=1;var wr=0;for(hr=this.length-1;hr>=0&&(wr!==0||hr>=ir);hr--){var pr=this.words[hr]|0;this.words[hr]=wr<<26-ur|pr>>>ur,wr=pr&dr}return lr&&wr!==0&&(lr.words[lr.length++]=wr),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},qt.prototype.ishrn=function(sr,or,Qt){return Ft(this.negative===0),this.iushrn(sr,or,Qt)},qt.prototype.shln=function(sr){return this.clone().ishln(sr)},qt.prototype.ushln=function(sr){return this.clone().iushln(sr)},qt.prototype.shrn=function(sr){return this.clone().ishrn(sr)},qt.prototype.ushrn=function(sr){return this.clone().iushrn(sr)},qt.prototype.testn=function(sr){Ft(typeof sr=="number"&&sr>=0);var or=sr%26,Qt=(sr-or)/26,ir=1<<or;if(this.length<=Qt)return!1;var ur=this.words[Qt];return!!(ur&ir)},qt.prototype.imaskn=function(sr){Ft(typeof sr=="number"&&sr>=0);var or=sr%26,Qt=(sr-or)/26;if(Ft(this.negative===0,"imaskn works only with positive numbers"),this.length<=Qt)return this;if(or!==0&&Qt++,this.length=Math.min(Qt,this.length),or!==0){var ir=67108863^67108863>>>or<<or;this.words[this.length-1]&=ir}return this.strip()},qt.prototype.maskn=function(sr){return this.clone().imaskn(sr)},qt.prototype.iaddn=function(sr){return Ft(typeof sr=="number"),Ft(sr<67108864),sr<0?this.isubn(-sr):this.negative!==0?this.length===1&&(this.words[0]|0)<sr?(this.words[0]=sr-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(sr),this.negative=1,this):this._iaddn(sr)},qt.prototype._iaddn=function(sr){this.words[0]+=sr;for(var or=0;or<this.length&&this.words[or]>=67108864;or++)this.words[or]-=67108864,or===this.length-1?this.words[or+1]=1:this.words[or+1]++;return this.length=Math.max(this.length,or+1),this},qt.prototype.isubn=function(sr){if(Ft(typeof sr=="number"),Ft(sr<67108864),sr<0)return this.iaddn(-sr);if(this.negative!==0)return this.negative=0,this.iaddn(sr),this.negative=1,this;if(this.words[0]-=sr,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var or=0;or<this.length&&this.words[or]<0;or++)this.words[or]+=67108864,this.words[or+1]-=1;return this.strip()},qt.prototype.addn=function(sr){return this.clone().iaddn(sr)},qt.prototype.subn=function(sr){return this.clone().isubn(sr)},qt.prototype.iabs=function(){return this.negative=0,this},qt.prototype.abs=function(){return this.clone().iabs()},qt.prototype._ishlnsubmul=function(sr,or,Qt){var ir=sr.length+Qt,ur;this._expand(ir);var gr,dr=0;for(ur=0;ur<sr.length;ur++){gr=(this.words[ur+Qt]|0)+dr;var lr=(sr.words[ur]|0)*or;gr-=lr&67108863,dr=(gr>>26)-(lr/67108864|0),this.words[ur+Qt]=gr&67108863}for(;ur<this.length-Qt;ur++)gr=(this.words[ur+Qt]|0)+dr,dr=gr>>26,this.words[ur+Qt]=gr&67108863;
vendor: 12,297 bytes, line 1491
1491if(dr===0)return this.strip();for(Ft(dr===-1),dr=0,ur=0;ur<this.length;ur++)gr=-(this.words[ur]|0)+dr,dr=gr>>26,this.words[ur]=gr&67108863;return this.negative=1,this.strip()},qt.prototype._wordDiv=function(sr,or){var Qt=this.length-sr.length,ir=this.clone(),ur=sr,gr=ur.words[ur.length-1]|0,dr=this._countBits(gr);Qt=26-dr,Qt!==0&&(ur=ur.ushln(Qt),ir.iushln(Qt),gr=ur.words[ur.length-1]|0);var lr=ir.length-ur.length,hr;if(or!=="mod"){hr=new qt(null),hr.length=lr+1,hr.words=new Array(hr.length);for(var wr=0;wr<hr.length;wr++)hr.words[wr]=0}var pr=ir.clone()._ishlnsubmul(ur,1,lr);pr.negative===0&&(ir=pr,hr&&(hr.words[lr]=1));for(var br=lr-1;br>=0;br--){var Dr=(ir.words[ur.length+br]|0)*67108864+(ir.words[ur.length+br-1]|0);for(Dr=Math.min(Dr/gr|0,67108863),ir._ishlnsubmul(ur,Dr,br);ir.negative!==0;)Dr--,ir.negative=0,ir._ishlnsubmul(ur,1,br),ir.isZero()||(ir.negative^=1);hr&&(hr.words[br]=Dr)}return hr&&hr.strip(),ir.strip(),or!=="div"&&Qt!==0&&ir.iushrn(Qt),{div:hr||null,mod:ir}},qt.prototype.divmod=function(sr,or,Qt){if(Ft(!sr.isZero()),this.isZero())return{div:new qt(0),mod:new qt(0)};var ir,ur,gr;return this.negative!==0&&sr.negative===0?(gr=this.neg().divmod(sr,or),or!=="mod"&&(ir=gr.div.neg()),or!=="div"&&(ur=gr.mod.neg(),Qt&&ur.negative!==0&&ur.iadd(sr)),{div:ir,mod:ur}):this.negative===0&&sr.negative!==0?(gr=this.divmod(sr.neg(),or),or!=="mod"&&(ir=gr.div.neg()),{div:ir,mod:gr.mod}):this.negative&sr.negative?(gr=this.neg().divmod(sr.neg(),or),or!=="div"&&(ur=gr.mod.neg(),Qt&&ur.negative!==0&&ur.isub(sr)),{div:gr.div,mod:ur}):sr.length>this.length||this.cmp(sr)<0?{div:new qt(0),mod:this}:sr.length===1?or==="div"?{div:this.divn(sr.words[0]),mod:null}:or==="mod"?{div:null,mod:new qt(this.modn(sr.words[0]))}:{div:this.divn(sr.words[0]),mod:new qt(this.modn(sr.words[0]))}:this._wordDiv(sr,or)},qt.prototype.div=function(sr){return this.divmod(sr,"div",!1).div},qt.prototype.mod=function(sr){return this.divmod(sr,"mod",!1).mod},qt.prototype.umod=function(sr){return this.divmod(sr,"mod",!0).mod},qt.prototype.divRound=function(sr){var or=this.divmod(sr);if(or.mod.isZero())return or.div;var Qt=or.div.negative!==0?or.mod.isub(sr):or.mod,ir=sr.ushrn(1),ur=sr.andln(1),gr=Qt.cmp(ir);return gr<0||ur===1&&gr===0?or.div:or.div.negative!==0?or.div.isubn(1):or.div.iaddn(1)},qt.prototype.modn=function(sr){Ft(sr<=67108863);for(var or=(1<<26)%sr,Qt=0,ir=this.length-1;ir>=0;ir--)Qt=(or*Qt+(this.words[ir]|0))%sr;return Qt},qt.prototype.idivn=function(sr){Ft(sr<=67108863);for(var or=0,Qt=this.length-1;Qt>=0;Qt--){var ir=(this.words[Qt]|0)+or*67108864;this.words[Qt]=ir/sr|0,or=ir%sr}return this.strip()},qt.prototype.divn=function(sr){return this.clone().idivn(sr)},qt.prototype.egcd=function(sr){Ft(sr.negative===0),Ft(!sr.isZero());var or=this,Qt=sr.clone();or.negative!==0?or=or.umod(sr):or=or.clone();for(var ir=new qt(1),ur=new qt(0),gr=new qt(0),dr=new qt(1),lr=0;or.isEven()&&Qt.isEven();)or.iushrn(1),Qt.iushrn(1),++lr;for(var hr=Qt.clone(),wr=or.clone();!or.isZero();){for(var pr=0,br=1;!(or.words[0]&br)&&pr<26;++pr,br<<=1);if(pr>0)for(or.iushrn(pr);pr-- >0;)(ir.isOdd()||ur.isOdd())&&(ir.iadd(hr),ur.isub(wr)),ir.iushrn(1),ur.iushrn(1);for(var Dr=0,_r=1;!(Qt.words[0]&_r)&&Dr<26;++Dr,_r<<=1);if(Dr>0)for(Qt.iushrn(Dr);Dr-- >0;)(gr.isOdd()||dr.isOdd())&&(gr.iadd(hr),dr.isub(wr)),gr.iushrn(1),dr.iushrn(1);or.cmp(Qt)>=0?(or.isub(Qt),ir.isub(gr),ur.isub(dr)):(Qt.isub(or),gr.isub(ir),dr.isub(ur))}return{a:gr,b:dr,gcd:Qt.iushln(lr)}},qt.prototype._invmp=function(sr){Ft(sr.negative===0),Ft(!sr.isZero());var or=this,Qt=sr.clone();or.negative!==0?or=or.umod(sr):or=or.clone();for(var ir=new qt(1),ur=new qt(0),gr=Qt.clone();or.cmpn(1)>0&&Qt.cmpn(1)>0;){for(var dr=0,lr=1;!(or.words[0]&lr)&&dr<26;++dr,lr<<=1);if(dr>0)for(or.iushrn(dr);dr-- >0;)ir.isOdd()&&ir.iadd(gr),ir.iushrn(1);for(var hr=0,wr=1;!(Qt.words[0]&wr)&&hr<26;++hr,wr<<=1);if(hr>0)for(Qt.iushrn(hr);hr-- >0;)ur.isOdd()&&ur.iadd(gr),ur.iushrn(1);or.cmp(Qt)>=0?(or.isub(Qt),ir.isub(ur)):(Qt.isub(or),ur.isub(ir))}var pr;return or.cmpn(1)===0?pr=ir:pr=ur,pr.cmpn(0)<0&&pr.iadd(sr),pr},qt.prototype.gcd=function(sr){if(this.isZero())return sr.abs();if(sr.isZero())return this.abs();var or=this.clone(),Qt=sr.clone();or.negative=0,Qt.negative=0;for(var ir=0;or.isEven()&&Qt.isEven();ir++)or.iushrn(1),Qt.iushrn(1);do{for(;or.isEven();)or.iushrn(1);for(;Qt.isEven();)Qt.iushrn(1);var ur=or.cmp(Qt);if(ur<0){var gr=or;or=Qt,Qt=gr}else if(ur===0||Qt.cmpn(1)===0)break;or.isub(Qt)}while(!0);return Qt.iushln(ir)},qt.prototype.invm=function(sr){return this.egcd(sr).a.umod(sr)},qt.prototype.isEven=function(){return(this.words[0]&1)===0},qt.prototype.isOdd=function(){return(this.words[0]&1)===1},qt.prototype.andln=function(sr){return this.words[0]&sr},qt.prototype.bincn=function(sr){Ft(typeof sr=="number");var or=sr%26,Qt=(sr-or)/26,ir=1<<or;if(this.length<=Qt)return this._expand(Qt+1),this.words[Qt]|=ir,this;for(var ur=ir,gr=Qt;ur!==0&&gr<this.length;gr++){var dr=this.words[gr]|0;dr+=ur,ur=dr>>>26,dr&=67108863,this.words[gr]=dr}return ur!==0&&(this.words[gr]=ur,this.length++),this},qt.prototype.isZero=function(){return this.length===1&&this.words[0]===0},qt.prototype.cmpn=function(sr){var or=sr<0;if(this.negative!==0&&!or)return-1;if(this.negative===0&&or)return 1;this.strip();var Qt;if(this.length>1)Qt=1;else{or&&(sr=-sr),Ft(sr<=67108863,"Number is too big");var ir=this.words[0]|0;Qt=ir===sr?0:ir<sr?-1:1}return this.negative!==0?-Qt|0:Qt},qt.prototype.cmp=function(sr){if(this.negative!==0&&sr.negative===0)return-1;if(this.negative===0&&sr.negative!==0)return 1;var or=this.ucmp(sr);return this.negative!==0?-or|0:or},qt.prototype.ucmp=function(sr){if(this.length>sr.length)return 1;if(this.length<sr.length)return-1;for(var or=0,Qt=this.length-1;Qt>=0;Qt--){var ir=this.words[Qt]|0,ur=sr.words[Qt]|0;if(ir!==ur){ir<ur?or=-1:ir>ur&&(or=1);break}}return or},qt.prototype.gtn=function(sr){return this.cmpn(sr)===1},qt.prototype.gt=function(sr){return this.cmp(sr)===1},qt.prototype.gten=function(sr){return this.cmpn(sr)>=0},qt.prototype.gte=function(sr){return this.cmp(sr)>=0},qt.prototype.ltn=function(sr){return this.cmpn(sr)===-1},qt.prototype.lt=function(sr){return this.cmp(sr)===-1},qt.prototype.lten=function(sr){return this.cmpn(sr)<=0},qt.prototype.lte=function(sr){return this.cmp(sr)<=0},qt.prototype.eqn=function(sr){return this.cmpn(sr)===0},qt.prototype.eq=function(sr){return this.cmp(sr)===0},qt.red=function(sr){return new jr(sr)},qt.prototype.toRed=function(sr){return Ft(!this.red,"Already a number in reduction context"),Ft(this.negative===0,"red works only with positives"),sr.convertTo(this)._forceRed(sr)},qt.prototype.fromRed=function(){return Ft(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},qt.prototype._forceRed=function(sr){return this.red=sr,this},qt.prototype.forceRed=function(sr){return Ft(!this.red,"Already a number in reduction context"),this._forceRed(sr)},qt.prototype.redAdd=function(sr){return Ft(this.red,"redAdd works only with red numbers"),this.red.add(this,sr)},qt.prototype.redIAdd=function(sr){return Ft(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,sr)},qt.prototype.redSub=function(sr){return Ft(this.red,"redSub works only with red numbers"),this.red.sub(this,sr)},qt.prototype.redISub=function(sr){return Ft(this.red,"redISub works only with red numbers"),this.red.isub(this,sr)},qt.prototype.redShl=function(sr){return Ft(this.red,"redShl works only with red numbers"),this.red.shl(this,sr)},qt.prototype.redMul=function(sr){return Ft(this.red,"redMul works only with red numbers"),this.red._verify2(this,sr),this.red.mul(this,sr)},qt.prototype.redIMul=function(sr){return Ft(this.red,"redMul works only with red numbers"),this.red._verify2(this,sr),this.red.imul(this,sr)},qt.prototype.redSqr=function(){return Ft(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},qt.prototype.redISqr=function(){return Ft(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},qt.prototype.redSqrt=function(){return Ft(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},qt.prototype.redInvm=function(){return Ft(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},qt.prototype.redNeg=function(){return Ft(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},qt.prototype.redPow=function(sr){return Ft(this.red&&!sr.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,sr)};var fr={k256:null,p224:null,p192:null,p25519:null};function vr(yr,sr){this.name=yr,this.p=new qt(sr,16),this.n=this.p.bitLength(),this.k=new qt(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}vr.prototype._tmp=function(){var sr=new qt(null);return sr.words=new Array(Math.ceil(this.n/13)),sr},vr.prototype.ireduce=function(sr){var or=sr,Qt;do this.split(or,this.tmp),or=this.imulK(or),or=or.iadd(this.tmp),Qt=or.bitLength();while(Qt>this.n);var ir=Qt<this.n?-1:or.ucmp(this.p);return ir===0?(or.words[0]=0,or.length=1):ir>0?or.isub(this.p):or.strip!==void 0?or.strip():or._strip(),or},vr.prototype.split=function(sr,or){sr.iushrn(this.n,0,or)},vr.prototype.imulK=function(sr){return sr.imul(this.k)};function xr(){vr.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}Vt(xr,vr),xr.prototype.split=function(sr,or){for(var Qt=4194303,ir=Math.min(sr.length,9),ur=0;ur<ir;ur++)or.words[ur]=sr.words[ur];if(or.length=ir,sr.length<=9){sr.words[0]=0,sr.length=1;return}var gr=sr.words[9];for(or.words[or.length++]=gr&Qt,ur=10;ur<sr.length;ur++){var dr=sr.words[ur]|0;sr.words[ur-10]=(dr&Qt)<<4|gr>>>22,gr=dr}gr>>>=22,sr.words[ur-10]=gr,gr===0&&sr.length>10?sr.length-=10:sr.length-=9},xr.prototype.imulK=function(sr){sr.words[sr.length]=0,sr.words[sr.length+1]=0,sr.length+=2;for(var or=0,Qt=0;Qt<sr.length;Qt++){var ir=sr.words[Qt]|0;or+=ir*977,sr.words[Qt]=or&67108863,or=ir*64+(or/67108864|0)}return sr.words[sr.length-1]===0&&(sr.length--,sr.words[sr.length-1]===0&&sr.length--),sr};function Sr(){vr.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}Vt(Sr,vr);function Tr(){vr.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}Vt(Tr,vr);function Br(){vr.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}Vt(Br,vr),Br.prototype.imulK=function(sr){for(var or=0,Qt=0;Qt<sr.length;Qt++){var ir=(sr.words[Qt]|0)*19+or,ur=ir&67108863;ir>>>=26,sr.words[Qt]=ur,or=ir}return or!==0&&(sr.words[sr.length++]=or),sr},qt._prime=function(sr){if(fr[sr])return fr[sr];var or;if(sr==="k256")or=new xr;else if(sr==="p224")or=new Sr;else if(sr==="p192")or=new Tr;else if(sr==="p25519")or=new Br;else throw new Error("Unknown prime "+sr);return fr[sr]=or,or};function jr(yr){if(typeof yr=="string"){var sr=qt._prime(yr);this.m=sr.p,this.prime=sr}else Ft(yr.gtn(1),"modulus must be greater than 1"),this.m=yr,this.prime=null}jr.prototype._verify1=function(sr){Ft(sr.negative===0,"red works only with positives"),Ft(sr.red,"red works only with red numbers")},jr.prototype._verify2=function(sr,or){Ft((sr.negative|or.negative)===0,"red works only with positives"),Ft(sr.red&&sr.red===or.red,"red works only with red numbers")},jr.prototype.imod=function(sr){return this.prime?this.prime.ireduce(sr)._forceRed(this):sr.umod(this.m)._forceRed(this)},jr.prototype.neg=function(sr){return sr.isZero()?sr.clone():this.m.sub(sr)._forceRed(this)},jr.prototype.add=function(sr,or){this._verify2(sr,or);var Qt=sr.add(or);return Qt.cmp(this.m)>=0&&Qt.isub(this.m),Qt._forceRed(this)},jr.prototype.iadd=function(sr,or){this._verify2(sr,or);var Qt=sr.iadd(or);return Qt.cmp(this.m)>=0&&Qt.isub(this.m),Qt},jr.prototype.sub=function(sr,or){this._verify2(sr,or);var Qt=sr.sub(or);return Qt.cmpn(0)<0&&Qt.iadd(this.m),Qt._forceRed(this)},jr.prototype.isub=function(sr,or){this._verify2(sr,or);var Qt=sr.isub(or);return Qt.cmpn(0)<0&&Qt.iadd(this.m),Qt},jr.prototype.shl=function(sr,or){return this._verify1(sr),this.imod(sr.ushln(or))},jr.prototype.imul=function(sr,or){return this._verify2(sr,or),this.imod(sr.imul(or))},jr.prototype.mul=function(sr,or){return this._verify2(sr,or),this.imod(sr.mul(
1491or))},jr.prototype.isqr=function(sr){return this.imul(sr,sr.clone())},jr.prototype.sqr=function(sr){return this.mul(sr,sr)},jr.prototype.sqrt=function(sr){if(sr.isZero())return sr.clone();var or=this.m.andln(3);if(Ft(or%2===1),or===3){var Qt=this.m.add(new qt(1)).iushrn(2);return this.pow(sr,Qt)}for(var ir=this.m.subn(1),ur=0;!ir.isZero()&&ir.andln(1)===0;)ur++,ir.iushrn(1);Ft(!ir.isZero());var gr=new qt(1).toRed(this),dr=gr.redNeg(),lr=this.m.subn(1).iushrn(1),hr=this.m.bitLength();for(hr=new qt(2*hr*hr).toRed(this);this.pow(hr,lr).cmp(dr)!==0;)hr.redIAdd(dr);for(var wr=this.pow(hr,ir),pr=this.pow(sr,ir.addn(1).iushrn(1)),br=this.pow(sr,ir),Dr=ur;br.cmp(gr)!==0;){for(var _r=br,Nr=0;_r.cmp(gr)!==0;Nr++)_r=_r.redSqr();Ft(Nr<Dr);var kr=this.pow(wr,new qt(1).iushln(Dr-Nr-1));pr=pr.redMul(kr),wr=kr.redSqr(),br=br.redMul(wr),Dr=Nr}return pr},jr.prototype.invm=function(sr){var or=sr._invmp(this.m);return or.negative!==0?(or.negative=0,this.imod(or).redNeg()):this.imod(or)},jr.prototype.pow=function(sr,or){if(or.isZero())return new qt(1).toRed(this);if(or.cmpn(1)===0)return sr.clone();var Qt=4,ir=new Array(1<<Qt);ir[0]=new qt(1).toRed(this),ir[1]=sr;for(var ur=2;ur<ir.length;ur++)ir[ur]=this.mul(ir[ur-1],sr);var gr=ir[0],dr=0,lr=0,hr=or.bitLength()%26;for(hr===0&&(hr=26),ur=or.length-1;ur>=0;ur--){for(var wr=or.words[ur],pr=hr-1;pr>=0;pr--){var br=wr>>pr&1;if(gr!==ir[0]&&(gr=this.sqr(gr)),br===0&&dr===0){lr=0;continue}dr<<=1,dr|=br,lr++,!(lr!==Qt&&(ur!==0||pr!==0))&&(gr=this.mul(gr,ir[dr]),lr=0,dr=0)}hr=26}return gr},jr.prototype.convertTo=function(sr){var or=sr.umod(this.m);return or===sr?or.clone():or},jr.prototype.convertFrom=function(sr){var or=sr.clone();return or.red=null,or},qt.mont=function(sr){return new Rr(sr)};function Rr(yr){jr.call(this,yr),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new qt(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}Vt(Rr,jr),Rr.prototype.convertTo=function(sr){return this.imod(sr.ushln(this.shift))},Rr.prototype.convertFrom=function(sr){var or=this.imod(sr.mul(this.rinv));return or.red=null,or},Rr.prototype.imul=function(sr,or){if(sr.isZero()||or.isZero())return sr.words[0]=0,sr.length=1,sr;var Qt=sr.imul(or),ir=Qt.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ur=Qt.isub(ir).iushrn(this.shift),gr=ur;return ur.cmp(this.m)>=0?gr=ur.isub(this.m):ur.cmpn(0)<0&&(gr=ur.iadd(this.m)),gr._forceRed(this)},Rr.prototype.mul=function(sr,or){if(sr.isZero()||or.isZero())return new qt(0)._forceRed(this);var Qt=sr.mul(or),ir=Qt.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ur=Qt.isub(ir).iushrn(this.shift),gr=ur;return ur.cmp(this.m)>=0?gr=ur.isub(this.m):ur.cmpn(0)<0&&(gr=ur.iadd(this.m)),gr._forceRed(this)},Rr.prototype.invm=function(sr){var or=this.imod(sr._invmp(this.m).mul(this.r2));return or._forceRed(this)}})(yt,commonjsGlobal)}(bn$1)),bn$1.exports}var utils$1={},hasRequiredUtils$2;function requireUtils$2(){return hasRequiredUtils$2||(hasRequiredUtils$2=1,function(yt){var _e=yt;function $t(qt,zt){if(Array.isArray(qt))return qt.slice();if(!qt)return[];var Ht=[];if(typeof qt!="string"){for(var Kt=0;Kt<qt.length;Kt++)Ht[Kt]=qt[Kt]|0;return Ht}if(zt==="hex"){qt=qt.replace(/[^a-z0-9]+/ig,""),qt.length%2!==0&&(qt="0"+qt);for(var Kt=0;Kt<qt.length;Kt+=2)Ht.push(parseInt(qt[Kt]+qt[Kt+1],16))}else for(var Kt=0;Kt<qt.length;Kt++){var Gt=qt.charCodeAt(Kt),Jt=Gt>>8,Xt=Gt&255;Jt?Ht.push(Jt,Xt):Ht.push(Xt)}return Ht}_e.toArray=$t;function Ft(qt){return qt.length===1?"0"+qt:qt}_e.zero2=Ft;function Vt(qt){for(var zt="",Ht=0;Ht<qt.length;Ht++)zt+=Ft(qt[Ht].toString(16));return zt}_e.toHex=Vt,_e.encode=function(zt,Ht){return Ht==="hex"?Vt(zt):zt}}(utils$1)),utils$1}var hasRequiredUtils$1;function requireUtils$1(){return hasRequiredUtils$1||(hasRequiredUtils$1=1,function(yt){var _e=yt,$t=requireBn$1(),Ft=requireMinimalisticAssert(),Vt=requireUtils$2();_e.assert=Ft,_e.toArray=Vt.toArray,_e.zero2=Vt.zero2,_e.toHex=Vt.toHex,_e.encode=Vt.encode;
1491function qt(Jt,Xt,Zt){var er=new Array(Math.max(Jt.bitLength(),Zt)+1),tr;for(tr=0;tr<er.length;tr+=1)er[tr]=0;var rr=1<<Xt+1,ar=Jt.clone();for(tr=0;tr<er.length;tr++){var nr,cr=ar.andln(rr-1);ar.isOdd()?(cr>(rr>>1)-1?nr=(rr>>1)-cr:nr=cr,ar.isubn(nr)):nr=0,er[tr]=nr,ar.iushrn(1)}return er}_e.getNAF=qt;function zt(Jt,Xt){var Zt=[[],[]];Jt=Jt.clone(),Xt=Xt.clone();for(var er=0,tr=0,rr;Jt.cmpn(-er)>0||Xt.cmpn(-tr)>0;){var ar=Jt.andln(3)+er&3,nr=Xt.andln(3)+tr&3;ar===3&&(ar=-1),nr===3&&(nr=-1);var cr;ar&1?(rr=Jt.andln(7)+er&7,(rr===3||rr===5)&&nr===2?cr=-ar:cr=ar):cr=0,Zt[0].push(cr);var fr;nr&1?(rr=Xt.andln(7)+tr&7,(rr===3||rr===5)&&ar===2?fr=-nr:fr=nr):fr=0,Zt[1].push(fr),2*er===cr+1&&(er=1-er),2*tr===fr+1&&(tr=1-tr),Jt.iushrn(1),Xt.iushrn(1)}return Zt}_e.getJSF=zt;function Ht(Jt,Xt,Zt){var er="_"+Xt;Jt.prototype[Xt]=function(){return this[er]!==void 0?this[er]:this[er]=Zt.call(this)}}_e.cachedProperty=Ht;function Kt(Jt){return typeof Jt=="string"?_e.toArray(Jt,"hex"):Jt}_e.parseBytes=Kt;function Gt(Jt){return new $t(Jt,"hex","le")}_e.intFromLE=Gt}(utils$2)),utils$2}var curve={},base$1,hasRequiredBase$1;function requireBase$1(){if(hasRequiredBase$1)return base$1;hasRequiredBase$1=1;var yt=requireBn$1(),_e=requireUtils$1(),$t=_e.getNAF,Ft=_e.getJSF,Vt=_e.assert;function qt(Ht,Kt){this.type=Ht,this.p=new yt(Kt.p,16),this.red=Kt.prime?yt.red(Kt.prime):yt.mont(this.p),this.zero=new yt(0).toRed(this.red),this.one=new yt(1).toRed(this.red),this.two=new yt(2).toRed(this.red),this.n=Kt.n&&new yt(Kt.n,16),this.g=Kt.g&&this.pointFromJSON(Kt.g,Kt.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var Gt=this.n&&this.p.div(this.n);!Gt||Gt.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}base$1=qt,qt.prototype.point=function(){throw new Error("Not implemented")},qt.prototype.validate=function(){throw new Error("Not implemented")},qt.prototype._fixedNafMul=function(Kt,Gt){Vt(Kt.precomputed);var Jt=Kt._getDoubles(),Xt=$t(Gt,1,this._bitLength),Zt=(1<<Jt.step+1)-(Jt.step%2===0?2:1);Zt/=3;var er=[],tr,rr;for(tr=0;tr<Xt.length;tr+=Jt.step){rr=0;for(var ar=tr+Jt.step-1;ar>=tr;ar--)rr=(rr<<1)+Xt[ar];er.push(rr)}for(var nr=this.jpoint(null,null,null),cr=this.jpoint(null,null,null),fr=Zt;fr>0;fr--){for(tr=0;tr<er.length;tr++)rr=er[tr],rr===fr?cr=cr.mixedAdd(Jt.points[tr]):rr===-fr&&(cr=cr.mixedAdd(Jt.points[tr].neg()));nr=nr.add(cr)}return nr.toP()},qt.prototype._wnafMul=function(Kt,Gt){var Jt=4,Xt=Kt._getNAFPoints(Jt);Jt=Xt.wnd;for(var Zt=Xt.points,er=$t(Gt,Jt,this._bitLength),tr=this.jpoint(null,null,null),rr=er.length-1;rr>=0;rr--){for(var ar=0;rr>=0&&er[rr]===0;rr--)ar++;if(rr>=0&&ar++,tr=tr.dblp(ar),rr<0)break;var nr=er[rr];Vt(nr!==0),Kt.type==="affine"?nr>0?tr=tr.mixedAdd(Zt[nr-1>>1]):tr=tr.mixedAdd(Zt[-nr-1>>1].neg()):nr>0?tr=tr.add(Zt[nr-1>>1]):tr=tr.add(Zt[-nr-1>>1].neg())}return Kt.type==="affine"?tr.toP():tr},qt.prototype._wnafMulAdd=function(Kt,Gt,Jt,Xt,Zt){var er=this._wnafT1,tr=this._wnafT2,rr=this._wnafT3,ar=0,nr,cr,fr;for(nr=0;nr<Xt;nr++){fr=Gt[nr];var vr=fr._getNAFPoints(Kt);er[nr]=vr.wnd,tr[nr]=vr.points}for(nr=Xt-1;nr>=1;nr-=2){var xr=nr-1,Sr=nr;if(er[xr]!==1||er[Sr]!==1){rr[xr]=$t(Jt[xr],er[xr],this._bitLength),rr[Sr]=$t(Jt[Sr],er[Sr],this._bitLength),ar=Math.max(rr[xr].length,ar),ar=Math.max(rr[Sr].length,ar);continue}var Tr=[Gt[xr],null,null,Gt[Sr]];Gt[xr].y.cmp(Gt[Sr].y)===0?(Tr[1]=Gt[xr].add(Gt[Sr]),Tr[2]=Gt[xr].toJ().mixedAdd(Gt[Sr].neg())):Gt[xr].y.cmp(Gt[Sr].y.redNeg())===0?(Tr[1]=Gt[xr].toJ().mixedAdd(Gt[Sr]),Tr[2]=Gt[xr].add(Gt[Sr].neg())):(Tr[1]=Gt[xr].toJ().mixedAdd(Gt[Sr]),Tr[2]=Gt[xr].toJ().mixedAdd(Gt[Sr].neg()));var Br=[-3,-1,-5,-7,0,7,5,1,3],jr=Ft(Jt[xr],Jt[Sr]);for(ar=Math.max(jr[0].length,ar),rr[xr]=new Array(ar),rr[Sr]=new Array(ar),cr=0;cr<ar;cr++){var Rr=jr[0][cr]|0,yr=jr[1][cr]|0;rr[xr][cr]=Br[(Rr+1)*3+(yr+1)],rr[Sr][cr]=0,tr[xr]=Tr}}var sr=this.jpoint(null,null,null),or=this._wnafT4;for(nr=ar;nr>=0;nr--){for(var Qt=0;nr>=0;){var ir=!0;for(cr=0;cr<Xt;cr++)or[cr]=rr[cr][nr]|0,or[cr]!==0&&(ir=!1);if(!ir)break;Qt++,nr--}if(nr>=0&&Qt++,sr=sr.dblp(Qt),nr<0)break;for(cr=0;cr<Xt;cr++){var ur=or[cr];ur!==0&&(ur>0?fr=tr[cr][ur-1>>1]:ur<0&&(fr=tr[cr][-ur-1>>1].neg()),fr.type==="affine"?sr=sr.mixedAdd(fr):sr=sr.add(fr))}}for(nr=0;nr<Xt;nr++)tr[nr]=null;return Zt?sr:sr.toP()};
1491function zt(Ht,Kt){this.curve=Ht,this.type=Kt,this.precomputed=null}return qt.BasePoint=zt,zt.prototype.eq=function(){throw new Error("Not implemented")},zt.prototype.validate=function(){return this.curve.validate(this)},qt.prototype.decodePoint=function(Kt,Gt){Kt=_e.toArray(Kt,Gt);var Jt=this.p.byteLength();if((Kt[0]===4||Kt[0]===6||Kt[0]===7)&&Kt.length-1===2*Jt){Kt[0]===6?Vt(Kt[Kt.length-1]%2===0):Kt[0]===7&&Vt(Kt[Kt.length-1]%2===1);var Xt=this.point(Kt.slice(1,1+Jt),Kt.slice(1+Jt,1+2*Jt));return Xt}else if((Kt[0]===2||Kt[0]===3)&&Kt.length-1===Jt)return this.pointFromX(Kt.slice(1,1+Jt),Kt[0]===3);throw new Error("Unknown point format")},zt.prototype.encodeCompressed=function(Kt){return this.encode(Kt,!0)},zt.prototype._encode=function(Kt){var Gt=this.curve.p.byteLength(),Jt=this.getX().toArray("be",Gt);return Kt?[this.getY().isEven()?2:3].concat(Jt):[4].concat(Jt,this.getY().toArray("be",Gt))},zt.prototype.encode=function(Kt,Gt){return _e.encode(this._encode(Gt),Kt)},zt.prototype.precompute=function(Kt){if(this.precomputed)return this;var Gt={doubles:null,naf:null,beta:null};return Gt.naf=this._getNAFPoints(8),Gt.doubles=this._getDoubles(4,Kt),Gt.beta=this._getBeta(),this.precomputed=Gt,this},zt.prototype._hasDoubles=function(Kt){if(!this.precomputed)return!1;var Gt=this.precomputed.doubles;return Gt?Gt.points.length>=Math.ceil((Kt.bitLength()+1)/Gt.step):!1},zt.prototype._getDoubles=function(Kt,Gt){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var Jt=[this],Xt=this,Zt=0;Zt<Gt;Zt+=Kt){for(var er=0;er<Kt;er++)Xt=Xt.dbl();Jt.push(Xt)}return{step:Kt,points:Jt}},zt.prototype._getNAFPoints=function(Kt){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var Gt=[this],Jt=(1<<Kt)-1,Xt=Jt===1?null:this.dbl(),Zt=1;Zt<Jt;Zt++)Gt[Zt]=Gt[Zt-1].add(Xt);return{wnd:Kt,points:Gt}},zt.prototype._getBeta=function(){return null},zt.prototype.dblp=function(Kt){for(var Gt=this,Jt=0;Jt<Kt;Jt++)Gt=Gt.dbl();return Gt},base$1}var short,hasRequiredShort;function requireShort(){if(hasRequiredShort)return short;hasRequiredShort=1;var yt=requireUtils$1(),_e=requireBn$1(),$t=requireInherits_browser(),Ft=requireBase$1(),Vt=yt.assert;function qt(Kt){Ft.call(this,"short",Kt),this.a=new _e(Kt.a,16).toRed(this.red),this.b=new _e(Kt.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(Kt),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}$t(qt,Ft),short=qt,qt.prototype._getEndomorphism=function(Gt){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var Jt,Xt;if(Gt.beta)Jt=new _e(Gt.beta,16).toRed(this.red);else{var Zt=this._getEndoRoots(this.p);Jt=Zt[0].cmp(Zt[1])<0?Zt[0]:Zt[1],Jt=Jt.toRed(this.red)}if(Gt.lambda)Xt=new _e(Gt.lambda,16);else{var er=this._getEndoRoots(this.n);this.g.mul(er[0]).x.cmp(this.g.x.redMul(Jt))===0?Xt=er[0]:(Xt=er[1],Vt(this.g.mul(Xt).x.cmp(this.g.x.redMul(Jt))===0))}var tr;return Gt.basis?tr=Gt.basis.map(function(rr){return{a:new _e(rr.a,16),b:new _e(rr.b,16)}}):tr=this._getEndoBasis(Xt),{beta:Jt,lambda:Xt,basis:tr}}},qt.prototype._getEndoRoots=function(Gt){var Jt=Gt===this.p?this.red:_e.mont(Gt),Xt=new _e(2).toRed(Jt).redInvm(),Zt=Xt.redNeg(),er=new _e(3).toRed(Jt).redNeg().redSqrt().redMul(Xt),tr=Zt.redAdd(er).fromRed(),rr=Zt.redSub(er).fromRed();return[tr,rr]},qt.prototype._getEndoBasis=function(Gt){for(var Jt=this.n.ushrn(Math.floor(this.n.bitLength()/2)),Xt=Gt,Zt=this.n.clone(),er=new _e(1),tr=new _e(0),rr=new _e(0),ar=new _e(1),nr,cr,fr,vr,xr,Sr,Tr,Br=0,jr,Rr;Xt.cmpn(0)!==0;){var yr=Zt.div(Xt);jr=Zt.sub(yr.mul(Xt)),Rr=rr.sub(yr.mul(er));var sr=ar.sub(yr.mul(tr));if(!fr&&jr.cmp(Jt)<0)nr=Tr.neg(),cr=er,fr=jr.neg(),vr=Rr;else if(fr&&++Br===2)break;Tr=jr,Zt=Xt,Xt=jr,rr=er,er=Rr,ar=tr,tr=sr}xr=jr.neg(),Sr=Rr;var or=fr.sqr().add(vr.sqr()),Qt=xr.sqr().add(Sr.sqr());return Qt.cmp(or)>=0&&(xr=nr,Sr=cr),fr.negative&&(fr=fr.neg(),vr=vr.neg()),xr.negative&&(xr=xr.neg(),Sr=Sr.neg()),[{a:fr,b:vr},{a:xr,b:Sr}]},qt.prototype._endoSplit=function(Gt){var Jt=this.endo.basis,Xt=Jt[0],Zt=Jt[1],er=Zt.b.mul(Gt).divRound(this.n),tr=Xt.b.neg().mul(Gt).divRound(this.n),rr=er.mul(Xt.a),ar=tr.mul(Zt.a),nr=er.mul(Xt.b),cr=tr.mul(Zt.b),fr=Gt.sub(rr).sub(ar),vr=nr.add(cr).neg();return{k1:fr,k2:vr}},qt.prototype.pointFromX=function(Gt,Jt){Gt=new _e(Gt,16),Gt.red||(Gt=Gt.toRed(this.red));var Xt=Gt.redSqr().redMul(Gt).redIAdd(Gt.redMul(this.a)).redIAdd(this.b),Zt=Xt.redSqrt();if(Zt.redSqr().redSub(Xt).cmp(this.zero)!==0)throw new Error("invalid point");var er=Zt.fromRed().isOdd();return(Jt&&!er||!Jt&&er)&&(Zt=Zt.redNeg()),this.point(Gt,Zt)},qt.prototype.validate=function(Gt){if(Gt.inf)return!0;var Jt=Gt.x,Xt=Gt.y,Zt=this.a.redMul(Jt),er=Jt.redSqr().redMul(Jt).redIAdd(Zt).redIAdd(this.b);return Xt.redSqr().redISub(er).cmpn(0)===0},qt.prototype._endoWnafMulAdd=function(Gt,Jt,Xt){for(var Zt=this._endoWnafT1,er=this._endoWnafT2,tr=0;tr<Gt.length;tr++){var rr=this._endoSplit(Jt[tr]),ar=Gt[tr],nr=ar._getBeta();rr.k1.negative&&(rr.k1.ineg(),ar=ar.neg(!0)),rr.k2.negative&&(rr.k2.ineg(),nr=nr.neg(!0)),Zt[tr*2]=ar,Zt[tr*2+1]=nr,er[tr*2]=rr.k1,er[tr*2+1]=rr.k2}for(var cr=this._wnafMulAdd(1,Zt,er,tr*2,Xt),fr=0;fr<tr*2;fr++)Zt[fr]=null,er[fr]=null;return cr};function zt(Kt,Gt,Jt,Xt){Ft.BasePoint.call(this,Kt,"affine"),Gt===null&&Jt===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new _e(Gt,16),this.y=new _e(Jt,16),Xt&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}$t(zt,Ft.BasePoint),qt.prototype.point=function(Gt,Jt,Xt){return new zt(this,Gt,Jt,Xt)},qt.prototype.pointFromJSON=function(Gt,Jt){return zt.fromJSON(this,Gt,Jt)},zt.prototype._getBeta=function(){if(this.curve.endo){var Gt=this.prec
vendor: 6,394 bytes, line 1491
1491omputed;if(Gt&&Gt.beta)return Gt.beta;var Jt=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(Gt){var Xt=this.curve,Zt=function(er){return Xt.point(er.x.redMul(Xt.endo.beta),er.y)};Gt.beta=Jt,Jt.precomputed={beta:null,naf:Gt.naf&&{wnd:Gt.naf.wnd,points:Gt.naf.points.map(Zt)},doubles:Gt.doubles&&{step:Gt.doubles.step,points:Gt.doubles.points.map(Zt)}}}return Jt}},zt.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},zt.fromJSON=function(Gt,Jt,Xt){typeof Jt=="string"&&(Jt=JSON.parse(Jt));var Zt=Gt.point(Jt[0],Jt[1],Xt);if(!Jt[2])return Zt;function er(rr){return Gt.point(rr[0],rr[1],Xt)}var tr=Jt[2];return Zt.precomputed={beta:null,doubles:tr.doubles&&{step:tr.doubles.step,points:[Zt].concat(tr.doubles.points.map(er))},naf:tr.naf&&{wnd:tr.naf.wnd,points:[Zt].concat(tr.naf.points.map(er))}},Zt},zt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},zt.prototype.isInfinity=function(){return this.inf},zt.prototype.add=function(Gt){if(this.inf)return Gt;if(Gt.inf)return this;if(this.eq(Gt))return this.dbl();if(this.neg().eq(Gt))return this.curve.point(null,null);if(this.x.cmp(Gt.x)===0)return this.curve.point(null,null);var Jt=this.y.redSub(Gt.y);Jt.cmpn(0)!==0&&(Jt=Jt.redMul(this.x.redSub(Gt.x).redInvm()));var Xt=Jt.redSqr().redISub(this.x).redISub(Gt.x),Zt=Jt.redMul(this.x.redSub(Xt)).redISub(this.y);return this.curve.point(Xt,Zt)},zt.prototype.dbl=function(){if(this.inf)return this;var Gt=this.y.redAdd(this.y);if(Gt.cmpn(0)===0)return this.curve.point(null,null);var Jt=this.curve.a,Xt=this.x.redSqr(),Zt=Gt.redInvm(),er=Xt.redAdd(Xt).redIAdd(Xt).redIAdd(Jt).redMul(Zt),tr=er.redSqr().redISub(this.x.redAdd(this.x)),rr=er.redMul(this.x.redSub(tr)).redISub(this.y);return this.curve.point(tr,rr)},zt.prototype.getX=function(){return this.x.fromRed()},zt.prototype.getY=function(){return this.y.fromRed()},zt.prototype.mul=function(Gt){return Gt=new _e(Gt,16),this.isInfinity()?this:this._hasDoubles(Gt)?this.curve._fixedNafMul(this,Gt):this.curve.endo?this.curve._endoWnafMulAdd([this],[Gt]):this.curve._wnafMul(this,Gt)},zt.prototype.mulAdd=function(Gt,Jt,Xt){var Zt=[this,Jt],er=[Gt,Xt];return this.curve.endo?this.curve._endoWnafMulAdd(Zt,er):this.curve._wnafMulAdd(1,Zt,er,2)},zt.prototype.jmulAdd=function(Gt,Jt,Xt){var Zt=[this,Jt],er=[Gt,Xt];return this.curve.endo?this.curve._endoWnafMulAdd(Zt,er,!0):this.curve._wnafMulAdd(1,Zt,er,2,!0)},zt.prototype.eq=function(Gt){return this===Gt||this.inf===Gt.inf&&(this.inf||this.x.cmp(Gt.x)===0&&this.y.cmp(Gt.y)===0)},zt.prototype.neg=function(Gt){if(this.inf)return this;var Jt=this.curve.point(this.x,this.y.redNeg());if(Gt&&this.precomputed){var Xt=this.precomputed,Zt=function(er){return er.neg()};Jt.precomputed={naf:Xt.naf&&{wnd:Xt.naf.wnd,points:Xt.naf.points.map(Zt)},doubles:Xt.doubles&&{step:Xt.doubles.step,points:Xt.doubles.points.map(Zt)}}}return Jt},zt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var Gt=this.curve.jpoint(this.x,this.y,this.curve.one);return Gt};function Ht(Kt,Gt,Jt,Xt){Ft.BasePoint.call(this,Kt,"jacobian"),Gt===null&&Jt===null&&Xt===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new _e(0)):(this.x=new _e(Gt,16),this.y=new _e(Jt,16),this.z=new _e(Xt,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}return $t(Ht,Ft.BasePoint),qt.prototype.jpoint=function(Gt,Jt,Xt){return new Ht(this,Gt,Jt,Xt)},Ht.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var Gt=this.z.redInvm(),Jt=Gt.redSqr(),Xt=this.x.redMul(Jt),Zt=this.y.redMul(Jt).redMul(Gt);return this.curve.point(Xt,Zt)},Ht.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Ht.prototype.add=function(Gt){if(this.isInfinity())return Gt;if(Gt.isInfinity())return this;var Jt=Gt.z.redSqr(),Xt=this.z.redSqr(),Zt=this.x.redMul(Jt),er=Gt.x.redMul(Xt),tr=this.y.redMul(Jt.redMul(Gt.z)),rr=Gt.y.redMul(Xt.redMul(this.z)),ar=Zt.redSub(er),nr=tr.redSub(rr);if(ar.cmpn(0)===0)return nr.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var cr=ar.redSqr(),fr=cr.redMul(ar),vr=Zt.redMul(cr),xr=nr.redSqr().redIAdd(fr).redISub(vr).redISub(vr),Sr=nr.redMul(vr.redISub(xr)).redISub(tr.redMul(fr)),Tr=this.z.redMul(Gt.z).redMul(ar);return this.curve.jpoint(xr,Sr,Tr)},Ht.prototype.mixedAdd=function(Gt){if(this.isInfinity())return Gt.toJ();if(Gt.isInfinity())return this;var Jt=this.z.redSqr(),Xt=this.x,Zt=Gt.x.redMul(Jt),er=this.y,tr=Gt.y.redMul(Jt).redMul(this.z),rr=Xt.redSub(Zt),ar=er.redSub(tr);if(rr.cmpn(0)===0)return ar.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var nr=rr.redSqr(),cr=nr.redMul(rr),fr=Xt.redMul(nr),vr=ar.redSqr().redIAdd(cr).redISub(fr).redISub(fr),xr=ar.redMul(fr.redISub(vr)).redISub(er.redMul(cr)),Sr=this.z.redMul(rr);return this.curve.jpoint(vr,xr,Sr)},Ht.prototype.dblp=function(Gt){if(Gt===0)return this;if(this.isInfinity())return this;if(!Gt)return this.dbl();var Jt;if(this.curve.zeroA||this.curve.threeA){var Xt=this;for(Jt=0;Jt<Gt;Jt++)Xt=Xt.dbl();return Xt}var Zt=this.curve.a,er=this.curve.tinv,tr=this.x,rr=this.y,ar=this.z,nr=ar.redSqr().redSqr(),cr=rr.redAdd(rr);for(Jt=0;Jt<Gt;Jt++){var fr=tr.redSqr(),vr=cr.redSqr(),xr=vr.redSqr(),Sr=fr.redAdd(fr).redIAdd(fr).redIAdd(Zt.redMul(nr)),Tr=tr.redMul(vr),Br=Sr.redSqr().redISub(Tr.redAdd(Tr)),jr=Tr.redISub(Br),Rr=Sr.redMul(jr);Rr=Rr.redIAdd(Rr).redISub(xr);var yr=cr.redMul(ar);Jt+1<Gt&&(nr=nr.redMul(xr)),tr=Br,ar=yr,cr=Rr}return this.curve.jpoint(tr,cr.redMul(er),ar)},Ht.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},Ht.prototype._zeroDbl=function(){var Gt,Jt,Xt;if(this.zOne){var Zt=this.x.redSqr(),er=this.y.redSqr(),tr=er.redSqr(),rr=this.x.redAdd(er).redSqr().redISub(Zt).redISub(tr);rr=rr.redIAdd(rr);var ar=Zt.redAdd(Zt).redIAdd(Zt),nr=ar.redSqr().redISub(rr).redISub(rr),cr=tr.redIAdd(tr);
1491cr=cr.redIAdd(cr),cr=cr.redIAdd(cr),Gt=nr,Jt=ar.redMul(rr.redISub(nr)).redISub(cr),Xt=this.y.redAdd(this.y)}else{var fr=this.x.redSqr(),vr=this.y.redSqr(),xr=vr.redSqr(),Sr=this.x.redAdd(vr).redSqr().redISub(fr).redISub(xr);Sr=Sr.redIAdd(Sr);var Tr=fr.redAdd(fr).redIAdd(fr),Br=Tr.redSqr(),jr=xr.redIAdd(xr);jr=jr.redIAdd(jr),jr=jr.redIAdd(jr),Gt=Br.redISub(Sr).redISub(Sr),Jt=Tr.redMul(Sr.redISub(Gt)).redISub(jr),Xt=this.y.redMul(this.z),Xt=Xt.redIAdd(Xt)}return this.curve.jpoint(Gt,Jt,Xt)},Ht.prototype._threeDbl=function(){var Gt,Jt,Xt;if(this.zOne){var Zt=this.x.redSqr(),er=this.y.redSqr(),tr=er.redSqr(),rr=this.x.redAdd(er).redSqr().redISub(Zt).redISub(tr);rr=rr.redIAdd(rr);var ar=Zt.redAdd(Zt).redIAdd(Zt).redIAdd(this.curve.a),nr=ar.redSqr().redISub(rr).redISub(rr);Gt=nr;var cr=tr.redIAdd(tr);cr=cr.redIAdd(cr),cr=cr.redIAdd(cr),Jt=ar.redMul(rr.redISub(nr)).redISub(cr),Xt=this.y.redAdd(this.y)}else{var fr=this.z.redSqr(),vr=this.y.redSqr(),xr=this.x.redMul(vr),Sr=this.x.redSub(fr).redMul(this.x.redAdd(fr));Sr=Sr.redAdd(Sr).redIAdd(Sr);var Tr=xr.redIAdd(xr);Tr=Tr.redIAdd(Tr);var Br=Tr.redAdd(Tr);Gt=Sr.redSqr().redISub(Br),Xt=this.y.redAdd(this.z).redSqr().redISub(vr).redISub(fr);var jr=vr.redSqr();jr=jr.redIAdd(jr),jr=jr.redIAdd(jr),jr=jr.redIAdd(jr),Jt=Sr.redMul(Tr.redISub(Gt)).redISub(jr)}return this.curve.jpoint(Gt,Jt,Xt)},Ht.prototype._dbl=function(){var Gt=this.curve.a,Jt=this.x,Xt=this.y,Zt=this.z,er=Zt.redSqr().redSqr(),tr=Jt.redSqr(),rr=Xt.redSqr(),ar=tr.redAdd(tr).redIAdd(tr).redIAdd(Gt.redMul(er)),nr=Jt.redAdd(Jt);nr=nr.redIAdd(nr);var cr=nr.redMul(rr),fr=ar.redSqr().redISub(cr.redAdd(cr)),vr=cr.redISub(fr),xr=rr.redSqr();xr=xr.redIAdd(xr),xr=xr.redIAdd(xr),xr=xr.redIAdd(xr);var Sr=ar.redMul(vr).redISub(xr),Tr=Xt.redAdd(Xt).redMul(Zt);return this.curve.jpoint(fr,Sr,Tr)},Ht.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var Gt=this.x.redSqr(),Jt=this.y.redSqr(),Xt=this.z.redSqr(),Zt=Jt.redSqr(),er=Gt.redAdd(Gt).redIAdd(Gt),tr=er.redSqr(),rr=this.x.redAdd(Jt).redSqr().redISub(Gt).redISub(Zt);rr=rr.redIAdd(rr),rr=rr.redAdd(rr).redIAdd(rr),rr=rr.redISub(tr);var ar=rr.redSqr(),nr=Zt.redIAdd(Zt);nr=nr.redIAdd(nr),nr=nr.redIAdd(nr),nr=nr.redIAdd(nr);var cr=er.redIAdd(rr).redSqr().redISub(tr).redISub(ar).redISub(nr),fr=Jt.redMul(cr);fr=fr.redIAdd(fr),fr=fr.redIAdd(fr);var vr=this.x.redMul(ar).redISub(fr);vr=vr.redIAdd(vr),vr=vr.redIAdd(vr);var xr=this.y.redMul(cr.redMul(nr.redISub(cr)).redISub(rr.redMul(ar)));xr=xr.redIAdd(xr),xr=xr.redIAdd(xr),xr=xr.redIAdd(xr);var Sr=this.z.redAdd(rr).redSqr().redISub(Xt).redISub(ar);return this.curve.jpoint(vr,xr,Sr)},Ht.prototype.mul=function(Gt,Jt){return Gt=new _e(Gt,Jt),this.curve._wnafMul(this,Gt)},Ht.prototype.eq=function(Gt){if(Gt.type==="affine")return this.eq(Gt.toJ());if(this===Gt)return!0;var Jt=this.z.redSqr(),Xt=Gt.z.redSqr();if(this.x.redMul(Xt).redISub(Gt.x.redMul(Jt)).cmpn(0)!==0)return!1;var Zt=Jt.redMul(this.z),er=Xt.redMul(Gt.z);return this.y.redMul(er).redISub(Gt.y.redMul(Zt)).cmpn(0)===0},Ht.prototype.eqXToP=function(Gt){var Jt=this.z.redSqr(),Xt=Gt.toRed(this.curve.red).redMul(Jt);if(this.x.cmp(Xt)===0)return!0;for(var Zt=Gt.clone(),er=this.curve.redN.redMul(Jt);;){if(Zt.iadd(this.curve.n),Zt.cmp(this.curve.p)>=0)return!1;if(Xt.redIAdd(er),this.x.cmp(Xt)===0)return!0}},Ht.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},Ht.prototype.isInfinity=function(){return this.z.cmpn(0)===0},short}var mont,hasRequiredMont;function requireMont(){if(hasRequiredMont)return mont;hasRequiredMont=1;var yt=requireBn$1(),_e=requireInherits_browser(),$t=requireBase$1(),Ft=requireUtils$1();function Vt(zt){$t.call(this,"mont",zt),this.a=new yt(zt.a,16).toRed(this.red),this.b=new yt(zt.b,16).toRed(this.red),this.i4=new yt(4).toRed(this.red).redInvm(),this.two=new yt(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}_e(Vt,$t),mont=Vt,Vt.prototype.validate=function(Ht){var Kt=Ht.normalize().x,Gt=Kt.redSqr(),Jt=Gt.redMul(Kt).redAdd(Gt.redMul(this.a)).redAdd(Kt),Xt=Jt.redSqrt();return Xt.redSqr().cmp(Jt)===0};function qt(zt,Ht,Kt){$t.BasePoint.call(this,zt,"projective"),Ht===null&&Kt===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new yt(Ht,16),this.z=new yt(Kt,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return _e(qt,$t.BasePoint),Vt.prototype.decodePoint=function(Ht,Kt){return this.point(Ft.toArray(Ht,Kt),1)},Vt.prototype.point=function(Ht,Kt){return new qt(this,Ht,Kt)},Vt.prototype.pointFromJSON=function(Ht){return qt.fromJSON(this,Ht)},qt.prototype.precompute=function(){},qt.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},qt.fromJSON=function(Ht,Kt){return new qt(Ht,Kt[0],Kt[1]||Ht.one)},qt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>
1491":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},qt.prototype.isInfinity=function(){return this.z.cmpn(0)===0},qt.prototype.dbl=function(){var Ht=this.x.redAdd(this.z),Kt=Ht.redSqr(),Gt=this.x.redSub(this.z),Jt=Gt.redSqr(),Xt=Kt.redSub(Jt),Zt=Kt.redMul(Jt),er=Xt.redMul(Jt.redAdd(this.curve.a24.redMul(Xt)));return this.curve.point(Zt,er)},qt.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},qt.prototype.diffAdd=function(Ht,Kt){var Gt=this.x.redAdd(this.z),Jt=this.x.redSub(this.z),Xt=Ht.x.redAdd(Ht.z),Zt=Ht.x.redSub(Ht.z),er=Zt.redMul(Gt),tr=Xt.redMul(Jt),rr=Kt.z.redMul(er.redAdd(tr).redSqr()),ar=Kt.x.redMul(er.redISub(tr).redSqr());return this.curve.point(rr,ar)},qt.prototype.mul=function(Ht){for(var Kt=Ht.clone(),Gt=this,Jt=this.curve.point(null,null),Xt=this,Zt=[];Kt.cmpn(0)!==0;Kt.iushrn(1))Zt.push(Kt.andln(1));for(var er=Zt.length-1;er>=0;er--)Zt[er]===0?(Gt=Gt.diffAdd(Jt,Xt),Jt=Jt.dbl()):(Jt=Gt.diffAdd(Jt,Xt),Gt=Gt.dbl());return Jt},qt.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},qt.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},qt.prototype.eq=function(Ht){return this.getX().cmp(Ht.getX())===0},qt.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},qt.prototype.getX=function(){return this.normalize(),this.x.fromRed()},mont}var edwards,hasRequiredEdwards;function requireEdwards(){if(hasRequiredEdwards)return edwards;hasRequiredEdwards=1;var yt=requireUtils$1(),_e=requireBn$1(),$t=requireInherits_browser(),Ft=requireBase$1(),Vt=yt.assert;function qt(Ht){this.twisted=(Ht.a|0)!==1,this.mOneA=this.twisted&&(Ht.a|0)===-1,this.extended=this.mOneA,Ft.call(this,"edwards",Ht),this.a=new _e(Ht.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new _e(Ht.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new _e(Ht.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),Vt(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(Ht.c|0)===1}$t(qt,Ft),edwards=qt,qt.prototype._mulA=function(Kt){return this.mOneA?Kt.redNeg():this.a.redMul(Kt)},qt.prototype._mulC=function(Kt){return this.oneC?Kt:this.c.redMul(Kt)},qt.prototype.jpoint=function(Kt,Gt,Jt,Xt){return this.point(Kt,Gt,Jt,Xt)},qt.prototype.pointFromX=function(Kt,Gt){Kt=new _e(Kt,16),Kt.red||(Kt=Kt.toRed(this.red));var Jt=Kt.redSqr(),Xt=this.c2.redSub(this.a.redMul(Jt)),Zt=this.one.redSub(this.c2.redMul(this.d).redMul(Jt)),er=Xt.redMul(Zt.redInvm()),tr=er.redSqrt();if(tr.redSqr().redSub(er).cmp(this.zero)!==0)throw new Error("invalid point");var rr=tr.fromRed().isOdd();return(Gt&&!rr||!Gt&&rr)&&(tr=tr.redNeg()),this.point(Kt,tr)},qt.prototype.pointFromY=function(Kt,Gt){Kt=new _e(Kt,16),Kt.red||(Kt=Kt.toRed(this.red));var Jt=Kt.redSqr(),Xt=Jt.redSub(this.c2),Zt=Jt.redMul(this.d).redMul(this.c2).redSub(this.a),er=Xt.redMul(Zt.redInvm());if(er.cmp(this.zero)===0){if(Gt)throw new Error("invalid point");return this.point(this.zero,Kt)}var tr=er.redSqrt();if(tr.redSqr().redSub(er).cmp(this.zero)!==0)throw new Error("invalid point");return tr.fromRed().isOdd()!==Gt&&(tr=tr.redNeg()),this.point(tr,Kt)},qt.prototype.validate=function(Kt){if(Kt.isInfinity())return!0;Kt.normalize();var Gt=Kt.x.redSqr(),Jt=Kt.y.redSqr(),Xt=Gt.redMul(this.a).redAdd(Jt),Zt=this.c2.redMul(this.one.redAdd(this.d.redMul(Gt).redMul(Jt)));return Xt.cmp(Zt)===0};function zt(Ht,Kt,Gt,Jt,Xt){Ft.BasePoint.call(this,Ht,"projective"),Kt===null&&Gt===null&&Jt===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new _e(Kt,16),this.y=new _e(Gt,16),this.z=Jt?new _e(Jt,16):this.curve.one,this.t=Xt&&new _e(Xt,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}return $t(zt,Ft.BasePoint),qt.prototype.pointFromJSON=function(Kt){return zt.fromJSON(this,Kt)},qt.prototype.point=function(Kt,Gt,Jt,Xt){return new zt(this,Kt,Gt,Jt,Xt)},zt.fromJSON=function(Kt,Gt){return new zt(Kt,Gt[0],Gt[1],Gt[2])},zt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>
1491":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},zt.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},zt.prototype._extDbl=function(){var Kt=this.x.redSqr(),Gt=this.y.redSqr(),Jt=this.z.redSqr();Jt=Jt.redIAdd(Jt);var Xt=this.curve._mulA(Kt),Zt=this.x.redAdd(this.y).redSqr().redISub(Kt).redISub(Gt),er=Xt.redAdd(Gt),tr=er.redSub(Jt),rr=Xt.redSub(Gt),ar=Zt.redMul(tr),nr=er.redMul(rr),cr=Zt.redMul(rr),fr=tr.redMul(er);return this.curve.point(ar,nr,fr,cr)},zt.prototype._projDbl=function(){var Kt=this.x.redAdd(this.y).redSqr(),Gt=this.x.redSqr(),Jt=this.y.redSqr(),Xt,Zt,er,tr,rr,ar;if(this.curve.twisted){tr=this.curve._mulA(Gt);var nr=tr.redAdd(Jt);this.zOne?(Xt=Kt.redSub(Gt).redSub(Jt).redMul(nr.redSub(this.curve.two)),Zt=nr.redMul(tr.redSub(Jt)),er=nr.redSqr().redSub(nr).redSub(nr)):(rr=this.z.redSqr(),ar=nr.redSub(rr).redISub(rr),Xt=Kt.redSub(Gt).redISub(Jt).redMul(ar),Zt=nr.redMul(tr.redSub(Jt)),er=nr.redMul(ar))}else tr=Gt.redAdd(Jt),rr=this.curve._mulC(this.z).redSqr(),ar=tr.redSub(rr).redSub(rr),Xt=this.curve._mulC(Kt.redISub(tr)).redMul(ar),Zt=this.curve._mulC(tr).redMul(Gt.redISub(Jt)),er=tr.redMul(ar);return this.curve.point(Xt,Zt,er)},zt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},zt.prototype._extAdd=function(Kt){var Gt=this.y.redSub(this.x).redMul(Kt.y.redSub(Kt.x)),Jt=this.y.redAdd(this.x).redMul(Kt.y.redAdd(Kt.x)),Xt=this.t.redMul(this.curve.dd).redMul(Kt.t),Zt=this.z.redMul(Kt.z.redAdd(Kt.z)),er=Jt.redSub(Gt),tr=Zt.redSub(Xt),rr=Zt.redAdd(Xt),ar=Jt.redAdd(Gt),nr=er.redMul(tr),cr=rr.redMul(ar),fr=er.redMul(ar),vr=tr.redMul(rr);return this.curve.point(nr,cr,vr,fr)},zt.prototype._projAdd=function(Kt){var Gt=this.z.redMul(Kt.z),Jt=Gt.redSqr(),Xt=this.x.redMul(Kt.x),Zt=this.y.redMul(Kt.y),er=this.curve.d.redMul(Xt).redMul(Zt),tr=Jt.redSub(er),rr=Jt.redAdd(er),ar=this.x.redAdd(this.y).redMul(Kt.x.redAdd(Kt.y)).redISub(Xt).redISub(Zt),nr=Gt.redMul(tr).redMul(ar),cr,fr;return this.curve.twisted?(cr=Gt.redMul(rr).redMul(Zt.redSub(this.curve._mulA(Xt))),fr=tr.redMul(rr)):(cr=Gt.redMul(rr).redMul(Zt.redSub(Xt)),fr=this.curve._mulC(tr).redMul(rr)),this.curve.point(nr,cr,fr)},zt.prototype.add=function(Kt){return this.isInfinity()?Kt:Kt.isInfinity()?this:this.curve.extended?this._extAdd(Kt):this._projAdd(Kt)},zt.prototype.mul=function(Kt){return this._hasDoubles(Kt)?this.curve._fixedNafMul(this,Kt):this.curve._wnafMul(this,Kt)},zt.prototype.mulAdd=function(Kt,Gt,Jt){return this.curve._wnafMulAdd(1,[this,Gt],[Kt,Jt],2,!1)},zt.prototype.jmulAdd=function(Kt,Gt,Jt){return this.curve._wnafMulAdd(1,[this,Gt],[Kt,Jt],2,!0)},zt.prototype.normalize=function(){if(this.zOne)return this;var Kt=this.z.redInvm();return this.x=this.x.redMul(Kt),this.y=this.y.redMul(Kt),this.t&&(this.t=this.t.redMul(Kt)),this.z=this.curve.one,this.zOne=!0,this},zt.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},zt.prototype.getX=function(){return this.normalize(),this.x.fromRed()},zt.prototype.getY=function(){return this.normalize(),this.y.fromRed()},zt.prototype.eq=function(Kt){return this===Kt||this.getX().cmp(Kt.getX())===0&&this.getY().cmp(Kt.getY())===0},zt.prototype.eqXToP=function(Kt){var Gt=Kt.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(Gt)===0)return!0;for(var Jt=Kt.clone(),Xt=this.curve.redN.redMul(this.z);;){if(Jt.iadd(this.curve.n),Jt.cmp(this.curve.p)>=0)return!1;if(Gt.redIAdd(Xt),this.x.cmp(Gt)===0)return!0}},zt.prototype.toP=zt.prototype.normalize,zt.prototype.mixedAdd=zt.prototype.add,edwards}var hasRequiredCurve;function requireCurve(){return hasRequiredCurve||(hasRequiredCurve=1,function(yt){var _e=yt;_e.base=requireBase$1(),_e.short=requireShort(),_e.mont=requireMont(),_e.edwards=requireEdwards()}(curve)),curve}var curves={},hash={},utils={},hasRequiredUtils;function requireUtils(){if(hasRequiredUtils)return utils;hasRequiredUtils=1;var yt=requireMinimalisticAssert(),_e=requireInherits_browser();utils.inherits=_e;function $t(sr,or){return(sr.charCodeAt(or)&64512)!==55296||or<0||or+1>=sr.length?!1:(sr.charCodeAt(or+1)&64512)===56320}function Ft(sr,or){if(Array.isArray(sr))return sr.slice();if(!sr)return[];var Qt=[];
1491if(typeof sr=="string")if(or){if(or==="hex")for(sr=sr.replace(/[^a-z0-9]+/ig,""),sr.length%2!==0&&(sr="0"+sr),ur=0;ur<sr.length;ur+=2)Qt.push(parseInt(sr[ur]+sr[ur+1],16))}else for(var ir=0,ur=0;ur<sr.length;ur++){var gr=sr.charCodeAt(ur);gr<128?Qt[ir++]=gr:gr<2048?(Qt[ir++]=gr>>6|192,Qt[ir++]=gr&63|128):$t(sr,ur)?(gr=65536+((gr&1023)<<10)+(sr.charCodeAt(++ur)&1023),Qt[ir++]=gr>>18|240,Qt[ir++]=gr>>12&63|128,Qt[ir++]=gr>>6&63|128,Qt[ir++]=gr&63|128):(Qt[ir++]=gr>>12|224,Qt[ir++]=gr>>6&63|128,Qt[ir++]=gr&63|128)}else for(ur=0;ur<sr.length;ur++)Qt[ur]=sr[ur]|0;return Qt}utils.toArray=Ft;function Vt(sr){for(var or="",Qt=0;Qt<sr.length;Qt++)or+=Ht(sr[Qt].toString(16));return or}utils.toHex=Vt;function qt(sr){var or=sr>>>24|sr>>>8&65280|sr<<8&16711680|(sr&255)<<24;return or>>>0}utils.htonl=qt;function zt(sr,or){for(var Qt="",ir=0;ir<sr.length;ir++){var ur=sr[ir];or==="little"&&(ur=qt(ur)),Qt+=Kt(ur.toString(16))}return Qt}utils.toHex32=zt;function Ht(sr){return sr.length===1?"0"+sr:sr}utils.zero2=Ht;function Kt(sr){return sr.length===7?"0"+sr:sr.length===6?"00"+sr:sr.length===5?"000"+sr:sr.length===4?"0000"+sr:sr.length===3?"00000"+sr:sr.length===2?"000000"+sr:sr.length===1?"0000000"+sr:sr}utils.zero8=Kt;function Gt(sr,or,Qt,ir){var ur=Qt-or;yt(ur%4===0);for(var gr=new Array(ur/4),dr=0,lr=or;dr<gr.length;dr++,lr+=4){var hr;ir==="big"?hr=sr[lr]<<24|sr[lr+1]<<16|sr[lr+2]<<8|sr[lr+3]:hr=sr[lr+3]<<24|sr[lr+2]<<16|sr[lr+1]<<8|sr[lr],gr[dr]=hr>>>0}return gr}utils.join32=Gt;function Jt(sr,or){for(var Qt=new Array(sr.length*4),ir=0,ur=0;ir<sr.length;ir++,ur+=4){var gr=sr[ir];or==="big"?(Qt[ur]=gr>>>24,Qt[ur+1]=gr>>>16&255,Qt[ur+2]=gr>>>8&255,Qt[ur+3]=gr&255):(Qt[ur+3]=gr>>>24,Qt[ur+2]=gr>>>16&255,Qt[ur+1]=gr>>>8&255,Qt[ur]=gr&255)}return Qt}utils.split32=Jt;function Xt(sr,or){return sr>>>or|sr<<32-or}utils.rotr32=Xt;function Zt(sr,or){return sr<<or|sr>>>32-or}utils.rotl32=Zt;function er(sr,or){return sr+or>>>0}utils.sum32=er;function tr(sr,or,Qt){return sr+or+Qt>>>0}utils.sum32_3=tr;function rr(sr,or,Qt,ir){return sr+or+Qt+ir>>>0}utils.sum32_4=rr;function ar(sr,or,Qt,ir,ur){return sr+or+Qt+ir+ur>>>0}utils.sum32_5=ar;function nr(sr,or,Qt,ir){var ur=sr[or],gr=sr[or+1],dr=ir+gr>>>0,lr=(dr<ir?1:0)+Qt+ur;sr[or]=lr>>>0,sr[or+1]=dr}utils.sum64=nr;function cr(sr,or,Qt,ir){var ur=or+ir>>>0,gr=(ur<or?1:0)+sr+Qt;return gr>>>0}utils.sum64_hi=cr;function fr(sr,or,Qt,ir){var ur=or+ir;return ur>>>0}utils.sum64_lo=fr;function vr(sr,or,Qt,ir,ur,gr,dr,lr){var hr=0,wr=or;wr=wr+ir>>>0,hr+=wr<or?1:0,wr=wr+gr>>>0,hr+=wr<gr?1:0,wr=wr+lr>>>0,hr+=wr<lr?1:0;var pr=sr+Qt+ur+dr+hr;return pr>>>0}utils.sum64_4_hi=vr;function xr(sr,or,Qt,ir,ur,gr,dr,lr){var hr=or+ir+gr+lr;return hr>>>0}utils.sum64_4_lo=xr;function Sr(sr,or,Qt,ir,ur,gr,dr,lr,hr,wr){var pr=0,br=or;br=br+ir>>>0,pr+=br<or?1:0,br=br+gr>>>0,pr+=br<gr?1:0,br=br+lr>>>0,pr+=br<lr?1:0,br=br+wr>>>0,pr+=br<wr?1:0;var Dr=sr+Qt+ur+dr+hr+pr;return Dr>>>0}utils.sum64_5_hi=Sr;function Tr(sr,or,Qt,ir,ur,gr,dr,lr,hr,wr){var pr=or+ir+gr+lr+wr;return pr>>>0}utils.sum64_5_lo=Tr;function Br(sr,or,Qt){var ir=or<<32-Qt|sr>>>Qt;return ir>>>0}utils.rotr64_hi=Br;function jr(sr,or,Qt){var ir=sr<<32-Qt|or>>>Qt;return ir>>>0}utils.rotr64_lo=jr;function Rr(sr,or,Qt){return sr>>>Qt}utils.shr64_hi=Rr;function yr(sr,or,Qt){var ir=sr<<32-Qt|or>>>Qt;return ir>>>0}return utils.shr64_lo=yr,utils}var common$1={},hasRequiredCommon$1;function requireCommon$1(){if(hasRequiredCommon$1)return common$1;hasRequiredCommon$1=1;var yt=requireUtils(),_e=requireMinimalisticAssert();function $t(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return common$1.BlockHash=$t,$t.prototype.update=function(Vt,qt){if(Vt=yt.toArray(Vt,qt),this.pending?this.pending=this.pending.concat(Vt):this.pending=Vt,this.pendingTotal+=Vt.length,this.pending.length>=this._delta8){Vt=this.pending;var zt=Vt.length%this._delta8;this.pending=Vt.slice(Vt.length-zt,Vt.length),this.pending.length===0&&(this.pending=null),Vt=yt.join32(Vt,0,Vt.length-zt,this.endian);for(var Ht=0;Ht<Vt.length;Ht+=this._delta32)this._update(Vt,Ht,Ht+this._delta32)}return this},$t.prototype.digest=function(Vt){return this.update(this._pad()),_e(this.pending===null),this._digest(Vt)},$t.prototype._pad=function(){var Vt=this.pendingTotal,qt=this._delta8,zt=qt-(Vt+this.padLength)%qt,Ht=new Array(zt+this.padLength);Ht[0]=128;for(var Kt=1;Kt<zt;Kt++)Ht[Kt]=0;if(Vt<<=3,this.endian==="big"){for(var Gt=8;Gt<this.padLength;Gt++)Ht[Kt++]=0;Ht[Kt++]=0,Ht[Kt++]=0,Ht[Kt++]=0,Ht[Kt++]=0,Ht[Kt++]=Vt>>>24&255,Ht[Kt++]=Vt>>>16&255,Ht[Kt++]=Vt>>>8&255,Ht[Kt++]=Vt&255}else for(Ht[Kt++]=Vt&255,Ht[Kt++]=Vt>>>8&255,Ht[Kt++]=Vt>>>16&255,Ht[Kt++]=Vt>>>24&255,Ht[Kt++]=0,Ht[Kt++]=0,Ht[Kt++]=0,Ht[Kt++]=0,Gt=8;Gt<this.padLength;Gt++)Ht[Kt++]=0;return Ht},common$1}var sha={},common={},hasRequiredCommon;function requireCommon(){if(hasRequiredCommon)return common;hasRequiredCommon=1;var yt=requireUtils(),_e=yt.rotr32;function $t(Jt,Xt,Zt,er){if(Jt===0)return Ft(Xt,Zt,er);if(Jt===1||Jt===3)return qt(Xt,Zt,er);if(Jt===2)return Vt(Xt,Zt,er)}common.ft_1=$t;function Ft(Jt,Xt,Zt){return Jt&Xt^~Jt&Zt}common.ch32=Ft;function Vt(Jt,Xt,Zt){return Jt&Xt^Jt&Zt^Xt&Zt}common.maj32=Vt;function qt(Jt,Xt,Zt){return Jt^Xt^Zt}common.p32=qt;function zt(Jt){return _e(Jt,2)^_e(Jt,13)^_e(Jt,22)}common.s0_256=zt;function Ht(Jt){return _e(Jt,6)^_e(Jt,11)^_e(Jt,25)}common.s1_256=Ht;function Kt(Jt){return _e(Jt,7)^_e(Jt,18)^Jt>>>3}common.g0_256=Kt;function Gt(Jt){return _e(Jt,17)^_e(Jt,19)^Jt>>>10}return common.g1_256=Gt,common}var _1,hasRequired_1;function require_1(){if(hasRequired_1)return _1;hasRequired_1=1;var yt=requireUtils(),_e=requireCommon$1(),$t=requireCommon(),Ft=yt.rotl32,Vt=yt.sum32,qt=yt.sum32_5,zt=$t.ft_1,Ht=_e.BlockH
1491ash,Kt=[1518500249,1859775393,2400959708,3395469782];function Gt(){if(!(this instanceof Gt))return new Gt;Ht.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return yt.inherits(Gt,Ht),_1=Gt,Gt.blockSize=512,Gt.outSize=160,Gt.hmacStrength=80,Gt.padLength=64,Gt.prototype._update=function(Xt,Zt){for(var er=this.W,tr=0;tr<16;tr++)er[tr]=Xt[Zt+tr];for(;tr<er.length;tr++)er[tr]=Ft(er[tr-3]^er[tr-8]^er[tr-14]^er[tr-16],1);var rr=this.h[0],ar=this.h[1],nr=this.h[2],cr=this.h[3],fr=this.h[4];for(tr=0;tr<er.length;tr++){var vr=~~(tr/20),xr=qt(Ft(rr,5),zt(vr,ar,nr,cr),fr,er[tr],Kt[vr]);fr=cr,cr=nr,nr=Ft(ar,30),ar=rr,rr=xr}this.h[0]=Vt(this.h[0],rr),this.h[1]=Vt(this.h[1],ar),this.h[2]=Vt(this.h[2],nr),this.h[3]=Vt(this.h[3],cr),this.h[4]=Vt(this.h[4],fr)},Gt.prototype._digest=function(Xt){return Xt==="hex"?yt.toHex32(this.h,"big"):yt.split32(this.h,"big")},_1}var _256,hasRequired_256;function require_256(){if(hasRequired_256)return _256;hasRequired_256=1;var yt=requireUtils(),_e=requireCommon$1(),$t=requireCommon(),Ft=requireMinimalisticAssert(),Vt=yt.sum32,qt=yt.sum32_4,zt=yt.sum32_5,Ht=$t.ch32,Kt=$t.maj32,Gt=$t.s0_256,Jt=$t.s1_256,Xt=$t.g0_256,Zt=$t.g1_256,er=_e.BlockHash,tr=[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 rr(){if(!(this instanceof rr))return new rr;er.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=tr,this.W=new Array(64)}return yt.inherits(rr,er),_256=rr,rr.blockSize=512,rr.outSize=256,rr.hmacStrength=192,rr.padLength=64,rr.prototype._update=function(nr,cr){for(var fr=this.W,vr=0;vr<16;vr++)fr[vr]=nr[cr+vr];for(;vr<fr.length;vr++)fr[vr]=qt(Zt(fr[vr-2]),fr[vr-7],Xt(fr[vr-15]),fr[vr-16]);var xr=this.h[0],Sr=this.h[1],Tr=this.h[2],Br=this.h[3],jr=this.h[4],Rr=this.h[5],yr=this.h[6],sr=this.h[7];for(Ft(this.k.length===fr.length),vr=0;vr<fr.length;vr++){var or=zt(sr,Jt(jr),Ht(jr,Rr,yr),this.k[vr],fr[vr]),Qt=Vt(Gt(xr),Kt(xr,Sr,Tr));sr=yr,yr=Rr,Rr=jr,jr=Vt(Br,or),Br=Tr,Tr=Sr,Sr=xr,xr=Vt(or,Qt)}this.h[0]=Vt(this.h[0],xr),this.h[1]=Vt(this.h[1],Sr),this.h[2]=Vt(this.h[2],Tr),this.h[3]=Vt(this.h[3],Br),this.h[4]=Vt(this.h[4],jr),this.h[5]=Vt(this.h[5],Rr),this.h[6]=Vt(this.h[6],yr),this.h[7]=Vt(this.h[7],sr)},rr.prototype._digest=function(nr){return nr==="hex"?yt.toHex32(this.h,"big"):yt.split32(this.h,"big")},_256}var _224,hasRequired_224;function require_224(){if(hasRequired_224)return _224;hasRequired_224=1;var yt=requireUtils(),_e=require_256();function $t(){if(!(this instanceof $t))return new $t;_e.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return yt.inherits($t,_e),_224=$t,$t.blockSize=512,$t.outSize=224,$t.hmacStrength=192,$t.padLength=64,$t.prototype._digest=function(Vt){return Vt==="hex"?yt.toHex32(this.h.slice(0,7),"big"):yt.split32(this.h.slice(0,7),"big")},_224}var _512,hasRequired_512;function require_512(){if(hasRequired_512)return _512;hasRequired_512=1;var yt=requireUtils(),_e=requireCommon$1(),$t=requireMinimalisticAssert(),Ft=yt.rotr64_hi,Vt=yt.rotr64_lo,qt=yt.shr64_hi,zt=yt.shr64_lo,Ht=yt.sum64,Kt=yt.sum64_hi,Gt=yt.sum64_lo,Jt=yt.sum64_4_hi,Xt=yt.sum64_4_lo,Zt=yt.sum64_5_hi,er=yt.sum64_5_lo,tr=_e.BlockHash,rr=[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,
14911322822218,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 ar(){if(!(this instanceof ar))return new ar;tr.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=rr,this.W=new Array(160)}yt.inherits(ar,tr),_512=ar,ar.blockSize=1024,ar.outSize=512,ar.hmacStrength=192,ar.padLength=128,ar.prototype._prepareBlock=function(Qt,ir){for(var ur=this.W,gr=0;gr<32;gr++)ur[gr]=Qt[ir+gr];for(;gr<ur.length;gr+=2){var dr=yr(ur[gr-4],ur[gr-3]),lr=sr(ur[gr-4],ur[gr-3]),hr=ur[gr-14],wr=ur[gr-13],pr=jr(ur[gr-30],ur[gr-29]),br=Rr(ur[gr-30],ur[gr-29]),Dr=ur[gr-32],_r=ur[gr-31];ur[gr]=Jt(dr,lr,hr,wr,pr,br,Dr,_r),ur[gr+1]=Xt(dr,lr,hr,wr,pr,br,Dr,_r)}},ar.prototype._update=function(Qt,ir){this._prepareBlock(Qt,ir);var ur=this.W,gr=this.h[0],dr=this.h[1],lr=this.h[2],hr=this.h[3],wr=this.h[4],pr=this.h[5],br=this.h[6],Dr=this.h[7],_r=this.h[8],Nr=this.h[9],kr=this.h[10],Mr=this.h[11],Lr=this.h[12],Cr=this.h[13],Er=this.h[14],Ar=this.h[15];$t(this.k.length===ur.length);for(var zr=0;zr<ur.length;zr+=2){var Vr=Er,Gr=Ar,tn=Tr(_r,Nr),Yr=Br(_r,Nr),Jr=nr(_r,Nr,kr,Mr,Lr),Kr=cr(_r,Nr,kr,Mr,Lr,Cr),Xr=this.k[zr],Qr=this.k[zr+1],un=ur[zr],an=ur[zr+1],sn=Zt(Vr,Gr,tn,Yr,Jr,Kr,Xr,Qr,un,an),vn=er(Vr,Gr,tn,Yr,Jr,Kr,Xr,Qr,un,an);Vr=xr(gr,dr),Gr=Sr(gr,dr),tn=fr(gr,dr,lr,hr,wr),Yr=vr(gr,dr,lr,hr,wr,pr);var gn=Kt(Vr,Gr,tn,Yr),fn=Gt(Vr,Gr,tn,Yr);Er=Lr,Ar=Cr,Lr=kr,Cr=Mr,kr=_r,Mr=Nr,_r=Kt(br,Dr,sn,vn),Nr=Gt(Dr,Dr,sn,vn),br=wr,Dr=pr,wr=lr,pr=hr,lr=gr,hr=dr,gr=Kt(sn,vn,gn,fn),dr=Gt(sn,vn,gn,fn)}Ht(this.h,0,gr,dr),Ht(this.h,2,lr,hr),Ht(this.h,4,wr,pr),Ht(this.h,6,br,Dr),Ht(this.h,8,_r,Nr),Ht(this.h,10,kr,Mr),Ht(this.h,12,Lr,Cr),Ht(this.h,14,Er,Ar)},ar.prototype._digest=function(Qt){return Qt==="hex"?yt.toHex32(this.h,"big"):yt.split32(this.h,"big")};function nr(or,Qt,ir,ur,gr){var dr=or&ir^~or&gr;return dr<0&&(dr+=4294967296),dr}function cr(or,Qt,ir,ur,gr,dr){var lr=Qt&ur^~Qt&dr;return lr<0&&(lr+=4294967296),lr}function fr(or,Qt,ir,ur,gr){var dr=or&ir^or&gr^ir&gr;return dr<0&&(dr+=4294967296),dr}function vr(or,Qt,ir,ur,gr,dr){var lr=Qt&ur^Qt&dr^ur&dr;return lr<0&&(lr+=4294967296),lr}function xr(or,Qt){var ir=Ft(or,Qt,28),ur=Ft(Qt,or,2),gr=Ft(Qt,or,7),dr=ir^ur^gr;return dr<0&&(dr+=4294967296),dr}function Sr(or,Qt){var ir=Vt(or,Qt,28),ur=Vt(Qt,or,2),gr=Vt(Qt,or,7),dr=ir^ur^gr;return dr<0&&(dr+=4294967296),dr}function Tr(or,Qt){var ir=Ft(or,Qt,14),ur=Ft(or,Qt,18),gr=Ft(Qt,or,9),dr=ir^ur^gr;return dr<0&&(dr+=4294967296),dr}function Br(or,Qt){var ir=Vt(or,Qt,14),ur=Vt(or,Qt,18),gr=Vt(Qt,or,9),dr=ir^ur^gr;return dr<0&&(dr+=4294967296),dr}function jr(or,Qt){var ir=Ft(or,Qt,1),ur=Ft(or,Qt,8),gr=qt(or,Qt,7),dr=ir^ur^gr;return dr<0&&(dr+=4294967296),dr}function Rr(or,Qt){var ir=Vt(or,Qt,1),ur=Vt(or,Qt,8),gr=zt(or,Qt,7),dr=ir^ur^gr;return dr<0&&(dr+=4294967296),dr}function yr(or,Qt){var ir=Ft(or,Qt,19),ur=Ft(Qt,or,29),gr=qt(or,Qt,6),dr=ir^ur^gr;return dr<0&&(dr+=4294967296),dr}function sr(or,Qt){var ir=Vt(or,Qt,19),ur=Vt(Qt,or,29),gr=zt(or,Qt,6),dr=ir^ur^gr;return dr<0&&(dr+=4294967296),dr}return _512}var _384,hasRequired_384;function require_384(){if(hasRequired_384)return _384;hasRequired_384=1;var yt=requireUtils(),_e=require_512();function $t(){if(!(this instanceof $t))return new $t;_e.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return yt.inherits($t,_e),_384=$t,$t.blockSize=1024,$t.outSize=384,$t.hmacStrength=192,$t.padLength=128,$t.prototype._digest=function(Vt){return Vt==="hex"?yt.toHex32(this.h.slice(0,12),"big"):yt.split32(this.h.slice(0,12),"big")},_384}var hasRequiredSha;function requireSha(){return hasRequiredSha||(hasRequiredSha=1,sha.sha1=require_1(),sha.sha224=require_224(),sha.sha256=require_256(),sha.sha384=require_384(),sha.sha512=require_512()),sha}var ripemd={},hasRequiredRipemd;function requireRipemd(){if(hasRequiredRipemd)return ripemd;hasRequiredRipemd=1;var yt=requireUtils(),_e=requireCommon$1(),$t=yt.rotl32,Ft=yt.sum32,Vt=yt.sum32_3,qt=yt.sum32_4,zt=_e.BlockH
1491ash;function Ht(){if(!(this instanceof Ht))return new Ht;zt.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}yt.inherits(Ht,zt),ripemd.ripemd160=Ht,Ht.blockSize=512,Ht.outSize=160,Ht.hmacStrength=192,Ht.padLength=64,Ht.prototype._update=function(ar,nr){for(var cr=this.h[0],fr=this.h[1],vr=this.h[2],xr=this.h[3],Sr=this.h[4],Tr=cr,Br=fr,jr=vr,Rr=xr,yr=Sr,sr=0;sr<80;sr++){var or=Ft($t(qt(cr,Kt(sr,fr,vr,xr),ar[Xt[sr]+nr],Gt(sr)),er[sr]),Sr);cr=Sr,Sr=xr,xr=$t(vr,10),vr=fr,fr=or,or=Ft($t(qt(Tr,Kt(79-sr,Br,jr,Rr),ar[Zt[sr]+nr],Jt(sr)),tr[sr]),yr),Tr=yr,yr=Rr,Rr=$t(jr,10),jr=Br,Br=or}or=Vt(this.h[1],vr,Rr),this.h[1]=Vt(this.h[2],xr,yr),this.h[2]=Vt(this.h[3],Sr,Tr),this.h[3]=Vt(this.h[4],cr,Br),this.h[4]=Vt(this.h[0],fr,jr),this.h[0]=or},Ht.prototype._digest=function(ar){return ar==="hex"?yt.toHex32(this.h,"little"):yt.split32(this.h,"little")};function Kt(rr,ar,nr,cr){return rr<=15?ar^nr^cr:rr<=31?ar&nr|~ar&cr:rr<=47?(ar|~nr)^cr:rr<=63?ar&cr|nr&~cr:ar^(nr|~cr)}function Gt(rr){return rr<=15?0:rr<=31?1518500249:rr<=47?1859775393:rr<=63?2400959708:2840853838}function Jt(rr){return rr<=15?1352829926:rr<=31?1548603684:rr<=47?1836072691:rr<=63?2053994217:0}var Xt=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Zt=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],er=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],tr=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return ripemd}var hmac,hasRequiredHmac;function requireHmac(){if(hasRequiredHmac)return hmac;hasRequiredHmac=1;var yt=requireUtils(),_e=requireMinimalisticAssert();function $t(Ft,Vt,qt){if(!(this instanceof $t))return new $t(Ft,Vt,qt);this.Hash=Ft,this.blockSize=Ft.blockSize/8,this.outSize=Ft.outSize/8,this.inner=null,this.outer=null,this._init(yt.toArray(Vt,qt))}return hmac=$t,$t.prototype._init=function(Vt){Vt.length>this.blockSize&&(Vt=new this.Hash().update(Vt).digest()),_e(Vt.length<=this.blockSize);for(var qt=Vt.length;qt<this.blockSize;qt++)Vt.push(0);for(qt=0;qt<Vt.length;qt++)Vt[qt]^=54;for(this.inner=new this.Hash().update(Vt),qt=0;qt<Vt.length;qt++)Vt[qt]^=106;this.outer=new this.Hash().update(Vt)},$t.prototype.update=function(Vt,qt){return this.inner.update(Vt,qt),this},$t.prototype.digest=function(Vt){return this.outer.update(this.inner.digest()),this.outer.digest(Vt)},hmac}var hasRequiredHash;function requireHash(){return hasRequiredHash||(hasRequiredHash=1,function(yt){var _e=yt;_e.utils=requireUtils(),_e.common=requireCommon$1(),_e.sha=requireSha(),_e.ripemd=requireRipemd(),_e.hmac=requireHmac(),_e.sha1=_e.sha.sha1,_e.sha256=_e.sha.sha256,_e.sha224=_e.sha.sha224,_e.sha384=_e.sha.sha384,_e.sha512=_e.sha.sha512,_e.ripemd160=_e.ripemd.ripemd160}(hash)),hash}var secp256k1,hasRequiredSecp256k1;function requireSecp256k1(){return hasRequiredSecp256k1||(hasRequiredSecp256k1=1,secp256k1
vendor: 26,127 bytes, line 1491
1491={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}
1491),secp256k1}var hasRequiredCurves;function requireCurves(){return hasRequiredCurves||(hasRequiredCurves=1,function(yt){var _e=yt,$t=requireHash(),Ft=requireCurve(),Vt=requireUtils$1(),qt=Vt.assert;function zt(Gt){Gt.type==="short"?this.curve=new Ft.short(Gt):Gt.type==="edwards"?this.curve=new Ft.edwards(Gt):this.curve=new Ft.mont(Gt),this.g=this.curve.g,this.n=this.curve.n,this.hash=Gt.hash,qt(this.g.validate(),"Invalid curve"),qt(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}_e.PresetCurve=zt;function Ht(Gt,Jt){Object.defineProperty(_e,Gt,{configurable:!0,enumerable:!0,get:function(){var Xt=new zt(Jt);return Object.defineProperty(_e,Gt,{configurable:!0,enumerable:!0,value:Xt}),Xt}})}Ht("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:$t.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),Ht("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:$t.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),Ht("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:$t.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),Ht("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:$t.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}
vendor: 4,453 bytes, line 1491
1491),Ht("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:$t.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),Ht("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:$t.sha256,gRed:!1,g:["9"]}),Ht("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:$t.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var Kt;try{Kt=requireSecp256k1()}catch{Kt=void 0}Ht("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:$t.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",Kt]})}(curves)),curves}var hmacDrbg,hasRequiredHmacDrbg;function requireHmacDrbg(){if(hasRequiredHmacDrbg)return hmacDrbg;hasRequiredHmacDrbg=1;var yt=requireHash(),_e=requireUtils$2(),$t=requireMinimalisticAssert();function Ft(Vt){if(!(this instanceof Ft))return new Ft(Vt);this.hash=Vt.hash,this.predResist=!!Vt.predResist,this.outLen=this.hash.outSize,this.minEntropy=Vt.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var qt=_e.toArray(Vt.entropy,Vt.entropyEnc||"hex"),zt=_e.toArray(Vt.nonce,Vt.nonceEnc||"hex"),Ht=_e.toArray(Vt.pers,Vt.persEnc||"hex");$t(qt.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(qt,zt,Ht)}return hmacDrbg=Ft,Ft.prototype._init=function(qt,zt,Ht){var Kt=qt.concat(zt).concat(Ht);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var Gt=0;Gt<this.V.length;Gt++)this.K[Gt]=0,this.V[Gt]=1;this._update(Kt),this._reseed=1,this.reseedInterval=281474976710656},Ft.prototype._hmac=function(){return new yt.hmac(this.hash,this.K)},Ft.prototype._update=function(qt){var zt=this._hmac().update(this.V).update([0]);qt&&(zt=zt.update(qt)),this.K=zt.digest(),this.V=this._hmac().update(this.V).digest(),qt&&(this.K=this._hmac().update(this.V).update([1]).update(qt).digest(),this.V=this._hmac().update(this.V).digest())},Ft.prototype.reseed=function(qt,zt,Ht,Kt){typeof zt!="string"&&(Kt=Ht,Ht=zt,zt=null),qt=_e.toArray(qt,zt),Ht=_e.toArray(Ht,Kt),$t(qt.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(qt.concat(Ht||[])),this._reseed=1},Ft.prototype.generate=function(qt,zt,Ht,Kt){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof zt!="string"&&(Kt=Ht,Ht=zt,zt=null),Ht&&(Ht=_e.toArray(Ht,Kt||"hex"),this._update(Ht));for(var Gt=[];Gt.length<qt;)this.V=this._hmac().update(this.V).digest(),Gt=Gt.concat(this.V);var Jt=Gt.slice(0,qt);return this._update(Ht),this._reseed++,_e.encode(Jt,zt)},hmacDrbg}var key$1,hasRequiredKey$1;
1491function requireKey$1(){if(hasRequiredKey$1)return key$1;hasRequiredKey$1=1;var yt=requireBn$1(),_e=requireUtils$1(),$t=_e.assert;function Ft(Vt,qt){this.ec=Vt,this.priv=null,this.pub=null,qt.priv&&this._importPrivate(qt.priv,qt.privEnc),qt.pub&&this._importPublic(qt.pub,qt.pubEnc)}return key$1=Ft,Ft.fromPublic=function(qt,zt,Ht){return zt instanceof Ft?zt:new Ft(qt,{pub:zt,pubEnc:Ht})},Ft.fromPrivate=function(qt,zt,Ht){return zt instanceof Ft?zt:new Ft(qt,{priv:zt,privEnc:Ht})},Ft.prototype.validate=function(){var qt=this.getPublic();return qt.isInfinity()?{result:!1,reason:"Invalid public key"}:qt.validate()?qt.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},Ft.prototype.getPublic=function(qt,zt){return typeof qt=="string"&&(zt=qt,qt=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),zt?this.pub.encode(zt,qt):this.pub},Ft.prototype.getPrivate=function(qt){return qt==="hex"?this.priv.toString(16,2):this.priv},Ft.prototype._importPrivate=function(qt,zt){this.priv=new yt(qt,zt||16),this.priv=this.priv.umod(this.ec.curve.n)},Ft.prototype._importPublic=function(qt,zt){if(qt.x||qt.y){this.ec.curve.type==="mont"?$t(qt.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&$t(qt.x&&qt.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(qt.x,qt.y);return}this.pub=this.ec.curve.decodePoint(qt,zt)},Ft.prototype.derive=function(qt){return qt.validate()||$t(qt.validate(),"public point not validated"),qt.mul(this.priv).getX()},Ft.prototype.sign=function(qt,zt,Ht){return this.ec.sign(qt,this,zt,Ht)},Ft.prototype.verify=function(qt,zt,Ht){return this.ec.verify(qt,zt,this,void 0,Ht)},Ft.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},key$1}var signature$1,hasRequiredSignature$1;function requireSignature$1(){if(hasRequiredSignature$1)return signature$1;hasRequiredSignature$1=1;var yt=requireBn$1(),_e=requireUtils$1(),$t=_e.assert;function Ft(Kt,Gt){if(Kt instanceof Ft)return Kt;this._importDER(Kt,Gt)||($t(Kt.r&&Kt.s,"Signature without r or s"),this.r=new yt(Kt.r,16),this.s=new yt(Kt.s,16),Kt.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=Kt.recoveryParam)}signature$1=Ft;function Vt(){this.place=0}function qt(Kt,Gt){var Jt=Kt[Gt.place++];if(!(Jt&128))return Jt;var Xt=Jt&15;if(Xt===0||Xt>4||Kt[Gt.place]===0)return!1;for(var Zt=0,er=0,tr=Gt.place;er<Xt;er++,tr++)Zt<<=8,Zt|=Kt[tr],Zt>>>=0;return Zt<=127?!1:(Gt.place=tr,Zt)}function zt(Kt){for(var Gt=0,Jt=Kt.length-1;!Kt[Gt]&&!(Kt[Gt+1]&128)&&Gt<Jt;)Gt++;return Gt===0?Kt:Kt.slice(Gt)}Ft.prototype._importDER=function(Gt,Jt){Gt=_e.toArray(Gt,Jt);var Xt=new Vt;if(Gt[Xt.place++]!==48)return!1;var Zt=qt(Gt,Xt);if(Zt===!1||Zt+Xt.place!==Gt.length||Gt[Xt.place++]!==2)return!1;var er=qt(Gt,Xt);if(er===!1||Gt[Xt.place]&128)return!1;var tr=Gt.slice(Xt.place,er+Xt.place);if(Xt.place+=er,Gt[Xt.place++]!==2)return!1;var rr=qt(Gt,Xt);if(rr===!1||Gt.length!==rr+Xt.place||Gt[Xt.place]&128)return!1;var ar=Gt.slice(Xt.place,rr+Xt.place);if(tr[0]===0)if(tr[1]&128)tr=tr.slice(1);else return!1;if(ar[0]===0)if(ar[1]&128)ar=ar.slice(1);else return!1;return this.r=new yt(tr),this.s=new yt(ar),this.recoveryParam=null,!0};function Ht(Kt,Gt){if(Gt<128){Kt.push(Gt);return}var Jt=1+(Math.log(Gt)/Math.LN2>>>3);for(Kt.push(Jt|128);--Jt;)Kt.push(Gt>>>(Jt<<3)&255);Kt.push(Gt)}return Ft.prototype.toDER=function(Gt){var Jt=this.r.toArray(),Xt=this.s.toArray();for(Jt[0]&128&&(Jt=[0].concat(Jt)),Xt[0]&128&&(Xt=[0].concat(Xt)),Jt=zt(Jt),Xt=zt(Xt);!Xt[0]&&!(Xt[1]&128);)Xt=Xt.slice(1);var Zt=[2];Ht(Zt,Jt.length),Zt=Zt.concat(Jt),Zt.push(2),Ht(Zt,Xt.length);var er=Zt.concat(Xt),tr=[48];return Ht(tr,er.length),tr=tr.concat(er),_e.encode(tr,Gt)},signature$1}var ec,hasRequiredEc;function requireEc(){if(hasRequiredEc)return ec;hasRequiredEc=1;var yt=requireBn$1(),_e=requireHmacDrbg(),$t=requireUtils$1(),Ft=requireCurves(),Vt=requireBrorand(),qt=$t.assert,zt=requireKey$1(),Ht=requireSignature$1();function Kt(Gt){if(!(this instanceof Kt))return new Kt(Gt);typeof Gt=="string"&&(qt(Object.prototype.hasOwnProperty.call(Ft,Gt),"Unknown curve "+Gt),Gt=Ft[Gt]),Gt instanceof Ft.PresetCurve&&(Gt={curve:Gt}),this.curve=Gt.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=Gt.curve.g,this.g.precompute(Gt.curve.n.bitLength()+1),this.hash=Gt.hash||Gt.curve.hash}return ec=Kt,Kt.prototype.keyPair=function(Jt){return new zt(this,Jt)},Kt.prototype.keyFromPrivate=function(Jt,Xt){return zt.fromPrivate(this,Jt,Xt)},Kt.prototype.keyFromPublic=function(Jt,Xt){return zt.fromPublic(this,Jt,Xt)},Kt.prototype.genKeyPair=function(Jt){Jt||(Jt={});for(var Xt=new _e({hash:this.hash,pers:Jt.pers,persEnc:Jt.persEnc||"utf8",entro
1491py:Jt.entropy||Vt(this.hash.hmacStrength),entropyEnc:Jt.entropy&&Jt.entropyEnc||"utf8",nonce:this.n.toArray()}),Zt=this.n.byteLength(),er=this.n.sub(new yt(2));;){var tr=new yt(Xt.generate(Zt));if(!(tr.cmp(er)>0))return tr.iaddn(1),this.keyFromPrivate(tr)}},Kt.prototype._truncateToN=function(Jt,Xt,Zt){var er;if(yt.isBN(Jt)||typeof Jt=="number")Jt=new yt(Jt,16),er=Jt.byteLength();else if(typeof Jt=="object")er=Jt.length,Jt=new yt(Jt,16);else{var tr=Jt.toString();er=tr.length+1>>>1,Jt=new yt(tr,16)}typeof Zt!="number"&&(Zt=er*8);var rr=Zt-this.n.bitLength();return rr>0&&(Jt=Jt.ushrn(rr)),!Xt&&Jt.cmp(this.n)>=0?Jt.sub(this.n):Jt},Kt.prototype.sign=function(Jt,Xt,Zt,er){if(typeof Zt=="object"&&(er=Zt,Zt=null),er||(er={}),typeof Jt!="string"&&typeof Jt!="number"&&!yt.isBN(Jt)){qt(typeof Jt=="object"&&Jt&&typeof Jt.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),qt(Jt.length>>>0===Jt.length);for(var tr=0;tr<Jt.length;tr++)qt((Jt[tr]&255)===Jt[tr])}Xt=this.keyFromPrivate(Xt,Zt),Jt=this._truncateToN(Jt,!1,er.msgBitLength),qt(!Jt.isNeg(),"Can not sign a negative message");var rr=this.n.byteLength(),ar=Xt.getPrivate().toArray("be",rr),nr=Jt.toArray("be",rr);qt(new yt(nr).eq(Jt),"Can not sign message");for(var cr=new _e({hash:this.hash,entropy:ar,nonce:nr,pers:er.pers,persEnc:er.persEnc||"utf8"}),fr=this.n.sub(new yt(1)),vr=0;;vr++){var xr=er.k?er.k(vr):new yt(cr.generate(this.n.byteLength()));if(xr=this._truncateToN(xr,!0),!(xr.cmpn(1)<=0||xr.cmp(fr)>=0)){var Sr=this.g.mul(xr);if(!Sr.isInfinity()){var Tr=Sr.getX(),Br=Tr.umod(this.n);if(Br.cmpn(0)!==0){var jr=xr.invm(this.n).mul(Br.mul(Xt.getPrivate()).iadd(Jt));if(jr=jr.umod(this.n),jr.cmpn(0)!==0){var Rr=(Sr.getY().isOdd()?1:0)|(Tr.cmp(Br)!==0?2:0);return er.canonical&&jr.cmp(this.nh)>0&&(jr=this.n.sub(jr),Rr^=1),new Ht({r:Br,s:jr,recoveryParam:Rr})}}}}}},Kt.prototype.verify=function(Jt,Xt,Zt,er,tr){tr||(tr={}),Jt=this._truncateToN(Jt,!1,tr.msgBitLength),Zt=this.keyFromPublic(Zt,er),Xt=new Ht(Xt,"hex");var rr=Xt.r,ar=Xt.s;if(rr.cmpn(1)<0||rr.cmp(this.n)>=0||ar.cmpn(1)<0||ar.cmp(this.n)>=0)return!1;var nr=ar.invm(this.n),cr=nr.mul(Jt).umod(this.n),fr=nr.mul(rr).umod(this.n),vr;return this.curve._maxwellTrick?(vr=this.g.jmulAdd(cr,Zt.getPublic(),fr),vr.isInfinity()?!1:vr.eqXToP(rr)):(vr=this.g.mulAdd(cr,Zt.getPublic(),fr),vr.isInfinity()?!1:vr.getX().umod(this.n).cmp(rr)===0)},Kt.prototype.recoverPubKey=function(Gt,Jt,Xt,Zt){qt((3&Xt)===Xt,"The recovery param is more than two bits"),Jt=new Ht(Jt,Zt);var er=this.n,tr=new yt(Gt),rr=Jt.r,ar=Jt.s,nr=Xt&1,cr=Xt>>1;if(rr.cmp(this.curve.p.umod(this.curve.n))>=0&&cr)throw new Error("Unable to find sencond key candinate");cr?rr=this.curve.pointFromX(rr.add(this.curve.n),nr):rr=this.curve.pointFromX(rr,nr);var fr=Jt.r.invm(er),vr=er.sub(tr).mul(fr).umod(er),xr=ar.mul(fr).umod(er);return this.g.mulAdd(vr,rr,xr)},Kt.prototype.getKeyRecoveryParam=function(Gt,Jt,Xt,Zt){if(Jt=new Ht(Jt,Zt),Jt.recoveryParam!==null)return Jt.recoveryParam;for(var er=0;er<4;er++){var tr;try{tr=this.recoverPubKey(Gt,Jt,er)}catch{continue}if(tr.eq(Xt))return er}throw new Error("Unable to find valid recovery factor")},ec}var key,hasRequiredKey;function requireKey(){if(hasRequiredKey)return key;hasRequiredKey=1;var yt=requireUtils$1(),_e=yt.assert,$t=yt.parseBytes,Ft=yt.cachedProperty;function Vt(qt,zt){this.eddsa=qt,this._secret=$t(zt.secret),qt.isPoint(zt.pub)?this._pub=zt.pub:this._pubBytes=$t(zt.pub)}return Vt.fromPublic=function(zt,Ht){return Ht instanceof Vt?Ht:new Vt(zt,{pub:Ht})},Vt.fromSecret=function(zt,Ht){return Ht instanceof Vt?Ht:new Vt(zt,{secret:Ht})},Vt.prototype.secret=function(){return this._secret},Ft(Vt,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),Ft(Vt,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),Ft(Vt,"privBytes",function(){var zt=this.eddsa,Ht=this.hash(),Kt=zt.encodingLength-1,Gt=Ht.slice(0,zt.encodingLength);return Gt[0]&=248,Gt[Kt]&=127,Gt[Kt]|=64,Gt}),Ft(Vt,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),Ft(Vt,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),Ft(Vt,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),Vt.prototype.sign=function(zt){return _e(this._secret,"KeyPair can only verify"),this.eddsa.sign(zt,this)},Vt.prototype.verify=function(zt,Ht){return this.eddsa.verify(zt,Ht,this)},Vt.prototype.getSecret=function(zt){return _e(this._secret,"KeyPair is public only"),yt.encode(this.secret(),zt)},Vt.prototype.getPublic=function(zt){return yt.encode(this.pubBytes(),zt)},key=Vt,key}var signature,hasRequiredSignature;function requireSignature(){if(hasRequiredSignature)return signature;hasRequiredSignature=1;var yt=requireBn$1(),_e=requireUtils$1(),$t=_e.assert,Ft=_e.cachedProperty,Vt=_e.parseBytes;function qt(zt,Ht){this.eddsa=zt,typeof Ht!="object"&&(Ht=Vt(Ht)),Array.isArray(Ht)&&($t(Ht.length===zt.encodingLength*2,"Signature has invali
1491d size"),Ht={R:Ht.slice(0,zt.encodingLength),S:Ht.slice(zt.encodingLength)}),$t(Ht.R&&Ht.S,"Signature without R or S"),zt.isPoint(Ht.R)&&(this._R=Ht.R),Ht.S instanceof yt&&(this._S=Ht.S),this._Rencoded=Array.isArray(Ht.R)?Ht.R:Ht.Rencoded,this._Sencoded=Array.isArray(Ht.S)?Ht.S:Ht.Sencoded}return Ft(qt,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),Ft(qt,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),Ft(qt,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),Ft(qt,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),qt.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},qt.prototype.toHex=function(){return _e.encode(this.toBytes(),"hex").toUpperCase()},signature=qt,signature}var eddsa,hasRequiredEddsa;function requireEddsa(){if(hasRequiredEddsa)return eddsa;hasRequiredEddsa=1;var yt=requireHash(),_e=requireCurves(),$t=requireUtils$1(),Ft=$t.assert,Vt=$t.parseBytes,qt=requireKey(),zt=requireSignature();function Ht(Kt){if(Ft(Kt==="ed25519","only tested with ed25519 so far"),!(this instanceof Ht))return new Ht(Kt);Kt=_e[Kt].curve,this.curve=Kt,this.g=Kt.g,this.g.precompute(Kt.n.bitLength()+1),this.pointClass=Kt.point().constructor,this.encodingLength=Math.ceil(Kt.n.bitLength()/8),this.hash=yt.sha512}return eddsa=Ht,Ht.prototype.sign=function(Gt,Jt){Gt=Vt(Gt);var Xt=this.keyFromSecret(Jt),Zt=this.hashInt(Xt.messagePrefix(),Gt),er=this.g.mul(Zt),tr=this.encodePoint(er),rr=this.hashInt(tr,Xt.pubBytes(),Gt).mul(Xt.priv()),ar=Zt.add(rr).umod(this.curve.n);return this.makeSignature({R:er,S:ar,Rencoded:tr})},Ht.prototype.verify=function(Gt,Jt,Xt){if(Gt=Vt(Gt),Jt=this.makeSignature(Jt),Jt.S().gte(Jt.eddsa.curve.n)||Jt.S().isNeg())return!1;var Zt=this.keyFromPublic(Xt),er=this.hashInt(Jt.Rencoded(),Zt.pubBytes(),Gt),tr=this.g.mul(Jt.S()),rr=Jt.R().add(Zt.pub().mul(er));return rr.eq(tr)},Ht.prototype.hashInt=function(){for(var Gt=this.hash(),Jt=0;Jt<arguments.length;Jt++)Gt.update(arguments[Jt]);return $t.intFromLE(Gt.digest()).umod(this.curve.n)},Ht.prototype.keyFromPublic=function(Gt){return qt.fromPublic(this,Gt)},Ht.prototype.keyFromSecret=function(Gt){return qt.fromSecret(this,Gt)},Ht.prototype.makeSignature=function(Gt){return Gt instanceof zt?Gt:new zt(this,Gt)},Ht.prototype.encodePoint=function(Gt){var Jt=Gt.getY().toArray("le",this.encodingLength);return Jt[this.encodingLength-1]|=Gt.getX().isOdd()?128:0,Jt},Ht.prototype.decodePoint=function(Gt){Gt=$t.parseBytes(Gt);var Jt=Gt.length-1,Xt=Gt.slice(0,Jt).concat(Gt[Jt]&-129),Zt=(Gt[Jt]&128)!==0,er=$t.intFromLE(Xt);return this.curve.pointFromY(er,Zt)},Ht.prototype.encodeInt=function(Gt){return Gt.toArray("le",this.encodingLength)},Ht.prototype.decodeInt=function(Gt){return $t.intFromLE(Gt)},Ht.prototype.isPoint=function(Gt){return Gt instanceof this.pointClass},eddsa}var hasRequiredElliptic;function requireElliptic(){return hasRequiredElliptic||(hasRequiredElliptic=1,function(yt){var _e=yt;
vendor: 14,908 bytes, line 1491
1491_e.version=require$$0$1.version,_e.utils=requireUtils$1(),_e.rand=requireBrorand(),_e.curve=requireCurve(),_e.curves=requireCurves(),_e.ec=requireEc(),_e.eddsa=requireEddsa()}(elliptic)),elliptic}var bn={exports:{}};bn.exports;var hasRequiredBn;function requireBn(){return hasRequiredBn||(hasRequiredBn=1,function(yt){(function(_e,$t){function Ft(or,Qt){if(!or)throw new Error(Qt||"Assertion failed")}function Vt(or,Qt){or.super_=Qt;var ir=function(){};ir.prototype=Qt.prototype,or.prototype=new ir,or.prototype.constructor=or}function qt(or,Qt,ir){if(qt.isBN(or))return or;this.negative=0,this.words=null,this.length=0,this.red=null,or!==null&&((Qt==="le"||Qt==="be")&&(ir=Qt,Qt=10),this._init(or||0,Qt||10,ir||"be"))}typeof _e=="object"?_e.exports=qt:$t.BN=qt,qt.BN=qt,qt.wordSize=26;var zt;try{typeof window<"u"&&typeof window.Buffer<"u"?zt=window.Buffer:zt=require$$1$2.Buffer}catch{}qt.isBN=function(Qt){return Qt instanceof qt?!0:Qt!==null&&typeof Qt=="object"&&Qt.constructor.wordSize===qt.wordSize&&Array.isArray(Qt.words)},qt.max=function(Qt,ir){return Qt.cmp(ir)>0?Qt:ir},qt.min=function(Qt,ir){return Qt.cmp(ir)<0?Qt:ir},qt.prototype._init=function(Qt,ir,ur){if(typeof Qt=="number")return this._initNumber(Qt,ir,ur);if(typeof Qt=="object")return this._initArray(Qt,ir,ur);ir==="hex"&&(ir=16),Ft(ir===(ir|0)&&ir>=2&&ir<=36),Qt=Qt.toString().replace(/\s+/g,"");var gr=0;Qt[0]==="-"&&(gr++,this.negative=1),gr<Qt.length&&(ir===16?this._parseHex(Qt,gr,ur):(this._parseBase(Qt,ir,gr),ur==="le"&&this._initArray(this.toArray(),ir,ur)))},qt.prototype._initNumber=function(Qt,ir,ur){Qt<0&&(this.negative=1,Qt=-Qt),Qt<67108864?(this.words=[Qt&67108863],this.length=1):Qt<4503599627370496?(this.words=[Qt&67108863,Qt/67108864&67108863],this.length=2):(Ft(Qt<9007199254740992),this.words=[Qt&67108863,Qt/67108864&67108863,1],this.length=3),ur==="le"&&this._initArray(this.toArray(),ir,ur)},qt.prototype._initArray=function(Qt,ir,ur){if(Ft(typeof Qt.length=="number"),Qt.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Qt.length/3),this.words=new Array(this.length);for(var gr=0;gr<this.length;gr++)this.words[gr]=0;var dr,lr,hr=0;if(ur==="be")for(gr=Qt.length-1,dr=0;gr>=0;gr-=3)lr=Qt[gr]|Qt[gr-1]<<8|Qt[gr-2]<<16,this.words[dr]|=lr<<hr&67108863,this.words[dr+1]=lr>>>26-hr&67108863,hr+=24,hr>=26&&(hr-=26,dr++);else if(ur==="le")for(gr=0,dr=0;gr<Qt.length;gr+=3)lr=Qt[gr]|Qt[gr+1]<<8|Qt[gr+2]<<16,this.words[dr]|=lr<<hr&67108863,this.words[dr+1]=lr>>>26-hr&67108863,hr+=24,hr>=26&&(hr-=26,dr++);return this._strip()};function Ht(or,Qt){var ir=or.charCodeAt(Qt);if(ir>=48&&ir<=57)return ir-48;if(ir>=65&&ir<=70)return ir-55;if(ir>=97&&ir<=102)return ir-87;Ft(!1,"Invalid character in "+or)}function Kt(or,Qt,ir){var ur=Ht(or,ir);return ir-1>=Qt&&(ur|=Ht(or,ir-1)<<4),ur}qt.prototype._parseHex=function(Qt,ir,ur){this.length=Math.ceil((Qt.length-ir)/6),this.words=new Array(this.length);for(var gr=0;gr<this.length;gr++)this.words[gr]=0;var dr=0,lr=0,hr;if(ur==="be")for(gr=Qt.length-1;gr>=ir;gr-=2)hr=Kt(Qt,ir,gr)<<dr,this.words[lr]|=hr&67108863,dr>=18?(dr-=18,lr+=1,this.words[lr]|=hr>>>26):dr+=8;else{var wr=Qt.length-ir;for(gr=wr%2===0?ir+1:ir;gr<Qt.length;gr+=2)hr=Kt(Qt,ir,gr)<<dr,this.words[lr]|=hr&67108863,dr>=18?(dr-=18,lr+=1,this.words[lr]|=hr>>>26):dr+=8}this._strip()};function Gt(or,Qt,ir,ur){for(var gr=0,dr=0,lr=Math.min(or.length,ir),hr=Qt;hr<lr;hr++){var wr=or.charCodeAt(hr)-48;gr*=ur,wr>=49?dr=wr-49+10:wr>=17?dr=wr-17+10:dr=wr,Ft(wr>=0&&dr<ur,"Invalid character"),gr+=dr}return gr}qt.prototype._parseBase=function(Qt,ir,ur){this.words=[0],this.length=1;for(var gr=0,dr=1;dr<=67108863;dr*=ir)gr++;gr--,dr=dr/ir|0;for(var lr=Qt.length-ur,hr=lr%gr,wr=Math.min(lr,lr-hr)+ur,pr=0,br=ur;br<wr;br+=gr)pr=Gt(Qt,br,br+gr,ir),this.imuln(dr),this.words[0]+pr<67108864?this.words[0]+=pr:this._iaddn(pr);if(hr!==0){var Dr=1;for(pr=Gt(Qt,br,Qt.length,ir),br=0;br<hr;br++)Dr*=ir;this.imuln(Dr),this.words[0]+pr<67108864?this.words[0]+=pr:this._iaddn(pr)}this._strip()},qt.prototype.copy=function(Qt){Qt.words=new Array(this.length);for(var ir=0;ir<this.length;ir++)Qt.words[ir]=this.words[ir];Qt.length=this.length,Qt.negative=this.negative,Qt.red=this.red};function Jt(or,Qt){or.words=Qt.words,or.length=Qt.length,or.negative=Qt.negative,or.red=Qt.red}if(qt.prototype._move=function(Qt){Jt(Qt,this)},qt.prototype.clone=function(){var Qt=new qt(null);return this.copy(Qt),Qt},qt.prototype._expand=function(Qt){for(;this.length<Qt;)this.words[this.length++]=0;return this},qt.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},qt.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{qt.prototype[Symbol.for("nodejs.util.inspect.custom")]=Xt}catch{qt.prototype.inspect=Xt}else qt.prototype.inspect=Xt;function Xt(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var Zt=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],er=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],tr=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];qt.prototype.toString=function(Qt,ir){Qt=Qt||10,ir=ir|0||1;var ur;if(Qt===16||Qt==="hex"){ur="";for(var gr=0,dr=0,lr=0;lr<this.length;lr++){var hr=this.words[lr],wr=((hr<<gr|dr)&16777215).toString(16);dr=hr>>>24-gr&16777215,gr+=2,gr>=26&&(gr-=26,lr--),dr!==0||lr!==this.length-1?ur=Zt[6-wr.length]+wr+ur:ur=wr+ur}for(dr!==0&&(ur=dr.toString(16)+ur);ur.length%ir!==0;)ur="0"+ur;return this.negative!==0&&(ur="-"+ur),ur}if(Qt===(Qt|0)&&Qt>=2&&Qt<=36){var pr=er[Qt],br=tr[Qt];ur="";var Dr=this.clone();for(Dr.negative=0;!Dr.isZero();){var _r=Dr.modrn(br).toString(Qt);Dr=Dr.idivn(br),Dr.isZero()?ur=_r+ur:ur=Zt[pr-_r.length]+_r+ur}for(this.isZero()&&(ur="0"+ur);ur.length%ir!==0;)ur="0"+ur;return this.negative!==0&&(ur="-"+ur),ur}Ft(!1,"Base should be between 2 and 36")},qt.prototype.toNumber=function(){var Qt=this.words[0];return this.length===2?Qt+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Qt+=4503599627370496+this.words[1]*67108864:this.length>2&&Ft(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Qt:Qt},qt.prototype.toJSON=function(){return this.toString(16,2)},zt&&(qt.prototype.toBuffer=function(Qt,ir){return this.toArrayLike(zt,Qt,ir)}),qt.prototype.toArray=function(Qt,ir){return this.toArrayLike(Array,Qt,ir)};var rr=function(Qt,ir){return Qt.allocUnsafe?Qt.allocUnsafe(ir):new Qt(ir)};qt.prototype.toArrayLike=function(Qt,ir,ur){this._strip();var gr=this.byteLength(),dr=ur||Math.max(1,gr);Ft(gr<=dr,"byte array longer than desired length"),Ft(dr>0,"Requested array length <= 0");var lr=rr(Qt,dr),hr=ir==="le"?"LE":"BE";return this["_toArrayLike"+hr](lr,gr),lr},qt.prototype._toArrayLikeLE=function(Qt,ir){for(var ur=0,gr=0,dr=0,lr=0;dr<this.length;dr++){var hr=this.words[dr]<<lr|gr;Qt[ur++]=hr&255,ur<Qt.length&&(Qt[ur++]=hr>>8&255),ur<Qt.length&&(Qt[ur++]=hr>>16&255),lr===6?(ur<Qt.length&&(Qt[ur++]=hr>>24&255),gr=0,lr=0):(gr=hr>>>24,lr+=2)}if(ur<Qt.length)for(Qt[ur++]=gr;ur<Qt.length;)Qt[ur++]=0},qt.prototype._toArrayLikeBE=function(Qt,ir){for(var ur=Qt.length-1,gr=0,dr=0,lr=0;dr<this.length;dr++){var hr=this.words[dr]<<lr|gr;Qt[ur--]=hr&255,ur>=0&&(Qt[ur--]=hr>>8&255),ur>=0&&(Qt[ur--]=hr>>16&255),lr===6?(ur>=0&&(Qt[ur--]=hr>>24&255),gr=0,lr=0):(gr=hr>>>24,lr+=2)}if(ur>=0)for(Qt[ur--]=gr;ur>=0;)Qt[ur--]=0},Math.clz32?qt.prototype._countBits=function(Qt){return 32-Math.clz32(Qt)}:qt.prototype._countBits=function(Qt){var ir=Qt,ur=0;return ir>=4096&&(ur+=13,ir>>>=13),ir>=64&&(ur+=7,ir>>>=7),ir>=8&&(ur+=4,ir>>>=4),ir>=2&&(ur+=2,ir>>>=2),ur+ir},qt.prototype._zeroBits=function(Qt){if(Qt===0)return 26;var ir=Qt,ur=0;return ir&8191||(ur+=13,ir>>>=13),ir&127||(ur+=7,ir>>>=7),ir&15||(ur+=4,ir>>>=4),ir&3||(ur+=2,ir>>>=2),ir&1||ur++,ur},qt.prototype.bitLength=function(){var Qt=this.words[this.length-1],ir=this._countBits(Qt);return(this.length-1)*26+ir};function ar(or){for(var Qt=new Array(or.bitLength()),ir=0;ir<Qt.length;ir++){var ur=ir/26|0,gr=ir%26;Qt[ir]=or.words[ur]>>>gr&1}return Qt}qt.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Qt=0,ir=0;ir<this.length;ir++){var ur=this._zeroBits(this.words[ir]);if(Qt+=ur,ur!==26)break}return Qt},qt.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},qt.prototype.toTwos=function(Qt){return this.negative!==0?this.abs().inotn(Qt).iaddn(1):this.clone()},qt.prototype.fromTwos=function(Qt){return this.testn(Qt-1)?this.notn(Qt).iaddn(1).ineg():this.clone()},qt.prototype.isNeg=function(){return this.negative!==0},qt.prototype.neg=function(){return this.clone().ineg()},qt.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},qt.prototype.iuor=function(Qt){for(;this.length<Qt.length;)this.words[this.length++]=0;for(var ir=0;ir<Qt.length;ir++)this.words[ir]=this.words[ir]|Qt.words[ir];return this._strip()},qt.prototype.ior=function(Qt){return Ft((this.negative|Qt.negative)===0),this.iuor(Qt)},qt.prototype.or=function(Qt){return this.length>Qt.length?this.clone().ior(Qt):Qt.clone().ior(this)},qt.prototype.uor=function(Qt){return this.length>Qt.length?this.clone().iuor(Qt):Qt.clone().iuor(this)},qt.prototype.iuand=function(Qt){var ir;this.length>Qt.length?ir=Qt:ir=this;for(var ur=0;ur<ir.length;ur++)this.words[ur]=this.words[ur]&Qt.words[ur];return this.length=ir.length,this._strip()},qt.prototype.iand=function(Qt){return Ft((this.negative|Qt.negative)===0),this.iuand(Qt)},qt.prototype.and=function(Qt){return this.length>Qt.length?this.clone().iand(Qt):Qt.clone().iand(this)},qt.prototype.uand=function(Qt){return this.length>Qt.length?this.clone().iuand(Qt):Qt.clone().iuand(this)},qt.prototype.iuxor=function(Qt){var ir,ur;this.length>Qt.length?(ir=this,ur=Qt):(ir=Qt,ur=this);for(var gr=0;gr<ur.length;gr++)this.words[gr]=ir.words[gr]^ur.words[gr];if(this!==ir)for(;gr<ir.length;gr++)this.words[gr]=ir.words[gr];return this.length=ir.length,this._strip()},qt.prototype.ixor=function(Qt){return Ft((this.negative|Qt.negative)===0),this.iuxor(Qt)},qt.prototype.xor=function(Qt){return this.length>Qt.length?this.clone().ixor(Qt):Qt.clone().ixor(this)},qt.prototype.uxor=function(Qt){return this.length>Qt.length?this.clone().iuxor(Qt):Qt.clone().iuxor(this)},qt.prototype.inotn=function(Qt){Ft(typeof Qt=="number"&&Qt>=0);var ir=Math.ceil(Qt/26)|0,ur=Qt%26;this._expand(ir),ur>0&&ir--;for(var gr=0;gr<ir;gr++)this.words[gr]=~this.words[gr]&67108863;return ur>0&&(this.words[gr]=~this.words[gr]&67108863>>26-ur),this._strip()},qt.prototype.notn=function(Qt){return this.clone().inotn(Qt)},qt.prototype.setn=function(Qt,ir){Ft(typeof Qt=="number"&&Qt>=0);var ur=Qt/26|0,gr=Qt%26;return this._expand(ur+1),ir?this.words[ur]=this.words[ur]|1<<gr:this.words[ur]=this.words[ur]&~(1<<gr),this._strip()},qt.prototype.iadd=function(Qt){var ir;if(this.negative!==0&&Qt.negative===0)return this.negative=0,ir=this.isub(Qt),this.negative^=1,this._normSign();if(this.negative===0&&Qt.negative!==0)return Qt.negative=0,ir=this.isub(Qt),Qt.negative=1,ir._normSign();var ur,gr;this.length>Qt.length?(ur=this,gr=Qt):(ur=Qt,gr=this);for(var dr=0,lr=0;lr<gr.length;lr++)ir=(ur.words[lr]|0)+(gr.words[lr]|0)+dr,this.words[lr]=ir&67108863,dr=ir>>>26;for(;dr!==0&&lr<ur.length;lr++)ir=(ur.words[lr]|0)+dr,this.words[lr]=ir&67108863,dr=ir>>>26;if(this.length=ur.length,dr!==0)this.words[this.length]=dr,this.length++;else if(ur!==this)for(;lr<ur.length;lr++)this.words[lr]=ur.words[lr];return this},qt.prototype.add=function(Qt){var ir;return Qt.negative!==0&&this.negative===0?(Qt.negative=0,ir=this.sub(Qt),Qt.negative^=1,ir):Qt.negative===0&&this.negative!==0?(this.negative=0,ir=Qt.sub(this),this.negative=1,ir):this.length>Qt.length?this.clone().iadd(Qt):Qt.clone().iadd(this)},qt.prototype.isub=function(Qt){if(Qt.negative!==0){Qt.negative=0;var ir=this.iadd(Qt);return Qt.negative=1,ir._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Qt),this.negative=1,this._normSign();var ur=this.cmp(Qt);if(ur===0)return this.negative=0,this.length=1,this.words[0]=0,this;var gr,dr;ur>0?(gr=this,dr=Qt):(gr=Qt,dr=this);for(var lr=0,hr=0;hr<dr.length;hr++)ir=(gr.words[hr]|0)-(dr.words[hr]|0)+lr,lr=ir>>26,this.words[hr]=ir&67108863;for(;lr!==0&&hr<gr.length;hr++)ir=(gr.words[hr]|0)+lr,lr=ir>>26,this.words[hr]=ir&67108863;if(lr===0&&hr<gr.length&&gr!==this)for(;hr<gr.length;hr++)this.words[hr]=gr.words[hr];return this.length=Math.max(this.length,hr),gr!==this&&(this.negative=1),this._strip()},qt.prototype.sub=function(Qt){return this.clone().isub(Qt)};function nr(or,Qt,ir){ir.negative=Qt.negative^or.negative;var ur=or.length+Qt.length|0;ir.length=ur,ur=ur-1|0;var gr=or.words[0]|0,dr=Qt.words[0]|0,lr=gr*dr,hr=lr&67108863,wr=lr/67108864|0;ir.words[0]=hr;for(var pr=1;pr<ur;pr++){for(var br=wr>>>26,Dr=wr&67108863,_r=Math.min(pr,Qt.length-1),Nr=Math.max(0,pr-or.length+1);Nr<=_r;Nr++){var kr=pr-Nr|0;gr=or.words[kr]|0,dr=Qt.words[Nr]|0,lr=gr*dr+Dr,br+=lr/67108864|0,Dr=lr&67108863}ir.words[pr]=Dr|0,wr=br|0}return wr!==0?ir.words[pr]=wr|0:ir.length--,ir._strip()}var cr=function(Qt,ir,ur){var gr=Qt.words,dr=ir.words,lr=ur.words,hr=0,wr,pr,br,Dr=gr[0]|0,_r=Dr&8191,Nr=Dr>>>13,kr=gr[1]|0,Mr=kr&8191,Lr=kr>>>13,Cr=gr[2]|0,Er=Cr&8191,Ar=Cr>>>13,zr=gr[3]|0,Vr=zr&8191,Gr=zr>>>13,tn=gr[4]|0,Yr=tn&8191,Jr=tn>>>13,Kr=gr[5]|0,Xr=Kr&8191,Qr=Kr>>>13,un=gr[6]|0,an=un&8191,sn=un>>>13,vn=gr[7]|0,gn=vn&8191,fn=vn>>>13,wn=gr[8]|0,dn=wn&8191,Ur=wn>>>13,Ir=gr[9]|0,Pr=Ir&8191,Fr=Ir>>>13,Zr=dr[0]|0,en=Zr&8191,rn=Zr>>>13,En=dr[1]|0,$n=En&8191,mn=En>>>13,Fn=dr[2]|0,_n=Fn&8191,kn=Fn>>>13,Qn=dr[3]|0,Ln=Qn&8191,Cn=Qn>>>13,ro=dr[4]|0,qn=ro&8191,Pn=ro>>>13,ao=dr[5]|0,zn=ao&8191,Mn=ao>>>13,so=dr[6]|0,Or=so&8191,qr=so>>>13,Hr=dr[7]|0,$r=Hr&8191,Wr=Hr>>>13,cn=dr[8]|0,on=cn&8191,ln=cn>>>13,Sn=dr[9]|0,An=Sn&8191,yn=Sn>>>13;ur.negative=Qt.negative^ir.negative,ur.length=19,wr=Math.imul(_r,en),pr=Math.imul(_r,rn),pr=pr+Math.imul(Nr,en)|0,br=Math.imul(Nr,rn);var Zn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Zn>>>26)|0,Zn&=67108863,wr=Math.imul(Mr,en),pr=Math.imul(Mr,rn),pr=pr+Math.imul(Lr,en)|0,br=Math.imul(Lr,rn),wr=wr+Math.imul(_r,$n)|0,pr=pr+Math.imul(_r,mn)|0,pr=pr+Math.imul(Nr,$n)|0,br=br+Math.imul(Nr,mn)|0;var On=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(On>>>
149126)|0,On&=67108863,wr=Math.imul(Er,en),pr=Math.imul(Er,rn),pr=pr+Math.imul(Ar,en)|0,br=Math.imul(Ar,rn),wr=wr+Math.imul(Mr,$n)|0,pr=pr+Math.imul(Mr,mn)|0,pr=pr+Math.imul(Lr,$n)|0,br=br+Math.imul(Lr,mn)|0,wr=wr+Math.imul(_r,_n)|0,pr=pr+Math.imul(_r,kn)|0,pr=pr+Math.imul(Nr,_n)|0,br=br+Math.imul(Nr,kn)|0;var Wn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,wr=Math.imul(Vr,en),pr=Math.imul(Vr,rn),pr=pr+Math.imul(Gr,en)|0,br=Math.imul(Gr,rn),wr=wr+Math.imul(Er,$n)|0,pr=pr+Math.imul(Er,mn)|0,pr=pr+Math.imul(Ar,$n)|0,br=br+Math.imul(Ar,mn)|0,wr=wr+Math.imul(Mr,_n)|0,pr=pr+Math.imul(Mr,kn)|0,pr=pr+Math.imul(Lr,_n)|0,br=br+Math.imul(Lr,kn)|0,wr=wr+Math.imul(_r,Ln)|0,pr=pr+Math.imul(_r,Cn)|0,pr=pr+Math.imul(Nr,Ln)|0,br=br+Math.imul(Nr,Cn)|0;var Hn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Hn>>>26)|0,Hn&=67108863,wr=Math.imul(Yr,en),pr=Math.imul(Yr,rn),pr=pr+Math.imul(Jr,en)|0,br=Math.imul(Jr,rn),wr=wr+Math.imul(Vr,$n)|0,pr=pr+Math.imul(Vr,mn)|0,pr=pr+Math.imul(Gr,$n)|0,br=br+Math.imul(Gr,mn)|0,wr=wr+Math.imul(Er,_n)|0,pr=pr+Math.imul(Er,kn)|0,pr=pr+Math.imul(Ar,_n)|0,br=br+Math.imul(Ar,kn)|0,wr=wr+Math.imul(Mr,Ln)|0,pr=pr+Math.imul(Mr,Cn)|0,pr=pr+Math.imul(Lr,Ln)|0,br=br+Math.imul(Lr,Cn)|0,wr=wr+Math.imul(_r,qn)|0,pr=pr+Math.imul(_r,Pn)|0,pr=pr+Math.imul(Nr,qn)|0,br=br+Math.imul(Nr,Pn)|0;var Gn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Gn>>>26)|0,Gn&=67108863,wr=Math.imul(Xr,en),pr=Math.imul(Xr,rn),pr=pr+Math.imul(Qr,en)|0,br=Math.imul(Qr,rn
1491),wr=wr+Math.imul(Yr,$n)|0,pr=pr+Math.imul(Yr,mn)|0,pr=pr+Math.imul(Jr,$n)|0,br=br+Math.imul(Jr,mn)|0,wr=wr+Math.imul(Vr,_n)|0,pr=pr+Math.imul(Vr,kn)|0,pr=pr+Math.imul(Gr,_n)|0,br=br+Math.imul(Gr,kn)|0,wr=wr+Math.imul(Er,Ln)|0,pr=pr+Math.imul(Er,Cn)|0,pr=pr+Math.imul(Ar,Ln)|0,br=br+Math.imul(Ar,Cn)|0,wr=wr+Math.imul(Mr,qn)|0,pr=pr+Math.imul(Mr,Pn)|0,pr=pr+Math.imul(Lr,qn)|0,br=br+Math.imul(Lr,Pn)|0,wr=wr+Math.imul(_r,zn)|0,pr=pr+Math.imul(_r,Mn)|0,pr=pr+Math.imul(Nr,zn)|0,br=br+Math.imul(Nr,Mn)|0;var Xn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Xn>>>26)|0,Xn&=67108863,wr=Math.imul(an,en),pr=Math.imul(an,rn),pr=pr+Math.imul(sn,en)|0,br=Math.imul(sn,rn),wr=wr+Math.imul(Xr,$n)|0,pr=pr+Math.imul(Xr,mn)|0,pr=pr+Math.imul(Qr,$n)|0,br=br+Math.imul(Qr,mn)|0,wr=wr+Math.imul(Yr,_n)|0,pr=pr+Math.imul(Yr,kn)|0,pr=pr+Math.imul(Jr,_n)|0,br=br+Math.imul(Jr,kn)|0,wr=wr+Math.imul(Vr,Ln)|0,pr=pr+Math.imul(Vr,Cn)|0,pr=pr+Math.imul(Gr,Ln)|0,br=br+Math.imul(Gr,Cn)|0,wr=wr+Math.imul(Er,qn)|0,pr=pr+Math.imul(Er,Pn)|0,pr=pr+Math.imul(Ar,qn)|0,br=br+Math.imul(Ar,Pn)|0,wr=wr+Math.imul(Mr,zn)|0,pr=pr+Math.imul(Mr,Mn)|0,pr=pr+Math.imul(Lr,zn)|0,br=br+Math.imul(Lr,Mn)|0,wr=wr+Math.imul(_r,Or)|0,pr=pr+Math.imul(_r,qr)|0,pr=pr+Math.imul(Nr,Or)|0,br=br+Math.imul(Nr,qr)|0;var Kn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Kn>>>26)|0,Kn&=67108863,wr=Math.imul(gn,en),pr=Math.imul(gn,rn),pr=pr+Math.imul(fn,en)|0,br=Math.imul(fn,rn),wr=wr+Math.imul(an,$n)|0,pr=pr+Math.imul(an,mn)|0,pr=pr+Math.imul(sn,$n)|0,br=br+Math.imul(sn,mn)|0,wr=wr+Math.imul(Xr,_n)|0,pr=pr+Math.imul(Xr,kn)|0,pr=pr+Math.imul(Qr,_n)|0,br=br+Math.imul(Qr,kn)|0,wr=wr+Math.imul(Yr,Ln)|0,pr=pr+Math.imul(Yr,Cn)|0,pr=pr+Math.imul(Jr,Ln)|0,br=br+Math.imul(Jr,Cn)|0,wr=wr+Math.imul(Vr,qn)|0,pr=pr+Math.imul(Vr,Pn)|0,pr=pr+Math.imul(Gr,qn)|0,br=br+Math.imul(Gr,Pn)|0,wr=wr+Math.imul(Er,zn)|0,pr=pr+Math.imul(Er,Mn)|0,pr=pr+Math.imul(Ar,zn)|0,br=br+Math.imul(Ar,Mn)|0,wr=wr+Math.imul(Mr,Or)|0,pr=pr+Math.imul(Mr,qr)|0,pr=pr+Math.imul(Lr,Or)|0,br=br+Math.imul(Lr,qr)|0,wr=wr+Math.imul(_r,$r)|0,pr=pr+Math.imul(_r,Wr)|0,pr=pr+Math.imul(Nr,$r)|0,br=br+Math.imul(Nr,Wr)|0;var Jn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Jn>>>26)|0,Jn&=67108863,wr=Math.imul(dn,en),pr=Math.imul(dn,rn),pr=pr+Math.imul(Ur,en)|0,br=Math.imul(Ur,rn),wr=wr+Math.imul(gn,$n)|0,pr=pr+Math.imul(gn,mn)|0,pr=pr+Math.imul(fn,$n)|0,br=br+Math.imul(fn,mn)|0,wr=wr+Math.imul(an,_n)|0,pr=pr+Math.imul(an,kn)|0,pr=pr+Math.imul(sn,_n)|0,br=br+Math.imul(sn,kn)|0,wr=wr+Math.imul(Xr,Ln)|0,pr=pr+Math.imul(Xr,Cn)|0,pr=pr+Math.imul(Qr,Ln)|0,br=br+Math.imul(Qr,Cn)|0,wr=wr+Math.imul(Yr,qn)|0,pr=pr+Math.imul(Yr,Pn)|0,pr=pr+Math.imul(Jr,qn)|0,br=br+Math.imul(Jr,Pn)|0,wr=wr+Math.imul(Vr,zn)|0,pr=pr+Math.imul(Vr,Mn)|0,pr=pr+Math.imul(Gr,zn)|0,br=br+Math.imul(Gr,Mn)|0,wr=wr+Math.imul(Er,Or)|0,pr=pr+Math.imul(Er,qr)|0,pr=pr+Math.imul(Ar,Or)|0,br=br+Math.imul(Ar,qr)|0,wr=wr+Math.imul(Mr,$r)|0,pr=pr+Math.imul(Mr,Wr)|0,pr=pr+Math.imul(Lr,$r)|0,br=br+Math.imul(Lr,Wr)|0,wr=wr+Math.imul(_r,on)|0,pr=pr+Math.imul(_r,ln)|0,pr=pr+Math.imul(Nr,on)|0,br=br+Math.imul(Nr,ln)|0;var Yn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Yn>>>26)|0,Yn&=67108863,wr=Math.imul(Pr,en),pr=Math.imul(Pr,rn),pr=pr+Math.imul(Fr,en)|0,br=Math.imul(Fr,rn),wr=wr+Math.imul(dn,$n)|0,pr=pr+Math.imul(dn,mn)|0,pr=pr+Math.imul(Ur,$n)|0,br=br+Math.imul(Ur,mn)|0,wr=wr+Math.imul(gn,_n)|0,pr=pr+Math.imul(gn,kn)|0,pr=pr+Math.imul(fn,_n)|0,br=br+Math.imul(fn,kn)|0,wr=wr+Math.imul(an,Ln)|0,pr=pr+Math.imul(an,Cn)|0,pr=pr+Math.imul(sn,Ln)|0,br=br+Math.imul(sn,Cn)|0,wr=wr+Math.imul(Xr,qn)|0,pr=pr+Math.imul(Xr,Pn)|0,pr=pr+Math.imul(Qr,qn)|0,br=br+Math.imul(Qr,Pn)|0,wr=wr+Math.imul(Yr,zn)|0,pr=pr+Math.imul(Yr,Mn)|0,pr=pr+Math.imul(Jr,zn)|0,br=br+Math.imul(Jr,Mn)|0,wr=wr+Math.imul(Vr,Or)|0,pr=pr+Math.imul(Vr,qr)|0,pr=pr+Math.imul(Gr,Or)|0,br=br+Math.imul(Gr,qr)|0,wr=wr+Math.imul(Er,$r)|0,pr=pr+Math.imul(Er,Wr)|0,pr=pr+Math.imul(Ar,$r)|0,br=br+Math.imul(Ar,Wr)|0,wr=wr+Math.imul(Mr,on)|0,pr=pr+Math.imul(Mr,ln)|0,pr=pr+Math.imul(Lr,on)|0,br=br+Math.imul(Lr,ln)|0,wr=wr+Math.imul(_r,An)|0,pr=pr+Math.imul(_r,yn)|0,pr=pr+Math.imul(Nr,An)|0,br=br+Math.imul(Nr,yn)|0;var Nn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,wr=Math.imul(Pr,$n),pr=Math.imul(Pr,mn),pr=pr+Math.imul(Fr,$n)|0,br=Math.imul(Fr,mn),wr=wr+Math.imul(dn,_n)|0,pr=pr+Math.imul(dn,kn)|0,pr=pr+Math.imul(Ur,_n)|0,br=br+Math.imul(Ur,kn)|0,wr=wr+Math.imul(gn,Ln)|0,pr=pr+Math.imul(gn,Cn)|0,pr=pr+Math.imul(fn,Ln)|0,br=br+Math.imul(fn,Cn)|0,wr=wr+Math.imul(an,qn)|0,pr=pr+Math.imul(an,Pn)|0,pr=pr+Math.imul(sn,qn)|0,br=br+Math.imul(sn,Pn)|0,wr=wr+Math.imul(Xr,zn)|0,pr=pr+Math.imul(Xr,Mn)|0,pr=pr+Math.imul(Qr,zn)|0,br=br+Math.imul(Qr,Mn)|0,wr=wr+Math.imul(Yr,Or)|0,pr=pr+Math.imul(Yr,qr)|0,pr=pr+Math.imul(Jr,Or)|0,br=br+Math.imul(Jr,qr)|0,wr=wr+Math.imul(Vr,$r)|0,pr=pr+Math.imul(Vr,Wr)|0,pr=pr+Math.imul(Gr,$r)|0,br=br+Math.imul(Gr,Wr)|0,wr=wr+Math.imul(Er,on)|0,pr=pr+Math.imul(Er,ln)|0,pr=pr+Math.imul(Ar,on)|0,br=br+Math.imul(Ar,ln)|0,wr=wr+Math.imul(Mr,An)|0,pr=pr+Math.imul(Mr,yn)|0,pr=pr+Math.imul(Lr,An)|0,br=br+Math.imul(Lr,yn)|0;var Vn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Vn>>>26)|0,Vn&=67108863,wr=Math.imul(Pr,_n),pr=Math.imul(Pr,kn),pr=pr+Math.imul(Fr,_n)|0,br=Math.imul(Fr,kn),wr=wr+Math.imul(dn,Ln)|0,pr=pr+Math.imul(dn,Cn)|0,pr=pr+Math.imul(Ur,Ln)|0,br=br+Math.imul(Ur,Cn)|0,wr=wr+Math.imul(gn,qn)|0,pr=pr+Math.imul(gn,Pn)|0,pr=pr+Math.imul(fn,qn)|0,br=br+Math.imul(fn,Pn)|0,wr=wr+Math.imul(an,zn
vendor: 23,202 bytes, line 1491
1491)|0,pr=pr+Math.imul(an,Mn)|0,pr=pr+Math.imul(sn,zn)|0,br=br+Math.imul(sn,Mn)|0,wr=wr+Math.imul(Xr,Or)|0,pr=pr+Math.imul(Xr,qr)|0,pr=pr+Math.imul(Qr,Or)|0,br=br+Math.imul(Qr,qr)|0,wr=wr+Math.imul(Yr,$r)|0,pr=pr+Math.imul(Yr,Wr)|0,pr=pr+Math.imul(Jr,$r)|0,br=br+Math.imul(Jr,Wr)|0,wr=wr+Math.imul(Vr,on)|0,pr=pr+Math.imul(Vr,ln)|0,pr=pr+Math.imul(Gr,on)|0,br=br+Math.imul(Gr,ln)|0,wr=wr+Math.imul(Er,An)|0,pr=pr+Math.imul(Er,yn)|0,pr=pr+Math.imul(Ar,An)|0,br=br+Math.imul(Ar,yn)|0;var Dn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Dn>>>26)|0,Dn&=67108863,wr=Math.imul(Pr,Ln),pr=Math.imul(Pr,Cn),pr=pr+Math.imul(Fr,Ln)|0,br=Math.imul(Fr,Cn),wr=wr+Math.imul(dn,qn)|0,pr=pr+Math.imul(dn,Pn)|0,pr=pr+Math.imul(Ur,qn)|0,br=br+Math.imul(Ur,Pn)|0,wr=wr+Math.imul(gn,zn)|0,pr=pr+Math.imul(gn,Mn)|0,pr=pr+Math.imul(fn,zn)|0,br=br+Math.imul(fn,Mn)|0,wr=wr+Math.imul(an,Or)|0,pr=pr+Math.imul(an,qr)|0,pr=pr+Math.imul(sn,Or)|0,br=br+Math.imul(sn,qr)|0,wr=wr+Math.imul(Xr,$r)|0,pr=pr+Math.imul(Xr,Wr)|0,pr=pr+Math.imul(Qr,$r)|0,br=br+Math.imul(Qr,Wr)|0,wr=wr+Math.imul(Yr,on)|0,pr=pr+Math.imul(Yr,ln)|0,pr=pr+Math.imul(Jr,on)|0,br=br+Math.imul(Jr,ln)|0,wr=wr+Math.imul(Vr,An)|0,pr=pr+Math.imul(Vr,yn)|0,pr=pr+Math.imul(Gr,An)|0,br=br+Math.imul(Gr,yn)|0;var jn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(jn>>>26)|0,jn&=67108863,wr=Math.imul(Pr,qn),pr=Math.imul(Pr,Pn),pr=pr+Math.imul(Fr,qn)|0,br=Math.imul(Fr,Pn),wr=wr+Math.imul(dn,zn)|0,pr=pr+Math.imul(dn,Mn)|0,pr=pr+Math.imul(Ur,zn)|0,br=br+Math.imul(Ur,Mn)|0,wr=wr+Math.imul(gn,Or)|0,pr=pr+Math.imul(gn,qr)|0,pr=pr+Math.imul(fn,Or)|0,br=br+Math.imul(fn,qr)|0,wr=wr+Math.imul(an,$r)|0,pr=pr+Math.imul(an,Wr)|0,pr=pr+Math.imul(sn,$r)|0,br=br+Math.imul(sn,Wr)|0,wr=wr+Math.imul(Xr,on)|0,pr=pr+Math.imul(Xr,ln)|0,pr=pr+Math.imul(Qr,on)|0,br=br+Math.imul(Qr,ln)|0,wr=wr+Math.imul(Yr,An)|0,pr=pr+Math.imul(Yr,yn)|0,pr=pr+Math.imul(Jr,An)|0,br=br+Math.imul(Jr,yn)|0;var Un=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Un>>>26)|0,Un&=67108863,wr=Math.imul(Pr,zn),pr=Math.imul(Pr,Mn),pr=pr+Math.imul(Fr,zn)|0,br=Math.imul(Fr,Mn),wr=wr+Math.imul(dn,Or)|0,pr=pr+Math.imul(dn,qr)|0,pr=pr+Math.imul(Ur,Or)|0,br=br+Math.imul(Ur,qr)|0,wr=wr+Math.imul(gn,$r)|0,pr=pr+Math.imul(gn,Wr)|0,pr=pr+Math.imul(fn,$r)|0,br=br+Math.imul(fn,Wr)|0,wr=wr+Math.imul(an,on)|0,pr=pr+Math.imul(an,ln)|0,pr=pr+Math.imul(sn,on)|0,br=br+Math.imul(sn,ln)|0,wr=wr+Math.imul(Xr,An)|0,pr=pr+Math.imul(Xr,yn)|0,pr=pr+Math.imul(Qr,An)|0,br=br+Math.imul(Qr,yn)|0;var Bn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Bn>>>26)|0,Bn&=67108863,wr=Math.imul(Pr,Or),pr=Math.imul(Pr,qr),pr=pr+Math.imul(Fr,Or)|0,br=Math.imul(Fr,qr),wr=wr+Math.imul(dn,$r)|0,pr=pr+Math.imul(dn,Wr)|0,pr=pr+Math.imul(Ur,$r)|0,br=br+Math.imul(Ur,Wr)|0,wr=wr+Math.imul(gn,on)|0,pr=pr+Math.imul(gn,ln)|0,pr=pr+Math.imul(fn,on)|0,br=br+Math.imul(fn,ln)|0,wr=wr+Math.imul(an,An)|0,pr=pr+Math.imul(an,yn)|0,pr=pr+Math.imul(sn,An)|0,br=br+Math.imul(sn,yn)|0;var hn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(hn>>>26)|0,hn&=67108863,wr=Math.imul(Pr,$r),pr=Math.imul(Pr,Wr),pr=pr+Math.imul(Fr,$r)|0,br=Math.imul(Fr,Wr),wr=wr+Math.imul(dn,on)|0,pr=pr+Math.imul(dn,ln)|0,pr=pr+Math.imul(Ur,on)|0,br=br+Math.imul(Ur,ln)|0,wr=wr+Math.imul(gn,An)|0,pr=pr+Math.imul(gn,yn)|0,pr=pr+Math.imul(fn,An)|0,br=br+Math.imul(fn,yn)|0;var pn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(pn>>>26)|0,pn&=67108863,wr=Math.imul(Pr,on),pr=Math.imul(Pr,ln),pr=pr+Math.imul(Fr,on)|0,br=Math.imul(Fr,ln),wr=wr+Math.imul(dn,An)|0,pr=pr+Math.imul(dn,yn)|0,pr=pr+Math.imul(Ur,An)|0,br=br+Math.imul(Ur,yn)|0;var Tn=(hr+wr|0)+((pr&8191)<<13)|0;hr=(br+(pr>>>13)|0)+(Tn>>>26)|0,Tn&=67108863,wr=Math.imul(Pr,An),pr=Math.imul(Pr,yn),pr=pr+Math.imul(Fr,An)|0,br=Math.imul(Fr,yn);var xn=(hr+wr|0)+((pr&8191)<<13)|0;return hr=(br+(pr>>>13)|0)+(xn>>>26)|0,xn&=67108863,lr[0]=Zn,lr[1]=On,lr[2]=Wn,lr[3]=Hn,lr[4]=Gn,lr[5]=Xn,lr[6]=Kn,lr[7]=Jn,lr[8]=Yn,lr[9]=Nn,lr[10]=Vn,lr[11]=Dn,lr[12]=jn,lr[13]=Un,lr[14]=Bn,lr[15]=hn,lr[16]=pn,lr[17]=Tn,lr[18]=xn,hr!==0&&(lr[19]=hr,ur.length++),ur};Math.imul||(cr=nr);function fr(or,Qt,ir){ir.negative=Qt.negative^or.negative,ir.length=or.length+Qt.length;for(var ur=0,gr=0,dr=0;dr<ir.length-1;dr++){var lr=gr;gr=0;for(var hr=ur&67108863,wr=Math.min(dr,Qt.length-1),pr=Math.max(0,dr-or.length+1);pr<=wr;pr++){var br=dr-pr,Dr=or.words[br]|0,_r=Qt.words[pr]|0,Nr=Dr*_r,kr=Nr&67108863;lr=lr+(Nr/67108864|0)|0,kr=kr+hr|0,hr=kr&67108863,lr=lr+(kr>>>26)|0,gr+=lr>>>26,lr&=67108863}ir.words[dr]=hr,ur=lr,lr=gr}return ur!==0?ir.words[dr]=ur:ir.length--,ir._strip()}function vr(or,Qt,ir){return fr(or,Qt,ir)}qt.prototype.mulTo=function(Qt,ir){var ur,gr=this.length+Qt.length;return this.length===10&&Qt.length===10?ur=cr(this,Qt,ir):gr<63?ur=nr(this,Qt,ir):gr<1024?ur=fr(this,Qt,ir):ur=vr(this,Qt,ir),ur},qt.prototype.mul=function(Qt){var ir=new qt(null);return ir.words=new Array(this.length+Qt.length),this.mulTo(Qt,ir)},qt.prototype.mulf=function(Qt){var ir=new qt(null);return ir.words=new Array(this.length+Qt.length),vr(this,Qt,ir)},qt.prototype.imul=function(Qt){return this.clone().mulTo(Qt,this)},qt.prototype.imuln=function(Qt){var ir=Qt<0;ir&&(Qt=-Qt),Ft(typeof Qt=="number"),Ft(Qt<67108864);for(var ur=0,gr=0;gr<this.length;gr++){var dr=(this.words[gr]|0)*Qt,lr=(dr&67108863)+(ur&67108863);ur>>=26,ur+=dr/67108864|0,ur+=lr>>>26,this.words[gr]=lr&67108863}return ur!==0&&(this.words[gr]=ur,this.length++),this.length=Qt===0?1:this.length,ir?this.ineg():this},qt.prototype.muln=function(Qt){return this.clone().imuln(Qt)},qt.prototype.sqr=function(){return this.mul(this)},qt.prototype.isqr=function(){return this.imul(this.clone())},qt.prototype.pow=function(Qt){var ir=ar(Qt);if(ir.length===0)return new qt(1);for(var ur=this,gr=0;gr<ir.length&&ir[gr]===0;gr++,ur=ur.sqr());if(++gr<ir.length)for(var dr=ur.sqr();gr<ir.length;gr++,dr=dr.sqr())ir[gr]!==0&&(ur=ur.mul(dr));return ur},qt.prototype.iushln=function(Qt){Ft(typeof Qt=="number"&&Qt>=0);var ir=Qt%26,ur=(Qt-ir)/26,gr=67108863>>>26-ir<<26-ir,dr;if(ir!==0){var lr=0;for(dr=0;dr<this.length;dr++){var hr=this.words[dr]&gr,wr=(this.words[dr]|0)-hr<<ir;this.words[dr]=wr|lr,lr=hr>>>26-ir}lr&&(this.words[dr]=lr,this.length++)}if(ur!==0){for(dr=this.length-1;dr>=0;dr--)this.words[dr+ur]=this.words[dr];for(dr=0;dr<ur;dr++)this.words[dr]=0;this.length+=ur}return this._strip()},qt.prototype.ishln=function(Qt){return Ft(this.negative===0),this.iushln(Qt)},qt.prototype.iushrn=function(Qt,ir,ur){Ft(typeof Qt=="number"&&Qt>=0);var gr;ir?gr=(ir-ir%26)/26:gr=0;var dr=Qt%26,lr=Math.min((Qt-dr)/26,this.length),hr=67108863^67108863>>>dr<<dr,wr=ur;if(gr-=lr,gr=Math.max(0,gr),wr){for(var pr=0;pr<lr;pr++)wr.words[pr]=this.words[pr];wr.length=lr}if(lr!==0)if(this.length>lr)for(this.length-=lr,pr=0;pr<this.length;pr++)this.words[pr]=this.words[pr+lr];else this.words[0]=0,this.length=1;var br=0;for(pr=this.length-1;pr>=0&&(br!==0||pr>=gr);pr--){var Dr=this.words[pr]|0;this.words[pr]=br<<26-dr|Dr>>>dr,br=Dr&hr}return wr&&br!==0&&(wr.words[wr.length++]=br),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},qt.prototype.ishrn=function(Qt,ir,ur){return Ft(this.negative===0),this.iushrn(Qt,ir,ur)},qt.prototype.shln=function(Qt){return this.clone().ishln(Qt)},qt.prototype.ushln=function(Qt){return this.clone().iushln(Qt)},qt.prototype.shrn=function(Qt){return this.clone().ishrn(Qt)},qt.prototype.ushrn=function(Qt){return this.clone().iushrn(Qt)},qt.prototype.testn=function(Qt){Ft(typeof Qt=="number"&&Qt>=0);var ir=Qt%26,ur=(Qt-ir)/26,gr=1<<ir;if(this.length<=ur)return!1;var dr=this.words[ur];return!!(dr&gr)},qt.prototype.imaskn=function(Qt){Ft(typeof Qt=="number"&&Qt>=0);var ir=Qt%26,ur=(Qt-ir)/26;if(Ft(this.negative===0,"imaskn works only with positive numbers"),this.length<=ur)return this;if(ir!==0&&ur++,this.length=Math.min(ur,this.length),ir!==0){var gr=67108863^67108863>>>ir<<ir;this.words[this.length-1]&=gr}return this._strip()},qt.prototype.maskn=function(Qt){return this.clone().imaskn(Qt)},qt.prototype.iaddn=function(Qt){return Ft(typeof Qt=="number"),Ft(Qt<67108864),Qt<0?this.isubn(-Qt):this.negative!==0?this.length===1&&(this.words[0]|0)<=Qt?(this.words[0]=Qt-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(Qt),this.negative=1,this):this._iaddn(Qt)},qt.prototype._iaddn=function(Qt){this.words[0]+=Qt;for(var ir=0;ir<this.length&&this.words[ir]>=67108864;ir++)this.words[ir]-=67108864,ir===this.length-1?this.words[ir+1]=1:this.words[ir+1]++;return this.length=Math.max(this.length,ir+1),this},qt.prototype.isubn=function(Qt){if(Ft(typeof Qt=="number"),Ft(Qt<67108864),Qt<0)return this.iaddn(-Qt);if(this.negative!==0)return this.negative=0,this.iaddn(Qt),this.negative=1,this;if(this.words[0]-=Qt,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var ir=0;ir<this.length&&this.words[ir]<0;ir++)this.words[ir]+=67108864,this.words[ir+1]-=1;return this._strip()},qt.prototype.addn=function(Qt){return this.clone().iaddn(Qt)},qt.prototype.subn=function(Qt){return this.clone().isubn(Qt)},qt.prototype.iabs=function(){return this.negative=0,this},qt.prototype.abs=function(){return this.clone().iabs()},qt.prototype._ishlnsubmul=function(Qt,ir,ur){var gr=Qt.length+ur,dr;this._expand(gr);var lr,hr=0;for(dr=0;dr<Qt.length;dr++){lr=(this.words[dr+ur]|0)+hr;var wr=(Qt.words[dr]|0)*ir;lr-=wr&67108863,hr=(lr>>26)-(wr/67108864|0),this.words[dr+ur]=lr&67108863}for(;dr<this.length-ur;dr++)lr=(this.words[dr+ur]|0)+hr,hr=lr>>26,this.words[dr+ur]=lr&67108863;if(hr===0)return this._strip();for(Ft(hr===-1),hr=0,dr=0;dr<this.length;dr++)lr=-(this.words[dr]|0)+hr,hr=lr>>26,this.words[dr]=lr&67108863;return this.negative=1,this._strip()},qt.prototype._wordDiv=function(Qt,ir){var ur=this.length-Qt.length,gr=this.clone(),dr=Qt,lr=dr.words[dr.length-1]|0,hr=this._countBits(lr);ur=26-hr,ur!==0&&(dr=dr.ushln(ur),gr.iushln(ur),lr=dr.words[dr.length-1]|0);var wr=gr.length-dr.length,pr;if(ir!=="mod"){pr=new qt(null),pr.length=wr+1,pr.words=new Array(pr.length);for(var br=0;br<pr.length;br++)pr.words[br]=0}var Dr=gr.clone()._ishlnsubmul(dr,1,wr);Dr.negative===0&&(gr=Dr,pr&&(pr.words[wr]=1));for(var _r=wr-1;_r>=0;_r--){var Nr=(gr.words[dr.length+_r]|0)*67108864+(gr.words[dr.length+_r-1]|0);for(Nr=Math.min(Nr/lr|0,67108863),gr._ishlnsubmul(dr,Nr,_r);gr.negative!==0;)Nr--,gr.negative=0,gr._ishlnsubmul(dr,1,_r),gr.isZero()||(gr.negative^=1);pr&&(pr.words[_r]=Nr)}return pr&&pr._strip(),gr._strip(),ir!=="div"&&ur!==0&&gr.iushrn(ur),{div:pr||null,mod:gr}},qt.prototype.divmod=function(Qt,ir,ur){if(Ft(!Qt.isZero()),this.isZero())return{div:new qt(0),mod:new qt(0)};var gr,dr,lr;return this.negative!==0&&Qt.negative===0?(lr=this.neg().divmod(Qt,ir),ir!=="mod"&&(gr=lr.div.neg()),ir!=="div"&&(dr=lr.mod.neg(),ur&&dr.negative!==0&&dr.iadd(Qt)),{div:gr,mod:dr}):this.negative===0&&Qt.negative!==0?(lr=this.divmod(Qt.neg(),ir),ir!=="mod"&&(gr=lr.div.neg()),{div:gr,mod:lr.mod}):this.negative&Qt.negative?(lr=this.neg().divmod(Qt.neg(),ir),ir!=="div"&&(dr=lr.mod.neg(),ur&&dr.negative!==0&&dr.isub(Qt)),{div:lr.div,mod:dr}):Qt.length>this.length||this.cmp(Qt)<0?{div:new qt(0),mod:this}:Qt.length===1?ir==="div"?{div:this.divn(Qt.words[0]),mod:null}:ir==="mod"?{div:null,mod:new qt(this.modrn(Qt.words[0]))}:{div:this.divn(Qt.words[0]),mod:new qt(this.modrn(Qt.words[0]))}:this._wordDiv(Qt,ir)},qt.prototype.div=function(Qt){return this.divmod(Qt,"div",!1).div},qt.prototype.mod=function(Qt){return this.divmod(Qt,"mod",!1).mod},qt.prototype.umod=function(Qt){return this.divmod(Qt,"mod",!0).mod},qt.prototype.divRound=function(Qt){var ir=this.divmod(Qt);if(ir.mod.isZero())return ir.div;var ur=ir.div.negative!==0?ir.mod.isub(Qt):ir.mod,gr=Qt.ushrn(1),dr=Qt.andln(1),lr=ur.cmp(gr);return lr<0||dr===1&&lr===0?ir.div:ir.div.negative!==0?ir.div.isubn(1):ir.div.iaddn(1)},qt.prototype.modrn=function(Qt){var ir=Qt<0;ir&&(Qt=-Qt),Ft(Qt<=67108863);for(var ur=(1<<26)%Qt,gr=0,dr=this.length-1;dr>=0;dr--)gr=(ur*gr+(this.words[dr]|0))%Qt;return ir?-gr:gr},qt.prototype.modn=function(Qt){return this.modrn(Qt)},qt.prototype.idivn=function(Qt){var ir=Qt<0;ir&&(Qt=-Qt),Ft(Qt<=67108863);for(var ur=0,gr=this.length-1;gr>=0;gr--){var dr=(this.words[gr]|0)+ur*67108864;this.words[gr]=dr/Qt|0,ur=dr%Qt}return this._strip(),ir?this.ineg():this},qt.prototype.divn=function(Qt){return this.clone().idivn(Qt)},qt.prototype.egcd=function(Qt){Ft(Qt.negative===0),Ft(!Qt.isZero());var ir=this,ur=Qt.clone();ir.negative!==0?ir=ir.umod(Qt):ir=ir.clone();for(var gr=new qt(1),dr=new qt(0),lr=new qt(0),hr=new qt(1),wr=0;ir.isEven()&&ur.isEven();)ir.iushrn(1),ur.iushrn(1),++wr;for(var pr=ur.clone(),br=ir.clone();!ir.isZero();){for(var Dr=0,_r=1;!(ir.words[0]&_r)&&Dr<26;++Dr,_r<<=1);if(Dr>0)for(ir.iushrn(Dr);Dr-- >0;)(gr.isOdd()||dr.isOdd())&&(gr.iadd(pr),dr.isub(br)),gr.iushrn(1),dr.iushrn(1);for(var Nr=0,kr=1;!(ur.words[0]&kr)&&Nr<26;++Nr,kr<<=1);if(Nr>0)for(ur.iushrn(Nr);Nr-- >0;)(lr.isOdd()||hr.isOdd())&&(lr.iadd(pr),hr.isub(br)),lr.iushrn(1),hr.iushrn(1);ir.cmp(ur)>=0?(ir.isub(ur),gr.isub(lr),dr.isub(hr)):(ur.isub(ir),lr.isub(gr),hr.isub(dr))}return{a:lr,b:hr,gcd:ur.iushln(wr)}},qt.prototype._invmp=function(Qt){Ft(Qt.negative===0),Ft(!Qt.isZero());var ir=this,ur=Qt.clone();ir.negative!==0?ir=ir.umod(Qt):ir=ir.clone();for(var gr=new qt(1),dr=new qt(0),lr=ur.clone();ir.cmpn(1)>0&&ur.cmpn(1)>0;){for(var hr=0,wr=1;!(ir.words[0]&wr)&&hr<26;++hr,wr<<=1);if(hr>0)for(ir.iushrn(hr);hr-- >0;)gr.isOdd()&&gr.iadd(lr),gr.iushrn(1);for(var pr=0,br=1;!(ur.words[0]&br)&&pr<26;++pr,br<<=1);if(pr>0)for(ur.iushrn(pr);pr-- >0;)dr.isOdd()&&dr.iadd(lr),dr.iushrn(1);ir.cmp(ur)>=0?(ir.isub(ur),gr.isub(dr)):(ur.isub(ir),dr.isub(gr))}var Dr;return ir.cmpn(1)===0?Dr=gr:Dr=dr,Dr.cmpn(0)<0&&Dr.iadd(Qt),Dr},qt.prototype.gcd=function(Qt){if(this.isZero())return Qt.abs();if(Qt.isZero())return this.abs();var ir=this.clone(),ur=Qt.clone();ir.negative=0,ur.negative=0;for(var gr=0;ir.isEven()&&ur.isEven();gr++)ir.iushrn(1),ur.iushrn(1);do{for(;ir.isEven();)ir.iushrn(1);for(;ur.isEven();)ur.iushrn(1);var dr=ir.cmp(ur);if(dr<0){var lr=ir;ir=ur,ur=lr}else if(dr===0||ur.cmpn(1)===0)break;ir.isub(ur)}while(!0);return ur.iushln(gr)},qt.prototype.invm=function(Qt){return this.egcd(Qt).a.umod(Qt)},qt.prototype.isEven=function(){return(this.words[0]&1)===0},qt.prototype.isOdd=function(){return(this.words[0]&1)===1},qt.prototype.andln=function(Qt){return this.words[0]&Qt},qt.prototype.bincn=function(Qt){Ft(typeof Qt=="number");var ir=Qt%26,ur=(Qt-ir)/26,gr=1<<ir;if(this.length<=ur)return this._expand(ur+1),this.words[ur]|=gr,this;for(var dr=gr,lr=ur;dr!==0&&lr<this.length;lr++){var hr=this.words[lr]|0;hr+=dr,dr=hr>>>26,hr&=67108863,this.words[lr]=hr}return dr!==0&&(this.words[lr]=dr,this.length++),this},qt.prototype.isZero=function(){return this.length===1&&this.words[0]===0},qt.prototype.cmpn=function(Qt){var ir=Qt<0;if(this.negative!==0&&!ir)return-1;if(this.negative===0&&ir)return 1;this._strip();var ur;if(this.length>1)ur=1;else{ir&&(Qt=-Qt),Ft(Qt<=67108863,"Number is too big");var gr=this.words[0]|0;ur=gr===Qt?0:gr<Qt?-1:1}return this.negative!==0?-ur|0:ur},qt.prototype.cmp=function(Qt){if(this.negative!==0&&Qt.negative===0)return-1;if(this.negative===0&&Qt.negative!==0)return 1;var ir=this.ucmp(Qt);return this.negative!==0?-ir|0:ir},qt.prototype.ucmp=function(Qt){if(this.length>Qt.length)return 1;if(this.length<Qt.length)return-1;for(var ir=0,ur=this.length-1;ur>=0;ur--){var gr=this.words[ur]|0,dr=Qt.words[ur]|0;if(gr!==dr){gr<dr?ir=-1:gr>dr&&(ir=1);break}}return ir},qt.prototype.gtn=function(Qt){return this.cmpn(Qt)===1},qt.prototype.gt=function(Qt){return this.cmp(Qt)===1},qt.prototype.gten=function(Qt){return this.cmpn(Qt)>=0},qt.prototype.gte=function(Qt){return this.cmp(Qt)>=0},qt.prototype.ltn=function(Qt){return this.cmpn(Qt)===-1},qt.prototype.lt=function(Qt){return this.cmp(Qt)===-1},qt.prototype.lten=function(Qt){return this.cmpn(Qt)<=0},qt.prototype.lte=function(Qt){return this.cmp(Qt)<=0},qt.prototype.eqn=function(Qt){return this.cmpn(Qt)===0},qt.prototype.eq=function(Qt){return this.cmp(Qt)===0},qt.red=function(Qt){return new yr(Qt)},qt.prototype.toRed=function(Qt){return Ft(!this.red,"Already a number in reduction context"),Ft(this.negative===0,"red works only with positives"),Qt.convertTo(this)._forceRed(Qt)},qt.prototype.fromRed=function(){return Ft(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},qt.prototype._forceRed=function(Qt){return this.red=Qt,this},qt.prototype.forceRed=function(Qt){return Ft(!this.red,"Already a number in reduction context"),this._forceRed(Qt)},qt.prototype.redAdd=function(Qt){return Ft(this.red,"redAdd works only with red numbers"),this.red.add(this,Qt)},qt.prototype.redIAdd=function(Qt){return Ft(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Qt)},qt.prototype.redSub=function(Qt){return Ft(this.red,"redSub works only with red numbers"),this.red.sub(this,Qt)},qt.prototype.redISub=function(Qt){return Ft(this.red,"redISub works only with red numbers"),this.red.isub(this,Qt)},qt.prototype.redShl=function(Qt){return Ft(this.red,"redShl works only with red numbers"),this.red.shl(this,Qt)},qt.prototype.redMul=function(Qt){return Ft(this.red,"redMul works only with red numbers"),this.red._verify2(this,Qt),this.red.mul(this,Qt)},qt.prototype.redIMul=function(Qt){return Ft(this.red,"redMul works only with red numbers"),this.red._verify2(this,Qt),this.red.imul(this,Qt)},qt.prototype.redSqr=function(){return Ft(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},qt.prototype.redISqr=function(){return Ft(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},qt.prototype.redSqrt=function(){return Ft(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},qt.prototype.redInvm=function(){return Ft(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},qt.prototype.redNeg=function(){return Ft(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},qt.prototype.redPow=function(Qt){return Ft(this.red&&!Qt.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Qt)};var xr={k256:null,p224:null,p192:null,p25519:null};function Sr(or,Qt){this.name=or,this.p=new qt(Qt,16),this.n=this.p.bitLength(),this.k=new qt(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Sr.prototype._tmp=function(){var Qt=new qt(null);return Qt.words=new Array(Math.ceil(this.n/13)),Qt},Sr.prototype.ireduce=function(Qt){var ir=Qt,ur;do this.split(ir,this.tmp),ir=this.imulK(ir),ir=ir.iadd(this.tmp),ur=ir.bitLength();while(ur>this.n);var gr=ur<this.n?-1:ir.ucmp(this.p);return gr===0?(ir.words[0]=0,ir.length=1):gr>0?ir.isub(this.p):ir.strip!==void 0?ir.strip():ir._strip(),ir},Sr.prototype.split=function(Qt,ir){Qt.iushrn(this.n,0,ir)},Sr.prototype.imulK=function(Qt){return Qt.imul(this.k)};function Tr(){Sr.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}Vt(Tr,Sr),Tr.prototype.split=function(Qt,ir){for(var ur=4194303,gr=Math.min(Qt.length,9),dr=0;dr<gr;dr++)ir.words[dr]=Qt.words[dr];if(ir.length=gr,Qt.length<=9){Qt.words[0]=0,Qt.length=1;return}var lr=Qt.words[9];for(ir.words[ir.length++]=lr&ur,dr=10;dr<Qt.length;dr++){var hr=Qt.words[dr]|0;Qt.words[dr-10]=(hr&ur)<<4|lr>>>22,lr=hr}lr>>>=22,Qt.words[dr-10]=lr,lr===0&&Qt.length>10?Qt.length-=10:Qt.length-=9},Tr.prototype.imulK=function(Qt){Qt.words[Qt.length]=0,Qt.words[Qt.length+1]=0,Qt.length+=2;for(var ir=0,ur=0;ur<Qt.length;ur++){var gr=Qt.words[ur]|0;ir+=gr*977,Qt.words[ur]=ir&67108863,ir=gr*64+(ir/67108864|0)}return Qt.words[Qt.length-1]===0&&(Qt.length--,Qt.words[Qt.length-1]===0&&Qt.length--),Qt};function Br(){Sr.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}Vt(Br,Sr);function jr(){Sr.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}Vt(jr,Sr);function Rr(){Sr.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}Vt(Rr,Sr),Rr.prototype.imulK=function(Qt){for(var ir=0,ur=0;ur<Qt.length;ur++){var gr=(Qt.words[ur]|0)*19+ir,dr=gr&67108863;gr>>>=26,Qt.words[ur]=dr,ir=gr}return ir!==0&&(Qt.words[Qt.length++]=ir),Qt},qt._prime=function(Qt){if(xr[Qt])return xr[Qt];var ir;if(Qt==="k256")ir=new Tr;else if(Qt==="p224")ir=new Br;else if(Qt==="p192")ir=new jr;else if(Qt==="p25519")ir=new Rr;else throw new Error("Unknown prime "+Qt);return xr[Qt]=ir,ir};function yr(or){if(typeof or=="string"){var Qt=qt._prime(or);this.m=Qt.p,this.prime=Qt}else Ft(or.gtn(1),"modulus must be greater than 1"),this.m=or,this.prime=null}yr.prototype._verify1=function(Qt){Ft(Qt.negative===0,"red works only with positives"),Ft(Qt.red,"red works only with red numbers")},yr.prototype._verify2=function(Qt,ir){Ft((Qt.negative|ir.negative)===0,"red works only with positives"),Ft(Qt.red&&Qt.red===ir.red,"red works only with red numbers")},yr.prototype.imod=function(Qt){return this.prime?this.prime.ireduce(Qt)._forceRed(this):(Jt(Qt,Qt.umod(this.m)._forceRed(this)),Qt)},yr.prototype.neg=function(Qt){return Qt.isZero()?Qt.clone():this.m.sub(Qt)._forceRed(this)},yr.prototype.add=function(Qt,ir){this._verify2(Qt,ir);var ur=Qt.add(ir);return ur.cmp(this.m)>=0&&ur.isub(this.m),ur._forceRed(this)},yr.prototype.iadd=function(Qt,ir){this._verify2(Qt,ir);var ur=Qt.iadd(ir);return ur.cmp(this.m)>=0&&ur.isub(this.m),ur},yr.prototype.sub=function(Qt,ir){this._verify2(Qt,ir);var ur=Qt.sub(ir);return ur.cmpn(0)<0&&ur.iadd(this.m),ur._forceRed(this)},yr.prototype.isub=function(Qt,ir){this._verify2(Qt,ir);var ur=Qt.isub(ir);return ur.cmpn(0)<0&&ur.iadd(this.m),ur},yr.prototype.shl=function(Qt,ir){return this._verify1(Qt),this.imod(Qt.ushln(ir))},yr.prototype.imul=function(Qt,ir){return this._verify2(Qt,ir),this.imod(Qt.imul(ir))},yr.prototype.mul=function(Qt,ir){return this._verify2(Qt,ir),this.imod(Qt.mul(ir))},yr.prototype.isqr=function(Qt){return this.imul(Qt,Qt.clone())},yr.prototype.sqr=function(Qt){return this.mul(Qt,Qt)},yr.prototype.sqrt=function(Qt){if(Qt.isZero())return Qt.clone();var ir=this.m.andln(3);if(Ft(ir%2===1),ir===3){var ur=this.m.add(new qt(1)).iushrn(2);return this.pow(Qt,ur)}for(var gr=this.m.subn(1),dr=0;!gr.isZero()&&gr.andln(1)===0;)dr++,gr.iushrn(1);Ft(!gr.isZero());var lr=new qt(1).toRed(this),hr=lr.redNeg(),wr=this.m.subn(1).iushrn(1),pr=this.m.bitLength();for(pr=new qt(2*pr*pr).toRed(this);this.pow(pr,wr).cmp(hr)!==0;)pr.redIAdd(hr);for(var br=this.pow(pr,gr),Dr=this.pow(Qt,gr.addn(1).iushrn(1)),_r=this.pow(Qt,gr),Nr=dr;_r.cmp(lr)!==0;){for(var kr=_r,Mr=0;kr.cmp(lr)!==0;Mr++)kr=kr.redSqr();Ft(Mr<Nr);var Lr=this.pow(br,new qt(1).iushln(Nr-Mr-1));Dr=Dr.redMul(Lr),br=Lr.redSqr(),_r=_r.redMul(br),Nr=Mr}return Dr},yr.prototype.invm=function(Qt){var ir=Qt._invmp(this.m);return ir.negative!==0?(ir.negative=0,this.imod(ir).redNeg()):this.imod(ir)},yr.prototype.pow=function(Qt,ir){if(ir.isZero())return new qt(1).toRed(this);if(ir.cmpn(1)===0)return Qt.clone();var ur=4,gr=new Array(1<<ur);gr[0]=new qt(1).toRed(this),gr[1]=Qt;for(var dr=2;dr<gr.length;dr++)gr[dr]=this.mul(gr[dr-1],Qt);var lr=gr[0],hr=0,wr=0,pr=ir.bitLength()%26;
1491for(pr===0&&(pr=26),dr=ir.length-1;dr>=0;dr--){for(var br=ir.words[dr],Dr=pr-1;Dr>=0;Dr--){var _r=br>>Dr&1;if(lr!==gr[0]&&(lr=this.sqr(lr)),_r===0&&hr===0){wr=0;continue}hr<<=1,hr|=_r,wr++,!(wr!==ur&&(dr!==0||Dr!==0))&&(lr=this.mul(lr,gr[hr]),wr=0,hr=0)}pr=26}return lr},yr.prototype.convertTo=function(Qt){var ir=Qt.umod(this.m);return ir===Qt?ir.clone():ir},yr.prototype.convertFrom=function(Qt){var ir=Qt.clone();return ir.red=null,ir},qt.mont=function(Qt){return new sr(Qt)};function sr(or){yr.call(this,or),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new qt(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}Vt(sr,yr),sr.prototype.convertTo=function(Qt){return this.imod(Qt.ushln(this.shift))},sr.prototype.convertFrom=function(Qt){var ir=this.imod(Qt.mul(this.rinv));return ir.red=null,ir},sr.prototype.imul=function(Qt,ir){if(Qt.isZero()||ir.isZero())return Qt.words[0]=0,Qt.length=1,Qt;var ur=Qt.imul(ir),gr=ur.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),dr=ur.isub(gr).iushrn(this.shift),lr=dr;return dr.cmp(this.m)>=0?lr=dr.isub(this.m):dr.cmpn(0)<0&&(lr=dr.iadd(this.m)),lr._forceRed(this)},sr.prototype.mul=function(Qt,ir){if(Qt.isZero()||ir.isZero())return new qt(0)._forceRed(this);var ur=Qt.mul(ir),gr=ur.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),dr=ur.isub(gr).iushrn(this.shift),lr=dr;return dr.cmp(this.m)>=0?lr=dr.isub(this.m):dr.cmpn(0)<0&&(lr=dr.iadd(this.m)),lr._forceRed(this)},sr.prototype.invm=function(Qt){var ir=this.imod(Qt._invmp(this.m).mul(this.r2));return ir._forceRed(this)}})(yt,commonjsGlobal)}(bn)),bn.exports}var asn1$1={},asn1={},api={},vmBrowserify={},hasRequiredVmBrowserify;function requireVmBrowserify(){return hasRequiredVmBrowserify||(hasRequiredVmBrowserify=1,function(exports){var indexOf=function(yt,_e){if(yt.indexOf)return yt.indexOf(_e);for(var $t=0;$t<yt.length;$t++)if(yt[$t]===_e)return $t;return-1},Object_keys=function(yt){if(Object.keys)return Object.keys(yt);var _e=[];for(var $t in yt)_e.push($t);return _e},forEach=function(yt,_e){if(yt.forEach)return yt.forEach(_e);for(var $t=0;$t<yt.length;$t++)_e(yt[$t],$t,yt)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(yt,_e,$t){Object.defineProperty(yt,_e,{writable:!0,enumerable:!1,configurable:!0,value:$t})}}catch{return function(_e,$t,Ft){_e[$t]=Ft}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(_e){if(!(this instanceof Script))return new Script(_e);this.code=_e};Script.prototype.runInContext=function(yt){if(!(yt instanceof Context))throw new TypeError("needs a 'context' argument.");var _e=document.createElement("iframe");_e.style||(_e.style={}),_e.style.display="none",document.body.appendChild(_e);var $t=_e.contentWindow,Ft=$t.eval,Vt=$t.execScript;!Ft&&Vt&&(Vt.call($t,"null"),Ft=$t.eval),forEach(Object_keys(yt),function(Ht){$t[Ht]=yt[Ht]}),forEach(globals,function(Ht){yt[Ht]&&($t[Ht]=yt[Ht])});var qt=Object_keys($t),zt=Ft.call($t,this.code);return forEach(Object_keys($t),function(Ht){(Ht in yt||indexOf(qt,Ht)===-1)&&(yt[Ht]=$t[Ht])}),forEach(globals,function(Ht){Ht in yt||defineProp(yt,Ht,$t[Ht])}),document.body.removeChild(_e),zt},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(yt){var _e=Script.createContext(yt),$t=this.runInContext(_e);return yt&&forEach(Object_keys(_e),function(Ft){yt[Ft]=_e[Ft]}),$t},forEach(Object_keys(Script.prototype),function(yt){exports[yt]=Script[yt]=function(_e){var $t=Script(_e);
1491return $t[yt].apply($t,[].slice.call(arguments,1))}}),exports.isContext=function(yt){return yt instanceof Context},exports.createScript=function(yt){return exports.Script(yt)},exports.createContext=Script.createContext=function(yt){var _e=new Context;return typeof yt=="object"&&forEach(Object_keys(yt),function($t){_e[$t]=yt[$t]}),_e}}(vmBrowserify)),vmBrowserify}var hasRequiredApi;function requireApi(){return hasRequiredApi||(hasRequiredApi=1,function(yt){var _e=requireAsn1$1(),$t=requireInherits_browser(),Ft=yt;Ft.define=function(zt,Ht){return new Vt(zt,Ht)};function Vt(qt,zt){this.name=qt,this.body=zt,this.decoders={},this.encoders={}}Vt.prototype._createNamed=function(zt){var Ht;try{Ht=requireVmBrowserify().runInThisContext("(function "+this.name+`(entity) { 1492 this._initNamed(entity); 1493})`)}catch{Ht=function(Gt){this._initNamed(Gt)}}return $t(Ht,zt),Ht.prototype._initNamed=function(Gt){zt.call(this,Gt)},new Ht(this)},Vt.prototype._getDecoder=function(zt){return zt=zt||"der",this.decoders.hasOwnProperty(zt)||(this.decoders[zt]=this._createNamed(_e.decoders[zt])),this.decoders[zt]},Vt.prototype.decode=function(zt,Ht,Kt){return this._getDecoder(Ht).decode(zt,Kt)},Vt.prototype._getEncoder=function(zt){return zt=zt||"der",this.encoders.hasOwnProperty(zt)||(this.encoders[zt]=this._createNamed(_e.encoders[zt])),this.encoders[zt]},Vt.prototype.encode=function(zt,Ht,Kt){return this._getEncoder(Ht).encode(zt,Kt)}}(api)),api}var base={},reporter={},hasRequiredReporter;function requireReporter(){if(hasRequiredReporter)return reporter;hasRequiredReporter=1;var yt=requireInherits_browser();function _e(Ft){this._reporterState={obj:null,path:[],options:Ft||{},errors:[]}}reporter.Reporter=_e,_e.prototype.isError=function(Vt){return Vt instanceof $t},_e.prototype.save=function(){var Vt=this._reporterState;return{obj:Vt.obj,pathLen:Vt.path.length}},_e.prototype.restore=function(Vt){var qt=this._reporterState;qt.obj=Vt.obj,qt.path=qt.path.slice(0,Vt.pathLen)},_e.prototype.enterKey=function(Vt){return this._reporterState.path.push(Vt)},_e.prototype.exitKey=function(Vt){var qt=this._reporterState;qt.path=qt.path.slice(0,Vt-1)},_e.prototype.leaveKey=function(Vt,qt,zt){var Ht=this._reporterState;this.exitKey(Vt),Ht.obj!==null&&(Ht.obj[qt]=zt)},_e.prototype.path=function(){return this._reporterState.path.join("/")},_e.prototype.enterObject=function(){var Vt=this._reporterState,qt=Vt.obj;return Vt.obj={},qt},_e.prototype.leaveObject=function(Vt){var qt=this._reporterState,zt=qt.obj;return qt.obj=Vt,zt},_e.prototype.error=function(Vt){var qt,zt=this._reporterState,Ht=Vt instanceof $t;if(Ht?qt=Vt:qt=new $t(zt.path.map(function(Kt){return"["+JSON.stringify(Kt)+"]"}).join(""),Vt.message||Vt,Vt.stack),!zt.options.partial)throw qt;return Ht||zt.errors.push(qt),qt},_e.prototype.wrapResult=function(Vt){var qt=this._reporterState;return qt.options.partial?{result:this.isError(Vt)?null:Vt,errors:qt.errors}:Vt};function $t(Ft,Vt){this.path=Ft,this.rethrow(Vt)}return yt($t,Error),$t.prototype.rethrow=function(Vt){if(this.message=Vt+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,$t),!this.stack)try{throw new Error(this.message)}catch(qt){this.stack=qt.stack}return this},reporter}var buffer={},hasRequiredBuffer;function requireBuffer(){if(hasRequiredBuffer)return buffer;hasRequiredBuffer=1;var yt=requireInherits_browser(),_e=requireBase().Reporter,$t=require$$1$2.Buffer;function Ft(qt,zt){if(_e.call(this,zt),!$t.isBuffer(qt)){this.error("Input not Buffer");return}this.base=qt,this.offset=0,this.length=qt.length}yt(Ft,_e),buffer.DecoderBuffer=Ft,Ft.prototype.save=function(){return{offset:this.offset,reporter:_e.prototype.save.call(this)}},Ft.prototype.restore=function(zt){var Ht=new Ft(this.base);return Ht.offset=zt.offset,Ht.length=this.offset,this.offset=zt.offset,_e.prototype.restore.call(this,zt.reporter),Ht},Ft.prototype.isEmpty=function(){return this.offset===this.length},Ft.prototype.readUInt8=function(zt){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(zt||"DecoderBuffer overrun")},Ft.prototype.skip=function(zt,Ht){if(!(this.offset+zt<=this.length))return this.error(Ht||"DecoderBuffer overrun");var Kt=new Ft(this.base);return Kt._reporterState=this._reporterState,Kt.offset=this.offset,Kt.length=this.offset+zt,this.offset+=zt,Kt},Ft.prototype.raw=function(zt){return this.base.slice(zt?zt.offset:this.offset,this.length)};function Vt(qt,zt){if(Array.isArray(qt))this.length=0,this.value=qt.map(function(Ht){return Ht instanceof Vt||(Ht=new Vt(Ht,zt)),this.length+=Ht.length,Ht},this);else if(typeof qt=="number"){if(!(0<=qt&&qt<=255))return zt.error("non-byte EncoderBuffer value");this.value=qt,this.length=1}else if(typeof qt=="string")this.value=qt,this.length=$t.byteLength(qt);else if($t.isBuffer(qt))this.value=qt,this.length=qt.length;else return zt.error("Unsupported type: "+typeof qt)}return buffer.EncoderBuffer=Vt,Vt.prototype.join=function(zt,Ht){return zt||(zt=new $t(this.length)),Ht||(Ht=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(Kt){Kt.join(zt,Ht),Ht+=Kt.length}):(typeof this.value=="number"?zt[Ht]=this.value:typeof this.value=="string"?zt.write(this.value,Ht):$t.isBuffer(this.value)&&this.value.copy(zt,Ht),Ht+=this.length)),zt},buffer}var node,hasRequiredNode;function requireNode(){if(hasRequiredNode)return node;hasRequiredNode=1;var yt=requireBase().Reporter,_e=requireBase().EncoderBuffer,$t=requireBase().DecoderBuffer,Ft=requireMinimalisticAssert(),Vt=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],qt=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(Vt),zt=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Ht(Gt,Jt){var Xt={};this._baseState=Xt,Xt.enc=Gt,Xt.parent=Jt||null,Xt.children=null,Xt.tag=null,Xt.args=null,Xt.reverseArgs=null,Xt.choice=null,Xt.optional=!1,Xt.any=!1,Xt.obj=!1,Xt.use=null,Xt.useDecoder=null,Xt.key=null,Xt.default=null,Xt.explicit=null,Xt.implicit=null,Xt.contains=null,Xt.parent||(Xt.children=[],this._wrap())}node=Ht;var Kt=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];return Ht.prototype.clone=function(){var Jt=this._baseState,Xt={};Kt.forEach(function(er){Xt[er]=Jt[er]});var Zt=new this.constructor(Xt.parent);return Zt._baseState=Xt,Zt},Ht.prototype._wrap=function(){var Jt=this._baseState;qt.forEach(function(Xt){this[Xt]=function(){var er=new this.constructor(this);return Jt.children.push(er),er[Xt].apply(er,arguments)}},this)},Ht.prototype._init=function(Jt){var Xt=this._baseState;Ft(Xt.parent===null),Jt.call(this),Xt.children=Xt.children.filter(function(Zt){return Zt._baseState.parent===this},this),Ft.equal(Xt.children.length,1,"Root node can have only one child")},Ht.prototype._useArgs=function(Jt){var Xt=this._baseState,Zt=Jt.filter(function(er){return er instanceof this.constructor},this);Jt=Jt.filter(function(er){return!(er instanceof this.constructor)},this),Zt.length!==0&&(Ft(Xt.children===null),Xt.children=Zt,Zt.forEach(function(er){er._baseState.parent=this},this)),Jt.length!==0&&(Ft(Xt.args===null),Xt.args=Jt,Xt.reverseArgs=Jt.map(function(er){if(typeof er!="object"||er.constructor!==Object)return er;var tr={};
1493return Object.keys(er).forEach(function(rr){rr==(rr|0)&&(rr|=0);var ar=er[rr];tr[ar]=rr}),tr}))},zt.forEach(function(Gt){Ht.prototype[Gt]=function(){var Xt=this._baseState;throw new Error(Gt+" not implemented for encoding: "+Xt.enc)}}),Vt.forEach(function(Gt){Ht.prototype[Gt]=function(){var Xt=this._baseState,Zt=Array.prototype.slice.call(arguments);return Ft(Xt.tag===null),Xt.tag=Gt,this._useArgs(Zt),this}}),Ht.prototype.use=function(Jt){Ft(Jt);var Xt=this._baseState;return Ft(Xt.use===null),Xt.use=Jt,this},Ht.prototype.optional=function(){var Jt=this._baseState;return Jt.optional=!0,this},Ht.prototype.def=function(Jt){var Xt=this._baseState;return Ft(Xt.default===null),Xt.default=Jt,Xt.optional=!0,this},Ht.prototype.explicit=function(Jt){var Xt=this._baseState;return Ft(Xt.explicit===null&&Xt.implicit===null),Xt.explicit=Jt,this},Ht.prototype.implicit=function(Jt){var Xt=this._baseState;return Ft(Xt.explicit===null&&Xt.implicit===null),Xt.implicit=Jt,this},Ht.prototype.obj=function(){var Jt=this._baseState,Xt=Array.prototype.slice.call(arguments);return Jt.obj=!0,Xt.length!==0&&this._useArgs(Xt),this},Ht.prototype.key=function(Jt){var Xt=this._baseState;return Ft(Xt.key===null),Xt.key=Jt,this},Ht.prototype.any=function(){var Jt=this._baseState;return Jt.any=!0,this},Ht.prototype.choice=function(Jt){var Xt=this._baseState;return Ft(Xt.choice===null),Xt.choice=Jt,this._useArgs(Object.keys(Jt).map(function(Zt){return Jt[Zt]})),this},Ht.prototype.contains=function(Jt){var Xt=this._baseState;return Ft(Xt.use===null),Xt.contains=Jt,this},Ht.prototype._decode=function(Jt,Xt){var Zt=this._baseState;if(Zt.parent===null)return Jt.wrapResult(Zt.children[0]._decode(Jt,Xt));var er=Zt.default,tr=!0,rr=null;if(Zt.key!==null&&(rr=Jt.enterKey(Zt.key)),Zt.optional){var ar=null;if(Zt.explicit!==null?ar=Zt.explicit:Zt.implicit!==null?ar=Zt.implicit:Zt.tag!==null&&(ar=Zt.tag),ar===null&&!Zt.any){var nr=Jt.save();try{Zt.choice===null?this._decodeGeneric(Zt.tag,Jt,Xt):this._decodeChoice(Jt,Xt),tr=!0}catch{tr=!1}Jt.restore(nr)}else if(tr=this._peekTag(Jt,ar,Zt.any),Jt.isError(tr))return tr}var cr;if(Zt.obj&&tr&&(cr=Jt.enterObject()),tr){if(Zt.explicit!==null){var fr=this._decodeTag(Jt,Zt.explicit);if(Jt.isError(fr))return fr;Jt=fr}var vr=Jt.offset;if(Zt.use===null&&Zt.choice===null){if(Zt.any)var nr=Jt.save();var xr=this._decodeTag(Jt,Zt.implicit!==null?Zt.implicit:Zt.tag,Zt.any);if(Jt.isError(xr))return xr;Zt.any?er=Jt.raw(nr):Jt=xr}if(Xt&&Xt.track&&Zt.tag!==null&&Xt.track(Jt.path(),vr,Jt.length,"tagged"),Xt&&Xt.track&&Zt.tag!==null&&Xt.track(Jt.path(),Jt.offset,Jt.length,"content"),Zt.any?er=er:Zt.choice===null?er=this._decodeGeneric(Zt.tag,Jt,Xt):er=this._decodeChoice(Jt,Xt),Jt.isError(er))return er;if(!Zt.any&&Zt.choice===null&&Zt.children!==null&&Zt.children.forEach(function(Br){Br._decode(Jt,Xt)}),Zt.contains&&(Zt.tag==="octstr"||Zt.tag==="bitstr")){var Sr=new $t(er);er=this._getUse(Zt.contains,Jt._reporterState.obj)._decode(Sr,Xt)}}return Zt.obj&&tr&&(er=Jt.leaveObject(cr)),Zt.key!==null&&(er!==null||tr===!0)?Jt.leaveKey(rr,Zt.key,er):rr!==null&&Jt.exitKey(rr),er},Ht.prototype._decodeGeneric=function(Jt,Xt,Zt){var er=this._baseState;return Jt==="seq"||Jt==="set"?null:Jt==="seqof"||Jt==="setof"?this._decodeList(Xt,Jt,er.args[0],Zt):/str$/.test(Jt)?this._decodeStr(Xt,Jt,Zt):Jt==="objid"&&er.args?this._decodeObjid(Xt,er.args[0],er.args[1],Zt):Jt==="objid"?this._decodeObjid(Xt,null,null,Zt):Jt==="gentime"||Jt==="utctime"?this._decodeTime(Xt,Jt,Zt):Jt==="null_"?this._decodeNull(Xt,Zt):Jt==="bool"?this._decodeBool(Xt,Zt):Jt==="objDesc"?this._decodeStr(Xt,Jt,Zt):Jt==="int"||Jt==="enum"?this._decodeInt(Xt,er.args&&er.args[0],Zt):er.use!==null?this._getUse(er.use,Xt._reporterState.obj)._decode(Xt,Zt):Xt.error("unknown tag: "+Jt)},Ht.prototype._getUse=function(Jt,Xt){var Zt=this._baseState;return Zt.useDecoder=this._use(Jt,Xt),Ft(Zt.useDecoder._baseState.parent===null),Zt.useDecoder=Zt.useDecoder._baseState.children[0],Zt.implicit!==Zt.useDecoder._baseState.implicit&&(Zt.useDecoder=Zt.useDecoder.clone(),Zt.useDecoder._baseState.implicit=Zt.implicit),Zt.useDecoder},Ht.prototype._decodeChoice=function(Jt,Xt){var Zt=this._baseState,er=null,tr=!1;return Object.keys(Zt.choice).some(function(rr){var ar=Jt.save(),nr=Zt.choice[rr];try{var cr=nr._decode(Jt,Xt);if(Jt.isError(cr))return!1;er={type:rr,value:cr},tr=!0}catch{return Jt.restore(ar),!1}return!0},this),tr?er:Jt.error("Choice not matched")},Ht.prototype._createEncoderBuffer=function(Jt){return new _e(Jt,this.reporter)},Ht.prototype._encode=function(Jt,Xt,Zt){var er=this._baseState;if(!(er.default!==null&&er.default===Jt)){var tr=this._encodeValue(Jt,Xt,Zt);if(tr!==void 0&&!this._skipDefault(tr,Xt,Zt))return tr}},Ht.prototype._encodeValue=function(Jt,Xt,Zt){var er=this._baseState;if(er.parent===null)return er.children[0]._encode(Jt,Xt||new yt);var nr=null;if(this.reporter=Xt,er.optional&&Jt===void 0)if(er.default!==null)Jt=er.default;else return;var tr=null,rr=!1;if(er.any)nr=this._createEncoderBuffer(Jt);else if(er.choice)nr=this._encodeChoice(Jt,Xt);else if(er.contains)tr=this._getUse(er.contains,Zt)._encode(Jt,Xt),rr=!0;else if(er.children)tr=er.children.map(function(vr){if(vr._baseState.tag==="null_")return vr._encode(null,Xt,Jt);if(vr._baseState.key===null)return Xt.error("Child should have a key");var xr=Xt.enterKey(vr._baseState.key);if(typeof Jt!="object")return Xt.error("Child expected, but input is not object");var Sr=vr._encode(Jt[vr._baseState.key],Xt,Jt);return Xt.leaveKey(xr),Sr},this).filter(function(vr){return vr}),tr=this._createEncoderBuffer(tr);else if(er.tag==="seqof"||er.tag==="setof"){if(!(er.args&&er.args.length===1))return Xt.error("Too many args for : "+er.tag);if(!Array.isArray(Jt))return Xt.error("seqof/setof, but data is not Array");var ar=this.clone();ar._baseState.implicit=null,tr=this._createEncoderBuffer(Jt.map(function(vr){var xr=this._baseState;return this._getUse(xr.args[0],Jt)._encode(vr,Xt)},ar))}else er.use!==null?nr=this._getUse(er.use,Zt)._encode(Jt,Xt):(tr=this._encodePrimitive(er.tag,Jt),rr=!0);var nr;if(!er.any&&er.choice===null){var cr=er.implicit!==null?er.implicit:er.tag,fr=er.implicit===null?"universal":"context";cr===null?er.use===null&&Xt.error("Tag could be omitted only for .use()"):er.use===null&&(nr=this._encodeComposite(cr,rr,fr,tr))}return er.explicit!==null&&(nr=this._encodeComposite(er.explicit,!1,"context",nr)),nr},Ht.prototype._encodeChoice=function(Jt,Xt){var Zt=this._baseState,er=Zt.choice[Jt.type];return er||Ft(!1,Jt.type+" not found in "+JSON.stringify(Object.keys(Zt.choice))),er._encode(Jt.value,Xt)},Ht.prototype._encodePrimitive=function(Jt,Xt){var Zt=this._baseState;if(/str$/.test(Jt))return this._encodeStr(Xt,Jt);if(Jt==="objid"&&Zt.args)return this._encodeObjid(Xt,Zt.reverseArgs[0],Zt.args[1]);if(Jt==="objid")return this._encodeObjid(Xt,null,null);if(Jt==="gentime"||Jt==="utctime")return this._encodeTime(Xt,Jt);if(Jt==="null_")return this._encodeNull();if(Jt==="int"||Jt==="enum")return this._encodeInt(Xt,Zt.args&&Zt.reverseArgs[0]);if(Jt==="bool")return this._encodeBool(Xt);if(Jt==="objDesc")return this._encodeStr(Xt,Jt);throw new Error("Unsupported tag: "+Jt)},Ht.prototype._isNumstr=function(Jt){return/^[0-9 ]*$/.test(Jt)},Ht.prototype._isPrintstr=function(Jt){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(Jt)},node}var hasRequiredBase;function requireBase(){return hasRequiredBase||(hasRequiredBase=1,function(yt){var _e=yt;_e.Reporter=requireReporter().Reporter,_e.DecoderBuffer=requireBuffer().DecoderBuffer,_e.EncoderBuffer=requireBuffer().EncoderBuffer,_e.Node=requireNode()}(base)),base}var constants={},der={},hasRequiredDer$2;function requireDer$2(){return hasRequiredDer$2||(hasRequiredDer$2=1,function(yt){var _e=requireConstants();yt.tagClass={0:"universal",1:"application",2:"context",3:"private"},yt.tagClassByName=_e._reverse(yt.tagClass),yt.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},yt.tagByName=_e._reverse(yt.tag)}(der)),der}var hasRequiredConstants;function requireConstants(){return hasRequiredConstants||(hasRequiredConstants=1,function(yt){var _e=yt;_e._reverse=function(Ft){var Vt={};
1493return Object.keys(Ft).forEach(function(qt){(qt|0)==qt&&(qt=qt|0);var zt=Ft[qt];Vt[zt]=qt}),Vt},_e.der=requireDer$2()}(constants)),constants}var decoders={},der_1$1,hasRequiredDer$1;function requireDer$1(){if(hasRequiredDer$1)return der_1$1;hasRequiredDer$1=1;var yt=requireInherits_browser(),_e=requireAsn1$1(),$t=_e.base,Ft=_e.bignum,Vt=_e.constants.der;function qt(Gt){this.enc="der",this.name=Gt.name,this.entity=Gt,this.tree=new zt,this.tree._init(Gt.body)}der_1$1=qt,qt.prototype.decode=function(Jt,Xt){return Jt instanceof $t.DecoderBuffer||(Jt=new $t.DecoderBuffer(Jt,Xt)),this.tree._decode(Jt,Xt)};function zt(Gt){$t.Node.call(this,"der",Gt)}yt(zt,$t.Node),zt.prototype._peekTag=function(Jt,Xt,Zt){if(Jt.isEmpty())return!1;var er=Jt.save(),tr=Ht(Jt,'Failed to peek tag: "'+Xt+'"');return Jt.isError(tr)?tr:(Jt.restore(er),tr.tag===Xt||tr.tagStr===Xt||tr.tagStr+"of"===Xt||Zt)},zt.prototype._decodeTag=function(Jt,Xt,Zt){var er=Ht(Jt,'Failed to decode tag of "'+Xt+'"');if(Jt.isError(er))return er;var tr=Kt(Jt,er.primitive,'Failed to get length of "'+Xt+'"');if(Jt.isError(tr))return tr;if(!Zt&&er.tag!==Xt&&er.tagStr!==Xt&&er.tagStr+"of"!==Xt)return Jt.error('Failed to match tag: "'+Xt+'"');if(er.primitive||tr!==null)return Jt.skip(tr,'Failed to match body of: "'+Xt+'"');var rr=Jt.save(),ar=this._skipUntilEnd(Jt,'Failed to skip indefinite length body: "'+this.tag+'"');return Jt.isError(ar)?ar:(tr=Jt.offset-rr.offset,Jt.restore(rr),Jt.skip(tr,'Failed to match body of: "'+Xt+'"'))},zt.prototype._skipUntilEnd=function(Jt,Xt){for(;;){var Zt=Ht(Jt,Xt);if(Jt.isError(Zt))return Zt;var er=Kt(Jt,Zt.primitive,Xt);if(Jt.isError(er))return er;var tr;if(Zt.primitive||er!==null?tr=Jt.skip(er):tr=this._skipUntilEnd(Jt,Xt),Jt.isError(tr))return tr;if(Zt.tagStr==="end")break}},zt.prototype._decodeList=function(Jt,Xt,Zt,er){for(var tr=[];!Jt.isEmpty();){var rr=this._peekTag(Jt,"end");if(Jt.isError(rr))return rr;var ar=Zt.decode(Jt,"der",er);if(Jt.isError(ar)&&rr)break;tr.push(ar)}return tr},zt.prototype._decodeStr=function(Jt,Xt){if(Xt==="bitstr"){var Zt=Jt.readUInt8();return Jt.isError(Zt)?Zt:{unused:Zt,data:Jt.raw()}}else if(Xt==="bmpstr"){var er=Jt.raw();if(er.length%2===1)return Jt.error("Decoding of string type: bmpstr length mismatch");for(var tr="",rr=0;rr<er.length/2;rr++)tr+=String.fromCharCode(er.readUInt16BE(rr*2));return tr}else if(Xt==="numstr"){var ar=Jt.raw().toString("ascii");return this._isNumstr(ar)?ar:Jt.error("Decoding of string type: numstr unsupported characters")}else{if(Xt==="octstr")return Jt.raw();if(Xt==="objDesc")return Jt.raw();if(Xt==="printstr"){var nr=Jt.raw().toString("ascii");return this._isPrintstr(nr)?nr:Jt.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(Xt)?Jt.raw().toString():Jt.error("Decoding of string type: "+Xt+" unsupported")}},zt.prototype._decodeObjid=function(Jt,Xt,Zt){for(var er,tr=[],rr=0;!Jt.isEmpty();){var ar=Jt.readUInt8();rr<<=7,rr|=ar&127,ar&128||(tr.push(rr),rr=0)}ar&128&&tr.push(rr);var nr=tr[0]/40|0,cr=tr[0]%40;if(Zt?er=tr:er=[nr,cr].concat(tr.slice(1)),Xt){var fr=Xt[er.join(" ")];fr===void 0&&(fr=Xt[er.join(".")]),fr!==void 0&&(er=fr)}return er},zt.prototype._decodeTime=function(Jt,Xt){var Zt=Jt.raw().toString();if(Xt==="gentime")var er=Zt.slice(0,4)|0,tr=Zt.slice(4,6)|0,rr=Zt.slice(6,8)|0,ar=Zt.slice(8,10)|0,nr=Zt.slice(10,12)|0,cr=Zt.slice(12,14)|0;else if(Xt==="utctime"){var er=Zt.slice(0,2)|0,tr=Zt.slice(2,4)|0,rr=Zt.slice(4,6)|0,ar=Zt.slice(6,8)|0,nr=Zt.slice(8,10)|0,cr=Zt.slice(10,12)|0;er<70?er=2e3+er:er=1900+er}else return Jt.error("Decoding "+Xt+" time is not supported yet");return Date.UTC(er,tr-1,rr,ar,nr,cr,0)},zt.prototype._decodeNull=function(Jt){return null},zt.prototype._decodeBool=function(Jt){var Xt=Jt.readUInt8();return Jt.isError(Xt)?Xt:Xt!==0},zt.prototype._decodeInt=function(Jt,Xt){var Zt=Jt.raw(),er=new Ft(Zt);return Xt&&(er=Xt[er.toString(10)]||er),er},zt.prototype._use=function(Jt,Xt){return typeof Jt=="function"&&(Jt=Jt(Xt)),Jt._getDecoder("der").tree};function Ht(Gt,Jt){var Xt=Gt.readUInt8(Jt);if(Gt.isError(Xt))return Xt;var Zt=Vt.tagClass[Xt>>6],er=(Xt&32)===0;
1493if((Xt&31)===31){var tr=Xt;for(Xt=0;(tr&128)===128;){if(tr=Gt.readUInt8(Jt),Gt.isError(tr))return tr;Xt<<=7,Xt|=tr&127}}else Xt&=31;var rr=Vt.tag[Xt];return{cls:Zt,primitive:er,tag:Xt,tagStr:rr}}function Kt(Gt,Jt,Xt){var Zt=Gt.readUInt8(Xt);if(Gt.isError(Zt))return Zt;if(!Jt&&Zt===128)return null;if(!(Zt&128))return Zt;var er=Zt&127;if(er>4)return Gt.error("length octect is too long");Zt=0;for(var tr=0;tr<er;tr++){Zt<<=8;var rr=Gt.readUInt8(Xt);if(Gt.isError(rr))return rr;Zt|=rr}return Zt}return der_1$1}var pem$1,hasRequiredPem$1;function requirePem$1(){if(hasRequiredPem$1)return pem$1;hasRequiredPem$1=1;var yt=requireInherits_browser(),_e=require$$1$2.Buffer,$t=requireDer$1();function Ft(Vt){$t.call(this,Vt),this.enc="pem"}return yt(Ft,$t),pem$1=Ft,Ft.prototype.decode=function(qt,zt){for(var Ht=qt.toString().split(/[\r\n]+/g),Kt=zt.label.toUpperCase(),Gt=/^-----(BEGIN|END) ([^-]+)-----$/,Jt=-1,Xt=-1,Zt=0;Zt<Ht.length;Zt++){var er=Ht[Zt].match(Gt);if(er!==null&&er[2]===Kt)if(Jt===-1){if(er[1]!=="BEGIN")break;Jt=Zt}else{if(er[1]!=="END")break;Xt=Zt;break}}if(Jt===-1||Xt===-1)throw new Error("PEM section not found for: "+Kt);var tr=Ht.slice(Jt+1,Xt).join("");tr.replace(/[^a-z0-9\+\/=]+/gi,"");var rr=new _e(tr,"base64");return $t.prototype.decode.call(this,rr,zt)},pem$1}var hasRequiredDecoders;function requireDecoders(){return hasRequiredDecoders||(hasRequiredDecoders=1,function(yt){var _e=yt;_e.der=requireDer$1(),_e.pem=requirePem$1()}(decoders)),decoders}var encoders={},der_1,hasRequiredDer;function requireDer(){if(hasRequiredDer)return der_1;hasRequiredDer=1;var yt=requireInherits_browser(),_e=require$$1$2.Buffer,$t=requireAsn1$1(),Ft=$t.base,Vt=$t.constants.der;function qt(Gt){this.enc="der",this.name=Gt.name,this.entity=Gt,this.tree=new zt,this.tree._init(Gt.body)}der_1=qt,qt.prototype.encode=function(Jt,Xt){return this.tree._encode(Jt,Xt).join()};function zt(Gt){Ft.Node.call(this,"der",Gt)}yt(zt,Ft.Node),zt.prototype._encodeComposite=function(Jt,Xt,Zt,er){var tr=Kt(Jt,Xt,Zt,this.reporter);if(er.length<128){var nr=new _e(2);return nr[0]=tr,nr[1]=er.length,this._createEncoderBuffer([nr,er])}for(var rr=1,ar=er.length;ar>=256;ar>>=8)rr++;var nr=new _e(2+rr);nr[0]=tr,nr[1]=128|rr;for(var ar=1+rr,cr=er.length;cr>0;ar--,cr>>=8)nr[ar]=cr&255;return this._createEncoderBuffer([nr,er])},zt.prototype._encodeStr=function(Jt,Xt){if(Xt==="bitstr")return this._createEncoderBuffer([Jt.unused|0,Jt.data]);if(Xt==="bmpstr"){for(var Zt=new _e(Jt.length*2),er=0;er<Jt.length;er++)Zt.writeUInt16BE(Jt.charCodeAt(er),er*2);return this._createEncoderBuffer(Zt)}else return Xt==="numstr"?this._isNumstr(Jt)?this._createEncoderBuffer(Jt):this.reporter.error("Encoding of string type: numstr supports only digits and space"):Xt==="printstr"?this._isPrintstr(Jt)?this._createEncoderBuffer(Jt):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(Xt)?this._createEncoderBuffer(Jt):Xt==="objDesc"?this._createEncoderBuffer(Jt):this.reporter.error("Encoding of string type: "+Xt+" unsupported")},zt.prototype._encodeObjid=function(Jt,Xt,Zt){if(typeof Jt=="string"){if(!Xt)return this.reporter.error("string objid given, but no values map found");if(!Xt.hasOwnProperty(Jt))return this.reporter.error("objid not found in values map");Jt=Xt[Jt].split(/[\s\.]+/g);for(var er=0;er<Jt.length;er++)Jt[er]|=0}else if(Array.isArray(Jt)){Jt=Jt.slice();for(var er=0;er<Jt.length;er++)Jt[er]|=0}if(!Array.isArray(Jt))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(Jt));if(!Zt){if(Jt[1]>=40)return this.reporter.error("Second objid identifier OOB");Jt.splice(0,2,Jt[0]*40+Jt[1])}for(var tr=0,er=0;er<Jt.length;er++){var rr=Jt[er];for(tr++;rr>=128;rr>>=7)tr++}for(var ar=new _e(tr),nr=ar.length-1,er=Jt.length-1;er>=0;er--){var rr=Jt[er];for(ar[nr--]=rr&127;(rr>>=7)>0;)ar[nr--]=128|rr&127}return this._createEncoderBuffer(ar)};function Ht(Gt){return Gt<10?"0"+Gt:Gt}zt.prototype._encodeTime=function(Jt,Xt){var Zt,er=new Date(Jt);return Xt==="gentime"?Zt=[Ht(er.getFullYear()),Ht(er.getUTCMonth()+1),Ht(er.getUTCDate()),Ht(er.getUTCHours()),Ht(er.getUTCMinutes()),Ht(er.getUTCSeconds()),"Z"].join(""):Xt==="utctime"?Zt=[Ht(er.getFullYear()%100),Ht(er.getUTCMonth()+1),Ht(er.getUTCDate()),Ht(er.getUTCHours()),Ht(er.getUTCMinutes()),Ht(er.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+Xt+" time is not supported yet"),this._encodeStr(Zt,"octstr")},zt.prototype._encodeNull=function(){return this._createEncoderBuffer("")},zt.prototype._encodeInt=function(Jt,Xt){if(typeof Jt=="string"){if(!Xt)return this.reporter.error("String int or enum given, but no values map");if(!Xt.hasOwnProperty(Jt))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(Jt));Jt=Xt[Jt]}if(typeof Jt!="number"&&!_e.isBuffer(Jt)){var Zt=Jt.toArray();!Jt.sign&&Zt[0]&128&&Zt.unshift(0),Jt=new _e(Zt)}if(_e.isBuffer(Jt)){var er=Jt.length;Jt.length===0&&er++;var rr=new _e(er);return Jt.copy(rr),Jt.length===0&&(rr[0]=0),this._createEncoderBuffer(rr)}if(Jt<128)return this._createEncoderBuffer(Jt);if(Jt<256)return this._createEncoderBuffer([0,Jt]);for(var er=1,tr=Jt;tr>=256;tr>>=8)er++;for(var rr=new Array(er),tr=rr.length-1;tr>=0;tr--)rr[tr]=Jt&255,Jt>>=8;return rr[0]&128&&rr.unshift(0),this._createEncoderBuffer(new _e(rr))},zt.prototype._encodeBool=function(Jt){return this._createEncoderBuffer(Jt?255:0)},zt.prototype._use=function(Jt,Xt){return typeof Jt=="function"&&(Jt=Jt(Xt)),Jt._getEncoder("der").tree},zt.prototype._skipDefault=function(Jt,Xt,Zt){var er=this._baseState,tr;if(er.default===null)return!1;var rr=Jt.join();if(er.defaultBuffer===void 0&&(er.defaultBuffer=this._encodeValue(er.default,Xt,Zt).join()),rr.length!==er.defaultBuffer.length)return!1;for(tr=0;tr<rr.length;tr++)if(rr[tr]!==er.defaultBuffer[tr])return!1;return!0};function Kt(Gt,Jt,Xt,Zt){var er;if(Gt==="seqof"?Gt="seq":Gt==="setof"&&(Gt="set"),Vt.tagByName.hasOwnProperty(Gt))er=Vt.tagByName[Gt];else if(typeof Gt=="number"&&(Gt|0)===Gt)er=Gt;else return Zt.error("Unknown tag: "+Gt);return er>=31?Zt.error("Multi-octet tag encoding unsupported"):(Jt||(er|=32),er|=Vt.tagClassByName[Xt||"universal"]<<6,er)}return der_1}var pem,hasRequiredPem;function requirePem(){if(hasRequiredPem)return pem;hasRequiredPem=1;var yt=requireInherits_browser(),_e=requireDer();function $t(Ft){_e.call(this,Ft),this.enc="pem"}return yt($t,_e),pem=$t,$t.prototype.encode=function(Vt,qt){for(var zt=_e.prototype.encode.call(this,Vt),Ht=zt.toString("base64"),Kt=["-----BEGIN "+qt.label+"-----"],Gt=0;Gt<Ht.length;Gt+=64)Kt.push(Ht.slice(Gt,Gt+64));return Kt.push("-----END "+qt.label+"-----"),Kt.join(` 1494`)},pem}var hasRequiredEncoders;function requireEncoders(){return hasRequiredEncoders||(hasRequiredEncoders=1,function(yt){var _e=yt;_e.der=requireDer(),_e.pem=requirePem()}(encoders)),encoders}var hasRequiredAsn1$1;function requireAsn1$1(){return hasRequiredAsn1$1||(hasRequiredAsn1$1=1,function(yt){var _e=yt;_e.bignum=bnExports,_e.define=requireApi().define,_e.base=requireBase(),_e.constants=requireConstants(),_e.decoders=requireDecoders(),_e.encoders=requireEncoders()}(asn1)),asn1}var certificate,hasRequiredCertificate;function requireCertificate(){if(hasRequiredCertificate)return certificate;hasRequiredCertificate=1;var yt=requireAsn1$1(),_e=yt.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),$t=yt.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),Ft=yt.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),Vt=yt.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(Ft),this.key("subjectPublicKey").bitstr())}),qt=yt.define("RelativeDistinguishedName",function(){this.setof($t)}),zt=yt.define("RDNSequence",function(){this.seqof(qt)}),Ht=yt.define("Name",function(){this.choice({rdnSequence:this.use(zt)})}),Kt=yt.define("Validity",function(){this.seq().obj(this.key("notBefore").use(_e),this.key("notAfter").use(_e))}),Gt=yt.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),Jt=yt.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(Ft),this.key("issuer").use(Ht),this.key("validity").use(Kt),this.key("subject").use(Ht),this.key("subjectPublicKeyInfo").use(Vt),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(Gt).optional())}
1494),Xt=yt.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(Jt),this.key("signatureAlgorithm").use(Ft),this.key("signatureValue").bitstr())});return certificate=Xt,certificate}var hasRequiredAsn1;function requireAsn1(){if(hasRequiredAsn1)return asn1$1;hasRequiredAsn1=1;var yt=requireAsn1$1();asn1$1.certificate=requireCertificate();var _e=yt.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});asn1$1.RSAPrivateKey=_e;var $t=yt.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});asn1$1.RSAPublicKey=$t;var Ft=yt.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),Vt=yt.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(Ft),this.key("subjectPublicKey").bitstr())});asn1$1.PublicKey=Vt;var qt=yt.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(Ft),this.key("subjectPrivateKey").octstr())});asn1$1.PrivateKey=qt;var zt=yt.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});asn1$1.EncryptedPrivateKey=zt;var Ht=yt.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});asn1$1.DSAPrivateKey=Ht,asn1$1.DSAparam=yt.define("DSAparam",function(){this.int()});var Kt=yt.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),Gt=yt.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(Kt),this.key("publicKey").optional().explicit(1).bitstr())});return asn1$1.ECPrivateKey=Gt,asn1$1.signature=yt.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())}),asn1$1}const require$$1={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"};var fixProc,hasRequiredFixProc;function requireFixProc(){if(hasRequiredFixProc)return fixProc;hasRequiredFixProc=1;var yt=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,_e=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,$t=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,Ft=requireEvp_bytestokey(),Vt=requireBrowser$6(),qt=requireSafeBuffer$2().Buffer;return fixProc=function(zt,Ht){var Kt=zt.toString(),Gt=Kt.match(yt),Jt;if(Gt){var Zt="aes"+Gt[1],er=qt.from(Gt[2],"hex"),tr=qt.from(Gt[3].replace(/[\r\n]/g,""),"base64"),rr=Ft(Ht,er.slice(0,8),parseInt(Gt[1],10)).key,ar=[],nr=Vt.createDecipheriv(Zt,rr,er);ar.push(nr.update(tr)),ar.push(nr.final()),Jt=qt.concat(ar)}else{var Xt=Kt.match($t);Jt=qt.from(Xt[2].replace(/[\r\n]/g,""),"base64")}var cr=Kt.match(_e)[1];return{tag:cr,data:Jt}},fixProc}var parseAsn1,hasRequiredParseAsn1;function requireParseAsn1(){if(hasRequiredParseAsn1)return parseAsn1;hasRequiredParseAsn1=1;var yt=requireAsn1(),_e=require$$1,$t=requireFixProc(),Ft=requireBrowser$6(),Vt=requireBrowser$7(),qt=requireSafeBuffer$2().Buffer;function zt(Kt,Gt){var Jt=Kt.algorithm.decrypt.kde.kdeparams.salt,Xt=parseInt(Kt.algorithm.decrypt.kde.kdeparams.iters.toString(),10),Zt=_e[Kt.algorithm.decrypt.cipher.algo.join(".")],er=Kt.algorithm.decrypt.cipher.iv,tr=Kt.subjectPrivateKey,rr=parseInt(Zt.
1494split("-")[1],10)/8,ar=Vt.pbkdf2Sync(Gt,Jt,Xt,rr,"sha1"),nr=Ft.createDecipheriv(Zt,ar,er),cr=[];return cr.push(nr.update(tr)),cr.push(nr.final()),qt.concat(cr)}function Ht(Kt){var Gt;typeof Kt=="object"&&!qt.isBuffer(Kt)&&(Gt=Kt.passphrase,Kt=Kt.key),typeof Kt=="string"&&(Kt=qt.from(Kt));var Jt=$t(Kt,Gt),Xt=Jt.tag,Zt=Jt.data,er,tr;switch(Xt){case"CERTIFICATE":tr=yt.certificate.decode(Zt,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(tr||(tr=yt.PublicKey.decode(Zt,"der")),er=tr.algorithm.algorithm.join("."),er){case"1.2.840.113549.1.1.1":return yt.RSAPublicKey.decode(tr.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return tr.subjectPrivateKey=tr.subjectPublicKey,{type:"ec",data:tr};case"1.2.840.10040.4.1":return tr.algorithm.params.pub_key=yt.DSAparam.decode(tr.subjectPublicKey.data,"der"),{type:"dsa",data:tr.algorithm.params};default:throw new Error("unknown key id "+er)}case"ENCRYPTED PRIVATE KEY":Zt=yt.EncryptedPrivateKey.decode(Zt,"der"),Zt=zt(Zt,Gt);case"PRIVATE KEY":switch(tr=yt.PrivateKey.decode(Zt,"der"),er=tr.algorithm.algorithm.join("."),er){case"1.2.840.113549.1.1.1":return yt.RSAPrivateKey.decode(tr.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:tr.algorithm.curve,privateKey:yt.ECPrivateKey.decode(tr.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return tr.algorithm.params.priv_key=yt.DSAparam.decode(tr.subjectPrivateKey,"der"),{type:"dsa",params:tr.algorithm.params};default:throw new Error("unknown key id "+er)}case"RSA PUBLIC KEY":return yt.RSAPublicKey.decode(Zt,"der");case"RSA PRIVATE KEY":return yt.RSAPrivateKey.decode(Zt,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:yt.DSAPrivateKey.decode(Zt,"der")};case"EC PRIVATE KEY":return Zt=yt.ECPrivateKey.decode(Zt,"der"),{curve:Zt.parameters.value,privateKey:Zt.privateKey};default:throw new Error("unknown key type "+Xt)}}return Ht.signature=yt.signature,parseAsn1=Ht,parseAsn1}const require$$4={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"};var hasRequiredSign;function requireSign(){if(hasRequiredSign)return sign$1.exports;hasRequiredSign=1;var yt=requireSafeBuffer$2().Buffer,_e=requireBrowser$8(),$t=requireBrowserifyRsa(),Ft=requireElliptic().ec,Vt=requireBn(),qt=requireParseAsn1(),zt=require$$4,Ht=1;function Kt(nr,cr,fr,vr,xr){var Sr=qt(cr);if(Sr.curve){if(vr!=="ecdsa"&&vr!=="ecdsa/rsa")throw new Error("wrong private key type");return Gt(nr,Sr)}else if(Sr.type==="dsa"){if(vr!=="dsa")throw new Error("wrong private key type");return Jt(nr,Sr,fr)}if(vr!=="rsa"&&vr!=="ecdsa/rsa")throw new Error("wrong private key type");if(cr.padding!==void 0&&cr.padding!==Ht)throw new Error("illegal or unsupported padding mode");nr=yt.concat([xr,nr]);for(var Tr=Sr.modulus.byteLength(),Br=[0,1];nr.length+Br.length+1<Tr;)Br.push(255);Br.push(0);for(var jr=-1;++jr<nr.length;)Br.push(nr[jr]);var Rr=$t(Br,Sr);return Rr}function Gt(nr,cr){var fr=zt[cr.curve.join(".")];if(!fr)throw new Error("unknown curve "+cr.curve.join("."));var vr=new Ft(fr),xr=vr.keyFromPrivate(cr.privateKey),Sr=xr.sign(nr);return yt.from(Sr.toDER())}function Jt(nr,cr,fr){for(var vr=cr.params.priv_key,xr=cr.params.p,Sr=cr.params.q,Tr=cr.params.g,Br=new Vt(0),jr,Rr=er(nr,Sr).mod(Sr),yr=!1,sr=Zt(vr,Sr,nr,fr);yr===!1;)jr=rr(Sr,sr,fr),Br=ar(Tr,jr,xr,Sr),yr=jr.invm(Sr).imul(Rr.add(vr.mul(Br))).mod(Sr),yr.cmpn(0)===0&&(yr=!1,Br=new Vt(0));return Xt(Br,yr)}function Xt(nr,cr){nr=nr.toArray(),cr=cr.toArray(),nr[0]&128&&(nr=[0].concat(nr)),cr[0]&128&&(cr=[0].concat(cr));var fr=nr.length+cr.length+4,vr=[48,fr,2,nr.length];return vr=vr.concat(nr,[2,cr.length],cr),yt.from(vr)}function Zt(nr,cr,fr,vr){if(nr=yt.from(nr.toArray()),nr.length<cr.byteLength()){var xr=yt.alloc(cr.byteLength()-nr.length);nr=yt.concat([xr,nr])}var Sr=fr.length,Tr=tr(fr,cr),Br=yt.alloc(Sr);Br.fill(1);var jr=yt.alloc(Sr);return jr=_e(vr,jr).update(Br).update(yt.from([0])).update(nr).update(Tr).digest(),Br=_e(vr,jr).update(Br).digest(),jr=_e(vr,jr).update(Br).update(yt.from([1])).update(nr).update(Tr).digest(),Br=_e(vr,jr).update(Br).digest(),{k:jr,v:Br}}function er(nr,cr){var fr=new Vt(nr),vr=(nr.length<<3)-cr.bitLength();return vr>0&&fr.ishrn(vr),fr}function tr(nr,cr){nr=er(nr,cr),nr=nr.mod(cr);var fr=yt.from(nr.toArray());if(fr.length<cr.byteLength()){var vr=yt.alloc(cr.byteLength()-fr.length);fr=yt.concat([vr,fr])}return fr}function rr(nr,cr,fr){var vr,xr;do{for(vr=yt.alloc(0);vr.length*8<nr.bitLength();)cr.v=_e(fr,cr.k).update(cr.v).digest(),vr=yt.concat([vr,cr.v]);xr=er(vr,nr),cr.k=_e(fr,cr.k).update(cr.v).update(yt.from([0])).digest(),cr.v=_e(fr,cr.k).update(cr.v).digest()}while(xr.cmp(nr)!==-1);return xr}function ar(nr,cr,fr,vr){return nr.toRed(Vt.mont(fr)).redPow(cr).fromRed().mod(vr)}return sign$1.exports=Kt,sign$1.exports.getKey=Zt,sign$1.exports.makeKey=rr,sign$1.exports}var verify_1,hasRequiredVerify;function requireVerify(){if(hasRequiredVerify)return verify_1;hasRequiredVerify=1;var yt=requireSafeBuffer$2().Buffer,_e=requireBn(),$t=requireElliptic().ec,Ft=requireParseAsn1(),Vt=require$$4;function qt(Gt,Jt,Xt,Zt,er){var tr=Ft(Xt);if(tr.type==="ec"){if(Zt!=="ecdsa"&&Zt!=="ecdsa/rsa")throw new Error("wrong public key type");return zt(Gt,Jt,tr)}else if(tr.type==="dsa"){if(Zt!=="dsa")throw new Error("wrong public key type");return Ht(Gt,Jt,tr)}if(Zt!=="rsa"&&Zt!=="ecdsa/rsa")throw new Error("wrong public key type");Jt=yt.concat([er,Jt]);for(var rr=tr.modulus.byteLength(),ar=[1],nr=0;Jt.length+ar.length+2<rr;)ar.push(255),nr+=1;ar.push(0);for(var cr=-1;++cr<Jt.length;)ar.push(Jt[cr]);ar=yt.from(ar);var fr=_e.mont(tr.modulus);Gt=new _e(Gt).toRed(fr),Gt=Gt.redPow(new _e(tr.publicExponent)),Gt=yt.from(Gt.fromRed().toArray());var vr=nr<8?1:0;for(rr=Math.min(Gt.length,ar.length),Gt.length!==ar.length&&(vr=1),cr=-1;++cr<rr;)vr|=Gt[cr]^ar[cr];return vr===0}function zt(Gt,Jt,Xt){var Zt=Vt[Xt.data.algorithm.curve.join(".")];if(!Zt)throw new Error("unknown curve "+Xt.data.algorithm.curve.join("."));var er=new $t(Zt),tr=Xt.data.subjectPrivateKey.data;return er.verify(Jt,Gt,tr)}function Ht(Gt,Jt,Xt){var Zt=Xt.data.p,er=Xt.data.q,tr=Xt.data.g,rr=Xt.data.pub_key,ar=Ft.signature.decode(Gt,"der"),nr=ar.s,cr=ar.r;Kt(nr,er),Kt(cr,er);var fr=_e.mont(Zt),vr=nr.invm(er),xr=tr.toRed(fr).redPow(new _e(Jt).mul(vr).mod(er)).fromRed().mul(rr.toRed(fr).redPow(cr.mul(vr).mod(er)).fromRed()).mod(Zt).mod(er);return xr.cmp(cr)===0}function Kt(Gt,Jt){if(Gt.cmpn(0)<=0)throw new Error("invalid sig");if(Gt.cmp(Jt)>=0)throw new Error("invalid sig")}return verify_1=qt,verify_1}var browser$3,hasRequiredBrowser$3;function requireBrowser$3(){if(hasRequiredBrowser$3)return browser$3;hasRequiredBrowser$3=1;var yt=requireSafeBuffer$2().Buffer,_e=requireBrowser$9(),$t=requireReadableBrowser(),Ft=requireInherits_browser(),Vt=requireSign(),qt=requireVerify(),zt=require$$6;Object.keys(zt).forEach(function(Xt){zt[Xt].id=yt.from(zt[Xt].id,"hex"),zt[Xt.toLowerCase()]=zt[Xt]});function Ht(Xt){$t.Writable.call(this);var Zt=zt[Xt];if(!Zt)throw new Error("Unknown message digest");this._hashType=Zt.hash,this._hash=_e(Zt.hash),this._tag=Zt.id,this._signType=Zt.sign}Ft(Ht,$t.Writable),Ht.prototype._write=function(Zt,er,tr){this._hash.update(Zt),tr()},Ht.prototype.update=function(Zt,er){return this._hash.update(typeof Zt=="string"?yt.from(Zt,er):Zt),this},Ht.prototype.sign=function(Zt,er){this.end();var tr=this._hash.digest(),rr=Vt(tr,Zt,this._hashType,this._signType,this._tag);return er?rr.toString(er):rr};function Kt(Xt){$t.Writable.call(this);var Zt=zt[Xt];if(!Zt)throw new Error("Unknown message digest");this._hash=_e(Zt.hash),this._tag=Zt.id,this._signType=Zt.sign}Ft(Kt,$t.Writable),Kt.prototype._write=function(Zt,er,tr){this._hash.update(Zt),tr()},Kt.prototype.update=function(Zt,er){return this._hash.update(typeof Zt=="string"?yt.from(Zt,er):Zt),this},Kt.prototype.verify=function(Zt,er,tr){var rr=typeof er=="string"?yt.from(er,tr):er;this.end();var ar=this._hash.digest();return qt(rr,ar,Zt,this._signType,this._tag)};function Gt(Xt){return new Ht(Xt)}function Jt(Xt){return new Kt(Xt)}return browser$3={Sign:Gt,Verify:Jt,createSign:Gt,createVerify:Jt},browser$3}var browser$2,hasRequiredBrowser$2;function requireBrowser$2(){if(hasRequiredBrowser$2)return browser$2;hasRequiredBrowser$2=1;var yt=requireElliptic(),_e=bnExports;browser$2=function(zt){return new Ft(zt)};var $t={secp256k1:{name:"secp256k1",byteLength:32}
1494,secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};$t.p224=$t.secp224r1,$t.p256=$t.secp256r1=$t.prime256v1,$t.p192=$t.secp192r1=$t.prime192v1,$t.p384=$t.secp384r1,$t.p521=$t.secp521r1;function Ft(qt){this.curveType=$t[qt],this.curveType||(this.curveType={name:qt}),this.curve=new yt.ec(this.curveType.name),this.keys=void 0}Ft.prototype.generateKeys=function(qt,zt){return this.keys=this.curve.genKeyPair(),this.getPublicKey(qt,zt)},Ft.prototype.computeSecret=function(qt,zt,Ht){zt=zt||"utf8",Buffer.isBuffer(qt)||(qt=new Buffer(qt,zt));var Kt=this.curve.keyFromPublic(qt).getPublic(),Gt=Kt.mul(this.keys.getPrivate()).getX();return Vt(Gt,Ht,this.curveType.byteLength)},Ft.prototype.getPublicKey=function(qt,zt){var Ht=this.keys.getPublic(zt==="compressed",!0);return zt==="hybrid"&&(Ht[Ht.length-1]%2?Ht[0]=7:Ht[0]=6),Vt(Ht,qt)},Ft.prototype.getPrivateKey=function(qt){return Vt(this.keys.getPrivate(),qt)},Ft.prototype.setPublicKey=function(qt,zt){return zt=zt||"utf8",Buffer.isBuffer(qt)||(qt=new Buffer(qt,zt)),this.keys._importPublic(qt),this},Ft.prototype.setPrivateKey=function(qt,zt){zt=zt||"utf8",Buffer.isBuffer(qt)||(qt=new Buffer(qt,zt));var Ht=new _e(qt);return Ht=Ht.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(Ht),this};function Vt(qt,zt,Ht){Array.isArray(qt)||(qt=qt.toArray());var Kt=new Buffer(qt);if(Ht&&Kt.length<Ht){var Gt=new Buffer(Ht-Kt.length);Gt.fill(0),Kt=Buffer.concat([Gt,Kt])}return zt?Kt.toString(zt):Kt}return browser$2}var browser$1={},mgf,hasRequiredMgf;function requireMgf(){if(hasRequiredMgf)return mgf;hasRequiredMgf=1;var yt=requireBrowser$9(),_e=requireSafeBuffer$2().Buffer;mgf=function(Ft,Vt){for(var qt=_e.alloc(0),zt=0,Ht;qt.length<Vt;)Ht=$t(zt++),qt=_e.concat([qt,yt("sha1").update(Ft).update(Ht).digest()]);return qt.slice(0,Vt)};function $t(Ft){var Vt=_e.allocUnsafe(4);return Vt.writeUInt32BE(Ft,0),Vt}return mgf}var xor,hasRequiredXor;function requireXor(){return hasRequiredXor||(hasRequiredXor=1,xor=function(_e,$t){for(var Ft=_e.length,Vt=-1;++Vt<Ft;)_e[Vt]^=$t[Vt];return _e}),xor}var withPublic_1,hasRequiredWithPublic;function requireWithPublic(){if(hasRequiredWithPublic)return withPublic_1;hasRequiredWithPublic=1;var yt=bnExports,_e=requireSafeBuffer$2().Buffer;function $t(Ft,Vt){return _e.from(Ft.toRed(yt.mont(Vt.modulus)).redPow(new yt(Vt.publicExponent)).fromRed().toArray())}return withPublic_1=$t,withPublic_1}var publicEncrypt,hasRequiredPublicEncrypt;function requirePublicEncrypt(){if(hasRequiredPublicEncrypt)return publicEncrypt;hasRequiredPublicEncrypt=1;var yt=requireParseAsn1(),_e=requireBrowser$b(),$t=requireBrowser$9(),Ft=requireMgf(),Vt=requireXor(),qt=bnExports,zt=requireWithPublic(),Ht=requireBrowserifyRsa(),Kt=requireSafeBuffer$2().Buffer;publicEncrypt=function(er,tr,rr){var ar;er.padding?ar=er.padding:rr?ar=1:ar=4;var nr=yt(er),cr;if(ar===4)cr=Gt(nr,tr);else if(ar===1)cr=Jt(nr,tr,rr);else if(ar===3){if(cr=new qt(tr),cr.cmp(nr.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return rr?Ht(cr,nr):zt(cr,nr)};function Gt(Zt,er){var tr=Zt.modulus.byteLength(),rr=er.length,ar=$t("sha1").update(Kt.alloc(0)).digest(),nr=ar.length,cr=2*nr;if(rr>tr-cr-2)throw new Error("message too long");var fr=Kt.alloc(tr-rr-cr-2),vr=tr-nr-1,xr=_e(nr),Sr=Vt(Kt.concat([ar,fr,Kt.alloc(1,1),er],vr),Ft(xr,vr)),Tr=Vt(xr,Ft(Sr,nr));return new qt(Kt.concat([Kt.alloc(1),Tr,Sr],tr))}function Jt(Zt,er,tr){var rr=er.length,ar=Zt.modulus.byteLength();if(rr>ar-11)throw new Error("message too long");var nr;return tr?nr=Kt.alloc(ar-rr-3,255):nr=Xt(ar-rr-3),new qt(Kt.concat([Kt.from([0,tr?1:2]),nr,Kt.alloc(1),er],ar))}function Xt(Zt){for(var er=Kt.allocUnsafe(Zt),tr=0,rr=_e(Zt*2),ar=0,nr;tr<Zt;)ar===rr.length&&(rr=_e(Zt*2),ar=0),nr=rr[ar++],nr&&(er[tr++]=nr);return er}return publicEncrypt}var privateDecrypt,hasRequiredPrivateDecrypt;function requirePrivateDecrypt(){if(hasRequiredPrivateDecrypt)return privateDecrypt;hasRequiredPrivateDecrypt=1;var yt=requireParseAsn1(),_e=requireMgf(),$t=requireXor(),Ft=bnExports,Vt=requireBrowserifyRsa(),qt=requireBrowser$9(),zt=requireWithPublic(),Ht=requireSafeBuffer$2().Buffer;privateDecrypt=function(Zt,er,tr){var rr;Zt.padding?rr=Zt.padding:tr?rr=1:rr=4;var ar=yt(Zt),nr=ar.modulus.byteLength();if(er.length>nr||new Ft(er).cmp(ar.modulus)>=0)throw new Error("decryption error");var cr;tr?cr=zt(new Ft(er),ar):cr=Vt(er,ar);var fr=Ht.alloc(nr-cr.length);if(cr=Ht.concat([fr,cr],nr),rr===4)return Kt(ar,cr);if(rr===1)return Gt(ar,cr,tr);
1494if(rr===3)return cr;throw new Error("unknown padding")};function Kt(Xt,Zt){var er=Xt.modulus.byteLength(),tr=qt("sha1").update(Ht.alloc(0)).digest(),rr=tr.length;if(Zt[0]!==0)throw new Error("decryption error");var ar=Zt.slice(1,rr+1),nr=Zt.slice(rr+1),cr=$t(ar,_e(nr,rr)),fr=$t(nr,_e(cr,er-rr-1));if(Jt(tr,fr.slice(0,rr)))throw new Error("decryption error");for(var vr=rr;fr[vr]===0;)vr++;if(fr[vr++]!==1)throw new Error("decryption error");return fr.slice(vr)}function Gt(Xt,Zt,er){for(var tr=Zt.slice(0,2),rr=2,ar=0;Zt[rr++]!==0;)if(rr>=Zt.length){ar++;break}var nr=Zt.slice(2,rr-1);if((tr.toString("hex")!=="0002"&&!er||tr.toString("hex")!=="0001"&&er)&&ar++,nr.length<8&&ar++,ar)throw new Error("decryption error");return Zt.slice(rr)}function Jt(Xt,Zt){Xt=Ht.from(Xt),Zt=Ht.from(Zt);var er=0,tr=Xt.length;Xt.length!==Zt.length&&(er++,tr=Math.min(Xt.length,Zt.length));for(var rr=-1;++rr<tr;)er+=Xt[rr]^Zt[rr];return er}return privateDecrypt}var hasRequiredBrowser$1;function requireBrowser$1(){return hasRequiredBrowser$1||(hasRequiredBrowser$1=1,function(yt){yt.publicEncrypt=requirePublicEncrypt(),yt.privateDecrypt=requirePrivateDecrypt(),yt.privateEncrypt=function($t,Ft){return yt.publicEncrypt($t,Ft,!0)},yt.publicDecrypt=function($t,Ft){return yt.privateDecrypt($t,Ft,!0)}}(browser$1)),browser$1}var browser={},hasRequiredBrowser;function requireBrowser(){if(hasRequiredBrowser)return browser;hasRequiredBrowser=1;function yt(){throw new Error(`secure random number generation not supported by this browser 1495use chrome, FireFox or Internet Explorer 11`)}var _e=requireSafeBuffer$2(),$t=requireBrowser$b(),Ft=_e.Buffer,Vt=_e.kMaxLength,qt=globalThis.crypto||globalThis.msCrypto,zt=Math.pow(2,32)-1;function Ht(Zt,er){if(typeof Zt!="number"||Zt!==Zt)throw new TypeError("offset must be a number");if(Zt>zt||Zt<0)throw new TypeError("offset must be a uint32");if(Zt>Vt||Zt>er)throw new RangeError("offset out of range")}function Kt(Zt,er,tr){if(typeof Zt!="number"||Zt!==Zt)throw new TypeError("size must be a number");if(Zt>zt||Zt<0)throw new TypeError("size must be a uint32");if(Zt+er>tr||Zt>Vt)throw new RangeError("buffer too small")}qt&&qt.getRandomValues||!process$1.browser?(browser.randomFill=Gt,browser.randomFillSync=Xt):(browser.randomFill=yt,browser.randomFillSync=yt);function Gt(Zt,er,tr,rr){if(!Ft.isBuffer(Zt)&&!(Zt instanceof globalThis.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof er=="function")rr=er,er=0,tr=Zt.length;else if(typeof tr=="function")rr=tr,tr=Zt.length-er;else if(typeof rr!="function")throw new TypeError('"cb" argument must be a function');return Ht(er,Zt.length),Kt(tr,er,Zt.length),Jt(Zt,er,tr,rr)}function Jt(Zt,er,tr,rr){if(process$1.browser){var ar=Zt.buffer,nr=new Uint8Array(ar,er,tr);if(qt.getRandomValues(nr),rr){process$1.nextTick(function(){rr(null,Zt)});return}return Zt}if(rr){$t(tr,function(fr,vr){if(fr)return rr(fr);vr.copy(Zt,er),rr(null,Zt)});return}var cr=$t(tr);return cr.copy(Zt,er),Zt}function Xt(Zt,er,tr){if(typeof er>"u"&&(er=0),!Ft.isBuffer(Zt)&&!(Zt instanceof globalThis.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return Ht(er,Zt.length),tr===void 0&&(tr=Zt.length-er),Kt(tr,er,Zt.length),Jt(Zt,er,tr)}return browser}var hasRequiredCryptoBrowserify;function requireCryptoBrowserify(){if(hasRequiredCryptoBrowserify)return cryptoBrowserify;hasRequiredCryptoBrowserify=1,cryptoBrowserify.randomBytes=cryptoBrowserify.rng=cryptoBrowserify.pseudoRandomBytes=cryptoBrowserify.prng=requireBrowser$b(),cryptoBrowserify.createHash=cryptoBrowserify.Hash=requireBrowser$9(),cryptoBrowserify.createHmac=cryptoBrowserify.Hmac=requireBrowser$8();var yt=requireAlgos(),_e=Object.keys(yt),$t=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(_e);cryptoBrowserify.getHashes=function(){return $t};var Ft=requireBrowser$7();cryptoBrowserify.pbkdf2=Ft.pbkdf2,cryptoBrowserify.pbkdf2Sync=Ft.pbkdf2Sync;var Vt=requireBrowser$5();cryptoBrowserify.Cipher=Vt.Cipher,cryptoBrowserify.createCipher=Vt.createCipher,cryptoBrowserify.Cipheriv=Vt.Cipheriv,cryptoBrowserify.createCipheriv=Vt.createCipheriv,cryptoBrowserify.Decipher=Vt.Decipher,cryptoBrowserify.createDecipher=Vt.createDecipher,cryptoBrowserify.Decipheriv=Vt.Decipheriv,cryptoBrowserify.createDecipheriv=Vt.createDecipheriv,cryptoBrowserify.getCiphers=Vt.getCiphers,cryptoBrowserify.listCiphers=Vt.listCiphers;var qt=requireBrowser$4();cryptoBrowserify.DiffieHellmanGroup=qt.DiffieHellmanGroup,cryptoBrowserify.createDiffieHellmanGroup=qt.createDiffieHellmanGroup,cryptoBrowserify.getDiffieHellman=qt.getDiffieHellman,cryptoBrowserify.createDiffieHellman=qt.createDiffieHellman,cryptoBrowserify.DiffieHellman=qt.DiffieHellman;var zt=requireBrowser$3();cryptoBrowserify.createSign=zt.createSign,cryptoBrowserify.Sign=zt.Sign,cryptoBrowserify.createVerify=zt.createVerify,cryptoBrowserify.Verify=zt.Verify,cryptoBrowserify.createECDH=requireBrowser$2();var Ht=requireBrowser$1();cryptoBrowserify.publicEncrypt=Ht.publicEncrypt,cryptoBrowserify.privateEncrypt=Ht.privateEncrypt,cryptoBrowserify.publicDecrypt=Ht.publicDecrypt,cryptoBrowserify.privateDecrypt=Ht.privateDecrypt;var Kt=requireBrowser();return cryptoBrowserify.randomFill=Kt.randomFill,cryptoBrowserify.randomFillSync=Kt.randomFillSync,cryptoBrowserify.createCredentials=function(){throw new Error(`sorry, createCredentials is not implemented yet 1496we accept pull requests 1497https://github.com/browserify/crypto-browserify`)},cryptoBrowserify.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},cryptoBrowserify}(function(yt){(function(_e){var $t=function(Or){var qr,Hr=new Float64Array(16);if(Or)for(qr=0;qr<Or.length;qr++)Hr[qr]=Or[qr];return Hr},Ft=function(){throw new Error("no PRNG")},Vt=new Uint8Array(16),qt=new Uint8Array(32);qt[0]=9;var zt=$t(),Ht=$t([1]),Kt=$t([56129,1]),Gt=$t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),Jt=$t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),Xt=$t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),Zt=$t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),er=$t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function tr(Or,qr,Hr,$r){Or[qr]=Hr>>24&255,Or[qr+1]=Hr>>16&255,Or[qr+2]=Hr>>8&255,Or[qr+3]=Hr&255,Or[qr+4]=$r>>24&255,Or[qr+5]=$r>>16&255,Or[qr+6]=$r>>8&255,Or[qr+7]=$r&255}function rr(Or,qr,Hr,$r,Wr){var cn,on=0;for(cn=0;cn<Wr;cn++)on|=Or[qr+cn]^Hr[$r+cn];return(1&on-1>>>8)-1}function ar(Or,qr,Hr,$r){return rr(Or,qr,Hr,$r,16)}function nr(Or,qr,Hr,$r){return rr(Or,qr,Hr,$r,32)}function cr(Or,qr,Hr,$r){for(var Wr=$r[0]&255|($r[1]&255)<<8|($r[2]&255)<<16|($r[3]&255)<<24,cn=Hr[0]&255|(Hr[1]&255)<<8|(Hr[2]&255)<<16|(Hr[3]&255)<<24,on=Hr[4]&255|(Hr[5]&255)<<8|(Hr[6]&255)<<16|(Hr[7]&255)<<24,ln=Hr[8]&255|(Hr[9]&255)<<8|(Hr[10]&255)<<16|(Hr[11]&255)<<24,Sn=Hr[12]&255|(Hr[13]&255)<<8|(Hr[14]&255)<<16|(Hr[15]&255)<<24,An=$r[4]&255|($r[5]&255)<<8|($r[6]&255)<<16|($r[7]&255)<<24,yn=qr[0]&255|(qr[1]&255)<<8|(qr[2]&255)<<16|(qr[3]&255)<<24,Zn=qr[4]&255|(qr[5]&255)<<8|(qr[6]&255)<<16|(qr[7]&255)<<24,On=qr[8]&255|(qr[9]&255)<<8|(qr[10]&255)<<16|(qr[11]&255)<<24,Wn=qr[12]&255|(qr[13]&255)<<8|(qr[14]&255)<<16|(qr[15]&255)<<24,Hn=$r[8]&255|($r[9]&255)<<8|($r[10]&255)<<16|($r[11]&255)<<24,Gn=Hr[16]&255|(Hr[17]&255)<<8|(Hr[18]&255)<<16|(Hr[19]&25
14975)<<24,Xn=Hr[20]&255|(Hr[21]&255)<<8|(Hr[22]&255)<<16|(Hr[23]&255)<<24,Kn=Hr[24]&255|(Hr[25]&255)<<8|(Hr[26]&255)<<16|(Hr[27]&255)<<24,Jn=Hr[28]&255|(Hr[29]&255)<<8|(Hr[30]&255)<<16|(Hr[31]&255)<<24,Yn=$r[12]&255|($r[13]&255)<<8|($r[14]&255)<<16|($r[15]&255)<<24,Nn=Wr,Vn=cn,Dn=on,jn=ln,Un=Sn,Bn=An,hn=yn,pn=Zn,Tn=On,xn=Wn,Rn=Hn,In=Gn,_i=Xn,eo=Kn,no=Jn,to=Yn,nn,oo=0;oo<20;oo+=2)nn=Nn+_i|0,Un^=nn<<7|nn>>>25,nn=Un+Nn|0,Tn^=nn<<9|nn>>>23,nn=Tn+Un|0,_i^=nn<<13|nn>>>19,nn=_i+Tn|0,Nn^=nn<<18|nn>>>14,nn=Bn+Vn|0,xn^=nn<<7|nn>>>25,nn=xn+Bn|0,eo^=nn<<9|nn>>>23,nn=eo+xn|0,Vn^=nn<<13|nn>>>19,nn=Vn+eo|0,Bn^=nn<<18|nn>>>14,nn=Rn+hn|0,no^=nn<<7|nn>>>25,nn=no+Rn|0,Dn^=nn<<9|nn>>>23,nn=Dn+no|0,hn^=nn<<13|nn>>>19,nn=hn+Dn|0,Rn^=nn<<18|nn>>>14,nn=to+In|0,jn^=nn<<7|nn>>>25,nn=jn+to|0,pn^=nn<<9|nn>>>23,nn=pn+jn|0,In^=nn<<13|nn>>>19,nn=In+pn|0,to^=nn<<18|nn>>>14,nn=Nn+jn|0,Vn^=nn<<7|nn>>>25,nn=Vn+Nn|0,Dn^=nn<<9|nn>>>23,nn=Dn+Vn|0,jn^=nn<<13|nn>>>19,nn=jn+Dn|0,Nn^=nn<<18|nn>>>14,nn=Bn+Un|0,hn^=nn<<7|nn>>>25,nn=hn+Bn|0,pn^=nn<<9|nn>>>23,nn=pn+hn|0,Un^=nn<<13|nn>>>19,nn=Un+pn|0,Bn^=nn<<18|nn>>>14,nn=Rn+xn|0,In^=nn<<7|nn>>>25,nn=In+Rn|0,Tn^=nn<<9|nn>>>23,nn=Tn+In|0,xn^=nn<<13|nn>>>19,nn=xn+Tn|0,Rn^=nn<<18|nn>>>14,nn=to+no|0,_i^=nn<<7|nn>>>25,nn=_i+to|0,eo^=nn<<9|nn>>>23,nn=eo+_i|0,no^=nn<<13|nn>>>19,nn=no+eo|0,to^=nn<<18|nn>>>14;Nn=Nn+Wr|0,Vn=Vn+cn|0,Dn=Dn+on|0,jn=jn+ln|0,Un=Un+Sn|0,Bn=Bn+An|0,hn=hn+yn|0,pn=pn+Zn|0,Tn=Tn+On|0,xn=xn+Wn|0,Rn=Rn+Hn|0,In=In+Gn|0,_i=_i+Xn|0,eo=eo+Kn|0,no=no+Jn|0,to=to+Yn|0,Or[0]=Nn>>>0&255,Or[1]=Nn>>>8&255,Or[2]=Nn>>>16&255,Or[3]=Nn>>>24&255,Or[4]=Vn>>>0&255,Or[5]=Vn>>>8&255,Or[6]=Vn>>>16&255,Or[7]=Vn>>>24&255,Or[8]=Dn>>>0&255,Or[9]=Dn>>>8&255,Or[10]=Dn>>>16&255,Or[11]=Dn>>>24&255,Or[12]=jn>>>0&255,Or[13]=jn>>>8&255,Or[14]=jn>>>16&255,Or[15]=jn>>>24&255,Or[16]=Un>>>0&255,Or[17]=Un>>>8&255,Or[18]=Un>>>16&255,Or[19]=Un>>>24&255,Or[20]=Bn>>>0&255,Or[21]=Bn>>>8&255,Or[22]=Bn>>>16&255,Or[23]=Bn>>>24&255,Or[24]=hn>>>0&255,Or[25]=hn>>>8&255,Or[26]=hn>>>16&255,Or[27]=hn>>>24&255,Or[28]=pn>>>0&255,Or[29]=pn>>>8&255,Or[30]=pn>>>16&255,Or[31]=pn>>>24&255,Or[32]=Tn>>>0&255,Or[33]=Tn>>>8&255,Or[34]=Tn>>>16&255,Or[35]=Tn>>>24&255,Or[36]=xn>>>0&255,Or[37]=xn>>>8&255,Or[38]=xn>>>16&255,Or[39]=xn>>>24&255,Or[40]=Rn>>>0&255,Or[41]=Rn>>>8&255,Or[42]=Rn>>>16&255,Or[43]=Rn>>>24&255,Or[44]=In>>>0&255,Or[45]=In>>>8&255,Or[46]=In>>>16&255,Or[47]=In>>>24&255,Or[48]=_i>>>0&255,Or[49]=_i>>>8&255,Or[50]=_i>>>16&255,Or[51]=_i>>>24&255,Or[52]=eo>>>0&255,Or[53]=eo>>>8&255,Or[54]=eo>>>16&255,Or[55]=eo>>>24&255,Or[56]=no>>>0&255,Or[57]=no>>>8&255,Or[58]=no>>>16&255,Or[59]=no>>>24&255,Or[60]=to>>>0&255,Or[61]=to>>>8&255,Or[62]=to>>>16&255,Or[63]=to>>>24&255}function fr(Or,qr,Hr,$r){for(var Wr=$r[0]&255|($r[1]&255)<<8|($r[2]&255)<<16|($r[3]&255)<<24,cn=Hr[0]&255|(Hr[1]&255)<<8|(Hr[2]&255)<<16|(Hr[3]&255)<<24,on=Hr[4]&255|(Hr[5]&255)<<8|(Hr[6]&255)<<16|(Hr[7]&255)<<24,ln=Hr[8]&255|(Hr[9]&255)<<8|(Hr[10]&255)<<16|(Hr[11]&255)<<24,Sn=Hr[12]&255|(Hr[13]&255)<<8|(Hr[14]&255)<<16|(Hr[15]&255)<<24,An=$r[4]&255|($r[5]&255)<<8|($r[6]&255)<<16|($r[7]&255)<<24,yn=qr[0]&255|(qr[1]&255)<<8|(qr[2]&255)<<16|(qr[3]&255)<<24,Zn=qr[4]&255|(qr[5]&255)<<8|(qr[6]&255)<<16|(qr[7]&255)<<24,On=qr[8]&255|(qr[9]&255)<<8|(qr[10]&255)<<16|(qr[11]&255)<<24,Wn=qr[12]&255|(qr[13]&255)<<8|(qr[14]&255)<<16|(qr[15]&255)<<24,Hn=$r[8]&255|($r[9]&255)<<8|($r[10]&255)<<16|($r[11]&255)<<24,Gn=Hr[16]&255|(Hr[17]&255)<<8|(Hr[18]&255)<<16|(Hr[19]&255)<<24,Xn=Hr[20]&255|(Hr[21]&255)<<8|(Hr[22]&255)<<16|(Hr[23]&255)<<24,Kn=Hr[24]&255|(Hr[25]&255)<<8|(Hr[26]&255)<<16|(Hr[27]&255)<<24,Jn=Hr[28]&255|(Hr[29]&255)<<8|(Hr[30]&255)<<16|(Hr[31]&255)<<24,Yn=$r[12]&255|($r[13]&255)<<8|($r[14]&255)<<16|($r[15]&255)<<24,Nn=Wr,Vn=cn,Dn=on,jn=ln,Un=Sn,Bn=An,hn=yn,pn=Zn,Tn=On,xn=Wn,Rn=Hn,In=Gn,_i=Xn,eo=Kn,no=Jn,to=Yn,nn,oo=0;oo<20;oo+=2)nn=Nn+_i|0,Un^=nn<<7|nn>>>25,nn=Un+Nn|0,Tn^=nn<<9|nn>>>23,nn=Tn+Un|0,_i^=nn<<13|nn>>>19,nn=_i+Tn|0,Nn^=nn<<18|nn>>>14,nn=Bn+Vn|0,xn^=nn<<7|nn>>>25,nn=xn+Bn|0,eo^=nn<<9|nn>>>23,nn=eo+xn|0,Vn^=nn<<13|nn>>>19,nn=Vn+eo|0,Bn^=nn<<18|nn>>>14,nn=Rn+hn|0,no^=nn<<7|nn>>>25,nn=no+Rn|0,Dn^=nn<<9|nn>>>23,nn=Dn+no|0,hn^=nn<<13|nn>>>19,nn=hn+Dn|0,Rn^=nn<<18|nn>>>14,nn=to+In|0,jn^=nn<<7|nn>>>25,nn=jn+to|0,pn^=nn<<9|nn>>>23,nn=pn+jn|0,In^=nn<<13|nn>>>19,nn=In+pn|0,to^=nn<<18|nn>>>14,nn=Nn+jn|0,Vn^=nn<<7|nn>>>25,nn=Vn+Nn|0,Dn^=nn<<9|nn>>>23,nn=Dn+Vn|0,jn^=nn<<13|nn>>>19,nn=jn+Dn|0,Nn^=nn<<18|nn>>>14,nn=Bn+Un|0,hn^=nn<<7|nn>>>25,nn=hn+Bn|0,pn^=nn<<9|nn>>>23,nn=pn+hn|0,Un^=nn<<13|nn>>>19,nn=Un+pn|0,Bn^=nn<<18|nn>>>14,nn=Rn+xn|0,In^=nn<<7|nn>>>25,nn=In+Rn|0,Tn^=nn<<9|nn>>>23,nn=Tn+In|0,xn^=nn<<13|nn>>>19,nn=xn+Tn|0,Rn^=nn<<18|nn>>>14,nn=to+no|0,_i^=nn<<7|nn>>>25,nn=_i+to|0,eo^=nn<<9|nn>>>23,nn=eo+_i|0,no^=nn<<13|nn>>>19,nn=no+eo|0,to^=nn<<18|nn>>>14;Or[0]=Nn>>>0&255,Or[1]=Nn>>>8&255,Or[2]=Nn>>>16&255,Or[3]=Nn>>>24&255,Or[4]=Bn>>>0&255,Or[5]=Bn>>>8&255,Or[6]=Bn>>>16&255,Or[7]=Bn>>>24&255,Or[8]=Rn>>>0&255,Or[9]=Rn>>>8&255,Or[10]=Rn>>>16&255,Or[11]=Rn>>>24&255,Or[12]=to>>>0&255,Or[13]=to>>>8&255,Or[14]=to>>>16&255,Or[15]=to>>>
vendor: 27,475 bytes, line 1497
149724&255,Or[16]=hn>>>0&255,Or[17]=hn>>>8&255,Or[18]=hn>>>16&255,Or[19]=hn>>>24&255,Or[20]=pn>>>0&255,Or[21]=pn>>>8&255,Or[22]=pn>>>16&255,Or[23]=pn>>>24&255,Or[24]=Tn>>>0&255,Or[25]=Tn>>>8&255,Or[26]=Tn>>>16&255,Or[27]=Tn>>>24&255,Or[28]=xn>>>0&255,Or[29]=xn>>>8&255,Or[30]=xn>>>16&255,Or[31]=xn>>>24&255}function vr(Or,qr,Hr,$r){cr(Or,qr,Hr,$r)}function xr(Or,qr,Hr,$r){fr(Or,qr,Hr,$r)}var Sr=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function Tr(Or,qr,Hr,$r,Wr,cn,on){var ln=new Uint8Array(16),Sn=new Uint8Array(64),An,yn;for(yn=0;yn<16;yn++)ln[yn]=0;for(yn=0;yn<8;yn++)ln[yn]=cn[yn];for(;Wr>=64;){for(vr(Sn,ln,on,Sr),yn=0;yn<64;yn++)Or[qr+yn]=Hr[$r+yn]^Sn[yn];for(An=1,yn=8;yn<16;yn++)An=An+(ln[yn]&255)|0,ln[yn]=An&255,An>>>=8;Wr-=64,qr+=64,$r+=64}if(Wr>0)for(vr(Sn,ln,on,Sr),yn=0;yn<Wr;yn++)Or[qr+yn]=Hr[$r+yn]^Sn[yn];return 0}function Br(Or,qr,Hr,$r,Wr){var cn=new Uint8Array(16),on=new Uint8Array(64),ln,Sn;for(Sn=0;Sn<16;Sn++)cn[Sn]=0;for(Sn=0;Sn<8;Sn++)cn[Sn]=$r[Sn];for(;Hr>=64;){for(vr(on,cn,Wr,Sr),Sn=0;Sn<64;Sn++)Or[qr+Sn]=on[Sn];for(ln=1,Sn=8;Sn<16;Sn++)ln=ln+(cn[Sn]&255)|0,cn[Sn]=ln&255,ln>>>=8;Hr-=64,qr+=64}if(Hr>0)for(vr(on,cn,Wr,Sr),Sn=0;Sn<Hr;Sn++)Or[qr+Sn]=on[Sn];return 0}function jr(Or,qr,Hr,$r,Wr){var cn=new Uint8Array(32);xr(cn,$r,Wr,Sr);for(var on=new Uint8Array(8),ln=0;ln<8;ln++)on[ln]=$r[ln+16];return Br(Or,qr,Hr,on,cn)}function Rr(Or,qr,Hr,$r,Wr,cn,on){var ln=new Uint8Array(32);xr(ln,cn,on,Sr);for(var Sn=new Uint8Array(8),An=0;An<8;An++)Sn[An]=cn[An+16];return Tr(Or,qr,Hr,$r,Wr,Sn,ln)}var yr=function(Or){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;var qr,Hr,$r,Wr,cn,on,ln,Sn;qr=Or[0]&255|(Or[1]&255)<<8,this.r[0]=qr&8191,Hr=Or[2]&255|(Or[3]&255)<<8,this.r[1]=(qr>>>13|Hr<<3)&8191,$r=Or[4]&255|(Or[5]&255)<<8,this.r[2]=(Hr>>>10|$r<<6)&7939,Wr=Or[6]&255|(Or[7]&255)<<8,this.r[3]=($r>>>7|Wr<<9)&8191,cn=Or[8]&255|(Or[9]&255)<<8,this.r[4]=(Wr>>>4|cn<<12)&255,this.r[5]=cn>>>1&8190,on=Or[10]&255|(Or[11]&255)<<8,this.r[6]=(cn>>>14|on<<2)&8191,ln=Or[12]&255|(Or[13]&255)<<8,this.r[7]=(on>>>11|ln<<5)&8065,Sn=Or[14]&255|(Or[15]&255)<<8,this.r[8]=(ln>>>8|Sn<<8)&8191,this.r[9]=Sn>>>5&127,this.pad[0]=Or[16]&255|(Or[17]&255)<<8,this.pad[1]=Or[18]&255|(Or[19]&255)<<8,this.pad[2]=Or[20]&255|(Or[21]&255)<<8,this.pad[3]=Or[22]&255|(Or[23]&255)<<8,this.pad[4]=Or[24]&255|(Or[25]&255)<<8,this.pad[5]=Or[26]&255|(Or[27]&255)<<8,this.pad[6]=Or[28]&255|(Or[29]&255)<<8,this.pad[7]=Or[30]&255|(Or[31]&255)<<8};yr.prototype.blocks=function(Or,qr,Hr){for(var $r=this.fin?0:2048,Wr,cn,on,ln,Sn,An,yn,Zn,On,Wn,Hn,Gn,Xn,Kn,Jn,Yn,Nn,Vn,Dn,jn=this.h[0],Un=this.h[1],Bn=this.h[2],hn=this.h[3],pn=this.h[4],Tn=this.h[5],xn=this.h[6],Rn=this.h[7],In=this.h[8],_i=this.h[9],eo=this.r[0],no=this.r[1],to=this.r[2],nn=this.r[3],oo=this.r[4],uo=this.r[5],fo=this.r[6],io=this.r[7],co=this.r[8],lo=this.r[9];Hr>=16;)Wr=Or[qr+0]&255|(Or[qr+1]&255)<<8,jn+=Wr&8191,cn=Or[qr+2]&255|(Or[qr+3]&255)<<8,Un+=(Wr>>>13|cn<<3)&8191,on=Or[qr+4]&255|(Or[qr+5]&255)<<8,Bn+=(cn>>>10|on<<6)&8191,ln=Or[qr+6]&255|(Or[qr+7]&255)<<8,hn+=(on>>>7|ln<<9)&8191,Sn=Or[qr+8]&255|(Or[qr+9]&255)<<8,pn+=(ln>>>4|Sn<<12)&8191,Tn+=Sn>>>1&8191,An=Or[qr+10]&255|(Or[qr+11]&255)<<8,xn+=(Sn>>>14|An<<2)&8191,yn=Or[qr+12]&255|(Or[qr+13]&255)<<8,Rn+=(An>>>11|yn<<5)&8191,Zn=Or[qr+14]&255|(Or[qr+15]&255)<<8,In+=(yn>>>8|Zn<<8)&8191,_i+=Zn>>>5|$r,On=0,Wn=On,Wn+=jn*eo,Wn+=Un*(5*lo),Wn+=Bn*(5*co),Wn+=hn*(5*io),Wn+=pn*(5*fo),On=Wn>>>13,Wn&=8191,Wn+=Tn*(5*uo),Wn+=xn*(5*oo),Wn+=Rn*(5*nn),Wn+=In*(5*to),Wn+=_i*(5*no),On+=Wn>>>13,Wn&=8191,Hn=On,Hn+=jn*no,Hn+=Un*eo,Hn+=Bn*(5*lo),Hn+=hn*(5*co),Hn+=pn*(5*io),On=Hn>>>13,Hn&=8191,Hn+=Tn*(5*fo),Hn+=xn*(5*uo),Hn+=Rn*(5*oo),Hn+=In*(5*nn),Hn+=_i*(5*to),On+=Hn>>>13,Hn&=8191,Gn=On,Gn+=jn*to,Gn+=Un*no,Gn+=Bn*eo,Gn+=hn*(5*lo),Gn+=pn*(5*co),On=Gn>>>13,Gn&=8191,Gn+=Tn*(5*io),Gn+=xn*(5*fo),Gn+=Rn*(5*uo),Gn+=In*(5*oo),Gn+=_i*(5*nn),On+=Gn>>>13,Gn&=8191,Xn=On,Xn+=jn*nn,Xn+=Un*to,Xn+=Bn*no,Xn+=hn*eo,Xn+=pn*(5*lo),On=Xn>>>13,Xn&=8191,Xn+=Tn*(5*co),Xn+=xn*(5*io),Xn+=Rn*(5*fo),Xn+=In*(5*uo),Xn+=_i*(5*oo),On+=Xn>>>13,Xn&=8191,Kn=On,Kn+=jn*oo,Kn+=Un*nn,Kn+=Bn*to,Kn+=hn*no,Kn+=pn*eo,On=Kn>>>13,Kn&=8191,Kn+=Tn*(5*lo),Kn+=xn*(5*co),Kn+=Rn*(5*io),Kn+=In*(5*fo),Kn+=_i*(5*uo),On+=Kn>>>13,Kn&=8191,Jn=On,Jn+=jn*uo,Jn+=Un*oo,Jn+=Bn*nn,Jn+=hn*to,Jn+=pn*no,On=Jn>>>13,Jn&=8191,Jn+=Tn*eo,Jn+=xn*(5*lo),Jn+=Rn*(5*co),Jn+=In*(5*io),Jn+=_i*(5*fo),On+=Jn>>>13,Jn&=8191,Yn=On,Yn+=jn*fo,Yn+=Un*uo,Yn+=Bn*oo,Yn+=hn*nn,Yn+=pn*to,On=Yn>>>13,Yn&=8191,Yn+=Tn*no,Yn+=xn*eo,Yn+=Rn*(5*lo),Yn+=In*(5*co),Yn+=_i*(5*io),On+=Yn>>>13,Yn&=8191,Nn=On,Nn+=jn*io,Nn+=Un*fo,Nn+=Bn*uo,Nn+=hn*oo,Nn+=pn*nn,On=Nn>>>13,Nn&=8191,Nn+=Tn*to,Nn+=xn*no,Nn+=Rn*eo,Nn+=In*(5*lo),Nn+=_i*(5*co),On+=Nn>>>13,Nn&=8191,Vn=On,Vn+=jn*co,Vn+=Un*io,Vn+=Bn*fo,Vn+=hn*uo,Vn+=pn*oo,On=Vn>>>13,Vn&=8191,Vn+=Tn*nn,Vn+=xn*to,Vn+=Rn*no,Vn+=In*eo,Vn+=_i*(5*lo),On+=Vn>>>13,Vn&=8191,Dn=On,Dn+=jn*lo,Dn+=Un*co,Dn+=Bn*io,Dn+=hn*fo,Dn+=pn*uo,On=Dn>>>13,Dn&=8191,Dn+=Tn*oo,Dn+=xn*nn,Dn+=Rn*to,Dn+=In*no,Dn+=_i*eo,On+=Dn>>>13,Dn&=8191,On=(On<<2)+On|0,On=On+Wn|0,Wn=On&8191,On=On>>>13,Hn+=On,jn=Wn,Un=Hn,Bn=Gn,hn=Xn,pn=Kn,Tn=Jn,xn=Yn,Rn=Nn,In=Vn,_i=Dn,qr+=16,Hr-=16;this.h[0]=jn,this.h[1]=Un,this.h[2]=Bn,this.h[3]=hn,this.h[4]=pn,this.h[5]=Tn,this.h[6]=xn,this.h[7]=Rn,this.h[8]=In,this.h[9]=_i},yr.prototype.finish=function(Or,qr){var Hr=new Uint16Array(10),$r,Wr,cn,on;if(this.leftover){for(on=this.leftover,this.buffer[on++]=1;on<16;on++)this.buffer[on]=0;this.fin=1,this.blocks(this.buffer,0,16)}for($r=this.h[1]>>>13,this.h[1]&=8191,on=2;on<10;on++)this.h[on]+=$r,$r=this.h[on]>>>13,this.h[on]&=8191;for(this.h[0]+=$r*5,$r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=$r,$r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=$r,Hr[0]=this.h[0]+5,$r=Hr[0]>>>13,Hr[0]&=8191,on=1;on<10;on++)Hr[on]=this.h[on]+$r,$r=Hr[on]>>>13,Hr[on]&=8191;for(Hr[9]-=8192,Wr=($r^1)-1,on=0;on<10;on++)Hr[on]&=Wr;for(Wr=~Wr,on=0;on<10;on++)this.h[on]=this.h[on]&Wr|Hr[on];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,cn=this.h[0]+this.pad[0],this.h[0]=cn&65535,on=1;on<8;on++)cn=(this.h[on]+this.pad[on]|0)+(cn>>>16)|0,this.h[on]=cn&65535;Or[qr+0]=this.h[0]>>>0&255,Or[qr+1]=this.h[0]>>>8&255,Or[qr+2]=this.h[1]>>>0&255,Or[qr+3]=this.h[1]>>>8&255,Or[qr+4]=this.h[2]>>>0&255,Or[qr+5]=this.h[2]>>>8&255,Or[qr+6]=this.h[3]>>>0&255,Or[qr+7]=this.h[3]>>>8&255,Or[qr+8]=this.h[4]>>>0&255,Or[qr+9]=this.h[4]>>>8&255,Or[qr+10]=this.h[5]>>>0&255,Or[qr+11]=this.h[5]>>>8&255,Or[qr+12]=this.h[6]>>>0&255,Or[qr+13]=this.h[6]>>>8&255,Or[qr+14]=this.h[7]>>>0&255,Or[qr+15]=this.h[7]>>>8&255},yr.prototype.update=function(Or,qr,Hr){var $r,Wr;if(this.leftover){for(Wr=16-this.leftover,Wr>Hr&&(Wr=Hr),$r=0;$r<Wr;$r++)this.buffer[this.leftover+$r]=Or[qr+$r];if(Hr-=Wr,qr+=Wr,this.leftover+=Wr,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(Hr>=16&&(Wr=Hr-Hr%16,this.blocks(Or,qr,Wr),qr+=Wr,Hr-=Wr),Hr){for($r=0;$r<Hr;$r++)this.buffer[this.leftover+$r]=Or[qr+$r];this.leftover+=Hr}};function sr(Or,qr,Hr,$r,Wr,cn){var on=new yr(cn);return on.update(Hr,$r,Wr),on.finish(Or,qr),0}function or(Or,qr,Hr,$r,Wr,cn){var on=new Uint8Array(16);return sr(on,0,Hr,$r,Wr,cn),ar(Or,qr,on,0)}function Qt(Or,qr,Hr,$r,Wr){var cn;if(Hr<32)return-1;for(Rr(Or,0,qr,0,Hr,$r,Wr),sr(Or,16,Or,32,Hr-32,Or),cn=0;cn<16;cn++)Or[cn]=0;return 0}function ir(Or,qr,Hr,$r,Wr){var cn,on=new Uint8Array(32);if(Hr<32||(jr(on,0,32,$r,Wr),or(qr,16,qr,32,Hr-32,on)!==0))return-1;for(Rr(Or,0,qr,0,Hr,$r,Wr),cn=0;cn<32;cn++)Or[cn]=0;return 0}function ur(Or,qr){var Hr;for(Hr=0;Hr<16;Hr++)Or[Hr]=qr[Hr]|0}function gr(Or){var qr,Hr,$r=1;for(qr=0;qr<16;qr++)Hr=Or[qr]+$r+65535,$r=Math.floor(Hr/65536),Or[qr]=Hr-$r*65536;Or[0]+=$r-1+37*($r-1)}function dr(Or,qr,Hr){for(var $r,Wr=~(Hr-1),cn=0;cn<16;cn++)$r=Wr&(Or[cn]^qr[cn]),Or[cn]^=$r,qr[cn]^=$r}function lr(Or,qr){var Hr,$r,Wr,cn=$t(),on=$t();for(Hr=0;Hr<16;Hr++)on[Hr]=qr[Hr];for(gr(on),gr(on),gr(on),$r=0;$r<2;$r++){for(cn[0]=on[0]-65517,Hr=1;Hr<15;Hr++)cn[Hr]=on[Hr]-65535-(cn[Hr-1]>>16&1),cn[Hr-1]&=65535;cn[15]=on[15]-32767-(cn[14]>>16&1),Wr=cn[15]>>16&1,cn[14]&=65535,dr(on,cn,1-Wr)}for(Hr=0;Hr<16;Hr++)Or[2*Hr]=on[Hr]&255,Or[2*Hr+1]=on[Hr]>>8}function hr(Or,qr){var Hr=new Uint8Array(32),$r=new Uint8Array(32);return lr(Hr,Or),lr($r,qr),nr(Hr,0,$r,0)}function wr(Or){var qr=new Uint8Array(32);return lr(qr,Or),qr[0]&1}function pr(Or,qr){var Hr;for(Hr=0;Hr<16;Hr++)Or[Hr]=qr[2*Hr]+(qr[2*Hr+1]<<8);Or[15]&=32767}function br(Or,qr,Hr){for(var $r=0;$r<16;$r++)Or[$r]=qr[$r]+Hr[$r]}function Dr(Or,qr,Hr){for(var $r=0;$r<16;$r++)Or[$r]=qr[$r]-Hr[$r]}function _r(Or,qr,Hr){var $r,Wr,cn=0,on=0,ln=0,Sn=0,An=0,yn=0,Zn=0,On=0,Wn=0,Hn=0,Gn=0,Xn=0,Kn=0,Jn=0,Yn=0,Nn=0,Vn=0,Dn=0,jn=0,Un=0,Bn=0,hn=0,pn=0,Tn=0,xn=0,Rn=0,In=0,_i=0,eo=0,no=0,to=0,nn=Hr[0],oo=Hr[1],uo=Hr[2],fo=Hr[3],io=Hr[4],co=Hr[5],lo=Hr[6],yo=Hr[7],ho=Hr[8],po=Hr[9],mo=Hr[10],go=Hr[11],vo=Hr[12],wo=Hr[13],So=Hr[14],bo=Hr[15];$r=qr[0],cn+=$r*nn,on+=$r*oo,ln+=$r*uo,Sn+=$r*fo,An+=$r*io,yn+=$r*co,Zn+=$r*lo,On+=$r*yo,Wn+=$r*ho,Hn+=$r*po,Gn+=$r*mo,Xn+=$r*go,Kn+=$r*vo,Jn+=$r*wo,Yn+=$r*So,Nn+=$r*bo,$r=qr[1],on+=$r*nn,ln+=$r*oo,Sn+=$r*uo,An+=$r*fo,yn+=$r*io,Zn+=$r*co,On+=$r*lo,Wn+=$r*yo,Hn+=$r*ho,Gn+=$r*po,Xn+=$r*mo,Kn+=$r*go,Jn+=$r*vo,Yn+=$r*wo,Nn+=$r*So,Vn+=$r*bo,$r=qr[2],ln+=$r*nn,Sn+=$r*oo,An+=$r*uo,yn+=$r*fo,Zn+=$r*io,On+=$r*co,Wn+=$r*lo,Hn+=$r*yo,Gn+=$r*ho,Xn+=$r*po,Kn+=$r*mo,Jn+=$r*go,Yn+=$r*vo,Nn+=$r*wo,Vn+=$r*So,Dn+=$r*bo,$r=qr[3],Sn+=$r*nn,An+=$r*oo,yn+=$r*uo,Zn+=$r*fo,On+=$r*io,Wn+=$r*co,Hn+=$r*lo,Gn+=$r*yo,Xn+=$r*ho,Kn+=$r*po,Jn+=$r*mo,Yn+=$r*go,Nn+=$r*vo,Vn+=$r*wo,Dn+=$r*So,jn+=$r*bo,$r=qr[4],An+=$r*nn,yn+=$r*oo,Zn+=$r*uo,On+=$r*fo,Wn+=$r*io,Hn+=$r*co,Gn+=$r*lo,Xn+=$r*yo,Kn+=$r*ho,Jn+=$r*po,Yn+=$r*mo,Nn+=$r*go,Vn+=$r*vo,Dn+=$r*wo,jn+=$r*So,Un+=$r*bo,$r=qr[5],yn+=$r*nn,Zn+=$r*oo,On+=$r*uo,Wn+=$r*fo,Hn+=$r*io,Gn+=$r*co,Xn+=$r*lo,Kn+=$r*yo,Jn+=$r*ho,Yn+=$r*po,Nn+=$r*mo,Vn+=$r*go,Dn+=$r*vo,jn+=$r*wo,Un+=$r*So,Bn+=$r*bo,$r=qr[6],Zn+=$r*nn,On+=$r*oo,Wn+=$r*uo,Hn+=$r*fo,Gn+=$r*io,Xn+=$r*co,Kn+=$r*lo,Jn+=$r*yo,Yn+=$r*ho,Nn+=$r*po,Vn+=$r*mo,Dn+=$r*go,jn+=$r*vo,Un+=$r*wo,Bn+=$r*So,hn+=$r*bo,$r=qr[7],On+=$r*nn,Wn+=$r*oo,Hn+=$r*uo,Gn+=$r*fo,Xn+=$r*io,Kn+=$r*co,Jn+=$r*lo,Yn+=$r*yo,Nn+=$r*ho,Vn+=$r*po,Dn+=$r*mo,jn+=$r*go,Un+=$r*vo,Bn+=$r*wo,hn+=$r*So,pn+=$r*bo,$r=qr[8],Wn+=$r*nn,Hn+=$r*oo,Gn+=$r*uo,Xn+=$r*fo,Kn+=$r*io,Jn+=$r*co,Yn+=$r*lo,Nn+=$r*yo,Vn+=$r*ho,Dn+=$r*po,jn+=$r*mo,Un+=$r*go,Bn+=$r*vo,hn+=$r*wo,pn+=$r*So,Tn+=$r*bo,$r=qr[9],Hn+=$r*nn,Gn+=$r*oo,Xn+=$r*uo,Kn+=$r*fo,Jn+=$r*io,Yn+=$r*co,Nn+=$r*lo,Vn+=$r*yo,Dn+=$r*ho,jn+=$r*po,Un+=$r*mo,Bn+=$r*go,hn+=$r*vo,pn+=$r*wo,Tn+=$r*So,xn+=$r*bo,$r=qr[10],Gn+=$r*nn,Xn+=$r*oo,Kn+=$r*uo,Jn+=$r*fo,Yn+=$r*io,Nn+=$r*co,Vn+=$r*lo,Dn+=$r*yo,jn+=$r*ho,Un+=$r*po,Bn+=$r*mo,hn+=$r*go,pn+=$r*vo,Tn+=$r*wo,xn+=$r*So,Rn+=$r*bo,$r=qr[11],Xn+=$r*nn,Kn+=$r*oo,Jn+=$r*uo,Yn+=$r*fo,Nn+=$r*io,Vn+=$r*co,Dn+=$r*lo,jn+=$r*yo,Un+=$r*ho,Bn+=$r*po,hn+=$r*mo,pn+=$r*go,Tn+=$r*vo,xn+=$r*wo,Rn+=$r*So,In+=$r*bo,$r=qr[12],Kn+=$r*nn,Jn+=$r*oo,Yn+=$r*uo,Nn+=$r*fo,Vn+=$r*io,Dn+=$r*co,jn+=$r*lo,Un+=$r*yo,Bn+=$r*ho,hn+=$r*po,pn+=$r*mo,Tn+=$r*go,xn+=$r*vo,Rn+=$r*wo,In+=$r*So,_i+=$r*bo,$r=qr[13],Jn+=$r*nn,Yn+=$r*oo,Nn+=$r*uo,Vn+=$r*fo,Dn+=$r*io,jn+=$r*co,Un+=$r*lo,Bn+=$r*yo,hn+=$r*ho,pn+=$r*po,Tn+=$r*mo,xn+=$r*go,Rn+=$r*vo,In+=$r*wo,_i+=$r*So,eo+=$r*bo,$r=qr[14],Yn+=$r*nn,Nn+=$r*oo,Vn+=$r*uo,Dn+=$r*fo,jn+=$r*io,Un+=$r*co,Bn+=$r*lo,hn+=$r*yo,pn+=$r*ho,Tn+=$r*po,xn+=$r*mo,Rn+=$r*go,In+=$r*vo,_i+=$r*wo,eo+=$r*So,no+=$r*bo,$r=qr[15],Nn+=$r*nn,Vn+=$r*oo,Dn+=$r*uo,jn+=$r*fo,Un+=$r*io,Bn+=$r*co,hn+=$r*lo,pn+=$r*yo,Tn+=$r*ho,xn+=$r*po,Rn+=$r*mo,In+=$r*go,_i+=$r*vo,eo+=$r*wo,no+=$r*So,to+=$r*bo,cn+=38*Vn,on+=38*Dn,ln+=38*jn,Sn+=38*Un,An+=38*Bn,yn+=38*hn,Zn+=38*pn,On+=38*Tn,Wn+=38*xn,Hn+=38*Rn,Gn+=38*In,Xn+=38*_i,Kn+=38*eo,Jn+=38*no,Yn+=38*to,Wr=1,$r=cn+Wr+65535,Wr=Math.floor($r/65536),cn=$r-Wr*65536,$r=on+Wr+65535,Wr=Math.floor($r/65536),on=$r-Wr*65536,$r=ln+Wr+65535,Wr=Math.floor($r/65536),ln=$r-Wr*65536,$r=Sn+Wr+65535,Wr=Math.floor($r/65536),Sn=$r-Wr*65536,$r=An+Wr+65535,Wr=Math.floor($r/65536),An=$r-Wr*65536,$r=yn+Wr+65535,Wr=Math.floor($r/65536),yn=$r-Wr*65536,$r=Zn+Wr+65535,Wr=Math.floor($r/65536),Zn=$r-Wr*65536,$r=On+Wr+65535,Wr=Math.floor($r/65536),On=$r-Wr*65536,$r=Wn+Wr+65535,Wr=Math.floor($r/65536),Wn=$r-Wr*65536,$r=Hn+Wr+65535,Wr=Math.floor($r/65536),Hn=$r-Wr*65536,$r=Gn+Wr+65535,Wr=Math.floor($r/65536),Gn=$r-Wr*65536,$r=Xn+Wr+65535,Wr=Math.floor($r/65536),Xn=$r-Wr*65536,$r=Kn+Wr+65535,Wr=Math.floor($r/65536),Kn=$r-Wr*65536,$r=Jn+Wr+65535,Wr=Math.floor($r/65536),Jn=$r-Wr*65536,$r=Yn+Wr+65535,Wr=Math.floor($r/65536),Yn=$r-Wr*65536,$r=Nn+Wr+65535,Wr=Math.floor($r/65536),Nn=$r-Wr*65536,cn+=Wr-1+37*(Wr-1),Wr=1,$r=cn+Wr+65535,Wr=Math.floor($r/65536),cn=$r-Wr*65536,$r=on+Wr+65535,Wr=Math.floor($r/65536),on=$r-Wr*65536,$r=ln+Wr+65535,Wr=Math.floor($r/65536),ln=$r-Wr*65536,$r=Sn+Wr+65535,Wr=Math.floor($r/65536),Sn=$r-Wr*65536,$r=An+Wr+65535,Wr=Math.floor($r/65536),An=$r-Wr*65536,$r=yn+Wr+65535,Wr=Math.floor($r/65536),yn=$r-Wr*65536,$r=Zn+Wr+65535,Wr=Math.floor($r/65536),Zn=$r-Wr*65536,$r=On+Wr+65535,Wr=Math.floor($r/65536),On=$r-Wr*65536,$r=Wn+Wr+65535,Wr=Math.floor($r/65536),Wn=$r-Wr*65536,$r=Hn+Wr+65535,Wr=Math.floor($r/65536),Hn=$r-Wr*65536,$r=Gn+Wr+65535,Wr=Math.floor($r/65536),Gn=$r-Wr*65536,$r=Xn+Wr+65535,Wr=Math.floor($r/65536),Xn=$r-Wr*65536,$r=Kn+Wr+65535,Wr=Math.floor($r/65536),Kn=$r-Wr*65536,$r=Jn+Wr+65535,Wr=Math.floor($r/65536),Jn=$r-Wr*65536,$r=Yn+Wr+65535,Wr=Math.floor($r/65536),Yn=$r-Wr*65536,$r=Nn+Wr+65535,Wr=Math.floor($r/65536),Nn=$r-Wr*65536,cn+=Wr-1+37*(Wr-1),Or[0]=cn,Or[1]=on,Or[2]=ln,Or[3]=Sn,Or[4]=An,Or[5]=yn,Or[6]=Zn,Or[7]=On,Or[8]=Wn,Or[9]=Hn,Or[10]=Gn,Or[11]=Xn,Or[12]=Kn,Or[13]=Jn,Or[14]=Yn,Or[15]=Nn}function Nr(Or,qr){_r(Or,qr,qr)}function kr(Or,qr){var Hr=$t(),$r;for($r=0;$r<16;$r++)Hr[$r]=qr[$r];for($r=253;$r>=0;$r--)Nr(Hr,Hr),$r!==2&&$r!==4&&_r(Hr,Hr,qr);for($r=0;$r<16;$r++)Or[$r]=Hr[$r]}function Mr(Or,qr){var Hr=$t(),$r;for($r=0;$r<16;$r++)Hr[$r]=qr[$r];for($r=250;$r>=0;$r--)Nr(Hr,Hr),$r!==1&&_r(Hr,Hr,qr);for($r=0;$r<16;$r++)Or[$r]=Hr[$r]}function Lr(Or,qr,Hr){var $r=new Uint8Array(32),Wr=new Float64Array(80),cn,on,ln=$t(),Sn=$t(),An=$t(),yn=$t(),Zn=$t(),On=$t();for(on=0;on<31;on++)$r[on]=qr[on];for($r[31]=qr[31]&127|64,$r[0]&=248,pr(Wr,Hr),on=0;on<16;on++)Sn[on]=Wr[on],yn[on]=ln[on]=An[on]=0;for(ln[0]=yn[0]=1,on=254;on>=0;--on)cn=$r[on>>>3]>>>(on&7)&1,dr(ln,Sn,cn),dr(An,yn,cn),br(Zn,ln,An),Dr(ln,ln,An),br(An,Sn,yn),Dr(Sn,Sn,yn),Nr(yn,Zn),Nr(On,ln),_r(ln,An,ln),_r(An,Sn,Zn),br(Zn,ln,An),Dr(ln,ln,An),Nr(Sn,ln),Dr(An,yn,On),_r(ln,An,Kt),br(ln,ln,yn),_r(An,An,ln),_r(ln,yn,On),_r(yn,Sn,Wr),Nr(Sn,Zn),dr(ln,Sn,cn),dr(An,yn,cn);for(on=0;on<16;on++)Wr[on+16]=ln[on],Wr[on+32]=An[on],Wr[on+48]=Sn[on],Wr[on+64]=yn[on];var Wn=Wr.subarray(32),Hn=Wr.subarray(16);return kr(Wn,Wn),_r(Hn,Hn,Wn),lr(Or,Hn),0}function Cr(Or,qr){return Lr(Or,qr,qt)}function Er(Or,qr){return Ft(qr,32),Cr(Or,qr)}function Ar(Or,qr,Hr){var $r=new Uint8Array(32);return Lr($r,Hr,qr),xr(Or,Vt,$r,Sr)}var zr=Qt,Vr=ir;function Gr(Or,qr,Hr,$r,Wr,cn){var on=new Uint8Array(32);return Ar(on,Wr,cn),zr(Or,qr,Hr,$r,on)}function tn(Or,qr,Hr,$r,Wr,cn){var on=new Uint8Array(32);return Ar(on,Wr,cn),Vr(Or,qr,Hr,$r,on)}var Yr=[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 Jr(Or,qr,Hr,$r){for(var Wr=new Int32Array(16),cn=new Int32Array(16),on,ln,Sn,An,yn,Zn,On,Wn,Hn,Gn,Xn,Kn,Jn,Yn,Nn,Vn,Dn,jn,Un,Bn,hn,pn,Tn,xn,Rn,In,_i=Or[0],eo=Or[1],no=Or[2],to=Or[3],nn=Or[4],oo=Or[5],uo=Or[6],fo=Or[7],io=qr[0],co=qr[1],lo=qr[2],yo=qr[3],ho=qr[4],po=qr[5],mo=qr[6],go=qr[7],vo=0;$r>=128;){for(Un=0;Un<16;Un++)Bn=8*Un+vo,Wr[Un]=Hr[Bn+0]<<24|Hr[Bn+1]<<16|Hr[Bn+2]<<8|Hr[Bn+3],cn[Un]=Hr[Bn+4]<<24|Hr[Bn+5]<<16|Hr[Bn+6]<<8|Hr[Bn+7];for(Un=0;Un<80;Un++)if(on=_i,ln=eo,Sn=no,An=to,yn=nn,Zn=oo,On=uo,Wn=fo,Hn=io,Gn=co,Xn=lo,Kn=yo,Jn=ho,Yn=po,Nn=mo,Vn=go,hn=fo,pn=go,Tn=pn&65535,xn=pn>>>16,Rn=hn&65535,In=hn>>>16,hn=(nn>>>14|ho<<18)^(nn>>>18|ho<<14)^(ho>>>9|nn<<23),pn=(ho>>>14|nn<<18)^(ho>>>18|nn<<14)^(nn>>>9|ho<<23),Tn+=pn&65535,xn+=pn>>>16,Rn+=hn&65535,In+=hn>>>16,hn=nn&oo^~nn&uo,pn=ho&po^~ho&mo,Tn+=pn&65535,xn+=pn>>>16,Rn+=hn&65535,In+=hn>>>16,hn=Yr[Un*2],pn=Yr[Un*2+1],Tn+=pn&65535,xn+=pn>>>16,Rn+=hn&65535,In+=hn>>>16,hn=Wr[Un%16],pn=cn[Un%16],Tn+=pn&65535,xn+=pn>>>16,Rn+=hn&65535,In+=hn>>>16,xn+=Tn>>>16,Rn+=xn>>>16,In+=Rn>>>16,Dn=Rn&65535|In<<16,jn=Tn&65535|xn<<16,hn=Dn,pn=jn,Tn=pn&65535,xn=pn>>>16,Rn=hn&65535,In=hn>>>16,hn=(_i>>>28|io<<4)^(io>>>2|_i<<30)^(io>>>7|_i<<25),pn=(io>>>28|_i<<4)^(_i>>>2|io<<30)^(_i>>>7|io<<25),Tn+=pn&65535,xn+=pn>>>16,Rn+=hn&65535,In+=hn>>>16,hn=_i&eo^_i&no^eo&no,pn=io&co^io&lo^co&lo,Tn+=pn&65535,xn+=pn>>>16,Rn+=hn&65535,In+=hn>>>16,xn+=Tn>>>16,Rn+=xn>>>16,In+=Rn>>>16,Wn=Rn&65535|In<<16,Vn=Tn&65535|xn<<16,hn=An,pn=Kn,Tn=pn&65535,xn=pn>>>16,Rn=hn&65535,In=hn>>>16,hn=Dn,pn=jn,Tn+=pn&65535,xn+=pn>>>16,Rn+=hn&65535,In+=hn>>>16,xn+=Tn>>>16,Rn+=xn>>>16,In+=Rn>>>16,An=Rn&65535|In<<16,Kn=Tn&65535|xn<<16,eo=on,no=ln,to=Sn,nn=An,oo=yn,uo=Zn,fo=On,_i=Wn,co=Hn,lo=Gn,yo=Xn,ho=Kn,po=Jn,mo=Yn,go=Nn,io=Vn,Un%16===15)for(Bn=0;Bn<16;Bn++)hn=Wr[Bn],pn=cn[Bn],Tn=pn&65535,xn=pn>>>16,Rn=hn&65535,In=hn>>>16,hn=Wr[(Bn+9)%16],pn=cn[(Bn+9)%16],Tn+=pn&65535,xn+=pn>>>16,Rn+=hn&65535,In+=hn>>>16,Dn=Wr[(Bn+1)%16],jn=cn[(Bn+1)%16],hn=(Dn>>>1|jn<<31)^(Dn>>>8|jn<<24)^Dn>>>7,pn=(jn>>>1|Dn<<31)^(jn>>>8|Dn<<24)^(jn>>>7|Dn<<25),Tn+=pn&65535,xn+=pn>>>16,Rn+=hn&65535,In+=hn>>>16,Dn=Wr[(Bn+14)%16],jn=cn[(Bn+14)%16],hn=(Dn>>>19|jn<<13)^(jn>>>29|Dn<<3)^Dn>>>6,pn=(jn>>>19|Dn<<13)^(Dn>>>29|jn<<3)^(jn>>>6|Dn<<26),Tn+=pn&65535,xn+=pn>>>16,Rn+=hn&65535,In+=hn>>>16,xn+=Tn>>>16,Rn+=xn>>>16,In+=Rn>>>16,Wr[Bn]=Rn&65535|In<<16,cn[Bn]=Tn&65535|xn<<16;hn=_i,pn=io,Tn=pn&65535,xn=pn>>>16,Rn=hn&65535,In=hn>>>16,hn=Or[0],pn=qr[0],Tn+=pn&65535,xn+=pn>>>16,Rn+=hn&65535,In+=hn>>>16,xn+=Tn>>>16,Rn+=xn>>>16,In+=Rn>>>16,Or[0]=_i=Rn&65535|In<<16,qr[0]=io=Tn&65535|xn<<16,hn=eo,pn=co,Tn=pn&65535,xn=pn>>>16,Rn=hn&65535,In=hn>>>16,hn=Or[1],pn=qr[1],Tn+=pn&65535,xn+=pn>>>16,Rn+=hn&65535,In+=hn>>>16,xn+=Tn>>>16,Rn+=xn>>>16,In+=Rn>>>16,Or[1]=eo=Rn&65535|In<<16,qr[1]=co=Tn&65535|xn<<16,hn=no,pn=lo,Tn=pn&65535,xn=pn>>>16,Rn=hn&65535,In=hn>>>16,hn=Or[2],pn=qr[2],Tn+=pn&65535,xn+=pn>>>16,Rn+=hn&65535,In+=hn>>>16,xn+=Tn>>>16,Rn+=xn>>>16,In+=Rn>>>16,Or[2]=no=Rn&65535|In<<16,qr[2]=lo=Tn&65535|xn<<16,hn=to,pn=yo,Tn=pn&65535,xn=pn>>>16,Rn=hn&65535,In=hn>>>16,hn=Or[3],pn=qr[3],Tn+=pn&65535,xn+=pn>>>16,Rn+=hn&65535,In+=hn>>>16,xn+=Tn>>>16,Rn+=xn>>>16,In+=Rn>>>16,Or[3]=to=Rn&65535|In<<16,qr[3]=yo=Tn&65535|xn<<16,hn=nn,pn=ho,Tn=pn&65535,xn=pn>>>16,Rn=hn&65535,In=hn>>>16,hn=Or[4],pn=qr[4],Tn+=pn&65535,xn+=pn>>>16,Rn+=hn&65535,In+=hn>>>16,xn+=Tn>>>16,Rn+=xn>>>16,In+=Rn>>>16,Or[4]=nn=Rn&65535|In<<16,qr[4]=ho=Tn&65535|xn<<16,hn=oo,pn=po,Tn=pn&65535,xn=pn>>>16,Rn=hn&65535,In=hn>>>16,hn=Or[5],pn=qr[5],Tn+=pn&65535,xn+=pn>>>16,Rn+=hn&65535,In+=hn>>>16,xn+=Tn>>>16,Rn+=xn>>>16,In+=Rn>>>16,Or[5]=oo=Rn&65535|In<<16,qr[5]=po=Tn&65535|xn<<16,hn=uo,pn=mo,Tn=pn&65535,xn=pn>>>16,Rn=hn&65535,In=hn>>>16,hn=Or[6],pn=qr[6],Tn+=pn&65535,xn+=pn>>>16,Rn+=hn&65535,In+=hn>>>16,xn+=Tn>>>16,Rn+=xn>>>16,In+=Rn>>>16,Or[6]=uo=Rn&65535|In<<16,qr[6]=mo=Tn&65535|xn<<16,hn=fo,pn=go,Tn=pn&65535,xn=pn>>>16,Rn=hn&65535,In=hn>>>16,hn=Or[7],pn=qr[7],Tn+=pn&65535,xn+=pn>>>16,Rn+=hn&65535,In+=hn>>>16,xn+=Tn>>>16,Rn+=xn>>>16,In+=Rn>>>16,Or[7]=fo=Rn&65535|In<<16,qr[7]=go=Tn&65535|xn<<16,vo+=128,$r-=128}return $r}function Kr(Or,qr,Hr){var $r=new Int32Array(8),Wr=new Int32Array(8),cn=new Uint8Array(256),on,ln=Hr;for($r[0]=1779033703,$r[1]=3144134277,$r[2]=1013904242,$r[3]=2773480762,$r[4]=1359893119,$r[5]=2600822924,$r[6]=528734635,$r[7]=1541459225,Wr[0]=4089235720,Wr[1]=2227873595,Wr[2]=4271175723,Wr[3]=1595750129,Wr[4]=2917565137,Wr[5]=725511199,Wr[6]=4215389547,Wr[7]=327033209,Jr($r,Wr,qr,Hr),Hr%=128,on=0;on<Hr;on++)cn[on]=qr[ln-Hr+on];for(cn[Hr]=128,Hr=256-128*(Hr<112?1:0),cn[Hr-9]=0,tr(cn,Hr-8,ln/536870912|0,ln<<3),Jr($r,Wr,cn,Hr),on=0;on<8;on++)tr(Or,8*on,$r[on],Wr[on]);return 0}function Xr(Or,qr){var Hr=$t(),$r=$t(),Wr=$t(),cn=$t(),on=$t(),ln=$t(),Sn=$t(),An=$t(),yn=$t();Dr(Hr,Or[1],Or[0]),Dr(yn,qr[1],qr[0]),_r(Hr,Hr,yn),br($r,Or[0],Or[1]),br(yn,qr[0],qr[1]),_r($r,$r,yn),_r(Wr,Or[3],qr[3]),_r(Wr,Wr,Jt),_r(cn,Or[2],qr[2]),br(cn,cn,cn),Dr(on,$r,Hr),Dr(ln,cn,Wr),br(Sn,cn,Wr),br(An,$r,Hr),_r(Or[0],on,ln),_r(Or[1],An,Sn),_r(Or[2],Sn,ln),_r(Or[3],on,An)}function Qr(Or,qr,Hr){var $r;for($r=0;$r<4;$r++)dr(Or[$r],qr[$r],Hr)}function un(Or,qr){var Hr=$t(),$r=$t(),Wr=$t();kr(Wr,qr[2]),_r(Hr,qr[0],Wr),_r($r,qr[1],Wr),lr(Or,$r),Or[31]^=wr(Hr)<<7}function an(Or,qr,Hr){var $r,Wr;for(ur(Or[0],zt),ur(Or[1],Ht),ur(Or[2],Ht),ur(Or[3],zt),Wr=255;Wr>=0;--Wr)$r=Hr[Wr/8|0]>>(Wr&7)&1,Qr(Or,qr,$r),Xr(qr,Or),Xr(Or,Or),Qr(Or,qr,$r)}function sn(Or,qr){var Hr=[$t(),$t(),$t(),$t()];ur(Hr[0],Xt),ur(Hr[1],Zt),ur(Hr[2],Ht),_r(Hr[3],Xt,Zt),an(Or,Hr,qr)}function vn(Or,qr,Hr){var $r=new Uint8Array(64),Wr=[$t(),$t(),$t(),$t()],cn;for(Hr||Ft(qr,32),Kr($r,qr,32),$r[0]&=248,$r[31]&=127,$r[31]|=64,sn(Wr,$r),un(Or,Wr),cn=0;cn<32;cn++)qr[cn+32]=Or[cn];return 0}var gn=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 fn(Or,qr){var Hr,$r,Wr,cn;for($r=63;$r>=32;--$r){for(Hr=0,Wr=$r-32,cn=$r-12;Wr<cn;++Wr)qr[Wr]+=Hr-16*qr[$r]*gn[Wr-($r-32)],Hr=Math.floor((qr[Wr]+128)/256),qr[Wr]-=Hr*256;qr[Wr]+=Hr,qr[$r]=0}for(Hr=0,Wr=0;Wr<32;Wr++)qr[Wr]+=Hr-(qr[31]>>4)*gn[Wr],Hr=qr[Wr]>>8,qr[Wr]&=255;for(Wr=0;Wr<32;Wr++)qr[Wr]-=Hr*gn[Wr];for($r=0;$r<32;$r++)qr[$r+1]+=qr[$r]>>8,Or[$r]=qr[$r]&255}function wn(Or){var qr=new Float64Array(64),Hr;for(Hr=0;Hr<64;Hr++)qr[Hr]=Or[Hr];for(Hr=0;Hr<64;Hr++)Or[Hr]=0;fn(Or,qr)}function dn(Or,qr,Hr,$r){var Wr=new Uint8Array(64),cn=new Uint8Array(64),on=new Uint8Array(64),ln,Sn,An=new Float64Array(64),yn=[$t(),$t(),$t(),$t()];Kr(Wr,$r,32),Wr[0]&=248,Wr[31]&=127,Wr[31]|=64;var Zn=Hr+64;for(ln=0;ln<Hr;ln++)Or[64+ln]=qr[ln];for(ln=0;ln<32;ln++)Or[32+ln]=Wr[32+ln];for(Kr(on,Or.subarray(32),Hr+32),wn(on),sn(yn,on),un(Or,yn),ln=32;ln<64;ln++)Or[ln]=$r[ln];for(Kr(cn,Or,Hr+64),wn(cn),ln=0;ln<64;ln++)An[ln]=0;for(ln=0;ln<32;ln++)An[ln]=on[ln];for(ln=0;ln<32;ln++)for(Sn=0;Sn<32;Sn++)An[ln+Sn]+=cn[ln]*Wr[Sn];return fn(Or.subarray(32),An),Zn}function Ur(Or,qr){var Hr=$t(),$r=$t(),Wr=$t(),cn=$t(),on=$t(),ln=$t(),Sn=$t();return ur(Or[2],Ht),pr(Or[1],qr),Nr(Wr,Or[1]),_r(cn,Wr,Gt),Dr(Wr,Wr,Or[2]),br(cn,Or[2],cn),Nr(on,cn),Nr(ln,on),_r(Sn,ln,on),_r(Hr,Sn,Wr),_r(Hr,Hr,cn),Mr(Hr,Hr),_r(Hr,Hr,Wr),_r(Hr,Hr,cn),_r(Hr,Hr,cn),_r(Or[0],Hr,cn),Nr($r,Or[0]),_r($r,$r,cn),hr($r,Wr)&&_r(Or[0],Or[0],er),Nr($r,Or[0]),_r($r,$r,cn),hr($r,Wr)?-1:(wr(Or[0])===qr[31]>>7&&Dr(Or[0],zt,Or[0]),_r(Or[3],Or[0],Or[1]),0)}function Ir(Or,qr,Hr,$r){var Wr,cn=new Uint8Array(32),on=new Uint8Array(64),ln=[$t(),$t(),$t(),$t()],Sn=[$t(),$t(),$t(),$t()];if(Hr<64||Ur(Sn,$r))return-1;for(Wr=0;Wr<Hr;Wr++)Or[Wr]=qr[Wr];for(Wr=0;Wr<32;Wr++)Or[Wr+32]=$r[Wr];if(Kr(on,Or,Hr),wn(on),an(ln,Sn,on),sn(Sn,qr.subarray(32)),Xr(ln,Sn),un(cn,ln),Hr-=64,nr(qr,0,cn,0)){for(Wr=0;Wr<Hr;Wr++)Or[Wr]=0;return-1}for(Wr=0;Wr<Hr;Wr++)Or[Wr]=qr[Wr+64];return Hr}var Pr=32,Fr=24,Zr=32,en=16,rn=32,En=32,$n=32,mn=32,Fn=32,_n=Fr,kn=Zr,Qn=en,Ln=64,Cn=32,ro=64,qn=32,Pn=64;_e.lowlevel={crypto_core_hsalsa20:xr,crypto_stream_xor:Rr,crypto_stream:jr,crypto_stream_salsa20_xor:Tr,crypto_stream_salsa20:Br,crypto_onetimeauth:sr,crypto_onetimeauth_verify:or,crypto_verify_16:ar,crypto_verify_32:nr,crypto_secretbox:Qt,crypto_secretbox_open:ir,crypto_scalarmult:Lr,crypto_scalarmult_base:Cr,crypto_box_beforenm:Ar,crypto_box_afternm:zr,crypto_box:Gr,crypto_box_open:tn,crypto_box_keypair:Er,crypto_hash:Kr,crypto_sign:dn,crypto_sign_keypair:vn,crypto_sign_open:Ir,crypto_secretbox_KEYBYTES:Pr,crypto_secretbox_NONCEBYTES:Fr,crypto_secretbox_ZEROBYTES:Zr,crypto_secretbox_BOXZEROBYTES:en,crypto_scalarmult_BYTES:rn,crypto_scalarmult_SCALARBYTES:En,crypto_box_PUBLICKEYBYTES:$n,crypto_box_SECRETKEYBYTES:mn,crypto_box_BEFORENMBYTES:Fn,crypto_box_NONCEBYTES:_n,crypto_box_ZEROBYTES:kn,crypto_box_BOXZEROBYTES:Qn,crypto_sign_BYTES:Ln,crypto_sign_PUBLICKEYBYTES:Cn,crypto_sign_SECRETKEYBYTES:ro,crypto_sign_SEEDBYTES:qn,crypto_hash_BYTES:Pn,gf:$t,D:Gt,L:gn,pack25519:lr,unpack25519:pr,M:_r,A:br,S:Nr,Z:Dr,pow2523:Mr,add:Xr,set25519:ur,modL:fn,scalarmult:an,scalarbase:sn};function ao(Or,qr){if(Or.length!==Pr)throw new Error("bad key size");if(qr.length!==Fr)throw new Error("bad nonce size")}function zn(Or,qr){if(Or.length!==$n)throw new Error("bad public key size");if(qr.length!==mn)throw new Error("bad secret key size")}function Mn(){for(var Or=0;Or<arguments.length;Or++)if(!(arguments[Or]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function so(Or){for(var qr=0;qr<Or.length;qr++)Or[qr]=0}_e.randomBytes=function(Or){var qr=new Uint8Array(Or);return Ft(qr,Or),qr},_e.secretbox=function(Or,qr,Hr){Mn(Or,qr,Hr),ao(Hr,qr);for(var $r=new Uint8Array(Zr+Or.length),Wr=new Uint8Array($r.length),cn=0;cn<Or.length;cn++)$r[cn+Zr]=Or[cn];return Qt(Wr,$r,$r.length,qr,Hr),Wr.subarray(en)},_e.secretbox.open=function(Or,qr,Hr){Mn(Or,qr,Hr),ao(Hr,qr);for(var $r=new Uint8Array(en+Or.length),Wr=new Uint8Array($r.length),cn=0;cn<Or.length;cn++)$r[cn+en]=Or[cn];return $r.length<32||ir(Wr,$r,$r.length,qr,Hr)!==0?null:Wr.subarray(Zr)},_e.secretbox.keyLength=Pr,_e.secretbox.nonceLength=Fr,_e.secretbox.overheadLength=en,_e.scalarMult=function(Or,qr){if(Mn(Or,qr),Or.length!==En)throw new Error("bad n size");if(qr.length!==rn)throw new Error("bad p size");
1497var Hr=new Uint8Array(rn);return Lr(Hr,Or,qr),Hr},_e.scalarMult.base=function(Or){if(Mn(Or),Or.length!==En)throw new Error("bad n size");var qr=new Uint8Array(rn);return Cr(qr,Or),qr},_e.scalarMult.scalarLength=En,_e.scalarMult.groupElementLength=rn,_e.box=function(Or,qr,Hr,$r){var Wr=_e.box.before(Hr,$r);return _e.secretbox(Or,qr,Wr)},_e.box.before=function(Or,qr){Mn(Or,qr),zn(Or,qr);var Hr=new Uint8Array(Fn);return Ar(Hr,Or,qr),Hr},_e.box.after=_e.secretbox,_e.box.open=function(Or,qr,Hr,$r){var Wr=_e.box.before(Hr,$r);return _e.secretbox.open(Or,qr,Wr)},_e.box.open.after=_e.secretbox.open,_e.box.keyPair=function(){var Or=new Uint8Array($n),qr=new Uint8Array(mn);return Er(Or,qr),{publicKey:Or,secretKey:qr}},_e.box.keyPair.fromSecretKey=function(Or){if(Mn(Or),Or.length!==mn)throw new Error("bad secret key size");var qr=new Uint8Array($n);return Cr(qr,Or),{publicKey:qr,secretKey:new Uint8Array(Or)}},_e.box.publicKeyLength=$n,_e.box.secretKeyLength=mn,_e.box.sharedKeyLength=Fn,_e.box.nonceLength=_n,_e.box.overheadLength=_e.secretbox.overheadLength,_e.sign=function(Or,qr){if(Mn(Or,qr),qr.length!==ro)throw new Error("bad secret key size");
1497var Hr=new Uint8Array(Ln+Or.length);return dn(Hr,Or,Or.length,qr),Hr},_e.sign.open=function(Or,qr){if(Mn(Or,qr),qr.length!==Cn)throw new Error("bad public key size");var Hr=new Uint8Array(Or.length),$r=Ir(Hr,Or,Or.length,qr);if($r<0)return null;for(var Wr=new Uint8Array($r),cn=0;cn<Wr.length;cn++)Wr[cn]=Hr[cn];return Wr},_e.sign.detached=function(Or,qr){for(var Hr=_e.sign(Or,qr),$r=new Uint8Array(Ln),Wr=0;Wr<$r.length;Wr++)$r[Wr]=Hr[Wr];return $r},_e.sign.detached.verify=function(Or,qr,Hr){if(Mn(Or,qr,Hr),qr.length!==Ln)throw new Error("bad signature size");if(Hr.length!==Cn)throw new Error("bad public key size");var $r=new Uint8Array(Ln+Or.length),Wr=new Uint8Array(Ln+Or.length),cn;for(cn=0;cn<Ln;cn++)$r[cn]=qr[cn];for(cn=0;cn<Or.length;cn++)$r[cn+Ln]=Or[cn];return Ir(Wr,$r,$r.length,Hr)>=0},_e.sign.keyPair=function(){var Or=new Uint8Array(Cn),qr=new Uint8Array(ro);return vn(Or,qr),{publicKey:Or,secretKey:qr}},_e.sign.keyPair.fromSecretKey=function(Or){if(Mn(Or),Or.length!==ro)throw new Error("bad secret key size");for(var qr=new Uint8Array(Cn),Hr=0;Hr<qr.length;Hr++)qr[Hr]=Or[32+Hr];return{publicKey:qr,secretKey:new Uint8Array(Or)}},_e.sign.keyPair.fromSeed=function(Or){if(Mn(Or),Or.length!==qn)throw new Error("bad seed size");for(var qr=new Uint8Array(Cn),Hr=new Uint8Array(ro),$r=0;$r<32;$r++)Hr[$r]=Or[$r];return vn(qr,Hr,!0),{publicKey:qr,secretKey:Hr}},_e.sign.publicKeyLength=Cn,_e.sign.secretKeyLength=ro,_e.sign.seedLength=qn,_e.sign.signatureLength=Ln,_e.hash=function(Or){Mn(Or);var qr=new Uint8Array(Pn);return Kr(qr,Or,Or.length),qr},_e.hash.hashLength=Pn,_e.verify=function(Or,qr){return Mn(Or,qr),Or.length===0||qr.length===0||Or.length!==qr.length?!1:rr(Or,0,qr,0,Or.length)===0},_e.setPRNG=function(Or){Ft=Or},function(){var Or=typeof self<"u"?self.crypto||self.msCrypto:null;if(Or&&Or.getRandomValues){var qr=65536;_e.setPRNG(function(Hr,$r){var Wr,cn=new Uint8Array($r);for(Wr=0;Wr<$r;Wr+=qr)Or.getRandomValues(cn.subarray(Wr,Wr+Math.min($r-Wr,qr)));for(Wr=0;Wr<$r;Wr++)Hr[Wr]=cn[Wr];so(cn)})}else typeof commonjsRequire<"u"&&(Or=requireCryptoBrowserify(),Or&&Or.randomBytes&&_e.setPRNG(function(Hr,$r){var Wr,cn=Or.randomBytes($r);for(Wr=0;Wr<$r;Wr++)Hr[Wr]=cn[Wr];so(cn)}))}()})(yt.exports?yt.exports:self.nacl=self.nacl||{})})(naclFast);var naclFastExports=naclFast.exports;const nacl=getDefaultExportFromCjs$1(naclFastExports);var sha512$1={exports:{}};(function(yt){(function(){var _e="input is invalid type",$t="finalize already called",Ft=typeof window=="object",Vt=Ft?window:{};Vt.JS_SHA512_NO_WINDOW&&(Ft=!1);var qt=!Ft&&typeof self=="object",zt=!Vt.JS_SHA512_NO_NODE_JS&&typeof process$1=="object"&&process$1.versions&&process$1.versions.node;zt?Vt=globalThis:qt&&(Vt=self);var Ht=!Vt.JS_SHA512_NO_COMMON_JS&&!0&&yt.exports,Kt=!Vt.JS_SHA512_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",Gt="0123456789abcdef".split(""),Jt=[-2147483648,8388608,32768,128],Xt=[24,16,8,0],Zt=[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,
vendor: 1,405 bytes, line 1497
14971126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],er=["hex","array","digest","arrayBuffer"],tr=[];(Vt.JS_SHA512_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(Sr){return Object.prototype.toString.call(Sr)==="[object Array]"}),Kt&&(Vt.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(Sr){return typeof Sr=="object"&&Sr.buffer&&Sr.buffer.constructor===ArrayBuffer});var rr=function(Sr,Tr){return function(Br){return new fr(Tr,!0).update(Br)[Sr]()}},ar=function(Sr){var Tr=rr("hex",Sr);Tr.create=function(){return new fr(Sr)},Tr.update=function(Rr){return Tr.create().update(Rr)};for(var Br=0;Br<er.length;++Br){var jr=er[Br];Tr[jr]=rr(jr,Sr)}return Tr},nr=function(Sr,Tr){return function(Br,jr){return new vr(Br,Tr,!0).update(jr)[Sr]()}},cr=function(Sr){var Tr=nr("hex",Sr);Tr.create=function(Rr){return new vr(Rr,Sr)},Tr.update=function(Rr,yr){return Tr.create(Rr).update(yr)};for(var Br=0;Br<er.length;++Br){var jr=er[Br];Tr[jr]=nr(jr,Sr)}return Tr};function fr(Sr,Tr){Tr?(tr[0]=tr[1]=tr[2]=tr[3]=tr[4]=tr[5]=tr[6]=tr[7]=tr[8]=tr[9]=tr[10]=tr[11]=tr[12]=tr[13]=tr[14]=tr[15]=tr[16]=tr[17]=tr[18]=tr[19]=tr[20]=tr[21]=tr[22]=tr[23]=tr[24]=tr[25]=tr[26]=tr[27]=tr[28]=tr[29]=tr[30]=tr[31]=tr[32]=0,this.blocks=tr):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Sr==384?
1497(this.h0h=3418070365,this.h0l=3238371032,this.h1h=1654270250,this.h1l=914150663,this.h2h=2438529370,this.h2l=812702999,this.h3h=355462360,this.h3l=4144912697,this.h4h=1731405415,this.h4l=4290775857,this.h5h=2394180231,this.h5l=1750603025,this.h6h=3675008525,this.h6l=1694076839,this.h7h=1203062813,this.h7l=3204075428):Sr==256?(this.h0h=573645204,this.h0l=4230739756,this.h1h=2673172387,this.h1l=3360449730,this.h2h=596883563,this.h2l=1867755857,this.h3h=2520282905,this.h3l=1497426621,this.h4h=2519219938,this.h4l=2827943907,this.h5h=3193839141,this.h5l=1401305490,this.h6h=721525244,this.h6l=746961066,this.h7h=246885852,this.h7l=2177182882):Sr==224?(this.h0h=2352822216,this.h0l=424955298,this.h1h=1944164710,this.h1l=2312950998,this.h2h=502970286,this.h2l=855612546,this.h3h=1738396948,this.h3l=1479516111,this.h4h=258812777,this.h4l=2077511080,this.h5h=2011393907,this.h5l=79989058,this.h6h=1067287976,this.h6l=1780299464,this.h7h=286451373,this.h7l=2446758561):(this.h0h=1779033703,this.h0l=4089235720,this.h1h=3144134277,this.h1l=2227873595,this.h2h=1013904242,this.h2l=4271175723,this.h3h=2773480762,this.h3l=1595750129,this.h4h=1359893119,this.h4l=2917565137,this.h5h=2600822924,this.h5l=725511199,this.h6h=528734635,this.h6l=4215389547,this.h7h=1541459225,this.h7l=327033209),this.bits=Sr,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1}fr.prototype.update=function(Sr){if(this.finalized)throw new Error($t);var Tr,Br=typeof Sr;if(Br!=="string"){if(Br==="object"){if(Sr===null)throw new Error(_e);if(Kt&&Sr.constructor===ArrayBuffer)Sr=new Uint8Array(Sr);else if(!Array.isArray(Sr)&&(!Kt||!ArrayBuffer.isView(Sr)))throw new Error(_e)}else throw new Error(_e);Tr=!0}for(var jr,Rr=0,yr,sr=Sr.length,or=this.blocks;Rr<sr;){if(this.hashed&&(this.hashed=!1,or[0]=this.block,or[1]=or[2]=or[3]=or[4]=or[5]=or[6]=or[7]=or[8]=or[9]=or[10]=or[11]=or[12]=or[13]=or[14]=or[15]=or[16]=or[17]=or[18]=or[19]=or[20]=or[21]=or[22]=or[23]=or[24]=or[25]=or[26]=or[27]=or[28]=or[29]=or[30]=or[31]=or[32]=0),Tr)for(yr=this.start;Rr<sr&&yr<128;++Rr)or[yr>>2]|=Sr[Rr]<<Xt[yr++&3];else for(yr=this.start;Rr<sr&&yr<128;++Rr)jr=Sr.charCodeAt(Rr),jr<128?or[yr>>2]|=jr<<Xt[yr++&3]:jr<2048?(or[yr>>2]|=(192|jr>>6)<<Xt[yr++&3],or[yr>>2]|=(128|jr&63)<<Xt[yr++&3]):jr<55296||jr>=57344?(or[yr>>2]|=(224|jr>>12)<<Xt[yr++&3],or[yr>>2]|=(128|jr>>6&63)<<Xt[yr++&3],or[yr>>2]|=(128|jr&63)<<Xt[yr++&3]):(jr=65536+((jr&1023)<<10|Sr.charCodeAt(++Rr)&1023),or[yr>>2]|=(240|jr>>18)<<Xt[yr++&3],or[yr>>2]|=(128|jr>>12&63)<<Xt[yr++&3],or[yr>>2]|=(128|jr>>6&63)<<Xt[yr++&3],or[yr>>2]|=(128|jr&63)<<Xt[yr++&3]);this.lastByteIndex=yr,this.bytes+=yr-this.start,yr>=128?(this.block=or[32],this.start=yr-128,this.hash(),this.hashed=!0):this.start=yr}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},fr.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var Sr=this.blocks,Tr=this.lastByteIndex;Sr[32]=this.block,Sr[Tr>>2]|=Jt[Tr&3],this.block=Sr[32],Tr>=112&&(this.hashed||this.hash(),Sr[0]=this.block,Sr[1]=Sr[2]=Sr[3]=Sr[4]=Sr[5]=Sr[6]=Sr[7]=Sr[8]=Sr[9]=Sr[10]=Sr[11]=Sr[12]=Sr[13]=Sr[14]=Sr[15]=Sr[16]=Sr[17]=Sr[18]=Sr[19]=Sr[20]=Sr[21]=Sr[22]=Sr[23]=Sr[24]=Sr[25]=Sr[26]=Sr[27]=Sr[28]=Sr[29]=Sr[30]=Sr[31]=Sr[32]=0),Sr[30]=this.hBytes<<3|this.bytes>>>29,Sr[31]=this.bytes<<3,this.hash()}},fr.prototype.hash=function(){var Sr=this.h0h,Tr=this.h0l,Br=this.h1h,jr=this.h1l,Rr=this.h2h,yr=this.h2l,sr=this.h3h,or=this.h3l,Qt=this.h4h,ir=this.h4l,ur=this.h5h,gr=this.h5l,dr=this.h6h,lr=this.h6l,hr=this.h7h,wr=this.h7l,pr=this.blocks,br,Dr,_r,Nr,kr,Mr,Lr,Cr,Er,Ar,zr,Vr,Gr,tn,Yr,Jr,Kr,Xr,Qr,un,an,sn,vn,gn,fn;for(br=32;br<160;br+=2)un=pr[br-30],an=pr[br-29],Dr=(un>>>1|an<<31)^(un>>>8|an<<24)^un>>>7,_r=(an>>>1|un<<31)^(an>>>8|un<<24)^(an>>>7|un<<25),un=pr[br-4],an=pr[br-3],Nr=(un>>>19|an<<13)^(an>>>29|un<<3)^un>>>6,kr=(an>>>19|un<<13)^(un>>>29|an<<3)^(an>>>6|un<<26),un=pr[br-32],an=pr[br-31],sn=pr[br-14],vn=pr[br-13],Mr=(vn&65535)+(an&65535)+(_r&65535)+(kr&65535),Lr=(vn>>>16)+(an>>>16)+(_r>>>16)+(kr>>>16)+(Mr>>>16),Cr=(sn&65535)+(un&65535)+(Dr&65535)+(Nr&65535)+(Lr>>>16),Er=(sn>
1497>>16)+(un>>>16)+(Dr>>>16)+(Nr>>>16)+(Cr>>>16),pr[br]=Er<<16|Cr&65535,pr[br+1]=Lr<<16|Mr&65535;var wn=Sr,dn=Tr,Ur=Br,Ir=jr,Pr=Rr,Fr=yr,Zr=sr,en=or,rn=Qt,En=ir,$n=ur,mn=gr,Fn=dr,_n=lr,kn=hr,Qn=wr;for(Jr=Ur&Pr,Kr=Ir&Fr,br=0;br<160;br+=8)Dr=(wn>>>28|dn<<4)^(dn>>>2|wn<<30)^(dn>>>7|wn<<25),_r=(dn>>>28|wn<<4)^(wn>>>2|dn<<30)^(wn>>>7|dn<<25),Nr=(rn>>>14|En<<18)^(rn>>>18|En<<14)^(En>>>9|rn<<23),kr=(En>>>14|rn<<18)^(En>>>18|rn<<14)^(rn>>>9|En<<23),Ar=wn&Ur,zr=dn&Ir,Xr=Ar^wn&Pr^Jr,Qr=zr^dn&Fr^Kr,gn=rn&$n^~rn&Fn,fn=En&mn^~En&_n,un=pr[br],an=pr[br+1],sn=Zt[br],vn=Zt[br+1],Mr=(vn&65535)+(an&65535)+(fn&65535)+(kr&65535)+(Qn&65535),Lr=(vn>>>16)+(an>>>16)+(fn>>>16)+(kr>>>16)+(Qn>>>16)+(Mr>>>16),Cr=(sn&65535)+(un&65535)+(gn&65535)+(Nr&65535)+(kn&65535)+(Lr>>>16),Er=(sn>>>16)+(un>>>16)+(gn>>>16)+(Nr>>>16)+(kn>>>16)+(Cr>>>16),un=Er<<16|Cr&65535,an=Lr<<16|Mr&65535,Mr=(Qr&65535)+(_r&65535),Lr=(Qr>>>16)+(_r>>>16)+(Mr>>>16),Cr=(Xr&65535)+(Dr&65535)+(Lr>>>16),Er=(Xr>>>16)+(Dr>>>16)+(Cr>>>16),sn=Er<<16|Cr&65535,vn=Lr<<16|Mr&65535,Mr=(en&65535)+(an&65535),Lr=(en>>>16)+(an>>>16)+(Mr>>>16),Cr=(Zr&65535)+(un&65535)+(Lr>>>16),Er=(Zr>>>16)+(un>>>16)+(Cr>>>16),kn=Er<<16|Cr&65535,Qn=Lr<<16|Mr&65535,Mr=(vn&65535)+(an&65535),Lr=(vn>>>16)+(an>>>16)+(Mr>>>16),Cr=(sn&65535)+(un&65535)+(Lr>>>16),Er=(sn>>>16)+(un>>>16)+(Cr>>>16),Zr=Er<<16|Cr&65535,en=Lr<<16|Mr&65535,Dr=(Zr>>>28|en<<4)^(en>>>2|Zr<<30)^(en>>>7|Zr<<25),_r=(en>>>28|Zr<<4)^(Zr>>>2|en<<30)^(Zr>>>7|en<<25),Nr=(kn>>>14|Qn<<18)^(kn>>>18|Qn<<14)^(Qn>>>9|kn<<23),kr=(Qn>>>14|kn<<18)^(Qn>>>18|kn<<14)^(kn>>>9|Qn<<23),Vr=Zr&wn,Gr=en&dn,Xr=Vr^Zr&Ur^Ar,Qr=Gr^en&Ir^zr,gn=kn&rn^~kn&$n,fn=Qn&En^~Qn&mn,un=pr[br+2],an=pr[br+3],sn=Zt[br+2],vn=Zt[br+3],Mr=(vn&65535)+(an&65535)+(fn&65535)+(kr&65535)+(_n&65535),Lr=(vn>>>16)+(an>>>16)+(fn>>>16)+(kr>>>16)+(_n>>>16)+(Mr>>>16),Cr=(sn&65535)+(un&65535)+(gn&65535)+(Nr&65535)+(Fn&65535)+(Lr>>>16),Er=(sn>>>16)+(un>>>16)+(gn>>>16)+(Nr>>>16)+(Fn>>>16)+(Cr>>>16),un=Er<<16|Cr&65535,an=Lr<<16|Mr&65535,Mr=(Qr&65535)+(_r&65535),Lr=(Qr>>>16)+(_r>>>16)+(Mr>>>16),Cr=(Xr&65535)+(Dr&65535)+(Lr>>>16),Er=(Xr>>>16)+(Dr>>>16)+(Cr>>>16),sn=Er<<16|Cr&65535,vn=Lr<<16|Mr&65535,Mr=(Fr&65535)+(an&65535),Lr=(Fr>>>16)+(an>>>16)+(Mr>>>16),Cr=(Pr&65535)+(un&65535)+(Lr>>>16),Er=(Pr>>>16)+(un>>>16)+(Cr>>>16),Fn=Er<<16|Cr&65535,_n=Lr<<16|Mr&65535,Mr=(vn&65535)+(an&65535),Lr=(vn>>>16)+(an>>>16)+(Mr>>>16),Cr=(sn&65535)+(un&65535)+(Lr>>>16),Er=(sn>>>16)+(un>>>16)+(Cr>>>16),Pr=Er<<16|Cr&65535,Fr=Lr<<16|Mr&65535,Dr=(Pr>>>28|Fr<<4)^(Fr>>>2|Pr<<30)^(Fr>>>7|Pr<<25),_r=(Fr>>>28|Pr<<4)^(Pr>>>2|Fr<<30)^(Pr>>>7|Fr<<25),Nr=(Fn>>>14|_n<<18)^(Fn>>>18|_n<<14)^(_n>>>9|Fn<<23),kr=(_n>>>14|Fn<<18)^(_n>>>18|Fn<<14)^(Fn>>>9|_n<<23),tn=Pr&Zr,Yr=Fr&en,Xr=tn^Pr&wn^Vr,Qr=Yr^Fr&dn^Gr,gn=Fn&kn^~Fn&rn,fn=_n&Qn^~_n&En,un=pr[br+4],an=pr[br+5],sn=Zt[br+4],vn=Zt[br+5],Mr=(vn&65535)+(an&65535)+(fn&65535)+(kr&65535)+(mn&65535),Lr=(vn>>>16)+(an>>>16)+(fn>>>16)+(kr>>>16)+(mn>>>16)+(Mr>>>16),Cr=(sn&65535)+(un&65535)+(gn&65535)+(Nr&65535)+($n&65535)+(Lr>>>16),Er=(sn>>>16)+(un>>>16)+(gn>>>16)+(Nr>>>16)+($n>>>16)+(Cr>>>16),un=Er<<16|Cr&65535,an=Lr<<16|Mr&65535,Mr=(Qr&65535)+(_r&65535),Lr=(Qr>>>16)+(_r>>>16)+(Mr>>>16),Cr=(Xr&65535)+(Dr&65535)+(Lr>>>16),Er=(Xr>>>16)+(Dr>>>16)+(Cr>>>16),sn=Er<<16|Cr&65535,vn=Lr<<16|Mr&65535,Mr=(Ir&65535)+(an&65535),Lr=(Ir>>>16)+(an>>>16)+(Mr>>>16),Cr=(Ur&65535)+(un&65535)+(Lr>>>16),Er=(Ur>>>16)+(un>>>16)+(Cr>>>16),$n=Er<<16|Cr&65535,mn=Lr<<16|Mr&65535,Mr=(vn&65535)+(an&65535),Lr=(vn>>>16)+(an>>>16)+(Mr>>>16),Cr=(sn&65535)+(un&65535)+(Lr>>>16),Er=(sn>>>16)+(un>>>16)+(Cr>>>16),Ur=Er<<16|Cr&65535,Ir=Lr<<16|Mr&65535,Dr=(Ur>>>28|Ir<<4)^(Ir>>>2|Ur<<30)^(Ir>>>7|Ur<<25),_r=(Ir>>>28|Ur<<4)^(Ur>>>2|Ir<<30)^(Ur>>>7|Ir<<25),Nr=($n>>>14|mn<<18)^($n>>>18|mn<<14)^(mn>>>9|$n<<23),kr=(mn>>>14|$n<<18)^(mn>>>18|$n<<14)^($n>>>9|mn<<23),Jr=Ur&Pr,Kr=Ir&Fr,Xr=Jr^Ur&Zr^tn,Qr=Kr^Ir&en^Yr,gn=$n&Fn^~$n&kn,fn=mn&_n^~mn&Qn,un=pr[br+6],an=pr[br+7],sn=Zt[br+6],vn=Zt[br+7],Mr=(vn&65535)+(an&65535)+(fn&65535)+(kr&65535)+(En&65535),Lr=(vn>>>16)+(an>>>16)+(fn>>>16)+(kr>>>16)+(En>>>16)+(Mr>>>16),Cr=(sn&65535)+(un&65535)+(gn&65535)+(Nr&65535)+(rn&65535)+(Lr>>>16),Er=(sn>
1497>>16)+(un>>>16)+(gn>>>16)+(Nr>>>16)+(rn>>>16)+(Cr>>>16),un=Er<<16|Cr&65535,an=Lr<<16|Mr&65535,Mr=(Qr&65535)+(_r&65535),Lr=(Qr>>>16)+(_r>>>16)+(Mr>>>16),Cr=(Xr&65535)+(Dr&65535)+(Lr>>>16),Er=(Xr>>>16)+(Dr>>>16)+(Cr>>>16),sn=Er<<16|Cr&65535,vn=Lr<<16|Mr&65535,Mr=(dn&65535)+(an&65535),Lr=(dn>>>16)+(an>>>16)+(Mr>>>16),Cr=(wn&65535)+(un&65535)+(Lr>>>16),Er=(wn>>>16)+(un>>>16)+(Cr>>>16),rn=Er<<16|Cr&65535,En=Lr<<16|Mr&65535,Mr=(vn&65535)+(an&65535),Lr=(vn>>>16)+(an>>>16)+(Mr>>>16),Cr=(sn&65535)+(un&65535)+(Lr>>>16),Er=(sn>>>16)+(un>>>16)+(Cr>>>16),wn=Er<<16|Cr&65535,dn=Lr<<16|Mr&65535;Mr=(Tr&65535)+(dn&65535),Lr=(Tr>>>16)+(dn>>>16)+(Mr>>>16),Cr=(Sr&65535)+(wn&65535)+(Lr>>>16),Er=(Sr>>>16)+(wn>>>16)+(Cr>>>16),this.h0h=Er<<16|Cr&65535,this.h0l=Lr<<16|Mr&65535,Mr=(jr&65535)+(Ir&65535),Lr=(jr>>>16)+(Ir>>>16)+(Mr>>>16),Cr=(Br&65535)+(Ur&65535)+(Lr>>>16),Er=(Br>>>16)+(Ur>>>16)+(Cr>>>16),this.h1h=Er<<16|Cr&65535,this.h1l=Lr<<16|Mr&65535,Mr=(yr&65535)+(Fr&65535),Lr=(yr>>>16)+(Fr>>>16)+(Mr>>>16),Cr=(Rr&65535)+(Pr&65535)+(Lr>>>16),Er=(Rr>>>16)+(Pr>>>16)+(Cr>>>16),this.h2h=Er<<16|Cr&65535,this.h2l=Lr<<16|Mr&65535,Mr=(or&65535)+(en&65535),Lr=(or>>>16)+(en>>>16)+(Mr>>>16),Cr=(sr&65535)+(Zr&65535)+(Lr>>>16),Er=(sr>>>16)+(Zr>>>16)+(Cr>>>16),this.h3h=Er<<16|Cr&65535,this.h3l=Lr<<16|Mr&65535,Mr=(ir&65535)+(En&65535),Lr=(ir>>>16)+(En>>>16)+(Mr>>>16),Cr=(Qt&65535)+(rn&65535)+(Lr>>>16),Er=(Qt>>>16)+(rn>>>16)+(Cr>>>16),this.h4h=Er<<16|Cr&65535,this.h4l=Lr<<16|Mr&65535,Mr=(gr&65535)+(mn&65535),Lr=(gr>>>16)+(mn>>>16)+(Mr>>>16),Cr=(ur&65535)+($n&65535)+(Lr>>>16),Er=(ur>>>16)+($n>>>16)+(Cr>>>16),this.h5h=Er<<16|Cr&65535,this.h5l=Lr<<16|Mr&65535,Mr=(lr&65535)+(_n&65535),Lr=(lr>>>16)+(_n>>>16)+(Mr>>>16),Cr=(dr&65535)+(Fn&65535)+(Lr>>>16),Er=(dr>>>16)+(Fn>>>16)+(Cr>>>16),this.h6h=Er<<16|Cr&65535,this.h6l=Lr<<16|Mr&65535,Mr=(wr&65535)+(Qn&65535),Lr=(wr>>>16)+(Qn>>>16)+(Mr>>>16),Cr=(hr&65535)+(kn&65535)+(Lr>>>16),Er=(hr>>>16)+(kn>>>16)+(Cr>>>16),this.h7h=Er<<16|Cr&65535,this.h7l=Lr<<16|Mr&65535},fr.prototype.hex=function(){this.finalize();var Sr=this.h0h,Tr=this.h0l,Br=this.h1h,jr=this.h1l,Rr=this.h2h,yr=this.h2l,sr=this.h3h,or=this.h3l,Qt=this.h4h,ir=this.h4l,ur=this.h5h,gr=this.h5l,dr=this.h6h,lr=this.h6l,hr=this.h7h,wr=this.h7l,pr=this.bits,br=Gt[Sr>>28&15]+Gt[Sr>>24&15]+Gt[Sr>>20&15]+Gt[Sr>>16&15]+Gt[Sr>>12&15]+Gt[Sr>>8&15]+Gt[Sr>>4&15]+Gt[Sr&15]+Gt[Tr>>28&15]+Gt[Tr>>24&15]+Gt[Tr>>20&15]+Gt[Tr>>16&15]+Gt[Tr>>12&15]+Gt[Tr>>8&15]+Gt[Tr>>4&15]+Gt[Tr&15]+Gt[Br>>28&15]+Gt[Br>>24&15]+Gt[Br>>20&15]+Gt[Br>>16&15]+Gt[Br>>12&15]+Gt[Br>>8&15]+Gt[Br>>4&15]+Gt[Br&15]+Gt[jr>>28&15]+Gt[jr>>24&15]+Gt[jr>>20&15]+Gt[jr>>16&15]+Gt[jr>>12&15]+Gt[jr>>8&15]+Gt[jr>>4&15]+Gt[jr&15]+Gt[Rr>>28&15]+Gt[Rr>>24&15]+Gt[Rr>>20&15]+Gt[Rr>>16&15]+Gt[Rr>>12&15]+Gt[Rr>>8&15]+Gt[Rr>>4&15]+Gt[Rr&15]+Gt[yr>>28&15]+Gt[yr>>24&15]+Gt[yr>>20&15]+Gt[yr>>16&15]+Gt[yr>>12&15]+Gt[yr>>8&15]+Gt[yr>>4&15]+Gt[yr&15]+Gt[sr>>28&15]+Gt[sr>>24&15]+Gt[sr>>20&15]+Gt[sr>>16&15]+Gt[sr>>12&15]+Gt[sr>>8&15]+Gt[sr>>4&15]+Gt[sr&15];return pr>=256&&(br+=Gt[or>>28&15]+Gt[or>>24&15]+Gt[or>>20&15]+Gt[or>>16&15]+Gt[or>>12&15]+Gt[or>>8&15]+Gt[or>>4&15]+Gt[or&15]),pr>=384&&(br+=Gt[Qt>>28&15]+Gt[Qt>>24&15]+Gt[Qt>>20&15]+Gt[Qt>>16&15]+Gt[Qt>>12&15]+Gt[Qt>>8&15]+Gt[Qt>>4&15]+Gt[Qt&15]+Gt[ir>>28&15]+Gt[ir>>24&15]+Gt[ir>>20&15]+Gt[ir>>16&15]+Gt[ir>>12&15]+Gt[ir>>8&15]+Gt[ir>>4&15]+Gt[ir&15]+Gt[ur>>28&15]+Gt[ur>>24&15]+Gt[ur>>20&15]+Gt[ur>>16&15]+Gt[ur>>12&15]+Gt[ur>>8&15]+Gt[ur>>4&15]+Gt[ur&15]+Gt[gr>>28&15]+Gt[gr>>24&15]+Gt[gr>>20&15]+Gt[gr>>16&15]+Gt[gr>>12&15]+Gt[gr>>8&15]+Gt[gr>>4&15]+Gt[gr&15]),pr==512&&(br+=Gt[dr>>28&15]+Gt[dr>>24&15]+Gt[dr>>20&15]+Gt[dr>>16&15]+Gt[dr>>12&15]+Gt[dr>>8&15]+Gt[dr>>4&15]+Gt[dr&15]+Gt[lr>>28&15]+Gt[lr>>24&15]+Gt[lr>>20&15]+Gt[lr>>16&15]+Gt[lr>>12&15]+Gt[lr>>8&15]+Gt[lr>>4&15]+Gt[lr&15]+Gt[hr>>28&15]+Gt[hr>>24&15]+Gt[hr>>20&15]+Gt[hr>>16&15]+Gt[hr>>12&15]+Gt[hr>>8&15]+Gt[hr>>4&15]+Gt[hr&15]+Gt[wr>>28&15]+Gt[wr>>24&15]+Gt[wr>>20&15]+Gt[wr>>16&15]+Gt[wr>>12&15]+Gt[wr>>8&15]+Gt[wr>>4&15]+Gt[wr&15]),br},fr.prototype.toString=fr.prototype.hex,fr.prototype.digest=function(){this.finalize();var Sr=this.h0h,Tr=this.h0l,Br=this.h1h,jr=this.h1l,Rr=this.h2h,yr=this.h2l,sr=this.h3h,or=this.h3l,Qt=this.h4h,ir=this.h4l,ur=this.h5h,gr=this.h5l,dr=this.h6h,lr=this.h6l,hr=this.h7h,wr=this.h7l,pr=this.bits,br=[Sr>>24&255,Sr>>16&255,Sr>>8&255,Sr&255,Tr>>24&255,Tr>>16&255,Tr>>8&255,Tr&255,Br>>24&255,Br>>16&255,Br>>8&255,Br&255,jr>>24&255,jr>>16&255,jr>>8&255,jr&255,Rr>>24&255,Rr>>16&255,Rr>>8&255,Rr&255,yr>>24&255,yr>>16&255,yr>>8&255,yr&255,sr>>24&255,sr>>16&255,sr>>8&255,sr&255];return pr>=256&&br.push(or>>24&255,or>>16&255,or>>8&255,or&255),pr>=384&&br.push(Qt>>24&255,Qt>>16&255,Qt>>8&255,Qt&255,ir>>24&255,ir>>16&255,ir>>
14978&255,ir&255,ur>>24&255,ur>>16&255,ur>>8&255,ur&255,gr>>24&255,gr>>16&255,gr>>8&255,gr&255),pr==512&&br.push(dr>>24&255,dr>>16&255,dr>>8&255,dr&255,lr>>24&255,lr>>16&255,lr>>8&255,lr&255,hr>>24&255,hr>>16&255,hr>>8&255,hr&255,wr>>24&255,wr>>16&255,wr>>8&255,wr&255),br},fr.prototype.array=fr.prototype.digest,fr.prototype.arrayBuffer=function(){this.finalize();var Sr=this.bits,Tr=new ArrayBuffer(Sr/8),Br=new DataView(Tr);return Br.setUint32(0,this.h0h),Br.setUint32(4,this.h0l),Br.setUint32(8,this.h1h),Br.setUint32(12,this.h1l),Br.setUint32(16,this.h2h),Br.setUint32(20,this.h2l),Br.setUint32(24,this.h3h),Sr>=256&&Br.setUint32(28,this.h3l),Sr>=384&&(Br.setUint32(32,this.h4h),Br.setUint32(36,this.h4l),Br.setUint32(40,this.h5h),Br.setUint32(44,this.h5l)),Sr==512&&(Br.setUint32(48,this.h6h),Br.setUint32(52,this.h6l),Br.setUint32(56,this.h7h),Br.setUint32(60,this.h7l)),Tr},fr.prototype.clone=function(){var Sr=new fr(this.bits,!1);return this.copyTo(Sr),Sr},fr.prototype.copyTo=function(Sr){var Tr=0,Br=["h0h","h0l","h1h","h1l","h2h","h2l","h3h","h3l","h4h","h4l","h5h","h5l","h6h","h6l","h7h","h7l","start","bytes","hBytes","finalized","hashed","lastByteIndex"];for(Tr=0;Tr<Br.length;++Tr)Sr[Br[Tr]]=this[Br[Tr]];for(Tr=0;Tr<this.blocks.length;++Tr)Sr.blocks[Tr]=this.blocks[Tr]};function vr(Sr,Tr,Br){var jr,Rr=typeof Sr;if(Rr!=="string"){if(Rr==="object"){if(Sr===null)throw new Error(_e);if(Kt&&Sr.constructor===ArrayBuffer)Sr=new Uint8Array(Sr);else if(!Array.isArray(Sr)&&(!Kt||!ArrayBuffer.isView(Sr)))throw new Error(_e)}else throw new Error(_e);jr=!0}var yr=Sr.length;if(!jr){for(var sr=[],yr=Sr.length,or=0,Qt,ir=0;ir<yr;++ir)Qt=Sr.charCodeAt(ir),Qt<128?sr[or++]=Qt:Qt<2048?(sr[or++]=192|Qt>>6,sr[or++]=128|Qt&63):Qt<55296||Qt>=57344?(sr[or++]=224|Qt>>12,sr[or++]=128|Qt>>6&63,sr[or++]=128|Qt&63):(Qt=65536+((Qt&1023)<<10|Sr.charCodeAt(++ir)&1023),sr[or++]=240|Qt>>18,sr[or++]=128|Qt>>12&63,sr[or++]=128|Qt>>6&63,sr[or++]=128|Qt&63);Sr=sr}Sr.length>128&&(Sr=new fr(Tr,!0).update(Sr).array());for(var ur=[],gr=[],ir=0;ir<128;++ir){var dr=Sr[ir]||0;ur[ir]=92^dr,gr[ir]=54^dr}fr.call(this,Tr,Br),this.update(gr),this.oKeyPad=ur,this.inner=!0,this.sharedMemory=Br}vr.prototype=new fr,vr.prototype.finalize=function(){if(fr.prototype.finalize.call(this),this.inner){this.inner=!1;var Sr=this.array();fr.call(this,this.bits,this.sharedMemory),this.update(this.oKeyPad),this.update(Sr),fr.prototype.finalize.call(this)}},vr.prototype.clone=function(){var Sr=new vr([],this.bits,!1);this.copyTo(Sr),Sr.inner=this.inner;for(var Tr=0;Tr<this.oKeyPad.length;++Tr)Sr.oKeyPad[Tr]=this.oKeyPad[Tr];return Sr};var xr=ar(512);xr.sha512=xr,xr.sha384=ar(384),xr.sha512_256=ar(256),xr.sha512_224=ar(224),xr.sha512.hmac=cr(512),xr.sha384.hmac=cr(384),xr.sha512_256.hmac=cr(256),xr.sha512_224.hmac=cr(224),Ht?yt.exports=xr:(Vt.sha512=xr.sha512,Vt.sha384=xr.sha384,Vt.sha512_256=xr.sha512_256,Vt.sha512_224=xr.sha512_224)})()})(sha512$1);var sha512Exports=sha512$1.exports;const sha512=getDefaultExportFromCjs$1(sha512Exports);var jsonBigint={exports:{}},stringify={exports:{}},bignumber={exports:{}};(function(yt){(function(_e){var $t,Ft=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Vt=Math.ceil,qt=Math.floor,zt="[BigNumber Error] ",Ht=zt+"Number primitive has more than 15 significant digits: ",Kt=1e14,Gt=14,Jt=9007199254740991,Xt=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Zt=1e7,er=1e9;function tr(Sr){var Tr,Br,jr,Rr=Dr.prototype={constructor:Dr,toString:null,valueOf:null},yr=new Dr(1),sr=20,or=4,Qt=-7,ir=21,ur=-1e7,gr=1e7,dr=!1,lr=1,hr=0,wr={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"Â ",suffix:""},pr="0123456789abcdefghijklmnopqrstuvwxyz",br=!0;function Dr(Cr,Er){var Ar,zr,Vr,Gr,tn,Yr,Jr,Kr,Xr=this;if(!(Xr instanceof Dr))return new Dr(Cr,Er);if(Er==null){if(Cr&&Cr._isBigNumber===!0){Xr.s=Cr.s,!Cr.c||Cr.e>gr?Xr.c=Xr.e=null:Cr.e<ur?Xr.c=[Xr.e=0]:(Xr.e=Cr.e,Xr.c=Cr.c.slice());return}if((Yr=typeof Cr=="number")&&Cr*0==0){if(Xr.s=1/Cr<0?(Cr=-Cr,-1):1,Cr===~~Cr){for(Gr=0,tn=Cr;tn>=10;tn/=10,Gr++);Gr>gr?Xr.c=Xr.e=null:(Xr.e=Gr,Xr.c=[Cr]);return}Kr=String(Cr)}else{if(!Ft.test(Kr=String(Cr)))return jr(Xr,Kr,Yr);Xr.s=Kr.charCodeAt(0)==45?(Kr=Kr.slice(1),-1):1}(Gr=Kr.indexOf("."))>-1&&(Kr=Kr.replace(".","")),(tn=Kr.search(/e/i))>0?(Gr<0&&(Gr=tn),Gr+=+Kr.slice(tn+1),Kr=Kr.substring(0,tn)):Gr<0&&(Gr=Kr.length)}else{if(cr(Er,2,pr.length,"Base"),Er==10&&br)return Xr=new Dr(Cr),Mr(Xr,sr+Xr.e+1,or);if(Kr=String(Cr),Yr=typeof Cr=="number"){if(Cr*0!=0)return jr(Xr,Kr,Yr,Er);if(Xr.s=1/Cr<0?(Kr=Kr.slice(1),-1):1,Dr.DEBUG&&Kr.replace(/^0\.0*|\./,"").length>15)throw Error(Ht+Cr)}else Xr.s=Kr.charCodeAt(0)===45?(Kr=Kr.slice(1),-1):1;for(Ar=pr.slice(0,Er),Gr=tn=0,Jr=Kr.length;tn<Jr;tn++)if(Ar.indexOf(zr=Kr.charAt(tn))<0){if(zr=="."){if(tn>Gr){Gr=Jr;continue}}else if(!Vr&&(Kr==Kr.toUpperCase()&&(Kr=Kr.toLowerCase())||Kr==Kr.toLowerCase()&&(Kr=Kr.toUpperCase()))){Vr=!0,tn=-1,Gr=0;continue}return jr(Xr,String(Cr),Yr,Er)}Yr=!1,Kr=Br(Kr,Er,10,Xr.s),(Gr=Kr.indexOf("."))>-1?Kr=Kr.replace(".",""):Gr=Kr.length}for(tn=0;Kr.charCodeAt(tn)===48;tn++);for(Jr=Kr.length;Kr.charCodeAt(--Jr)===48;);if(Kr=Kr.slice(tn,++Jr)){if(Jr-=tn,Yr&&Dr.DEBUG&&Jr>15&&(Cr>Jt||Cr!==qt(Cr)))throw Error(Ht+Xr.s*Cr);if((Gr=Gr-tn-1)>gr)Xr.c=Xr.e=null;else if(Gr<ur)Xr.c=[Xr.e=0];else{if(Xr.e=Gr,Xr.c=[],tn=(Gr+1)%Gt,Gr<0&&(tn+=Gt),tn<Jr){for(tn&&Xr.c.push(+Kr.slice(0,tn)),Jr-=Gt;tn<Jr;)Xr.c.push(+Kr.slice(tn,tn+=Gt));tn=Gt-(Kr=Kr.slice(tn)).length}else tn-=Jr;for(;tn--;Kr+="0");Xr.c.push(+Kr)}}else Xr.c=[Xr.e=0]}Dr.clone=tr,Dr.ROUND_UP=0,Dr.ROUND_DOWN=1,Dr.ROUND_CEIL=2,Dr.ROUND_FLOOR=3,Dr.ROUND_HALF_UP=4,Dr.ROUND_HALF_DOWN=5,Dr.ROUND_HALF_EVEN=6,Dr.ROUND_HALF_CEIL=7,Dr.ROUND_HALF_FLOOR=8,Dr.EUCLID=9,Dr.config=Dr.set=function(Cr){var Er,Ar;if(Cr!=null)if(typeof Cr=="object"){if(Cr.hasOwnProperty(Er="DECIMAL_PLACES")&&(Ar=Cr[Er],cr(Ar,0,er,Er),sr=Ar),Cr.hasOwnProperty(Er="ROUNDING_MODE")&&(Ar=Cr[Er],cr(Ar,0,8,Er),or=Ar),Cr.hasOwnProperty(Er="EXPONENTIAL_AT")&&(Ar=Cr[Er],Ar&&Ar.pop?(cr(Ar[0],-er,0,Er),cr(Ar[1],0,er,Er),Qt=Ar[0],ir=Ar[1]):(cr(Ar,-er,er,Er),Qt=-(ir=Ar<0?-Ar:Ar))),Cr.hasOwnProperty(Er="RANGE"))if(Ar=Cr[Er],Ar&&Ar.pop)cr(Ar[0],-er,-1,Er),cr(Ar[1],1,er,Er),ur=Ar[0],gr=Ar[1];else if(cr(Ar,-er,er,Er),Ar)ur=-(gr=Ar<0?-Ar:Ar);else throw Error(zt+Er+" cannot be zero: "+Ar);if(Cr.hasOwnProperty(Er="CRYPTO"))if(Ar=Cr[Er],Ar===!!Ar)if(Ar)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))dr=Ar;else throw dr=!Ar,Error(zt+"crypto unavailable");else dr=Ar;else throw Error(zt+Er+" not true or false: "+Ar);if(Cr.hasOwnProperty(Er="MODULO_MODE")&&(Ar=Cr[Er],cr(Ar,0,9,Er),lr=Ar),Cr.hasOwnProperty(Er="POW_PRECISION")&&(Ar=Cr[Er],cr(Ar,0,er,Er),hr=Ar),Cr.hasOwnProperty(Er="FORMAT"))if(Ar=Cr[Er],typeof Ar=="object")wr=Ar;else throw Error(zt+Er+" not an object: "+Ar);if(Cr.hasOwnProperty(Er="ALPHABET"))if(Ar=Cr[Er],typeof Ar=="string"&&!/^.?$|[+\-.\
vendor: 12,456 bytes, line 1497
1497s]|(.).*\1/.test(Ar))br=Ar.slice(0,10)=="0123456789",pr=Ar;else throw Error(zt+Er+" invalid: "+Ar)}else throw Error(zt+"Object expected: "+Cr);return{DECIMAL_PLACES:sr,ROUNDING_MODE:or,EXPONENTIAL_AT:[Qt,ir],RANGE:[ur,gr],CRYPTO:dr,MODULO_MODE:lr,POW_PRECISION:hr,FORMAT:wr,ALPHABET:pr}},Dr.isBigNumber=function(Cr){if(!Cr||Cr._isBigNumber!==!0)return!1;if(!Dr.DEBUG)return!0;var Er,Ar,zr=Cr.c,Vr=Cr.e,Gr=Cr.s;e:if({}.toString.call(zr)=="[object Array]"){if((Gr===1||Gr===-1)&&Vr>=-er&&Vr<=er&&Vr===qt(Vr)){if(zr[0]===0){if(Vr===0&&zr.length===1)return!0;break e}if(Er=(Vr+1)%Gt,Er<1&&(Er+=Gt),String(zr[0]).length==Er){for(Er=0;Er<zr.length;Er++)if(Ar=zr[Er],Ar<0||Ar>=Kt||Ar!==qt(Ar))break e;if(Ar!==0)return!0}}}else if(zr===null&&Vr===null&&(Gr===null||Gr===1||Gr===-1))return!0;throw Error(zt+"Invalid BigNumber: "+Cr)},Dr.maximum=Dr.max=function(){return Nr(arguments,-1)},Dr.minimum=Dr.min=function(){return Nr(arguments,1)},Dr.random=function(){var Cr=9007199254740992,Er=Math.random()*Cr&2097151?function(){return qt(Math.random()*Cr)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(Ar){var zr,Vr,Gr,tn,Yr,Jr=0,Kr=[],Xr=new Dr(yr);if(Ar==null?Ar=sr:cr(Ar,0,er),tn=Vt(Ar/Gt),dr)if(crypto.getRandomValues){for(zr=crypto.getRandomValues(new Uint32Array(tn*=2));Jr<tn;)Yr=zr[Jr]*131072+(zr[Jr+1]>>>11),Yr>=9e15?(Vr=crypto.getRandomValues(new Uint32Array(2)),zr[Jr]=Vr[0],zr[Jr+1]=Vr[1]):(Kr.push(Yr%1e14),Jr+=2);Jr=tn/2}else if(crypto.randomBytes){for(zr=crypto.randomBytes(tn*=7);Jr<tn;)Yr=(zr[Jr]&31)*281474976710656+zr[Jr+1]*1099511627776+zr[Jr+2]*4294967296+zr[Jr+3]*16777216+(zr[Jr+4]<<16)+(zr[Jr+5]<<8)+zr[Jr+6],Yr>=9e15?crypto.randomBytes(7).copy(zr,Jr):(Kr.push(Yr%1e14),Jr+=7);Jr=tn/7}else throw dr=!1,Error(zt+"crypto unavailable");if(!dr)for(;Jr<tn;)Yr=Er(),Yr<9e15&&(Kr[Jr++]=Yr%1e14);for(tn=Kr[--Jr],Ar%=Gt,tn&&Ar&&(Yr=Xt[Gt-Ar],Kr[Jr]=qt(tn/Yr)*Yr);Kr[Jr]===0;Kr.pop(),Jr--);if(Jr<0)Kr=[Gr=0];else{for(Gr=-1;Kr[0]===0;Kr.splice(0,1),Gr-=Gt);for(Jr=1,Yr=Kr[0];Yr>=10;Yr/=10,Jr++);Jr<Gt&&(Gr-=Gt-Jr)}return Xr.e=Gr,Xr.c=Kr,Xr}}(),Dr.sum=function(){for(var Cr=1,Er=arguments,Ar=new Dr(Er[0]);Cr<Er.length;)Ar=Ar.plus(Er[Cr++]);return Ar},Br=function(){var Cr="0123456789";function Er(Ar,zr,Vr,Gr){for(var tn,Yr=[0],Jr,Kr=0,Xr=Ar.length;Kr<Xr;){for(Jr=Yr.length;Jr--;Yr[Jr]*=zr);for(Yr[0]+=Gr.indexOf(Ar.charAt(Kr++)),tn=0;tn<Yr.length;tn++)Yr[tn]>Vr-1&&(Yr[tn+1]==null&&(Yr[tn+1]=0),Yr[tn+1]+=Yr[tn]/Vr|0,Yr[tn]%=Vr)}return Yr.reverse()}return function(Ar,zr,Vr,Gr,tn){var Yr,Jr,Kr,Xr,Qr,un,an,sn,vn=Ar.indexOf("."),gn=sr,fn=or;for(vn>=0&&(Xr=hr,hr=0,Ar=Ar.replace(".",""),sn=new Dr(zr),un=sn.pow(Ar.length-vn),hr=Xr,sn.c=Er(xr(ar(un.c),un.e,"0"),10,Vr,Cr),sn.e=sn.c.length),an=Er(Ar,zr,Vr,tn?(Yr=pr,Cr):(Yr=Cr,pr)),Kr=Xr=an.length;an[--Xr]==0;an.pop());if(!an[0])return Yr.charAt(0);if(vn<0?--Kr:(un.c=an,un.e=Kr,un.s=Gr,un=Tr(un,sn,gn,fn,Vr),an=un.c,Qr=un.r,Kr=un.e),Jr=Kr+gn+1,vn=an[Jr],Xr=Vr/2,Qr=Qr||Jr<0||an[Jr+1]!=null,Qr=fn<4?(vn!=null||Qr)&&(fn==0||fn==(un.s<0?3:2)):vn>Xr||vn==Xr&&(fn==4||Qr||fn==6&&an[Jr-1]&1||fn==(un.s<0?8:7)),Jr<1||!an[0])Ar=Qr?xr(Yr.charAt(1),-gn,Yr.charAt(0)):Yr.charAt(0);else{if(an.length=Jr,Qr)for(--Vr;++an[--Jr]>Vr;)an[Jr]=0,Jr||(++Kr,an=[1].concat(an));for(Xr=an.length;!an[--Xr];);for(vn=0,Ar="";vn<=Xr;Ar+=Yr.charAt(an[vn++]));Ar=xr(Ar,Kr,Yr.charAt(0))}return Ar}}(),Tr=function(){function Cr(zr,Vr,Gr){var tn,Yr,Jr,Kr,Xr=0,Qr=zr.length,un=Vr%Zt,an=Vr/Zt|0;for(zr=zr.slice();Qr--;)Jr=zr[Qr]%Zt,Kr=zr[Qr]/Zt|0,tn=an*Jr+Kr*un,Yr=un*Jr+tn%Zt*Zt+Xr,Xr=(Yr/Gr|0)+(tn/Zt|0)+an*Kr,zr[Qr]=Yr%Gr;return Xr&&(zr=[Xr].concat(zr)),zr}function Er(zr,Vr,Gr,tn){var Yr,Jr;if(Gr!=tn)Jr=Gr>tn?1:-1;else for(Yr=Jr=0;Yr<Gr;Yr++)if(zr[Yr]!=Vr[Yr]){Jr=zr[Yr]>Vr[Yr]?1:-1;break}return Jr}function Ar(zr,Vr,Gr,tn){for(var Yr=0;Gr--;)zr[Gr]-=Yr,Yr=zr[Gr]<Vr[Gr]?1:0,zr[Gr]=Yr*tn+zr[Gr]-Vr[Gr];for(;!zr[0]&&zr.length>1;zr.splice(0,1));}return function(zr,Vr,Gr,tn,Yr){var Jr,Kr,Xr,Qr,un,an,sn,vn,gn,fn,wn,dn,Ur,Ir,Pr,Fr,Zr,en=zr.s==Vr.s?1:-1,rn=zr.c,En=Vr.c;if(!rn||!rn[0]||!En||!En[0])return new Dr(!zr.s||!Vr.s||(rn?En&&rn[0]==En[0]:!En)?NaN:rn&&rn[0]==0||!En?en*0:en/0);for(vn=new Dr(en),gn=vn.c=[],Kr=zr.e-Vr.e,en=Gr+Kr+1,Yr||(Yr=Kt,Kr=rr(zr.e/Gt)-rr(Vr.e/Gt),en=en/Gt|0),Xr=0;En[Xr]==(rn[Xr]||0);Xr++);if(En[Xr]>(rn[Xr]||0)&&Kr--,en<0)gn.push(1),Qr=!0;else{for(Ir=rn.length,Fr=En.length,Xr=0,en+=2,un=qt(Yr/(En[0]+1)),un>1&&(En=Cr(En,un,Yr),rn=Cr(rn,un,Yr),Fr=En.length,Ir=rn.length),Ur=Fr,fn=rn.slice(0,Fr),wn=fn.length;wn<Fr;fn[wn++]=0);Zr=En.slice(),Zr=[0].concat(Zr),Pr=En[0],En[1]>=Yr/2&&Pr++;do{if(un=0,Jr=Er(En,fn,Fr,wn),Jr<0){if(dn=fn[0],Fr!=wn&&(dn=dn*Yr+(fn[1]||0)),un=qt(dn/Pr),un>1)for(un>=Yr&&(un=Yr-1),an=Cr(En,un,Yr),sn=an.length,wn=fn.length;Er(an,fn,sn,wn)==1;)un--,Ar(an,Fr<sn?Zr:En,sn,Yr),sn=an.length,Jr=1;else un==0&&(Jr=un=1),an=En.slice(),sn=an.length;if(sn<wn&&(an=[0].concat(an)),Ar(fn,an,wn,Yr),wn=fn.length,Jr==-1)for(;Er(En,fn,Fr,wn)<1;)un++,Ar(fn,Fr<wn?Zr:En,wn,Yr),wn=fn.length}else Jr===0&&(un++,fn=[0]);gn[Xr++]=un,fn[0]?fn[wn++]=rn[Ur]||0:(fn=[rn[Ur]],wn=1)}while((Ur++<Ir||fn[0]!=null)&&en--);Qr=fn[0]!=null,gn[0]||gn.splice(0,1)}if(Yr==Kt){for(Xr=1,en=gn[0];en>=10;en/=10,Xr++);Mr(vn,Gr+(vn.e=Xr+Kr*Gt-1)+1,tn,Qr)}else vn.e=Kr,vn.r=+Qr;return vn}}();function _r(Cr,Er,Ar,zr){var Vr,Gr,tn,Yr,Jr;if(Ar==null?Ar=or:cr(Ar,0,8),!Cr.c)return Cr.toString();if(Vr=Cr.c[0],tn=Cr.e,Er==null)Jr=ar(Cr.c),Jr=zr==1||zr==2&&(tn<=Qt||tn>=ir)?vr(Jr,tn):xr(Jr,tn,"0");else if(Cr=Mr(new Dr(Cr),Er,Ar),Gr=Cr.e,Jr=ar(Cr.c),Yr=Jr.length,zr==1||zr==2&&(Er<=Gr||Gr<=Qt)){for(;Yr<Er;Jr+="0",Yr++);Jr=vr(Jr,Gr)}else if(Er-=tn,Jr=xr(Jr,Gr,"0"),Gr+1>Yr){if(--Er>0)for(Jr+=".";Er--;Jr+="0");}else if(Er+=Gr-Yr,Er>0)for(Gr+1==Yr&&(Jr+=".");Er--;Jr+="0");return Cr.s<0&&Vr?"-"+Jr:Jr}function Nr(Cr,Er){for(var Ar,zr,Vr=1,Gr=new Dr(Cr[0]);Vr<Cr.length;Vr++)zr=new Dr(Cr[Vr]),(!zr.s||(Ar=nr(Gr,zr))===Er||Ar===0&&Gr.s===Er)&&(Gr=zr);return Gr}function kr(Cr,Er,Ar){for(var zr=1,Vr=Er.length;!Er[--Vr];Er.pop());for(Vr=Er[0];Vr>=10;Vr/=10,zr++);return(Ar=zr+Ar*Gt-1)>gr?Cr.c=Cr.e=null:Ar<ur?Cr.c=[Cr.e=0]:(Cr.e=Ar,Cr.c=Er),Cr}jr=function(){var Cr=/^(-?)0([xbo])(?=\w[\w.]*$)/i,Er=/^([^.]+)\.$/,Ar=/^\.([^.]+)$/,zr=/^-?(Infinity|NaN)$/,Vr=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(Gr,tn,Yr,Jr){var Kr,Xr=Yr?tn:tn.replace(Vr,"");if(zr.test(Xr))Gr.s=isNaN(Xr)?null:Xr<0?-1:1;else{if(!Yr&&(Xr=Xr.replace(Cr,function(Qr,un,an){return Kr=(an=an.toLowerCase())=="x"?16:an=="b"?2:8,!Jr||Jr==Kr?un:Qr}),Jr&&(Kr=Jr,Xr=Xr.replace(Er,"$1").replace(Ar,"0.$1")),tn!=Xr))return new Dr(Xr,Kr);if(Dr.DEBUG)throw Error(zt+"Not a"+(Jr?" base "+Jr:"")+" number: "+tn);Gr.s=null}Gr.c=Gr.e=null}}();function Mr(Cr,Er,Ar,zr){var Vr,Gr,tn,Yr,Jr,Kr,Xr,Qr=Cr.c,un=Xt;if(Qr){e:{for(Vr=1,Yr=Qr[0];Yr>=10;Yr/=10,Vr++);if(Gr=Er-Vr,Gr<0)Gr+=Gt,tn=Er,Jr=Qr[Kr=0],Xr=qt(Jr/un[Vr-tn-1]%10);else if(Kr=Vt((Gr+1)/Gt),Kr>=Qr.length)if(zr){for(;Qr.length<=Kr;Qr.push(0));Jr=Xr=0,Vr=1,Gr%=Gt,tn=Gr-Gt+1}else break e;else{for(Jr=Yr=Qr[Kr],Vr=1;Yr>=10;Yr/=10,Vr++);Gr%=Gt,tn=Gr-Gt+Vr,Xr=tn<0?0:qt(Jr/un[Vr-tn-1]%10)}if(zr=zr||Er<0||Qr[Kr+1]!=null||(tn<0?Jr:Jr%un[Vr-tn-1]),zr=Ar<4?(Xr||zr)&&(Ar==0||Ar==(Cr.s<0?3:2)):Xr>5||Xr==5&&(Ar==4||zr||Ar==6&&(Gr>0?tn>0?Jr/un[Vr-tn]:0:Qr[Kr-1])%10&1||Ar==(Cr.s<0?8:7)),Er<1||!Qr[0])return Qr.length=0,zr?(Er-=Cr.e+1,Qr[0]=un[(Gt-Er%Gt)%Gt],Cr.e=-Er||0):Qr[0]=Cr.e=0,Cr;if(Gr==0?(Qr.length=Kr,Yr=1,Kr--):(Qr.length=Kr+1,Yr=un[Gt-Gr],Qr[Kr]=tn>0?qt(Jr/un[Vr-tn]%un[tn])*Yr:0),zr)for(;;)if(Kr==0){for(Gr=1,tn=Qr[0];tn>=10;tn/=10,Gr++);for(tn=Qr[0]+=Yr,Yr=1;tn>=10;tn/=10,Yr++);Gr!=Yr&&(Cr.e++,Qr[0]==Kt&&(Qr[0]=1));break}else{if(Qr[Kr]+=Yr,Qr[Kr]!=Kt)break;Qr[Kr--]=0,Yr=1}for(Gr=Qr.length;Qr[--Gr]===0;Qr.pop());}Cr.e>gr?Cr.c=Cr.e=null:Cr.e<ur&&(Cr.c=[Cr.e=0])}return Cr}function Lr(Cr){var Er,Ar=Cr.e;return Ar===null?Cr.toString():(Er=ar(Cr.c),Er=Ar<=Qt||Ar>=ir?vr(Er,Ar):xr(Er,Ar,"0"),Cr.s<0?"-"+Er:Er)}return Rr.absoluteValue=Rr.abs=function(){var Cr=new Dr(this);return Cr.s<0&&(Cr.s=1),Cr},Rr.comparedTo=function(Cr,Er){return nr(this,new Dr(Cr,Er))},Rr.decimalPlaces=Rr.dp=function(Cr,Er){var Ar,zr,Vr,Gr=this;if(Cr!=null)return cr(Cr,0,er),Er==null?Er=or:cr(Er,0,8),Mr(new Dr(Gr),Cr+Gr.e+1,Er);if(!(Ar=Gr.c))return null;if(zr=((Vr=Ar.length-1)-rr(this.e/Gt))*Gt,Vr=Ar[Vr])for(;Vr%10==0;Vr/=10,zr--);return zr<0&&(zr=0),zr},Rr.dividedBy=Rr.div=function(Cr,Er){return Tr(this,new Dr(Cr,Er),sr,or)},Rr.dividedToIntegerBy=Rr.idiv=function(Cr,Er){return Tr(this,new Dr(Cr,Er),0,1)},Rr.exponentiatedBy=Rr.pow=function(Cr,Er){var Ar,zr,Vr,Gr,tn,Yr,Jr,Kr,Xr,Qr=this;if(Cr=new Dr(Cr),Cr.c&&!Cr.isInteger())throw Error(zt+"Exponent not an integer: "+Lr(Cr));if(Er!=null&&(Er=new Dr(Er)),Yr=Cr.e>14,!Qr.c||!Qr.c[0]||Qr.c[0]==1&&!Qr.e&&Qr.c.length==1||!Cr.c||!Cr.c[0])return Xr=new Dr(Math.pow(+Lr(Qr),Yr?Cr.s*(2-fr(Cr)):+Lr(Cr))),Er?Xr.mod(Er):Xr;if(Jr=Cr.s<0,Er){if(Er.c?!Er.c[0]:!Er.s)return new Dr(NaN);zr=!Jr&&Qr.isInteger()&&Er.isInteger(),zr&&(Qr=Qr.mod(Er))}else{if(Cr.e>9&&(Qr.e>0||Qr.e<-1||(Qr.e==0?Qr.c[0]>1||Yr&&Qr.c[1]>=24e7:Qr.c[0]<8e13||Yr&&Qr.c[0]<=9999975e7)))return Gr=Qr.s<0&&fr(Cr)?-0:0,Qr.e>-1&&(Gr=1/Gr),new Dr(Jr?1/Gr:Gr);hr&&(Gr=Vt(hr/Gt+2))}for(Yr?(Ar=new Dr(.5),Jr&&(Cr.s=1),Kr=fr(Cr)):(Vr=Math.abs(+Lr(Cr)),Kr=Vr%2),Xr=new Dr(yr);;){if(Kr){if(Xr=Xr.times(Qr),!Xr.c)break;Gr?Xr.c.length>Gr&&(Xr.c.length=Gr):zr&&(Xr=Xr.mod(Er))}if(Vr){if(Vr=qt(Vr/2),Vr===0)break;Kr=Vr%2}else if(Cr=Cr.times(Ar),Mr(Cr,Cr.e+1,1),Cr.e>14)Kr=fr(Cr);else{if(Vr=+Lr(Cr),Vr===0)break;Kr=Vr%2}Qr=Qr.times(Qr),Gr?Qr.c&&Qr.c.length>Gr&&(Qr.c.length=Gr):zr&&(Qr=Qr.mod(Er))}return zr?Xr:(Jr&&(Xr=yr.div(Xr)),Er?Xr.mod(Er):Gr?Mr(Xr,hr,or,tn):Xr)},Rr.integerValue=function(Cr){var Er=new Dr(this);return Cr==null?Cr=or:cr(Cr,0,8),Mr(Er,Er.e+1,Cr)},Rr.isEqualTo=Rr.eq=function(Cr,Er){return nr(this,new Dr(Cr,Er))===0},Rr.isFinite=function(){return!!this.c},Rr.isGreaterThan=Rr.gt=function(Cr,Er){return nr(this,new Dr(Cr,Er))>0},Rr.isGreaterThanOrEqualTo=Rr.gte=function(Cr,Er){return(Er=nr(this,new Dr(Cr,Er)))===1||Er===0},Rr.isInteger=function(){return!!this.c&&rr(this.e/Gt)>this.c.length-2},Rr.isLessThan=Rr.lt=function(Cr,Er){return nr(this,new Dr(Cr,Er))<0},Rr.isLessThanOrEqualTo=Rr.lte=function(Cr,Er){return(Er=nr(this,new Dr(Cr,Er)))===-1||Er===0},Rr.isNaN=function(){return!this.s},Rr.isNegative=function(){return this.s<0},Rr.isPositive=function(){return this.s>0},Rr.isZero=function(){return!!this.c&&this.c[0]==0},Rr.minus=function(Cr,Er){var Ar,zr,Vr,Gr,tn=this,Yr=tn.s;if(Cr=new Dr(Cr,Er),Er=Cr.s,!Yr||!Er)return new Dr(NaN);if(Yr!=Er)return Cr.s=-Er,tn.plus(Cr);var Jr=tn.e/Gt,Kr=Cr.e/Gt,Xr=tn.c,Qr=Cr.c;if(!Jr||!Kr){if(!Xr||!Qr)return Xr?(Cr.s=-Er,Cr):new Dr(Qr?tn:NaN);if(!Xr[0]||!Qr[0])return Qr[0]?(Cr.s=-Er,Cr):new Dr(Xr[0]?tn:or==3?-0:0)}if(Jr=rr(Jr),Kr=rr(Kr),Xr=Xr.slice(),Yr=Jr-Kr){for((Gr=Yr<0)?(Yr=-Yr,Vr=Xr):(Kr=Jr,Vr=Qr),Vr.reverse(),Er=Yr;Er--;Vr.push(0));Vr.reverse()}else for(zr=(Gr=(Yr=Xr.length)<(Er=Qr.length))?Yr:Er,Yr=Er=0;Er<zr;Er++)if(Xr[Er]!=Qr[Er]){Gr=Xr[Er]<Qr[Er];break}if(Gr&&(Vr=Xr,Xr=Qr,Qr=Vr,Cr.s=-Cr.s),Er=(zr=Qr.length)-(Ar=Xr.length),Er>0)for(;Er--;Xr[Ar++]=0);for(Er=Kt-1;zr>Yr;){if(Xr[--zr]<Qr[zr]){for(Ar=zr;Ar&&!Xr[--Ar];Xr[Ar]=Er);--Xr[Ar],Xr[zr]+=Kt}Xr[zr]-=Qr[zr]}for(;Xr[0]==0;Xr.splice(0,1),--Kr);return Xr[0]?kr(Cr,Xr,Kr):(Cr.s=or==3?-1:1,Cr.c=[Cr.e=0],Cr)},Rr.modulo=Rr.mod=function(Cr,Er){var Ar,zr,Vr=this;return Cr=new Dr(Cr,Er),!Vr.c||!Cr.s||Cr.c&&!Cr.c[0]?new Dr(NaN):!Cr.c||Vr.c&&!Vr.c[0]?new Dr(Vr):(lr==9?(zr=Cr.s,Cr.s=1,Ar=Tr(Vr,Cr,0,3),Cr.s=zr,Ar.s*=zr):Ar=Tr(Vr,Cr,0,lr),Cr=Vr.minus(Ar.times(Cr)),!Cr.c[0]&&lr==1&&(Cr.s=Vr.s),Cr)},Rr.multipliedBy=Rr.times=function(Cr,Er){var Ar,zr,Vr,Gr,tn,Yr,Jr,Kr,Xr,Qr,un,an,sn,vn,gn,fn=this,wn=fn.c,dn=(Cr=new Dr(Cr,Er)).c;if(!wn||!dn||!wn[0]||!dn[0])return!fn.s||!Cr.s||wn&&!wn[0]&&!dn||dn&&!dn[0]&&!wn?Cr.c=Cr.e=Cr.s=null:(Cr.s*=fn.s,!wn||!dn?Cr.c=Cr.e=null:(Cr.c=[0],Cr.e=0)),Cr;for(zr=rr(fn.e/Gt)+rr(Cr.e/Gt),Cr.s*=fn.s,Jr=wn.length,Qr=dn.length,Jr<Qr&&(sn=wn,wn=dn,dn=sn,Vr=Jr,Jr=Qr,Qr=Vr),Vr=Jr+Qr,sn=[];Vr--;sn.push(0));for(vn=Kt,gn=Zt,Vr=Qr;--Vr>=0;){for(Ar=0,un=dn[Vr]%gn,an=dn[Vr]/gn|0,tn=Jr,Gr=Vr+tn;Gr>Vr;)Kr=wn[--tn]%gn,Xr=wn[tn]/gn|0,Yr=an*Kr+Xr*un,Kr=un*Kr+Yr%gn*gn+sn[Gr]+Ar,Ar=(Kr/vn|0)+(Yr/gn|0)+an*Xr,sn[Gr--]=Kr%vn;sn[Gr]=Ar}return Ar?++zr:sn.splice(0,1),kr(Cr,sn,zr)},Rr.negated=function(){var Cr=new Dr(this);return Cr.s=-Cr.s||null,Cr},Rr.plus=function(Cr,Er){var Ar,zr=this,Vr=zr.s;if(Cr=new Dr(Cr,Er),Er=Cr.s,!Vr||!Er)return new Dr(NaN);
vendor: 3,378 bytes, line 1497
1497if(Vr!=Er)return Cr.s=-Er,zr.minus(Cr);var Gr=zr.e/Gt,tn=Cr.e/Gt,Yr=zr.c,Jr=Cr.c;if(!Gr||!tn){if(!Yr||!Jr)return new Dr(Vr/0);if(!Yr[0]||!Jr[0])return Jr[0]?Cr:new Dr(Yr[0]?zr:Vr*0)}if(Gr=rr(Gr),tn=rr(tn),Yr=Yr.slice(),Vr=Gr-tn){for(Vr>0?(tn=Gr,Ar=Jr):(Vr=-Vr,Ar=Yr),Ar.reverse();Vr--;Ar.push(0));Ar.reverse()}for(Vr=Yr.length,Er=Jr.length,Vr-Er<0&&(Ar=Jr,Jr=Yr,Yr=Ar,Er=Vr),Vr=0;Er;)Vr=(Yr[--Er]=Yr[Er]+Jr[Er]+Vr)/Kt|0,Yr[Er]=Kt===Yr[Er]?0:Yr[Er]%Kt;return Vr&&(Yr=[Vr].concat(Yr),++tn),kr(Cr,Yr,tn)},Rr.precision=Rr.sd=function(Cr,Er){var Ar,zr,Vr,Gr=this;if(Cr!=null&&Cr!==!!Cr)return cr(Cr,1,er),Er==null?Er=or:cr(Er,0,8),Mr(new Dr(Gr),Cr,Er);if(!(Ar=Gr.c))return null;if(Vr=Ar.length-1,zr=Vr*Gt+1,Vr=Ar[Vr]){for(;Vr%10==0;Vr/=10,zr--);for(Vr=Ar[0];Vr>=10;Vr/=10,zr++);}return Cr&&Gr.e+1>zr&&(zr=Gr.e+1),zr},Rr.shiftedBy=function(Cr){return cr(Cr,-Jt,Jt),this.times("1e"+Cr)},Rr.squareRoot=Rr.sqrt=function(){var Cr,Er,Ar,zr,Vr,Gr=this,tn=Gr.c,Yr=Gr.s,Jr=Gr.e,Kr=sr+4,Xr=new Dr("0.5");if(Yr!==1||!tn||!tn[0])return new Dr(!Yr||Yr<0&&(!tn||tn[0])?NaN:tn?Gr:1/0);if(Yr=Math.sqrt(+Lr(Gr)),Yr==0||Yr==1/0?(Er=ar(tn),(Er.length+Jr)%2==0&&(Er+="0"),Yr=Math.sqrt(+Er),Jr=rr((Jr+1)/2)-(Jr<0||Jr%2),Yr==1/0?Er="5e"+Jr:(Er=Yr.toExponential(),Er=Er.slice(0,Er.indexOf("e")+1)+Jr),Ar=new Dr(Er)):Ar=new Dr(Yr+""),Ar.c[0]){for(Jr=Ar.e,Yr=Jr+Kr,Yr<3&&(Yr=0);;)if(Vr=Ar,Ar=Xr.times(Vr.plus(Tr(Gr,Vr,Kr,1))),ar(Vr.c).slice(0,Yr)===(Er=ar(Ar.c)).slice(0,Yr))if(Ar.e<Jr&&--Yr,Er=Er.slice(Yr-3,Yr+1),Er=="9999"||!zr&&Er=="4999"){if(!zr&&(Mr(Vr,Vr.e+sr+2,0),Vr.times(Vr).eq(Gr))){Ar=Vr;break}Kr+=4,Yr+=4,zr=1}else{(!+Er||!+Er.slice(1)&&Er.charAt(0)=="5")&&(Mr(Ar,Ar.e+sr+2,1),Cr=!Ar.times(Ar).eq(Gr));break}}return Mr(Ar,Ar.e+sr+1,or,Cr)},Rr.toExponential=function(Cr,Er){return Cr!=null&&(cr(Cr,0,er),Cr++),_r(this,Cr,Er,1)},Rr.toFixed=function(Cr,Er){return Cr!=null&&(cr(Cr,0,er),Cr=Cr+this.e+1),_r(this,Cr,Er)},Rr.toFormat=function(Cr,Er,Ar){var zr,Vr=this;if(Ar==null)Cr!=null&&Er&&typeof Er=="object"?(Ar=Er,Er=null):Cr&&typeof Cr=="object"?(Ar=Cr,Cr=Er=null):Ar=wr;else if(typeof Ar!="object")throw Error(zt+"Argument not an object: "+Ar);if(zr=Vr.toFixed(Cr,Er),Vr.c){var Gr,tn=zr.split("."),Yr=+Ar.groupSize,Jr=+Ar.secondaryGroupSize,Kr=Ar.groupSeparator||"",Xr=tn[0],Qr=tn[1],un=Vr.s<0,an=un?Xr.slice(1):Xr,sn=an.length;if(Jr&&(Gr=Yr,Yr=Jr,Jr=Gr,sn-=Gr),Yr>0&&sn>0){for(Gr=sn%Yr||Yr,Xr=an.substr(0,Gr);Gr<sn;Gr+=Yr)Xr+=Kr+an.substr(Gr,Yr);Jr>0&&(Xr+=Kr+an.slice(Gr)),un&&(Xr="-"+Xr)}zr=Qr?Xr+(Ar.decimalSeparator||"")+((Jr=+Ar.fractionGroupSize)?Qr.replace(new RegExp("\\d{"+Jr+"}\\B","g"),"$&"+(Ar.fractionGroupSeparator||"")):Qr):Xr}return(Ar.prefix||"")+zr+(Ar.suffix||"")},Rr.toFraction=function(Cr){var Er,Ar,zr,Vr,Gr,tn,Yr,Jr,Kr,Xr,Qr,un,an=this,sn=an.c;if(Cr!=null&&(Yr=new Dr(Cr),!Yr.isInteger()&&(Yr.c||Yr.s!==1)||Yr.lt(yr)))throw Error(zt+"Argument "+(Yr.isInteger()?"out of range: ":"not an integer: ")+Lr(Yr));if(!sn)return new Dr(an);for(Er=new Dr(yr),Kr=Ar=new Dr(yr),zr=Jr=new Dr(yr),un=ar(sn),Gr=Er.e=un.length-an.e-1,Er.c[0]=Xt[(tn=Gr%Gt)<0?Gt+tn:tn],Cr=!Cr||Yr.comparedTo(Er)>0?Gr>0?Er:Kr:Yr,tn=gr,gr=1/0,Yr=new Dr(un),Jr.c[0]=0;Xr=Tr(Yr,Er,0,1),Vr=Ar.plus(Xr.times(zr)),Vr.comparedTo(Cr)!=1;)Ar=zr,zr=Vr,Kr=Jr.plus(Xr.times(Vr=Kr)),Jr=Vr,Er=Yr.minus(Xr.times(Vr=Er)),Yr=Vr;return Vr=Tr(Cr.minus(Ar),zr,0,1),Jr=Jr.plus(Vr.times(Kr)),Ar=Ar.plus(Vr.times(zr)),Jr.s=Kr.
vendor: 9,433 bytes, lines 1497-1504
1497s=an.s,Gr=Gr*2,Qr=Tr(Kr,zr,Gr,or).minus(an).abs().comparedTo(Tr(Jr,Ar,Gr,or).minus(an).abs())<1?[Kr,zr]:[Jr,Ar],gr=tn,Qr},Rr.toNumber=function(){return+Lr(this)},Rr.toPrecision=function(Cr,Er){return Cr!=null&&cr(Cr,1,er),_r(this,Cr,Er,2)},Rr.toString=function(Cr){var Er,Ar=this,zr=Ar.s,Vr=Ar.e;return Vr===null?zr?(Er="Infinity",zr<0&&(Er="-"+Er)):Er="NaN":(Cr==null?Er=Vr<=Qt||Vr>=ir?vr(ar(Ar.c),Vr):xr(ar(Ar.c),Vr,"0"):Cr===10&&br?(Ar=Mr(new Dr(Ar),sr+Vr+1,or),Er=xr(ar(Ar.c),Ar.e,"0")):(cr(Cr,2,pr.length,"Base"),Er=Br(xr(ar(Ar.c),Vr,"0"),10,Cr,zr,!0)),zr<0&&Ar.c[0]&&(Er="-"+Er)),Er},Rr.valueOf=Rr.toJSON=function(){return Lr(this)},Rr._isBigNumber=!0,Sr!=null&&Dr.set(Sr),Dr}function rr(Sr){var Tr=Sr|0;return Sr>0||Sr===Tr?Tr:Tr-1}function ar(Sr){for(var Tr,Br,jr=1,Rr=Sr.length,yr=Sr[0]+"";jr<Rr;){for(Tr=Sr[jr++]+"",Br=Gt-Tr.length;Br--;Tr="0"+Tr);yr+=Tr}for(Rr=yr.length;yr.charCodeAt(--Rr)===48;);return yr.slice(0,Rr+1||1)}function nr(Sr,Tr){var Br,jr,Rr=Sr.c,yr=Tr.c,sr=Sr.s,or=Tr.s,Qt=Sr.e,ir=Tr.e;if(!sr||!or)return null;if(Br=Rr&&!Rr[0],jr=yr&&!yr[0],Br||jr)return Br?jr?0:-or:sr;if(sr!=or)return sr;if(Br=sr<0,jr=Qt==ir,!Rr||!yr)return jr?0:!Rr^Br?1:-1;if(!jr)return Qt>ir^Br?1:-1;for(or=(Qt=Rr.length)<(ir=yr.length)?Qt:ir,sr=0;sr<or;sr++)if(Rr[sr]!=yr[sr])return Rr[sr]>yr[sr]^Br?1:-1;return Qt==ir?0:Qt>ir^Br?1:-1}function cr(Sr,Tr,Br,jr){if(Sr<Tr||Sr>Br||Sr!==qt(Sr))throw Error(zt+(jr||"Argument")+(typeof Sr=="number"?Sr<Tr||Sr>Br?" out of range: ":" not an integer: ":" not a primitive number: ")+String(Sr))}function fr(Sr){var Tr=Sr.c.length-1;return rr(Sr.e/Gt)==Tr&&Sr.c[Tr]%2!=0}function vr(Sr,Tr){return(Sr.length>1?Sr.charAt(0)+"."+Sr.slice(1):Sr)+(Tr<0?"e":"e+")+Tr}function xr(Sr,Tr,Br){var jr,Rr;if(Tr<0){for(Rr=Br+".";++Tr;Rr+=Br);Sr=Rr+Sr}else if(jr=Sr.length,++Tr>jr){for(Rr=Br,Tr-=jr;--Tr;Rr+=Br);Sr+=Rr}else Tr<jr&&(Sr=Sr.slice(0,Tr)+"."+Sr.slice(Tr));return Sr}$t=tr(),$t.default=$t.BigNumber=$t,yt.exports?yt.exports=$t:(_e||(_e=typeof self<"u"&&self?self:window),_e.BigNumber=$t)})(commonjsGlobal)})(bignumber);var bignumberExports=bignumber.exports;(function(yt){var _e=bignumberExports,$t=yt.exports;(function(){var Ft=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,Vt,qt,zt={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},Ht;function Kt(Jt){return Ft.lastIndex=0,Ft.test(Jt)?'"'+Jt.replace(Ft,function(Xt){var Zt=zt[Xt];return typeof Zt=="string"?Zt:"\\u"+("0000"+Xt.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+Jt+'"'}function Gt(Jt,Xt){var Zt,er,tr,rr,ar=Vt,nr,cr=Xt[Jt],fr=cr!=null&&(cr instanceof _e||_e.isBigNumber(cr));switch(cr&&typeof cr=="object"&&typeof cr.toJSON=="function"&&(cr=cr.toJSON(Jt)),typeof Ht=="function"&&(cr=Ht.call(Xt,Jt,cr)),typeof cr){case"string":return fr?cr:Kt(cr);case"number":return isFinite(cr)?String(cr):"null";case"boolean":case"null":case"bigint":return String(cr);case"object":if(!cr)return"null";if(Vt+=qt,nr=[],Object.prototype.toString.apply(cr)==="[object Array]"){for(rr=cr.length,Zt=0;Zt<rr;Zt+=1)nr[Zt]=Gt(Zt,cr)||"null";return tr=nr.length===0?"[]":Vt?`[ 1498`+Vt+nr.join(`, 1499`+Vt)+` 1500`+ar+"]":"["+nr.join(",")+"]",Vt=ar,tr}if(Ht&&typeof Ht=="object")for(rr=Ht.length,Zt=0;Zt<rr;Zt+=1)typeof Ht[Zt]=="string"&&(er=Ht[Zt],tr=Gt(er,cr),tr&&nr.push(Kt(er)+(Vt?": ":":")+tr));else Object.keys(cr).forEach(function(vr){var xr=Gt(vr,cr);xr&&nr.push(Kt(vr)+(Vt?": ":":")+xr)});return tr=nr.length===0?"{}":Vt?`{ 1501`+Vt+nr.join(`, 1502`+Vt)+` 1503`+ar+"}":"{"+nr.join(",")+"}",Vt=ar,tr}}typeof $t.stringify!="function"&&($t.stringify=function(Jt,Xt,Zt){var er;if(Vt="",qt="",typeof Zt=="number")for(er=0;er<Zt;er+=1)qt+=" ";else typeof Zt=="string"&&(qt=Zt);if(Ht=Xt,Xt&&typeof Xt!="function"&&(typeof Xt!="object"||typeof Xt.length!="number"))throw new Error("JSON.stringify");return Gt("",{"":Jt})})})()})(stringify);var stringifyExports=stringify.exports,BigNumber=null;const suspectProtoRx=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,suspectConstructorRx=/(?: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)/;var json_parse$1=function(yt){var _e={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(yt!=null){if(yt.strict===!0&&(_e.strict=!0),yt.storeAsString===!0&&(_e.storeAsString=!0),_e.alwaysParseAsBig=yt.alwaysParseAsBig===!0?yt.alwaysParseAsBig:!1,_e.useNativeBigInt=yt.useNativeBigInt===!0?yt.useNativeBigInt:!1,typeof yt.constructorAction<"u")if(yt.constructorAction==="error"||yt.constructorAction==="ignore"||yt.constructorAction==="preserve")_e.constructorAction=yt.constructorAction;else throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${yt.constructorAction}`);if(typeof yt.protoAction<"u")if(yt.protoAction==="error"||yt.protoAction==="ignore"||yt.protoAction==="preserve")_e.protoAction=yt.protoAction;else throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${yt.protoAction}`)}var $t,Ft,Vt={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:` 1504`,r:"\r",t:" "},qt,zt=function(rr){throw{name:"SyntaxError",message:rr,at:$t,text:qt}},Ht=function(rr){return rr&&rr!==Ft&&zt("Expected '"+rr+"' instead of '"+Ft+"'"),Ft=qt.charAt($t),$t+=1,Ft},Kt=function(){var rr,ar="";for(Ft==="-"&&(ar="-",Ht("-"));Ft>="0"&&Ft<="9";)ar+=Ft,Ht();if(Ft===".")for(ar+=".";Ht()&&Ft>="0"&&Ft<="9";)ar+=Ft;if(Ft==="e"||Ft==="E")for(ar+=Ft,Ht(),(Ft==="-"||Ft==="+")&&(ar+=Ft,Ht());Ft>="0"&&Ft<="9";)ar+=Ft,Ht();if(rr=+ar,!isFinite(rr))zt("Bad number");else return BigNumber==null&&(BigNumber=bignumberExports),ar.length>15?_e.storeAsString?ar:_e.useNativeBigInt?BigInt(ar):new BigNumber(ar):_e.alwaysParseAsBig?_e.useNativeBigInt?BigInt(rr):new BigNumber(rr):rr},Gt=function(){var rr,ar,nr="",cr;if(Ft==='"')for(var fr=$t;Ht();){if(Ft==='"')return $t-1>fr&&(nr+=qt.substring(fr,$t-1)),Ht(),nr;if(Ft==="\\"){if($t-1>fr&&(nr+=qt.substring(fr,$t-1)),Ht(),Ft==="u"){for(cr=0,ar=0;ar<4&&(rr=parseInt(Ht(),16),!!isFinite(rr));ar+=1)cr=cr*16+rr;nr+=String.fromCharCode(cr)}else if(typeof Vt[Ft]=="string")nr+=Vt[Ft];else break;fr=$t}}zt("Bad string")},Jt=function(){for(;Ft&&Ft<=" ";)Ht()},Xt=function(){switch(Ft){case"t":return Ht("t"),Ht("r"),Ht("u"),Ht("e"),!0;case"f":return Ht("f"),Ht("a"),Ht("l"),Ht("s"),Ht("e"),!1;case"n":return Ht("n"),Ht("u"),Ht("l"),Ht("l"),null}zt("Unexpected '"+Ft+"'")},Zt,er=function(){var rr=[];if(Ft==="["){if(Ht("["),Jt(),Ft==="]")return Ht("]"),rr;for(;Ft;){if(rr.push(Zt()),Jt(),Ft==="]")return Ht("]"),rr;Ht(","),Jt()}}zt("Bad array")},tr=function(){var rr,ar=Object.create(null);if(Ft==="{"){if(Ht("{"),Jt(),Ft==="}")return Ht("}"),ar;for(;Ft;){if(rr=Gt(),Jt(),Ht(":"),_e.strict===!0&&Object.hasOwnProperty.call(ar,rr)&&zt('Duplicate key "'+rr+'"'),suspectProtoRx.test(rr)===!0?_e.protoAction==="error"?zt("Object contains forbidden prototype property"):_e.protoAction==="ignore"?Zt():ar[rr]=Zt():suspectConstructorRx.test(rr)===!0?_e.constructorAction==="error"?zt("Object contains forbidden constructor property"):_e.constructorAction==="ignore"?Zt():ar[rr]=Zt():ar[rr]=Zt(),Jt(),Ft==="}")return Ht("}"),ar;Ht(","),Jt()}}zt("Bad object")};return Zt=function(){switch(Jt(),Ft){case"{":return tr();case"[":return er();case'"':return Gt();case"-":return Kt();default:return Ft>="0"&&Ft<="9"?Kt():Xt()}},function(rr,ar){var nr;return qt=rr+"",$t=0,Ft=" ",nr=Zt(),Jt(),Ft&&zt("Syntax error"),typeof ar=="function"?function cr(fr,vr){var xr,Sr=fr[vr];return Sr&&typeof Sr=="object"&&Object.keys(Sr).forEach(function(Tr){xr=cr(Sr,Tr),xr!==void 0?Sr[Tr]=xr:delete Sr[Tr]}),ar.call(fr,vr,Sr)}({"":nr},""):nr}},parse=json_parse$1,json_stringify=stringifyExports.stringify,json_parse=parse;jsonBigint.exports=function(yt){return{parse:json_parse(yt),stringify:json_stringify}};jsonBigint.exports.parse=json_parse();jsonBigint.exports.stringify=json_stringify;var jsonBigintExports=jsonBigint.exports;const JSONbigWithoutConfig=getDefaultExportFromCjs$1(jsonBigintExports);var IntDecoding;(function(yt){yt.UNSAFE="unsafe",yt.SAFE="safe",yt.MIXED="mixed",yt.BIGINT="bigint"})(IntDecoding||(IntDecoding={}));const IntDecoding$1=IntDecoding,JSONbig=JSONbigWithoutConfig({useNativeBigInt:!0,strict:!0});function parseJSON(yt,{intDecoding:_e}){if(_e!==IntDecoding$1.SAFE&&_e!==IntDecoding$1.UNSAFE&&_e!==IntDecoding$1.BIGINT&&_e!==IntDecoding$1.MIXED)throw new Error(`Invalid intDecoding option: ${_e}`);return JSONbig.parse(yt,($t,Ft)=>{if(Ft!=null&&typeof Ft=="object"&&Object.getPrototypeOf(Ft)==null&&Object.setPrototypeOf(Ft,Object.prototype),typeof Ft=="bigint"){if(_e===IntDecoding$1.SAFE&&Ft>Number.MAX_SAFE_INTEGER)throw new Error(`Integer exceeds maximum safe integer: ${Ft.toString()}. Try parsing with a different intDecoding option.`);return _e===IntDecoding$1.BIGINT||_e===IntDecoding$1.MIXED&&Ft>Number.MAX_SAFE_INTEGER?Ft:Number(Ft)}return typeof Ft=="number"&&_e===IntDecoding$1.BIGINT&&Number.isInteger(Ft)?BigInt(Ft):Ft})}function stringifyJSON(yt,_e,$t){return JSONbig.stringify(yt,_e,$t)}function arrayEqual(yt,_e){return yt.length!==_e.length?!1:Array.from(yt).every(($t,Ft)=>$t===_e[Ft])}function concatArrays$1(...yt){const _e=yt.reduce((Vt,qt)=>
1504Vt+qt.length,0),$t=new Uint8Array(_e);let Ft=0;for(let Vt=0;Vt<yt.length;Vt++)$t.set(yt[Vt],Ft),Ft+=yt[Vt].length;return $t}function isNode$1(){return typeof process$1=="object"&&typeof process$1.versions=="object"&&typeof process$1.versions.node<"u"}function isReactNative(){const{navigator:yt}=globalThis;return typeof yt=="object"&&yt.product==="ReactNative"}function ensureSafeInteger(yt){if(typeof yt>"u")throw new Error("Value is undefined");if(typeof yt=="bigint"){if(yt>BigInt(Number.MAX_SAFE_INTEGER)||yt<BigInt(Number.MIN_SAFE_INTEGER))throw new Error(`BigInt value ${yt} is not a safe integer`);return Number(yt)}if(typeof yt=="number"){if(Number.isSafeInteger(yt))return yt;throw new Error(`Value ${yt} is not a safe integer`)}throw new Error(`Unexpected type ${typeof yt}, ${yt}`)}function ensureSafeUnsignedInteger(yt){const _e=ensureSafeInteger(yt);if(_e<0)throw new Error(`Value ${_e} is negative`);return _e}function ensureBigInt(yt){if(typeof yt>"u")throw new Error("Value is undefined");if(typeof yt=="bigint")return yt;if(typeof yt=="number"){if(!Number.isSafeInteger(yt))throw new Error(`Value ${yt} is not a safe integer`);return BigInt(yt)}throw new Error(`Unexpected type ${typeof yt}, ${yt}`)}function ensureUint64(yt){const _e=ensureBigInt(yt);if(_e<0||_e>BigInt("0xffffffffffffffff"))throw new Error(`Value ${_e} is not a uint64`);return _e}function genericHash(yt){return sha512.sha512_256.array(yt)}function randomBytes$1(yt){return isReactNative()&&console.warn("It looks like you're running in react-native. In order to perform common crypto operations you will need to polyfill common operations such as crypto.getRandomValues"),nacl.randomBytes(yt)}function keyPairFromSeed(yt){return nacl.sign.keyPair.fromSeed(yt)}function keyPair(){const yt=randomBytes$1(nacl.box.secretKeyLength);return keyPairFromSeed(yt)}function isValidSignatureLength(yt){return yt===nacl.sign.signatureLength}function keyPairFromSecretKey(yt){return nacl.sign.keyPair.fromSecretKey(yt)}function sign(yt,_e){return nacl.sign.detached(yt,_e)}function bytesEqual(yt,_e){return nacl.verify(yt,_e)}function verify(yt,_e,$t){return nacl.sign.detached.verify(yt,_e,$t)}const PUBLIC_KEY_LENGTH=nacl.sign.publicKeyLength;nacl.sign.secretKeyLength;const HASH_BYTES_LENGTH=32,SEED_BTYES_LENGTH=32;var base32$1={exports:{}};(function(yt){(function(){var _e=typeof window=="object"?window:{},$t=!_e.HI_BASE32_NO_NODE_JS&&typeof process$1=="object"&&process$1.versions&&process$1.versions.node;$t&&(_e=globalThis);var Ft=!_e.HI_BASE32_NO_COMMON_JS&&!0&&yt.exports,Vt="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),qt={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,2:26,3:27,4:28,5:29,6:30,7:31},zt=[0,0,0,0,0,0,0,0],Ht=function(ar,nr){nr.length>10&&(nr="..."+nr.substr(-10));var cr=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+ar+" bytes: "+nr+" <-");throw cr.position=ar,cr},Kt=function(ar){for(var nr="",cr=ar.length,fr=0,vr=0,xr,Sr;fr<cr;){if(xr=ar[fr++],xr<=127){nr+=String.fromCharCode(xr);continue}else xr>191&&xr<=223?(Sr=xr&31,vr=1):xr<=239?(Sr=xr&15,vr=2):xr<=247?(Sr=xr&7,vr=3):Ht(fr,nr);for(var Tr=0;Tr<vr;++Tr)xr=ar[fr++],(xr<128||xr>191)&&Ht(fr,nr),Sr<<=6,Sr+=xr&63;Sr>=55296&&Sr<=57343&&Ht(fr,nr),Sr>1114111&&Ht(fr,nr),Sr<=65535?nr+=String.fromCharCode(Sr):(Sr-=65536,nr+=String.fromCharCode((Sr>>10)+55296),nr+=String.fromCharCode((Sr&1023)+56320))}return nr},Gt=function(ar){if(ar==="")return[];if(!/^[A-Z2-7=]+$/.test(ar))throw new Error("Invalid base32 characters");ar=ar.replace(/=/g,"");for(var nr,cr,fr,vr,xr,Sr,Tr,Br,jr=[],Rr=0,yr=ar.length,sr=0,or=yr>>3<<3;sr<or;)nr=qt[ar.charAt(sr++)],cr=qt[ar.charAt(sr++)],fr=qt[ar.charAt(sr++)],vr=qt[ar.charAt(sr++)],xr=qt[ar.charAt(sr++)],Sr=qt[ar.charAt(sr++)],Tr=qt[ar.charAt(sr++)],Br=qt[ar.charAt(sr++)],jr[Rr++]=(nr<<3|cr>>>2)&255,jr[Rr++]=(cr<<6|fr<<1|vr>>>4)&255,jr[Rr++]=(vr<<4|xr>>>1)&255,jr[Rr++]=(xr<<7|Sr<<2|Tr>>>3)&255,jr[Rr++]=(Tr<<5|Br)&255;var Qt=yr-or;return Qt===2?(nr=qt[ar.charAt(sr++)],cr=qt[ar.charAt(sr++)],jr[Rr++]=(nr<<3|cr>>>
15042)&255):Qt===4?(nr=qt[ar.charAt(sr++)],cr=qt[ar.charAt(sr++)],fr=qt[ar.charAt(sr++)],vr=qt[ar.charAt(sr++)],jr[Rr++]=(nr<<3|cr>>>2)&255,jr[Rr++]=(cr<<6|fr<<1|vr>>>4)&255):Qt===5?(nr=qt[ar.charAt(sr++)],cr=qt[ar.charAt(sr++)],fr=qt[ar.charAt(sr++)],vr=qt[ar.charAt(sr++)],xr=qt[ar.charAt(sr++)],jr[Rr++]=(nr<<3|cr>>>2)&255,jr[Rr++]=(cr<<6|fr<<1|vr>>>4)&255,jr[Rr++]=(vr<<4|xr>>>1)&255):Qt===7&&(nr=qt[ar.charAt(sr++)],cr=qt[ar.charAt(sr++)],fr=qt[ar.charAt(sr++)],vr=qt[ar.charAt(sr++)],xr=qt[ar.charAt(sr++)],Sr=qt[ar.charAt(sr++)],Tr=qt[ar.charAt(sr++)],jr[Rr++]=(nr<<3|cr>>>2)&255,jr[Rr++]=(cr<<6|fr<<1|vr>>>4)&255,jr[Rr++]=(vr<<4|xr>>>1)&255,jr[Rr++]=(xr<<7|Sr<<2|Tr>>>3)&255),jr},Jt=function(ar){for(var nr,cr,fr,vr,xr,Sr="",Tr=ar.length,Br=0,jr=parseInt(Tr/5)*5;Br<jr;)nr=ar.charCodeAt(Br++),cr=ar.charCodeAt(Br++),fr=ar.charCodeAt(Br++),vr=ar.charCodeAt(Br++),xr=ar.charCodeAt(Br++),Sr+=Vt[nr>>>3]+Vt[(nr<<2|cr>>>6)&31]+Vt[cr>>>1&31]+Vt[(cr<<4|fr>>>4)&31]+Vt[(fr<<1|vr>>>7)&31]+Vt[vr>>>2&31]+Vt[(vr<<3|xr>>>5)&31]+Vt[xr&31];var Rr=Tr-jr;return Rr===1?(nr=ar.charCodeAt(Br),Sr+=Vt[nr>>>3]+Vt[nr<<2&31]+"======"):Rr===2?(nr=ar.charCodeAt(Br++),cr=ar.charCodeAt(Br),Sr+=Vt[nr>>>3]+Vt[(nr<<2|cr>>>6)&31]+Vt[cr>>>1&31]+Vt[cr<<4&31]+"===="):Rr===3?(nr=ar.charCodeAt(Br++),cr=ar.charCodeAt(Br++),fr=ar.charCodeAt(Br),Sr+=Vt[nr>>>3]+Vt[(nr<<2|cr>>>6)&31]+Vt[cr>>>1&31]+Vt[(cr<<4|fr>>>4)&31]+Vt[fr<<1&31]+"==="):Rr===4&&(nr=ar.charCodeAt(Br++),cr=ar.charCodeAt(Br++),fr=ar.charCodeAt(Br++),vr=ar.charCodeAt(Br),Sr+=Vt[nr>>>3]+Vt[(nr<<2|cr>>>6)&31]+Vt[cr>>>1&31]+Vt[(cr<<4|fr>>>4)&31]+Vt[(fr<<1|vr>>>7)&31]+Vt[vr>>>2&31]+Vt[vr<<3&31]+"="),Sr},Xt=function(ar){var nr,cr,fr,vr,xr,Sr,Tr=!1,Br="",jr=0,Rr,yr=0,sr=ar.length;if(ar==="")return Br;do{for(zt[0]=zt[5],zt[1]=zt[6],zt[2]=zt[7],Rr=yr;jr<sr&&Rr<5;++jr)Sr=ar.charCodeAt(jr),Sr<128?zt[Rr++]=Sr:Sr<2048?(zt[Rr++]=192|Sr>>6,zt[Rr++]=128|Sr&63):Sr<55296||Sr>=57344?(zt[Rr++]=224|Sr>>12,zt[Rr++]=128|Sr>>6&63,zt[Rr++]=128|Sr&63):(Sr=65536+((Sr&1023)<<10|ar.charCodeAt(++jr)&1023),zt[Rr++]=240|Sr>>18,zt[Rr++]=128|Sr>>12&63,zt[Rr++]=128|Sr>>6&63,zt[Rr++]=128|Sr&63);yr=Rr-5,jr===sr&&++jr,jr>sr&&Rr<6&&(Tr=!0),nr=zt[0],Rr>4?(cr=zt[1],fr=zt[2],vr=zt[3],xr=zt[4],Br+=Vt[nr>>>3]+Vt[(nr<<2|cr>>>6)&31]+Vt[cr>>>1&31]+Vt[(cr<<4|fr>>>4)&31]+Vt[(fr<<1|vr>>>7)&31]+Vt[vr>>>2&31]+Vt[(vr<<3|xr>>>5)&31]+Vt[xr&31]):Rr===1?Br+=Vt[nr>>>3]+Vt[nr<<2&31]+"======":Rr===2?(cr=zt[1],Br+=Vt[nr>>>3]+Vt[(nr<<2|cr>>>6)&31]+Vt[cr>>>1&31]+Vt[cr<<4&31]+"===="):Rr===3?(cr=zt[1],fr=zt[2],Br+=Vt[nr>>>3]+Vt[(nr<<2|cr>>>6)&31]+Vt[cr>>>1&31]+Vt[(cr<<4|fr>>>4)&31]+Vt[fr<<1&31]+"==="):(cr=zt[1],fr=zt[2],vr=zt[3],Br+=Vt[nr>>>3]+Vt[(nr<<2|cr>>>6)&31]+Vt[cr>>>1&31]+Vt[(cr<<4|fr>>>4)&31]+Vt[(fr<<1|vr>>>7)&31]+Vt[vr>>>2&31]+Vt[vr<<3&31]+"=")}while(!Tr);return Br},Zt=function(ar){for(var nr,cr,fr,vr,xr,Sr="",Tr=ar.length,Br=0,jr=parseInt(Tr/5)*5;Br<jr;)nr=ar[Br++],cr=ar[Br++],fr=ar[Br++],vr=ar[Br++],xr=ar[Br++],Sr+=Vt[nr>>>3]+Vt[(nr<<2|cr>>>6)&31]+Vt[cr>>>1&31]+Vt[(cr<<4|fr>>>4)&31]+Vt[(fr<<1|vr>>>7)&31]+Vt[vr>>>2&31]+Vt[(vr<<3|xr>>>5)&31]+Vt[xr&31];var Rr=Tr-jr;return Rr===1?(nr=ar[Br],Sr+=Vt[nr>>>3]+Vt[nr<<2&31]+"======"):Rr===2?(nr=ar[Br++],cr=ar[Br],Sr+=Vt[nr>>>3]+Vt[(nr<<2|cr>>>6)&31]+Vt[cr>>>1&31]+Vt[cr<<4&31]+"===="):Rr===3?(nr=ar[Br++],cr=ar[Br++],fr=ar[Br],Sr+=Vt[nr>>>3]+Vt[(nr<<2|cr>>>6)&31]+Vt[cr>>>1&31]+Vt[(cr<<4|fr>>>4)&31]+Vt[fr<<1&31]+"==="):Rr===4&&(nr=ar[Br++],cr=ar[Br++],fr=ar[Br++],vr=ar[Br],Sr+=Vt[nr>>>3]+Vt[(nr<<2|cr>>>6)&31]+Vt[cr>>>1&31]+Vt[(cr<<4|fr>>>4)&31]+Vt[(fr<<1|vr>>>7)&31]+Vt[vr>>>2&31]+Vt[vr<<3&31]+"="),Sr},er=function(ar,nr){var cr=typeof ar!="string";return cr&&ar.constructor===ArrayBuffer&&(ar=new Uint8Array(ar)),cr?Zt(ar):nr?Jt(ar):Xt(ar)},tr=function(ar,nr){if(!nr)return Kt(Gt(ar));if(ar==="")return"";if(!/^[A-Z2-7=]+$/.test(ar))throw new Error("Invalid base32 characters");var cr,fr,vr,xr,Sr,Tr,Br,jr,Rr="",yr=ar.indexOf("=");yr===-1&&(yr=ar.length);for(var sr=0,or=yr>>3<<3;sr<or;)cr=qt[ar.charAt(sr++)],fr=qt[ar.charAt(sr++)],vr=qt[ar.charAt(sr++)],xr=qt[ar.charAt(sr++)],Sr=qt[ar.charAt(sr++)],Tr=qt[ar.charAt(sr++)],Br=qt[ar.charAt(sr++)],jr=qt[ar.charAt(sr++)],Rr+=String.fromCharCode((cr<<3|fr>>>
15042)&255)+String.fromCharCode((fr<<6|vr<<1|xr>>>4)&255)+String.fromCharCode((xr<<4|Sr>>>1)&255)+String.fromCharCode((Sr<<7|Tr<<2|Br>>>3)&255)+String.fromCharCode((Br<<5|jr)&255);var Qt=yr-or;return Qt===2?(cr=qt[ar.charAt(sr++)],fr=qt[ar.charAt(sr++)],Rr+=String.fromCharCode((cr<<3|fr>>>2)&255)):Qt===4?(cr=qt[ar.charAt(sr++)],fr=qt[ar.charAt(sr++)],vr=qt[ar.charAt(sr++)],xr=qt[ar.charAt(sr++)],Rr+=String.fromCharCode((cr<<3|fr>>>2)&255)+String.fromCharCode((fr<<6|vr<<1|xr>>>4)&255)):Qt===5?(cr=qt[ar.charAt(sr++)],fr=qt[ar.charAt(sr++)],vr=qt[ar.charAt(sr++)],xr=qt[ar.charAt(sr++)],Sr=qt[ar.charAt(sr++)],Rr+=String.fromCharCode((cr<<3|fr>>>2)&255)+String.fromCharCode((fr<<6|vr<<1|xr>>>4)&255)+String.fromCharCode((xr<<4|Sr>>>1)&255)):Qt===7&&(cr=qt[ar.charAt(sr++)],fr=qt[ar.charAt(sr++)],vr=qt[ar.charAt(sr++)],xr=qt[ar.charAt(sr++)],Sr=qt[ar.charAt(sr++)],Tr=qt[ar.charAt(sr++)],Br=qt[ar.charAt(sr++)],Rr+=String.fromCharCode((cr<<3|fr>>>2)&255)+String.fromCharCode((fr<<6|vr<<1|xr>>>4)&255)+String.fromCharCode((xr<<4|Sr>>>1)&255)+String.fromCharCode((Sr<<7|Tr<<2|Br>>>3)&255)),Rr},rr={encode:er,decode:tr};tr.asBytes=Gt,Ft?yt.exports=rr:_e.base32=rr})()})(base32$1);var base32Exports=base32$1.exports;const base32=getDefaultExportFromCjs$1(base32Exports);function encodeUint64(yt){if(!(typeof yt=="bigint"||Number.isInteger(yt))||yt<0||yt>BigInt("0xffffffffffffffff"))throw new Error("Input is not a 64-bit unsigned integer");const $t=new Uint8Array(8);return new DataView($t.buffer).setBigUint64(0,BigInt(yt)),$t}function decodeUint64(yt,_e="safe"){if(_e!=="safe"&&_e!=="mixed"&&_e!=="bigint")throw new Error(`Unknown decodingMode option: ${_e}`);if(yt.byteLength===0||yt.byteLength>8)throw new Error(`Data has unacceptable length. Expected length is between 1 and 8, got ${yt.byteLength}`);const $t=new Uint8Array(8-yt.byteLength),Ft=concatArrays$1($t,yt),qt=new DataView(Ft.buffer).getBigUint64(0),zt=qt>BigInt(Number.MAX_SAFE_INTEGER);if(_e==="safe"){if(zt)throw new Error(`Integer exceeds maximum safe integer: ${qt.toString()}. Try decoding with "mixed" or "safe" decodingMode.`);return Number(qt)}return _e==="mixed"&&!zt?Number(qt):qt}function base64ToBytes(yt){if(isNode$1())return new Uint8Array(Buffer.from(yt,"base64"));const _e=atob(yt);return Uint8Array.from(_e,$t=>$t.codePointAt(0))}function bytesToBase64(yt){if(isNode$1())return Buffer.from(yt).toString("base64");const _e=Array.from(yt,$t=>String.fromCodePoint($t)).join("");return btoa(_e)}function bytesToString(yt){return new TextDecoder().decode(yt)}function coerceToBytes(yt){return typeof yt=="string"?new TextEncoder().encode(yt):yt}function bytesToHex(yt){return isNode$1()?Buffer.from(yt).toString("hex"):Array.from(yt).map(_e=>_e.toString(16).padStart(2,"0")).join("")}function hexToBytes(yt){if(isNode$1())return Buffer.from(yt,"hex");let _e=yt;yt.length%2!==0&&(_e=yt.padStart(1,"0"));const $t=new Uint8Array(_e.length/2);for(let Ft=0;Ft<_e.length/2;Ft++)$t[Ft]=parseInt(_e.slice(2*Ft,2*Ft+2),16);return $t}const ALGORAND_ADDRESS_BYTE_LENGTH=36,ALGORAND_CHECKSUM_BYTE_LENGTH=4,ALGORAND_ADDRESS_LENGTH=58,ALGORAND_ZERO_ADDRESS_STRING="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ",MALFORMED_ADDRESS_ERROR_MSG="address seems to be malformed",CHECKSUM_ADDRESS_ERROR_MSG="wrong checksum for address";function checksumFromPublicKey(yt){return Uint8Array.from(genericHash(yt).slice(HASH_BYTES_LENGTH-ALGORAND_CHECKSUM_BYTE_LENGTH,HASH_BYTES_LENGTH))}class Address{constructor(_e){if(!(_e instanceof Uint8Array))throw new Error(`${MALFORMED_ADDRESS_ERROR_MSG}: ${_e} is not Uint8Array, type ${typeof _e}`);if(_e.length!==ALGORAND_ADDRESS_BYTE_LENGTH-ALGORAND_CHECKSUM_BYTE_LENGTH)throw new Error(`${MALFORMED_ADDRESS_ERROR_MSG}: 0x${bytesToHex(_e)}, length ${_e.length}`);this.publicKey=_e}equals(_e){return _e instanceof Address&&arrayEqual(this.publicKey,_e.publicKey)}checksum(){return checksumFromPublicKey(this.publicKey)}toString(){return base32.encode(concatArrays$1(this.publicKey,this.checksum())).slice(0,ALGORAND_ADDRESS_LENGTH)}static fromString(_e){if(typeof _e!="string")throw new Error(`${MALFORMED_ADDRESS_E
1504RROR_MSG}: expected string, got ${typeof _e}, ${_e}`);if(_e.length!==ALGORAND_ADDRESS_LENGTH)throw new Error(`${MALFORMED_ADDRESS_ERROR_MSG}: expected length ${ALGORAND_ADDRESS_LENGTH}, got ${_e.length}: ${_e}`);const $t=base32.decode.asBytes(_e);if($t.length!==ALGORAND_ADDRESS_BYTE_LENGTH)throw new Error(`${MALFORMED_ADDRESS_ERROR_MSG}: expected byte length ${ALGORAND_ADDRESS_BYTE_LENGTH}, got ${$t.length}`);const Ft=new Uint8Array($t.slice(0,ALGORAND_ADDRESS_BYTE_LENGTH-ALGORAND_CHECKSUM_BYTE_LENGTH)),Vt=new Uint8Array($t.slice(PUBLIC_KEY_LENGTH,ALGORAND_ADDRESS_BYTE_LENGTH)),qt=checksumFromPublicKey(Ft);if(!arrayEqual(qt,Vt))throw new Error(CHECKSUM_ADDRESS_ERROR_MSG);return new Address(Ft)}static zeroAddress(){return new Address(new Uint8Array(ALGORAND_ADDRESS_BYTE_LENGTH-ALGORAND_CHECKSUM_BYTE_LENGTH))}}function decodeAddress(yt){return Address.fromString(yt)}function isValidAddress$1(yt){try{Address.fromString(yt)}catch{return!1}return!0}function encodeAddress(yt){return new Address(yt).toString()}const APP_ID_PREFIX=new TextEncoder().encode("appID");function getApplicationAddress(yt){const _e=concatArrays$1(APP_ID_PREFIX,encodeUint64(yt)),$t=genericHash(_e);return new Address(Uint8Array.from($t))}const MICROALGOS_TO_ALGOS_RATIO=1e6,INVALID_MICROALGOS_ERROR_MSG="Microalgos should be positive and less than 2^53 - 1.";function microalgosToAlgos(yt){if(yt<0||!Number.isSafeInteger(yt))throw new Error(INVALID_MICROALGOS_ERROR_MSG);return yt/MICROALGOS_TO_ALGOS_RATIO}function algosToMicroalgos(yt){const _e=yt*MICROALGOS_TO_ALGOS_RATIO;return Math.round(_e)}class URLTokenBaseHTTPError extends Error{constructor(_e,$t){super(_e),this.response=$t,this.name="URLTokenBaseHTTPError",this.response=$t}}class URLTokenBaseHTTPClient{constructor(_e,$t,Ft,Vt={}){this.defaultHeaders=Vt;const qt=$t.endsWith("/")?$t:`${$t}/`,zt=new URL(qt);if(typeof Ft<"u"&&(zt.port=Ft.toString()),zt.protocol.length===0)throw new Error("Invalid base server URL, protocol must be defined.");this.baseURL=zt,this.tokenHeader=_e}getURL(_e,$t){let Ft;_e.startsWith("./")?Ft=_e:_e.startsWith("/")?Ft=`.${_e}`:Ft=`./${_e}`;const Vt=new URL(Ft,this.baseURL);if($t)for(const[qt,zt]of Object.entries($t))Vt.searchParams.set(qt,zt.toString());return Vt.toString()}static formatFetchResponseHeaders(_e){const $t={};return _e.forEach((Ft,Vt)=>{$t[Ft]=Vt}),$t}static async checkHttpError(_e){if(_e.ok)return;let $t,Ft;try{$t=new Uint8Array(await _e.arrayBuffer());const qt=JSON.parse(new TextDecoder().decode($t));qt.message&&(Ft=qt.message)}catch{}let Vt=`Network request error. Received status ${_e.status} (${_e.statusText})`;throw Ft&&(Vt+=`: ${Ft}`),new URLTokenBaseHTTPError(Vt,{body:$t??new Uint8Array,status:_e.status,headers:URLTokenBaseHTTPClient.formatFetchResponseHeaders(_e.headers)})}static async formatFetchResponse(_e){return await this.checkHttpError(_e),{body:new Uint8Array(await _e.arrayBuffer()),status:_e.status,headers:URLTokenBaseHTTPClient.formatFetchResponseHeaders(_e.headers)}}async get(_e,$t,Ft,Vt){const qt={...this.tokenHeader,...this.defaultHeaders,...Ft??{}},zt=await fetch(this.getURL(_e,$t),{headers:qt,...Vt??{}});return URLTokenBaseHTTPClient.formatFetchResponse(zt)}async post(_e,$t,Ft,Vt,qt){const zt={...this.tokenHeader,...this.defaultHeaders,...Vt??{}},Ht=await fetch(this.getURL(_e,Ft),{method:"POST",body:$t,headers:zt,...qt??{}});return URLTokenBaseHTTPClient.formatFetchResponse(Ht)}async delete(_e,$t,Ft,Vt,qt){const zt={...this.tokenHeader,...this.defaultHeaders,...Vt??{}},Ht=await fetch(this.getURL(_e,Ft),{method:"DELETE",body:$t,headers:zt,...qt??{}});return URLTokenBaseHTTPClient.formatFetchResponse(Ht)}}class HTTPClientResponse{constructor(_e){this.body=_e.body,this.text=_e.text,this.format=_e.format,this.headers=_e.headers,this.status=_e.status,this.ok=_e.ok}getJSONText(){if(this.text===void 0)throw new Error(`Response body does not contain JSON data. Format is ${this.format}`);return this.text}parseBodyAsJSON(_e){if(this.text===void 0)throw new Error(`Response body does not contain JSON data. Format is ${this.format}`);return HTTPClient.parseJSON(this.text,this.status,_e)}}function removeFalsyOrEmpty(yt){for(const _e in yt)Object.prototype.hasOwnProperty.call(yt,_e)&&(!yt[_e]||yt[_e].length===0)&&delete yt[_e];return yt}function tolowerCaseKeys(yt){return Object.keys(yt).reduce((_e,$t)=>(_e[$t.toLowerCase()]=yt[$t],_e),{})}function getAcceptFormat(yt){if(yt!==void 0&&Object.prototype.hasOwnProperty.call(yt,"format"))switch(yt.format){case"msgpack":return"application/msgpack";case"json":default:return"application/json"}else return"application/json"}class HTTPClient{constructor(_e,$t,Ft,Vt={}){$t!==void 0?this.bc=new URLTokenBaseHTTPClient(_e,$t,Ft,Vt):this.bc=_e}static parseJSON(_e,$t,Ft){try{return _e?parseJSON(_e,Ft):null}catch(Vt){const qt=Vt;throw qt.rawResponse=_e||null,qt.statusCode=$t,qt}}static serializeData(_e,$t){if(!_e)return new Uint8Array(0);if($t["content-type"]==="application/json")return new TextEncoder().encode(stringifyJSON(_e));if(typeof _e=="string")return new TextEncoder().encode(_e);if(_e instanceof Uint8Array)return _e;throw new Error("provided data is neither a string nor a Uint8Array and content-type is not application/json")}static prepareResponse(_e,$t){const{body:Ft}=_e;let Vt;return $t!=="application/msgpack"&&(Vt=Ft&&new TextDecoder().decode(Ft)||""),new HTTPClientResponse({..._e,format:$t,text:Vt,ok:Math.trunc(_e.status/100)===2})}static prepareResponseError(_e){return _e.response&&(_e.response=HTTPClient.prepareResponse(_e.response,"application/json"),_e.status=_e.response.status),_e}async get({relativePath:_e,query:$t,requestHeaders:Ft,customOptions:Vt}){const qt=getAcceptFormat($t),zt={...Ft??{},accept:qt};try{const Ht=await this.bc.get(_e,$t?removeFalsyOrEmpty($t):void 0,zt,Vt);return HTTPClient.prepareResponse(Ht,qt)}catch(Ht){throw HTTPClient.prepareResponseError(Ht)}}async post({relativePath:_e,data:$t,query:Ft,requestHeaders:Vt,customOptions:qt}
1504){const zt={"content-type":"application/json",...tolowerCaseKeys(Vt??{})};try{const Ht=await this.bc.post(_e,HTTPClient.serializeData($t,zt),Ft,zt,qt);return HTTPClient.prepareResponse(Ht,"application/json")}catch(Ht){throw HTTPClient.prepareResponseError(Ht)}}async delete({relativePath:_e,data:$t,requestHeaders:Ft,customOptions:Vt}){const qt={"content-type":"application/json",...tolowerCaseKeys(Ft??{})};try{const zt=await this.bc.delete(_e,typeof $t<"u"?HTTPClient.serializeData($t,qt):void 0,void 0,qt,Vt);return HTTPClient.prepareResponse(zt,"application/json")}catch(zt){throw HTTPClient.prepareResponseError(zt)}}}function convertTokenStringToTokenHeader(yt,_e=""){const $t={};return _e===""||($t[yt]=_e),$t}function isBaseHTTPClient(yt){return typeof yt.get=="function"}class ServiceClient{constructor(_e,$t,Ft,Vt,qt={}){if(isBaseHTTPClient($t))this.c=new HTTPClient($t);else{let zt;typeof $t=="string"?zt=convertTokenStringToTokenHeader(_e,$t):zt=$t,this.c=new HTTPClient(zt,Ft,Vt,qt)}}}function utf8Count(yt){for(var _e=yt.length,$t=0,Ft=0;Ft<_e;){var Vt=yt.charCodeAt(Ft++);if(Vt&4294967168)if(!(Vt&4294965248))$t+=2;else{if(Vt>=55296&&Vt<=56319&&Ft<_e){var qt=yt.charCodeAt(Ft);(qt&64512)===56320&&(++Ft,Vt=((Vt&1023)<<10)+(qt&1023)+65536)}Vt&4294901760?$t+=4:$t+=3}else{$t++;continue}}return $t}function utf8EncodeJs(yt,_e,$t){for(var Ft=yt.length,Vt=$t,qt=0;qt<Ft;){var zt=yt.charCodeAt(qt++);if(zt&4294967168)if(!(zt&4294965248))_e[Vt++]=zt>>6&31|192;else{if(zt>=55296&&zt<=56319&&qt<Ft){var Ht=yt.charCodeAt(qt);(Ht&64512)===56320&&(++qt,zt=((zt&1023)<<10)+(Ht&1023)+65536)}zt&4294901760?(_e[Vt++]=zt>>18&7|240,_e[Vt++]=zt>>12&63|128,_e[Vt++]=zt>>6&63|128):(_e[Vt++]=zt>>12&15|224,_e[Vt++]=zt>>6&63|128)}else{_e[Vt++]=zt;continue}_e[Vt++]=zt&63|128}}var sharedTextEncoder=new TextEncoder,TEXT_ENCODER_THRESHOLD=50;function utf8EncodeTE(yt,_e,$t){sharedTextEncoder.encodeInto(yt,_e.subarray($t))}function utf8Encode(yt,_e,$t){yt.length>TEXT_ENCODER_THRESHOLD?utf8EncodeTE(yt,_e,$t):utf8EncodeJs(yt,_e,$t)}var CHUNK_SIZE=4096;function utf8DecodeJs(yt,_e,$t){for(var Ft=_e,Vt=Ft+$t,qt=[],zt="";Ft<Vt;){var Ht=yt[Ft++];if(!(Ht&128))qt.push(Ht);else if((Ht&224)===192){var Kt=yt[Ft++]&63;qt.push((Ht&31)<<6|Kt)}else if((Ht&240)===224){var Kt=yt[Ft++]&63,Gt=yt[Ft++]&63;qt.push((Ht&31)<<12|Kt<<6|Gt)}else if((Ht&248)===240){var Kt=yt[Ft++]&63,Gt=yt[Ft++]&63,Jt=yt[Ft++]&63,Xt=(Ht&7)<<18|Kt<<12|Gt<<6|Jt;Xt>65535&&(Xt-=65536,qt.push(Xt>>>10&1023|55296),Xt=56320|Xt&1023),qt.push(Xt)}else qt.push(Ht);qt.length>=CHUNK_SIZE&&(zt+=String.fromCharCode.apply(String,qt),qt.length=0)}return qt.length>0&&(zt+=String.fromCharCode.apply(String,qt)),zt}var sharedTextDecoder=new TextDecoder,TEXT_DECODER_THRESHOLD=200;function utf8DecodeTD(yt,_e,$t){var Ft=yt.subarray(_e,_e+$t);return sharedTextDecoder.decode(Ft)}function utf8Decode(yt,_e,$t){return $t>TEXT_DECODER_THRESHOLD?utf8DecodeTD(yt,_e,$t):utf8DecodeJs(yt,_e,$t)}var ExtData=function(){function yt(_e,$t){this.type=_e,this.data=$t}return yt}(),__extends$1=function(){var yt=function(_e,$t){return yt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ft,Vt){Ft.__proto__=Vt}||function(Ft,Vt){for(var qt in Vt)Object.prototype.hasOwnProperty.call(Vt,qt)&&(Ft[qt]=Vt[qt])},yt(_e,$t)};return function(_e,$t){if(typeof $t!="function"&&$t!==null)throw new TypeError("Class extends value "+String($t)+" is not a constructor or null");yt(_e,$t);function Ft(){this.constructor=_e}_e.prototype=$t===null?Object.create($t):(Ft.prototype=$t.prototype,new Ft)}}(),DecodeError=function(yt){__extends$1(_e,yt);function _e($t){var Ft=yt.call(this,$t)||this,Vt=Object.create(_e.prototype);return Object.setPrototypeOf(Ft,Vt),Object.defineProperty(Ft,"name",{configurable:!0,enumerable:!1,value:_e.name}),Ft}return _e}(Error),IntMode;(function(yt){yt[yt.UNSAFE_NUMBER=0]="UNSAFE_NUMBER",yt[yt.SAFE_NUMBER=1]="SAFE_NUMBER",yt[yt.AS_ENCODED=2]="AS_ENCODED",yt[yt.MIXED=3]="MIXED",yt[yt.BIGINT=4]="BIGINT"})(IntMode||(IntMode={}));var UINT32_MAX=4294967295;function setUint64(yt,_e,$t){var Ft=$t/4294967296,Vt=$t;yt.setUint32(_e,Ft),yt.setUint32(_e+4,Vt)}function setInt64(yt,_e,$t){var Ft=Math.floor($t/4294967296),Vt=$t;yt.setUint32(_e,Ft),yt.setUint32(_e+4,Vt)}function getInt64(yt,_e,$t){if($t===IntMode.UNSAFE_NUMBER||$t===IntMode.SAFE_NUMBER){var Ft=yt.getInt32(_e),Vt=yt.getUint32(_e+4);if($t===IntMode.SAFE_NUMBER&&(Ft<Math.floor(Number.MIN_SAFE_INTEGER/4294967296)||Ft===Math.floor(Number.MIN_SAFE_INTEGER/4294967296)&&Vt===0||Ft>(Number.MAX_SAFE_INTEGER-Vt)/4294967296)){var qt="".concat(Ft<0?"-":"","0x").concat(Math.abs(Ft).toString(16)).concat(Vt.toString(16).padStart(8,"0"));throw new Error("Mode is IntMode.SAFE_NUMBER and value is not a safe integer: ".concat(qt))}return Ft*4294967296+Vt}var zt=yt.getBigInt64(_e);return $t===IntMode.MIXED&&zt>
1504=Number.MIN_SAFE_INTEGER&&zt<=Number.MAX_SAFE_INTEGER?Number(zt):zt}function getUint64(yt,_e,$t){if($t===IntMode.UNSAFE_NUMBER||$t===IntMode.SAFE_NUMBER){var Ft=yt.getUint32(_e),Vt=yt.getUint32(_e+4);if($t===IntMode.SAFE_NUMBER&&Ft>(Number.MAX_SAFE_INTEGER-Vt)/4294967296){var qt="0x".concat(Ft.toString(16)).concat(Vt.toString(16).padStart(8,"0"));throw new Error("Mode is IntMode.SAFE_NUMBER and value is not a safe integer: ".concat(qt))}return Ft*4294967296+Vt}var zt=yt.getBigUint64(_e);return $t===IntMode.MIXED&&zt<=Number.MAX_SAFE_INTEGER?Number(zt):zt}function convertSafeIntegerToMode(yt,_e){return _e===IntMode.BIGINT?BigInt(yt):Number(yt)}var EXT_TIMESTAMP=-1,TIMESTAMP32_MAX_SEC=4294967296-1,TIMESTAMP64_MAX_SEC=17179869184-1;function encodeTimeSpecToTimestamp(yt){var _e=yt.sec,$t=yt.nsec;if(_e>=0&&$t>=0&&_e<=TIMESTAMP64_MAX_SEC)if($t===0&&_e<=TIMESTAMP32_MAX_SEC){var Ft=new Uint8Array(4),Vt=new DataView(Ft.buffer);return Vt.setUint32(0,_e),Ft}else{var qt=_e/4294967296,zt=_e&4294967295,Ft=new Uint8Array(8),Vt=new DataView(Ft.buffer);return Vt.setUint32(0,$t<<2|qt&3),Vt.setUint32(4,zt),Ft}else{var Ft=new Uint8Array(12),Vt=new DataView(Ft.buffer);return Vt.setUint32(0,$t),setInt64(Vt,4,_e),Ft}}function encodeDateToTimeSpec(yt){var _e=yt.getTime(),$t=Math.floor(_e/1e3),Ft=(_e-$t*1e3)*1e6,Vt=Math.floor(Ft/1e9);
1504return{sec:$t+Vt,nsec:Ft-Vt*1e9}}function encodeTimestampExtension(yt){if(yt instanceof Date){var _e=encodeDateToTimeSpec(yt);return encodeTimeSpecToTimestamp(_e)}else return null}function decodeTimestampToTimeSpec(yt){var _e=new DataView(yt.buffer,yt.byteOffset,yt.byteLength);switch(yt.byteLength){case 4:{var $t=_e.getUint32(0),Ft=0;return{sec:$t,nsec:Ft}}case 8:{var Vt=_e.getUint32(0),qt=_e.getUint32(4),$t=(Vt&3)*4294967296+qt,Ft=Vt>>>2;return{sec:$t,nsec:Ft}}case 12:{var $t=getInt64(_e,4,IntMode.UNSAFE_NUMBER),Ft=_e.getUint32(0);return{sec:$t,nsec:Ft}}default:throw new DecodeError("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(yt.length))}}function decodeTimestampExtension(yt){var _e=decodeTimestampToTimeSpec(yt);return new Date(_e.sec*1e3+_e.nsec/1e6)}var timestampExtension={type:EXT_TIMESTAMP,encode:encodeTimestampExtension,decode:decodeTimestampExtension},ExtensionCodec=function(){function yt(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(timestampExtension)}return yt.prototype.register=function(_e){var $t=_e.type,Ft=_e.encode,Vt=_e.decode;if($t>=0)this.encoders[$t]=Ft,this.decoders[$t]=Vt;else{var qt=1+$t;this.builtInEncoders[qt]=Ft,this.builtInDecoders[qt]=Vt}},yt.prototype.tryToEncode=function(_e,$t){for(var Ft=0;Ft<this.builtInEncoders.length;Ft++){var Vt=this.builtInEncoders[Ft];if(Vt!=null){var qt=Vt(_e,$t);if(qt!=null){var zt=-1-Ft;return new ExtData(zt,qt)}}}for(var Ft=0;Ft<this.encoders.length;Ft++){var Vt=this.encoders[Ft];if(Vt!=null){var qt=Vt(_e,$t);if(qt!=null){var zt=Ft;return new ExtData(zt,qt)}}}return _e instanceof ExtData?_e:null},yt.prototype.decode=function(_e,$t,Ft){var Vt=$t<0?this.builtInDecoders[-1-$t]:this.decoders[$t];return Vt?Vt(_e,$t,Ft):new ExtData($t,_e)},yt.defaultCodec=new yt,yt}();function ensureUint8Array$1(yt){return yt instanceof Uint8Array?yt:ArrayBuffer.isView(yt)?new Uint8Array(yt.buffer,yt.byteOffset,yt.byteLength):yt instanceof ArrayBuffer?new Uint8Array(yt):Uint8Array.from(yt)}function createDataView(yt){if(yt instanceof ArrayBuffer)return new DataView(yt);var _e=ensureUint8Array$1(yt);return new DataView(_e.buffer,_e.byteOffset,_e.byteLength)}function compareUint8Arrays(yt,_e){for(var $t=Math.min(yt.length,_e.length),Ft=0;Ft<$t;Ft++){var Vt=yt[Ft]-_e[Ft];if(Vt!==0)return Vt}return yt.length-_e.length}var RawBinaryString=function(){function yt(_e){if(this.rawBinaryValue=_e,!ArrayBuffer.isView(_e))throw new TypeError("RawBinaryString: rawBinaryValue must be an ArrayBufferView")}return yt}(),DEFAULT_MAX_DEPTH=100,DEFAULT_INITIAL_BUFFER_SIZE=2048,Encoder=function(){function yt(_e){var $t,Ft,Vt,qt,zt,Ht,Kt,Gt;this.extensionCodec=($t=_e==null?void 0:_e.extensionCodec)!==null&&$t!==void 0?$t:ExtensionCodec.defaultCodec,this.context=_e==null?void 0:_e.context,this.forceBigIntToInt64=(Ft=_e==null?void 0:_e.forceBigIntToInt64)!==null&&Ft!==void 0?Ft:!1,this.maxDepth=(Vt=_e==null?void 0:_e.maxDepth)!==null&&Vt!==void 0?Vt:DEFAULT_MAX_DEPTH,this.initialBufferSize=(qt=_e==null?void 0:_e.initialBufferSize)!==null&&qt!==void 0?qt:DEFAULT_INITIAL_BUFFER_SIZE,this.sortKeys=(zt=_e==null?void 0:_e.sortKeys)!==null&&zt!==void 0?zt:!1,this.forceFloat32=(Ht=_e==null?void 0:_e.forceFloat32)!==null&&Ht!==void 0?Ht:!1,this.ignoreUndefined=(Kt=_e==null?void 0:_e.ignoreUndefined)!==null&&Kt!==void 0?Kt:!1,this.forceIntegerToFloat=(Gt=_e==null?void 0:_e.forceIntegerToFloat)!==null&&Gt!==void 0?Gt:!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}return yt.prototype.reinitializeState=function(){this.pos=0},yt.prototype.encodeSharedRef=function(_e){return this.reinitializeState(),this.doEncode(_e,1),this.bytes.subarray(0,this.pos)},yt.prototype.encode=function(_e){return this.reinitializeState(),this.doEncode(_e,1),this.bytes.slice(0,this.pos)},yt.prototype.doEncode=function(_e,$t){if($t>this.maxDepth)throw new Error("Too deep objects in depth ".concat($t));_e==null?this.encodeNil():typeof _e=="boolean"?this.encodeBoolean(_e):typeof _e=="number"?this.encodeNumber(_e):typeof _e=="string"?this.encodeString(_e):this.encodeObject(_e,$t)},yt.prototype.ensureBufferSizeToWrite=function(_e){var $t=this.pos+_e;this.view.byteLength<$t&&this.resizeBuffer($t*2)},yt.prototype.resizeBuffer=function(_e){var $t=new ArrayBuffer(_e),Ft=new Uint8Array($t),Vt=new DataView($t);Ft.set(this.bytes),this.view=Vt,this.bytes=Ft},yt.prototype.encodeNil=function(){this.writeU8(192)},yt.prototype.encodeBoolean=function(_e){_e===!1?this.writeU8(194):this.writeU8(195)},yt.prototype.encodeNumber=function(_e){!this.forceIntegerToFloat&&Number.isSafeInteger(_e)?_e>=0?_e<128?this.writeU8(_e):_e<256?(this.writeU8(204),this.writeU8(_e)):_e<65536?(this.writeU8(205),this.writeU16(_e)):_e<4294967296?(this.writeU8(206),this.writeU32(_e)):(this.writeU8(207),this.writeU64(_e)):_e>=-32?this.writeU8(224|_e+32):_e>=-128?(this.writeU8(208),this.writeI8(_e)):_e>
1504=-32768?(this.writeU8(209),this.writeI16(_e)):_e>=-2147483648?(this.writeU8(210),this.writeI32(_e)):(this.writeU8(211),this.writeI64(_e)):this.encodeNumberAsFloat(_e)},yt.prototype.encodeNumberAsFloat=function(_e){this.forceFloat32?(this.writeU8(202),this.writeF32(_e)):(this.writeU8(203),this.writeF64(_e))},yt.prototype.encodeBigInt=function(_e){if(this.forceBigIntToInt64)this.encodeBigIntAsInt64(_e);else if(_e>=0)if(_e<4294967296||this.forceIntegerToFloat)this.encodeNumber(Number(_e));else if(_e<BigInt("0x10000000000000000"))this.encodeBigIntAsInt64(_e);else throw new Error("Bigint is too large for uint64: ".concat(_e));else if(_e>=-2147483648||this.forceIntegerToFloat)this.encodeNumber(Number(_e));else if(_e>=BigInt(-1)*BigInt("0x8000000000000000"))this.encodeBigIntAsInt64(_e);else throw new Error("Bigint is too small for int64: ".concat(_e))},yt.prototype.encodeBigIntAsInt64=function(_e){_e>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(_e)):(this.writeU8(211),this.writeBigInt64(_e))},yt.prototype.writeStringHeader=function(_e){if(_e<32)this.writeU8(160+_e);else if(_e<256)this.writeU8(217),this.writeU8(_e);else if(_e<65536)this.writeU8(218),this.writeU16(_e);else if(_e<4294967296)this.writeU8(219),this.writeU32(_e);else throw new Error("Too long string: ".concat(_e," bytes in UTF-8"))},yt.prototype.encodeString=function(_e){var $t=5,Ft=utf8Count(_e);this.ensureBufferSizeToWrite($t+Ft),this.writeStringHeader(Ft),utf8Encode(_e,this.bytes,this.pos),this.pos+=Ft},yt.prototype.encodeObject=function(_e,$t){var Ft=this.extensionCodec.tryToEncode(_e,this.context);if(Ft!=null)this.encodeExtension(Ft);else if(Array.isArray(_e))this.encodeArray(_e,$t);else if(ArrayBuffer.isView(_e))this.encodeBinary(_e);else if(_e instanceof RawBinaryString)this.encodeBinaryAsString(_e);else if(typeof _e=="bigint")this.encodeBigInt(_e);else if(_e instanceof Map)this.encodeMap(_e,$t);else if(typeof _e=="object")this.encodeMapObject(_e,$t);else throw new Error("Unrecognized object: ".concat(Object.prototype.toString.apply(_e)))},yt.prototype.encodeBinary=function(_e){var $t=_e.byteLength;if($t<256)this.writeU8(196),this.writeU8($t);else if($t<65536)this.writeU8(197),this.writeU16($t);else if($t<4294967296)this.writeU8(198),this.writeU32($t);else throw new Error("Too large binary: ".concat($t));var Ft=ensureUint8Array$1(_e);this.writeU8a(Ft)},yt.prototype.encodeBinaryAsString=function(_e){var $t=_e.rawBinaryValue;this.writeStringHeader($t.byteLength);var Ft=ensureUint8Array$1($t);this.writeU8a(Ft)},yt.prototype.encodeArray=function(_e,$t){var Ft=_e.length;if(Ft<16)this.writeU8(144+Ft);else if(Ft<65536)this.writeU8(220),this.writeU16(Ft);else if(Ft<4294967296)this.writeU8(221),this.writeU32(Ft);else throw new Error("Too large array: ".concat(Ft));for(var Vt=0,qt=_e;Vt<qt.length;Vt++){var zt=qt[Vt];this.doEncode(zt,$t+1)}},yt.prototype.countWithoutUndefined=function(_e,$t){for(var Ft=0,Vt=0,qt=$t;Vt<qt.length;Vt++){var zt=qt[Vt];_e.get(zt)!==void 0&&Ft++}return Ft},yt.prototype.sortMapKeys=function(_e){for(var $t=[],Ft=[],Vt=[],qt=[],zt=0,Ht=_e;zt<Ht.length;zt++){var Kt=Ht[zt];if(typeof Kt=="number"){if(isNaN(Kt))throw new Error("Cannot sort map keys with NaN value");$t.push(Kt)}else if(typeof Kt=="bigint")$t.push(Kt);else if(typeof Kt=="string")Ft.push(Kt);else if(ArrayBuffer.isView(Kt))qt.push(ensureUint8Array$1(Kt));else if(Kt instanceof RawBinaryString)Vt.push(Kt);else throw new Error("Unsupported map key type: ".concat(Object.prototype.toString.apply(Kt)))}return $t.sort(function(Gt,Jt){return Gt<Jt?-1:Gt>Jt?1:0}),Ft.sort(),Vt.sort(function(Gt,Jt){return compareUint8Arrays(ensureUint8Array$1(Gt.rawBinaryValue),ensureUint8Array$1(Jt.rawBinaryValue))}),qt.sort(compareUint8Arrays),[].concat($t,Ft,Vt,qt)},yt.prototype.encodeMapObject=function(_e,$t){this.encodeMap(new Map(Object.entries(_e)),$t)},yt.prototype.encodeMap=function(_e,$t){var Ft=Array.from(_e.keys());this.sortKeys&&(Ft=this.sortMapKeys(Ft));var Vt=this.ignoreUndefined?this.countWithoutUndefined(_e,Ft):Ft.length;if(Vt<16)this.writeU8(128+Vt);else if(Vt<65536)this.writeU8(222),this.writeU16(Vt);else if(Vt<4294967296)this.writeU8(223),this.writeU32(Vt);else throw new Error("Too large map object: ".concat(Vt));for(var qt=0,zt=Ft;qt<zt.length;qt++){var Ht=zt[qt],Kt=_e.get(Ht);if(!(this.ignoreUndefined&&Kt===void 0)){if(typeof Ht=="string")this.encodeString(Ht);else if(typeof Ht=="number")this.encodeNumber(Ht);else if(typeof Ht=="bigint")this.encodeBigInt(Ht);else if(ArrayBuffer.isView(Ht))this.encodeBinary(Ht);else if(Ht instanceof RawBinaryString)this.encodeBinaryAsString(Ht);else throw new Error("Unsupported map key type: ".concat(Object.prototype.toString.apply(Ht)));this.doEncode(Kt,$t+1)}}},yt.prototype.encodeExtension=function(_e){var $t=_e.data.length;if($t===1)this.writeU8(212);else if($t===2)this.writeU8(213);else if($t===4)this.writeU8(214);else if($t===8)this.writeU8(215);else if($t===16)this.writeU8(216);else if($t<256)this.writeU8(199),this.writeU8($t);else if($t<65536)this.writeU8(200),this.writeU16($t);else if($t<4294967296)this.writeU8(201),this.writeU32($t);else throw new Error("Too large extension object: ".concat($t));this.writeI8(_e.type),this.writeU8a(_e.data)},yt.prototype.writeU8=function(_e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,_e),this.pos++},yt.prototype.writeU8a=function(_e){var $t=_e.length;this.ensureBufferSizeToWrite($t),this.bytes.set(_e,this.pos),this.pos+=$t},yt.prototype.writeI8=function(_e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,_e),this.pos++},yt.prototype.writeU16=function(_e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,_e),this.pos+=2},yt.prototype.writeI16=function(_e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,_e),this.pos+=2},yt.prototype.writeU32=function(_e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,_e),this.pos+=4},yt.prototype.writeI32=function(_e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,_e),this.pos+=4},yt.prototype.writeF32=function(_e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,_e),this.pos+=4},yt.prototype.writeF64=function(_e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,_e),this.pos+=8},yt.prototype.writeU64=function(_e){this.ensureBufferSizeToWrite(8),setUint64(this.view,this.pos,_e),this.pos+=8},yt.prototype.writeI64=function(_e){this.ensureBufferSizeToWrite(8),setInt64(this.view,this.pos,_e),this.pos+=8},yt.prototype.writeBigUint64=function(_e){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,_e),this.pos+=8},yt.prototype.writeBigInt64=function(_e){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,_e),this.pos+=8},yt}();function encode(yt,_e){var $t=new Encoder(_e);return $t.encodeSharedRef(yt)}function prettyByte(yt){return"".concat(yt<0?"-":"","0x").concat(Math.abs(yt).toString(16).padStart(2,"0"))}
vendor: 4,386 bytes, line 1504
1504var DEFAULT_MAX_KEY_LENGTH=16,DEFAULT_MAX_LENGTH_PER_KEY=16,CachedKeyDecoder=function(){function yt(_e,$t){_e===void 0&&(_e=DEFAULT_MAX_KEY_LENGTH),$t===void 0&&($t=DEFAULT_MAX_LENGTH_PER_KEY),this.maxKeyLength=_e,this.maxLengthPerKey=$t,this.hit=0,this.miss=0,this.caches=[];for(var Ft=0;Ft<this.maxKeyLength;Ft++)this.caches.push([])}return yt.prototype.canBeCached=function(_e){return _e>0&&_e<=this.maxKeyLength},yt.prototype.find=function(_e,$t,Ft){var Vt=this.caches[Ft-1];e:for(var qt=0,zt=Vt;qt<zt.length;qt++){for(var Ht=zt[qt],Kt=Ht.bytes,Gt=0;Gt<Ft;Gt++)if(Kt[Gt]!==_e[$t+Gt])continue e;return Ht.str}return null},yt.prototype.store=function(_e,$t){var Ft=this.caches[_e.length-1],Vt={bytes:_e,str:$t};Ft.length>=this.maxLengthPerKey?Ft[Math.random()*Ft.length|0]=Vt:Ft.push(Vt)},yt.prototype.decode=function(_e,$t,Ft){var Vt=this.find(_e,$t,Ft);if(Vt!=null)return this.hit++,Vt;this.miss++;var qt=utf8DecodeJs(_e,$t,Ft),zt=Uint8Array.prototype.slice.call(_e,$t,$t+Ft);return this.store(zt,qt),qt},yt}(),__awaiter$1=function(yt,_e,$t,Ft){function Vt(qt){return qt instanceof $t?qt:new $t(function(zt){zt(qt)})}return new($t||($t=Promise))(function(qt,zt){function Ht(Jt){try{Gt(Ft.next(Jt))}catch(Xt){zt(Xt)}}function Kt(Jt){try{Gt(Ft.throw(Jt))}catch(Xt){zt(Xt)}}function Gt(Jt){Jt.done?qt(Jt.value):Vt(Jt.value).then(Ht,Kt)}Gt((Ft=Ft.apply(yt,_e||[])).next())})},__generator$1=function(yt,_e){var $t={label:0,sent:function(){if(qt[0]&1)throw qt[1];return qt[1]},trys:[],ops:[]},Ft,Vt,qt,zt;return zt={next:Ht(0),throw:Ht(1),return:Ht(2)},typeof Symbol=="function"&&(zt[Symbol.iterator]=function(){return this}),zt;function Ht(Gt){return function(Jt){return Kt([Gt,Jt])}}function Kt(Gt){if(Ft)throw new TypeError("Generator is already executing.");for(;zt&&(zt=0,Gt[0]&&($t=0)),$t;)try{if(Ft=1,Vt&&(qt=Gt[0]&2?Vt.return:Gt[0]?Vt.throw||((qt=Vt.return)&&qt.call(Vt),0):Vt.next)&&!(qt=qt.call(Vt,Gt[1])).done)return qt;switch(Vt=0,qt&&(Gt=[Gt[0]&2,qt.value]),Gt[0]){case 0:case 1:qt=Gt;break;case 4:return $t.label++,{value:Gt[1],done:!1};case 5:$t.label++,Vt=Gt[1],Gt=[0];continue;case 7:Gt=$t.ops.pop(),$t.trys.pop();continue;default:if(qt=$t.trys,!(qt=qt.length>0&&qt[qt.length-1])&&(Gt[0]===6||Gt[0]===2)){$t=0;continue}if(Gt[0]===3&&(!qt||Gt[1]>qt[0]&&Gt[1]<qt[3])){$t.label=Gt[1];break}if(Gt[0]===6&&$t.label<qt[1]){$t.label=qt[1],qt=Gt;break}if(qt&&$t.label<qt[2]){$t.label=qt[2],$t.ops.push(Gt);break}qt[2]&&$t.ops.pop(),$t.trys.pop();continue}Gt=_e.call(yt,$t)}catch(Jt){Gt=[6,Jt],Vt=0}finally{Ft=qt=0}if(Gt[0]&5)throw Gt[1];return{value:Gt[0]?Gt[1]:void 0,done:!0}}},__asyncValues$1=function(yt){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var _e=yt[Symbol.asyncIterator],$t;return _e?_e.call(yt):(yt=typeof __values=="function"?__values(yt):yt[Symbol.iterator](),$t={},Ft("next"),Ft("throw"),Ft("return"),$t[Symbol.asyncIterator]=function(){return this},$t);function Ft(qt){$t[qt]=yt[qt]&&function(zt){return new Promise(function(Ht,Kt){zt=yt[qt](zt),Vt(Ht,Kt,zt.done,zt.value)})}}function Vt(qt,zt,Ht,Kt){Promise.resolve(Kt).then(function(Gt){qt({value:Gt,done:Ht})},zt)}},__await$1=function(yt){return this instanceof __await$1?(this.v=yt,this):new __await$1(yt)},__asyncGenerator$1=function(yt,_e,$t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Ft=$t.apply(yt,_e||[]),Vt,qt=[];return Vt={},zt("next"),zt("throw"),zt("return"),Vt[Symbol.asyncIterator]=function(){return this},Vt;function zt(Zt){Ft[Zt]&&(Vt[Zt]=function(er){return new Promise(function(tr,rr){qt.push([Zt,er,tr,rr])>1||Ht(Zt,er)})})}function Ht(Zt,er){try{Kt(Ft[Zt](er))}catch(tr){Xt(qt[0][3],tr)}}function Kt(Zt){Zt.value instanceof __await$1?Promise.resolve(Zt.value.v).then(Gt,Jt):Xt(qt[0][2],Zt)}function Gt(Zt){Ht("next",Zt)}function Jt(Zt){Ht("throw",Zt)}function Xt(Zt,er){Zt(er),qt.shift(),qt.length&&Ht(qt[0][0],qt[0][1])}},STATE_ARRAY="array",STATE_MAP_KEY="map_key",STATE_MAP_VALUE="map_value";function isValidMapKeyType(yt,_e,$t){return _e?typeof yt=="string"||typeof yt=="number"||typeof yt=="bigint"||yt instanceof Uint8Array||yt instanceof RawBinaryString:typeof yt=="string"||$t&&typeof yt=="number"}var StackPool=function(){function yt(_e){this.useMap=_e,this.stack=[],this.stackHeadPosition=-1}return Object.defineProperty(yt.prototype,"length",{get:function(){return this.stackHeadPosition+1}
1504,enumerable:!1,configurable:!0}),yt.prototype.top=function(){return this.stack[this.stackHeadPosition]},yt.prototype.pushArrayState=function(_e){var $t=this.getUninitializedStateFromPool();$t.type=STATE_ARRAY,$t.position=0,$t.size=_e,$t.array=new Array(_e)},yt.prototype.pushMapState=function(_e){var $t=this.getUninitializedStateFromPool();$t.type=STATE_MAP_KEY,$t.readCount=0,$t.size=_e,$t.map=this.useMap?new Map:{}},yt.prototype.getUninitializedStateFromPool=function(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){var _e={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(_e)}return this.stack[this.stackHeadPosition]},yt.prototype.release=function(_e){var $t=this.stack[this.stackHeadPosition];if($t!==_e)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(_e.type===STATE_ARRAY){var Ft=_e;Ft.size=0,Ft.array=void 0,Ft.position=0,Ft.type=void 0}if(_e.type===STATE_MAP_KEY||_e.type===STATE_MAP_VALUE){var Ft=_e;Ft.size=0,Ft.map=void 0,Ft.readCount=0,Ft.type=void 0}this.stackHeadPosition--},yt.prototype.reset=function(){this.stack.length=0,this.stackHeadPosition=-1},yt}(),HEAD_BYTE_REQUIRED=-1,EMPTY_VIEW=new DataView(new ArrayBuffer(0)),EMPTY_BYTES=new Uint8Array(EMPTY_VIEW.buffer);try{EMPTY_VIEW.getInt8(0)}catch(yt){if(!(yt instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}var DataViewIndexOutOfBoundsError=RangeError,MORE_DATA=new DataViewIndexOutOfBoundsError("Insufficient data"),sharedCachedKeyDecoder=new CachedKeyDecoder,Decoder=function(){function yt(_e){var $t,Ft,Vt,qt,zt,Ht,Kt,Gt,Jt,Xt,Zt,er;if(this.totalPos=0,this.pos=0,this.view=EMPTY_VIEW,this.bytes=EMPTY_BYTES,this.headByte=HEAD_BYTE_REQUIRED,this.extensionCodec=($t=_e==null?void 0:_e.extensionCodec)!==null&&$t!==void 0?$t:ExtensionCodec.defaultCodec,this.context=_e==null?void 0:_e.context,this.intMode=(Ft=_e==null?void 0:_e.intMode)!==null&&Ft!==void 0?Ft:_e!=null&&_e.useBigInt64?IntMode.AS_ENCODED:IntMode.UNSAFE_NUMBER,this.rawBinaryStringValues=(Vt=_e==null?void 0:_e.rawBinaryStringValues)!==null&&Vt!==void 0?Vt:!1,this.rawBinaryStringKeys=(qt=_e==null?void 0:_e.rawBinaryStringKeys)!==null&&qt!==void 0?qt:!1,this.useRawBinaryStringClass=(zt=_e==null?void 0:_e.useRawBinaryStringClass)!==null&&zt!==void 0?zt:!1,this.useMap=(Ht=_e==null?void 0:_e.useMap)!==null&&Ht!==void 0?Ht:!1,this.supportObjectNumberKeys=(Kt=_e==null?void 0:_e.supportObjectNumberKeys)!==null&&Kt!==void 0?Kt:!1,this.maxStrLength=(Gt=_e==null?void 0:_e.maxStrLength)!==null&&Gt!==void 0?Gt:UINT32_MAX,this.maxBinLength=(Jt=_e==null?void 0:_e.maxBinLength)!==null&&Jt!==void 0?Jt:UINT32_MAX,this.maxArrayLength=(Xt=_e==null?void 0:_e.maxArrayLength)!==null&&Xt!==void 0?Xt:UINT32_MAX,this.maxMapLength=(Zt=_e==null?void 0:_e.maxMapLength)!==null&&Zt!==void 0?Zt:UINT32_MAX,this.maxExtLength=(er=_e==null?void 0:_e.maxExtLength)!==null&&er!==void 0?er:UINT32_MAX,this.keyDecoder=(_e==null?void 0:_e.keyDecoder)!==void 0?_e.keyDecoder:sharedCachedKeyDecoder,this.rawBinaryStringKeys&&!this.useMap)throw new Error("rawBinaryStringKeys is only supported when useMap is true");this.stack=new StackPool(this.useMap)}return yt.prototype.reinitializeState=function(){this.totalPos=0,this.headByte=HEAD_BYTE_REQUIRED,this.stack.reset()},yt.prototype.setBuffer=function(_e){this.bytes=ensureUint8Array$1(_e),this.view=createDataView(this.bytes),this.pos=0},yt.prototype.appendBuffer=function(_e){if(this.headByte===HEAD_BYTE_REQUIRED&&!this.hasRemaining(1))this.setBuffer(_e);else{var $t=this.bytes.subarray(this.pos),Ft=ensureUint8Array$1(_e),Vt=new Uint8Array($t.length+Ft.length);Vt.set($t),Vt.set(Ft,$t.length),this.setBuffer(Vt)}},yt.prototype.hasRemaining=function(_e){return this.view.byteLength-this.pos>=_e},yt.prototype.createExtraByteError=function(_e){var $t=this,Ft=$t.view,Vt=$t.pos;return new RangeError("Extra ".concat(Ft.byteLength-Vt," of ").concat(Ft.byteLength," byte(s) found at buffer[").concat(_e,"]"))},yt.prototype.decode=function(_e){this.reinitializeState(),this.setBuffer(_e);var $t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return $t},yt.prototype.decodeMulti=function(_e){return __generator$1(this,function($t){switch($t.label){case 0:this.reinitializeState(),this.setBuffer(_e),$t.label=1;case 1:return this.hasRemaining(1)?[4,this.doDecodeSync()]:[3,3];case 2:return $t.sent(),[3,1];case 3:return[2]}})},yt.prototype.decodeAsync=function(_e){var $t,Ft,Vt,qt,zt,Ht,Kt;return __awaiter$1(this,void 0,void 0,function(){var Gt,Jt,Xt,Zt,er,tr,rr,ar;return __generator$1(this,function(nr){switch(nr.label){case 0:Gt=!1,nr.label=1;case 1:nr.trys.push([1,6,7,12]),$t=!0,Ft=__asyncValues$1(_e),nr.label=2;case 2:return[4,Ft.next()];case 3:if(Vt=nr.sent(),qt=Vt.done,!!qt)return[3,5];if(Kt=Vt.value,$t=!1,Xt=Kt,Gt)throw this.createExtraByteError(this.totalPos);this.appendBuffer(Xt);try{Jt=this.doDecodeSync(),Gt=!0}catch(cr){if(!(cr instanceof DataViewIndexOutOfBoundsError))throw cr}this.totalPos+=this.pos,nr.label=4;case 4:return $t=!0,[3,2];case 5:return[3,12];case 6:return Zt=nr.sent(),zt={error:Zt},[3,12];case 7:return nr.trys.push([7,,10,11]),!$t&&!qt&&(Ht=Ft.return)?[4,Ht.call(Ft)]:[3,9];case 8:nr.sent(),nr.label=9;case 9:return[3,11];case 10:if(zt)throw zt.error;return[7];
1504case 11:return[7];case 12:if(Gt){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return[2,Jt]}throw er=this,tr=er.headByte,rr=er.pos,ar=er.totalPos,new RangeError("Insufficient data in parsing ".concat(prettyByte(tr)," at ").concat(ar," (").concat(rr," in the current buffer)"))}})})},yt.prototype.decodeArrayStream=function(_e){return this.decodeMultiAsync(_e,!0)},yt.prototype.decodeStream=function(_e){return this.decodeMultiAsync(_e,!1)},yt.prototype.decodeMultiAsync=function(_e,$t){return __asyncGenerator$1(this,arguments,function(){var Vt,qt,zt,Ht,Kt,Gt,Jt,Xt,Zt,er,tr,rr;return __generator$1(this,function(ar){switch(ar.label){case 0:Vt=$t,qt=-1,ar.label=1;case 1:ar.trys.push([1,13,14,19]),zt=!0,Ht=__asyncValues$1(_e),ar.label=2;case 2:return[4,__await$1(Ht.next())];case 3:if(Kt=ar.sent(),Zt=Kt.done,!!Zt)return[3,12];if(rr=Kt.value,zt=!1,Gt=rr,$t&&qt===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(Gt),Vt&&(qt=this.readArraySize(),Vt=!1,this.complete()),ar.label=4;case 4:ar.trys.push([4,9,,10]),ar.label=5;case 5:return[4,__await$1(this.doDecodeSync())];case 6:return[4,ar.sent()];case 7:return ar.sent(),--qt===0?[3,8]:[3,5];case 8:return[3,10];case 9:if(Jt=ar.sent(),!(Jt instanceof DataViewIndexOutOfBoundsError))throw Jt;return[3,10];case 10:this.totalPos+=this.pos,ar.label=11;case 11:return zt=!0,[3,2];case 12:return[3,19];case 13:return Xt=ar.sent(),er={error:Xt},[3,19];case 14:return ar.trys.push([14,,17,18]),!zt&&!Zt&&(tr=Ht.return)?[4,__await$1(tr.call(Ht))]:[3,16];case 15:ar.sent(),ar.label=16;case 16:return[3,18];case 17:if(er)throw er.error;return[7];case 18:return[7];case 19:return[2]}})})},yt.prototype.doDecodeSync=function(){e:for(;;){var _e=this.readHeadByte(),$t=void 0;if(_e>=224)$t=this.convertNumber(_e-256);else if(_e<192)if(_e<128)$t=this.convertNumber(_e);else if(_e<144){var Ft=_e-128;if(Ft!==0){this.pushMapState(Ft),this.complete();continue e}else $t=this.useMap?new Map:{}}else if(_e<160){var Ft=_e-144;if(Ft!==0){this.pushArrayState(Ft),this.complete();continue e}else $t=[]}else{var Vt=_e-160;$t=this.decodeString(Vt,0)}else if(_e===192)$t=null;else if(_e===194)$t=!1;else if(_e===195)$t=!0;else if(_e===202)$t=this.readF32();else if(_e===203)$t=this.readF64();else if(_e===204)$t=this.convertNumber(this.readU8());else if(_e===205)$t=this.convertNumber(this.readU16());else if(_e===206)$t=this.convertNumber(this.readU32());else if(_e===207)$t=this.readU64();else if(_e===208)$t=this.convertNumber(this.readI8());else if(_e===209)$t=this.convertNumber(this.readI16());else if(_e===210)$t=this.convertNumber(this.readI32());else if(_e===211)$t=this.readI64();else if(_e===217){var Vt=this.lookU8();$t=this.decodeString(Vt,1)}else if(_e===218){var Vt=this.lookU16();$t=this.decodeString(Vt,2)}else if(_e===219){var Vt=this.lookU32();$t=this.decodeString(Vt,4)}else if(_e===220){var Ft=this.readU16();if(Ft!==0){this.pushArrayState(Ft),this.complete();continue e}else $t=[]}else if(_e===221){var Ft=this.readU32();if(Ft!==0){this.pushArrayState(Ft),this.complete();continue e}else $t=[]}else if(_e===222){var Ft=this.readU16();if(Ft!==0){this.pushMapState(Ft),this.complete();continue e}else $t={}}else if(_e===223){var Ft=this.readU32();if(Ft!==0){this.pushMapState(Ft),this.complete();continue e}else $t={}}else if(_e===196){var Ft=this.lookU8();$t=this.decodeBinary(Ft,1)}else if(_e===197){var Ft=this.lookU16();$t=this.decodeBinary(Ft,2)}else if(_e===198){var Ft=this.lookU32();$t=this.decodeBinary(Ft,4)}else if(_e===212)$t=this.decodeExtension(1,0);else if(_e===213)$t=this.decodeExtension(2,0);else if(_e===214)$t=this.decodeExtension(4,0);else if(_e===215)$t=this.decodeExtension(8,0);else if(_e===216)$t=this.decodeExtension(16,0);else if(_e===199){var Ft=this.lookU8();$t=this.decodeExtension(Ft,1)}else if(_e===200){var Ft=this.lookU16();$t=this.decodeExtension(Ft,2)}else if(_e===201){var Ft=this.lookU32();$t=this.decodeExtension(Ft,4)}else throw new DecodeError("Unrecognized type byte: ".concat(prettyByte(_e)));this.complete();for(var qt=this.stack;qt.length>0;){var zt=qt.top();if(zt.type===STATE_ARRAY)if(zt.array[zt.position]=$t,zt.position++,zt.position===zt.size)$t=zt.array,qt.release(zt);else continue e;else if(zt.type===STATE_MAP_KEY){if(!isValidMapKeyType($t,this.useMap,this.supportObjectNumberKeys)){var Ht=this.useMap?"string, number, bigint, or Uint8Array":this.supportObjectNumberKeys?"string or number":"string";throw new DecodeError("The type of key must be ".concat(Ht," but got ").concat(typeof $t))}if(!this.useMap&&$t==="__proto__")throw new DecodeError("The key __proto__ is not allowed");zt.key=$t,zt.type=STATE_MAP_VALUE;continue e}else if(this.useMap?zt.map.set(zt.key,$t):zt.map[zt.key]=$t,zt.readCount++,zt.readCount===zt.size)$t=zt.map,qt.release(zt);else{zt.key=null,zt.type=STATE_MAP_KEY;continue e}}return $t}},yt.prototype.readHeadByte=function(){return this.headByte===HEAD_BYTE_REQUIRED&&(this.headByte=this.readU8()),this.headByte},yt.prototype.complete=function(){this.headByte=HEAD_BYTE_REQUIRED},yt.prototype.readArraySize=function(){var _e=this.readHeadByte();switch(_e){case 220:return this.readU16();case 221:return this.readU32();
1504default:{if(_e<160)return _e-144;throw new DecodeError("Unrecognized array type byte: ".concat(prettyByte(_e)))}}},yt.prototype.pushMapState=function(_e){if(_e>this.maxMapLength)throw new DecodeError("Max length exceeded: map length (".concat(_e,") > maxMapLengthLength (").concat(this.maxMapLength,")"));this.stack.pushMapState(_e)},yt.prototype.pushArrayState=function(_e){if(_e>this.maxArrayLength)throw new DecodeError("Max length exceeded: array length (".concat(_e,") > maxArrayLength (").concat(this.maxArrayLength,")"));this.stack.pushArrayState(_e)},yt.prototype.decodeString=function(_e,$t){if(this.stateIsMapKey()?this.rawBinaryStringKeys:this.rawBinaryStringValues){var Ft=this.decodeBinary(_e,$t);return this.useRawBinaryStringClass?new RawBinaryString(Ft):Ft}return this.decodeUtf8String(_e,$t)},yt.prototype.decodeUtf8String=function(_e,$t){var Ft;if(_e>this.maxStrLength)throw new DecodeError("Max length exceeded: UTF-8 byte length (".concat(_e,") > maxStrLength (").concat(this.maxStrLength,")"));if(this.bytes.byteLength<this.pos+$t+_e)throw MORE_DATA;var Vt=this.pos+$t,qt;return this.stateIsMapKey()&&(!((Ft=this.keyDecoder)===null||Ft===void 0)&&Ft.canBeCached(_e))?qt=this.keyDecoder.decode(this.bytes,Vt,_e):qt=utf8Decode(this.bytes,Vt,_e),this.pos+=$t+_e,qt},yt.prototype.stateIsMapKey=function(){if(this.stack.length>0){var _e=this.stack.top();return _e.type===STATE_MAP_KEY}return!1},yt.prototype.decodeBinary=function(_e,$t){if(_e>this.maxBinLength)throw new DecodeError("Max length exceeded: bin length (".concat(_e,") > maxBinLength (").concat(this.maxBinLength,")"));if(!this.hasRemaining(_e+$t))throw MORE_DATA;var Ft=this.pos+$t,Vt=this.bytes.subarray(Ft,Ft+_e);return this.pos+=$t+_e,Vt},yt.prototype.decodeExtension=function(_e,$t){if(_e>this.maxExtLength)throw new DecodeError("Max length exceeded: ext length (".concat(_e,") > maxExtLength (").concat(this.maxExtLength,")"));var Ft=this.view.getInt8(this.pos+$t),Vt=this.decodeBinary(_e,$t+1);return this.extensionCodec.decode(Vt,Ft,this.context)},yt.prototype.convertNumber=function(_e){return convertSafeIntegerToMode(_e,this.intMode)},yt.prototype.lookU8=function(){return this.view.getUint8(this.pos)},yt.prototype.lookU16=function(){return this.view.getUint16(this.pos)},yt.prototype.lookU32=function(){return this.view.getUint32(this.pos)},yt.prototype.readU8=function(){var _e=this.view.getUint8(this.pos);return this.pos++,_e},yt.prototype.readI8=function(){var _e=this.view.getInt8(this.pos);return this.pos++,_e},yt.prototype.readU16=function(){var _e=this.view.getUint16(this.pos);return this.pos+=2,_e},yt.prototype.readI16=function(){var _e=this.view.getInt16(this.pos);return this.pos+=2,_e},yt.prototype.readU32=function(){var _e=this.view.getUint32(this.pos);return this.pos+=4,_e},yt.prototype.readI32=function(){var _e=this.view.getInt32(this.pos);return this.pos+=4,_e},yt.prototype.readU64=function(){var _e=getUint64(this.view,this.pos,this.intMode);return this.pos+=8,_e},yt.prototype.readI64=function(){var _e=getInt64(this.view,this.pos,this.intMode);return this.pos+=8,_e},yt.prototype.readF32=function(){var _e=this.view.getFloat32(this.pos);return this.pos+=4,_e},yt.prototype.readF64=function(){var _e=this.view.getFloat64(this.pos);return this.pos+=8,_e},yt}();function decode$2(yt,_e){var $t=new Decoder(_e);return $t.decode(yt)}const ERROR_CONTAINS_EMPTY_STRING="The object contains empty or 0 values. First empty or 0 value encountered during encoding: ";function containsEmpty(yt){for(const _e in yt)if(Object.prototype.hasOwnProperty.call(yt,_e)&&(!yt[_e]||yt[_e].length===0))return{containsEmpty:!0,firstEmptyKey:_e};return{containsEmpty:!1,firstEmptyKey:void 0}}function msgpackRawEncode(yt){return encode(yt,{sortKeys:!0})}function encodeObj(yt){const _e=containsEmpty(yt);if(_e.containsEmpty)throw new Error(ERROR_CONTAINS_EMPTY_STRING+_e.firstEmptyKey);return msgpackRawEncode(yt)}function intDecodingToIntMode(yt){switch(yt){case IntDecoding$1.UNSAFE:return IntMode.UNSAFE_NUMBER;case IntDecoding$1.SAFE:return IntMode.SAFE_NUMBER;case IntDecoding$1.MIXED:return IntMode.MIXED;case IntDecoding$1.BIGINT:return IntMode.BIGINT;default:throw new Error(`Invalid intDecoding: ${yt}`)}}function msgpackRawDecode(yt,_e){const $t={intMode:_e!=null&&_e.intDecoding?intDecodingToIntMode(_e==null?void 0:_e.intDecoding):IntMode.BIGINT};return decode$2(yt,$t)}function decodeObj(yt){return msgpackRawDecode(yt,{intDecoding:IntDecoding$1.MIXED})}function msgpackRawDecodeAsMap(yt,_e){const $t={intMode:_e!=null&&_e.intDecoding?intDecodingToIntMode(_e==null?void 0:_e.intDecoding):IntMode.BIGINT,useMap:!0};return decode$2(yt,$t)}function msgpackRawDecodeAsMapWithRawStrings(yt,_e){const $t={intMode:IntMode.BIGINT,useMap:!0,rawBinaryStringKeys:!0,rawBinaryStringValues:!0,useRawBinaryStringClass:!0};return decode$2(yt,$t)}function msgpackEncodingDataToJSONEncodingData(yt){if(yt==null)return yt;if(yt instanceof Uint8Array)return bytesToBase64(yt);if(Array.isArray(yt))return yt.map(msgpackEncodingDataToJSONEncodingData);if(yt instanceof Map){const _e={};for(const[$t,Ft]of yt){if(typeof $t!="string")throw new Error(`JSON map key must be a string: ${$t}`);
1504_e[$t]=msgpackEncodingDataToJSONEncodingData(Ft)}return _e}return yt}function jsonEncodingDataToMsgpackEncodingData(yt){if(yt==null||typeof yt=="string"||typeof yt=="number"||typeof yt=="bigint"||typeof yt=="boolean")return yt;if(Array.isArray(yt))return yt.map(jsonEncodingDataToMsgpackEncodingData);if(typeof yt=="object"){const _e=new Map;for(const[$t,Ft]of Object.entries(yt))_e.set($t,jsonEncodingDataToMsgpackEncodingData(Ft));return _e}throw new Error(`Invalid JSON encoding data: ${yt}`)}var MsgpackObjectPathSegmentKind;(function(yt){yt[yt.MAP_VALUE=0]="MAP_VALUE",yt[yt.ARRAY_ELEMENT=1]="ARRAY_ELEMENT"})(MsgpackObjectPathSegmentKind||(MsgpackObjectPathSegmentKind={}));class MsgpackRawStringProvider{constructor({parent:_e,segment:$t,baseObjectBytes:Ft}){this.resolvedCache=null,this.resolvedCachePresent=!1,this.parent=_e,this.segment=$t,this.baseObjectBytes=Ft}withMapValue(_e){return new MsgpackRawStringProvider({parent:this,segment:{kind:MsgpackObjectPathSegmentKind.MAP_VALUE,key:_e}})}withArrayElement(_e){return new MsgpackRawStringProvider({parent:this,segment:{kind:MsgpackObjectPathSegmentKind.ARRAY_ELEMENT,key:_e}})}getRawStringAtCurrentLocation(){const _e=this.resolve();if(_e instanceof RawBinaryString)return _e.rawBinaryValue;throw new Error(`Invalid type. Expected RawBinaryString, got ${_e} (${typeof _e})`)}getRawStringKeysAndValuesAtCurrentLocation(){const _e=this.resolve();if(!(_e instanceof Map))throw new Error(`Invalid type. Expected Map, got ${_e} (${typeof _e})`);const $t=new Map;for(const[Ft,Vt]of _e)if(Ft instanceof RawBinaryString)$t.set(Ft.rawBinaryValue,Vt);else throw new Error(`Invalid type for map key. Expected RawBinaryString, got ${Ft} (${typeof Ft})`);return $t}resolve(){if(this.resolvedCachePresent)return this.resolvedCache;let _e;if(this.parent?_e=this.parent.resolve():_e=msgpackRawDecodeAsMapWithRawStrings(this.baseObjectBytes),!this.segment)return this.resolvedCache=_e,this.resolvedCachePresent=!0,_e;if(this.segment.kind===MsgpackObjectPathSegmentKind.MAP_VALUE){if(!(_e instanceof Map))throw new Error(`Invalid type. Expected Map, got ${_e} (${typeof _e})`);if(typeof this.segment.key=="string"||this.segment.key instanceof Uint8Array||this.segment.key instanceof RawBinaryString){const $t=this.segment.key instanceof RawBinaryString?this.segment.key.rawBinaryValue:coerceToBytes(this.segment.key),Ft=typeof this.segment.key=="string"||this.segment.key instanceof RawBinaryString;for(const[Vt,qt]of _e){let zt;if(Ft?Vt instanceof RawBinaryString&&(zt=Vt.rawBinaryValue):Vt instanceof Uint8Array&&(zt=Vt),zt&&arrayEqual($t,zt)){this.resolvedCache=qt;break}}}else this.resolvedCache=_e.get(this.segment.key);return this.resolvedCachePresent=!0,this.resolvedCache}if(this.segment.kind===MsgpackObjectPathSegmentKind.ARRAY_ELEMENT){if(!Array.isArray(_e))throw new Error(`Invalid type. Expected Array, got ${_e} (${typeof _e})`);return this.resolvedCache=_e[this.segment.key],this.resolvedCachePresent=!0,this.resolvedCache}throw new Error(`Invalid segment kind: ${this.segment.kind}`)}getPathString(){const _e=this.parent?this.parent.getPathString():"root";return this.segment?this.segment.kind===MsgpackObjectPathSegmentKind.MAP_VALUE?`${_e} -> map key "${this.segment.key}" (${typeof this.segment.key})`:this.segment.kind===MsgpackObjectPathSegmentKind.ARRAY_ELEMENT?`${_e} -> array index ${this.segment.key} (${typeof this.segment.key})`:`${_e} -> unknown segment kind ${this.segment.kind}`:_e}}class Schema{}function decodeMsgpack(yt,_e){const $t=msgpackRawDecodeAsMap(yt),Ft=new MsgpackRawStringProvider({baseObjectBytes:yt});return _e.fromEncodingData(_e.encodingSchema.fromPreparedMsgpack($t,Ft))}function encodeMsgpack(yt){return msgpackRawEncode(yt.getEncodingSchema().prepareMsgpack(yt.toEncodingData()))}function decodeJSON(yt,_e){const $t=parseJSON(yt,{intDecoding:IntDecoding$1.BIGINT});return _e.fromEncodingData(_e.encodingSchema.fromPreparedJSON($t))}function encodeJSON(yt,_e){const{space:$t,...Ft}=_e??{},Vt=yt.getEncodingSchema().prepareJSON(yt.toEncodingData(),Ft);return stringifyJSON(Vt,void 0,$t)}class BooleanSchema extends Schema{defaultValue(){return!1}isDefaultValue(_e){return _e===!1}prepareMsgpack(_e){if(typeof _e=="boolean")return _e;throw new Error("Invalid boolean")}fromPreparedMsgpack(_e,$t){if(typeof _e=="boolean")return _e;throw new Error("Invalid boolean")}prepareJSON(_e,$t){if(typeof _e=="boolean")return _e;throw new Error("Invalid boolean")}fromPreparedJSON(_e){if(typeof _e=="boolean")return _e;throw new Error("Invalid boolean")}}class StringSchema extends Schema{defaultValue(){return""}isDefaultValue(_e){return _e===""}prepareMsgpack(_e){if(typeof _e=="string")return _e;throw new Error(`Invalid string: (${typeof _e}) ${_e}`)}fromPreparedMsgpack(_e,$t){if(typeof _e=="string")return _e;throw new Error(`Invalid string: (${typeof _e}) ${_e}`)}prepareJSON(_e,$t){if(typeof _e=="string")return _e;throw new Error(`Invalid string: (${typeof _e}) ${_e}`)}fromPreparedJSON(_e){if(typeof _e=="string")return _e;throw new Error(`Invalid string: (${typeof _e}) ${_e}`)}}class Uint64Schema extends Schema{defaultValue(){return BigInt(0)}isDefaultValue(_e){return typeof _e=="bigint"?_e===BigInt(0):typeof _e=="number"?_e===0:!1}prepareMsgpack(_e){return ensureUint64(_e)}fromPreparedMsgpack(_e,$t){return ensureUint64(_e)}prepareJSON(_e,$t){return ensureUint64(_e)}fromPreparedJSON(_e){return ensureUint64(_e)}}class AddressSchema extends Schema{defaultValue(){return Address.zeroAddress()}isDefaultValue(_e){return Address.zeroAddress().equals(_e)}prepareMsgpack(_e){if(_e instanceof Address)return _e.publicKey;throw new Error(`Invalid address: (${typeof _e}) ${_e}`)}fromPreparedMsgpack(_e,$t){return new Address(_e)}prepareJSON(_e,$t){if(_e instanceof Address)return _e.toString();throw new Error(`Invalid address: (${typeof _e}) ${_e}`)}fromPreparedJSON(_e){return Address.fromString(_e)}}class ByteArraySchema extends Schema{defaultValue(){return new Uint8Array}isDefaultValue(_e){return _e instanceof Uint8Array&&_e.byteLength===0}prepareMsgpack(_e){if(_e instanceof Uint8Array)return _e;throw new Error(`Invalid byte array: (${typeof _e}) ${_e}`)}fromPreparedMsgpack(_e,$t){if(_e instanceof Uint8Array)return _e;throw new Error(`Invalid byte array: (${typeof _e}) ${_e}`)}prepareJSON(_e,$t){if(_e instanceof Uint8Array)return bytesToBase64(_e);throw new Error(`Invalid byte array: (${typeof _e}) ${_e}`)}fromPreparedJSON(_e){if(typeof _e=="string")return base64ToBytes(_e);throw new Error(`Invalid byte array: (${typeof _e}) ${_e}`)}}
1504class FixedLengthByteArraySchema extends Schema{constructor(_e){super(),this.length=_e}defaultValue(){return new Uint8Array(this.length)}isDefaultValue(_e){return _e instanceof Uint8Array&&_e.byteLength===this.length&&_e.every($t=>$t===0)}prepareMsgpack(_e){if(_e instanceof Uint8Array){if(_e.byteLength===this.length)return _e;throw new Error(`Invalid byte array length: wanted ${this.length}, got ${_e.byteLength}`)}throw new Error("Invalid byte array")}fromPreparedMsgpack(_e,$t){if(_e instanceof Uint8Array){if(_e.byteLength===this.length)return _e;throw new Error(`Invalid byte array length: wanted ${this.length}, got ${_e.byteLength}`)}throw new Error("Invalid byte array")}prepareJSON(_e){if(_e instanceof Uint8Array){if(_e.byteLength===this.length)return bytesToBase64(_e);throw new Error(`Invalid byte array length: wanted ${this.length}, got ${_e.byteLength}`)}throw new Error("Invalid byte array")}fromPreparedJSON(_e){if(typeof _e=="string"){const $t=base64ToBytes(_e);if($t.byteLength===this.length)return $t;throw new Error(`Invalid byte array length: wanted ${this.length}, got ${$t.byteLength}`)}throw new Error("Invalid base64 byte array")}}const blockHashByteLength=32,base32Length=52;class BlockHashSchema extends Schema{defaultValue(){return new Uint8Array(blockHashByteLength)}isDefaultValue(_e){return _e instanceof Uint8Array&&_e.byteLength===blockHashByteLength&&_e.every($t=>$t===0)}prepareMsgpack(_e){if(_e instanceof Uint8Array&&_e.byteLength===blockHashByteLength)return _e;throw new Error(`Invalid block hash: (${typeof _e}) ${_e}`)}fromPreparedMsgpack(_e,$t){if(_e instanceof Uint8Array&&_e.byteLength===blockHashByteLength)return _e;throw new Error(`Invalid block hash: (${typeof _e}) ${_e}`)}prepareJSON(_e,$t){if(_e instanceof Uint8Array&&_e.byteLength===blockHashByteLength)return`blk-${base32.encode(_e).slice(0,base32Length)}`;throw new Error(`Invalid block hash: (${typeof _e}) ${_e}`)}fromPreparedJSON(_e){if(typeof _e=="string"&&_e.length===base32Length+4&&_e.startsWith("blk-"))return Uint8Array.from(base32.decode.asBytes(_e.slice(4)));throw new Error(`Invalid block hash: (${typeof _e}) ${_e}`)}}class SpecialCaseBinaryStringSchema extends Schema{defaultValue(){return new Uint8Array}isDefaultValue(_e){return _e instanceof Uint8Array&&_e.byteLength===0}prepareMsgpack(_e){if(_e instanceof Uint8Array)return new RawBinaryString(_e);throw new Error(`Invalid byte array: (${typeof _e}) ${_e}`)}fromPreparedMsgpack(_e,$t){return $t.getRawStringAtCurrentLocation()}prepareJSON(_e,$t){if(_e instanceof Uint8Array){const Ft=bytesToString(_e);if(!$t.lossyBinaryStringConversion&&!arrayEqual(coerceToBytes(Ft),_e))throw new Error(`Invalid UTF-8 byte array encountered. Encode with lossyBinaryStringConversion enabled to bypass this check. Base64 value: ${bytesToBase64(_e)}`);return Ft}throw new Error(`Invalid byte array: (${typeof _e}) ${_e}`)}fromPreparedJSON(_e){if(typeof _e=="string")return coerceToBytes(_e);throw new Error(`Invalid byte array: (${typeof _e}) ${_e}`)}}class ArraySchema extends Schema{constructor(_e){super(),this.itemSchema=_e}defaultValue(){return[]}isDefaultValue(_e){return Array.isArray(_e)&&_e.length===0}prepareMsgpack(_e){if(Array.isArray(_e))return _e.map($t=>this.itemSchema.prepareMsgpack($t));throw new Error("ArraySchema data must be an array")}fromPreparedMsgpack(_e,$t){if(Array.isArray(_e))return _e.map((Ft,Vt)=>this.itemSchema.fromPreparedMsgpack(Ft,$t.withArrayElement(Vt)));throw new Error(`ArraySchema encoded data must be an array: ${_e} (${typeof _e})`)}prepareJSON(_e,$t){if(Array.isArray(_e))return _e.map(Ft=>this.itemSchema.prepareJSON(Ft,$t));throw new Error("ArraySchema data must be an array")}fromPreparedJSON(_e){if(Array.isArray(_e))return _e.map($t=>this.itemSchema.fromPreparedJSON($t));throw new Error(`ArraySchema encoded data must be an array: ${_e} (${typeof _e})`)}}function allOmitEmpty(yt){return yt.map(_e=>({..._e,omitEmpty:!0}))}class NamedMapSchema extends Schema{constructor(_e){super(),this.entries=_e,this.checkEntries()}pushEntries(..._e){this.entries.push(..._e),this.checkEntries()}checkEntries(){for(const $t of this.entries)if($t.embedded){if($t.key!=="")throw new Error("Embedded entries must have an empty key");if(!($t.valueSchema instanceof NamedMapSchema))throw new Error("Embedded entry valueSchema must be a NamedMapSchema")}const _e=new Set;for(const $t of this.getEntries()){if(_e.has($t.key))throw new Error(`Duplicate key: ${$t.key}`);_e.add($t.key)}}getEntries(){const _e=[];for(const $t of this.entries)if($t.embedded){const Ft=$t.valueSchema;_e.push(...Ft.getEntries())}else _e.push($t);return _e}defaultValue(){const _e=new Map;for(const $t of this.getEntries())_e.set($t.key,$t.valueSchema.defaultValue());return _e}isDefaultValue(_e){if(!(_e instanceof Map))return!1;for(const $t of this.getEntries())if(!$t.valueSchema.isDefaultValue(_e.get($t.key)))return!1;return!0}prepareMsgpack(_e){if(!(_e instanceof Map))throw new Error(`NamedMapSchema data must be a Map. Got (${typeof _e}) ${_e}`);const $t=new Map;for(const Ft of this.getEntries()){const Vt=_e.get(Ft.key);Ft.omitEmpty&&Ft.valueSchema.isDefaultValue(Vt)||$t.set(Ft.key,Ft.valueSchema.prepareMsgpack(Vt))}return $t}fromPreparedMsgpack(_e,$t){if(!(_e instanceof Map))throw new Error("NamedMapSchema data must be a Map");const Ft=new Map;for(const Vt of this.getEntries())if(_e.has(Vt.key))Ft.set(Vt.key,Vt.valueSchema.fromPreparedMsgpack(_e.get(Vt.key),$t.withMapValue(Vt.key)));else if(Vt.omitEmpty)Ft.set(Vt.key,Vt.valueSchema.defaultValue());else throw new Error(`Missing key: ${Vt.key}`);return Ft}prepareJSON(_e,$t){if(!(_e instanceof Map))throw new Error("NamedMapSchema data must be a Map");const Ft={};for(const Vt of this.getEntries()){const qt=_e.get(Vt.key);Vt.omitEmpty&&Vt.valueSchema.isDefaultValue(qt)||(Ft[Vt.key]=Vt.valueSchema.prepareJSON(qt,$t))}return Ft}fromPreparedJSON(_e){if(_e==null||typeof _e!="object"||Array.isArray(_e))throw new Error("NamedMapSchema data must be an object");const $t=new Map;for(const Ft of this.getEntries())if(Object.prototype.hasOwnProperty.call(_e,Ft.key))$t.set(Ft.key,Ft.valueSchema.fromPreparedJSON(_e[Ft.key]));else if(Ft.omitEmpty)$t.set(Ft.key,Ft.valueSchema.defaultValue());else throw new Error(`Missing key: ${Ft.key}`);return $t}}function combineMaps(...yt){const _e=new Map;for(const $t of yt)for(const[Ft,Vt]of $t){if(_e.has(Ft))throw new Error(`Duplicate key: ${Ft}`);_e.set(Ft,Vt)}return _e}function convertMap(yt,_e){const $t=new Map;for(const[Ft,Vt]of yt){const[qt,zt]=_e(Ft,Vt);$t.set(qt,zt)}return $t}class Uint64MapSchema extends Schema{constructor(_e){super(),this.valueSchema=_e}defaultValue(){return new Map}isDefaultValue(_e){return _e instanceof Map&&_e.size===0}prepareMsgpack(_e){if(!(_e instanceof Map))throw new Error(`Uint64MapSchema data must be a Map. Got (${typeof _e}) ${_e}`);const $t=new Map;for(const[Ft,Vt]of _e){const qt=ensureUint64(Ft);if($t.has(qt))throw new Error(`Duplicate key: ${qt}`);$t.set(qt,this.valueSchema.prepareMsgpack(Vt))}return $t}fromPreparedMsgpack(_e,$t){if(!(_e instanceof Map))throw new Error("Uint64MapSchema data must be a Map");const Ft=new Map;
1504for(const[Vt,qt]of _e){const zt=ensureUint64(Vt);if(Ft.has(zt))throw new Error(`Duplicate key: ${zt}`);Ft.set(zt,this.valueSchema.fromPreparedMsgpack(qt,$t.withMapValue(Vt)))}return Ft}prepareJSON(_e,$t){if(!(_e instanceof Map))throw new Error(`Uint64MapSchema data must be a Map. Got (${typeof _e}) ${_e}`);const Ft=new Map;for(const[qt,zt]of _e){const Ht=ensureUint64(qt);if(Ft.has(Ht))throw new Error(`Duplicate key: ${Ht}`);Ft.set(Ht,this.valueSchema.prepareJSON(zt,$t))}const Vt={};for(const[qt,zt]of Ft)Vt[qt.toString()]=zt;return Vt}fromPreparedJSON(_e){if(_e==null||typeof _e!="object"||Array.isArray(_e))throw new Error("Uint64MapSchema data must be an object");const $t=new Map;for(const[Ft,Vt]of Object.entries(_e)){const qt=BigInt(Ft);if($t.has(qt))throw new Error(`Duplicate key: ${qt}`);$t.set(qt,this.valueSchema.fromPreparedJSON(Vt))}return $t}}class ByteArrayMapSchema extends Schema{constructor(_e){super(),this.valueSchema=_e}defaultValue(){return new Map}isDefaultValue(_e){return _e instanceof Map&&_e.size===0}prepareMsgpack(_e){if(!(_e instanceof Map))throw new Error(`ByteArrayMapSchema data must be a Map. Got (${typeof _e}) ${_e}`);const $t=new Map;for(const[Ft,Vt]of _e){if(!(Ft instanceof Uint8Array))throw new Error(`Invalid key: ${Ft} (${typeof Ft})`);$t.set(Ft,this.valueSchema.prepareMsgpack(Vt))}return $t}fromPreparedMsgpack(_e,$t){if(!(_e instanceof Map))throw new Error("ByteArrayMapSchema data must be a Map");const Ft=new Map;for(const[Vt,qt]of _e){if(!(Vt instanceof Uint8Array))throw new Error(`Invalid key: ${Vt} (${typeof Vt})`);Ft.set(Vt,this.valueSchema.fromPreparedMsgpack(qt,$t.withMapValue(Vt)))}return Ft}prepareJSON(_e,$t){if(!(_e instanceof Map))throw new Error(`ByteArrayMapSchema data must be a Map. Got (${typeof _e}) ${_e}`);const Ft=new Map;for(const[qt,zt]of _e){if(!(qt instanceof Uint8Array))throw new Error(`Invalid key: ${qt} (${typeof qt})`);const Ht=bytesToBase64(qt);if(Ft.has(Ht))throw new Error(`Duplicate key (base64): ${Ht}`);Ft.set(Ht,this.valueSchema.prepareJSON(zt,$t))}const Vt={};for(const[qt,zt]of Ft)Vt[qt]=zt;return Vt}fromPreparedJSON(_e){if(_e==null||typeof _e!="object"||Array.isArray(_e))throw new Error("ByteArrayMapSchema data must be an object");const $t=new Map;for(const[Ft,Vt]of Object.entries(_e))$t.set(base64ToBytes(Ft),this.valueSchema.fromPreparedJSON(Vt));return $t}}function convertRawStringsInMsgpackValue(yt){if(yt instanceof RawBinaryString)return bytesToString(yt.rawBinaryValue);if(yt instanceof Map){const _e=new Map;for(const[$t,Ft]of yt)_e.set(convertRawStringsInMsgpackValue($t),convertRawStringsInMsgpackValue(Ft));return _e}return Array.isArray(yt)?yt.map(convertRawStringsInMsgpackValue):yt}class SpecialCaseBinaryStringMapSchema extends Schema{constructor(_e){super(),this.valueSchema=_e}defaultValue(){return new Map}isDefaultValue(_e){return _e instanceof Map&&_e.size===0}prepareMsgpack(_e){if(!(_e instanceof Map))throw new Error(`SpecialCaseBinaryStringMapSchema data must be a Map. Got (${typeof _e}) ${_e}`);const $t=new Map;for(const[Ft,Vt]of _e){if(!(Ft instanceof Uint8Array))throw new Error(`Invalid key: ${Ft} (${typeof Ft})`);$t.set(new RawBinaryString(Ft),this.valueSchema.prepareMsgpack(Vt))}return $t}fromPreparedMsgpack(_e,$t){const Ft=new Map,Vt=$t.getRawStringKeysAndValuesAtCurrentLocation();for(const[qt,zt]of Vt)Ft.set(qt,this.valueSchema.fromPreparedMsgpack(convertRawStringsInMsgpackValue(zt),$t.withMapValue(new RawBinaryString(qt))));return Ft}prepareJSON(_e,$t){if(!(_e instanceof Map))throw new Error(`SpecialCaseBinaryStringMapSchema data must be a Map. Got (${typeof _e}) ${_e}`);const Ft=new Map;for(const[qt,zt]of _e){if(!(qt instanceof Uint8Array))throw new Error(`Invalid key: ${qt}`);const Ht=bytesToString(qt);if(!$t.lossyBinaryStringConversion&&!arrayEqual(coerceToBytes(Ht),qt))throw new Error(`Invalid UTF-8 byte array encountered. Encode with lossyBinaryStringConversion enabled to bypass this check. Base64 value: ${bytesToBase64(qt)}`);Ft.set(Ht,this.valueSchema.prepareJSON(zt,$t))}const Vt={};for(const[qt,zt]of Ft)Vt[qt]=zt;return Vt}fromPreparedJSON(_e){if(_e==null||typeof _e!="object"||Array.isArray(_e))throw new Error("SpecialCaseBinaryStringMapSchema data must be an object");const $t=new Map;for(const[Ft,Vt]of Object.entries(_e))$t.set(coerceToBytes(Ft),this.valueSchema.fromPreparedJSON(Vt));return $t}}class OptionalSchema extends Schema{constructor(_e){super(),this.valueSchema=_e}defaultValue(){}isDefaultValue(_e){return _e===void 0||this.valueSchema.isDefaultValue(_e)}prepareMsgpack(_e){if(_e!==void 0)return this.valueSchema.prepareMsgpack(_e)}fromPreparedMsgpack(_e,$t){if(_e!=null)return this.valueSchema.fromPreparedMsgpack(_e,$t)}prepareJSON(_e,$t){return _e===void 0?null:this.valueSchema.prepareJSON(_e,$t)}fromPreparedJSON(_e){if(_e!=null)return this.valueSchema.fromPreparedJSON(_e)}}class UntypedSchema extends Schema{defaultValue(){}isDefaultValue(_e){return _e===void 0}prepareMsgpack(_e){return _e}fromPreparedMsgpack(_e,$t){return _e}prepareJSON(_e,$t){return msgpackEncodingDataToJSONEncodingData(_e)}fromPreparedJSON(_e){return jsonEncodingDataToMsgpackEncodingData(_e)}}function boxReferenceToEncodingData(yt,_e,$t){const Ft=BigInt(yt.appIndex),Vt=yt.name,qt=Ft===BigInt(0)||Ft===$t,zt=_e.indexOf(Ft)+1;if(zt===0&&!qt)throw new Error(`Box ref with appId ${Ft} not in foreign-apps`);return new Map([["i",zt],["n",Vt]])}function boxReferencesToEncodingData(yt,_e,$t){const Ft=BigInt($t),Vt=_e.map(BigInt);return yt.map(qt=>boxReferenceToEncodingData(qt,Vt,Ft))}var TransactionType;(function(yt){yt.pay="pay",yt.keyreg="keyreg",yt.acfg="acfg",yt.axfer="axfer",yt.afrz="afrz",yt.appl="appl",yt.stpf="stpf",yt.hb="hb"})(TransactionType||(TransactionType={}));function isTransactionType(yt){return yt===TransactionType.pay||yt===TransactionType.keyreg||yt===TransactionType.acfg||yt===TransactionType.axfer||yt===TransactionType.afrz||yt===TransactionType.appl||yt===TransactionType.stpf||yt===TransactionType.hb}var OnApplicationComplete;(function(yt){yt[yt.NoOpOC=0]="NoOpOC",yt[yt.OptInOC=1]="OptInOC",yt[yt.CloseOutOC=2]="CloseOutOC",yt[yt.ClearStateOC=3]="ClearStateOC",yt[yt.UpdateApplicationOC=4]="UpdateApplicationOC",yt[yt.DeleteApplicationOC=5]="DeleteApplicationOC"})(OnApplicationComplete||(OnApplicationComplete={}));function isOnApplicationComplete(yt){return yt===OnApplicationComplete.NoOpOC||yt===OnApplicationComplete.OptInOC||yt===OnApplicationComplete.CloseOutOC||yt===OnApplicationComplete.ClearStateOC||yt===OnApplicationComplete.UpdateApplicationOC||yt===OnApplicationComplete.DeleteApplicationOC}let HashFactory$1=class _o{constructor(_e){this.hashType=_e.hashType}getEncodingSchema(){return _o.encodingSchema}
1504toEncodingData(){return new Map([["t",this.hashType]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded HashFactory: ${_e}`);return new _o({hashType:Number(_e.get("t"))})}};HashFactory$1.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"t",valueSchema:new Uint64Schema}]));let MerkleArrayProof$1=class Ao{constructor(_e){this.path=_e.path,this.hashFactory=_e.hashFactory,this.treeDepth=_e.treeDepth}getEncodingSchema(){return Ao.encodingSchema}toEncodingData(){return new Map([["pth",this.path],["hsh",this.hashFactory.toEncodingData()],["td",this.treeDepth]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded MerkleArrayProof: ${_e}`);return new Ao({path:_e.get("pth"),hashFactory:HashFactory$1.fromEncodingData(_e.get("hsh")),treeDepth:Number(_e.get("td"))})}};MerkleArrayProof$1.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"pth",valueSchema:new ArraySchema(new ByteArraySchema)},{key:"hsh",valueSchema:HashFactory$1.encodingSchema},{key:"td",valueSchema:new Uint64Schema}]));class MerkleSignatureVerifier{constructor(_e){this.commitment=_e.commitment,this.keyLifetime=_e.keyLifetime}getEncodingSchema(){return MerkleSignatureVerifier.encodingSchema}toEncodingData(){return new Map([["cmt",this.commitment],["lf",this.keyLifetime]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded MerkleSignatureVerifier: ${_e}`);return new MerkleSignatureVerifier({commitment:_e.get("cmt"),keyLifetime:_e.get("lf")})}}MerkleSignatureVerifier.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"cmt",valueSchema:new FixedLengthByteArraySchema(64)},{key:"lf",valueSchema:new Uint64Schema}]));class Participant{constructor(_e){this.pk=_e.pk,this.weight=_e.weight}getEncodingSchema(){return Participant.encodingSchema}toEncodingData(){return new Map([["p",this.pk.toEncodingData()],["w",this.weight]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded Participant: ${_e}`);return new Participant({pk:MerkleSignatureVerifier.fromEncodingData(_e.get("p")),weight:_e.get("w")})}}Participant.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"p",valueSchema:MerkleSignatureVerifier.encodingSchema},{key:"w",valueSchema:new Uint64Schema}]));class FalconVerifier{constructor(_e){this.publicKey=_e.publicKey}getEncodingSchema(){return FalconVerifier.encodingSchema}toEncodingData(){return new Map([["k",this.publicKey]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded FalconVerifier: ${_e}`);return new FalconVerifier({publicKey:_e.get("k")})}}FalconVerifier.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"k",valueSchema:new FixedLengthByteArraySchema(1793)}]));class FalconSignatureStruct{constructor(_e){this.signature=_e.signature,this.vectorCommitmentIndex=_e.index,this.proof=_e.proof,this.verifyingKey=_e.verifyingKey}getEncodingSchema(){return FalconSignatureStruct.encodingSchema}toEncodingData(){return new Map([["sig",this.signature],["idx",this.vectorCommitmentIndex],["prf",this.proof.toEncodingData()],["vkey",this.verifyingKey.toEncodingData()]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded FalconSignatureStruct: ${_e}`);return new FalconSignatureStruct({signature:_e.get("sig"),index:_e.get("idx"),proof:MerkleArrayProof$1.fromEncodingData(_e.get("prf")),verifyingKey:FalconVerifier.fromEncodingData(_e.get("vkey"))})}}FalconSignatureStruct.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"sig",valueSchema:new ByteArraySchema},{key:"idx",valueSchema:new Uint64Schema},{key:"prf",valueSchema:MerkleArrayProof$1.encodingSchema},{key:"vkey",valueSchema:FalconVerifier.encodingSchema}]));class SigslotCommit{constructor(_e){this.sig=_e.sig,this.l=_e.l}getEncodingSchema(){return SigslotCommit.encodingSchema}toEncodingData(){return new Map([["s",this.sig.toEncodingData()],["l",this.l]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded SigslotCommit: ${_e}`);return new SigslotCommit({sig:FalconSignatureStruct.fromEncodingData(_e.get("s")),l:_e.get("l")})}}SigslotCommit.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"s",valueSchema:FalconSignatureStruct.encodingSchema},{key:"l",valueSchema:new Uint64Schema}]));class Reveal{constructor(_e){this.sigslot=_e.sigslot,this.participant=_e.participant}getEncodingSchema(){return Reveal.encodingSchema}toEncodingData(){return new Map([["s",this.sigslot.toEncodingData()],["p",this.participant.toEncodingData()]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded Reveal: ${_e}`);return new Reveal({sigslot:SigslotCommit.fromEncodingData(_e.get("s")),participant:Participant.fromEncodingData(_e.get("p"))})}}Reveal.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"s",valueSchema:Sigslot
1504Commit.encodingSchema},{key:"p",valueSchema:Participant.encodingSchema}]));let StateProof$2=class $o{constructor(_e){this.sigCommit=_e.sigCommit,this.signedWeight=_e.signedWeight,this.sigProofs=_e.sigProofs,this.partProofs=_e.partProofs,this.merkleSignatureSaltVersion=_e.merkleSignatureSaltVersion,this.reveals=_e.reveals,this.positionsToReveal=_e.positionsToReveal}getEncodingSchema(){return $o.encodingSchema}toEncodingData(){return new Map([["c",this.sigCommit],["w",this.signedWeight],["S",this.sigProofs.toEncodingData()],["P",this.partProofs.toEncodingData()],["v",this.merkleSignatureSaltVersion],["r",convertMap(this.reveals,(_e,$t)=>[_e,$t.toEncodingData()])],["pr",this.positionsToReveal]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded StateProof: ${_e}`);return new $o({sigCommit:_e.get("c"),signedWeight:_e.get("w"),sigProofs:MerkleArrayProof$1.fromEncodingData(_e.get("S")),partProofs:MerkleArrayProof$1.fromEncodingData(_e.get("P")),merkleSignatureSaltVersion:Number(_e.get("v")),reveals:convertMap(_e.get("r"),($t,Ft)=>[$t,Reveal.fromEncodingData(Ft)]),positionsToReveal:_e.get("pr")})}};StateProof$2.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"c",valueSchema:new ByteArraySchema},{key:"w",valueSchema:new Uint64Schema},{key:"S",valueSchema:MerkleArrayProof$1.encodingSchema},{key:"P",valueSchema:MerkleArrayProof$1.encodingSchema},{key:"v",valueSchema:new Uint64Schema},{key:"r",valueSchema:new Uint64MapSchema(Reveal.encodingSchema)},{key:"pr",valueSchema:new ArraySchema(new Uint64Schema)}]));let StateProofMessage$1=class xo{constructor(_e){this.blockHeadersCommitment=_e.blockHeadersCommitment,this.votersCommitment=_e.votersCommitment,this.lnProvenWeight=_e.lnProvenWeight,this.firstAttestedRound=_e.firstAttestedRound,this.lastAttestedRound=_e.lastAttestedRound}getEncodingSchema(){return xo.encodingSchema}toEncodingData(){return new Map([["b",this.blockHeadersCommitment],["v",this.votersCommitment],["P",this.lnProvenWeight],["f",this.firstAttestedRound],["l",this.lastAttestedRound]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded StateProofMessage: ${_e}`);return new xo({blockHeadersCommitment:_e.get("b"),votersCommitment:_e.get("v"),lnProvenWeight:_e.get("P"),firstAttestedRound:_e.get("f"),lastAttestedRound:_e.get("l")})}static fromMap(_e){return new xo({blockHeadersCommitment:_e.get("b"),votersCommitment:_e.get("v"),lnProvenWeight:_e.get("P"),firstAttestedRound:_e.get("f"),lastAttestedRound:_e.get("l")})}};StateProofMessage$1.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"b",valueSchema:new ByteArraySchema},{key:"v",valueSchema:new ByteArraySchema},{key:"P",valueSchema:new Uint64Schema},{key:"f",valueSchema:new Uint64Schema},{key:"l",valueSchema:new Uint64Schema}]));class HeartbeatProof{constructor(_e){this.sig=_e.sig,this.pk=_e.pk,this.pk2=_e.pk2,this.pk1Sig=_e.pk1Sig,this.pk2Sig=_e.pk2Sig}getEncodingSchema(){return HeartbeatProof.encodingSchema}toEncodingData(){return new Map([["s",this.sig],["p",this.pk],["p2",this.pk2],["p1s",this.pk1Sig],["p2s",this.pk2Sig]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded HeartbeatProof: ${_e}`);return new HeartbeatProof({sig:_e.get("s"),pk:_e.get("p"),pk2:_e.get("p2"),pk1Sig:_e.get("p1s"),pk2Sig:_e.get("p2s")})}}HeartbeatProof.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"s",valueSchema:new FixedLengthByteArraySchema(64)},{key:"p",valueSchema:new FixedLengthByteArraySchema(32)},{key:"p2",valueSchema:new FixedLengthByteArraySchema(32)},{key:"p1s",valueSchema:new FixedLengthByteArraySchema(64)},{key:"p2s",valueSchema:new FixedLengthByteArraySchema(64)}]));class Heartbeat{constructor(_e){this.address=_e.address,this.proof=_e.proof,this.seed=_e.seed,this.voteID=_e.voteID,this.keyDilution=_e.keyDilution}getEncodingSchema(){return Heartbeat.encodingSchema}toEncodingData(){return new Map([["a",this.address],["prf",this.proof.toEncodingData()],["sd",this.seed],["vid",this.voteID],["kd",this.keyDilution]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded Heartbeat: ${_e}`);return new Heartbeat({address:_e.get("a"),proof:HeartbeatProof.fromEncodingData(_e.get("prf")),seed:_e.get("sd"),voteID:_e.get("vid"),keyDilution:_e.get("kd")})}}Heartbeat.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"a",valueSchema:new AddressSchema},{key:"prf",valueSchema:HeartbeatProof.encodingSchema},{key:"sd",valueSchema:new ByteArraySchema}
1504,{key:"vid",valueSchema:new FixedLengthByteArraySchema(32)},{key:"kd",valueSchema:new Uint64Schema}]));const ALGORAND_TRANSACTION_LENGTH=52,ALGORAND_TRANSACTION_LEASE_LENGTH=32,NUM_ADDL_BYTES_AFTER_SIGNING=75,ASSET_METADATA_HASH_LENGTH=32,KEYREG_VOTE_KEY_LENGTH=32,KEYREG_SELECTION_KEY_LENGTH=32,KEYREG_STATE_PROOF_KEY_LENGTH=64,ALGORAND_TRANSACTION_GROUP_LENGTH=32;function uint8ArrayIsEmpty(yt){return yt.every(_e=>_e===0)}function getKeyregKey(yt,_e,$t){if(yt==null)return;let Ft;if(yt instanceof Uint8Array&&(Ft=yt),Ft==null||Ft.byteLength!==$t)throw Error(`${_e} must be a ${$t} byte Uint8Array`);return Ft}function ensureAddress(yt){if(yt==null)throw new Error("Address must not be null or undefined");if(typeof yt=="string")return Address.fromString(yt);if(yt instanceof Address)return yt;throw new Error(`Not an address: ${yt}`)}function optionalAddress(yt){if(yt==null)return;let _e;if(yt instanceof Address)_e=yt;else if(typeof yt=="string")_e=Address.fromString(yt);else throw new Error(`Not an address: ${yt}`);if(uint8ArrayIsEmpty(_e.publicKey))throw new Error("Invalid use of the zero address. To omit this value, pass in undefined");return _e}function optionalUint8Array(yt){if(!(typeof yt>"u")){if(yt instanceof Uint8Array)return yt;throw new Error(`Not a Uint8Array: ${yt}`)}}function ensureUint8Array(yt){if(yt instanceof Uint8Array)return yt;throw new Error(`Not a Uint8Array: ${yt}`)}function optionalUint64(yt){if(!(typeof yt>"u"))return ensureUint64(yt)}function ensureBoolean(yt){if(yt===!0||yt===!1)return yt;throw new Error(`Not a boolean: ${yt}`)}function ensureArray(yt){if(Array.isArray(yt))return yt.slice();throw new Error(`Not an array: ${yt}`)}function optionalFixedLengthByteArray(yt,_e,$t){const Ft=optionalUint8Array(yt);if(!(typeof Ft>"u")){if(Ft.byteLength!==_e)throw new Error(`${$t} must be ${_e} bytes long, was ${Ft.byteLength}`);if(!uint8ArrayIsEmpty(Ft))return Ft}}function ensureBoxReference(yt){if(yt!=null&&typeof yt=="object"){const{appIndex:_e,name:$t}=yt;return{appIndex:ensureUint64(_e),name:ensureUint8Array($t)}}throw new Error(`Not a box reference: ${yt}`)}const TX_TAG=new TextEncoder().encode("TX");let Transaction$1=class Eo{constructor(_e){if(!isTransactionType(_e.type))throw new Error(`Invalid transaction type: ${_e.type}`);if(this.type=_e.type,this.sender=ensureAddress(_e.sender),this.note=ensureUint8Array(_e.note??new Uint8Array),this.lease=optionalFixedLengthByteArray(_e.lease,ALGORAND_TRANSACTION_LEASE_LENGTH,"lease"),this.rekeyTo=optionalAddress(_e.rekeyTo),this.group=void 0,this.firstValid=ensureUint64(_e.suggestedParams.firstValid),this.lastValid=ensureUint64(_e.suggestedParams.lastValid),_e.suggestedParams.genesisID){if(typeof _e.suggestedParams.genesisID!="string")throw new Error("Genesis ID must be a string if present");this.genesisID=_e.suggestedParams.genesisID}this.genesisHash=optionalUint8Array(_e.suggestedParams.genesisHash);const $t=[];if(_e.paymentParams&&$t.push(TransactionType.pay),_e.keyregParams&&$t.push(TransactionType.keyreg),_e.assetConfigParams&&$t.push(TransactionType.acfg),_e.assetTransferParams&&$t.push(TransactionType.axfer),_e.assetFreezeParams&&$t.push(TransactionType.afrz),_e.appCallParams&&$t.push(TransactionType.appl),_e.stateProofParams&&$t.push(TransactionType.stpf),_e.heartbeatParams&&$t.push(TransactionType.hb),$t.length!==1)throw new Error(`Transaction has wrong number of type fields present (${$t.length}): ${$t}`);if(this.type!==$t[0])throw new Error(`Transaction has type ${this.type} but fields present for ${$t[0]}`);if(_e.paymentParams&&(this.payment={receiver:ensureAddress(_e.paymentParams.receiver),amount:ensureUint64(_e.paymentParams.amount),closeRemainderTo:optionalAddress(_e.paymentParams.closeRemainderTo)}),_e.keyregParams){if(this.keyreg={voteKey:getKeyregKey(_e.keyregParams.voteKey,"voteKey",KEYREG_VOTE_KEY_LENGTH),selectionKey:getKeyregKey(_e.keyregParams.selectionKey,"selectionKey",KEYREG_SELECTION_KEY_LENGTH),stateProofKey:getKeyregKey(_e.keyregParams.stateProofKey,"stateProofKey",KEYREG_STATE_PROOF_KEY_LENGTH),voteFirst:optionalUint64(_e.keyregParams.voteFirst),voteLast:optionalUint64(_e.keyregParams.voteLast),voteKeyDilution:optionalUint64(_e.keyregParams.voteKeyDilution),nonParticipation:ensureBoolean(_e.keyregParams.nonParticipation??!1)},this.keyreg.nonParticipation&&(this.keyreg.voteKey||this.keyreg.selectionKey||this.keyreg.stateProofKey||typeof this.keyreg.voteFirst<"u"||typeof this.keyreg.voteLast<"u"||typeof this.keyreg.voteKeyDilution<"u"))throw new Error("nonParticipation is true but participation params are present.");if(!this.keyreg.nonParticipation&&(this.keyreg.voteKey||this.keyreg.selectionKey||this.keyreg.stateProofKey||typeof this.keyreg.voteFirst<"u"||typeof this.keyreg.voteLast<"u"||typeof this.keyreg.voteKeyDilution<"u")&&!(this.keyreg.voteKey&&this.keyreg.selectionKey&&typeof this.keyreg.voteFirst<"u"&&typeof this.keyreg.voteLast<"u"&&typeof this.keyreg.voteKeyDilution<"u"))throw new Error("Online key registration missing at least one of the following fields: voteKey, selectionKey, voteFirst, voteLast, voteKeyDilution")}if(_e.assetConfigParams&&(this.assetConfig={assetIndex:ensureUint64(_e.assetConfigParams.assetIndex??0),total:ensureUint64(_e.assetConfigParams.total??0),decimals:ensureSafeUnsignedInteger(_e.assetConfigParams.decimals??0),defaultFrozen:ensureBoolean(_e.assetConfigParams.defaultFrozen??!1),manager:optionalAddress(_e.assetConfigParams.manager),reserve:optionalAddress(_e.assetConfigParams.reserve),freeze:optionalAddress(_e.assetConfigParams.freeze),clawback:optionalAddress(_e.assetConfigParams.clawback),unitName:_e.assetConfigParams.unitName,assetName:_e.assetConfigParams.assetName,assetURL:_e.assetConfigParams.assetURL,assetMetadataHash:optionalFixedLe
1504ngthByteArray(_e.assetConfigParams.assetMetadataHash,ASSET_METADATA_HASH_LENGTH,"assetMetadataHash")}),_e.assetTransferParams&&(this.assetTransfer={assetIndex:ensureUint64(_e.assetTransferParams.assetIndex),amount:ensureUint64(_e.assetTransferParams.amount),assetSender:optionalAddress(_e.assetTransferParams.assetSender),receiver:ensureAddress(_e.assetTransferParams.receiver),closeRemainderTo:optionalAddress(_e.assetTransferParams.closeRemainderTo)}),_e.assetFreezeParams&&(this.assetFreeze={assetIndex:ensureUint64(_e.assetFreezeParams.assetIndex),freezeAccount:ensureAddress(_e.assetFreezeParams.freezeTarget),frozen:ensureBoolean(_e.assetFreezeParams.frozen)}),_e.appCallParams){const{onComplete:Vt}=_e.appCallParams;if(!isOnApplicationComplete(Vt))throw new Error(`Invalid onCompletion value: ${Vt}`);this.applicationCall={appIndex:ensureUint64(_e.appCallParams.appIndex),onComplete:Vt,numLocalInts:ensureSafeUnsignedInteger(_e.appCallParams.numLocalInts??0),numLocalByteSlices:ensureSafeUnsignedInteger(_e.appCallParams.numLocalByteSlices??0),numGlobalInts:ensureSafeUnsignedInteger(_e.appCallParams.numGlobalInts??0),numGlobalByteSlices:ensureSafeUnsignedInteger(_e.appCallParams.numGlobalByteSlices??0),extraPages:ensureSafeUnsignedInteger(_e.appCallParams.extraPages??0),approvalProgram:ensureUint8Array(_e.appCallParams.approvalProgram??new Uint8Array),clearProgram:ensureUint8Array(_e.appCallParams.clearProgram??new Uint8Array),appArgs:ensureArray(_e.appCallParams.appArgs??[]).map(ensureUint8Array),accounts:ensureArray(_e.appCallParams.accounts??[]).map(ensureAddress),foreignApps:ensureArray(_e.appCallParams.foreignApps??[]).map(ensureUint64),foreignAssets:ensureArray(_e.appCallParams.foreignAssets??[]).map(ensureUint64),boxes:ensureArray(_e.appCallParams.boxes??[]).map(ensureBoxReference)}}if(_e.stateProofParams&&(this.stateProof={stateProofType:ensureSafeUnsignedInteger(_e.stateProofParams.stateProofType??0),stateProof:_e.stateProofParams.stateProof,message:_e.stateProofParams.message}),_e.heartbeatParams&&(this.heartbeat=new Heartbeat({address:_e.heartbeatParams.address,proof:_e.heartbeatParams.proof,seed:_e.heartbeatParams.seed,voteID:_e.heartbeatParams.voteID,keyDilution:_e.heartbeatParams.keyDilution})),this.fee=ensureUint64(_e.suggestedParams.fee),!ensureBoolean(_e.suggestedParams.flatFee??!1)){const Vt=ensureUint64(_e.suggestedParams.minFee);this.fee*=BigInt(this.estimateSize()),this.fee<Vt&&(this.fee=Vt)}}getEncodingSchema(){return Eo.encodingSchema}toEncodingData(){const _e=new Map([["type",this.type],["fv",this.firstValid],["lv",this.lastValid],["snd",this.sender],["gen",this.genesisID],["gh",this.genesisHash],["fee",this.fee],["note",this.note],["lx",this.lease],["rekey",this.rekeyTo],["grp",this.group]]);if(this.payment)return _e.set("amt",this.payment.amount),_e.set("rcv",this.payment.receiver),_e.set("close",this.payment.closeRemainderTo),_e;if(this.keyreg)return _e.set("votekey",this.keyreg.voteKey),_e.set("selkey",this.keyreg.selectionKey),_e.set("sprfkey",this.keyreg.stateProofKey),_e.set("votefst",this.keyreg.voteFirst),_e.set("votelst",this.keyreg.voteLast),_e.set("votekd",this.keyreg.voteKeyDilution),_e.set("nonpart",this.keyreg.nonParticipation),_e;if(this.assetConfig){_e.set("caid",this.assetConfig.assetIndex);const $t=new Map([["t",this.assetConfig.total],["dc",this.assetConfig.decimals],["df",this.assetConfig.defaultFrozen],["m",this.assetConfig.manager],["r",this.assetConfig.reserve],["f",this.assetConfig.freeze],["c",this.assetConfig.clawback],["un",this.assetConfig.unitName],["an",this.assetConfig.assetName],["au",this.assetConfig.assetURL],["am",this.assetConfig.assetMetadataHash]]);return _e.set("apar",$t),_e}if(this.assetTransfer)return _e.set("xaid",this.assetTransfer.assetIndex),_e.set("aamt",this.assetTransfer.amount),_e.set("arcv",this.assetTransfer.receiver),_e.set("aclose",this.assetTransfer.closeRemainderTo),_e.set("asnd",this.assetTransfer.assetSender),_e;if(this.assetFreeze)return _e.set("faid",this.assetFreeze.assetIndex),_e.set("afrz",this.assetFreeze.frozen),_e.set("fadd",this.assetFreeze.freezeAccount),_e;if(this.applicationCall)return _e.set("apid",this.applicationCall.appIndex),_e.set("apan",this.applicationCall.onComplete),_e.set("apaa",this.applicationCall.appArgs),_e.set("apat",this.applicationCall.accounts),_e.set("apas",this.applicationCall.foreignAssets),_e.set("apfa",this.applicationCall.foreignApps),_e.set("apbx",boxReferencesToEncodingData(this.applicationCall.boxes,this.applicationCall.foreignApps,this.applicationCall.appIndex)),_e.set("apap",this.applicationCall.approvalProgram),_e.set("apsu",this.applicationCall.clearProgram),_e.set("apls",new Map([["nui",this.applicationCall.numLocalInts],["nbs",this.applicationCall.numLocalByteSlices]])),_e.set("apgs",new Map([["nui",this.applicationCall.numGlobalInts],["nbs",this.applicationCall.numGlobalByteSlices]])),_e.set("apep",this.applicationCall.extraPages),_e;if(this.stateProof)return _e.set("sptype",this.stateProof.stateProofType),_e.set("sp",this.stateProof.stateProof?this.stateProof.stateProof.toEncodingData():void 0),_e.set("spmsg",this.stateProof.message?this.stateProof.message.toEncodingData():void 0),_e;if(this.heartbeat){const $t=new Heartbeat({address:this.heartbeat.address,proof:this.heartbeat.proof,seed:this.heartbeat.seed,voteID:this.heartbeat.voteID,keyDilution:this.heartbeat.keyDilution});return _e.set("hb",$t.toEncodingData()),_e}throw new Error(`Unexpected transaction type: ${this.type}`)}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded logic sig account: ${_e}`);const $t={minFee:BigInt(0),flatFee:!0,fee:_e.get("fee")??0,firstValid:_e.get("fv")??0,lastValid:_e.get("lv")??0,genesisHash:_e.get("gh"),genesisID:_e.get("gen")},Ft=_e.get("type");if(!isTransactionType(Ft))throw new Error(`Unrecognized transaction type: ${Ft}`);const Vt={type:Ft,sender:_e.get("snd")??Address.zeroAddress(),note:_e.get("note"),lease:_e.get("lx"),suggestedParams:$t};if(_e.get("rekey")&&(Vt.rekeyTo=_e.get("rekey")),Vt.type===TransactionType.pay){const zt
1504={amount:_e.get("amt")??0,receiver:_e.get("rcv")??Address.zeroAddress()};_e.get("close")&&(zt.closeRemainderTo=_e.get("close")),Vt.paymentParams=zt}else if(Vt.type===TransactionType.keyreg){const zt={voteKey:_e.get("votekey"),selectionKey:_e.get("selkey"),stateProofKey:_e.get("sprfkey"),voteFirst:_e.get("votefst"),voteLast:_e.get("votelst"),voteKeyDilution:_e.get("votekd"),nonParticipation:_e.get("nonpart")};Vt.keyregParams=zt}else if(Vt.type===TransactionType.acfg){const zt={assetIndex:_e.get("caid")};if(_e.get("apar")){const Ht=_e.get("apar");zt.total=Ht.get("t"),zt.decimals=Ht.get("dc"),zt.defaultFrozen=Ht.get("df"),zt.unitName=Ht.get("un"),zt.assetName=Ht.get("an"),zt.assetURL=Ht.get("au"),zt.assetMetadataHash=Ht.get("am"),Ht.get("m")&&(zt.manager=Ht.get("m")),Ht.get("r")&&(zt.reserve=Ht.get("r")),Ht.get("f")&&(zt.freeze=Ht.get("f")),Ht.get("c")&&(zt.clawback=Ht.get("c"))}Vt.assetConfigParams=zt}else if(Vt.type===TransactionType.axfer){const zt={assetIndex:_e.get("xaid")??0,amount:_e.get("aamt")??0,receiver:_e.get("arcv")??Address.zeroAddress()};_e.get("aclose")&&(zt.closeRemainderTo=_e.get("aclose")),_e.get("asnd")&&(zt.assetSender=_e.get("asnd")),Vt.assetTransferParams=zt}else if(Vt.type===TransactionType.afrz){const zt={assetIndex:_e.get("faid")??0,freezeTarget:_e.get("fadd")??Address.zeroAddress(),frozen:_e.get("afrz")??!1};Vt.assetFreezeParams=zt}else if(Vt.type===TransactionType.appl){const zt={appIndex:_e.get("apid")??0,onComplete:ensureSafeUnsignedInteger(_e.get("apan")??0),appArgs:_e.get("apaa"),accounts:_e.get("apat"),foreignAssets:_e.get("apas"),foreignApps:_e.get("apfa"),approvalProgram:_e.get("apap"),clearProgram:_e.get("apsu"),extraPages:_e.get("apep")},Ht=_e.get("apls");Ht&&(zt.numLocalInts=Ht.get("nui"),zt.numLocalByteSlices=Ht.get("nbs"));const Kt=_e.get("apgs");Kt&&(zt.numGlobalInts=Kt.get("nui"),zt.numGlobalByteSlices=Kt.get("nbs"));const Gt=_e.get("apbx");Gt&&(zt.boxes=Gt.map(Jt=>{const Xt=ensureSafeUnsignedInteger(Jt.get("i")??0),Zt=ensureUint8Array(Jt.get("n")??new Uint8Array);if(Xt===0)return{appIndex:0,name:Zt};if(!zt.foreignApps||Xt>zt.foreignApps.length)throw new Error(`Cannot find foreign app index ${Xt} in ${zt.foreignApps}`);return{appIndex:zt.foreignApps[Xt-1],name:Zt}})),Vt.appCallParams=zt}else if(Vt.type===TransactionType.stpf){const zt={stateProofType:_e.get("sptype"),stateProof:_e.get("sp")?StateProof$2.fromEncodingData(_e.get("sp")):void 0,message:_e.get("spmsg")?StateProofMessage$1.fromEncodingData(_e.get("spmsg")):void 0};Vt.stateProofParams=zt}else if(Vt.type===TransactionType.hb){const zt=Heartbeat.fromEncodingData(_e.get("hb")),Ht={address:zt.address,proof:zt.proof,seed:zt.seed,voteID:zt.voteID,keyDilution:zt.keyDilution};Vt.heartbeatParams=Ht}else{const zt=Vt.type;throw new Error(`Unexpected transaction type: ${zt}`)}const qt=new Eo(Vt);if(_e.get("grp")){const zt=ensureUint8Array(_e.get("grp"));if(zt.byteLength!==ALGORAND_TRANSACTION_GROUP_LENGTH)throw new Error(`Invalid group length: ${zt.byteLength}`);qt.group=zt}return qt}estimateSize(){return this.toByte().length+NUM_ADDL_BYTES_AFTER_SIGNING}bytesToSign(){const _e=this.toByte();return concatArrays$1(TX_TAG,_e)}toByte(){return encodeMsgpack(this)}rawSignTxn(_e){const $t=this.bytesToSign();return sign($t,_e)}signTxn(_e){const $t=keyPairFromSecretKey(_e),Ft=new Address($t.publicKey),Vt=this.rawSignTxn(_e);return this.attachSignature(Ft,Vt)}attachSignature(_e,$t){if(!isValidSignatureLength($t.length))throw new Error("Invalid signature length");const Ft=new Map([["sig",$t],["txn",this.toEncodingData()]]),Vt=ensureAddress(_e);this.sender.equals(Vt)||Ft.set("sgnr",Vt);const qt=new NamedMapSchema(allOmitEmpty([{key:"txn",valueSchema:Eo.encodingSchema},{key:"sig",valueSchema:new FixedLengthByteArraySchema(64)},{key:"sgnr",valueSchema:new OptionalSchema(new AddressSchema)}]));return msgpackRawEncode(qt.prepareMsgpack(Ft))}rawTxID(){const _e=this.toByte(),$t=concatArrays$1(TX_TAG,_e);return Uint8Array.from(genericHash($t))}txID(){const _e=this.rawTxID();return base32.encode(_e).slice(0,ALGORAND_TRANSACTION_LENGTH)}};Transaction$1.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"type",valueSchema:new StringSchema},{key:"snd",valueSchema:new AddressSchema},{key:"lv",valueSchema:new Uint64Schema},{key:"gen",valueSchema:new OptionalSchema(new StringSchema)}
1504,{key:"gh",valueSchema:new OptionalSchema(new FixedLengthByteArraySchema(32))},{key:"fee",valueSchema:new Uint64Schema},{key:"fv",valueSchema:new Uint64Schema},{key:"note",valueSchema:new ByteArraySchema},{key:"lx",valueSchema:new OptionalSchema(new FixedLengthByteArraySchema(32))},{key:"rekey",valueSchema:new OptionalSchema(new AddressSchema)},{key:"grp",valueSchema:new OptionalSchema(new FixedLengthByteArraySchema(32))},{key:"amt",valueSchema:new OptionalSchema(new Uint64Schema)},{key:"rcv",valueSchema:new OptionalSchema(new AddressSchema)},{key:"close",valueSchema:new OptionalSchema(new AddressSchema)},{key:"votekey",valueSchema:new OptionalSchema(new FixedLengthByteArraySchema(32))},{key:"selkey",valueSchema:new OptionalSchema(new FixedLengthByteArraySchema(32))},{key:"sprfkey",valueSchema:new OptionalSchema(new FixedLengthByteArraySchema(64))},{key:"votefst",valueSchema:new OptionalSchema(new Uint64Schema)},{key:"votelst",valueSchema:new OptionalSchema(new Uint64Schema)},{key:"votekd",valueSchema:new OptionalSchema(new Uint64Schema)},{key:"nonpart",valueSchema:new OptionalSchema(new BooleanSchema)},{key:"caid",valueSchema:new OptionalSchema(new Uint64Schema)},{key:"apar",valueSchema:new OptionalSchema(new NamedMapSchema(allOmitEmpty([{key:"t",valueSchema:new Uint64Schema},{key:"dc",valueSchema:new Uint64Schema},{key:"df",valueSchema:new BooleanSchema},{key:"m",valueSchema:new OptionalSchema(new AddressSchema)},{key:"r",valueSchema:new OptionalSchema(new AddressSchema)},{key:"f",valueSchema:new OptionalSchema(new AddressSchema)},{key:"c",valueSchema:new OptionalSchema(new AddressSchema)},{key:"un",valueSchema:new OptionalSchema(new StringSchema)},{key:"an",valueSchema:new OptionalSchema(new StringSchema)},{key:"au",valueSchema:new OptionalSchema(new StringSchema)},{key:"am",valueSchema:new OptionalSchema(new FixedLengthByteArraySchema(32))}])))},{key:"xaid",valueSchema:new OptionalSchema(new Uint64Schema)},{key:"aamt",valueSchema:new OptionalSchema(new Uint64Schema)},{key:"arcv",valueSchema:new OptionalSchema(new AddressSchema)},{key:"aclose",valueSchema:new OptionalSchema(new AddressSchema)},{key:"asnd",valueSchema:new OptionalSchema(new AddressSchema)},{key:"faid",valueSchema:new OptionalSchema(new Uint64Schema)},{key:"afrz",valueSchema:new OptionalSchema(new BooleanSchema)},{key:"fadd",valueSchema:new OptionalSchema(new AddressSchema)},{key:"apid",valueSchema:new OptionalSchema(new Uint64Schema)},{key:"apan",valueSchema:new OptionalSchema(new Uint64Schema)},{key:"apaa",valueSchema:new OptionalSchema(new ArraySchema(new ByteArraySchema))},{key:"apat",valueSchema:new OptionalSchema(new ArraySchema(new AddressSchema))},{key:"apas",valueSchema:new OptionalSchema(new ArraySchema(new Uint64Schema))},{key:"apfa",valueSchema:new OptionalSchema(new ArraySchema(new Uint64Schema))},{key:"apbx",valueSchema:new OptionalSchema(new ArraySchema(new NamedMapSchema(allOmitEmpty([{key:"i",valueSchema:new Uint64Schema},{key:"n",valueSchema:new ByteArraySchema}]))))},{key:"apap",valueSchema:new OptionalSchema(new ByteArraySchema)},{key:"apsu",valueSchema:new OptionalSchema(new ByteArraySchema)},{key:"apls",valueSchema:new OptionalSchema(new NamedMapSchema(allOmitEmpty([{key:"nui",valueSchema:new Uint64Schema},{key:"nbs",valueSchema:new Uint64Schema}])))},{key:"apgs",valueSchema:new OptionalSchema(new NamedMapSchema(allOmitEmpty([{key:"nui",valueSchema:new Uint64Schema},{key:"nbs",valueSchema:new Uint64Schema}])))},{key:"apep",valueSchema:new OptionalSchema(new Uint64Schema)},{key:"sptype",valueSchema:new OptionalSchema(new Uint64Schema)},{key:"sp",valueSchema:new OptionalSchema(StateProof$2.encodingSchema)},{key:"spmsg",valueSchema:new OptionalSchema(StateProofMessage$1.encodingSchema)},{key:"hb",valueSchema:new OptionalSchema(Heartbeat.encodingSchema)}]));function encodeUnsignedTransaction(yt){return encodeMsgpack(yt)}function decodeUnsignedTransaction(yt){return decodeMsgpack(yt,Transaction$1)}const MULTISIG_PREIMG2ADDR_PREFIX=new Uint8Array([77,117,108,116,105,115,105,103,65,100,100,114]),INVALID_MSIG_VERSION_ERROR_MSG="invalid multisig version",INVALID_MSIG_THRESHOLD_ERROR_MSG="bad multisig threshold",INVALID_MSIG_PK_ERROR_MSG="bad multisig public key - wrong length",UNEXPECTED_PK_LEN_ERROR_MSG="nacl public key length is not 32 bytes";function pksFromAddresses(yt){return yt.map(_e=>typeof _e=="string"?Address.fromString(_e).publicKey:_e.publicKey)}
1504function addressFromMultisigPreImg({version:yt,threshold:_e,pks:$t}){if(yt!==1||yt>255||yt<0)throw new Error(INVALID_MSIG_VERSION_ERROR_MSG);if(_e===0||$t.length===0||_e>$t.length||_e>255)throw new Error(INVALID_MSIG_THRESHOLD_ERROR_MSG);const Ft=ALGORAND_ADDRESS_BYTE_LENGTH-ALGORAND_CHECKSUM_BYTE_LENGTH;if(Ft!==PUBLIC_KEY_LENGTH)throw new Error(UNEXPECTED_PK_LEN_ERROR_MSG);const Vt=new Uint8Array(MULTISIG_PREIMG2ADDR_PREFIX.length+2+Ft*$t.length);Vt.set(MULTISIG_PREIMG2ADDR_PREFIX,0),Vt.set([yt],MULTISIG_PREIMG2ADDR_PREFIX.length),Vt.set([_e],MULTISIG_PREIMG2ADDR_PREFIX.length+1);for(let qt=0;qt<$t.length;qt++){if($t[qt].length!==Ft)throw new Error(INVALID_MSIG_PK_ERROR_MSG);Vt.set($t[qt],MULTISIG_PREIMG2ADDR_PREFIX.length+2+qt*Ft)}return new Address(Uint8Array.from(genericHash(Vt)))}function addressFromMultisigPreImgAddrs({version:yt,threshold:_e,addrs:$t}){const Ft=pksFromAddresses($t);return addressFromMultisigPreImg({version:yt,threshold:_e,pks:Ft})}function verifyMultisig(yt,_e,$t){const Ft=_e.v,Vt=_e.thr,qt=_e.subsig,zt=qt.map(Jt=>Jt.pk);if(_e.subsig.length<Vt)return!1;let Ht;try{Ht=addressFromMultisigPreImg({version:Ft,threshold:Vt,pks:zt}).publicKey}catch{return!1}if(!arrayEqual(Ht,$t))return!1;let Kt=0;for(const Jt of qt)Jt.s!==void 0&&(Kt+=1);if(Kt<Vt)return!1;let Gt=0;for(const Jt of qt)Jt.s!==void 0&&verify(yt,Jt.s,Jt.pk)&&(Gt+=1);return!(Gt<Vt)}function multisigAddress({version:yt,threshold:_e,addrs:$t}){return addressFromMultisigPreImgAddrs({version:yt,threshold:_e,addrs:$t})}const ENCODED_SUBSIG_SCHEMA=new NamedMapSchema(allOmitEmpty([{key:"pk",valueSchema:new FixedLengthByteArraySchema(32)},{key:"s",valueSchema:new OptionalSchema(new FixedLengthByteArraySchema(64))}]));function encodedSubsigFromEncodingData(yt){if(!(yt instanceof Map))throw new Error(`Invalid decoded EncodedSubsig: ${yt}`);const _e={pk:yt.get("pk")};return yt.get("s")&&(_e.s=yt.get("s")),_e}function encodedSubsigToEncodingData(yt){const _e=new Map([["pk",yt.pk]]);return yt.s&&_e.set("s",yt.s),_e}const ENCODED_MULTISIG_SCHEMA=new NamedMapSchema(allOmitEmpty([{key:"v",valueSchema:new Uint64Schema},{key:"thr",valueSchema:new Uint64Schema},{key:"subsig",valueSchema:new ArraySchema(ENCODED_SUBSIG_SCHEMA)}]));function encodedMultiSigFromEncodingData(yt){if(!(yt instanceof Map))throw new Error(`Invalid decoded EncodedMultiSig: ${yt}`);return{v:ensureSafeUnsignedInteger(yt.get("v")),thr:ensureSafeUnsignedInteger(yt.get("thr")),subsig:yt.get("subsig").map(encodedSubsigFromEncodingData)}}function encodedMultiSigToEncodingData(yt){return new Map([["v",yt.v],["thr",yt.thr],["subsig",yt.subsig.map(encodedSubsigToEncodingData)]])}const base64regex=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;function sanityCheckProgram(yt){if(!yt||yt.length===0)throw new Error("empty program");const _e=10,$t=32,Ft=126,Vt=zt=>$t<=zt&&zt<=Ft;if(yt.every(zt=>zt===_e||Vt(zt))){const zt=new TextDecoder().decode(yt);throw isValidAddress$1(zt)?new Error("requesting program bytes, get Algorand address"):base64regex.test(zt)?new Error("program should not be b64 encoded"):new Error("program bytes are all ASCII printable characters, not looking like Teal byte code")}}const programTag=new TextEncoder().encode("Program");class LogicSig{constructor(_e,$t){if($t&&(!Array.isArray($t)||!$t.every(Vt=>Vt.constructor===Uint8Array)))throw new TypeError("Invalid arguments");let Ft=[];$t!=null&&(Ft=$t.map(Vt=>new Uint8Array(Vt))),sanityCheckProgram(_e),this.logic=_e,this.args=Ft,this.sig=void 0,this.msig=void 0}getEncodingSchema(){return LogicSig.encodingSchema}toEncodingData(){const _e=new Map([["l",this.logic],["arg",this.args],["sig",this.sig]]);return this.msig&&_e.set("msig",encodedMultiSigToEncodingData(this.msig)),_e}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded logic sig: ${_e}`);const $t=new LogicSig(_e.get("l"),_e.get("arg"));return $t.sig=_e.get("sig"),_e.get("msig")&&($t.msig=encodedMultiSigFromEncodingData(_e.get("msig"))),$t}verify(_e){if(this.sig&&this.msig)return!1;try{sanityCheckProgram(this.logic)}catch{return!1}const $t=concatArrays$1(programTag,this.logic);if(!this.sig&&!this.msig){const Ft=genericHash($t);return arrayEqual(Ft,_e)}
1504return this.sig?verify($t,this.sig,_e):verifyMultisig($t,this.msig,_e)}address(){const _e=concatArrays$1(programTag,this.logic),$t=genericHash(_e);return new Address(Uint8Array.from($t))}sign(_e,$t){if($t==null)this.sig=this.signProgram(_e);else{const Ft=pksFromAddresses($t.addrs).map(zt=>({pk:zt}));this.msig={v:$t.version,thr:$t.threshold,subsig:Ft};const[Vt,qt]=this.singleSignMultisig(_e,this.msig);this.msig.subsig[qt].s=Vt}}appendToMultisig(_e){if(this.msig===void 0)throw new Error("no multisig present");const[$t,Ft]=this.singleSignMultisig(_e,this.msig);this.msig.subsig[Ft].s=$t}signProgram(_e){const $t=concatArrays$1(programTag,this.logic);return sign($t,_e)}singleSignMultisig(_e,$t){let Ft=-1;const Vt=keyPairFromSecretKey(_e).publicKey;for(let zt=0;zt<$t.subsig.length;zt++){const{pk:Ht}=$t.subsig[zt];if(arrayEqual(Ht,Vt)){Ft=zt;break}}if(Ft===-1)throw new Error("invalid secret key");return[this.signProgram(_e),Ft]}toByte(){return encodeMsgpack(this)}static fromByte(_e){return decodeMsgpack(_e,LogicSig)}}LogicSig.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"l",valueSchema:new ByteArraySchema},{key:"arg",valueSchema:new ArraySchema(new ByteArraySchema)},{key:"sig",valueSchema:new OptionalSchema(new FixedLengthByteArraySchema(64))},{key:"msig",valueSchema:new OptionalSchema(ENCODED_MULTISIG_SCHEMA)}]));class LogicSigAccount{constructor(_e,$t){this.lsig=new LogicSig(_e,$t),this.sigkey=void 0}getEncodingSchema(){return LogicSigAccount.encodingSchema}toEncodingData(){return new Map([["lsig",this.lsig.toEncodingData()],["sigkey",this.sigkey]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded logic sig account: ${_e}`);const $t=_e,Ft=LogicSig.fromEncodingData($t.get("lsig")),Vt=new LogicSigAccount(Ft.logic,Ft.args);return Vt.lsig=Ft,Vt.sigkey=$t.get("sigkey"),Vt}toByte(){return encodeMsgpack(this)}static fromByte(_e){return decodeMsgpack(_e,LogicSigAccount)}isDelegated(){return!!(this.lsig.sig||this.lsig.msig)}verify(){const _e=this.address();return this.lsig.verify(_e.publicKey)}address(){if(this.lsig.sig&&this.lsig.msig)throw new Error("LogicSig has too many signatures. At most one of sig or msig may be present");if(this.lsig.sig){if(!this.sigkey)throw new Error("Signing key for delegated account is missing");return new Address(this.sigkey)}if(this.lsig.msig){const _e={version:this.lsig.msig.v,threshold:this.lsig.msig.thr,pks:this.lsig.msig.subsig.map($t=>$t.pk)};return addressFromMultisigPreImg(_e)}return this.lsig.address()}signMultisig(_e,$t){this.lsig.sign($t,_e)}appendToMultisig(_e){this.lsig.appendToMultisig(_e)}sign(_e){this.lsig.sign(_e),this.sigkey=keyPairFromSecretKey(_e).publicKey}}LogicSigAccount.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"lsig",valueSchema:LogicSig.encodingSchema},{key:"sigkey",valueSchema:new OptionalSchema(new FixedLengthByteArraySchema(32))}]));function logicSigFromByte(yt){return decodeMsgpack(yt,LogicSig)}const SIGN_PROGRAM_DATA_PREFIX=new TextEncoder().encode("ProgData");function tealSign(yt,_e,$t){const Ft=typeof $t=="string"?Address.fromString($t):$t,Vt=concatArrays$1(Ft.publicKey,_e),qt=concatArrays$1(SIGN_PROGRAM_DATA_PREFIX,Vt);return sign(qt,yt)}function verifyTealSign(yt,_e,$t,Ft){const Vt=typeof _e=="string"?Address.fromString(_e):_e,qt=concatArrays$1(Vt.publicKey,yt),zt=concatArrays$1(SIGN_PROGRAM_DATA_PREFIX,qt);return verify(zt,$t,Ft)}function tealSignFromProgram(yt,_e,$t){const Vt=new LogicSig($t).address();return tealSign(yt,_e,Vt)}class SignedTransaction{constructor({txn:_e,sig:$t,msig:Ft,lsig:Vt,sgnr:qt}){this.txn=_e,this.sig=$t,this.msig=Ft,this.lsig=Vt,this.sgnr=qt;let zt=0;if($t&&(zt+=1),Ft&&(zt+=1),Vt&&(zt+=1),zt>1)throw new Error(`SignedTransaction must not have more than 1 signature. Got ${zt}`)}getEncodingSchema(){return SignedTransaction.encodingSchema}toEncodingData(){return new Map([["txn",this.txn.toEncodingData()],["sig",this.sig],["msig",this.msig?encodedMultiSigToEncodingData(this.msig):void 0],["lsig",this.lsig?this.lsig.toEncodingData():void 0],["sgnr",this.sgnr]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded SignedTransaction: ${_e}`);return new SignedTransaction({txn:Transaction$1.fromEncodingData(_e.get("txn")),sig:_e.get("sig"),msig:_e.get("msig")?encodedMultiSigFromEncodingData(_e.get("msig")):void 0,lsig:_e.get("lsig")?LogicSig.fromEncodingData(_e.get("lsig")):void 0,sgnr:_e.get("sgnr")})}}SignedTransaction.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"txn",valueSchema:Transaction$1.encodingSchema}
1504,{key:"sig",valueSchema:new OptionalSchema(new FixedLengthByteArraySchema(64))},{key:"msig",valueSchema:new OptionalSchema(ENCODED_MULTISIG_SCHEMA)},{key:"lsig",valueSchema:new OptionalSchema(LogicSig.encodingSchema)},{key:"sgnr",valueSchema:new OptionalSchema(new AddressSchema)}]));function decodeSignedTransaction(yt){return decodeMsgpack(yt,SignedTransaction)}function encodeUnsignedSimulateTransaction(yt){const _e=new SignedTransaction({txn:yt});return encodeMsgpack(_e)}class StateProofTrackingData{constructor(_e){this.stateProofVotersCommitment=_e.stateProofVotersCommitment,this.stateProofOnlineTotalWeight=_e.stateProofOnlineTotalWeight,this.stateProofNextRound=_e.stateProofNextRound}getEncodingSchema(){return StateProofTrackingData.encodingSchema}toEncodingData(){return new Map([["v",this.stateProofVotersCommitment],["t",this.stateProofOnlineTotalWeight],["n",this.stateProofNextRound]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded StateProofTrackingData: ${_e}`);return new StateProofTrackingData({stateProofVotersCommitment:_e.get("v"),stateProofOnlineTotalWeight:_e.get("t"),stateProofNextRound:_e.get("n")})}}StateProofTrackingData.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"v",valueSchema:new ByteArraySchema},{key:"t",valueSchema:new Uint64Schema},{key:"n",valueSchema:new Uint64Schema}]));class TxnCommitments{constructor(_e){this.nativeSha512_256Commitment=_e.nativeSha512_256Commitment,this.sha256Commitment=_e.sha256Commitment}getEncodingSchema(){return TxnCommitments.encodingSchema}toEncodingData(){return new Map([["txn",this.nativeSha512_256Commitment],["txn256",this.sha256Commitment]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TxnCommitments: ${_e}`);return new TxnCommitments({nativeSha512_256Commitment:_e.get("txn"),sha256Commitment:_e.get("txn256")})}}TxnCommitments.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"txn",valueSchema:new FixedLengthByteArraySchema(32)},{key:"txn256",valueSchema:new FixedLengthByteArraySchema(32)}]));class RewardState{constructor(_e){this.feeSink=_e.feeSink,this.rewardsPool=_e.rewardsPool,this.rewardsLevel=_e.rewardsLevel,this.rewardsRate=_e.rewardsRate,this.rewardsResidue=_e.rewardsResidue,this.rewardsRecalculationRound=_e.rewardsRecalculationRound}getEncodingSchema(){return RewardState.encodingSchema}toEncodingData(){return new Map([["fees",this.feeSink],["rwd",this.rewardsPool],["earn",this.rewardsLevel],["rate",this.rewardsRate],["frac",this.rewardsResidue],["rwcalr",this.rewardsRecalculationRound]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded RewardState: ${_e}`);return new RewardState({feeSink:_e.get("fees"),rewardsPool:_e.get("rwd"),rewardsLevel:_e.get("earn"),rewardsRate:_e.get("rate"),rewardsResidue:_e.get("frac"),rewardsRecalculationRound:_e.get("rwcalr")})}}RewardState.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"fees",valueSchema:new AddressSchema},{key:"rwd",valueSchema:new AddressSchema},{key:"earn",valueSchema:new Uint64Schema},{key:"rate",valueSchema:new Uint64Schema},{key:"frac",valueSchema:new Uint64Schema},{key:"rwcalr",valueSchema:new Uint64Schema}]));class UpgradeState{constructor(_e){this.currentProtocol=_e.currentProtocol,this.nextProtocol=_e.nextProtocol,this.nextProtocolApprovals=_e.nextProtocolApprovals,this.nextProtocolVoteBefore=_e.nextProtocolVoteBefore,this.nextProtocolSwitchOn=_e.nextProtocolSwitchOn}getEncodingSchema(){return UpgradeState.encodingSchema}toEncodingData(){return new Map([["proto",this.currentProtocol],["nextproto",this.nextProtocol],["nextyes",this.nextProtocolApprovals],["nextbefore",this.nextProtocolVoteBefore],["nextswitch",this.nextProtocolSwitchOn]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded UpgradeState: ${_e}`);return new UpgradeState({currentProtocol:_e.get("proto"),nextProtocol:_e.get("nextproto"),nextProtocolApprovals:_e.get("nextyes"),nextProtocolVoteBefore:_e.get("nextbefore"),nextProtocolSwitchOn:_e.get("nextswitch")})}}UpgradeState.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"proto",valueSchema:new StringSchema},{key:"nextproto",valueSchema:new StringSchema},{key:"nextyes",valueSchema:new Uint64Schema},{key:"nextbefore",valueSchema:new Uint64Schema},{key:"nextswitch",valueSchema:new Uint64Schema}]));class UpgradeVote{constructor(_e){this.upgradePropose=_e.upgradePropose,this.upgradeDelay=_e.upgradeDelay,this.upgradeApprove=_e.upgradeApprove}getEncodingSchema(){return UpgradeVote.encodingSchema}toEncodingData(){return new Map([["upgradeprop",this.upgradePropose],["upgradedelay",this.upgradeDelay],["upgradeyes",this.upgradeApprove]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded UpgradeVote: ${_e}`);return new UpgradeVote({upgradePropose:_e.get("upgradeprop"),upgradeDelay:_e.get("upgradedelay"),upgradeApprove:_e.get("upgradeyes")})}}UpgradeVote.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"upgradeprop",valueSchema:new StringSchema},{key:"upgradedelay",valueSchema:new Uint64Schema},{key:"upgradeyes",valueSchema:new BooleanSchema}]));let ParticipationUpdates$1=class Ro{constructor(_e){this.expiredParticipationAccounts=_e.expiredParticipationAccounts,this.absentParticipationAccounts=_e.absentParticipationAccounts}getEncodingSchema(){return Ro.encodingSchema}toEncodingData(){return new Map([["partupdrmv",this.expiredParticipationAccounts],["partupdabs",this.absentParticipationAccounts]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ParticipationUpdates: ${_e}`);return new Ro({expiredParticipationAccounts:_e.get("partupdrmv"),absentParticipationAccounts:_e.get("partupdabs")})}};ParticipationUpdates$1.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"partupdrmv",valueSchema:new ArraySchema(new AddressSchema)},{key:"partupdabs",valueSchema:new ArraySchema(new AddressSchema)}]));class BlockHeader{constructor(_e){this.round=_e.round,this.branch=_e.branch,this.seed=_e.seed,this.txnCommitments=_e.txnCommitments,this.timestamp=_e.timestamp,this.genesisID=_e.genesisID,this.genesisHash=_e.genesisHash,this.proposer=_e.proposer,this.feesCollected=_e.feesCollected,this.bonus=_e.bonus,this.proposerPayout=_e.proposerPayout,this.rewardState=_e.rewardState,this.upgradeState=_e.upgradeState,this.upgradeVote=_e.upgradeVote,this.txnCounter=_e.txnCounter,this.stateproofTracking=_e.stateproofTracking,this.participationUpdates=_e.participationUpdates}getEncodingSchema(){return BlockHeader.encodingSchema}toEncodingData(){const _e=new Map([["rnd",this.round],["prev",this.branch],["seed",this.seed],["ts",this.timestamp],["gen",this.genesisID],["gh",this.genesisHash],["prp",this.proposer],["fc",this.feesCollected],["bi",this.bonus],["pp",this.proposerPayout],["tc",this.txnCounter],["spt",convertMap(this.stateproofTracking,($t,Ft)=>[$t,Ft.toEncodingData()])]]);return combineMaps(_e,this.txnCommitments.toEncodingData(),this.rewardState.toEncodingData(),this.upgradeState.toEncodingData(),this.upgradeVote.toEncodingData(),this.participationUpdates.toEncodingData())}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded BlockHeader: ${_e}`);return new BlockHeader({round:_e.get("rnd"),branch:_e.get("prev"),seed:_e.get("seed"),txnCommitments:TxnCommitments.fromEncodingData(_e),timestamp:_e.get("ts"),genesisID:_e.get("gen"),genesisHash:_e.get("gh"),proposer:_e.get("prp"),feesCollected:_e.get("fc"),bonus:_e.get("bi"),proposerPayout:_e.get("pp"),rewardState:RewardState.fromEncodingData(_e),upgradeState:UpgradeState.fromEncodingData(_e),upgradeVote:UpgradeVote.from
1504EncodingData(_e),txnCounter:_e.get("tc"),stateproofTracking:convertMap(_e.get("spt"),($t,Ft)=>[Number($t),StateProofTrackingData.fromEncodingData(Ft)]),participationUpdates:ParticipationUpdates$1.fromEncodingData(_e)})}}BlockHeader.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"rnd",valueSchema:new Uint64Schema},{key:"prev",valueSchema:new BlockHashSchema},{key:"seed",valueSchema:new ByteArraySchema},{key:"",valueSchema:TxnCommitments.encodingSchema,embedded:!0},{key:"ts",valueSchema:new Uint64Schema},{key:"gen",valueSchema:new StringSchema},{key:"gh",valueSchema:new FixedLengthByteArraySchema(32)},{key:"prp",valueSchema:new AddressSchema},{key:"fc",valueSchema:new Uint64Schema},{key:"bi",valueSchema:new Uint64Schema},{key:"pp",valueSchema:new Uint64Schema},{key:"",valueSchema:RewardState.encodingSchema,embedded:!0},{key:"",valueSchema:UpgradeState.encodingSchema,embedded:!0},{key:"",valueSchema:UpgradeVote.encodingSchema,embedded:!0},{key:"tc",valueSchema:new Uint64Schema},{key:"spt",valueSchema:new Uint64MapSchema(StateProofTrackingData.encodingSchema)},{key:"",valueSchema:ParticipationUpdates$1.encodingSchema,embedded:!0}]));class ValueDelta{constructor(_e){this.action=_e.action,this.bytes=_e.bytes,this.uint=_e.uint}getEncodingSchema(){return ValueDelta.encodingSchema}toEncodingData(){return new Map([["at",this.action],["bs",this.bytes],["ui",this.uint]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ValueDelta: ${_e}`);return new ValueDelta({action:Number(_e.get("at")),bytes:_e.get("bs"),uint:_e.get("ui")})}}ValueDelta.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"at",valueSchema:new Uint64Schema},{key:"bs",valueSchema:new SpecialCaseBinaryStringSchema},{key:"ui",valueSchema:new Uint64Schema}]));let EvalDelta$2=class To{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries(...allOmitEmpty([{key:"gd",valueSchema:new OptionalSchema(new SpecialCaseBinaryStringMapSchema(ValueDelta.encodingSchema))},{key:"ld",valueSchema:new OptionalSchema(new Uint64MapSchema(new SpecialCaseBinaryStringMapSchema(ValueDelta.encodingSchema)))},{key:"sa",valueSchema:new OptionalSchema(new ArraySchema(new AddressSchema))},{key:"lg",valueSchema:new OptionalSchema(new ArraySchema(new SpecialCaseBinaryStringSchema))},{key:"itx",valueSchema:new OptionalSchema(new ArraySchema(SignedTxnWithAD.encodingSchema))}]))),this.encodingSchemaValue}constructor(_e){this.globalDelta=_e.globalDelta??new Map,this.localDeltas=_e.localDeltas??new Map,this.sharedAccts=_e.sharedAccts??[],this.logs=_e.logs??[],this.innerTxns=_e.innerTxns??[]}getEncodingSchema(){return To.encodingSchema}toEncodingData(){return new Map([["gd",convertMap(this.globalDelta,(_e,$t)=>[_e,$t.toEncodingData()])],["ld",convertMap(this.localDeltas,(_e,$t)=>[_e,convertMap($t,(Ft,Vt)=>[Ft,Vt.toEncodingData()])])],["sa",this.sharedAccts],["lg",this.logs],["itx",this.innerTxns.map(_e=>_e.toEncodingData())]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded EvalDelta: ${_e}`);return new To({globalDelta:_e.get("gd")?convertMap(_e.get("gd"),($t,Ft)=>[$t,ValueDelta.fromEncodingData(Ft)]):void 0,localDeltas:_e.get("ld")?convertMap(_e.get("ld"),($t,Ft)=>[Number($t),convertMap(Ft,(Vt,qt)=>[Vt,ValueDelta.fromEncodingData(qt)])]):void 0,sharedAccts:_e.get("sa"),logs:_e.get("lg"),innerTxns:(_e.get("itx")??[]).map(SignedTxnWithAD.fromEncodingData)})}};class ApplyData{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries(...allOmitEmpty([{key:"ca",valueSchema:new OptionalSchema(new Uint64Schema)},{key:"aca",valueSchema:new OptionalSchema(new Uint64Schema)},{key:"rs",valueSchema:new OptionalSchema(new Uint64Schema)},{key:"rr",valueSchema:new OptionalSchema(new Uint64Schema)},{key:"rc",valueSchema:new OptionalSchema(new Uint64Schema)},{key:"dt",valueSchema:new OptionalSchema(EvalDelta$2.encodingSchema)},{key:"caid",valueSchema:new OptionalSchema(new Uint64Schema)},{key:"apid",valueSchema:new OptionalSchema(new Uint64Schema)}]))),this.encodingSchemaValue}
1504constructor(_e){this.closingAmount=_e.closingAmount,this.assetClosingAmount=_e.assetClosingAmount,this.senderRewards=_e.senderRewards,this.receiverRewards=_e.receiverRewards,this.closeRewards=_e.closeRewards,this.evalDelta=_e.evalDelta,this.configAsset=_e.configAsset,this.applicationID=_e.applicationID}getEncodingSchema(){return ApplyData.encodingSchema}toEncodingData(){return new Map([["ca",this.closingAmount],["aca",this.assetClosingAmount],["rs",this.senderRewards],["rr",this.receiverRewards],["rc",this.closeRewards],["dt",this.evalDelta?this.evalDelta.toEncodingData():void 0],["caid",this.configAsset],["apid",this.applicationID]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ApplyData: ${_e}`);return new ApplyData({closingAmount:_e.get("ca"),assetClosingAmount:_e.get("aca"),senderRewards:_e.get("rs"),receiverRewards:_e.get("rr"),closeRewards:_e.get("rc"),evalDelta:_e.get("dt")?EvalDelta$2.fromEncodingData(_e.get("dt")):void 0,configAsset:_e.get("caid"),applicationID:_e.get("apid")})}}class SignedTxnWithAD{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries(...allOmitEmpty([{key:"",valueSchema:SignedTransaction.encodingSchema,embedded:!0},{key:"",valueSchema:ApplyData.encodingSchema,embedded:!0}]))),this.encodingSchemaValue}constructor(_e){this.signedTxn=_e.signedTxn,this.applyData=_e.applyData}getEncodingSchema(){return SignedTxnWithAD.encodingSchema}toEncodingData(){return combineMaps(this.signedTxn.toEncodingData(),this.applyData.toEncodingData())}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded SignedTxnWithAD: ${_e}`);return new SignedTxnWithAD({signedTxn:SignedTransaction.fromEncodingData(_e),applyData:ApplyData.fromEncodingData(_e)})}}class SignedTxnInBlock{constructor(_e){this.signedTxn=_e.signedTxn,this.hasGenesisID=_e.hasGenesisID,this.hasGenesisHash=_e.hasGenesisHash}getEncodingSchema(){return SignedTxnInBlock.encodingSchema}toEncodingData(){const _e=new Map([["hgi",this.hasGenesisID],["hgh",this.hasGenesisHash]]);return combineMaps(_e,this.signedTxn.toEncodingData())}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded SignedTxnInBlock: ${_e}`);return new SignedTxnInBlock({signedTxn:SignedTxnWithAD.fromEncodingData(_e),hasGenesisID:_e.get("hgi"),hasGenesisHash:_e.get("hgh")})}}SignedTxnInBlock.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"",valueSchema:SignedTxnWithAD.encodingSchema,embedded:!0},{key:"hgi",valueSchema:new BooleanSchema},{key:"hgh",valueSchema:new BooleanSchema}]));let Block$2=class ko{constructor(_e){this.header=_e.header,this.payset=_e.payset}getEncodingSchema(){return ko.encodingSchema}toEncodingData(){const _e=new Map([["txns",this.payset.map($t=>$t.toEncodingData())]]);return combineMaps(_e,this.header.toEncodingData())}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded BlockHeader: ${_e}`);return new ko({header:BlockHeader.fromEncodingData(_e),payset:_e.get("txns").map(SignedTxnInBlock.fromEncodingData)})}};Block$2.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"",valueSchema:BlockHeader.encodingSchema,embedded:!0},{key:"txns",valueSchema:new ArraySchema(SignedTxnInBlock.encodingSchema)}]));class UntypedValue{constructor(_e){this.data=_e}getEncodingSchema(){return UntypedValue.encodingSchema}toEncodingData(){return this.data}static fromEncodingData(_e){return new UntypedValue(_e)}}UntypedValue.encodingSchema=new UntypedSchema;let TealValue$2=class Mo{constructor(_e){this.type=_e.type,this.bytes=_e.bytes,this.uint=_e.uint}getEncodingSchema(){return Mo.encodingSchema}toEncodingData(){return new Map([["tt",this.type],["tb",this.bytes],["ui",this.uint]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TealValue: ${_e}`);return new Mo({type:Number(_e.get("tt")),bytes:_e.get("tb"),uint:_e.get("ui")})}};TealValue$2.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"tt",valueSchema:new Uint64Schema},{key:"tb",valueSchema:new OptionalSchema(new SpecialCaseBinaryStringSchema)},{key:"ui",valueSchema:new OptionalSchema(new Uint64Schema)}]));let StateSchema$1=class Co{constructor(_e){this.numUints=_e.numUints,this.numByteSlices=_e.numByteSlices}getEncodingSchema(){return Co.encodingSchema}toEncodingData(){return new Map([["nui",this.numUints],["nbs",this.numByteSlices]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded StateSchema: ${_e}`);return new Co({numUints:Number(_e.get("nui")),numByteSlices:Number(_e.get("nbs"))})}};StateSchema$1.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"nui",valueSchema:new Uint64Schema},{key:"nbs",valueSchema:new Uint64Schema}]));class AppParams{constructor(_e){this.approvalProgram=_e.approvalProgram,this.clearStateProgram=_e.clearStateProgram,this.globalState=_e.globalState,this.localStateSchema=_e.localStateSchema,this.globalStateSchema=_e.globalStateSchema,this.extraProgramPages=_e.extraProgramPages}getEncodingSchema(){return AppParams.encodingSchema}toEncodingData(){return new Map([["approv",this.approvalProgram],["clearp",this.clearStateProgram],["gs",convertMap(this.globalState,(_e,$t)=>[_e,$t.toEncodingData()])],["lsch",this.localStateSchema.toEncodingData()],["gsch",this.globalStateSchema.toEncodingData()],["epp",this.extraProgramPages]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AppParams: ${_e}`);return new AppParams({approvalProgram:_e.get("approv"),clearStateProgram:_e.get("clearp"),globalState:convertMap(_e.get("gs"),($t,Ft)=>
1504[$t,TealValue$2.fromEncodingData(Ft)]),localStateSchema:StateSchema$1.fromEncodingData(_e.get("lsch")),globalStateSchema:StateSchema$1.fromEncodingData(_e.get("gsch")),extraProgramPages:Number(_e.get("epp"))})}}AppParams.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"approv",valueSchema:new ByteArraySchema},{key:"clearp",valueSchema:new ByteArraySchema},{key:"gs",valueSchema:new SpecialCaseBinaryStringMapSchema(TealValue$2.encodingSchema)},{key:"lsch",valueSchema:StateSchema$1.encodingSchema},{key:"gsch",valueSchema:StateSchema$1.encodingSchema},{key:"epp",valueSchema:new Uint64Schema}]));class AppLocalState{constructor(_e){this.schema=_e.schema,this.keyValue=_e.keyValue}getEncodingSchema(){return AppLocalState.encodingSchema}toEncodingData(){return new Map([["hsch",this.schema.toEncodingData()],["tkv",convertMap(this.keyValue,(_e,$t)=>[_e,$t.toEncodingData()])]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AppLocalState: ${_e}`);return new AppLocalState({schema:StateSchema$1.fromEncodingData(_e.get("hsch")),keyValue:convertMap(_e.get("tkv"),($t,Ft)=>[$t,TealValue$2.fromEncodingData(Ft)])})}}AppLocalState.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"hsch",valueSchema:StateSchema$1.encodingSchema},{key:"tkv",valueSchema:new SpecialCaseBinaryStringMapSchema(TealValue$2.encodingSchema)}]));class AppLocalStateDelta{constructor(_e){this.localState=_e.localState,this.deleted=_e.deleted}getEncodingSchema(){return AppLocalStateDelta.encodingSchema}toEncodingData(){return new Map([["LocalState",this.localState?this.localState.toEncodingData():void 0],["Deleted",this.deleted]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AppLocalStateDelta: ${_e}`);
1504return new AppLocalStateDelta({localState:_e.get("LocalState")?AppLocalState.fromEncodingData(_e.get("LocalState")):void 0,deleted:_e.get("Deleted")})}}AppLocalStateDelta.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"LocalState",valueSchema:new OptionalSchema(AppLocalState.encodingSchema)},{key:"Deleted",valueSchema:new BooleanSchema}]));class AppParamsDelta{constructor(_e){this.params=_e.params,this.deleted=_e.deleted}getEncodingSchema(){return AppParamsDelta.encodingSchema}toEncodingData(){return new Map([["Params",this.params?this.params.toEncodingData():void 0],["Deleted",this.deleted]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AppParamsDelta: ${_e}`);return new AppParamsDelta({params:_e.get("Params")?AppParams.fromEncodingData(_e.get("Params")):void 0,deleted:_e.get("Deleted")})}}AppParamsDelta.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"Params",valueSchema:new OptionalSchema(AppParams.encodingSchema)},{key:"Deleted",valueSchema:new BooleanSchema}]));class AppResourceRecord{constructor(_e){this.id=_e.id,this.address=_e.address,this.params=_e.params,this.state=_e.state}getEncodingSchema(){return AppResourceRecord.encodingSchema}toEncodingData(){return new Map([["Aidx",this.id],["Addr",this.address],["Params",this.params.toEncodingData()],["State",this.state.toEncodingData()]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AppResourceRecord: ${_e}`);return new AppResourceRecord({id:_e.get("Aidx"),address:_e.get("Addr"),params:AppParamsDelta.fromEncodingData(_e.get("Params")),state:AppLocalStateDelta.fromEncodingData(_e.get("State"))})}}AppResourceRecord.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"Aidx",valueSchema:new Uint64Schema},{key:"Addr",valueSchema:new AddressSchema},{key:"Params",valueSchema:AppParamsDelta.encodingSchema},{key:"State",valueSchema:AppLocalStateDelta.encodingSchema}]));let AssetHolding$2=class Io{constructor(_e){this.amount=_e.amount,this.frozen=_e.frozen}getEncodingSchema(){return Io.encodingSchema}toEncodingData(){return new Map([["a",this.amount],["f",this.frozen]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AssetHolding: ${_e}`);return new Io({amount:_e.get("a"),frozen:_e.get("f")})}};AssetHolding$2.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"a",valueSchema:new Uint64Schema},{key:"f",valueSchema:new BooleanSchema}]));class AssetHoldingDelta{constructor(_e){this.holding=_e.holding,this.deleted=_e.deleted}getEncodingSchema(){return AssetHoldingDelta.encodingSchema}toEncodingData(){return new Map([["Holding",this.holding?this.holding.toEncodingData():void 0],["Deleted",this.deleted]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AssetHoldingDelta: ${_e}`);return new AssetHoldingDelta({holding:_e.get("Holding")?AssetHolding$2.fromEncodingData(_e.get("Holding")):void 0,deleted:_e.get("Deleted")})}}AssetHoldingDelta.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"Holding",valueSchema:new OptionalSchema(AssetHolding$2.encodingSchema)},{key:"Deleted",valueSchema:new BooleanSchema}]));let AssetParams$2=class Po{constructor(_e){this.total=_e.total,this.decimals=_e.decimals,this.defaultFrozen=_e.defaultFrozen,this.unitName=_e.unitName,this.assetName=_e.assetName,this.url=_e.url,this.metadataHash=_e.metadataHash,this.manager=_e.manager,this.reserve=_e.reserve,this.freeze=_e.freeze,this.clawback=_e.clawback}getEncodingSchema(){return Po.encodingSchema}toEncodingData(){return new Map([["t",this.total],["dc",this.decimals],["df",this.defaultFrozen],["un",this.unitName],["an",this.assetName],["au",this.url],["am",this.metadataHash],["m",this.manager],["r",this.reserve],["f",this.freeze],["c",this.clawback]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AssetParams: ${_e}`);return new Po({total:_e.get("t"),decimals:_e.get("dc"),defaultFrozen:_e.get("df"),unitName:_e.get("un"),assetName:_e.get("an"),url:_e.get("au"),metadataHash:_e.get("am"),manager:_e.get("m"),reserve:_e.get("r"),freeze:_e.get("f"),clawback:_e.get("c")})}};AssetParams$2.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"t",valueSchema:new Uint64Schema},{key:"dc",valueSchema:new Uint64Schema},{key:"df",valueSchema:new BooleanSchema},{key:"un",valueSchema:new OptionalSchema(new SpecialCaseBinaryStringSchema)},{key:"an",valueSchema:new OptionalSchema(new SpecialCaseBinaryStringSchema)},{key:"au",valueSchema:new OptionalSchema(new SpecialCaseBinaryStringSchema)}
1504,{key:"am",valueSchema:new FixedLengthByteArraySchema(32)},{key:"m",valueSchema:new OptionalSchema(new AddressSchema)},{key:"r",valueSchema:new OptionalSchema(new AddressSchema)},{key:"f",valueSchema:new OptionalSchema(new AddressSchema)},{key:"c",valueSchema:new OptionalSchema(new AddressSchema)}]));class AssetParamsDelta{constructor(_e){this.params=_e.params,this.deleted=_e.deleted}getEncodingSchema(){return AssetParamsDelta.encodingSchema}toEncodingData(){return new Map([["Params",this.params?this.params.toEncodingData():void 0],["Deleted",this.deleted]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AssetParamsDelta: ${_e}`);return new AssetParamsDelta({params:_e.get("Params")?AssetParams$2.fromEncodingData(_e.get("Params")):void 0,deleted:_e.get("Deleted")})}}AssetParamsDelta.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"Params",valueSchema:new OptionalSchema(AssetParams$2.encodingSchema)},{key:"Deleted",valueSchema:new BooleanSchema}]));class AssetResourceRecord{constructor(_e){this.id=_e.id,this.address=_e.address,this.params=_e.params,this.holding=_e.holding}getEncodingSchema(){return AssetResourceRecord.encodingSchema}toEncodingData(){return new Map([["Aidx",this.id],["Addr",this.address],["Params",this.params.toEncodingData()],["Holding",this.holding.toEncodingData()]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AssetResourceRecord: ${_e}`);return new AssetResourceRecord({id:_e.get("Aidx"),address:_e.get("Addr"),params:AssetParamsDelta.fromEncodingData(_e.get("Params")),holding:AssetHoldingDelta.fromEncodingData(_e.get("Holding"))})}}AssetResourceRecord.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"Aidx",valueSchema:new Uint64Schema},{key:"Addr",valueSchema:new AddressSchema},{key:"Params",valueSchema:AssetParamsDelta.encodingSchema},{key:"Holding",valueSchema:AssetHoldingDelta.encodingSchema}]));class VotingData{constructor(_e){this.voteID=_e.voteID,this.selectionID=_e.selectionID,this.stateProofID=_e.stateProofID,this.voteFirstValid=_e.voteFirstValid,this.voteLastValid=_e.voteLastValid,this.voteKeyDilution=_e.voteKeyDilution}getEncodingSchema(){return VotingData.encodingSchema}toEncodingData(){return new Map([["VoteID",this.voteID],["SelectionID",this.selectionID],["StateProofID",this.stateProofID],["VoteFirstValid",this.voteFirstValid],["VoteLastValid",this.voteLastValid],["VoteKeyDilution",this.voteKeyDilution]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded VotingData: ${_e}`);return new VotingData({voteID:_e.get("VoteID"),selectionID:_e.get("SelectionID"),stateProofID:_e.get("StateProofID"),voteFirstValid:_e.get("VoteFirstValid"),voteLastValid:_e.get("VoteLastValid"),voteKeyDilution:_e.get("VoteKeyDilution")})}}VotingData.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"VoteID",valueSchema:new FixedLengthByteArraySchema(32)},{key:"SelectionID",valueSchema:new FixedLengthByteArraySchema(32)},{key:"StateProofID",valueSchema:new FixedLengthByteArraySchema(64)},{key:"VoteFirstValid",valueSchema:new Uint64Schema},{key:"VoteLastValid",valueSchema:new Uint64Schema},{key:"VoteKeyDilution",valueSchema:new Uint64Schema}]));class AccountBaseData{constructor(_e){this.status=_e.status,this.microAlgos=_e.microAlgos,this.rewardsBase=_e.rewardsBase,this.rewardedMicroAlgos=_e.rewardedMicroAlgos,this.authAddr=_e.authAddr,this.incentiveEligible=_e.incentiveEligible,this.totalAppSchema=_e.totalAppSchema,this.totalExtraAppPages=_e.totalExtraAppPages,this.totalAppParams=_e.totalAppParams,this.totalAppLocalStates=_e.totalAppLocalStates,this.totalAssetParams=_e.totalAssetParams,this.totalAssets=_e.totalAssets,this.totalBoxes=_e.totalBoxes,this.totalBoxBytes=_e.totalBoxBytes,this.lastProposed=_e.lastProposed,this.lastHeartbeat=_e.lastHeartbeat}getEncodingSchema(){return AccountBaseData.encodingSchema}toEncodingData(){return new Map([["Status",this.status],["MicroAlgos",this.microAlgos],["RewardsBase",this.rewardsBase],["RewardedMicroAlgos",this.rewardedMicroAlgos],["AuthAddr",this.authAddr],["IncentiveEligible",this.incentiveEligible],["TotalAppSchema",this.totalAppSchema.toEncodingData()],["TotalExtraAppPages",this.totalExtraAppPages],["TotalAppParams",this.totalAppParams],["TotalAppLocal
1504States",this.totalAppLocalStates],["TotalAssetParams",this.totalAssetParams],["TotalAssets",this.totalAssets],["TotalBoxes",this.totalBoxes],["TotalBoxBytes",this.totalBoxBytes],["LastProposed",this.lastProposed],["LastHeartbeat",this.lastHeartbeat]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AccountBaseData: ${_e}`);return new AccountBaseData({status:Number(_e.get("Status")),microAlgos:_e.get("MicroAlgos"),rewardsBase:_e.get("RewardsBase"),rewardedMicroAlgos:_e.get("RewardedMicroAlgos"),authAddr:_e.get("AuthAddr"),incentiveEligible:_e.get("IncentiveEligible"),totalAppSchema:StateSchema$1.fromEncodingData(_e.get("TotalAppSchema")),totalExtraAppPages:Number(_e.get("TotalExtraAppPages")),totalAppParams:_e.get("TotalAppParams"),totalAppLocalStates:_e.get("TotalAppLocalStates"),totalAssetParams:_e.get("TotalAssetParams"),totalAssets:_e.get("TotalAssets"),totalBoxes:_e.get("TotalBoxes"),totalBoxBytes:_e.get("TotalBoxBytes"),lastProposed:_e.get("LastProposed"),lastHeartbeat:_e.get("LastHeartbeat")})}}AccountBaseData.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"Status",valueSchema:new Uint64Schema},{key:"MicroAlgos",valueSchema:new Uint64Schema},{key:"RewardsBase",valueSchema:new Uint64Schema},{key:"RewardedMicroAlgos",valueSchema:new Uint64Schema},{key:"AuthAddr",valueSchema:new AddressSchema},{key:"IncentiveEligible",valueSchema:new BooleanSchema},{key:"TotalAppSchema",valueSchema:StateSchema$1.encodingSchema},{key:"TotalExtraAppPages",valueSchema:new Uint64Schema},{key:"TotalAppParams",valueSchema:new Uint64Schema},{key:"TotalAppLocalStates",valueSchema:new Uint64Schema},{key:"TotalAssetParams",valueSchema:new Uint64Schema},{key:"TotalAssets",valueSchema:new Uint64Schema},{key:"TotalBoxes",valueSchema:new Uint64Schema},{key:"TotalBoxBytes",valueSchema:new Uint64Schema},{key:"LastProposed",valueSchema:new Uint64Schema},{key:"LastHeartbeat",valueSchema:new Uint64Schema}]));class AccountData{constructor(_e){this.accountBaseData=_e.accountBaseData,this.votingData=_e.votingData}getEncodingSchema(){return AccountData.encodingSchema}toEncodingData(){return combineMaps(this.accountBaseData.toEncodingData(),this.votingData.toEncodingData())}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AccountData: ${_e}`);return new AccountData({accountBaseData:AccountBaseData.fromEncodingData(_e),votingData:VotingData.fromEncodingData(_e)})}}AccountData.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"",valueSchema:AccountBaseData.encodingSchema,embedded:!0},{key:"",valueSchema:VotingData.encodingSchema,embedded:!0}]));class BalanceRecord{constructor(_e){this.addr=_e.addr,this.accountData=_e.accountData}getEncodingSchema(){return BalanceRecord.encodingSchema}toEncodingData(){return combineMaps(new Map([["Addr",this.addr]]),this.accountData.toEncodingData())}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded BalanceRecord: ${_e}`);return new BalanceRecord({addr:_e.get("Addr"),accountData:AccountData.fromEncodingData(_e)})}}BalanceRecord.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"Addr",valueSchema:new AddressSchema},{key:"",valueSchema:AccountData.encodingSchema,embedded:!0}]));class AccountDeltas{constructor(_e){this.accounts=_e.accounts,this.appResources=_e.appResources,this.assetResources=_e.assetResources}getEncodingSchema(){return AccountDeltas.encodingSchema}toEncodingData(){return new Map([["Accts",this.accounts.map(_e=>_e.toEncodingData())],["AppResources",this.appResources.length===0?void 0:this.appResources.map(_e=>_e.toEncodingData())],["AssetResources",this.assetResources.length===0?void 0:this.assetResources.map(_e=>_e.toEncodingData())]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AccountDeltas: ${_e}`);return new AccountDeltas({accounts:(_e.get("Accts")??[]).map(BalanceRecord.fromEncodingData),appResources:(_e.get("AppResources")??[]).map(AppResourceRecord.fromEncodingData),assetResources:(_e.get("AssetResources")??[]).map(AssetResourceRecord.fromEncodingData)})}}AccountDeltas.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"Accts",valueSchema:new ArraySchema(BalanceRecord.encodingSchema)},{key:"AppResources",valueSchema:new OptionalSchema(new ArraySchema(AppResourceRecord.encodingSchema))},{key:"AssetResources",valueSchema:new OptionalSchema(new ArraySchema(AssetResourceRecord.encodingSchema))}]));class KvValueDelta{constructor(_e){this.data=_e.data,this.oldData=_e.oldData}getEncodingSchema(){return KvValueDelta.encodingSchema}toEncodingData(){return new Map([["Data",this.data],["OldData",this.oldData]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded KvValueDelta: ${_e}`);return new KvValueDelta({data:_e.get("Data"),oldData:_e.get("OldData")})}}KvValueDelta.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"Data",valueSchema:new OptionalSchema(new ByteArraySchema)},{key:"OldData",valueSchema:new OptionalSchema(new ByteArraySchema)}]));class IncludedTransactions{constructor(_e){this.lastValid=_e.lastValid,this.intra=_e.intra}getEncodingSchema(){return IncludedTransactions.encodingSchema}toEncodingData(){return new Map([["LastValid",this.lastValid],["Intra",this.intra]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded IncludedTransactions: ${_e}`);return new IncludedTransactions({lastValid:_e.get("LastValid"),intra:Number(_e.get("Intra"))})}}IncludedTransactions.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"LastValid",valueSchema:new Uint64Schema},{key:"Intra",valueSchema:new Uint64Schema}]));class ModifiedCreatable{constructor(_e){this.creatableType=_e.creatableType,this.created=_e.created,this.creator=_e.creator,this.ndeltas=_e.ndeltas}getEncodingSchema(){return ModifiedCreatable.encodingSchema}toEncodingData(){return new Map([["Ctype",this.creatableType],["Created",this.created],["Creator",this.creator],["Ndeltas",this.ndeltas]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ModifiedCreatable: ${_e}`);return new ModifiedCreatable({creatableType:Number(_e.get("Ctype")),created:_e.get("Created"),
1504creator:_e.get("Creator"),ndeltas:Number(_e.get("Ndeltas"))})}}ModifiedCreatable.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"Ctype",valueSchema:new Uint64Schema},{key:"Created",valueSchema:new BooleanSchema},{key:"Creator",valueSchema:new AddressSchema},{key:"Ndeltas",valueSchema:new Uint64Schema}]));class AlgoCount{constructor(_e){this.money=_e.money,this.rewardUnits=_e.rewardUnits}getEncodingSchema(){return AlgoCount.encodingSchema}toEncodingData(){return new Map([["mon",this.money],["rwd",this.rewardUnits]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AlgoCount: ${_e}`);return new AlgoCount({money:_e.get("mon"),rewardUnits:_e.get("rwd")})}}AlgoCount.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"mon",valueSchema:new Uint64Schema},{key:"rwd",valueSchema:new Uint64Schema}]));class AccountTotals{constructor(_e){this.online=_e.online,this.offline=_e.offline,this.notParticipating=_e.notParticipating,this.rewardsLevel=_e.rewardsLevel}getEncodingSchema(){return AccountTotals.encodingSchema}toEncodingData(){return new Map([["online",this.online.toEncodingData()],["offline",this.offline.toEncodingData()],["notpart",this.notParticipating.toEncodingData()],["rwdlvl",this.rewardsLevel]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AccountTotals: ${_e}`);return new AccountTotals({online:AlgoCount.fromEncodingData(_e.get("online")),offline:AlgoCount.fromEncodingData(_e.get("offline")),notParticipating:AlgoCount.fromEncodingData(_e.get("notpart")),rewardsLevel:_e.get("rwdlvl")})}}AccountTotals.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"online",valueSchema:AlgoCount.encodingSchema},{key:"offline",valueSchema:AlgoCount.encodingSchema},{key:"notpart",valueSchema:AlgoCount.encodingSchema},{key:"rwdlvl",valueSchema:new Uint64Schema}]));class LedgerStateDelta{constructor(_e){this.accounts=_e.accounts,this.kvMods=_e.kvMods,this.txids=_e.txids,this.txleases=_e.txleases,this.creatables=_e.creatables,this.blockHeader=_e.blockHeader,this.stateProofNext=_e.stateProofNext,this.prevTimestamp=_e.prevTimestamp,this.totals=_e.totals}getEncodingSchema(){return LedgerStateDelta.encodingSchema}toEncodingData(){return new Map([["Accts",this.accounts.toEncodingData()],["KvMods",this.kvMods.size===0?void 0:convertMap(this.kvMods,(_e,$t)=>[_e,$t.toEncodingData()])],["Txids",convertMap(this.txids,(_e,$t)=>[_e,$t.toEncodingData()])],["Txleases",this.txleases.toEncodingData()],["Creatables",this.creatables.size===0?void 0:convertMap(this.creatables,(_e,$t)=>[_e,$t.toEncodingData()])],["Hdr",this.blockHeader.toEncodingData()],["StateProofNext",this.stateProofNext],["PrevTimestamp",this.prevTimestamp],["Totals",this.totals.toEncodingData()]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded LedgerStateDelta: ${_e}`);return new LedgerStateDelta({accounts:AccountDeltas.fromEncodingData(_e.get("Accts")),kvMods:convertMap(_e.get("KvMods")??new Map,($t,Ft)=>[$t,KvValueDelta.fromEncodingData(Ft)]),txids:convertMap(_e.get("Txids"),($t,Ft)=>[$t,IncludedTransactions.fromEncodingData(Ft)]),txleases:UntypedValue.fromEncodingData(_e.get("Txleases")),creatables:convertMap(_e.get("Creatables")??new Map,($t,Ft)=>[$t,ModifiedCreatable.fromEncodingData(Ft)]),blockHeader:BlockHeader.fromEncodingData(_e.get("Hdr")),stateProofNext:_e.get("StateProofNext"),prevTimestamp:_e.get("PrevTimestamp"),totals:AccountTotals.fromEncodingData(_e.get("Totals"))})}}LedgerStateDelta.encodingSchema=new NamedMapSchema(allOmitEmpty([{key:"Accts",valueSchema:AccountDeltas.encodingSchema},{key:"KvMods",valueSchema:new OptionalSchema(new SpecialCaseBinaryStringMapSchema(KvValueDelta.encodingSchema))},{key:"Txids",valueSchema:new ByteArrayMapSchema(IncludedTransactions.encodingSchema)},{key:"Txleases",valueSchema:new OptionalSchema(new UntypedSchema)},{key:"Creatables",valueSchema:new OptionalSchema(new Uint64MapSchema(ModifiedCreatable.encodingSchema))},{key:"Hdr",valueSchema:BlockHeader.encodingSchema},{key:"StateProofNext",valueSchema:new Uint64Schema},{key:"PrevTimestamp",valueSchema:new Uint64Schema},{key:"Totals",valueSchema:AccountTotals.encodingSchema}]));let Account$1=class Bo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"address",valueSchema:new StringSchema,omitEmpty:!0},{key:"amount",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"amount-without-pending-rewards",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"min-balance",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"pending-rewards",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"rewards",valueSchema:new Uint64Schema,omitEmpty:!0}
1504,{key:"round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"status",valueSchema:new StringSchema,omitEmpty:!0},{key:"total-apps-opted-in",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"total-assets-opted-in",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"total-created-apps",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"total-created-assets",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"apps-local-state",valueSchema:new OptionalSchema(new ArraySchema(ApplicationLocalState$1.encodingSchema)),omitEmpty:!0},{key:"apps-total-extra-pages",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"apps-total-schema",valueSchema:new OptionalSchema(ApplicationStateSchema$1.encodingSchema),omitEmpty:!0},{key:"assets",valueSchema:new OptionalSchema(new ArraySchema(AssetHolding$1.encodingSchema)),omitEmpty:!0},{key:"auth-addr",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"created-apps",valueSchema:new OptionalSchema(new ArraySchema(Application$1.encodingSchema)),omitEmpty:!0},{key:"created-assets",valueSchema:new OptionalSchema(new ArraySchema(Asset$1.encodingSchema)),omitEmpty:!0},{key:"incentive-eligible",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"last-heartbeat",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"last-proposed",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"participation",valueSchema:new OptionalSchema(AccountParticipation$1.encodingSchema),omitEmpty:!0},{key:"reward-base",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"sig-type",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"total-box-bytes",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"total-boxes",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({address:_e,amount:$t,amountWithoutPendingRewards:Ft,minBalance:Vt,pendingRewards:qt,rewards:zt,round:Ht,status:Kt,totalAppsOptedIn:Gt,totalAssetsOptedIn:Jt,totalCreatedApps:Xt,totalCreatedAssets:Zt,appsLocalState:er,appsTotalExtraPages:tr,appsTotalSchema:rr,assets:ar,authAddr:nr,createdApps:cr,createdAssets:fr,incentiveEligible:vr,lastHeartbeat:xr,lastProposed:Sr,participation:Tr,rewardBase:Br,
1504sigType:jr,totalBoxBytes:Rr,totalBoxes:yr}){this.address=_e,this.amount=ensureBigInt($t),this.amountWithoutPendingRewards=ensureBigInt(Ft),this.minBalance=ensureBigInt(Vt),this.pendingRewards=ensureBigInt(qt),this.rewards=ensureBigInt(zt),this.round=ensureBigInt(Ht),this.status=Kt,this.totalAppsOptedIn=ensureSafeInteger(Gt),this.totalAssetsOptedIn=ensureSafeInteger(Jt),this.totalCreatedApps=ensureSafeInteger(Xt),this.totalCreatedAssets=ensureSafeInteger(Zt),this.appsLocalState=er,this.appsTotalExtraPages=typeof tr>"u"?void 0:ensureSafeInteger(tr),this.appsTotalSchema=rr,this.assets=ar,this.authAddr=typeof nr=="string"?Address.fromString(nr):nr,this.createdApps=cr,this.createdAssets=fr,this.incentiveEligible=vr,this.lastHeartbeat=typeof xr>"u"?void 0:ensureSafeInteger(xr),this.lastProposed=typeof Sr>"u"?void 0:ensureSafeInteger(Sr),this.participation=Tr,this.rewardBase=typeof Br>"u"?void 0:ensureBigInt(Br),this.sigType=jr,this.totalBoxBytes=typeof Rr>"u"?void 0:ensureSafeInteger(Rr),this.totalBoxes=typeof yr>"u"?void 0:ensureSafeInteger(yr)}getEncodingSchema(){return Bo.encodingSchema}toEncodingData(){return new Map([["address",this.address],["amount",this.amount],["amount-without-pending-rewards",this.amountWithoutPendingRewards],["min-balance",this.minBalance],["pending-rewards",this.pendingRewards],["rewards",this.rewards],["round",this.round],["status",this.status],["total-apps-opted-in",this.totalAppsOptedIn],["total-assets-opted-in",this.totalAssetsOptedIn],["total-created-apps",this.totalCreatedApps],["total-created-assets",this.totalCreatedAssets],["apps-local-state",typeof this.appsLocalState<"u"?this.appsLocalState.map(_e=>_e.toEncodingData()):void 0],["apps-total-extra-pages",this.appsTotalExtraPages],["apps-total-schema",typeof this.appsTotalSchema<"u"?this.appsTotalSchema.toEncodingData():void 0],["assets",typeof this.assets<"u"?this.assets.map(_e=>_e.toEncodingData()):void 0],["auth-addr",typeof this.authAddr<"u"?this.authAddr.toString():void 0],["created-apps",typeof this.createdApps<"u"?this.createdApps.map(_e=>_e.toEncodingData()):void 0],["created-assets",typeof this.createdAssets<"u"?this.createdAssets.map(_e=>_e.toEncodingData()):void 0],["incentive-eligible",this.incentiveEligible],["last-heartbeat",this.lastHeartbeat],["last-proposed",this.lastProposed],["participation",typeof this.participation<"u"?this.participation.toEncodingData():void 0],["reward-base",this.rewardBase],["sig-type",this.sigType],["total-box-bytes",this.totalBoxBytes],["total-boxes",this.totalBoxes]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded Account: ${_e}`);return new Bo({address:_e.get("address"),amount:_e.get("amount"),amountWithoutPendingRewards:_e.get("amount-without-pending-rewards"),minBalance:_e.get("min-balance"),pendingRewards:_e.get("pending-rewards"),rewards:_e.get("rewards"),round:_e.get("round"),status:_e.get("status"),totalAppsOptedIn:_e.get("total-apps-opted-in"),totalAssetsOptedIn:_e.get("total-assets-opted-in"),totalCreatedApps:_e.get("total-created-apps"),totalCreatedAssets:_e.get("total-created-assets"),appsLocalState:typeof _e.get("apps-local-state")<"u"?_e.get("apps-local-state").map($t=>ApplicationLocalState$1.fromEncodingData($t)):void 0,appsTotalExtraPages:_e.get("apps-total-extra-pages"),appsTotalSchema:typeof _e.get("apps-total-schema")<"u"?ApplicationStateSchema$1.fromEncodingData(_e.get("apps-total-schema")):void 0,assets:typeof _e.get("assets")<"u"?_e.get("assets").map($t=>AssetHolding$1.fromEncodingData($t)):void 0,authAddr:_e.get("auth-addr"),createdApps:typeof _e.get("created-apps")<"u"?_e.get("created-apps").map($t=>Application$1.fromEncodingData($t)):void 0,createdAssets:typeof _e.get("created-assets")<"u"?_e.get("created-assets").map($t=>Asset$1.fromEncodingData($t)):void 0,incentiveEligible:_e.get("incentive-eligible"),lastHeartbeat:_e.get("last-heartbeat"),lastProposed:_e.get("last-proposed"),participation:typeof _e.get("participation")<"u"?AccountParticipation$1.fromEncodingData(_e.get("participation")):void 0,rewardBase:_e.get("reward-base"),sigType:_e.get("sig-type"),totalBoxBytes:_e.get("total-box-bytes"),totalBoxes:_e.get("total-boxes")})}};class AccountApplicationResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"roun
1504d",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"app-local-state",valueSchema:new OptionalSchema(ApplicationLocalState$1.encodingSchema),omitEmpty:!0},{key:"created-app",valueSchema:new OptionalSchema(ApplicationParams$1.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({round:_e,appLocalState:$t,createdApp:Ft}){this.round=ensureBigInt(_e),this.appLocalState=$t,this.createdApp=Ft}getEncodingSchema(){return AccountApplicationResponse.encodingSchema}toEncodingData(){return new Map([["round",this.round],["app-local-state",typeof this.appLocalState<"u"?this.appLocalState.toEncodingData():void 0],["created-app",typeof this.createdApp<"u"?this.createdApp.toEncodingData():void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AccountApplicationResponse: ${_e}`);return new AccountApplicationResponse({round:_e.get("round"),appLocalState:typeof _e.get("app-local-state")<"u"?ApplicationLocalState$1.fromEncodingData(_e.get("app-local-state")):void 0,createdApp:typeof _e.get("created-app")<"u"?ApplicationParams$1.fromEncodingData(_e.get("created-app")):void 0})}}class AccountAssetHolding{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"asset-holding",valueSchema:AssetHolding$1.encodingSchema,omitEmpty:!0},{key:"asset-params",valueSchema:new OptionalSchema(AssetParams$1.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({assetHolding:_e,assetParams:$t}){this.assetHolding=_e,this.assetParams=$t}getEncodingSchema(){return AccountAssetHolding.encodingSchema}toEncodingData(){return new Map([["asset-holding",this.assetHolding.toEncodingData()],["asset-params",typeof this.assetParams<"u"?this.assetParams.toEncodingData():void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AccountAssetHolding: ${_e}`);return new AccountAssetHolding({assetHolding:AssetHolding$1.fromEncodingData(_e.get("asset-holding")??new Map),assetParams:typeof _e.get("asset-params")<"u"?AssetParams$1.fromEncodingData(_e.get("asset-params")):void 0})}}class AccountAssetResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"asset-holding",valueSchema:new OptionalSchema(AssetHolding$1.encodingSchema),omitEmpty:!0},{key:"created-asset",valueSchema:new OptionalSchema(AssetParams$1.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({round:_e,assetHolding:$t,createdAsset:Ft}){this.round=ensureBigInt(_e),this.assetHolding=$t,this.createdAsset=Ft}getEncodingSchema(){return AccountAssetResponse.encodingSchema}toEncodingData(){return new Map([["round",this.round],["asset-holding",typeof this.assetHolding<"u"?this.assetHolding.toEncodingData():void 0],["created-asset",typeof this.createdAsset<"u"?this.createdAsset.toEncodingData():void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AccountAssetResponse: ${_e}`);return new AccountAssetResponse({round:_e.get("round"),assetHolding:typeof _e.get("asset-holding")<"u"?AssetHolding$1.fromEncodingData(_e.get("asset-holding")):void 0,createdAsset:typeof _e.get("created-asset")<"u"?AssetParams$1.fromEncodingData(_e.get("created-asset")):void 0})}}class AccountAssetsInformationResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"asset-holdings",valueSchema:new OptionalSchema(new ArraySchema(AccountAssetHolding.encodingSchema)),omitEmpty:!0},{key:"next-token",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({round:_e,assetHoldings:$t,nextToken:Ft}){this.round=ensureSafeInteger(_e),this.assetHoldings=$t,this.nextToken=Ft}getEncodingSchema(){return AccountAssetsInformationResponse.encodingSchema}toEncodingData(){return new Map([["round",this.round],["asset-holdings",typeof this.assetHoldings<"u"?this.assetHoldings.map(_e=>_e.toEncodingData()):void 0],["next-token",this.nextToken]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AccountAssetsInformationResponse: ${_e}`);return new AccountAssetsInformationResponse({round:_e.get("round"),assetHoldings:typeof _e.get("asset-holdings")<"u"?_e.get("asset-holdings").map($t=>AccountAssetHolding.fromEncodingData($t)):void 0,nextToken:_e.get("next-token")})}}let AccountParticipation$1=class Oo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"selection-
1504participation-key",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"vote-first-valid",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"vote-key-dilution",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"vote-last-valid",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"vote-participation-key",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"state-proof-key",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({selectionParticipationKey:_e,voteFirstValid:$t,voteKeyDilution:Ft,voteLastValid:Vt,voteParticipationKey:qt,stateProofKey:zt}){this.selectionParticipationKey=typeof _e=="string"?base64ToBytes(_e):_e,this.voteFirstValid=ensureBigInt($t),this.voteKeyDilution=ensureBigInt(Ft),this.voteLastValid=ensureBigInt(Vt),this.voteParticipationKey=typeof qt=="string"?base64ToBytes(qt):qt,this.stateProofKey=typeof zt=="string"?base64ToBytes(zt):zt}getEncodingSchema(){return Oo.encodingSchema}toEncodingData(){return new Map([["selection-participation-key",this.selectionParticipationKey],["vote-first-valid",this.voteFirstValid],["vote-key-dilution",this.voteKeyDilution],["vote-last-valid",this.voteLastValid],["vote-participation-key",this.voteParticipationKey],["state-proof-key",this.stateProofKey]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AccountParticipation: ${_e}`);return new Oo({selectionParticipationKey:_e.get("selection-participation-key"),voteFirstValid:_e.get("vote-first-valid"),voteKeyDilution:_e.get("vote-key-dilution"),voteLastValid:_e.get("vote-last-valid"),voteParticipationKey:_e.get("vote-participation-key"),stateProofKey:_e.get("state-proof-key")})}},AccountStateDelta$1=class Do{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"address",valueSchema:new StringSchema,omitEmpty:!0},{key:"delta",valueSchema:new ArraySchema(EvalDeltaKeyValue$1.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({address:_e,delta:$t}){this.address=_e,this.delta=$t}getEncodingSchema(){return Do.encodingSchema}toEncodingData(){return new Map([["address",this.address],["delta",this.delta.map(_e=>_e.toEncodingData())]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AccountStateDelta: ${_e}`);return new Do({address:_e.get("address"),delta:(_e.get("delta")??[]).map($t=>EvalDeltaKeyValue$1.fromEncodingData($t))})}};class AppCallLogs{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"application-index",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"logs",valueSchema:new ArraySchema(new ByteArraySchema),omitEmpty:!0},{key:"txId",valueSchema:new StringSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({applicationIndex:_e,logs:$t,txid:Ft}){this.applicationIndex=ensureSafeInteger(_e),this.logs=$t,this.txid=Ft}getEncodingSchema(){return AppCallLogs.encodingSchema}toEncodingData(){return new Map([["application-index",this.applicationIndex],["logs",this.logs],["txId",this.txid]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AppCallLogs: ${_e}`);return new AppCallLogs({applicationIndex:_e.get("application-index"),logs:_e.get("logs"),txid:_e.get("txId")})}}let Application$1=class No{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"id",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"params",valueSchema:ApplicationParams$1.encodingSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({id:_e,params:$t}){this.id=ensureBigInt(_e),this.params=$t}getEncodingSchema(){return No.encodingSchema}toEncodingData(){return new Map([["id",this.id],["params",this.params.toEncodingData()]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded Application: ${_e}`);return new No({id:_e.get("id"),params:ApplicationParams$1.fromEncodingData(_e.get("params")??new Map)})}};class ApplicationInitialStates{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"id",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"app-boxes",valueSchema:new OptionalSchema(ApplicationKVStorage.encodingSchema),omitEmpty:!0},{key:"app-globals",valueSchema:new OptionalSchema(ApplicationKVStorage.encodingSchema),omitEmpty:!0},{key:"app-locals",valueSchema:new OptionalSchema(new ArraySchema(ApplicationKVStorage.encodingSchema)),omitEmpty:!0})),this.encodingSchemaValue}
1504constructor({id:_e,appBoxes:$t,appGlobals:Ft,appLocals:Vt}){this.id=ensureBigInt(_e),this.appBoxes=$t,this.appGlobals=Ft,this.appLocals=Vt}getEncodingSchema(){return ApplicationInitialStates.encodingSchema}toEncodingData(){return new Map([["id",this.id],["app-boxes",typeof this.appBoxes<"u"?this.appBoxes.toEncodingData():void 0],["app-globals",typeof this.appGlobals<"u"?this.appGlobals.toEncodingData():void 0],["app-locals",typeof this.appLocals<"u"?this.appLocals.map(_e=>_e.toEncodingData()):void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ApplicationInitialStates: ${_e}`);return new ApplicationInitialStates({id:_e.get("id"),appBoxes:typeof _e.get("app-boxes")<"u"?ApplicationKVStorage.fromEncodingData(_e.get("app-boxes")):void 0,appGlobals:typeof _e.get("app-globals")<"u"?ApplicationKVStorage.fromEncodingData(_e.get("app-globals")):void 0,appLocals:typeof _e.get("app-locals")<"u"?_e.get("app-locals").map($t=>ApplicationKVStorage.fromEncodingData($t)):void 0})}}class ApplicationKVStorage{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"kvs",valueSchema:new ArraySchema(AvmKeyValue.encodingSchema),omitEmpty:!0},{key:"account",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({kvs:_e,account:$t}){this.kvs=_e,this.account=typeof $t=="string"?Address.fromString($t):$t}getEncodingSchema(){return ApplicationKVStorage.encodingSchema}toEncodingData(){return new Map([["kvs",this.kvs.map(_e=>_e.toEncodingData())],["account",typeof this.account<"u"?this.account.toString():void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ApplicationKVStorage: ${_e}`);return new ApplicationKVStorage({kvs:(_e.get("kvs")??[]).map($t=>AvmKeyValue.fromEncodingData($t)),account:_e.get("account")})}}class ApplicationLocalReference{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"account",valueSchema:new StringSchema,omitEmpty:!0},{key:"app",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({account:_e,app:$t}){this.account=typeof _e=="string"?Address.fromString(_e):_e,this.app=ensureBigInt($t)}getEncodingSchema(){return ApplicationLocalReference.encodingSchema}toEncodingData(){return new Map([["account",this.account.toString()],["app",this.app]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ApplicationLocalReference: ${_e}`);return new ApplicationLocalReference({account:_e.get("account"),app:_e.get("app")})}}let ApplicationLocalState$1=class Lo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"id",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"schema",valueSchema:ApplicationStateSchema$1.encodingSchema,omitEmpty:!0},{key:"key-value",valueSchema:new OptionalSchema(new ArraySchema(TealKeyValue$1.encodingSchema)),omitEmpty:!0})),this.encodingSchemaValue}constructor({id:_e,schema:$t,keyValue:Ft}){this.id=ensureBigInt(_e),this.schema=$t,this.keyValue=Ft}getEncodingSchema(){return Lo.encodingSchema}toEncodingData(){return new Map([["id",this.id],["schema",this.schema.toEncodingData()],["key-value",typeof this.keyValue<"u"?this.keyValue.map(_e=>_e.toEncodingData()):void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ApplicationLocalState: ${_e}`);return new Lo({id:_e.get("id"),schema:ApplicationStateSchema$1.fromEncodingData(_e.get("schema")??new Map),keyValue:typeof _e.get("key-value")<"u"?_e.get("key-value").map($t=>TealKeyValue$1.fromEncodingData($t)):void 0})}},ApplicationParams$1=class jo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"approval-program",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"clear-state-program",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"creator",valueSchema:new StringSchema,omitEmpty:!0},{key:"extra-program-pages",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"global-state",valueSchema:new OptionalSchema(new ArraySchema(TealKeyValue$1.encodingSchema)),omitEmpty:!0},{key:"global-state-schema",valueSchema:new OptionalSchema(ApplicationStateSchema$1.encodingSchema),omitEmpty:!0},{key:"local-state-schema",valueSchema:new OptionalSchema(ApplicationStateSchema$1.encodingSchema),omitEmpty:!0},{key:"version",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({approvalProgram:_e,clearStateProgram:$t,creator:Ft,extraProgramPages:Vt,globalState:qt,globalStateSchema:zt,localStateSchema:Ht,version:Kt}){this.approvalProgram=typeof _e=="string"?base64ToBytes(_e):_e,this.clearStateProgram=typeof $t=="string"?base64ToBytes($t):$t,this.creator=typeof Ft=="string"?Address.fromString(Ft):Ft,this.extraProgramPages=typeof Vt>"u"?void 0:ensureSafeInteger(Vt),this.globalState=qt,this.globalStateSchema=zt,this.localStateSchema=Ht,this.version=typeof Kt>"u"?void 0:ensureSafeInteger(Kt)}getEncodingSchema(){return jo.encodingSchema}toEncodingData(){return new Map([["approval-program",this.approvalProgram],["clear-state-program",this.clearStateProgram],["creator",this.creator.toString()],["extra-program-pages",this.extraProgramPages],["global-state",typeof this.globalState<"u"?this.globalState.map(_e=>_e.toEncodingData()):void 0],["global-state-schema",typeof this.globalStateSchema<"u"?this.globalStateSchema.toEncodingData():void 0],["local-state-schema",typeof this.localStateSchema<"u"?this.localStateSchema.toEncodingData():void 0],["version",this.version]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ApplicationParams: ${_e}`);return new jo({approvalProgram:_e.get("approval-program"),clearStateProgram:_e.get("clear-state-program"),creator:_e.get("creator"),extraProgramPages:_e.get("extra-program-pages"),globalState:typeof _e.get("global-state")<"u"?_e.get("global-state").map($t=>TealKeyValue$1.fromEncodingData($t)):void 0,globalStateSchema:typeof _e.get("global-state-schema")<"u"?ApplicationStateSchema$1.fromEncodingData(_e.get("global-state-schema")):void 0,localStateSchema:typeof _e.get("local-state-schema")<"u"?ApplicationStateSchema$1.fromEncodingData(_e.get("local-state-schema")):void 0,version:_e.get("version")})}};class ApplicationStateOperation{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"app-state-type",valueSchema:new StringSchema,omitEmpty:!0},{key:"key",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"operation",valueSchema:new StringSchema,omitEmpty:!0},{key:"account",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"new-value",valueSchema:new OptionalSchema(AvmValue.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({appStateType:_e,key:$t,operation:Ft,account:Vt,newValue:qt}){this.appStateType=_e,this.key=typeof $t=="string"?base64ToBytes($t):$t,this.operation=Ft,this.account=typeof Vt=="string"?Address.fromString(Vt):Vt,this.newValue=qt}getEncodingSchema(){return ApplicationStateOperation.encodingSchema}toEncodingData(){return new Map([["app-state-type",this.appStateType],["key",this.key],["operation",this.operation],["account",typeof this.account<"u"?this.account.toString():void 0],["new-value",typeof this.newValue<"u"?this.newValue.toEncodingData():void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ApplicationStateOperation: ${_e}`);return new ApplicationStateOperation({appStateType:_e.get("app-state-type"),key:_e.get("key"),operation:_e.get("operation"),account:_e.get("account"),newValue:typeof _e.get("new-value")<"u"?AvmValue.from
1504EncodingData(_e.get("new-value")):void 0})}}let ApplicationStateSchema$1=class Uo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"num-byte-slice",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"num-uint",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({numByteSlice:_e,numUint:$t}){this.numByteSlice=ensureSafeInteger(_e),this.numUint=ensureSafeInteger($t)}getEncodingSchema(){return Uo.encodingSchema}toEncodingData(){return new Map([["num-byte-slice",this.numByteSlice],["num-uint",this.numUint]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ApplicationStateSchema: ${_e}`);return new Uo({numByteSlice:_e.get("num-byte-slice"),numUint:_e.get("num-uint")})}},Asset$1=class Fo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"index",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"params",valueSchema:AssetParams$1.encodingSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({index:_e,params:$t}){this.index=ensureBigInt(_e),this.params=$t}getEncodingSchema(){return Fo.encodingSchema}toEncodingData(){return new Map([["index",this.index],["params",this.params.toEncodingData()]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded Asset: ${_e}`);return new Fo({index:_e.get("index"),params:AssetParams$1.fromEncodingData(_e.get("params")??new Map)})}},AssetHolding$1=class qo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"amount",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"asset-id",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"is-frozen",valueSchema:new BooleanSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({amount:_e,assetId:$t,isFrozen:Ft}){this.amount=ensureBigInt(_e),this.assetId=ensureBigInt($t),this.isFrozen=Ft}getEncodingSchema(){return qo.encodingSchema}toEncodingData(){return new Map([["amount",this.amount],["asset-id",this.assetId],["is-frozen",this.isFrozen]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AssetHolding: ${_e}`);return new qo({amount:_e.get("amount"),assetId:_e.get("asset-id"),isFrozen:_e.get("is-frozen")})}};class AssetHoldingReference{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"account",valueSchema:new StringSchema,omitEmpty:!0},{key:"asset",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({account:_e,asset:$t}){this.account=typeof _e=="string"?Address.fromString(_e):_e,this.asset=ensureBigInt($t)}getEncodingSchema(){return AssetHoldingReference.encodingSchema}toEncodingData(){return new Map([["account",this.account.toString()],["asset",this.asset]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AssetHoldingReference: ${_e}`);return new AssetHoldingReference({account:_e.get("account"),asset:_e.get("asset")})}}let AssetParams$1=class Vo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"creator",valueSchema:new StringSchema,omitEmpty:!0},{key:"decimals",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"total",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"clawback",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"default-frozen",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"freeze",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"manager",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"metadata-hash",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"name",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"name-b64",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"reserve",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"unit-name",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"unit-name-b64",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"url",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"url-b64",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({creator:_e,decimals:$t,total:Ft,clawback:Vt,defaultFrozen:qt,freeze:zt,manager:Ht,metadataHash:Kt,name:Gt,nameB64:Jt,reserve:Xt,unitName:Zt,unitNameB64:er,url:tr,urlB64:rr}){this.creator=_e,this.decimals=ensureSafeInteger($t),this.total=ensureBigInt(Ft),this.clawback=Vt,this.defaultFrozen=qt,this.freeze=zt,this.manager=Ht,this.metadataHash=typeof Kt=="string"?base64ToBytes(Kt):Kt,this.name=Gt,this.nameB64=typeof Jt=="string"?base64ToBytes(Jt):Jt,this.reserve=Xt,this.unitName=Zt,this.unitNameB64=typeof er=="string"?base64ToBytes(er):er,this.url=tr,this.urlB64=typeof rr=="string"?base64ToBytes(rr):rr}getEncodingSchema(){return Vo.encodingSchema}toEncodingData(){return new Map([["creator",this.creator],["decimals",this.decimals],["total",this.total],["clawback",this.clawback],["default-frozen",this.defaultFrozen],["freeze",this.freeze],["manager",this.manager],["metadata-hash",this.metadataHash],["name",this.name],["name-b64",this.nameB64],["reserve",this.reserve],["unit-name",this.unitName],["unit-name-b64",this.unitNameB64],["url",this.url],["url-b64",this.urlB64]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AssetParams: ${_e}`);return new Vo({creator:_e.get("creator"),decimals:_e.get("decimals"),total:_e.get("total"),clawback:_e.get("clawback"),defaultFrozen:_e.get("default-frozen"),freeze:_e.get("freeze"),manager:_e.get("manager"),metadataHash:_e.get("metadata-hash"),name:_e.get("name"),nameB64:_e.get("name-b64"),reserve:_e.get("reserve"),unitName:_e.get("unit-name"),unitNameB64:_e.get("unit-name-b64"),url:_e.get("url"),urlB64:_e.get("url-b64")})}};class AvmKeyValue{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"key",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"value",valueSchema:AvmValue.encodingSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({key:_e,value:$t}){this.key=typeof _e=="string"?base64ToBytes(_e):_e,this.value=$t}getEncodingSchema(){return AvmKeyValue.encodingSchema}toEncodingData(){return new Map([["key",this.key],["value",this.value.toEncodingData()]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AvmKeyValue: ${_e}`);
1504return new AvmKeyValue({key:_e.get("key"),value:AvmValue.fromEncodingData(_e.get("value")??new Map)})}}class AvmValue{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"type",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"bytes",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"uint",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({type:_e,bytes:$t,uint:Ft}){this.type=ensureSafeInteger(_e),this.bytes=typeof $t=="string"?base64ToBytes($t):$t,this.uint=typeof Ft>"u"?void 0:ensureBigInt(Ft)}getEncodingSchema(){return AvmValue.encodingSchema}toEncodingData(){return new Map([["type",this.type],["bytes",this.bytes],["uint",this.uint]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AvmValue: ${_e}`);return new AvmValue({type:_e.get("type"),bytes:_e.get("bytes"),uint:_e.get("uint")})}}class BlockHashResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"blockHash",valueSchema:new StringSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({blockhash:_e}){this.blockhash=_e}getEncodingSchema(){return BlockHashResponse.encodingSchema}toEncodingData(){return new Map([["blockHash",this.blockhash]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded BlockHashResponse: ${_e}`);return new BlockHashResponse({blockhash:_e.get("blockHash")})}}class BlockLogsResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"logs",valueSchema:new ArraySchema(AppCallLogs.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({logs:_e}){this.logs=_e}getEncodingSchema(){return BlockLogsResponse.encodingSchema}toEncodingData(){return new Map([["logs",this.logs.map(_e=>_e.toEncodingData())]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded BlockLogsResponse: ${_e}`);return new BlockLogsResponse({logs:(_e.get("logs")??[]).map($t=>AppCallLogs.fromEncodingData($t))})}}class BlockResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"block",valueSchema:Block$2.encodingSchema,omitEmpty:!0},{key:"cert",valueSchema:new OptionalSchema(UntypedValue.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({block:_e,cert:$t}){this.block=_e,this.cert=$t}getEncodingSchema(){return BlockResponse.encodingSchema}toEncodingData(){return new Map([["block",this.block.toEncodingData()],["cert",typeof this.cert<"u"?this.cert.toEncodingData():void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded BlockResponse: ${_e}`);return new BlockResponse({block:Block$2.fromEncodingData(_e.get("block")??new Map),cert:typeof _e.get("cert")<"u"?UntypedValue.fromEncodingData(_e.get("cert")):void 0})}}class BlockTxidsResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"blockTxids",valueSchema:new ArraySchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({blocktxids:_e}){this.blocktxids=_e}getEncodingSchema(){return BlockTxidsResponse.encodingSchema}toEncodingData(){return new Map([["blockTxids",this.blocktxids]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded BlockTxidsResponse: ${_e}`);return new BlockTxidsResponse({blocktxids:_e.get("blockTxids")})}}let Box$1=class zo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"name",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"value",valueSchema:new ByteArraySchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({name:_e,round:$t,value:Ft}){this.name=typeof _e=="string"?base64ToBytes(_e):_e,this.round=ensureBigInt($t),this.value=typeof Ft=="string"?base64ToBytes(Ft):Ft}getEncodingSchema(){return zo.encodingSchema}toEncodingData(){return new Map([["name",this.name],["round",this.round],["value",this.value]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded Box: ${_e}`);return new zo({name:_e.get("name"),round:_e.get("round"),value:_e.get("value")})}},BoxDescriptor$1=class Wo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"name",valueSchema:new ByteArraySchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({name:_e}){this.name=typeof _e=="string"?base64ToBytes(_e):_e}getEncodingSchema(){return Wo.encodingSchema}toEncodingData(){return new Map([["name",this.name]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded BoxDescriptor: ${_e}`);return new Wo({name:_e.get("name")}
1504)}};class BoxReference{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"app",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"name",valueSchema:new ByteArraySchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({app:_e,name:$t}){this.app=ensureBigInt(_e),this.name=typeof $t=="string"?base64ToBytes($t):$t}getEncodingSchema(){return BoxReference.encodingSchema}toEncodingData(){return new Map([["app",this.app],["name",this.name]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded BoxReference: ${_e}`);return new BoxReference({app:_e.get("app"),name:_e.get("name")})}}let BoxesResponse$1=class Ho{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"boxes",valueSchema:new ArraySchema(BoxDescriptor$1.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({boxes:_e}){this.boxes=_e}getEncodingSchema(){return Ho.encodingSchema}toEncodingData(){return new Map([["boxes",this.boxes.map(_e=>_e.toEncodingData())]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded BoxesResponse: ${_e}`);return new Ho({boxes:(_e.get("boxes")??[]).map($t=>BoxDescriptor$1.fromEncodingData($t))})}};class BuildVersion{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"branch",valueSchema:new StringSchema,omitEmpty:!0},{key:"build_number",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"channel",valueSchema:new StringSchema,omitEmpty:!0},{key:"commit_hash",valueSchema:new StringSchema,omitEmpty:!0},{key:"major",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"minor",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({branch:_e,buildNumber:$t,channel:Ft,commitHash:Vt,major:qt,minor:zt}){this.branch=_e,this.buildNumber=ensureSafeInteger($t),this.channel=Ft,this.commitHash=Vt,this.major=ensureSafeInteger(qt),this.minor=ensureSafeInteger(zt)}getEncodingSchema(){return BuildVersion.encodingSchema}toEncodingData(){return new Map([["branch",this.branch],["build_number",this.buildNumber],["channel",this.channel],["commit_hash",this.commitHash],["major",this.major],["minor",this.minor]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded BuildVersion: ${_e}`);return new BuildVersion({branch:_e.get("branch"),buildNumber:_e.get("build_number"),channel:_e.get("channel"),commitHash:_e.get("commit_hash"),major:_e.get("major"),minor:_e.get("minor")})}}class CompileResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"hash",valueSchema:new StringSchema,omitEmpty:!0},{key:"result",valueSchema:new StringSchema,omitEmpty:!0},{key:"sourcemap",valueSchema:new OptionalSchema(UntypedValue.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({hash:_e,result:$t,sourcemap:Ft}){this.hash=_e,this.result=$t,this.sourcemap=Ft}getEncodingSchema(){return CompileResponse.encodingSchema}toEncodingData(){return new Map([["hash",this.hash],["result",this.result],["sourcemap",typeof this.sourcemap<"u"?this.sourcemap.toEncodingData():void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded CompileResponse: ${_e}`);return new CompileResponse({hash:_e.get("hash"),result:_e.get("result"),sourcemap:typeof _e.get("sourcemap")<"u"?UntypedValue.fromEncodingData(_e.get("sourcemap")):void 0})}}class DisassembleResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"result",valueSchema:new StringSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({result:_e}){this.result=_e}getEncodingSchema(){return DisassembleResponse.encodingSchema}toEncodingData(){return new Map([["result",this.result]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded DisassembleResponse: ${_e}`);return new DisassembleResponse({result:_e.get("result")})}}class DryrunRequest{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"accounts",valueSchema:new ArraySchema(Account$1.encodingSchema),omitEmpty:!0},{key:"apps",valueSchema:new ArraySchema(Application$1.encodingSchema),omitEmpty:!0},{key:"latest-timestamp",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"protocol-version",valueSchema:new StringSchema,omitEmpty:!0}
1504,{key:"round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"sources",valueSchema:new ArraySchema(DryrunSource.encodingSchema),omitEmpty:!0},{key:"txns",valueSchema:new ArraySchema(SignedTransaction.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({accounts:_e,apps:$t,latestTimestamp:Ft,protocolVersion:Vt,round:qt,sources:zt,txns:Ht}){this.accounts=_e,this.apps=$t,this.latestTimestamp=ensureSafeInteger(Ft),this.protocolVersion=Vt,this.round=ensureBigInt(qt),this.sources=zt,this.txns=Ht}getEncodingSchema(){return DryrunRequest.encodingSchema}toEncodingData(){return new Map([["accounts",this.accounts.map(_e=>_e.toEncodingData())],["apps",this.apps.map(_e=>_e.toEncodingData())],["latest-timestamp",this.latestTimestamp],["protocol-version",this.protocolVersion],["round",this.round],["sources",this.sources.map(_e=>_e.toEncodingData())],["txns",this.txns.map(_e=>_e.toEncodingData())]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded DryrunRequest: ${_e}`);return new DryrunRequest({accounts:(_e.get("accounts")??[]).map($t=>Account$1.fromEncodingData($t)),apps:(_e.get("apps")??[]).map($t=>Application$1.fromEncodingData($t)),latestTimestamp:_e.get("latest-timestamp"),protocolVersion:_e.get("protocol-version"),round:_e.get("round"),sources:(_e.get("sources")??[]).map($t=>DryrunSource.fromEncodingData($t)),txns:(_e.get("txns")??[]).map($t=>SignedTransaction.fromEncodingData($t))})}}class DryrunResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"error",valueSchema:new StringSchema,omitEmpty:!0},{key:"protocol-version",valueSchema:new StringSchema,omitEmpty:!0},{key:"txns",valueSchema:new ArraySchema(DryrunTxnResult.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({error:_e,protocolVersion:$t,txns:Ft}){this.error=_e,this.protocolVersion=$t,this.txns=Ft}getEncodingSchema(){return DryrunResponse.encodingSchema}toEncodingData(){return new Map([["error",this.error],["protocol-version",this.protocolVersion],["txns",this.txns.map(_e=>_e.toEncodingData())]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded DryrunResponse: ${_e}`);return new DryrunResponse({error:_e.get("error"),protocolVersion:_e.get("protocol-version"),txns:(_e.get("txns")??[]).map($t=>DryrunTxnResult.fromEncodingData($t))})}}class DryrunSource{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"app-index",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"field-name",valueSchema:new StringSchema,omitEmpty:!0},{key:"source",valueSchema:new StringSchema,omitEmpty:!0},{key:"txn-index",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({appIndex:_e,fieldName:$t,source:Ft,txnIndex:Vt}){this.appIndex=ensureBigInt(_e),this.fieldName=$t,this.source=Ft,this.txnIndex=ensureSafeInteger(Vt)}getEncodingSchema(){return DryrunSource.encodingSchema}toEncodingData(){return new Map([["app-index",this.appIndex],["field-name",this.fieldName],["source",this.source],["txn-index",this.txnIndex]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded DryrunSource: ${_e}`);
1504return new DryrunSource({appIndex:_e.get("app-index"),fieldName:_e.get("field-name"),source:_e.get("source"),txnIndex:_e.get("txn-index")})}}class DryrunState{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"line",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"pc",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"stack",valueSchema:new ArraySchema(TealValue$1.encodingSchema),omitEmpty:!0},{key:"error",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"scratch",valueSchema:new OptionalSchema(new ArraySchema(TealValue$1.encodingSchema)),omitEmpty:!0})),this.encodingSchemaValue}constructor({line:_e,pc:$t,stack:Ft,error:Vt,scratch:qt}){this.line=ensureSafeInteger(_e),this.pc=ensureSafeInteger($t),this.stack=Ft,this.error=Vt,this.scratch=qt}getEncodingSchema(){return DryrunState.encodingSchema}toEncodingData(){return new Map([["line",this.line],["pc",this.pc],["stack",this.stack.map(_e=>_e.toEncodingData())],["error",this.error],["scratch",typeof this.scratch<"u"?this.scratch.map(_e=>_e.toEncodingData()):void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded DryrunState: ${_e}`);return new DryrunState({line:_e.get("line"),pc:_e.get("pc"),stack:(_e.get("stack")??[]).map($t=>TealValue$1.fromEncodingData($t)),error:_e.get("error"),scratch:typeof _e.get("scratch")<"u"?_e.get("scratch").map($t=>TealValue$1.fromEncodingData($t)):void 0})}}class DryrunTxnResult{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"disassembly",valueSchema:new ArraySchema(new StringSchema),omitEmpty:!0},{key:"app-call-messages",valueSchema:new OptionalSchema(new ArraySchema(new StringSchema)),omitEmpty:!0},{key:"app-call-trace",valueSchema:new OptionalSchema(new ArraySchema(DryrunState.encodingSchema)),omitEmpty:!0},{key:"budget-added",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"budget-consumed",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"global-delta",valueSchema:new OptionalSchema(new ArraySchema(EvalDeltaKeyValue$1.encodingSchema)),omitEmpty:!0},{key:"local-deltas",valueSchema:new OptionalSchema(new ArraySchema(AccountStateDelta$1.encodingSchema)),omitEmpty:!0},{key:"logic-sig-disassembly",valueSchema:new OptionalSchema(new ArraySchema(new StringSchema)),omitEmpty:!0},{key:"logic-sig-messages",valueSchema:new OptionalSchema(new ArraySchema(new StringSchema)),omitEmpty:!0},{key:"logic-sig-trace",valueSchema:new OptionalSchema(new ArraySchema(DryrunState.encodingSchema)),omitEmpty:!0},{key:"logs",valueSchema:new OptionalSchema(new ArraySchema(new ByteArraySchema)),omitEmpty:!0})),this.encodingSchemaValue}constructor({disassembly:_e,appCallMessages:$t,appCallTrace:Ft,budgetAdded:Vt,budgetConsumed:qt,globalDelta:zt,localDeltas:Ht,logicSigDisassembly:Kt,logicSigMessages:Gt,logicSigTrace:Jt,logs:Xt}){this.disassembly=_e,this.appCallMessages=$t,this.appCallTrace=Ft,this.budgetAdded=typeof Vt>"u"?void 0:ensureSafeInteger(Vt),this.budgetConsumed=typeof qt>"u"?void 0:ensureSafeInteger(qt),this.globalDelta=zt,this.localDeltas=Ht,this.logicSigDisassembly=Kt,this.logicSigMessages=Gt,this.logicSigTrace=Jt,this.logs=Xt}getEncodingSchema(){return DryrunTxnResult.encodingSchema}toEncodingData(){return new Map([["disassembly",this.disassembly],["app-call-messages",this.appCallMessages],["app-call-trace",typeof this.appCallTrace<"u"?this.appCallTrace.map(_e=>_e.toEncodingData()):void 0],["budget-added",this.budgetAdded],["budget-consumed",this.budgetConsumed],["global-delta",typeof this.globalDelta<"u"?this.globalDelta.map(_e=>_e.toEncodingData()):void 0],["local-deltas",typeof this.localDeltas<"u"?this.localDeltas.map(_e=>_e.toEncodingData()):void 0],["logic-sig-disassembly",this.logicSigDisassembly],["logic-sig-messages",this.logicSigMessages],["logic-sig-trace",typeof this.logicSigTrace<"u"?this.logicSigTrace.map(_e=>_e.toEncodingData()):void 0],["logs",this.logs]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded DryrunTxnResult: ${_e}`);return new DryrunTxnResult({disassembly:_e.get("disassembly"),appCallMessages:_e.get("app-call-messages"),appCallTrace:typeof _e.get("app-call-trace")<"u"?_e.get("app-call-trace").map($t=>DryrunState.fromEncodingData($t)):void 0,budgetAdded:_e.get("budget-added"),budgetConsumed:_e.get("budget-consumed"),globalDelta:typeof _e.get("global-delta")<"u"?_e.get("global-delta").map($t=>EvalDeltaKeyValue$1.fromEncodingData($t)):void 0,localDeltas:typeof _e.get("local-deltas")<"u"?_e.get("local-deltas").map($t=>AccountStateDelta$1.fromEncodingData($t)):void 0,logicSigDisassembly:_e.get("logic-sig-disassembly"),logicSigMessages:_e.get("logic-sig-messages"),logicSigTrace:typeof _e.get("logic-sig-trace")<"u"?_e.get("logic-sig-trace").map($t=>DryrunState.fromEncodingData($t)):void 0,logs:_e.get("logs")})}}let ErrorResponse$1=class Go{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"message",valueSchema:new StringSchema,omitEmpty:!0},{key:"data",valueSchema:new OptionalSchema(UntypedValue.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({message:_e,data:$t}){this.message=_e,this.data=$t}getEncodingSchema(){return Go.encodingSchema}toEncodingData(){return new Map([["message",this.message],["data",typeof this.data<"u"?this.data.toEncodingData():void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ErrorResponse: ${_e}`);return new Go({message:_e.get("message"),data:typeof _e.get("data")<"u"?UntypedValue.from
1504EncodingData(_e.get("data")):void 0})}},EvalDelta$1=class Ko{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"action",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"bytes",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"uint",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({action:_e,bytes:$t,uint:Ft}){this.action=ensureSafeInteger(_e),this.bytes=$t,this.uint=typeof Ft>"u"?void 0:ensureBigInt(Ft)}getEncodingSchema(){return Ko.encodingSchema}toEncodingData(){return new Map([["action",this.action],["bytes",this.bytes],["uint",this.uint]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded EvalDelta: ${_e}`);return new Ko({action:_e.get("action"),bytes:_e.get("bytes"),uint:_e.get("uint")})}},EvalDeltaKeyValue$1=class Yo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"key",valueSchema:new StringSchema,omitEmpty:!0},{key:"value",valueSchema:EvalDelta$1.encodingSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({key:_e,value:$t}){this.key=_e,this.value=$t}getEncodingSchema(){return Yo.encodingSchema}toEncodingData(){return new Map([["key",this.key],["value",this.value.toEncodingData()]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded EvalDeltaKeyValue: ${_e}`);return new Yo({key:_e.get("key"),value:EvalDelta$1.fromEncodingData(_e.get("value")??new Map)})}},Genesis$1=class Jo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"alloc",valueSchema:new ArraySchema(GenesisAllocation.encodingSchema),omitEmpty:!0},{key:"fees",valueSchema:new StringSchema,omitEmpty:!0},{key:"id",valueSchema:new StringSchema,omitEmpty:!0},{key:"network",valueSchema:new StringSchema,omitEmpty:!0},{key:"proto",valueSchema:new StringSchema,omitEmpty:!0},{key:"rwd",valueSchema:new StringSchema,omitEmpty:!0},{key:"timestamp",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"comment",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"devmode",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({alloc:_e,fees:$t,id:Ft,network:Vt,proto:qt,rwd:zt,timestamp:Ht,comment:Kt,devmode:Gt}){this.alloc=_e,this.fees=$t,this.id=Ft,this.network=Vt,this.proto=qt,this.rwd=zt,this.timestamp=ensureSafeInteger(Ht),this.comment=Kt,this.devmode=Gt}getEncodingSchema(){return Jo.encodingSchema}toEncodingData(){return new Map([["alloc",this.alloc.map(_e=>_e.toEncodingData())],["fees",this.fees],["id",this.id],["network",this.network],["proto",this.proto],["rwd",this.rwd],["timestamp",this.timestamp],["comment",this.comment],["devmode",this.devmode]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded Genesis: ${_e}`);return new Jo({alloc:(_e.get("alloc")??[]).map($t=>GenesisAllocation.fromEncodingData($t)),fees:_e.get("fees"),id:_e.get("id"),network:_e.get("network"),proto:_e.get("proto"),rwd:_e.get("rwd"),timestamp:_e.get("timestamp"),comment:_e.get("comment"),devmode:_e.get("devmode")})}};class GenesisAllocation{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"addr",valueSchema:new StringSchema,omitEmpty:!0},{key:"comment",valueSchema:new StringSchema,omitEmpty:!0},{key:"state",valueSchema:UntypedValue.encodingSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({addr:_e,comment:$t,state:Ft}){this.addr=_e,this.comment=$t,this.state=Ft}getEncodingSchema(){return GenesisAllocation.encodingSchema}toEncodingData(){return new Map([["addr",this.addr],["comment",this.comment],["state",this.state.toEncodingData()]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded GenesisAllocation: ${_e}`);return new GenesisAllocation({addr:_e.get("addr"),comment:_e.get("comment"),state:UntypedValue.from
1504EncodingData(_e.get("state")??new Map)})}}class GetBlockTimeStampOffsetResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"offset",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({offset:_e}){this.offset=ensureSafeInteger(_e)}getEncodingSchema(){return GetBlockTimeStampOffsetResponse.encodingSchema}toEncodingData(){return new Map([["offset",this.offset]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded GetBlockTimeStampOffsetResponse: ${_e}`);return new GetBlockTimeStampOffsetResponse({offset:_e.get("offset")})}}class GetSyncRoundResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"round",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({round:_e}){this.round=ensureBigInt(_e)}getEncodingSchema(){return GetSyncRoundResponse.encodingSchema}toEncodingData(){return new Map([["round",this.round]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded GetSyncRoundResponse: ${_e}`);return new GetSyncRoundResponse({round:_e.get("round")})}}class LedgerStateDeltaForTransactionGroup{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"Delta",valueSchema:LedgerStateDelta.encodingSchema,omitEmpty:!0},{key:"Ids",valueSchema:new ArraySchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({delta:_e,ids:$t}){this.delta=_e,this.ids=$t}getEncodingSchema(){return LedgerStateDeltaForTransactionGroup.encodingSchema}toEncodingData(){return new Map([["Delta",this.delta.toEncodingData()],["Ids",this.ids]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded LedgerStateDeltaForTransactionGroup: ${_e}`);return new LedgerStateDeltaForTransactionGroup({delta:LedgerStateDelta.fromEncodingData(_e.get("Delta")??new Map),ids:_e.get("Ids")})}}let LightBlockHeaderProof$1=class Xo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"index",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"proof",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"treedepth",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({index:_e,proof:$t,treedepth:Ft}){this.index=ensureSafeInteger(_e),this.proof=typeof $t=="string"?base64ToBytes($t):$t,this.treedepth=ensureSafeInteger(Ft)}getEncodingSchema(){return Xo.encodingSchema}toEncodingData(){return new Map([["index",this.index],["proof",this.proof],["treedepth",this.treedepth]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded LightBlockHeaderProof: ${_e}`);return new Xo({index:_e.get("index"),proof:_e.get("proof"),treedepth:_e.get("treedepth")})}};class NodeStatusResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"catchup-time",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"last-round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"last-version",valueSchema:new StringSchema,omitEmpty:!0},{key:"next-version",valueSchema:new StringSchema,omitEmpty:!0},{key:"next-version-round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"next-version-supported",valueSchema:new BooleanSchema,omitEmpty:!0},{key:"stopped-at-unsupported-round",valueSchema:new BooleanSchema,omitEmpty:!0},{key:"time-since-last-round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"catchpoint",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"catchpoint-acquired-blocks",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"catchpoint-processed-accounts",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"catchpoint-processed-kvs",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"catchpoint-total-accounts",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"catchpoint-total-blocks",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"catchpoint-total-kvs",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"catchpoint-verified-accounts",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"catchpoint-verified-kvs",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"last-catchpoint",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"upgrade-delay",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"upgrade-next-protocol-vote-before",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"upgrade-no-votes",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0}
1504,{key:"upgrade-node-vote",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"upgrade-vote-rounds",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"upgrade-votes",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"upgrade-votes-required",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"upgrade-yes-votes",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({catchupTime:_e,lastRound:$t,lastVersion:Ft,nextVersion:Vt,nextVersionRound:qt,nextVersionSupported:zt,stoppedAtUnsupportedRound:Ht,timeSinceLastRound:Kt,catchpoint:Gt,catchpointAcquiredBlocks:Jt,catchpointProcessedAccounts:Xt,catchpointProcessedKvs:Zt,catchpointTotalAccounts:er,catchpointTotalBlocks:tr,catchpointTotalKvs:rr,catchpointVerifiedAccounts:ar,catchpointVerifiedKvs:nr,lastCatchpoint:cr,upgradeDelay:fr,upgradeNextProtocolVoteBefore:vr,upgradeNoVotes:xr,upgradeNodeVote:Sr,upgradeVoteRounds:Tr,upgradeVotes:Br,upgradeVotesRequired:jr,upgradeYesVotes:Rr}){this.catchupTime=ensureBigInt(_e),this.lastRound=ensureBigInt($t),this.lastVersion=Ft,this.nextVersion=Vt,this.nextVersionRound=ensureBigInt(qt),this.nextVersionSupported=zt,this.stoppedAtUnsupportedRound=Ht,this.timeSinceLastRound=ensureBigInt(Kt),this.catchpoint=Gt,this.catchpointAcquiredBlocks=typeof Jt>"u"?void 0:ensureSafeInteger(Jt),this.catchpointProcessedAccounts=typeof Xt>"u"?void 0:ensureSafeInteger(Xt),this.catchpointProcessedKvs=typeof Zt>"u"?void 0:ensureSafeInteger(Zt),this.catchpointTotalAccounts=typeof er>"u"?void 0:ensureSafeInteger(er),this.catchpointTotalBlocks=typeof tr>"u"?void 0:ensureSafeInteger(tr),this.catchpointTotalKvs=typeof rr>"u"?void 0:ensureSafeInteger(rr),this.catchpointVerifiedAccounts=typeof ar>"u"?void 0:ensureSafeInteger(ar),this.catchpointVerifiedKvs=typeof nr>"u"?void 0:ensureSafeInteger(nr),this.lastCatchpoint=cr,this.upgradeDelay=typeof fr>"u"?void 0:ensureBigInt(fr),this.upgradeNextProtocolVoteBefore=typeof vr>"u"?void 0:ensureBigInt(vr),this.upgradeNoVotes=typeof xr>"u"?void 0:ensureSafeInteger(xr),this.upgradeNodeVote=Sr,this.upgradeVoteRounds=typeof Tr>"u"?void 0:ensureSafeInteger(Tr),this.upgradeVotes=typeof Br>"u"?void 0:ensureSafeInteger(Br),this.upgradeVotesRequired=typeof jr>"u"?void 0:ensureSafeInteger(jr),this.upgradeYesVotes=typeof Rr>"u"?void 0:ensureSafeInteger(Rr)}getEncodingSchema(){return NodeStatusResponse.encodingSchema}toEncodingData(){return new Map([["catchup-time",this.catchupTime],["last-round",this.lastRound],["last-version",this.lastVersion],["next-version",this.nextVersion],["next-version-round",this.nextVersionRound],["next-version-supported",this.nextVersionSupported],["stopped-at-unsupported-round",this.stoppedAtUnsupportedRound],["time-since-last-round",this.timeSinceLastRound],["catchpoint",this.catchpoint],["catchpoint-acquired-blocks",this.catchpointAcquiredBlocks],["catchpoint-processed-accounts",this.catchpointProcessedAccounts],["catchpoint-processed-kvs",this.catchpointProcessedKvs],["catchpoint-total-accounts",this.catchpointTotalAccounts],["catchpoint-total-blocks",this.catchpointTotalBlocks],["catchpoint-total-kvs",this.catchpointTotalKvs],["catchpoint-verified-accounts",this.catchpointVerifiedAccounts],["catchpoint-verified-kvs",this.catchpointVerifiedKvs],["last-catchpoint",this.lastCatchpoint],["upgrade-delay",this.upgradeDelay],["upgrade-next-protocol-vote-before",this.upgradeNextProtocolVoteBefore],["upgrade-no-votes",this.upgradeNoVotes],["upgrade-node-vote",this.upgradeNodeVote],["upgrade-vote-rounds",this.upgradeVoteRounds],["upgrade-votes",this.upgradeVotes],["upgrade-votes-required",this.upgradeVotesRequired],["upgrade-yes-votes",this.upgradeYesVotes]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded NodeStatusResponse: ${_e}`);return new NodeStatusResponse({catchupTime:_e.get("catchup-time"),lastRound:_e.get("last-round"),lastVersion:_e.get("last-version"),nextVersion:_e.get("next-version"),nextVersionRound:_e.get("next-version-round"),nextVersionSupported:_e.get("next-version-supported"),stoppedAtUnsupportedRound:_e.get("stopped-at-unsupported-round"),timeSinceLastRound:_e.get("time-since-last-round"),catchpoint:_e.get("catchpoint"),catchpointAcquiredBlocks:_e.get("catchpoint-acquired-blocks"),catchpointProcessedAccounts:_e.get("catchpoint-processed-accounts"),catchpointProcessedKvs:_e.get("catchpoint-processed-kvs"),catchpointTotalAccounts:_e.get("catchpoint-total-accounts"),catchpointTotalBlocks:_e.get("catchpoint-total-blocks"),catchpointTotalKvs:_e.get("catchpoint-total-kvs"),catchpointVerifiedAccounts:_e.get("catchpoint-verified-accounts"),catchpointVerifiedKvs:_e.get("catchpoint-verified-kvs"),lastCatchpoint:_e.get("last-catchpoint"),upgradeDelay:_e.get("upgrade-delay"),upgradeNextProtocolVoteBefore:_e.get("upgrade-next-protocol-vote-before"),upgradeNoVotes:_e.get("upgrade-no-votes"),upgradeNodeVote:_e.get("upgrade-node
1504-vote"),upgradeVoteRounds:_e.get("upgrade-vote-rounds"),upgradeVotes:_e.get("upgrade-votes"),upgradeVotesRequired:_e.get("upgrade-votes-required"),upgradeYesVotes:_e.get("upgrade-yes-votes")})}}class PendingTransactionResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"pool-error",valueSchema:new StringSchema,omitEmpty:!0},{key:"txn",valueSchema:SignedTransaction.encodingSchema,omitEmpty:!0},{key:"application-index",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"asset-closing-amount",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"asset-index",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"close-rewards",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"closing-amount",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"confirmed-round",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"global-state-delta",valueSchema:new OptionalSchema(new ArraySchema(EvalDeltaKeyValue$1.encodingSchema)),omitEmpty:!0},{key:"inner-txns",valueSchema:new OptionalSchema(new ArraySchema(PendingTransactionResponse.encodingSchema)),omitEmpty:!0},{key:"local-state-delta",valueSchema:new OptionalSchema(new ArraySchema(AccountStateDelta$1.encodingSchema)),omitEmpty:!0},{key:"logs",valueSchema:new OptionalSchema(new ArraySchema(new ByteArraySchema)),omitEmpty:!0},{key:"receiver-rewards",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"sender-rewards",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({poolError:_e,txn:$t,applicationIndex:Ft,assetClosingAmount:Vt,assetIndex:qt,closeRewards:zt,closingAmount:Ht,confirmedRound:Kt,globalStateDelta:Gt,innerTxns:Jt,localStateDelta:Xt,logs:Zt,receiverRewards:er,senderRewards:tr}){this.poolError=_e,this.txn=$t,this.applicationIndex=typeof Ft>"u"?void 0:ensureBigInt(Ft),this.assetClosingAmount=typeof Vt>"u"?void 0:ensureBigInt(Vt),this.assetIndex=typeof qt>"u"?void 0:ensureBigInt(qt),this.closeRewards=typeof zt>"u"?void 0:ensureBigInt(zt),this.closingAmount=typeof Ht>"u"?void 0:ensureBigInt(Ht),this.confirmedRound=typeof Kt>"u"?void 0:ensureBigInt(Kt),this.globalStateDelta=Gt,this.innerTxns=Jt,this.localStateDelta=Xt,this.logs=Zt,this.receiverRewards=typeof er>"u"?void 0:ensureBigInt(er),this.senderRewards=typeof tr>"u"?void 0:ensureBigInt(tr)}getEncodingSchema(){return PendingTransactionResponse.encodingSchema}toEncodingData(){return new Map([["pool-error",this.poolError],["txn",this.txn.toEncodingData()],["application-index",this.applicationIndex],["asset-closing-amount",this.assetClosingAmount],["asset-index",this.assetIndex],["close-rewards",this.closeRewards],["closing-amount",this.closingAmount],["confirmed-round",this.confirmedRound],["global-state-delta",typeof this.globalStateDelta<"u"?this.globalStateDelta.map(_e=>_e.toEncodingData()):void 0],["inner-txns",typeof this.innerTxns<"u"?this.innerTxns.map(_e=>_e.toEncodingData()):void 0],["local-state-delta",typeof this.localStateDelta<"u"?this.localStateDelta.map(_e=>_e.toEncodingData()):void 0],["logs",this.logs],["receiver-rewards",this.receiverRewards],["sender-rewards",this.senderRewards]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded PendingTransactionResponse: ${_e}`);return new PendingTransactionResponse({poolError:_e.get("pool-error"),txn:SignedTransaction.fromEncodingData(_e.get("txn")??new Map),applicationIndex:_e.get("application-index"),assetClosingAmount:_e.get("asset-closing-amount"),assetIndex:_e.get("asset-index"),closeRewards:_e.get("close-rewards"),closingAmount:_e.get("closing-amount"),confirmedRound:_e.get("confirmed-round"),globalStateDelta:typeof _e.get("global-state-delta")<"u"?_e.get("global-state-delta").map($t=>EvalDeltaKeyValue$1.fromEncodingData($t)):void 0,innerTxns:typeof _e.get("inner-txns")<"u"?_e.get("inner-txns").map($t=>PendingTransactionResponse.fromEncodingData($t)):void 0,localStateDelta:typeof _e.get("local-state-delta")<"u"?_e.get("local-state-delta").map($t=>AccountStateDelta$1.fromEncodingData($t)):void 0,logs:_e.get("logs"),receiverRewards:_e.get("receiver-rewards"),senderRewards:_e.get("sender-rewards")})}}class PendingTransactionsResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"top-transactions",valueSchema:new ArraySchema(SignedTransaction.encodingSchema),omitEmpty:!0},{key:"total-transactions",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({topTransactions:_e,totalTransactions:$t}){this.topTransactions=_e,this.totalTransactions=ensureSafeInteger($t)}getEncodingSchema(){return PendingTransactionsResponse.encodingSchema}toEncodingData(){return new Map([["top-transactions",this.topTransactions.map(_e=>_e.toEncodingData())],["total-transactions",this.totalTransactions]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded PendingTransactionsResponse: ${_e}`);return new PendingTransactionsResponse({topTransactions:(_e.get("top-transactions")??[]).map($t=>SignedTransaction.fromEncodingData($t)),totalTransactions:_e.get("total-transactions")})}}class PostTransactionsResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"txId",valueSchema:new StringSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({txid:_e}){this.txid=_e}getEncodingSchema(){return PostTransactionsResponse.encodingSchema}toEncodingData(){return new Map([["txId",this.txid]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded PostTransactionsResponse: ${_e}`);return new PostTransactionsResponse({txid:_e.get("txId")})}}class ScratchChange{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"new-value",valueSchema:AvmValue.encodingSchema,omitEmpty:!0},{key:"slot",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({newValue:_e,slot:$t}){this.newValue=_e,this.slot=ensureSafeInteger($t)}getEncodingSchema(){return ScratchChange.encodingSchema}toEncodingData(){return new Map([["new-value",this.newValue.toEncodingData()],["slot",this.slot]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ScratchChange: ${_e}`);
1504return new ScratchChange({newValue:AvmValue.fromEncodingData(_e.get("new-value")??new Map),slot:_e.get("slot")})}}class SimulateInitialStates{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"app-initial-states",valueSchema:new OptionalSchema(new ArraySchema(ApplicationInitialStates.encodingSchema)),omitEmpty:!0})),this.encodingSchemaValue}constructor({appInitialStates:_e}){this.appInitialStates=_e}getEncodingSchema(){return SimulateInitialStates.encodingSchema}toEncodingData(){return new Map([["app-initial-states",typeof this.appInitialStates<"u"?this.appInitialStates.map(_e=>_e.toEncodingData()):void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded SimulateInitialStates: ${_e}`);return new SimulateInitialStates({appInitialStates:typeof _e.get("app-initial-states")<"u"?_e.get("app-initial-states").map($t=>ApplicationInitialStates.fromEncodingData($t)):void 0})}}class SimulateRequest{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"txn-groups",valueSchema:new ArraySchema(SimulateRequestTransactionGroup.encodingSchema),omitEmpty:!0},{key:"allow-empty-signatures",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"allow-more-logging",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"allow-unnamed-resources",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"exec-trace-config",valueSchema:new OptionalSchema(SimulateTraceConfig.encodingSchema),omitEmpty:!0},{key:"extra-opcode-budget",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"fix-signers",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"round",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({txnGroups:_e,allowEmptySignatures:$t,allowMoreLogging:Ft,allowUnnamedResources:Vt,execTraceConfig:qt,extraOpcodeBudget:zt,fixSigners:Ht,round:Kt}){this.txnGroups=_e,this.allowEmptySignatures=$t,this.allowMoreLogging=Ft,this.allowUnnamedResources=Vt,this.execTraceConfig=qt,this.extraOpcodeBudget=typeof zt>"u"?void 0:ensureSafeInteger(zt),this.fixSigners=Ht,this.round=typeof Kt>"u"?void 0:ensureBigInt(Kt)}getEncodingSchema(){return SimulateRequest.encodingSchema}toEncodingData(){return new Map([["txn-groups",this.txnGroups.map(_e=>_e.toEncodingData())],["allow-empty-signatures",this.allowEmptySignatures],["allow-more-logging",this.allowMoreLogging],["allow-unnamed-resources",this.allowUnnamedResources],["exec-trace-config",typeof this.execTraceConfig<"u"?this.execTraceConfig.toEncodingData():void 0],["extra-opcode-budget",this.extraOpcodeBudget],["fix-signers",this.fixSigners],["round",this.round]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded SimulateRequest: ${_e}`);return new SimulateRequest({txnGroups:(_e.get("txn-groups")??[]).map($t=>SimulateRequestTransactionGroup.fromEncodingData($t)),allowEmptySignatures:_e.get("allow-empty-signatures"),allowMoreLogging:_e.get("allow-more-logging"),allowUnnamedResources:_e.get("allow-unnamed-resources"),execTraceConfig:typeof _e.get("exec-trace-config")<"u"?SimulateTraceConfig.fromEncodingData(_e.get("exec-trace-config")):void 0,extraOpcodeBudget:_e.get("extra-opcode-budget"),fixSigners:_e.get("fix-signers"),round:_e.get("round")})}}class SimulateRequestTransactionGroup{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"txns",valueSchema:new ArraySchema(SignedTransaction.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({txns:_e}){this.txns=_e}getEncodingSchema(){return SimulateRequestTransactionGroup.encodingSchema}toEncodingData(){return new Map([["txns",this.txns.map(_e=>_e.toEncodingData())]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded SimulateRequestTransactionGroup: ${_e}`);return new SimulateRequestTransactionGroup({txns:(_e.get("txns")??[]).map($t=>SignedTransaction.fromEncodingData($t))})}}class SimulateResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"last-round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"txn-groups",valueSchema:new ArraySchema(SimulateTransactionGroupResult.encodingSchema),omitEmpty:!0},{key:"version",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"eval-overrides",valueSchema:new OptionalSchema(SimulationEvalOverrides.encodingSchema),omitEmpty:!0},{key:"exec-trace-config",valueSchema:new OptionalSchema(SimulateTraceConfig.encodingSchema),omitEmpty:!0},{key:"initial-states",valueSchema:new OptionalSchema(SimulateInitialStates.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({lastRound:_e,txnGroups:$t,version:Ft,evalOverrides:Vt,execTraceConfig:qt,initialStates:zt}){this.lastRound=ensureBigInt(_e),this.txnGroups=$t,this.version=ensureSafeInteger(Ft),this.evalOverrides=Vt,this.execTraceConfig=qt,this.initialStates=zt}getEncodingSchema(){return SimulateResponse.encodingSchema}toEncodingData(){return new Map([["last-round",this.lastRound],["txn-groups",this.txnGroups.map(_e=>_e.toEncodingData())],["version",this.version],["eval-overrides",typeof this.evalOverrides<"u"?this.evalOverrides.toEncodingData():void 0],["exec-trace-config",typeof this.execTraceConfig<"u"?this.execTraceConfig.toEncodingData():void 0],["initial-states",typeof this.initialStates<"u"?this.initialStates.toEncodingData():void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded SimulateResponse: ${_e}`);return new SimulateResponse({lastRound:_e.get("last-round"),txnGroups:(_e.get("txn-groups")??[]).map($t=>SimulateTransactionGroupResult.fromEncodingData($t)),version:_e.get("version"),evalOverrides:typeof _e.get("eval-overrides")<"u"?SimulationEvalOverrides.fromEncodingData(_e.get("eval-overrides")):void 0,execTraceConfig:typeof _e.get("exec-trace-config")<"u"?SimulateTraceConfig.fromEncodingData(_e.get("exec-trace-config")):void 0,initialStates:typeof _e.get("initial-states")<"u"?SimulateInitialStates.fromEncodingData(_e.get("initial-states")):void 0})}}class SimulateTraceConfig{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"enable",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"scratch-change",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"stack-change",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"state-change",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({enable:_e,scratchChange:$t,stackChange:Ft,stateChange:Vt}){this.enable=_e,this.scratchChange=$t,this.stackChange=Ft,this.stateChange=Vt}getEncodingSchema(){return SimulateTraceConfig.encodingSchema}toEncodingData(){return new Map([["enable",this.enable],["scratch-change",this.scratchChange],["stack-change",this.stackChange],["state-change",this.stateChange]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded SimulateTraceConfig: ${_e}`);return new SimulateTraceConfig({enable:_e.get("enable"),scratchChange:_e.get("scratch-change"),stackChange:_e.get("stack-change"),stateChange:_e.get("state-change")})}}class SimulateTransactionGroupResult{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"txn-results",valueSchema:new ArraySchema(SimulateTransactionResult.encodingSchema),omitEmpty:!0},{key:"app-budget-added",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"app-budget-consumed",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"failed-at",valueSchema:new OptionalSchema(new ArraySchema(new Uint64Schema)),omitEmpty:!0},{key:"failure-message",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"unnamed-resources-accessed",valueSchema:new OptionalSchema(SimulateUnnamedResourcesAccessed.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({txnResults:_e,appBudgetAdded:$t,appBudgetConsumed:Ft,failedAt:Vt,failureMessage:qt,unnamedResourcesAccessed:zt}){this.txnResults=_e,this.appBudgetAdded=typeof $t>"u"?void 0:ensureSafeInteger($t),this.appBudgetConsumed=typeof Ft>"u"?void 0:ensureSafeInteger(Ft),this.failedAt=typeof Vt>"u"?void 0:Vt.map(ensureSafeInteger),this.failureMessage=qt,this.unnamedResourcesAccessed=zt}getEncodingSchema(){return SimulateTransactionGroupResult.encodingSchema}toEncodingData(){return new Map([["txn-results",this.txnResults.map(_e=>_e.toEncodingData())],["app-budget-added",this.appBudgetAdded],["app-budget-consumed",this.appBudgetConsumed],["failed-at",this.failedAt],["failure-message",this.failureMessage],["unnamed-resources-accessed",typeof this.unnamedResourcesAccessed<"u"?this.unnamedResourcesAccessed.toEncodingData():void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded SimulateTransactionGroupResult: ${_e}`);return new SimulateTransactionGroupResult({txnResults:(_e.get("txn-results")??[]).map($t=>SimulateTransactionResult.fromEncodingData($t)),appBudgetAdded:_e.get("app-budget-added"),appBudgetConsumed:_e.get("app-budget-consumed"),failedAt:_e.get("failed-at"),failureMessage:_e.get("failure-message"),unnamedResourcesAccessed:typeof _e.get("unnamed-resources-accessed")<"u"?SimulateUnnamedResourcesAccessed.fromEncodingData(_e.get("unnamed-resources-accessed")):void 0})}}class SimulateTransactionResult{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"txn-result",valueSchema:PendingTransactionResponse.encodingSchema,omitEmpty:!0},{key:"app-budget-consumed",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"exec-trace",valueSchema:new OptionalSchema(SimulationTransactionExecTrace.encodingSchema),omitEmpty:!0},{key:"fixed-signer",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"logic-sig-budget-consumed",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"unnamed-resources-accessed",valueSchema:new OptionalSchema(SimulateUnnamedResourcesAccessed.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({txnResult:_e,appBudgetConsumed:$t,execTrace:Ft,fixedSigner:Vt,logicSigBudgetConsumed:qt,unnamedResourcesAccessed:zt}){this.txnResult=_e,this.appBudgetConsumed=typeof $t>"u"?void 0:ensureSafeInteger($t),this.execTrace=Ft,this.fixedSigner=typeof Vt=="string"?Address.fromString(Vt):Vt,this.logicSigBudgetConsumed=typeof qt>"u"?void 0:ensureSafeInteger(qt),this.unnamedResourcesAccessed=zt}getEncodingSchema(){return SimulateTransactionResult.encodingSchema}toEncodingData(){return new Map([["txn-result",this.txnResult.toEncodingData()],["app-budget-consumed",this.appBudgetConsumed],["exec-trace",typeof this.execTrace<"u"?this.execTrace.toEncodingData():void 0],["fixed-signer",typeof this.fixedSigner<"u"?this.fixedSigner.toString():void 0],["logic-sig-budget-consumed",this.logicSigBudgetConsumed],["unnamed-resources-accessed",typeof this.unnamedResourcesAccessed<"u"?this.unnamedResourcesAccessed.toEncodingData():void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded SimulateTransactionResult: ${_e}`);return new SimulateTransactionResult({txnResult:PendingTransactionResponse.fromEncodingData(_e.get("txn-result")??new Map),appBudgetConsumed:_e.get("app-budget-consumed"),execTrace:typeof _e.get("exec-trace")<"u"?SimulationTransactionExecTrace.fromEncodingData(_e.get("exec-trace")):void 0,fixedSigner:_e.get("fixed-signer"),logicSigBudgetConsumed:_e.get("logic-sig-budget-consumed"),unnamedResourcesAccessed:typeof _e.get("unnamed-resources-accessed")<"u"?SimulateUnnamedResourcesAccessed.fromEncodingData(_e.get("unnamed-resources-accessed")):void 0})}}class SimulateUnnamedResourcesAccessed{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"accounts",valueSchema:new OptionalSchema(new ArraySchema(new StringSchema)),omitEmpty:!0},{key:"app-locals",valueSchema:new OptionalSchema(new ArraySchema(ApplicationLocalReference.encodingSchema)),omitEmpty:!0},{key:"apps",valueSchema:new OptionalSchema(new ArraySchema(new Uint64Schema)),omitEmpty:!0},{key:"asset-holdings",valueSchema:new OptionalSchema(new ArraySchema(AssetHoldingReference.encodingSchema)),omitEmpty:!0},{key:"assets",valueSchema:new OptionalSchema(new ArraySchema(new Uint64Schema)),omitEmpty:!0},{key:"boxes",valueSchema:new OptionalSchema(new ArraySchema(BoxReference.encodingSchema)),omitEmpty:!0},{key:"extra-box-refs",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({accounts:_e,appLocals:$t,apps:Ft,assetHoldings:Vt,assets:qt,boxes:zt,extraBoxRefs:Ht}){this.accounts=typeof _e<"u"?_e.map(Kt=>typeof Kt=="string"?Address.fromString(Kt):Kt):void 0,this.appLocals=$t,this.apps=typeof Ft>"u"?void 0:Ft.map(ensureBigInt),this.assetHoldings=Vt,this.assets=typeof qt>"u"?void 0:qt.map(ensureBigInt),this.boxes=zt,this.extraBoxRefs=typeof Ht>"u"?void 0:ensureSafeInteger(Ht)}getEncodingSchema(){return SimulateUnnamedResourcesAccessed.encodingSchema}toEncodingData(){return new Map([["accounts",typeof this.accounts<"u"?this.accounts.map(_e=>_e.toString()):void 0],["app-locals",typeof this.appLocals<"u"?this.appLocals.map(_e=>_e.toEncodingData()):void 0],["apps",this.apps],["asset-holdings",typeof this.assetHoldings<"u"?this.assetHoldings.map(_e=>_e.toEncodingData()):void 0],["assets",this.assets],["boxes",typeof this.boxes<"u"?this.boxes.map(_e=>_e.toEncodingData()):void 0],["extra-box-refs",this.extraBoxRefs]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded SimulateUnnamedResourcesAccessed: ${_e}`);return new SimulateUnnamedResourcesAccessed({accounts:_e.get("accounts"),appLocals:typeof _e.get("app-locals")<"u"?_e.get("app-locals").map($t=>ApplicationLocalReference.fromEncodingData($t)):void 0,apps:_e.get("apps"),assetHoldings:typeof _e.get("asset-holdings")<"u"?_e.get("asset-holdings").map($t=>AssetHoldingReference.fromEncodingData($t)):void 0,assets:_e.get("assets"),boxes:typeof _e.get("boxes")<"u"?_e.get("boxes").map($t=>BoxReference.fromEncodingData($t)):void 0,extraBoxRefs:_e.get("extra-box-refs")})}}class SimulationEvalOverrides{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"allow-empty-signatures",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"allow-unnamed-resources",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"extra-opcode-budget",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"fix-signers",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"max-log-calls",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"max-log-size",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({allowEmptySignatures:_e,allowUnnamedResources:$t,extraOpcodeBudget:Ft,fixSigners:Vt,maxLogCalls:qt,maxLogSize:zt}){this.allowEmptySignatures=_e,this.allowUnnamedResources=$t,this.extraOpcodeBudget=typeof Ft>"u"?void 0:ensureSafeInteger(Ft),this.fixSigners=Vt,this.maxLogCalls=typeof qt>"u"?void 0:ensureSafeInteger(qt),this.maxLogSize=typeof zt>"u"?void 0:ensureSafeInteger(zt)}getEncodingSchema(){return SimulationEvalOverrides.encodingSchema}toEncodingData(){return new Map([["allow-empty-signatures",this.allowEmptySignatures],["allow-unnamed-resources",this.allowUnnamedResources],["extra-opcode-budget",this.extraOpcodeBudget],["fix-signers",this.fixSigners],["max-log-calls",this.maxLogCalls],["max-log-size",this.maxLogSize]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded SimulationEvalOverrides: ${_e}`);re
1504turn new SimulationEvalOverrides({allowEmptySignatures:_e.get("allow-empty-signatures"),allowUnnamedResources:_e.get("allow-unnamed-resources"),extraOpcodeBudget:_e.get("extra-opcode-budget"),fixSigners:_e.get("fix-signers"),maxLogCalls:_e.get("max-log-calls"),maxLogSize:_e.get("max-log-size")})}}class SimulationOpcodeTraceUnit{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"pc",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"scratch-changes",valueSchema:new OptionalSchema(new ArraySchema(ScratchChange.encodingSchema)),omitEmpty:!0},{key:"spawned-inners",valueSchema:new OptionalSchema(new ArraySchema(new Uint64Schema)),omitEmpty:!0},{key:"stack-additions",valueSchema:new OptionalSchema(new ArraySchema(AvmValue.encodingSchema)),omitEmpty:!0},{key:"stack-pop-count",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"state-changes",valueSchema:new OptionalSchema(new ArraySchema(ApplicationStateOperation.encodingSchema)),omitEmpty:!0})),this.encodingSchemaValue}constructor({pc:_e,scratchChanges:$t,spawnedInners:Ft,stackAdditions:Vt,stackPopCount:qt,stateChanges:zt}){this.pc=ensureSafeInteger(_e),this.scratchChanges=$t,this.spawnedInners=typeof Ft>"u"?void 0:Ft.map(ensureSafeInteger),this.stackAdditions=Vt,this.stackPopCount=typeof qt>"u"?void 0:ensureSafeInteger(qt),this.stateChanges=zt}getEncodingSchema(){return SimulationOpcodeTraceUnit.encodingSchema}toEncodingData(){return new Map([["pc",this.pc],["scratch-changes",typeof this.scratchChanges<"u"?this.scratchChanges.map(_e=>_e.toEncodingData()):void 0],["spawned-inners",this.spawnedInners],["stack-additions",typeof this.stackAdditions<"u"?this.stackAdditions.map(_e=>_e.toEncodingData()):void 0],["stack-pop-count",this.stackPopCount],["state-changes",typeof this.stateChanges<"u"?this.stateChanges.map(_e=>_e.toEncodingData()):void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded SimulationOpcodeTraceUnit: ${_e}`);return new SimulationOpcodeTraceUnit({pc:_e.get("pc"),scratchChanges:typeof _e.get("scratch-changes")<"u"?_e.get("scratch-changes").map($t=>ScratchChange.fromEncodingData($t)):void 0,spawnedInners:_e.get("spawned-inners"),stackAdditions:typeof _e.get("stack-additions")<"u"?_e.get("stack-additions").map($t=>AvmValue.fromEncodingData($t)):void 0,stackPopCount:_e.get("stack-pop-count"),stateChanges:typeof _e.get("state-changes")<"u"?_e.get("state-changes").map($t=>ApplicationStateOperation.fromEncodingData($t)):void 0})}}class SimulationTransactionExecTrace{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"approval-program-hash",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"approval-program-trace",valueSchema:new OptionalSchema(new ArraySchema(SimulationOpcodeTraceUnit.encodingSchema)),omitEmpty:!0},{key:"clear-state-program-hash",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"clear-state-program-trace",valueSchema:new OptionalSchema(new ArraySchema(SimulationOpcodeTraceUnit.encodingSchema)),omitEmpty:!0},{key:"clear-state-rollback",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"clear-state-rollback-error",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"inner-trace",valueSchema:new OptionalSchema(new ArraySchema(SimulationTransactionExecTrace.encodingSchema)),omitEmpty:!0},{key:"logic-sig-hash",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"logic-sig-trace",valueSchema:new OptionalSchema(new ArraySchema(SimulationOpcodeTraceUnit.encodingSchema)),omitEmpty:!0})),this.encodingSchemaValue}constructor({approvalProgramHash:_e,approvalProgramTrace:$t,clearStateProgramHash:Ft,clearStateProgramTrace:Vt,clearStateRollback:qt,clearStateRollbackError:zt,innerTrace:Ht,logicSigHash:Kt,logicSigTrace:Gt}){this.approvalProgramHash=typeof _e=="string"?base64ToBytes(_e):_e,this.approvalProgramTrace=$t,this.clearStateProgramHash=typeof Ft=="string"?base64ToBytes(Ft):Ft,this.clearStateProgramTrace=Vt,this.clearStateRollback=qt,this.clearStateRollbackError=zt,this.innerTrace=Ht,this.logicSigHash=typeof Kt=="string"?base64ToBytes(Kt):Kt,this.logicSigTrace=Gt}getEncodingSchema(){return SimulationTransactionExecTrace.encodingSchema}toEncodingData(){return new Map([["approval-program-hash",this.approvalProgramHash],["approval-program-trace",typeof this.approvalProgramTrace<"u"?this.approvalProgramTrace.map(_e=>_e.toEncodingData()):void 0],["clear-state-program-hash",this.clearStateProgramHash],["clear-state-program-trace",typeof this.clearStateProgramTrace<"u"?this.clearStateProgramTrace.map(_e=>_e.toEncodingData()):void 0],["clear-state-rollback",this.clearStateRollback],["clear-state-rollback-error",this.clearStateRollbackError],["inner-trace",typeof this.innerTrace<"u"?this.innerTrace.map(_e=>_e.toEncodingData()):void 0],["logic-sig-hash",this.logicSigHash],["logic-sig-trace",typeof this.logicSigTrace<"u"?this.logicSigTrace.map(_e=>_e.toEncodingData()):void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded SimulationTransactionExecTrace: ${_e}`);return new SimulationTransactionExecTrace({approvalProgramHash:_e.get("approval-program-hash"),approvalProgramTrace:typeof _e.get("approval-program-trace")<"u"?_e.get("approval-program-trace").map($t=>
1504SimulationOpcodeTraceUnit.fromEncodingData($t)):void 0,clearStateProgramHash:_e.get("clear-state-program-hash"),clearStateProgramTrace:typeof _e.get("clear-state-program-trace")<"u"?_e.get("clear-state-program-trace").map($t=>SimulationOpcodeTraceUnit.fromEncodingData($t)):void 0,clearStateRollback:_e.get("clear-state-rollback"),clearStateRollbackError:_e.get("clear-state-rollback-error"),innerTrace:typeof _e.get("inner-trace")<"u"?_e.get("inner-trace").map($t=>SimulationTransactionExecTrace.fromEncodingData($t)):void 0,logicSigHash:_e.get("logic-sig-hash"),logicSigTrace:typeof _e.get("logic-sig-trace")<"u"?_e.get("logic-sig-trace").map($t=>SimulationOpcodeTraceUnit.fromEncodingData($t)):void 0})}}let StateProof$1=class Zo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"Message",valueSchema:StateProofMessage.encodingSchema,omitEmpty:!0},{key:"StateProof",valueSchema:new ByteArraySchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({message:_e,stateproof:$t}){this.message=_e,this.stateproof=typeof $t=="string"?base64ToBytes($t):$t}getEncodingSchema(){return Zo.encodingSchema}toEncodingData(){return new Map([["Message",this.message.toEncodingData()],["StateProof",this.stateproof]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded StateProof: ${_e}`);return new Zo({message:StateProofMessage.fromEncodingData(_e.get("Message")??new Map),stateproof:_e.get("StateProof")})}};class StateProofMessage{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"BlockHeadersCommitment",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"FirstAttestedRound",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"LastAttestedRound",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"LnProvenWeight",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"VotersCommitment",valueSchema:new ByteArraySchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({blockheaderscommitment:_e,firstattestedround:$t,lastattestedround:Ft,lnprovenweight:Vt,voterscommitment:qt}){this.blockheaderscommitment=typeof _e=="string"?base64ToBytes(_e):_e,this.firstattestedround=ensureBigInt($t),this.lastattestedround=ensureBigInt(Ft),this.lnprovenweight=ensureBigInt(Vt),this.voterscommitment=typeof qt=="string"?base64ToBytes(qt):qt}getEncodingSchema(){return StateProofMessage.encodingSchema}toEncodingData(){return new Map([["BlockHeadersCommitment",this.blockheaderscommitment],["FirstAttestedRound",this.firstattestedround],["LastAttestedRound",this.lastattestedround],["LnProvenWeight",this.lnprovenweight],["VotersCommitment",this.voterscommitment]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded StateProofMessage: ${_e}`);return new StateProofMessage({blockheaderscommitment:_e.get("BlockHeadersCommitment"),firstattestedround:_e.get("FirstAttestedRound"),lastattestedround:_e.get("LastAttestedRound"),lnprovenweight:_e.get("LnProvenWeight"),voterscommitment:_e.get("VotersCommitment")})}}class SupplyResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"current_round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"online-money",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"total-money",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({currentRound:_e,onlineMoney:$t,totalMoney:Ft}){this.currentRound=ensureBigInt(_e),this.onlineMoney=ensureBigInt($t),this.totalMoney=ensureBigInt(Ft)}getEncodingSchema(){return SupplyResponse.encodingSchema}toEncodingData(){return new Map([["current_round",this.currentRound],["online-money",this.onlineMoney],["total-money",this.totalMoney]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded SupplyResponse: ${_e}`);return new SupplyResponse({currentRound:_e.get("current_round"),onlineMoney:_e.get("online-money"),totalMoney:_e.get("total-money")})}}let TealKeyValue$1=class Qo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"key",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"value",valueSchema:TealValue$1.encodingSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({key:_e,value:$t}){this.key=typeof _e=="string"?base64ToBytes(_e):_e,this.value=$t}getEncodingSchema(){return Qo.encodingSchema}toEncodingData(){return new Map([["key",this.key],["value",this.value.toEncodingData()]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TealKeyValue: ${_e}`);return new Qo({key:_e.get("key"),value:TealValue$1.fromEncodingData(_e.get("value")??new Map)})}},TealValue$1=class ga{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"bytes",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"type",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"uint",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({bytes:_e,type:$t,uint:Ft}){this.bytes=typeof _e=="string"?base64ToBytes(_e):_e,this.type=ensureSafeInteger($t),this.uint=ensureBigInt(Ft)}getEncodingSchema(){return ga.encodingSchema}toEncodingData(){return new Map([["bytes",this.bytes],["type",this.type],["uint",this.uint]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TealValue: ${_e}`);return new ga({bytes:_e.get("bytes"),type:_e.get("type"),uint:_e.get("uint")})}};class TransactionGroupLedgerStateDeltasForRoundResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"Deltas",valueSchema:new ArraySchema(LedgerStateDeltaForTransactionGroup.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({deltas:_e}){this.deltas=_e}getEncodingSchema(){return TransactionGroupLedgerStateDeltasForRoundResponse.encodingSchema}toEncodingData(){return new Map([["Deltas",this.deltas.map(_e=>_e.toEncodingData())]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TransactionGroupLedgerStateDeltasForRoundResponse: ${_e}`);return new TransactionGroupLedgerStateDeltasForRoundResponse({deltas:(_e.get("Deltas")??[]).map($t=>LedgerStateDeltaForTransactionGroup.fromEncodingData($t))})}}class TransactionParametersResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"consensus-version",valueSchema:new StringSchema,omitEmpty:!0},{key:"fee",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"genesis-hash",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"genesis-id",valueSchema:new StringSchema,omitEmpty:!0},{key:"last-round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"min-fee",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({consensusVersion:_e,fee:$t,genesisHash:Ft,genesisId:Vt,lastRound:qt,minFee:zt}){this.consensusVersion=_e,this.fee=ensureBigInt($t),this.genesisHash=typeof Ft=="string"?base64ToBytes(Ft):Ft,this.genesisId=Vt,this.lastRound=ensureBigInt(qt),this.minFee=ensureBigInt(zt)}getEncodingSchema(){return TransactionParametersResponse.encodingSchema}toEncodingData(){return new Map([["consensus-version",this.consensusVersion],["fee",this.fee],["genesis-hash",this.genesisHash],["genesis-id",this.genesisId],["last-round",this.lastRound],["min-fee",this.minFee]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TransactionParametersResponse: ${_e}`);return new TransactionParametersResponse({consensusVersion:_e.get("consensus-version"),fee:_e.get("fee"),genesisHash:_e.get("genesis-hash"),genesisId:_e.get("genesis-id"),lastRound:_e.get("last-round"),minFee:_e.get("min-fee")})}}class TransactionProofResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"idx",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"proof",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"stibhash",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"treedepth",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"hashtype",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({idx:_e,proof:$t,stibhash:Ft,treedepth:Vt,hashtype:qt}){this.idx=ensureSafeInteger(_e),this.proof=typeof $t=="string"?base64ToBytes($t):$t,this.stibhash=typeof Ft=="string"?base64ToBytes(Ft):Ft,this.treedepth=ensureSafeInteger(Vt),this.hashtype=qt}getEncodingSchema(){return TransactionProofResponse.encodingSchema}toEncodingData(){return new Map([["idx",this.idx],["proof",this.proof],["stibhash",this.stibhash],["treedepth",this.treedepth],["hashtype",this.hashtype]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TransactionProofResponse: ${_e}`);return new TransactionProofResponse({idx:_e.get("idx"),proof:_e.get("proof"),stibhash:_e.get("stibhash"),treedepth:_e.get("treedepth"),hashtype:_e.get("hashtype")})}}class Version{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"build",valueSchema:BuildVersion.encodingSchema,omitEmpty:!0},{key:"genesis_hash_b64",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"genesis_id",valueSchema:new StringSchema,omitEmpty:!0},{key:"versions",valueSchema:new ArraySchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({build:_e,genesisHashB64:$t,genesisId:Ft,versions:Vt}){this.build=_e,this.genesisHashB64=typeof $t=="string"?base64ToBytes($t):$t,this.genesisId=Ft,this.versions=Vt}getEncodingSchema(){return Version.encodingSchema}toEncodingData(){return new Map([["build",this.build.toEncodingData()],["genesis_hash_b64",this.genesisHashB64],["genesis_id",this.genesisId],["versions",this.versions]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded Version: ${_e}`);return new Version({build:BuildVersion.fromEncodingData(_e.get("build")??new Map),genesisHashB64:_e.get("genesis_hash_b64"),genesisId:_e.get("genesis_id"),versions:_e.get("versions")})}}const types$1=Object.freeze(Object.defineProperty({__proto__:null,Account:Account$1,AccountApplicationResponse,AccountAssetHolding,AccountAssetResponse,AccountAssetsInformationResponse,AccountParticipation:AccountParticipation$1,AccountStateDelta:AccountStateDelta$1,AppCallLogs,Application:Application$1,ApplicationInitialStates,ApplicationKVStorage,ApplicationLocalReference,ApplicationLocalState:ApplicationLocalState$1,ApplicationParams:ApplicationParams$1,ApplicationStateOperation,ApplicationStateSchema:ApplicationStateSchema$1,Asset:Asset$1,AssetHolding:AssetHolding$1,AssetHoldingReference,AssetParams:AssetParams$
15041,AvmKeyValue,AvmValue,BlockHashResponse,BlockLogsResponse,BlockResponse,BlockTxidsResponse,Box:Box$1,BoxDescriptor:BoxDescriptor$1,BoxReference,BoxesResponse:BoxesResponse$1,BuildVersion,CompileResponse,DisassembleResponse,DryrunRequest,DryrunResponse,DryrunSource,DryrunState,DryrunTxnResult,ErrorResponse:ErrorResponse$1,EvalDelta:EvalDelta$1,EvalDeltaKeyValue:EvalDeltaKeyValue$1,Genesis:Genesis$1,GenesisAllocation,GetBlockTimeStampOffsetResponse,GetSyncRoundResponse,LedgerStateDeltaForTransactionGroup,LightBlockHeaderProof:LightBlockHeaderProof$1,NodeStatusResponse,PendingTransactionResponse,PendingTransactionsResponse,PostTransactionsResponse,ScratchChange,SimulateInitialStates,SimulateRequest,SimulateRequestTransactionGroup,SimulateResponse,SimulateTraceConfig,SimulateTransactionGroupResult,SimulateTransactionResult,SimulateUnnamedResourcesAccessed,SimulationEvalOverrides,SimulationOpcodeTraceUnit,SimulationTransactionExecTrace,StateProof:StateProof$1,StateProofMessage,SupplyResponse,TealKeyValue:TealKeyValue$1,TealValue:TealValue$1,TransactionGroupLedgerStateDeltasForRoundResponse,TransactionParametersResponse,TransactionProofResponse,Version},Symbol.toStringTag,{value:"Module"}));class JSONRequest{constructor(_e){this.c=_e,this.query={}}executeRequest(_e,$t){return this.c.get({relativePath:this.path(),query:this.query,requestHeaders:_e,customOptions:$t})}async do(_e,$t){const Ft=await this.executeRequest(_e,$t);return this.prepare(Ft)}async doRaw(_e,$t){return(await this.executeRequest(_e,$t)).body}}class AccountInformation extends JSONRequest{constructor(_e,$t){super(_e),this.account=$t.toString()}path(){return`/v2/accounts/${this.account}`}exclude(_e){return this.query.exclude=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),Account$1)}}class AccountAssetInformation extends JSONRequest{constructor(_e,$t,Ft){super(_e),this.account=$t.toString(),this.assetID=BigInt(Ft)}path(){return`/v2/accounts/${this.account}/assets/${this.assetID}`}prepare(_e){return decodeJSON(_e.getJSONText(),AccountAssetResponse)}}class AccountApplicationInformation extends JSONRequest{constructor(_e,$t,Ft){super(_e),this.account=$t.toString(),this.applicationID=BigInt(Ft)}path(){return`/v2/accounts/${this.account}/applications/${this.applicationID}`}prepare(_e){return decodeJSON(_e.getJSONText(),AccountApplicationResponse)}}let Block$1=class extends JSONRequest{constructor(_e,$t){super(_e),this.round=BigInt($t),this.query={format:"msgpack"}}path(){return`/v2/blocks/${this.round}`}headerOnly(_e){return this.query["header-only"]=_e,this}prepare(_e){return decodeMsgpack(_e.body,BlockResponse)}};function setHeaders$1(yt={}){let _e=yt;return Object.keys(_e).every($t=>$t.toLowerCase()!=="content-type")&&(_e={...yt},_e["Content-Type"]="text/plain"),_e}class Compile extends JSONRequest{constructor(_e,$t){super(_e),this.source=$t}path(){return"/v2/teal/compile"}sourcemap(_e=!0){return this.query.sourcemap=_e,this}executeRequest(_e,$t){const Ft=setHeaders$1(_e);return this.c.post({relativePath:this.path(),data:coerceToBytes(this.source),query:this.query,requestHeaders:Ft,customOptions:$t})}prepare(_e){return decodeJSON(_e.getJSONText(),CompileResponse)}}class Dryrun extends JSONRequest{constructor(_e,$t){super(_e),this.blob=encodeMsgpack($t)}path(){return"/v2/teal/dryrun"}executeRequest(_e,$t){const Ft=setHeaders$1(_e);return this.c.post({relativePath:this.path(),data:this.blob,requestHeaders:Ft,customOptions:$t})}prepare(_e){return decodeJSON(_e.getJSONText(),DryrunResponse)}}class Genesis extends JSONRequest{path(){return"/genesis"}prepare(_e){return _e.getJSONText()}}class GetAssetByID extends JSONRequest{constructor(_e,$t){super(_e),this.index=BigInt($t)}path(){return`/v2/assets/${this.index}`}prepare(_e){return decodeJSON(_e.getJSONText(),Asset$1)}}class GetApplicationByID extends JSONRequest{constructor(_e,$t){super(_e),this.index=BigInt($t)}path(){return`/v2/applications/${this.index}`}prepare(_e){return decodeJSON(_e.getJSONText(),Application$1)}}class GetBlockHash extends JSONRequest{constructor(_e,$t){super(_e),this.round=BigInt($t)}path(){return`/v2/blocks/${this.round}/hash`}prepare(_e){return decodeJSON(_e.getJSONText(),BlockHashResponse)}}class GetBlockTxids extends JSONRequest{constructor(_e,$t){super(_e),this.round=BigInt($t)}path(){return`/v2/blocks/${this.round}/txids`}prepare(_e){return decodeJSON(_e.getJSONText(),BlockTxidsResponse)}}class GetApplicationBoxByName extends JSONRequest{constructor(_e,$t,Ft){super(_e),this.index=BigInt($t);const Vt=bytesToBase64(Ft);this.query.name=encodeURI(`b64:${Vt}`)}path(){return`/v2/applications/${this.index}/box`}prepare(_e){return decodeJSON(_e.getJSONText(),Box$1)}}class GetApplicationBoxes extends JSONRequest{constructor(_e,$t){super(_e),this.index=BigInt($t),this.query.max=0}path(){return`/v2/applications/${this.index}/boxes`}max(_e){return this.query.max=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),BoxesResponse$1)}}let HealthCheck$1=class extends JSONRequest{path(){return"/health"}prepare(_e){}};class PendingTransactionInformation extends JSONRequest{constructor(_e,$t){super(_e),this.txid=$t,this.query.format="msgpack"}prepare(_e){return decodeMsgpack(_e.body,PendingTransactionResponse)}path(){return`/v2/transactions/pending/${this.txid}`}max(_e){return this.query.max=_e,this}}class PendingTransactions extends JSONRequest{constructor(_e){super(_e),this.query.format="msgpack"}path(){return"/v2/transactions/pending"}prepare(_e){return decodeMsgpack(_e.body,PendingTransactionsResponse)}max(_e){return this.query.max=_e,this}}class PendingTransactionsByAddress extends JSONRequest{constructor(_e,$t){super(_e),this.address=$t.toString(),this.query.format="msgpack"}prepare(_e){return decodeMsgpack(_e.body,PendingTransactionsResponse)}path(){return`/v2/accounts/${this.address}/transactions/pending`}max(_e){return this.query.max=_e,this}}class GetTransactionProof extends JSONRequest{constructor(_e,$t,Ft){super(_e),this.txID=Ft,this.round=BigInt($t)}path(){return`/v2/blocks/${this.round}/transactions/${this.txID}/proof`}hashType(_e){return this.query.hashtype=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),TransactionProofResponse)}}function setSendTransactionHeaders(yt={}){let _e=yt;return Object.keys(_e).every($t=>$t.toLowerCase()!=="content-type")&&(_e={...yt},_e["Content-Type"]="application/x-binary"),_e}function isByteArray(yt){return yt&&yt.byteLength!==void 0}class SendRawTransaction extends JSONRequest{constructor(_e,$t){super(_e);let Ft=$t;if(Array.isArray($t)){if(!$t.every(isByteArray))throw new TypeError("Array elements must be byte arrays");Ft=concatArrays$1(...$t)}else if(!isByteArray(Ft))throw new TypeError("Argument must be byte array");this.txnBytesToPost=Ft}path(){return"/v2/transactions"}executeRequest(_e,$t){const Ft=setSendTransactionHeaders(_e);return this.c.post({relativePath:this.path(),data:this.txnBytesToPost,requestHeaders:Ft,customOptions:$t})}prepare(_e){return decodeJSON(_e.getJSONText(),PostTransactionsResponse)}}class Status extends JSONRequest{path(){return"/v2/status"}prepare(_e){return decodeJSON(_e.getJSONText(),NodeStatusResponse)}}class StatusAfterBlock extends JSONRequest{constructor(_e,$t){super(_e),this.round=BigInt($t)}path(){return`/v2/status/wait-for-block-after/${this.round}`}prepare(_e){return decodeJSON(_e.getJSONText(),NodeStatusResponse)}}class SuggestedParamsRequest extends JSONRequest{path(){return"/v2/transactions/params"}prepare(_e){const $t=decodeJSON(_e.getJSONText(),TransactionParametersResponse);return{flatFee:!1,fee:$t.fee,firstValid:$t.lastRound,lastValid:$t.lastRound+BigInt(1e3),genesisID:$t.genesisId,genesisHash:$t.genesisHash,minFee:$t.minFee,consensusVersion:$t.consensusVersion}}}class Supply extends JSONRequest{path(){return"/v2/ledger/supply"}prepare(_e){return decodeJSON(_e.getJSONText(),SupplyResponse)}}class Versions extends JSONRequest{path(){return"/versions"}prepare(_e){return decodeJSON(_e.getJSONText(),Version)}}class LightBlockHeaderProof extends JSONRequest{constructor(_e,$t){super(_e),this.round=BigInt($t)}path(){return`/v2/blocks/${this.round}/lightheader/proof`}prepare(_e){return decodeJSON(_e.getJSONText(),LightBlockHeaderProof$1)}}class StateProof extends JSONRequest{constructor(_e,$t){super(_e),this.round=BigInt($t)}path(){return`/v2/stateproofs/${this.round}`}prepare(_e){return decodeJSON(_e.getJSONText(),StateProof$1)}}class SetSyncRound extends JSONRequest{constructor(_e,$t){super(_e),this.round=BigInt($t)}path(){return`/v2/ledger/sync/${this.round}`}executeRequest(_e,$t){return this.c.post({relativePath:this.path(),data:null,requestHeaders:_e,customOptions:$t})}prepare(_e){}}class GetSyncRound extends JSONRequest{path(){return"/v2/ledger/sync"}prepare(_e){return decodeJSON(_e.getJSONText(),GetSyncRoundResponse)}}class SetBlockOffsetTimestamp extends JSONRequest{constructor(_e,$t){super(_e),this.offset=BigInt($t)}path(){return`/v2/devmode/blocks/offset/${this.offset}`}executeRequest(_e,$t){return this.c.post({relativePath:this.path(),data:null,requestHeaders:_e,customOptions:$t})}prepare(_e){}}class GetBlockOffsetTimestamp extends JSONRequest{path(){return"/v2/devmode/blocks/offset"}prepare(_e){return decodeJSON(_e.getJSONText(),GetBlockTimeStampOffsetResponse)}}function setHeaders(yt={}){let _e=yt;return Object.keys(_e).every($t=>$t.toLowerCase()!=="content-type")&&(_e={...yt},_e["Content-Type"]="text/plain"),_e}class Disassemble extends JSONRequest{constructor(_e,$t){super(_e),this.source=$t}path(){return"/v2/teal/disassemble"}executeRequest(_e,$t){const Ft=setHeaders(_e);return this.c.post({relativePath:this.path(),data:coerceToBytes(this.source),query:this.query,requestHeaders:Ft,customOptions:$t})}prepare(_e){return decodeJSON(_e.getJSONText(),DisassembleResponse)}}function setSimulateTransactionsHeaders(yt={}){let _e=yt;return Object.keys(_e).every($t=>$t.toLowerCase()!=="content-type")&&(_e={...yt},_e["Content-Type"]="application/msgpack"),_e}class SimulateRawTransactions extends JSONRequest{constructor(_e,$t){super(_e),this.query.format="msgpack",this.requestBytes=encodeMsgpack($t)}path(){return"/v2/transactions/simulate"}executeRequest(_e,$t){const Ft=setSimulateTransactionsHeaders(_e);return this.c.post({relativePath:this.path(),data:this.requestBytes,query:this.query,requestHeaders:Ft,customOptions:$t})}prepare(_e){return decodeMsgpack(_e.body,SimulateResponse)}}class Ready extends JSONRequest{path(){return"/ready"}prepare(_e){}}class UnsetSyncRound extends JSONRequest{path(){return"/v2/ledger/sync"}executeRequest(_e,$t){return this.c.delete({relativePath:this.path(),data:void 0,requestHeaders:_e,customOptions:$t})}prepare(_e){}}class GetLedgerStateDeltaForTransactionGroup extends JSONRequest{constructor(_e,$t){super(_e),this.id=$t,this.query={format:"msgpack"}}path(){return`/v2/deltas/txn/group/${this.id}`}prepare(_e){return decodeMsgpack(_e.body,LedgerStateDelta)}}class GetLedgerStateDelta extends JSONRequest{constructor(_e,$t){super(_e),this.round=BigInt($t),this.query={format:"msgpack"}}path(){return`/v2/deltas/${this.round}`}prepare(_e){return decodeMsgpack(_e.body,LedgerStateDelta)}}class GetTransactionGroupLedgerStateDeltasForRound extends JSONRequest{constructor(_e,$t){super(_e),this.round=BigInt($t),this.query={format:"msgpack"}}path(){return`/v2/deltas/${this.round}/txn/group`}prepare(_e){return decodeMsgpack(_e.body,TransactionGroupLedgerStateDeltasForRoundResponse)}}class AlgodClient extends ServiceClient{constructor(_e,$t,Ft,Vt={}){super("X-Algo-API-Token",_e,$t,Ft,Vt)}healthCheck(){return new HealthCheck$1(this.c)}versionsCheck(){return new Versions(this.c)}sendRawTransaction(_e){return new SendRawTransaction(this.c,_e)}accountInformation(_e){return new AccountInformation(this.c,_e)}accountAssetInformation(_e,$t){return new AccountAssetInformation(this.c,_e,$t)}accountApplicationInformation(_e,$t){return new AccountApplicationInformation(this.c,_e,$t)}block(_e){return new Block$1(this.c,_e)}getBlockHash(_e){return new GetBlockHash(this.c,_e)}getBlockTxids(_e){return new GetBlockTxids(this.c,_e)}pendingTransactionInformation(_e){return new PendingTransactionInformation(this.c,_e)}pendingTransactionsInformation(){return new PendingTransactions(this.c)}pendingTransactionByAddress(_e){return new PendingTransactionsByAddress(this.c,_e)}status(){return new Status(this.c)}statusAfterBlock(_e){return new StatusAfterBlock(this.c,_e)}getTransactionParams(){return new SuggestedParamsRequest(this.c)}supply(){return new Supply(this.c)}compile(_e){return new Compile(this.c,_e)}disassemble(_e){return new Disassemble(this.c,_e)}dryrun(_e){return new Dryrun(this.c,_e)}getAssetByID(_e){return new GetAssetByID(this.c,_e)}getApplicationByID(_e){return new GetApplicationByID(this.c,_e)}getApplicationBoxByName(_e,$t){return new GetApplicationBoxByName(this.c,_e,$t)}getApplicationBoxes(_e){return new GetApplicationBoxes(this.c,_e)}genesis(){return new Genesis(this.c)}getTransactionProof(_e,$t){return new GetTransactionProof(this.c,_e,$t)}getLightBlockHeaderProof(_e){return new LightBlockHeaderProof(this.c,_e)}getStateProof(_e){return new StateProof(this.c,_e)}simulateRawTransactions(_e){const $t=[];if(Array.isArray(_e))for(const Vt of _e)$t.push(decodeMsgpack(Vt,SignedTransaction));else $t.push(decodeMsgpack(_e,SignedTransaction));const Ft=new SimulateRequest({txnGroups:[new SimulateRequestTransactionGroup({txns:$t})]});return this.simulateTransactions(Ft)}simulateTransactions(_e){return new SimulateRawTransactions(this.c,_e)}setBlockOffsetTimestamp(_e){return new SetBlockOffsetTimestamp(this.c,_e)}getBlockOffsetTimestamp(){return new GetBlockOffsetTimestamp(this.c)}setSyncRound(_e){return new SetSyncRound(this.c,_e)}unsetSyncRound(){return new UnsetSyncRound(this.c)}getSyncRound(){return new GetSyncRound(this.c)}ready(){return new Ready(this.c)}getLedgerStateDeltaForTransactionGroup(_e){return new GetLedgerStateDeltaForTransactionGroup(this.c,_e)}getLedgerStateDelta(_e){return new GetLedgerStateDelta(this.c,_e)}getTransactionGroupLedgerStateDeltasForRound(_e){return new GetTransactionGroupLedgerStateDeltasForRound(this.c,_e)}}class KmdClient extends ServiceClient{constructor(_e,$t="http://127.0.0.1",Ft=7833,Vt={}){super("X-KMD-API-Token",_e,$t,Ft,Vt)}async get(_e){return(await this.c.get({relativePath:_e})).parseBodyAsJSON({intDecoding:IntDecoding$1.SAFE})}async delete(_e,$t){return(await this.c.delete({relativePath:_e,data:$t})).parseBodyAsJSON({intDecoding:IntDecoding$1.SAFE})}async post(_e,$t){return(await this.c.post({relativePath:_e,data:$t})).parseBodyAsJSON({intDecoding:IntDecoding$1.SAFE})}async versions(){return this.get("/versions")}async listWallets(){return this.get("/v1/wallets")}async createWallet(_e,$t,Ft=new Uint8Array,Vt="sqlite"){const qt={wallet_name:_e,wallet_driver_name:Vt,wallet_password:$t,master_derivation_key:bytesToBase64(Ft)};return this.post("/v1/wallet",qt)}async initWalletHandle(_e,$t){const Ft={wallet_id:_e,wallet_password:$t};return this.post("/v1/wallet/init",Ft)}async releaseWalletHandle(_e){const $t={wallet_handle_token:_e};return this.post("/v1/wallet/release",$t)}async renewWalletHandle(_e){const $t={wallet_handle_token:_e};return this.post("/v1/wallet/renew",$t)}async renameWallet(_e,$t,Ft){const Vt={wallet_id:_e,wallet_password:$t,wallet_name:Ft};return this.post("/v1/wallet/rename",Vt)}async getWallet(_e){const $t={wallet_handle_token:_e};return this.post("/v1/wallet/info",$t)}async exportMasterDerivationKey(_e,$t){const Ft={wallet_handle_token:_e,wallet_password:$t},Vt=await this.post("/v1/master-key/export",Ft);return{master_derivation_key:base64ToBytes(Vt.master_derivation_key)}}async importKey(_e,$t){const Ft={wallet_handle_token:_e,private_key:bytesToBase64($t)};return this.post("/v1/key/import",Ft)}async exportKey(_e,$t,Ft){const Vt={wallet_handle_token:_e,address:Ft,wallet_password:$t},qt=await this.post("/v1/key/export",Vt);return{private_key:base64ToBytes(qt.private_key)}}async generateKey(_e){const $t={wallet_handle_token:_e,display_mnemonic:!1};return this.post("/v1/key",$t)}async deleteKey(_e,$t,Ft){const Vt={wallet_handle_token:_e,address:Ft,wallet_password:$t};return this.delete("/v1/key",Vt)}async listKeys(_e){const $t={wallet_handle_token:_e};return this.post("/v1/key/list",$t)}async signTransaction(_e,$t,Ft){const Vt={wallet_handle_token:_e,wallet_password:$t,transaction:bytesToBase64
1504(Ft.toByte())},qt=await this.post("/v1/transaction/sign",Vt);return base64ToBytes(qt.signed_transaction)}async signTransactionWithSpecificPublicKey(_e,$t,Ft,Vt){const qt=coerceToBytes(Vt),zt={wallet_handle_token:_e,wallet_password:$t,transaction:bytesToBase64(Ft.toByte()),public_key:bytesToBase64(qt)},Ht=await this.post("/v1/transaction/sign",zt);return base64ToBytes(Ht.signed_transaction)}async listMultisig(_e){const $t={wallet_handle_token:_e};return this.post("/v1/multisig/list",$t)}async importMultisig(_e,$t,Ft,Vt){const qt={wallet_handle_token:_e,multisig_version:$t,threshold:Ft,pks:Vt};return this.post("/v1/multisig/import",qt)}async exportMultisig(_e,$t){const Ft={wallet_handle_token:_e,address:$t};return this.post("/v1/multisig/export",Ft)}async signMultisigTransaction(_e,$t,Ft,Vt,qt){const zt=coerceToBytes(Vt),Ht={wallet_handle_token:_e,transaction:bytesToBase64(Ft.toByte()),public_key:bytesToBase64(zt),partial_multisig:qt,wallet_password:$t};return this.post("/v1/multisig/sign",Ht)}async deleteMultisig(_e,$t,Ft){const Vt={wallet_handle_token:_e,address:Ft,wallet_password:$t};return this.delete("/v1/multisig",Vt)}}class Account{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"address",valueSchema:new StringSchema,omitEmpty:!0},{key:"amount",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"amount-without-pending-rewards",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"min-balance",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"pending-rewards",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"rewards",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"status",valueSchema:new StringSchema,omitEmpty:!0},{key:"total-apps-opted-in",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"total-assets-opted-in",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"total-box-bytes",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"total-boxes",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"total-created-apps",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"total-created-assets",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"apps-local-state",valueSchema:new OptionalSchema(new ArraySchema(ApplicationLocalState.encodingSchema)),omitEmpty:!0},{key:"apps-total-extra-pages",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"apps-total-schema",valueSchema:new OptionalSchema(ApplicationStateSchema.encodingSchema),omitEmpty:!0},{key:"assets",valueSchema:new OptionalSchema(new ArraySchema(AssetHolding.encodingSchema)),omitEmpty:!0},{key:"auth-addr",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"closed-at-round",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"created-apps",valueSchema:new OptionalSchema(new ArraySchema(Application.encodingSchema)),omitEmpty:!0},{key:"created-assets",valueSchema:new OptionalSchema(new ArraySchema(Asset.encodingSchema)),omitEmpty:!0},{key:"created-at-round",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"deleted",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"incentive-eligible",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"last-heartbeat",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"last-proposed",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"participation",valueSchema:new OptionalSchema(AccountParticipation.encodingSchema),omitEmpty:!0},{key:"reward-base",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"sig-type",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({address:_e,amount:$t,amountWithoutPendingRewards:Ft,minBalance:Vt,pendingRewards:qt,rewards:zt,round:Ht,status:Kt,totalAppsOptedIn:Gt,totalAssetsOptedIn:Jt,totalBoxBytes:Xt,totalBoxes:Zt,totalCreatedApps:er,totalCreatedAssets:tr,appsLocalState:rr,appsTotalExtraPages:ar,appsTotalSchema:nr,assets:cr,authAddr:fr,closedAtRound:vr,createdApps:xr,createdAssets:Sr,createdAtRound:Tr,deleted:Br,incentiveEligible:jr,lastHeartbeat:Rr,lastProposed:yr,participation:sr,rewardBase:or,sigType:Qt}){this.address=_e,this.amount=ensureBigInt($t),this.amountWithoutPendingRewards=ensureBigInt(Ft),this.minBalance=ensureSafeInteger(Vt),this.pendingRewards=ensureBigInt(qt),this.rewards=ensureBigInt(zt),this.round=ensureBigInt(Ht),this.status=Kt,this.totalAppsOptedIn=ensureSafeInteger(Gt),this.totalAssetsOptedIn=ensureSafeInteger(Jt),this.totalBoxBytes=ensureSafeInteger(Xt),this.totalBoxes=ensureSafeInteger(Zt),this.totalCreatedApps=ensureSafeInteger(er),this.totalCreatedAssets=ensureSafeInteger(tr),this.appsLocalState=rr,this.appsTotalExtraPages=typeof ar>"u"?void 0:ensureSafeInteger(ar),this.appsTotalSchema=nr,this.assets=cr,this.authAddr=typeof fr=="string"?Address.fromString(fr):fr,this.closedAtRound=typeof vr>"u"?void 0:ensureBigInt(vr),this.createdApps=xr,this.createdAssets=Sr,this.createdAtRound=typeof Tr>"u"?void 0:ensureBigInt(Tr),this.deleted=Br,this.incentiveEligible=jr,this.lastHeartbeat=typeof Rr>"u"?void 0:ensureSafeInteger(Rr),this.lastProposed=typeof yr>"u"?void 0:ensureSafeInteger(yr),this.participation=sr,this.rewardBase=typeof or>"u"?void 0:ensureBigInt(or),this.sigType=Qt}getEncodingSchema(){return Account.encodingSchema}toEncodingData(){return new Map([["address",this.address],["amount",this.amount],["amount-without-pending-rewards",this.amountWithoutPendingRewards],["min-balance",this.minBalance],["pending-rewards",this.pendingRewards],["rewards",this.rewards],["round",this.round],["status",this.status],["total-apps-opted-in",this.totalAppsOptedIn],["total-assets-opted-in",this.totalAssetsOptedIn],["total-box-bytes",this.totalBoxBytes],["total-boxes",this.totalBoxes],["total-created-apps",this.totalCreatedApps],["total-created-assets",this.totalCreatedAssets],["apps-local-state",typeof this.appsLocalState<"u"?this.appsLocalState.map(_e=>_e.toEncodingData()):void 0],["apps-total-extra-pages",this.appsTotalExtraPages],["apps-total-schema",typeof this.appsTotalSchema<"u"?this.appsTotalSchema.toEncodingData():void 0],["assets",typeof this.assets<"u"?this.assets.map(_e=>_e.toEncodingData()):void 0],["auth-addr",typeof this.authAddr<"u"?this.authAddr.toString():void 0],["closed-at-round",this.closedAtRound],["created-apps",typeof this.createdApps<"u"?this.createdApps.map(_e=>_e.toEncodingData()):void 0],["created-assets",typeof this.createdAssets<"u"?this.createdAssets.map(_e=>_e.toEncodingData()):void 0],["created-at-round",this.createdAtRound],["deleted",this.deleted],["incentive-eligible",this.incentiveEligible],["last-heartbeat",this.lastHeartbeat],["last-proposed",this.lastProposed],["participation",typeof this.participation<"u"?this.participation.toEncodingData():void 0],["reward-base",this.rewardBase],["sig-type",this.sigType]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded Account: ${_e}`);return new Account({address:_e.get("address"),amount:_e.get("amount"),amountWithoutPendingRewards:_e.get("amount-without-pending-rewards"),minBalance:_e.get("min-balance"),pendingRewards:_e.get("pending-rewards"),rewards:_e.get("rewards"),round:_e.get("round"),status:_e.get("status"),totalAppsOptedIn:_e.get("total-apps-opted-in"),totalAssetsOptedIn:_e.get("total-assets-opted-in"),totalBoxBytes:_e.get("total-box-bytes"),totalBoxes:_e.get("total-boxes"),totalCreatedApps:_e.get("total-created-apps"),totalCreatedAssets:_e.get("total-created-assets"),appsLocalState:typeof _e.get("apps-local-state")<"u"?_e.get("apps-local-state").map($t=>ApplicationLocalState.fromEncodingData($t)):void 0,appsTotalExtraPages:_e.get("apps-total-extra-pages"),appsTotalSchema:typeof _e.get("apps-total-schema")<"u"?ApplicationStateSchema.fromEncodingData(_e.get("apps-total-schema")):void 0,assets:typeof _e.get("assets")<"u"?_e.get("assets").map($t=>AssetHolding.fromEncodingData($t)):void 0,authAddr:_e.get("auth-addr"),closedAtRound:_e.get("closed-at-round"),createdApps:typeof _e.get("created-apps")<"u"?_e.get("created-apps").map($t=>Application.fromEncodingData($t)):void 0,createdAssets:typeof _e.get("created-assets")<"u"?_e.get("created-assets").map($t=>Asset.fromEncodingData($t)):void 0,createdAtRound:_e.get("created-at-round"),deleted:_e.get("deleted"),incentiveEligible:_e.get("incentive-eligible"),lastHeartbeat:_e.get("last-heartbeat"),lastProposed:_e.get("last-proposed"),participation:typeof _e.get("participation")<"u"?AccountParticipation.fromEncodingData(_e.get("participation")):void 0,rewardBase:_e.get("reward-base"),sigType:_e.get("sig-type")})}}class AccountParticipation{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"selection-
1504participation-key",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"vote-first-valid",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"vote-key-dilution",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"vote-last-valid",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"vote-participation-key",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"state-proof-key",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({selectionParticipationKey:_e,voteFirstValid:$t,voteKeyDilution:Ft,voteLastValid:Vt,voteParticipationKey:qt,stateProofKey:zt}){this.selectionParticipationKey=typeof _e=="string"?base64ToBytes(_e):_e,this.voteFirstValid=ensureBigInt($t),this.voteKeyDilution=ensureBigInt(Ft),this.voteLastValid=ensureBigInt(Vt),this.voteParticipationKey=typeof qt=="string"?base64ToBytes(qt):qt,this.stateProofKey=typeof zt=="string"?base64ToBytes(zt):zt}getEncodingSchema(){return AccountParticipation.encodingSchema}toEncodingData(){return new Map([["selection-participation-key",this.selectionParticipationKey],["vote-first-valid",this.voteFirstValid],["vote-key-dilution",this.voteKeyDilution],["vote-last-valid",this.voteLastValid],["vote-participation-key",this.voteParticipationKey],["state-proof-key",this.stateProofKey]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AccountParticipation: ${_e}`);return new AccountParticipation({selectionParticipationKey:_e.get("selection-participation-key"),voteFirstValid:_e.get("vote-first-valid"),voteKeyDilution:_e.get("vote-key-dilution"),voteLastValid:_e.get("vote-last-valid"),voteParticipationKey:_e.get("vote-participation-key"),stateProofKey:_e.get("state-proof-key")})}}class AccountResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"account",valueSchema:Account.encodingSchema,omitEmpty:!0},{key:"current-round",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({account:_e,currentRound:$t}){this.account=_e,this.currentRound=ensureBigInt($t)}getEncodingSchema(){return AccountResponse.encodingSchema}toEncodingData(){return new Map([["account",this.account.toEncodingData()],["current-round",this.currentRound]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AccountResponse: ${_e}`);return new AccountResponse({account:Account.fromEncodingData(_e.get("account")??new Map),currentRound:_e.get("current-round")})}}class AccountStateDelta{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"address",valueSchema:new StringSchema,omitEmpty:!0},{key:"delta",valueSchema:new ArraySchema(EvalDeltaKeyValue.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({address:_e,delta:$t}){this.address=_e,this.delta=$t}getEncodingSchema(){return AccountStateDelta.encodingSchema}toEncodingData(){return new Map([["address",this.address],["delta",this.delta.map(_e=>_e.toEncodingData())]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AccountStateDelta: ${_e}`);return new AccountStateDelta({address:_e.get("address"),delta:(_e.get("delta")??[]).map($t=>EvalDeltaKeyValue.fromEncodingData($t))})}}class AccountsResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"accounts",valueSchema:new ArraySchema(Account.encodingSchema),omitEmpty:!0},{key:"current-round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"next-token",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({accounts:_e,currentRound:$t,nextToken:Ft}){this.accounts=_e,this.currentRound=ensureBigInt($t),this.nextToken=Ft}getEncodingSchema(){return AccountsResponse.encodingSchema}toEncodingData(){return new Map([["accounts",this.accounts.map(_e=>_e.toEncodingData())],["current-round",this.currentRound],["next-token",this.nextToken]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AccountsResponse: ${_e}`);return new AccountsResponse({accounts:(_e.get("accounts")??[]).map($t=>Account.fromEncodingData($t)),currentRound:_e.get("current-round"),nextToken:_e.get("next-token")})}}class Application{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"id",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"params",valueSchema:ApplicationParams.encodingSchema,omitEmpty:!0},{key:"created-at-round",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"deleted",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"deleted-at-round",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({id:_e,params:$t,createdAtRound:Ft,deleted:Vt,deletedAtRound:qt}){this.id=ensureBigInt(_e),this.params=$t,this.createdAtRound=typeof Ft>"u"?void 0:ensureBigInt(Ft),this.deleted=Vt,this.deletedAtRound=typeof qt>"u"?void 0:ensureBigInt(qt)}getEncodingSchema(){return Application.encodingSchema}toEncodingData(){return new Map([["id",this.id],["params",this.params.toEncodingData()],["created-at-round",this.createdAtRound],["deleted",this.deleted],["deleted-at-round",this.deletedAtRound]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded Application: ${_e}`);return new Application({id:_e.get("id"),params:ApplicationParams.fromEncodingData(_e.get("params")??new Map),createdAtRound:_e.get("created-at-round"),deleted:_e.get("deleted"),deletedAtRound:_e.get("deleted-at-round")})}}class ApplicationLocalState{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"id",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"schema",valueSchema:ApplicationStateSchema.encodingSchema,omitEmpty:!0},{key:"closed-out-at-round",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"deleted",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"key-value",valueSchema:new OptionalSchema(new ArraySchema(TealKeyValue.encodingSchema)),omitEmpty:!0},{key:"opted-in-at-round",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({id:_e,schema:$t,closedOutAtRound:Ft,deleted:Vt,keyValue:qt,optedInAtRound:zt}){this.id=ensureBigInt(_e),this.schema=$t,this.closedOutAtRound=typeof Ft>"u"?void 0:ensureBigInt(Ft),this.deleted=Vt,this.keyValue=qt,this.optedInAtRound=typeof zt>"u"?void 0:ensureBigInt(zt)}getEncodingSchema(){return ApplicationLocalState.encodingSchema}toEncodingData(){return new Map([["id",this.id],["schema",this.schema.toEncodingData()],["closed-out-at-round",this.closedOutAtRound],["deleted",this.deleted],["key-value",typeof this.keyValue<"u"?this.keyValue.map(_e=>_e.toEncodingData()):void 0],["opted-in-at-round",this.optedInAtRound]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ApplicationLocalState: ${_e}`);return new ApplicationLocalState({id:_e.get("id"),schema:ApplicationStateSchema.fromEncodingData(_e.get("schema")??new Map),closedOutAtRound:_e.get("closed-out-at-round"),deleted:_e.get("deleted"),keyValue:typeof _e.get("key-value")<"u"?_e.get("key-value").map($t=>
1504TealKeyValue.fromEncodingData($t)):void 0,optedInAtRound:_e.get("opted-in-at-round")})}}class ApplicationLocalStatesResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"apps-local-states",valueSchema:new ArraySchema(ApplicationLocalState.encodingSchema),omitEmpty:!0},{key:"current-round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"next-token",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({appsLocalStates:_e,currentRound:$t,nextToken:Ft}){this.appsLocalStates=_e,this.currentRound=ensureBigInt($t),this.nextToken=Ft}getEncodingSchema(){return ApplicationLocalStatesResponse.encodingSchema}toEncodingData(){return new Map([["apps-local-states",this.appsLocalStates.map(_e=>_e.toEncodingData())],["current-round",this.currentRound],["next-token",this.nextToken]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ApplicationLocalStatesResponse: ${_e}`);return new ApplicationLocalStatesResponse({appsLocalStates:(_e.get("apps-local-states")??[]).map($t=>ApplicationLocalState.fromEncodingData($t)),currentRound:_e.get("current-round"),nextToken:_e.get("next-token")})}}class ApplicationLogData{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"logs",valueSchema:new ArraySchema(new ByteArraySchema),omitEmpty:!0},{key:"txid",valueSchema:new StringSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({logs:_e,txid:$t}){this.logs=_e,this.txid=$t}getEncodingSchema(){return ApplicationLogData.encodingSchema}toEncodingData(){return new Map([["logs",this.logs],["txid",this.txid]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ApplicationLogData: ${_e}`);return new ApplicationLogData({logs:_e.get("logs"),txid:_e.get("txid")})}}class ApplicationLogsResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"application-id",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"current-round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"log-data",valueSchema:new OptionalSchema(new ArraySchema(ApplicationLogData.encodingSchema)),omitEmpty:!0},{key:"next-token",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({applicationId:_e,currentRound:$t,logData:Ft,nextToken:Vt}){this.applicationId=ensureBigInt(_e),this.currentRound=ensureBigInt($t),this.logData=Ft,this.nextToken=Vt}getEncodingSchema(){return ApplicationLogsResponse.encodingSchema}toEncodingData(){return new Map([["application-id",this.applicationId],["current-round",this.currentRound],["log-data",typeof this.logData<"u"?this.logData.map(_e=>_e.toEncodingData()):void 0],["next-token",this.nextToken]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ApplicationLogsResponse: ${_e}`);return new ApplicationLogsResponse({applicationId:_e.get("application-id"),currentRound:_e.get("current-round"),logData:typeof _e.get("log-data")<"u"?_e.get("log-data").map($t=>ApplicationLogData.fromEncodingData($t)):void 0,nextToken:_e.get("next-token")})}}class ApplicationParams{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"approval-program",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"clear-state-program",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"creator",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"extra-program-pages",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"global-state",valueSchema:new OptionalSchema(new ArraySchema(TealKeyValue.encodingSchema)),omitEmpty:!0},{key:"global-state-schema",valueSchema:new OptionalSchema(ApplicationStateSchema.encodingSchema),omitEmpty:!0},{key:"local-state-schema",valueSchema:new OptionalSchema(ApplicationStateSchema.encodingSchema),omitEmpty:!0},{key:"version",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({approvalProgram:_e,clearStateProgram:$t,creator:Ft,extraProgramPages:Vt,globalState:qt,globalStateSchema:zt,localStateSchema:Ht,version:Kt}){this.approvalProgram=typeof _e=="string"?base64ToBytes(_e):_e,this.clearStateProgram=typeof $t=="string"?base64ToBytes($t):$t,this.creator=typeof Ft=="string"?Address.fromString(Ft):Ft,this.extraProgramPages=typeof Vt>"u"?void 0:ensureSafeInteger(Vt),this.globalState=qt,this.globalStateSchema=zt,this.localStateSchema=Ht,this.version=typeof Kt>"u"?void 0:ensureSafeInteger(Kt)}getEncodingSchema(){return ApplicationParams.encodingSchema}toEncodingData(){return new Map([["approval-program",this.approvalProgram],["clear-state-program",this.clearStateProgram],["creator",typeof this.creator<"u"?this.creator.toString():void 0],["extra-program-pages",this.extraProgramPages],["global-state",typeof this.globalState<"u"?this.globalState.map(_e=>_e.toEncodingData()):void 0],["global-state-schema",typeof this.globalStateSchema<"u"?this.globalStateSchema.toEncodingData():void 0],["local-state-schema",typeof this.localStateSchema<"u"?this.localStateSchema.toEncodingData():void 0],["version",this.version]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ApplicationParams: ${_e}`);return new ApplicationParams({approvalProgram:_e.get("approval-program"),clearStateProgram:_e.get("clear-state-program"),creator:_e.get("creator"),extraProgramPages:_e.get("extra-program-pages"),globalState:typeof _e.get("global-state")<"u"?_e.get("global-state").map($t=>
1504TealKeyValue.fromEncodingData($t)):void 0,globalStateSchema:typeof _e.get("global-state-schema")<"u"?ApplicationStateSchema.fromEncodingData(_e.get("global-state-schema")):void 0,localStateSchema:typeof _e.get("local-state-schema")<"u"?ApplicationStateSchema.fromEncodingData(_e.get("local-state-schema")):void 0,version:_e.get("version")})}}class ApplicationResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"current-round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"application",valueSchema:new OptionalSchema(Application.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({currentRound:_e,application:$t}){this.currentRound=ensureBigInt(_e),this.application=$t}getEncodingSchema(){return ApplicationResponse.encodingSchema}toEncodingData(){return new Map([["current-round",this.currentRound],["application",typeof this.application<"u"?this.application.toEncodingData():void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ApplicationResponse: ${_e}`);return new ApplicationResponse({currentRound:_e.get("current-round"),application:typeof _e.get("application")<"u"?Application.fromEncodingData(_e.get("application")):void 0})}}class ApplicationStateSchema{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"num-byte-slice",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"num-uint",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({numByteSlice:_e,numUint:$t}){this.numByteSlice=ensureSafeInteger(_e),this.numUint=ensureSafeInteger($t)}getEncodingSchema(){return ApplicationStateSchema.encodingSchema}toEncodingData(){return new Map([["num-byte-slice",this.numByteSlice],["num-uint",this.numUint]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ApplicationStateSchema: ${_e}`);return new ApplicationStateSchema({numByteSlice:_e.get("num-byte-slice"),numUint:_e.get("num-uint")})}}class ApplicationsResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"applications",valueSchema:new ArraySchema(Application.encodingSchema),omitEmpty:!0},{key:"current-round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"next-token",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({applications:_e,currentRound:$t,nextToken:Ft}){this.applications=_e,this.currentRound=ensureBigInt($t),this.nextToken=Ft}getEncodingSchema(){return ApplicationsResponse.encodingSchema}toEncodingData(){return new Map([["applications",this.applications.map(_e=>_e.toEncodingData())],["current-round",this.currentRound],["next-token",this.nextToken]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ApplicationsResponse: ${_e}`);return new ApplicationsResponse({applications:(_e.get("applications")??[]).map($t=>Application.fromEncodingData($t)),currentRound:_e.get("current-round"),nextToken:_e.get("next-token")})}}class Asset{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"index",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"params",valueSchema:AssetParams.encodingSchema,omitEmpty:!0},{key:"created-at-round",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"deleted",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"destroyed-at-round",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({index:_e,params:$t,createdAtRound:Ft,deleted:Vt,destroyedAtRound:qt}){this.index=ensureBigInt(_e),this.params=$t,this.createdAtRound=typeof Ft>"u"?void 0:ensureBigInt(Ft),this.deleted=Vt,this.destroyedAtRound=typeof qt>"u"?void 0:ensureBigInt(qt)}getEncodingSchema(){return Asset.encodingSchema}toEncodingData(){return new Map([["index",this.index],["params",this.params.toEncodingData()],["created-at-round",this.createdAtRound],["deleted",this.deleted],["destroyed-at-round",this.destroyedAtRound]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded Asset: ${_e}`);return new Asset({index:_e.get("index"),params:AssetParams.fromEncodingData(_e.get("params")??new Map),createdAtRound:_e.get("created-at-round"),deleted:_e.get("deleted"),destroyedAtRound:_e.get("destroyed-at-round")})}}class AssetBalancesResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"balances",valueSchema:new ArraySchema(MiniAssetHolding.encodingSchema),omitEmpty:!0},{key:"current-round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"next-token",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({balances:_e,currentRound:$t,nextToken:Ft}){this.balances=_e,this.currentRound=ensureBigInt($t),this.nextToken=Ft}getEncodingSchema(){return AssetBalancesResponse.encodingSchema}toEncodingData(){return new Map([["balances",this.balances.map(_e=>_e.toEncodingData())],["current-round",this.currentRound],["next-token",this.nextToken]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AssetBalancesResponse: ${_e}`);return new AssetBalancesResponse({balances:(_e.get("balances")??[]).map($t=>MiniAssetHolding.fromEncodingData($t)),currentRound:_e.get("current-round"),nextToken:_e.get("next-token")})}}class AssetHolding{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"amount",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"asset-id",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"is-frozen",valueSchema:new BooleanSchema,omitEmpty:!0},{key:"deleted",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"opted-in-at-round",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"opted-out-at-round",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({amount:_e,assetId:$t,isFrozen:Ft,deleted:Vt,optedInAtRound:qt,optedOutAtRound:zt}){this.amount=ensureBigInt(_e),this.assetId=ensureBigInt($t),this.isFrozen=Ft,this.deleted=Vt,this.optedInAtRound=typeof qt>"u"?void 0:ensureBigInt(qt),this.optedOutAtRound=typeof zt>"u"?void 0:ensureBigInt(zt)}getEncodingSchema(){return AssetHolding.encodingSchema}toEncodingData(){return new Map([["amount",this.amount],["asset-id",this.assetId],["is-frozen",this.isFrozen],["deleted",this.deleted],["opted-in-at-round",this.optedInAtRound],["opted-out-at-round",this.optedOutAtRound]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AssetHolding: ${_e}`);return new AssetHolding({amount:_e.get("amount"),assetId:_e.get("asset-id"),isFrozen:_e.get("is-frozen"),deleted:_e.get("deleted"),optedInAtRound:_e.get("opted-in-at-round"),optedOutAtRound:_e.get("opted-out-at-round")})}}class AssetHoldingsResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"assets",valueSchema:new ArraySchema(AssetHolding.encodingSchema),omitEmpty:!0},{key:"current-round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"next-token",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({assets:_e,currentRound:$t,nextToken:Ft}){this.assets=_e,this.currentRound=ensureBigInt($t),this.nextToken=Ft}getEncodingSchema(){return AssetHoldingsResponse.encodingSchema}toEncodingData(){return new Map([["assets",this.assets.map(_e=>_e.toEncodingData())],["current-round",this.currentRound],["next-token",this.nextToken]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AssetHoldingsResponse: ${_e}`);return new AssetHoldingsResponse({assets:(_e.get("assets")??[]).map($t=>AssetHolding.fromEncodingData($t)),currentRound:_e.get("current-round"),nextToken:_e.get("next-token")})}}class AssetParams{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"creator",valueSchema:new StringSchema,omitEmpty:!0},{key:"decimals",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"total",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"clawback",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"default-frozen",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"freeze",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"manager",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"metadata-hash",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"name",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"name-b64",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"reserve",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"unit-name",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"unit-name-b64",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"url",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"url-b64",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({creator:_e,decimals:$t,total:Ft,clawback:Vt,defaultFrozen:qt,freeze:zt,manager:Ht,metadataHash:Kt,name:Gt,nameB64:Jt,reserve:Xt,unitName:Zt,unitNameB64:er,url:tr,urlB64:rr}){this.creator=_e,this.decimals=ensureSafeInteger($t),this.total=ensureBigInt(Ft),this.clawback=Vt,this.defaultFrozen=qt,this.freeze=zt,this.manager=Ht,this.metadataHash=typeof Kt=="string"?base64ToBytes(Kt):Kt,this.name=Gt,this.nameB64=typeof Jt=="string"?base64ToBytes(Jt):Jt,this.reserve=Xt,this.unitName=Zt,this.unitNameB64=typeof er=="string"?base64ToBytes(er):er,this.url=tr,this.urlB64=typeof rr=="string"?base64ToBytes(rr):rr}getEncodingSchema(){return AssetParams.encodingSchema}toEncodingData(){return new Map([["creator",this.creator],["decimals",this.decimals],["total",this.total],["clawback",this.clawback],["default-frozen",this.defaultFrozen],["freeze",this.freeze],["manager",this.manager],["metadata-hash",this.metadataHash],["name",this.name],["name-b64",this.nameB64],["reserve",this.reserve],["unit-name",this.unitName],["unit-name-b64",this.unitNameB64],["url",this.url],["url-b64",this.urlB64]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AssetParams: ${_e}`);return new AssetParams({creator:_e.get("creator"),decimals:_e.get("decimals"),total:_e.get("total"),clawback:_e.get("clawback"),defaultFrozen:_e.get("default-frozen"),freeze:_e.get("freeze"),manager:_e.get("manager"),metadataHash:_e.get("metadata-hash"),name:_e.get("name"),nameB64:_e.get("name-b64"),reserve:_e.get("reserve"),unitName:_e.get("unit-name"),unitNameB64:_e.get("unit-name-b64"),url:_e.get("url"),urlB64:_e.get("url-b64")})}}class AssetResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"asset",valueSchema:Asset.encodingSchema,omitEmpty:!0},{key:"current-round",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({asset:_e,currentRound:$t}){this.asset=_e,this.currentRound=ensureBigInt($t)}getEncodingSchema(){return AssetResponse.encodingSchema}toEncodingData(){return new Map([["asset",this.asset.toEncodingData()],["current-round",this.currentRound]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AssetResponse: ${_e}`);return new AssetResponse({asset:Asset.fromEncodingData(_e.get("asset")??new Map),currentRound:_e.get("current-round")})}}class AssetsResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"assets",valueSchema:new ArraySchema(Asset.encodingSchema),omitEmpty:!0},{key:"current-round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"next-token",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({assets:_e,currentRound:$t,nextToken:Ft}){this.assets=_e,this.currentRound=ensureBigInt($t),this.nextToken=Ft}getEncodingSchema(){return AssetsResponse.encodingSchema}toEncodingData(){return new Map([["assets",this.assets.map(_e=>_e.toEncodingData())],["current-round",this.currentRound],["next-token",this.nextToken]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded AssetsResponse: ${_e}`);return new AssetsResponse({assets:(_e.get("assets")??[]).map($t=>Asset.fromEncodingData($t)),currentRound:_e.get("current-round"),nextToken:_e.get("next-token")})}}class Block{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"genesis-hash",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"genesis-id",valueSchema:new StringSchema,omitEmpty:!0},{key:"previous-block-hash",valueSchema:new ByteArraySchema,omitEmpty:!0}
1504,{key:"round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"seed",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"timestamp",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"transactions-root",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"transactions-root-sha256",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"bonus",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"fees-collected",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"participation-updates",valueSchema:new OptionalSchema(ParticipationUpdates.encodingSchema),omitEmpty:!0},{key:"proposer",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"proposer-payout",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"rewards",valueSchema:new OptionalSchema(BlockRewards.encodingSchema),omitEmpty:!0},{key:"state-proof-tracking",valueSchema:new OptionalSchema(new ArraySchema(StateProofTracking.encodingSchema)),omitEmpty:!0},{key:"transactions",valueSchema:new OptionalSchema(new ArraySchema(Transaction.encodingSchema)),omitEmpty:!0},{key:"txn-counter",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"upgrade-state",valueSchema:new OptionalSchema(BlockUpgradeState.encodingSchema),omitEmpty:!0},{key:"upgrade-vote",valueSchema:new OptionalSchema(BlockUpgradeVote.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({genesisHash:_e,genesisId:$t,previousBlockHash:Ft,round:Vt,seed:qt,timestamp:zt,transactionsRoot:Ht,transactionsRootSha256:Kt,bonus:Gt,feesCollected:Jt,participationUpdates:Xt,proposer:Zt,proposerPayout:er,rewards:tr,stateProofTracking:rr,transactions:ar,txnCounter:nr,upgradeState:cr,upgradeVote:fr}){this.genesisHash=typeof _e=="string"?base64ToBytes(_e):_e,this.genesisId=$t,this.previousBlockHash=typeof Ft=="string"?base64ToBytes(Ft):Ft,this.round=ensureBigInt(Vt),this.seed=typeof qt=="string"?base64ToBytes(qt):qt,this.timestamp=ensureSafeInteger(zt),this.transactionsRoot=typeof Ht=="string"?base64ToBytes(Ht):Ht,this.transactionsRootSha256=typeof Kt=="string"?base64ToBytes(Kt):Kt,this.bonus=typeof Gt>"u"?void 0:ensureSafeInteger(Gt),this.feesCollected=typeof Jt>"u"?void 0:ensureSafeInteger(Jt),this.participationUpdates=Xt,this.proposer=typeof Zt=="string"?Address.fromString(Zt):Zt,this.proposerPayout=typeof er>"u"?void 0:ensureSafeInteger(er),this.rewards=tr,this.stateProofTracking=rr,this.transactions=ar,this.txnCounter=typeof nr>"u"?void 0:ensureSafeInteger(nr),this.upgradeState=cr,this.upgradeVote=fr}getEncodingSchema(){return Block.encodingSchema}toEncodingData(){return new Map([["genesis-hash",this.genesisHash],["genesis-id",this.genesisId],["previous-block-hash",this.previousBlockHash],["round",this.round],["seed",this.seed],["timestamp",this.timestamp],["transactions-root",this.transactionsRoot],["transactions-root-sha256",this.transactionsRootSha256],["bonus",this.bonus],["fees-collected",this.feesCollected],["participation-updates",typeof this.participationUpdates<"u"?this.participationUpdates.toEncodingData():void 0],["proposer",typeof this.proposer<"u"?this.proposer.toString():void 0],["proposer-payout",this.proposerPayout],["rewards",typeof this.rewards<"u"?this.rewards.toEncodingData():void 0],["state-proof-tracking",typeof this.stateProofTracking<"u"?this.stateProofTracking.map(_e=>_e.toEncodingData()):void 0],["transactions",typeof this.transactions<"u"?this.transactions.map(_e=>_e.toEncodingData()):void 0],["txn-counter",this.txnCounter],["upgrade-state",typeof this.upgradeState<"u"?this.upgradeState.toEncodingData():void 0],["upgrade-vote",typeof this.upgradeVote<"u"?this.upgradeVote.toEncodingData():void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded Block: ${_e}`);return new Block({genesisHash:_e.get("genesis-hash"),genesisId:_e.get("genesis-id"),previousBlockHash:_e.get("previous-block-hash"),round:_e.get("round"),seed:_e.get("seed"),timestamp:_e.get("timestamp"),transactionsRoot:_e.get("transactions-root"),transactionsRootSha256:_e.get("transactions-root-sha256"),bonus:_e.get("bonus"),feesCollected:_e.get("fees-collected"),participationUpdates:typeof _e.get("participation-updates")<"u"?ParticipationUpdates.fromEncodingData(_e.get("participation-updates")):void 0,proposer:_e.get("proposer"),proposerPayout:_e.get("proposer-payout"),rewards:typeof _e.get("rewards")<"u"?BlockRewards.fromEncodingData(_e.get("rewards")):void 0,stateProofTracking:typeof _e.get("state-proof-tracking")<"u"?_e.get("state-proof-tracking").map($t=>StateProofTracking.fromEncodingData($t)):void 0,transactions:typeof _e.get("transactions")<"u"?_e.get("transactions").map($t=>Transaction.fromEncodingData($t)):void 0,txnCounter:_e.get("txn-counter"),upgradeState:typeof _e.get("upgrade-state")<"u"?BlockUpgradeState.fromEncodingData(_e.get("upgrade-state")):void 0,upgradeVote:typeof _e.get("upgrade-vote")<"u"?BlockUpgradeVote.from
1504EncodingData(_e.get("upgrade-vote")):void 0})}}class BlockHeadersResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"blocks",valueSchema:new ArraySchema(Block.encodingSchema),omitEmpty:!0},{key:"current-round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"next-token",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({blocks:_e,currentRound:$t,nextToken:Ft}){this.blocks=_e,this.currentRound=ensureBigInt($t),this.nextToken=Ft}getEncodingSchema(){return BlockHeadersResponse.encodingSchema}toEncodingData(){return new Map([["blocks",this.blocks.map(_e=>_e.toEncodingData())],["current-round",this.currentRound],["next-token",this.nextToken]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded BlockHeadersResponse: ${_e}`);return new BlockHeadersResponse({blocks:(_e.get("blocks")??[]).map($t=>Block.fromEncodingData($t)),currentRound:_e.get("current-round"),nextToken:_e.get("next-token")})}}class BlockRewards{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"fee-sink",valueSchema:new StringSchema,omitEmpty:!0},{key:"rewards-calculation-round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"rewards-level",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"rewards-pool",valueSchema:new StringSchema,omitEmpty:!0},{key:"rewards-rate",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"rewards-residue",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({feeSink:_e,rewardsCalculationRound:$t,rewardsLevel:Ft,rewardsPool:Vt,rewardsRate:qt,rewardsResidue:zt}){this.feeSink=_e,this.rewardsCalculationRound=ensureBigInt($t),this.rewardsLevel=ensureBigInt(Ft),this.rewardsPool=Vt,this.rewardsRate=ensureBigInt(qt),this.rewardsResidue=ensureBigInt(zt)}getEncodingSchema(){return BlockRewards.encodingSchema}toEncodingData(){return new Map([["fee-sink",this.feeSink],["rewards-calculation-round",this.rewardsCalculationRound],["rewards-level",this.rewardsLevel],["rewards-pool",this.rewardsPool],["rewards-rate",this.rewardsRate],["rewards-residue",this.rewardsResidue]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded BlockRewards: ${_e}`);return new BlockRewards({feeSink:_e.get("fee-sink"),rewardsCalculationRound:_e.get("rewards-calculation-round"),rewardsLevel:_e.get("rewards-level"),rewardsPool:_e.get("rewards-pool"),rewardsRate:_e.get("rewards-rate"),rewardsResidue:_e.get("rewards-residue")})}}class BlockUpgradeState{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"current-protocol",valueSchema:new StringSchema,omitEmpty:!0},{key:"next-protocol",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"next-protocol-approvals",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"next-protocol-switch-on",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"next-protocol-vote-before",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({currentProtocol:_e,nextProtocol:$t,nextProtocolApprovals:Ft,nextProtocolSwitchOn:Vt,nextProtocolVoteBefore:qt}){this.currentProtocol=_e,this.nextProtocol=$t,this.nextProtocolApprovals=typeof Ft>"u"?void 0:ensureSafeInteger(Ft),this.nextProtocolSwitchOn=typeof Vt>"u"?void 0:ensureBigInt(Vt),this.nextProtocolVoteBefore=typeof qt>"u"?void 0:ensureBigInt(qt)}getEncodingSchema(){return BlockUpgradeState.encodingSchema}toEncodingData(){return new Map([["current-protocol",this.currentProtocol],["next-protocol",this.nextProtocol],["next-protocol-approvals",this.nextProtocolApprovals],["next-protocol-switch-on",this.nextProtocolSwitchOn],["next-protocol-vote-before",this.nextProtocolVoteBefore]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded BlockUpgradeState: ${_e}`);return new BlockUpgradeState({currentProtocol:_e.get("current-protocol"),nextProtocol:_e.get("next-protocol"),nextProtocolApprovals:_e.get("next-protocol-approvals"),nextProtocolSwitchOn:_e.get("next-protocol-switch-on"),nextProtocolVoteBefore:_e.get("next-protocol-vote-before")})}}class BlockUpgradeVote{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"upgrade-approve",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"upgrade-delay",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"upgrade-propose",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({upgradeApprove:_e,upgradeDelay:$t,upgradePropose:Ft}){this.upgradeApprove=_e,this.upgradeDelay=typeof $t>"u"?void 0:ensureBigInt($t),this.upgradePropose=Ft}getEncodingSchema(){return BlockUpgradeVote.encodingSchema}toEncodingData(){return new Map([["upgrade-approve",this.upgradeApprove],["upgrade-delay",this.upgradeDelay],["upgrade-propose",this.upgradePropose]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded BlockUpgradeVote: ${_e}`);return new BlockUpgradeVote({upgradeApprove:_e.get("upgrade-approve"),upgradeDelay:_e.get("upgrade-delay"),upgradePropose:_e.get("upgrade-propose")})}}class Box{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"name",valueSchema:new ByteArraySchema,omitEmpty:!0}
1504,{key:"round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"value",valueSchema:new ByteArraySchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({name:_e,round:$t,value:Ft}){this.name=typeof _e=="string"?base64ToBytes(_e):_e,this.round=ensureBigInt($t),this.value=typeof Ft=="string"?base64ToBytes(Ft):Ft}getEncodingSchema(){return Box.encodingSchema}toEncodingData(){return new Map([["name",this.name],["round",this.round],["value",this.value]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded Box: ${_e}`);return new Box({name:_e.get("name"),round:_e.get("round"),value:_e.get("value")})}}class BoxDescriptor{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"name",valueSchema:new ByteArraySchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({name:_e}){this.name=typeof _e=="string"?base64ToBytes(_e):_e}getEncodingSchema(){return BoxDescriptor.encodingSchema}toEncodingData(){return new Map([["name",this.name]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded BoxDescriptor: ${_e}`);return new BoxDescriptor({name:_e.get("name")})}}class BoxesResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"application-id",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"boxes",valueSchema:new ArraySchema(BoxDescriptor.encodingSchema),omitEmpty:!0},{key:"next-token",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({applicationId:_e,boxes:$t,nextToken:Ft}){this.applicationId=ensureBigInt(_e),this.boxes=$t,this.nextToken=Ft}getEncodingSchema(){return BoxesResponse.encodingSchema}toEncodingData(){return new Map([["application-id",this.applicationId],["boxes",this.boxes.map(_e=>_e.toEncodingData())],["next-token",this.nextToken]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded BoxesResponse: ${_e}`);return new BoxesResponse({applicationId:_e.get("application-id"),boxes:(_e.get("boxes")??[]).map($t=>BoxDescriptor.fromEncodingData($t)),nextToken:_e.get("next-token")})}}class ErrorResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"message",valueSchema:new StringSchema,omitEmpty:!0},{key:"data",valueSchema:new OptionalSchema(UntypedValue.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({message:_e,data:$t}){this.message=_e,this.data=$t}getEncodingSchema(){return ErrorResponse.encodingSchema}toEncodingData(){return new Map([["message",this.message],["data",typeof this.data<"u"?this.data.toEncodingData():void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ErrorResponse: ${_e}`);return new ErrorResponse({message:_e.get("message"),data:typeof _e.get("data")<"u"?UntypedValue.fromEncodingData(_e.get("data")):void 0})}}class EvalDelta{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"action",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"bytes",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"uint",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({action:_e,bytes:$t,uint:Ft}){this.action=ensureSafeInteger(_e),this.bytes=$t,this.uint=typeof Ft>"u"?void 0:ensureBigInt(Ft)}getEncodingSchema(){return EvalDelta.encodingSchema}toEncodingData(){return new Map([["action",this.action],["bytes",this.bytes],["uint",this.uint]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded EvalDelta: ${_e}`);return new EvalDelta({action:_e.get("action"),bytes:_e.get("bytes"),uint:_e.get("uint")})}}class EvalDeltaKeyValue{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"key",valueSchema:new StringSchema,omitEmpty:!0},{key:"value",valueSchema:EvalDelta.encodingSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({key:_e,value:$t}){this.key=_e,this.value=$t}getEncodingSchema(){return EvalDeltaKeyValue.encodingSchema}toEncodingData(){return new Map([["key",this.key],["value",this.value.toEncodingData()]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded EvalDeltaKeyValue: ${_e}`);return new EvalDeltaKeyValue({key:_e.get("key"),value:EvalDelta.fromEncodingData(_e.get("value")??new Map)})}}class HashFactory{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"hash-type",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({hashType:_e}){this.hashType=typeof _e>"u"?void 0:ensureSafeInteger(_e)}getEncodingSchema(){return HashFactory.encodingSchema}
1504toEncodingData(){return new Map([["hash-type",this.hashType]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded HashFactory: ${_e}`);return new HashFactory({hashType:_e.get("hash-type")})}}class HbProofFields{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"hb-pk",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"hb-pk1sig",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"hb-pk2",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"hb-pk2sig",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"hb-sig",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({hbPk:_e,hbPk1sig:$t,hbPk2:Ft,hbPk2sig:Vt,hbSig:qt}){this.hbPk=typeof _e=="string"?base64ToBytes(_e):_e,this.hbPk1sig=typeof $t=="string"?base64ToBytes($t):$t,this.hbPk2=typeof Ft=="string"?base64ToBytes(Ft):Ft,this.hbPk2sig=typeof Vt=="string"?base64ToBytes(Vt):Vt,this.hbSig=typeof qt=="string"?base64ToBytes(qt):qt}getEncodingSchema(){return HbProofFields.encodingSchema}toEncodingData(){return new Map([["hb-pk",this.hbPk],["hb-pk1sig",this.hbPk1sig],["hb-pk2",this.hbPk2],["hb-pk2sig",this.hbPk2sig],["hb-sig",this.hbSig]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded HbProofFields: ${_e}`);return new HbProofFields({hbPk:_e.get("hb-pk"),hbPk1sig:_e.get("hb-pk1sig"),hbPk2:_e.get("hb-pk2"),hbPk2sig:_e.get("hb-pk2sig"),hbSig:_e.get("hb-sig")})}}class HealthCheck{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"db-available",valueSchema:new BooleanSchema,omitEmpty:!0},{key:"is-migrating",valueSchema:new BooleanSchema,omitEmpty:!0},{key:"message",valueSchema:new StringSchema,omitEmpty:!0},{key:"round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"version",valueSchema:new StringSchema,omitEmpty:!0},{key:"data",valueSchema:new OptionalSchema(UntypedValue.encodingSchema),omitEmpty:!0},{key:"errors",valueSchema:new OptionalSchema(new ArraySchema(new StringSchema)),omitEmpty:!0})),this.encodingSchemaValue}constructor({dbAvailable:_e,isMigrating:$t,message:Ft,round:Vt,version:qt,data:zt,errors:Ht}){this.dbAvailable=_e,this.isMigrating=$t,this.message=Ft,this.round=ensureBigInt(Vt),this.version=qt,this.data=zt,this.errors=Ht}getEncodingSchema(){return HealthCheck.encodingSchema}toEncodingData(){return new Map([["db-available",this.dbAvailable],["
vendor: 10,777 bytes, line 1504
1504is-migrating",this.isMigrating],["message",this.message],["round",this.round],["version",this.version],["data",typeof this.data<"u"?this.data.toEncodingData():void 0],["errors",this.errors]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded HealthCheck: ${_e}`);return new HealthCheck({dbAvailable:_e.get("db-available"),isMigrating:_e.get("is-migrating"),message:_e.get("message"),round:_e.get("round"),version:_e.get("version"),data:typeof _e.get("data")<"u"?UntypedValue.fromEncodingData(_e.get("data")):void 0,errors:_e.get("errors")})}}class IndexerStateProofMessage{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"block-headers-commitment",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"first-attested-round",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"latest-attested-round",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"ln-proven-weight",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"voters-commitment",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({blockHeadersCommitment:_e,firstAttestedRound:$t,latestAttestedRound:Ft,lnProvenWeight:Vt,votersCommitment:qt}){this.blockHeadersCommitment=typeof _e=="string"?base64ToBytes(_e):_e,this.firstAttestedRound=typeof $t>"u"?void 0:ensureBigInt($t),this.latestAttestedRound=typeof Ft>"u"?void 0:ensureBigInt(Ft),this.lnProvenWeight=typeof Vt>"u"?void 0:ensureBigInt(Vt),this.votersCommitment=typeof qt=="string"?base64ToBytes(qt):qt}getEncodingSchema(){return IndexerStateProofMessage.encodingSchema}toEncodingData(){return new Map([["block-headers-commitment",this.blockHeadersCommitment],["first-attested-round",this.firstAttestedRound],["latest-attested-round",this.latestAttestedRound],["ln-proven-weight",this.lnProvenWeight],["voters-commitment",this.votersCommitment]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded IndexerStateProofMessage: ${_e}`);return new IndexerStateProofMessage({blockHeadersCommitment:_e.get("block-headers-commitment"),firstAttestedRound:_e.get("first-attested-round"),latestAttestedRound:_e.get("latest-attested-round"),lnProvenWeight:_e.get("ln-proven-weight"),votersCommitment:_e.get("voters-commitment")})}}class MerkleArrayProof{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"hash-factory",valueSchema:new OptionalSchema(HashFactory.encodingSchema),omitEmpty:!0},{key:"path",valueSchema:new OptionalSchema(new ArraySchema(new ByteArraySchema)),omitEmpty:!0},{key:"tree-depth",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({hashFactory:_e,path:$t,treeDepth:Ft}){this.hashFactory=_e,this.path=$t,this.treeDepth=typeof Ft>"u"?void 0:ensureSafeInteger(Ft)}getEncodingSchema(){return MerkleArrayProof.encodingSchema}toEncodingData(){return new Map([["hash-factory",typeof this.hashFactory<"u"?this.hashFactory.toEncodingData():void 0],["path",this.path],["tree-depth",this.treeDepth]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded MerkleArrayProof: ${_e}`);return new MerkleArrayProof({hashFactory:typeof _e.get("hash-factory")<"u"?HashFactory.fromEncodingData(_e.get("hash-factory")):void 0,path:_e.get("path"),treeDepth:_e.get("tree-depth")})}}class MiniAssetHolding{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"address",valueSchema:new StringSchema,omitEmpty:!0},{key:"amount",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"is-frozen",valueSchema:new BooleanSchema,omitEmpty:!0},{key:"deleted",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0},{key:"opted-in-at-round",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"opted-out-at-round",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({address:_e,amount:$t,isFrozen:Ft,deleted:Vt,optedInAtRound:qt,optedOutAtRound:zt}){this.address=_e,this.amount=ensureBigInt($t),this.isFrozen=Ft,this.deleted=Vt,this.optedInAtRound=typeof qt>"u"?void 0:ensureBigInt(qt),this.optedOutAtRound=typeof zt>"u"?void 0:ensureBigInt(zt)}getEncodingSchema(){return MiniAssetHolding.encodingSchema}toEncodingData(){return new Map([["address",this.address],["amount",this.amount],["is-frozen",this.isFrozen],["deleted",this.deleted],["opted-in-at-round",this.optedInAtRound],["opted-out-at-round",this.optedOutAtRound]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded MiniAssetHolding: ${_e}`);return new MiniAssetHolding({address:_e.get("address"),amount:_e.get("amount"),isFrozen:_e.get("is-frozen"),deleted:_e.get("deleted"),optedInAtRound:_e.get("opted-in-at-round"),optedOutAtRound:_e.get("opted-out-at-round")})}}class ParticipationUpdates{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"absent-participation-accounts",valueSchema:new OptionalSchema(new ArraySchema(new StringSchema)),omitEmpty:!0},{key:"expired-participation-accounts",valueSchema:new OptionalSchema(new ArraySchema(new StringSchema)),omitEmpty:!0})),this.encodingSchemaValue}constructor({absentParticipationAccounts:_e,expiredParticipationAccounts:$t}){this.absentParticipationAccounts=_e,this.expiredParticipationAccounts=$t}getEncodingSchema(){return ParticipationUpdates.encodingSchema}toEncodingData(){return new Map([["absent-participation-accounts",this.absentParticipationAccounts],["expired-participation-accounts",this.expiredParticipationAccounts]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded ParticipationUpdates: ${_e}`);return new ParticipationUpdates({absentParticipationAccounts:_e.get("absent-participation-accounts"),expiredParticipationAccounts:_e.get("expired-participation-accounts")})}}class StateProofFields{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"part-proofs",valueSchema:new OptionalSchema(MerkleArrayProof.encodingSchema),omitEmpty:!0},{key:"positions-to-reveal",valueSchema:new OptionalSchema(new ArraySchema(new Uint64Schema)),omitEmpty:!0},{key:"reveals",valueSchema:new OptionalSchema(new ArraySchema(StateProofReveal.encodingSchema)),omitEmpty:!0},{key:"salt-version",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"sig-commit",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"sig-proofs",valueSchema:new OptionalSchema(MerkleArrayProof.encodingSchema),omitEmpty:!0},{key:"signed-weight",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({partProofs:_e,positionsToReveal:$t,reveals:Ft,saltVersion:Vt,sigCommit:qt,sigProofs:zt,signedWeight:Ht}){this.partProofs=_e,this.positionsToReveal=typeof $t>"u"?void 0:$t.map(ensureBigInt),this.reveals=Ft,this.saltVersion=typeof Vt>"u"?void 0:ensureSafeInteger(Vt),this.sigCommit=typeof qt=="string"?base64ToBytes(qt):qt,this.sigProofs=zt,this.signedWeight=typeof Ht>"u"?void 0:ensureBigInt(Ht)}getEncodingSchema(){return StateProofFields.encodingSchema}toEncodingData(){return new Map([["part-proofs",typeof this.partProofs<"u"?this.partProofs.toEncodingData():void 0],["positions-to-reveal",this.positionsToReveal],["reveals",typeof this.reveals<"u"?this.reveals.map(_e=>_e.toEncodingData()):void 0],["salt-version",this.saltVersion],["sig-commit",this.sigCommit],["sig-proofs",typeof this.sigProofs<"u"?this.sigProofs.toEncodingData():void 0],["signed-weight",this.signedWeight]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded StateProofFields: ${_e}`);return new StateProofFields({partProofs:typeof _e.get("part-proofs")<"u"?MerkleArrayProof.fromEncodingData(_e.get("part-proofs")):void 0,positionsToReveal:_e.get("positions-to-reveal"),reveals:typeof _e.get("reveals")<"u"?_e.get("reveals").map($t=>StateProofReveal.fromEncodingData($t)):void 0,saltVersion:_e.get("salt-version"),sigCommit:_e.get("sig-commit"),sigProofs:typeof _e.get("sig-proofs")<"u"?MerkleArrayProof.fromEncodingData(_e.get("sig-proofs")):void 0,signedWeight:_e.get("signed-weight")})}}class StateProofParticipant{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"verifier",valueSchema:new OptionalSchema(StateProofVerifier.encodingSchema),omitEmpty:!0},{key:"weight",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({verifier:_e,weight:$t}){this.verifier=_e,this.weight=typeof $t>"u"?void 0:ensureBigInt($t)}getEncodingSchema(){return StateProofParticipant.encodingSchema}toEncodingData(){return new Map([["verifier",typeof this.verifier<"u"?this.verifier.toEncodingData():void 0],["weight",this.weight]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded StateProofParticipant: ${_e}`);return new StateProofParticipant({verifier:typeof _e.get("verifier")<"u"?StateProofVerifier.fromEncodingData(_e.get("verifier")):void 0,weight:_e.get("weight")})}}class StateProofReveal{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"participant",valueSchema:new OptionalSchema(StateProofParticipant.encodingSchema),omitEmpty:!0},{key:"position",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"sig-slot",valueSchema:new OptionalSchema(StateProofSigSlot.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({participant:_e,position:$t,sigSlot:Ft}){this.participant=_e,this.position=typeof $t>"u"?void 0:ensureBigInt($t),this.sigSlot=Ft}getEncodingSchema(){return StateProofReveal.encodingSchema}toEncodingData(){return new Map([["participant",typeof this.participant<"u"?this.participant.toEncodingData():void 0],["position",this.position],["sig-slot",typeof this.sigSlot<"u"?this.sigSlot.toEncodingData():void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded StateProofReveal: ${_e}`);return new StateProofReveal({participant:typeof _e.get("participant")<"u"?StateProofParticipant.fromEncodingData(_e.get("participant")):void 0,position:_e.get("position"),sigSlot:typeof _e.get("sig-slot")<"u"?StateProofSigSlot.from
1504EncodingData(_e.get("sig-slot")):void 0})}}class StateProofSigSlot{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"lower-sig-weight",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"signature",valueSchema:new OptionalSchema(StateProofSignature.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({lowerSigWeight:_e,signature:$t}){this.lowerSigWeight=typeof _e>"u"?void 0:ensureBigInt(_e),this.signature=$t}getEncodingSchema(){return StateProofSigSlot.encodingSchema}toEncodingData(){return new Map([["lower-sig-weight",this.lowerSigWeight],["signature",typeof this.signature<"u"?this.signature.toEncodingData():void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded StateProofSigSlot: ${_e}`);return new StateProofSigSlot({lowerSigWeight:_e.get("lower-sig-weight"),signature:typeof _e.get("signature")<"u"?StateProofSignature.fromEncodingData(_e.get("signature")):void 0})}}class StateProofSignature{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"falcon-signature",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"merkle-array-index",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"proof",valueSchema:new OptionalSchema(MerkleArrayProof.encodingSchema),omitEmpty:!0},{key:"verifying-key",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({falconSignature:_e,merkleArrayIndex:$t,proof:Ft,verifyingKey:Vt}){this.falconSignature=typeof _e=="string"?base64ToBytes(_e):_e,this.merkleArrayIndex=typeof $t>"u"?void 0:ensureSafeInteger($t),this.proof=Ft,this.verifyingKey=typeof Vt=="string"?base64ToBytes(Vt):Vt}getEncodingSchema(){return StateProofSignature.encodingSchema}toEncodingData(){return new Map([["falcon-signature",this.falconSignature],["merkle-array-index",this.merkleArrayIndex],["proof",typeof this.proof<"u"?this.proof.toEncodingData():void 0],["verifying-key",this.verifyingKey]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded StateProofSignature: ${_e}`);return new StateProofSignature({falconSignature:_e.get("falcon-signature"),merkleArrayIndex:_e.get("merkle-array-index"),proof:typeof _e.get("proof")<"u"?MerkleArrayProof.fromEncodingData(_e.get("proof")):void 0,verifyingKey:_e.get("verifying-key")})}}class StateProofTracking{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"next-round",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"online-total-weight",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"type",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"voters-commitment",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({nextRound:_e,onlineTotalWeight:$t,type:Ft,votersCommitment:Vt}){this.nextRound=typeof _e>"u"?void 0:ensureBigInt(_e),this.onlineTotalWeight=typeof $t>"u"?void 0:ensureBigInt($t),this.type=typeof Ft>"u"?void 0:ensureSafeInteger(Ft),this.votersCommitment=typeof Vt=="string"?base64ToBytes(Vt):Vt}getEncodingSchema(){return StateProofTracking.encodingSchema}toEncodingData(){return new Map([["next-round",this.nextRound],["online-total-weight",this.onlineTotalWeight],["type",this.type],["voters-commitment",this.votersCommitment]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded StateProofTracking: ${_e}`);return new StateProofTracking({nextRound:_e.get("next-round"),onlineTotalWeight:_e.get("online-total-weight"),type:_e.get("type"),votersCommitment:_e.get("voters-commitment")})}}class StateProofVerifier{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"commitment",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"key-lifetime",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({commitment:_e,keyLifetime:$t}){this.commitment=typeof _e=="string"?base64ToBytes(_e):_e,this.keyLifetime=typeof $t>"u"?void 0:ensureBigInt($t)}getEncodingSchema(){return StateProofVerifier.encodingSchema}toEncodingData(){return new Map([["commitment",this.commitment],["key-lifetime",this.keyLifetime]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded StateProofVerifier: ${_e}`);return new StateProofVerifier({commitment:_e.get("commitment"),keyLifetime:_e.get("key-lifetime")}
1504)}}class StateSchema{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"num-byte-slice",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"num-uint",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({numByteSlice:_e,numUint:$t}){this.numByteSlice=ensureSafeInteger(_e),this.numUint=ensureSafeInteger($t)}getEncodingSchema(){return StateSchema.encodingSchema}toEncodingData(){return new Map([["num-byte-slice",this.numByteSlice],["num-uint",this.numUint]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded StateSchema: ${_e}`);return new StateSchema({numByteSlice:_e.get("num-byte-slice"),numUint:_e.get("num-uint")})}}class TealKeyValue{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"key",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"value",valueSchema:TealValue.encodingSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({key:_e,value:$t}){this.key=typeof _e=="string"?base64ToBytes(_e):_e,this.value=$t}getEncodingSchema(){return TealKeyValue.encodingSchema}toEncodingData(){return new Map([["key",this.key],["value",this.value.toEncodingData()]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TealKeyValue: ${_e}`);return new TealKeyValue({key:_e.get("key"),value:TealValue.fromEncodingData(_e.get("value")??new Map)})}}class TealValue{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"bytes",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"type",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"uint",valueSchema:new Uint64Schema,omitEmpty:!0})),this.encodingSchemaValue}constructor({bytes:_e,type:$t,uint:Ft}){this.bytes=typeof _e=="string"?base64ToBytes(_e):_e,this.type=ensureSafeInteger($t),this.uint=ensureBigInt(Ft)}getEncodingSchema(){return TealValue.encodingSchema}toEncodingData(){return new Map([["bytes",this.bytes],["type",this.type],["uint",this.uint]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TealValue: ${_e}`);return new TealValue({bytes:_e.get("bytes"),type:_e.get("type"),uint:_e.get("uint")})}}class Transaction{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"fee",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"first-valid",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"last-valid",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"sender",valueSchema:new StringSchema,omitEmpty:!0},{key:"application-transaction",valueSchema:new OptionalSchema(TransactionApplication.encodingSchema),omitEmpty:!0},{key:"asset-config-transaction",valueSchema:new OptionalSchema(TransactionAssetConfig.encodingSchema),omitEmpty:!0},{key:"asset-freeze-transaction",valueSchema:new OptionalSchema(TransactionAssetFreeze.encodingSchema),omitEmpty:!0},{key:"asset-transfer-transaction",valueSchema:new OptionalSchema(TransactionAssetTransfer.encodingSchema),omitEmpty:!0},{key:"auth-addr",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"close-rewards",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"closing-amount",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"confirmed-round",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"created-application-index",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"created-asset-index",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"genesis-hash",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"genesis-id",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"global-state-delta",valueSchema:new OptionalSchema(new ArraySchema(EvalDeltaKeyValue.encodingSchema)),omitEmpty:!0},{key:"group",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"heartbeat-transaction",valueSchema:new OptionalSchema(TransactionHeartbeat.encodingSchema),omitEmpty:!0},{key:"id",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"inner-txns",valueSchema:new OptionalSchema(new ArraySchema(Transaction.encodingSchema)),omitEmpty:!0},{key:"intra-round-offset",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"keyreg-transaction",valueSchema:new OptionalSchema(TransactionKeyreg.encodingSchema),omitEmpty:!0},{key:"lease",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"local-state-delta",valueSchema:new OptionalSchema(new ArraySchema(AccountStateDelta.encodingSchema)),omitEmpty:!0},{key:"logs",valueSchema:new OptionalSchema(new ArraySchema(new ByteArraySchema)),omitEmpty:!0},{key:"note",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"payment-transaction",valueSchema:new OptionalSchema(TransactionPayment.encodingSchema),omitEmpty:!0},{key:"receiver-rewards",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"rekey-to",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0}
1504,{key:"round-time",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"sender-rewards",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"signature",valueSchema:new OptionalSchema(TransactionSignature.encodingSchema),omitEmpty:!0},{key:"state-proof-transaction",valueSchema:new OptionalSchema(TransactionStateProof.encodingSchema),omitEmpty:!0},{key:"tx-type",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({fee:_e,firstValid:$t,lastValid:Ft,sender:Vt,applicationTransaction:qt,assetConfigTransaction:zt,assetFreezeTransaction:Ht,assetTransferTransaction:Kt,authAddr:Gt,closeRewards:Jt,closingAmount:Xt,confirmedRound:Zt,createdApplicationIndex:er,createdAssetIndex:tr,genesisHash:rr,genesisId:ar,globalStateDelta:nr,group:cr,heartbeatTransaction:fr,id:vr,innerTxns:xr,intraRoundOffset:Sr,keyregTransaction:Tr,lease:Br,localStateDelta:jr,logs:Rr,note:yr,paymentTransaction:sr,receiverRewards:or,rekeyTo:Qt,roundTime:ir,senderRewards:ur,signature:gr,stateProofTransaction:dr,txType:lr}){this.fee=ensureBigInt(_e),this.firstValid=ensureBigInt($t),this.lastValid=ensureBigInt(Ft),this.sender=Vt,this.applicationTransaction=qt,this.assetConfigTransaction=zt,this.assetFreezeTransaction=Ht,this.assetTransferTransaction=Kt,this.authAddr=typeof Gt=="string"?Address.fromString(Gt):Gt,this.closeRewards=typeof Jt>"u"?void 0:ensureBigInt(Jt),this.closingAmount=typeof Xt>"u"?void 0:ensureBigInt(Xt),this.confirmedRound=typeof Zt>"u"?void 0:ensureBigInt(Zt),this.createdApplicationIndex=typeof er>"u"?void 0:ensureBigInt(er),this.createdAssetIndex=typeof tr>"u"?void 0:ensureBigInt(tr),this.genesisHash=typeof rr=="string"?base64ToBytes(rr):rr,this.genesisId=ar,this.globalStateDelta=nr,this.group=typeof cr=="string"?base64ToBytes(cr):cr,this.heartbeatTransaction=fr,this.id=vr,this.innerTxns=xr,this.intraRoundOffset=typeof Sr>"u"?void 0:ensureSafeInteger(Sr),this.keyregTransaction=Tr,this.lease=typeof Br=="string"?base64ToBytes(Br):Br,this.localStateDelta=jr,this.logs=Rr,this.note=typeof yr=="string"?base64ToBytes(yr):yr,this.paymentTransaction=sr,this.receiverRewards=typeof or>"u"?void 0:ensureBigInt(or),this.rekeyTo=typeof Qt=="string"?Address.fromString(Qt):Qt,this.roundTime=typeof ir>"u"?void 0:ensureSafeInteger(ir),this.senderRewards=typeof ur>"u"?void 0:ensureBigInt(ur),this.signature=gr,this.stateProofTransaction=dr,this.txType=lr}getEncodingSchema(){return Transaction.encodingSchema}toEncodingData(){return new Map([["fee",this.fee],["first-valid",this.firstValid],["last-valid",this.lastValid],["sender",this.sender],["application-transaction",typeof this.applicationTransaction<"u"?this.applicationTransaction.toEncodingData():void 0],["asset-config-transaction",typeof this.assetConfigTransaction<"u"?this.assetConfigTransaction.toEncodingData():void 0],["asset-freeze-transaction",typeof this.assetFreezeTransaction<"u"?this.assetFreezeTransaction.toEncodingData():void 0],["asset-transfer-transaction",typeof this.assetTransferTransaction<"u"?this.assetTransferTransaction.toEncodingData():void 0],["auth-addr",typeof this.authAddr<"u"?this.authAddr.toString():void 0],["close-rewards",this.closeRewards],["closing-amount",this.closingAmount],["confirmed-round",this.confirmedRound],["created-application-index",this.createdApplicationIndex],["created-asset-index",this.createdAssetIndex],["genesis-hash",this.genesisHash],["genesis-id",this.genesisId],["global-state-delta",typeof this.globalStateDelta<"u"?this.globalStateDelta.map(_e=>_e.toEncodingData()):void 0],["group",this.group],["heartbeat-transaction",typeof this.heartbeatTransaction<"u"?this.heartbeatTransaction.toEncodingData():void 0],["id",this.id],["inner-txns",typeof this.innerTxns<"u"?this.innerTxns.map(_e=>_e.toEncodingData()):void 0],["intra-round-offset",this.intraRoundOffset],["keyreg-transaction",typeof this.keyregTransaction<"u"?this.keyregTransaction.toEncodingData():void 0],["lease",this.lease],["local-state-delta",typeof this.localStateDelta<"u"?this.localStateDelta.map(_e=>_e.toEncodingData()):void 0],["logs",this.logs],["note",this.note],["payment-transaction",typeof this.paymentTransaction<"u"?this.paymentTransaction.toEncodingData():void 0],["receiver-rewards",this.receiverRewards],["rekey-to",typeof this.rekeyTo<"u"?this.rekeyTo.toString():void 0],["round-time",this.roundTime],["sender-rewards",this.senderRewards],["signature",typeof this.signature<"u"?this.signature.toEncodingData():void 0],["state-proof-transaction",typeof this.stateProofTransaction<"u"?this.stateProofTransaction.toEncodingData():void 0],["tx-type",this.txType]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded Transaction: ${_e}`);return new Transaction({fee:_e.get("fee"),firstValid:_e.get("first-valid"),lastValid:_e.get("last-valid"),sender:_e.get("sender"),applicationTransaction:typeof _e.get("application-transaction")<"u"?TransactionApplication.fromEncodingData(_e.get("application-transaction")):void 0,assetConfigTransaction:typeof _e.get("asset-config-transaction")<"u"?TransactionAssetConfig.fromEncodingData(_e.get("asset-config-transaction")):void 0,assetFreezeTransaction:typeof _e.get("asset-freeze-transaction")<"u"?TransactionAssetFreeze.fromEncodingData(_e.get("asset-freeze-transaction")):void 0,assetTransferTransaction:typeof _e.get("asset-transfer-transaction")<"u"?TransactionAssetTransfer.fromEncodingData(_e.get("asset-transfer-transaction")):void 0,authAddr:_e.get("auth-addr"),closeRewards:_e.get("close-rewards"),closingAmou
1504nt:_e.get("closing-amount"),confirmedRound:_e.get("confirmed-round"),createdApplicationIndex:_e.get("created-application-index"),createdAssetIndex:_e.get("created-asset-index"),genesisHash:_e.get("genesis-hash"),genesisId:_e.get("genesis-id"),globalStateDelta:typeof _e.get("global-state-delta")<"u"?_e.get("global-state-delta").map($t=>EvalDeltaKeyValue.fromEncodingData($t)):void 0,group:_e.get("group"),heartbeatTransaction:typeof _e.get("heartbeat-transaction")<"u"?TransactionHeartbeat.fromEncodingData(_e.get("heartbeat-transaction")):void 0,id:_e.get("id"),innerTxns:typeof _e.get("inner-txns")<"u"?_e.get("inner-txns").map($t=>Transaction.fromEncodingData($t)):void 0,intraRoundOffset:_e.get("intra-round-offset"),keyregTransaction:typeof _e.get("keyreg-transaction")<"u"?TransactionKeyreg.fromEncodingData(_e.get("keyreg-transaction")):void 0,lease:_e.get("lease"),localStateDelta:typeof _e.get("local-state-delta")<"u"?_e.get("local-state-delta").map($t=>AccountStateDelta.fromEncodingData($t)):void 0,logs:_e.get("logs"),note:_e.get("note"),paymentTransaction:typeof _e.get("payment-transaction")<"u"?TransactionPayment.fromEncodingData(_e.get("payment-transaction")):void 0,receiverRewards:_e.get("receiver-rewards"),rekeyTo:_e.get("rekey-to"),roundTime:_e.get("round-time"),senderRewards:_e.get("sender-rewards"),signature:typeof _e.get("signature")<"u"?TransactionSignature.fromEncodingData(_e.get("signature")):void 0,stateProofTransaction:typeof _e.get("state-proof-transaction")<"u"?TransactionStateProof.fromEncodingData(_e.get("state-proof-transaction")):void 0,txType:_e.get("tx-type")})}}class TransactionApplication{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"application-id",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"accounts",valueSchema:new OptionalSchema(new ArraySchema(new StringSchema)),omitEmpty:!0},{key:"application-args",valueSchema:new OptionalSchema(new ArraySchema(new ByteArraySchema)),omitEmpty:!0},{key:"approval-program",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"clear-state-program",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"extra-program-pages",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"foreign-apps",valueSchema:new OptionalSchema(new ArraySchema(new Uint64Schema)),omitEmpty:!0},{key:"foreign-assets",valueSchema:new OptionalSchema(new ArraySchema(new Uint64Schema)),omitEmpty:!0},{key:"global-state-schema",valueSchema:new OptionalSchema(StateSchema.encodingSchema),omitEmpty:!0},{key:"local-state-schema",valueSchema:new OptionalSchema(StateSchema.encodingSchema),omitEmpty:!0},{key:"on-completion",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({applicationId:_e,accounts:$t,applicationArgs:Ft,approvalProgram:Vt,clearStateProgram:qt,extraProgramPages:zt,foreignApps:Ht,foreignAssets:Kt,globalStateSchema:Gt,localStateSchema:Jt,onCompletion:Xt}){this.applicationId=ensureBigInt(_e),this.accounts=typeof $t<"u"?$t.map(Zt=>typeof Zt=="string"?Address.fromString(Zt):Zt):void 0,this.applicationArgs=Ft,this.approvalProgram=typeof Vt=="string"?base64ToBytes(Vt):Vt,this.clearStateProgram=typeof qt=="string"?base64ToBytes(qt):qt,this.extraProgramPages=typeof zt>"u"?void 0:ensureSafeInteger(zt),this.foreignApps=typeof Ht>"u"?void 0:Ht.map(ensureBigInt),this.foreignAssets=typeof Kt>"u"?void 0:Kt.map(ensureBigInt),this.globalStateSchema=Gt,this.localStateSchema=Jt,this.onCompletion=Xt}getEncodingSchema(){return TransactionApplication.encodingSchema}toEncodingData(){return new Map([["application-id",this.applicationId],["accounts",typeof this.accounts<"u"?this.accounts.map(_e=>_e.toString()):void 0],["application-args",this.applicationArgs],["approval-program",this.approvalProgram],["clear-state-program",this.clearStateProgram],["extra-program-pages",this.extraProgramPages],["foreign-apps",this.foreignApps],["foreign-assets",this.foreignAssets],["global-state-schema",typeof this.globalStateSchema<"u"?this.globalStateSchema.toEncodingData():void 0],["local-state-schema",typeof this.localStateSchema<"u"?this.localStateSchema.toEncodingData():void 0],["on-completion",this.onCompletion]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TransactionApplication: ${_e}`);return new TransactionApplication({applicationId:_e.get("application-id"),accounts:_e.get("accounts"),applicationArgs:_e.get("application-args"),approvalProgram:_e.get("approval-program"),clearStateProgram:_e.get("clear-state-program"),extraProgramPages:_e.get("extra-program-pages"),foreignApps:_e.get("foreign-apps"),foreignAssets:_e.get("foreign-assets"),globalStateSchema:typeof _e.get("global-state-schema")<"u"?StateSchema.fromEncodingData(_e.get("global-state-schema")):void 0,localStateSchema:typeof _e.get("local-state-schema")<"u"?StateSchema.fromEncodingData(_e.get("local-state-schema")):void 0,onCompletion:_e.get("on-completion")})}}class TransactionAssetConfig{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"asset-id",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"params",valueSchema:new OptionalSchema(AssetParams.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({assetId:_e,params:$t}){this.assetId=typeof _e>"u"?void 0:ensureBigInt(_e),this.params=$t}getEncodingSchema(){return TransactionAssetConfig.encodingSchema}toEncodingData(){return new Map([["asset-id",this.assetId],["params",typeof this.params<"u"?this.params.toEncodingData():void 0]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TransactionAssetConfig: ${_e}`);return new TransactionAssetConfig({assetId:_e.get("asset-id"),params:typeof _e.get("params")<"u"?AssetParams.fromEncodingData(_e.get("params")):void 0})}}class TransactionAssetFreeze{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"address",valueSchema:new StringSchema,omitEmpty:!0},{key:"asset-id",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"new-freeze-status",valueSchema:new BooleanSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({address:_e,assetId:$t,newFreezeStatus:Ft}){this.address=_e,this.assetId=ensureBigInt($t),this.newFreezeStatus=Ft}getEncodingSchema(){return TransactionAssetFreeze.encodingSchema}toEncodingData(){return new Map([["address",this.address],["asset-id",this.assetId],["new-freeze-status",this.newFreezeStatus]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TransactionAssetFreeze: ${_e}`);return new TransactionAssetFreeze({address:_e.get("address"),assetId:_e.get("asset-id"),newFreezeStatus:_e.get("new-freeze-status")})}}class TransactionAssetTransfer{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"amount",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"asset-id",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"receiver",valueSchema:new StringSchema,omitEmpty:!0},{key:"close-amount",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"close-to",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0},{key:"sender",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({amount:_e,assetId:$t,receiver:Ft,closeAmount:Vt,closeTo:qt,sender:zt}){this.amount=ensureBigInt(_e),this.assetId=ensureBigInt($t),this.receiver=Ft,this.closeAmount=typeof Vt>"u"?void 0:ensureBigInt(Vt),this.closeTo=qt,this.sender=zt}getEncodingSchema(){return TransactionAssetTransfer.encodingSchema}toEncodingData(){return new Map([["amount",this.amount],["asset-id",this.assetId],["receiver",this.receiver],["close-amount",this.closeAmount],["close-to",this.closeTo],["sender",this.sender]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TransactionAssetTransfer: ${_e}`);return new TransactionAssetTransfer({amount:_e.get("amount"),assetId:_e.get("asset-id"),receiver:_e.get("receiver"),closeAmount:_e.get("close-amount"),closeTo:_e.get("close-to"),sender:_e.get("sender")})}}class TransactionHeartbeat{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"hb-address",valueSchema:new StringSchema,omitEmpty:!0},{key:"hb-key-dilution",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"hb-proof",valueSchema:HbProofFields.encodingSchema,omitEmpty:!0},{key:"hb-seed",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"hb-vote-id",valueSchema:new ByteArraySchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({hbAddress:_e,hbKeyDilution:$t,hbProof:Ft,hbSeed:Vt,hbVoteId:qt}){this.hbAddress=_e,this.hbKeyDilution=ensureBigInt($t),this.hbProof=Ft,this.hbSeed=typeof Vt=="string"?base64ToBytes(Vt):Vt,this.hbVoteId=typeof qt=="string"?base64ToBytes(qt):qt}getEncodingSchema(){return TransactionHeartbeat.encodingSchema}toEncodingData(){return new Map([["hb-address",this.hbAddress],["hb-key-dilution",this.hbKeyDilution],["hb-proof",this.hbProof.toEncodingData()],["hb-seed",this.hbSeed],["hb-vote-id",this.hbVoteId]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TransactionHeartbeat: ${_e}`);return new TransactionHeartbeat({hbAddress:_e.get("hb-address"),hbKeyDilution:_e.get("hb-key-dilution"),hbProof:HbProofFields.fromEncodingData(_e.get("hb-proof")??new Map),hbSeed:_e.get("hb-seed"),hbVoteId:_e.get("hb-vote-id")})}}class TransactionKeyreg{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"non-participation",valueSchema:new OptionalSchema(new BooleanSchema),omitEmpty:!0}
1504,{key:"selection-participation-key",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"state-proof-key",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"vote-first-valid",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"vote-key-dilution",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"vote-last-valid",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"vote-participation-key",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({nonParticipation:_e,selectionParticipationKey:$t,stateProofKey:Ft,voteFirstValid:Vt,voteKeyDilution:qt,voteLastValid:zt,voteParticipationKey:Ht}){this.nonParticipation=_e,this.selectionParticipationKey=typeof $t=="string"?base64ToBytes($t):$t,this.stateProofKey=typeof Ft=="string"?base64ToBytes(Ft):Ft,this.voteFirstValid=typeof Vt>"u"?void 0:ensureBigInt(Vt),this.voteKeyDilution=typeof qt>"u"?void 0:ensureBigInt(qt),this.voteLastValid=typeof zt>"u"?void 0:ensureBigInt(zt),this.voteParticipationKey=typeof Ht=="string"?base64ToBytes(Ht):Ht}getEncodingSchema(){return TransactionKeyreg.encodingSchema}toEncodingData(){return new Map([["non-participation",this.nonParticipation],["selection-participation-key",this.selectionParticipationKey],["state-proof-key",this.stateProofKey],["vote-first-valid",this.voteFirstValid],["vote-key-dilution",this.voteKeyDilution],["vote-last-valid",this.voteLastValid],["vote-participation-key",this.voteParticipationKey]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TransactionKeyreg: ${_e}`);return new TransactionKeyreg({nonParticipation:_e.get("non-participation"),selectionParticipationKey:_e.get("selection-participation-key"),stateProofKey:_e.get("state-proof-key"),voteFirstValid:_e.get("vote-first-valid"),voteKeyDilution:_e.get("vote-key-dilution"),voteLastValid:_e.get("vote-last-valid"),voteParticipationKey:_e.get("vote-participation-key")})}}class TransactionPayment{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"amount",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"receiver",valueSchema:new StringSchema,omitEmpty:!0},{key:"close-amount",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"close-remainder-to",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({amount:_e,receiver:$t,closeAmount:Ft,closeRemainderTo:Vt}){this.amount=ensureBigInt(_e),this.receiver=$t,this.closeAmount=typeof Ft>"u"?void 0:ensureBigInt(Ft),this.closeRemainderTo=Vt}getEncodingSchema(){return TransactionPayment.encodingSchema}toEncodingData(){return new Map([["amount",this.amount],["receiver",this.receiver],["close-amount",this.closeAmount],["close-remainder-to",this.closeRemainderTo]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TransactionPayment: ${_e}`);return new TransactionPayment({amount:_e.get("amount"),receiver:_e.get("receiver"),closeAmount:_e.get("close-amount"),closeRemainderTo:_e.get("close-remainder-to")})}}class TransactionResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"current-round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"transaction",valueSchema:Transaction.encodingSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({currentRound:_e,transaction:$t}){this.currentRound=ensureBigInt(_e),this.transaction=$t}getEncodingSchema(){return TransactionResponse.encodingSchema}toEncodingData(){return new Map([["current-round",this.currentRound],["transaction",this.transaction.toEncodingData()]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TransactionResponse: ${_e}`);return new TransactionResponse({currentRound:_e.get("current-round"),transaction:Transaction.fromEncodingData(_e.get("transaction")??new Map)})}}class TransactionSignature{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"logicsig",valueSchema:new OptionalSchema(TransactionSignatureLogicsig.encodingSchema),omitEmpty:!0},{key:"multisig",valueSchema:new OptionalSchema(TransactionSignatureMultisig.encodingSchema),omitEmpty:!0},{key:"sig",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({logicsig:_e,multisig:$t,sig:Ft}){this.logicsig=_e,this.multisig=$t,this.sig=typeof Ft=="string"?base64ToBytes(Ft):Ft}getEncodingSchema(){return TransactionSignature.encodingSchema}toEncodingData(){return new Map([["logicsig",typeof this.logicsig<"u"?this.logicsig.toEncodingData():void 0],["multisig",typeof this.multisig<"u"?this.multisig.toEncodingData():void 0],["sig",this.sig]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TransactionSignature: ${_e}`);return new TransactionSignature({logicsig:typeof _e.get("logicsig")<"u"?TransactionSignatureLogicsig.fromEncodingData(_e.get("logicsig")):void 0,multisig:typeof _e.get("multisig")<"u"?TransactionSignatureMultisig.fromEncodingData(_e.get("multisig")):void 0,sig:_e.get("sig")})}}class TransactionSignatureLogicsig{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"logic",valueSchema:new ByteArraySchema,omitEmpty:!0},{key:"args",valueSchema:new OptionalSchema(new ArraySchema(new ByteArraySchema)),omitEmpty:!0},{key:"multisig-signature",valueSchema:new OptionalSchema(TransactionSignatureMultisig.encodingSchema),omitEmpty:!0},{key:"signature",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({logic:_e,args:$t,multisigSignature:Ft,signature:Vt}){this.logic=typeof _e=="string"?base64ToBytes(_e):_e,this.args=$t,this.multisigSignature=Ft,this.signature=typeof Vt=="string"?base64ToBytes(Vt):Vt}getEncodingSchema(){return TransactionSignatureLogicsig.encodingSchema}toEncodingData(){return new Map([["logic",this.logic],["args",this.args],["multisig-signature",typeof this.multisigSignature<"u"?this.multisigSignature.toEncodingData():void 0],["signature",this.signature]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TransactionSignatureLogicsig: ${_e}`);return new TransactionSignatureLogicsig({logic:_e.get("logic"),args:_e.get("args"),multisigSignature:typeof _e.get("multisig-signature")<"u"?TransactionSignatureMultisig.fromEncodingData(_e.get("multisig-signature")):void 0,signature:_e.get("signature")})}}class TransactionSignatureMultisig{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"subsignature",valueSchema:new OptionalSchema(new ArraySchema(TransactionSignatureMultisigSubsignature.encodingSchema)),omitEmpty:!0},{key:"threshold",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0},{key:"version",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({subsignature:_e,threshold:$t,version:Ft}){this.subsignature=_e,this.threshold=typeof $t>"u"?void 0:ensureSafeInteger($t),this.version=typeof Ft>"u"?void 0:ensureSafeInteger(Ft)}getEncodingSchema(){return TransactionSignatureMultisig.encodingSchema}toEncodingData(){return new Map([["subsignature",typeof this.subsignature<"u"?this.subsignature.map(_e=>_e.toEncodingData()):void 0],["threshold",this.threshold],["version",this.version]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TransactionSignatureMultisig: ${_e}`);return new TransactionSignatureMultisig({subsignature:typeof _e.get("subsignature")<"u"?_e.get("subsignature").map($t=>TransactionSignatureMultisigSubsignature.fromEncodingData($t)):void 0,threshold:_e.get("threshold"),version:_e.get("version")})}}class TransactionSignatureMultisigSubsignature{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"public-key",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0},{key:"signature",valueSchema:new OptionalSchema(new ByteArraySchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({publicKey:_e,signature:$t}){this.publicKey=typeof _e=="string"?base64ToBytes(_e):_e,this.signature=typeof $t=="string"?base64ToBytes($t):$t}getEncodingSchema(){return TransactionSignatureMultisigSubsignature.encodingSchema}toEncodingData(){return new Map([["public-key",this.publicKey],["signature",this.signature]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TransactionSignatureMultisigSubsignature: ${_e}`);return new TransactionSignatureMultisigSubsignature({publicKey:_e.get("public-key"),signature:_e.get("signature")})}}class TransactionStateProof{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"message",valueSchema:new OptionalSchema(IndexerStateProofMessage.encodingSchema),omitEmpty:!0},{key:"state-proof",valueSchema:new OptionalSchema(StateProofFields.encodingSchema),omitEmpty:!0},{key:"state-proof-type",valueSchema:new OptionalSchema(new Uint64Schema),omitEmpty:!0})),this.encodingSchemaValue}constructor({message:_e,stateProof:$t,stateProofType:Ft}){this.message=_e,this.stateProof=$t,this.stateProofType=typeof Ft>"u"?void 0:ensureSafeInteger(Ft)}getEncodingSchema(){return TransactionStateProof.encodingSchema}toEncodingData(){return new Map([["message",typeof this.message<"u"?this.message.toEncodingData():void 0],["state-proof",typeof this.stateProof<"u"?this.stateProof.toEncodingData():void 0],["state-proof-type",this.stateProofType]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TransactionStateProof: ${_e}`);return new TransactionStateProof({message:typeof _e.get("message")<"u"?IndexerStateProofMessage.from
1504EncodingData(_e.get("message")):void 0,stateProof:typeof _e.get("state-proof")<"u"?StateProofFields.fromEncodingData(_e.get("state-proof")):void 0,stateProofType:_e.get("state-proof-type")})}}class TransactionsResponse{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new NamedMapSchema([]),this.encodingSchemaValue.pushEntries({key:"current-round",valueSchema:new Uint64Schema,omitEmpty:!0},{key:"transactions",valueSchema:new ArraySchema(Transaction.encodingSchema),omitEmpty:!0},{key:"next-token",valueSchema:new OptionalSchema(new StringSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({currentRound:_e,transactions:$t,nextToken:Ft}){this.currentRound=ensureBigInt(_e),this.transactions=$t,this.nextToken=Ft}getEncodingSchema(){return TransactionsResponse.encodingSchema}toEncodingData(){return new Map([["current-round",this.currentRound],["transactions",this.transactions.map(_e=>_e.toEncodingData())],["next-token",this.nextToken]])}static fromEncodingData(_e){if(!(_e instanceof Map))throw new Error(`Invalid decoded TransactionsResponse: ${_e}`);return new TransactionsResponse({currentRound:_e.get("current-round"),transactions:(_e.get("transactions")??[]).map($t=>Transaction.fromEncodingData($t)),nextToken:_e.get("next-token")})}}const types=Object.freeze(Object.defineProperty({__proto__:null,Account,AccountParticipation,AccountResponse,AccountStateDelta,AccountsResponse,Application,ApplicationLocalState,ApplicationLocalStatesResponse,ApplicationLogData,ApplicationLogsResponse,ApplicationParams,ApplicationResponse,ApplicationStateSchema,ApplicationsResponse,Asset,AssetBalancesResponse,AssetHolding,AssetHoldingsResponse,AssetParams,AssetResponse,AssetsResponse,Block,BlockHeadersResponse,BlockRewards,BlockUpgradeState,BlockUpgradeVote,Box,BoxDescriptor,BoxesResponse,ErrorResponse,EvalDelta,EvalDeltaKeyValue,HashFactory,HbProofFields,HealthCheck,IndexerStateProofMessage,MerkleArrayProof,MiniAssetHolding,ParticipationUpdates,StateProofFields,StateProofParticipant,StateProofReveal,StateProofSigSlot,StateProofSignature,StateProofTracking,StateProofVerifier,StateSchema,TealKeyValue,TealValue,Transaction,TransactionApplication,TransactionAssetConfig,TransactionAssetFreeze,TransactionAssetTransfer,TransactionHeartbeat,TransactionKeyreg,TransactionPayment,TransactionResponse,TransactionSignature,TransactionSignatureLogicsig,TransactionSignatureMultisig,TransactionSignatureMultisigSubsignature,TransactionStateProof,TransactionsResponse},Symbol.toStringTag,{value:"Module"}));class MakeHealthCheck extends JSONRequest{path(){return"/health"}prepare(_e){return decodeJSON(_e.getJSONText(),HealthCheck)}}class LookupAssetBalances extends JSONRequest{constructor(_e,$t){super(_e),this.index=BigInt($t)}path(){return`/v2/assets/${this.index}/balances`}limit(_e){return this.query.limit=_e,this}currencyGreaterThan(_e){return this.query["currency-greater-than"]=_e.toString(),this}currencyLessThan(_e){return this.query["currency-less-than"]=_e,this}nextToken(_e){return this.query.next=_e,this}includeAll(_e=!0){return this.query["include-all"]=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),AssetBalancesResponse)}}function base64StringFunnel(yt){return typeof yt=="string"?yt:bytesToBase64(yt)}class LookupAccountTransactions extends JSONRequest{constructor(_e,$t){super(_e),this.account=$t.toString()}path(){return`/v2/accounts/${this.account}/transactions`}notePrefix(_e){return this.query["note-prefix"]=base64StringFunnel(_e),this}txType(_e){return this.query["tx-type"]=_e,this}sigType(_e){return this.query["sig-type"]=_e,this}txid(_e){return this.query.txid=_e,this}round(_e){return this.query.round=_e,this}minRound(_e){return this.query["min-round"]=_e,this}maxRound(_e){return this.query["max-round"]=_e,this}assetID(_e){return this.query["asset-id"]=_e,this}limit(_e){return this.query.limit=_e,this}beforeTime(_e){return this.query["before-time"]=_e instanceof Date?_e.toISOString():_e,this}afterTime(_e){return this.query["after-time"]=_e instanceof Date?_e.toISOString():_e,this}currencyGreaterThan(_e){return this.query["currency-greater-than"]=_e.toString(),this}currencyLessThan(_e){return this.query["currency-less-than"]=_e,this}nextToken(_e){return this.query.next=_e,this}rekeyTo(_e){return this.query["rekey-to"]=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),TransactionsResponse)}}class LookupAssetTransactions extends JSONRequest{constructor(_e,$t){super(_e),this.index=BigInt($t)}path(){return`/v2/assets/${this.index}/transactions`}notePrefix(_e){return this.query["note-prefix"]=base64StringFunnel(_e),this}txType(_e){return this.query["tx-type"]=_e,this}sigType(_e){return this.query["sig-type"]=_e,this}txid(_e){return this.query.txid=_e,this}
1504round(_e){return this.query.round=_e,this}minRound(_e){return this.query["min-round"]=_e,this}maxRound(_e){return this.query["max-round"]=_e,this}limit(_e){return this.query.limit=_e,this}beforeTime(_e){return this.query["before-time"]=_e instanceof Date?_e.toISOString():_e,this}afterTime(_e){return this.query["after-time"]=_e instanceof Date?_e.toISOString():_e,this}currencyGreaterThan(_e){return this.query["currency-greater-than"]=_e.toString(),this}currencyLessThan(_e){return this.query["currency-less-than"]=_e,this}addressRole(_e){return this.query["address-role"]=_e,this}address(_e){return this.query.address=_e.toString(),this}excludeCloseTo(_e){return this.query["exclude-close-to"]=_e,this}nextToken(_e){return this.query.next=_e,this}rekeyTo(_e){return this.query["rekey-to"]=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),TransactionsResponse)}}class LookupBlock extends JSONRequest{constructor(_e,$t){super(_e),this.round=BigInt($t)}path(){return`/v2/blocks/${this.round}`}headerOnly(_e){return this.query["header-only"]=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),Block)}}class LookupTransactionByID extends JSONRequest{constructor(_e,$t){super(_e),this.txID=$t}path(){return`/v2/transactions/${this.txID}`}prepare(_e){return decodeJSON(_e.getJSONText(),TransactionResponse)}}class LookupAccountByID extends JSONRequest{constructor(_e,$t){super(_e),this.account=$t.toString()}path(){return`/v2/accounts/${this.account}`}round(_e){return this.query.round=_e,this}includeAll(_e=!0){return this.query["include-all"]=_e,this}exclude(_e){return this.query.exclude=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),AccountResponse)}}class LookupAccountAssets extends JSONRequest{constructor(_e,$t){super(_e),this.account=$t.toString()}path(){return`/v2/accounts/${this.account}/assets`}limit(_e){return this.query.limit=_e,this}round(_e){return this.query.round=_e,this}nextToken(_e){return this.query.next=_e,this}includeAll(_e=!0){return this.query["include-all"]=_e,this}assetId(_e){return this.query["asset-id"]=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),AssetHoldingsResponse)}}class LookupAccountCreatedAssets extends JSONRequest{constructor(_e,$t){super(_e),this.account=$t.toString()}path(){return`/v2/accounts/${this.account}/created-assets`}limit(_e){return this.query.limit=_e,this}round(_e){return this.query.round=_e,this}nextToken(_e){return this.query.next=_e,this}includeAll(_e=!0){return this.query["include-all"]=_e,this}assetID(_e){return this.query["asset-id"]=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),AssetsResponse)}}class LookupAccountAppLocalStates extends JSONRequest{constructor(_e,$t){super(_e),this.account=$t.toString()}path(){return`/v2/accounts/${this.account}/apps-local-state`}limit(_e){return this.query.limit=_e,this}round(_e){return this.query.round=_e,this}nextToken(_e){return this.query.next=_e,this}includeAll(_e=!0){return this.query["include-all"]=_e,this}applicationID(_e){return this.query["application-id"]=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),ApplicationLocalStatesResponse)}}class LookupAccountCreatedApplications extends JSONRequest{constructor(_e,$t){super(_e),this.account=$t.toString()}path(){return`/v2/accounts/${this.account}/created-applications`}limit(_e){return this.query.limit=_e,this}round(_e){return this.query.round=_e,this}nextToken(_e){return this.query.next=_e,this}includeAll(_e=!0){return this.query["include-all"]=_e,this}applicationID(_e){return this.query["application-id"]=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),ApplicationsResponse)}}class LookupAssetByID extends JSONRequest{constructor(_e,$t){super(_e),this.index=BigInt($t)}path(){return`/v2/assets/${this.index}`}includeAll(_e=!0){return this.query["include-all"]=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),AssetResponse)}}class LookupApplications extends JSONRequest{constructor(_e,$t){super(_e),this.index=BigInt($t)}path(){return`/v2/applications/${this.index}`}includeAll(_e=!0){return this.query["include-all"]=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),ApplicationResponse)}}class LookupApplicationLogs extends JSONRequest{constructor(_e,$t){super(_e),this.appID=BigInt($t)}path(){return`/v2/applications/${this.appID}/logs`}limit(_e){return this.query.limit=_e,this}minRound(_e){return this.query["min-round"]=_e,this}maxRound(_e){return this.query["max-round"]=_e,this}nextToken(_e){return this.query.next=_e,this}sender(_e){return this.query["sender-address"]=_e,this}txid(_e){return this.query.txid=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),ApplicationLogsResponse)}}class LookupApplicationBoxByIDandName extends JSONRequest{constructor(_e,$t,Ft){super(_e),this.index=BigInt($t);const Vt=bytesToBase64(Ft);this.query.name=encodeURI(`b64:${Vt}`)}path(){return`/v2/applications/${this.index}/box`}prepare(_e){return decodeJSON(_e.getJSONText(),Box)}}class SearchAccounts extends JSONRequest{path(){return"/v2/accounts"}currencyGreaterThan(_e){return this.query["currency-greater-than"]=_e.toString(),this}currencyLessThan(_e){return this.query["currency-less-than"]=_e,this}limit(_e){return this.query.limit=_e,this}assetID(_e){return this.query["asset-id"]=_e,this}nextToken(_e){return this.query.next=_e,this}
1504round(_e){return this.query.round=_e,this}authAddr(_e){return this.query["auth-addr"]=_e.toString(),this}applicationID(_e){return this.query["application-id"]=_e,this}includeAll(_e=!0){return this.query["include-all"]=_e,this}exclude(_e){return this.query.exclude=_e,this}onlineOnly(_e){return this.query["online-only"]=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),AccountsResponse)}}class SearchForBlockHeaders extends JSONRequest{path(){return"/v2/block-headers"}absent(_e){return this.query.absent=_e,this}afterTime(_e){return this.query["after-time"]=_e instanceof Date?_e.toISOString():_e,this}beforeTime(_e){return this.query["before-time"]=_e instanceof Date?_e.toISOString():_e,this}expired(_e){return this.query.expired=_e,this}limit(_e){return this.query.limit=_e,this}maxRound(_e){return this.query["max-round"]=_e,this}minRound(_e){return this.query["min-round"]=_e,this}nextToken(_e){return this.query.next=_e,this}proposers(_e){return this.query.proposers=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),BlockHeadersResponse)}}class SearchForTransactions extends JSONRequest{path(){return"/v2/transactions"}notePrefix(_e){return this.query["note-prefix"]=base64StringFunnel(_e),this}txType(_e){return this.query["tx-type"]=_e,this}sigType(_e){return this.query["sig-type"]=_e,this}txid(_e){return this.query.txid=_e,this}round(_e){return this.query.round=_e,this}minRound(_e){return this.query["min-round"]=_e,this}maxRound(_e){return this.query["max-round"]=_e,this}assetID(_e){return this.query["asset-id"]=_e,this}limit(_e){return this.query.limit=_e,this}beforeTime(_e){return this.query["before-time"]=_e instanceof Date?_e.toISOString():_e,this}afterTime(_e){return this.query["after-time"]=_e instanceof Date?_e.toISOString():_e,this}addressRole(_e){return this.query["address-role"]=_e,this}address(_e){return this.query.address=_e.toString(),this}excludeCloseTo(_e){return this.query["exclude-close-to"]=_e,this}nextToken(_e){return this.query.next=_e,this}rekeyTo(_e){return this.query["rekey-to"]=_e,this}applicationID(_e){return this.query["application-id"]=_e,this}currencyGreaterThan(_e){return this.query["currency-greater-than"]=_e.toString(),this}currencyLessThan(_e){return this.query["currency-less-than"]=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),TransactionsResponse)}}class SearchForAssets extends JSONRequest{path(){return"/v2/assets"}limit(_e){return this.query.limit=_e,this}creator(_e){return this.query.creator=_e.toString(),this}name(_e){return this.query.name=_e,this}unit(_e){return this.query.unit=_e,this}index(_e){return this.query["asset-id"]=_e,this}nextToken(_e){return this.query.next=_e,this}includeAll(_e=!0){return this.query["include-all"]=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),AssetsResponse)}}class SearchForApplications extends JSONRequest{path(){return"/v2/applications"}index(_e){return this.query["application-id"]=_e,this}creator(_e){return this.query.creator=_e.toString(),this}nextToken(_e){return this.query.next=_e,this}limit(_e){return this.query.limit=_e,this}includeAll(_e=!0){return this.query["include-all"]=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),ApplicationsResponse)}}class SearchForApplicationBoxes extends JSONRequest{constructor(_e,$t){super(_e),this.index=BigInt($t)}path(){return`/v2/applications/${this.index}/boxes`}nextToken(_e){return this.query.next=_e,this}limit(_e){return this.query.limit=_e,this}prepare(_e){return decodeJSON(_e.getJSONText(),BoxesResponse)}}class IndexerClient extends ServiceClient{constructor(_e,$t="http://127.0.0.1",Ft=8080,Vt={}){super("X-Indexer-API-Token",_e,$t,Ft,Vt)}makeHealthCheck(){return new MakeHealthCheck(this.c)}lookupAssetBalances(_e){return new LookupAssetBalances(this.c,_e)}lookupAssetTransactions(_e){return new LookupAssetTransactions(this.c,_e)}lookupAccountTransactions(_e){return new LookupAccountTransactions(this.c,_e)}lookupBlock(_e){return new LookupBlock(this.c,_e)}lookupTransactionByID(_e){return new LookupTransactionByID(this.c,_e)}lookupAccountByID(_e){return new LookupAccountByID(this.c,_e)}lookupAccountAssets(_e){return new LookupAccountAssets(this.c,_e)}lookupAccountCreatedAssets(_e){return new LookupAccountCreatedAssets(this.c,_e)}
1504lookupAccountAppLocalStates(_e){return new LookupAccountAppLocalStates(this.c,_e)}lookupAccountCreatedApplications(_e){return new LookupAccountCreatedApplications(this.c,_e)}lookupAssetByID(_e){return new LookupAssetByID(this.c,_e)}lookupApplications(_e){return new LookupApplications(this.c,_e)}lookupApplicationLogs(_e){return new LookupApplicationLogs(this.c,_e)}searchAccounts(){return new SearchAccounts(this.c)}searchForBlockHeaders(){return new SearchForBlockHeaders(this.c)}searchForTransactions(){return new SearchForTransactions(this.c)}searchForAssets(){return new SearchForAssets(this.c)}searchForApplications(){return new SearchForApplications(this.c)}searchForApplicationBoxes(_e){return new SearchForApplicationBoxes(this.c,_e)}lookupApplicationBoxByIDandName(_e,$t){return new LookupApplicationBoxByIDandName(this.c,_e,$t)}}async function waitForConfirmation(yt,_e,$t){const Ft=await yt.status().do();if(typeof Ft>"u")throw new Error("Unable to get node status");const Vt=Ft.lastRound+BigInt(1),qt=Vt+BigInt($t);let zt=Vt;for(;zt<qt;){let Ht=!1;try{const Kt=await yt.pendingTransactionInformation(_e).do();if(Kt.confirmedRound)return Kt;if(Kt.poolError)throw Ht=!0,new Error(`Transaction Rejected: ${Kt.poolError}`)}catch(Kt){if(Ht)throw Kt}await yt.statusAfterBlock(zt).do(),zt+=BigInt(1)}throw new Error(`Transaction not confirmed after ${$t} rounds`)}function bigIntToBytes(yt,_e){let $t=yt.toString(16);$t.length!==_e*2&&($t=$t.padStart(_e*2,"0"));const Ft=new Uint8Array($t.length/2);for(let Vt=0,qt=0;Vt<$t.length/2;Vt++,qt+=2)Ft[Vt]=parseInt($t.slice(qt,qt+2),16);return Ft}function bytesToBigInt(yt){let _e=BigInt(0);const $t=new DataView(yt.buffer,yt.byteOffset);for(let Ft=0;Ft<yt.length;Ft++)_e=BigInt(Number($t.getUint8(Ft)))+_e*BigInt(256);return _e}function generateAccount(){const yt=keyPair();return{addr:new Address(yt.publicKey),sk:yt.secretKey}}const english=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","co
1504ach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","
1504initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","ric
1504h","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"],FAIL_TO_DECODE_MNEMONIC_ERROR_MSG="failed to decode mnemonic",NOT_IN_WORDS_LIST_ERROR_MSG="the mnemonic contains a word that is not in the wordlist";function toUint11Array(yt){const _e=[];let $t=0,Ft=0;function Vt(zt){$t|=zt<<Ft,Ft+=8,Ft>=11&&(_e.push($t&2047),$t>>=11,Ft-=11)}function qt(){Ft&&_e.push($t)}return yt.forEach(Vt),qt(),_e}function applyWords(yt){return yt.map(_e=>english[_e])}function computeChecksum(yt){const _e=genericHash(yt),$t=toUint11Array(_e);return applyWords($t)[0]}function mnemonicFromSeed(yt){if(yt.length!==SEED_BTYES_LENGTH)throw new RangeError(`Seed length must be ${SEED_BTYES_LENGTH}`);const _e=toUint11Array(yt),$t=applyWords(_e),Ft=computeChecksum(yt);return`${$t.join(" ")} ${Ft}`}function toUint8Array(yt){const _e=[];let $t=0,Ft=0;function Vt(zt){for($t|=zt<<Ft,Ft+=11;Ft>=8;)_e.push($t&255),$t>>=8,Ft-=8}function qt(){Ft&&_e.push($t)}return yt.forEach(Vt),qt(),new Uint8Array(_e)}function seedFromMnemonic(yt){const _e=yt.split(" "),$t=_e.slice(0,24);for(const Ht of $t)if(english.indexOf(Ht)===-1)throw new Error(NOT_IN_WORDS_LIST_ERROR_MSG);const Ft=_e[_e.length-1],Vt=$t.map(Ht=>english.indexOf(Ht));let qt=toUint8Array(Vt);if(qt.length!==33)throw new Error(FAIL_TO_DECODE_MNEMONIC_ERROR_MSG);if(qt[qt.length-1]!==0)throw new Error(FAIL_TO_DECODE_MNEMONIC_ERROR_MSG);if(qt=qt.slice(0,qt.length-1),computeChecksum(qt)===Ft)return qt;throw new Error(FAIL_TO_DECODE_MNEMONIC_ERROR_MSG)}function mnemonicToSecretKey(yt){const _e=seedFromMnemonic(yt),$t=keyPairFromSeed(_e);return{addr:new Address($t.publicKey),sk:$t.secretKey}}function secretKeyToMnemonic(yt){const _e=yt.slice(0,SEED_BTYES_LENGTH);return mnemonicFromSeed(_e)}function mnemonicToMasterDerivationKey(yt){return seedFromMnemonic(yt)}function masterDerivationKeyToMnemonic(yt){return mnemonicFromSeed(yt)}const ALGORAND_MAX_TX_GROUP_SIZE=16,TX_GROUP_TAG=new TextEncoder().encode("TG");function txGroupPreimage(yt){if(yt.length>ALGORAND_MAX_TX_GROUP_SIZE)throw new Error(`${yt.length} transactions grouped together but max group size is ${ALGORAND_MAX_TX_GROUP_SIZE}`);if(yt.length===0)throw new Error("Cannot compute group ID of zero transactions");const _e=msgpackRawEncode({txlist:yt});return concatArrays$1(TX_GROUP_TAG,_e)}function computeGroupID(yt){const _e=[];for(const Vt of yt)_e.push(Vt.rawTxID());const $t=txGroupPreimage(_e),Ft=genericHash($t);return Uint8Array.from(Ft)}function assignGroupID(yt){const _e=computeGroupID(yt);for(const $t of yt)$t.group=_e;return yt}function signLogicSigTransactionWithAddress(yt,_e,$t){if(!_e.verify($t.publicKey))throw new Error("Logic signature verification failed. Ensure the program and signature are valid.");let Ft;bytesEqual($t.publicKey,yt.sender.publicKey)||(Ft=$t);const Vt=new SignedTransaction({lsig:_e,txn:yt,sgnr:Ft});return{txID:yt.txID(),blob:encodeMsgpack(Vt)}}function signLogicSigTransactionObject(yt,_e){let $t,Ft;if(_e instanceof LogicSigAccount)$t=_e.lsig,Ft=_e.address();else if($t=_e,$t.sig)Ft=new Address(yt.sender.publicKey);else if($t.msig){const Vt={version:$t.msig.v,threshold:$t.msig.thr,pks:$t.msig.subsig.map(qt=>qt.pk)};Ft=addressFromMultisigPreImg(Vt)}else Ft=$t.address();return signLogicSigTransactionWithAddress(yt,$t,Ft)}function signLogicSigTransaction(yt,_e){return signLogicSigTransactionObject(yt,_e)}const MULTISIG_MERGE_LESSTHANTWO_ERROR_MSG="Not enough multisig transactions to merge. Need at least two",MULTISIG_MERGE_MISMATCH_ERROR_MSG="Cannot merge txs. txIDs differ",MULTISIG_MERGE_MISMATCH_AUTH_ADDR_MSG="Cannot merge txs. Auth addrs differ",MULTISIG_MERGE_WRONG_PREIMAGE_ERROR_MSG="Cannot merge txs. Multisig preimages differ",MULTISIG_MERGE_SIG_MISMATCH_ERROR_MSG="Cannot merge txs. subsigs are mismatched.",MULTISIG_SIGNATURE_LENGTH_ERROR_MSG="Cannot add multisig signature. Signature is not of the correct length.",MULTISIG_KEY_NOT_EXIST_ERROR_MSG="Key does not exist";function createMultisigTransaction(yt,{version:_e,threshold:$t,addrs:Ft}){const Vt=pksFromAddresses(Ft),qt=Vt.map(Jt=>({pk:Jt})),zt={v:_e,thr:$t,subsig:qt}
1504,Ht=addressFromMultisigPreImg({version:_e,threshold:$t,pks:Vt});let Kt;yt.sender.equals(Ht)||(Kt=Ht);const Gt=new SignedTransaction({txn:yt,msig:zt,sgnr:Kt});return encodeMsgpack(Gt)}function createMultisigTransactionWithSignature(yt,{rawSig:_e,myPk:$t},{version:Ft,threshold:Vt,pks:qt}){const zt=createMultisigTransaction(yt,{version:Ft,threshold:Vt,addrs:qt.map(Gt=>new Address(Gt))}),Ht=decodeMsgpack(zt,SignedTransaction);let Kt=!1;if(Ht.msig.subsig.forEach((Gt,Jt)=>{bytesEqual(Gt.pk,$t)&&(Kt=!0,Ht.msig.subsig[Jt].s=_e)}),!Kt)throw new Error(MULTISIG_KEY_NOT_EXIST_ERROR_MSG);return encodeMsgpack(Ht)}function partialSignTxn(yt,{version:_e,threshold:$t,pks:Ft},Vt){const qt=keyPairFromSecretKey(Vt).publicKey;return createMultisigTransactionWithSignature(yt,{rawSig:yt.rawSignTxn(Vt),myPk:qt},{version:_e,threshold:$t,pks:Ft})}function partialSignWithMultisigSignature(yt,_e,$t,Ft){if(!isValidSignatureLength(Ft.length))throw new Error(MULTISIG_SIGNATURE_LENGTH_ERROR_MSG);const Vt=typeof $t=="string"?Address.fromString($t):$t;return createMultisigTransactionWithSignature(yt,{rawSig:Ft,myPk:Vt.publicKey},_e)}function mergeMultisigTransactions(yt){if(yt.length<2)throw new Error(MULTISIG_MERGE_LESSTHANTWO_ERROR_MSG);const _e=decodeMsgpack(yt[0],SignedTransaction);if(!_e.msig)throw new Error("Invalid multisig transaction, multisig structure missing at index 0");const $t=_e.txn.txID(),Ft=_e.sgnr?_e.sgnr.toString():void 0,Vt={version:_e.msig.v,threshold:_e.msig.thr,pks:_e.msig.subsig.map(Jt=>Jt.pk)},qt=addressFromMultisigPreImg(Vt),zt=_e.msig.subsig.map(Jt=>({...Jt}));for(let Jt=1;Jt<yt.length;Jt++){const Xt=decodeMsgpack(yt[Jt],SignedTransaction);if(!Xt.msig)throw new Error(`Invalid multisig transaction, multisig structure missing at index ${Jt}`);if(Xt.txn.txID()!==$t)throw new Error(MULTISIG_MERGE_MISMATCH_ERROR_MSG);const Zt=Xt.sgnr?Xt.sgnr.toString():void 0;if(Ft!==Zt)throw new Error(MULTISIG_MERGE_MISMATCH_AUTH_ADDR_MSG);if(Xt.msig.subsig.length!==_e.msig.subsig.length)throw new Error(MULTISIG_MERGE_WRONG_PREIMAGE_ERROR_MSG);const er={version:Xt.msig.v,threshold:Xt.msig.thr,pks:Xt.msig.subsig.map(rr=>rr.pk)},tr=addressFromMultisigPreImg(er);if(!qt.equals(tr))throw new Error(MULTISIG_MERGE_WRONG_PREIMAGE_ERROR_MSG);Xt.msig.subsig.forEach((rr,ar)=>{if(!rr.s)return;const nr=zt[ar];if(nr.s&&!arrayEqual(rr.s,nr.s))throw new Error(MULTISIG_MERGE_SIG_MISMATCH_ERROR_MSG);nr.s=rr.s})}const Ht={v:_e.msig.v,thr:_e.msig.thr,subsig:zt},Kt=typeof Ft<"u"?_e.sgnr:void 0,Gt=new SignedTransaction({msig:Ht,txn:_e.txn,sgnr:Kt});return encodeMsgpack(Gt)}function signMultisigTransaction(yt,{version:_e,threshold:$t,addrs:Ft},Vt){const qt=pksFromAddresses(Ft),zt=partialSignTxn(yt,{version:_e,threshold:$t,pks:qt},Vt);return{txID:yt.txID(),blob:zt}}function appendSignMultisigTransaction(yt,{version:_e,threshold:$t,addrs:Ft},Vt){const qt=pksFromAddresses(Ft),zt=decodeMsgpack(yt,SignedTransaction),Ht=partialSignTxn(zt.txn,{version:_e,threshold:$t,pks:qt},Vt);return{txID:zt.txn.txID(),blob:mergeMultisigTransactions([yt,Ht])}}function appendSignRawMultisigSignature(yt,{version:_e,threshold:$t,addrs:Ft},Vt,qt){const zt=pksFromAddresses(Ft),Ht=decodeMsgpack(yt,SignedTransaction),Kt=partialSignWithMultisigSignature(Ht.txn,{version:_e,threshold:$t,pks:zt},Vt,qt);return{txID:Ht.txn.txID(),blob:mergeMultisigTransactions([yt,Kt])}}let char_to_integer={};"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split("").forEach(function(yt,_e){char_to_integer[yt]=_e});function decode$1(yt){let _e=[],$t=0,Ft=0;for(let Vt=0;Vt<yt.length;Vt+=1){let qt=char_to_integer[yt[Vt]];if(qt===void 0)throw new Error("Invalid character ("+yt[Vt]+")");
1504const zt=qt&32;if(qt&=31,Ft+=qt<<$t,zt)$t+=5;else{const Ht=Ft&1;Ft>>>=1,Ht?_e.push(Ft===0?-2147483648:-Ft):_e.push(Ft),Ft=$t=0}}return _e}class ProgramSourceMap{constructor({version:_e,sources:$t,names:Ft,mappings:Vt}){if(this.version=_e,this.sources=$t,this.names=Ft,this.mappings=Vt,this.version!==3)throw new Error(`Only version 3 is supported, got ${this.version}`);if(this.mappings===void 0)throw new Error("mapping undefined, cannot build source map without `mapping`");const qt=this.mappings.split(";").map(decode$1);this.pcToLocation=new Map,this.sourceAndLineToPc=new Map;const zt={line:0,column:0,sourceIndex:0,nameIndex:0};for(const[Ht,Kt]of qt.entries()){if(Kt.length<4)continue;const Gt=Kt.length>4?Kt[4]:void 0,[,Jt,Xt,Zt]=Kt;zt.sourceIndex+=Jt,zt.line+=Xt,zt.column+=Zt,typeof Gt<"u"&&(zt.nameIndex+=Gt);const er=`${zt.sourceIndex}:${zt.line}`;let tr=this.sourceAndLineToPc.get(er);tr===void 0&&(tr=[],this.sourceAndLineToPc.set(er,tr));const rr={pc:Ht,column:zt.column},ar={line:zt.line,column:zt.column,sourceIndex:zt.sourceIndex};typeof Gt<"u"&&(rr.nameIndex=zt.nameIndex,ar.nameIndex=zt.nameIndex),tr.push(rr),this.pcToLocation.set(Ht,ar)}}getPcs(){return Array.from(this.pcToLocation.keys())}getLocationForPc(_e){return this.pcToLocation.get(_e)}getPcsOnSourceLine(_e,$t){const Ft=this.sourceAndLineToPc.get(`${_e}:${$t}`);return Ft===void 0?[]:Ft}}const defaultAppId=1380011588,defaultMaxWidth=30;async function createDryrun({client:yt,txns:_e,protocolVersion:$t,latestTimestamp:Ft,round:Vt,sources:qt}){const zt=[],Ht=[],Kt=[],Gt=[],Jt=[];for(const tr of _e)if(tr.txn.type===TransactionType.appl)if(Jt.push(tr.txn.sender.toString()),Jt.push(...tr.txn.applicationCall.accounts.map(rr=>rr.toString())),Kt.push(...tr.txn.applicationCall.foreignApps),Jt.push(...tr.txn.applicationCall.foreignApps.map(getApplicationAddress).map(rr=>rr.toString())),Gt.push(...tr.txn.applicationCall.foreignAssets),tr.txn.applicationCall.appIndex===BigInt(0))zt.push(new Application$1({id:defaultAppId,params:new ApplicationParams$1({creator:tr.txn.sender.toString(),approvalProgram:tr.txn.applicationCall.approvalProgram,clearStateProgram:tr.txn.applicationCall.clearProgram,localStateSchema:new ApplicationStateSchema$1({numUint:tr.txn.applicationCall.numLocalInts,numByteSlice:tr.txn.applicationCall.numLocalByteSlices}),globalStateSchema:new ApplicationStateSchema$1({numUint:tr.txn.applicationCall.numGlobalInts,numByteSlice:tr.txn.applicationCall.numGlobalByteSlices})})}));else{const{appIndex:rr}=tr.txn.applicationCall;Kt.push(rr),Jt.push(getApplicationAddress(rr).toString())}const Xt=[];for(const tr of new Set(Gt))Xt.push(yt.getAssetByID(tr).do().then(rr=>{Jt.push(rr.params.creator)}));await Promise.all(Xt);const Zt=[];for(const tr of new Set(Kt))Zt.push(yt.getApplicationByID(tr).do().then(rr=>{zt.push(rr),Jt.push(rr.params.creator.toString())}));await Promise.all(Zt);const er=[];for(const tr of new Set(Jt))er.push(yt.accountInformation(tr).do().then(rr=>{Ht.push(rr)}));return await Promise.all(er),new DryrunRequest({txns:_e.slice(),accounts:Ht,apps:zt,latestTimestamp:Ft??0,round:Vt??0,protocolVersion:$t??"",sources:qt??[]})}function truncate(yt,_e){return yt.length>_e&&_e>0?`${yt.slice(0,_e)}...`:yt}function scratchToString(yt,_e){if(_e.length===0)return"";let $t=null;for(let Vt=0;Vt<_e.length;Vt++){if(Vt>yt.length){$t=Vt;continue}stringifyJSON(yt[Vt])!==stringifyJSON(_e[Vt])&&($t=Vt)}if($t==null)return"";const Ft=_e[$t];return Ft.bytes.length>0?`${$t} = 0x${bytesToHex(Ft.bytes)}`:`${$t} = ${Ft.uint.toString()}`}function stackToString(yt,_e){return`[${(_e?yt.reverse():yt).map(Ft=>{switch(Ft.type){case 1:return`0x${bytesToHex(Ft.bytes)}`;case 2:return Ft.uint.toString();default:return""}}).join(", ")}]`}function dryrunTrace(yt,_e,$t){const Ft=$t.maxValueWidth||defaultMaxWidth,Vt=[["pc#","ln#","source","scratch","stack"]];for(let zt=0;zt<yt.length;zt++){const{line:Ht,error:Kt,pc:Gt,scratch:Jt,stack:Xt}=yt[zt],Zt=Jt!==void 0?Jt:[],er=zt>0&&yt[zt-1].scratch!==void 0?yt[zt-1].scratch:[],tr=Kt?`!! ${Kt} !!`:_e[Ht];Vt.push([Gt.toString().padEnd(3," "),Ht.toString().padEnd(3," "),truncate(tr,Ft),truncate(scratchToString(er,Zt),Ft),truncate(stackToString(Xt,$t.topOfStackFirst),Ft)])}const qt=Vt.reduce((zt,Ht)=>
1504{const Kt=new Array(Vt[0].length).fill(0);for(let Gt=0;Gt<zt.length;Gt++)Kt[Gt]=Ht[Gt].length>zt[Gt]?Ht[Gt].length:zt[Gt];return Kt},new Array(Vt[0].length).fill(0));return`${Vt.map(zt=>zt.map((Ht,Kt)=>Ht.padEnd(qt[Kt]+1," ")).join("|").trim()).join(` 1505`)} 1506`}function dryrunTxnResultAppTrace(yt,_e){if(!yt.appCallTrace||!yt.disassembly)return"";let $t=_e;return _e!==void 0?$t=_e:$t={maxValueWidth:defaultMaxWidth,topOfStackFirst:!1},dryrunTrace(yt.appCallTrace,yt.disassembly,$t)}function dryrunTxnResultLogicSigTrace(yt,_e){if(!yt.logicSigTrace||!yt.logicSigDisassembly)return"";let $t;return _e!==void 0?$t=_e:$t={maxValueWidth:defaultMaxWidth,topOfStackFirst:!0},dryrunTrace(yt.logicSigTrace,yt.logicSigDisassembly,$t)}function makePaymentTxnWithSuggestedParamsFromObject({sender:yt,receiver:_e,amount:$t,closeRemainderTo:Ft,suggestedParams:Vt,note:qt,lease:zt,rekeyTo:Ht}){return new Transaction$1({type:TransactionType.pay,sender:yt,note:qt,lease:zt,rekeyTo:Ht,suggestedParams:Vt,paymentParams:{receiver:_e,amount:$t,closeRemainderTo:Ft}})}function makeKeyRegistrationTxnWithSuggestedParamsFromObject({sender:yt,voteKey:_e,selectionKey:$t,stateProofKey:Ft,voteFirst:Vt,voteLast:qt,voteKeyDilution:zt,nonParticipation:Ht,suggestedParams:Kt,note:Gt,lease:Jt,rekeyTo:Xt}){return new Transaction$1({type:TransactionType.keyreg,sender:yt,note:Gt,lease:Jt,rekeyTo:Xt,suggestedParams:Kt,keyregParams:{voteKey:_e,selectionKey:$t,stateProofKey:Ft,voteFirst:Vt,voteLast:qt,voteKeyDilution:zt,nonParticipation:Ht}})}function makeBaseAssetConfigTxn({sender:yt,assetIndex:_e,total:$t,decimals:Ft,defaultFrozen:Vt,manager:qt,reserve:zt,freeze:Ht,clawback:Kt,unitName:Gt,assetName:Jt,assetURL:Xt,assetMetadataHash:Zt,note:er,lease:tr,rekeyTo:rr,suggestedParams:ar}){return new Transaction$1({type:TransactionType.acfg,sender:yt,note:er,lease:tr,rekeyTo:rr,suggestedParams:ar,assetConfigParams:{assetIndex:_e,total:$t,decimals:Ft,defaultFrozen:Vt,manager:qt,reserve:zt,freeze:Ht,clawback:Kt,unitName:Gt,assetName:Jt,assetURL:Xt,assetMetadataHash:Zt}})}function makeAssetCreateTxnWithSuggestedParamsFromObject({sender:yt,total:_e,decimals:$t,defaultFrozen:Ft,manager:Vt,reserve:qt,freeze:zt,clawback:Ht,unitName:Kt,assetName:Gt,assetURL:Jt,assetMetadataHash:Xt,note:Zt,lease:er,rekeyTo:tr,suggestedParams:rr}){return makeBaseAssetConfigTxn({sender:yt,total:_e,decimals:$t,defaultFrozen:Ft,manager:Vt,reserve:qt,freeze:zt,clawback:Ht,unitName:Kt,assetName:Gt,assetURL:Jt,assetMetadataHash:Xt,note:Zt,lease:er,rekeyTo:tr,suggestedParams:rr})}function makeAssetConfigTxnWithSuggestedParamsFromObject({sender:yt,assetIndex:_e,manager:$t,reserve:Ft,freeze:Vt,clawback:qt,strictEmptyAddressChecking:zt,note:Ht,lease:Kt,rekeyTo:Gt,suggestedParams:Jt}){if(!_e)throw Error("assetIndex must be provided");if((zt??!0)&&($t==null||Ft==null||Vt==null||qt==null))throw Error("strictEmptyAddressChecking is enabled, but an address is empty. If this is intentional, set strictEmptyAddressChecking to false.");return makeBaseAssetConfigTxn({sender:yt,assetIndex:_e,manager:$t,reserve:Ft,freeze:Vt,clawback:qt,note:Ht,lease:Kt,rekeyTo:Gt,suggestedParams:Jt})}function makeAssetDestroyTxnWithSuggestedParamsFromObject({sender:yt,assetIndex:_e,note:$t,lease:Ft,rekeyTo:Vt,suggestedParams:qt}){if(!_e)throw Error("assetIndex must be provided");return makeBaseAssetConfigTxn({sender:yt,assetIndex:_e,note:$t,lease:Ft,rekeyTo:Vt,suggestedParams:qt})}function makeAssetFreezeTxnWithSuggestedParamsFromObject({sender:yt,assetIndex:_e,freezeTarget:$t,frozen:Ft,suggestedParams:Vt,note:qt,lease:zt,rekeyTo:Ht}){return new Transaction$1({type:TransactionType.afrz,sender:yt,note:qt,lease:zt,rekeyTo:Ht,suggestedParams:Vt,assetFreezeParams:{assetIndex:_e,freezeTarget:$t,frozen:Ft}})}function makeAssetTransferTxnWithSuggestedParamsFromObject({sender:yt,receiver:_e,amount:$t,closeRemainderTo:Ft,assetSender:Vt,note:qt,assetIndex:zt,suggestedParams:Ht,rekeyTo:Kt,lease:Gt}){if(!zt)throw Error("assetIndex must be provided");return new Transaction$1({type:TransactionType.axfer,sender:yt,note:qt,lease:Gt,rekeyTo:Kt,suggestedParams:Ht,assetTransferParams:{assetIndex:zt,receiver:_e,amount:$t,assetSender:Vt,closeRemainderTo:Ft}})}function makeApplicationCallTxnFromObject({sender:yt,appIndex:_e,onComplete:$t,appArgs:Ft,accounts:Vt,foreignApps:qt,foreignAssets:zt,boxes:Ht,approvalProgram:Kt,clearProgram:Gt,numLocalInts:Jt,numLocalByteSlices:Xt,numGlobalInts:Zt,numGlobalByteSlices:er,extraPages:tr,note:rr,lease:ar,rekeyTo:nr,suggestedParams:cr}){if($t==null)throw Error("onComplete must be provided");return new Transaction$1({type:TransactionType.appl,sender:yt,note:rr,lease:ar,rekeyTo:nr,suggestedParams:cr,appCallParams:{appIndex:_e,onComplete:$t,appArgs:Ft,accounts:Vt,foreignAssets:zt,foreignApps:qt,boxes:Ht,approvalProgram:Kt,clearProgram:Gt,numLocalInts:Jt,numLocalByteSlices:Xt,numGlobalInts:Zt,numGlobalByteSlices:er,extraPages:tr}})}function makeApplicationCreateTxnFromObject({sender:yt,onComplete:_e,appArgs:$t,accounts:Ft,foreignApps:Vt,foreignAssets:qt,boxes:zt,approvalProgram:Ht,clearProgram:Kt,numLocalInts:Gt,numLocalByteSlices:Jt,numGlobalInts:Xt,numGlobalByteSlices:Zt,extraPages:er,note:tr,lease:rr,rekeyTo:ar,suggestedParams:nr}){if(!Ht||!Kt)throw Error("approvalProgram and clearProgram must be provided");
1506if(_e==null)throw Error("onComplete must be provided");return makeApplicationCallTxnFromObject({sender:yt,appIndex:0,onComplete:_e,appArgs:$t,accounts:Ft,foreignApps:Vt,foreignAssets:qt,boxes:zt,approvalProgram:Ht,clearProgram:Kt,numLocalInts:Gt,numLocalByteSlices:Jt,numGlobalInts:Xt,numGlobalByteSlices:Zt,extraPages:er,note:tr,lease:rr,rekeyTo:ar,suggestedParams:nr})}function makeApplicationUpdateTxnFromObject({sender:yt,appIndex:_e,appArgs:$t,accounts:Ft,foreignApps:Vt,foreignAssets:qt,boxes:zt,approvalProgram:Ht,clearProgram:Kt,note:Gt,lease:Jt,rekeyTo:Xt,suggestedParams:Zt}){if(!_e)throw Error("appIndex must be provided");if(!Ht||!Kt)throw Error("approvalProgram and clearProgram must be provided");return makeApplicationCallTxnFromObject({sender:yt,appIndex:_e,onComplete:OnApplicationComplete.UpdateApplicationOC,appArgs:$t,accounts:Ft,foreignApps:Vt,foreignAssets:qt,boxes:zt,approvalProgram:Ht,clearProgram:Kt,note:Gt,lease:Jt,rekeyTo:Xt,suggestedParams:Zt})}function makeApplicationDeleteTxnFromObject({sender:yt,appIndex:_e,appArgs:$t,accounts:Ft,foreignApps:Vt,foreignAssets:qt,boxes:zt,note:Ht,lease:Kt,rekeyTo:Gt,suggestedParams:Jt}){if(!_e)throw Error("appIndex must be provided");return makeApplicationCallTxnFromObject({sender:yt,appIndex:_e,onComplete:OnApplicationComplete.DeleteApplicationOC,appArgs:$t,accounts:Ft,foreignApps:Vt,foreignAssets:qt,boxes:zt,note:Ht,lease:Kt,rekeyTo:Gt,suggestedParams:Jt})}function makeApplicationOptInTxnFromObject({sender:yt,appIndex:_e,appArgs:$t,accounts:Ft,foreignApps:Vt,foreignAssets:qt,boxes:zt,note:Ht,lease:Kt,rekeyTo:Gt,suggestedParams:Jt}){if(!_e)throw Error("appIndex must be provided");return makeApplicationCallTxnFromObject({sender:yt,appIndex:_e,onComplete:OnApplicationComplete.OptInOC,appArgs:$t,accounts:Ft,foreignApps:Vt,foreignAssets:qt,boxes:zt,note:Ht,lease:Kt,rekeyTo:Gt,suggestedParams:Jt})}function makeApplicationCloseOutTxnFromObject({sender:yt,appIndex:_e,appArgs:$t,accounts:Ft,foreignApps:Vt,foreignAssets:qt,boxes:zt,note:Ht,lease:Kt,rekeyTo:Gt,suggestedParams:Jt}){if(!_e)throw Error("appIndex must be provided");return makeApplicationCallTxnFromObject({sender:yt,appIndex:_e,onComplete:OnApplicationComplete.CloseOutOC,appArgs:$t,accounts:Ft,foreignApps:Vt,foreignAssets:qt,boxes:zt,note:Ht,lease:Kt,rekeyTo:Gt,suggestedParams:Jt})}function makeApplicationClearStateTxnFromObject({sender:yt,appIndex:_e,appArgs:$t,accounts:Ft,foreignApps:Vt,foreignAssets:qt,boxes:zt,note:Ht,lease:Kt,rekeyTo:Gt,suggestedParams:Jt}){if(!_e)throw Error("appIndex must be provided");return makeApplicationCallTxnFromObject({sender:yt,appIndex:_e,onComplete:OnApplicationComplete.ClearStateOC,appArgs:$t,accounts:Ft,foreignApps:Vt,foreignAssets:qt,boxes:zt,note:Ht,lease:Kt,rekeyTo:Gt,suggestedParams:Jt})}function makeApplicationNoOpTxnFromObject({sender:yt,appIndex:_e,appArgs:$t,accounts:Ft,foreignApps:Vt,foreignAssets:qt,boxes:zt,note:Ht,lease:Kt,rekeyTo:Gt,suggestedParams:Jt}){if(!_e)throw Error("appIndex must be provided");return makeApplicationCallTxnFromObject({sender:yt,appIndex:_e,onComplete:OnApplicationComplete.NoOpOC,appArgs:$t,accounts:Ft,foreignApps:Vt,foreignAssets:qt,boxes:zt,note:Ht,lease:Kt,rekeyTo:Gt,suggestedParams:Jt})}function makeBasicAccountTransactionSigner(yt){return(_e,$t)=>{const Ft=[];for(const Vt of $t)Ft.push(_e[Vt].signTxn(yt.sk));return Promise.resolve(Ft)}}function makeLogicSigAccountTransactionSigner(yt){return(_e,$t)=>{const Ft=[];for(const Vt of $t){const{blob:qt}=signLogicSigTransactionObject(_e[Vt],yt);Ft.push(qt)}return Promise.resolve(Ft)}}function makeMultiSigAccountTransactionSigner(yt,_e){return($t,Ft)=>{const Vt=[];for(const qt of Ft){const zt=$t[qt],Ht=[];for(const Kt of _e){const{blob:Gt}=signMultisigTransaction(zt,yt,Kt);Ht.push(Gt)}Ht.length>1?Vt.push(mergeMultisigTransactions(Ht)):Vt.push(Ht[0])}return Promise.resolve(Vt)}}function makeEmptyTransactionSigner(){return(yt,_e)=>{const $t=[];for(const Ft of _e)$t.push(encodeUnsignedSimulateTransaction(yt[Ft]));return Promise.resolve($t)}}function isTransactionWithSigner(yt){return typeof yt=="object"&&Object.keys(yt).length===2&&typeof yt.txn=="object"&&typeof yt.signer=="function"}const MAX_LEN=2**16-1,ADDR_BYTE_SIZE=32,SINGLE_BYTE_SIZE=1,SINGLE_BOOL_SIZE=1,LENGTH_ENCODE_BYTE_SIZE=2,
1506staticArrayRegexp=/^([a-z\d[\](),]+)\[(0|[1-9][\d]*)]$/,ufixedRegexp=/^ufixed([1-9][\d]*)x([1-9][\d]*)$/;class ABIType{static from(_e){if(_e.endsWith("[]")){const $t=ABIType.from(_e.slice(0,_e.length-2));return new ABIArrayDynamicType($t)}if(_e.endsWith("]")){const $t=_e.match(staticArrayRegexp);if(!$t||$t.length!==3)throw new Error(`malformed static array string: ${_e}`);const Ft=$t[2],Vt=parseInt(Ft,10);if(Vt>MAX_LEN)throw new Error(`array length exceeds limit ${MAX_LEN}`);const qt=ABIType.from($t[1]);return new ABIArrayStaticType(qt,Vt)}if(_e.startsWith("uint")){const $t=qt=>[...qt].every(zt=>"0123456789".includes(zt)),Ft=_e.slice(4,_e.length);if(!$t(Ft))throw new Error(`malformed uint string: ${Ft}`);const Vt=parseInt(Ft,10);if(Vt>MAX_LEN)throw new Error(`malformed uint string: ${Vt}`);return new ABIUintType(Vt)}if(_e==="byte")return new ABIByteType;if(_e.startsWith("ufixed")){const $t=_e.match(ufixedRegexp);if(!$t||$t.length!==3)throw new Error(`malformed ufixed type: ${_e}`);const Ft=parseInt($t[1],10),Vt=parseInt($t[2],10);return new ABIUfixedType(Ft,Vt)}if(_e==="bool")return new ABIBoolType;if(_e==="address")return new ABIAddressType;if(_e==="string")return new ABIStringType;if(_e.length>=2&&_e[0]==="("&&_e[_e.length-1]===")"){const $t=ABITupleType.parseTupleContent(_e.slice(1,_e.length-1)),Ft=[];for(let Vt=0;Vt<$t.length;Vt++){const qt=ABIType.from($t[Vt]);Ft.push(qt)}return new ABITupleType(Ft)}throw new Error(`cannot convert a string ${_e} to an ABI type`)}}class ABIUintType extends ABIType{constructor(_e){if(super(),_e%8!==0||_e<8||_e>512)throw new Error(`unsupported uint type bitSize: ${_e}`);this.bitSize=_e}toString(){return`uint${this.bitSize}`}equals(_e){return _e instanceof ABIUintType&&this.bitSize===_e.bitSize}isDynamic(){return!1}byteLen(){return this.bitSize/8}encode(_e){if(typeof _e!="bigint"&&typeof _e!="number")throw new Error(`Cannot encode value as uint${this.bitSize}: ${_e}`);if(_e>=BigInt(2**this.bitSize)||_e<BigInt(0))throw new Error(`${_e} is not a non-negative int or too big to fit in size uint${this.bitSize}`);if(typeof _e=="number"&&!Number.isSafeInteger(_e))throw new Error(`${_e} should be converted into a BigInt before it is encoded`);return bigIntToBytes(_e,this.bitSize/8)}decode(_e){if(_e.length!==this.bitSize/8)throw new Error(`byte string must correspond to a uint${this.bitSize}`);return bytesToBigInt(_e)}}class ABIUfixedType extends ABIType{constructor(_e,$t){if(super(),_e%8!==0||_e<8||_e>512)throw new Error(`unsupported ufixed type bitSize: ${_e}`);if($t>160||$t<1)throw new Error(`unsupported ufixed type precision: ${$t}`);this.bitSize=_e,this.precision=$t}toString(){return`ufixed${this.bitSize}x${this.precision}`}equals(_e){return _e instanceof ABIUfixedType&&this.bitSize===_e.bitSize&&this.precision===_e.precision}isDynamic(){return!1}byteLen(){return this.bitSize/8}encode(_e){if(typeof _e!="bigint"&&typeof _e!="number")throw new Error(`Cannot encode value as ${this.toString()}: ${_e}`);if(_e>=BigInt(2**this.bitSize)||_e<BigInt(0))throw new Error(`${_e} is not a non-negative int or too big to fit in size ${this.toString()}`);if(typeof _e=="number"&&!Number.isSafeInteger(_e))throw new Error(`${_e} should be converted into a BigInt before it is encoded`);return bigIntToBytes(_e,this.bitSize/8)}decode(_e){if(_e.length!==this.bitSize/8)throw new Error(`byte string must correspond to a ${this.toString()}`);return bytesToBigInt(_e)}}class ABIAddressType extends ABIType{toString(){return"address"}equals(_e){return _e instanceof ABIAddressType}isDynamic(){return!1}byteLen(){return ADDR_BYTE_SIZE}encode(_e){if(typeof _e=="string")return decodeAddress(_e).publicKey;if(_e instanceof Address)return _e.publicKey;if(_e instanceof Uint8Array){if(_e.byteLength!==32)throw new Error("byte string must be 32 bytes long for an address");return _e}throw new Error(`Cannot encode value as ${this.toString()}: ${_e}`)}decode(_e){if(_e.byteLength!==32)throw new Error("byte string must be 32 bytes long for an address");return encodeAddress(_e)}}class ABIBoolType extends ABIType{toString(){return"bool"}equals(_e){return _e instanceof ABIBoolType}isDynamic(){return!1}byteLen(){return SINGLE_BOOL_SIZE}encode(_e){if(typeof _e!="boolean")throw new Error(`Cannot encode value as bool: ${_e}`);return _e?new Uint8Array([128]):new Uint8Array([0])}decode(_e){if(_e.byteLength!==1)throw new Error("bool string must be 1 byte long");const $t=_e[0];if($t===128)return!0;
1506if($t===0)return!1;throw new Error("boolean could not be decoded from the byte string")}}class ABIByteType extends ABIType{toString(){return"byte"}equals(_e){return _e instanceof ABIByteType}isDynamic(){return!1}byteLen(){return SINGLE_BYTE_SIZE}encode(_e){if(typeof _e!="number"&&typeof _e!="bigint")throw new Error(`Cannot encode value as byte: ${_e}`);if(typeof _e=="bigint"&&(_e=Number(_e)),_e<0||_e>255)throw new Error(`${_e} cannot be encoded into a byte`);return new Uint8Array([_e])}decode(_e){if(_e.byteLength!==1)throw new Error("byte string must be 1 byte long");return _e[0]}}class ABIStringType extends ABIType{toString(){return"string"}equals(_e){return _e instanceof ABIStringType}isDynamic(){return!0}byteLen(){throw new Error(`${this.toString()} is a dynamic type`)}encode(_e){if(typeof _e!="string"&&!(_e instanceof Uint8Array))throw new Error(`Cannot encode value as string: ${_e}`);let $t;typeof _e=="string"?$t=new TextEncoder().encode(_e):$t=_e;const Ft=bigIntToBytes($t.length,LENGTH_ENCODE_BYTE_SIZE),Vt=new Uint8Array($t.length+LENGTH_ENCODE_BYTE_SIZE);return Vt.set(Ft),Vt.set($t,LENGTH_ENCODE_BYTE_SIZE),Vt}decode(_e){if(_e.length<LENGTH_ENCODE_BYTE_SIZE)throw new Error(`byte string is too short to be decoded. Actual length is ${_e.length}, but expected at least ${LENGTH_ENCODE_BYTE_SIZE}`);const Ft=new DataView(_e.buffer,_e.byteOffset,LENGTH_ENCODE_BYTE_SIZE).getUint16(0),Vt=_e.slice(LENGTH_ENCODE_BYTE_SIZE,_e.length);if(Ft!==Vt.length)throw new Error(`string length bytes do not match the actual length of string. Expected ${Ft}, got ${Vt.length}`);return new TextDecoder("utf-8").decode(Vt)}}class ABIArrayStaticType extends ABIType{constructor(_e,$t){if(super(),$t<0)throw new Error(`static array must have a non negative length: ${$t}`);this.childType=_e,this.staticLength=$t}toString(){return`${this.childType.toString()}[${this.staticLength}]`}equals(_e){return _e instanceof ABIArrayStaticType&&this.staticLength===_e.staticLength&&this.childType.equals(_e.childType)}isDynamic(){return this.childType.isDynamic()}byteLen(){return this.childType.constructor===ABIBoolType?Math.ceil(this.staticLength/8):this.staticLength*this.childType.byteLen()}encode(_e){if(!Array.isArray(_e)&&!(_e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${_e}`);if(_e.length!==this.staticLength)throw new Error(`Value array does not match static array length. Expected ${this.staticLength}, got ${_e.length}`);return this.toABITupleType().encode(_e)}decode(_e){return this.toABITupleType().decode(_e)}toABITupleType(){return new ABITupleType(Array(this.staticLength).fill(this.childType))}}class ABIArrayDynamicType extends ABIType{constructor(_e){super(),this.childType=_e}toString(){return`${this.childType.toString()}[]`}equals(_e){return _e instanceof ABIArrayDynamicType&&this.childType.equals(_e.childType)}isDynamic(){return!0}byteLen(){throw new Error(`${this.toString()} is a dynamic type`)}encode(_e){if(!Array.isArray(_e)&&!(_e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${_e}`);const $t=this.toABITupleType(_e.length),Ft=$t.encode(_e),Vt=bigIntToBytes($t.childTypes.length,LENGTH_ENCODE_BYTE_SIZE);return concatArrays$1(Vt,Ft)}decode(_e){const Ft=new DataView(_e.buffer,0,LENGTH_ENCODE_BYTE_SIZE).getUint16(0);return this.toABITupleType(Ft).decode(_e.slice(LENGTH_ENCODE_BYTE_SIZE,_e.length))}toABITupleType(_e){return new ABITupleType(Array(_e).fill(this.childType))}}class ABITupleType extends ABIType{constructor(_e){if(super(),_e.length>=MAX_LEN)throw new Error("tuple type child type number larger than maximum uint16 error");this.childTypes=_e}toString(){const _e=[];for(let $t=0;$t<this.childTypes.length;$t++)_e[$t]=this.childTypes[$t].toString();return`(${_e.join(",")})`}equals(_e){return _e instanceof ABITupleType&&this.childTypes.length===_e.childTypes.length&&this.childTypes.every(($t,Ft)=>$t.equals(_e.childTypes[Ft]))}isDynamic(){const _e=$t=>$t.isDynamic();return this.childTypes.some(_e)}byteLen(){let _e=0;for(let $t=0;$t<this.childTypes.length;$t++)if(this.childTypes[$t].constructor===ABIBoolType){const Ft=findBoolLR(this.childTypes,$t,1),Vt=Ft+1;$t+=Ft,_e+=Math.trunc((Vt+7)/8)}else{const Ft=this.childTypes[$t].byteLen();_e+=Ft}return _e}encode(_e){if(!Array.isArray(_e)&&!(_e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${_e}`);const $t=Array.from(_e);if(_e.length>MAX_LEN)throw new Error("length of tuple array should not exceed a uint16");const Ft=this.childTypes,Vt=[],qt=[],zt=new Map;let Ht=0;for(;Ht<Ft.length;){const Jt=Ft[Ht];if(Jt.isDynamic())zt.set(Vt.length,!0),Vt.push(new Uint8Array([0,0])),qt.push(Jt.encode($t[Ht]));else{if(Jt.constructor===ABIBoolType){const Xt=findBoolLR(Ft,Ht,-1);let Zt=findBoolLR(Ft,Ht,1);if(Xt%8!==0)throw new Error("expected before index should have number of bool mod 8 equal 0");Zt=Math.min(7,Zt);const er=compressMultipleBool($t.slice(Ht,Ht+Zt+1));Vt.push(bigIntToBytes(er,1)),Ht+=Zt}else{const Xt=Jt.encode($t[Ht]);Vt.push(Xt)}zt.set(Ht,!1),qt.push(new Uint8Array)}Ht+=1}let Kt=0;for(const Jt of Vt)Kt+=Jt.length;let Gt=0;for(let Jt=0;Jt<Vt.length;Jt++){if(zt.get(Jt)){const Xt=Kt+Gt;if(Xt>MAX_LEN)throw new Error(`byte length of ${Xt} should not exceed a uint16`);Vt[Jt]=bigIntToBytes(Xt,LENGTH_ENCODE_BYTE_SIZE)}Gt+=qt[Jt].length}return concatArrays$1(...Vt,...qt)}decode(_e){const $t=this.childTypes,Ft=[],Vt=[];let qt=0,zt=0;const Ht=new DataView(_e.buffer);for(;qt<$t.length;){const Jt=$t[qt];if(Jt.isDynamic()){if(_e.slice(zt,_e.length).length<LENGTH_ENCODE_BYTE_SIZE)throw new Error("dynamic type in tuple is too short to be decoded");const Xt=Ht.getUint16(zt);if(Ft.length>0&&(Ft[Ft.length-1].right=Xt,Xt<Ft[Ft.length-1].left))throw new Error("dynamic index segment miscalculation: left is greater than right index");const Zt={left:Xt,right:-1};Ft.push(Zt),Vt.push(null),zt+=LENGTH_ENCODE_BYTE_SIZE}else if(Jt.constructor===ABIBoolType){const Xt=findBoolLR(this.childTypes,qt,-1);let Zt=findBoolLR(this.childTypes,qt,1);if(Xt%8!==0)throw new Error("expected before bool number mod 8 === 0");Zt=Math.min(7,Zt);for(let er=0;er<=Zt;er++){const tr=128>>er;(_e[zt]&tr)>0?Vt.push(new Uint8Array([128])):Vt.push(new Uint8Array([0]))}qt+=Zt,zt+=1}else{const Xt=Jt.byteLen();Vt.push(_e.slice(zt,zt+Xt)),zt+=Xt}if(qt!==$t.length-1&&zt>=_e.length)throw new Error("input byte not enough to decode");qt+=1}if(Ft.length>0&&(Ft[Ft.length-1].right=_e.length,zt=_e.length),zt<_e.length)throw new Error("input byte not fully consumed");for(let Jt=0;Jt<Ft.length;Jt++){const Xt=Ft[Jt];if(Xt.left>Xt.right)throw new Error("dynamic segment should display a [l, r] space with l <= r");if(Jt!==Ft.length-1&&Xt.right!==Ft[Jt+1].left)throw new Error("dynamic segment should be consecutive")}let Kt=0;for(let Jt=0;Jt<$t.length;Jt++)$t[Jt].isDynamic()&&(Vt[Jt]=_e.slice(Ft[Kt].left,Ft[Kt].right),Kt+=1);const Gt=[];for(let Jt=0;Jt<$t.length;Jt++){const Xt=$t[Jt].decode(Vt[Jt]);Gt.push(Xt)}return Gt}static parseTupleContent(_e){if(_e.length===0)return[];if(_e.endsWith(",")||_e.startsWith(","))throw new Error("tuple string should not start with comma");if(_e.includes(",,"))throw new Error("tuple string should not have consecutive commas");const $t=[];let Ft=0,Vt="";for(const qt of _e)Vt+=qt,qt==="("?Ft+=1:qt===")"?Ft-=1:qt===","&&Ft===0&&($t.push(Vt.slice(0,Vt.length-1)),Vt="");if(Vt.length!==0&&$t.push(Vt),Ft!==0)throw new Error("tuple string has mismatched parentheses");return $t}}function compressMultipleBool(yt){let _e=0;if(yt.length>8)throw new Error("value list passed in should be no greater than length 8");for(let $t=0;$t<yt.length;$t++){const Ft=yt[$t];if(typeof Ft!="boolean")throw new Error("non-boolean values cannot be compressed into a byte");Ft&&(_e|=1<<7-$t)}return _e}function findBoolLR(yt,_e,$t){let Ft=0;for(;;){const Vt=_e+$t*Ft;if(yt[Vt].constructor===ABIBoolType)if(Vt!==yt.length-1&&$t===1)Ft+=1;else if(Vt>0&&$t===-1)Ft+=1;else break;else{Ft-=1;break}}return Ft}var ABITransactionType;(function(yt){yt.any="txn",yt.pay="pay",yt.keyreg="keyreg",yt.acfg="acfg",yt.axfer="axfer",yt.afrz="afrz",yt.appl="appl"})(ABITransactionType||(ABITransactionType={}));function abiTypeIsTransaction(yt){return yt===ABITransactionType.any||yt===ABITransactionType.pay||yt===ABITransactionType.keyreg||yt===ABITransactionType.acfg||yt===ABITransactionType.axfer||yt===ABITransactionType.afrz||yt===ABITransactionType.appl}function abiCheckTransactionType(yt,_e){return yt===ABITransactionType.any?!0:_e.type?_e.type.toString()===yt.toString():!1}var ABIReferenceType;(function(yt){yt.account="account",yt.application="application",yt.asset="asset"})(ABIReferenceType||(ABIReferenceType={}));function abiTypeIsReference(yt){return yt===ABIReferenceType.account||yt===ABIReferenceType.application||yt===ABIReferenceType.asset}function parseMethodSignature(yt){const _e=yt.indexOf("(");if(_e===-1)throw new Error(`Invalid method signature: ${yt}`);let $t=-1,Ft=0;for(let Vt=_e;Vt<yt.length;Vt++){const qt=yt[Vt];
1506if(qt==="(")Ft+=1;else if(qt===")"){if(Ft===0)break;if(Ft-=1,Ft===0){$t=Vt;break}}}if($t===-1)throw new Error(`Invalid method signature: ${yt}`);return{name:yt.slice(0,_e),args:ABITupleType.parseTupleContent(yt.slice(_e+1,$t)),returns:yt.slice($t+1)}}class ABIMethod{constructor(_e){if(typeof _e.name!="string"||typeof _e.returns!="object"||!Array.isArray(_e.args))throw new Error("Invalid ABIMethod parameters");this.name=_e.name,this.description=_e.desc,this.args=_e.args.map(({type:$t,name:Ft,desc:Vt})=>abiTypeIsTransaction($t)||abiTypeIsReference($t)?{type:$t,name:Ft,description:Vt}:{type:ABIType.from($t),name:Ft,description:Vt}),this.returns={type:_e.returns.type==="void"?_e.returns.type:ABIType.from(_e.returns.type),description:_e.returns.desc},this.events=_e.events,this.readonly=_e.readonly}getSignature(){const _e=this.args.map(Ft=>Ft.type.toString()).join(","),$t=this.returns.type.toString();return`${this.name}(${_e})${$t}`}getSelector(){const _e=genericHash(this.getSignature());return new Uint8Array(_e.slice(0,4))}txnCount(){let _e=1;for(const $t of this.args)typeof $t.type=="string"&&abiTypeIsTransaction($t.type)&&(_e+=1);return _e}toJSON(){return{name:this.name,desc:this.description,args:this.args.map(({type:_e,name:$t,description:Ft})=>({type:_e.toString(),name:$t,desc:Ft})),returns:{type:this.returns.type.toString(),desc:this.returns.description},events:this.events,readonly:this.readonly}}static fromSignature(_e){const{name:$t,args:Ft,returns:Vt}=parseMethodSignature(_e);return new ABIMethod({name:$t,args:Ft.map(qt=>({type:qt})),returns:{type:Vt}})}}function getMethodByName(yt,_e){if(yt===null||!Array.isArray(yt)||!yt.every(Ft=>Ft instanceof ABIMethod))throw new Error("Methods list provided is null or not the correct type");const $t=yt.filter(Ft=>Ft.name===_e);if($t.length>1)throw new Error(`found ${$t.length} methods with the same name ${$t.map(Ft=>Ft.getSignature()).join(",")}`);if($t.length===0)throw new Error(`found 0 methods with the name ${_e}`);return $t[0]}class ABIContract{constructor(_e){if(typeof _e.name!="string"||!Array.isArray(_e.methods)||_e.networks&&typeof _e.networks!="object")throw new Error("Invalid ABIContract parameters");this.name=_e.name,this.description=_e.desc,this.networks=_e.networks?{..._e.networks}:{},this.methods=_e.methods.map($t=>new ABIMethod($t)),this.events=_e.events}toJSON(){return{name:this.name,desc:this.description,networks:this.networks,methods:this.methods.map(_e=>_e.toJSON()),events:this.events}}getMethodByName(_e){return getMethodByName(this.methods,_e)}}class ABIInterface{constructor(_e){if(typeof _e.name!="string"||!Array.isArray(_e.methods))throw new Error("Invalid ABIInterface parameters");this.name=_e.name,this.description=_e.desc,this.methods=_e.methods.map($t=>new ABIMethod($t))}toJSON(){return{name:this.name,desc:this.description,methods:this.methods.map(_e=>_e.toJSON())}}getMethodByName(_e){return getMethodByName(this.methods,_e)}}const RETURN_PREFIX=new Uint8Array([21,31,124,117]),MAX_APP_ARGS=16;var AtomicTransactionComposerStatus;(function(yt){yt[yt.BUILDING=0]="BUILDING",yt[yt.BUILT=1]="BUILT",yt[yt.SIGNED=2]="SIGNED",yt[yt.SUBMITTED=3]="SUBMITTED",yt[yt.COMMITTED=4]="COMMITTED"})(AtomicTransactionComposerStatus||(AtomicTransactionComposerStatus={}));function populateForeignArray(yt,_e,$t){if($t!=null&&yt===$t)return 0;const Ft=$t==null?0:1;for(let Vt=0;Vt<_e.length;Vt++)if(yt===_e[Vt])return Vt+Ft;return _e.push(yt),_e.length-1+Ft}class AtomicTransactionComposer{constructor(){this.status=AtomicTransactionComposerStatus.BUILDING,this.transactions=[],this.methodCalls=new Map,this.signedTxns=[],this.txIDs=[]}getStatus(){return this.status}count(){return this.transactions.length}clone(){const _e=new AtomicTransactionComposer;return _e.transactions=this.transactions.map(({txn:$t,signer:Ft})=>{const Vt=$t.toEncodingData();return Vt.delete("grp"),{txn:Transaction$1.fromEncodingData(Vt),signer:Ft}}),_e.methodCalls=new Map(this.methodCalls),_e}addTransaction(_e){if(this.status!==AtomicTransactionComposerStatus.BUILDING)throw new Error("Cannot add transactions when composer status is not BUILDING");if(this.transactions.length===AtomicTransactionComposer.MAX_GROUP_SIZE)throw new Error(`Adding an additional transaction exceeds the maximum atomic group size of ${AtomicTransactionComposer.MAX_GROUP_SIZE}`);if(_e.txn.group&&_e.txn.group.some($t=>$t!==0))throw new Error("Cannot add a transaction with nonzero group ID");this.transactions.push(_e)}addMethodCall({appID:_e,method:$t,methodArgs:Ft,sender:Vt,suggestedParams:qt,onComplete:zt,approvalProgram:Ht,clearProgram:Kt,numGlobalInts:Gt,numGlobalByteSlices:Jt,numLocalInts:Xt,numLocalByteSlices:Zt,extraPages:er,appAccounts:tr,appForeignApps:rr,appForeignAssets:ar,boxes:nr,note:cr,lease:fr,rekeyTo:vr,signer:xr}){if(this.status!==AtomicTransactionComposerStatus.BUILDING)throw new Error("Cannot add transactions when composer status is not BUILDING");if(this.transactions.length+$t.txnCount()>AtomicTransactionComposer.MAX_GROUP_SIZE)throw new Error(`Adding additional transactions exceeds the maximum atomic group size of ${AtomicTransactionComposer.MAX_GROUP_SIZE}`);if(BigInt(_e)===BigInt(0)){if(Ht==null||Kt==null||Gt==null||Jt==null||Xt==null||Zt==null)throw new Error("One of the following required parameters for application creation is missing: approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices")}else if(zt===OnApplicationComplete.UpdateApplicationOC){if(Ht==null||Kt==null)throw new Error("One of the following required parameters for OnApplicationComplete.UpdateApplicationOC is missing: approvalProgram, clearProgram");if(Gt!=null||Jt!=null||Xt!=null||Zt!=null||er!=null)throw new Error("One of the following application creation parameters were set on a non-creation call: numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices, extraPages")}else if(Ht!=null||Kt!=null||Gt!=null||Jt!=null||Xt!=null||Zt!=null||er!=null)throw new Error("One of the following application creation parameters were set on a non-creation call: approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices, extraPages");if(Ft==null&&(Ft=[]),Ft.length!==$t.args.length)throw new Error(`Incorrect number of method arguments. Expected ${$t.args.length}, got ${Ft.length}`);let Sr=[],Tr=[];const Br=[],jr=[],Rr=[],yr=new Map,sr=nr||[];for(let lr=0;lr<Ft.length;lr++){let hr=$t.args[lr].type;const wr=Ft[lr];if(abiTypeIsTransaction(hr)){if(!isTransactionWithSigner(wr)||!abiCheckTransactionType(hr,wr.txn))throw new Error(`Expected ${hr} TransactionWithSigner for argument at index ${lr}`);if(wr.txn.group&&wr.txn.group.some(pr=>pr!==0))throw new Error("Cannot add a transaction with nonzero group ID");Br.push(wr);continue}if(isTransactionWithSigner(wr))throw new Error(`Expected non-transaction value for argument at index ${lr}`);if(abiTypeIsReference(hr)&&(yr.set(jr.length,Sr.length),jr.push(hr),Rr.push(wr),hr=new ABIUintType(8)),typeof hr=="string")throw new Error(`Unknown ABI type: ${hr}`);Sr.push(hr),Tr.push(wr)}const or=[],Qt=tr==null?[]:tr.map(lr=>lr.toString()),ir=rr==null?[]:rr.map(ensureUint64),ur=ar==null?[]:ar.map(ensureUint64);for(let lr=0;lr<jr.length;lr++){const hr=jr[lr],wr=Rr[lr];let pr=0;switch(hr){case ABIReferenceType.account:{const br=new ABIAddressType,Dr=br.decode(br.encode(wr));pr=populateForeignArray(Dr,Qt,Vt.toString());break}case ABIReferenceType.application:{const br=new ABIUintType(64),Dr=br.decode(br.encode(wr));if(Dr>Number.MAX_SAFE_INTEGER)throw new Error(`Expected safe integer for application value, got ${Dr}`);pr=populateForeignArray(Dr,ir,ensureUint64(_e));break}case ABIReferenceType.asset:{const br=new ABIUintType(64),Dr=br.decode(br.encode(wr));if(Dr>Number.MAX_SAFE_INTEGER)throw new Error(`Expected safe integer for asset value, got ${Dr}`);pr=populateForeignArray(Dr,ur);break}default:throw new Error(`Unknown reference type: ${hr}`)}or.push(pr)}for(let lr=0;lr<or.length;lr++){const hr=yr.get(lr);Tr[hr]=or[lr]}if(Sr.length>MAX_APP_ARGS-1){const lr=Sr.slice(MAX_APP_ARGS-2),hr=Tr.slice(MAX_APP_ARGS-2);Sr=Sr.slice(0,MAX_APP_ARGS-2),Tr=Tr.slice(0,MAX_APP_ARGS-2),Sr.push(new ABITupleType(lr)),Tr.push(hr)}const gr=[$t.getSelector()];for(let lr=0;lr<Sr.length;lr++)gr.push(Sr[lr].encode(Tr[lr]));const dr={txn:makeApplicationCallTxnFromObject({sender:Vt,appIndex:_e,appArgs:gr,accounts:Qt,foreignApps:ir,foreignAssets:ur,boxes:sr,onComplete:zt??OnApplicationComplete.NoOpOC,approvalProgram:Ht,clearProgram:Kt,numGlobalInts:Gt,numGlobalByteSlices:Jt,numLocalInts:Xt,numLocalByteSlices:Zt,extraPages:er,lease:fr,note:cr,rekeyTo:vr,suggestedParams:qt}),signer:xr};this.transactions.push(...Br,dr),this.methodCalls.set(this.transactions.length-1,$t)}buildGroup(){if(this.status===AtomicTransactionComposerStatus.BUILDING){if(this.transactions.length===0)throw new Error("Cannot build a group with 0 transactions");this.transactions.length>1&&assignGroupID(this.transactions.map(_e=>_e.txn)),this.status=AtomicTransactionComposerStatus.BUILT}return this.transactions}async gatherSignatures(){if(this.status>=AtomicTransactionComposerStatus.SIGNED)return this.signedTxns;const _e=this.buildGroup(),$t=_e.map(Gt=>Gt.txn),Ft=new Map;for(let Gt=0;Gt<_e.length;Gt++){const{signer:Jt}=_e[Gt];Ft.has(Jt)||Ft.set(Jt,[]),Ft.get(Jt).push(Gt)}const Vt=Array.from(Ft),qt=await Promise.all(Vt.map(([Gt,Jt])=>Gt($t,Jt))),zt=_e.map(()=>null);for(let Gt=0;Gt<Vt.length;Gt++){const Jt=Vt[Gt][1],Xt=qt[Gt];for(let Zt=0;Zt<Jt.length;Zt++)zt[Jt[Zt]]=Xt[Zt]}function Ht(Gt){return Gt.every(Jt=>Jt!=null)}if(!Ht(zt))throw new Error(`Missing signatures. Got ${zt}`);const Kt=zt.map((Gt,Jt)=>{try{return decodeMsgpack(Gt,SignedTransaction).txn.txID()}catch(Xt){throw new Error(`Cannot decode signed transaction at index ${Jt}. ${Xt}`)}});return this.signedTxns=zt,this.txIDs=Kt,this.status=AtomicTransactionComposerStatus.SIGNED,zt}async submit(_e){if(this.status>AtomicTransactionComposerStatus.SUBMITTED)throw new Error("Transaction group cannot be resubmitted");const $t=await this.gatherSignatures();return await _e.sendRawTransaction($t).do(),this.status=AtomicTransactionComposerStatus.SUBMITTED,this.txIDs}async simulate(_e,$t){if(this.status>AtomicTransactionComposerStatus.SUBMITTED)throw new Error("Simulated Transaction group has already been submitted to the network");const Vt=(await this.gatherSignatures()).map(Kt=>decodeMsgpack(Kt,SignedTransaction)),qt=$t??new SimulateRequest({txnGroups:[]});qt.txnGroups=[new SimulateRequestTransactionGroup({txns:Vt})];
1506const zt=await _e.simulateTransactions(qt).do(),Ht=[];for(const[Kt,Gt]of this.methodCalls){const Jt=this.txIDs[Kt],Xt=zt.txnGroups[0].txnResults[Kt].txnResult,Zt={txID:Jt,rawReturnValue:new Uint8Array,method:Gt};Ht.push(AtomicTransactionComposer.parseMethodResponse(Gt,Zt,Xt))}return{methodResults:Ht,simulateResponse:zt}}async execute(_e,$t){if(this.status===AtomicTransactionComposerStatus.COMMITTED)throw new Error("Transaction group has already been executed successfully");const Ft=await this.submit(_e);this.status=AtomicTransactionComposerStatus.SUBMITTED;const Vt=this.transactions.findIndex((Gt,Jt)=>this.methodCalls.has(Jt)),zt=await waitForConfirmation(_e,Ft[Vt===-1?0:Vt],$t);this.status=AtomicTransactionComposerStatus.COMMITTED;const Ht=zt.confirmedRound,Kt=[];for(const[Gt,Jt]of this.methodCalls){const Xt=Ft[Gt];let Zt={txID:Xt,rawReturnValue:new Uint8Array,method:Jt};try{const er=Gt===Vt?zt:await _e.pendingTransactionInformation(Xt).do();Zt=AtomicTransactionComposer.parseMethodResponse(Jt,Zt,er)}catch(er){Zt.decodeError=er}Kt.push(Zt)}return{confirmedRound:Ht,txIDs:Ft,methodResults:Kt}}static parseMethodResponse(_e,$t,Ft){const Vt=$t;try{if(Vt.txInfo=Ft,_e.returns.type!=="void"){const qt=Ft.logs||[];if(qt.length===0)throw new Error(`App call transaction did not log a return value ${stringifyJSON(Ft)}`);const zt=qt[qt.length-1];if(zt.byteLength<4||!arrayEqual(zt.slice(0,4),RETURN_PREFIX))throw new Error(`App call transaction did not log a ABI return value ${stringifyJSON(Ft)}`);Vt.rawReturnValue=new Uint8Array(zt.slice(4)),Vt.returnValue=_e.returns.type.decode($t.rawReturnValue)}}catch(qt){Vt.decodeError=qt}return Vt}}AtomicTransactionComposer.MAX_GROUP_SIZE=16;const SIGN_BYTES_PREFIX=Uint8Array.from([77,88]),MULTISIG_BAD_SENDER_ERROR_MSG="The transaction sender address and multisig preimage do not match.";function signTransaction(yt,_e){return{txID:yt.txID(),blob:yt.signTxn(_e)}}function signBytes(yt,_e){const $t=concatArrays$1(SIGN_BYTES_PREFIX,yt);return sign($t,_e)}function verifyBytes(yt,_e,$t){const Ft=concatArrays$1(SIGN_BYTES_PREFIX,yt),Vt=typeof $t=="string"?Address.fromString($t):$t;return verify(Ft,_e,Vt.publicKey)}const ERROR_MULTISIG_BAD_SENDER=new Error(MULTISIG_BAD_SENDER_ERROR_MSG),ERROR_INVALID_MICROALGOS=new Error(INVALID_MICROALGOS_ERROR_MSG),algosdk=Object.freeze(Object.defineProperty({__proto__:null,ABIAddressType,ABIArrayDynamicType,ABIArrayStaticType,ABIBoolType,ABIByteType,ABIContract,ABIInterface,ABIMethod,get ABIReferenceType(){return ABIReferenceType},ABIStringType,get ABITransactionType(){return ABITransactionType},ABITupleType,ABIType,ABIUfixedType,ABIUintType,ADDR_BYTE_SIZE,ALGORAND_ZERO_ADDRESS_STRING,AccountBaseData,AccountData,AccountDeltas,AccountTotals,Address,AlgoCount,Algodv2:AlgodClient,AppLocalState,AppLocalStateDelta,AppParams,AppParamsDelta,AppResourceRecord,ApplyData,AssetHolding:AssetHolding$2,AssetHoldingDelta,AssetParams:AssetParams$2,AssetParamsDelta,AssetResourceRecord,AtomicTransactionComposer,get AtomicTransactionComposerStatus(){return AtomicTransactionComposerStatus},BalanceRecord,Block:Block$2,BlockHeader,ENCODED_MULTISIG_SCHEMA,ENCODED_SUBSIG_SCHEMA,ERROR_INVALID_MICROALGOS,ERROR_MULTISIG_BAD_SENDER,EvalDelta:EvalDelta$2,FalconSignatureStruct,FalconVerifier,HashFactory:HashFactory$1,INVALID_MICROALGOS_ERROR_MSG,IncludedTransactions,Indexer:IndexerClient,IntDecoding:IntDecoding$1,Kmd:KmdClient,KvValueDelta,LENGTH_ENCODE_BYTE_SIZE,LedgerStateDelta,LogicSig,LogicSigAccount,MAX_LEN,MULTISIG_BAD_SENDER_ERROR_MSG,MerkleArrayProof:MerkleArrayProof$1,MerkleSignatureVerifier,ModifiedCreatable,get OnApplicationComplete(){return OnApplicationComplete},Participant,ParticipationUpdates:ParticipationUpdates$1,ProgramSourceMap,Reveal,RewardState,SINGLE_BOOL_SIZE,SINGLE_BYTE_SIZE,SignedTransaction,SignedTxnInBlock,SignedTxnWithAD,SigslotCommit,StateProof:StateProof$2,StateProofMessage:StateProofMessage$1,StateProofTrackingData,StateSchema:StateSchema$1,TealValue:TealValue$2,Transaction:Transaction$1,get TransactionType(){return TransactionType},TxnCommitments,UntypedValue,UpgradeState,UpgradeVote,ValueDelta,VotingData,abiCheckTransactionType,abiTypeIsReference,abiTypeIsTransaction,algosToMicroalgos,appendSignMultisigTransaction,appendSignRawMultisigSignature,assignGroupID,base64ToBytes,bigIntToBytes,bytesToBase64,bytesToBigInt,bytesToHex,bytesToString,coerceToBytes,computeGroupID,createDryrun,createMultisigTransaction,decodeAddress,decodeJSON,decodeMsgpack,decodeObj,decodeSignedTransaction,decodeUint64,decode
1506UnsignedTransaction,dryrunTxnResultAppTrace,dryrunTxnResultLogicSigTrace,encodeAddress,encodeJSON,encodeMsgpack,encodeObj,encodeUint64,encodeUnsignedSimulateTransaction,encodeUnsignedTransaction,encodedMultiSigFromEncodingData,encodedMultiSigToEncodingData,encodedSubsigFromEncodingData,encodedSubsigToEncodingData,generateAccount,getApplicationAddress,getMethodByName,hexToBytes,indexerModels:types,isOnApplicationComplete,isTransactionType,isTransactionWithSigner,isValidAddress:isValidAddress$1,logicSigFromByte,makeApplicationCallTxnFromObject,makeApplicationClearStateTxnFromObject,makeApplicationCloseOutTxnFromObject,makeApplicationCreateTxnFromObject,makeApplicationDeleteTxnFromObject,makeApplicationNoOpTxnFromObject,makeApplicationOptInTxnFromObject,makeApplicationUpdateTxnFromObject,makeAssetConfigTxnWithSuggestedParamsFromObject,makeAssetCreateTxnWithSuggestedParamsFromObject,makeAssetDestroyTxnWithSuggestedParamsFromObject,makeAssetFreezeTxnWithSuggestedParamsFromObject,makeAssetTransferTxnWithSuggestedParamsFromObject,makeBaseAssetConfigTxn,makeBasicAccountTransactionSigner,makeEmptyTransactionSigner,makeKeyRegistrationTxnWithSuggestedParamsFromObject,makeLogicSigAccountTransactionSigner,makeMultiSigAccountTransactionSigner,makePaymentTxnWithSuggestedParamsFromObject,masterDerivationKeyToMnemonic,mergeMultisigTransactions,microalgosToAlgos,mnemonicFromSeed,mnemonicToMasterDerivationKey,mnemonicToSecretKey,modelsv2:types$1,msgpackRawDecode,msgpackRawDecodeAsMap,msgpackRawEncode,multisigAddress,parseJSON,secretKeyToMnemonic,seedFromMnemonic,signBytes,signLogicSigTransaction,signLogicSigTransactionObject,signMultisigTransaction,signTransaction,stringifyJSON,tealSign,tealSignFromProgram,verifyBytes,verifyMultisig,verifyTealSign,waitForConfirmation},Symbol.toStringTag,{value:"Module"}));var cjs$2={},cjs$1={};Object.defineProperty(cjs$1,"__esModule",{value:!0});var getLocalStorage_1=cjs$1.getLocalStorage=cjs$1.getLocalStorageOrThrow=cjs$1.getCrypto=cjs$1.getCryptoOrThrow=getLocation_1=cjs$1.getLocation=cjs$1.getLocationOrThrow=getNavigator_1=cjs$1.getNavigator=cjs$1.getNavigatorOrThrow=cjs$1.getDocument=cjs$1.getDocumentOrThrow=cjs$1.getFromWindowOrThrow=cjs$1.getFromWindow=void 0;function getFromWindow(yt){let _e;return typeof window<"u"&&typeof window[yt]<"u"&&(_e=window[yt]),_e}cjs$1.getFromWindow=getFromWindow;function getFromWindowOrThrow(yt){const _e=getFromWindow(yt);if(!_e)throw new Error(`${yt} is not defined in Window`);return _e}cjs$1.getFromWindowOrThrow=getFromWindowOrThrow;function getDocumentOrThrow(){return getFromWindowOrThrow("document")}cjs$1.getDocumentOrThrow=getDocumentOrThrow;function getDocument(){return getFromWindow("document")}cjs$1.getDocument=getDocument;function getNavigatorOrThrow(){return getFromWindowOrThrow("navigator")}cjs$1.getNavigatorOrThrow=getNavigatorOrThrow;function getNavigator$1(){return getFromWindow("navigator")}var getNavigator_1=cjs$1.getNavigator=getNavigator$1;function getLocationOrThrow(){return getFromWindowOrThrow("location")}cjs$1.getLocationOrThrow=getLocationOrThrow;function getLocation$1(){return getFromWindow("location")}var getLocation_1=cjs$1.getLocation=getLocation$1;function getCryptoOrThrow(){return getFromWindowOrThrow("crypto")}cjs$1.getCryptoOrThrow=getCryptoOrThrow;function getCrypto(){return getFromWindow("crypto")}cjs$1.getCrypto=getCrypto;function getLocalStorageOrThrow(){return getFromWindowOrThrow("localStorage")}cjs$1.getLocalStorageOrThrow=getLocalStorageOrThrow;function getLocalStorage$1(){return getFromWindow("localStorage")}getLocalStorage_1=cjs$1.getLocalStorage=getLocalStorage$1;Object.defineProperty(cjs$2,"__esModule",{value:!0});var getWindowMetadata_1=cjs$2.getWindowMetadata=void 0;const window_getters_1=cjs$1;function getWindowMetadata(){let yt,_e;try{yt=window_getters_1.getDocumentOrThrow(),_e=window_getters_1.getLocationOrThrow()}catch{return null}function $t(){const Xt=yt.getElementsByTagName("link"),Zt=[];for(let er=0;er<Xt.length;er++){const tr=Xt[er],rr=tr.getAttribute("rel");if(rr&&rr.toLowerCase().indexOf("icon")>-1){const ar=tr.getAttribute("href");if(ar)if(ar.toLowerCase().indexOf("https:")===-1&&ar.toLowerCase().indexOf("http:")===-1&&ar.indexOf("//")!==0){let nr=_e.protocol+"//"+_e.host;if(ar.indexOf("/")===0)nr+=ar;else{const cr=_e.pathname.split("/");cr.pop();const fr=cr.join("/");nr+=fr+"/"+ar}Zt.push(nr)}else if(ar.indexOf("//")===0){const nr=_e.protocol+ar;Zt.push(nr)}else Zt.push(ar)}}return Zt}function Ft(...Xt){const Zt=yt.getElementsByTagName("meta");for(let er=0;er<Zt.length;er++){const tr=Zt[er],rr=["itemprop","property","name"].map(ar=>tr.getAttribute(ar)).filter(ar=>ar?Xt.includes(ar):!1);if(rr.length&&rr){const ar=tr.getAttribute("content");
1506if(ar)return ar}}return""}function Vt(){let Xt=Ft("name","og:site_name","og:title","twitter:title");return Xt||(Xt=yt.title),Xt}function qt(){return Ft("description","og:description","twitter:description","keywords")}const zt=Vt(),Ht=qt(),Kt=_e.origin,Gt=$t();return{description:Ht,url:Kt,icons:Gt,name:zt}}getWindowMetadata_1=cjs$2.getWindowMetadata=getWindowMetadata;var __spreadArrays$1=function(){for(var yt=0,_e=0,$t=arguments.length;_e<$t;_e++)yt+=arguments[_e].length;for(var Ft=Array(yt),Vt=0,_e=0;_e<$t;_e++)for(var qt=arguments[_e],zt=0,Ht=qt.length;zt<Ht;zt++,Vt++)Ft[Vt]=qt[zt];return Ft},BrowserInfo=function(){function yt(_e,$t,Ft){this.name=_e,this.version=$t,this.os=Ft,this.type="browser"}return yt}(),NodeInfo=function(){function yt(_e){this.version=_e,this.type="node",this.name="node",this.os=process$1.platform}return yt}(),SearchBotDeviceInfo=function(){function yt(_e,$t,Ft,Vt){this.name=_e,this.version=$t,this.os=Ft,this.bot=Vt,this.type="bot-device"}return yt}(),BotInfo=function(){function yt(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return yt}(),ReactNativeInfo=function(){function yt(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return yt}(),SEARCHBOX_UA_REGEX=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,SEARCHBOT_OS_REGEX=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,REQUIRED_VERSION_PARTS=3,userAgentRules=[["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|$)/],["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",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",SEARCHBOX_UA_REGEX]],operatingSystemRules=[["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/],["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 detect(yt){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new ReactNativeInfo:typeof navigator<"u"?parseUserAgent(navigator.userAgent):getNodeVersion()}function matchUserAgent(yt){return yt!==""&&userAgentRules.reduce(function(_e,$t){var Ft=$t[0],Vt=$t[1];if(_e)return _e;var qt=Vt.exec(yt);return!!qt&&[Ft,qt]},!1)}function parseUserAgent(yt){var _e=matchUserAgent(yt);if(!_e)return null;var $t=_e[0],Ft=_e[1];if($t==="searchbot")return new BotInfo;var Vt=Ft[1]&&Ft[1].split(/[._]/).slice(0,3);Vt?Vt.length<REQUIRED_VERSION_PARTS&&(Vt=__spreadArrays$1(Vt,createVersionParts(REQUIRED_VERSION_PARTS-Vt.length))):Vt=[];var qt=Vt.join("."),zt=detectOS$1(yt),Ht=SEARCHBOT_OS_REGEX.exec(yt);return Ht&&Ht[1]?new SearchBotDeviceInfo($t,qt,zt,Ht[1]):new BrowserInfo($t,qt,zt)}function detectOS$1(yt){for(var _e=0,$t=operatingSystemRules.length;_e<$t;_e++){var Ft=operatingSystemRules[_e],Vt=Ft[0],qt=Ft[1],zt=qt.exec(yt);if(zt)return Vt}return null}function getNodeVersion(){var yt=typeof process$1<"u"&&process$1.version;return yt?new NodeInfo(process$1.version.slice(1)):null}function createVersionParts(yt){for(var _e=[],$t=0;$t<yt;$t++)_e.push("0");return _e}function detectEnv(yt){return detect()}function detectOS(){const yt=detectEnv();return yt&&yt.os?yt.os:void 0}function isAndroid(){const yt=detectOS();return yt?yt.toLowerCase().includes("android"):!1}function isIOS(){const yt=detectOS();return yt?yt.toLowerCase().includes("ios")||yt.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function isMobile(){return detectOS()?isAndroid()||isIOS():!1}function isNode(){const yt=detectEnv();return yt&&yt.name?yt.name.toLowerCase()==="node":!1}function isBrowser(){return!isNode()&&!!getNavigator()}const getNavigator=getNavigator_1,getLocation=getLocation_1,getLocalStorage=getLocalStorage_1;function getClientMeta(){return getWindowMetadata_1()}function safeJsonParse$1(yt){if(typeof yt!="string")throw new Error(`Cannot safe json parse value of type ${typeof yt}`);try{return JSON.parse(yt)}catch{return yt}}function safeJsonStringify$1(yt){return typeof yt=="string"?yt:JSON.stringify(yt)}const safeJsonParse=safeJsonParse$1,safeJsonStringify=safeJsonStringify$1;function setLocal(yt,_e){const $t=safeJsonStringify(_e),Ft=getLocalStorage();Ft&&Ft.setItem(yt,$t)}function getLocal(yt){let _e=null,$t=null;const Ft=getLocalStorage();return Ft&&($t=Ft.getItem(yt)),_e=$t&&safeJsonParse($t),_e}function removeLocal(yt){const _e=getLocalStorage();_e&&_e.removeItem(yt)}
1506const mobileLinkChoiceKey="WALLETCONNECT_DEEPLINK_CHOICE",reservedEvents=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],signingMethods=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"];var isTypedarray=isTypedArray$1;isTypedArray$1.strict=isStrictTypedArray;isTypedArray$1.loose=isLooseTypedArray;var toString=Object.prototype.toString,names={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function isTypedArray$1(yt){return isStrictTypedArray(yt)||isLooseTypedArray(yt)}function isStrictTypedArray(yt){return yt instanceof Int8Array||yt instanceof Int16Array||yt instanceof Int32Array||yt instanceof Uint8Array||yt instanceof Uint8ClampedArray||yt instanceof Uint16Array||yt instanceof Uint32Array||yt instanceof Float32Array||yt instanceof Float64Array}function isLooseTypedArray(yt){return names[toString.call(yt)]}var isTypedArray=isTypedarray.strict,typedarrayToBuffer=function yt(_e){if(isTypedArray(_e)){var $t=Buffer.from(_e.buffer);return _e.byteLength!==_e.buffer.byteLength&&($t=$t.slice(_e.byteOffset,_e.byteOffset+_e.byteLength)),$t}else return Buffer.from(_e)};const typedArrayToBuffer=getDefaultExportFromCjs$1(typedarrayToBuffer),ENC_HEX="hex",ENC_UTF8="utf8",STRING_ZERO="0";function bufferToArray(yt){return new Uint8Array(yt)}function bufferToHex(yt,_e=!1){const $t=yt.toString(ENC_HEX);return _e?addHexPrefix($t):$t}function bufferToUtf8(yt){return yt.toString(ENC_UTF8)}function arrayToBuffer(yt){return typedArrayToBuffer(yt)}function arrayToHex(yt,_e=!1){return bufferToHex(arrayToBuffer(yt),_e)}function arrayToUtf8(yt){return bufferToUtf8(arrayToBuffer(yt))}function hexToBuffer(yt){return Buffer.from(removeHexPrefix(yt),ENC_HEX)}function hexToArray(yt){return bufferToArray(hexToBuffer(yt))}function utf8ToBuffer(yt){return Buffer.from(yt,ENC_UTF8)}function utf8ToArray(yt){return bufferToArray(utf8ToBuffer(yt))}function utf8ToHex(yt,_e=!1){return bufferToHex(utf8ToBuffer(yt),_e)}function isHexString$1(yt,_e){return!(typeof yt!="string"||!yt.match(/^0x[0-9A-Fa-f]*$/))}function concatArrays(...yt){let _e=[];return yt.forEach($t=>_e=_e.concat(Array.from($t))),new Uint8Array([..._e])}function calcByteLength(yt,_e=8){const $t=yt%_e;return $t?(yt-$t)/_e*_e+_e:yt}function sanitizeBytes(yt,_e=8,$t=STRING_ZERO){return padLeft(yt,calcByteLength(yt.length,_e),$t)}function padLeft(yt,_e,$t=STRING_ZERO){return padString(yt,_e,!0,$t)}function removeHexPrefix(yt){return yt.replace(/^0x/,"")}function addHexPrefix(yt){return yt.startsWith("0x")?yt:`0x${yt}`}function sanitizeHex$1(yt){return yt=removeHexPrefix(yt),yt=sanitizeBytes(yt,2),yt&&(yt=addHexPrefix(yt)),yt}function removeHexLeadingZeros$1(yt){const _e=yt.startsWith("0x");return yt=removeHexPrefix(yt),yt=yt.startsWith(STRING_ZERO)?yt.substring(1):yt,_e?addHexPrefix(yt):yt}function padString(yt,_e,$t,Ft=STRING_ZERO){const Vt=_e-yt.length;let qt=yt;return Vt>0&&(qt=Ft.repeat(Vt)+yt),qt}function convertArrayBufferToBuffer(yt){return arrayToBuffer(new Uint8Array(yt))}function convertArrayBufferToHex(yt,_e){return arrayToHex(new Uint8Array(yt),!_e)}function convertBufferToArrayBuffer(yt){return bufferToArray(yt).buffer}function convertUtf8ToBuffer(yt){return utf8ToBuffer(yt)}function convertUtf8ToHex(yt,_e){return utf8ToHex(yt,!_e)}function convertHexToArrayBuffer(yt){return hexToArray(yt).buffer}function convertNumberToHex(yt,_e){const $t=removeHexPrefix(sanitizeHex$1(new BN(yt).toString(16)));return _e?$t:addHexPrefix($t)}var sha3={exports:{}};
1506(function(yt){(function(){var _e="input is invalid type",$t="finalize already called",Ft=typeof window=="object",Vt=Ft?window:{};Vt.JS_SHA3_NO_WINDOW&&(Ft=!1);var qt=!Ft&&typeof self=="object",zt=!Vt.JS_SHA3_NO_NODE_JS&&typeof process$1=="object"&&process$1.versions&&process$1.versions.node;zt?Vt=globalThis:qt&&(Vt=self);var Ht=!Vt.JS_SHA3_NO_COMMON_JS&&!0&&yt.exports,Kt=!Vt.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",Gt="0123456789abcdef".split(""),Jt=[31,7936,2031616,520093696],Xt=[4,1024,262144,67108864],Zt=[1,256,65536,16777216],er=[6,1536,393216,100663296],tr=[0,8,16,24],rr=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],ar=[224,256,384,512],nr=[128,256],cr=["hex","buffer","arrayBuffer","array","digest"],fr={128:168,256:136};(Vt.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(_r){return Object.prototype.toString.call(_r)==="[object Array]"}),Kt&&(Vt.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(_r){return typeof _r=="object"&&_r.buffer&&_r.buffer.constructor===ArrayBuffer});for(var vr=function(_r,Nr,kr){return function(Mr){return new pr(_r,Nr,_r).update(Mr)[kr]()}},xr=function(_r,Nr,kr){return function(Mr,Lr){return new pr(_r,Nr,Lr).update(Mr)[kr]()}},Sr=function(_r,Nr,kr){return function(Mr,Lr,Cr,Er){return Qt["cshake"+_r].update(Mr,Lr,Cr,Er)[kr]()}},Tr=function(_r,Nr,kr){return function(Mr,Lr,Cr,Er){return Qt["kmac"+_r].update(Mr,Lr,Cr,Er)[kr]()}},Br=function(_r,Nr,kr,Mr){for(var Lr=0;Lr<cr.length;++Lr){var Cr=cr[Lr];_r[Cr]=Nr(kr,Mr,Cr)}return _r},jr=function(_r,Nr){var kr=vr(_r,Nr,"hex");return kr.create=function(){return new pr(_r,Nr,_r)},kr.update=function(Mr){return kr.create().update(Mr)},Br(kr,vr,_r,Nr)},Rr=function(_r,Nr){var kr=xr(_r,Nr,"hex");return kr.create=function(Mr){return new pr(_r,Nr,Mr)},kr.update=function(Mr,Lr){return kr.create(Lr).update(Mr)},Br(kr,xr,_r,Nr)},yr=function(_r,Nr){var kr=fr[_r],Mr=Sr(_r,Nr,"hex");return Mr.create=function(Lr,Cr,Er){return!Cr&&!Er?Qt["shake"+_r].create(Lr):new pr(_r,Nr,Lr).bytepad([Cr,Er],kr)},Mr.update=function(Lr,Cr,Er,Ar){return Mr.create(Cr,Er,Ar).update(Lr)},Br(Mr,Sr,_r,Nr)},sr=function(_r,Nr){var kr=fr[_r],Mr=Tr(_r,Nr,"hex");return Mr.create=function(Lr,Cr,Er){return new br(_r,Nr,Cr).bytepad(["KMAC",Er],kr).bytepad([Lr],kr)},Mr.update=function(Lr,Cr,Er,Ar){return Mr.create(Lr,Er,Ar).update(Cr)},Br(Mr,Tr,_r,Nr)},or=[{name:"keccak",padding:Zt,bits:ar,createMethod:jr}
1506,{name:"sha3",padding:er,bits:ar,createMethod:jr},{name:"shake",padding:Jt,bits:nr,createMethod:Rr},{name:"cshake",padding:Xt,bits:nr,createMethod:yr},{name:"kmac",padding:Xt,bits:nr,createMethod:sr}],Qt={},ir=[],ur=0;ur<or.length;++ur)for(var gr=or[ur],dr=gr.bits,lr=0;lr<dr.length;++lr){var hr=gr.name+"_"+dr[lr];if(ir.push(hr),Qt[hr]=gr.createMethod(dr[lr],gr.padding),gr.name!=="sha3"){var wr=gr.name+dr[lr];ir.push(wr),Qt[wr]=Qt[hr]}}function pr(_r,Nr,kr){this.blocks=[],this.s=[],this.padding=Nr,this.outputBits=kr,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(_r<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=kr>>5,this.extraBytes=(kr&31)>>3;for(var Mr=0;Mr<50;++Mr)this.s[Mr]=0}pr.prototype.update=function(_r){if(this.finalized)throw new Error($t);var Nr,kr=typeof _r;if(kr!=="string"){if(kr==="object"){if(_r===null)throw new Error(_e);if(Kt&&_r.constructor===ArrayBuffer)_r=new Uint8Array(_r);else if(!Array.isArray(_r)&&(!Kt||!ArrayBuffer.isView(_r)))throw new Error(_e)}else throw new Error(_e);Nr=!0}for(var Mr=this.blocks,Lr=this.byteCount,Cr=_r.length,Er=this.blockCount,Ar=0,zr=this.s,Vr,Gr;Ar<Cr;){if(this.reset)for(this.reset=!1,Mr[0]=this.block,Vr=1;Vr<Er+1;++Vr)Mr[Vr]=0;if(Nr)for(Vr=this.start;Ar<Cr&&Vr<Lr;++Ar)Mr[Vr>>2]|=_r[Ar]<<tr[Vr++&3];else for(Vr=this.start;Ar<Cr&&Vr<Lr;++Ar)Gr=_r.charCodeAt(Ar),Gr<128?Mr[Vr>>2]|=Gr<<tr[Vr++&3]:Gr<2048?(Mr[Vr>>2]|=(192|Gr>>6)<<tr[Vr++&3],Mr[Vr>>2]|=(128|Gr&63)<<tr[Vr++&3]):Gr<55296||Gr>=57344?(Mr[Vr>>2]|=(224|Gr>>12)<<tr[Vr++&3],Mr[Vr>>2]|=(128|Gr>>6&63)<<tr[Vr++&3],Mr[Vr>>2]|=(128|Gr&63)<<tr[Vr++&3]):(Gr=65536+((Gr&1023)<<10|_r.charCodeAt(++Ar)&1023),Mr[Vr>>2]|=(240|Gr>>18)<<tr[Vr++&3],Mr[Vr>>2]|=(128|Gr>>12&63)<<tr[Vr++&3],Mr[Vr>>2]|=(128|Gr>>6&63)<<tr[Vr++&3],Mr[Vr>>2]|=(128|Gr&63)<<tr[Vr++&3]);if(this.lastByteIndex=Vr,Vr>=Lr){for(this.start=Vr-Lr,this.block=Mr[Er],Vr=0;Vr<Er;++Vr)zr[Vr]^=Mr[Vr];Dr(zr),this.reset=!0}else this.start=Vr}return this},pr.prototype.encode=function(_r,Nr){var kr=_r&255,Mr=1,Lr=[kr];for(_r=_r>>8,kr=_r&255;kr>0;)Lr.unshift(kr),_r=_r>>8,kr=_r&255,++Mr;return Nr?Lr.push(Mr):Lr.unshift(Mr),this.update(Lr),Lr.length},pr.prototype.encodeString=function(_r){var Nr,kr=typeof _r;if(kr!=="string"){if(kr==="object"){if(_r===null)throw new Error(_e);if(Kt&&_r.constructor===ArrayBuffer)_r=new Uint8Array(_r);else if(!Array.isArray(_r)&&(!Kt||!ArrayBuffer.isView(_r)))throw new Error(_e)}else throw new Error(_e);Nr=!0}var Mr=0,Lr=_r.length;if(Nr)Mr=Lr;else for(var Cr=0;Cr<_r.length;++Cr){var Er=_r.charCodeAt(Cr);Er<128?Mr+=1:Er<2048?Mr+=2:Er<55296||Er>=57344?Mr+=3:(Er=65536+((Er&1023)<<10|_r.charCodeAt(++Cr)&1023),Mr+=4)}return Mr+=this.encode(Mr*8),this.update(_r),Mr},pr.prototype.bytepad=function(_r,Nr){for(var kr=this.encode(Nr),Mr=0;Mr<_r.length;++Mr)kr+=this.encodeString(_r[Mr]);var Lr=Nr-kr%Nr,Cr=[];return Cr.length=Lr,this.update(Cr),this},pr.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var _r=this.blocks,Nr=this.lastByteIndex,kr=this.blockCount,Mr=this.s;if(_r[Nr>>2]|=this.padding[Nr&3],this.lastByteIndex===this.byteCount)for(_r[0]=_r[kr],Nr=1;Nr<kr+1;++Nr)_r[Nr]=0;for(_r[kr-1]|=2147483648,Nr=0;Nr<kr;++Nr)Mr[Nr]^=_r[Nr];Dr(Mr)}},pr.prototype.toString=pr.prototype.hex=function(){this.finalize();for(var _r=this.blockCount,Nr=this.s,kr=this.outputBlocks,Mr=this.extraBytes,Lr=0,Cr=0,Er="",Ar;Cr<kr;){for(Lr=0;Lr<_r&&Cr<kr;++Lr,++Cr)Ar=Nr[Lr],Er+=Gt[Ar>>4&15]+Gt[Ar&15]+Gt[Ar>>12&15]+Gt[Ar>>8&15]+Gt[Ar>>20&15]+Gt[Ar>>16&15]+Gt[Ar>>28&15]+Gt[Ar>>24&15];Cr%_r===0&&(Dr(Nr),Lr=0)}return Mr&&(Ar=Nr[Lr],Er+=Gt[Ar>>4&15]+Gt[Ar&15],Mr>1&&(Er+=Gt[Ar>>12&15]+Gt[Ar>>8&15]),Mr>2&&(Er+=Gt[Ar>>20&15]+Gt[Ar>>16&15])),Er},pr.prototype.arrayBuffer=function(){this.finalize();var _r=this.blockCount,Nr=this.s,kr=this.outputBlocks,Mr=this.extraBytes,Lr=0,Cr=0,Er=this.outputBits>>3,Ar;Mr?Ar=new ArrayBuffer(kr+1<<2):Ar=new ArrayBuffer(Er);for(var zr=new Uint32Array(Ar);Cr<kr;){for(Lr=0;Lr<_r&&Cr<kr;++Lr,++Cr)zr[Cr]=Nr[Lr];Cr%_r===0&&Dr(Nr)}return Mr&&(zr[Lr]=Nr[Lr],Ar=Ar.slice(0,Er)),Ar},pr.prototype.buffer=pr.prototype.arrayBuffer,pr.prototype.digest=pr.prototype.array=function(){this.finalize();for(var _r=this.blockCount,Nr=this.s,kr=this.outputBlocks,Mr=this.extraBytes,Lr=0,Cr=0,Er=[],Ar,zr;Cr<kr;){for(Lr=0;Lr<_r&&Cr<kr;++Lr,++Cr)Ar=Cr<<2,zr=Nr[Lr],Er[Ar]=zr&255,Er[Ar+1]=zr>>8&255,Er[Ar+2]=zr>>16&255,Er[Ar+3]=zr>>24&255;Cr%_r===0&&Dr(Nr)}return Mr&&(Ar=Cr<<2,zr=Nr[Lr],Er[Ar]=zr&255,Mr>1&&(Er[Ar+1]=zr>>8&255),Mr>2&&(Er[Ar+2]=zr>>16&255)),Er};function br(_r,Nr,kr){pr.call(this,_r,Nr,kr)}br.prototype=new pr,br.prototype.finalize=function(){return this.encode(this.outputBits,!0),pr.prototype.finalize.call(this)};var Dr=function(_r){var Nr,kr,Mr,Lr,Cr,Er,Ar,zr,Vr,Gr,tn,Yr,Jr,Kr,Xr,Qr,un,an,sn,vn,gn,fn,wn,dn,Ur,Ir,Pr,Fr,Zr,en,rn,En,$n,mn,Fn,_n,kn,Qn,Ln,Cn,ro,qn,Pn,ao,zn,Mn,so,Or,qr,Hr,$r,Wr,cn,on,ln,Sn,An,yn,Zn,On,Wn,Hn,Gn;for(Mr=0;Mr<48;Mr+=2)Lr=_r[0]^_r[10]^_r[20]^_r[30]^_r[40],Cr=_r[1]^_r[11]^_r[21]^_r[31]^_r[41],Er=_r[2]^_r[12]^_r[22]^_r[32]^_r[42],Ar=_r[3]^_r[13]^_r[23]^_r[33]^_r[43],zr=_r[4]^_r[14]^_r[24]^_r[34]^_r[44],Vr=_r[5]^_r[15]^_r[25]^_r[35]^_r[45],Gr=_r[6]^_r[16]^_r[26]^_r[36]^_r[46],tn=_r[7]^_r[17]^_r[27]^_r[37]^_r[47],Yr=_r[8]^_r[18]^_r[28]^_r[38]^_r[48],Jr=_r[9]^_r[19]^_r[29]^_r[39]^_r[49],Nr=Yr^(Er<<1|Ar>>>31),kr=Jr^(Ar<<1|Er>>>31),_r[0]^=Nr,_r[1]^=kr,_r[10]^=Nr,_r[11]^=kr,_r[20]^=Nr,_r[21]^=kr,_r[30]^=Nr,_r[31]^=kr,_r[40]^=Nr,_r[41]^=kr,Nr=Lr^(zr<<1|Vr>>>31),kr=Cr^(Vr<<1|zr>>>31),_r[2]^=Nr,_r[3]^=kr,_r[12]^=Nr,_r[13]^=kr,_r[22]^=Nr,_r[23]^=kr,_r[32]^=Nr,_r[33]^=kr,_r[42]^=Nr,_r[43]^=kr,Nr=Er^(Gr<<1|tn>>>31),kr=Ar^(tn<<1|Gr>>>31),_r[4]^=Nr,_r[5]^=kr,_r[14]^=Nr,_r[15]^=kr,_r[24]^=Nr,_r[25]^=kr,_r[34]^=Nr,_r[35]^=kr,_r[44]^=Nr,_r[45]^=kr,Nr=zr^(Yr<<1|Jr>>>31),kr=Vr^(Jr<<1|Yr>>>31),_r[6]^=Nr,_r[7]^=kr,_r[16]^=Nr,_r[17]^=kr,_r[26]^=Nr,_r[27]^=kr,_r[36]^=Nr,_r[37]^=kr,_r[46]^=Nr,_r[47]^=kr,Nr=Gr^(Lr<<1|Cr>>>31),kr=tn^(Cr<<1|Lr>>>31),_r[8]^=Nr,_r[9]^=kr,_r[18]^=Nr,_r[19]^=kr,_r[28]^=Nr,_r[29]^=kr,_r[38]^=Nr,_r[39]^=kr,_r[48]^=Nr,_r[49]^=kr,Kr=_r[0],Xr=_r[1],Mn=_r[11]<<4|_r[10]>>>28,so=_r[10]<<4|_r[11]>>>28,Fr=_r[20]<<3|_r[21]>>>29,Zr=_r[21]<<3|_r[20]>>>29,On=_r[31]<<9|_r[30]>>>23,Wn=_r[30]<<9|_r[31]>>>23,qn=_r[40]<<18|_r[41]>>>14,Pn=_r[41]<<18|_r[40]>>>14,mn=_r[2]<<1|_r[3]>>>31,Fn=_r[3]<<1|_r[2]>>>31,Qr=_r[13]<<12|_r[12]>>>20,un=_r[12]<<12|_r[13]>>>20,Or=_r[22]<<10|_r[23]>>>22,qr=_r[23]<<10|_r[22]>>>22,en=_r[33]<<13|_r[32]>>>19,rn=_r[32]<<13|_r[33]>>>19,Hn=_r[42]<<2|_r[43]>>>30,Gn=_r[43]<<2|_r[42]>>>30,on=_r[5]<<30|_r[4]>>>2,ln=_r[4]<<30|_r[5]>>>2,_n=_r[14]<<6|_r[15]>>>26,kn=_r[15]<<6|_r[14]>>>26,an=_r[25]<<11|_r[24]>>>21,sn=_r[24]<<11|_r[25]>>>21,Hr=_r[34]<<15|_r[35]>>>17,$r=_r[35]<<15|_r[34]>>>17,En=_r[45]<<29|_r[44]>>>
15063,$n=_r[44]<<29|_r[45]>>>3,dn=_r[6]<<28|_r[7]>>>4,Ur=_r[7]<<28|_r[6]>>>4,Sn=_r[17]<<23|_r[16]>>>9,An=_r[16]<<23|_r[17]>>>9,Qn=_r[26]<<25|_r[27]>>>7,Ln=_r[27]<<25|_r[26]>>>7,vn=_r[36]<<21|_r[37]>>>11,gn=_r[37]<<21|_r[36]>>>11,Wr=_r[47]<<24|_r[46]>>>8,cn=_r[46]<<24|_r[47]>>>8,ao=_r[8]<<27|_r[9]>>>5,zn=_r[9]<<27|_r[8]>>>5,Ir=_r[18]<<20|_r[19]>>>12,Pr=_r[19]<<20|_r[18]>>>12,yn=_r[29]<<7|_r[28]>>>25,Zn=_r[28]<<7|_r[29]>>>25,Cn=_r[38]<<8|_r[39]>>>24,ro=_r[39]<<8|_r[38]>>>24,fn=_r[48]<<14|_r[49]>>>18,wn=_r[49]<<14|_r[48]>>>18,_r[0]=Kr^~Qr&an,_r[1]=Xr^~un&sn,_r[10]=dn^~Ir&Fr,_r[11]=Ur^~Pr&Zr,_r[20]=mn^~_n&Qn,_r[21]=Fn^~kn&Ln,_r[30]=ao^~Mn&Or,_r[31]=zn^~so&qr,_r[40]=on^~Sn&yn,_r[41]=ln^~An&Zn,_r[2]=Qr^~an&vn,_r[3]=un^~sn&gn,_r[12]=Ir^~Fr&en,_r[13]=Pr^~Zr&rn,_r[22]=_n^~Qn&Cn,_r[23]=kn^~Ln&ro,_r[32]=Mn^~Or&Hr,_r[33]=so^~qr&$r,_r[42]=Sn^~yn&On,_r[43]=An^~Zn&Wn,_r[4]=an^~vn&fn,_r[5]=sn^~gn&wn,_r[14]=Fr^~en&En,_r[15]=Zr^~rn&$n,_r[24]=Qn^~Cn&qn,_r[25]=Ln^~ro&Pn,_r[34]=Or^~Hr&Wr,_r[35]=qr^~$r&cn,_r[44]=yn^~On&Hn,_r[45]=Zn^~Wn&Gn,_r[6]=vn^~fn&Kr,_r[7]=gn^~wn&Xr,_r[16]=en^~En&dn,_r[17]=rn^~$n&Ur,_r[26]=Cn^~qn&mn,_r[27]=ro^~Pn&Fn,_r[36]=Hr^~Wr&ao,_r[37]=$r^~cn&zn,_r[46]=On^~Hn&on,_r[47]=Wn^~Gn&ln,_r[8]=fn^~Kr&Qr,_r[9]=wn^~Xr&un,_r[18]=En^~dn&Ir,_r[19]=$n^~Ur&Pr,_r[28]=qn^~mn&_n,_r[29]=Pn^~Fn&kn,_r[38]=Wr^~ao&Mn,_r[39]=cn^~zn&so,_r[48]=Hn^~on&Sn,_r[49]=Gn^~ln&An,_r[0]^=rr[Mr],_r[1]^=rr[Mr+1]};if(Ht)yt.exports=Qt;else for(ur=0;ur<ir.length;++ur)Vt[ir[ur]]=Qt[ir[ur]]})()})(sha3);var sha3Exports=sha3.exports,cjs={};/*! ***************************************************************************** 1507Copyright (c) Microsoft Corporation. 1508 1509Permission to use, copy, modify, and/or distribute this software for any 1510purpose with or without fee is hereby granted. 1511 1512THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 1513REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 1514AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 1515INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 1516LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 1517OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 1518PERFORMANCE OF THIS SOFTWARE. 1519***************************************************************************** */var extendStatics=function(yt,_e){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($t,Ft){$t.__proto__=Ft}||function($t,Ft){for(var Vt in Ft)Ft.hasOwnProperty(Vt)&&($t[Vt]=Ft[Vt])},extendStatics(yt,_e)};function __extends(yt,_e){extendStatics(yt,_e);function $t(){this.constructor=yt}yt.prototype=_e===null?Object.create(_e):($t.prototype=_e.prototype,new $t)}var __assign=function(){return __assign=Object.assign||function(_e){for(var $t,Ft=1,Vt=arguments.length;Ft<Vt;Ft++){$t=arguments[Ft];for(var qt in $t)Object.prototype.hasOwnProperty.call($t,qt)&&(_e[qt]=$t[qt])}return _e},__assign.apply(this,arguments)};function __rest(yt,_e){var $t={};for(var Ft in yt)Object.prototype.hasOwnProperty.call(yt,Ft)&&_e.indexOf(Ft)<0&&($t[Ft]=yt[Ft]);if(yt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Vt=0,Ft=Object.getOwnPropertySymbols(yt);Vt<Ft.length;Vt++)_e.indexOf(Ft[Vt])<0&&Object.prototype.propertyIsEnumerable.call(yt,Ft[Vt])&&($t[Ft[Vt]]=yt[Ft[Vt]]);return $t}function __decorate(yt,_e,$t,Ft){var Vt=arguments.length,qt=Vt<3?_e:Ft===null?Ft=Object.getOwnPropertyDescriptor(_e,$t):Ft,zt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")qt=Reflect.decorate(yt,_e,$t,Ft);else for(var Ht=yt.length-1;Ht>=0;Ht--)(zt=yt[Ht])&&(qt=(Vt<3?zt(qt):Vt>3?zt(_e,$t,qt):zt(_e,$t))||qt);return Vt>3&&qt&&Object.defineProperty(_e,$t,qt),qt}function __param(yt,_e){return function($t,Ft){_e($t,Ft,yt)}}function __metadata(yt,_e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(yt,_e)}function __awaiter(yt,_e,$t,Ft){function Vt(qt){return qt instanceof $t?qt:new $t(function(zt){zt(qt)})}return new($t||($t=Promise))(function(qt,zt){function Ht(Jt){try{Gt(Ft.next(Jt))}catch(Xt){zt(Xt)}}function Kt(Jt){try{Gt(Ft.throw(Jt))}catch(Xt){zt(Xt)}}function Gt(Jt){Jt.done?qt(Jt.value):Vt(Jt.value).then(Ht,Kt)}Gt((Ft=Ft.apply(yt,_e||[])).next())})}function __generator(yt,_e){var $t={label:0,sent:function(){if(qt[0]&1)throw qt[1];return qt[1]}
vendor: 3,837 bytes, line 1519
1519,trys:[],ops:[]},Ft,Vt,qt,zt;return zt={next:Ht(0),throw:Ht(1),return:Ht(2)},typeof Symbol=="function"&&(zt[Symbol.iterator]=function(){return this}),zt;function Ht(Gt){return function(Jt){return Kt([Gt,Jt])}}function Kt(Gt){if(Ft)throw new TypeError("Generator is already executing.");for(;$t;)try{if(Ft=1,Vt&&(qt=Gt[0]&2?Vt.return:Gt[0]?Vt.throw||((qt=Vt.return)&&qt.call(Vt),0):Vt.next)&&!(qt=qt.call(Vt,Gt[1])).done)return qt;switch(Vt=0,qt&&(Gt=[Gt[0]&2,qt.value]),Gt[0]){case 0:case 1:qt=Gt;break;case 4:return $t.label++,{value:Gt[1],done:!1};case 5:$t.label++,Vt=Gt[1],Gt=[0];continue;case 7:Gt=$t.ops.pop(),$t.trys.pop();continue;default:if(qt=$t.trys,!(qt=qt.length>0&&qt[qt.length-1])&&(Gt[0]===6||Gt[0]===2)){$t=0;continue}if(Gt[0]===3&&(!qt||Gt[1]>qt[0]&&Gt[1]<qt[3])){$t.label=Gt[1];break}if(Gt[0]===6&&$t.label<qt[1]){$t.label=qt[1],qt=Gt;break}if(qt&&$t.label<qt[2]){$t.label=qt[2],$t.ops.push(Gt);break}qt[2]&&$t.ops.pop(),$t.trys.pop();continue}Gt=_e.call(yt,$t)}catch(Jt){Gt=[6,Jt],Vt=0}finally{Ft=qt=0}if(Gt[0]&5)throw Gt[1];return{value:Gt[0]?Gt[1]:void 0,done:!0}}}function __createBinding(yt,_e,$t,Ft){Ft===void 0&&(Ft=$t),yt[Ft]=_e[$t]}function __exportStar(yt,_e){for(var $t in yt)$t!=="default"&&!_e.hasOwnProperty($t)&&(_e[$t]=yt[$t])}function __values$1(yt){var _e=typeof Symbol=="function"&&Symbol.iterator,$t=_e&&yt[_e],Ft=0;if($t)return $t.call(yt);if(yt&&typeof yt.length=="number")return{next:function(){return yt&&Ft>=yt.length&&(yt=void 0),{value:yt&&yt[Ft++],done:!yt}}};throw new TypeError(_e?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(yt,_e){var $t=typeof Symbol=="function"&&yt[Symbol.iterator];if(!$t)return yt;var Ft=$t.call(yt),Vt,qt=[],zt;try{for(;(_e===void 0||_e-- >0)&&!(Vt=Ft.next()).done;)qt.push(Vt.value)}catch(Ht){zt={error:Ht}}finally{try{Vt&&!Vt.done&&($t=Ft.return)&&$t.call(Ft)}finally{if(zt)throw zt.error}}return qt}function __spread(){for(var yt=[],_e=0;_e<arguments.length;_e++)yt=yt.concat(__read(arguments[_e]));return yt}function __spreadArrays(){for(var yt=0,_e=0,$t=arguments.length;_e<$t;_e++)yt+=arguments[_e].length;for(var Ft=Array(yt),Vt=0,_e=0;_e<$t;_e++)for(var qt=arguments[_e],zt=0,Ht=qt.length;zt<Ht;zt++,Vt++)Ft[Vt]=qt[zt];return Ft}function __await(yt){return this instanceof __await?(this.v=yt,this):new __await(yt)}function __asyncGenerator(yt,_e,$t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Ft=$t.apply(yt,_e||[]),Vt,qt=[];return Vt={},zt("next"),zt("throw"),zt("return"),Vt[Symbol.asyncIterator]=function(){return this},Vt;function zt(Zt){Ft[Zt]&&(Vt[Zt]=function(er){return new Promise(function(tr,rr){qt.push([Zt,er,tr,rr])>1||Ht(Zt,er)})})}function Ht(Zt,er){try{Kt(Ft[Zt](er))}catch(tr){Xt(qt[0][3],tr)}}function Kt(Zt){Zt.value instanceof __await?Promise.resolve(Zt.value.v).then(Gt,Jt):Xt(qt[0][2],Zt)}function Gt(Zt){Ht("next",Zt)}function Jt(Zt){Ht("throw",Zt)}function Xt(Zt,er){Zt(er),qt.shift(),qt.length&&Ht(qt[0][0],qt[0][1])}}function __asyncDelegator(yt){var _e,$t;return _e={},Ft("next"),Ft("throw",function(Vt){throw Vt}),Ft("return"),_e[Symbol.iterator]=function(){return this},_e;function Ft(Vt,qt){_e[Vt]=yt[Vt]?function(zt){return($t=!$t)?{value:__await(yt[Vt](zt)),done:Vt==="return"}:qt?qt(zt):zt}:qt}}function __asyncValues(yt){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var _e=yt[Symbol.asyncIterator],$t;return _e?_e.call(yt):(yt=typeof __values$1=="function"?__values$1(yt):yt[Symbol.iterator](),$t={},Ft("next"),Ft("throw"),Ft("return"),$t[Symbol.asyncIterator]=function(){return this},$t);function Ft(qt){$t[qt]=yt[qt]&&function(zt){return new Promise(function(Ht,Kt){zt=yt[qt](zt),Vt(Ht,Kt,zt.done,zt.value)})}}function Vt(qt,zt,Ht,Kt){Promise.resolve(Kt).then(function(Gt){qt({value:Gt,done:Ht})},zt)}}
1519function __makeTemplateObject(yt,_e){return Object.defineProperty?Object.defineProperty(yt,"raw",{value:_e}):yt.raw=_e,yt}function __importStar(yt){if(yt&&yt.__esModule)return yt;var _e={};if(yt!=null)for(var $t in yt)Object.hasOwnProperty.call(yt,$t)&&(_e[$t]=yt[$t]);return _e.default=yt,_e}function __importDefault(yt){return yt&&yt.__esModule?yt:{default:yt}}function __classPrivateFieldGet(yt,_e){if(!_e.has(yt))throw new TypeError("attempted to get private field on non-instance");return _e.get(yt)}function __classPrivateFieldSet(yt,_e,$t){if(!_e.has(yt))throw new TypeError("attempted to set private field on non-instance");return _e.set(yt,$t),$t}const tslib_es6=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return __assign},__asyncDelegator,__asyncGenerator,__asyncValues,__await,__awaiter,__classPrivateFieldGet,__classPrivateFieldSet,__createBinding,__decorate,__exportStar,__extends,__generator,__importDefault,__importStar,__makeTemplateObject,__metadata,__param,__read,__rest,__spread,__spreadArrays,__values:__values$1},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(tslib_es6);var crypto$1={},hasRequiredCrypto;function requireCrypto(){if(hasRequiredCrypto)return crypto$1;hasRequiredCrypto=1,Object.defineProperty(crypto$1,"__esModule",{value:!0}),crypto$1.isBrowserCryptoAvailable=crypto$1.getSubtleCrypto=crypto$1.getBrowerCrypto=void 0;function yt(){return(globalThis==null?void 0:globalThis.crypto)||(globalThis==null?void 0:globalThis.msCrypto)||{}}crypto$1.getBrowerCrypto=yt;function _e(){const Ft=yt();return Ft.subtle||Ft.webkitSubtle}crypto$1.getSubtleCrypto=_e;function $t(){return!!yt()&&!!_e()}return crypto$1.isBrowserCryptoAvailable=$t,crypto$1}var env={},hasRequiredEnv;function requireEnv(){if(hasRequiredEnv)return env;hasRequiredEnv=1,Object.defineProperty(env,"__esModule",{value:!0}),env.isBrowser=env.isNode=env.isReactNative=void 0;function yt(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}env.isReactNative=yt;function _e(){return typeof process$1<"u"&&typeof process$1.versions<"u"&&typeof process$1.versions.node<"u"}env.isNode=_e;function $t(){return!yt()&&!_e()}return env.isBrowser=$t,env}(function(yt){Object.defineProperty(yt,"__esModule",{value:!0});const _e=require$$0;_e.__exportStar(requireCrypto(),yt),_e.__exportStar(requireEnv(),yt)})(cjs);function payloadId$1(yt=3){const _e=Date.now()*Math.pow(10,yt),$t=Math.floor(Math.random()*Math.pow(10,yt));return _e+$t}function sanitizeHex(yt){return sanitizeHex$1(yt)}function removeHexLeadingZeros(yt){return removeHexLeadingZeros$1(addHexPrefix(yt))}const payloadId=payloadId$1;function uuid(){return((_e,$t)=>{for($t=_e="";_e++<36;$t+=_e*51&52?(_e^15?8^Math.random()*(_e^20?16:4):4).toString(16):"-");return $t})()}function isEmptyString(yt){return yt===""||typeof yt=="string"&&yt.trim()===""}function isEmptyArray(yt){return!(yt&&yt.length)}function isHexString(yt,_e){return isHexString$1(yt)}function isJsonRpcRequest(yt){return typeof yt.method<"u"}function isJsonRpcResponseSuccess(yt){return typeof yt.result<"u"}function isJsonRpcResponseError(yt){return typeof yt.error<"u"}function isInternalEvent(yt){return typeof yt.event<"u"}function isReservedEvent(yt){return reservedEvents.includes(yt)||yt.startsWith("wc_")}function isSilentPayload(yt){return yt.method.startsWith("wc_")?!0:!signingMethods.includes(yt.method)}function toChecksumAddress(yt){yt=removeHexPrefix(yt.toLowerCase());const _e=removeHexPrefix(sha3Exports.keccak_256(convertUtf8ToBuffer(yt)));let $t="";for(let Ft=0;Ft<yt.length;Ft++)parseInt(_e[Ft],16)>7?$t+=yt[Ft].toUpperCase():$t+=yt[Ft];return addHexPrefix($t)}const isValidAddress=yt=>yt?yt.toLowerCase().substring(0,2)!=="0x"?!1:/^(0x)?[0-9a-f]{40}$/i.test(yt)?/^(0x)?[0-9a-f]{40}$/.test(yt)||/^(0x)?[0-9A-F]{40}$/.test(yt)?!0:yt===toChecksumAddress(yt):!1:!1;function parsePersonalSign(yt){return!isEmptyArray(yt)&&!isHexString(yt[0])&&(yt[0]=convertUtf8ToHex(yt[0])),yt}function parseTransactionData(yt){if(typeof yt.type<"u"&&yt.type!=="0")return yt;if(typeof yt.from>"u"||!isValidAddress(yt.from))throw new Error("Transaction object must include a valid 'from' value.");function _e(Vt){let qt=Vt;return(typeof Vt=="number"||typeof Vt=="string"&&!isEmptyString(Vt))&&(isHexString(Vt)?typeof Vt=="string"&&(qt=sanitizeHex(Vt)):qt=convertNumberToHex(Vt)),typeof qt=="string"&&(qt=removeHexLeadingZeros(qt)),qt}const $t={from:sanitizeHex(yt.from),to:typeof yt.to>"u"?void 0:sanitizeHex(yt.to),gasPrice:typeof yt.gasPrice>"u"?"":_e(yt.gasPrice),gas:typeof yt.gas>"u"?typeof yt.gasLimit>"u"?"":_e(yt.gasLimit):_e(yt.gas),value:typeof yt.value>"u"?"":_e(yt.value),nonce:typeof yt.nonce>"u"?"":_e(yt.nonce),data:typeof yt.data>"u"?"":sanitizeHex(yt.data)||"0x"},Ft=["gasPrice","gas","value","nonce"];return Object.keys($t).forEach(Vt=>{(typeof $t[Vt]>"u"||typeof $t[Vt]=="string"&&!$t[Vt].trim().length)&&Ft.includes(Vt)&&delete $t[Vt]}),$t}function formatRpcError(yt){const _e=yt.message||"Failed or Rejected Request";let $t=-32e3;if(yt&&!yt.code)switch(_e){case"Parse error":$t=-32700;break;case"Invalid request":$t=-32600;break;case"Method not found":$t=-32601;break;case"Invalid params":$t=-32602;break;case"Internal error":$t=-32603;break;default:$t=-32e3;break}const Ft={code:$t,message:_e};return yt.data&&(Ft.data=yt.data),Ft}var queryString={},strictUriEncode=yt=>encodeURIComponent(yt).replace(/[!'()*]/g,_e=>`%${_e.charCodeAt(0).toString(16).toUpperCase()}`),token="%[a-f0-9]{2}",singleMatcher=new RegExp("("+token+")|([^%]+?)","gi"),multiMatcher=new RegExp("("+token+")+","gi");function decodeComponents(yt,_e){try{return[decodeURIComponent(yt.join(""))]}catch{}if(yt.length===1)return yt;_e=_e||1;var $t=yt.slice(0,_e),Ft=yt.slice(_e);return Array.prototype.concat.call([],decodeComponents($t),decodeComponents(Ft))}function decode(yt){try{return decodeURIComponent(yt)}catch{for(var _e=yt.match(singleMatcher)||[],$t=1;$t<_e.length;$t++)yt=decodeComponents(_e,$t).join(""),_e=yt.match(singleMatcher)||[];return yt}}function customDecodeURIComponent(yt){for(var _e={"%FE%FF":"��","%FF%FE":"��"},$t=multiMatcher.exec(yt);$t;){try{_e[$t[0]]=decodeURIComponent($t[0])}catch{var Ft=decode($t[0]);Ft!==$t[0]&&(_e[$t[0]]=Ft)}$t=multiMatcher.exec(yt)}_e["%C2"]="�";for(var Vt=Object.keys(_e),qt=0;qt<Vt.length;qt++){var zt=Vt[qt];yt=yt.replace(new RegExp(zt,"g"),_e[zt])}return yt}var decodeUriComponent=function(yt){if(typeof yt!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof yt+"`");try{return yt=yt.replace(/\+/g," "),decodeURIComponent(yt)}catch{return customDecodeURIComponent(yt)}},splitOnFirst=(yt,_e)=>{if(!(typeof yt=="string"&&typeof _e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(_e==="")return[yt];const $t=yt.indexOf(_e);return $t===-1?[yt]:[yt.slice(0,$t),yt.slice($t+_e.length)]};(function(yt){const _e=strictUriEncode,$t=decodeUriComponent,Ft=splitOnFirst,Vt=ar=>ar==null;function qt(ar){switch(ar.arrayFormat){case"index":return nr=>(cr,fr)=>{const vr=cr.length;return fr===void 0||ar.skipNull&&fr===null||ar.skipEmptyString&&fr===""?cr:fr===null?[...cr,[Kt(nr,ar),"[",vr,"]"].join("")]:[...cr,[Kt(nr,ar),"[",
1519Kt(vr,ar),"]=",Kt(fr,ar)].join("")]};case"bracket":return nr=>(cr,fr)=>fr===void 0||ar.skipNull&&fr===null||ar.skipEmptyString&&fr===""?cr:fr===null?[...cr,[Kt(nr,ar),"[]"].join("")]:[...cr,[Kt(nr,ar),"[]=",Kt(fr,ar)].join("")];case"comma":case"separator":return nr=>(cr,fr)=>fr==null||fr.length===0?cr:cr.length===0?[[Kt(nr,ar),"=",Kt(fr,ar)].join("")]:[[cr,Kt(fr,ar)].join(ar.arrayFormatSeparator)];default:return nr=>(cr,fr)=>fr===void 0||ar.skipNull&&fr===null||ar.skipEmptyString&&fr===""?cr:fr===null?[...cr,Kt(nr,ar)]:[...cr,[Kt(nr,ar),"=",Kt(fr,ar)].join("")]}}function zt(ar){let nr;switch(ar.arrayFormat){case"index":return(cr,fr,vr)=>{if(nr=/\[(\d*)\]$/.exec(cr),cr=cr.replace(/\[\d*\]$/,""),!nr){vr[cr]=fr;return}vr[cr]===void 0&&(vr[cr]={}),vr[cr][nr[1]]=fr};case"bracket":return(cr,fr,vr)=>{if(nr=/(\[\])$/.exec(cr),cr=cr.replace(/\[\]$/,""),!nr){vr[cr]=fr;return}if(vr[cr]===void 0){vr[cr]=[fr];return}vr[cr]=[].concat(vr[cr],fr)};case"comma":case"separator":return(cr,fr,vr)=>{const Sr=typeof fr=="string"&&fr.split("").indexOf(ar.arrayFormatSeparator)>-1?fr.split(ar.arrayFormatSeparator).map(Tr=>Gt(Tr,ar)):fr===null?fr:Gt(fr,ar);vr[cr]=Sr};default:return(cr,fr,vr)=>{if(vr[cr]===void 0){vr[cr]=fr;return}vr[cr]=[].concat(vr[cr],fr)}}}function Ht(ar){if(typeof ar!="string"||ar.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Kt(ar,nr){return nr.encode?nr.strict?_e(ar):encodeURIComponent(ar):ar}function Gt(ar,nr){return nr.decode?$t(ar):ar}function Jt(ar){return Array.isArray(ar)?ar.sort():typeof ar=="object"?Jt(Object.keys(ar)).sort((nr,cr)=>Number(nr)-Number(cr)).map(nr=>ar[nr]):ar}function Xt(ar){const nr=ar.indexOf("#");return nr!==-1&&(ar=ar.slice(0,nr)),ar}function Zt(ar){let nr="";const cr=ar.indexOf("#");return cr!==-1&&(nr=ar.slice(cr)),nr}function er(ar){ar=Xt(ar);const nr=ar.indexOf("?");return nr===-1?"":ar.slice(nr+1)}function tr(ar,nr){return nr.parseNumbers&&!Number.isNaN(Number(ar))&&typeof ar=="string"&&ar.trim()!==""?ar=Number(ar):nr.parseBooleans&&ar!==null&&(ar.toLowerCase()==="true"||ar.toLowerCase()==="false")&&(ar=ar.toLowerCase()==="true"),ar}function rr(ar,nr){nr=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},nr),Ht(nr.arrayFormatSeparator);const cr=zt(nr),fr=Object.create(null);if(typeof ar!="string"||(ar=ar.trim().replace(/^[?#&]/,""),!ar))return fr;for(const vr of ar.split("&")){let[xr,Sr]=Ft(nr.decode?vr.replace(/\+/g," "):vr,"=");Sr=Sr===void 0?null:["comma","separator"].includes(nr.arrayFormat)?Sr:Gt(Sr,nr),cr(Gt(xr,nr),Sr,fr)}for(const vr of Object.keys(fr)){const xr=fr[vr];if(typeof xr=="object"&&xr!==null)for(const Sr of Object.keys(xr))xr[Sr]=tr(xr[Sr],nr);else fr[vr]=tr(xr,nr)}return nr.sort===!1?fr:(nr.sort===!0?Object.keys(fr).sort():Object.keys(fr).sort(nr.sort)).reduce((vr,xr)=>{const Sr=fr[xr];return Sr&&typeof Sr=="object"&&!Array.isArray(Sr)?vr[xr]=Jt(Sr):vr[xr]=Sr,vr},Object.create(null))}yt.extract=er,yt.parse=rr,yt.stringify=(ar,nr)=>{if(!ar)return"";nr=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},nr),Ht(nr.arrayFormatSeparator);const cr=Sr=>nr.skipNull&&Vt(ar[Sr])||nr.skipEmptyString&&ar[Sr]==="",fr=qt(nr),vr={};for(const Sr of Object.keys(ar))cr(Sr)||(vr[Sr]=ar[Sr]);const xr=Object.keys(vr);return nr.sort!==!1&&xr.sort(nr.sort),xr.map(Sr=>{const Tr=ar[Sr];return Tr===void 0?"":Tr===null?Kt(Sr,nr):Array.isArray(Tr)?Tr.reduce(fr(Sr),[]).join("&"):Kt(Sr,nr)+"="+Kt(Tr,nr)}).filter(Sr=>Sr.length>0).join("&")},yt.parseUrl=(ar,nr)=>{nr=Object.assign({decode:!0},nr);const[cr,fr]=Ft(ar,"#");return Object.assign({url:cr.split("?")[0]||"",query:rr(er(ar),nr)},nr&&nr.parseFragmentIdentifier&&fr?{fragmentIdentifier:Gt(fr,nr)}:{})},yt.stringifyUrl=(ar,nr)=>{nr=Object.assign({encode:!0,strict:!0},nr);const cr=Xt(ar.url).split("?")[0]||"",fr=yt.extract(ar.url),vr=yt.parse(fr,{sort:!1}),xr=Object.assign(vr,ar.query);let Sr=yt.stringify(xr,nr);Sr&&(Sr=`?${Sr}`);let Tr=Zt(ar.url);return ar.fragmentIdentifier&&(Tr=`#${Kt(ar.fragmentIdentifier,nr)}`),`${cr}${Sr}${Tr}`}})(queryString);function getQueryString(yt){const _e=yt.indexOf("?")!==-1?yt.indexOf("?"):void 0;return typeof _e<"u"?yt.substr(_e):""}function appendToQueryString(yt,_e){let $t=parseQueryString(yt);return $t=Object.assign(Object.assign({},$t),_e),yt=formatQueryString($t),yt}function parseQueryString(yt){return queryString.parse(yt)}function formatQueryString(yt){return queryString.stringify(yt)}function isWalletConnectSession(yt){return typeof yt.bridge<"u"}
1519function parseWalletConnectUri(yt){const _e=yt.indexOf(":"),$t=yt.indexOf("?")!==-1?yt.indexOf("?"):void 0,Ft=yt.substring(0,_e),Vt=yt.substring(_e+1,$t);function qt(Xt){const er=Xt.split("@");return{handshakeTopic:er[0],version:parseInt(er[1],10)}}const zt=qt(Vt),Ht=typeof $t<"u"?yt.substr($t):"";function Kt(Xt){const Zt=parseQueryString(Xt);return{key:Zt.key||"",bridge:Zt.bridge||""}}const Gt=Kt(Ht);return Object.assign(Object.assign({protocol:Ft},zt),Gt)}class NetworkMonitor{constructor(){this._eventEmitters=[],typeof window<"u"&&typeof window.addEventListener<"u"&&(window.addEventListener("online",()=>this.trigger("online")),window.addEventListener("offline",()=>this.trigger("offline")))}on(_e,$t){this._eventEmitters.push({event:_e,callback:$t})}trigger(_e){let $t=[];_e&&($t=this._eventEmitters.filter(Ft=>Ft.event===_e)),$t.forEach(Ft=>{Ft.callback()})}}const WS=typeof globalThis.WebSocket<"u"?globalThis.WebSocket:require("ws");class SocketTransport{constructor(_e){if(this.opts=_e,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=_e.protocol,this._version=_e.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=_e.subscriptions||[],this._netMonitor=_e.netMonitor||new NetworkMonitor,!_e.url||typeof _e.url!="string")throw new Error("Missing or invalid WebSocket url");this._url=_e.url,this._netMonitor.on("online",()=>this._socketCreate())}set readyState(_e){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(_e){}get connecting(){return this.readyState===0}set connected(_e){}get connected(){return this.readyState===1}set closing(_e){}get closing(){return this.readyState===2}set closed(_e){}get closed(){return this.readyState===3}open(){this._socketCreate()}close(){this._socketClose()}send(_e,$t,Ft){if(!$t||typeof $t!="string")throw new Error("Missing or invalid topic field");this._socketSend({topic:$t,type:"pub",payload:_e,silent:!!Ft})}subscribe(_e){this._socketSend({topic:_e,type:"sub",payload:"",silent:!0})}on(_e,$t){this._events.push({event:_e,callback:$t})}_socketCreate(){if(this._nextSocket)return;const _e=getWebSocketUrl(this._url,this._protocol,this._version);if(this._nextSocket=new WS(_e),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=$t=>this._socketReceive($t),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=$t=>this._socketError($t),this._nextSocket.onclose=()=>{setTimeout(()=>{this._nextSocket=null,this._socketCreate()},1e3)}}_socketOpen(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue()}_socketClose(){this._socket&&(this._socket.onclose=()=>{},this._socket.close())}_socketSend(_e){const $t=JSON.stringify(_e);this._socket&&this._socket.readyState===1?this._socket.send($t):(this._setToQueue(_e),this._socketCreate())}async _socketReceive(_e){let $t;try{$t=JSON.parse(_e.data)}catch{return}if(this._socketSend({topic:$t.topic,type:"ack",payload:"",silent:!0}),this._socket&&this._socket.readyState===1){const Ft=this._events.filter(Vt=>Vt.event==="message");Ft&&Ft.length&&Ft.forEach(Vt=>Vt.callback($t))}}_socketError(_e){const $t=this._events.filter(Ft=>Ft.event==="error");$t&&$t.length&&$t.forEach(Ft=>Ft.callback(_e))}_queueSubscriptions(){this._subscriptions.forEach($t=>this._queue.push({topic:$t,type:"sub",payload:"",silent:!0})),this._subscriptions=this.opts.subscriptions||[]}_setToQueue(_e){this._queue.push(_e)}_pushQueue(){this._queue.forEach($t=>this._socketSend($t)),this._queue=[]}}function getWebSocketUrl(yt,_e,$t){var Ft,Vt;const zt=(yt.startsWith("https")?yt.replace("https","wss"):yt.startsWith("http")?yt.replace("http","ws"):yt).split("?"),Ht=isBrowser()?{protocol:_e,version:$t,env:"browser",host:((Ft=getLocation())===null||Ft===void 0?void 0:Ft.host)||""}:{protocol:_e,version:$t,env:((Vt=detectEnv())===null||Vt===void 0?void 0:Vt.name)||""},Kt=appendToQueryString(getQueryString(zt[1]||""),Ht);return zt[0]+"?"+Kt}const ERROR_SESSION_CONNECTED="Session currently connected",ERROR_SESSION_DISCONNECTED="Session currently disconnected",ERROR_SESSION_REJECTED="Session Rejected",ERROR_MISSING_JSON_RPC="Missing JSON RPC response",ERROR_MISSING_RESULT='JSON-RPC success response must include "result" field',ERROR_MISSING_ERROR='JSON-RPC error response must include "error" field',ERROR_MISSING_METHOD='JSON RPC request must have valid "method" value',ERROR_MISSING_ID='JSON RPC request must have valid "id" value',ERROR_MISSING_REQUIRED="Missing one of the required parameters: bridge / uri / session",ERROR_INVALID_RESPONSE="JSON RPC response format is invali
1519d",ERROR_INVALID_URI="URI format is invalid",ERROR_QRCODE_MODAL_NOT_PROVIDED="QRCode Modal not provided",ERROR_QRCODE_MODAL_USER_CLOSED="User close QRCode Modal";class EventManager{constructor(){this._eventEmitters=[]}subscribe(_e){this._eventEmitters.push(_e)}unsubscribe(_e){this._eventEmitters=this._eventEmitters.filter($t=>$t.event!==_e)}trigger(_e){let $t=[],Ft;isJsonRpcRequest(_e)?Ft=_e.method:isJsonRpcResponseSuccess(_e)||isJsonRpcResponseError(_e)?Ft=`response:${_e.id}`:isInternalEvent(_e)?Ft=_e.event:Ft="",Ft&&($t=this._eventEmitters.filter(Vt=>Vt.event===Ft)),(!$t||!$t.length)&&!isReservedEvent(Ft)&&!isInternalEvent(Ft)&&($t=this._eventEmitters.filter(Vt=>Vt.event==="call_request")),$t.forEach(Vt=>{if(isJsonRpcResponseError(_e)){const qt=new Error(_e.error.message);Vt.callback(qt,null)}else Vt.callback(null,_e)})}}class SessionStorage{constructor(_e="walletconnect"){this.storageId=_e}getSession(){let _e=null;const $t=getLocal(this.storageId);return $t&&isWalletConnectSession($t)&&(_e=$t),_e}setSession(_e){return setLocal(this.storageId,_e),_e}removeSession(){removeLocal(this.storageId)}}const domain="walletconnect.org",alphanumerical="abcdefghijklmnopqrstuvwxyz0123456789",bridges=alphanumerical.split("").map(yt=>`https://${yt}.bridge.walletconnect.org`);function extractHostname(yt){let _e=yt.indexOf("//")>-1?yt.split("/")[2]:yt.split("/")[0];return _e=_e.split(":")[0],_e=_e.split("?")[0],_e}function extractRootDomain(yt){return extractHostname(yt).split(".").slice(-2).join(".")}function randomBridgeIndex(){return Math.floor(Math.random()*bridges.length)}function selectRandomBridgeUrl(){return bridges[randomBridgeIndex()]}function shouldSelectRandomly(yt){return extractRootDomain(yt)===domain}function getBridgeUrl(yt){return shouldSelectRandomly(yt)?selectRandomBridgeUrl():yt}class Connector{constructor(_e){if(this.protocol="wc",this.version=1,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId=0,this._networkId=0,this._rpcUrl="",this._eventManager=new EventManager,this._clientMeta=getClientMeta()||_e.connectorOpts.clientMeta||null,this._cryptoLib=_e.cryptoLib,this._sessionStorage=_e.sessionStorage||new SessionStorage(_e.connectorOpts.storageId),this._qrcodeModal=_e.connectorOpts.qrcodeModal,this._qrcodeModalOptions=_e.connectorOpts.qrcodeModalOptions,this._signingMethods=[...signingMethods,..._e.connectorOpts.signingMethods||[]],!_e.connectorOpts.bridge&&!_e.connectorOpts.uri&&!_e.connectorOpts.session)throw new Error(ERROR_MISSING_REQUIRED);_e.connectorOpts.bridge&&(this.bridge=getBridgeUrl(_e.connectorOpts.bridge)),_e.connectorOpts.uri&&(this.uri=_e.connectorOpts.uri);const $t=_e.connectorOpts.session||this._getStorageSession();$t&&(this.session=$t),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=_e.transport||new SocketTransport({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),_e.connectorOpts.uri&&this._subscribeToSessionRequest(),_e.pushServerOpts&&this._registerPushServer(_e.pushServerOpts)}set bridge(_e){_e&&(this._bridge=_e)}get bridge(){return this._bridge}set key(_e){if(!_e)return;const $t=convertHexToArrayBuffer(_e);this._key=$t}get key(){return this._key?convertArrayBufferToHex(this._key,!0):""}set clientId(_e){_e&&(this._clientId=_e)}get clientId(){let _e=this._clientId;return _e||(_e=this._clientId=uuid()),this._clientId}set peerId(_e){_e&&(this._peerId=_e)}get peerId(){return this._peerId}set clientMeta(_e){}get clientMeta(){let _e=this._clientMeta;return _e||(_e=this._clientMeta=getClientMeta()),_e}set peerMeta(_e){this._peerMeta=_e}get peerMeta(){return this._peerMeta}set handshakeTopic(_e){_e&&(this._handshakeTopic=_e)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(_e){_e&&(this._handshakeId=_e)}get handshakeId(){return this._handshakeId}get uri(){return this._formatUri()}set uri(_e){if(!_e)return;const{handshakeTopic:$t,bridge:Ft,key:Vt}=this._parseUri(_e);this.handshakeTopic=$t,this.bridge=Ft,this.key=Vt}set chainId(_e){this._chainId=_e}
1519get chainId(){return this._chainId}set networkId(_e){this._networkId=_e}get networkId(){return this._networkId}set accounts(_e){this._accounts=_e}get accounts(){return this._accounts}set rpcUrl(_e){this._rpcUrl=_e}get rpcUrl(){return this._rpcUrl}set connected(_e){}get connected(){return this._connected}set pending(_e){}get pending(){return!!this._handshakeTopic}get session(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(_e){_e&&(this._connected=_e.connected,this.accounts=_e.accounts,this.chainId=_e.chainId,this.bridge=_e.bridge,this.key=_e.key,this.clientId=_e.clientId,this.clientMeta=_e.clientMeta,this.peerId=_e.peerId,this.peerMeta=_e.peerMeta,this.handshakeId=_e.handshakeId,this.handshakeTopic=_e.handshakeTopic)}on(_e,$t){const Ft={event:_e,callback:$t};this._eventManager.subscribe(Ft)}off(_e){this._eventManager.unsubscribe(_e)}async createInstantRequest(_e){this._key=await this._generateKey();const $t=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(_e)}]});this.handshakeId=$t.id,this.handshakeTopic=uuid(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",()=>{throw new Error(ERROR_QRCODE_MODAL_USER_CLOSED)});const Ft=()=>{this.killSession()};try{const Vt=await this._sendCallRequest($t);return Vt&&Ft(),Vt}catch(Vt){throw Ft(),Vt}}async connect(_e){if(!this._qrcodeModal)throw new Error(ERROR_QRCODE_MODAL_NOT_PROVIDED);return this.connected?{chainId:this.chainId,accounts:this.accounts}:(await this.createSession(_e),new Promise(async($t,Ft)=>{this.on("modal_closed",()=>Ft(new Error(ERROR_QRCODE_MODAL_USER_CLOSED))),this.on("connect",(Vt,qt)=>{if(Vt)return Ft(Vt);$t(qt.params[0])})}))}async createSession(_e){if(this._connected)throw new Error(ERROR_SESSION_CONNECTED);if(this.pending)return;this._key=await this._generateKey();const $t=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:_e&&_e.chainId?_e.chainId:null}]});this.handshakeId=$t.id,this.handshakeTopic=uuid(),this._sendSessionRequest($t,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]})}approveSession(_e){if(this._connected)throw new Error(ERROR_SESSION_CONNECTED);this.chainId=_e.chainId,this.accounts=_e.accounts,this.networkId=_e.networkId||0,this.rpcUrl=_e.rpcUrl||"";const $t={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta},Ft={id:this.handshakeId,jsonrpc:"2.0",result:$t};this._sendResponse(Ft),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})}rejectSession(_e){if(this._connected)throw new Error(ERROR_SESSION_CONNECTED);const $t=_e&&_e.message?_e.message:ERROR_SESSION_REJECTED,Ft=this._formatResponse({id:this.handshakeId,error:{message:$t}});this._sendResponse(Ft),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:$t}]}),this._removeStorageSession()}updateSession(_e){if(!this._connected)throw new Error(ERROR_SESSION_DISCONNECTED);this.chainId=_e.chainId,this.accounts=_e.accounts,this.networkId=_e.networkId||0,this.rpcUrl=_e.rpcUrl||"";const $t={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},Ft=this._formatRequest({method:"wc_sessionUpdate",params:[$t]});this._sendSessionRequest(Ft,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}async killSession(_e){const $t=_e?_e.message:"Session Disconnected",Ft={approved:!1,chainId:null,networkId:null,accounts:null},Vt=this._formatRequest({method:"wc_sessionUpdate",params:[Ft]});await this._sendRequest(Vt),this._handleSessionDisconnect($t)}async sendTransaction(_e){if(!this._connected)throw new Error(ERROR_SESSION_DISCONNECTED);const $t=parseTransactionData(_e),Ft=this._formatRequest({method:"eth_sendTransaction",params:[$t]});return await this._sendCallRequest(Ft)}async signTransaction(_e){if(!this._connected)throw new Error(ERROR_SESSION_DISCONNECTED);const $t=parseTransactionData(_e),Ft=this._formatRequest({method:"eth_signTransaction",params:[$t]});return await this._sendCallRequest(Ft)}async signMessage(_e){if(!this._connected)throw new Error(ERROR_SESSION_DISCONNECTED);const $t=this._formatRequest({method:"eth_sign",params:_e});return await this._sendCallRequest($t)}async signPersonalMessage(_e){if(!this._connected)throw new Error(ERROR_SESSION_DISCONNECTED);_e=parsePersonalSign(_e);const $t=this._formatRequest({method:"personal_sign",params:_e});return await this._sendCallRequest($t)}async signTypedData(_e){if(!this._connected)throw new Error(ERROR_SESSION_DISCONNECTED);const $t=this._formatRequest({method:"eth_signTypedData",params:_e});return await this._sendCallRequest($t)}async updateChain(_e){if(!this._connected)throw new Error("Session currently disconnected");const $t=this._formatRequest({method:"wallet_updateChain",params:[_e]});return await this._sendCallRequest($t)}unsafeSend(_e,$t){return this._sendRequest(_e,$t),this._eventManager.trigger({event:"call_request_sent",params:[{request:_e,options:$t}]}),new Promise((Ft,Vt)=>{this._subscribeToResponse(_e.id,(qt,zt)=>{if(qt){Vt(qt);return}if(!zt)throw new Error(ERROR_MISSING_JSON_RPC);Ft(zt)})})}
1519async sendCustomRequest(_e,$t){if(!this._connected)throw new Error(ERROR_SESSION_DISCONNECTED);switch(_e.method){case"eth_accounts":return this.accounts;case"eth_chainId":return convertNumberToHex(this.chainId);case"eth_sendTransaction":case"eth_signTransaction":_e.params&&(_e.params[0]=parseTransactionData(_e.params[0]));break;case"personal_sign":_e.params&&(_e.params=parsePersonalSign(_e.params));break}const Ft=this._formatRequest(_e);return await this._sendCallRequest(Ft,$t)}approveRequest(_e){if(isJsonRpcResponseSuccess(_e)){const $t=this._formatResponse(_e);this._sendResponse($t)}else throw new Error(ERROR_MISSING_RESULT)}rejectRequest(_e){if(isJsonRpcResponseError(_e)){const $t=this._formatResponse(_e);this._sendResponse($t)}else throw new Error(ERROR_MISSING_ERROR)}transportClose(){this._transport.close()}async _sendRequest(_e,$t){const Ft=this._formatRequest(_e),Vt=await this._encrypt(Ft),qt=typeof($t==null?void 0:$t.topic)<"u"?$t.topic:this.peerId,zt=JSON.stringify(Vt),Ht=typeof($t==null?void 0:$t.forcePushNotification)<"u"?!$t.forcePushNotification:isSilentPayload(Ft);this._transport.send(zt,qt,Ht)}async _sendResponse(_e){const $t=await this._encrypt(_e),Ft=this.peerId,Vt=JSON.stringify($t);this._transport.send(Vt,Ft,!0)}async _sendSessionRequest(_e,$t,Ft){this._sendRequest(_e,Ft),this._subscribeToSessionResponse(_e.id,$t)}_sendCallRequest(_e,$t){return this._sendRequest(_e,$t),this._eventManager.trigger({event:"call_request_sent",params:[{request:_e,options:$t}]}),this._subscribeToCallResponse(_e.id)}_formatRequest(_e){if(typeof _e.method>"u")throw new Error(ERROR_MISSING_METHOD);return{id:typeof _e.id>"u"?payloadId():_e.id,jsonrpc:"2.0",method:_e.method,params:typeof _e.params>"u"?[]:_e.params}}_formatResponse(_e){if(typeof _e.id>"u")throw new Error(ERROR_MISSING_ID);const $t={id:_e.id,jsonrpc:"2.0"};if(isJsonRpcResponseError(_e)){const Ft=formatRpcError(_e.error);return Object.assign(Object.assign(Object.assign({},$t),_e),{error:Ft})}else if(isJsonRpcResponseSuccess(_e))return Object.assign(Object.assign({},$t),_e);throw new Error(ERROR_INVALID_RESPONSE)}_handleSessionDisconnect(_e){const $t=_e||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),removeLocal(mobileLinkCh
1519oiceKey)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._peerId&&(this._peerId=""),this._eventManager.trigger({event:"disconnect",params:[{message:$t}]}),this._removeStorageSession(),this.transportClose()}_handleSessionResponse(_e,$t){$t?$t.approved?(this._connected?($t.chainId&&(this.chainId=$t.chainId),$t.accounts&&(this.accounts=$t.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,$t.chainId&&(this.chainId=$t.chainId),$t.accounts&&(this.accounts=$t.accounts),$t.peerId&&!this.peerId&&(this.peerId=$t.peerId),$t.peerMeta&&!this.peerMeta&&(this.peerMeta=$t.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(_e):this._handleSessionDisconnect(_e)}async _handleIncomingMessages(_e){if(![this.clientId,this.handshakeTopic].includes(_e.topic))return;let Ft;try{Ft=JSON.parse(_e.payload)}catch{return}const Vt=await this._decrypt(Ft);Vt&&this._eventManager.trigger(Vt)}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic)}_subscribeToResponse(_e,$t){this.on(`response:${_e}`,$t)}_subscribeToSessionResponse(_e,$t){this._subscribeToResponse(_e,(Ft,Vt)=>{if(Ft){this._handleSessionResponse(Ft.message);return}isJsonRpcResponseSuccess(Vt)?this._handleSessionResponse($t,Vt.result):Vt.error&&Vt.error.message?this._handleSessionResponse(Vt.error.message):this._handleSessionResponse($t)})}_subscribeToCallResponse(_e){return new Promise(($t,Ft)=>{this._subscribeToResponse(_e,(Vt,qt)=>{if(Vt){Ft(Vt);return}isJsonRpcResponseSuccess(qt)?$t(qt.result):qt.error&&qt.error.message?Ft(qt.error):Ft(new Error(ERROR_INVALID_RESPONSE))})})}_subscribeToInternalEvents(){this.on("display_uri",()=>{this._qrcodeModal&&this._qrcodeModal.open(this.uri,()=>{this._eventManager.trigger({event:"modal_closed",params:[]})},this._qrcodeModalOptions)}),this.on("connect",()=>{this._qrcodeModal&&this._qrcodeModal.close()}),this.on("call_request_sent",(_e,$t)=>{const{request:Ft}=$t.params[0];if(isMobile()&&this._signingMethods.includes(Ft.method)){const Vt=getLocal(mobileLinkCh
1519oiceKey);Vt&&(window.location.href=Vt.href)}}),this.on("wc_sessionRequest",(_e,$t)=>{_e&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:_e.toString()}]}),this.handshakeId=$t.id,this.peerId=$t.params[0].peerId,this.peerMeta=$t.params[0].peerMeta;const Ft=Object.assign(Object.assign({},$t),{method:"session_request"});this._eventManager.trigger(Ft)}),this.on("wc_sessionUpdate",(_e,$t)=>{_e&&this._handleSessionResponse(_e.message),this._handleSessionResponse("Session disconnected",$t.params[0])})}_initTransport(){this._transport.on("message",_e=>this._handleIncomingMessages(_e)),this._transport.on("open",()=>this._eventManager.trigger({event:"transport_open",params:[]})),this._transport.on("close",()=>this._eventManager.trigger({event:"transport_close",params:[]})),this._transport.on("error",()=>this._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]})),this._transport.open()}_formatUri(){const _e=this.protocol,$t=this.handshakeTopic,Ft=this.version,Vt=encodeURIComponent(this.bridge),qt=this.key;return`${_e}:${$t}@${Ft}?bridge=${Vt}&key=${qt}`}_parseUri(_e){const $t=parseWalletConnectUri(_e);if($t.protocol===this.protocol){if(!$t.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const Ft=$t.handshakeTopic;if(!$t.bridge)throw Error("Invalid or missing bridge url parameter value");const Vt=decodeURIComponent($t.bridge);if(!$t.key)throw Error("Invalid or missing key parameter value");const qt=$t.key;return{handshakeTopic:Ft,bridge:Vt,key:qt}}else throw new Error(ERROR_INVALID_URI)}async _generateKey(){return this._cryptoLib?await this._cryptoLib.generateKey():null}async _encrypt(_e){const $t=this._key;return this._cryptoLib&&$t?await this._cryptoLib.encrypt(_e,$t):null}async _decrypt(_e){const $t=this._key;return this._cryptoLib&&$t?await this._cryptoLib.decrypt(_e,$t):null}_getStorageSession(){let _e=null;return this._sessionStorage&&(_e=this._sessionStorage.getSession()),_e}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession()}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession()}_registerPushServer(_e){if(!_e.url||typeof _e.url!="string")throw Error("Invalid or missing pushServerOpts.url parameter value");if(!_e.type||typeof _e.type!="string")throw Error("Invalid or missing pushServerOpts.type parameter value");if(!_e.token||typeof _e.token!="string")throw Error("Invalid or missing pushServerOpts.token parameter value");const $t={bridge:this.bridge,topic:this.clientId,type:_e.type,token:_e.token,peerName:"",language:_e.language||""};this.on("connect",async(Ft,Vt)=>{if(Ft)throw Ft;if(_e.peerMeta){const qt=Vt.params[0].peerMeta.name;$t.peerName=qt}try{if(!(await(await fetch(`${_e.url}/new`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify($t)})).json()).success)throw Error("Failed to register in Push Server")}catch{throw Error("Failed to register in Push Server")}})}}function randomBytes(yt){return cjs.getBrowerCrypto().getRandomValues(new Uint8Array(yt))}const LENGTH_256=256,AES_LENGTH=LENGTH_256,HMAC_LENGTH=LENGTH_256,AES_BROWSER_ALGO="AES-CBC",HMAC_BROWSER_ALGO=`SHA-${AES_LENGTH}`,HMAC_BROWSER="HMAC",ENCRYPT_OP="encrypt",DECRYPT_OP="decrypt",SIGN_OP="sign",VERIFY_OP="verify";function getAlgo(yt){return yt===AES_BROWSER_ALGO?{length:AES_LENGTH,name:AES_BROWSER_ALGO}:{hash:{name:HMAC_BROWSER_ALGO},name:HMAC_BROWSER}}function getOps(yt){return yt===AES_BROWSER_ALGO?[ENCRYPT_OP,DECRYPT_OP]:[SIGN_OP,VERIFY_OP]}async function browserImportKey(yt,_e=AES_BROWSER_ALGO){return cjs.getSubtleCrypto().importKey("raw",yt,getAlgo(_e),!0,getOps(_e))}async function browserAesEncrypt(yt,_e,$t){const Ft=cjs.getSubtleCrypto(),Vt=await browserImportKey(_e,AES_BROWSER_ALGO),qt=await Ft.encrypt({iv:yt,name:AES_BROWSER_ALGO},Vt,$t);return new Uint8Array(qt)}async function browserAesDecrypt(yt,_e,$t){const Ft=cjs.getSubtleCrypto(),Vt=await browserImportKey(_e,AES_BROWSER_ALGO),qt=await Ft.decrypt({iv:yt,name:AES_BROWSER_ALGO},Vt,$t);return new Uint8Array(qt)}async function browserHmacSha256Sign(yt,_e){const $t=cjs.getSubtleCrypto(),Ft=await browserImportKey(yt,HMAC_BROWSER),Vt=await $t.sign({length:HMAC_LENGTH,name:HMAC_BROWSER},Ft,_e);return new Uint8Array(Vt)}function aesCbcEncrypt(yt,_e,$t){return browserAesEncrypt(yt,_e,$t)}function aesCbcDecrypt(yt,_e,$t){return browserAesDecrypt(yt,_e,$t)}async function hmacSha256Sign(yt,_e){return await browserHmacSha256Sign(yt,_e)}async function generateKey(yt){const _e=(yt||256)/8,$t=randomBytes(_e);return convertBufferToArrayBuffer(arrayToBuffer($t))}async function verifyHmac(yt,_e){const $t=hexToArray(yt.data),Ft=hexToArray(yt.iv),Vt=hexToArray(yt.hmac),qt=arrayToHex(Vt,!1),zt=concatArrays($t,Ft),Ht=await hmacSha256Sign(_e,zt),Kt=arrayToHex(Ht,!1);return removeHexPrefix(qt)===removeHexPrefix(Kt)}async function encrypt(yt,_e,$t){const Ft=bufferToArray(convertArrayBufferToBuffer(_e)),Vt=$t||await generateKey(128),qt=bufferToArray(convertArrayBufferToBuffer(Vt)),zt=arrayToHex(qt,!1),Ht=JSON.stringify(yt),Kt=utf8ToArray(Ht),Gt=await aesCbcEncrypt(qt,Ft,Kt),Jt=arrayToHex(Gt,!1),Xt=concatArrays(Gt,qt),Zt=await hmacSha256Sign(Ft,Xt),er=arrayToHex(Zt,!1);return{data:Jt,hmac:er,iv:zt}}async function decrypt(yt,_e){const $t=bufferToArray(convertArrayBufferToBuffer(_e));if(!$t)throw new Error("Missing key: required for decryption");if(!await verifyHmac(yt,$t))return null;const Vt=hexToArray(yt.data),qt=hexToArray(yt.iv),zt=await aesCbcDecrypt(qt,$t,Vt),Ht=arrayToUtf8(zt);let Kt;try{Kt=JSON.parse(Ht)}catch{return null}return Kt}const cryptoLib=Object.freeze(Object.defineProperty({__proto__:null,decrypt,encrypt,generateKey,verifyHmac},Symbol.toStringTag,{value:"Module"}));class WalletConnect extends Connector{constructor(_e,$t){super({cryptoLib,connectorOpts:_e,pushServerOpts:$t})}}const BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class Utils{static getFirstMatch(_e,$t){const Ft=$t.match(_e);return Ft&&Ft.length>0&&Ft[1]||""}static getSecondMatch(_e,$t){const Ft=$t.match(_e);return Ft&&Ft.length>1&&Ft[2]||""}static matchAndReturnConst(_e,$t,Ft){if(_e.test($t))return Ft}
vendor: 5,268 bytes, line 1519
1519static getWindowsVersionName(_e){switch(_e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(_e){const $t=_e.split(".").splice(0,2).map(Ft=>parseInt(Ft,10)||0);if($t.push(0),$t[0]===10)switch($t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(_e){const $t=_e.split(".").splice(0,2).map(Ft=>parseInt(Ft,10)||0);if($t.push(0),!($t[0]===1&&$t[1]<5)){if($t[0]===1&&$t[1]<6)return"Cupcake";if($t[0]===1&&$t[1]>=6)return"Donut";if($t[0]===2&&$t[1]<2)return"Eclair";if($t[0]===2&&$t[1]===2)return"Froyo";if($t[0]===2&&$t[1]>2)return"Gingerbread";if($t[0]===3)return"Honeycomb";if($t[0]===4&&$t[1]<1)return"Ice Cream Sandwich";if($t[0]===4&&$t[1]<4)return"Jelly Bean";if($t[0]===4&&$t[1]>=4)return"KitKat";if($t[0]===5)return"Lollipop";if($t[0]===6)return"Marshmallow";if($t[0]===7)return"Nougat";if($t[0]===8)return"Oreo";if($t[0]===9)return"Pie"}}static getVersionPrecision(_e){return _e.split(".").length}static compareVersions(_e,$t,Ft=!1){const Vt=Utils.getVersionPrecision(_e),qt=Utils.getVersionPrecision($t);let zt=Math.max(Vt,qt),Ht=0;const Kt=Utils.map([_e,$t],Gt=>{const Jt=zt-Utils.getVersionPrecision(Gt),Xt=Gt+new Array(Jt+1).join(".0");return Utils.map(Xt.split("."),Zt=>new Array(20-Zt.length).join("0")+Zt).reverse()});for(Ft&&(Ht=zt-Math.min(Vt,qt)),zt-=1;zt>=Ht;){if(Kt[0][zt]>Kt[1][zt])return 1;if(Kt[0][zt]===Kt[1][zt]){if(zt===Ht)return 0;zt-=1}else if(Kt[0][zt]<Kt[1][zt])return-1}}static map(_e,$t){const Ft=[];let Vt;if(Array.prototype.map)return Array.prototype.map.call(_e,$t);for(Vt=0;Vt<_e.length;Vt+=1)Ft.push($t(_e[Vt]));return Ft}static find(_e,$t){let Ft,Vt;if(Array.prototype.find)return Array.prototype.find.call(_e,$t);for(Ft=0,Vt=_e.length;Ft<Vt;Ft+=1){const qt=_e[Ft];if($t(qt,Ft))return qt}}static assign(_e,...$t){const Ft=_e;let Vt,qt;if(Object.assign)return Object.assign(_e,...$t);for(Vt=0,qt=$t.length;Vt<qt;Vt+=1){const zt=$t[Vt];typeof zt=="object"&&zt!==null&&Object.keys(zt).forEach(Kt=>{Ft[Kt]=zt[Kt]})}return _e}static getBrowserAlias(_e){return BROWSER_ALIASES_MAP[_e]}static getBrowserTypeByAlias(_e){return BROWSER_MAP[_e]||""}}const commonVersionIdentifier=/version\/(\d+(\.?_?\d+)+)/i,browsersList=[{test:[/googlebot/i],describe(yt){const _e={name:"Googlebot"},$t=Utils.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,yt)||Utils.getFirstMatch(commonVersionIdentifier,yt);return $t&&(_e.version=$t),_e}},{test:[/opera/i],describe(yt){const _e={name:"Opera"},$t=Utils.getFirstMatch(commonVersionIdentifier,yt)||Utils.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/opr\/|opios/i],describe(yt){const _e={name:"Opera"},$t=Utils.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,yt)||Utils.getFirstMatch(commonVersionIdentifier,yt);return $t&&(_e.version=$t),_e}},{test:[/SamsungBrowser/i],describe(yt){const _e={name:"Samsung Internet for Android"},$t=Utils.getFirstMatch(commonVersionIdentifier,yt)||Utils.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/Whale/i],describe(yt){const _e={name:"NAVER Whale Browser"},$t=Utils.getFirstMatch(commonVersionIdentifier,yt)||Utils.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/MZBrowser/i],describe(yt){const _e={name:"MZ Browser"},$t=Utils.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,yt)||Utils.getFirstMatch(commonVersionIdentifier,yt);return $t&&(_e.version=$t),_e}},{test:[/focus/i],describe(yt){const _e={name:"Focus"},$t=Utils.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,yt)||Utils.getFirstMatch(commonVersionIdentifier,yt);return $t&&(_e.version=$t),_e}},{test:[/swing/i],describe(yt){const _e={name:"Swing"},$t=Utils.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,yt)||Utils.getFirstMatch(commonVersionIdentifier,yt);return $t&&(_e.version=$t),_e}},{test:[/coast/i],describe(yt){const _e={name:"Opera Coast"},$t=Utils.getFirstMatch(commonVersionIdentifier,yt)||Utils.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(yt){const _e={name:"Opera Touch"},$t=Utils.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,yt)||Utils.getFirstMatch(commonVersionIdentifier,yt);return $t&&(_e.version=$t),_e}},{test:[/yabrowser/i],describe(yt){const _e={name:"Yandex Browser"},$t=Utils.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,yt)||Utils.getFirstMatch(commonVersionIdentifier,yt);return $t&&(_e.version=$t),_e}},{test:[/ucbrowser/i],describe(yt){const _e={name:"UC Browser"},$t=Utils.getFirstMatch(commonVersionIdentifier,yt)||Utils.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/Maxthon|mxios/i],describe(yt){const _e={name:"Maxthon"},$t=Utils.getFirstMatch(commonVersionIdentifier,yt)||Utils.getFirstMatch(/(?:M
1519axthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/epiphany/i],describe(yt){const _e={name:"Epiphany"},$t=Utils.getFirstMatch(commonVersionIdentifier,yt)||Utils.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/puffin/i],describe(yt){const _e={name:"Puffin"},$t=Utils.getFirstMatch(commonVersionIdentifier,yt)||Utils.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/sleipnir/i],describe(yt){const _e={name:"Sleipnir"},$t=Utils.getFirstMatch(commonVersionIdentifier,yt)||Utils.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/k-meleon/i],describe(yt){const _e={name:"K-Meleon"},$t=Utils.getFirstMatch(commonVersionIdentifier,yt)||Utils.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/micromessenger/i],describe(yt){const _e={name:"WeChat"},$t=Utils.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,yt)||Utils.getFirstMatch(commonVersionIdentifier,yt);return $t&&(_e.version=$t),_e}},{test:[/qqbrowser/i],describe(yt){const _e={name:/qqbrowserlite/i.test(yt)?"QQ Browser Lite":"QQ Browser"},$t=Utils.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,yt)||Utils.getFirstMatch(commonVersionIdentifier,yt);return $t&&(_e.version=$t),_e}},{test:[/msie|trident/i],describe(yt){const _e={name:"Internet Explorer"},$t=Utils.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/\sedg\//i],describe(yt){const _e={name:"Microsoft Edge"},$t=Utils.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/edg([ea]|ios)/i],describe(yt){const _e={name:"Microsoft Edge"},$t=Utils.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/vivaldi/i],describe(yt){const _e={name:"Vivaldi"},$t=Utils.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/seamonkey/i],describe(yt){const _e={name:"SeaMonkey"},$t=Utils.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/sailfish/i],describe(yt){const _e={name:"Sailfish"},$t=Utils.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/silk/i],describe(yt){const _e={name:"Amazon Silk"},$t=Utils.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/phantom/i],describe(yt){const _e={name:"PhantomJS"},$t=Utils.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/slimerjs/i],describe(yt){const _e={name:"SlimerJS"},$t=Utils.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(yt){const _e={name:"BlackBerry"},$t=Utils.getFirstMatch(commonVersionIdentifier,yt)||Utils.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/(web|hpw)[o0]s/i],describe(yt){const _e={name:"WebOS Browser"},$t=Utils.getFirstMatch(commonVersionIdentifier,yt)||Utils.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/bada/i],describe(yt){const _e={name:"Bada"},$t=Utils.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/tizen/i],describe(yt){const _e={name:"Tizen"},$t=Utils.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,yt)||Utils.getFirstMatch(commonVersionIdentifier,yt);return $t&&(_e.version=$t),_e}},{test:[/qupzilla/i],describe(yt){const _e={name:"QupZilla"},$t=Utils.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,yt)||Utils.getFirstMatch(commonVersionIdentifier,yt);return $t&&(_e.version=$t),_e}},{test:[/firefox|iceweasel|fxios/i],describe(yt){const _e={name:"Firefox"},$t=Utils.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/electron/i],describe(yt){const _e={name:"Electron"},$t=Utils.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/MiuiBrowser/i],describe(yt){const _e={name:"Miui"},$t=Utils.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/chromium/i],describe(yt){const _e={name:"Chromium"}
vendor: 11,500 bytes, lines 1519-1524
1519,$t=Utils.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,yt)||Utils.getFirstMatch(commonVersionIdentifier,yt);return $t&&(_e.version=$t),_e}},{test:[/chrome|crios|crmo/i],describe(yt){const _e={name:"Chrome"},$t=Utils.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/GSA/i],describe(yt){const _e={name:"Google Search"},$t=Utils.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test(yt){const _e=!yt.test(/like android/i),$t=yt.test(/android/i);return _e&&$t},describe(yt){const _e={name:"Android Browser"},$t=Utils.getFirstMatch(commonVersionIdentifier,yt);return $t&&(_e.version=$t),_e}},{test:[/playstation 4/i],describe(yt){const _e={name:"PlayStation 4"},$t=Utils.getFirstMatch(commonVersionIdentifier,yt);return $t&&(_e.version=$t),_e}},{test:[/safari|applewebkit/i],describe(yt){const _e={name:"Safari"},$t=Utils.getFirstMatch(commonVersionIdentifier,yt);return $t&&(_e.version=$t),_e}},{test:[/.*/i],describe(yt){const _e=/^(.*)\/(.*) /,$t=/^(.*)\/(.*)[ \t]\((.*)/,Vt=yt.search("\\(")!==-1?$t:_e;return{name:Utils.getFirstMatch(Vt,yt),version:Utils.getSecondMatch(Vt,yt)}}}],osParsersList=[{test:[/Roku\/DVP/],describe(yt){const _e=Utils.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,yt);return{name:OS_MAP.Roku,version:_e}}},{test:[/windows phone/i],describe(yt){const _e=Utils.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,yt);return{name:OS_MAP.WindowsPhone,version:_e}}},{test:[/windows /i],describe(yt){const _e=Utils.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,yt),$t=Utils.getWindowsVersionName(_e);return{name:OS_MAP.Windows,version:_e,versionName:$t}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(yt){const _e={name:OS_MAP.iOS},$t=Utils.getSecondMatch(/(Version\/)(\d[\d.]+)/,yt);return $t&&(_e.version=$t),_e}},{test:[/macintosh/i],describe(yt){const _e=Utils.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,yt).replace(/[_\s]/g,"."),$t=Utils.getMacOSVersionName(_e),Ft={name:OS_MAP.MacOS,version:_e};return $t&&(Ft.versionName=$t),Ft}},{test:[/(ipod|iphone|ipad)/i],describe(yt){const _e=Utils.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,yt).replace(/[_\s]/g,".");return{name:OS_MAP.iOS,version:_e}}},{test(yt){const _e=!yt.test(/like android/i),$t=yt.test(/android/i);return _e&&$t},describe(yt){const _e=Utils.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,yt),$t=Utils.getAndroidVersionName(_e),Ft={name:OS_MAP.Android,version:_e};return $t&&(Ft.versionName=$t),Ft}},{test:[/(web|hpw)[o0]s/i],describe(yt){const _e=Utils.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,yt),$t={name:OS_MAP.WebOS};return _e&&_e.length&&($t.version=_e),$t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(yt){const _e=Utils.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,yt)||Utils.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,yt)||Utils.getFirstMatch(/\bbb(\d+)/i,yt);return{name:OS_MAP.BlackBerry,version:_e}}},{test:[/bada/i],describe(yt){const _e=Utils.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,yt);return{name:OS_MAP.Bada,version:_e}}},{test:[/tizen/i],describe(yt){const _e=Utils.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,yt);return{name:OS_MAP.Tizen,version:_e}}},{test:[/linux/i],describe(){return{name:OS_MAP.Linux}}},{test:[/CrOS/],describe(){return{name:OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe(yt){const _e=Utils.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,yt);return{name:OS_MAP.PlayStation4,version:_e}}}],platformParsersList=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(yt){const _e=Utils.getFirstMatch(/(can-l01)/i,yt)&&"Nova",$t={type:PLATFORMS_MAP.mobile,vendor:"Huawei"};return _e&&($t.model=_e),$t}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:PLATFORMS_MAP.tablet}}},{test(yt){const _e=yt.test(/ipod|iphone/i),$t=yt.test(/like (ipod|iphone)/i);return _e&&!$t},describe(yt){const _e=Utils.getFirstMatch(/(ipod|iphone)/i,yt);return{type:PLATFORMS_MAP.mobile,vendor:"Apple",model:_e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:PLATFORMS_MAP.mobile}}},{test(yt){return yt.getBrowserName(!0)==="blackberry"},describe(){return{type:PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test(yt){return yt.getBrowserName(!0)==="bada"},describe(){return{type:PLATFORMS_MAP.mobile}}},{test(yt){return yt.getBrowserName()==="windows phone"},describe(){return{type:PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test(yt){const _e=Number(String(yt.getOSVersion()).split(".")[0]);return yt.getOSName(!0)==="android"&&_e>=3},describe(){return{type:PLATFORMS_MAP.tablet}}},{test(yt){return yt.getOSName(!0)==="android"},describe(){return{type:PLATFORMS_MAP.mobile}}},{test(yt){return yt.getOSName(!0)==="macos"},describe(){return{type:PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test(yt){return yt.getOSName(!0)==="windows"},describe(){return{type:PLATFORMS_MAP.desktop}}},{test(yt){return yt.getOSName(!0)==="linux"},describe(){return{type:PLATFORMS_MAP.desktop}}},{test(yt){return yt.getOSName(!0)==="playstation 4"},describe(){return{type:PLATFORMS_MAP.tv}}},{test(yt){return yt.getOSName(!0)==="roku"},describe(){return{type:PLATFORMS_MAP.tv}}}],enginesParsersList=[{test(yt){return yt.getBrowserName(!0)==="microsoft edge"},describe(yt){if(/\sedg\//i.test(yt))return{name:ENGINE_MAP.Blink};const $t=Utils.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,yt);return{name:ENGINE_MAP.EdgeHTML,version:$t}}},{test:[/trident/i],describe(yt){const _e={name:ENGINE_MAP.Trident},$t=Utils.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test(yt){return yt.test(/presto/i)},describe(yt){const _e={name:ENGINE_MAP.Presto},$t=Utils.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test(yt){const _e=yt.test(/gecko/i),$t=yt.test(/like gecko/i);return _e&&!$t},describe(yt){const _e={name:ENGINE_MAP.Gecko},$t=Utils.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe(yt){const _e={name:ENGINE_MAP.WebKit},$t=Utils.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,yt);return $t&&(_e.version=$t),_e}}];class Parser{constructor(_e,$t=!1){if(_e==null||_e==="")throw new Error("UserAgent parameter can't be empty");this._ua=_e,this.parsedResult={},$t!==!0&&this.parse()}getUA(){return this._ua}test(_e){return _e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const _e=Utils.find(browsersList,$t=>{if(typeof $t.test=="function")return $t.test(this);if($t.test instanceof Array)return $t.test.some(Ft=>this.test(Ft));throw new Error("Browser's test function is not valid")});return _e&&(this.parsedResult.browser=_e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(_e){return _e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const _e=Utils.find(osParsersList,$t=>{if(typeof $t.test=="function")return $t.test(this);if($t.test instanceof Array)return $t.test.some(Ft=>this.test(Ft));throw new Error("Browser's test function is not valid")});return _e&&(this.parsedResult.os=_e.describe(this.getUA())),this.parsedResult.os}getOSName(_e){const{name:$t}=this.getOS();return _e?String($t).toLowerCase()||"":$t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(_e=!1){const{type:$t}=this.getPlatform();return _e?String($t).toLowerCase()||"":$t||""}parsePlatform(){this.parsedResult.platform={};const _e=Utils.find(platformParsersList,$t=>{if(typeof $t.test=="function")return $t.test(this);if($t.test instanceof Array)return $t.test.some(Ft=>this.test(Ft));throw new Error("Browser's test function is not valid")});return _e&&(this.parsedResult.platform=_e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(_e){return _e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const _e=Utils.find(enginesParsersList,$t=>{if(typeof $t.test=="function")return $t.test(this);if($t.test instanceof Array)return $t.test.some(Ft=>this.test(Ft));throw new Error("Browser's test function is not valid")});return _e&&(this.parsedResult.engine=_e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return Utils.assign({},this.parsedResult)}satisfies(_e){const $t={};let Ft=0;const Vt={};let qt=0;if(Object.keys(_e).forEach(Ht=>{const Kt=_e[Ht];typeof Kt=="string"?(Vt[Ht]=Kt,qt+=1):typeof Kt=="object"&&($t[Ht]=Kt,Ft+=1)}),Ft>0){const Ht=Object.keys($t),Kt=Utils.find(Ht,Jt=>this.isOS(Jt));if(Kt){const Jt=this.satisfies($t[Kt]);if(Jt!==void 0)return Jt}const Gt=Utils.find(Ht,Jt=>this.isPlatform(Jt));if(Gt){const Jt=this.satisfies($t[Gt]);if(Jt!==void 0)return Jt}}if(qt>0){const Ht=Object.keys(Vt),Kt=Utils.find(Ht,Gt=>this.isBrowser(Gt,!0));if(Kt!==void 0)return this.compareVersion(Vt[Kt])}}isBrowser(_e,$t=!1){const Ft=this.getBrowserName().toLowerCase();let Vt=_e.toLowerCase();const qt=Utils.getBrowserTypeByAlias(Vt);return $t&&qt&&(Vt=qt.toLowerCase()),Vt===Ft}compareVersion(_e){let $t=[0],Ft=_e,Vt=!1;const qt=this.getBrowserVersion();if(typeof qt=="string")return _e[0]===">"||_e[0]==="<"?(Ft=_e.substr(1),_e[1]==="="?(Vt=!0,Ft=_e.substr(2)):$t=[],_e[0]===">"?$t.push(1):$t.push(-1)):_e[0]==="="?Ft=_e.substr(1):_e[0]==="~"&&(Vt=!0,Ft=_e.substr(1)),$t.indexOf(Utils.compareVersions(qt,Ft,Vt))>-1}isOS(_e){return this.getOSName(!0)===String(_e).toLowerCase()}isPlatform(_e){return this.getPlatformType(!0)===String(_e).toLowerCase()}isEngine(_e){return this.getEngineName(!0)===String(_e).toLowerCase()}is(_e,$t=!1){return this.isBrowser(_e,$t)||this.isOS(_e)||this.isPlatform(_e)}some(_e=[]){return _e.some($t=>this.is($t))}}/*! 1520 * Bowser - a browser detector 1521 * https://github.com/lancedikson/bowser 1522 * MIT License | (c) Dustin Diaz 2012-2015 1523 * MIT License | (c) Denis Demchenko 2015-2019 1524 */class Bowser{static getParser(_e,$t=!1){if(typeof _e!="string")throw new Error("UserAgent should be a string");return new Parser(_e,$t)}static parse(_e){return new Parser(_e).getResult()}static get BROWSER_MAP(){return BROWSER_MAP}static get ENGINE_MAP(){return ENGINE_MAP}static get OS_MAP(){return OS_MAP}static get PLATFORMS_MAP(){return PLATFORMS_MAP}}var r=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:{},o=[],i=[],s=typeof Uint8Array<"u"?Uint8Array:Array,a=!1;function l(){a=!0;for(var yt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
vendor: 22,083 bytes, line 1524
1524+/",_e=0;_e<64;++_e)o[_e]=yt[_e],i[yt.charCodeAt(_e)]=_e;i[45]=62,i[95]=63}function u(yt,_e,$t){for(var Ft,Vt,qt=[],zt=_e;zt<$t;zt+=3)Ft=(yt[zt]<<16)+(yt[zt+1]<<8)+yt[zt+2],qt.push(o[(Vt=Ft)>>18&63]+o[Vt>>12&63]+o[Vt>>6&63]+o[63&Vt]);return qt.join("")}function c(yt){var _e;a||l();for(var $t=yt.length,Ft=$t%3,Vt="",qt=[],zt=16383,Ht=0,Kt=$t-Ft;Ht<Kt;Ht+=zt)qt.push(u(yt,Ht,Ht+zt>Kt?Kt:Ht+zt));return Ft===1?(_e=yt[$t-1],Vt+=o[_e>>2],Vt+=o[_e<<4&63],Vt+="=="):Ft===2&&(_e=(yt[$t-2]<<8)+yt[$t-1],Vt+=o[_e>>10],Vt+=o[_e>>4&63],Vt+=o[_e<<2&63],Vt+="="),qt.push(Vt),qt.join("")}function h(yt,_e,$t,Ft,Vt){var qt,zt,Ht=8*Vt-Ft-1,Kt=(1<<Ht)-1,Gt=Kt>>1,Jt=-7,Xt=$t?Vt-1:0,Zt=$t?-1:1,er=yt[_e+Xt];for(Xt+=Zt,qt=er&(1<<-Jt)-1,er>>=-Jt,Jt+=Ht;Jt>0;qt=256*qt+yt[_e+Xt],Xt+=Zt,Jt-=8);for(zt=qt&(1<<-Jt)-1,qt>>=-Jt,Jt+=Ft;Jt>0;zt=256*zt+yt[_e+Xt],Xt+=Zt,Jt-=8);if(qt===0)qt=1-Gt;else{if(qt===Kt)return zt?NaN:1/0*(er?-1:1);zt+=Math.pow(2,Ft),qt-=Gt}return(er?-1:1)*zt*Math.pow(2,qt-Ft)}function f(yt,_e,$t,Ft,Vt,qt){var zt,Ht,Kt,Gt=8*qt-Vt-1,Jt=(1<<Gt)-1,Xt=Jt>>1,Zt=Vt===23?Math.pow(2,-24)-Math.pow(2,-77):0,er=Ft?0:qt-1,tr=Ft?1:-1,rr=_e<0||_e===0&&1/_e<0?1:0;for(_e=Math.abs(_e),isNaN(_e)||_e===1/0?(Ht=isNaN(_e)?1:0,zt=Jt):(zt=Math.floor(Math.log(_e)/Math.LN2),_e*(Kt=Math.pow(2,-zt))<1&&(zt--,Kt*=2),(_e+=zt+Xt>=1?Zt/Kt:Zt*Math.pow(2,1-Xt))*Kt>=2&&(zt++,Kt/=2),zt+Xt>=Jt?(Ht=0,zt=Jt):zt+Xt>=1?(Ht=(_e*Kt-1)*Math.pow(2,Vt),zt+=Xt):(Ht=_e*Math.pow(2,Xt-1)*Math.pow(2,Vt),zt=0));Vt>=8;yt[$t+er]=255&Ht,er+=tr,Ht/=256,Vt-=8);for(zt=zt<<Vt|Ht,Gt+=Vt;Gt>0;yt[$t+er]=255&zt,er+=tr,zt/=256,Gt-=8);yt[$t+er-tr]|=128*rr}var d={}.toString,p=Array.isArray||function(yt){return d.call(yt)=="[object Array]"};function g(){return y.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function w(yt,_e){if(g()<_e)throw new RangeError("Invalid typed array length");return y.TYPED_ARRAY_SUPPORT?(yt=new Uint8Array(_e)).__proto__=y.prototype:(yt===null&&(yt=new y(_e)),yt.length=_e),yt}function y(yt,_e,$t){if(!(y.TYPED_ARRAY_SUPPORT||this instanceof y))return new y(yt,_e,$t);if(typeof yt=="number"){if(typeof _e=="string")throw new Error("If encoding is specified then the first argument must be a string");return b(this,yt)}return v(this,yt,_e,$t)}function v(yt,_e,$t,Ft){if(typeof _e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&_e instanceof ArrayBuffer?function(Vt,qt,zt,Ht){if(qt.byteLength,zt<0||qt.byteLength<zt)throw new RangeError("'offset' is out of bounds");if(qt.byteLength<zt+(Ht||0))throw new RangeError("'length' is out of bounds");return qt=zt===void 0&&Ht===void 0?new Uint8Array(qt):Ht===void 0?new Uint8Array(qt,zt):new Uint8Array(qt,zt,Ht),y.TYPED_ARRAY_SUPPORT?(Vt=qt).__proto__=y.prototype:Vt=A(Vt,qt),Vt}(yt,_e,$t,Ft):typeof _e=="string"?function(Vt,qt,zt){if(typeof zt=="string"&&zt!==""||(zt="utf8"),!y.isEncoding(zt))throw new TypeError('"encoding" must be a valid string encoding');var Ht=0|_(qt,zt);Vt=w(Vt,Ht);var Kt=Vt.write(qt,zt);return Kt!==Ht&&(Vt=Vt.slice(0,Kt)),Vt}(yt,_e,$t):function(Vt,qt){if(T(qt)){var zt=0|E(qt.length);return(Vt=w(Vt,zt)).length===0||qt.copy(Vt,0,0,zt),Vt}if(qt){if(typeof ArrayBuffer<"u"&&qt.buffer instanceof ArrayBuffer||"length"in qt)return typeof qt.length!="number"||(Ht=qt.length)!=Ht?w(Vt,0):A(Vt,qt);if(qt.type==="Buffer"&&p(qt.data))return A(Vt,qt.data)}var Ht;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(yt,_e)}function m(yt){if(typeof yt!="number")throw new TypeError('"size" argument must be a number');if(yt<0)throw new RangeError('"size" argument must not be negative')}function b(yt,_e){if(m(_e),yt=w(yt,_e<0?0:0|E(_e)),!y.TYPED_ARRAY_SUPPORT)for(var $t=0;$t<_e;++$t)yt[$t]=0;return yt}function A(yt,_e){var $t=_e.length<0?0:0|E(_e.length);yt=w(yt,$t);for(var Ft=0;Ft<$t;Ft+=1)yt[Ft]=255&_e[Ft];return yt}function E(yt){if(yt>=g())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+g().toString(16)+" bytes");return 0|yt}function T(yt){return!(yt==null||!yt._isBuffer)}function _(yt,_e){if(T(yt))return yt.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(yt)||yt instanceof ArrayBuffer))return yt.byteLength;typeof yt!="string"&&(yt=""+yt);var $t=yt.length;if($t===0)return 0;for(var Ft=!1;;)switch(_e){case"ascii":case"latin1":case"binary":return $t;case"utf8":case"utf-8":case void 0:return V(yt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*$t;case"hex":return $t>>>1;case"base64":return Z(yt).length;default:if(Ft)return V(yt).length;_e=(""+_e).toLowerCase(),Ft=!0}}function R(yt,_e,$t){var Ft=!1;if((_e===void 0||_e<0)&&(_e=0),_e>this.length||(($t===void 0||$t>this.length)&&($t=this.length),$t<=0)||($t>>>=0)<=(_e>>>=0))return"";for(yt||(yt="utf8");;)switch(yt){case"hex":return k(this,_e,$t);case"utf8":case"utf-8":return W(this,_e,$t);case"ascii":return x(this,_e,$t);case"latin1":case"binary":return Y(this,_e,$t);case"base64":return B(this,_e,$t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,_e,$t);default:if(Ft)throw new TypeError("Unknown encoding: "+yt);yt=(yt+"").toLowerCase(),Ft=!0}}function S(yt,_e,$t){var Ft=yt[_e];yt[_e]=yt[$t],yt[$t]=Ft}function N(yt,_e,$t,Ft,Vt){if(yt.length===0)return-1;if(typeof $t=="string"?(Ft=$t,$t=0):$t>2147483647?$t=2147483647:$t<-2147483648&&($t=-2147483648),$t=+$t,isNaN($t)&&($t=Vt?0:yt.length-1),$t<0&&($t=yt.length+$t),$t>=yt.length){if(Vt)return-1;$t=yt.length-1}else if($t<0){if(!Vt)return-1;$t=0}if(typeof _e=="string"&&(_e=y.from(_e,Ft)),T(_e))return _e.length===0?-1:C(yt,_e,$t,Ft,Vt);if(typeof _e=="number")return _e&=255,y.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Vt?Uint8Array.prototype.indexOf.call(yt,_e,$t):Uint8Array.prototype.lastIndexOf.call(yt,_e,$t):C(yt,[_e],$t,Ft,Vt);throw new TypeError("val must be string, number or Buffer")}function C(yt,_e,$t,Ft,Vt){var qt,zt=1,Ht=yt.length,Kt=_e.length;if(Ft!==void 0&&((Ft=String(Ft).toLowerCase())==="ucs2"||Ft==="ucs-2"||Ft==="utf16le"||Ft==="utf-16le")){if(yt.length<2||_e.length<2)return-1;zt=2,Ht/=2,Kt/=2,$t/=2}function Gt(er,tr){return zt===1?er[tr]:er.readUInt16BE(tr*zt)}if(Vt){var Jt=-1;for(qt=$t;qt<Ht;qt++)if(Gt(yt,qt)===Gt(_e,Jt===-1?0:qt-Jt)){if(Jt===-1&&(Jt=qt),qt-Jt+1===Kt)return Jt*zt}else Jt!==-1&&(qt-=qt-Jt),Jt=-1}else for($t+Kt>Ht&&($t=Ht-Kt),qt=$t;qt>=0;qt--){for(var Xt=!0,Zt=0;Zt<Kt;Zt++)if(Gt(yt,qt+Zt)!==Gt(_e,Zt)){Xt=!1;break}if(Xt)return qt}return-1}function I(yt,_e,$t,Ft){$t=Number($t)||0;var Vt=yt.length-$t;Ft?(Ft=Number(Ft))>Vt&&(Ft=Vt):Ft=Vt;var qt=_e.length;if(qt%2!=0)throw new TypeError("Invalid hex string");Ft>qt/2&&(Ft=qt/2);for(var zt=0;zt<Ft;++zt){var Ht=parseInt(_e.substr(2*zt,2),16);if(isNaN(Ht))return zt;yt[$t+zt]=Ht}return zt}function P(yt,_e,$t,Ft){return Q(V(_e,yt.length-$t),yt,$t,Ft)}function O(yt,_e,$t,Ft){return Q(function(Vt){for(var qt=[],zt=0;zt<Vt.length;++zt)qt.push(255&Vt.charCodeAt(zt));return qt}(_e),yt,$t,Ft)}function L(yt,_e,$t,Ft){return O(yt,_e,$t,Ft)}function M(yt,_e,$t,Ft){return Q(Z(_e),yt,$t,Ft)}function U(yt,_e,$t,Ft){return Q(function(Vt,qt){for(var zt,Ht,Kt,Gt=[],Jt=0;Jt<Vt.length&&!((qt-=2)<0);++Jt)Ht=(zt=Vt.charCodeAt(Jt))>>8,Kt=zt%256,Gt.push(Kt),Gt.push(Ht);return Gt}(_e,yt.length-$t),yt,$t,Ft)}function B(yt,_e,$t){return _e===0&&$t===yt.length?c(yt):c(yt.slice(_e,$t))}function W(yt,_e,$t){$t=Math.min(yt.length,$t);for(var Ft=[],Vt=_e;Vt<$t;){var qt,zt,Ht,Kt,Gt=yt[Vt],Jt=null,Xt=Gt>239?4:Gt>223?3:Gt>191?2:1;if(Vt+Xt<=$t)switch(Xt){case 1:Gt<128&&(Jt=Gt);break;case 2:(192&(qt=yt[Vt+1]))==128&&(Kt=(31&Gt)<<6|63&qt)>127&&(Jt=Kt);break;case 3:qt=yt[Vt+1],zt=yt[Vt+2],(192&qt)==128&&(192&zt)==128&&(Kt=(15&Gt)<<12|(63&qt)<<6|63&zt)>2047&&(Kt<55296||Kt>57343)&&(Jt=Kt);break;case 4:qt=yt[Vt+1],zt=yt[Vt+2],Ht=yt[Vt+3],(192&qt)==128&&(192&zt)==128&&(192&Ht)==128&&(Kt=(15&Gt)<<18|(63&qt)<<12|(63&zt)<<6|63&Ht)>65535&&Kt<1114112&&(Jt=Kt)}Jt===null?(Jt=65533,Xt=1):Jt>65535&&(Jt-=65536,Ft.push(Jt>>>10&1023|55296),Jt=56320|1023&Jt),Ft.push(Jt),Vt+=Xt}return function(Zt){var er=Zt.length;if(er<=D)return String.fromCharCode.apply(String,Zt);for(var tr="",rr=0;rr<er;)tr+=String.fromCharCode.apply(String,Zt.slice(rr,rr+=D));return tr}(Ft)}y.TYPED_ARRAY_SUPPORT=r.TYPED_ARRAY_SUPPORT===void 0||r.TYPED_ARRAY_SUPPORT,g(),y.poolSize=8192,y._augment=function(yt){return yt.__proto__=y.prototype,yt},y.from=function(yt,_e,$t){return v(null,yt,_e,$t)},y.TYPED_ARRAY_SUPPORT&&(y.prototype.__proto__=Uint8Array.prototype,y.__proto__=Uint8Array),y.alloc=function(yt,_e,$t){return function(Ft,Vt,qt,zt){return m(Vt),Vt<=0?w(Ft,Vt):qt!==void 0?typeof zt=="string"?w(Ft,Vt).fill(qt,zt):w(Ft,Vt).fill(qt):w(Ft,Vt)}(null,yt,_e,$t)},y.allocUnsafe=function(yt){return b(null,yt)},y.allocUnsafeSlow=function(yt){return b(null,yt)},y.isBuffer=function(yt){return yt!=null&&(!!yt._isBuffer||tt(yt)||function(_e){return typeof _e.readFloatLE=="function"&&typeof _e.slice=="function"&&tt(_e.slice(0,0))}(yt))},y.compare=function(yt,_e){if(!T(yt)||!T(_e))throw new TypeError("Arguments must be Buffers");if(yt===_e)return 0;for(var $t=yt.length,Ft=_e.length,Vt=0,qt=Math.min($t,Ft);Vt<qt;++Vt)if(yt[Vt]!==_e[Vt]){$t=yt[Vt],Ft=_e[Vt];break}return $t<Ft?-1:Ft<$t?1:0},y.isEncoding=function(yt){switch(String(yt).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},y.concat=function(yt,_e){if(!p(yt))throw new TypeError('"list" argument must be an Array of Buffers');if(yt.length===0)return y.alloc(0);var $t;if(_e===void 0)for(_e=0,$t=0;$t<yt.length;++$t)_e+=yt[$t].length;var Ft=y.allocUnsafe(_e),Vt=0;for($t=0;$t<yt.length;++$t){var qt=yt[$t];if(!T(qt))throw new TypeError('"list" argument must be an Array of Buffers');qt.copy(Ft,Vt),Vt+=qt.length}return Ft},y.byteLength=_,y.prototype._isBuffer=!0,y.prototype.swap16=function(){var yt=this.length;if(yt%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var _e=0;_e<yt;_e+=2)S(this,_e,_e+1);return this},y.prototype.swap32=function(){var yt=this.length;if(yt%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var _e=0;_e<yt;_e+=4)S(this,_e,_e+3),S(this,_e+1,_e+2);return this},y.prototype.swap64=function(){var yt=this.length;if(yt%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var _e=0;_e<yt;_e+=8)S(this,_e,_e+7),S(this,_e+1,_e+6),S(this,_e+2,_e+5),S(this,_e+3,_e+4);return this},y.prototype.toString=function(){var yt=0|this.length;return yt===0?"":arguments.length===0?W(this,0,yt):R.apply(this,arguments)},y.prototype.equals=function(yt){if(!T(yt))throw new TypeError("Argument must be a Buffer");return this===yt||y.compare(this,yt)===0},y.prototype.inspect=function(){var yt="";return this.length>0&&(yt=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(yt+=" ... ")),"<Buffer "+yt+">"},y.prototype.compare=function(yt,_e,$t,Ft,Vt){if(!T(yt))throw new TypeError("Argument must be a Buffer");if(_e===void 0&&(_e=0),$t===void 0&&($t=yt?yt.length:0),Ft===void 0&&(Ft=0),Vt===void 0&&(Vt=this.length),_e<0||$t>yt.length||Ft<0||Vt>this.length)throw new RangeError("out of range index");if(Ft>=Vt&&_e>=$t)return 0;if(Ft>=Vt)return-1;if(_e>=$t)return 1;if(this===yt)return 0;for(var qt=(Vt>>>=0)-(Ft>>>=0),zt=($t>>>=0)-(_e>>>=0),Ht=Math.min(qt,zt),Kt=this.slice(Ft,Vt),Gt=yt.slice(_e,$t),Jt=0;Jt<Ht;++Jt)if(Kt[Jt]!==Gt[Jt]){qt=Kt[Jt],zt=Gt[Jt];break}return qt<zt?-1:zt<qt?1:0},y.prototype.includes=function(yt,_e,$t){return this.indexOf(yt,_e,$t)!==-1},y.prototype.indexOf=function(yt,_e,$t){return N(this,yt,_e,$t,!0)},y.prototype.lastIndexOf=function(yt,_e,$t){return N(this,yt,_e,$t,!1)},y.prototype.write=function(yt,_e,$t,Ft){if(_e===void 0)Ft="utf8",$t=this.length,_e=0;else if($t===void 0&&typeof _e=="string")Ft=_e,$t=this.length,_e=0;else{if(!isFinite(_e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");_e|=0,isFinite($t)?($t|=0,Ft===void 0&&(Ft="utf8")):(Ft=$t,$t=void 0)}var Vt=this.length-_e;if(($t===void 0||$t>Vt)&&($t=Vt),yt.length>0&&($t<0||_e<0)||_e>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ft||(Ft="utf8");for(var qt=!1;;)switch(Ft){case"hex":return I(this,yt,_e,$t);case"utf8":case"utf-8":return P(this,yt,_e,$t);case"ascii":return O(this,yt,_e,$t);case"latin1":case"binary":return L(this,yt,_e,$t);case"base64":return M(this,yt,_e,$t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,yt,_e,$t);default:if(qt)throw new TypeError("Unknown encoding: "+Ft);Ft=(""+Ft).toLowerCase(),qt=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function x(yt,_e,$t){var Ft="";$t=Math.min(yt.length,$t);for(var Vt=_e;Vt<$t;++Vt)Ft+=String.fromCharCode(127&yt[Vt]);return Ft}function Y(yt,_e,$t){var Ft="";$t=Math.min(yt.length,$t);for(var Vt=_e;Vt<$t;++Vt)Ft+=String.fromCharCode(yt[Vt]);return Ft}function k(yt,_e,$t){var Ft=yt.length;(!_e||_e<0)&&(_e=0),(!$t||$t<0||$t>Ft)&&($t=Ft);for(var Vt="",qt=_e;qt<$t;++qt)Vt+=J(yt[qt]);return Vt}function j(yt,_e,$t){for(var Ft=yt.slice(_e,$t),Vt="",qt=0;qt<Ft.length;qt+=2)Vt+=String.fromCharCode(Ft[qt]+256*Ft[qt+1]);return Vt}function $(yt,_e,$t){if(yt%1!=0||yt<0)throw new RangeError("offset is not uint");if(yt+_e>$t)throw new RangeError("Trying to access beyond buffer length")}function G(yt,_e,$t,Ft,Vt,qt){if(!T(yt))throw new TypeError('"buffer" argument must be a Buffer instance');if(_e>Vt||_e<qt)throw new RangeError('"value" argument is out of bounds');if($t+Ft>yt.length)throw new RangeError("Index out of range")}function q(yt,_e,$t,Ft){_e<0&&(_e=65535+_e+1);for(var Vt=0,qt=Math.min(yt.length-$t,2);Vt<qt;++Vt)yt[$t+Vt]=(_e&255<<8*(Ft?Vt:1-Vt))>>>8*(Ft?Vt:1-Vt)}function z(yt,_e,$t,Ft){_e<0&&(_e=4294967295+_e+1);for(var Vt=0,qt=Math.min(yt.length-$t,4);Vt<qt;++Vt)yt[$t+Vt]=_e>>>8*(Ft?Vt:3-Vt)&255}function F(yt,_e,$t,Ft,Vt,qt){if($t+Ft>yt.length)throw new RangeError("Index out of range");if($t<0)throw new RangeError("Index out of range")}function H(yt,_e,$t,Ft,Vt){return Vt||F(yt,0,$t,4),f(yt,_e,$t,Ft,23,4),$t+4}function K(yt,_e,$t,Ft,Vt){return Vt||F(yt,0,$t,8),f(yt,_e,$t,Ft,52,8),$t+8}y.prototype.slice=function(yt,_e){var $t,Ft=this.length;if((yt=~~yt)<0?(yt+=Ft)<0&&(yt=0):yt>Ft&&(yt=Ft),(_e=_e===void 0?Ft:~~_e)<0?(_e+=Ft)<0&&(_e=0):_e>Ft&&(_e=Ft),_e<yt&&(_e=yt),y.TYPED_ARRAY_SUPPORT)($t=this.subarray(yt,_e)).__proto__=y.prototype;else{var Vt=_e-yt;$t=new y(Vt,void 0);for(var qt=0;qt<Vt;++qt)$t[qt]=this[qt+yt]}return $t},y.prototype.readUIntLE=function(yt,_e,$t){yt|=0,_e|=0,$t||$(yt,_e,this.length);for(var Ft=this[yt],Vt=1,qt=0;++qt<_e&&(Vt*=256);)Ft+=this[yt+qt]*Vt;return Ft},y.prototype.readUIntBE=function(yt,_e,$t){yt|=0,_e|=0,$t||$(yt,_e,this.length);for(var Ft=this[yt+--_e],Vt=1;_e>0&&(Vt*=256);)Ft+=this[yt+--_e]*Vt;return Ft},y.prototype.readUInt8=function(yt,_e){return _e||$(yt,1,this.length),this[yt]},y.prototype.readUInt16LE=function(yt,_e){return _e||$(yt,2,this.length),this[yt]|this[yt+1]<<8},y.prototype.readUInt16BE=function(yt,_e){return _e||$(yt,2,this.length),this[yt]<<8|this[yt+1]},y.prototype.readUInt32LE=function(yt,_e){return _e||$(yt,4,this.length),(this[yt]|this[yt+1]<<8|this[yt+2]<<16)+16777216*this[yt+3]},y.prototype.readUInt32BE=function(yt,_e){return _e||$(yt,4,this.length),16777216*this[yt]+(this[yt+1]<<16|this[yt+2]<<8|this[yt+3])},y.prototype.readIntLE=function(yt,_e,$t){yt|=0,_e|=0,$t||$(yt,_e,this.length);for(var Ft=this[yt],Vt=1,qt=0;++qt<_e&&(Vt*=256);)Ft+=this[yt+qt]*Vt;return Ft>=(Vt*=128)&&(Ft-=Math.pow(2,8*_e)),Ft},y.prototype.readIntBE=function(yt,_e,$t){yt|=0,_e|=0,$t||$(yt,_e,this.length);for(var Ft=_e,Vt=1,qt=this[yt+--Ft];Ft>0&&(Vt*=256);)qt+=this[yt+--Ft]*Vt;return qt>=(Vt*=128)&&(qt-=Math.pow(2,8*_e)),qt},y.prototype.readInt8=function(yt,_e){return _e||$(yt,1,this.length),128&this[yt]?-1*(255-this[yt]+1):this[yt]},y.prototype.readInt16LE=function(yt,_e){_e||$(yt,2,this.length);var $t=this[yt]|this[yt+1]<<8;return 32768&$t?4294901760|$t:$t},y.prototype.readInt16BE=function(yt,_e){_e||$(yt,2,this.length);var $t=this[yt+1]|this[yt]<<8;return 32768&$t?4294901760|$t:$t},y.prototype.readInt32LE=function(yt,_e){return _e||$(yt,4,this.length),this[yt]|this[yt+1]<<8|this[yt+2]<<16|this[yt+3]<<24},y.prototype.readInt32BE=function(yt,_e){return _e||$(yt,4,this.length),this[yt]<<24|this[yt+1]<<16|this[yt+2]<<8|this[yt+3]},y.prototype.readFloatLE=function(yt,_e){return _e||$(yt,4,this.length),h(this,yt,!0,23,4)},y.prototype.readFloatBE=function(yt,_e){return _e||$(yt,4,this.length),h(this,yt,!1,23,4)},y.prototype.readDoubleLE=function(yt,_e){return _e||$(yt,8,this.length),h(this,yt,!0,52,8)},y.prototype.readDoubleBE=function(yt,_e){return _e||$(yt,8,this.length),h(this,yt,!1,52,8)},y.prototype.writeUIntLE=function(yt,_e,$t,Ft){yt=+yt,_e|=0,$t|=0,Ft||G(this,yt,_e,$t,Math.pow(2,8*$t)-1,0);var Vt=1,qt=0;for(this[_e]=255&yt;++qt<$t&&(Vt*=256);)this[_e+qt]=yt/Vt&255;return _e+$t},y.prototype.writeUIntBE=function(yt,_e,$t,Ft){yt=+yt,_e|=0,$t|=0,Ft||G(this,yt,_e,$t,Math.pow(2,8*$t)-1,0);var Vt=$t-1,qt=1;for(this[_e+Vt]=255&yt;--Vt>=0&&(qt*=256);)this[_e+Vt]=yt/qt&255;return _e+$t},y.prototype.writeUInt8=function(yt,_e,$t){return yt=+yt,_e|=0,$t||G(this,yt,_e,1,255,0),y.TYPED_ARRAY_SUPPORT||(yt=Math.floor(yt)),this[_e]=255&yt,_e+1},y.prototype.writeUInt16LE=function(yt,_e,$t){return yt=+yt,_e|=0,$t||G(this,yt,_e,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[_e]=255&yt,this[_e+1]=yt>>>8):q(this,yt,_e,!0),_e+2},y.prototype.writeUInt16BE=function(yt,_e,$t){return yt=+yt,_e|=0,$t||G(this,yt,_e,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[_e]=yt>>>8,this[_e+1]=255&yt):q(this,yt,_e,!1),_e+2},y.prototype.writeUInt32LE=function(yt,_e,$t){return yt=+yt,_e|=0,$t||G(this,yt,_e,4,4294967295,0),y.TYPED_ARRAY_SUPPORT?(this[_e+3]=yt>>>24,this[_e+2]=yt>>>16,this[_e+1]=yt>>>8,this[_e]=255&yt):z(this,yt,_e,!0),_e+4},y.prototype.writeUInt32BE=function(yt,_e,$t){return yt=+yt,_e|=0,$t||G(this,yt,_e,4,4294967295,0),y.TYPED_ARRAY_SUPPORT?(this[_e]=yt>>>24,this[_e+1]=yt>>>16,this[_e+2]=yt>>>8,this[_e+3]=255&yt):z(this,yt,_e,!1),_e+4},y.prototype.writeIntLE=function(yt,_e,$t,Ft){if(yt=+yt,_e|=0,!Ft){var Vt=Math.pow(2,8*$t-1);G(this,yt,_e,$t,Vt-1,-Vt)}var qt=0,zt=1,Ht=0;for(this[_e]=255&yt;++qt<$t&&(zt*=256);)yt<0&&Ht===0&&this[_e+qt-1]!==0&&(Ht=1),this[_e+qt]=(yt/zt|0)-Ht&255;return _e+$t},y.prototype.writeIntBE=function(yt,_e,$t,Ft){if(yt=+yt,_e|=0,!Ft){var Vt=Math.pow(2,8*$t-1);G(this,yt,_e,$t,Vt-1,-Vt)}var qt=$t-1,zt=1,Ht=0;for(this[_e+qt]=255&yt;--qt>=0&&(zt*=256);)yt<0&&Ht===0&&this[_e+qt+1]!==0&&(Ht=1),this[_e+qt]=(yt/zt|0)-Ht&255;return _e+$t},y.prototype.writeInt8=function(yt,_e,$t){return yt=+yt,_e|=0,$t||G(this,yt,_e,1,127,-128),y.TYPED_ARRAY_SUPPORT||(yt=Math.floor(yt)),yt<0&&(yt=255+yt+1),this[_e]=255&yt,_e+1},y.prototype.writeInt16LE=function(yt,_e,$t){return yt=+yt,_e|=0,$t||G(this,yt,_e,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[_e]=255&yt,this[_e+1]=yt>>>8):q(this,yt,_e,!0),_e+2},y.prototype.writeInt16BE=function(yt,_e,$t){return yt=+yt,_e|=0,$t||G(this,yt,_e,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[_e]=yt>>>8,this[_e+1]=255&yt):q(this,yt,_e,!1),_e+2},y.prototype.writeInt32LE=function(yt,_e,$t){return yt=+yt,_e|=0,$t||G(this,yt,_e,4,2147483647,-2147483648),y.TYPED_ARRAY_SUPPORT?(this[_e]=255&yt,this[_e+1]=yt>>>8,this[_e+2]=yt>>>16,this[_e+3]=yt>>>24):z(this,yt,_e,!0),_e+4},y.prototype.writeInt32BE=function(yt,_e,$t){return yt=+yt,_e|=0,$t||G(this,yt,_e,4,2147483647,-2147483648),yt<0&&(yt=4294967295+yt+1),y.TYPED_ARRAY_SUPPORT?(this[_e]=yt>>>24,this[_e+1]=yt>>>16,this[_e+2]=yt>>>8,this[_e+3]=255&yt):z(this,yt,_e,!1),_e+4},y.prototype.writeFloatLE=function(yt,_e,$t){return H(this,yt,_e,!0,$t)},y.prototype.writeFloatBE=function(yt,_e,$t){return H(this,yt,_e,!1,$t)},y.prototype.writeDoubleLE=function(yt,_e,$t){return K(this,yt,_e,!0,$t)},y.prototype.writeDoubleBE=function(yt,_e,$t){return K(this,yt,_e,!1,$t)},y.prototype.copy=function(yt,_e,$t,Ft){if($t||($t=0),Ft||Ft===0||(Ft=this.length),_e>=yt.length&&(_e=yt.length),_e||(_e=0),Ft>0&&Ft<$t&&(Ft=$t),Ft===$t||yt.length===0||this.length===0)return 0;if(_e<0)throw new RangeError("targetStart out of bounds");if($t<0||$t>=this.length)throw new RangeError("sourceStart out of bounds");if(Ft<0)throw new RangeError("sourceEnd out of bounds");Ft>this.length&&(Ft=this.length),yt.length-_e<Ft-$t&&(Ft=yt.length-_e+$t);var Vt,qt=Ft-$t;if(this===yt&&$t<_e&&_e<Ft)for(Vt=qt-1;Vt>=0;--Vt)yt[Vt+_e]=this[Vt+$t];else if(qt<1e3||!y.TYPED_ARRAY_SUPPORT)for(Vt=0;Vt<qt;++Vt)yt[Vt+_e]=this[Vt+$t];else Uint8Array.prototype.set.call(yt,this.subarray($t,$t+qt),_e);return qt},y.prototype.fill=function(yt,_e,$t,Ft){if(typeof yt=="string"){if(typeof _e=="string"?(Ft=_e,_e=0,$t=this.length):typeof $t=="string"&&(Ft=$t,$t=this.length),yt.length===1){var Vt=yt.charCodeAt(0);Vt<256&&(yt=Vt)}if(Ft!==void 0&&typeof Ft!="string")throw new TypeError("encoding must be a string");if(typeof Ft=="string"&&!y.isEncoding(Ft))throw new TypeError("Unknown encoding: "+Ft)}else typeof yt=="number"&&(yt&=255);if(_e<0||this.length<_e||this.length<$t)throw new RangeError("Out of range index");if($t<=_e)return this;var qt;if(_e>>>=0,$t=$t===void 0?this.length:$t>>>0,yt||(yt=0),typeof yt=="number")for(qt=_e;qt<$t;++qt)this[qt]=yt;else{var zt=T(yt)?yt:V(new y(yt,Ft).toString()),Ht=zt.length;for(qt=0;qt<$t-_e;++qt)this[qt+_e]=zt[qt%Ht]}return this};var X=/[^+\/0-9A-Za-z-_]/g;function J(yt){return yt<16?"0"+yt.toString(16):yt.toString(16)}function V(yt,_e){var $t;_e=_e||1/0;for(var Ft=yt.length,Vt=null,qt=[],zt=0;zt<Ft;++zt){if(($t=yt.charCodeAt(zt))>55295&&$t<57344){if(!Vt){if($t>56319){(_e-=3)>-1&&qt.push(239,191,189);continue}if(zt+1===Ft){(_e-=3)>-1&&qt.push(239,191,189);continue}Vt=$t;continue}if($t<56320){(_e-=3)>-1&&qt.push(239,191,189),Vt=$t;continue}$t=65536+(Vt-55296<<10|$t-56320)}else Vt&&(_e-=3)>-1&&qt.push(239,191,189);if(Vt=null,$t<128){if((_e-=1)<0)break;qt.push($t)}else if($t<2048){if((_e-=2)<0)break;qt.push($t>>6|192,63&$t|128)}
1524else if($t<65536){if((_e-=3)<0)break;qt.push($t>>12|224,$t>>6&63|128,63&$t|128)}else{if(!($t<1114112))throw new Error("Invalid code point");if((_e-=4)<0)break;qt.push($t>>18|240,$t>>12&63|128,$t>>6&63|128,63&$t|128)}}return qt}function Z(yt){return function(_e){var $t,Ft,Vt,qt,zt,Ht;a||l();var Kt=_e.length;if(Kt%4>0)throw new Error("Invalid string. Length must be a multiple of 4");zt=_e[Kt-2]==="="?2:_e[Kt-1]==="="?1:0,Ht=new s(3*Kt/4-zt),Vt=zt>0?Kt-4:Kt;var Gt=0;for($t=0,Ft=0;$t<Vt;$t+=4,Ft+=3)qt=i[_e.charCodeAt($t)]<<18|i[_e.charCodeAt($t+1)]<<12|i[_e.charCodeAt($t+2)]<<6|i[_e.charCodeAt($t+3)],Ht[Gt++]=qt>>16&255,Ht[Gt++]=qt>>8&255,Ht[Gt++]=255&qt;return zt===2?(qt=i[_e.charCodeAt($t)]<<2|i[_e.charCodeAt($t+1)]>>4,Ht[Gt++]=255&qt):zt===1&&(qt=i[_e.charCodeAt($t)]<<10|i[_e.charCodeAt($t+1)]<<4|i[_e.charCodeAt($t+2)]>>2,Ht[Gt++]=qt>>8&255,Ht[Gt++]=255&qt),Ht}(function(_e){if((_e=function($t){return $t.trim?$t.trim():$t.replace(/^\s+|\s+$/g,"")}(_e).replace(X,"")).length<2)return"";for(;_e.length%4!=0;)_e+="=";return _e}(yt))}function Q(yt,_e,$t,Ft){for(var Vt=0;Vt<Ft&&!(Vt+$t>=_e.length||Vt>=yt.length);++Vt)_e[Vt+$t]=yt[Vt];return Vt}function tt(yt){return!!yt.constructor&&typeof yt.constructor.isBuffer=="function"&&yt.constructor.isBuffer(yt)}function et(yt,_e,$t,Ft){return new($t||($t=Promise))(function(Vt,qt){function zt(Gt){try{Kt(Ft.next(Gt))}catch(Jt){qt(Jt)}}function Ht(Gt){try{Kt(Ft.throw(Gt))}catch(Jt){qt(Jt)}}function Kt(Gt){var Jt;Gt.done?Vt(Gt.value):(Jt=Gt.value,Jt instanceof $t?Jt:new $t(function(Xt){Xt(Jt)})).then(zt,Ht)}Kt((Ft=Ft.apply(yt,[])).next())})}class nt extends Error{constructor(_e,$t,...Ft){super(...Ft),Error.captureStackTrace&&Error.captureStackTrace(this,nt),this.name="PeraWalletConnectError",this.data=_e,this.message=$t}}const rt=new class{constructor(yt){this.listener=void 0,this.channel=yt.channel}setupListener({onReceiveMessage:yt}){this.close(),this.listener=_e=>{if(typeof _e.data=="object")try{_e.data.channel===this.channel&&yt(_e)}catch($t){console.error($t)}},window.addEventListener("message",this.listener)}sendMessage({message:yt,targetWindow:_e,origin:$t,timeout:Ft=1e3}){setTimeout(()=>{const Vt={channel:this.channel,message:yt};_e.postMessage(Vt,{targetOrigin:$t||"*"})},Ft)}close(){this.listener&&(window.removeEventListener("message",this.listener),this.listener=void 0)}}({channel:"pera-web-wallet"}),ot=700,it=50;function st(){const yt=document.querySelector('meta[name="name"]'),_e=document.querySelector('meta[name="description"]');let{title:$t}=document,Ft="";return yt instanceof HTMLMetaElement&&($t=yt.content),_e instanceof HTMLMetaElement&&(Ft=_e.content),{title:$t,description:Ft,url:window.location.origin,favicon:at()[0]}}function at(){const yt=document.getElementsByTagName("link"),_e=[];for(let $t=0;$t<yt.length;$t++){const Ft=yt[$t],Vt=Ft.getAttribute("rel");if(Vt&&Vt.toLowerCase().indexOf("icon")>-1){const qt=Ft.getAttribute("href");if(qt&&qt.toLowerCase().indexOf("https:")===-1&&qt.toLowerCase().indexOf("http:")===-1&&qt.indexOf("//")!==0){let zt=`${window.location.protocol}//${window.location.host}`;if(qt.indexOf("/")===0)zt+=qt;else{const Ht=window.location.pathname.split("/");Ht.pop(),zt+=`${Ht.join("/")}/${qt}`}_e.push(zt)}else if((qt==null?void 0:qt.indexOf("//"))===0){const zt=window.location.protocol+qt;_e.push(zt)}else qt&&_e.push(qt)}}return _e}function lt(yt){return new Promise((_e,$t)=>{try{const Ft=window.open(yt,"_blank");let Vt=0;const qt=setInterval(()=>{if(Vt+=1,Vt===it)return clearInterval(qt),void $t(new nt({type:"MESSAGE_NOT_RECEIVED"},"Couldn't open Pera Wallet, please try again."));Ft&&(Ft.closed===!0&&(clearInterval(qt),$t(new nt({type:"OPERATION_CANCELLED"},"Operation cancelled by user"))),rt.sendMessage({message:{type:"TAB_OPEN"},origin:yt,targetWindow:Ft}))},ot);rt.setupListener({onReceiveMessage:zt=>{zt.data.message.type==="TAB_OPEN_RECEIVED"&&(clearInterval(qt),_e(Ft))}})}catch(Ft){$t(Ft)}})}const ut="pera-wallet-connect-modal-wrapper",ct="pera-wallet-redirect-modal-wrapper",ht="pera-wallet-sign-txn-toast-wrapper",ft="pera-wallet-sign-txn-modal-wrapper",dt="pera-wallet-modal";function pt(yt){const _e=document.createElement("div");return _e.setAttribute("id",yt),document.body.appendChild(_e),_e}function gt(){pt(ct).innerHTML="<pera-wallet-redirect-modal></pera-wallet-redirect-modal>"}function wt(){pt(ht).innerHTML="<pera-wallet-sign-txn-toast></pera-wallet-sign-txn-toast>"}function vt(yt){const _e=document.getElementById(yt);_e&&_e.remove()}const mt={WALLET:"PeraWallet.Wallet",WALLETCONNECT:"walletconnect"};function bt(){return typeof localStorage>"u"?void 0:localStorage}function At(yt,_e){var $t;($t=bt())===null||$t===void 0||$t.setItem(mt.WALLET,JSON.stringify({type:_e||"pera-wallet",accounts:yt,selectedAccount:yt[0]}))}function Et(){var yt;const _e=(yt=bt())===null||yt===void 0?void 0:yt.getItem(mt.WALLET);return _e?JSON.parse(_e):null}function Tt(){return new Promise((yt,_e)=>{var $t,Ft;try{($t=bt())===null||$t===void 0||$t.removeItem(mt.WALLETCONNECT),(Ft=bt())===null||Ft===void 0||Ft.removeItem(mt.WALLET),yt(void 0)}catch(Vt){_e(Vt)}})}function _t(yt){const _e=yt.slice();for(let $t=_e.length-1;$t>0;$t--){const Ft=Math.floor(Math.random()*($t+1));[_e[$t],_e[Ft]]=[_e[Ft],_e[$t]]}return _e}const Rt="https://wc.perawallet.app/config.json";function St(){return function(yt,_e={}){return fetch(yt,_e).then($t=>$t.json()).then($t=>$t)}(Rt,{cache:"no-store"})}function Nt(){return et(this,void 0,void 0,function*(){let yt={bridgeURL:"",webWalletURL:"",isWebWalletAvailable:!1,shouldDisplayNewBadge:!1,shouldUseSound:!0,silent:!1,promoteMobile:!1};try{const _e=yield St();_e.web_wallet!==void 0&&_e.web_wallet_url&&(yt.isWebWalletAvailable=_e.web_wallet),_e.display_new_badge!==void 0&&(yt.shouldDisplayNewBadge=_e.display_new_badge),_e.use_sound!==void 0&&(yt.shouldUseSound=_e.use_sound),_e.silent!==void 0&&(yt.silent=_e.silent),_e.promote_mobile!==void 0&&(yt.promoteMobile=_e.promote_mobile),yt=Object.assign(Object.assign({},yt),{bridgeURL:_t(_e.servers||[])[0]||"",webWalletURL:_e.web_wallet_url||""})}catch(_e){console.log(_e)}return yt})}function Ct(yt){return Uint8Array.from(window.atob(yt),_e=>_e.charCodeAt(0))}
1524function It(yt,_e){return{id:Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3)),jsonrpc:"2.0",method:yt,params:_e}}function Pt(){return typeof navigator<"u"}function Ot(){return Pt()&&/Android/i.test(navigator.userAgent)}function Lt(){return Pt()&&/iPhone|iPad|iPod/i.test(navigator.userAgent)}function Mt(){return Pt()&&/iPhone|iPod|Android/i.test(navigator.userAgent)}function Ut(){if(!Pt())return null;const{userAgent:yt}=navigator;let _e;return _e=yt.match(/DuckDuckGo/i)?"DuckDuckGo":yt.match(/OPX/i)?"Opera GX":navigator.brave?"Brave":Bowser.getParser(navigator.userAgent).getBrowserName(),_e}const Bt="perawallet-wc://",Wt="https://perawallet.app/download/";function Dt(yt){return{ROOT:`https://${yt}`,CONNECT:`https://${yt}/connect`,TRANSACTION_SIGN:`https://${yt}/transaction/sign`}}function xt({method:yt,signTxnRequestParams:_e,signer:$t,chainId:Ft,webWalletURL:Vt,resolve:qt,reject:zt}){const Ht=Dt(Vt);(function(){et(this,void 0,void 0,function*(){try{const Kt=yield lt(Ht.TRANSACTION_SIGN);if(Kt){let Jt;yt==="SIGN_TXN"?Jt={type:"SIGN_TXN",txn:_e}:yt==="SIGN_DATA"&&$t&&Ft&&(Jt={type:"SIGN_DATA",data:_e,signer:$t,chainId:Ft}),Jt&&rt.sendMessage({message:Jt,origin:Ht.TRANSACTION_SIGN,targetWindow:Kt})}const Gt=setInterval(()=>{(Kt==null?void 0:Kt.closed)===!0&&(zt(new nt({type:`${yt}_CANCELLED`},"Transaction signing is cancelled by user.")),clearInterval(Gt))},2e3);rt.setupListener({onReceiveMessage:Jt=>function({event:Xt,newPeraWalletTab:Zt,method:er,resolve:tr,reject:rr}){switch(Xt.data.message.type){case"SIGN_TXN_CALLBACK":Zt==null||Zt.close(),tr(Xt.data.message.signedTxns.map(ar=>Ct(ar.signedTxn)));break;case"SIGN_DATA_CALLBACK":Zt==null||Zt.close(),tr(Xt.data.message.signedData.map(ar=>Ct(ar.signedData)));break;case"SIGN_TXN_NETWORK_MISMATCH":rr(new nt({type:`${er}_NETWORK_MISMATCH`,detail:Xt.data.message.error},Xt.data.message.error||"Network mismatch"));break;case"SIGN_TXN_CALLBACK_ERROR":Zt==null||Zt.close(),rr(new nt({type:`${er}_CANCELLED`},Xt.data.message.error));break;case"SESSION_DISCONNECTED":Zt==null||Zt.close(),Tt(),rr(new nt({type:"SESSION_DISCONNECTED",detail
1524:Xt.data.message.error},Xt.data.message.error))}}({event:Jt,newPeraWalletTab:Kt,method:yt,resolve:qt,reject:zt})})}catch(Kt){zt(Kt)}})})()}function Yt({webWalletURL:yt,chainId:_e,resolve:$t,reject:Ft}){const Vt=Dt(yt);return function(){return et(this,void 0,void 0,function*(){try{const zt=yield lt(Vt.CONNECT);zt&&rt.sendMessage({message:{type:"CONNECT",data:Object.assign(Object.assign({},st()),{chainId:_e})},origin:Vt.CONNECT,targetWindow:zt});const Ht=setInterval(()=>{(zt==null?void 0:zt.closed)===!0&&(Ft(new nt({type:"CONNECT_CANCELLED"},"Connect is cancelled by user")),clearInterval(Ht),qt())},2e3);rt.setupListener({onReceiveMessage:Kt=>function({event:Gt,newPeraWalletTab:Jt,resolve:Xt,reject:Zt}){if(Xt&&Gt.data.message.type==="CONNECT_CALLBACK"){const er=Gt.data.message.data.addresses;At(er,"pera-wallet-web"),Xt(er),vt(ut),Jt==null||Jt.close()}else Gt.data.message.type==="CONNECT_NETWORK_MISMATCH"&&(Zt(new nt({type:"CONNECT_NETWORK_MISMATCH",detail:Gt.data.message.error},Gt.data.message.error||"Your wallet is connected to a different network to this dApp. Update your wallet to the correct network (MainNet or TestNet) to continue.")),vt(ut),Jt==null||Jt.close())}({event:Kt,newPeraWalletTab:zt,resolve:$t,reject:Ft})})}catch(zt){qt(),Ft(zt)}})};function qt(){vt(ut)}}function kt({isWebWalletAvailable:yt,shouldDisplayNewBadge:_e,shouldUseSound:$t,compactMode:Ft,promoteMobile:Vt,singleAccount:qt,selectedAccount:zt}){return{open:(Ht={isWebWalletAvailable:yt,shouldDisplayNewBadge:_e,shouldUseSound:$t,compactMode:Ft,promoteMobile:Vt,singleAccount:qt,selectedAccount:zt},Kt=>{if(!document.getElementById(ut)){const Gt=pt(ut),Jt=`${Kt}&algorand=true`,{isWebWalletAvailable:Xt,shouldDisplayNewBadge:Zt,shouldUseSound:er,compactMode:tr,promoteMobile:rr,singleAccount:ar,selectedAccount:nr}=Ht;Gt.innerHTML=`<pera-wallet-connect-modal uri="${Jt}" is-web-wallet-avaliable="${Xt}" should-display-new-badge="${Zt}" should-use-sound="${er}" compact-mode="${tr}" promote-mobile="${rr}" single-account="${ar}" selected-account="${nr||""}"></pera-wallet-connect-modal>`}}),close:()=>vt(ut)};var Ht}class jt{constructor(_e){this.bridge=(_e==null?void 0:_e.bridge)||"",this.connector=null,this.shouldShowSignTxnToast=(_e==null?void 0:_e.shouldShowSignTxnToast)===void 0||_e.shouldShowSignTxnToast,this.chainId=_e==null?void 0:_e.chainId,this.compactMode=(_e==null?void 0:_e.compactMode)||!1,this.singleAccount=(_e==null?void 0:_e.singleAccount)||!1}get platform(){return function(){const _e=Et();let $t=null;return(_e==null?void 0:_e.type)==="pera-wallet"?$t="mobile":(_e==null?void 0:_e.type)==="pera-wallet-web"&&($t="web"),$t}()}get isConnected(){var _e;return this.platform==="mobile"?!!this.connector:this.platform==="web"&&!!(!((_e=Et())===null||_e===void 0)&&_e.accounts.length)}get isPeraDiscoverBrowser(){return this.checkIsPeraDiscoverBrowser()}connect(_e){return new Promise(($t,Ft)=>et(this,void 0,void 0,function*(){var Vt;try{if(!((Vt=this.connector)===null||Vt===void 0)&&Vt.connected)try{yield this.connector.killSession()}catch{}const{isWebWalletAvailable:qt,bridgeURL:zt,webWalletURL:Ht,shouldDisplayNewBadge:Kt,shouldUseSound:Gt,promoteMobile:Jt}=yield Nt(),Xt=Yt({resolve:$t,reject:Ft,webWalletURL:Ht,chainId:this.chainId,isCompactMode:this.compactMode});qt&&(window.onWebWalletConnect=Xt),this.connector=new WalletConnect({bridge:this.bridge||zt||"https://bridge.walletconnect.org",qrcodeModal:kt({isWebWalletAvailable:qt,shouldDisplayNewBadge:Kt,shouldUseSound:Gt,compactMode:this.compactMode,promoteMobile:Jt,singleAccount:this.singleAccount,selectedAccount:_e==null?void 0:_e.selectedAccount})}),yield this.connector.createSession({chainId:this.chainId||4160}),function(Zt,er){var tr,rr,ar,nr;const cr=document.getElementById(Zt),fr=(rr=(tr=cr==null?void 0:cr.querySelector(Zt.replace("-wrapper","")))===null||tr===void 0?void 0:tr.shadowRoot)===null||rr===void 0?void 0:rr.querySelector(`.${dt}`),vr=(nr=(ar=fr==null?void 0:fr.querySelector("pera-wallet-modal-header"))===null||ar===void 0?void 0:ar.shadowRoot)===null||nr===void 0?void 0:nr.getElementById("pera-wallet-modal-header-close-button");vr==null||vr.addEventListener("click",()=>{er(),vt(Zt)})}(ut,()=>Ft(new nt({type:"CONNECT_MODAL_CLOSED"},"Connect modal is closed by user"))),this.connector.on("connect",(Zt,er)=>{var tr,rr;Zt&&Ft(Zt),$t(((tr=this.connector)===null||tr===void 0?void 0:tr.accounts)||[]),At(((rr=this.connector)===null||rr===void 0?void 0:rr.accounts)||[])})}catch(qt){console.log(qt),Ft(new nt({type:"SESSION_CONNECT",detail:qt},qt.message||"There was an error while connecting to Pera Wallet"))}}))}reconnectSession(){return new Promise((_e,$t)=>et(this,void 0,void 0,function*(){var Ft,Vt;try{const qt=Et();if(!qt)return void _e([]);
1524if((qt==null?void 0:qt.type)==="pera-wallet-web"){const{isWebWalletAvailable:zt}=yield Nt();zt?_e(qt.accounts||[]):$t(new nt({type:"SESSION_RECONNECT",detail:"Pera Web is not available"},"Pera Web is not available"))}this.connector&&_e(this.connector.accounts||[]),this.bridge=((Ft=function(){var zt;const Ht=(zt=bt())===null||zt===void 0?void 0:zt.getItem(mt.WALLETCONNECT);return Ht?JSON.parse(Ht):null}())===null||Ft===void 0?void 0:Ft.bridge)||"",this.bridge&&(this.connector=new WalletConnect({bridge:this.bridge}),_e(((Vt=this.connector)===null||Vt===void 0?void 0:Vt.accounts)||[])),this.isConnected||_e([])}catch(qt){yield this.disconnect(),$t(new nt({type:"SESSION_RECONNECT",detail:qt},qt.message||"There was an error while reconnecting to Pera Wallet"))}}))}disconnect(){var _e;return et(this,void 0,void 0,function*(){let $t;this.isConnected&&this.platform==="mobile"&&($t=(_e=this.connector)===null||_e===void 0?void 0:_e.killSession(),$t==null||$t.then(()=>{this.connector=null})),yield Tt()})}signTransactionWithMobile(_e){return et(this,void 0,void 0,function*(){const $t=It("algo_signTxn",[_e]);try{try{const{silent:Ft}=yield Nt(),Vt=(yield this.connector.sendCustomRequest($t,{forcePushNotification:!Ft})).filter(Boolean);return typeof Vt[0]=="string"?Vt.map(Ct):Vt.map(qt=>Uint8Array.from(qt))}catch(Ft){return yield Promise.reject(new nt({type:"SIGN_TRANSACTIONS",detail:Ft},Ft.message||"Failed to sign transaction"))}}finally{vt(ct),vt(ht)}})}signTransactionWithWeb(_e,$t){return new Promise((Ft,Vt)=>xt({signTxnRequestParams:_e,webWalletURL:$t,method:"SIGN_TXN",resolve:Ft,reject:Vt}))}signDataWithMobile({data:_e,signer:$t,chainId:Ft}){return et(this,void 0,void 0,function*(){const Vt=It("algo_signData",_e.map(qt=>Object.assign(Object.assign({},qt),{signer:$t,chainId:Ft})));try{try{const{silent:qt}=yield Nt(),zt=(yield this.connector.sendCustomRequest(Vt,{forcePushNotification:!qt})).filter(Boolean);return typeof zt[0]=="string"?zt.map(Ct):zt.map(Ht=>Uint8Array.from(Ht))}catch(qt){return yield Promise.reject(new nt({type:"SIGN_TRANSACTIONS",detail:qt},qt.message||"Failed to sign transaction"))}}finally{vt(ct),vt(ht)}})}signDataWithWeb({data:_e,signer:$t,chainId:Ft,webWalletURL:Vt}){return new Promise((qt,zt)=>xt({method:"SIGN_DATA",signTxnRequestParams:_e,signer:$t,chainId:Ft,webWalletURL:Vt,resolve:qt,reject:zt}))}checkIsPeraDiscoverBrowser(){return window.navigator.userAgent.includes("pera")}signTransaction(_e,$t){return et(this,void 0,void 0,function*(){if(this.platform==="mobile"&&(Mt()?gt():!Mt()&&this.shouldShowSignTxnToast&&wt(),!this.connector))throw new Error("PeraWalletConnect was not initialized correctly.");const Ft=_e.flatMap(Vt=>Vt.map(qt=>function(zt,Ht){let Kt;Ht&&!(zt.signers||[]).includes(Ht)&&(Kt=[]);const Gt={txn:(Jt=zt.txn,Buffer.from(algosdk.encodeUnsignedTransaction(Jt)).toString("base64"))};var Jt;return Array.isArray(Kt)&&(Gt.signers=Kt),zt.authAddr&&(Gt.authAddr=zt.authAddr),zt.message&&(Gt.message=zt.message),zt.msig&&(Gt.msig=zt.msig),Gt}(qt,$t)));if(this.platform==="web"){const{webWalletURL:Vt}=yield Nt();return this.signTransactionWithWeb(Ft,Vt)}return this.signTransactionWithMobile(Ft)})}signData(_e,$t){return et(this,void 0,void 0,function*(){const Ft=this.chainId||4160;if(this.platform==="mobile"&&(Mt()?gt():!Mt()&&this.shouldShowSignTxnToast&&wt(),!this.connector))throw new Error("PeraWalletConnect was not initialized correctly.");if(this.platform==="web"){const{webWalletURL:qt}=yield Nt();return this.signDataWithWeb({data:_e,signer:$t,chainId:Ft,webWalletURL:qt})}const Vt=_e.map(qt=>Object.assign(Object.assign({},qt),{data:Buffer.from(qt.data).toString("base64")}));return this.signDataWithMobile({data:Vt,signer:$t,chainId:Ft})})}}typeof window<"u"&&(window.global=window,window.Buffer=window.Buffer||y,__vitePreload(()=>import("./App-428f5096-DXUg1-Yu.js"),[]));const index=Object.freeze(Object.defineProperty({__proto__:null,PeraWalletConnect:jt},Symbol.toStringTag,{value:"Module"})),ALGORAND_CONFIG={ALGOD_TOKEN:"",ALGOD_SERVER:"https://testnet-api.algonode.cloud",ALGOD_PORT:443,APP_ID:742069032,PLATFORM_ADDRESS:"DG2JJFI63T27GEWPPUKWXPYNSE3BCMWJNG2JRFUQTL4XTMPDHCGLQQQCDE",NETWORK:"TestNet",CHAIN_ID:416002,PERA_WALLET_APP_NAME:"Cookie Market",PERA_WALLET_APP_DESCRIPTION:"Decentralized Data Marketplace"},MICROALGOS_PER_ALGO=1e6;function algoToMicroalgos(yt){return Math.floor(yt*MICROALGOS_PER_ALGO)}function microalgosToAlgo(yt){return typeof yt=="bigint"?Number(yt)/MICROALGOS_PER_ALGO:yt/MICROALGOS_PER_ALGO}const COOKIE_MARKET_ABI={name:"CookieMarketContract",methods:[{name:"purchase_data_package",args:[{type:"pay",name:"payment"},{type:"account",name:"seller_address"}],readonly:!1,returns:{type:"void"},desc:`Accept payment and credit seller's balance (90%) and platform (10%). 1525Buyer calls this method with payment.`},{name:"withdraw_seller_earnings",args:[],readonly:!1,returns:{type:"void"},desc:"Allow seller to withdraw their balance"},{name:"withdraw_platform_fees",args:[],readonly:!1,returns:{type:"void"},desc:"Allow platform to withdraw fees"},{name:"get_seller_balance",args:[{type:"account",name:"seller_address"}],readonly:!0,returns:{type:"uint64"},desc:"Get seller's current balance"},{name:"get_platform_balance",args:[],readonly:!0,returns:{type:"uint64"},desc:"Get platform's current balance"}],networks:{}},algodClient=new algosdk.Algodv2(ALGORAND_CONFIG.ALGOD_TOKEN,ALGORAND_CONFIG.ALGOD_SERVER,ALGORAND_CONFIG.ALGOD_PORT),peraWallet=new jt({shouldShowSignTxnToast:!0,chainId:ALGORAND_CONFIG.CHAIN_ID,app:{name:ALGORAND_CONFIG.PERA_WALLET_APP_NAME,description:ALGORAND_CONFIG.PERA_WALLET_APP_DESCRIPTION}});class AlgorandService{constructor(){this.accountAddress=null,this.initialized=!1}async connectWallet(){var _e,$t;try{console.log("ð Starting wallet connection...");const Ft=await peraWallet.connect();if(console.log("ð± Pera returned accounts:",Ft),Ft.length===0)throw new Error("No accounts found");return this.accountAddress=Ft[0],this.initialized=!0,console.log("â Wallet connected:",this.accountAddress),(_e=peraWallet.connector)==null||_e.on("disconnect",()=>{console.log("ð Wallet disconnected"),this.disconnectWallet()}),this.accountAddress}catch(Ft){throw console.error("â Wallet connection error:",Ft),(($t=Ft==null?void 0:Ft.data)==null?void 0:$t.type)!=="CONNECT_MODAL_CLOSED"?Ft:new Error("Connection cancelled")}}async withdrawSellerEarningsAutoConnect(_e){var $t,Ft,Vt,qt;try{if(!algosdk.isValidAddress(_e))throw new Error("Invalid seller address");if(console.log("ð° Starting auto-connect withdrawal for seller:",_e),peraWallet.isConnected){console.log("ð± Pera wallet already connected, verifying account...");try{const er=await peraWallet.reconnectSession();if(!er||er.length===0||er[0]!==_e){console.log("â ï¸ Wrong wallet connected, disconnecting..."),await peraWallet.disconnect(),console.log("ð Connecting to correct wallet...");const tr=await peraWallet.connect();if(!tr||tr.length===0)throw new Error("No accounts found");if(tr[0]!==_e)throw await peraWallet.disconnect(),new Error(`Please connect the correct seller wallet (${_e.slice(0,6)}...${_e.slice(-4)})`);console.log("â Connected to correct seller wallet")}}catch(er){console.error("Error verifying connection:",er),await peraWallet.disconnect();const tr=await peraWallet.connect();if(!tr||tr.length===0||tr[0]!==_e)throw new Error(`Please connect the correct seller wallet (${_e.slice(0,6)}...${_e.slice(-4)})`)}}else{console.log("ð± Pera wallet not connected, connecting now...");try{const er=await peraWallet.connect();if(!er||er.length===0)throw new Error("No accounts found in Pera wallet");if(er[0]!==_e)throw console.warn(`â ï¸ Connected to wrong wallet. Expected: ${_e}, Got: ${er[0]}`),await peraWallet.disconnect(),new Error(`Please connect the correct seller wallet (${_e.slice(0,6)}...${_e.slice(-4)})`);console.log("â Connected to correct seller wallet")}catch(er){throw(($t=er==null?void 0:er.data)==null?void 0:$t.type)==="CONNECT_MODAL_CLOSED"?new Error("Wallet connection cancelled"):er}}console.log("ð¸ Proceeding with withdrawal...");
1525const zt=await algodClient.getTransactionParams().do();zt.fee=2e3,zt.flatFee=!0;const Kt=new algosdk.ABIContract(COOKIE_MARKET_ABI).getMethodByName("withdraw_seller_earnings"),Gt=new AtomicTransactionComposer,Jt=async(er,tr)=>{const rr=er.map((nr,cr)=>({txn:nr,signers:tr.includes(cr)?[_e]:[]})),ar=await peraWallet.signTransaction([rr]);return tr.map(nr=>ar[nr])};Gt.addMethodCall({appID:ALGORAND_CONFIG.APP_ID,method:Kt,sender:_e,suggestedParams:zt,signer:Jt,methodArgs:[],boxes:[{appIndex:ALGORAND_CONFIG.APP_ID,name:algosdk.decodeAddress(_e).publicKey}]});const Zt=(await Gt.execute(algodClient,4)).txIDs[0];return console.log("â
Withdrawal successful:",Zt),this.accountAddress=_e,this.initialized=!0,Zt}catch(zt){throw console.error("â Auto-connect withdrawal failed:",zt),(Ft=zt.message)!=null&&Ft.includes("Please connect the correct seller wallet")?zt:(Vt=zt.message)!=null&&Vt.includes("Wallet connection cancelled")?new Error("Please complete the wallet connection to withdraw"):(qt=zt.message)!=null&&qt.includes("No balance to withdraw")?zt:new Error(`Withdrawal failed: ${zt.message||"Unknown error"}`)}}async withdrawSellerEarningsDirect(_e){try{if(!algosdk.isValidAddress(_e))throw new Error("Invalid seller address");console.log("ð° Direct withdrawal for seller:",_e);const $t=await algodClient.getTransactionParams().do();$t.fee=2e3,$t.flatFee=!0;const Vt=new algosdk.ABIContract(COOKIE_MARKET_ABI).getMethodByName("withdraw_seller_earnings"),qt=new AtomicTransactionComposer,zt=async(Gt,Jt)=>{const Xt=Gt.map((er,tr)=>({txn:er,signers:Jt.includes(tr)?[_e]:[]})),Zt=await peraWallet.signTransaction([Xt]);return Jt.map(er=>Zt[er])};qt.addMethodCall({appID:ALGORAND_CONFIG.APP_ID,method:Vt,sender:_e,suggestedParams:$t,signer:zt,methodArgs:[],boxes:[{appIndex:ALGORAND_CONFIG.APP_ID,name:algosdk.decodeAddress(_e).publicKey}]});const Kt=(await qt.execute(algodClient,4)).txIDs[0];return console.log("â
Withdrawal successful:",Kt),Kt}catch($t){throw console.error("â Withdrawal failed:",$t),$t}}async disconnectAllWallets(){try{if(console.log("ð§¹ Disconnecting all wallet sessions..."),peraWallet&&peraWallet.isConnected)try{await peraWallet.disconnect(),console.log("â
Main wallet disconnected")}catch($t){console.error("Error disconnecting main wallet:",$t)}const _e=window.__buyerPeraWallet;if(_e&&_e.isConnected)try{await _e.disconnect(),console.log("â
Buyer wallet disconnected")}catch($t){console.error("Error disconnecting buyer wallet:",$t)}localStorage.removeItem("walletconnect"),localStorage.removeItem("buyer_wallet_address_temp"),sessionStorage.removeItem("buyer_wallet_address"),this.accountAddress=null,this.initialized=!1,console.log("â
All wallets disconnected and cleaned up")}catch(_e){console.error("Error during cleanup:",_e)}}async connectToSpecificWallet(_e){var $t,Ft;try{console.log(`ð¯ Attempting to connect to specific wallet: ${_e}`);const Vt=this.getConnectedAddress();if(Vt===_e&&this.isConnected())return console.log("â
Already connected to the target wallet"),Vt;const qt=await peraWallet.connect();if(qt.length===0)throw new Error("No accounts found");const zt=qt[0];if(zt!==_e)throw console.warn(`â ï¸ Connected to different wallet. Expected: ${_e}, Got: ${zt}`),await this.disconnectWallet(),new Error(`Please connect the wallet ending in ...${_e.slice(-8)}`);return this.accountAddress=zt,this.initialized=!0,console.log("â
Successfully connected to target wallet:",this.accountAddress),($t=peraWallet.connector)==null||$t.on("disconnect",()=>{console.log("ð Wallet disconnected"),this.disconnectWallet()}),this.accountAddress}catch(Vt){throw console.error("â Failed to connect to specific wallet:",Vt),this.accountAddress=null,this.initialized=!1,((Ft=Vt==null?void 0:Vt.data)==null?void 0:Ft.type)==="CONNECT_MODAL_CLOSED"?new Error("Connection cancelled"):Vt}}async withdrawSellerEarningsSimple(_e){var $t,Ft;try{if(!algosdk.isValidAddress(_e))throw new Error("Invalid seller address");console.log("ð° Starting simple withdrawal for seller:",_e),(!this.isConnected()||this.getConnectedAddress()!==_e)&&(console.log("ð± Need to connect wallet first..."),await this.connectToSpecificWallet(_e));const Vt=await algodClient.getTransactionParams().do();Vt.fee=2e3,Vt.flatFee=!0;
1525const zt=new algosdk.ABIContract(COOKIE_MARKET_ABI).getMethodByName("withdraw_seller_earnings"),Ht=new AtomicTransactionComposer,Kt=async(Xt,Zt)=>{const er=Xt.map((rr,ar)=>({txn:rr,signers:Zt.includes(ar)?[_e]:[]})),tr=await peraWallet.signTransaction([er]);return Zt.map(rr=>tr[rr])};Ht.addMethodCall({appID:ALGORAND_CONFIG.APP_ID,method:zt,sender:_e,suggestedParams:Vt,signer:Kt,methodArgs:[],boxes:[{appIndex:ALGORAND_CONFIG.APP_ID,name:algosdk.decodeAddress(_e).publicKey}]});const Jt=(await Ht.execute(algodClient,4)).txIDs[0];return console.log("â
Withdrawal successful:",Jt),Jt}catch(Vt){throw console.error("â Withdrawal failed:",Vt),($t=Vt.message)!=null&&$t.includes("Connection cancelled")?new Error("Wallet connection cancelled. Please try again."):((Ft=Vt.message)!=null&&Ft.includes("Please connect the wallet ending in"),Vt)}}async reconnectSession(){var _e;try{if(!localStorage.getItem("walletconnect"))return console.log("No WalletConnect session found in localStorage"),null;const Ft=await peraWallet.reconnectSession();return Ft&&Ft.length>0?(this.accountAddress=Ft[0],this.initialized=!0,(_e=peraWallet.connector)==null||_e.on("disconnect",()=>{this.disconnectWallet()}),console.log("â
Reconnected to Pera session:",this.accountAddress),this.accountAddress):(console.log("No accounts found in reconnected session"),null)}catch($t){return console.error("Error reconnecting session:",$t),localStorage.removeItem("walletconnect"),null}}async disconnectWallet(){await peraWallet.disconnect(),this.accountAddress=null,this.initialized=!1}getConnectedAddress(){return this.accountAddress}isConnected(){return this.initialized&&peraWallet.isConnected}getConnectionState(){return{accountAddress:this.accountAddress,initialized:this.initialized,peraConnected:peraWallet.isConnected}}async getAccountBalance(_e){try{const $t=_e||this.accountAddress;if(!$t)throw new Error("No address provided");return(await algodClient.accountInformation($t).do()).amount}catch($t){return console.error("Error getting balance:",$t),0}}async debugContractState(){var _e,$t;try{console.log("ð Debugging Smart Contract State...");const Ft=await algodClient.getApplicationByID(ALGORAND_CONFIG.APP_ID).do();console.log("ð± Application Info:",Ft),console.log("ð Global State:"),Ft.params&&Ft.params["global-state"]?Ft.params["global-state"].forEach(Ht=>{const Kt=Buffer.from(Ht.key,"base64").toString();let Gt;Ht.value.type===1?Gt=Buffer.from(Ht.value.bytes,"base64").toString():Ht.value.type===2&&(Gt=Ht.value.uint),console.log(` ${Kt}: ${Gt}`)}):console.log(" No global state found!"),(($t=(_e=Ft.params)==null?void 0:_e["global-state"])==null?void 0:$t.some(Ht=>Buffer.from(Ht.key,"base64").toString()==="platform_balance"))||(console.error("â platform_balance not found in global state!"),console.log("ð This might mean the contract needs to be initialized or updated."));const qt=algosdk.getApplicationAddress(ALGORAND_CONFIG.APP_ID),zt=await algodClient.accountInformation(qt.toString()).do();console.log(`ð° App Address Balance: ${microalgosToAlgo(zt.amount)} ALGO`),console.log(`ð App Address: ${qt.toString()}`)}catch(Ft){console.error("â Error debugging contract:",Ft)}}async checkAppSchema(){var _e,$t;try{console.log("ð Checking app schema...");const Ft=await algodClient.getApplicationByID(ALGORAND_CONFIG.APP_ID).do();console.log("ð Schema Info:"),console.log(" Global State Schema:",Ft.params["global-state-schema"]),console.log(" Local State Schema:",Ft.params["local-state-schema"]),console.log(" Extra Pages:",Ft.params["extra-program-pages"]);const Vt=((_e=Ft.params["global-state-schema"])==null?void 0:_e["num-uint"])||0,qt=(($t=Ft.params["global-state-schema"])==null?void 0:$t["num-byte-slice"])||0;console.log(` Global Ints allocated: ${Vt}`),console.log(` Global Bytes allocated: ${qt}`),Vt===0&&(console.error("â No global integer storage allocated!"),console.log("ð The contract needs to be redeployed with proper schema.")),console.log(" Creator:",Ft.params.creator)}catch(Ft){console.error("Error checking schema:",Ft)}}async initializeWithOptIn(){var _e;try{if(!this.accountAddress)throw new Error("Wallet not connected");console.log("ð Attempting OptIn to initialize state...");const $t=await algodClient.getTransactionParams().do(),Ft=algosdk.makeApplicationOptInTxnFromObject({sender:this.accountAddress,appIndex:ALGORAND_CONFIG.APP_ID,suggestedParams:$t}),Vt=await peraWallet.signTransaction([[{txn:Ft,signers:[this.accountAddress]}]]),{txId:qt}=await algodClient.sendRawTransaction(Vt[0]).do();return await algosdk.waitForConfirmation(algodClient,qt,4),console.log("â
OptIn complete! TxID:",qt),qt}catch($t){if(console.error("â OptIn failed:",$t),(_e=$t.message)!=null&&_e.includes("already opted
1525in"))return console.log("â Already opted in"),"already-opted-in";throw $t}}async debugBoxStorage(_e){try{console.log("ð Debugging Box Storage...");const $t=algodClient,Ft=ALGORAND_CONFIG.APP_ID,Vt=await $t.getApplicationByID(Ft).do();console.log("ð± App Info:",Vt);const qt=await $t.getApplicationBoxes(Ft).do();if(console.log("ð¦ Total boxes:",qt.boxes.length),qt.boxes.length>0){console.log("ð¦ Box names:");for(const Ht of qt.boxes){const Kt=Buffer.from(Ht.name,"base64");console.log(" - Name (hex):",Kt.toString("hex")),console.log(" - Name (base64):",Ht.name);try{const Jt=(await $t.getApplicationBoxByName(Ft,Ht.name).do()).value;if(console.log(" - Value (raw):",Jt),Jt.length===8){const Zt=new DataView(new Uint8Array(Jt).buffer).getBigUint64(0,!1);console.log(" - Value (uint64):",Zt.toString()),console.log(" - Value (ALGO):",Number(Zt)/1e6)}}catch(Gt){console.error(" - Error reading box:",Gt)}}}console.log(` 1526ð Checking specific seller box...`);const zt=algosdk.decodeAddress(_e).publicKey;console.log("Seller public key:",zt),console.log("Seller key (base64):",Buffer.from(zt).toString("base64"));try{const Ht=await $t.getApplicationBoxByName(Ft,zt).do();if(console.log("â Seller box found:",Ht),Ht.value&&Ht.value.length===8){const Gt=new DataView(new Uint8Array(Ht.value).buffer).getBigUint64(0,!1);console.log("Seller balance (microAlgos):",Gt.toString()),console.log("Seller balance (ALGO):",Number(Gt)/1e6)}}catch(Ht){console.log("â Seller box not found or error:",Ht.message)}}catch($t){console.error("Error debugging box storage:",$t)}}async debugRecentTransactions(){var _e;try{console.log("ð Checking recent app transactions...");const $t=algosdk.getApplicationAddress(ALGORAND_CONFIG.APP_ID).toString();console.log("App address:",$t);const Ft=await algodClient.lookupAccountTransactions($t).limit(10).do();if(console.log(`Found ${((_e=Ft.transactions)==null?void 0:_e.length)||0} recent transactions`),Ft.transactions)for(const Vt of Ft.transactions)console.log(` 1527ð Transaction:`,Vt.id),console.log(" Type:",Vt["tx-type"]),console.log(" Sender:",Vt.sender),console.log(" Round:",Vt["confirmed-round"]),Vt["application-transaction"]&&console.log(" App Call:",Vt["application-transaction"]),Vt["inner-txns"]&&console.log(" Inner transactions:",Vt["inner-txns"].length)}catch($t){console.error("Error checking transactions:",$t)}}async purchaseDataPackage(_e,$t,Ft){try{if(console.log("ð¯ Creating purchase transaction"),console.log(" - Package ID:",_e),console.log(" - Price in ALGO:",$t),console.log(" - Seller address:",Ft),!this.accountAddress)throw new Error("Wallet not connected");if(typeof $t!="number"||isNaN($t)||$t<=0)throw new Error(`Invalid price: ${$t}`);if(!algosdk.isValidAddress(Ft))throw new Error(`Invalid seller address: ${Ft}`);const Vt=await algodClient.getTransactionParams().do();console.log(" - Suggested params from algod:",Vt);const qt=algosdk.getApplicationAddress(ALGORAND_CONFIG.APP_ID).toString();console.log(" - App address:",qt);const zt=algoToMicroalgos($t);console.log(" - Amount in microAlgos:",zt);const Ht=algosdk.makePaymentTxnWithSuggestedParamsFromObject({sender:this.accountAddress,receiver:qt,amount:zt,suggestedParams:Vt});console.log("â Payment transaction created");const Kt=async(ar,nr)=>{console.log("ðï¸ Pera Wallet signer called"),console.log(" - Transaction group size:",ar.length),console.log(" - Indexes to sign:",nr);const cr=ar.map((vr,xr)=>({txn:vr,signers:nr.includes(xr)?[this.accountAddress]:[]})),fr=await peraWallet.signTransaction([cr]);return console.log(" - Signed transactions received:",fr.length),nr.map(vr=>fr[vr])},Gt={txn:Ht,signer:Kt},Xt=new algosdk.ABIContract(COOKIE_MARKET_ABI).getMethodByName("purchase_data_package"),Zt=new AtomicTransactionComposer,er=await algodClient.getTransactionParams().do();er.fee=2e3,er.flatFee=!0,Zt.addMethodCall({appID:ALGORAND_CONFIG.APP_ID,method:Xt,sender:this.accountAddress,suggestedParams:er,signer:Kt,methodArgs:[Gt,Ft],boxes:[{appIndex:ALGORAND_CONFIG.APP_ID,name:algosdk.decodeAddress(Ft).publicKey}]}),console.log("ð¤ Sending atomic transaction group...");const rr=(await Zt.execute(algodClient,4)).txIDs[0];return console.log("â Purchase successful:",rr),console.log("ð View on explorer:",this.getExplorerUrl(rr)),rr}catch(Vt){throw console.error("â Purchase failed:",Vt),Vt}}async purchaseDataPackageAsBuyer(_e,$t,Ft,Vt){try{if(console.log("ð Creating BUYER purchase transaction"),console.log(" - Package ID:",_e),console.log(" - Price in ALGO:",$t),console.log(" - Seller address:",Ft),console.log(" - Buyer address:",Vt),typeof $t!="number"||isNaN($t)||$t<=0)throw new Error(`Invalid price: ${$t}`);if(!algosdk.isValidAddress(Ft))throw new Error(`Invalid seller address: ${Ft}`);if(!algosdk.isValidAddress(Vt))throw new Error(`Invalid buyer address: ${Vt}`);const qt=await algodClient.getTransactionParams().do(),zt=algosdk.getApplicationAddress(ALGORAND_CONFIG.APP_ID).toString();console.log(" - App address:",zt),console.log(" - App ID:",ALGORAND_CONFIG.APP_ID),ALGORAND_CONFIG.APP_ID!==742069032&&console.warn("â ï¸ App ID mismatch! Expected 742069032, got:",ALGORAND_CONFIG.APP_ID);const Ht=algoToMicroalgos($t);console.log(" - Amount in microAlgos:",Ht);const Kt=algosdk.makePaymentTxnWithSuggestedParamsFromObject({sender:Vt,receiver:zt,amount:Ht,suggestedParams:qt});console.log("â Buyer payment transaction created");const Gt=window.__buyerPeraWallet;if(!Gt)throw new Error("Buyer wallet not properly connected");const Jt=async(cr,fr)=>{console.log("ð Buyer signer called");const vr=cr.map((Sr,Tr)=>({txn:Sr,signers:fr.includes(Tr)?[Vt]:[]})),xr=await Gt.signTransaction([vr]);return console.log(" - Buyer signed transactions received:",xr.length),fr.map(Sr=>xr[Sr])},Xt={txn:Kt,signer:Jt},er=new algosdk.ABIContract(COOKIE_MARKET_ABI).getMethodByName("purchase_data_package"),tr=new AtomicTransactionComposer,rr=await algodClient.getTransactionParams().do();rr.fee=2e3,rr.flatFee=!0,tr.addMethodCall({appID:ALGORAND_CONFIG.APP_ID,method:er,sender:Vt,suggestedParams:rr,signer:Jt,methodArgs:[Xt,Ft],boxes:[{appIndex:ALGORAND_CONFIG.APP_ID,name:algosdk.decodeAddress(Ft).publicKey}]}),console.log("ð¤ Sending buyer atomic transaction group...");const ar=await tr.execute(algodClient,4),nr=ar.txIDs[0];return console.log("â Buyer purchase successful:",nr),console.log("ð Transaction result:",ar),console.log("ð View on explorer:",this.getExplorerUrl(nr)),await new Promise(cr=>setTimeout(cr,2e3)),console.log("ð Verifying purchase - checking seller balance..."),await this.debugBoxStorage(Ft),nr}catch(qt){throw console.error("â Buyer purchase failed:",qt),qt}}async withdrawSellerEarningsForAddress(_e){try{if(!algosdk.isValidAddress(_e))throw new Error("Invalid seller address");console.log("ð° Starting withdrawal for seller:",_e);const $t=await algodClient.getTransactionParams().do();$t.fee=2e3,$t.flatFee=!0;const Vt=new algosdk.ABIContract(COOKIE_MARKET_ABI).getMethodByName("withdraw_seller_earnings"),qt=new AtomicTransactionComposer,zt=async(Gt,Jt)=>{if(console.log("ð¼ Seller signer called for withdrawal"),this.accountAddress!==_e)throw new Error("Seller wallet not connected. Please connect your seller wallet.");const Xt=Gt.map((er,tr)=>({txn:er,signers:Jt.includes(tr)?[_e]:[]})),Zt=await peraWallet.signTransaction([Xt]);return console.log(" - Seller signed transactions received:",Zt.length),Jt.map(er=>Zt[er])};qt.addMethodCall({appID:ALGORAND_CONFIG.APP_ID,method:Vt,sender:_e,suggestedParams:$t,signer:zt,methodArgs:[],boxes:[{appIndex:ALGORAND_CONFIG.APP_ID,name:algosdk.decodeAddress(_e).publicKey}]});const Kt=(await qt.execute(algodClient,4)).txIDs[0];return console.log("â Withdrawal successful:",Kt),Kt}catch($t){throw console.error("â Withdrawal failed:",$t),$t}}async withdrawSellerEarnings(){try{if(!this.accountAddress)throw new Error("Wallet not connected");console.log("ð° Starting withdrawal for:",this.accountAddress);const _e=await algodClient.getTransactionParams().do();_e.fee=2e3,_e.flatFee=!0;const Ft=new algosdk.ABIContract(COOKIE_MARKET_ABI).getMethodByName("withdraw_seller_earnings"),Vt=new AtomicTransactionComposer;Vt.addMethodCall({appID:ALGORAND_CONFIG.APP_ID,method:Ft,sender:this.accountAddress,suggestedParams:_e,signer:async Ht=>await peraWallet.signTransaction([Ht.map(Gt=>({txn:Gt,signers:[this.accountAddress]}))]),methodArgs:[],boxes:[{appIndex:ALGORAND_CONFIG.APP_ID,name:algosdk.decodeAddress(this.accountAddress).publicKey}]});
1527const zt=(await Vt.execute(algodClient,4)).txIDs[0];return console.log("â
Withdrawal successful:",zt),zt}catch(_e){throw console.error("â Withdrawal failed:",_e),_e}}async withdrawPlatformFees(){try{if(!this.accountAddress)throw new Error("Wallet not connected");if(this.accountAddress!==ALGORAND_CONFIG.PLATFORM_ADDRESS)throw new Error("Only platform can withdraw fees");const _e=await algodClient.getTransactionParams().do();_e.fee=2e3,_e.flatFee=!0;const Ft=new algosdk.ABIContract(COOKIE_MARKET_ABI).getMethodByName("withdraw_platform_fees"),Vt=new AtomicTransactionComposer;return Vt.addMethodCall({appID:ALGORAND_CONFIG.APP_ID,method:Ft,sender:this.accountAddress,suggestedParams:_e,signer:async zt=>await peraWallet.signTransaction([zt.map(Kt=>({txn:Kt,signers:[this.accountAddress]}))]),methodArgs:[]}),(await Vt.execute(algodClient,4)).txIDs[0]}catch(_e){throw console.error("â Platform withdrawal failed:",_e),_e}}async listAllBoxBalances(){try{console.log("ð¦ Listing all box balances...");const _e=ALGORAND_CONFIG.APP_ID,$t=await algodClient.getApplicationBoxes(_e).do();console.log(`Found ${$t.boxes.length} boxes:`),console.log("=====================================");let Ft=0;for(const zt of $t.boxes)try{const Kt=(await algodClient.getApplicationBoxByName(_e,zt.name).do()).value,Gt=new Uint8Array(zt.name),Jt=algosdk.encodeAddress(Gt);if(Kt&&Kt.length===8){const Zt=new DataView(new Uint8Array(Kt).buffer).getBigUint64(0,!1),er=Number(Zt)/1e6;console.log(`ð Address: ${Jt}`),console.log(` ð° Balance: ${er} ALGO (${Zt} microAlgos)`),console.log(" ---"),Ft+=er}}catch(Ht){console.error("Error reading box:",Ht)}console.log("====================================="),console.log(`ð° Total balance in boxes: ${Ft} ALGO`);const Vt=algosdk.getApplicationAddress(ALGORAND_CONFIG.APP_ID),qt=await algodClient.accountInformation(Vt.toString()).do();console.log(`ð± Contract balance: ${microalgosToAlgo(qt.amount)} ALGO`),console.log(`ð Contract address: ${Vt.toString()}`)}catch(_e){console.error("Error listing box balances:",_e)}}async initializeContract(){try{if(!this.accountAddress)throw new Error("Wallet not connected");console.log("ð§ Initializing contract...");const _e=await algodClient.getTransactionParams().do();_e.fee=2e3,_e.flatFee=!0;const Ft=new algosdk.ABIContract(COOKIE_MARKET_ABI).methods.find(Ht=>Ht.name==="create");if(!Ft)throw new Error("Create method not found in ABI");const Vt=new AtomicTransactionComposer;Vt.addMethodCall({appID:ALGORAND_CONFIG.APP_ID,method:Ft,sender:this.accountAddress,suggestedParams:_e,signer:async Ht=>await peraWallet.signTransaction([Ht.map(Gt=>({txn:Gt,signers:[this.accountAddress]}))]),methodArgs:[]});const zt=(await Vt.execute(algodClient,4)).txIDs[0];return console.log("â
Contract initialized:",zt),zt}catch(_e){throw console.error("â Contract initialization failed:",_e),_e}}async getSellerBalance(_e){try{if(!algosdk.isValidAddress(_e))return console.error("Invalid seller address:",_e),0;const $t=ALGORAND_CONFIG.APP_ID,Ft=algosdk.decodeAddress(_e).publicKey;try{const Jt=await algodClient.getApplicationBoxByName($t,Ft).do();if(Jt.value&&Jt.value.length===8){const Zt=new DataView(new Uint8Array(Jt.value).buffer).getBigUint64(0,!1),er=microalgosToAlgo(Number(Zt));return console.log(`ð° Found balance for ${_e}: ${er} ALGO`),er}}catch{return console.log(`ð¦ No box found for seller ${_e}`),0}const qt=new algosdk.ABIContract(COOKIE_MARKET_ABI).getMethodByName("get_seller_balance"),zt=algosdk.generateAccount(),Ht=await algodClient.getTransactionParams().do(),Kt=new AtomicTransactionComposer;Kt.addMethodCall({appID:ALGORAND_CONFIG.APP_ID,method:qt,sender:_e,suggestedParams:Ht,signer:algosdk.makeBasicAccountTransactionSigner(zt),methodArgs:[_e],boxes:[{appIndex:ALGORAND_CONFIG.APP_ID,name:algosdk.decodeAddress(_e).publicKey}]});
1527const Gt=await Kt.simulate(algodClient);if(Gt.methodResults&&Gt.methodResults[0].returnValue){const Jt=Gt.methodResults[0].returnValue;return microalgosToAlgo(Number(Jt))}return 0}catch($t){return console.error("Error getting seller balance:",$t),0}}async getPlatformBalance(){try{const $t=new algosdk.ABIContract(COOKIE_MARKET_ABI).getMethodByName("get_platform_balance"),Ft=algosdk.generateAccount(),Vt=await algodClient.getTransactionParams().do(),qt=new AtomicTransactionComposer;qt.addMethodCall({appID:ALGORAND_CONFIG.APP_ID,method:$t,sender:ALGORAND_CONFIG.PLATFORM_ADDRESS,suggestedParams:Vt,signer:algosdk.makeBasicAccountTransactionSigner(Ft),methodArgs:[]});const zt=await qt.simulate(algodClient);if(zt.methodResults&&zt.methodResults[0].returnValue){const Ht=zt.methodResults[0].returnValue;return microalgosToAlgo(Number(Ht))}return 0}catch(_e){return console.error("Error getting platform balance:",_e),0}}getExplorerUrl(_e){return`https://testnet.explorer.perawallet.app/tx/${_e}/`}}const algorandService=new AlgorandService;const WalletContext=reactExports.createContext(void 0),useWallet=()=>{const yt=reactExports.useContext(WalletContext);if(!yt)throw new Error("useWallet must be used within a WalletProvider");return yt},WalletProvider=({children:yt})=>{const[_e,$t]=reactExports.useState(null),[Ft,Vt]=reactExports.useState(0),[qt,zt]=reactExports.useState(!1),Ht=async Xt=>{try{const Zt=await algorandService.getAccountBalance(Xt);Vt(microalgosToAlgo(Zt))}catch(Zt){console.error("Error fetching seller balance:",Zt)}},Kt=async()=>{zt(!0);try{console.log("ð Reconnecting to existing wallet...");const Xt=await algorandService.reconnectSession();if(Xt)return console.log("â
Reconnected via existing session:",Xt),$t(Xt),await Ht(Xt),!0;const Zt=await algorandService.connectWallet();return console.log("ð± Connected to Pera:",Zt),Zt?($t(Zt),await Ht(Zt),!0):!1}catch(Xt){if(console.error("â Reconnection failed:",Xt),(Xt==null?void 0:Xt.message)!=="Connection cancelled")throw Xt;return!1}finally{zt(!1)}},Gt=async()=>{zt(!0);try{if(console.log("ð¼ SellerWalletContext: Starting connection..."),sessionStorage.getItem("buyer_wallet_address")){console.log("â ï¸ Disconnecting buyer wallet first to avoid conflicts"),sessionStorage.removeItem("buyer_wallet_address");const tr=window.__buyerPeraWallet;tr&&await tr.disconnect()}const Zt=await algorandService.connectWallet();if(console.log("ð¼ SellerWalletContext: Got seller address:",Zt),!Zt)throw new Error("No address returned from wallet connection");$t(Zt),await Ht(Zt);const er=localStorage.getItem("worldid_session");if(er)try{const{user:tr}=JSON.parse(er);if(tr&&tr.id){console.log("ð¾ Saving SELLER wallet to profile for user:",tr.id);const{data:rr,error:ar}=await supabase.from("profiles").update({algorand_address:Zt,is_seller:!0,wallet_linked_at:new Date().toISOString()}).eq("user_id",tr.id).select();if(ar){console.error("â Update failed:",ar);const{data:nr,error:cr}=await supabase.from("profiles").upsert({user_id:tr.id,algorand_address:Zt,is_seller:!0,wallet_linked_at:new Date().toISOString(),nullifier_hash:tr.nullifier_hash||"temp_hash",email:tr.email},{onConflict:"user_id"}).select().single();if(cr){console.error("â Upsert also failed:",cr),alert(`Failed to save seller wallet: ${cr.message}`),await algorandService.disconnectWallet(),$t(null);return}}console.log("â
Seller wallet successfully saved to profile"),setTimeout(()=>{window.location.reload()},1e3)}}catch(tr){console.error("â Error in seller wallet save process:",tr),alert("Error saving seller wallet. Please try again.")}}catch(Xt){console.error("â SellerWalletContext connect error:",Xt),(Xt==null?void 0:Xt.message)!=="Connection cancelled"&&alert(`Failed to connect seller wallet: ${Xt.message}`)}finally{zt(!1)}},Jt=async()=>{await algorandService.disconnectWallet(),$t(null),Vt(0);const Xt=localStorage.getItem("worldid_session");if(Xt)try{const{user:Zt}=JSON.parse(Xt);Zt&&Zt.id&&await supabase.from("profiles").update({algorand_address:null,is_seller:!1,wallet_linked_at:null}).eq("user_id",Zt.id)}catch(Zt){console.error("Error clearing seller wallet from profile:",Zt)}};return reactExports.useEffect(()=>{(async()=>{const Zt=localStorage.getItem("worldid_session");if(Zt)try{const{user:er}=JSON.parse(Zt);if(er&&er.id){const{data:tr}=await supabase.from("profiles").select("algorand_address").eq("user_id",er.id).single();if(tr!=null&&tr.algorand_address){console.log("ð¼ Loading seller wallet from profile:",tr.algorand_address),$t(tr.algorand_address);try{const rr=await algorandService.reconnectSession();rr===tr.algorand_address?(console.log("â
Successfully reconnected to Pera wallet"),await Ht(tr.algorand_address)):rr?(console.log("â ï¸ Pera connected to different address:",rr),await Ht(tr.algorand_address)):(console.log("ð± No Pera session found, wallet linked but not connected"),await Ht(tr.algorand_address))}catch(rr){console.log("ð± Could not reconnect to Pera:",rr),await Ht(tr.algorand_address)}}}}catch(er){console.error("Error loading seller wallet:",er)}})()},[]),reactExports.useEffect(()=>{if(_e){Ht(_e);const Xt=setInterval(()=>{Ht(_e)},1e4);return()=>clearInterval(Xt)}},[_e]),jsxRuntimeExports.jsx(WalletContext.Provider,{value:{address:_e,balance:Ft,isConnecting:qt,connectWallet:Gt,disconnectWallet:Jt,reconnectToExistingWallet:Kt,isConnected:!!_e&&algorandService.isConnected(),isSellerContext:!0},children:yt})},DashboardPage=({session:yt})=>{const[_e,$t]=reactExports.useState([]),[Ft,Vt]=reactExports.useState(!0),[qt,zt]=reactExports.useState([]),[Ht,Kt]=reactExports.useState(!1),[Gt,Jt]=reactExports.useState(""),[Xt,Zt]=reactExports.useState(null),[er,tr]=reactExports.useState(0),[rr,ar]=reactExports.useState(!0),[nr,cr]=reactExports.useState(null),[fr,vr]=reactExports.useState(!1),[xr,Sr]=reactExports.useState(!1),[Tr,Br]=reactExports.useState(!1),[jr,Rr]=reactExports.useState(0),[yr,sr]=reactExports.useState(""),or=useNavigate(),{address:Qt,connectWallet:ir,disconnectWallet:ur,isConnected:gr,isConnecting:dr,reconnectToExistingWallet:lr}=useWallet(),hr=kr=>{const Mr=localStorage.getItem(`balance_${kr}`);if(Mr){const{balance:Lr,timestamp:Cr}=JSON.parse(Mr);if(Date.now()-Cr<3e4)return Lr}return null},wr=async kr=>{Br(!0);try{console.log("ð° Fetching balance for seller:",kr);const Mr=await algorandService.getSellerBalance(kr);console.log("ð° Balance received:",Mr,"ALGO"),tr(Mr),localStorage.setItem(`balance_${kr}`,JSON.stringify({balance:Mr,timestamp:Date.now()}))}catch(Mr){console.error("Error fetching balance:",Mr),tr(0)}finally{Br(!1)}},pr=async()=>{try{const kr=await algorandService.getPlatformBalance();
1527Rr(kr)}catch(kr){console.error("Error fetching platform balance:",kr)}},br=async()=>{if(!(Xt!=null&&Xt.algorand_address)){alert("No wallet linked to your profile");return}if(er===0){alert("No balance available to withdraw");return}Sr(!0);try{console.log("ð° Starting withdrawal...");const kr=await algorandService.withdrawSellerEarningsAutoConnect(Xt.algorand_address);await supabase.from("withdrawals").insert({profile_id:Xt.id,algorand_address:Xt.algorand_address,amount_algo:er,txn_hash:kr,status:"completed"}),await supabase.from("profiles").update({total_withdrawn:(Xt.total_withdrawn||0)+er}).eq("id",Xt.id),sr(kr),await wr(Xt.algorand_address)}catch(kr){console.error("Withdrawal error:",kr),alert(kr.message||"Withdrawal failed. Please try again.")}finally{Sr(!1)}};reactExports.useEffect(()=>{(async()=>{const{data:Mr,error:Lr}=await supabase.from("data_events").select("*").eq("user_id",yt.user.id).order("event_timestamp",{ascending:!1});Lr?console.error("Error fetching events:",Lr):$t(Mr),Vt(!1)})()},[yt]),reactExports.useEffect(()=>{(async()=>{const Mr=await getUserPackages(yt.user.id);zt(Mr)})()},[yt.user.id]),reactExports.useEffect(()=>{(async()=>{ar(!0),cr(null);try{console.log("Fetching profile for user:",yt.user.id);const{data:Mr,error:Lr}=await supabase.from("profiles").select("*").eq("user_id",yt.user.id);if(Lr){console.error("Supabase error:",Lr),cr(`Failed to load profile: ${Lr.message}`),ar(!1);return}if(console.log("Profile query result:",Mr),!Mr||Mr.length===0){console.warn("No profile found for user:",yt.user.id),cr("Profile not found. Creating one...");const Er=localStorage.getItem("worldid_session");let Ar=null;if(Er)try{Ar=JSON.parse(Er).nullifier_hash}catch(Gr){console.error("Failed to parse World ID session:",Gr)}const{data:zr,error:Vr}=await supabase.from("profiles").insert({user_id:yt.user.id,nullifier_hash:Ar||`temp_${Date.now()}`,email:yt.user.email||`${yt.user.id}@cookiemarket.app`}).select().single();Vr?(console.error("Failed to create profile:",Vr),cr(`Failed to create profile: ${Vr.message}`)):(console.log("Created new profile:",zr),Zt(zr),cr(null)),ar(!1);return}const Cr=Mr[0];if(console.log("Using profile:",Cr),Zt(Cr),Cr.algorand_address){const Er=hr(Cr.algorand_address);Er!==null?tr(Er):wr(Cr.algorand_address),Cr.algorand_address===ALGORAND_CONFIG.PLATFORM_ADDRESS&&pr()}}catch(Mr){console.error("Unexpected error:",Mr),cr("Unexpected error loading profile")}finally{ar(!1)}})()},[yt.user.id,gr]),reactExports.useEffect(()=>{Xt!=null&&Xt.algorand_address&&(wr(Xt.algorand_address),Xt.algorand_address===ALGORAND_CONFIG.PLATFORM_ADDRESS&&pr())},[Xt==null?void 0:Xt.algorand_address]);const Dr=async()=>{try{console.log("Logging out..."),localStorage.removeItem("worldid_session");const{error:kr}=await supabase.auth.signOut();kr&&console.error("Supabase signout error:",kr),gr&&await ur(),localStorage.removeItem("seller_balance_cache"),window.location.href="/login"}catch(kr){console.error("Logout error:",kr),window.location.href="/login"}},_r=async()=>{try{await ir(),vr(!0),setTimeout(()=>{window.location.reload()},1e3)}catch(kr){console.error("Failed to connect wallet:",kr)}},Nr=async()=>{Kt(!0),Jt("");const kr=await createDataPackages(yt.user.id,Xt);kr.success?(zt(kr.packages),alert(`Successfully created ${kr.packages.length} data packages!`)):Jt(kr.error||"Failed to create packages"),Kt(!1)};return Ft?jsxRuntimeExports.jsxs(Box$2,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",gap:2},children:[jsxRuntimeExports.jsx(Typography,{variant:"h1",sx:{animation:"pulse 1.5s infinite"},children:"ðª"}),jsxRuntimeExports.jsx(Typography,{variant:"h6",children:"Baking your data..."})]}):jsxRuntimeExports.jsxs("div",{style:{padding:"20px",maxWidth:"1200px",margin:"0 auto",position:"relative"},children:[jsxRuntimeExports.jsx("a",{href:"https://bolt.new/",target:"_blank",rel:"noopener noreferrer",style:{position:"fixed",top:"20px",right:"20px",zIndex:1e3,display:"block",width:"60px",height:"60px",transition:"transform 0.3s ease"},onMouseEnter:kr=>{kr.currentTarget.style.transform="scale(1.1)"},onMouseLeave:kr=>{kr.currentTarget.style.transform="scale(1)"},children:jsxRuntimeExports.jsx("img",{src:"/badges/white_circle_360x360.png",alt:"Built with Bolt.new",style:{width:"100%",height:"100%",filter:"drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3))"}})}),jsxRuntimeExports.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"},children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(Typography,{variant:"h4",children:[jsxRuntimeExports.jsx("span",{style:{marginRight:"10px"},children:"ðª"}),"Cookie Market Dashboard"]}),jsxRuntimeExports.jsxs(Typography,{variant:"subtitle1",color:"textSecondary",children:["Welcome, ",
1527yt.user.email]})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Button,{variant:"contained",onClick:()=>or("/marketplace"),style:{marginRight:"10px"},children:"Visit Marketplace"}),jsxRuntimeExports.jsx(Button,{variant:"outlined",onClick:Dr,sx:{borderColor:"#FFB300",color:"#FFB300","&:hover":{borderColor:"#FFA000",backgroundColor:"rgba(255, 179, 0, 0.1)"}},children:"Logout"})]})]}),rr&&jsxRuntimeExports.jsx(Alert,{severity:"info",style:{marginBottom:"20px"},children:"Loading profile..."}),nr&&jsxRuntimeExports.jsx(Alert,{severity:"error",style:{marginBottom:"20px"},children:nr}),!(Xt!=null&&Xt.algorand_address)&&jsxRuntimeExports.jsx(Card,{style:{marginBottom:"30px",border:"2px solid #1976d2"},children:jsxRuntimeExports.jsxs(CardContent,{children:[jsxRuntimeExports.jsx(Alert,{severity:"warning",style:{marginBottom:"20px"},children:jsxRuntimeExports.jsx(Typography,{variant:"body2",children:"Link your Pera Wallet to sell data packages and receive payments."})}),jsxRuntimeExports.jsxs(Typography,{variant:"h5",style:{display:"flex",alignItems:"center",gap:"10px"},children:[jsxRuntimeExports.jsx(Wallet,{})," Link Your Wallet to Start Selling"]}),jsxRuntimeExports.jsxs(Typography,{variant:"body2",style:{marginTop:"10px",marginBottom:"20px"},children:["Current wallet status: ",gr?"Connected":"Not connected",dr&&" (Connecting...)"]}),jsxRuntimeExports.jsx(Button,{variant:"contained",onClick:_r,disabled:dr,size:"large",style:{marginTop:"20px"},children:dr?jsxRuntimeExports.jsx(CircularProgress,{size:24}):"Connect Pera Wallet"})]})}),(Xt==null?void 0:Xt.algorand_address)&&jsxRuntimeExports.jsx(Card,{style:{marginBottom:"30px",background:"linear-gradient(135deg, rgba(93, 64, 55, 0.2), rgba(46, 26, 26, 0.2))",border:"2px solid rgba(255, 179, 0, 0.2)"},children:jsxRuntimeExports.jsxs(CardContent,{children:[jsxRuntimeExports.jsxs(Typography,{variant:"h5",style:{display:"flex",alignItems:"center",gap:"10px",marginBottom:"20px",color:"#FFB300"},children:[jsxRuntimeExports.jsx(NavigationOff,{})," Your Earnings"]}),jsxRuntimeExports.jsxs(Grid,{container:!0,spacing:3,children:[jsxRuntimeExports.jsxs(Grid,{item:!0,xs:12,md:4,children:[jsxRuntimeExports.jsx(Typography,{variant:"subtitle2",color:"textSecondary",children:"Connected Wallet"}),jsxRuntimeExports.jsxs(Typography,{variant:"body2",style:{wordBreak:"break-all"},children:[Xt.algorand_address.slice(0,10),"...",Xt.algorand_address.slice(-8)]}),jsxRuntimeExports.jsx(Chip,{label:algorandService.isConnected()?Qt===Xt.algorand_address?"â Seller Wallet Connected":"â ï¸ Wrong Wallet Connected":"â ï¸ Wallet Linked (Pera Not Connected)",color:algorandService.isConnected()&&Qt===Xt.algorand_address?"success":"warning",size:"small",sx:{mt:1}})]}),jsxRuntimeExports.jsxs(Grid,{item:!0,xs:12,md:4,children:[jsxRuntimeExports.jsx(Typography,{variant:"subtitle2",color:"textSecondary",children:"Available to Withdraw"}),jsxRuntimeExports.jsxs(Box$2,{display:"flex",alignItems:"center",gap:1,children:[jsxRuntimeExports.jsxs(Typography,{variant:"h4",sx:{color:"#FFB300",fontWeight:700,textShadow:"0 0 20px rgba(255, 179, 0, 0.3)"},children:[er.toFixed(2)," ALGO"]}),Tr&&jsxRuntimeExports.jsx(CircularProgress,{size:20,sx:{color:"#FFB300"}})]}),jsxRuntimeExports.jsxs(Box$2,{display:"flex",gap:1,mt:1,children:[jsxRuntimeExports.jsx(Button,{size:"small",onClick:()=>wr(Xt.algorand_address),disabled:Tr,children:"Refresh Balance"}),!1]})]}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:12,md:4,children:Xt.algorand_address?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button,{variant:"contained",onClick:br,disabled:xr||er===0,fullWidth:!0,size:"large",color:"success",children:xr?jsxRuntimeExports.jsx(CircularProgress,{size:24}):"Withdraw Earnings"}),er===0&&jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"text.secondary",sx:{mt:1,display:"block"},children:"No balance available to withdraw"}),er>0&&!algorandService.isConnected()&&jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"info.main",sx:{mt:1,display:"block"},children:"Wallet will connect automatically when you withdraw"})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Alert,{severity:"error",sx:{mb:2},children:jsxRuntimeExports.jsx(Typography,{variant:"body2",children:"No wallet linked to profile"})}),jsxRuntimeExports.jsx(Button,{variant:"contained",onClick:_r,disabled:dr,fullWidth:!0,size:"large",color:"primary",children:dr?jsxRuntimeExports.jsx(CircularProgress,{size:24}):"Link Wallet"})]})})]})]})}),jsxRuntimeExports.jsx(Card,{style:{marginBottom:"30px"},children:jsxRuntimeExports.jsxs(CardContent,{children:[jsxRuntimeExports.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"},children:[jsxRuntimeExports.jsxs(Typography,{variant:"h5",style:{display:"flex",alignItems:"center",gap:"10px"},children:[jsxRuntimeExports.jsx(Package,{})," Your Data Packages"]}),jsxRuntimeExports.jsx(Button,{variant:"contained",onClick:Nr,disabled:Ht||_e.length<10||!(Xt!=null&&Xt.algorand_address),children:Ht?jsxRuntimeExports.jsx(CircularProgress,{size:24}):"Create Packages"})]}),Gt&&jsxRuntimeExports.jsx(Typography,{color:"error",style:{marginBottom:"10px"},children:Gt}),_e.length<10&&jsxRuntimeExports.jsxs(Typography,{color:"textSecondary",style:{marginBottom:"10px"},children:["You need at least 10 browsing events to create packages. Current: ",_e.length]}),jsxRuntimeExports.jsxs(Grid,{container:!0,spacing:2,children:[qt.map(kr=>jsxRuntimeExports.jsx(Grid,{item:!0,xs:12,md:6,lg:4,children:jsxRuntimeExports.jsx(Card,{variant:"outlined",children:jsxRuntimeExports.jsxs(CardContent,{children:[jsxRuntimeExports.jsxs(Typography,{variant:"h6",style:{textTransform:"capitalize"},children:[kr.package_type," Package"]}),jsxRuntimeExports.jsxs(Typography,{variant:"body2",color:"textSecondary",children:[kr.data_count," data points"]}),jsxRuntimeExports.jsxs(Typography,{variant:"h6",style:{marginTop:"10px"},children:[kr.price_algo," ALGO"]}),jsxRuntimeExports.jsx(Chip,{label:kr.status,color:kr.status==="available"?"success":"default",size:"small",style:{marginTop:"10px"}})]})})},kr.id)),qt.length===0&&jsxRuntimeExports.jsx(Grid,{item:!0,xs:12,children:jsxRuntimeExports.jsx(Typography,{color:"textSecondary",align:"center",children:'No packages created yet. Collect more browsing data and click "Create Packages"!'})})]})]})}),jsxRuntimeExports.jsx(Card,{children:jsxRuntimeExports.jsxs(CardContent,{children:[jsxRuntimeExports.jsxs(Typography,{variant:"h5",style:{marginBottom:"20px"},children:["Recent Browsing Events (",_e.length,")"]}),jsxRuntimeExports.jsxs("div",{style:{overflowX:"auto"},children:[jsxRuntimeExports.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{style:{borderBottom:"2px s
1527olid #ddd"},children:[jsxRuntimeExports.jsx("th",{style:{padding:"10px",textAlign:"left"},children:"Event"}),jsxRuntimeExports.jsx("th",{style:{padding:"10px",textAlign:"left"},children:"Domain"}),jsxRuntimeExports.jsx("th",{style:{padding:"10px",textAlign:"left"},children:"Timestamp"})]})}),jsxRuntimeExports.jsx("tbody",{children:_e.slice(0,20).map((kr,Mr)=>jsxRuntimeExports.jsxs("tr",{style:{borderBottom:"1px solid #eee"},children:[jsxRuntimeExports.jsx("td",{style:{padding:"10px"},children:kr.event_name}),jsxRuntimeExports.jsx("td",{style:{padding:"10px"},children:kr.domain}),jsxRuntimeExports.jsx("td",{style:{padding:"10px"},children:new Date(kr.event_timestamp).toLocaleString()})]},Mr))})]}),_e.length>20&&jsxRuntimeExports.jsxs(Typography,{variant:"body2",color:"textSecondary",style:{marginTop:"10px"},children:["Showing 20 of ",_e.length," events"]})]})]})}),yr&&jsxRuntimeExports.jsxs(Dialog$1,{open:!!yr,onClose:()=>sr(""),children:[jsxRuntimeExports.jsx(DialogTitle$1,{children:"Withdrawal Successful!"}),jsxRuntimeExports.jsxs(DialogContent$1,{children:[jsxRuntimeExports.jsx(Typography,{variant:"body1",gutterBottom:!0,children:"Your withdrawal has been submitted to the Algorand blockchain."}),jsxRuntimeExports.jsx(Button,{variant:"outlined",fullWidth:!0,sx:{mt:2},onClick:()=>window.open(algorandService.getExplorerUrl(yr),"_blank"),children:"View on Pera Explorer"})]}),jsxRuntimeExports.jsx(DialogActions,{children:jsxRuntimeExports.jsx(Button,{onClick:()=>sr(""),children:"Close"})})]})]})},AttachMoney=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4"}),"AttachMoney"),Cookie=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M21.95 10.99c-1.79-.03-3.7-1.95-2.68-4.22-2.98 1-5.77-1.59-5.19-4.56C6.95.71 2 6.58 2 12c0 5.52 4.48 10 10 10 5.89 0 10.54-5.08 9.95-11.01M8.5 15c-.83 0-1.5-.67-1.5-1.5S7.67 12 8.5 12s1.5.67 1.5 1.5S9.33 15 8.5 15m2-5C9.67 10 9 9.33 9 8.5S9.67 7 10.5 7s1.5.67 1.5 1.5-.67 1.5-1.5 1.5m4.5 6c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"}),"Cookie"),History=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z"}),"History"),Lock=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock"),Person=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person"),Search=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search"),ShoppingCart=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2M1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2"}),"ShoppingCart"),TrendingUp=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"m16 6 2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"}),"TrendingUp"),BuyerWalletContext=reactExports.createContext(void 0),useBuyerWallet=()=>{const yt=reactExports.useContext(BuyerWalletContext);if(!yt)throw new Error("useBuyerWallet must be used within a BuyerWalletProvider");return yt},BuyerWalletProvider=({children:yt})=>{const[_e,$t]=reactExports.useState(null),[Ft,Vt]=reactExports.useState(0),[qt,zt]=reactExports.useState(!1);reactExports.useEffect(()=>{(async()=>
1527{if(!window.__buyerPeraWallet){console.log("ð Initializing buyer wallet instance on mount");const{PeraWalletConnect:Xt}=await __vitePreload(async()=>{const{PeraWalletConnect:er}=await Promise.resolve().then(()=>index);return{PeraWalletConnect:er}},void 0),Zt=new Xt({shouldShowSignTxnToast:!0,chainId:416002});window.__buyerPeraWallet=Zt}})()},[]);const Ht=async Jt=>{try{const Xt=await algorandService.getAccountBalance(Jt);Vt(microalgosToAlgo(Xt))}catch(Xt){console.error("Error fetching buyer balance:",Xt)}},Kt=async()=>{var Jt,Xt,Zt,er;zt(!0);try{console.log("ð BuyerWalletContext: Starting connection...");let tr=window.__buyerPeraWallet;if(tr){if(console.log("ð Using existing buyer Pera wallet instance"),tr.isConnected){console.log("ð Wallet already connected, reconnecting session...");try{const nr=await tr.reconnectSession();if(nr&&nr.length>0){const cr=nr[0];console.log("ð Reconnected to existing session:",cr),$t(cr),await Ht(cr),localStorage.setItem("buyer_wallet_address_temp",cr);return}}catch{console.log("ð Reconnect failed, will disconnect and retry"),await tr.disconnect()}}}else{console.log("ð Creating new buyer Pera wallet instance...");const{PeraWalletConnect:nr}=await __vitePreload(async()=>{const{PeraWalletConnect:cr}=await Promise.resolve().then(()=>index);return{PeraWalletConnect:cr}},void 0);tr=new nr({shouldShowSignTxnToast:!0,chainId:416002}),window.__buyerPeraWallet=tr}console.log("ð Connecting to new session...");const rr=await tr.connect();if(console.log("ð BuyerWalletContext: Got buyer address:",rr[0]),!rr||rr.length===0)throw new Error("No accounts found");const ar=rr[0];$t(ar),await Ht(ar),console.log("ð Buyer wallet connected (NOT saved to profile)"),localStorage.setItem("buyer_wallet_address_temp",ar),(Jt=tr.connector)==null||Jt.off("disconnect"),(Xt=tr.connector)==null||Xt.on("disconnect",()=>{console.log("ð Buyer wallet disconnected"),$t(null),Vt(0),localStorage.removeItem("buyer_wallet_address_temp")})}catch(tr){if(console.error("â Buyer wallet connection error:",tr),(Zt=tr==null?void 0:tr.message)!=null&&Zt.includes("Session currently connected")){const rr=window.__buyerPeraWallet;if(rr){console.log("ð Force disconnecting existing session...");try{await rr.disconnect(),setTimeout(()=>{Kt()},500);return}catch(ar){console.error("ð Force disconnect failed:",ar)}}}(tr==null?void 0:tr.message)!=="Connection cancelled"&&!((er=tr==null?void 0:tr.message)!=null&&er.includes("Session currently connected"))&&alert(`Failed to connect buyer wallet: ${tr.message}`)}finally{zt(!1)}},Gt=async()=>{console.log("ð Disconnecting buyer wallet...");const Jt=window.__buyerPeraWallet;if(Jt)try{await Jt.disconnect(),console.log("ð Buyer wallet disconnected successfully")}catch(Xt){console.error("ð Error disconnecting buyer wallet:",Xt)}$t(null),Vt(0),localStorage.removeItem("buyer_wallet_address_temp")};return reactExports.useEffect(()=>{(async()=>{const Xt=localStorage.getItem("buyer_wallet_address_temp");if(Xt){console.log("ð Found saved buyer address:",Xt);const Zt=window.__buyerPeraWallet;if(Zt)if(Zt.isConnected){console.log("ð Buyer wallet is connected, verifying address...");try{const er=await Zt.reconnectSession();if(er&&er.length>0)if(er[0]===Xt){console.log("ð Verified buyer wallet session"),$t(Xt),await Ht(Xt);return}else console.log("ð Address mismatch, clearing session")}catch{console.log("ð Could not verify buyer session")}}else console.log("ð Buyer wallet not connected");console.log("ð Clearing invalid buyer session"),localStorage.removeItem("buyer_wallet_address_temp")}})()},[]),reactExports.useEffect(()=>{if(_e){Ht(_e);const Jt=setInterval(()=>{Ht(_e)},1e4);return()=>clearInterval(Jt)}},[_e]),jsxRuntimeExports.jsx(BuyerWalletContext.Provider,{value:{address:_e,balance:Ft,isConnecting:qt,connectWallet:Kt,disconnectWallet:Gt,isConnected:!!_e},children:yt})};function MarketplacePage(){const yt=useNavigate(),{address:_e,balance:$t,isConnecting:Ft,connectWallet:Vt,disconnectWallet:qt,isConnected:zt}=useBuyerWallet(),[Ht,Kt]=reactExports.useState([]),[Gt,Jt]=reactExports.useState(!0),[Xt,Zt]=reactExports.useState(null),[er,tr]=reactExports.useState(""),[rr,ar]=reactExports.useState("all"),[nr,cr]=reactExports.useState("recent"),[fr,vr]=reactExports.useState(!1),[xr,Sr]=reactExports.useState(!1),[Tr,Br]=reactExports.useState(""),[jr,Rr]=reactExports.useState({open:!1,message:"",severity:"success"});reactExports.useEffect(()=>{yr()},[]);const yr=async()=>{try{const{data:ur,error:gr}=await supabase.from("data_packages").select("*").eq("status","available").eq("is_active",!0).not("seller_algorand_address","is",null).order("created_at",{ascending:!1});if(gr)throw gr;Kt(ur||[])}catch(ur){console.error("Error fetching packages:",ur)}finally{Jt(!1)}},sr=ur=>{switch(ur){case"browsing_history":return jsxRuntimeExports.jsx(History,{});case"cookies":return jsxRuntimeExports.jsx(Cookie,{});case"shopping":return jsxRuntimeExports.jsx(ShoppingCart,{});default:return jsxRuntimeExports.jsx(TrendingUp,{})}},or=async ur=>{Zt(ur);const gr=window.__buyerPeraWallet;if(!zt||!_e||!gr){console.log("ð Buyer wallet not connected, connecting..."),console.log(" - isBuyerConnected:",zt),console.log(" - buyerAddress:",_e),console.log(" - buyerPeraWallet exists:",!!gr);try{await Vt(),await new Promise(lr=>setTimeout(lr,1e3))}catch(lr){console.error("Failed to connect buyer wallet:",lr),Rr({open:!0,message:"Please connect your wallet to make purchases",severity:"error"});return}}const dr=localStorage.getItem("buyer_wallet_address_temp");if(!dr){console.error("No buyer wallet address after connection attempt"),Rr({open:!0,message:"Wallet connection failed. Please try again.",severity:"error"});return}console.log("â
Buyer wallet connected:",dr),vr(!0)},Qt=async()=>{console.log("ð handlePurchase called"),console.log(" - selectedPackage:",Xt),console.log(" - buyer address:",_e),console.log(" - isBuyerConnected:",zt);const ur=window.__buyerPeraWallet;if(console.log(" - buyerPeraWallet exists:",!!ur),console.log(" - buyerPeraWallet connected:",ur==null?void 0:ur.isConnected),!Xt||!_e||!ur){console.error("Missing required data:",{selectedPackage:!!Xt,buyerAddress:!!_e,buyerPeraWallet:!!ur}),Rr({open:!0,message:"Wallet not properly connected or package not selected",severity:"error"}
1527),vr(!1),!ur&&_e&&(console.log("ð Attempting to reconnect buyer wallet..."),await Vt());return}if(!Xt.seller_algorand_address){Rr({open:!0,message:"This package cannot be purchased - missing seller wallet",severity:"error"}),vr(!1);return}Sr(!0);try{const gr=await algorandService.purchaseDataPackageAsBuyer(Xt.id,Xt.price_algo,Xt.seller_algorand_address,_e);Br(gr);const dr=Number((Xt.price_algo*.1).toFixed(6)),lr=Number((Xt.price_algo*.9).toFixed(6));await supabase.from("data_packages").update({status:"sold",is_active:!1,total_earned:Xt.price_algo,platform_fee:dr}).eq("id",Xt.id),await supabase.from("transactions").insert({package_id:Xt.id,buyer_address:_e,seller_id:Xt.user_id,algo_amount:Xt.price_algo,platform_fee:dr,seller_payout:lr,txn_hash:gr,status:"completed"}),await supabase.rpc("increment_platform_fees",{amount:dr}),Rr({open:!0,message:"Purchase successful! Check Pera Explorer for details.",severity:"success"}),vr(!1),yr()}catch(gr){console.error("Purchase failed:",gr);const dr=(gr==null?void 0:gr.message)==="Transaction cancelled"?"Transaction cancelled by user":"Purchase failed. Please try again.";Rr({open:!0,message:dr,severity:"error"})}finally{Sr(!1)}},ir=Ht.filter(ur=>!(rr!=="all"&&ur.package_type!==rr||er&&!ur.package_type.toLowerCase().includes(er.toLowerCase()))).sort((ur,gr)=>nr==="price_low"?ur.price_algo-gr.price_algo:nr==="price_high"?gr.price_algo-ur.price_algo:nr==="data_count"?gr.data_count-ur.data_count:new Date(gr.created_at).getTime()-new Date(ur.created_at).getTime());return jsxRuntimeExports.jsxs(Container,{maxWidth:"xl",sx:{py:4,position:"relative"},children:[jsxRuntimeExports.jsx("a",{href:"https://bolt.new/",target:"_blank",rel:"noopener noreferrer",style:{position:"fixed",top:"20px",right:"20px",zIndex:1e3,display:"block",width:"60px",height:"60px",transition:"transform 0.3s ease"},onMouseEnter:ur=>{ur.currentTarget.style.transform="scale(1.1)"},onMouseLeave:ur=>{ur.currentTarget.style.transform="scale(1)"},children:jsxRuntimeExports.jsx("img",{src:"/badges/white_circle_360x360.png",alt:"Built with Bolt.new",style:{width:"100%",height:"100%",filter:"drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3))"}})}),jsxRuntimeExports.jsxs(Box$2,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:4,children:[jsxRuntimeExports.jsxs(Box$2,{children:[jsxRuntimeExports.jsxs(Typography,{variant:"h3",component:"h1",gutterBottom:!0,children:[jsxRuntimeExports.jsx("span",{style:{marginRight:"10px"},children:"ðª"}),"Cookie Market"]}),jsxRuntimeExports.jsx(Typography,{variant:"h6",color:"text.secondary",children:"Buy anonymous browsing data packages with ALGO"})]}),jsxRuntimeExports.jsxs(Box$2,{display:"flex",alignItems:"center",gap:2,children:[zt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Box$2,{textAlign:"right",children:[jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"text.secondary",children:"Buyer Wallet Balance"}),jsxRuntimeExports.jsxs(Typography,{variant:"body2",children:[$t.toFixed(2)," ALGO"]})]}),jsxRuntimeExports.jsx(Chip,{label:`Buyer: ${_e.slice(0,6)}...${_e.slice(-4)}`,onDelete:qt,color:"secondary"})]}):jsxRuntimeExports.jsx(Button,{variant:"contained",color:"secondary",onClick:Vt,disabled:Ft,children:Ft?jsxRuntimeExports.jsx(CircularProgress,{size:20}):"Connect Buyer Wallet"}),jsxRuntimeExports.jsx(Button,{variant:"outlined",onClick:()=>yt("/dashboard"),children:"My Dashboard"})]})]}),jsxRuntimeExports.jsx(Alert,{severity:"info",sx:{mb:3},children:jsxRuntimeExports.jsxs(Typography,{variant:"body2",children:[jsxRuntimeExports.jsx(Lock,{sx:{fontSize:16,verticalAlign:"middle",mr:1}}),"All data is anonymized and encrypted. Sellers receive 90% of the sale price, 10% goes to platform maintenance."]})}),jsxRuntimeExports.jsxs(Box$2,{display:"flex",gap:2,mb:4,children:[jsxRuntimeExports.jsx(TextField,{fullWidth:!0,placeholder:"Search packages...",value:er,onChange:ur=>tr(ur.target.value),InputProps:{startAdornment:jsxRuntimeExports.jsx(InputAdornment,{position:"start",children:jsxRuntimeExports.jsx(Search,{})})}}),jsxRuntimeExports.jsxs(FormControl,{sx:{minWidth:200},children:[jsxRuntimeExports.jsx(InputLabel,{children:"Category"}),jsxRuntimeExports.jsxs(Select,{value:rr,label:"Category",onChange:ur=>ar(ur.target.value),children:[jsxRuntimeExports.jsx(MenuItem,{value:"all",children:"All Categories"}),jsxRuntimeExports.jsx(MenuItem,{value:"browsing_history",children:"Browsing History"}),jsxRuntimeExports.jsx(MenuItem,{value:"cookies",children:"Cookies"}),jsxRuntimeExports.jsx(MenuItem,{value:"shopping",children:"Shopping Data"})]})]}),jsxRuntimeExports.jsxs(FormControl,{sx:{minWidth:150},children:[jsxRuntimeExports.jsx(InputLabel,{children:"Sort By"}),jsxRuntimeExports.jsxs(Select,{value:nr,label:"Sort By",onChange:ur=>cr(ur.target.value),children:[jsxRuntimeExports.jsx(MenuItem,{value:"recent",children:"Most Recent"}),jsxRuntimeExports.jsx(MenuItem,{value:"price_low",children:"Price: Low to High"}),jsxRuntimeExports.jsx(MenuItem,{value:"price_high",children:"Price: High to Low"}),jsxRuntimeExports.jsx(MenuItem,{value:"data_count",children:"Data Count"})]})]})]}),Gt?jsxRuntimeExports.jsx(LinearProgress,{}):jsxRuntimeExports.jsx(Grid,{container:!0,spacing:3,children:ir.map(ur=>jsxRuntimeExports.jsx(Grid,{item:!0,xs:12,sm:6,md:4,lg:3,children:jsxRuntimeExports.jsxs(Card,{sx:{height:"100%",display:"flex",flexDirection:"column",transition:"transform 0.2s","&:hover":{transform:"translateY(-4px)",boxShadow:3}},children:[jsxRuntimeExports.jsxs(CardContent,{sx:{flexGrow:1},children:[jsxRuntimeExports.jsxs(Box$2,{display:"flex",alignItems:"center",mb:2,children:[jsxRuntimeExports.jsx(Avatar,{sx:{bgcolor:"secondary.main",mr:2},children:sr(ur.package_type)}),jsxRuntimeExports.jsxs(Box$2,{children:[jsxRuntimeExports.jsx(Typography,{variant:"h6",component:"h2",children:ur.package_type.replace(/_/g," ").replace(/\b\w/g,gr=>gr.toUpperCase())}),jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"text.secondary",children:new Date(ur.created_at).toLocaleDateString()})]})]}),jsxRuntimeExports.jsxs(Box$2,{mb:2,children:[jsxRuntimeExports.jsx(Chip,{icon:jsxRuntimeExports.jsx(Cookie,{}),label:`${ur.data_count} data points`,size:"small",sx:{mr:1,mb:1}}),jsxRuntimeExports.jsx(Chip,{icon:jsxRuntimeExports.jsx(Person,{}),label:"Anonymous",size:"small",variant:"outlined",sx:{mb:1}})]}),jsxRuntimeExports.jsxs(Typography,{variant:"body2",color:"text.secondary",mb:2,children:["Quality data package containing ",ur.data_count," anonymized entries."]}),jsxRuntimeExports.jsxs(Box$2,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[jsxRuntimeExports.jsxs(Typography,{variant:"h5",color:"secondary.main",children:[ur.price_algo," ALGO"]}),jsxRuntimeExports.jsxs(Typography,{variant:"caption",color:"text.secondary",children:["~$",(ur.price_algo*.18).toFixed(2)," USD"]})]})]}),jsxRuntimeExports.jsx(CardActions,{children:jsxRuntimeExports.jsx(Button,{fullWidth:!0,variant:"contained",color:"secondary",startIcon:jsxRuntimeExports.jsx(AttachMoney,{}),onClick:()=>or(ur),children:"Buy Now"})})]})},ur.id))}),ir.length===0&&!Gt&&jsxRuntimeExports.jsx(Box$2,{textAlign:"center",py:8,children:jsxRuntimeExports.jsx(Typography,{variant:"h6",color:"text.secondary",children:"No packages found matching your criteria"})}),jsxRuntimeExports.jsxs(Dialog$1,{open:fr,onClose:()=>vr(!1),children:[jsxRuntimeExports.jsx(DialogTitle$1,{children:"Confirm Purchase"}),jsxRuntimeExports.jsx(DialogContent$1,{children:Xt&&jsxRuntimeExports.jsxs(Box$2,{children:[jsxRuntimeExports.jsx(Typography,{variant:"body1",gutterBottom:!0,children:"You are about to purchase:"}),jsxRuntimeExports.jsxs(Box$2,{my:2,children:[jsxRuntimeExports.jsxs(Typography,{variant:"h6",children:[sr(Xt.package_type)," ",Xt.package_type.replace(/_/g," ").replace(/\b\w/g,ur=>ur.toUpperCase())," Package"]}),jsxRuntimeExports.jsxs(Typography,{variant:"body2",color:"text.secondary",children:[Xt.data_count," data points"]}),jsxRuntimeExports.jsxs(Typography,{variant:"h5",color:"secondary",mt:1,children:[Xt.price_algo," ALGO"]})]}),jsxRuntimeExports.jsx(Alert,{severity:"info",sx:{mt:2},children:"90% goes to the data seller, 10% platform fee"}),jsxRuntimeExports.jsxs(Alert,{severity:"info",sx:{mt:1},children:[jsxRuntimeExports.jsxs(Typography,{variant:"body2",children:[jsxRuntimeExports.jsx("strong",{children:"Buyer wallet:"})," ",_e?`${_e.slice(0,6)}...${_e.slice(-4)}`:"Not connected"]}),jsxRuntimeExports.jsxs(Typography,{variant:"body2",children:[jsxRuntimeExports.jsx("strong",{children:"Seller wallet:"})," ",Xt.seller_algorand_address?`${Xt.seller_algorand_address.slice(0,6)}...${Xt.seller_algorand_address.slice(-4)}`:"Unknown"]})]})]})}),jsxRuntimeExports.jsxs(DialogActions,{children:[jsxRuntimeExports.jsx(Button,{onClick:()=>vr(!1),disabled:xr,children:"Cancel"}),jsxRuntimeExports.jsx(Button,{onClick:Qt,variant:"contained",color:"secondary",disabled:xr,children:xr?jsxRuntimeExports.jsx(CircularProgress,{size:20}):"Confirm Purchase"})]})]}),Tr&&jsxRuntimeExports.jsxs(Dialog$1,{open:!!Tr,onClose:()=>Br(""),children:[jsxRuntimeExports.jsx(DialogTitle$1,{children:"Transaction Submitted!"}),jsxRuntimeExports.jsxs(DialogContent$1,{children:[jsxRuntimeExports.jsx(Typography,{variant:"body1",gutterBottom:!0,children:"Your transaction has been submitted to the Algorand blockchain."}),jsxRuntimeExports.jsx(Button,{variant:"outlined",fullWidth:!0,sx:{mt:2},onClick:()=>window.open(algorandService.getExplorerUrl(Tr),"_blank"),children:"View on Pera Explorer"})]}),jsxRuntimeExports.jsx(DialogActions,{children:jsxRuntimeExports.jsx(Button,{onClick:()=>Br(""),children:"Close"})})]}),jsxRuntimeExports.jsx(Snackbar,{open:jr.open,autoHideDuration:6e3,onClose:()=>Rr({...jr,open:!1}),message:jr.message})]})}function App(){const[yt,_e]=reactExports.useState(null),[$t,Ft]=reactExports.useState(!0),Vt=createTheme({palette:{mode:"dark",primary:{main:"#FFB300",light:"#FFD54F",dark:"#FF8F00"},secondary:{main:"#5D4037",light:"#8D6E63",dark:"#3E2723"},background:{default:"#1A0E0E",paper:"#2E1A1A"},success:{main:"#8BC34A",light:"#AED581",dark:"#689F38"},error:{main:"#EF5350"},info:{main:"#42A5F5"}},typography:{fontFamily:'"Inter", "Roboto", "Helvetica", "Arial", sans-serif',h3:{fontWeight:700},h4:{fontWeight:600},h5:{fontWeight:600},h6:{fontWeight:600}},components:{MuiButton:{styleOverrides:{root:{borderRadius:8,textTransform:"none",fontWeight:600,padding:"10px 24px"},contained:{boxShadow:"0 4px 14px 0 rgba(255, 179, 0, 0.3)","&:hover":{boxShadow:"0 6px 20px 0 rgba(255, 179, 0, 0.4)"}},"&:disabled":{opacity:.6,cursor:"not-allowed"}}},MuiCard:{styleOverrides:{root:{borderRadius:12,backdropFilter:"blur(10px)",background:"rgba(46, 26, 26, 0.8)",border:"1px solid rgba(255, 179, 0, 0.1)","&:hover":{border:"1px solid rgba(255, 179, 0, 0.5)",transform:"translateY(-4px)",boxShadow:"0 8px 24px rgba(255, 179, 0, 0.2)",transition:"all 0.3s ease"}}}},MuiChip:{styleOverrides:{root:{borderRadius:6,fontWeight:500}}},MuiPaper:{styleOverrides:{root:{backgroundImage:"none"}}},MuiAlert:{styleOverrides:{root:{borderRadius:8}}}}});return reactExports.useEffect(()=>{const qt=localStorage.getItem("worldid_session");if(qt)try{const Ht=JSON.parse(qt);_e({user:Ht.user}),Ft(!1);return}catch(Ht){console.error("Failed to parse worldid_session",Ht),localStorage.removeItem("worldid_session")}supabase.auth.getSession().then(({data:{session:Ht}})=>{_e(Ht),Ft(!1)});const{data:{subscription:zt}}=supabase.auth.onAuthStateChange((Ht,Kt)=>{Kt||localStorage.removeItem("worldid_session"),_e(Kt)});return()=>zt.unsubscribe()},[]),$t?jsxRuntimeExports.jsxs(ThemeProvider,{theme:Vt,children:[jsxRuntimeExports.jsx(CssBaseline,{}),jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"#1A0E0E",flexDirection:"column",gap:"20px"},children:[jsxRuntimeExports.jsx("div",{style:{fontSize:"60px",animation:"pulse 1.5s infinite"},children:"ðª"}),jsxRuntimeExports.jsx("div",{style:{color:"#FFB300",fontSize:"20px"},children:"Baking your experience..."})]})]}):jsxRuntimeExports.jsxs(ThemeProvider,{theme:Vt,children:[jsxRuntimeExports.jsx(CssBaseline,{}),jsxRuntimeExports.jsx(WalletProvider,{children:jsxRuntimeExports.jsx(BuyerWalletProvider,{children:jsxRuntimeExports.jsx(BrowserRouter,{children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/login",element:yt?jsxRuntimeExports.jsx(Navigate,{to:"/dashboard"}):jsxRuntimeExports.jsx(LoginPage,{})}),jsxRuntimeExports.jsx(Route,{path:"/dashboard",element:yt?jsxRuntimeExports.jsx(DashboardPage,{session:yt}):jsxRuntimeExports.jsx(Navigate,{to:"/login"})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace",element:jsxRuntimeExports.jsx(MarketplacePage,{})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(Navigate,{to:"/login"})})]})})})})]})}client.createRoot(document.getElementById("root")).render(jsxRuntimeExports.jsx(React$2.StrictMode,{children:jsxRuntimeExports.jsx(App,{})}));export{Bt as B,Lt as L,Mt as M,Ot as O,Ut as U,Wt as W,ct as c,dt as d,ft as f,getDefaultExportFromCjs$1 as g,ht as h,ut as u,vt as v};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.