@dcl-regenesislabs/mobile-hub 1.0.0-20724632172.commit-bac4912 → 1.0.0-20757928235.commit-b3d789a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,23 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-8e4wv-tH.js","assets/index-DoQzB8-2.js","assets/index-QHMvomuf.js"])))=>i.map(i=>d[i]);
2
- (function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function t(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(o){if(o.ep)return;o.ep=!0;const s=t(o);fetch(o.href,s)}})();var NL=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ML(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function CL(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var i=e.default;if(typeof i=="function"){var t=function n(){var o=!1;try{o=this instanceof n}catch{}return o?Reflect.construct(i,arguments,this.constructor):i.apply(this,arguments)};t.prototype=i.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t}var wp={exports:{}},pu={},Sp={exports:{}},Rt={};var E0;function jL(){if(E0)return Rt;E0=1;var e=Symbol.for("react.element"),i=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),h=Symbol.iterator;function g(C){return C===null||typeof C!="object"?null:(C=h&&C[h]||C["@@iterator"],typeof C=="function"?C:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,R={};function O(C,B,q){this.props=C,this.context=B,this.refs=R,this.updater=q||A}O.prototype.isReactComponent={},O.prototype.setState=function(C,B){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,B,"setState")},O.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function M(){}M.prototype=O.prototype;function _(C,B,q){this.props=C,this.context=B,this.refs=R,this.updater=q||A}var I=_.prototype=new M;I.constructor=_,N(I,O.prototype),I.isPureReactComponent=!0;var S=Array.isArray,v=Object.prototype.hasOwnProperty,T={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function V(C,B,q){var L,U={},ae=null,Ie=null;if(B!=null)for(L in B.ref!==void 0&&(Ie=B.ref),B.key!==void 0&&(ae=""+B.key),B)v.call(B,L)&&!j.hasOwnProperty(L)&&(U[L]=B[L]);var Te=arguments.length-2;if(Te===1)U.children=q;else if(1<Te){for(var ke=Array(Te),Me=0;Me<Te;Me++)ke[Me]=arguments[Me+2];U.children=ke}if(C&&C.defaultProps)for(L in Te=C.defaultProps,Te)U[L]===void 0&&(U[L]=Te[L]);return{$$typeof:e,type:C,key:ae,ref:Ie,props:U,_owner:T.current}}function W(C,B){return{$$typeof:e,type:C.type,key:B,ref:C.ref,props:C.props,_owner:C._owner}}function X(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function fe(C){var B={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(q){return B[q]})}var Ae=/\/+/g;function Se(C,B){return typeof C=="object"&&C!==null&&C.key!=null?fe(""+C.key):B.toString(36)}function Ee(C,B,q,L,U){var ae=typeof C;(ae==="undefined"||ae==="boolean")&&(C=null);var Ie=!1;if(C===null)Ie=!0;else switch(ae){case"string":case"number":Ie=!0;break;case"object":switch(C.$$typeof){case e:case i:Ie=!0}}if(Ie)return Ie=C,U=U(Ie),C=L===""?"."+Se(Ie,0):L,S(U)?(q="",C!=null&&(q=C.replace(Ae,"$&/")+"/"),Ee(U,B,q,"",function(Me){return Me})):U!=null&&(X(U)&&(U=W(U,q+(!U.key||Ie&&Ie.key===U.key?"":(""+U.key).replace(Ae,"$&/")+"/")+C)),B.push(U)),1;if(Ie=0,L=L===""?".":L+":",S(C))for(var Te=0;Te<C.length;Te++){ae=C[Te];var ke=L+Se(ae,Te);Ie+=Ee(ae,B,q,ke,U)}else if(ke=g(C),typeof ke=="function")for(C=ke.call(C),Te=0;!(ae=C.next()).done;)ae=ae.value,ke=L+Se(ae,Te++),Ie+=Ee(ae,B,q,ke,U);else if(ae==="object")throw B=String(C),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.");return Ie}function je(C,B,q){if(C==null)return C;var L=[],U=0;return Ee(C,L,"","",function(ae){return B.call(q,ae,U++)}),L}function Ce(C){if(C._status===-1){var B=C._result;B=B(),B.then(function(q){(C._status===0||C._status===-1)&&(C._status=1,C._result=q)},function(q){(C._status===0||C._status===-1)&&(C._status=2,C._result=q)}),C._status===-1&&(C._status=0,C._result=B)}if(C._status===1)return C._result.default;throw C._result}var Oe={current:null},ge={transition:null},ie={ReactCurrentDispatcher:Oe,ReactCurrentBatchConfig:ge,ReactCurrentOwner:T};function K(){throw Error("act(...) is not supported in production builds of React.")}return Rt.Children={map:je,forEach:function(C,B,q){je(C,function(){B.apply(this,arguments)},q)},count:function(C){var B=0;return je(C,function(){B++}),B},toArray:function(C){return je(C,function(B){return B})||[]},only:function(C){if(!X(C))throw Error("React.Children.only expected to receive a single React element child.");return C}},Rt.Component=O,Rt.Fragment=t,Rt.Profiler=o,Rt.PureComponent=_,Rt.StrictMode=n,Rt.Suspense=f,Rt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ie,Rt.act=K,Rt.cloneElement=function(C,B,q){if(C==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+C+".");var L=N({},C.props),U=C.key,ae=C.ref,Ie=C._owner;if(B!=null){if(B.ref!==void 0&&(ae=B.ref,Ie=T.current),B.key!==void 0&&(U=""+B.key),C.type&&C.type.defaultProps)var Te=C.type.defaultProps;for(ke in B)v.call(B,ke)&&!j.hasOwnProperty(ke)&&(L[ke]=B[ke]===void 0&&Te!==void 0?Te[ke]:B[ke])}var ke=arguments.length-2;if(ke===1)L.children=q;else if(1<ke){Te=Array(ke);for(var Me=0;Me<ke;Me++)Te[Me]=arguments[Me+2];L.children=Te}return{$$typeof:e,type:C.type,key:U,ref:ae,props:L,_owner:Ie}},Rt.createContext=function(C){return C={$$typeof:l,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},C.Provider={$$typeof:s,_context:C},C.Consumer=C},Rt.createElement=V,Rt.createFactory=function(C){var B=V.bind(null,C);return B.type=C,B},Rt.createRef=function(){return{current:null}},Rt.forwardRef=function(C){return{$$typeof:c,render:C}},Rt.isValidElement=X,Rt.lazy=function(C){return{$$typeof:y,_payload:{_status:-1,_result:C},_init:Ce}},Rt.memo=function(C,B){return{$$typeof:p,type:C,compare:B===void 0?null:B}},Rt.startTransition=function(C){var B=ge.transition;ge.transition={};try{C()}finally{ge.transition=B}},Rt.unstable_act=K,Rt.useCallback=function(C,B){return Oe.current.useCallback(C,B)},Rt.useContext=function(C){return Oe.current.useContext(C)},Rt.useDebugValue=function(){},Rt.useDeferredValue=function(C){return Oe.current.useDeferredValue(C)},Rt.useEffect=function(C,B){return Oe.current.useEffect(C,B)},Rt.useId=function(){return Oe.current.useId()},Rt.useImperativeHandle=function(C,B,q){return Oe.current.useImperativeHandle(C,B,q)},Rt.useInsertionEffect=function(C,B){return Oe.current.useInsertionEffect(C,B)},Rt.useLayoutEffect=function(C,B){return Oe.current.useLayoutEffect(C,B)},Rt.useMemo=function(C,B){return Oe.current.useMemo(C,B)},Rt.useReducer=function(C,B,q){return Oe.current.useReducer(C,B,q)},Rt.useRef=function(C){return Oe.current.useRef(C)},Rt.useState=function(C){return Oe.current.useState(C)},Rt.useSyncExternalStore=function(C,B,q){return Oe.current.useSyncExternalStore(C,B,q)},Rt.useTransition=function(){return Oe.current.useTransition()},Rt.version="18.3.1",Rt}var b0;function S_(){return b0||(b0=1,Sp.exports=jL()),Sp.exports}var w0;function LL(){if(w0)return pu;w0=1;var e=S_(),i=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(c,f,p){var y,h={},g=null,A=null;p!==void 0&&(g=""+p),f.key!==void 0&&(g=""+f.key),f.ref!==void 0&&(A=f.ref);for(y in f)n.call(f,y)&&!s.hasOwnProperty(y)&&(h[y]=f[y]);if(c&&c.defaultProps)for(y in f=c.defaultProps,f)h[y]===void 0&&(h[y]=f[y]);return{$$typeof:i,type:c,key:g,ref:A,props:h,_owner:o.current}}return pu.Fragment=t,pu.jsx=l,pu.jsxs=l,pu}var S0;function DL(){return S0||(S0=1,wp.exports=LL()),wp.exports}var le=DL(),re=S_(),fc={},Tp={exports:{}},un={},Ap={exports:{}},Op={};var T0;function kL(){return T0||(T0=1,(function(e){function i(ge,ie){var K=ge.length;ge.push(ie);e:for(;0<K;){var C=K-1>>>1,B=ge[C];if(0<o(B,ie))ge[C]=ie,ge[K]=B,K=C;else break e}}function t(ge){return ge.length===0?null:ge[0]}function n(ge){if(ge.length===0)return null;var ie=ge[0],K=ge.pop();if(K!==ie){ge[0]=K;e:for(var C=0,B=ge.length,q=B>>>1;C<q;){var L=2*(C+1)-1,U=ge[L],ae=L+1,Ie=ge[ae];if(0>o(U,K))ae<B&&0>o(Ie,U)?(ge[C]=Ie,ge[ae]=K,C=ae):(ge[C]=U,ge[L]=K,C=L);else if(ae<B&&0>o(Ie,K))ge[C]=Ie,ge[ae]=K,C=ae;else break e}}return ie}function o(ge,ie){var K=ge.sortIndex-ie.sortIndex;return K!==0?K:ge.id-ie.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],p=[],y=1,h=null,g=3,A=!1,N=!1,R=!1,O=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(ge){for(var ie=t(p);ie!==null;){if(ie.callback===null)n(p);else if(ie.startTime<=ge)n(p),ie.sortIndex=ie.expirationTime,i(f,ie);else break;ie=t(p)}}function S(ge){if(R=!1,I(ge),!N)if(t(f)!==null)N=!0,Ce(v);else{var ie=t(p);ie!==null&&Oe(S,ie.startTime-ge)}}function v(ge,ie){N=!1,R&&(R=!1,M(V),V=-1),A=!0;var K=g;try{for(I(ie),h=t(f);h!==null&&(!(h.expirationTime>ie)||ge&&!fe());){var C=h.callback;if(typeof C=="function"){h.callback=null,g=h.priorityLevel;var B=C(h.expirationTime<=ie);ie=e.unstable_now(),typeof B=="function"?h.callback=B:h===t(f)&&n(f),I(ie)}else n(f);h=t(f)}if(h!==null)var q=!0;else{var L=t(p);L!==null&&Oe(S,L.startTime-ie),q=!1}return q}finally{h=null,g=K,A=!1}}var T=!1,j=null,V=-1,W=5,X=-1;function fe(){return!(e.unstable_now()-X<W)}function Ae(){if(j!==null){var ge=e.unstable_now();X=ge;var ie=!0;try{ie=j(!0,ge)}finally{ie?Se():(T=!1,j=null)}}else T=!1}var Se;if(typeof _=="function")Se=function(){_(Ae)};else if(typeof MessageChannel<"u"){var Ee=new MessageChannel,je=Ee.port2;Ee.port1.onmessage=Ae,Se=function(){je.postMessage(null)}}else Se=function(){O(Ae,0)};function Ce(ge){j=ge,T||(T=!0,Se())}function Oe(ge,ie){V=O(function(){ge(e.unstable_now())},ie)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(ge){ge.callback=null},e.unstable_continueExecution=function(){N||A||(N=!0,Ce(v))},e.unstable_forceFrameRate=function(ge){0>ge||125<ge?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<ge?Math.floor(1e3/ge):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return t(f)},e.unstable_next=function(ge){switch(g){case 1:case 2:case 3:var ie=3;break;default:ie=g}var K=g;g=ie;try{return ge()}finally{g=K}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(ge,ie){switch(ge){case 1:case 2:case 3:case 4:case 5:break;default:ge=3}var K=g;g=ge;try{return ie()}finally{g=K}},e.unstable_scheduleCallback=function(ge,ie,K){var C=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?C+K:C):K=C,ge){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=K+B,ge={id:y++,callback:ie,priorityLevel:ge,startTime:K,expirationTime:B,sortIndex:-1},K>C?(ge.sortIndex=K,i(p,ge),t(f)===null&&ge===t(p)&&(R?(M(V),V=-1):R=!0,Oe(S,K-C))):(ge.sortIndex=B,i(f,ge),N||A||(N=!0,Ce(v))),ge},e.unstable_shouldYield=fe,e.unstable_wrapCallback=function(ge){var ie=g;return function(){var K=g;g=ie;try{return ge.apply(this,arguments)}finally{g=K}}}})(Op)),Op}var A0;function qL(){return A0||(A0=1,Ap.exports=kL()),Ap.exports}var O0;function BL(){if(O0)return un;O0=1;var e=S_(),i=qL();function t(r){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+r+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,o={};function s(r,a){l(r,a),l(r+"Capture",a)}function l(r,a){for(o[r]=a,r=0;r<a.length;r++)n.add(a[r])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,p=/^[: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]*$/,y={},h={};function g(r){return f.call(h,r)?!0:f.call(y,r)?!1:p.test(r)?h[r]=!0:(y[r]=!0,!1)}function A(r,a,u,d){if(u!==null&&u.type===0)return!1;switch(typeof a){case"function":case"symbol":return!0;case"boolean":return d?!1:u!==null?!u.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function N(r,a,u,d){if(a===null||typeof a>"u"||A(r,a,u,d))return!0;if(d)return!1;if(u!==null)switch(u.type){case 3:return!a;case 4:return a===!1;case 5:return isNaN(a);case 6:return isNaN(a)||1>a}return!1}function R(r,a,u,d,m,w,D){this.acceptsBooleans=a===2||a===3||a===4,this.attributeName=d,this.attributeNamespace=m,this.mustUseProperty=u,this.propertyName=r,this.type=a,this.sanitizeURL=w,this.removeEmptyString=D}var O={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){O[r]=new R(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var a=r[0];O[a]=new R(a,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){O[r]=new R(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){O[r]=new R(r,2,!1,r,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(r){O[r]=new R(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){O[r]=new R(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){O[r]=new R(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){O[r]=new R(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){O[r]=new R(r,5,!1,r.toLowerCase(),null,!1,!1)});var M=/[\-:]([a-z])/g;function _(r){return r[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(r){var a=r.replace(M,_);O[a]=new R(a,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var a=r.replace(M,_);O[a]=new R(a,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var a=r.replace(M,_);O[a]=new R(a,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){O[r]=new R(r,1,!1,r.toLowerCase(),null,!1,!1)}),O.xlinkHref=new R("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){O[r]=new R(r,1,!1,r.toLowerCase(),null,!0,!0)});function I(r,a,u,d){var m=O.hasOwnProperty(a)?O[a]:null;(m!==null?m.type!==0:d||!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(N(a,u,m,d)&&(u=null),d||m===null?g(a)&&(u===null?r.removeAttribute(a):r.setAttribute(a,""+u)):m.mustUseProperty?r[m.propertyName]=u===null?m.type===3?!1:"":u:(a=m.attributeName,d=m.attributeNamespace,u===null?r.removeAttribute(a):(m=m.type,u=m===3||m===4&&u===!0?"":""+u,d?r.setAttributeNS(d,a,u):r.setAttribute(a,u))))}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,v=Symbol.for("react.element"),T=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),fe=Symbol.for("react.context"),Ae=Symbol.for("react.forward_ref"),Se=Symbol.for("react.suspense"),Ee=Symbol.for("react.suspense_list"),je=Symbol.for("react.memo"),Ce=Symbol.for("react.lazy"),Oe=Symbol.for("react.offscreen"),ge=Symbol.iterator;function ie(r){return r===null||typeof r!="object"?null:(r=ge&&r[ge]||r["@@iterator"],typeof r=="function"?r:null)}var K=Object.assign,C;function B(r){if(C===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);C=a&&a[1]||""}return`
3
- `+C+r}var q=!1;function L(r,a){if(!r||q)return"";q=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(a)if(a=function(){throw Error()},Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(a,[])}catch(be){var d=be}Reflect.construct(r,[],a)}else{try{a.call()}catch(be){d=be}r.call(a.prototype)}else{try{throw Error()}catch(be){d=be}r()}}catch(be){if(be&&d&&typeof be.stack=="string"){for(var m=be.stack.split(`
4
- `),w=d.stack.split(`
5
- `),D=m.length-1,Q=w.length-1;1<=D&&0<=Q&&m[D]!==w[Q];)Q--;for(;1<=D&&0<=Q;D--,Q--)if(m[D]!==w[Q]){if(D!==1||Q!==1)do if(D--,Q--,0>Q||m[D]!==w[Q]){var se=`
6
- `+m[D].replace(" at new "," at ");return r.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",r.displayName)),se}while(1<=D&&0<=Q);break}}}finally{q=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?B(r):""}function U(r){switch(r.tag){case 5:return B(r.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return r=L(r.type,!1),r;case 11:return r=L(r.type.render,!1),r;case 1:return r=L(r.type,!0),r;default:return""}}function ae(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case j:return"Fragment";case T:return"Portal";case W:return"Profiler";case V:return"StrictMode";case Se:return"Suspense";case Ee:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case fe:return(r.displayName||"Context")+".Consumer";case X:return(r._context.displayName||"Context")+".Provider";case Ae:var a=r.render;return r=r.displayName,r||(r=a.displayName||a.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case je:return a=r.displayName||null,a!==null?a:ae(r.type)||"Memo";case Ce:a=r._payload,r=r._init;try{return ae(r(a))}catch{}}return null}function Ie(r){var a=r.type;switch(r.tag){case 24:return"Cache";case 9:return(a.displayName||"Context")+".Consumer";case 10:return(a._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=a.render,r=r.displayName||r.name||"",a.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ae(a);case 8:return a===V?"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 a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a}return null}function Te(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function ke(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Me(r){var a=ke(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,a),d=""+r[a];if(!r.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var m=u.get,w=u.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return m.call(this)},set:function(D){d=""+D,w.call(this,D)}}),Object.defineProperty(r,a,{enumerable:u.enumerable}),{getValue:function(){return d},setValue:function(D){d=""+D},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function ue(r){r._valueTracker||(r._valueTracker=Me(r))}function de(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var u=a.getValue(),d="";return r&&(d=ke(r)?r.checked?"true":"false":r.value),r=d,r!==u?(a.setValue(r),!0):!1}function Re(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Le(r,a){var u=a.checked;return K({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function Ye(r,a){var u=a.defaultValue==null?"":a.defaultValue,d=a.checked!=null?a.checked:a.defaultChecked;u=Te(a.value!=null?a.value:u),r._wrapperState={initialChecked:d,initialValue:u,controlled:a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null}}function Qe(r,a){a=a.checked,a!=null&&I(r,"checked",a,!1)}function Vt(r,a){Qe(r,a);var u=Te(a.value),d=a.type;if(u!=null)d==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(d==="submit"||d==="reset"){r.removeAttribute("value");return}a.hasOwnProperty("value")?rr(r,a.type,u):a.hasOwnProperty("defaultValue")&&rr(r,a.type,Te(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(r.defaultChecked=!!a.defaultChecked)}function Lt(r,a,u){if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var d=a.type;if(!(d!=="submit"&&d!=="reset"||a.value!==void 0&&a.value!==null))return;a=""+r._wrapperState.initialValue,u||a===r.value||(r.value=a),r.defaultValue=a}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function rr(r,a,u){(a!=="number"||Re(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var Ut=Array.isArray;function Ft(r,a,u,d){if(r=r.options,a){a={};for(var m=0;m<u.length;m++)a["$"+u[m]]=!0;for(u=0;u<r.length;u++)m=a.hasOwnProperty("$"+r[u].value),r[u].selected!==m&&(r[u].selected=m),m&&d&&(r[u].defaultSelected=!0)}else{for(u=""+Te(u),a=null,m=0;m<r.length;m++){if(r[m].value===u){r[m].selected=!0,d&&(r[m].defaultSelected=!0);return}a!==null||r[m].disabled||(a=r[m])}a!==null&&(a.selected=!0)}}function zr(r,a){if(a.dangerouslySetInnerHTML!=null)throw Error(t(91));return K({},a,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function or(r,a){var u=a.value;if(u==null){if(u=a.children,a=a.defaultValue,u!=null){if(a!=null)throw Error(t(92));if(Ut(u)){if(1<u.length)throw Error(t(93));u=u[0]}a=u}a==null&&(a=""),u=a}r._wrapperState={initialValue:Te(u)}}function gn(r,a){var u=Te(a.value),d=Te(a.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),a.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),d!=null&&(r.defaultValue=""+d)}function Jr(r){var a=r.textContent;a===r._wrapperState.initialValue&&a!==""&&a!==null&&(r.value=a)}function Zr(r){switch(r){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 cn(r,a){return r==null||r==="http://www.w3.org/1999/xhtml"?Zr(a):r==="http://www.w3.org/2000/svg"&&a==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var sr,dn=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(a,u,d,m){MSApp.execUnsafeLocalFunction(function(){return r(a,u,d,m)})}:r})(function(r,a){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=a;else{for(sr=sr||document.createElement("div"),sr.innerHTML="<svg>"+a.valueOf().toString()+"</svg>",a=sr.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;a.firstChild;)r.appendChild(a.firstChild)}});function Pr(r,a){if(a){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=a;return}}r.textContent=a}var vn={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},xr=["Webkit","ms","Moz","O"];Object.keys(vn).forEach(function(r){xr.forEach(function(a){a=a+r.charAt(0).toUpperCase()+r.substring(1),vn[a]=vn[r]})});function _n(r,a,u){return a==null||typeof a=="boolean"||a===""?"":u||typeof a!="number"||a===0||vn.hasOwnProperty(r)&&vn[r]?(""+a).trim():a+"px"}function $r(r,a){r=r.style;for(var u in a)if(a.hasOwnProperty(u)){var d=u.indexOf("--")===0,m=_n(u,a[u],d);u==="float"&&(u="cssFloat"),d?r.setProperty(u,m):r[u]=m}}var Qi=K({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 En(r,a){if(a){if(Qi[r]&&(a.children!=null||a.dangerouslySetInnerHTML!=null))throw Error(t(137,r));if(a.dangerouslySetInnerHTML!=null){if(a.children!=null)throw Error(t(60));if(typeof a.dangerouslySetInnerHTML!="object"||!("__html"in a.dangerouslySetInnerHTML))throw Error(t(61))}if(a.style!=null&&typeof a.style!="object")throw Error(t(62))}}function Oi(r,a){if(r.indexOf("-")===-1)return typeof a.is=="string";switch(r){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 Pi=null;function fi(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Ii=null,Ir=null,At=null;function Gr(r){if(r=xs(r)){if(typeof Ii!="function")throw Error(t(280));var a=r.stateNode;a&&(a=Pl(a),Ii(r.stateNode,r.type,a))}}function en(r){Ir?At?At.push(r):At=[r]:Ir=r}function te(){if(Ir){var r=Ir,a=At;if(At=Ir=null,Gr(r),a)for(r=0;r<a.length;r++)Gr(a[r])}}function F(r,a){return r(a)}function Z(){}var pe=!1;function we(r,a,u){if(pe)return r(a,u);pe=!0;try{return F(r,a,u)}finally{pe=!1,(Ir!==null||At!==null)&&(Z(),te())}}function Ne(r,a){var u=r.stateNode;if(u===null)return null;var d=Pl(u);if(d===null)return null;u=d[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(t(231,a,typeof u));return u}var We=!1;if(c)try{var Ke={};Object.defineProperty(Ke,"passive",{get:function(){We=!0}}),window.addEventListener("test",Ke,Ke),window.removeEventListener("test",Ke,Ke)}catch{We=!1}function ht(r,a,u,d,m,w,D,Q,se){var be=Array.prototype.slice.call(arguments,3);try{a.apply(u,be)}catch(qe){this.onError(qe)}}var ut=!1,vt=null,wt=!1,Ot=null,$t={onError:function(r){ut=!0,vt=r}};function Qt(r,a,u,d,m,w,D,Q,se){ut=!1,vt=null,ht.apply($t,arguments)}function yr(r,a,u,d,m,w,D,Q,se){if(Qt.apply(this,arguments),ut){if(ut){var be=vt;ut=!1,vt=null}else throw Error(t(198));wt||(wt=!0,Ot=be)}}function Dr(r){var a=r,u=r;if(r.alternate)for(;a.return;)a=a.return;else{r=a;do a=r,(a.flags&4098)!==0&&(u=a.return),r=a.return;while(r)}return a.tag===3?u:null}function bn(r){if(r.tag===13){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function kn(r){if(Dr(r)!==r)throw Error(t(188))}function Ji(r){var a=r.alternate;if(!a){if(a=Dr(r),a===null)throw Error(t(188));return a!==r?null:r}for(var u=r,d=a;;){var m=u.return;if(m===null)break;var w=m.alternate;if(w===null){if(d=m.return,d!==null){u=d;continue}break}if(m.child===w.child){for(w=m.child;w;){if(w===u)return kn(m),r;if(w===d)return kn(m),a;w=w.sibling}throw Error(t(188))}if(u.return!==d.return)u=m,d=w;else{for(var D=!1,Q=m.child;Q;){if(Q===u){D=!0,u=m,d=w;break}if(Q===d){D=!0,d=m,u=w;break}Q=Q.sibling}if(!D){for(Q=w.child;Q;){if(Q===u){D=!0,u=w,d=m;break}if(Q===d){D=!0,d=w,u=m;break}Q=Q.sibling}if(!D)throw Error(t(189))}}if(u.alternate!==d)throw Error(t(190))}if(u.tag!==3)throw Error(t(188));return u.stateNode.current===u?r:a}function Rr(r){return r=Ji(r),r!==null?pi(r):null}function pi(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var a=pi(r);if(a!==null)return a;r=r.sibling}return null}var zs=i.unstable_scheduleCallback,Ea=i.unstable_cancelCallback,ml=i.unstable_shouldYield,qn=i.unstable_requestPaint,er=i.unstable_now,yl=i.unstable_getCurrentPriorityLevel,Wo=i.unstable_ImmediatePriority,ba=i.unstable_UserBlockingPriority,wa=i.unstable_NormalPriority,nf=i.unstable_LowPriority,gl=i.unstable_IdlePriority,Zi=null,wn=null;function Ko(r){if(wn&&typeof wn.onCommitFiberRoot=="function")try{wn.onCommitFiberRoot(Zi,r,void 0,(r.current.flags&128)===128)}catch{}}var Wr=Math.clz32?Math.clz32:tt,vl=Math.log,_l=Math.LN2;function tt(r){return r>>>=0,r===0?32:31-(vl(r)/_l|0)|0}var xe=64,$e=4194304;function ft(r){switch(r&-r){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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function gr(r,a){var u=r.pendingLanes;if(u===0)return 0;var d=0,m=r.suspendedLanes,w=r.pingedLanes,D=u&268435455;if(D!==0){var Q=D&~m;Q!==0?d=ft(Q):(w&=D,w!==0&&(d=ft(w)))}else D=u&~m,D!==0?d=ft(D):w!==0&&(d=ft(w));if(d===0)return 0;if(a!==0&&a!==d&&(a&m)===0&&(m=d&-d,w=a&-a,m>=w||m===16&&(w&4194240)!==0))return a;if((d&4)!==0&&(d|=u&16),a=r.entangledLanes,a!==0)for(r=r.entanglements,a&=d;0<a;)u=31-Wr(a),m=1<<u,d|=r[u],a&=~m;return d}function El(r,a){switch(r){case 1:case 2:case 4:return a+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 a+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 at(r,a){for(var u=r.suspendedLanes,d=r.pingedLanes,m=r.expirationTimes,w=r.pendingLanes;0<w;){var D=31-Wr(w),Q=1<<D,se=m[D];se===-1?((Q&u)===0||(Q&d)!==0)&&(m[D]=El(Q,a)):se<=a&&(r.expiredLanes|=Q),w&=~Q}}function Ze(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function Gs(){var r=xe;return xe<<=1,(xe&4194240)===0&&(xe=64),r}function Yo(r){for(var a=[],u=0;31>u;u++)a.push(r);return a}function Ri(r,a,u){r.pendingLanes|=a,a!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,a=31-Wr(a),r[a]=u}function Sa(r,a){var u=r.pendingLanes&~a;r.pendingLanes=a,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=a,r.mutableReadLanes&=a,r.entangledLanes&=a,a=r.entanglements;var d=r.eventTimes;for(r=r.expirationTimes;0<u;){var m=31-Wr(u),w=1<<m;a[m]=0,d[m]=-1,r[m]=-1,u&=~w}}function Ta(r,a){var u=r.entangledLanes|=a;for(r=r.entanglements;u;){var d=31-Wr(u),m=1<<d;m&a|r[d]&a&&(r[d]|=a),u&=~m}}var Bt=0;function Ws(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var E,P,k,Y,$,oe=!1,Pe=[],Ve=null,it=null,st=null,dr=new Map,Ht=new Map,ze=[],vr="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 zt(r,a){switch(r){case"focusin":case"focusout":Ve=null;break;case"dragenter":case"dragleave":it=null;break;case"mouseover":case"mouseout":st=null;break;case"pointerover":case"pointerout":dr.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ht.delete(a.pointerId)}}function Dt(r,a,u,d,m,w){return r===null||r.nativeEvent!==w?(r={blockedOn:a,domEventName:u,eventSystemFlags:d,nativeEvent:w,targetContainers:[m]},a!==null&&(a=xs(a),a!==null&&P(a)),r):(r.eventSystemFlags|=d,a=r.targetContainers,m!==null&&a.indexOf(m)===-1&&a.push(m),r)}function Sr(r,a,u,d,m){switch(a){case"focusin":return Ve=Dt(Ve,r,a,u,d,m),!0;case"dragenter":return it=Dt(it,r,a,u,d,m),!0;case"mouseover":return st=Dt(st,r,a,u,d,m),!0;case"pointerover":var w=m.pointerId;return dr.set(w,Dt(dr.get(w)||null,r,a,u,d,m)),!0;case"gotpointercapture":return w=m.pointerId,Ht.set(w,Dt(Ht.get(w)||null,r,a,u,d,m)),!0}return!1}function Sn(r){var a=Da(r.target);if(a!==null){var u=Dr(a);if(u!==null){if(a=u.tag,a===13){if(a=bn(u),a!==null){r.blockedOn=a,$(r.priority,function(){k(u)});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Kr(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var u=hi(r.domEventName,r.eventSystemFlags,a[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var d=new u.constructor(u.type,u);Pi=d,u.target.dispatchEvent(d),Pi=null}else return a=xs(u),a!==null&&P(a),r.blockedOn=u,!1;a.shift()}return!0}function _r(r,a,u){Kr(r)&&u.delete(a)}function Tn(){oe=!1,Ve!==null&&Kr(Ve)&&(Ve=null),it!==null&&Kr(it)&&(it=null),st!==null&&Kr(st)&&(st=null),dr.forEach(_r),Ht.forEach(_r)}function tn(r,a){r.blockedOn===a&&(r.blockedOn=null,oe||(oe=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Tn)))}function nr(r){function a(m){return tn(m,r)}if(0<Pe.length){tn(Pe[0],r);for(var u=1;u<Pe.length;u++){var d=Pe[u];d.blockedOn===r&&(d.blockedOn=null)}}for(Ve!==null&&tn(Ve,r),it!==null&&tn(it,r),st!==null&&tn(st,r),dr.forEach(a),Ht.forEach(a),u=0;u<ze.length;u++)d=ze[u],d.blockedOn===r&&(d.blockedOn=null);for(;0<ze.length&&(u=ze[0],u.blockedOn===null);)Sn(u),u.blockedOn===null&&ze.shift()}var kr=S.ReactCurrentBatchConfig,fr=!0;function An(r,a,u,d){var m=Bt,w=kr.transition;kr.transition=null;try{Bt=1,fn(r,a,u,d)}finally{Bt=m,kr.transition=w}}function Ue(r,a,u,d){var m=Bt,w=kr.transition;kr.transition=null;try{Bt=4,fn(r,a,u,d)}finally{Bt=m,kr.transition=w}}function fn(r,a,u,d){if(fr){var m=hi(r,a,u,d);if(m===null)ff(r,a,d,Bn,u),zt(r,d);else if(Sr(m,r,a,u,d))d.stopPropagation();else if(zt(r,d),a&4&&-1<vr.indexOf(r)){for(;m!==null;){var w=xs(m);if(w!==null&&E(w),w=hi(r,a,u,d),w===null&&ff(r,a,d,Bn,u),w===m)break;m=w}m!==null&&d.stopPropagation()}else ff(r,a,d,null,u)}}var Bn=null;function hi(r,a,u,d){if(Bn=null,r=fi(d),r=Da(r),r!==null)if(a=Dr(r),a===null)r=null;else if(u=a.tag,u===13){if(r=bn(a),r!==null)return r;r=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null);return Bn=r,null}function Nt(r){switch(r){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(yl()){case Wo:return 1;case ba:return 4;case wa:case nf:return 16;case gl:return 536870912;default:return 16}default:return 16}}var ur=null,z=null,b=null;function H(){if(b)return b;var r,a=z,u=a.length,d,m="value"in ur?ur.value:ur.textContent,w=m.length;for(r=0;r<u&&a[r]===m[r];r++);var D=u-r;for(d=1;d<=D&&a[u-d]===m[w-d];d++);return b=m.slice(r,1<d?1-d:void 0)}function J(r){var a=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function G(){return!0}function ee(){return!1}function x(r){function a(u,d,m,w,D){this._reactName=u,this._targetInst=m,this.type=d,this.nativeEvent=w,this.target=D,this.currentTarget=null;for(var Q in r)r.hasOwnProperty(Q)&&(u=r[Q],this[Q]=u?u(w):w[Q]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?G:ee,this.isPropagationStopped=ee,this}return K(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=G)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=G)},persist:function(){},isPersistent:G}),a}var ne={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},he=x(ne),ve=K({},ne,{view:0,detail:0}),ye=x(ve),Ge,dt,pt,Tt=K({},ve,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xi,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==pt&&(pt&&r.type==="mousemove"?(Ge=r.screenX-pt.screenX,dt=r.screenY-pt.screenY):dt=Ge=0,pt=r),Ge)},movementY:function(r){return"movementY"in r?r.movementY:dt}}),Gt=x(Tt),Yt=K({},Tt,{dataTransfer:0}),Pt=x(Yt),Mt=K({},ve,{relatedTarget:0}),Jt=x(Mt),Un=K({},ne,{animationName:0,elapsedTime:0,pseudoElement:0}),mi=x(Un),yi=K({},ne,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Nr=x(yi),On=K({},ne,{data:0}),hr=x(On),lr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wt={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"},Xo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Qo(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=Xo[r])?!!a[r]:!1}function xi(){return Qo}var Jo=K({},ve,{key:function(r){if(r.key){var a=lr[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=J(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?Wt[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xi,charCode:function(r){return r.type==="keypress"?J(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?J(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),Zo=x(Jo),xo=K({},Tt,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Aa=x(xo),$o=K({},ve,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xi}),es=x($o),ts=K({},ne,{propertyName:0,elapsedTime:0,pseudoElement:0}),rs=x(ts),ns=K({},Tt,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),is=x(ns),as=[9,13,27,32],$i=c&&"CompositionEvent"in window,gi=null;c&&"documentMode"in document&&(gi=document.documentMode);var os=c&&"TextEvent"in window&&!gi,Oa=c&&(!$i||gi&&8<gi&&11>=gi),Pa=" ",Ia=!1;function Ra(r,a){switch(r){case"keyup":return as.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Na(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Fn=!1;function ss(r,a){switch(r){case"compositionend":return Na(a);case"keypress":return a.which!==32?null:(Ia=!0,Pa);case"textInput":return r=a.data,r===Pa&&Ia?null:r;default:return null}}function us(r,a){if(Fn)return r==="compositionend"||!$i&&Ra(r,a)?(r=H(),b=z=ur=null,Fn=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Oa&&a.locale!=="ko"?null:a.data;default:return null}}var ls={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 Ma(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!ls[r.type]:a==="textarea"}function Ca(r,a,u,d){en(d),a=Tl(a,"onChange"),0<a.length&&(u=new he("onChange","change",null,u,d),r.push({event:u,listeners:a}))}var vi=null,_i=null;function cs(r){kE(r,0)}function Ni(r){var a=ys(r);if(de(a))return r}function ds(r,a){if(r==="change")return a}var ja=!1;if(c){var ea;if(c){var ta="oninput"in document;if(!ta){var La=document.createElement("div");La.setAttribute("oninput","return;"),ta=typeof La.oninput=="function"}ea=ta}else ea=!1;ja=ea&&(!document.documentMode||9<document.documentMode)}function bE(){vi&&(vi.detachEvent("onpropertychange",wE),_i=vi=null)}function wE(r){if(r.propertyName==="value"&&Ni(_i)){var a=[];Ca(a,_i,r,fi(r)),we(cs,a)}}function Cj(r,a,u){r==="focusin"?(bE(),vi=a,_i=u,vi.attachEvent("onpropertychange",wE)):r==="focusout"&&bE()}function jj(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Ni(_i)}function Lj(r,a){if(r==="click")return Ni(a)}function Dj(r,a){if(r==="input"||r==="change")return Ni(a)}function kj(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var Vn=typeof Object.is=="function"?Object.is:kj;function Ks(r,a){if(Vn(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var u=Object.keys(r),d=Object.keys(a);if(u.length!==d.length)return!1;for(d=0;d<u.length;d++){var m=u[d];if(!f.call(a,m)||!Vn(r[m],a[m]))return!1}return!0}function SE(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function TE(r,a){var u=SE(r);r=0;for(var d;u;){if(u.nodeType===3){if(d=r+u.textContent.length,r<=a&&d>=a)return{node:u,offset:a-r};r=d}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=SE(u)}}function AE(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?AE(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function OE(){for(var r=window,a=Re();a instanceof r.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)r=a.contentWindow;else break;a=Re(r.document)}return a}function af(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}function qj(r){var a=OE(),u=r.focusedElem,d=r.selectionRange;if(a!==u&&u&&u.ownerDocument&&AE(u.ownerDocument.documentElement,u)){if(d!==null&&af(u)){if(a=d.start,r=d.end,r===void 0&&(r=a),"selectionStart"in u)u.selectionStart=a,u.selectionEnd=Math.min(r,u.value.length);else if(r=(a=u.ownerDocument||document)&&a.defaultView||window,r.getSelection){r=r.getSelection();var m=u.textContent.length,w=Math.min(d.start,m);d=d.end===void 0?w:Math.min(d.end,m),!r.extend&&w>d&&(m=d,d=w,w=m),m=TE(u,w);var D=TE(u,d);m&&D&&(r.rangeCount!==1||r.anchorNode!==m.node||r.anchorOffset!==m.offset||r.focusNode!==D.node||r.focusOffset!==D.offset)&&(a=a.createRange(),a.setStart(m.node,m.offset),r.removeAllRanges(),w>d?(r.addRange(a),r.extend(D.node,D.offset)):(a.setEnd(D.node,D.offset),r.addRange(a)))}}for(a=[],r=u;r=r.parentNode;)r.nodeType===1&&a.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<a.length;u++)r=a[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var Bj=c&&"documentMode"in document&&11>=document.documentMode,fs=null,of=null,Ys=null,sf=!1;function PE(r,a,u){var d=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;sf||fs==null||fs!==Re(d)||(d=fs,"selectionStart"in d&&af(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Ys&&Ks(Ys,d)||(Ys=d,d=Tl(of,"onSelect"),0<d.length&&(a=new he("onSelect","select",null,a,u),r.push({event:a,listeners:d}),a.target=fs)))}function bl(r,a){var u={};return u[r.toLowerCase()]=a.toLowerCase(),u["Webkit"+r]="webkit"+a,u["Moz"+r]="moz"+a,u}var ps={animationend:bl("Animation","AnimationEnd"),animationiteration:bl("Animation","AnimationIteration"),animationstart:bl("Animation","AnimationStart"),transitionend:bl("Transition","TransitionEnd")},uf={},IE={};c&&(IE=document.createElement("div").style,"AnimationEvent"in window||(delete ps.animationend.animation,delete ps.animationiteration.animation,delete ps.animationstart.animation),"TransitionEvent"in window||delete ps.transitionend.transition);function wl(r){if(uf[r])return uf[r];if(!ps[r])return r;var a=ps[r],u;for(u in a)if(a.hasOwnProperty(u)&&u in IE)return uf[r]=a[u];return r}var RE=wl("animationend"),NE=wl("animationiteration"),ME=wl("animationstart"),CE=wl("transitionend"),jE=new Map,LE="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 ra(r,a){jE.set(r,a),s(a,[r])}for(var lf=0;lf<LE.length;lf++){var cf=LE[lf],Uj=cf.toLowerCase(),Fj=cf[0].toUpperCase()+cf.slice(1);ra(Uj,"on"+Fj)}ra(RE,"onAnimationEnd"),ra(NE,"onAnimationIteration"),ra(ME,"onAnimationStart"),ra("dblclick","onDoubleClick"),ra("focusin","onFocus"),ra("focusout","onBlur"),ra(CE,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xs="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(" "),Vj=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xs));function DE(r,a,u){var d=r.type||"unknown-event";r.currentTarget=u,yr(d,a,void 0,r),r.currentTarget=null}function kE(r,a){a=(a&4)!==0;for(var u=0;u<r.length;u++){var d=r[u],m=d.event;d=d.listeners;e:{var w=void 0;if(a)for(var D=d.length-1;0<=D;D--){var Q=d[D],se=Q.instance,be=Q.currentTarget;if(Q=Q.listener,se!==w&&m.isPropagationStopped())break e;DE(m,Q,be),w=se}else for(D=0;D<d.length;D++){if(Q=d[D],se=Q.instance,be=Q.currentTarget,Q=Q.listener,se!==w&&m.isPropagationStopped())break e;DE(m,Q,be),w=se}}}if(wt)throw r=Ot,wt=!1,Ot=null,r}function Zt(r,a){var u=a[vf];u===void 0&&(u=a[vf]=new Set);var d=r+"__bubble";u.has(d)||(qE(a,r,2,!1),u.add(d))}function df(r,a,u){var d=0;a&&(d|=4),qE(u,r,d,a)}var Sl="_reactListening"+Math.random().toString(36).slice(2);function Qs(r){if(!r[Sl]){r[Sl]=!0,n.forEach(function(u){u!=="selectionchange"&&(Vj.has(u)||df(u,!1,r),df(u,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[Sl]||(a[Sl]=!0,df("selectionchange",!1,a))}}function qE(r,a,u,d){switch(Nt(a)){case 1:var m=An;break;case 4:m=Ue;break;default:m=fn}u=m.bind(null,a,u,r),m=void 0,!We||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(m=!0),d?m!==void 0?r.addEventListener(a,u,{capture:!0,passive:m}):r.addEventListener(a,u,!0):m!==void 0?r.addEventListener(a,u,{passive:m}):r.addEventListener(a,u,!1)}function ff(r,a,u,d,m){var w=d;if((a&1)===0&&(a&2)===0&&d!==null)e:for(;;){if(d===null)return;var D=d.tag;if(D===3||D===4){var Q=d.stateNode.containerInfo;if(Q===m||Q.nodeType===8&&Q.parentNode===m)break;if(D===4)for(D=d.return;D!==null;){var se=D.tag;if((se===3||se===4)&&(se=D.stateNode.containerInfo,se===m||se.nodeType===8&&se.parentNode===m))return;D=D.return}for(;Q!==null;){if(D=Da(Q),D===null)return;if(se=D.tag,se===5||se===6){d=w=D;continue e}Q=Q.parentNode}}d=d.return}we(function(){var be=w,qe=fi(u),Be=[];e:{var De=jE.get(r);if(De!==void 0){var Je=he,ot=r;switch(r){case"keypress":if(J(u)===0)break e;case"keydown":case"keyup":Je=Zo;break;case"focusin":ot="focus",Je=Jt;break;case"focusout":ot="blur",Je=Jt;break;case"beforeblur":case"afterblur":Je=Jt;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Je=Gt;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Je=Pt;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Je=es;break;case RE:case NE:case ME:Je=mi;break;case CE:Je=rs;break;case"scroll":Je=ye;break;case"wheel":Je=is;break;case"copy":case"cut":case"paste":Je=Nr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Je=Aa}var lt=(a&4)!==0,pr=!lt&&r==="scroll",me=lt?De!==null?De+"Capture":null:De;lt=[];for(var ce=be,_e;ce!==null;){_e=ce;var Fe=_e.stateNode;if(_e.tag===5&&Fe!==null&&(_e=Fe,me!==null&&(Fe=Ne(ce,me),Fe!=null&&lt.push(Js(ce,Fe,_e)))),pr)break;ce=ce.return}0<lt.length&&(De=new Je(De,ot,null,u,qe),Be.push({event:De,listeners:lt}))}}if((a&7)===0){e:{if(De=r==="mouseover"||r==="pointerover",Je=r==="mouseout"||r==="pointerout",De&&u!==Pi&&(ot=u.relatedTarget||u.fromElement)&&(Da(ot)||ot[Mi]))break e;if((Je||De)&&(De=qe.window===qe?qe:(De=qe.ownerDocument)?De.defaultView||De.parentWindow:window,Je?(ot=u.relatedTarget||u.toElement,Je=be,ot=ot?Da(ot):null,ot!==null&&(pr=Dr(ot),ot!==pr||ot.tag!==5&&ot.tag!==6)&&(ot=null)):(Je=null,ot=be),Je!==ot)){if(lt=Gt,Fe="onMouseLeave",me="onMouseEnter",ce="mouse",(r==="pointerout"||r==="pointerover")&&(lt=Aa,Fe="onPointerLeave",me="onPointerEnter",ce="pointer"),pr=Je==null?De:ys(Je),_e=ot==null?De:ys(ot),De=new lt(Fe,ce+"leave",Je,u,qe),De.target=pr,De.relatedTarget=_e,Fe=null,Da(qe)===be&&(lt=new lt(me,ce+"enter",ot,u,qe),lt.target=_e,lt.relatedTarget=pr,Fe=lt),pr=Fe,Je&&ot)t:{for(lt=Je,me=ot,ce=0,_e=lt;_e;_e=hs(_e))ce++;for(_e=0,Fe=me;Fe;Fe=hs(Fe))_e++;for(;0<ce-_e;)lt=hs(lt),ce--;for(;0<_e-ce;)me=hs(me),_e--;for(;ce--;){if(lt===me||me!==null&&lt===me.alternate)break t;lt=hs(lt),me=hs(me)}lt=null}else lt=null;Je!==null&&BE(Be,De,Je,lt,!1),ot!==null&&pr!==null&&BE(Be,pr,ot,lt,!0)}}e:{if(De=be?ys(be):window,Je=De.nodeName&&De.nodeName.toLowerCase(),Je==="select"||Je==="input"&&De.type==="file")var ct=ds;else if(Ma(De))if(ja)ct=Dj;else{ct=jj;var mt=Cj}else(Je=De.nodeName)&&Je.toLowerCase()==="input"&&(De.type==="checkbox"||De.type==="radio")&&(ct=Lj);if(ct&&(ct=ct(r,be))){Ca(Be,ct,u,qe);break e}mt&&mt(r,De,be),r==="focusout"&&(mt=De._wrapperState)&&mt.controlled&&De.type==="number"&&rr(De,"number",De.value)}switch(mt=be?ys(be):window,r){case"focusin":(Ma(mt)||mt.contentEditable==="true")&&(fs=mt,of=be,Ys=null);break;case"focusout":Ys=of=fs=null;break;case"mousedown":sf=!0;break;case"contextmenu":case"mouseup":case"dragend":sf=!1,PE(Be,u,qe);break;case"selectionchange":if(Bj)break;case"keydown":case"keyup":PE(Be,u,qe)}var yt;if($i)e:{switch(r){case"compositionstart":var _t="onCompositionStart";break e;case"compositionend":_t="onCompositionEnd";break e;case"compositionupdate":_t="onCompositionUpdate";break e}_t=void 0}else Fn?Ra(r,u)&&(_t="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(_t="onCompositionStart");_t&&(Oa&&u.locale!=="ko"&&(Fn||_t!=="onCompositionStart"?_t==="onCompositionEnd"&&Fn&&(yt=H()):(ur=qe,z="value"in ur?ur.value:ur.textContent,Fn=!0)),mt=Tl(be,_t),0<mt.length&&(_t=new hr(_t,r,null,u,qe),Be.push({event:_t,listeners:mt}),yt?_t.data=yt:(yt=Na(u),yt!==null&&(_t.data=yt)))),(yt=os?ss(r,u):us(r,u))&&(be=Tl(be,"onBeforeInput"),0<be.length&&(qe=new hr("onBeforeInput","beforeinput",null,u,qe),Be.push({event:qe,listeners:be}),qe.data=yt))}kE(Be,a)})}function Js(r,a,u){return{instance:r,listener:a,currentTarget:u}}function Tl(r,a){for(var u=a+"Capture",d=[];r!==null;){var m=r,w=m.stateNode;m.tag===5&&w!==null&&(m=w,w=Ne(r,u),w!=null&&d.unshift(Js(r,w,m)),w=Ne(r,a),w!=null&&d.push(Js(r,w,m))),r=r.return}return d}function hs(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function BE(r,a,u,d,m){for(var w=a._reactName,D=[];u!==null&&u!==d;){var Q=u,se=Q.alternate,be=Q.stateNode;if(se!==null&&se===d)break;Q.tag===5&&be!==null&&(Q=be,m?(se=Ne(u,w),se!=null&&D.unshift(Js(u,se,Q))):m||(se=Ne(u,w),se!=null&&D.push(Js(u,se,Q)))),u=u.return}D.length!==0&&r.push({event:a,listeners:D})}var Hj=/\r\n?/g,zj=/\u0000|\uFFFD/g;function UE(r){return(typeof r=="string"?r:""+r).replace(Hj,`
7
- `).replace(zj,"")}function Al(r,a,u){if(a=UE(a),UE(r)!==a&&u)throw Error(t(425))}function Ol(){}var pf=null,hf=null;function mf(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var yf=typeof setTimeout=="function"?setTimeout:void 0,Gj=typeof clearTimeout=="function"?clearTimeout:void 0,FE=typeof Promise=="function"?Promise:void 0,Wj=typeof queueMicrotask=="function"?queueMicrotask:typeof FE<"u"?function(r){return FE.resolve(null).then(r).catch(Kj)}:yf;function Kj(r){setTimeout(function(){throw r})}function gf(r,a){var u=a,d=0;do{var m=u.nextSibling;if(r.removeChild(u),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(d===0){r.removeChild(m),nr(a);return}d--}else u!=="$"&&u!=="$?"&&u!=="$!"||d++;u=m}while(u);nr(a)}function na(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?")break;if(a==="/$")return null}}return r}function VE(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(a===0)return r;a--}else u==="/$"&&a++}r=r.previousSibling}return null}var ms=Math.random().toString(36).slice(2),Ei="__reactFiber$"+ms,Zs="__reactProps$"+ms,Mi="__reactContainer$"+ms,vf="__reactEvents$"+ms,Yj="__reactListeners$"+ms,Xj="__reactHandles$"+ms;function Da(r){var a=r[Ei];if(a)return a;for(var u=r.parentNode;u;){if(a=u[Mi]||u[Ei]){if(u=a.alternate,a.child!==null||u!==null&&u.child!==null)for(r=VE(r);r!==null;){if(u=r[Ei])return u;r=VE(r)}return a}r=u,u=r.parentNode}return null}function xs(r){return r=r[Ei]||r[Mi],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function ys(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(t(33))}function Pl(r){return r[Zs]||null}var _f=[],gs=-1;function ia(r){return{current:r}}function xt(r){0>gs||(r.current=_f[gs],_f[gs]=null,gs--)}function Xt(r,a){gs++,_f[gs]=r.current,r.current=a}var aa={},qr=ia(aa),rn=ia(!1),ka=aa;function vs(r,a){var u=r.type.contextTypes;if(!u)return aa;var d=r.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===a)return d.__reactInternalMemoizedMaskedChildContext;var m={},w;for(w in u)m[w]=a[w];return d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=a,r.__reactInternalMemoizedMaskedChildContext=m),m}function nn(r){return r=r.childContextTypes,r!=null}function Il(){xt(rn),xt(qr)}function HE(r,a,u){if(qr.current!==aa)throw Error(t(168));Xt(qr,a),Xt(rn,u)}function zE(r,a,u){var d=r.stateNode;if(a=a.childContextTypes,typeof d.getChildContext!="function")return u;d=d.getChildContext();for(var m in d)if(!(m in a))throw Error(t(108,Ie(r)||"Unknown",m));return K({},u,d)}function Rl(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||aa,ka=qr.current,Xt(qr,r),Xt(rn,rn.current),!0}function GE(r,a,u){var d=r.stateNode;if(!d)throw Error(t(169));u?(r=zE(r,a,ka),d.__reactInternalMemoizedMergedChildContext=r,xt(rn),xt(qr),Xt(qr,r)):xt(rn),Xt(rn,u)}var Ci=null,Nl=!1,Ef=!1;function WE(r){Ci===null?Ci=[r]:Ci.push(r)}function Qj(r){Nl=!0,WE(r)}function oa(){if(!Ef&&Ci!==null){Ef=!0;var r=0,a=Bt;try{var u=Ci;for(Bt=1;r<u.length;r++){var d=u[r];do d=d(!0);while(d!==null)}Ci=null,Nl=!1}catch(m){throw Ci!==null&&(Ci=Ci.slice(r+1)),zs(Wo,oa),m}finally{Bt=a,Ef=!1}}return null}var _s=[],Es=0,Ml=null,Cl=0,Pn=[],In=0,qa=null,ji=1,Li="";function Ba(r,a){_s[Es++]=Cl,_s[Es++]=Ml,Ml=r,Cl=a}function KE(r,a,u){Pn[In++]=ji,Pn[In++]=Li,Pn[In++]=qa,qa=r;var d=ji;r=Li;var m=32-Wr(d)-1;d&=~(1<<m),u+=1;var w=32-Wr(a)+m;if(30<w){var D=m-m%5;w=(d&(1<<D)-1).toString(32),d>>=D,m-=D,ji=1<<32-Wr(a)+m|u<<m|d,Li=w+r}else ji=1<<w|u<<m|d,Li=r}function bf(r){r.return!==null&&(Ba(r,1),KE(r,1,0))}function wf(r){for(;r===Ml;)Ml=_s[--Es],_s[Es]=null,Cl=_s[--Es],_s[Es]=null;for(;r===qa;)qa=Pn[--In],Pn[In]=null,Li=Pn[--In],Pn[In]=null,ji=Pn[--In],Pn[In]=null}var pn=null,hn=null,tr=!1,Hn=null;function YE(r,a){var u=Cn(5,null,null,0);u.elementType="DELETED",u.stateNode=a,u.return=r,a=r.deletions,a===null?(r.deletions=[u],r.flags|=16):a.push(u)}function XE(r,a){switch(r.tag){case 5:var u=r.type;return a=a.nodeType!==1||u.toLowerCase()!==a.nodeName.toLowerCase()?null:a,a!==null?(r.stateNode=a,pn=r,hn=na(a.firstChild),!0):!1;case 6:return a=r.pendingProps===""||a.nodeType!==3?null:a,a!==null?(r.stateNode=a,pn=r,hn=null,!0):!1;case 13:return a=a.nodeType!==8?null:a,a!==null?(u=qa!==null?{id:ji,overflow:Li}:null,r.memoizedState={dehydrated:a,treeContext:u,retryLane:1073741824},u=Cn(18,null,null,0),u.stateNode=a,u.return=r,r.child=u,pn=r,hn=null,!0):!1;default:return!1}}function Sf(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Tf(r){if(tr){var a=hn;if(a){var u=a;if(!XE(r,a)){if(Sf(r))throw Error(t(418));a=na(u.nextSibling);var d=pn;a&&XE(r,a)?YE(d,u):(r.flags=r.flags&-4097|2,tr=!1,pn=r)}}else{if(Sf(r))throw Error(t(418));r.flags=r.flags&-4097|2,tr=!1,pn=r}}}function QE(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;pn=r}function jl(r){if(r!==pn)return!1;if(!tr)return QE(r),tr=!0,!1;var a;if((a=r.tag!==3)&&!(a=r.tag!==5)&&(a=r.type,a=a!=="head"&&a!=="body"&&!mf(r.type,r.memoizedProps)),a&&(a=hn)){if(Sf(r))throw JE(),Error(t(418));for(;a;)YE(r,a),a=na(a.nextSibling)}if(QE(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(t(317));e:{for(r=r.nextSibling,a=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"){if(a===0){hn=na(r.nextSibling);break e}a--}else u!=="$"&&u!=="$!"&&u!=="$?"||a++}r=r.nextSibling}hn=null}}else hn=pn?na(r.stateNode.nextSibling):null;return!0}function JE(){for(var r=hn;r;)r=na(r.nextSibling)}function bs(){hn=pn=null,tr=!1}function Af(r){Hn===null?Hn=[r]:Hn.push(r)}var Jj=S.ReactCurrentBatchConfig;function $s(r,a,u){if(r=u.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(t(309));var d=u.stateNode}if(!d)throw Error(t(147,r));var m=d,w=""+r;return a!==null&&a.ref!==null&&typeof a.ref=="function"&&a.ref._stringRef===w?a.ref:(a=function(D){var Q=m.refs;D===null?delete Q[w]:Q[w]=D},a._stringRef=w,a)}if(typeof r!="string")throw Error(t(284));if(!u._owner)throw Error(t(290,r))}return r}function Ll(r,a){throw r=Object.prototype.toString.call(a),Error(t(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r))}function ZE(r){var a=r._init;return a(r._payload)}function xE(r){function a(me,ce){if(r){var _e=me.deletions;_e===null?(me.deletions=[ce],me.flags|=16):_e.push(ce)}}function u(me,ce){if(!r)return null;for(;ce!==null;)a(me,ce),ce=ce.sibling;return null}function d(me,ce){for(me=new Map;ce!==null;)ce.key!==null?me.set(ce.key,ce):me.set(ce.index,ce),ce=ce.sibling;return me}function m(me,ce){return me=ha(me,ce),me.index=0,me.sibling=null,me}function w(me,ce,_e){return me.index=_e,r?(_e=me.alternate,_e!==null?(_e=_e.index,_e<ce?(me.flags|=2,ce):_e):(me.flags|=2,ce)):(me.flags|=1048576,ce)}function D(me){return r&&me.alternate===null&&(me.flags|=2),me}function Q(me,ce,_e,Fe){return ce===null||ce.tag!==6?(ce=yp(_e,me.mode,Fe),ce.return=me,ce):(ce=m(ce,_e),ce.return=me,ce)}function se(me,ce,_e,Fe){var ct=_e.type;return ct===j?qe(me,ce,_e.props.children,Fe,_e.key):ce!==null&&(ce.elementType===ct||typeof ct=="object"&&ct!==null&&ct.$$typeof===Ce&&ZE(ct)===ce.type)?(Fe=m(ce,_e.props),Fe.ref=$s(me,ce,_e),Fe.return=me,Fe):(Fe=ic(_e.type,_e.key,_e.props,null,me.mode,Fe),Fe.ref=$s(me,ce,_e),Fe.return=me,Fe)}function be(me,ce,_e,Fe){return ce===null||ce.tag!==4||ce.stateNode.containerInfo!==_e.containerInfo||ce.stateNode.implementation!==_e.implementation?(ce=gp(_e,me.mode,Fe),ce.return=me,ce):(ce=m(ce,_e.children||[]),ce.return=me,ce)}function qe(me,ce,_e,Fe,ct){return ce===null||ce.tag!==7?(ce=Ka(_e,me.mode,Fe,ct),ce.return=me,ce):(ce=m(ce,_e),ce.return=me,ce)}function Be(me,ce,_e){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return ce=yp(""+ce,me.mode,_e),ce.return=me,ce;if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case v:return _e=ic(ce.type,ce.key,ce.props,null,me.mode,_e),_e.ref=$s(me,null,ce),_e.return=me,_e;case T:return ce=gp(ce,me.mode,_e),ce.return=me,ce;case Ce:var Fe=ce._init;return Be(me,Fe(ce._payload),_e)}if(Ut(ce)||ie(ce))return ce=Ka(ce,me.mode,_e,null),ce.return=me,ce;Ll(me,ce)}return null}function De(me,ce,_e,Fe){var ct=ce!==null?ce.key:null;if(typeof _e=="string"&&_e!==""||typeof _e=="number")return ct!==null?null:Q(me,ce,""+_e,Fe);if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case v:return _e.key===ct?se(me,ce,_e,Fe):null;case T:return _e.key===ct?be(me,ce,_e,Fe):null;case Ce:return ct=_e._init,De(me,ce,ct(_e._payload),Fe)}if(Ut(_e)||ie(_e))return ct!==null?null:qe(me,ce,_e,Fe,null);Ll(me,_e)}return null}function Je(me,ce,_e,Fe,ct){if(typeof Fe=="string"&&Fe!==""||typeof Fe=="number")return me=me.get(_e)||null,Q(ce,me,""+Fe,ct);if(typeof Fe=="object"&&Fe!==null){switch(Fe.$$typeof){case v:return me=me.get(Fe.key===null?_e:Fe.key)||null,se(ce,me,Fe,ct);case T:return me=me.get(Fe.key===null?_e:Fe.key)||null,be(ce,me,Fe,ct);case Ce:var mt=Fe._init;return Je(me,ce,_e,mt(Fe._payload),ct)}if(Ut(Fe)||ie(Fe))return me=me.get(_e)||null,qe(ce,me,Fe,ct,null);Ll(ce,Fe)}return null}function ot(me,ce,_e,Fe){for(var ct=null,mt=null,yt=ce,_t=ce=0,Or=null;yt!==null&&_t<_e.length;_t++){yt.index>_t?(Or=yt,yt=null):Or=yt.sibling;var kt=De(me,yt,_e[_t],Fe);if(kt===null){yt===null&&(yt=Or);break}r&&yt&&kt.alternate===null&&a(me,yt),ce=w(kt,ce,_t),mt===null?ct=kt:mt.sibling=kt,mt=kt,yt=Or}if(_t===_e.length)return u(me,yt),tr&&Ba(me,_t),ct;if(yt===null){for(;_t<_e.length;_t++)yt=Be(me,_e[_t],Fe),yt!==null&&(ce=w(yt,ce,_t),mt===null?ct=yt:mt.sibling=yt,mt=yt);return tr&&Ba(me,_t),ct}for(yt=d(me,yt);_t<_e.length;_t++)Or=Je(yt,me,_t,_e[_t],Fe),Or!==null&&(r&&Or.alternate!==null&&yt.delete(Or.key===null?_t:Or.key),ce=w(Or,ce,_t),mt===null?ct=Or:mt.sibling=Or,mt=Or);return r&&yt.forEach(function(ma){return a(me,ma)}),tr&&Ba(me,_t),ct}function lt(me,ce,_e,Fe){var ct=ie(_e);if(typeof ct!="function")throw Error(t(150));if(_e=ct.call(_e),_e==null)throw Error(t(151));for(var mt=ct=null,yt=ce,_t=ce=0,Or=null,kt=_e.next();yt!==null&&!kt.done;_t++,kt=_e.next()){yt.index>_t?(Or=yt,yt=null):Or=yt.sibling;var ma=De(me,yt,kt.value,Fe);if(ma===null){yt===null&&(yt=Or);break}r&&yt&&ma.alternate===null&&a(me,yt),ce=w(ma,ce,_t),mt===null?ct=ma:mt.sibling=ma,mt=ma,yt=Or}if(kt.done)return u(me,yt),tr&&Ba(me,_t),ct;if(yt===null){for(;!kt.done;_t++,kt=_e.next())kt=Be(me,kt.value,Fe),kt!==null&&(ce=w(kt,ce,_t),mt===null?ct=kt:mt.sibling=kt,mt=kt);return tr&&Ba(me,_t),ct}for(yt=d(me,yt);!kt.done;_t++,kt=_e.next())kt=Je(yt,me,_t,kt.value,Fe),kt!==null&&(r&&kt.alternate!==null&&yt.delete(kt.key===null?_t:kt.key),ce=w(kt,ce,_t),mt===null?ct=kt:mt.sibling=kt,mt=kt);return r&&yt.forEach(function(RL){return a(me,RL)}),tr&&Ba(me,_t),ct}function pr(me,ce,_e,Fe){if(typeof _e=="object"&&_e!==null&&_e.type===j&&_e.key===null&&(_e=_e.props.children),typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case v:e:{for(var ct=_e.key,mt=ce;mt!==null;){if(mt.key===ct){if(ct=_e.type,ct===j){if(mt.tag===7){u(me,mt.sibling),ce=m(mt,_e.props.children),ce.return=me,me=ce;break e}}else if(mt.elementType===ct||typeof ct=="object"&&ct!==null&&ct.$$typeof===Ce&&ZE(ct)===mt.type){u(me,mt.sibling),ce=m(mt,_e.props),ce.ref=$s(me,mt,_e),ce.return=me,me=ce;break e}u(me,mt);break}else a(me,mt);mt=mt.sibling}_e.type===j?(ce=Ka(_e.props.children,me.mode,Fe,_e.key),ce.return=me,me=ce):(Fe=ic(_e.type,_e.key,_e.props,null,me.mode,Fe),Fe.ref=$s(me,ce,_e),Fe.return=me,me=Fe)}return D(me);case T:e:{for(mt=_e.key;ce!==null;){if(ce.key===mt)if(ce.tag===4&&ce.stateNode.containerInfo===_e.containerInfo&&ce.stateNode.implementation===_e.implementation){u(me,ce.sibling),ce=m(ce,_e.children||[]),ce.return=me,me=ce;break e}else{u(me,ce);break}else a(me,ce);ce=ce.sibling}ce=gp(_e,me.mode,Fe),ce.return=me,me=ce}return D(me);case Ce:return mt=_e._init,pr(me,ce,mt(_e._payload),Fe)}if(Ut(_e))return ot(me,ce,_e,Fe);if(ie(_e))return lt(me,ce,_e,Fe);Ll(me,_e)}return typeof _e=="string"&&_e!==""||typeof _e=="number"?(_e=""+_e,ce!==null&&ce.tag===6?(u(me,ce.sibling),ce=m(ce,_e),ce.return=me,me=ce):(u(me,ce),ce=yp(_e,me.mode,Fe),ce.return=me,me=ce),D(me)):u(me,ce)}return pr}var ws=xE(!0),$E=xE(!1),Dl=ia(null),kl=null,Ss=null,Of=null;function Pf(){Of=Ss=kl=null}function If(r){var a=Dl.current;xt(Dl),r._currentValue=a}function Rf(r,a,u){for(;r!==null;){var d=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,d!==null&&(d.childLanes|=a)):d!==null&&(d.childLanes&a)!==a&&(d.childLanes|=a),r===u)break;r=r.return}}function Ts(r,a){kl=r,Of=Ss=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&a)!==0&&(an=!0),r.firstContext=null)}function Rn(r){var a=r._currentValue;if(Of!==r)if(r={context:r,memoizedValue:a,next:null},Ss===null){if(kl===null)throw Error(t(308));Ss=r,kl.dependencies={lanes:0,firstContext:r}}else Ss=Ss.next=r;return a}var Ua=null;function Nf(r){Ua===null?Ua=[r]:Ua.push(r)}function eb(r,a,u,d){var m=a.interleaved;return m===null?(u.next=u,Nf(a)):(u.next=m.next,m.next=u),a.interleaved=u,Di(r,d)}function Di(r,a){r.lanes|=a;var u=r.alternate;for(u!==null&&(u.lanes|=a),u=r,r=r.return;r!==null;)r.childLanes|=a,u=r.alternate,u!==null&&(u.childLanes|=a),u=r,r=r.return;return u.tag===3?u.stateNode:null}var sa=!1;function Mf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function tb(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function ki(r,a){return{eventTime:r,lane:a,tag:0,payload:null,callback:null,next:null}}function ua(r,a,u){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(jt&2)!==0){var m=d.pending;return m===null?a.next=a:(a.next=m.next,m.next=a),d.pending=a,Di(r,u)}return m=d.interleaved,m===null?(a.next=a,Nf(d)):(a.next=m.next,m.next=a),d.interleaved=a,Di(r,u)}function ql(r,a,u){if(a=a.updateQueue,a!==null&&(a=a.shared,(u&4194240)!==0)){var d=a.lanes;d&=r.pendingLanes,u|=d,a.lanes=u,Ta(r,u)}}function rb(r,a){var u=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,u===d)){var m=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var D={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};w===null?m=w=D:w=w.next=D,u=u.next}while(u!==null);w===null?m=w=a:w=w.next=a}else m=w=a;u={baseState:d.baseState,firstBaseUpdate:m,lastBaseUpdate:w,shared:d.shared,effects:d.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=a:r.next=a,u.lastBaseUpdate=a}function Bl(r,a,u,d){var m=r.updateQueue;sa=!1;var w=m.firstBaseUpdate,D=m.lastBaseUpdate,Q=m.shared.pending;if(Q!==null){m.shared.pending=null;var se=Q,be=se.next;se.next=null,D===null?w=be:D.next=be,D=se;var qe=r.alternate;qe!==null&&(qe=qe.updateQueue,Q=qe.lastBaseUpdate,Q!==D&&(Q===null?qe.firstBaseUpdate=be:Q.next=be,qe.lastBaseUpdate=se))}if(w!==null){var Be=m.baseState;D=0,qe=be=se=null,Q=w;do{var De=Q.lane,Je=Q.eventTime;if((d&De)===De){qe!==null&&(qe=qe.next={eventTime:Je,lane:0,tag:Q.tag,payload:Q.payload,callback:Q.callback,next:null});e:{var ot=r,lt=Q;switch(De=a,Je=u,lt.tag){case 1:if(ot=lt.payload,typeof ot=="function"){Be=ot.call(Je,Be,De);break e}Be=ot;break e;case 3:ot.flags=ot.flags&-65537|128;case 0:if(ot=lt.payload,De=typeof ot=="function"?ot.call(Je,Be,De):ot,De==null)break e;Be=K({},Be,De);break e;case 2:sa=!0}}Q.callback!==null&&Q.lane!==0&&(r.flags|=64,De=m.effects,De===null?m.effects=[Q]:De.push(Q))}else Je={eventTime:Je,lane:De,tag:Q.tag,payload:Q.payload,callback:Q.callback,next:null},qe===null?(be=qe=Je,se=Be):qe=qe.next=Je,D|=De;if(Q=Q.next,Q===null){if(Q=m.shared.pending,Q===null)break;De=Q,Q=De.next,De.next=null,m.lastBaseUpdate=De,m.shared.pending=null}}while(!0);if(qe===null&&(se=Be),m.baseState=se,m.firstBaseUpdate=be,m.lastBaseUpdate=qe,a=m.shared.interleaved,a!==null){m=a;do D|=m.lane,m=m.next;while(m!==a)}else w===null&&(m.shared.lanes=0);Ha|=D,r.lanes=D,r.memoizedState=Be}}function nb(r,a,u){if(r=a.effects,a.effects=null,r!==null)for(a=0;a<r.length;a++){var d=r[a],m=d.callback;if(m!==null){if(d.callback=null,d=u,typeof m!="function")throw Error(t(191,m));m.call(d)}}}var eu={},bi=ia(eu),tu=ia(eu),ru=ia(eu);function Fa(r){if(r===eu)throw Error(t(174));return r}function Cf(r,a){switch(Xt(ru,a),Xt(tu,r),Xt(bi,eu),r=a.nodeType,r){case 9:case 11:a=(a=a.documentElement)?a.namespaceURI:cn(null,"");break;default:r=r===8?a.parentNode:a,a=r.namespaceURI||null,r=r.tagName,a=cn(a,r)}xt(bi),Xt(bi,a)}function As(){xt(bi),xt(tu),xt(ru)}function ib(r){Fa(ru.current);var a=Fa(bi.current),u=cn(a,r.type);a!==u&&(Xt(tu,r),Xt(bi,u))}function jf(r){tu.current===r&&(xt(bi),xt(tu))}var ir=ia(0);function Ul(r){for(var a=r;a!==null;){if(a.tag===13){var u=a.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Lf=[];function Df(){for(var r=0;r<Lf.length;r++)Lf[r]._workInProgressVersionPrimary=null;Lf.length=0}var Fl=S.ReactCurrentDispatcher,kf=S.ReactCurrentBatchConfig,Va=0,ar=null,Er=null,Tr=null,Vl=!1,nu=!1,iu=0,Zj=0;function Br(){throw Error(t(321))}function qf(r,a){if(a===null)return!1;for(var u=0;u<a.length&&u<r.length;u++)if(!Vn(r[u],a[u]))return!1;return!0}function Bf(r,a,u,d,m,w){if(Va=w,ar=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,Fl.current=r===null||r.memoizedState===null?tL:rL,r=u(d,m),nu){w=0;do{if(nu=!1,iu=0,25<=w)throw Error(t(301));w+=1,Tr=Er=null,a.updateQueue=null,Fl.current=nL,r=u(d,m)}while(nu)}if(Fl.current=Gl,a=Er!==null&&Er.next!==null,Va=0,Tr=Er=ar=null,Vl=!1,a)throw Error(t(300));return r}function Uf(){var r=iu!==0;return iu=0,r}function wi(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tr===null?ar.memoizedState=Tr=r:Tr=Tr.next=r,Tr}function Nn(){if(Er===null){var r=ar.alternate;r=r!==null?r.memoizedState:null}else r=Er.next;var a=Tr===null?ar.memoizedState:Tr.next;if(a!==null)Tr=a,Er=r;else{if(r===null)throw Error(t(310));Er=r,r={memoizedState:Er.memoizedState,baseState:Er.baseState,baseQueue:Er.baseQueue,queue:Er.queue,next:null},Tr===null?ar.memoizedState=Tr=r:Tr=Tr.next=r}return Tr}function au(r,a){return typeof a=="function"?a(r):a}function Ff(r){var a=Nn(),u=a.queue;if(u===null)throw Error(t(311));u.lastRenderedReducer=r;var d=Er,m=d.baseQueue,w=u.pending;if(w!==null){if(m!==null){var D=m.next;m.next=w.next,w.next=D}d.baseQueue=m=w,u.pending=null}if(m!==null){w=m.next,d=d.baseState;var Q=D=null,se=null,be=w;do{var qe=be.lane;if((Va&qe)===qe)se!==null&&(se=se.next={lane:0,action:be.action,hasEagerState:be.hasEagerState,eagerState:be.eagerState,next:null}),d=be.hasEagerState?be.eagerState:r(d,be.action);else{var Be={lane:qe,action:be.action,hasEagerState:be.hasEagerState,eagerState:be.eagerState,next:null};se===null?(Q=se=Be,D=d):se=se.next=Be,ar.lanes|=qe,Ha|=qe}be=be.next}while(be!==null&&be!==w);se===null?D=d:se.next=Q,Vn(d,a.memoizedState)||(an=!0),a.memoizedState=d,a.baseState=D,a.baseQueue=se,u.lastRenderedState=d}if(r=u.interleaved,r!==null){m=r;do w=m.lane,ar.lanes|=w,Ha|=w,m=m.next;while(m!==r)}else m===null&&(u.lanes=0);return[a.memoizedState,u.dispatch]}function Vf(r){var a=Nn(),u=a.queue;if(u===null)throw Error(t(311));u.lastRenderedReducer=r;var d=u.dispatch,m=u.pending,w=a.memoizedState;if(m!==null){u.pending=null;var D=m=m.next;do w=r(w,D.action),D=D.next;while(D!==m);Vn(w,a.memoizedState)||(an=!0),a.memoizedState=w,a.baseQueue===null&&(a.baseState=w),u.lastRenderedState=w}return[w,d]}function ab(){}function ob(r,a){var u=ar,d=Nn(),m=a(),w=!Vn(d.memoizedState,m);if(w&&(d.memoizedState=m,an=!0),d=d.queue,Hf(lb.bind(null,u,d,r),[r]),d.getSnapshot!==a||w||Tr!==null&&Tr.memoizedState.tag&1){if(u.flags|=2048,ou(9,ub.bind(null,u,d,m,a),void 0,null),Ar===null)throw Error(t(349));(Va&30)!==0||sb(u,a,m)}return m}function sb(r,a,u){r.flags|=16384,r={getSnapshot:a,value:u},a=ar.updateQueue,a===null?(a={lastEffect:null,stores:null},ar.updateQueue=a,a.stores=[r]):(u=a.stores,u===null?a.stores=[r]:u.push(r))}function ub(r,a,u,d){a.value=u,a.getSnapshot=d,cb(a)&&db(r)}function lb(r,a,u){return u(function(){cb(a)&&db(r)})}function cb(r){var a=r.getSnapshot;r=r.value;try{var u=a();return!Vn(r,u)}catch{return!0}}function db(r){var a=Di(r,1);a!==null&&Kn(a,r,1,-1)}function fb(r){var a=wi();return typeof r=="function"&&(r=r()),a.memoizedState=a.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:au,lastRenderedState:r},a.queue=r,r=r.dispatch=eL.bind(null,ar,r),[a.memoizedState,r]}function ou(r,a,u,d){return r={tag:r,create:a,destroy:u,deps:d,next:null},a=ar.updateQueue,a===null?(a={lastEffect:null,stores:null},ar.updateQueue=a,a.lastEffect=r.next=r):(u=a.lastEffect,u===null?a.lastEffect=r.next=r:(d=u.next,u.next=r,r.next=d,a.lastEffect=r)),r}function pb(){return Nn().memoizedState}function Hl(r,a,u,d){var m=wi();ar.flags|=r,m.memoizedState=ou(1|a,u,void 0,d===void 0?null:d)}function zl(r,a,u,d){var m=Nn();d=d===void 0?null:d;var w=void 0;if(Er!==null){var D=Er.memoizedState;if(w=D.destroy,d!==null&&qf(d,D.deps)){m.memoizedState=ou(a,u,w,d);return}}ar.flags|=r,m.memoizedState=ou(1|a,u,w,d)}function hb(r,a){return Hl(8390656,8,r,a)}function Hf(r,a){return zl(2048,8,r,a)}function mb(r,a){return zl(4,2,r,a)}function yb(r,a){return zl(4,4,r,a)}function gb(r,a){if(typeof a=="function")return r=r(),a(r),function(){a(null)};if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function vb(r,a,u){return u=u!=null?u.concat([r]):null,zl(4,4,gb.bind(null,a,r),u)}function zf(){}function _b(r,a){var u=Nn();a=a===void 0?null:a;var d=u.memoizedState;return d!==null&&a!==null&&qf(a,d[1])?d[0]:(u.memoizedState=[r,a],r)}function Eb(r,a){var u=Nn();a=a===void 0?null:a;var d=u.memoizedState;return d!==null&&a!==null&&qf(a,d[1])?d[0]:(r=r(),u.memoizedState=[r,a],r)}function bb(r,a,u){return(Va&21)===0?(r.baseState&&(r.baseState=!1,an=!0),r.memoizedState=u):(Vn(u,a)||(u=Gs(),ar.lanes|=u,Ha|=u,r.baseState=!0),a)}function xj(r,a){var u=Bt;Bt=u!==0&&4>u?u:4,r(!0);var d=kf.transition;kf.transition={};try{r(!1),a()}finally{Bt=u,kf.transition=d}}function wb(){return Nn().memoizedState}function $j(r,a,u){var d=fa(r);if(u={lane:d,action:u,hasEagerState:!1,eagerState:null,next:null},Sb(r))Tb(a,u);else if(u=eb(r,a,u,d),u!==null){var m=Xr();Kn(u,r,d,m),Ab(u,a,d)}}function eL(r,a,u){var d=fa(r),m={lane:d,action:u,hasEagerState:!1,eagerState:null,next:null};if(Sb(r))Tb(a,m);else{var w=r.alternate;if(r.lanes===0&&(w===null||w.lanes===0)&&(w=a.lastRenderedReducer,w!==null))try{var D=a.lastRenderedState,Q=w(D,u);if(m.hasEagerState=!0,m.eagerState=Q,Vn(Q,D)){var se=a.interleaved;se===null?(m.next=m,Nf(a)):(m.next=se.next,se.next=m),a.interleaved=m;return}}catch{}u=eb(r,a,m,d),u!==null&&(m=Xr(),Kn(u,r,d,m),Ab(u,a,d))}}function Sb(r){var a=r.alternate;return r===ar||a!==null&&a===ar}function Tb(r,a){nu=Vl=!0;var u=r.pending;u===null?a.next=a:(a.next=u.next,u.next=a),r.pending=a}function Ab(r,a,u){if((u&4194240)!==0){var d=a.lanes;d&=r.pendingLanes,u|=d,a.lanes=u,Ta(r,u)}}var Gl={readContext:Rn,useCallback:Br,useContext:Br,useEffect:Br,useImperativeHandle:Br,useInsertionEffect:Br,useLayoutEffect:Br,useMemo:Br,useReducer:Br,useRef:Br,useState:Br,useDebugValue:Br,useDeferredValue:Br,useTransition:Br,useMutableSource:Br,useSyncExternalStore:Br,useId:Br,unstable_isNewReconciler:!1},tL={readContext:Rn,useCallback:function(r,a){return wi().memoizedState=[r,a===void 0?null:a],r},useContext:Rn,useEffect:hb,useImperativeHandle:function(r,a,u){return u=u!=null?u.concat([r]):null,Hl(4194308,4,gb.bind(null,a,r),u)},useLayoutEffect:function(r,a){return Hl(4194308,4,r,a)},useInsertionEffect:function(r,a){return Hl(4,2,r,a)},useMemo:function(r,a){var u=wi();return a=a===void 0?null:a,r=r(),u.memoizedState=[r,a],r},useReducer:function(r,a,u){var d=wi();return a=u!==void 0?u(a):a,d.memoizedState=d.baseState=a,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:a},d.queue=r,r=r.dispatch=$j.bind(null,ar,r),[d.memoizedState,r]},useRef:function(r){var a=wi();return r={current:r},a.memoizedState=r},useState:fb,useDebugValue:zf,useDeferredValue:function(r){return wi().memoizedState=r},useTransition:function(){var r=fb(!1),a=r[0];return r=xj.bind(null,r[1]),wi().memoizedState=r,[a,r]},useMutableSource:function(){},useSyncExternalStore:function(r,a,u){var d=ar,m=wi();if(tr){if(u===void 0)throw Error(t(407));u=u()}else{if(u=a(),Ar===null)throw Error(t(349));(Va&30)!==0||sb(d,a,u)}m.memoizedState=u;var w={value:u,getSnapshot:a};return m.queue=w,hb(lb.bind(null,d,w,r),[r]),d.flags|=2048,ou(9,ub.bind(null,d,w,u,a),void 0,null),u},useId:function(){var r=wi(),a=Ar.identifierPrefix;if(tr){var u=Li,d=ji;u=(d&~(1<<32-Wr(d)-1)).toString(32)+u,a=":"+a+"R"+u,u=iu++,0<u&&(a+="H"+u.toString(32)),a+=":"}else u=Zj++,a=":"+a+"r"+u.toString(32)+":";return r.memoizedState=a},unstable_isNewReconciler:!1},rL={readContext:Rn,useCallback:_b,useContext:Rn,useEffect:Hf,useImperativeHandle:vb,useInsertionEffect:mb,useLayoutEffect:yb,useMemo:Eb,useReducer:Ff,useRef:pb,useState:function(){return Ff(au)},useDebugValue:zf,useDeferredValue:function(r){var a=Nn();return bb(a,Er.memoizedState,r)},useTransition:function(){var r=Ff(au)[0],a=Nn().memoizedState;return[r,a]},useMutableSource:ab,useSyncExternalStore:ob,useId:wb,unstable_isNewReconciler:!1},nL={readContext:Rn,useCallback:_b,useContext:Rn,useEffect:Hf,useImperativeHandle:vb,useInsertionEffect:mb,useLayoutEffect:yb,useMemo:Eb,useReducer:Vf,useRef:pb,useState:function(){return Vf(au)},useDebugValue:zf,useDeferredValue:function(r){var a=Nn();return Er===null?a.memoizedState=r:bb(a,Er.memoizedState,r)},useTransition:function(){var r=Vf(au)[0],a=Nn().memoizedState;return[r,a]},useMutableSource:ab,useSyncExternalStore:ob,useId:wb,unstable_isNewReconciler:!1};function zn(r,a){if(r&&r.defaultProps){a=K({},a),r=r.defaultProps;for(var u in r)a[u]===void 0&&(a[u]=r[u]);return a}return a}function Gf(r,a,u,d){a=r.memoizedState,u=u(d,a),u=u==null?a:K({},a,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var Wl={isMounted:function(r){return(r=r._reactInternals)?Dr(r)===r:!1},enqueueSetState:function(r,a,u){r=r._reactInternals;var d=Xr(),m=fa(r),w=ki(d,m);w.payload=a,u!=null&&(w.callback=u),a=ua(r,w,m),a!==null&&(Kn(a,r,m,d),ql(a,r,m))},enqueueReplaceState:function(r,a,u){r=r._reactInternals;var d=Xr(),m=fa(r),w=ki(d,m);w.tag=1,w.payload=a,u!=null&&(w.callback=u),a=ua(r,w,m),a!==null&&(Kn(a,r,m,d),ql(a,r,m))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var u=Xr(),d=fa(r),m=ki(u,d);m.tag=2,a!=null&&(m.callback=a),a=ua(r,m,d),a!==null&&(Kn(a,r,d,u),ql(a,r,d))}};function Ob(r,a,u,d,m,w,D){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,w,D):a.prototype&&a.prototype.isPureReactComponent?!Ks(u,d)||!Ks(m,w):!0}function Pb(r,a,u){var d=!1,m=aa,w=a.contextType;return typeof w=="object"&&w!==null?w=Rn(w):(m=nn(a)?ka:qr.current,d=a.contextTypes,w=(d=d!=null)?vs(r,m):aa),a=new a(u,w),r.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Wl,r.stateNode=a,a._reactInternals=r,d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=m,r.__reactInternalMemoizedMaskedChildContext=w),a}function Ib(r,a,u,d){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(u,d),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(u,d),a.state!==r&&Wl.enqueueReplaceState(a,a.state,null)}function Wf(r,a,u,d){var m=r.stateNode;m.props=u,m.state=r.memoizedState,m.refs={},Mf(r);var w=a.contextType;typeof w=="object"&&w!==null?m.context=Rn(w):(w=nn(a)?ka:qr.current,m.context=vs(r,w)),m.state=r.memoizedState,w=a.getDerivedStateFromProps,typeof w=="function"&&(Gf(r,a,w,u),m.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(a=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),a!==m.state&&Wl.enqueueReplaceState(m,m.state,null),Bl(r,u,m,d),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308)}function Os(r,a){try{var u="",d=a;do u+=U(d),d=d.return;while(d);var m=u}catch(w){m=`
8
- Error generating stack: `+w.message+`
9
- `+w.stack}return{value:r,source:a,stack:m,digest:null}}function Kf(r,a,u){return{value:r,source:null,stack:u??null,digest:a??null}}function Yf(r,a){try{console.error(a.value)}catch(u){setTimeout(function(){throw u})}}var iL=typeof WeakMap=="function"?WeakMap:Map;function Rb(r,a,u){u=ki(-1,u),u.tag=3,u.payload={element:null};var d=a.value;return u.callback=function(){xl||(xl=!0,up=d),Yf(r,a)},u}function Nb(r,a,u){u=ki(-1,u),u.tag=3;var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var m=a.value;u.payload=function(){return d(m)},u.callback=function(){Yf(r,a)}}var w=r.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(u.callback=function(){Yf(r,a),typeof d!="function"&&(ca===null?ca=new Set([this]):ca.add(this));var D=a.stack;this.componentDidCatch(a.value,{componentStack:D!==null?D:""})}),u}function Mb(r,a,u){var d=r.pingCache;if(d===null){d=r.pingCache=new iL;var m=new Set;d.set(a,m)}else m=d.get(a),m===void 0&&(m=new Set,d.set(a,m));m.has(u)||(m.add(u),r=vL.bind(null,r,a,u),a.then(r,r))}function Cb(r){do{var a;if((a=r.tag===13)&&(a=r.memoizedState,a=a!==null?a.dehydrated!==null:!0),a)return r;r=r.return}while(r!==null);return null}function jb(r,a,u,d,m){return(r.mode&1)===0?(r===a?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(a=ki(-1,1),a.tag=2,ua(u,a,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=m,r)}var aL=S.ReactCurrentOwner,an=!1;function Yr(r,a,u,d){a.child=r===null?$E(a,null,u,d):ws(a,r.child,u,d)}function Lb(r,a,u,d,m){u=u.render;var w=a.ref;return Ts(a,m),d=Bf(r,a,u,d,w,m),u=Uf(),r!==null&&!an?(a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~m,qi(r,a,m)):(tr&&u&&bf(a),a.flags|=1,Yr(r,a,d,m),a.child)}function Db(r,a,u,d,m){if(r===null){var w=u.type;return typeof w=="function"&&!mp(w)&&w.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(a.tag=15,a.type=w,kb(r,a,w,d,m)):(r=ic(u.type,null,d,a,a.mode,m),r.ref=a.ref,r.return=a,a.child=r)}if(w=r.child,(r.lanes&m)===0){var D=w.memoizedProps;if(u=u.compare,u=u!==null?u:Ks,u(D,d)&&r.ref===a.ref)return qi(r,a,m)}return a.flags|=1,r=ha(w,d),r.ref=a.ref,r.return=a,a.child=r}function kb(r,a,u,d,m){if(r!==null){var w=r.memoizedProps;if(Ks(w,d)&&r.ref===a.ref)if(an=!1,a.pendingProps=d=w,(r.lanes&m)!==0)(r.flags&131072)!==0&&(an=!0);else return a.lanes=r.lanes,qi(r,a,m)}return Xf(r,a,u,d,m)}function qb(r,a,u){var d=a.pendingProps,m=d.children,w=r!==null?r.memoizedState:null;if(d.mode==="hidden")if((a.mode&1)===0)a.memoizedState={baseLanes:0,cachePool:null,transitions:null},Xt(Is,mn),mn|=u;else{if((u&1073741824)===0)return r=w!==null?w.baseLanes|u:u,a.lanes=a.childLanes=1073741824,a.memoizedState={baseLanes:r,cachePool:null,transitions:null},a.updateQueue=null,Xt(Is,mn),mn|=r,null;a.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=w!==null?w.baseLanes:u,Xt(Is,mn),mn|=d}else w!==null?(d=w.baseLanes|u,a.memoizedState=null):d=u,Xt(Is,mn),mn|=d;return Yr(r,a,m,u),a.child}function Bb(r,a){var u=a.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(a.flags|=512,a.flags|=2097152)}function Xf(r,a,u,d,m){var w=nn(u)?ka:qr.current;return w=vs(a,w),Ts(a,m),u=Bf(r,a,u,d,w,m),d=Uf(),r!==null&&!an?(a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~m,qi(r,a,m)):(tr&&d&&bf(a),a.flags|=1,Yr(r,a,u,m),a.child)}function Ub(r,a,u,d,m){if(nn(u)){var w=!0;Rl(a)}else w=!1;if(Ts(a,m),a.stateNode===null)Yl(r,a),Pb(a,u,d),Wf(a,u,d,m),d=!0;else if(r===null){var D=a.stateNode,Q=a.memoizedProps;D.props=Q;var se=D.context,be=u.contextType;typeof be=="object"&&be!==null?be=Rn(be):(be=nn(u)?ka:qr.current,be=vs(a,be));var qe=u.getDerivedStateFromProps,Be=typeof qe=="function"||typeof D.getSnapshotBeforeUpdate=="function";Be||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(Q!==d||se!==be)&&Ib(a,D,d,be),sa=!1;var De=a.memoizedState;D.state=De,Bl(a,d,D,m),se=a.memoizedState,Q!==d||De!==se||rn.current||sa?(typeof qe=="function"&&(Gf(a,u,qe,d),se=a.memoizedState),(Q=sa||Ob(a,u,Q,d,De,se,be))?(Be||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount()),typeof D.componentDidMount=="function"&&(a.flags|=4194308)):(typeof D.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=d,a.memoizedState=se),D.props=d,D.state=se,D.context=be,d=Q):(typeof D.componentDidMount=="function"&&(a.flags|=4194308),d=!1)}else{D=a.stateNode,tb(r,a),Q=a.memoizedProps,be=a.type===a.elementType?Q:zn(a.type,Q),D.props=be,Be=a.pendingProps,De=D.context,se=u.contextType,typeof se=="object"&&se!==null?se=Rn(se):(se=nn(u)?ka:qr.current,se=vs(a,se));var Je=u.getDerivedStateFromProps;(qe=typeof Je=="function"||typeof D.getSnapshotBeforeUpdate=="function")||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(Q!==Be||De!==se)&&Ib(a,D,d,se),sa=!1,De=a.memoizedState,D.state=De,Bl(a,d,D,m);var ot=a.memoizedState;Q!==Be||De!==ot||rn.current||sa?(typeof Je=="function"&&(Gf(a,u,Je,d),ot=a.memoizedState),(be=sa||Ob(a,u,be,d,De,ot,se)||!1)?(qe||typeof D.UNSAFE_componentWillUpdate!="function"&&typeof D.componentWillUpdate!="function"||(typeof D.componentWillUpdate=="function"&&D.componentWillUpdate(d,ot,se),typeof D.UNSAFE_componentWillUpdate=="function"&&D.UNSAFE_componentWillUpdate(d,ot,se)),typeof D.componentDidUpdate=="function"&&(a.flags|=4),typeof D.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof D.componentDidUpdate!="function"||Q===r.memoizedProps&&De===r.memoizedState||(a.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||Q===r.memoizedProps&&De===r.memoizedState||(a.flags|=1024),a.memoizedProps=d,a.memoizedState=ot),D.props=d,D.state=ot,D.context=se,d=be):(typeof D.componentDidUpdate!="function"||Q===r.memoizedProps&&De===r.memoizedState||(a.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||Q===r.memoizedProps&&De===r.memoizedState||(a.flags|=1024),d=!1)}return Qf(r,a,u,d,w,m)}function Qf(r,a,u,d,m,w){Bb(r,a);var D=(a.flags&128)!==0;if(!d&&!D)return m&&GE(a,u,!1),qi(r,a,w);d=a.stateNode,aL.current=a;var Q=D&&typeof u.getDerivedStateFromError!="function"?null:d.render();return a.flags|=1,r!==null&&D?(a.child=ws(a,r.child,null,w),a.child=ws(a,null,Q,w)):Yr(r,a,Q,w),a.memoizedState=d.state,m&&GE(a,u,!0),a.child}function Fb(r){var a=r.stateNode;a.pendingContext?HE(r,a.pendingContext,a.pendingContext!==a.context):a.context&&HE(r,a.context,!1),Cf(r,a.containerInfo)}function Vb(r,a,u,d,m){return bs(),Af(m),a.flags|=256,Yr(r,a,u,d),a.child}var Jf={dehydrated:null,treeContext:null,retryLane:0};function Zf(r){return{baseLanes:r,cachePool:null,transitions:null}}function Hb(r,a,u){var d=a.pendingProps,m=ir.current,w=!1,D=(a.flags&128)!==0,Q;if((Q=D)||(Q=r!==null&&r.memoizedState===null?!1:(m&2)!==0),Q?(w=!0,a.flags&=-129):(r===null||r.memoizedState!==null)&&(m|=1),Xt(ir,m&1),r===null)return Tf(a),r=a.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((a.mode&1)===0?a.lanes=1:r.data==="$!"?a.lanes=8:a.lanes=1073741824,null):(D=d.children,r=d.fallback,w?(d=a.mode,w=a.child,D={mode:"hidden",children:D},(d&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=D):w=ac(D,d,0,null),r=Ka(r,d,u,null),w.return=a,r.return=a,w.sibling=r,a.child=w,a.child.memoizedState=Zf(u),a.memoizedState=Jf,r):xf(a,D));if(m=r.memoizedState,m!==null&&(Q=m.dehydrated,Q!==null))return oL(r,a,D,d,Q,m,u);if(w){w=d.fallback,D=a.mode,m=r.child,Q=m.sibling;var se={mode:"hidden",children:d.children};return(D&1)===0&&a.child!==m?(d=a.child,d.childLanes=0,d.pendingProps=se,a.deletions=null):(d=ha(m,se),d.subtreeFlags=m.subtreeFlags&14680064),Q!==null?w=ha(Q,w):(w=Ka(w,D,u,null),w.flags|=2),w.return=a,d.return=a,d.sibling=w,a.child=d,d=w,w=a.child,D=r.child.memoizedState,D=D===null?Zf(u):{baseLanes:D.baseLanes|u,cachePool:null,transitions:D.transitions},w.memoizedState=D,w.childLanes=r.childLanes&~u,a.memoizedState=Jf,d}return w=r.child,r=w.sibling,d=ha(w,{mode:"visible",children:d.children}),(a.mode&1)===0&&(d.lanes=u),d.return=a,d.sibling=null,r!==null&&(u=a.deletions,u===null?(a.deletions=[r],a.flags|=16):u.push(r)),a.child=d,a.memoizedState=null,d}function xf(r,a){return a=ac({mode:"visible",children:a},r.mode,0,null),a.return=r,r.child=a}function Kl(r,a,u,d){return d!==null&&Af(d),ws(a,r.child,null,u),r=xf(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function oL(r,a,u,d,m,w,D){if(u)return a.flags&256?(a.flags&=-257,d=Kf(Error(t(422))),Kl(r,a,D,d)):a.memoizedState!==null?(a.child=r.child,a.flags|=128,null):(w=d.fallback,m=a.mode,d=ac({mode:"visible",children:d.children},m,0,null),w=Ka(w,m,D,null),w.flags|=2,d.return=a,w.return=a,d.sibling=w,a.child=d,(a.mode&1)!==0&&ws(a,r.child,null,D),a.child.memoizedState=Zf(D),a.memoizedState=Jf,w);if((a.mode&1)===0)return Kl(r,a,D,null);if(m.data==="$!"){if(d=m.nextSibling&&m.nextSibling.dataset,d)var Q=d.dgst;return d=Q,w=Error(t(419)),d=Kf(w,d,void 0),Kl(r,a,D,d)}if(Q=(D&r.childLanes)!==0,an||Q){if(d=Ar,d!==null){switch(D&-D){case 4:m=2;break;case 16:m=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:m=32;break;case 536870912:m=268435456;break;default:m=0}m=(m&(d.suspendedLanes|D))!==0?0:m,m!==0&&m!==w.retryLane&&(w.retryLane=m,Di(r,m),Kn(d,r,m,-1))}return hp(),d=Kf(Error(t(421))),Kl(r,a,D,d)}return m.data==="$?"?(a.flags|=128,a.child=r.child,a=_L.bind(null,r),m._reactRetry=a,null):(r=w.treeContext,hn=na(m.nextSibling),pn=a,tr=!0,Hn=null,r!==null&&(Pn[In++]=ji,Pn[In++]=Li,Pn[In++]=qa,ji=r.id,Li=r.overflow,qa=a),a=xf(a,d.children),a.flags|=4096,a)}function zb(r,a,u){r.lanes|=a;var d=r.alternate;d!==null&&(d.lanes|=a),Rf(r.return,a,u)}function $f(r,a,u,d,m){var w=r.memoizedState;w===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:d,tail:u,tailMode:m}:(w.isBackwards=a,w.rendering=null,w.renderingStartTime=0,w.last=d,w.tail=u,w.tailMode=m)}function Gb(r,a,u){var d=a.pendingProps,m=d.revealOrder,w=d.tail;if(Yr(r,a,d.children,u),d=ir.current,(d&2)!==0)d=d&1|2,a.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&zb(r,u,a);else if(r.tag===19)zb(r,u,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}d&=1}if(Xt(ir,d),(a.mode&1)===0)a.memoizedState=null;else switch(m){case"forwards":for(u=a.child,m=null;u!==null;)r=u.alternate,r!==null&&Ul(r)===null&&(m=u),u=u.sibling;u=m,u===null?(m=a.child,a.child=null):(m=u.sibling,u.sibling=null),$f(a,!1,m,u,w);break;case"backwards":for(u=null,m=a.child,a.child=null;m!==null;){if(r=m.alternate,r!==null&&Ul(r)===null){a.child=m;break}r=m.sibling,m.sibling=u,u=m,m=r}$f(a,!0,u,null,w);break;case"together":$f(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function Yl(r,a){(a.mode&1)===0&&r!==null&&(r.alternate=null,a.alternate=null,a.flags|=2)}function qi(r,a,u){if(r!==null&&(a.dependencies=r.dependencies),Ha|=a.lanes,(u&a.childLanes)===0)return null;if(r!==null&&a.child!==r.child)throw Error(t(153));if(a.child!==null){for(r=a.child,u=ha(r,r.pendingProps),a.child=u,u.return=a;r.sibling!==null;)r=r.sibling,u=u.sibling=ha(r,r.pendingProps),u.return=a;u.sibling=null}return a.child}function sL(r,a,u){switch(a.tag){case 3:Fb(a),bs();break;case 5:ib(a);break;case 1:nn(a.type)&&Rl(a);break;case 4:Cf(a,a.stateNode.containerInfo);break;case 10:var d=a.type._context,m=a.memoizedProps.value;Xt(Dl,d._currentValue),d._currentValue=m;break;case 13:if(d=a.memoizedState,d!==null)return d.dehydrated!==null?(Xt(ir,ir.current&1),a.flags|=128,null):(u&a.child.childLanes)!==0?Hb(r,a,u):(Xt(ir,ir.current&1),r=qi(r,a,u),r!==null?r.sibling:null);Xt(ir,ir.current&1);break;case 19:if(d=(u&a.childLanes)!==0,(r.flags&128)!==0){if(d)return Gb(r,a,u);a.flags|=128}if(m=a.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),Xt(ir,ir.current),d)break;return null;case 22:case 23:return a.lanes=0,qb(r,a,u)}return qi(r,a,u)}var Wb,ep,Kb,Yb;Wb=function(r,a){for(var u=a.child;u!==null;){if(u.tag===5||u.tag===6)r.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===a)break;for(;u.sibling===null;){if(u.return===null||u.return===a)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},ep=function(){},Kb=function(r,a,u,d){var m=r.memoizedProps;if(m!==d){r=a.stateNode,Fa(bi.current);var w=null;switch(u){case"input":m=Le(r,m),d=Le(r,d),w=[];break;case"select":m=K({},m,{value:void 0}),d=K({},d,{value:void 0}),w=[];break;case"textarea":m=zr(r,m),d=zr(r,d),w=[];break;default:typeof m.onClick!="function"&&typeof d.onClick=="function"&&(r.onclick=Ol)}En(u,d);var D;u=null;for(be in m)if(!d.hasOwnProperty(be)&&m.hasOwnProperty(be)&&m[be]!=null)if(be==="style"){var Q=m[be];for(D in Q)Q.hasOwnProperty(D)&&(u||(u={}),u[D]="")}else be!=="dangerouslySetInnerHTML"&&be!=="children"&&be!=="suppressContentEditableWarning"&&be!=="suppressHydrationWarning"&&be!=="autoFocus"&&(o.hasOwnProperty(be)?w||(w=[]):(w=w||[]).push(be,null));for(be in d){var se=d[be];if(Q=m?.[be],d.hasOwnProperty(be)&&se!==Q&&(se!=null||Q!=null))if(be==="style")if(Q){for(D in Q)!Q.hasOwnProperty(D)||se&&se.hasOwnProperty(D)||(u||(u={}),u[D]="");for(D in se)se.hasOwnProperty(D)&&Q[D]!==se[D]&&(u||(u={}),u[D]=se[D])}else u||(w||(w=[]),w.push(be,u)),u=se;else be==="dangerouslySetInnerHTML"?(se=se?se.__html:void 0,Q=Q?Q.__html:void 0,se!=null&&Q!==se&&(w=w||[]).push(be,se)):be==="children"?typeof se!="string"&&typeof se!="number"||(w=w||[]).push(be,""+se):be!=="suppressContentEditableWarning"&&be!=="suppressHydrationWarning"&&(o.hasOwnProperty(be)?(se!=null&&be==="onScroll"&&Zt("scroll",r),w||Q===se||(w=[])):(w=w||[]).push(be,se))}u&&(w=w||[]).push("style",u);var be=w;(a.updateQueue=be)&&(a.flags|=4)}},Yb=function(r,a,u,d){u!==d&&(a.flags|=4)};function su(r,a){if(!tr)switch(r.tailMode){case"hidden":a=r.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function Ur(r){var a=r.alternate!==null&&r.alternate.child===r.child,u=0,d=0;if(a)for(var m=r.child;m!==null;)u|=m.lanes|m.childLanes,d|=m.subtreeFlags&14680064,d|=m.flags&14680064,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)u|=m.lanes|m.childLanes,d|=m.subtreeFlags,d|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=d,r.childLanes=u,a}function uL(r,a,u){var d=a.pendingProps;switch(wf(a),a.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ur(a),null;case 1:return nn(a.type)&&Il(),Ur(a),null;case 3:return d=a.stateNode,As(),xt(rn),xt(qr),Df(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(r===null||r.child===null)&&(jl(a)?a.flags|=4:r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Hn!==null&&(dp(Hn),Hn=null))),ep(r,a),Ur(a),null;case 5:jf(a);var m=Fa(ru.current);if(u=a.type,r!==null&&a.stateNode!=null)Kb(r,a,u,d,m),r.ref!==a.ref&&(a.flags|=512,a.flags|=2097152);else{if(!d){if(a.stateNode===null)throw Error(t(166));return Ur(a),null}if(r=Fa(bi.current),jl(a)){d=a.stateNode,u=a.type;var w=a.memoizedProps;switch(d[Ei]=a,d[Zs]=w,r=(a.mode&1)!==0,u){case"dialog":Zt("cancel",d),Zt("close",d);break;case"iframe":case"object":case"embed":Zt("load",d);break;case"video":case"audio":for(m=0;m<Xs.length;m++)Zt(Xs[m],d);break;case"source":Zt("error",d);break;case"img":case"image":case"link":Zt("error",d),Zt("load",d);break;case"details":Zt("toggle",d);break;case"input":Ye(d,w),Zt("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!w.multiple},Zt("invalid",d);break;case"textarea":or(d,w),Zt("invalid",d)}En(u,w),m=null;for(var D in w)if(w.hasOwnProperty(D)){var Q=w[D];D==="children"?typeof Q=="string"?d.textContent!==Q&&(w.suppressHydrationWarning!==!0&&Al(d.textContent,Q,r),m=["children",Q]):typeof Q=="number"&&d.textContent!==""+Q&&(w.suppressHydrationWarning!==!0&&Al(d.textContent,Q,r),m=["children",""+Q]):o.hasOwnProperty(D)&&Q!=null&&D==="onScroll"&&Zt("scroll",d)}switch(u){case"input":ue(d),Lt(d,w,!0);break;case"textarea":ue(d),Jr(d);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(d.onclick=Ol)}d=m,a.updateQueue=d,d!==null&&(a.flags|=4)}else{D=m.nodeType===9?m:m.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=Zr(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=D.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof d.is=="string"?r=D.createElement(u,{is:d.is}):(r=D.createElement(u),u==="select"&&(D=r,d.multiple?D.multiple=!0:d.size&&(D.size=d.size))):r=D.createElementNS(r,u),r[Ei]=a,r[Zs]=d,Wb(r,a,!1,!1),a.stateNode=r;e:{switch(D=Oi(u,d),u){case"dialog":Zt("cancel",r),Zt("close",r),m=d;break;case"iframe":case"object":case"embed":Zt("load",r),m=d;break;case"video":case"audio":for(m=0;m<Xs.length;m++)Zt(Xs[m],r);m=d;break;case"source":Zt("error",r),m=d;break;case"img":case"image":case"link":Zt("error",r),Zt("load",r),m=d;break;case"details":Zt("toggle",r),m=d;break;case"input":Ye(r,d),m=Le(r,d),Zt("invalid",r);break;case"option":m=d;break;case"select":r._wrapperState={wasMultiple:!!d.multiple},m=K({},d,{value:void 0}),Zt("invalid",r);break;case"textarea":or(r,d),m=zr(r,d),Zt("invalid",r);break;default:m=d}En(u,m),Q=m;for(w in Q)if(Q.hasOwnProperty(w)){var se=Q[w];w==="style"?$r(r,se):w==="dangerouslySetInnerHTML"?(se=se?se.__html:void 0,se!=null&&dn(r,se)):w==="children"?typeof se=="string"?(u!=="textarea"||se!=="")&&Pr(r,se):typeof se=="number"&&Pr(r,""+se):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(o.hasOwnProperty(w)?se!=null&&w==="onScroll"&&Zt("scroll",r):se!=null&&I(r,w,se,D))}switch(u){case"input":ue(r),Lt(r,d,!1);break;case"textarea":ue(r),Jr(r);break;case"option":d.value!=null&&r.setAttribute("value",""+Te(d.value));break;case"select":r.multiple=!!d.multiple,w=d.value,w!=null?Ft(r,!!d.multiple,w,!1):d.defaultValue!=null&&Ft(r,!!d.multiple,d.defaultValue,!0);break;default:typeof m.onClick=="function"&&(r.onclick=Ol)}switch(u){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(a.flags|=4)}a.ref!==null&&(a.flags|=512,a.flags|=2097152)}return Ur(a),null;case 6:if(r&&a.stateNode!=null)Yb(r,a,r.memoizedProps,d);else{if(typeof d!="string"&&a.stateNode===null)throw Error(t(166));if(u=Fa(ru.current),Fa(bi.current),jl(a)){if(d=a.stateNode,u=a.memoizedProps,d[Ei]=a,(w=d.nodeValue!==u)&&(r=pn,r!==null))switch(r.tag){case 3:Al(d.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Al(d.nodeValue,u,(r.mode&1)!==0)}w&&(a.flags|=4)}else d=(u.nodeType===9?u:u.ownerDocument).createTextNode(d),d[Ei]=a,a.stateNode=d}return Ur(a),null;case 13:if(xt(ir),d=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(tr&&hn!==null&&(a.mode&1)!==0&&(a.flags&128)===0)JE(),bs(),a.flags|=98560,w=!1;else if(w=jl(a),d!==null&&d.dehydrated!==null){if(r===null){if(!w)throw Error(t(318));if(w=a.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(t(317));w[Ei]=a}else bs(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Ur(a),w=!1}else Hn!==null&&(dp(Hn),Hn=null),w=!0;if(!w)return a.flags&65536?a:null}return(a.flags&128)!==0?(a.lanes=u,a):(d=d!==null,d!==(r!==null&&r.memoizedState!==null)&&d&&(a.child.flags|=8192,(a.mode&1)!==0&&(r===null||(ir.current&1)!==0?br===0&&(br=3):hp())),a.updateQueue!==null&&(a.flags|=4),Ur(a),null);case 4:return As(),ep(r,a),r===null&&Qs(a.stateNode.containerInfo),Ur(a),null;case 10:return If(a.type._context),Ur(a),null;case 17:return nn(a.type)&&Il(),Ur(a),null;case 19:if(xt(ir),w=a.memoizedState,w===null)return Ur(a),null;if(d=(a.flags&128)!==0,D=w.rendering,D===null)if(d)su(w,!1);else{if(br!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(D=Ul(r),D!==null){for(a.flags|=128,su(w,!1),d=D.updateQueue,d!==null&&(a.updateQueue=d,a.flags|=4),a.subtreeFlags=0,d=u,u=a.child;u!==null;)w=u,r=d,w.flags&=14680066,D=w.alternate,D===null?(w.childLanes=0,w.lanes=r,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=D.childLanes,w.lanes=D.lanes,w.child=D.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=D.memoizedProps,w.memoizedState=D.memoizedState,w.updateQueue=D.updateQueue,w.type=D.type,r=D.dependencies,w.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return Xt(ir,ir.current&1|2),a.child}r=r.sibling}w.tail!==null&&er()>Rs&&(a.flags|=128,d=!0,su(w,!1),a.lanes=4194304)}else{if(!d)if(r=Ul(D),r!==null){if(a.flags|=128,d=!0,u=r.updateQueue,u!==null&&(a.updateQueue=u,a.flags|=4),su(w,!0),w.tail===null&&w.tailMode==="hidden"&&!D.alternate&&!tr)return Ur(a),null}else 2*er()-w.renderingStartTime>Rs&&u!==1073741824&&(a.flags|=128,d=!0,su(w,!1),a.lanes=4194304);w.isBackwards?(D.sibling=a.child,a.child=D):(u=w.last,u!==null?u.sibling=D:a.child=D,w.last=D)}return w.tail!==null?(a=w.tail,w.rendering=a,w.tail=a.sibling,w.renderingStartTime=er(),a.sibling=null,u=ir.current,Xt(ir,d?u&1|2:u&1),a):(Ur(a),null);case 22:case 23:return pp(),d=a.memoizedState!==null,r!==null&&r.memoizedState!==null!==d&&(a.flags|=8192),d&&(a.mode&1)!==0?(mn&1073741824)!==0&&(Ur(a),a.subtreeFlags&6&&(a.flags|=8192)):Ur(a),null;case 24:return null;case 25:return null}throw Error(t(156,a.tag))}function lL(r,a){switch(wf(a),a.tag){case 1:return nn(a.type)&&Il(),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return As(),xt(rn),xt(qr),Df(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 5:return jf(a),null;case 13:if(xt(ir),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(t(340));bs()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return xt(ir),null;case 4:return As(),null;case 10:return If(a.type._context),null;case 22:case 23:return pp(),null;case 24:return null;default:return null}}var Xl=!1,Fr=!1,cL=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Ps(r,a){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(d){cr(r,a,d)}else u.current=null}function tp(r,a,u){try{u()}catch(d){cr(r,a,d)}}var Xb=!1;function dL(r,a){if(pf=fr,r=OE(),af(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var d=u.getSelection&&u.getSelection();if(d&&d.rangeCount!==0){u=d.anchorNode;var m=d.anchorOffset,w=d.focusNode;d=d.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var D=0,Q=-1,se=-1,be=0,qe=0,Be=r,De=null;t:for(;;){for(var Je;Be!==u||m!==0&&Be.nodeType!==3||(Q=D+m),Be!==w||d!==0&&Be.nodeType!==3||(se=D+d),Be.nodeType===3&&(D+=Be.nodeValue.length),(Je=Be.firstChild)!==null;)De=Be,Be=Je;for(;;){if(Be===r)break t;if(De===u&&++be===m&&(Q=D),De===w&&++qe===d&&(se=D),(Je=Be.nextSibling)!==null)break;Be=De,De=Be.parentNode}Be=Je}u=Q===-1||se===-1?null:{start:Q,end:se}}else u=null}u=u||{start:0,end:0}}else u=null;for(hf={focusedElem:r,selectionRange:u},fr=!1,rt=a;rt!==null;)if(a=rt,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,rt=r;else for(;rt!==null;){a=rt;try{var ot=a.alternate;if((a.flags&1024)!==0)switch(a.tag){case 0:case 11:case 15:break;case 1:if(ot!==null){var lt=ot.memoizedProps,pr=ot.memoizedState,me=a.stateNode,ce=me.getSnapshotBeforeUpdate(a.elementType===a.type?lt:zn(a.type,lt),pr);me.__reactInternalSnapshotBeforeUpdate=ce}break;case 3:var _e=a.stateNode.containerInfo;_e.nodeType===1?_e.textContent="":_e.nodeType===9&&_e.documentElement&&_e.removeChild(_e.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Fe){cr(a,a.return,Fe)}if(r=a.sibling,r!==null){r.return=a.return,rt=r;break}rt=a.return}return ot=Xb,Xb=!1,ot}function uu(r,a,u){var d=a.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var m=d=d.next;do{if((m.tag&r)===r){var w=m.destroy;m.destroy=void 0,w!==void 0&&tp(a,u,w)}m=m.next}while(m!==d)}}function Ql(r,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var u=a=a.next;do{if((u.tag&r)===r){var d=u.create;u.destroy=d()}u=u.next}while(u!==a)}}function rp(r){var a=r.ref;if(a!==null){var u=r.stateNode;r.tag,r=u,typeof a=="function"?a(r):a.current=r}}function Qb(r){var a=r.alternate;a!==null&&(r.alternate=null,Qb(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&(delete a[Ei],delete a[Zs],delete a[vf],delete a[Yj],delete a[Xj])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function Jb(r){return r.tag===5||r.tag===3||r.tag===4}function Zb(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Jb(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function np(r,a,u){var d=r.tag;if(d===5||d===6)r=r.stateNode,a?u.nodeType===8?u.parentNode.insertBefore(r,a):u.insertBefore(r,a):(u.nodeType===8?(a=u.parentNode,a.insertBefore(r,u)):(a=u,a.appendChild(r)),u=u._reactRootContainer,u!=null||a.onclick!==null||(a.onclick=Ol));else if(d!==4&&(r=r.child,r!==null))for(np(r,a,u),r=r.sibling;r!==null;)np(r,a,u),r=r.sibling}function ip(r,a,u){var d=r.tag;if(d===5||d===6)r=r.stateNode,a?u.insertBefore(r,a):u.appendChild(r);else if(d!==4&&(r=r.child,r!==null))for(ip(r,a,u),r=r.sibling;r!==null;)ip(r,a,u),r=r.sibling}var Mr=null,Gn=!1;function la(r,a,u){for(u=u.child;u!==null;)xb(r,a,u),u=u.sibling}function xb(r,a,u){if(wn&&typeof wn.onCommitFiberUnmount=="function")try{wn.onCommitFiberUnmount(Zi,u)}catch{}switch(u.tag){case 5:Fr||Ps(u,a);case 6:var d=Mr,m=Gn;Mr=null,la(r,a,u),Mr=d,Gn=m,Mr!==null&&(Gn?(r=Mr,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):Mr.removeChild(u.stateNode));break;case 18:Mr!==null&&(Gn?(r=Mr,u=u.stateNode,r.nodeType===8?gf(r.parentNode,u):r.nodeType===1&&gf(r,u),nr(r)):gf(Mr,u.stateNode));break;case 4:d=Mr,m=Gn,Mr=u.stateNode.containerInfo,Gn=!0,la(r,a,u),Mr=d,Gn=m;break;case 0:case 11:case 14:case 15:if(!Fr&&(d=u.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){m=d=d.next;do{var w=m,D=w.destroy;w=w.tag,D!==void 0&&((w&2)!==0||(w&4)!==0)&&tp(u,a,D),m=m.next}while(m!==d)}la(r,a,u);break;case 1:if(!Fr&&(Ps(u,a),d=u.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=u.memoizedProps,d.state=u.memoizedState,d.componentWillUnmount()}catch(Q){cr(u,a,Q)}la(r,a,u);break;case 21:la(r,a,u);break;case 22:u.mode&1?(Fr=(d=Fr)||u.memoizedState!==null,la(r,a,u),Fr=d):la(r,a,u);break;default:la(r,a,u)}}function $b(r){var a=r.updateQueue;if(a!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new cL),a.forEach(function(d){var m=EL.bind(null,r,d);u.has(d)||(u.add(d),d.then(m,m))})}}function Wn(r,a){var u=a.deletions;if(u!==null)for(var d=0;d<u.length;d++){var m=u[d];try{var w=r,D=a,Q=D;e:for(;Q!==null;){switch(Q.tag){case 5:Mr=Q.stateNode,Gn=!1;break e;case 3:Mr=Q.stateNode.containerInfo,Gn=!0;break e;case 4:Mr=Q.stateNode.containerInfo,Gn=!0;break e}Q=Q.return}if(Mr===null)throw Error(t(160));xb(w,D,m),Mr=null,Gn=!1;var se=m.alternate;se!==null&&(se.return=null),m.return=null}catch(be){cr(m,a,be)}}if(a.subtreeFlags&12854)for(a=a.child;a!==null;)e0(a,r),a=a.sibling}function e0(r,a){var u=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(Wn(a,r),Si(r),d&4){try{uu(3,r,r.return),Ql(3,r)}catch(lt){cr(r,r.return,lt)}try{uu(5,r,r.return)}catch(lt){cr(r,r.return,lt)}}break;case 1:Wn(a,r),Si(r),d&512&&u!==null&&Ps(u,u.return);break;case 5:if(Wn(a,r),Si(r),d&512&&u!==null&&Ps(u,u.return),r.flags&32){var m=r.stateNode;try{Pr(m,"")}catch(lt){cr(r,r.return,lt)}}if(d&4&&(m=r.stateNode,m!=null)){var w=r.memoizedProps,D=u!==null?u.memoizedProps:w,Q=r.type,se=r.updateQueue;if(r.updateQueue=null,se!==null)try{Q==="input"&&w.type==="radio"&&w.name!=null&&Qe(m,w),Oi(Q,D);var be=Oi(Q,w);for(D=0;D<se.length;D+=2){var qe=se[D],Be=se[D+1];qe==="style"?$r(m,Be):qe==="dangerouslySetInnerHTML"?dn(m,Be):qe==="children"?Pr(m,Be):I(m,qe,Be,be)}switch(Q){case"input":Vt(m,w);break;case"textarea":gn(m,w);break;case"select":var De=m._wrapperState.wasMultiple;m._wrapperState.wasMultiple=!!w.multiple;var Je=w.value;Je!=null?Ft(m,!!w.multiple,Je,!1):De!==!!w.multiple&&(w.defaultValue!=null?Ft(m,!!w.multiple,w.defaultValue,!0):Ft(m,!!w.multiple,w.multiple?[]:"",!1))}m[Zs]=w}catch(lt){cr(r,r.return,lt)}}break;case 6:if(Wn(a,r),Si(r),d&4){if(r.stateNode===null)throw Error(t(162));m=r.stateNode,w=r.memoizedProps;try{m.nodeValue=w}catch(lt){cr(r,r.return,lt)}}break;case 3:if(Wn(a,r),Si(r),d&4&&u!==null&&u.memoizedState.isDehydrated)try{nr(a.containerInfo)}catch(lt){cr(r,r.return,lt)}break;case 4:Wn(a,r),Si(r);break;case 13:Wn(a,r),Si(r),m=r.child,m.flags&8192&&(w=m.memoizedState!==null,m.stateNode.isHidden=w,!w||m.alternate!==null&&m.alternate.memoizedState!==null||(sp=er())),d&4&&$b(r);break;case 22:if(qe=u!==null&&u.memoizedState!==null,r.mode&1?(Fr=(be=Fr)||qe,Wn(a,r),Fr=be):Wn(a,r),Si(r),d&8192){if(be=r.memoizedState!==null,(r.stateNode.isHidden=be)&&!qe&&(r.mode&1)!==0)for(rt=r,qe=r.child;qe!==null;){for(Be=rt=qe;rt!==null;){switch(De=rt,Je=De.child,De.tag){case 0:case 11:case 14:case 15:uu(4,De,De.return);break;case 1:Ps(De,De.return);var ot=De.stateNode;if(typeof ot.componentWillUnmount=="function"){d=De,u=De.return;try{a=d,ot.props=a.memoizedProps,ot.state=a.memoizedState,ot.componentWillUnmount()}catch(lt){cr(d,u,lt)}}break;case 5:Ps(De,De.return);break;case 22:if(De.memoizedState!==null){n0(Be);continue}}Je!==null?(Je.return=De,rt=Je):n0(Be)}qe=qe.sibling}e:for(qe=null,Be=r;;){if(Be.tag===5){if(qe===null){qe=Be;try{m=Be.stateNode,be?(w=m.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(Q=Be.stateNode,se=Be.memoizedProps.style,D=se!=null&&se.hasOwnProperty("display")?se.display:null,Q.style.display=_n("display",D))}catch(lt){cr(r,r.return,lt)}}}else if(Be.tag===6){if(qe===null)try{Be.stateNode.nodeValue=be?"":Be.memoizedProps}catch(lt){cr(r,r.return,lt)}}else if((Be.tag!==22&&Be.tag!==23||Be.memoizedState===null||Be===r)&&Be.child!==null){Be.child.return=Be,Be=Be.child;continue}if(Be===r)break e;for(;Be.sibling===null;){if(Be.return===null||Be.return===r)break e;qe===Be&&(qe=null),Be=Be.return}qe===Be&&(qe=null),Be.sibling.return=Be.return,Be=Be.sibling}}break;case 19:Wn(a,r),Si(r),d&4&&$b(r);break;case 21:break;default:Wn(a,r),Si(r)}}function Si(r){var a=r.flags;if(a&2){try{e:{for(var u=r.return;u!==null;){if(Jb(u)){var d=u;break e}u=u.return}throw Error(t(160))}switch(d.tag){case 5:var m=d.stateNode;d.flags&32&&(Pr(m,""),d.flags&=-33);var w=Zb(r);ip(r,w,m);break;case 3:case 4:var D=d.stateNode.containerInfo,Q=Zb(r);np(r,Q,D);break;default:throw Error(t(161))}}catch(se){cr(r,r.return,se)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function fL(r,a,u){rt=r,t0(r)}function t0(r,a,u){for(var d=(r.mode&1)!==0;rt!==null;){var m=rt,w=m.child;if(m.tag===22&&d){var D=m.memoizedState!==null||Xl;if(!D){var Q=m.alternate,se=Q!==null&&Q.memoizedState!==null||Fr;Q=Xl;var be=Fr;if(Xl=D,(Fr=se)&&!be)for(rt=m;rt!==null;)D=rt,se=D.child,D.tag===22&&D.memoizedState!==null?i0(m):se!==null?(se.return=D,rt=se):i0(m);for(;w!==null;)rt=w,t0(w),w=w.sibling;rt=m,Xl=Q,Fr=be}r0(r)}else(m.subtreeFlags&8772)!==0&&w!==null?(w.return=m,rt=w):r0(r)}}function r0(r){for(;rt!==null;){var a=rt;if((a.flags&8772)!==0){var u=a.alternate;try{if((a.flags&8772)!==0)switch(a.tag){case 0:case 11:case 15:Fr||Ql(5,a);break;case 1:var d=a.stateNode;if(a.flags&4&&!Fr)if(u===null)d.componentDidMount();else{var m=a.elementType===a.type?u.memoizedProps:zn(a.type,u.memoizedProps);d.componentDidUpdate(m,u.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var w=a.updateQueue;w!==null&&nb(a,w,d);break;case 3:var D=a.updateQueue;if(D!==null){if(u=null,a.child!==null)switch(a.child.tag){case 5:u=a.child.stateNode;break;case 1:u=a.child.stateNode}nb(a,D,u)}break;case 5:var Q=a.stateNode;if(u===null&&a.flags&4){u=Q;var se=a.memoizedProps;switch(a.type){case"button":case"input":case"select":case"textarea":se.autoFocus&&u.focus();break;case"img":se.src&&(u.src=se.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(a.memoizedState===null){var be=a.alternate;if(be!==null){var qe=be.memoizedState;if(qe!==null){var Be=qe.dehydrated;Be!==null&&nr(Be)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}Fr||a.flags&512&&rp(a)}catch(De){cr(a,a.return,De)}}if(a===r){rt=null;break}if(u=a.sibling,u!==null){u.return=a.return,rt=u;break}rt=a.return}}function n0(r){for(;rt!==null;){var a=rt;if(a===r){rt=null;break}var u=a.sibling;if(u!==null){u.return=a.return,rt=u;break}rt=a.return}}function i0(r){for(;rt!==null;){var a=rt;try{switch(a.tag){case 0:case 11:case 15:var u=a.return;try{Ql(4,a)}catch(se){cr(a,u,se)}break;case 1:var d=a.stateNode;if(typeof d.componentDidMount=="function"){var m=a.return;try{d.componentDidMount()}catch(se){cr(a,m,se)}}var w=a.return;try{rp(a)}catch(se){cr(a,w,se)}break;case 5:var D=a.return;try{rp(a)}catch(se){cr(a,D,se)}}}catch(se){cr(a,a.return,se)}if(a===r){rt=null;break}var Q=a.sibling;if(Q!==null){Q.return=a.return,rt=Q;break}rt=a.return}}var pL=Math.ceil,Jl=S.ReactCurrentDispatcher,ap=S.ReactCurrentOwner,Mn=S.ReactCurrentBatchConfig,jt=0,Ar=null,mr=null,Cr=0,mn=0,Is=ia(0),br=0,lu=null,Ha=0,Zl=0,op=0,cu=null,on=null,sp=0,Rs=1/0,Bi=null,xl=!1,up=null,ca=null,$l=!1,da=null,ec=0,du=0,lp=null,tc=-1,rc=0;function Xr(){return(jt&6)!==0?er():tc!==-1?tc:tc=er()}function fa(r){return(r.mode&1)===0?1:(jt&2)!==0&&Cr!==0?Cr&-Cr:Jj.transition!==null?(rc===0&&(rc=Gs()),rc):(r=Bt,r!==0||(r=window.event,r=r===void 0?16:Nt(r.type)),r)}function Kn(r,a,u,d){if(50<du)throw du=0,lp=null,Error(t(185));Ri(r,u,d),((jt&2)===0||r!==Ar)&&(r===Ar&&((jt&2)===0&&(Zl|=u),br===4&&pa(r,Cr)),sn(r,d),u===1&&jt===0&&(a.mode&1)===0&&(Rs=er()+500,Nl&&oa()))}function sn(r,a){var u=r.callbackNode;at(r,a);var d=gr(r,r===Ar?Cr:0);if(d===0)u!==null&&Ea(u),r.callbackNode=null,r.callbackPriority=0;else if(a=d&-d,r.callbackPriority!==a){if(u!=null&&Ea(u),a===1)r.tag===0?Qj(o0.bind(null,r)):WE(o0.bind(null,r)),Wj(function(){(jt&6)===0&&oa()}),u=null;else{switch(Ws(d)){case 1:u=Wo;break;case 4:u=ba;break;case 16:u=wa;break;case 536870912:u=gl;break;default:u=wa}u=h0(u,a0.bind(null,r))}r.callbackPriority=a,r.callbackNode=u}}function a0(r,a){if(tc=-1,rc=0,(jt&6)!==0)throw Error(t(327));var u=r.callbackNode;if(Ns()&&r.callbackNode!==u)return null;var d=gr(r,r===Ar?Cr:0);if(d===0)return null;if((d&30)!==0||(d&r.expiredLanes)!==0||a)a=nc(r,d);else{a=d;var m=jt;jt|=2;var w=u0();(Ar!==r||Cr!==a)&&(Bi=null,Rs=er()+500,Ga(r,a));do try{yL();break}catch(Q){s0(r,Q)}while(!0);Pf(),Jl.current=w,jt=m,mr!==null?a=0:(Ar=null,Cr=0,a=br)}if(a!==0){if(a===2&&(m=Ze(r),m!==0&&(d=m,a=cp(r,m))),a===1)throw u=lu,Ga(r,0),pa(r,d),sn(r,er()),u;if(a===6)pa(r,d);else{if(m=r.current.alternate,(d&30)===0&&!hL(m)&&(a=nc(r,d),a===2&&(w=Ze(r),w!==0&&(d=w,a=cp(r,w))),a===1))throw u=lu,Ga(r,0),pa(r,d),sn(r,er()),u;switch(r.finishedWork=m,r.finishedLanes=d,a){case 0:case 1:throw Error(t(345));case 2:Wa(r,on,Bi);break;case 3:if(pa(r,d),(d&130023424)===d&&(a=sp+500-er(),10<a)){if(gr(r,0)!==0)break;if(m=r.suspendedLanes,(m&d)!==d){Xr(),r.pingedLanes|=r.suspendedLanes&m;break}r.timeoutHandle=yf(Wa.bind(null,r,on,Bi),a);break}Wa(r,on,Bi);break;case 4:if(pa(r,d),(d&4194240)===d)break;for(a=r.eventTimes,m=-1;0<d;){var D=31-Wr(d);w=1<<D,D=a[D],D>m&&(m=D),d&=~w}if(d=m,d=er()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*pL(d/1960))-d,10<d){r.timeoutHandle=yf(Wa.bind(null,r,on,Bi),d);break}Wa(r,on,Bi);break;case 5:Wa(r,on,Bi);break;default:throw Error(t(329))}}}return sn(r,er()),r.callbackNode===u?a0.bind(null,r):null}function cp(r,a){var u=cu;return r.current.memoizedState.isDehydrated&&(Ga(r,a).flags|=256),r=nc(r,a),r!==2&&(a=on,on=u,a!==null&&dp(a)),r}function dp(r){on===null?on=r:on.push.apply(on,r)}function hL(r){for(var a=r;;){if(a.flags&16384){var u=a.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var d=0;d<u.length;d++){var m=u[d],w=m.getSnapshot;m=m.value;try{if(!Vn(w(),m))return!1}catch{return!1}}}if(u=a.child,a.subtreeFlags&16384&&u!==null)u.return=a,a=u;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function pa(r,a){for(a&=~op,a&=~Zl,r.suspendedLanes|=a,r.pingedLanes&=~a,r=r.expirationTimes;0<a;){var u=31-Wr(a),d=1<<u;r[u]=-1,a&=~d}}function o0(r){if((jt&6)!==0)throw Error(t(327));Ns();var a=gr(r,0);if((a&1)===0)return sn(r,er()),null;var u=nc(r,a);if(r.tag!==0&&u===2){var d=Ze(r);d!==0&&(a=d,u=cp(r,d))}if(u===1)throw u=lu,Ga(r,0),pa(r,a),sn(r,er()),u;if(u===6)throw Error(t(345));return r.finishedWork=r.current.alternate,r.finishedLanes=a,Wa(r,on,Bi),sn(r,er()),null}function fp(r,a){var u=jt;jt|=1;try{return r(a)}finally{jt=u,jt===0&&(Rs=er()+500,Nl&&oa())}}function za(r){da!==null&&da.tag===0&&(jt&6)===0&&Ns();var a=jt;jt|=1;var u=Mn.transition,d=Bt;try{if(Mn.transition=null,Bt=1,r)return r()}finally{Bt=d,Mn.transition=u,jt=a,(jt&6)===0&&oa()}}function pp(){mn=Is.current,xt(Is)}function Ga(r,a){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,Gj(u)),mr!==null)for(u=mr.return;u!==null;){var d=u;switch(wf(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&Il();break;case 3:As(),xt(rn),xt(qr),Df();break;case 5:jf(d);break;case 4:As();break;case 13:xt(ir);break;case 19:xt(ir);break;case 10:If(d.type._context);break;case 22:case 23:pp()}u=u.return}if(Ar=r,mr=r=ha(r.current,null),Cr=mn=a,br=0,lu=null,op=Zl=Ha=0,on=cu=null,Ua!==null){for(a=0;a<Ua.length;a++)if(u=Ua[a],d=u.interleaved,d!==null){u.interleaved=null;var m=d.next,w=u.pending;if(w!==null){var D=w.next;w.next=m,d.next=D}u.pending=d}Ua=null}return r}function s0(r,a){do{var u=mr;try{if(Pf(),Fl.current=Gl,Vl){for(var d=ar.memoizedState;d!==null;){var m=d.queue;m!==null&&(m.pending=null),d=d.next}Vl=!1}if(Va=0,Tr=Er=ar=null,nu=!1,iu=0,ap.current=null,u===null||u.return===null){br=1,lu=a,mr=null;break}e:{var w=r,D=u.return,Q=u,se=a;if(a=Cr,Q.flags|=32768,se!==null&&typeof se=="object"&&typeof se.then=="function"){var be=se,qe=Q,Be=qe.tag;if((qe.mode&1)===0&&(Be===0||Be===11||Be===15)){var De=qe.alternate;De?(qe.updateQueue=De.updateQueue,qe.memoizedState=De.memoizedState,qe.lanes=De.lanes):(qe.updateQueue=null,qe.memoizedState=null)}var Je=Cb(D);if(Je!==null){Je.flags&=-257,jb(Je,D,Q,w,a),Je.mode&1&&Mb(w,be,a),a=Je,se=be;var ot=a.updateQueue;if(ot===null){var lt=new Set;lt.add(se),a.updateQueue=lt}else ot.add(se);break e}else{if((a&1)===0){Mb(w,be,a),hp();break e}se=Error(t(426))}}else if(tr&&Q.mode&1){var pr=Cb(D);if(pr!==null){(pr.flags&65536)===0&&(pr.flags|=256),jb(pr,D,Q,w,a),Af(Os(se,Q));break e}}w=se=Os(se,Q),br!==4&&(br=2),cu===null?cu=[w]:cu.push(w),w=D;do{switch(w.tag){case 3:w.flags|=65536,a&=-a,w.lanes|=a;var me=Rb(w,se,a);rb(w,me);break e;case 1:Q=se;var ce=w.type,_e=w.stateNode;if((w.flags&128)===0&&(typeof ce.getDerivedStateFromError=="function"||_e!==null&&typeof _e.componentDidCatch=="function"&&(ca===null||!ca.has(_e)))){w.flags|=65536,a&=-a,w.lanes|=a;var Fe=Nb(w,Q,a);rb(w,Fe);break e}}w=w.return}while(w!==null)}c0(u)}catch(ct){a=ct,mr===u&&u!==null&&(mr=u=u.return);continue}break}while(!0)}function u0(){var r=Jl.current;return Jl.current=Gl,r===null?Gl:r}function hp(){(br===0||br===3||br===2)&&(br=4),Ar===null||(Ha&268435455)===0&&(Zl&268435455)===0||pa(Ar,Cr)}function nc(r,a){var u=jt;jt|=2;var d=u0();(Ar!==r||Cr!==a)&&(Bi=null,Ga(r,a));do try{mL();break}catch(m){s0(r,m)}while(!0);if(Pf(),jt=u,Jl.current=d,mr!==null)throw Error(t(261));return Ar=null,Cr=0,br}function mL(){for(;mr!==null;)l0(mr)}function yL(){for(;mr!==null&&!ml();)l0(mr)}function l0(r){var a=p0(r.alternate,r,mn);r.memoizedProps=r.pendingProps,a===null?c0(r):mr=a,ap.current=null}function c0(r){var a=r;do{var u=a.alternate;if(r=a.return,(a.flags&32768)===0){if(u=uL(u,a,mn),u!==null){mr=u;return}}else{if(u=lL(u,a),u!==null){u.flags&=32767,mr=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{br=6,mr=null;return}}if(a=a.sibling,a!==null){mr=a;return}mr=a=r}while(a!==null);br===0&&(br=5)}function Wa(r,a,u){var d=Bt,m=Mn.transition;try{Mn.transition=null,Bt=1,gL(r,a,u,d)}finally{Mn.transition=m,Bt=d}return null}function gL(r,a,u,d){do Ns();while(da!==null);if((jt&6)!==0)throw Error(t(327));u=r.finishedWork;var m=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=0,u===r.current)throw Error(t(177));r.callbackNode=null,r.callbackPriority=0;var w=u.lanes|u.childLanes;if(Sa(r,w),r===Ar&&(mr=Ar=null,Cr=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||$l||($l=!0,h0(wa,function(){return Ns(),null})),w=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||w){w=Mn.transition,Mn.transition=null;var D=Bt;Bt=1;var Q=jt;jt|=4,ap.current=null,dL(r,u),e0(u,r),qj(hf),fr=!!pf,hf=pf=null,r.current=u,fL(u),qn(),jt=Q,Bt=D,Mn.transition=w}else r.current=u;if($l&&($l=!1,da=r,ec=m),w=r.pendingLanes,w===0&&(ca=null),Ko(u.stateNode),sn(r,er()),a!==null)for(d=r.onRecoverableError,u=0;u<a.length;u++)m=a[u],d(m.value,{componentStack:m.stack,digest:m.digest});if(xl)throw xl=!1,r=up,up=null,r;return(ec&1)!==0&&r.tag!==0&&Ns(),w=r.pendingLanes,(w&1)!==0?r===lp?du++:(du=0,lp=r):du=0,oa(),null}function Ns(){if(da!==null){var r=Ws(ec),a=Mn.transition,u=Bt;try{if(Mn.transition=null,Bt=16>r?16:r,da===null)var d=!1;else{if(r=da,da=null,ec=0,(jt&6)!==0)throw Error(t(331));var m=jt;for(jt|=4,rt=r.current;rt!==null;){var w=rt,D=w.child;if((rt.flags&16)!==0){var Q=w.deletions;if(Q!==null){for(var se=0;se<Q.length;se++){var be=Q[se];for(rt=be;rt!==null;){var qe=rt;switch(qe.tag){case 0:case 11:case 15:uu(8,qe,w)}var Be=qe.child;if(Be!==null)Be.return=qe,rt=Be;else for(;rt!==null;){qe=rt;var De=qe.sibling,Je=qe.return;if(Qb(qe),qe===be){rt=null;break}if(De!==null){De.return=Je,rt=De;break}rt=Je}}}var ot=w.alternate;if(ot!==null){var lt=ot.child;if(lt!==null){ot.child=null;do{var pr=lt.sibling;lt.sibling=null,lt=pr}while(lt!==null)}}rt=w}}if((w.subtreeFlags&2064)!==0&&D!==null)D.return=w,rt=D;else e:for(;rt!==null;){if(w=rt,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:uu(9,w,w.return)}var me=w.sibling;if(me!==null){me.return=w.return,rt=me;break e}rt=w.return}}var ce=r.current;for(rt=ce;rt!==null;){D=rt;var _e=D.child;if((D.subtreeFlags&2064)!==0&&_e!==null)_e.return=D,rt=_e;else e:for(D=ce;rt!==null;){if(Q=rt,(Q.flags&2048)!==0)try{switch(Q.tag){case 0:case 11:case 15:Ql(9,Q)}}catch(ct){cr(Q,Q.return,ct)}if(Q===D){rt=null;break e}var Fe=Q.sibling;if(Fe!==null){Fe.return=Q.return,rt=Fe;break e}rt=Q.return}}if(jt=m,oa(),wn&&typeof wn.onPostCommitFiberRoot=="function")try{wn.onPostCommitFiberRoot(Zi,r)}catch{}d=!0}return d}finally{Bt=u,Mn.transition=a}}return!1}function d0(r,a,u){a=Os(u,a),a=Rb(r,a,1),r=ua(r,a,1),a=Xr(),r!==null&&(Ri(r,1,a),sn(r,a))}function cr(r,a,u){if(r.tag===3)d0(r,r,u);else for(;a!==null;){if(a.tag===3){d0(a,r,u);break}else if(a.tag===1){var d=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(ca===null||!ca.has(d))){r=Os(u,r),r=Nb(a,r,1),a=ua(a,r,1),r=Xr(),a!==null&&(Ri(a,1,r),sn(a,r));break}}a=a.return}}function vL(r,a,u){var d=r.pingCache;d!==null&&d.delete(a),a=Xr(),r.pingedLanes|=r.suspendedLanes&u,Ar===r&&(Cr&u)===u&&(br===4||br===3&&(Cr&130023424)===Cr&&500>er()-sp?Ga(r,0):op|=u),sn(r,a)}function f0(r,a){a===0&&((r.mode&1)===0?a=1:(a=$e,$e<<=1,($e&130023424)===0&&($e=4194304)));var u=Xr();r=Di(r,a),r!==null&&(Ri(r,a,u),sn(r,u))}function _L(r){var a=r.memoizedState,u=0;a!==null&&(u=a.retryLane),f0(r,u)}function EL(r,a){var u=0;switch(r.tag){case 13:var d=r.stateNode,m=r.memoizedState;m!==null&&(u=m.retryLane);break;case 19:d=r.stateNode;break;default:throw Error(t(314))}d!==null&&d.delete(a),f0(r,u)}var p0;p0=function(r,a,u){if(r!==null)if(r.memoizedProps!==a.pendingProps||rn.current)an=!0;else{if((r.lanes&u)===0&&(a.flags&128)===0)return an=!1,sL(r,a,u);an=(r.flags&131072)!==0}else an=!1,tr&&(a.flags&1048576)!==0&&KE(a,Cl,a.index);switch(a.lanes=0,a.tag){case 2:var d=a.type;Yl(r,a),r=a.pendingProps;var m=vs(a,qr.current);Ts(a,u),m=Bf(null,a,d,r,m,u);var w=Uf();return a.flags|=1,typeof m=="object"&&m!==null&&typeof m.render=="function"&&m.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,nn(d)?(w=!0,Rl(a)):w=!1,a.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,Mf(a),m.updater=Wl,a.stateNode=m,m._reactInternals=a,Wf(a,d,r,u),a=Qf(null,a,d,!0,w,u)):(a.tag=0,tr&&w&&bf(a),Yr(null,a,m,u),a=a.child),a;case 16:d=a.elementType;e:{switch(Yl(r,a),r=a.pendingProps,m=d._init,d=m(d._payload),a.type=d,m=a.tag=wL(d),r=zn(d,r),m){case 0:a=Xf(null,a,d,r,u);break e;case 1:a=Ub(null,a,d,r,u);break e;case 11:a=Lb(null,a,d,r,u);break e;case 14:a=Db(null,a,d,zn(d.type,r),u);break e}throw Error(t(306,d,""))}return a;case 0:return d=a.type,m=a.pendingProps,m=a.elementType===d?m:zn(d,m),Xf(r,a,d,m,u);case 1:return d=a.type,m=a.pendingProps,m=a.elementType===d?m:zn(d,m),Ub(r,a,d,m,u);case 3:e:{if(Fb(a),r===null)throw Error(t(387));d=a.pendingProps,w=a.memoizedState,m=w.element,tb(r,a),Bl(a,d,null,u);var D=a.memoizedState;if(d=D.element,w.isDehydrated)if(w={element:d,isDehydrated:!1,cache:D.cache,pendingSuspenseBoundaries:D.pendingSuspenseBoundaries,transitions:D.transitions},a.updateQueue.baseState=w,a.memoizedState=w,a.flags&256){m=Os(Error(t(423)),a),a=Vb(r,a,d,u,m);break e}else if(d!==m){m=Os(Error(t(424)),a),a=Vb(r,a,d,u,m);break e}else for(hn=na(a.stateNode.containerInfo.firstChild),pn=a,tr=!0,Hn=null,u=$E(a,null,d,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(bs(),d===m){a=qi(r,a,u);break e}Yr(r,a,d,u)}a=a.child}return a;case 5:return ib(a),r===null&&Tf(a),d=a.type,m=a.pendingProps,w=r!==null?r.memoizedProps:null,D=m.children,mf(d,m)?D=null:w!==null&&mf(d,w)&&(a.flags|=32),Bb(r,a),Yr(r,a,D,u),a.child;case 6:return r===null&&Tf(a),null;case 13:return Hb(r,a,u);case 4:return Cf(a,a.stateNode.containerInfo),d=a.pendingProps,r===null?a.child=ws(a,null,d,u):Yr(r,a,d,u),a.child;case 11:return d=a.type,m=a.pendingProps,m=a.elementType===d?m:zn(d,m),Lb(r,a,d,m,u);case 7:return Yr(r,a,a.pendingProps,u),a.child;case 8:return Yr(r,a,a.pendingProps.children,u),a.child;case 12:return Yr(r,a,a.pendingProps.children,u),a.child;case 10:e:{if(d=a.type._context,m=a.pendingProps,w=a.memoizedProps,D=m.value,Xt(Dl,d._currentValue),d._currentValue=D,w!==null)if(Vn(w.value,D)){if(w.children===m.children&&!rn.current){a=qi(r,a,u);break e}}else for(w=a.child,w!==null&&(w.return=a);w!==null;){var Q=w.dependencies;if(Q!==null){D=w.child;for(var se=Q.firstContext;se!==null;){if(se.context===d){if(w.tag===1){se=ki(-1,u&-u),se.tag=2;var be=w.updateQueue;if(be!==null){be=be.shared;var qe=be.pending;qe===null?se.next=se:(se.next=qe.next,qe.next=se),be.pending=se}}w.lanes|=u,se=w.alternate,se!==null&&(se.lanes|=u),Rf(w.return,u,a),Q.lanes|=u;break}se=se.next}}else if(w.tag===10)D=w.type===a.type?null:w.child;else if(w.tag===18){if(D=w.return,D===null)throw Error(t(341));D.lanes|=u,Q=D.alternate,Q!==null&&(Q.lanes|=u),Rf(D,u,a),D=w.sibling}else D=w.child;if(D!==null)D.return=w;else for(D=w;D!==null;){if(D===a){D=null;break}if(w=D.sibling,w!==null){w.return=D.return,D=w;break}D=D.return}w=D}Yr(r,a,m.children,u),a=a.child}return a;case 9:return m=a.type,d=a.pendingProps.children,Ts(a,u),m=Rn(m),d=d(m),a.flags|=1,Yr(r,a,d,u),a.child;case 14:return d=a.type,m=zn(d,a.pendingProps),m=zn(d.type,m),Db(r,a,d,m,u);case 15:return kb(r,a,a.type,a.pendingProps,u);case 17:return d=a.type,m=a.pendingProps,m=a.elementType===d?m:zn(d,m),Yl(r,a),a.tag=1,nn(d)?(r=!0,Rl(a)):r=!1,Ts(a,u),Pb(a,d,m),Wf(a,d,m,u),Qf(null,a,d,!0,r,u);case 19:return Gb(r,a,u);case 22:return qb(r,a,u)}throw Error(t(156,a.tag))};function h0(r,a){return zs(r,a)}function bL(r,a,u,d){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cn(r,a,u,d){return new bL(r,a,u,d)}function mp(r){return r=r.prototype,!(!r||!r.isReactComponent)}function wL(r){if(typeof r=="function")return mp(r)?1:0;if(r!=null){if(r=r.$$typeof,r===Ae)return 11;if(r===je)return 14}return 2}function ha(r,a){var u=r.alternate;return u===null?(u=Cn(r.tag,a,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=a,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&14680064,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,a=r.dependencies,u.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function ic(r,a,u,d,m,w){var D=2;if(d=r,typeof r=="function")mp(r)&&(D=1);else if(typeof r=="string")D=5;else e:switch(r){case j:return Ka(u.children,m,w,a);case V:D=8,m|=8;break;case W:return r=Cn(12,u,a,m|2),r.elementType=W,r.lanes=w,r;case Se:return r=Cn(13,u,a,m),r.elementType=Se,r.lanes=w,r;case Ee:return r=Cn(19,u,a,m),r.elementType=Ee,r.lanes=w,r;case Oe:return ac(u,m,w,a);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case X:D=10;break e;case fe:D=9;break e;case Ae:D=11;break e;case je:D=14;break e;case Ce:D=16,d=null;break e}throw Error(t(130,r==null?r:typeof r,""))}return a=Cn(D,u,a,m),a.elementType=r,a.type=d,a.lanes=w,a}function Ka(r,a,u,d){return r=Cn(7,r,d,a),r.lanes=u,r}function ac(r,a,u,d){return r=Cn(22,r,d,a),r.elementType=Oe,r.lanes=u,r.stateNode={isHidden:!1},r}function yp(r,a,u){return r=Cn(6,r,null,a),r.lanes=u,r}function gp(r,a,u){return a=Cn(4,r.children!==null?r.children:[],r.key,a),a.lanes=u,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}function SL(r,a,u,d,m){this.tag=a,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Yo(0),this.expirationTimes=Yo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yo(0),this.identifierPrefix=d,this.onRecoverableError=m,this.mutableSourceEagerHydrationData=null}function vp(r,a,u,d,m,w,D,Q,se){return r=new SL(r,a,u,Q,se),a===1?(a=1,w===!0&&(a|=8)):a=0,w=Cn(3,null,null,a),r.current=w,w.stateNode=r,w.memoizedState={element:d,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mf(w),r}function TL(r,a,u){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:d==null?null:""+d,children:r,containerInfo:a,implementation:u}}function m0(r){if(!r)return aa;r=r._reactInternals;e:{if(Dr(r)!==r||r.tag!==1)throw Error(t(170));var a=r;do{switch(a.tag){case 3:a=a.stateNode.context;break e;case 1:if(nn(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break e}}a=a.return}while(a!==null);throw Error(t(171))}if(r.tag===1){var u=r.type;if(nn(u))return zE(r,u,a)}return a}function y0(r,a,u,d,m,w,D,Q,se){return r=vp(u,d,!0,r,m,w,D,Q,se),r.context=m0(null),u=r.current,d=Xr(),m=fa(u),w=ki(d,m),w.callback=a??null,ua(u,w,m),r.current.lanes=m,Ri(r,m,d),sn(r,d),r}function oc(r,a,u,d){var m=a.current,w=Xr(),D=fa(m);return u=m0(u),a.context===null?a.context=u:a.pendingContext=u,a=ki(w,D),a.payload={element:r},d=d===void 0?null:d,d!==null&&(a.callback=d),r=ua(m,a,D),r!==null&&(Kn(r,m,D,w),ql(r,m,D)),D}function sc(r){return r=r.current,r.child?(r.child.tag===5,r.child.stateNode):null}function g0(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<a?u:a}}function _p(r,a){g0(r,a),(r=r.alternate)&&g0(r,a)}function AL(){return null}var v0=typeof reportError=="function"?reportError:function(r){console.error(r)};function Ep(r){this._internalRoot=r}uc.prototype.render=Ep.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(t(409));oc(r,a,null,null)},uc.prototype.unmount=Ep.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;za(function(){oc(null,r,null,null)}),a[Mi]=null}};function uc(r){this._internalRoot=r}uc.prototype.unstable_scheduleHydration=function(r){if(r){var a=Y();r={blockedOn:null,target:r,priority:a};for(var u=0;u<ze.length&&a!==0&&a<ze[u].priority;u++);ze.splice(u,0,r),u===0&&Sn(r)}};function bp(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function lc(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function _0(){}function OL(r,a,u,d,m){if(m){if(typeof d=="function"){var w=d;d=function(){var be=sc(D);w.call(be)}}var D=y0(a,d,r,0,null,!1,!1,"",_0);return r._reactRootContainer=D,r[Mi]=D.current,Qs(r.nodeType===8?r.parentNode:r),za(),D}for(;m=r.lastChild;)r.removeChild(m);if(typeof d=="function"){var Q=d;d=function(){var be=sc(se);Q.call(be)}}var se=vp(r,0,!1,null,null,!1,!1,"",_0);return r._reactRootContainer=se,r[Mi]=se.current,Qs(r.nodeType===8?r.parentNode:r),za(function(){oc(a,se,u,d)}),se}function cc(r,a,u,d,m){var w=u._reactRootContainer;if(w){var D=w;if(typeof m=="function"){var Q=m;m=function(){var se=sc(D);Q.call(se)}}oc(a,D,r,m)}else D=OL(u,a,r,m,d);return sc(D)}E=function(r){switch(r.tag){case 3:var a=r.stateNode;if(a.current.memoizedState.isDehydrated){var u=ft(a.pendingLanes);u!==0&&(Ta(a,u|1),sn(a,er()),(jt&6)===0&&(Rs=er()+500,oa()))}break;case 13:za(function(){var d=Di(r,1);if(d!==null){var m=Xr();Kn(d,r,1,m)}}),_p(r,1)}},P=function(r){if(r.tag===13){var a=Di(r,134217728);if(a!==null){var u=Xr();Kn(a,r,134217728,u)}_p(r,134217728)}},k=function(r){if(r.tag===13){var a=fa(r),u=Di(r,a);if(u!==null){var d=Xr();Kn(u,r,a,d)}_p(r,a)}},Y=function(){return Bt},$=function(r,a){var u=Bt;try{return Bt=r,a()}finally{Bt=u}},Ii=function(r,a,u){switch(a){case"input":if(Vt(r,u),a=u.name,u.type==="radio"&&a!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+a)+'][type="radio"]'),a=0;a<u.length;a++){var d=u[a];if(d!==r&&d.form===r.form){var m=Pl(d);if(!m)throw Error(t(90));de(d),Vt(d,m)}}}break;case"textarea":gn(r,u);break;case"select":a=u.value,a!=null&&Ft(r,!!u.multiple,a,!1)}},F=fp,Z=za;var PL={usingClientEntryPoint:!1,Events:[xs,ys,Pl,en,te,fp]},fu={findFiberByHostInstance:Da,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},IL={bundleType:fu.bundleType,version:fu.version,rendererPackageName:fu.rendererPackageName,rendererConfig:fu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:S.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Rr(r),r===null?null:r.stateNode},findFiberByHostInstance:fu.findFiberByHostInstance||AL,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 dc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dc.isDisabled&&dc.supportsFiber)try{Zi=dc.inject(IL),wn=dc}catch{}}return un.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=PL,un.createPortal=function(r,a){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bp(a))throw Error(t(200));return TL(r,a,null,u)},un.createRoot=function(r,a){if(!bp(r))throw Error(t(299));var u=!1,d="",m=v0;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onRecoverableError!==void 0&&(m=a.onRecoverableError)),a=vp(r,1,!1,null,null,u,!1,d,m),r[Mi]=a.current,Qs(r.nodeType===8?r.parentNode:r),new Ep(a)},un.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(t(188)):(r=Object.keys(r).join(","),Error(t(268,r)));return r=Rr(a),r=r===null?null:r.stateNode,r},un.flushSync=function(r){return za(r)},un.hydrate=function(r,a,u){if(!lc(a))throw Error(t(200));return cc(null,r,a,!0,u)},un.hydrateRoot=function(r,a,u){if(!bp(r))throw Error(t(405));var d=u!=null&&u.hydratedSources||null,m=!1,w="",D=v0;if(u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(w=u.identifierPrefix),u.onRecoverableError!==void 0&&(D=u.onRecoverableError)),a=y0(a,null,r,1,u??null,m,!1,w,D),r[Mi]=a.current,Qs(r),d)for(r=0;r<d.length;r++)u=d[r],m=u._getVersion,m=m(u._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[u,m]:a.mutableSourceEagerHydrationData.push(u,m);return new uc(a)},un.render=function(r,a,u){if(!lc(a))throw Error(t(200));return cc(null,r,a,!1,u)},un.unmountComponentAtNode=function(r){if(!lc(r))throw Error(t(40));return r._reactRootContainer?(za(function(){cc(null,null,r,!1,function(){r._reactRootContainer=null,r[Mi]=null})}),!0):!1},un.unstable_batchedUpdates=fp,un.unstable_renderSubtreeIntoContainer=function(r,a,u,d){if(!lc(u))throw Error(t(200));if(r==null||r._reactInternals===void 0)throw Error(t(38));return cc(r,a,u,!1,d)},un.version="18.3.1-next-f1338f8080-20240426",un}var P0;function vM(){if(P0)return Tp.exports;P0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(i){console.error(i)}}return e(),Tp.exports=BL(),Tp.exports}var I0;function UL(){if(I0)return fc;I0=1;var e=vM();return fc.createRoot=e.createRoot,fc.hydrateRoot=e.hydrateRoot,fc}var FL=UL();var R0="popstate";function VL(e={}){function i(n,o){let{pathname:s,search:l,hash:c}=n.location;return h_("",{pathname:s,search:l,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function t(n,o){return typeof o=="string"?o:il(o)}return zL(i,t,null,e)}function wr(e,i){if(e===!1||e===null||typeof e>"u")throw new Error(i)}function ai(e,i){if(!e){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function HL(){return Math.random().toString(36).substring(2,10)}function N0(e,i){return{usr:e.state,key:e.key,idx:i}}function h_(e,i,t=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof i=="string"?ll(i):i,state:t,key:i&&i.key||n||HL()}}function il({pathname:e="/",search:i="",hash:t=""}){return i&&i!=="?"&&(e+=i.charAt(0)==="?"?i:"?"+i),t&&t!=="#"&&(e+=t.charAt(0)==="#"?t:"#"+t),e}function ll(e){let i={};if(e){let t=e.indexOf("#");t>=0&&(i.hash=e.substring(t),e=e.substring(0,t));let n=e.indexOf("?");n>=0&&(i.search=e.substring(n),e=e.substring(0,n)),e&&(i.pathname=e)}return i}function zL(e,i,t,n={}){let{window:o=document.defaultView,v5Compat:s=!1}=n,l=o.history,c="POP",f=null,p=y();p==null&&(p=0,l.replaceState({...l.state,idx:p},""));function y(){return(l.state||{idx:null}).idx}function h(){c="POP";let O=y(),M=O==null?null:O-p;p=O,f&&f({action:c,location:R.location,delta:M})}function g(O,M){c="PUSH";let _=h_(R.location,O,M);p=y()+1;let I=N0(_,p),S=R.createHref(_);try{l.pushState(I,"",S)}catch(v){if(v instanceof DOMException&&v.name==="DataCloneError")throw v;o.location.assign(S)}s&&f&&f({action:c,location:R.location,delta:1})}function A(O,M){c="REPLACE";let _=h_(R.location,O,M);p=y();let I=N0(_,p),S=R.createHref(_);l.replaceState(I,"",S),s&&f&&f({action:c,location:R.location,delta:0})}function N(O){return GL(O)}let R={get action(){return c},get location(){return e(o,l)},listen(O){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(R0,h),f=O,()=>{o.removeEventListener(R0,h),f=null}},createHref(O){return i(o,O)},createURL:N,encodeLocation(O){let M=N(O);return{pathname:M.pathname,search:M.search,hash:M.hash}},push:g,replace:A,go(O){return l.go(O)}};return R}function GL(e,i=!1){let t="http://localhost";typeof window<"u"&&(t=window.location.origin!=="null"?window.location.origin:window.location.href),wr(t,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:il(e);return n=n.replace(/ $/,"%20"),!i&&n.startsWith("//")&&(n=t+n),new URL(n,t)}function _M(e,i,t="/"){return WL(e,i,t,!1)}function WL(e,i,t,n){let o=typeof i=="string"?ll(i):i,s=Ki(o.pathname||"/",t);if(s==null)return null;let l=EM(e);KL(l);let c=null;for(let f=0;c==null&&f<l.length;++f){let p=nD(s);c=tD(l[f],p,n)}return c}function EM(e,i=[],t=[],n="",o=!1){let s=(l,c,f=o,p)=>{let y={relativePath:p===void 0?l.path||"":p,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(n)&&f)return;wr(y.relativePath.startsWith(n),`Absolute route path "${y.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(n.length)}let h=Gi([n,y.relativePath]),g=t.concat(y);l.children&&l.children.length>0&&(wr(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),EM(l.children,i,g,h,f)),!(l.path==null&&!l.index)&&i.push({path:h,score:$L(h,l.index),routesMeta:g})};return e.forEach((l,c)=>{if(l.path===""||!l.path?.includes("?"))s(l,c);else for(let f of bM(l.path))s(l,c,!0,f)}),i}function bM(e){let i=e.split("/");if(i.length===0)return[];let[t,...n]=i,o=t.endsWith("?"),s=t.replace(/\?$/,"");if(n.length===0)return o?[s,""]:[s];let l=bM(n.join("/")),c=[];return c.push(...l.map(f=>f===""?s:[s,f].join("/"))),o&&c.push(...l),c.map(f=>e.startsWith("/")&&f===""?"/":f)}function KL(e){e.sort((i,t)=>i.score!==t.score?t.score-i.score:eD(i.routesMeta.map(n=>n.childrenIndex),t.routesMeta.map(n=>n.childrenIndex)))}var YL=/^:[\w-]+$/,XL=3,QL=2,JL=1,ZL=10,xL=-2,M0=e=>e==="*";function $L(e,i){let t=e.split("/"),n=t.length;return t.some(M0)&&(n+=xL),i&&(n+=QL),t.filter(o=>!M0(o)).reduce((o,s)=>o+(YL.test(s)?XL:s===""?JL:ZL),n)}function eD(e,i){return e.length===i.length&&e.slice(0,-1).every((n,o)=>n===i[o])?e[e.length-1]-i[i.length-1]:0}function tD(e,i,t=!1){let{routesMeta:n}=e,o={},s="/",l=[];for(let c=0;c<n.length;++c){let f=n[c],p=c===n.length-1,y=s==="/"?i:i.slice(s.length)||"/",h=Nd({path:f.relativePath,caseSensitive:f.caseSensitive,end:p},y),g=f.route;if(!h&&p&&t&&!n[n.length-1].route.index&&(h=Nd({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},y)),!h)return null;Object.assign(o,h.params),l.push({params:o,pathname:Gi([s,h.pathname]),pathnameBase:sD(Gi([s,h.pathnameBase])),route:g}),h.pathnameBase!=="/"&&(s=Gi([s,h.pathnameBase]))}return l}function Nd(e,i){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[t,n]=rD(e.path,e.caseSensitive,e.end),o=i.match(t);if(!o)return null;let s=o[0],l=s.replace(/(.)\/+$/,"$1"),c=o.slice(1);return{params:n.reduce((p,{paramName:y,isOptional:h},g)=>{if(y==="*"){let N=c[g]||"";l=s.slice(0,s.length-N.length).replace(/(.)\/+$/,"$1")}const A=c[g];return h&&!A?p[y]=void 0:p[y]=(A||"").replace(/%2F/g,"/"),p},{}),pathname:s,pathnameBase:l,pattern:e}}function rD(e,i=!1,t=!0){ai(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,c,f)=>(n.push({paramName:c,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,i?void 0:"i"),n]}function nD(e){try{return e.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return ai(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),e}}function Ki(e,i){if(i==="/")return e;if(!e.toLowerCase().startsWith(i.toLowerCase()))return null;let t=i.endsWith("/")?i.length-1:i.length,n=e.charAt(t);return n&&n!=="/"?null:e.slice(t)||"/"}var wM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,iD=e=>wM.test(e);function aD(e,i="/"){let{pathname:t,search:n="",hash:o=""}=typeof e=="string"?ll(e):e,s;if(t)if(iD(t))s=t;else{if(t.includes("//")){let l=t;t=t.replace(/\/\/+/g,"/"),ai(!1,`Pathnames cannot have embedded double slashes - normalizing ${l} -> ${t}`)}t.startsWith("/")?s=C0(t.substring(1),"/"):s=C0(t,i)}else s=i;return{pathname:s,search:uD(n),hash:lD(o)}}function C0(e,i){let t=i.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?t.length>1&&t.pop():o!=="."&&t.push(o)}),t.length>1?t.join("/"):"/"}function Pp(e,i,t,n){return`Cannot include a '${e}' character in a manually specified \`to.${i}\` field [${JSON.stringify(n)}]. 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 oD(e){return e.filter((i,t)=>t===0||i.route.path&&i.route.path.length>0)}function SM(e){let i=oD(e);return i.map((t,n)=>n===i.length-1?t.pathname:t.pathnameBase)}function TM(e,i,t,n=!1){let o;typeof e=="string"?o=ll(e):(o={...e},wr(!o.pathname||!o.pathname.includes("?"),Pp("?","pathname","search",o)),wr(!o.pathname||!o.pathname.includes("#"),Pp("#","pathname","hash",o)),wr(!o.search||!o.search.includes("#"),Pp("#","search","hash",o)));let s=e===""||o.pathname==="",l=s?"/":o.pathname,c;if(l==null)c=t;else{let h=i.length-1;if(!n&&l.startsWith("..")){let g=l.split("/");for(;g[0]==="..";)g.shift(),h-=1;o.pathname=g.join("/")}c=h>=0?i[h]:"/"}let f=aD(o,c),p=l&&l!=="/"&&l.endsWith("/"),y=(s||l===".")&&t.endsWith("/");return!f.pathname.endsWith("/")&&(p||y)&&(f.pathname+="/"),f}var Gi=e=>e.join("/").replace(/\/\/+/g,"/"),sD=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),uD=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,lD=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,cD=class{constructor(e,i,t,n=!1){this.status=e,this.statusText=i||"",this.internal=n,t instanceof Error?(this.data=t.toString(),this.error=t):this.data=t}};function dD(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function fD(e){return e.map(i=>i.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var AM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function OM(e,i){let t=e;if(typeof t!="string"||!wM.test(t))return{absoluteURL:void 0,isExternal:!1,to:t};let n=t,o=!1;if(AM)try{let s=new URL(window.location.href),l=t.startsWith("//")?new URL(s.protocol+t):new URL(t),c=Ki(l.pathname,i);l.origin===s.origin&&c!=null?t=c+l.search+l.hash:o=!0}catch{ai(!1,`<Link to="${t}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:o,to:t}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var PM=["POST","PUT","PATCH","DELETE"];new Set(PM);var pD=["GET",...PM];new Set(pD);var Bs=re.createContext(null);Bs.displayName="DataRouter";var qd=re.createContext(null);qd.displayName="DataRouterState";var hD=re.createContext(!1),IM=re.createContext({isTransitioning:!1});IM.displayName="ViewTransition";var mD=re.createContext(new Map);mD.displayName="Fetchers";var yD=re.createContext(null);yD.displayName="Await";var Ln=re.createContext(null);Ln.displayName="Navigation";var Bd=re.createContext(null);Bd.displayName="Location";var Yi=re.createContext({outlet:null,matches:[],isDataRoute:!1});Yi.displayName="Route";var T_=re.createContext(null);T_.displayName="RouteError";var RM="REACT_ROUTER_ERROR",gD="REDIRECT",vD="ROUTE_ERROR_RESPONSE";function _D(e){if(e.startsWith(`${RM}:${gD}:{`))try{let i=JSON.parse(e.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function ED(e){if(e.startsWith(`${RM}:${vD}:{`))try{let i=JSON.parse(e.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new cD(i.status,i.statusText,i.data)}catch{}}function bD(e,{relative:i}={}){wr(cl(),"useHref() may be used only in the context of a <Router> component.");let{basename:t,navigator:n}=re.useContext(Ln),{hash:o,pathname:s,search:l}=dl(e,{relative:i}),c=s;return t!=="/"&&(c=s==="/"?t:Gi([t,s])),n.createHref({pathname:c,search:l,hash:o})}function cl(){return re.useContext(Bd)!=null}function _a(){return wr(cl(),"useLocation() may be used only in the context of a <Router> component."),re.useContext(Bd).location}var NM="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function MM(e){re.useContext(Ln).static||re.useLayoutEffect(e)}function wD(){let{isDataRoute:e}=re.useContext(Yi);return e?DD():SD()}function SD(){wr(cl(),"useNavigate() may be used only in the context of a <Router> component.");let e=re.useContext(Bs),{basename:i,navigator:t}=re.useContext(Ln),{matches:n}=re.useContext(Yi),{pathname:o}=_a(),s=JSON.stringify(SM(n)),l=re.useRef(!1);return MM(()=>{l.current=!0}),re.useCallback((f,p={})=>{if(ai(l.current,NM),!l.current)return;if(typeof f=="number"){t.go(f);return}let y=TM(f,JSON.parse(s),o,p.relative==="path");e==null&&i!=="/"&&(y.pathname=y.pathname==="/"?i:Gi([i,y.pathname])),(p.replace?t.replace:t.push)(y,p.state,p)},[i,t,s,o,e])}re.createContext(null);function dl(e,{relative:i}={}){let{matches:t}=re.useContext(Yi),{pathname:n}=_a(),o=JSON.stringify(SM(t));return re.useMemo(()=>TM(e,JSON.parse(o),n,i==="path"),[e,o,n,i])}function TD(e,i,t,n,o){wr(cl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=re.useContext(Ln),{matches:l}=re.useContext(Yi),c=l[l.length-1],f=c?c.params:{},p=c?c.pathname:"/",y=c?c.pathnameBase:"/",h=c&&c.route;{let _=h&&h.path||"";jM(p,!h||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${_}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
-
11
- Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let g=_a(),A;A=g;let N=A.pathname||"/",R=N;if(y!=="/"){let _=y.replace(/^\//,"").split("/");R="/"+N.replace(/^\//,"").split("/").slice(_.length).join("/")}let O=_M(e,{pathname:R});return ai(h||O!=null,`No routes matched location "${A.pathname}${A.search}${A.hash}" `),ai(O==null||O[O.length-1].route.element!==void 0||O[O.length-1].route.Component!==void 0||O[O.length-1].route.lazy!==void 0,`Matched leaf route at location "${A.pathname}${A.search}${A.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),RD(O&&O.map(_=>Object.assign({},_,{params:Object.assign({},f,_.params),pathname:Gi([y,s.encodeLocation?s.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?y:Gi([y,s.encodeLocation?s.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),l,t,n,o)}function AD(){let e=LD(),i=dD(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),t=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},s={padding:"2px 4px",backgroundColor:n},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=re.createElement(re.Fragment,null,re.createElement("p",null,"💿 Hey developer 👋"),re.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",re.createElement("code",{style:s},"ErrorBoundary")," or"," ",re.createElement("code",{style:s},"errorElement")," prop on your route.")),re.createElement(re.Fragment,null,re.createElement("h2",null,"Unexpected Application Error!"),re.createElement("h3",{style:{fontStyle:"italic"}},i),t?re.createElement("pre",{style:o},t):null,l)}var OD=re.createElement(AD,null),CM=class extends re.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,i){return i.location!==e.location||i.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:i.error,location:i.location,revalidation:e.revalidation||i.revalidation}}componentDidCatch(e,i){this.props.onError?this.props.onError(e,i):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const t=ED(e.digest);t&&(e=t)}let i=e!==void 0?re.createElement(Yi.Provider,{value:this.props.routeContext},re.createElement(T_.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?re.createElement(PD,{error:e},i):i}};CM.contextType=hD;var Ip=new WeakMap;function PD({children:e,error:i}){let{basename:t}=re.useContext(Ln);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let n=_D(i.digest);if(n){let o=Ip.get(i);if(o)throw o;let s=OM(n.location,t);if(AM&&!Ip.get(i))if(s.isExternal||n.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:n.replace}));throw Ip.set(i,l),l}return re.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return e}function ID({routeContext:e,match:i,children:t}){let n=re.useContext(Bs);return n&&n.static&&n.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=i.route.id),re.createElement(Yi.Provider,{value:e},t)}function RD(e,i=[],t=null,n=null,o=null){if(e==null){if(!t)return null;if(t.errors)e=t.matches;else if(i.length===0&&!t.initialized&&t.matches.length>0)e=t.matches;else return null}let s=e,l=t?.errors;if(l!=null){let y=s.findIndex(h=>h.route.id&&l?.[h.route.id]!==void 0);wr(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),s=s.slice(0,Math.min(s.length,y+1))}let c=!1,f=-1;if(t)for(let y=0;y<s.length;y++){let h=s[y];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(f=y),h.route.id){let{loaderData:g,errors:A}=t,N=h.route.loader&&!g.hasOwnProperty(h.route.id)&&(!A||A[h.route.id]===void 0);if(h.route.lazy||N){c=!0,f>=0?s=s.slice(0,f+1):s=[s[0]];break}}}let p=t&&n?(y,h)=>{n(y,{location:t.location,params:t.matches?.[0]?.params??{},unstable_pattern:fD(t.matches),errorInfo:h})}:void 0;return s.reduceRight((y,h,g)=>{let A,N=!1,R=null,O=null;t&&(A=l&&h.route.id?l[h.route.id]:void 0,R=h.route.errorElement||OD,c&&(f<0&&g===0?(jM("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,O=null):f===g&&(N=!0,O=h.route.hydrateFallbackElement||null)));let M=i.concat(s.slice(0,g+1)),_=()=>{let I;return A?I=R:N?I=O:h.route.Component?I=re.createElement(h.route.Component,null):h.route.element?I=h.route.element:I=y,re.createElement(ID,{match:h,routeContext:{outlet:y,matches:M,isDataRoute:t!=null},children:I})};return t&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?re.createElement(CM,{location:t.location,revalidation:t.revalidation,component:R,error:A,children:_(),routeContext:{outlet:null,matches:M,isDataRoute:!0},onError:p}):_()},null)}function A_(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ND(e){let i=re.useContext(Bs);return wr(i,A_(e)),i}function MD(e){let i=re.useContext(qd);return wr(i,A_(e)),i}function CD(e){let i=re.useContext(Yi);return wr(i,A_(e)),i}function O_(e){let i=CD(e),t=i.matches[i.matches.length-1];return wr(t.route.id,`${e} can only be used on routes that contain a unique "id"`),t.route.id}function jD(){return O_("useRouteId")}function LD(){let e=re.useContext(T_),i=MD("useRouteError"),t=O_("useRouteError");return e!==void 0?e:i.errors?.[t]}function DD(){let{router:e}=ND("useNavigate"),i=O_("useNavigate"),t=re.useRef(!1);return MM(()=>{t.current=!0}),re.useCallback(async(o,s={})=>{ai(t.current,NM),t.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:i,...s}))},[e,i])}var j0={};function jM(e,i,t){!i&&!j0[e]&&(j0[e]=!0,ai(!1,t))}re.memo(kD);function kD({routes:e,future:i,state:t,onError:n}){return TD(e,void 0,t,n,i)}function qD({basename:e="/",children:i=null,location:t,navigationType:n="POP",navigator:o,static:s=!1,unstable_useTransitions:l}){wr(!cl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),f=re.useMemo(()=>({basename:c,navigator:o,static:s,unstable_useTransitions:l,future:{}}),[c,o,s,l]);typeof t=="string"&&(t=ll(t));let{pathname:p="/",search:y="",hash:h="",state:g=null,key:A="default"}=t,N=re.useMemo(()=>{let R=Ki(p,c);return R==null?null:{location:{pathname:R,search:y,hash:h,state:g,key:A},navigationType:n}},[c,p,y,h,g,A,n]);return ai(N!=null,`<Router basename="${c}"> is not able to match the URL "${p}${y}${h}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:re.createElement(Ln.Provider,{value:f},re.createElement(Bd.Provider,{children:i,value:N}))}var Od="get",Pd="application/x-www-form-urlencoded";function Ud(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function BD(e){return Ud(e)&&e.tagName.toLowerCase()==="button"}function UD(e){return Ud(e)&&e.tagName.toLowerCase()==="form"}function FD(e){return Ud(e)&&e.tagName.toLowerCase()==="input"}function VD(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function HD(e,i){return e.button===0&&(!i||i==="_self")&&!VD(e)}var pc=null;function zD(){if(pc===null)try{new FormData(document.createElement("form"),0),pc=!1}catch{pc=!0}return pc}var GD=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Rp(e){return e!=null&&!GD.has(e)?(ai(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Pd}"`),null):e}function WD(e,i){let t,n,o,s,l;if(UD(e)){let c=e.getAttribute("action");n=c?Ki(c,i):null,t=e.getAttribute("method")||Od,o=Rp(e.getAttribute("enctype"))||Pd,s=new FormData(e)}else if(BD(e)||FD(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||c.getAttribute("action");if(n=f?Ki(f,i):null,t=e.getAttribute("formmethod")||c.getAttribute("method")||Od,o=Rp(e.getAttribute("formenctype"))||Rp(c.getAttribute("enctype"))||Pd,s=new FormData(c,e),!zD()){let{name:p,type:y,value:h}=e;if(y==="image"){let g=p?`${p}.`:"";s.append(`${g}x`,"0"),s.append(`${g}y`,"0")}else p&&s.append(p,h)}}else{if(Ud(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=Od,n=null,o=Pd,l=e}return s&&o==="text/plain"&&(l=s,s=void 0),{action:n,method:t.toLowerCase(),encType:o,formData:s,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function P_(e,i){if(e===!1||e===null||typeof e>"u")throw new Error(i)}function KD(e,i,t){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname=`_root.${t}`:i&&Ki(n.pathname,i)==="/"?n.pathname=`${i.replace(/\/$/,"")}/_root.${t}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${t}`,n}async function YD(e,i){if(e.id in i)return i[e.id];try{let t=await import(e.module);return i[e.id]=t,t}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function XD(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function QD(e,i,t){let n=await Promise.all(e.map(async o=>{let s=i.routes[o.route.id];if(s){let l=await YD(s,t);return l.links?l.links():[]}return[]}));return $D(n.flat(1).filter(XD).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function L0(e,i,t,n,o,s){let l=(f,p)=>t[p]?f.route.id!==t[p].route.id:!0,c=(f,p)=>t[p].pathname!==f.pathname||t[p].route.path?.endsWith("*")&&t[p].params["*"]!==f.params["*"];return s==="assets"?i.filter((f,p)=>l(f,p)||c(f,p)):s==="data"?i.filter((f,p)=>{let y=n.routes[f.route.id];if(!y||!y.hasLoader)return!1;if(l(f,p)||c(f,p))return!0;if(f.route.shouldRevalidate){let h=f.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:t[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function JD(e,i,{includeHydrateFallback:t}={}){return ZD(e.map(n=>{let o=i.routes[n.route.id];if(!o)return[];let s=[o.module];return o.clientActionModule&&(s=s.concat(o.clientActionModule)),o.clientLoaderModule&&(s=s.concat(o.clientLoaderModule)),t&&o.hydrateFallbackModule&&(s=s.concat(o.hydrateFallbackModule)),o.imports&&(s=s.concat(o.imports)),s}).flat(1))}function ZD(e){return[...new Set(e)]}function xD(e){let i={},t=Object.keys(e).sort();for(let n of t)i[n]=e[n];return i}function $D(e,i){let t=new Set;return new Set(i),e.reduce((n,o)=>{let s=JSON.stringify(xD(o));return t.has(s)||(t.add(s),n.push({key:s,link:o})),n},[])}function LM(){let e=re.useContext(Bs);return P_(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function ek(){let e=re.useContext(qd);return P_(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var I_=re.createContext(void 0);I_.displayName="FrameworkContext";function DM(){let e=re.useContext(I_);return P_(e,"You must render this element inside a <HydratedRouter> element"),e}function tk(e,i){let t=re.useContext(I_),[n,o]=re.useState(!1),[s,l]=re.useState(!1),{onFocus:c,onBlur:f,onMouseEnter:p,onMouseLeave:y,onTouchStart:h}=i,g=re.useRef(null);re.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let R=M=>{M.forEach(_=>{l(_.isIntersecting)})},O=new IntersectionObserver(R,{threshold:.5});return g.current&&O.observe(g.current),()=>{O.disconnect()}}},[e]),re.useEffect(()=>{if(n){let R=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(R)}}},[n]);let A=()=>{o(!0)},N=()=>{o(!1),l(!1)};return t?e!=="intent"?[s,g,{}]:[s,g,{onFocus:hu(c,A),onBlur:hu(f,N),onMouseEnter:hu(p,A),onMouseLeave:hu(y,N),onTouchStart:hu(h,A)}]:[!1,g,{}]}function hu(e,i){return t=>{e&&e(t),t.defaultPrevented||i(t)}}function rk({page:e,...i}){let{router:t}=LM(),n=re.useMemo(()=>_M(t.routes,e,t.basename),[t.routes,e,t.basename]);return n?re.createElement(ik,{page:e,matches:n,...i}):null}function nk(e){let{manifest:i,routeModules:t}=DM(),[n,o]=re.useState([]);return re.useEffect(()=>{let s=!1;return QD(e,i,t).then(l=>{s||o(l)}),()=>{s=!0}},[e,i,t]),n}function ik({page:e,matches:i,...t}){let n=_a(),{manifest:o,routeModules:s}=DM(),{basename:l}=LM(),{loaderData:c,matches:f}=ek(),p=re.useMemo(()=>L0(e,i,f,o,n,"data"),[e,i,f,o,n]),y=re.useMemo(()=>L0(e,i,f,o,n,"assets"),[e,i,f,o,n]),h=re.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let N=new Set,R=!1;if(i.forEach(M=>{let _=o.routes[M.route.id];!_||!_.hasLoader||(!p.some(I=>I.route.id===M.route.id)&&M.route.id in c&&s[M.route.id]?.shouldRevalidate||_.hasClientLoader?R=!0:N.add(M.route.id))}),N.size===0)return[];let O=KD(e,l,"data");return R&&N.size>0&&O.searchParams.set("_routes",i.filter(M=>N.has(M.route.id)).map(M=>M.route.id).join(",")),[O.pathname+O.search]},[l,c,n,o,p,i,e,s]),g=re.useMemo(()=>JD(y,o),[y,o]),A=nk(y);return re.createElement(re.Fragment,null,h.map(N=>re.createElement("link",{key:N,rel:"prefetch",as:"fetch",href:N,...t})),g.map(N=>re.createElement("link",{key:N,rel:"modulepreload",href:N,...t})),A.map(({key:N,link:R})=>re.createElement("link",{key:N,nonce:t.nonce,...R})))}function ak(...e){return i=>{e.forEach(t=>{typeof t=="function"?t(i):t!=null&&(t.current=i)})}}var ok=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{ok&&(window.__reactRouterVersion="7.11.0")}catch{}function sk({basename:e,children:i,unstable_useTransitions:t,window:n}){let o=re.useRef();o.current==null&&(o.current=VL({window:n,v5Compat:!0}));let s=o.current,[l,c]=re.useState({action:s.action,location:s.location}),f=re.useCallback(p=>{t===!1?c(p):re.startTransition(()=>c(p))},[t]);return re.useLayoutEffect(()=>s.listen(f),[s,f]),re.createElement(qD,{basename:e,children:i,location:l.location,navigationType:l.action,navigator:s,unstable_useTransitions:t})}var kM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,qM=re.forwardRef(function({onClick:i,discover:t="render",prefetch:n="none",relative:o,reloadDocument:s,replace:l,state:c,target:f,to:p,preventScrollReset:y,viewTransition:h,unstable_defaultShouldRevalidate:g,...A},N){let{basename:R,unstable_useTransitions:O}=re.useContext(Ln),M=typeof p=="string"&&kM.test(p),_=OM(p,R);p=_.to;let I=bD(p,{relative:o}),[S,v,T]=tk(n,A),j=dk(p,{replace:l,state:c,target:f,preventScrollReset:y,relative:o,viewTransition:h,unstable_defaultShouldRevalidate:g,unstable_useTransitions:O});function V(X){i&&i(X),X.defaultPrevented||j(X)}let W=re.createElement("a",{...A,...T,href:_.absoluteURL||I,onClick:_.isExternal||s?i:V,ref:ak(N,v),target:f,"data-discover":!M&&t==="render"?"true":void 0});return S&&!M?re.createElement(re.Fragment,null,W,re.createElement(rk,{page:I})):W});qM.displayName="Link";var uk=re.forwardRef(function({"aria-current":i="page",caseSensitive:t=!1,className:n="",end:o=!1,style:s,to:l,viewTransition:c,children:f,...p},y){let h=dl(l,{relative:p.relative}),g=_a(),A=re.useContext(qd),{navigator:N,basename:R}=re.useContext(Ln),O=A!=null&&yk(h)&&c===!0,M=N.encodeLocation?N.encodeLocation(h).pathname:h.pathname,_=g.pathname,I=A&&A.navigation&&A.navigation.location?A.navigation.location.pathname:null;t||(_=_.toLowerCase(),I=I?I.toLowerCase():null,M=M.toLowerCase()),I&&R&&(I=Ki(I,R)||I);const S=M!=="/"&&M.endsWith("/")?M.length-1:M.length;let v=_===M||!o&&_.startsWith(M)&&_.charAt(S)==="/",T=I!=null&&(I===M||!o&&I.startsWith(M)&&I.charAt(M.length)==="/"),j={isActive:v,isPending:T,isTransitioning:O},V=v?i:void 0,W;typeof n=="function"?W=n(j):W=[n,v?"active":null,T?"pending":null,O?"transitioning":null].filter(Boolean).join(" ");let X=typeof s=="function"?s(j):s;return re.createElement(qM,{...p,"aria-current":V,className:W,ref:y,style:X,to:l,viewTransition:c},typeof f=="function"?f(j):f)});uk.displayName="NavLink";var lk=re.forwardRef(({discover:e="render",fetcherKey:i,navigate:t,reloadDocument:n,replace:o,state:s,method:l=Od,action:c,onSubmit:f,relative:p,preventScrollReset:y,viewTransition:h,unstable_defaultShouldRevalidate:g,...A},N)=>{let{unstable_useTransitions:R}=re.useContext(Ln),O=hk(),M=mk(c,{relative:p}),_=l.toLowerCase()==="get"?"get":"post",I=typeof c=="string"&&kM.test(c),S=v=>{if(f&&f(v),v.defaultPrevented)return;v.preventDefault();let T=v.nativeEvent.submitter,j=T?.getAttribute("formmethod")||l,V=()=>O(T||v.currentTarget,{fetcherKey:i,method:j,navigate:t,replace:o,state:s,relative:p,preventScrollReset:y,viewTransition:h,unstable_defaultShouldRevalidate:g});R&&t!==!1?re.startTransition(()=>V()):V()};return re.createElement("form",{ref:N,method:_,action:M,onSubmit:n?f:S,...A,"data-discover":!I&&e==="render"?"true":void 0})});lk.displayName="Form";function ck(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function BM(e){let i=re.useContext(Bs);return wr(i,ck(e)),i}function dk(e,{target:i,replace:t,state:n,preventScrollReset:o,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:c,unstable_useTransitions:f}={}){let p=wD(),y=_a(),h=dl(e,{relative:s});return re.useCallback(g=>{if(HD(g,i)){g.preventDefault();let A=t!==void 0?t:il(y)===il(h),N=()=>p(e,{replace:A,state:n,preventScrollReset:o,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:c});f?re.startTransition(()=>N()):N()}},[y,p,h,t,n,i,e,o,s,l,c,f])}var fk=0,pk=()=>`__${String(++fk)}__`;function hk(){let{router:e}=BM("useSubmit"),{basename:i}=re.useContext(Ln),t=jD(),n=e.fetch,o=e.navigate;return re.useCallback(async(s,l={})=>{let{action:c,method:f,encType:p,formData:y,body:h}=WD(s,i);if(l.navigate===!1){let g=l.fetcherKey||pk();await n(g,t,l.action||c,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:y,body:h,formMethod:l.method||f,formEncType:l.encType||p,flushSync:l.flushSync})}else await o(l.action||c,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:y,body:h,formMethod:l.method||f,formEncType:l.encType||p,replace:l.replace,state:l.state,fromRouteId:t,flushSync:l.flushSync,viewTransition:l.viewTransition})},[n,o,i,t])}function mk(e,{relative:i}={}){let{basename:t}=re.useContext(Ln),n=re.useContext(Yi);wr(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),s={...dl(e||".",{relative:i})},l=_a();if(e==null){s.search=l.search;let c=new URLSearchParams(s.search),f=c.getAll("index");if(f.some(y=>y==="")){c.delete("index"),f.filter(h=>h).forEach(h=>c.append("index",h));let y=c.toString();s.search=y?`?${y}`:""}}return(!e||e===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(s.pathname=s.pathname==="/"?t:Gi([t,s.pathname])),il(s)}function yk(e,{relative:i}={}){let t=re.useContext(IM);wr(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=BM("useViewTransitionState"),o=dl(e,{relative:i});if(!t.isTransitioning)return!1;let s=Ki(t.currentLocation.pathname,n)||t.currentLocation.pathname,l=Ki(t.nextLocation.pathname,n)||t.nextLocation.pathname;return Nd(o.pathname,l)!=null||Nd(o.pathname,s)!=null}var UM=vM(),Yn={},Ya={},Xa={},Np={},Xn={},hc={exports:{}},Mp={},Ui={},Qa={},Cp={},jp={},Lp={},D0;function al(){return D0||(D0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class i{}e._CodeOrName=i,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class t extends i{constructor(_){if(super(),!e.IDENTIFIER.test(_))throw new Error("CodeGen: name must be a valid identifier");this.str=_}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=t;class n extends i{constructor(_){super(),this._items=typeof _=="string"?[_]:_}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const _=this._items[0];return _===""||_==='""'}get str(){var _;return(_=this._str)!==null&&_!==void 0?_:this._str=this._items.reduce((I,S)=>`${I}${S}`,"")}get names(){var _;return(_=this._names)!==null&&_!==void 0?_:this._names=this._items.reduce((I,S)=>(S instanceof t&&(I[S.str]=(I[S.str]||0)+1),I),{})}}e._Code=n,e.nil=new n("");function o(M,..._){const I=[M[0]];let S=0;for(;S<_.length;)c(I,_[S]),I.push(M[++S]);return new n(I)}e._=o;const s=new n("+");function l(M,..._){const I=[A(M[0])];let S=0;for(;S<_.length;)I.push(s),c(I,_[S]),I.push(s,A(M[++S]));return f(I),new n(I)}e.str=l;function c(M,_){_ instanceof n?M.push(..._._items):_ instanceof t?M.push(_):M.push(h(_))}e.addCodeArg=c;function f(M){let _=1;for(;_<M.length-1;){if(M[_]===s){const I=p(M[_-1],M[_+1]);if(I!==void 0){M.splice(_-1,3,I);continue}M[_++]="+"}_++}}function p(M,_){if(_==='""')return M;if(M==='""')return _;if(typeof M=="string")return _ instanceof t||M[M.length-1]!=='"'?void 0:typeof _!="string"?`${M.slice(0,-1)}${_}"`:_[0]==='"'?M.slice(0,-1)+_.slice(1):void 0;if(typeof _=="string"&&_[0]==='"'&&!(M instanceof t))return`"${M}${_.slice(1)}`}function y(M,_){return _.emptyStr()?M:M.emptyStr()?_:l`${M}${_}`}e.strConcat=y;function h(M){return typeof M=="number"||typeof M=="boolean"||M===null?M:A(Array.isArray(M)?M.join(","):M)}function g(M){return new n(A(M))}e.stringify=g;function A(M){return JSON.stringify(M).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=A;function N(M){return typeof M=="string"&&e.IDENTIFIER.test(M)?new n(`.${M}`):o`[${M}]`}e.getProperty=N;function R(M){if(typeof M=="string"&&e.IDENTIFIER.test(M))return new n(`${M}`);throw new Error(`CodeGen: invalid export name: ${M}, use explicit $id name mapping`)}e.getEsmExportName=R;function O(M){return new n(M.toString())}e.regexpCode=O})(Lp)),Lp}var Dp={},k0;function q0(){return k0||(k0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const i=al();class t extends Error{constructor(p){super(`CodeGen: "code" for ${p} not defined`),this.value=p.value}}var n;(function(f){f[f.Started=0]="Started",f[f.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new i.Name("const"),let:new i.Name("let"),var:new i.Name("var")};class o{constructor({prefixes:p,parent:y}={}){this._names={},this._prefixes=p,this._parent=y}toName(p){return p instanceof i.Name?p:this.name(p)}name(p){return new i.Name(this._newName(p))}_newName(p){const y=this._names[p]||this._nameGroup(p);return`${p}${y.index++}`}_nameGroup(p){var y,h;if(!((h=(y=this._parent)===null||y===void 0?void 0:y._prefixes)===null||h===void 0)&&h.has(p)||this._prefixes&&!this._prefixes.has(p))throw new Error(`CodeGen: prefix "${p}" is not allowed in this scope`);return this._names[p]={prefix:p,index:0}}}e.Scope=o;class s extends i.Name{constructor(p,y){super(y),this.prefix=p}setValue(p,{property:y,itemIndex:h}){this.value=p,this.scopePath=(0,i._)`.${new i.Name(y)}[${h}]`}}e.ValueScopeName=s;const l=(0,i._)`\n`;class c extends o{constructor(p){super(p),this._values={},this._scope=p.scope,this.opts={...p,_n:p.lines?l:i.nil}}get(){return this._scope}name(p){return new s(p,this._newName(p))}value(p,y){var h;if(y.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const g=this.toName(p),{prefix:A}=g,N=(h=y.key)!==null&&h!==void 0?h:y.ref;let R=this._values[A];if(R){const _=R.get(N);if(_)return _}else R=this._values[A]=new Map;R.set(N,g);const O=this._scope[A]||(this._scope[A]=[]),M=O.length;return O[M]=y.ref,g.setValue(y,{property:A,itemIndex:M}),g}getValue(p,y){const h=this._values[p];if(h)return h.get(y)}scopeRefs(p,y=this._values){return this._reduceValues(y,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,i._)`${p}${h.scopePath}`})}scopeCode(p=this._values,y,h){return this._reduceValues(p,g=>{if(g.value===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return g.value.code},y,h)}_reduceValues(p,y,h={},g){let A=i.nil;for(const N in p){const R=p[N];if(!R)continue;const O=h[N]=h[N]||new Map;R.forEach(M=>{if(O.has(M))return;O.set(M,n.Started);let _=y(M);if(_){const I=this.opts.es5?e.varKinds.var:e.varKinds.const;A=(0,i._)`${A}${I} ${M} = ${_};${this.opts._n}`}else if(_=g?.(M))A=(0,i._)`${A}${_}${this.opts._n}`;else throw new t(M);O.set(M,n.Completed)})}return A}}e.ValueScope=c})(Dp)),Dp}var B0;function Et(){return B0||(B0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const i=al(),t=q0();var n=al();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var o=q0();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new i._Code(">"),GTE:new i._Code(">="),LT:new i._Code("<"),LTE:new i._Code("<="),EQ:new i._Code("==="),NEQ:new i._Code("!=="),NOT:new i._Code("!"),OR:new i._Code("||"),AND:new i._Code("&&"),ADD:new i._Code("+")};class s{optimizeNodes(){return this}optimizeNames(L,U){return this}}class l extends s{constructor(L,U,ae){super(),this.varKind=L,this.name=U,this.rhs=ae}render({es5:L,_n:U}){const ae=L?t.varKinds.var:this.varKind,Ie=this.rhs===void 0?"":` = ${this.rhs}`;return`${ae} ${this.name}${Ie};`+U}optimizeNames(L,U){if(L[this.name.str])return this.rhs&&(this.rhs=Ee(this.rhs,L,U)),this}get names(){return this.rhs instanceof i._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(L,U,ae){super(),this.lhs=L,this.rhs=U,this.sideEffects=ae}render({_n:L}){return`${this.lhs} = ${this.rhs};`+L}optimizeNames(L,U){if(!(this.lhs instanceof i.Name&&!L[this.lhs.str]&&!this.sideEffects))return this.rhs=Ee(this.rhs,L,U),this}get names(){const L=this.lhs instanceof i.Name?{}:{...this.lhs.names};return Se(L,this.rhs)}}class f extends c{constructor(L,U,ae,Ie){super(L,ae,Ie),this.op=U}render({_n:L}){return`${this.lhs} ${this.op}= ${this.rhs};`+L}}class p extends s{constructor(L){super(),this.label=L,this.names={}}render({_n:L}){return`${this.label}:`+L}}class y extends s{constructor(L){super(),this.label=L,this.names={}}render({_n:L}){return`break${this.label?` ${this.label}`:""};`+L}}class h extends s{constructor(L){super(),this.error=L}render({_n:L}){return`throw ${this.error};`+L}get names(){return this.error.names}}class g extends s{constructor(L){super(),this.code=L}render({_n:L}){return`${this.code};`+L}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(L,U){return this.code=Ee(this.code,L,U),this}get names(){return this.code instanceof i._CodeOrName?this.code.names:{}}}class A extends s{constructor(L=[]){super(),this.nodes=L}render(L){return this.nodes.reduce((U,ae)=>U+ae.render(L),"")}optimizeNodes(){const{nodes:L}=this;let U=L.length;for(;U--;){const ae=L[U].optimizeNodes();Array.isArray(ae)?L.splice(U,1,...ae):ae?L[U]=ae:L.splice(U,1)}return L.length>0?this:void 0}optimizeNames(L,U){const{nodes:ae}=this;let Ie=ae.length;for(;Ie--;){const Te=ae[Ie];Te.optimizeNames(L,U)||(je(L,Te.names),ae.splice(Ie,1))}return ae.length>0?this:void 0}get names(){return this.nodes.reduce((L,U)=>Ae(L,U.names),{})}}class N extends A{render(L){return"{"+L._n+super.render(L)+"}"+L._n}}class R extends A{}class O extends N{}O.kind="else";class M extends N{constructor(L,U){super(U),this.condition=L}render(L){let U=`if(${this.condition})`+super.render(L);return this.else&&(U+="else "+this.else.render(L)),U}optimizeNodes(){super.optimizeNodes();const L=this.condition;if(L===!0)return this.nodes;let U=this.else;if(U){const ae=U.optimizeNodes();U=this.else=Array.isArray(ae)?new O(ae):ae}if(U)return L===!1?U instanceof M?U:U.nodes:this.nodes.length?this:new M(Ce(L),U instanceof M?[U]:U.nodes);if(!(L===!1||!this.nodes.length))return this}optimizeNames(L,U){var ae;if(this.else=(ae=this.else)===null||ae===void 0?void 0:ae.optimizeNames(L,U),!!(super.optimizeNames(L,U)||this.else))return this.condition=Ee(this.condition,L,U),this}get names(){const L=super.names;return Se(L,this.condition),this.else&&Ae(L,this.else.names),L}}M.kind="if";class _ extends N{}_.kind="for";class I extends _{constructor(L){super(),this.iteration=L}render(L){return`for(${this.iteration})`+super.render(L)}optimizeNames(L,U){if(super.optimizeNames(L,U))return this.iteration=Ee(this.iteration,L,U),this}get names(){return Ae(super.names,this.iteration.names)}}class S extends _{constructor(L,U,ae,Ie){super(),this.varKind=L,this.name=U,this.from=ae,this.to=Ie}render(L){const U=L.es5?t.varKinds.var:this.varKind,{name:ae,from:Ie,to:Te}=this;return`for(${U} ${ae}=${Ie}; ${ae}<${Te}; ${ae}++)`+super.render(L)}get names(){const L=Se(super.names,this.from);return Se(L,this.to)}}class v extends _{constructor(L,U,ae,Ie){super(),this.loop=L,this.varKind=U,this.name=ae,this.iterable=Ie}render(L){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(L)}optimizeNames(L,U){if(super.optimizeNames(L,U))return this.iterable=Ee(this.iterable,L,U),this}get names(){return Ae(super.names,this.iterable.names)}}class T extends N{constructor(L,U,ae){super(),this.name=L,this.args=U,this.async=ae}render(L){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(L)}}T.kind="func";class j extends A{render(L){return"return "+super.render(L)}}j.kind="return";class V extends N{render(L){let U="try"+super.render(L);return this.catch&&(U+=this.catch.render(L)),this.finally&&(U+=this.finally.render(L)),U}optimizeNodes(){var L,U;return super.optimizeNodes(),(L=this.catch)===null||L===void 0||L.optimizeNodes(),(U=this.finally)===null||U===void 0||U.optimizeNodes(),this}optimizeNames(L,U){var ae,Ie;return super.optimizeNames(L,U),(ae=this.catch)===null||ae===void 0||ae.optimizeNames(L,U),(Ie=this.finally)===null||Ie===void 0||Ie.optimizeNames(L,U),this}get names(){const L=super.names;return this.catch&&Ae(L,this.catch.names),this.finally&&Ae(L,this.finally.names),L}}class W extends N{constructor(L){super(),this.error=L}render(L){return`catch(${this.error})`+super.render(L)}}W.kind="catch";class X extends N{render(L){return"finally"+super.render(L)}}X.kind="finally";class fe{constructor(L,U={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...U,_n:U.lines?`
12
- `:""},this._extScope=L,this._scope=new t.Scope({parent:L}),this._nodes=[new R]}toString(){return this._root.render(this.opts)}name(L){return this._scope.name(L)}scopeName(L){return this._extScope.name(L)}scopeValue(L,U){const ae=this._extScope.value(L,U);return(this._values[ae.prefix]||(this._values[ae.prefix]=new Set)).add(ae),ae}getScopeValue(L,U){return this._extScope.getValue(L,U)}scopeRefs(L){return this._extScope.scopeRefs(L,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(L,U,ae,Ie){const Te=this._scope.toName(U);return ae!==void 0&&Ie&&(this._constants[Te.str]=ae),this._leafNode(new l(L,Te,ae)),Te}const(L,U,ae){return this._def(t.varKinds.const,L,U,ae)}let(L,U,ae){return this._def(t.varKinds.let,L,U,ae)}var(L,U,ae){return this._def(t.varKinds.var,L,U,ae)}assign(L,U,ae){return this._leafNode(new c(L,U,ae))}add(L,U){return this._leafNode(new f(L,e.operators.ADD,U))}code(L){return typeof L=="function"?L():L!==i.nil&&this._leafNode(new g(L)),this}object(...L){const U=["{"];for(const[ae,Ie]of L)U.length>1&&U.push(","),U.push(ae),(ae!==Ie||this.opts.es5)&&(U.push(":"),(0,i.addCodeArg)(U,Ie));return U.push("}"),new i._Code(U)}if(L,U,ae){if(this._blockNode(new M(L)),U&&ae)this.code(U).else().code(ae).endIf();else if(U)this.code(U).endIf();else if(ae)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(L){return this._elseNode(new M(L))}else(){return this._elseNode(new O)}endIf(){return this._endBlockNode(M,O)}_for(L,U){return this._blockNode(L),U&&this.code(U).endFor(),this}for(L,U){return this._for(new I(L),U)}forRange(L,U,ae,Ie,Te=this.opts.es5?t.varKinds.var:t.varKinds.let){const ke=this._scope.toName(L);return this._for(new S(Te,ke,U,ae),()=>Ie(ke))}forOf(L,U,ae,Ie=t.varKinds.const){const Te=this._scope.toName(L);if(this.opts.es5){const ke=U instanceof i.Name?U:this.var("_arr",U);return this.forRange("_i",0,(0,i._)`${ke}.length`,Me=>{this.var(Te,(0,i._)`${ke}[${Me}]`),ae(Te)})}return this._for(new v("of",Ie,Te,U),()=>ae(Te))}forIn(L,U,ae,Ie=this.opts.es5?t.varKinds.var:t.varKinds.const){if(this.opts.ownProperties)return this.forOf(L,(0,i._)`Object.keys(${U})`,ae);const Te=this._scope.toName(L);return this._for(new v("in",Ie,Te,U),()=>ae(Te))}endFor(){return this._endBlockNode(_)}label(L){return this._leafNode(new p(L))}break(L){return this._leafNode(new y(L))}return(L){const U=new j;if(this._blockNode(U),this.code(L),U.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(j)}try(L,U,ae){if(!U&&!ae)throw new Error('CodeGen: "try" without "catch" and "finally"');const Ie=new V;if(this._blockNode(Ie),this.code(L),U){const Te=this.name("e");this._currNode=Ie.catch=new W(Te),U(Te)}return ae&&(this._currNode=Ie.finally=new X,this.code(ae)),this._endBlockNode(W,X)}throw(L){return this._leafNode(new h(L))}block(L,U){return this._blockStarts.push(this._nodes.length),L&&this.code(L).endBlock(U),this}endBlock(L){const U=this._blockStarts.pop();if(U===void 0)throw new Error("CodeGen: not in self-balancing block");const ae=this._nodes.length-U;if(ae<0||L!==void 0&&ae!==L)throw new Error(`CodeGen: wrong number of nodes: ${ae} vs ${L} expected`);return this._nodes.length=U,this}func(L,U=i.nil,ae,Ie){return this._blockNode(new T(L,U,ae)),Ie&&this.code(Ie).endFunc(),this}endFunc(){return this._endBlockNode(T)}optimize(L=1){for(;L-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(L){return this._currNode.nodes.push(L),this}_blockNode(L){this._currNode.nodes.push(L),this._nodes.push(L)}_endBlockNode(L,U){const ae=this._currNode;if(ae instanceof L||U&&ae instanceof U)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${U?`${L.kind}/${U.kind}`:L.kind}"`)}_elseNode(L){const U=this._currNode;if(!(U instanceof M))throw new Error('CodeGen: "else" without "if"');return this._currNode=U.else=L,this}get _root(){return this._nodes[0]}get _currNode(){const L=this._nodes;return L[L.length-1]}set _currNode(L){const U=this._nodes;U[U.length-1]=L}}e.CodeGen=fe;function Ae(q,L){for(const U in L)q[U]=(q[U]||0)+(L[U]||0);return q}function Se(q,L){return L instanceof i._CodeOrName?Ae(q,L.names):q}function Ee(q,L,U){if(q instanceof i.Name)return ae(q);if(!Ie(q))return q;return new i._Code(q._items.reduce((Te,ke)=>(ke instanceof i.Name&&(ke=ae(ke)),ke instanceof i._Code?Te.push(...ke._items):Te.push(ke),Te),[]));function ae(Te){const ke=U[Te.str];return ke===void 0||L[Te.str]!==1?Te:(delete L[Te.str],ke)}function Ie(Te){return Te instanceof i._Code&&Te._items.some(ke=>ke instanceof i.Name&&L[ke.str]===1&&U[ke.str]!==void 0)}}function je(q,L){for(const U in L)q[U]=(q[U]||0)-(L[U]||0)}function Ce(q){return typeof q=="boolean"||typeof q=="number"||q===null?!q:(0,i._)`!${B(q)}`}e.not=Ce;const Oe=C(e.operators.AND);function ge(...q){return q.reduce(Oe)}e.and=ge;const ie=C(e.operators.OR);function K(...q){return q.reduce(ie)}e.or=K;function C(q){return(L,U)=>L===i.nil?U:U===i.nil?L:(0,i._)`${B(L)} ${q} ${B(U)}`}function B(q){return q instanceof i.Name?q:(0,i._)`(${q})`}})(jp)),jp}var It={},U0;function qt(){if(U0)return It;U0=1,Object.defineProperty(It,"__esModule",{value:!0}),It.checkStrictMode=It.getErrorPath=It.Type=It.useFunc=It.setEvaluated=It.evaluatedPropsToName=It.mergeEvaluated=It.eachItem=It.unescapeJsonPointer=It.escapeJsonPointer=It.escapeFragment=It.unescapeFragment=It.schemaRefOrVal=It.schemaHasRulesButRef=It.schemaHasRules=It.checkUnknownRules=It.alwaysValidSchema=It.toHash=void 0;const e=Et(),i=al();function t(v){const T={};for(const j of v)T[j]=!0;return T}It.toHash=t;function n(v,T){return typeof T=="boolean"?T:Object.keys(T).length===0?!0:(o(v,T),!s(T,v.self.RULES.all))}It.alwaysValidSchema=n;function o(v,T=v.schema){const{opts:j,self:V}=v;if(!j.strictSchema||typeof T=="boolean")return;const W=V.RULES.keywords;for(const X in T)W[X]||S(v,`unknown keyword: "${X}"`)}It.checkUnknownRules=o;function s(v,T){if(typeof v=="boolean")return!v;for(const j in v)if(T[j])return!0;return!1}It.schemaHasRules=s;function l(v,T){if(typeof v=="boolean")return!v;for(const j in v)if(j!=="$ref"&&T.all[j])return!0;return!1}It.schemaHasRulesButRef=l;function c({topSchemaRef:v,schemaPath:T},j,V,W){if(!W){if(typeof j=="number"||typeof j=="boolean")return j;if(typeof j=="string")return(0,e._)`${j}`}return(0,e._)`${v}${T}${(0,e.getProperty)(V)}`}It.schemaRefOrVal=c;function f(v){return h(decodeURIComponent(v))}It.unescapeFragment=f;function p(v){return encodeURIComponent(y(v))}It.escapeFragment=p;function y(v){return typeof v=="number"?`${v}`:v.replace(/~/g,"~0").replace(/\//g,"~1")}It.escapeJsonPointer=y;function h(v){return v.replace(/~1/g,"/").replace(/~0/g,"~")}It.unescapeJsonPointer=h;function g(v,T){if(Array.isArray(v))for(const j of v)T(j);else T(v)}It.eachItem=g;function A({mergeNames:v,mergeToName:T,mergeValues:j,resultToName:V}){return(W,X,fe,Ae)=>{const Se=fe===void 0?X:fe instanceof e.Name?(X instanceof e.Name?v(W,X,fe):T(W,X,fe),fe):X instanceof e.Name?(T(W,fe,X),X):j(X,fe);return Ae===e.Name&&!(Se instanceof e.Name)?V(W,Se):Se}}It.mergeEvaluated={props:A({mergeNames:(v,T,j)=>v.if((0,e._)`${j} !== true && ${T} !== undefined`,()=>{v.if((0,e._)`${T} === true`,()=>v.assign(j,!0),()=>v.assign(j,(0,e._)`${j} || {}`).code((0,e._)`Object.assign(${j}, ${T})`))}),mergeToName:(v,T,j)=>v.if((0,e._)`${j} !== true`,()=>{T===!0?v.assign(j,!0):(v.assign(j,(0,e._)`${j} || {}`),R(v,j,T))}),mergeValues:(v,T)=>v===!0?!0:{...v,...T},resultToName:N}),items:A({mergeNames:(v,T,j)=>v.if((0,e._)`${j} !== true && ${T} !== undefined`,()=>v.assign(j,(0,e._)`${T} === true ? true : ${j} > ${T} ? ${j} : ${T}`)),mergeToName:(v,T,j)=>v.if((0,e._)`${j} !== true`,()=>v.assign(j,T===!0?!0:(0,e._)`${j} > ${T} ? ${j} : ${T}`)),mergeValues:(v,T)=>v===!0?!0:Math.max(v,T),resultToName:(v,T)=>v.var("items",T)})};function N(v,T){if(T===!0)return v.var("props",!0);const j=v.var("props",(0,e._)`{}`);return T!==void 0&&R(v,j,T),j}It.evaluatedPropsToName=N;function R(v,T,j){Object.keys(j).forEach(V=>v.assign((0,e._)`${T}${(0,e.getProperty)(V)}`,!0))}It.setEvaluated=R;const O={};function M(v,T){return v.scopeValue("func",{ref:T,code:O[T.code]||(O[T.code]=new i._Code(T.code))})}It.useFunc=M;var _;(function(v){v[v.Num=0]="Num",v[v.Str=1]="Str"})(_||(It.Type=_={}));function I(v,T,j){if(v instanceof e.Name){const V=T===_.Num;return j?V?(0,e._)`"[" + ${v} + "]"`:(0,e._)`"['" + ${v} + "']"`:V?(0,e._)`"/" + ${v}`:(0,e._)`"/" + ${v}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return j?(0,e.getProperty)(v).toString():"/"+y(v)}It.getErrorPath=I;function S(v,T,j=v.opts.strictSchema){if(j){if(T=`strict mode: ${T}`,j===!0)throw new Error(T);v.self.logger.warn(T)}}return It.checkStrictMode=S,It}var mc={},F0;function Xi(){if(F0)return mc;F0=1,Object.defineProperty(mc,"__esModule",{value:!0});const e=Et(),i={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return mc.default=i,mc}var V0;function fl(){return V0||(V0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const i=Et(),t=qt(),n=Xi();e.keywordError={message:({keyword:O})=>(0,i.str)`must pass "${O}" keyword validation`},e.keyword$DataError={message:({keyword:O,schemaType:M})=>M?(0,i.str)`"${O}" keyword must be ${M} ($data)`:(0,i.str)`"${O}" keyword is invalid ($data)`};function o(O,M=e.keywordError,_,I){const{it:S}=O,{gen:v,compositeRule:T,allErrors:j}=S,V=h(O,M,_);I??(T||j)?f(v,V):p(S,(0,i._)`[${V}]`)}e.reportError=o;function s(O,M=e.keywordError,_){const{it:I}=O,{gen:S,compositeRule:v,allErrors:T}=I,j=h(O,M,_);f(S,j),v||T||p(I,n.default.vErrors)}e.reportExtraError=s;function l(O,M){O.assign(n.default.errors,M),O.if((0,i._)`${n.default.vErrors} !== null`,()=>O.if(M,()=>O.assign((0,i._)`${n.default.vErrors}.length`,M),()=>O.assign(n.default.vErrors,null)))}e.resetErrorsCount=l;function c({gen:O,keyword:M,schemaValue:_,data:I,errsCount:S,it:v}){if(S===void 0)throw new Error("ajv implementation error");const T=O.name("err");O.forRange("i",S,n.default.errors,j=>{O.const(T,(0,i._)`${n.default.vErrors}[${j}]`),O.if((0,i._)`${T}.instancePath === undefined`,()=>O.assign((0,i._)`${T}.instancePath`,(0,i.strConcat)(n.default.instancePath,v.errorPath))),O.assign((0,i._)`${T}.schemaPath`,(0,i.str)`${v.errSchemaPath}/${M}`),v.opts.verbose&&(O.assign((0,i._)`${T}.schema`,_),O.assign((0,i._)`${T}.data`,I))})}e.extendErrors=c;function f(O,M){const _=O.const("err",M);O.if((0,i._)`${n.default.vErrors} === null`,()=>O.assign(n.default.vErrors,(0,i._)`[${_}]`),(0,i._)`${n.default.vErrors}.push(${_})`),O.code((0,i._)`${n.default.errors}++`)}function p(O,M){const{gen:_,validateName:I,schemaEnv:S}=O;S.$async?_.throw((0,i._)`new ${O.ValidationError}(${M})`):(_.assign((0,i._)`${I}.errors`,M),_.return(!1))}const y={keyword:new i.Name("keyword"),schemaPath:new i.Name("schemaPath"),params:new i.Name("params"),propertyName:new i.Name("propertyName"),message:new i.Name("message"),schema:new i.Name("schema"),parentSchema:new i.Name("parentSchema")};function h(O,M,_){const{createErrors:I}=O.it;return I===!1?(0,i._)`{}`:g(O,M,_)}function g(O,M,_={}){const{gen:I,it:S}=O,v=[A(S,_),N(O,_)];return R(O,M,v),I.object(...v)}function A({errorPath:O},{instancePath:M}){const _=M?(0,i.str)`${O}${(0,t.getErrorPath)(M,t.Type.Str)}`:O;return[n.default.instancePath,(0,i.strConcat)(n.default.instancePath,_)]}function N({keyword:O,it:{errSchemaPath:M}},{schemaPath:_,parentSchema:I}){let S=I?M:(0,i.str)`${M}/${O}`;return _&&(S=(0,i.str)`${S}${(0,t.getErrorPath)(_,t.Type.Str)}`),[y.schemaPath,S]}function R(O,{params:M,message:_},I){const{keyword:S,data:v,schemaValue:T,it:j}=O,{opts:V,propertyName:W,topSchemaRef:X,schemaPath:fe}=j;I.push([y.keyword,S],[y.params,typeof M=="function"?M(O):M||(0,i._)`{}`]),V.messages&&I.push([y.message,typeof _=="function"?_(O):_]),V.verbose&&I.push([y.schema,T],[y.parentSchema,(0,i._)`${X}${fe}`],[n.default.data,v]),W&&I.push([y.propertyName,W])}})(Cp)),Cp}var H0;function gk(){if(H0)return Qa;H0=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.boolOrEmptySchema=Qa.topBoolOrEmptySchema=void 0;const e=fl(),i=Et(),t=Xi(),n={message:"boolean schema is false"};function o(c){const{gen:f,schema:p,validateName:y}=c;p===!1?l(c,!1):typeof p=="object"&&p.$async===!0?f.return(t.default.data):(f.assign((0,i._)`${y}.errors`,null),f.return(!0))}Qa.topBoolOrEmptySchema=o;function s(c,f){const{gen:p,schema:y}=c;y===!1?(p.var(f,!1),l(c)):p.var(f,!0)}Qa.boolOrEmptySchema=s;function l(c,f){const{gen:p,data:y}=c,h={gen:p,keyword:"false schema",data:y,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,e.reportError)(h,n,void 0,f)}return Qa}var jr={},Ja={},z0;function FM(){if(z0)return Ja;z0=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.getRules=Ja.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],i=new Set(e);function t(o){return typeof o=="string"&&i.has(o)}Ja.isJSONType=t;function n(){const o={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...o,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},o.number,o.string,o.array,o.object],post:{rules:[]},all:{},keywords:{}}}return Ja.getRules=n,Ja}var Fi={},G0;function VM(){if(G0)return Fi;G0=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.shouldUseRule=Fi.shouldUseGroup=Fi.schemaHasRulesForType=void 0;function e({schema:n,self:o},s){const l=o.RULES.types[s];return l&&l!==!0&&i(n,l)}Fi.schemaHasRulesForType=e;function i(n,o){return o.rules.some(s=>t(n,s))}Fi.shouldUseGroup=i;function t(n,o){var s;return n[o.keyword]!==void 0||((s=o.definition.implements)===null||s===void 0?void 0:s.some(l=>n[l]!==void 0))}return Fi.shouldUseRule=t,Fi}var W0;function Md(){if(W0)return jr;W0=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.reportTypeError=jr.checkDataTypes=jr.checkDataType=jr.coerceAndCheckDataType=jr.getJSONTypes=jr.getSchemaTypes=jr.DataType=void 0;const e=FM(),i=VM(),t=fl(),n=Et(),o=qt();var s;(function(_){_[_.Correct=0]="Correct",_[_.Wrong=1]="Wrong"})(s||(jr.DataType=s={}));function l(_){const I=c(_.type);if(I.includes("null")){if(_.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!I.length&&_.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');_.nullable===!0&&I.push("null")}return I}jr.getSchemaTypes=l;function c(_){const I=Array.isArray(_)?_:_?[_]:[];if(I.every(e.isJSONType))return I;throw new Error("type must be JSONType or JSONType[]: "+I.join(","))}jr.getJSONTypes=c;function f(_,I){const{gen:S,data:v,opts:T}=_,j=y(I,T.coerceTypes),V=I.length>0&&!(j.length===0&&I.length===1&&(0,i.schemaHasRulesForType)(_,I[0]));if(V){const W=N(I,v,T.strictNumbers,s.Wrong);S.if(W,()=>{j.length?h(_,I,j):O(_)})}return V}jr.coerceAndCheckDataType=f;const p=new Set(["string","number","integer","boolean","null"]);function y(_,I){return I?_.filter(S=>p.has(S)||I==="array"&&S==="array"):[]}function h(_,I,S){const{gen:v,data:T,opts:j}=_,V=v.let("dataType",(0,n._)`typeof ${T}`),W=v.let("coerced",(0,n._)`undefined`);j.coerceTypes==="array"&&v.if((0,n._)`${V} == 'object' && Array.isArray(${T}) && ${T}.length == 1`,()=>v.assign(T,(0,n._)`${T}[0]`).assign(V,(0,n._)`typeof ${T}`).if(N(I,T,j.strictNumbers),()=>v.assign(W,T))),v.if((0,n._)`${W} !== undefined`);for(const fe of S)(p.has(fe)||fe==="array"&&j.coerceTypes==="array")&&X(fe);v.else(),O(_),v.endIf(),v.if((0,n._)`${W} !== undefined`,()=>{v.assign(T,W),g(_,W)});function X(fe){switch(fe){case"string":v.elseIf((0,n._)`${V} == "number" || ${V} == "boolean"`).assign(W,(0,n._)`"" + ${T}`).elseIf((0,n._)`${T} === null`).assign(W,(0,n._)`""`);return;case"number":v.elseIf((0,n._)`${V} == "boolean" || ${T} === null
13
- || (${V} == "string" && ${T} && ${T} == +${T})`).assign(W,(0,n._)`+${T}`);return;case"integer":v.elseIf((0,n._)`${V} === "boolean" || ${T} === null
14
- || (${V} === "string" && ${T} && ${T} == +${T} && !(${T} % 1))`).assign(W,(0,n._)`+${T}`);return;case"boolean":v.elseIf((0,n._)`${T} === "false" || ${T} === 0 || ${T} === null`).assign(W,!1).elseIf((0,n._)`${T} === "true" || ${T} === 1`).assign(W,!0);return;case"null":v.elseIf((0,n._)`${T} === "" || ${T} === 0 || ${T} === false`),v.assign(W,null);return;case"array":v.elseIf((0,n._)`${V} === "string" || ${V} === "number"
15
- || ${V} === "boolean" || ${T} === null`).assign(W,(0,n._)`[${T}]`)}}}function g({gen:_,parentData:I,parentDataProperty:S},v){_.if((0,n._)`${I} !== undefined`,()=>_.assign((0,n._)`${I}[${S}]`,v))}function A(_,I,S,v=s.Correct){const T=v===s.Correct?n.operators.EQ:n.operators.NEQ;let j;switch(_){case"null":return(0,n._)`${I} ${T} null`;case"array":j=(0,n._)`Array.isArray(${I})`;break;case"object":j=(0,n._)`${I} && typeof ${I} == "object" && !Array.isArray(${I})`;break;case"integer":j=V((0,n._)`!(${I} % 1) && !isNaN(${I})`);break;case"number":j=V();break;default:return(0,n._)`typeof ${I} ${T} ${_}`}return v===s.Correct?j:(0,n.not)(j);function V(W=n.nil){return(0,n.and)((0,n._)`typeof ${I} == "number"`,W,S?(0,n._)`isFinite(${I})`:n.nil)}}jr.checkDataType=A;function N(_,I,S,v){if(_.length===1)return A(_[0],I,S,v);let T;const j=(0,o.toHash)(_);if(j.array&&j.object){const V=(0,n._)`typeof ${I} != "object"`;T=j.null?V:(0,n._)`!${I} || ${V}`,delete j.null,delete j.array,delete j.object}else T=n.nil;j.number&&delete j.integer;for(const V in j)T=(0,n.and)(T,A(V,I,S,v));return T}jr.checkDataTypes=N;const R={message:({schema:_})=>`must be ${_}`,params:({schema:_,schemaValue:I})=>typeof _=="string"?(0,n._)`{type: ${_}}`:(0,n._)`{type: ${I}}`};function O(_){const I=M(_);(0,t.reportError)(I,R)}jr.reportTypeError=O;function M(_){const{gen:I,data:S,schema:v}=_,T=(0,o.schemaRefOrVal)(_,v,"type");return{gen:I,keyword:"type",data:S,schema:v.type,schemaCode:T,schemaValue:T,parentSchema:v,params:{},it:_}}return jr}var mu={},K0;function vk(){if(K0)return mu;K0=1,Object.defineProperty(mu,"__esModule",{value:!0}),mu.assignDefaults=void 0;const e=Et(),i=qt();function t(o,s){const{properties:l,items:c}=o.schema;if(s==="object"&&l)for(const f in l)n(o,f,l[f].default);else s==="array"&&Array.isArray(c)&&c.forEach((f,p)=>n(o,p,f.default))}mu.assignDefaults=t;function n(o,s,l){const{gen:c,compositeRule:f,data:p,opts:y}=o;if(l===void 0)return;const h=(0,e._)`${p}${(0,e.getProperty)(s)}`;if(f){(0,i.checkStrictMode)(o,`default is ignored for: ${h}`);return}let g=(0,e._)`${h} === undefined`;y.useDefaults==="empty"&&(g=(0,e._)`${g} || ${h} === null || ${h} === ""`),c.if(g,(0,e._)`${h} = ${(0,e.stringify)(l)}`)}return mu}var Qn={},Kt={},Y0;function oi(){if(Y0)return Kt;Y0=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.validateUnion=Kt.validateArray=Kt.usePattern=Kt.callValidateCode=Kt.schemaProperties=Kt.allSchemaProperties=Kt.noPropertyInData=Kt.propertyInData=Kt.isOwnProperty=Kt.hasPropFunc=Kt.reportMissingProp=Kt.checkMissingProp=Kt.checkReportMissingProp=void 0;const e=Et(),i=qt(),t=Xi(),n=qt();function o(_,I){const{gen:S,data:v,it:T}=_;S.if(y(S,v,I,T.opts.ownProperties),()=>{_.setParams({missingProperty:(0,e._)`${I}`},!0),_.error()})}Kt.checkReportMissingProp=o;function s({gen:_,data:I,it:{opts:S}},v,T){return(0,e.or)(...v.map(j=>(0,e.and)(y(_,I,j,S.ownProperties),(0,e._)`${T} = ${j}`)))}Kt.checkMissingProp=s;function l(_,I){_.setParams({missingProperty:I},!0),_.error()}Kt.reportMissingProp=l;function c(_){return _.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Kt.hasPropFunc=c;function f(_,I,S){return(0,e._)`${c(_)}.call(${I}, ${S})`}Kt.isOwnProperty=f;function p(_,I,S,v){const T=(0,e._)`${I}${(0,e.getProperty)(S)} !== undefined`;return v?(0,e._)`${T} && ${f(_,I,S)}`:T}Kt.propertyInData=p;function y(_,I,S,v){const T=(0,e._)`${I}${(0,e.getProperty)(S)} === undefined`;return v?(0,e.or)(T,(0,e.not)(f(_,I,S))):T}Kt.noPropertyInData=y;function h(_){return _?Object.keys(_).filter(I=>I!=="__proto__"):[]}Kt.allSchemaProperties=h;function g(_,I){return h(I).filter(S=>!(0,i.alwaysValidSchema)(_,I[S]))}Kt.schemaProperties=g;function A({schemaCode:_,data:I,it:{gen:S,topSchemaRef:v,schemaPath:T,errorPath:j},it:V},W,X,fe){const Ae=fe?(0,e._)`${_}, ${I}, ${v}${T}`:I,Se=[[t.default.instancePath,(0,e.strConcat)(t.default.instancePath,j)],[t.default.parentData,V.parentData],[t.default.parentDataProperty,V.parentDataProperty],[t.default.rootData,t.default.rootData]];V.opts.dynamicRef&&Se.push([t.default.dynamicAnchors,t.default.dynamicAnchors]);const Ee=(0,e._)`${Ae}, ${S.object(...Se)}`;return X!==e.nil?(0,e._)`${W}.call(${X}, ${Ee})`:(0,e._)`${W}(${Ee})`}Kt.callValidateCode=A;const N=(0,e._)`new RegExp`;function R({gen:_,it:{opts:I}},S){const v=I.unicodeRegExp?"u":"",{regExp:T}=I.code,j=T(S,v);return _.scopeValue("pattern",{key:j.toString(),ref:j,code:(0,e._)`${T.code==="new RegExp"?N:(0,n.useFunc)(_,T)}(${S}, ${v})`})}Kt.usePattern=R;function O(_){const{gen:I,data:S,keyword:v,it:T}=_,j=I.name("valid");if(T.allErrors){const W=I.let("valid",!0);return V(()=>I.assign(W,!1)),W}return I.var(j,!0),V(()=>I.break()),j;function V(W){const X=I.const("len",(0,e._)`${S}.length`);I.forRange("i",0,X,fe=>{_.subschema({keyword:v,dataProp:fe,dataPropType:i.Type.Num},j),I.if((0,e.not)(j),W)})}}Kt.validateArray=O;function M(_){const{gen:I,schema:S,keyword:v,it:T}=_;if(!Array.isArray(S))throw new Error("ajv implementation error");if(S.some(X=>(0,i.alwaysValidSchema)(T,X))&&!T.opts.unevaluated)return;const V=I.let("valid",!1),W=I.name("_valid");I.block(()=>S.forEach((X,fe)=>{const Ae=_.subschema({keyword:v,schemaProp:fe,compositeRule:!0},W);I.assign(V,(0,e._)`${V} || ${W}`),_.mergeValidEvaluated(Ae,W)||I.if((0,e.not)(V))})),_.result(V,()=>_.reset(),()=>_.error(!0))}return Kt.validateUnion=M,Kt}var X0;function _k(){if(X0)return Qn;X0=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.validateKeywordUsage=Qn.validSchemaType=Qn.funcKeywordCode=Qn.macroKeywordCode=void 0;const e=Et(),i=Xi(),t=oi(),n=fl();function o(g,A){const{gen:N,keyword:R,schema:O,parentSchema:M,it:_}=g,I=A.macro.call(_.self,O,M,_),S=p(N,R,I);_.opts.validateSchema!==!1&&_.self.validateSchema(I,!0);const v=N.name("valid");g.subschema({schema:I,schemaPath:e.nil,errSchemaPath:`${_.errSchemaPath}/${R}`,topSchemaRef:S,compositeRule:!0},v),g.pass(v,()=>g.error(!0))}Qn.macroKeywordCode=o;function s(g,A){var N;const{gen:R,keyword:O,schema:M,parentSchema:_,$data:I,it:S}=g;f(S,A);const v=!I&&A.compile?A.compile.call(S.self,M,_,S):A.validate,T=p(R,O,v),j=R.let("valid");g.block$data(j,V),g.ok((N=A.valid)!==null&&N!==void 0?N:j);function V(){if(A.errors===!1)fe(),A.modifying&&l(g),Ae(()=>g.error());else{const Se=A.async?W():X();A.modifying&&l(g),Ae(()=>c(g,Se))}}function W(){const Se=R.let("ruleErrs",null);return R.try(()=>fe((0,e._)`await `),Ee=>R.assign(j,!1).if((0,e._)`${Ee} instanceof ${S.ValidationError}`,()=>R.assign(Se,(0,e._)`${Ee}.errors`),()=>R.throw(Ee))),Se}function X(){const Se=(0,e._)`${T}.errors`;return R.assign(Se,null),fe(e.nil),Se}function fe(Se=A.async?(0,e._)`await `:e.nil){const Ee=S.opts.passContext?i.default.this:i.default.self,je=!("compile"in A&&!I||A.schema===!1);R.assign(j,(0,e._)`${Se}${(0,t.callValidateCode)(g,T,Ee,je)}`,A.modifying)}function Ae(Se){var Ee;R.if((0,e.not)((Ee=A.valid)!==null&&Ee!==void 0?Ee:j),Se)}}Qn.funcKeywordCode=s;function l(g){const{gen:A,data:N,it:R}=g;A.if(R.parentData,()=>A.assign(N,(0,e._)`${R.parentData}[${R.parentDataProperty}]`))}function c(g,A){const{gen:N}=g;N.if((0,e._)`Array.isArray(${A})`,()=>{N.assign(i.default.vErrors,(0,e._)`${i.default.vErrors} === null ? ${A} : ${i.default.vErrors}.concat(${A})`).assign(i.default.errors,(0,e._)`${i.default.vErrors}.length`),(0,n.extendErrors)(g)},()=>g.error())}function f({schemaEnv:g},A){if(A.async&&!g.$async)throw new Error("async keyword in sync schema")}function p(g,A,N){if(N===void 0)throw new Error(`keyword "${A}" failed to compile`);return g.scopeValue("keyword",typeof N=="function"?{ref:N}:{ref:N,code:(0,e.stringify)(N)})}function y(g,A,N=!1){return!A.length||A.some(R=>R==="array"?Array.isArray(g):R==="object"?g&&typeof g=="object"&&!Array.isArray(g):typeof g==R||N&&typeof g>"u")}Qn.validSchemaType=y;function h({schema:g,opts:A,self:N,errSchemaPath:R},O,M){if(Array.isArray(O.keyword)?!O.keyword.includes(M):O.keyword!==M)throw new Error("ajv implementation error");const _=O.dependencies;if(_?.some(I=>!Object.prototype.hasOwnProperty.call(g,I)))throw new Error(`parent schema must have dependencies of ${M}: ${_.join(",")}`);if(O.validateSchema&&!O.validateSchema(g[M])){const S=`keyword "${M}" value is invalid at path "${R}": `+N.errorsText(O.validateSchema.errors);if(A.validateSchema==="log")N.logger.error(S);else throw new Error(S)}}return Qn.validateKeywordUsage=h,Qn}var Vi={},Q0;function Ek(){if(Q0)return Vi;Q0=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.extendSubschemaMode=Vi.extendSubschemaData=Vi.getSubschema=void 0;const e=Et(),i=qt();function t(s,{keyword:l,schemaProp:c,schema:f,schemaPath:p,errSchemaPath:y,topSchemaRef:h}){if(l!==void 0&&f!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(l!==void 0){const g=s.schema[l];return c===void 0?{schema:g,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(l)}`,errSchemaPath:`${s.errSchemaPath}/${l}`}:{schema:g[c],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(l)}${(0,e.getProperty)(c)}`,errSchemaPath:`${s.errSchemaPath}/${l}/${(0,i.escapeFragment)(c)}`}}if(f!==void 0){if(p===void 0||y===void 0||h===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:f,schemaPath:p,topSchemaRef:h,errSchemaPath:y}}throw new Error('either "keyword" or "schema" must be passed')}Vi.getSubschema=t;function n(s,l,{dataProp:c,dataPropType:f,data:p,dataTypes:y,propertyName:h}){if(p!==void 0&&c!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:g}=l;if(c!==void 0){const{errorPath:N,dataPathArr:R,opts:O}=l,M=g.let("data",(0,e._)`${l.data}${(0,e.getProperty)(c)}`,!0);A(M),s.errorPath=(0,e.str)`${N}${(0,i.getErrorPath)(c,f,O.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${c}`,s.dataPathArr=[...R,s.parentDataProperty]}if(p!==void 0){const N=p instanceof e.Name?p:g.let("data",p,!0);A(N),h!==void 0&&(s.propertyName=h)}y&&(s.dataTypes=y);function A(N){s.data=N,s.dataLevel=l.dataLevel+1,s.dataTypes=[],l.definedProperties=new Set,s.parentData=l.data,s.dataNames=[...l.dataNames,N]}}Vi.extendSubschemaData=n;function o(s,{jtdDiscriminator:l,jtdMetadata:c,compositeRule:f,createErrors:p,allErrors:y}){f!==void 0&&(s.compositeRule=f),p!==void 0&&(s.createErrors=p),y!==void 0&&(s.allErrors=y),s.jtdDiscriminator=l,s.jtdMetadata=c}return Vi.extendSubschemaMode=o,Vi}var Qr={},kp,J0;function R_(){return J0||(J0=1,kp=function e(i,t){if(i===t)return!0;if(i&&t&&typeof i=="object"&&typeof t=="object"){if(i.constructor!==t.constructor)return!1;var n,o,s;if(Array.isArray(i)){if(n=i.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!e(i[o],t[o]))return!1;return!0}if(i.constructor===RegExp)return i.source===t.source&&i.flags===t.flags;if(i.valueOf!==Object.prototype.valueOf)return i.valueOf()===t.valueOf();if(i.toString!==Object.prototype.toString)return i.toString()===t.toString();if(s=Object.keys(i),n=s.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[o]))return!1;for(o=n;o--!==0;){var l=s[o];if(!e(i[l],t[l]))return!1}return!0}return i!==i&&t!==t}),kp}var qp={exports:{}},Z0;function bk(){if(Z0)return qp.exports;Z0=1;var e=qp.exports=function(n,o,s){typeof o=="function"&&(s=o,o={}),s=o.cb||s;var l=typeof s=="function"?s:s.pre||function(){},c=s.post||function(){};i(o,l,c,n,"",n)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function i(n,o,s,l,c,f,p,y,h,g){if(l&&typeof l=="object"&&!Array.isArray(l)){o(l,c,f,p,y,h,g);for(var A in l){var N=l[A];if(Array.isArray(N)){if(A in e.arrayKeywords)for(var R=0;R<N.length;R++)i(n,o,s,N[R],c+"/"+A+"/"+R,f,c,A,l,R)}else if(A in e.propsKeywords){if(N&&typeof N=="object")for(var O in N)i(n,o,s,N[O],c+"/"+A+"/"+t(O),f,c,A,l,O)}else(A in e.keywords||n.allKeys&&!(A in e.skipKeywords))&&i(n,o,s,N,c+"/"+A,f,c,A,l)}s(l,c,f,p,y,h,g)}}function t(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return qp.exports}var x0;function Fd(){if(x0)return Qr;x0=1,Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.getSchemaRefs=Qr.resolveUrl=Qr.normalizeId=Qr._getFullPath=Qr.getFullPath=Qr.inlineRef=void 0;const e=qt(),i=R_(),t=bk(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(R,O=!0){return typeof R=="boolean"?!0:O===!0?!l(R):O?c(R)<=O:!1}Qr.inlineRef=o;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(R){for(const O in R){if(s.has(O))return!0;const M=R[O];if(Array.isArray(M)&&M.some(l)||typeof M=="object"&&l(M))return!0}return!1}function c(R){let O=0;for(const M in R){if(M==="$ref")return 1/0;if(O++,!n.has(M)&&(typeof R[M]=="object"&&(0,e.eachItem)(R[M],_=>O+=c(_)),O===1/0))return 1/0}return O}function f(R,O="",M){M!==!1&&(O=h(O));const _=R.parse(O);return p(R,_)}Qr.getFullPath=f;function p(R,O){return R.serialize(O).split("#")[0]+"#"}Qr._getFullPath=p;const y=/#\/?$/;function h(R){return R?R.replace(y,""):""}Qr.normalizeId=h;function g(R,O,M){return M=h(M),R.resolve(O,M)}Qr.resolveUrl=g;const A=/^[a-z_][-a-z0-9._]*$/i;function N(R,O){if(typeof R=="boolean")return{};const{schemaId:M,uriResolver:_}=this.opts,I=h(R[M]||O),S={"":I},v=f(_,I,!1),T={},j=new Set;return t(R,{allKeys:!0},(X,fe,Ae,Se)=>{if(Se===void 0)return;const Ee=v+fe;let je=S[Se];typeof X[M]=="string"&&(je=Ce.call(this,X[M])),Oe.call(this,X.$anchor),Oe.call(this,X.$dynamicAnchor),S[fe]=je;function Ce(ge){const ie=this.opts.uriResolver.resolve;if(ge=h(je?ie(je,ge):ge),j.has(ge))throw W(ge);j.add(ge);let K=this.refs[ge];return typeof K=="string"&&(K=this.refs[K]),typeof K=="object"?V(X,K.schema,ge):ge!==h(Ee)&&(ge[0]==="#"?(V(X,T[ge],ge),T[ge]=X):this.refs[ge]=Ee),ge}function Oe(ge){if(typeof ge=="string"){if(!A.test(ge))throw new Error(`invalid anchor "${ge}"`);Ce.call(this,`#${ge}`)}}}),T;function V(X,fe,Ae){if(fe!==void 0&&!i(X,fe))throw W(Ae)}function W(X){return new Error(`reference "${X}" resolves to more than one schema`)}}return Qr.getSchemaRefs=N,Qr}var $0;function pl(){if($0)return Ui;$0=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.getData=Ui.KeywordCxt=Ui.validateFunctionCode=void 0;const e=gk(),i=Md(),t=VM(),n=Md(),o=vk(),s=_k(),l=Ek(),c=Et(),f=Xi(),p=Fd(),y=qt(),h=fl();function g(ue){if(v(ue)&&(j(ue),S(ue))){O(ue);return}A(ue,()=>(0,e.topBoolOrEmptySchema)(ue))}Ui.validateFunctionCode=g;function A({gen:ue,validateName:de,schema:Re,schemaEnv:Le,opts:Ye},Qe){Ye.code.es5?ue.func(de,(0,c._)`${f.default.data}, ${f.default.valCxt}`,Le.$async,()=>{ue.code((0,c._)`"use strict"; ${_(Re,Ye)}`),R(ue,Ye),ue.code(Qe)}):ue.func(de,(0,c._)`${f.default.data}, ${N(Ye)}`,Le.$async,()=>ue.code(_(Re,Ye)).code(Qe))}function N(ue){return(0,c._)`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${ue.dynamicRef?(0,c._)`, ${f.default.dynamicAnchors}={}`:c.nil}}={}`}function R(ue,de){ue.if(f.default.valCxt,()=>{ue.var(f.default.instancePath,(0,c._)`${f.default.valCxt}.${f.default.instancePath}`),ue.var(f.default.parentData,(0,c._)`${f.default.valCxt}.${f.default.parentData}`),ue.var(f.default.parentDataProperty,(0,c._)`${f.default.valCxt}.${f.default.parentDataProperty}`),ue.var(f.default.rootData,(0,c._)`${f.default.valCxt}.${f.default.rootData}`),de.dynamicRef&&ue.var(f.default.dynamicAnchors,(0,c._)`${f.default.valCxt}.${f.default.dynamicAnchors}`)},()=>{ue.var(f.default.instancePath,(0,c._)`""`),ue.var(f.default.parentData,(0,c._)`undefined`),ue.var(f.default.parentDataProperty,(0,c._)`undefined`),ue.var(f.default.rootData,f.default.data),de.dynamicRef&&ue.var(f.default.dynamicAnchors,(0,c._)`{}`)})}function O(ue){const{schema:de,opts:Re,gen:Le}=ue;A(ue,()=>{Re.$comment&&de.$comment&&Se(ue),X(ue),Le.let(f.default.vErrors,null),Le.let(f.default.errors,0),Re.unevaluated&&M(ue),V(ue),Ee(ue)})}function M(ue){const{gen:de,validateName:Re}=ue;ue.evaluated=de.const("evaluated",(0,c._)`${Re}.evaluated`),de.if((0,c._)`${ue.evaluated}.dynamicProps`,()=>de.assign((0,c._)`${ue.evaluated}.props`,(0,c._)`undefined`)),de.if((0,c._)`${ue.evaluated}.dynamicItems`,()=>de.assign((0,c._)`${ue.evaluated}.items`,(0,c._)`undefined`))}function _(ue,de){const Re=typeof ue=="object"&&ue[de.schemaId];return Re&&(de.code.source||de.code.process)?(0,c._)`/*# sourceURL=${Re} */`:c.nil}function I(ue,de){if(v(ue)&&(j(ue),S(ue))){T(ue,de);return}(0,e.boolOrEmptySchema)(ue,de)}function S({schema:ue,self:de}){if(typeof ue=="boolean")return!ue;for(const Re in ue)if(de.RULES.all[Re])return!0;return!1}function v(ue){return typeof ue.schema!="boolean"}function T(ue,de){const{schema:Re,gen:Le,opts:Ye}=ue;Ye.$comment&&Re.$comment&&Se(ue),fe(ue),Ae(ue);const Qe=Le.const("_errs",f.default.errors);V(ue,Qe),Le.var(de,(0,c._)`${Qe} === ${f.default.errors}`)}function j(ue){(0,y.checkUnknownRules)(ue),W(ue)}function V(ue,de){if(ue.opts.jtd)return Ce(ue,[],!1,de);const Re=(0,i.getSchemaTypes)(ue.schema),Le=(0,i.coerceAndCheckDataType)(ue,Re);Ce(ue,Re,!Le,de)}function W(ue){const{schema:de,errSchemaPath:Re,opts:Le,self:Ye}=ue;de.$ref&&Le.ignoreKeywordsWithRef&&(0,y.schemaHasRulesButRef)(de,Ye.RULES)&&Ye.logger.warn(`$ref: keywords ignored in schema at path "${Re}"`)}function X(ue){const{schema:de,opts:Re}=ue;de.default!==void 0&&Re.useDefaults&&Re.strictSchema&&(0,y.checkStrictMode)(ue,"default is ignored in the schema root")}function fe(ue){const de=ue.schema[ue.opts.schemaId];de&&(ue.baseId=(0,p.resolveUrl)(ue.opts.uriResolver,ue.baseId,de))}function Ae(ue){if(ue.schema.$async&&!ue.schemaEnv.$async)throw new Error("async schema in sync schema")}function Se({gen:ue,schemaEnv:de,schema:Re,errSchemaPath:Le,opts:Ye}){const Qe=Re.$comment;if(Ye.$comment===!0)ue.code((0,c._)`${f.default.self}.logger.log(${Qe})`);else if(typeof Ye.$comment=="function"){const Vt=(0,c.str)`${Le}/$comment`,Lt=ue.scopeValue("root",{ref:de.root});ue.code((0,c._)`${f.default.self}.opts.$comment(${Qe}, ${Vt}, ${Lt}.schema)`)}}function Ee(ue){const{gen:de,schemaEnv:Re,validateName:Le,ValidationError:Ye,opts:Qe}=ue;Re.$async?de.if((0,c._)`${f.default.errors} === 0`,()=>de.return(f.default.data),()=>de.throw((0,c._)`new ${Ye}(${f.default.vErrors})`)):(de.assign((0,c._)`${Le}.errors`,f.default.vErrors),Qe.unevaluated&&je(ue),de.return((0,c._)`${f.default.errors} === 0`))}function je({gen:ue,evaluated:de,props:Re,items:Le}){Re instanceof c.Name&&ue.assign((0,c._)`${de}.props`,Re),Le instanceof c.Name&&ue.assign((0,c._)`${de}.items`,Le)}function Ce(ue,de,Re,Le){const{gen:Ye,schema:Qe,data:Vt,allErrors:Lt,opts:rr,self:Ut}=ue,{RULES:Ft}=Ut;if(Qe.$ref&&(rr.ignoreKeywordsWithRef||!(0,y.schemaHasRulesButRef)(Qe,Ft))){Ye.block(()=>Ie(ue,"$ref",Ft.all.$ref.definition));return}rr.jtd||ge(ue,de),Ye.block(()=>{for(const or of Ft.rules)zr(or);zr(Ft.post)});function zr(or){(0,t.shouldUseGroup)(Qe,or)&&(or.type?(Ye.if((0,n.checkDataType)(or.type,Vt,rr.strictNumbers)),Oe(ue,or),de.length===1&&de[0]===or.type&&Re&&(Ye.else(),(0,n.reportTypeError)(ue)),Ye.endIf()):Oe(ue,or),Lt||Ye.if((0,c._)`${f.default.errors} === ${Le||0}`))}}function Oe(ue,de){const{gen:Re,schema:Le,opts:{useDefaults:Ye}}=ue;Ye&&(0,o.assignDefaults)(ue,de.type),Re.block(()=>{for(const Qe of de.rules)(0,t.shouldUseRule)(Le,Qe)&&Ie(ue,Qe.keyword,Qe.definition,de.type)})}function ge(ue,de){ue.schemaEnv.meta||!ue.opts.strictTypes||(ie(ue,de),ue.opts.allowUnionTypes||K(ue,de),C(ue,ue.dataTypes))}function ie(ue,de){if(de.length){if(!ue.dataTypes.length){ue.dataTypes=de;return}de.forEach(Re=>{q(ue.dataTypes,Re)||U(ue,`type "${Re}" not allowed by context "${ue.dataTypes.join(",")}"`)}),L(ue,de)}}function K(ue,de){de.length>1&&!(de.length===2&&de.includes("null"))&&U(ue,"use allowUnionTypes to allow union type keyword")}function C(ue,de){const Re=ue.self.RULES.all;for(const Le in Re){const Ye=Re[Le];if(typeof Ye=="object"&&(0,t.shouldUseRule)(ue.schema,Ye)){const{type:Qe}=Ye.definition;Qe.length&&!Qe.some(Vt=>B(de,Vt))&&U(ue,`missing type "${Qe.join(",")}" for keyword "${Le}"`)}}}function B(ue,de){return ue.includes(de)||de==="number"&&ue.includes("integer")}function q(ue,de){return ue.includes(de)||de==="integer"&&ue.includes("number")}function L(ue,de){const Re=[];for(const Le of ue.dataTypes)q(de,Le)?Re.push(Le):de.includes("integer")&&Le==="number"&&Re.push("integer");ue.dataTypes=Re}function U(ue,de){const Re=ue.schemaEnv.baseId+ue.errSchemaPath;de+=` at "${Re}" (strictTypes)`,(0,y.checkStrictMode)(ue,de,ue.opts.strictTypes)}class ae{constructor(de,Re,Le){if((0,s.validateKeywordUsage)(de,Re,Le),this.gen=de.gen,this.allErrors=de.allErrors,this.keyword=Le,this.data=de.data,this.schema=de.schema[Le],this.$data=Re.$data&&de.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,y.schemaRefOrVal)(de,this.schema,Le,this.$data),this.schemaType=Re.schemaType,this.parentSchema=de.schema,this.params={},this.it=de,this.def=Re,this.$data)this.schemaCode=de.gen.const("vSchema",Me(this.$data,de));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,Re.schemaType,Re.allowUndefined))throw new Error(`${Le} value must be ${JSON.stringify(Re.schemaType)}`);("code"in Re?Re.trackErrors:Re.errors!==!1)&&(this.errsCount=de.gen.const("_errs",f.default.errors))}result(de,Re,Le){this.failResult((0,c.not)(de),Re,Le)}failResult(de,Re,Le){this.gen.if(de),Le?Le():this.error(),Re?(this.gen.else(),Re(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(de,Re){this.failResult((0,c.not)(de),void 0,Re)}fail(de){if(de===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(de),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(de){if(!this.$data)return this.fail(de);const{schemaCode:Re}=this;this.fail((0,c._)`${Re} !== undefined && (${(0,c.or)(this.invalid$data(),de)})`)}error(de,Re,Le){if(Re){this.setParams(Re),this._error(de,Le),this.setParams({});return}this._error(de,Le)}_error(de,Re){(de?h.reportExtraError:h.reportError)(this,this.def.error,Re)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(de){this.allErrors||this.gen.if(de)}setParams(de,Re){Re?Object.assign(this.params,de):this.params=de}block$data(de,Re,Le=c.nil){this.gen.block(()=>{this.check$data(de,Le),Re()})}check$data(de=c.nil,Re=c.nil){if(!this.$data)return;const{gen:Le,schemaCode:Ye,schemaType:Qe,def:Vt}=this;Le.if((0,c.or)((0,c._)`${Ye} === undefined`,Re)),de!==c.nil&&Le.assign(de,!0),(Qe.length||Vt.validateSchema)&&(Le.elseIf(this.invalid$data()),this.$dataError(),de!==c.nil&&Le.assign(de,!1)),Le.else()}invalid$data(){const{gen:de,schemaCode:Re,schemaType:Le,def:Ye,it:Qe}=this;return(0,c.or)(Vt(),Lt());function Vt(){if(Le.length){if(!(Re instanceof c.Name))throw new Error("ajv implementation error");const rr=Array.isArray(Le)?Le:[Le];return(0,c._)`${(0,n.checkDataTypes)(rr,Re,Qe.opts.strictNumbers,n.DataType.Wrong)}`}return c.nil}function Lt(){if(Ye.validateSchema){const rr=de.scopeValue("validate$data",{ref:Ye.validateSchema});return(0,c._)`!${rr}(${Re})`}return c.nil}}subschema(de,Re){const Le=(0,l.getSubschema)(this.it,de);(0,l.extendSubschemaData)(Le,this.it,de),(0,l.extendSubschemaMode)(Le,de);const Ye={...this.it,...Le,items:void 0,props:void 0};return I(Ye,Re),Ye}mergeEvaluated(de,Re){const{it:Le,gen:Ye}=this;Le.opts.unevaluated&&(Le.props!==!0&&de.props!==void 0&&(Le.props=y.mergeEvaluated.props(Ye,de.props,Le.props,Re)),Le.items!==!0&&de.items!==void 0&&(Le.items=y.mergeEvaluated.items(Ye,de.items,Le.items,Re)))}mergeValidEvaluated(de,Re){const{it:Le,gen:Ye}=this;if(Le.opts.unevaluated&&(Le.props!==!0||Le.items!==!0))return Ye.if(Re,()=>this.mergeEvaluated(de,c.Name)),!0}}Ui.KeywordCxt=ae;function Ie(ue,de,Re,Le){const Ye=new ae(ue,Re,de);"code"in Re?Re.code(Ye,Le):Ye.$data&&Re.validate?(0,s.funcKeywordCode)(Ye,Re):"macro"in Re?(0,s.macroKeywordCode)(Ye,Re):(Re.compile||Re.validate)&&(0,s.funcKeywordCode)(Ye,Re)}const Te=/^\/(?:[^~]|~0|~1)*$/,ke=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Me(ue,{dataLevel:de,dataNames:Re,dataPathArr:Le}){let Ye,Qe;if(ue==="")return f.default.rootData;if(ue[0]==="/"){if(!Te.test(ue))throw new Error(`Invalid JSON-pointer: ${ue}`);Ye=ue,Qe=f.default.rootData}else{const Ut=ke.exec(ue);if(!Ut)throw new Error(`Invalid JSON-pointer: ${ue}`);const Ft=+Ut[1];if(Ye=Ut[2],Ye==="#"){if(Ft>=de)throw new Error(rr("property/index",Ft));return Le[de-Ft]}if(Ft>de)throw new Error(rr("data",Ft));if(Qe=Re[de-Ft],!Ye)return Qe}let Vt=Qe;const Lt=Ye.split("/");for(const Ut of Lt)Ut&&(Qe=(0,c._)`${Qe}${(0,c.getProperty)((0,y.unescapeJsonPointer)(Ut))}`,Vt=(0,c._)`${Vt} && ${Qe}`);return Vt;function rr(Ut,Ft){return`Cannot access ${Ut} ${Ft} levels up, current level is ${de}`}}return Ui.getData=Me,Ui}var yc={},ew;function N_(){if(ew)return yc;ew=1,Object.defineProperty(yc,"__esModule",{value:!0});class e extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}return yc.default=e,yc}var gc={},tw;function Vd(){if(tw)return gc;tw=1,Object.defineProperty(gc,"__esModule",{value:!0});const e=Fd();class i extends Error{constructor(n,o,s,l){super(l||`can't resolve reference ${s} from id ${o}`),this.missingRef=(0,e.resolveUrl)(n,o,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return gc.default=i,gc}var yn={},rw;function M_(){if(rw)return yn;rw=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.resolveSchema=yn.getCompilingSchema=yn.resolveRef=yn.compileSchema=yn.SchemaEnv=void 0;const e=Et(),i=N_(),t=Xi(),n=Fd(),o=qt(),s=pl();class l{constructor(M){var _;this.refs={},this.dynamicAnchors={};let I;typeof M.schema=="object"&&(I=M.schema),this.schema=M.schema,this.schemaId=M.schemaId,this.root=M.root||this,this.baseId=(_=M.baseId)!==null&&_!==void 0?_:(0,n.normalizeId)(I?.[M.schemaId||"$id"]),this.schemaPath=M.schemaPath,this.localRefs=M.localRefs,this.meta=M.meta,this.$async=I?.$async,this.refs={}}}yn.SchemaEnv=l;function c(O){const M=y.call(this,O);if(M)return M;const _=(0,n.getFullPath)(this.opts.uriResolver,O.root.baseId),{es5:I,lines:S}=this.opts.code,{ownProperties:v}=this.opts,T=new e.CodeGen(this.scope,{es5:I,lines:S,ownProperties:v});let j;O.$async&&(j=T.scopeValue("Error",{ref:i.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const V=T.scopeName("validate");O.validateName=V;const W={gen:T,allErrors:this.opts.allErrors,data:t.default.data,parentData:t.default.parentData,parentDataProperty:t.default.parentDataProperty,dataNames:[t.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:T.scopeValue("schema",this.opts.code.source===!0?{ref:O.schema,code:(0,e.stringify)(O.schema)}:{ref:O.schema}),validateName:V,ValidationError:j,schema:O.schema,schemaEnv:O,rootId:_,baseId:O.baseId||_,schemaPath:e.nil,errSchemaPath:O.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let X;try{this._compilations.add(O),(0,s.validateFunctionCode)(W),T.optimize(this.opts.code.optimize);const fe=T.toString();X=`${T.scopeRefs(t.default.scope)}return ${fe}`,this.opts.code.process&&(X=this.opts.code.process(X,O));const Se=new Function(`${t.default.self}`,`${t.default.scope}`,X)(this,this.scope.get());if(this.scope.value(V,{ref:Se}),Se.errors=null,Se.schema=O.schema,Se.schemaEnv=O,O.$async&&(Se.$async=!0),this.opts.code.source===!0&&(Se.source={validateName:V,validateCode:fe,scopeValues:T._values}),this.opts.unevaluated){const{props:Ee,items:je}=W;Se.evaluated={props:Ee instanceof e.Name?void 0:Ee,items:je instanceof e.Name?void 0:je,dynamicProps:Ee instanceof e.Name,dynamicItems:je instanceof e.Name},Se.source&&(Se.source.evaluated=(0,e.stringify)(Se.evaluated))}return O.validate=Se,O}catch(fe){throw delete O.validate,delete O.validateName,X&&this.logger.error("Error compiling schema, function code:",X),fe}finally{this._compilations.delete(O)}}yn.compileSchema=c;function f(O,M,_){var I;_=(0,n.resolveUrl)(this.opts.uriResolver,M,_);const S=O.refs[_];if(S)return S;let v=g.call(this,O,_);if(v===void 0){const T=(I=O.localRefs)===null||I===void 0?void 0:I[_],{schemaId:j}=this.opts;T&&(v=new l({schema:T,schemaId:j,root:O,baseId:M}))}if(v!==void 0)return O.refs[_]=p.call(this,v)}yn.resolveRef=f;function p(O){return(0,n.inlineRef)(O.schema,this.opts.inlineRefs)?O.schema:O.validate?O:c.call(this,O)}function y(O){for(const M of this._compilations)if(h(M,O))return M}yn.getCompilingSchema=y;function h(O,M){return O.schema===M.schema&&O.root===M.root&&O.baseId===M.baseId}function g(O,M){let _;for(;typeof(_=this.refs[M])=="string";)M=_;return _||this.schemas[M]||A.call(this,O,M)}function A(O,M){const _=this.opts.uriResolver.parse(M),I=(0,n._getFullPath)(this.opts.uriResolver,_);let S=(0,n.getFullPath)(this.opts.uriResolver,O.baseId,void 0);if(Object.keys(O.schema).length>0&&I===S)return R.call(this,_,O);const v=(0,n.normalizeId)(I),T=this.refs[v]||this.schemas[v];if(typeof T=="string"){const j=A.call(this,O,T);return typeof j?.schema!="object"?void 0:R.call(this,_,j)}if(typeof T?.schema=="object"){if(T.validate||c.call(this,T),v===(0,n.normalizeId)(M)){const{schema:j}=T,{schemaId:V}=this.opts,W=j[V];return W&&(S=(0,n.resolveUrl)(this.opts.uriResolver,S,W)),new l({schema:j,schemaId:V,root:O,baseId:S})}return R.call(this,_,T)}}yn.resolveSchema=A;const N=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function R(O,{baseId:M,schema:_,root:I}){var S;if(((S=O.fragment)===null||S===void 0?void 0:S[0])!=="/")return;for(const j of O.fragment.slice(1).split("/")){if(typeof _=="boolean")return;const V=_[(0,o.unescapeFragment)(j)];if(V===void 0)return;_=V;const W=typeof _=="object"&&_[this.opts.schemaId];!N.has(j)&&W&&(M=(0,n.resolveUrl)(this.opts.uriResolver,M,W))}let v;if(typeof _!="boolean"&&_.$ref&&!(0,o.schemaHasRulesButRef)(_,this.RULES)){const j=(0,n.resolveUrl)(this.opts.uriResolver,M,_.$ref);v=A.call(this,I,j)}const{schemaId:T}=this.opts;if(v=v||new l({schema:_,schemaId:T,root:I,baseId:M}),v.schema!==v.root.schema)return v}return yn}const wk="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Sk="Meta-schema for $data reference (JSON AnySchema extension proposal)",Tk="object",Ak=["$data"],Ok={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Pk=!1,Ik={$id:wk,description:Sk,type:Tk,required:Ak,properties:Ok,additionalProperties:Pk};var vc={},yu={exports:{}},Bp,nw;function HM(){if(nw)return Bp;nw=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),i=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function t(g){let A="",N=0,R=0;for(R=0;R<g.length;R++)if(N=g[R].charCodeAt(0),N!==48){if(!(N>=48&&N<=57||N>=65&&N<=70||N>=97&&N<=102))return"";A+=g[R];break}for(R+=1;R<g.length;R++){if(N=g[R].charCodeAt(0),!(N>=48&&N<=57||N>=65&&N<=70||N>=97&&N<=102))return"";A+=g[R]}return A}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(g){return g.length=0,!0}function s(g,A,N){if(g.length){const R=t(g);if(R!=="")A.push(R);else return N.error=!0,!1;g.length=0}return!0}function l(g){let A=0;const N={error:!1,address:"",zone:""},R=[],O=[];let M=!1,_=!1,I=s;for(let S=0;S<g.length;S++){const v=g[S];if(!(v==="["||v==="]"))if(v===":"){if(M===!0&&(_=!0),!I(O,R,N))break;if(++A>7){N.error=!0;break}S>0&&g[S-1]===":"&&(M=!0),R.push(":");continue}else if(v==="%"){if(!I(O,R,N))break;I=o}else{O.push(v);continue}}return O.length&&(I===o?N.zone=O.join(""):_?R.push(O.join("")):R.push(t(O))),N.address=R.join(""),N}function c(g){if(f(g,":")<2)return{host:g,isIPV6:!1};const A=l(g);if(A.error)return{host:g,isIPV6:!1};{let N=A.address,R=A.address;return A.zone&&(N+="%"+A.zone,R+="%25"+A.zone),{host:N,isIPV6:!0,escapedHost:R}}}function f(g,A){let N=0;for(let R=0;R<g.length;R++)g[R]===A&&N++;return N}function p(g){let A=g;const N=[];let R=-1,O=0;for(;O=A.length;){if(O===1){if(A===".")break;if(A==="/"){N.push("/");break}else{N.push(A);break}}else if(O===2){if(A[0]==="."){if(A[1]===".")break;if(A[1]==="/"){A=A.slice(2);continue}}else if(A[0]==="/"&&(A[1]==="."||A[1]==="/")){N.push("/");break}}else if(O===3&&A==="/.."){N.length!==0&&N.pop(),N.push("/");break}if(A[0]==="."){if(A[1]==="."){if(A[2]==="/"){A=A.slice(3);continue}}else if(A[1]==="/"){A=A.slice(2);continue}}else if(A[0]==="/"&&A[1]==="."){if(A[2]==="/"){A=A.slice(2);continue}else if(A[2]==="."&&A[3]==="/"){A=A.slice(3),N.length!==0&&N.pop();continue}}if((R=A.indexOf("/",1))===-1){N.push(A);break}else N.push(A.slice(0,R)),A=A.slice(R)}return N.join("")}function y(g,A){const N=A!==!0?escape:unescape;return g.scheme!==void 0&&(g.scheme=N(g.scheme)),g.userinfo!==void 0&&(g.userinfo=N(g.userinfo)),g.host!==void 0&&(g.host=N(g.host)),g.path!==void 0&&(g.path=N(g.path)),g.query!==void 0&&(g.query=N(g.query)),g.fragment!==void 0&&(g.fragment=N(g.fragment)),g}function h(g){const A=[];if(g.userinfo!==void 0&&(A.push(g.userinfo),A.push("@")),g.host!==void 0){let N=unescape(g.host);if(!i(N)){const R=c(N);R.isIPV6===!0?N=`[${R.escapedHost}]`:N=g.host}A.push(N)}return(typeof g.port=="number"||typeof g.port=="string")&&(A.push(":"),A.push(String(g.port))),A.length?A.join(""):void 0}return Bp={nonSimpleDomain:n,recomposeAuthority:h,normalizeComponentEncoding:y,removeDotSegments:p,isIPv4:i,isUUID:e,normalizeIPv6:c,stringArrayToHexStripped:t},Bp}var Up,iw;function Rk(){if(iw)return Up;iw=1;const{isUUID:e}=HM(),i=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,t=["http","https","ws","wss","urn","urn:uuid"];function n(v){return t.indexOf(v)!==-1}function o(v){return v.secure===!0?!0:v.secure===!1?!1:v.scheme?v.scheme.length===3&&(v.scheme[0]==="w"||v.scheme[0]==="W")&&(v.scheme[1]==="s"||v.scheme[1]==="S")&&(v.scheme[2]==="s"||v.scheme[2]==="S"):!1}function s(v){return v.host||(v.error=v.error||"HTTP URIs must have a host."),v}function l(v){const T=String(v.scheme).toLowerCase()==="https";return(v.port===(T?443:80)||v.port==="")&&(v.port=void 0),v.path||(v.path="/"),v}function c(v){return v.secure=o(v),v.resourceName=(v.path||"/")+(v.query?"?"+v.query:""),v.path=void 0,v.query=void 0,v}function f(v){if((v.port===(o(v)?443:80)||v.port==="")&&(v.port=void 0),typeof v.secure=="boolean"&&(v.scheme=v.secure?"wss":"ws",v.secure=void 0),v.resourceName){const[T,j]=v.resourceName.split("?");v.path=T&&T!=="/"?T:void 0,v.query=j,v.resourceName=void 0}return v.fragment=void 0,v}function p(v,T){if(!v.path)return v.error="URN can not be parsed",v;const j=v.path.match(i);if(j){const V=T.scheme||v.scheme||"urn";v.nid=j[1].toLowerCase(),v.nss=j[2];const W=`${V}:${T.nid||v.nid}`,X=S(W);v.path=void 0,X&&(v=X.parse(v,T))}else v.error=v.error||"URN can not be parsed.";return v}function y(v,T){if(v.nid===void 0)throw new Error("URN without nid cannot be serialized");const j=T.scheme||v.scheme||"urn",V=v.nid.toLowerCase(),W=`${j}:${T.nid||V}`,X=S(W);X&&(v=X.serialize(v,T));const fe=v,Ae=v.nss;return fe.path=`${V||T.nid}:${Ae}`,T.skipEscape=!0,fe}function h(v,T){const j=v;return j.uuid=j.nss,j.nss=void 0,!T.tolerant&&(!j.uuid||!e(j.uuid))&&(j.error=j.error||"UUID is not valid."),j}function g(v){const T=v;return T.nss=(v.uuid||"").toLowerCase(),T}const A={scheme:"http",domainHost:!0,parse:s,serialize:l},N={scheme:"https",domainHost:A.domainHost,parse:s,serialize:l},R={scheme:"ws",domainHost:!0,parse:c,serialize:f},O={scheme:"wss",domainHost:R.domainHost,parse:R.parse,serialize:R.serialize},I={http:A,https:N,ws:R,wss:O,urn:{scheme:"urn",parse:p,serialize:y,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:h,serialize:g,skipNormalize:!0}};Object.setPrototypeOf(I,null);function S(v){return v&&(I[v]||I[v.toLowerCase()])||void 0}return Up={wsIsSecure:o,SCHEMES:I,isValidSchemeName:n,getSchemeHandler:S},Up}var aw;function Nk(){if(aw)return yu.exports;aw=1;const{normalizeIPv6:e,removeDotSegments:i,recomposeAuthority:t,normalizeComponentEncoding:n,isIPv4:o,nonSimpleDomain:s}=HM(),{SCHEMES:l,getSchemeHandler:c}=Rk();function f(O,M){return typeof O=="string"?O=g(N(O,M),M):typeof O=="object"&&(O=N(g(O,M),M)),O}function p(O,M,_){const I=_?Object.assign({scheme:"null"},_):{scheme:"null"},S=y(N(O,I),N(M,I),I,!0);return I.skipEscape=!0,g(S,I)}function y(O,M,_,I){const S={};return I||(O=N(g(O,_),_),M=N(g(M,_),_)),_=_||{},!_.tolerant&&M.scheme?(S.scheme=M.scheme,S.userinfo=M.userinfo,S.host=M.host,S.port=M.port,S.path=i(M.path||""),S.query=M.query):(M.userinfo!==void 0||M.host!==void 0||M.port!==void 0?(S.userinfo=M.userinfo,S.host=M.host,S.port=M.port,S.path=i(M.path||""),S.query=M.query):(M.path?(M.path[0]==="/"?S.path=i(M.path):((O.userinfo!==void 0||O.host!==void 0||O.port!==void 0)&&!O.path?S.path="/"+M.path:O.path?S.path=O.path.slice(0,O.path.lastIndexOf("/")+1)+M.path:S.path=M.path,S.path=i(S.path)),S.query=M.query):(S.path=O.path,M.query!==void 0?S.query=M.query:S.query=O.query),S.userinfo=O.userinfo,S.host=O.host,S.port=O.port),S.scheme=O.scheme),S.fragment=M.fragment,S}function h(O,M,_){return typeof O=="string"?(O=unescape(O),O=g(n(N(O,_),!0),{..._,skipEscape:!0})):typeof O=="object"&&(O=g(n(O,!0),{..._,skipEscape:!0})),typeof M=="string"?(M=unescape(M),M=g(n(N(M,_),!0),{..._,skipEscape:!0})):typeof M=="object"&&(M=g(n(M,!0),{..._,skipEscape:!0})),O.toLowerCase()===M.toLowerCase()}function g(O,M){const _={host:O.host,scheme:O.scheme,userinfo:O.userinfo,port:O.port,path:O.path,query:O.query,nid:O.nid,nss:O.nss,uuid:O.uuid,fragment:O.fragment,reference:O.reference,resourceName:O.resourceName,secure:O.secure,error:""},I=Object.assign({},M),S=[],v=c(I.scheme||_.scheme);v&&v.serialize&&v.serialize(_,I),_.path!==void 0&&(I.skipEscape?_.path=unescape(_.path):(_.path=escape(_.path),_.scheme!==void 0&&(_.path=_.path.split("%3A").join(":")))),I.reference!=="suffix"&&_.scheme&&S.push(_.scheme,":");const T=t(_);if(T!==void 0&&(I.reference!=="suffix"&&S.push("//"),S.push(T),_.path&&_.path[0]!=="/"&&S.push("/")),_.path!==void 0){let j=_.path;!I.absolutePath&&(!v||!v.absolutePath)&&(j=i(j)),T===void 0&&j[0]==="/"&&j[1]==="/"&&(j="/%2F"+j.slice(2)),S.push(j)}return _.query!==void 0&&S.push("?",_.query),_.fragment!==void 0&&S.push("#",_.fragment),S.join("")}const A=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function N(O,M){const _=Object.assign({},M),I={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let S=!1;_.reference==="suffix"&&(_.scheme?O=_.scheme+":"+O:O="//"+O);const v=O.match(A);if(v){if(I.scheme=v[1],I.userinfo=v[3],I.host=v[4],I.port=parseInt(v[5],10),I.path=v[6]||"",I.query=v[7],I.fragment=v[8],isNaN(I.port)&&(I.port=v[5]),I.host)if(o(I.host)===!1){const V=e(I.host);I.host=V.host.toLowerCase(),S=V.isIPV6}else S=!0;I.scheme===void 0&&I.userinfo===void 0&&I.host===void 0&&I.port===void 0&&I.query===void 0&&!I.path?I.reference="same-document":I.scheme===void 0?I.reference="relative":I.fragment===void 0?I.reference="absolute":I.reference="uri",_.reference&&_.reference!=="suffix"&&_.reference!==I.reference&&(I.error=I.error||"URI is not a "+_.reference+" reference.");const T=c(_.scheme||I.scheme);if(!_.unicodeSupport&&(!T||!T.unicodeSupport)&&I.host&&(_.domainHost||T&&T.domainHost)&&S===!1&&s(I.host))try{I.host=URL.domainToASCII(I.host.toLowerCase())}catch(j){I.error=I.error||"Host's domain name can not be converted to ASCII: "+j}(!T||T&&!T.skipNormalize)&&(O.indexOf("%")!==-1&&(I.scheme!==void 0&&(I.scheme=unescape(I.scheme)),I.host!==void 0&&(I.host=unescape(I.host))),I.path&&(I.path=escape(unescape(I.path))),I.fragment&&(I.fragment=encodeURI(decodeURIComponent(I.fragment)))),T&&T.parse&&T.parse(I,_)}else I.error=I.error||"URI can not be parsed.";return I}const R={SCHEMES:l,normalize:f,resolve:p,resolveComponent:y,equal:h,serialize:g,parse:N};return yu.exports=R,yu.exports.default=R,yu.exports.fastUri=R,yu.exports}var ow;function Mk(){if(ow)return vc;ow=1,Object.defineProperty(vc,"__esModule",{value:!0});const e=Nk();return e.code='require("ajv/dist/runtime/uri").default',vc.default=e,vc}var sw;function Ck(){return sw||(sw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var i=pl();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return i.KeywordCxt}});var t=Et();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return t._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return t.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return t.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return t.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return t.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return t.CodeGen}});const n=N_(),o=Vd(),s=FM(),l=M_(),c=Et(),f=Fd(),p=Md(),y=qt(),h=Ik,g=Mk(),A=(K,C)=>new RegExp(K,C);A.code="new RegExp";const N=["removeAdditional","useDefaults","coerceTypes"],R=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),O={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},M={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=200;function I(K){var C,B,q,L,U,ae,Ie,Te,ke,Me,ue,de,Re,Le,Ye,Qe,Vt,Lt,rr,Ut,Ft,zr,or,gn,Jr;const Zr=K.strict,cn=(C=K.code)===null||C===void 0?void 0:C.optimize,sr=cn===!0||cn===void 0?1:cn||0,dn=(q=(B=K.code)===null||B===void 0?void 0:B.regExp)!==null&&q!==void 0?q:A,Pr=(L=K.uriResolver)!==null&&L!==void 0?L:g.default;return{strictSchema:(ae=(U=K.strictSchema)!==null&&U!==void 0?U:Zr)!==null&&ae!==void 0?ae:!0,strictNumbers:(Te=(Ie=K.strictNumbers)!==null&&Ie!==void 0?Ie:Zr)!==null&&Te!==void 0?Te:!0,strictTypes:(Me=(ke=K.strictTypes)!==null&&ke!==void 0?ke:Zr)!==null&&Me!==void 0?Me:"log",strictTuples:(de=(ue=K.strictTuples)!==null&&ue!==void 0?ue:Zr)!==null&&de!==void 0?de:"log",strictRequired:(Le=(Re=K.strictRequired)!==null&&Re!==void 0?Re:Zr)!==null&&Le!==void 0?Le:!1,code:K.code?{...K.code,optimize:sr,regExp:dn}:{optimize:sr,regExp:dn},loopRequired:(Ye=K.loopRequired)!==null&&Ye!==void 0?Ye:_,loopEnum:(Qe=K.loopEnum)!==null&&Qe!==void 0?Qe:_,meta:(Vt=K.meta)!==null&&Vt!==void 0?Vt:!0,messages:(Lt=K.messages)!==null&&Lt!==void 0?Lt:!0,inlineRefs:(rr=K.inlineRefs)!==null&&rr!==void 0?rr:!0,schemaId:(Ut=K.schemaId)!==null&&Ut!==void 0?Ut:"$id",addUsedSchema:(Ft=K.addUsedSchema)!==null&&Ft!==void 0?Ft:!0,validateSchema:(zr=K.validateSchema)!==null&&zr!==void 0?zr:!0,validateFormats:(or=K.validateFormats)!==null&&or!==void 0?or:!0,unicodeRegExp:(gn=K.unicodeRegExp)!==null&&gn!==void 0?gn:!0,int32range:(Jr=K.int32range)!==null&&Jr!==void 0?Jr:!0,uriResolver:Pr}}class S{constructor(C={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,C=this.opts={...C,...I(C)};const{es5:B,lines:q}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:R,es5:B,lines:q}),this.logger=Ae(C.logger);const L=C.validateFormats;C.validateFormats=!1,this.RULES=(0,s.getRules)(),v.call(this,O,C,"NOT SUPPORTED"),v.call(this,M,C,"DEPRECATED","warn"),this._metaOpts=X.call(this),C.formats&&V.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),C.keywords&&W.call(this,C.keywords),typeof C.meta=="object"&&this.addMetaSchema(C.meta),j.call(this),C.validateFormats=L}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:C,meta:B,schemaId:q}=this.opts;let L=h;q==="id"&&(L={...h},L.id=L.$id,delete L.$id),B&&C&&this.addMetaSchema(L,L[q],!1)}defaultMeta(){const{meta:C,schemaId:B}=this.opts;return this.opts.defaultMeta=typeof C=="object"?C[B]||C:void 0}validate(C,B){let q;if(typeof C=="string"){if(q=this.getSchema(C),!q)throw new Error(`no schema with key or ref "${C}"`)}else q=this.compile(C);const L=q(B);return"$async"in q||(this.errors=q.errors),L}compile(C,B){const q=this._addSchema(C,B);return q.validate||this._compileSchemaEnv(q)}compileAsync(C,B){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:q}=this.opts;return L.call(this,C,B);async function L(Me,ue){await U.call(this,Me.$schema);const de=this._addSchema(Me,ue);return de.validate||ae.call(this,de)}async function U(Me){Me&&!this.getSchema(Me)&&await L.call(this,{$ref:Me},!0)}async function ae(Me){try{return this._compileSchemaEnv(Me)}catch(ue){if(!(ue instanceof o.default))throw ue;return Ie.call(this,ue),await Te.call(this,ue.missingSchema),ae.call(this,Me)}}function Ie({missingSchema:Me,missingRef:ue}){if(this.refs[Me])throw new Error(`AnySchema ${Me} is loaded but ${ue} cannot be resolved`)}async function Te(Me){const ue=await ke.call(this,Me);this.refs[Me]||await U.call(this,ue.$schema),this.refs[Me]||this.addSchema(ue,Me,B)}async function ke(Me){const ue=this._loading[Me];if(ue)return ue;try{return await(this._loading[Me]=q(Me))}finally{delete this._loading[Me]}}}addSchema(C,B,q,L=this.opts.validateSchema){if(Array.isArray(C)){for(const ae of C)this.addSchema(ae,void 0,q,L);return this}let U;if(typeof C=="object"){const{schemaId:ae}=this.opts;if(U=C[ae],U!==void 0&&typeof U!="string")throw new Error(`schema ${ae} must be string`)}return B=(0,f.normalizeId)(B||U),this._checkUnique(B),this.schemas[B]=this._addSchema(C,q,B,L,!0),this}addMetaSchema(C,B,q=this.opts.validateSchema){return this.addSchema(C,B,!0,q),this}validateSchema(C,B){if(typeof C=="boolean")return!0;let q;if(q=C.$schema,q!==void 0&&typeof q!="string")throw new Error("$schema must be a string");if(q=q||this.opts.defaultMeta||this.defaultMeta(),!q)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const L=this.validate(q,C);if(!L&&B){const U="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(U);else throw new Error(U)}return L}getSchema(C){let B;for(;typeof(B=T.call(this,C))=="string";)C=B;if(B===void 0){const{schemaId:q}=this.opts,L=new l.SchemaEnv({schema:{},schemaId:q});if(B=l.resolveSchema.call(this,L,C),!B)return;this.refs[C]=B}return B.validate||this._compileSchemaEnv(B)}removeSchema(C){if(C instanceof RegExp)return this._removeAllSchemas(this.schemas,C),this._removeAllSchemas(this.refs,C),this;switch(typeof C){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const B=T.call(this,C);return typeof B=="object"&&this._cache.delete(B.schema),delete this.schemas[C],delete this.refs[C],this}case"object":{const B=C;this._cache.delete(B);let q=C[this.opts.schemaId];return q&&(q=(0,f.normalizeId)(q),delete this.schemas[q],delete this.refs[q]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(C){for(const B of C)this.addKeyword(B);return this}addKeyword(C,B){let q;if(typeof C=="string")q=C,typeof B=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),B.keyword=q);else if(typeof C=="object"&&B===void 0){if(B=C,q=B.keyword,Array.isArray(q)&&!q.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Ee.call(this,q,B),!B)return(0,y.eachItem)(q,U=>je.call(this,U)),this;Oe.call(this,B);const L={...B,type:(0,p.getJSONTypes)(B.type),schemaType:(0,p.getJSONTypes)(B.schemaType)};return(0,y.eachItem)(q,L.type.length===0?U=>je.call(this,U,L):U=>L.type.forEach(ae=>je.call(this,U,L,ae))),this}getKeyword(C){const B=this.RULES.all[C];return typeof B=="object"?B.definition:!!B}removeKeyword(C){const{RULES:B}=this;delete B.keywords[C],delete B.all[C];for(const q of B.rules){const L=q.rules.findIndex(U=>U.keyword===C);L>=0&&q.rules.splice(L,1)}return this}addFormat(C,B){return typeof B=="string"&&(B=new RegExp(B)),this.formats[C]=B,this}errorsText(C=this.errors,{separator:B=", ",dataVar:q="data"}={}){return!C||C.length===0?"No errors":C.map(L=>`${q}${L.instancePath} ${L.message}`).reduce((L,U)=>L+B+U)}$dataMetaSchema(C,B){const q=this.RULES.all;C=JSON.parse(JSON.stringify(C));for(const L of B){const U=L.split("/").slice(1);let ae=C;for(const Ie of U)ae=ae[Ie];for(const Ie in q){const Te=q[Ie];if(typeof Te!="object")continue;const{$data:ke}=Te.definition,Me=ae[Ie];ke&&Me&&(ae[Ie]=ie(Me))}}return C}_removeAllSchemas(C,B){for(const q in C){const L=C[q];(!B||B.test(q))&&(typeof L=="string"?delete C[q]:L&&!L.meta&&(this._cache.delete(L.schema),delete C[q]))}}_addSchema(C,B,q,L=this.opts.validateSchema,U=this.opts.addUsedSchema){let ae;const{schemaId:Ie}=this.opts;if(typeof C=="object")ae=C[Ie];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof C!="boolean")throw new Error("schema must be object or boolean")}let Te=this._cache.get(C);if(Te!==void 0)return Te;q=(0,f.normalizeId)(ae||q);const ke=f.getSchemaRefs.call(this,C,q);return Te=new l.SchemaEnv({schema:C,schemaId:Ie,meta:B,baseId:q,localRefs:ke}),this._cache.set(Te.schema,Te),U&&!q.startsWith("#")&&(q&&this._checkUnique(q),this.refs[q]=Te),L&&this.validateSchema(C,!0),Te}_checkUnique(C){if(this.schemas[C]||this.refs[C])throw new Error(`schema with key or id "${C}" already exists`)}_compileSchemaEnv(C){if(C.meta?this._compileMetaSchema(C):l.compileSchema.call(this,C),!C.validate)throw new Error("ajv implementation error");return C.validate}_compileMetaSchema(C){const B=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,C)}finally{this.opts=B}}}S.ValidationError=n.default,S.MissingRefError=o.default,e.default=S;function v(K,C,B,q="error"){for(const L in K){const U=L;U in C&&this.logger[q](`${B}: option ${L}. ${K[U]}`)}}function T(K){return K=(0,f.normalizeId)(K),this.schemas[K]||this.refs[K]}function j(){const K=this.opts.schemas;if(K)if(Array.isArray(K))this.addSchema(K);else for(const C in K)this.addSchema(K[C],C)}function V(){for(const K in this.opts.formats){const C=this.opts.formats[K];C&&this.addFormat(K,C)}}function W(K){if(Array.isArray(K)){this.addVocabulary(K);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const C in K){const B=K[C];B.keyword||(B.keyword=C),this.addKeyword(B)}}function X(){const K={...this.opts};for(const C of N)delete K[C];return K}const fe={log(){},warn(){},error(){}};function Ae(K){if(K===!1)return fe;if(K===void 0)return console;if(K.log&&K.warn&&K.error)return K;throw new Error("logger must implement log, warn and error methods")}const Se=/^[a-z_$][a-z0-9_$:-]*$/i;function Ee(K,C){const{RULES:B}=this;if((0,y.eachItem)(K,q=>{if(B.keywords[q])throw new Error(`Keyword ${q} is already defined`);if(!Se.test(q))throw new Error(`Keyword ${q} has invalid name`)}),!!C&&C.$data&&!("code"in C||"validate"in C))throw new Error('$data keyword must have "code" or "validate" function')}function je(K,C,B){var q;const L=C?.post;if(B&&L)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:U}=this;let ae=L?U.post:U.rules.find(({type:Te})=>Te===B);if(ae||(ae={type:B,rules:[]},U.rules.push(ae)),U.keywords[K]=!0,!C)return;const Ie={keyword:K,definition:{...C,type:(0,p.getJSONTypes)(C.type),schemaType:(0,p.getJSONTypes)(C.schemaType)}};C.before?Ce.call(this,ae,Ie,C.before):ae.rules.push(Ie),U.all[K]=Ie,(q=C.implements)===null||q===void 0||q.forEach(Te=>this.addKeyword(Te))}function Ce(K,C,B){const q=K.rules.findIndex(L=>L.keyword===B);q>=0?K.rules.splice(q,0,C):(K.rules.push(C),this.logger.warn(`rule ${B} is not defined`))}function Oe(K){let{metaSchema:C}=K;C!==void 0&&(K.$data&&this.opts.$data&&(C=ie(C)),K.validateSchema=this.compile(C,!0))}const ge={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ie(K){return{anyOf:[K,ge]}}})(Mp)),Mp}var _c={},Ec={},bc={},uw;function jk(){if(uw)return bc;uw=1,Object.defineProperty(bc,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return bc.default=e,bc}var ya={},lw;function Lk(){if(lw)return ya;lw=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.callRef=ya.getValidate=void 0;const e=Vd(),i=oi(),t=Et(),n=Xi(),o=M_(),s=qt(),l={keyword:"$ref",schemaType:"string",code(p){const{gen:y,schema:h,it:g}=p,{baseId:A,schemaEnv:N,validateName:R,opts:O,self:M}=g,{root:_}=N;if((h==="#"||h==="#/")&&A===_.baseId)return S();const I=o.resolveRef.call(M,_,A,h);if(I===void 0)throw new e.default(g.opts.uriResolver,A,h);if(I instanceof o.SchemaEnv)return v(I);return T(I);function S(){if(N===_)return f(p,R,N,N.$async);const j=y.scopeValue("root",{ref:_});return f(p,(0,t._)`${j}.validate`,_,_.$async)}function v(j){const V=c(p,j);f(p,V,j,j.$async)}function T(j){const V=y.scopeValue("schema",O.code.source===!0?{ref:j,code:(0,t.stringify)(j)}:{ref:j}),W=y.name("valid"),X=p.subschema({schema:j,dataTypes:[],schemaPath:t.nil,topSchemaRef:V,errSchemaPath:h},W);p.mergeEvaluated(X),p.ok(W)}}};function c(p,y){const{gen:h}=p;return y.validate?h.scopeValue("validate",{ref:y.validate}):(0,t._)`${h.scopeValue("wrapper",{ref:y})}.validate`}ya.getValidate=c;function f(p,y,h,g){const{gen:A,it:N}=p,{allErrors:R,schemaEnv:O,opts:M}=N,_=M.passContext?n.default.this:t.nil;g?I():S();function I(){if(!O.$async)throw new Error("async schema referenced by sync schema");const j=A.let("valid");A.try(()=>{A.code((0,t._)`await ${(0,i.callValidateCode)(p,y,_)}`),T(y),R||A.assign(j,!0)},V=>{A.if((0,t._)`!(${V} instanceof ${N.ValidationError})`,()=>A.throw(V)),v(V),R||A.assign(j,!1)}),p.ok(j)}function S(){p.result((0,i.callValidateCode)(p,y,_),()=>T(y),()=>v(y))}function v(j){const V=(0,t._)`${j}.errors`;A.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${V} : ${n.default.vErrors}.concat(${V})`),A.assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`)}function T(j){var V;if(!N.opts.unevaluated)return;const W=(V=h?.validate)===null||V===void 0?void 0:V.evaluated;if(N.props!==!0)if(W&&!W.dynamicProps)W.props!==void 0&&(N.props=s.mergeEvaluated.props(A,W.props,N.props));else{const X=A.var("props",(0,t._)`${j}.evaluated.props`);N.props=s.mergeEvaluated.props(A,X,N.props,t.Name)}if(N.items!==!0)if(W&&!W.dynamicItems)W.items!==void 0&&(N.items=s.mergeEvaluated.items(A,W.items,N.items));else{const X=A.var("items",(0,t._)`${j}.evaluated.items`);N.items=s.mergeEvaluated.items(A,X,N.items,t.Name)}}}return ya.callRef=f,ya.default=l,ya}var cw;function Dk(){if(cw)return Ec;cw=1,Object.defineProperty(Ec,"__esModule",{value:!0});const e=jk(),i=Lk(),t=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,i.default];return Ec.default=t,Ec}var wc={},Sc={},dw;function kk(){if(dw)return Sc;dw=1,Object.defineProperty(Sc,"__esModule",{value:!0});const e=Et(),i=e.operators,t={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},n={message:({keyword:s,schemaCode:l})=>(0,e.str)`must be ${t[s].okStr} ${l}`,params:({keyword:s,schemaCode:l})=>(0,e._)`{comparison: ${t[s].okStr}, limit: ${l}}`},o={keyword:Object.keys(t),type:"number",schemaType:"number",$data:!0,error:n,code(s){const{keyword:l,data:c,schemaCode:f}=s;s.fail$data((0,e._)`${c} ${t[l].fail} ${f} || isNaN(${c})`)}};return Sc.default=o,Sc}var Tc={},fw;function qk(){if(fw)return Tc;fw=1,Object.defineProperty(Tc,"__esModule",{value:!0});const e=Et(),t={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:o,data:s,schemaCode:l,it:c}=n,f=c.opts.multipleOfPrecision,p=o.let("res"),y=f?(0,e._)`Math.abs(Math.round(${p}) - ${p}) > 1e-${f}`:(0,e._)`${p} !== parseInt(${p})`;n.fail$data((0,e._)`(${l} === 0 || (${p} = ${s}/${l}, ${y}))`)}};return Tc.default=t,Tc}var Ac={},Oc={},pw;function Bk(){if(pw)return Oc;pw=1,Object.defineProperty(Oc,"__esModule",{value:!0});function e(i){const t=i.length;let n=0,o=0,s;for(;o<t;)n++,s=i.charCodeAt(o++),s>=55296&&s<=56319&&o<t&&(s=i.charCodeAt(o),(s&64512)===56320&&o++);return n}return Oc.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Oc}var hw;function Uk(){if(hw)return Ac;hw=1,Object.defineProperty(Ac,"__esModule",{value:!0});const e=Et(),i=qt(),t=Bk(),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:l}){const c=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${c} than ${l} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:l,data:c,schemaCode:f,it:p}=s,y=l==="maxLength"?e.operators.GT:e.operators.LT,h=p.opts.unicode===!1?(0,e._)`${c}.length`:(0,e._)`${(0,i.useFunc)(s.gen,t.default)}(${c})`;s.fail$data((0,e._)`${h} ${y} ${f}`)}};return Ac.default=o,Ac}var Pc={},mw;function Fk(){if(mw)return Pc;mw=1,Object.defineProperty(Pc,"__esModule",{value:!0});const e=oi(),i=Et(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:o})=>(0,i.str)`must match pattern "${o}"`,params:({schemaCode:o})=>(0,i._)`{pattern: ${o}}`},code(o){const{data:s,$data:l,schema:c,schemaCode:f,it:p}=o,y=p.opts.unicodeRegExp?"u":"",h=l?(0,i._)`(new RegExp(${f}, ${y}))`:(0,e.usePattern)(o,c);o.fail$data((0,i._)`!${h}.test(${s})`)}};return Pc.default=n,Pc}var Ic={},yw;function Vk(){if(yw)return Ic;yw=1,Object.defineProperty(Ic,"__esModule",{value:!0});const e=Et(),t={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:o}){const s=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${o} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:o,data:s,schemaCode:l}=n,c=o==="maxProperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${s}).length ${c} ${l}`)}};return Ic.default=t,Ic}var Rc={},gw;function Hk(){if(gw)return Rc;gw=1,Object.defineProperty(Rc,"__esModule",{value:!0});const e=oi(),i=Et(),t=qt(),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,i.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,i._)`{missingProperty: ${s}}`},code(s){const{gen:l,schema:c,schemaCode:f,data:p,$data:y,it:h}=s,{opts:g}=h;if(!y&&c.length===0)return;const A=c.length>=g.loopRequired;if(h.allErrors?N():R(),g.strictRequired){const _=s.parentSchema.properties,{definedProperties:I}=s.it;for(const S of c)if(_?.[S]===void 0&&!I.has(S)){const v=h.schemaEnv.baseId+h.errSchemaPath,T=`required property "${S}" is not defined at "${v}" (strictRequired)`;(0,t.checkStrictMode)(h,T,h.opts.strictRequired)}}function N(){if(A||y)s.block$data(i.nil,O);else for(const _ of c)(0,e.checkReportMissingProp)(s,_)}function R(){const _=l.let("missing");if(A||y){const I=l.let("valid",!0);s.block$data(I,()=>M(_,I)),s.ok(I)}else l.if((0,e.checkMissingProp)(s,c,_)),(0,e.reportMissingProp)(s,_),l.else()}function O(){l.forOf("prop",f,_=>{s.setParams({missingProperty:_}),l.if((0,e.noPropertyInData)(l,p,_,g.ownProperties),()=>s.error())})}function M(_,I){s.setParams({missingProperty:_}),l.forOf(_,f,()=>{l.assign(I,(0,e.propertyInData)(l,p,_,g.ownProperties)),l.if((0,i.not)(I),()=>{s.error(),l.break()})},i.nil)}}};return Rc.default=o,Rc}var Nc={},vw;function zk(){if(vw)return Nc;vw=1,Object.defineProperty(Nc,"__esModule",{value:!0});const e=Et(),t={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:o}){const s=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${o} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:o,data:s,schemaCode:l}=n,c=o==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`${s}.length ${c} ${l}`)}};return Nc.default=t,Nc}var Mc={},Cc={},_w;function C_(){if(_w)return Cc;_w=1,Object.defineProperty(Cc,"__esModule",{value:!0});const e=R_();return e.code='require("ajv/dist/runtime/equal").default',Cc.default=e,Cc}var Ew;function Gk(){if(Ew)return Mc;Ew=1,Object.defineProperty(Mc,"__esModule",{value:!0});const e=Md(),i=Et(),t=qt(),n=C_(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:l,j:c}})=>(0,i.str)`must NOT have duplicate items (items ## ${c} and ${l} are identical)`,params:({params:{i:l,j:c}})=>(0,i._)`{i: ${l}, j: ${c}}`},code(l){const{gen:c,data:f,$data:p,schema:y,parentSchema:h,schemaCode:g,it:A}=l;if(!p&&!y)return;const N=c.let("valid"),R=h.items?(0,e.getSchemaTypes)(h.items):[];l.block$data(N,O,(0,i._)`${g} === false`),l.ok(N);function O(){const S=c.let("i",(0,i._)`${f}.length`),v=c.let("j");l.setParams({i:S,j:v}),c.assign(N,!0),c.if((0,i._)`${S} > 1`,()=>(M()?_:I)(S,v))}function M(){return R.length>0&&!R.some(S=>S==="object"||S==="array")}function _(S,v){const T=c.name("item"),j=(0,e.checkDataTypes)(R,T,A.opts.strictNumbers,e.DataType.Wrong),V=c.const("indices",(0,i._)`{}`);c.for((0,i._)`;${S}--;`,()=>{c.let(T,(0,i._)`${f}[${S}]`),c.if(j,(0,i._)`continue`),R.length>1&&c.if((0,i._)`typeof ${T} == "string"`,(0,i._)`${T} += "_"`),c.if((0,i._)`typeof ${V}[${T}] == "number"`,()=>{c.assign(v,(0,i._)`${V}[${T}]`),l.error(),c.assign(N,!1).break()}).code((0,i._)`${V}[${T}] = ${S}`)})}function I(S,v){const T=(0,t.useFunc)(c,n.default),j=c.name("outer");c.label(j).for((0,i._)`;${S}--;`,()=>c.for((0,i._)`${v} = ${S}; ${v}--;`,()=>c.if((0,i._)`${T}(${f}[${S}], ${f}[${v}])`,()=>{l.error(),c.assign(N,!1).break(j)})))}}};return Mc.default=s,Mc}var jc={},bw;function Wk(){if(bw)return jc;bw=1,Object.defineProperty(jc,"__esModule",{value:!0});const e=Et(),i=qt(),t=C_(),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:l,data:c,$data:f,schemaCode:p,schema:y}=s;f||y&&typeof y=="object"?s.fail$data((0,e._)`!${(0,i.useFunc)(l,t.default)}(${c}, ${p})`):s.fail((0,e._)`${y} !== ${c}`)}};return jc.default=o,jc}var Lc={},ww;function Kk(){if(ww)return Lc;ww=1,Object.defineProperty(Lc,"__esModule",{value:!0});const e=Et(),i=qt(),t=C_(),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:l,data:c,$data:f,schema:p,schemaCode:y,it:h}=s;if(!f&&p.length===0)throw new Error("enum must have non-empty array");const g=p.length>=h.opts.loopEnum;let A;const N=()=>A??(A=(0,i.useFunc)(l,t.default));let R;if(g||f)R=l.let("valid"),s.block$data(R,O);else{if(!Array.isArray(p))throw new Error("ajv implementation error");const _=l.const("vSchema",y);R=(0,e.or)(...p.map((I,S)=>M(_,S)))}s.pass(R);function O(){l.assign(R,!1),l.forOf("v",y,_=>l.if((0,e._)`${N()}(${c}, ${_})`,()=>l.assign(R,!0).break()))}function M(_,I){const S=p[I];return typeof S=="object"&&S!==null?(0,e._)`${N()}(${c}, ${_}[${I}])`:(0,e._)`${c} === ${S}`}}};return Lc.default=o,Lc}var Sw;function Yk(){if(Sw)return wc;Sw=1,Object.defineProperty(wc,"__esModule",{value:!0});const e=kk(),i=qk(),t=Uk(),n=Fk(),o=Vk(),s=Hk(),l=zk(),c=Gk(),f=Wk(),p=Kk(),y=[e.default,i.default,t.default,n.default,o.default,s.default,l.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,p.default];return wc.default=y,wc}var Dc={},Ms={},Tw;function zM(){if(Tw)return Ms;Tw=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.validateAdditionalItems=void 0;const e=Et(),i=qt(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:l,it:c}=s,{items:f}=l;if(!Array.isArray(f)){(0,i.checkStrictMode)(c,'"additionalItems" is ignored when "items" is not an array of schemas');return}o(s,f)}};function o(s,l){const{gen:c,schema:f,data:p,keyword:y,it:h}=s;h.items=!0;const g=c.const("len",(0,e._)`${p}.length`);if(f===!1)s.setParams({len:l.length}),s.pass((0,e._)`${g} <= ${l.length}`);else if(typeof f=="object"&&!(0,i.alwaysValidSchema)(h,f)){const N=c.var("valid",(0,e._)`${g} <= ${l.length}`);c.if((0,e.not)(N),()=>A(N)),s.ok(N)}function A(N){c.forRange("i",l.length,g,R=>{s.subschema({keyword:y,dataProp:R,dataPropType:i.Type.Num},N),h.allErrors||c.if((0,e.not)(N),()=>c.break())})}}return Ms.validateAdditionalItems=o,Ms.default=n,Ms}var kc={},Cs={},Aw;function GM(){if(Aw)return Cs;Aw=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.validateTuple=void 0;const e=Et(),i=qt(),t=oi(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:l,it:c}=s;if(Array.isArray(l))return o(s,"additionalItems",l);c.items=!0,!(0,i.alwaysValidSchema)(c,l)&&s.ok((0,t.validateArray)(s))}};function o(s,l,c=s.schema){const{gen:f,parentSchema:p,data:y,keyword:h,it:g}=s;R(p),g.opts.unevaluated&&c.length&&g.items!==!0&&(g.items=i.mergeEvaluated.items(f,c.length,g.items));const A=f.name("valid"),N=f.const("len",(0,e._)`${y}.length`);c.forEach((O,M)=>{(0,i.alwaysValidSchema)(g,O)||(f.if((0,e._)`${N} > ${M}`,()=>s.subschema({keyword:h,schemaProp:M,dataProp:M},A)),s.ok(A))});function R(O){const{opts:M,errSchemaPath:_}=g,I=c.length,S=I===O.minItems&&(I===O.maxItems||O[l]===!1);if(M.strictTuples&&!S){const v=`"${h}" is ${I}-tuple, but minItems or maxItems/${l} are not specified or different at path "${_}"`;(0,i.checkStrictMode)(g,v,M.strictTuples)}}}return Cs.validateTuple=o,Cs.default=n,Cs}var Ow;function Xk(){if(Ow)return kc;Ow=1,Object.defineProperty(kc,"__esModule",{value:!0});const e=GM(),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,e.validateTuple)(t,"items")};return kc.default=i,kc}var qc={},Pw;function Qk(){if(Pw)return qc;Pw=1,Object.defineProperty(qc,"__esModule",{value:!0});const e=Et(),i=qt(),t=oi(),n=zM(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:l}})=>(0,e.str)`must NOT have more than ${l} items`,params:({params:{len:l}})=>(0,e._)`{limit: ${l}}`},code(l){const{schema:c,parentSchema:f,it:p}=l,{prefixItems:y}=f;p.items=!0,!(0,i.alwaysValidSchema)(p,c)&&(y?(0,n.validateAdditionalItems)(l,y):l.ok((0,t.validateArray)(l)))}};return qc.default=s,qc}var Bc={},Iw;function Jk(){if(Iw)return Bc;Iw=1,Object.defineProperty(Bc,"__esModule",{value:!0});const e=Et(),i=qt(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:o,max:s}})=>s===void 0?(0,e.str)`must contain at least ${o} valid item(s)`:(0,e.str)`must contain at least ${o} and no more than ${s} valid item(s)`,params:({params:{min:o,max:s}})=>s===void 0?(0,e._)`{minContains: ${o}}`:(0,e._)`{minContains: ${o}, maxContains: ${s}}`},code(o){const{gen:s,schema:l,parentSchema:c,data:f,it:p}=o;let y,h;const{minContains:g,maxContains:A}=c;p.opts.next?(y=g===void 0?1:g,h=A):y=1;const N=s.const("len",(0,e._)`${f}.length`);if(o.setParams({min:y,max:h}),h===void 0&&y===0){(0,i.checkStrictMode)(p,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(h!==void 0&&y>h){(0,i.checkStrictMode)(p,'"minContains" > "maxContains" is always invalid'),o.fail();return}if((0,i.alwaysValidSchema)(p,l)){let I=(0,e._)`${N} >= ${y}`;h!==void 0&&(I=(0,e._)`${I} && ${N} <= ${h}`),o.pass(I);return}p.items=!0;const R=s.name("valid");h===void 0&&y===1?M(R,()=>s.if(R,()=>s.break())):y===0?(s.let(R,!0),h!==void 0&&s.if((0,e._)`${f}.length > 0`,O)):(s.let(R,!1),O()),o.result(R,()=>o.reset());function O(){const I=s.name("_valid"),S=s.let("count",0);M(I,()=>s.if(I,()=>_(S)))}function M(I,S){s.forRange("i",0,N,v=>{o.subschema({keyword:"contains",dataProp:v,dataPropType:i.Type.Num,compositeRule:!0},I),S()})}function _(I){s.code((0,e._)`${I}++`),h===void 0?s.if((0,e._)`${I} >= ${y}`,()=>s.assign(R,!0).break()):(s.if((0,e._)`${I} > ${h}`,()=>s.assign(R,!1).break()),y===1?s.assign(R,!0):s.if((0,e._)`${I} >= ${y}`,()=>s.assign(R,!0)))}}};return Bc.default=n,Bc}var Fp={},Rw;function Zk(){return Rw||(Rw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const i=Et(),t=qt(),n=oi();e.error={message:({params:{property:f,depsCount:p,deps:y}})=>{const h=p===1?"property":"properties";return(0,i.str)`must have ${h} ${y} when property ${f} is present`},params:({params:{property:f,depsCount:p,deps:y,missingProperty:h}})=>(0,i._)`{property: ${f},
16
- missingProperty: ${h},
17
- depsCount: ${p},
18
- deps: ${y}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(f){const[p,y]=s(f);l(f,p),c(f,y)}};function s({schema:f}){const p={},y={};for(const h in f){if(h==="__proto__")continue;const g=Array.isArray(f[h])?p:y;g[h]=f[h]}return[p,y]}function l(f,p=f.schema){const{gen:y,data:h,it:g}=f;if(Object.keys(p).length===0)return;const A=y.let("missing");for(const N in p){const R=p[N];if(R.length===0)continue;const O=(0,n.propertyInData)(y,h,N,g.opts.ownProperties);f.setParams({property:N,depsCount:R.length,deps:R.join(", ")}),g.allErrors?y.if(O,()=>{for(const M of R)(0,n.checkReportMissingProp)(f,M)}):(y.if((0,i._)`${O} && (${(0,n.checkMissingProp)(f,R,A)})`),(0,n.reportMissingProp)(f,A),y.else())}}e.validatePropertyDeps=l;function c(f,p=f.schema){const{gen:y,data:h,keyword:g,it:A}=f,N=y.name("valid");for(const R in p)(0,t.alwaysValidSchema)(A,p[R])||(y.if((0,n.propertyInData)(y,h,R,A.opts.ownProperties),()=>{const O=f.subschema({keyword:g,schemaProp:R},N);f.mergeValidEvaluated(O,N)},()=>y.var(N,!0)),f.ok(N))}e.validateSchemaDeps=c,e.default=o})(Fp)),Fp}var Uc={},Nw;function xk(){if(Nw)return Uc;Nw=1,Object.defineProperty(Uc,"__esModule",{value:!0});const e=Et(),i=qt(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:o})=>(0,e._)`{propertyName: ${o.propertyName}}`},code(o){const{gen:s,schema:l,data:c,it:f}=o;if((0,i.alwaysValidSchema)(f,l))return;const p=s.name("valid");s.forIn("key",c,y=>{o.setParams({propertyName:y}),o.subschema({keyword:"propertyNames",data:y,dataTypes:["string"],propertyName:y,compositeRule:!0},p),s.if((0,e.not)(p),()=>{o.error(!0),f.allErrors||s.break()})}),o.ok(p)}};return Uc.default=n,Uc}var Fc={},Mw;function WM(){if(Mw)return Fc;Mw=1,Object.defineProperty(Fc,"__esModule",{value:!0});const e=oi(),i=Et(),t=Xi(),n=qt(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:l})=>(0,i._)`{additionalProperty: ${l.additionalProperty}}`},code(l){const{gen:c,schema:f,parentSchema:p,data:y,errsCount:h,it:g}=l;if(!h)throw new Error("ajv implementation error");const{allErrors:A,opts:N}=g;if(g.props=!0,N.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(g,f))return;const R=(0,e.allSchemaProperties)(p.properties),O=(0,e.allSchemaProperties)(p.patternProperties);M(),l.ok((0,i._)`${h} === ${t.default.errors}`);function M(){c.forIn("key",y,T=>{!R.length&&!O.length?S(T):c.if(_(T),()=>S(T))})}function _(T){let j;if(R.length>8){const V=(0,n.schemaRefOrVal)(g,p.properties,"properties");j=(0,e.isOwnProperty)(c,V,T)}else R.length?j=(0,i.or)(...R.map(V=>(0,i._)`${T} === ${V}`)):j=i.nil;return O.length&&(j=(0,i.or)(j,...O.map(V=>(0,i._)`${(0,e.usePattern)(l,V)}.test(${T})`))),(0,i.not)(j)}function I(T){c.code((0,i._)`delete ${y}[${T}]`)}function S(T){if(N.removeAdditional==="all"||N.removeAdditional&&f===!1){I(T);return}if(f===!1){l.setParams({additionalProperty:T}),l.error(),A||c.break();return}if(typeof f=="object"&&!(0,n.alwaysValidSchema)(g,f)){const j=c.name("valid");N.removeAdditional==="failing"?(v(T,j,!1),c.if((0,i.not)(j),()=>{l.reset(),I(T)})):(v(T,j),A||c.if((0,i.not)(j),()=>c.break()))}}function v(T,j,V){const W={keyword:"additionalProperties",dataProp:T,dataPropType:n.Type.Str};V===!1&&Object.assign(W,{compositeRule:!0,createErrors:!1,allErrors:!1}),l.subschema(W,j)}}};return Fc.default=s,Fc}var Vc={},Cw;function $k(){if(Cw)return Vc;Cw=1,Object.defineProperty(Vc,"__esModule",{value:!0});const e=pl(),i=oi(),t=qt(),n=WM(),o={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:l,schema:c,parentSchema:f,data:p,it:y}=s;y.opts.removeAdditional==="all"&&f.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(y,n.default,"additionalProperties"));const h=(0,i.allSchemaProperties)(c);for(const O of h)y.definedProperties.add(O);y.opts.unevaluated&&h.length&&y.props!==!0&&(y.props=t.mergeEvaluated.props(l,(0,t.toHash)(h),y.props));const g=h.filter(O=>!(0,t.alwaysValidSchema)(y,c[O]));if(g.length===0)return;const A=l.name("valid");for(const O of g)N(O)?R(O):(l.if((0,i.propertyInData)(l,p,O,y.opts.ownProperties)),R(O),y.allErrors||l.else().var(A,!0),l.endIf()),s.it.definedProperties.add(O),s.ok(A);function N(O){return y.opts.useDefaults&&!y.compositeRule&&c[O].default!==void 0}function R(O){s.subschema({keyword:"properties",schemaProp:O,dataProp:O},A)}}};return Vc.default=o,Vc}var Hc={},jw;function eq(){if(jw)return Hc;jw=1,Object.defineProperty(Hc,"__esModule",{value:!0});const e=oi(),i=Et(),t=qt(),n=qt(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:l,schema:c,data:f,parentSchema:p,it:y}=s,{opts:h}=y,g=(0,e.allSchemaProperties)(c),A=g.filter(S=>(0,t.alwaysValidSchema)(y,c[S]));if(g.length===0||A.length===g.length&&(!y.opts.unevaluated||y.props===!0))return;const N=h.strictSchema&&!h.allowMatchingProperties&&p.properties,R=l.name("valid");y.props!==!0&&!(y.props instanceof i.Name)&&(y.props=(0,n.evaluatedPropsToName)(l,y.props));const{props:O}=y;M();function M(){for(const S of g)N&&_(S),y.allErrors?I(S):(l.var(R,!0),I(S),l.if(R))}function _(S){for(const v in N)new RegExp(S).test(v)&&(0,t.checkStrictMode)(y,`property ${v} matches pattern ${S} (use allowMatchingProperties)`)}function I(S){l.forIn("key",f,v=>{l.if((0,i._)`${(0,e.usePattern)(s,S)}.test(${v})`,()=>{const T=A.includes(S);T||s.subschema({keyword:"patternProperties",schemaProp:S,dataProp:v,dataPropType:n.Type.Str},R),y.opts.unevaluated&&O!==!0?l.assign((0,i._)`${O}[${v}]`,!0):!T&&!y.allErrors&&l.if((0,i.not)(R),()=>l.break())})})}}};return Hc.default=o,Hc}var zc={},Lw;function tq(){if(Lw)return zc;Lw=1,Object.defineProperty(zc,"__esModule",{value:!0});const e=qt(),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:n,schema:o,it:s}=t;if((0,e.alwaysValidSchema)(s,o)){t.fail();return}const l=n.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},l),t.failResult(l,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};return zc.default=i,zc}var Gc={},Dw;function rq(){if(Dw)return Gc;Dw=1,Object.defineProperty(Gc,"__esModule",{value:!0});const i={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:oi().validateUnion,error:{message:"must match a schema in anyOf"}};return Gc.default=i,Gc}var Wc={},kw;function nq(){if(kw)return Wc;kw=1,Object.defineProperty(Wc,"__esModule",{value:!0});const e=Et(),i=qt(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:o})=>(0,e._)`{passingSchemas: ${o.passing}}`},code(o){const{gen:s,schema:l,parentSchema:c,it:f}=o;if(!Array.isArray(l))throw new Error("ajv implementation error");if(f.opts.discriminator&&c.discriminator)return;const p=l,y=s.let("valid",!1),h=s.let("passing",null),g=s.name("_valid");o.setParams({passing:h}),s.block(A),o.result(y,()=>o.reset(),()=>o.error(!0));function A(){p.forEach((N,R)=>{let O;(0,i.alwaysValidSchema)(f,N)?s.var(g,!0):O=o.subschema({keyword:"oneOf",schemaProp:R,compositeRule:!0},g),R>0&&s.if((0,e._)`${g} && ${y}`).assign(y,!1).assign(h,(0,e._)`[${h}, ${R}]`).else(),s.if(g,()=>{s.assign(y,!0),s.assign(h,R),O&&o.mergeEvaluated(O,e.Name)})})}}};return Wc.default=n,Wc}var Kc={},qw;function iq(){if(qw)return Kc;qw=1,Object.defineProperty(Kc,"__esModule",{value:!0});const e=qt(),i={keyword:"allOf",schemaType:"array",code(t){const{gen:n,schema:o,it:s}=t;if(!Array.isArray(o))throw new Error("ajv implementation error");const l=n.name("valid");o.forEach((c,f)=>{if((0,e.alwaysValidSchema)(s,c))return;const p=t.subschema({keyword:"allOf",schemaProp:f},l);t.ok(l),t.mergeEvaluated(p)})}};return Kc.default=i,Kc}var Yc={},Bw;function aq(){if(Bw)return Yc;Bw=1,Object.defineProperty(Yc,"__esModule",{value:!0});const e=Et(),i=qt(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:l,parentSchema:c,it:f}=s;c.then===void 0&&c.else===void 0&&(0,i.checkStrictMode)(f,'"if" without "then" and "else" is ignored');const p=o(f,"then"),y=o(f,"else");if(!p&&!y)return;const h=l.let("valid",!0),g=l.name("_valid");if(A(),s.reset(),p&&y){const R=l.let("ifClause");s.setParams({ifClause:R}),l.if(g,N("then",R),N("else",R))}else p?l.if(g,N("then")):l.if((0,e.not)(g),N("else"));s.pass(h,()=>s.error(!0));function A(){const R=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},g);s.mergeEvaluated(R)}function N(R,O){return()=>{const M=s.subschema({keyword:R},g);l.assign(h,g),s.mergeValidEvaluated(M,h),O?l.assign(O,(0,e._)`${R}`):s.setParams({ifClause:R})}}}};function o(s,l){const c=s.schema[l];return c!==void 0&&!(0,i.alwaysValidSchema)(s,c)}return Yc.default=n,Yc}var Xc={},Uw;function oq(){if(Uw)return Xc;Uw=1,Object.defineProperty(Xc,"__esModule",{value:!0});const e=qt(),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:n,it:o}){n.if===void 0&&(0,e.checkStrictMode)(o,`"${t}" without "if" is ignored`)}};return Xc.default=i,Xc}var Fw;function sq(){if(Fw)return Dc;Fw=1,Object.defineProperty(Dc,"__esModule",{value:!0});const e=zM(),i=Xk(),t=GM(),n=Qk(),o=Jk(),s=Zk(),l=xk(),c=WM(),f=$k(),p=eq(),y=tq(),h=rq(),g=nq(),A=iq(),N=aq(),R=oq();function O(M=!1){const _=[y.default,h.default,g.default,A.default,N.default,R.default,l.default,c.default,s.default,f.default,p.default];return M?_.push(i.default,n.default):_.push(e.default,t.default),_.push(o.default),_}return Dc.default=O,Dc}var Qc={},Jc={},Vw;function uq(){if(Vw)return Jc;Vw=1,Object.defineProperty(Jc,"__esModule",{value:!0});const e=Et(),t={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,o){const{gen:s,data:l,$data:c,schema:f,schemaCode:p,it:y}=n,{opts:h,errSchemaPath:g,schemaEnv:A,self:N}=y;if(!h.validateFormats)return;c?R():O();function R(){const M=s.scopeValue("formats",{ref:N.formats,code:h.code.formats}),_=s.const("fDef",(0,e._)`${M}[${p}]`),I=s.let("fType"),S=s.let("format");s.if((0,e._)`typeof ${_} == "object" && !(${_} instanceof RegExp)`,()=>s.assign(I,(0,e._)`${_}.type || "string"`).assign(S,(0,e._)`${_}.validate`),()=>s.assign(I,(0,e._)`"string"`).assign(S,_)),n.fail$data((0,e.or)(v(),T()));function v(){return h.strictSchema===!1?e.nil:(0,e._)`${p} && !${S}`}function T(){const j=A.$async?(0,e._)`(${_}.async ? await ${S}(${l}) : ${S}(${l}))`:(0,e._)`${S}(${l})`,V=(0,e._)`(typeof ${S} == "function" ? ${j} : ${S}.test(${l}))`;return(0,e._)`${S} && ${S} !== true && ${I} === ${o} && !${V}`}}function O(){const M=N.formats[f];if(!M){v();return}if(M===!0)return;const[_,I,S]=T(M);_===o&&n.pass(j());function v(){if(h.strictSchema===!1){N.logger.warn(V());return}throw new Error(V());function V(){return`unknown format "${f}" ignored in schema at path "${g}"`}}function T(V){const W=V instanceof RegExp?(0,e.regexpCode)(V):h.code.formats?(0,e._)`${h.code.formats}${(0,e.getProperty)(f)}`:void 0,X=s.scopeValue("formats",{key:f,ref:V,code:W});return typeof V=="object"&&!(V instanceof RegExp)?[V.type||"string",V.validate,(0,e._)`${X}.validate`]:["string",V,X]}function j(){if(typeof M=="object"&&!(M instanceof RegExp)&&M.async){if(!A.$async)throw new Error("async format in sync schema");return(0,e._)`await ${S}(${l})`}return typeof I=="function"?(0,e._)`${S}(${l})`:(0,e._)`${S}.test(${l})`}}}};return Jc.default=t,Jc}var Hw;function lq(){if(Hw)return Qc;Hw=1,Object.defineProperty(Qc,"__esModule",{value:!0});const i=[uq().default];return Qc.default=i,Qc}var Za={},zw;function cq(){return zw||(zw=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.contentVocabulary=Za.metadataVocabulary=void 0,Za.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Za.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Za}var Gw;function dq(){if(Gw)return _c;Gw=1,Object.defineProperty(_c,"__esModule",{value:!0});const e=Dk(),i=Yk(),t=sq(),n=lq(),o=cq(),s=[e.default,i.default,(0,t.default)(),n.default,o.metadataVocabulary,o.contentVocabulary];return _c.default=s,_c}var Zc={},gu={},Ww;function fq(){if(Ww)return gu;Ww=1,Object.defineProperty(gu,"__esModule",{value:!0}),gu.DiscrError=void 0;var e;return(function(i){i.Tag="tag",i.Mapping="mapping"})(e||(gu.DiscrError=e={})),gu}var Kw;function pq(){if(Kw)return Zc;Kw=1,Object.defineProperty(Zc,"__esModule",{value:!0});const e=Et(),i=fq(),t=M_(),n=Vd(),o=qt(),l={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:c,tagName:f}})=>c===i.DiscrError.Tag?`tag "${f}" must be string`:`value of tag "${f}" must be in oneOf`,params:({params:{discrError:c,tag:f,tagName:p}})=>(0,e._)`{error: ${c}, tag: ${p}, tagValue: ${f}}`},code(c){const{gen:f,data:p,schema:y,parentSchema:h,it:g}=c,{oneOf:A}=h;if(!g.opts.discriminator)throw new Error("discriminator: requires discriminator option");const N=y.propertyName;if(typeof N!="string")throw new Error("discriminator: requires propertyName");if(y.mapping)throw new Error("discriminator: mapping is not supported");if(!A)throw new Error("discriminator: requires oneOf keyword");const R=f.let("valid",!1),O=f.const("tag",(0,e._)`${p}${(0,e.getProperty)(N)}`);f.if((0,e._)`typeof ${O} == "string"`,()=>M(),()=>c.error(!1,{discrError:i.DiscrError.Tag,tag:O,tagName:N})),c.ok(R);function M(){const S=I();f.if(!1);for(const v in S)f.elseIf((0,e._)`${O} === ${v}`),f.assign(R,_(S[v]));f.else(),c.error(!1,{discrError:i.DiscrError.Mapping,tag:O,tagName:N}),f.endIf()}function _(S){const v=f.name("valid"),T=c.subschema({keyword:"oneOf",schemaProp:S},v);return c.mergeEvaluated(T,e.Name),v}function I(){var S;const v={},T=V(h);let j=!0;for(let fe=0;fe<A.length;fe++){let Ae=A[fe];if(Ae?.$ref&&!(0,o.schemaHasRulesButRef)(Ae,g.self.RULES)){const Ee=Ae.$ref;if(Ae=t.resolveRef.call(g.self,g.schemaEnv.root,g.baseId,Ee),Ae instanceof t.SchemaEnv&&(Ae=Ae.schema),Ae===void 0)throw new n.default(g.opts.uriResolver,g.baseId,Ee)}const Se=(S=Ae?.properties)===null||S===void 0?void 0:S[N];if(typeof Se!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${N}"`);j=j&&(T||V(Ae)),W(Se,fe)}if(!j)throw new Error(`discriminator: "${N}" must be required`);return v;function V({required:fe}){return Array.isArray(fe)&&fe.includes(N)}function W(fe,Ae){if(fe.const)X(fe.const,Ae);else if(fe.enum)for(const Se of fe.enum)X(Se,Ae);else throw new Error(`discriminator: "properties/${N}" must have "const" or "enum"`)}function X(fe,Ae){if(typeof fe!="string"||fe in v)throw new Error(`discriminator: "${N}" values must be unique strings`);v[fe]=Ae}}}};return Zc.default=l,Zc}const hq="http://json-schema.org/draft-07/schema#",mq="http://json-schema.org/draft-07/schema#",yq="Core schema meta-schema",gq={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},vq=["object","boolean"],_q={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},Eq={$schema:hq,$id:mq,title:yq,definitions:gq,type:vq,properties:_q,default:!0};var Yw;function Hd(){return Yw||(Yw=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.MissingRefError=i.ValidationError=i.CodeGen=i.Name=i.nil=i.stringify=i.str=i._=i.KeywordCxt=i.Ajv=void 0;const t=Ck(),n=dq(),o=pq(),s=Eq,l=["/properties"],c="http://json-schema.org/draft-07/schema";class f extends t.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(N=>this.addVocabulary(N)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const N=this.opts.$data?this.$dataMetaSchema(s,l):s;this.addMetaSchema(N,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}i.Ajv=f,e.exports=i=f,e.exports.Ajv=f,Object.defineProperty(i,"__esModule",{value:!0}),i.default=f;var p=pl();Object.defineProperty(i,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var y=Et();Object.defineProperty(i,"_",{enumerable:!0,get:function(){return y._}}),Object.defineProperty(i,"str",{enumerable:!0,get:function(){return y.str}}),Object.defineProperty(i,"stringify",{enumerable:!0,get:function(){return y.stringify}}),Object.defineProperty(i,"nil",{enumerable:!0,get:function(){return y.nil}}),Object.defineProperty(i,"Name",{enumerable:!0,get:function(){return y.Name}}),Object.defineProperty(i,"CodeGen",{enumerable:!0,get:function(){return y.CodeGen}});var h=N_();Object.defineProperty(i,"ValidationError",{enumerable:!0,get:function(){return h.default}});var g=Vd();Object.defineProperty(i,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})(hc,hc.exports)),hc.exports}var ju={exports:{}},Lu={exports:{}},Du={exports:{}},xc={exports:{}},Xw;function bq(){return Xw||(Xw=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t=Et(),n=["undefined","string","number","object","function","boolean","symbol"];function o(){return{keyword:"typeof",schemaType:["string","array"],code(s){const{data:l,schema:c,schemaValue:f}=s;s.fail(typeof c=="string"?(0,t._)`typeof ${l} != ${c}`:(0,t._)`${f}.indexOf(typeof ${l}) < 0`)},metaSchema:{anyOf:[{type:"string",enum:n},{type:"array",items:{type:"string",enum:n}}]}}}i.default=o,e.exports=o})(xc,xc.exports)),xc.exports}var Qw=Du.exports,Jw;function wq(){return Jw||(Jw=1,(function(e,i){var t=Qw&&Qw.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(bq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Du,Du.exports)),Du.exports}var ku={exports:{}},$c={exports:{}},Zw;function Sq(){return Zw||(Zw=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t={Object,Array,Function,Number,String,Date,RegExp};typeof Buffer<"u"&&(t.Buffer=Buffer),typeof Promise<"u"&&(t.Promise=Promise);const n=Object.assign(o,{CONSTRUCTORS:t});function o(){return{keyword:"instanceof",schemaType:["string","array"],compile(l){if(typeof l=="string"){const c=s(l);return f=>f instanceof c}if(Array.isArray(l)){const c=l.map(s);return f=>{for(const p of c)if(f instanceof p)return!0;return!1}}throw new Error("ajv implementation error")},metaSchema:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}}function s(l){const c=t[l];if(c)return c;throw new Error(`invalid "instanceof" keyword value ${l}`)}i.default=n,e.exports=n})($c,$c.exports)),$c.exports}var xw=ku.exports,$w;function Tq(){return $w||($w=1,(function(e,i){var t=xw&&xw.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Sq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(ku,ku.exports)),ku.exports}var qu={exports:{}},Bu={exports:{}},ed={},eS;function KM(){if(eS)return ed;eS=1,Object.defineProperty(ed,"__esModule",{value:!0});function e(i){return()=>({keyword:i,type:"number",schemaType:"array",macro:function([n,o]){return t(n,o),i==="range"?{minimum:n,maximum:o}:{exclusiveMinimum:n,exclusiveMaximum:o}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}});function t(n,o){if(n>o||i==="exclusiveRange"&&n===o)throw new Error("There are no numbers in range")}}return ed.default=e,ed}var tS=Bu.exports,rS;function Aq(){return rS||(rS=1,(function(e,i){var t=tS&&tS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const o=(0,t(KM()).default)("range");i.default=o,e.exports=o})(Bu,Bu.exports)),Bu.exports}var nS=qu.exports,iS;function Oq(){return iS||(iS=1,(function(e,i){var t=nS&&nS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Aq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(qu,qu.exports)),qu.exports}var Uu={exports:{}},Fu={exports:{}},aS=Fu.exports,oS;function Pq(){return oS||(oS=1,(function(e,i){var t=aS&&aS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const o=(0,t(KM()).default)("exclusiveRange");i.default=o,e.exports=o})(Fu,Fu.exports)),Fu.exports}var sS=Uu.exports,uS;function Iq(){return uS||(uS=1,(function(e,i){var t=sS&&sS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Pq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Uu,Uu.exports)),Uu.exports}var Vu={exports:{}},td={exports:{}},xa={},lS;function zd(){if(lS)return xa;lS=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.usePattern=xa.metaSchemaRef=void 0;const e=Et(),i="http://json-schema.org/schema";function t({defaultMeta:o}={}){return o===!1?{}:{$ref:o||i}}xa.metaSchemaRef=t;function n({gen:o,it:{opts:s}},l,c=s.unicodeRegExp?"u":""){const f=new RegExp(l,c);return o.scopeValue("pattern",{key:f.toString(),ref:f,code:(0,e._)`new RegExp(${l}, ${c})`})}return xa.usePattern=n,xa}var cS;function Rq(){return cS||(cS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t=Et(),n=zd(),o={type:"object",properties:{pattern:{type:"string"},flags:{type:"string",nullable:!0}},required:["pattern"],additionalProperties:!1},s=/^\/(.*)\/([gimuy]*)$/;function l(){return{keyword:"regexp",type:"string",schemaType:["string","object"],code(c){const{data:f,schema:p}=c,y=h(p);c.pass((0,t._)`${y}.test(${f})`);function h(g){if(typeof g=="object")return(0,n.usePattern)(c,g.pattern,g.flags);const A=s.exec(g);if(A)return(0,n.usePattern)(c,A[1],A[2]);throw new Error("cannot parse string into RegExp")}},metaSchema:{anyOf:[{type:"string"},o]}}}i.default=l,e.exports=l})(td,td.exports)),td.exports}var dS=Vu.exports,fS;function Nq(){return fS||(fS=1,(function(e,i){var t=dS&&dS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Rq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Vu,Vu.exports)),Vu.exports}var Hu={exports:{}},rd={exports:{}},pS;function Mq(){return pS||(pS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t=Et(),n={trimStart:f=>f.trimStart(),trimEnd:f=>f.trimEnd(),trimLeft:f=>f.trimStart(),trimRight:f=>f.trimEnd(),trim:f=>f.trim(),toLowerCase:f=>f.toLowerCase(),toUpperCase:f=>f.toUpperCase(),toEnumCase:(f,p)=>p?.hash[c(f)]||f},o=Object.assign(s,{transform:n});function s(){return{keyword:"transform",schemaType:"array",before:"enum",code(f){const{gen:p,data:y,schema:h,parentSchema:g,it:A}=f,{parentData:N,parentDataProperty:R}=A,O=h;if(!O.length)return;let M;if(O.includes("toEnumCase")){const I=l(g);M=p.scopeValue("obj",{ref:I,code:(0,t.stringify)(I)})}p.if((0,t._)`typeof ${y} == "string" && ${N} !== undefined`,()=>{p.assign(y,_(O.slice())),p.assign((0,t._)`${N}[${R}]`,y)});function _(I){if(!I.length)return y;const S=I.pop();if(!(S in n))throw new Error(`transform: unknown transformation ${S}`);const v=p.scopeValue("func",{ref:n[S],code:(0,t._)`require("ajv-keywords/dist/definitions/transform").transform${(0,t.getProperty)(S)}`}),T=_(I);return M&&S==="toEnumCase"?(0,t._)`${v}(${T}, ${M})`:(0,t._)`${v}(${T})`}},metaSchema:{type:"array",items:{type:"string",enum:Object.keys(n)}}}}function l(f){const p={hash:{}};if(!f.enum)throw new Error('transform: "toEnumCase" requires "enum"');for(const y of f.enum){if(typeof y!="string")continue;const h=c(y);if(p.hash[h])throw new Error('transform: "toEnumCase" requires all lowercased "enum" values to be unique');p.hash[h]=y}return p}function c(f){return f.toLowerCase()}i.default=o,e.exports=o})(rd,rd.exports)),rd.exports}var hS=Hu.exports,mS;function Cq(){return mS||(mS=1,(function(e,i){var t=hS&&hS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Mq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Hu,Hu.exports)),Hu.exports}var zu={exports:{}},nd={exports:{}},yS;function jq(){return yS||(yS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t=R_(),n=["number","integer","string","boolean","null"];function o(){return{keyword:"uniqueItemProperties",type:"array",schemaType:"array",compile(l,c){const f=s(l,c);return p=>{if(p.length<=1)return!0;for(let y=0;y<l.length;y++){const h=l[y];if(f[y]){const g={};for(const A of p){if(!A||typeof A!="object")continue;let N=A[h];if(!(N&&typeof N=="object")){if(typeof N=="string"&&(N='"'+N),g[N])return!1;g[N]=!0}}}else for(let g=p.length;g--;){const A=p[g];if(!(!A||typeof A!="object"))for(let N=g;N--;){const R=p[N];if(R&&typeof R=="object"&&t(A[h],R[h]))return!1}}}return!0}},metaSchema:{type:"array",items:{type:"string"}}}}i.default=o;function s(l,c){return l.map(f=>{var p,y,h;const g=(h=(y=(p=c.items)===null||p===void 0?void 0:p.properties)===null||y===void 0?void 0:y[f])===null||h===void 0?void 0:h.type;return Array.isArray(g)?!g.includes("object")&&!g.includes("array"):n.includes(g)})}e.exports=o})(nd,nd.exports)),nd.exports}var gS=zu.exports,vS;function Lq(){return vS||(vS=1,(function(e,i){var t=gS&&gS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(jq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(zu,zu.exports)),zu.exports}var Gu={exports:{}},id={exports:{}},_S;function Dq(){return _S||(_S=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});function t(){return{keyword:"allRequired",type:"object",schemaType:"boolean",macro(n,o){if(!n)return!0;const s=Object.keys(o.properties);return s.length===0?!0:{required:s}},dependencies:["properties"]}}i.default=t,e.exports=t})(id,id.exports)),id.exports}var ES=Gu.exports,bS;function kq(){return bS||(bS=1,(function(e,i){var t=ES&&ES.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Dq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Gu,Gu.exports)),Gu.exports}var Wu={exports:{}},Ku={exports:{}},ad={},wS;function YM(){if(wS)return ad;wS=1,Object.defineProperty(ad,"__esModule",{value:!0});function e(i){return()=>({keyword:i,type:"object",schemaType:"array",macro(t){return t.length===0?!0:t.length===1?{required:t}:{[i==="anyRequired"?"anyOf":"oneOf"]:t.map(o=>({required:[o]}))}},metaSchema:{type:"array",items:{type:"string"}}})}return ad.default=e,ad}var SS=Ku.exports,TS;function qq(){return TS||(TS=1,(function(e,i){var t=SS&&SS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const o=(0,t(YM()).default)("anyRequired");i.default=o,e.exports=o})(Ku,Ku.exports)),Ku.exports}var AS=Wu.exports,OS;function Bq(){return OS||(OS=1,(function(e,i){var t=AS&&AS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(qq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Wu,Wu.exports)),Wu.exports}var Yu={exports:{}},Xu={exports:{}},PS=Xu.exports,IS;function Uq(){return IS||(IS=1,(function(e,i){var t=PS&&PS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const o=(0,t(YM()).default)("oneRequired");i.default=o,e.exports=o})(Xu,Xu.exports)),Xu.exports}var RS=Yu.exports,NS;function Fq(){return NS||(NS=1,(function(e,i){var t=RS&&RS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Uq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Yu,Yu.exports)),Yu.exports}var Qu={exports:{}},od={exports:{}},MS;function Vq(){return MS||(MS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t=Et(),n=zd(),o={message:({params:{missingPattern:l}})=>(0,t.str)`should have property matching pattern '${l}'`,params:({params:{missingPattern:l}})=>(0,t._)`{missingPattern: ${l}}`};function s(){return{keyword:"patternRequired",type:"object",schemaType:"array",error:o,code(l){const{gen:c,schema:f,data:p}=l;if(f.length===0)return;const y=c.let("valid",!0);for(const g of f)h(g);function h(g){const A=c.let("matched",!1);c.forIn("key",p,N=>{c.assign(A,(0,t._)`${(0,n.usePattern)(l,g)}.test(${N})`),c.if(A,()=>c.break())}),l.setParams({missingPattern:g}),c.assign(y,(0,t.and)(y,A)),l.pass(y)}},metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:!0}}}i.default=s,e.exports=s})(od,od.exports)),od.exports}var CS=Qu.exports,jS;function Hq(){return jS||(jS=1,(function(e,i){var t=CS&&CS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Vq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Qu,Qu.exports)),Qu.exports}var Ju={exports:{}},sd={exports:{}},LS;function zq(){return LS||(LS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});function t(){return{keyword:"prohibited",type:"object",schemaType:"array",macro:function(n){return n.length===0?!0:n.length===1?{not:{required:n}}:{not:{anyOf:n.map(o=>({required:[o]}))}}},metaSchema:{type:"array",items:{type:"string"}}}}i.default=t,e.exports=t})(sd,sd.exports)),sd.exports}var DS=Ju.exports,kS;function Gq(){return kS||(kS=1,(function(e,i){var t=DS&&DS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(zq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Ju,Ju.exports)),Ju.exports}var Zu={exports:{}},ud={exports:{}},qS;function Wq(){return qS||(qS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t=zd();function n(l){return{keyword:"deepProperties",type:"object",schemaType:"object",macro:function(c){const f=[];for(const p in c)f.push(o(p,c[p]));return{allOf:f}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:(0,t.metaSchemaRef)(l)}}}i.default=n;function o(l,c){const f=l.split("/"),p={};let y=p;for(let h=1;h<f.length;h++){let g=f[h];const A=h===f.length-1;g=s(g);const N=y.properties={};let R;if(/[0-9]+/.test(g)){let O=+g;for(R=y.items=[],y.type=["object","array"];O--;)R.push({})}else y.type="object";y=A?c:{},N[g]=y,R&&R.push(y)}return p}function s(l){return l.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=n})(ud,ud.exports)),ud.exports}var BS=Zu.exports,US;function Kq(){return US||(US=1,(function(e,i){var t=BS&&BS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Wq()),o=(s,l)=>s.addKeyword((0,n.default)(l));i.default=o,e.exports=o})(Zu,Zu.exports)),Zu.exports}var xu={exports:{}},ld={exports:{}},FS;function Yq(){return FS||(FS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t=Et();function n(){return{keyword:"deepRequired",type:"object",schemaType:"array",code(s){const{schema:l,data:c}=s,f=l.map(y=>(0,t._)`(${p(y)}) === undefined`);s.fail((0,t.or)(...f));function p(y){if(y==="")throw new Error("empty JSON pointer not allowed");const h=y.split("/");let g=c;const A=h.map((N,R)=>R?g=(0,t._)`${g}${(0,t.getProperty)(o(N))}`:g);return(0,t.and)(...A)}},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}}}i.default=n;function o(s){return s.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=n})(ld,ld.exports)),ld.exports}var VS=xu.exports,HS;function Xq(){return HS||(HS=1,(function(e,i){var t=VS&&VS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Yq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(xu,xu.exports)),xu.exports}var $u={exports:{}},cd={exports:{}},zS;function Qq(){return zS||(zS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t={},n={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:y=>{var h;const g=(h=y?.max)!==null&&h!==void 0?h:2;return()=>Math.floor(Math.random()*g)},seq:y=>{var h;const g=(h=y?.name)!==null&&h!==void 0?h:"";return t[g]||(t[g]=0),()=>t[g]++}},o=Object.assign(s,{DEFAULTS:n});function s(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(y,h,g){if(!g.opts.useDefaults||g.compositeRule)return()=>!0;const A={};for(const R in y)A[R]=l(y[R]);const N=g.opts.useDefaults==="empty";return R=>{for(const O in y)(R[O]===void 0||N&&(R[O]===null||R[O]===""))&&(R[O]=A[O]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function l(y){return typeof y=="object"?c(y):f(y)}function c({func:y,args:h}){const g=n[y];return p(y,g),g(h)}function f(y=""){const h=n[y];return p(y,h),h()}function p(y,h){if(!h)throw new Error(`invalid "dynamicDefaults" keyword property value: ${y}`)}i.default=o,e.exports=o})(cd,cd.exports)),cd.exports}var GS=$u.exports,WS;function Jq(){return WS||(WS=1,(function(e,i){var t=GS&&GS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Qq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})($u,$u.exports)),$u.exports}var el={exports:{}},dd={exports:{}},KS;function Zq(){return KS||(KS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t=Et(),n=zd(),o={message:({params:{schemaProp:l}})=>l?(0,t.str)`should match case "${l}" schema`:(0,t.str)`should match default case schema`,params:({params:{schemaProp:l}})=>l?(0,t._)`{failingCase: ${l}}`:(0,t._)`{failingDefault: true}`};function s(l){const c=(0,n.metaSchemaRef)(l);return[{keyword:"select",schemaType:["string","number","boolean","null"],$data:!0,error:o,dependencies:["selectCases"],code(f){const{gen:p,schemaCode:y,parentSchema:h}=f;f.block$data(t.nil,()=>{const g=p.let("valid",!0),A=p.name("_valid"),N=p.const("value",(0,t._)`${y} === null ? "null" : ${y}`);p.if(!1);for(const R in h.selectCases){f.setParams({schemaProp:R}),p.elseIf((0,t._)`"" + ${N} == ${R}`);const O=f.subschema({keyword:"selectCases",schemaProp:R},A);f.mergeEvaluated(O,t.Name),p.assign(g,A)}if(p.else(),h.selectDefault!==void 0){f.setParams({schemaProp:void 0});const R=f.subschema({keyword:"selectDefault"},A);f.mergeEvaluated(R,t.Name),p.assign(g,A)}p.endIf(),f.pass(g)})}},{keyword:"selectCases",dependencies:["select"],metaSchema:{type:"object",additionalProperties:c}},{keyword:"selectDefault",dependencies:["select","selectCases"],metaSchema:c}]}i.default=s,e.exports=s})(dd,dd.exports)),dd.exports}var YS=el.exports,XS;function xq(){return XS||(XS=1,(function(e,i){var t=YS&&YS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Zq()),o=(s,l)=>((0,n.default)(l).forEach(c=>s.addKeyword(c)),s);i.default=o,e.exports=o})(el,el.exports)),el.exports}var QS=Lu.exports,JS;function $q(){return JS||(JS=1,(function(e,i){var t=QS&&QS.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(wq()),o=t(Tq()),s=t(Oq()),l=t(Iq()),c=t(Nq()),f=t(Cq()),p=t(Lq()),y=t(kq()),h=t(Bq()),g=t(Fq()),A=t(Hq()),N=t(Gq()),R=t(Kq()),O=t(Xq()),M=t(Jq()),_=t(xq()),I={typeof:n.default,instanceof:o.default,range:s.default,exclusiveRange:l.default,regexp:c.default,transform:f.default,uniqueItemProperties:p.default,allRequired:y.default,anyRequired:h.default,oneRequired:g.default,patternRequired:A.default,prohibited:N.default,deepProperties:R.default,deepRequired:O.default,dynamicDefaults:M.default,select:_.default};i.default=I,e.exports=I})(Lu,Lu.exports)),Lu.exports}var ZS=ju.exports,xS;function j_(){return xS||(xS=1,(function(e,i){var t=ZS&&ZS.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(i,"__esModule",{value:!0});const n=t($q()),o=(l,c)=>{if(Array.isArray(c)){for(const f of c)s(f)(l);return l}if(c)return s(c)(l),l;for(c in n.default)s(c)(l);return l};o.get=s;function s(l){const c=n.default[l];if(!c)throw new Error("Unknown keyword "+l);return c}i.default=o,e.exports=o,e.exports.default=o})(ju,ju.exports)),ju.exports}var fd={exports:{}},$S;function L_(){return $S||($S=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t=Hd(),n=Et(),o=al(),s=pl(),l=fl(),c=Xi(),f="errorMessage",p=new t.Name("emUsed"),y={required:"missingProperty",dependencies:"property",dependentRequired:"property"},h=/\$\{[^}]+\}/,g=/\$\{([^}]+)\}/g,A=/^""\s*\+\s*|\s*\+\s*""$/g;function N(O){return{keyword:f,schemaType:["string","object"],post:!0,code(M){const{gen:_,data:I,schema:S,schemaValue:v,it:T}=M;if(T.createErrors===!1)return;const j=S,V=n.strConcat(c.default.instancePath,T.errorPath);_.if(t._`${c.default.errors} > 0`,()=>{if(typeof j=="object"){const[q,L]=X(j);L&&fe(L),q&&Ae(q),Se(W(j))}const B=typeof j=="string"?j:j._;B&&Ee(B),O.keepErrors||je()});function W({properties:B,items:q}){const L={};if(B){L.props={};for(const U in B)L.props[U]=[]}if(q){L.items={};for(let U=0;U<q.length;U++)L.items[U]=[]}return L}function X(B){let q,L;for(const U in B){if(U==="properties"||U==="items")continue;const ae=B[U];if(typeof ae=="object"){q||(q={});const Ie=q[U]={};for(const Te in ae)Ie[Te]=[]}else L||(L={}),L[U]=[]}return[q,L]}function fe(B){const q=_.const("emErrors",t.stringify(B)),L=_.const("templates",ie(B,S));_.forOf("err",c.default.vErrors,Te=>_.if(Ce(Te,q),()=>_.code(t._`${q}[${Te}.keyword].push(${Te})`).assign(t._`${Te}.${p}`,!0)));const{singleError:U}=O;if(U){const Te=_.let("message",t._`""`),ke=_.let("paramsErrors",t._`[]`);ae(Me=>{_.if(Te,()=>_.code(t._`${Te} += ${typeof U=="string"?U:";"}`)),_.code(t._`${Te} += ${Ie(Me)}`),_.assign(ke,t._`${ke}.concat(${q}[${Me}])`)}),l.reportError(M,{message:Te,params:t._`{errors: ${ke}}`})}else ae(Te=>l.reportError(M,{message:Ie(Te),params:t._`{errors: ${q}[${Te}]}`}));function ae(Te){_.forIn("key",q,ke=>_.if(t._`${q}[${ke}].length`,()=>Te(ke)))}function Ie(Te){return t._`${Te} in ${L} ? ${L}[${Te}]() : ${v}[${Te}]`}}function Ae(B){const q=_.const("emErrors",t.stringify(B)),L=[];for(const ke in B)L.push([ke,ie(B[ke],S[ke])]);const U=_.const("templates",_.object(...L)),ae=_.scopeValue("obj",{ref:y,code:t.stringify(y)}),Ie=_.let("emPropParams"),Te=_.let("emParamsErrors");_.forOf("err",c.default.vErrors,ke=>_.if(Ce(ke,q),()=>{_.assign(Ie,t._`${ae}[${ke}.keyword]`),_.assign(Te,t._`${q}[${ke}.keyword][${ke}.params[${Ie}]]`),_.if(Te,()=>_.code(t._`${Te}.push(${ke})`).assign(t._`${ke}.${p}`,!0))})),_.forIn("key",q,ke=>_.forIn("keyProp",t._`${q}[${ke}]`,Me=>{_.assign(Te,t._`${q}[${ke}][${Me}]`),_.if(t._`${Te}.length`,()=>{const ue=_.const("tmpl",t._`${U}[${ke}] && ${U}[${ke}][${Me}]`);l.reportError(M,{message:t._`${ue} ? ${ue}() : ${v}[${ke}][${Me}]`,params:t._`{errors: ${Te}}`})})}))}function Se(B){const{props:q,items:L}=B;if(!q&&!L)return;const U=t._`typeof ${I} == "object"`,ae=t._`Array.isArray(${I})`,Ie=_.let("emErrors");let Te,ke;const Me=_.let("templates");q&&L?(Te=_.let("emChildKwd"),_.if(U),_.if(ae,()=>{ue(L,S.items),_.assign(Te,t.str`items`)},()=>{ue(q,S.properties),_.assign(Te,t.str`properties`)}),ke=t._`[${Te}]`):L?(_.if(ae),ue(L,S.items),ke=t._`.items`):q&&(_.if(n.and(U,n.not(ae))),ue(q,S.properties),ke=t._`.properties`),_.forOf("err",c.default.vErrors,de=>Oe(de,Ie,Re=>_.code(t._`${Ie}[${Re}].push(${de})`).assign(t._`${de}.${p}`,!0))),_.forIn("key",Ie,de=>_.if(t._`${Ie}[${de}].length`,()=>{l.reportError(M,{message:t._`${de} in ${Me} ? ${Me}[${de}]() : ${v}${ke}[${de}]`,params:t._`{errors: ${Ie}[${de}]}`}),_.assign(t._`${c.default.vErrors}[${c.default.errors}-1].instancePath`,t._`${V} + "/" + ${de}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),_.endIf();function ue(de,Re){_.assign(Ie,t.stringify(de)),_.assign(Me,ie(de,Re))}}function Ee(B){const q=_.const("emErrs",t._`[]`);_.forOf("err",c.default.vErrors,L=>_.if(ge(L),()=>_.code(t._`${q}.push(${L})`).assign(t._`${L}.${p}`,!0))),_.if(t._`${q}.length`,()=>l.reportError(M,{message:K(B),params:t._`{errors: ${q}}`}))}function je(){const B=_.const("emErrs",t._`[]`);_.forOf("err",c.default.vErrors,q=>_.if(t._`!${q}.${p}`,()=>_.code(t._`${B}.push(${q})`))),_.assign(c.default.vErrors,B).assign(c.default.errors,t._`${B}.length`)}function Ce(B,q){return n.and(t._`${B}.keyword !== ${f}`,t._`!${B}.${p}`,t._`${B}.instancePath === ${V}`,t._`${B}.keyword in ${q}`,t._`${B}.schemaPath.indexOf(${T.errSchemaPath}) === 0`,t._`/^\\/[^\\/]*$/.test(${B}.schemaPath.slice(${T.errSchemaPath.length}))`)}function Oe(B,q,L){_.if(n.and(t._`${B}.keyword !== ${f}`,t._`!${B}.${p}`,t._`${B}.instancePath.indexOf(${V}) === 0`),()=>{const U=_.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:t._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),ae=_.const("emMatches",t._`${U}.exec(${B}.instancePath.slice(${V}.length))`),Ie=_.const("emChild",t._`${ae} && ${ae}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);_.if(t._`${Ie} !== undefined && ${Ie} in ${q}`,()=>L(Ie))})}function ge(B){return n.and(t._`${B}.keyword !== ${f}`,t._`!${B}.${p}`,n.or(t._`${B}.instancePath === ${V}`,n.and(t._`${B}.instancePath.indexOf(${V}) === 0`,t._`${B}.instancePath[${V}.length] === "/"`)),t._`${B}.schemaPath.indexOf(${T.errSchemaPath}) === 0`,t._`${B}.schemaPath[${T.errSchemaPath}.length] === "/"`)}function ie(B,q){const L=[];for(const U in B){const ae=q[U];h.test(ae)&&L.push([U,C(ae)])}return _.object(...L)}function K(B){return h.test(B)?new o._Code(o.safeStringify(B).replace(g,(q,L)=>`" + JSON.stringify(${s.getData(L,T)}) + "`).replace(A,"")):t.stringify(B)}function C(B){return t._`function(){return ${K(B)}}`}},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const R=(O,M={})=>{if(!O.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(O.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return O.addKeyword(N(M))};i.default=R,e.exports=R,e.exports.default=R})(fd,fd.exports)),fd.exports}var eT;function He(){if(eT)return Xn;eT=1;var e=Xn&&Xn.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.validateType=Xn.generateLazyValidator=Xn.Ajv=void 0;const i=e(Hd());Xn.Ajv=i.default;const t=e(j_()),n=e(L_());function o(l,c){let f=null;const p=(y,h)=>{if(!f){const g=new i.default({$data:!0,allErrors:!0});(0,t.default)(g),(0,n.default)(g,{singleError:!0}),c?.forEach(A=>g.addKeyword(A)),f=g.compile(l),Object.defineProperty(p,"errors",{get(){return f?.errors}})}return f(y,h)};return p}Xn.generateLazyValidator=o;function s(l,c){return l.validate(c)}return Xn.validateType=s,Xn}var tT;function e1(){return tT||(tT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const i=He();e.SCENE_UPDATE="SCENE_UPDATE",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(Np)),Np}var Vp={},rT;function t1(){return rT||(rT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const i=He();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})(Vp)),Vp}var nT;function r1(){return nT||(nT=1,(function(e){var i=Xa&&Xa.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Xa&&Xa.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(e1(),e),t(t1(),e)})(Xa)),Xa}var $a={},Hp={},iT;function n1(){return iT||(iT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const i=He();(function(t){t.SCENE="scene",t.SMART_ITEM="smart-item",t.PORTABLE_EXPERIENCE="portable-experience",t.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(Hp)),Hp}var zp={},Gp={},aT;function Gd(){return aT||(aT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const i=He();(function(t){t.UNIQUE="unique",t.MYTHIC="mythic",t.EXOTIC="exotic",t.LEGENDARY="legendary",t.EPIC="epic",t.RARE="rare",t.UNCOMMON="uncommon",t.COMMON="common"})(e.Rarity||(e.Rarity={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema);const n={[t.UNIQUE]:1,[t.MYTHIC]:10,[t.EXOTIC]:50,[t.LEGENDARY]:100,[t.EPIC]:1e3,[t.RARE]:5e3,[t.UNCOMMON]:1e4,[t.COMMON]:1e5},o={[t.UNIQUE]:"#FFE617",[t.MYTHIC]:"#FB7DE3",[t.EXOTIC]:"#E4FFB8",[t.LEGENDARY]:"#A657ED",[t.EPIC]:"#6397F2",[t.RARE]:"#3AD682",[t.UNCOMMON]:"#FF8563",[t.COMMON]:"#D4E0E0"},s={[t.UNIQUE]:"#FFB626",[t.MYTHIC]:"#FF63E1",[t.EXOTIC]:"#CAFF73",[t.LEGENDARY]:"#842DDA",[t.EPIC]:"#3D85E6",[t.RARE]:"#36CF75",[t.UNCOMMON]:"#ED6D4F",[t.COMMON]:"#ABC1C1"};function l(y){return n[y]}t.getMaxSupply=l;function c(y){return s[y]}t.getColor=c;function f(){return[t.UNIQUE,t.MYTHIC,t.EXOTIC,t.LEGENDARY,t.EPIC,t.RARE,t.UNCOMMON,t.COMMON]}t.getRarities=f;function p(y){return[o[y],s[y]]}t.getGradient=p})(e.Rarity||(e.Rarity={}))})(Gp)),Gp}var Wp={},oT;function Uo(){return oT||(oT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const i=He();(function(t){t.EYEBROWS="eyebrows",t.EYES="eyes",t.FACIAL_HAIR="facial_hair",t.HAIR="hair",t.BODY_SHAPE="body_shape",t.MOUTH="mouth",t.UPPER_BODY="upper_body",t.LOWER_BODY="lower_body",t.FEET="feet",t.EARRING="earring",t.EYEWEAR="eyewear",t.HAT="hat",t.HELMET="helmet",t.MASK="mask",t.TIARA="tiara",t.TOP_HEAD="top_head",t.SKIN="skin",t.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(Wp)),Wp}var Kp={},Yp={},sT;function D_(){return sT||(sT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const i=He();(function(t){t.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",t.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(Yp)),Yp}var Xp={},Qp={},uT;function XM(){return uT||(uT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const i=He();(function(t){t.HEAD="head",t.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(Qp)),Qp}var lT;function k_(){return lT||(lT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const i=Uo(),t=He(),n=XM();(function(o){o.schema={oneOf:[Object.assign({},i.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(Xp)),Xp}var cT;function q_(){return cT||(cT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const i=He(),t=D_(),n=k_();(function(o){o.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(Kp)),Kp}var eo={},to={},Jp={},Zp={},dT;function Fo(){return dT||(dT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const i=He();(function(t){t.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const n=(0,i.generateLazyValidator)(t.schema);t.validate=o=>n(o)})(e.Color3||(e.Color3={})),(function(t){t.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.EthAddress||(e.EthAddress={})),(function(t){t.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.IPFSv2||(e.IPFSv2={})),(function(t){t.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.IPFSv1||(e.IPFSv1={}))})(Zp)),Zp}var fT;function QM(){return fT||(fT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const i=Uo(),t=Fo(),n=He();var o;(function(f){f.schema={type:"object",required:["face256","body"],properties:{face256:t.IPFSv2.schema,body:t.IPFSv2.schema}},f.validate=(0,n.generateLazyValidator)(f.schema)})(o=e.Snapshots||(e.Snapshots={}));var s;(function(f){f.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:i.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:Object.assign(Object.assign({},o.schema),{nullable:!0})},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(s=e.AvatarInfo||(e.AvatarInfo={}));var l;(function(f){f.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const p=new RegExp(f.schema.pattern,"i");f.validate=y=>p.test(y)})(l=e.LinkUrl||(e.LinkUrl={}));var c;(function(f){f.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:l.schema}}})(c=e.Link||(e.Link={})),(function(f){f.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:c.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:t.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:s.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(e.Avatar||(e.Avatar={}))})(Jp)),Jp}var xp={},pT;function i1(){return pT||(pT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const i=He(),t=QM();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(xp)),xp}var hT;function a1(){return hT||(hT=1,(function(e){var i=to&&to.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=to&&to.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(QM(),e),t(i1(),e)})(to)),to}var $p={},eh={},mT;function JM(){return mT||(mT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const i=He();e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],(function(t){t.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(eh)),eh}var th={},yT;function ZM(){return yT||(yT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const i=He();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(th)),th}var rh={},gT;function xM(){return gT||(gT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const i=He();(function(t){t.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},t.schemaValidator=(0,i.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(rh)),rh}var nh={},vu={},vT;function B_(){return vT||(vT=1,Object.defineProperty(vu,"__esModule",{value:!0}),vu.displayableProperties=void 0,vu.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),vu}var ih={},_T;function $M(){return _T||(_T=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const i=He();(function(t){t.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(ih)),ih}var ah={},ET;function eC(){return ET||(ET=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const i=He();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(ah)),ah}var bT;function o1(){return bT||(bT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const i=He(),t=B_(),n=JM(),o=xM(),s=$M(),l=eC(),c=ZM();var f;(function(p){p.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",p.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",p.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",p.USE_WEB3_API="USE_WEB3_API",p.USE_FETCH="USE_FETCH",p.USE_WEBSOCKET="USE_WEBSOCKET",p.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(f=e.RequiredPermission||(e.RequiredPermission={})),(function(p){p.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:o.SceneParcels.schema},t.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},creator:{type:"string",nullable:!0,description:"Wallet address of the creator of the scene",pattern:"^(0x[a-fA-F0-9]{40})?$",errorMessage:"Creator must be a valid wallet address"},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},s.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:l.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(f)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},c.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:f.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},p.validate=(0,i.generateLazyValidator)(p.schema)})(e.Scene||(e.Scene={}))})(nh)),nh}var wT;function s1(){return wT||(wT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var i=JM();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return i.FeatureToggles}});var t=ZM();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=xM();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var o=o1();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return o.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return o.RequiredPermission}});var s=$M();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return s.Source}});var l=eC();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return l.SpawnPoint}})})($p)),$p}var ro={},oh={},sh={},ST;function tC(){return ST||(ST=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const i=He();(function(t){t.EN="en",t.ES="es"})(e.Locale||(e.Locale={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(sh)),sh}var TT;function rC(){return TT||(TT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const i=He(),t=tC();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(oh)),oh}var uh={},AT;function nC(){return AT||(AT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const i=He();(function(t){t.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(uh)),uh}var lh={},OT;function U_(){return OT||(OT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const i=Gd(),t=He();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:i.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},o=(0,t.generateLazyValidator)(n);function s(l){return o(l)}e.isStandard=s})(lh)),lh}var ch={},no={},dh={},PT;function u1(){return PT||(PT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const i=He();(function(t){t.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(dh)),dh}var IT;function iC(){return IT||(IT=1,(function(e){var i=no&&no.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=no&&no.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(u1(),e)})(no)),no}var fh={},RT;function F_(){return RT||(RT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMappingsHelper=e.AddMappingError=e.Mappings=e.Mapping=e.MultipleMapping=e.RangeMapping=e.AnyMapping=e.SingleMapping=e.ContractNetwork=e.MappingType=void 0;const i=He();var t;(function(h){h.SINGLE="single",h.ANY="any",h.MULTIPLE="multiple",h.RANGE="range"})(t=e.MappingType||(e.MappingType={}));var n;(function(h){h.MAINNET="mainnet",h.BASE_MAINNET="base_mainnet",h.BASE_SEPOLIA="base_sepolia",h.MONAD_MAINNET="monad_mainnet",h.MONAD_TESTNET="monad_testnet",h.APE_MAINNET="ape_mainnet",h.APE_CALDERA="ape_caldera",h.MATIC="matic",h.SEPOLIA="sepolia",h.AMOY="amoy"})(n=e.ContractNetwork||(e.ContractNetwork={}));var o;(function(h){h.schema={type:"object",properties:{type:{type:"string",const:t.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},h.validate=(0,i.generateLazyValidator)(h.schema)})(o=e.SingleMapping||(e.SingleMapping={}));var s;(function(h){h.schema={type:"object",properties:{type:{type:"string",const:t.ANY}},required:["type"],additionalProperties:!1},h.validate=(0,i.generateLazyValidator)(h.schema)})(s=e.AnyMapping||(e.AnyMapping={}));var l;(function(h){h._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(A,N){if(!N||!N.from||!N.to)return!1;let{to:R,from:O}=N;return(typeof O!="bigint"||typeof R!="bigint")&&(O=BigInt(O),R=BigInt(R)),O<=R},errors:!1},h.schema={type:"object",properties:{type:{type:"string",const:t.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},h.validate=(0,i.generateLazyValidator)(h.schema,[h._fromLessThanOrEqualTo])})(l=e.RangeMapping||(e.RangeMapping={}));var c;(function(h){h.schema={type:"object",properties:{type:{type:"string",const:t.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},h.validate=(0,i.generateLazyValidator)(h.schema)})(c=e.MultipleMapping||(e.MultipleMapping={}));var f;(function(h){h.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)}},required:["type"],oneOf:[o.schema,s.schema,l.schema,c.schema]},h.validate=(0,i.generateLazyValidator)(h.schema,[l._fromLessThanOrEqualTo])})(f=e.Mapping||(e.Mapping={})),(function(h){h._isMappingsValid={keyword:"_isMappingsValid",validate:function(A,N){try{y(N)}catch{return!1}return!0},errors:!1},h.innerSchema={type:"object",patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:"array",items:f.schema}},minProperties:1,required:[],additionalProperties:!1};const g=Object.values(n).reduce((A,N)=>(A[N]=h.innerSchema,A),{});h.schema={type:"object",properties:g,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},h.validate=(0,i.generateLazyValidator)(h.schema,[l._fromLessThanOrEqualTo,h._isMappingsValid])})(e.Mappings||(e.Mappings={}));class p extends Error{constructor(g,A,N){super(g),this.existingMapping=A,this.conflictingMapping=N}}e.AddMappingError=p;function y(h={}){const g={};for(const[v,T]of Object.entries(h)){g[v]={};for(const[j,V]of Object.entries(T))for(const W of V)I(v,j,W)}function A(){return JSON.parse(JSON.stringify(g))}function N(v,T,j){const V=BigInt(v);return V>=BigInt(T)&&V<=BigInt(j)}function R(v,T){switch(T.type){case t.SINGLE:return v.id===T.id;case t.MULTIPLE:return T.ids.includes(v.id);case t.RANGE:return N(v.id,T.from,T.to);default:return!1}}function O(v,T){switch(T.type){case t.SINGLE:return v.ids.includes(T.id);case t.MULTIPLE:return v.ids.some(j=>T.ids.includes(j));case t.RANGE:return v.ids.some(j=>N(j,T.from,T.to));default:return!1}}function M(v,T){switch(T.type){case t.SINGLE:return N(T.id,v.from,v.to);case t.MULTIPLE:return T.ids.some(j=>N(j,v.from,v.to));case t.RANGE:return BigInt(v.from)<=BigInt(T.to)&&BigInt(v.to)>=BigInt(T.from)}}function _(v,T){if(v.type===t.ANY||T.type===t.ANY)return!0;switch(v.type){case t.SINGLE:return R(v,T);case t.MULTIPLE:return O(v,T);case t.RANGE:return M(v,T)}}function I(v,T,j){var V,W;const X=T.toLowerCase();g[v]=(V=g[v])!==null&&V!==void 0?V:{},g[v][X]=(W=g[v][X])!==null&&W!==void 0?W:[];for(const fe of g[v][X])if(_(fe,j))throw new p(`Cannot add mapping to contract ${X} on network ${v} because it overlaps with existing mapping`,fe,j);g[v][X].push(j)}function S(v,T,j){var V;return!((V=g[v])===null||V===void 0)&&V[T]?g[v][T].some(W=>{switch(W.type){case t.SINGLE:return W.id===j;case t.ANY:return!0;case t.MULTIPLE:return W.ids.includes(j);case t.RANGE:return BigInt(j)>=BigInt(W.from)&&BigInt(j)<=BigInt(W.to)}}):!1}return{addMapping:I,getMappings:A,includesNft:S}}e.createMappingsHelper=y})(fh)),fh}var NT;function V_(){return NT||(NT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const i=He(),t=iC(),n=F_();e.schema={type:"object",properties:{merkleProof:t.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]},mappings:Object.assign({nullable:!0},n.Mappings.schema)},required:["merkleProof","content"],_containsHashingKeys:!0};const o={keyword:"_containsHashingKeys",validate:function(c,f){var p;const y=f;return!((p=y?.merkleProof)===null||p===void 0)&&p.hashingKeys?y.merkleProof.hashingKeys.every(h=>y.hasOwnProperty(h)):!1},errors:!1},s=(0,i.generateLazyValidator)(e.schema,[o,n.RangeMapping._fromLessThanOrEqualTo,n.Mappings._isMappingsValid]);function l(c){return s(c)}e.isThirdParty=l})(ch)),ch}var ph={},hh={},Jn={},MT;function aC(){if(MT)return Jn;MT=1,Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.isBaseEmote=Jn.isBaseAvatar=Jn.requiredBaseItemProps=Jn.baseItemProperties=void 0;const e=rC(),i=nC(),t=B_();Jn.baseItemProperties=Object.assign(Object.assign({},t.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:e.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},i.Metrics.schema),{nullable:!0})}),Jn.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(s){if(!s||!s.id)return!1;const l=s.id.split(":"),c=l[1]==="decentraland",f=l[3]==="base-avatars";return l.length===5&&c&&f}Jn.isBaseAvatar=n;function o(s){if(!s||!s.id)return!1;const l=s.id.split(":");return l.length===5&&l[1]==="decentraland"&&l[3]==="base-emotes"}return Jn.isBaseEmote=o,Jn}var CT;function l1(){return CT||(CT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const i=He(),t=Uo(),n=q_(),o=aC(),s=U_(),l=V_(),c=k_(),f=F_();(function(p){p.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},o.baseItemProperties),s.standardProperties),l.schema.properties.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:c.HideableWearableCategory.schema},hides:{type:"array",items:c.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:c.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity","mappings"],_isBaseAvatar:!0},{required:[...o.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[...o.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const y={keyword:"_isThirdParty",validate:(g,A)=>!g||(0,l.isThirdParty)(A),errors:!1},h={keyword:"_isBaseAvatar",validate:(g,A)=>!g||(0,o.isBaseAvatar)(A),errors:!1};p.validate=(0,i.generateLazyValidator)(p.schema,[y,h,f.RangeMapping._fromLessThanOrEqualTo,f.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(hh)),hh}var jT;function c1(){return jT||(jT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var i=q_();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return i.WearableRepresentation}});var t=l1();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=Uo();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var o=XM();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return o.BodyPartCategory}});var s=k_();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return s.HideableWearableCategory}})})(ph)),ph}var mh={},yh={},gh={},vh={},LT;function oC(){return LT||(LT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const i=He();(function(t){t.DANCE="dance",t.STUNT="stunt",t.GREETINGS="greetings",t.FUN="fun",t.POSES="poses",t.REACTIONS="reactions",t.HORROR="horror",t.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(vh)),vh}var _h={},DT;function sC(){return DT||(DT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const i=He(),t=D_();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(_h)),_h}var Eh={},kT;function uC(){return kT||(kT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.OutcomeGroup=e.StartAnimation=e.EmoteClip=e.ArmatureId=void 0;const i=He();var t;(function(o){o.Armature="Armature",o.Armature_Prop="Armature_Prop",o.Armature_Other="Armature_Other"})(t=e.ArmatureId||(e.ArmatureId={})),(function(o){o.schema={type:"string",enum:Object.values(o)},o.validate=(0,i.generateLazyValidator)(o.schema)})(t=e.ArmatureId||(e.ArmatureId={}));var n;(function(o){o.schema={type:"object",properties:{animation:{type:"string",minLength:1,errorMessage:"animation must be a non-empty string (GLB clip name)"}},required:["animation"],additionalProperties:!1,errorMessage:{required:{animation:"animation is required (GLB clip name)"}}},o.validate=(0,i.generateLazyValidator)(o.schema)})(n=e.EmoteClip||(e.EmoteClip={})),(function(o){o.schema={type:"object",properties:{loop:{type:"boolean",errorMessage:"startAnimation.loop must be a boolean"},[t.Armature]:Object.assign(Object.assign({},n.schema),{errorMessage:"startAnimation.Armature is required and must contain valid animation data"}),[t.Armature_Prop]:Object.assign(Object.assign({},n.schema),{nullable:!0,errorMessage:"startAnimation.Armature_Prop must contain valid animation data when provided"}),audio:{type:"string",nullable:!0,errorMessage:"audio must be a string (audio clip filename) when provided"}},required:["loop",t.Armature],additionalProperties:!1,errorMessage:{required:{loop:"startAnimation.loop is required",[t.Armature]:"startAnimation.Armature is required"}}},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.StartAnimation||(e.StartAnimation={})),(function(o){o.schema={type:"object",properties:{title:{type:"string",minLength:1,errorMessage:"outcome.title must be a non-empty string"},loop:{type:"boolean",errorMessage:"outcome.loop must be a boolean"},clips:{type:"object",properties:Object.values(t).reduce((s,l)=>(s[l]=Object.assign(Object.assign({},n.schema),{nullable:!0,errorMessage:`outcome.clips.${l} must contain valid animation data when provided`}),s),{}),additionalProperties:!0,minProperties:1,errorMessage:"outcome.clips must contain at least one armature animation"},audio:{type:"string",nullable:!0,errorMessage:"audio must be a string (audio clip filename) when provided"}},required:["title","loop","clips"],additionalProperties:!1,errorMessage:{required:{title:"outcome.title is required",loop:"outcome.loop is required",clips:"outcome.clips is required"}}},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.OutcomeGroup||(e.OutcomeGroup={}))})(Eh)),Eh}var qT;function lC(){return qT||(qT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const i=oC(),t=He(),n=sC(),o=uC();(function(s){s.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:i.EmoteCategory.schema,loop:{type:"boolean"},startAnimation:Object.assign(Object.assign({},o.StartAnimation.schema),{nullable:!0}),randomizeOutcomes:{type:"boolean",nullable:!0},outcomes:{type:"array",items:o.OutcomeGroup.schema,minItems:1,maxItems:3,nullable:!0}},required:["category","tags","representations","loop"],dependencies:{startAnimation:["randomizeOutcomes","outcomes"],randomizeOutcomes:["startAnimation","outcomes"],outcomes:["startAnimation","randomizeOutcomes"]},additionalProperties:!0},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(gh)),gh}var BT;function d1(){return BT||(BT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const i=cC(),t=He(),n=aC(),o=U_(),s=V_(),l=lC();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),o.standardProperties),s.schema.properties),{emoteDataADR74:l.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseEmote:!0},{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const f={keyword:"_isThirdParty",validate:(y,h)=>!y||(0,i.isThirdParty)(h),errors:!1},p={keyword:"_isBaseEmote",validate:(y,h)=>!y||(0,n.isBaseEmote)(h),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[f,p,i.RangeMapping._fromLessThanOrEqualTo,i.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))})(yh)),yh}var bh={},UT;function f1(){return UT||(UT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const i=He();(function(t){t.SIMPLE="simple",t.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(bh)),bh}var wh={},FT;function p1(){return FT||(FT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=void 0;const i=He();(function(t){t.SIMPLE_OUTCOME="so",t.MULTIPLE_OUTCOME="mo",t.RANDOM_OUTCOME="ro"})(e.EmoteOutcomeType||(e.EmoteOutcomeType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.EmoteOutcomeType||(e.EmoteOutcomeType={}))})(wh)),wh}var VT;function h1(){return VT||(VT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=e.EmotePlayMode=e.EmoteCategory=e.StartAnimation=e.OutcomeGroup=e.EmoteClip=e.ArmatureId=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var i=d1();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return i.Emote}});var t=sC();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=lC();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var o=uC();Object.defineProperty(e,"ArmatureId",{enumerable:!0,get:function(){return o.ArmatureId}}),Object.defineProperty(e,"EmoteClip",{enumerable:!0,get:function(){return o.EmoteClip}}),Object.defineProperty(e,"OutcomeGroup",{enumerable:!0,get:function(){return o.OutcomeGroup}}),Object.defineProperty(e,"StartAnimation",{enumerable:!0,get:function(){return o.StartAnimation}});var s=oC();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return s.EmoteCategory}});var l=f1();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return l.EmotePlayMode}});var c=p1();Object.defineProperty(e,"EmoteOutcomeType",{enumerable:!0,get:function(){return c.EmoteOutcomeType}})})(mh)),mh}var HT;function cC(){return HT||(HT=1,(function(e){var i=ro&&ro.__createBinding||(Object.create?(function(p,y,h,g){g===void 0&&(g=h);var A=Object.getOwnPropertyDescriptor(y,h);(!A||("get"in A?!y.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return y[h]}}),Object.defineProperty(p,g,A)}):(function(p,y,h,g){g===void 0&&(g=h),p[g]=y[h]})),t=ro&&ro.__exportStar||function(p,y){for(var h in p)h!=="default"&&!Object.prototype.hasOwnProperty.call(y,h)&&i(y,p,h)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=rC();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var o=tC();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return o.Locale}});var s=nC();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return s.Metrics}});var l=D_();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return l.BodyShape}});var c=U_();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return c.isStandard}});var f=V_();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return f.isThirdParty}}),t(F_(),e),t(c1(),e),t(h1(),e)})(ro)),ro}var Sh={},Th={},zT;function hl(){return zT||(zT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const i=He();var t;(function(o){o.SIGNER="SIGNER",o.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",o.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",o.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",o.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(o){o.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:t.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},o.validate=(0,i.generateLazyValidator)(o.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(o){o.schema={type:"array",items:n.schema,minItems:1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.AuthChain||(e.AuthChain={}))})(Th)),Th}var GT;function m1(){return GT||(GT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const i=Fo(),t=hl(),n=He();(function(o){o.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:i.IPFSv1.schema}},{properties:{entityId:i.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(o){o.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:i.IPFSv1.schema}},{properties:{entityId:i.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(Sh)),Sh}var Ah={},Oh={},WT;function dC(){return WT||(WT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const i=Fo(),t=He();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[i.IPFSv1.schema,i.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(Oh)),Oh}var KT;function fC(){return KT||(KT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const i=Fo(),t=dC(),n=He();(function(o){o.SCENE="scene",o.PROFILE="profile",o.WEARABLE="wearable",o.STORE="store",o.EMOTE="emote",o.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(o){o.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[i.IPFSv1.schema,i.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:t.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.Entity||(e.Entity={}))})(Ah)),Ah}var Ph={},YT;function y1(){return YT||(YT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const i=hl(),t=He();(function(n){n.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:i.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(Ph)),Ph}var io={},Ih={},XT;function g1(){return XT||(XT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const i=Uo(),t=Fo(),n=He();var o;(function(s){s.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:i.WearableCategory.schema}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(o=e.Outfit||(e.Outfit={})),(function(s){s.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:o.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(e.Outfits||(e.Outfits={}))})(Ih)),Ih}var QT;function v1(){return QT||(QT=1,(function(e){var i=io&&io.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=io&&io.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(g1(),e)})(io)),io}var ao={},Rh={},JT;function pC(){return JT||(JT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationOptOutScope=e.NotificationType=void 0,(function(i){i.BADGE_GRANTED="badge_granted",i.BID_ACCEPTED="bid_accepted",i.BID_RECEIVED="bid_received",i.EVENTS_STARTED="events_started",i.EVENTS_STARTS_SOON="events_starts_soon",i.EVENT_CREATED="event_created",i.GOVERNANCE_ANNOUNCEMENT="governance_announcement",i.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",i.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",i.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",i.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",i.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",i.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",i.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",i.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",i.GOVERNANCE_TENDER_PASSED="governance_tender_passed",i.GOVERNANCE_WHALE_VOTE="governance_whale_vote",i.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",i.ITEM_SOLD="item_sold",i.ITEM_PUBLISHED="item_published",i.LAND_RENTAL_ENDED="rental_ended",i.LAND_RENTED="rental_started",i.REWARD_ASSIGNED="reward_assignment",i.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",i.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",i.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",i.REWARD_DELAYED="reward_delayed",i.REWARD_IN_PROGRESS="reward_in_progress",i.ROYALTIES_EARNED="royalties_earned",i.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",i.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",i.WORLDS_ACCESS_RESTORED="worlds_access_restored",i.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",i.WORLDS_MISSING_RESOURCES="worlds_missing_resources",i.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",i.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",i.CREDITS_GOAL_COMPLETED="credits_goal_completed",i.CREDITS_ON_DEMAND_GRANTED="credits_on_demand_granted",i.STREAMING_KEY_RESET="streaming_key_reset",i.STREAMING_KEY_REVOKE="streaming_key_revoke",i.STREAMING_KEY_EXPIRED="streaming_key_expired",i.STREAMING_TIME_EXCEEDED="streaming_time_exceeded",i.STREAMING_PLACE_UPDATED="streaming_place_updated",i.CREDITS_REMINDER_COMPLETE_GOALS="credits_reminder_complete_goals",i.CREDITS_REMINDER_CLAIM_CREDITS="credits_reminder_claim_credits",i.CREDITS_REMINDER_USAGE="credits_reminder_usage",i.CREDITS_REMINDER_USAGE_24_HOURS="credits_reminder_usage_24_hours",i.CREDITS_REMINDER_DO_NOT_MISS_OUT="credits_reminder_do_not_miss_out",i.CREDITS_NEW_SEASON_REMINDER="credits_new_season_reminder",i.REFERRAL_INVITED_USERS_ACCEPTED="referral_invited_users_accepted",i.REFERRAL_NEW_TIER_REACHED="referral_new_tier_reached",i.COMMUNITY_DELETED="community_deleted",i.COMMUNITY_DELETED_CONTENT_VIOLATION="community_deleted_content_violation",i.COMMUNITY_RENAMED="community_renamed",i.COMMUNITY_MEMBER_BANNED="community_member_banned",i.COMMUNITY_MEMBER_REMOVED="community_member_removed",i.COMMUNITY_REQUEST_TO_JOIN_RECEIVED="community_request_to_join_received",i.COMMUNITY_REQUEST_TO_JOIN_ACCEPTED="community_request_to_join_accepted",i.COMMUNITY_INVITE_RECEIVED="community_invite_received",i.COMMUNITY_OWNERSHIP_TRANSFERRED="community_ownership_transferred",i.COMMUNITY_POST_ADDED="community_post_added",i.COMMUNITY_VOICE_CHAT_STARTED="community_voice_chat_started",i.USER_BANNED_FROM_SCENE="user_banned_from_scene",i.USER_UNBANNED_FROM_SCENE="user_unbanned_from_scene",i.TRANSFER_RECEIVED="transfer_received"})(e.NotificationType||(e.NotificationType={})),(function(i){i.COMMUNITY="community"})(e.NotificationOptOutScope||(e.NotificationOptOutScope={}))})(Rh)),Rh}var Nh={},Mh={},ZT;function hC(){return ZT||(ZT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const i=He(),t=pC(),n={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},o=Object.values(t.NotificationType).reduce((s,l)=>(s[l]=n,s),{});(function(s){s.schema={type:"object",required:["ignore_all_email","ignore_all_in_app","message_type"],properties:{ignore_all_email:{type:"boolean"},ignore_all_in_app:{type:"boolean"},message_type:{type:"object",required:Object.values(t.NotificationType),additionalProperties:!1,properties:o}}},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})(Mh)),Mh}var Ch={},xT;function mC(){return xT||(xT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,(function(i){i.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const t=new RegExp(i.schema.pattern);i.validate=n=>t.test(n)})(e.Email||(e.Email={}))})(Ch)),Ch}var $T;function _1(){return $T||($T=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const i=He(),t=hC(),n=Fo(),o=mC();(function(s){s.schema={type:"object",required:["address","details"],properties:{address:n.EthAddress.schema,email:Object.assign(Object.assign({},o.Email.schema),{nullable:!0}),details:t.SubscriptionDetails.schema}},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Subscription||(e.Subscription={}))})(Nh)),Nh}var eA;function E1(){return eA||(eA=1,(function(e){var i=ao&&ao.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=ao&&ao.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(pC(),e),t(_1(),e),t(hC(),e)})(ao)),ao}var oo={},jh={},tA;function ln(){return tA||(tA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,(function(i){(function(t){t.BLOCKCHAIN="blockchain",t.CATALYST_DEPLOYMENT="catalyst-deployment",t.WORLD="world",t.CLIENT="client",t.WEB="web",t.MARKETPLACE="marketplace",t.REWARDS="rewards",t.BADGE="badge",t.ASSET_BUNDLE="asset-bundle",t.SOCIAL_SERVICE="social-service",t.CREDITS_SERVICE="credits-service",t.STREAMING="streaming",t.COMMS="comms",t.REFERRAL="referral",t.COMMUNITY="community",t.CAMERA="camera",t.EVENT="event",t.GOVERNANCE="governance"})(i.Type||(i.Type={})),(function(t){(function(n){n.BID_ACCEPTED="bid-accepted",n.ITEM_SOLD="item-sold",n.RENTAL_ENDED="land-rental-ended",n.RENTAL_STARTED="land-rental-started",n.ROYALTIES_EARNED="royalties-earned",n.COLLECTION_CREATED="collection-created",n.ITEM_PUBLISHED="item-published",n.TRANSFER_RECEIVED="transfer-received"})(t.Blockchain||(t.Blockchain={})),(function(n){n.BID_RECEIVED="bid-received"})(t.Marketplace||(t.Marketplace={})),(function(n){n.SCENE="scene",n.PROFILE="profile",n.WEARABLE="wearable",n.STORE="store",n.EMOTE="emote",n.OUTFITS="outfits"})(t.CatalystDeployment||(t.CatalystDeployment={})),(function(n){n.DEPLOYMENT="deployment",n.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",n.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",n.WORLDS_ACCESS_RESTORED="worlds_access_restored",n.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",n.WORLDS_MISSING_RESOURCES="worlds_missing_resources"})(t.Worlds||(t.Worlds={})),(function(n){n.LOGGED_IN="logged-in",n.LOGGED_IN_CACHED="logged-in-cached",n.MOVE_TO_PARCEL="move-to-parcel",n.USED_EMOTE="used-emote",n.PASSPORT_OPENED="passport-opened",n.WALKED_DISTANCE="walked-distance",n.VERTICAL_HEIGHT_REACHED="vertical-height-reached"})(t.Client||(t.Client={})),(function(n){n.AUTH_IDENTIFY="auth-identify"})(t.Web||(t.Web={})),(function(n){n.REWARD_IN_PROGRESS="reward-in-progress",n.REWARD_ASSIGNED="reward-assigned",n.CAMPAIGN_OUT_OF_FUNDS="campaign-out-of-funds",n.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="campaign-gas-price-higher-than-expected",n.CAMPAIGN_OUT_OF_STOCK="campaign-out-of-stock",n.REWARD_DELAYED="reward-delayed"})(t.Rewards||(t.Rewards={})),(function(n){n.GRANTED="badge-granted"})(t.Badge||(t.Badge={})),(function(n){n.CONVERTED="converted",n.MANUALLY_QUEUED="manually-queued"})(t.AssetBundle||(t.AssetBundle={})),(function(n){n.FRIENDSHIP_REQUEST="friendship-request",n.FRIENDSHIP_ACCEPTED="friendship-accepted"})(t.SocialService||(t.SocialService={})),(function(n){n.CREDITS_GOAL_COMPLETED="credits-goal-completed",n.COMPLETE_GOALS_REMINDER="complete-goals-reminder",n.CLAIM_CREDITS_REMINDER="claim-credits-reminder",n.DO_NOT_MISS_OUT_REMINDER="do-not-miss-out-reminder",n.USAGE_REMINDER="usage-reminder",n.USAGE_24_HOURS_REMINDER="usage-24-hours-reminder",n.ON_DEMAND_CREDITS_GRANTED="on-demand-credits-granted",n.NEW_SEASON_REMINDER="new-season-reminder"})(t.CreditsService||(t.CreditsService={})),(function(n){n.STREAMING_KEY_RESET="streaming-key-reset",n.STREAMING_KEY_REVOKE="streaming-key-revoke",n.STREAMING_KEY_EXPIRED="streaming-key-expired",n.STREAMING_TIME_EXCEEDED="streaming-time-exceeded",n.STREAMING_PLACE_UPDATED="streaming-place-updated",n.COMMUNITY_STREAMING_ENDED="community-streaming-ended"})(t.Streaming||(t.Streaming={})),(function(n){n.USER_JOINED_ROOM="user-joined-room",n.USER_LEFT_ROOM="user-left-room",n.USER_BANNED_FROM_SCENE="user-banned-from-scene",n.USER_UNBANNED_FROM_SCENE="user-unbanned-from-scene"})(t.Comms||(t.Comms={})),(function(n){n.REFERRAL_INVITED_USERS_ACCEPTED="referral-invited-users-accepted",n.REFERRAL_NEW_TIER_REACHED="referral-new-tier-reached"})(t.Referral||(t.Referral={})),(function(n){n.DELETED="community-deleted",n.DELETED_CONTENT_VIOLATION="community-deleted-content-violation",n.RENAMED="community-renamed",n.MEMBER_BANNED="community-member-banned",n.MEMBER_REMOVED="community-member-removed",n.REQUEST_TO_JOIN_RECEIVED="community-request-to-join-received",n.REQUEST_TO_JOIN_ACCEPTED="community-request-to-join-accepted",n.INVITE_RECEIVED="community-invite-received",n.OWNERSHIP_TRANSFERRED="community-ownership-transferred",n.POST_ADDED="community-post-added",n.VOICE_CHAT_STARTED="community-voice-chat-started"})(t.Community||(t.Community={})),(function(n){n.PHOTO_TAKEN="photo-taken",n.PHOTO_PRIVACY_CHANGED="photo-privacy-changed"})(t.Camera||(t.Camera={})),(function(n){n.EVENT_CREATED="event-created",n.EVENT_STARTS_SOON="event-starts-soon",n.EVENT_STARTED="event-started",n.EVENT_ENDED="event-ended"})(t.Event||(t.Event={})),(function(n){n.PROPOSAL_ENACTED="governance_proposal_enacted",n.COAUTHOR_REQUESTED="governance_coauthor_requested",n.PITCH_PASSED="governance_pitch_passed",n.TENDER_PASSED="governance_tender_passed",n.AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",n.VOTING_ENDED_VOTER="governance_voting_ended_voter",n.NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",n.NEW_COMMENT_ON_PROJECT_UPDATED="governance_new_comment_on_project_update",n.WHALE_VOTE="governance_whale_vote",n.VOTED_ON_BEHALF="governance_voted_on_behalf",n.CLIFF_ENDED="governance_cliff_ended"})(t.Governance||(t.Governance={}))})(i.SubType||(i.SubType={}))})(e.Events||(e.Events={}))})(jh)),jh}var Lh={},rA;function b1(){return rA||(rA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransferReceivedEvent=e.CollectionCreatedEvent=e.RoyaltiesEarnedEvent=e.RentalStartedEvent=e.RentalEndedEvent=e.ItemPublishedEvent=e.ItemSoldEvent=e.BidAcceptedEvent=void 0;const i=He(),t=ln();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.BID_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.BidAcceptedEvent||(e.BidAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ITEM_SOLD},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},buyer:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},tokenId:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["address","image","seller","category","link","network","title","description"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.ItemSoldEvent||(e.ItemSoldEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ITEM_PUBLISHED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},itemId:{type:"string"},network:{type:"string"},urn:{type:"string"}},required:["creator","category","itemId","network","urn"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.ItemPublishedEvent||(e.ItemPublishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.RENTAL_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.RentalEndedEvent||(e.RentalEndedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.RENTAL_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.RentalStartedEvent||(e.RentalStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ROYALTIES_EARNED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},royaltiesCut:{type:"string"},royaltiesCollector:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","image","category","link","royaltiesCut","royaltiesCollector","network","title"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.RoyaltiesEarnedEvent||(e.RoyaltiesEarnedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.COLLECTION_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},name:{type:"string"}},required:["creator","name"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.TRANSFER_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{senderAddress:{type:"string"},receiverAddress:{type:"string"},tokenUri:{type:"string",nullable:!0}},required:["senderAddress","receiverAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.TransferReceivedEvent||(e.TransferReceivedEvent={}))})(Lh)),Lh}var Dh={},nA;function w1(){return nA||(nA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const i=hl(),t=He(),n=fC(),o=ln();(function(s){s.schema={type:"object",properties:{type:{type:"string",const:o.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(o.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:n.Entity.schema,authChain:i.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(Dh)),Dh}var kh={},iA;function S1(){return iA||(iA=1,Object.defineProperty(kh,"__esModule",{value:!0})),kh}var qh={},aA;function T1(){return aA||(aA=1,Object.defineProperty(qh,"__esModule",{value:!0})),qh}var Bh={},oA;function A1(){return oA||(oA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const i=He(),t=ln();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.MARKETPLACE},subType:{type:"string",const:t.Events.SubType.Marketplace.BID_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(Bh)),Bh}var Uh={},_u={},sA;function Wd(){if(sA)return _u;sA=1,Object.defineProperty(_u,"__esModule",{value:!0}),_u.createEventSchema=void 0;function e(i,t,n){return{type:"object",properties:{type:{type:"string",const:i},subType:{type:"string",const:t},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}return _u.createEventSchema=e,_u}var uA;function O1(){return uA||(uA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const i=He(),t=ln(),n=Wd(),o={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},beneficiary:{type:"string"},tokenName:{type:"string"},tokenImage:{type:"string"},tokenRarity:{type:"string",nullable:!0},tokenCategory:{type:"string",nullable:!0}},required:["title","description","beneficiary","tokenName","tokenImage"],additionalProperties:!1},s={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},owner:{type:"string"},campaignId:{type:"string"},campaignName:{type:"string"}},required:["title","description","owner","campaignId","campaignName"],additionalProperties:!1};(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_IN_PROGRESS,o),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_ASSIGNED,o),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,s),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,s),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,s),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_DELAYED,o),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(Uh)),Uh}var Fh={},lA;function P1(){return lA||(lA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CreditsClaimReminderEvent=e.CreditsDoNotMissOutReminderEvent=e.CreditsUsage24HoursReminderEvent=e.CreditsNewSeasonReminderEvent=e.CreditsUsageReminderEvent=e.CreditsCompleteGoalsReminderEvent=e.CreditsGoalCompletedEvent=e.CreditsOnDemandEvent=e.FriendshipAcceptedEvent=e.FriendshipRequestEvent=e.AssetBundleConversionManuallyQueuedEvent=e.AssetBundleConversionFinishedEvent=e.BadgeGrantedEvent=void 0;const i=He(),t=ln();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BADGE},subType:{type:"string",const:t.Events.SubType.Badge.GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{badgeId:{type:"string"},badgeTierName:{type:"string",nullable:!0},badgeName:{type:"string"},badgeImageUrl:{type:"string"},address:{type:"string"}},required:["badgeId","badgeName","badgeImageUrl","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.BadgeGrantedEvent||(e.BadgeGrantedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.Events.SubType.AssetBundle.CONVERTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},statusCode:{type:"number"},isLods:{type:"boolean"},isWorld:{type:"boolean"},version:{type:"string"}},required:["entityId","platform","statusCode","isLods","isWorld","version"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.AssetBundleConversionFinishedEvent||(e.AssetBundleConversionFinishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.Events.SubType.AssetBundle.MANUALLY_QUEUED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},isLods:{type:"boolean"},isPriority:{type:"boolean"},version:{type:"string"}},required:["entityId","platform","isLods"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.AssetBundleConversionManuallyQueuedEvent||(e.AssetBundleConversionManuallyQueuedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.Events.SubType.SocialService.FRIENDSHIP_REQUEST},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{requestId:{type:"string"},sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},receiver:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},message:{type:"string",nullable:!0}},required:["requestId","sender","receiver"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.FriendshipRequestEvent||(e.FriendshipRequestEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.Events.SubType.SocialService.FRIENDSHIP_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{requestId:{type:"string"},sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},receiver:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]}},required:["requestId","sender","receiver"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.ON_DEMAND_CREDITS_GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creditsGranted:{type:"number",minimum:1},address:{type:"string"},granterAddress:{type:"string"}},required:["creditsGranted","address","granterAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CreditsOnDemandEvent||(e.CreditsOnDemandEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.CREDITS_GOAL_COMPLETED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{goalId:{type:"string"},creditsObtained:{type:"number",minimum:0},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1},address:{type:"string"}},required:["goalId","creditsObtained","seasonId","weekNumber","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CreditsGoalCompletedEvent||(e.CreditsGoalCompletedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.COMPLETE_GOALS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1},pendingGoalIds:{type:"array",items:{type:"string"},minItems:1}},required:["address","seasonId","weekNumber","pendingGoalIds"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CreditsCompleteGoalsReminderEvent||(e.CreditsCompleteGoalsReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.USAGE_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},creditsAmount:{type:"number",minimum:1},expirationDate:{type:"string"},expirationDay:{type:"string"}},required:["address","creditsAmount","expirationDate","expirationDay"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CreditsUsageReminderEvent||(e.CreditsUsageReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.NEW_SEASON_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{addresses:{type:"array",items:{type:"string"}},seasonName:{type:"string"},startDate:{type:"string"},endDate:{type:"string"}},required:["addresses","seasonName","startDate","endDate"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CreditsNewSeasonReminderEvent||(e.CreditsNewSeasonReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.USAGE_24_HOURS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},creditsAmount:{type:"number",minimum:1},expirationDate:{type:"string"}},required:["address","creditsAmount","expirationDate"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CreditsUsage24HoursReminderEvent||(e.CreditsUsage24HoursReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.DO_NOT_MISS_OUT_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"}},required:["address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CreditsDoNotMissOutReminderEvent||(e.CreditsDoNotMissOutReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.CLAIM_CREDITS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1}},required:["address","seasonId","weekNumber"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CreditsClaimReminderEvent||(e.CreditsClaimReminderEvent={}))})(Fh)),Fh}var Vh={},cA;function I1(){return cA||(cA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityStreamingEndedEvent=e.StreamingPlaceUpdatedEvent=e.StreamingTimeExceededEvent=e.StreamingKeyExpiredEvent=e.StreamingKeyRevokeEvent=e.StreamingKeyResetEvent=void 0;const i=He(),t=ln(),n=Wd(),o={type:"object",properties:{title:{type:"string"},description:{type:"string"},position:{type:"string"},worldName:{type:"string",nullable:!0},isWorld:{type:"boolean"},url:{type:"string"},address:{type:"string"},image:{type:"string"}},required:["position","isWorld","url","title","description","address","image"],additionalProperties:!1};(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_KEY_RESET,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.StreamingKeyResetEvent||(e.StreamingKeyResetEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_KEY_REVOKE,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.StreamingKeyRevokeEvent||(e.StreamingKeyRevokeEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_KEY_EXPIRED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.StreamingKeyExpiredEvent||(e.StreamingKeyExpiredEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_TIME_EXCEEDED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.StreamingTimeExceededEvent||(e.StreamingTimeExceededEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_PLACE_UPDATED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.StreamingPlaceUpdatedEvent||(e.StreamingPlaceUpdatedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.COMMUNITY_STREAMING_ENDED,{type:"object",properties:{communityId:{type:"string"},totalParticipants:{type:"number"}},required:["communityId","totalParticipants"],additionalProperties:!1}),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.CommunityStreamingEndedEvent||(e.CommunityStreamingEndedEvent={}))})(Vh)),Vh}var Hh={},dA;function R1(){return dA||(dA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserUnbannedFromSceneEvent=e.UserBannedFromSceneEvent=e.UserLeftRoomEvent=e.UserJoinedRoomEvent=e.RoomType=void 0;const i=He(),t=ln();var n;(function(o){o.PRIVATE_MESSAGE="private-message",o.VOICE_CHAT="voice-chat",o.COMMUNITY_VOICE_CHAT="community-voice-chat",o.ISLAND="island",o.SCENE="scene",o.WORLD="world",o.UNKNOWN="unknown"})(n=e.RoomType||(e.RoomType={})),(function(o){o.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMS},subType:{type:"string",const:t.Events.SubType.Comms.USER_JOINED_ROOM},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{parcel:{type:"string"},sceneId:{type:"string"},userAddress:{type:"string"},realmName:{type:"string"},islandName:{type:"string",nullable:!0},communityId:{type:"string",nullable:!0},voiceChatId:{type:"string",nullable:!0},isWorld:{type:"boolean"},roomType:{type:"string",enum:Object.values(n)}},required:["parcel","sceneId","userAddress","realmName","isWorld","roomType"]}},required:["type","subType","key","timestamp","metadata"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.UserJoinedRoomEvent||(e.UserJoinedRoomEvent={})),(function(o){o.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMS},subType:{type:"string",const:t.Events.SubType.Comms.USER_LEFT_ROOM},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{userAddress:{type:"string"},realmName:{type:"string"},isWorld:{type:"boolean"},roomType:{type:"string",enum:Object.values(n)},sceneId:{type:"string",nullable:!0},islandName:{type:"string",nullable:!0},communityId:{type:"string",nullable:!0},voiceChatId:{type:"string",nullable:!0}},required:["isWorld","userAddress","realmName","roomType"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.UserLeftRoomEvent||(e.UserLeftRoomEvent={})),(function(o){o.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMS},subType:{type:"string",const:t.Events.SubType.Comms.USER_BANNED_FROM_SCENE},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{placeTitle:{type:"string"},userAddress:{type:"string"}},required:["placeTitle","userAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.UserBannedFromSceneEvent||(e.UserBannedFromSceneEvent={})),(function(o){o.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMS},subType:{type:"string",const:t.Events.SubType.Comms.USER_UNBANNED_FROM_SCENE},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{placeTitle:{type:"string"},userAddress:{type:"string"}},required:["placeTitle","userAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.UserUnbannedFromSceneEvent||(e.UserUnbannedFromSceneEvent={}))})(Hh)),Hh}var zh={},fA;function N1(){return fA||(fA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReferralNewTierReachedEvent=e.ReferralInvitedUsersAcceptedEvent=void 0;const i=He(),t=ln(),n=Wd(),o={type:"object",properties:{title:{type:"string"},description:{type:"string"},address:{type:"string"},tier:{type:"number",minimum:1},url:{type:"string"},image:{type:"string"},invitedUserAddress:{type:"string"},invitedUsers:{type:"number",minimum:1},rarity:{type:"string",nullable:!0}},required:["address","tier","url","title","description","image","invitedUserAddress"],additionalProperties:!1};(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.REFERRAL,t.Events.SubType.Referral.REFERRAL_INVITED_USERS_ACCEPTED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.ReferralInvitedUsersAcceptedEvent||(e.ReferralInvitedUsersAcceptedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.REFERRAL,t.Events.SubType.Referral.REFERRAL_NEW_TIER_REACHED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.ReferralNewTierReachedEvent||(e.ReferralNewTierReachedEvent={}))})(zh)),zh}var Gh={},pA;function M1(){return pA||(pA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityVoiceChatStartedEvent=e.CommunityOwnershipTransferredEvent=e.CommunityPostAddedEvent=e.CommunityInviteReceivedEvent=e.CommunityRequestToJoinAcceptedEvent=e.CommunityRequestToJoinReceivedEvent=e.CommunityMemberRemovedEvent=e.CommunityMemberBannedEvent=e.CommunityRenamedEvent=e.CommunityDeletedContentViolationEvent=e.CommunityDeletedEvent=void 0;const i=He(),t=ln();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.DELETED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddresses:{type:"array",items:{type:"string"}},thumbnailUrl:{type:"string"}},required:["id","name","memberAddresses","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityDeletedEvent||(e.CommunityDeletedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.DELETED_CONTENT_VIOLATION},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},ownerAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","ownerAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityDeletedContentViolationEvent||(e.CommunityDeletedContentViolationEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.RENAMED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},oldName:{type:"string"},newName:{type:"string"},memberAddresses:{type:"array",items:{type:"string"}},thumbnailUrl:{type:"string"}},required:["id","oldName","newName","memberAddresses","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityRenamedEvent||(e.CommunityRenamedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.MEMBER_BANNED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityMemberBannedEvent||(e.CommunityMemberBannedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.MEMBER_REMOVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityMemberRemovedEvent||(e.CommunityMemberRemovedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.REQUEST_TO_JOIN_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},memberName:{type:"string"},thumbnailUrl:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["communityId","communityName","memberAddress","memberName","thumbnailUrl","addressesToNotify"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityRequestToJoinReceivedEvent||(e.CommunityRequestToJoinReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.REQUEST_TO_JOIN_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityRequestToJoinAcceptedEvent||(e.CommunityRequestToJoinAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.INVITE_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityInviteReceivedEvent||(e.CommunityInviteReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.POST_ADDED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},thumbnailUrl:{type:"string"},postId:{type:"string"},authorAddress:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["addressesToNotify","communityId","communityName","thumbnailUrl","postId","authorAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityPostAddedEvent||(e.CommunityPostAddedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.OWNERSHIP_TRANSFERRED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},oldOwnerAddress:{type:"string"},newOwnerAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","oldOwnerAddress","newOwnerAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityOwnershipTransferredEvent||(e.CommunityOwnershipTransferredEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.VOICE_CHAT_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},thumbnailUrl:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["communityId","communityName","thumbnailUrl","addressesToNotify"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityVoiceChatStartedEvent||(e.CommunityVoiceChatStartedEvent={}))})(Gh)),Gh}var Wh={},hA;function C1(){return hA||(hA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoTakenEvent=e.PhotoPrivacyChangedEvent=void 0;const i=He(),t=ln();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CAMERA},subType:{type:"string",const:t.Events.SubType.Camera.PHOTO_PRIVACY_CHANGED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{userAddress:{type:"string"},photoId:{type:"string"},isPublic:{type:"boolean"}},required:["userAddress","photoId","isPublic"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.PhotoPrivacyChangedEvent||(e.PhotoPrivacyChangedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CAMERA},subType:{type:"string",const:t.Events.SubType.Camera.PHOTO_TAKEN},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sceneId:{type:"string"},userAddress:{type:"string"},realm:{type:"string"},photoId:{type:"string"},isPublic:{type:"boolean"},users:{type:"array",items:{type:"object",properties:{address:{type:"string"},isEmoting:{type:"boolean"}},required:["address","isEmoting"],additionalProperties:!1}},placeId:{type:"string",nullable:!0}},required:["userAddress","realm","photoId","isPublic","users"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.PhotoTakenEvent||(e.PhotoTakenEvent={}))})(Wh)),Wh}var Kh={},mA;function j1(){return mA||(mA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventEndedEvent=e.EventCreatedEvent=e.EventStartsSoonEvent=e.EventStartedEvent=void 0;const i=He(),t=ln();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.Events.SubType.Event.EVENT_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},link:{type:"string"},communityId:{type:"string"},communityThumbnail:{type:"string",nullable:!0},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image","link"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.EventStartedEvent||(e.EventStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.Events.SubType.Event.EVENT_STARTS_SOON},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},link:{type:"string"},startsAt:{type:"string"},endsAt:{type:"string"},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image","link","startsAt","endsAt"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.EventStartsSoonEvent||(e.EventStartsSoonEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.Events.SubType.Event.EVENT_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},communityId:{type:"string"},communityName:{type:"string"},communityThumbnail:{type:"string",nullable:!0},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.EventCreatedEvent||(e.EventCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.Events.SubType.Event.EVENT_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{communityId:{type:"string",nullable:!0},totalAttendees:{type:"number"}},required:["totalAttendees"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.EventEndedEvent||(e.EventEndedEvent={}))})(Kh)),Kh}var Yh={},yA;function L1(){return yA||(yA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GovernanceCliffEndedEvent=e.GovernanceVotedOnBehalfEvent=e.GovernanceWhaleVoteEvent=e.GovernanceNewCommentOnProjectUpdatedEvent=e.GovernanceNewCommentOnProposalEvent=e.GovernanceVotingEndedVoterEvent=e.GovernanceAuthoredProposalFinishedEvent=e.GovernanceTenderPassedEvent=e.GovernancePitchPassedEvent=e.GovernanceCoauthorRequestedEvent=e.GovernanceProposalEnactedEvent=void 0;const i=He(),t=ln(),n=Wd(),o={type:"object",properties:{proposalId:{type:"string"},proposalTitle:{type:"string"},title:{type:"string"},description:{type:"string"},link:{type:"string"},address:{type:"string"}},required:["proposalId","proposalTitle","title","description","link","address"],additionalProperties:!1};(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.PROPOSAL_ENACTED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceProposalEnactedEvent||(e.GovernanceProposalEnactedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.COAUTHOR_REQUESTED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceCoauthorRequestedEvent||(e.GovernanceCoauthorRequestedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.PITCH_PASSED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernancePitchPassedEvent||(e.GovernancePitchPassedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.TENDER_PASSED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceTenderPassedEvent||(e.GovernanceTenderPassedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.AUTHORED_PROPOSAL_FINISHED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceAuthoredProposalFinishedEvent||(e.GovernanceAuthoredProposalFinishedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.VOTING_ENDED_VOTER,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceVotingEndedVoterEvent||(e.GovernanceVotingEndedVoterEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.NEW_COMMENT_ON_PROPOSAL,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceNewCommentOnProposalEvent||(e.GovernanceNewCommentOnProposalEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.NEW_COMMENT_ON_PROJECT_UPDATED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceNewCommentOnProjectUpdatedEvent||(e.GovernanceNewCommentOnProjectUpdatedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.WHALE_VOTE,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceWhaleVoteEvent||(e.GovernanceWhaleVoteEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.VOTED_ON_BEHALF,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceVotedOnBehalfEvent||(e.GovernanceVotedOnBehalfEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.CLIFF_ENDED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceCliffEndedEvent||(e.GovernanceCliffEndedEvent={}))})(Yh)),Yh}var Xh={},gA;function D1(){return gA||(gA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldsMissingResourcesEvent=e.WorldsAccessRestrictedEvent=e.WorldsPermissionGrantedEvent=e.WorldsPermissionRevokedEvent=e.WorldsAccessRestoredEvent=e.WorldDeploymentEvent=void 0;const i=hl(),t=He(),n=ln();(function(o){o.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.DEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},entity:{type:"object",properties:{entityId:{type:"string"},authChain:i.AuthChain.schema},additionalProperties:!0,required:["entityId","authChain"]},contentServerUrls:{type:"array",items:{type:"string"},nullable:!0},force:{type:"boolean",nullable:!0},animation:{type:"string",nullable:!0},lods:{type:"array",items:{type:"string"},nullable:!0}},required:["type","subType","key","timestamp","entity"],additionalProperties:!1},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.WorldDeploymentEvent||(e.WorldDeploymentEvent={})),(function(o){o.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_ACCESS_RESTORED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},url:{type:"string"},attendee:{type:"string"}},required:["title","description","url","attendee"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.WorldsAccessRestoredEvent||(e.WorldsAccessRestoredEvent={})),(function(o){o.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_PERMISSION_REVOKED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},world:{type:"string"},permissions:{type:"array",items:{type:"string"}},url:{type:"string"},address:{type:"string"}},required:["title","description","world","permissions","url","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.WorldsPermissionRevokedEvent||(e.WorldsPermissionRevokedEvent={})),(function(o){o.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_PERMISSION_GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},world:{type:"string"},permissions:{type:"array",items:{type:"string"}},url:{type:"string"},address:{type:"string"}},required:["title","description","world","permissions","url","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.WorldsPermissionGrantedEvent||(e.WorldsPermissionGrantedEvent={})),(function(o){o.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_ACCESS_RESTRICTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},when:{type:"number"},address:{type:"string"}},required:["title","description","when","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.WorldsAccessRestrictedEvent||(e.WorldsAccessRestrictedEvent={})),(function(o){o.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_MISSING_RESOURCES},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},url:{type:"string"},when:{type:"number"},address:{type:"string"}},required:["title","description","url","when","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.WorldsMissingResourcesEvent||(e.WorldsMissingResourcesEvent={}))})(Xh)),Xh}var vA;function k1(){return vA||(vA=1,(function(e){var i=oo&&oo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=oo&&oo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(ln(),e),t(b1(),e),t(w1(),e),t(S1(),e),t(T1(),e),t(A1(),e),t(O1(),e),t(P1(),e),t(I1(),e),t(R1(),e),t(N1(),e),t(M1(),e),t(C1(),e),t(j1(),e),t(L1(),e),t(D1(),e)})(oo)),oo}var _A;function H_(){return _A||(_A=1,(function(e){var i=eo&&eo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=eo&&eo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(a1(),e),t(s1(),e),t(cC(),e),t(B_(),e),t(iC(),e),t(m1(),e),t(fC(),e),t(y1(),e),t(v1(),e),t(E1(),e),t(k1(),e)})(eo)),eo}var EA;function q1(){return EA||(EA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const i=Gd(),t=Uo(),n=q_(),o=He(),s=H_();(function(l){l.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},i.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:t.WearableCategory.schema},hides:{type:"array",items:t.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:s.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},l.validate=(0,o.generateLazyValidator)(l.schema)})(e.WearableJson||(e.WearableJson={}))})(zp)),zp}var bA;function B1(){return bA||(bA=1,(function(e){var i=$a&&$a.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=$a&&$a.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(n1(),e),t(q1(),e)})($a)),$a}var wA;function U1(){return wA||(wA=1,(function(e){var i=Ya&&Ya.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Ya&&Ya.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(r1(),e),t(B1(),e)})(Ya)),Ya}var so={},Qh={},SA;function F1(){return SA||(SA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const i=He();(function(t){t.MOST_SALES="most_sales",t.MOST_PURCHASES="most_purchases",t.MOST_SPENT="most_spent",t.MOST_EARNED="most_earned",t.MOST_ROYALTIES="most_royalties",t.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),(function(t){t.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(Qh)),Qh}var Jh={},Zh={},TA;function yC(){return TA||(TA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const i=He(),t=ui();var n;(function(s){s.ETHEREUM_MAINNET="Ethereum Mainnet",s.ETHEREUM_ROPSTEN="Ropsten",s.ETHEREUM_RINKEBY="Rinkeby",s.ETHEREUM_GOERLI="Goerli",s.ETHEREUM_KOVAN="Kovan",s.ETHEREUM_SEPOLIA="Sepolia",s.MATIC_MAINNET="Polygon",s.MATIC_MUMBAI="Mumbai",s.MATIC_AMOY="Amoy",s.AVALANCHE_MAINNET="Avalanche",s.BINANCE_MAINNET="Binance Smart Chain",s.ARBITRUM_MAINNET="Arbitrum",s.OPTIMISM_MAINNET="Optimism",s.FANTOM_MAINNET="Fantom"})(n=e.ChainName||(e.ChainName={}));function o(s){switch(s){case n.ETHEREUM_MAINNET:return t.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return t.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return t.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return t.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return t.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return t.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return t.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return t.ChainId.MATIC_MUMBAI;case n.MATIC_AMOY:return t.ChainId.MATIC_AMOY;case n.AVALANCHE_MAINNET:return t.ChainId.AVALANCHE_MAINNET;case n.BINANCE_MAINNET:return t.ChainId.BSC_MAINNET;case n.ARBITRUM_MAINNET:return t.ChainId.ARBITRUM_MAINNET;case n.OPTIMISM_MAINNET:return t.ChainId.OPTIMISM_MAINNET;case n.FANTOM_MAINNET:return t.ChainId.FANTOM_MAINNET;default:return null}}e.getChainId=o,(function(s){s.schema={type:"string",enum:Object.values(s)},s.validate=(0,i.generateLazyValidator)(s.schema)})(n=e.ChainName||(e.ChainName={}))})(Zh)),Zh}var xh={},AA;function si(){return AA||(AA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const i=He();(function(t){t.ETHEREUM="ETHEREUM",t.MATIC="MATIC",t.AVALANCHE="AVALANCHE",t.BSC="BINANCE SMART CHAIN",t.OPTIMISM="OPTIMISM",t.ARBITRUM="ARBITRUM",t.FANTOM="FANTOM"})(e.Network||(e.Network={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(xh)),xh}var OA;function ui(){return OA||(OA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const i=He(),t=yC(),n=si();var o;(function(p){p[p.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",p[p.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",p[p.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",p[p.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",p[p.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",p[p.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",p[p.MATIC_MAINNET=137]="MATIC_MAINNET",p[p.MATIC_MUMBAI=80001]="MATIC_MUMBAI",p[p.MATIC_AMOY=80002]="MATIC_AMOY",p[p.BSC_MAINNET=56]="BSC_MAINNET",p[p.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",p[p.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",p[p.FANTOM_MAINNET=250]="FANTOM_MAINNET",p[p.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET"})(o=e.ChainId||(e.ChainId={}));function s(p){switch(p){case o.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case o.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case o.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case o.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case o.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case o.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case o.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case o.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;case o.MATIC_AMOY:return t.ChainName.MATIC_AMOY;case o.BSC_MAINNET:return t.ChainName.BINANCE_MAINNET;case o.ARBITRUM_MAINNET:return t.ChainName.ARBITRUM_MAINNET;case o.OPTIMISM_MAINNET:return t.ChainName.OPTIMISM_MAINNET;case o.FANTOM_MAINNET:return t.ChainName.FANTOM_MAINNET;case o.AVALANCHE_MAINNET:return t.ChainName.AVALANCHE_MAINNET;default:return null}}e.getChainName=s;function l(p){switch(p){case o.ETHEREUM_MAINNET:return"ethereum";case o.ETHEREUM_ROPSTEN:return"ropsten";case o.ETHEREUM_RINKEBY:return"rinkeby";case o.ETHEREUM_GOERLI:return"goerli";case o.ETHEREUM_KOVAN:return"kovan";case o.ETHEREUM_SEPOLIA:return"sepolia";case o.MATIC_MAINNET:return"matic";case o.MATIC_MUMBAI:return"mumbai";case o.MATIC_AMOY:return"amoy";default:return""}}e.getURNProtocol=l;function c(p){const y={[n.Network.BSC]:o.BSC_MAINNET,[n.Network.OPTIMISM]:o.OPTIMISM_MAINNET,[n.Network.ARBITRUM]:o.ARBITRUM_MAINNET,[n.Network.FANTOM]:o.FANTOM_MAINNET,[n.Network.AVALANCHE]:o.AVALANCHE_MAINNET};switch(p){case o.ETHEREUM_MAINNET:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET},y);case o.ETHEREUM_ROPSTEN:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_ROPSTEN,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_RINKEBY:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_RINKEBY,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_GOERLI:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_GOERLI,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_KOVAN:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_KOVAN,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_SEPOLIA:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_SEPOLIA,[n.Network.MATIC]:o.MATIC_AMOY},y);case o.MATIC_MAINNET:return Object.assign({[n.Network.ETHEREUM]:o.MATIC_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET},y);case o.MATIC_MUMBAI:return Object.assign({[n.Network.ETHEREUM]:o.MATIC_MUMBAI,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.MATIC_AMOY:return Object.assign({[n.Network.ETHEREUM]:o.MATIC_AMOY,[n.Network.MATIC]:o.MATIC_AMOY},y);default:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET},y)}}e.getNetworkMapping=c;function f(p){switch(p){case o.ETHEREUM_MAINNET:case o.ETHEREUM_ROPSTEN:case o.ETHEREUM_GOERLI:case o.ETHEREUM_KOVAN:case o.ETHEREUM_RINKEBY:case o.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case o.MATIC_MAINNET:case o.MATIC_MUMBAI:case o.MATIC_AMOY:return n.Network.MATIC;case o.BSC_MAINNET:return n.Network.BSC;case o.OPTIMISM_MAINNET:return n.Network.OPTIMISM;case o.ARBITRUM_MAINNET:return n.Network.ARBITRUM;case o.FANTOM_MAINNET:return n.Network.FANTOM;case o.AVALANCHE_MAINNET:return n.Network.AVALANCHE}}e.getNetwork=f,(function(p){p.schema={type:"number",enum:Object.values(p)},p.validate=(0,i.generateLazyValidator)(p.schema)})(o=e.ChainId||(e.ChainId={}))})(Jh)),Jh}var $h={},PA;function V1(){return PA||(PA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const i=He(),t=ui(),n=si();(function(o){o.NEWEST="newest",o.NAME="name",o.RECENTLY_REVIEWED="recently_reviewed",o.RECENTLY_LISTED="recently_listed",o.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(o){o.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.Collection||(e.Collection={}))})($h)),$h}var em={},tm={},IA;function Kd(){return IA||(IA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const i=He();(function(t){t.PARCEL="parcel",t.ESTATE="estate",t.WEARABLE="wearable",t.ENS="ens",t.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(tm)),tm}var RA;function H1(){return RA||(RA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const i=He(),t=ui(),n=si(),o=Kd();(function(s){s.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(s){s.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:o.NFTCategory.schema,network:n.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Contract||(e.Contract={}))})(em)),em}var rm={},nm={},NA;function gC(){return NA||(NA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const i=He(),t=ui(),n=H_(),o=si(),s=Kd(),l=Gd(),c=Uo();(function(f){f.NAME="name",f.NEWEST="newest",f.RECENTLY_LISTED="recently_listed",f.RECENTLY_SOLD="recently_sold",f.CHEAPEST="cheapest",f.RENTAL_LISTING_DATE="rental_listing_date",f.RENTAL_DATE="rented_date",f.MAX_RENTAL_PRICE="max_rental_price",f.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(f){f.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:c.WearableCategory.schema,description:{type:"string"},rarity:l.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:l.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"},outcomeType:{type:"string",nullable:!0}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:s.NFTCategory.schema,network:o.Network.schema,chainId:t.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},f.validate=(0,i.generateLazyValidator)(f.schema)})(e.NFT||(e.NFT={}))})(nm)),nm}var MA;function z1(){return MA||(MA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const i=He(),t=ui(),n=si(),o=gC(),s=Kd();(function(l){l.NAME="name",l.NEWEST="newest",l.RECENTLY_REVIEWED="recently_reviewed",l.RECENTLY_SOLD="recently_sold",l.RECENTLY_LISTED="recently_listed",l.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(l){l.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:s.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},tradeId:{type:"string",nullable:!0},tradeContractAddress:{type:"string",nullable:!0},data:o.NFT.schema.properties.data,network:n.Network.schema,chainId:t.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0},tradeExpiresAt:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},l.validate=(0,i.generateLazyValidator)(l.schema)})(e.Item||(e.Item={}))})(rm)),rm}var im={},CA;function z_(){return CA||(CA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const i=He();(function(t){t.OPEN="open",t.SOLD="sold",t.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(im)),im}var am={},jA;function G1(){return jA||(jA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const i=He();(function(t){t.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(am)),am}var om={},LA;function W1(){return LA||(LA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const i=He(),t=ui(),n=si();(function(o){o.RECENTLY_MINTED="recently_minted",o.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(o){o.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.Mint||(e.Mint={}))})(om)),om}var sm={},DA;function K1(){return DA||(DA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(i){i.NEWEST="newest",i.RECENTLY_SOLD="recently_sold",i.CHEAPEST="cheapest",i.MOST_EXPENSIVE="most_expensive",i.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(i){i.ASC="asc",i.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(sm)),sm}var um={},kA;function Y1(){return kA||(kA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const i=He(),t=ui(),n=z_(),o=si();(function(s){s.RECENTLY_LISTED="recently_listed",s.RECENTLY_UPDATED="recently_updated",s.CHEAPEST="cheapest",s.ISSUED_ID_ASC="issued_id_asc",s.ISSUED_ID_DESC="issued_id_desc",s.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:o.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"},tradeId:{type:"string",nullable:!0}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Order||(e.Order={}))})(um)),um}var lm={},qA;function X1(){return qA||(qA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const i=He();(function(t){t.INJECTED="injected",t.MAGIC="magic",t.MAGIC_TEST="magic_test",t.FORTMATIC="formatic",t.NETWORK="network",t.WALLET_CONNECT="wallet_connect",t.WALLET_CONNECT_V2="wallet_connect_v2",t.WALLET_LINK="wallet_link",t.METAMASK_MOBILE="metamask_mobile",t.AUTH_SERVER="auth_server"})(e.ProviderType||(e.ProviderType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})(lm)),lm}var cm={},BA;function vC(){return BA||(BA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const i=He();(function(t){t.ORDER="order",t.BID="bid",t.MINT="mint"})(e.SaleType||(e.SaleType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(cm)),cm}var dm={},UA;function Q1(){return UA||(UA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const i=He(),t=ui(),n=vC(),o=si();(function(s){s.RECENTLY_SOLD="recently_sold",s.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:o.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Sale||(e.Sale={}))})(dm)),dm}var fm={},FA;function J1(){return FA||(FA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const i=He(),t=ui(),n=si();(function(s){s.OPEN="open",s.CANCELLED="cancelled",s.EXECUTED="executed",s.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),(function(s){s.ASC="asc",s.DESC="desc"})(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),(function(s){s.PARCEL="parcel",s.ESTATE="estate"})(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),(function(s){s.LAND_CREATION_DATE="land_creation_date",s.RENTAL_LISTING_DATE="rental_listing_date",s.RENTAL_DATE="rented_date",s.NAME="name",s.MAX_RENTAL_PRICE="max_rental_price",s.MIN_RENTAL_PRICE="min_rental_price"})(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var o;(function(s){s.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(o=e.PeriodCreation||(e.PeriodCreation={})),(function(s){s.schema={type:"object",properties:{network:n.Network.schema,chainId:t.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:o.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(fm)),fm}var pm={},VA;function Z1(){return VA||(VA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(i){i.DATE="date",i.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(pm)),pm}var hm={},HA;function x1(){return HA||(HA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const i=He();(function(t){t.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(hm)),hm}var mm={},zA;function $1(){return zA||(zA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const i=He();(function(t){t.MALE="male",t.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),(function(t){t.MALE="male",t.FEMALE="female",t.UNISEX="unisex"})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(mm)),mm}var ym={},GA;function e2(){return GA||(GA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const i=He();function t(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=t;function n(o,s){const l=t().validWorldRanges;for(const c of l)if(o>=c.xMin&&o<=c.xMax&&s>=c.yMin&&s<=c.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(o){o.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.World||(e.World={}))})(ym)),ym}var gm={},WA;function t2(){return WA||(WA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const i=He(),t=ui(),n=z_(),o=si();(function(s){s.RECENTLY_OFFERED="recently_offered",s.RECENTLY_UPDATED="recently_updated",s.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(s){const l={properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,contractAddress:{type:"string"},network:o.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidder","seller","price","fingerprint","status","contractAddress","network","chainId","expiresAt","createdAt","updatedAt"]};s.schema={type:"object",required:[],oneOf:[{properties:Object.assign(Object.assign({},l.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...l.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},l.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...l.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},l.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...l.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Bid||(e.Bid={}))})(gm)),gm}var vm={},KA;function r2(){return KA||(KA=1,Object.defineProperty(vm,"__esModule",{value:!0})),vm}var _m={},YA;function n2(){return YA||(YA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,(function(i){i.BID="bid",i.PUBLIC_NFT_ORDER="public_nft_order",i.PUBLIC_ITEM_ORDER="public_item_order"})(e.TradeType||(e.TradeType={})),(function(i){i[i.ERC20=1]="ERC20",i[i.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",i[i.ERC721=3]="ERC721",i[i.COLLECTION_ITEM=4]="COLLECTION_ITEM"})(e.TradeAssetType||(e.TradeAssetType={})),(function(i){i.SENT="sent",i.RECEIVED="received"})(e.TradeAssetDirection||(e.TradeAssetDirection={}))})(_m)),_m}var uo={},Em={},XA;function i2(){return XA||(XA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const i=He();(function(t){t.STATIC="static",t.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(Em)),Em}var bm={},QA;function a2(){return QA||(QA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewUnityMode=void 0,(function(i){i.AUTH="authentication",i.BUILDER="builder",i.MARKETPLACE="marketplace",i.PROFILE="profile",i.CONFIG="configurator"})(e.PreviewUnityMode||(e.PreviewUnityMode={}))})(bm)),bm}var wm={},JA;function o2(){return JA||(JA=1,Object.defineProperty(wm,"__esModule",{value:!0})),wm}var Sm={},ZA;function s2(){return ZA||(ZA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const i=He();(function(t){t.ANIMATION_PLAY="animation_play",t.ANIMATION_PAUSE="animation_pause",t.ANIMATION_LOOP="animation_loop",t.ANIMATION_END="animation_end",t.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(Sm)),Sm}var Tm={},xA;function u2(){return xA||(xA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const i=He();(function(t){t.IDLE="idle",t.WALK="walk",t.RUN="run",t.JUMP="jump",t.CLAP="clap",t.DAB="dab",t.DANCE="dance",t.FASHION="fashion",t.FASHION_2="fashion-2",t.FASHION_3="fashion-3",t.FASHION_4="fashion-4",t.LOVE="love",t.MONEY="money",t.FIST_PUMP="fist-pump",t.HEAD_EXPLODE="head-explode",t.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(Tm)),Tm}var Am={},$A;function l2(){return $A||($A=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewRenderer=e.PreviewMessageType=void 0;const i=He();(function(n){n.READY="ready",n.LOAD="load",n.ERROR="error",n.UPDATE="update",n.CONTROLLER_REQUEST="controller_request",n.CONTROLLER_RESPONSE="controller_response",n.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),(function(n){n.BABYLON="babylon",n.UNITY="unity"})(e.PreviewRenderer||(e.PreviewRenderer={})),(function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,o,s,l="*")=>{const c={type:o,payload:s};n.postMessage(c,l)};e.sendMessage=t})(Am)),Am}var Om={},eO;function c2(){return eO||(eO=1,Object.defineProperty(Om,"__esModule",{value:!0})),Om}var Pm={},tO;function d2(){return tO||(tO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const i=He();(function(t){t.ORTHOGRAPHIC="orthographic",t.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(Pm)),Pm}var Im={},rO;function f2(){return rO||(rO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const i=He();(function(t){t.TEXTURE="texture",t.WEARABLE="wearable",t.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(Im)),Im}var Rm={},nO;function p2(){return nO||(nO=1,Object.defineProperty(Rm,"__esModule",{value:!0})),Rm}var Nm={},iO;function h2(){return iO||(iO=1,Object.defineProperty(Nm,"__esModule",{value:!0})),Nm}var Mm={},aO;function m2(){return aO||(aO=1,Object.defineProperty(Mm,"__esModule",{value:!0})),Mm}var Cm={},oO;function y2(){return oO||(oO=1,Object.defineProperty(Cm,"__esModule",{value:!0})),Cm}var jm={},sO;function g2(){return sO||(sO=1,Object.defineProperty(jm,"__esModule",{value:!0})),jm}var Lm={},uO;function v2(){return uO||(uO=1,Object.defineProperty(Lm,"__esModule",{value:!0})),Lm}var Dm={},lO;function _2(){return lO||(lO=1,Object.defineProperty(Dm,"__esModule",{value:!0})),Dm}var km={},cO;function E2(){return cO||(cO=1,Object.defineProperty(km,"__esModule",{value:!0})),km}var dO;function b2(){return dO||(dO=1,(function(e){var i=uo&&uo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=uo&&uo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(i2(),e),t(a2(),e),t(o2(),e),t(s2(),e),t(u2(),e),t(l2(),e),t(c2(),e),t(d2(),e),t(f2(),e),t(p2(),e),t(h2(),e),t(m2(),e),t(y2(),e),t(g2(),e),t(v2(),e),t(_2(),e),t(E2(),e)})(uo)),uo}var lo={},Eu={},fO;function w2(){if(fO)return Eu;fO=1,Object.defineProperty(Eu,"__esModule",{value:!0}),Eu.isSysLink=void 0;const e=i=>i!==null&&typeof i=="object"&&"sys"in i&&"id"in i.sys;return Eu.isSysLink=e,Eu}var bu={},pO;function S2(){if(pO)return bu;pO=1,Object.defineProperty(bu,"__esModule",{value:!0}),bu.ContentfulLocale=void 0;var e;return(function(i){i.enUS="en-US",i.es="es",i.zh="zh"})(e||(e={})),bu.ContentfulLocale=e,bu}var qm={},hO;function T2(){return hO||(hO=1,Object.defineProperty(qm,"__esModule",{value:!0})),qm}var mO;function A2(){return mO||(mO=1,(function(e){var i=lo&&lo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=lo&&lo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(w2(),e),t(S2(),e),t(T2(),e)})(lo)),lo}var yO;function O2(){return yO||(yO=1,(function(e){var i=so&&so.__createBinding||(Object.create?(function(X,fe,Ae,Se){Se===void 0&&(Se=Ae);var Ee=Object.getOwnPropertyDescriptor(fe,Ae);(!Ee||("get"in Ee?!fe.__esModule:Ee.writable||Ee.configurable))&&(Ee={enumerable:!0,get:function(){return fe[Ae]}}),Object.defineProperty(X,Se,Ee)}):(function(X,fe,Ae,Se){Se===void 0&&(Se=Ae),X[Se]=fe[Ae]})),t=so&&so.__exportStar||function(X,fe){for(var Ae in X)Ae!=="default"&&!Object.prototype.hasOwnProperty.call(fe,Ae)&&i(fe,X,Ae)};Object.defineProperty(e,"__esModule",{value:!0}),e.isInsideWorldLimits=e.getWorld=e.World=e.GenderFilterOption=e.WearableGender=e.Store=e.AnalyticsDayDataSortBy=e.PeriodCreation=e.RentalListingCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=e.SaleSortBy=e.Sale=e.SaleType=e.Rarity=e.ProviderType=e.OrderSortBy=e.Order=e.CatalogSortDirection=e.CatalogSortBy=e.NFTSortBy=e.NFT=e.NFTCategory=e.Network=e.MintSortBy=e.Mint=e.MetaTransaction=e.ListingStatus=e.ItemSortBy=e.Item=e.ContractSortBy=e.Contract=e.CollectionSortBy=e.Collection=e.getChainId=e.ChainName=e.getURNProtocol=e.getChainName=e.ChainId=e.AccountSortBy=e.Account=void 0;var n=F1();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var o=ui();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return o.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return o.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return o.getURNProtocol}});var s=yC();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return s.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return s.getChainId}});var l=V1();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return l.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return l.CollectionSortBy}});var c=H1();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return c.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return c.ContractSortBy}});var f=z1();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return f.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return f.ItemSortBy}});var p=z_();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return p.ListingStatus}});var y=G1();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return y.MetaTransaction}});var h=W1();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return h.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return h.MintSortBy}});var g=si();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return g.Network}});var A=Kd();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return A.NFTCategory}});var N=gC();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return N.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return N.NFTSortBy}});var R=K1();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return R.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return R.CatalogSortDirection}});var O=Y1();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return O.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return O.OrderSortBy}});var M=X1();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return M.ProviderType}});var _=Gd();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return _.Rarity}});var I=vC();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return I.SaleType}});var S=Q1();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return S.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return S.SaleSortBy}});var v=J1();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return v.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return v.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return v.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return v.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return v.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return v.PeriodCreation}});var T=Z1();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return T.AnalyticsDayDataSortBy}});var j=x1();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return j.Store}});var V=$1();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return V.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return V.GenderFilterOption}});var W=e2();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return W.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return W.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return W.isInsideWorldLimits}}),t(t2(),e),t(r2(),e),t(n2(),e),t(b2(),e),t(A2(),e)})(so)),so}var Bm={},gO;function P2(){return gO||(gO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const i=He();(function(t){t.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},onlyDev:{type:"boolean",nullable:!0},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(Bm)),Bm}var co={},Um={},wu={},vO;function _C(){if(vO)return wu;vO=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.isInExceptionBlock=void 0;function e(o,s){return o>=62&&o<=150&&s>=151&&s<=158}function i(o,s){return o>=151&&o<=162&&s>=144&&s<=158}function t(o,s){return o>=151&&o<=163&&s>=59&&s<=143}function n(o,s){return e(o,s)||i(o,s)||t(o,s)}return wu.isInExceptionBlock=n,wu}var _O;function I2(){return _O||(_O=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Parcel=e.PARCEL_LIMITS=void 0;const i=He(),t=_C();e.PARCEL_LIMITS={minX:-150,maxX:150,minY:-150,maxY:150},(function(n){n._isInLimits={keyword:"_isInLimits",validate:function(A,N){return!N||typeof N.x!="number"||typeof N.y!="number"?!1:c(N)||(0,t.isInExceptionBlock)(N.x,N.y)},errors:!1},n.schema={type:"object",required:["x","y"],properties:{x:{type:"number"},y:{type:"number"}},_isInLimits:!0,additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema,[n._isInLimits]);function o({x:g,y:A}){return`${g},${A}`}n.parcelToString=o;function s(g){const A=g.match(/^(-?\d+),(-?\d+)$/);if(!A)return null;const[,N,R]=A,O=parseInt(N,10),M=parseInt(R,10);return{x:O,y:M}}n.stringToParcel=s;function l(g){const A=s(g);return A?n.validate(A):!1}n.isParcelStringValid=l;function c(g){const{x:A,y:N}=g;return A>=e.PARCEL_LIMITS.minX&&A<=e.PARCEL_LIMITS.maxX&&N>=e.PARCEL_LIMITS.minY&&N<=e.PARCEL_LIMITS.maxY}n.isInStandardBounds=c;function f(g){return(0,t.isInExceptionBlock)(g.x,g.y)}n.isExceptionParcel=f;function p(g){return c(g)||f(g)}n.isInBounds=p;function y(g){return n.validate(g)}n.isValid=y;function h(g){const A=s(g);return A?n.validate(A):!1}n.isValidString=h})(e.Parcel||(e.Parcel={}))})(Um)),Um}var fo={},EO;function R2(){if(EO)return fo;EO=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.validateUrlInstance=fo.validateUrl=void 0;const e={allowLocalhost:!1,allowedPorts:[]};function i(A,N=2){let R=A;for(let O=0;O<N;O++)try{R=decodeURIComponent(R)}catch{break}return R.normalize("NFKC")}function t(A){return/[\u0000-\u001F\u007F-\u009F\u202A-\u202E\u2066-\u2069]/.test(A)}function n(A){return!!(A.username||A.password)}function o(A){return/\\/.test(A)}const s=["80","443"];function l(A,N){return!!A.port&&!N.includes(A.port)}function c(A){const N=A.toLowerCase();return!!(N==="localhost"||N.endsWith(".local")||/^(127\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168\.|169\.254\.)/.test(N)||N==="::1"||N==="[::1]"||N.startsWith("fe80:")||N.startsWith("fc00:"))}function f(A){if(A.startsWith("//"))return null;try{return{url:new URL(A),wasRelative:!1}}catch{try{return{url:new URL(A,"https://example.com"),wasRelative:!0}}catch{return null}}}function p(A){const N=i(String(A).toLowerCase());return!(t(N)||o(N))}function y(A){return!(!A||A.includes("..")||A.includes("//")||t(A)||o(A))}function h(A,N={}){const R=Object.assign(Object.assign({},e),N),O=[...s,...R.allowedPorts];if(!A||A.length===0||A.length>4096||t(A)||o(A))return!1;const M=i(A);if(t(M)||o(M)||A.startsWith("//"))return!1;const _=f(A);if(!_)return!1;const{url:I,wasRelative:S}=_;if(I.protocol!=="http:"&&I.protocol!=="https:"&&I.protocol!==""||n(I)||o(A)||o(I.href)||!S&&(l(I,O)||!R.allowLocalhost&&I.hostname&&c(I.hostname))||!y(I.pathname)||I.pathname.length>2048)return!1;const v=Array.from(I.searchParams.entries());if(v.length>50||(I.search?I.search.startsWith("?")?I.search.length-1:I.search.length:0)>2048)return!1;for(const[j,V]of v)if(j.length===0||!p(j)||!p(V)||j.length>128||V.length>1024)return!1;return!(I.hash&&t(I.hash))}fo.validateUrl=h;function g(A,N={}){return h(A.toString(),N)}return fo.validateUrlInstance=g,fo}var bO;function N2(){return bO||(bO=1,(function(e){var i=co&&co.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=co&&co.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(I2(),e),t(_C(),e),t(R2(),e)})(co)),co}var wO;function M2(){return wO||(wO=1,(function(e){var i=Yn&&Yn.__createBinding||(Object.create?(function(l,c,f,p){p===void 0&&(p=f);var y=Object.getOwnPropertyDescriptor(c,f);(!y||("get"in y?!c.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(l,p,y)}):(function(l,c,f,p){p===void 0&&(p=f),l[p]=c[f]})),t=Yn&&Yn.__setModuleDefault||(Object.create?(function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}):function(l,c){l.default=c}),n=Yn&&Yn.__importStar||function(l){if(l&&l.__esModule)return l;var c={};if(l!=null)for(var f in l)f!=="default"&&Object.prototype.hasOwnProperty.call(l,f)&&i(c,l,f);return t(c,l),c},o=Yn&&Yn.__exportStar||function(l,c){for(var f in l)f!=="default"&&!Object.prototype.hasOwnProperty.call(c,f)&&i(c,l,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const s=n(U1());e.sdk=s,o(He(),e),o(O2(),e),o(H_(),e),o(Fo(),e),o(P2(),e),o(hl(),e),o(dC(),e),o(mC(),e),o(N2(),e)})(Yn)),Yn}var jn=M2(),po={},Zn={},pd={exports:{}},hd={exports:{}},SO;function G_(){return SO||(SO=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=t;function t(n){if(n==null)throw new TypeError("Expected a string but received a ".concat(n));if(n.constructor.name!=="String")throw new TypeError("Expected a string but received a ".concat(n.constructor.name))}e.exports=i.default,e.exports.default=i.default})(hd,hd.exports)),hd.exports}var md={exports:{}},TO;function C2(){return TO||(TO=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=n;function t(o){return Object.prototype.toString.call(o)==="[object RegExp]"}function n(o,s){for(var l=0;l<s.length;l++){var c=s[l];if(o===c||t(c)&&c.test(o))return!0}return!1}e.exports=i.default,e.exports.default=i.default})(md,md.exports)),md.exports}var yd={exports:{}},AO;function j2(){return AO||(AO=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var t=function(o,s){return o.indexOf(s)!==-1};i.default=t,e.exports=i.default,e.exports.default=i.default})(yd,yd.exports)),yd.exports}var gd={exports:{}},vd={exports:{}},OO;function EC(){return OO||(OO=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=t;function t(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;for(var s in o)typeof n[s]>"u"&&(n[s]=o[s]);return n}e.exports=i.default,e.exports.default=i.default})(vd,vd.exports)),vd.exports}var PO;function L2(){return PO||(PO=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=l;var t=o(G_()),n=o(EC());function o(c){return c&&c.__esModule?c:{default:c}}var s={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function l(c,f){(0,t.default)(c),f=(0,n.default)(f,s),f.allow_trailing_dot&&c[c.length-1]==="."&&(c=c.substring(0,c.length-1)),f.allow_wildcard===!0&&c.indexOf("*.")===0&&(c=c.substring(2));var p=c.split("."),y=p[p.length-1];return f.require_tld&&(p.length<2||!f.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(y)||/\s/.test(y))||!f.allow_numeric_tld&&/^\d+$/.test(y)?!1:p.every(function(h){return!(h.length>63&&!f.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(h)||/[\uff01-\uff5e]/.test(h)||/^-|-$/.test(h)||!f.allow_underscores&&/_/.test(h))})}e.exports=i.default,e.exports.default=i.default})(gd,gd.exports)),gd.exports}var _d={exports:{}},IO;function D2(){return IO||(IO=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=y;var t=n(G_());function n(h){return h&&h.__esModule?h:{default:h}}function o(h){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},o(h)}var s="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",l="(".concat(s,"[.]){3}").concat(s),c=new RegExp("^".concat(l,"$")),f="(?:[0-9a-fA-F]{1,4})",p=new RegExp("^("+"(?:".concat(f,":){7}(?:").concat(f,"|:)|")+"(?:".concat(f,":){6}(?:").concat(l,"|:").concat(f,"|:)|")+"(?:".concat(f,":){5}(?::").concat(l,"|(:").concat(f,"){1,2}|:)|")+"(?:".concat(f,":){4}(?:(:").concat(f,"){0,1}:").concat(l,"|(:").concat(f,"){1,3}|:)|")+"(?:".concat(f,":){3}(?:(:").concat(f,"){0,2}:").concat(l,"|(:").concat(f,"){1,4}|:)|")+"(?:".concat(f,":){2}(?:(:").concat(f,"){0,3}:").concat(l,"|(:").concat(f,"){1,5}|:)|")+"(?:".concat(f,":){1}(?:(:").concat(f,"){0,4}:").concat(l,"|(:").concat(f,"){1,6}|:)|")+"(?::((?::".concat(f,"){0,5}:").concat(l,"|(?::").concat(f,"){1,7}|:))")+")(%[0-9a-zA-Z.]{1,})?$");function y(h){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,t.default)(h);var A=(o(g)==="object"?g.version:arguments[1])||"";return A?A.toString()==="4"?c.test(h):A.toString()==="6"?p.test(h):!1:y(h,{version:4})||y(h,{version:6})}e.exports=i.default,e.exports.default=i.default})(_d,_d.exports)),_d.exports}var RO;function k2(){return RO||(RO=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=M;var t=f(G_()),n=f(C2()),o=f(j2()),s=f(L2()),l=f(D2()),c=f(EC());function f(_){return _&&_.__esModule?_:{default:_}}function p(_,I){return N(_)||A(_,I)||h(_,I)||y()}function y(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
19
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h(_,I){if(_){if(typeof _=="string")return g(_,I);var S={}.toString.call(_).slice(8,-1);return S==="Object"&&_.constructor&&(S=_.constructor.name),S==="Map"||S==="Set"?Array.from(_):S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S)?g(_,I):void 0}}function g(_,I){(I==null||I>_.length)&&(I=_.length);for(var S=0,v=Array(I);S<I;S++)v[S]=_[S];return v}function A(_,I){var S=_==null?null:typeof Symbol<"u"&&_[Symbol.iterator]||_["@@iterator"];if(S!=null){var v,T,j,V,W=[],X=!0,fe=!1;try{if(j=(S=S.call(_)).next,I!==0)for(;!(X=(v=j.call(S)).done)&&(W.push(v.value),W.length!==I);X=!0);}catch(Ae){fe=!0,T=Ae}finally{try{if(!X&&S.return!=null&&(V=S.return(),Object(V)!==V))return}finally{if(fe)throw T}}return W}}function N(_){if(Array.isArray(_))return _}var R={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},O=/^\[([^\]]+)\](?::([0-9]+))?$/;function M(_,I){if((0,t.default)(_),!_||/[\s<>]/.test(_)||_.indexOf("mailto:")===0||(I=(0,c.default)(I,R),I.validate_length&&_.length>I.max_allowed_length)||!I.allow_fragments&&(0,o.default)(_,"#")||!I.allow_query_components&&((0,o.default)(_,"?")||(0,o.default)(_,"&")))return!1;var S,v,T,j,V,W,X,fe;X=_.split("#"),_=X.shift(),X=_.split("?"),_=X.shift();var Ae=_.match(/^([a-z][a-z0-9+\-.]*):/i),Se=!1,Ee=function(de){return Se=!0,S=de.toLowerCase(),I.require_valid_protocol&&I.protocols.indexOf(S)===-1?!1:_.substring(Ae[0].length)};if(Ae){var je=Ae[1],Ce=_.substring(Ae[0].length),Oe=Ce.slice(0,2)==="//";if(Oe){if(_=Ee(je),_===!1)return!1}else{var ge=Ce.indexOf("/"),ie=ge===-1?Ce:Ce.substring(0,ge),K=ie.indexOf("@");if(K!==-1){var C=ie.substring(0,K),B=/^[a-zA-Z0-9\-_.%:]*$/,q=B.test(C),L=/%[0-9a-fA-F]{2}/.test(C);if(q&&!L){if(I.require_protocol)return!1}else if(_=Ee(je),_===!1)return!1}else{var U=/^[0-9]/.test(Ce);if(U){if(I.require_protocol)return!1}else if(_=Ee(je),_===!1)return!1}}}else if(I.require_protocol)return!1;if(_.slice(0,2)==="//"){if(!Se&&!I.allow_protocol_relative_urls)return!1;_=_.slice(2)}if(_==="")return!1;if(X=_.split("/"),_=X.shift(),_===""&&!I.require_host)return!0;if(X=_.split("@"),X.length>1){if(I.disallow_auth||X[0]===""||(v=X.shift(),v.indexOf(":")>=0&&v.split(":").length>2))return!1;var ae=v.split(":"),Ie=p(ae,2),Te=Ie[0],ke=Ie[1];if(Te===""&&ke==="")return!1}j=X.join("@"),W=null,fe=null;var Me=j.match(O);if(Me?(T="",fe=Me[1],W=Me[2]||null):(X=j.split(":"),T=X.shift(),X.length&&(W=X.join(":"))),W!==null&&W.length>0){if(V=parseInt(W,10),!/^[0-9]+$/.test(W)||V<=0||V>65535)return!1}else if(I.require_port)return!1;return I.host_whitelist?(0,n.default)(T,I.host_whitelist):T===""&&!I.require_host?!0:!(!(0,l.default)(T)&&!(0,s.default)(T,I)&&(!fe||!(0,l.default)(fe,6))||(T=T||fe,I.host_blacklist&&(0,n.default)(T,I.host_blacklist)))}e.exports=i.default,e.exports.default=i.default})(pd,pd.exports)),pd.exports}var Fm={},NO;function bC(){return NO||(NO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.localStorageClearIdentity=e.localStorageStoreIdentity=e.localStorageGetIdentity=e.createMessage=e.SINGLE_SIGN_ON_TARGET=e.Action=void 0;var i;(function(c){c.GET="get",c.STORE="store",c.CLEAR="clear",c.PING="ping"})(i||(e.Action=i={})),e.SINGLE_SIGN_ON_TARGET="single-sign-on";function t(c){return{target:e.SINGLE_SIGN_ON_TARGET,...c}}e.createMessage=t;function n(c){const f=localStorage.getItem(l(c));if(!f)return null;let p;try{p=JSON.parse(f)}catch{return s(c),null}return p.expiration=new Date(p.expiration),p.expiration.getTime()<=Date.now()?(s(c),null):p}e.localStorageGetIdentity=n;function o(c,f){new Date(f.expiration).getTime()>Date.now()&&localStorage.setItem(l(c),JSON.stringify(f))}e.localStorageStoreIdentity=o;function s(c){localStorage.removeItem(l(c))}e.localStorageClearIdentity=s;function l(c){if(!/^0x[a-fA-F0-9]{40}$/.test(c))throw new Error("User must be a valid ethereum address");return`single-sign-on-${c.toLowerCase()}`}})(Fm)),Fm}var MO;function q2(){if(MO)return Zn;MO=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.clearIdentity=Zn.storeIdentity=Zn.getIdentity=Zn.init=void 0;const e=k2(),i=bC(),t=i.SINGLE_SIGN_ON_TARGET,n=500,o=5;let s=0,l="";const c={protocols:["https"],require_protocol:!0};function f(O,M={}){if(!(0,e.default)(O,{...c,...M}))throw new Error(`Invalid url: ${O}`);if(l)throw new Error("Already initialized");const _=document.createElement("iframe");_.id=t,_.src=O,_.style.width="0",_.style.height="0",_.style.border="none",_.style.position="absolute",document.body.appendChild(_),l=O}Zn.init=f;async function p(O){let M;try{M=(await A(await g(),i.Action.GET,{user:O})).identity??null}catch(_){R(_),M=(0,i.localStorageGetIdentity)(O)}return M}Zn.getIdentity=p;async function y(O,M){try{await A(await g(),i.Action.STORE,{user:O,identity:M})}catch(_){R(_),(0,i.localStorageStoreIdentity)(O,M)}}Zn.storeIdentity=y;async function h(O){try{await A(await g(),i.Action.CLEAR,{user:O})}catch(M){R(M),(0,i.localStorageClearIdentity)(O)}}Zn.clearIdentity=h;async function g(){if(!l)throw new Error("Not initialized");for(let O=0;O<o;O++){const _=document.getElementById(t)?.contentWindow;if(!_){await N(n);continue}try{await A(_,i.Action.PING,{},n)}catch{continue}return _}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function A(O,M,_,I=0){s++;const S=s;let v=null;const T=new Promise((j,V)=>{v=({data:W})=>{!W||W.target!==i.SINGLE_SIGN_ON_TARGET||W.id!==S||(W.error?V(new Error(W.error)):j(W))},window.addEventListener("message",v)});O.postMessage((0,i.createMessage)({id:S,action:M,..._}),l);try{return await(I?Promise.race([T,new Promise((j,V)=>setTimeout(()=>V(new Error("Did not receive a response in time")),I))]):T)}catch(j){throw j}finally{v&&window.removeEventListener("message",v)}}function N(O){return new Promise(M=>setTimeout(M,O))}function R(O){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",O.message)}return Zn}var CO;function B2(){return CO||(CO=1,(function(e){var i=po&&po.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=po&&po.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(q2(),e),t(bC(),e)})(po)),po}var m_=B2(),Vm={},xn={},jO;function Xe(){if(jO)return xn;jO=1;var e=xn&&xn.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(xn,"__esModule",{value:!0}),xn.validateType=xn.generateLazyValidator=xn.Ajv=void 0;const i=e(Hd());xn.Ajv=i.default;const t=e(j_()),n=e(L_());function o(l,c){let f=null;const p=(y,h)=>{if(!f){const g=new i.default({$data:!0,allErrors:!0});(0,t.default)(g),(0,n.default)(g,{singleError:!0}),c?.forEach(A=>g.addKeyword(A)),f=g.compile(l),Object.defineProperty(p,"errors",{get(){return f?.errors}})}return f(y,h)};return p}xn.generateLazyValidator=o;function s(l,c){return l.validate(c)}return xn.validateType=s,xn}var Hm={},LO;function wC(){return LO||(LO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const i=Xe(),t=Dn();var n;(function(s){s.ETHEREUM_MAINNET="Ethereum Mainnet",s.ETHEREUM_ROPSTEN="Ropsten",s.ETHEREUM_RINKEBY="Rinkeby",s.ETHEREUM_GOERLI="Goerli",s.ETHEREUM_KOVAN="Kovan",s.ETHEREUM_SEPOLIA="Sepolia",s.MATIC_MAINNET="Polygon",s.MATIC_MUMBAI="Mumbai",s.MATIC_AMOY="Amoy",s.AVALANCHE_MAINNET="Avalanche",s.BINANCE_MAINNET="Binance Smart Chain",s.ARBITRUM_MAINNET="Arbitrum",s.OPTIMISM_MAINNET="Optimism",s.FANTOM_MAINNET="Fantom"})(n=e.ChainName||(e.ChainName={}));function o(s){switch(s){case n.ETHEREUM_MAINNET:return t.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return t.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return t.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return t.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return t.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return t.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return t.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return t.ChainId.MATIC_MUMBAI;case n.MATIC_AMOY:return t.ChainId.MATIC_AMOY;case n.AVALANCHE_MAINNET:return t.ChainId.AVALANCHE_MAINNET;case n.BINANCE_MAINNET:return t.ChainId.BSC_MAINNET;case n.ARBITRUM_MAINNET:return t.ChainId.ARBITRUM_MAINNET;case n.OPTIMISM_MAINNET:return t.ChainId.OPTIMISM_MAINNET;case n.FANTOM_MAINNET:return t.ChainId.FANTOM_MAINNET;default:return null}}e.getChainId=o,(function(s){s.schema={type:"string",enum:Object.values(s)},s.validate=(0,i.generateLazyValidator)(s.schema)})(n=e.ChainName||(e.ChainName={}))})(Hm)),Hm}var zm={},DO;function li(){return DO||(DO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const i=Xe();(function(t){t.ETHEREUM="ETHEREUM",t.MATIC="MATIC",t.AVALANCHE="AVALANCHE",t.BSC="BINANCE SMART CHAIN",t.OPTIMISM="OPTIMISM",t.ARBITRUM="ARBITRUM",t.FANTOM="FANTOM"})(e.Network||(e.Network={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(zm)),zm}var kO;function Dn(){return kO||(kO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const i=Xe(),t=wC(),n=li();var o;(function(p){p[p.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",p[p.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",p[p.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",p[p.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",p[p.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",p[p.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",p[p.MATIC_MAINNET=137]="MATIC_MAINNET",p[p.MATIC_MUMBAI=80001]="MATIC_MUMBAI",p[p.MATIC_AMOY=80002]="MATIC_AMOY",p[p.BSC_MAINNET=56]="BSC_MAINNET",p[p.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",p[p.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",p[p.FANTOM_MAINNET=250]="FANTOM_MAINNET",p[p.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET"})(o=e.ChainId||(e.ChainId={}));function s(p){switch(p){case o.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case o.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case o.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case o.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case o.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case o.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case o.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case o.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;case o.MATIC_AMOY:return t.ChainName.MATIC_AMOY;case o.BSC_MAINNET:return t.ChainName.BINANCE_MAINNET;case o.ARBITRUM_MAINNET:return t.ChainName.ARBITRUM_MAINNET;case o.OPTIMISM_MAINNET:return t.ChainName.OPTIMISM_MAINNET;case o.FANTOM_MAINNET:return t.ChainName.FANTOM_MAINNET;case o.AVALANCHE_MAINNET:return t.ChainName.AVALANCHE_MAINNET;default:return null}}e.getChainName=s;function l(p){switch(p){case o.ETHEREUM_MAINNET:return"ethereum";case o.ETHEREUM_ROPSTEN:return"ropsten";case o.ETHEREUM_RINKEBY:return"rinkeby";case o.ETHEREUM_GOERLI:return"goerli";case o.ETHEREUM_KOVAN:return"kovan";case o.ETHEREUM_SEPOLIA:return"sepolia";case o.MATIC_MAINNET:return"matic";case o.MATIC_MUMBAI:return"mumbai";case o.MATIC_AMOY:return"amoy";default:return""}}e.getURNProtocol=l;function c(p){const y={[n.Network.BSC]:o.BSC_MAINNET,[n.Network.OPTIMISM]:o.OPTIMISM_MAINNET,[n.Network.ARBITRUM]:o.ARBITRUM_MAINNET,[n.Network.FANTOM]:o.FANTOM_MAINNET,[n.Network.AVALANCHE]:o.AVALANCHE_MAINNET};switch(p){case o.ETHEREUM_MAINNET:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET},y);case o.ETHEREUM_ROPSTEN:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_ROPSTEN,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_RINKEBY:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_RINKEBY,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_GOERLI:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_GOERLI,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_KOVAN:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_KOVAN,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_SEPOLIA:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_SEPOLIA,[n.Network.MATIC]:o.MATIC_AMOY},y);case o.MATIC_MAINNET:return Object.assign({[n.Network.ETHEREUM]:o.MATIC_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET},y);case o.MATIC_MUMBAI:return Object.assign({[n.Network.ETHEREUM]:o.MATIC_MUMBAI,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.MATIC_AMOY:return Object.assign({[n.Network.ETHEREUM]:o.MATIC_AMOY,[n.Network.MATIC]:o.MATIC_AMOY},y);default:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET},y)}}e.getNetworkMapping=c;function f(p){switch(p){case o.ETHEREUM_MAINNET:case o.ETHEREUM_ROPSTEN:case o.ETHEREUM_GOERLI:case o.ETHEREUM_KOVAN:case o.ETHEREUM_RINKEBY:case o.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case o.MATIC_MAINNET:case o.MATIC_MUMBAI:case o.MATIC_AMOY:return n.Network.MATIC;case o.BSC_MAINNET:return n.Network.BSC;case o.OPTIMISM_MAINNET:return n.Network.OPTIMISM;case o.ARBITRUM_MAINNET:return n.Network.ARBITRUM;case o.FANTOM_MAINNET:return n.Network.FANTOM;case o.AVALANCHE_MAINNET:return n.Network.AVALANCHE}}e.getNetwork=f,(function(p){p.schema={type:"number",enum:Object.values(p)},p.validate=(0,i.generateLazyValidator)(p.schema)})(o=e.ChainId||(e.ChainId={}))})(Vm)),Vm}var bt=Dn(),Gm={},qO;function SC(){return qO||(qO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const i=Xe();(function(t){t.INJECTED="injected",t.MAGIC="magic",t.MAGIC_TEST="magic_test",t.FORTMATIC="formatic",t.NETWORK="network",t.WALLET_CONNECT="wallet_connect",t.WALLET_CONNECT_V2="wallet_connect_v2",t.WALLET_LINK="wallet_link",t.METAMASK_MOBILE="metamask_mobile",t.AUTH_SERVER="auth_server"})(e.ProviderType||(e.ProviderType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})(Gm)),Gm}var Ct=SC(),zi;(function(e){e.Update="Web3ReactUpdate",e.Error="Web3ReactError",e.Deactivate="Web3ReactDeactivate"})(zi||(zi={}));var Ed={exports:{}},BO;function U2(){if(BO)return Ed.exports;BO=1;var e=typeof Reflect=="object"?Reflect:null,i=e&&typeof e.apply=="function"?e.apply:function(v,T,j){return Function.prototype.apply.call(v,T,j)},t;e&&typeof e.ownKeys=="function"?t=e.ownKeys:Object.getOwnPropertySymbols?t=function(v){return Object.getOwnPropertyNames(v).concat(Object.getOwnPropertySymbols(v))}:t=function(v){return Object.getOwnPropertyNames(v)};function n(S){console&&console.warn&&console.warn(S)}var o=Number.isNaN||function(v){return v!==v};function s(){s.init.call(this)}Ed.exports=s,Ed.exports.once=M,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function c(S){if(typeof S!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof S)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(S){if(typeof S!="number"||S<0||o(S))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+S+".");l=S}}),s.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},s.prototype.setMaxListeners=function(v){if(typeof v!="number"||v<0||o(v))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+v+".");return this._maxListeners=v,this};function f(S){return S._maxListeners===void 0?s.defaultMaxListeners:S._maxListeners}s.prototype.getMaxListeners=function(){return f(this)},s.prototype.emit=function(v){for(var T=[],j=1;j<arguments.length;j++)T.push(arguments[j]);var V=v==="error",W=this._events;if(W!==void 0)V=V&&W.error===void 0;else if(!V)return!1;if(V){var X;if(T.length>0&&(X=T[0]),X instanceof Error)throw X;var fe=new Error("Unhandled error."+(X?" ("+X.message+")":""));throw fe.context=X,fe}var Ae=W[v];if(Ae===void 0)return!1;if(typeof Ae=="function")i(Ae,this,T);else for(var Se=Ae.length,Ee=N(Ae,Se),j=0;j<Se;++j)i(Ee[j],this,T);return!0};function p(S,v,T,j){var V,W,X;if(c(T),W=S._events,W===void 0?(W=S._events=Object.create(null),S._eventsCount=0):(W.newListener!==void 0&&(S.emit("newListener",v,T.listener?T.listener:T),W=S._events),X=W[v]),X===void 0)X=W[v]=T,++S._eventsCount;else if(typeof X=="function"?X=W[v]=j?[T,X]:[X,T]:j?X.unshift(T):X.push(T),V=f(S),V>0&&X.length>V&&!X.warned){X.warned=!0;var fe=new Error("Possible EventEmitter memory leak detected. "+X.length+" "+String(v)+" listeners added. Use emitter.setMaxListeners() to increase limit");fe.name="MaxListenersExceededWarning",fe.emitter=S,fe.type=v,fe.count=X.length,n(fe)}return S}s.prototype.addListener=function(v,T){return p(this,v,T,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(v,T){return p(this,v,T,!0)};function y(){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 h(S,v,T){var j={fired:!1,wrapFn:void 0,target:S,type:v,listener:T},V=y.bind(j);return V.listener=T,j.wrapFn=V,V}s.prototype.once=function(v,T){return c(T),this.on(v,h(this,v,T)),this},s.prototype.prependOnceListener=function(v,T){return c(T),this.prependListener(v,h(this,v,T)),this},s.prototype.removeListener=function(v,T){var j,V,W,X,fe;if(c(T),V=this._events,V===void 0)return this;if(j=V[v],j===void 0)return this;if(j===T||j.listener===T)--this._eventsCount===0?this._events=Object.create(null):(delete V[v],V.removeListener&&this.emit("removeListener",v,j.listener||T));else if(typeof j!="function"){for(W=-1,X=j.length-1;X>=0;X--)if(j[X]===T||j[X].listener===T){fe=j[X].listener,W=X;break}if(W<0)return this;W===0?j.shift():R(j,W),j.length===1&&(V[v]=j[0]),V.removeListener!==void 0&&this.emit("removeListener",v,fe||T)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(v){var T,j,V;if(j=this._events,j===void 0)return this;if(j.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):j[v]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete j[v]),this;if(arguments.length===0){var W=Object.keys(j),X;for(V=0;V<W.length;++V)X=W[V],X!=="removeListener"&&this.removeAllListeners(X);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(T=j[v],typeof T=="function")this.removeListener(v,T);else if(T!==void 0)for(V=T.length-1;V>=0;V--)this.removeListener(v,T[V]);return this};function g(S,v,T){var j=S._events;if(j===void 0)return[];var V=j[v];return V===void 0?[]:typeof V=="function"?T?[V.listener||V]:[V]:T?O(V):N(V,V.length)}s.prototype.listeners=function(v){return g(this,v,!0)},s.prototype.rawListeners=function(v){return g(this,v,!1)},s.listenerCount=function(S,v){return typeof S.listenerCount=="function"?S.listenerCount(v):A.call(S,v)},s.prototype.listenerCount=A;function A(S){var v=this._events;if(v!==void 0){var T=v[S];if(typeof T=="function")return 1;if(T!==void 0)return T.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function N(S,v){for(var T=new Array(v),j=0;j<v;++j)T[j]=S[j];return T}function R(S,v){for(;v+1<S.length;v++)S[v]=S[v+1];S.pop()}function O(S){for(var v=new Array(S.length),T=0;T<v.length;++T)v[T]=S[T].listener||S[T];return v}function M(S,v){return new Promise(function(T,j){function V(X){S.removeListener(v,W),j(X)}function W(){typeof S.removeListener=="function"&&S.removeListener("error",V),T([].slice.call(arguments))}I(S,v,W,{once:!0}),v!=="error"&&_(S,V,{once:!0})})}function _(S,v,T){typeof S.on=="function"&&I(S,"error",v,T)}function I(S,v,T,j){if(typeof S.on=="function")j.once?S.once(v,T):S.on(v,T);else if(typeof S.addEventListener=="function")S.addEventListener(v,function V(W){j.once&&S.removeEventListener(v,V),T(W)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof S)}return Ed.exports}var TC=U2();const r3=ML(TC);function F2(e,i){e.prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i}var Us=(function(e){F2(i,e);function i(n){var o,s=n===void 0?{}:n,l=s.supportedChainIds;return o=e.call(this)||this,o.supportedChainIds=l,o}var t=i.prototype;return t.emitUpdate=function(o){this.emit(zi.Update,o)},t.emitError=function(o){this.emit(zi.Error,o)},t.emitDeactivate=function(){this.emit(zi.Deactivate)},i})(TC.EventEmitter);const V2="modulepreload",H2=function(e){return"https://cdn.decentraland.org/@dcl-regenesislabs/mobile-hub/1.0.0-20724632172.commit-bac4912/"+e},UO={},ol=function(i,t,n){let o=Promise.resolve();if(t&&t.length>0){let f=function(p){return Promise.all(p.map(y=>Promise.resolve(y).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");o=f(t.map(p=>{if(p=H2(p),p in UO)return;UO[p]=!0;const y=p.endsWith(".css"),h=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${h}`))return;const g=document.createElement("link");if(g.rel=y?"stylesheet":V2,y||(g.as="script"),g.crossOrigin="",g.href=p,c&&g.setAttribute("nonce",c),document.head.appendChild(g),y)return new Promise((A,N)=>{g.addEventListener("load",A),g.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${p}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return o.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return i().catch(s)})};var $n={},ho={},mo={},Wm={},FO;function z2(){return FO||(FO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const i=Xe();e.SCENE_UPDATE="SCENE_UPDATE",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(Wm)),Wm}var Km={},VO;function G2(){return VO||(VO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const i=Xe();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})(Km)),Km}var HO;function W2(){return HO||(HO=1,(function(e){var i=mo&&mo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=mo&&mo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(z2(),e),t(G2(),e)})(mo)),mo}var yo={},Ym={},zO;function K2(){return zO||(zO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const i=Xe();(function(t){t.SCENE="scene",t.SMART_ITEM="smart-item",t.PORTABLE_EXPERIENCE="portable-experience",t.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(Ym)),Ym}var Xm={},Qm={},GO;function Yd(){return GO||(GO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const i=Xe();(function(t){t.UNIQUE="unique",t.MYTHIC="mythic",t.EXOTIC="exotic",t.LEGENDARY="legendary",t.EPIC="epic",t.RARE="rare",t.UNCOMMON="uncommon",t.COMMON="common"})(e.Rarity||(e.Rarity={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema);const n={[t.UNIQUE]:1,[t.MYTHIC]:10,[t.EXOTIC]:50,[t.LEGENDARY]:100,[t.EPIC]:1e3,[t.RARE]:5e3,[t.UNCOMMON]:1e4,[t.COMMON]:1e5},o={[t.UNIQUE]:"#FFE617",[t.MYTHIC]:"#FB7DE3",[t.EXOTIC]:"#E4FFB8",[t.LEGENDARY]:"#A657ED",[t.EPIC]:"#6397F2",[t.RARE]:"#3AD682",[t.UNCOMMON]:"#FF8563",[t.COMMON]:"#D4E0E0"},s={[t.UNIQUE]:"#FFB626",[t.MYTHIC]:"#FF63E1",[t.EXOTIC]:"#CAFF73",[t.LEGENDARY]:"#842DDA",[t.EPIC]:"#3D85E6",[t.RARE]:"#36CF75",[t.UNCOMMON]:"#ED6D4F",[t.COMMON]:"#ABC1C1"};function l(y){return n[y]}t.getMaxSupply=l;function c(y){return s[y]}t.getColor=c;function f(){return[t.UNIQUE,t.MYTHIC,t.EXOTIC,t.LEGENDARY,t.EPIC,t.RARE,t.UNCOMMON,t.COMMON]}t.getRarities=f;function p(y){return[o[y],s[y]]}t.getGradient=p})(e.Rarity||(e.Rarity={}))})(Qm)),Qm}var Jm={},WO;function Vo(){return WO||(WO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const i=Xe();(function(t){t.EYEBROWS="eyebrows",t.EYES="eyes",t.FACIAL_HAIR="facial_hair",t.HAIR="hair",t.BODY_SHAPE="body_shape",t.MOUTH="mouth",t.UPPER_BODY="upper_body",t.LOWER_BODY="lower_body",t.FEET="feet",t.EARRING="earring",t.EYEWEAR="eyewear",t.HAT="hat",t.HELMET="helmet",t.MASK="mask",t.TIARA="tiara",t.TOP_HEAD="top_head",t.SKIN="skin",t.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(Jm)),Jm}var Zm={},xm={},KO;function W_(){return KO||(KO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const i=Xe();(function(t){t.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",t.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(xm)),xm}var $m={},ey={},YO;function AC(){return YO||(YO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const i=Xe();(function(t){t.HEAD="head",t.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(ey)),ey}var XO;function K_(){return XO||(XO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const i=Vo(),t=Xe(),n=AC();(function(o){o.schema={oneOf:[Object.assign({},i.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})($m)),$m}var QO;function Y_(){return QO||(QO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const i=Xe(),t=W_(),n=K_();(function(o){o.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(Zm)),Zm}var go={},vo={},ty={},ry={},JO;function Ho(){return JO||(JO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const i=Xe();(function(t){t.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const n=(0,i.generateLazyValidator)(t.schema);t.validate=o=>n(o)})(e.Color3||(e.Color3={})),(function(t){t.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.EthAddress||(e.EthAddress={})),(function(t){t.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.IPFSv2||(e.IPFSv2={})),(function(t){t.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.IPFSv1||(e.IPFSv1={}))})(ry)),ry}var ZO;function OC(){return ZO||(ZO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const i=Vo(),t=Ho(),n=Xe();var o;(function(f){f.schema={type:"object",required:["face256","body"],properties:{face256:t.IPFSv2.schema,body:t.IPFSv2.schema}},f.validate=(0,n.generateLazyValidator)(f.schema)})(o=e.Snapshots||(e.Snapshots={}));var s;(function(f){f.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:i.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:o.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(s=e.AvatarInfo||(e.AvatarInfo={}));var l;(function(f){f.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const p=new RegExp(f.schema.pattern,"i");f.validate=y=>p.test(y)})(l=e.LinkUrl||(e.LinkUrl={}));var c;(function(f){f.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:l.schema}}})(c=e.Link||(e.Link={})),(function(f){f.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:c.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:t.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:s.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(e.Avatar||(e.Avatar={}))})(ty)),ty}var ny={},xO;function Y2(){return xO||(xO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const i=Xe(),t=OC();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(ny)),ny}var $O;function X2(){return $O||($O=1,(function(e){var i=vo&&vo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=vo&&vo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(OC(),e),t(Y2(),e)})(vo)),vo}var iy={},ay={},eP;function PC(){return eP||(eP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const i=Xe();e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],(function(t){t.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(ay)),ay}var oy={},tP;function IC(){return tP||(tP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const i=Xe();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(oy)),oy}var sy={},rP;function RC(){return rP||(rP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const i=Xe();(function(t){t.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},t.schemaValidator=(0,i.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(sy)),sy}var uy={},Su={},nP;function X_(){return nP||(nP=1,Object.defineProperty(Su,"__esModule",{value:!0}),Su.displayableProperties=void 0,Su.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Su}var ly={},iP;function NC(){return iP||(iP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const i=Xe();(function(t){t.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(ly)),ly}var cy={},aP;function MC(){return aP||(aP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const i=Xe();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(cy)),cy}var oP;function Q2(){return oP||(oP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const i=Xe(),t=X_(),n=PC(),o=RC(),s=NC(),l=MC(),c=IC();var f;(function(p){p.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",p.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",p.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",p.USE_WEB3_API="USE_WEB3_API",p.USE_FETCH="USE_FETCH",p.USE_WEBSOCKET="USE_WEBSOCKET",p.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(f=e.RequiredPermission||(e.RequiredPermission={})),(function(p){p.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:o.SceneParcels.schema},t.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},s.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:l.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(f)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},c.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:f.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},p.validate=(0,i.generateLazyValidator)(p.schema)})(e.Scene||(e.Scene={}))})(uy)),uy}var sP;function J2(){return sP||(sP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var i=PC();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return i.FeatureToggles}});var t=IC();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=RC();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var o=Q2();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return o.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return o.RequiredPermission}});var s=NC();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return s.Source}});var l=MC();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return l.SpawnPoint}})})(iy)),iy}var _o={},dy={},fy={},uP;function CC(){return uP||(uP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const i=Xe();(function(t){t.EN="en",t.ES="es"})(e.Locale||(e.Locale={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(fy)),fy}var lP;function jC(){return lP||(lP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const i=Xe(),t=CC();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(dy)),dy}var py={},cP;function LC(){return cP||(cP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const i=Xe();(function(t){t.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(py)),py}var hy={},dP;function Q_(){return dP||(dP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const i=Yd(),t=Xe();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:i.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},o=(0,t.generateLazyValidator)(n);function s(l){return o(l)}e.isStandard=s})(hy)),hy}var my={},Eo={},yy={},fP;function Z2(){return fP||(fP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const i=Xe();(function(t){t.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(yy)),yy}var pP;function DC(){return pP||(pP=1,(function(e){var i=Eo&&Eo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Eo&&Eo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(Z2(),e)})(Eo)),Eo}var gy={},hP;function J_(){return hP||(hP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMappingsHelper=e.AddMappingError=e.Mappings=e.Mapping=e.MultipleMapping=e.RangeMapping=e.AnyMapping=e.SingleMapping=e.ContractNetwork=e.MappingType=void 0;const i=Xe();var t;(function(h){h.SINGLE="single",h.ANY="any",h.MULTIPLE="multiple",h.RANGE="range"})(t=e.MappingType||(e.MappingType={}));var n;(function(h){h.MAINNET="mainnet",h.MATIC="matic",h.SEPOLIA="sepolia",h.AMOY="amoy"})(n=e.ContractNetwork||(e.ContractNetwork={}));var o;(function(h){h.schema={type:"object",properties:{type:{type:"string",const:t.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},h.validate=(0,i.generateLazyValidator)(h.schema)})(o=e.SingleMapping||(e.SingleMapping={}));var s;(function(h){h.schema={type:"object",properties:{type:{type:"string",const:t.ANY}},required:["type"],additionalProperties:!1},h.validate=(0,i.generateLazyValidator)(h.schema)})(s=e.AnyMapping||(e.AnyMapping={}));var l;(function(h){h._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(A,N){if(!N||!N.from||!N.to)return!1;let{to:R,from:O}=N;return(typeof O!="bigint"||typeof R!="bigint")&&(O=BigInt(O),R=BigInt(R)),O<=R},errors:!1},h.schema={type:"object",properties:{type:{type:"string",const:t.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},h.validate=(0,i.generateLazyValidator)(h.schema,[h._fromLessThanOrEqualTo])})(l=e.RangeMapping||(e.RangeMapping={}));var c;(function(h){h.schema={type:"object",properties:{type:{type:"string",const:t.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},h.validate=(0,i.generateLazyValidator)(h.schema)})(c=e.MultipleMapping||(e.MultipleMapping={}));var f;(function(h){h.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)}},required:["type"],oneOf:[o.schema,s.schema,l.schema,c.schema]},h.validate=(0,i.generateLazyValidator)(h.schema,[l._fromLessThanOrEqualTo])})(f=e.Mapping||(e.Mapping={})),(function(h){h._isMappingsValid={keyword:"_isMappingsValid",validate:function(A,N){try{y(N)}catch{return!1}return!0},errors:!1},h.innerSchema={type:"object",patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:"array",items:f.schema}},minProperties:1,required:[],additionalProperties:!1};const g=Object.values(n).reduce((A,N)=>(A[N]=h.innerSchema,A),{});h.schema={type:"object",properties:g,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},h.validate=(0,i.generateLazyValidator)(h.schema,[l._fromLessThanOrEqualTo,h._isMappingsValid])})(e.Mappings||(e.Mappings={}));class p extends Error{constructor(g,A,N){super(g),this.existingMapping=A,this.conflictingMapping=N}}e.AddMappingError=p;function y(h={}){const g={};for(const[v,T]of Object.entries(h)){g[v]={};for(const[j,V]of Object.entries(T))for(const W of V)I(v,j,W)}function A(){return JSON.parse(JSON.stringify(g))}function N(v,T,j){const V=BigInt(v);return V>=BigInt(T)&&V<=BigInt(j)}function R(v,T){switch(T.type){case t.SINGLE:return v.id===T.id;case t.MULTIPLE:return T.ids.includes(v.id);case t.RANGE:return N(v.id,T.from,T.to);default:return!1}}function O(v,T){switch(T.type){case t.SINGLE:return v.ids.includes(T.id);case t.MULTIPLE:return v.ids.some(j=>T.ids.includes(j));case t.RANGE:return v.ids.some(j=>N(j,T.from,T.to));default:return!1}}function M(v,T){switch(T.type){case t.SINGLE:return N(T.id,v.from,v.to);case t.MULTIPLE:return T.ids.some(j=>N(j,v.from,v.to));case t.RANGE:return BigInt(v.from)<=BigInt(T.to)&&BigInt(v.to)>=BigInt(T.from)}}function _(v,T){if(v.type===t.ANY||T.type===t.ANY)return!0;switch(v.type){case t.SINGLE:return R(v,T);case t.MULTIPLE:return O(v,T);case t.RANGE:return M(v,T)}}function I(v,T,j){var V,W;const X=T.toLowerCase();g[v]=(V=g[v])!==null&&V!==void 0?V:{},g[v][X]=(W=g[v][X])!==null&&W!==void 0?W:[];for(const fe of g[v][X])if(_(fe,j))throw new p(`Cannot add mapping to contract ${X} on network ${v} because it overlaps with existing mapping`,fe,j);g[v][X].push(j)}function S(v,T,j){var V;return!((V=g[v])===null||V===void 0)&&V[T]?g[v][T].some(W=>{switch(W.type){case t.SINGLE:return W.id===j;case t.ANY:return!0;case t.MULTIPLE:return W.ids.includes(j);case t.RANGE:return BigInt(j)>=BigInt(W.from)&&BigInt(j)<=BigInt(W.to)}}):!1}return{addMapping:I,getMappings:A,includesNft:S}}e.createMappingsHelper=y})(gy)),gy}var mP;function Z_(){return mP||(mP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const i=Xe(),t=DC(),n=J_();e.schema={type:"object",properties:{merkleProof:t.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]},mappings:Object.assign({nullable:!0},n.Mappings.schema)},required:["merkleProof","content"],_containsHashingKeys:!0};const o={keyword:"_containsHashingKeys",validate:function(c,f){var p;const y=f;return!((p=y?.merkleProof)===null||p===void 0)&&p.hashingKeys?y.merkleProof.hashingKeys.every(h=>y.hasOwnProperty(h)):!1},errors:!1},s=(0,i.generateLazyValidator)(e.schema,[o,n.RangeMapping._fromLessThanOrEqualTo,n.Mappings._isMappingsValid]);function l(c){return s(c)}e.isThirdParty=l})(my)),my}var vy={},_y={},ei={},yP;function kC(){if(yP)return ei;yP=1,Object.defineProperty(ei,"__esModule",{value:!0}),ei.isBaseEmote=ei.isBaseAvatar=ei.requiredBaseItemProps=ei.baseItemProperties=void 0;const e=jC(),i=LC(),t=X_();ei.baseItemProperties=Object.assign(Object.assign({},t.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:e.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},i.Metrics.schema),{nullable:!0})}),ei.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(s){if(!s||!s.id)return!1;const l=s.id.split(":"),c=l[1]==="decentraland",f=l[3]==="base-avatars";return l.length===5&&c&&f}ei.isBaseAvatar=n;function o(s){if(!s||!s.id)return!1;const l=s.id.split(":");return l.length===5&&l[1]==="decentraland"&&l[3]==="base-emotes"}return ei.isBaseEmote=o,ei}var gP;function x2(){return gP||(gP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const i=Xe(),t=Vo(),n=Y_(),o=kC(),s=Q_(),l=Z_(),c=K_(),f=J_();(function(p){p.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},o.baseItemProperties),s.standardProperties),l.schema.properties.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:c.HideableWearableCategory.schema},hides:{type:"array",items:c.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:c.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity","mappings"],_isBaseAvatar:!0},{required:[...o.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[...o.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const y={keyword:"_isThirdParty",validate:(g,A)=>!g||(0,l.isThirdParty)(A),errors:!1},h={keyword:"_isBaseAvatar",validate:(g,A)=>!g||(0,o.isBaseAvatar)(A),errors:!1};p.validate=(0,i.generateLazyValidator)(p.schema,[y,h,f.RangeMapping._fromLessThanOrEqualTo,f.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(_y)),_y}var vP;function $2(){return vP||(vP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var i=Y_();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return i.WearableRepresentation}});var t=x2();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=Vo();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var o=AC();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return o.BodyPartCategory}});var s=K_();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return s.HideableWearableCategory}})})(vy)),vy}var Ey={},by={},wy={},Sy={},_P;function qC(){return _P||(_P=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const i=Xe();(function(t){t.DANCE="dance",t.STUNT="stunt",t.GREETINGS="greetings",t.FUN="fun",t.POSES="poses",t.REACTIONS="reactions",t.HORROR="horror",t.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(Sy)),Sy}var Ty={},EP;function BC(){return EP||(EP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const i=Xe(),t=W_();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(Ty)),Ty}var bP;function UC(){return bP||(bP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const i=qC(),t=Xe(),n=BC();(function(o){o.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:i.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(wy)),wy}var wP;function eB(){return wP||(wP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const i=FC(),t=Xe(),n=kC(),o=Q_(),s=Z_(),l=UC();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),o.standardProperties),s.schema.properties),{emoteDataADR74:l.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseEmote:!0},{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const f={keyword:"_isThirdParty",validate:(y,h)=>!y||(0,i.isThirdParty)(h),errors:!1},p={keyword:"_isBaseEmote",validate:(y,h)=>!y||(0,n.isBaseEmote)(h),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[f,p,i.RangeMapping._fromLessThanOrEqualTo,i.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))})(by)),by}var Ay={},SP;function tB(){return SP||(SP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const i=Xe();(function(t){t.SIMPLE="simple",t.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(Ay)),Ay}var TP;function rB(){return TP||(TP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=e.EmoteCategory=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var i=eB();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return i.Emote}});var t=BC();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=UC();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var o=qC();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return o.EmoteCategory}});var s=tB();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}})})(Ey)),Ey}var AP;function FC(){return AP||(AP=1,(function(e){var i=_o&&_o.__createBinding||(Object.create?(function(p,y,h,g){g===void 0&&(g=h);var A=Object.getOwnPropertyDescriptor(y,h);(!A||("get"in A?!y.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return y[h]}}),Object.defineProperty(p,g,A)}):(function(p,y,h,g){g===void 0&&(g=h),p[g]=y[h]})),t=_o&&_o.__exportStar||function(p,y){for(var h in p)h!=="default"&&!Object.prototype.hasOwnProperty.call(y,h)&&i(y,p,h)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=jC();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var o=CC();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return o.Locale}});var s=LC();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return s.Metrics}});var l=W_();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return l.BodyShape}});var c=Q_();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return c.isStandard}});var f=Z_();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return f.isThirdParty}}),t(J_(),e),t($2(),e),t(rB(),e)})(_o)),_o}var Oy={},Py={},OP;function Xd(){return OP||(OP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const i=Xe();var t;(function(o){o.SIGNER="SIGNER",o.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",o.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",o.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",o.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(o){o.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:t.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},o.validate=(0,i.generateLazyValidator)(o.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(o){o.schema={type:"array",items:n.schema,minItems:1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.AuthChain||(e.AuthChain={}))})(Py)),Py}var PP;function nB(){return PP||(PP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const i=Ho(),t=Xd(),n=Xe();(function(o){o.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:i.IPFSv1.schema}},{properties:{entityId:i.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(o){o.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:i.IPFSv1.schema}},{properties:{entityId:i.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(Oy)),Oy}var Iy={},Ry={},IP;function VC(){return IP||(IP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const i=Ho(),t=Xe();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[i.IPFSv1.schema,i.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(Ry)),Ry}var RP;function HC(){return RP||(RP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const i=Ho(),t=VC(),n=Xe();(function(o){o.SCENE="scene",o.PROFILE="profile",o.WEARABLE="wearable",o.STORE="store",o.EMOTE="emote",o.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(o){o.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[i.IPFSv1.schema,i.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:t.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.Entity||(e.Entity={}))})(Iy)),Iy}var Ny={},NP;function iB(){return NP||(NP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const i=Xd(),t=Xe();(function(n){n.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:i.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(Ny)),Ny}var bo={},My={},MP;function aB(){return MP||(MP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const i=Vo(),t=Ho(),n=Xe();var o;(function(s){s.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:i.WearableCategory.schema}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(o=e.Outfit||(e.Outfit={})),(function(s){s.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:o.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(e.Outfits||(e.Outfits={}))})(My)),My}var CP;function oB(){return CP||(CP=1,(function(e){var i=bo&&bo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=bo&&bo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(aB(),e)})(bo)),bo}var wo={},Cy={},jP;function zC(){return jP||(jP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationType=void 0,(function(i){i.BADGE_GRANTED="badge_granted",i.BID_ACCEPTED="bid_accepted",i.BID_RECEIVED="bid_received",i.EVENTS_STARTED="events_started",i.EVENTS_STARTS_SOON="events_starts_soon",i.GOVERNANCE_ANNOUNCEMENT="governance_announcement",i.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",i.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",i.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",i.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",i.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",i.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",i.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",i.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",i.GOVERNANCE_TENDER_PASSED="governance_tender_passed",i.GOVERNANCE_WHALE_VOTE="governance_whale_vote",i.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",i.ITEM_SOLD="item_sold",i.ITEM_PUBLISHED="item_published",i.LAND_RENTAL_ENDED="rental_ended",i.LAND_RENTED="rental_started",i.REWARD_ASSIGNED="reward_assignment",i.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",i.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",i.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",i.REWARD_DELAYED="reward_delayed",i.REWARD_IN_PROGRESS="reward_in_progress",i.ROYALTIES_EARNED="royalties_earned",i.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",i.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",i.WORLDS_ACCESS_RESTORED="worlds_access_restored",i.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",i.WORLDS_MISSING_RESOURCES="worlds_missing_resources",i.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",i.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked"})(e.NotificationType||(e.NotificationType={}))})(Cy)),Cy}var jy={},Ly={},LP;function GC(){return LP||(LP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const i=Xe(),t=zC(),n={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},o=Object.values(t.NotificationType).reduce((s,l)=>(s[l]=n,s),{});(function(s){s.schema={type:"object",required:["ignore_all_email","ignore_all_in_app","message_type"],properties:{ignore_all_email:{type:"boolean"},ignore_all_in_app:{type:"boolean"},message_type:{type:"object",required:Object.values(t.NotificationType),additionalProperties:!1,properties:o}}},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})(Ly)),Ly}var Dy={},DP;function WC(){return DP||(DP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,(function(i){i.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const t=new RegExp(i.schema.pattern);i.validate=n=>t.test(n)})(e.Email||(e.Email={}))})(Dy)),Dy}var kP;function sB(){return kP||(kP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const i=Xe(),t=GC(),n=Ho(),o=WC();(function(s){s.schema={type:"object",required:["address","details"],properties:{address:n.EthAddress.schema,email:Object.assign(Object.assign({},o.Email.schema),{nullable:!0}),details:t.SubscriptionDetails.schema}},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Subscription||(e.Subscription={}))})(jy)),jy}var qP;function uB(){return qP||(qP=1,(function(e){var i=wo&&wo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=wo&&wo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(zC(),e),t(sB(),e),t(GC(),e)})(wo)),wo}var So={},ky={},BP;function Fs(){return BP||(BP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,(function(i){(function(t){t.BLOCKCHAIN="blockchain",t.CATALYST_DEPLOYMENT="catalyst-deployment",t.WORLD="world",t.CLIENT="client",t.MARKETPLACE="marketplace",t.REWARDS="rewards",t.BADGE="badge",t.ASSET_BUNDLE="asset-bundle",t.SOCIAL_SERVICE="social-service"})(i.Type||(i.Type={})),(function(t){(function(n){n.BID_ACCEPTED="bid-accepted",n.ITEM_SOLD="item-sold",n.RENTAL_ENDED="land-rental-ended",n.RENTAL_STARTED="land-rental-started",n.ROYALTIES_EARNED="royalties-earned",n.COLLECTION_CREATED="collection-created",n.ITEM_PUBLISHED="item-published"})(t.Blockchain||(t.Blockchain={})),(function(n){n.BID_RECEIVED="bid-received"})(t.Marketplace||(t.Marketplace={})),(function(n){n.SCENE="scene",n.PROFILE="profile",n.WEARABLE="wearable",n.STORE="store",n.EMOTE="emote",n.OUTFITS="outfits"})(t.CatalystDeployment||(t.CatalystDeployment={})),(function(n){n.DEPLOYMENT="deployment"})(t.Worlds||(t.Worlds={})),(function(n){n.MOVE_TO_PARCEL="move-to-parcel",n.USED_EMOTE="used-emote",n.PASSPORT_OPENED="passport-opened",n.WALKED_DISTANCE="walked-distance",n.VERTICAL_HEIGHT_REACHED="vertical-height-reached"})(t.Client||(t.Client={})),(function(n){n.REWARD_IN_PROGRESS="reward-in-progress",n.REWARD_ASSIGNED="reward-assigned",n.CAMPAIGN_OUT_OF_FUNDS="campaign-out-of-funds",n.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="campaign-gas-price-higher-than-expected",n.CAMPAIGN_OUT_OF_STOCK="campaign-out-of-stock",n.REWARD_DELAYED="reward-delayed"})(t.Rewards||(t.Rewards={})),(function(n){n.GRANTED="badge-granted"})(t.Badge||(t.Badge={})),(function(n){n.CONVERTED="converted",n.MANUALLY_QUEUED="manually-queued"})(t.AssetBundle||(t.AssetBundle={})),(function(n){n.FRIENDSHIP_REQUEST="friendship-request",n.FRIENDSHIP_ACCEPTED="friendship-accepted"})(t.SocialService||(t.SocialService={}))})(i.SubType||(i.SubType={}))})(e.Events||(e.Events={}))})(ky)),ky}var qy={},UP;function lB(){return UP||(UP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CollectionCreatedEvent=e.RoyaltiesEarnedEvent=e.RentalStartedEvent=e.RentalEndedEvent=e.ItemPublishedEvent=e.ItemSoldEvent=e.BidAcceptedEvent=void 0;const i=Xe(),t=Fs();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.BID_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.BidAcceptedEvent||(e.BidAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ITEM_SOLD},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},buyer:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},tokenId:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["address","image","seller","category","link","network","title","description"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.ItemSoldEvent||(e.ItemSoldEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ITEM_PUBLISHED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},itemId:{type:"string"},network:{type:"string"},urn:{type:"string"}},required:["creator","category","itemId","network","urn"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.ItemPublishedEvent||(e.ItemPublishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.RENTAL_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.RentalEndedEvent||(e.RentalEndedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.RENTAL_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.RentalStartedEvent||(e.RentalStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ROYALTIES_EARNED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},royaltiesCut:{type:"string"},royaltiesCollector:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","image","category","link","royaltiesCut","royaltiesCollector","network","title"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.RoyaltiesEarnedEvent||(e.RoyaltiesEarnedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.COLLECTION_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},name:{type:"string"}},required:["creator","name"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={}))})(qy)),qy}var By={},FP;function cB(){return FP||(FP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const i=Xd(),t=Xe(),n=HC(),o=Fs();(function(s){s.schema={type:"object",properties:{type:{type:"string",const:o.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(o.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:n.Entity.schema,authChain:i.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(By)),By}var Uy={},VP;function dB(){return VP||(VP=1,Object.defineProperty(Uy,"__esModule",{value:!0})),Uy}var Fy={},HP;function fB(){return HP||(HP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const i=Xe(),t=Fs();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.MARKETPLACE},subType:{type:"string",const:t.Events.SubType.Marketplace.BID_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(Fy)),Fy}var Vy={},Tu={},zP;function pB(){if(zP)return Tu;zP=1,Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.createEventSchema=void 0;function e(i,t,n){return{type:"object",properties:{type:{type:"string",const:i},subType:{type:"string",const:t},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}return Tu.createEventSchema=e,Tu}var GP;function hB(){return GP||(GP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const i=Xe(),t=Fs(),n=pB(),o={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},beneficiary:{type:"string"},tokenName:{type:"string"},tokenImage:{type:"string"},tokenRarity:{type:"string",nullable:!0},tokenCategory:{type:"string",nullable:!0}},required:["title","description","beneficiary","tokenName","tokenImage"],additionalProperties:!1},s={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},owner:{type:"string"},campaignId:{type:"string"},campaignName:{type:"string"}},required:["title","description","owner","campaignId","campaignName"],additionalProperties:!1};(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_IN_PROGRESS,o),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_ASSIGNED,o),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,s),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,s),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,s),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_DELAYED,o),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(Vy)),Vy}var Hy={},WP;function mB(){return WP||(WP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FriendshipAcceptedEvent=e.FriendshipRequestEvent=e.AssetBundleConversionManuallyQueuedEvent=e.AssetBundleConversionFinishedEvent=e.BadgeGrantedEvent=void 0;const i=Xe(),t=Fs();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BADGE},subType:{type:"string",const:t.Events.SubType.Badge.GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{badgeId:{type:"string"},badgeTierName:{type:"string",nullable:!0},badgeName:{type:"string"},badgeImageUrl:{type:"string"},address:{type:"string"}},required:["badgeId","badgeName","badgeImageUrl","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.BadgeGrantedEvent||(e.BadgeGrantedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.Events.SubType.AssetBundle.CONVERTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},statusCode:{type:"number"},isLods:{type:"boolean"},isWorld:{type:"boolean"}},required:["entityId","platform","statusCode","isLods","isWorld"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.AssetBundleConversionFinishedEvent||(e.AssetBundleConversionFinishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.Events.SubType.AssetBundle.MANUALLY_QUEUED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},isLods:{type:"boolean"},isPriority:{type:"boolean"}},required:["entityId","platform","isLods"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.AssetBundleConversionManuallyQueuedEvent||(e.AssetBundleConversionManuallyQueuedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.Events.SubType.SocialService.FRIENDSHIP_REQUEST},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"}},required:["address","name","profileImageUrl"]},receiver:{type:"object",properties:{address:{type:"string"}},required:["address"]},message:{type:"string",nullable:!0}},required:["sender"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.FriendshipRequestEvent||(e.FriendshipRequestEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.Events.SubType.SocialService.FRIENDSHIP_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"}},required:["address","name","profileImageUrl"]},receiver:{type:"object",properties:{address:{type:"string"}},required:["address"]}},required:["sender"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={}))})(Hy)),Hy}var KP;function yB(){return KP||(KP=1,(function(e){var i=So&&So.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=So&&So.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(Fs(),e),t(lB(),e),t(cB(),e),t(dB(),e),t(fB(),e),t(hB(),e),t(mB(),e)})(So)),So}var YP;function x_(){return YP||(YP=1,(function(e){var i=go&&go.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=go&&go.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(X2(),e),t(J2(),e),t(FC(),e),t(X_(),e),t(DC(),e),t(nB(),e),t(HC(),e),t(iB(),e),t(oB(),e),t(uB(),e),t(yB(),e)})(go)),go}var XP;function gB(){return XP||(XP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const i=Yd(),t=Vo(),n=Y_(),o=Xe(),s=x_();(function(l){l.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},i.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:t.WearableCategory.schema},hides:{type:"array",items:t.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:s.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},l.validate=(0,o.generateLazyValidator)(l.schema)})(e.WearableJson||(e.WearableJson={}))})(Xm)),Xm}var QP;function vB(){return QP||(QP=1,(function(e){var i=yo&&yo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=yo&&yo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(K2(),e),t(gB(),e)})(yo)),yo}var JP;function _B(){return JP||(JP=1,(function(e){var i=ho&&ho.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=ho&&ho.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(W2(),e),t(vB(),e)})(ho)),ho}var To={},zy={},ZP;function EB(){return ZP||(ZP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const i=Xe();(function(t){t.MOST_SALES="most_sales",t.MOST_PURCHASES="most_purchases",t.MOST_SPENT="most_spent",t.MOST_EARNED="most_earned",t.MOST_ROYALTIES="most_royalties",t.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),(function(t){t.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(zy)),zy}var Gy={},xP;function bB(){return xP||(xP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const i=Xe(),t=Dn(),n=li();(function(o){o.NEWEST="newest",o.NAME="name",o.RECENTLY_REVIEWED="recently_reviewed",o.RECENTLY_LISTED="recently_listed",o.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(o){o.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.Collection||(e.Collection={}))})(Gy)),Gy}var Wy={},Ky={},$P;function Qd(){return $P||($P=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const i=Xe();(function(t){t.PARCEL="parcel",t.ESTATE="estate",t.WEARABLE="wearable",t.ENS="ens",t.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(Ky)),Ky}var eI;function wB(){return eI||(eI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const i=Xe(),t=Dn(),n=li(),o=Qd();(function(s){s.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(s){s.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:o.NFTCategory.schema,network:n.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Contract||(e.Contract={}))})(Wy)),Wy}var Yy={},Xy={},tI;function KC(){return tI||(tI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const i=Xe(),t=Dn(),n=x_(),o=li(),s=Qd(),l=Yd(),c=Vo();(function(f){f.NAME="name",f.NEWEST="newest",f.RECENTLY_LISTED="recently_listed",f.RECENTLY_SOLD="recently_sold",f.CHEAPEST="cheapest",f.RENTAL_LISTING_DATE="rental_listing_date",f.RENTAL_DATE="rented_date",f.MAX_RENTAL_PRICE="max_rental_price",f.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(f){f.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:c.WearableCategory.schema,description:{type:"string"},rarity:l.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:l.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:s.NFTCategory.schema,network:o.Network.schema,chainId:t.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},f.validate=(0,i.generateLazyValidator)(f.schema)})(e.NFT||(e.NFT={}))})(Xy)),Xy}var rI;function SB(){return rI||(rI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const i=Xe(),t=Dn(),n=li(),o=KC(),s=Qd();(function(l){l.NAME="name",l.NEWEST="newest",l.RECENTLY_REVIEWED="recently_reviewed",l.RECENTLY_SOLD="recently_sold",l.RECENTLY_LISTED="recently_listed",l.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(l){l.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:s.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},tradeId:{type:"string",nullable:!0},data:o.NFT.schema.properties.data,network:n.Network.schema,chainId:t.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0},tradeExpiresAt:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},l.validate=(0,i.generateLazyValidator)(l.schema)})(e.Item||(e.Item={}))})(Yy)),Yy}var Qy={},nI;function $_(){return nI||(nI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const i=Xe();(function(t){t.OPEN="open",t.SOLD="sold",t.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(Qy)),Qy}var Jy={},iI;function TB(){return iI||(iI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const i=Xe();(function(t){t.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(Jy)),Jy}var Zy={},aI;function AB(){return aI||(aI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const i=Xe(),t=Dn(),n=li();(function(o){o.RECENTLY_MINTED="recently_minted",o.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(o){o.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.Mint||(e.Mint={}))})(Zy)),Zy}var xy={},oI;function OB(){return oI||(oI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(i){i.NEWEST="newest",i.RECENTLY_SOLD="recently_sold",i.CHEAPEST="cheapest",i.MOST_EXPENSIVE="most_expensive",i.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(i){i.ASC="asc",i.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(xy)),xy}var $y={},sI;function PB(){return sI||(sI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const i=Xe(),t=Dn(),n=$_(),o=li();(function(s){s.RECENTLY_LISTED="recently_listed",s.RECENTLY_UPDATED="recently_updated",s.CHEAPEST="cheapest",s.ISSUED_ID_ASC="issued_id_asc",s.ISSUED_ID_DESC="issued_id_desc",s.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:o.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"},tradeId:{type:"string",nullable:!0}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Order||(e.Order={}))})($y)),$y}var eg={},uI;function YC(){return uI||(uI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const i=Xe();(function(t){t.ORDER="order",t.BID="bid",t.MINT="mint"})(e.SaleType||(e.SaleType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(eg)),eg}var tg={},lI;function IB(){return lI||(lI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const i=Xe(),t=Dn(),n=YC(),o=li();(function(s){s.RECENTLY_SOLD="recently_sold",s.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:o.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Sale||(e.Sale={}))})(tg)),tg}var rg={},cI;function RB(){return cI||(cI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const i=Xe(),t=Dn(),n=li();(function(s){s.OPEN="open",s.CANCELLED="cancelled",s.EXECUTED="executed",s.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),(function(s){s.ASC="asc",s.DESC="desc"})(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),(function(s){s.PARCEL="parcel",s.ESTATE="estate"})(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),(function(s){s.LAND_CREATION_DATE="land_creation_date",s.RENTAL_LISTING_DATE="rental_listing_date",s.RENTAL_DATE="rented_date",s.NAME="name",s.MAX_RENTAL_PRICE="max_rental_price",s.MIN_RENTAL_PRICE="min_rental_price"})(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var o;(function(s){s.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(o=e.PeriodCreation||(e.PeriodCreation={})),(function(s){s.schema={type:"object",properties:{network:n.Network.schema,chainId:t.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:o.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(rg)),rg}var ng={},dI;function NB(){return dI||(dI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(i){i.DATE="date",i.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(ng)),ng}var ig={},fI;function MB(){return fI||(fI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const i=Xe();(function(t){t.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(ig)),ig}var ag={},pI;function CB(){return pI||(pI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const i=Xe();(function(t){t.MALE="male",t.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),(function(t){t.MALE="male",t.FEMALE="female",t.UNISEX="unisex"})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(ag)),ag}var og={},hI;function jB(){return hI||(hI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const i=Xe();function t(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=t;function n(o,s){const l=t().validWorldRanges;for(const c of l)if(o>=c.xMin&&o<=c.xMax&&s>=c.yMin&&s<=c.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(o){o.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.World||(e.World={}))})(og)),og}var sg={},mI;function LB(){return mI||(mI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const i=Xe(),t=Dn(),n=$_(),o=li();(function(s){s.RECENTLY_OFFERED="recently_offered",s.RECENTLY_UPDATED="recently_updated",s.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(s){const l={properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,contractAddress:{type:"string"},network:o.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidder","seller","price","fingerprint","status","contractAddress","network","chainId","expiresAt","createdAt","updatedAt"]};s.schema={type:"object",required:[],oneOf:[{properties:Object.assign(Object.assign({},l.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...l.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},l.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...l.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},l.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...l.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Bid||(e.Bid={}))})(sg)),sg}var ug={},yI;function DB(){return yI||(yI=1,Object.defineProperty(ug,"__esModule",{value:!0})),ug}var lg={},gI;function kB(){return gI||(gI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,(function(i){i.BID="bid",i.PUBLIC_NFT_ORDER="public_nft_order",i.PUBLIC_ITEM_ORDER="public_item_order"})(e.TradeType||(e.TradeType={})),(function(i){i[i.ERC20=1]="ERC20",i[i.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",i[i.ERC721=3]="ERC721",i[i.COLLECTION_ITEM=4]="COLLECTION_ITEM"})(e.TradeAssetType||(e.TradeAssetType={})),(function(i){i.SENT="sent",i.RECEIVED="received"})(e.TradeAssetDirection||(e.TradeAssetDirection={}))})(lg)),lg}var Ao={},cg={},vI;function qB(){return vI||(vI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const i=Xe();(function(t){t.STATIC="static",t.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(cg)),cg}var dg={},_I;function BB(){return _I||(_I=1,Object.defineProperty(dg,"__esModule",{value:!0})),dg}var fg={},EI;function UB(){return EI||(EI=1,Object.defineProperty(fg,"__esModule",{value:!0})),fg}var pg={},bI;function FB(){return bI||(bI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const i=Xe();(function(t){t.ANIMATION_PLAY="animation_play",t.ANIMATION_PAUSE="animation_pause",t.ANIMATION_LOOP="animation_loop",t.ANIMATION_END="animation_end",t.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(pg)),pg}var hg={},wI;function VB(){return wI||(wI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const i=Xe();(function(t){t.IDLE="idle",t.WALK="walk",t.RUN="run",t.JUMP="jump",t.CLAP="clap",t.DAB="dab",t.DANCE="dance",t.FASHION="fashion",t.FASHION_2="fashion-2",t.FASHION_3="fashion-3",t.FASHION_4="fashion-4",t.LOVE="love",t.MONEY="money",t.FIST_PUMP="fist-pump",t.HEAD_EXPLODE="head-explode",t.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(hg)),hg}var mg={},SI;function HB(){return SI||(SI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewMessageType=void 0;const i=Xe();(function(n){n.READY="ready",n.LOAD="load",n.ERROR="error",n.UPDATE="update",n.CONTROLLER_REQUEST="controller_request",n.CONTROLLER_RESPONSE="controller_response",n.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),(function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,o,s,l="*")=>{const c={type:o,payload:s};n.postMessage(c,l)};e.sendMessage=t})(mg)),mg}var yg={},TI;function zB(){return TI||(TI=1,Object.defineProperty(yg,"__esModule",{value:!0})),yg}var gg={},AI;function GB(){return AI||(AI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const i=Xe();(function(t){t.ORTHOGRAPHIC="orthographic",t.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(gg)),gg}var vg={},OI;function WB(){return OI||(OI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const i=Xe();(function(t){t.TEXTURE="texture",t.WEARABLE="wearable",t.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(vg)),vg}var _g={},PI;function KB(){return PI||(PI=1,Object.defineProperty(_g,"__esModule",{value:!0})),_g}var Eg={},II;function YB(){return II||(II=1,Object.defineProperty(Eg,"__esModule",{value:!0})),Eg}var bg={},RI;function XB(){return RI||(RI=1,Object.defineProperty(bg,"__esModule",{value:!0})),bg}var wg={},NI;function QB(){return NI||(NI=1,Object.defineProperty(wg,"__esModule",{value:!0})),wg}var Sg={},MI;function JB(){return MI||(MI=1,Object.defineProperty(Sg,"__esModule",{value:!0})),Sg}var Tg={},CI;function ZB(){return CI||(CI=1,Object.defineProperty(Tg,"__esModule",{value:!0})),Tg}var Ag={},jI;function xB(){return jI||(jI=1,Object.defineProperty(Ag,"__esModule",{value:!0})),Ag}var Og={},LI;function $B(){return LI||(LI=1,Object.defineProperty(Og,"__esModule",{value:!0})),Og}var DI;function eU(){return DI||(DI=1,(function(e){var i=Ao&&Ao.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Ao&&Ao.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(qB(),e),t(BB(),e),t(UB(),e),t(FB(),e),t(VB(),e),t(HB(),e),t(zB(),e),t(GB(),e),t(WB(),e),t(KB(),e),t(YB(),e),t(XB(),e),t(QB(),e),t(JB(),e),t(ZB(),e),t(xB(),e),t($B(),e)})(Ao)),Ao}var Oo={},Au={},kI;function tU(){if(kI)return Au;kI=1,Object.defineProperty(Au,"__esModule",{value:!0}),Au.isSysLink=void 0;const e=i=>i!==null&&typeof i=="object"&&"sys"in i&&"id"in i.sys;return Au.isSysLink=e,Au}var Ou={},qI;function rU(){if(qI)return Ou;qI=1,Object.defineProperty(Ou,"__esModule",{value:!0}),Ou.ContentfulLocale=void 0;var e;return(function(i){i.enUS="en-US",i.es="es",i.zh="zh"})(e||(e={})),Ou.ContentfulLocale=e,Ou}var Pg={},BI;function nU(){return BI||(BI=1,Object.defineProperty(Pg,"__esModule",{value:!0})),Pg}var UI;function iU(){return UI||(UI=1,(function(e){var i=Oo&&Oo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Oo&&Oo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(tU(),e),t(rU(),e),t(nU(),e)})(Oo)),Oo}var FI;function aU(){return FI||(FI=1,(function(e){var i=To&&To.__createBinding||(Object.create?(function(X,fe,Ae,Se){Se===void 0&&(Se=Ae);var Ee=Object.getOwnPropertyDescriptor(fe,Ae);(!Ee||("get"in Ee?!fe.__esModule:Ee.writable||Ee.configurable))&&(Ee={enumerable:!0,get:function(){return fe[Ae]}}),Object.defineProperty(X,Se,Ee)}):(function(X,fe,Ae,Se){Se===void 0&&(Se=Ae),X[Se]=fe[Ae]})),t=To&&To.__exportStar||function(X,fe){for(var Ae in X)Ae!=="default"&&!Object.prototype.hasOwnProperty.call(fe,Ae)&&i(fe,X,Ae)};Object.defineProperty(e,"__esModule",{value:!0}),e.isInsideWorldLimits=e.getWorld=e.World=e.GenderFilterOption=e.WearableGender=e.Store=e.AnalyticsDayDataSortBy=e.PeriodCreation=e.RentalListingCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=e.SaleSortBy=e.Sale=e.SaleType=e.Rarity=e.ProviderType=e.OrderSortBy=e.Order=e.CatalogSortDirection=e.CatalogSortBy=e.NFTSortBy=e.NFT=e.NFTCategory=e.Network=e.MintSortBy=e.Mint=e.MetaTransaction=e.ListingStatus=e.ItemSortBy=e.Item=e.ContractSortBy=e.Contract=e.CollectionSortBy=e.Collection=e.getChainId=e.ChainName=e.getURNProtocol=e.getChainName=e.ChainId=e.AccountSortBy=e.Account=void 0;var n=EB();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var o=Dn();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return o.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return o.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return o.getURNProtocol}});var s=wC();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return s.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return s.getChainId}});var l=bB();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return l.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return l.CollectionSortBy}});var c=wB();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return c.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return c.ContractSortBy}});var f=SB();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return f.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return f.ItemSortBy}});var p=$_();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return p.ListingStatus}});var y=TB();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return y.MetaTransaction}});var h=AB();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return h.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return h.MintSortBy}});var g=li();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return g.Network}});var A=Qd();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return A.NFTCategory}});var N=KC();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return N.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return N.NFTSortBy}});var R=OB();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return R.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return R.CatalogSortDirection}});var O=PB();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return O.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return O.OrderSortBy}});var M=SC();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return M.ProviderType}});var _=Yd();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return _.Rarity}});var I=YC();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return I.SaleType}});var S=IB();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return S.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return S.SaleSortBy}});var v=RB();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return v.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return v.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return v.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return v.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return v.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return v.PeriodCreation}});var T=NB();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return T.AnalyticsDayDataSortBy}});var j=MB();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return j.Store}});var V=CB();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return V.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return V.GenderFilterOption}});var W=jB();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return W.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return W.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return W.isInsideWorldLimits}}),t(LB(),e),t(DB(),e),t(kB(),e),t(eU(),e),t(iU(),e)})(To)),To}var Ig={},VI;function oU(){return VI||(VI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const i=Xe();(function(t){t.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},onlyDev:{type:"boolean",nullable:!0},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(Ig)),Ig}var HI;function sU(){return HI||(HI=1,(function(e){var i=$n&&$n.__createBinding||(Object.create?(function(l,c,f,p){p===void 0&&(p=f);var y=Object.getOwnPropertyDescriptor(c,f);(!y||("get"in y?!c.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(l,p,y)}):(function(l,c,f,p){p===void 0&&(p=f),l[p]=c[f]})),t=$n&&$n.__setModuleDefault||(Object.create?(function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}):function(l,c){l.default=c}),n=$n&&$n.__importStar||function(l){if(l&&l.__esModule)return l;var c={};if(l!=null)for(var f in l)f!=="default"&&Object.prototype.hasOwnProperty.call(l,f)&&i(c,l,f);return t(c,l),c},o=$n&&$n.__exportStar||function(l,c){for(var f in l)f!=="default"&&!Object.prototype.hasOwnProperty.call(c,f)&&i(c,l,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const s=n(_B());e.sdk=s,o(Xe(),e),o(aU(),e),o(x_(),e),o(Ho(),e),o(oU(),e),o(Xd(),e),o(VC(),e),o(WC(),e)})($n)),$n}var qs=sU();const uU=Object.freeze({storageKey:"decentraland-connect-storage-key",[Ct.ProviderType.INJECTED]:{},[Ct.ProviderType.FORTMATIC]:{apiKeys:{[bt.ChainId.ETHEREUM_MAINNET]:"pk_live_F8E24DF8DD5BCBC5",[bt.ChainId.ETHEREUM_SEPOLIA]:"pk_test_5B728BEFE5C10911"},urls:js(Ct.ProviderType.FORTMATIC)},[Ct.ProviderType.NETWORK]:{urls:js(Ct.ProviderType.NETWORK)},[Ct.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:js(Ct.ProviderType.WALLET_LINK)},[Ct.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:js(Ct.ProviderType.WALLET_CONNECT_V2),chains:{[bt.ChainId.ETHEREUM_MAINNET]:{chains:[bt.ChainId.ETHEREUM_MAINNET],optionalChains:[bt.ChainId.MATIC_MAINNET,bt.ChainId.ARBITRUM_MAINNET,bt.ChainId.OPTIMISM_MAINNET,bt.ChainId.AVALANCHE_MAINNET,bt.ChainId.BSC_MAINNET,bt.ChainId.FANTOM_MAINNET]},[bt.ChainId.ETHEREUM_SEPOLIA]:{chains:[bt.ChainId.ETHEREUM_SEPOLIA],optionalChains:[bt.ChainId.MATIC_AMOY]}}},[Ct.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:js(Ct.ProviderType.MAGIC),chains:[bt.ChainId.ETHEREUM_MAINNET,bt.ChainId.ETHEREUM_SEPOLIA,bt.ChainId.MATIC_MAINNET,bt.ChainId.MATIC_AMOY,bt.ChainId.OPTIMISM_MAINNET,bt.ChainId.ARBITRUM_MAINNET,bt.ChainId.AVALANCHE_MAINNET,bt.ChainId.BSC_MAINNET,bt.ChainId.FANTOM_MAINNET]},[Ct.ProviderType.MAGIC_TEST]:{apiKey:"pk_live_CE856A4938B36648",urls:js(Ct.ProviderType.MAGIC),chains:[bt.ChainId.ETHEREUM_MAINNET,bt.ChainId.ETHEREUM_SEPOLIA,bt.ChainId.MATIC_MAINNET,bt.ChainId.MATIC_AMOY,bt.ChainId.OPTIMISM_MAINNET,bt.ChainId.ARBITRUM_MAINNET,bt.ChainId.AVALANCHE_MAINNET,bt.ChainId.BSC_MAINNET,bt.ChainId.FANTOM_MAINNET]}});function Wi(){return uU}function js(e){const i={[bt.ChainId.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[bt.ChainId.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[bt.ChainId.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[bt.ChainId.MATIC_AMOY]:"https://rpc.decentraland.org/amoy",[bt.ChainId.ARBITRUM_MAINNET]:"https://rpc.decentraland.org/arbitrum",[bt.ChainId.OPTIMISM_MAINNET]:"https://rpc.decentraland.org/optimism",[bt.ChainId.AVALANCHE_MAINNET]:"https://rpc.decentraland.org/avalanche",[bt.ChainId.BSC_MAINNET]:"https://rpc.decentraland.org/binance",[bt.ChainId.FANTOM_MAINNET]:"https://rpc.decentraland.org/fantom"};let t="";switch(e){case Ct.ProviderType.WALLET_LINK:t="walletlink";break;case Ct.ProviderType.FORTMATIC:t="fortmatic";break;case Ct.ProviderType.MAGIC:t="magic";break;case Ct.ProviderType.MAGIC_TEST:t="magic";break;case Ct.ProviderType.WALLET_CONNECT_V2:t="walletconnect-v2";break;case Ct.ProviderType.AUTH_SERVER:t="auth-server";break}if(t)for(const n in i)i[n]+=`?project=${t}`;return i}class lU extends Us{constructor(i){const t=Wi()[qs.ProviderType.FORTMATIC],n=Object.keys(t.apiKeys).map(o=>Number(o));if(!n.includes(i))throw new Error(`Invariant error: Unsupported chainId ${i}`);super({supportedChainIds:n}),this.apiKey=t.apiKeys[i],this.chainId=i,this.rpcUrl=t.urls[i]}async activate(){if(!this.fortmatic){const{default:t}=await ol(async()=>{const{default:n}=await import("./fortmatic-7ihVUZ5v.js").then(o=>o.f);return{default:n}},[]);this.fortmatic=new t(this.apiKey,{rpcUrl:this.rpcUrl,chainId:this.chainId})}const i=await this.fortmatic.getProvider().enable().then(t=>t[0]);return{provider:this.fortmatic.getProvider(),chainId:this.chainId,account:i}}getApiKey(){return this.apiKey}async getProvider(){return this.fortmatic.getProvider()}async getChainId(){return this.chainId}async getAccount(){return this.fortmatic.getProvider().send("eth_accounts").then(i=>i[0])}deactivate(){}close(){return this.fortmatic.user.logout()}}function y_(){return y_=Object.assign||function(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},y_.apply(this,arguments)}function eE(e,i){e.prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i}function g_(e){return g_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},g_(e)}function Cd(e,i){return Cd=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Cd(e,i)}function cU(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Id(e,i,t){return cU()?Id=Reflect.construct:Id=function(o,s,l){var c=[null];c.push.apply(c,s);var f=Function.bind.apply(o,c),p=new f;return l&&Cd(p,l.prototype),p},Id.apply(null,arguments)}function dU(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function jd(e){var i=typeof Map=="function"?new Map:void 0;return jd=function(n){if(n===null||!dU(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i<"u"){if(i.has(n))return i.get(n);i.set(n,o)}function o(){return Id(n,arguments,g_(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Cd(o,n)},jd(e)}function bd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function Ls(e,i){try{var t=e()}catch(n){return i(n)}return t&&t.then?t.then(void 0,i):t}function Ti(e){return e.hasOwnProperty("result")?e.result:e}var Rg=(function(e){eE(i,e);function i(){var t;return t=e.call(this)||this,t.name=t.constructor.name,t.message="No Ethereum provider was found on window.ethereum.",t}return i})(jd(Error)),fU=(function(e){eE(i,e);function i(){var t;return t=e.call(this)||this,t.name=t.constructor.name,t.message="The user rejected the request.",t}return i})(jd(Error)),pU=(function(e){eE(i,e);function i(n){var o;return o=e.call(this,n)||this,o.handleNetworkChanged=o.handleNetworkChanged.bind(bd(o)),o.handleChainChanged=o.handleChainChanged.bind(bd(o)),o.handleAccountsChanged=o.handleAccountsChanged.bind(bd(o)),o.handleClose=o.handleClose.bind(bd(o)),o}var t=i.prototype;return t.handleChainChanged=function(o){this.emitUpdate({chainId:o,provider:window.ethereum})},t.handleAccountsChanged=function(o){o.length===0?this.emitDeactivate():this.emitUpdate({account:o[0]})},t.handleClose=function(o,s){this.emitDeactivate()},t.handleNetworkChanged=function(o){this.emitUpdate({chainId:o,provider:window.ethereum})},t.activate=function(){try{var o=function(y){if(s)return y;function h(){return y_({provider:window.ethereum},c?{account:c}:{})}var g=(function(){if(!c)return Promise.resolve(window.ethereum.enable().then(function(A){return A&&Ti(A)[0]})).then(function(A){c=A})})();return g&&g.then?g.then(h):h(g)},s=!1,l=this;if(!window.ethereum)throw new Rg;window.ethereum.on&&(window.ethereum.on("chainChanged",l.handleChainChanged),window.ethereum.on("accountsChanged",l.handleAccountsChanged),window.ethereum.on("close",l.handleClose),window.ethereum.on("networkChanged",l.handleNetworkChanged)),window.ethereum.isMetaMask&&(window.ethereum.autoRefreshOnNetworkChange=!1);var c,f=Ls(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(p){return Ti(p)[0]})).then(function(p){c=p})},function(p){if(p.code===4001)throw new fU});return Promise.resolve(f&&f.then?f.then(o):o(f))}catch(p){return Promise.reject(p)}},t.getProvider=function(){try{return Promise.resolve(window.ethereum)}catch(o){return Promise.reject(o)}},t.getChainId=function(){try{var o=function(){function f(){if(!s)try{s=Ti(window.ethereum.send({method:"net_version"}))}catch{}return s||(window.ethereum.isDapper?s=Ti(window.ethereum.cachedResults.net_version):s=window.ethereum.chainId||window.ethereum.netVersion||window.ethereum.networkVersion||window.ethereum._chainId),s}var p=(function(){if(!s){var y=Ls(function(){return Promise.resolve(window.ethereum.send("net_version").then(Ti)).then(function(h){s=h})},function(){});if(y&&y.then)return y.then(function(){})}})();return p&&p.then?p.then(f):f(p)};if(!window.ethereum)throw new Rg;var s,l=Ls(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(Ti)).then(function(c){s=c})},function(){});return Promise.resolve(l&&l.then?l.then(o):o(l))}catch(c){return Promise.reject(c)}},t.getAccount=function(){try{var o=function(){function f(){return s||(s=Ti(window.ethereum.send({method:"eth_accounts"}))[0]),s}var p=(function(){if(!s){var y=Ls(function(){return Promise.resolve(window.ethereum.enable().then(function(h){return Ti(h)[0]})).then(function(h){s=h})},function(){});if(y&&y.then)return y.then(function(){})}})();return p&&p.then?p.then(f):f(p)};if(!window.ethereum)throw new Rg;var s,l=Ls(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(c){return Ti(c)[0]})).then(function(c){s=c})},function(){});return Promise.resolve(l&&l.then?l.then(o):o(l))}catch(c){return Promise.reject(c)}},t.deactivate=function(){window.ethereum&&window.ethereum.removeListener&&(window.ethereum.removeListener("chainChanged",this.handleChainChanged),window.ethereum.removeListener("accountsChanged",this.handleAccountsChanged),window.ethereum.removeListener("close",this.handleClose),window.ethereum.removeListener("networkChanged",this.handleNetworkChanged))},t.isAuthorized=function(){try{return window.ethereum?Promise.resolve(Ls(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(o){return Ti(o).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(o){return Promise.reject(o)}},i})(Us);class hU extends Error{constructor(){super("There was an error unlocking your wallet. Please be sure your wallet is unlocked and try again."),this.name="ErrorUnlockingWallet"}}const mU=60*1e3;class yU extends pU{constructor(i){super({supportedChainIds:[i]})}async activate(){const i=new Promise((n,o)=>{setTimeout(()=>{o(new hU)},mU)}),t=super.activate();return Promise.race([t,i])}}var gU="Invariant failed";function zI(e,i){throw new Error(gU)}function XC(e,i){e.prototype=Object.create(i.prototype),e.prototype.constructor=e,sl(e,i)}function v_(e){return v_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v_(e)}function sl(e,i){return sl=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},sl(e,i)}function vU(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Rd(e,i,t){return vU()?Rd=Reflect.construct:Rd=function(o,s,l){var c=[null];c.push.apply(c,s);var f=Function.bind.apply(o,c),p=new f;return l&&sl(p,l.prototype),p},Rd.apply(null,arguments)}function _U(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function __(e){var i=typeof Map=="function"?new Map:void 0;return __=function(n){if(n===null||!_U(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i<"u"){if(i.has(n))return i.get(n);i.set(n,o)}function o(){return Rd(n,arguments,v_(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),sl(o,n)},__(e)}var Ng=(function(e){XC(i,e);function i(t,n,o){var s;return s=e.call(this)||this,s.code=n,s.data=o,s.name=s.constructor.name,s.message=t,s}return i})(__(Error)),EU=function(i,t){var n=this,o=this;this.isMetaMask=!1,this.sendAsync=function(l,c){console.log("sendAsync",l.method,l.params),o.request(l.method,l.params).then(function(f){return c(null,{jsonrpc:"2.0",id:l.id,result:f})}).catch(function(f){return c(f,null)})},this.request=function(l,c){try{return typeof l!="string"&&(c=l.params,l=l.method),Promise.resolve(fetch(n.url,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:l,params:c}),headers:{"Content-Type":"application/json"}})).then(function(f){if(!f.ok)throw new Ng(f.status+": "+f.statusText,-32e3);return Promise.resolve(f.json()).then(function(p){if("error"in p){var y,h,g;throw new Ng(p==null||(y=p.error)==null?void 0:y.message,p==null||(h=p.error)==null?void 0:h.code,p==null||(g=p.error)==null?void 0:g.data)}else{if("result"in p)return p.result;throw new Ng("Received unexpected JSON-RPC response to "+l+" request.",-32e3,p)}})})}catch(f){return Promise.reject(f)}},this.chainId=i,this.url=t;var s=new URL(t);this.host=s.host,this.path=s.pathname},bU=(function(e){XC(i,e);function i(n){var o,s=n.urls,l=n.defaultChainId;return l||Object.keys(s).length===1||zI(),o=e.call(this,{supportedChainIds:Object.keys(s).map(function(c){return Number(c)})})||this,o.currentChainId=l||Number(Object.keys(s)[0]),o.providers=Object.keys(s).reduce(function(c,f){return c[Number(f)]=new EU(Number(f),s[Number(f)]),c},{}),o}var t=i.prototype;return t.activate=function(){try{var o=this;return Promise.resolve({provider:o.providers[o.currentChainId],chainId:o.currentChainId,account:null})}catch(s){return Promise.reject(s)}},t.getProvider=function(){try{var o=this;return Promise.resolve(o.providers[o.currentChainId])}catch(s){return Promise.reject(s)}},t.getChainId=function(){try{var o=this;return Promise.resolve(o.currentChainId)}catch(s){return Promise.reject(s)}},t.getAccount=function(){return Promise.resolve(null)},t.deactivate=function(){},t.changeChainId=function(o){Object.keys(this.providers).includes(o.toString())||zI(),this.currentChainId=o,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:o})},i})(Us);class wU extends bU{constructor(i){super({urls:Wi()[Ct.ProviderType.NETWORK].urls,defaultChainId:i})}}function E_(){return E_=Object.assign||function(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},E_.apply(this,arguments)}function SU(e,i){e.prototype=Object.create(i.prototype),e.prototype.constructor=e,b_(e,i)}function b_(e,i){return b_=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},b_(e,i)}function GI(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var TU=1,AU=(function(e){SU(i,e);function i(n){var o,s=n.url,l=n.appName,c=n.appLogoUrl,f=n.darkMode,p=n.supportedChainIds;return o=e.call(this,{supportedChainIds:p})||this,o.url=s,o.appName=l,o.appLogoUrl=c,o.darkMode=f||!1,o.handleChainChanged=o.handleChainChanged.bind(GI(o)),o.handleAccountsChanged=o.handleAccountsChanged.bind(GI(o)),o}var t=i.prototype;return t.activate=function(){try{var o=this,s=function(){return Promise.resolve(o.provider.request({method:"eth_requestAccounts"})).then(function(f){var p=f[0];return o.provider.on("chainChanged",o.handleChainChanged),o.provider.on("accountsChanged",o.handleAccountsChanged),{provider:o.provider,account:p}})},l=(function(){if(window.ethereum&&window.ethereum.isCoinbaseWallet===!0)o.provider=window.ethereum;else{var c=(function(){if(!o.walletLink)return Promise.resolve(ol(()=>import("./index-DfMlCpha.js").then(f=>f.i),[]).then(function(f){var p;return(p=f?.default)!=null?p:f})).then(function(f){o.walletLink=new f(E_({appName:o.appName,darkMode:o.darkMode},o.appLogoUrl?{appLogoUrl:o.appLogoUrl}:{})),o.provider=o.walletLink.makeWeb3Provider(o.url,TU)})})();if(c&&c.then)return c.then(function(){})}})();return Promise.resolve(l&&l.then?l.then(s):s(l))}catch(c){return Promise.reject(c)}},t.getProvider=function(){try{var o=this;return Promise.resolve(o.provider)}catch(s){return Promise.reject(s)}},t.getChainId=function(){try{var o=this;return Promise.resolve(o.provider.chainId)}catch(s){return Promise.reject(s)}},t.getAccount=function(){try{var o=this;return Promise.resolve(o.provider.request({method:"eth_requestAccounts"})).then(function(s){return s[0]})}catch(s){return Promise.reject(s)}},t.deactivate=function(){this.provider.removeListener("chainChanged",this.handleChainChanged),this.provider.removeListener("accountsChanged",this.handleAccountsChanged)},t.close=function(){try{var o=this;return o.provider.close(),o.emitDeactivate(),Promise.resolve()}catch(s){return Promise.reject(s)}},t.handleChainChanged=function(o){this.emitUpdate({chainId:o})},t.handleAccountsChanged=function(o){this.emitUpdate({account:o[0]})},i})(Us);class OU extends AU{constructor(i){const t=Wi()[qs.ProviderType.WALLET_LINK];super({url:t.urls[i],appName:t.appName,supportedChainIds:[i]})}}class Ai extends Us{constructor(i){super({supportedChainIds:(()=>{const{chains:t,optionalChains:n}=Ai.configuration.chains[i];return[...t,...n]})()}),this.desiredChainId=i,this.activate=async()=>{const t=await ol(()=>import("./index-ByNdfGTy.js").then(o=>o.R),[]).then(o=>{const{chains:s,optionalChains:l}=Ai.configuration.chains[this.desiredChainId];return o.default.init({projectId:Ai.configuration.projectId,rpcMap:Ai.configuration.urls,chains:s,optionalChains:l,showQrModal:!0,disableProviderPing:!0,qrModalOptions:{themeVariables:{"--wcm-z-index":"3000"}},methods:["eth_sendTransaction","personal_sign"],optionalMethods:["eth_accounts","eth_requestAccounts","eth_sign","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain"],events:["chainChanged","accountsChanged"],optionalEvents:["disconnect"]})}),n=await t.enable();return t.on("accountsChanged",this.handleAccountsChanged),t.on("chainChanged",this.handleChainChanged),t.on("disconnect",this.handleDisconnect),this.provider=t,{chainId:t.chainId,account:n[0],provider:t}},this.getProvider=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider},this.getChainId=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider.chainId},this.getAccount=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider.accounts[0]},this.getWalletName=()=>this.provider?.session?.peer.metadata.name,this.deactivate=()=>{},this.close=async()=>{if(this.provider)return this.provider.removeListener("accountsChanged",this.handleAccountsChanged).removeListener("chainChanged",this.handleChainChanged).removeListener("disconnect",this.handleDisconnect).disconnect()},this.handleAccountsChanged=t=>{this.emitUpdate({account:t[0]})},this.handleChainChanged=t=>{this.emitUpdate({chainId:t})},this.handleDisconnect=()=>{if(!this.provider)throw new Error("Provider is undefined");return this.emitDeactivate()}}}Ai.configuration=Wi()[qs.ProviderType.WALLET_CONNECT_V2];Ai.clearStorage=e=>{e.removeRegExp(new RegExp("^wc@2:"))};class QC extends Us{constructor(i,t=!1){super({supportedChainIds:Wi()[qs.ProviderType.MAGIC].chains}),this.isTest=t,this.activate=async()=>{if(this.magic=await this.buildMagicInstance(this.chainId),!await this.magic.user.isLoggedIn())throw new Error("Magic: user isn't logged in");const o=await this.getProvider(),s=await o.request({method:"eth_accounts"});return this.account=s[0]??null,{provider:o,chainId:this.chainId,account:this.account}},this.getProvider=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");const n=await this.magic.wallet.getProvider();return{...n,isMagic:!0,request:new Proxy(n.request,{apply:async(o,s,l)=>{if(l[0]?.method==="wallet_switchEthereumChain")try{const c=parseInt(l[0]?.params[0]?.chainId,16);return this.supportedChainIds&&!this.supportedChainIds.includes(c)?{code:2020202,message:"Unsupported Magic ChainId"}:(this.magic=await this.buildMagicInstance(c),this.emitUpdate({chainId:c}),null)}catch{return{code:2020201,message:"Error changing the Magic ChainId"}}return o.bind(n)(...l)}}),sendAsync:new Proxy(n.send,{apply:async(o,s,l)=>o.bind(n)(...l)})}},this.getChainId=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.chainId},this.getAccount=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.account},this.deactivate=()=>{},this.buildMagicInstance=async n=>{const{Magic:o}=await ol(async()=>{const{Magic:c}=await import("./index-8e4wv-tH.js");return{Magic:c}},__vite__mapDeps([0,1])),{OAuthExtension:s}=await ol(async()=>{const{OAuthExtension:c}=await import("./index-QHMvomuf.js");return{OAuthExtension:c}},__vite__mapDeps([2,1])),l=Wi()[this.isTest?qs.ProviderType.MAGIC_TEST:qs.ProviderType.MAGIC];return new o(l.apiKey,{extensions:[new s],network:{rpcUrl:l.urls[n],chainId:n}})},this.chainId=i,this.account=null}close(){if(!this.magic)throw new Error("Magic: instance was not initialized");return this.magic.user.logout()}}class PU extends QC{constructor(i){super(i,!0)}}class IU{}class RU extends IU{get(i){const t=window.localStorage.getItem(i);return t===null?void 0:t}set(i,t){window.localStorage.setItem(i,t)}remove(i){window.localStorage.removeItem(i)}removeRegExp(i){for(let t=localStorage.length-1;t>=0;t--){const n=localStorage.key(t);n&&i.test(n)&&localStorage.removeItem(n)}}}class Ld{constructor(i){this.provider=i,this.id=0,this.on=(t,n)=>this.provider.on(t,n),this.emit=(t,...n)=>this.provider.emit(t,n),this.removeListener=(t,n)=>this.provider.removeListener(t,n),this.request=async({method:t,params:n})=>this.isModernProvider()?this.provider.request({method:t,params:n}):this.send(t,n),this.sendAsync=async(t,n)=>this.hasSendAsync()?this.provider.sendAsync(t,(o,s)=>{s&&!s.hasOwnProperty("result")?n(o,{id:0,jsonrpc:"2.0",result:s}):n(o,s)}):this.send(t,n)}static adapt(i){const t=new Ld(i);return{...i,on:t.on,emit:t.emit,removeListener:t.removeListener,request:t.request,sendAsync:t.sendAsync,send:t.send.bind(t)}}async send(i,t){let n,o,s;const l=typeof t=="function";if(l){const c=i;o=c.params||[],n=c.method,s=t}else n=i,o=t||[],s=(c,f)=>{if(c)throw c;return f};if(this.isModernProvider()){const[c,f]=await this.provider.request({method:n,params:o}).then(y=>[null,y]).catch(y=>[y,void 0]);return s(c,l?{id:"",jsonrpc:"2.0",result:f}:f)}else{this.patchOldMobile();const[c,f]=l?await new Promise(p=>this.provider.send(i,(y,h)=>{p([y,h])})):await new Promise(p=>this.provider.send({jsonrpc:"2.0",id:++this.id,method:n,params:o},(y,h)=>{p([h&&h.hasOwnProperty("error")?h.error:y,h&&h.hasOwnProperty("result")?h.result:h])}));return s(c,f)}}isModernProvider(){return typeof this.provider.request=="function"}hasSendAsync(){return typeof this.provider.sendAsync=="function"}patchOldMobile(){this.provider&&!this.provider.isDapper&&!this.provider.isFortmatic&&!this.provider.isMetamask&&this.hasSendAsync()&&this.provider.send!==this.provider.sendAsync&&(this.provider.send=this.provider.sendAsync)}}class NU{constructor(i){this.storage=i,this.getWalletName=()=>{if(this.connector instanceof Ai)return this.connector.getWalletName()},this.clearConnectionData=()=>{const{storageKey:t}=Wi();this.storage.remove(t),Ai.clearStorage(this.storage)},this.handleWeb3ReactDeactivate=async()=>{try{await this.disconnect()}catch(t){console.error(t)}}}async connect(i,t=bt.ChainId.ETHEREUM_MAINNET){if(this.connector)try{await this.disconnect()}catch(c){console.error("Error disconnecting previous connection",c)}const n=this.buildConnector(i,t);n.on(zi.Deactivate,this.handleWeb3ReactDeactivate);let{provider:o,account:s}={};try{const c=await n.activate();o=c.provider,s=c.account}catch(c){throw console.error("Error activating the connector",c),c}(i===Ct.ProviderType.MAGIC||i===Ct.ProviderType.MAGIC_TEST)&&n.on(zi.Update,({chainId:c})=>{c&&this.setConnectionData(i,c)});let l=t;if(i===Ct.ProviderType.INJECTED){const c=await o.request({method:"eth_chainId"});l=c?parseInt(c,16):l}return this.connector=n,this.setConnectionData(i,l),{provider:Ld.adapt(o),providerType:i,account:s||"",chainId:l}}isConnected(){return!!this.connector&&!!this.getConnectionData()}async tryPreviousConnection(){const i=this.getConnectionData();if(!i)throw new Error("Could not find a valid provider. Make sure to call the `connect` method first");if(this.connector)return{provider:await this.connector.getProvider(),providerType:i.providerType,chainId:i.chainId,account:await this.connector.getAccount()};const t=this.promiseOfConnection?await this.promiseOfConnection:await(this.promiseOfConnection=this.connect(i.providerType,i.chainId));return this.promiseOfConnection=void 0,{...t,chainId:this.getConnectionData().chainId}}getAvailableProviders(){const i=[Ct.ProviderType.FORTMATIC,Ct.ProviderType.WALLET_CONNECT,Ct.ProviderType.WALLET_LINK];return typeof window<"u"&&window.ethereum!==void 0?i.unshift(Ct.ProviderType.INJECTED):i.unshift(Ct.ProviderType.METAMASK_MOBILE),i}async disconnect(){this.connector&&(this.connector.removeAllListeners(zi.Deactivate),this.connector.removeAllListeners(zi.Update),this.connector.deactivate(),this.isClosableConnector()&&await this.connector.close()),this.clearConnectionData(),this.connector=void 0}async getProvider(){if(!this.connector)throw new Error("No valid connector found. Please .connect() first");return this.connector.getProvider()}async createProvider(i,t=bt.ChainId.ETHEREUM_MAINNET){const o=await this.buildConnector(i,t).getProvider();return Ld.adapt(o)}buildConnector(i,t){switch(i){case Ct.ProviderType.INJECTED:return new yU(t);case Ct.ProviderType.FORTMATIC:return new lU(t);case Ct.ProviderType.MAGIC:return new QC(t);case Ct.ProviderType.MAGIC_TEST:return new PU(t);case Ct.ProviderType.WALLET_LINK:return new OU(t);case Ct.ProviderType.NETWORK:return new wU(t);case Ct.ProviderType.WALLET_CONNECT_V2:return new Ai(t);default:throw new Error(`Invalid provider ${i}`)}}getConnectionData(){const{storageKey:i}=Wi(),t=this.storage.get(i);return t?JSON.parse(t):void 0}setConnectionData(i,t){const{storageKey:n}=Wi(),o=JSON.stringify({providerType:i,chainId:t});this.storage.set(n,o)}isClosableConnector(){return this.connector&&typeof this.connector.close<"u"}}const Mg=new NU(new RU),MU=e=>/^decentraland.(zone|org|today)$/.test(e),CU=async(e,i="https://peer.decentraland.org")=>{try{const n=await(await fetch(`${i}/lambdas/profiles`,{method:"POST",body:JSON.stringify({ids:[e]})})).json();return n.length>0&&n[0]?.avatars?.length>0?n[0].avatars[0]:void 0}catch(t){console.error("Error fetching avatar:",t);return}},jU=e=>({shouldUseBasePath:MU,fetchAvatar:i=>CU(i),...e,debug:e.debug??!1}),LU=e=>({[jn.ChainId.ETHEREUM_MAINNET]:"Ethereum Mainnet",[jn.ChainId.ETHEREUM_SEPOLIA]:"Ethereum Sepolia",[jn.ChainId.MATIC_MAINNET]:"Polygon Mainnet",[jn.ChainId.MATIC_AMOY]:"Polygon Amoy"})[e]||`Chain ID ${e}`,DU=e=>{const i="0x"+e.toString(16),t=LU(e);switch(e){case jn.ChainId.MATIC_MAINNET:return{chainId:i,chainName:t,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:["https://rpc-mainnet.maticvigil.com/"],blockExplorerUrls:["https://polygonscan.com/"]};case jn.ChainId.MATIC_AMOY:return{chainId:i,chainName:t,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:["https://rpc-amoy.polygon.technology/"],blockExplorerUrls:["https://www.oklink.com/amoy"]};case jn.ChainId.ETHEREUM_SEPOLIA:return{chainId:i,chainName:t,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://sepolia.infura.io/v3/"],blockExplorerUrls:["https://sepolia.etherscan.io"]};default:return{chainId:"0x1",chainName:"Ethereum Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://mainnet.infura.io/v3/"],blockExplorerUrls:["https://etherscan.io"]}}},WI=async e=>{const i=await e.request({method:"eth_chainId"});return parseInt(i,16)},Vr=(e,i,t=!1)=>{t&&typeof console<"u"&&console.log(`[Auth] ${e}`,i||"")},kU=(e,i,t)=>{const o=new URLSearchParams(t).get("redirectTo"),s=e.shouldUseBasePath?.(window.location.host)?e.basePath:"",l=o?`${s}${o}`:`${s}${i}${t}`;return`${e.authUrl}/login?redirectTo=${encodeURIComponent(window.location.origin+l)}`},JC=re.createContext(void 0),qU=({children:e,config:i})=>{const{pathname:t,search:n}=_a(),o=re.useMemo(()=>jU(i),[i]),[s,l]=re.useState(),[c,f]=re.useState(),[p,y]=re.useState(!1),[h,g]=re.useState(!1),[A,N]=re.useState(o.defaultChainId),R=re.useCallback(()=>{Vr("Initiating sign in",{pathname:t,search:n},o.debug);const I=kU(o,t,n);Vr("Redirecting to auth",{redirectUrl:I},o.debug),window.location.replace(I)},[t,n,o]),O=re.useCallback(()=>{try{Vr("Signing out",{wallet:s},o.debug),Mg.disconnect(),s&&m_.localStorageClearIdentity(s),l(void 0),f(void 0),y(!1),Vr("Sign out completed",void 0,o.debug)}catch(I){console.error("Error during sign-out:",I)}},[s,o.debug]),M=re.useCallback(async(I=jn.ChainId.ETHEREUM_MAINNET)=>{try{Vr("Changing network",{from:A,to:I},o.debug);const S=await Mg.getProvider();if(!S){console.error("No provider available to switch network"),N(jn.ChainId.ETHEREUM_MAINNET);return}N(I);try{await S.request({method:"wallet_switchEthereumChain",params:[{chainId:"0x"+I.toString(16)}]});const v=await WI(S);v!==I&&console.warn("Chain ID did not change as expected"),Vr("Network changed successfully",{chainId:v},o.debug)}catch(v){const T=v;T.code===4902?(Vr("Adding new chain to wallet",{chainId:I},o.debug),await S.request({method:"wallet_addEthereumChain",params:[DU(I)]}),await WI(S)!==I&&(console.warn("Chain ID not set after adding network"),N(jn.ChainId.ETHEREUM_MAINNET))):(console.error("Error switching network:",T),N(jn.ChainId.ETHEREUM_MAINNET))}}catch(S){console.error("Error during network change:",S),N(jn.ChainId.ETHEREUM_MAINNET)}},[A,o.debug]);re.useEffect(()=>{(async()=>{try{g(!0),Vr("Checking auth status",void 0,o.debug);try{const{account:S,chainId:v}=await Mg.tryPreviousConnection();if(S){Vr("Previous connection found",{address:S,chainId:v},o.debug),l(S),N(v);let T=!1;try{const j=m_.localStorageGetIdentity(S);if(j&&j.expiration){const V=new Date(j.expiration),W=new Date;W.getTime()<=V.getTime()?(Vr("Identity valid",{expiration:V},o.debug),T=!0):Vr("Identity expired",{expiration:V,now:W},o.debug)}else Vr("No identity found",void 0,o.debug)}catch(j){console.error("Error checking identity:",j)}if(y(T),T&&o.fetchAvatar)try{Vr("Fetching avatar",{address:S},o.debug);const j=await o.fetchAvatar(S);j&&(f(j),Vr("Avatar fetched successfully",j,o.debug))}catch(j){console.error("Error fetching avatar:",j)}}else Vr("No previous connection found",void 0,o.debug)}catch(S){Vr("Previous connection failed",S,o.debug)}}catch(S){console.error("Error checking auth status:",S)}finally{g(!1)}})()},[o.debug,o.fetchAvatar]);const _={wallet:s,avatar:c,chainId:A,isSignedIn:p,isConnecting:h,signIn:R,signOut:O,changeNetwork:M};return le.jsx(JC.Provider,{value:_,children:e})},tE=e=>{const i=re.useContext(JC);if(i===void 0)throw new Error("useAuth must be used within an AuthProvider");return i};var Po={},ti={},tl={exports:{}};var BU=tl.exports,KI;function Jd(){return KI||(KI=1,(function(e,i){(function(t,n){n(i)})(BU,(function(t){function n(E){if(E.jsonrpc="2.0",!E.id||typeof E.id!="number"||Math.floor(E.id)!==E.id)throw new Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(E)}`);if(!E.method||typeof E.method!="string"||E.method.trim().length===0)throw new Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(E)}`);if(!E.params||typeof E.params!="object")throw new Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(E)}`);return E}var o={};function s(){let E,P;const k=new Promise(((Y,$)=>{E=oe=>{Y(oe),k.isPending=!1},P=oe=>{$(oe),k.isPending=!1}})).catch((Y=>Promise.reject(Y)));return k.resolve=E,k.reject=P,"finally"in k||(k.finally=Y=>{k.then(Y),k.catch(Y)}),k.isPending=!0,k}Object.defineProperty(o,"__esModule",{value:!0});var l=o.future=s;o.default=s;var c={exports:{}};(function(E){(function(){var P="input is invalid type",k=typeof window=="object",Y=k?window:{};Y.JS_SHA3_NO_WINDOW&&(k=!1);var $=!k&&typeof self=="object";!Y.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node?Y=NL:$&&(Y=self);var oe=!Y.JS_SHA3_NO_COMMON_JS&&E.exports,Pe=!Y.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",Ve="0123456789abcdef".split(""),it=[4,1024,262144,67108864],st=[0,8,16,24],dr=[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],Ht=[224,256,384,512],ze=[128,256],vr=["hex","buffer","arrayBuffer","array","digest"],zt={128:168,256:136};!Y.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(b){return Object.prototype.toString.call(b)==="[object Array]"}),!Pe||!Y.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(b){return typeof b=="object"&&b.buffer&&b.buffer.constructor===ArrayBuffer});for(var Dt=function(b,H,J){return function(G){return new Nt(b,H,b).update(G)[J]()}},Sr=function(b,H,J){return function(G,ee){return new Nt(b,H,ee).update(G)[J]()}},Sn=function(b,H,J){return function(G,ee,x,ne){return nr["cshake"+b].update(G,ee,x,ne)[J]()}},Kr=function(b,H,J){return function(G,ee,x,ne){return nr["kmac"+b].update(G,ee,x,ne)[J]()}},_r=function(b,H,J,G){for(var ee=0;ee<vr.length;++ee){var x=vr[ee];b[x]=H(J,G,x)}return b},Tn=function(b,H){var J=Dt(b,H,"hex");return J.create=function(){return new Nt(b,H,b)},J.update=function(G){return J.create().update(G)},_r(J,Dt,b,H)},tn=[{name:"keccak",padding:[1,256,65536,16777216],bits:Ht,createMethod:Tn},{name:"sha3",padding:[6,1536,393216,100663296],bits:Ht,createMethod:Tn},{name:"shake",padding:[31,7936,2031616,520093696],bits:ze,createMethod:function(b,H){var J=Sr(b,H,"hex");return J.create=function(G){return new Nt(b,H,G)},J.update=function(G,ee){return J.create(ee).update(G)},_r(J,Sr,b,H)}},{name:"cshake",padding:it,bits:ze,createMethod:function(b,H){var J=zt[b],G=Sn(b,0,"hex");return G.create=function(ee,x,ne){return x||ne?new Nt(b,H,ee).bytepad([x,ne],J):nr["shake"+b].create(ee)},G.update=function(ee,x,ne,he){return G.create(x,ne,he).update(ee)},_r(G,Sn,b,H)}},{name:"kmac",padding:it,bits:ze,createMethod:function(b,H){var J=zt[b],G=Kr(b,0,"hex");return G.create=function(ee,x,ne){return new ur(b,H,x).bytepad(["KMAC",ne],J).bytepad([ee],J)},G.update=function(ee,x,ne,he){return G.create(ee,ne,he).update(x)},_r(G,Kr,b,H)}}],nr={},kr=[],fr=0;fr<tn.length;++fr)for(var An=tn[fr],Ue=An.bits,fn=0;fn<Ue.length;++fn){var Bn=An.name+"_"+Ue[fn];if(kr.push(Bn),nr[Bn]=An.createMethod(Ue[fn],An.padding),An.name!=="sha3"){var hi=An.name+Ue[fn];kr.push(hi),nr[hi]=nr[Bn]}}function Nt(b,H,J){this.blocks=[],this.s=[],this.padding=H,this.outputBits=J,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(b<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=J>>5,this.extraBytes=(31&J)>>3;for(var G=0;G<50;++G)this.s[G]=0}function ur(b,H,J){Nt.call(this,b,H,J)}Nt.prototype.update=function(b){if(this.finalized)throw new Error("finalize already called");var H,J=typeof b;if(J!=="string"){if(J!=="object")throw new Error(P);if(b===null)throw new Error(P);if(Pe&&b.constructor===ArrayBuffer)b=new Uint8Array(b);else if(!(Array.isArray(b)||Pe&&ArrayBuffer.isView(b)))throw new Error(P);H=!0}for(var G,ee,x=this.blocks,ne=this.byteCount,he=b.length,ve=this.blockCount,ye=0,Ge=this.s;ye<he;){if(this.reset)for(this.reset=!1,x[0]=this.block,G=1;G<ve+1;++G)x[G]=0;if(H)for(G=this.start;ye<he&&G<ne;++ye)x[G>>2]|=b[ye]<<st[3&G++];else for(G=this.start;ye<he&&G<ne;++ye)(ee=b.charCodeAt(ye))<128?x[G>>2]|=ee<<st[3&G++]:ee<2048?(x[G>>2]|=(192|ee>>6)<<st[3&G++],x[G>>2]|=(128|63&ee)<<st[3&G++]):ee<55296||ee>=57344?(x[G>>2]|=(224|ee>>12)<<st[3&G++],x[G>>2]|=(128|ee>>6&63)<<st[3&G++],x[G>>2]|=(128|63&ee)<<st[3&G++]):(ee=65536+((1023&ee)<<10|1023&b.charCodeAt(++ye)),x[G>>2]|=(240|ee>>18)<<st[3&G++],x[G>>2]|=(128|ee>>12&63)<<st[3&G++],x[G>>2]|=(128|ee>>6&63)<<st[3&G++],x[G>>2]|=(128|63&ee)<<st[3&G++]);if(this.lastByteIndex=G,G>=ne){for(this.start=G-ne,this.block=x[ve],G=0;G<ve;++G)Ge[G]^=x[G];z(Ge),this.reset=!0}else this.start=G}return this},Nt.prototype.encode=function(b,H){var J=255&b,G=1,ee=[J];for(J=255&(b>>=8);J>0;)ee.unshift(J),J=255&(b>>=8),++G;return H?ee.push(G):ee.unshift(G),this.update(ee),ee.length},Nt.prototype.encodeString=function(b){var H,J=typeof b;if(J!=="string"){if(J!=="object")throw new Error(P);if(b===null)throw new Error(P);if(Pe&&b.constructor===ArrayBuffer)b=new Uint8Array(b);else if(!(Array.isArray(b)||Pe&&ArrayBuffer.isView(b)))throw new Error(P);H=!0}var G=0,ee=b.length;if(H)G=ee;else for(var x=0;x<b.length;++x){var ne=b.charCodeAt(x);ne<128?G+=1:ne<2048?G+=2:ne<55296||ne>=57344?G+=3:(ne=65536+((1023&ne)<<10|1023&b.charCodeAt(++x)),G+=4)}return G+=this.encode(8*G),this.update(b),G},Nt.prototype.bytepad=function(b,H){for(var J=this.encode(H),G=0;G<b.length;++G)J+=this.encodeString(b[G]);var ee=H-J%H,x=[];return x.length=ee,this.update(x),this},Nt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var b=this.blocks,H=this.lastByteIndex,J=this.blockCount,G=this.s;if(b[H>>2]|=this.padding[3&H],this.lastByteIndex===this.byteCount)for(b[0]=b[J],H=1;H<J+1;++H)b[H]=0;for(b[J-1]|=2147483648,H=0;H<J;++H)G[H]^=b[H];z(G)}},Nt.prototype.toString=Nt.prototype.hex=function(){this.finalize();for(var b,H=this.blockCount,J=this.s,G=this.outputBlocks,ee=this.extraBytes,x=0,ne=0,he="";ne<G;){for(x=0;x<H&&ne<G;++x,++ne)b=J[x],he+=Ve[b>>4&15]+Ve[15&b]+Ve[b>>12&15]+Ve[b>>8&15]+Ve[b>>20&15]+Ve[b>>16&15]+Ve[b>>28&15]+Ve[b>>24&15];ne%H==0&&(z(J),x=0)}return ee&&(b=J[x],he+=Ve[b>>4&15]+Ve[15&b],ee>1&&(he+=Ve[b>>12&15]+Ve[b>>8&15]),ee>2&&(he+=Ve[b>>20&15]+Ve[b>>16&15])),he},Nt.prototype.arrayBuffer=function(){this.finalize();var b,H=this.blockCount,J=this.s,G=this.outputBlocks,ee=this.extraBytes,x=0,ne=0,he=this.outputBits>>3;b=ee?new ArrayBuffer(G+1<<2):new ArrayBuffer(he);for(var ve=new Uint32Array(b);ne<G;){for(x=0;x<H&&ne<G;++x,++ne)ve[ne]=J[x];ne%H==0&&z(J)}return ee&&(ve[x]=J[x],b=b.slice(0,he)),b},Nt.prototype.buffer=Nt.prototype.arrayBuffer,Nt.prototype.digest=Nt.prototype.array=function(){this.finalize();for(var b,H,J=this.blockCount,G=this.s,ee=this.outputBlocks,x=this.extraBytes,ne=0,he=0,ve=[];he<ee;){for(ne=0;ne<J&&he<ee;++ne,++he)b=he<<2,H=G[ne],ve[b]=255&H,ve[b+1]=H>>8&255,ve[b+2]=H>>16&255,ve[b+3]=H>>24&255;he%J==0&&z(G)}return x&&(b=he<<2,H=G[ne],ve[b]=255&H,x>1&&(ve[b+1]=H>>8&255),x>2&&(ve[b+2]=H>>16&255)),ve},ur.prototype=new Nt,ur.prototype.finalize=function(){return this.encode(this.outputBits,!0),Nt.prototype.finalize.call(this)};var z=function(b){var H,J,G,ee,x,ne,he,ve,ye,Ge,dt,pt,Tt,Gt,Yt,Pt,Mt,Jt,Un,mi,yi,Nr,On,hr,lr,Wt,Xo,Qo,xi,Jo,Zo,xo,Aa,$o,es,ts,rs,ns,is,as,$i,gi,os,Oa,Pa,Ia,Ra,Na,Fn,ss,us,ls,Ma,Ca,vi,_i,cs,Ni,ds,ja,ea,ta,La;for(G=0;G<48;G+=2)ee=b[0]^b[10]^b[20]^b[30]^b[40],x=b[1]^b[11]^b[21]^b[31]^b[41],ne=b[2]^b[12]^b[22]^b[32]^b[42],he=b[3]^b[13]^b[23]^b[33]^b[43],ve=b[4]^b[14]^b[24]^b[34]^b[44],ye=b[5]^b[15]^b[25]^b[35]^b[45],Ge=b[6]^b[16]^b[26]^b[36]^b[46],dt=b[7]^b[17]^b[27]^b[37]^b[47],H=(pt=b[8]^b[18]^b[28]^b[38]^b[48])^(ne<<1|he>>>31),J=(Tt=b[9]^b[19]^b[29]^b[39]^b[49])^(he<<1|ne>>>31),b[0]^=H,b[1]^=J,b[10]^=H,b[11]^=J,b[20]^=H,b[21]^=J,b[30]^=H,b[31]^=J,b[40]^=H,b[41]^=J,H=ee^(ve<<1|ye>>>31),J=x^(ye<<1|ve>>>31),b[2]^=H,b[3]^=J,b[12]^=H,b[13]^=J,b[22]^=H,b[23]^=J,b[32]^=H,b[33]^=J,b[42]^=H,b[43]^=J,H=ne^(Ge<<1|dt>>>31),J=he^(dt<<1|Ge>>>31),b[4]^=H,b[5]^=J,b[14]^=H,b[15]^=J,b[24]^=H,b[25]^=J,b[34]^=H,b[35]^=J,b[44]^=H,b[45]^=J,H=ve^(pt<<1|Tt>>>31),J=ye^(Tt<<1|pt>>>31),b[6]^=H,b[7]^=J,b[16]^=H,b[17]^=J,b[26]^=H,b[27]^=J,b[36]^=H,b[37]^=J,b[46]^=H,b[47]^=J,H=Ge^(ee<<1|x>>>31),J=dt^(x<<1|ee>>>31),b[8]^=H,b[9]^=J,b[18]^=H,b[19]^=J,b[28]^=H,b[29]^=J,b[38]^=H,b[39]^=J,b[48]^=H,b[49]^=J,Gt=b[0],Yt=b[1],Ia=b[11]<<4|b[10]>>>28,Ra=b[10]<<4|b[11]>>>28,Qo=b[20]<<3|b[21]>>>29,xi=b[21]<<3|b[20]>>>29,ja=b[31]<<9|b[30]>>>23,ea=b[30]<<9|b[31]>>>23,gi=b[40]<<18|b[41]>>>14,os=b[41]<<18|b[40]>>>14,$o=b[2]<<1|b[3]>>>31,es=b[3]<<1|b[2]>>>31,Pt=b[13]<<12|b[12]>>>20,Mt=b[12]<<12|b[13]>>>20,Na=b[22]<<10|b[23]>>>22,Fn=b[23]<<10|b[22]>>>22,Jo=b[33]<<13|b[32]>>>19,Zo=b[32]<<13|b[33]>>>19,ta=b[42]<<2|b[43]>>>30,La=b[43]<<2|b[42]>>>30,Ca=b[5]<<30|b[4]>>>2,vi=b[4]<<30|b[5]>>>2,ts=b[14]<<6|b[15]>>>26,rs=b[15]<<6|b[14]>>>26,Jt=b[25]<<11|b[24]>>>21,Un=b[24]<<11|b[25]>>>21,ss=b[34]<<15|b[35]>>>17,us=b[35]<<15|b[34]>>>17,xo=b[45]<<29|b[44]>>>3,Aa=b[44]<<29|b[45]>>>3,hr=b[6]<<28|b[7]>>>4,lr=b[7]<<28|b[6]>>>4,_i=b[17]<<23|b[16]>>>9,cs=b[16]<<23|b[17]>>>9,ns=b[26]<<25|b[27]>>>7,is=b[27]<<25|b[26]>>>7,mi=b[36]<<21|b[37]>>>11,yi=b[37]<<21|b[36]>>>11,ls=b[47]<<24|b[46]>>>8,Ma=b[46]<<24|b[47]>>>8,Oa=b[8]<<27|b[9]>>>5,Pa=b[9]<<27|b[8]>>>5,Wt=b[18]<<20|b[19]>>>12,Xo=b[19]<<20|b[18]>>>12,Ni=b[29]<<7|b[28]>>>25,ds=b[28]<<7|b[29]>>>25,as=b[38]<<8|b[39]>>>24,$i=b[39]<<8|b[38]>>>24,Nr=b[48]<<14|b[49]>>>18,On=b[49]<<14|b[48]>>>18,b[0]=Gt^~Pt&Jt,b[1]=Yt^~Mt&Un,b[10]=hr^~Wt&Qo,b[11]=lr^~Xo&xi,b[20]=$o^~ts&ns,b[21]=es^~rs&is,b[30]=Oa^~Ia&Na,b[31]=Pa^~Ra&Fn,b[40]=Ca^~_i&Ni,b[41]=vi^~cs&ds,b[2]=Pt^~Jt&mi,b[3]=Mt^~Un&yi,b[12]=Wt^~Qo&Jo,b[13]=Xo^~xi&Zo,b[22]=ts^~ns&as,b[23]=rs^~is&$i,b[32]=Ia^~Na&ss,b[33]=Ra^~Fn&us,b[42]=_i^~Ni&ja,b[43]=cs^~ds&ea,b[4]=Jt^~mi&Nr,b[5]=Un^~yi&On,b[14]=Qo^~Jo&xo,b[15]=xi^~Zo&Aa,b[24]=ns^~as&gi,b[25]=is^~$i&os,b[34]=Na^~ss&ls,b[35]=Fn^~us&Ma,b[44]=Ni^~ja&ta,b[45]=ds^~ea&La,b[6]=mi^~Nr&Gt,b[7]=yi^~On&Yt,b[16]=Jo^~xo&hr,b[17]=Zo^~Aa&lr,b[26]=as^~gi&$o,b[27]=$i^~os&es,b[36]=ss^~ls&Oa,b[37]=us^~Ma&Pa,b[46]=ja^~ta&Ca,b[47]=ea^~La&vi,b[8]=Nr^~Gt&Pt,b[9]=On^~Yt&Mt,b[18]=xo^~hr&Wt,b[19]=Aa^~lr&Xo,b[28]=gi^~$o&ts,b[29]=os^~es&rs,b[38]=ls^~Oa&Ia,b[39]=Ma^~Pa&Ra,b[48]=ta^~Ca&_i,b[49]=La^~vi&cs,b[0]^=dr[G],b[1]^=dr[G+1]};if(oe)E.exports=nr;else for(fr=0;fr<kr.length;++fr)Y[kr[fr]]=nr[kr[fr]]})()})(c);var f=c.exports,p=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,y=Math.ceil,h=Math.floor,g="[BigNumber Error] ",A=g+"Number primitive has more than 15 significant digits: ",N=1e14,R=14,O=9007199254740991,M=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],_=1e7,I=1e9;function S(E){var P=0|E;return E>0||E===P?P:P-1}function v(E){for(var P,k,Y=1,$=E.length,oe=E[0]+"";Y<$;){for(P=E[Y++]+"",k=R-P.length;k--;P="0"+P);oe+=P}for($=oe.length;oe.charCodeAt(--$)===48;);return oe.slice(0,$+1||1)}function T(E,P){var k,Y,$=E.c,oe=P.c,Pe=E.s,Ve=P.s,it=E.e,st=P.e;if(!Pe||!Ve)return null;if(k=$&&!$[0],Y=oe&&!oe[0],k||Y)return k?Y?0:-Ve:Pe;if(Pe!=Ve)return Pe;if(k=Pe<0,Y=it==st,!$||!oe)return Y?0:!$^k?1:-1;if(!Y)return it>st^k?1:-1;for(Ve=(it=$.length)<(st=oe.length)?it:st,Pe=0;Pe<Ve;Pe++)if($[Pe]!=oe[Pe])return $[Pe]>oe[Pe]^k?1:-1;return it==st?0:it>st^k?1:-1}function j(E,P,k,Y){if(E<P||E>k||E!==h(E))throw Error(g+(Y||"Argument")+(typeof E=="number"?E<P||E>k?" out of range: ":" not an integer: ":" not a primitive number: ")+String(E))}function V(E){var P=E.c.length-1;return S(E.e/R)==P&&E.c[P]%2!=0}function W(E,P){return(E.length>1?E.charAt(0)+"."+E.slice(1):E)+(P<0?"e":"e+")+P}function X(E,P,k){var Y,$;if(P<0){for($=k+".";++P;$+=k);E=$+E}else if(++P>(Y=E.length)){for($=k,P-=Y;--P;$+=k);E+=$}else P<Y&&(E=E.slice(0,P)+"."+E.slice(P));return E}var fe=(function E(P){var k,Y,$,oe,Pe,Ve,it,st,dr,Ht,ze=Ue.prototype={constructor:Ue,toString:null,valueOf:null},vr=new Ue(1),zt=20,Dt=4,Sr=-7,Sn=21,Kr=-1e7,_r=1e7,Tn=!1,tn=1,nr=0,kr={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},fr="0123456789abcdefghijklmnopqrstuvwxyz",An=!0;function Ue(z,b){var H,J,G,ee,x,ne,he,ve,ye=this;if(!(ye instanceof Ue))return new Ue(z,b);if(b==null){if(z&&z._isBigNumber===!0)return ye.s=z.s,void(!z.c||z.e>_r?ye.c=ye.e=null:z.e<Kr?ye.c=[ye.e=0]:(ye.e=z.e,ye.c=z.c.slice()));if((ne=typeof z=="number")&&0*z==0){if(ye.s=1/z<0?(z=-z,-1):1,z===~~z){for(ee=0,x=z;x>=10;x/=10,ee++);return void(ee>_r?ye.c=ye.e=null:(ye.e=ee,ye.c=[z]))}ve=String(z)}else{if(!p.test(ve=String(z)))return $(ye,ve,ne);ye.s=ve.charCodeAt(0)==45?(ve=ve.slice(1),-1):1}(ee=ve.indexOf("."))>-1&&(ve=ve.replace(".","")),(x=ve.search(/e/i))>0?(ee<0&&(ee=x),ee+=+ve.slice(x+1),ve=ve.substring(0,x)):ee<0&&(ee=ve.length)}else{if(j(b,2,fr.length,"Base"),b==10&&An)return Nt(ye=new Ue(z),zt+ye.e+1,Dt);if(ve=String(z),ne=typeof z=="number"){if(0*z!=0)return $(ye,ve,ne,b);if(ye.s=1/z<0?(ve=ve.slice(1),-1):1,Ue.DEBUG&&ve.replace(/^0\.0*|\./,"").length>15)throw Error(A+z)}else ye.s=ve.charCodeAt(0)===45?(ve=ve.slice(1),-1):1;for(H=fr.slice(0,b),ee=x=0,he=ve.length;x<he;x++)if(H.indexOf(J=ve.charAt(x))<0){if(J=="."){if(x>ee){ee=he;continue}}else if(!G&&(ve==ve.toUpperCase()&&(ve=ve.toLowerCase())||ve==ve.toLowerCase()&&(ve=ve.toUpperCase()))){G=!0,x=-1,ee=0;continue}return $(ye,String(z),ne,b)}ne=!1,(ee=(ve=Y(ve,b,10,ye.s)).indexOf("."))>-1?ve=ve.replace(".",""):ee=ve.length}for(x=0;ve.charCodeAt(x)===48;x++);for(he=ve.length;ve.charCodeAt(--he)===48;);if(ve=ve.slice(x,++he)){if(he-=x,ne&&Ue.DEBUG&&he>15&&(z>O||z!==h(z)))throw Error(A+ye.s*z);if((ee=ee-x-1)>_r)ye.c=ye.e=null;else if(ee<Kr)ye.c=[ye.e=0];else{if(ye.e=ee,ye.c=[],x=(ee+1)%R,ee<0&&(x+=R),x<he){for(x&&ye.c.push(+ve.slice(0,x)),he-=R;x<he;)ye.c.push(+ve.slice(x,x+=R));x=R-(ve=ve.slice(x)).length}else x-=he;for(;x--;ve+="0");ye.c.push(+ve)}}else ye.c=[ye.e=0]}function fn(z,b,H,J){var G,ee,x,ne,he;if(H==null?H=Dt:j(H,0,8),!z.c)return z.toString();if(G=z.c[0],x=z.e,b==null)he=v(z.c),he=J==1||J==2&&(x<=Sr||x>=Sn)?W(he,x):X(he,x,"0");else if(ee=(z=Nt(new Ue(z),b,H)).e,ne=(he=v(z.c)).length,J==1||J==2&&(b<=ee||ee<=Sr)){for(;ne<b;he+="0",ne++);he=W(he,ee)}else if(b-=x,he=X(he,ee,"0"),ee+1>ne){if(--b>0)for(he+=".";b--;he+="0");}else if((b+=ee-ne)>0)for(ee+1==ne&&(he+=".");b--;he+="0");return z.s<0&&G?"-"+he:he}function Bn(z,b){for(var H,J=1,G=new Ue(z[0]);J<z.length;J++){if(!(H=new Ue(z[J])).s){G=H;break}b.call(G,H)&&(G=H)}return G}function hi(z,b,H){for(var J=1,G=b.length;!b[--G];b.pop());for(G=b[0];G>=10;G/=10,J++);return(H=J+H*R-1)>_r?z.c=z.e=null:H<Kr?z.c=[z.e=0]:(z.e=H,z.c=b),z}function Nt(z,b,H,J){var G,ee,x,ne,he,ve,ye,Ge=z.c,dt=M;if(Ge){e:{for(G=1,ne=Ge[0];ne>=10;ne/=10,G++);if((ee=b-G)<0)ee+=R,x=b,ye=(he=Ge[ve=0])/dt[G-x-1]%10|0;else if((ve=y((ee+1)/R))>=Ge.length){if(!J)break e;for(;Ge.length<=ve;Ge.push(0));he=ye=0,G=1,x=(ee%=R)-R+1}else{for(he=ne=Ge[ve],G=1;ne>=10;ne/=10,G++);ye=(x=(ee%=R)-R+G)<0?0:he/dt[G-x-1]%10|0}if(J=J||b<0||Ge[ve+1]!=null||(x<0?he:he%dt[G-x-1]),J=H<4?(ye||J)&&(H==0||H==(z.s<0?3:2)):ye>5||ye==5&&(H==4||J||H==6&&(ee>0?x>0?he/dt[G-x]:0:Ge[ve-1])%10&1||H==(z.s<0?8:7)),b<1||!Ge[0])return Ge.length=0,J?(b-=z.e+1,Ge[0]=dt[(R-b%R)%R],z.e=-b||0):Ge[0]=z.e=0,z;if(ee==0?(Ge.length=ve,ne=1,ve--):(Ge.length=ve+1,ne=dt[R-ee],Ge[ve]=x>0?h(he/dt[G-x]%dt[x])*ne:0),J)for(;;){if(ve==0){for(ee=1,x=Ge[0];x>=10;x/=10,ee++);for(x=Ge[0]+=ne,ne=1;x>=10;x/=10,ne++);ee!=ne&&(z.e++,Ge[0]==N&&(Ge[0]=1));break}if(Ge[ve]+=ne,Ge[ve]!=N)break;Ge[ve--]=0,ne=1}for(ee=Ge.length;Ge[--ee]===0;Ge.pop());}z.e>_r?z.c=z.e=null:z.e<Kr&&(z.c=[z.e=0])}return z}function ur(z){var b,H=z.e;return H===null?z.toString():(b=v(z.c),b=H<=Sr||H>=Sn?W(b,H):X(b,H,"0"),z.s<0?"-"+b:b)}return Ue.clone=E,Ue.ROUND_UP=0,Ue.ROUND_DOWN=1,Ue.ROUND_CEIL=2,Ue.ROUND_FLOOR=3,Ue.ROUND_HALF_UP=4,Ue.ROUND_HALF_DOWN=5,Ue.ROUND_HALF_EVEN=6,Ue.ROUND_HALF_CEIL=7,Ue.ROUND_HALF_FLOOR=8,Ue.EUCLID=9,Ue.config=Ue.set=function(z){var b,H;if(z!=null){if(typeof z!="object")throw Error(g+"Object expected: "+z);if(z.hasOwnProperty(b="DECIMAL_PLACES")&&(j(H=z[b],0,I,b),zt=H),z.hasOwnProperty(b="ROUNDING_MODE")&&(j(H=z[b],0,8,b),Dt=H),z.hasOwnProperty(b="EXPONENTIAL_AT")&&((H=z[b])&&H.pop?(j(H[0],-I,0,b),j(H[1],0,I,b),Sr=H[0],Sn=H[1]):(j(H,-I,I,b),Sr=-(Sn=H<0?-H:H))),z.hasOwnProperty(b="RANGE"))if((H=z[b])&&H.pop)j(H[0],-I,-1,b),j(H[1],1,I,b),Kr=H[0],_r=H[1];else{if(j(H,-I,I,b),!H)throw Error(g+b+" cannot be zero: "+H);Kr=-(_r=H<0?-H:H)}if(z.hasOwnProperty(b="CRYPTO")){if((H=z[b])!==!!H)throw Error(g+b+" not true or false: "+H);if(H){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Tn=!H,Error(g+"crypto unavailable");Tn=H}else Tn=H}if(z.hasOwnProperty(b="MODULO_MODE")&&(j(H=z[b],0,9,b),tn=H),z.hasOwnProperty(b="POW_PRECISION")&&(j(H=z[b],0,I,b),nr=H),z.hasOwnProperty(b="FORMAT")){if(typeof(H=z[b])!="object")throw Error(g+b+" not an object: "+H);kr=H}if(z.hasOwnProperty(b="ALPHABET")){if(typeof(H=z[b])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(H))throw Error(g+b+" invalid: "+H);An=H.slice(0,10)=="0123456789",fr=H}}return{DECIMAL_PLACES:zt,ROUNDING_MODE:Dt,EXPONENTIAL_AT:[Sr,Sn],RANGE:[Kr,_r],CRYPTO:Tn,MODULO_MODE:tn,POW_PRECISION:nr,FORMAT:kr,ALPHABET:fr}},Ue.isBigNumber=function(z){if(!z||z._isBigNumber!==!0)return!1;if(!Ue.DEBUG)return!0;var b,H,J=z.c,G=z.e,ee=z.s;e:if({}.toString.call(J)=="[object Array]"){if((ee===1||ee===-1)&&G>=-I&&G<=I&&G===h(G)){if(J[0]===0){if(G===0&&J.length===1)return!0;break e}if((b=(G+1)%R)<1&&(b+=R),String(J[0]).length==b){for(b=0;b<J.length;b++)if((H=J[b])<0||H>=N||H!==h(H))break e;if(H!==0)return!0}}}else if(J===null&&G===null&&(ee===null||ee===1||ee===-1))return!0;throw Error(g+"Invalid BigNumber: "+z)},Ue.maximum=Ue.max=function(){return Bn(arguments,ze.lt)},Ue.minimum=Ue.min=function(){return Bn(arguments,ze.gt)},Ue.random=(oe=9007199254740992,Pe=Math.random()*oe&2097151?function(){return h(Math.random()*oe)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(z){var b,H,J,G,ee,x=0,ne=[],he=new Ue(vr);if(z==null?z=zt:j(z,0,I),G=y(z/R),Tn)if(crypto.getRandomValues){for(b=crypto.getRandomValues(new Uint32Array(G*=2));x<G;)(ee=131072*b[x]+(b[x+1]>>>11))>=9e15?(H=crypto.getRandomValues(new Uint32Array(2)),b[x]=H[0],b[x+1]=H[1]):(ne.push(ee%1e14),x+=2);x=G/2}else{if(!crypto.randomBytes)throw Tn=!1,Error(g+"crypto unavailable");for(b=crypto.randomBytes(G*=7);x<G;)(ee=281474976710656*(31&b[x])+1099511627776*b[x+1]+4294967296*b[x+2]+16777216*b[x+3]+(b[x+4]<<16)+(b[x+5]<<8)+b[x+6])>=9e15?crypto.randomBytes(7).copy(b,x):(ne.push(ee%1e14),x+=7);x=G/7}if(!Tn)for(;x<G;)(ee=Pe())<9e15&&(ne[x++]=ee%1e14);for(G=ne[--x],z%=R,G&&z&&(ee=M[R-z],ne[x]=h(G/ee)*ee);ne[x]===0;ne.pop(),x--);if(x<0)ne=[J=0];else{for(J=-1;ne[0]===0;ne.splice(0,1),J-=R);for(x=1,ee=ne[0];ee>=10;ee/=10,x++);x<R&&(J-=R-x)}return he.e=J,he.c=ne,he}),Ue.sum=function(){for(var z=1,b=arguments,H=new Ue(b[0]);z<b.length;)H=H.plus(b[z++]);return H},Y=(function(){var z="0123456789";function b(H,J,G,ee){for(var x,ne,he=[0],ve=0,ye=H.length;ve<ye;){for(ne=he.length;ne--;he[ne]*=J);for(he[0]+=ee.indexOf(H.charAt(ve++)),x=0;x<he.length;x++)he[x]>G-1&&(he[x+1]==null&&(he[x+1]=0),he[x+1]+=he[x]/G|0,he[x]%=G)}return he.reverse()}return function(H,J,G,ee,x){var ne,he,ve,ye,Ge,dt,pt,Tt,Gt=H.indexOf("."),Yt=zt,Pt=Dt;for(Gt>=0&&(ye=nr,nr=0,H=H.replace(".",""),dt=(Tt=new Ue(J)).pow(H.length-Gt),nr=ye,Tt.c=b(X(v(dt.c),dt.e,"0"),10,G,z),Tt.e=Tt.c.length),ve=ye=(pt=b(H,J,G,x?(ne=fr,z):(ne=z,fr))).length;pt[--ye]==0;pt.pop());if(!pt[0])return ne.charAt(0);if(Gt<0?--ve:(dt.c=pt,dt.e=ve,dt.s=ee,pt=(dt=k(dt,Tt,Yt,Pt,G)).c,Ge=dt.r,ve=dt.e),Gt=pt[he=ve+Yt+1],ye=G/2,Ge=Ge||he<0||pt[he+1]!=null,Ge=Pt<4?(Gt!=null||Ge)&&(Pt==0||Pt==(dt.s<0?3:2)):Gt>ye||Gt==ye&&(Pt==4||Ge||Pt==6&&1&pt[he-1]||Pt==(dt.s<0?8:7)),he<1||!pt[0])H=Ge?X(ne.charAt(1),-Yt,ne.charAt(0)):ne.charAt(0);else{if(pt.length=he,Ge)for(--G;++pt[--he]>G;)pt[he]=0,he||(++ve,pt=[1].concat(pt));for(ye=pt.length;!pt[--ye];);for(Gt=0,H="";Gt<=ye;H+=ne.charAt(pt[Gt++]));H=X(H,ve,ne.charAt(0))}return H}})(),k=(function(){function z(J,G,ee){var x,ne,he,ve,ye=0,Ge=J.length,dt=G%_,pt=G/_|0;for(J=J.slice();Ge--;)ye=((ne=dt*(he=J[Ge]%_)+(x=pt*he+(ve=J[Ge]/_|0)*dt)%_*_+ye)/ee|0)+(x/_|0)+pt*ve,J[Ge]=ne%ee;return ye&&(J=[ye].concat(J)),J}function b(J,G,ee,x){var ne,he;if(ee!=x)he=ee>x?1:-1;else for(ne=he=0;ne<ee;ne++)if(J[ne]!=G[ne]){he=J[ne]>G[ne]?1:-1;break}return he}function H(J,G,ee,x){for(var ne=0;ee--;)J[ee]-=ne,ne=J[ee]<G[ee]?1:0,J[ee]=ne*x+J[ee]-G[ee];for(;!J[0]&&J.length>1;J.splice(0,1));}return function(J,G,ee,x,ne){var he,ve,ye,Ge,dt,pt,Tt,Gt,Yt,Pt,Mt,Jt,Un,mi,yi,Nr,On,hr=J.s==G.s?1:-1,lr=J.c,Wt=G.c;if(!(lr&&lr[0]&&Wt&&Wt[0]))return new Ue(J.s&&G.s&&(lr?!Wt||lr[0]!=Wt[0]:Wt)?lr&&lr[0]==0||!Wt?0*hr:hr/0:NaN);for(Yt=(Gt=new Ue(hr)).c=[],hr=ee+(ve=J.e-G.e)+1,ne||(ne=N,ve=S(J.e/R)-S(G.e/R),hr=hr/R|0),ye=0;Wt[ye]==(lr[ye]||0);ye++);if(Wt[ye]>(lr[ye]||0)&&ve--,hr<0)Yt.push(1),Ge=!0;else{for(mi=lr.length,Nr=Wt.length,ye=0,hr+=2,(dt=h(ne/(Wt[0]+1)))>1&&(Wt=z(Wt,dt,ne),lr=z(lr,dt,ne),Nr=Wt.length,mi=lr.length),Un=Nr,Mt=(Pt=lr.slice(0,Nr)).length;Mt<Nr;Pt[Mt++]=0);On=Wt.slice(),On=[0].concat(On),yi=Wt[0],Wt[1]>=ne/2&&yi++;do{if(dt=0,(he=b(Wt,Pt,Nr,Mt))<0){if(Jt=Pt[0],Nr!=Mt&&(Jt=Jt*ne+(Pt[1]||0)),(dt=h(Jt/yi))>1)for(dt>=ne&&(dt=ne-1),Tt=(pt=z(Wt,dt,ne)).length,Mt=Pt.length;b(pt,Pt,Tt,Mt)==1;)dt--,H(pt,Nr<Tt?On:Wt,Tt,ne),Tt=pt.length,he=1;else dt==0&&(he=dt=1),Tt=(pt=Wt.slice()).length;if(Tt<Mt&&(pt=[0].concat(pt)),H(Pt,pt,Mt,ne),Mt=Pt.length,he==-1)for(;b(Wt,Pt,Nr,Mt)<1;)dt++,H(Pt,Nr<Mt?On:Wt,Mt,ne),Mt=Pt.length}else he===0&&(dt++,Pt=[0]);Yt[ye++]=dt,Pt[0]?Pt[Mt++]=lr[Un]||0:(Pt=[lr[Un]],Mt=1)}while((Un++<mi||Pt[0]!=null)&&hr--);Ge=Pt[0]!=null,Yt[0]||Yt.splice(0,1)}if(ne==N){for(ye=1,hr=Yt[0];hr>=10;hr/=10,ye++);Nt(Gt,ee+(Gt.e=ye+ve*R-1)+1,x,Ge)}else Gt.e=ve,Gt.r=+Ge;return Gt}})(),Ve=/^(-?)0([xbo])(?=\w[\w.]*$)/i,it=/^([^.]+)\.$/,st=/^\.([^.]+)$/,dr=/^-?(Infinity|NaN)$/,Ht=/^\s*\+(?=[\w.])|^\s+|\s+$/g,$=function(z,b,H,J){var G,ee=H?b:b.replace(Ht,"");if(dr.test(ee))z.s=isNaN(ee)?null:ee<0?-1:1;else{if(!H&&(ee=ee.replace(Ve,(function(x,ne,he){return G=(he=he.toLowerCase())=="x"?16:he=="b"?2:8,J&&J!=G?x:ne})),J&&(G=J,ee=ee.replace(it,"$1").replace(st,"0.$1")),b!=ee))return new Ue(ee,G);if(Ue.DEBUG)throw Error(g+"Not a"+(J?" base "+J:"")+" number: "+b);z.s=null}z.c=z.e=null},ze.absoluteValue=ze.abs=function(){var z=new Ue(this);return z.s<0&&(z.s=1),z},ze.comparedTo=function(z,b){return T(this,new Ue(z,b))},ze.decimalPlaces=ze.dp=function(z,b){var H,J,G,ee=this;if(z!=null)return j(z,0,I),b==null?b=Dt:j(b,0,8),Nt(new Ue(ee),z+ee.e+1,b);if(!(H=ee.c))return null;if(J=((G=H.length-1)-S(this.e/R))*R,G=H[G])for(;G%10==0;G/=10,J--);return J<0&&(J=0),J},ze.dividedBy=ze.div=function(z,b){return k(this,new Ue(z,b),zt,Dt)},ze.dividedToIntegerBy=ze.idiv=function(z,b){return k(this,new Ue(z,b),0,1)},ze.exponentiatedBy=ze.pow=function(z,b){var H,J,G,ee,x,ne,he,ve,ye=this;if((z=new Ue(z)).c&&!z.isInteger())throw Error(g+"Exponent not an integer: "+ur(z));if(b!=null&&(b=new Ue(b)),x=z.e>14,!ye.c||!ye.c[0]||ye.c[0]==1&&!ye.e&&ye.c.length==1||!z.c||!z.c[0])return ve=new Ue(Math.pow(+ur(ye),x?z.s*(2-V(z)):+ur(z))),b?ve.mod(b):ve;if(ne=z.s<0,b){if(b.c?!b.c[0]:!b.s)return new Ue(NaN);(J=!ne&&ye.isInteger()&&b.isInteger())&&(ye=ye.mod(b))}else{if(z.e>9&&(ye.e>0||ye.e<-1||(ye.e==0?ye.c[0]>1||x&&ye.c[1]>=24e7:ye.c[0]<8e13||x&&ye.c[0]<=9999975e7)))return ee=ye.s<0&&V(z)?-0:0,ye.e>-1&&(ee=1/ee),new Ue(ne?1/ee:ee);nr&&(ee=y(nr/R+2))}for(x?(H=new Ue(.5),ne&&(z.s=1),he=V(z)):he=(G=Math.abs(+ur(z)))%2,ve=new Ue(vr);;){if(he){if(!(ve=ve.times(ye)).c)break;ee?ve.c.length>ee&&(ve.c.length=ee):J&&(ve=ve.mod(b))}if(G){if((G=h(G/2))===0)break;he=G%2}else if(Nt(z=z.times(H),z.e+1,1),z.e>14)he=V(z);else{if((G=+ur(z))==0)break;he=G%2}ye=ye.times(ye),ee?ye.c&&ye.c.length>ee&&(ye.c.length=ee):J&&(ye=ye.mod(b))}return J?ve:(ne&&(ve=vr.div(ve)),b?ve.mod(b):ee?Nt(ve,nr,Dt,void 0):ve)},ze.integerValue=function(z){var b=new Ue(this);return z==null?z=Dt:j(z,0,8),Nt(b,b.e+1,z)},ze.isEqualTo=ze.eq=function(z,b){return T(this,new Ue(z,b))===0},ze.isFinite=function(){return!!this.c},ze.isGreaterThan=ze.gt=function(z,b){return T(this,new Ue(z,b))>0},ze.isGreaterThanOrEqualTo=ze.gte=function(z,b){return(b=T(this,new Ue(z,b)))===1||b===0},ze.isInteger=function(){return!!this.c&&S(this.e/R)>this.c.length-2},ze.isLessThan=ze.lt=function(z,b){return T(this,new Ue(z,b))<0},ze.isLessThanOrEqualTo=ze.lte=function(z,b){return(b=T(this,new Ue(z,b)))===-1||b===0},ze.isNaN=function(){return!this.s},ze.isNegative=function(){return this.s<0},ze.isPositive=function(){return this.s>0},ze.isZero=function(){return!!this.c&&this.c[0]==0},ze.minus=function(z,b){var H,J,G,ee,x=this,ne=x.s;if(b=(z=new Ue(z,b)).s,!ne||!b)return new Ue(NaN);if(ne!=b)return z.s=-b,x.plus(z);var he=x.e/R,ve=z.e/R,ye=x.c,Ge=z.c;if(!he||!ve){if(!ye||!Ge)return ye?(z.s=-b,z):new Ue(Ge?x:NaN);if(!ye[0]||!Ge[0])return Ge[0]?(z.s=-b,z):new Ue(ye[0]?x:Dt==3?-0:0)}if(he=S(he),ve=S(ve),ye=ye.slice(),ne=he-ve){for((ee=ne<0)?(ne=-ne,G=ye):(ve=he,G=Ge),G.reverse(),b=ne;b--;G.push(0));G.reverse()}else for(J=(ee=(ne=ye.length)<(b=Ge.length))?ne:b,ne=b=0;b<J;b++)if(ye[b]!=Ge[b]){ee=ye[b]<Ge[b];break}if(ee&&(G=ye,ye=Ge,Ge=G,z.s=-z.s),(b=(J=Ge.length)-(H=ye.length))>0)for(;b--;ye[H++]=0);for(b=N-1;J>ne;){if(ye[--J]<Ge[J]){for(H=J;H&&!ye[--H];ye[H]=b);--ye[H],ye[J]+=N}ye[J]-=Ge[J]}for(;ye[0]==0;ye.splice(0,1),--ve);return ye[0]?hi(z,ye,ve):(z.s=Dt==3?-1:1,z.c=[z.e=0],z)},ze.modulo=ze.mod=function(z,b){var H,J,G=this;return z=new Ue(z,b),!G.c||!z.s||z.c&&!z.c[0]?new Ue(NaN):!z.c||G.c&&!G.c[0]?new Ue(G):(tn==9?(J=z.s,z.s=1,H=k(G,z,0,3),z.s=J,H.s*=J):H=k(G,z,0,tn),(z=G.minus(H.times(z))).c[0]||tn!=1||(z.s=G.s),z)},ze.multipliedBy=ze.times=function(z,b){var H,J,G,ee,x,ne,he,ve,ye,Ge,dt,pt,Tt,Gt,Yt,Pt=this,Mt=Pt.c,Jt=(z=new Ue(z,b)).c;if(!(Mt&&Jt&&Mt[0]&&Jt[0]))return!Pt.s||!z.s||Mt&&!Mt[0]&&!Jt||Jt&&!Jt[0]&&!Mt?z.c=z.e=z.s=null:(z.s*=Pt.s,Mt&&Jt?(z.c=[0],z.e=0):z.c=z.e=null),z;for(J=S(Pt.e/R)+S(z.e/R),z.s*=Pt.s,(he=Mt.length)<(Ge=Jt.length)&&(Tt=Mt,Mt=Jt,Jt=Tt,G=he,he=Ge,Ge=G),G=he+Ge,Tt=[];G--;Tt.push(0));for(Gt=N,Yt=_,G=Ge;--G>=0;){for(H=0,dt=Jt[G]%Yt,pt=Jt[G]/Yt|0,ee=G+(x=he);ee>G;)H=((ve=dt*(ve=Mt[--x]%Yt)+(ne=pt*ve+(ye=Mt[x]/Yt|0)*dt)%Yt*Yt+Tt[ee]+H)/Gt|0)+(ne/Yt|0)+pt*ye,Tt[ee--]=ve%Gt;Tt[ee]=H}return H?++J:Tt.splice(0,1),hi(z,Tt,J)},ze.negated=function(){var z=new Ue(this);return z.s=-z.s||null,z},ze.plus=function(z,b){var H,J=this,G=J.s;if(b=(z=new Ue(z,b)).s,!G||!b)return new Ue(NaN);if(G!=b)return z.s=-b,J.minus(z);var ee=J.e/R,x=z.e/R,ne=J.c,he=z.c;if(!ee||!x){if(!ne||!he)return new Ue(G/0);if(!ne[0]||!he[0])return he[0]?z:new Ue(ne[0]?J:0*G)}if(ee=S(ee),x=S(x),ne=ne.slice(),G=ee-x){for(G>0?(x=ee,H=he):(G=-G,H=ne),H.reverse();G--;H.push(0));H.reverse()}for((G=ne.length)-(b=he.length)<0&&(H=he,he=ne,ne=H,b=G),G=0;b;)G=(ne[--b]=ne[b]+he[b]+G)/N|0,ne[b]=N===ne[b]?0:ne[b]%N;return G&&(ne=[G].concat(ne),++x),hi(z,ne,x)},ze.precision=ze.sd=function(z,b){var H,J,G,ee=this;if(z!=null&&z!==!!z)return j(z,1,I),b==null?b=Dt:j(b,0,8),Nt(new Ue(ee),z,b);if(!(H=ee.c))return null;if(J=(G=H.length-1)*R+1,G=H[G]){for(;G%10==0;G/=10,J--);for(G=H[0];G>=10;G/=10,J++);}return z&&ee.e+1>J&&(J=ee.e+1),J},ze.shiftedBy=function(z){return j(z,-9007199254740991,O),this.times("1e"+z)},ze.squareRoot=ze.sqrt=function(){var z,b,H,J,G,ee=this,x=ee.c,ne=ee.s,he=ee.e,ve=zt+4,ye=new Ue("0.5");if(ne!==1||!x||!x[0])return new Ue(!ne||ne<0&&(!x||x[0])?NaN:x?ee:1/0);if((ne=Math.sqrt(+ur(ee)))==0||ne==1/0?(((b=v(x)).length+he)%2==0&&(b+="0"),ne=Math.sqrt(+b),he=S((he+1)/2)-(he<0||he%2),H=new Ue(b=ne==1/0?"5e"+he:(b=ne.toExponential()).slice(0,b.indexOf("e")+1)+he)):H=new Ue(ne+""),H.c[0]){for((ne=(he=H.e)+ve)<3&&(ne=0);;)if(G=H,H=ye.times(G.plus(k(ee,G,ve,1))),v(G.c).slice(0,ne)===(b=v(H.c)).slice(0,ne)){if(H.e<he&&--ne,(b=b.slice(ne-3,ne+1))!="9999"&&(J||b!="4999")){+b&&(+b.slice(1)||b.charAt(0)!="5")||(Nt(H,H.e+zt+2,1),z=!H.times(H).eq(ee));break}if(!J&&(Nt(G,G.e+zt+2,0),G.times(G).eq(ee))){H=G;break}ve+=4,ne+=4,J=1}}return Nt(H,H.e+zt+1,Dt,z)},ze.toExponential=function(z,b){return z!=null&&(j(z,0,I),z++),fn(this,z,b,1)},ze.toFixed=function(z,b){return z!=null&&(j(z,0,I),z=z+this.e+1),fn(this,z,b)},ze.toFormat=function(z,b,H){var J,G=this;if(H==null)z!=null&&b&&typeof b=="object"?(H=b,b=null):z&&typeof z=="object"?(H=z,z=b=null):H=kr;else if(typeof H!="object")throw Error(g+"Argument not an object: "+H);if(J=G.toFixed(z,b),G.c){var ee,x=J.split("."),ne=+H.groupSize,he=+H.secondaryGroupSize,ve=H.groupSeparator||"",ye=x[0],Ge=x[1],dt=G.s<0,pt=dt?ye.slice(1):ye,Tt=pt.length;if(he&&(ee=ne,ne=he,he=ee,Tt-=ee),ne>0&&Tt>0){for(ee=Tt%ne||ne,ye=pt.substr(0,ee);ee<Tt;ee+=ne)ye+=ve+pt.substr(ee,ne);he>0&&(ye+=ve+pt.slice(ee)),dt&&(ye="-"+ye)}J=Ge?ye+(H.decimalSeparator||"")+((he=+H.fractionGroupSize)?Ge.replace(new RegExp("\\d{"+he+"}\\B","g"),"$&"+(H.fractionGroupSeparator||"")):Ge):ye}return(H.prefix||"")+J+(H.suffix||"")},ze.toFraction=function(z){var b,H,J,G,ee,x,ne,he,ve,ye,Ge,dt,pt=this,Tt=pt.c;if(z!=null&&(!(ne=new Ue(z)).isInteger()&&(ne.c||ne.s!==1)||ne.lt(vr)))throw Error(g+"Argument "+(ne.isInteger()?"out of range: ":"not an integer: ")+ur(ne));if(!Tt)return new Ue(pt);for(b=new Ue(vr),ve=H=new Ue(vr),J=he=new Ue(vr),dt=v(Tt),ee=b.e=dt.length-pt.e-1,b.c[0]=M[(x=ee%R)<0?R+x:x],z=!z||ne.comparedTo(b)>0?ee>0?b:ve:ne,x=_r,_r=1/0,ne=new Ue(dt),he.c[0]=0;ye=k(ne,b,0,1),(G=H.plus(ye.times(J))).comparedTo(z)!=1;)H=J,J=G,ve=he.plus(ye.times(G=ve)),he=G,b=ne.minus(ye.times(G=b)),ne=G;return G=k(z.minus(H),J,0,1),he=he.plus(G.times(ve)),H=H.plus(G.times(J)),he.s=ve.s=pt.s,Ge=k(ve,J,ee*=2,Dt).minus(pt).abs().comparedTo(k(he,H,ee,Dt).minus(pt).abs())<1?[ve,J]:[he,H],_r=x,Ge},ze.toNumber=function(){return+ur(this)},ze.toPrecision=function(z,b){return z!=null&&j(z,1,I),fn(this,z,b,2)},ze.toString=function(z){var b,H=this,J=H.s,G=H.e;return G===null?J?(b="Infinity",J<0&&(b="-"+b)):b="NaN":(z==null?b=G<=Sr||G>=Sn?W(v(H.c),G):X(v(H.c),G,"0"):z===10&&An?b=X(v((H=Nt(new Ue(H),zt+G+1,Dt)).c),H.e,"0"):(j(z,2,fr.length,"Base"),b=Y(X(v(H.c),G,"0"),10,z,J,!0)),J<0&&H.c[0]&&(b="-"+b)),b},ze.valueOf=ze.toJSON=function(){return ur(this)},ze._isBigNumber=!0,ze[Symbol.toStringTag]="BigNumber",ze[Symbol.for("nodejs.util.inspect.custom")]=ze.valueOf,P!=null&&Ue.set(P),Ue})();const Ae={ROUNDING_MODE:fe.ROUND_DOWN};function Se(E){return new TextEncoder().encode(E)}function Ee(E){return typeof E=="string"?Ee(ge(E)):new TextDecoder().decode(E)}fe.config(Ae);const je="UNKNOWN_ERROR",Ce="INVALID_ARGUMENT";function Oe(E,P=je,k={}){const Y=[];Object.keys(k).forEach((Pe=>{try{Y.push(Pe+"="+JSON.stringify(k[Pe]))}catch{Y.push(Pe+"="+JSON.stringify(k[Pe].toString()))}}));const $=E;Y.length&&(E+=" ("+Y.join(", ")+")");const oe=new Error(E);return oe.reason=$,oe.code=P,Object.keys(k).forEach((function(Pe){oe[Pe]=k[Pe]})),oe}function ge(E){if(typeof E!="string")throw new Error("hexToBytes only accept strings, got: "+typeof E);if(E.substr(0,2)==="0x")return ge(E.substr(2));const P=new Uint8Array(Math.ceil(E.length/2));let k=0;for(let Y=0;Y<E.length;Y+=2){const $=parseInt(E.substr(Y,2),16);if(isNaN($))throw new Error("Cannot read hex string:"+JSON.stringify(E));P[k]=$,k++}return P}function ie(E){return Array.from(E).map((P=>P.toString(16).padStart(2,"0"))).join("")}function K(E,P){if(typeof E=="string"){if(P&&P.encoding==="hex"&&typeof E=="string"){let k=E;k.length>2&&k.substr(0,2)==="0x"&&(k=k.substr(2));const Y=ge(k);return f.keccak256(Y)}return f.keccak256(Se(E))}return f.keccak256(E)}const C={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function B(E,P,k){return new Array(P-E.length+1).join(k||"0")+E}function q(E){let P="",k=0;const Y=E.length;for(E.substring(0,2)==="0x"&&(k=2);k<Y;k+=2){const $=parseInt(E.substr(k,2),16);P+=String.fromCharCode($)}return P}function L(E){return xr(E)&&E.name&&E.name.indexOf("(")!==-1?E.name:E.name+"("+ae(!1,E.inputs||[]).join(",")+")"}function U(...E){const P=E.reduce((($,oe)=>$+oe.length),0),k=new Uint8Array(P);let Y=0;for(const $ of E)k.set($,Y),Y+=$.length;return k}function ae(E,P){const k=[];return P.forEach((function(Y){if(typeof Y.components=="object"){if(Y.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let $="";const oe=Y.type.indexOf("[");oe>=0&&($=Y.type.substring(oe));const Pe=ae(E,Y.components);k.push("("+Pe.join(",")+")"+$)}else k.push(Y.type)})),k}function Ie(E){const P=E.indexOf("("),k=E.indexOf(")");return P!==-1&&k!==-1?E.substr(0,P):E}function Te(E){const P=E.indexOf("("),k=E.indexOf(")");return P!==-1&&k!==-1?E.substr(P+1,k-P-1).replace(" ",""):""}function ke(E){return E==null?E:Lt(E).toNumber()}function Me(E){return Lt(E).toNumber()}function ue(E){return Pr(E)?E.toString(10):""+E}function de(E){return typeof E=="string"&&!E.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(E)?"0x"+E:Qe(E)}function Re(E){if(typeof E=="string")return E.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(E)?Qe(E):"0x"+ie(Se(E));if(E instanceof Uint8Array)return"0x"+ie(E);throw new Error(`toStringData: Error trying to convert ${E} (${typeof E}) to a hex string.`)}function Le(E){return typeof E=="boolean"?E:Lt(E).toNumber()!==0}function Ye(E){const P=Lt(E),k=P.toString(16);return P.isLessThan(0)?"-0x"+k.substr(1):"0x"+k}function Qe(E){if(_n(E))return Ye(+E);if(Pr(E))return Ye(E);if(vn(E)){const P=E;if(P.indexOf("-0x")===0)return Ye(P);if(P.indexOf("0x")===0)return P;if(!isFinite(P))return ie(Se(P))}if(E instanceof Uint8Array)return"0x"+ie(E);if($r(E)||xr(E))throw new Error("toHex can only be called with scalar values, not objects or arrays");return Ye(E)}function Vt(E){const P=E?E.toLowerCase():"ether",k=C[P];if(k===void 0)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(C,null,2));return new fe(k,10)}function Lt(E){let P=E||0;return Pr(P)?P:(typeof P=="string"&&(P=P.trim()),typeof P!="string"||P.indexOf("0x")!==0&&P.indexOf("-0x")!==0?P instanceof Uint8Array?new fe(ie(P),16):new fe(P,10):new fe(P.replace("0x","").toLowerCase(),16))}function rr(E){return new fe(new Array(E).fill("1").join(""),2)}function Ut(E,P=256){const k=Lt(E).integerValue();return k.isLessThan(0)?rr(P).plus(k).plus(1):k}function Ft(E,P){return B(E.toString(2),P,"0")[0]==="1"}function zr(E){if(typeof E!="string")throw Oe("invalid address",Ce,{arg:"address",value:E});if(E.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return E.trim().substring(0,2)!=="0x"&&(E="0x"+E),cn(E);throw Oe("invalid address",Ce,{arg:"address",value:E})}function or(E,P=256){if(Ft(E,P)){const k=rr(P);return E.minus(k).minus(1)}return E}function gn(E){return/^0x[0-9a-f]{40}$/i.test(E)}function Jr(E){return!!/^(0x)?[0-9a-f]{40}$/i.test(E)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(E)&&!/^(0x)?[0-9A-F]{40}$/.test(E))||Zr(E))}function Zr(E){const P=E.replace("0x",""),k=K(P.toLowerCase());for(let Y=0;Y<40;Y++)if(parseInt(k[Y],16)>7&&P[Y].toUpperCase()!==P[Y]||parseInt(k[Y],16)<=7&&P[Y].toLowerCase()!==P[Y])return!1;return!0}function cn(E){if(E===void 0)return"";const P=E.toLowerCase().replace("0x",""),k=K(P);let Y="0x";for(let $=0;$<P.length;$++)parseInt(k[$],16)>7?Y+=P[$].toUpperCase():Y+=P[$];return Y}function sr(E){if(!Array.isArray(E))throw new Error(`Value was not an array: ${JSON.stringify(E)}`);return E}function dn(E){return gn(E)?E:/^[0-9a-f]{40}$/.test(E)?"0x"+E:"0x"+B(Qe(E).substr(2),40)}function Pr(E){return E instanceof fe}function vn(E){return typeof E=="string"||E&&E.constructor&&E.constructor.name==="String"}function xr(E){return E!==null&&!Array.isArray(E)&&typeof E=="object"}function _n(E){return typeof E=="boolean"}function $r(E){return Array.isArray(E)}var Qi,En;function Oi(E,P){if(!E)throw new Error("jsonrpc method should be specified!");if(typeof E!="string")throw new Error(`jsonrpc must be a string, got ${typeof E}!`);return t.messageId++,{jsonrpc:"2.0",id:t.messageId,method:E,params:P||[]}}function Pi(E){return Array.isArray(E)?E.every(P):P(E);function P(k){return!!k&&(k.error===void 0||k.error===null)&&k.jsonrpc==="2.0"&&k.id!==null&&"result"in k&&k.result!==void 0}}t.TransactionStatus=void 0,(Qi=t.TransactionStatus||(t.TransactionStatus={})).pending="pending",Qi.confirmed="confirmed",Qi.failed="failed",t.TransactionType=void 0,(En=t.TransactionType||(t.TransactionType={})).queued="queued",En.dropped="dropped",En.replaced="replaced",En.pending="pending",En.reverted="reverted",En.confirmed="confirmed",t.messageId=0;function fi(E){return Lt(E)}function Ii(E){return E==="latest"||E==="pending"||E==="earliest"}function Ir(E){return E===void 0?"latest":At(E)}function At(E){return E==null?null:Ii(E)?E:Qe(E)}function Gr(E){return E.from&&(E.from=Ne(E.from)),E.to&&(E.to=Ne(E.to)),E.gasPrice!==void 0&&(E.gasPrice=Ye(E.gasPrice)),E.gas!==void 0&&(E.gas=Ye(E.gas)),E.value!==void 0&&(E.value=Ye(E.value)),E.nonce!==void 0&&(E.nonce=Ye(E.nonce)),E.data&&!E.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(E.data)&&(E.data="0x"+E.data),E}function en(E){if(typeof E!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(E));if(E.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(E));if(E.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(E));return E}function te(E){if(typeof E!="object")throw new Error("Did not provide transaction options");if(!E.from)throw new Error('Missing "from" in transaction options');return E.from=Ne(E.from),E.to&&(E.to=Ne(E.to)),E.gasPrice!==void 0&&(E.gasPrice=Ye(E.gasPrice)),E.gas!==void 0&&(E.gas=Ye(E.gas)),E.value!==void 0&&(E.value=Ye(E.value)),E.nonce!==void 0&&(E.nonce=Ye(E.nonce)),E.data&&!E.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(E.data)&&(E.data="0x"+E.data),E}function F(E){return E?(E.blockNumber!==null&&(E.blockNumber=Me(E.blockNumber)),E.transactionIndex!==null&&(E.transactionIndex=Me(E.transactionIndex)),E.nonce=Me(E.nonce),E.gas=Me(E.gas),E.gasPrice=Lt(E.gasPrice),E.value=Lt(E.value),E):null}function Z(E){return E?(E.blockNumber!==null&&(E.blockNumber=Me(E.blockNumber)),E.transactionIndex!==null&&(E.transactionIndex=Me(E.transactionIndex)),E.cumulativeGasUsed=Me(E.cumulativeGasUsed),E.gasUsed=Me(E.gasUsed),E.logs&&$r(E.logs)&&(E.logs=E.logs.map((function(P){return we(P)}))),E.status=Me(E.status||""),E):null}function pe(E){return E?(E.gasLimit=Me(E.gasLimit),E.gasUsed=Me(E.gasUsed),E.size=Me(E.size),E.timestamp=Me(E.timestamp),E.number!==null&&(E.number=Me(E.number)),E.difficulty=Lt(E.difficulty),E.totalDifficulty=Lt(E.totalDifficulty),$r(E.transactions)&&E.transactions.forEach((function(P,k){vn(P)||(E.transactions[k]=F(P)||E.transactions[k])})),E):null}function we(E){return E&&(E.blockNumber&&(E.blockNumber=Me(E.blockNumber)),E.transactionIndex&&(E.transactionIndex=Me(E.transactionIndex)),E.logIndex&&(E.logIndex=Me(E.logIndex)),E)}function Ne(E){if(gn(E))return E;if(Jr(E))return"0x"+E;throw new Error(`Invalid address: ${JSON.stringify(E)}`)}function We(E){return E}function Ke(E){return E&&(E.startingBlock=Me(E.startingBlock),E.currentBlock=Me(E.currentBlock),E.highestBlock=Me(E.highestBlock),E.knownStates&&(E.knownStates=Me(E.knownStates),E.pulledStates=Me(E.pulledStates)),E)}function ht(E){if(E===null)throw Oe("cannot convert null value to array",Ce,{arg:"value",value:E});if(E instanceof Uint8Array)return new Uint8Array(E);if(typeof E=="string"){const P=E.match(/^(0x)?[0-9a-fA-F]*$/);if(!P)throw Oe("invalid hexidecimal string",Ce,{arg:"value",value:E});if(P[1]!=="0x")throw Oe("hex string must have 0x prefix",Ce,{arg:"value",value:E});(E=E.substring(2)).length%2&&(E="0"+E);const k=[];for(let Y=0;Y<E.length;Y+=2)k.push(parseInt(E.substr(Y,2),16));return new Uint8Array(k)}if((function(P){if(!P||parseInt(String(P.length))!==P.length||typeof P=="string")return!1;for(let k=0;k<P.length;k++){const Y=P[k];if(Y<0||Y>=256||parseInt(String(Y))!==Y)return!1}return!0})(E))return new Uint8Array(E);throw Oe("invalid arrayify value",void 0,{arg:"value",value:E,type:typeof E})}function ut(E,P,k){Object.defineProperty(E,P,{enumerable:!0,value:k,writable:!1})}const vt=new fe(-1),wt=new fe(0),Ot=new fe(1),$t=new fe("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Qt(E){return(function(P,k){function Y(Pe){return new Error('unexpected character "'+P[Pe]+'" at position '+Pe+' in "'+P+'"')}const $={type:"",name:"",state:{allowType:!0}};let oe=$;for(let Pe=0;Pe<P.length;Pe++){const Ve=P[Pe];switch(Ve){case"(":if(!oe.state.allowParams)throw Y(Pe);oe.state.allowType=!1,oe.type=yr(oe.type),oe.components=[{type:"",name:"",parent:oe,state:{allowType:!0}}],oe=oe.components[0];break;case")":delete oe.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),oe.type=yr(oe.type);const it=oe;if(oe=oe.parent,!oe)throw Y(Pe);delete it.parent,oe.state.allowParams=!1,oe.state.allowName=!0,oe.state.allowArray=!0;break;case",":delete oe.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),oe.type=yr(oe.type);const st={type:"",name:"",parent:oe.parent,state:{allowType:!0}};oe.parent.components.push(st),delete oe.parent,oe=st;break;case" ":oe.state.allowType&&oe.type!==""&&(oe.type=yr(oe.type),delete oe.state.allowType,oe.state.allowName=!0,oe.state.allowParams=!0),oe.state.allowName&&oe.name!==""&&(oe.name==="indexed"?(oe.indexed=!0,oe.name=""):oe.state.allowName=!1);break;case"[":if(!oe.state.allowArray)throw Y(Pe);oe.type+=Ve,oe.state.allowArray=!1,oe.state.allowName=!1,oe.state.readArray=!0;break;case"]":if(!oe.state.readArray)throw Y(Pe);oe.type+=Ve,oe.state.readArray=!1,oe.state.allowArray=!0,oe.state.allowName=!0;break;default:if(oe.state.allowType)oe.type+=Ve,oe.state.allowParams=!0,oe.state.allowArray=!0;else if(oe.state.allowName)oe.name+=Ve,delete oe.state.allowArray;else{if(!oe.state.readArray)throw Y(Pe);oe.type+=Ve}}}if(oe.parent)throw new Error("unexpected eof");return delete $.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),$.type=yr($.type),$})(E)}function yr(E){return E.match(/^uint($|[^1-9])/)?E="uint256"+E.substring(4):E.match(/^int($|[^1-9])/)&&(E="int256"+E.substring(3)),E}const Dr=new RegExp(/^bytes([0-9]*)$/),bn=new RegExp(/^(u?int)([0-9]*)$/),kn=new RegExp(/^(.*)\[([0-9]*)\]$/),Ji=function(E,P){const k=E.match(bn);return k&&parseInt(k[2])<=48?P.toNumber():P};class Rr{constructor(P,k,Y,$="",oe){this.coerceFunc=P,this.name=k,this.type=Y,this.localName=$,this.dynamic=oe}}class pi extends Rr{constructor(P){super(P.coerceFunc,P.name,P.type,void 0,P.dynamic),ut(this,"coder",P)}encode(P){return this.coder.encode(P)}decode(P,k){return this.coder.decode(P,k)}}class zs extends Rr{constructor(P,k){super(P,"null","",k,!1)}encode(P){return ht([])}decode(P,k){if(k>P.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function Ea(E,P){return new fe(E.toString(2).substr(-P),2)}class ml extends Rr{constructor(P,k,Y,$){const oe=(Y?"int":"uint")+8*k;super(P,oe,oe,$,!1),this.size=k,this.signed=Y}encode(P){try{let k=Lt(P);if(this.signed){let $=Ea($t,8*this.size-1);if(k.gt($))throw new Error("out-of-bounds");if($=$.plus(Ot).multipliedBy(vt),k.lt($))throw new Error("out-of-bounds")}else if(k.lt(wt)||k.gt(Ea($t,8*this.size)))throw new Error("out-of-bounds");k=Ea(Ut(k,8*this.size),8*this.size),this.signed&&(k=Ut(or(k,8*this.size),256));const Y=B(Ut(k).toString(16),64);if(Y.indexOf("NaN")!==-1)throw Oe("invalid number value, NaN",Ce,{arg:this.localName,coderType:this.name,value:P,v:k,twosComplement:Ut(k),twosComplement16:Ut(k).toString(16),pad:B(Ut(k).toString(16),64),size:this.size});return ge(Y)}catch(k){throw Oe("invalid number value",Ce,{arg:this.localName,coderType:this.name,value:P,message:k.toString()})}}decode(P,k){if(P.length<k+32)throw Oe("insufficient data for "+this.name+" type",Ce,{arg:this.localName,coderType:this.name,value:Qe(P.slice(k,k+32))});const Y=32-this.size;let $=new fe(ie(P.slice(k+Y,k+32)),16);return $=this.signed?or($,8*this.size):Ea($,8*this.size),{consumed:32,value:this.coerceFunc(this.name,$)}}}const qn=new ml((function(E,P){return P}),32,!1,"none");class er extends Rr{constructor(P,k,Y){const $="bytes"+k;super(P,$,$,Y,!1),this.length=k}encode(P){const k=new Uint8Array(32);try{if(typeof P=="string"&&P.length%2!=0)throw new Error("hex string cannot be odd-length");const Y=ht(P);if(Y.length>this.length)throw new Error("incorrect data length");k.set(Y)}catch(Y){throw Oe("invalid "+this.name+" value. Use hex strings or Uint8Array",Ce,{arg:this.localName,coderType:this.name,value:Y.value||P,details:Y.message})}return k}decode(P,k){if(P.length<k+32)throw Oe("insufficient data for "+this.name+" type",Ce,{arg:this.localName,coderType:this.name,value:Qe(P.slice(k,k+32))});return{consumed:32,value:this.coerceFunc(this.name,P.slice(k,k+this.length))}}}function yl(E){const P=32*Math.ceil(E.length/32),k=new Uint8Array(P-E.length);return U(qn.encode(E.length),E,k)}function Wo(E,P,k){if(E.length<P+32)throw Oe("insufficient data for dynamicBytes length",Ce,{arg:k,coderType:"dynamicBytes",value:Qe(E.slice(P,P+32))});let Y=qn.decode(E,P).value;try{Y=Y.toNumber()}catch($){throw $("dynamic bytes count too large",Ce,{arg:k,coderType:"dynamicBytes",value:Y.toString()})}if(E.length<P+32+Y)throw Oe("insufficient data for dynamicBytes type",Ce,{arg:k,coderType:"dynamicBytes",value:Qe(E.slice(P,P+32+Y))});return{consumed:32+32*Math.ceil(Y/32),value:E.slice(P+32,P+32+Y)}}function ba(E){return 32*Math.ceil(E/32)}function wa(E,P){if(!Array.isArray(P)){if(!P||typeof P!="object")throw Oe("invalid tuple value",Ce,{coderType:"tuple",value:P});{const it=[];E.forEach((function(st){it.push(P[st.localName])})),P=it}}if(E.length!==P.length)throw Oe("types/value length mismatch",Ce,{coderType:"tuple",value:P});const k=[];E.forEach((function(it,st){k.push({dynamic:it.dynamic,value:it.encode(P[st])})}));let Y=0,$=0;k.forEach((function(it){it.dynamic?(Y+=32,$+=ba(it.value.length)):Y+=ba(it.value.length)}));let oe=0,Pe=Y;const Ve=new Uint8Array(Y+$);return k.forEach((function(it){it.dynamic?(Ve.set(qn.encode(Pe),oe),oe+=32,Ve.set(it.value,Pe),Pe+=ba(it.value.length)):(Ve.set(it.value,oe),oe+=ba(it.value.length))})),Ve}class nf extends Array{}class gl extends Rr{constructor(P,k,Y,$){super(P,"array",k.type+"["+(Y>=0?Y:"")+"]",$,Y===-1||k.dynamic),this.coder=k,this.length=Y}encode(P){if(!Array.isArray(P))throw Oe("expected array value",Ce,{arg:this.localName,coderType:"array",value:P});let k=this.length,Y=new Uint8Array(0);k===-1&&(k=P.length,Y=qn.encode(k)),(function(oe,Pe,Ve){if(Ve||(Ve=""),oe<Pe)throw Oe("missing argument"+Ve,"MISSING_ARGUMENT",{count:oe,expectedCount:Pe});if(oe>Pe)throw Oe("too many arguments"+Ve,"UNEXPECTED_ARGUMENT",{count:oe,expectedCount:Pe})})(k,P.length,"in coder array"+(this.localName?" "+this.localName:""));const $=[];for(let oe=0;oe<P.length;oe++)$.push(this.coder);return U(Y,wa($,P))}decode(P,k){let Y=0,$=this.length;if($===-1){let Ve;try{Ve=qn.decode(P,k)}catch(it){throw Oe("insufficient data for dynamic array length",Ce,{arg:this.localName,coderType:"array",value:it.value})}try{$=Ve.value.toNumber()}catch{throw Oe("array count too large",Ce,{arg:this.localName,coderType:"array",value:Ve.value.toString()})}Y+=Ve.consumed,k+=Ve.consumed}const oe=[];for(let Ve=0;Ve<$;Ve++)oe.push(new pi(this.coder));const Pe=(function(Ve,it,st){const dr=st;let Ht=0;const ze=[];return Ve.forEach((function(vr){let zt;if(vr.dynamic){const Dt=qn.decode(it,st);zt=vr.decode(it,dr+Dt.value.toNumber()),zt.consumed=Dt.consumed}else zt=vr.decode(it,st);zt.value!==void 0&&ze.push(zt.value),st+=zt.consumed,Ht+=zt.consumed})),{value:ze,consumed:Ht}})(oe,P,k);return Pe.consumed+=Y,Pe.value=this.coerceFunc(this.type,Pe.value),Pe}}class Zi extends Rr{constructor(P,k,Y){let $=!1;const oe=[];k.forEach((function(Pe){Pe.dynamic&&($=!0),oe.push(Pe.type)})),super(P,"tuple","tuple("+oe.join(",")+")",Y,$),this.coders=k}encode(P){return wa(this.coders,P)}decode(P,k){const Y=(function($,oe,Pe){const Ve=Pe;let it=0;const st=new nf;return $.forEach((function(dr){let Ht;if(dr.dynamic){const ze=qn.decode(oe,Pe);Ht=dr.decode(oe,Ve+ze.value.toNumber()),Ht.consumed=ze.consumed}else Ht=dr.decode(oe,Pe);Ht.value!==void 0&&st.push(Ht.value),Pe+=Ht.consumed,it+=Ht.consumed})),$.forEach((function(dr,Ht){let ze=dr.localName;ze&&(ze==="length"&&(ze="_length"),st[ze]!==null&&st[ze]!==void 0||(st[ze]=st[Ht]))})),{value:st,consumed:it}})(this.coders,P,k);return Y.value=this.coerceFunc(this.type,Y.value),Y}}const wn={address:class extends Rr{constructor(E,P){super(E,"address","address",P,!1)}encode(E){const P=new Uint8Array(32),k=E.trim();if(!Jr(k))throw Oe("invalid address format",Ce,{arg:this.localName,coderType:"address",value:E});try{P.set(ge(Ne(k)),12)}catch(Y){throw Oe(`invalid address (${Y.message})`,Ce,{arg:this.localName,coderType:"address",value:E})}return P}decode(E,P){if(E.length<P+32)throw Oe("insufficuent data for address type",Ce,{arg:this.localName,coderType:"address",value:Qe(E.slice(P,P+32)),missingBytes:P+32-E.length});return{consumed:32,value:this.coerceFunc("address",zr(Qe(E.slice(P+12,P+32))))}}},bool:class extends Rr{constructor(E,P){super(E,"bool","bool",P,!1)}encode(E){return qn.encode(E?1:0)}decode(E,P){try{const k=qn.decode(E,P);return{consumed:k.consumed,value:this.coerceFunc("bool",!k.value.isZero())}}catch(k){throw k.reason==="insufficient data for uint256 type"?Oe("insufficient data for boolean type",Ce,{arg:this.localName,coderType:"boolean",value:k.value}):k}}},string:class extends Rr{constructor(E,P){super(E,"string","string",P,!0)}encode(E){if(typeof E!="string")throw Oe("invalid string value",Ce,{arg:this.localName,coderType:"string",value:E});return yl(Se(E))}decode(E,P){const k=Wo(E,P,this.localName);return k.value=this.coerceFunc("string",Ee(k.value)),k}},bytes:class extends Rr{constructor(E,P){super(E,"bytes","bytes",P,!0)}encode(E){try{return yl(ht(E))}catch(P){throw P("invalid bytes value",Ce,{arg:this.localName,coderType:"bytes",value:P.value})}}decode(E,P){const k=Wo(E,P,this.localName);return k.value=this.coerceFunc("bytes",k.value),k}},function:class extends er{constructor(E,P){super(E,24,P)}}};function Ko(E,P){const k=wn[P.type];if(k)return new k(E,P.name);let Y=P.type.match(bn);if(Y){const $=parseInt(Y[2]||"256");if($===0||$>256||$%8!=0)throw Oe("invalid "+Y[1]+" bit length",Ce,{arg:"param",value:P});return new ml(E,$/8,Y[1]==="int",P.name)}if(Y=P.type.match(Dr),Y){const $=parseInt(Y[1]);if($===0||$>32)throw Oe("invalid bytes length",Ce,{arg:"param",value:P});return new er(E,$,P.name)}if(Y=P.type.match(kn),Y){const $=Object.assign({},P),oe=parseInt(Y[2]||"-1");return $.type=Y[1],new gl(E,Ko(E,$),oe,P.name)}if(P.type.substring(0,5)==="tuple")return(function($,oe,Pe){oe||(oe=[]);const Ve=oe.map((it=>Ko($,it)));return new Zi($,Ve,Pe)})(E,P.components,P.name);if(P.type==="")return new zs(E,P.name);throw Oe("invalid type",Ce,{arg:"type",value:P.type,fullType:P})}class Wr{constructor(P){(function(k,Y){if(!(k instanceof Y))throw Oe("missing new","MISSING_NEW",{name:Y.name})})(this,Wr),P||(P=Ji),ut(this,"coerceFunc",P)}encode(P,k){if(P.length!==k.length)throw Oe("types/values length mismatch",Ce,{count:{types:P.length,values:k.length},value:{types:P,values:k}});const Y=P.map(($=>typeof $=="string"?Qt($):$)).map(($=>Ko(this.coerceFunc,$)));return new Zi(this.coerceFunc,Y,"_").encode(k)}decode(P,k){const Y=P.map(($=>typeof $=="string"?Qt($):$)).map(($=>Ko(this.coerceFunc,$)));return new Zi(this.coerceFunc,Y,"_").decode(k,0).value}}const vl=new Wr;var _l,tt;function xe(E,P,k,Y){var $,oe=arguments.length,Pe=oe<3?P:Y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Pe=Reflect.decorate(E,P,k,Y);else for(var Ve=E.length-1;Ve>=0;Ve--)($=E[Ve])&&(Pe=(oe<3?$(Pe):oe>3?$(P,k,Pe):$(P,k))||Pe);return oe>3&&Pe&&Object.defineProperty(P,k,Pe),Pe}function $e(E,P){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(E,P)}t.coder=void 0,(_l=t.coder||(t.coder={})).encodeParams=function(E,P){return ie(vl.encode(E,P))},_l.decodeParams=function(E,P){if(E.length>0&&(!P||P==="0x"||P==="0X"))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");return vl.decode(E,ge("0x"+P.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class ft{constructor(P){this.callName=P.callName,this.params=P.params||0,this.inputFormatter=P.inputFormatter||null,this.outputFormatter=P.outputFormatter}validateArgs(P){if(P.length!==this.params)throw k=this.callName,Y=P.length,$=this.params,new Error(`Invalid number of input parameters to RPC method "${k}" given: ${Y}, expected: ${$}`);var k,Y,$}formatInput(P){return this.inputFormatter?this.inputFormatter.map((function(k,Y){return k?k(P[Y]):P[Y]})):P}formatOutput(P){return P!==null?this.outputFormatter(P):null}toPayload(P){const k=this.formatInput(P);return this.validateArgs(k),{method:this.callName,params:k}}async execute(P,...k){const Y=this.toPayload(k);if(!P)throw new Error("Missing RequestManager in method#exec");const $=await P.sendAsync(Y);return this.formatOutput($)}}class gr{constructor(P){this.getter=P.getter,this.outputFormatter=P.outputFormatter}formatOutput(P){return this.outputFormatter(P)}async execute(P,...k){const Y=await P.sendAsync({method:this.getter,params:[]});return this.formatOutput(Y)}}function El(E){return new Promise((P=>setTimeout(P,E)))}t.eth=void 0,(tt=t.eth||(t.eth={})).eth_getBalance=new ft({callName:"eth_getBalance",params:2,inputFormatter:[Ne,Ir],outputFormatter:fi}),tt.eth_getStorageAt=new ft({callName:"eth_getStorageAt",params:3,inputFormatter:[Ne,Qe,Ir],outputFormatter:de}),tt.eth_getCode=new ft({callName:"eth_getCode",params:2,inputFormatter:[Ne,Ir],outputFormatter:de}),tt.eth_getBlockByHash=new ft({callName:"eth_getBlockByHash",params:2,inputFormatter:[At,function(E){return!!E}],outputFormatter:pe}),tt.eth_getBlockByNumber=new ft({callName:"eth_getBlockByNumber",params:2,inputFormatter:[At,function(E){return!!E}],outputFormatter:pe}),tt.eth_getUncleByBlockHashAndIndex=new ft({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[At,Qe],outputFormatter:pe}),tt.eth_getUncleByBlockNumberAndIndex=new ft({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[At,Qe],outputFormatter:pe}),tt.eth_getBlockTransactionCountByHash=new ft({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[At],outputFormatter:Me}),tt.eth_getBlockTransactionCountByNumber=new ft({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[At],outputFormatter:Me}),tt.eth_getUncleCountByBlockHash=new ft({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[At],outputFormatter:Me}),tt.eth_getUncleCountByBlockNumber=new ft({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[At],outputFormatter:Me}),tt.eth_getTransactionByHash=new ft({callName:"eth_getTransactionByHash",params:1,inputFormatter:[en],outputFormatter:F}),tt.eth_getTransactionByBlockHashAndIndex=new ft({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[At,Qe],outputFormatter:F}),tt.eth_getTransactionByBlockNumberAndIndex=new ft({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[At,Qe],outputFormatter:F}),tt.eth_getTransactionReceipt=new ft({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[en],outputFormatter:Z}),tt.eth_getTransactionCount=new ft({callName:"eth_getTransactionCount",params:2,inputFormatter:[Ne,Ir],outputFormatter:Me}),tt.eth_sendRawTransaction=new ft({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:de}),tt.web3_sha3=new ft({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:de}),tt.eth_sendTransaction=new ft({callName:"eth_sendTransaction",params:1,inputFormatter:[te],outputFormatter:de}),tt.eth_sign=new ft({callName:"eth_sign",params:2,inputFormatter:[Ne,null],outputFormatter:de}),tt.eth_call=new ft({callName:"eth_call",params:2,inputFormatter:[Gr,Ir],outputFormatter:de}),tt.eth_estimateGas=new ft({callName:"eth_estimateGas",params:1,inputFormatter:[Gr],outputFormatter:Me}),tt.eth_submitWork=new ft({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:Le}),tt.eth_getWork=new ft({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:sr}),tt.eth_coinbase=new gr({getter:"eth_coinbase",outputFormatter:dn}),tt.eth_mining=new gr({getter:"eth_mining",outputFormatter:Le}),tt.eth_hashrate=new gr({getter:"eth_hashrate",outputFormatter:Me}),tt.eth_syncing=new gr({getter:"eth_syncing",outputFormatter:Ke}),tt.eth_gasPrice=new gr({getter:"eth_gasPrice",outputFormatter:fi}),tt.eth_accounts=new gr({getter:"eth_accounts",outputFormatter:sr}),tt.eth_blockNumber=new gr({getter:"eth_blockNumber",outputFormatter:Me}),tt.eth_protocolVersion=new gr({getter:"eth_protocolVersion",outputFormatter:Me}),tt.web3_clientVersion=new gr({getter:"web3_clientVersion",outputFormatter:ue}),tt.net_version=new gr({getter:"net_version",outputFormatter:ue}),tt.shh_version=new ft({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:Me}),tt.shh_post=new ft({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:Le}),tt.personal_newAccount=new ft({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:dn}),tt.personal_importRawKey=new ft({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:dn}),tt.personal_sign=new ft({callName:"personal_sign",params:3,inputFormatter:[Re,Ne,null],outputFormatter:de}),tt.personal_ecRecover=new ft({callName:"personal_ecRecover",params:2,inputFormatter:[Re,null],outputFormatter:dn}),tt.personal_unlockAccount=new ft({callName:"personal_unlockAccount",params:3,inputFormatter:[Ne,null,ke],outputFormatter:Le}),tt.personal_sendTransaction=new ft({callName:"personal_sendTransaction",params:2,inputFormatter:[te,null],outputFormatter:de}),tt.personal_lockAccount=new ft({callName:"personal_lockAccount",params:1,inputFormatter:[Ne],outputFormatter:Le}),tt.personal_listAccounts=new gr({getter:"personal_listAccounts",outputFormatter:sr}),tt.net_listening=new gr({getter:"net_listening",outputFormatter:Le}),tt.net_peerCount=new gr({getter:"net_peerCount",outputFormatter:Me}),tt.eth_newFilter=new ft({callName:"eth_newFilter",params:1,inputFormatter:[We],outputFormatter:Qe}),tt.eth_getLogs=new ft({callName:"eth_getLogs",params:1,inputFormatter:[sr],outputFormatter:sr}),tt.eth_newBlockFilter=new ft({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:Qe}),tt.eth_newPendingTransactionFilter=new ft({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:Qe}),tt.eth_uninstallFilter=new ft({callName:"eth_uninstallFilter",params:1,inputFormatter:[Qe],outputFormatter:Le}),tt.eth_getFilterLogs=new ft({callName:"eth_getFilterLogs",params:1,inputFormatter:[Qe],outputFormatter:sr}),tt.eth_getFilterChanges=new ft({callName:"eth_getFilterChanges",params:1,inputFormatter:[Qe],outputFormatter:sr}),tt.eth_submitHashrate=new ft({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:Le}),tt.shh_newIdentity=new ft({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:de}),tt.shh_hasIdentity=new ft({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:Le}),tt.shh_newGroup=new ft({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:de}),tt.shh_addToGroup=new ft({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:Le}),tt.shh_newFilter=new ft({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:Qe}),tt.shh_uninstallFilter=new ft({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:Le}),tt.shh_getLogs=new ft({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:sr}),tt.shh_getFilterMessages=new ft({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:sr}),tt.shh_getFilterChanges=new ft({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:sr}),tt.shh_getMessages=new ft({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:sr});function at(E,P){const k=t.eth[P];if(!k)throw new Error(`Could not find the method/property named ${P.toString()}`);Object.defineProperty(E,P,{value:function(...Y){return k.execute(this,...Y)}})}class Ze{constructor(P){this.provider=P,this.requests=new Map}async sendAsync(P){const k=await this.provider;if(!k)throw new Error("Provider not set or invalid");const Y=Oi(P.method,P.params),$=l();return this.requests.set(Y.id,$),k.sendAsync(Y,((oe,Pe)=>{this.requests.delete(Y.id),oe?$.reject(oe):Pi(Pe)?$.resolve(Pe.result):$.reject((function(Ve){const it=Ve&&Ve.error&&Ve.error.message?Ve.error.message:"Invalid JSON RPC response: "+JSON.stringify(Ve);return new Error(it)})(Pe))})),$}setProvider(P){this.provider=P}async getConfirmedTransaction(P){const k=await this.waitForCompletion(P);if(this.isFailure(k))throw new Error(`Transaction "${P}" failed`);return k}async waitForCompletion(P,k){const Y=en(P);if(await this.isTxDropped(Y,k)){const $=await this.getTransactionAndReceipt(Y);return Object.assign(Object.assign({},$),{status:t.TransactionStatus.failed})}for(;;){const $=await this.getTransactionAndReceipt(Y);if(!this.isPending($)&&$.receipt)return Object.assign(Object.assign({},$),{status:this.isFailure($)?t.TransactionStatus.failed:t.TransactionStatus.confirmed});await El(2e3)}}async getTransaction(P){let k,Y=null;const $=en(P);try{const Pe=(await this.eth_accounts())[0];Pe&&(Y=await this.eth_getTransactionCount(Pe,"latest"))}catch{Y=null}try{if(k=await this.eth_getTransactionByHash($),k===null)return null}catch{return null}if(k.blockNumber===null){if(Y!==null){if(k.nonce<Y)return{hash:$,type:t.TransactionType.replaced,nonce:k.nonce};if(k.nonce>Y)return{hash:$,type:t.TransactionType.queued,nonce:k.nonce}}return Object.assign({type:t.TransactionType.pending},k)}let oe;try{if(oe=await this.eth_getTransactionReceipt($),oe===null||oe.status===0)return Object.assign({type:t.TransactionType.reverted},k)}catch{return null}return Object.assign(Object.assign({type:t.TransactionType.confirmed},k),{receipt:oe})}async isTxDropped(P,k=15){let Y=k;for(;Y>0;){if(await this.getTransactionAndReceipt(P)!==null)return!1;Y-=1,await El(2e3)}return!0}async getTransactionAndReceipt(P){P=en(P);const[k,Y]=await Promise.all([this.eth_getTransactionByHash(P),this.eth_getTransactionReceipt(P)]);return Object.assign(Object.assign({},k),{receipt:Y})}isPending(P){return P&&P.blockNumber===null}isFailure(P){return P&&(!P.receipt||P.receipt.status===0)}}xe([at,$e("design:type",Function)],Ze.prototype,"web3_clientVersion",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"web3_sha3",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"net_version",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"net_peerCount",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"net_listening",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_protocolVersion",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_syncing",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_coinbase",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_mining",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_hashrate",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_gasPrice",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_accounts",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_blockNumber",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getBalance",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getStorageAt",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getTransactionCount",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getBlockTransactionCountByHash",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getBlockTransactionCountByNumber",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getUncleCountByBlockHash",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getUncleCountByBlockNumber",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getCode",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_sign",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_sendTransaction",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_sendRawTransaction",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_call",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_estimateGas",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getBlockByHash",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getBlockByNumber",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getTransactionByHash",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getTransactionReceipt",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getUncleByBlockHashAndIndex",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_newFilter",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_newBlockFilter",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_newPendingTransactionFilter",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_uninstallFilter",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getFilterChanges",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getFilterLogs",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getLogs",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getWork",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_submitWork",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_submitHashrate",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_post",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_version",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_newIdentity",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_hasIdentity",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_newGroup",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_addToGroup",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_newFilter",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_uninstallFilter",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_getFilterChanges",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_getMessages",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_unlockAccount",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_newAccount",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_listAccounts",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_lockAccount",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_importRawKey",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_sendTransaction",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_sign",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_ecRecover",void 0);class Gs{constructor(P){this.json=P,this._inputTypes=P.inputs||[],this._outputTypes=P.outputs||[],this._constant=!!P.constant,this._payable=!!P.payable||P.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in P&&!P.constant||P.stateMutability==="nonpayable",this._name=L(P)}extractDefaultBlock(P){return P.length>this._inputTypes.length&&!xr(P[P.length-1])&&Ir(P.pop())||"latest"}validateArgs(P){if(P.some((oe=>oe===void 0)))throw new Error("Invalid call, some arguments are undefined");const k=P.filter((function(oe){return!(xr(oe)===!0&&$r(oe)===!1&&Pr(oe)===!1&&!(oe instanceof Uint8Array))}));if(k.length!==this._inputTypes.length)throw Y=k.length,$=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${Y}, expected: ${$}`);var Y,$}toPayload(P){let k={to:void 0,data:void 0,value:void 0,from:void 0};P.length>this._inputTypes.length&&xr(P[P.length-1])&&(k=P.pop()),this.validateArgs(P);const Y=this.signature();let $=t.coder.encodeParams(this._inputTypes,P);return $.indexOf("0x")===0&&($=$.substr(2)),k.data="0x"+Y+$,k}signature(){return K(this._name).slice(0,8)}unpackOutput(P){if(!P)return;const k=P.length>=2?P.slice(2):P,Y=t.coder.decodeParams(this._outputTypes,k);return Y.length===1?Y[0]:Y}async execute(P,k,...Y){if(!P)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const $=this.toPayload(Y);if($.to=k,$.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!$.from)throw new Error('Missing "from" in transaction options');return await P.eth_sendTransaction($)}{const $=this.extractDefaultBlock(Y),oe=this.toPayload(Y);oe.to=k;const Pe=await P.eth_call(oe,$);return this.unpackOutput(Pe)}}estimateGas(P,k,...Y){if(!(P instanceof Ze))throw new Error("estimateGas needs to receive a RequestManager as first argument");const $=this.toPayload(Y);return $.to=k,P.eth_estimateGas($)}displayName(){return Ie(this._name)}typeName(){return Te(this._name)||"void"}attachToContract(P){const k=this.displayName(),Y=Object.assign(((...$)=>this.execute(P.requestManager,P.address,...$)),{estimateGas:this.estimateGas.bind(this,P.requestManager,P.address),toPayload:(...$)=>this.toPayload($),toRPCMessage:(...$)=>{const oe=this.extractDefaultBlock($),Pe=this.toPayload($);return Pe.to=P.address,{method:"eth_call",params:[Pe,oe]}},unpackOutput:$=>this.unpackOutput($)});P[k]||(P[k]=Y),P[k][this.typeName()]=Y}}function Yo(E){if(E==null)return null;const P=String(E).toString();return P.indexOf("0x")===0?P:ie(Se(P))}class Ri{constructor(P){this.requestManager=P,this.isStarted=!1,this.isDisposed=!1,this.formatter=k=>k,this.filterId=l(),this.callbacks=[],this.stopSemaphore=l()}async watch(P){if(this.isDisposed)throw new Error("The filter was disposed");P&&(this.callbacks.push(P),this.isStarted||await this.start())}async start(){if(this.isDisposed)throw new Error("The filter was disposed");if(!this.isStarted){this.isStarted=!0;try{const P=await this.getNewFilter();if(!P)throw new Error("Could not create a filter, response: "+JSON.stringify(P));this.filterId.resolve(P)}catch(P){throw P}this.stopSemaphore=l(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const P=await this.filterId;if(this.isStarted=!1,this.stopSemaphore&&await this.stopSemaphore,await this.uninstall()!==!0)throw new Error(`Couldn't stop the eth filter: ${P}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const k=await this.getChanges();k&&this.callbacks.forEach((Y=>{this.formatter?k.forEach(($=>{Y(this.formatter($))})):k.forEach(($=>Y($)))}))}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=l(),setTimeout((P=()=>this.poll(),function(){P().catch((k=>console.error(k)))}),500))}else this.stopSemaphore.resolve(1);var P}}class Sa extends Ri{constructor(P,k,Y=($=>$)){super(P),this.requestManager=P,this.options=k,this.formatter=Y,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function($){return Yo($)})),this.options={topics:this.options.topics,address:this.options.address?this.options.address:void 0,fromBlock:typeof this.options.fromBlock=="number"||typeof this.options.fromBlock=="string"?At(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?At(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const P=await this.filterId;return this.requestManager.eth_getFilterLogs(P)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const P=await this.filterId;return this.requestManager.eth_getFilterChanges(P)}async uninstall(){const P=await this.filterId;return this.requestManager.eth_uninstallFilter(P)}}class Ta{constructor(P,k,Y){this.requestManager=P,this.address=Y,this._anonymous=!1,this._params=k.inputs||[],this._name=L(k),this._anonymous=k.anonymous||!1}types(P){return this._params.filter((function(k){return k.indexed===P}))}displayName(){return Ie(this._name)}typeName(){return Te(this._name)||"void"}signature(){return K(this._name)}encode(P={},k={}){const Y={topics:[],address:this.address};k.fromBlock!==void 0&&(Y.fromBlock=At(k.fromBlock)||void 0),k.toBlock!==void 0&&(Y.toBlock=At(k.toBlock)||void 0),Y.topics=Y.topics||[],this._anonymous||Y.topics.push("0x"+this.signature());const $=this._params.filter((function(oe){return oe.indexed===!0})).map((function(oe){const Pe=P[oe.name];return Pe==null?null:$r(Pe)?Pe.map((function(Ve){return"0x"+t.coder.encodeParams([oe],[Ve])})):"0x"+t.coder.encodeParams([oe],[Pe])}));return Y.topics=Y.topics.concat($),Y}decode(P){P.data=P.data||"",P.topics=P.topics||[];const k=(this._anonymous?P.topics:P.topics.slice(1)).map((function(Ve){return Ve.slice(2)})).join(""),Y=t.coder.decodeParams(this.types(!0),k),$=P.data.slice(2),oe=t.coder.decodeParams(this.types(!1),$),Pe=this._params.reduce((function(Ve,it){return Ve[it.name]=it.indexed?Y.shift():oe.shift(),Ve}),{});return Object.assign(Object.assign({},we(P)),{event:this.displayName(),address:P.address,args:Pe})}async execute(P,k){const Y=this.encode(P,k),$=this.decode.bind(this);return new Sa(this.requestManager,Y,$)}attachToContract(P){const k=this.execute.bind(this),Y=this.displayName();P.events[Y]||(P.events[Y]=k),P.events[Y][this.typeName()]=this.execute.bind(this,P)}}class Bt{constructor(P,k,Y){this._requestManager=P,this._json=k,this._address=Y}encode(P={}){const k={address:this._address};return P.fromBlock!==void 0&&(k.fromBlock=At(P.fromBlock)||void 0),P.toBlock!==void 0&&(k.toBlock=At(P.toBlock)||void 0),k}decode(P){P.data=P.data||"";const k=$r(P.topics)&&vn(P.topics[0])?P.topics[0].slice(2):"",Y=this._json.filter((function($){return k===K(L($))}))[0];return Y?new Ta(this._requestManager,Y,this._address).decode(P):we(P)}async execute(P){const k=this.encode(P),Y=this.decode.bind(this);return new Sa(this._requestManager,k,Y)}getAllEventsFunction(){return this.execute.bind(this)}}class Ws{constructor(P,k,Y){var $;this.requestManager=P,this.abi=k,this.address=Y,this.events={},this.transactionHash=null,this.address=Y,this.abi=k,($=this).abi.filter((function(oe){return oe.type==="function"})).map((function(oe){return new Gs(oe)})).forEach((function(oe){oe.attachToContract($)})),this.allEvents=(function(oe){const Pe=oe.abi.filter((function(it){return it.type==="event"})),Ve=new Bt(oe.requestManager,Pe,oe.address);return Pe.map((function(it){return new Ta(oe.requestManager,it,oe.address)})).forEach((function(it){it.attachToContract(oe)})),Ve.getAllEventsFunction()})(this)}}t.AbstractFilter=Ri,t.BigNumber=fe,t.Contract=Ws,t.ContractFactory=class{constructor(E,P){this.requestManager=E,this.abi=P}async deploy(...E){let P;const k=E[E.length-1];if(xr(k)&&!$r(k)&&(P=E.pop()),!P)throw new Error("Missing options object");if(!P.data||typeof P.data!="string")throw new Error("Invalid options.data");if(Me(P.value)>0&&!(this.abi.filter((function(st){return st.type==="constructor"&&st.inputs.length===E.length}))[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const Y=($=this.abi,oe=E,$.filter((function(st){return st.type==="constructor"&&st.inputs&&st.inputs.length===oe.length})).map((function(st){return st.inputs||[]})).map((function(st){return t.coder.encodeParams(st,oe)}))[0]||"");var $,oe;P.data+=Y,P.gas||(P.gas=await this.requestManager.eth_estimateGas(P));const Pe=await this.requestManager.eth_sendTransaction(P);if(!Pe)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const Ve=await(async function(st,dr){const Ht=l();let ze=0;const vr=()=>{ze++,ze>50?Ht.reject(new Error("Contract transaction couldn't be found after 50 blocks")):st.eth_getTransactionReceipt(dr).then((Sr=>{Sr&&Sr.blockHash?Ht.resolve(Sr):setTimeout(vr,1e3)}),(Sr=>Ht.reject(Sr)))};vr();const zt=await Ht,Dt=await st.eth_getCode(zt.contractAddress,"latest");if(Dt&&Dt.length>3)return zt.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:Dt,receipt:zt})})(this.requestManager,Pe),it=await this.at(Ve);return it.transactionHash=Pe,it}async at(E){if(!Jr(E))throw new TypeError(`Invalid address ${JSON.stringify(E)}`);return new Ws(this.requestManager,this.abi,E)}},t.EthBlockFilter=class extends Sa{constructor(E){super(E,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},t.EthFilter=Sa,t.EthPendingTransactionFilter=class extends Sa{constructor(E){super(E,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},t.HTTPProvider=class{constructor(E,P={}){this.host=E,this.options=P,this.debug=!1,this.host=E||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(E,P){try{let k=null;k=E instanceof Array?E.map((oe=>n(oe))):n(E);const Y=this.options.fetch||globalThis.fetch;if(Y===void 0)throw new Error("There is no global fetch object nor it was provided. Please install and import isomorphic-fetch");const $={body:JSON.stringify(k),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+$.body),Y(this.host,$).then((async oe=>{if(oe.ok){const Pe=await oe.json();this.debug&&console.log("RECV << "+JSON.stringify(Pe)),Pe.error?P(Object.assign(new Error(Pe.error.json||Pe.error),Pe.error)):P(null,Pe)}else this.debug&&console.log("ERR << "+JSON.stringify(oe)),P(new Error("External error. response code: "+oe.status))}),(oe=>{this.debug&&console.log("ERR << "+JSON.stringify(oe)),P(oe)}))}catch(k){this.debug&&console.log("ERR << "+JSON.stringify(k)),P(k)}}},t.Method=ft,t.Property=gr,t.RequestManager=Ze,t.SHHFilter=class extends Ri{constructor(E,P){super(E),this.requestManager=E,this.options=P,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(k){return Yo(k)})),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const E=await this.filterId;return this.requestManager.shh_getMessages(E)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const E=await this.filterId;return this.requestManager.shh_getFilterChanges(E)}async uninstall(){const E=await this.filterId;return this.requestManager.shh_uninstallFilter(E)}},t.SolidityEvent=Ta,t.SolidityFunction=Gs,t.WebSocketProvider=class{constructor(E,P={}){this.url=E,this.options=P,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const E=this.connection;this.timeout(new Error("Provider disposed.")),E.then((P=>P.close())).catch((P=>{this.debug&&console.error(P)}))}send(){throw new Error("Sync requests are deprecated")}sendAsync(E,P){const k=[];let Y;if(E instanceof Array)Y=Promise.all(E.map(($=>{const oe=l();try{const Pe=n($);k.push(Pe),this.responseCallbacks.set(Pe.id,oe)}catch(Pe){oe.reject(Pe)}return oe})));else{const $=l();try{const oe=n(E);k.push(oe),this.responseCallbacks.set(oe.id,$)}catch(oe){$.reject(oe)}Y=$}Y.then(($=>P(null,$)),($=>P($))),this.connection.then(($=>{k.forEach((oe=>{const Pe=JSON.stringify(oe);this.debug&&console.log("SEND >> "+Pe),$.send(Pe)}))}),($=>{P($)}))}parseResponse(E){const P=[];return E.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((k=>{let Y=k;this.lastChunk&&(Y=this.lastChunk+Y);let $=null;try{$=JSON.parse(Y)}catch{return this.lastChunk=Y,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout((()=>{this.timeout()}),15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",$&&P.push($)})),P}processMessage(E){if("id"in E){const P=E.id,k=this.responseCallbacks.get(P);if(!k)return void console.error("Error: Received a response for an unknown request",E);this.responseCallbacks.delete(P),E.error!==void 0&&E.error!==null?k.reject(Object.assign(new Error(E.error.message||E.error),E.error)):"result"in E&&k.resolve(E)}else this.notificationCallbacks.forEach((P=>P(null,E)))}timeout(E){this.connection&&this.connection.isPending||(this.connection=l());const P=E||new Error("Connection timeout");this.responseCallbacks.forEach((k=>k.reject(P))),this.responseCallbacks.clear(),this.isDisposed||setTimeout((()=>this.connect()),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then((k=>k.close())).catch((k=>{this.debug&&console.error(k)})),this.connection&&this.connection.isPending||(this.connection=l()),this.lastChunk="";const E=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!E)throw new Error("Please provide a WebSocketConstructor");const P=new E(this.url,this.options.protocol);P.onopen=()=>{this.connection.resolve(P)},P.onerror=k=>{const Y=new Error("Error in web socket");Y.data=k,this.timeout(Y)},P.onclose=k=>{this.timeout(new Error(`Connection closed (${k&&k.reason||"Unknown reason"})`))},P.onmessage=k=>{const Y=typeof k.data=="string"?k.data:"";this.debug&&console.log("RECV << "+k.data),this.parseResponse(Y).forEach(($=>{$ instanceof Array?$.forEach((oe=>this.processMessage(oe))):this.processMessage($)}))}}},t.bytesToHex=ie,t.bytesToUtf8String=Ee,t.concatBytes=U,t.default=Ze,t.extractDisplayName=Ie,t.extractTypeName=Te,t.fromAscii=function(E,P=0){let k="";for(let Y=0;Y<E.length;Y++){const $=E.charCodeAt(Y).toString(16);k+=$.length<2?"0"+$:$}return"0x"+k.padEnd(P,"0")},t.fromDecimal=Ye,t.fromTwosComplement=or,t.fromWei=function(E,P){const k=Lt(E).dividedBy(Vt(P));return Pr(E)?k:k.toString(10)},t.getAddress=zr,t.getValueOfUnit=Vt,t.hexToBytes=ge,t.inputAddressFormatter=Ne,t.inputBlockNumberFormatter=At,t.inputCallFormatter=Gr,t.inputDefaultBlockNumberFormatter=Ir,t.inputFilterOptions=We,t.inputPostFormatter=function(E){return E?(E.ttl=Ye(E.ttl),E.workToProve=Ye(E.workToProve),E.priority=Ye(E.priority),$r(E.topics)||(E.topics=E.topics?[E.topics]:[]),E.topics=E.topics.map((function(P){return P.indexOf("0x")===0?P:"0x"+ie(Se(P))})),E):null},t.inputTransactionFormatter=te,t.inputTransactionId=en,t.isAddress=Jr,t.isArray=$r,t.isBigNumber=Pr,t.isBloom=function(E){return!!/^(0x)?[0-9a-f]{512}$/i.test(E)&&!!/^(0x)?[0-9a-f]{512}$/i.test(E)},t.isBoolean=_n,t.isChecksumAddress=Zr,t.isFunction=function(E){return typeof E=="function"},t.isHex=function(E){return typeof E=="string"&&/^0x[0-9a-fA-F]+$/.test(E)},t.isJson=function(E){try{return!!JSON.parse(E)}catch{return!1}},t.isObject=xr,t.isPredefinedBlockNumber=Ii,t.isStrictAddress=gn,t.isString=vn,t.isTopic=function(E){return!!/^(0x)?[0-9a-f]{64}$/i.test(E)&&!!/^(0x)?[0-9a-f]{64}$/i.test(E)},t.isValidResponse=Pi,t.outputBigNumberFormatter=fi,t.outputBlockFormatter=pe,t.outputLogFormatter=we,t.outputPostFormatter=function(E){return E?(E.expiry=Me(E.expiry),E.sent=Me(E.sent),E.ttl=Me(E.ttl),E.workProved=Me(E.workProved),E.topics||(E.topics=[]),E.topics=E.topics.map((function(P){return q(P)})),E):null},t.outputSyncingFormatter=Ke,t.outputTransactionFormatter=F,t.outputTransactionReceiptFormatter=Z,t.padLeft=B,t.padRight=function(E,P,k){return E+new Array(P-E.length+1).join(k||"0")},t.sha3=K,t.signedIsNegative=Ft,t.stringToUtf8Bytes=Se,t.toAddress=dn,t.toArray=sr,t.toAscii=q,t.toBatchPayload=function(E){return E.map((function(P){return Oi(P.method,P.params)}))},t.toBigNumber=Lt,t.toBoolean=Le,t.toChecksumAddress=cn,t.toData=de,t.toDecimal=Me,t.toHex=Qe,t.toJsonRpcRequest=Oi,t.toNullDecimal=ke,t.toString=ue,t.toStringData=Re,t.toTwosComplement=Ut,t.toWei=function(E,P){const k=Lt(E).times(Vt(P));return Pr(E)?k:k.toString(10)},t.transformToFullName=L,Object.defineProperty(t,"__esModule",{value:!0})}))})(tl,tl.exports)),tl.exports}var Pu={},YI;function UU(){if(YI)return Pu;YI=1,Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.SignatureValidator=void 0;const e=Jd();async function i(t,n){const o=[{constant:!0,inputs:[{name:"hash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"magicValue",type:"bytes4"}],payable:!1,stateMutability:"view",type:"function"}];return await new e.ContractFactory(t,o).at(n)}return Pu.SignatureValidator=i,Pu}var Cg={},ri={},Io={},Ro={},jg={},ni={},XI;function nt(){if(XI)return ni;XI=1;var e=ni&&ni.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(ni,"__esModule",{value:!0}),ni.validateType=ni.generateLazyValidator=ni.Ajv=void 0;const i=e(Hd());ni.Ajv=i.default;const t=e(j_()),n=e(L_());function o(l,c){let f=null;const p=(y,h)=>{if(!f){const g=new i.default({$data:!0,allErrors:!0});(0,t.default)(g),(0,n.default)(g,{singleError:!0}),c?.forEach(A=>g.addKeyword(A)),f=g.compile(l),Object.defineProperty(p,"errors",{get(){return f?.errors}})}return f(y,h)};return p}ni.generateLazyValidator=o;function s(l,c){return l.validate(c)}return ni.validateType=s,ni}var QI;function FU(){return QI||(QI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const i=nt();e.SCENE_UPDATE="SCENE_UPDATE",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(jg)),jg}var Lg={},JI;function VU(){return JI||(JI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const i=nt();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})(Lg)),Lg}var ZI;function HU(){return ZI||(ZI=1,(function(e){var i=Ro&&Ro.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Ro&&Ro.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(FU(),e),t(VU(),e)})(Ro)),Ro}var No={},Dg={},xI;function zU(){return xI||(xI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const i=nt();(function(t){t.SCENE="scene",t.SMART_ITEM="smart-item",t.PORTABLE_EXPERIENCE="portable-experience",t.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(Dg)),Dg}var kg={},qg={},$I;function Zd(){return $I||($I=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const i=nt();(function(t){t.UNIQUE="unique",t.MYTHIC="mythic",t.LEGENDARY="legendary",t.EPIC="epic",t.RARE="rare",t.UNCOMMON="uncommon",t.COMMON="common"})(e.Rarity||(e.Rarity={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema);const n={[t.UNIQUE]:1,[t.MYTHIC]:10,[t.LEGENDARY]:100,[t.EPIC]:1e3,[t.RARE]:5e3,[t.UNCOMMON]:1e4,[t.COMMON]:1e5},o={[t.UNIQUE]:"#FFE617",[t.MYTHIC]:"#FB7DE3",[t.LEGENDARY]:"#A657ED",[t.EPIC]:"#6397F2",[t.RARE]:"#3AD682",[t.UNCOMMON]:"#FF8563",[t.COMMON]:"#D4E0E0"},s={[t.UNIQUE]:"#FFB626",[t.MYTHIC]:"#FF63E1",[t.LEGENDARY]:"#842DDA",[t.EPIC]:"#3D85E6",[t.RARE]:"#36CF75",[t.UNCOMMON]:"#ED6D4F",[t.COMMON]:"#ABC1C1"};function l(p){return n[p]}t.getMaxSupply=l;function c(p){return s[p]}t.getColor=c;function f(p){return[o[p],s[p]]}t.getGradient=f})(e.Rarity||(e.Rarity={}))})(qg)),qg}var Bg={},eR;function zo(){return eR||(eR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const i=nt();(function(t){t.EYEBROWS="eyebrows",t.EYES="eyes",t.FACIAL_HAIR="facial_hair",t.HAIR="hair",t.BODY_SHAPE="body_shape",t.MOUTH="mouth",t.UPPER_BODY="upper_body",t.LOWER_BODY="lower_body",t.FEET="feet",t.EARRING="earring",t.EYEWEAR="eyewear",t.HAT="hat",t.HELMET="helmet",t.MASK="mask",t.TIARA="tiara",t.TOP_HEAD="top_head",t.SKIN="skin",t.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(Bg)),Bg}var Ug={},Fg={},tR;function rE(){return tR||(tR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const i=nt();(function(t){t.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",t.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(Fg)),Fg}var Vg={},Hg={},rR;function ZC(){return rR||(rR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const i=nt();(function(t){t.HEAD="head",t.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(Hg)),Hg}var nR;function nE(){return nR||(nR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const i=zo(),t=nt(),n=ZC();(function(o){o.schema={oneOf:[Object.assign({},i.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(Vg)),Vg}var iR;function iE(){return iR||(iR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const i=nt(),t=rE(),n=nE();(function(o){o.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(Ug)),Ug}var Mo={},Co={},zg={},Gg={},aR;function Vs(){return aR||(aR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const i=nt();(function(t){t.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const n=(0,i.generateLazyValidator)(t.schema);t.validate=o=>n(o)})(e.Color3||(e.Color3={})),(function(t){t.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.EthAddress||(e.EthAddress={})),(function(t){t.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.IPFSv2||(e.IPFSv2={})),(function(t){t.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.IPFSv1||(e.IPFSv1={}))})(Gg)),Gg}var oR;function xC(){return oR||(oR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const i=zo(),t=Vs(),n=nt();var o;(function(f){f.schema={type:"object",required:["face256","body"],properties:{face256:t.IPFSv2.schema,body:t.IPFSv2.schema}},f.validate=(0,n.generateLazyValidator)(f.schema)})(o=e.Snapshots||(e.Snapshots={}));var s;(function(f){f.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:i.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:o.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(s=e.AvatarInfo||(e.AvatarInfo={}));var l;(function(f){f.schema={type:"string",pattern:"^[(http(s)?):\\/\\/(www\\.)?a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)$"};const p=new RegExp(f.schema.pattern,"i");f.validate=y=>p.test(y)})(l=e.LinkUrl||(e.LinkUrl={}));var c;(function(f){f.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:l.schema}}})(c=e.Link||(e.Link={})),(function(f){f.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:c.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:t.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:s.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(e.Avatar||(e.Avatar={}))})(zg)),zg}var Wg={},sR;function GU(){return sR||(sR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const i=nt(),t=xC();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(Wg)),Wg}var uR;function WU(){return uR||(uR=1,(function(e){var i=Co&&Co.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Co&&Co.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(xC(),e),t(GU(),e)})(Co)),Co}var Kg={},Yg={},lR;function $C(){return lR||(lR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const i=nt();e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],(function(t){t.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(Yg)),Yg}var Xg={},cR;function ej(){return cR||(cR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(Xg)),Xg}var Qg={},dR;function tj(){return dR||(dR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const i=nt();(function(t){t.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},t.schemaValidator=(0,i.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(Qg)),Qg}var Jg={},Iu={},fR;function aE(){return fR||(fR=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.displayableProperties=void 0,Iu.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Iu}var Zg={},pR;function rj(){return pR||(pR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(Zg)),Zg}var xg={},hR;function nj(){return hR||(hR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(xg)),xg}var mR;function KU(){return mR||(mR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const i=nt(),t=aE(),n=$C(),o=tj(),s=rj(),l=nj(),c=ej();var f;(function(p){p.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",p.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",p.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",p.USE_WEB3_API="USE_WEB3_API",p.USE_FETCH="USE_FETCH",p.USE_WEBSOCKET="USE_WEBSOCKET",p.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(f=e.RequiredPermission||(e.RequiredPermission={})),(function(p){p.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:o.SceneParcels.schema},t.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},s.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:l.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(f)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},c.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:f.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},p.validate=(0,i.generateLazyValidator)(p.schema)})(e.Scene||(e.Scene={}))})(Jg)),Jg}var yR;function YU(){return yR||(yR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var i=$C();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return i.FeatureToggles}});var t=ej();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=tj();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var o=KU();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return o.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return o.RequiredPermission}});var s=rj();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return s.Source}});var l=nj();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return l.SpawnPoint}})})(Kg)),Kg}var jo={},$g={},ev={},gR;function ij(){return gR||(gR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const i=nt();(function(t){t.EN="en",t.ES="es"})(e.Locale||(e.Locale={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(ev)),ev}var vR;function aj(){return vR||(vR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const i=nt(),t=ij();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})($g)),$g}var tv={},_R;function oj(){return _R||(_R=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(tv)),tv}var rv={},ER;function oE(){return ER||(ER=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const i=Zd(),t=nt();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:i.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},o=(0,t.generateLazyValidator)(n);function s(l){return o(l)}e.isStandard=s})(rv)),rv}var nv={},iv={},bR;function sj(){return bR||(bR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(iv)),iv}var wR;function sE(){return wR||(wR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.thirdPartyProps=void 0;const i=nt(),t=sj();e.thirdPartyProps={merkleProof:t.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]}};const n={type:"object",properties:Object.assign({},e.thirdPartyProps),required:["merkleProof","content"],_containsHashingKeys:!0},o={keyword:"_containsHashingKeys",validate:(c,f)=>{var p;const y=f;return!((p=y?.merkleProof)===null||p===void 0)&&p.hashingKeys?y.merkleProof.hashingKeys.every(h=>y.hasOwnProperty(h)):!1},errors:!1},s=(0,i.generateLazyValidator)(n,[o]);function l(c){return s(c)}e.isThirdParty=l})(nv)),nv}var av={},ov={},Hi={},SR;function uj(){if(SR)return Hi;SR=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.isBaseAvatar=Hi.requiredBaseItemProps=Hi.baseItemProperties=void 0;const e=aj(),i=oj(),t=aE();Hi.baseItemProperties=Object.assign(Object.assign({},t.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:e.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},i.Metrics.schema),{nullable:!0})}),Hi.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(o){if(!o||!o.id)return!1;const s=o.id.split(":"),l=s[1]==="decentraland",c=s[3]==="base-avatars";return s.length===5&&l&&c}return Hi.isBaseAvatar=n,Hi}var TR;function XU(){return TR||(TR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const i=nt(),t=zo(),n=iE(),o=uj(),s=oE(),l=sE(),c=nE();(function(f){f.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},o.baseItemProperties),s.standardProperties),l.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:c.HideableWearableCategory.schema},hides:{type:"array",items:c.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:c.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseAvatar:!0},{required:[...o.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content"]},{required:[...o.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const p={keyword:"_isThirdParty",validate:(h,g)=>!h||(0,l.isThirdParty)(g),errors:!1},y={keyword:"_isBaseAvatar",validate:(h,g)=>!h||(0,o.isBaseAvatar)(g),errors:!1};f.validate=(0,i.generateLazyValidator)(f.schema,[p,y])})(e.Wearable||(e.Wearable={}))})(ov)),ov}var AR;function QU(){return AR||(AR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var i=iE();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return i.WearableRepresentation}});var t=XU();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=zo();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var o=ZC();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return o.BodyPartCategory}});var s=nE();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return s.HideableWearableCategory}})})(av)),av}var sv={},uv={},lv={},cv={},OR;function lj(){return OR||(OR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const i=nt();(function(t){t.DANCE="dance",t.STUNT="stunt",t.GREETINGS="greetings",t.FUN="fun",t.POSES="poses",t.REACTIONS="reactions",t.HORROR="horror",t.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(cv)),cv}var dv={},PR;function cj(){return PR||(PR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const i=nt(),t=rE();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(dv)),dv}var IR;function dj(){return IR||(IR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const i=lj(),t=nt(),n=cj();(function(o){o.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:i.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(lv)),lv}var RR;function JU(){return RR||(RR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const i=fj(),t=nt(),n=uj(),o=oE(),s=sE(),l=dj();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),o.standardProperties),s.thirdPartyProps),{emoteDataADR74:l.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const f={keyword:"_isThirdParty",validate:(p,y)=>!p||(0,i.isThirdParty)(y),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[f])})(e.Emote||(e.Emote={}))})(uv)),uv}var fv={},NR;function ZU(){return NR||(NR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const i=nt();(function(t){t.SIMPLE="simple",t.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(fv)),fv}var MR;function xU(){return MR||(MR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=e.EmoteCategory=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var i=JU();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return i.Emote}});var t=cj();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=dj();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var o=lj();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return o.EmoteCategory}});var s=ZU();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}})})(sv)),sv}var CR;function fj(){return CR||(CR=1,(function(e){var i=jo&&jo.__createBinding||(Object.create?(function(p,y,h,g){g===void 0&&(g=h);var A=Object.getOwnPropertyDescriptor(y,h);(!A||("get"in A?!y.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return y[h]}}),Object.defineProperty(p,g,A)}):(function(p,y,h,g){g===void 0&&(g=h),p[g]=y[h]})),t=jo&&jo.__exportStar||function(p,y){for(var h in p)h!=="default"&&!Object.prototype.hasOwnProperty.call(y,h)&&i(y,p,h)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=aj();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var o=ij();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return o.Locale}});var s=oj();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return s.Metrics}});var l=rE();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return l.BodyShape}});var c=oE();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return c.isStandard}});var f=sE();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return f.isThirdParty}}),t(QU(),e),t(xU(),e)})(jo)),jo}var Lo={},jR;function $U(){return jR||(jR=1,(function(e){var i=Lo&&Lo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Lo&&Lo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(sj(),e)})(Lo)),Lo}var pv={},hv={},LR;function uE(){return LR||(LR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const i=nt();var t;(function(o){o.SIGNER="SIGNER",o.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",o.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",o.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",o.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(o){o.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:t.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},o.validate=(0,i.generateLazyValidator)(o.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(o){o.schema={type:"array",items:n.schema,minItems:1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.AuthChain||(e.AuthChain={}))})(hv)),hv}var DR;function eF(){return DR||(DR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const i=Vs(),t=uE(),n=nt();(function(o){o.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:i.IPFSv1.schema}},{properties:{entityId:i.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(o){o.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:i.IPFSv1.schema}},{properties:{entityId:i.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(pv)),pv}var mv={},yv={},kR;function pj(){return kR||(kR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const i=Vs(),t=nt();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[i.IPFSv1.schema,i.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(yv)),yv}var qR;function tF(){return qR||(qR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const i=Vs(),t=pj(),n=nt();(function(o){o.SCENE="scene",o.PROFILE="profile",o.WEARABLE="wearable",o.STORE="store",o.EMOTE="emote",o.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(o){o.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[i.IPFSv1.schema,i.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:t.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.Entity||(e.Entity={}))})(mv)),mv}var gv={},BR;function rF(){return BR||(BR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const i=uE(),t=nt();(function(n){n.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:i.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(gv)),gv}var Do={},vv={},UR;function nF(){return UR||(UR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const i=zo(),t=Vs(),n=nt();var o;(function(s){s.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:i.WearableCategory.schema}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(o=e.Outfit||(e.Outfit={})),(function(s){s.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:o.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(e.Outfits||(e.Outfits={}))})(vv)),vv}var FR;function iF(){return FR||(FR=1,(function(e){var i=Do&&Do.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Do&&Do.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(nF(),e)})(Do)),Do}var VR;function lE(){return VR||(VR=1,(function(e){var i=Mo&&Mo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Mo&&Mo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(WU(),e),t(YU(),e),t(fj(),e),t(aE(),e),t($U(),e),t(eF(),e),t(tF(),e),t(rF(),e),t(iF(),e)})(Mo)),Mo}var HR;function aF(){return HR||(HR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const i=Zd(),t=zo(),n=iE(),o=nt(),s=lE();(function(l){l.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},i.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:t.WearableCategory.schema},hides:{type:"array",items:t.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:s.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},l.validate=(0,o.generateLazyValidator)(l.schema)})(e.WearableJson||(e.WearableJson={}))})(kg)),kg}var zR;function oF(){return zR||(zR=1,(function(e){var i=No&&No.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=No&&No.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(zU(),e),t(aF(),e)})(No)),No}var GR;function sF(){return GR||(GR=1,(function(e){var i=Io&&Io.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Io&&Io.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(HU(),e),t(oF(),e)})(Io)),Io}var _v={},Ev={},bv={},WR;function hj(){return WR||(WR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const i=nt(),t=di();var n;(function(s){s.ETHEREUM_MAINNET="Ethereum Mainnet",s.ETHEREUM_ROPSTEN="Ropsten",s.ETHEREUM_RINKEBY="Rinkeby",s.ETHEREUM_GOERLI="Goerli",s.ETHEREUM_KOVAN="Kovan",s.ETHEREUM_SEPOLIA="Sepolia",s.MATIC_MAINNET="Polygon",s.MATIC_MUMBAI="Mumbai",s.AVALANCHE_MAINNET="Avalanche Mainnet",s.BINANCE_MAINNET="Binance Smart Chain Mainnet",s.ARBITRUM_MAINNET="Arbitrum One",s.OPTIMISM_MAINNET="Optimism Mainnet",s.FANTOM_MAINNET="Fantom Mainnet"})(n=e.ChainName||(e.ChainName={}));function o(s){switch(s){case n.ETHEREUM_MAINNET:return t.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return t.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return t.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return t.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return t.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return t.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return t.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return t.ChainId.MATIC_MUMBAI;default:return null}}e.getChainId=o,(function(s){s.schema={type:"string",enum:Object.values(s)},s.validate=(0,i.generateLazyValidator)(s.schema)})(n=e.ChainName||(e.ChainName={}))})(bv)),bv}var wv={},KR;function ci(){return KR||(KR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const i=nt();(function(t){t.ETHEREUM="ETHEREUM",t.MATIC="MATIC"})(e.Network||(e.Network={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(wv)),wv}var YR;function di(){return YR||(YR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const i=nt(),t=hj(),n=ci();var o;(function(p){p[p.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",p[p.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",p[p.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",p[p.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",p[p.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",p[p.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",p[p.MATIC_MAINNET=137]="MATIC_MAINNET",p[p.MATIC_MUMBAI=80001]="MATIC_MUMBAI"})(o=e.ChainId||(e.ChainId={}));function s(p){switch(p){case o.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case o.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case o.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case o.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case o.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case o.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case o.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case o.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;default:return null}}e.getChainName=s;function l(p){switch(p){case o.ETHEREUM_MAINNET:return"ethereum";case o.ETHEREUM_ROPSTEN:return"ropsten";case o.ETHEREUM_RINKEBY:return"rinkeby";case o.ETHEREUM_GOERLI:return"goerli";case o.ETHEREUM_KOVAN:return"kovan";case o.ETHEREUM_SEPOLIA:return"sepolia";case o.MATIC_MAINNET:return"matic";case o.MATIC_MUMBAI:return"mumbai";default:return""}}e.getURNProtocol=l;function c(p){switch(p){case o.ETHEREUM_MAINNET:return{[n.Network.ETHEREUM]:o.ETHEREUM_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET};case o.ETHEREUM_ROPSTEN:return{[n.Network.ETHEREUM]:o.ETHEREUM_ROPSTEN,[n.Network.MATIC]:o.MATIC_MUMBAI};case o.ETHEREUM_RINKEBY:return{[n.Network.ETHEREUM]:o.ETHEREUM_RINKEBY,[n.Network.MATIC]:o.MATIC_MUMBAI};case o.ETHEREUM_GOERLI:return{[n.Network.ETHEREUM]:o.ETHEREUM_GOERLI,[n.Network.MATIC]:o.MATIC_MUMBAI};case o.ETHEREUM_KOVAN:return{[n.Network.ETHEREUM]:o.ETHEREUM_KOVAN,[n.Network.MATIC]:o.MATIC_MUMBAI};case o.ETHEREUM_SEPOLIA:return{[n.Network.ETHEREUM]:o.ETHEREUM_SEPOLIA,[n.Network.MATIC]:o.MATIC_MUMBAI};case o.MATIC_MAINNET:return{[n.Network.ETHEREUM]:o.MATIC_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET};case o.MATIC_MUMBAI:return{[n.Network.ETHEREUM]:o.MATIC_MUMBAI,[n.Network.MATIC]:o.MATIC_MUMBAI};default:return{[n.Network.ETHEREUM]:o.ETHEREUM_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET}}}e.getNetworkMapping=c;function f(p){switch(p){case o.ETHEREUM_MAINNET:case o.ETHEREUM_ROPSTEN:case o.ETHEREUM_GOERLI:case o.ETHEREUM_KOVAN:case o.ETHEREUM_RINKEBY:case o.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case o.MATIC_MAINNET:case o.MATIC_MUMBAI:return n.Network.MATIC}}e.getNetwork=f,(function(p){p.schema={type:"number",enum:Object.values(p)},p.validate=(0,i.generateLazyValidator)(p.schema)})(o=e.ChainId||(e.ChainId={}))})(Ev)),Ev}var Sv={},XR;function cE(){return XR||(XR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const i=nt();(function(t){t.OPEN="open",t.SOLD="sold",t.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(Sv)),Sv}var QR;function uF(){return QR||(QR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const i=nt(),t=di(),n=cE(),o=ci();(function(s){s.RECENTLY_OFFERED="recently_offered",s.RECENTLY_UPDATED="recently_updated",s.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},bidAddress:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,blockchainId:{type:"string"},blockNumber:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},network:o.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidAddress","bidder","seller","price","fingerprint","status","blockchainId","blockNumber","contractAddress","tokenId","network","chainId","expiresAt","createdAt","updatedAt"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Bid||(e.Bid={}))})(_v)),_v}var Tv={},JR;function lF(){return JR||(JR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const i=nt();(function(t){t.MOST_SALES="most_sales",t.MOST_PURCHASES="most_purchases",t.MOST_SPENT="most_spent",t.MOST_EARNED="most_earned",t.MOST_ROYALTIES="most_royalties",t.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),(function(t){t.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(Tv)),Tv}var Av={},ZR;function cF(){return ZR||(ZR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const i=nt(),t=di(),n=ci();(function(o){o.NEWEST="newest",o.NAME="name",o.RECENTLY_REVIEWED="recently_reviewed",o.RECENTLY_LISTED="recently_listed",o.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(o){o.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.Collection||(e.Collection={}))})(Av)),Av}var Ov={},Pv={},xR;function xd(){return xR||(xR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const i=nt();(function(t){t.PARCEL="parcel",t.ESTATE="estate",t.WEARABLE="wearable",t.ENS="ens",t.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(Pv)),Pv}var $R;function dF(){return $R||($R=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const i=nt(),t=di(),n=ci(),o=xd();(function(s){s.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(s){s.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:o.NFTCategory.schema,network:n.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Contract||(e.Contract={}))})(Ov)),Ov}var Iv={},Rv={},eN;function mj(){return eN||(eN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const i=nt(),t=di(),n=lE(),o=ci(),s=xd(),l=Zd(),c=zo();(function(f){f.NAME="name",f.NEWEST="newest",f.RECENTLY_LISTED="recently_listed",f.RECENTLY_SOLD="recently_sold",f.CHEAPEST="cheapest",f.RENTAL_LISTING_DATE="rental_listing_date",f.RENTAL_DATE="rented_date",f.MAX_RENTAL_PRICE="max_rental_price",f.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(f){f.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:c.WearableCategory.schema,description:{type:"string"},rarity:l.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:l.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:s.NFTCategory.schema,network:o.Network.schema,chainId:t.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},f.validate=(0,i.generateLazyValidator)(f.schema)})(e.NFT||(e.NFT={}))})(Rv)),Rv}var tN;function fF(){return tN||(tN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const i=nt(),t=di(),n=ci(),o=mj(),s=xd();(function(l){l.NAME="name",l.NEWEST="newest",l.RECENTLY_REVIEWED="recently_reviewed",l.RECENTLY_SOLD="recently_sold",l.RECENTLY_LISTED="recently_listed",l.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(l){l.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:s.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},data:o.NFT.schema.properties.data,network:n.Network.schema,chainId:t.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},l.validate=(0,i.generateLazyValidator)(l.schema)})(e.Item||(e.Item={}))})(Iv)),Iv}var Nv={},rN;function pF(){return rN||(rN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(Nv)),Nv}var Mv={},nN;function hF(){return nN||(nN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const i=nt(),t=di(),n=ci();(function(o){o.RECENTLY_MINTED="recently_minted",o.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(o){o.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.Mint||(e.Mint={}))})(Mv)),Mv}var Cv={},iN;function mF(){return iN||(iN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(i){i.NEWEST="newest",i.RECENTLY_SOLD="recently_sold",i.CHEAPEST="cheapest",i.MOST_EXPENSIVE="most_expensive",i.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(i){i.ASC="asc",i.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(Cv)),Cv}var jv={},aN;function yF(){return aN||(aN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const i=nt(),t=di(),n=cE(),o=ci();(function(s){s.RECENTLY_LISTED="recently_listed",s.RECENTLY_UPDATED="recently_updated",s.CHEAPEST="cheapest",s.ISSUED_ID_ASC="issued_id_asc",s.ISSUED_ID_DESC="issued_id_desc",s.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:o.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Order||(e.Order={}))})(jv)),jv}var Lv={},oN;function gF(){return oN||(oN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const i=nt();(function(t){t.INJECTED="injected",t.MAGIC="magic",t.FORTMATIC="formatic",t.NETWORK="network",t.WALLET_CONNECT="wallet_connect",t.WALLET_CONNECT_V2="wallet_connect_v2",t.WALLET_LINK="wallet_link",t.METAMASK_MOBILE="metamask_mobile",t.AUTH_SERVER="auth_server"})(e.ProviderType||(e.ProviderType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})(Lv)),Lv}var Dv={},sN;function yj(){return sN||(sN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const i=nt();(function(t){t.ORDER="order",t.BID="bid",t.MINT="mint"})(e.SaleType||(e.SaleType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(Dv)),Dv}var kv={},uN;function vF(){return uN||(uN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const i=nt(),t=di(),n=yj(),o=ci();(function(s){s.RECENTLY_SOLD="recently_sold",s.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:o.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Sale||(e.Sale={}))})(kv)),kv}var qv={},lN;function _F(){return lN||(lN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const i=nt(),t=di(),n=ci();(function(s){s.OPEN="open",s.CANCELLED="cancelled",s.EXECUTED="executed",s.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),(function(s){s.ASC="asc",s.DESC="desc"})(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),(function(s){s.PARCEL="parcel",s.ESTATE="estate"})(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),(function(s){s.LAND_CREATION_DATE="land_creation_date",s.RENTAL_LISTING_DATE="rental_listing_date",s.RENTAL_DATE="rented_date",s.NAME="name",s.MAX_RENTAL_PRICE="max_rental_price",s.MIN_RENTAL_PRICE="min_rental_price"})(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var o;(function(s){s.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(o=e.PeriodCreation||(e.PeriodCreation={})),(function(s){s.schema={type:"object",properties:{network:n.Network.schema,chainId:t.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:o.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(qv)),qv}var Bv={},cN;function EF(){return cN||(cN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(i){i.DATE="date",i.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(Bv)),Bv}var Uv={},dN;function bF(){return dN||(dN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(Uv)),Uv}var Fv={},fN;function wF(){return fN||(fN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const i=nt();(function(t){t.MALE="male",t.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),(function(t){t.MALE="male",t.FEMALE="female",t.UNISEX="unisex"})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(Fv)),Fv}var Vv={},pN;function SF(){return pN||(pN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const i=nt();function t(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=t;function n(o,s){const l=t().validWorldRanges;for(const c of l)if(o>=c.xMin&&o<=c.xMax&&s>=c.yMin&&s<=c.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(o){o.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.World||(e.World={}))})(Vv)),Vv}var ko={},Hv={},hN;function TF(){return hN||(hN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const i=nt();(function(t){t.STATIC="static",t.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(Hv)),Hv}var zv={},mN;function AF(){return mN||(mN=1,Object.defineProperty(zv,"__esModule",{value:!0})),zv}var Gv={},yN;function OF(){return yN||(yN=1,Object.defineProperty(Gv,"__esModule",{value:!0})),Gv}var Wv={},gN;function PF(){return gN||(gN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const i=nt();(function(t){t.ANIMATION_PLAY="animation_play",t.ANIMATION_PAUSE="animation_pause",t.ANIMATION_LOOP="animation_loop",t.ANIMATION_END="animation_end",t.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(Wv)),Wv}var Kv={},vN;function IF(){return vN||(vN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const i=nt();(function(t){t.IDLE="idle",t.WALK="walk",t.RUN="run",t.JUMP="jump",t.CLAP="clap",t.DAB="dab",t.DANCE="dance",t.FASHION="fashion",t.FASHION_2="fashion-2",t.FASHION_3="fashion-3",t.FASHION_4="fashion-4",t.LOVE="love",t.MONEY="money",t.FIST_PUMP="fist-pump",t.HEAD_EXPLODE="head-explode",t.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(Kv)),Kv}var Yv={},_N;function RF(){return _N||(_N=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewMessageType=void 0;const i=nt();(function(n){n.READY="ready",n.LOAD="load",n.ERROR="error",n.UPDATE="update",n.CONTROLLER_REQUEST="controller_request",n.CONTROLLER_RESPONSE="controller_response",n.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),(function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,o,s,l="*")=>{const c={type:o,payload:s};n.postMessage(c,l)};e.sendMessage=t})(Yv)),Yv}var Xv={},EN;function NF(){return EN||(EN=1,Object.defineProperty(Xv,"__esModule",{value:!0})),Xv}var Qv={},bN;function MF(){return bN||(bN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const i=nt();(function(t){t.ORTHOGRAPHIC="orthographic",t.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(Qv)),Qv}var Jv={},wN;function CF(){return wN||(wN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const i=nt();(function(t){t.TEXTURE="texture",t.WEARABLE="wearable",t.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(Jv)),Jv}var Zv={},SN;function jF(){return SN||(SN=1,Object.defineProperty(Zv,"__esModule",{value:!0})),Zv}var xv={},TN;function LF(){return TN||(TN=1,Object.defineProperty(xv,"__esModule",{value:!0})),xv}var $v={},AN;function DF(){return AN||(AN=1,Object.defineProperty($v,"__esModule",{value:!0})),$v}var e_={},ON;function kF(){return ON||(ON=1,Object.defineProperty(e_,"__esModule",{value:!0})),e_}var t_={},PN;function qF(){return PN||(PN=1,Object.defineProperty(t_,"__esModule",{value:!0})),t_}var r_={},IN;function BF(){return IN||(IN=1,Object.defineProperty(r_,"__esModule",{value:!0})),r_}var n_={},RN;function UF(){return RN||(RN=1,Object.defineProperty(n_,"__esModule",{value:!0})),n_}var i_={},NN;function FF(){return NN||(NN=1,Object.defineProperty(i_,"__esModule",{value:!0})),i_}var MN;function VF(){return MN||(MN=1,(function(e){var i=ko&&ko.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=ko&&ko.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(TF(),e),t(AF(),e),t(OF(),e),t(PF(),e),t(IF(),e),t(RF(),e),t(NF(),e),t(MF(),e),t(CF(),e),t(jF(),e),t(LF(),e),t(DF(),e),t(kF(),e),t(qF(),e),t(BF(),e),t(UF(),e),t(FF(),e)})(ko)),ko}var a_={},CN;function HF(){return CN||(CN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(a_)),a_}var jN;function zF(){return jN||(jN=1,(function(e){var i=ri&&ri.__createBinding||(Object.create?(function(Ee,je,Ce,Oe){Oe===void 0&&(Oe=Ce);var ge=Object.getOwnPropertyDescriptor(je,Ce);(!ge||("get"in ge?!je.__esModule:ge.writable||ge.configurable))&&(ge={enumerable:!0,get:function(){return je[Ce]}}),Object.defineProperty(Ee,Oe,ge)}):(function(Ee,je,Ce,Oe){Oe===void 0&&(Oe=Ce),Ee[Oe]=je[Ce]})),t=ri&&ri.__setModuleDefault||(Object.create?(function(Ee,je){Object.defineProperty(Ee,"default",{enumerable:!0,value:je})}):function(Ee,je){Ee.default=je}),n=ri&&ri.__importStar||function(Ee){if(Ee&&Ee.__esModule)return Ee;var je={};if(Ee!=null)for(var Ce in Ee)Ce!=="default"&&Object.prototype.hasOwnProperty.call(Ee,Ce)&&i(je,Ee,Ce);return t(je,Ee),je},o=ri&&ri.__exportStar||function(Ee,je){for(var Ce in Ee)Ce!=="default"&&!Object.prototype.hasOwnProperty.call(je,Ce)&&i(je,Ee,Ce)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=e.isInsideWorldLimits=e.getWorld=e.World=e.GenderFilterOption=e.WearableGender=e.Store=e.AnalyticsDayDataSortBy=e.PeriodCreation=e.RentalListingCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=e.SaleSortBy=e.Sale=e.SaleType=e.Rarity=e.ProviderType=e.OrderSortBy=e.Order=e.CatalogSortDirection=e.CatalogSortBy=e.NFTSortBy=e.NFT=e.NFTCategory=e.Network=e.MintSortBy=e.Mint=e.MetaTransaction=e.ListingStatus=e.ItemSortBy=e.Item=e.ContractSortBy=e.Contract=e.CollectionSortBy=e.Collection=e.getChainId=e.ChainName=e.getURNProtocol=e.getChainName=e.ChainId=e.AccountSortBy=e.Account=e.BidSortBy=e.Bid=void 0;const s=n(sF());e.sdk=s,o(nt(),e);var l=uF();Object.defineProperty(e,"Bid",{enumerable:!0,get:function(){return l.Bid}}),Object.defineProperty(e,"BidSortBy",{enumerable:!0,get:function(){return l.BidSortBy}});var c=lF();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return c.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return c.AccountSortBy}});var f=di();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return f.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return f.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return f.getURNProtocol}});var p=hj();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return p.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return p.getChainId}});var y=cF();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return y.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return y.CollectionSortBy}});var h=dF();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return h.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return h.ContractSortBy}});var g=fF();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return g.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return g.ItemSortBy}});var A=cE();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return A.ListingStatus}});var N=pF();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return N.MetaTransaction}});var R=hF();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return R.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return R.MintSortBy}});var O=ci();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return O.Network}});var M=xd();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return M.NFTCategory}});var _=mj();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return _.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return _.NFTSortBy}});var I=mF();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return I.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return I.CatalogSortDirection}});var S=yF();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return S.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return S.OrderSortBy}});var v=gF();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return v.ProviderType}});var T=Zd();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return T.Rarity}});var j=yj();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return j.SaleType}});var V=vF();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return V.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return V.SaleSortBy}});var W=_F();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return W.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return W.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return W.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return W.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return W.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return W.PeriodCreation}});var X=EF();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return X.AnalyticsDayDataSortBy}});var fe=bF();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return fe.Store}});var Ae=wF();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return Ae.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return Ae.GenderFilterOption}});var Se=SF();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return Se.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return Se.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return Se.isInsideWorldLimits}}),o(VF(),e),o(lE(),e),o(Vs(),e),o(HF(),e),o(uE(),e),o(pj(),e)})(ri)),ri}var LN;function gj(){return LN||(LN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const i=zF();Object.defineProperty(e,"AuthChain",{enumerable:!0,get:function(){return i.AuthChain}}),Object.defineProperty(e,"AuthLinkType",{enumerable:!0,get:function(){return i.AuthLinkType}}),Object.defineProperty(e,"AuthLink",{enumerable:!0,get:function(){return i.AuthLink}})})(Cg)),Cg}var Ru={},DN;function GF(){if(DN)return Ru;DN=1,Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.moveMinutes=void 0;function e(i){const t=new Date;return t.setMinutes(t.getMinutes()+i),t}return Ru.moveMinutes=e,Ru}var wd={},kN;function WF(){if(kN)return wd;kN=1,Object.defineProperty(wd,"__esModule",{value:!0});const e=Jd();class i{constructor(n,o=!0){this.requestManager=n,this.checkedBlocks={},this.saveBlocks=o,o&&(this.savedBlocks={}),this.requests=0}async fillBlockTime(){const n=await this.getBlockWrapper("latest"),o=await this.getBlockWrapper(1);this.blockTime=(n.timestamp-o.timestamp)/Number(n.number)-1,this.firstTimestamp=o.timestamp}async getDate(n,o=!0){const s=n/1e3,l=Date.now()/1e3;if((typeof this.firstTimestamp>"u"||typeof this.blockTime>"u")&&await this.fillBlockTime(),s<this.firstTimestamp)return{block:1,timestamp:s};if(s>=l||s>this.savedBlocks.latest.timestamp)return{block:(0,e.toBigNumber)(await this.requestManager.eth_blockNumber()).toNumber(),timestamp:s};this.checkedBlocks[s]=[];const c=await this.getBlockWrapper(Math.ceil((s-this.firstTimestamp/this.blockTime)/1e3));return{block:await this.findBetter(s,c,o),timestamp:s}}async findBetter(n,o,s,l=this.blockTime){if(await this.isBetterBlock(n,o,s))return o.number;const c=n-o.timestamp;let f=Math.ceil(c/l);f===0&&(f=c<0?-1:1);const p=await this.getBlockWrapper(this.getNextBlock(n,o.number,f));return l=Math.abs((o.timestamp-p.timestamp)/(o.number-p.number)),this.findBetter(n,p,s,l)}async isBetterBlock(n,o,s){const l=o.timestamp;if(s){if(l<n)return!1;const c=await this.getBlockWrapper(o.number-1);if(l>=n&&c.timestamp<n)return!0}else{if(l>=n)return!1;const c=await this.getBlockWrapper(o.number+1);if(l<n&&c.timestamp>=n)return!0}return!1}getNextBlock(n,o,s){const l=o+s;return this.checkedBlocks[n].includes(l)?this.getNextBlock(n,o,s<0?++s:--s):(this.checkedBlocks[n].push(l),l)}async getBlockWrapper(n){if(!this.saveBlocks){const s=await this.requestManager.eth_getBlockByNumber(n,!1);return{number:(0,e.toBigNumber)(s.number).toNumber(),timestamp:(0,e.toBigNumber)(s.timestamp).toNumber()}}if(this.savedBlocks[n.toString()])return this.savedBlocks[n];if(typeof n=="number"&&this.savedBlocks.latest&&this.savedBlocks.latest.number<=n)return this.savedBlocks.latest;const{timestamp:o}=await this.requestManager.eth_getBlockByNumber(n,!1);return this.savedBlocks[n.toString()]={number:(0,e.toBigNumber)(n==="latest"?await this.requestManager.eth_blockNumber():n).toNumber(),timestamp:(0,e.toBigNumber)(o).toNumber()},this.requests++,this.savedBlocks[n.toString()]}}return wd.default=i,wd}var Lr={},o_={},s_={},Hr={},qN;function dE(){if(qN)return Hr;qN=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.output=Hr.exists=Hr.hash=Hr.bytes=Hr.bool=Hr.number=void 0;function e(c){if(!Number.isSafeInteger(c)||c<0)throw new Error(`Wrong positive integer: ${c}`)}Hr.number=e;function i(c){if(typeof c!="boolean")throw new Error(`Expected boolean, not ${c}`)}Hr.bool=i;function t(c,...f){if(!(c instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(f.length>0&&!f.includes(c.length))throw new TypeError(`Expected Uint8Array of length ${f}, not of length=${c.length}`)}Hr.bytes=t;function n(c){if(typeof c!="function"||typeof c.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");e(c.outputLen),e(c.blockLen)}Hr.hash=n;function o(c,f=!0){if(c.destroyed)throw new Error("Hash instance has been destroyed");if(f&&c.finished)throw new Error("Hash#digest() has already been called")}Hr.exists=o;function s(c,f){t(c);const p=f.outputLen;if(c.length<p)throw new Error(`digestInto() expects output buffer of length at least ${p}`)}Hr.output=s;const l={number:e,bool:i,bytes:t,hash:n,exists:o,output:s};return Hr.default=l,Hr}var u_={},Nu={},BN;function KF(){return BN||(BN=1,Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.crypto=void 0,Nu.crypto={node:void 0,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0}),Nu}var UN;function ul(){return UN||(UN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.isLE=e.rotr=e.createView=e.u32=e.u8=void 0;const i=KF(),t=S=>new Uint8Array(S.buffer,S.byteOffset,S.byteLength);e.u8=t;const n=S=>new Uint32Array(S.buffer,S.byteOffset,Math.floor(S.byteLength/4));e.u32=n;const o=S=>new DataView(S.buffer,S.byteOffset,S.byteLength);e.createView=o;const s=(S,v)=>S<<32-v|S>>>v;if(e.rotr=s,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,!e.isLE)throw new Error("Non little-endian hardware is not supported");const l=Array.from({length:256},(S,v)=>v.toString(16).padStart(2,"0"));function c(S){if(!(S instanceof Uint8Array))throw new Error("Uint8Array expected");let v="";for(let T=0;T<S.length;T++)v+=l[S[T]];return v}e.bytesToHex=c;function f(S){if(typeof S!="string")throw new TypeError("hexToBytes: expected string, got "+typeof S);if(S.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const v=new Uint8Array(S.length/2);for(let T=0;T<v.length;T++){const j=T*2,V=S.slice(j,j+2),W=Number.parseInt(V,16);if(Number.isNaN(W)||W<0)throw new Error("Invalid byte sequence");v[T]=W}return v}e.hexToBytes=f;const p=async()=>{};e.nextTick=p;async function y(S,v,T){let j=Date.now();for(let V=0;V<S;V++){T(V);const W=Date.now()-j;W>=0&&W<v||(await(0,e.nextTick)(),j+=W)}}e.asyncLoop=y;function h(S){if(typeof S!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof S}`);return new TextEncoder().encode(S)}e.utf8ToBytes=h;function g(S){if(typeof S=="string"&&(S=h(S)),!(S instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof S})`);return S}e.toBytes=g;function A(...S){if(!S.every(j=>j instanceof Uint8Array))throw new Error("Uint8Array list expected");if(S.length===1)return S[0];const v=S.reduce((j,V)=>j+V.length,0),T=new Uint8Array(v);for(let j=0,V=0;j<S.length;j++){const W=S[j];T.set(W,V),V+=W.length}return T}e.concatBytes=A;class N{clone(){return this._cloneInto()}}e.Hash=N;const R=S=>Object.prototype.toString.call(S)==="[object Object]"&&S.constructor===Object;function O(S,v){if(v!==void 0&&(typeof v!="object"||!R(v)))throw new TypeError("Options should be object or undefined");return Object.assign(S,v)}e.checkOpts=O;function M(S){const v=j=>S().update(g(j)).digest(),T=S();return v.outputLen=T.outputLen,v.blockLen=T.blockLen,v.create=()=>S(),v}e.wrapConstructor=M;function _(S){const v=(j,V)=>S(V).update(g(j)).digest(),T=S({});return v.outputLen=T.outputLen,v.blockLen=T.blockLen,v.create=j=>S(j),v}e.wrapConstructorWithOpts=_;function I(S=32){if(i.crypto.web)return i.crypto.web.getRandomValues(new Uint8Array(S));if(i.crypto.node)return new Uint8Array(i.crypto.node.randomBytes(S).buffer);throw new Error("The environment doesn't have randomBytes function")}e.randomBytes=I})(u_)),u_}var FN;function YF(){return FN||(FN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=void 0;const i=dE(),t=ul();class n extends t.Hash{constructor(l,c){super(),this.finished=!1,this.destroyed=!1,i.default.hash(l);const f=(0,t.toBytes)(c);if(this.iHash=l.create(),typeof this.iHash.update!="function")throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const p=this.blockLen,y=new Uint8Array(p);y.set(f.length>p?l.create().update(f).digest():f);for(let h=0;h<y.length;h++)y[h]^=54;this.iHash.update(y),this.oHash=l.create();for(let h=0;h<y.length;h++)y[h]^=106;this.oHash.update(y),y.fill(0)}update(l){return i.default.exists(this),this.iHash.update(l),this}digestInto(l){i.default.exists(this),i.default.bytes(l,this.outputLen),this.finished=!0,this.iHash.digestInto(l),this.oHash.update(l),this.oHash.digestInto(l),this.destroy()}digest(){const l=new Uint8Array(this.oHash.outputLen);return this.digestInto(l),l}_cloneInto(l){l||(l=Object.create(Object.getPrototypeOf(this),{}));const{oHash:c,iHash:f,finished:p,destroyed:y,blockLen:h,outputLen:g}=this;return l=l,l.finished=p,l.destroyed=y,l.blockLen=h,l.outputLen=g,l.oHash=c._cloneInto(l.oHash),l.iHash=f._cloneInto(l.iHash),l}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const o=(s,l,c)=>new n(s,l).update(c).digest();e.hmac=o,e.hmac.create=(s,l)=>new n(s,l)})(s_)),s_}var qo={},Mu={},VN;function XF(){if(VN)return Mu;VN=1,Object.defineProperty(Mu,"__esModule",{value:!0}),Mu.SHA2=void 0;const e=dE(),i=ul();function t(o,s,l,c){if(typeof o.setBigUint64=="function")return o.setBigUint64(s,l,c);const f=BigInt(32),p=BigInt(4294967295),y=Number(l>>f&p),h=Number(l&p),g=c?4:0,A=c?0:4;o.setUint32(s+g,y,c),o.setUint32(s+A,h,c)}class n extends i.Hash{constructor(s,l,c,f){super(),this.blockLen=s,this.outputLen=l,this.padOffset=c,this.isLE=f,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(s),this.view=(0,i.createView)(this.buffer)}update(s){e.default.exists(this);const{view:l,buffer:c,blockLen:f}=this;s=(0,i.toBytes)(s);const p=s.length;for(let y=0;y<p;){const h=Math.min(f-this.pos,p-y);if(h===f){const g=(0,i.createView)(s);for(;f<=p-y;y+=f)this.process(g,y);continue}c.set(s.subarray(y,y+h),this.pos),this.pos+=h,y+=h,this.pos===f&&(this.process(l,0),this.pos=0)}return this.length+=s.length,this.roundClean(),this}digestInto(s){e.default.exists(this),e.default.output(s,this),this.finished=!0;const{buffer:l,view:c,blockLen:f,isLE:p}=this;let{pos:y}=this;l[y++]=128,this.buffer.subarray(y).fill(0),this.padOffset>f-y&&(this.process(c,0),y=0);for(let R=y;R<f;R++)l[R]=0;t(c,f-8,BigInt(this.length*8),p),this.process(c,0);const h=(0,i.createView)(s),g=this.outputLen;if(g%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const A=g/4,N=this.get();if(A>N.length)throw new Error("_sha2: outputLen bigger than state");for(let R=0;R<A;R++)h.setUint32(4*R,N[R],p)}digest(){const{buffer:s,outputLen:l}=this;this.digestInto(s);const c=s.slice(0,l);return this.destroy(),c}_cloneInto(s){s||(s=new this.constructor),s.set(...this.get());const{blockLen:l,buffer:c,length:f,finished:p,destroyed:y,pos:h}=this;return s.length=f,s.pos=h,s.finished=p,s.destroyed=y,f%l&&s.buffer.set(c),s}}return Mu.SHA2=n,Mu}var HN;function vj(){if(HN)return qo;HN=1,Object.defineProperty(qo,"__esModule",{value:!0}),qo.sha224=qo.sha256=void 0;const e=XF(),i=ul(),t=(p,y,h)=>p&y^~p&h,n=(p,y,h)=>p&y^p&h^y&h,o=new Uint32Array([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]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),l=new Uint32Array(64);class c extends e.SHA2{constructor(){super(64,32,8,!1),this.A=s[0]|0,this.B=s[1]|0,this.C=s[2]|0,this.D=s[3]|0,this.E=s[4]|0,this.F=s[5]|0,this.G=s[6]|0,this.H=s[7]|0}get(){const{A:y,B:h,C:g,D:A,E:N,F:R,G:O,H:M}=this;return[y,h,g,A,N,R,O,M]}set(y,h,g,A,N,R,O,M){this.A=y|0,this.B=h|0,this.C=g|0,this.D=A|0,this.E=N|0,this.F=R|0,this.G=O|0,this.H=M|0}process(y,h){for(let S=0;S<16;S++,h+=4)l[S]=y.getUint32(h,!1);for(let S=16;S<64;S++){const v=l[S-15],T=l[S-2],j=(0,i.rotr)(v,7)^(0,i.rotr)(v,18)^v>>>3,V=(0,i.rotr)(T,17)^(0,i.rotr)(T,19)^T>>>10;l[S]=V+l[S-7]+j+l[S-16]|0}let{A:g,B:A,C:N,D:R,E:O,F:M,G:_,H:I}=this;for(let S=0;S<64;S++){const v=(0,i.rotr)(O,6)^(0,i.rotr)(O,11)^(0,i.rotr)(O,25),T=I+v+t(O,M,_)+o[S]+l[S]|0,V=((0,i.rotr)(g,2)^(0,i.rotr)(g,13)^(0,i.rotr)(g,22))+n(g,A,N)|0;I=_,_=M,M=O,O=R+T|0,R=N,N=A,A=g,g=T+V|0}g=g+this.A|0,A=A+this.B|0,N=N+this.C|0,R=R+this.D|0,O=O+this.E|0,M=M+this.F|0,_=_+this.G|0,I=I+this.H|0,this.set(g,A,N,R,O,M,_,I)}roundClean(){l.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class f extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}return qo.sha256=(0,i.wrapConstructor)(()=>new c),qo.sha224=(0,i.wrapConstructor)(()=>new f),qo}var l_={};const QF={},JF=Object.freeze(Object.defineProperty({__proto__:null,default:QF},Symbol.toStringTag,{value:"Module"})),ZF=CL(JF);var zN;function GN(){return zN||(zN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.schnorr=e.verify=e.signSync=e.sign=e.getSharedSecret=e.recoverPublicKey=e.getPublicKey=e.Signature=e.Point=e.CURVE=void 0;const i=ZF,t=BigInt(0),n=BigInt(1),o=BigInt(2),s=BigInt(3),l=BigInt(8),c=Object.freeze({a:t,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:n,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});e.CURVE=c;const f=(te,F)=>(te+F/o)/F,p={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(te){const{n:F}=c,Z=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),pe=-n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),we=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),Ne=Z,We=BigInt("0x100000000000000000000000000000000"),Ke=f(Ne*te,F),ht=f(-pe*te,F);let ut=q(te-Ke*Z-ht*we,F),vt=q(-Ke*pe-ht*Ne,F);const wt=ut>We,Ot=vt>We;if(wt&&(ut=F-ut),Ot&&(vt=F-vt),ut>We||vt>We)throw new Error("splitScalarEndo: Endomorphism failed, k="+te);return{k1neg:wt,k1:ut,k2neg:Ot,k2:vt}}},y=32,h=32,g=32,A=y+1,N=2*y+1;function R(te){const{a:F,b:Z}=c,pe=q(te*te),we=q(pe*te);return q(we+F*te+Z)}const O=c.a===t;class M extends Error{constructor(F){super(F)}}function _(te){if(!(te instanceof I))throw new TypeError("JacobianPoint expected")}class I{constructor(F,Z,pe){this.x=F,this.y=Z,this.z=pe}static fromAffine(F){if(!(F instanceof T))throw new TypeError("JacobianPoint#fromAffine: expected Point");return F.equals(T.ZERO)?I.ZERO:new I(F.x,F.y,n)}static toAffineBatch(F){const Z=Ie(F.map(pe=>pe.z));return F.map((pe,we)=>pe.toAffine(Z[we]))}static normalizeZ(F){return I.toAffineBatch(F).map(I.fromAffine)}equals(F){_(F);const{x:Z,y:pe,z:we}=this,{x:Ne,y:We,z:Ke}=F,ht=q(we*we),ut=q(Ke*Ke),vt=q(Z*ut),wt=q(Ne*ht),Ot=q(q(pe*Ke)*ut),$t=q(q(We*we)*ht);return vt===wt&&Ot===$t}negate(){return new I(this.x,q(-this.y),this.z)}double(){const{x:F,y:Z,z:pe}=this,we=q(F*F),Ne=q(Z*Z),We=q(Ne*Ne),Ke=F+Ne,ht=q(o*(q(Ke*Ke)-we-We)),ut=q(s*we),vt=q(ut*ut),wt=q(vt-o*ht),Ot=q(ut*(ht-wt)-l*We),$t=q(o*Z*pe);return new I(wt,Ot,$t)}add(F){_(F);const{x:Z,y:pe,z:we}=this,{x:Ne,y:We,z:Ke}=F;if(Ne===t||We===t)return this;if(Z===t||pe===t)return F;const ht=q(we*we),ut=q(Ke*Ke),vt=q(Z*ut),wt=q(Ne*ht),Ot=q(q(pe*Ke)*ut),$t=q(q(We*we)*ht),Qt=q(wt-vt),yr=q($t-Ot);if(Qt===t)return yr===t?this.double():I.ZERO;const Dr=q(Qt*Qt),bn=q(Qt*Dr),kn=q(vt*Dr),Ji=q(yr*yr-bn-o*kn),Rr=q(yr*(kn-Ji)-Ot*bn),pi=q(we*Ke*Qt);return new I(Ji,Rr,pi)}subtract(F){return this.add(F.negate())}multiplyUnsafe(F){const Z=I.ZERO;if(typeof F=="bigint"&&F===t)return Z;let pe=B(F);if(pe===n)return this;if(!O){let wt=Z,Ot=this;for(;pe>t;)pe&n&&(wt=wt.add(Ot)),Ot=Ot.double(),pe>>=n;return wt}let{k1neg:we,k1:Ne,k2neg:We,k2:Ke}=p.splitScalar(pe),ht=Z,ut=Z,vt=this;for(;Ne>t||Ke>t;)Ne&n&&(ht=ht.add(vt)),Ke&n&&(ut=ut.add(vt)),vt=vt.double(),Ne>>=n,Ke>>=n;return we&&(ht=ht.negate()),We&&(ut=ut.negate()),ut=new I(q(ut.x*p.beta),ut.y,ut.z),ht.add(ut)}precomputeWindow(F){const Z=O?128/F+1:256/F+1,pe=[];let we=this,Ne=we;for(let We=0;We<Z;We++){Ne=we,pe.push(Ne);for(let Ke=1;Ke<2**(F-1);Ke++)Ne=Ne.add(we),pe.push(Ne);we=Ne.double()}return pe}wNAF(F,Z){!Z&&this.equals(I.BASE)&&(Z=T.BASE);const pe=Z&&Z._WINDOW_SIZE||1;if(256%pe)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let we=Z&&v.get(Z);we||(we=this.precomputeWindow(pe),Z&&pe!==1&&(we=I.normalizeZ(we),v.set(Z,we)));let Ne=I.ZERO,We=I.BASE;const Ke=1+(O?128/pe:256/pe),ht=2**(pe-1),ut=BigInt(2**pe-1),vt=2**pe,wt=BigInt(pe);for(let Ot=0;Ot<Ke;Ot++){const $t=Ot*ht;let Qt=Number(F&ut);F>>=wt,Qt>ht&&(Qt-=vt,F+=n);const yr=$t,Dr=$t+Math.abs(Qt)-1,bn=Ot%2!==0,kn=Qt<0;Qt===0?We=We.add(S(bn,we[yr])):Ne=Ne.add(S(kn,we[Dr]))}return{p:Ne,f:We}}multiply(F,Z){let pe=B(F),we,Ne;if(O){const{k1neg:We,k1:Ke,k2neg:ht,k2:ut}=p.splitScalar(pe);let{p:vt,f:wt}=this.wNAF(Ke,Z),{p:Ot,f:$t}=this.wNAF(ut,Z);vt=S(We,vt),Ot=S(ht,Ot),Ot=new I(q(Ot.x*p.beta),Ot.y,Ot.z),we=vt.add(Ot),Ne=wt.add($t)}else{const{p:We,f:Ke}=this.wNAF(pe,Z);we=We,Ne=Ke}return I.normalizeZ([we,Ne])[0]}toAffine(F){const{x:Z,y:pe,z:we}=this,Ne=this.equals(I.ZERO);F==null&&(F=Ne?l:ae(we));const We=F,Ke=q(We*We),ht=q(Ke*We),ut=q(Z*Ke),vt=q(pe*ht),wt=q(we*We);if(Ne)return T.ZERO;if(wt!==n)throw new Error("invZ was invalid");return new T(ut,vt)}}I.BASE=new I(c.Gx,c.Gy,n),I.ZERO=new I(t,n,t);function S(te,F){const Z=F.negate();return te?Z:F}const v=new WeakMap;class T{constructor(F,Z){this.x=F,this.y=Z}_setWindowSize(F){this._WINDOW_SIZE=F,v.delete(this)}hasEvenY(){return this.y%o===t}static fromCompressedHex(F){const Z=F.length===32,pe=K(Z?F:F.subarray(1));if(!Le(pe))throw new Error("Point is not on curve");const we=R(pe);let Ne=U(we);const We=(Ne&n)===n;Z?We&&(Ne=q(-Ne)):(F[0]&1)===1!==We&&(Ne=q(-Ne));const Ke=new T(pe,Ne);return Ke.assertValidity(),Ke}static fromUncompressedHex(F){const Z=K(F.subarray(1,y+1)),pe=K(F.subarray(y+1,y*2+1)),we=new T(Z,pe);return we.assertValidity(),we}static fromHex(F){const Z=C(F),pe=Z.length,we=Z[0];if(pe===y)return this.fromCompressedHex(Z);if(pe===A&&(we===2||we===3))return this.fromCompressedHex(Z);if(pe===N&&we===4)return this.fromUncompressedHex(Z);throw new Error(`Point.fromHex: received invalid point. Expected 32-${A} compressed bytes or ${N} uncompressed bytes, not ${pe}`)}static fromPrivateKey(F){return T.BASE.multiply(Qe(F))}static fromSignature(F,Z,pe){const{r:we,s:Ne}=Lt(Z);if(![0,1,2,3].includes(pe))throw new Error("Cannot recover: invalid recovery bit");const We=ke(C(F)),{n:Ke}=c,ht=pe===2||pe===3?we+Ke:we,ut=ae(ht,Ke),vt=q(-We*ut,Ke),wt=q(Ne*ut,Ke),Ot=pe&1?"03":"02",$t=T.fromHex(Ot+je(ht)),Qt=T.BASE.multiplyAndAddUnsafe($t,vt,wt);if(!Qt)throw new Error("Cannot recover signature: point at infinify");return Qt.assertValidity(),Qt}toRawBytes(F=!1){return ie(this.toHex(F))}toHex(F=!1){const Z=je(this.x);return F?`${this.hasEvenY()?"02":"03"}${Z}`:`04${Z}${je(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const F="Point is not on elliptic curve",{x:Z,y:pe}=this;if(!Le(Z)||!Le(pe))throw new Error(F);const we=q(pe*pe),Ne=R(Z);if(q(we-Ne)!==t)throw new Error(F)}equals(F){return this.x===F.x&&this.y===F.y}negate(){return new T(this.x,q(-this.y))}double(){return I.fromAffine(this).double().toAffine()}add(F){return I.fromAffine(this).add(I.fromAffine(F)).toAffine()}subtract(F){return this.add(F.negate())}multiply(F){return I.fromAffine(this).multiply(F,this).toAffine()}multiplyAndAddUnsafe(F,Z,pe){const we=I.fromAffine(this),Ne=Z===t||Z===n||this!==T.BASE?we.multiplyUnsafe(Z):we.multiply(Z),We=I.fromAffine(F).multiplyUnsafe(pe),Ke=Ne.add(We);return Ke.equals(I.ZERO)?void 0:Ke.toAffine()}}e.Point=T,T.BASE=new T(c.Gx,c.Gy),T.ZERO=new T(t,t);function j(te){return Number.parseInt(te[0],16)>=8?"00"+te:te}function V(te){if(te.length<2||te[0]!==2)throw new Error(`Invalid signature integer tag: ${Se(te)}`);const F=te[1],Z=te.subarray(2,F+2);if(!F||Z.length!==F)throw new Error("Invalid signature integer: wrong length");if(Z[0]===0&&Z[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:K(Z),left:te.subarray(F+2)}}function W(te){if(te.length<2||te[0]!=48)throw new Error(`Invalid signature tag: ${Se(te)}`);if(te[1]!==te.length-2)throw new Error("Invalid signature: incorrect length");const{data:F,left:Z}=V(te.subarray(2)),{data:pe,left:we}=V(Z);if(we.length)throw new Error(`Invalid signature: left bytes after parsing: ${Se(we)}`);return{r:F,s:pe}}class X{constructor(F,Z){this.r=F,this.s=Z,this.assertValidity()}static fromCompact(F){const Z=F instanceof Uint8Array,pe="Signature.fromCompact";if(typeof F!="string"&&!Z)throw new TypeError(`${pe}: Expected string or Uint8Array`);const we=Z?Se(F):F;if(we.length!==128)throw new Error(`${pe}: Expected 64-byte hex`);return new X(ge(we.slice(0,64)),ge(we.slice(64,128)))}static fromDER(F){const Z=F instanceof Uint8Array;if(typeof F!="string"&&!Z)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:pe,s:we}=W(Z?F:ie(F));return new X(pe,we)}static fromHex(F){return this.fromDER(F)}assertValidity(){const{r:F,s:Z}=this;if(!Re(F))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Re(Z))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const F=c.n>>n;return this.s>F}normalizeS(){return this.hasHighS()?new X(this.r,q(-this.s,c.n)):this}toDERRawBytes(){return ie(this.toDERHex())}toDERHex(){const F=j(Oe(this.s)),Z=j(Oe(this.r)),pe=F.length/2,we=Z.length/2,Ne=Oe(pe),We=Oe(we);return`30${Oe(we+pe+4)}02${We}${Z}02${Ne}${F}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return ie(this.toCompactHex())}toCompactHex(){return je(this.r)+je(this.s)}}e.Signature=X;function fe(...te){if(!te.every(pe=>pe instanceof Uint8Array))throw new Error("Uint8Array list expected");if(te.length===1)return te[0];const F=te.reduce((pe,we)=>pe+we.length,0),Z=new Uint8Array(F);for(let pe=0,we=0;pe<te.length;pe++){const Ne=te[pe];Z.set(Ne,we),we+=Ne.length}return Z}const Ae=Array.from({length:256},(te,F)=>F.toString(16).padStart(2,"0"));function Se(te){if(!(te instanceof Uint8Array))throw new Error("Expected Uint8Array");let F="";for(let Z=0;Z<te.length;Z++)F+=Ae[te[Z]];return F}const Ee=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function je(te){if(typeof te!="bigint")throw new Error("Expected bigint");if(!(t<=te&&te<Ee))throw new Error("Expected number 0 <= n < 2^256");return te.toString(16).padStart(64,"0")}function Ce(te){const F=ie(je(te));if(F.length!==32)throw new Error("Error: expected 32 bytes");return F}function Oe(te){const F=te.toString(16);return F.length&1?`0${F}`:F}function ge(te){if(typeof te!="string")throw new TypeError("hexToNumber: expected string, got "+typeof te);return BigInt(`0x${te}`)}function ie(te){if(typeof te!="string")throw new TypeError("hexToBytes: expected string, got "+typeof te);if(te.length%2)throw new Error("hexToBytes: received invalid unpadded hex"+te.length);const F=new Uint8Array(te.length/2);for(let Z=0;Z<F.length;Z++){const pe=Z*2,we=te.slice(pe,pe+2),Ne=Number.parseInt(we,16);if(Number.isNaN(Ne)||Ne<0)throw new Error("Invalid byte sequence");F[Z]=Ne}return F}function K(te){return ge(Se(te))}function C(te){return te instanceof Uint8Array?Uint8Array.from(te):ie(te)}function B(te){if(typeof te=="number"&&Number.isSafeInteger(te)&&te>0)return BigInt(te);if(typeof te=="bigint"&&Re(te))return te;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function q(te,F=c.P){const Z=te%F;return Z>=t?Z:F+Z}function L(te,F){const{P:Z}=c;let pe=te;for(;F-- >t;)pe*=pe,pe%=Z;return pe}function U(te){const{P:F}=c,Z=BigInt(6),pe=BigInt(11),we=BigInt(22),Ne=BigInt(23),We=BigInt(44),Ke=BigInt(88),ht=te*te*te%F,ut=ht*ht*te%F,vt=L(ut,s)*ut%F,wt=L(vt,s)*ut%F,Ot=L(wt,o)*ht%F,$t=L(Ot,pe)*Ot%F,Qt=L($t,we)*$t%F,yr=L(Qt,We)*Qt%F,Dr=L(yr,Ke)*yr%F,bn=L(Dr,We)*Qt%F,kn=L(bn,s)*ut%F,Ji=L(kn,Ne)*$t%F,Rr=L(Ji,Z)*ht%F,pi=L(Rr,o);if(pi*pi%F!==te)throw new Error("Cannot find square root");return pi}function ae(te,F=c.P){if(te===t||F<=t)throw new Error(`invert: expected positive integers, got n=${te} mod=${F}`);let Z=q(te,F),pe=F,we=t,Ne=n;for(;Z!==t;){const Ke=pe/Z,ht=pe%Z,ut=we-Ne*Ke;pe=Z,Z=ht,we=Ne,Ne=ut}if(pe!==n)throw new Error("invert: does not exist");return q(we,F)}function Ie(te,F=c.P){const Z=new Array(te.length),pe=te.reduce((Ne,We,Ke)=>We===t?Ne:(Z[Ke]=Ne,q(Ne*We,F)),n),we=ae(pe,F);return te.reduceRight((Ne,We,Ke)=>We===t?Ne:(Z[Ke]=q(Ne*Z[Ke],F),q(Ne*We,F)),we),Z}function Te(te){const F=te.length*8-h*8,Z=K(te);return F>0?Z>>BigInt(F):Z}function ke(te,F=!1){const Z=Te(te);if(F)return Z;const{n:pe}=c;return Z>=pe?Z-pe:Z}let Me,ue;class de{constructor(F,Z){if(this.hashLen=F,this.qByteLen=Z,typeof F!="number"||F<2)throw new Error("hashLen must be a number");if(typeof Z!="number"||Z<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(F).fill(1),this.k=new Uint8Array(F).fill(0),this.counter=0}hmac(...F){return e.utils.hmacSha256(this.k,...F)}hmacSync(...F){return ue(this.k,...F)}checkSync(){if(typeof ue!="function")throw new M("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(F=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),F),this.v=await this.hmac(this.v),F.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),F),this.v=await this.hmac(this.v))}reseedSync(F=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),F),this.v=this.hmacSync(this.v),F.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),F),this.v=this.hmacSync(this.v))}async generate(){this.incr();let F=0;const Z=[];for(;F<this.qByteLen;){this.v=await this.hmac(this.v);const pe=this.v.slice();Z.push(pe),F+=this.v.length}return fe(...Z)}generateSync(){this.checkSync(),this.incr();let F=0;const Z=[];for(;F<this.qByteLen;){this.v=this.hmacSync(this.v);const pe=this.v.slice();Z.push(pe),F+=this.v.length}return fe(...Z)}}function Re(te){return t<te&&te<c.n}function Le(te){return t<te&&te<c.P}function Ye(te,F,Z,pe=!0){const{n:we}=c,Ne=ke(te,!0);if(!Re(Ne))return;const We=ae(Ne,we),Ke=T.BASE.multiply(Ne),ht=q(Ke.x,we);if(ht===t)return;const ut=q(We*q(F+Z*ht,we),we);if(ut===t)return;let vt=new X(ht,ut),wt=(Ke.x===vt.r?0:2)|Number(Ke.y&n);return pe&&vt.hasHighS()&&(vt=vt.normalizeS(),wt^=1),{sig:vt,recovery:wt}}function Qe(te){let F;if(typeof te=="bigint")F=te;else if(typeof te=="number"&&Number.isSafeInteger(te)&&te>0)F=BigInt(te);else if(typeof te=="string"){if(te.length!==2*h)throw new Error("Expected 32 bytes of private key");F=ge(te)}else if(te instanceof Uint8Array){if(te.length!==h)throw new Error("Expected 32 bytes of private key");F=K(te)}else throw new TypeError("Expected valid private key");if(!Re(F))throw new Error("Expected private key: 0 < key < n");return F}function Vt(te){return te instanceof T?(te.assertValidity(),te):T.fromHex(te)}function Lt(te){if(te instanceof X)return te.assertValidity(),te;try{return X.fromDER(te)}catch{return X.fromCompact(te)}}function rr(te,F=!1){return T.fromPrivateKey(te).toRawBytes(F)}e.getPublicKey=rr;function Ut(te,F,Z,pe=!1){return T.fromSignature(te,F,Z).toRawBytes(pe)}e.recoverPublicKey=Ut;function Ft(te){const F=te instanceof Uint8Array,Z=typeof te=="string",pe=(F||Z)&&te.length;return F?pe===A||pe===N:Z?pe===A*2||pe===N*2:te instanceof T}function zr(te,F,Z=!1){if(Ft(te))throw new TypeError("getSharedSecret: first arg must be private key");if(!Ft(F))throw new TypeError("getSharedSecret: second arg must be public key");const pe=Vt(F);return pe.assertValidity(),pe.multiply(Qe(te)).toRawBytes(Z)}e.getSharedSecret=zr;function or(te){const F=te.length>y?te.slice(0,y):te;return K(F)}function gn(te){const F=or(te),Z=q(F,c.n);return Jr(Z<t?F:Z)}function Jr(te){return Ce(te)}function Zr(te,F,Z){if(te==null)throw new Error(`sign: expected valid message hash, not "${te}"`);const pe=C(te),we=Qe(F),Ne=[Jr(we),gn(pe)];if(Z!=null){Z===!0&&(Z=e.utils.randomBytes(y));const ht=C(Z);if(ht.length!==y)throw new Error(`sign: Expected ${y} bytes of extra data`);Ne.push(ht)}const We=fe(...Ne),Ke=or(pe);return{seed:We,m:Ke,d:we}}function cn(te,F){const{sig:Z,recovery:pe}=te,{der:we,recovered:Ne}=Object.assign({canonical:!0,der:!0},F),We=we?Z.toDERRawBytes():Z.toCompactRawBytes();return Ne?[We,pe]:We}async function sr(te,F,Z={}){const{seed:pe,m:we,d:Ne}=Zr(te,F,Z.extraEntropy),We=new de(g,h);await We.reseed(pe);let Ke;for(;!(Ke=Ye(await We.generate(),we,Ne,Z.canonical));)await We.reseed();return cn(Ke,Z)}e.sign=sr;function dn(te,F,Z={}){const{seed:pe,m:we,d:Ne}=Zr(te,F,Z.extraEntropy),We=new de(g,h);We.reseedSync(pe);let Ke;for(;!(Ke=Ye(We.generateSync(),we,Ne,Z.canonical));)We.reseedSync();return cn(Ke,Z)}e.signSync=dn;const Pr={strict:!0};function vn(te,F,Z,pe=Pr){let we;try{we=Lt(te),F=C(F)}catch{return!1}const{r:Ne,s:We}=we;if(pe.strict&&we.hasHighS())return!1;const Ke=ke(F);let ht;try{ht=Vt(Z)}catch{return!1}const{n:ut}=c,vt=ae(We,ut),wt=q(Ke*vt,ut),Ot=q(Ne*vt,ut),$t=T.BASE.multiplyAndAddUnsafe(ht,wt,Ot);return $t?q($t.x,ut)===Ne:!1}e.verify=vn;function xr(te){return q(K(te),c.n)}class _n{constructor(F,Z){this.r=F,this.s=Z,this.assertValidity()}static fromHex(F){const Z=C(F);if(Z.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${Z.length}`);const pe=K(Z.subarray(0,32)),we=K(Z.subarray(32,64));return new _n(pe,we)}assertValidity(){const{r:F,s:Z}=this;if(!Le(F)||!Re(Z))throw new Error("Invalid signature")}toHex(){return je(this.r)+je(this.s)}toRawBytes(){return ie(this.toHex())}}function $r(te){return T.fromPrivateKey(te).toRawX()}class Qi{constructor(F,Z,pe=e.utils.randomBytes()){if(F==null)throw new TypeError(`sign: Expected valid message, not "${F}"`);this.m=C(F);const{x:we,scalar:Ne}=this.getScalar(Qe(Z));if(this.px=we,this.d=Ne,this.rand=C(pe),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(F){const Z=T.fromPrivateKey(F),pe=Z.hasEvenY()?F:c.n-F;return{point:Z,scalar:pe,x:Z.toRawX()}}initNonce(F,Z){return Ce(F^K(Z))}finalizeNonce(F){const Z=q(K(F),c.n);if(Z===t)throw new Error("sign: Creation of signature failed. k is zero");const{point:pe,x:we,scalar:Ne}=this.getScalar(Z);return{R:pe,rx:we,k:Ne}}finalizeSig(F,Z,pe,we){return new _n(F.x,q(Z+pe*we,c.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:F,d:Z,px:pe,rand:we}=this,Ne=e.utils.taggedHash,We=this.initNonce(Z,await Ne(Gr.aux,we)),{R:Ke,rx:ht,k:ut}=this.finalizeNonce(await Ne(Gr.nonce,We,pe,F)),vt=xr(await Ne(Gr.challenge,ht,pe,F)),wt=this.finalizeSig(Ke,ut,vt,Z);return await Ii(wt,F,pe)||this.error(),wt}calcSync(){const{m:F,d:Z,px:pe,rand:we}=this,Ne=e.utils.taggedHashSync,We=this.initNonce(Z,Ne(Gr.aux,we)),{R:Ke,rx:ht,k:ut}=this.finalizeNonce(Ne(Gr.nonce,We,pe,F)),vt=xr(Ne(Gr.challenge,ht,pe,F)),wt=this.finalizeSig(Ke,ut,vt,Z);return Ir(wt,F,pe)||this.error(),wt}}async function En(te,F,Z){return new Qi(te,F,Z).calc()}function Oi(te,F,Z){return new Qi(te,F,Z).calcSync()}function Pi(te,F,Z){const pe=te instanceof _n,we=pe?te:_n.fromHex(te);return pe&&we.assertValidity(),{...we,m:C(F),P:Vt(Z)}}function fi(te,F,Z,pe){const we=T.BASE.multiplyAndAddUnsafe(F,Qe(Z),q(-pe,c.n));return!(!we||!we.hasEvenY()||we.x!==te)}async function Ii(te,F,Z){try{const{r:pe,s:we,m:Ne,P:We}=Pi(te,F,Z),Ke=xr(await e.utils.taggedHash(Gr.challenge,Ce(pe),We.toRawX(),Ne));return fi(pe,We,we,Ke)}catch{return!1}}function Ir(te,F,Z){try{const{r:pe,s:we,m:Ne,P:We}=Pi(te,F,Z),Ke=xr(e.utils.taggedHashSync(Gr.challenge,Ce(pe),We.toRawX(),Ne));return fi(pe,We,we,Ke)}catch(pe){if(pe instanceof M)throw pe;return!1}}e.schnorr={Signature:_n,getPublicKey:$r,sign:En,verify:Ii,signSync:Oi,verifySync:Ir},T.BASE._setWindowSize(8);const At={node:i,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},Gr={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},en={};e.utils={bytesToHex:Se,hexToBytes:ie,concatBytes:fe,mod:q,invert:ae,isValidPrivateKey(te){try{return Qe(te),!0}catch{return!1}},_bigintTo32Bytes:Ce,_normalizePrivateKey:Qe,hashToPrivateKey:te=>{te=C(te);const F=h+8;if(te.length<F||te.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const Z=q(K(te),c.n-n)+n;return Ce(Z)},randomBytes:(te=32)=>{if(At.web)return At.web.getRandomValues(new Uint8Array(te));if(At.node){const{randomBytes:F}=At.node;return Uint8Array.from(F(te))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(h+8)),precompute(te=8,F=T.BASE){const Z=F===T.BASE?F:new T(F.x,F.y);return Z._setWindowSize(te),Z.multiply(s),Z},sha256:async(...te)=>{if(At.web){const F=await At.web.subtle.digest("SHA-256",fe(...te));return new Uint8Array(F)}else if(At.node){const{createHash:F}=At.node,Z=F("sha256");return te.forEach(pe=>Z.update(pe)),Uint8Array.from(Z.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(te,...F)=>{if(At.web){const Z=await At.web.subtle.importKey("raw",te,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),pe=fe(...F),we=await At.web.subtle.sign("HMAC",Z,pe);return new Uint8Array(we)}else if(At.node){const{createHmac:Z}=At.node,pe=Z("sha256",te);return F.forEach(we=>pe.update(we)),Uint8Array.from(pe.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(te,...F)=>{let Z=en[te];if(Z===void 0){const pe=await e.utils.sha256(Uint8Array.from(te,we=>we.charCodeAt(0)));Z=fe(pe,pe),en[te]=Z}return e.utils.sha256(Z,...F)},taggedHashSync:(te,...F)=>{if(typeof Me!="function")throw new M("sha256Sync is undefined, you need to set it");let Z=en[te];if(Z===void 0){const pe=Me(Uint8Array.from(te,we=>we.charCodeAt(0)));Z=fe(pe,pe),en[te]=Z}return Me(Z,...F)},_JacobianPoint:I},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get(){return Me},set(te){Me||(Me=te)}},hmacSha256Sync:{configurable:!1,get(){return ue},set(te){ue||(ue=te)}}})})(l_)),l_}var WN;function fE(){return WN||(WN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.schnorr=e.Signature=e.Point=e.CURVE=e.utils=e.getSharedSecret=e.recoverPublicKey=e.verify=e.signSync=e.sign=e.getPublicKey=void 0;const i=YF(),t=vj(),n=GN();var o=GN();Object.defineProperty(e,"getPublicKey",{enumerable:!0,get:function(){return o.getPublicKey}}),Object.defineProperty(e,"sign",{enumerable:!0,get:function(){return o.sign}}),Object.defineProperty(e,"signSync",{enumerable:!0,get:function(){return o.signSync}}),Object.defineProperty(e,"verify",{enumerable:!0,get:function(){return o.verify}}),Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return o.recoverPublicKey}}),Object.defineProperty(e,"getSharedSecret",{enumerable:!0,get:function(){return o.getSharedSecret}}),Object.defineProperty(e,"utils",{enumerable:!0,get:function(){return o.utils}}),Object.defineProperty(e,"CURVE",{enumerable:!0,get:function(){return o.CURVE}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return o.Point}}),Object.defineProperty(e,"Signature",{enumerable:!0,get:function(){return o.Signature}}),Object.defineProperty(e,"schnorr",{enumerable:!0,get:function(){return o.schnorr}}),n.utils.hmacSha256Sync=(s,...l)=>{const c=i.hmac.create(t.sha256,s);return l.forEach(f=>c.update(f)),c.digest()}})(o_)),o_}var gt={};function KN(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var rl={exports:{}},YN=rl.exports,XN;function _j(){return XN||(XN=1,(function(e,i){var t=YN&&YN.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(i,"__esModule",{value:!0}),i.crypto=i.wrapHash=i.equalsBytes=i.hexToBytes=i.bytesToUtf8=i.utf8ToBytes=i.createView=i.concatBytes=i.toHex=i.bytesToHex=i.assertBytes=i.assertBool=void 0;const n=t(dE()),o=ul(),s=n.default.bool;i.assertBool=s;const l=n.default.bytes;i.assertBytes=l;var c=ul();Object.defineProperty(i,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(i,"toHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(i,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(i,"createView",{enumerable:!0,get:function(){return c.createView}}),Object.defineProperty(i,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}});function f(g){if(!(g instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof g}`);return new TextDecoder().decode(g)}i.bytesToUtf8=f;function p(g){const A=g.startsWith("0x")?g.substring(2):g;return(0,o.hexToBytes)(A)}i.hexToBytes=p;function y(g,A){if(g.length!==A.length)return!1;for(let N=0;N<g.length;N++)if(g[N]!==A[N])return!1;return!0}i.equalsBytes=y;function h(g){return A=>(n.default.bytes(A),g(A))}i.wrapHash=h,i.crypto=(()=>{const g=typeof self=="object"&&"crypto"in self?self.crypto:void 0,A=typeof KN=="function"&&KN.bind(e);return{node:A&&!g?A("crypto"):void 0,web:g}})()})(rl,rl.exports)),rl.exports}var QN;function xF(){if(QN)return gt;QN=1;var e=gt&&gt.__createBinding||(Object.create?(function(ie,K,C,B){B===void 0&&(B=C);var q=Object.getOwnPropertyDescriptor(K,C);(!q||("get"in q?!K.__esModule:q.writable||q.configurable))&&(q={enumerable:!0,get:function(){return K[C]}}),Object.defineProperty(ie,B,q)}):(function(ie,K,C,B){B===void 0&&(B=C),ie[B]=K[C]})),i=gt&&gt.__setModuleDefault||(Object.create?(function(ie,K){Object.defineProperty(ie,"default",{enumerable:!0,value:K})}):function(ie,K){ie.default=K}),t=gt&&gt.__importStar||function(ie){if(ie&&ie.__esModule)return ie;var K={};if(ie!=null)for(var C in ie)C!=="default"&&Object.prototype.hasOwnProperty.call(ie,C)&&e(K,ie,C);return i(K,ie),K};Object.defineProperty(gt,"__esModule",{value:!0}),gt.contextRandomize=gt.ecdh=gt.signatureNormalize=gt.signatureImport=gt.signatureExport=gt.privateKeyTweakMul=gt.publicKeyTweakMul=gt.publicKeyTweakAdd=gt.publicKeyCombine=gt.publicKeyNegate=gt.privateKeyNegate=gt.privateKeyTweakAdd=gt.ecdsaVerify=gt.ecdsaRecover=gt.ecdsaSign=gt.publicKeyConvert=gt.publicKeyVerify=gt.publicKeyCreate=gt.privateKeyVerify=gt.createPrivateKey=gt.createPrivateKeySync=void 0;const n=vj(),o=t(fE()),s=_j();function l(ie){if(typeof ie!="string")throw new TypeError("hexToNumber: expected string, got "+typeof ie);return BigInt(`0x${ie}`)}const c=ie=>l((0,s.toHex)(ie)),f=ie=>ie.toString(16).padStart(64,"0"),p=ie=>(0,s.hexToBytes)(f(ie)),{mod:y}=o.utils,h=o.CURVE.n;function g(ie=B=>new Uint8Array(B),K,C){return typeof ie=="function"&&(ie=ie(K)),(0,s.assertBytes)(ie,K),C&&ie.set(C),ie}function A(ie){return(0,s.assertBytes)(ie,64),o.Signature.fromCompact(ie)}function N(){return o.utils.randomPrivateKey()}gt.createPrivateKeySync=N;async function R(){return N()}gt.createPrivateKey=R;function O(ie){return(0,s.assertBytes)(ie,32),o.utils.isValidPrivateKey(ie)}gt.privateKeyVerify=O;function M(ie,K=!0,C){(0,s.assertBytes)(ie,32),(0,s.assertBool)(K);const B=o.getPublicKey(ie,K);return g(C,K?33:65,B)}gt.publicKeyCreate=M;function _(ie){(0,s.assertBytes)(ie,33,65);try{return o.Point.fromHex(ie),!0}catch{return!1}}gt.publicKeyVerify=_;function I(ie,K=!0,C){(0,s.assertBytes)(ie,33,65),(0,s.assertBool)(K);const B=o.Point.fromHex(ie).toRawBytes(K);return g(C,K?33:65,B)}gt.publicKeyConvert=I;function S(ie,K,C={noncefn:void 0,data:void 0},B){if((0,s.assertBytes)(ie,32),(0,s.assertBytes)(K,32),typeof C!="object"||C===null)throw new TypeError("secp256k1.ecdsaSign: options should be object");if(C&&(C.noncefn!==void 0||C.data!==void 0))throw new Error("Secp256k1: noncefn && data is unsupported");const[q,L]=o.signSync(ie,K,{recovered:!0,der:!1});return{signature:g(B,64,q),recid:L}}gt.ecdsaSign=S;function v(ie,K,C,B=!0,q){(0,s.assertBytes)(C,32),(0,s.assertBool)(B);const L=A(ie).toHex(),U=o.Point.fromSignature(C,L,K);return g(q,B?33:65,U.toRawBytes(B))}gt.ecdsaRecover=v;function T(ie,K,C){(0,s.assertBytes)(ie,64),(0,s.assertBytes)(K,32),(0,s.assertBytes)(C,33,65),(0,s.assertBytes)(ie,64);const B=c(ie.slice(0,32)),q=c(ie.slice(32,64));if(B>=h||q>=h)throw new Error("Cannot parse signature");const L=o.Point.fromHex(C);let U;try{U=A(ie)}catch{return!1}return o.verify(U,K,L)}gt.ecdsaVerify=T;function j(ie,K){(0,s.assertBytes)(ie,32),(0,s.assertBytes)(K,32);let C=c(K);if(C===0n)throw new Error("Tweak must not be zero");if(C>=h)throw new Error("Tweak bigger than curve order");if(C+=c(ie),C>=h&&(C-=h),C===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return ie.set((0,s.hexToBytes)(f(C))),ie}gt.privateKeyTweakAdd=j;function V(ie){(0,s.assertBytes)(ie,32);const K=y(-c(ie),h);return ie.set((0,s.hexToBytes)(f(K))),ie}gt.privateKeyNegate=V;function W(ie,K=!0,C){(0,s.assertBytes)(ie,33,65),(0,s.assertBool)(K);const B=o.Point.fromHex(ie).negate();return g(C,K?33:65,B.toRawBytes(K))}gt.publicKeyNegate=W;function X(ie,K=!0,C){if(!Array.isArray(ie)||!ie.length)throw new TypeError(`Expected array with one or more items, not ${ie}`);for(const q of ie)(0,s.assertBytes)(q,33,65);(0,s.assertBool)(K);const B=ie.map(q=>o.Point.fromHex(q)).reduce((q,L)=>q.add(L),o.Point.ZERO);if(B.equals(o.Point.ZERO))throw new Error("Combined result must not be zero");return g(C,K?33:65,B.toRawBytes(K))}gt.publicKeyCombine=X;function fe(ie,K,C=!0,B){(0,s.assertBytes)(ie,33,65),(0,s.assertBytes)(K,32),(0,s.assertBool)(C);const q=o.Point.fromHex(ie),L=o.Point.fromPrivateKey(K),U=q.add(L);if(L.equals(o.Point.ZERO)||U.equals(o.Point.ZERO))throw new Error("Tweak must not be zero");return g(B,C?33:65,U.toRawBytes(C))}gt.publicKeyTweakAdd=fe;function Ae(ie,K,C=!0,B){(0,s.assertBytes)(ie,33,65),(0,s.assertBytes)(K,32),(0,s.assertBool)(C);const q=c(K);if(q===0n)throw new Error("Tweak must not be zero");if(q<=1||q>=h)throw new Error("Tweak is zero or bigger than curve order");const L=o.Point.fromHex(ie).multiply(q);return g(B,C?33:65,L.toRawBytes(C))}gt.publicKeyTweakMul=Ae;function Se(ie,K){(0,s.assertBytes)(ie,32),(0,s.assertBytes)(K,32);const C=c(K);if(C<=1||C>=h)throw new Error("Tweak is zero or bigger than curve order");const B=y(C*c(ie),h);if(B===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return ie.set((0,s.hexToBytes)(f(B))),ie}gt.privateKeyTweakMul=Se;function Ee(ie,K){const C=A(ie).toRawBytes();return g(K,72,A(ie).toRawBytes()).slice(0,C.length)}gt.signatureExport=Ee;function je(ie,K){(0,s.assertBytes)(ie);const C=o.Signature.fromDER(ie);return g(K,64,(0,s.hexToBytes)(C.toCompactHex()))}gt.signatureImport=je;function Ce(ie){const K=A(ie);return K.s>h/2n&&ie.set(p(h-K.s),32),ie}gt.signatureNormalize=Ce;function Oe(ie,K,C={},B){if((0,s.assertBytes)(ie,33,65),(0,s.assertBytes)(K,32),typeof C!="object"||C===null)throw new TypeError("secp256k1.ecdh: options should be object");C.data!==void 0&&(0,s.assertBytes)(C.data);const q=o.Point.fromHex(o.getSharedSecret(K,ie));if(C.hashfn===void 0)return g(B,32,(0,n.sha256)(q.toRawBytes(!0)));if(typeof C.hashfn!="function")throw new TypeError("secp256k1.ecdh: options.hashfn should be function");C.xbuf!==void 0&&(0,s.assertBytes)(C.xbuf,32),C.ybuf!==void 0&&(0,s.assertBytes)(C.ybuf,32),(0,s.assertBytes)(B,32);const L=C.xbuf||new Uint8Array(32);L.set(p(q.x));const U=C.ybuf||new Uint8Array(32);U.set(p(q.y));const ae=C.hashfn(L,U,C.data);if(!(ae instanceof Uint8Array)||ae.length!==32)throw new Error("secp256k1.ecdh: invalid options.hashfn output");return g(B,32,ae)}gt.ecdh=Oe;function ge(ie){ie!==null&&(0,s.assertBytes)(ie,32)}return gt.contextRandomize=ge,gt}var JN;function Ej(){if(JN)return Lr;JN=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.createUnsafeIdentity=Lr.computeAddress=Lr.ethSign=Lr.createEthereumMessageHash=Lr.sign=Lr.recoverAddressFromEthSignature=Lr.recoverPublicKey=void 0;const e=Jd(),i=fE(),t=xF();function n(h,g){if(h.length!==65)throw new Error("Invalid signature length"+h.length);const A=h.slice(0,h.length-1),N=h[64]===28?1:0;return(0,t.ecdsaRecover)(A,N,g,!1).slice(1)}Lr.recoverPublicKey=n;function o(h){if(h.length!==65)throw new Error("Invalid ethereum signature");const g=h[64];if(g===0||g===1){const A=new Uint8Array(h);return A[64]=g+27,A}return h}function s(h,g){if(typeof h=="string"){if((0,e.isHex)(h))return s((0,e.hexToBytes)(h),g);throw new Error("String signatures must be encoded in hex")}return p(n(o(h),c(g)))}Lr.recoverAddressFromEthSignature=s;function l(h,g){const A=(0,t.ecdsaSign)(g,h),N=A.recid===1?"1c":"1b";return(0,e.toHex)(A.signature)+N}Lr.sign=l;function c(h){const g=typeof h=="string"?(0,e.stringToUtf8Bytes)(h):h,A=(0,e.concatBytes)((0,e.stringToUtf8Bytes)(`Ethereum Signed Message:
20
- `),(0,e.stringToUtf8Bytes)(String(g.length)),g);return(0,e.hexToBytes)((0,e.sha3)(A))}Lr.createEthereumMessageHash=c;function f(h,g){return l(h,c(g))}Lr.ethSign=f;function p(h){const g=h.length===65&&h[0]===4?h.slice(1):h;return(0,e.getAddress)((0,e.sha3)(g).substring(24))}Lr.computeAddress=p;function y(){const h=i.utils.randomPrivateKey(),g=(0,i.getPublicKey)(h).slice(1),A=p(g);return{privateKey:(0,e.bytesToHex)(h),publicKey:(0,e.bytesToHex)(g),address:A}}return Lr.createUnsafeIdentity=y,Lr}var ZN;function $F(){return ZN||(ZN=1,(function(e){var i=ti&&ti.__createBinding||(Object.create?(function(W,X,fe,Ae){Ae===void 0&&(Ae=fe);var Se=Object.getOwnPropertyDescriptor(X,fe);(!Se||("get"in Se?!X.__esModule:Se.writable||Se.configurable))&&(Se={enumerable:!0,get:function(){return X[fe]}}),Object.defineProperty(W,Ae,Se)}):(function(W,X,fe,Ae){Ae===void 0&&(Ae=fe),W[Ae]=X[fe]})),t=ti&&ti.__setModuleDefault||(Object.create?(function(W,X){Object.defineProperty(W,"default",{enumerable:!0,value:X})}):function(W,X){W.default=X}),n=ti&&ti.__importStar||function(W){if(W&&W.__esModule)return W;var X={};if(W!=null)for(var fe in W)fe!=="default"&&Object.prototype.hasOwnProperty.call(W,fe)&&i(X,W,fe);return t(X,W),X},o=ti&&ti.__importDefault||function(W){return W&&W.__esModule?W:{default:W}};Object.defineProperty(e,"__esModule",{value:!0}),e.isValidEIP1271Signature=e.parseEmphemeralPayload=e.getSignedIdentitySignatureType=e.getEphemeralSignatureType=e.EIP_1654_SIGNED_ENTITY_VALIDATOR=e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=e.ECDSA_SIGNED_ENTITY_VALIDATOR=e.SIGNER_VALIDATOR=e.Authenticator=e.ERC1654_MAGIC_VALUE=e.VALID_SIGNATURE=void 0;const s=n(Jd()),l=UU(),c=gj(),f=GF(),p=o(WF()),y=Ej();e.VALID_SIGNATURE="VALID_SIGNATURE",e.ERC1654_MAGIC_VALUE="1626ba7e";const h=132;var g;(function(W){async function X(K,C,B,q=Date.now()){let L="";if(!W.isValidAuthChain(C))return{ok:!1,message:"ERROR: Malformed authChain"};for(const ae of C){const Ie=V(ae.type);try{const{nextAuthority:Te}=await Ie(L,ae,{provider:B,dateToValidateExpirationInMillis:q});L=Te||""}catch(Te){return{ok:!1,message:`ERROR. Link type: ${ae.type}. ${Te.message}.`}}}const U=L===K;return{ok:U,message:U?void 0:`ERROR: Invalid final authority. Expected: ${K}. Current ${L}.`}}W.validateSignature=X;function fe(K){for(const[C,B]of K.entries())if(C===0&&B.type!==c.AuthLinkType.SIGNER||B.type===c.AuthLinkType.SIGNER&&C!==0)return!1;return!0}W.isValidAuthChain=fe;function Ae(K){return(0,s.hexToBytes)((0,s.sha3)((0,s.stringToUtf8Bytes)(K)))}W.createEIP1271MessageHash=Ae;function Se(K,C,B){return[{type:c.AuthLinkType.SIGNER,payload:C,signature:""},{type:S(B),payload:K,signature:B}]}W.createSimpleAuthChain=Se;function Ee(K,C,B,q){const L=(0,f.moveMinutes)(B),U=W.getEphemeralMessage(C.address,L),ae=W.createSignature(K,U),Ie=W.createSignature(C,q);return[{type:c.AuthLinkType.SIGNER,payload:K.address,signature:""},{type:c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:U,signature:ae},{type:c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:q,signature:Ie}]}W.createAuthChain=Ee;async function je(K,C,B,q){const L=new Date;L.setMinutes(L.getMinutes()+B);const U=W.getEphemeralMessage(C.address,L),ae=await q(U),Ie=[{type:c.AuthLinkType.SIGNER,payload:K,signature:""},{type:I(ae),payload:U,signature:ae}];return{ephemeralIdentity:C,expiration:L,authChain:Ie}}W.initializeAuthChain=je;function Ce(K,C){const B=W.createSignature(K.ephemeralIdentity,C);return[...K.authChain,{type:c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:C,signature:B}]}W.signPayload=Ce,W.createEthereumMessageHash=y.createEthereumMessageHash;function Oe(K,C){return(0,y.ethSign)((0,s.hexToBytes)(K.privateKey),C)}W.createSignature=Oe;function ge(K){return K.length>0&&K[0].type===c.AuthLinkType.SIGNER?K[0].payload:"Invalid-Owner-Address"}W.ownerAddress=ge;function ie(K,C){return`Decentraland Login
21
- Ephemeral address: ${K}
22
- Expiration: ${C.toISOString()}`}W.getEphemeralMessage=ie})(g=e.Authenticator||(e.Authenticator={}));const A=async(W,X)=>({nextAuthority:X.payload});e.SIGNER_VALIDATOR=A;const N=async(W,X)=>{if(!X.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const fe=(0,y.recoverAddressFromEthSignature)(X.signature,X.payload),Ae=W.toLocaleLowerCase(),Se=fe.toLocaleLowerCase();if(Ae===Se)return{nextAuthority:X.payload};throw new Error(`Invalid signer address. Expected: ${Ae}. Actual: ${Se}`)};e.ECDSA_SIGNED_ENTITY_VALIDATOR=N;const R=async(W,X,fe)=>{if(!X.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:Ae,ephemeralAddress:Se,expiration:Ee}=v(X.payload),je=fe.dateToValidateExpirationInMillis?fe.dateToValidateExpirationInMillis:Date.now();if(Ee>je){const Ce=(0,y.recoverAddressFromEthSignature)(X.signature,Ae),Oe=W.toLocaleLowerCase(),ge=Ce.toLocaleLowerCase();if(Oe===ge)return{nextAuthority:Se};throw new Error(`Invalid signer address. Expected: ${Oe}. Actual: ${ge}`)}throw new Error(`Ephemeral key expired. Expiration: ${Ee}. Test: ${je}`)};e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=R;const O=async(W,X,fe)=>{if(!X.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:Ae,ephemeralAddress:Se,expiration:Ee}=v(X.payload),je=fe?.dateToValidateExpirationInMillis?fe?.dateToValidateExpirationInMillis:Date.now();if(Ee>je&&await j(fe.provider,W,Ae,X.signature,je))return{nextAuthority:Se};throw new Error(`Ephemeral key expired. Expiration: ${Ee}. Test: ${je}`)};e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=O;const M=async(W,X,fe)=>{if(!X.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await j(fe.provider,W,X.payload,X.signature,fe.dateToValidateExpirationInMillis))return{nextAuthority:X.payload};throw new Error("Invalid validation")};e.EIP_1654_SIGNED_ENTITY_VALIDATOR=M;const _=async(W,X)=>({error:"Error Validator."});function I(W){return W.length===h?c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:c.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}e.getEphemeralSignatureType=I;function S(W){return W.length===h?c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:c.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}e.getSignedIdentitySignatureType=S;function v(W){const X=W.replace(/\r/g,""),fe=X.split(`
23
- `),Ae=fe[1].substring(19),Se=fe[2].substring(12),Ee=Date.parse(Se);return{message:X,ephemeralAddress:Ae,expiration:Ee}}e.parseEmphemeralPayload=v;async function T(W,X,fe,Ae){const Se=g.createEIP1271MessageHash(X),Ee=(0,s.hexToBytes)(fe);let je;try{je=(0,s.bytesToHex)(await W.isValidSignature(Se,Ee,Ae))}catch{}if(je===e.ERC1654_MAGIC_VALUE)return!0;const Ce=(0,y.createEthereumMessageHash)(X);try{je=(0,s.bytesToHex)(await W.isValidSignature(Ce,Ee,Ae))}catch{}return je===e.ERC1654_MAGIC_VALUE}e.isValidEIP1271Signature=T;async function j(W,X,fe,Ae,Se){if(!W)throw new Error("Missing provider");const Ee=new s.default(W),je=await(0,l.SignatureValidator)(Ee,X);let Ce=await T(je,fe,Ae);if(Ce)return!0;const Oe=new p.default(Ee);try{const{block:ge}=await Oe.getDate(Se,!1);if(Ce=await T(je,fe,Ae,ge),Ce)return!0}catch(ge){throw new Error(`Invalid validation. Error: ${ge.message}`)}throw new Error(`Invalid validation. Expected: ${e.ERC1654_MAGIC_VALUE}. Actual: ${Ce}`)}function V(W){switch(W){case c.AuthLinkType.SIGNER:return e.SIGNER_VALIDATOR;case c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:return e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR;case c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:return e.ECDSA_SIGNED_ENTITY_VALIDATOR;case c.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL:return e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR;case c.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY:return e.EIP_1654_SIGNED_ENTITY_VALIDATOR;default:return _}}})(ti)),ti}var xN;function eV(){return xN||(xN=1,(function(e){var i=Po&&Po.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Po&&Po.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t($F(),e),t(gj(),e)})(Po)),Po}var w_=eV(),bj=Ej(),tV=fE(),$N=_j();let Sd=null;const rV="ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80";function nV(e){const i=$N.hexToBytes(e),t=tV.getPublicKey(i,!1).slice(1),n=bj.computeAddress(t);return{privateKey:"0x"+e,publicKey:"0x"+$N.bytesToHex(t),address:n}}async function wj(){if(Sd)return Sd;const e=nV(rV),i=bj.createUnsafeIdentity();return Sd={identity:await w_.Authenticator.initializeAuthChain(e.address,i,60,async n=>w_.Authenticator.createSignature(e,n)),address:e.address},console.log("[DEV] Using dev identity:",e.address),Sd}function Dd(){const e=window.location.hostname;return e==="localhost"||e==="127.0.0.1"}const iV=({tabs:e})=>{const{avatar:i,wallet:t,isSignedIn:n,isConnecting:o,signIn:s,signOut:l}=tE(),[c,f]=re.useState(!1),[p,y]=re.useState(null),h=i?.avatar?.snapshots?.face256;return re.useEffect(()=>{Dd()&&wj().then(({address:g})=>y(g))},[]),o?le.jsxs("div",{className:"navbar-container",children:[le.jsx("div",{className:"navbar-bar",children:e}),le.jsx("div",{className:"navbar-bar",children:le.jsx("button",{className:"navbar-button",disabled:!0,children:"Connecting..."})})]}):Dd()?le.jsxs("div",{className:"navbar-container",children:[le.jsx("div",{className:"navbar-bar",children:e}),le.jsx("div",{className:"navbar-bar",children:le.jsxs("div",{className:"navbar-dev-badge",children:["DEV",p&&le.jsxs("span",{className:"navbar-dev-address",children:[p.slice(0,6),"...",p.slice(-4)]})]})})]}):n?le.jsxs("div",{className:"navbar-container",children:[le.jsx("div",{className:"navbar-bar",children:e}),le.jsxs("div",{className:"navbar-bar navbar-user-bar",children:[le.jsx("button",{className:"navbar-avatar-button",onClick:()=>f(!c),children:h?le.jsx("img",{src:h,alt:"Avatar",className:"navbar-avatar"}):le.jsx("span",{className:"navbar-avatar-placeholder",children:t?.slice(2,4).toUpperCase()})}),c&&le.jsxs(le.Fragment,{children:[le.jsx("div",{className:"navbar-backdrop",onClick:()=>f(!1)}),le.jsxs("div",{className:"navbar-menu",children:[le.jsxs("div",{className:"navbar-menu-address",children:[t?.slice(0,6),"...",t?.slice(-4)]}),le.jsx("button",{className:"navbar-menu-item",onClick:()=>{f(!1),l()},children:"Sign Out"})]})]})]})]}):le.jsxs("div",{className:"navbar-container",children:[le.jsx("div",{className:"navbar-bar",children:e}),le.jsx("div",{className:"navbar-bar",children:le.jsxs("button",{className:"navbar-button",onClick:s,children:[le.jsx("span",{className:"navbar-button-icon",children:"👤"}),"Sign In"]})})]})},aV=({activeView:e,onViewChange:i})=>le.jsxs("div",{className:"app-tabs",children:[le.jsx("button",{className:`app-tab ${e==="map"?"app-tab-active":""}`,onClick:()=>i("map"),children:"Map"}),le.jsx("button",{className:`app-tab ${e==="worlds"?"app-tab-active":""}`,onClick:()=>i("worlds"),children:"Worlds"})]}),Sj=re.createContext(null),ga=40,va=8,Tj=-152,Aj=-167,eM=-150,tM=163,rM=-150,nM=158,ii=4,iM=.5,aM=10,pE=1,hE=0,mE=0,oV="https://media.githubusercontent.com/media/genesis-city/parcels/new-client-images/maps/lod-0/3/",sV="#1a1a1a",uV="#1a1a1a",oM={viewport:{centerX:hE,centerY:mE,zoom:pE,width:0,height:0},interaction:{isDragging:!1,dragStartX:0,dragStartY:0,hoveredParcel:null}};function Ds(e,i,t){return Math.max(i,Math.min(t,e))}function lV(e,i){switch(i.type){case"SET_VIEWPORT_SIZE":return{...e,viewport:{...e.viewport,width:i.payload.width,height:i.payload.height}};case"PAN":{const t=Ds(e.viewport.centerX+i.payload.deltaX,eM,tM),n=Ds(e.viewport.centerY+i.payload.deltaY,rM,nM);return{...e,viewport:{...e.viewport,centerX:t,centerY:n}}}case"ZOOM":{const t=Ds(e.viewport.zoom*i.payload.factor,iM,aM);return{...e,viewport:{...e.viewport,zoom:t}}}case"SET_CENTER":return{...e,viewport:{...e.viewport,centerX:Ds(i.payload.x,eM,tM),centerY:Ds(i.payload.y,rM,nM)}};case"SET_ZOOM":return{...e,viewport:{...e.viewport,zoom:Ds(i.payload,iM,aM)}};case"START_DRAG":return{...e,interaction:{...e.interaction,isDragging:!0,dragStartX:i.payload.x,dragStartY:i.payload.y}};case"END_DRAG":return{...e,interaction:{...e.interaction,isDragging:!1}};case"UPDATE_DRAG_START":return{...e,interaction:{...e.interaction,dragStartX:i.payload.x,dragStartY:i.payload.y}};case"SET_HOVERED_PARCEL":return{...e,interaction:{...e.interaction,hoveredParcel:i.payload}};case"RESET_VIEW":return{...e,viewport:{...e.viewport,centerX:hE,centerY:mE,zoom:pE}};default:return e}}function cV({children:e,initialCenter:i,initialZoom:t}){const n={...oM,viewport:{...oM.viewport,centerX:i?.x??hE,centerY:i?.y??mE,zoom:t??pE}},[o,s]=re.useReducer(lV,n);return le.jsx(Sj.Provider,{value:{state:o,dispatch:s},children:e})}const Oj=re.createContext(null),dV="x-identity-auth-chain-",fV="x-identity-timestamp",pV="x-identity-metadata";function sM(e,i,t,n={}){const o=new URL(e).pathname,s={...t,headers:{...hV(t?.method??"get",o,{origin:location.origin,...n},l=>w_.Authenticator.signPayload(i,l)),...t?.headers}};return fetch(e,s)}function hV(e,i,t,n){const o={},s=mV(e,i,JSON.stringify(t),n);return s.authChain.forEach((l,c)=>{o[`${dV}${c}`]=JSON.stringify(l)}),o[fV]=s.timestamp.toString(),o[pV]=s.metadata,o}function mV(e,i,t,n){const o=Date.now(),l=[e.toLowerCase(),i.toLowerCase(),o.toString(),t].join(":").toLowerCase();return{authChain:n(l),metadata:t,timestamp:o}}function yV(e,i){return async function(n,o,s={}){try{if(Dd()){const{identity:l}=await wj();return sM(n,l,o||{},s)}if(i&&e){const l=m_.localStorageGetIdentity(e);if(l&&l.expiration){const c=new Date(l.expiration);if(new Date().getTime()<=c.getTime())return sM(n,l,o||{},s)}}return fetch(n,o)}catch(l){return console.warn("Error in authenticatedFetch, falling back to regular fetch:",l),fetch(n,o)}}}const Pj=()=>{const{wallet:e,isSignedIn:i}=tE();return re.useCallback((n,o,s={})=>yV(e,i)(n,o,s),[e,i])};var c_={},Cu={},d_={},Bo={},uM;function gV(){if(uM)return Bo;uM=1,Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.getEnvFromQueryParam=Bo.getEnvFromTLD=void 0;const e=yE();function i(n){const{host:o}=n;return o.endsWith(".org")||o.endsWith(".co")?e.Env.PRODUCTION:o.endsWith(".today")||o.endsWith(".net")?e.Env.STAGING:o.endsWith(".io")||o.endsWith(".zone")?e.Env.DEVELOPMENT:null}Bo.getEnvFromTLD=i;function t(n){const o=new URLSearchParams(n.search),s=o.get("ENV")||o.get("env");if(s){const l=s.toLowerCase();if((0,e.isEnv)(l))return l}return null}return Bo.getEnvFromQueryParam=t,Bo}var lM;function yE(){return lM||(lM=1,(function(e){var i={};Object.defineProperty(e,"__esModule",{value:!0}),e.getEnv=e.getDefaultEnv=e.parseEnvVar=e.isEnv=e.getEnvList=e.Env=void 0;const t=gV();var n;(function(p){p.DEVELOPMENT="dev",p.STAGING="stg",p.PRODUCTION="prod"})(n=e.Env||(e.Env={}));function o(){return Object.values(n)}e.getEnvList=o;function s(p){return o().includes(p)}e.isEnv=s;function l(p){if(s(p))return p;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${p}", possible values are ${o().map(y=>`"${y}"`).join(", ")}.`)}e.parseEnvVar=l;function c(p={}){const{DCL_DEFAULT_ENV:y,REACT_APP_DCL_DEFAULT_ENV:h,VITE_DCL_DEFAULT_ENV:g,GATSBY_DCL_DEFAULT_ENV:A}=p;if(y&&h&&y!==h)throw new Error("You have defined both DCL_DEFAULT_ENV and REACT_APP_DCL_DEFAULT_ENV with different values");if(y&&g&&y!==g)throw new Error("You have defined both DCL_DEFAULT_ENV and VITE_DCL_DEFAULT_ENV with different values");if(y&&A&&y!==A)throw new Error("You have defined both DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");if(h&&A&&h!==A)throw new Error("You have defined both REACT_APP_DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");return y?l(y):h?l(h):g?l(g):A?l(A):n.PRODUCTION}e.getDefaultEnv=c;function f(p){if(typeof window<"u"){const h=(0,t.getEnvFromQueryParam)(window.location);if(h)return h;const g=(0,t.getEnvFromTLD)(window.location);if(g)return g}return c(typeof p>"u"&&typeof process=="object"&&typeof i=="object"?i:p)}e.getEnv=f})(d_)),d_}var cM;function vV(){if(cM)return Cu;cM=1,Object.defineProperty(Cu,"__esModule",{value:!0}),Cu.createConfig=void 0;const e=yE();function i(t,n){const o=(0,e.getEnv)(n?.systemEnvVariables),s=t[o];return{get:(l,c="")=>{if(!s)throw new Error(`Could not find a config for env=${o}`);return l in s?s[l]:c},is:l=>o===l,getEnv:()=>o}}return Cu.createConfig=i,Cu}var dM;function _V(){return dM||(dM=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getEnv=e.Env=e.createConfig=void 0;var i=vV();Object.defineProperty(e,"createConfig",{enumerable:!0,get:function(){return i.createConfig}});var t=yE();Object.defineProperty(e,"Env",{enumerable:!0,get:function(){return t.Env}}),Object.defineProperty(e,"getEnv",{enumerable:!0,get:function(){return t.getEnv}})})(c_)),c_}var f_=_V();const EV="11155111",bV="development",wV="https://decentraland.zone/auth",SV="https://peer.decentraland.zone",TV="https://mobile-bff.decentraland.zone",AV="true",OV={CHAIN_ID:EV,ENVIRONMENT:bV,AUTH_URL:wV,PEER_URL:SV,MOBILE_BFF_URL:TV,USE_DEV_IDENTITY:AV},PV="1",IV="production",RV="https://decentraland.org/auth",NV="https://peer.decentraland.org",MV="https://mobile-bff.decentraland.org",CV={CHAIN_ID:PV,ENVIRONMENT:IV,AUTH_URL:RV,PEER_URL:NV,MOBILE_BFF_URL:MV},kd=f_.createConfig({[f_.Env.DEVELOPMENT]:OV,[f_.Env.PRODUCTION]:CV},{systemEnvVariables:{REACT_APP_DCL_DEFAULT_ENV:"dev"}}),$d=kd.get("MOBILE_BFF_URL");function gE(e){return{id:e.id,name:e.name,description:e.description||"",color:e.color,tags:e.tags||[],parcels:e.parcels||[],createdAt:new Date(e.createdAt).getTime(),updatedAt:new Date(e.updatedAt).getTime()}}async function jV(e){const t=await(await e(`${$d}/backoffice/scene-groups`)).json();if(!t.ok)throw new Error(t.error||"Failed to fetch scene groups");return(t.data||[]).map(gE)}async function LV(e,i){const n=await(await e(`${$d}/backoffice/scene-groups`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})).json();if(!n.ok||!n.data)throw new Error(n.error||"Failed to create scene group");return gE(n.data)}async function DV(e,i,t){const o=await(await e(`${$d}/backoffice/scene-groups/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json();if(!o.ok||!o.data)throw new Error(o.error||"Failed to update scene group");return gE(o.data)}async function kV(e,i){const n=await(await e(`${$d}/backoffice/scene-groups/${i}`,{method:"DELETE"})).json();if(!n.ok)throw new Error(n.error||"Failed to delete scene group")}const qV={mode:"view",groups:[],selectedParcels:[],selectionColor:null,editingGroupId:null,sidebarOpen:!1,isLoading:!1,error:null};function fM(e,i){return e.x===i.x&&e.y===i.y}function BV(e,i){switch(i.type){case"SET_MODE":return{...e,mode:i.payload,sidebarOpen:i.payload==="groups"?!0:e.sidebarOpen,selectedParcels:i.payload==="groups"?e.selectedParcels:[],selectionColor:i.payload==="groups"?e.selectionColor:null,editingGroupId:i.payload==="groups"?e.editingGroupId:null};case"ADD_GROUP":return{...e,groups:[...e.groups,i.payload],selectedParcels:[],selectionColor:null,isLoading:!1,error:null};case"UPDATE_GROUP":return{...e,groups:e.groups.map(t=>t.id===i.payload.id?i.payload:t),editingGroupId:null,isLoading:!1,error:null};case"DELETE_GROUP":return{...e,groups:e.groups.filter(t=>t.id!==i.payload),editingGroupId:e.editingGroupId===i.payload?null:e.editingGroupId,isLoading:!1,error:null};case"SET_SELECTED_PARCELS":return{...e,selectedParcels:i.payload};case"TOGGLE_PARCEL_SELECTION":{const t=i.payload,n=e.selectedParcels.some(o=>fM(o,t));return{...e,selectedParcels:n?e.selectedParcels.filter(o=>!fM(o,t)):[...e.selectedParcels,t]}}case"CLEAR_SELECTION":return{...e,selectedParcels:[],selectionColor:null};case"SET_EDITING_GROUP":return{...e,editingGroupId:i.payload,sidebarOpen:i.payload!==null?!0:e.sidebarOpen};case"TOGGLE_SIDEBAR":return{...e,sidebarOpen:!e.sidebarOpen};case"SET_SIDEBAR_OPEN":return{...e,sidebarOpen:i.payload};case"SET_SELECTION_COLOR":return{...e,selectionColor:i.payload};case"LOAD_GROUPS":return{...e,groups:i.payload,isLoading:!1,error:null};case"SET_LOADING":return{...e,isLoading:i.payload};case"SET_ERROR":return{...e,error:i.payload,isLoading:!1};default:return e}}function UV({children:e}){const[i,t]=re.useReducer(BV,qV),n=Pj(),{isSignedIn:o}=tE();re.useEffect(()=>{if(!(o||Dd())){t({type:"LOAD_GROUPS",payload:[]});return}(async()=>{t({type:"SET_LOADING",payload:!0});try{const y=await jV(n);t({type:"LOAD_GROUPS",payload:y})}catch(y){console.error("Failed to load groups:",y),t({type:"SET_ERROR",payload:y instanceof Error?y.message:"Failed to load groups"})}})()},[o,n]);const s=re.useCallback(async f=>{t({type:"SET_LOADING",payload:!0});try{const p=await LV(n,f);return t({type:"ADD_GROUP",payload:p}),t({type:"CLEAR_SELECTION"}),p}catch(p){return console.error("Failed to create group:",p),t({type:"SET_ERROR",payload:p instanceof Error?p.message:"Failed to create group"}),null}},[n]),l=re.useCallback(async(f,p)=>{t({type:"SET_LOADING",payload:!0});try{const y=await DV(n,f,p);return t({type:"UPDATE_GROUP",payload:y}),y}catch(y){return console.error("Failed to update group:",y),t({type:"SET_ERROR",payload:y instanceof Error?y.message:"Failed to update group"}),null}},[n]),c=re.useCallback(async f=>{t({type:"SET_LOADING",payload:!0});try{return await kV(n,f),t({type:"DELETE_GROUP",payload:f}),!0}catch(p){return console.error("Failed to delete group:",p),t({type:"SET_ERROR",payload:p instanceof Error?p.message:"Failed to delete group"}),!1}},[n]);return le.jsx(Oj.Provider,{value:{state:i,dispatch:t,createGroup:s,updateGroup:l,deleteGroup:c},children:e})}const vE=kd.get("MOBILE_BFF_URL");function Ij(e){return{id:e.id,targetType:e.targetType,targetId:e.targetId,parcels:e.parcels,reason:e.reason||void 0,createdAt:new Date(e.createdAt).getTime(),createdBy:e.createdBy}}async function FV(e){const t=await(await e(`${vE}/backoffice/bans`)).json();if(!t.ok)throw new Error(t.error||"Failed to fetch bans");return(t.data||[]).map(Ij)}async function pM(e,i){const n=await(await e(`${vE}/backoffice/bans`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})).json();if(!n.ok||!n.data)throw new Error(n.error||"Failed to create ban");return Ij(n.data)}async function hM(e,i){const n=await(await e(`${vE}/backoffice/bans/${i}`,{method:"DELETE"})).json();if(!n.ok)throw new Error(n.error||"Failed to delete ban")}function VV(e,i){return e.some(t=>t.targetType==="group"&&t.targetId===i)}function HV(e,i){if(i.length===0)return!1;const t=i.map(n=>`${n.x},${n.y}`).sort().join("|");return e.some(n=>n.targetType==="scene"&&n.targetId===t)}function zV(e,i){return e.find(t=>t.targetType==="group"&&t.targetId===i)}function GV(e,i){if(i.length===0)return;const t=i.map(n=>`${n.x},${n.y}`).sort().join("|");return e.find(n=>n.targetType==="scene"&&n.targetId===t)}function WV(e){return e.map(i=>`${i.x},${i.y}`).sort().join("|")}function KV(e,i){switch(i.type){case"SET_BANS":return{...e,bans:i.payload,isLoading:!1,error:null};case"ADD_BAN":return{...e,bans:[...e.bans,i.payload]};case"REMOVE_BAN":return{...e,bans:e.bans.filter(t=>t.id!==i.payload)};case"SET_LOADING":return{...e,isLoading:i.payload};case"SET_ERROR":return{...e,error:i.payload,isLoading:!1};default:return e}}const YV={bans:[],isLoading:!1,error:null},Rj=re.createContext(null);function XV({children:e}){const[i,t]=re.useReducer(KV,YV),n=Pj(),o=re.useCallback(async()=>{t({type:"SET_LOADING",payload:!0});try{const A=await FV(n);t({type:"SET_BANS",payload:A})}catch(A){console.error("Failed to fetch bans:",A),t({type:"SET_ERROR",payload:A instanceof Error?A.message:"Failed to fetch bans"})}},[n]);re.useEffect(()=>{o()},[o]);const s=re.useCallback(A=>VV(i.bans,A),[i.bans]),l=re.useCallback(A=>HV(i.bans,A),[i.bans]),c=re.useCallback(async(A,N)=>{try{const R={targetType:"group",targetId:A.id,reason:N},O=await pM(n,R);t({type:"ADD_BAN",payload:O})}catch(R){throw console.error("Failed to ban group:",R),R}},[n]),f=re.useCallback(async A=>{const N=zV(i.bans,A.id);if(N)try{await hM(n,N.id),t({type:"REMOVE_BAN",payload:N.id})}catch(R){throw console.error("Failed to unban group:",R),R}},[n,i.bans]),p=re.useCallback(async(A,N)=>{if(A.length!==0)try{const R={targetType:"scene",targetId:WV(A),parcels:A,reason:N},O=await pM(n,R);t({type:"ADD_BAN",payload:O})}catch(R){throw console.error("Failed to ban scene:",R),R}},[n]),y=re.useCallback(async A=>{const N=GV(i.bans,A);if(N)try{await hM(n,N.id),t({type:"REMOVE_BAN",payload:N.id})}catch(R){throw console.error("Failed to unban scene:",R),R}},[n,i.bans]),h=re.useCallback(async(A,N,R)=>{if(A){const O=s(A.id),M=R??!O;M&&!O?await c(A):!M&&O&&await f(A)}else if(N&&N.length>0){const O=l(N),M=R??!O;M&&!O?await p(N):!M&&O&&await y(N)}},[s,l,c,f,p,y]),g={state:i,checkGroupBanned:s,checkSceneBanned:l,banGroup:c,unbanGroup:f,banScene:p,unbanScene:y,toggleBan:h,refreshBans:o};return le.jsx(Rj.Provider,{value:g,children:e})}function _E(){const e=re.useContext(Oj);if(!e)throw new Error("useGroupsContext must be used within a GroupsProvider");return e}function Hs(){return _E().state}function ef(){return _E().dispatch}function EE(){const{createGroup:e,updateGroup:i,deleteGroup:t}=_E();return{createGroup:e,updateGroup:i,deleteGroup:t}}function QV(){const e=re.useContext(Rj);if(!e)throw new Error("useBans must be used within a BansProvider");return e}function JV(){const{checkGroupBanned:e,checkSceneBanned:i,banGroup:t,unbanGroup:n,banScene:o,unbanScene:s,toggleBan:l,refreshBans:c}=QV();return{checkGroupBanned:e,checkSceneBanned:i,banGroup:t,unbanGroup:n,banScene:o,unbanScene:s,toggleBan:l,refreshBans:c}}function Nj(){const e=re.useContext(Sj);if(!e)throw new Error("useMapContext must be used within a MapProvider");return e}function Go(){return Nj().state}function tf(){return Nj().dispatch}function ZV(e){const i=tf(),t=re.useRef(null),n=re.useCallback(()=>{if(e.current){const{width:o,height:s}=e.current.getBoundingClientRect();i({type:"SET_VIEWPORT_SIZE",payload:{width:o,height:s}})}},[e,i]);return re.useEffect(()=>{const o=e.current;if(o)return n(),t.current=new ResizeObserver(()=>{n()}),t.current.observe(o),()=>{t.current?.disconnect()}},[e,n]),{updateSize:n}}function mM(e,i){const t=e-Tj,n=i-Aj,o=Math.floor(t/ga),s=Math.floor(n/ga);return{x:Math.max(0,Math.min(va-1,o)),y:Math.max(0,Math.min(va-1,s))}}function Td(e,i,t){const{centerX:n,centerY:o,zoom:s,width:l,height:c}=t,f=ii*s,p=e-l/2,y=i-c/2,h=p/f,g=-y/f;return{x:Math.floor(n+h),y:Math.floor(o+g)}}function rf(e,i,t){const{centerX:n,centerY:o,zoom:s,width:l,height:c}=t,f=ii*s,p=l/2+(e-n)*f,y=c/2-(i-o)*f;return{screenX:p,screenY:y}}function xV(e){const{centerX:i,centerY:t,zoom:n,width:o,height:s}=e,l=ii*n,c=o/2/l+ga,f=s/2/l+ga,p=i-c,y=i+c,h=t-f,g=t+f,A=mM(p,h),N=mM(y,g),R=[];for(let O=A.x;O<=N.x;O++)for(let M=A.y;M<=N.y;M++)O>=0&&O<va&&M>=0&&M<va&&R.push({x:O,y:M});return R}function $V(e,i){return`${oV}${e}%2C${i}.jpg`}function eH(e,i,t){const n=ii*t.zoom,o=ga*n,s=Tj+e*ga,l=Aj+i*ga,c=t.width/2+(s-t.centerX)*n,f=t.height/2-(l+ga-t.centerY)*n;return{x:c,y:f,width:o,height:o}}function Ad(e,i){return`${e},${i}`}class tH{cache=new Map;loading=new Map;maxCacheSize;onTileLoaded;constructor(i=100,t){this.maxCacheSize=i,this.onTileLoaded=t}setOnTileLoaded(i){this.onTileLoaded=i}getCached(i,t){const n=Ad(i,t),o=this.cache.get(n);return o?(o.lastAccessed=Date.now(),o.image):null}isLoading(i,t){const n=Ad(i,t);return this.loading.has(n)}async loadTile(i,t){const n=Ad(i,t),o=this.cache.get(n);if(o)return o.lastAccessed=Date.now(),o.image;const s=this.loading.get(n);if(s)return s;const l=new Promise((c,f)=>{const p=new Image;p.crossOrigin="anonymous",p.onload=()=>{this.cache.set(n,{image:p,lastAccessed:Date.now()}),this.loading.delete(n),this.evictIfNeeded(),this.onTileLoaded?.(),c(p)},p.onerror=y=>{this.loading.delete(n),f(y)},p.src=$V(i,t)});return this.loading.set(n,l),l}preloadTiles(i){for(const t of i){const n=Ad(t.x,t.y);!this.cache.has(n)&&!this.loading.has(n)&&this.loadTile(t.x,t.y).catch(()=>{})}}evictIfNeeded(){if(this.cache.size<=this.maxCacheSize)return;const t=Array.from(this.cache.entries()).sort((n,o)=>n[1].lastAccessed-o[1].lastAccessed).slice(0,this.cache.size-this.maxCacheSize);for(const[n]of t)this.cache.delete(n)}clear(){this.cache.clear(),this.loading.clear()}getStats(){return{cached:this.cache.size,loading:this.loading.size}}}let p_=null;function rH(e){return p_||(p_=new tH(100,e)),p_}function nH(){const{viewport:e}=Go(),[i,t]=re.useState(0),n=re.useRef(rH());re.useEffect(()=>{n.current.setOnTileLoaded(()=>{t(c=>c+1)})},[]);const o=xV(e);re.useEffect(()=>{for(const c of o){const f=va-1-c.y;n.current.getCached(c.x,f)||n.current.loadTile(c.x,f).catch(()=>{})}},[o]);const s=re.useCallback((c,f)=>n.current.getCached(c,f),[i]),l=re.useCallback(c=>{n.current.preloadTiles(c)},[]);return{visibleTiles:o,getTile:s,preloadAdjacentTiles:l,renderTrigger:i}}function iH({canvasRef:e,onParcelClick:i}){const{viewport:t,interaction:n}=Go(),o=tf(),s=re.useRef(null),l=re.useRef(null),c=re.useCallback(R=>{R.preventDefault(),s.current={x:R.clientX,y:R.clientY},o({type:"START_DRAG",payload:{x:R.clientX,y:R.clientY}})},[o]),f=re.useCallback(R=>{const O=e.current;if(!O)return;const M=O.getBoundingClientRect(),_=R.clientX-M.left,I=R.clientY-M.top,S=Td(_,I,t);if(o({type:"SET_HOVERED_PARCEL",payload:S}),n.isDragging){const v=R.clientX-n.dragStartX,T=R.clientY-n.dragStartY,j=ii*t.zoom,V=-v/j,W=T/j;o({type:"PAN",payload:{deltaX:V,deltaY:W}}),o({type:"UPDATE_DRAG_START",payload:{x:R.clientX,y:R.clientY}})}},[e,t,n,o]),p=re.useCallback(R=>{if(s.current){const O=Math.abs(R.clientX-s.current.x),M=Math.abs(R.clientY-s.current.y);if(O<5&&M<5&&i){const _=e.current;if(_){const I=_.getBoundingClientRect(),S=R.clientX-I.left,v=R.clientY-I.top,T=Td(S,v,t);i(T)}}}s.current=null,o({type:"END_DRAG"})},[e,t,i,o]),y=re.useCallback(()=>{o({type:"SET_HOVERED_PARCEL",payload:null}),o({type:"END_DRAG"}),s.current=null},[o]),h=re.useCallback(R=>{R.preventDefault();const O=e.current;if(!O)return;const M=O.getBoundingClientRect(),_=R.clientX-M.left,I=R.clientY-M.top,S=Td(_,I,t),v=R.deltaY>0?.97:1.03,T=Math.max(.5,Math.min(10,t.zoom*v)),j=ii*T,V=S.x-(_-t.width/2)/j,W=S.y+(I-t.height/2)/j;o({type:"SET_ZOOM",payload:T}),o({type:"SET_CENTER",payload:{x:V,y:W}})},[e,t,o]),g=re.useCallback(R=>{if(R.preventDefault(),R.touches.length===1){const O=R.touches[0];s.current={x:O.clientX,y:O.clientY},o({type:"START_DRAG",payload:{x:O.clientX,y:O.clientY}})}else if(R.touches.length===2){const O=R.touches[0].clientX-R.touches[1].clientX,M=R.touches[0].clientY-R.touches[1].clientY;l.current=Math.sqrt(O*O+M*M)}},[o]),A=re.useCallback(R=>{if(R.preventDefault(),R.touches.length===1&&n.isDragging){const O=R.touches[0],M=O.clientX-n.dragStartX,_=O.clientY-n.dragStartY,I=ii*t.zoom,S=-M/I,v=_/I;o({type:"PAN",payload:{deltaX:S,deltaY:v}}),o({type:"UPDATE_DRAG_START",payload:{x:O.clientX,y:O.clientY}})}else if(R.touches.length===2&&l.current!==null){const O=R.touches[0].clientX-R.touches[1].clientX,M=R.touches[0].clientY-R.touches[1].clientY,_=Math.sqrt(O*O+M*M),I=_/l.current;o({type:"ZOOM",payload:{factor:I}}),l.current=_}},[n,t.zoom,o]),N=re.useCallback(R=>{if(R.touches.length===0){if(s.current&&i){const O=e.current;if(O){const M=O.getBoundingClientRect(),_=s.current.x-M.left,I=s.current.y-M.top,S=Td(_,I,t);i(S)}}s.current=null,l.current=null,o({type:"END_DRAG"})}else if(R.touches.length===1){l.current=null;const O=R.touches[0];o({type:"UPDATE_DRAG_START",payload:{x:O.clientX,y:O.clientY}})}},[e,t,i,o]);return re.useEffect(()=>{const R=e.current;if(R)return R.addEventListener("mousedown",c),R.addEventListener("mousemove",f),R.addEventListener("mouseup",p),R.addEventListener("mouseleave",y),R.addEventListener("wheel",h,{passive:!1}),R.addEventListener("touchstart",g,{passive:!1}),R.addEventListener("touchmove",A,{passive:!1}),R.addEventListener("touchend",N),()=>{R.removeEventListener("mousedown",c),R.removeEventListener("mousemove",f),R.removeEventListener("mouseup",p),R.removeEventListener("mouseleave",y),R.removeEventListener("wheel",h),R.removeEventListener("touchstart",g),R.removeEventListener("touchmove",A),R.removeEventListener("touchend",N)}},[e,c,f,p,y,h,g,A,N]),{isDragging:n.isDragging,hoveredParcel:n.hoveredParcel}}function aH({onParcelClick:e}){const i=re.useRef(null),t=re.useRef(null),n=re.useRef(null),{viewport:o,interaction:s}=Go(),{getTile:l,renderTrigger:c}=nH();ZV(t);const{isDragging:f}=iH({canvasRef:i,onParcelClick:e}),p=re.useCallback(()=>{const h=i.current;if(!h)return;const g=h.getContext("2d");if(!g)return;const A=window.devicePixelRatio||1,{width:N,height:R}=o;(h.width!==N*A||h.height!==R*A)&&(h.width=N*A,h.height=R*A,h.style.width=`${N}px`,h.style.height=`${R}px`,g.scale(A,A)),g.fillStyle=uV,g.fillRect(0,0,N,R);for(let O=0;O<va;O++)for(let M=0;M<va;M++){const _=eH(O,M,o);if(_.x+_.width<0||_.x>N||_.y+_.height<0||_.y>R)continue;const I=va-1-M,S=l(O,I);S?g.drawImage(S,_.x,_.y,_.width,_.height):(g.fillStyle=sV,g.fillRect(_.x,_.y,_.width,_.height))}if(s.hoveredParcel){const{hoveredParcel:O}=s,M=ii*o.zoom,{screenX:_,screenY:I}=rf(O.x,O.y,o),S=_,v=I-M,T=M,j=Math.max(4,T*.25),V=Math.max(1,T*.08);g.strokeStyle="white",g.lineWidth=V,g.lineCap="square",g.beginPath(),g.moveTo(S,v+j),g.lineTo(S,v),g.lineTo(S+j,v),g.stroke(),g.beginPath(),g.moveTo(S+T-j,v),g.lineTo(S+T,v),g.lineTo(S+T,v+j),g.stroke(),g.beginPath(),g.moveTo(S,v+T-j),g.lineTo(S,v+T),g.lineTo(S+j,v+T),g.stroke(),g.beginPath(),g.moveTo(S+T-j,v+T),g.lineTo(S+T,v+T),g.lineTo(S+T,v+T-j),g.stroke()}},[o,l,s]);re.useEffect(()=>{const h=()=>{p(),n.current=requestAnimationFrame(h)};return n.current=requestAnimationFrame(h),()=>{n.current!==null&&cancelAnimationFrame(n.current)}},[p,c]);const y=f?"grabbing":"grab";return le.jsx("div",{ref:t,style:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden"},children:le.jsx("canvas",{ref:i,style:{display:"block",cursor:y,touchAction:"none"}})})}const oH="_mapView_10j9q_1",sH="_controls_10j9q_11",uH="_controlButton_10j9q_21",lH="_coordinateDisplay_10j9q_45",ks={mapView:oH,controls:sH,controlButton:uH,coordinateDisplay:lH};function cH(){const e=tf(),i=()=>{e({type:"ZOOM",payload:{factor:1.5}})},t=()=>{e({type:"ZOOM",payload:{factor:.67}})},n=()=>{e({type:"RESET_VIEW"})};return le.jsxs("div",{className:ks.controls,children:[le.jsx("button",{className:ks.controlButton,onClick:i,title:"Zoom In","aria-label":"Zoom In",children:"+"}),le.jsx("button",{className:ks.controlButton,onClick:t,title:"Zoom Out","aria-label":"Zoom Out",children:"-"}),le.jsx("button",{className:ks.controlButton,onClick:n,title:"Reset View","aria-label":"Reset View",children:"⌂"})]})}function dH(){const{interaction:e}=Go(),{hoveredParcel:i}=e;return i?le.jsxs("div",{className:ks.coordinateDisplay,children:[i.x,", ",i.y]}):null}const fH="#00D9FF",pH=.3,hH=2;function mH(){const{viewport:e}=Go(),{selectedParcels:i,selectionColor:t}=Hs(),n=t||fH,o=ii*e.zoom,s=re.useMemo(()=>i.map(l=>{const{screenX:c,screenY:f}=rf(l.x,l.y,e);return{key:`${l.x},${l.y}`,x:c,y:f-o,width:o,height:o}}),[i,e,o]);return i.length===0?null:le.jsx("svg",{style:{position:"absolute",top:0,left:0,width:e.width,height:e.height,pointerEvents:"none",overflow:"hidden"},children:s.map(l=>le.jsx("rect",{x:l.x,y:l.y,width:l.width,height:l.height,fill:n,fillOpacity:pH,stroke:n,strokeWidth:hH,strokeDasharray:"4 2"},l.key))})}const yH=.2,gH=1.5,vH=2;function _H(){const{viewport:e}=Go(),{groups:i,editingGroupId:t}=Hs(),n=ii*e.zoom,o=re.useMemo(()=>{const s=[];return i.forEach(l=>{const c=l.id===t;l.parcels.forEach(f=>{const{screenX:p,screenY:y}=rf(f.x,f.y,e);s.push({key:`${l.id}-${f.x},${f.y}`,x:p,y:y-n,width:n,height:n,color:l.color,isEditing:c})})}),s},[i,t,e,n]);return i.length===0?null:le.jsx("svg",{style:{position:"absolute",top:0,left:0,width:e.width,height:e.height,pointerEvents:"none",overflow:"hidden"},children:o.map(s=>le.jsx("rect",{x:s.x,y:s.y,width:s.width,height:s.height,fill:s.color,fillOpacity:yH,stroke:s.color,strokeWidth:s.isEditing?vH:gH,strokeDasharray:s.isEditing?"6 3":void 0},s.key))})}const EH="_sidebar_1noj2_1",bH="_sidebarCollapsed_1noj2_15",wH="_header_1noj2_42",SH="_headerTitle_1noj2_50",TH="_closeButton_1noj2_57",AH="_content_1noj2_77",OH="_footer_1noj2_83",PH="_button_1noj2_90",IH="_buttonPrimary_1noj2_101",RH="_buttonSecondary_1noj2_115",NH="_groupCard_1noj2_134",MH="_groupCardHeader_1noj2_147",CH="_groupColorDot_1noj2_154",jH="_groupName_1noj2_161",LH="_groupMeta_1noj2_169",DH="_groupTags_1noj2_175",kH="_tag_1noj2_181",qH="_groupActions_1noj2_189",BH="_actionButton_1noj2_197",UH="_actionButtonBan_1noj2_211",FH="_actionButtonUnban_1noj2_220",VH="_groupCardBanned_1noj2_230",HH="_bannedBadge_1noj2_239",zH="_form_1noj2_252",GH="_formGroup_1noj2_258",WH="_label_1noj2_264",KH="_input_1noj2_270",YH="_textarea_1noj2_284",XH="_colorPicker_1noj2_289",QH="_colorOption_1noj2_295",JH="_colorOptionSelected_1noj2_308",ZH="_colorOptionDisabled_1noj2_312",xH="_tagsInput_1noj2_321",$H="_tagInForm_1noj2_332",e4="_tagRemove_1noj2_343",t4="_tagInput_1noj2_353",r4="_emptyState_1noj2_367",n4="_emptyStateIcon_1noj2_373",i4="_emptyStateText_1noj2_379",a4="_selectionInfo_1noj2_385",o4="_selectionInfoText_1noj2_393",s4="_errorMessage_1noj2_400",et={sidebar:EH,sidebarCollapsed:bH,header:wH,headerTitle:SH,closeButton:TH,content:AH,footer:OH,button:PH,buttonPrimary:IH,buttonSecondary:RH,groupCard:NH,groupCardHeader:MH,groupColorDot:CH,groupName:jH,groupMeta:LH,groupTags:DH,tag:kH,groupActions:qH,actionButton:BH,actionButtonBan:UH,actionButtonUnban:FH,groupCardBanned:VH,bannedBadge:HH,form:zH,formGroup:GH,label:WH,input:KH,textarea:YH,colorPicker:XH,colorOption:QH,colorOptionSelected:JH,colorOptionDisabled:ZH,tagsInput:xH,tagInForm:$H,tagRemove:e4,tagInput:t4,emptyState:r4,emptyStateIcon:n4,emptyStateText:i4,selectionInfo:a4,selectionInfoText:o4,errorMessage:s4};function u4({group:e,onEdit:i,onDelete:t,onClick:n,isBanned:o=!1,onBanToggle:s}){const l=p=>{p.stopPropagation(),i(e)},c=p=>{p.stopPropagation(),confirm(`Delete group "${e.name}"?`)&&t(e.id)},f=p=>{p.stopPropagation(),s?.(e,!o)};return le.jsxs("div",{className:`${et.groupCard} ${o?et.groupCardBanned:""}`,onClick:()=>n(e),children:[le.jsxs("div",{className:et.groupCardHeader,children:[le.jsx("div",{className:et.groupColorDot,style:{backgroundColor:e.color}}),le.jsxs("h4",{className:et.groupName,children:[e.name,o&&le.jsx("span",{className:et.bannedBadge,children:"Banned"})]})]}),le.jsxs("p",{className:et.groupMeta,children:[e.parcels.length," parcel",e.parcels.length!==1?"s":"",e.description&&` • ${e.description}`]}),e.tags.length>0&&le.jsx("div",{className:et.groupTags,children:e.tags.map(p=>le.jsx("span",{className:et.tag,children:p},p))}),le.jsxs("div",{className:et.groupActions,children:[le.jsx("button",{className:et.actionButton,onClick:l,children:"Edit"}),le.jsx("button",{className:`${et.actionButton} ${o?et.actionButtonUnban:et.actionButtonBan}`,onClick:f,children:o?"Unban":"Ban"}),le.jsx("button",{className:et.actionButton,onClick:c,children:"Delete"})]})]})}function l4({onEditGroup:e,checkIsBanned:i,onBanToggle:t}){const{groups:n,isLoading:o,error:s}=Hs(),l=ef(),c=tf(),{deleteGroup:f}=EE(),p=async h=>{await f(h)},y=h=>{if(l({type:"SET_EDITING_GROUP",payload:h.id}),h.parcels.length>0){const g=h.parcels.map(S=>S.x),A=h.parcels.map(S=>S.y),N=Math.min(...g),R=Math.max(...g),O=Math.min(...A),M=Math.max(...A),_=(N+R)/2,I=(O+M)/2;c({type:"SET_CENTER",payload:{x:_,y:I}}),c({type:"SET_ZOOM",payload:4})}};return o&&n.length===0?le.jsx("div",{className:et.emptyState,children:le.jsx("p",{className:et.emptyStateText,children:"Loading groups..."})}):s&&n.length===0?le.jsx("div",{className:et.emptyState,children:le.jsx("p",{className:et.emptyStateText,style:{color:"#ff6b6b"},children:s})}):n.length===0?le.jsxs("div",{className:et.emptyState,children:[le.jsx("div",{className:et.emptyStateIcon,children:"□"}),le.jsx("p",{className:et.emptyStateText,children:"No groups yet. Click parcels on the map to select them, then create a group."})]}):le.jsx("div",{children:n.map(h=>le.jsx(u4,{group:h,onEdit:e,onDelete:p,onClick:y,isBanned:i?.(h)??!1,onBanToggle:t},h.id))})}const nl=["#FF6B6B","#4ECDC4","#45B7D1","#96CEB4","#FFEAA7","#DDA0DD","#98D8C8","#F7DC6F","#BB8FCE","#85C1E9"];function c4(e){const i=new Set(e.map(n=>n.color));return nl.find(n=>!i.has(n))||nl[e.length%nl.length]}function d4({editingGroup:e,selectedParcels:i,onCancel:t,onSave:n}){const{groups:o,error:s}=Hs(),l=ef(),{createGroup:c,updateGroup:f}=EE(),[p,y]=re.useState(!1),h="#00D9FF",g=re.useMemo(()=>{const Ee=new Set(o.filter(je=>je.id!==e?.id).map(je=>je.color));return Ee.add(h),Ee},[o,e?.id]),A=re.useCallback(()=>e?.color?e.color:nl.find(je=>!g.has(je))||c4(o),[e?.color,g,o]),[N,R]=re.useState(e?.name||""),[O,M]=re.useState(e?.description||""),[_,I]=re.useState(A),[S,v]=re.useState(e?.tags||[]),[T,j]=re.useState(""),V=re.useMemo(()=>{if(!e)return i;const Ee=new Set(e.parcels.map(Ce=>`${Ce.x},${Ce.y}`)),je=i.filter(Ce=>!Ee.has(`${Ce.x},${Ce.y}`));return[...e.parcels,...je]},[e,i]),W=!!e;re.useEffect(()=>{l({type:"SET_SELECTION_COLOR",payload:_})},[_,l]),re.useEffect(()=>(l({type:"SET_SELECTION_COLOR",payload:_}),()=>{l({type:"SET_SELECTION_COLOR",payload:null})}),[]);const X=async Ee=>{if(Ee.preventDefault(),!(!N.trim()||V.length===0||p)){y(!0);try{W&&e?await f(e.id,{name:N.trim(),description:O.trim(),color:_,tags:S,parcels:[...V]})&&n():await c({name:N.trim(),description:O.trim(),color:_,tags:S,parcels:[...V]})&&n()}finally{y(!1)}}},fe=re.useCallback(()=>{const Ee=T.trim().toLowerCase();Ee&&!S.includes(Ee)&&v([...S,Ee]),j("")},[T,S]),Ae=Ee=>{Ee.key==="Enter"?(Ee.preventDefault(),fe()):Ee.key==="Backspace"&&!T&&S.length>0&&v(S.slice(0,-1))},Se=Ee=>{v(S.filter(je=>je!==Ee))};return le.jsxs("form",{className:et.form,onSubmit:X,children:[le.jsx("div",{className:et.selectionInfo,children:le.jsxs("p",{className:et.selectionInfoText,children:[V.length," parcel",V.length!==1?"s":""," selected"]})}),le.jsxs("div",{className:et.formGroup,children:[le.jsx("label",{className:et.label,children:"Name *"}),le.jsx("input",{type:"text",className:et.input,value:N,onChange:Ee=>R(Ee.target.value),placeholder:"Enter group name",autoFocus:!0})]}),le.jsxs("div",{className:et.formGroup,children:[le.jsx("label",{className:et.label,children:"Description"}),le.jsx("textarea",{className:`${et.input} ${et.textarea}`,value:O,onChange:Ee=>M(Ee.target.value),placeholder:"Optional description"})]}),le.jsxs("div",{className:et.formGroup,children:[le.jsx("label",{className:et.label,children:"Color"}),le.jsx("div",{className:et.colorPicker,children:nl.map(Ee=>{const je=g.has(Ee),Ce=_===Ee;return le.jsx("button",{type:"button",className:`${et.colorOption} ${Ce?et.colorOptionSelected:""} ${je?et.colorOptionDisabled:""}`,style:{backgroundColor:Ee},onClick:()=>!je&&I(Ee),disabled:je,title:je?"Color already in use":void 0},Ee)})})]}),le.jsxs("div",{className:et.formGroup,children:[le.jsx("label",{className:et.label,children:"Tags"}),le.jsxs("div",{className:et.tagsInput,children:[S.map(Ee=>le.jsxs("span",{className:et.tagInForm,children:[Ee,le.jsx("button",{type:"button",className:et.tagRemove,onClick:()=>Se(Ee),children:"×"})]},Ee)),le.jsx("input",{type:"text",className:et.tagInput,value:T,onChange:Ee=>j(Ee.target.value),onKeyDown:Ae,onBlur:fe,placeholder:"Add tag..."})]})]}),s&&le.jsx("div",{className:et.errorMessage,children:s}),le.jsxs("div",{className:et.footer,style:{padding:0,borderTop:"none"},children:[le.jsx("button",{type:"button",className:`${et.button} ${et.buttonSecondary}`,onClick:t,disabled:p,children:"Cancel"}),le.jsx("button",{type:"submit",className:`${et.button} ${et.buttonPrimary}`,disabled:!N.trim()||V.length===0||p,children:p?"Saving...":W?"Save Changes":"Create Group"})]})]})}function f4({onExitSelectMode:e,onEnterSelectMode:i,isSelectMode:t=!1,initialMode:n="list",checkIsBanned:o,onBanToggle:s}){const{sidebarOpen:l,selectedParcels:c,groups:f,editingGroupId:p}=Hs(),y=ef(),[h,g]=re.useState(n);re.useEffect(()=>{g(n)},[n]);const A=re.useCallback(X=>{X.key==="Escape"&&(y({type:"SET_SIDEBAR_OPEN",payload:!1}),e?.())},[y,e]);re.useEffect(()=>(document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)),[A]);const N=re.useMemo(()=>h==="edit"&&p&&f.find(X=>X.id===p)||null,[h,p,f]),R=()=>{y({type:"TOGGLE_SIDEBAR"}),l&&e&&e()},O=()=>{g("create"),i?.()},M=X=>{y({type:"SET_EDITING_GROUP",payload:X.id}),g("edit"),i?.()},_=()=>{g("list"),y({type:"SET_EDITING_GROUP",payload:null}),y({type:"CLEAR_SELECTION"}),e?.()},I=()=>{g("list"),y({type:"SET_EDITING_GROUP",payload:null}),y({type:"CLEAR_SELECTION"}),e?.()},S=()=>{y({type:"CLEAR_SELECTION"})},v=()=>{i?.()},T=()=>{e?.()},j=`${et.sidebar} ${l?"":et.sidebarCollapsed}`,V=()=>{switch(h){case"create":return"Create Group";case"edit":return"Edit Group";default:return"Scene Groups"}},W=le.jsxs("div",{className:j,children:[le.jsxs("div",{className:et.header,children:[le.jsx("h3",{className:et.headerTitle,children:V()}),le.jsx("button",{className:et.closeButton,onClick:R,children:"×"})]}),le.jsxs("div",{className:et.content,children:[h==="list"&&le.jsxs(le.Fragment,{children:[c.length>0&&le.jsx("div",{className:et.selectionInfo,children:le.jsxs("p",{className:et.selectionInfoText,children:[c.length," parcel",c.length!==1?"s":""," selected"]})}),le.jsx(l4,{onEditGroup:M,checkIsBanned:o,onBanToggle:s})]}),(h==="create"||h==="edit")&&le.jsx(d4,{editingGroup:N,selectedParcels:c,onCancel:_,onSave:I})]}),h==="list"&&le.jsx("div",{className:et.footer,children:t?c.length>0?le.jsxs(le.Fragment,{children:[le.jsx("button",{className:`${et.button} ${et.buttonSecondary}`,onClick:S,children:"Clear"}),le.jsx("button",{className:`${et.button} ${et.buttonPrimary}`,onClick:O,children:"Create Group"})]}):le.jsxs(le.Fragment,{children:[le.jsx("button",{className:`${et.button} ${et.buttonSecondary}`,onClick:T,children:"Done"}),le.jsx("p",{style:{color:"rgba(255,255,255,0.5)",fontSize:"13px",margin:0,flex:1},children:"Click parcels to select"})]}):le.jsx("button",{className:`${et.button} ${et.buttonPrimary}`,onClick:v,style:{width:"100%"},children:"Select Parcels"})})]});return UM.createPortal(W,document.body)}const p4="_fab_14mzl_1",h4="_badge_14mzl_40",yM={fab:p4,badge:h4},m4=({onClick:e,disabled:i,groupCount:t=0})=>le.jsxs("button",{className:yM.fab,onClick:e,disabled:i,title:"View scene groups",children:[le.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[le.jsx("polygon",{points:"12 2 2 7 12 12 22 7 12 2"}),le.jsx("polyline",{points:"2 17 12 22 22 17"}),le.jsx("polyline",{points:"2 12 12 17 22 12"})]}),t>0&&le.jsx("span",{className:yM.badge,children:t})]}),Mj="https://peer.decentraland.org/content";async function y4(e){const i=`${e.x},${e.y}`;try{const t=await fetch(`${Mj}/entities/active`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pointers:[i]})});if(!t.ok)return console.error("Failed to fetch scene:",t.statusText),null;const n=await t.json();if(n.length===0)return null;const o=n[0];return g4(o)}catch(t){return console.error("Error fetching scene:",t),null}}function g4(e){const i=e.metadata||{},t=i.display||{},n=i.scene;let o=null;if(n?.base){const[f,p]=n.base.split(",").map(Number);!isNaN(f)&&!isNaN(p)&&(o={x:f,y:p})}const l=(n?.parcels||e.pointers).map(f=>{const[p,y]=f.split(",").map(Number);return{x:p,y}}).filter(f=>!isNaN(f.x)&&!isNaN(f.y));let c=null;if(t.navmapThumbnail){const f=e.content.find(p=>p.file===t.navmapThumbnail);f&&(c=`${Mj}/contents/${f.hash}`)}return{entityId:e.id,name:t.title||"Unnamed Scene",description:t.description||"",thumbnail:c,owner:i.owner||i.contact?.name||null,parcels:l,baseParcel:o,deployedAt:new Date(e.timestamp),tags:i.tags||[]}}function v4(e){if(e.length===0)return"";if(e.length===1)return`${e[0].x},${e[0].y}`;const i=Math.min(...e.map(s=>s.x)),t=Math.max(...e.map(s=>s.x)),n=Math.min(...e.map(s=>s.y)),o=Math.max(...e.map(s=>s.y));return i===t&&n===o?`${i},${n}`:`${i},${n} to ${t},${o}`}const _4="_sidebar_1ca4w_1",E4="_header_1ca4w_26",b4="_title_1ca4w_34",w4="_closeButton_1ca4w_41",S4="_content_1ca4w_61",T4="_loading_1ca4w_67",A4="_error_1ca4w_68",O4="_noScene_1ca4w_79",P4="_thumbnailContainer_1ca4w_91",I4="_thumbnail_1ca4w_91",R4="_field_1ca4w_104",N4="_label_1ca4w_108",M4="_value_1ca4w_118",C4="_valueSmall_1ca4w_123",j4="_parcelCount_1ca4w_129",L4="_tags_1ca4w_135",D4="_tag_1ca4w_135",k4="_groupBadge_1ca4w_149",q4="_footer_1ca4w_171",B4="_banButton_1ca4w_179",U4="_banned_1ca4w_200",F4="_addToGroupSection_1ca4w_211",V4="_groupSelect_1ca4w_216",H4="_addToGroupButton_1ca4w_242",z4="_disabledMessage_1ca4w_264",G4="_removeFromGroupButton_1ca4w_275",St={sidebar:_4,header:E4,title:b4,closeButton:w4,content:S4,loading:T4,error:A4,noScene:O4,thumbnailContainer:P4,thumbnail:I4,field:R4,label:N4,value:M4,valueSmall:C4,parcelCount:j4,tags:L4,tag:D4,groupBadge:k4,footer:q4,banButton:B4,banned:U4,addToGroupSection:F4,groupSelect:V4,addToGroupButton:H4,disabledMessage:z4,removeFromGroupButton:G4},W4=({parcel:e,group:i,onClose:t,onBanToggle:n,checkIsBanned:o,onSceneLoaded:s,onCreateGroup:l,onAddToGroup:c,onRemoveFromGroup:f,onViewGroup:p,existingGroups:y=[]})=>{const[h,g]=re.useState(null),[A,N]=re.useState(!1),[R,O]=re.useState(null),[M,_]=re.useState("new"),I=re.useCallback(U=>{U.key==="Escape"&&t()},[t]);re.useEffect(()=>(document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)),[I]);const S=e?`${e.x},${e.y}`:null;re.useEffect(()=>{if(!e)return;let U=!1;return N(!0),O(null),g(null),y4(e).then(ae=>{U||(g(ae),N(!1),ae?.parcels&&ae.parcels.length>0&&s?.(ae.parcels))}).catch(ae=>{U||(console.error("Failed to fetch scene info:",ae),O("Failed to load scene information"),N(!1))}),()=>{U=!0}},[S,s]);const v=re.useMemo(()=>{if(!h?.parcels||h.parcels.length===0)return{belongsToGroup:null,freeParcels:[],allInGroup:!1};const U=h.parcels;let ae=null;for(const ke of y){const Me=new Set(ke.parcels.map(de=>`${de.x},${de.y}`));if(U.some(de=>Me.has(`${de.x},${de.y}`))){ae=ke;break}}const Ie=new Set;y.forEach(ke=>{ke.parcels.forEach(Me=>Ie.add(`${Me.x},${Me.y}`))});const Te=U.filter(ke=>!Ie.has(`${ke.x},${ke.y}`));return{belongsToGroup:ae,freeParcels:Te,allInGroup:Te.length===0&&ae!==null}},[h?.parcels,y]),T=i||v.belongsToGroup||void 0,j=h?.parcels||(e?[e]:[]),V=o?.(T,j)??!1,W=()=>{n?.(!V,T,j)},X=()=>{h?.parcels&&h.parcels.length>0&&i&&f?.(h.parcels,i.id)},fe=()=>{!h?.parcels||h.parcels.length===0||(M==="new"?h.parcels.length>1&&l?.(h.parcels,h.name):M&&c?.(h.parcels,M))},Ae=v.belongsToGroup!==null,Se=h?.parcels&&h.parcels.length>1&&l,Ee=h?.parcels&&h.parcels.length>0&&y.length>0&&c,je=!i&&(Se||Ee),Ce=Ae;re.useEffect(()=>{Se?_("new"):y.length>0&&_(y[0].id)},[Se,y]);const Oe=M==="new",ge=Oe?"Create Group":"Add to Group",ie=!M||Oe&&(!h?.parcels||h.parcels.length<2),K=h?.parcels||i?.parcels||(e?[e]:[]),C=!A&&!R&&!h,B=i?.name||h?.name||(C?"Empty Parcel":"Loading..."),q=i?.description||h?.description||"",L=le.jsxs("div",{className:St.sidebar,children:[le.jsxs("div",{className:St.header,children:[le.jsx("h3",{className:St.title,children:C?"Parcel Details":"Scene Details"}),le.jsx("button",{className:St.closeButton,onClick:t,children:"×"})]}),le.jsx("div",{className:St.content,children:A?le.jsx("div",{className:St.loading,children:"Loading scene info..."}):R?le.jsx("div",{className:St.error,children:R}):le.jsxs(le.Fragment,{children:[h?.thumbnail&&le.jsx("div",{className:St.thumbnailContainer,children:le.jsx("img",{src:h.thumbnail,alt:B,className:St.thumbnail,onError:U=>{U.target.style.display="none"}})}),C&&le.jsx("div",{className:St.noScene,children:"No scene deployed"}),!C&&le.jsxs("div",{className:St.field,children:[le.jsx("label",{className:St.label,children:"Name"}),le.jsx("div",{className:St.value,children:B})]}),q&&le.jsxs("div",{className:St.field,children:[le.jsx("label",{className:St.label,children:"Description"}),le.jsx("div",{className:St.valueSmall,children:q})]}),le.jsxs("div",{className:St.field,children:[le.jsx("label",{className:St.label,children:"Parcels"}),le.jsxs("div",{className:St.value,children:[v4(K),K.length>1&&le.jsxs("span",{className:St.parcelCount,children:["(",K.length," parcels)"]})]})]}),h?.owner&&le.jsxs("div",{className:St.field,children:[le.jsx("label",{className:St.label,children:"Owner"}),le.jsx("div",{className:St.valueSmall,children:h.owner})]}),h?.tags&&h.tags.length>0&&le.jsxs("div",{className:St.field,children:[le.jsx("label",{className:St.label,children:"Tags"}),le.jsx("div",{className:St.tags,children:h.tags.map(U=>le.jsx("span",{className:St.tag,children:U},U))})]}),(i||v.belongsToGroup)&&le.jsxs("div",{className:St.field,children:[le.jsx("label",{className:St.label,children:"Scene Group"}),le.jsx("button",{className:St.groupBadge,style:{backgroundColor:i?.color||v.belongsToGroup?.color},onClick:()=>{const U=i||v.belongsToGroup;U&&p?.(U)},children:i?.name||v.belongsToGroup?.name})]}),h?.deployedAt&&le.jsxs("div",{className:St.field,children:[le.jsx("label",{className:St.label,children:"Deployed"}),le.jsx("div",{className:St.valueSmall,children:h.deployedAt.toLocaleDateString()})]})]})}),le.jsxs("div",{className:St.footer,children:[je&&!i&&le.jsx("div",{className:St.addToGroupSection,children:Ce?le.jsx("div",{className:St.disabledMessage,children:"Already in a group"}):le.jsxs(le.Fragment,{children:[le.jsxs("select",{className:St.groupSelect,value:M,onChange:U=>_(U.target.value),children:[Se&&le.jsx("option",{value:"new",children:"Create new group..."}),y.map(U=>le.jsx("option",{value:U.id,children:U.name},U.id))]}),le.jsx("button",{className:St.addToGroupButton,onClick:fe,disabled:ie,children:ge})]})}),i&&f&&le.jsx("button",{className:St.removeFromGroupButton,onClick:X,children:"Remove from Group"}),le.jsx("button",{className:`${St.banButton} ${V?St.banned:""}`,onClick:W,children:V?i||v.belongsToGroup?"Unban Group":"Unban Scene":i||v.belongsToGroup?"Ban Group":"Ban Scene"})]})]});return UM.createPortal(L,document.body)},gM="#00D9FF",K4=.25,Y4=2;function X4({parcels:e}){const{viewport:i}=Go(),t=ii*i.zoom,n=re.useMemo(()=>e.map(o=>{const{screenX:s,screenY:l}=rf(o.x,o.y,i);return{key:`${o.x},${o.y}`,x:s,y:l-t,width:t,height:t}}),[e,i,t]);return e.length===0?null:le.jsx("svg",{style:{position:"absolute",top:0,left:0,width:i.width,height:i.height,pointerEvents:"none",overflow:"hidden"},children:n.map(o=>le.jsx("rect",{x:o.x,y:o.y,width:o.width,height:o.height,fill:gM,fillOpacity:K4,stroke:gM,strokeWidth:Y4},o.key))})}function Q4({onParcelClick:e}){const{groups:i,sidebarOpen:t}=Hs(),n=ef(),{updateGroup:o,deleteGroup:s}=EE(),{checkGroupBanned:l,checkSceneBanned:c,toggleBan:f}=JV(),[p,y]=re.useState("view"),[h,g]=re.useState(null),[A,N]=re.useState([]),[R,O]=re.useState("list"),M=re.useCallback(Oe=>i.find(ge=>ge.parcels.some(ie=>ie.x===Oe.x&&ie.y===Oe.y))||null,[i]),_=re.useCallback((Oe,ge)=>Oe?l(Oe.id):ge&&ge.length>0?c(ge):!1,[l,c]),I=re.useCallback(async(Oe,ge,ie)=>{try{await f(ge,ie,Oe)}catch(K){console.error("Failed to toggle ban:",K)}},[f]),S=re.useCallback(Oe=>{if(p==="select")n({type:"TOGGLE_PARCEL_SELECTION",payload:Oe});else{const ge=M(Oe);g({type:"parcel",parcel:Oe,group:ge||void 0})}e?.(Oe)},[p,n,M,e]),v=()=>{g(null),N([]),O("list"),n({type:"TOGGLE_SIDEBAR"})},T=()=>{g(null),N([])},j=re.useCallback(Oe=>{N(Oe)},[]),V=re.useCallback((Oe,ge)=>{g(null),N([]),n({type:"SET_SELECTED_PARCELS",payload:Oe}),y("select"),O("create"),n({type:"SET_SIDEBAR_OPEN",payload:!0})},[n]),W=re.useCallback(()=>{const Oe=new Set;return i.forEach(ge=>{ge.parcels.forEach(ie=>Oe.add(`${ie.x},${ie.y}`))}),Oe},[i]),X=re.useCallback(async(Oe,ge)=>{const ie=i.find(U=>U.id===ge);if(!ie)return;const K=W(),C=new Set(ie.parcels.map(U=>`${U.x},${U.y}`)),B=Oe.filter(U=>{const ae=`${U.x},${U.y}`;return!K.has(ae)||C.has(ae)});if(B.length===0)return;const q=[...ie.parcels];B.forEach(U=>{C.has(`${U.x},${U.y}`)||q.push(U)});const L=await o(ge,{parcels:q});h&&L&&g({...h,group:L})},[i,o,W,h]),fe=re.useCallback(async(Oe,ge)=>{const ie=i.find(B=>B.id===ge);if(!ie)return;const K=new Set(Oe.map(B=>`${B.x},${B.y}`)),C=ie.parcels.filter(B=>!K.has(`${B.x},${B.y}`));C.length===0?await s(ge):await o(ge,{parcels:C}),h&&g({...h,group:void 0})},[i,o,s,h]),Ae=re.useCallback(Oe=>{g(null),N([]),n({type:"SET_EDITING_GROUP",payload:Oe.id}),O("edit"),n({type:"SET_SIDEBAR_OPEN",payload:!0})},[n]),Se=re.useCallback(Oe=>l(Oe.id),[l]),Ee=re.useCallback(async(Oe,ge)=>{try{await f(Oe,void 0,ge)}catch(ie){console.error("Failed to toggle group ban:",ie)}},[f]),je=p==="select",Ce=h!==null&&!je;return le.jsxs("div",{className:ks.mapView,children:[le.jsx(aH,{onParcelClick:S}),le.jsx(_H,{}),je&&le.jsx(mH,{}),A.length>0&&le.jsx(X4,{parcels:A}),le.jsx(cH,{}),le.jsx(dH,{}),t&&le.jsx(f4,{onExitSelectMode:()=>{y("view"),O("list")},onEnterSelectMode:()=>y("select"),isSelectMode:je,initialMode:R,checkIsBanned:Se,onBanToggle:Ee}),Ce&&le.jsx(W4,{parcel:h.parcel,group:h.group,onClose:T,checkIsBanned:_,onBanToggle:I,onSceneLoaded:j,onCreateGroup:V,onAddToGroup:X,onRemoveFromGroup:fe,onViewGroup:Ae,existingGroups:i}),le.jsx(m4,{onClick:v,groupCount:i.length})]})}function J4({initialCenter:e,initialZoom:i,onParcelClick:t}){return le.jsx(cV,{initialCenter:e,initialZoom:i,children:le.jsx(UV,{children:le.jsx(XV,{children:le.jsx(Q4,{onParcelClick:t})})})})}function Z4(){const e=i=>{console.log("Clicked parcel:",i.x,i.y)};return le.jsx(J4,{onParcelClick:e})}const x4=()=>le.jsx("div",{className:"worlds-page",children:le.jsxs("div",{className:"worlds-container",children:[le.jsxs("div",{className:"worlds-search-section",children:[le.jsx("h2",{children:"Ban a World"}),le.jsxs("div",{className:"worlds-search-box",children:[le.jsx("input",{type:"text",placeholder:"Enter world name (e.g., boedo.dcl.eth)",className:"worlds-search-input"}),le.jsx("button",{className:"worlds-search-button",children:"Ban World"})]})]}),le.jsxs("div",{className:"worlds-list-section",children:[le.jsx("h3",{children:"Banned Worlds"}),le.jsx("p",{className:"worlds-empty-state",children:"No banned worlds yet."})]})]})}),$4={defaultChainId:Number(kd.get("CHAIN_ID")),authUrl:kd.get("AUTH_URL"),basePath:"/mobile-hub"},e3=/^decentraland.(zone|org|today)$/.test(window.location.host)?"/mobile-hub":"/";function t3(){const[e,i]=re.useState("map");return le.jsx(sk,{basename:e3,children:le.jsxs(qU,{config:$4,children:[le.jsx(iV,{tabs:le.jsx(aV,{activeView:e,onViewChange:i})}),e==="map"?le.jsx(Z4,{}):le.jsx(x4,{})]})})}FL.createRoot(document.getElementById("root")).render(le.jsx(re.StrictMode,{children:le.jsx(t3,{})}));export{ol as _,ML as a,U2 as b,NL as c,TC as e,CL as g,ZF as r,r3 as x};