@dcl-regenesislabs/mobile-hub 1.0.1 → 1.0.2-23717828674.commit-8d84b10

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.
@@ -16,7 +16,7 @@ Please change the parent <Route path="${v}"> to <Route path="${v==="/"?"*":`${v}
16
16
  missingProperty: ${h},
17
17
  depsCount: ${p},
18
18
  deps: ${m}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(f){const[p,m]=s(f);u(f,p),c(f,m)}};function s({schema:f}){const p={},m={};for(const h in f){if(h==="__proto__")continue;const _=Array.isArray(f[h])?p:m;_[h]=f[h]}return[p,m]}function u(f,p=f.schema){const{gen:m,data:h,it:_}=f;if(Object.keys(p).length===0)return;const T=m.let("missing");for(const C in p){const O=p[C];if(O.length===0)continue;const E=(0,n.propertyInData)(m,h,C,_.opts.ownProperties);f.setParams({property:C,depsCount:O.length,deps:O.join(", ")}),_.allErrors?m.if(E,()=>{for(const R of O)(0,n.checkReportMissingProp)(f,R)}):(m.if((0,a._)`${E} && (${(0,n.checkMissingProp)(f,O,T)})`),(0,n.reportMissingProp)(f,T),m.else())}}e.validatePropertyDeps=u;function c(f,p=f.schema){const{gen:m,data:h,keyword:_,it:T}=f,C=m.name("valid");for(const O in p)(0,t.alwaysValidSchema)(T,p[O])||(m.if((0,n.propertyInData)(m,h,O,T.opts.ownProperties),()=>{const E=f.subschema({keyword:_,schemaProp:O},C);f.mergeValidEvaluated(E,C)},()=>m.var(C,!0)),f.ok(C))}e.validateSchemaDeps=c,e.default=i})(ih)),ih}var $c={},rS;function jq(){if(rS)return $c;rS=1,Object.defineProperty($c,"__esModule",{value:!0});const e=Pt(),a=Wt(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,e._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:s,schema:u,data:c,it:f}=i;if((0,a.alwaysValidSchema)(f,u))return;const p=s.name("valid");s.forIn("key",c,m=>{i.setParams({propertyName:m}),i.subschema({keyword:"propertyNames",data:m,dataTypes:["string"],propertyName:m,compositeRule:!0},p),s.if((0,e.not)(p),()=>{i.error(!0),f.allErrors||s.break()})}),i.ok(p)}};return $c.default=n,$c}var ed={},nS;function bM(){if(nS)return ed;nS=1,Object.defineProperty(ed,"__esModule",{value:!0});const e=fa(),a=Pt(),t=ri(),n=Wt(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:u})=>(0,a._)`{additionalProperty: ${u.additionalProperty}}`},code(u){const{gen:c,schema:f,parentSchema:p,data:m,errsCount:h,it:_}=u;if(!h)throw new Error("ajv implementation error");const{allErrors:T,opts:C}=_;if(_.props=!0,C.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(_,f))return;const O=(0,e.allSchemaProperties)(p.properties),E=(0,e.allSchemaProperties)(p.patternProperties);R(),u.ok((0,a._)`${h} === ${t.default.errors}`);function R(){c.forIn("key",m,S=>{!O.length&&!E.length?A(S):c.if(v(S),()=>A(S))})}function v(S){let M;if(O.length>8){const U=(0,n.schemaRefOrVal)(_,p.properties,"properties");M=(0,e.isOwnProperty)(c,U,S)}else O.length?M=(0,a.or)(...O.map(U=>(0,a._)`${S} === ${U}`)):M=a.nil;return E.length&&(M=(0,a.or)(M,...E.map(U=>(0,a._)`${(0,e.usePattern)(u,U)}.test(${S})`))),(0,a.not)(M)}function I(S){c.code((0,a._)`delete ${m}[${S}]`)}function A(S){if(C.removeAdditional==="all"||C.removeAdditional&&f===!1){I(S);return}if(f===!1){u.setParams({additionalProperty:S}),u.error(),T||c.break();return}if(typeof f=="object"&&!(0,n.alwaysValidSchema)(_,f)){const M=c.name("valid");C.removeAdditional==="failing"?(y(S,M,!1),c.if((0,a.not)(M),()=>{u.reset(),I(S)})):(y(S,M),T||c.if((0,a.not)(M),()=>c.break()))}}function y(S,M,U){const V={keyword:"additionalProperties",dataProp:S,dataPropType:n.Type.Str};U===!1&&Object.assign(V,{compositeRule:!0,createErrors:!1,allErrors:!1}),u.subschema(V,M)}}};return ed.default=s,ed}var td={},aS;function Lq(){if(aS)return td;aS=1,Object.defineProperty(td,"__esModule",{value:!0});const e=Tl(),a=fa(),t=Wt(),n=bM(),i={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:u,schema:c,parentSchema:f,data:p,it:m}=s;m.opts.removeAdditional==="all"&&f.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(m,n.default,"additionalProperties"));const h=(0,a.allSchemaProperties)(c);for(const E of h)m.definedProperties.add(E);m.opts.unevaluated&&h.length&&m.props!==!0&&(m.props=t.mergeEvaluated.props(u,(0,t.toHash)(h),m.props));const _=h.filter(E=>!(0,t.alwaysValidSchema)(m,c[E]));if(_.length===0)return;const T=u.name("valid");for(const E of _)C(E)?O(E):(u.if((0,a.propertyInData)(u,p,E,m.opts.ownProperties)),O(E),m.allErrors||u.else().var(T,!0),u.endIf()),s.it.definedProperties.add(E),s.ok(T);function C(E){return m.opts.useDefaults&&!m.compositeRule&&c[E].default!==void 0}function O(E){s.subschema({keyword:"properties",schemaProp:E,dataProp:E},T)}}};return td.default=i,td}var rd={},iS;function Dq(){if(iS)return rd;iS=1,Object.defineProperty(rd,"__esModule",{value:!0});const e=fa(),a=Pt(),t=Wt(),n=Wt(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:u,schema:c,data:f,parentSchema:p,it:m}=s,{opts:h}=m,_=(0,e.allSchemaProperties)(c),T=_.filter(A=>(0,t.alwaysValidSchema)(m,c[A]));if(_.length===0||T.length===_.length&&(!m.opts.unevaluated||m.props===!0))return;const C=h.strictSchema&&!h.allowMatchingProperties&&p.properties,O=u.name("valid");m.props!==!0&&!(m.props instanceof a.Name)&&(m.props=(0,n.evaluatedPropsToName)(u,m.props));const{props:E}=m;R();function R(){for(const A of _)C&&v(A),m.allErrors?I(A):(u.var(O,!0),I(A),u.if(O))}function v(A){for(const y in C)new RegExp(A).test(y)&&(0,t.checkStrictMode)(m,`property ${y} matches pattern ${A} (use allowMatchingProperties)`)}function I(A){u.forIn("key",f,y=>{u.if((0,a._)`${(0,e.usePattern)(s,A)}.test(${y})`,()=>{const S=T.includes(A);S||s.subschema({keyword:"patternProperties",schemaProp:A,dataProp:y,dataPropType:n.Type.Str},O),m.opts.unevaluated&&E!==!0?u.assign((0,a._)`${E}[${y}]`,!0):!S&&!m.allErrors&&u.if((0,a.not)(O),()=>u.break())})})}}};return rd.default=i,rd}var nd={},oS;function kq(){if(oS)return nd;oS=1,Object.defineProperty(nd,"__esModule",{value:!0});const e=Wt(),a={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:n,schema:i,it:s}=t;if((0,e.alwaysValidSchema)(s,i)){t.fail();return}const u=n.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},u),t.failResult(u,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};return nd.default=a,nd}var ad={},sS;function qq(){if(sS)return ad;sS=1,Object.defineProperty(ad,"__esModule",{value:!0});const a={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:fa().validateUnion,error:{message:"must match a schema in anyOf"}};return ad.default=a,ad}var id={},uS;function Bq(){if(uS)return id;uS=1,Object.defineProperty(id,"__esModule",{value:!0});const e=Pt(),a=Wt(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,e._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:s,schema:u,parentSchema:c,it:f}=i;if(!Array.isArray(u))throw new Error("ajv implementation error");if(f.opts.discriminator&&c.discriminator)return;const p=u,m=s.let("valid",!1),h=s.let("passing",null),_=s.name("_valid");i.setParams({passing:h}),s.block(T),i.result(m,()=>i.reset(),()=>i.error(!0));function T(){p.forEach((C,O)=>{let E;(0,a.alwaysValidSchema)(f,C)?s.var(_,!0):E=i.subschema({keyword:"oneOf",schemaProp:O,compositeRule:!0},_),O>0&&s.if((0,e._)`${_} && ${m}`).assign(m,!1).assign(h,(0,e._)`[${h}, ${O}]`).else(),s.if(_,()=>{s.assign(m,!0),s.assign(h,O),E&&i.mergeEvaluated(E,e.Name)})})}}};return id.default=n,id}var od={},lS;function Uq(){if(lS)return od;lS=1,Object.defineProperty(od,"__esModule",{value:!0});const e=Wt(),a={keyword:"allOf",schemaType:"array",code(t){const{gen:n,schema:i,it:s}=t;if(!Array.isArray(i))throw new Error("ajv implementation error");const u=n.name("valid");i.forEach((c,f)=>{if((0,e.alwaysValidSchema)(s,c))return;const p=t.subschema({keyword:"allOf",schemaProp:f},u);t.ok(u),t.mergeEvaluated(p)})}};return od.default=a,od}var sd={},cS;function Fq(){if(cS)return sd;cS=1,Object.defineProperty(sd,"__esModule",{value:!0});const e=Pt(),a=Wt(),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:u,parentSchema:c,it:f}=s;c.then===void 0&&c.else===void 0&&(0,a.checkStrictMode)(f,'"if" without "then" and "else" is ignored');const p=i(f,"then"),m=i(f,"else");if(!p&&!m)return;const h=u.let("valid",!0),_=u.name("_valid");if(T(),s.reset(),p&&m){const O=u.let("ifClause");s.setParams({ifClause:O}),u.if(_,C("then",O),C("else",O))}else p?u.if(_,C("then")):u.if((0,e.not)(_),C("else"));s.pass(h,()=>s.error(!0));function T(){const O=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},_);s.mergeEvaluated(O)}function C(O,E){return()=>{const R=s.subschema({keyword:O},_);u.assign(h,_),s.mergeValidEvaluated(R,h),E?u.assign(E,(0,e._)`${O}`):s.setParams({ifClause:O})}}}};function i(s,u){const c=s.schema[u];return c!==void 0&&!(0,a.alwaysValidSchema)(s,c)}return sd.default=n,sd}var ud={},dS;function Vq(){if(dS)return ud;dS=1,Object.defineProperty(ud,"__esModule",{value:!0});const e=Wt(),a={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:n,it:i}){n.if===void 0&&(0,e.checkStrictMode)(i,`"${t}" without "if" is ignored`)}};return ud.default=a,ud}var fS;function Hq(){if(fS)return Jc;fS=1,Object.defineProperty(Jc,"__esModule",{value:!0});const e=vM(),a=Nq(),t=EM(),n=Rq(),i=Cq(),s=Mq(),u=jq(),c=bM(),f=Lq(),p=Dq(),m=kq(),h=qq(),_=Bq(),T=Uq(),C=Fq(),O=Vq();function E(R=!1){const v=[m.default,h.default,_.default,T.default,C.default,O.default,u.default,c.default,s.default,f.default,p.default];return R?v.push(a.default,n.default):v.push(e.default,t.default),v.push(i.default),v}return Jc.default=E,Jc}var ld={},cd={},pS;function zq(){if(pS)return cd;pS=1,Object.defineProperty(cd,"__esModule",{value:!0});const e=Pt(),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,i){const{gen:s,data:u,$data:c,schema:f,schemaCode:p,it:m}=n,{opts:h,errSchemaPath:_,schemaEnv:T,self:C}=m;if(!h.validateFormats)return;c?O():E();function O(){const R=s.scopeValue("formats",{ref:C.formats,code:h.code.formats}),v=s.const("fDef",(0,e._)`${R}[${p}]`),I=s.let("fType"),A=s.let("format");s.if((0,e._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>s.assign(I,(0,e._)`${v}.type || "string"`).assign(A,(0,e._)`${v}.validate`),()=>s.assign(I,(0,e._)`"string"`).assign(A,v)),n.fail$data((0,e.or)(y(),S()));function y(){return h.strictSchema===!1?e.nil:(0,e._)`${p} && !${A}`}function S(){const M=T.$async?(0,e._)`(${v}.async ? await ${A}(${u}) : ${A}(${u}))`:(0,e._)`${A}(${u})`,U=(0,e._)`(typeof ${A} == "function" ? ${M} : ${A}.test(${u}))`;return(0,e._)`${A} && ${A} !== true && ${I} === ${i} && !${U}`}}function E(){const R=C.formats[f];if(!R){y();return}if(R===!0)return;const[v,I,A]=S(R);v===i&&n.pass(M());function y(){if(h.strictSchema===!1){C.logger.warn(U());return}throw new Error(U());function U(){return`unknown format "${f}" ignored in schema at path "${_}"`}}function S(U){const V=U instanceof RegExp?(0,e.regexpCode)(U):h.code.formats?(0,e._)`${h.code.formats}${(0,e.getProperty)(f)}`:void 0,Q=s.scopeValue("formats",{key:f,ref:U,code:V});return typeof U=="object"&&!(U instanceof RegExp)?[U.type||"string",U.validate,(0,e._)`${Q}.validate`]:["string",U,Q]}function M(){if(typeof R=="object"&&!(R instanceof RegExp)&&R.async){if(!T.$async)throw new Error("async format in sync schema");return(0,e._)`await ${A}(${u})`}return typeof I=="function"?(0,e._)`${A}(${u})`:(0,e._)`${A}.test(${u})`}}}};return cd.default=t,cd}var hS;function Wq(){if(hS)return ld;hS=1,Object.defineProperty(ld,"__esModule",{value:!0});const a=[zq().default];return ld.default=a,ld}var so={},mS;function Gq(){return mS||(mS=1,Object.defineProperty(so,"__esModule",{value:!0}),so.contentVocabulary=so.metadataVocabulary=void 0,so.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],so.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),so}var yS;function Kq(){if(yS)return jc;yS=1,Object.defineProperty(jc,"__esModule",{value:!0});const e=yq(),a=Iq(),t=Hq(),n=Wq(),i=Gq(),s=[e.default,a.default,(0,t.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return jc.default=s,jc}var dd={},Nu={},gS;function Yq(){if(gS)return Nu;gS=1,Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.DiscrError=void 0;var e;return(function(a){a.Tag="tag",a.Mapping="mapping"})(e||(Nu.DiscrError=e={})),Nu}var _S;function Xq(){if(_S)return dd;_S=1,Object.defineProperty(dd,"__esModule",{value:!0});const e=Pt(),a=Yq(),t=tE(),n=sf(),i=Wt(),u={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:c,tagName:f}})=>c===a.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:m,parentSchema:h,it:_}=c,{oneOf:T}=h;if(!_.opts.discriminator)throw new Error("discriminator: requires discriminator option");const C=m.propertyName;if(typeof C!="string")throw new Error("discriminator: requires propertyName");if(m.mapping)throw new Error("discriminator: mapping is not supported");if(!T)throw new Error("discriminator: requires oneOf keyword");const O=f.let("valid",!1),E=f.const("tag",(0,e._)`${p}${(0,e.getProperty)(C)}`);f.if((0,e._)`typeof ${E} == "string"`,()=>R(),()=>c.error(!1,{discrError:a.DiscrError.Tag,tag:E,tagName:C})),c.ok(O);function R(){const A=I();f.if(!1);for(const y in A)f.elseIf((0,e._)`${E} === ${y}`),f.assign(O,v(A[y]));f.else(),c.error(!1,{discrError:a.DiscrError.Mapping,tag:E,tagName:C}),f.endIf()}function v(A){const y=f.name("valid"),S=c.subschema({keyword:"oneOf",schemaProp:A},y);return c.mergeEvaluated(S,e.Name),y}function I(){var A;const y={},S=U(h);let M=!0;for(let ne=0;ne<T.length;ne++){let me=T[ne];if(me?.$ref&&!(0,i.schemaHasRulesButRef)(me,_.self.RULES)){const Ne=me.$ref;if(me=t.resolveRef.call(_.self,_.schemaEnv.root,_.baseId,Ne),me instanceof t.SchemaEnv&&(me=me.schema),me===void 0)throw new n.default(_.opts.uriResolver,_.baseId,Ne)}const be=(A=me?.properties)===null||A===void 0?void 0:A[C];if(typeof be!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${C}"`);M=M&&(S||U(me)),V(be,ne)}if(!M)throw new Error(`discriminator: "${C}" must be required`);return y;function U({required:ne}){return Array.isArray(ne)&&ne.includes(C)}function V(ne,me){if(ne.const)Q(ne.const,me);else if(ne.enum)for(const be of ne.enum)Q(be,me);else throw new Error(`discriminator: "properties/${C}" must have "const" or "enum"`)}function Q(ne,me){if(typeof ne!="string"||ne in y)throw new Error(`discriminator: "${C}" values must be unique strings`);y[ne]=me}}}};return dd.default=u,dd}const Jq="http://json-schema.org/draft-07/schema#",Qq="http://json-schema.org/draft-07/schema#",Zq="Core schema meta-schema",xq={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:[]}},$q=["object","boolean"],e1={$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:"#"}},t1={$schema:Jq,$id:Qq,title:Zq,definitions:xq,type:$q,properties:e1,default:!0};var vS;function uf(){return vS||(vS=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.MissingRefError=a.ValidationError=a.CodeGen=a.Name=a.nil=a.stringify=a.str=a._=a.KeywordCxt=a.Ajv=void 0;const t=pq(),n=Kq(),i=Xq(),s=t1,u=["/properties"],c="http://json-schema.org/draft-07/schema";class f extends t.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(C=>this.addVocabulary(C)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const C=this.opts.$data?this.$dataMetaSchema(s,u):s;this.addMetaSchema(C,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}a.Ajv=f,e.exports=a=f,e.exports.Ajv=f,Object.defineProperty(a,"__esModule",{value:!0}),a.default=f;var p=Tl();Object.defineProperty(a,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var m=Pt();Object.defineProperty(a,"_",{enumerable:!0,get:function(){return m._}}),Object.defineProperty(a,"str",{enumerable:!0,get:function(){return m.str}}),Object.defineProperty(a,"stringify",{enumerable:!0,get:function(){return m.stringify}}),Object.defineProperty(a,"nil",{enumerable:!0,get:function(){return m.nil}}),Object.defineProperty(a,"Name",{enumerable:!0,get:function(){return m.Name}}),Object.defineProperty(a,"CodeGen",{enumerable:!0,get:function(){return m.CodeGen}});var h=eE();Object.defineProperty(a,"ValidationError",{enumerable:!0,get:function(){return h.default}});var _=sf();Object.defineProperty(a,"MissingRefError",{enumerable:!0,get:function(){return _.default}})})(Ic,Ic.exports)),Ic.exports}var Gu={exports:{}},Ku={exports:{}},Yu={exports:{}},fd={exports:{}},ES;function r1(){return ES||(ES=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t=Pt(),n=["undefined","string","number","object","function","boolean","symbol"];function i(){return{keyword:"typeof",schemaType:["string","array"],code(s){const{data:u,schema:c,schemaValue:f}=s;s.fail(typeof c=="string"?(0,t._)`typeof ${u} != ${c}`:(0,t._)`${f}.indexOf(typeof ${u}) < 0`)},metaSchema:{anyOf:[{type:"string",enum:n},{type:"array",items:{type:"string",enum:n}}]}}}a.default=i,e.exports=i})(fd,fd.exports)),fd.exports}var bS=Yu.exports,wS;function n1(){return wS||(wS=1,(function(e,a){var t=bS&&bS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(r1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(Yu,Yu.exports)),Yu.exports}var Xu={exports:{}},pd={exports:{}},SS;function a1(){return SS||(SS=1,(function(e,a){Object.defineProperty(a,"__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(i,{CONSTRUCTORS:t});function i(){return{keyword:"instanceof",schemaType:["string","array"],compile(u){if(typeof u=="string"){const c=s(u);return f=>f instanceof c}if(Array.isArray(u)){const c=u.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(u){const c=t[u];if(c)return c;throw new Error(`invalid "instanceof" keyword value ${u}`)}a.default=n,e.exports=n})(pd,pd.exports)),pd.exports}var TS=Xu.exports,PS;function i1(){return PS||(PS=1,(function(e,a){var t=TS&&TS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(a1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(Xu,Xu.exports)),Xu.exports}var Ju={exports:{}},Qu={exports:{}},hd={},AS;function wM(){if(AS)return hd;AS=1,Object.defineProperty(hd,"__esModule",{value:!0});function e(a){return()=>({keyword:a,type:"number",schemaType:"array",macro:function([n,i]){return t(n,i),a==="range"?{minimum:n,maximum:i}:{exclusiveMinimum:n,exclusiveMaximum:i}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}});function t(n,i){if(n>i||a==="exclusiveRange"&&n===i)throw new Error("There are no numbers in range")}}return hd.default=e,hd}var OS=Qu.exports,IS;function o1(){return IS||(IS=1,(function(e,a){var t=OS&&OS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const i=(0,t(wM()).default)("range");a.default=i,e.exports=i})(Qu,Qu.exports)),Qu.exports}var NS=Ju.exports,RS;function s1(){return RS||(RS=1,(function(e,a){var t=NS&&NS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(o1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(Ju,Ju.exports)),Ju.exports}var Zu={exports:{}},xu={exports:{}},CS=xu.exports,MS;function u1(){return MS||(MS=1,(function(e,a){var t=CS&&CS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const i=(0,t(wM()).default)("exclusiveRange");a.default=i,e.exports=i})(xu,xu.exports)),xu.exports}var jS=Zu.exports,LS;function l1(){return LS||(LS=1,(function(e,a){var t=jS&&jS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(u1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(Zu,Zu.exports)),Zu.exports}var $u={exports:{}},md={exports:{}},uo={},DS;function lf(){if(DS)return uo;DS=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.usePattern=uo.metaSchemaRef=void 0;const e=Pt(),a="http://json-schema.org/schema";function t({defaultMeta:i}={}){return i===!1?{}:{$ref:i||a}}uo.metaSchemaRef=t;function n({gen:i,it:{opts:s}},u,c=s.unicodeRegExp?"u":""){const f=new RegExp(u,c);return i.scopeValue("pattern",{key:f.toString(),ref:f,code:(0,e._)`new RegExp(${u}, ${c})`})}return uo.usePattern=n,uo}var kS;function c1(){return kS||(kS=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t=Pt(),n=lf(),i={type:"object",properties:{pattern:{type:"string"},flags:{type:"string",nullable:!0}},required:["pattern"],additionalProperties:!1},s=/^\/(.*)\/([gimuy]*)$/;function u(){return{keyword:"regexp",type:"string",schemaType:["string","object"],code(c){const{data:f,schema:p}=c,m=h(p);c.pass((0,t._)`${m}.test(${f})`);function h(_){if(typeof _=="object")return(0,n.usePattern)(c,_.pattern,_.flags);const T=s.exec(_);if(T)return(0,n.usePattern)(c,T[1],T[2]);throw new Error("cannot parse string into RegExp")}},metaSchema:{anyOf:[{type:"string"},i]}}}a.default=u,e.exports=u})(md,md.exports)),md.exports}var qS=$u.exports,BS;function d1(){return BS||(BS=1,(function(e,a){var t=qS&&qS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(c1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})($u,$u.exports)),$u.exports}var el={exports:{}},yd={exports:{}},US;function f1(){return US||(US=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t=Pt(),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},i=Object.assign(s,{transform:n});function s(){return{keyword:"transform",schemaType:"array",before:"enum",code(f){const{gen:p,data:m,schema:h,parentSchema:_,it:T}=f,{parentData:C,parentDataProperty:O}=T,E=h;if(!E.length)return;let R;if(E.includes("toEnumCase")){const I=u(_);R=p.scopeValue("obj",{ref:I,code:(0,t.stringify)(I)})}p.if((0,t._)`typeof ${m} == "string" && ${C} !== undefined`,()=>{p.assign(m,v(E.slice())),p.assign((0,t._)`${C}[${O}]`,m)});function v(I){if(!I.length)return m;const A=I.pop();if(!(A in n))throw new Error(`transform: unknown transformation ${A}`);const y=p.scopeValue("func",{ref:n[A],code:(0,t._)`require("ajv-keywords/dist/definitions/transform").transform${(0,t.getProperty)(A)}`}),S=v(I);return R&&A==="toEnumCase"?(0,t._)`${y}(${S}, ${R})`:(0,t._)`${y}(${S})`}},metaSchema:{type:"array",items:{type:"string",enum:Object.keys(n)}}}}function u(f){const p={hash:{}};if(!f.enum)throw new Error('transform: "toEnumCase" requires "enum"');for(const m of f.enum){if(typeof m!="string")continue;const h=c(m);if(p.hash[h])throw new Error('transform: "toEnumCase" requires all lowercased "enum" values to be unique');p.hash[h]=m}return p}function c(f){return f.toLowerCase()}a.default=i,e.exports=i})(yd,yd.exports)),yd.exports}var FS=el.exports,VS;function p1(){return VS||(VS=1,(function(e,a){var t=FS&&FS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(f1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(el,el.exports)),el.exports}var tl={exports:{}},gd={exports:{}},HS;function h1(){return HS||(HS=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t=$v(),n=["number","integer","string","boolean","null"];function i(){return{keyword:"uniqueItemProperties",type:"array",schemaType:"array",compile(u,c){const f=s(u,c);return p=>{if(p.length<=1)return!0;for(let m=0;m<u.length;m++){const h=u[m];if(f[m]){const _={};for(const T of p){if(!T||typeof T!="object")continue;let C=T[h];if(!(C&&typeof C=="object")){if(typeof C=="string"&&(C='"'+C),_[C])return!1;_[C]=!0}}}else for(let _=p.length;_--;){const T=p[_];if(!(!T||typeof T!="object"))for(let C=_;C--;){const O=p[C];if(O&&typeof O=="object"&&t(T[h],O[h]))return!1}}}return!0}},metaSchema:{type:"array",items:{type:"string"}}}}a.default=i;function s(u,c){return u.map(f=>{var p,m,h;const _=(h=(m=(p=c.items)===null||p===void 0?void 0:p.properties)===null||m===void 0?void 0:m[f])===null||h===void 0?void 0:h.type;return Array.isArray(_)?!_.includes("object")&&!_.includes("array"):n.includes(_)})}e.exports=i})(gd,gd.exports)),gd.exports}var zS=tl.exports,WS;function m1(){return WS||(WS=1,(function(e,a){var t=zS&&zS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(h1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(tl,tl.exports)),tl.exports}var rl={exports:{}},_d={exports:{}},GS;function y1(){return GS||(GS=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});function t(){return{keyword:"allRequired",type:"object",schemaType:"boolean",macro(n,i){if(!n)return!0;const s=Object.keys(i.properties);return s.length===0?!0:{required:s}},dependencies:["properties"]}}a.default=t,e.exports=t})(_d,_d.exports)),_d.exports}var KS=rl.exports,YS;function g1(){return YS||(YS=1,(function(e,a){var t=KS&&KS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(y1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(rl,rl.exports)),rl.exports}var nl={exports:{}},al={exports:{}},vd={},XS;function SM(){if(XS)return vd;XS=1,Object.defineProperty(vd,"__esModule",{value:!0});function e(a){return()=>({keyword:a,type:"object",schemaType:"array",macro(t){return t.length===0?!0:t.length===1?{required:t}:{[a==="anyRequired"?"anyOf":"oneOf"]:t.map(i=>({required:[i]}))}},metaSchema:{type:"array",items:{type:"string"}}})}return vd.default=e,vd}var JS=al.exports,QS;function _1(){return QS||(QS=1,(function(e,a){var t=JS&&JS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const i=(0,t(SM()).default)("anyRequired");a.default=i,e.exports=i})(al,al.exports)),al.exports}var ZS=nl.exports,xS;function v1(){return xS||(xS=1,(function(e,a){var t=ZS&&ZS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(_1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(nl,nl.exports)),nl.exports}var il={exports:{}},ol={exports:{}},$S=ol.exports,eT;function E1(){return eT||(eT=1,(function(e,a){var t=$S&&$S.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const i=(0,t(SM()).default)("oneRequired");a.default=i,e.exports=i})(ol,ol.exports)),ol.exports}var tT=il.exports,rT;function b1(){return rT||(rT=1,(function(e,a){var t=tT&&tT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(E1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(il,il.exports)),il.exports}var sl={exports:{}},Ed={exports:{}},nT;function w1(){return nT||(nT=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t=Pt(),n=lf(),i={message:({params:{missingPattern:u}})=>(0,t.str)`should have property matching pattern '${u}'`,params:({params:{missingPattern:u}})=>(0,t._)`{missingPattern: ${u}}`};function s(){return{keyword:"patternRequired",type:"object",schemaType:"array",error:i,code(u){const{gen:c,schema:f,data:p}=u;if(f.length===0)return;const m=c.let("valid",!0);for(const _ of f)h(_);function h(_){const T=c.let("matched",!1);c.forIn("key",p,C=>{c.assign(T,(0,t._)`${(0,n.usePattern)(u,_)}.test(${C})`),c.if(T,()=>c.break())}),u.setParams({missingPattern:_}),c.assign(m,(0,t.and)(m,T)),u.pass(m)}},metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:!0}}}a.default=s,e.exports=s})(Ed,Ed.exports)),Ed.exports}var aT=sl.exports,iT;function S1(){return iT||(iT=1,(function(e,a){var t=aT&&aT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(w1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(sl,sl.exports)),sl.exports}var ul={exports:{}},bd={exports:{}},oT;function T1(){return oT||(oT=1,(function(e,a){Object.defineProperty(a,"__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(i=>({required:[i]}))}}},metaSchema:{type:"array",items:{type:"string"}}}}a.default=t,e.exports=t})(bd,bd.exports)),bd.exports}var sT=ul.exports,uT;function P1(){return uT||(uT=1,(function(e,a){var t=sT&&sT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(T1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(ul,ul.exports)),ul.exports}var ll={exports:{}},wd={exports:{}},lT;function A1(){return lT||(lT=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t=lf();function n(u){return{keyword:"deepProperties",type:"object",schemaType:"object",macro:function(c){const f=[];for(const p in c)f.push(i(p,c[p]));return{allOf:f}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:(0,t.metaSchemaRef)(u)}}}a.default=n;function i(u,c){const f=u.split("/"),p={};let m=p;for(let h=1;h<f.length;h++){let _=f[h];const T=h===f.length-1;_=s(_);const C=m.properties={};let O;if(/[0-9]+/.test(_)){let E=+_;for(O=m.items=[],m.type=["object","array"];E--;)O.push({})}else m.type="object";m=T?c:{},C[_]=m,O&&O.push(m)}return p}function s(u){return u.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=n})(wd,wd.exports)),wd.exports}var cT=ll.exports,dT;function O1(){return dT||(dT=1,(function(e,a){var t=cT&&cT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(A1()),i=(s,u)=>s.addKeyword((0,n.default)(u));a.default=i,e.exports=i})(ll,ll.exports)),ll.exports}var cl={exports:{}},Sd={exports:{}},fT;function I1(){return fT||(fT=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t=Pt();function n(){return{keyword:"deepRequired",type:"object",schemaType:"array",code(s){const{schema:u,data:c}=s,f=u.map(m=>(0,t._)`(${p(m)}) === undefined`);s.fail((0,t.or)(...f));function p(m){if(m==="")throw new Error("empty JSON pointer not allowed");const h=m.split("/");let _=c;const T=h.map((C,O)=>O?_=(0,t._)`${_}${(0,t.getProperty)(i(C))}`:_);return(0,t.and)(...T)}},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}}}a.default=n;function i(s){return s.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=n})(Sd,Sd.exports)),Sd.exports}var pT=cl.exports,hT;function N1(){return hT||(hT=1,(function(e,a){var t=pT&&pT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(I1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(cl,cl.exports)),cl.exports}var dl={exports:{}},Td={exports:{}},mT;function R1(){return mT||(mT=1,(function(e,a){Object.defineProperty(a,"__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:m=>{var h;const _=(h=m?.max)!==null&&h!==void 0?h:2;return()=>Math.floor(Math.random()*_)},seq:m=>{var h;const _=(h=m?.name)!==null&&h!==void 0?h:"";return t[_]||(t[_]=0),()=>t[_]++}},i=Object.assign(s,{DEFAULTS:n});function s(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(m,h,_){if(!_.opts.useDefaults||_.compositeRule)return()=>!0;const T={};for(const O in m)T[O]=u(m[O]);const C=_.opts.useDefaults==="empty";return O=>{for(const E in m)(O[E]===void 0||C&&(O[E]===null||O[E]===""))&&(O[E]=T[E]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function u(m){return typeof m=="object"?c(m):f(m)}function c({func:m,args:h}){const _=n[m];return p(m,_),_(h)}function f(m=""){const h=n[m];return p(m,h),h()}function p(m,h){if(!h)throw new Error(`invalid "dynamicDefaults" keyword property value: ${m}`)}a.default=i,e.exports=i})(Td,Td.exports)),Td.exports}var yT=dl.exports,gT;function C1(){return gT||(gT=1,(function(e,a){var t=yT&&yT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(R1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(dl,dl.exports)),dl.exports}var fl={exports:{}},Pd={exports:{}},_T;function M1(){return _T||(_T=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t=Pt(),n=lf(),i={message:({params:{schemaProp:u}})=>u?(0,t.str)`should match case "${u}" schema`:(0,t.str)`should match default case schema`,params:({params:{schemaProp:u}})=>u?(0,t._)`{failingCase: ${u}}`:(0,t._)`{failingDefault: true}`};function s(u){const c=(0,n.metaSchemaRef)(u);return[{keyword:"select",schemaType:["string","number","boolean","null"],$data:!0,error:i,dependencies:["selectCases"],code(f){const{gen:p,schemaCode:m,parentSchema:h}=f;f.block$data(t.nil,()=>{const _=p.let("valid",!0),T=p.name("_valid"),C=p.const("value",(0,t._)`${m} === null ? "null" : ${m}`);p.if(!1);for(const O in h.selectCases){f.setParams({schemaProp:O}),p.elseIf((0,t._)`"" + ${C} == ${O}`);const E=f.subschema({keyword:"selectCases",schemaProp:O},T);f.mergeEvaluated(E,t.Name),p.assign(_,T)}if(p.else(),h.selectDefault!==void 0){f.setParams({schemaProp:void 0});const O=f.subschema({keyword:"selectDefault"},T);f.mergeEvaluated(O,t.Name),p.assign(_,T)}p.endIf(),f.pass(_)})}},{keyword:"selectCases",dependencies:["select"],metaSchema:{type:"object",additionalProperties:c}},{keyword:"selectDefault",dependencies:["select","selectCases"],metaSchema:c}]}a.default=s,e.exports=s})(Pd,Pd.exports)),Pd.exports}var vT=fl.exports,ET;function j1(){return ET||(ET=1,(function(e,a){var t=vT&&vT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(M1()),i=(s,u)=>((0,n.default)(u).forEach(c=>s.addKeyword(c)),s);a.default=i,e.exports=i})(fl,fl.exports)),fl.exports}var bT=Ku.exports,wT;function L1(){return wT||(wT=1,(function(e,a){var t=bT&&bT.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(n1()),i=t(i1()),s=t(s1()),u=t(l1()),c=t(d1()),f=t(p1()),p=t(m1()),m=t(g1()),h=t(v1()),_=t(b1()),T=t(S1()),C=t(P1()),O=t(O1()),E=t(N1()),R=t(C1()),v=t(j1()),I={typeof:n.default,instanceof:i.default,range:s.default,exclusiveRange:u.default,regexp:c.default,transform:f.default,uniqueItemProperties:p.default,allRequired:m.default,anyRequired:h.default,oneRequired:_.default,patternRequired:T.default,prohibited:C.default,deepProperties:O.default,deepRequired:E.default,dynamicDefaults:R.default,select:v.default};a.default=I,e.exports=I})(Ku,Ku.exports)),Ku.exports}var ST=Gu.exports,TT;function nE(){return TT||(TT=1,(function(e,a){var t=ST&&ST.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(L1()),i=(u,c)=>{if(Array.isArray(c)){for(const f of c)s(f)(u);return u}if(c)return s(c)(u),u;for(c in n.default)s(c)(u);return u};i.get=s;function s(u){const c=n.default[u];if(!c)throw new Error("Unknown keyword "+u);return c}a.default=i,e.exports=i,e.exports.default=i})(Gu,Gu.exports)),Gu.exports}var Ad={exports:{}},PT;function aE(){return PT||(PT=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t=uf(),n=Pt(),i=yl(),s=Tl(),u=Sl(),c=ri(),f="errorMessage",p=new t.Name("emUsed"),m={required:"missingProperty",dependencies:"property",dependentRequired:"property"},h=/\$\{[^}]+\}/,_=/\$\{([^}]+)\}/g,T=/^""\s*\+\s*|\s*\+\s*""$/g;function C(E){return{keyword:f,schemaType:["string","object"],post:!0,code(R){const{gen:v,data:I,schema:A,schemaValue:y,it:S}=R;if(S.createErrors===!1)return;const M=A,U=n.strConcat(c.default.instancePath,S.errorPath);v.if(t._`${c.default.errors} > 0`,()=>{if(typeof M=="object"){const[B,L]=Q(M);L&&ne(L),B&&me(B),be(V(M))}const F=typeof M=="string"?M:M._;F&&Ne(F),E.keepErrors||Ae()});function V({properties:F,items:B}){const L={};if(F){L.props={};for(const K in F)L.props[K]=[]}if(B){L.items={};for(let K=0;K<B.length;K++)L.items[K]=[]}return L}function Q(F){let B,L;for(const K in F){if(K==="properties"||K==="items")continue;const ue=F[K];if(typeof ue=="object"){B||(B={});const Oe=B[K]={};for(const Te in ue)Oe[Te]=[]}else L||(L={}),L[K]=[]}return[B,L]}function ne(F){const B=v.const("emErrors",t.stringify(F)),L=v.const("templates",le(F,A));v.forOf("err",c.default.vErrors,Te=>v.if(Re(Te,B),()=>v.code(t._`${B}[${Te}.keyword].push(${Te})`).assign(t._`${Te}.${p}`,!0)));const{singleError:K}=E;if(K){const Te=v.let("message",t._`""`),Be=v.let("paramsErrors",t._`[]`);ue(je=>{v.if(Te,()=>v.code(t._`${Te} += ${typeof K=="string"?K:";"}`)),v.code(t._`${Te} += ${Oe(je)}`),v.assign(Be,t._`${Be}.concat(${B}[${je}])`)}),u.reportError(R,{message:Te,params:t._`{errors: ${Be}}`})}else ue(Te=>u.reportError(R,{message:Oe(Te),params:t._`{errors: ${B}[${Te}]}`}));function ue(Te){v.forIn("key",B,Be=>v.if(t._`${B}[${Be}].length`,()=>Te(Be)))}function Oe(Te){return t._`${Te} in ${L} ? ${L}[${Te}]() : ${y}[${Te}]`}}function me(F){const B=v.const("emErrors",t.stringify(F)),L=[];for(const Be in F)L.push([Be,le(F[Be],A[Be])]);const K=v.const("templates",v.object(...L)),ue=v.scopeValue("obj",{ref:m,code:t.stringify(m)}),Oe=v.let("emPropParams"),Te=v.let("emParamsErrors");v.forOf("err",c.default.vErrors,Be=>v.if(Re(Be,B),()=>{v.assign(Oe,t._`${ue}[${Be}.keyword]`),v.assign(Te,t._`${B}[${Be}.keyword][${Be}.params[${Oe}]]`),v.if(Te,()=>v.code(t._`${Te}.push(${Be})`).assign(t._`${Be}.${p}`,!0))})),v.forIn("key",B,Be=>v.forIn("keyProp",t._`${B}[${Be}]`,je=>{v.assign(Te,t._`${B}[${Be}][${je}]`),v.if(t._`${Te}.length`,()=>{const ce=v.const("tmpl",t._`${K}[${Be}] && ${K}[${Be}][${je}]`);u.reportError(R,{message:t._`${ce} ? ${ce}() : ${y}[${Be}][${je}]`,params:t._`{errors: ${Te}}`})})}))}function be(F){const{props:B,items:L}=F;if(!B&&!L)return;const K=t._`typeof ${I} == "object"`,ue=t._`Array.isArray(${I})`,Oe=v.let("emErrors");let Te,Be;const je=v.let("templates");B&&L?(Te=v.let("emChildKwd"),v.if(K),v.if(ue,()=>{ce(L,A.items),v.assign(Te,t.str`items`)},()=>{ce(B,A.properties),v.assign(Te,t.str`properties`)}),Be=t._`[${Te}]`):L?(v.if(ue),ce(L,A.items),Be=t._`.items`):B&&(v.if(n.and(K,n.not(ue))),ce(B,A.properties),Be=t._`.properties`),v.forOf("err",c.default.vErrors,fe=>Me(fe,Oe,Pe=>v.code(t._`${Oe}[${Pe}].push(${fe})`).assign(t._`${fe}.${p}`,!0))),v.forIn("key",Oe,fe=>v.if(t._`${Oe}[${fe}].length`,()=>{u.reportError(R,{message:t._`${fe} in ${je} ? ${je}[${fe}]() : ${y}${Be}[${fe}]`,params:t._`{errors: ${Oe}[${fe}]}`}),v.assign(t._`${c.default.vErrors}[${c.default.errors}-1].instancePath`,t._`${U} + "/" + ${fe}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),v.endIf();function ce(fe,Pe){v.assign(Oe,t.stringify(fe)),v.assign(je,le(fe,Pe))}}function Ne(F){const B=v.const("emErrs",t._`[]`);v.forOf("err",c.default.vErrors,L=>v.if(ye(L),()=>v.code(t._`${B}.push(${L})`).assign(t._`${L}.${p}`,!0))),v.if(t._`${B}.length`,()=>u.reportError(R,{message:X(F),params:t._`{errors: ${B}}`}))}function Ae(){const F=v.const("emErrs",t._`[]`);v.forOf("err",c.default.vErrors,B=>v.if(t._`!${B}.${p}`,()=>v.code(t._`${F}.push(${B})`))),v.assign(c.default.vErrors,F).assign(c.default.errors,t._`${F}.length`)}function Re(F,B){return n.and(t._`${F}.keyword !== ${f}`,t._`!${F}.${p}`,t._`${F}.instancePath === ${U}`,t._`${F}.keyword in ${B}`,t._`${F}.schemaPath.indexOf(${S.errSchemaPath}) === 0`,t._`/^\\/[^\\/]*$/.test(${F}.schemaPath.slice(${S.errSchemaPath.length}))`)}function Me(F,B,L){v.if(n.and(t._`${F}.keyword !== ${f}`,t._`!${F}.${p}`,t._`${F}.instancePath.indexOf(${U}) === 0`),()=>{const K=v.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:t._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),ue=v.const("emMatches",t._`${K}.exec(${F}.instancePath.slice(${U}.length))`),Oe=v.const("emChild",t._`${ue} && ${ue}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);v.if(t._`${Oe} !== undefined && ${Oe} in ${B}`,()=>L(Oe))})}function ye(F){return n.and(t._`${F}.keyword !== ${f}`,t._`!${F}.${p}`,n.or(t._`${F}.instancePath === ${U}`,n.and(t._`${F}.instancePath.indexOf(${U}) === 0`,t._`${F}.instancePath[${U}.length] === "/"`)),t._`${F}.schemaPath.indexOf(${S.errSchemaPath}) === 0`,t._`${F}.schemaPath[${S.errSchemaPath}.length] === "/"`)}function le(F,B){const L=[];for(const K in F){const ue=B[K];h.test(ue)&&L.push([K,j(ue)])}return v.object(...L)}function X(F){return h.test(F)?new i._Code(i.safeStringify(F).replace(_,(B,L)=>`" + JSON.stringify(${s.getData(L,S)}) + "`).replace(T,"")):t.stringify(F)}function j(F){return t._`function(){return ${X(F)}}`}},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 O=(E,R={})=>{if(!E.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(E.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return E.addKeyword(C(R))};a.default=O,e.exports=O,e.exports.default=O})(Ad,Ad.exports)),Ad.exports}var AT;function We(){if(AT)return $n;AT=1;var e=$n&&$n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty($n,"__esModule",{value:!0}),$n.validateType=$n.generateLazyValidator=$n.Ajv=void 0;const a=e(uf());$n.Ajv=a.default;const t=e(nE()),n=e(aE());function i(u,c){let f=null;const p=(m,h)=>{if(!f){const _=new a.default({$data:!0,allErrors:!0});(0,t.default)(_),(0,n.default)(_,{singleError:!0}),c?.forEach(T=>_.addKeyword(T)),f=_.compile(u),Object.defineProperty(p,"errors",{get(){return f?.errors}})}return f(m,h)};return p}$n.generateLazyValidator=i;function s(u,c){return u.validate(c)}return $n.validateType=s,$n}var OT;function D1(){return OT||(OT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const a=We();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,a.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(Jp)),Jp}var oh={},IT;function k1(){return IT||(IT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const a=We();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})(oh)),oh}var NT;function q1(){return NT||(NT=1,(function(e){var a=ao&&ao.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=ao&&ao.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(D1(),e),t(k1(),e)})(ao)),ao}var lo={},sh={},RT;function B1(){return RT||(RT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(sh)),sh}var uh={},lh={},CT;function cf(){return CT||(CT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const a=We();(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,a.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},i={[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 u(m){return n[m]}t.getMaxSupply=u;function c(m){return s[m]}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(m){return[i[m],s[m]]}t.getGradient=p})(e.Rarity||(e.Rarity={}))})(lh)),lh}var ch={},MT;function Qo(){return MT||(MT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(ch)),ch}var dh={},fh={},jT;function iE(){return jT||(jT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(fh)),fh}var ph={},hh={},LT;function TM(){return LT||(LT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(hh)),hh}var DT;function oE(){return DT||(DT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const a=Qo(),t=We(),n=TM();(function(i){i.schema={oneOf:[Object.assign({},a.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(ph)),ph}var kT;function sE(){return kT||(kT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const a=We(),t=iE(),n=oE();(function(i){i.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"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(dh)),dh}var co={},fo={},mh={},yh={},qT;function Zo(){return qT||(qT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const a=We();(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,a.generateLazyValidator)(t.schema);t.validate=i=>n(i)})(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=i=>n.test(i)})(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=i=>n.test(i)})(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=i=>n.test(i)})(e.IPFSv1||(e.IPFSv1={}))})(yh)),yh}var BT;function PM(){return BT||(BT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const a=Qo(),t=Zo(),n=We();var i;(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)})(i=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:a.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({},i.schema),{nullable:!0})},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(s=e.AvatarInfo||(e.AvatarInfo={}));var u;(function(f){f.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const p=new RegExp(f.schema.pattern,"i");f.validate=m=>p.test(m)})(u=e.LinkUrl||(e.LinkUrl={}));var c;(function(f){f.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:u.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={}))})(mh)),mh}var gh={},UT;function U1(){return UT||(UT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const a=We(),t=PM();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(gh)),gh}var FT;function F1(){return FT||(FT=1,(function(e){var a=fo&&fo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=fo&&fo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(PM(),e),t(U1(),e)})(fo)),fo}var _h={},vh={},VT;function AM(){return VT||(VT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const a=We();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,a.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(vh)),vh}var Eh={},HT;function OM(){return HT||(HT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(Eh)),Eh}var bh={},zT;function IM(){return zT||(zT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const a=We();(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,a.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(bh)),bh}var wh={},Ru={},WT;function uE(){return WT||(WT=1,Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.displayableProperties=void 0,Ru.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Ru}var Sh={},GT;function NM(){return GT||(GT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(Sh)),Sh}var Th={},KT;function RM(){return KT||(KT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(Th)),Th}var YT;function V1(){return YT||(YT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const a=We(),t=uE(),n=AM(),i=IM(),s=NM(),u=RM(),c=OM();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:i.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:u.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,a.generateLazyValidator)(p.schema)})(e.Scene||(e.Scene={}))})(wh)),wh}var XT;function H1(){return XT||(XT=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 a=AM();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return a.FeatureToggles}});var t=OM();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=IM();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=V1();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var s=NM();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return s.Source}});var u=RM();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return u.SpawnPoint}})})(_h)),_h}var po={},Ph={},Ah={},JT;function CM(){return JT||(JT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(Ah)),Ah}var QT;function MM(){return QT||(QT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const a=We(),t=CM();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(Ph)),Ph}var Oh={},ZT;function jM(){return ZT||(ZT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(Oh)),Oh}var Ih={},xT;function lE(){return xT||(xT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const a=cf(),t=We();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:a.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,t.generateLazyValidator)(n);function s(u){return i(u)}e.isStandard=s})(Ih)),Ih}var Nh={},ho={},Rh={},$T;function z1(){return $T||($T=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(Rh)),Rh}var eP;function LM(){return eP||(eP=1,(function(e){var a=ho&&ho.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=ho&&ho.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(z1(),e)})(ho)),ho}var Ch={},tP;function cE(){return tP||(tP=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 a=We();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 i;(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,a.generateLazyValidator)(h.schema)})(i=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,a.generateLazyValidator)(h.schema)})(s=e.AnyMapping||(e.AnyMapping={}));var u;(function(h){h._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(T,C){if(!C||!C.from||!C.to)return!1;let{to:O,from:E}=C;return(typeof E!="bigint"||typeof O!="bigint")&&(E=BigInt(E),O=BigInt(O)),E<=O},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,a.generateLazyValidator)(h.schema,[h._fromLessThanOrEqualTo])})(u=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,a.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:[i.schema,s.schema,u.schema,c.schema]},h.validate=(0,a.generateLazyValidator)(h.schema,[u._fromLessThanOrEqualTo])})(f=e.Mapping||(e.Mapping={})),(function(h){h._isMappingsValid={keyword:"_isMappingsValid",validate:function(T,C){try{m(C)}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 _=Object.values(n).reduce((T,C)=>(T[C]=h.innerSchema,T),{});h.schema={type:"object",properties:_,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},h.validate=(0,a.generateLazyValidator)(h.schema,[u._fromLessThanOrEqualTo,h._isMappingsValid])})(e.Mappings||(e.Mappings={}));class p extends Error{constructor(_,T,C){super(_),this.existingMapping=T,this.conflictingMapping=C}}e.AddMappingError=p;function m(h={}){const _={};for(const[y,S]of Object.entries(h)){_[y]={};for(const[M,U]of Object.entries(S))for(const V of U)I(y,M,V)}function T(){return JSON.parse(JSON.stringify(_))}function C(y,S,M){const U=BigInt(y);return U>=BigInt(S)&&U<=BigInt(M)}function O(y,S){switch(S.type){case t.SINGLE:return y.id===S.id;case t.MULTIPLE:return S.ids.includes(y.id);case t.RANGE:return C(y.id,S.from,S.to);default:return!1}}function E(y,S){switch(S.type){case t.SINGLE:return y.ids.includes(S.id);case t.MULTIPLE:return y.ids.some(M=>S.ids.includes(M));case t.RANGE:return y.ids.some(M=>C(M,S.from,S.to));default:return!1}}function R(y,S){switch(S.type){case t.SINGLE:return C(S.id,y.from,y.to);case t.MULTIPLE:return S.ids.some(M=>C(M,y.from,y.to));case t.RANGE:return BigInt(y.from)<=BigInt(S.to)&&BigInt(y.to)>=BigInt(S.from)}}function v(y,S){if(y.type===t.ANY||S.type===t.ANY)return!0;switch(y.type){case t.SINGLE:return O(y,S);case t.MULTIPLE:return E(y,S);case t.RANGE:return R(y,S)}}function I(y,S,M){var U,V;const Q=S.toLowerCase();_[y]=(U=_[y])!==null&&U!==void 0?U:{},_[y][Q]=(V=_[y][Q])!==null&&V!==void 0?V:[];for(const ne of _[y][Q])if(v(ne,M))throw new p(`Cannot add mapping to contract ${Q} on network ${y} because it overlaps with existing mapping`,ne,M);_[y][Q].push(M)}function A(y,S,M){var U;return!((U=_[y])===null||U===void 0)&&U[S]?_[y][S].some(V=>{switch(V.type){case t.SINGLE:return V.id===M;case t.ANY:return!0;case t.MULTIPLE:return V.ids.includes(M);case t.RANGE:return BigInt(M)>=BigInt(V.from)&&BigInt(M)<=BigInt(V.to)}}):!1}return{addMapping:I,getMappings:T,includesNft:A}}e.createMappingsHelper=m})(Ch)),Ch}var rP;function dE(){return rP||(rP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const a=We(),t=LM(),n=cE();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 i={keyword:"_containsHashingKeys",validate:function(c,f){var p;const m=f;return!((p=m?.merkleProof)===null||p===void 0)&&p.hashingKeys?m.merkleProof.hashingKeys.every(h=>m.hasOwnProperty(h)):!1},errors:!1},s=(0,a.generateLazyValidator)(e.schema,[i,n.RangeMapping._fromLessThanOrEqualTo,n.Mappings._isMappingsValid]);function u(c){return s(c)}e.isThirdParty=u})(Nh)),Nh}var Mh={},jh={},ta={},nP;function DM(){if(nP)return ta;nP=1,Object.defineProperty(ta,"__esModule",{value:!0}),ta.isBaseEmote=ta.isBaseAvatar=ta.requiredBaseItemProps=ta.baseItemProperties=void 0;const e=MM(),a=jM(),t=uE();ta.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({},a.Metrics.schema),{nullable:!0})}),ta.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(s){if(!s||!s.id)return!1;const u=s.id.split(":"),c=u[1]==="decentraland",f=u[3]==="base-avatars";return u.length===5&&c&&f}ta.isBaseAvatar=n;function i(s){if(!s||!s.id)return!1;const u=s.id.split(":");return u.length===5&&u[1]==="decentraland"&&u[3]==="base-emotes"}return ta.isBaseEmote=i,ta}var aP;function W1(){return aP||(aP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const a=We(),t=Qo(),n=sE(),i=DM(),s=lE(),u=dE(),c=oE(),f=cE();(function(p){p.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),s.standardProperties),u.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:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const m={keyword:"_isThirdParty",validate:(_,T)=>!_||(0,u.isThirdParty)(T),errors:!1},h={keyword:"_isBaseAvatar",validate:(_,T)=>!_||(0,i.isBaseAvatar)(T),errors:!1};p.validate=(0,a.generateLazyValidator)(p.schema,[m,h,f.RangeMapping._fromLessThanOrEqualTo,f.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(jh)),jh}var iP;function G1(){return iP||(iP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var a=sE();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return a.WearableRepresentation}});var t=W1();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=Qo();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=TM();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var s=oE();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return s.HideableWearableCategory}})})(Mh)),Mh}var Lh={},Dh={},kh={},qh={},oP;function kM(){return oP||(oP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(qh)),qh}var Bh={},sP;function qM(){return sP||(sP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const a=We(),t=iE();(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,a.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(Bh)),Bh}var Uh={},uP;function BM(){return uP||(uP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.OutcomeGroup=e.StartAnimation=e.EmoteClip=e.ArmatureId=void 0;const a=We();var t;(function(i){i.Armature="Armature",i.Armature_Prop="Armature_Prop",i.Armature_Other="Armature_Other"})(t=e.ArmatureId||(e.ArmatureId={})),(function(i){i.schema={type:"string",enum:Object.values(i)},i.validate=(0,a.generateLazyValidator)(i.schema)})(t=e.ArmatureId||(e.ArmatureId={}));var n;(function(i){i.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)"}}},i.validate=(0,a.generateLazyValidator)(i.schema)})(n=e.EmoteClip||(e.EmoteClip={})),(function(i){i.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"}}},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.StartAnimation||(e.StartAnimation={})),(function(i){i.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,u)=>(s[u]=Object.assign(Object.assign({},n.schema),{nullable:!0,errorMessage:`outcome.clips.${u} 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"}}},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.OutcomeGroup||(e.OutcomeGroup={}))})(Uh)),Uh}var lP;function UM(){return lP||(lP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const a=kM(),t=We(),n=qM(),i=BM();(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:a.EmoteCategory.schema,loop:{type:"boolean"},startAnimation:Object.assign(Object.assign({},i.StartAnimation.schema),{nullable:!0}),randomizeOutcomes:{type:"boolean",nullable:!0},outcomes:{type:"array",items:i.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={}))})(kh)),kh}var cP;function K1(){return cP||(cP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const a=FM(),t=We(),n=DM(),i=lE(),s=dE(),u=UM();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),i.standardProperties),s.schema.properties),{emoteDataADR74:u.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:(m,h)=>!m||(0,a.isThirdParty)(h),errors:!1},p={keyword:"_isBaseEmote",validate:(m,h)=>!m||(0,n.isBaseEmote)(h),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[f,p,a.RangeMapping._fromLessThanOrEqualTo,a.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))})(Dh)),Dh}var Fh={},dP;function Y1(){return dP||(dP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(Fh)),Fh}var Vh={},fP;function X1(){return fP||(fP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.EmoteOutcomeType||(e.EmoteOutcomeType={}))})(Vh)),Vh}var pP;function J1(){return pP||(pP=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 a=K1();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return a.Emote}});var t=qM();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=UM();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=BM();Object.defineProperty(e,"ArmatureId",{enumerable:!0,get:function(){return i.ArmatureId}}),Object.defineProperty(e,"EmoteClip",{enumerable:!0,get:function(){return i.EmoteClip}}),Object.defineProperty(e,"OutcomeGroup",{enumerable:!0,get:function(){return i.OutcomeGroup}}),Object.defineProperty(e,"StartAnimation",{enumerable:!0,get:function(){return i.StartAnimation}});var s=kM();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return s.EmoteCategory}});var u=Y1();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return u.EmotePlayMode}});var c=X1();Object.defineProperty(e,"EmoteOutcomeType",{enumerable:!0,get:function(){return c.EmoteOutcomeType}})})(Lh)),Lh}var hP;function FM(){return hP||(hP=1,(function(e){var a=po&&po.__createBinding||(Object.create?(function(p,m,h,_){_===void 0&&(_=h);var T=Object.getOwnPropertyDescriptor(m,h);(!T||("get"in T?!m.__esModule:T.writable||T.configurable))&&(T={enumerable:!0,get:function(){return m[h]}}),Object.defineProperty(p,_,T)}):(function(p,m,h,_){_===void 0&&(_=h),p[_]=m[h]})),t=po&&po.__exportStar||function(p,m){for(var h in p)h!=="default"&&!Object.prototype.hasOwnProperty.call(m,h)&&a(m,p,h)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=MM();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=CM();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var s=jM();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return s.Metrics}});var u=iE();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return u.BodyShape}});var c=lE();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return c.isStandard}});var f=dE();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return f.isThirdParty}}),t(cE(),e),t(G1(),e),t(J1(),e)})(po)),po}var Hh={},zh={},mP;function Pl(){return mP||(mP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const a=We();var t;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(i){i.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"}}}]}},i.validate=(0,a.generateLazyValidator)(i.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(i){i.schema={type:"array",items:n.schema,minItems:1},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.AuthChain||(e.AuthChain={}))})(zh)),zh}var yP;function Q1(){return yP||(yP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const a=Zo(),t=Pl(),n=We();(function(i){i.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:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(i){i.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:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(Hh)),Hh}var Wh={},Gh={},gP;function VM(){return gP||(gP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const a=Zo(),t=We();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[a.IPFSv1.schema,a.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(Gh)),Gh}var _P;function HM(){return _P||(_P=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const a=Zo(),t=VM(),n=We();(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[a.IPFSv1.schema,a.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"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.Entity||(e.Entity={}))})(Wh)),Wh}var Kh={},vP;function Z1(){return vP||(vP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const a=Pl(),t=We();(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:a.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(Kh)),Kh}var mo={},Yh={},EP;function x1(){return EP||(EP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const a=Qo(),t=Zo(),n=We();var i;(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:a.WearableCategory.schema}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(i=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:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(e.Outfits||(e.Outfits={}))})(Yh)),Yh}var bP;function $1(){return bP||(bP=1,(function(e){var a=mo&&mo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=mo&&mo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(x1(),e)})(mo)),mo}var yo={},Xh={},wP;function zM(){return wP||(wP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationOptOutScope=e.NotificationType=void 0,(function(a){a.BADGE_GRANTED="badge_granted",a.BID_ACCEPTED="bid_accepted",a.BID_RECEIVED="bid_received",a.EVENTS_STARTED="events_started",a.EVENTS_STARTS_SOON="events_starts_soon",a.EVENT_CREATED="event_created",a.GOVERNANCE_ANNOUNCEMENT="governance_announcement",a.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",a.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",a.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",a.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",a.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",a.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",a.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",a.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",a.GOVERNANCE_TENDER_PASSED="governance_tender_passed",a.GOVERNANCE_WHALE_VOTE="governance_whale_vote",a.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",a.ITEM_SOLD="item_sold",a.ITEM_PUBLISHED="item_published",a.LAND_RENTAL_ENDED="rental_ended",a.LAND_RENTED="rental_started",a.REWARD_ASSIGNED="reward_assignment",a.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",a.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",a.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",a.REWARD_DELAYED="reward_delayed",a.REWARD_IN_PROGRESS="reward_in_progress",a.ROYALTIES_EARNED="royalties_earned",a.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",a.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",a.WORLDS_ACCESS_RESTORED="worlds_access_restored",a.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",a.WORLDS_MISSING_RESOURCES="worlds_missing_resources",a.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",a.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",a.CREDITS_GOAL_COMPLETED="credits_goal_completed",a.CREDITS_ON_DEMAND_GRANTED="credits_on_demand_granted",a.STREAMING_KEY_RESET="streaming_key_reset",a.STREAMING_KEY_REVOKE="streaming_key_revoke",a.STREAMING_KEY_EXPIRED="streaming_key_expired",a.STREAMING_TIME_EXCEEDED="streaming_time_exceeded",a.STREAMING_PLACE_UPDATED="streaming_place_updated",a.CREDITS_REMINDER_COMPLETE_GOALS="credits_reminder_complete_goals",a.CREDITS_REMINDER_CLAIM_CREDITS="credits_reminder_claim_credits",a.CREDITS_REMINDER_USAGE="credits_reminder_usage",a.CREDITS_REMINDER_USAGE_24_HOURS="credits_reminder_usage_24_hours",a.CREDITS_REMINDER_DO_NOT_MISS_OUT="credits_reminder_do_not_miss_out",a.CREDITS_NEW_SEASON_REMINDER="credits_new_season_reminder",a.REFERRAL_INVITED_USERS_ACCEPTED="referral_invited_users_accepted",a.REFERRAL_NEW_TIER_REACHED="referral_new_tier_reached",a.COMMUNITY_DELETED="community_deleted",a.COMMUNITY_DELETED_CONTENT_VIOLATION="community_deleted_content_violation",a.COMMUNITY_RENAMED="community_renamed",a.COMMUNITY_MEMBER_BANNED="community_member_banned",a.COMMUNITY_MEMBER_REMOVED="community_member_removed",a.COMMUNITY_REQUEST_TO_JOIN_RECEIVED="community_request_to_join_received",a.COMMUNITY_REQUEST_TO_JOIN_ACCEPTED="community_request_to_join_accepted",a.COMMUNITY_INVITE_RECEIVED="community_invite_received",a.COMMUNITY_OWNERSHIP_TRANSFERRED="community_ownership_transferred",a.COMMUNITY_POST_ADDED="community_post_added",a.COMMUNITY_VOICE_CHAT_STARTED="community_voice_chat_started",a.USER_BANNED_FROM_SCENE="user_banned_from_scene",a.USER_UNBANNED_FROM_SCENE="user_unbanned_from_scene",a.TRANSFER_RECEIVED="transfer_received"})(e.NotificationType||(e.NotificationType={})),(function(a){a.COMMUNITY="community"})(e.NotificationOptOutScope||(e.NotificationOptOutScope={}))})(Xh)),Xh}var Jh={},Qh={},SP;function WM(){return SP||(SP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const a=We(),t=zM(),n={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},i=Object.values(t.NotificationType).reduce((s,u)=>(s[u]=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:i}}},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})(Qh)),Qh}var Zh={},TP;function GM(){return TP||(TP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,(function(a){a.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const t=new RegExp(a.schema.pattern);a.validate=n=>t.test(n)})(e.Email||(e.Email={}))})(Zh)),Zh}var PP;function e2(){return PP||(PP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const a=We(),t=WM(),n=Zo(),i=GM();(function(s){s.schema={type:"object",required:["address","details"],properties:{address:n.EthAddress.schema,email:Object.assign(Object.assign({},i.Email.schema),{nullable:!0}),details:t.SubscriptionDetails.schema}},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Subscription||(e.Subscription={}))})(Jh)),Jh}var AP;function t2(){return AP||(AP=1,(function(e){var a=yo&&yo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=yo&&yo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(zM(),e),t(e2(),e),t(WM(),e)})(yo)),yo}var go={},xh={},OP;function hn(){return OP||(OP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,(function(a){(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"})(a.Type||(a.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={}))})(a.SubType||(a.SubType={}))})(e.Events||(e.Events={}))})(xh)),xh}var $h={},IP;function r2(){return IP||(IP=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 a=We(),t=hn();(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,a.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,a.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,a.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,a.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,a.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,a.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,a.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,a.generateLazyValidator)(n.schema)})(e.TransferReceivedEvent||(e.TransferReceivedEvent={}))})($h)),$h}var em={},NP;function n2(){return NP||(NP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const a=Pl(),t=We(),n=HM(),i=hn();(function(s){s.schema={type:"object",properties:{type:{type:"string",const:i.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(i.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:n.Entity.schema,authChain:a.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(em)),em}var tm={},RP;function a2(){return RP||(RP=1,Object.defineProperty(tm,"__esModule",{value:!0})),tm}var rm={},CP;function i2(){return CP||(CP=1,Object.defineProperty(rm,"__esModule",{value:!0})),rm}var nm={},MP;function o2(){return MP||(MP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const a=We(),t=hn();(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,a.generateLazyValidator)(n.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(nm)),nm}var am={},Cu={},jP;function df(){if(jP)return Cu;jP=1,Object.defineProperty(Cu,"__esModule",{value:!0}),Cu.createEventSchema=void 0;function e(a,t,n){return{type:"object",properties:{type:{type:"string",const:a},subType:{type:"string",const:t},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}return Cu.createEventSchema=e,Cu}var LP;function s2(){return LP||(LP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const a=We(),t=hn(),n=df(),i={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(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_IN_PROGRESS,i),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_ASSIGNED,i),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,s),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,s),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,s),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_DELAYED,i),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(am)),am}var im={},DP;function u2(){return DP||(DP=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 a=We(),t=hn();(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,a.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,a.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,a.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,a.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,a.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,a.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,a.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,a.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,a.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,a.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,a.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,a.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,a.generateLazyValidator)(n.schema)})(e.CreditsClaimReminderEvent||(e.CreditsClaimReminderEvent={}))})(im)),im}var om={},kP;function l2(){return kP||(kP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityStreamingEndedEvent=e.StreamingPlaceUpdatedEvent=e.StreamingTimeExceededEvent=e.StreamingKeyExpiredEvent=e.StreamingKeyRevokeEvent=e.StreamingKeyResetEvent=void 0;const a=We(),t=hn(),n=df(),i={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,i),s.validate=(0,a.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,i),s.validate=(0,a.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,i),s.validate=(0,a.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,i),s.validate=(0,a.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,i),s.validate=(0,a.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,a.generateLazyValidator)(s.schema)})(e.CommunityStreamingEndedEvent||(e.CommunityStreamingEndedEvent={}))})(om)),om}var sm={},qP;function c2(){return qP||(qP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserUnbannedFromSceneEvent=e.UserBannedFromSceneEvent=e.UserLeftRoomEvent=e.UserJoinedRoomEvent=e.RoomType=void 0;const a=We(),t=hn();var n;(function(i){i.PRIVATE_MESSAGE="private-message",i.VOICE_CHAT="voice-chat",i.COMMUNITY_VOICE_CHAT="community-voice-chat",i.ISLAND="island",i.SCENE="scene",i.WORLD="world",i.UNKNOWN="unknown"})(n=e.RoomType||(e.RoomType={})),(function(i){i.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"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.UserJoinedRoomEvent||(e.UserJoinedRoomEvent={})),(function(i){i.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},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.UserLeftRoomEvent||(e.UserLeftRoomEvent={})),(function(i){i.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},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.UserBannedFromSceneEvent||(e.UserBannedFromSceneEvent={})),(function(i){i.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},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.UserUnbannedFromSceneEvent||(e.UserUnbannedFromSceneEvent={}))})(sm)),sm}var um={},BP;function d2(){return BP||(BP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReferralNewTierReachedEvent=e.ReferralInvitedUsersAcceptedEvent=void 0;const a=We(),t=hn(),n=df(),i={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,i),s.validate=(0,a.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,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.ReferralNewTierReachedEvent||(e.ReferralNewTierReachedEvent={}))})(um)),um}var lm={},UP;function f2(){return UP||(UP=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 a=We(),t=hn();(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,a.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,a.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,a.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,a.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,a.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,a.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,a.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,a.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,a.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,a.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,a.generateLazyValidator)(n.schema)})(e.CommunityVoiceChatStartedEvent||(e.CommunityVoiceChatStartedEvent={}))})(lm)),lm}var cm={},FP;function p2(){return FP||(FP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoTakenEvent=e.PhotoPrivacyChangedEvent=void 0;const a=We(),t=hn();(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,a.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,a.generateLazyValidator)(n.schema)})(e.PhotoTakenEvent||(e.PhotoTakenEvent={}))})(cm)),cm}var dm={},VP;function h2(){return VP||(VP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventEndedEvent=e.EventCreatedEvent=e.EventStartsSoonEvent=e.EventStartedEvent=void 0;const a=We(),t=hn();(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,a.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,a.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,a.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,a.generateLazyValidator)(n.schema)})(e.EventEndedEvent||(e.EventEndedEvent={}))})(dm)),dm}var fm={},HP;function m2(){return HP||(HP=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 a=We(),t=hn(),n=df(),i={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,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.GovernanceProposalEnactedEvent||(e.GovernanceProposalEnactedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.COAUTHOR_REQUESTED,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.GovernanceCoauthorRequestedEvent||(e.GovernanceCoauthorRequestedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.PITCH_PASSED,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.GovernancePitchPassedEvent||(e.GovernancePitchPassedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.TENDER_PASSED,i),s.validate=(0,a.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,i),s.validate=(0,a.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,i),s.validate=(0,a.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,i),s.validate=(0,a.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,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.GovernanceNewCommentOnProjectUpdatedEvent||(e.GovernanceNewCommentOnProjectUpdatedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.WHALE_VOTE,i),s.validate=(0,a.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,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.GovernanceVotedOnBehalfEvent||(e.GovernanceVotedOnBehalfEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.CLIFF_ENDED,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.GovernanceCliffEndedEvent||(e.GovernanceCliffEndedEvent={}))})(fm)),fm}var pm={},zP;function y2(){return zP||(zP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldsMissingResourcesEvent=e.WorldsAccessRestrictedEvent=e.WorldsPermissionGrantedEvent=e.WorldsPermissionRevokedEvent=e.WorldsAccessRestoredEvent=e.WorldDeploymentEvent=void 0;const a=Pl(),t=We(),n=hn();(function(i){i.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:a.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},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WorldDeploymentEvent||(e.WorldDeploymentEvent={})),(function(i){i.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},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WorldsAccessRestoredEvent||(e.WorldsAccessRestoredEvent={})),(function(i){i.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},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WorldsPermissionRevokedEvent||(e.WorldsPermissionRevokedEvent={})),(function(i){i.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},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WorldsPermissionGrantedEvent||(e.WorldsPermissionGrantedEvent={})),(function(i){i.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},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WorldsAccessRestrictedEvent||(e.WorldsAccessRestrictedEvent={})),(function(i){i.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},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WorldsMissingResourcesEvent||(e.WorldsMissingResourcesEvent={}))})(pm)),pm}var WP;function g2(){return WP||(WP=1,(function(e){var a=go&&go.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=go&&go.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(hn(),e),t(r2(),e),t(n2(),e),t(a2(),e),t(i2(),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)})(go)),go}var GP;function fE(){return GP||(GP=1,(function(e){var a=co&&co.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=co&&co.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(F1(),e),t(H1(),e),t(FM(),e),t(uE(),e),t(LM(),e),t(Q1(),e),t(HM(),e),t(Z1(),e),t($1(),e),t(t2(),e),t(g2(),e)})(co)),co}var KP;function _2(){return KP||(KP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const a=cf(),t=Qo(),n=sE(),i=We(),s=fE();(function(u){u.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},a.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"]},u.validate=(0,i.generateLazyValidator)(u.schema)})(e.WearableJson||(e.WearableJson={}))})(uh)),uh}var YP;function v2(){return YP||(YP=1,(function(e){var a=lo&&lo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=lo&&lo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(B1(),e),t(_2(),e)})(lo)),lo}var XP;function E2(){return XP||(XP=1,(function(e){var a=no&&no.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=no&&no.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(q1(),e),t(v2(),e)})(no)),no}var _o={},hm={},JP;function b2(){return JP||(JP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(hm)),hm}var mm={},ym={},QP;function KM(){return QP||(QP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const a=We(),t=ha();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 i(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=i,(function(s){s.schema={type:"string",enum:Object.values(s)},s.validate=(0,a.generateLazyValidator)(s.schema)})(n=e.ChainName||(e.ChainName={}))})(ym)),ym}var gm={},ZP;function pa(){return ZP||(ZP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(gm)),gm}var xP;function ha(){return xP||(xP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const a=We(),t=KM(),n=pa();var i;(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"})(i=e.ChainId||(e.ChainId={}));function s(p){switch(p){case i.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;case i.MATIC_AMOY:return t.ChainName.MATIC_AMOY;case i.BSC_MAINNET:return t.ChainName.BINANCE_MAINNET;case i.ARBITRUM_MAINNET:return t.ChainName.ARBITRUM_MAINNET;case i.OPTIMISM_MAINNET:return t.ChainName.OPTIMISM_MAINNET;case i.FANTOM_MAINNET:return t.ChainName.FANTOM_MAINNET;case i.AVALANCHE_MAINNET:return t.ChainName.AVALANCHE_MAINNET;default:return null}}e.getChainName=s;function u(p){switch(p){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai";case i.MATIC_AMOY:return"amoy";default:return""}}e.getURNProtocol=u;function c(p){const m={[n.Network.BSC]:i.BSC_MAINNET,[n.Network.OPTIMISM]:i.OPTIMISM_MAINNET,[n.Network.ARBITRUM]:i.ARBITRUM_MAINNET,[n.Network.FANTOM]:i.FANTOM_MAINNET,[n.Network.AVALANCHE]:i.AVALANCHE_MAINNET};switch(p){case i.ETHEREUM_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},m);case i.ETHEREUM_ROPSTEN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[n.Network.MATIC]:i.MATIC_MUMBAI},m);case i.ETHEREUM_RINKEBY:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[n.Network.MATIC]:i.MATIC_MUMBAI},m);case i.ETHEREUM_GOERLI:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[n.Network.MATIC]:i.MATIC_MUMBAI},m);case i.ETHEREUM_KOVAN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[n.Network.MATIC]:i.MATIC_MUMBAI},m);case i.ETHEREUM_SEPOLIA:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[n.Network.MATIC]:i.MATIC_AMOY},m);case i.MATIC_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},m);case i.MATIC_MUMBAI:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MUMBAI,[n.Network.MATIC]:i.MATIC_MUMBAI},m);case i.MATIC_AMOY:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_AMOY,[n.Network.MATIC]:i.MATIC_AMOY},m);default:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},m)}}e.getNetworkMapping=c;function f(p){switch(p){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:case i.MATIC_AMOY:return n.Network.MATIC;case i.BSC_MAINNET:return n.Network.BSC;case i.OPTIMISM_MAINNET:return n.Network.OPTIMISM;case i.ARBITRUM_MAINNET:return n.Network.ARBITRUM;case i.FANTOM_MAINNET:return n.Network.FANTOM;case i.AVALANCHE_MAINNET:return n.Network.AVALANCHE}}e.getNetwork=f,(function(p){p.schema={type:"number",enum:Object.values(p)},p.validate=(0,a.generateLazyValidator)(p.schema)})(i=e.ChainId||(e.ChainId={}))})(mm)),mm}var _m={},$P;function w2(){return $P||($P=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const a=We(),t=ha(),n=pa();(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(i){i.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"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Collection||(e.Collection={}))})(_m)),_m}var vm={},Em={},eA;function ff(){return eA||(eA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(Em)),Em}var tA;function S2(){return tA||(tA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const a=We(),t=ha(),n=pa(),i=ff();(function(s){s.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(s){s.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:n.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Contract||(e.Contract={}))})(vm)),vm}var bm={},wm={},rA;function YM(){return rA||(rA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const a=We(),t=ha(),n=fE(),i=pa(),s=ff(),u=cf(),c=Qo();(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:u.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:u.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:i.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,a.generateLazyValidator)(f.schema)})(e.NFT||(e.NFT={}))})(wm)),wm}var nA;function T2(){return nA||(nA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const a=We(),t=ha(),n=pa(),i=YM(),s=ff();(function(u){u.NAME="name",u.NEWEST="newest",u.RECENTLY_REVIEWED="recently_reviewed",u.RECENTLY_SOLD="recently_sold",u.RECENTLY_LISTED="recently_listed",u.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(u){u.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:i.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"]},u.validate=(0,a.generateLazyValidator)(u.schema)})(e.Item||(e.Item={}))})(bm)),bm}var Sm={},aA;function pE(){return aA||(aA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(Sm)),Sm}var Tm={},iA;function P2(){return iA||(iA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(Tm)),Tm}var Pm={},oA;function A2(){return oA||(oA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const a=We(),t=ha(),n=pa();(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(i){i.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"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Mint||(e.Mint={}))})(Pm)),Pm}var Am={},sA;function O2(){return sA||(sA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(a){a.NEWEST="newest",a.RECENTLY_SOLD="recently_sold",a.CHEAPEST="cheapest",a.MOST_EXPENSIVE="most_expensive",a.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(a){a.ASC="asc",a.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(Am)),Am}var Om={},uA;function I2(){return uA||(uA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const a=We(),t=ha(),n=pE(),i=pa();(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:i.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,a.generateLazyValidator)(s.schema)})(e.Order||(e.Order={}))})(Om)),Om}var Im={},lA;function N2(){return lA||(lA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})(Im)),Im}var Nm={},cA;function XM(){return cA||(cA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(Nm)),Nm}var Rm={},dA;function R2(){return dA||(dA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const a=We(),t=ha(),n=XM(),i=pa();(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:i.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Sale||(e.Sale={}))})(Rm)),Rm}var Cm={},fA;function C2(){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 a=We(),t=ha(),n=pa();(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 i;(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,a.generateLazyValidator)(s.schema)})(i=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:i.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,a.generateLazyValidator)(s.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(Cm)),Cm}var Mm={},pA;function M2(){return pA||(pA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(a){a.DATE="date",a.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(Mm)),Mm}var jm={},hA;function j2(){return hA||(hA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(jm)),jm}var Lm={},mA;function L2(){return mA||(mA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(Lm)),Lm}var Dm={},yA;function D2(){return yA||(yA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const a=We();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(i,s){const u=t().validWorldRanges;for(const c of u)if(i>=c.xMin&&i<=c.xMax&&s>=c.yMin&&s<=c.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(i){i.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},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.World||(e.World={}))})(Dm)),Dm}var km={},gA;function k2(){return gA||(gA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const a=We(),t=ha(),n=pE(),i=pa();(function(s){s.RECENTLY_OFFERED="recently_offered",s.RECENTLY_UPDATED="recently_updated",s.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(s){const u={properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,contractAddress:{type:"string"},network:i.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({},u.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...u.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},u.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...u.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},u.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...u.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Bid||(e.Bid={}))})(km)),km}var qm={},_A;function q2(){return _A||(_A=1,Object.defineProperty(qm,"__esModule",{value:!0})),qm}var Bm={},vA;function B2(){return vA||(vA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,(function(a){a.BID="bid",a.PUBLIC_NFT_ORDER="public_nft_order",a.PUBLIC_ITEM_ORDER="public_item_order"})(e.TradeType||(e.TradeType={})),(function(a){a[a.ERC20=1]="ERC20",a[a.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",a[a.ERC721=3]="ERC721",a[a.COLLECTION_ITEM=4]="COLLECTION_ITEM"})(e.TradeAssetType||(e.TradeAssetType={})),(function(a){a.SENT="sent",a.RECEIVED="received"})(e.TradeAssetDirection||(e.TradeAssetDirection={}))})(Bm)),Bm}var vo={},Um={},EA;function U2(){return EA||(EA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(Um)),Um}var Fm={},bA;function F2(){return bA||(bA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewUnityMode=void 0,(function(a){a.AUTH="authentication",a.BUILDER="builder",a.MARKETPLACE="marketplace",a.PROFILE="profile",a.CONFIG="configurator"})(e.PreviewUnityMode||(e.PreviewUnityMode={}))})(Fm)),Fm}var Vm={},wA;function V2(){return wA||(wA=1,Object.defineProperty(Vm,"__esModule",{value:!0})),Vm}var Hm={},SA;function H2(){return SA||(SA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(Hm)),Hm}var zm={},TA;function z2(){return TA||(TA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(zm)),zm}var Wm={},PA;function W2(){return PA||(PA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewRenderer=e.PreviewMessageType=void 0;const a=We();(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,a.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,i,s,u="*")=>{const c={type:i,payload:s};n.postMessage(c,u)};e.sendMessage=t})(Wm)),Wm}var Gm={},AA;function G2(){return AA||(AA=1,Object.defineProperty(Gm,"__esModule",{value:!0})),Gm}var Km={},OA;function K2(){return OA||(OA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(Km)),Km}var Ym={},IA;function Y2(){return IA||(IA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(Ym)),Ym}var Xm={},NA;function X2(){return NA||(NA=1,Object.defineProperty(Xm,"__esModule",{value:!0})),Xm}var Jm={},RA;function J2(){return RA||(RA=1,Object.defineProperty(Jm,"__esModule",{value:!0})),Jm}var Qm={},CA;function Q2(){return CA||(CA=1,Object.defineProperty(Qm,"__esModule",{value:!0})),Qm}var Zm={},MA;function Z2(){return MA||(MA=1,Object.defineProperty(Zm,"__esModule",{value:!0})),Zm}var xm={},jA;function x2(){return jA||(jA=1,Object.defineProperty(xm,"__esModule",{value:!0})),xm}var $m={},LA;function $2(){return LA||(LA=1,Object.defineProperty($m,"__esModule",{value:!0})),$m}var ey={},DA;function eB(){return DA||(DA=1,Object.defineProperty(ey,"__esModule",{value:!0})),ey}var ty={},kA;function tB(){return kA||(kA=1,Object.defineProperty(ty,"__esModule",{value:!0})),ty}var qA;function rB(){return qA||(qA=1,(function(e){var a=vo&&vo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=vo&&vo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(U2(),e),t(F2(),e),t(V2(),e),t(H2(),e),t(z2(),e),t(W2(),e),t(G2(),e),t(K2(),e),t(Y2(),e),t(X2(),e),t(J2(),e),t(Q2(),e),t(Z2(),e),t(x2(),e),t($2(),e),t(eB(),e),t(tB(),e)})(vo)),vo}var Eo={},Mu={},BA;function nB(){if(BA)return Mu;BA=1,Object.defineProperty(Mu,"__esModule",{value:!0}),Mu.isSysLink=void 0;const e=a=>a!==null&&typeof a=="object"&&"sys"in a&&"id"in a.sys;return Mu.isSysLink=e,Mu}var ju={},UA;function aB(){if(UA)return ju;UA=1,Object.defineProperty(ju,"__esModule",{value:!0}),ju.ContentfulLocale=void 0;var e;return(function(a){a.enUS="en-US",a.es="es",a.zh="zh"})(e||(e={})),ju.ContentfulLocale=e,ju}var ry={},FA;function iB(){return FA||(FA=1,Object.defineProperty(ry,"__esModule",{value:!0})),ry}var VA;function oB(){return VA||(VA=1,(function(e){var a=Eo&&Eo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Eo&&Eo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(nB(),e),t(aB(),e),t(iB(),e)})(Eo)),Eo}var HA;function sB(){return HA||(HA=1,(function(e){var a=_o&&_o.__createBinding||(Object.create?(function(Q,ne,me,be){be===void 0&&(be=me);var Ne=Object.getOwnPropertyDescriptor(ne,me);(!Ne||("get"in Ne?!ne.__esModule:Ne.writable||Ne.configurable))&&(Ne={enumerable:!0,get:function(){return ne[me]}}),Object.defineProperty(Q,be,Ne)}):(function(Q,ne,me,be){be===void 0&&(be=me),Q[be]=ne[me]})),t=_o&&_o.__exportStar||function(Q,ne){for(var me in Q)me!=="default"&&!Object.prototype.hasOwnProperty.call(ne,me)&&a(ne,Q,me)};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=b2();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var i=ha();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return i.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return i.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return i.getURNProtocol}});var s=KM();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return s.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return s.getChainId}});var u=w2();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return u.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return u.CollectionSortBy}});var c=S2();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return c.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return c.ContractSortBy}});var f=T2();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return f.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return f.ItemSortBy}});var p=pE();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return p.ListingStatus}});var m=P2();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return m.MetaTransaction}});var h=A2();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return h.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return h.MintSortBy}});var _=pa();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return _.Network}});var T=ff();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return T.NFTCategory}});var C=YM();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return C.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return C.NFTSortBy}});var O=O2();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return O.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return O.CatalogSortDirection}});var E=I2();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return E.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return E.OrderSortBy}});var R=N2();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return R.ProviderType}});var v=cf();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return v.Rarity}});var I=XM();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return I.SaleType}});var A=R2();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return A.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return A.SaleSortBy}});var y=C2();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return y.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return y.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return y.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return y.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return y.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return y.PeriodCreation}});var S=M2();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return S.AnalyticsDayDataSortBy}});var M=j2();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return M.Store}});var U=L2();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return U.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return U.GenderFilterOption}});var V=D2();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return V.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return V.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return V.isInsideWorldLimits}}),t(k2(),e),t(q2(),e),t(B2(),e),t(rB(),e),t(oB(),e)})(_o)),_o}var ny={},zA;function uB(){return zA||(zA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const a=We();(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,a.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(ny)),ny}var bo={},ay={},Lu={},WA;function JM(){if(WA)return Lu;WA=1,Object.defineProperty(Lu,"__esModule",{value:!0}),Lu.isInExceptionBlock=void 0;function e(i,s){return i>=62&&i<=150&&s>=151&&s<=158}function a(i,s){return i>=151&&i<=162&&s>=144&&s<=158}function t(i,s){return i>=151&&i<=163&&s>=59&&s<=143}function n(i,s){return e(i,s)||a(i,s)||t(i,s)}return Lu.isInExceptionBlock=n,Lu}var GA;function lB(){return GA||(GA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Parcel=e.PARCEL_LIMITS=void 0;const a=We(),t=JM();e.PARCEL_LIMITS={minX:-150,maxX:150,minY:-150,maxY:150},(function(n){n._isInLimits={keyword:"_isInLimits",validate:function(T,C){return!C||typeof C.x!="number"||typeof C.y!="number"?!1:c(C)||(0,t.isInExceptionBlock)(C.x,C.y)},errors:!1},n.schema={type:"object",required:["x","y"],properties:{x:{type:"number"},y:{type:"number"}},_isInLimits:!0,additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema,[n._isInLimits]);function i({x:_,y:T}){return`${_},${T}`}n.parcelToString=i;function s(_){const T=_.match(/^(-?\d+),(-?\d+)$/);if(!T)return null;const[,C,O]=T,E=parseInt(C,10),R=parseInt(O,10);return{x:E,y:R}}n.stringToParcel=s;function u(_){const T=s(_);return T?n.validate(T):!1}n.isParcelStringValid=u;function c(_){const{x:T,y:C}=_;return T>=e.PARCEL_LIMITS.minX&&T<=e.PARCEL_LIMITS.maxX&&C>=e.PARCEL_LIMITS.minY&&C<=e.PARCEL_LIMITS.maxY}n.isInStandardBounds=c;function f(_){return(0,t.isInExceptionBlock)(_.x,_.y)}n.isExceptionParcel=f;function p(_){return c(_)||f(_)}n.isInBounds=p;function m(_){return n.validate(_)}n.isValid=m;function h(_){const T=s(_);return T?n.validate(T):!1}n.isValidString=h})(e.Parcel||(e.Parcel={}))})(ay)),ay}var wo={},KA;function cB(){if(KA)return wo;KA=1,Object.defineProperty(wo,"__esModule",{value:!0}),wo.validateUrlInstance=wo.validateUrl=void 0;const e={allowLocalhost:!1,allowedPorts:[]};function a(T,C=2){let O=T;for(let E=0;E<C;E++)try{O=decodeURIComponent(O)}catch{break}return O.normalize("NFKC")}function t(T){return/[\u0000-\u001F\u007F-\u009F\u202A-\u202E\u2066-\u2069]/.test(T)}function n(T){return!!(T.username||T.password)}function i(T){return/\\/.test(T)}const s=["80","443"];function u(T,C){return!!T.port&&!C.includes(T.port)}function c(T){const C=T.toLowerCase();return!!(C==="localhost"||C.endsWith(".local")||/^(127\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168\.|169\.254\.)/.test(C)||C==="::1"||C==="[::1]"||C.startsWith("fe80:")||C.startsWith("fc00:"))}function f(T){if(T.startsWith("//"))return null;try{return{url:new URL(T),wasRelative:!1}}catch{try{return{url:new URL(T,"https://example.com"),wasRelative:!0}}catch{return null}}}function p(T){const C=a(String(T).toLowerCase());return!(t(C)||i(C))}function m(T){return!(!T||T.includes("..")||T.includes("//")||t(T)||i(T))}function h(T,C={}){const O=Object.assign(Object.assign({},e),C),E=[...s,...O.allowedPorts];if(!T||T.length===0||T.length>4096||t(T)||i(T))return!1;const R=a(T);if(t(R)||i(R)||T.startsWith("//"))return!1;const v=f(T);if(!v)return!1;const{url:I,wasRelative:A}=v;if(I.protocol!=="http:"&&I.protocol!=="https:"&&I.protocol!==""||n(I)||i(T)||i(I.href)||!A&&(u(I,E)||!O.allowLocalhost&&I.hostname&&c(I.hostname))||!m(I.pathname)||I.pathname.length>2048)return!1;const y=Array.from(I.searchParams.entries());if(y.length>50||(I.search?I.search.startsWith("?")?I.search.length-1:I.search.length:0)>2048)return!1;for(const[M,U]of y)if(M.length===0||!p(M)||!p(U)||M.length>128||U.length>1024)return!1;return!(I.hash&&t(I.hash))}wo.validateUrl=h;function _(T,C={}){return h(T.toString(),C)}return wo.validateUrlInstance=_,wo}var YA;function dB(){return YA||(YA=1,(function(e){var a=bo&&bo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=bo&&bo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(lB(),e),t(JM(),e),t(cB(),e)})(bo)),bo}var XA;function fB(){return XA||(XA=1,(function(e){var a=xn&&xn.__createBinding||(Object.create?(function(u,c,f,p){p===void 0&&(p=f);var m=Object.getOwnPropertyDescriptor(c,f);(!m||("get"in m?!c.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(u,p,m)}):(function(u,c,f,p){p===void 0&&(p=f),u[p]=c[f]})),t=xn&&xn.__setModuleDefault||(Object.create?(function(u,c){Object.defineProperty(u,"default",{enumerable:!0,value:c})}):function(u,c){u.default=c}),n=xn&&xn.__importStar||function(u){if(u&&u.__esModule)return u;var c={};if(u!=null)for(var f in u)f!=="default"&&Object.prototype.hasOwnProperty.call(u,f)&&a(c,u,f);return t(c,u),c},i=xn&&xn.__exportStar||function(u,c){for(var f in u)f!=="default"&&!Object.prototype.hasOwnProperty.call(c,f)&&a(c,u,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const s=n(E2());e.sdk=s,i(We(),e),i(sB(),e),i(fE(),e),i(Zo(),e),i(uB(),e),i(Pl(),e),i(VM(),e),i(GM(),e),i(dB(),e)})(xn)),xn}var Bn=fB(),So={},ra={},Od={exports:{}},Id={exports:{}},JA;function hE(){return JA||(JA=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.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=a.default,e.exports.default=a.default})(Id,Id.exports)),Id.exports}var Nd={exports:{}},QA;function pB(){return QA||(QA=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=n;function t(i){return Object.prototype.toString.call(i)==="[object RegExp]"}function n(i,s){for(var u=0;u<s.length;u++){var c=s[u];if(i===c||t(c)&&c.test(i))return!0}return!1}e.exports=a.default,e.exports.default=a.default})(Nd,Nd.exports)),Nd.exports}var Rd={exports:{}},ZA;function hB(){return ZA||(ZA=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var t=function(i,s){return i.indexOf(s)!==-1};a.default=t,e.exports=a.default,e.exports.default=a.default})(Rd,Rd.exports)),Rd.exports}var Cd={exports:{}},Md={exports:{}},xA;function QM(){return xA||(xA=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=t;function t(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;for(var s in i)typeof n[s]>"u"&&(n[s]=i[s]);return n}e.exports=a.default,e.exports.default=a.default})(Md,Md.exports)),Md.exports}var $A;function mB(){return $A||($A=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=u;var t=i(hE()),n=i(QM());function i(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 u(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("."),m=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(m)||/\s/.test(m))||!f.allow_numeric_tld&&/^\d+$/.test(m)?!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=a.default,e.exports.default=a.default})(Cd,Cd.exports)),Cd.exports}var jd={exports:{}},eO;function yB(){return eO||(eO=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=m;var t=n(hE());function n(h){return h&&h.__esModule?h:{default:h}}function i(h){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},i(h)}var s="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",u="(".concat(s,"[.]){3}").concat(s),c=new RegExp("^".concat(u,"$")),f="(?:[0-9a-fA-F]{1,4})",p=new RegExp("^("+"(?:".concat(f,":){7}(?:").concat(f,"|:)|")+"(?:".concat(f,":){6}(?:").concat(u,"|:").concat(f,"|:)|")+"(?:".concat(f,":){5}(?::").concat(u,"|(:").concat(f,"){1,2}|:)|")+"(?:".concat(f,":){4}(?:(:").concat(f,"){0,1}:").concat(u,"|(:").concat(f,"){1,3}|:)|")+"(?:".concat(f,":){3}(?:(:").concat(f,"){0,2}:").concat(u,"|(:").concat(f,"){1,4}|:)|")+"(?:".concat(f,":){2}(?:(:").concat(f,"){0,3}:").concat(u,"|(:").concat(f,"){1,5}|:)|")+"(?:".concat(f,":){1}(?:(:").concat(f,"){0,4}:").concat(u,"|(:").concat(f,"){1,6}|:)|")+"(?::((?::".concat(f,"){0,5}:").concat(u,"|(?::").concat(f,"){1,7}|:))")+")(%[0-9a-zA-Z.]{1,})?$");function m(h){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,t.default)(h);var T=(i(_)==="object"?_.version:arguments[1])||"";return T?T.toString()==="4"?c.test(h):T.toString()==="6"?p.test(h):!1:m(h,{version:4})||m(h,{version:6})}e.exports=a.default,e.exports.default=a.default})(jd,jd.exports)),jd.exports}var tO;function gB(){return tO||(tO=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=R;var t=f(hE()),n=f(pB()),i=f(hB()),s=f(mB()),u=f(yB()),c=f(QM());function f(v){return v&&v.__esModule?v:{default:v}}function p(v,I){return C(v)||T(v,I)||h(v,I)||m()}function m(){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(v,I){if(v){if(typeof v=="string")return _(v,I);var A={}.toString.call(v).slice(8,-1);return A==="Object"&&v.constructor&&(A=v.constructor.name),A==="Map"||A==="Set"?Array.from(v):A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?_(v,I):void 0}}function _(v,I){(I==null||I>v.length)&&(I=v.length);for(var A=0,y=Array(I);A<I;A++)y[A]=v[A];return y}function T(v,I){var A=v==null?null:typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(A!=null){var y,S,M,U,V=[],Q=!0,ne=!1;try{if(M=(A=A.call(v)).next,I!==0)for(;!(Q=(y=M.call(A)).done)&&(V.push(y.value),V.length!==I);Q=!0);}catch(me){ne=!0,S=me}finally{try{if(!Q&&A.return!=null&&(U=A.return(),Object(U)!==U))return}finally{if(ne)throw S}}return V}}function C(v){if(Array.isArray(v))return v}var O={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},E=/^\[([^\]]+)\](?::([0-9]+))?$/;function R(v,I){if((0,t.default)(v),!v||/[\s<>]/.test(v)||v.indexOf("mailto:")===0||(I=(0,c.default)(I,O),I.validate_length&&v.length>I.max_allowed_length)||!I.allow_fragments&&(0,i.default)(v,"#")||!I.allow_query_components&&((0,i.default)(v,"?")||(0,i.default)(v,"&")))return!1;var A,y,S,M,U,V,Q,ne;Q=v.split("#"),v=Q.shift(),Q=v.split("?"),v=Q.shift();var me=v.match(/^([a-z][a-z0-9+\-.]*):/i),be=!1,Ne=function(fe){return be=!0,A=fe.toLowerCase(),I.require_valid_protocol&&I.protocols.indexOf(A)===-1?!1:v.substring(me[0].length)};if(me){var Ae=me[1],Re=v.substring(me[0].length),Me=Re.slice(0,2)==="//";if(Me){if(v=Ne(Ae),v===!1)return!1}else{var ye=Re.indexOf("/"),le=ye===-1?Re:Re.substring(0,ye),X=le.indexOf("@");if(X!==-1){var j=le.substring(0,X),F=/^[a-zA-Z0-9\-_.%:]*$/,B=F.test(j),L=/%[0-9a-fA-F]{2}/.test(j);if(B&&!L){if(I.require_protocol)return!1}else if(v=Ne(Ae),v===!1)return!1}else{var K=/^[0-9]/.test(Re);if(K){if(I.require_protocol)return!1}else if(v=Ne(Ae),v===!1)return!1}}}else if(I.require_protocol)return!1;if(v.slice(0,2)==="//"){if(!be&&!I.allow_protocol_relative_urls)return!1;v=v.slice(2)}if(v==="")return!1;if(Q=v.split("/"),v=Q.shift(),v===""&&!I.require_host)return!0;if(Q=v.split("@"),Q.length>1){if(I.disallow_auth||Q[0]===""||(y=Q.shift(),y.indexOf(":")>=0&&y.split(":").length>2))return!1;var ue=y.split(":"),Oe=p(ue,2),Te=Oe[0],Be=Oe[1];if(Te===""&&Be==="")return!1}M=Q.join("@"),V=null,ne=null;var je=M.match(E);if(je?(S="",ne=je[1],V=je[2]||null):(Q=M.split(":"),S=Q.shift(),Q.length&&(V=Q.join(":"))),V!==null&&V.length>0){if(U=parseInt(V,10),!/^[0-9]+$/.test(V)||U<=0||U>65535)return!1}else if(I.require_port)return!1;return I.host_whitelist?(0,n.default)(S,I.host_whitelist):S===""&&!I.require_host?!0:!(!(0,u.default)(S)&&!(0,s.default)(S,I)&&(!ne||!(0,u.default)(ne,6))||(S=S||ne,I.host_blacklist&&(0,n.default)(S,I.host_blacklist)))}e.exports=a.default,e.exports.default=a.default})(Od,Od.exports)),Od.exports}var iy={},rO;function ZM(){return rO||(rO=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 a;(function(c){c.GET="get",c.STORE="store",c.CLEAR="clear",c.PING="ping"})(a||(e.Action=a={})),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(u(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 i(c,f){new Date(f.expiration).getTime()>Date.now()&&localStorage.setItem(u(c),JSON.stringify(f))}e.localStorageStoreIdentity=i;function s(c){localStorage.removeItem(u(c))}e.localStorageClearIdentity=s;function u(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()}`}})(iy)),iy}var nO;function _B(){if(nO)return ra;nO=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.clearIdentity=ra.storeIdentity=ra.getIdentity=ra.init=void 0;const e=gB(),a=ZM(),t=a.SINGLE_SIGN_ON_TARGET,n=500,i=5;let s=0,u="";const c={protocols:["https"],require_protocol:!0};function f(E,R={}){if(!(0,e.default)(E,{...c,...R}))throw new Error(`Invalid url: ${E}`);if(u)throw new Error("Already initialized");const v=document.createElement("iframe");v.id=t,v.src=E,v.style.width="0",v.style.height="0",v.style.border="none",v.style.position="absolute",document.body.appendChild(v),u=E}ra.init=f;async function p(E){let R;try{R=(await T(await _(),a.Action.GET,{user:E})).identity??null}catch(v){O(v),R=(0,a.localStorageGetIdentity)(E)}return R}ra.getIdentity=p;async function m(E,R){try{await T(await _(),a.Action.STORE,{user:E,identity:R})}catch(v){O(v),(0,a.localStorageStoreIdentity)(E,R)}}ra.storeIdentity=m;async function h(E){try{await T(await _(),a.Action.CLEAR,{user:E})}catch(R){O(R),(0,a.localStorageClearIdentity)(E)}}ra.clearIdentity=h;async function _(){if(!u)throw new Error("Not initialized");for(let E=0;E<i;E++){const v=document.getElementById(t)?.contentWindow;if(!v){await C(n);continue}try{await T(v,a.Action.PING,{},n)}catch{continue}return v}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function T(E,R,v,I=0){s++;const A=s;let y=null;const S=new Promise((M,U)=>{y=({data:V})=>{!V||V.target!==a.SINGLE_SIGN_ON_TARGET||V.id!==A||(V.error?U(new Error(V.error)):M(V))},window.addEventListener("message",y)});E.postMessage((0,a.createMessage)({id:A,action:R,...v}),u);try{return await(I?Promise.race([S,new Promise((M,U)=>setTimeout(()=>U(new Error("Did not receive a response in time")),I))]):S)}catch(M){throw M}finally{y&&window.removeEventListener("message",y)}}function C(E){return new Promise(R=>setTimeout(R,E))}function O(E){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",E.message)}return ra}var aO;function vB(){return aO||(aO=1,(function(e){var a=So&&So.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=So&&So.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(_B(),e),t(ZM(),e)})(So)),So}var Bv=vB(),oy={},na={},iO;function Ze(){if(iO)return na;iO=1;var e=na&&na.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(na,"__esModule",{value:!0}),na.validateType=na.generateLazyValidator=na.Ajv=void 0;const a=e(uf());na.Ajv=a.default;const t=e(nE()),n=e(aE());function i(u,c){let f=null;const p=(m,h)=>{if(!f){const _=new a.default({$data:!0,allErrors:!0});(0,t.default)(_),(0,n.default)(_,{singleError:!0}),c?.forEach(T=>_.addKeyword(T)),f=_.compile(u),Object.defineProperty(p,"errors",{get(){return f?.errors}})}return f(m,h)};return p}na.generateLazyValidator=i;function s(u,c){return u.validate(c)}return na.validateType=s,na}var sy={},oO;function xM(){return oO||(oO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const a=Ze(),t=Fn();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 i(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=i,(function(s){s.schema={type:"string",enum:Object.values(s)},s.validate=(0,a.generateLazyValidator)(s.schema)})(n=e.ChainName||(e.ChainName={}))})(sy)),sy}var uy={},sO;function ma(){return sO||(sO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(uy)),uy}var uO;function Fn(){return uO||(uO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const a=Ze(),t=xM(),n=ma();var i;(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"})(i=e.ChainId||(e.ChainId={}));function s(p){switch(p){case i.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;case i.MATIC_AMOY:return t.ChainName.MATIC_AMOY;case i.BSC_MAINNET:return t.ChainName.BINANCE_MAINNET;case i.ARBITRUM_MAINNET:return t.ChainName.ARBITRUM_MAINNET;case i.OPTIMISM_MAINNET:return t.ChainName.OPTIMISM_MAINNET;case i.FANTOM_MAINNET:return t.ChainName.FANTOM_MAINNET;case i.AVALANCHE_MAINNET:return t.ChainName.AVALANCHE_MAINNET;default:return null}}e.getChainName=s;function u(p){switch(p){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai";case i.MATIC_AMOY:return"amoy";default:return""}}e.getURNProtocol=u;function c(p){const m={[n.Network.BSC]:i.BSC_MAINNET,[n.Network.OPTIMISM]:i.OPTIMISM_MAINNET,[n.Network.ARBITRUM]:i.ARBITRUM_MAINNET,[n.Network.FANTOM]:i.FANTOM_MAINNET,[n.Network.AVALANCHE]:i.AVALANCHE_MAINNET};switch(p){case i.ETHEREUM_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},m);case i.ETHEREUM_ROPSTEN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[n.Network.MATIC]:i.MATIC_MUMBAI},m);case i.ETHEREUM_RINKEBY:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[n.Network.MATIC]:i.MATIC_MUMBAI},m);case i.ETHEREUM_GOERLI:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[n.Network.MATIC]:i.MATIC_MUMBAI},m);case i.ETHEREUM_KOVAN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[n.Network.MATIC]:i.MATIC_MUMBAI},m);case i.ETHEREUM_SEPOLIA:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[n.Network.MATIC]:i.MATIC_AMOY},m);case i.MATIC_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},m);case i.MATIC_MUMBAI:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MUMBAI,[n.Network.MATIC]:i.MATIC_MUMBAI},m);case i.MATIC_AMOY:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_AMOY,[n.Network.MATIC]:i.MATIC_AMOY},m);default:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},m)}}e.getNetworkMapping=c;function f(p){switch(p){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:case i.MATIC_AMOY:return n.Network.MATIC;case i.BSC_MAINNET:return n.Network.BSC;case i.OPTIMISM_MAINNET:return n.Network.OPTIMISM;case i.ARBITRUM_MAINNET:return n.Network.ARBITRUM;case i.FANTOM_MAINNET:return n.Network.FANTOM;case i.AVALANCHE_MAINNET:return n.Network.AVALANCHE}}e.getNetwork=f,(function(p){p.schema={type:"number",enum:Object.values(p)},p.validate=(0,a.generateLazyValidator)(p.schema)})(i=e.ChainId||(e.ChainId={}))})(oy)),oy}var At=Fn(),ly={},lO;function $M(){return lO||(lO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})(ly)),ly}var Ft=$M(),Za;(function(e){e.Update="Web3ReactUpdate",e.Error="Web3ReactError",e.Deactivate="Web3ReactDeactivate"})(Za||(Za={}));var Ld={exports:{}},cO;function EB(){if(cO)return Ld.exports;cO=1;var e=typeof Reflect=="object"?Reflect:null,a=e&&typeof e.apply=="function"?e.apply:function(y,S,M){return Function.prototype.apply.call(y,S,M)},t;e&&typeof e.ownKeys=="function"?t=e.ownKeys:Object.getOwnPropertySymbols?t=function(y){return Object.getOwnPropertyNames(y).concat(Object.getOwnPropertySymbols(y))}:t=function(y){return Object.getOwnPropertyNames(y)};function n(A){console&&console.warn&&console.warn(A)}var i=Number.isNaN||function(y){return y!==y};function s(){s.init.call(this)}Ld.exports=s,Ld.exports.once=R,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(A){if(typeof A!="number"||A<0||i(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");u=A}}),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(y){if(typeof y!="number"||y<0||i(y))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+y+".");return this._maxListeners=y,this};function f(A){return A._maxListeners===void 0?s.defaultMaxListeners:A._maxListeners}s.prototype.getMaxListeners=function(){return f(this)},s.prototype.emit=function(y){for(var S=[],M=1;M<arguments.length;M++)S.push(arguments[M]);var U=y==="error",V=this._events;if(V!==void 0)U=U&&V.error===void 0;else if(!U)return!1;if(U){var Q;if(S.length>0&&(Q=S[0]),Q instanceof Error)throw Q;var ne=new Error("Unhandled error."+(Q?" ("+Q.message+")":""));throw ne.context=Q,ne}var me=V[y];if(me===void 0)return!1;if(typeof me=="function")a(me,this,S);else for(var be=me.length,Ne=C(me,be),M=0;M<be;++M)a(Ne[M],this,S);return!0};function p(A,y,S,M){var U,V,Q;if(c(S),V=A._events,V===void 0?(V=A._events=Object.create(null),A._eventsCount=0):(V.newListener!==void 0&&(A.emit("newListener",y,S.listener?S.listener:S),V=A._events),Q=V[y]),Q===void 0)Q=V[y]=S,++A._eventsCount;else if(typeof Q=="function"?Q=V[y]=M?[S,Q]:[Q,S]:M?Q.unshift(S):Q.push(S),U=f(A),U>0&&Q.length>U&&!Q.warned){Q.warned=!0;var ne=new Error("Possible EventEmitter memory leak detected. "+Q.length+" "+String(y)+" listeners added. Use emitter.setMaxListeners() to increase limit");ne.name="MaxListenersExceededWarning",ne.emitter=A,ne.type=y,ne.count=Q.length,n(ne)}return A}s.prototype.addListener=function(y,S){return p(this,y,S,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(y,S){return p(this,y,S,!0)};function m(){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(A,y,S){var M={fired:!1,wrapFn:void 0,target:A,type:y,listener:S},U=m.bind(M);return U.listener=S,M.wrapFn=U,U}s.prototype.once=function(y,S){return c(S),this.on(y,h(this,y,S)),this},s.prototype.prependOnceListener=function(y,S){return c(S),this.prependListener(y,h(this,y,S)),this},s.prototype.removeListener=function(y,S){var M,U,V,Q,ne;if(c(S),U=this._events,U===void 0)return this;if(M=U[y],M===void 0)return this;if(M===S||M.listener===S)--this._eventsCount===0?this._events=Object.create(null):(delete U[y],U.removeListener&&this.emit("removeListener",y,M.listener||S));else if(typeof M!="function"){for(V=-1,Q=M.length-1;Q>=0;Q--)if(M[Q]===S||M[Q].listener===S){ne=M[Q].listener,V=Q;break}if(V<0)return this;V===0?M.shift():O(M,V),M.length===1&&(U[y]=M[0]),U.removeListener!==void 0&&this.emit("removeListener",y,ne||S)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(y){var S,M,U;if(M=this._events,M===void 0)return this;if(M.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):M[y]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete M[y]),this;if(arguments.length===0){var V=Object.keys(M),Q;for(U=0;U<V.length;++U)Q=V[U],Q!=="removeListener"&&this.removeAllListeners(Q);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(S=M[y],typeof S=="function")this.removeListener(y,S);else if(S!==void 0)for(U=S.length-1;U>=0;U--)this.removeListener(y,S[U]);return this};function _(A,y,S){var M=A._events;if(M===void 0)return[];var U=M[y];return U===void 0?[]:typeof U=="function"?S?[U.listener||U]:[U]:S?E(U):C(U,U.length)}s.prototype.listeners=function(y){return _(this,y,!0)},s.prototype.rawListeners=function(y){return _(this,y,!1)},s.listenerCount=function(A,y){return typeof A.listenerCount=="function"?A.listenerCount(y):T.call(A,y)},s.prototype.listenerCount=T;function T(A){var y=this._events;if(y!==void 0){var S=y[A];if(typeof S=="function")return 1;if(S!==void 0)return S.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function C(A,y){for(var S=new Array(y),M=0;M<y;++M)S[M]=A[M];return S}function O(A,y){for(;y+1<A.length;y++)A[y]=A[y+1];A.pop()}function E(A){for(var y=new Array(A.length),S=0;S<y.length;++S)y[S]=A[S].listener||A[S];return y}function R(A,y){return new Promise(function(S,M){function U(Q){A.removeListener(y,V),M(Q)}function V(){typeof A.removeListener=="function"&&A.removeListener("error",U),S([].slice.call(arguments))}I(A,y,V,{once:!0}),y!=="error"&&v(A,U,{once:!0})})}function v(A,y,S){typeof A.on=="function"&&I(A,"error",y,S)}function I(A,y,S,M){if(typeof A.on=="function")M.once?A.once(y,S):A.on(y,S);else if(typeof A.addEventListener=="function")A.addEventListener(y,function U(V){M.once&&A.removeEventListener(y,U),S(V)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof A)}return Ld.exports}var ej=EB();const SW=fD(ej);function bB(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,e.__proto__=a}var Qs=(function(e){bB(a,e);function a(n){var i,s=n===void 0?{}:n,u=s.supportedChainIds;return i=e.call(this)||this,i.supportedChainIds=u,i}var t=a.prototype;return t.emitUpdate=function(i){this.emit(Za.Update,i)},t.emitError=function(i){this.emit(Za.Error,i)},t.emitDeactivate=function(){this.emit(Za.Deactivate)},a})(ej.EventEmitter);const wB="modulepreload",SB=function(e){return"https://cdn.decentraland.org/@dcl-regenesislabs/mobile-hub/1.0.1/"+e},dO={},gl=function(a,t,n){let i=Promise.resolve();if(t&&t.length>0){let f=function(p){return Promise.all(p.map(m=>Promise.resolve(m).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),c=u?.nonce||u?.getAttribute("nonce");i=f(t.map(p=>{if(p=SB(p),p in dO)return;dO[p]=!0;const m=p.endsWith(".css"),h=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${h}`))return;const _=document.createElement("link");if(_.rel=m?"stylesheet":wB,m||(_.as="script"),_.crossOrigin="",_.href=p,c&&_.setAttribute("nonce",c),document.head.appendChild(_),m)return new Promise((T,C)=>{_.addEventListener("load",T),_.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${p}`)))})}))}function s(u){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=u,window.dispatchEvent(c),!c.defaultPrevented)throw u}return i.then(u=>{for(const c of u||[])c.status==="rejected"&&s(c.reason);return a().catch(s)})};var aa={},To={},Po={},cy={},fO;function TB(){return fO||(fO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const a=Ze();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,a.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(cy)),cy}var dy={},pO;function PB(){return pO||(pO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const a=Ze();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})(dy)),dy}var hO;function AB(){return hO||(hO=1,(function(e){var a=Po&&Po.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Po&&Po.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(TB(),e),t(PB(),e)})(Po)),Po}var Ao={},fy={},mO;function OB(){return mO||(mO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(fy)),fy}var py={},hy={},yO;function pf(){return yO||(yO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const a=Ze();(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,a.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},i={[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 u(m){return n[m]}t.getMaxSupply=u;function c(m){return s[m]}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(m){return[i[m],s[m]]}t.getGradient=p})(e.Rarity||(e.Rarity={}))})(hy)),hy}var my={},gO;function xo(){return gO||(gO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(my)),my}var yy={},gy={},_O;function mE(){return _O||(_O=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(gy)),gy}var _y={},vy={},vO;function tj(){return vO||(vO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(vy)),vy}var EO;function yE(){return EO||(EO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const a=xo(),t=Ze(),n=tj();(function(i){i.schema={oneOf:[Object.assign({},a.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(_y)),_y}var bO;function gE(){return bO||(bO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const a=Ze(),t=mE(),n=yE();(function(i){i.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"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(yy)),yy}var Oo={},Io={},Ey={},by={},wO;function $o(){return wO||(wO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema);t.validate=i=>n(i)})(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=i=>n.test(i)})(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=i=>n.test(i)})(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=i=>n.test(i)})(e.IPFSv1||(e.IPFSv1={}))})(by)),by}var SO;function rj(){return SO||(SO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const a=xo(),t=$o(),n=Ze();var i;(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)})(i=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:a.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:i.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(s=e.AvatarInfo||(e.AvatarInfo={}));var u;(function(f){f.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const p=new RegExp(f.schema.pattern,"i");f.validate=m=>p.test(m)})(u=e.LinkUrl||(e.LinkUrl={}));var c;(function(f){f.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:u.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={}))})(Ey)),Ey}var wy={},TO;function IB(){return TO||(TO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const a=Ze(),t=rj();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(wy)),wy}var PO;function NB(){return PO||(PO=1,(function(e){var a=Io&&Io.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Io&&Io.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(rj(),e),t(IB(),e)})(Io)),Io}var Sy={},Ty={},AO;function nj(){return AO||(AO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const a=Ze();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,a.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(Ty)),Ty}var Py={},OO;function aj(){return OO||(OO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(Py)),Py}var Ay={},IO;function ij(){return IO||(IO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(Ay)),Ay}var Oy={},Du={},NO;function _E(){return NO||(NO=1,Object.defineProperty(Du,"__esModule",{value:!0}),Du.displayableProperties=void 0,Du.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Du}var Iy={},RO;function oj(){return RO||(RO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(Iy)),Iy}var Ny={},CO;function sj(){return CO||(CO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(Ny)),Ny}var MO;function RB(){return MO||(MO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const a=Ze(),t=_E(),n=nj(),i=ij(),s=oj(),u=sj(),c=aj();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:i.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:u.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,a.generateLazyValidator)(p.schema)})(e.Scene||(e.Scene={}))})(Oy)),Oy}var jO;function CB(){return jO||(jO=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 a=nj();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return a.FeatureToggles}});var t=aj();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=ij();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=RB();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var s=oj();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return s.Source}});var u=sj();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return u.SpawnPoint}})})(Sy)),Sy}var No={},Ry={},Cy={},LO;function uj(){return LO||(LO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(Cy)),Cy}var DO;function lj(){return DO||(DO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const a=Ze(),t=uj();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(Ry)),Ry}var My={},kO;function cj(){return kO||(kO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(My)),My}var jy={},qO;function vE(){return qO||(qO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const a=pf(),t=Ze();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:a.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,t.generateLazyValidator)(n);function s(u){return i(u)}e.isStandard=s})(jy)),jy}var Ly={},Ro={},Dy={},BO;function MB(){return BO||(BO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(Dy)),Dy}var UO;function dj(){return UO||(UO=1,(function(e){var a=Ro&&Ro.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Ro&&Ro.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(MB(),e)})(Ro)),Ro}var ky={},FO;function EE(){return FO||(FO=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 a=Ze();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 i;(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,a.generateLazyValidator)(h.schema)})(i=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,a.generateLazyValidator)(h.schema)})(s=e.AnyMapping||(e.AnyMapping={}));var u;(function(h){h._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(T,C){if(!C||!C.from||!C.to)return!1;let{to:O,from:E}=C;return(typeof E!="bigint"||typeof O!="bigint")&&(E=BigInt(E),O=BigInt(O)),E<=O},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,a.generateLazyValidator)(h.schema,[h._fromLessThanOrEqualTo])})(u=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,a.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:[i.schema,s.schema,u.schema,c.schema]},h.validate=(0,a.generateLazyValidator)(h.schema,[u._fromLessThanOrEqualTo])})(f=e.Mapping||(e.Mapping={})),(function(h){h._isMappingsValid={keyword:"_isMappingsValid",validate:function(T,C){try{m(C)}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 _=Object.values(n).reduce((T,C)=>(T[C]=h.innerSchema,T),{});h.schema={type:"object",properties:_,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},h.validate=(0,a.generateLazyValidator)(h.schema,[u._fromLessThanOrEqualTo,h._isMappingsValid])})(e.Mappings||(e.Mappings={}));class p extends Error{constructor(_,T,C){super(_),this.existingMapping=T,this.conflictingMapping=C}}e.AddMappingError=p;function m(h={}){const _={};for(const[y,S]of Object.entries(h)){_[y]={};for(const[M,U]of Object.entries(S))for(const V of U)I(y,M,V)}function T(){return JSON.parse(JSON.stringify(_))}function C(y,S,M){const U=BigInt(y);return U>=BigInt(S)&&U<=BigInt(M)}function O(y,S){switch(S.type){case t.SINGLE:return y.id===S.id;case t.MULTIPLE:return S.ids.includes(y.id);case t.RANGE:return C(y.id,S.from,S.to);default:return!1}}function E(y,S){switch(S.type){case t.SINGLE:return y.ids.includes(S.id);case t.MULTIPLE:return y.ids.some(M=>S.ids.includes(M));case t.RANGE:return y.ids.some(M=>C(M,S.from,S.to));default:return!1}}function R(y,S){switch(S.type){case t.SINGLE:return C(S.id,y.from,y.to);case t.MULTIPLE:return S.ids.some(M=>C(M,y.from,y.to));case t.RANGE:return BigInt(y.from)<=BigInt(S.to)&&BigInt(y.to)>=BigInt(S.from)}}function v(y,S){if(y.type===t.ANY||S.type===t.ANY)return!0;switch(y.type){case t.SINGLE:return O(y,S);case t.MULTIPLE:return E(y,S);case t.RANGE:return R(y,S)}}function I(y,S,M){var U,V;const Q=S.toLowerCase();_[y]=(U=_[y])!==null&&U!==void 0?U:{},_[y][Q]=(V=_[y][Q])!==null&&V!==void 0?V:[];for(const ne of _[y][Q])if(v(ne,M))throw new p(`Cannot add mapping to contract ${Q} on network ${y} because it overlaps with existing mapping`,ne,M);_[y][Q].push(M)}function A(y,S,M){var U;return!((U=_[y])===null||U===void 0)&&U[S]?_[y][S].some(V=>{switch(V.type){case t.SINGLE:return V.id===M;case t.ANY:return!0;case t.MULTIPLE:return V.ids.includes(M);case t.RANGE:return BigInt(M)>=BigInt(V.from)&&BigInt(M)<=BigInt(V.to)}}):!1}return{addMapping:I,getMappings:T,includesNft:A}}e.createMappingsHelper=m})(ky)),ky}var VO;function bE(){return VO||(VO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const a=Ze(),t=dj(),n=EE();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 i={keyword:"_containsHashingKeys",validate:function(c,f){var p;const m=f;return!((p=m?.merkleProof)===null||p===void 0)&&p.hashingKeys?m.merkleProof.hashingKeys.every(h=>m.hasOwnProperty(h)):!1},errors:!1},s=(0,a.generateLazyValidator)(e.schema,[i,n.RangeMapping._fromLessThanOrEqualTo,n.Mappings._isMappingsValid]);function u(c){return s(c)}e.isThirdParty=u})(Ly)),Ly}var qy={},By={},ia={},HO;function fj(){if(HO)return ia;HO=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.isBaseEmote=ia.isBaseAvatar=ia.requiredBaseItemProps=ia.baseItemProperties=void 0;const e=lj(),a=cj(),t=_E();ia.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({},a.Metrics.schema),{nullable:!0})}),ia.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(s){if(!s||!s.id)return!1;const u=s.id.split(":"),c=u[1]==="decentraland",f=u[3]==="base-avatars";return u.length===5&&c&&f}ia.isBaseAvatar=n;function i(s){if(!s||!s.id)return!1;const u=s.id.split(":");return u.length===5&&u[1]==="decentraland"&&u[3]==="base-emotes"}return ia.isBaseEmote=i,ia}var zO;function jB(){return zO||(zO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const a=Ze(),t=xo(),n=gE(),i=fj(),s=vE(),u=bE(),c=yE(),f=EE();(function(p){p.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),s.standardProperties),u.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:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const m={keyword:"_isThirdParty",validate:(_,T)=>!_||(0,u.isThirdParty)(T),errors:!1},h={keyword:"_isBaseAvatar",validate:(_,T)=>!_||(0,i.isBaseAvatar)(T),errors:!1};p.validate=(0,a.generateLazyValidator)(p.schema,[m,h,f.RangeMapping._fromLessThanOrEqualTo,f.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(By)),By}var WO;function LB(){return WO||(WO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var a=gE();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return a.WearableRepresentation}});var t=jB();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=xo();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=tj();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var s=yE();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return s.HideableWearableCategory}})})(qy)),qy}var Uy={},Fy={},Vy={},Hy={},GO;function pj(){return GO||(GO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(Hy)),Hy}var zy={},KO;function hj(){return KO||(KO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const a=Ze(),t=mE();(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,a.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(zy)),zy}var YO;function mj(){return YO||(YO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const a=pj(),t=Ze(),n=hj();(function(i){i.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:a.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(Vy)),Vy}var XO;function DB(){return XO||(XO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const a=yj(),t=Ze(),n=fj(),i=vE(),s=bE(),u=mj();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),i.standardProperties),s.schema.properties),{emoteDataADR74:u.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:(m,h)=>!m||(0,a.isThirdParty)(h),errors:!1},p={keyword:"_isBaseEmote",validate:(m,h)=>!m||(0,n.isBaseEmote)(h),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[f,p,a.RangeMapping._fromLessThanOrEqualTo,a.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))})(Fy)),Fy}var Wy={},JO;function kB(){return JO||(JO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(Wy)),Wy}var QO;function qB(){return QO||(QO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=e.EmoteCategory=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var a=DB();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return a.Emote}});var t=hj();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=mj();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=pj();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return i.EmoteCategory}});var s=kB();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}})})(Uy)),Uy}var ZO;function yj(){return ZO||(ZO=1,(function(e){var a=No&&No.__createBinding||(Object.create?(function(p,m,h,_){_===void 0&&(_=h);var T=Object.getOwnPropertyDescriptor(m,h);(!T||("get"in T?!m.__esModule:T.writable||T.configurable))&&(T={enumerable:!0,get:function(){return m[h]}}),Object.defineProperty(p,_,T)}):(function(p,m,h,_){_===void 0&&(_=h),p[_]=m[h]})),t=No&&No.__exportStar||function(p,m){for(var h in p)h!=="default"&&!Object.prototype.hasOwnProperty.call(m,h)&&a(m,p,h)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=lj();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=uj();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var s=cj();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return s.Metrics}});var u=mE();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return u.BodyShape}});var c=vE();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return c.isStandard}});var f=bE();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return f.isThirdParty}}),t(EE(),e),t(LB(),e),t(qB(),e)})(No)),No}var Gy={},Ky={},xO;function hf(){return xO||(xO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const a=Ze();var t;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(i){i.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"}}}]}},i.validate=(0,a.generateLazyValidator)(i.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(i){i.schema={type:"array",items:n.schema,minItems:1},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.AuthChain||(e.AuthChain={}))})(Ky)),Ky}var $O;function BB(){return $O||($O=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const a=$o(),t=hf(),n=Ze();(function(i){i.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:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(i){i.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:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(Gy)),Gy}var Yy={},Xy={},eI;function gj(){return eI||(eI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const a=$o(),t=Ze();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[a.IPFSv1.schema,a.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(Xy)),Xy}var tI;function _j(){return tI||(tI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const a=$o(),t=gj(),n=Ze();(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[a.IPFSv1.schema,a.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"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.Entity||(e.Entity={}))})(Yy)),Yy}var Jy={},rI;function UB(){return rI||(rI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const a=hf(),t=Ze();(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:a.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(Jy)),Jy}var Co={},Qy={},nI;function FB(){return nI||(nI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const a=xo(),t=$o(),n=Ze();var i;(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:a.WearableCategory.schema}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(i=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:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(e.Outfits||(e.Outfits={}))})(Qy)),Qy}var aI;function VB(){return aI||(aI=1,(function(e){var a=Co&&Co.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Co&&Co.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(FB(),e)})(Co)),Co}var Mo={},Zy={},iI;function vj(){return iI||(iI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationType=void 0,(function(a){a.BADGE_GRANTED="badge_granted",a.BID_ACCEPTED="bid_accepted",a.BID_RECEIVED="bid_received",a.EVENTS_STARTED="events_started",a.EVENTS_STARTS_SOON="events_starts_soon",a.GOVERNANCE_ANNOUNCEMENT="governance_announcement",a.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",a.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",a.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",a.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",a.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",a.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",a.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",a.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",a.GOVERNANCE_TENDER_PASSED="governance_tender_passed",a.GOVERNANCE_WHALE_VOTE="governance_whale_vote",a.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",a.ITEM_SOLD="item_sold",a.ITEM_PUBLISHED="item_published",a.LAND_RENTAL_ENDED="rental_ended",a.LAND_RENTED="rental_started",a.REWARD_ASSIGNED="reward_assignment",a.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",a.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",a.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",a.REWARD_DELAYED="reward_delayed",a.REWARD_IN_PROGRESS="reward_in_progress",a.ROYALTIES_EARNED="royalties_earned",a.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",a.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",a.WORLDS_ACCESS_RESTORED="worlds_access_restored",a.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",a.WORLDS_MISSING_RESOURCES="worlds_missing_resources",a.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",a.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked"})(e.NotificationType||(e.NotificationType={}))})(Zy)),Zy}var xy={},$y={},oI;function Ej(){return oI||(oI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const a=Ze(),t=vj(),n={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},i=Object.values(t.NotificationType).reduce((s,u)=>(s[u]=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:i}}},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})($y)),$y}var eg={},sI;function bj(){return sI||(sI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,(function(a){a.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const t=new RegExp(a.schema.pattern);a.validate=n=>t.test(n)})(e.Email||(e.Email={}))})(eg)),eg}var uI;function HB(){return uI||(uI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const a=Ze(),t=Ej(),n=$o(),i=bj();(function(s){s.schema={type:"object",required:["address","details"],properties:{address:n.EthAddress.schema,email:Object.assign(Object.assign({},i.Email.schema),{nullable:!0}),details:t.SubscriptionDetails.schema}},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Subscription||(e.Subscription={}))})(xy)),xy}var lI;function zB(){return lI||(lI=1,(function(e){var a=Mo&&Mo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Mo&&Mo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(vj(),e),t(HB(),e),t(Ej(),e)})(Mo)),Mo}var jo={},tg={},cI;function Zs(){return cI||(cI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,(function(a){(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"})(a.Type||(a.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={}))})(a.SubType||(a.SubType={}))})(e.Events||(e.Events={}))})(tg)),tg}var rg={},dI;function WB(){return dI||(dI=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 a=Ze(),t=Zs();(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,a.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,a.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,a.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,a.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,a.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,a.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,a.generateLazyValidator)(n.schema)})(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={}))})(rg)),rg}var ng={},fI;function GB(){return fI||(fI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const a=hf(),t=Ze(),n=_j(),i=Zs();(function(s){s.schema={type:"object",properties:{type:{type:"string",const:i.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(i.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:n.Entity.schema,authChain:a.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(ng)),ng}var ag={},pI;function KB(){return pI||(pI=1,Object.defineProperty(ag,"__esModule",{value:!0})),ag}var ig={},hI;function YB(){return hI||(hI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const a=Ze(),t=Zs();(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,a.generateLazyValidator)(n.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(ig)),ig}var og={},ku={},mI;function XB(){if(mI)return ku;mI=1,Object.defineProperty(ku,"__esModule",{value:!0}),ku.createEventSchema=void 0;function e(a,t,n){return{type:"object",properties:{type:{type:"string",const:a},subType:{type:"string",const:t},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}return ku.createEventSchema=e,ku}var yI;function JB(){return yI||(yI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const a=Ze(),t=Zs(),n=XB(),i={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(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_IN_PROGRESS,i),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_ASSIGNED,i),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,s),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,s),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,s),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_DELAYED,i),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(og)),og}var sg={},gI;function QB(){return gI||(gI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FriendshipAcceptedEvent=e.FriendshipRequestEvent=e.AssetBundleConversionManuallyQueuedEvent=e.AssetBundleConversionFinishedEvent=e.BadgeGrantedEvent=void 0;const a=Ze(),t=Zs();(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,a.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,a.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,a.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,a.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,a.generateLazyValidator)(n.schema)})(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={}))})(sg)),sg}var _I;function ZB(){return _I||(_I=1,(function(e){var a=jo&&jo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=jo&&jo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(Zs(),e),t(WB(),e),t(GB(),e),t(KB(),e),t(YB(),e),t(JB(),e),t(QB(),e)})(jo)),jo}var vI;function wE(){return vI||(vI=1,(function(e){var a=Oo&&Oo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Oo&&Oo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(NB(),e),t(CB(),e),t(yj(),e),t(_E(),e),t(dj(),e),t(BB(),e),t(_j(),e),t(UB(),e),t(VB(),e),t(zB(),e),t(ZB(),e)})(Oo)),Oo}var EI;function xB(){return EI||(EI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const a=pf(),t=xo(),n=gE(),i=Ze(),s=wE();(function(u){u.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},a.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"]},u.validate=(0,i.generateLazyValidator)(u.schema)})(e.WearableJson||(e.WearableJson={}))})(py)),py}var bI;function $B(){return bI||(bI=1,(function(e){var a=Ao&&Ao.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Ao&&Ao.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(OB(),e),t(xB(),e)})(Ao)),Ao}var wI;function eU(){return wI||(wI=1,(function(e){var a=To&&To.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=To&&To.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(AB(),e),t($B(),e)})(To)),To}var Lo={},ug={},SI;function tU(){return SI||(SI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(ug)),ug}var lg={},TI;function rU(){return TI||(TI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const a=Ze(),t=Fn(),n=ma();(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(i){i.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"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Collection||(e.Collection={}))})(lg)),lg}var cg={},dg={},PI;function mf(){return PI||(PI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(dg)),dg}var AI;function nU(){return AI||(AI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const a=Ze(),t=Fn(),n=ma(),i=mf();(function(s){s.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(s){s.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:n.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Contract||(e.Contract={}))})(cg)),cg}var fg={},pg={},OI;function wj(){return OI||(OI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const a=Ze(),t=Fn(),n=wE(),i=ma(),s=mf(),u=pf(),c=xo();(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:u.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:u.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:i.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,a.generateLazyValidator)(f.schema)})(e.NFT||(e.NFT={}))})(pg)),pg}var II;function aU(){return II||(II=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const a=Ze(),t=Fn(),n=ma(),i=wj(),s=mf();(function(u){u.NAME="name",u.NEWEST="newest",u.RECENTLY_REVIEWED="recently_reviewed",u.RECENTLY_SOLD="recently_sold",u.RECENTLY_LISTED="recently_listed",u.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(u){u.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:i.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"]},u.validate=(0,a.generateLazyValidator)(u.schema)})(e.Item||(e.Item={}))})(fg)),fg}var hg={},NI;function SE(){return NI||(NI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(hg)),hg}var mg={},RI;function iU(){return RI||(RI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(mg)),mg}var yg={},CI;function oU(){return CI||(CI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const a=Ze(),t=Fn(),n=ma();(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(i){i.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"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Mint||(e.Mint={}))})(yg)),yg}var gg={},MI;function sU(){return MI||(MI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(a){a.NEWEST="newest",a.RECENTLY_SOLD="recently_sold",a.CHEAPEST="cheapest",a.MOST_EXPENSIVE="most_expensive",a.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(a){a.ASC="asc",a.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(gg)),gg}var _g={},jI;function uU(){return jI||(jI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const a=Ze(),t=Fn(),n=SE(),i=ma();(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:i.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,a.generateLazyValidator)(s.schema)})(e.Order||(e.Order={}))})(_g)),_g}var vg={},LI;function Sj(){return LI||(LI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(vg)),vg}var Eg={},DI;function lU(){return DI||(DI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const a=Ze(),t=Fn(),n=Sj(),i=ma();(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:i.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Sale||(e.Sale={}))})(Eg)),Eg}var bg={},kI;function cU(){return kI||(kI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const a=Ze(),t=Fn(),n=ma();(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 i;(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,a.generateLazyValidator)(s.schema)})(i=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:i.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,a.generateLazyValidator)(s.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(bg)),bg}var wg={},qI;function dU(){return qI||(qI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(a){a.DATE="date",a.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(wg)),wg}var Sg={},BI;function fU(){return BI||(BI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(Sg)),Sg}var Tg={},UI;function pU(){return UI||(UI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(Tg)),Tg}var Pg={},FI;function hU(){return FI||(FI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const a=Ze();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(i,s){const u=t().validWorldRanges;for(const c of u)if(i>=c.xMin&&i<=c.xMax&&s>=c.yMin&&s<=c.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(i){i.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},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.World||(e.World={}))})(Pg)),Pg}var Ag={},VI;function mU(){return VI||(VI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const a=Ze(),t=Fn(),n=SE(),i=ma();(function(s){s.RECENTLY_OFFERED="recently_offered",s.RECENTLY_UPDATED="recently_updated",s.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(s){const u={properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,contractAddress:{type:"string"},network:i.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({},u.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...u.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},u.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...u.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},u.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...u.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Bid||(e.Bid={}))})(Ag)),Ag}var Og={},HI;function yU(){return HI||(HI=1,Object.defineProperty(Og,"__esModule",{value:!0})),Og}var Ig={},zI;function gU(){return zI||(zI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,(function(a){a.BID="bid",a.PUBLIC_NFT_ORDER="public_nft_order",a.PUBLIC_ITEM_ORDER="public_item_order"})(e.TradeType||(e.TradeType={})),(function(a){a[a.ERC20=1]="ERC20",a[a.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",a[a.ERC721=3]="ERC721",a[a.COLLECTION_ITEM=4]="COLLECTION_ITEM"})(e.TradeAssetType||(e.TradeAssetType={})),(function(a){a.SENT="sent",a.RECEIVED="received"})(e.TradeAssetDirection||(e.TradeAssetDirection={}))})(Ig)),Ig}var Do={},Ng={},WI;function _U(){return WI||(WI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(Ng)),Ng}var Rg={},GI;function vU(){return GI||(GI=1,Object.defineProperty(Rg,"__esModule",{value:!0})),Rg}var Cg={},KI;function EU(){return KI||(KI=1,Object.defineProperty(Cg,"__esModule",{value:!0})),Cg}var Mg={},YI;function bU(){return YI||(YI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(Mg)),Mg}var jg={},XI;function wU(){return XI||(XI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(jg)),jg}var Lg={},JI;function SU(){return JI||(JI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewMessageType=void 0;const a=Ze();(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,a.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,i,s,u="*")=>{const c={type:i,payload:s};n.postMessage(c,u)};e.sendMessage=t})(Lg)),Lg}var Dg={},QI;function TU(){return QI||(QI=1,Object.defineProperty(Dg,"__esModule",{value:!0})),Dg}var kg={},ZI;function PU(){return ZI||(ZI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(kg)),kg}var qg={},xI;function AU(){return xI||(xI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(qg)),qg}var Bg={},$I;function OU(){return $I||($I=1,Object.defineProperty(Bg,"__esModule",{value:!0})),Bg}var Ug={},eN;function IU(){return eN||(eN=1,Object.defineProperty(Ug,"__esModule",{value:!0})),Ug}var Fg={},tN;function NU(){return tN||(tN=1,Object.defineProperty(Fg,"__esModule",{value:!0})),Fg}var Vg={},rN;function RU(){return rN||(rN=1,Object.defineProperty(Vg,"__esModule",{value:!0})),Vg}var Hg={},nN;function CU(){return nN||(nN=1,Object.defineProperty(Hg,"__esModule",{value:!0})),Hg}var zg={},aN;function MU(){return aN||(aN=1,Object.defineProperty(zg,"__esModule",{value:!0})),zg}var Wg={},iN;function jU(){return iN||(iN=1,Object.defineProperty(Wg,"__esModule",{value:!0})),Wg}var Gg={},oN;function LU(){return oN||(oN=1,Object.defineProperty(Gg,"__esModule",{value:!0})),Gg}var sN;function DU(){return sN||(sN=1,(function(e){var a=Do&&Do.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Do&&Do.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(_U(),e),t(vU(),e),t(EU(),e),t(bU(),e),t(wU(),e),t(SU(),e),t(TU(),e),t(PU(),e),t(AU(),e),t(OU(),e),t(IU(),e),t(NU(),e),t(RU(),e),t(CU(),e),t(MU(),e),t(jU(),e),t(LU(),e)})(Do)),Do}var ko={},qu={},uN;function kU(){if(uN)return qu;uN=1,Object.defineProperty(qu,"__esModule",{value:!0}),qu.isSysLink=void 0;const e=a=>a!==null&&typeof a=="object"&&"sys"in a&&"id"in a.sys;return qu.isSysLink=e,qu}var Bu={},lN;function qU(){if(lN)return Bu;lN=1,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.ContentfulLocale=void 0;var e;return(function(a){a.enUS="en-US",a.es="es",a.zh="zh"})(e||(e={})),Bu.ContentfulLocale=e,Bu}var Kg={},cN;function BU(){return cN||(cN=1,Object.defineProperty(Kg,"__esModule",{value:!0})),Kg}var dN;function UU(){return dN||(dN=1,(function(e){var a=ko&&ko.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=ko&&ko.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(kU(),e),t(qU(),e),t(BU(),e)})(ko)),ko}var fN;function FU(){return fN||(fN=1,(function(e){var a=Lo&&Lo.__createBinding||(Object.create?(function(Q,ne,me,be){be===void 0&&(be=me);var Ne=Object.getOwnPropertyDescriptor(ne,me);(!Ne||("get"in Ne?!ne.__esModule:Ne.writable||Ne.configurable))&&(Ne={enumerable:!0,get:function(){return ne[me]}}),Object.defineProperty(Q,be,Ne)}):(function(Q,ne,me,be){be===void 0&&(be=me),Q[be]=ne[me]})),t=Lo&&Lo.__exportStar||function(Q,ne){for(var me in Q)me!=="default"&&!Object.prototype.hasOwnProperty.call(ne,me)&&a(ne,Q,me)};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=tU();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var i=Fn();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return i.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return i.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return i.getURNProtocol}});var s=xM();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return s.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return s.getChainId}});var u=rU();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return u.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return u.CollectionSortBy}});var c=nU();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return c.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return c.ContractSortBy}});var f=aU();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return f.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return f.ItemSortBy}});var p=SE();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return p.ListingStatus}});var m=iU();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return m.MetaTransaction}});var h=oU();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return h.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return h.MintSortBy}});var _=ma();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return _.Network}});var T=mf();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return T.NFTCategory}});var C=wj();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return C.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return C.NFTSortBy}});var O=sU();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return O.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return O.CatalogSortDirection}});var E=uU();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return E.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return E.OrderSortBy}});var R=$M();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return R.ProviderType}});var v=pf();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return v.Rarity}});var I=Sj();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return I.SaleType}});var A=lU();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return A.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return A.SaleSortBy}});var y=cU();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return y.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return y.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return y.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return y.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return y.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return y.PeriodCreation}});var S=dU();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return S.AnalyticsDayDataSortBy}});var M=fU();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return M.Store}});var U=pU();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return U.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return U.GenderFilterOption}});var V=hU();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return V.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return V.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return V.isInsideWorldLimits}}),t(mU(),e),t(yU(),e),t(gU(),e),t(DU(),e),t(UU(),e)})(Lo)),Lo}var Yg={},pN;function VU(){return pN||(pN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(Yg)),Yg}var hN;function HU(){return hN||(hN=1,(function(e){var a=aa&&aa.__createBinding||(Object.create?(function(u,c,f,p){p===void 0&&(p=f);var m=Object.getOwnPropertyDescriptor(c,f);(!m||("get"in m?!c.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(u,p,m)}):(function(u,c,f,p){p===void 0&&(p=f),u[p]=c[f]})),t=aa&&aa.__setModuleDefault||(Object.create?(function(u,c){Object.defineProperty(u,"default",{enumerable:!0,value:c})}):function(u,c){u.default=c}),n=aa&&aa.__importStar||function(u){if(u&&u.__esModule)return u;var c={};if(u!=null)for(var f in u)f!=="default"&&Object.prototype.hasOwnProperty.call(u,f)&&a(c,u,f);return t(c,u),c},i=aa&&aa.__exportStar||function(u,c){for(var f in u)f!=="default"&&!Object.prototype.hasOwnProperty.call(c,f)&&a(c,u,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const s=n(eU());e.sdk=s,i(Ze(),e),i(FU(),e),i(wE(),e),i($o(),e),i(VU(),e),i(hf(),e),i(gj(),e),i(bj(),e)})(aa)),aa}var Xs=HU();const zU=Object.freeze({storageKey:"decentraland-connect-storage-key",[Ft.ProviderType.INJECTED]:{},[Ft.ProviderType.FORTMATIC]:{apiKeys:{[At.ChainId.ETHEREUM_MAINNET]:"pk_live_F8E24DF8DD5BCBC5",[At.ChainId.ETHEREUM_SEPOLIA]:"pk_test_5B728BEFE5C10911"},urls:Ws(Ft.ProviderType.FORTMATIC)},[Ft.ProviderType.NETWORK]:{urls:Ws(Ft.ProviderType.NETWORK)},[Ft.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:Ws(Ft.ProviderType.WALLET_LINK)},[Ft.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:Ws(Ft.ProviderType.WALLET_CONNECT_V2),chains:{[At.ChainId.ETHEREUM_MAINNET]:{chains:[At.ChainId.ETHEREUM_MAINNET],optionalChains:[At.ChainId.MATIC_MAINNET,At.ChainId.ARBITRUM_MAINNET,At.ChainId.OPTIMISM_MAINNET,At.ChainId.AVALANCHE_MAINNET,At.ChainId.BSC_MAINNET,At.ChainId.FANTOM_MAINNET]},[At.ChainId.ETHEREUM_SEPOLIA]:{chains:[At.ChainId.ETHEREUM_SEPOLIA],optionalChains:[At.ChainId.MATIC_AMOY]}}},[Ft.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:Ws(Ft.ProviderType.MAGIC),chains:[At.ChainId.ETHEREUM_MAINNET,At.ChainId.ETHEREUM_SEPOLIA,At.ChainId.MATIC_MAINNET,At.ChainId.MATIC_AMOY,At.ChainId.OPTIMISM_MAINNET,At.ChainId.ARBITRUM_MAINNET,At.ChainId.AVALANCHE_MAINNET,At.ChainId.BSC_MAINNET,At.ChainId.FANTOM_MAINNET]},[Ft.ProviderType.MAGIC_TEST]:{apiKey:"pk_live_CE856A4938B36648",urls:Ws(Ft.ProviderType.MAGIC),chains:[At.ChainId.ETHEREUM_MAINNET,At.ChainId.ETHEREUM_SEPOLIA,At.ChainId.MATIC_MAINNET,At.ChainId.MATIC_AMOY,At.ChainId.OPTIMISM_MAINNET,At.ChainId.ARBITRUM_MAINNET,At.ChainId.AVALANCHE_MAINNET,At.ChainId.BSC_MAINNET,At.ChainId.FANTOM_MAINNET]}});function $a(){return zU}function Ws(e){const a={[At.ChainId.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[At.ChainId.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[At.ChainId.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[At.ChainId.MATIC_AMOY]:"https://rpc.decentraland.org/amoy",[At.ChainId.ARBITRUM_MAINNET]:"https://rpc.decentraland.org/arbitrum",[At.ChainId.OPTIMISM_MAINNET]:"https://rpc.decentraland.org/optimism",[At.ChainId.AVALANCHE_MAINNET]:"https://rpc.decentraland.org/avalanche",[At.ChainId.BSC_MAINNET]:"https://rpc.decentraland.org/binance",[At.ChainId.FANTOM_MAINNET]:"https://rpc.decentraland.org/fantom"};let t="";switch(e){case Ft.ProviderType.WALLET_LINK:t="walletlink";break;case Ft.ProviderType.FORTMATIC:t="fortmatic";break;case Ft.ProviderType.MAGIC:t="magic";break;case Ft.ProviderType.MAGIC_TEST:t="magic";break;case Ft.ProviderType.WALLET_CONNECT_V2:t="walletconnect-v2";break;case Ft.ProviderType.AUTH_SERVER:t="auth-server";break}if(t)for(const n in a)a[n]+=`?project=${t}`;return a}class WU extends Qs{constructor(a){const t=$a()[Xs.ProviderType.FORTMATIC],n=Object.keys(t.apiKeys).map(i=>Number(i));if(!n.includes(a))throw new Error(`Invariant error: Unsupported chainId ${a}`);super({supportedChainIds:n}),this.apiKey=t.apiKeys[a],this.chainId=a,this.rpcUrl=t.urls[a]}async activate(){if(!this.fortmatic){const{default:t}=await gl(async()=>{const{default:n}=await import("./fortmatic-CyjyhaK-.js").then(i=>i.f);return{default:n}},[]);this.fortmatic=new t(this.apiKey,{rpcUrl:this.rpcUrl,chainId:this.chainId})}const a=await this.fortmatic.getProvider().enable().then(t=>t[0]);return{provider:this.fortmatic.getProvider(),chainId:this.chainId,account:a}}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(a=>a[0])}deactivate(){}close(){return this.fortmatic.user.logout()}}function Uv(){return Uv=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Uv.apply(this,arguments)}function TE(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,e.__proto__=a}function Fv(e){return Fv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Fv(e)}function Jd(e,a){return Jd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Jd(e,a)}function GU(){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 Gd(e,a,t){return GU()?Gd=Reflect.construct:Gd=function(i,s,u){var c=[null];c.push.apply(c,s);var f=Function.bind.apply(i,c),p=new f;return u&&Jd(p,u.prototype),p},Gd.apply(null,arguments)}function KU(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Qd(e){var a=typeof Map=="function"?new Map:void 0;return Qd=function(n){if(n===null||!KU(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a<"u"){if(a.has(n))return a.get(n);a.set(n,i)}function i(){return Gd(n,arguments,Fv(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Jd(i,n)},Qd(e)}function Dd(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 Gs(e,a){try{var t=e()}catch(n){return a(n)}return t&&t.then?t.then(void 0,a):t}function Ra(e){return e.hasOwnProperty("result")?e.result:e}var Xg=(function(e){TE(a,e);function a(){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 a})(Qd(Error)),YU=(function(e){TE(a,e);function a(){var t;return t=e.call(this)||this,t.name=t.constructor.name,t.message="The user rejected the request.",t}return a})(Qd(Error)),XU=(function(e){TE(a,e);function a(n){var i;return i=e.call(this,n)||this,i.handleNetworkChanged=i.handleNetworkChanged.bind(Dd(i)),i.handleChainChanged=i.handleChainChanged.bind(Dd(i)),i.handleAccountsChanged=i.handleAccountsChanged.bind(Dd(i)),i.handleClose=i.handleClose.bind(Dd(i)),i}var t=a.prototype;return t.handleChainChanged=function(i){this.emitUpdate({chainId:i,provider:window.ethereum})},t.handleAccountsChanged=function(i){i.length===0?this.emitDeactivate():this.emitUpdate({account:i[0]})},t.handleClose=function(i,s){this.emitDeactivate()},t.handleNetworkChanged=function(i){this.emitUpdate({chainId:i,provider:window.ethereum})},t.activate=function(){try{var i=function(m){if(s)return m;function h(){return Uv({provider:window.ethereum},c?{account:c}:{})}var _=(function(){if(!c)return Promise.resolve(window.ethereum.enable().then(function(T){return T&&Ra(T)[0]})).then(function(T){c=T})})();return _&&_.then?_.then(h):h(_)},s=!1,u=this;if(!window.ethereum)throw new Xg;window.ethereum.on&&(window.ethereum.on("chainChanged",u.handleChainChanged),window.ethereum.on("accountsChanged",u.handleAccountsChanged),window.ethereum.on("close",u.handleClose),window.ethereum.on("networkChanged",u.handleNetworkChanged)),window.ethereum.isMetaMask&&(window.ethereum.autoRefreshOnNetworkChange=!1);var c,f=Gs(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(p){return Ra(p)[0]})).then(function(p){c=p})},function(p){if(p.code===4001)throw new YU});return Promise.resolve(f&&f.then?f.then(i):i(f))}catch(p){return Promise.reject(p)}},t.getProvider=function(){try{return Promise.resolve(window.ethereum)}catch(i){return Promise.reject(i)}},t.getChainId=function(){try{var i=function(){function f(){if(!s)try{s=Ra(window.ethereum.send({method:"net_version"}))}catch{}return s||(window.ethereum.isDapper?s=Ra(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 m=Gs(function(){return Promise.resolve(window.ethereum.send("net_version").then(Ra)).then(function(h){s=h})},function(){});if(m&&m.then)return m.then(function(){})}})();return p&&p.then?p.then(f):f(p)};if(!window.ethereum)throw new Xg;var s,u=Gs(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(Ra)).then(function(c){s=c})},function(){});return Promise.resolve(u&&u.then?u.then(i):i(u))}catch(c){return Promise.reject(c)}},t.getAccount=function(){try{var i=function(){function f(){return s||(s=Ra(window.ethereum.send({method:"eth_accounts"}))[0]),s}var p=(function(){if(!s){var m=Gs(function(){return Promise.resolve(window.ethereum.enable().then(function(h){return Ra(h)[0]})).then(function(h){s=h})},function(){});if(m&&m.then)return m.then(function(){})}})();return p&&p.then?p.then(f):f(p)};if(!window.ethereum)throw new Xg;var s,u=Gs(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(c){return Ra(c)[0]})).then(function(c){s=c})},function(){});return Promise.resolve(u&&u.then?u.then(i):i(u))}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(Gs(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(i){return Ra(i).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(i){return Promise.reject(i)}},a})(Qs);class JU 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 QU=60*1e3;class ZU extends XU{constructor(a){super({supportedChainIds:[a]})}async activate(){const a=new Promise((n,i)=>{setTimeout(()=>{i(new JU)},QU)}),t=super.activate();return Promise.race([t,a])}}var xU="Invariant failed";function mN(e,a){throw new Error(xU)}function Tj(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,_l(e,a)}function Vv(e){return Vv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Vv(e)}function _l(e,a){return _l=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},_l(e,a)}function $U(){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 Kd(e,a,t){return $U()?Kd=Reflect.construct:Kd=function(i,s,u){var c=[null];c.push.apply(c,s);var f=Function.bind.apply(i,c),p=new f;return u&&_l(p,u.prototype),p},Kd.apply(null,arguments)}function eF(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Hv(e){var a=typeof Map=="function"?new Map:void 0;return Hv=function(n){if(n===null||!eF(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a<"u"){if(a.has(n))return a.get(n);a.set(n,i)}function i(){return Kd(n,arguments,Vv(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),_l(i,n)},Hv(e)}var Jg=(function(e){Tj(a,e);function a(t,n,i){var s;return s=e.call(this)||this,s.code=n,s.data=i,s.name=s.constructor.name,s.message=t,s}return a})(Hv(Error)),tF=function(a,t){var n=this,i=this;this.isMetaMask=!1,this.sendAsync=function(u,c){console.log("sendAsync",u.method,u.params),i.request(u.method,u.params).then(function(f){return c(null,{jsonrpc:"2.0",id:u.id,result:f})}).catch(function(f){return c(f,null)})},this.request=function(u,c){try{return typeof u!="string"&&(c=u.params,u=u.method),Promise.resolve(fetch(n.url,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:u,params:c}),headers:{"Content-Type":"application/json"}})).then(function(f){if(!f.ok)throw new Jg(f.status+": "+f.statusText,-32e3);return Promise.resolve(f.json()).then(function(p){if("error"in p){var m,h,_;throw new Jg(p==null||(m=p.error)==null?void 0:m.message,p==null||(h=p.error)==null?void 0:h.code,p==null||(_=p.error)==null?void 0:_.data)}else{if("result"in p)return p.result;throw new Jg("Received unexpected JSON-RPC response to "+u+" request.",-32e3,p)}})})}catch(f){return Promise.reject(f)}},this.chainId=a,this.url=t;var s=new URL(t);this.host=s.host,this.path=s.pathname},rF=(function(e){Tj(a,e);function a(n){var i,s=n.urls,u=n.defaultChainId;return u||Object.keys(s).length===1||mN(),i=e.call(this,{supportedChainIds:Object.keys(s).map(function(c){return Number(c)})})||this,i.currentChainId=u||Number(Object.keys(s)[0]),i.providers=Object.keys(s).reduce(function(c,f){return c[Number(f)]=new tF(Number(f),s[Number(f)]),c},{}),i}var t=a.prototype;return t.activate=function(){try{var i=this;return Promise.resolve({provider:i.providers[i.currentChainId],chainId:i.currentChainId,account:null})}catch(s){return Promise.reject(s)}},t.getProvider=function(){try{var i=this;return Promise.resolve(i.providers[i.currentChainId])}catch(s){return Promise.reject(s)}},t.getChainId=function(){try{var i=this;return Promise.resolve(i.currentChainId)}catch(s){return Promise.reject(s)}},t.getAccount=function(){return Promise.resolve(null)},t.deactivate=function(){},t.changeChainId=function(i){Object.keys(this.providers).includes(i.toString())||mN(),this.currentChainId=i,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:i})},a})(Qs);class nF extends rF{constructor(a){super({urls:$a()[Ft.ProviderType.NETWORK].urls,defaultChainId:a})}}function zv(){return zv=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},zv.apply(this,arguments)}function aF(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,Wv(e,a)}function Wv(e,a){return Wv=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Wv(e,a)}function yN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var iF=1,oF=(function(e){aF(a,e);function a(n){var i,s=n.url,u=n.appName,c=n.appLogoUrl,f=n.darkMode,p=n.supportedChainIds;return i=e.call(this,{supportedChainIds:p})||this,i.url=s,i.appName=u,i.appLogoUrl=c,i.darkMode=f||!1,i.handleChainChanged=i.handleChainChanged.bind(yN(i)),i.handleAccountsChanged=i.handleAccountsChanged.bind(yN(i)),i}var t=a.prototype;return t.activate=function(){try{var i=this,s=function(){return Promise.resolve(i.provider.request({method:"eth_requestAccounts"})).then(function(f){var p=f[0];return i.provider.on("chainChanged",i.handleChainChanged),i.provider.on("accountsChanged",i.handleAccountsChanged),{provider:i.provider,account:p}})},u=(function(){if(window.ethereum&&window.ethereum.isCoinbaseWallet===!0)i.provider=window.ethereum;else{var c=(function(){if(!i.walletLink)return Promise.resolve(gl(()=>import("./index-BJme2YPa.js").then(f=>f.i),[]).then(function(f){var p;return(p=f?.default)!=null?p:f})).then(function(f){i.walletLink=new f(zv({appName:i.appName,darkMode:i.darkMode},i.appLogoUrl?{appLogoUrl:i.appLogoUrl}:{})),i.provider=i.walletLink.makeWeb3Provider(i.url,iF)})})();if(c&&c.then)return c.then(function(){})}})();return Promise.resolve(u&&u.then?u.then(s):s(u))}catch(c){return Promise.reject(c)}},t.getProvider=function(){try{var i=this;return Promise.resolve(i.provider)}catch(s){return Promise.reject(s)}},t.getChainId=function(){try{var i=this;return Promise.resolve(i.provider.chainId)}catch(s){return Promise.reject(s)}},t.getAccount=function(){try{var i=this;return Promise.resolve(i.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 i=this;return i.provider.close(),i.emitDeactivate(),Promise.resolve()}catch(s){return Promise.reject(s)}},t.handleChainChanged=function(i){this.emitUpdate({chainId:i})},t.handleAccountsChanged=function(i){this.emitUpdate({account:i[0]})},a})(Qs);class sF extends oF{constructor(a){const t=$a()[Xs.ProviderType.WALLET_LINK];super({url:t.urls[a],appName:t.appName,supportedChainIds:[a]})}}class Ma extends Qs{constructor(a){super({supportedChainIds:(()=>{const{chains:t,optionalChains:n}=Ma.configuration.chains[a];return[...t,...n]})()}),this.desiredChainId=a,this.activate=async()=>{const t=await gl(()=>import("./index-DYULJ_xC.js").then(i=>i.R),[]).then(i=>{const{chains:s,optionalChains:u}=Ma.configuration.chains[this.desiredChainId];return i.default.init({projectId:Ma.configuration.projectId,rpcMap:Ma.configuration.urls,chains:s,optionalChains:u,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()}}}Ma.configuration=$a()[Xs.ProviderType.WALLET_CONNECT_V2];Ma.clearStorage=e=>{e.removeRegExp(new RegExp("^wc@2:"))};class Pj extends Qs{constructor(a,t=!1){super({supportedChainIds:$a()[Xs.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 i=await this.getProvider(),s=await i.request({method:"eth_accounts"});return this.account=s[0]??null,{provider:i,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(i,s,u)=>{if(u[0]?.method==="wallet_switchEthereumChain")try{const c=parseInt(u[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 i.bind(n)(...u)}}),sendAsync:new Proxy(n.send,{apply:async(i,s,u)=>i.bind(n)(...u)})}},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:i}=await gl(async()=>{const{Magic:c}=await import("./index-8e4wv-tH.js");return{Magic:c}},__vite__mapDeps([0,1])),{OAuthExtension:s}=await gl(async()=>{const{OAuthExtension:c}=await import("./index-QHMvomuf.js");return{OAuthExtension:c}},__vite__mapDeps([2,1])),u=$a()[this.isTest?Xs.ProviderType.MAGIC_TEST:Xs.ProviderType.MAGIC];return new i(u.apiKey,{extensions:[new s],network:{rpcUrl:u.urls[n],chainId:n}})},this.chainId=a,this.account=null}close(){if(!this.magic)throw new Error("Magic: instance was not initialized");return this.magic.user.logout()}}class uF extends Pj{constructor(a){super(a,!0)}}class lF{}class cF extends lF{get(a){const t=window.localStorage.getItem(a);return t===null?void 0:t}set(a,t){window.localStorage.setItem(a,t)}remove(a){window.localStorage.removeItem(a)}removeRegExp(a){for(let t=localStorage.length-1;t>=0;t--){const n=localStorage.key(t);n&&a.test(n)&&localStorage.removeItem(n)}}}class Zd{constructor(a){this.provider=a,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,(i,s)=>{s&&!s.hasOwnProperty("result")?n(i,{id:0,jsonrpc:"2.0",result:s}):n(i,s)}):this.send(t,n)}static adapt(a){const t=new Zd(a);return{...a,on:t.on,emit:t.emit,removeListener:t.removeListener,request:t.request,sendAsync:t.sendAsync,send:t.send.bind(t)}}async send(a,t){let n,i,s;const u=typeof t=="function";if(u){const c=a;i=c.params||[],n=c.method,s=t}else n=a,i=t||[],s=(c,f)=>{if(c)throw c;return f};if(this.isModernProvider()){const[c,f]=await this.provider.request({method:n,params:i}).then(m=>[null,m]).catch(m=>[m,void 0]);return s(c,u?{id:"",jsonrpc:"2.0",result:f}:f)}else{this.patchOldMobile();const[c,f]=u?await new Promise(p=>this.provider.send(a,(m,h)=>{p([m,h])})):await new Promise(p=>this.provider.send({jsonrpc:"2.0",id:++this.id,method:n,params:i},(m,h)=>{p([h&&h.hasOwnProperty("error")?h.error:m,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 dF{constructor(a){this.storage=a,this.getWalletName=()=>{if(this.connector instanceof Ma)return this.connector.getWalletName()},this.clearConnectionData=()=>{const{storageKey:t}=$a();this.storage.remove(t),Ma.clearStorage(this.storage)},this.handleWeb3ReactDeactivate=async()=>{try{await this.disconnect()}catch(t){console.error(t)}}}async connect(a,t=At.ChainId.ETHEREUM_MAINNET){if(this.connector)try{await this.disconnect()}catch(c){console.error("Error disconnecting previous connection",c)}const n=this.buildConnector(a,t);n.on(Za.Deactivate,this.handleWeb3ReactDeactivate);let{provider:i,account:s}={};try{const c=await n.activate();i=c.provider,s=c.account}catch(c){throw console.error("Error activating the connector",c),c}(a===Ft.ProviderType.MAGIC||a===Ft.ProviderType.MAGIC_TEST)&&n.on(Za.Update,({chainId:c})=>{c&&this.setConnectionData(a,c)});let u=t;if(a===Ft.ProviderType.INJECTED){const c=await i.request({method:"eth_chainId"});u=c?parseInt(c,16):u}return this.connector=n,this.setConnectionData(a,u),{provider:Zd.adapt(i),providerType:a,account:s||"",chainId:u}}isConnected(){return!!this.connector&&!!this.getConnectionData()}async tryPreviousConnection(){const a=this.getConnectionData();if(!a)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:a.providerType,chainId:a.chainId,account:await this.connector.getAccount()};const t=this.promiseOfConnection?await this.promiseOfConnection:await(this.promiseOfConnection=this.connect(a.providerType,a.chainId));return this.promiseOfConnection=void 0,{...t,chainId:this.getConnectionData().chainId}}getAvailableProviders(){const a=[Ft.ProviderType.FORTMATIC,Ft.ProviderType.WALLET_CONNECT,Ft.ProviderType.WALLET_LINK];return typeof window<"u"&&window.ethereum!==void 0?a.unshift(Ft.ProviderType.INJECTED):a.unshift(Ft.ProviderType.METAMASK_MOBILE),a}async disconnect(){this.connector&&(this.connector.removeAllListeners(Za.Deactivate),this.connector.removeAllListeners(Za.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(a,t=At.ChainId.ETHEREUM_MAINNET){const i=await this.buildConnector(a,t).getProvider();return Zd.adapt(i)}buildConnector(a,t){switch(a){case Ft.ProviderType.INJECTED:return new ZU(t);case Ft.ProviderType.FORTMATIC:return new WU(t);case Ft.ProviderType.MAGIC:return new Pj(t);case Ft.ProviderType.MAGIC_TEST:return new uF(t);case Ft.ProviderType.WALLET_LINK:return new sF(t);case Ft.ProviderType.NETWORK:return new nF(t);case Ft.ProviderType.WALLET_CONNECT_V2:return new Ma(t);default:throw new Error(`Invalid provider ${a}`)}}getConnectionData(){const{storageKey:a}=$a(),t=this.storage.get(a);return t?JSON.parse(t):void 0}setConnectionData(a,t){const{storageKey:n}=$a(),i=JSON.stringify({providerType:a,chainId:t});this.storage.set(n,i)}isClosableConnector(){return this.connector&&typeof this.connector.close<"u"}}const Qg=new dF(new cF),fF=e=>/^decentraland.(zone|org|today)$/.test(e),pF=async(e,a="https://peer.decentraland.org")=>{try{const n=await(await fetch(`${a}/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}},hF=e=>({shouldUseBasePath:fF,fetchAvatar:a=>pF(a),...e,debug:e.debug??!1}),mF=e=>({[Bn.ChainId.ETHEREUM_MAINNET]:"Ethereum Mainnet",[Bn.ChainId.ETHEREUM_SEPOLIA]:"Ethereum Sepolia",[Bn.ChainId.MATIC_MAINNET]:"Polygon Mainnet",[Bn.ChainId.MATIC_AMOY]:"Polygon Amoy"})[e]||`Chain ID ${e}`,yF=e=>{const a="0x"+e.toString(16),t=mF(e);switch(e){case Bn.ChainId.MATIC_MAINNET:return{chainId:a,chainName:t,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:["https://rpc-mainnet.maticvigil.com/"],blockExplorerUrls:["https://polygonscan.com/"]};case Bn.ChainId.MATIC_AMOY:return{chainId:a,chainName:t,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:["https://rpc-amoy.polygon.technology/"],blockExplorerUrls:["https://www.oklink.com/amoy"]};case Bn.ChainId.ETHEREUM_SEPOLIA:return{chainId:a,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"]}}},gN=async e=>{const a=await e.request({method:"eth_chainId"});return parseInt(a,16)},Xr=(e,a,t=!1)=>{t&&typeof console<"u"&&console.log(`[Auth] ${e}`,a||"")},gF=(e,a,t)=>{const i=new URLSearchParams(t).get("redirectTo"),s=e.shouldUseBasePath?.(window.location.host)?e.basePath:"",u=i?`${s}${i}`:`${s}${a}${t}`;return`${e.authUrl}/login?redirectTo=${encodeURIComponent(window.location.origin+u)}`},Aj=G.createContext(void 0),_F=({children:e,config:a})=>{const{pathname:t,search:n}=Ni(),i=G.useMemo(()=>hF(a),[a]),[s,u]=G.useState(),[c,f]=G.useState(),[p,m]=G.useState(!1),[h,_]=G.useState(!1),[T,C]=G.useState(i.defaultChainId),O=G.useCallback(()=>{Xr("Initiating sign in",{pathname:t,search:n},i.debug);const I=gF(i,t,n);Xr("Redirecting to auth",{redirectUrl:I},i.debug),window.location.replace(I)},[t,n,i]),E=G.useCallback(()=>{try{Xr("Signing out",{wallet:s},i.debug),Qg.disconnect(),s&&Bv.localStorageClearIdentity(s),u(void 0),f(void 0),m(!1),Xr("Sign out completed",void 0,i.debug)}catch(I){console.error("Error during sign-out:",I)}},[s,i.debug]),R=G.useCallback(async(I=Bn.ChainId.ETHEREUM_MAINNET)=>{try{Xr("Changing network",{from:T,to:I},i.debug);const A=await Qg.getProvider();if(!A){console.error("No provider available to switch network"),C(Bn.ChainId.ETHEREUM_MAINNET);return}C(I);try{await A.request({method:"wallet_switchEthereumChain",params:[{chainId:"0x"+I.toString(16)}]});const y=await gN(A);y!==I&&console.warn("Chain ID did not change as expected"),Xr("Network changed successfully",{chainId:y},i.debug)}catch(y){const S=y;S.code===4902?(Xr("Adding new chain to wallet",{chainId:I},i.debug),await A.request({method:"wallet_addEthereumChain",params:[yF(I)]}),await gN(A)!==I&&(console.warn("Chain ID not set after adding network"),C(Bn.ChainId.ETHEREUM_MAINNET))):(console.error("Error switching network:",S),C(Bn.ChainId.ETHEREUM_MAINNET))}}catch(A){console.error("Error during network change:",A),C(Bn.ChainId.ETHEREUM_MAINNET)}},[T,i.debug]);G.useEffect(()=>{(async()=>{try{_(!0),Xr("Checking auth status",void 0,i.debug);try{const{account:A,chainId:y}=await Qg.tryPreviousConnection();if(A){Xr("Previous connection found",{address:A,chainId:y},i.debug),u(A),C(y);let S=!1;try{const M=Bv.localStorageGetIdentity(A);if(M&&M.expiration){const U=new Date(M.expiration),V=new Date;V.getTime()<=U.getTime()?(Xr("Identity valid",{expiration:U},i.debug),S=!0):Xr("Identity expired",{expiration:U,now:V},i.debug)}else Xr("No identity found",void 0,i.debug)}catch(M){console.error("Error checking identity:",M)}if(m(S),S&&i.fetchAvatar)try{Xr("Fetching avatar",{address:A},i.debug);const M=await i.fetchAvatar(A);M&&(f(M),Xr("Avatar fetched successfully",M,i.debug))}catch(M){console.error("Error fetching avatar:",M)}}else Xr("No previous connection found",void 0,i.debug)}catch(A){Xr("Previous connection failed",A,i.debug)}}catch(A){console.error("Error checking auth status:",A)}finally{_(!1)}})()},[i.debug,i.fetchAvatar]);const v={wallet:s,avatar:c,chainId:T,isSignedIn:p,isConnecting:h,signIn:O,signOut:E,changeNetwork:R};return k.jsx(Aj.Provider,{value:v,children:e})},yf=e=>{const a=G.useContext(Aj);if(a===void 0)throw new Error("useAuth must be used within an AuthProvider");return a};var qo={},oa={},pl={exports:{}};var vF=pl.exports,_N;function gf(){return _N||(_N=1,(function(e,a){(function(t,n){n(a)})(vF,(function(t){function n(b){if(b.jsonrpc="2.0",!b.id||typeof b.id!="number"||Math.floor(b.id)!==b.id)throw new Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(b)}`);if(!b.method||typeof b.method!="string"||b.method.trim().length===0)throw new Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(b)}`);if(!b.params||typeof b.params!="object")throw new Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(b)}`);return b}var i={};function s(){let b,N;const q=new Promise(((J,te)=>{b=oe=>{J(oe),q.isPending=!1},N=oe=>{te(oe),q.isPending=!1}})).catch((J=>Promise.reject(J)));return q.resolve=b,q.reject=N,"finally"in q||(q.finally=J=>{q.then(J),q.catch(J)}),q.isPending=!0,q}Object.defineProperty(i,"__esModule",{value:!0});var u=i.future=s;i.default=s;var c={exports:{}};(function(b){(function(){var N="input is invalid type",q=typeof window=="object",J=q?window:{};J.JS_SHA3_NO_WINDOW&&(q=!1);var te=!q&&typeof self=="object";!J.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node?J=dD:te&&(J=self);var oe=!J.JS_SHA3_NO_COMMON_JS&&b.exports,Ie=!J.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",ze="0123456789abcdef".split(""),st=[4,1024,262144,67108864],ct=[0,8,16,24],gr=[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],Xt=[224,256,384,512],Ke=[128,256],Tr=["hex","buffer","arrayBuffer","array","digest"],Jt={128:168,256:136};!J.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(w){return Object.prototype.toString.call(w)==="[object Array]"}),!Ie||!J.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(w){return typeof w=="object"&&w.buffer&&w.buffer.constructor===ArrayBuffer});for(var Ht=function(w,z,x){return function(Y){return new Bt(w,z,w).update(Y)[x]()}},Nr=function(w,z,x){return function(Y,re){return new Bt(w,z,re).update(Y)[x]()}},In=function(w,z,x){return function(Y,re,ee,ie){return lr["cshake"+w].update(Y,re,ee,ie)[x]()}},xr=function(w,z,x){return function(Y,re,ee,ie){return lr["kmac"+w].update(Y,re,ee,ie)[x]()}},Pr=function(w,z,x,Y){for(var re=0;re<Tr.length;++re){var ee=Tr[re];w[ee]=z(x,Y,ee)}return w},Nn=function(w,z){var x=Ht(w,z,"hex");return x.create=function(){return new Bt(w,z,w)},x.update=function(Y){return x.create().update(Y)},Pr(x,Ht,w,z)},on=[{name:"keccak",padding:[1,256,65536,16777216],bits:Xt,createMethod:Nn},{name:"sha3",padding:[6,1536,393216,100663296],bits:Xt,createMethod:Nn},{name:"shake",padding:[31,7936,2031616,520093696],bits:Ke,createMethod:function(w,z){var x=Nr(w,z,"hex");return x.create=function(Y){return new Bt(w,z,Y)},x.update=function(Y,re){return x.create(re).update(Y)},Pr(x,Nr,w,z)}},{name:"cshake",padding:st,bits:Ke,createMethod:function(w,z){var x=Jt[w],Y=In(w,0,"hex");return Y.create=function(re,ee,ie){return ee||ie?new Bt(w,z,re).bytepad([ee,ie],x):lr["shake"+w].create(re)},Y.update=function(re,ee,ie,he){return Y.create(ee,ie,he).update(re)},Pr(Y,In,w,z)}},{name:"kmac",padding:st,bits:Ke,createMethod:function(w,z){var x=Jt[w],Y=xr(w,0,"hex");return Y.create=function(re,ee,ie){return new pr(w,z,ee).bytepad(["KMAC",ie],x).bytepad([re],x)},Y.update=function(re,ee,ie,he){return Y.create(re,ie,he).update(ee)},Pr(Y,xr,w,z)}}],lr={},zr=[],_r=0;_r<on.length;++_r)for(var Rn=on[_r],Ve=Rn.bits,yn=0;yn<Ve.length;++yn){var zn=Rn.name+"_"+Ve[yn];if(zr.push(zn),lr[zn]=Rn.createMethod(Ve[yn],Rn.padding),Rn.name!=="sha3"){var Ea=Rn.name+Ve[yn];zr.push(Ea),lr[Ea]=lr[zn]}}function Bt(w,z,x){this.blocks=[],this.s=[],this.padding=z,this.outputBits=x,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(w<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=x>>5,this.extraBytes=(31&x)>>3;for(var Y=0;Y<50;++Y)this.s[Y]=0}function pr(w,z,x){Bt.call(this,w,z,x)}Bt.prototype.update=function(w){if(this.finalized)throw new Error("finalize already called");var z,x=typeof w;if(x!=="string"){if(x!=="object")throw new Error(N);if(w===null)throw new Error(N);if(Ie&&w.constructor===ArrayBuffer)w=new Uint8Array(w);else if(!(Array.isArray(w)||Ie&&ArrayBuffer.isView(w)))throw new Error(N);z=!0}for(var Y,re,ee=this.blocks,ie=this.byteCount,he=w.length,ve=this.blockCount,_e=0,Ye=this.s;_e<he;){if(this.reset)for(this.reset=!1,ee[0]=this.block,Y=1;Y<ve+1;++Y)ee[Y]=0;if(z)for(Y=this.start;_e<he&&Y<ie;++_e)ee[Y>>2]|=w[_e]<<ct[3&Y++];else for(Y=this.start;_e<he&&Y<ie;++_e)(re=w.charCodeAt(_e))<128?ee[Y>>2]|=re<<ct[3&Y++]:re<2048?(ee[Y>>2]|=(192|re>>6)<<ct[3&Y++],ee[Y>>2]|=(128|63&re)<<ct[3&Y++]):re<55296||re>=57344?(ee[Y>>2]|=(224|re>>12)<<ct[3&Y++],ee[Y>>2]|=(128|re>>6&63)<<ct[3&Y++],ee[Y>>2]|=(128|63&re)<<ct[3&Y++]):(re=65536+((1023&re)<<10|1023&w.charCodeAt(++_e)),ee[Y>>2]|=(240|re>>18)<<ct[3&Y++],ee[Y>>2]|=(128|re>>12&63)<<ct[3&Y++],ee[Y>>2]|=(128|re>>6&63)<<ct[3&Y++],ee[Y>>2]|=(128|63&re)<<ct[3&Y++]);if(this.lastByteIndex=Y,Y>=ie){for(this.start=Y-ie,this.block=ee[ve],Y=0;Y<ve;++Y)Ye[Y]^=ee[Y];W(Ye),this.reset=!0}else this.start=Y}return this},Bt.prototype.encode=function(w,z){var x=255&w,Y=1,re=[x];for(x=255&(w>>=8);x>0;)re.unshift(x),x=255&(w>>=8),++Y;return z?re.push(Y):re.unshift(Y),this.update(re),re.length},Bt.prototype.encodeString=function(w){var z,x=typeof w;if(x!=="string"){if(x!=="object")throw new Error(N);if(w===null)throw new Error(N);if(Ie&&w.constructor===ArrayBuffer)w=new Uint8Array(w);else if(!(Array.isArray(w)||Ie&&ArrayBuffer.isView(w)))throw new Error(N);z=!0}var Y=0,re=w.length;if(z)Y=re;else for(var ee=0;ee<w.length;++ee){var ie=w.charCodeAt(ee);ie<128?Y+=1:ie<2048?Y+=2:ie<55296||ie>=57344?Y+=3:(ie=65536+((1023&ie)<<10|1023&w.charCodeAt(++ee)),Y+=4)}return Y+=this.encode(8*Y),this.update(w),Y},Bt.prototype.bytepad=function(w,z){for(var x=this.encode(z),Y=0;Y<w.length;++Y)x+=this.encodeString(w[Y]);var re=z-x%z,ee=[];return ee.length=re,this.update(ee),this},Bt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var w=this.blocks,z=this.lastByteIndex,x=this.blockCount,Y=this.s;if(w[z>>2]|=this.padding[3&z],this.lastByteIndex===this.byteCount)for(w[0]=w[x],z=1;z<x+1;++z)w[z]=0;for(w[x-1]|=2147483648,z=0;z<x;++z)Y[z]^=w[z];W(Y)}},Bt.prototype.toString=Bt.prototype.hex=function(){this.finalize();for(var w,z=this.blockCount,x=this.s,Y=this.outputBlocks,re=this.extraBytes,ee=0,ie=0,he="";ie<Y;){for(ee=0;ee<z&&ie<Y;++ee,++ie)w=x[ee],he+=ze[w>>4&15]+ze[15&w]+ze[w>>12&15]+ze[w>>8&15]+ze[w>>20&15]+ze[w>>16&15]+ze[w>>28&15]+ze[w>>24&15];ie%z==0&&(W(x),ee=0)}return re&&(w=x[ee],he+=ze[w>>4&15]+ze[15&w],re>1&&(he+=ze[w>>12&15]+ze[w>>8&15]),re>2&&(he+=ze[w>>20&15]+ze[w>>16&15])),he},Bt.prototype.arrayBuffer=function(){this.finalize();var w,z=this.blockCount,x=this.s,Y=this.outputBlocks,re=this.extraBytes,ee=0,ie=0,he=this.outputBits>>3;w=re?new ArrayBuffer(Y+1<<2):new ArrayBuffer(he);for(var ve=new Uint32Array(w);ie<Y;){for(ee=0;ee<z&&ie<Y;++ee,++ie)ve[ie]=x[ee];ie%z==0&&W(x)}return re&&(ve[ee]=x[ee],w=w.slice(0,he)),w},Bt.prototype.buffer=Bt.prototype.arrayBuffer,Bt.prototype.digest=Bt.prototype.array=function(){this.finalize();for(var w,z,x=this.blockCount,Y=this.s,re=this.outputBlocks,ee=this.extraBytes,ie=0,he=0,ve=[];he<re;){for(ie=0;ie<x&&he<re;++ie,++he)w=he<<2,z=Y[ie],ve[w]=255&z,ve[w+1]=z>>8&255,ve[w+2]=z>>16&255,ve[w+3]=z>>24&255;he%x==0&&W(Y)}return ee&&(w=he<<2,z=Y[ie],ve[w]=255&z,ee>1&&(ve[w+1]=z>>8&255),ee>2&&(ve[w+2]=z>>16&255)),ve},pr.prototype=new Bt,pr.prototype.finalize=function(){return this.encode(this.outputBits,!0),Bt.prototype.finalize.call(this)};var W=function(w){var z,x,Y,re,ee,ie,he,ve,_e,Ye,mt,gt,Nt,Qt,$t,jt,Ut,nr,Wn,ba,wa,qr,Cn,Er,hr,Zt,is,os,oi,ss,us,ls,Di,cs,ds,fs,ps,hs,ms,ys,si,Sa,gs,ki,qi,Bi,Ui,Fi,Gn,_s,vs,Es,Vi,Hi,Ta,Pa,bs,qa,ws,zi,ui,li,Wi;for(Y=0;Y<48;Y+=2)re=w[0]^w[10]^w[20]^w[30]^w[40],ee=w[1]^w[11]^w[21]^w[31]^w[41],ie=w[2]^w[12]^w[22]^w[32]^w[42],he=w[3]^w[13]^w[23]^w[33]^w[43],ve=w[4]^w[14]^w[24]^w[34]^w[44],_e=w[5]^w[15]^w[25]^w[35]^w[45],Ye=w[6]^w[16]^w[26]^w[36]^w[46],mt=w[7]^w[17]^w[27]^w[37]^w[47],z=(gt=w[8]^w[18]^w[28]^w[38]^w[48])^(ie<<1|he>>>31),x=(Nt=w[9]^w[19]^w[29]^w[39]^w[49])^(he<<1|ie>>>31),w[0]^=z,w[1]^=x,w[10]^=z,w[11]^=x,w[20]^=z,w[21]^=x,w[30]^=z,w[31]^=x,w[40]^=z,w[41]^=x,z=re^(ve<<1|_e>>>31),x=ee^(_e<<1|ve>>>31),w[2]^=z,w[3]^=x,w[12]^=z,w[13]^=x,w[22]^=z,w[23]^=x,w[32]^=z,w[33]^=x,w[42]^=z,w[43]^=x,z=ie^(Ye<<1|mt>>>31),x=he^(mt<<1|Ye>>>31),w[4]^=z,w[5]^=x,w[14]^=z,w[15]^=x,w[24]^=z,w[25]^=x,w[34]^=z,w[35]^=x,w[44]^=z,w[45]^=x,z=ve^(gt<<1|Nt>>>31),x=_e^(Nt<<1|gt>>>31),w[6]^=z,w[7]^=x,w[16]^=z,w[17]^=x,w[26]^=z,w[27]^=x,w[36]^=z,w[37]^=x,w[46]^=z,w[47]^=x,z=Ye^(re<<1|ee>>>31),x=mt^(ee<<1|re>>>31),w[8]^=z,w[9]^=x,w[18]^=z,w[19]^=x,w[28]^=z,w[29]^=x,w[38]^=z,w[39]^=x,w[48]^=z,w[49]^=x,Qt=w[0],$t=w[1],Bi=w[11]<<4|w[10]>>>28,Ui=w[10]<<4|w[11]>>>28,os=w[20]<<3|w[21]>>>29,oi=w[21]<<3|w[20]>>>29,zi=w[31]<<9|w[30]>>>23,ui=w[30]<<9|w[31]>>>23,Sa=w[40]<<18|w[41]>>>14,gs=w[41]<<18|w[40]>>>14,cs=w[2]<<1|w[3]>>>31,ds=w[3]<<1|w[2]>>>31,jt=w[13]<<12|w[12]>>>20,Ut=w[12]<<12|w[13]>>>20,Fi=w[22]<<10|w[23]>>>22,Gn=w[23]<<10|w[22]>>>22,ss=w[33]<<13|w[32]>>>19,us=w[32]<<13|w[33]>>>19,li=w[42]<<2|w[43]>>>30,Wi=w[43]<<2|w[42]>>>30,Hi=w[5]<<30|w[4]>>>2,Ta=w[4]<<30|w[5]>>>2,fs=w[14]<<6|w[15]>>>26,ps=w[15]<<6|w[14]>>>26,nr=w[25]<<11|w[24]>>>21,Wn=w[24]<<11|w[25]>>>21,_s=w[34]<<15|w[35]>>>17,vs=w[35]<<15|w[34]>>>17,ls=w[45]<<29|w[44]>>>3,Di=w[44]<<29|w[45]>>>3,Er=w[6]<<28|w[7]>>>4,hr=w[7]<<28|w[6]>>>4,Pa=w[17]<<23|w[16]>>>9,bs=w[16]<<23|w[17]>>>9,hs=w[26]<<25|w[27]>>>7,ms=w[27]<<25|w[26]>>>7,ba=w[36]<<21|w[37]>>>11,wa=w[37]<<21|w[36]>>>11,Es=w[47]<<24|w[46]>>>8,Vi=w[46]<<24|w[47]>>>8,ki=w[8]<<27|w[9]>>>5,qi=w[9]<<27|w[8]>>>5,Zt=w[18]<<20|w[19]>>>12,is=w[19]<<20|w[18]>>>12,qa=w[29]<<7|w[28]>>>25,ws=w[28]<<7|w[29]>>>25,ys=w[38]<<8|w[39]>>>24,si=w[39]<<8|w[38]>>>24,qr=w[48]<<14|w[49]>>>18,Cn=w[49]<<14|w[48]>>>18,w[0]=Qt^~jt&nr,w[1]=$t^~Ut&Wn,w[10]=Er^~Zt&os,w[11]=hr^~is&oi,w[20]=cs^~fs&hs,w[21]=ds^~ps&ms,w[30]=ki^~Bi&Fi,w[31]=qi^~Ui&Gn,w[40]=Hi^~Pa&qa,w[41]=Ta^~bs&ws,w[2]=jt^~nr&ba,w[3]=Ut^~Wn&wa,w[12]=Zt^~os&ss,w[13]=is^~oi&us,w[22]=fs^~hs&ys,w[23]=ps^~ms&si,w[32]=Bi^~Fi&_s,w[33]=Ui^~Gn&vs,w[42]=Pa^~qa&zi,w[43]=bs^~ws&ui,w[4]=nr^~ba&qr,w[5]=Wn^~wa&Cn,w[14]=os^~ss&ls,w[15]=oi^~us&Di,w[24]=hs^~ys&Sa,w[25]=ms^~si&gs,w[34]=Fi^~_s&Es,w[35]=Gn^~vs&Vi,w[44]=qa^~zi&li,w[45]=ws^~ui&Wi,w[6]=ba^~qr&Qt,w[7]=wa^~Cn&$t,w[16]=ss^~ls&Er,w[17]=us^~Di&hr,w[26]=ys^~Sa&cs,w[27]=si^~gs&ds,w[36]=_s^~Es&ki,w[37]=vs^~Vi&qi,w[46]=zi^~li&Hi,w[47]=ui^~Wi&Ta,w[8]=qr^~Qt&jt,w[9]=Cn^~$t&Ut,w[18]=ls^~Er&Zt,w[19]=Di^~hr&is,w[28]=Sa^~cs&fs,w[29]=gs^~ds&ps,w[38]=Es^~ki&Bi,w[39]=Vi^~qi&Ui,w[48]=li^~Hi&Pa,w[49]=Wi^~Ta&bs,w[0]^=gr[Y],w[1]^=gr[Y+1]};if(oe)b.exports=lr;else for(_r=0;_r<zr.length;++_r)J[zr[_r]]=lr[zr[_r]]})()})(c);var f=c.exports,p=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,m=Math.ceil,h=Math.floor,_="[BigNumber Error] ",T=_+"Number primitive has more than 15 significant digits: ",C=1e14,O=14,E=9007199254740991,R=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],v=1e7,I=1e9;function A(b){var N=0|b;return b>0||b===N?N:N-1}function y(b){for(var N,q,J=1,te=b.length,oe=b[0]+"";J<te;){for(N=b[J++]+"",q=O-N.length;q--;N="0"+N);oe+=N}for(te=oe.length;oe.charCodeAt(--te)===48;);return oe.slice(0,te+1||1)}function S(b,N){var q,J,te=b.c,oe=N.c,Ie=b.s,ze=N.s,st=b.e,ct=N.e;if(!Ie||!ze)return null;if(q=te&&!te[0],J=oe&&!oe[0],q||J)return q?J?0:-ze:Ie;if(Ie!=ze)return Ie;if(q=Ie<0,J=st==ct,!te||!oe)return J?0:!te^q?1:-1;if(!J)return st>ct^q?1:-1;for(ze=(st=te.length)<(ct=oe.length)?st:ct,Ie=0;Ie<ze;Ie++)if(te[Ie]!=oe[Ie])return te[Ie]>oe[Ie]^q?1:-1;return st==ct?0:st>ct^q?1:-1}function M(b,N,q,J){if(b<N||b>q||b!==h(b))throw Error(_+(J||"Argument")+(typeof b=="number"?b<N||b>q?" out of range: ":" not an integer: ":" not a primitive number: ")+String(b))}function U(b){var N=b.c.length-1;return A(b.e/O)==N&&b.c[N]%2!=0}function V(b,N){return(b.length>1?b.charAt(0)+"."+b.slice(1):b)+(N<0?"e":"e+")+N}function Q(b,N,q){var J,te;if(N<0){for(te=q+".";++N;te+=q);b=te+b}else if(++N>(J=b.length)){for(te=q,N-=J;--N;te+=q);b+=te}else N<J&&(b=b.slice(0,N)+"."+b.slice(N));return b}var ne=(function b(N){var q,J,te,oe,Ie,ze,st,ct,gr,Xt,Ke=Ve.prototype={constructor:Ve,toString:null,valueOf:null},Tr=new Ve(1),Jt=20,Ht=4,Nr=-7,In=21,xr=-1e7,Pr=1e7,Nn=!1,on=1,lr=0,zr={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},_r="0123456789abcdefghijklmnopqrstuvwxyz",Rn=!0;function Ve(W,w){var z,x,Y,re,ee,ie,he,ve,_e=this;if(!(_e instanceof Ve))return new Ve(W,w);if(w==null){if(W&&W._isBigNumber===!0)return _e.s=W.s,void(!W.c||W.e>Pr?_e.c=_e.e=null:W.e<xr?_e.c=[_e.e=0]:(_e.e=W.e,_e.c=W.c.slice()));if((ie=typeof W=="number")&&0*W==0){if(_e.s=1/W<0?(W=-W,-1):1,W===~~W){for(re=0,ee=W;ee>=10;ee/=10,re++);return void(re>Pr?_e.c=_e.e=null:(_e.e=re,_e.c=[W]))}ve=String(W)}else{if(!p.test(ve=String(W)))return te(_e,ve,ie);_e.s=ve.charCodeAt(0)==45?(ve=ve.slice(1),-1):1}(re=ve.indexOf("."))>-1&&(ve=ve.replace(".","")),(ee=ve.search(/e/i))>0?(re<0&&(re=ee),re+=+ve.slice(ee+1),ve=ve.substring(0,ee)):re<0&&(re=ve.length)}else{if(M(w,2,_r.length,"Base"),w==10&&Rn)return Bt(_e=new Ve(W),Jt+_e.e+1,Ht);if(ve=String(W),ie=typeof W=="number"){if(0*W!=0)return te(_e,ve,ie,w);if(_e.s=1/W<0?(ve=ve.slice(1),-1):1,Ve.DEBUG&&ve.replace(/^0\.0*|\./,"").length>15)throw Error(T+W)}else _e.s=ve.charCodeAt(0)===45?(ve=ve.slice(1),-1):1;for(z=_r.slice(0,w),re=ee=0,he=ve.length;ee<he;ee++)if(z.indexOf(x=ve.charAt(ee))<0){if(x=="."){if(ee>re){re=he;continue}}else if(!Y&&(ve==ve.toUpperCase()&&(ve=ve.toLowerCase())||ve==ve.toLowerCase()&&(ve=ve.toUpperCase()))){Y=!0,ee=-1,re=0;continue}return te(_e,String(W),ie,w)}ie=!1,(re=(ve=J(ve,w,10,_e.s)).indexOf("."))>-1?ve=ve.replace(".",""):re=ve.length}for(ee=0;ve.charCodeAt(ee)===48;ee++);for(he=ve.length;ve.charCodeAt(--he)===48;);if(ve=ve.slice(ee,++he)){if(he-=ee,ie&&Ve.DEBUG&&he>15&&(W>E||W!==h(W)))throw Error(T+_e.s*W);if((re=re-ee-1)>Pr)_e.c=_e.e=null;else if(re<xr)_e.c=[_e.e=0];else{if(_e.e=re,_e.c=[],ee=(re+1)%O,re<0&&(ee+=O),ee<he){for(ee&&_e.c.push(+ve.slice(0,ee)),he-=O;ee<he;)_e.c.push(+ve.slice(ee,ee+=O));ee=O-(ve=ve.slice(ee)).length}else ee-=he;for(;ee--;ve+="0");_e.c.push(+ve)}}else _e.c=[_e.e=0]}function yn(W,w,z,x){var Y,re,ee,ie,he;if(z==null?z=Ht:M(z,0,8),!W.c)return W.toString();if(Y=W.c[0],ee=W.e,w==null)he=y(W.c),he=x==1||x==2&&(ee<=Nr||ee>=In)?V(he,ee):Q(he,ee,"0");else if(re=(W=Bt(new Ve(W),w,z)).e,ie=(he=y(W.c)).length,x==1||x==2&&(w<=re||re<=Nr)){for(;ie<w;he+="0",ie++);he=V(he,re)}else if(w-=ee,he=Q(he,re,"0"),re+1>ie){if(--w>0)for(he+=".";w--;he+="0");}else if((w+=re-ie)>0)for(re+1==ie&&(he+=".");w--;he+="0");return W.s<0&&Y?"-"+he:he}function zn(W,w){for(var z,x=1,Y=new Ve(W[0]);x<W.length;x++){if(!(z=new Ve(W[x])).s){Y=z;break}w.call(Y,z)&&(Y=z)}return Y}function Ea(W,w,z){for(var x=1,Y=w.length;!w[--Y];w.pop());for(Y=w[0];Y>=10;Y/=10,x++);return(z=x+z*O-1)>Pr?W.c=W.e=null:z<xr?W.c=[W.e=0]:(W.e=z,W.c=w),W}function Bt(W,w,z,x){var Y,re,ee,ie,he,ve,_e,Ye=W.c,mt=R;if(Ye){e:{for(Y=1,ie=Ye[0];ie>=10;ie/=10,Y++);if((re=w-Y)<0)re+=O,ee=w,_e=(he=Ye[ve=0])/mt[Y-ee-1]%10|0;else if((ve=m((re+1)/O))>=Ye.length){if(!x)break e;for(;Ye.length<=ve;Ye.push(0));he=_e=0,Y=1,ee=(re%=O)-O+1}else{for(he=ie=Ye[ve],Y=1;ie>=10;ie/=10,Y++);_e=(ee=(re%=O)-O+Y)<0?0:he/mt[Y-ee-1]%10|0}if(x=x||w<0||Ye[ve+1]!=null||(ee<0?he:he%mt[Y-ee-1]),x=z<4?(_e||x)&&(z==0||z==(W.s<0?3:2)):_e>5||_e==5&&(z==4||x||z==6&&(re>0?ee>0?he/mt[Y-ee]:0:Ye[ve-1])%10&1||z==(W.s<0?8:7)),w<1||!Ye[0])return Ye.length=0,x?(w-=W.e+1,Ye[0]=mt[(O-w%O)%O],W.e=-w||0):Ye[0]=W.e=0,W;if(re==0?(Ye.length=ve,ie=1,ve--):(Ye.length=ve+1,ie=mt[O-re],Ye[ve]=ee>0?h(he/mt[Y-ee]%mt[ee])*ie:0),x)for(;;){if(ve==0){for(re=1,ee=Ye[0];ee>=10;ee/=10,re++);for(ee=Ye[0]+=ie,ie=1;ee>=10;ee/=10,ie++);re!=ie&&(W.e++,Ye[0]==C&&(Ye[0]=1));break}if(Ye[ve]+=ie,Ye[ve]!=C)break;Ye[ve--]=0,ie=1}for(re=Ye.length;Ye[--re]===0;Ye.pop());}W.e>Pr?W.c=W.e=null:W.e<xr&&(W.c=[W.e=0])}return W}function pr(W){var w,z=W.e;return z===null?W.toString():(w=y(W.c),w=z<=Nr||z>=In?V(w,z):Q(w,z,"0"),W.s<0?"-"+w:w)}return Ve.clone=b,Ve.ROUND_UP=0,Ve.ROUND_DOWN=1,Ve.ROUND_CEIL=2,Ve.ROUND_FLOOR=3,Ve.ROUND_HALF_UP=4,Ve.ROUND_HALF_DOWN=5,Ve.ROUND_HALF_EVEN=6,Ve.ROUND_HALF_CEIL=7,Ve.ROUND_HALF_FLOOR=8,Ve.EUCLID=9,Ve.config=Ve.set=function(W){var w,z;if(W!=null){if(typeof W!="object")throw Error(_+"Object expected: "+W);if(W.hasOwnProperty(w="DECIMAL_PLACES")&&(M(z=W[w],0,I,w),Jt=z),W.hasOwnProperty(w="ROUNDING_MODE")&&(M(z=W[w],0,8,w),Ht=z),W.hasOwnProperty(w="EXPONENTIAL_AT")&&((z=W[w])&&z.pop?(M(z[0],-I,0,w),M(z[1],0,I,w),Nr=z[0],In=z[1]):(M(z,-I,I,w),Nr=-(In=z<0?-z:z))),W.hasOwnProperty(w="RANGE"))if((z=W[w])&&z.pop)M(z[0],-I,-1,w),M(z[1],1,I,w),xr=z[0],Pr=z[1];else{if(M(z,-I,I,w),!z)throw Error(_+w+" cannot be zero: "+z);xr=-(Pr=z<0?-z:z)}if(W.hasOwnProperty(w="CRYPTO")){if((z=W[w])!==!!z)throw Error(_+w+" not true or false: "+z);if(z){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Nn=!z,Error(_+"crypto unavailable");Nn=z}else Nn=z}if(W.hasOwnProperty(w="MODULO_MODE")&&(M(z=W[w],0,9,w),on=z),W.hasOwnProperty(w="POW_PRECISION")&&(M(z=W[w],0,I,w),lr=z),W.hasOwnProperty(w="FORMAT")){if(typeof(z=W[w])!="object")throw Error(_+w+" not an object: "+z);zr=z}if(W.hasOwnProperty(w="ALPHABET")){if(typeof(z=W[w])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(z))throw Error(_+w+" invalid: "+z);Rn=z.slice(0,10)=="0123456789",_r=z}}return{DECIMAL_PLACES:Jt,ROUNDING_MODE:Ht,EXPONENTIAL_AT:[Nr,In],RANGE:[xr,Pr],CRYPTO:Nn,MODULO_MODE:on,POW_PRECISION:lr,FORMAT:zr,ALPHABET:_r}},Ve.isBigNumber=function(W){if(!W||W._isBigNumber!==!0)return!1;if(!Ve.DEBUG)return!0;var w,z,x=W.c,Y=W.e,re=W.s;e:if({}.toString.call(x)=="[object Array]"){if((re===1||re===-1)&&Y>=-I&&Y<=I&&Y===h(Y)){if(x[0]===0){if(Y===0&&x.length===1)return!0;break e}if((w=(Y+1)%O)<1&&(w+=O),String(x[0]).length==w){for(w=0;w<x.length;w++)if((z=x[w])<0||z>=C||z!==h(z))break e;if(z!==0)return!0}}}else if(x===null&&Y===null&&(re===null||re===1||re===-1))return!0;throw Error(_+"Invalid BigNumber: "+W)},Ve.maximum=Ve.max=function(){return zn(arguments,Ke.lt)},Ve.minimum=Ve.min=function(){return zn(arguments,Ke.gt)},Ve.random=(oe=9007199254740992,Ie=Math.random()*oe&2097151?function(){return h(Math.random()*oe)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(W){var w,z,x,Y,re,ee=0,ie=[],he=new Ve(Tr);if(W==null?W=Jt:M(W,0,I),Y=m(W/O),Nn)if(crypto.getRandomValues){for(w=crypto.getRandomValues(new Uint32Array(Y*=2));ee<Y;)(re=131072*w[ee]+(w[ee+1]>>>11))>=9e15?(z=crypto.getRandomValues(new Uint32Array(2)),w[ee]=z[0],w[ee+1]=z[1]):(ie.push(re%1e14),ee+=2);ee=Y/2}else{if(!crypto.randomBytes)throw Nn=!1,Error(_+"crypto unavailable");for(w=crypto.randomBytes(Y*=7);ee<Y;)(re=281474976710656*(31&w[ee])+1099511627776*w[ee+1]+4294967296*w[ee+2]+16777216*w[ee+3]+(w[ee+4]<<16)+(w[ee+5]<<8)+w[ee+6])>=9e15?crypto.randomBytes(7).copy(w,ee):(ie.push(re%1e14),ee+=7);ee=Y/7}if(!Nn)for(;ee<Y;)(re=Ie())<9e15&&(ie[ee++]=re%1e14);for(Y=ie[--ee],W%=O,Y&&W&&(re=R[O-W],ie[ee]=h(Y/re)*re);ie[ee]===0;ie.pop(),ee--);if(ee<0)ie=[x=0];else{for(x=-1;ie[0]===0;ie.splice(0,1),x-=O);for(ee=1,re=ie[0];re>=10;re/=10,ee++);ee<O&&(x-=O-ee)}return he.e=x,he.c=ie,he}),Ve.sum=function(){for(var W=1,w=arguments,z=new Ve(w[0]);W<w.length;)z=z.plus(w[W++]);return z},J=(function(){var W="0123456789";function w(z,x,Y,re){for(var ee,ie,he=[0],ve=0,_e=z.length;ve<_e;){for(ie=he.length;ie--;he[ie]*=x);for(he[0]+=re.indexOf(z.charAt(ve++)),ee=0;ee<he.length;ee++)he[ee]>Y-1&&(he[ee+1]==null&&(he[ee+1]=0),he[ee+1]+=he[ee]/Y|0,he[ee]%=Y)}return he.reverse()}return function(z,x,Y,re,ee){var ie,he,ve,_e,Ye,mt,gt,Nt,Qt=z.indexOf("."),$t=Jt,jt=Ht;for(Qt>=0&&(_e=lr,lr=0,z=z.replace(".",""),mt=(Nt=new Ve(x)).pow(z.length-Qt),lr=_e,Nt.c=w(Q(y(mt.c),mt.e,"0"),10,Y,W),Nt.e=Nt.c.length),ve=_e=(gt=w(z,x,Y,ee?(ie=_r,W):(ie=W,_r))).length;gt[--_e]==0;gt.pop());if(!gt[0])return ie.charAt(0);if(Qt<0?--ve:(mt.c=gt,mt.e=ve,mt.s=re,gt=(mt=q(mt,Nt,$t,jt,Y)).c,Ye=mt.r,ve=mt.e),Qt=gt[he=ve+$t+1],_e=Y/2,Ye=Ye||he<0||gt[he+1]!=null,Ye=jt<4?(Qt!=null||Ye)&&(jt==0||jt==(mt.s<0?3:2)):Qt>_e||Qt==_e&&(jt==4||Ye||jt==6&&1&gt[he-1]||jt==(mt.s<0?8:7)),he<1||!gt[0])z=Ye?Q(ie.charAt(1),-$t,ie.charAt(0)):ie.charAt(0);else{if(gt.length=he,Ye)for(--Y;++gt[--he]>Y;)gt[he]=0,he||(++ve,gt=[1].concat(gt));for(_e=gt.length;!gt[--_e];);for(Qt=0,z="";Qt<=_e;z+=ie.charAt(gt[Qt++]));z=Q(z,ve,ie.charAt(0))}return z}})(),q=(function(){function W(x,Y,re){var ee,ie,he,ve,_e=0,Ye=x.length,mt=Y%v,gt=Y/v|0;for(x=x.slice();Ye--;)_e=((ie=mt*(he=x[Ye]%v)+(ee=gt*he+(ve=x[Ye]/v|0)*mt)%v*v+_e)/re|0)+(ee/v|0)+gt*ve,x[Ye]=ie%re;return _e&&(x=[_e].concat(x)),x}function w(x,Y,re,ee){var ie,he;if(re!=ee)he=re>ee?1:-1;else for(ie=he=0;ie<re;ie++)if(x[ie]!=Y[ie]){he=x[ie]>Y[ie]?1:-1;break}return he}function z(x,Y,re,ee){for(var ie=0;re--;)x[re]-=ie,ie=x[re]<Y[re]?1:0,x[re]=ie*ee+x[re]-Y[re];for(;!x[0]&&x.length>1;x.splice(0,1));}return function(x,Y,re,ee,ie){var he,ve,_e,Ye,mt,gt,Nt,Qt,$t,jt,Ut,nr,Wn,ba,wa,qr,Cn,Er=x.s==Y.s?1:-1,hr=x.c,Zt=Y.c;if(!(hr&&hr[0]&&Zt&&Zt[0]))return new Ve(x.s&&Y.s&&(hr?!Zt||hr[0]!=Zt[0]:Zt)?hr&&hr[0]==0||!Zt?0*Er:Er/0:NaN);for($t=(Qt=new Ve(Er)).c=[],Er=re+(ve=x.e-Y.e)+1,ie||(ie=C,ve=A(x.e/O)-A(Y.e/O),Er=Er/O|0),_e=0;Zt[_e]==(hr[_e]||0);_e++);if(Zt[_e]>(hr[_e]||0)&&ve--,Er<0)$t.push(1),Ye=!0;else{for(ba=hr.length,qr=Zt.length,_e=0,Er+=2,(mt=h(ie/(Zt[0]+1)))>1&&(Zt=W(Zt,mt,ie),hr=W(hr,mt,ie),qr=Zt.length,ba=hr.length),Wn=qr,Ut=(jt=hr.slice(0,qr)).length;Ut<qr;jt[Ut++]=0);Cn=Zt.slice(),Cn=[0].concat(Cn),wa=Zt[0],Zt[1]>=ie/2&&wa++;do{if(mt=0,(he=w(Zt,jt,qr,Ut))<0){if(nr=jt[0],qr!=Ut&&(nr=nr*ie+(jt[1]||0)),(mt=h(nr/wa))>1)for(mt>=ie&&(mt=ie-1),Nt=(gt=W(Zt,mt,ie)).length,Ut=jt.length;w(gt,jt,Nt,Ut)==1;)mt--,z(gt,qr<Nt?Cn:Zt,Nt,ie),Nt=gt.length,he=1;else mt==0&&(he=mt=1),Nt=(gt=Zt.slice()).length;if(Nt<Ut&&(gt=[0].concat(gt)),z(jt,gt,Ut,ie),Ut=jt.length,he==-1)for(;w(Zt,jt,qr,Ut)<1;)mt++,z(jt,qr<Ut?Cn:Zt,Ut,ie),Ut=jt.length}else he===0&&(mt++,jt=[0]);$t[_e++]=mt,jt[0]?jt[Ut++]=hr[Wn]||0:(jt=[hr[Wn]],Ut=1)}while((Wn++<ba||jt[0]!=null)&&Er--);Ye=jt[0]!=null,$t[0]||$t.splice(0,1)}if(ie==C){for(_e=1,Er=$t[0];Er>=10;Er/=10,_e++);Bt(Qt,re+(Qt.e=_e+ve*O-1)+1,ee,Ye)}else Qt.e=ve,Qt.r=+Ye;return Qt}})(),ze=/^(-?)0([xbo])(?=\w[\w.]*$)/i,st=/^([^.]+)\.$/,ct=/^\.([^.]+)$/,gr=/^-?(Infinity|NaN)$/,Xt=/^\s*\+(?=[\w.])|^\s+|\s+$/g,te=function(W,w,z,x){var Y,re=z?w:w.replace(Xt,"");if(gr.test(re))W.s=isNaN(re)?null:re<0?-1:1;else{if(!z&&(re=re.replace(ze,(function(ee,ie,he){return Y=(he=he.toLowerCase())=="x"?16:he=="b"?2:8,x&&x!=Y?ee:ie})),x&&(Y=x,re=re.replace(st,"$1").replace(ct,"0.$1")),w!=re))return new Ve(re,Y);if(Ve.DEBUG)throw Error(_+"Not a"+(x?" base "+x:"")+" number: "+w);W.s=null}W.c=W.e=null},Ke.absoluteValue=Ke.abs=function(){var W=new Ve(this);return W.s<0&&(W.s=1),W},Ke.comparedTo=function(W,w){return S(this,new Ve(W,w))},Ke.decimalPlaces=Ke.dp=function(W,w){var z,x,Y,re=this;if(W!=null)return M(W,0,I),w==null?w=Ht:M(w,0,8),Bt(new Ve(re),W+re.e+1,w);if(!(z=re.c))return null;if(x=((Y=z.length-1)-A(this.e/O))*O,Y=z[Y])for(;Y%10==0;Y/=10,x--);return x<0&&(x=0),x},Ke.dividedBy=Ke.div=function(W,w){return q(this,new Ve(W,w),Jt,Ht)},Ke.dividedToIntegerBy=Ke.idiv=function(W,w){return q(this,new Ve(W,w),0,1)},Ke.exponentiatedBy=Ke.pow=function(W,w){var z,x,Y,re,ee,ie,he,ve,_e=this;if((W=new Ve(W)).c&&!W.isInteger())throw Error(_+"Exponent not an integer: "+pr(W));if(w!=null&&(w=new Ve(w)),ee=W.e>14,!_e.c||!_e.c[0]||_e.c[0]==1&&!_e.e&&_e.c.length==1||!W.c||!W.c[0])return ve=new Ve(Math.pow(+pr(_e),ee?W.s*(2-U(W)):+pr(W))),w?ve.mod(w):ve;if(ie=W.s<0,w){if(w.c?!w.c[0]:!w.s)return new Ve(NaN);(x=!ie&&_e.isInteger()&&w.isInteger())&&(_e=_e.mod(w))}else{if(W.e>9&&(_e.e>0||_e.e<-1||(_e.e==0?_e.c[0]>1||ee&&_e.c[1]>=24e7:_e.c[0]<8e13||ee&&_e.c[0]<=9999975e7)))return re=_e.s<0&&U(W)?-0:0,_e.e>-1&&(re=1/re),new Ve(ie?1/re:re);lr&&(re=m(lr/O+2))}for(ee?(z=new Ve(.5),ie&&(W.s=1),he=U(W)):he=(Y=Math.abs(+pr(W)))%2,ve=new Ve(Tr);;){if(he){if(!(ve=ve.times(_e)).c)break;re?ve.c.length>re&&(ve.c.length=re):x&&(ve=ve.mod(w))}if(Y){if((Y=h(Y/2))===0)break;he=Y%2}else if(Bt(W=W.times(z),W.e+1,1),W.e>14)he=U(W);else{if((Y=+pr(W))==0)break;he=Y%2}_e=_e.times(_e),re?_e.c&&_e.c.length>re&&(_e.c.length=re):x&&(_e=_e.mod(w))}return x?ve:(ie&&(ve=Tr.div(ve)),w?ve.mod(w):re?Bt(ve,lr,Ht,void 0):ve)},Ke.integerValue=function(W){var w=new Ve(this);return W==null?W=Ht:M(W,0,8),Bt(w,w.e+1,W)},Ke.isEqualTo=Ke.eq=function(W,w){return S(this,new Ve(W,w))===0},Ke.isFinite=function(){return!!this.c},Ke.isGreaterThan=Ke.gt=function(W,w){return S(this,new Ve(W,w))>0},Ke.isGreaterThanOrEqualTo=Ke.gte=function(W,w){return(w=S(this,new Ve(W,w)))===1||w===0},Ke.isInteger=function(){return!!this.c&&A(this.e/O)>this.c.length-2},Ke.isLessThan=Ke.lt=function(W,w){return S(this,new Ve(W,w))<0},Ke.isLessThanOrEqualTo=Ke.lte=function(W,w){return(w=S(this,new Ve(W,w)))===-1||w===0},Ke.isNaN=function(){return!this.s},Ke.isNegative=function(){return this.s<0},Ke.isPositive=function(){return this.s>0},Ke.isZero=function(){return!!this.c&&this.c[0]==0},Ke.minus=function(W,w){var z,x,Y,re,ee=this,ie=ee.s;if(w=(W=new Ve(W,w)).s,!ie||!w)return new Ve(NaN);if(ie!=w)return W.s=-w,ee.plus(W);var he=ee.e/O,ve=W.e/O,_e=ee.c,Ye=W.c;if(!he||!ve){if(!_e||!Ye)return _e?(W.s=-w,W):new Ve(Ye?ee:NaN);if(!_e[0]||!Ye[0])return Ye[0]?(W.s=-w,W):new Ve(_e[0]?ee:Ht==3?-0:0)}if(he=A(he),ve=A(ve),_e=_e.slice(),ie=he-ve){for((re=ie<0)?(ie=-ie,Y=_e):(ve=he,Y=Ye),Y.reverse(),w=ie;w--;Y.push(0));Y.reverse()}else for(x=(re=(ie=_e.length)<(w=Ye.length))?ie:w,ie=w=0;w<x;w++)if(_e[w]!=Ye[w]){re=_e[w]<Ye[w];break}if(re&&(Y=_e,_e=Ye,Ye=Y,W.s=-W.s),(w=(x=Ye.length)-(z=_e.length))>0)for(;w--;_e[z++]=0);for(w=C-1;x>ie;){if(_e[--x]<Ye[x]){for(z=x;z&&!_e[--z];_e[z]=w);--_e[z],_e[x]+=C}_e[x]-=Ye[x]}for(;_e[0]==0;_e.splice(0,1),--ve);return _e[0]?Ea(W,_e,ve):(W.s=Ht==3?-1:1,W.c=[W.e=0],W)},Ke.modulo=Ke.mod=function(W,w){var z,x,Y=this;return W=new Ve(W,w),!Y.c||!W.s||W.c&&!W.c[0]?new Ve(NaN):!W.c||Y.c&&!Y.c[0]?new Ve(Y):(on==9?(x=W.s,W.s=1,z=q(Y,W,0,3),W.s=x,z.s*=x):z=q(Y,W,0,on),(W=Y.minus(z.times(W))).c[0]||on!=1||(W.s=Y.s),W)},Ke.multipliedBy=Ke.times=function(W,w){var z,x,Y,re,ee,ie,he,ve,_e,Ye,mt,gt,Nt,Qt,$t,jt=this,Ut=jt.c,nr=(W=new Ve(W,w)).c;if(!(Ut&&nr&&Ut[0]&&nr[0]))return!jt.s||!W.s||Ut&&!Ut[0]&&!nr||nr&&!nr[0]&&!Ut?W.c=W.e=W.s=null:(W.s*=jt.s,Ut&&nr?(W.c=[0],W.e=0):W.c=W.e=null),W;for(x=A(jt.e/O)+A(W.e/O),W.s*=jt.s,(he=Ut.length)<(Ye=nr.length)&&(Nt=Ut,Ut=nr,nr=Nt,Y=he,he=Ye,Ye=Y),Y=he+Ye,Nt=[];Y--;Nt.push(0));for(Qt=C,$t=v,Y=Ye;--Y>=0;){for(z=0,mt=nr[Y]%$t,gt=nr[Y]/$t|0,re=Y+(ee=he);re>Y;)z=((ve=mt*(ve=Ut[--ee]%$t)+(ie=gt*ve+(_e=Ut[ee]/$t|0)*mt)%$t*$t+Nt[re]+z)/Qt|0)+(ie/$t|0)+gt*_e,Nt[re--]=ve%Qt;Nt[re]=z}return z?++x:Nt.splice(0,1),Ea(W,Nt,x)},Ke.negated=function(){var W=new Ve(this);return W.s=-W.s||null,W},Ke.plus=function(W,w){var z,x=this,Y=x.s;if(w=(W=new Ve(W,w)).s,!Y||!w)return new Ve(NaN);if(Y!=w)return W.s=-w,x.minus(W);var re=x.e/O,ee=W.e/O,ie=x.c,he=W.c;if(!re||!ee){if(!ie||!he)return new Ve(Y/0);if(!ie[0]||!he[0])return he[0]?W:new Ve(ie[0]?x:0*Y)}if(re=A(re),ee=A(ee),ie=ie.slice(),Y=re-ee){for(Y>0?(ee=re,z=he):(Y=-Y,z=ie),z.reverse();Y--;z.push(0));z.reverse()}for((Y=ie.length)-(w=he.length)<0&&(z=he,he=ie,ie=z,w=Y),Y=0;w;)Y=(ie[--w]=ie[w]+he[w]+Y)/C|0,ie[w]=C===ie[w]?0:ie[w]%C;return Y&&(ie=[Y].concat(ie),++ee),Ea(W,ie,ee)},Ke.precision=Ke.sd=function(W,w){var z,x,Y,re=this;if(W!=null&&W!==!!W)return M(W,1,I),w==null?w=Ht:M(w,0,8),Bt(new Ve(re),W,w);if(!(z=re.c))return null;if(x=(Y=z.length-1)*O+1,Y=z[Y]){for(;Y%10==0;Y/=10,x--);for(Y=z[0];Y>=10;Y/=10,x++);}return W&&re.e+1>x&&(x=re.e+1),x},Ke.shiftedBy=function(W){return M(W,-9007199254740991,E),this.times("1e"+W)},Ke.squareRoot=Ke.sqrt=function(){var W,w,z,x,Y,re=this,ee=re.c,ie=re.s,he=re.e,ve=Jt+4,_e=new Ve("0.5");if(ie!==1||!ee||!ee[0])return new Ve(!ie||ie<0&&(!ee||ee[0])?NaN:ee?re:1/0);if((ie=Math.sqrt(+pr(re)))==0||ie==1/0?(((w=y(ee)).length+he)%2==0&&(w+="0"),ie=Math.sqrt(+w),he=A((he+1)/2)-(he<0||he%2),z=new Ve(w=ie==1/0?"5e"+he:(w=ie.toExponential()).slice(0,w.indexOf("e")+1)+he)):z=new Ve(ie+""),z.c[0]){for((ie=(he=z.e)+ve)<3&&(ie=0);;)if(Y=z,z=_e.times(Y.plus(q(re,Y,ve,1))),y(Y.c).slice(0,ie)===(w=y(z.c)).slice(0,ie)){if(z.e<he&&--ie,(w=w.slice(ie-3,ie+1))!="9999"&&(x||w!="4999")){+w&&(+w.slice(1)||w.charAt(0)!="5")||(Bt(z,z.e+Jt+2,1),W=!z.times(z).eq(re));break}if(!x&&(Bt(Y,Y.e+Jt+2,0),Y.times(Y).eq(re))){z=Y;break}ve+=4,ie+=4,x=1}}return Bt(z,z.e+Jt+1,Ht,W)},Ke.toExponential=function(W,w){return W!=null&&(M(W,0,I),W++),yn(this,W,w,1)},Ke.toFixed=function(W,w){return W!=null&&(M(W,0,I),W=W+this.e+1),yn(this,W,w)},Ke.toFormat=function(W,w,z){var x,Y=this;if(z==null)W!=null&&w&&typeof w=="object"?(z=w,w=null):W&&typeof W=="object"?(z=W,W=w=null):z=zr;else if(typeof z!="object")throw Error(_+"Argument not an object: "+z);if(x=Y.toFixed(W,w),Y.c){var re,ee=x.split("."),ie=+z.groupSize,he=+z.secondaryGroupSize,ve=z.groupSeparator||"",_e=ee[0],Ye=ee[1],mt=Y.s<0,gt=mt?_e.slice(1):_e,Nt=gt.length;if(he&&(re=ie,ie=he,he=re,Nt-=re),ie>0&&Nt>0){for(re=Nt%ie||ie,_e=gt.substr(0,re);re<Nt;re+=ie)_e+=ve+gt.substr(re,ie);he>0&&(_e+=ve+gt.slice(re)),mt&&(_e="-"+_e)}x=Ye?_e+(z.decimalSeparator||"")+((he=+z.fractionGroupSize)?Ye.replace(new RegExp("\\d{"+he+"}\\B","g"),"$&"+(z.fractionGroupSeparator||"")):Ye):_e}return(z.prefix||"")+x+(z.suffix||"")},Ke.toFraction=function(W){var w,z,x,Y,re,ee,ie,he,ve,_e,Ye,mt,gt=this,Nt=gt.c;if(W!=null&&(!(ie=new Ve(W)).isInteger()&&(ie.c||ie.s!==1)||ie.lt(Tr)))throw Error(_+"Argument "+(ie.isInteger()?"out of range: ":"not an integer: ")+pr(ie));if(!Nt)return new Ve(gt);for(w=new Ve(Tr),ve=z=new Ve(Tr),x=he=new Ve(Tr),mt=y(Nt),re=w.e=mt.length-gt.e-1,w.c[0]=R[(ee=re%O)<0?O+ee:ee],W=!W||ie.comparedTo(w)>0?re>0?w:ve:ie,ee=Pr,Pr=1/0,ie=new Ve(mt),he.c[0]=0;_e=q(ie,w,0,1),(Y=z.plus(_e.times(x))).comparedTo(W)!=1;)z=x,x=Y,ve=he.plus(_e.times(Y=ve)),he=Y,w=ie.minus(_e.times(Y=w)),ie=Y;return Y=q(W.minus(z),x,0,1),he=he.plus(Y.times(ve)),z=z.plus(Y.times(x)),he.s=ve.s=gt.s,Ye=q(ve,x,re*=2,Ht).minus(gt).abs().comparedTo(q(he,z,re,Ht).minus(gt).abs())<1?[ve,x]:[he,z],Pr=ee,Ye},Ke.toNumber=function(){return+pr(this)},Ke.toPrecision=function(W,w){return W!=null&&M(W,1,I),yn(this,W,w,2)},Ke.toString=function(W){var w,z=this,x=z.s,Y=z.e;return Y===null?x?(w="Infinity",x<0&&(w="-"+w)):w="NaN":(W==null?w=Y<=Nr||Y>=In?V(y(z.c),Y):Q(y(z.c),Y,"0"):W===10&&Rn?w=Q(y((z=Bt(new Ve(z),Jt+Y+1,Ht)).c),z.e,"0"):(M(W,2,_r.length,"Base"),w=J(Q(y(z.c),Y,"0"),10,W,x,!0)),x<0&&z.c[0]&&(w="-"+w)),w},Ke.valueOf=Ke.toJSON=function(){return pr(this)},Ke._isBigNumber=!0,Ke[Symbol.toStringTag]="BigNumber",Ke[Symbol.for("nodejs.util.inspect.custom")]=Ke.valueOf,N!=null&&Ve.set(N),Ve})();const me={ROUNDING_MODE:ne.ROUND_DOWN};function be(b){return new TextEncoder().encode(b)}function Ne(b){return typeof b=="string"?Ne(ye(b)):new TextDecoder().decode(b)}ne.config(me);const Ae="UNKNOWN_ERROR",Re="INVALID_ARGUMENT";function Me(b,N=Ae,q={}){const J=[];Object.keys(q).forEach((Ie=>{try{J.push(Ie+"="+JSON.stringify(q[Ie]))}catch{J.push(Ie+"="+JSON.stringify(q[Ie].toString()))}}));const te=b;J.length&&(b+=" ("+J.join(", ")+")");const oe=new Error(b);return oe.reason=te,oe.code=N,Object.keys(q).forEach((function(Ie){oe[Ie]=q[Ie]})),oe}function ye(b){if(typeof b!="string")throw new Error("hexToBytes only accept strings, got: "+typeof b);if(b.substr(0,2)==="0x")return ye(b.substr(2));const N=new Uint8Array(Math.ceil(b.length/2));let q=0;for(let J=0;J<b.length;J+=2){const te=parseInt(b.substr(J,2),16);if(isNaN(te))throw new Error("Cannot read hex string:"+JSON.stringify(b));N[q]=te,q++}return N}function le(b){return Array.from(b).map((N=>N.toString(16).padStart(2,"0"))).join("")}function X(b,N){if(typeof b=="string"){if(N&&N.encoding==="hex"&&typeof b=="string"){let q=b;q.length>2&&q.substr(0,2)==="0x"&&(q=q.substr(2));const J=ye(q);return f.keccak256(J)}return f.keccak256(be(b))}return f.keccak256(b)}const j={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 F(b,N,q){return new Array(N-b.length+1).join(q||"0")+b}function B(b){let N="",q=0;const J=b.length;for(b.substring(0,2)==="0x"&&(q=2);q<J;q+=2){const te=parseInt(b.substr(q,2),16);N+=String.fromCharCode(te)}return N}function L(b){return rn(b)&&b.name&&b.name.indexOf("(")!==-1?b.name:b.name+"("+ue(!1,b.inputs||[]).join(",")+")"}function K(...b){const N=b.reduce(((te,oe)=>te+oe.length),0),q=new Uint8Array(N);let J=0;for(const te of b)q.set(te,J),J+=te.length;return q}function ue(b,N){const q=[];return N.forEach((function(J){if(typeof J.components=="object"){if(J.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let te="";const oe=J.type.indexOf("[");oe>=0&&(te=J.type.substring(oe));const Ie=ue(b,J.components);q.push("("+Ie.join(",")+")"+te)}else q.push(J.type)})),q}function Oe(b){const N=b.indexOf("("),q=b.indexOf(")");return N!==-1&&q!==-1?b.substr(0,N):b}function Te(b){const N=b.indexOf("("),q=b.indexOf(")");return N!==-1&&q!==-1?b.substr(N+1,q-N-1).replace(" ",""):""}function Be(b){return b==null?b:Dt(b).toNumber()}function je(b){return Dt(b).toNumber()}function ce(b){return Lr(b)?b.toString(10):""+b}function fe(b){return typeof b=="string"&&!b.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(b)?"0x"+b:Le(b)}function Pe(b){if(typeof b=="string")return b.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(b)?Le(b):"0x"+le(be(b));if(b instanceof Uint8Array)return"0x"+le(b);throw new Error(`toStringData: Error trying to convert ${b} (${typeof b}) to a hex string.`)}function De(b){return typeof b=="boolean"?b:Dt(b).toNumber()!==0}function Ge(b){const N=Dt(b),q=N.toString(16);return N.isLessThan(0)?"-0x"+q.substr(1):"0x"+q}function Le(b){if(Tn(b))return Ge(+b);if(Lr(b))return Ge(b);if(Sn(b)){const N=b;if(N.indexOf("-0x")===0)return Ge(N);if(N.indexOf("0x")===0)return N;if(!isFinite(N))return le(be(N))}if(b instanceof Uint8Array)return"0x"+le(b);if(nn(b)||rn(b))throw new Error("toHex can only be called with scalar values, not objects or arrays");return Ge(b)}function Rt(b){const N=b?b.toLowerCase():"ether",q=j[N];if(q===void 0)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(j,null,2));return new ne(q,10)}function Dt(b){let N=b||0;return Lr(N)?N:(typeof N=="string"&&(N=N.trim()),typeof N!="string"||N.indexOf("0x")!==0&&N.indexOf("-0x")!==0?N instanceof Uint8Array?new ne(le(N),16):new ne(N,10):new ne(N.replace("0x","").toLowerCase(),16))}function Gt(b){return new ne(new Array(b).fill("1").join(""),2)}function It(b,N=256){const q=Dt(b).integerValue();return q.isLessThan(0)?Gt(N).plus(q).plus(1):q}function Fe(b,N){return F(b.toString(2),N,"0")[0]==="1"}function pt(b){if(typeof b!="string")throw Me("invalid address",Re,{arg:"address",value:b});if(b.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return b.trim().substring(0,2)!=="0x"&&(b="0x"+b),jr(b);throw Me("invalid address",Re,{arg:"address",value:b})}function Qe(b,N=256){if(Fe(b,N)){const q=Gt(N);return b.minus(q).minus(1)}return b}function qt(b){return/^0x[0-9a-f]{40}$/i.test(b)}function Kt(b){return!!/^(0x)?[0-9a-f]{40}$/i.test(b)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(b)&&!/^(0x)?[0-9A-F]{40}$/.test(b))||tr(b))}function tr(b){const N=b.replace("0x",""),q=X(N.toLowerCase());for(let J=0;J<40;J++)if(parseInt(q[J],16)>7&&N[J].toUpperCase()!==N[J]||parseInt(q[J],16)<=7&&N[J].toLowerCase()!==N[J])return!1;return!0}function jr(b){if(b===void 0)return"";const N=b.toLowerCase().replace("0x",""),q=X(N);let J="0x";for(let te=0;te<N.length;te++)parseInt(q[te],16)>7?J+=N[te].toUpperCase():J+=N[te];return J}function fr(b){if(!Array.isArray(b))throw new Error(`Value was not an array: ${JSON.stringify(b)}`);return b}function mn(b){return qt(b)?b:/^[0-9a-f]{40}$/.test(b)?"0x"+b:"0x"+F(Le(b).substr(2),40)}function Lr(b){return b instanceof ne}function Sn(b){return typeof b=="string"||b&&b.constructor&&b.constructor.name==="String"}function rn(b){return b!==null&&!Array.isArray(b)&&typeof b=="object"}function Tn(b){return typeof b=="boolean"}function nn(b){return Array.isArray(b)}var ni,Pn;function ja(b,N){if(!b)throw new Error("jsonrpc method should be specified!");if(typeof b!="string")throw new Error(`jsonrpc must be a string, got ${typeof b}!`);return t.messageId++,{jsonrpc:"2.0",id:t.messageId,method:b,params:N||[]}}function La(b){return Array.isArray(b)?b.every(N):N(b);function N(q){return!!q&&(q.error===void 0||q.error===null)&&q.jsonrpc==="2.0"&&q.id!==null&&"result"in q&&q.result!==void 0}}t.TransactionStatus=void 0,(ni=t.TransactionStatus||(t.TransactionStatus={})).pending="pending",ni.confirmed="confirmed",ni.failed="failed",t.TransactionType=void 0,(Pn=t.TransactionType||(t.TransactionType={})).queued="queued",Pn.dropped="dropped",Pn.replaced="replaced",Pn.pending="pending",Pn.reverted="reverted",Pn.confirmed="confirmed",t.messageId=0;function _a(b){return Dt(b)}function Da(b){return b==="latest"||b==="pending"||b==="earliest"}function Dr(b){return b===void 0?"latest":Ct(b)}function Ct(b){return b==null?null:Da(b)?b:Le(b)}function Qr(b){return b.from&&(b.from=Ce(b.from)),b.to&&(b.to=Ce(b.to)),b.gasPrice!==void 0&&(b.gasPrice=Ge(b.gasPrice)),b.gas!==void 0&&(b.gas=Ge(b.gas)),b.value!==void 0&&(b.value=Ge(b.value)),b.nonce!==void 0&&(b.nonce=Ge(b.nonce)),b.data&&!b.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(b.data)&&(b.data="0x"+b.data),b}function an(b){if(typeof b!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(b));if(b.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(b));if(b.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(b));return b}function ae(b){if(typeof b!="object")throw new Error("Did not provide transaction options");if(!b.from)throw new Error('Missing "from" in transaction options');return b.from=Ce(b.from),b.to&&(b.to=Ce(b.to)),b.gasPrice!==void 0&&(b.gasPrice=Ge(b.gasPrice)),b.gas!==void 0&&(b.gas=Ge(b.gas)),b.value!==void 0&&(b.value=Ge(b.value)),b.nonce!==void 0&&(b.nonce=Ge(b.nonce)),b.data&&!b.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(b.data)&&(b.data="0x"+b.data),b}function H(b){return b?(b.blockNumber!==null&&(b.blockNumber=je(b.blockNumber)),b.transactionIndex!==null&&(b.transactionIndex=je(b.transactionIndex)),b.nonce=je(b.nonce),b.gas=je(b.gas),b.gasPrice=Dt(b.gasPrice),b.value=Dt(b.value),b):null}function $(b){return b?(b.blockNumber!==null&&(b.blockNumber=je(b.blockNumber)),b.transactionIndex!==null&&(b.transactionIndex=je(b.transactionIndex)),b.cumulativeGasUsed=je(b.cumulativeGasUsed),b.gasUsed=je(b.gasUsed),b.logs&&nn(b.logs)&&(b.logs=b.logs.map((function(N){return Se(N)}))),b.status=je(b.status||""),b):null}function pe(b){return b?(b.gasLimit=je(b.gasLimit),b.gasUsed=je(b.gasUsed),b.size=je(b.size),b.timestamp=je(b.timestamp),b.number!==null&&(b.number=je(b.number)),b.difficulty=Dt(b.difficulty),b.totalDifficulty=Dt(b.totalDifficulty),nn(b.transactions)&&b.transactions.forEach((function(N,q){Sn(N)||(b.transactions[q]=H(N)||b.transactions[q])})),b):null}function Se(b){return b&&(b.blockNumber&&(b.blockNumber=je(b.blockNumber)),b.transactionIndex&&(b.transactionIndex=je(b.transactionIndex)),b.logIndex&&(b.logIndex=je(b.logIndex)),b)}function Ce(b){if(qt(b))return b;if(Kt(b))return"0x"+b;throw new Error(`Invalid address: ${JSON.stringify(b)}`)}function Xe(b){return b}function Je(b){return b&&(b.startingBlock=je(b.startingBlock),b.currentBlock=je(b.currentBlock),b.highestBlock=je(b.highestBlock),b.knownStates&&(b.knownStates=je(b.knownStates),b.pulledStates=je(b.pulledStates)),b)}function _t(b){if(b===null)throw Me("cannot convert null value to array",Re,{arg:"value",value:b});if(b instanceof Uint8Array)return new Uint8Array(b);if(typeof b=="string"){const N=b.match(/^(0x)?[0-9a-fA-F]*$/);if(!N)throw Me("invalid hexidecimal string",Re,{arg:"value",value:b});if(N[1]!=="0x")throw Me("hex string must have 0x prefix",Re,{arg:"value",value:b});(b=b.substring(2)).length%2&&(b="0"+b);const q=[];for(let J=0;J<b.length;J+=2)q.push(parseInt(b.substr(J,2),16));return new Uint8Array(q)}if((function(N){if(!N||parseInt(String(N.length))!==N.length||typeof N=="string")return!1;for(let q=0;q<N.length;q++){const J=N[q];if(J<0||J>=256||parseInt(String(J))!==J)return!1}return!0})(b))return new Uint8Array(b);throw Me("invalid arrayify value",void 0,{arg:"value",value:b,type:typeof b})}function dt(b,N,q){Object.defineProperty(b,N,{enumerable:!0,value:q,writable:!1})}const St=new ne(-1),Ot=new ne(0),Mt=new ne(1),or=new ne("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function rr(b){return(function(N,q){function J(Ie){return new Error('unexpected character "'+N[Ie]+'" at position '+Ie+' in "'+N+'"')}const te={type:"",name:"",state:{allowType:!0}};let oe=te;for(let Ie=0;Ie<N.length;Ie++){const ze=N[Ie];switch(ze){case"(":if(!oe.state.allowParams)throw J(Ie);oe.state.allowType=!1,oe.type=wr(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=wr(oe.type);const st=oe;if(oe=oe.parent,!oe)throw J(Ie);delete st.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=wr(oe.type);const ct={type:"",name:"",parent:oe.parent,state:{allowType:!0}};oe.parent.components.push(ct),delete oe.parent,oe=ct;break;case" ":oe.state.allowType&&oe.type!==""&&(oe.type=wr(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 J(Ie);oe.type+=ze,oe.state.allowArray=!1,oe.state.allowName=!1,oe.state.readArray=!0;break;case"]":if(!oe.state.readArray)throw J(Ie);oe.type+=ze,oe.state.readArray=!1,oe.state.allowArray=!0,oe.state.allowName=!0;break;default:if(oe.state.allowType)oe.type+=ze,oe.state.allowParams=!0,oe.state.allowArray=!0;else if(oe.state.allowName)oe.name+=ze,delete oe.state.allowArray;else{if(!oe.state.readArray)throw J(Ie);oe.type+=ze}}}if(oe.parent)throw new Error("unexpected eof");return delete te.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),te.type=wr(te.type),te})(b)}function wr(b){return b.match(/^uint($|[^1-9])/)?b="uint256"+b.substring(4):b.match(/^int($|[^1-9])/)&&(b="int256"+b.substring(3)),b}const Hr=new RegExp(/^bytes([0-9]*)$/),An=new RegExp(/^(u?int)([0-9]*)$/),Vn=new RegExp(/^(.*)\[([0-9]*)\]$/),ai=function(b,N){const q=b.match(An);return q&&parseInt(q[2])<=48?N.toNumber():N};class kr{constructor(N,q,J,te="",oe){this.coerceFunc=N,this.name=q,this.type=J,this.localName=te,this.dynamic=oe}}class va extends kr{constructor(N){super(N.coerceFunc,N.name,N.type,void 0,N.dynamic),dt(this,"coder",N)}encode(N){return this.coder.encode(N)}decode(N,q){return this.coder.decode(N,q)}}class tu extends kr{constructor(N,q){super(N,"null","",q,!1)}encode(N){return _t([])}decode(N,q){if(q>N.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function Ri(b,N){return new ne(b.toString(2).substr(-N),2)}class Nl extends kr{constructor(N,q,J,te){const oe=(J?"int":"uint")+8*q;super(N,oe,oe,te,!1),this.size=q,this.signed=J}encode(N){try{let q=Dt(N);if(this.signed){let te=Ri(or,8*this.size-1);if(q.gt(te))throw new Error("out-of-bounds");if(te=te.plus(Mt).multipliedBy(St),q.lt(te))throw new Error("out-of-bounds")}else if(q.lt(Ot)||q.gt(Ri(or,8*this.size)))throw new Error("out-of-bounds");q=Ri(It(q,8*this.size),8*this.size),this.signed&&(q=It(Qe(q,8*this.size),256));const J=F(It(q).toString(16),64);if(J.indexOf("NaN")!==-1)throw Me("invalid number value, NaN",Re,{arg:this.localName,coderType:this.name,value:N,v:q,twosComplement:It(q),twosComplement16:It(q).toString(16),pad:F(It(q).toString(16),64),size:this.size});return ye(J)}catch(q){throw Me("invalid number value",Re,{arg:this.localName,coderType:this.name,value:N,message:q.toString()})}}decode(N,q){if(N.length<q+32)throw Me("insufficient data for "+this.name+" type",Re,{arg:this.localName,coderType:this.name,value:Le(N.slice(q,q+32))});const J=32-this.size;let te=new ne(le(N.slice(q+J,q+32)),16);return te=this.signed?Qe(te,8*this.size):Ri(te,8*this.size),{consumed:32,value:this.coerceFunc(this.name,te)}}}const Hn=new Nl((function(b,N){return N}),32,!1,"none");class sr extends kr{constructor(N,q,J){const te="bytes"+q;super(N,te,te,J,!1),this.length=q}encode(N){const q=new Uint8Array(32);try{if(typeof N=="string"&&N.length%2!=0)throw new Error("hex string cannot be odd-length");const J=_t(N);if(J.length>this.length)throw new Error("incorrect data length");q.set(J)}catch(J){throw Me("invalid "+this.name+" value. Use hex strings or Uint8Array",Re,{arg:this.localName,coderType:this.name,value:J.value||N,details:J.message})}return q}decode(N,q){if(N.length<q+32)throw Me("insufficient data for "+this.name+" type",Re,{arg:this.localName,coderType:this.name,value:Le(N.slice(q,q+32))});return{consumed:32,value:this.coerceFunc(this.name,N.slice(q,q+this.length))}}}function Rl(b){const N=32*Math.ceil(b.length/32),q=new Uint8Array(N-b.length);return K(Hn.encode(b.length),b,q)}function rs(b,N,q){if(b.length<N+32)throw Me("insufficient data for dynamicBytes length",Re,{arg:q,coderType:"dynamicBytes",value:Le(b.slice(N,N+32))});let J=Hn.decode(b,N).value;try{J=J.toNumber()}catch(te){throw te("dynamic bytes count too large",Re,{arg:q,coderType:"dynamicBytes",value:J.toString()})}if(b.length<N+32+J)throw Me("insufficient data for dynamicBytes type",Re,{arg:q,coderType:"dynamicBytes",value:Le(b.slice(N,N+32+J))});return{consumed:32+32*Math.ceil(J/32),value:b.slice(N+32,N+32+J)}}function Ci(b){return 32*Math.ceil(b/32)}function Mi(b,N){if(!Array.isArray(N)){if(!N||typeof N!="object")throw Me("invalid tuple value",Re,{coderType:"tuple",value:N});{const st=[];b.forEach((function(ct){st.push(N[ct.localName])})),N=st}}if(b.length!==N.length)throw Me("types/value length mismatch",Re,{coderType:"tuple",value:N});const q=[];b.forEach((function(st,ct){q.push({dynamic:st.dynamic,value:st.encode(N[ct])})}));let J=0,te=0;q.forEach((function(st){st.dynamic?(J+=32,te+=Ci(st.value.length)):J+=Ci(st.value.length)}));let oe=0,Ie=J;const ze=new Uint8Array(J+te);return q.forEach((function(st){st.dynamic?(ze.set(Hn.encode(Ie),oe),oe+=32,ze.set(st.value,Ie),Ie+=Ci(st.value.length)):(ze.set(st.value,oe),oe+=Ci(st.value.length))})),ze}class Sf extends Array{}class Cl extends kr{constructor(N,q,J,te){super(N,"array",q.type+"["+(J>=0?J:"")+"]",te,J===-1||q.dynamic),this.coder=q,this.length=J}encode(N){if(!Array.isArray(N))throw Me("expected array value",Re,{arg:this.localName,coderType:"array",value:N});let q=this.length,J=new Uint8Array(0);q===-1&&(q=N.length,J=Hn.encode(q)),(function(oe,Ie,ze){if(ze||(ze=""),oe<Ie)throw Me("missing argument"+ze,"MISSING_ARGUMENT",{count:oe,expectedCount:Ie});if(oe>Ie)throw Me("too many arguments"+ze,"UNEXPECTED_ARGUMENT",{count:oe,expectedCount:Ie})})(q,N.length,"in coder array"+(this.localName?" "+this.localName:""));const te=[];for(let oe=0;oe<N.length;oe++)te.push(this.coder);return K(J,Mi(te,N))}decode(N,q){let J=0,te=this.length;if(te===-1){let ze;try{ze=Hn.decode(N,q)}catch(st){throw Me("insufficient data for dynamic array length",Re,{arg:this.localName,coderType:"array",value:st.value})}try{te=ze.value.toNumber()}catch{throw Me("array count too large",Re,{arg:this.localName,coderType:"array",value:ze.value.toString()})}J+=ze.consumed,q+=ze.consumed}const oe=[];for(let ze=0;ze<te;ze++)oe.push(new va(this.coder));const Ie=(function(ze,st,ct){const gr=ct;let Xt=0;const Ke=[];return ze.forEach((function(Tr){let Jt;if(Tr.dynamic){const Ht=Hn.decode(st,ct);Jt=Tr.decode(st,gr+Ht.value.toNumber()),Jt.consumed=Ht.consumed}else Jt=Tr.decode(st,ct);Jt.value!==void 0&&Ke.push(Jt.value),ct+=Jt.consumed,Xt+=Jt.consumed})),{value:Ke,consumed:Xt}})(oe,N,q);return Ie.consumed+=J,Ie.value=this.coerceFunc(this.type,Ie.value),Ie}}class ii extends kr{constructor(N,q,J){let te=!1;const oe=[];q.forEach((function(Ie){Ie.dynamic&&(te=!0),oe.push(Ie.type)})),super(N,"tuple","tuple("+oe.join(",")+")",J,te),this.coders=q}encode(N){return Mi(this.coders,N)}decode(N,q){const J=(function(te,oe,Ie){const ze=Ie;let st=0;const ct=new Sf;return te.forEach((function(gr){let Xt;if(gr.dynamic){const Ke=Hn.decode(oe,Ie);Xt=gr.decode(oe,ze+Ke.value.toNumber()),Xt.consumed=Ke.consumed}else Xt=gr.decode(oe,Ie);Xt.value!==void 0&&ct.push(Xt.value),Ie+=Xt.consumed,st+=Xt.consumed})),te.forEach((function(gr,Xt){let Ke=gr.localName;Ke&&(Ke==="length"&&(Ke="_length"),ct[Ke]!==null&&ct[Ke]!==void 0||(ct[Ke]=ct[Xt]))})),{value:ct,consumed:st}})(this.coders,N,q);return J.value=this.coerceFunc(this.type,J.value),J}}const On={address:class extends kr{constructor(b,N){super(b,"address","address",N,!1)}encode(b){const N=new Uint8Array(32),q=b.trim();if(!Kt(q))throw Me("invalid address format",Re,{arg:this.localName,coderType:"address",value:b});try{N.set(ye(Ce(q)),12)}catch(J){throw Me(`invalid address (${J.message})`,Re,{arg:this.localName,coderType:"address",value:b})}return N}decode(b,N){if(b.length<N+32)throw Me("insufficuent data for address type",Re,{arg:this.localName,coderType:"address",value:Le(b.slice(N,N+32)),missingBytes:N+32-b.length});return{consumed:32,value:this.coerceFunc("address",pt(Le(b.slice(N+12,N+32))))}}},bool:class extends kr{constructor(b,N){super(b,"bool","bool",N,!1)}encode(b){return Hn.encode(b?1:0)}decode(b,N){try{const q=Hn.decode(b,N);return{consumed:q.consumed,value:this.coerceFunc("bool",!q.value.isZero())}}catch(q){throw q.reason==="insufficient data for uint256 type"?Me("insufficient data for boolean type",Re,{arg:this.localName,coderType:"boolean",value:q.value}):q}}},string:class extends kr{constructor(b,N){super(b,"string","string",N,!0)}encode(b){if(typeof b!="string")throw Me("invalid string value",Re,{arg:this.localName,coderType:"string",value:b});return Rl(be(b))}decode(b,N){const q=rs(b,N,this.localName);return q.value=this.coerceFunc("string",Ne(q.value)),q}},bytes:class extends kr{constructor(b,N){super(b,"bytes","bytes",N,!0)}encode(b){try{return Rl(_t(b))}catch(N){throw N("invalid bytes value",Re,{arg:this.localName,coderType:"bytes",value:N.value})}}decode(b,N){const q=rs(b,N,this.localName);return q.value=this.coerceFunc("bytes",q.value),q}},function:class extends sr{constructor(b,N){super(b,24,N)}}};function ns(b,N){const q=On[N.type];if(q)return new q(b,N.name);let J=N.type.match(An);if(J){const te=parseInt(J[2]||"256");if(te===0||te>256||te%8!=0)throw Me("invalid "+J[1]+" bit length",Re,{arg:"param",value:N});return new Nl(b,te/8,J[1]==="int",N.name)}if(J=N.type.match(Hr),J){const te=parseInt(J[1]);if(te===0||te>32)throw Me("invalid bytes length",Re,{arg:"param",value:N});return new sr(b,te,N.name)}if(J=N.type.match(Vn),J){const te=Object.assign({},N),oe=parseInt(J[2]||"-1");return te.type=J[1],new Cl(b,ns(b,te),oe,N.name)}if(N.type.substring(0,5)==="tuple")return(function(te,oe,Ie){oe||(oe=[]);const ze=oe.map((st=>ns(te,st)));return new ii(te,ze,Ie)})(b,N.components,N.name);if(N.type==="")return new tu(b,N.name);throw Me("invalid type",Re,{arg:"type",value:N.type,fullType:N})}class Zr{constructor(N){(function(q,J){if(!(q instanceof J))throw Me("missing new","MISSING_NEW",{name:J.name})})(this,Zr),N||(N=ai),dt(this,"coerceFunc",N)}encode(N,q){if(N.length!==q.length)throw Me("types/values length mismatch",Re,{count:{types:N.length,values:q.length},value:{types:N,values:q}});const J=N.map((te=>typeof te=="string"?rr(te):te)).map((te=>ns(this.coerceFunc,te)));return new ii(this.coerceFunc,J,"_").encode(q)}decode(N,q){const J=N.map((te=>typeof te=="string"?rr(te):te)).map((te=>ns(this.coerceFunc,te)));return new ii(this.coerceFunc,J,"_").decode(q,0).value}}const Ml=new Zr;var jl,nt;function tt(b,N,q,J){var te,oe=arguments.length,Ie=oe<3?N:J;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ie=Reflect.decorate(b,N,q,J);else for(var ze=b.length-1;ze>=0;ze--)(te=b[ze])&&(Ie=(oe<3?te(Ie):oe>3?te(N,q,Ie):te(N,q))||Ie);return oe>3&&Ie&&Object.defineProperty(N,q,Ie),Ie}function rt(b,N){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(b,N)}t.coder=void 0,(jl=t.coder||(t.coder={})).encodeParams=function(b,N){return le(Ml.encode(b,N))},jl.decodeParams=function(b,N){if(b.length>0&&(!N||N==="0x"||N==="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 Ml.decode(b,ye("0x"+N.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class yt{constructor(N){this.callName=N.callName,this.params=N.params||0,this.inputFormatter=N.inputFormatter||null,this.outputFormatter=N.outputFormatter}validateArgs(N){if(N.length!==this.params)throw q=this.callName,J=N.length,te=this.params,new Error(`Invalid number of input parameters to RPC method "${q}" given: ${J}, expected: ${te}`);var q,J,te}formatInput(N){return this.inputFormatter?this.inputFormatter.map((function(q,J){return q?q(N[J]):N[J]})):N}formatOutput(N){return N!==null?this.outputFormatter(N):null}toPayload(N){const q=this.formatInput(N);return this.validateArgs(q),{method:this.callName,params:q}}async execute(N,...q){const J=this.toPayload(q);if(!N)throw new Error("Missing RequestManager in method#exec");const te=await N.sendAsync(J);return this.formatOutput(te)}}class Sr{constructor(N){this.getter=N.getter,this.outputFormatter=N.outputFormatter}formatOutput(N){return this.outputFormatter(N)}async execute(N,...q){const J=await N.sendAsync({method:this.getter,params:[]});return this.formatOutput(J)}}function Ll(b){return new Promise((N=>setTimeout(N,b)))}t.eth=void 0,(nt=t.eth||(t.eth={})).eth_getBalance=new yt({callName:"eth_getBalance",params:2,inputFormatter:[Ce,Dr],outputFormatter:_a}),nt.eth_getStorageAt=new yt({callName:"eth_getStorageAt",params:3,inputFormatter:[Ce,Le,Dr],outputFormatter:fe}),nt.eth_getCode=new yt({callName:"eth_getCode",params:2,inputFormatter:[Ce,Dr],outputFormatter:fe}),nt.eth_getBlockByHash=new yt({callName:"eth_getBlockByHash",params:2,inputFormatter:[Ct,function(b){return!!b}],outputFormatter:pe}),nt.eth_getBlockByNumber=new yt({callName:"eth_getBlockByNumber",params:2,inputFormatter:[Ct,function(b){return!!b}],outputFormatter:pe}),nt.eth_getUncleByBlockHashAndIndex=new yt({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[Ct,Le],outputFormatter:pe}),nt.eth_getUncleByBlockNumberAndIndex=new yt({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[Ct,Le],outputFormatter:pe}),nt.eth_getBlockTransactionCountByHash=new yt({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[Ct],outputFormatter:je}),nt.eth_getBlockTransactionCountByNumber=new yt({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[Ct],outputFormatter:je}),nt.eth_getUncleCountByBlockHash=new yt({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[Ct],outputFormatter:je}),nt.eth_getUncleCountByBlockNumber=new yt({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[Ct],outputFormatter:je}),nt.eth_getTransactionByHash=new yt({callName:"eth_getTransactionByHash",params:1,inputFormatter:[an],outputFormatter:H}),nt.eth_getTransactionByBlockHashAndIndex=new yt({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[Ct,Le],outputFormatter:H}),nt.eth_getTransactionByBlockNumberAndIndex=new yt({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[Ct,Le],outputFormatter:H}),nt.eth_getTransactionReceipt=new yt({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[an],outputFormatter:$}),nt.eth_getTransactionCount=new yt({callName:"eth_getTransactionCount",params:2,inputFormatter:[Ce,Dr],outputFormatter:je}),nt.eth_sendRawTransaction=new yt({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:fe}),nt.web3_sha3=new yt({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:fe}),nt.eth_sendTransaction=new yt({callName:"eth_sendTransaction",params:1,inputFormatter:[ae],outputFormatter:fe}),nt.eth_sign=new yt({callName:"eth_sign",params:2,inputFormatter:[Ce,null],outputFormatter:fe}),nt.eth_call=new yt({callName:"eth_call",params:2,inputFormatter:[Qr,Dr],outputFormatter:fe}),nt.eth_estimateGas=new yt({callName:"eth_estimateGas",params:1,inputFormatter:[Qr],outputFormatter:je}),nt.eth_submitWork=new yt({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:De}),nt.eth_getWork=new yt({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:fr}),nt.eth_coinbase=new Sr({getter:"eth_coinbase",outputFormatter:mn}),nt.eth_mining=new Sr({getter:"eth_mining",outputFormatter:De}),nt.eth_hashrate=new Sr({getter:"eth_hashrate",outputFormatter:je}),nt.eth_syncing=new Sr({getter:"eth_syncing",outputFormatter:Je}),nt.eth_gasPrice=new Sr({getter:"eth_gasPrice",outputFormatter:_a}),nt.eth_accounts=new Sr({getter:"eth_accounts",outputFormatter:fr}),nt.eth_blockNumber=new Sr({getter:"eth_blockNumber",outputFormatter:je}),nt.eth_protocolVersion=new Sr({getter:"eth_protocolVersion",outputFormatter:je}),nt.web3_clientVersion=new Sr({getter:"web3_clientVersion",outputFormatter:ce}),nt.net_version=new Sr({getter:"net_version",outputFormatter:ce}),nt.shh_version=new yt({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:je}),nt.shh_post=new yt({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:De}),nt.personal_newAccount=new yt({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:mn}),nt.personal_importRawKey=new yt({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:mn}),nt.personal_sign=new yt({callName:"personal_sign",params:3,inputFormatter:[Pe,Ce,null],outputFormatter:fe}),nt.personal_ecRecover=new yt({callName:"personal_ecRecover",params:2,inputFormatter:[Pe,null],outputFormatter:mn}),nt.personal_unlockAccount=new yt({callName:"personal_unlockAccount",params:3,inputFormatter:[Ce,null,Be],outputFormatter:De}),nt.personal_sendTransaction=new yt({callName:"personal_sendTransaction",params:2,inputFormatter:[ae,null],outputFormatter:fe}),nt.personal_lockAccount=new yt({callName:"personal_lockAccount",params:1,inputFormatter:[Ce],outputFormatter:De}),nt.personal_listAccounts=new Sr({getter:"personal_listAccounts",outputFormatter:fr}),nt.net_listening=new Sr({getter:"net_listening",outputFormatter:De}),nt.net_peerCount=new Sr({getter:"net_peerCount",outputFormatter:je}),nt.eth_newFilter=new yt({callName:"eth_newFilter",params:1,inputFormatter:[Xe],outputFormatter:Le}),nt.eth_getLogs=new yt({callName:"eth_getLogs",params:1,inputFormatter:[fr],outputFormatter:fr}),nt.eth_newBlockFilter=new yt({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:Le}),nt.eth_newPendingTransactionFilter=new yt({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:Le}),nt.eth_uninstallFilter=new yt({callName:"eth_uninstallFilter",params:1,inputFormatter:[Le],outputFormatter:De}),nt.eth_getFilterLogs=new yt({callName:"eth_getFilterLogs",params:1,inputFormatter:[Le],outputFormatter:fr}),nt.eth_getFilterChanges=new yt({callName:"eth_getFilterChanges",params:1,inputFormatter:[Le],outputFormatter:fr}),nt.eth_submitHashrate=new yt({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:De}),nt.shh_newIdentity=new yt({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:fe}),nt.shh_hasIdentity=new yt({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:De}),nt.shh_newGroup=new yt({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:fe}),nt.shh_addToGroup=new yt({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:De}),nt.shh_newFilter=new yt({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:Le}),nt.shh_uninstallFilter=new yt({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:De}),nt.shh_getLogs=new yt({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:fr}),nt.shh_getFilterMessages=new yt({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:fr}),nt.shh_getFilterChanges=new yt({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:fr}),nt.shh_getMessages=new yt({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:fr});function ut(b,N){const q=t.eth[N];if(!q)throw new Error(`Could not find the method/property named ${N.toString()}`);Object.defineProperty(b,N,{value:function(...J){return q.execute(this,...J)}})}class et{constructor(N){this.provider=N,this.requests=new Map}async sendAsync(N){const q=await this.provider;if(!q)throw new Error("Provider not set or invalid");const J=ja(N.method,N.params),te=u();return this.requests.set(J.id,te),q.sendAsync(J,((oe,Ie)=>{this.requests.delete(J.id),oe?te.reject(oe):La(Ie)?te.resolve(Ie.result):te.reject((function(ze){const st=ze&&ze.error&&ze.error.message?ze.error.message:"Invalid JSON RPC response: "+JSON.stringify(ze);return new Error(st)})(Ie))})),te}setProvider(N){this.provider=N}async getConfirmedTransaction(N){const q=await this.waitForCompletion(N);if(this.isFailure(q))throw new Error(`Transaction "${N}" failed`);return q}async waitForCompletion(N,q){const J=an(N);if(await this.isTxDropped(J,q)){const te=await this.getTransactionAndReceipt(J);return Object.assign(Object.assign({},te),{status:t.TransactionStatus.failed})}for(;;){const te=await this.getTransactionAndReceipt(J);if(!this.isPending(te)&&te.receipt)return Object.assign(Object.assign({},te),{status:this.isFailure(te)?t.TransactionStatus.failed:t.TransactionStatus.confirmed});await Ll(2e3)}}async getTransaction(N){let q,J=null;const te=an(N);try{const Ie=(await this.eth_accounts())[0];Ie&&(J=await this.eth_getTransactionCount(Ie,"latest"))}catch{J=null}try{if(q=await this.eth_getTransactionByHash(te),q===null)return null}catch{return null}if(q.blockNumber===null){if(J!==null){if(q.nonce<J)return{hash:te,type:t.TransactionType.replaced,nonce:q.nonce};if(q.nonce>J)return{hash:te,type:t.TransactionType.queued,nonce:q.nonce}}return Object.assign({type:t.TransactionType.pending},q)}let oe;try{if(oe=await this.eth_getTransactionReceipt(te),oe===null||oe.status===0)return Object.assign({type:t.TransactionType.reverted},q)}catch{return null}return Object.assign(Object.assign({type:t.TransactionType.confirmed},q),{receipt:oe})}async isTxDropped(N,q=15){let J=q;for(;J>0;){if(await this.getTransactionAndReceipt(N)!==null)return!1;J-=1,await Ll(2e3)}return!0}async getTransactionAndReceipt(N){N=an(N);const[q,J]=await Promise.all([this.eth_getTransactionByHash(N),this.eth_getTransactionReceipt(N)]);return Object.assign(Object.assign({},q),{receipt:J})}isPending(N){return N&&N.blockNumber===null}isFailure(N){return N&&(!N.receipt||N.receipt.status===0)}}tt([ut,rt("design:type",Function)],et.prototype,"web3_clientVersion",void 0),tt([ut,rt("design:type",Function)],et.prototype,"web3_sha3",void 0),tt([ut,rt("design:type",Function)],et.prototype,"net_version",void 0),tt([ut,rt("design:type",Function)],et.prototype,"net_peerCount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"net_listening",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_protocolVersion",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_syncing",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_coinbase",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_mining",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_hashrate",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_gasPrice",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_accounts",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_blockNumber",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBalance",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getStorageAt",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionCount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBlockTransactionCountByHash",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBlockTransactionCountByNumber",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getUncleCountByBlockHash",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getUncleCountByBlockNumber",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getCode",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_sign",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_sendTransaction",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_sendRawTransaction",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_call",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_estimateGas",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBlockByHash",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBlockByNumber",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionByHash",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionReceipt",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getUncleByBlockHashAndIndex",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_newFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_newBlockFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_newPendingTransactionFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_uninstallFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getFilterChanges",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getFilterLogs",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getLogs",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getWork",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_submitWork",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_submitHashrate",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_post",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_version",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_newIdentity",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_hasIdentity",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_newGroup",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_addToGroup",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_newFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_uninstallFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_getFilterChanges",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_getMessages",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_unlockAccount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_newAccount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_listAccounts",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_lockAccount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_importRawKey",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_sendTransaction",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_sign",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_ecRecover",void 0);class ru{constructor(N){this.json=N,this._inputTypes=N.inputs||[],this._outputTypes=N.outputs||[],this._constant=!!N.constant,this._payable=!!N.payable||N.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in N&&!N.constant||N.stateMutability==="nonpayable",this._name=L(N)}extractDefaultBlock(N){return N.length>this._inputTypes.length&&!rn(N[N.length-1])&&Dr(N.pop())||"latest"}validateArgs(N){if(N.some((oe=>oe===void 0)))throw new Error("Invalid call, some arguments are undefined");const q=N.filter((function(oe){return!(rn(oe)===!0&&nn(oe)===!1&&Lr(oe)===!1&&!(oe instanceof Uint8Array))}));if(q.length!==this._inputTypes.length)throw J=q.length,te=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${J}, expected: ${te}`);var J,te}toPayload(N){let q={to:void 0,data:void 0,value:void 0,from:void 0};N.length>this._inputTypes.length&&rn(N[N.length-1])&&(q=N.pop()),this.validateArgs(N);const J=this.signature();let te=t.coder.encodeParams(this._inputTypes,N);return te.indexOf("0x")===0&&(te=te.substr(2)),q.data="0x"+J+te,q}signature(){return X(this._name).slice(0,8)}unpackOutput(N){if(!N)return;const q=N.length>=2?N.slice(2):N,J=t.coder.decodeParams(this._outputTypes,q);return J.length===1?J[0]:J}async execute(N,q,...J){if(!N)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const te=this.toPayload(J);if(te.to=q,te.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!te.from)throw new Error('Missing "from" in transaction options');return await N.eth_sendTransaction(te)}{const te=this.extractDefaultBlock(J),oe=this.toPayload(J);oe.to=q;const Ie=await N.eth_call(oe,te);return this.unpackOutput(Ie)}}estimateGas(N,q,...J){if(!(N instanceof et))throw new Error("estimateGas needs to receive a RequestManager as first argument");const te=this.toPayload(J);return te.to=q,N.eth_estimateGas(te)}displayName(){return Oe(this._name)}typeName(){return Te(this._name)||"void"}attachToContract(N){const q=this.displayName(),J=Object.assign(((...te)=>this.execute(N.requestManager,N.address,...te)),{estimateGas:this.estimateGas.bind(this,N.requestManager,N.address),toPayload:(...te)=>this.toPayload(te),toRPCMessage:(...te)=>{const oe=this.extractDefaultBlock(te),Ie=this.toPayload(te);return Ie.to=N.address,{method:"eth_call",params:[Ie,oe]}},unpackOutput:te=>this.unpackOutput(te)});N[q]||(N[q]=J),N[q][this.typeName()]=J}}function as(b){if(b==null)return null;const N=String(b).toString();return N.indexOf("0x")===0?N:le(be(N))}class ka{constructor(N){this.requestManager=N,this.isStarted=!1,this.isDisposed=!1,this.formatter=q=>q,this.filterId=u(),this.callbacks=[],this.stopSemaphore=u()}async watch(N){if(this.isDisposed)throw new Error("The filter was disposed");N&&(this.callbacks.push(N),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 N=await this.getNewFilter();if(!N)throw new Error("Could not create a filter, response: "+JSON.stringify(N));this.filterId.resolve(N)}catch(N){throw N}this.stopSemaphore=u(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const N=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: ${N}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const q=await this.getChanges();q&&this.callbacks.forEach((J=>{this.formatter?q.forEach((te=>{J(this.formatter(te))})):q.forEach((te=>J(te)))}))}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=u(),setTimeout((N=()=>this.poll(),function(){N().catch((q=>console.error(q)))}),500))}else this.stopSemaphore.resolve(1);var N}}class ji extends ka{constructor(N,q,J=(te=>te)){super(N),this.requestManager=N,this.options=q,this.formatter=J,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(te){return as(te)})),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"?Ct(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?Ct(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const N=await this.filterId;return this.requestManager.eth_getFilterLogs(N)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const N=await this.filterId;return this.requestManager.eth_getFilterChanges(N)}async uninstall(){const N=await this.filterId;return this.requestManager.eth_uninstallFilter(N)}}class Li{constructor(N,q,J){this.requestManager=N,this.address=J,this._anonymous=!1,this._params=q.inputs||[],this._name=L(q),this._anonymous=q.anonymous||!1}types(N){return this._params.filter((function(q){return q.indexed===N}))}displayName(){return Oe(this._name)}typeName(){return Te(this._name)||"void"}signature(){return X(this._name)}encode(N={},q={}){const J={topics:[],address:this.address};q.fromBlock!==void 0&&(J.fromBlock=Ct(q.fromBlock)||void 0),q.toBlock!==void 0&&(J.toBlock=Ct(q.toBlock)||void 0),J.topics=J.topics||[],this._anonymous||J.topics.push("0x"+this.signature());const te=this._params.filter((function(oe){return oe.indexed===!0})).map((function(oe){const Ie=N[oe.name];return Ie==null?null:nn(Ie)?Ie.map((function(ze){return"0x"+t.coder.encodeParams([oe],[ze])})):"0x"+t.coder.encodeParams([oe],[Ie])}));return J.topics=J.topics.concat(te),J}decode(N){N.data=N.data||"",N.topics=N.topics||[];const q=(this._anonymous?N.topics:N.topics.slice(1)).map((function(ze){return ze.slice(2)})).join(""),J=t.coder.decodeParams(this.types(!0),q),te=N.data.slice(2),oe=t.coder.decodeParams(this.types(!1),te),Ie=this._params.reduce((function(ze,st){return ze[st.name]=st.indexed?J.shift():oe.shift(),ze}),{});return Object.assign(Object.assign({},Se(N)),{event:this.displayName(),address:N.address,args:Ie})}async execute(N,q){const J=this.encode(N,q),te=this.decode.bind(this);return new ji(this.requestManager,J,te)}attachToContract(N){const q=this.execute.bind(this),J=this.displayName();N.events[J]||(N.events[J]=q),N.events[J][this.typeName()]=this.execute.bind(this,N)}}class Yt{constructor(N,q,J){this._requestManager=N,this._json=q,this._address=J}encode(N={}){const q={address:this._address};return N.fromBlock!==void 0&&(q.fromBlock=Ct(N.fromBlock)||void 0),N.toBlock!==void 0&&(q.toBlock=Ct(N.toBlock)||void 0),q}decode(N){N.data=N.data||"";const q=nn(N.topics)&&Sn(N.topics[0])?N.topics[0].slice(2):"",J=this._json.filter((function(te){return q===X(L(te))}))[0];return J?new Li(this._requestManager,J,this._address).decode(N):Se(N)}async execute(N){const q=this.encode(N),J=this.decode.bind(this);return new ji(this._requestManager,q,J)}getAllEventsFunction(){return this.execute.bind(this)}}class nu{constructor(N,q,J){var te;this.requestManager=N,this.abi=q,this.address=J,this.events={},this.transactionHash=null,this.address=J,this.abi=q,(te=this).abi.filter((function(oe){return oe.type==="function"})).map((function(oe){return new ru(oe)})).forEach((function(oe){oe.attachToContract(te)})),this.allEvents=(function(oe){const Ie=oe.abi.filter((function(st){return st.type==="event"})),ze=new Yt(oe.requestManager,Ie,oe.address);return Ie.map((function(st){return new Li(oe.requestManager,st,oe.address)})).forEach((function(st){st.attachToContract(oe)})),ze.getAllEventsFunction()})(this)}}t.AbstractFilter=ka,t.BigNumber=ne,t.Contract=nu,t.ContractFactory=class{constructor(b,N){this.requestManager=b,this.abi=N}async deploy(...b){let N;const q=b[b.length-1];if(rn(q)&&!nn(q)&&(N=b.pop()),!N)throw new Error("Missing options object");if(!N.data||typeof N.data!="string")throw new Error("Invalid options.data");if(je(N.value)>0&&!(this.abi.filter((function(ct){return ct.type==="constructor"&&ct.inputs.length===b.length}))[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const J=(te=this.abi,oe=b,te.filter((function(ct){return ct.type==="constructor"&&ct.inputs&&ct.inputs.length===oe.length})).map((function(ct){return ct.inputs||[]})).map((function(ct){return t.coder.encodeParams(ct,oe)}))[0]||"");var te,oe;N.data+=J,N.gas||(N.gas=await this.requestManager.eth_estimateGas(N));const Ie=await this.requestManager.eth_sendTransaction(N);if(!Ie)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const ze=await(async function(ct,gr){const Xt=u();let Ke=0;const Tr=()=>{Ke++,Ke>50?Xt.reject(new Error("Contract transaction couldn't be found after 50 blocks")):ct.eth_getTransactionReceipt(gr).then((Nr=>{Nr&&Nr.blockHash?Xt.resolve(Nr):setTimeout(Tr,1e3)}),(Nr=>Xt.reject(Nr)))};Tr();const Jt=await Xt,Ht=await ct.eth_getCode(Jt.contractAddress,"latest");if(Ht&&Ht.length>3)return Jt.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:Ht,receipt:Jt})})(this.requestManager,Ie),st=await this.at(ze);return st.transactionHash=Ie,st}async at(b){if(!Kt(b))throw new TypeError(`Invalid address ${JSON.stringify(b)}`);return new nu(this.requestManager,this.abi,b)}},t.EthBlockFilter=class extends ji{constructor(b){super(b,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},t.EthFilter=ji,t.EthPendingTransactionFilter=class extends ji{constructor(b){super(b,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},t.HTTPProvider=class{constructor(b,N={}){this.host=b,this.options=N,this.debug=!1,this.host=b||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(b,N){try{let q=null;q=b instanceof Array?b.map((oe=>n(oe))):n(b);const J=this.options.fetch||globalThis.fetch;if(J===void 0)throw new Error("There is no global fetch object nor it was provided. Please install and import isomorphic-fetch");const te={body:JSON.stringify(q),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+te.body),J(this.host,te).then((async oe=>{if(oe.ok){const Ie=await oe.json();this.debug&&console.log("RECV << "+JSON.stringify(Ie)),Ie.error?N(Object.assign(new Error(Ie.error.json||Ie.error),Ie.error)):N(null,Ie)}else this.debug&&console.log("ERR << "+JSON.stringify(oe)),N(new Error("External error. response code: "+oe.status))}),(oe=>{this.debug&&console.log("ERR << "+JSON.stringify(oe)),N(oe)}))}catch(q){this.debug&&console.log("ERR << "+JSON.stringify(q)),N(q)}}},t.Method=yt,t.Property=Sr,t.RequestManager=et,t.SHHFilter=class extends ka{constructor(b,N){super(b),this.requestManager=b,this.options=N,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(q){return as(q)})),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const b=await this.filterId;return this.requestManager.shh_getMessages(b)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const b=await this.filterId;return this.requestManager.shh_getFilterChanges(b)}async uninstall(){const b=await this.filterId;return this.requestManager.shh_uninstallFilter(b)}},t.SolidityEvent=Li,t.SolidityFunction=ru,t.WebSocketProvider=class{constructor(b,N={}){this.url=b,this.options=N,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const b=this.connection;this.timeout(new Error("Provider disposed.")),b.then((N=>N.close())).catch((N=>{this.debug&&console.error(N)}))}send(){throw new Error("Sync requests are deprecated")}sendAsync(b,N){const q=[];let J;if(b instanceof Array)J=Promise.all(b.map((te=>{const oe=u();try{const Ie=n(te);q.push(Ie),this.responseCallbacks.set(Ie.id,oe)}catch(Ie){oe.reject(Ie)}return oe})));else{const te=u();try{const oe=n(b);q.push(oe),this.responseCallbacks.set(oe.id,te)}catch(oe){te.reject(oe)}J=te}J.then((te=>N(null,te)),(te=>N(te))),this.connection.then((te=>{q.forEach((oe=>{const Ie=JSON.stringify(oe);this.debug&&console.log("SEND >> "+Ie),te.send(Ie)}))}),(te=>{N(te)}))}parseResponse(b){const N=[];return b.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((q=>{let J=q;this.lastChunk&&(J=this.lastChunk+J);let te=null;try{te=JSON.parse(J)}catch{return this.lastChunk=J,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout((()=>{this.timeout()}),15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",te&&N.push(te)})),N}processMessage(b){if("id"in b){const N=b.id,q=this.responseCallbacks.get(N);if(!q)return void console.error("Error: Received a response for an unknown request",b);this.responseCallbacks.delete(N),b.error!==void 0&&b.error!==null?q.reject(Object.assign(new Error(b.error.message||b.error),b.error)):"result"in b&&q.resolve(b)}else this.notificationCallbacks.forEach((N=>N(null,b)))}timeout(b){this.connection&&this.connection.isPending||(this.connection=u());const N=b||new Error("Connection timeout");this.responseCallbacks.forEach((q=>q.reject(N))),this.responseCallbacks.clear(),this.isDisposed||setTimeout((()=>this.connect()),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then((q=>q.close())).catch((q=>{this.debug&&console.error(q)})),this.connection&&this.connection.isPending||(this.connection=u()),this.lastChunk="";const b=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!b)throw new Error("Please provide a WebSocketConstructor");const N=new b(this.url,this.options.protocol);N.onopen=()=>{this.connection.resolve(N)},N.onerror=q=>{const J=new Error("Error in web socket");J.data=q,this.timeout(J)},N.onclose=q=>{this.timeout(new Error(`Connection closed (${q&&q.reason||"Unknown reason"})`))},N.onmessage=q=>{const J=typeof q.data=="string"?q.data:"";this.debug&&console.log("RECV << "+q.data),this.parseResponse(J).forEach((te=>{te instanceof Array?te.forEach((oe=>this.processMessage(oe))):this.processMessage(te)}))}}},t.bytesToHex=le,t.bytesToUtf8String=Ne,t.concatBytes=K,t.default=et,t.extractDisplayName=Oe,t.extractTypeName=Te,t.fromAscii=function(b,N=0){let q="";for(let J=0;J<b.length;J++){const te=b.charCodeAt(J).toString(16);q+=te.length<2?"0"+te:te}return"0x"+q.padEnd(N,"0")},t.fromDecimal=Ge,t.fromTwosComplement=Qe,t.fromWei=function(b,N){const q=Dt(b).dividedBy(Rt(N));return Lr(b)?q:q.toString(10)},t.getAddress=pt,t.getValueOfUnit=Rt,t.hexToBytes=ye,t.inputAddressFormatter=Ce,t.inputBlockNumberFormatter=Ct,t.inputCallFormatter=Qr,t.inputDefaultBlockNumberFormatter=Dr,t.inputFilterOptions=Xe,t.inputPostFormatter=function(b){return b?(b.ttl=Ge(b.ttl),b.workToProve=Ge(b.workToProve),b.priority=Ge(b.priority),nn(b.topics)||(b.topics=b.topics?[b.topics]:[]),b.topics=b.topics.map((function(N){return N.indexOf("0x")===0?N:"0x"+le(be(N))})),b):null},t.inputTransactionFormatter=ae,t.inputTransactionId=an,t.isAddress=Kt,t.isArray=nn,t.isBigNumber=Lr,t.isBloom=function(b){return!!/^(0x)?[0-9a-f]{512}$/i.test(b)&&!!/^(0x)?[0-9a-f]{512}$/i.test(b)},t.isBoolean=Tn,t.isChecksumAddress=tr,t.isFunction=function(b){return typeof b=="function"},t.isHex=function(b){return typeof b=="string"&&/^0x[0-9a-fA-F]+$/.test(b)},t.isJson=function(b){try{return!!JSON.parse(b)}catch{return!1}},t.isObject=rn,t.isPredefinedBlockNumber=Da,t.isStrictAddress=qt,t.isString=Sn,t.isTopic=function(b){return!!/^(0x)?[0-9a-f]{64}$/i.test(b)&&!!/^(0x)?[0-9a-f]{64}$/i.test(b)},t.isValidResponse=La,t.outputBigNumberFormatter=_a,t.outputBlockFormatter=pe,t.outputLogFormatter=Se,t.outputPostFormatter=function(b){return b?(b.expiry=je(b.expiry),b.sent=je(b.sent),b.ttl=je(b.ttl),b.workProved=je(b.workProved),b.topics||(b.topics=[]),b.topics=b.topics.map((function(N){return B(N)})),b):null},t.outputSyncingFormatter=Je,t.outputTransactionFormatter=H,t.outputTransactionReceiptFormatter=$,t.padLeft=F,t.padRight=function(b,N,q){return b+new Array(N-b.length+1).join(q||"0")},t.sha3=X,t.signedIsNegative=Fe,t.stringToUtf8Bytes=be,t.toAddress=mn,t.toArray=fr,t.toAscii=B,t.toBatchPayload=function(b){return b.map((function(N){return ja(N.method,N.params)}))},t.toBigNumber=Dt,t.toBoolean=De,t.toChecksumAddress=jr,t.toData=fe,t.toDecimal=je,t.toHex=Le,t.toJsonRpcRequest=ja,t.toNullDecimal=Be,t.toString=ce,t.toStringData=Pe,t.toTwosComplement=It,t.toWei=function(b,N){const q=Dt(b).times(Rt(N));return Lr(b)?q:q.toString(10)},t.transformToFullName=L,Object.defineProperty(t,"__esModule",{value:!0})}))})(pl,pl.exports)),pl.exports}var Uu={},vN;function EF(){if(vN)return Uu;vN=1,Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.SignatureValidator=void 0;const e=gf();async function a(t,n){const i=[{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,i).at(n)}return Uu.SignatureValidator=a,Uu}var Zg={},sa={},Bo={},Uo={},xg={},ua={},EN;function ot(){if(EN)return ua;EN=1;var e=ua&&ua.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(ua,"__esModule",{value:!0}),ua.validateType=ua.generateLazyValidator=ua.Ajv=void 0;const a=e(uf());ua.Ajv=a.default;const t=e(nE()),n=e(aE());function i(u,c){let f=null;const p=(m,h)=>{if(!f){const _=new a.default({$data:!0,allErrors:!0});(0,t.default)(_),(0,n.default)(_,{singleError:!0}),c?.forEach(T=>_.addKeyword(T)),f=_.compile(u),Object.defineProperty(p,"errors",{get(){return f?.errors}})}return f(m,h)};return p}ua.generateLazyValidator=i;function s(u,c){return u.validate(c)}return ua.validateType=s,ua}var bN;function bF(){return bN||(bN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const a=ot();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,a.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(xg)),xg}var $g={},wN;function wF(){return wN||(wN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const a=ot();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})($g)),$g}var SN;function SF(){return SN||(SN=1,(function(e){var a=Uo&&Uo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Uo&&Uo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(bF(),e),t(wF(),e)})(Uo)),Uo}var Fo={},e_={},TN;function TF(){return TN||(TN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(e_)),e_}var t_={},r_={},PN;function _f(){return PN||(PN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const a=ot();(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,a.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},i={[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 u(p){return n[p]}t.getMaxSupply=u;function c(p){return s[p]}t.getColor=c;function f(p){return[i[p],s[p]]}t.getGradient=f})(e.Rarity||(e.Rarity={}))})(r_)),r_}var n_={},AN;function es(){return AN||(AN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(n_)),n_}var a_={},i_={},ON;function PE(){return ON||(ON=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(i_)),i_}var o_={},s_={},IN;function Oj(){return IN||(IN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(s_)),s_}var NN;function AE(){return NN||(NN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const a=es(),t=ot(),n=Oj();(function(i){i.schema={oneOf:[Object.assign({},a.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(o_)),o_}var RN;function OE(){return RN||(RN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const a=ot(),t=PE(),n=AE();(function(i){i.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"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(a_)),a_}var Vo={},Ho={},u_={},l_={},CN;function xs(){return CN||(CN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema);t.validate=i=>n(i)})(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=i=>n.test(i)})(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=i=>n.test(i)})(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=i=>n.test(i)})(e.IPFSv1||(e.IPFSv1={}))})(l_)),l_}var MN;function Ij(){return MN||(MN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const a=es(),t=xs(),n=ot();var i;(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)})(i=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:a.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:i.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(s=e.AvatarInfo||(e.AvatarInfo={}));var u;(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=m=>p.test(m)})(u=e.LinkUrl||(e.LinkUrl={}));var c;(function(f){f.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:u.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={}))})(u_)),u_}var c_={},jN;function PF(){return jN||(jN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const a=ot(),t=Ij();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(c_)),c_}var LN;function AF(){return LN||(LN=1,(function(e){var a=Ho&&Ho.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Ho&&Ho.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(Ij(),e),t(PF(),e)})(Ho)),Ho}var d_={},f_={},DN;function Nj(){return DN||(DN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const a=ot();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,a.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(f_)),f_}var p_={},kN;function Rj(){return kN||(kN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(p_)),p_}var h_={},qN;function Cj(){return qN||(qN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(h_)),h_}var m_={},Fu={},BN;function IE(){return BN||(BN=1,Object.defineProperty(Fu,"__esModule",{value:!0}),Fu.displayableProperties=void 0,Fu.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Fu}var y_={},UN;function Mj(){return UN||(UN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(y_)),y_}var g_={},FN;function jj(){return FN||(FN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(g_)),g_}var VN;function OF(){return VN||(VN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const a=ot(),t=IE(),n=Nj(),i=Cj(),s=Mj(),u=jj(),c=Rj();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:i.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:u.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,a.generateLazyValidator)(p.schema)})(e.Scene||(e.Scene={}))})(m_)),m_}var HN;function IF(){return HN||(HN=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 a=Nj();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return a.FeatureToggles}});var t=Rj();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=Cj();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=OF();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var s=Mj();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return s.Source}});var u=jj();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return u.SpawnPoint}})})(d_)),d_}var zo={},__={},v_={},zN;function Lj(){return zN||(zN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(v_)),v_}var WN;function Dj(){return WN||(WN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const a=ot(),t=Lj();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(__)),__}var E_={},GN;function kj(){return GN||(GN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(E_)),E_}var b_={},KN;function NE(){return KN||(KN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const a=_f(),t=ot();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:a.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,t.generateLazyValidator)(n);function s(u){return i(u)}e.isStandard=s})(b_)),b_}var w_={},S_={},YN;function qj(){return YN||(YN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(S_)),S_}var XN;function RE(){return XN||(XN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.thirdPartyProps=void 0;const a=ot(),t=qj();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},i={keyword:"_containsHashingKeys",validate:(c,f)=>{var p;const m=f;return!((p=m?.merkleProof)===null||p===void 0)&&p.hashingKeys?m.merkleProof.hashingKeys.every(h=>m.hasOwnProperty(h)):!1},errors:!1},s=(0,a.generateLazyValidator)(n,[i]);function u(c){return s(c)}e.isThirdParty=u})(w_)),w_}var T_={},P_={},Ja={},JN;function Bj(){if(JN)return Ja;JN=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.isBaseAvatar=Ja.requiredBaseItemProps=Ja.baseItemProperties=void 0;const e=Dj(),a=kj(),t=IE();Ja.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({},a.Metrics.schema),{nullable:!0})}),Ja.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(i){if(!i||!i.id)return!1;const s=i.id.split(":"),u=s[1]==="decentraland",c=s[3]==="base-avatars";return s.length===5&&u&&c}return Ja.isBaseAvatar=n,Ja}var QN;function NF(){return QN||(QN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const a=ot(),t=es(),n=OE(),i=Bj(),s=NE(),u=RE(),c=AE();(function(f){f.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),s.standardProperties),u.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:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content"]},{required:[...i.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,_)=>!h||(0,u.isThirdParty)(_),errors:!1},m={keyword:"_isBaseAvatar",validate:(h,_)=>!h||(0,i.isBaseAvatar)(_),errors:!1};f.validate=(0,a.generateLazyValidator)(f.schema,[p,m])})(e.Wearable||(e.Wearable={}))})(P_)),P_}var ZN;function RF(){return ZN||(ZN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var a=OE();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return a.WearableRepresentation}});var t=NF();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=es();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=Oj();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var s=AE();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return s.HideableWearableCategory}})})(T_)),T_}var A_={},O_={},I_={},N_={},xN;function Uj(){return xN||(xN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(N_)),N_}var R_={},$N;function Fj(){return $N||($N=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const a=ot(),t=PE();(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,a.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(R_)),R_}var eR;function Vj(){return eR||(eR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const a=Uj(),t=ot(),n=Fj();(function(i){i.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:a.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(I_)),I_}var tR;function CF(){return tR||(tR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const a=Hj(),t=ot(),n=Bj(),i=NE(),s=RE(),u=Vj();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),i.standardProperties),s.thirdPartyProps),{emoteDataADR74:u.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,m)=>!p||(0,a.isThirdParty)(m),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[f])})(e.Emote||(e.Emote={}))})(O_)),O_}var C_={},rR;function MF(){return rR||(rR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(C_)),C_}var nR;function jF(){return nR||(nR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=e.EmoteCategory=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var a=CF();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return a.Emote}});var t=Fj();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=Vj();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=Uj();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return i.EmoteCategory}});var s=MF();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}})})(A_)),A_}var aR;function Hj(){return aR||(aR=1,(function(e){var a=zo&&zo.__createBinding||(Object.create?(function(p,m,h,_){_===void 0&&(_=h);var T=Object.getOwnPropertyDescriptor(m,h);(!T||("get"in T?!m.__esModule:T.writable||T.configurable))&&(T={enumerable:!0,get:function(){return m[h]}}),Object.defineProperty(p,_,T)}):(function(p,m,h,_){_===void 0&&(_=h),p[_]=m[h]})),t=zo&&zo.__exportStar||function(p,m){for(var h in p)h!=="default"&&!Object.prototype.hasOwnProperty.call(m,h)&&a(m,p,h)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=Dj();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=Lj();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var s=kj();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return s.Metrics}});var u=PE();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return u.BodyShape}});var c=NE();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return c.isStandard}});var f=RE();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return f.isThirdParty}}),t(RF(),e),t(jF(),e)})(zo)),zo}var Wo={},iR;function LF(){return iR||(iR=1,(function(e){var a=Wo&&Wo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Wo&&Wo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(qj(),e)})(Wo)),Wo}var M_={},j_={},oR;function CE(){return oR||(oR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const a=ot();var t;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(i){i.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"}}}]}},i.validate=(0,a.generateLazyValidator)(i.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(i){i.schema={type:"array",items:n.schema,minItems:1},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.AuthChain||(e.AuthChain={}))})(j_)),j_}var sR;function DF(){return sR||(sR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const a=xs(),t=CE(),n=ot();(function(i){i.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:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(i){i.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:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(M_)),M_}var L_={},D_={},uR;function zj(){return uR||(uR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const a=xs(),t=ot();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[a.IPFSv1.schema,a.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(D_)),D_}var lR;function kF(){return lR||(lR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const a=xs(),t=zj(),n=ot();(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[a.IPFSv1.schema,a.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"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.Entity||(e.Entity={}))})(L_)),L_}var k_={},cR;function qF(){return cR||(cR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const a=CE(),t=ot();(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:a.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(k_)),k_}var Go={},q_={},dR;function BF(){return dR||(dR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const a=es(),t=xs(),n=ot();var i;(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:a.WearableCategory.schema}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(i=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:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(e.Outfits||(e.Outfits={}))})(q_)),q_}var fR;function UF(){return fR||(fR=1,(function(e){var a=Go&&Go.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Go&&Go.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(BF(),e)})(Go)),Go}var pR;function ME(){return pR||(pR=1,(function(e){var a=Vo&&Vo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Vo&&Vo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(AF(),e),t(IF(),e),t(Hj(),e),t(IE(),e),t(LF(),e),t(DF(),e),t(kF(),e),t(qF(),e),t(UF(),e)})(Vo)),Vo}var hR;function FF(){return hR||(hR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const a=_f(),t=es(),n=OE(),i=ot(),s=ME();(function(u){u.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},a.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"]},u.validate=(0,i.generateLazyValidator)(u.schema)})(e.WearableJson||(e.WearableJson={}))})(t_)),t_}var mR;function VF(){return mR||(mR=1,(function(e){var a=Fo&&Fo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Fo&&Fo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(TF(),e),t(FF(),e)})(Fo)),Fo}var yR;function HF(){return yR||(yR=1,(function(e){var a=Bo&&Bo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Bo&&Bo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(SF(),e),t(VF(),e)})(Bo)),Bo}var B_={},U_={},F_={},gR;function Wj(){return gR||(gR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const a=ot(),t=ga();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 i(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=i,(function(s){s.schema={type:"string",enum:Object.values(s)},s.validate=(0,a.generateLazyValidator)(s.schema)})(n=e.ChainName||(e.ChainName={}))})(F_)),F_}var V_={},_R;function ya(){return _R||(_R=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(V_)),V_}var vR;function ga(){return vR||(vR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const a=ot(),t=Wj(),n=ya();var i;(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"})(i=e.ChainId||(e.ChainId={}));function s(p){switch(p){case i.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;default:return null}}e.getChainName=s;function u(p){switch(p){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai";default:return""}}e.getURNProtocol=u;function c(p){switch(p){case i.ETHEREUM_MAINNET:return{[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET};case i.ETHEREUM_ROPSTEN:return{[n.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_RINKEBY:return{[n.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_GOERLI:return{[n.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_KOVAN:return{[n.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_SEPOLIA:return{[n.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.MATIC_MAINNET:return{[n.Network.ETHEREUM]:i.MATIC_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET};case i.MATIC_MUMBAI:return{[n.Network.ETHEREUM]:i.MATIC_MUMBAI,[n.Network.MATIC]:i.MATIC_MUMBAI};default:return{[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET}}}e.getNetworkMapping=c;function f(p){switch(p){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:return n.Network.MATIC}}e.getNetwork=f,(function(p){p.schema={type:"number",enum:Object.values(p)},p.validate=(0,a.generateLazyValidator)(p.schema)})(i=e.ChainId||(e.ChainId={}))})(U_)),U_}var H_={},ER;function jE(){return ER||(ER=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(H_)),H_}var bR;function zF(){return bR||(bR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const a=ot(),t=ga(),n=jE(),i=ya();(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:i.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,a.generateLazyValidator)(s.schema)})(e.Bid||(e.Bid={}))})(B_)),B_}var z_={},wR;function WF(){return wR||(wR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(z_)),z_}var W_={},SR;function GF(){return SR||(SR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const a=ot(),t=ga(),n=ya();(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(i){i.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"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Collection||(e.Collection={}))})(W_)),W_}var G_={},K_={},TR;function vf(){return TR||(TR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(K_)),K_}var PR;function KF(){return PR||(PR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const a=ot(),t=ga(),n=ya(),i=vf();(function(s){s.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(s){s.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:n.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Contract||(e.Contract={}))})(G_)),G_}var Y_={},X_={},AR;function Gj(){return AR||(AR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const a=ot(),t=ga(),n=ME(),i=ya(),s=vf(),u=_f(),c=es();(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:u.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:u.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:i.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,a.generateLazyValidator)(f.schema)})(e.NFT||(e.NFT={}))})(X_)),X_}var OR;function YF(){return OR||(OR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const a=ot(),t=ga(),n=ya(),i=Gj(),s=vf();(function(u){u.NAME="name",u.NEWEST="newest",u.RECENTLY_REVIEWED="recently_reviewed",u.RECENTLY_SOLD="recently_sold",u.RECENTLY_LISTED="recently_listed",u.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(u){u.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:i.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"]},u.validate=(0,a.generateLazyValidator)(u.schema)})(e.Item||(e.Item={}))})(Y_)),Y_}var J_={},IR;function XF(){return IR||(IR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(J_)),J_}var Q_={},NR;function JF(){return NR||(NR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const a=ot(),t=ga(),n=ya();(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(i){i.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"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Mint||(e.Mint={}))})(Q_)),Q_}var Z_={},RR;function QF(){return RR||(RR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(a){a.NEWEST="newest",a.RECENTLY_SOLD="recently_sold",a.CHEAPEST="cheapest",a.MOST_EXPENSIVE="most_expensive",a.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(a){a.ASC="asc",a.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(Z_)),Z_}var x_={},CR;function ZF(){return CR||(CR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const a=ot(),t=ga(),n=jE(),i=ya();(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:i.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,a.generateLazyValidator)(s.schema)})(e.Order||(e.Order={}))})(x_)),x_}var $_={},MR;function xF(){return MR||(MR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})($_)),$_}var ev={},jR;function Kj(){return jR||(jR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(ev)),ev}var tv={},LR;function $F(){return LR||(LR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const a=ot(),t=ga(),n=Kj(),i=ya();(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:i.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Sale||(e.Sale={}))})(tv)),tv}var rv={},DR;function eV(){return DR||(DR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const a=ot(),t=ga(),n=ya();(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 i;(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,a.generateLazyValidator)(s.schema)})(i=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:i.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,a.generateLazyValidator)(s.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(rv)),rv}var nv={},kR;function tV(){return kR||(kR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(a){a.DATE="date",a.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(nv)),nv}var av={},qR;function rV(){return qR||(qR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(av)),av}var iv={},BR;function nV(){return BR||(BR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(iv)),iv}var ov={},UR;function aV(){return UR||(UR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const a=ot();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(i,s){const u=t().validWorldRanges;for(const c of u)if(i>=c.xMin&&i<=c.xMax&&s>=c.yMin&&s<=c.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(i){i.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},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.World||(e.World={}))})(ov)),ov}var Ko={},sv={},FR;function iV(){return FR||(FR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(sv)),sv}var uv={},VR;function oV(){return VR||(VR=1,Object.defineProperty(uv,"__esModule",{value:!0})),uv}var lv={},HR;function sV(){return HR||(HR=1,Object.defineProperty(lv,"__esModule",{value:!0})),lv}var cv={},zR;function uV(){return zR||(zR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(cv)),cv}var dv={},WR;function lV(){return WR||(WR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(dv)),dv}var fv={},GR;function cV(){return GR||(GR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewMessageType=void 0;const a=ot();(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,a.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,i,s,u="*")=>{const c={type:i,payload:s};n.postMessage(c,u)};e.sendMessage=t})(fv)),fv}var pv={},KR;function dV(){return KR||(KR=1,Object.defineProperty(pv,"__esModule",{value:!0})),pv}var hv={},YR;function fV(){return YR||(YR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(hv)),hv}var mv={},XR;function pV(){return XR||(XR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(mv)),mv}var yv={},JR;function hV(){return JR||(JR=1,Object.defineProperty(yv,"__esModule",{value:!0})),yv}var gv={},QR;function mV(){return QR||(QR=1,Object.defineProperty(gv,"__esModule",{value:!0})),gv}var _v={},ZR;function yV(){return ZR||(ZR=1,Object.defineProperty(_v,"__esModule",{value:!0})),_v}var vv={},xR;function gV(){return xR||(xR=1,Object.defineProperty(vv,"__esModule",{value:!0})),vv}var Ev={},$R;function _V(){return $R||($R=1,Object.defineProperty(Ev,"__esModule",{value:!0})),Ev}var bv={},eC;function vV(){return eC||(eC=1,Object.defineProperty(bv,"__esModule",{value:!0})),bv}var wv={},tC;function EV(){return tC||(tC=1,Object.defineProperty(wv,"__esModule",{value:!0})),wv}var Sv={},rC;function bV(){return rC||(rC=1,Object.defineProperty(Sv,"__esModule",{value:!0})),Sv}var nC;function wV(){return nC||(nC=1,(function(e){var a=Ko&&Ko.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Ko&&Ko.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(iV(),e),t(oV(),e),t(sV(),e),t(uV(),e),t(lV(),e),t(cV(),e),t(dV(),e),t(fV(),e),t(pV(),e),t(hV(),e),t(mV(),e),t(yV(),e),t(gV(),e),t(_V(),e),t(vV(),e),t(EV(),e),t(bV(),e)})(Ko)),Ko}var Tv={},aC;function SV(){return aC||(aC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(Tv)),Tv}var iC;function TV(){return iC||(iC=1,(function(e){var a=sa&&sa.__createBinding||(Object.create?(function(Ne,Ae,Re,Me){Me===void 0&&(Me=Re);var ye=Object.getOwnPropertyDescriptor(Ae,Re);(!ye||("get"in ye?!Ae.__esModule:ye.writable||ye.configurable))&&(ye={enumerable:!0,get:function(){return Ae[Re]}}),Object.defineProperty(Ne,Me,ye)}):(function(Ne,Ae,Re,Me){Me===void 0&&(Me=Re),Ne[Me]=Ae[Re]})),t=sa&&sa.__setModuleDefault||(Object.create?(function(Ne,Ae){Object.defineProperty(Ne,"default",{enumerable:!0,value:Ae})}):function(Ne,Ae){Ne.default=Ae}),n=sa&&sa.__importStar||function(Ne){if(Ne&&Ne.__esModule)return Ne;var Ae={};if(Ne!=null)for(var Re in Ne)Re!=="default"&&Object.prototype.hasOwnProperty.call(Ne,Re)&&a(Ae,Ne,Re);return t(Ae,Ne),Ae},i=sa&&sa.__exportStar||function(Ne,Ae){for(var Re in Ne)Re!=="default"&&!Object.prototype.hasOwnProperty.call(Ae,Re)&&a(Ae,Ne,Re)};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(HF());e.sdk=s,i(ot(),e);var u=zF();Object.defineProperty(e,"Bid",{enumerable:!0,get:function(){return u.Bid}}),Object.defineProperty(e,"BidSortBy",{enumerable:!0,get:function(){return u.BidSortBy}});var c=WF();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return c.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return c.AccountSortBy}});var f=ga();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=Wj();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return p.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return p.getChainId}});var m=GF();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return m.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return m.CollectionSortBy}});var h=KF();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return h.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return h.ContractSortBy}});var _=YF();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return _.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return _.ItemSortBy}});var T=jE();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return T.ListingStatus}});var C=XF();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return C.MetaTransaction}});var O=JF();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return O.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return O.MintSortBy}});var E=ya();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return E.Network}});var R=vf();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return R.NFTCategory}});var v=Gj();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return v.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return v.NFTSortBy}});var I=QF();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return I.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return I.CatalogSortDirection}});var A=ZF();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return A.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return A.OrderSortBy}});var y=xF();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return y.ProviderType}});var S=_f();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return S.Rarity}});var M=Kj();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return M.SaleType}});var U=$F();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return U.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return U.SaleSortBy}});var V=eV();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 Q=tV();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return Q.AnalyticsDayDataSortBy}});var ne=rV();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return ne.Store}});var me=nV();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return me.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return me.GenderFilterOption}});var be=aV();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return be.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return be.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return be.isInsideWorldLimits}}),i(wV(),e),i(ME(),e),i(xs(),e),i(SV(),e),i(CE(),e),i(zj(),e)})(sa)),sa}var oC;function Yj(){return oC||(oC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const a=TV();Object.defineProperty(e,"AuthChain",{enumerable:!0,get:function(){return a.AuthChain}}),Object.defineProperty(e,"AuthLinkType",{enumerable:!0,get:function(){return a.AuthLinkType}}),Object.defineProperty(e,"AuthLink",{enumerable:!0,get:function(){return a.AuthLink}})})(Zg)),Zg}var Vu={},sC;function PV(){if(sC)return Vu;sC=1,Object.defineProperty(Vu,"__esModule",{value:!0}),Vu.moveMinutes=void 0;function e(a){const t=new Date;return t.setMinutes(t.getMinutes()+a),t}return Vu.moveMinutes=e,Vu}var kd={},uC;function AV(){if(uC)return kd;uC=1,Object.defineProperty(kd,"__esModule",{value:!0});const e=gf();class a{constructor(n,i=!0){this.requestManager=n,this.checkedBlocks={},this.saveBlocks=i,i&&(this.savedBlocks={}),this.requests=0}async fillBlockTime(){const n=await this.getBlockWrapper("latest"),i=await this.getBlockWrapper(1);this.blockTime=(n.timestamp-i.timestamp)/Number(n.number)-1,this.firstTimestamp=i.timestamp}async getDate(n,i=!0){const s=n/1e3,u=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>=u||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,i),timestamp:s}}async findBetter(n,i,s,u=this.blockTime){if(await this.isBetterBlock(n,i,s))return i.number;const c=n-i.timestamp;let f=Math.ceil(c/u);f===0&&(f=c<0?-1:1);const p=await this.getBlockWrapper(this.getNextBlock(n,i.number,f));return u=Math.abs((i.timestamp-p.timestamp)/(i.number-p.number)),this.findBetter(n,p,s,u)}async isBetterBlock(n,i,s){const u=i.timestamp;if(s){if(u<n)return!1;const c=await this.getBlockWrapper(i.number-1);if(u>=n&&c.timestamp<n)return!0}else{if(u>=n)return!1;const c=await this.getBlockWrapper(i.number+1);if(u<n&&c.timestamp>=n)return!0}return!1}getNextBlock(n,i,s){const u=i+s;return this.checkedBlocks[n].includes(u)?this.getNextBlock(n,i,s<0?++s:--s):(this.checkedBlocks[n].push(u),u)}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:i}=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)(i).toNumber()},this.requests++,this.savedBlocks[n.toString()]}}return kd.default=a,kd}var Vr={},Pv={},Av={},Jr={},lC;function LE(){if(lC)return Jr;lC=1,Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.output=Jr.exists=Jr.hash=Jr.bytes=Jr.bool=Jr.number=void 0;function e(c){if(!Number.isSafeInteger(c)||c<0)throw new Error(`Wrong positive integer: ${c}`)}Jr.number=e;function a(c){if(typeof c!="boolean")throw new Error(`Expected boolean, not ${c}`)}Jr.bool=a;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}`)}Jr.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)}Jr.hash=n;function i(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")}Jr.exists=i;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}`)}Jr.output=s;const u={number:e,bool:a,bytes:t,hash:n,exists:i,output:s};return Jr.default=u,Jr}var Ov={},Hu={},cC;function OV(){return cC||(cC=1,Object.defineProperty(Hu,"__esModule",{value:!0}),Hu.crypto=void 0,Hu.crypto={node:void 0,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0}),Hu}var dC;function vl(){return dC||(dC=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 a=OV(),t=A=>new Uint8Array(A.buffer,A.byteOffset,A.byteLength);e.u8=t;const n=A=>new Uint32Array(A.buffer,A.byteOffset,Math.floor(A.byteLength/4));e.u32=n;const i=A=>new DataView(A.buffer,A.byteOffset,A.byteLength);e.createView=i;const s=(A,y)=>A<<32-y|A>>>y;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 u=Array.from({length:256},(A,y)=>y.toString(16).padStart(2,"0"));function c(A){if(!(A instanceof Uint8Array))throw new Error("Uint8Array expected");let y="";for(let S=0;S<A.length;S++)y+=u[A[S]];return y}e.bytesToHex=c;function f(A){if(typeof A!="string")throw new TypeError("hexToBytes: expected string, got "+typeof A);if(A.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const y=new Uint8Array(A.length/2);for(let S=0;S<y.length;S++){const M=S*2,U=A.slice(M,M+2),V=Number.parseInt(U,16);if(Number.isNaN(V)||V<0)throw new Error("Invalid byte sequence");y[S]=V}return y}e.hexToBytes=f;const p=async()=>{};e.nextTick=p;async function m(A,y,S){let M=Date.now();for(let U=0;U<A;U++){S(U);const V=Date.now()-M;V>=0&&V<y||(await(0,e.nextTick)(),M+=V)}}e.asyncLoop=m;function h(A){if(typeof A!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof A}`);return new TextEncoder().encode(A)}e.utf8ToBytes=h;function _(A){if(typeof A=="string"&&(A=h(A)),!(A instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof A})`);return A}e.toBytes=_;function T(...A){if(!A.every(M=>M instanceof Uint8Array))throw new Error("Uint8Array list expected");if(A.length===1)return A[0];const y=A.reduce((M,U)=>M+U.length,0),S=new Uint8Array(y);for(let M=0,U=0;M<A.length;M++){const V=A[M];S.set(V,U),U+=V.length}return S}e.concatBytes=T;class C{clone(){return this._cloneInto()}}e.Hash=C;const O=A=>Object.prototype.toString.call(A)==="[object Object]"&&A.constructor===Object;function E(A,y){if(y!==void 0&&(typeof y!="object"||!O(y)))throw new TypeError("Options should be object or undefined");return Object.assign(A,y)}e.checkOpts=E;function R(A){const y=M=>A().update(_(M)).digest(),S=A();return y.outputLen=S.outputLen,y.blockLen=S.blockLen,y.create=()=>A(),y}e.wrapConstructor=R;function v(A){const y=(M,U)=>A(U).update(_(M)).digest(),S=A({});return y.outputLen=S.outputLen,y.blockLen=S.blockLen,y.create=M=>A(M),y}e.wrapConstructorWithOpts=v;function I(A=32){if(a.crypto.web)return a.crypto.web.getRandomValues(new Uint8Array(A));if(a.crypto.node)return new Uint8Array(a.crypto.node.randomBytes(A).buffer);throw new Error("The environment doesn't have randomBytes function")}e.randomBytes=I})(Ov)),Ov}var fC;function IV(){return fC||(fC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=void 0;const a=LE(),t=vl();class n extends t.Hash{constructor(u,c){super(),this.finished=!1,this.destroyed=!1,a.default.hash(u);const f=(0,t.toBytes)(c);if(this.iHash=u.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,m=new Uint8Array(p);m.set(f.length>p?u.create().update(f).digest():f);for(let h=0;h<m.length;h++)m[h]^=54;this.iHash.update(m),this.oHash=u.create();for(let h=0;h<m.length;h++)m[h]^=106;this.oHash.update(m),m.fill(0)}update(u){return a.default.exists(this),this.iHash.update(u),this}digestInto(u){a.default.exists(this),a.default.bytes(u,this.outputLen),this.finished=!0,this.iHash.digestInto(u),this.oHash.update(u),this.oHash.digestInto(u),this.destroy()}digest(){const u=new Uint8Array(this.oHash.outputLen);return this.digestInto(u),u}_cloneInto(u){u||(u=Object.create(Object.getPrototypeOf(this),{}));const{oHash:c,iHash:f,finished:p,destroyed:m,blockLen:h,outputLen:_}=this;return u=u,u.finished=p,u.destroyed=m,u.blockLen=h,u.outputLen=_,u.oHash=c._cloneInto(u.oHash),u.iHash=f._cloneInto(u.iHash),u}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const i=(s,u,c)=>new n(s,u).update(c).digest();e.hmac=i,e.hmac.create=(s,u)=>new n(s,u)})(Av)),Av}var Yo={},zu={},pC;function NV(){if(pC)return zu;pC=1,Object.defineProperty(zu,"__esModule",{value:!0}),zu.SHA2=void 0;const e=LE(),a=vl();function t(i,s,u,c){if(typeof i.setBigUint64=="function")return i.setBigUint64(s,u,c);const f=BigInt(32),p=BigInt(4294967295),m=Number(u>>f&p),h=Number(u&p),_=c?4:0,T=c?0:4;i.setUint32(s+_,m,c),i.setUint32(s+T,h,c)}class n extends a.Hash{constructor(s,u,c,f){super(),this.blockLen=s,this.outputLen=u,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,a.createView)(this.buffer)}update(s){e.default.exists(this);const{view:u,buffer:c,blockLen:f}=this;s=(0,a.toBytes)(s);const p=s.length;for(let m=0;m<p;){const h=Math.min(f-this.pos,p-m);if(h===f){const _=(0,a.createView)(s);for(;f<=p-m;m+=f)this.process(_,m);continue}c.set(s.subarray(m,m+h),this.pos),this.pos+=h,m+=h,this.pos===f&&(this.process(u,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:u,view:c,blockLen:f,isLE:p}=this;let{pos:m}=this;u[m++]=128,this.buffer.subarray(m).fill(0),this.padOffset>f-m&&(this.process(c,0),m=0);for(let O=m;O<f;O++)u[O]=0;t(c,f-8,BigInt(this.length*8),p),this.process(c,0);const h=(0,a.createView)(s),_=this.outputLen;if(_%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const T=_/4,C=this.get();if(T>C.length)throw new Error("_sha2: outputLen bigger than state");for(let O=0;O<T;O++)h.setUint32(4*O,C[O],p)}digest(){const{buffer:s,outputLen:u}=this;this.digestInto(s);const c=s.slice(0,u);return this.destroy(),c}_cloneInto(s){s||(s=new this.constructor),s.set(...this.get());const{blockLen:u,buffer:c,length:f,finished:p,destroyed:m,pos:h}=this;return s.length=f,s.pos=h,s.finished=p,s.destroyed=m,f%u&&s.buffer.set(c),s}}return zu.SHA2=n,zu}var hC;function Xj(){if(hC)return Yo;hC=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.sha224=Yo.sha256=void 0;const e=NV(),a=vl(),t=(p,m,h)=>p&m^~p&h,n=(p,m,h)=>p&m^p&h^m&h,i=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]),u=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:m,B:h,C:_,D:T,E:C,F:O,G:E,H:R}=this;return[m,h,_,T,C,O,E,R]}set(m,h,_,T,C,O,E,R){this.A=m|0,this.B=h|0,this.C=_|0,this.D=T|0,this.E=C|0,this.F=O|0,this.G=E|0,this.H=R|0}process(m,h){for(let A=0;A<16;A++,h+=4)u[A]=m.getUint32(h,!1);for(let A=16;A<64;A++){const y=u[A-15],S=u[A-2],M=(0,a.rotr)(y,7)^(0,a.rotr)(y,18)^y>>>3,U=(0,a.rotr)(S,17)^(0,a.rotr)(S,19)^S>>>10;u[A]=U+u[A-7]+M+u[A-16]|0}let{A:_,B:T,C,D:O,E,F:R,G:v,H:I}=this;for(let A=0;A<64;A++){const y=(0,a.rotr)(E,6)^(0,a.rotr)(E,11)^(0,a.rotr)(E,25),S=I+y+t(E,R,v)+i[A]+u[A]|0,U=((0,a.rotr)(_,2)^(0,a.rotr)(_,13)^(0,a.rotr)(_,22))+n(_,T,C)|0;I=v,v=R,R=E,E=O+S|0,O=C,C=T,T=_,_=S+U|0}_=_+this.A|0,T=T+this.B|0,C=C+this.C|0,O=O+this.D|0,E=E+this.E|0,R=R+this.F|0,v=v+this.G|0,I=I+this.H|0,this.set(_,T,C,O,E,R,v,I)}roundClean(){u.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 Yo.sha256=(0,a.wrapConstructor)(()=>new c),Yo.sha224=(0,a.wrapConstructor)(()=>new f),Yo}var Iv={};const RV={},CV=Object.freeze(Object.defineProperty({__proto__:null,default:RV},Symbol.toStringTag,{value:"Module"})),MV=pD(CV);var mC;function yC(){return mC||(mC=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 a=MV,t=BigInt(0),n=BigInt(1),i=BigInt(2),s=BigInt(3),u=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=(ae,H)=>(ae+H/i)/H,p={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(ae){const{n:H}=c,$=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),pe=-n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),Se=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),Ce=$,Xe=BigInt("0x100000000000000000000000000000000"),Je=f(Ce*ae,H),_t=f(-pe*ae,H);let dt=B(ae-Je*$-_t*Se,H),St=B(-Je*pe-_t*Ce,H);const Ot=dt>Xe,Mt=St>Xe;if(Ot&&(dt=H-dt),Mt&&(St=H-St),dt>Xe||St>Xe)throw new Error("splitScalarEndo: Endomorphism failed, k="+ae);return{k1neg:Ot,k1:dt,k2neg:Mt,k2:St}}},m=32,h=32,_=32,T=m+1,C=2*m+1;function O(ae){const{a:H,b:$}=c,pe=B(ae*ae),Se=B(pe*ae);return B(Se+H*ae+$)}const E=c.a===t;class R extends Error{constructor(H){super(H)}}function v(ae){if(!(ae instanceof I))throw new TypeError("JacobianPoint expected")}class I{constructor(H,$,pe){this.x=H,this.y=$,this.z=pe}static fromAffine(H){if(!(H instanceof S))throw new TypeError("JacobianPoint#fromAffine: expected Point");return H.equals(S.ZERO)?I.ZERO:new I(H.x,H.y,n)}static toAffineBatch(H){const $=Oe(H.map(pe=>pe.z));return H.map((pe,Se)=>pe.toAffine($[Se]))}static normalizeZ(H){return I.toAffineBatch(H).map(I.fromAffine)}equals(H){v(H);const{x:$,y:pe,z:Se}=this,{x:Ce,y:Xe,z:Je}=H,_t=B(Se*Se),dt=B(Je*Je),St=B($*dt),Ot=B(Ce*_t),Mt=B(B(pe*Je)*dt),or=B(B(Xe*Se)*_t);return St===Ot&&Mt===or}negate(){return new I(this.x,B(-this.y),this.z)}double(){const{x:H,y:$,z:pe}=this,Se=B(H*H),Ce=B($*$),Xe=B(Ce*Ce),Je=H+Ce,_t=B(i*(B(Je*Je)-Se-Xe)),dt=B(s*Se),St=B(dt*dt),Ot=B(St-i*_t),Mt=B(dt*(_t-Ot)-u*Xe),or=B(i*$*pe);return new I(Ot,Mt,or)}add(H){v(H);const{x:$,y:pe,z:Se}=this,{x:Ce,y:Xe,z:Je}=H;if(Ce===t||Xe===t)return this;if($===t||pe===t)return H;const _t=B(Se*Se),dt=B(Je*Je),St=B($*dt),Ot=B(Ce*_t),Mt=B(B(pe*Je)*dt),or=B(B(Xe*Se)*_t),rr=B(Ot-St),wr=B(or-Mt);if(rr===t)return wr===t?this.double():I.ZERO;const Hr=B(rr*rr),An=B(rr*Hr),Vn=B(St*Hr),ai=B(wr*wr-An-i*Vn),kr=B(wr*(Vn-ai)-Mt*An),va=B(Se*Je*rr);return new I(ai,kr,va)}subtract(H){return this.add(H.negate())}multiplyUnsafe(H){const $=I.ZERO;if(typeof H=="bigint"&&H===t)return $;let pe=F(H);if(pe===n)return this;if(!E){let Ot=$,Mt=this;for(;pe>t;)pe&n&&(Ot=Ot.add(Mt)),Mt=Mt.double(),pe>>=n;return Ot}let{k1neg:Se,k1:Ce,k2neg:Xe,k2:Je}=p.splitScalar(pe),_t=$,dt=$,St=this;for(;Ce>t||Je>t;)Ce&n&&(_t=_t.add(St)),Je&n&&(dt=dt.add(St)),St=St.double(),Ce>>=n,Je>>=n;return Se&&(_t=_t.negate()),Xe&&(dt=dt.negate()),dt=new I(B(dt.x*p.beta),dt.y,dt.z),_t.add(dt)}precomputeWindow(H){const $=E?128/H+1:256/H+1,pe=[];let Se=this,Ce=Se;for(let Xe=0;Xe<$;Xe++){Ce=Se,pe.push(Ce);for(let Je=1;Je<2**(H-1);Je++)Ce=Ce.add(Se),pe.push(Ce);Se=Ce.double()}return pe}wNAF(H,$){!$&&this.equals(I.BASE)&&($=S.BASE);const pe=$&&$._WINDOW_SIZE||1;if(256%pe)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let Se=$&&y.get($);Se||(Se=this.precomputeWindow(pe),$&&pe!==1&&(Se=I.normalizeZ(Se),y.set($,Se)));let Ce=I.ZERO,Xe=I.BASE;const Je=1+(E?128/pe:256/pe),_t=2**(pe-1),dt=BigInt(2**pe-1),St=2**pe,Ot=BigInt(pe);for(let Mt=0;Mt<Je;Mt++){const or=Mt*_t;let rr=Number(H&dt);H>>=Ot,rr>_t&&(rr-=St,H+=n);const wr=or,Hr=or+Math.abs(rr)-1,An=Mt%2!==0,Vn=rr<0;rr===0?Xe=Xe.add(A(An,Se[wr])):Ce=Ce.add(A(Vn,Se[Hr]))}return{p:Ce,f:Xe}}multiply(H,$){let pe=F(H),Se,Ce;if(E){const{k1neg:Xe,k1:Je,k2neg:_t,k2:dt}=p.splitScalar(pe);let{p:St,f:Ot}=this.wNAF(Je,$),{p:Mt,f:or}=this.wNAF(dt,$);St=A(Xe,St),Mt=A(_t,Mt),Mt=new I(B(Mt.x*p.beta),Mt.y,Mt.z),Se=St.add(Mt),Ce=Ot.add(or)}else{const{p:Xe,f:Je}=this.wNAF(pe,$);Se=Xe,Ce=Je}return I.normalizeZ([Se,Ce])[0]}toAffine(H){const{x:$,y:pe,z:Se}=this,Ce=this.equals(I.ZERO);H==null&&(H=Ce?u:ue(Se));const Xe=H,Je=B(Xe*Xe),_t=B(Je*Xe),dt=B($*Je),St=B(pe*_t),Ot=B(Se*Xe);if(Ce)return S.ZERO;if(Ot!==n)throw new Error("invZ was invalid");return new S(dt,St)}}I.BASE=new I(c.Gx,c.Gy,n),I.ZERO=new I(t,n,t);function A(ae,H){const $=H.negate();return ae?$:H}const y=new WeakMap;class S{constructor(H,$){this.x=H,this.y=$}_setWindowSize(H){this._WINDOW_SIZE=H,y.delete(this)}hasEvenY(){return this.y%i===t}static fromCompressedHex(H){const $=H.length===32,pe=X($?H:H.subarray(1));if(!De(pe))throw new Error("Point is not on curve");const Se=O(pe);let Ce=K(Se);const Xe=(Ce&n)===n;$?Xe&&(Ce=B(-Ce)):(H[0]&1)===1!==Xe&&(Ce=B(-Ce));const Je=new S(pe,Ce);return Je.assertValidity(),Je}static fromUncompressedHex(H){const $=X(H.subarray(1,m+1)),pe=X(H.subarray(m+1,m*2+1)),Se=new S($,pe);return Se.assertValidity(),Se}static fromHex(H){const $=j(H),pe=$.length,Se=$[0];if(pe===m)return this.fromCompressedHex($);if(pe===T&&(Se===2||Se===3))return this.fromCompressedHex($);if(pe===C&&Se===4)return this.fromUncompressedHex($);throw new Error(`Point.fromHex: received invalid point. Expected 32-${T} compressed bytes or ${C} uncompressed bytes, not ${pe}`)}static fromPrivateKey(H){return S.BASE.multiply(Le(H))}static fromSignature(H,$,pe){const{r:Se,s:Ce}=Dt($);if(![0,1,2,3].includes(pe))throw new Error("Cannot recover: invalid recovery bit");const Xe=Be(j(H)),{n:Je}=c,_t=pe===2||pe===3?Se+Je:Se,dt=ue(_t,Je),St=B(-Xe*dt,Je),Ot=B(Ce*dt,Je),Mt=pe&1?"03":"02",or=S.fromHex(Mt+Ae(_t)),rr=S.BASE.multiplyAndAddUnsafe(or,St,Ot);if(!rr)throw new Error("Cannot recover signature: point at infinify");return rr.assertValidity(),rr}toRawBytes(H=!1){return le(this.toHex(H))}toHex(H=!1){const $=Ae(this.x);return H?`${this.hasEvenY()?"02":"03"}${$}`:`04${$}${Ae(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const H="Point is not on elliptic curve",{x:$,y:pe}=this;if(!De($)||!De(pe))throw new Error(H);const Se=B(pe*pe),Ce=O($);if(B(Se-Ce)!==t)throw new Error(H)}equals(H){return this.x===H.x&&this.y===H.y}negate(){return new S(this.x,B(-this.y))}double(){return I.fromAffine(this).double().toAffine()}add(H){return I.fromAffine(this).add(I.fromAffine(H)).toAffine()}subtract(H){return this.add(H.negate())}multiply(H){return I.fromAffine(this).multiply(H,this).toAffine()}multiplyAndAddUnsafe(H,$,pe){const Se=I.fromAffine(this),Ce=$===t||$===n||this!==S.BASE?Se.multiplyUnsafe($):Se.multiply($),Xe=I.fromAffine(H).multiplyUnsafe(pe),Je=Ce.add(Xe);return Je.equals(I.ZERO)?void 0:Je.toAffine()}}e.Point=S,S.BASE=new S(c.Gx,c.Gy),S.ZERO=new S(t,t);function M(ae){return Number.parseInt(ae[0],16)>=8?"00"+ae:ae}function U(ae){if(ae.length<2||ae[0]!==2)throw new Error(`Invalid signature integer tag: ${be(ae)}`);const H=ae[1],$=ae.subarray(2,H+2);if(!H||$.length!==H)throw new Error("Invalid signature integer: wrong length");if($[0]===0&&$[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:X($),left:ae.subarray(H+2)}}function V(ae){if(ae.length<2||ae[0]!=48)throw new Error(`Invalid signature tag: ${be(ae)}`);if(ae[1]!==ae.length-2)throw new Error("Invalid signature: incorrect length");const{data:H,left:$}=U(ae.subarray(2)),{data:pe,left:Se}=U($);if(Se.length)throw new Error(`Invalid signature: left bytes after parsing: ${be(Se)}`);return{r:H,s:pe}}class Q{constructor(H,$){this.r=H,this.s=$,this.assertValidity()}static fromCompact(H){const $=H instanceof Uint8Array,pe="Signature.fromCompact";if(typeof H!="string"&&!$)throw new TypeError(`${pe}: Expected string or Uint8Array`);const Se=$?be(H):H;if(Se.length!==128)throw new Error(`${pe}: Expected 64-byte hex`);return new Q(ye(Se.slice(0,64)),ye(Se.slice(64,128)))}static fromDER(H){const $=H instanceof Uint8Array;if(typeof H!="string"&&!$)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:pe,s:Se}=V($?H:le(H));return new Q(pe,Se)}static fromHex(H){return this.fromDER(H)}assertValidity(){const{r:H,s:$}=this;if(!Pe(H))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Pe($))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const H=c.n>>n;return this.s>H}normalizeS(){return this.hasHighS()?new Q(this.r,B(-this.s,c.n)):this}toDERRawBytes(){return le(this.toDERHex())}toDERHex(){const H=M(Me(this.s)),$=M(Me(this.r)),pe=H.length/2,Se=$.length/2,Ce=Me(pe),Xe=Me(Se);return`30${Me(Se+pe+4)}02${Xe}${$}02${Ce}${H}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return le(this.toCompactHex())}toCompactHex(){return Ae(this.r)+Ae(this.s)}}e.Signature=Q;function ne(...ae){if(!ae.every(pe=>pe instanceof Uint8Array))throw new Error("Uint8Array list expected");if(ae.length===1)return ae[0];const H=ae.reduce((pe,Se)=>pe+Se.length,0),$=new Uint8Array(H);for(let pe=0,Se=0;pe<ae.length;pe++){const Ce=ae[pe];$.set(Ce,Se),Se+=Ce.length}return $}const me=Array.from({length:256},(ae,H)=>H.toString(16).padStart(2,"0"));function be(ae){if(!(ae instanceof Uint8Array))throw new Error("Expected Uint8Array");let H="";for(let $=0;$<ae.length;$++)H+=me[ae[$]];return H}const Ne=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function Ae(ae){if(typeof ae!="bigint")throw new Error("Expected bigint");if(!(t<=ae&&ae<Ne))throw new Error("Expected number 0 <= n < 2^256");return ae.toString(16).padStart(64,"0")}function Re(ae){const H=le(Ae(ae));if(H.length!==32)throw new Error("Error: expected 32 bytes");return H}function Me(ae){const H=ae.toString(16);return H.length&1?`0${H}`:H}function ye(ae){if(typeof ae!="string")throw new TypeError("hexToNumber: expected string, got "+typeof ae);return BigInt(`0x${ae}`)}function le(ae){if(typeof ae!="string")throw new TypeError("hexToBytes: expected string, got "+typeof ae);if(ae.length%2)throw new Error("hexToBytes: received invalid unpadded hex"+ae.length);const H=new Uint8Array(ae.length/2);for(let $=0;$<H.length;$++){const pe=$*2,Se=ae.slice(pe,pe+2),Ce=Number.parseInt(Se,16);if(Number.isNaN(Ce)||Ce<0)throw new Error("Invalid byte sequence");H[$]=Ce}return H}function X(ae){return ye(be(ae))}function j(ae){return ae instanceof Uint8Array?Uint8Array.from(ae):le(ae)}function F(ae){if(typeof ae=="number"&&Number.isSafeInteger(ae)&&ae>0)return BigInt(ae);if(typeof ae=="bigint"&&Pe(ae))return ae;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function B(ae,H=c.P){const $=ae%H;return $>=t?$:H+$}function L(ae,H){const{P:$}=c;let pe=ae;for(;H-- >t;)pe*=pe,pe%=$;return pe}function K(ae){const{P:H}=c,$=BigInt(6),pe=BigInt(11),Se=BigInt(22),Ce=BigInt(23),Xe=BigInt(44),Je=BigInt(88),_t=ae*ae*ae%H,dt=_t*_t*ae%H,St=L(dt,s)*dt%H,Ot=L(St,s)*dt%H,Mt=L(Ot,i)*_t%H,or=L(Mt,pe)*Mt%H,rr=L(or,Se)*or%H,wr=L(rr,Xe)*rr%H,Hr=L(wr,Je)*wr%H,An=L(Hr,Xe)*rr%H,Vn=L(An,s)*dt%H,ai=L(Vn,Ce)*or%H,kr=L(ai,$)*_t%H,va=L(kr,i);if(va*va%H!==ae)throw new Error("Cannot find square root");return va}function ue(ae,H=c.P){if(ae===t||H<=t)throw new Error(`invert: expected positive integers, got n=${ae} mod=${H}`);let $=B(ae,H),pe=H,Se=t,Ce=n;for(;$!==t;){const Je=pe/$,_t=pe%$,dt=Se-Ce*Je;pe=$,$=_t,Se=Ce,Ce=dt}if(pe!==n)throw new Error("invert: does not exist");return B(Se,H)}function Oe(ae,H=c.P){const $=new Array(ae.length),pe=ae.reduce((Ce,Xe,Je)=>Xe===t?Ce:($[Je]=Ce,B(Ce*Xe,H)),n),Se=ue(pe,H);return ae.reduceRight((Ce,Xe,Je)=>Xe===t?Ce:($[Je]=B(Ce*$[Je],H),B(Ce*Xe,H)),Se),$}function Te(ae){const H=ae.length*8-h*8,$=X(ae);return H>0?$>>BigInt(H):$}function Be(ae,H=!1){const $=Te(ae);if(H)return $;const{n:pe}=c;return $>=pe?$-pe:$}let je,ce;class fe{constructor(H,$){if(this.hashLen=H,this.qByteLen=$,typeof H!="number"||H<2)throw new Error("hashLen must be a number");if(typeof $!="number"||$<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(H).fill(1),this.k=new Uint8Array(H).fill(0),this.counter=0}hmac(...H){return e.utils.hmacSha256(this.k,...H)}hmacSync(...H){return ce(this.k,...H)}checkSync(){if(typeof ce!="function")throw new R("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(H=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),H),this.v=await this.hmac(this.v),H.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),H),this.v=await this.hmac(this.v))}reseedSync(H=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),H),this.v=this.hmacSync(this.v),H.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),H),this.v=this.hmacSync(this.v))}async generate(){this.incr();let H=0;const $=[];for(;H<this.qByteLen;){this.v=await this.hmac(this.v);const pe=this.v.slice();$.push(pe),H+=this.v.length}return ne(...$)}generateSync(){this.checkSync(),this.incr();let H=0;const $=[];for(;H<this.qByteLen;){this.v=this.hmacSync(this.v);const pe=this.v.slice();$.push(pe),H+=this.v.length}return ne(...$)}}function Pe(ae){return t<ae&&ae<c.n}function De(ae){return t<ae&&ae<c.P}function Ge(ae,H,$,pe=!0){const{n:Se}=c,Ce=Be(ae,!0);if(!Pe(Ce))return;const Xe=ue(Ce,Se),Je=S.BASE.multiply(Ce),_t=B(Je.x,Se);if(_t===t)return;const dt=B(Xe*B(H+$*_t,Se),Se);if(dt===t)return;let St=new Q(_t,dt),Ot=(Je.x===St.r?0:2)|Number(Je.y&n);return pe&&St.hasHighS()&&(St=St.normalizeS(),Ot^=1),{sig:St,recovery:Ot}}function Le(ae){let H;if(typeof ae=="bigint")H=ae;else if(typeof ae=="number"&&Number.isSafeInteger(ae)&&ae>0)H=BigInt(ae);else if(typeof ae=="string"){if(ae.length!==2*h)throw new Error("Expected 32 bytes of private key");H=ye(ae)}else if(ae instanceof Uint8Array){if(ae.length!==h)throw new Error("Expected 32 bytes of private key");H=X(ae)}else throw new TypeError("Expected valid private key");if(!Pe(H))throw new Error("Expected private key: 0 < key < n");return H}function Rt(ae){return ae instanceof S?(ae.assertValidity(),ae):S.fromHex(ae)}function Dt(ae){if(ae instanceof Q)return ae.assertValidity(),ae;try{return Q.fromDER(ae)}catch{return Q.fromCompact(ae)}}function Gt(ae,H=!1){return S.fromPrivateKey(ae).toRawBytes(H)}e.getPublicKey=Gt;function It(ae,H,$,pe=!1){return S.fromSignature(ae,H,$).toRawBytes(pe)}e.recoverPublicKey=It;function Fe(ae){const H=ae instanceof Uint8Array,$=typeof ae=="string",pe=(H||$)&&ae.length;return H?pe===T||pe===C:$?pe===T*2||pe===C*2:ae instanceof S}function pt(ae,H,$=!1){if(Fe(ae))throw new TypeError("getSharedSecret: first arg must be private key");if(!Fe(H))throw new TypeError("getSharedSecret: second arg must be public key");const pe=Rt(H);return pe.assertValidity(),pe.multiply(Le(ae)).toRawBytes($)}e.getSharedSecret=pt;function Qe(ae){const H=ae.length>m?ae.slice(0,m):ae;return X(H)}function qt(ae){const H=Qe(ae),$=B(H,c.n);return Kt($<t?H:$)}function Kt(ae){return Re(ae)}function tr(ae,H,$){if(ae==null)throw new Error(`sign: expected valid message hash, not "${ae}"`);const pe=j(ae),Se=Le(H),Ce=[Kt(Se),qt(pe)];if($!=null){$===!0&&($=e.utils.randomBytes(m));const _t=j($);if(_t.length!==m)throw new Error(`sign: Expected ${m} bytes of extra data`);Ce.push(_t)}const Xe=ne(...Ce),Je=Qe(pe);return{seed:Xe,m:Je,d:Se}}function jr(ae,H){const{sig:$,recovery:pe}=ae,{der:Se,recovered:Ce}=Object.assign({canonical:!0,der:!0},H),Xe=Se?$.toDERRawBytes():$.toCompactRawBytes();return Ce?[Xe,pe]:Xe}async function fr(ae,H,$={}){const{seed:pe,m:Se,d:Ce}=tr(ae,H,$.extraEntropy),Xe=new fe(_,h);await Xe.reseed(pe);let Je;for(;!(Je=Ge(await Xe.generate(),Se,Ce,$.canonical));)await Xe.reseed();return jr(Je,$)}e.sign=fr;function mn(ae,H,$={}){const{seed:pe,m:Se,d:Ce}=tr(ae,H,$.extraEntropy),Xe=new fe(_,h);Xe.reseedSync(pe);let Je;for(;!(Je=Ge(Xe.generateSync(),Se,Ce,$.canonical));)Xe.reseedSync();return jr(Je,$)}e.signSync=mn;const Lr={strict:!0};function Sn(ae,H,$,pe=Lr){let Se;try{Se=Dt(ae),H=j(H)}catch{return!1}const{r:Ce,s:Xe}=Se;if(pe.strict&&Se.hasHighS())return!1;const Je=Be(H);let _t;try{_t=Rt($)}catch{return!1}const{n:dt}=c,St=ue(Xe,dt),Ot=B(Je*St,dt),Mt=B(Ce*St,dt),or=S.BASE.multiplyAndAddUnsafe(_t,Ot,Mt);return or?B(or.x,dt)===Ce:!1}e.verify=Sn;function rn(ae){return B(X(ae),c.n)}class Tn{constructor(H,$){this.r=H,this.s=$,this.assertValidity()}static fromHex(H){const $=j(H);if($.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${$.length}`);const pe=X($.subarray(0,32)),Se=X($.subarray(32,64));return new Tn(pe,Se)}assertValidity(){const{r:H,s:$}=this;if(!De(H)||!Pe($))throw new Error("Invalid signature")}toHex(){return Ae(this.r)+Ae(this.s)}toRawBytes(){return le(this.toHex())}}function nn(ae){return S.fromPrivateKey(ae).toRawX()}class ni{constructor(H,$,pe=e.utils.randomBytes()){if(H==null)throw new TypeError(`sign: Expected valid message, not "${H}"`);this.m=j(H);const{x:Se,scalar:Ce}=this.getScalar(Le($));if(this.px=Se,this.d=Ce,this.rand=j(pe),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(H){const $=S.fromPrivateKey(H),pe=$.hasEvenY()?H:c.n-H;return{point:$,scalar:pe,x:$.toRawX()}}initNonce(H,$){return Re(H^X($))}finalizeNonce(H){const $=B(X(H),c.n);if($===t)throw new Error("sign: Creation of signature failed. k is zero");const{point:pe,x:Se,scalar:Ce}=this.getScalar($);return{R:pe,rx:Se,k:Ce}}finalizeSig(H,$,pe,Se){return new Tn(H.x,B($+pe*Se,c.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:H,d:$,px:pe,rand:Se}=this,Ce=e.utils.taggedHash,Xe=this.initNonce($,await Ce(Qr.aux,Se)),{R:Je,rx:_t,k:dt}=this.finalizeNonce(await Ce(Qr.nonce,Xe,pe,H)),St=rn(await Ce(Qr.challenge,_t,pe,H)),Ot=this.finalizeSig(Je,dt,St,$);return await Da(Ot,H,pe)||this.error(),Ot}calcSync(){const{m:H,d:$,px:pe,rand:Se}=this,Ce=e.utils.taggedHashSync,Xe=this.initNonce($,Ce(Qr.aux,Se)),{R:Je,rx:_t,k:dt}=this.finalizeNonce(Ce(Qr.nonce,Xe,pe,H)),St=rn(Ce(Qr.challenge,_t,pe,H)),Ot=this.finalizeSig(Je,dt,St,$);return Dr(Ot,H,pe)||this.error(),Ot}}async function Pn(ae,H,$){return new ni(ae,H,$).calc()}function ja(ae,H,$){return new ni(ae,H,$).calcSync()}function La(ae,H,$){const pe=ae instanceof Tn,Se=pe?ae:Tn.fromHex(ae);return pe&&Se.assertValidity(),{...Se,m:j(H),P:Rt($)}}function _a(ae,H,$,pe){const Se=S.BASE.multiplyAndAddUnsafe(H,Le($),B(-pe,c.n));return!(!Se||!Se.hasEvenY()||Se.x!==ae)}async function Da(ae,H,$){try{const{r:pe,s:Se,m:Ce,P:Xe}=La(ae,H,$),Je=rn(await e.utils.taggedHash(Qr.challenge,Re(pe),Xe.toRawX(),Ce));return _a(pe,Xe,Se,Je)}catch{return!1}}function Dr(ae,H,$){try{const{r:pe,s:Se,m:Ce,P:Xe}=La(ae,H,$),Je=rn(e.utils.taggedHashSync(Qr.challenge,Re(pe),Xe.toRawX(),Ce));return _a(pe,Xe,Se,Je)}catch(pe){if(pe instanceof R)throw pe;return!1}}e.schnorr={Signature:Tn,getPublicKey:nn,sign:Pn,verify:Da,signSync:ja,verifySync:Dr},S.BASE._setWindowSize(8);const Ct={node:a,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},Qr={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},an={};e.utils={bytesToHex:be,hexToBytes:le,concatBytes:ne,mod:B,invert:ue,isValidPrivateKey(ae){try{return Le(ae),!0}catch{return!1}},_bigintTo32Bytes:Re,_normalizePrivateKey:Le,hashToPrivateKey:ae=>{ae=j(ae);const H=h+8;if(ae.length<H||ae.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const $=B(X(ae),c.n-n)+n;return Re($)},randomBytes:(ae=32)=>{if(Ct.web)return Ct.web.getRandomValues(new Uint8Array(ae));if(Ct.node){const{randomBytes:H}=Ct.node;return Uint8Array.from(H(ae))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(h+8)),precompute(ae=8,H=S.BASE){const $=H===S.BASE?H:new S(H.x,H.y);return $._setWindowSize(ae),$.multiply(s),$},sha256:async(...ae)=>{if(Ct.web){const H=await Ct.web.subtle.digest("SHA-256",ne(...ae));return new Uint8Array(H)}else if(Ct.node){const{createHash:H}=Ct.node,$=H("sha256");return ae.forEach(pe=>$.update(pe)),Uint8Array.from($.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(ae,...H)=>{if(Ct.web){const $=await Ct.web.subtle.importKey("raw",ae,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),pe=ne(...H),Se=await Ct.web.subtle.sign("HMAC",$,pe);return new Uint8Array(Se)}else if(Ct.node){const{createHmac:$}=Ct.node,pe=$("sha256",ae);return H.forEach(Se=>pe.update(Se)),Uint8Array.from(pe.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(ae,...H)=>{let $=an[ae];if($===void 0){const pe=await e.utils.sha256(Uint8Array.from(ae,Se=>Se.charCodeAt(0)));$=ne(pe,pe),an[ae]=$}return e.utils.sha256($,...H)},taggedHashSync:(ae,...H)=>{if(typeof je!="function")throw new R("sha256Sync is undefined, you need to set it");let $=an[ae];if($===void 0){const pe=je(Uint8Array.from(ae,Se=>Se.charCodeAt(0)));$=ne(pe,pe),an[ae]=$}return je($,...H)},_JacobianPoint:I},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get(){return je},set(ae){je||(je=ae)}},hmacSha256Sync:{configurable:!1,get(){return ce},set(ae){ce||(ce=ae)}}})})(Iv)),Iv}var gC;function DE(){return gC||(gC=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 a=IV(),t=Xj(),n=yC();var i=yC();Object.defineProperty(e,"getPublicKey",{enumerable:!0,get:function(){return i.getPublicKey}}),Object.defineProperty(e,"sign",{enumerable:!0,get:function(){return i.sign}}),Object.defineProperty(e,"signSync",{enumerable:!0,get:function(){return i.signSync}}),Object.defineProperty(e,"verify",{enumerable:!0,get:function(){return i.verify}}),Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return i.recoverPublicKey}}),Object.defineProperty(e,"getSharedSecret",{enumerable:!0,get:function(){return i.getSharedSecret}}),Object.defineProperty(e,"utils",{enumerable:!0,get:function(){return i.utils}}),Object.defineProperty(e,"CURVE",{enumerable:!0,get:function(){return i.CURVE}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return i.Point}}),Object.defineProperty(e,"Signature",{enumerable:!0,get:function(){return i.Signature}}),Object.defineProperty(e,"schnorr",{enumerable:!0,get:function(){return i.schnorr}}),n.utils.hmacSha256Sync=(s,...u)=>{const c=a.hmac.create(t.sha256,s);return u.forEach(f=>c.update(f)),c.digest()}})(Pv)),Pv}var wt={};function _C(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 hl={exports:{}},vC=hl.exports,EC;function Jj(){return EC||(EC=1,(function(e,a){var t=vC&&vC.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(a,"__esModule",{value:!0}),a.crypto=a.wrapHash=a.equalsBytes=a.hexToBytes=a.bytesToUtf8=a.utf8ToBytes=a.createView=a.concatBytes=a.toHex=a.bytesToHex=a.assertBytes=a.assertBool=void 0;const n=t(LE()),i=vl(),s=n.default.bool;a.assertBool=s;const u=n.default.bytes;a.assertBytes=u;var c=vl();Object.defineProperty(a,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(a,"toHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(a,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(a,"createView",{enumerable:!0,get:function(){return c.createView}}),Object.defineProperty(a,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}});function f(_){if(!(_ instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof _}`);return new TextDecoder().decode(_)}a.bytesToUtf8=f;function p(_){const T=_.startsWith("0x")?_.substring(2):_;return(0,i.hexToBytes)(T)}a.hexToBytes=p;function m(_,T){if(_.length!==T.length)return!1;for(let C=0;C<_.length;C++)if(_[C]!==T[C])return!1;return!0}a.equalsBytes=m;function h(_){return T=>(n.default.bytes(T),_(T))}a.wrapHash=h,a.crypto=(()=>{const _=typeof self=="object"&&"crypto"in self?self.crypto:void 0,T=typeof _C=="function"&&_C.bind(e);return{node:T&&!_?T("crypto"):void 0,web:_}})()})(hl,hl.exports)),hl.exports}var bC;function jV(){if(bC)return wt;bC=1;var e=wt&&wt.__createBinding||(Object.create?(function(le,X,j,F){F===void 0&&(F=j);var B=Object.getOwnPropertyDescriptor(X,j);(!B||("get"in B?!X.__esModule:B.writable||B.configurable))&&(B={enumerable:!0,get:function(){return X[j]}}),Object.defineProperty(le,F,B)}):(function(le,X,j,F){F===void 0&&(F=j),le[F]=X[j]})),a=wt&&wt.__setModuleDefault||(Object.create?(function(le,X){Object.defineProperty(le,"default",{enumerable:!0,value:X})}):function(le,X){le.default=X}),t=wt&&wt.__importStar||function(le){if(le&&le.__esModule)return le;var X={};if(le!=null)for(var j in le)j!=="default"&&Object.prototype.hasOwnProperty.call(le,j)&&e(X,le,j);return a(X,le),X};Object.defineProperty(wt,"__esModule",{value:!0}),wt.contextRandomize=wt.ecdh=wt.signatureNormalize=wt.signatureImport=wt.signatureExport=wt.privateKeyTweakMul=wt.publicKeyTweakMul=wt.publicKeyTweakAdd=wt.publicKeyCombine=wt.publicKeyNegate=wt.privateKeyNegate=wt.privateKeyTweakAdd=wt.ecdsaVerify=wt.ecdsaRecover=wt.ecdsaSign=wt.publicKeyConvert=wt.publicKeyVerify=wt.publicKeyCreate=wt.privateKeyVerify=wt.createPrivateKey=wt.createPrivateKeySync=void 0;const n=Xj(),i=t(DE()),s=Jj();function u(le){if(typeof le!="string")throw new TypeError("hexToNumber: expected string, got "+typeof le);return BigInt(`0x${le}`)}const c=le=>u((0,s.toHex)(le)),f=le=>le.toString(16).padStart(64,"0"),p=le=>(0,s.hexToBytes)(f(le)),{mod:m}=i.utils,h=i.CURVE.n;function _(le=F=>new Uint8Array(F),X,j){return typeof le=="function"&&(le=le(X)),(0,s.assertBytes)(le,X),j&&le.set(j),le}function T(le){return(0,s.assertBytes)(le,64),i.Signature.fromCompact(le)}function C(){return i.utils.randomPrivateKey()}wt.createPrivateKeySync=C;async function O(){return C()}wt.createPrivateKey=O;function E(le){return(0,s.assertBytes)(le,32),i.utils.isValidPrivateKey(le)}wt.privateKeyVerify=E;function R(le,X=!0,j){(0,s.assertBytes)(le,32),(0,s.assertBool)(X);const F=i.getPublicKey(le,X);return _(j,X?33:65,F)}wt.publicKeyCreate=R;function v(le){(0,s.assertBytes)(le,33,65);try{return i.Point.fromHex(le),!0}catch{return!1}}wt.publicKeyVerify=v;function I(le,X=!0,j){(0,s.assertBytes)(le,33,65),(0,s.assertBool)(X);const F=i.Point.fromHex(le).toRawBytes(X);return _(j,X?33:65,F)}wt.publicKeyConvert=I;function A(le,X,j={noncefn:void 0,data:void 0},F){if((0,s.assertBytes)(le,32),(0,s.assertBytes)(X,32),typeof j!="object"||j===null)throw new TypeError("secp256k1.ecdsaSign: options should be object");if(j&&(j.noncefn!==void 0||j.data!==void 0))throw new Error("Secp256k1: noncefn && data is unsupported");const[B,L]=i.signSync(le,X,{recovered:!0,der:!1});return{signature:_(F,64,B),recid:L}}wt.ecdsaSign=A;function y(le,X,j,F=!0,B){(0,s.assertBytes)(j,32),(0,s.assertBool)(F);const L=T(le).toHex(),K=i.Point.fromSignature(j,L,X);return _(B,F?33:65,K.toRawBytes(F))}wt.ecdsaRecover=y;function S(le,X,j){(0,s.assertBytes)(le,64),(0,s.assertBytes)(X,32),(0,s.assertBytes)(j,33,65),(0,s.assertBytes)(le,64);const F=c(le.slice(0,32)),B=c(le.slice(32,64));if(F>=h||B>=h)throw new Error("Cannot parse signature");const L=i.Point.fromHex(j);let K;try{K=T(le)}catch{return!1}return i.verify(K,X,L)}wt.ecdsaVerify=S;function M(le,X){(0,s.assertBytes)(le,32),(0,s.assertBytes)(X,32);let j=c(X);if(j===0n)throw new Error("Tweak must not be zero");if(j>=h)throw new Error("Tweak bigger than curve order");if(j+=c(le),j>=h&&(j-=h),j===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return le.set((0,s.hexToBytes)(f(j))),le}wt.privateKeyTweakAdd=M;function U(le){(0,s.assertBytes)(le,32);const X=m(-c(le),h);return le.set((0,s.hexToBytes)(f(X))),le}wt.privateKeyNegate=U;function V(le,X=!0,j){(0,s.assertBytes)(le,33,65),(0,s.assertBool)(X);const F=i.Point.fromHex(le).negate();return _(j,X?33:65,F.toRawBytes(X))}wt.publicKeyNegate=V;function Q(le,X=!0,j){if(!Array.isArray(le)||!le.length)throw new TypeError(`Expected array with one or more items, not ${le}`);for(const B of le)(0,s.assertBytes)(B,33,65);(0,s.assertBool)(X);const F=le.map(B=>i.Point.fromHex(B)).reduce((B,L)=>B.add(L),i.Point.ZERO);if(F.equals(i.Point.ZERO))throw new Error("Combined result must not be zero");return _(j,X?33:65,F.toRawBytes(X))}wt.publicKeyCombine=Q;function ne(le,X,j=!0,F){(0,s.assertBytes)(le,33,65),(0,s.assertBytes)(X,32),(0,s.assertBool)(j);const B=i.Point.fromHex(le),L=i.Point.fromPrivateKey(X),K=B.add(L);if(L.equals(i.Point.ZERO)||K.equals(i.Point.ZERO))throw new Error("Tweak must not be zero");return _(F,j?33:65,K.toRawBytes(j))}wt.publicKeyTweakAdd=ne;function me(le,X,j=!0,F){(0,s.assertBytes)(le,33,65),(0,s.assertBytes)(X,32),(0,s.assertBool)(j);const B=c(X);if(B===0n)throw new Error("Tweak must not be zero");if(B<=1||B>=h)throw new Error("Tweak is zero or bigger than curve order");const L=i.Point.fromHex(le).multiply(B);return _(F,j?33:65,L.toRawBytes(j))}wt.publicKeyTweakMul=me;function be(le,X){(0,s.assertBytes)(le,32),(0,s.assertBytes)(X,32);const j=c(X);if(j<=1||j>=h)throw new Error("Tweak is zero or bigger than curve order");const F=m(j*c(le),h);if(F===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return le.set((0,s.hexToBytes)(f(F))),le}wt.privateKeyTweakMul=be;function Ne(le,X){const j=T(le).toRawBytes();return _(X,72,T(le).toRawBytes()).slice(0,j.length)}wt.signatureExport=Ne;function Ae(le,X){(0,s.assertBytes)(le);const j=i.Signature.fromDER(le);return _(X,64,(0,s.hexToBytes)(j.toCompactHex()))}wt.signatureImport=Ae;function Re(le){const X=T(le);return X.s>h/2n&&le.set(p(h-X.s),32),le}wt.signatureNormalize=Re;function Me(le,X,j={},F){if((0,s.assertBytes)(le,33,65),(0,s.assertBytes)(X,32),typeof j!="object"||j===null)throw new TypeError("secp256k1.ecdh: options should be object");j.data!==void 0&&(0,s.assertBytes)(j.data);const B=i.Point.fromHex(i.getSharedSecret(X,le));if(j.hashfn===void 0)return _(F,32,(0,n.sha256)(B.toRawBytes(!0)));if(typeof j.hashfn!="function")throw new TypeError("secp256k1.ecdh: options.hashfn should be function");j.xbuf!==void 0&&(0,s.assertBytes)(j.xbuf,32),j.ybuf!==void 0&&(0,s.assertBytes)(j.ybuf,32),(0,s.assertBytes)(F,32);const L=j.xbuf||new Uint8Array(32);L.set(p(B.x));const K=j.ybuf||new Uint8Array(32);K.set(p(B.y));const ue=j.hashfn(L,K,j.data);if(!(ue instanceof Uint8Array)||ue.length!==32)throw new Error("secp256k1.ecdh: invalid options.hashfn output");return _(F,32,ue)}wt.ecdh=Me;function ye(le){le!==null&&(0,s.assertBytes)(le,32)}return wt.contextRandomize=ye,wt}var wC;function Qj(){if(wC)return Vr;wC=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.createUnsafeIdentity=Vr.computeAddress=Vr.ethSign=Vr.createEthereumMessageHash=Vr.sign=Vr.recoverAddressFromEthSignature=Vr.recoverPublicKey=void 0;const e=gf(),a=DE(),t=jV();function n(h,_){if(h.length!==65)throw new Error("Invalid signature length"+h.length);const T=h.slice(0,h.length-1),C=h[64]===28?1:0;return(0,t.ecdsaRecover)(T,C,_,!1).slice(1)}Vr.recoverPublicKey=n;function i(h){if(h.length!==65)throw new Error("Invalid ethereum signature");const _=h[64];if(_===0||_===1){const T=new Uint8Array(h);return T[64]=_+27,T}return h}function s(h,_){if(typeof h=="string"){if((0,e.isHex)(h))return s((0,e.hexToBytes)(h),_);throw new Error("String signatures must be encoded in hex")}return p(n(i(h),c(_)))}Vr.recoverAddressFromEthSignature=s;function u(h,_){const T=(0,t.ecdsaSign)(_,h),C=T.recid===1?"1c":"1b";return(0,e.toHex)(T.signature)+C}Vr.sign=u;function c(h){const _=typeof h=="string"?(0,e.stringToUtf8Bytes)(h):h,T=(0,e.concatBytes)((0,e.stringToUtf8Bytes)(`Ethereum Signed Message:
19
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h(v,I){if(v){if(typeof v=="string")return _(v,I);var A={}.toString.call(v).slice(8,-1);return A==="Object"&&v.constructor&&(A=v.constructor.name),A==="Map"||A==="Set"?Array.from(v):A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?_(v,I):void 0}}function _(v,I){(I==null||I>v.length)&&(I=v.length);for(var A=0,y=Array(I);A<I;A++)y[A]=v[A];return y}function T(v,I){var A=v==null?null:typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(A!=null){var y,S,M,U,V=[],Q=!0,ne=!1;try{if(M=(A=A.call(v)).next,I!==0)for(;!(Q=(y=M.call(A)).done)&&(V.push(y.value),V.length!==I);Q=!0);}catch(me){ne=!0,S=me}finally{try{if(!Q&&A.return!=null&&(U=A.return(),Object(U)!==U))return}finally{if(ne)throw S}}return V}}function C(v){if(Array.isArray(v))return v}var O={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},E=/^\[([^\]]+)\](?::([0-9]+))?$/;function R(v,I){if((0,t.default)(v),!v||/[\s<>]/.test(v)||v.indexOf("mailto:")===0||(I=(0,c.default)(I,O),I.validate_length&&v.length>I.max_allowed_length)||!I.allow_fragments&&(0,i.default)(v,"#")||!I.allow_query_components&&((0,i.default)(v,"?")||(0,i.default)(v,"&")))return!1;var A,y,S,M,U,V,Q,ne;Q=v.split("#"),v=Q.shift(),Q=v.split("?"),v=Q.shift();var me=v.match(/^([a-z][a-z0-9+\-.]*):/i),be=!1,Ne=function(fe){return be=!0,A=fe.toLowerCase(),I.require_valid_protocol&&I.protocols.indexOf(A)===-1?!1:v.substring(me[0].length)};if(me){var Ae=me[1],Re=v.substring(me[0].length),Me=Re.slice(0,2)==="//";if(Me){if(v=Ne(Ae),v===!1)return!1}else{var ye=Re.indexOf("/"),le=ye===-1?Re:Re.substring(0,ye),X=le.indexOf("@");if(X!==-1){var j=le.substring(0,X),F=/^[a-zA-Z0-9\-_.%:]*$/,B=F.test(j),L=/%[0-9a-fA-F]{2}/.test(j);if(B&&!L){if(I.require_protocol)return!1}else if(v=Ne(Ae),v===!1)return!1}else{var K=/^[0-9]/.test(Re);if(K){if(I.require_protocol)return!1}else if(v=Ne(Ae),v===!1)return!1}}}else if(I.require_protocol)return!1;if(v.slice(0,2)==="//"){if(!be&&!I.allow_protocol_relative_urls)return!1;v=v.slice(2)}if(v==="")return!1;if(Q=v.split("/"),v=Q.shift(),v===""&&!I.require_host)return!0;if(Q=v.split("@"),Q.length>1){if(I.disallow_auth||Q[0]===""||(y=Q.shift(),y.indexOf(":")>=0&&y.split(":").length>2))return!1;var ue=y.split(":"),Oe=p(ue,2),Te=Oe[0],Be=Oe[1];if(Te===""&&Be==="")return!1}M=Q.join("@"),V=null,ne=null;var je=M.match(E);if(je?(S="",ne=je[1],V=je[2]||null):(Q=M.split(":"),S=Q.shift(),Q.length&&(V=Q.join(":"))),V!==null&&V.length>0){if(U=parseInt(V,10),!/^[0-9]+$/.test(V)||U<=0||U>65535)return!1}else if(I.require_port)return!1;return I.host_whitelist?(0,n.default)(S,I.host_whitelist):S===""&&!I.require_host?!0:!(!(0,u.default)(S)&&!(0,s.default)(S,I)&&(!ne||!(0,u.default)(ne,6))||(S=S||ne,I.host_blacklist&&(0,n.default)(S,I.host_blacklist)))}e.exports=a.default,e.exports.default=a.default})(Od,Od.exports)),Od.exports}var iy={},rO;function ZM(){return rO||(rO=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 a;(function(c){c.GET="get",c.STORE="store",c.CLEAR="clear",c.PING="ping"})(a||(e.Action=a={})),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(u(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 i(c,f){new Date(f.expiration).getTime()>Date.now()&&localStorage.setItem(u(c),JSON.stringify(f))}e.localStorageStoreIdentity=i;function s(c){localStorage.removeItem(u(c))}e.localStorageClearIdentity=s;function u(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()}`}})(iy)),iy}var nO;function _B(){if(nO)return ra;nO=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.clearIdentity=ra.storeIdentity=ra.getIdentity=ra.init=void 0;const e=gB(),a=ZM(),t=a.SINGLE_SIGN_ON_TARGET,n=500,i=5;let s=0,u="";const c={protocols:["https"],require_protocol:!0};function f(E,R={}){if(!(0,e.default)(E,{...c,...R}))throw new Error(`Invalid url: ${E}`);if(u)throw new Error("Already initialized");const v=document.createElement("iframe");v.id=t,v.src=E,v.style.width="0",v.style.height="0",v.style.border="none",v.style.position="absolute",document.body.appendChild(v),u=E}ra.init=f;async function p(E){let R;try{R=(await T(await _(),a.Action.GET,{user:E})).identity??null}catch(v){O(v),R=(0,a.localStorageGetIdentity)(E)}return R}ra.getIdentity=p;async function m(E,R){try{await T(await _(),a.Action.STORE,{user:E,identity:R})}catch(v){O(v),(0,a.localStorageStoreIdentity)(E,R)}}ra.storeIdentity=m;async function h(E){try{await T(await _(),a.Action.CLEAR,{user:E})}catch(R){O(R),(0,a.localStorageClearIdentity)(E)}}ra.clearIdentity=h;async function _(){if(!u)throw new Error("Not initialized");for(let E=0;E<i;E++){const v=document.getElementById(t)?.contentWindow;if(!v){await C(n);continue}try{await T(v,a.Action.PING,{},n)}catch{continue}return v}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function T(E,R,v,I=0){s++;const A=s;let y=null;const S=new Promise((M,U)=>{y=({data:V})=>{!V||V.target!==a.SINGLE_SIGN_ON_TARGET||V.id!==A||(V.error?U(new Error(V.error)):M(V))},window.addEventListener("message",y)});E.postMessage((0,a.createMessage)({id:A,action:R,...v}),u);try{return await(I?Promise.race([S,new Promise((M,U)=>setTimeout(()=>U(new Error("Did not receive a response in time")),I))]):S)}catch(M){throw M}finally{y&&window.removeEventListener("message",y)}}function C(E){return new Promise(R=>setTimeout(R,E))}function O(E){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",E.message)}return ra}var aO;function vB(){return aO||(aO=1,(function(e){var a=So&&So.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=So&&So.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(_B(),e),t(ZM(),e)})(So)),So}var Bv=vB(),oy={},na={},iO;function Ze(){if(iO)return na;iO=1;var e=na&&na.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(na,"__esModule",{value:!0}),na.validateType=na.generateLazyValidator=na.Ajv=void 0;const a=e(uf());na.Ajv=a.default;const t=e(nE()),n=e(aE());function i(u,c){let f=null;const p=(m,h)=>{if(!f){const _=new a.default({$data:!0,allErrors:!0});(0,t.default)(_),(0,n.default)(_,{singleError:!0}),c?.forEach(T=>_.addKeyword(T)),f=_.compile(u),Object.defineProperty(p,"errors",{get(){return f?.errors}})}return f(m,h)};return p}na.generateLazyValidator=i;function s(u,c){return u.validate(c)}return na.validateType=s,na}var sy={},oO;function xM(){return oO||(oO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const a=Ze(),t=Fn();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 i(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=i,(function(s){s.schema={type:"string",enum:Object.values(s)},s.validate=(0,a.generateLazyValidator)(s.schema)})(n=e.ChainName||(e.ChainName={}))})(sy)),sy}var uy={},sO;function ma(){return sO||(sO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(uy)),uy}var uO;function Fn(){return uO||(uO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const a=Ze(),t=xM(),n=ma();var i;(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"})(i=e.ChainId||(e.ChainId={}));function s(p){switch(p){case i.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;case i.MATIC_AMOY:return t.ChainName.MATIC_AMOY;case i.BSC_MAINNET:return t.ChainName.BINANCE_MAINNET;case i.ARBITRUM_MAINNET:return t.ChainName.ARBITRUM_MAINNET;case i.OPTIMISM_MAINNET:return t.ChainName.OPTIMISM_MAINNET;case i.FANTOM_MAINNET:return t.ChainName.FANTOM_MAINNET;case i.AVALANCHE_MAINNET:return t.ChainName.AVALANCHE_MAINNET;default:return null}}e.getChainName=s;function u(p){switch(p){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai";case i.MATIC_AMOY:return"amoy";default:return""}}e.getURNProtocol=u;function c(p){const m={[n.Network.BSC]:i.BSC_MAINNET,[n.Network.OPTIMISM]:i.OPTIMISM_MAINNET,[n.Network.ARBITRUM]:i.ARBITRUM_MAINNET,[n.Network.FANTOM]:i.FANTOM_MAINNET,[n.Network.AVALANCHE]:i.AVALANCHE_MAINNET};switch(p){case i.ETHEREUM_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},m);case i.ETHEREUM_ROPSTEN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[n.Network.MATIC]:i.MATIC_MUMBAI},m);case i.ETHEREUM_RINKEBY:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[n.Network.MATIC]:i.MATIC_MUMBAI},m);case i.ETHEREUM_GOERLI:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[n.Network.MATIC]:i.MATIC_MUMBAI},m);case i.ETHEREUM_KOVAN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[n.Network.MATIC]:i.MATIC_MUMBAI},m);case i.ETHEREUM_SEPOLIA:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[n.Network.MATIC]:i.MATIC_AMOY},m);case i.MATIC_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},m);case i.MATIC_MUMBAI:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MUMBAI,[n.Network.MATIC]:i.MATIC_MUMBAI},m);case i.MATIC_AMOY:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_AMOY,[n.Network.MATIC]:i.MATIC_AMOY},m);default:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},m)}}e.getNetworkMapping=c;function f(p){switch(p){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:case i.MATIC_AMOY:return n.Network.MATIC;case i.BSC_MAINNET:return n.Network.BSC;case i.OPTIMISM_MAINNET:return n.Network.OPTIMISM;case i.ARBITRUM_MAINNET:return n.Network.ARBITRUM;case i.FANTOM_MAINNET:return n.Network.FANTOM;case i.AVALANCHE_MAINNET:return n.Network.AVALANCHE}}e.getNetwork=f,(function(p){p.schema={type:"number",enum:Object.values(p)},p.validate=(0,a.generateLazyValidator)(p.schema)})(i=e.ChainId||(e.ChainId={}))})(oy)),oy}var At=Fn(),ly={},lO;function $M(){return lO||(lO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})(ly)),ly}var Ft=$M(),Za;(function(e){e.Update="Web3ReactUpdate",e.Error="Web3ReactError",e.Deactivate="Web3ReactDeactivate"})(Za||(Za={}));var Ld={exports:{}},cO;function EB(){if(cO)return Ld.exports;cO=1;var e=typeof Reflect=="object"?Reflect:null,a=e&&typeof e.apply=="function"?e.apply:function(y,S,M){return Function.prototype.apply.call(y,S,M)},t;e&&typeof e.ownKeys=="function"?t=e.ownKeys:Object.getOwnPropertySymbols?t=function(y){return Object.getOwnPropertyNames(y).concat(Object.getOwnPropertySymbols(y))}:t=function(y){return Object.getOwnPropertyNames(y)};function n(A){console&&console.warn&&console.warn(A)}var i=Number.isNaN||function(y){return y!==y};function s(){s.init.call(this)}Ld.exports=s,Ld.exports.once=R,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(A){if(typeof A!="number"||A<0||i(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");u=A}}),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(y){if(typeof y!="number"||y<0||i(y))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+y+".");return this._maxListeners=y,this};function f(A){return A._maxListeners===void 0?s.defaultMaxListeners:A._maxListeners}s.prototype.getMaxListeners=function(){return f(this)},s.prototype.emit=function(y){for(var S=[],M=1;M<arguments.length;M++)S.push(arguments[M]);var U=y==="error",V=this._events;if(V!==void 0)U=U&&V.error===void 0;else if(!U)return!1;if(U){var Q;if(S.length>0&&(Q=S[0]),Q instanceof Error)throw Q;var ne=new Error("Unhandled error."+(Q?" ("+Q.message+")":""));throw ne.context=Q,ne}var me=V[y];if(me===void 0)return!1;if(typeof me=="function")a(me,this,S);else for(var be=me.length,Ne=C(me,be),M=0;M<be;++M)a(Ne[M],this,S);return!0};function p(A,y,S,M){var U,V,Q;if(c(S),V=A._events,V===void 0?(V=A._events=Object.create(null),A._eventsCount=0):(V.newListener!==void 0&&(A.emit("newListener",y,S.listener?S.listener:S),V=A._events),Q=V[y]),Q===void 0)Q=V[y]=S,++A._eventsCount;else if(typeof Q=="function"?Q=V[y]=M?[S,Q]:[Q,S]:M?Q.unshift(S):Q.push(S),U=f(A),U>0&&Q.length>U&&!Q.warned){Q.warned=!0;var ne=new Error("Possible EventEmitter memory leak detected. "+Q.length+" "+String(y)+" listeners added. Use emitter.setMaxListeners() to increase limit");ne.name="MaxListenersExceededWarning",ne.emitter=A,ne.type=y,ne.count=Q.length,n(ne)}return A}s.prototype.addListener=function(y,S){return p(this,y,S,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(y,S){return p(this,y,S,!0)};function m(){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(A,y,S){var M={fired:!1,wrapFn:void 0,target:A,type:y,listener:S},U=m.bind(M);return U.listener=S,M.wrapFn=U,U}s.prototype.once=function(y,S){return c(S),this.on(y,h(this,y,S)),this},s.prototype.prependOnceListener=function(y,S){return c(S),this.prependListener(y,h(this,y,S)),this},s.prototype.removeListener=function(y,S){var M,U,V,Q,ne;if(c(S),U=this._events,U===void 0)return this;if(M=U[y],M===void 0)return this;if(M===S||M.listener===S)--this._eventsCount===0?this._events=Object.create(null):(delete U[y],U.removeListener&&this.emit("removeListener",y,M.listener||S));else if(typeof M!="function"){for(V=-1,Q=M.length-1;Q>=0;Q--)if(M[Q]===S||M[Q].listener===S){ne=M[Q].listener,V=Q;break}if(V<0)return this;V===0?M.shift():O(M,V),M.length===1&&(U[y]=M[0]),U.removeListener!==void 0&&this.emit("removeListener",y,ne||S)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(y){var S,M,U;if(M=this._events,M===void 0)return this;if(M.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):M[y]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete M[y]),this;if(arguments.length===0){var V=Object.keys(M),Q;for(U=0;U<V.length;++U)Q=V[U],Q!=="removeListener"&&this.removeAllListeners(Q);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(S=M[y],typeof S=="function")this.removeListener(y,S);else if(S!==void 0)for(U=S.length-1;U>=0;U--)this.removeListener(y,S[U]);return this};function _(A,y,S){var M=A._events;if(M===void 0)return[];var U=M[y];return U===void 0?[]:typeof U=="function"?S?[U.listener||U]:[U]:S?E(U):C(U,U.length)}s.prototype.listeners=function(y){return _(this,y,!0)},s.prototype.rawListeners=function(y){return _(this,y,!1)},s.listenerCount=function(A,y){return typeof A.listenerCount=="function"?A.listenerCount(y):T.call(A,y)},s.prototype.listenerCount=T;function T(A){var y=this._events;if(y!==void 0){var S=y[A];if(typeof S=="function")return 1;if(S!==void 0)return S.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function C(A,y){for(var S=new Array(y),M=0;M<y;++M)S[M]=A[M];return S}function O(A,y){for(;y+1<A.length;y++)A[y]=A[y+1];A.pop()}function E(A){for(var y=new Array(A.length),S=0;S<y.length;++S)y[S]=A[S].listener||A[S];return y}function R(A,y){return new Promise(function(S,M){function U(Q){A.removeListener(y,V),M(Q)}function V(){typeof A.removeListener=="function"&&A.removeListener("error",U),S([].slice.call(arguments))}I(A,y,V,{once:!0}),y!=="error"&&v(A,U,{once:!0})})}function v(A,y,S){typeof A.on=="function"&&I(A,"error",y,S)}function I(A,y,S,M){if(typeof A.on=="function")M.once?A.once(y,S):A.on(y,S);else if(typeof A.addEventListener=="function")A.addEventListener(y,function U(V){M.once&&A.removeEventListener(y,U),S(V)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof A)}return Ld.exports}var ej=EB();const SW=fD(ej);function bB(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,e.__proto__=a}var Qs=(function(e){bB(a,e);function a(n){var i,s=n===void 0?{}:n,u=s.supportedChainIds;return i=e.call(this)||this,i.supportedChainIds=u,i}var t=a.prototype;return t.emitUpdate=function(i){this.emit(Za.Update,i)},t.emitError=function(i){this.emit(Za.Error,i)},t.emitDeactivate=function(){this.emit(Za.Deactivate)},a})(ej.EventEmitter);const wB="modulepreload",SB=function(e){return"https://cdn.decentraland.org/@dcl-regenesislabs/mobile-hub/1.0.2-23717828674.commit-8d84b10/"+e},dO={},gl=function(a,t,n){let i=Promise.resolve();if(t&&t.length>0){let f=function(p){return Promise.all(p.map(m=>Promise.resolve(m).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),c=u?.nonce||u?.getAttribute("nonce");i=f(t.map(p=>{if(p=SB(p),p in dO)return;dO[p]=!0;const m=p.endsWith(".css"),h=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${h}`))return;const _=document.createElement("link");if(_.rel=m?"stylesheet":wB,m||(_.as="script"),_.crossOrigin="",_.href=p,c&&_.setAttribute("nonce",c),document.head.appendChild(_),m)return new Promise((T,C)=>{_.addEventListener("load",T),_.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${p}`)))})}))}function s(u){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=u,window.dispatchEvent(c),!c.defaultPrevented)throw u}return i.then(u=>{for(const c of u||[])c.status==="rejected"&&s(c.reason);return a().catch(s)})};var aa={},To={},Po={},cy={},fO;function TB(){return fO||(fO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const a=Ze();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,a.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(cy)),cy}var dy={},pO;function PB(){return pO||(pO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const a=Ze();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})(dy)),dy}var hO;function AB(){return hO||(hO=1,(function(e){var a=Po&&Po.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Po&&Po.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(TB(),e),t(PB(),e)})(Po)),Po}var Ao={},fy={},mO;function OB(){return mO||(mO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(fy)),fy}var py={},hy={},yO;function pf(){return yO||(yO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const a=Ze();(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,a.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},i={[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 u(m){return n[m]}t.getMaxSupply=u;function c(m){return s[m]}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(m){return[i[m],s[m]]}t.getGradient=p})(e.Rarity||(e.Rarity={}))})(hy)),hy}var my={},gO;function xo(){return gO||(gO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(my)),my}var yy={},gy={},_O;function mE(){return _O||(_O=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(gy)),gy}var _y={},vy={},vO;function tj(){return vO||(vO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(vy)),vy}var EO;function yE(){return EO||(EO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const a=xo(),t=Ze(),n=tj();(function(i){i.schema={oneOf:[Object.assign({},a.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(_y)),_y}var bO;function gE(){return bO||(bO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const a=Ze(),t=mE(),n=yE();(function(i){i.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"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(yy)),yy}var Oo={},Io={},Ey={},by={},wO;function $o(){return wO||(wO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema);t.validate=i=>n(i)})(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=i=>n.test(i)})(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=i=>n.test(i)})(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=i=>n.test(i)})(e.IPFSv1||(e.IPFSv1={}))})(by)),by}var SO;function rj(){return SO||(SO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const a=xo(),t=$o(),n=Ze();var i;(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)})(i=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:a.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:i.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(s=e.AvatarInfo||(e.AvatarInfo={}));var u;(function(f){f.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const p=new RegExp(f.schema.pattern,"i");f.validate=m=>p.test(m)})(u=e.LinkUrl||(e.LinkUrl={}));var c;(function(f){f.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:u.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={}))})(Ey)),Ey}var wy={},TO;function IB(){return TO||(TO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const a=Ze(),t=rj();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(wy)),wy}var PO;function NB(){return PO||(PO=1,(function(e){var a=Io&&Io.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Io&&Io.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(rj(),e),t(IB(),e)})(Io)),Io}var Sy={},Ty={},AO;function nj(){return AO||(AO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const a=Ze();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,a.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(Ty)),Ty}var Py={},OO;function aj(){return OO||(OO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(Py)),Py}var Ay={},IO;function ij(){return IO||(IO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(Ay)),Ay}var Oy={},Du={},NO;function _E(){return NO||(NO=1,Object.defineProperty(Du,"__esModule",{value:!0}),Du.displayableProperties=void 0,Du.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Du}var Iy={},RO;function oj(){return RO||(RO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(Iy)),Iy}var Ny={},CO;function sj(){return CO||(CO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(Ny)),Ny}var MO;function RB(){return MO||(MO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const a=Ze(),t=_E(),n=nj(),i=ij(),s=oj(),u=sj(),c=aj();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:i.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:u.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,a.generateLazyValidator)(p.schema)})(e.Scene||(e.Scene={}))})(Oy)),Oy}var jO;function CB(){return jO||(jO=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 a=nj();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return a.FeatureToggles}});var t=aj();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=ij();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=RB();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var s=oj();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return s.Source}});var u=sj();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return u.SpawnPoint}})})(Sy)),Sy}var No={},Ry={},Cy={},LO;function uj(){return LO||(LO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(Cy)),Cy}var DO;function lj(){return DO||(DO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const a=Ze(),t=uj();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(Ry)),Ry}var My={},kO;function cj(){return kO||(kO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(My)),My}var jy={},qO;function vE(){return qO||(qO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const a=pf(),t=Ze();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:a.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,t.generateLazyValidator)(n);function s(u){return i(u)}e.isStandard=s})(jy)),jy}var Ly={},Ro={},Dy={},BO;function MB(){return BO||(BO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(Dy)),Dy}var UO;function dj(){return UO||(UO=1,(function(e){var a=Ro&&Ro.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Ro&&Ro.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(MB(),e)})(Ro)),Ro}var ky={},FO;function EE(){return FO||(FO=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 a=Ze();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 i;(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,a.generateLazyValidator)(h.schema)})(i=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,a.generateLazyValidator)(h.schema)})(s=e.AnyMapping||(e.AnyMapping={}));var u;(function(h){h._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(T,C){if(!C||!C.from||!C.to)return!1;let{to:O,from:E}=C;return(typeof E!="bigint"||typeof O!="bigint")&&(E=BigInt(E),O=BigInt(O)),E<=O},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,a.generateLazyValidator)(h.schema,[h._fromLessThanOrEqualTo])})(u=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,a.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:[i.schema,s.schema,u.schema,c.schema]},h.validate=(0,a.generateLazyValidator)(h.schema,[u._fromLessThanOrEqualTo])})(f=e.Mapping||(e.Mapping={})),(function(h){h._isMappingsValid={keyword:"_isMappingsValid",validate:function(T,C){try{m(C)}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 _=Object.values(n).reduce((T,C)=>(T[C]=h.innerSchema,T),{});h.schema={type:"object",properties:_,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},h.validate=(0,a.generateLazyValidator)(h.schema,[u._fromLessThanOrEqualTo,h._isMappingsValid])})(e.Mappings||(e.Mappings={}));class p extends Error{constructor(_,T,C){super(_),this.existingMapping=T,this.conflictingMapping=C}}e.AddMappingError=p;function m(h={}){const _={};for(const[y,S]of Object.entries(h)){_[y]={};for(const[M,U]of Object.entries(S))for(const V of U)I(y,M,V)}function T(){return JSON.parse(JSON.stringify(_))}function C(y,S,M){const U=BigInt(y);return U>=BigInt(S)&&U<=BigInt(M)}function O(y,S){switch(S.type){case t.SINGLE:return y.id===S.id;case t.MULTIPLE:return S.ids.includes(y.id);case t.RANGE:return C(y.id,S.from,S.to);default:return!1}}function E(y,S){switch(S.type){case t.SINGLE:return y.ids.includes(S.id);case t.MULTIPLE:return y.ids.some(M=>S.ids.includes(M));case t.RANGE:return y.ids.some(M=>C(M,S.from,S.to));default:return!1}}function R(y,S){switch(S.type){case t.SINGLE:return C(S.id,y.from,y.to);case t.MULTIPLE:return S.ids.some(M=>C(M,y.from,y.to));case t.RANGE:return BigInt(y.from)<=BigInt(S.to)&&BigInt(y.to)>=BigInt(S.from)}}function v(y,S){if(y.type===t.ANY||S.type===t.ANY)return!0;switch(y.type){case t.SINGLE:return O(y,S);case t.MULTIPLE:return E(y,S);case t.RANGE:return R(y,S)}}function I(y,S,M){var U,V;const Q=S.toLowerCase();_[y]=(U=_[y])!==null&&U!==void 0?U:{},_[y][Q]=(V=_[y][Q])!==null&&V!==void 0?V:[];for(const ne of _[y][Q])if(v(ne,M))throw new p(`Cannot add mapping to contract ${Q} on network ${y} because it overlaps with existing mapping`,ne,M);_[y][Q].push(M)}function A(y,S,M){var U;return!((U=_[y])===null||U===void 0)&&U[S]?_[y][S].some(V=>{switch(V.type){case t.SINGLE:return V.id===M;case t.ANY:return!0;case t.MULTIPLE:return V.ids.includes(M);case t.RANGE:return BigInt(M)>=BigInt(V.from)&&BigInt(M)<=BigInt(V.to)}}):!1}return{addMapping:I,getMappings:T,includesNft:A}}e.createMappingsHelper=m})(ky)),ky}var VO;function bE(){return VO||(VO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const a=Ze(),t=dj(),n=EE();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 i={keyword:"_containsHashingKeys",validate:function(c,f){var p;const m=f;return!((p=m?.merkleProof)===null||p===void 0)&&p.hashingKeys?m.merkleProof.hashingKeys.every(h=>m.hasOwnProperty(h)):!1},errors:!1},s=(0,a.generateLazyValidator)(e.schema,[i,n.RangeMapping._fromLessThanOrEqualTo,n.Mappings._isMappingsValid]);function u(c){return s(c)}e.isThirdParty=u})(Ly)),Ly}var qy={},By={},ia={},HO;function fj(){if(HO)return ia;HO=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.isBaseEmote=ia.isBaseAvatar=ia.requiredBaseItemProps=ia.baseItemProperties=void 0;const e=lj(),a=cj(),t=_E();ia.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({},a.Metrics.schema),{nullable:!0})}),ia.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(s){if(!s||!s.id)return!1;const u=s.id.split(":"),c=u[1]==="decentraland",f=u[3]==="base-avatars";return u.length===5&&c&&f}ia.isBaseAvatar=n;function i(s){if(!s||!s.id)return!1;const u=s.id.split(":");return u.length===5&&u[1]==="decentraland"&&u[3]==="base-emotes"}return ia.isBaseEmote=i,ia}var zO;function jB(){return zO||(zO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const a=Ze(),t=xo(),n=gE(),i=fj(),s=vE(),u=bE(),c=yE(),f=EE();(function(p){p.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),s.standardProperties),u.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:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const m={keyword:"_isThirdParty",validate:(_,T)=>!_||(0,u.isThirdParty)(T),errors:!1},h={keyword:"_isBaseAvatar",validate:(_,T)=>!_||(0,i.isBaseAvatar)(T),errors:!1};p.validate=(0,a.generateLazyValidator)(p.schema,[m,h,f.RangeMapping._fromLessThanOrEqualTo,f.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(By)),By}var WO;function LB(){return WO||(WO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var a=gE();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return a.WearableRepresentation}});var t=jB();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=xo();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=tj();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var s=yE();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return s.HideableWearableCategory}})})(qy)),qy}var Uy={},Fy={},Vy={},Hy={},GO;function pj(){return GO||(GO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(Hy)),Hy}var zy={},KO;function hj(){return KO||(KO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const a=Ze(),t=mE();(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,a.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(zy)),zy}var YO;function mj(){return YO||(YO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const a=pj(),t=Ze(),n=hj();(function(i){i.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:a.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(Vy)),Vy}var XO;function DB(){return XO||(XO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const a=yj(),t=Ze(),n=fj(),i=vE(),s=bE(),u=mj();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),i.standardProperties),s.schema.properties),{emoteDataADR74:u.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:(m,h)=>!m||(0,a.isThirdParty)(h),errors:!1},p={keyword:"_isBaseEmote",validate:(m,h)=>!m||(0,n.isBaseEmote)(h),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[f,p,a.RangeMapping._fromLessThanOrEqualTo,a.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))})(Fy)),Fy}var Wy={},JO;function kB(){return JO||(JO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(Wy)),Wy}var QO;function qB(){return QO||(QO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=e.EmoteCategory=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var a=DB();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return a.Emote}});var t=hj();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=mj();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=pj();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return i.EmoteCategory}});var s=kB();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}})})(Uy)),Uy}var ZO;function yj(){return ZO||(ZO=1,(function(e){var a=No&&No.__createBinding||(Object.create?(function(p,m,h,_){_===void 0&&(_=h);var T=Object.getOwnPropertyDescriptor(m,h);(!T||("get"in T?!m.__esModule:T.writable||T.configurable))&&(T={enumerable:!0,get:function(){return m[h]}}),Object.defineProperty(p,_,T)}):(function(p,m,h,_){_===void 0&&(_=h),p[_]=m[h]})),t=No&&No.__exportStar||function(p,m){for(var h in p)h!=="default"&&!Object.prototype.hasOwnProperty.call(m,h)&&a(m,p,h)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=lj();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=uj();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var s=cj();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return s.Metrics}});var u=mE();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return u.BodyShape}});var c=vE();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return c.isStandard}});var f=bE();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return f.isThirdParty}}),t(EE(),e),t(LB(),e),t(qB(),e)})(No)),No}var Gy={},Ky={},xO;function hf(){return xO||(xO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const a=Ze();var t;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(i){i.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"}}}]}},i.validate=(0,a.generateLazyValidator)(i.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(i){i.schema={type:"array",items:n.schema,minItems:1},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.AuthChain||(e.AuthChain={}))})(Ky)),Ky}var $O;function BB(){return $O||($O=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const a=$o(),t=hf(),n=Ze();(function(i){i.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:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(i){i.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:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(Gy)),Gy}var Yy={},Xy={},eI;function gj(){return eI||(eI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const a=$o(),t=Ze();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[a.IPFSv1.schema,a.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(Xy)),Xy}var tI;function _j(){return tI||(tI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const a=$o(),t=gj(),n=Ze();(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[a.IPFSv1.schema,a.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"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.Entity||(e.Entity={}))})(Yy)),Yy}var Jy={},rI;function UB(){return rI||(rI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const a=hf(),t=Ze();(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:a.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(Jy)),Jy}var Co={},Qy={},nI;function FB(){return nI||(nI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const a=xo(),t=$o(),n=Ze();var i;(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:a.WearableCategory.schema}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(i=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:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(e.Outfits||(e.Outfits={}))})(Qy)),Qy}var aI;function VB(){return aI||(aI=1,(function(e){var a=Co&&Co.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Co&&Co.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(FB(),e)})(Co)),Co}var Mo={},Zy={},iI;function vj(){return iI||(iI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationType=void 0,(function(a){a.BADGE_GRANTED="badge_granted",a.BID_ACCEPTED="bid_accepted",a.BID_RECEIVED="bid_received",a.EVENTS_STARTED="events_started",a.EVENTS_STARTS_SOON="events_starts_soon",a.GOVERNANCE_ANNOUNCEMENT="governance_announcement",a.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",a.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",a.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",a.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",a.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",a.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",a.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",a.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",a.GOVERNANCE_TENDER_PASSED="governance_tender_passed",a.GOVERNANCE_WHALE_VOTE="governance_whale_vote",a.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",a.ITEM_SOLD="item_sold",a.ITEM_PUBLISHED="item_published",a.LAND_RENTAL_ENDED="rental_ended",a.LAND_RENTED="rental_started",a.REWARD_ASSIGNED="reward_assignment",a.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",a.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",a.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",a.REWARD_DELAYED="reward_delayed",a.REWARD_IN_PROGRESS="reward_in_progress",a.ROYALTIES_EARNED="royalties_earned",a.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",a.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",a.WORLDS_ACCESS_RESTORED="worlds_access_restored",a.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",a.WORLDS_MISSING_RESOURCES="worlds_missing_resources",a.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",a.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked"})(e.NotificationType||(e.NotificationType={}))})(Zy)),Zy}var xy={},$y={},oI;function Ej(){return oI||(oI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const a=Ze(),t=vj(),n={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},i=Object.values(t.NotificationType).reduce((s,u)=>(s[u]=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:i}}},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})($y)),$y}var eg={},sI;function bj(){return sI||(sI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,(function(a){a.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const t=new RegExp(a.schema.pattern);a.validate=n=>t.test(n)})(e.Email||(e.Email={}))})(eg)),eg}var uI;function HB(){return uI||(uI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const a=Ze(),t=Ej(),n=$o(),i=bj();(function(s){s.schema={type:"object",required:["address","details"],properties:{address:n.EthAddress.schema,email:Object.assign(Object.assign({},i.Email.schema),{nullable:!0}),details:t.SubscriptionDetails.schema}},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Subscription||(e.Subscription={}))})(xy)),xy}var lI;function zB(){return lI||(lI=1,(function(e){var a=Mo&&Mo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Mo&&Mo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(vj(),e),t(HB(),e),t(Ej(),e)})(Mo)),Mo}var jo={},tg={},cI;function Zs(){return cI||(cI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,(function(a){(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"})(a.Type||(a.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={}))})(a.SubType||(a.SubType={}))})(e.Events||(e.Events={}))})(tg)),tg}var rg={},dI;function WB(){return dI||(dI=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 a=Ze(),t=Zs();(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,a.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,a.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,a.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,a.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,a.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,a.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,a.generateLazyValidator)(n.schema)})(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={}))})(rg)),rg}var ng={},fI;function GB(){return fI||(fI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const a=hf(),t=Ze(),n=_j(),i=Zs();(function(s){s.schema={type:"object",properties:{type:{type:"string",const:i.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(i.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:n.Entity.schema,authChain:a.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(ng)),ng}var ag={},pI;function KB(){return pI||(pI=1,Object.defineProperty(ag,"__esModule",{value:!0})),ag}var ig={},hI;function YB(){return hI||(hI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const a=Ze(),t=Zs();(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,a.generateLazyValidator)(n.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(ig)),ig}var og={},ku={},mI;function XB(){if(mI)return ku;mI=1,Object.defineProperty(ku,"__esModule",{value:!0}),ku.createEventSchema=void 0;function e(a,t,n){return{type:"object",properties:{type:{type:"string",const:a},subType:{type:"string",const:t},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}return ku.createEventSchema=e,ku}var yI;function JB(){return yI||(yI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const a=Ze(),t=Zs(),n=XB(),i={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(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_IN_PROGRESS,i),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_ASSIGNED,i),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,s),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,s),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,s),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_DELAYED,i),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(og)),og}var sg={},gI;function QB(){return gI||(gI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FriendshipAcceptedEvent=e.FriendshipRequestEvent=e.AssetBundleConversionManuallyQueuedEvent=e.AssetBundleConversionFinishedEvent=e.BadgeGrantedEvent=void 0;const a=Ze(),t=Zs();(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,a.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,a.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,a.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,a.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,a.generateLazyValidator)(n.schema)})(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={}))})(sg)),sg}var _I;function ZB(){return _I||(_I=1,(function(e){var a=jo&&jo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=jo&&jo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(Zs(),e),t(WB(),e),t(GB(),e),t(KB(),e),t(YB(),e),t(JB(),e),t(QB(),e)})(jo)),jo}var vI;function wE(){return vI||(vI=1,(function(e){var a=Oo&&Oo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Oo&&Oo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(NB(),e),t(CB(),e),t(yj(),e),t(_E(),e),t(dj(),e),t(BB(),e),t(_j(),e),t(UB(),e),t(VB(),e),t(zB(),e),t(ZB(),e)})(Oo)),Oo}var EI;function xB(){return EI||(EI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const a=pf(),t=xo(),n=gE(),i=Ze(),s=wE();(function(u){u.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},a.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"]},u.validate=(0,i.generateLazyValidator)(u.schema)})(e.WearableJson||(e.WearableJson={}))})(py)),py}var bI;function $B(){return bI||(bI=1,(function(e){var a=Ao&&Ao.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Ao&&Ao.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(OB(),e),t(xB(),e)})(Ao)),Ao}var wI;function eU(){return wI||(wI=1,(function(e){var a=To&&To.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=To&&To.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(AB(),e),t($B(),e)})(To)),To}var Lo={},ug={},SI;function tU(){return SI||(SI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(ug)),ug}var lg={},TI;function rU(){return TI||(TI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const a=Ze(),t=Fn(),n=ma();(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(i){i.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"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Collection||(e.Collection={}))})(lg)),lg}var cg={},dg={},PI;function mf(){return PI||(PI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(dg)),dg}var AI;function nU(){return AI||(AI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const a=Ze(),t=Fn(),n=ma(),i=mf();(function(s){s.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(s){s.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:n.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Contract||(e.Contract={}))})(cg)),cg}var fg={},pg={},OI;function wj(){return OI||(OI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const a=Ze(),t=Fn(),n=wE(),i=ma(),s=mf(),u=pf(),c=xo();(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:u.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:u.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:i.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,a.generateLazyValidator)(f.schema)})(e.NFT||(e.NFT={}))})(pg)),pg}var II;function aU(){return II||(II=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const a=Ze(),t=Fn(),n=ma(),i=wj(),s=mf();(function(u){u.NAME="name",u.NEWEST="newest",u.RECENTLY_REVIEWED="recently_reviewed",u.RECENTLY_SOLD="recently_sold",u.RECENTLY_LISTED="recently_listed",u.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(u){u.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:i.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"]},u.validate=(0,a.generateLazyValidator)(u.schema)})(e.Item||(e.Item={}))})(fg)),fg}var hg={},NI;function SE(){return NI||(NI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(hg)),hg}var mg={},RI;function iU(){return RI||(RI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(mg)),mg}var yg={},CI;function oU(){return CI||(CI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const a=Ze(),t=Fn(),n=ma();(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(i){i.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"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Mint||(e.Mint={}))})(yg)),yg}var gg={},MI;function sU(){return MI||(MI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(a){a.NEWEST="newest",a.RECENTLY_SOLD="recently_sold",a.CHEAPEST="cheapest",a.MOST_EXPENSIVE="most_expensive",a.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(a){a.ASC="asc",a.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(gg)),gg}var _g={},jI;function uU(){return jI||(jI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const a=Ze(),t=Fn(),n=SE(),i=ma();(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:i.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,a.generateLazyValidator)(s.schema)})(e.Order||(e.Order={}))})(_g)),_g}var vg={},LI;function Sj(){return LI||(LI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(vg)),vg}var Eg={},DI;function lU(){return DI||(DI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const a=Ze(),t=Fn(),n=Sj(),i=ma();(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:i.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Sale||(e.Sale={}))})(Eg)),Eg}var bg={},kI;function cU(){return kI||(kI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const a=Ze(),t=Fn(),n=ma();(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 i;(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,a.generateLazyValidator)(s.schema)})(i=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:i.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,a.generateLazyValidator)(s.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(bg)),bg}var wg={},qI;function dU(){return qI||(qI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(a){a.DATE="date",a.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(wg)),wg}var Sg={},BI;function fU(){return BI||(BI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(Sg)),Sg}var Tg={},UI;function pU(){return UI||(UI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(Tg)),Tg}var Pg={},FI;function hU(){return FI||(FI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const a=Ze();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(i,s){const u=t().validWorldRanges;for(const c of u)if(i>=c.xMin&&i<=c.xMax&&s>=c.yMin&&s<=c.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(i){i.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},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.World||(e.World={}))})(Pg)),Pg}var Ag={},VI;function mU(){return VI||(VI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const a=Ze(),t=Fn(),n=SE(),i=ma();(function(s){s.RECENTLY_OFFERED="recently_offered",s.RECENTLY_UPDATED="recently_updated",s.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(s){const u={properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,contractAddress:{type:"string"},network:i.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({},u.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...u.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},u.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...u.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},u.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...u.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Bid||(e.Bid={}))})(Ag)),Ag}var Og={},HI;function yU(){return HI||(HI=1,Object.defineProperty(Og,"__esModule",{value:!0})),Og}var Ig={},zI;function gU(){return zI||(zI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,(function(a){a.BID="bid",a.PUBLIC_NFT_ORDER="public_nft_order",a.PUBLIC_ITEM_ORDER="public_item_order"})(e.TradeType||(e.TradeType={})),(function(a){a[a.ERC20=1]="ERC20",a[a.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",a[a.ERC721=3]="ERC721",a[a.COLLECTION_ITEM=4]="COLLECTION_ITEM"})(e.TradeAssetType||(e.TradeAssetType={})),(function(a){a.SENT="sent",a.RECEIVED="received"})(e.TradeAssetDirection||(e.TradeAssetDirection={}))})(Ig)),Ig}var Do={},Ng={},WI;function _U(){return WI||(WI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(Ng)),Ng}var Rg={},GI;function vU(){return GI||(GI=1,Object.defineProperty(Rg,"__esModule",{value:!0})),Rg}var Cg={},KI;function EU(){return KI||(KI=1,Object.defineProperty(Cg,"__esModule",{value:!0})),Cg}var Mg={},YI;function bU(){return YI||(YI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(Mg)),Mg}var jg={},XI;function wU(){return XI||(XI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(jg)),jg}var Lg={},JI;function SU(){return JI||(JI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewMessageType=void 0;const a=Ze();(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,a.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,i,s,u="*")=>{const c={type:i,payload:s};n.postMessage(c,u)};e.sendMessage=t})(Lg)),Lg}var Dg={},QI;function TU(){return QI||(QI=1,Object.defineProperty(Dg,"__esModule",{value:!0})),Dg}var kg={},ZI;function PU(){return ZI||(ZI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(kg)),kg}var qg={},xI;function AU(){return xI||(xI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(qg)),qg}var Bg={},$I;function OU(){return $I||($I=1,Object.defineProperty(Bg,"__esModule",{value:!0})),Bg}var Ug={},eN;function IU(){return eN||(eN=1,Object.defineProperty(Ug,"__esModule",{value:!0})),Ug}var Fg={},tN;function NU(){return tN||(tN=1,Object.defineProperty(Fg,"__esModule",{value:!0})),Fg}var Vg={},rN;function RU(){return rN||(rN=1,Object.defineProperty(Vg,"__esModule",{value:!0})),Vg}var Hg={},nN;function CU(){return nN||(nN=1,Object.defineProperty(Hg,"__esModule",{value:!0})),Hg}var zg={},aN;function MU(){return aN||(aN=1,Object.defineProperty(zg,"__esModule",{value:!0})),zg}var Wg={},iN;function jU(){return iN||(iN=1,Object.defineProperty(Wg,"__esModule",{value:!0})),Wg}var Gg={},oN;function LU(){return oN||(oN=1,Object.defineProperty(Gg,"__esModule",{value:!0})),Gg}var sN;function DU(){return sN||(sN=1,(function(e){var a=Do&&Do.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Do&&Do.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(_U(),e),t(vU(),e),t(EU(),e),t(bU(),e),t(wU(),e),t(SU(),e),t(TU(),e),t(PU(),e),t(AU(),e),t(OU(),e),t(IU(),e),t(NU(),e),t(RU(),e),t(CU(),e),t(MU(),e),t(jU(),e),t(LU(),e)})(Do)),Do}var ko={},qu={},uN;function kU(){if(uN)return qu;uN=1,Object.defineProperty(qu,"__esModule",{value:!0}),qu.isSysLink=void 0;const e=a=>a!==null&&typeof a=="object"&&"sys"in a&&"id"in a.sys;return qu.isSysLink=e,qu}var Bu={},lN;function qU(){if(lN)return Bu;lN=1,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.ContentfulLocale=void 0;var e;return(function(a){a.enUS="en-US",a.es="es",a.zh="zh"})(e||(e={})),Bu.ContentfulLocale=e,Bu}var Kg={},cN;function BU(){return cN||(cN=1,Object.defineProperty(Kg,"__esModule",{value:!0})),Kg}var dN;function UU(){return dN||(dN=1,(function(e){var a=ko&&ko.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=ko&&ko.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(kU(),e),t(qU(),e),t(BU(),e)})(ko)),ko}var fN;function FU(){return fN||(fN=1,(function(e){var a=Lo&&Lo.__createBinding||(Object.create?(function(Q,ne,me,be){be===void 0&&(be=me);var Ne=Object.getOwnPropertyDescriptor(ne,me);(!Ne||("get"in Ne?!ne.__esModule:Ne.writable||Ne.configurable))&&(Ne={enumerable:!0,get:function(){return ne[me]}}),Object.defineProperty(Q,be,Ne)}):(function(Q,ne,me,be){be===void 0&&(be=me),Q[be]=ne[me]})),t=Lo&&Lo.__exportStar||function(Q,ne){for(var me in Q)me!=="default"&&!Object.prototype.hasOwnProperty.call(ne,me)&&a(ne,Q,me)};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=tU();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var i=Fn();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return i.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return i.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return i.getURNProtocol}});var s=xM();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return s.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return s.getChainId}});var u=rU();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return u.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return u.CollectionSortBy}});var c=nU();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return c.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return c.ContractSortBy}});var f=aU();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return f.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return f.ItemSortBy}});var p=SE();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return p.ListingStatus}});var m=iU();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return m.MetaTransaction}});var h=oU();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return h.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return h.MintSortBy}});var _=ma();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return _.Network}});var T=mf();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return T.NFTCategory}});var C=wj();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return C.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return C.NFTSortBy}});var O=sU();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return O.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return O.CatalogSortDirection}});var E=uU();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return E.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return E.OrderSortBy}});var R=$M();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return R.ProviderType}});var v=pf();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return v.Rarity}});var I=Sj();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return I.SaleType}});var A=lU();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return A.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return A.SaleSortBy}});var y=cU();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return y.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return y.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return y.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return y.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return y.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return y.PeriodCreation}});var S=dU();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return S.AnalyticsDayDataSortBy}});var M=fU();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return M.Store}});var U=pU();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return U.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return U.GenderFilterOption}});var V=hU();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return V.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return V.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return V.isInsideWorldLimits}}),t(mU(),e),t(yU(),e),t(gU(),e),t(DU(),e),t(UU(),e)})(Lo)),Lo}var Yg={},pN;function VU(){return pN||(pN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const a=Ze();(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,a.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(Yg)),Yg}var hN;function HU(){return hN||(hN=1,(function(e){var a=aa&&aa.__createBinding||(Object.create?(function(u,c,f,p){p===void 0&&(p=f);var m=Object.getOwnPropertyDescriptor(c,f);(!m||("get"in m?!c.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(u,p,m)}):(function(u,c,f,p){p===void 0&&(p=f),u[p]=c[f]})),t=aa&&aa.__setModuleDefault||(Object.create?(function(u,c){Object.defineProperty(u,"default",{enumerable:!0,value:c})}):function(u,c){u.default=c}),n=aa&&aa.__importStar||function(u){if(u&&u.__esModule)return u;var c={};if(u!=null)for(var f in u)f!=="default"&&Object.prototype.hasOwnProperty.call(u,f)&&a(c,u,f);return t(c,u),c},i=aa&&aa.__exportStar||function(u,c){for(var f in u)f!=="default"&&!Object.prototype.hasOwnProperty.call(c,f)&&a(c,u,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const s=n(eU());e.sdk=s,i(Ze(),e),i(FU(),e),i(wE(),e),i($o(),e),i(VU(),e),i(hf(),e),i(gj(),e),i(bj(),e)})(aa)),aa}var Xs=HU();const zU=Object.freeze({storageKey:"decentraland-connect-storage-key",[Ft.ProviderType.INJECTED]:{},[Ft.ProviderType.FORTMATIC]:{apiKeys:{[At.ChainId.ETHEREUM_MAINNET]:"pk_live_F8E24DF8DD5BCBC5",[At.ChainId.ETHEREUM_SEPOLIA]:"pk_test_5B728BEFE5C10911"},urls:Ws(Ft.ProviderType.FORTMATIC)},[Ft.ProviderType.NETWORK]:{urls:Ws(Ft.ProviderType.NETWORK)},[Ft.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:Ws(Ft.ProviderType.WALLET_LINK)},[Ft.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:Ws(Ft.ProviderType.WALLET_CONNECT_V2),chains:{[At.ChainId.ETHEREUM_MAINNET]:{chains:[At.ChainId.ETHEREUM_MAINNET],optionalChains:[At.ChainId.MATIC_MAINNET,At.ChainId.ARBITRUM_MAINNET,At.ChainId.OPTIMISM_MAINNET,At.ChainId.AVALANCHE_MAINNET,At.ChainId.BSC_MAINNET,At.ChainId.FANTOM_MAINNET]},[At.ChainId.ETHEREUM_SEPOLIA]:{chains:[At.ChainId.ETHEREUM_SEPOLIA],optionalChains:[At.ChainId.MATIC_AMOY]}}},[Ft.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:Ws(Ft.ProviderType.MAGIC),chains:[At.ChainId.ETHEREUM_MAINNET,At.ChainId.ETHEREUM_SEPOLIA,At.ChainId.MATIC_MAINNET,At.ChainId.MATIC_AMOY,At.ChainId.OPTIMISM_MAINNET,At.ChainId.ARBITRUM_MAINNET,At.ChainId.AVALANCHE_MAINNET,At.ChainId.BSC_MAINNET,At.ChainId.FANTOM_MAINNET]},[Ft.ProviderType.MAGIC_TEST]:{apiKey:"pk_live_CE856A4938B36648",urls:Ws(Ft.ProviderType.MAGIC),chains:[At.ChainId.ETHEREUM_MAINNET,At.ChainId.ETHEREUM_SEPOLIA,At.ChainId.MATIC_MAINNET,At.ChainId.MATIC_AMOY,At.ChainId.OPTIMISM_MAINNET,At.ChainId.ARBITRUM_MAINNET,At.ChainId.AVALANCHE_MAINNET,At.ChainId.BSC_MAINNET,At.ChainId.FANTOM_MAINNET]}});function $a(){return zU}function Ws(e){const a={[At.ChainId.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[At.ChainId.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[At.ChainId.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[At.ChainId.MATIC_AMOY]:"https://rpc.decentraland.org/amoy",[At.ChainId.ARBITRUM_MAINNET]:"https://rpc.decentraland.org/arbitrum",[At.ChainId.OPTIMISM_MAINNET]:"https://rpc.decentraland.org/optimism",[At.ChainId.AVALANCHE_MAINNET]:"https://rpc.decentraland.org/avalanche",[At.ChainId.BSC_MAINNET]:"https://rpc.decentraland.org/binance",[At.ChainId.FANTOM_MAINNET]:"https://rpc.decentraland.org/fantom"};let t="";switch(e){case Ft.ProviderType.WALLET_LINK:t="walletlink";break;case Ft.ProviderType.FORTMATIC:t="fortmatic";break;case Ft.ProviderType.MAGIC:t="magic";break;case Ft.ProviderType.MAGIC_TEST:t="magic";break;case Ft.ProviderType.WALLET_CONNECT_V2:t="walletconnect-v2";break;case Ft.ProviderType.AUTH_SERVER:t="auth-server";break}if(t)for(const n in a)a[n]+=`?project=${t}`;return a}class WU extends Qs{constructor(a){const t=$a()[Xs.ProviderType.FORTMATIC],n=Object.keys(t.apiKeys).map(i=>Number(i));if(!n.includes(a))throw new Error(`Invariant error: Unsupported chainId ${a}`);super({supportedChainIds:n}),this.apiKey=t.apiKeys[a],this.chainId=a,this.rpcUrl=t.urls[a]}async activate(){if(!this.fortmatic){const{default:t}=await gl(async()=>{const{default:n}=await import("./fortmatic-DxcoaSjn.js").then(i=>i.f);return{default:n}},[]);this.fortmatic=new t(this.apiKey,{rpcUrl:this.rpcUrl,chainId:this.chainId})}const a=await this.fortmatic.getProvider().enable().then(t=>t[0]);return{provider:this.fortmatic.getProvider(),chainId:this.chainId,account:a}}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(a=>a[0])}deactivate(){}close(){return this.fortmatic.user.logout()}}function Uv(){return Uv=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Uv.apply(this,arguments)}function TE(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,e.__proto__=a}function Fv(e){return Fv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Fv(e)}function Jd(e,a){return Jd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Jd(e,a)}function GU(){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 Gd(e,a,t){return GU()?Gd=Reflect.construct:Gd=function(i,s,u){var c=[null];c.push.apply(c,s);var f=Function.bind.apply(i,c),p=new f;return u&&Jd(p,u.prototype),p},Gd.apply(null,arguments)}function KU(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Qd(e){var a=typeof Map=="function"?new Map:void 0;return Qd=function(n){if(n===null||!KU(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a<"u"){if(a.has(n))return a.get(n);a.set(n,i)}function i(){return Gd(n,arguments,Fv(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Jd(i,n)},Qd(e)}function Dd(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 Gs(e,a){try{var t=e()}catch(n){return a(n)}return t&&t.then?t.then(void 0,a):t}function Ra(e){return e.hasOwnProperty("result")?e.result:e}var Xg=(function(e){TE(a,e);function a(){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 a})(Qd(Error)),YU=(function(e){TE(a,e);function a(){var t;return t=e.call(this)||this,t.name=t.constructor.name,t.message="The user rejected the request.",t}return a})(Qd(Error)),XU=(function(e){TE(a,e);function a(n){var i;return i=e.call(this,n)||this,i.handleNetworkChanged=i.handleNetworkChanged.bind(Dd(i)),i.handleChainChanged=i.handleChainChanged.bind(Dd(i)),i.handleAccountsChanged=i.handleAccountsChanged.bind(Dd(i)),i.handleClose=i.handleClose.bind(Dd(i)),i}var t=a.prototype;return t.handleChainChanged=function(i){this.emitUpdate({chainId:i,provider:window.ethereum})},t.handleAccountsChanged=function(i){i.length===0?this.emitDeactivate():this.emitUpdate({account:i[0]})},t.handleClose=function(i,s){this.emitDeactivate()},t.handleNetworkChanged=function(i){this.emitUpdate({chainId:i,provider:window.ethereum})},t.activate=function(){try{var i=function(m){if(s)return m;function h(){return Uv({provider:window.ethereum},c?{account:c}:{})}var _=(function(){if(!c)return Promise.resolve(window.ethereum.enable().then(function(T){return T&&Ra(T)[0]})).then(function(T){c=T})})();return _&&_.then?_.then(h):h(_)},s=!1,u=this;if(!window.ethereum)throw new Xg;window.ethereum.on&&(window.ethereum.on("chainChanged",u.handleChainChanged),window.ethereum.on("accountsChanged",u.handleAccountsChanged),window.ethereum.on("close",u.handleClose),window.ethereum.on("networkChanged",u.handleNetworkChanged)),window.ethereum.isMetaMask&&(window.ethereum.autoRefreshOnNetworkChange=!1);var c,f=Gs(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(p){return Ra(p)[0]})).then(function(p){c=p})},function(p){if(p.code===4001)throw new YU});return Promise.resolve(f&&f.then?f.then(i):i(f))}catch(p){return Promise.reject(p)}},t.getProvider=function(){try{return Promise.resolve(window.ethereum)}catch(i){return Promise.reject(i)}},t.getChainId=function(){try{var i=function(){function f(){if(!s)try{s=Ra(window.ethereum.send({method:"net_version"}))}catch{}return s||(window.ethereum.isDapper?s=Ra(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 m=Gs(function(){return Promise.resolve(window.ethereum.send("net_version").then(Ra)).then(function(h){s=h})},function(){});if(m&&m.then)return m.then(function(){})}})();return p&&p.then?p.then(f):f(p)};if(!window.ethereum)throw new Xg;var s,u=Gs(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(Ra)).then(function(c){s=c})},function(){});return Promise.resolve(u&&u.then?u.then(i):i(u))}catch(c){return Promise.reject(c)}},t.getAccount=function(){try{var i=function(){function f(){return s||(s=Ra(window.ethereum.send({method:"eth_accounts"}))[0]),s}var p=(function(){if(!s){var m=Gs(function(){return Promise.resolve(window.ethereum.enable().then(function(h){return Ra(h)[0]})).then(function(h){s=h})},function(){});if(m&&m.then)return m.then(function(){})}})();return p&&p.then?p.then(f):f(p)};if(!window.ethereum)throw new Xg;var s,u=Gs(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(c){return Ra(c)[0]})).then(function(c){s=c})},function(){});return Promise.resolve(u&&u.then?u.then(i):i(u))}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(Gs(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(i){return Ra(i).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(i){return Promise.reject(i)}},a})(Qs);class JU 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 QU=60*1e3;class ZU extends XU{constructor(a){super({supportedChainIds:[a]})}async activate(){const a=new Promise((n,i)=>{setTimeout(()=>{i(new JU)},QU)}),t=super.activate();return Promise.race([t,a])}}var xU="Invariant failed";function mN(e,a){throw new Error(xU)}function Tj(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,_l(e,a)}function Vv(e){return Vv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Vv(e)}function _l(e,a){return _l=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},_l(e,a)}function $U(){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 Kd(e,a,t){return $U()?Kd=Reflect.construct:Kd=function(i,s,u){var c=[null];c.push.apply(c,s);var f=Function.bind.apply(i,c),p=new f;return u&&_l(p,u.prototype),p},Kd.apply(null,arguments)}function eF(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Hv(e){var a=typeof Map=="function"?new Map:void 0;return Hv=function(n){if(n===null||!eF(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a<"u"){if(a.has(n))return a.get(n);a.set(n,i)}function i(){return Kd(n,arguments,Vv(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),_l(i,n)},Hv(e)}var Jg=(function(e){Tj(a,e);function a(t,n,i){var s;return s=e.call(this)||this,s.code=n,s.data=i,s.name=s.constructor.name,s.message=t,s}return a})(Hv(Error)),tF=function(a,t){var n=this,i=this;this.isMetaMask=!1,this.sendAsync=function(u,c){console.log("sendAsync",u.method,u.params),i.request(u.method,u.params).then(function(f){return c(null,{jsonrpc:"2.0",id:u.id,result:f})}).catch(function(f){return c(f,null)})},this.request=function(u,c){try{return typeof u!="string"&&(c=u.params,u=u.method),Promise.resolve(fetch(n.url,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:u,params:c}),headers:{"Content-Type":"application/json"}})).then(function(f){if(!f.ok)throw new Jg(f.status+": "+f.statusText,-32e3);return Promise.resolve(f.json()).then(function(p){if("error"in p){var m,h,_;throw new Jg(p==null||(m=p.error)==null?void 0:m.message,p==null||(h=p.error)==null?void 0:h.code,p==null||(_=p.error)==null?void 0:_.data)}else{if("result"in p)return p.result;throw new Jg("Received unexpected JSON-RPC response to "+u+" request.",-32e3,p)}})})}catch(f){return Promise.reject(f)}},this.chainId=a,this.url=t;var s=new URL(t);this.host=s.host,this.path=s.pathname},rF=(function(e){Tj(a,e);function a(n){var i,s=n.urls,u=n.defaultChainId;return u||Object.keys(s).length===1||mN(),i=e.call(this,{supportedChainIds:Object.keys(s).map(function(c){return Number(c)})})||this,i.currentChainId=u||Number(Object.keys(s)[0]),i.providers=Object.keys(s).reduce(function(c,f){return c[Number(f)]=new tF(Number(f),s[Number(f)]),c},{}),i}var t=a.prototype;return t.activate=function(){try{var i=this;return Promise.resolve({provider:i.providers[i.currentChainId],chainId:i.currentChainId,account:null})}catch(s){return Promise.reject(s)}},t.getProvider=function(){try{var i=this;return Promise.resolve(i.providers[i.currentChainId])}catch(s){return Promise.reject(s)}},t.getChainId=function(){try{var i=this;return Promise.resolve(i.currentChainId)}catch(s){return Promise.reject(s)}},t.getAccount=function(){return Promise.resolve(null)},t.deactivate=function(){},t.changeChainId=function(i){Object.keys(this.providers).includes(i.toString())||mN(),this.currentChainId=i,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:i})},a})(Qs);class nF extends rF{constructor(a){super({urls:$a()[Ft.ProviderType.NETWORK].urls,defaultChainId:a})}}function zv(){return zv=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},zv.apply(this,arguments)}function aF(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,Wv(e,a)}function Wv(e,a){return Wv=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Wv(e,a)}function yN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var iF=1,oF=(function(e){aF(a,e);function a(n){var i,s=n.url,u=n.appName,c=n.appLogoUrl,f=n.darkMode,p=n.supportedChainIds;return i=e.call(this,{supportedChainIds:p})||this,i.url=s,i.appName=u,i.appLogoUrl=c,i.darkMode=f||!1,i.handleChainChanged=i.handleChainChanged.bind(yN(i)),i.handleAccountsChanged=i.handleAccountsChanged.bind(yN(i)),i}var t=a.prototype;return t.activate=function(){try{var i=this,s=function(){return Promise.resolve(i.provider.request({method:"eth_requestAccounts"})).then(function(f){var p=f[0];return i.provider.on("chainChanged",i.handleChainChanged),i.provider.on("accountsChanged",i.handleAccountsChanged),{provider:i.provider,account:p}})},u=(function(){if(window.ethereum&&window.ethereum.isCoinbaseWallet===!0)i.provider=window.ethereum;else{var c=(function(){if(!i.walletLink)return Promise.resolve(gl(()=>import("./index-B7gYbncy.js").then(f=>f.i),[]).then(function(f){var p;return(p=f?.default)!=null?p:f})).then(function(f){i.walletLink=new f(zv({appName:i.appName,darkMode:i.darkMode},i.appLogoUrl?{appLogoUrl:i.appLogoUrl}:{})),i.provider=i.walletLink.makeWeb3Provider(i.url,iF)})})();if(c&&c.then)return c.then(function(){})}})();return Promise.resolve(u&&u.then?u.then(s):s(u))}catch(c){return Promise.reject(c)}},t.getProvider=function(){try{var i=this;return Promise.resolve(i.provider)}catch(s){return Promise.reject(s)}},t.getChainId=function(){try{var i=this;return Promise.resolve(i.provider.chainId)}catch(s){return Promise.reject(s)}},t.getAccount=function(){try{var i=this;return Promise.resolve(i.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 i=this;return i.provider.close(),i.emitDeactivate(),Promise.resolve()}catch(s){return Promise.reject(s)}},t.handleChainChanged=function(i){this.emitUpdate({chainId:i})},t.handleAccountsChanged=function(i){this.emitUpdate({account:i[0]})},a})(Qs);class sF extends oF{constructor(a){const t=$a()[Xs.ProviderType.WALLET_LINK];super({url:t.urls[a],appName:t.appName,supportedChainIds:[a]})}}class Ma extends Qs{constructor(a){super({supportedChainIds:(()=>{const{chains:t,optionalChains:n}=Ma.configuration.chains[a];return[...t,...n]})()}),this.desiredChainId=a,this.activate=async()=>{const t=await gl(()=>import("./index-DJehiP7F.js").then(i=>i.R),[]).then(i=>{const{chains:s,optionalChains:u}=Ma.configuration.chains[this.desiredChainId];return i.default.init({projectId:Ma.configuration.projectId,rpcMap:Ma.configuration.urls,chains:s,optionalChains:u,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()}}}Ma.configuration=$a()[Xs.ProviderType.WALLET_CONNECT_V2];Ma.clearStorage=e=>{e.removeRegExp(new RegExp("^wc@2:"))};class Pj extends Qs{constructor(a,t=!1){super({supportedChainIds:$a()[Xs.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 i=await this.getProvider(),s=await i.request({method:"eth_accounts"});return this.account=s[0]??null,{provider:i,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(i,s,u)=>{if(u[0]?.method==="wallet_switchEthereumChain")try{const c=parseInt(u[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 i.bind(n)(...u)}}),sendAsync:new Proxy(n.send,{apply:async(i,s,u)=>i.bind(n)(...u)})}},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:i}=await gl(async()=>{const{Magic:c}=await import("./index-8e4wv-tH.js");return{Magic:c}},__vite__mapDeps([0,1])),{OAuthExtension:s}=await gl(async()=>{const{OAuthExtension:c}=await import("./index-QHMvomuf.js");return{OAuthExtension:c}},__vite__mapDeps([2,1])),u=$a()[this.isTest?Xs.ProviderType.MAGIC_TEST:Xs.ProviderType.MAGIC];return new i(u.apiKey,{extensions:[new s],network:{rpcUrl:u.urls[n],chainId:n}})},this.chainId=a,this.account=null}close(){if(!this.magic)throw new Error("Magic: instance was not initialized");return this.magic.user.logout()}}class uF extends Pj{constructor(a){super(a,!0)}}class lF{}class cF extends lF{get(a){const t=window.localStorage.getItem(a);return t===null?void 0:t}set(a,t){window.localStorage.setItem(a,t)}remove(a){window.localStorage.removeItem(a)}removeRegExp(a){for(let t=localStorage.length-1;t>=0;t--){const n=localStorage.key(t);n&&a.test(n)&&localStorage.removeItem(n)}}}class Zd{constructor(a){this.provider=a,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,(i,s)=>{s&&!s.hasOwnProperty("result")?n(i,{id:0,jsonrpc:"2.0",result:s}):n(i,s)}):this.send(t,n)}static adapt(a){const t=new Zd(a);return{...a,on:t.on,emit:t.emit,removeListener:t.removeListener,request:t.request,sendAsync:t.sendAsync,send:t.send.bind(t)}}async send(a,t){let n,i,s;const u=typeof t=="function";if(u){const c=a;i=c.params||[],n=c.method,s=t}else n=a,i=t||[],s=(c,f)=>{if(c)throw c;return f};if(this.isModernProvider()){const[c,f]=await this.provider.request({method:n,params:i}).then(m=>[null,m]).catch(m=>[m,void 0]);return s(c,u?{id:"",jsonrpc:"2.0",result:f}:f)}else{this.patchOldMobile();const[c,f]=u?await new Promise(p=>this.provider.send(a,(m,h)=>{p([m,h])})):await new Promise(p=>this.provider.send({jsonrpc:"2.0",id:++this.id,method:n,params:i},(m,h)=>{p([h&&h.hasOwnProperty("error")?h.error:m,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 dF{constructor(a){this.storage=a,this.getWalletName=()=>{if(this.connector instanceof Ma)return this.connector.getWalletName()},this.clearConnectionData=()=>{const{storageKey:t}=$a();this.storage.remove(t),Ma.clearStorage(this.storage)},this.handleWeb3ReactDeactivate=async()=>{try{await this.disconnect()}catch(t){console.error(t)}}}async connect(a,t=At.ChainId.ETHEREUM_MAINNET){if(this.connector)try{await this.disconnect()}catch(c){console.error("Error disconnecting previous connection",c)}const n=this.buildConnector(a,t);n.on(Za.Deactivate,this.handleWeb3ReactDeactivate);let{provider:i,account:s}={};try{const c=await n.activate();i=c.provider,s=c.account}catch(c){throw console.error("Error activating the connector",c),c}(a===Ft.ProviderType.MAGIC||a===Ft.ProviderType.MAGIC_TEST)&&n.on(Za.Update,({chainId:c})=>{c&&this.setConnectionData(a,c)});let u=t;if(a===Ft.ProviderType.INJECTED){const c=await i.request({method:"eth_chainId"});u=c?parseInt(c,16):u}return this.connector=n,this.setConnectionData(a,u),{provider:Zd.adapt(i),providerType:a,account:s||"",chainId:u}}isConnected(){return!!this.connector&&!!this.getConnectionData()}async tryPreviousConnection(){const a=this.getConnectionData();if(!a)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:a.providerType,chainId:a.chainId,account:await this.connector.getAccount()};const t=this.promiseOfConnection?await this.promiseOfConnection:await(this.promiseOfConnection=this.connect(a.providerType,a.chainId));return this.promiseOfConnection=void 0,{...t,chainId:this.getConnectionData().chainId}}getAvailableProviders(){const a=[Ft.ProviderType.FORTMATIC,Ft.ProviderType.WALLET_CONNECT,Ft.ProviderType.WALLET_LINK];return typeof window<"u"&&window.ethereum!==void 0?a.unshift(Ft.ProviderType.INJECTED):a.unshift(Ft.ProviderType.METAMASK_MOBILE),a}async disconnect(){this.connector&&(this.connector.removeAllListeners(Za.Deactivate),this.connector.removeAllListeners(Za.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(a,t=At.ChainId.ETHEREUM_MAINNET){const i=await this.buildConnector(a,t).getProvider();return Zd.adapt(i)}buildConnector(a,t){switch(a){case Ft.ProviderType.INJECTED:return new ZU(t);case Ft.ProviderType.FORTMATIC:return new WU(t);case Ft.ProviderType.MAGIC:return new Pj(t);case Ft.ProviderType.MAGIC_TEST:return new uF(t);case Ft.ProviderType.WALLET_LINK:return new sF(t);case Ft.ProviderType.NETWORK:return new nF(t);case Ft.ProviderType.WALLET_CONNECT_V2:return new Ma(t);default:throw new Error(`Invalid provider ${a}`)}}getConnectionData(){const{storageKey:a}=$a(),t=this.storage.get(a);return t?JSON.parse(t):void 0}setConnectionData(a,t){const{storageKey:n}=$a(),i=JSON.stringify({providerType:a,chainId:t});this.storage.set(n,i)}isClosableConnector(){return this.connector&&typeof this.connector.close<"u"}}const Qg=new dF(new cF),fF=e=>/^decentraland.(zone|org|today)$/.test(e),pF=async(e,a="https://peer.decentraland.org")=>{try{const n=await(await fetch(`${a}/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}},hF=e=>({shouldUseBasePath:fF,fetchAvatar:a=>pF(a),...e,debug:e.debug??!1}),mF=e=>({[Bn.ChainId.ETHEREUM_MAINNET]:"Ethereum Mainnet",[Bn.ChainId.ETHEREUM_SEPOLIA]:"Ethereum Sepolia",[Bn.ChainId.MATIC_MAINNET]:"Polygon Mainnet",[Bn.ChainId.MATIC_AMOY]:"Polygon Amoy"})[e]||`Chain ID ${e}`,yF=e=>{const a="0x"+e.toString(16),t=mF(e);switch(e){case Bn.ChainId.MATIC_MAINNET:return{chainId:a,chainName:t,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:["https://rpc-mainnet.maticvigil.com/"],blockExplorerUrls:["https://polygonscan.com/"]};case Bn.ChainId.MATIC_AMOY:return{chainId:a,chainName:t,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:["https://rpc-amoy.polygon.technology/"],blockExplorerUrls:["https://www.oklink.com/amoy"]};case Bn.ChainId.ETHEREUM_SEPOLIA:return{chainId:a,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"]}}},gN=async e=>{const a=await e.request({method:"eth_chainId"});return parseInt(a,16)},Xr=(e,a,t=!1)=>{t&&typeof console<"u"&&console.log(`[Auth] ${e}`,a||"")},gF=(e,a,t)=>{const i=new URLSearchParams(t).get("redirectTo"),s=e.shouldUseBasePath?.(window.location.host)?e.basePath:"",u=i?`${s}${i}`:`${s}${a}${t}`;return`${e.authUrl}/login?redirectTo=${encodeURIComponent(window.location.origin+u)}`},Aj=G.createContext(void 0),_F=({children:e,config:a})=>{const{pathname:t,search:n}=Ni(),i=G.useMemo(()=>hF(a),[a]),[s,u]=G.useState(),[c,f]=G.useState(),[p,m]=G.useState(!1),[h,_]=G.useState(!1),[T,C]=G.useState(i.defaultChainId),O=G.useCallback(()=>{Xr("Initiating sign in",{pathname:t,search:n},i.debug);const I=gF(i,t,n);Xr("Redirecting to auth",{redirectUrl:I},i.debug),window.location.replace(I)},[t,n,i]),E=G.useCallback(()=>{try{Xr("Signing out",{wallet:s},i.debug),Qg.disconnect(),s&&Bv.localStorageClearIdentity(s),u(void 0),f(void 0),m(!1),Xr("Sign out completed",void 0,i.debug)}catch(I){console.error("Error during sign-out:",I)}},[s,i.debug]),R=G.useCallback(async(I=Bn.ChainId.ETHEREUM_MAINNET)=>{try{Xr("Changing network",{from:T,to:I},i.debug);const A=await Qg.getProvider();if(!A){console.error("No provider available to switch network"),C(Bn.ChainId.ETHEREUM_MAINNET);return}C(I);try{await A.request({method:"wallet_switchEthereumChain",params:[{chainId:"0x"+I.toString(16)}]});const y=await gN(A);y!==I&&console.warn("Chain ID did not change as expected"),Xr("Network changed successfully",{chainId:y},i.debug)}catch(y){const S=y;S.code===4902?(Xr("Adding new chain to wallet",{chainId:I},i.debug),await A.request({method:"wallet_addEthereumChain",params:[yF(I)]}),await gN(A)!==I&&(console.warn("Chain ID not set after adding network"),C(Bn.ChainId.ETHEREUM_MAINNET))):(console.error("Error switching network:",S),C(Bn.ChainId.ETHEREUM_MAINNET))}}catch(A){console.error("Error during network change:",A),C(Bn.ChainId.ETHEREUM_MAINNET)}},[T,i.debug]);G.useEffect(()=>{(async()=>{try{_(!0),Xr("Checking auth status",void 0,i.debug);try{const{account:A,chainId:y}=await Qg.tryPreviousConnection();if(A){Xr("Previous connection found",{address:A,chainId:y},i.debug),u(A),C(y);let S=!1;try{const M=Bv.localStorageGetIdentity(A);if(M&&M.expiration){const U=new Date(M.expiration),V=new Date;V.getTime()<=U.getTime()?(Xr("Identity valid",{expiration:U},i.debug),S=!0):Xr("Identity expired",{expiration:U,now:V},i.debug)}else Xr("No identity found",void 0,i.debug)}catch(M){console.error("Error checking identity:",M)}if(m(S),S&&i.fetchAvatar)try{Xr("Fetching avatar",{address:A},i.debug);const M=await i.fetchAvatar(A);M&&(f(M),Xr("Avatar fetched successfully",M,i.debug))}catch(M){console.error("Error fetching avatar:",M)}}else Xr("No previous connection found",void 0,i.debug)}catch(A){Xr("Previous connection failed",A,i.debug)}}catch(A){console.error("Error checking auth status:",A)}finally{_(!1)}})()},[i.debug,i.fetchAvatar]);const v={wallet:s,avatar:c,chainId:T,isSignedIn:p,isConnecting:h,signIn:O,signOut:E,changeNetwork:R};return k.jsx(Aj.Provider,{value:v,children:e})},yf=e=>{const a=G.useContext(Aj);if(a===void 0)throw new Error("useAuth must be used within an AuthProvider");return a};var qo={},oa={},pl={exports:{}};var vF=pl.exports,_N;function gf(){return _N||(_N=1,(function(e,a){(function(t,n){n(a)})(vF,(function(t){function n(b){if(b.jsonrpc="2.0",!b.id||typeof b.id!="number"||Math.floor(b.id)!==b.id)throw new Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(b)}`);if(!b.method||typeof b.method!="string"||b.method.trim().length===0)throw new Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(b)}`);if(!b.params||typeof b.params!="object")throw new Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(b)}`);return b}var i={};function s(){let b,N;const q=new Promise(((J,te)=>{b=oe=>{J(oe),q.isPending=!1},N=oe=>{te(oe),q.isPending=!1}})).catch((J=>Promise.reject(J)));return q.resolve=b,q.reject=N,"finally"in q||(q.finally=J=>{q.then(J),q.catch(J)}),q.isPending=!0,q}Object.defineProperty(i,"__esModule",{value:!0});var u=i.future=s;i.default=s;var c={exports:{}};(function(b){(function(){var N="input is invalid type",q=typeof window=="object",J=q?window:{};J.JS_SHA3_NO_WINDOW&&(q=!1);var te=!q&&typeof self=="object";!J.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node?J=dD:te&&(J=self);var oe=!J.JS_SHA3_NO_COMMON_JS&&b.exports,Ie=!J.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",ze="0123456789abcdef".split(""),st=[4,1024,262144,67108864],ct=[0,8,16,24],gr=[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],Xt=[224,256,384,512],Ke=[128,256],Tr=["hex","buffer","arrayBuffer","array","digest"],Jt={128:168,256:136};!J.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(w){return Object.prototype.toString.call(w)==="[object Array]"}),!Ie||!J.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(w){return typeof w=="object"&&w.buffer&&w.buffer.constructor===ArrayBuffer});for(var Ht=function(w,z,x){return function(Y){return new Bt(w,z,w).update(Y)[x]()}},Nr=function(w,z,x){return function(Y,re){return new Bt(w,z,re).update(Y)[x]()}},In=function(w,z,x){return function(Y,re,ee,ie){return lr["cshake"+w].update(Y,re,ee,ie)[x]()}},xr=function(w,z,x){return function(Y,re,ee,ie){return lr["kmac"+w].update(Y,re,ee,ie)[x]()}},Pr=function(w,z,x,Y){for(var re=0;re<Tr.length;++re){var ee=Tr[re];w[ee]=z(x,Y,ee)}return w},Nn=function(w,z){var x=Ht(w,z,"hex");return x.create=function(){return new Bt(w,z,w)},x.update=function(Y){return x.create().update(Y)},Pr(x,Ht,w,z)},on=[{name:"keccak",padding:[1,256,65536,16777216],bits:Xt,createMethod:Nn},{name:"sha3",padding:[6,1536,393216,100663296],bits:Xt,createMethod:Nn},{name:"shake",padding:[31,7936,2031616,520093696],bits:Ke,createMethod:function(w,z){var x=Nr(w,z,"hex");return x.create=function(Y){return new Bt(w,z,Y)},x.update=function(Y,re){return x.create(re).update(Y)},Pr(x,Nr,w,z)}},{name:"cshake",padding:st,bits:Ke,createMethod:function(w,z){var x=Jt[w],Y=In(w,0,"hex");return Y.create=function(re,ee,ie){return ee||ie?new Bt(w,z,re).bytepad([ee,ie],x):lr["shake"+w].create(re)},Y.update=function(re,ee,ie,he){return Y.create(ee,ie,he).update(re)},Pr(Y,In,w,z)}},{name:"kmac",padding:st,bits:Ke,createMethod:function(w,z){var x=Jt[w],Y=xr(w,0,"hex");return Y.create=function(re,ee,ie){return new pr(w,z,ee).bytepad(["KMAC",ie],x).bytepad([re],x)},Y.update=function(re,ee,ie,he){return Y.create(re,ie,he).update(ee)},Pr(Y,xr,w,z)}}],lr={},zr=[],_r=0;_r<on.length;++_r)for(var Rn=on[_r],Ve=Rn.bits,yn=0;yn<Ve.length;++yn){var zn=Rn.name+"_"+Ve[yn];if(zr.push(zn),lr[zn]=Rn.createMethod(Ve[yn],Rn.padding),Rn.name!=="sha3"){var Ea=Rn.name+Ve[yn];zr.push(Ea),lr[Ea]=lr[zn]}}function Bt(w,z,x){this.blocks=[],this.s=[],this.padding=z,this.outputBits=x,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(w<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=x>>5,this.extraBytes=(31&x)>>3;for(var Y=0;Y<50;++Y)this.s[Y]=0}function pr(w,z,x){Bt.call(this,w,z,x)}Bt.prototype.update=function(w){if(this.finalized)throw new Error("finalize already called");var z,x=typeof w;if(x!=="string"){if(x!=="object")throw new Error(N);if(w===null)throw new Error(N);if(Ie&&w.constructor===ArrayBuffer)w=new Uint8Array(w);else if(!(Array.isArray(w)||Ie&&ArrayBuffer.isView(w)))throw new Error(N);z=!0}for(var Y,re,ee=this.blocks,ie=this.byteCount,he=w.length,ve=this.blockCount,_e=0,Ye=this.s;_e<he;){if(this.reset)for(this.reset=!1,ee[0]=this.block,Y=1;Y<ve+1;++Y)ee[Y]=0;if(z)for(Y=this.start;_e<he&&Y<ie;++_e)ee[Y>>2]|=w[_e]<<ct[3&Y++];else for(Y=this.start;_e<he&&Y<ie;++_e)(re=w.charCodeAt(_e))<128?ee[Y>>2]|=re<<ct[3&Y++]:re<2048?(ee[Y>>2]|=(192|re>>6)<<ct[3&Y++],ee[Y>>2]|=(128|63&re)<<ct[3&Y++]):re<55296||re>=57344?(ee[Y>>2]|=(224|re>>12)<<ct[3&Y++],ee[Y>>2]|=(128|re>>6&63)<<ct[3&Y++],ee[Y>>2]|=(128|63&re)<<ct[3&Y++]):(re=65536+((1023&re)<<10|1023&w.charCodeAt(++_e)),ee[Y>>2]|=(240|re>>18)<<ct[3&Y++],ee[Y>>2]|=(128|re>>12&63)<<ct[3&Y++],ee[Y>>2]|=(128|re>>6&63)<<ct[3&Y++],ee[Y>>2]|=(128|63&re)<<ct[3&Y++]);if(this.lastByteIndex=Y,Y>=ie){for(this.start=Y-ie,this.block=ee[ve],Y=0;Y<ve;++Y)Ye[Y]^=ee[Y];W(Ye),this.reset=!0}else this.start=Y}return this},Bt.prototype.encode=function(w,z){var x=255&w,Y=1,re=[x];for(x=255&(w>>=8);x>0;)re.unshift(x),x=255&(w>>=8),++Y;return z?re.push(Y):re.unshift(Y),this.update(re),re.length},Bt.prototype.encodeString=function(w){var z,x=typeof w;if(x!=="string"){if(x!=="object")throw new Error(N);if(w===null)throw new Error(N);if(Ie&&w.constructor===ArrayBuffer)w=new Uint8Array(w);else if(!(Array.isArray(w)||Ie&&ArrayBuffer.isView(w)))throw new Error(N);z=!0}var Y=0,re=w.length;if(z)Y=re;else for(var ee=0;ee<w.length;++ee){var ie=w.charCodeAt(ee);ie<128?Y+=1:ie<2048?Y+=2:ie<55296||ie>=57344?Y+=3:(ie=65536+((1023&ie)<<10|1023&w.charCodeAt(++ee)),Y+=4)}return Y+=this.encode(8*Y),this.update(w),Y},Bt.prototype.bytepad=function(w,z){for(var x=this.encode(z),Y=0;Y<w.length;++Y)x+=this.encodeString(w[Y]);var re=z-x%z,ee=[];return ee.length=re,this.update(ee),this},Bt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var w=this.blocks,z=this.lastByteIndex,x=this.blockCount,Y=this.s;if(w[z>>2]|=this.padding[3&z],this.lastByteIndex===this.byteCount)for(w[0]=w[x],z=1;z<x+1;++z)w[z]=0;for(w[x-1]|=2147483648,z=0;z<x;++z)Y[z]^=w[z];W(Y)}},Bt.prototype.toString=Bt.prototype.hex=function(){this.finalize();for(var w,z=this.blockCount,x=this.s,Y=this.outputBlocks,re=this.extraBytes,ee=0,ie=0,he="";ie<Y;){for(ee=0;ee<z&&ie<Y;++ee,++ie)w=x[ee],he+=ze[w>>4&15]+ze[15&w]+ze[w>>12&15]+ze[w>>8&15]+ze[w>>20&15]+ze[w>>16&15]+ze[w>>28&15]+ze[w>>24&15];ie%z==0&&(W(x),ee=0)}return re&&(w=x[ee],he+=ze[w>>4&15]+ze[15&w],re>1&&(he+=ze[w>>12&15]+ze[w>>8&15]),re>2&&(he+=ze[w>>20&15]+ze[w>>16&15])),he},Bt.prototype.arrayBuffer=function(){this.finalize();var w,z=this.blockCount,x=this.s,Y=this.outputBlocks,re=this.extraBytes,ee=0,ie=0,he=this.outputBits>>3;w=re?new ArrayBuffer(Y+1<<2):new ArrayBuffer(he);for(var ve=new Uint32Array(w);ie<Y;){for(ee=0;ee<z&&ie<Y;++ee,++ie)ve[ie]=x[ee];ie%z==0&&W(x)}return re&&(ve[ee]=x[ee],w=w.slice(0,he)),w},Bt.prototype.buffer=Bt.prototype.arrayBuffer,Bt.prototype.digest=Bt.prototype.array=function(){this.finalize();for(var w,z,x=this.blockCount,Y=this.s,re=this.outputBlocks,ee=this.extraBytes,ie=0,he=0,ve=[];he<re;){for(ie=0;ie<x&&he<re;++ie,++he)w=he<<2,z=Y[ie],ve[w]=255&z,ve[w+1]=z>>8&255,ve[w+2]=z>>16&255,ve[w+3]=z>>24&255;he%x==0&&W(Y)}return ee&&(w=he<<2,z=Y[ie],ve[w]=255&z,ee>1&&(ve[w+1]=z>>8&255),ee>2&&(ve[w+2]=z>>16&255)),ve},pr.prototype=new Bt,pr.prototype.finalize=function(){return this.encode(this.outputBits,!0),Bt.prototype.finalize.call(this)};var W=function(w){var z,x,Y,re,ee,ie,he,ve,_e,Ye,mt,gt,Nt,Qt,$t,jt,Ut,nr,Wn,ba,wa,qr,Cn,Er,hr,Zt,is,os,oi,ss,us,ls,Di,cs,ds,fs,ps,hs,ms,ys,si,Sa,gs,ki,qi,Bi,Ui,Fi,Gn,_s,vs,Es,Vi,Hi,Ta,Pa,bs,qa,ws,zi,ui,li,Wi;for(Y=0;Y<48;Y+=2)re=w[0]^w[10]^w[20]^w[30]^w[40],ee=w[1]^w[11]^w[21]^w[31]^w[41],ie=w[2]^w[12]^w[22]^w[32]^w[42],he=w[3]^w[13]^w[23]^w[33]^w[43],ve=w[4]^w[14]^w[24]^w[34]^w[44],_e=w[5]^w[15]^w[25]^w[35]^w[45],Ye=w[6]^w[16]^w[26]^w[36]^w[46],mt=w[7]^w[17]^w[27]^w[37]^w[47],z=(gt=w[8]^w[18]^w[28]^w[38]^w[48])^(ie<<1|he>>>31),x=(Nt=w[9]^w[19]^w[29]^w[39]^w[49])^(he<<1|ie>>>31),w[0]^=z,w[1]^=x,w[10]^=z,w[11]^=x,w[20]^=z,w[21]^=x,w[30]^=z,w[31]^=x,w[40]^=z,w[41]^=x,z=re^(ve<<1|_e>>>31),x=ee^(_e<<1|ve>>>31),w[2]^=z,w[3]^=x,w[12]^=z,w[13]^=x,w[22]^=z,w[23]^=x,w[32]^=z,w[33]^=x,w[42]^=z,w[43]^=x,z=ie^(Ye<<1|mt>>>31),x=he^(mt<<1|Ye>>>31),w[4]^=z,w[5]^=x,w[14]^=z,w[15]^=x,w[24]^=z,w[25]^=x,w[34]^=z,w[35]^=x,w[44]^=z,w[45]^=x,z=ve^(gt<<1|Nt>>>31),x=_e^(Nt<<1|gt>>>31),w[6]^=z,w[7]^=x,w[16]^=z,w[17]^=x,w[26]^=z,w[27]^=x,w[36]^=z,w[37]^=x,w[46]^=z,w[47]^=x,z=Ye^(re<<1|ee>>>31),x=mt^(ee<<1|re>>>31),w[8]^=z,w[9]^=x,w[18]^=z,w[19]^=x,w[28]^=z,w[29]^=x,w[38]^=z,w[39]^=x,w[48]^=z,w[49]^=x,Qt=w[0],$t=w[1],Bi=w[11]<<4|w[10]>>>28,Ui=w[10]<<4|w[11]>>>28,os=w[20]<<3|w[21]>>>29,oi=w[21]<<3|w[20]>>>29,zi=w[31]<<9|w[30]>>>23,ui=w[30]<<9|w[31]>>>23,Sa=w[40]<<18|w[41]>>>14,gs=w[41]<<18|w[40]>>>14,cs=w[2]<<1|w[3]>>>31,ds=w[3]<<1|w[2]>>>31,jt=w[13]<<12|w[12]>>>20,Ut=w[12]<<12|w[13]>>>20,Fi=w[22]<<10|w[23]>>>22,Gn=w[23]<<10|w[22]>>>22,ss=w[33]<<13|w[32]>>>19,us=w[32]<<13|w[33]>>>19,li=w[42]<<2|w[43]>>>30,Wi=w[43]<<2|w[42]>>>30,Hi=w[5]<<30|w[4]>>>2,Ta=w[4]<<30|w[5]>>>2,fs=w[14]<<6|w[15]>>>26,ps=w[15]<<6|w[14]>>>26,nr=w[25]<<11|w[24]>>>21,Wn=w[24]<<11|w[25]>>>21,_s=w[34]<<15|w[35]>>>17,vs=w[35]<<15|w[34]>>>17,ls=w[45]<<29|w[44]>>>3,Di=w[44]<<29|w[45]>>>3,Er=w[6]<<28|w[7]>>>4,hr=w[7]<<28|w[6]>>>4,Pa=w[17]<<23|w[16]>>>9,bs=w[16]<<23|w[17]>>>9,hs=w[26]<<25|w[27]>>>7,ms=w[27]<<25|w[26]>>>7,ba=w[36]<<21|w[37]>>>11,wa=w[37]<<21|w[36]>>>11,Es=w[47]<<24|w[46]>>>8,Vi=w[46]<<24|w[47]>>>8,ki=w[8]<<27|w[9]>>>5,qi=w[9]<<27|w[8]>>>5,Zt=w[18]<<20|w[19]>>>12,is=w[19]<<20|w[18]>>>12,qa=w[29]<<7|w[28]>>>25,ws=w[28]<<7|w[29]>>>25,ys=w[38]<<8|w[39]>>>24,si=w[39]<<8|w[38]>>>24,qr=w[48]<<14|w[49]>>>18,Cn=w[49]<<14|w[48]>>>18,w[0]=Qt^~jt&nr,w[1]=$t^~Ut&Wn,w[10]=Er^~Zt&os,w[11]=hr^~is&oi,w[20]=cs^~fs&hs,w[21]=ds^~ps&ms,w[30]=ki^~Bi&Fi,w[31]=qi^~Ui&Gn,w[40]=Hi^~Pa&qa,w[41]=Ta^~bs&ws,w[2]=jt^~nr&ba,w[3]=Ut^~Wn&wa,w[12]=Zt^~os&ss,w[13]=is^~oi&us,w[22]=fs^~hs&ys,w[23]=ps^~ms&si,w[32]=Bi^~Fi&_s,w[33]=Ui^~Gn&vs,w[42]=Pa^~qa&zi,w[43]=bs^~ws&ui,w[4]=nr^~ba&qr,w[5]=Wn^~wa&Cn,w[14]=os^~ss&ls,w[15]=oi^~us&Di,w[24]=hs^~ys&Sa,w[25]=ms^~si&gs,w[34]=Fi^~_s&Es,w[35]=Gn^~vs&Vi,w[44]=qa^~zi&li,w[45]=ws^~ui&Wi,w[6]=ba^~qr&Qt,w[7]=wa^~Cn&$t,w[16]=ss^~ls&Er,w[17]=us^~Di&hr,w[26]=ys^~Sa&cs,w[27]=si^~gs&ds,w[36]=_s^~Es&ki,w[37]=vs^~Vi&qi,w[46]=zi^~li&Hi,w[47]=ui^~Wi&Ta,w[8]=qr^~Qt&jt,w[9]=Cn^~$t&Ut,w[18]=ls^~Er&Zt,w[19]=Di^~hr&is,w[28]=Sa^~cs&fs,w[29]=gs^~ds&ps,w[38]=Es^~ki&Bi,w[39]=Vi^~qi&Ui,w[48]=li^~Hi&Pa,w[49]=Wi^~Ta&bs,w[0]^=gr[Y],w[1]^=gr[Y+1]};if(oe)b.exports=lr;else for(_r=0;_r<zr.length;++_r)J[zr[_r]]=lr[zr[_r]]})()})(c);var f=c.exports,p=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,m=Math.ceil,h=Math.floor,_="[BigNumber Error] ",T=_+"Number primitive has more than 15 significant digits: ",C=1e14,O=14,E=9007199254740991,R=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],v=1e7,I=1e9;function A(b){var N=0|b;return b>0||b===N?N:N-1}function y(b){for(var N,q,J=1,te=b.length,oe=b[0]+"";J<te;){for(N=b[J++]+"",q=O-N.length;q--;N="0"+N);oe+=N}for(te=oe.length;oe.charCodeAt(--te)===48;);return oe.slice(0,te+1||1)}function S(b,N){var q,J,te=b.c,oe=N.c,Ie=b.s,ze=N.s,st=b.e,ct=N.e;if(!Ie||!ze)return null;if(q=te&&!te[0],J=oe&&!oe[0],q||J)return q?J?0:-ze:Ie;if(Ie!=ze)return Ie;if(q=Ie<0,J=st==ct,!te||!oe)return J?0:!te^q?1:-1;if(!J)return st>ct^q?1:-1;for(ze=(st=te.length)<(ct=oe.length)?st:ct,Ie=0;Ie<ze;Ie++)if(te[Ie]!=oe[Ie])return te[Ie]>oe[Ie]^q?1:-1;return st==ct?0:st>ct^q?1:-1}function M(b,N,q,J){if(b<N||b>q||b!==h(b))throw Error(_+(J||"Argument")+(typeof b=="number"?b<N||b>q?" out of range: ":" not an integer: ":" not a primitive number: ")+String(b))}function U(b){var N=b.c.length-1;return A(b.e/O)==N&&b.c[N]%2!=0}function V(b,N){return(b.length>1?b.charAt(0)+"."+b.slice(1):b)+(N<0?"e":"e+")+N}function Q(b,N,q){var J,te;if(N<0){for(te=q+".";++N;te+=q);b=te+b}else if(++N>(J=b.length)){for(te=q,N-=J;--N;te+=q);b+=te}else N<J&&(b=b.slice(0,N)+"."+b.slice(N));return b}var ne=(function b(N){var q,J,te,oe,Ie,ze,st,ct,gr,Xt,Ke=Ve.prototype={constructor:Ve,toString:null,valueOf:null},Tr=new Ve(1),Jt=20,Ht=4,Nr=-7,In=21,xr=-1e7,Pr=1e7,Nn=!1,on=1,lr=0,zr={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},_r="0123456789abcdefghijklmnopqrstuvwxyz",Rn=!0;function Ve(W,w){var z,x,Y,re,ee,ie,he,ve,_e=this;if(!(_e instanceof Ve))return new Ve(W,w);if(w==null){if(W&&W._isBigNumber===!0)return _e.s=W.s,void(!W.c||W.e>Pr?_e.c=_e.e=null:W.e<xr?_e.c=[_e.e=0]:(_e.e=W.e,_e.c=W.c.slice()));if((ie=typeof W=="number")&&0*W==0){if(_e.s=1/W<0?(W=-W,-1):1,W===~~W){for(re=0,ee=W;ee>=10;ee/=10,re++);return void(re>Pr?_e.c=_e.e=null:(_e.e=re,_e.c=[W]))}ve=String(W)}else{if(!p.test(ve=String(W)))return te(_e,ve,ie);_e.s=ve.charCodeAt(0)==45?(ve=ve.slice(1),-1):1}(re=ve.indexOf("."))>-1&&(ve=ve.replace(".","")),(ee=ve.search(/e/i))>0?(re<0&&(re=ee),re+=+ve.slice(ee+1),ve=ve.substring(0,ee)):re<0&&(re=ve.length)}else{if(M(w,2,_r.length,"Base"),w==10&&Rn)return Bt(_e=new Ve(W),Jt+_e.e+1,Ht);if(ve=String(W),ie=typeof W=="number"){if(0*W!=0)return te(_e,ve,ie,w);if(_e.s=1/W<0?(ve=ve.slice(1),-1):1,Ve.DEBUG&&ve.replace(/^0\.0*|\./,"").length>15)throw Error(T+W)}else _e.s=ve.charCodeAt(0)===45?(ve=ve.slice(1),-1):1;for(z=_r.slice(0,w),re=ee=0,he=ve.length;ee<he;ee++)if(z.indexOf(x=ve.charAt(ee))<0){if(x=="."){if(ee>re){re=he;continue}}else if(!Y&&(ve==ve.toUpperCase()&&(ve=ve.toLowerCase())||ve==ve.toLowerCase()&&(ve=ve.toUpperCase()))){Y=!0,ee=-1,re=0;continue}return te(_e,String(W),ie,w)}ie=!1,(re=(ve=J(ve,w,10,_e.s)).indexOf("."))>-1?ve=ve.replace(".",""):re=ve.length}for(ee=0;ve.charCodeAt(ee)===48;ee++);for(he=ve.length;ve.charCodeAt(--he)===48;);if(ve=ve.slice(ee,++he)){if(he-=ee,ie&&Ve.DEBUG&&he>15&&(W>E||W!==h(W)))throw Error(T+_e.s*W);if((re=re-ee-1)>Pr)_e.c=_e.e=null;else if(re<xr)_e.c=[_e.e=0];else{if(_e.e=re,_e.c=[],ee=(re+1)%O,re<0&&(ee+=O),ee<he){for(ee&&_e.c.push(+ve.slice(0,ee)),he-=O;ee<he;)_e.c.push(+ve.slice(ee,ee+=O));ee=O-(ve=ve.slice(ee)).length}else ee-=he;for(;ee--;ve+="0");_e.c.push(+ve)}}else _e.c=[_e.e=0]}function yn(W,w,z,x){var Y,re,ee,ie,he;if(z==null?z=Ht:M(z,0,8),!W.c)return W.toString();if(Y=W.c[0],ee=W.e,w==null)he=y(W.c),he=x==1||x==2&&(ee<=Nr||ee>=In)?V(he,ee):Q(he,ee,"0");else if(re=(W=Bt(new Ve(W),w,z)).e,ie=(he=y(W.c)).length,x==1||x==2&&(w<=re||re<=Nr)){for(;ie<w;he+="0",ie++);he=V(he,re)}else if(w-=ee,he=Q(he,re,"0"),re+1>ie){if(--w>0)for(he+=".";w--;he+="0");}else if((w+=re-ie)>0)for(re+1==ie&&(he+=".");w--;he+="0");return W.s<0&&Y?"-"+he:he}function zn(W,w){for(var z,x=1,Y=new Ve(W[0]);x<W.length;x++){if(!(z=new Ve(W[x])).s){Y=z;break}w.call(Y,z)&&(Y=z)}return Y}function Ea(W,w,z){for(var x=1,Y=w.length;!w[--Y];w.pop());for(Y=w[0];Y>=10;Y/=10,x++);return(z=x+z*O-1)>Pr?W.c=W.e=null:z<xr?W.c=[W.e=0]:(W.e=z,W.c=w),W}function Bt(W,w,z,x){var Y,re,ee,ie,he,ve,_e,Ye=W.c,mt=R;if(Ye){e:{for(Y=1,ie=Ye[0];ie>=10;ie/=10,Y++);if((re=w-Y)<0)re+=O,ee=w,_e=(he=Ye[ve=0])/mt[Y-ee-1]%10|0;else if((ve=m((re+1)/O))>=Ye.length){if(!x)break e;for(;Ye.length<=ve;Ye.push(0));he=_e=0,Y=1,ee=(re%=O)-O+1}else{for(he=ie=Ye[ve],Y=1;ie>=10;ie/=10,Y++);_e=(ee=(re%=O)-O+Y)<0?0:he/mt[Y-ee-1]%10|0}if(x=x||w<0||Ye[ve+1]!=null||(ee<0?he:he%mt[Y-ee-1]),x=z<4?(_e||x)&&(z==0||z==(W.s<0?3:2)):_e>5||_e==5&&(z==4||x||z==6&&(re>0?ee>0?he/mt[Y-ee]:0:Ye[ve-1])%10&1||z==(W.s<0?8:7)),w<1||!Ye[0])return Ye.length=0,x?(w-=W.e+1,Ye[0]=mt[(O-w%O)%O],W.e=-w||0):Ye[0]=W.e=0,W;if(re==0?(Ye.length=ve,ie=1,ve--):(Ye.length=ve+1,ie=mt[O-re],Ye[ve]=ee>0?h(he/mt[Y-ee]%mt[ee])*ie:0),x)for(;;){if(ve==0){for(re=1,ee=Ye[0];ee>=10;ee/=10,re++);for(ee=Ye[0]+=ie,ie=1;ee>=10;ee/=10,ie++);re!=ie&&(W.e++,Ye[0]==C&&(Ye[0]=1));break}if(Ye[ve]+=ie,Ye[ve]!=C)break;Ye[ve--]=0,ie=1}for(re=Ye.length;Ye[--re]===0;Ye.pop());}W.e>Pr?W.c=W.e=null:W.e<xr&&(W.c=[W.e=0])}return W}function pr(W){var w,z=W.e;return z===null?W.toString():(w=y(W.c),w=z<=Nr||z>=In?V(w,z):Q(w,z,"0"),W.s<0?"-"+w:w)}return Ve.clone=b,Ve.ROUND_UP=0,Ve.ROUND_DOWN=1,Ve.ROUND_CEIL=2,Ve.ROUND_FLOOR=3,Ve.ROUND_HALF_UP=4,Ve.ROUND_HALF_DOWN=5,Ve.ROUND_HALF_EVEN=6,Ve.ROUND_HALF_CEIL=7,Ve.ROUND_HALF_FLOOR=8,Ve.EUCLID=9,Ve.config=Ve.set=function(W){var w,z;if(W!=null){if(typeof W!="object")throw Error(_+"Object expected: "+W);if(W.hasOwnProperty(w="DECIMAL_PLACES")&&(M(z=W[w],0,I,w),Jt=z),W.hasOwnProperty(w="ROUNDING_MODE")&&(M(z=W[w],0,8,w),Ht=z),W.hasOwnProperty(w="EXPONENTIAL_AT")&&((z=W[w])&&z.pop?(M(z[0],-I,0,w),M(z[1],0,I,w),Nr=z[0],In=z[1]):(M(z,-I,I,w),Nr=-(In=z<0?-z:z))),W.hasOwnProperty(w="RANGE"))if((z=W[w])&&z.pop)M(z[0],-I,-1,w),M(z[1],1,I,w),xr=z[0],Pr=z[1];else{if(M(z,-I,I,w),!z)throw Error(_+w+" cannot be zero: "+z);xr=-(Pr=z<0?-z:z)}if(W.hasOwnProperty(w="CRYPTO")){if((z=W[w])!==!!z)throw Error(_+w+" not true or false: "+z);if(z){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Nn=!z,Error(_+"crypto unavailable");Nn=z}else Nn=z}if(W.hasOwnProperty(w="MODULO_MODE")&&(M(z=W[w],0,9,w),on=z),W.hasOwnProperty(w="POW_PRECISION")&&(M(z=W[w],0,I,w),lr=z),W.hasOwnProperty(w="FORMAT")){if(typeof(z=W[w])!="object")throw Error(_+w+" not an object: "+z);zr=z}if(W.hasOwnProperty(w="ALPHABET")){if(typeof(z=W[w])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(z))throw Error(_+w+" invalid: "+z);Rn=z.slice(0,10)=="0123456789",_r=z}}return{DECIMAL_PLACES:Jt,ROUNDING_MODE:Ht,EXPONENTIAL_AT:[Nr,In],RANGE:[xr,Pr],CRYPTO:Nn,MODULO_MODE:on,POW_PRECISION:lr,FORMAT:zr,ALPHABET:_r}},Ve.isBigNumber=function(W){if(!W||W._isBigNumber!==!0)return!1;if(!Ve.DEBUG)return!0;var w,z,x=W.c,Y=W.e,re=W.s;e:if({}.toString.call(x)=="[object Array]"){if((re===1||re===-1)&&Y>=-I&&Y<=I&&Y===h(Y)){if(x[0]===0){if(Y===0&&x.length===1)return!0;break e}if((w=(Y+1)%O)<1&&(w+=O),String(x[0]).length==w){for(w=0;w<x.length;w++)if((z=x[w])<0||z>=C||z!==h(z))break e;if(z!==0)return!0}}}else if(x===null&&Y===null&&(re===null||re===1||re===-1))return!0;throw Error(_+"Invalid BigNumber: "+W)},Ve.maximum=Ve.max=function(){return zn(arguments,Ke.lt)},Ve.minimum=Ve.min=function(){return zn(arguments,Ke.gt)},Ve.random=(oe=9007199254740992,Ie=Math.random()*oe&2097151?function(){return h(Math.random()*oe)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(W){var w,z,x,Y,re,ee=0,ie=[],he=new Ve(Tr);if(W==null?W=Jt:M(W,0,I),Y=m(W/O),Nn)if(crypto.getRandomValues){for(w=crypto.getRandomValues(new Uint32Array(Y*=2));ee<Y;)(re=131072*w[ee]+(w[ee+1]>>>11))>=9e15?(z=crypto.getRandomValues(new Uint32Array(2)),w[ee]=z[0],w[ee+1]=z[1]):(ie.push(re%1e14),ee+=2);ee=Y/2}else{if(!crypto.randomBytes)throw Nn=!1,Error(_+"crypto unavailable");for(w=crypto.randomBytes(Y*=7);ee<Y;)(re=281474976710656*(31&w[ee])+1099511627776*w[ee+1]+4294967296*w[ee+2]+16777216*w[ee+3]+(w[ee+4]<<16)+(w[ee+5]<<8)+w[ee+6])>=9e15?crypto.randomBytes(7).copy(w,ee):(ie.push(re%1e14),ee+=7);ee=Y/7}if(!Nn)for(;ee<Y;)(re=Ie())<9e15&&(ie[ee++]=re%1e14);for(Y=ie[--ee],W%=O,Y&&W&&(re=R[O-W],ie[ee]=h(Y/re)*re);ie[ee]===0;ie.pop(),ee--);if(ee<0)ie=[x=0];else{for(x=-1;ie[0]===0;ie.splice(0,1),x-=O);for(ee=1,re=ie[0];re>=10;re/=10,ee++);ee<O&&(x-=O-ee)}return he.e=x,he.c=ie,he}),Ve.sum=function(){for(var W=1,w=arguments,z=new Ve(w[0]);W<w.length;)z=z.plus(w[W++]);return z},J=(function(){var W="0123456789";function w(z,x,Y,re){for(var ee,ie,he=[0],ve=0,_e=z.length;ve<_e;){for(ie=he.length;ie--;he[ie]*=x);for(he[0]+=re.indexOf(z.charAt(ve++)),ee=0;ee<he.length;ee++)he[ee]>Y-1&&(he[ee+1]==null&&(he[ee+1]=0),he[ee+1]+=he[ee]/Y|0,he[ee]%=Y)}return he.reverse()}return function(z,x,Y,re,ee){var ie,he,ve,_e,Ye,mt,gt,Nt,Qt=z.indexOf("."),$t=Jt,jt=Ht;for(Qt>=0&&(_e=lr,lr=0,z=z.replace(".",""),mt=(Nt=new Ve(x)).pow(z.length-Qt),lr=_e,Nt.c=w(Q(y(mt.c),mt.e,"0"),10,Y,W),Nt.e=Nt.c.length),ve=_e=(gt=w(z,x,Y,ee?(ie=_r,W):(ie=W,_r))).length;gt[--_e]==0;gt.pop());if(!gt[0])return ie.charAt(0);if(Qt<0?--ve:(mt.c=gt,mt.e=ve,mt.s=re,gt=(mt=q(mt,Nt,$t,jt,Y)).c,Ye=mt.r,ve=mt.e),Qt=gt[he=ve+$t+1],_e=Y/2,Ye=Ye||he<0||gt[he+1]!=null,Ye=jt<4?(Qt!=null||Ye)&&(jt==0||jt==(mt.s<0?3:2)):Qt>_e||Qt==_e&&(jt==4||Ye||jt==6&&1&gt[he-1]||jt==(mt.s<0?8:7)),he<1||!gt[0])z=Ye?Q(ie.charAt(1),-$t,ie.charAt(0)):ie.charAt(0);else{if(gt.length=he,Ye)for(--Y;++gt[--he]>Y;)gt[he]=0,he||(++ve,gt=[1].concat(gt));for(_e=gt.length;!gt[--_e];);for(Qt=0,z="";Qt<=_e;z+=ie.charAt(gt[Qt++]));z=Q(z,ve,ie.charAt(0))}return z}})(),q=(function(){function W(x,Y,re){var ee,ie,he,ve,_e=0,Ye=x.length,mt=Y%v,gt=Y/v|0;for(x=x.slice();Ye--;)_e=((ie=mt*(he=x[Ye]%v)+(ee=gt*he+(ve=x[Ye]/v|0)*mt)%v*v+_e)/re|0)+(ee/v|0)+gt*ve,x[Ye]=ie%re;return _e&&(x=[_e].concat(x)),x}function w(x,Y,re,ee){var ie,he;if(re!=ee)he=re>ee?1:-1;else for(ie=he=0;ie<re;ie++)if(x[ie]!=Y[ie]){he=x[ie]>Y[ie]?1:-1;break}return he}function z(x,Y,re,ee){for(var ie=0;re--;)x[re]-=ie,ie=x[re]<Y[re]?1:0,x[re]=ie*ee+x[re]-Y[re];for(;!x[0]&&x.length>1;x.splice(0,1));}return function(x,Y,re,ee,ie){var he,ve,_e,Ye,mt,gt,Nt,Qt,$t,jt,Ut,nr,Wn,ba,wa,qr,Cn,Er=x.s==Y.s?1:-1,hr=x.c,Zt=Y.c;if(!(hr&&hr[0]&&Zt&&Zt[0]))return new Ve(x.s&&Y.s&&(hr?!Zt||hr[0]!=Zt[0]:Zt)?hr&&hr[0]==0||!Zt?0*Er:Er/0:NaN);for($t=(Qt=new Ve(Er)).c=[],Er=re+(ve=x.e-Y.e)+1,ie||(ie=C,ve=A(x.e/O)-A(Y.e/O),Er=Er/O|0),_e=0;Zt[_e]==(hr[_e]||0);_e++);if(Zt[_e]>(hr[_e]||0)&&ve--,Er<0)$t.push(1),Ye=!0;else{for(ba=hr.length,qr=Zt.length,_e=0,Er+=2,(mt=h(ie/(Zt[0]+1)))>1&&(Zt=W(Zt,mt,ie),hr=W(hr,mt,ie),qr=Zt.length,ba=hr.length),Wn=qr,Ut=(jt=hr.slice(0,qr)).length;Ut<qr;jt[Ut++]=0);Cn=Zt.slice(),Cn=[0].concat(Cn),wa=Zt[0],Zt[1]>=ie/2&&wa++;do{if(mt=0,(he=w(Zt,jt,qr,Ut))<0){if(nr=jt[0],qr!=Ut&&(nr=nr*ie+(jt[1]||0)),(mt=h(nr/wa))>1)for(mt>=ie&&(mt=ie-1),Nt=(gt=W(Zt,mt,ie)).length,Ut=jt.length;w(gt,jt,Nt,Ut)==1;)mt--,z(gt,qr<Nt?Cn:Zt,Nt,ie),Nt=gt.length,he=1;else mt==0&&(he=mt=1),Nt=(gt=Zt.slice()).length;if(Nt<Ut&&(gt=[0].concat(gt)),z(jt,gt,Ut,ie),Ut=jt.length,he==-1)for(;w(Zt,jt,qr,Ut)<1;)mt++,z(jt,qr<Ut?Cn:Zt,Ut,ie),Ut=jt.length}else he===0&&(mt++,jt=[0]);$t[_e++]=mt,jt[0]?jt[Ut++]=hr[Wn]||0:(jt=[hr[Wn]],Ut=1)}while((Wn++<ba||jt[0]!=null)&&Er--);Ye=jt[0]!=null,$t[0]||$t.splice(0,1)}if(ie==C){for(_e=1,Er=$t[0];Er>=10;Er/=10,_e++);Bt(Qt,re+(Qt.e=_e+ve*O-1)+1,ee,Ye)}else Qt.e=ve,Qt.r=+Ye;return Qt}})(),ze=/^(-?)0([xbo])(?=\w[\w.]*$)/i,st=/^([^.]+)\.$/,ct=/^\.([^.]+)$/,gr=/^-?(Infinity|NaN)$/,Xt=/^\s*\+(?=[\w.])|^\s+|\s+$/g,te=function(W,w,z,x){var Y,re=z?w:w.replace(Xt,"");if(gr.test(re))W.s=isNaN(re)?null:re<0?-1:1;else{if(!z&&(re=re.replace(ze,(function(ee,ie,he){return Y=(he=he.toLowerCase())=="x"?16:he=="b"?2:8,x&&x!=Y?ee:ie})),x&&(Y=x,re=re.replace(st,"$1").replace(ct,"0.$1")),w!=re))return new Ve(re,Y);if(Ve.DEBUG)throw Error(_+"Not a"+(x?" base "+x:"")+" number: "+w);W.s=null}W.c=W.e=null},Ke.absoluteValue=Ke.abs=function(){var W=new Ve(this);return W.s<0&&(W.s=1),W},Ke.comparedTo=function(W,w){return S(this,new Ve(W,w))},Ke.decimalPlaces=Ke.dp=function(W,w){var z,x,Y,re=this;if(W!=null)return M(W,0,I),w==null?w=Ht:M(w,0,8),Bt(new Ve(re),W+re.e+1,w);if(!(z=re.c))return null;if(x=((Y=z.length-1)-A(this.e/O))*O,Y=z[Y])for(;Y%10==0;Y/=10,x--);return x<0&&(x=0),x},Ke.dividedBy=Ke.div=function(W,w){return q(this,new Ve(W,w),Jt,Ht)},Ke.dividedToIntegerBy=Ke.idiv=function(W,w){return q(this,new Ve(W,w),0,1)},Ke.exponentiatedBy=Ke.pow=function(W,w){var z,x,Y,re,ee,ie,he,ve,_e=this;if((W=new Ve(W)).c&&!W.isInteger())throw Error(_+"Exponent not an integer: "+pr(W));if(w!=null&&(w=new Ve(w)),ee=W.e>14,!_e.c||!_e.c[0]||_e.c[0]==1&&!_e.e&&_e.c.length==1||!W.c||!W.c[0])return ve=new Ve(Math.pow(+pr(_e),ee?W.s*(2-U(W)):+pr(W))),w?ve.mod(w):ve;if(ie=W.s<0,w){if(w.c?!w.c[0]:!w.s)return new Ve(NaN);(x=!ie&&_e.isInteger()&&w.isInteger())&&(_e=_e.mod(w))}else{if(W.e>9&&(_e.e>0||_e.e<-1||(_e.e==0?_e.c[0]>1||ee&&_e.c[1]>=24e7:_e.c[0]<8e13||ee&&_e.c[0]<=9999975e7)))return re=_e.s<0&&U(W)?-0:0,_e.e>-1&&(re=1/re),new Ve(ie?1/re:re);lr&&(re=m(lr/O+2))}for(ee?(z=new Ve(.5),ie&&(W.s=1),he=U(W)):he=(Y=Math.abs(+pr(W)))%2,ve=new Ve(Tr);;){if(he){if(!(ve=ve.times(_e)).c)break;re?ve.c.length>re&&(ve.c.length=re):x&&(ve=ve.mod(w))}if(Y){if((Y=h(Y/2))===0)break;he=Y%2}else if(Bt(W=W.times(z),W.e+1,1),W.e>14)he=U(W);else{if((Y=+pr(W))==0)break;he=Y%2}_e=_e.times(_e),re?_e.c&&_e.c.length>re&&(_e.c.length=re):x&&(_e=_e.mod(w))}return x?ve:(ie&&(ve=Tr.div(ve)),w?ve.mod(w):re?Bt(ve,lr,Ht,void 0):ve)},Ke.integerValue=function(W){var w=new Ve(this);return W==null?W=Ht:M(W,0,8),Bt(w,w.e+1,W)},Ke.isEqualTo=Ke.eq=function(W,w){return S(this,new Ve(W,w))===0},Ke.isFinite=function(){return!!this.c},Ke.isGreaterThan=Ke.gt=function(W,w){return S(this,new Ve(W,w))>0},Ke.isGreaterThanOrEqualTo=Ke.gte=function(W,w){return(w=S(this,new Ve(W,w)))===1||w===0},Ke.isInteger=function(){return!!this.c&&A(this.e/O)>this.c.length-2},Ke.isLessThan=Ke.lt=function(W,w){return S(this,new Ve(W,w))<0},Ke.isLessThanOrEqualTo=Ke.lte=function(W,w){return(w=S(this,new Ve(W,w)))===-1||w===0},Ke.isNaN=function(){return!this.s},Ke.isNegative=function(){return this.s<0},Ke.isPositive=function(){return this.s>0},Ke.isZero=function(){return!!this.c&&this.c[0]==0},Ke.minus=function(W,w){var z,x,Y,re,ee=this,ie=ee.s;if(w=(W=new Ve(W,w)).s,!ie||!w)return new Ve(NaN);if(ie!=w)return W.s=-w,ee.plus(W);var he=ee.e/O,ve=W.e/O,_e=ee.c,Ye=W.c;if(!he||!ve){if(!_e||!Ye)return _e?(W.s=-w,W):new Ve(Ye?ee:NaN);if(!_e[0]||!Ye[0])return Ye[0]?(W.s=-w,W):new Ve(_e[0]?ee:Ht==3?-0:0)}if(he=A(he),ve=A(ve),_e=_e.slice(),ie=he-ve){for((re=ie<0)?(ie=-ie,Y=_e):(ve=he,Y=Ye),Y.reverse(),w=ie;w--;Y.push(0));Y.reverse()}else for(x=(re=(ie=_e.length)<(w=Ye.length))?ie:w,ie=w=0;w<x;w++)if(_e[w]!=Ye[w]){re=_e[w]<Ye[w];break}if(re&&(Y=_e,_e=Ye,Ye=Y,W.s=-W.s),(w=(x=Ye.length)-(z=_e.length))>0)for(;w--;_e[z++]=0);for(w=C-1;x>ie;){if(_e[--x]<Ye[x]){for(z=x;z&&!_e[--z];_e[z]=w);--_e[z],_e[x]+=C}_e[x]-=Ye[x]}for(;_e[0]==0;_e.splice(0,1),--ve);return _e[0]?Ea(W,_e,ve):(W.s=Ht==3?-1:1,W.c=[W.e=0],W)},Ke.modulo=Ke.mod=function(W,w){var z,x,Y=this;return W=new Ve(W,w),!Y.c||!W.s||W.c&&!W.c[0]?new Ve(NaN):!W.c||Y.c&&!Y.c[0]?new Ve(Y):(on==9?(x=W.s,W.s=1,z=q(Y,W,0,3),W.s=x,z.s*=x):z=q(Y,W,0,on),(W=Y.minus(z.times(W))).c[0]||on!=1||(W.s=Y.s),W)},Ke.multipliedBy=Ke.times=function(W,w){var z,x,Y,re,ee,ie,he,ve,_e,Ye,mt,gt,Nt,Qt,$t,jt=this,Ut=jt.c,nr=(W=new Ve(W,w)).c;if(!(Ut&&nr&&Ut[0]&&nr[0]))return!jt.s||!W.s||Ut&&!Ut[0]&&!nr||nr&&!nr[0]&&!Ut?W.c=W.e=W.s=null:(W.s*=jt.s,Ut&&nr?(W.c=[0],W.e=0):W.c=W.e=null),W;for(x=A(jt.e/O)+A(W.e/O),W.s*=jt.s,(he=Ut.length)<(Ye=nr.length)&&(Nt=Ut,Ut=nr,nr=Nt,Y=he,he=Ye,Ye=Y),Y=he+Ye,Nt=[];Y--;Nt.push(0));for(Qt=C,$t=v,Y=Ye;--Y>=0;){for(z=0,mt=nr[Y]%$t,gt=nr[Y]/$t|0,re=Y+(ee=he);re>Y;)z=((ve=mt*(ve=Ut[--ee]%$t)+(ie=gt*ve+(_e=Ut[ee]/$t|0)*mt)%$t*$t+Nt[re]+z)/Qt|0)+(ie/$t|0)+gt*_e,Nt[re--]=ve%Qt;Nt[re]=z}return z?++x:Nt.splice(0,1),Ea(W,Nt,x)},Ke.negated=function(){var W=new Ve(this);return W.s=-W.s||null,W},Ke.plus=function(W,w){var z,x=this,Y=x.s;if(w=(W=new Ve(W,w)).s,!Y||!w)return new Ve(NaN);if(Y!=w)return W.s=-w,x.minus(W);var re=x.e/O,ee=W.e/O,ie=x.c,he=W.c;if(!re||!ee){if(!ie||!he)return new Ve(Y/0);if(!ie[0]||!he[0])return he[0]?W:new Ve(ie[0]?x:0*Y)}if(re=A(re),ee=A(ee),ie=ie.slice(),Y=re-ee){for(Y>0?(ee=re,z=he):(Y=-Y,z=ie),z.reverse();Y--;z.push(0));z.reverse()}for((Y=ie.length)-(w=he.length)<0&&(z=he,he=ie,ie=z,w=Y),Y=0;w;)Y=(ie[--w]=ie[w]+he[w]+Y)/C|0,ie[w]=C===ie[w]?0:ie[w]%C;return Y&&(ie=[Y].concat(ie),++ee),Ea(W,ie,ee)},Ke.precision=Ke.sd=function(W,w){var z,x,Y,re=this;if(W!=null&&W!==!!W)return M(W,1,I),w==null?w=Ht:M(w,0,8),Bt(new Ve(re),W,w);if(!(z=re.c))return null;if(x=(Y=z.length-1)*O+1,Y=z[Y]){for(;Y%10==0;Y/=10,x--);for(Y=z[0];Y>=10;Y/=10,x++);}return W&&re.e+1>x&&(x=re.e+1),x},Ke.shiftedBy=function(W){return M(W,-9007199254740991,E),this.times("1e"+W)},Ke.squareRoot=Ke.sqrt=function(){var W,w,z,x,Y,re=this,ee=re.c,ie=re.s,he=re.e,ve=Jt+4,_e=new Ve("0.5");if(ie!==1||!ee||!ee[0])return new Ve(!ie||ie<0&&(!ee||ee[0])?NaN:ee?re:1/0);if((ie=Math.sqrt(+pr(re)))==0||ie==1/0?(((w=y(ee)).length+he)%2==0&&(w+="0"),ie=Math.sqrt(+w),he=A((he+1)/2)-(he<0||he%2),z=new Ve(w=ie==1/0?"5e"+he:(w=ie.toExponential()).slice(0,w.indexOf("e")+1)+he)):z=new Ve(ie+""),z.c[0]){for((ie=(he=z.e)+ve)<3&&(ie=0);;)if(Y=z,z=_e.times(Y.plus(q(re,Y,ve,1))),y(Y.c).slice(0,ie)===(w=y(z.c)).slice(0,ie)){if(z.e<he&&--ie,(w=w.slice(ie-3,ie+1))!="9999"&&(x||w!="4999")){+w&&(+w.slice(1)||w.charAt(0)!="5")||(Bt(z,z.e+Jt+2,1),W=!z.times(z).eq(re));break}if(!x&&(Bt(Y,Y.e+Jt+2,0),Y.times(Y).eq(re))){z=Y;break}ve+=4,ie+=4,x=1}}return Bt(z,z.e+Jt+1,Ht,W)},Ke.toExponential=function(W,w){return W!=null&&(M(W,0,I),W++),yn(this,W,w,1)},Ke.toFixed=function(W,w){return W!=null&&(M(W,0,I),W=W+this.e+1),yn(this,W,w)},Ke.toFormat=function(W,w,z){var x,Y=this;if(z==null)W!=null&&w&&typeof w=="object"?(z=w,w=null):W&&typeof W=="object"?(z=W,W=w=null):z=zr;else if(typeof z!="object")throw Error(_+"Argument not an object: "+z);if(x=Y.toFixed(W,w),Y.c){var re,ee=x.split("."),ie=+z.groupSize,he=+z.secondaryGroupSize,ve=z.groupSeparator||"",_e=ee[0],Ye=ee[1],mt=Y.s<0,gt=mt?_e.slice(1):_e,Nt=gt.length;if(he&&(re=ie,ie=he,he=re,Nt-=re),ie>0&&Nt>0){for(re=Nt%ie||ie,_e=gt.substr(0,re);re<Nt;re+=ie)_e+=ve+gt.substr(re,ie);he>0&&(_e+=ve+gt.slice(re)),mt&&(_e="-"+_e)}x=Ye?_e+(z.decimalSeparator||"")+((he=+z.fractionGroupSize)?Ye.replace(new RegExp("\\d{"+he+"}\\B","g"),"$&"+(z.fractionGroupSeparator||"")):Ye):_e}return(z.prefix||"")+x+(z.suffix||"")},Ke.toFraction=function(W){var w,z,x,Y,re,ee,ie,he,ve,_e,Ye,mt,gt=this,Nt=gt.c;if(W!=null&&(!(ie=new Ve(W)).isInteger()&&(ie.c||ie.s!==1)||ie.lt(Tr)))throw Error(_+"Argument "+(ie.isInteger()?"out of range: ":"not an integer: ")+pr(ie));if(!Nt)return new Ve(gt);for(w=new Ve(Tr),ve=z=new Ve(Tr),x=he=new Ve(Tr),mt=y(Nt),re=w.e=mt.length-gt.e-1,w.c[0]=R[(ee=re%O)<0?O+ee:ee],W=!W||ie.comparedTo(w)>0?re>0?w:ve:ie,ee=Pr,Pr=1/0,ie=new Ve(mt),he.c[0]=0;_e=q(ie,w,0,1),(Y=z.plus(_e.times(x))).comparedTo(W)!=1;)z=x,x=Y,ve=he.plus(_e.times(Y=ve)),he=Y,w=ie.minus(_e.times(Y=w)),ie=Y;return Y=q(W.minus(z),x,0,1),he=he.plus(Y.times(ve)),z=z.plus(Y.times(x)),he.s=ve.s=gt.s,Ye=q(ve,x,re*=2,Ht).minus(gt).abs().comparedTo(q(he,z,re,Ht).minus(gt).abs())<1?[ve,x]:[he,z],Pr=ee,Ye},Ke.toNumber=function(){return+pr(this)},Ke.toPrecision=function(W,w){return W!=null&&M(W,1,I),yn(this,W,w,2)},Ke.toString=function(W){var w,z=this,x=z.s,Y=z.e;return Y===null?x?(w="Infinity",x<0&&(w="-"+w)):w="NaN":(W==null?w=Y<=Nr||Y>=In?V(y(z.c),Y):Q(y(z.c),Y,"0"):W===10&&Rn?w=Q(y((z=Bt(new Ve(z),Jt+Y+1,Ht)).c),z.e,"0"):(M(W,2,_r.length,"Base"),w=J(Q(y(z.c),Y,"0"),10,W,x,!0)),x<0&&z.c[0]&&(w="-"+w)),w},Ke.valueOf=Ke.toJSON=function(){return pr(this)},Ke._isBigNumber=!0,Ke[Symbol.toStringTag]="BigNumber",Ke[Symbol.for("nodejs.util.inspect.custom")]=Ke.valueOf,N!=null&&Ve.set(N),Ve})();const me={ROUNDING_MODE:ne.ROUND_DOWN};function be(b){return new TextEncoder().encode(b)}function Ne(b){return typeof b=="string"?Ne(ye(b)):new TextDecoder().decode(b)}ne.config(me);const Ae="UNKNOWN_ERROR",Re="INVALID_ARGUMENT";function Me(b,N=Ae,q={}){const J=[];Object.keys(q).forEach((Ie=>{try{J.push(Ie+"="+JSON.stringify(q[Ie]))}catch{J.push(Ie+"="+JSON.stringify(q[Ie].toString()))}}));const te=b;J.length&&(b+=" ("+J.join(", ")+")");const oe=new Error(b);return oe.reason=te,oe.code=N,Object.keys(q).forEach((function(Ie){oe[Ie]=q[Ie]})),oe}function ye(b){if(typeof b!="string")throw new Error("hexToBytes only accept strings, got: "+typeof b);if(b.substr(0,2)==="0x")return ye(b.substr(2));const N=new Uint8Array(Math.ceil(b.length/2));let q=0;for(let J=0;J<b.length;J+=2){const te=parseInt(b.substr(J,2),16);if(isNaN(te))throw new Error("Cannot read hex string:"+JSON.stringify(b));N[q]=te,q++}return N}function le(b){return Array.from(b).map((N=>N.toString(16).padStart(2,"0"))).join("")}function X(b,N){if(typeof b=="string"){if(N&&N.encoding==="hex"&&typeof b=="string"){let q=b;q.length>2&&q.substr(0,2)==="0x"&&(q=q.substr(2));const J=ye(q);return f.keccak256(J)}return f.keccak256(be(b))}return f.keccak256(b)}const j={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 F(b,N,q){return new Array(N-b.length+1).join(q||"0")+b}function B(b){let N="",q=0;const J=b.length;for(b.substring(0,2)==="0x"&&(q=2);q<J;q+=2){const te=parseInt(b.substr(q,2),16);N+=String.fromCharCode(te)}return N}function L(b){return rn(b)&&b.name&&b.name.indexOf("(")!==-1?b.name:b.name+"("+ue(!1,b.inputs||[]).join(",")+")"}function K(...b){const N=b.reduce(((te,oe)=>te+oe.length),0),q=new Uint8Array(N);let J=0;for(const te of b)q.set(te,J),J+=te.length;return q}function ue(b,N){const q=[];return N.forEach((function(J){if(typeof J.components=="object"){if(J.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let te="";const oe=J.type.indexOf("[");oe>=0&&(te=J.type.substring(oe));const Ie=ue(b,J.components);q.push("("+Ie.join(",")+")"+te)}else q.push(J.type)})),q}function Oe(b){const N=b.indexOf("("),q=b.indexOf(")");return N!==-1&&q!==-1?b.substr(0,N):b}function Te(b){const N=b.indexOf("("),q=b.indexOf(")");return N!==-1&&q!==-1?b.substr(N+1,q-N-1).replace(" ",""):""}function Be(b){return b==null?b:Dt(b).toNumber()}function je(b){return Dt(b).toNumber()}function ce(b){return Lr(b)?b.toString(10):""+b}function fe(b){return typeof b=="string"&&!b.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(b)?"0x"+b:Le(b)}function Pe(b){if(typeof b=="string")return b.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(b)?Le(b):"0x"+le(be(b));if(b instanceof Uint8Array)return"0x"+le(b);throw new Error(`toStringData: Error trying to convert ${b} (${typeof b}) to a hex string.`)}function De(b){return typeof b=="boolean"?b:Dt(b).toNumber()!==0}function Ge(b){const N=Dt(b),q=N.toString(16);return N.isLessThan(0)?"-0x"+q.substr(1):"0x"+q}function Le(b){if(Tn(b))return Ge(+b);if(Lr(b))return Ge(b);if(Sn(b)){const N=b;if(N.indexOf("-0x")===0)return Ge(N);if(N.indexOf("0x")===0)return N;if(!isFinite(N))return le(be(N))}if(b instanceof Uint8Array)return"0x"+le(b);if(nn(b)||rn(b))throw new Error("toHex can only be called with scalar values, not objects or arrays");return Ge(b)}function Rt(b){const N=b?b.toLowerCase():"ether",q=j[N];if(q===void 0)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(j,null,2));return new ne(q,10)}function Dt(b){let N=b||0;return Lr(N)?N:(typeof N=="string"&&(N=N.trim()),typeof N!="string"||N.indexOf("0x")!==0&&N.indexOf("-0x")!==0?N instanceof Uint8Array?new ne(le(N),16):new ne(N,10):new ne(N.replace("0x","").toLowerCase(),16))}function Gt(b){return new ne(new Array(b).fill("1").join(""),2)}function It(b,N=256){const q=Dt(b).integerValue();return q.isLessThan(0)?Gt(N).plus(q).plus(1):q}function Fe(b,N){return F(b.toString(2),N,"0")[0]==="1"}function pt(b){if(typeof b!="string")throw Me("invalid address",Re,{arg:"address",value:b});if(b.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return b.trim().substring(0,2)!=="0x"&&(b="0x"+b),jr(b);throw Me("invalid address",Re,{arg:"address",value:b})}function Qe(b,N=256){if(Fe(b,N)){const q=Gt(N);return b.minus(q).minus(1)}return b}function qt(b){return/^0x[0-9a-f]{40}$/i.test(b)}function Kt(b){return!!/^(0x)?[0-9a-f]{40}$/i.test(b)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(b)&&!/^(0x)?[0-9A-F]{40}$/.test(b))||tr(b))}function tr(b){const N=b.replace("0x",""),q=X(N.toLowerCase());for(let J=0;J<40;J++)if(parseInt(q[J],16)>7&&N[J].toUpperCase()!==N[J]||parseInt(q[J],16)<=7&&N[J].toLowerCase()!==N[J])return!1;return!0}function jr(b){if(b===void 0)return"";const N=b.toLowerCase().replace("0x",""),q=X(N);let J="0x";for(let te=0;te<N.length;te++)parseInt(q[te],16)>7?J+=N[te].toUpperCase():J+=N[te];return J}function fr(b){if(!Array.isArray(b))throw new Error(`Value was not an array: ${JSON.stringify(b)}`);return b}function mn(b){return qt(b)?b:/^[0-9a-f]{40}$/.test(b)?"0x"+b:"0x"+F(Le(b).substr(2),40)}function Lr(b){return b instanceof ne}function Sn(b){return typeof b=="string"||b&&b.constructor&&b.constructor.name==="String"}function rn(b){return b!==null&&!Array.isArray(b)&&typeof b=="object"}function Tn(b){return typeof b=="boolean"}function nn(b){return Array.isArray(b)}var ni,Pn;function ja(b,N){if(!b)throw new Error("jsonrpc method should be specified!");if(typeof b!="string")throw new Error(`jsonrpc must be a string, got ${typeof b}!`);return t.messageId++,{jsonrpc:"2.0",id:t.messageId,method:b,params:N||[]}}function La(b){return Array.isArray(b)?b.every(N):N(b);function N(q){return!!q&&(q.error===void 0||q.error===null)&&q.jsonrpc==="2.0"&&q.id!==null&&"result"in q&&q.result!==void 0}}t.TransactionStatus=void 0,(ni=t.TransactionStatus||(t.TransactionStatus={})).pending="pending",ni.confirmed="confirmed",ni.failed="failed",t.TransactionType=void 0,(Pn=t.TransactionType||(t.TransactionType={})).queued="queued",Pn.dropped="dropped",Pn.replaced="replaced",Pn.pending="pending",Pn.reverted="reverted",Pn.confirmed="confirmed",t.messageId=0;function _a(b){return Dt(b)}function Da(b){return b==="latest"||b==="pending"||b==="earliest"}function Dr(b){return b===void 0?"latest":Ct(b)}function Ct(b){return b==null?null:Da(b)?b:Le(b)}function Qr(b){return b.from&&(b.from=Ce(b.from)),b.to&&(b.to=Ce(b.to)),b.gasPrice!==void 0&&(b.gasPrice=Ge(b.gasPrice)),b.gas!==void 0&&(b.gas=Ge(b.gas)),b.value!==void 0&&(b.value=Ge(b.value)),b.nonce!==void 0&&(b.nonce=Ge(b.nonce)),b.data&&!b.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(b.data)&&(b.data="0x"+b.data),b}function an(b){if(typeof b!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(b));if(b.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(b));if(b.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(b));return b}function ae(b){if(typeof b!="object")throw new Error("Did not provide transaction options");if(!b.from)throw new Error('Missing "from" in transaction options');return b.from=Ce(b.from),b.to&&(b.to=Ce(b.to)),b.gasPrice!==void 0&&(b.gasPrice=Ge(b.gasPrice)),b.gas!==void 0&&(b.gas=Ge(b.gas)),b.value!==void 0&&(b.value=Ge(b.value)),b.nonce!==void 0&&(b.nonce=Ge(b.nonce)),b.data&&!b.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(b.data)&&(b.data="0x"+b.data),b}function H(b){return b?(b.blockNumber!==null&&(b.blockNumber=je(b.blockNumber)),b.transactionIndex!==null&&(b.transactionIndex=je(b.transactionIndex)),b.nonce=je(b.nonce),b.gas=je(b.gas),b.gasPrice=Dt(b.gasPrice),b.value=Dt(b.value),b):null}function $(b){return b?(b.blockNumber!==null&&(b.blockNumber=je(b.blockNumber)),b.transactionIndex!==null&&(b.transactionIndex=je(b.transactionIndex)),b.cumulativeGasUsed=je(b.cumulativeGasUsed),b.gasUsed=je(b.gasUsed),b.logs&&nn(b.logs)&&(b.logs=b.logs.map((function(N){return Se(N)}))),b.status=je(b.status||""),b):null}function pe(b){return b?(b.gasLimit=je(b.gasLimit),b.gasUsed=je(b.gasUsed),b.size=je(b.size),b.timestamp=je(b.timestamp),b.number!==null&&(b.number=je(b.number)),b.difficulty=Dt(b.difficulty),b.totalDifficulty=Dt(b.totalDifficulty),nn(b.transactions)&&b.transactions.forEach((function(N,q){Sn(N)||(b.transactions[q]=H(N)||b.transactions[q])})),b):null}function Se(b){return b&&(b.blockNumber&&(b.blockNumber=je(b.blockNumber)),b.transactionIndex&&(b.transactionIndex=je(b.transactionIndex)),b.logIndex&&(b.logIndex=je(b.logIndex)),b)}function Ce(b){if(qt(b))return b;if(Kt(b))return"0x"+b;throw new Error(`Invalid address: ${JSON.stringify(b)}`)}function Xe(b){return b}function Je(b){return b&&(b.startingBlock=je(b.startingBlock),b.currentBlock=je(b.currentBlock),b.highestBlock=je(b.highestBlock),b.knownStates&&(b.knownStates=je(b.knownStates),b.pulledStates=je(b.pulledStates)),b)}function _t(b){if(b===null)throw Me("cannot convert null value to array",Re,{arg:"value",value:b});if(b instanceof Uint8Array)return new Uint8Array(b);if(typeof b=="string"){const N=b.match(/^(0x)?[0-9a-fA-F]*$/);if(!N)throw Me("invalid hexidecimal string",Re,{arg:"value",value:b});if(N[1]!=="0x")throw Me("hex string must have 0x prefix",Re,{arg:"value",value:b});(b=b.substring(2)).length%2&&(b="0"+b);const q=[];for(let J=0;J<b.length;J+=2)q.push(parseInt(b.substr(J,2),16));return new Uint8Array(q)}if((function(N){if(!N||parseInt(String(N.length))!==N.length||typeof N=="string")return!1;for(let q=0;q<N.length;q++){const J=N[q];if(J<0||J>=256||parseInt(String(J))!==J)return!1}return!0})(b))return new Uint8Array(b);throw Me("invalid arrayify value",void 0,{arg:"value",value:b,type:typeof b})}function dt(b,N,q){Object.defineProperty(b,N,{enumerable:!0,value:q,writable:!1})}const St=new ne(-1),Ot=new ne(0),Mt=new ne(1),or=new ne("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function rr(b){return(function(N,q){function J(Ie){return new Error('unexpected character "'+N[Ie]+'" at position '+Ie+' in "'+N+'"')}const te={type:"",name:"",state:{allowType:!0}};let oe=te;for(let Ie=0;Ie<N.length;Ie++){const ze=N[Ie];switch(ze){case"(":if(!oe.state.allowParams)throw J(Ie);oe.state.allowType=!1,oe.type=wr(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=wr(oe.type);const st=oe;if(oe=oe.parent,!oe)throw J(Ie);delete st.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=wr(oe.type);const ct={type:"",name:"",parent:oe.parent,state:{allowType:!0}};oe.parent.components.push(ct),delete oe.parent,oe=ct;break;case" ":oe.state.allowType&&oe.type!==""&&(oe.type=wr(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 J(Ie);oe.type+=ze,oe.state.allowArray=!1,oe.state.allowName=!1,oe.state.readArray=!0;break;case"]":if(!oe.state.readArray)throw J(Ie);oe.type+=ze,oe.state.readArray=!1,oe.state.allowArray=!0,oe.state.allowName=!0;break;default:if(oe.state.allowType)oe.type+=ze,oe.state.allowParams=!0,oe.state.allowArray=!0;else if(oe.state.allowName)oe.name+=ze,delete oe.state.allowArray;else{if(!oe.state.readArray)throw J(Ie);oe.type+=ze}}}if(oe.parent)throw new Error("unexpected eof");return delete te.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),te.type=wr(te.type),te})(b)}function wr(b){return b.match(/^uint($|[^1-9])/)?b="uint256"+b.substring(4):b.match(/^int($|[^1-9])/)&&(b="int256"+b.substring(3)),b}const Hr=new RegExp(/^bytes([0-9]*)$/),An=new RegExp(/^(u?int)([0-9]*)$/),Vn=new RegExp(/^(.*)\[([0-9]*)\]$/),ai=function(b,N){const q=b.match(An);return q&&parseInt(q[2])<=48?N.toNumber():N};class kr{constructor(N,q,J,te="",oe){this.coerceFunc=N,this.name=q,this.type=J,this.localName=te,this.dynamic=oe}}class va extends kr{constructor(N){super(N.coerceFunc,N.name,N.type,void 0,N.dynamic),dt(this,"coder",N)}encode(N){return this.coder.encode(N)}decode(N,q){return this.coder.decode(N,q)}}class tu extends kr{constructor(N,q){super(N,"null","",q,!1)}encode(N){return _t([])}decode(N,q){if(q>N.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function Ri(b,N){return new ne(b.toString(2).substr(-N),2)}class Nl extends kr{constructor(N,q,J,te){const oe=(J?"int":"uint")+8*q;super(N,oe,oe,te,!1),this.size=q,this.signed=J}encode(N){try{let q=Dt(N);if(this.signed){let te=Ri(or,8*this.size-1);if(q.gt(te))throw new Error("out-of-bounds");if(te=te.plus(Mt).multipliedBy(St),q.lt(te))throw new Error("out-of-bounds")}else if(q.lt(Ot)||q.gt(Ri(or,8*this.size)))throw new Error("out-of-bounds");q=Ri(It(q,8*this.size),8*this.size),this.signed&&(q=It(Qe(q,8*this.size),256));const J=F(It(q).toString(16),64);if(J.indexOf("NaN")!==-1)throw Me("invalid number value, NaN",Re,{arg:this.localName,coderType:this.name,value:N,v:q,twosComplement:It(q),twosComplement16:It(q).toString(16),pad:F(It(q).toString(16),64),size:this.size});return ye(J)}catch(q){throw Me("invalid number value",Re,{arg:this.localName,coderType:this.name,value:N,message:q.toString()})}}decode(N,q){if(N.length<q+32)throw Me("insufficient data for "+this.name+" type",Re,{arg:this.localName,coderType:this.name,value:Le(N.slice(q,q+32))});const J=32-this.size;let te=new ne(le(N.slice(q+J,q+32)),16);return te=this.signed?Qe(te,8*this.size):Ri(te,8*this.size),{consumed:32,value:this.coerceFunc(this.name,te)}}}const Hn=new Nl((function(b,N){return N}),32,!1,"none");class sr extends kr{constructor(N,q,J){const te="bytes"+q;super(N,te,te,J,!1),this.length=q}encode(N){const q=new Uint8Array(32);try{if(typeof N=="string"&&N.length%2!=0)throw new Error("hex string cannot be odd-length");const J=_t(N);if(J.length>this.length)throw new Error("incorrect data length");q.set(J)}catch(J){throw Me("invalid "+this.name+" value. Use hex strings or Uint8Array",Re,{arg:this.localName,coderType:this.name,value:J.value||N,details:J.message})}return q}decode(N,q){if(N.length<q+32)throw Me("insufficient data for "+this.name+" type",Re,{arg:this.localName,coderType:this.name,value:Le(N.slice(q,q+32))});return{consumed:32,value:this.coerceFunc(this.name,N.slice(q,q+this.length))}}}function Rl(b){const N=32*Math.ceil(b.length/32),q=new Uint8Array(N-b.length);return K(Hn.encode(b.length),b,q)}function rs(b,N,q){if(b.length<N+32)throw Me("insufficient data for dynamicBytes length",Re,{arg:q,coderType:"dynamicBytes",value:Le(b.slice(N,N+32))});let J=Hn.decode(b,N).value;try{J=J.toNumber()}catch(te){throw te("dynamic bytes count too large",Re,{arg:q,coderType:"dynamicBytes",value:J.toString()})}if(b.length<N+32+J)throw Me("insufficient data for dynamicBytes type",Re,{arg:q,coderType:"dynamicBytes",value:Le(b.slice(N,N+32+J))});return{consumed:32+32*Math.ceil(J/32),value:b.slice(N+32,N+32+J)}}function Ci(b){return 32*Math.ceil(b/32)}function Mi(b,N){if(!Array.isArray(N)){if(!N||typeof N!="object")throw Me("invalid tuple value",Re,{coderType:"tuple",value:N});{const st=[];b.forEach((function(ct){st.push(N[ct.localName])})),N=st}}if(b.length!==N.length)throw Me("types/value length mismatch",Re,{coderType:"tuple",value:N});const q=[];b.forEach((function(st,ct){q.push({dynamic:st.dynamic,value:st.encode(N[ct])})}));let J=0,te=0;q.forEach((function(st){st.dynamic?(J+=32,te+=Ci(st.value.length)):J+=Ci(st.value.length)}));let oe=0,Ie=J;const ze=new Uint8Array(J+te);return q.forEach((function(st){st.dynamic?(ze.set(Hn.encode(Ie),oe),oe+=32,ze.set(st.value,Ie),Ie+=Ci(st.value.length)):(ze.set(st.value,oe),oe+=Ci(st.value.length))})),ze}class Sf extends Array{}class Cl extends kr{constructor(N,q,J,te){super(N,"array",q.type+"["+(J>=0?J:"")+"]",te,J===-1||q.dynamic),this.coder=q,this.length=J}encode(N){if(!Array.isArray(N))throw Me("expected array value",Re,{arg:this.localName,coderType:"array",value:N});let q=this.length,J=new Uint8Array(0);q===-1&&(q=N.length,J=Hn.encode(q)),(function(oe,Ie,ze){if(ze||(ze=""),oe<Ie)throw Me("missing argument"+ze,"MISSING_ARGUMENT",{count:oe,expectedCount:Ie});if(oe>Ie)throw Me("too many arguments"+ze,"UNEXPECTED_ARGUMENT",{count:oe,expectedCount:Ie})})(q,N.length,"in coder array"+(this.localName?" "+this.localName:""));const te=[];for(let oe=0;oe<N.length;oe++)te.push(this.coder);return K(J,Mi(te,N))}decode(N,q){let J=0,te=this.length;if(te===-1){let ze;try{ze=Hn.decode(N,q)}catch(st){throw Me("insufficient data for dynamic array length",Re,{arg:this.localName,coderType:"array",value:st.value})}try{te=ze.value.toNumber()}catch{throw Me("array count too large",Re,{arg:this.localName,coderType:"array",value:ze.value.toString()})}J+=ze.consumed,q+=ze.consumed}const oe=[];for(let ze=0;ze<te;ze++)oe.push(new va(this.coder));const Ie=(function(ze,st,ct){const gr=ct;let Xt=0;const Ke=[];return ze.forEach((function(Tr){let Jt;if(Tr.dynamic){const Ht=Hn.decode(st,ct);Jt=Tr.decode(st,gr+Ht.value.toNumber()),Jt.consumed=Ht.consumed}else Jt=Tr.decode(st,ct);Jt.value!==void 0&&Ke.push(Jt.value),ct+=Jt.consumed,Xt+=Jt.consumed})),{value:Ke,consumed:Xt}})(oe,N,q);return Ie.consumed+=J,Ie.value=this.coerceFunc(this.type,Ie.value),Ie}}class ii extends kr{constructor(N,q,J){let te=!1;const oe=[];q.forEach((function(Ie){Ie.dynamic&&(te=!0),oe.push(Ie.type)})),super(N,"tuple","tuple("+oe.join(",")+")",J,te),this.coders=q}encode(N){return Mi(this.coders,N)}decode(N,q){const J=(function(te,oe,Ie){const ze=Ie;let st=0;const ct=new Sf;return te.forEach((function(gr){let Xt;if(gr.dynamic){const Ke=Hn.decode(oe,Ie);Xt=gr.decode(oe,ze+Ke.value.toNumber()),Xt.consumed=Ke.consumed}else Xt=gr.decode(oe,Ie);Xt.value!==void 0&&ct.push(Xt.value),Ie+=Xt.consumed,st+=Xt.consumed})),te.forEach((function(gr,Xt){let Ke=gr.localName;Ke&&(Ke==="length"&&(Ke="_length"),ct[Ke]!==null&&ct[Ke]!==void 0||(ct[Ke]=ct[Xt]))})),{value:ct,consumed:st}})(this.coders,N,q);return J.value=this.coerceFunc(this.type,J.value),J}}const On={address:class extends kr{constructor(b,N){super(b,"address","address",N,!1)}encode(b){const N=new Uint8Array(32),q=b.trim();if(!Kt(q))throw Me("invalid address format",Re,{arg:this.localName,coderType:"address",value:b});try{N.set(ye(Ce(q)),12)}catch(J){throw Me(`invalid address (${J.message})`,Re,{arg:this.localName,coderType:"address",value:b})}return N}decode(b,N){if(b.length<N+32)throw Me("insufficuent data for address type",Re,{arg:this.localName,coderType:"address",value:Le(b.slice(N,N+32)),missingBytes:N+32-b.length});return{consumed:32,value:this.coerceFunc("address",pt(Le(b.slice(N+12,N+32))))}}},bool:class extends kr{constructor(b,N){super(b,"bool","bool",N,!1)}encode(b){return Hn.encode(b?1:0)}decode(b,N){try{const q=Hn.decode(b,N);return{consumed:q.consumed,value:this.coerceFunc("bool",!q.value.isZero())}}catch(q){throw q.reason==="insufficient data for uint256 type"?Me("insufficient data for boolean type",Re,{arg:this.localName,coderType:"boolean",value:q.value}):q}}},string:class extends kr{constructor(b,N){super(b,"string","string",N,!0)}encode(b){if(typeof b!="string")throw Me("invalid string value",Re,{arg:this.localName,coderType:"string",value:b});return Rl(be(b))}decode(b,N){const q=rs(b,N,this.localName);return q.value=this.coerceFunc("string",Ne(q.value)),q}},bytes:class extends kr{constructor(b,N){super(b,"bytes","bytes",N,!0)}encode(b){try{return Rl(_t(b))}catch(N){throw N("invalid bytes value",Re,{arg:this.localName,coderType:"bytes",value:N.value})}}decode(b,N){const q=rs(b,N,this.localName);return q.value=this.coerceFunc("bytes",q.value),q}},function:class extends sr{constructor(b,N){super(b,24,N)}}};function ns(b,N){const q=On[N.type];if(q)return new q(b,N.name);let J=N.type.match(An);if(J){const te=parseInt(J[2]||"256");if(te===0||te>256||te%8!=0)throw Me("invalid "+J[1]+" bit length",Re,{arg:"param",value:N});return new Nl(b,te/8,J[1]==="int",N.name)}if(J=N.type.match(Hr),J){const te=parseInt(J[1]);if(te===0||te>32)throw Me("invalid bytes length",Re,{arg:"param",value:N});return new sr(b,te,N.name)}if(J=N.type.match(Vn),J){const te=Object.assign({},N),oe=parseInt(J[2]||"-1");return te.type=J[1],new Cl(b,ns(b,te),oe,N.name)}if(N.type.substring(0,5)==="tuple")return(function(te,oe,Ie){oe||(oe=[]);const ze=oe.map((st=>ns(te,st)));return new ii(te,ze,Ie)})(b,N.components,N.name);if(N.type==="")return new tu(b,N.name);throw Me("invalid type",Re,{arg:"type",value:N.type,fullType:N})}class Zr{constructor(N){(function(q,J){if(!(q instanceof J))throw Me("missing new","MISSING_NEW",{name:J.name})})(this,Zr),N||(N=ai),dt(this,"coerceFunc",N)}encode(N,q){if(N.length!==q.length)throw Me("types/values length mismatch",Re,{count:{types:N.length,values:q.length},value:{types:N,values:q}});const J=N.map((te=>typeof te=="string"?rr(te):te)).map((te=>ns(this.coerceFunc,te)));return new ii(this.coerceFunc,J,"_").encode(q)}decode(N,q){const J=N.map((te=>typeof te=="string"?rr(te):te)).map((te=>ns(this.coerceFunc,te)));return new ii(this.coerceFunc,J,"_").decode(q,0).value}}const Ml=new Zr;var jl,nt;function tt(b,N,q,J){var te,oe=arguments.length,Ie=oe<3?N:J;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ie=Reflect.decorate(b,N,q,J);else for(var ze=b.length-1;ze>=0;ze--)(te=b[ze])&&(Ie=(oe<3?te(Ie):oe>3?te(N,q,Ie):te(N,q))||Ie);return oe>3&&Ie&&Object.defineProperty(N,q,Ie),Ie}function rt(b,N){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(b,N)}t.coder=void 0,(jl=t.coder||(t.coder={})).encodeParams=function(b,N){return le(Ml.encode(b,N))},jl.decodeParams=function(b,N){if(b.length>0&&(!N||N==="0x"||N==="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 Ml.decode(b,ye("0x"+N.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class yt{constructor(N){this.callName=N.callName,this.params=N.params||0,this.inputFormatter=N.inputFormatter||null,this.outputFormatter=N.outputFormatter}validateArgs(N){if(N.length!==this.params)throw q=this.callName,J=N.length,te=this.params,new Error(`Invalid number of input parameters to RPC method "${q}" given: ${J}, expected: ${te}`);var q,J,te}formatInput(N){return this.inputFormatter?this.inputFormatter.map((function(q,J){return q?q(N[J]):N[J]})):N}formatOutput(N){return N!==null?this.outputFormatter(N):null}toPayload(N){const q=this.formatInput(N);return this.validateArgs(q),{method:this.callName,params:q}}async execute(N,...q){const J=this.toPayload(q);if(!N)throw new Error("Missing RequestManager in method#exec");const te=await N.sendAsync(J);return this.formatOutput(te)}}class Sr{constructor(N){this.getter=N.getter,this.outputFormatter=N.outputFormatter}formatOutput(N){return this.outputFormatter(N)}async execute(N,...q){const J=await N.sendAsync({method:this.getter,params:[]});return this.formatOutput(J)}}function Ll(b){return new Promise((N=>setTimeout(N,b)))}t.eth=void 0,(nt=t.eth||(t.eth={})).eth_getBalance=new yt({callName:"eth_getBalance",params:2,inputFormatter:[Ce,Dr],outputFormatter:_a}),nt.eth_getStorageAt=new yt({callName:"eth_getStorageAt",params:3,inputFormatter:[Ce,Le,Dr],outputFormatter:fe}),nt.eth_getCode=new yt({callName:"eth_getCode",params:2,inputFormatter:[Ce,Dr],outputFormatter:fe}),nt.eth_getBlockByHash=new yt({callName:"eth_getBlockByHash",params:2,inputFormatter:[Ct,function(b){return!!b}],outputFormatter:pe}),nt.eth_getBlockByNumber=new yt({callName:"eth_getBlockByNumber",params:2,inputFormatter:[Ct,function(b){return!!b}],outputFormatter:pe}),nt.eth_getUncleByBlockHashAndIndex=new yt({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[Ct,Le],outputFormatter:pe}),nt.eth_getUncleByBlockNumberAndIndex=new yt({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[Ct,Le],outputFormatter:pe}),nt.eth_getBlockTransactionCountByHash=new yt({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[Ct],outputFormatter:je}),nt.eth_getBlockTransactionCountByNumber=new yt({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[Ct],outputFormatter:je}),nt.eth_getUncleCountByBlockHash=new yt({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[Ct],outputFormatter:je}),nt.eth_getUncleCountByBlockNumber=new yt({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[Ct],outputFormatter:je}),nt.eth_getTransactionByHash=new yt({callName:"eth_getTransactionByHash",params:1,inputFormatter:[an],outputFormatter:H}),nt.eth_getTransactionByBlockHashAndIndex=new yt({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[Ct,Le],outputFormatter:H}),nt.eth_getTransactionByBlockNumberAndIndex=new yt({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[Ct,Le],outputFormatter:H}),nt.eth_getTransactionReceipt=new yt({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[an],outputFormatter:$}),nt.eth_getTransactionCount=new yt({callName:"eth_getTransactionCount",params:2,inputFormatter:[Ce,Dr],outputFormatter:je}),nt.eth_sendRawTransaction=new yt({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:fe}),nt.web3_sha3=new yt({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:fe}),nt.eth_sendTransaction=new yt({callName:"eth_sendTransaction",params:1,inputFormatter:[ae],outputFormatter:fe}),nt.eth_sign=new yt({callName:"eth_sign",params:2,inputFormatter:[Ce,null],outputFormatter:fe}),nt.eth_call=new yt({callName:"eth_call",params:2,inputFormatter:[Qr,Dr],outputFormatter:fe}),nt.eth_estimateGas=new yt({callName:"eth_estimateGas",params:1,inputFormatter:[Qr],outputFormatter:je}),nt.eth_submitWork=new yt({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:De}),nt.eth_getWork=new yt({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:fr}),nt.eth_coinbase=new Sr({getter:"eth_coinbase",outputFormatter:mn}),nt.eth_mining=new Sr({getter:"eth_mining",outputFormatter:De}),nt.eth_hashrate=new Sr({getter:"eth_hashrate",outputFormatter:je}),nt.eth_syncing=new Sr({getter:"eth_syncing",outputFormatter:Je}),nt.eth_gasPrice=new Sr({getter:"eth_gasPrice",outputFormatter:_a}),nt.eth_accounts=new Sr({getter:"eth_accounts",outputFormatter:fr}),nt.eth_blockNumber=new Sr({getter:"eth_blockNumber",outputFormatter:je}),nt.eth_protocolVersion=new Sr({getter:"eth_protocolVersion",outputFormatter:je}),nt.web3_clientVersion=new Sr({getter:"web3_clientVersion",outputFormatter:ce}),nt.net_version=new Sr({getter:"net_version",outputFormatter:ce}),nt.shh_version=new yt({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:je}),nt.shh_post=new yt({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:De}),nt.personal_newAccount=new yt({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:mn}),nt.personal_importRawKey=new yt({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:mn}),nt.personal_sign=new yt({callName:"personal_sign",params:3,inputFormatter:[Pe,Ce,null],outputFormatter:fe}),nt.personal_ecRecover=new yt({callName:"personal_ecRecover",params:2,inputFormatter:[Pe,null],outputFormatter:mn}),nt.personal_unlockAccount=new yt({callName:"personal_unlockAccount",params:3,inputFormatter:[Ce,null,Be],outputFormatter:De}),nt.personal_sendTransaction=new yt({callName:"personal_sendTransaction",params:2,inputFormatter:[ae,null],outputFormatter:fe}),nt.personal_lockAccount=new yt({callName:"personal_lockAccount",params:1,inputFormatter:[Ce],outputFormatter:De}),nt.personal_listAccounts=new Sr({getter:"personal_listAccounts",outputFormatter:fr}),nt.net_listening=new Sr({getter:"net_listening",outputFormatter:De}),nt.net_peerCount=new Sr({getter:"net_peerCount",outputFormatter:je}),nt.eth_newFilter=new yt({callName:"eth_newFilter",params:1,inputFormatter:[Xe],outputFormatter:Le}),nt.eth_getLogs=new yt({callName:"eth_getLogs",params:1,inputFormatter:[fr],outputFormatter:fr}),nt.eth_newBlockFilter=new yt({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:Le}),nt.eth_newPendingTransactionFilter=new yt({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:Le}),nt.eth_uninstallFilter=new yt({callName:"eth_uninstallFilter",params:1,inputFormatter:[Le],outputFormatter:De}),nt.eth_getFilterLogs=new yt({callName:"eth_getFilterLogs",params:1,inputFormatter:[Le],outputFormatter:fr}),nt.eth_getFilterChanges=new yt({callName:"eth_getFilterChanges",params:1,inputFormatter:[Le],outputFormatter:fr}),nt.eth_submitHashrate=new yt({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:De}),nt.shh_newIdentity=new yt({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:fe}),nt.shh_hasIdentity=new yt({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:De}),nt.shh_newGroup=new yt({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:fe}),nt.shh_addToGroup=new yt({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:De}),nt.shh_newFilter=new yt({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:Le}),nt.shh_uninstallFilter=new yt({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:De}),nt.shh_getLogs=new yt({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:fr}),nt.shh_getFilterMessages=new yt({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:fr}),nt.shh_getFilterChanges=new yt({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:fr}),nt.shh_getMessages=new yt({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:fr});function ut(b,N){const q=t.eth[N];if(!q)throw new Error(`Could not find the method/property named ${N.toString()}`);Object.defineProperty(b,N,{value:function(...J){return q.execute(this,...J)}})}class et{constructor(N){this.provider=N,this.requests=new Map}async sendAsync(N){const q=await this.provider;if(!q)throw new Error("Provider not set or invalid");const J=ja(N.method,N.params),te=u();return this.requests.set(J.id,te),q.sendAsync(J,((oe,Ie)=>{this.requests.delete(J.id),oe?te.reject(oe):La(Ie)?te.resolve(Ie.result):te.reject((function(ze){const st=ze&&ze.error&&ze.error.message?ze.error.message:"Invalid JSON RPC response: "+JSON.stringify(ze);return new Error(st)})(Ie))})),te}setProvider(N){this.provider=N}async getConfirmedTransaction(N){const q=await this.waitForCompletion(N);if(this.isFailure(q))throw new Error(`Transaction "${N}" failed`);return q}async waitForCompletion(N,q){const J=an(N);if(await this.isTxDropped(J,q)){const te=await this.getTransactionAndReceipt(J);return Object.assign(Object.assign({},te),{status:t.TransactionStatus.failed})}for(;;){const te=await this.getTransactionAndReceipt(J);if(!this.isPending(te)&&te.receipt)return Object.assign(Object.assign({},te),{status:this.isFailure(te)?t.TransactionStatus.failed:t.TransactionStatus.confirmed});await Ll(2e3)}}async getTransaction(N){let q,J=null;const te=an(N);try{const Ie=(await this.eth_accounts())[0];Ie&&(J=await this.eth_getTransactionCount(Ie,"latest"))}catch{J=null}try{if(q=await this.eth_getTransactionByHash(te),q===null)return null}catch{return null}if(q.blockNumber===null){if(J!==null){if(q.nonce<J)return{hash:te,type:t.TransactionType.replaced,nonce:q.nonce};if(q.nonce>J)return{hash:te,type:t.TransactionType.queued,nonce:q.nonce}}return Object.assign({type:t.TransactionType.pending},q)}let oe;try{if(oe=await this.eth_getTransactionReceipt(te),oe===null||oe.status===0)return Object.assign({type:t.TransactionType.reverted},q)}catch{return null}return Object.assign(Object.assign({type:t.TransactionType.confirmed},q),{receipt:oe})}async isTxDropped(N,q=15){let J=q;for(;J>0;){if(await this.getTransactionAndReceipt(N)!==null)return!1;J-=1,await Ll(2e3)}return!0}async getTransactionAndReceipt(N){N=an(N);const[q,J]=await Promise.all([this.eth_getTransactionByHash(N),this.eth_getTransactionReceipt(N)]);return Object.assign(Object.assign({},q),{receipt:J})}isPending(N){return N&&N.blockNumber===null}isFailure(N){return N&&(!N.receipt||N.receipt.status===0)}}tt([ut,rt("design:type",Function)],et.prototype,"web3_clientVersion",void 0),tt([ut,rt("design:type",Function)],et.prototype,"web3_sha3",void 0),tt([ut,rt("design:type",Function)],et.prototype,"net_version",void 0),tt([ut,rt("design:type",Function)],et.prototype,"net_peerCount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"net_listening",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_protocolVersion",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_syncing",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_coinbase",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_mining",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_hashrate",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_gasPrice",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_accounts",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_blockNumber",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBalance",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getStorageAt",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionCount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBlockTransactionCountByHash",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBlockTransactionCountByNumber",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getUncleCountByBlockHash",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getUncleCountByBlockNumber",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getCode",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_sign",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_sendTransaction",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_sendRawTransaction",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_call",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_estimateGas",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBlockByHash",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBlockByNumber",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionByHash",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionReceipt",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getUncleByBlockHashAndIndex",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_newFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_newBlockFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_newPendingTransactionFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_uninstallFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getFilterChanges",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getFilterLogs",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getLogs",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getWork",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_submitWork",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_submitHashrate",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_post",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_version",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_newIdentity",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_hasIdentity",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_newGroup",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_addToGroup",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_newFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_uninstallFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_getFilterChanges",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_getMessages",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_unlockAccount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_newAccount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_listAccounts",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_lockAccount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_importRawKey",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_sendTransaction",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_sign",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_ecRecover",void 0);class ru{constructor(N){this.json=N,this._inputTypes=N.inputs||[],this._outputTypes=N.outputs||[],this._constant=!!N.constant,this._payable=!!N.payable||N.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in N&&!N.constant||N.stateMutability==="nonpayable",this._name=L(N)}extractDefaultBlock(N){return N.length>this._inputTypes.length&&!rn(N[N.length-1])&&Dr(N.pop())||"latest"}validateArgs(N){if(N.some((oe=>oe===void 0)))throw new Error("Invalid call, some arguments are undefined");const q=N.filter((function(oe){return!(rn(oe)===!0&&nn(oe)===!1&&Lr(oe)===!1&&!(oe instanceof Uint8Array))}));if(q.length!==this._inputTypes.length)throw J=q.length,te=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${J}, expected: ${te}`);var J,te}toPayload(N){let q={to:void 0,data:void 0,value:void 0,from:void 0};N.length>this._inputTypes.length&&rn(N[N.length-1])&&(q=N.pop()),this.validateArgs(N);const J=this.signature();let te=t.coder.encodeParams(this._inputTypes,N);return te.indexOf("0x")===0&&(te=te.substr(2)),q.data="0x"+J+te,q}signature(){return X(this._name).slice(0,8)}unpackOutput(N){if(!N)return;const q=N.length>=2?N.slice(2):N,J=t.coder.decodeParams(this._outputTypes,q);return J.length===1?J[0]:J}async execute(N,q,...J){if(!N)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const te=this.toPayload(J);if(te.to=q,te.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!te.from)throw new Error('Missing "from" in transaction options');return await N.eth_sendTransaction(te)}{const te=this.extractDefaultBlock(J),oe=this.toPayload(J);oe.to=q;const Ie=await N.eth_call(oe,te);return this.unpackOutput(Ie)}}estimateGas(N,q,...J){if(!(N instanceof et))throw new Error("estimateGas needs to receive a RequestManager as first argument");const te=this.toPayload(J);return te.to=q,N.eth_estimateGas(te)}displayName(){return Oe(this._name)}typeName(){return Te(this._name)||"void"}attachToContract(N){const q=this.displayName(),J=Object.assign(((...te)=>this.execute(N.requestManager,N.address,...te)),{estimateGas:this.estimateGas.bind(this,N.requestManager,N.address),toPayload:(...te)=>this.toPayload(te),toRPCMessage:(...te)=>{const oe=this.extractDefaultBlock(te),Ie=this.toPayload(te);return Ie.to=N.address,{method:"eth_call",params:[Ie,oe]}},unpackOutput:te=>this.unpackOutput(te)});N[q]||(N[q]=J),N[q][this.typeName()]=J}}function as(b){if(b==null)return null;const N=String(b).toString();return N.indexOf("0x")===0?N:le(be(N))}class ka{constructor(N){this.requestManager=N,this.isStarted=!1,this.isDisposed=!1,this.formatter=q=>q,this.filterId=u(),this.callbacks=[],this.stopSemaphore=u()}async watch(N){if(this.isDisposed)throw new Error("The filter was disposed");N&&(this.callbacks.push(N),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 N=await this.getNewFilter();if(!N)throw new Error("Could not create a filter, response: "+JSON.stringify(N));this.filterId.resolve(N)}catch(N){throw N}this.stopSemaphore=u(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const N=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: ${N}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const q=await this.getChanges();q&&this.callbacks.forEach((J=>{this.formatter?q.forEach((te=>{J(this.formatter(te))})):q.forEach((te=>J(te)))}))}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=u(),setTimeout((N=()=>this.poll(),function(){N().catch((q=>console.error(q)))}),500))}else this.stopSemaphore.resolve(1);var N}}class ji extends ka{constructor(N,q,J=(te=>te)){super(N),this.requestManager=N,this.options=q,this.formatter=J,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(te){return as(te)})),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"?Ct(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?Ct(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const N=await this.filterId;return this.requestManager.eth_getFilterLogs(N)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const N=await this.filterId;return this.requestManager.eth_getFilterChanges(N)}async uninstall(){const N=await this.filterId;return this.requestManager.eth_uninstallFilter(N)}}class Li{constructor(N,q,J){this.requestManager=N,this.address=J,this._anonymous=!1,this._params=q.inputs||[],this._name=L(q),this._anonymous=q.anonymous||!1}types(N){return this._params.filter((function(q){return q.indexed===N}))}displayName(){return Oe(this._name)}typeName(){return Te(this._name)||"void"}signature(){return X(this._name)}encode(N={},q={}){const J={topics:[],address:this.address};q.fromBlock!==void 0&&(J.fromBlock=Ct(q.fromBlock)||void 0),q.toBlock!==void 0&&(J.toBlock=Ct(q.toBlock)||void 0),J.topics=J.topics||[],this._anonymous||J.topics.push("0x"+this.signature());const te=this._params.filter((function(oe){return oe.indexed===!0})).map((function(oe){const Ie=N[oe.name];return Ie==null?null:nn(Ie)?Ie.map((function(ze){return"0x"+t.coder.encodeParams([oe],[ze])})):"0x"+t.coder.encodeParams([oe],[Ie])}));return J.topics=J.topics.concat(te),J}decode(N){N.data=N.data||"",N.topics=N.topics||[];const q=(this._anonymous?N.topics:N.topics.slice(1)).map((function(ze){return ze.slice(2)})).join(""),J=t.coder.decodeParams(this.types(!0),q),te=N.data.slice(2),oe=t.coder.decodeParams(this.types(!1),te),Ie=this._params.reduce((function(ze,st){return ze[st.name]=st.indexed?J.shift():oe.shift(),ze}),{});return Object.assign(Object.assign({},Se(N)),{event:this.displayName(),address:N.address,args:Ie})}async execute(N,q){const J=this.encode(N,q),te=this.decode.bind(this);return new ji(this.requestManager,J,te)}attachToContract(N){const q=this.execute.bind(this),J=this.displayName();N.events[J]||(N.events[J]=q),N.events[J][this.typeName()]=this.execute.bind(this,N)}}class Yt{constructor(N,q,J){this._requestManager=N,this._json=q,this._address=J}encode(N={}){const q={address:this._address};return N.fromBlock!==void 0&&(q.fromBlock=Ct(N.fromBlock)||void 0),N.toBlock!==void 0&&(q.toBlock=Ct(N.toBlock)||void 0),q}decode(N){N.data=N.data||"";const q=nn(N.topics)&&Sn(N.topics[0])?N.topics[0].slice(2):"",J=this._json.filter((function(te){return q===X(L(te))}))[0];return J?new Li(this._requestManager,J,this._address).decode(N):Se(N)}async execute(N){const q=this.encode(N),J=this.decode.bind(this);return new ji(this._requestManager,q,J)}getAllEventsFunction(){return this.execute.bind(this)}}class nu{constructor(N,q,J){var te;this.requestManager=N,this.abi=q,this.address=J,this.events={},this.transactionHash=null,this.address=J,this.abi=q,(te=this).abi.filter((function(oe){return oe.type==="function"})).map((function(oe){return new ru(oe)})).forEach((function(oe){oe.attachToContract(te)})),this.allEvents=(function(oe){const Ie=oe.abi.filter((function(st){return st.type==="event"})),ze=new Yt(oe.requestManager,Ie,oe.address);return Ie.map((function(st){return new Li(oe.requestManager,st,oe.address)})).forEach((function(st){st.attachToContract(oe)})),ze.getAllEventsFunction()})(this)}}t.AbstractFilter=ka,t.BigNumber=ne,t.Contract=nu,t.ContractFactory=class{constructor(b,N){this.requestManager=b,this.abi=N}async deploy(...b){let N;const q=b[b.length-1];if(rn(q)&&!nn(q)&&(N=b.pop()),!N)throw new Error("Missing options object");if(!N.data||typeof N.data!="string")throw new Error("Invalid options.data");if(je(N.value)>0&&!(this.abi.filter((function(ct){return ct.type==="constructor"&&ct.inputs.length===b.length}))[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const J=(te=this.abi,oe=b,te.filter((function(ct){return ct.type==="constructor"&&ct.inputs&&ct.inputs.length===oe.length})).map((function(ct){return ct.inputs||[]})).map((function(ct){return t.coder.encodeParams(ct,oe)}))[0]||"");var te,oe;N.data+=J,N.gas||(N.gas=await this.requestManager.eth_estimateGas(N));const Ie=await this.requestManager.eth_sendTransaction(N);if(!Ie)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const ze=await(async function(ct,gr){const Xt=u();let Ke=0;const Tr=()=>{Ke++,Ke>50?Xt.reject(new Error("Contract transaction couldn't be found after 50 blocks")):ct.eth_getTransactionReceipt(gr).then((Nr=>{Nr&&Nr.blockHash?Xt.resolve(Nr):setTimeout(Tr,1e3)}),(Nr=>Xt.reject(Nr)))};Tr();const Jt=await Xt,Ht=await ct.eth_getCode(Jt.contractAddress,"latest");if(Ht&&Ht.length>3)return Jt.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:Ht,receipt:Jt})})(this.requestManager,Ie),st=await this.at(ze);return st.transactionHash=Ie,st}async at(b){if(!Kt(b))throw new TypeError(`Invalid address ${JSON.stringify(b)}`);return new nu(this.requestManager,this.abi,b)}},t.EthBlockFilter=class extends ji{constructor(b){super(b,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},t.EthFilter=ji,t.EthPendingTransactionFilter=class extends ji{constructor(b){super(b,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},t.HTTPProvider=class{constructor(b,N={}){this.host=b,this.options=N,this.debug=!1,this.host=b||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(b,N){try{let q=null;q=b instanceof Array?b.map((oe=>n(oe))):n(b);const J=this.options.fetch||globalThis.fetch;if(J===void 0)throw new Error("There is no global fetch object nor it was provided. Please install and import isomorphic-fetch");const te={body:JSON.stringify(q),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+te.body),J(this.host,te).then((async oe=>{if(oe.ok){const Ie=await oe.json();this.debug&&console.log("RECV << "+JSON.stringify(Ie)),Ie.error?N(Object.assign(new Error(Ie.error.json||Ie.error),Ie.error)):N(null,Ie)}else this.debug&&console.log("ERR << "+JSON.stringify(oe)),N(new Error("External error. response code: "+oe.status))}),(oe=>{this.debug&&console.log("ERR << "+JSON.stringify(oe)),N(oe)}))}catch(q){this.debug&&console.log("ERR << "+JSON.stringify(q)),N(q)}}},t.Method=yt,t.Property=Sr,t.RequestManager=et,t.SHHFilter=class extends ka{constructor(b,N){super(b),this.requestManager=b,this.options=N,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(q){return as(q)})),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const b=await this.filterId;return this.requestManager.shh_getMessages(b)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const b=await this.filterId;return this.requestManager.shh_getFilterChanges(b)}async uninstall(){const b=await this.filterId;return this.requestManager.shh_uninstallFilter(b)}},t.SolidityEvent=Li,t.SolidityFunction=ru,t.WebSocketProvider=class{constructor(b,N={}){this.url=b,this.options=N,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const b=this.connection;this.timeout(new Error("Provider disposed.")),b.then((N=>N.close())).catch((N=>{this.debug&&console.error(N)}))}send(){throw new Error("Sync requests are deprecated")}sendAsync(b,N){const q=[];let J;if(b instanceof Array)J=Promise.all(b.map((te=>{const oe=u();try{const Ie=n(te);q.push(Ie),this.responseCallbacks.set(Ie.id,oe)}catch(Ie){oe.reject(Ie)}return oe})));else{const te=u();try{const oe=n(b);q.push(oe),this.responseCallbacks.set(oe.id,te)}catch(oe){te.reject(oe)}J=te}J.then((te=>N(null,te)),(te=>N(te))),this.connection.then((te=>{q.forEach((oe=>{const Ie=JSON.stringify(oe);this.debug&&console.log("SEND >> "+Ie),te.send(Ie)}))}),(te=>{N(te)}))}parseResponse(b){const N=[];return b.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((q=>{let J=q;this.lastChunk&&(J=this.lastChunk+J);let te=null;try{te=JSON.parse(J)}catch{return this.lastChunk=J,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout((()=>{this.timeout()}),15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",te&&N.push(te)})),N}processMessage(b){if("id"in b){const N=b.id,q=this.responseCallbacks.get(N);if(!q)return void console.error("Error: Received a response for an unknown request",b);this.responseCallbacks.delete(N),b.error!==void 0&&b.error!==null?q.reject(Object.assign(new Error(b.error.message||b.error),b.error)):"result"in b&&q.resolve(b)}else this.notificationCallbacks.forEach((N=>N(null,b)))}timeout(b){this.connection&&this.connection.isPending||(this.connection=u());const N=b||new Error("Connection timeout");this.responseCallbacks.forEach((q=>q.reject(N))),this.responseCallbacks.clear(),this.isDisposed||setTimeout((()=>this.connect()),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then((q=>q.close())).catch((q=>{this.debug&&console.error(q)})),this.connection&&this.connection.isPending||(this.connection=u()),this.lastChunk="";const b=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!b)throw new Error("Please provide a WebSocketConstructor");const N=new b(this.url,this.options.protocol);N.onopen=()=>{this.connection.resolve(N)},N.onerror=q=>{const J=new Error("Error in web socket");J.data=q,this.timeout(J)},N.onclose=q=>{this.timeout(new Error(`Connection closed (${q&&q.reason||"Unknown reason"})`))},N.onmessage=q=>{const J=typeof q.data=="string"?q.data:"";this.debug&&console.log("RECV << "+q.data),this.parseResponse(J).forEach((te=>{te instanceof Array?te.forEach((oe=>this.processMessage(oe))):this.processMessage(te)}))}}},t.bytesToHex=le,t.bytesToUtf8String=Ne,t.concatBytes=K,t.default=et,t.extractDisplayName=Oe,t.extractTypeName=Te,t.fromAscii=function(b,N=0){let q="";for(let J=0;J<b.length;J++){const te=b.charCodeAt(J).toString(16);q+=te.length<2?"0"+te:te}return"0x"+q.padEnd(N,"0")},t.fromDecimal=Ge,t.fromTwosComplement=Qe,t.fromWei=function(b,N){const q=Dt(b).dividedBy(Rt(N));return Lr(b)?q:q.toString(10)},t.getAddress=pt,t.getValueOfUnit=Rt,t.hexToBytes=ye,t.inputAddressFormatter=Ce,t.inputBlockNumberFormatter=Ct,t.inputCallFormatter=Qr,t.inputDefaultBlockNumberFormatter=Dr,t.inputFilterOptions=Xe,t.inputPostFormatter=function(b){return b?(b.ttl=Ge(b.ttl),b.workToProve=Ge(b.workToProve),b.priority=Ge(b.priority),nn(b.topics)||(b.topics=b.topics?[b.topics]:[]),b.topics=b.topics.map((function(N){return N.indexOf("0x")===0?N:"0x"+le(be(N))})),b):null},t.inputTransactionFormatter=ae,t.inputTransactionId=an,t.isAddress=Kt,t.isArray=nn,t.isBigNumber=Lr,t.isBloom=function(b){return!!/^(0x)?[0-9a-f]{512}$/i.test(b)&&!!/^(0x)?[0-9a-f]{512}$/i.test(b)},t.isBoolean=Tn,t.isChecksumAddress=tr,t.isFunction=function(b){return typeof b=="function"},t.isHex=function(b){return typeof b=="string"&&/^0x[0-9a-fA-F]+$/.test(b)},t.isJson=function(b){try{return!!JSON.parse(b)}catch{return!1}},t.isObject=rn,t.isPredefinedBlockNumber=Da,t.isStrictAddress=qt,t.isString=Sn,t.isTopic=function(b){return!!/^(0x)?[0-9a-f]{64}$/i.test(b)&&!!/^(0x)?[0-9a-f]{64}$/i.test(b)},t.isValidResponse=La,t.outputBigNumberFormatter=_a,t.outputBlockFormatter=pe,t.outputLogFormatter=Se,t.outputPostFormatter=function(b){return b?(b.expiry=je(b.expiry),b.sent=je(b.sent),b.ttl=je(b.ttl),b.workProved=je(b.workProved),b.topics||(b.topics=[]),b.topics=b.topics.map((function(N){return B(N)})),b):null},t.outputSyncingFormatter=Je,t.outputTransactionFormatter=H,t.outputTransactionReceiptFormatter=$,t.padLeft=F,t.padRight=function(b,N,q){return b+new Array(N-b.length+1).join(q||"0")},t.sha3=X,t.signedIsNegative=Fe,t.stringToUtf8Bytes=be,t.toAddress=mn,t.toArray=fr,t.toAscii=B,t.toBatchPayload=function(b){return b.map((function(N){return ja(N.method,N.params)}))},t.toBigNumber=Dt,t.toBoolean=De,t.toChecksumAddress=jr,t.toData=fe,t.toDecimal=je,t.toHex=Le,t.toJsonRpcRequest=ja,t.toNullDecimal=Be,t.toString=ce,t.toStringData=Pe,t.toTwosComplement=It,t.toWei=function(b,N){const q=Dt(b).times(Rt(N));return Lr(b)?q:q.toString(10)},t.transformToFullName=L,Object.defineProperty(t,"__esModule",{value:!0})}))})(pl,pl.exports)),pl.exports}var Uu={},vN;function EF(){if(vN)return Uu;vN=1,Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.SignatureValidator=void 0;const e=gf();async function a(t,n){const i=[{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,i).at(n)}return Uu.SignatureValidator=a,Uu}var Zg={},sa={},Bo={},Uo={},xg={},ua={},EN;function ot(){if(EN)return ua;EN=1;var e=ua&&ua.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(ua,"__esModule",{value:!0}),ua.validateType=ua.generateLazyValidator=ua.Ajv=void 0;const a=e(uf());ua.Ajv=a.default;const t=e(nE()),n=e(aE());function i(u,c){let f=null;const p=(m,h)=>{if(!f){const _=new a.default({$data:!0,allErrors:!0});(0,t.default)(_),(0,n.default)(_,{singleError:!0}),c?.forEach(T=>_.addKeyword(T)),f=_.compile(u),Object.defineProperty(p,"errors",{get(){return f?.errors}})}return f(m,h)};return p}ua.generateLazyValidator=i;function s(u,c){return u.validate(c)}return ua.validateType=s,ua}var bN;function bF(){return bN||(bN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const a=ot();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,a.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(xg)),xg}var $g={},wN;function wF(){return wN||(wN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const a=ot();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})($g)),$g}var SN;function SF(){return SN||(SN=1,(function(e){var a=Uo&&Uo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Uo&&Uo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(bF(),e),t(wF(),e)})(Uo)),Uo}var Fo={},e_={},TN;function TF(){return TN||(TN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(e_)),e_}var t_={},r_={},PN;function _f(){return PN||(PN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const a=ot();(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,a.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},i={[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 u(p){return n[p]}t.getMaxSupply=u;function c(p){return s[p]}t.getColor=c;function f(p){return[i[p],s[p]]}t.getGradient=f})(e.Rarity||(e.Rarity={}))})(r_)),r_}var n_={},AN;function es(){return AN||(AN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(n_)),n_}var a_={},i_={},ON;function PE(){return ON||(ON=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(i_)),i_}var o_={},s_={},IN;function Oj(){return IN||(IN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(s_)),s_}var NN;function AE(){return NN||(NN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const a=es(),t=ot(),n=Oj();(function(i){i.schema={oneOf:[Object.assign({},a.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(o_)),o_}var RN;function OE(){return RN||(RN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const a=ot(),t=PE(),n=AE();(function(i){i.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"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(a_)),a_}var Vo={},Ho={},u_={},l_={},CN;function xs(){return CN||(CN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema);t.validate=i=>n(i)})(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=i=>n.test(i)})(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=i=>n.test(i)})(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=i=>n.test(i)})(e.IPFSv1||(e.IPFSv1={}))})(l_)),l_}var MN;function Ij(){return MN||(MN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const a=es(),t=xs(),n=ot();var i;(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)})(i=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:a.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:i.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(s=e.AvatarInfo||(e.AvatarInfo={}));var u;(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=m=>p.test(m)})(u=e.LinkUrl||(e.LinkUrl={}));var c;(function(f){f.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:u.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={}))})(u_)),u_}var c_={},jN;function PF(){return jN||(jN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const a=ot(),t=Ij();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(c_)),c_}var LN;function AF(){return LN||(LN=1,(function(e){var a=Ho&&Ho.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Ho&&Ho.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(Ij(),e),t(PF(),e)})(Ho)),Ho}var d_={},f_={},DN;function Nj(){return DN||(DN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const a=ot();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,a.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(f_)),f_}var p_={},kN;function Rj(){return kN||(kN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(p_)),p_}var h_={},qN;function Cj(){return qN||(qN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(h_)),h_}var m_={},Fu={},BN;function IE(){return BN||(BN=1,Object.defineProperty(Fu,"__esModule",{value:!0}),Fu.displayableProperties=void 0,Fu.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Fu}var y_={},UN;function Mj(){return UN||(UN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(y_)),y_}var g_={},FN;function jj(){return FN||(FN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(g_)),g_}var VN;function OF(){return VN||(VN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const a=ot(),t=IE(),n=Nj(),i=Cj(),s=Mj(),u=jj(),c=Rj();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:i.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:u.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,a.generateLazyValidator)(p.schema)})(e.Scene||(e.Scene={}))})(m_)),m_}var HN;function IF(){return HN||(HN=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 a=Nj();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return a.FeatureToggles}});var t=Rj();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=Cj();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=OF();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var s=Mj();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return s.Source}});var u=jj();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return u.SpawnPoint}})})(d_)),d_}var zo={},__={},v_={},zN;function Lj(){return zN||(zN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(v_)),v_}var WN;function Dj(){return WN||(WN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const a=ot(),t=Lj();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(__)),__}var E_={},GN;function kj(){return GN||(GN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(E_)),E_}var b_={},KN;function NE(){return KN||(KN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const a=_f(),t=ot();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:a.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,t.generateLazyValidator)(n);function s(u){return i(u)}e.isStandard=s})(b_)),b_}var w_={},S_={},YN;function qj(){return YN||(YN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(S_)),S_}var XN;function RE(){return XN||(XN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.thirdPartyProps=void 0;const a=ot(),t=qj();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},i={keyword:"_containsHashingKeys",validate:(c,f)=>{var p;const m=f;return!((p=m?.merkleProof)===null||p===void 0)&&p.hashingKeys?m.merkleProof.hashingKeys.every(h=>m.hasOwnProperty(h)):!1},errors:!1},s=(0,a.generateLazyValidator)(n,[i]);function u(c){return s(c)}e.isThirdParty=u})(w_)),w_}var T_={},P_={},Ja={},JN;function Bj(){if(JN)return Ja;JN=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.isBaseAvatar=Ja.requiredBaseItemProps=Ja.baseItemProperties=void 0;const e=Dj(),a=kj(),t=IE();Ja.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({},a.Metrics.schema),{nullable:!0})}),Ja.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(i){if(!i||!i.id)return!1;const s=i.id.split(":"),u=s[1]==="decentraland",c=s[3]==="base-avatars";return s.length===5&&u&&c}return Ja.isBaseAvatar=n,Ja}var QN;function NF(){return QN||(QN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const a=ot(),t=es(),n=OE(),i=Bj(),s=NE(),u=RE(),c=AE();(function(f){f.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),s.standardProperties),u.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:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content"]},{required:[...i.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,_)=>!h||(0,u.isThirdParty)(_),errors:!1},m={keyword:"_isBaseAvatar",validate:(h,_)=>!h||(0,i.isBaseAvatar)(_),errors:!1};f.validate=(0,a.generateLazyValidator)(f.schema,[p,m])})(e.Wearable||(e.Wearable={}))})(P_)),P_}var ZN;function RF(){return ZN||(ZN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var a=OE();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return a.WearableRepresentation}});var t=NF();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=es();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=Oj();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var s=AE();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return s.HideableWearableCategory}})})(T_)),T_}var A_={},O_={},I_={},N_={},xN;function Uj(){return xN||(xN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(N_)),N_}var R_={},$N;function Fj(){return $N||($N=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const a=ot(),t=PE();(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,a.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(R_)),R_}var eR;function Vj(){return eR||(eR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const a=Uj(),t=ot(),n=Fj();(function(i){i.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:a.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(I_)),I_}var tR;function CF(){return tR||(tR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const a=Hj(),t=ot(),n=Bj(),i=NE(),s=RE(),u=Vj();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),i.standardProperties),s.thirdPartyProps),{emoteDataADR74:u.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,m)=>!p||(0,a.isThirdParty)(m),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[f])})(e.Emote||(e.Emote={}))})(O_)),O_}var C_={},rR;function MF(){return rR||(rR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(C_)),C_}var nR;function jF(){return nR||(nR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=e.EmoteCategory=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var a=CF();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return a.Emote}});var t=Fj();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=Vj();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=Uj();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return i.EmoteCategory}});var s=MF();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}})})(A_)),A_}var aR;function Hj(){return aR||(aR=1,(function(e){var a=zo&&zo.__createBinding||(Object.create?(function(p,m,h,_){_===void 0&&(_=h);var T=Object.getOwnPropertyDescriptor(m,h);(!T||("get"in T?!m.__esModule:T.writable||T.configurable))&&(T={enumerable:!0,get:function(){return m[h]}}),Object.defineProperty(p,_,T)}):(function(p,m,h,_){_===void 0&&(_=h),p[_]=m[h]})),t=zo&&zo.__exportStar||function(p,m){for(var h in p)h!=="default"&&!Object.prototype.hasOwnProperty.call(m,h)&&a(m,p,h)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=Dj();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=Lj();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var s=kj();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return s.Metrics}});var u=PE();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return u.BodyShape}});var c=NE();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return c.isStandard}});var f=RE();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return f.isThirdParty}}),t(RF(),e),t(jF(),e)})(zo)),zo}var Wo={},iR;function LF(){return iR||(iR=1,(function(e){var a=Wo&&Wo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Wo&&Wo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(qj(),e)})(Wo)),Wo}var M_={},j_={},oR;function CE(){return oR||(oR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const a=ot();var t;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(i){i.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"}}}]}},i.validate=(0,a.generateLazyValidator)(i.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(i){i.schema={type:"array",items:n.schema,minItems:1},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.AuthChain||(e.AuthChain={}))})(j_)),j_}var sR;function DF(){return sR||(sR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const a=xs(),t=CE(),n=ot();(function(i){i.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:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(i){i.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:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(M_)),M_}var L_={},D_={},uR;function zj(){return uR||(uR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const a=xs(),t=ot();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[a.IPFSv1.schema,a.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(D_)),D_}var lR;function kF(){return lR||(lR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const a=xs(),t=zj(),n=ot();(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[a.IPFSv1.schema,a.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"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.Entity||(e.Entity={}))})(L_)),L_}var k_={},cR;function qF(){return cR||(cR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const a=CE(),t=ot();(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:a.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(k_)),k_}var Go={},q_={},dR;function BF(){return dR||(dR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const a=es(),t=xs(),n=ot();var i;(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:a.WearableCategory.schema}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(i=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:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(e.Outfits||(e.Outfits={}))})(q_)),q_}var fR;function UF(){return fR||(fR=1,(function(e){var a=Go&&Go.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Go&&Go.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(BF(),e)})(Go)),Go}var pR;function ME(){return pR||(pR=1,(function(e){var a=Vo&&Vo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Vo&&Vo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(AF(),e),t(IF(),e),t(Hj(),e),t(IE(),e),t(LF(),e),t(DF(),e),t(kF(),e),t(qF(),e),t(UF(),e)})(Vo)),Vo}var hR;function FF(){return hR||(hR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const a=_f(),t=es(),n=OE(),i=ot(),s=ME();(function(u){u.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},a.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"]},u.validate=(0,i.generateLazyValidator)(u.schema)})(e.WearableJson||(e.WearableJson={}))})(t_)),t_}var mR;function VF(){return mR||(mR=1,(function(e){var a=Fo&&Fo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Fo&&Fo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(TF(),e),t(FF(),e)})(Fo)),Fo}var yR;function HF(){return yR||(yR=1,(function(e){var a=Bo&&Bo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Bo&&Bo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(SF(),e),t(VF(),e)})(Bo)),Bo}var B_={},U_={},F_={},gR;function Wj(){return gR||(gR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const a=ot(),t=ga();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 i(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=i,(function(s){s.schema={type:"string",enum:Object.values(s)},s.validate=(0,a.generateLazyValidator)(s.schema)})(n=e.ChainName||(e.ChainName={}))})(F_)),F_}var V_={},_R;function ya(){return _R||(_R=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(V_)),V_}var vR;function ga(){return vR||(vR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const a=ot(),t=Wj(),n=ya();var i;(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"})(i=e.ChainId||(e.ChainId={}));function s(p){switch(p){case i.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;default:return null}}e.getChainName=s;function u(p){switch(p){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai";default:return""}}e.getURNProtocol=u;function c(p){switch(p){case i.ETHEREUM_MAINNET:return{[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET};case i.ETHEREUM_ROPSTEN:return{[n.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_RINKEBY:return{[n.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_GOERLI:return{[n.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_KOVAN:return{[n.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_SEPOLIA:return{[n.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.MATIC_MAINNET:return{[n.Network.ETHEREUM]:i.MATIC_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET};case i.MATIC_MUMBAI:return{[n.Network.ETHEREUM]:i.MATIC_MUMBAI,[n.Network.MATIC]:i.MATIC_MUMBAI};default:return{[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET}}}e.getNetworkMapping=c;function f(p){switch(p){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:return n.Network.MATIC}}e.getNetwork=f,(function(p){p.schema={type:"number",enum:Object.values(p)},p.validate=(0,a.generateLazyValidator)(p.schema)})(i=e.ChainId||(e.ChainId={}))})(U_)),U_}var H_={},ER;function jE(){return ER||(ER=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(H_)),H_}var bR;function zF(){return bR||(bR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const a=ot(),t=ga(),n=jE(),i=ya();(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:i.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,a.generateLazyValidator)(s.schema)})(e.Bid||(e.Bid={}))})(B_)),B_}var z_={},wR;function WF(){return wR||(wR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(z_)),z_}var W_={},SR;function GF(){return SR||(SR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const a=ot(),t=ga(),n=ya();(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(i){i.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"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Collection||(e.Collection={}))})(W_)),W_}var G_={},K_={},TR;function vf(){return TR||(TR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(K_)),K_}var PR;function KF(){return PR||(PR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const a=ot(),t=ga(),n=ya(),i=vf();(function(s){s.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(s){s.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:n.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Contract||(e.Contract={}))})(G_)),G_}var Y_={},X_={},AR;function Gj(){return AR||(AR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const a=ot(),t=ga(),n=ME(),i=ya(),s=vf(),u=_f(),c=es();(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:u.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:u.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:i.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,a.generateLazyValidator)(f.schema)})(e.NFT||(e.NFT={}))})(X_)),X_}var OR;function YF(){return OR||(OR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const a=ot(),t=ga(),n=ya(),i=Gj(),s=vf();(function(u){u.NAME="name",u.NEWEST="newest",u.RECENTLY_REVIEWED="recently_reviewed",u.RECENTLY_SOLD="recently_sold",u.RECENTLY_LISTED="recently_listed",u.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(u){u.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:i.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"]},u.validate=(0,a.generateLazyValidator)(u.schema)})(e.Item||(e.Item={}))})(Y_)),Y_}var J_={},IR;function XF(){return IR||(IR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(J_)),J_}var Q_={},NR;function JF(){return NR||(NR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const a=ot(),t=ga(),n=ya();(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(i){i.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"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Mint||(e.Mint={}))})(Q_)),Q_}var Z_={},RR;function QF(){return RR||(RR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(a){a.NEWEST="newest",a.RECENTLY_SOLD="recently_sold",a.CHEAPEST="cheapest",a.MOST_EXPENSIVE="most_expensive",a.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(a){a.ASC="asc",a.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(Z_)),Z_}var x_={},CR;function ZF(){return CR||(CR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const a=ot(),t=ga(),n=jE(),i=ya();(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:i.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,a.generateLazyValidator)(s.schema)})(e.Order||(e.Order={}))})(x_)),x_}var $_={},MR;function xF(){return MR||(MR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})($_)),$_}var ev={},jR;function Kj(){return jR||(jR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(ev)),ev}var tv={},LR;function $F(){return LR||(LR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const a=ot(),t=ga(),n=Kj(),i=ya();(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:i.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Sale||(e.Sale={}))})(tv)),tv}var rv={},DR;function eV(){return DR||(DR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const a=ot(),t=ga(),n=ya();(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 i;(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,a.generateLazyValidator)(s.schema)})(i=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:i.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,a.generateLazyValidator)(s.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(rv)),rv}var nv={},kR;function tV(){return kR||(kR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(a){a.DATE="date",a.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(nv)),nv}var av={},qR;function rV(){return qR||(qR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(av)),av}var iv={},BR;function nV(){return BR||(BR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(iv)),iv}var ov={},UR;function aV(){return UR||(UR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const a=ot();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(i,s){const u=t().validWorldRanges;for(const c of u)if(i>=c.xMin&&i<=c.xMax&&s>=c.yMin&&s<=c.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(i){i.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},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.World||(e.World={}))})(ov)),ov}var Ko={},sv={},FR;function iV(){return FR||(FR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(sv)),sv}var uv={},VR;function oV(){return VR||(VR=1,Object.defineProperty(uv,"__esModule",{value:!0})),uv}var lv={},HR;function sV(){return HR||(HR=1,Object.defineProperty(lv,"__esModule",{value:!0})),lv}var cv={},zR;function uV(){return zR||(zR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(cv)),cv}var dv={},WR;function lV(){return WR||(WR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(dv)),dv}var fv={},GR;function cV(){return GR||(GR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewMessageType=void 0;const a=ot();(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,a.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,i,s,u="*")=>{const c={type:i,payload:s};n.postMessage(c,u)};e.sendMessage=t})(fv)),fv}var pv={},KR;function dV(){return KR||(KR=1,Object.defineProperty(pv,"__esModule",{value:!0})),pv}var hv={},YR;function fV(){return YR||(YR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(hv)),hv}var mv={},XR;function pV(){return XR||(XR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(mv)),mv}var yv={},JR;function hV(){return JR||(JR=1,Object.defineProperty(yv,"__esModule",{value:!0})),yv}var gv={},QR;function mV(){return QR||(QR=1,Object.defineProperty(gv,"__esModule",{value:!0})),gv}var _v={},ZR;function yV(){return ZR||(ZR=1,Object.defineProperty(_v,"__esModule",{value:!0})),_v}var vv={},xR;function gV(){return xR||(xR=1,Object.defineProperty(vv,"__esModule",{value:!0})),vv}var Ev={},$R;function _V(){return $R||($R=1,Object.defineProperty(Ev,"__esModule",{value:!0})),Ev}var bv={},eC;function vV(){return eC||(eC=1,Object.defineProperty(bv,"__esModule",{value:!0})),bv}var wv={},tC;function EV(){return tC||(tC=1,Object.defineProperty(wv,"__esModule",{value:!0})),wv}var Sv={},rC;function bV(){return rC||(rC=1,Object.defineProperty(Sv,"__esModule",{value:!0})),Sv}var nC;function wV(){return nC||(nC=1,(function(e){var a=Ko&&Ko.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Ko&&Ko.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(iV(),e),t(oV(),e),t(sV(),e),t(uV(),e),t(lV(),e),t(cV(),e),t(dV(),e),t(fV(),e),t(pV(),e),t(hV(),e),t(mV(),e),t(yV(),e),t(gV(),e),t(_V(),e),t(vV(),e),t(EV(),e),t(bV(),e)})(Ko)),Ko}var Tv={},aC;function SV(){return aC||(aC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const a=ot();(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,a.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(Tv)),Tv}var iC;function TV(){return iC||(iC=1,(function(e){var a=sa&&sa.__createBinding||(Object.create?(function(Ne,Ae,Re,Me){Me===void 0&&(Me=Re);var ye=Object.getOwnPropertyDescriptor(Ae,Re);(!ye||("get"in ye?!Ae.__esModule:ye.writable||ye.configurable))&&(ye={enumerable:!0,get:function(){return Ae[Re]}}),Object.defineProperty(Ne,Me,ye)}):(function(Ne,Ae,Re,Me){Me===void 0&&(Me=Re),Ne[Me]=Ae[Re]})),t=sa&&sa.__setModuleDefault||(Object.create?(function(Ne,Ae){Object.defineProperty(Ne,"default",{enumerable:!0,value:Ae})}):function(Ne,Ae){Ne.default=Ae}),n=sa&&sa.__importStar||function(Ne){if(Ne&&Ne.__esModule)return Ne;var Ae={};if(Ne!=null)for(var Re in Ne)Re!=="default"&&Object.prototype.hasOwnProperty.call(Ne,Re)&&a(Ae,Ne,Re);return t(Ae,Ne),Ae},i=sa&&sa.__exportStar||function(Ne,Ae){for(var Re in Ne)Re!=="default"&&!Object.prototype.hasOwnProperty.call(Ae,Re)&&a(Ae,Ne,Re)};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(HF());e.sdk=s,i(ot(),e);var u=zF();Object.defineProperty(e,"Bid",{enumerable:!0,get:function(){return u.Bid}}),Object.defineProperty(e,"BidSortBy",{enumerable:!0,get:function(){return u.BidSortBy}});var c=WF();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return c.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return c.AccountSortBy}});var f=ga();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=Wj();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return p.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return p.getChainId}});var m=GF();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return m.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return m.CollectionSortBy}});var h=KF();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return h.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return h.ContractSortBy}});var _=YF();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return _.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return _.ItemSortBy}});var T=jE();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return T.ListingStatus}});var C=XF();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return C.MetaTransaction}});var O=JF();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return O.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return O.MintSortBy}});var E=ya();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return E.Network}});var R=vf();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return R.NFTCategory}});var v=Gj();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return v.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return v.NFTSortBy}});var I=QF();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return I.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return I.CatalogSortDirection}});var A=ZF();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return A.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return A.OrderSortBy}});var y=xF();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return y.ProviderType}});var S=_f();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return S.Rarity}});var M=Kj();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return M.SaleType}});var U=$F();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return U.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return U.SaleSortBy}});var V=eV();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 Q=tV();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return Q.AnalyticsDayDataSortBy}});var ne=rV();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return ne.Store}});var me=nV();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return me.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return me.GenderFilterOption}});var be=aV();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return be.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return be.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return be.isInsideWorldLimits}}),i(wV(),e),i(ME(),e),i(xs(),e),i(SV(),e),i(CE(),e),i(zj(),e)})(sa)),sa}var oC;function Yj(){return oC||(oC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const a=TV();Object.defineProperty(e,"AuthChain",{enumerable:!0,get:function(){return a.AuthChain}}),Object.defineProperty(e,"AuthLinkType",{enumerable:!0,get:function(){return a.AuthLinkType}}),Object.defineProperty(e,"AuthLink",{enumerable:!0,get:function(){return a.AuthLink}})})(Zg)),Zg}var Vu={},sC;function PV(){if(sC)return Vu;sC=1,Object.defineProperty(Vu,"__esModule",{value:!0}),Vu.moveMinutes=void 0;function e(a){const t=new Date;return t.setMinutes(t.getMinutes()+a),t}return Vu.moveMinutes=e,Vu}var kd={},uC;function AV(){if(uC)return kd;uC=1,Object.defineProperty(kd,"__esModule",{value:!0});const e=gf();class a{constructor(n,i=!0){this.requestManager=n,this.checkedBlocks={},this.saveBlocks=i,i&&(this.savedBlocks={}),this.requests=0}async fillBlockTime(){const n=await this.getBlockWrapper("latest"),i=await this.getBlockWrapper(1);this.blockTime=(n.timestamp-i.timestamp)/Number(n.number)-1,this.firstTimestamp=i.timestamp}async getDate(n,i=!0){const s=n/1e3,u=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>=u||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,i),timestamp:s}}async findBetter(n,i,s,u=this.blockTime){if(await this.isBetterBlock(n,i,s))return i.number;const c=n-i.timestamp;let f=Math.ceil(c/u);f===0&&(f=c<0?-1:1);const p=await this.getBlockWrapper(this.getNextBlock(n,i.number,f));return u=Math.abs((i.timestamp-p.timestamp)/(i.number-p.number)),this.findBetter(n,p,s,u)}async isBetterBlock(n,i,s){const u=i.timestamp;if(s){if(u<n)return!1;const c=await this.getBlockWrapper(i.number-1);if(u>=n&&c.timestamp<n)return!0}else{if(u>=n)return!1;const c=await this.getBlockWrapper(i.number+1);if(u<n&&c.timestamp>=n)return!0}return!1}getNextBlock(n,i,s){const u=i+s;return this.checkedBlocks[n].includes(u)?this.getNextBlock(n,i,s<0?++s:--s):(this.checkedBlocks[n].push(u),u)}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:i}=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)(i).toNumber()},this.requests++,this.savedBlocks[n.toString()]}}return kd.default=a,kd}var Vr={},Pv={},Av={},Jr={},lC;function LE(){if(lC)return Jr;lC=1,Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.output=Jr.exists=Jr.hash=Jr.bytes=Jr.bool=Jr.number=void 0;function e(c){if(!Number.isSafeInteger(c)||c<0)throw new Error(`Wrong positive integer: ${c}`)}Jr.number=e;function a(c){if(typeof c!="boolean")throw new Error(`Expected boolean, not ${c}`)}Jr.bool=a;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}`)}Jr.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)}Jr.hash=n;function i(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")}Jr.exists=i;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}`)}Jr.output=s;const u={number:e,bool:a,bytes:t,hash:n,exists:i,output:s};return Jr.default=u,Jr}var Ov={},Hu={},cC;function OV(){return cC||(cC=1,Object.defineProperty(Hu,"__esModule",{value:!0}),Hu.crypto=void 0,Hu.crypto={node:void 0,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0}),Hu}var dC;function vl(){return dC||(dC=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 a=OV(),t=A=>new Uint8Array(A.buffer,A.byteOffset,A.byteLength);e.u8=t;const n=A=>new Uint32Array(A.buffer,A.byteOffset,Math.floor(A.byteLength/4));e.u32=n;const i=A=>new DataView(A.buffer,A.byteOffset,A.byteLength);e.createView=i;const s=(A,y)=>A<<32-y|A>>>y;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 u=Array.from({length:256},(A,y)=>y.toString(16).padStart(2,"0"));function c(A){if(!(A instanceof Uint8Array))throw new Error("Uint8Array expected");let y="";for(let S=0;S<A.length;S++)y+=u[A[S]];return y}e.bytesToHex=c;function f(A){if(typeof A!="string")throw new TypeError("hexToBytes: expected string, got "+typeof A);if(A.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const y=new Uint8Array(A.length/2);for(let S=0;S<y.length;S++){const M=S*2,U=A.slice(M,M+2),V=Number.parseInt(U,16);if(Number.isNaN(V)||V<0)throw new Error("Invalid byte sequence");y[S]=V}return y}e.hexToBytes=f;const p=async()=>{};e.nextTick=p;async function m(A,y,S){let M=Date.now();for(let U=0;U<A;U++){S(U);const V=Date.now()-M;V>=0&&V<y||(await(0,e.nextTick)(),M+=V)}}e.asyncLoop=m;function h(A){if(typeof A!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof A}`);return new TextEncoder().encode(A)}e.utf8ToBytes=h;function _(A){if(typeof A=="string"&&(A=h(A)),!(A instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof A})`);return A}e.toBytes=_;function T(...A){if(!A.every(M=>M instanceof Uint8Array))throw new Error("Uint8Array list expected");if(A.length===1)return A[0];const y=A.reduce((M,U)=>M+U.length,0),S=new Uint8Array(y);for(let M=0,U=0;M<A.length;M++){const V=A[M];S.set(V,U),U+=V.length}return S}e.concatBytes=T;class C{clone(){return this._cloneInto()}}e.Hash=C;const O=A=>Object.prototype.toString.call(A)==="[object Object]"&&A.constructor===Object;function E(A,y){if(y!==void 0&&(typeof y!="object"||!O(y)))throw new TypeError("Options should be object or undefined");return Object.assign(A,y)}e.checkOpts=E;function R(A){const y=M=>A().update(_(M)).digest(),S=A();return y.outputLen=S.outputLen,y.blockLen=S.blockLen,y.create=()=>A(),y}e.wrapConstructor=R;function v(A){const y=(M,U)=>A(U).update(_(M)).digest(),S=A({});return y.outputLen=S.outputLen,y.blockLen=S.blockLen,y.create=M=>A(M),y}e.wrapConstructorWithOpts=v;function I(A=32){if(a.crypto.web)return a.crypto.web.getRandomValues(new Uint8Array(A));if(a.crypto.node)return new Uint8Array(a.crypto.node.randomBytes(A).buffer);throw new Error("The environment doesn't have randomBytes function")}e.randomBytes=I})(Ov)),Ov}var fC;function IV(){return fC||(fC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=void 0;const a=LE(),t=vl();class n extends t.Hash{constructor(u,c){super(),this.finished=!1,this.destroyed=!1,a.default.hash(u);const f=(0,t.toBytes)(c);if(this.iHash=u.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,m=new Uint8Array(p);m.set(f.length>p?u.create().update(f).digest():f);for(let h=0;h<m.length;h++)m[h]^=54;this.iHash.update(m),this.oHash=u.create();for(let h=0;h<m.length;h++)m[h]^=106;this.oHash.update(m),m.fill(0)}update(u){return a.default.exists(this),this.iHash.update(u),this}digestInto(u){a.default.exists(this),a.default.bytes(u,this.outputLen),this.finished=!0,this.iHash.digestInto(u),this.oHash.update(u),this.oHash.digestInto(u),this.destroy()}digest(){const u=new Uint8Array(this.oHash.outputLen);return this.digestInto(u),u}_cloneInto(u){u||(u=Object.create(Object.getPrototypeOf(this),{}));const{oHash:c,iHash:f,finished:p,destroyed:m,blockLen:h,outputLen:_}=this;return u=u,u.finished=p,u.destroyed=m,u.blockLen=h,u.outputLen=_,u.oHash=c._cloneInto(u.oHash),u.iHash=f._cloneInto(u.iHash),u}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const i=(s,u,c)=>new n(s,u).update(c).digest();e.hmac=i,e.hmac.create=(s,u)=>new n(s,u)})(Av)),Av}var Yo={},zu={},pC;function NV(){if(pC)return zu;pC=1,Object.defineProperty(zu,"__esModule",{value:!0}),zu.SHA2=void 0;const e=LE(),a=vl();function t(i,s,u,c){if(typeof i.setBigUint64=="function")return i.setBigUint64(s,u,c);const f=BigInt(32),p=BigInt(4294967295),m=Number(u>>f&p),h=Number(u&p),_=c?4:0,T=c?0:4;i.setUint32(s+_,m,c),i.setUint32(s+T,h,c)}class n extends a.Hash{constructor(s,u,c,f){super(),this.blockLen=s,this.outputLen=u,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,a.createView)(this.buffer)}update(s){e.default.exists(this);const{view:u,buffer:c,blockLen:f}=this;s=(0,a.toBytes)(s);const p=s.length;for(let m=0;m<p;){const h=Math.min(f-this.pos,p-m);if(h===f){const _=(0,a.createView)(s);for(;f<=p-m;m+=f)this.process(_,m);continue}c.set(s.subarray(m,m+h),this.pos),this.pos+=h,m+=h,this.pos===f&&(this.process(u,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:u,view:c,blockLen:f,isLE:p}=this;let{pos:m}=this;u[m++]=128,this.buffer.subarray(m).fill(0),this.padOffset>f-m&&(this.process(c,0),m=0);for(let O=m;O<f;O++)u[O]=0;t(c,f-8,BigInt(this.length*8),p),this.process(c,0);const h=(0,a.createView)(s),_=this.outputLen;if(_%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const T=_/4,C=this.get();if(T>C.length)throw new Error("_sha2: outputLen bigger than state");for(let O=0;O<T;O++)h.setUint32(4*O,C[O],p)}digest(){const{buffer:s,outputLen:u}=this;this.digestInto(s);const c=s.slice(0,u);return this.destroy(),c}_cloneInto(s){s||(s=new this.constructor),s.set(...this.get());const{blockLen:u,buffer:c,length:f,finished:p,destroyed:m,pos:h}=this;return s.length=f,s.pos=h,s.finished=p,s.destroyed=m,f%u&&s.buffer.set(c),s}}return zu.SHA2=n,zu}var hC;function Xj(){if(hC)return Yo;hC=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.sha224=Yo.sha256=void 0;const e=NV(),a=vl(),t=(p,m,h)=>p&m^~p&h,n=(p,m,h)=>p&m^p&h^m&h,i=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]),u=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:m,B:h,C:_,D:T,E:C,F:O,G:E,H:R}=this;return[m,h,_,T,C,O,E,R]}set(m,h,_,T,C,O,E,R){this.A=m|0,this.B=h|0,this.C=_|0,this.D=T|0,this.E=C|0,this.F=O|0,this.G=E|0,this.H=R|0}process(m,h){for(let A=0;A<16;A++,h+=4)u[A]=m.getUint32(h,!1);for(let A=16;A<64;A++){const y=u[A-15],S=u[A-2],M=(0,a.rotr)(y,7)^(0,a.rotr)(y,18)^y>>>3,U=(0,a.rotr)(S,17)^(0,a.rotr)(S,19)^S>>>10;u[A]=U+u[A-7]+M+u[A-16]|0}let{A:_,B:T,C,D:O,E,F:R,G:v,H:I}=this;for(let A=0;A<64;A++){const y=(0,a.rotr)(E,6)^(0,a.rotr)(E,11)^(0,a.rotr)(E,25),S=I+y+t(E,R,v)+i[A]+u[A]|0,U=((0,a.rotr)(_,2)^(0,a.rotr)(_,13)^(0,a.rotr)(_,22))+n(_,T,C)|0;I=v,v=R,R=E,E=O+S|0,O=C,C=T,T=_,_=S+U|0}_=_+this.A|0,T=T+this.B|0,C=C+this.C|0,O=O+this.D|0,E=E+this.E|0,R=R+this.F|0,v=v+this.G|0,I=I+this.H|0,this.set(_,T,C,O,E,R,v,I)}roundClean(){u.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 Yo.sha256=(0,a.wrapConstructor)(()=>new c),Yo.sha224=(0,a.wrapConstructor)(()=>new f),Yo}var Iv={};const RV={},CV=Object.freeze(Object.defineProperty({__proto__:null,default:RV},Symbol.toStringTag,{value:"Module"})),MV=pD(CV);var mC;function yC(){return mC||(mC=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 a=MV,t=BigInt(0),n=BigInt(1),i=BigInt(2),s=BigInt(3),u=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=(ae,H)=>(ae+H/i)/H,p={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(ae){const{n:H}=c,$=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),pe=-n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),Se=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),Ce=$,Xe=BigInt("0x100000000000000000000000000000000"),Je=f(Ce*ae,H),_t=f(-pe*ae,H);let dt=B(ae-Je*$-_t*Se,H),St=B(-Je*pe-_t*Ce,H);const Ot=dt>Xe,Mt=St>Xe;if(Ot&&(dt=H-dt),Mt&&(St=H-St),dt>Xe||St>Xe)throw new Error("splitScalarEndo: Endomorphism failed, k="+ae);return{k1neg:Ot,k1:dt,k2neg:Mt,k2:St}}},m=32,h=32,_=32,T=m+1,C=2*m+1;function O(ae){const{a:H,b:$}=c,pe=B(ae*ae),Se=B(pe*ae);return B(Se+H*ae+$)}const E=c.a===t;class R extends Error{constructor(H){super(H)}}function v(ae){if(!(ae instanceof I))throw new TypeError("JacobianPoint expected")}class I{constructor(H,$,pe){this.x=H,this.y=$,this.z=pe}static fromAffine(H){if(!(H instanceof S))throw new TypeError("JacobianPoint#fromAffine: expected Point");return H.equals(S.ZERO)?I.ZERO:new I(H.x,H.y,n)}static toAffineBatch(H){const $=Oe(H.map(pe=>pe.z));return H.map((pe,Se)=>pe.toAffine($[Se]))}static normalizeZ(H){return I.toAffineBatch(H).map(I.fromAffine)}equals(H){v(H);const{x:$,y:pe,z:Se}=this,{x:Ce,y:Xe,z:Je}=H,_t=B(Se*Se),dt=B(Je*Je),St=B($*dt),Ot=B(Ce*_t),Mt=B(B(pe*Je)*dt),or=B(B(Xe*Se)*_t);return St===Ot&&Mt===or}negate(){return new I(this.x,B(-this.y),this.z)}double(){const{x:H,y:$,z:pe}=this,Se=B(H*H),Ce=B($*$),Xe=B(Ce*Ce),Je=H+Ce,_t=B(i*(B(Je*Je)-Se-Xe)),dt=B(s*Se),St=B(dt*dt),Ot=B(St-i*_t),Mt=B(dt*(_t-Ot)-u*Xe),or=B(i*$*pe);return new I(Ot,Mt,or)}add(H){v(H);const{x:$,y:pe,z:Se}=this,{x:Ce,y:Xe,z:Je}=H;if(Ce===t||Xe===t)return this;if($===t||pe===t)return H;const _t=B(Se*Se),dt=B(Je*Je),St=B($*dt),Ot=B(Ce*_t),Mt=B(B(pe*Je)*dt),or=B(B(Xe*Se)*_t),rr=B(Ot-St),wr=B(or-Mt);if(rr===t)return wr===t?this.double():I.ZERO;const Hr=B(rr*rr),An=B(rr*Hr),Vn=B(St*Hr),ai=B(wr*wr-An-i*Vn),kr=B(wr*(Vn-ai)-Mt*An),va=B(Se*Je*rr);return new I(ai,kr,va)}subtract(H){return this.add(H.negate())}multiplyUnsafe(H){const $=I.ZERO;if(typeof H=="bigint"&&H===t)return $;let pe=F(H);if(pe===n)return this;if(!E){let Ot=$,Mt=this;for(;pe>t;)pe&n&&(Ot=Ot.add(Mt)),Mt=Mt.double(),pe>>=n;return Ot}let{k1neg:Se,k1:Ce,k2neg:Xe,k2:Je}=p.splitScalar(pe),_t=$,dt=$,St=this;for(;Ce>t||Je>t;)Ce&n&&(_t=_t.add(St)),Je&n&&(dt=dt.add(St)),St=St.double(),Ce>>=n,Je>>=n;return Se&&(_t=_t.negate()),Xe&&(dt=dt.negate()),dt=new I(B(dt.x*p.beta),dt.y,dt.z),_t.add(dt)}precomputeWindow(H){const $=E?128/H+1:256/H+1,pe=[];let Se=this,Ce=Se;for(let Xe=0;Xe<$;Xe++){Ce=Se,pe.push(Ce);for(let Je=1;Je<2**(H-1);Je++)Ce=Ce.add(Se),pe.push(Ce);Se=Ce.double()}return pe}wNAF(H,$){!$&&this.equals(I.BASE)&&($=S.BASE);const pe=$&&$._WINDOW_SIZE||1;if(256%pe)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let Se=$&&y.get($);Se||(Se=this.precomputeWindow(pe),$&&pe!==1&&(Se=I.normalizeZ(Se),y.set($,Se)));let Ce=I.ZERO,Xe=I.BASE;const Je=1+(E?128/pe:256/pe),_t=2**(pe-1),dt=BigInt(2**pe-1),St=2**pe,Ot=BigInt(pe);for(let Mt=0;Mt<Je;Mt++){const or=Mt*_t;let rr=Number(H&dt);H>>=Ot,rr>_t&&(rr-=St,H+=n);const wr=or,Hr=or+Math.abs(rr)-1,An=Mt%2!==0,Vn=rr<0;rr===0?Xe=Xe.add(A(An,Se[wr])):Ce=Ce.add(A(Vn,Se[Hr]))}return{p:Ce,f:Xe}}multiply(H,$){let pe=F(H),Se,Ce;if(E){const{k1neg:Xe,k1:Je,k2neg:_t,k2:dt}=p.splitScalar(pe);let{p:St,f:Ot}=this.wNAF(Je,$),{p:Mt,f:or}=this.wNAF(dt,$);St=A(Xe,St),Mt=A(_t,Mt),Mt=new I(B(Mt.x*p.beta),Mt.y,Mt.z),Se=St.add(Mt),Ce=Ot.add(or)}else{const{p:Xe,f:Je}=this.wNAF(pe,$);Se=Xe,Ce=Je}return I.normalizeZ([Se,Ce])[0]}toAffine(H){const{x:$,y:pe,z:Se}=this,Ce=this.equals(I.ZERO);H==null&&(H=Ce?u:ue(Se));const Xe=H,Je=B(Xe*Xe),_t=B(Je*Xe),dt=B($*Je),St=B(pe*_t),Ot=B(Se*Xe);if(Ce)return S.ZERO;if(Ot!==n)throw new Error("invZ was invalid");return new S(dt,St)}}I.BASE=new I(c.Gx,c.Gy,n),I.ZERO=new I(t,n,t);function A(ae,H){const $=H.negate();return ae?$:H}const y=new WeakMap;class S{constructor(H,$){this.x=H,this.y=$}_setWindowSize(H){this._WINDOW_SIZE=H,y.delete(this)}hasEvenY(){return this.y%i===t}static fromCompressedHex(H){const $=H.length===32,pe=X($?H:H.subarray(1));if(!De(pe))throw new Error("Point is not on curve");const Se=O(pe);let Ce=K(Se);const Xe=(Ce&n)===n;$?Xe&&(Ce=B(-Ce)):(H[0]&1)===1!==Xe&&(Ce=B(-Ce));const Je=new S(pe,Ce);return Je.assertValidity(),Je}static fromUncompressedHex(H){const $=X(H.subarray(1,m+1)),pe=X(H.subarray(m+1,m*2+1)),Se=new S($,pe);return Se.assertValidity(),Se}static fromHex(H){const $=j(H),pe=$.length,Se=$[0];if(pe===m)return this.fromCompressedHex($);if(pe===T&&(Se===2||Se===3))return this.fromCompressedHex($);if(pe===C&&Se===4)return this.fromUncompressedHex($);throw new Error(`Point.fromHex: received invalid point. Expected 32-${T} compressed bytes or ${C} uncompressed bytes, not ${pe}`)}static fromPrivateKey(H){return S.BASE.multiply(Le(H))}static fromSignature(H,$,pe){const{r:Se,s:Ce}=Dt($);if(![0,1,2,3].includes(pe))throw new Error("Cannot recover: invalid recovery bit");const Xe=Be(j(H)),{n:Je}=c,_t=pe===2||pe===3?Se+Je:Se,dt=ue(_t,Je),St=B(-Xe*dt,Je),Ot=B(Ce*dt,Je),Mt=pe&1?"03":"02",or=S.fromHex(Mt+Ae(_t)),rr=S.BASE.multiplyAndAddUnsafe(or,St,Ot);if(!rr)throw new Error("Cannot recover signature: point at infinify");return rr.assertValidity(),rr}toRawBytes(H=!1){return le(this.toHex(H))}toHex(H=!1){const $=Ae(this.x);return H?`${this.hasEvenY()?"02":"03"}${$}`:`04${$}${Ae(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const H="Point is not on elliptic curve",{x:$,y:pe}=this;if(!De($)||!De(pe))throw new Error(H);const Se=B(pe*pe),Ce=O($);if(B(Se-Ce)!==t)throw new Error(H)}equals(H){return this.x===H.x&&this.y===H.y}negate(){return new S(this.x,B(-this.y))}double(){return I.fromAffine(this).double().toAffine()}add(H){return I.fromAffine(this).add(I.fromAffine(H)).toAffine()}subtract(H){return this.add(H.negate())}multiply(H){return I.fromAffine(this).multiply(H,this).toAffine()}multiplyAndAddUnsafe(H,$,pe){const Se=I.fromAffine(this),Ce=$===t||$===n||this!==S.BASE?Se.multiplyUnsafe($):Se.multiply($),Xe=I.fromAffine(H).multiplyUnsafe(pe),Je=Ce.add(Xe);return Je.equals(I.ZERO)?void 0:Je.toAffine()}}e.Point=S,S.BASE=new S(c.Gx,c.Gy),S.ZERO=new S(t,t);function M(ae){return Number.parseInt(ae[0],16)>=8?"00"+ae:ae}function U(ae){if(ae.length<2||ae[0]!==2)throw new Error(`Invalid signature integer tag: ${be(ae)}`);const H=ae[1],$=ae.subarray(2,H+2);if(!H||$.length!==H)throw new Error("Invalid signature integer: wrong length");if($[0]===0&&$[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:X($),left:ae.subarray(H+2)}}function V(ae){if(ae.length<2||ae[0]!=48)throw new Error(`Invalid signature tag: ${be(ae)}`);if(ae[1]!==ae.length-2)throw new Error("Invalid signature: incorrect length");const{data:H,left:$}=U(ae.subarray(2)),{data:pe,left:Se}=U($);if(Se.length)throw new Error(`Invalid signature: left bytes after parsing: ${be(Se)}`);return{r:H,s:pe}}class Q{constructor(H,$){this.r=H,this.s=$,this.assertValidity()}static fromCompact(H){const $=H instanceof Uint8Array,pe="Signature.fromCompact";if(typeof H!="string"&&!$)throw new TypeError(`${pe}: Expected string or Uint8Array`);const Se=$?be(H):H;if(Se.length!==128)throw new Error(`${pe}: Expected 64-byte hex`);return new Q(ye(Se.slice(0,64)),ye(Se.slice(64,128)))}static fromDER(H){const $=H instanceof Uint8Array;if(typeof H!="string"&&!$)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:pe,s:Se}=V($?H:le(H));return new Q(pe,Se)}static fromHex(H){return this.fromDER(H)}assertValidity(){const{r:H,s:$}=this;if(!Pe(H))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Pe($))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const H=c.n>>n;return this.s>H}normalizeS(){return this.hasHighS()?new Q(this.r,B(-this.s,c.n)):this}toDERRawBytes(){return le(this.toDERHex())}toDERHex(){const H=M(Me(this.s)),$=M(Me(this.r)),pe=H.length/2,Se=$.length/2,Ce=Me(pe),Xe=Me(Se);return`30${Me(Se+pe+4)}02${Xe}${$}02${Ce}${H}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return le(this.toCompactHex())}toCompactHex(){return Ae(this.r)+Ae(this.s)}}e.Signature=Q;function ne(...ae){if(!ae.every(pe=>pe instanceof Uint8Array))throw new Error("Uint8Array list expected");if(ae.length===1)return ae[0];const H=ae.reduce((pe,Se)=>pe+Se.length,0),$=new Uint8Array(H);for(let pe=0,Se=0;pe<ae.length;pe++){const Ce=ae[pe];$.set(Ce,Se),Se+=Ce.length}return $}const me=Array.from({length:256},(ae,H)=>H.toString(16).padStart(2,"0"));function be(ae){if(!(ae instanceof Uint8Array))throw new Error("Expected Uint8Array");let H="";for(let $=0;$<ae.length;$++)H+=me[ae[$]];return H}const Ne=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function Ae(ae){if(typeof ae!="bigint")throw new Error("Expected bigint");if(!(t<=ae&&ae<Ne))throw new Error("Expected number 0 <= n < 2^256");return ae.toString(16).padStart(64,"0")}function Re(ae){const H=le(Ae(ae));if(H.length!==32)throw new Error("Error: expected 32 bytes");return H}function Me(ae){const H=ae.toString(16);return H.length&1?`0${H}`:H}function ye(ae){if(typeof ae!="string")throw new TypeError("hexToNumber: expected string, got "+typeof ae);return BigInt(`0x${ae}`)}function le(ae){if(typeof ae!="string")throw new TypeError("hexToBytes: expected string, got "+typeof ae);if(ae.length%2)throw new Error("hexToBytes: received invalid unpadded hex"+ae.length);const H=new Uint8Array(ae.length/2);for(let $=0;$<H.length;$++){const pe=$*2,Se=ae.slice(pe,pe+2),Ce=Number.parseInt(Se,16);if(Number.isNaN(Ce)||Ce<0)throw new Error("Invalid byte sequence");H[$]=Ce}return H}function X(ae){return ye(be(ae))}function j(ae){return ae instanceof Uint8Array?Uint8Array.from(ae):le(ae)}function F(ae){if(typeof ae=="number"&&Number.isSafeInteger(ae)&&ae>0)return BigInt(ae);if(typeof ae=="bigint"&&Pe(ae))return ae;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function B(ae,H=c.P){const $=ae%H;return $>=t?$:H+$}function L(ae,H){const{P:$}=c;let pe=ae;for(;H-- >t;)pe*=pe,pe%=$;return pe}function K(ae){const{P:H}=c,$=BigInt(6),pe=BigInt(11),Se=BigInt(22),Ce=BigInt(23),Xe=BigInt(44),Je=BigInt(88),_t=ae*ae*ae%H,dt=_t*_t*ae%H,St=L(dt,s)*dt%H,Ot=L(St,s)*dt%H,Mt=L(Ot,i)*_t%H,or=L(Mt,pe)*Mt%H,rr=L(or,Se)*or%H,wr=L(rr,Xe)*rr%H,Hr=L(wr,Je)*wr%H,An=L(Hr,Xe)*rr%H,Vn=L(An,s)*dt%H,ai=L(Vn,Ce)*or%H,kr=L(ai,$)*_t%H,va=L(kr,i);if(va*va%H!==ae)throw new Error("Cannot find square root");return va}function ue(ae,H=c.P){if(ae===t||H<=t)throw new Error(`invert: expected positive integers, got n=${ae} mod=${H}`);let $=B(ae,H),pe=H,Se=t,Ce=n;for(;$!==t;){const Je=pe/$,_t=pe%$,dt=Se-Ce*Je;pe=$,$=_t,Se=Ce,Ce=dt}if(pe!==n)throw new Error("invert: does not exist");return B(Se,H)}function Oe(ae,H=c.P){const $=new Array(ae.length),pe=ae.reduce((Ce,Xe,Je)=>Xe===t?Ce:($[Je]=Ce,B(Ce*Xe,H)),n),Se=ue(pe,H);return ae.reduceRight((Ce,Xe,Je)=>Xe===t?Ce:($[Je]=B(Ce*$[Je],H),B(Ce*Xe,H)),Se),$}function Te(ae){const H=ae.length*8-h*8,$=X(ae);return H>0?$>>BigInt(H):$}function Be(ae,H=!1){const $=Te(ae);if(H)return $;const{n:pe}=c;return $>=pe?$-pe:$}let je,ce;class fe{constructor(H,$){if(this.hashLen=H,this.qByteLen=$,typeof H!="number"||H<2)throw new Error("hashLen must be a number");if(typeof $!="number"||$<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(H).fill(1),this.k=new Uint8Array(H).fill(0),this.counter=0}hmac(...H){return e.utils.hmacSha256(this.k,...H)}hmacSync(...H){return ce(this.k,...H)}checkSync(){if(typeof ce!="function")throw new R("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(H=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),H),this.v=await this.hmac(this.v),H.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),H),this.v=await this.hmac(this.v))}reseedSync(H=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),H),this.v=this.hmacSync(this.v),H.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),H),this.v=this.hmacSync(this.v))}async generate(){this.incr();let H=0;const $=[];for(;H<this.qByteLen;){this.v=await this.hmac(this.v);const pe=this.v.slice();$.push(pe),H+=this.v.length}return ne(...$)}generateSync(){this.checkSync(),this.incr();let H=0;const $=[];for(;H<this.qByteLen;){this.v=this.hmacSync(this.v);const pe=this.v.slice();$.push(pe),H+=this.v.length}return ne(...$)}}function Pe(ae){return t<ae&&ae<c.n}function De(ae){return t<ae&&ae<c.P}function Ge(ae,H,$,pe=!0){const{n:Se}=c,Ce=Be(ae,!0);if(!Pe(Ce))return;const Xe=ue(Ce,Se),Je=S.BASE.multiply(Ce),_t=B(Je.x,Se);if(_t===t)return;const dt=B(Xe*B(H+$*_t,Se),Se);if(dt===t)return;let St=new Q(_t,dt),Ot=(Je.x===St.r?0:2)|Number(Je.y&n);return pe&&St.hasHighS()&&(St=St.normalizeS(),Ot^=1),{sig:St,recovery:Ot}}function Le(ae){let H;if(typeof ae=="bigint")H=ae;else if(typeof ae=="number"&&Number.isSafeInteger(ae)&&ae>0)H=BigInt(ae);else if(typeof ae=="string"){if(ae.length!==2*h)throw new Error("Expected 32 bytes of private key");H=ye(ae)}else if(ae instanceof Uint8Array){if(ae.length!==h)throw new Error("Expected 32 bytes of private key");H=X(ae)}else throw new TypeError("Expected valid private key");if(!Pe(H))throw new Error("Expected private key: 0 < key < n");return H}function Rt(ae){return ae instanceof S?(ae.assertValidity(),ae):S.fromHex(ae)}function Dt(ae){if(ae instanceof Q)return ae.assertValidity(),ae;try{return Q.fromDER(ae)}catch{return Q.fromCompact(ae)}}function Gt(ae,H=!1){return S.fromPrivateKey(ae).toRawBytes(H)}e.getPublicKey=Gt;function It(ae,H,$,pe=!1){return S.fromSignature(ae,H,$).toRawBytes(pe)}e.recoverPublicKey=It;function Fe(ae){const H=ae instanceof Uint8Array,$=typeof ae=="string",pe=(H||$)&&ae.length;return H?pe===T||pe===C:$?pe===T*2||pe===C*2:ae instanceof S}function pt(ae,H,$=!1){if(Fe(ae))throw new TypeError("getSharedSecret: first arg must be private key");if(!Fe(H))throw new TypeError("getSharedSecret: second arg must be public key");const pe=Rt(H);return pe.assertValidity(),pe.multiply(Le(ae)).toRawBytes($)}e.getSharedSecret=pt;function Qe(ae){const H=ae.length>m?ae.slice(0,m):ae;return X(H)}function qt(ae){const H=Qe(ae),$=B(H,c.n);return Kt($<t?H:$)}function Kt(ae){return Re(ae)}function tr(ae,H,$){if(ae==null)throw new Error(`sign: expected valid message hash, not "${ae}"`);const pe=j(ae),Se=Le(H),Ce=[Kt(Se),qt(pe)];if($!=null){$===!0&&($=e.utils.randomBytes(m));const _t=j($);if(_t.length!==m)throw new Error(`sign: Expected ${m} bytes of extra data`);Ce.push(_t)}const Xe=ne(...Ce),Je=Qe(pe);return{seed:Xe,m:Je,d:Se}}function jr(ae,H){const{sig:$,recovery:pe}=ae,{der:Se,recovered:Ce}=Object.assign({canonical:!0,der:!0},H),Xe=Se?$.toDERRawBytes():$.toCompactRawBytes();return Ce?[Xe,pe]:Xe}async function fr(ae,H,$={}){const{seed:pe,m:Se,d:Ce}=tr(ae,H,$.extraEntropy),Xe=new fe(_,h);await Xe.reseed(pe);let Je;for(;!(Je=Ge(await Xe.generate(),Se,Ce,$.canonical));)await Xe.reseed();return jr(Je,$)}e.sign=fr;function mn(ae,H,$={}){const{seed:pe,m:Se,d:Ce}=tr(ae,H,$.extraEntropy),Xe=new fe(_,h);Xe.reseedSync(pe);let Je;for(;!(Je=Ge(Xe.generateSync(),Se,Ce,$.canonical));)Xe.reseedSync();return jr(Je,$)}e.signSync=mn;const Lr={strict:!0};function Sn(ae,H,$,pe=Lr){let Se;try{Se=Dt(ae),H=j(H)}catch{return!1}const{r:Ce,s:Xe}=Se;if(pe.strict&&Se.hasHighS())return!1;const Je=Be(H);let _t;try{_t=Rt($)}catch{return!1}const{n:dt}=c,St=ue(Xe,dt),Ot=B(Je*St,dt),Mt=B(Ce*St,dt),or=S.BASE.multiplyAndAddUnsafe(_t,Ot,Mt);return or?B(or.x,dt)===Ce:!1}e.verify=Sn;function rn(ae){return B(X(ae),c.n)}class Tn{constructor(H,$){this.r=H,this.s=$,this.assertValidity()}static fromHex(H){const $=j(H);if($.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${$.length}`);const pe=X($.subarray(0,32)),Se=X($.subarray(32,64));return new Tn(pe,Se)}assertValidity(){const{r:H,s:$}=this;if(!De(H)||!Pe($))throw new Error("Invalid signature")}toHex(){return Ae(this.r)+Ae(this.s)}toRawBytes(){return le(this.toHex())}}function nn(ae){return S.fromPrivateKey(ae).toRawX()}class ni{constructor(H,$,pe=e.utils.randomBytes()){if(H==null)throw new TypeError(`sign: Expected valid message, not "${H}"`);this.m=j(H);const{x:Se,scalar:Ce}=this.getScalar(Le($));if(this.px=Se,this.d=Ce,this.rand=j(pe),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(H){const $=S.fromPrivateKey(H),pe=$.hasEvenY()?H:c.n-H;return{point:$,scalar:pe,x:$.toRawX()}}initNonce(H,$){return Re(H^X($))}finalizeNonce(H){const $=B(X(H),c.n);if($===t)throw new Error("sign: Creation of signature failed. k is zero");const{point:pe,x:Se,scalar:Ce}=this.getScalar($);return{R:pe,rx:Se,k:Ce}}finalizeSig(H,$,pe,Se){return new Tn(H.x,B($+pe*Se,c.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:H,d:$,px:pe,rand:Se}=this,Ce=e.utils.taggedHash,Xe=this.initNonce($,await Ce(Qr.aux,Se)),{R:Je,rx:_t,k:dt}=this.finalizeNonce(await Ce(Qr.nonce,Xe,pe,H)),St=rn(await Ce(Qr.challenge,_t,pe,H)),Ot=this.finalizeSig(Je,dt,St,$);return await Da(Ot,H,pe)||this.error(),Ot}calcSync(){const{m:H,d:$,px:pe,rand:Se}=this,Ce=e.utils.taggedHashSync,Xe=this.initNonce($,Ce(Qr.aux,Se)),{R:Je,rx:_t,k:dt}=this.finalizeNonce(Ce(Qr.nonce,Xe,pe,H)),St=rn(Ce(Qr.challenge,_t,pe,H)),Ot=this.finalizeSig(Je,dt,St,$);return Dr(Ot,H,pe)||this.error(),Ot}}async function Pn(ae,H,$){return new ni(ae,H,$).calc()}function ja(ae,H,$){return new ni(ae,H,$).calcSync()}function La(ae,H,$){const pe=ae instanceof Tn,Se=pe?ae:Tn.fromHex(ae);return pe&&Se.assertValidity(),{...Se,m:j(H),P:Rt($)}}function _a(ae,H,$,pe){const Se=S.BASE.multiplyAndAddUnsafe(H,Le($),B(-pe,c.n));return!(!Se||!Se.hasEvenY()||Se.x!==ae)}async function Da(ae,H,$){try{const{r:pe,s:Se,m:Ce,P:Xe}=La(ae,H,$),Je=rn(await e.utils.taggedHash(Qr.challenge,Re(pe),Xe.toRawX(),Ce));return _a(pe,Xe,Se,Je)}catch{return!1}}function Dr(ae,H,$){try{const{r:pe,s:Se,m:Ce,P:Xe}=La(ae,H,$),Je=rn(e.utils.taggedHashSync(Qr.challenge,Re(pe),Xe.toRawX(),Ce));return _a(pe,Xe,Se,Je)}catch(pe){if(pe instanceof R)throw pe;return!1}}e.schnorr={Signature:Tn,getPublicKey:nn,sign:Pn,verify:Da,signSync:ja,verifySync:Dr},S.BASE._setWindowSize(8);const Ct={node:a,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},Qr={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},an={};e.utils={bytesToHex:be,hexToBytes:le,concatBytes:ne,mod:B,invert:ue,isValidPrivateKey(ae){try{return Le(ae),!0}catch{return!1}},_bigintTo32Bytes:Re,_normalizePrivateKey:Le,hashToPrivateKey:ae=>{ae=j(ae);const H=h+8;if(ae.length<H||ae.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const $=B(X(ae),c.n-n)+n;return Re($)},randomBytes:(ae=32)=>{if(Ct.web)return Ct.web.getRandomValues(new Uint8Array(ae));if(Ct.node){const{randomBytes:H}=Ct.node;return Uint8Array.from(H(ae))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(h+8)),precompute(ae=8,H=S.BASE){const $=H===S.BASE?H:new S(H.x,H.y);return $._setWindowSize(ae),$.multiply(s),$},sha256:async(...ae)=>{if(Ct.web){const H=await Ct.web.subtle.digest("SHA-256",ne(...ae));return new Uint8Array(H)}else if(Ct.node){const{createHash:H}=Ct.node,$=H("sha256");return ae.forEach(pe=>$.update(pe)),Uint8Array.from($.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(ae,...H)=>{if(Ct.web){const $=await Ct.web.subtle.importKey("raw",ae,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),pe=ne(...H),Se=await Ct.web.subtle.sign("HMAC",$,pe);return new Uint8Array(Se)}else if(Ct.node){const{createHmac:$}=Ct.node,pe=$("sha256",ae);return H.forEach(Se=>pe.update(Se)),Uint8Array.from(pe.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(ae,...H)=>{let $=an[ae];if($===void 0){const pe=await e.utils.sha256(Uint8Array.from(ae,Se=>Se.charCodeAt(0)));$=ne(pe,pe),an[ae]=$}return e.utils.sha256($,...H)},taggedHashSync:(ae,...H)=>{if(typeof je!="function")throw new R("sha256Sync is undefined, you need to set it");let $=an[ae];if($===void 0){const pe=je(Uint8Array.from(ae,Se=>Se.charCodeAt(0)));$=ne(pe,pe),an[ae]=$}return je($,...H)},_JacobianPoint:I},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get(){return je},set(ae){je||(je=ae)}},hmacSha256Sync:{configurable:!1,get(){return ce},set(ae){ce||(ce=ae)}}})})(Iv)),Iv}var gC;function DE(){return gC||(gC=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 a=IV(),t=Xj(),n=yC();var i=yC();Object.defineProperty(e,"getPublicKey",{enumerable:!0,get:function(){return i.getPublicKey}}),Object.defineProperty(e,"sign",{enumerable:!0,get:function(){return i.sign}}),Object.defineProperty(e,"signSync",{enumerable:!0,get:function(){return i.signSync}}),Object.defineProperty(e,"verify",{enumerable:!0,get:function(){return i.verify}}),Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return i.recoverPublicKey}}),Object.defineProperty(e,"getSharedSecret",{enumerable:!0,get:function(){return i.getSharedSecret}}),Object.defineProperty(e,"utils",{enumerable:!0,get:function(){return i.utils}}),Object.defineProperty(e,"CURVE",{enumerable:!0,get:function(){return i.CURVE}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return i.Point}}),Object.defineProperty(e,"Signature",{enumerable:!0,get:function(){return i.Signature}}),Object.defineProperty(e,"schnorr",{enumerable:!0,get:function(){return i.schnorr}}),n.utils.hmacSha256Sync=(s,...u)=>{const c=a.hmac.create(t.sha256,s);return u.forEach(f=>c.update(f)),c.digest()}})(Pv)),Pv}var wt={};function _C(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 hl={exports:{}},vC=hl.exports,EC;function Jj(){return EC||(EC=1,(function(e,a){var t=vC&&vC.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(a,"__esModule",{value:!0}),a.crypto=a.wrapHash=a.equalsBytes=a.hexToBytes=a.bytesToUtf8=a.utf8ToBytes=a.createView=a.concatBytes=a.toHex=a.bytesToHex=a.assertBytes=a.assertBool=void 0;const n=t(LE()),i=vl(),s=n.default.bool;a.assertBool=s;const u=n.default.bytes;a.assertBytes=u;var c=vl();Object.defineProperty(a,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(a,"toHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(a,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(a,"createView",{enumerable:!0,get:function(){return c.createView}}),Object.defineProperty(a,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}});function f(_){if(!(_ instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof _}`);return new TextDecoder().decode(_)}a.bytesToUtf8=f;function p(_){const T=_.startsWith("0x")?_.substring(2):_;return(0,i.hexToBytes)(T)}a.hexToBytes=p;function m(_,T){if(_.length!==T.length)return!1;for(let C=0;C<_.length;C++)if(_[C]!==T[C])return!1;return!0}a.equalsBytes=m;function h(_){return T=>(n.default.bytes(T),_(T))}a.wrapHash=h,a.crypto=(()=>{const _=typeof self=="object"&&"crypto"in self?self.crypto:void 0,T=typeof _C=="function"&&_C.bind(e);return{node:T&&!_?T("crypto"):void 0,web:_}})()})(hl,hl.exports)),hl.exports}var bC;function jV(){if(bC)return wt;bC=1;var e=wt&&wt.__createBinding||(Object.create?(function(le,X,j,F){F===void 0&&(F=j);var B=Object.getOwnPropertyDescriptor(X,j);(!B||("get"in B?!X.__esModule:B.writable||B.configurable))&&(B={enumerable:!0,get:function(){return X[j]}}),Object.defineProperty(le,F,B)}):(function(le,X,j,F){F===void 0&&(F=j),le[F]=X[j]})),a=wt&&wt.__setModuleDefault||(Object.create?(function(le,X){Object.defineProperty(le,"default",{enumerable:!0,value:X})}):function(le,X){le.default=X}),t=wt&&wt.__importStar||function(le){if(le&&le.__esModule)return le;var X={};if(le!=null)for(var j in le)j!=="default"&&Object.prototype.hasOwnProperty.call(le,j)&&e(X,le,j);return a(X,le),X};Object.defineProperty(wt,"__esModule",{value:!0}),wt.contextRandomize=wt.ecdh=wt.signatureNormalize=wt.signatureImport=wt.signatureExport=wt.privateKeyTweakMul=wt.publicKeyTweakMul=wt.publicKeyTweakAdd=wt.publicKeyCombine=wt.publicKeyNegate=wt.privateKeyNegate=wt.privateKeyTweakAdd=wt.ecdsaVerify=wt.ecdsaRecover=wt.ecdsaSign=wt.publicKeyConvert=wt.publicKeyVerify=wt.publicKeyCreate=wt.privateKeyVerify=wt.createPrivateKey=wt.createPrivateKeySync=void 0;const n=Xj(),i=t(DE()),s=Jj();function u(le){if(typeof le!="string")throw new TypeError("hexToNumber: expected string, got "+typeof le);return BigInt(`0x${le}`)}const c=le=>u((0,s.toHex)(le)),f=le=>le.toString(16).padStart(64,"0"),p=le=>(0,s.hexToBytes)(f(le)),{mod:m}=i.utils,h=i.CURVE.n;function _(le=F=>new Uint8Array(F),X,j){return typeof le=="function"&&(le=le(X)),(0,s.assertBytes)(le,X),j&&le.set(j),le}function T(le){return(0,s.assertBytes)(le,64),i.Signature.fromCompact(le)}function C(){return i.utils.randomPrivateKey()}wt.createPrivateKeySync=C;async function O(){return C()}wt.createPrivateKey=O;function E(le){return(0,s.assertBytes)(le,32),i.utils.isValidPrivateKey(le)}wt.privateKeyVerify=E;function R(le,X=!0,j){(0,s.assertBytes)(le,32),(0,s.assertBool)(X);const F=i.getPublicKey(le,X);return _(j,X?33:65,F)}wt.publicKeyCreate=R;function v(le){(0,s.assertBytes)(le,33,65);try{return i.Point.fromHex(le),!0}catch{return!1}}wt.publicKeyVerify=v;function I(le,X=!0,j){(0,s.assertBytes)(le,33,65),(0,s.assertBool)(X);const F=i.Point.fromHex(le).toRawBytes(X);return _(j,X?33:65,F)}wt.publicKeyConvert=I;function A(le,X,j={noncefn:void 0,data:void 0},F){if((0,s.assertBytes)(le,32),(0,s.assertBytes)(X,32),typeof j!="object"||j===null)throw new TypeError("secp256k1.ecdsaSign: options should be object");if(j&&(j.noncefn!==void 0||j.data!==void 0))throw new Error("Secp256k1: noncefn && data is unsupported");const[B,L]=i.signSync(le,X,{recovered:!0,der:!1});return{signature:_(F,64,B),recid:L}}wt.ecdsaSign=A;function y(le,X,j,F=!0,B){(0,s.assertBytes)(j,32),(0,s.assertBool)(F);const L=T(le).toHex(),K=i.Point.fromSignature(j,L,X);return _(B,F?33:65,K.toRawBytes(F))}wt.ecdsaRecover=y;function S(le,X,j){(0,s.assertBytes)(le,64),(0,s.assertBytes)(X,32),(0,s.assertBytes)(j,33,65),(0,s.assertBytes)(le,64);const F=c(le.slice(0,32)),B=c(le.slice(32,64));if(F>=h||B>=h)throw new Error("Cannot parse signature");const L=i.Point.fromHex(j);let K;try{K=T(le)}catch{return!1}return i.verify(K,X,L)}wt.ecdsaVerify=S;function M(le,X){(0,s.assertBytes)(le,32),(0,s.assertBytes)(X,32);let j=c(X);if(j===0n)throw new Error("Tweak must not be zero");if(j>=h)throw new Error("Tweak bigger than curve order");if(j+=c(le),j>=h&&(j-=h),j===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return le.set((0,s.hexToBytes)(f(j))),le}wt.privateKeyTweakAdd=M;function U(le){(0,s.assertBytes)(le,32);const X=m(-c(le),h);return le.set((0,s.hexToBytes)(f(X))),le}wt.privateKeyNegate=U;function V(le,X=!0,j){(0,s.assertBytes)(le,33,65),(0,s.assertBool)(X);const F=i.Point.fromHex(le).negate();return _(j,X?33:65,F.toRawBytes(X))}wt.publicKeyNegate=V;function Q(le,X=!0,j){if(!Array.isArray(le)||!le.length)throw new TypeError(`Expected array with one or more items, not ${le}`);for(const B of le)(0,s.assertBytes)(B,33,65);(0,s.assertBool)(X);const F=le.map(B=>i.Point.fromHex(B)).reduce((B,L)=>B.add(L),i.Point.ZERO);if(F.equals(i.Point.ZERO))throw new Error("Combined result must not be zero");return _(j,X?33:65,F.toRawBytes(X))}wt.publicKeyCombine=Q;function ne(le,X,j=!0,F){(0,s.assertBytes)(le,33,65),(0,s.assertBytes)(X,32),(0,s.assertBool)(j);const B=i.Point.fromHex(le),L=i.Point.fromPrivateKey(X),K=B.add(L);if(L.equals(i.Point.ZERO)||K.equals(i.Point.ZERO))throw new Error("Tweak must not be zero");return _(F,j?33:65,K.toRawBytes(j))}wt.publicKeyTweakAdd=ne;function me(le,X,j=!0,F){(0,s.assertBytes)(le,33,65),(0,s.assertBytes)(X,32),(0,s.assertBool)(j);const B=c(X);if(B===0n)throw new Error("Tweak must not be zero");if(B<=1||B>=h)throw new Error("Tweak is zero or bigger than curve order");const L=i.Point.fromHex(le).multiply(B);return _(F,j?33:65,L.toRawBytes(j))}wt.publicKeyTweakMul=me;function be(le,X){(0,s.assertBytes)(le,32),(0,s.assertBytes)(X,32);const j=c(X);if(j<=1||j>=h)throw new Error("Tweak is zero or bigger than curve order");const F=m(j*c(le),h);if(F===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return le.set((0,s.hexToBytes)(f(F))),le}wt.privateKeyTweakMul=be;function Ne(le,X){const j=T(le).toRawBytes();return _(X,72,T(le).toRawBytes()).slice(0,j.length)}wt.signatureExport=Ne;function Ae(le,X){(0,s.assertBytes)(le);const j=i.Signature.fromDER(le);return _(X,64,(0,s.hexToBytes)(j.toCompactHex()))}wt.signatureImport=Ae;function Re(le){const X=T(le);return X.s>h/2n&&le.set(p(h-X.s),32),le}wt.signatureNormalize=Re;function Me(le,X,j={},F){if((0,s.assertBytes)(le,33,65),(0,s.assertBytes)(X,32),typeof j!="object"||j===null)throw new TypeError("secp256k1.ecdh: options should be object");j.data!==void 0&&(0,s.assertBytes)(j.data);const B=i.Point.fromHex(i.getSharedSecret(X,le));if(j.hashfn===void 0)return _(F,32,(0,n.sha256)(B.toRawBytes(!0)));if(typeof j.hashfn!="function")throw new TypeError("secp256k1.ecdh: options.hashfn should be function");j.xbuf!==void 0&&(0,s.assertBytes)(j.xbuf,32),j.ybuf!==void 0&&(0,s.assertBytes)(j.ybuf,32),(0,s.assertBytes)(F,32);const L=j.xbuf||new Uint8Array(32);L.set(p(B.x));const K=j.ybuf||new Uint8Array(32);K.set(p(B.y));const ue=j.hashfn(L,K,j.data);if(!(ue instanceof Uint8Array)||ue.length!==32)throw new Error("secp256k1.ecdh: invalid options.hashfn output");return _(F,32,ue)}wt.ecdh=Me;function ye(le){le!==null&&(0,s.assertBytes)(le,32)}return wt.contextRandomize=ye,wt}var wC;function Qj(){if(wC)return Vr;wC=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.createUnsafeIdentity=Vr.computeAddress=Vr.ethSign=Vr.createEthereumMessageHash=Vr.sign=Vr.recoverAddressFromEthSignature=Vr.recoverPublicKey=void 0;const e=gf(),a=DE(),t=jV();function n(h,_){if(h.length!==65)throw new Error("Invalid signature length"+h.length);const T=h.slice(0,h.length-1),C=h[64]===28?1:0;return(0,t.ecdsaRecover)(T,C,_,!1).slice(1)}Vr.recoverPublicKey=n;function i(h){if(h.length!==65)throw new Error("Invalid ethereum signature");const _=h[64];if(_===0||_===1){const T=new Uint8Array(h);return T[64]=_+27,T}return h}function s(h,_){if(typeof h=="string"){if((0,e.isHex)(h))return s((0,e.hexToBytes)(h),_);throw new Error("String signatures must be encoded in hex")}return p(n(i(h),c(_)))}Vr.recoverAddressFromEthSignature=s;function u(h,_){const T=(0,t.ecdsaSign)(_,h),C=T.recid===1?"1c":"1b";return(0,e.toHex)(T.signature)+C}Vr.sign=u;function c(h){const _=typeof h=="string"?(0,e.stringToUtf8Bytes)(h):h,T=(0,e.concatBytes)((0,e.stringToUtf8Bytes)(`Ethereum Signed Message:
20
20
  `),(0,e.stringToUtf8Bytes)(String(_.length)),_);return(0,e.hexToBytes)((0,e.sha3)(T))}Vr.createEthereumMessageHash=c;function f(h,_){return u(h,c(_))}Vr.ethSign=f;function p(h){const _=h.length===65&&h[0]===4?h.slice(1):h;return(0,e.getAddress)((0,e.sha3)(_).substring(24))}Vr.computeAddress=p;function m(){const h=a.utils.randomPrivateKey(),_=(0,a.getPublicKey)(h).slice(1),T=p(_);return{privateKey:(0,e.bytesToHex)(h),publicKey:(0,e.bytesToHex)(_),address:T}}return Vr.createUnsafeIdentity=m,Vr}var SC;function LV(){return SC||(SC=1,(function(e){var a=oa&&oa.__createBinding||(Object.create?(function(V,Q,ne,me){me===void 0&&(me=ne);var be=Object.getOwnPropertyDescriptor(Q,ne);(!be||("get"in be?!Q.__esModule:be.writable||be.configurable))&&(be={enumerable:!0,get:function(){return Q[ne]}}),Object.defineProperty(V,me,be)}):(function(V,Q,ne,me){me===void 0&&(me=ne),V[me]=Q[ne]})),t=oa&&oa.__setModuleDefault||(Object.create?(function(V,Q){Object.defineProperty(V,"default",{enumerable:!0,value:Q})}):function(V,Q){V.default=Q}),n=oa&&oa.__importStar||function(V){if(V&&V.__esModule)return V;var Q={};if(V!=null)for(var ne in V)ne!=="default"&&Object.prototype.hasOwnProperty.call(V,ne)&&a(Q,V,ne);return t(Q,V),Q},i=oa&&oa.__importDefault||function(V){return V&&V.__esModule?V:{default:V}};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(gf()),u=EF(),c=Yj(),f=PV(),p=i(AV()),m=Qj();e.VALID_SIGNATURE="VALID_SIGNATURE",e.ERC1654_MAGIC_VALUE="1626ba7e";const h=132;var _;(function(V){async function Q(X,j,F,B=Date.now()){let L="";if(!V.isValidAuthChain(j))return{ok:!1,message:"ERROR: Malformed authChain"};for(const ue of j){const Oe=U(ue.type);try{const{nextAuthority:Te}=await Oe(L,ue,{provider:F,dateToValidateExpirationInMillis:B});L=Te||""}catch(Te){return{ok:!1,message:`ERROR. Link type: ${ue.type}. ${Te.message}.`}}}const K=L===X;return{ok:K,message:K?void 0:`ERROR: Invalid final authority. Expected: ${X}. Current ${L}.`}}V.validateSignature=Q;function ne(X){for(const[j,F]of X.entries())if(j===0&&F.type!==c.AuthLinkType.SIGNER||F.type===c.AuthLinkType.SIGNER&&j!==0)return!1;return!0}V.isValidAuthChain=ne;function me(X){return(0,s.hexToBytes)((0,s.sha3)((0,s.stringToUtf8Bytes)(X)))}V.createEIP1271MessageHash=me;function be(X,j,F){return[{type:c.AuthLinkType.SIGNER,payload:j,signature:""},{type:A(F),payload:X,signature:F}]}V.createSimpleAuthChain=be;function Ne(X,j,F,B){const L=(0,f.moveMinutes)(F),K=V.getEphemeralMessage(j.address,L),ue=V.createSignature(X,K),Oe=V.createSignature(j,B);return[{type:c.AuthLinkType.SIGNER,payload:X.address,signature:""},{type:c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:K,signature:ue},{type:c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:B,signature:Oe}]}V.createAuthChain=Ne;async function Ae(X,j,F,B){const L=new Date;L.setMinutes(L.getMinutes()+F);const K=V.getEphemeralMessage(j.address,L),ue=await B(K),Oe=[{type:c.AuthLinkType.SIGNER,payload:X,signature:""},{type:I(ue),payload:K,signature:ue}];return{ephemeralIdentity:j,expiration:L,authChain:Oe}}V.initializeAuthChain=Ae;function Re(X,j){const F=V.createSignature(X.ephemeralIdentity,j);return[...X.authChain,{type:c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:j,signature:F}]}V.signPayload=Re,V.createEthereumMessageHash=m.createEthereumMessageHash;function Me(X,j){return(0,m.ethSign)((0,s.hexToBytes)(X.privateKey),j)}V.createSignature=Me;function ye(X){return X.length>0&&X[0].type===c.AuthLinkType.SIGNER?X[0].payload:"Invalid-Owner-Address"}V.ownerAddress=ye;function le(X,j){return`Decentraland Login
21
21
  Ephemeral address: ${X}
22
22
  Expiration: ${j.toISOString()}`}V.getEphemeralMessage=le})(_=e.Authenticator||(e.Authenticator={}));const T=async(V,Q)=>({nextAuthority:Q.payload});e.SIGNER_VALIDATOR=T;const C=async(V,Q)=>{if(!Q.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const ne=(0,m.recoverAddressFromEthSignature)(Q.signature,Q.payload),me=V.toLocaleLowerCase(),be=ne.toLocaleLowerCase();if(me===be)return{nextAuthority:Q.payload};throw new Error(`Invalid signer address. Expected: ${me}. Actual: ${be}`)};e.ECDSA_SIGNED_ENTITY_VALIDATOR=C;const O=async(V,Q,ne)=>{if(!Q.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:me,ephemeralAddress:be,expiration:Ne}=y(Q.payload),Ae=ne.dateToValidateExpirationInMillis?ne.dateToValidateExpirationInMillis:Date.now();if(Ne>Ae){const Re=(0,m.recoverAddressFromEthSignature)(Q.signature,me),Me=V.toLocaleLowerCase(),ye=Re.toLocaleLowerCase();if(Me===ye)return{nextAuthority:be};throw new Error(`Invalid signer address. Expected: ${Me}. Actual: ${ye}`)}throw new Error(`Ephemeral key expired. Expiration: ${Ne}. Test: ${Ae}`)};e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=O;const E=async(V,Q,ne)=>{if(!Q.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:me,ephemeralAddress:be,expiration:Ne}=y(Q.payload),Ae=ne?.dateToValidateExpirationInMillis?ne?.dateToValidateExpirationInMillis:Date.now();if(Ne>Ae&&await M(ne.provider,V,me,Q.signature,Ae))return{nextAuthority:be};throw new Error(`Ephemeral key expired. Expiration: ${Ne}. Test: ${Ae}`)};e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=E;const R=async(V,Q,ne)=>{if(!Q.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await M(ne.provider,V,Q.payload,Q.signature,ne.dateToValidateExpirationInMillis))return{nextAuthority:Q.payload};throw new Error("Invalid validation")};e.EIP_1654_SIGNED_ENTITY_VALIDATOR=R;const v=async(V,Q)=>({error:"Error Validator."});function I(V){return V.length===h?c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:c.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}e.getEphemeralSignatureType=I;function A(V){return V.length===h?c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:c.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}e.getSignedIdentitySignatureType=A;function y(V){const Q=V.replace(/\r/g,""),ne=Q.split(`